@salesforce/plugin-deploy-retrieve 3.9.27 → 3.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -141,7 +141,7 @@ FLAG DESCRIPTIONS
141
141
  If you specify this parameter, don’t specify --metadata or --source-dir.
142
142
  ```
143
143
 
144
- _See code: [src/commands/project/convert/mdapi.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.9.27/src/commands/project/convert/mdapi.ts)_
144
+ _See code: [src/commands/project/convert/mdapi.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.10.1/src/commands/project/convert/mdapi.ts)_
145
145
 
146
146
  ## `sf project convert source`
147
147
 
@@ -153,7 +153,7 @@ USAGE
153
153
  [-p <value>... | -x <value> | -m <value>...]
154
154
 
155
155
  FLAGS
156
- -d, --output-dir=<value> [default: metadataPackage_1723521142975] Output directory to store the Metadata
156
+ -d, --output-dir=<value> [default: metadataPackage_1724184665646] Output directory to store the Metadata
157
157
  API–formatted files in.
158
158
  -m, --metadata=<value>... Metadata component names to convert.
159
159
  -n, --package-name=<value> Name of the package to associate with the metadata-formatted files.
@@ -214,7 +214,7 @@ FLAG DESCRIPTIONS
214
214
  Override the api version used for api requests made by this command
215
215
  ```
216
216
 
217
- _See code: [src/commands/project/convert/source.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.9.27/src/commands/project/convert/source.ts)_
217
+ _See code: [src/commands/project/convert/source.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.10.1/src/commands/project/convert/source.ts)_
218
218
 
219
219
  ## `sf project convert source-behavior`
220
220
 
@@ -223,14 +223,14 @@ Enable a behavior of your project source files, and then update your Salesforce
223
223
  ```
224
224
  USAGE
225
225
  $ sf project convert source-behavior -b
226
- decomposeCustomLabelsBeta|decomposePermissionSetBeta|decomposeSharingRulesBeta|decomposeWorkflowBeta [--json]
227
- [--flags-dir <value>] [--dry-run] [--preserve-temp-dir] [-o <value>]
226
+ decomposeCustomLabelsBeta2|decomposeCustomLabelsBeta|decomposePermissionSetBeta|decomposeSharingRulesBeta|decomposeW
227
+ orkflowBeta [--json] [--flags-dir <value>] [--dry-run] [--preserve-temp-dir] [-o <value>]
228
228
 
229
229
  FLAGS
230
230
  -b, --behavior=<option> (required) Behavior to enable; the values correspond to the possible values of the
231
231
  "sourceBehaviorOption" option in the "sfdx-project.json" file.
232
- <options: decomposeCustomLabelsBeta|decomposePermissionSetBeta|decomposeSharingRulesBeta|dec
233
- omposeWorkflowBeta>
232
+ <options: decomposeCustomLabelsBeta2|decomposeCustomLabelsBeta|decomposePermissionSetBeta|de
233
+ composeSharingRulesBeta|decomposeWorkflowBeta>
234
234
  -o, --target-org=<value> Username or alias of the target org.
235
235
  --dry-run Display what the command would do, but don't make any actual changes.
236
236
  --preserve-temp-dir Don't delete the metadata API format temporary directory that this command creates. Useful
@@ -258,20 +258,20 @@ DESCRIPTION
258
258
  https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_config.htm topic.
259
259
 
260
260
  EXAMPLES
261
- Update your Salesforce DX project to decompose custom labels:
261
+ Update your Salesforce DX project to decompose custom permission sets:
262
262
 
263
- $ sf project convert source-behavior --behavior decomposeCustomLabelsBeta
263
+ $ sf project convert source-behavior --behavior decomposePermissionSetBeta
264
264
 
265
265
  Display what the command would do, but don't change any existing files:
266
266
 
267
- $ sf project convert source-behavior --behavior decomposeCustomLabelsBeta --dry-run
267
+ $ sf project convert source-behavior --behavior decomposePermissionSetBeta --dry-run
268
268
 
269
269
  Keep the temporary directory that contains the interim metadata API formatted files:
270
270
 
271
- $ sf project convert source-behavior --behavior decomposeCustomLabelsBeta --dry-run --preserve-temp-dir
271
+ $ sf project convert source-behavior --behavior decomposePermissionSetBeta --dry-run --preserve-temp-dir
272
272
  ```
