@salesforce/plugin-deploy-retrieve 1.0.6 → 1.1.0

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.
Files changed (46) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +211 -1
  3. package/lib/commands/deploy/metadata.d.ts +36 -0
  4. package/lib/commands/deploy/metadata.js +123 -0
  5. package/lib/commands/deploy/metadata.js.map +1 -0
  6. package/lib/commands/deploy.js +3 -3
  7. package/lib/commands/deploy.js.map +1 -1
  8. package/lib/commands/retrieve/metadata.d.ts +29 -0
  9. package/lib/commands/retrieve/metadata.js +134 -0
  10. package/lib/commands/retrieve/metadata.js.map +1 -0
  11. package/lib/hooks/deploy.d.ts +4 -0
  12. package/lib/hooks/deploy.js +17 -0
  13. package/lib/hooks/deploy.js.map +1 -0
  14. package/lib/utils/componentSetBuilder.d.ts +28 -0
  15. package/lib/utils/componentSetBuilder.js +123 -0
  16. package/lib/utils/componentSetBuilder.js.map +1 -0
  17. package/lib/utils/config.d.ts +1 -0
  18. package/lib/utils/config.js +18 -0
  19. package/lib/utils/config.js.map +1 -0
  20. package/lib/utils/metadataDeployer.d.ts +30 -0
  21. package/lib/utils/metadataDeployer.js +178 -0
  22. package/lib/utils/metadataDeployer.js.map +1 -0
  23. package/lib/utils/orgs.d.ts +4 -0
  24. package/lib/utils/orgs.js +39 -0
  25. package/lib/utils/orgs.js.map +1 -0
  26. package/lib/utils/output.d.ts +18 -0
  27. package/lib/utils/output.js +152 -0
  28. package/lib/utils/output.js.map +1 -0
  29. package/lib/utils/progressBar.d.ts +8 -0
  30. package/lib/utils/progressBar.js +55 -0
  31. package/lib/utils/progressBar.js.map +1 -0
  32. package/lib/utils/requiredFlagValidator.d.ts +3 -0
  33. package/lib/utils/requiredFlagValidator.js +19 -0
  34. package/lib/utils/requiredFlagValidator.js.map +1 -0
  35. package/lib/utils/testLevel.d.ts +6 -0
  36. package/lib/utils/testLevel.js +17 -0
  37. package/lib/utils/testLevel.js.map +1 -0
  38. package/messages/deploy.metadata.md +114 -0
  39. package/messages/metadata.transfer.md +27 -0
  40. package/messages/required.flag.md +3 -0
  41. package/messages/retrieve.metadata.md +100 -0
  42. package/oclif.manifest.json +1 -1
  43. package/package.json +20 -11
  44. package/schemas/deploy-metadata.json +98 -0
  45. package/schemas/hooks/sf-deploy.json +106 -0
  46. package/schemas/retrieve-metadata.json +69 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,yBAAyB;AACzB,6BAA6B;AAC7B,sCAAoC;AACpC,iCAAwD;AACxD,iCAAqE;AACrE,wDAAkF;AAClF,mDAA2C;AAC3C,2CAAwC;AAExC,SAAS,IAAI,CAAC,OAAe;IAC3B,OAAO,IAAA,YAAI,EAAC,IAAA,YAAI,EAAC,OAAO,CAAC,CAAC,CAAC;AAC7B,CAAC;AAED,SAAS,KAAK,CAAC,OAAe;IAC5B,OAAO,IAAA,WAAG,EAAC,IAAA,YAAI,EAAC,OAAO,CAAC,CAAC,CAAC;AAC5B,CAAC;AAED,SAAS,KAAK,CACZ,SAA0D,EAC1D,OAAgC,EAChC,OAAgC;IAEhC,6FAA6F;IAC7F,2DAA2D;IAC3D,YAAK,CAAC,EAAE,CAAC,KAAK,CAAC,SAAsD,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAC3F,CAAC;AAOD,SAAgB,eAAe,CAAC,aAA6B;IAC3D,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAC7B,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;SAC7D;IACH,CAAC,CAAC,CAAC;IACH,OAAO,aAAa,CAAC;AACvB,CAAC;AAPD,0CAOC;AAED;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AK,qBAAa,CAAC,SAAS;QAAE,OAAO;IAE/D,MAAM,aAAa,GAAG,eAAe,CAAC,MAAA,MAAM,CAAC,gBAAgB,EAAE,mCAAI,EAAE,CAAC,CAAC;IACvE,MAAM,QAAQ,GAAG,iBAAiB,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC;IACtF,IAAI,CAAC,QAAQ,CAAC,MAAM;QAAE,OAAO;IAE7B,MAAM,OAAO,GAAG;QACd,WAAW,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;QAC/B,QAAQ,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;QAC5B,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE;KAC7B,CAAC;IACF,MAAM,OAAO,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,uBAAuB,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;IAC5E,YAAK,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC;IACf,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AACpC,CAAC;AAfD,0CAeC"}
@@ -0,0 +1,8 @@
1
+ import { MetadataApiDeploy } from '@sf/sdr';
2
+ import { Progress } from '@salesforce/sf-plugins-core';
3
+ export declare class DeployProgress extends Progress {
4
+ private deploy;
5
+ private static OPTIONS;
6
+ constructor(deploy: MetadataApiDeploy, jsonEnabled?: boolean);
7
+ start(): void;
8
+ }
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2022, salesforce.com, inc.
4
+ * All rights reserved.
5
+ * Licensed under the BSD 3-Clause license.
6
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.DeployProgress = void 0;
10
+ const kit_1 = require("@salesforce/kit");
11
+ const core_1 = require("@salesforce/core");
12
+ const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
13
+ core_1.Messages.importMessagesDirectory(__dirname);
14
+ const mdTrasferMessages = core_1.Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'metadata.transfer');
15
+ class DeployProgress extends sf_plugins_core_1.Progress {
16
+ constructor(deploy, jsonEnabled = false) {
17
+ super(!jsonEnabled && kit_1.env.getBoolean('SF_USE_PROGRESS_BAR', true));
18
+ this.deploy = deploy;
19
+ }
20
+ start() {
21
+ this.deploy.onUpdate((data) => {
22
+ var _a;
23
+ // the numCompTot. isn't computed right away, wait to start until we know how many we have
24
+ if (data.numberComponentsTotal) {
25
+ this.setTotal(data.numberComponentsTotal + data.numberTestsTotal);
26
+ this.update(data.numberComponentsDeployed + data.numberTestsCompleted, {
27
+ status: mdTrasferMessages.getMessage(data.status),
28
+ });
29
+ }
30
+ else {
31
+ super.start(0, { status: (_a = mdTrasferMessages.getMessage(data.status)) !== null && _a !== void 0 ? _a : 'Waiting' }, DeployProgress.OPTIONS);
32
+ }
33
+ // the numTestsTot. isn't computed until validated as tests by the server, update the PB once we know
34
+ if (data.numberTestsTotal && data.numberComponentsTotal) {
35
+ this.setTotal(data.numberComponentsTotal + data.numberTestsTotal);
36
+ }
37
+ });
38
+ // any thing else should stop the progress bar
39
+ this.deploy.onFinish((data) => this.finish({ status: mdTrasferMessages.getMessage(data.response.status) }));
40
+ this.deploy.onCancel(() => this.stop());
41
+ this.deploy.onError((error) => {
42
+ this.stop();
43
+ throw error;
44
+ });
45
+ }
46
+ }
47
+ exports.DeployProgress = DeployProgress;
48
+ DeployProgress.OPTIONS = {
49
+ title: 'Status',
50
+ format: '%s: {status} | {bar} | {value}/{total} Components',
51
+ barCompleteChar: '\u2588',
52
+ barIncompleteChar: '\u2591',
53
+ linewrap: true,
54
+ };
55
+ //# sourceMappingURL=progressBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progressBar.js","sourceRoot":"","sources":["../../src/utils/prog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,CAAC,CAAC;QAEH,8CAA8C;QAC9C,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,iBAAiB,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QAE5G,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAExC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAY,EAAE,EAAE;YACnC,IAAI,CAAC,IAAI,EAAE,CAAC;YACZ,MAAM,KAAK,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC;;AAxCH,wCAyCC;AAxCgB,sBAAO,GAAG;IACvB,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,mDAAmD;IAC3D,eAAe,EAAE,QAAQ;IACzB,iBAAiB,EAAE,QAAQ;IAC3B,QAAQ,EAAE,IAAI;CACf,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function validateOneOfCommandFlags(oneOf: string[], flags: {
2
+ [name: string]: unknown;
3
+ }): void;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateOneOfCommandFlags = void 0;
4
+ /*
5
+ * Copyright (c) 2020, salesforce.com, inc.
6
+ * All rights reserved.
7
+ * Licensed under the BSD 3-Clause license.
8
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
9
+ */
10
+ const core_1 = require("@salesforce/core");
11
+ core_1.Messages.importMessagesDirectory(__dirname);
12
+ const messages = core_1.Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'required.flag');
13
+ function validateOneOfCommandFlags(oneOf, flags) {
14
+ if (!Object.keys(flags).some((flag) => oneOf.includes(flag))) {
15
+ throw messages.createError('errors.RequiredOneOfFlagsMissing', [oneOf.join(', ')]);
16
+ }
17
+ }
18
+ exports.validateOneOfCommandFlags = validateOneOfCommandFlags;
19
+ //# sourceMappingURL=requiredFlagValidator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requiredFlagValidator.js","sourceRoot":"","sources":["../../src/utils/requiredFlagValidator.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,2CAA4C;AAE5C,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,oCAAoC,EAAE,eAAe,CAAC,CAAC;AAE9F,SAAgB,yBAAyB,CAAC,KAAe,EAAE,KAAkC;IAC3F,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE;QAC5D,MAAM,QAAQ,CAAC,WAAW,CAAC,kCAAkC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACpF;AACH,CAAC;AAJD,8DAIC"}
@@ -0,0 +1,6 @@
1
+ export declare enum TestLevel {
2
+ NoTestRun = "NoTestRun",
3
+ RunSpecifiedTests = "RunSpecifiedTests",
4
+ RunLocalTests = "RunLocalTests",
5
+ RunAllTestsInOrg = "RunAllTestsInOrg"
6
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2021, salesforce.com, inc.
4
+ * All rights reserved.
5
+ * Licensed under the BSD 3-Clause license.
6
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.TestLevel = void 0;
10
+ var TestLevel;
11
+ (function (TestLevel) {
12
+ TestLevel["NoTestRun"] = "NoTestRun";
13
+ TestLevel["RunSpecifiedTests"] = "RunSpecifiedTests";
14
+ TestLevel["RunLocalTests"] = "RunLocalTests";
15
+ TestLevel["RunAllTestsInOrg"] = "RunAllTestsInOrg";
16
+ })(TestLevel = exports.TestLevel || (exports.TestLevel = {}));
17
+ //# sourceMappingURL=testLevel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testLevel.js","sourceRoot":"","sources":["../../src/utils/testLevel.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,oCAAuB,CAAA;IACvB,oDAAuC,CAAA;IACvC,4CAA+B,CAAA;IAC/B,kDAAqC,CAAA;AACvC,CAAC,EALW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAKpB"}
@@ -0,0 +1,114 @@
1
+ # summary
2
+
3
+ Deploy metadata in source format to an org from your local project.
4
+
5
+ # description
6
+
7
+ You must run this command from within a project.
8
+
9
+ This command doesn't support source-tracking. The source you deploy overwrites the corresponding metadata in your org. This command doesn’t attempt to merge your source with the versions in your org.
10
+
11
+ To run the command asynchronously, set --wait to 0, which immediately returns the job ID. This way, you can continue to use the CLI.
12
+
13
+ To deploy multiple metadata components, either set multiple --metadata <name> flags or a single --metadata flag with multiple names separated by spaces. Enclose names that contain spaces in one set of double quotes. The same syntax applies to --manifest and --source-dir.
14
+
15
+ # examples
16
+
17
+ - Deploy the source files in a directory:
18
+
19
+ <%= config.bin %> <%= command.id %> --source-dir path/to/source
20
+
21
+ - Deploy a specific Apex class and the objects whose source is in a directory (both examples are equivalent):
22
+
23
+ <%= config.bin %> <%= command.id %> --source-dir path/to/apex/classes/MyClass.cls path/to/source/objects
24
+ <%= config.bin %> <%= command.id %> --source-dir path/to/apex/classes/MyClass.cls --source-dir path/to/source/objects
25
+
26
+ - Deploy all Apex classes:
27
+
28
+ <%= config.bin %> <%= command.id %> --metadata ApexClass
29
+
30
+ - Deploy a specific Apex class:
31
+
32
+ <%= config.bin %> <%= command.id %> --metadata ApexClass:MyApexClass
33
+
34
+ - Deploy all custom objects and Apex classes (both examples are equivalent):
35
+
36
+ <%= config.bin %> <%= command.id %> --metadata CustomObject ApexClass
37
+ <%= config.bin %> <%= command.id %> --metadata CustomObject --metadata ApexClass
38
+
39
+ - Deploy all Apex classes and a profile that has a space in its name:
40
+
41
+ <%= config.bin %> <%= command.id %> --metadata ApexClass --metadata "Profile:My Profile"
42
+
43
+ - Deploy all components listed in a manifest:
44
+
45
+ <%= config.bin %> <%= command.id %> --manifest path/to/package.xml
46
+
47
+ - Run the tests that aren’t in any managed packages as part of a deployment:
48
+
49
+ <%= config.bin %> <%= command.id %> --metadata ApexClass --test-level RunLocalTests
50
+
51
+ # flags.target-org.summary
52
+
53
+ Login username or alias for the target org.
54
+
55
+ # flags.target-org.description
56
+
57
+ Overrides your default org.
58
+
59
+ # flags.metadata.summary
60
+
61
+ Metadata component names to deploy.
62
+
63
+ # flags.test-level.summary
64
+
65
+ Deployment Apex testing level.
66
+
67
+ # flags.test-level.description
68
+
69
+ Valid values are:
70
+
71
+ - NoTestRun — No tests are run. This test level applies only to deployments to development environments, such as sandbox, Developer Edition, or trial orgs. This test level is the default for development environments.
72
+
73
+ - RunSpecifiedTests — Runs only the tests that you specify with the --run-tests flag. Code coverage requirements differ from the default coverage requirements when using this test level. Executed tests must comprise a minimum of 75% code coverage for each class and trigger in the deployment package. This coverage is computed for each class and trigger individually and is different than the overall coverage percentage.
74
+
75
+ - RunLocalTests — All tests in your org are run, except the ones that originate from installed managed and unlocked packages. This test level is the default for production deployments that include Apex classes or triggers.
76
+
77
+ - RunAllTestsInOrg — All tests in your org are run, including tests of managed packages.
78
+
79
+ If you don’t specify a test level, the default behavior depends on the contents of your deployment package. For more information, see [Running Tests in a Deployment](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy_running_tests.htm) in the "Metadata API Developer Guide".
80
+
81
+ # flags.source-dir.summary
82
+
83
+ Path to the local source files to deploy.
84
+
85
+ # flags.source-dir.description
86
+
87
+ The supplied path can be to a single file (in which case the operation is applied to only one file) or to a folder (in which case the operation is applied to all metadata types in the directory and its subdirectories).
88
+
89
+ If you specify this flag, don’t specify --metadata or --manifest.
90
+
91
+ # flags.wait.summary
92
+
93
+ Number of minutes to wait for command to complete and display results.
94
+
95
+ # flags.wait.description
96
+
97
+ If the command continues to run after the wait period, the CLI returns control of the terminal window to you.
98
+
99
+ # flags.manifest.summary
100
+
101
+ Full file path for manifest (package.xml) of components to deploy.
102
+
103
+ # flags.manifest.description
104
+
105
+ All child components are included. If you specify this flag, don’t specify --metadata or --source-dir.
106
+
107
+ # deploy.metadata.api
108
+
109
+ Deploying to %s using %s API.
110
+
111
+ # errors.NoOrgsToSelect
112
+
113
+ Can't find any active scratch orgs, Dev Hubs, or other orgs.
114
+ Either log into an org or create a scratch org, and then try again.
@@ -0,0 +1,27 @@
1
+ # Pending
2
+
3
+ Pending
4
+
5
+ # InProgress
6
+
7
+ In Progress
8
+
9
+ # Succeeded
10
+
11
+ Succeeded
12
+
13
+ # Cancelled
14
+
15
+ Canceled
16
+
17
+ # SucceededPartial
18
+
19
+ Partially Succeeded
20
+
21
+ # Failed
22
+
23
+ Failed
24
+
25
+ # Canceling
26
+
27
+ Canceling
@@ -0,0 +1,3 @@
1
+ # errors.RequiredOneOfFlagsMissing
2
+
3
+ This command expects one of the following flags %s to be provided.
@@ -0,0 +1,100 @@
1
+ # summary
2
+
3
+ Retrieve metadata in source format from an org to your local project.
4
+
5
+ # description
6
+
7
+ You must run this command from within a project.
8
+
9
+ This command doesn't support source-tracking. The source you retrieve overwrites the corresponding source files in your local project. This command doesn’t attempt to merge the source from your org with your local source files.
10
+
11
+ To retrieve multiple metadata components, either use multiple --metadata <name> flags or use a single --metadata flag with multiple names separated by spaces. Enclose names that contain spaces in one set of double quotes. The same syntax applies to --manifest and --source-dir.
12
+
13
+ # examples
14
+
15
+ - Retrieve the source files in a directory:
16
+
17
+ <%= config.bin %> <%= command.id %> --source-dir path/to/source
18
+
19
+ - Retrieve a specific Apex class and the objects whose source is in a directory (both examples are equivalent):
20
+
21
+ <%= config.bin %> <%= command.id %> --source-dir path/to/apex/classes/MyClass.cls path/to/source/objects
22
+ <%= config.bin %> <%= command.id %> --source-dir path/to/apex/classes/MyClass.cls --source-dir path/to/source/objects
23
+
24
+ - Retrieve all Apex classes:
25
+
26
+ <%= config.bin %> <%= command.id %> --metadata ApexClass
27
+
28
+ - Retrieve a specific Apex class:
29
+
30
+ <%= config.bin %> <%= command.id %> --metadata ApexClass:MyApexClass
31
+
32
+ - Retrieve all custom objects and Apex classes (both examples are equivalent):
33
+
34
+ <%= config.bin %> <%= command.id %> --metadata CustomObject ApexClass
35
+ <%= config.bin %> <%= command.id %> --metadata CustomObject --metadata ApexClass
36
+
37
+ - Retrieve all metadata components listed in a manifest:
38
+
39
+ <%= config.bin %> <%= command.id %> --manifest path/to/package.xml
40
+
41
+ - Retrieve metadata from a package:
42
+
43
+ <%= config.bin %> <%= command.id %> --package-name MyPackageName
44
+
45
+ - Retrieve metadata from multiple packages, one of which has a space in its name (both examples are equivalent):
46
+
47
+ <%= config.bin %> <%= command.id %> --package-name Package1 "PackageName With Spaces" Package3
48
+ <%= config.bin %> <%= command.id %> --package-name Package1 --package-name "PackageName With Spaces" --package-name Package3
49
+
50
+ # flags.api-version.summary
51
+
52
+ Target API version for the retrieve.
53
+
54
+ # flags.api-version.description
55
+
56
+ Use this flag to override the default API version, which is the latest version supported the CLI, with the API version in your package.xml file.
57
+
58
+ # flags.manifest.summary
59
+
60
+ File path for the manifest (package.xml) that specifies the components to retrieve.
61
+
62
+ # flags.manifest.description
63
+
64
+ If you specify this parameter, don’t specify --metadata or --source-dir.
65
+
66
+ # flags.metadata.summary
67
+
68
+ Metadata component names to retrieve.
69
+
70
+ # flags.package-name.summary
71
+
72
+ Package names to retrieve.
73
+
74
+ # flags.source-dir.summary
75
+
76
+ File paths for source to retrieve from the org.
77
+
78
+ # flags.source-dir.description
79
+
80
+ The supplied paths can be to a single file (in which case the operation is applied to only one file) or to a folder (in which case the operation is applied to all source files in the directory and its subdirectories).
81
+
82
+ # flags.target-org.summary
83
+
84
+ Login username or alias for the target org.
85
+
86
+ # flags.target-org.description
87
+
88
+ Overrides your default org.
89
+
90
+ # flags.wait.summary
91
+
92
+ Number of minutes to wait for the command to complete and display results to the terminal window.
93
+
94
+ # flags.wait.description
95
+
96
+ If the command continues to run after the wait period, the CLI returns control of the terminal window to you.
97
+
98
+ # RetrieveTitle
99
+
100
+ Retrieving Metadata
@@ -1 +1 @@
1
- {"version":"1.0.6","commands":{"deploy":{"id":"deploy","summary":"Deploy a project interactively to any Salesforce environment.","description":"This command must be run from within a project.\n\nThe command first analyzes your project, your active or logged-into environments, and local defaults to determine what to deploy and where to deploy it. The command then prompts you for information about this particular deployment and provides intelligent choices based on its analysis.\n\nFor example, if your local project contains a source directory with metadata files in source format, the command asks if you want to deploy that Salesforce app to an org. The command lists your connected orgs and asks which one you want to deploy to. The list of orgs starts with scratch orgs, ordered by expiration date with the most recently created one first, and then Dev Hub and production orgs ordered by name. If the command finds Apex tests, it asks if you want to run them and at which level.\n\nThe command stores your responses in the \"deploy-options.json\" file in your local project directory and uses them as defaults when you rerun the command. Specify --interactive to force the command to reprompt.\n\nUse this command for quick and simple deploys. For more complicated deployments, use the environment-specific commands, such as \"sf deploy metadata\", that provide additional flags.","strict":true,"pluginName":"@salesforce/plugin-deploy-retrieve","pluginAlias":"@salesforce/plugin-deploy-retrieve","pluginType":"core","aliases":[],"examples":["Deploy a project and use stored values from a previous command run:\n<%= config.bin %> <%= command.id %>","Reprompt for all deployment inputs:\n<%= config.bin %> <%= command.id %> --interactive"],"flags":{"interactive":{"name":"interactive","type":"boolean","summary":"Force the CLI to prompt for all deployment inputs.","allowNo":false}},"args":[],"enableJsonFlag":false}}}
1
+ {"version":"1.1.0","commands":{"deploy":{"id":"deploy","summary":"Deploy a project interactively to any Salesforce environment.","description":"This command must be run from within a project.\n\nThe command first analyzes your project, your active or logged-into environments, and local defaults to determine what to deploy and where to deploy it. The command then prompts you for information about this particular deployment and provides intelligent choices based on its analysis.\n\nFor example, if your local project contains a source directory with metadata files in source format, the command asks if you want to deploy that Salesforce app to an org. The command lists your connected orgs and asks which one you want to deploy to. The list of orgs starts with scratch orgs, ordered by expiration date with the most recently created one first, and then Dev Hub and production orgs ordered by name. If the command finds Apex tests, it asks if you want to run them and at which level.\n\nThe command stores your responses in the \"deploy-options.json\" file in your local project directory and uses them as defaults when you rerun the command. Specify --interactive to force the command to reprompt.\n\nUse this command for quick and simple deploys. For more complicated deployments, use the environment-specific commands, such as \"sf deploy metadata\", that provide additional flags.","strict":true,"pluginName":"@salesforce/plugin-deploy-retrieve","pluginAlias":"@salesforce/plugin-deploy-retrieve","pluginType":"core","aliases":[],"examples":["Deploy a project and use stored values from a previous command run:\n<%= config.bin %> <%= command.id %>","Reprompt for all deployment inputs:\n<%= config.bin %> <%= command.id %> --interactive"],"flags":{"interactive":{"name":"interactive","type":"boolean","summary":"Force the CLI to prompt for all deployment inputs.","allowNo":false}},"args":[],"enableJsonFlag":false},"deploy:metadata":{"id":"deploy:metadata","summary":"Deploy metadata in source format to an org from your local project.","description":"You must run this command from within a project.\n\nThis command doesn't support source-tracking. The source you deploy overwrites the corresponding metadata in your org. This command doesn’t attempt to merge your source with the versions in your org.\n\nTo run the command asynchronously, set --wait to 0, which immediately returns the job ID. This way, you can continue to use the CLI.\n\nTo deploy multiple metadata components, either set multiple --metadata <name> flags or a single --metadata flag with multiple names separated by spaces. Enclose names that contain spaces in one set of double quotes. The same syntax applies to --manifest and --source-dir.","strict":true,"pluginName":"@salesforce/plugin-deploy-retrieve","pluginAlias":"@salesforce/plugin-deploy-retrieve","pluginType":"core","aliases":[],"examples":["Deploy the source files in a directory:\n<%= config.bin %> <%= command.id %> --source-dir path/to/source","Deploy a specific Apex class and the objects whose source is in a directory (both examples are equivalent):\n<%= config.bin %> <%= command.id %> --source-dir path/to/apex/classes/MyClass.cls path/to/source/objects\n<%= config.bin %> <%= command.id %> --source-dir path/to/apex/classes/MyClass.cls --source-dir path/to/source/objects","Deploy all Apex classes:\n<%= config.bin %> <%= command.id %> --metadata ApexClass","Deploy a specific Apex class:\n<%= config.bin %> <%= command.id %> --metadata ApexClass:MyApexClass","Deploy all custom objects and Apex classes (both examples are equivalent):\n<%= config.bin %> <%= command.id %> --metadata CustomObject ApexClass\n<%= config.bin %> <%= command.id %> --metadata CustomObject --metadata ApexClass","Deploy all Apex classes and a profile that has a space in its name:\n<%= config.bin %> <%= command.id %> --metadata ApexClass --metadata \"Profile:My Profile\"","Deploy all components listed in a manifest:\n<%= config.bin %> <%= command.id %> --manifest path/to/package.xml","Run the tests that aren’t in any managed packages as part of a deployment:\n<%= config.bin %> <%= command.id %> --metadata ApexClass --test-level RunLocalTests"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"metadata":{"name":"metadata","type":"option","char":"m","summary":"Metadata component names to deploy.","multiple":true,"exclusive":["manifest","source-dir"]},"manifest":{"name":"manifest","type":"option","char":"x","summary":"Full file path for manifest (package.xml) of components to deploy.","description":"All child components are included. If you specify this flag, don’t specify --metadata or --source-dir.","multiple":false,"exclusive":["metadata","source-dir"]},"source-dir":{"name":"source-dir","type":"option","char":"d","summary":"Path to the local source files to deploy.","description":"The supplied path can be to a single file (in which case the operation is applied to only one file) or to a folder (in which case the operation is applied to all metadata types in the directory and its subdirectories).\n\nIf you specify this flag, don’t specify --metadata or --manifest.","multiple":true,"exclusive":["manifest","metadata"]},"target-org":{"name":"target-org","type":"option","char":"o","summary":"Login username or alias for the target org.","description":"Overrides your default org.","multiple":false},"test-level":{"name":"test-level","type":"option","char":"l","summary":"Deployment Apex testing level.","description":"Valid values are:\n\n- NoTestRun — No tests are run. This test level applies only to deployments to development environments, such as sandbox, Developer Edition, or trial orgs. This test level is the default for development environments.\n\n- RunSpecifiedTests — Runs only the tests that you specify with the --run-tests flag. Code coverage requirements differ from the default coverage requirements when using this test level. Executed tests must comprise a minimum of 75% code coverage for each class and trigger in the deployment package. This coverage is computed for each class and trigger individually and is different than the overall coverage percentage.\n\n- RunLocalTests — All tests in your org are run, except the ones that originate from installed managed and unlocked packages. This test level is the default for production deployments that include Apex classes or triggers.\n\n- RunAllTestsInOrg — All tests in your org are run, including tests of managed packages.\n\n If you don’t specify a test level, the default behavior depends on the contents of your deployment package. For more information, see [Running Tests in a Deployment](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy_running_tests.htm) in the \"Metadata API Developer Guide\".","multiple":false,"options":["NoTestRun","RunSpecifiedTests","RunLocalTests","RunAllTestsInOrg"],"default":"NoTestRun"},"wait":{"name":"wait","type":"option","char":"w","summary":"Number of minutes to wait for command to complete and display results.","description":"If the command continues to run after the wait period, the CLI returns control of the terminal window to you.","multiple":false,"default":33}},"args":[],"configurationVariablesSection":{"header":"CONFIGURATION VARIABLES","body":[{"name":"target-org","description":"Username or alias of the org that all commands run against by default. (sf only)"},{"name":"apiVersion","description":"API version of your project. Default: API version of your Dev Hub org."}]},"envVariablesSection":{"header":"ENVIRONMENT VARIABLES","body":[{"name":"SF_TARGET_ORG","description":"Username or alias of your default org. Overrides the target-org configuration variable."},{"name":"SFDX_DEFAULTUSERNAME","description":"Username or alias of your default org. Overrides the defaultusername configuration value."},{"name":"SFDX_USE_PROGRESS_BAR","description":"Set to false to disable the progress bar when running force:mdapi:deploy, force:source:deploy, or force:source:push."}]}},"retrieve:metadata":{"id":"retrieve:metadata","summary":"Retrieve metadata in source format from an org to your local project.","description":"You must run this command from within a project.\n\nThis command doesn't support source-tracking. The source you retrieve overwrites the corresponding source files in your local project. This command doesn’t attempt to merge the source from your org with your local source files.\n\nTo retrieve multiple metadata components, either use multiple --metadata <name> flags or use a single --metadata flag with multiple names separated by spaces. Enclose names that contain spaces in one set of double quotes. The same syntax applies to --manifest and --source-dir.","strict":true,"pluginName":"@salesforce/plugin-deploy-retrieve","pluginAlias":"@salesforce/plugin-deploy-retrieve","pluginType":"core","aliases":[],"examples":["Retrieve the source files in a directory:\n<%= config.bin %> <%= command.id %> --source-dir path/to/source","Retrieve a specific Apex class and the objects whose source is in a directory (both examples are equivalent):\n<%= config.bin %> <%= command.id %> --source-dir path/to/apex/classes/MyClass.cls path/to/source/objects\n<%= config.bin %> <%= command.id %> --source-dir path/to/apex/classes/MyClass.cls --source-dir path/to/source/objects","Retrieve all Apex classes:\n<%= config.bin %> <%= command.id %> --metadata ApexClass","Retrieve a specific Apex class:\n<%= config.bin %> <%= command.id %> --metadata ApexClass:MyApexClass","Retrieve all custom objects and Apex classes (both examples are equivalent):\n<%= config.bin %> <%= command.id %> --metadata CustomObject ApexClass\n<%= config.bin %> <%= command.id %> --metadata CustomObject --metadata ApexClass","Retrieve all metadata components listed in a manifest:\n<%= config.bin %> <%= command.id %> --manifest path/to/package.xml","Retrieve metadata from a package:\n<%= config.bin %> <%= command.id %> --package-name MyPackageName","Retrieve metadata from multiple packages, one of which has a space in its name (both examples are equivalent):\n<%= config.bin %> <%= command.id %> --package-name Package1 \"PackageName With Spaces\" Package3\n<%= config.bin %> <%= command.id %> --package-name Package1 --package-name \"PackageName With Spaces\" --package-name Package3"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"api-version":{"name":"api-version","type":"option","char":"a","summary":"Target API version for the retrieve.","description":"Use this flag to override the default API version, which is the latest version supported the CLI, with the API version in your package.xml file.","multiple":false},"manifest":{"name":"manifest","type":"option","char":"x","summary":"File path for the manifest (package.xml) that specifies the components to retrieve.","description":"If you specify this parameter, don’t specify --metadata or --source-dir.","multiple":false,"exclusive":["metadata","source-dir"]},"metadata":{"name":"metadata","type":"option","char":"m","summary":"Metadata component names to retrieve.","multiple":true,"exclusive":["manifest","source-dir"]},"package-name":{"name":"package-name","type":"option","char":"n","summary":"Package names to retrieve.","multiple":true},"source-dir":{"name":"source-dir","type":"option","char":"d","summary":"File paths for source to retrieve from the org.","description":"The supplied paths can be to a single file (in which case the operation is applied to only one file) or to a folder (in which case the operation is applied to all source files in the directory and its subdirectories).","multiple":true,"exclusive":["manifest","metadata"]},"target-org":{"name":"target-org","type":"option","char":"o","summary":"Login username or alias for the target org.","description":"Overrides your default org.","multiple":false},"wait":{"name":"wait","type":"option","char":"w","summary":"Number of minutes to wait for the command to complete and display results to the terminal window.","description":"If the command continues to run after the wait period, the CLI returns control of the terminal window to you.","multiple":false,"default":33}},"args":[],"configurationVariablesSection":{"header":"CONFIGURATION VARIABLES","body":[{"name":"target-org","description":"Username or alias of the org that all commands run against by default. (sf only)"},{"name":"apiVersion","description":"API version of your project. Default: API version of your Dev Hub org."}]},"envVariablesSection":{"header":"ENVIRONMENT VARIABLES","body":[{"name":"SF_TARGET_ORG","description":"Username or alias of your default org. Overrides the target-org configuration variable."},{"name":"SFDX_DEFAULTUSERNAME","description":"Username or alias of your default org. Overrides the defaultusername configuration value."},{"name":"SFDX_USE_PROGRESS_BAR","description":"Set to false to disable the progress bar when running force:mdapi:deploy, force:source:deploy, or force:source:push."}]}}}}
package/package.json CHANGED
@@ -1,25 +1,28 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-deploy-retrieve",
3
3
  "description": "deploy and retrieve commands for sf",
4
- "version": "1.0.6",
4
+ "version": "1.1.0",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/forcedotcom/cli/issues",
7
7
  "dependencies": {
8
- "@oclif/core": "^1.0.2",
8
+ "@oclif/core": "^1.3.4",
9
9
  "@salesforce/core": "3.7.3",
10
- "@salesforce/sf-plugins-core": "^1.0.4",
10
+ "@salesforce/sf-plugins-core": "^1.2.1",
11
+ "@sf/sdr": "npm:@salesforce/source-deploy-retrieve@^5.9.9",
12
+ "chalk": "^4.1.2",
11
13
  "shelljs": "^0.8.4",
12
14
  "tslib": "^2"
13
15
  },
14
16
  "devDependencies": {
15
17
  "@oclif/plugin-command-snapshot": "^3.1.1",
16
18
  "@salesforce/cli-plugins-testkit": "^1.4.11",
17
- "@salesforce/dev-config": "^2.1.2",
19
+ "@salesforce/dev-config": "^2.1.3",
18
20
  "@salesforce/dev-scripts": "^1.0.2",
19
21
  "@salesforce/plugin-command-reference": "^1.3.15",
20
- "@salesforce/plugin-deploy-retrieve-metadata": "^1.0.7",
22
+ "@salesforce/plugin-config": "^2.2.9",
21
23
  "@salesforce/plugin-functions": "^1.1.4",
22
24
  "@salesforce/prettier-config": "^0.0.2",
25
+ "@salesforce/source-testkit": "^0.0.17",
23
26
  "@salesforce/ts-sinon": "1.3.21",
24
27
  "@types/shelljs": "^0.8.9",
25
28
  "@typescript-eslint/eslint-plugin": "^4.2.0",
@@ -32,17 +35,17 @@
32
35
  "eslint-config-salesforce-license": "^0.1.6",
33
36
  "eslint-config-salesforce-typescript": "^0.2.8",
34
37
  "eslint-plugin-header": "^3.0.0",
35
- "eslint-plugin-import": "^2.20.2",
38
+ "eslint-plugin-import": "2.24.2",
36
39
  "eslint-plugin-jsdoc": "^35.1.3",
37
40
  "eslint-plugin-prettier": "^3.1.3",
38
41
  "husky": "^7.0.4",
39
42
  "lint-staged": "^11.0.0",
40
43
  "mocha": "^8.4.0",
41
44
  "nyc": "^15.1.0",
42
- "oclif": "^2.0.0-main.5",
45
+ "oclif": "^2.4.0",
43
46
  "prettier": "^2.0.5",
44
47
  "pretty-quick": "^3.1.0",
45
- "shx": "0.3.3",
48
+ "shx": "0.3.4",
46
49
  "sinon": "11.1.1",
47
50
  "ts-node": "^10.0.0",
48
51
  "typescript": "^4.1.3"
@@ -75,16 +78,22 @@
75
78
  "commands": "./lib/commands",
76
79
  "topicSeparator": " ",
77
80
  "bin": "sf",
81
+ "hooks": {
82
+ "sf:deploy": "./lib/hooks/deploy"
83
+ },
78
84
  "devPlugins": [
79
85
  "@oclif/plugin-help",
80
86
  "@oclif/plugin-command-snapshot",
81
87
  "@salesforce/plugin-command-reference",
82
- "@salesforce/plugin-deploy-retrieve-metadata",
88
+ "@salesforce/plugin-config",
83
89
  "@salesforce/plugin-functions"
84
90
  ],
85
91
  "topics": {
86
92
  "deploy": {
87
93
  "description": "Commands to deploy artifacts to an environment."
94
+ },
95
+ "retrieve": {
96
+ "description": "Commands to retrieve artifacts from an environment."
88
97
  }
89
98
  }
90
99
  },
@@ -115,7 +124,7 @@
115
124
  },
116
125
  "main": "lib/index.js",
117
126
  "sfdx": {
118
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/1.0.6.crt",
119
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/1.0.6.sig"
127
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/1.1.0.crt",
128
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/1.1.0.sig"
120
129
  }
121
130
  }
@@ -0,0 +1,98 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/DeployMetadataResult",
4
+ "definitions": {
5
+ "DeployMetadataResult": {
6
+ "type": "object",
7
+ "properties": {
8
+ "files": {
9
+ "type": "array",
10
+ "items": {
11
+ "$ref": "#/definitions/FileResponse"
12
+ }
13
+ },
14
+ "tests": {
15
+ "$ref": "#/definitions/TestResults"
16
+ }
17
+ },
18
+ "required": ["files"],
19
+ "additionalProperties": false
20
+ },
21
+ "FileResponse": {
22
+ "anyOf": [
23
+ {
24
+ "type": "object",
25
+ "properties": {
26
+ "fullName": {
27
+ "type": "string"
28
+ },
29
+ "type": {
30
+ "type": "string"
31
+ },
32
+ "filePath": {
33
+ "type": "string"
34
+ },
35
+ "state": {
36
+ "type": "string",
37
+ "enum": ["Created", "Changed", "Unchanged", "Deleted"]
38
+ }
39
+ },
40
+ "required": ["fullName", "state", "type"],
41
+ "additionalProperties": false
42
+ },
43
+ {
44
+ "type": "object",
45
+ "properties": {
46
+ "fullName": {
47
+ "type": "string"
48
+ },
49
+ "type": {
50
+ "type": "string"
51
+ },
52
+ "filePath": {
53
+ "type": "string"
54
+ },
55
+ "state": {
56
+ "type": "string",
57
+ "const": "Failed"
58
+ },
59
+ "lineNumber": {
60
+ "type": "number"
61
+ },
62
+ "columnNumber": {
63
+ "type": "number"
64
+ },
65
+ "error": {
66
+ "type": "string"
67
+ },
68
+ "problemType": {
69
+ "type": "string",
70
+ "enum": ["Warning", "Error"]
71
+ }
72
+ },
73
+ "required": ["error", "fullName", "problemType", "state", "type"],
74
+ "additionalProperties": false
75
+ }
76
+ ]
77
+ },
78
+ "TestResults": {
79
+ "type": "object",
80
+ "properties": {
81
+ "passing": {
82
+ "type": "number"
83
+ },
84
+ "failing": {
85
+ "type": "number"
86
+ },
87
+ "total": {
88
+ "type": "number"
89
+ },
90
+ "time": {
91
+ "type": "number"
92
+ }
93
+ },
94
+ "required": ["passing", "failing", "total"],
95
+ "additionalProperties": false
96
+ }
97
+ }
98
+ }