Repository navigation
Feature/2399-share-assets - #2528
Conversation
…ore removing businessUnitAvailability
…n for build definition
There was a problem hiding this comment.
Pull request overview
Adds an opt-in --shareAsset workflow to include asset sharing metadata during templating and deployment, and extends the pre-templating stringification logic to support nested field paths (including wildcards) so numeric IDs can be safely templated.
Changes:
- Added
--shareAssetCLI option across deploy/build/template-related commands and wired it into global option handling. - Enabled (opt-in) inclusion/templating of asset sharing fields (
businessUnitAvailability,sharingProperties) and added tests for templating output. - Enhanced
MetadataType.buildTemplate()numeric-to-string preprocessing to support nested paths with%wildcards.
Reviewed changes
Copilot reviewed 6 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
lib/metadataTypes/MetadataType.js |
Reworked stringify-before-template logic to support nested paths/wildcards. |
lib/metadataTypes/definitions/Asset.definition.js |
Added nested stringify paths needed for templating share-related numeric IDs. |
lib/metadataTypes/Asset.js |
Opt-in enabling of share-related fields + changed create behavior when shareAsset is set. |
lib/cli.js |
Exposed --shareAsset flag on multiple commands. |
lib/index.js |
Added shareAsset to recognized options. |
test/type.asset.test.js |
Added templating test asserting share fields are preserved and numeric IDs are stringified. |
@types/lib/metadataTypes/Asset.d.ts |
Updated typings to include newly referenced type and new helper methods. |
@types/**/*.d.ts.map |
Regenerated sourcemaps reflecting the above changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot pls fix |
|
Hi @JoernBerkefeld, do you have any estimate for when this feature might be released? Also please let me know if there's anything else needed from my side to move this forward |
|
Hi @kacperkruger - sorry about the delay. I've been on parental leave and concentrated on my privately published sfmc tools these pasts months due to it. Let me prioritize your PR this week. |
Co-authored-by: Jörn Berkefeld <[email protected]>
# Conflicts: # @types/lib/index.d.ts.map # @types/lib/metadataTypes/Asset.d.ts.map # @types/lib/metadataTypes/MetadataType.d.ts.map
…kruger/sfmc-devtools into pr/kacperkruger/2528 # Conflicts: # lib/cli.js
|
heads-up: im rewriting this PR a bit to fit better into the release. intented outcomes stays. just the how changes |
…reduced shareAsset functionality to where it is solely needed
… after templating finished
|
I found that only templating was removing that sharing info in the first place, specifically, the buildtemplate functionality. Therefore, I removed your new flag from other functions that would not use it anyways. Looking good so far from my end. |
PR details
What changes did you make? (Give an overview)
Added option to automaticlly share assets during deployment.
Added
--shareAssetoption for building templates and deploying componentsChanged stringification fields logic before templating to support nested paths with wildcards
closes [FEATURE] Automatic Asset Sharing After Deployment #2399
Further details (optional)
...
Checklist