273
273
 
274
- _See code: [src/commands/project/convert/source-behavior.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.9.27/src/commands/project/convert/source-behavior.ts)_
274
+ _See code: [src/commands/project/convert/source-behavior.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.10.1/src/commands/project/convert/source-behavior.ts)_
275
275
 
276
276
  ## `sf project delete source`
277
277
 
@@ -411,7 +411,7 @@ FLAG DESCRIPTIONS
411
411
  - Separate the test names with spaces: --tests Test1 Test2 "Test With Space"
412
412
  ```
413
413
 
414
- _See code: [src/commands/project/delete/source.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.9.27/src/commands/project/delete/source.ts)_
414
+ _See code: [src/commands/project/delete/source.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.10.1/src/commands/project/delete/source.ts)_
415
415
 
416
416
  ## `sf project delete tracking`
417
417
 
@@ -448,7 +448,7 @@ EXAMPLES
448
448
  $ sf project delete tracking --target-org my-scratch
449
449
  ```
450
450
 
451
- _See code: [src/commands/project/delete/tracking.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.9.27/src/commands/project/delete/tracking.ts)_
451
+ _See code: [src/commands/project/delete/tracking.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.10.1/src/commands/project/delete/tracking.ts)_
452
452
 
453
453
  ## `sf project deploy cancel`
454
454
 
@@ -520,7 +520,7 @@ FLAG DESCRIPTIONS
520
520
  project deploy report".
521
521
  ```
522
522
 
523
- _See code: [src/commands/project/deploy/cancel.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.9.27/src/commands/project/deploy/cancel.ts)_
523
+ _See code: [src/commands/project/deploy/cancel.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.10.1/src/commands/project/deploy/cancel.ts)_
524
524
 
525
525
  ## `sf project deploy preview`
526
526
 
@@ -603,7 +603,7 @@ FLAG DESCRIPTIONS
603
603
  All child components are included. If you specify this flag, don’t specify --metadata or --source-dir.
604
604
  ```
605
605
 
606
- _See code: [src/commands/project/deploy/preview.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.9.27/src/commands/project/deploy/preview.ts)_
606
+ _See code: [src/commands/project/deploy/preview.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.10.1/src/commands/project/deploy/preview.ts)_
607
607
 
608
608
  ## `sf project deploy quick`
609
609
 
@@ -687,7 +687,7 @@ FLAG DESCRIPTIONS
687
687
  deploy report".
688
688
  ```
689
689
 
690
- _See code: [src/commands/project/deploy/quick.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.9.27/src/commands/project/deploy/quick.ts)_
690
+ _See code: [src/commands/project/deploy/quick.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.10.1/src/commands/project/deploy/quick.ts)_
691
691
 
692
692
  ## `sf project deploy report`
693
693
 
@@ -779,7 +779,7 @@ FLAG DESCRIPTIONS
779
779
  --coverage-formatters lcov --coverage-formatters clover
780
780
  ```
781
781
 
782
- _See code: [src/commands/project/deploy/report.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.9.27/src/commands/project/deploy/report.ts)_
782
+ _See code: [src/commands/project/deploy/report.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.10.1/src/commands/project/deploy/report.ts)_
783
783
 
784
784
  ## `sf project deploy resume`
785
785
 
@@ -864,7 +864,7 @@ FLAG DESCRIPTIONS
864
864
  --coverage-formatters lcov --coverage-formatters clover
865
865
  ```
866
866
 
867
- _See code: [src/commands/project/deploy/resume.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.9.27/src/commands/project/deploy/resume.ts)_
867
+ _See code: [src/commands/project/deploy/resume.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.10.1/src/commands/project/deploy/resume.ts)_
868
868
 
869
869
  ## `sf project deploy start`
870
870
 
@@ -1100,7 +1100,7 @@ FLAG DESCRIPTIONS
1100
1100
  --coverage-formatters lcov --coverage-formatters clover
1101
1101
  ```
1102
1102
 
1103
- _See code: [src/commands/project/deploy/start.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.9.27/src/commands/project/deploy/start.ts)_
1103
+ _See code: [src/commands/project/deploy/start.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.10.1/src/commands/project/deploy/start.ts)_
1104
1104
 
1105
1105
  ## `sf project deploy validate`
1106
1106
 
@@ -1273,7 +1273,7 @@ FLAG DESCRIPTIONS
1273
1273
  --coverage-formatters lcov --coverage-formatters clover
1274
1274
  ```
1275
1275
 
1276
- _See code: [src/commands/project/deploy/validate.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.9.27/src/commands/project/deploy/validate.ts)_
1276
+ _See code: [src/commands/project/deploy/validate.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.10.1/src/commands/project/deploy/validate.ts)_
1277
1277
 
1278
1278
  ## `sf project generate manifest`
1279
1279
 
@@ -1350,7 +1350,7 @@ EXAMPLES
1350
1350
  $ sf project generate manifest --from-org test@myorg.com --include-packages unlocked
1351
1351
  ```
1352
1352
 
1353
- _See code: [src/commands/project/generate/manifest.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.9.27/src/commands/project/generate/manifest.ts)_
1353
+ _See code: [src/commands/project/generate/manifest.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.10.1/src/commands/project/generate/manifest.ts)_
1354
1354
 
1355
1355
  ## `sf project list ignored`
1356
1356
 
@@ -1392,7 +1392,7 @@ EXAMPLES
1392
1392
  $ sf project list ignored --source-dir package.xml
1393
1393
  ```
1394
1394
 
1395
- _See code: [src/commands/project/list/ignored.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.9.27/src/commands/project/list/ignored.ts)_
1395
+ _See code: [src/commands/project/list/ignored.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.10.1/src/commands/project/list/ignored.ts)_
1396
1396
 
1397
1397
  ## `sf project reset tracking`
1398
1398
 
@@ -1441,7 +1441,7 @@ EXAMPLES
1441
1441
  $ sf project reset tracking --revision 30
1442
1442
  ```
1443
1443
 
1444
- _See code: [src/commands/project/reset/tracking.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.9.27/src/commands/project/reset/tracking.ts)_
1444
+ _See code: [src/commands/project/reset/tracking.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.10.1/src/commands/project/reset/tracking.ts)_
1445
1445
 
1446
1446
  ## `sf project retrieve preview`
1447
1447
 
@@ -1495,7 +1495,7 @@ FLAG DESCRIPTIONS
1495
1495
  production orgs.
1496
1496
  ```
1497
1497
 
1498
- _See code: [src/commands/project/retrieve/preview.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.9.27/src/commands/project/retrieve/preview.ts)_
1498
+ _See code: [src/commands/project/retrieve/preview.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.10.1/src/commands/project/retrieve/preview.ts)_
1499
1499
 
1500
1500
  ## `sf project retrieve start`
1501
1501
 
@@ -1664,6 +1664,6 @@ FLAG DESCRIPTIONS
1664
1664
  If you specify this parameter, don’t specify --metadata or --source-dir.
1665
1665
  ```
1666
1666
 
1667
- _See code: [src/commands/project/retrieve/start.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.9.27/src/commands/project/retrieve/start.ts)_
1667
+ _See code: [src/commands/project/retrieve/start.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.10.1/src/commands/project/retrieve/start.ts)_
1668
1668
 
1669
1669
  <!-- commandsstop -->
@@ -5,6 +5,8 @@
5
5
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
6
  */
7
7
  import { rm, readFile, writeFile } from 'node:fs/promises';
8
+ import { join } from 'node:path';
9
+ import { existsSync } from 'node:fs';
8
10
  import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
9
11
  import { Messages } from '@salesforce/core';
10
12
  import { getValidatedProjectJson, TMP_DIR, convertToMdapi, DRY_RUN_DIR, PRESETS_PROP, PRESET_CHOICES, getPackageDirectoriesForPreset, convertBackToSource, } from '../../../utils/convertBehavior.js';
@@ -41,6 +43,13 @@ export default class ConvertSourceBehavior extends SfCommand {
41
43
  flags['dry-run'] ? readFile(projectJson.getPath()) : '',
42
44
  getPackageDirectoriesForPreset(this.project, flags.behavior),
43
45
  ]);
