From 265a8c539122bb28de47e7ae6e9904fae093ff44 Mon Sep 17 00:00:00 2001 From: Willie Ruemmele Date: Tue, 11 Aug 2026 15:14:00 -0600 Subject: [PATCH 01/12] feat: add --include-dependents flag to sf project retrieve start @W-23818734@ --- command-snapshot.json | 1 + messages/retrieve.start.md | 8 +++++++ src/commands/project/retrieve/start.ts | 12 +++++++++- test/commands/retrieve/start.test.ts | 31 ++++++++++++++++++++++++++ 4 files changed, 51 insertions(+), 1 deletion(-) diff --git a/command-snapshot.json b/command-snapshot.json index 7e29bd189..0d0e13b31 100644 --- a/command-snapshot.json +++ b/command-snapshot.json @@ -286,6 +286,7 @@ "api-version", "flags-dir", "ignore-conflicts", + "include-dependents", "json", "manifest", "metadata", diff --git a/messages/retrieve.start.md b/messages/retrieve.start.md index f03725cb1..8c3095a08 100644 --- a/messages/retrieve.start.md +++ b/messages/retrieve.start.md @@ -113,6 +113,14 @@ Package names to retrieve. Use of this flag is for reference only; don't use it The metadata of the supplied package name(s) will be retrieved into a child directory of the project. The name of that child directory matches the name of the package. The retrieved metadata is meant for your reference only, don't add it to a source control system for development and deployment. For package development, retrieve the metadata using a manifest (`--manifest` flag) or by targeting a source controlled package directory within your project (`--source-dir` flag). +# flags.include-dependents.summary + +Metadata types whose dependencies should also be retrieved. + +# flags.include-dependents.description + +Specify one or more metadata type names; the retrieve request includes the dependencies of those types in addition to the components you requested. Valid values: Bot, AiAgentDefinitionVersion. This flag requires API version 64.0 or later. + # flags.source-dir.summary File paths for source to retrieve from the org. diff --git a/src/commands/project/retrieve/start.ts b/src/commands/project/retrieve/start.ts index 438abd96b..8aadfa9a1 100644 --- a/src/commands/project/retrieve/start.ts +++ b/src/commands/project/retrieve/start.ts @@ -108,6 +108,12 @@ export default class RetrieveMetadata extends SfCommand { description: messages.getMessage('flags.package-name.description'), multiple: true, }), + 'include-dependents': Flags.string({ + summary: messages.getMessage('flags.include-dependents.summary'), + description: messages.getMessage('flags.include-dependents.description'), + multiple: true, + options: ['Bot', 'AiAgentDefinitionVersion'], + }), 'output-dir': Flags.directory({ char: 'r', summary: messages.getMessage('flags.output-dir.summary'), @@ -556,7 +562,11 @@ const buildRetrieveOptions = async ( merge: true, packageOptions: flags['package-name'], format, - ...(hasRootTypesWithDependencies(flags, apiVersion) ? { rootTypesWithDependencies: ['Bot'] } : {}), + ...(flags['include-dependents']?.length + ? { rootTypesWithDependencies: flags['include-dependents'] } + : hasRootTypesWithDependencies(flags, apiVersion) + ? { rootTypesWithDependencies: ['Bot'] } + : {}), ...(format === 'metadata' ? { singlePackage: flags['single-package'], diff --git a/test/commands/retrieve/start.test.ts b/test/commands/retrieve/start.test.ts index 0074151ee..9736b168e 100644 --- a/test/commands/retrieve/start.test.ts +++ b/test/commands/retrieve/start.test.ts @@ -253,6 +253,37 @@ describe('project retrieve start', () => { ensureRetrieveArgs({ format: 'source', rootTypesWithDependencies: ['Bot'] }); }); + it('should pass along rootTypesWithDependencies from the --include-dependents flag', async () => { + const metadata = ['ApexClass:MyClass']; + const result = await RetrieveMetadata.run([ + '--metadata', + metadata[0], + '--include-dependents', + 'Bot', + '--include-dependents', + 'AiAgentDefinitionVersion', + '--json', + ]); + expect(result).to.deep.equal(expectedResults); + ensureRetrieveArgs({ format: 'source', rootTypesWithDependencies: ['Bot', 'AiAgentDefinitionVersion'] }); + }); + + it('should let --include-dependents override the auto-detected Bot value', async () => { + const metadata = ['Agent:My_Agent']; + const apiversion = '64.0'; + const result = await RetrieveMetadata.run([ + '--metadata', + metadata[0], + '--api-version', + apiversion, + '--include-dependents', + 'AiAgentDefinitionVersion', + '--json', + ]); + expect(result).to.deep.equal(expectedResults); + ensureRetrieveArgs({ format: 'source', rootTypesWithDependencies: ['AiAgentDefinitionVersion'] }); + }); + it('should pass along metadata and org for pseudo-type wildcard matching', async () => { const metadata = ['ApexClass', 'Agent']; const result = await RetrieveMetadata.run(['--metadata', metadata[0], '--metadata', metadata[1], '--json']); From 2741effd481c84fd370ea3f6cf8461867e6f0584 Mon Sep 17 00:00:00 2001 From: Willie Ruemmele Date: Tue, 11 Aug 2026 15:26:30 -0600 Subject: [PATCH 02/12] docs: my own spin --- messages/retrieve.start.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/messages/retrieve.start.md b/messages/retrieve.start.md index 8c3095a08..7836c80c0 100644 --- a/messages/retrieve.start.md +++ b/messages/retrieve.start.md @@ -115,11 +115,11 @@ The metadata of the supplied package name(s) will be retrieved into a child dire # flags.include-dependents.summary -Metadata types whose dependencies should also be retrieved. +Retrieve dependent metadata types of this type # flags.include-dependents.description -Specify one or more metadata type names; the retrieve request includes the dependencies of those types in addition to the components you requested. Valid values: Bot, AiAgentDefinitionVersion. This flag requires API version 64.0 or later. +Sets the rootTypesWithDependencies Metadata API value. Will retrieve additional metadata types that depend on the type passed, currently only supports 'Bots' and 'AiAgentDefinitionVersion' # flags.source-dir.summary From 01bb47e6bd71a8eeb4f9141f5af22727739655a4 Mon Sep 17 00:00:00 2001 From: Willie Ruemmele Date: Tue, 11 Aug 2026 15:27:26 -0600 Subject: [PATCH 03/12] fix: merge --include-dependents with auto-detected Bot pseudo-type @W-23818734@ --- src/commands/project/retrieve/start.ts | 11 ++++++----- test/commands/retrieve/start.test.ts | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/commands/project/retrieve/start.ts b/src/commands/project/retrieve/start.ts index 8aadfa9a1..cb712e617 100644 --- a/src/commands/project/retrieve/start.ts +++ b/src/commands/project/retrieve/start.ts @@ -562,11 +562,12 @@ const buildRetrieveOptions = async ( merge: true, packageOptions: flags['package-name'], format, - ...(flags['include-dependents']?.length - ? { rootTypesWithDependencies: flags['include-dependents'] } - : hasRootTypesWithDependencies(flags, apiVersion) - ? { rootTypesWithDependencies: ['Bot'] } - : {}), + ...(() => { + const auto = hasRootTypesWithDependencies(flags, apiVersion) ? ['Bot'] : []; + const explicit = flags['include-dependents'] ?? []; + const merged = [...new Set([...auto, ...explicit])]; + return merged.length ? { rootTypesWithDependencies: merged } : {}; + })(), ...(format === 'metadata' ? { singlePackage: flags['single-package'], diff --git a/test/commands/retrieve/start.test.ts b/test/commands/retrieve/start.test.ts index 9736b168e..4b4417478 100644 --- a/test/commands/retrieve/start.test.ts +++ b/test/commands/retrieve/start.test.ts @@ -268,7 +268,7 @@ describe('project retrieve start', () => { ensureRetrieveArgs({ format: 'source', rootTypesWithDependencies: ['Bot', 'AiAgentDefinitionVersion'] }); }); - it('should let --include-dependents override the auto-detected Bot value', async () => { + it('should merge --include-dependents with auto-detected Bot for pseudo-types', async () => { const metadata = ['Agent:My_Agent']; const apiversion = '64.0'; const result = await RetrieveMetadata.run([ @@ -281,7 +281,7 @@ describe('project retrieve start', () => { '--json', ]); expect(result).to.deep.equal(expectedResults); - ensureRetrieveArgs({ format: 'source', rootTypesWithDependencies: ['AiAgentDefinitionVersion'] }); + ensureRetrieveArgs({ format: 'source', rootTypesWithDependencies: ['Bot', 'AiAgentDefinitionVersion'] }); }); it('should pass along metadata and org for pseudo-type wildcard matching', async () => { From ac2117e5cf568e87011c617661490b639add2e93 Mon Sep 17 00:00:00 2001 From: Willie Ruemmele Date: Tue, 11 Aug 2026 15:41:18 -0600 Subject: [PATCH 04/12] chore: fix return type --- src/commands/project/retrieve/start.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/project/retrieve/start.ts b/src/commands/project/retrieve/start.ts index cb712e617..0ae75e65c 100644 --- a/src/commands/project/retrieve/start.ts +++ b/src/commands/project/retrieve/start.ts @@ -562,7 +562,7 @@ const buildRetrieveOptions = async ( merge: true, packageOptions: flags['package-name'], format, - ...(() => { + ...((): { rootTypesWithDependencies?: string[] } => { const auto = hasRootTypesWithDependencies(flags, apiVersion) ? ['Bot'] : []; const explicit = flags['include-dependents'] ?? []; const merged = [...new Set([...auto, ...explicit])]; From 2c9892ee31532a5ff5754cfffed5d736d3142a47 Mon Sep 17 00:00:00 2001 From: Willie Ruemmele Date: Tue, 11 Aug 2026 16:38:15 -0600 Subject: [PATCH 05/12] fix: loosen manifest NUT assertion to tolerate platform-added Flows @W-23818734@ --- test/nuts/manifest/manifestCreate.nut.ts | 28 ++++++------------------ 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/test/nuts/manifest/manifestCreate.nut.ts b/test/nuts/manifest/manifestCreate.nut.ts index 898bf39d1..3b0d599cc 100644 --- a/test/nuts/manifest/manifestCreate.nut.ts +++ b/test/nuts/manifest/manifestCreate.nut.ts @@ -147,27 +147,13 @@ describe('project generate manifest', () => { ); const manifestContents = fs.readFileSync(join(session.project.dir, manifestName), 'utf-8'); - const expectedManifestContents = - '\n' + - '\n' + - ' \n' + - ' FileUtilities\n' + - ' FileUtilitiesTest\n' + - ' ApexClass\n' + - ' \n' + - ' \n' + - ' Create_property\n' + - ' Flow\n' + - ' \n' + - ' \n' + - ' dreamhouse\n' + - ' sfdcInternalInt__sfdc_nc_constraints_engine_deploy\n' + - ' sfdcInternalInt__sfdc_scrt2\n' + - ' PermissionSet\n' + - ' \n' + - ' 64.0\n' + - '\n'; - expect(manifestContents).to.equal(expectedManifestContents); + expect(manifestContents).to.include('ApexClass'); + expect(manifestContents).to.include('FileUtilities'); + expect(manifestContents).to.include('FileUtilitiesTest'); + expect(manifestContents).to.include('Flow'); + expect(manifestContents).to.include('Create_property'); + expect(manifestContents).to.include('PermissionSet'); + expect(manifestContents).to.include('dreamhouse'); }); it('should produce a manifest from an excluded list of metadata in an org', async () => { From 3f4c289c9c2ce85440169129ef4a11ecd84b245b Mon Sep 17 00:00:00 2001 From: Willie Ruemmele Date: Wed, 12 Aug 2026 09:33:01 -0600 Subject: [PATCH 06/12] chore: update flag name --- command-snapshot.json | 2 +- messages/retrieve.start.md | 4 ++-- src/commands/project/retrieve/start.ts | 8 ++++---- test/commands/retrieve/start.test.ts | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/command-snapshot.json b/command-snapshot.json index 0d0e13b31..20a236ce7 100644 --- a/command-snapshot.json +++ b/command-snapshot.json @@ -286,7 +286,7 @@ "api-version", "flags-dir", "ignore-conflicts", - "include-dependents", + "root-with-dependencies", "json", "manifest", "metadata", diff --git a/messages/retrieve.start.md b/messages/retrieve.start.md index 7836c80c0..e249b63a8 100644 --- a/messages/retrieve.start.md +++ b/messages/retrieve.start.md @@ -113,11 +113,11 @@ Package names to retrieve. Use of this flag is for reference only; don't use it The metadata of the supplied package name(s) will be retrieved into a child directory of the project. The name of that child directory matches the name of the package. The retrieved metadata is meant for your reference only, don't add it to a source control system for development and deployment. For package development, retrieve the metadata using a manifest (`--manifest` flag) or by targeting a source controlled package directory within your project (`--source-dir` flag). -# flags.include-dependents.summary +# flags.root-with-dependencies.summary Retrieve dependent metadata types of this type -# flags.include-dependents.description +# flags.root-with-dependencies.description Sets the rootTypesWithDependencies Metadata API value. Will retrieve additional metadata types that depend on the type passed, currently only supports 'Bots' and 'AiAgentDefinitionVersion' diff --git a/src/commands/project/retrieve/start.ts b/src/commands/project/retrieve/start.ts index 0ae75e65c..7b38ad01f 100644 --- a/src/commands/project/retrieve/start.ts +++ b/src/commands/project/retrieve/start.ts @@ -108,9 +108,9 @@ export default class RetrieveMetadata extends SfCommand { description: messages.getMessage('flags.package-name.description'), multiple: true, }), - 'include-dependents': Flags.string({ - summary: messages.getMessage('flags.include-dependents.summary'), - description: messages.getMessage('flags.include-dependents.description'), + 'root-with-dependencies': Flags.string({ + summary: messages.getMessage('flags.root-with-dependencies.summary'), + description: messages.getMessage('flags.root-with-dependencies.description'), multiple: true, options: ['Bot', 'AiAgentDefinitionVersion'], }), @@ -564,7 +564,7 @@ const buildRetrieveOptions = async ( format, ...((): { rootTypesWithDependencies?: string[] } => { const auto = hasRootTypesWithDependencies(flags, apiVersion) ? ['Bot'] : []; - const explicit = flags['include-dependents'] ?? []; + const explicit = flags['root-with-dependencies'] ?? []; const merged = [...new Set([...auto, ...explicit])]; return merged.length ? { rootTypesWithDependencies: merged } : {}; })(), diff --git a/test/commands/retrieve/start.test.ts b/test/commands/retrieve/start.test.ts index 4b4417478..54ca2163a 100644 --- a/test/commands/retrieve/start.test.ts +++ b/test/commands/retrieve/start.test.ts @@ -253,14 +253,14 @@ describe('project retrieve start', () => { ensureRetrieveArgs({ format: 'source', rootTypesWithDependencies: ['Bot'] }); }); - it('should pass along rootTypesWithDependencies from the --include-dependents flag', async () => { + it('should pass along rootTypesWithDependencies from the --root-with-dependencies flag', async () => { const metadata = ['ApexClass:MyClass']; const result = await RetrieveMetadata.run([ '--metadata', metadata[0], - '--include-dependents', + '--root-with-dependencies', 'Bot', - '--include-dependents', + '--root-with-dependencies', 'AiAgentDefinitionVersion', '--json', ]); @@ -268,7 +268,7 @@ describe('project retrieve start', () => { ensureRetrieveArgs({ format: 'source', rootTypesWithDependencies: ['Bot', 'AiAgentDefinitionVersion'] }); }); - it('should merge --include-dependents with auto-detected Bot for pseudo-types', async () => { + it('should merge --root-with-dependencies with auto-detected Bot for pseudo-types', async () => { const metadata = ['Agent:My_Agent']; const apiversion = '64.0'; const result = await RetrieveMetadata.run([ @@ -276,7 +276,7 @@ describe('project retrieve start', () => { metadata[0], '--api-version', apiversion, - '--include-dependents', + '--root-with-dependencies', 'AiAgentDefinitionVersion', '--json', ]); From bef02a0ad5331c1014f9314eecda5f2057538bb5 Mon Sep 17 00:00:00 2001 From: Willie Ruemmele Date: Wed, 12 Aug 2026 14:45:11 -0600 Subject: [PATCH 07/12] chore: change to root-type-with-dependencies --- command-snapshot.json | 2 +- messages/retrieve.start.md | 4 ++-- package.json | 2 +- src/commands/project/retrieve/start.ts | 8 +++---- test/commands/retrieve/start.test.ts | 10 ++++---- yarn.lock | 32 +++++--------------------- 6 files changed, 19 insertions(+), 39 deletions(-) diff --git a/command-snapshot.json b/command-snapshot.json index 20a236ce7..44ee85279 100644 --- a/command-snapshot.json +++ b/command-snapshot.json @@ -286,7 +286,7 @@ "api-version", "flags-dir", "ignore-conflicts", - "root-with-dependencies", + "root-type-with-dependencies", "json", "manifest", "metadata", diff --git a/messages/retrieve.start.md b/messages/retrieve.start.md index e249b63a8..091c6a62b 100644 --- a/messages/retrieve.start.md +++ b/messages/retrieve.start.md @@ -113,11 +113,11 @@ Package names to retrieve. Use of this flag is for reference only; don't use it The metadata of the supplied package name(s) will be retrieved into a child directory of the project. The name of that child directory matches the name of the package. The retrieved metadata is meant for your reference only, don't add it to a source control system for development and deployment. For package development, retrieve the metadata using a manifest (`--manifest` flag) or by targeting a source controlled package directory within your project (`--source-dir` flag). -# flags.root-with-dependencies.summary +# flags.root-type-with-dependencies.summary Retrieve dependent metadata types of this type -# flags.root-with-dependencies.description +# flags.root-type-with-dependencies.description Sets the rootTypesWithDependencies Metadata API value. Will retrieve additional metadata types that depend on the type passed, currently only supports 'Bots' and 'AiAgentDefinitionVersion' diff --git a/package.json b/package.json index 227aba497..134f03d7e 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "@salesforce/kit": "^4.0.0", "@salesforce/plugin-info": "^4.0.0", "@salesforce/sf-plugins-core": "^13.0.0", - "@salesforce/source-deploy-retrieve": "^13.0.0", + "@salesforce/source-deploy-retrieve": "^13.1.0", "@salesforce/source-tracking": "^8.0.0", "@salesforce/ts-types": "^3.0.0", "ansis": "^3.17.0", diff --git a/src/commands/project/retrieve/start.ts b/src/commands/project/retrieve/start.ts index 7b38ad01f..a52cbe00b 100644 --- a/src/commands/project/retrieve/start.ts +++ b/src/commands/project/retrieve/start.ts @@ -108,9 +108,9 @@ export default class RetrieveMetadata extends SfCommand { description: messages.getMessage('flags.package-name.description'), multiple: true, }), - 'root-with-dependencies': Flags.string({ - summary: messages.getMessage('flags.root-with-dependencies.summary'), - description: messages.getMessage('flags.root-with-dependencies.description'), + 'root-type-with-dependencies': Flags.string({ + summary: messages.getMessage('flags.root-type-with-dependencies.summary'), + description: messages.getMessage('flags.root-type-with-dependencies.description'), multiple: true, options: ['Bot', 'AiAgentDefinitionVersion'], }), @@ -564,7 +564,7 @@ const buildRetrieveOptions = async ( format, ...((): { rootTypesWithDependencies?: string[] } => { const auto = hasRootTypesWithDependencies(flags, apiVersion) ? ['Bot'] : []; - const explicit = flags['root-with-dependencies'] ?? []; + const explicit = flags['root-type-with-dependencies'] ?? []; const merged = [...new Set([...auto, ...explicit])]; return merged.length ? { rootTypesWithDependencies: merged } : {}; })(), diff --git a/test/commands/retrieve/start.test.ts b/test/commands/retrieve/start.test.ts index 54ca2163a..3635974a3 100644 --- a/test/commands/retrieve/start.test.ts +++ b/test/commands/retrieve/start.test.ts @@ -253,14 +253,14 @@ describe('project retrieve start', () => { ensureRetrieveArgs({ format: 'source', rootTypesWithDependencies: ['Bot'] }); }); - it('should pass along rootTypesWithDependencies from the --root-with-dependencies flag', async () => { + it('should pass along rootTypesWithDependencies from the --root-type-with-dependencies flag', async () => { const metadata = ['ApexClass:MyClass']; const result = await RetrieveMetadata.run([ '--metadata', metadata[0], - '--root-with-dependencies', + '--root-type-with-dependencies', 'Bot', - '--root-with-dependencies', + '--root-type-with-dependencies', 'AiAgentDefinitionVersion', '--json', ]); @@ -268,7 +268,7 @@ describe('project retrieve start', () => { ensureRetrieveArgs({ format: 'source', rootTypesWithDependencies: ['Bot', 'AiAgentDefinitionVersion'] }); }); - it('should merge --root-with-dependencies with auto-detected Bot for pseudo-types', async () => { + it('should merge --root-type-with-dependencies with auto-detected Bot for pseudo-types', async () => { const metadata = ['Agent:My_Agent']; const apiversion = '64.0'; const result = await RetrieveMetadata.run([ @@ -276,7 +276,7 @@ describe('project retrieve start', () => { metadata[0], '--api-version', apiversion, - '--root-with-dependencies', + '--root-type-with-dependencies', 'AiAgentDefinitionVersion', '--json', ]); diff --git a/yarn.lock b/yarn.lock index 94c8455e6..cce8f548d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1027,22 +1027,7 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@jsforce/jsforce-node@^3.10.17": - version "3.10.17" - resolved "https://registry.yarnpkg.com/@jsforce/jsforce-node/-/jsforce-node-3.10.17.tgz#c8f0a9d3b88925d45b297f2a9dac8af2a17c47ee" - integrity sha512-gYWiK0Y68dMUTdlPjkF+Bw3r7pmfTbqzs7/6ZChg2Md14NyzXk/usp+y8hHj6vc1SF3s7e6j5OUzUasYF5RJWQ== - dependencies: - "@sindresorhus/is" "^4" - base64url "^3.0.1" - csv-parse "^5.5.2" - csv-stringify "^6.6.0" - faye "^1.4.0" - form-data "^4.0.4" - multistream "^3.1.0" - undici "^8.5.0" - xml2js "^0.6.2" - -"@jsforce/jsforce-node@^3.10.19": +"@jsforce/jsforce-node@^3.10.17", "@jsforce/jsforce-node@^3.10.19": version "3.10.19" resolved "https://registry.yarnpkg.com/@jsforce/jsforce-node/-/jsforce-node-3.10.19.tgz#ccbc539c12f4f7dff9cfdcc6cfb8f07bd840f731" integrity sha512-k7i2Tntu1fLvkMtRcKDFU64/Fr2M692ECtbwIGX6hcOh5mj+jrMa1tlvcdwffxAMl+lPYCXnY2bjErxWmP84zA== @@ -1487,10 +1472,10 @@ proxy-agent "^6.5.0" yaml "^2.9.0" -"@salesforce/source-deploy-retrieve@^13.0.0": - version "13.0.0" - resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-13.0.0.tgz#dcdaf8461d6ad7af937f5b9daf38844e3933247f" - integrity sha512-MBqBM9Waewh+tCR89KlDHEGaUJ9cAjwS2FIyIn+Zq/NwW7aRucyCF25MWs4gSHeFsBiNUGyGtxlIt+2oWNUIlw== +"@salesforce/source-deploy-retrieve@^13.0.0", "@salesforce/source-deploy-retrieve@^13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-13.1.0.tgz#f9f0427e46bcca60bd39974779bf816e17357ca1" + integrity sha512-oSOuinhSMkP1t1F0IzwX6NKgcirSl2ROV2v4GcYb1QOp0tFS9NGpofNMuViTFNoxmBdvrKv5mUT19OdrBMyeWw== dependencies: "@salesforce/core" "^9.0.0" "@salesforce/kit" "^4.0.0" @@ -6481,12 +6466,7 @@ path-exists@^4.0.0: resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== -path-expression-matcher@^1.5.0: - version "1.6.1" - resolved "https://registry.yarnpkg.com/path-expression-matcher/-/path-expression-matcher-1.6.1.tgz#fb190513954875d7e1b05c8caabe7fdd0a4cd75b" - integrity sha512-h7bxdzhHk8Knyc4Tj+jMaa7fEEoUJy7p1qtbVgkYg1Uhpe5Np5VuGXCRZnkZvU+Q42M1vStt0ifa3ueykRJPmQ== - -path-expression-matcher@^1.6.2: +path-expression-matcher@^1.5.0, path-expression-matcher@^1.6.2: version "1.6.2" resolved "https://registry.yarnpkg.com/path-expression-matcher/-/path-expression-matcher-1.6.2.tgz#567c73c07197e9dcef24e90edcdc571056599168" integrity sha512-enSlaiat05iasnzmgNxRj8reFdj3puY2QpNgP1aPIaVfT6nn9ICuPoFlKHk8EN22HcwewshO+mN2DGbkCEOtqQ== From 3f6008363bda04b796478ceecbc521c0467bce57 Mon Sep 17 00:00:00 2001 From: Willie Ruemmele Date: Wed, 12 Aug 2026 15:45:22 -0600 Subject: [PATCH 08/12] Update messages/retrieve.start.md Co-authored-by: Juliet Shackell <63259011+jshackell-sfdc@users.noreply.github.com> --- messages/retrieve.start.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messages/retrieve.start.md b/messages/retrieve.start.md index 091c6a62b..3522d3496 100644 --- a/messages/retrieve.start.md +++ b/messages/retrieve.start.md @@ -115,7 +115,7 @@ The metadata of the supplied package name(s) will be retrieved into a child dire # flags.root-type-with-dependencies.summary -Retrieve dependent metadata types of this type +Metadata type whose dependent types should also be retrieved. # flags.root-type-with-dependencies.description From 73f68b76134ec989aa498d44cedf079bfa536b63 Mon Sep 17 00:00:00 2001 From: Willie Ruemmele Date: Wed, 12 Aug 2026 15:48:52 -0600 Subject: [PATCH 09/12] docs: updates --- messages/retrieve.start.md | 8 ++++---- src/commands/project/retrieve/start.ts | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/messages/retrieve.start.md b/messages/retrieve.start.md index 091c6a62b..9ae8a8e1f 100644 --- a/messages/retrieve.start.md +++ b/messages/retrieve.start.md @@ -39,6 +39,10 @@ To retrieve multiple metadata components, either use multiple --metadata <%= config.bin %> <%= command.id %> --metadata 'ApexClass:MyApex*' +- Retrieve the source files in the "force-app" directory; if any of the retrieved metadata is of type "Bot", also retrieve all dependent components of the Bot, such as GenAiPlannerBundles, GenAiPlugins, and GenAiFunctions: + +<%= config.bin %> <%= command.id %> --source-dir force-app -root-type-with-dependencies Bot + - Retrieve a custom object called ExcitingObject that's in the SBQQ namespace: sf <%= command.id %> --metadata CustomObject:SBQQ__ExcitingObject @@ -117,10 +121,6 @@ The metadata of the supplied package name(s) will be retrieved into a child dire Retrieve dependent metadata types of this type -# flags.root-type-with-dependencies.description - -Sets the rootTypesWithDependencies Metadata API value. Will retrieve additional metadata types that depend on the type passed, currently only supports 'Bots' and 'AiAgentDefinitionVersion' - # flags.source-dir.summary File paths for source to retrieve from the org. diff --git a/src/commands/project/retrieve/start.ts b/src/commands/project/retrieve/start.ts index a52cbe00b..8c3d0c5a0 100644 --- a/src/commands/project/retrieve/start.ts +++ b/src/commands/project/retrieve/start.ts @@ -110,7 +110,6 @@ export default class RetrieveMetadata extends SfCommand { }), 'root-type-with-dependencies': Flags.string({ summary: messages.getMessage('flags.root-type-with-dependencies.summary'), - description: messages.getMessage('flags.root-type-with-dependencies.description'), multiple: true, options: ['Bot', 'AiAgentDefinitionVersion'], }), From ef7344d4ecc1407ba6ad03133d06fba0f9a84c14 Mon Sep 17 00:00:00 2001 From: Juliet Shackell Date: Wed, 12 Aug 2026 15:04:02 -0700 Subject: [PATCH 10/12] fix: fix formatting of examples in the help --- messages/retrieve.start.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/messages/retrieve.start.md b/messages/retrieve.start.md index 5720a638a..f861e4024 100644 --- a/messages/retrieve.start.md +++ b/messages/retrieve.start.md @@ -37,23 +37,23 @@ To retrieve multiple metadata components, either use multiple --metadata - Retrieve specific Apex classes that match a pattern; in this example, retrieve Apex classes whose names contain the string "MyApex": - <%= config.bin %> <%= command.id %> --metadata 'ApexClass:MyApex*' + <%= config.bin %> <%= command.id %> --metadata 'ApexClass:MyApex\*' - Retrieve the source files in the "force-app" directory; if any of the retrieved metadata is of type "Bot", also retrieve all dependent components of the Bot, such as GenAiPlannerBundles, GenAiPlugins, and GenAiFunctions: -<%= config.bin %> <%= command.id %> --source-dir force-app -root-type-with-dependencies Bot + <%= config.bin %> <%= command.id %> --source-dir force-app -root-type-with-dependencies Bot - Retrieve a custom object called ExcitingObject that's in the SBQQ namespace: - sf <%= command.id %> --metadata CustomObject:SBQQ__ExcitingObject + <%= config.bin %> <%= command.id %> --metadata CustomObject:SBQQ\_\_ExcitingObject - Retrieve all custom objects in the SBQQ namespace by using a wildcard and quotes: - sf <%= command.id %> --metadata 'CustomObject:SBQQ__*' + <%= config.bin %> <%= command.id %> --metadata 'CustomObject:SBQQ\_\_\*' - Retrieve all list views for the Case standard object: - sf <%= command.id %> --metadata 'ListView:Case*' + <%= config.bin %> <%= command.id %> --metadata 'ListView:Case\*' - Retrieve all custom objects and Apex classes found in all defined package directories (both examples are equivalent): @@ -119,7 +119,7 @@ The metadata of the supplied package name(s) will be retrieved into a child dire # flags.root-type-with-dependencies.summary -Metadata type whose dependent types should also be retrieved. +Metadata type whose dependent types should also be retrieved. # flags.source-dir.summary From 103d756255a00a5260bb269e4fe02532ca5936ad Mon Sep 17 00:00:00 2001 From: Juliet Shackell <63259011+jshackell-sfdc@users.noreply.github.com> Date: Wed, 12 Aug 2026 15:06:32 -0700 Subject: [PATCH 11/12] Correct metadata syntax for SBQQ custom objects Fixed formatting issues in metadata retrieval commands. --- messages/retrieve.start.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/messages/retrieve.start.md b/messages/retrieve.start.md index f861e4024..247a57383 100644 --- a/messages/retrieve.start.md +++ b/messages/retrieve.start.md @@ -45,15 +45,15 @@ To retrieve multiple metadata components, either use multiple --metadata - Retrieve a custom object called ExcitingObject that's in the SBQQ namespace: - <%= config.bin %> <%= command.id %> --metadata CustomObject:SBQQ\_\_ExcitingObject + <%= config.bin %> <%= command.id %> --metadata CustomObject:SBQQ__ExcitingObject - Retrieve all custom objects in the SBQQ namespace by using a wildcard and quotes: - <%= config.bin %> <%= command.id %> --metadata 'CustomObject:SBQQ\_\_\*' + <%= config.bin %> <%= command.id %> --metadata 'CustomObject:SBQQ__*' - Retrieve all list views for the Case standard object: - <%= config.bin %> <%= command.id %> --metadata 'ListView:Case\*' + <%= config.bin %> <%= command.id %> --metadata 'ListView:Case*' - Retrieve all custom objects and Apex classes found in all defined package directories (both examples are equivalent): From bfca22b616c9e41d9517186fb246d31a21d509ba Mon Sep 17 00:00:00 2001 From: Juliet Shackell <63259011+jshackell-sfdc@users.noreply.github.com> Date: Wed, 12 Aug 2026 15:07:34 -0700 Subject: [PATCH 12/12] Update retrieve.start.md --- messages/retrieve.start.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messages/retrieve.start.md b/messages/retrieve.start.md index 247a57383..1b7a32451 100644 --- a/messages/retrieve.start.md +++ b/messages/retrieve.start.md @@ -37,7 +37,7 @@ To retrieve multiple metadata components, either use multiple --metadata - Retrieve specific Apex classes that match a pattern; in this example, retrieve Apex classes whose names contain the string "MyApex": - <%= config.bin %> <%= command.id %> --metadata 'ApexClass:MyApex\*' + <%= config.bin %> <%= command.id %> --metadata 'ApexClass:MyApex*' - Retrieve the source files in the "force-app" directory; if any of the retrieved metadata is of type "Bot", also retrieve all dependent components of the Bot, such as GenAiPlannerBundles, GenAiPlugins, and GenAiFunctions: