Skip to content

Feature/2399-share-assets - #2528

Merged
JoernBerkefeld merged 18 commits into
Accenture:developfrom
kacperkruger:feature/2399-share-assets
Sep 22, 2026
Merged

JoernBerkefeld merged 18 commits into
Accenture:developfrom
kacperkruger:feature/2399-share-assets

Conversation

@kacperkruger

@kacperkruger kacperkruger commented Mar 3, 2026 •

Copy link
Copy Markdown
Contributor

PR details

What changes did you make? (Give an overview)

  • Added option to automaticlly share assets during deployment.

  • Added --shareAsset option for building templates and deploying components

  • Changed stringification fields logic before templating to support nested paths with wildcards

  • closes [FEATURE] Automatic Asset Sharing After Deployment #2399

Further details (optional)

...

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • test scripts updated
  • Wiki updated (if applicable)

Comment thread lib/metadataTypes/MetadataType.js Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 --shareAsset CLI 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.

Comment thread lib/metadataTypes/Asset.js Resolved
Comment thread lib/metadataTypes/Asset.js Resolved
Comment thread lib/metadataTypes/Asset.js Resolved
Comment thread lib/metadataTypes/MetadataType.js Resolved
Comment thread lib/metadataTypes/MetadataType.js Resolved
@JoernBerkefeld JoernBerkefeld added this to the 9.1.0 milestone Mar 25, 2026
@JoernBerkefeld

Copy link
Copy Markdown
Contributor

@copilot pls fix

@kacperkruger

Copy link
Copy Markdown
Contributor Author

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

@JoernBerkefeld

Copy link
Copy Markdown
Contributor

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.

Comment thread lib/cli.js Resolved
kacperkruger and others added 3 commits September 17, 2026 11:00
# Conflicts:
#	@types/lib/index.d.ts.map
#	@types/lib/metadataTypes/Asset.d.ts.map
#	@types/lib/metadataTypes/MetadataType.d.ts.map
@JoernBerkefeld

Copy link
Copy Markdown
Contributor

heads-up: im rewriting this PR a bit to fit better into the release. intented outcomes stays. just the how changes

@JoernBerkefeld

Copy link
Copy Markdown
Contributor

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.

@JoernBerkefeld
JoernBerkefeld merged commit 65fd288 into Accenture:develop Sep 22, 2026
4 checks passed
@JoernBerkefeld JoernBerkefeld linked an issue Nov 11, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Automatic Asset Sharing After Deployment

3 participants