46
+ if (!packageDirsWithDecomposable.every(hasMainDefault(this.project.getPath()))) {
47
+ this.warn(messages.getMessage('mainDefaultConfirmation'));
48
+ }
49
+ if (!flags['dry-run']) {
50
+ this.warn(messages.getMessage('basicConfirmation'));
51
+ await this.confirm({ message: 'Proceed' });
52
+ }
44
53
  const filesToDelete = await convertToMdapi(packageDirsWithDecomposable);
45
54
  // flip the preset in the sfdx-project.json, even for dry-run, since the registry will need for conversions
46
55
  projectJson.set(PRESETS_PROP, [...(projectJson.get(PRESETS_PROP) ?? []), flags.behavior]);
@@ -71,4 +80,7 @@ export default class ConvertSourceBehavior extends SfCommand {
71
80
  };
72
81
  }
73
82
  }
83
+ /** convert will put things in /main/default. If the packageDirs aren't configured that way, we'll need to warn the user
84
+ * See https://salesforce.quip.com/va5IAgXmTMWF for details on that issue */
85
+ const hasMainDefault = (projectDir) => (i) => existsSync(join(projectDir, i.packageDirPath, 'main', 'default'));
74
86
  //# sourceMappingURL=source-behavior.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"source-behavior.js","sourceRoot":"","sources":["../../../../src/commands/project/convert/source-behavior.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,uBAAuB,EACvB,OAAO,EACP,cAAc,EACd,WAAW,EACX,YAAY,EACZ,cAAc,EACd,8BAA8B,EAC9B,mBAAmB,GACpB,MAAM,mCAAmC,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AAS,CAAC;SACzB,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,EAAE,CAAC;YAChC,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACzC,CAAC;QAED,IAAI,CAAC,KAAK,CACR,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,EACxC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,qDAAqD,CAAC,CAAC,CAAC,eAAe,EAAE,EAAE,CAClH,CAAC;QACF,IAAI,CAAC,GAAG,EAAE,CAAC;QACX,IAAI,CAAC,KAAK,CACR,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,EACvC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,EAAE,CACvC,CAAC;QACF,IAAI,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;YACrB,yBAAyB;YACzB,MAAM,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,EAAE,mBAAmB,CAAC,CAAC;YAC5D,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QACxE,CAAC;QAED,OAAO;YACL,YAAY;YACZ,YAAY,EAAE,aAAa;YAC3B,qBAAqB,EAAE,WAAW,CAAC,GAAG,CAAW,YAAY,CAAC;SAC/D,CAAC;IACJ,CAAC"}
1
+ {"version":3,"file":"source-behavior.js","sourceRoot":"","sources":["../../../../src/commands/project/convert/source-behavior.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,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E,CAClH,CAAC;QACF,IAAI,CAAC,GAAG,EAAE,CAAC;QACX,IAAI,CAAC,KAAK,CACR,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,EACvC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,EAAE,CACvC,CAAC;QACF,IAAI,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;YACrB,yBAAyB;YACzB,MAAM,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,EAAE,mBAAmB,CAAC,CAAC;YAC5D,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QACxE,CAAC;QAED,OAAO;YACL,YAAY;YACZ,YAAY,EAAE,aAAa;YAC3B,qBAAqB,EAAE,WAAW,CAAC,GAAG,CAAW,YAAY,CAAC;SAC/D,CAAC;IACJ,CAAC;;AAGH;4EAC4E;AAC5E,MAAM,cAAc,GAClB,CAAC,UAAkB,EAAE,EAAE,CACvB,CAAC,CAAgC,EAAW,EAAE,CAC5C,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,cAAc,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC"}
@@ -4,11 +4,11 @@
4
4
  * Licensed under the BSD 3-Clause license.
5
5
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
6
  */
7
- import { existsSync, readdirSync } from 'node:fs';
7
+ import { readdirSync } from 'node:fs';
8
8
  import { readFile } from 'node:fs/promises';
9
9
  import { join, resolve } from 'node:path';
10
10
  import { fileURLToPath } from 'node:url';
11
- import { SfError, Messages } from '@salesforce/core';
11
+ import { SfError, SfProject, Messages } from '@salesforce/core';
12
12
  import { ComponentSetBuilder, MetadataConverter, RegistryAccess, presetMap, } from '@salesforce/source-deploy-retrieve';
13
13
  import { isString } from '@salesforce/ts-types';
14
14
  // TODO: there could be a cleaner way to read this
@@ -20,15 +20,13 @@ export const DRY_RUN_DIR = 'DRY-RUN-RESULTS';
20
20
  /** returns packageDirectories and ComponentsSets where there is metadata of the type we'll change the behavior for */
21
21
  export const getPackageDirectoriesForPreset = async (project, preset) => {
22
22
  const projectDir = project.getPath();
23
+ const messages = loadMessages();
23
24
  const output = (await Promise.all(project
24
25
  .getPackageDirectories()
25
26
  .map((pd) => pd.path)
26
- .map(componentSetFromPackageDirectory(projectDir)(await getTypesFromPreset(preset)))))
27
- .filter(componentSetIsNonEmpty)
28
- // we do this after filtering componentSets to reduce false positives (ex: dir does not have main/default but also has nothing to decompose)
29
- .map(validateMainDefault(projectDir));
27
+ .map(componentSetFromPackageDirectory(projectDir)(await getTypesFromPreset(preset))))).filter(componentSetIsNonEmpty);
30
28
  if (output.length === 0) {
31
- loadMessages().createError('error.noTargetTypes', [preset]);
29
+ messages.createError('error.noTargetTypes', [preset]);
32
30
  }
33
31
  return output;
34
32
  };
@@ -83,6 +81,7 @@ const componentSetFromPackageDirectory = (projectDir) => (metadataEntries) => as
83
81
  const convertToSource = async ({ packageDirsWithPreset, projectDir, dryRunDir, }) => {
84
82
  // mdapi=>source convert the target dir back to the project
85
83
  // it's a new converter because the project has changed and it should reload the project's registry.
84
+ SfProject.clearInstances(); // break the singleton so SDR will re-read to get the new preset
86
85
  const converter = new MetadataConverter(new RegistryAccess(undefined, projectDir));
87
86
  return Promise.all(packageDirsWithPreset.map(async (pd) => converter.convert(
88
87
  // componentSet based on each mdapi folder
@@ -104,14 +103,6 @@ const convertToSource = async ({ packageDirsWithPreset, projectDir, dryRunDir, }
104
103
  })));
105
104
  };
106
105
  export const getTypesFromPreset = async (preset) => Object.values(JSON.parse(await readFile(join(PRESET_DIR, `${preset}.json`), 'utf-8')).types).map((t) => t.name);
107
- /** convert will put things in /main/default. If the packageDirs aren't configured that way, we don't want to make a mess.
108
- * See https://salesforce.quip.com/va5IAgXmTMWF for details on that issue */
109
- const validateMainDefault = (projectDir) => (i) => {
110
- if (!existsSync(join(projectDir, i.packageDirPath, 'main', 'default'))) {
111
- throw loadMessages().createError('error.packageDirectoryNeedsMainDefault', [i.packageDirPath], [i.packageDirPath]);
112
- }
113
- return i;
114
- };
115
106
  const getComponentSetFiles = (cs) => cs
116
107
  .getSourceComponents()
117
108
  .toArray()
@@ -1 +1 @@
1
- {"version":3,"file":"convertBehavior.js","sourceRoot":"","sources":["../../src/utils/convertBehavior.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAA4B,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAEL,mBAAmB,EAEnB,iBAAiB,EAEjB,cAAc,EAEd,SAAS,GACV,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIhD,kDAAkD;AAClD,MAAM,UAAU,GAAG,aAAa,CAC9B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,oCAAoC,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,CAAC,CAC7F,CAAC;AACF,MAAM,CAAC,MAAM,YAAY,GAAG,uBAAuB,CAAC;AACpD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;AACpD,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,+BAA+B,CAAC;AACxF,MAAM,CAAC,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAE7C,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,CAAC,YAAY,CAAC,oCAAoC,EAAE,yBAAyB,CAAC,CAAC;AAChG,CAAC,CAAC;AACF,MAAM,sBAAsB,GAAG,CAAC,CAAgC,EAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC"}
@@ -16,17 +16,17 @@ Behavior to enable; the values correspond to the possible values of the "sourceB
16
16
 
17
17
  # examples
18
18
 
19
- - Update your Salesforce DX project to decompose custom labels:
19
+ - Update your Salesforce DX project to decompose custom permission sets:
20
20
 
21
- <%= config.bin %> <%= command.id %> --behavior decomposeCustomLabelsBeta
21
+ <%= config.bin %> <%= command.id %> --behavior decomposePermissionSetBeta
22
22
 
23
23
  - Display what the command would do, but don't change any existing files:
24
24
 
25
- <%= config.bin %> <%= command.id %> --behavior decomposeCustomLabelsBeta --dry-run
25
+ <%= config.bin %> <%= command.id %> --behavior decomposePermissionSetBeta --dry-run
26
26
 
27
27
  - Keep the temporary directory that contains the interim metadata API formatted files:
28
28
 
29
- <%= config.bin %> <%= command.id %> --behavior decomposeCustomLabelsBeta --dry-run --preserve-temp-dir
29
+ <%= config.bin %> <%= command.id %> --behavior decomposePermissionSetBeta --dry-run --preserve-temp-dir
30
30
 
31
31
  # flags.dry-run.summary
32
32
 
@@ -51,15 +51,13 @@ Your project has a default org (target-org) that uses source tracking. This oper
51
51
  - Run this command again.
52
52
  - Create a new org ("sf org create scratch" or "sf org create sandbox") and deploy the modified source.
53
53
 
54
- # error.packageDirectoryNeedsMainDefault
54
+ # mainDefaultConfirmation
55
55
 
56
- The package directory %s doesn't have a main/default structure.
57
- This command moves metadata into a main/default structure, but your package directories aren't ready for it.
56
+ - This command puts components in a newly created `main/default` folder in each package directory. You might need to re-organize them into your preferred structure.
58
57
 
59
- # error.packageDirectoryNeedsMainDefault.actions
58
+ # basicConfirmation
60
59
 
61
- - Update %s to have all its metadata inside a main/default directory structure.
62
- - Run the command again.
60
+ - This command makes changes to your project. Be sure you've committed any source changes before continuing so you can easily revert if necessary.
63
61
 
64
62
  # success.dryRun
65
63
 
@@ -154,9 +154,9 @@
154
154
  "args": {},
155
155
  "description": "Specifically, this command updates the \"sourceBehaviorOption\" option in the \"sfdx-project.json\" file and then converts the associated local source files in your project as needed.\n\nFor example, run this command with the \"--behavior decomposePermissionSetBeta\" flag to start decomposing permission sets when you deploy or retrieve them. Decomposing means breaking up the monolithic metadata API format XML file that corresponds to a metadata component into smaller XML files and directories based on its subtypes. Permission sets are not decomposed by default; you must opt-in to start decomposing them by using this command. When the command finishes, your \"sfdx-project.json\" file is updated to always decompose permission sets, and the existing permission set files in your local package directories are converted into the new decomposed format. You run this command only once for a given behavior change.\n\nFor more information about the possible values for the --behavior flag, see the \"sourceBehaviorOptions\" section in the https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_config.htm topic.",
156
156
  "examples": [
157
- "Update your Salesforce DX project to decompose custom labels:\n<%= config.bin %> <%= command.id %> --behavior decomposeCustomLabelsBeta",
158
- "Display what the command would do, but don't change any existing files:\n<%= config.bin %> <%= command.id %> --behavior decomposeCustomLabelsBeta --dry-run",
159
- "Keep the temporary directory that contains the interim metadata API formatted files:\n<%= config.bin %> <%= command.id %> --behavior decomposeCustomLabelsBeta --dry-run --preserve-temp-dir"
157
+ "Update your Salesforce DX project to decompose custom permission sets:\n<%= config.bin %> <%= command.id %> --behavior decomposePermissionSetBeta",
158
+ "Display what the command would do, but don't change any existing files:\n<%= config.bin %> <%= command.id %> --behavior decomposePermissionSetBeta --dry-run",
159
+ "Keep the temporary directory that contains the interim metadata API formatted files:\n<%= config.bin %> <%= command.id %> --behavior decomposePermissionSetBeta --dry-run --preserve-temp-dir"
160
160
  ],
161
161
  "flags": {
162
162
  "json": {
@@ -182,6 +182,7 @@
182
182
  "hasDynamicHelp": false,
183
183
  "multiple": false,
184
184
  "options": [
185
+ "decomposeCustomLabelsBeta2",
185
186
  "decomposeCustomLabelsBeta",
186
187
  "decomposePermissionSetBeta",
187
188
  "decomposeSharingRulesBeta",
@@ -309,7 +310,7 @@
309
310
  "deprecateAliases": true,
310
311
  "name": "output-dir",
311
312
  "summary": "Output directory to store the Metadata API–formatted files in.",
312
- "default": "metadataPackage_1723521333199",
313
+ "default": "metadataPackage_1724184942234",
313
314
  "hasDynamicHelp": false,
314
315
  "multiple": false,
315
316
  "type": "option"
@@ -3025,5 +3026,5 @@
3025
3026
  ]
3026
3027
  }
3027
3028
  },
3028
- "version": "3.9.27"
3029
+ "version": "3.10.1"
3029
3030
  }
package/package.json CHANGED
@@ -1,32 +1,32 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-deploy-retrieve",
3
3
  "description": "deploy and retrieve commands for sf",
4
- "version": "3.9.27",
4
+ "version": "3.10.1",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/forcedotcom/cli/issues",
7
7
  "dependencies": {
8
- "@oclif/core": "^4.0.12",
9
- "@salesforce/apex-node": "^8.1.1",
10
- "@salesforce/core": "^8.2.8",
11
- "@salesforce/kit": "^3.1.6",
12
- "@salesforce/plugin-info": "^3.3.24",
13
- "@salesforce/sf-plugins-core": "^11.3.0",
14
- "@salesforce/source-deploy-retrieve": "^12.1.11",
15
- "@salesforce/source-tracking": "^7.1.2",
8
+ "@oclif/core": "^4.0.17",
9
+ "@salesforce/apex-node": "^8.1.3",
10
+ "@salesforce/core": "^8.4.0",
11
+ "@salesforce/kit": "^3.2.1",
12
+ "@salesforce/plugin-info": "^3.3.28",
13
+ "@salesforce/sf-plugins-core": "^11.3.2",
14
+ "@salesforce/source-deploy-retrieve": "^12.5.1",
15
+ "@salesforce/source-tracking": "^7.1.7",
16
16
  "@salesforce/ts-types": "^2.0.12",
17
17
  "ansis": "^3.3.2"
18
18
  },
19
19
  "devDependencies": {
20
- "@oclif/plugin-command-snapshot": "^5.2.10",
21
- "@salesforce/cli-plugins-testkit": "^5.3.23",
20
+ "@oclif/plugin-command-snapshot": "^5.2.12",
21
+ "@salesforce/cli-plugins-testkit": "^5.3.25",
22
22
  "@salesforce/dev-scripts": "^10.2.9",
23
- "@salesforce/plugin-command-reference": "^3.1.13",
23
+ "@salesforce/plugin-command-reference": "^3.1.16",
24
24
  "@salesforce/schemas": "^1.9.0",
25
- "@salesforce/source-testkit": "^2.2.39",
26
- "@salesforce/ts-sinon": "^1.4.23",
25
+ "@salesforce/source-testkit": "^2.2.57",
26
+ "@salesforce/ts-sinon": "^1.4.24",
27
27
  "cross-env": "^7.0.3",
28
- "eslint-plugin-sf-plugin": "^1.18.11",
29
- "oclif": "^4.14.15",
28
+ "eslint-plugin-sf-plugin": "^1.20.4",
29
+ "oclif": "^4.14.19",
30
30
  "ts-node": "^10.9.2",
31
31
  "typescript": "^5.5.4"
32
32
  },
@@ -250,7 +250,7 @@
250
250
  "exports": "./lib/index.js",
251
251
  "type": "module",
252
252
  "sfdx": {
253
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/3.9.27.crt",
254
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/3.9.27.sig"
253
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/3.10.1.crt",
254
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/3.10.1.sig"
255
255
  }
256
256
  }