@salesforce/plugin-deploy-retrieve 1.4.2 → 1.4.3
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/CHANGELOG.md +2 -0
- package/README.md +14 -5
- package/lib/commands/deploy/metadata/cancel.js +2 -5
- package/lib/commands/deploy/metadata/cancel.js.map +1 -1
- package/lib/commands/deploy/metadata/quick.js +1 -3
- package/lib/commands/deploy/metadata/quick.js.map +1 -1
- package/lib/commands/deploy/metadata/resume.js +5 -5
- package/lib/commands/deploy/metadata/resume.js.map +1 -1
- package/lib/commands/deploy/metadata/validate.d.ts +2 -0
- package/lib/commands/deploy/metadata/validate.js +15 -7
- package/lib/commands/deploy/metadata/validate.js.map +1 -1
- package/lib/commands/deploy/metadata.d.ts +2 -0
- package/lib/commands/deploy/metadata.js +16 -7
- package/lib/commands/deploy/metadata.js.map +1 -1
- package/lib/utils/deploy.d.ts +9 -5
- package/lib/utils/deploy.js +67 -42
- package/lib/utils/deploy.js.map +1 -1
- package/lib/utils/flags.d.ts +6 -0
- package/lib/utils/flags.js +39 -0
- package/lib/utils/flags.js.map +1 -0
- package/lib/utils/types.d.ts +4 -0
- package/messages/deploy.metadata.md +8 -0
- package/messages/deploy.metadata.resume.md +4 -0
- package/messages/deploy.metadata.validate.md +11 -3
- package/oclif.manifest.json +1 -1
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.4.3](https://github.com/salesforcecli/plugin-deploy-retrieve/compare/v1.4.2...v1.4.3) (2022-05-11)
|
|
6
|
+
|
|
5
7
|
### [1.4.2](https://github.com/salesforcecli/plugin-deploy-retrieve/compare/v1.4.1...v1.4.2) (2022-05-04)
|
|
6
8
|
|
|
7
9
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# plugin-deploy-retrieve
|
|
2
2
|
|
|
3
|
+
[](https://circleci.com/gh/salesforcecli/plugin-project/tree/main) [](https://raw.githubusercontent.com/salesforcecli/plugin-project/main/LICENSE.txt)
|
|
4
|
+
|
|
3
5
|
[](https://www.npmjs.com/package/@salesforce/plugin-deploy-retrieve) [](https://circleci.com/gh/salesforcecli/plugin-deploy-retrieve/tree/main) [](https://npmjs.org/package/@salesforce/plugin-deploy-retrieve) [](https://raw.githubusercontent.com/salesforcecli/plugin-deploy-retrieve/main/LICENSE.txt)
|
|
4
6
|
|
|
5
7
|
## Install
|
|
@@ -113,7 +115,7 @@ EXAMPLES
|
|
|
113
115
|
$ sf deploy --interactive
|
|
114
116
|
```
|
|
115
117
|
|
|
116
|
-
_See code: [src/commands/deploy.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/v1.4.
|
|
118
|
+
_See code: [src/commands/deploy.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/v1.4.2/src/commands/deploy.ts)_
|
|
117
119
|
|
|
118
120
|
## `sf deploy metadata`
|
|
119
121
|
|
|
@@ -122,7 +124,7 @@ Deploy metadata in source format to an org from your local project.
|
|
|
122
124
|
```
|
|
123
125
|
USAGE
|
|
124
126
|
$ sf deploy metadata [--json] [-a <value>] [--async | -w <value>] [--concise | --verbose] [--dry-run] [-r] [-g] [-x
|
|
125
|
-
<value>] [-m <value>] [-d <value>] [-o <value>] [-t <value>] [-l
|
|
127
|
+
<value>] [-m <value>] [--single-package --metadata-dir <value>] [-d <value>] [-o <value>] [-t <value>] [-l
|
|
126
128
|
NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg]
|
|
127
129
|
|
|
128
130
|
FLAGS
|
|
@@ -141,6 +143,9 @@ FLAGS
|
|
|
141
143
|
--async Run the command asynchronously.
|
|
142
144
|
--concise Show concise output of the deploy result.
|
|
143
145
|
--dry-run Validate deploy and run Apex tests but don’t save to the org.
|
|
146
|
+
--metadata-dir=<value> Root of directory or zip file of metadata formatted files to deploy.
|
|
147
|
+
--single-package Indicates that the metadata zip file points to a directory structure for a single
|
|
148
|
+
package.
|
|
144
149
|
--verbose Show verbose output of the deploy result.
|
|
145
150
|
|
|
146
151
|
GLOBAL FLAGS
|
|
@@ -520,8 +525,9 @@ Validate a metadata deployment without actually executing it.
|
|
|
520
525
|
|
|
521
526
|
```
|
|
522
527
|
USAGE
|
|
523
|
-
$ sf deploy metadata validate [--json] [-a <value>] [--async] [--concise | --verbose] [-x <value>
|
|
524
|
-
[-
|
|
528
|
+
$ sf deploy metadata validate [--json] [-a <value>] [--async] [--concise | --verbose] [-x <value>] [-m <value>] [-d <value>]
|
|
529
|
+
[--single-package --metadata-dir <value>] [-o <value>] [-t <value>] [-l
|
|
530
|
+
RunAllTestsInOrg|RunLocalTests|RunSpecifiedTests] [-w <value>]
|
|
525
531
|
|
|
526
532
|
FLAGS
|
|
527
533
|
-a, --api-version=<value> Target API version for the validation.
|
|
@@ -536,6 +542,9 @@ FLAGS
|
|
|
536
542
|
-x, --manifest=<value> Full file path for manifest (package.xml) of components to validate for deployment.
|
|
537
543
|
--async Run the command asynchronously.
|
|
538
544
|
--concise Show concise output of the validation result.
|
|
545
|
+
--metadata-dir=<value> Root of directory or zip file of metadata formatted files to deploy.
|
|
546
|
+
--single-package Indicates that the metadata zip file points to a directory structure for a single
|
|
547
|
+
package.
|
|
539
548
|
--verbose Show verbose output of the validation result.
|
|
540
549
|
|
|
541
550
|
GLOBAL FLAGS
|
|
@@ -561,7 +570,7 @@ DESCRIPTION
|
|
|
561
570
|
quotes. The same syntax applies to --manifest and --source-dir.
|
|
562
571
|
|
|
563
572
|
EXAMPLES
|
|
564
|
-
NOTE: These examples focus on validating large deployments.
|
|
573
|
+
NOTE: These examples focus on validating large deployments. See the help for "sf deploy metadata" for examples of deploying smaller sets of metadata which you can also use to validate.
|
|
565
574
|
|
|
566
575
|
Validate the deployment of all source files in a directory to the default org:
|
|
567
576
|
|
|
@@ -32,11 +32,8 @@ class DeployMetadataCancel extends sf_plugins_core_1.SfCommand {
|
|
|
32
32
|
const formatter = new output_1.DeployCancelResultFormatter(result);
|
|
33
33
|
if (!this.jsonEnabled())
|
|
34
34
|
formatter.display();
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
cache.unset(jobId);
|
|
38
|
-
await cache.write();
|
|
39
|
-
}
|
|
35
|
+
cache.update(result.response.id, { status: result.response.status });
|
|
36
|
+
await cache.write();
|
|
40
37
|
return formatter.getJson();
|
|
41
38
|
}
|
|
42
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cancel.js","sourceRoot":"","sources":["../../../../src/commands/deploy/metadata/cancel.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,2CAA4C;AAC5C,yCAA2C;AAC3C,iEAA+D;AAC/D,
|
|
1
|
+
{"version":3,"file":"cancel.js","sourceRoot":"","sources":["../../../../src/commands/deploy/metadata/cancel.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,2CAA4C;AAC5C,yCAA2C;AAC3C,iEAA+D;AAC/D,kDAAqF;AACrF,kDAAsG;AAGtG,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,oCAAoC,EAAE,wBAAwB,CAAC,CAAC;AAEvG,MAAqB,oBAAqB,SAAQ,2BAA2B;IAqCpE,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QACzD,MAAM,KAAK,GAAG,MAAM,oBAAW,CAAC,MAAM,EAAE,CAAC;QACzC,MAAM,KAAK,GAAG,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,iBAAiB,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;QAE7E,MAAM,UAAU,GAAG,KAAK,CA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AAC,QAAQ,CAAC;QACnB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC;QAClD,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,wBAAwB,CAAC;QAC1D,IAAI,EAAE,SAAS;QACf,SAAS,EAAE,WAAW;QACtB,GAAG,EAAE,CAAC;QACN,SAAS,EAAE,CAAC,OAAO,CAAC;KACrB,CAAC;CACH,CAAC"}
|
|
@@ -39,9 +39,7 @@ class DeployMetadataQuick extends sf_plugins_core_1.SfCommand {
|
|
|
39
39
|
const formatter = new output_1.DeployResultFormatter(result, flags);
|
|
40
40
|
if (!this.jsonEnabled())
|
|
41
41
|
formatter.display();
|
|
42
|
-
|
|
43
|
-
await deploy_1.DeployCache.unset(jobId);
|
|
44
|
-
}
|
|
42
|
+
await deploy_1.DeployCache.update(jobId, { status: result.response.status });
|
|
45
43
|
this.setExitCode(result);
|
|
46
44
|
if (result.response.status === source_deploy_retrieve_1.RequestStatus.Succeeded) {
|
|
47
45
|
this.log();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quick.js","sourceRoot":"","sources":["../../../../src/commands/deploy/metadata/quick.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,iCAA6B;AAC7B,2CAAiD;AACjD,iEAA8E;AAC9E,+EAAiF;AACjF,
|
|
1
|
+
{"version":3,"file":"quick.js","sourceRoot":"","sources":["../../../../src/commands/deploy/metadata/quick.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,iCAA6B;AAC7B,2CAAiD;AACjD,iEAA8E;AAC9E,+EAAiF;AACjF,kDAO+B;AAC/B,0DAA6E;AAC7E,kDAA6G;AAC7G,gDAA6D;AAE7D,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,oCAAoC,EAAE,uBAAuB,CAAC,CAAC;AAEtG,MAAqB,m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GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,8BAA8B,CAAC;QAChE,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,0BAA0B,CAAC;KACzD,CAAC;IACF,iBAAiB,EAAE,uBAAK,CAAC,OAAO,CAAC;QAC/B,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,mCAAmC,CAAC;QACrE,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,+BAA+B,CAAC;QAC7D,UAAU,EAAE,CAAC,iBAAiB,EAAE,QAAQ,CAAC;KAC1C,CAAC;IACF,OAAO,EAAE,uBAAK,CAAC,OAAO,CAAC;QACrB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC;QACrD,SAAS,EAAE,CAAC,SAAS,CAAC;KACvB,CAAC;IACF,IAAI,EAAE,uBAAK,CAAC,QAAQ,CAAC;QACnB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC;QAClD,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,wBAAwB,CAAC;QAC1D,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,EAAE;QAChB,SAAS,EAAE,WAAW;QACtB,GAAG,EAAE,CAAC;QACN,SAAS,EAAE,CAAC,OAAO,CAAC;KACrB,CAAC;CACH,CAAC;AAEY,8BAAU,GAAG,IAAA,+BAAa,EAAC,aAAa,EAAE,6CAAgC,CAAC,CAAC"}
|
|
@@ -22,6 +22,9 @@ class DeployMetadataResume extends sf_plugins_core_1.SfCommand {
|
|
|
22
22
|
const cache = await deploy_1.DeployCache.create();
|
|
23
23
|
const jobId = cache.resolveLatest(flags['use-most-recent'], flags['job-id']);
|
|
24
24
|
const deployOpts = cache.get(jobId);
|
|
25
|
+
if ((0, deploy_1.isNotResumable)(deployOpts.status)) {
|
|
26
|
+
throw messages.createError('error.DeployNotResumable', [jobId, deployOpts.status]);
|
|
27
|
+
}
|
|
25
28
|
const wait = flags.wait || kit_1.Duration.minutes(deployOpts.wait);
|
|
26
29
|
const { deploy, componentSet } = await (0, deploy_1.executeDeploy)({ ...deployOpts, wait, 'dry-run': false }, jobId);
|
|
27
30
|
this.log((0, output_1.getVersionMessage)('Resuming Deployment', componentSet, deployOpts.api));
|
|
@@ -36,11 +39,8 @@ class DeployMetadataResume extends sf_plugins_core_1.SfCommand {
|
|
|
36
39
|
});
|
|
37
40
|
if (!this.jsonEnabled())
|
|
38
41
|
formatter.display();
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
cache.unset(jobId);
|
|
42
|
-
await cache.write();
|
|
43
|
-
}
|
|
42
|
+
cache.update(deploy.id, { status: result.response.status });
|
|
43
|
+
await cache.write();
|
|
44
44
|
return formatter.getJson();
|
|
45
45
|
}
|
|
46
46
|
setExitCode(result) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resume.js","sourceRoot":"","sources":["../../../../src/commands/deploy/metadata/resume.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,iCAA6B;AAC7B,2CAAiE;AAEjE,iEAA8E;AAC9E,yCAA2C;AAC3C,kDAAiF;AACjF,4DAA4D;AAE5D,
|
|
1
|
+
{"version":3,"file":"resume.js","sourceRoot":"","sources":["../../../../src/commands/deploy/metadata/resume.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,iCAA6B;AAC7B,2CAAiE;AAEjE,iEAA8E;AAC9E,yCAA2C;AAC3C,kDAAiF;AACjF,4DAA4D;AAE5D,kDAAsG;AACtG,0DAA6E;AAE7E,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,oCAAoC,EAAE,wBAAwB,CAAC,CAAC;AAEvG,MAAqB,oBAAqB,SAAQ,2BAA2B;IA2CpE,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAA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AAiB,EAAE,uBAAK,CAAC,OAAO,CAAC;QAC/B,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,mCAAmC,CAAC;QACrE,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,+BAA+B,CAAC;QAC7D,UAAU,EAAE,CAAC,iBAAiB,EAAE,QAAQ,CAAC;KAC1C,CAAC;IACF,OAAO,EAAE,uBAAK,CAAC,OAAO,CAAC;QACrB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC;QACrD,SAAS,EAAE,CAAC,SAAS,CAAC;KACvB,CAAC;IACF,IAAI,EAAE,uBAAK,CAAC,QAAQ,CAAC;QACnB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC;QAClD,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,wBAAwB,CAAC;QAC1D,IAAI,EAAE,SAAS;QACf,SAAS,EAAE,WAAW;QACtB,GAAG,EAAE,CAAC;KACP,CAAC;CACH,CAAC;AAEY,wCAAmB,GAAG,IAAA,+BAAa,EAAC,uBAAuB,EAAE,0BAAmB,CAAC,mBAAmB,CAAC,CAAC;AAEtG,+BAAU,GAAG,IAAA,+BAAa,EAAC,aAAa,EAAE,6CAAgC,CAAC,CAAC"}
|
|
@@ -13,6 +13,8 @@ export default class DeployMetadataValidate extends SfCommand<DeployResultJson>
|
|
|
13
13
|
manifest: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
14
14
|
metadata: import("@oclif/core/lib/interfaces").OptionFlag<string[]>;
|
|
15
15
|
'source-dir': import("@oclif/core/lib/interfaces").OptionFlag<string[]>;
|
|
16
|
+
'metadata-dir': import("@oclif/core/lib/interfaces").OptionFlag<import("../../../utils/types").PathInfo>;
|
|
17
|
+
'single-package': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
18
|
'target-org': import("@oclif/core/lib/interfaces").OptionFlag<import("@salesforce/core").Org>;
|
|
17
19
|
tests: import("@oclif/core/lib/interfaces").OptionFlag<string[]>;
|
|
18
20
|
'test-level': import("@oclif/core/lib/interfaces").OptionFlag<TestLevel>;
|
|
@@ -16,8 +16,10 @@ const types_1 = require("../../../utils/types");
|
|
|
16
16
|
const deploy_1 = require("../../../utils/deploy");
|
|
17
17
|
const errorCodes_1 = require("../../../utils/errorCodes");
|
|
18
18
|
const configMeta_1 = require("../../../configMeta");
|
|
19
|
+
const flags_1 = require("../../../utils/flags");
|
|
19
20
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
20
21
|
const messages = core_1.Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'deploy.metadata.validate');
|
|
22
|
+
const EXACTLY_ONE_FLAGS = ['manifest', 'source-dir', 'metadata', 'metadata-dir'];
|
|
21
23
|
class DeployMetadataValidate extends sf_plugins_core_1.SfCommand {
|
|
22
24
|
async run() {
|
|
23
25
|
const { flags } = await this.parse(DeployMetadataValidate);
|
|
@@ -82,23 +84,29 @@ DeployMetadataValidate.flags = {
|
|
|
82
84
|
char: 'x',
|
|
83
85
|
description: messages.getMessage('flags.manifest.description'),
|
|
84
86
|
summary: messages.getMessage('flags.manifest.summary'),
|
|
85
|
-
|
|
86
|
-
exactlyOne: ['manifest', 'source-dir', 'metadata'],
|
|
87
|
+
exactlyOne: EXACTLY_ONE_FLAGS,
|
|
87
88
|
}),
|
|
88
89
|
metadata: sf_plugins_core_1.Flags.string({
|
|
89
90
|
char: 'm',
|
|
90
91
|
summary: messages.getMessage('flags.metadata.summary'),
|
|
91
92
|
multiple: true,
|
|
92
|
-
|
|
93
|
-
exactlyOne: ['manifest', 'source-dir', 'metadata'],
|
|
93
|
+
exactlyOne: EXACTLY_ONE_FLAGS,
|
|
94
94
|
}),
|
|
95
95
|
'source-dir': sf_plugins_core_1.Flags.string({
|
|
96
96
|
char: 'd',
|
|
97
97
|
description: messages.getMessage('flags.source-dir.description'),
|
|
98
98
|
summary: messages.getMessage('flags.source-dir.summary'),
|
|
99
99
|
multiple: true,
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
exactlyOne: EXACTLY_ONE_FLAGS,
|
|
101
|
+
}),
|
|
102
|
+
'metadata-dir': (0, flags_1.fileOrDirFlag)({
|
|
103
|
+
summary: messages.getMessage('flags.metadata-dir.summary'),
|
|
104
|
+
exactlyOne: EXACTLY_ONE_FLAGS,
|
|
105
|
+
exists: true,
|
|
106
|
+
}),
|
|
107
|
+
'single-package': sf_plugins_core_1.Flags.boolean({
|
|
108
|
+
summary: messages.getMessage('flags.single-package.summary'),
|
|
109
|
+
dependsOn: ['metadata-dir'],
|
|
102
110
|
}),
|
|
103
111
|
'target-org': sf_plugins_core_1.Flags.requiredOrg({
|
|
104
112
|
char: 'o',
|
|
@@ -110,7 +118,7 @@ DeployMetadataValidate.flags = {
|
|
|
110
118
|
multiple: true,
|
|
111
119
|
summary: messages.getMessage('flags.tests.summary'),
|
|
112
120
|
}),
|
|
113
|
-
'test-level': (0,
|
|
121
|
+
'test-level': (0, flags_1.testLevelFlag)({
|
|
114
122
|
options: [types_1.TestLevel.RunAllTestsInOrg, types_1.TestLevel.RunLocalTests, types_1.TestLevel.RunSpecifiedTests],
|
|
115
123
|
default: types_1.TestLevel.RunLocalTests,
|
|
116
124
|
description: messages.getMessage('flags.test-level.description'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../../src/commands/deploy/metadata/validate.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,iCAA6B;AAC7B,2CAAsF;AACtF,+EAAiF;AACjF,iEAA8E;AAC9E,kDAA6G;AAC7G,4DAA4D;AAC5D,gDAAmE;AACnE,
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../../src/commands/deploy/metadata/validate.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,iCAA6B;AAC7B,2CAAsF;AACtF,+EAAiF;AACjF,iEAA8E;AAC9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G;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC;QAClD,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,wBAAwB,CAAC;QAC1D,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,EAAE;QAChB,SAAS,EAAE,WAAW;QACtB,GAAG,EAAE,CAAC;KACP,CAAC;CACH,CAAC;AAEY,oDAA6B,GAAG,IAAA,+BAAa,EACzD,yBAAyB,EACzB,0BAAmB,CAAC,UAAU,EAC9B,0BAAmB,CAAC,eAAe,EACnC,uBAAU,CAAC,wBAAwB,CACpC,CAAC;AAEY,0CAAmB,GAAG,IAAA,+BAAa,EAC/C,uBAAuB,EACvB,0BAAmB,CAAC,aAAa,EACjC,0BAAmB,CAAC,mBAAmB,CACxC,CAAC;AAEY,iCAAU,GAAG,IAAA,+BAAa,EAAC,aAAa,EAAE,6CAAgC,CAAC,CAAC"}
|
|
@@ -15,6 +15,8 @@ export default class DeployMetadata extends SfCommand<DeployResultJson> {
|
|
|
15
15
|
'ignore-warnings': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
16
|
manifest: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
17
17
|
metadata: import("@oclif/core/lib/interfaces").OptionFlag<string[]>;
|
|
18
|
+
'metadata-dir': import("@oclif/core/lib/interfaces").OptionFlag<import("../../utils/types").PathInfo>;
|
|
19
|
+
'single-package': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
18
20
|
'source-dir': import("@oclif/core/lib/interfaces").OptionFlag<string[]>;
|
|
19
21
|
'target-org': import("@oclif/core/lib/interfaces").OptionFlag<import("@salesforce/core").Org>;
|
|
20
22
|
tests: import("@oclif/core/lib/interfaces").OptionFlag<string[]>;
|
|
@@ -15,8 +15,10 @@ const types_1 = require("../../utils/types");
|
|
|
15
15
|
const deploy_1 = require("../../utils/deploy");
|
|
16
16
|
const errorCodes_1 = require("../../utils/errorCodes");
|
|
17
17
|
const configMeta_1 = require("../../configMeta");
|
|
18
|
+
const flags_1 = require("../../utils/flags");
|
|
18
19
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
19
20
|
const messages = core_1.Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'deploy.metadata');
|
|
21
|
+
const EXACTLY_ONE_FLAGS = ['manifest', 'source-dir', 'metadata', 'metadata-dir'];
|
|
20
22
|
class DeployMetadata extends sf_plugins_core_1.SfCommand {
|
|
21
23
|
async run() {
|
|
22
24
|
const { flags } = await this.parse(DeployMetadata);
|
|
@@ -47,9 +49,7 @@ class DeployMetadata extends sf_plugins_core_1.SfCommand {
|
|
|
47
49
|
if (flags['dry-run'])
|
|
48
50
|
this.logSuccess('Dry-run complete.');
|
|
49
51
|
}
|
|
50
|
-
|
|
51
|
-
await deploy_1.DeployCache.unset(deploy.id);
|
|
52
|
-
}
|
|
52
|
+
await deploy_1.DeployCache.update(deploy.id, { status: result.response.status });
|
|
53
53
|
return formatter.getJson();
|
|
54
54
|
}
|
|
55
55
|
catch(error) {
|
|
@@ -104,21 +104,30 @@ DeployMetadata.flags = {
|
|
|
104
104
|
char: 'x',
|
|
105
105
|
description: messages.getMessage('flags.manifest.description'),
|
|
106
106
|
summary: messages.getMessage('flags.manifest.summary'),
|
|
107
|
-
exactlyOne:
|
|
107
|
+
exactlyOne: EXACTLY_ONE_FLAGS,
|
|
108
108
|
exists: true,
|
|
109
109
|
}),
|
|
110
110
|
metadata: sf_plugins_core_1.Flags.string({
|
|
111
111
|
char: 'm',
|
|
112
112
|
summary: messages.getMessage('flags.metadata.summary'),
|
|
113
113
|
multiple: true,
|
|
114
|
-
exactlyOne:
|
|
114
|
+
exactlyOne: EXACTLY_ONE_FLAGS,
|
|
115
|
+
}),
|
|
116
|
+
'metadata-dir': (0, flags_1.fileOrDirFlag)({
|
|
117
|
+
summary: messages.getMessage('flags.metadata-dir.summary'),
|
|
118
|
+
exactlyOne: EXACTLY_ONE_FLAGS,
|
|
119
|
+
exists: true,
|
|
120
|
+
}),
|
|
121
|
+
'single-package': sf_plugins_core_1.Flags.boolean({
|
|
122
|
+
summary: messages.getMessage('flags.single-package.summary'),
|
|
123
|
+
dependsOn: ['metadata-dir'],
|
|
115
124
|
}),
|
|
116
125
|
'source-dir': sf_plugins_core_1.Flags.string({
|
|
117
126
|
char: 'd',
|
|
118
127
|
description: messages.getMessage('flags.source-dir.description'),
|
|
119
128
|
summary: messages.getMessage('flags.source-dir.summary'),
|
|
120
129
|
multiple: true,
|
|
121
|
-
exactlyOne:
|
|
130
|
+
exactlyOne: EXACTLY_ONE_FLAGS,
|
|
122
131
|
}),
|
|
123
132
|
'target-org': sf_plugins_core_1.Flags.requiredOrg({
|
|
124
133
|
char: 'o',
|
|
@@ -131,7 +140,7 @@ DeployMetadata.flags = {
|
|
|
131
140
|
summary: messages.getMessage('flags.tests.summary'),
|
|
132
141
|
description: messages.getMessage('flags.tests.description'),
|
|
133
142
|
}),
|
|
134
|
-
'test-level': (0,
|
|
143
|
+
'test-level': (0, flags_1.testLevelFlag)({
|
|
135
144
|
default: types_1.TestLevel.NoTestRun,
|
|
136
145
|
description: messages.getMessage('flags.test-level.description'),
|
|
137
146
|
summary: messages.getMessage('flags.test-level.summary'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../src/commands/deploy/metadata.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,iCAA6B;AAC7B,2CAAsF;AAEtF,iEAA8E;AAC9E,+CAA0G;AAC1G,yDAAyD;AACzD,6CAAgE;AAChE,+
|
|
1
|
+
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../src/commands/deploy/metadata.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,iCAA6B;AAC7B,2CAAsF;AAEtF,iEAA8E;AAC9E,+CAA0G;AAC1G,yDAAyD;AACzD,6CAAgE;AAChE,+CAA8G;AAC9G,uDAA0E;AAC1E,iDAA8C;AAC9C,6CAAiE;A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AAEY,kCAAmB,GAAG,IAAA,+BAAa,EAC/C,uBAAuB,EACvB,0BAAmB,CAAC,aAAa,EACjC,0BAAmB,CAAC,mBAAmB,CACxC,CAAC;AAEY,yBAAU,GAAG,IAAA,+BAAa,EAAC,aAAa,EAAE,6CAAgC,CAAC,CAAC"}
|
package/lib/utils/deploy.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Interfaces } from '@oclif/core';
|
|
2
1
|
import { Org, TTLConfig } from '@salesforce/core';
|
|
3
2
|
import { Duration } from '@salesforce/kit';
|
|
4
|
-
import { Nullable } from '@salesforce/ts-types';
|
|
3
|
+
import { JsonMap, Nullable } from '@salesforce/ts-types';
|
|
5
4
|
import { ComponentSet, DeployResult, MetadataApiDeploy, RequestStatus } from '@salesforce/source-deploy-retrieve';
|
|
6
|
-
import { API, TestLevel } from './types';
|
|
5
|
+
import { API, PathInfo, TestLevel } from './types';
|
|
7
6
|
export declare type DeployOptions = {
|
|
8
7
|
api: API;
|
|
9
8
|
'target-org': string;
|
|
@@ -15,11 +14,14 @@ export declare type DeployOptions = {
|
|
|
15
14
|
'ignore-warnings'?: boolean;
|
|
16
15
|
manifest?: string;
|
|
17
16
|
metadata?: string[];
|
|
17
|
+
'metadata-dir'?: PathInfo;
|
|
18
18
|
'source-dir'?: string[];
|
|
19
19
|
tests?: string[];
|
|
20
20
|
wait?: Duration;
|
|
21
21
|
verbose?: boolean;
|
|
22
22
|
concise?: boolean;
|
|
23
|
+
'single-package'?: boolean;
|
|
24
|
+
status?: RequestStatus;
|
|
23
25
|
};
|
|
24
26
|
export declare type CachedOptions = Omit<DeployOptions, 'wait'> & {
|
|
25
27
|
wait: number;
|
|
@@ -36,13 +38,15 @@ export declare function cancelDeployAsync(opts: Partial<DeployOptions>, id: stri
|
|
|
36
38
|
id: string;
|
|
37
39
|
}>;
|
|
38
40
|
export declare function poll(org: Org, id: string, wait: Duration, componentSet: ComponentSet): Promise<DeployResult>;
|
|
39
|
-
export declare const testLevelFlag: (opts?: Partial<Interfaces.OptionFlag<TestLevel | undefined>>) => Interfaces.OptionFlag<TestLevel | undefined>;
|
|
40
41
|
export declare function determineExitCode(result: DeployResult, async?: boolean): number;
|
|
41
|
-
export declare function
|
|
42
|
+
export declare function isNotResumable(status: RequestStatus): boolean;
|
|
42
43
|
export declare class DeployCache extends TTLConfig<TTLConfig.Options, CachedOptions> {
|
|
43
44
|
static getFileName(): string;
|
|
44
45
|
static getDefaultOptions(): TTLConfig.Options;
|
|
45
46
|
static set(key: string, value: Partial<CachedOptions>): Promise<void>;
|
|
46
47
|
static unset(key: string): Promise<void>;
|
|
48
|
+
static update(key: string, obj: JsonMap): Promise<void>;
|
|
47
49
|
resolveLatest(useMostRecent: boolean, key: Nullable<string>, throwOnNotFound?: boolean): string;
|
|
50
|
+
resolveLongId(jobId: string): string;
|
|
51
|
+
get(jobId: string): TTLConfig.Entry<CachedOptions>;
|
|
48
52
|
}
|
package/lib/utils/deploy.js
CHANGED
|
@@ -6,17 +6,16 @@
|
|
|
6
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.DeployCache = exports.
|
|
10
|
-
const core_1 = require("@
|
|
11
|
-
const core_2 = require("@salesforce/core");
|
|
9
|
+
exports.DeployCache = exports.isNotResumable = exports.determineExitCode = exports.poll = exports.cancelDeployAsync = exports.cancelDeploy = exports.executeDeploy = exports.buildComponentSet = exports.resolveApi = exports.validateTests = void 0;
|
|
10
|
+
const core_1 = require("@salesforce/core");
|
|
12
11
|
const kit_1 = require("@salesforce/kit");
|
|
13
12
|
const source_deploy_retrieve_1 = require("@salesforce/source-deploy-retrieve");
|
|
14
13
|
const configMeta_1 = require("../configMeta");
|
|
15
14
|
const project_1 = require("./project");
|
|
16
15
|
const types_1 = require("./types");
|
|
17
16
|
const errorCodes_1 = require("./errorCodes");
|
|
18
|
-
|
|
19
|
-
const messages =
|
|
17
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
18
|
+
const messages = core_1.Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'cache');
|
|
20
19
|
function validateTests(testLevel, tests) {
|
|
21
20
|
if (testLevel === types_1.TestLevel.RunSpecifiedTests && (tests !== null && tests !== void 0 ? tests : []).length === 0)
|
|
22
21
|
return false;
|
|
@@ -25,12 +24,14 @@ function validateTests(testLevel, tests) {
|
|
|
25
24
|
exports.validateTests = validateTests;
|
|
26
25
|
async function resolveApi() {
|
|
27
26
|
var _a;
|
|
28
|
-
const agg = await
|
|
27
|
+
const agg = await core_1.ConfigAggregator.create({ customConfigMeta: configMeta_1.default });
|
|
29
28
|
const restDeployConfig = (_a = agg.getInfo(configMeta_1.ConfigVars.ORG_METADATA_REST_DEPLOY)) === null || _a === void 0 ? void 0 : _a.value;
|
|
30
29
|
return restDeployConfig === 'true' ? types_1.API.REST : types_1.API.SOAP;
|
|
31
30
|
}
|
|
32
31
|
exports.resolveApi = resolveApi;
|
|
33
32
|
async function buildComponentSet(opts) {
|
|
33
|
+
if (!opts['source-dir'] && !opts.manifest && !opts.metadata)
|
|
34
|
+
return new source_deploy_retrieve_1.ComponentSet();
|
|
34
35
|
return source_deploy_retrieve_1.ComponentSetBuilder.build({
|
|
35
36
|
apiversion: opts['api-version'],
|
|
36
37
|
sourceapiversion: await (0, project_1.getSourceApiVersion)(),
|
|
@@ -48,26 +49,46 @@ async function buildComponentSet(opts) {
|
|
|
48
49
|
exports.buildComponentSet = buildComponentSet;
|
|
49
50
|
async function executeDeploy(opts, id) {
|
|
50
51
|
var _a, _b;
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
52
|
+
const apiOptions = {
|
|
53
|
+
checkOnly: opts['dry-run'] || false,
|
|
54
|
+
ignoreWarnings: opts['ignore-warnings'] || false,
|
|
55
|
+
rest: opts.api === types_1.API.REST,
|
|
56
|
+
rollbackOnError: !opts['ignore-errors'] || false,
|
|
57
|
+
runTests: opts.tests || [],
|
|
58
|
+
testLevel: opts['test-level'],
|
|
59
|
+
};
|
|
60
|
+
let deploy;
|
|
61
|
+
let componentSet;
|
|
62
|
+
if (opts['metadata-dir']) {
|
|
63
|
+
if (id) {
|
|
64
|
+
deploy = new source_deploy_retrieve_1.MetadataApiDeploy({ id, usernameOrConnection: opts['target-org'] });
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
const key = opts['metadata-dir'].type === 'directory' ? 'mdapiPath' : 'zipPath';
|
|
68
|
+
deploy = new source_deploy_retrieve_1.MetadataApiDeploy({
|
|
69
|
+
[key]: opts['metadata-dir'].path,
|
|
70
|
+
usernameOrConnection: opts['target-org'],
|
|
71
|
+
apiOptions: { ...apiOptions, singlePackage: opts['single-package'] || false },
|
|
72
|
+
});
|
|
73
|
+
await deploy.start();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
componentSet = await buildComponentSet(opts);
|
|
78
|
+
deploy = id
|
|
79
|
+
? new source_deploy_retrieve_1.MetadataApiDeploy({ id, usernameOrConnection: opts['target-org'], components: componentSet })
|
|
80
|
+
: await componentSet.deploy({
|
|
81
|
+
usernameOrConnection: opts['target-org'],
|
|
82
|
+
apiOptions,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
64
85
|
await DeployCache.set(deploy.id, { ...opts, wait: (_b = (_a = opts.wait) === null || _a === void 0 ? void 0 : _a.minutes) !== null && _b !== void 0 ? _b : 33 });
|
|
65
86
|
return { deploy, componentSet };
|
|
66
87
|
}
|
|
67
88
|
exports.executeDeploy = executeDeploy;
|
|
68
89
|
async function cancelDeploy(opts, id) {
|
|
69
90
|
var _a, _b;
|
|
70
|
-
const org = await
|
|
91
|
+
const org = await core_1.Org.create({ aliasOrUsername: opts['target-org'] });
|
|
71
92
|
const deploy = new source_deploy_retrieve_1.MetadataApiDeploy({ usernameOrConnection: org.getUsername(), id });
|
|
72
93
|
const componentSet = await buildComponentSet({ ...opts });
|
|
73
94
|
await DeployCache.set(deploy.id, { ...opts, wait: (_b = (_a = opts.wait) === null || _a === void 0 ? void 0 : _a.minutes) !== null && _b !== void 0 ? _b : 33 });
|
|
@@ -76,7 +97,7 @@ async function cancelDeploy(opts, id) {
|
|
|
76
97
|
}
|
|
77
98
|
exports.cancelDeploy = cancelDeploy;
|
|
78
99
|
async function cancelDeployAsync(opts, id) {
|
|
79
|
-
const org = await
|
|
100
|
+
const org = await core_1.Org.create({ aliasOrUsername: opts['target-org'] });
|
|
80
101
|
const deploy = new source_deploy_retrieve_1.MetadataApiDeploy({ usernameOrConnection: org.getUsername(), id });
|
|
81
102
|
await deploy.cancel();
|
|
82
103
|
return { id: deploy.id };
|
|
@@ -89,11 +110,7 @@ async function poll(org, id, wait, componentSet) {
|
|
|
89
110
|
return new source_deploy_retrieve_1.DeployResult(deployStatus, componentSet);
|
|
90
111
|
};
|
|
91
112
|
const opts = {
|
|
92
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
93
|
-
// @ts-ignore
|
|
94
113
|
frequency: kit_1.Duration.milliseconds(1000),
|
|
95
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
96
|
-
// @ts-ignore
|
|
97
114
|
timeout: wait,
|
|
98
115
|
poll: async () => {
|
|
99
116
|
const deployResult = await report();
|
|
@@ -103,19 +120,10 @@ async function poll(org, id, wait, componentSet) {
|
|
|
103
120
|
};
|
|
104
121
|
},
|
|
105
122
|
};
|
|
106
|
-
const pollingClient = await
|
|
123
|
+
const pollingClient = await core_1.PollingClient.create(opts);
|
|
107
124
|
return pollingClient.subscribe();
|
|
108
125
|
}
|
|
109
126
|
exports.poll = poll;
|
|
110
|
-
const testLevelFlag = (opts = {}) => {
|
|
111
|
-
return core_1.Flags.build({
|
|
112
|
-
char: 'l',
|
|
113
|
-
parse: (input) => Promise.resolve(input),
|
|
114
|
-
options: Object.values(types_1.TestLevel),
|
|
115
|
-
...opts,
|
|
116
|
-
})();
|
|
117
|
-
};
|
|
118
|
-
exports.testLevelFlag = testLevelFlag;
|
|
119
127
|
function determineExitCode(result, async = false) {
|
|
120
128
|
if (async) {
|
|
121
129
|
return result.response.status === source_deploy_retrieve_1.RequestStatus.Succeeded ? 0 : 1;
|
|
@@ -123,7 +131,7 @@ function determineExitCode(result, async = false) {
|
|
|
123
131
|
return errorCodes_1.DEPLOY_STATUS_CODES.get(result.response.status);
|
|
124
132
|
}
|
|
125
133
|
exports.determineExitCode = determineExitCode;
|
|
126
|
-
function
|
|
134
|
+
function isNotResumable(status) {
|
|
127
135
|
return [
|
|
128
136
|
source_deploy_retrieve_1.RequestStatus.Succeeded,
|
|
129
137
|
source_deploy_retrieve_1.RequestStatus.Failed,
|
|
@@ -131,8 +139,8 @@ function shouldRemoveFromCache(status) {
|
|
|
131
139
|
source_deploy_retrieve_1.RequestStatus.Canceled,
|
|
132
140
|
].includes(status);
|
|
133
141
|
}
|
|
134
|
-
exports.
|
|
135
|
-
class DeployCache extends
|
|
142
|
+
exports.isNotResumable = isNotResumable;
|
|
143
|
+
class DeployCache extends core_1.TTLConfig {
|
|
136
144
|
static getFileName() {
|
|
137
145
|
return 'deploy-cache.json';
|
|
138
146
|
}
|
|
@@ -141,9 +149,7 @@ class DeployCache extends core_2.TTLConfig {
|
|
|
141
149
|
isGlobal: false,
|
|
142
150
|
isState: true,
|
|
143
151
|
filename: DeployCache.getFileName(),
|
|
144
|
-
stateFolder:
|
|
145
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
146
|
-
// @ts-ignore
|
|
152
|
+
stateFolder: core_1.Global.SF_STATE_FOLDER,
|
|
147
153
|
ttl: kit_1.Duration.days(3),
|
|
148
154
|
};
|
|
149
155
|
}
|
|
@@ -157,8 +163,13 @@ class DeployCache extends core_2.TTLConfig {
|
|
|
157
163
|
cache.unset(key);
|
|
158
164
|
await cache.write();
|
|
159
165
|
}
|
|
166
|
+
static async update(key, obj) {
|
|
167
|
+
const cache = await DeployCache.create();
|
|
168
|
+
cache.update(key, obj);
|
|
169
|
+
await cache.write();
|
|
170
|
+
}
|
|
160
171
|
resolveLatest(useMostRecent, key, throwOnNotFound = true) {
|
|
161
|
-
const jobId = useMostRecent ? this.getLatestKey() : key;
|
|
172
|
+
const jobId = this.resolveLongId(useMostRecent ? this.getLatestKey() : key);
|
|
162
173
|
if (!jobId && useMostRecent)
|
|
163
174
|
throw messages.createError('error.NoRecentJobId');
|
|
164
175
|
if (throwOnNotFound && !this.has(jobId)) {
|
|
@@ -166,6 +177,20 @@ class DeployCache extends core_2.TTLConfig {
|
|
|
166
177
|
}
|
|
167
178
|
return jobId;
|
|
168
179
|
}
|
|
180
|
+
resolveLongId(jobId) {
|
|
181
|
+
if (jobId.length === 18) {
|
|
182
|
+
return jobId;
|
|
183
|
+
}
|
|
184
|
+
else if (jobId.length === 15) {
|
|
185
|
+
return this.keys().find((k) => k.substring(0, 15) === jobId);
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
throw messages.createError('error.InvalidJobId', [jobId]);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
get(jobId) {
|
|
192
|
+
return super.get(this.resolveLongId(jobId));
|
|
193
|
+
}
|
|
169
194
|
}
|
|
170
195
|
exports.DeployCache = DeployCache;
|
|
171
196
|
//# sourceMappingURL=deploy.js.map
|
package/lib/utils/deploy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/utils/deploy.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/utils/deploy.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,2CAAmH;AACnH,yCAA2C;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AE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,CAAC,CAAC;SAC9D;aAAM;YACL,MAAM,QAAQ,CAAC,WAAW,CAAC,oBAAoB,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;SAC3D;IACH,CAAC;IAEM,GAAG,CAAC,KAAa;QACtB,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9C,CAAC;CACF;AAzDD,kCAyDC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Interfaces } from '@oclif/core';
|
|
2
|
+
import { PathInfo, TestLevel } from './types';
|
|
3
|
+
export declare const testLevelFlag: (opts?: Partial<Interfaces.OptionFlag<TestLevel | undefined>>) => Interfaces.OptionFlag<TestLevel | undefined>;
|
|
4
|
+
export declare const fileOrDirFlag: (opts?: {
|
|
5
|
+
exists?: boolean;
|
|
6
|
+
} & Partial<Interfaces.OptionFlag<PathInfo | undefined>>) => Interfaces.OptionFlag<PathInfo | undefined>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fileOrDirFlag = exports.testLevelFlag = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* Copyright (c) 2022, 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 fs = require("fs");
|
|
11
|
+
const core_1 = require("@oclif/core");
|
|
12
|
+
const types_1 = require("./types");
|
|
13
|
+
const testLevelFlag = (opts = {}) => {
|
|
14
|
+
return core_1.Flags.build({
|
|
15
|
+
char: 'l',
|
|
16
|
+
parse: (input) => Promise.resolve(input),
|
|
17
|
+
options: Object.values(types_1.TestLevel),
|
|
18
|
+
...opts,
|
|
19
|
+
})();
|
|
20
|
+
};
|
|
21
|
+
exports.testLevelFlag = testLevelFlag;
|
|
22
|
+
const parsePathInfo = async (input, exists) => {
|
|
23
|
+
if (exists && !fs.existsSync(input)) {
|
|
24
|
+
throw new Error(`No file or directory found at ${input}`);
|
|
25
|
+
}
|
|
26
|
+
const stat = await fs.promises.stat(input);
|
|
27
|
+
if (stat.isDirectory()) {
|
|
28
|
+
return { type: 'directory', path: input };
|
|
29
|
+
}
|
|
30
|
+
return { type: 'file', path: input };
|
|
31
|
+
};
|
|
32
|
+
const fileOrDirFlag = (opts = {}) => {
|
|
33
|
+
return core_1.Flags.build({
|
|
34
|
+
parse: async (input) => parsePathInfo(input, opts.exists),
|
|
35
|
+
...opts,
|
|
36
|
+
})();
|
|
37
|
+
};
|
|
38
|
+
exports.fileOrDirFlag = fileOrDirFlag;
|
|
39
|
+
//# sourceMappingURL=flags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flags.js","sourceRoot":"","sources":["../../src/utils/flags.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,sCAAgD;AAChD,mCAA8C;AAEvC,MAAM,aAAa,GAAG,CAC3B,OAA8D,EAAE,EAClB,EAAE;IAChD,OAAO,YAAK,CAAC,KAAK,CAAwB;QACxC,IAAI,EAAE,GAAG;QACT,KAAK,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,KAAkB,CAAC;QAC7D,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,iBAAS,CAAC;QACjC,GAAG,IAAI;KACR,CAAC,EAAE,CAAC;AACP,CAAC,CAAC;AATW,QAAA,aAAa,iBASxB;AAEF,MAAM,aAAa,GAAG,KAAK,EAAE,KAAa,EAAE,MAAe,EAAqB,EAAE;IAChF,IAAI,MAAM,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE;QACnC,MAAM,IAAI,KAAK,CAAC,iCAAiC,KAAK,EAAE,CAAC,CAAC;KAC3D;IAED,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAE3C,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE;QACtB,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;KAC3C;IAED,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AACvC,CAAC,CAAC;AAEK,MAAM,aAAa,GAAG,CAC3B,OAAoF,EAAE,EACzC,EAAE;IAC/C,OAAO,YAAK,CAAC,KAAK,CAAuB;QACvC,KAAK,EAAE,KAAK,EAAE,KAAa,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC;QACjE,GAAG,IAAI;KACR,CAAC,EAAE,CAAC;AACP,CAAC,CAAC;AAPW,QAAA,aAAa,iBAOxB"}
|
package/lib/utils/types.d.ts
CHANGED
|
@@ -9,6 +9,10 @@ export declare enum API {
|
|
|
9
9
|
SOAP = "SOAP",
|
|
10
10
|
REST = "REST"
|
|
11
11
|
}
|
|
12
|
+
export declare type PathInfo = {
|
|
13
|
+
type: 'directory' | 'file';
|
|
14
|
+
path: string;
|
|
15
|
+
};
|
|
12
16
|
export declare type Verbosity = 'verbose' | 'concise' | 'normal';
|
|
13
17
|
export declare type AsyncDeployResultJson = Omit<Partial<MetadataApiDeployStatus>, 'status'> & {
|
|
14
18
|
status: RequestStatus | 'Queued';
|
|
@@ -154,6 +154,14 @@ Run the command asynchronously.
|
|
|
154
154
|
|
|
155
155
|
The command immediately returns the job ID and control of the terminal to you. This way, you can continue to use the CLI. To resume the deployment, run "sf deploy metadata resume". To check the status of the deployment, run "sf deploy metadata report".
|
|
156
156
|
|
|
157
|
+
# flags.metadata-dir.summary
|
|
158
|
+
|
|
159
|
+
Root of directory or zip file of metadata formatted files to deploy.
|
|
160
|
+
|
|
161
|
+
# flags.single-package.summary
|
|
162
|
+
|
|
163
|
+
Indicates that the metadata zip file points to a directory structure for a single package.
|
|
164
|
+
|
|
157
165
|
# save.as.default
|
|
158
166
|
|
|
159
167
|
Save %s as default target-org?
|
|
@@ -14,7 +14,7 @@ To validate the deployment of multiple metadata components, either set multiple
|
|
|
14
14
|
|
|
15
15
|
# examples
|
|
16
16
|
|
|
17
|
-
- NOTE: These examples focus on validating large deployments.
|
|
17
|
+
- NOTE: These examples focus on validating large deployments. See the help for "sf deploy metadata" for examples of deploying smaller sets of metadata which you can also use to validate.
|
|
18
18
|
|
|
19
19
|
- Validate the deployment of all source files in a directory to the default org:
|
|
20
20
|
|
|
@@ -53,9 +53,9 @@ Valid values are:
|
|
|
53
53
|
- 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.
|
|
54
54
|
|
|
55
55
|
- RunAllTestsInOrg — All tests in your org are run, including tests of managed packages.
|
|
56
|
-
|
|
56
|
+
|
|
57
57
|
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".
|
|
58
|
-
|
|
58
|
+
|
|
59
59
|
# flags.source-dir.summary
|
|
60
60
|
|
|
61
61
|
Path to the local source files to validate for deployment.
|
|
@@ -114,6 +114,14 @@ Run the command asynchronously.
|
|
|
114
114
|
|
|
115
115
|
The command immediately returns the job ID and control of the terminal to you. This way, you can continue to use the CLI. To resume watching the validation, run "sf deploy metadata resume". To check the status of the validation, run "sf deploy metadata report".
|
|
116
116
|
|
|
117
|
+
# flags.metadata-dir.summary
|
|
118
|
+
|
|
119
|
+
Root of directory or zip file of metadata formatted files to deploy.
|
|
120
|
+
|
|
121
|
+
# flags.single-package.summary
|
|
122
|
+
|
|
123
|
+
Indicates that the metadata zip file points to a directory structure for a single package.
|
|
124
|
+
|
|
117
125
|
# info.SuccessfulValidation
|
|
118
126
|
|
|
119
127
|
Successfully validated the deployment (%s).
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.4.2","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,"_globalFlags":{}},"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 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","state":"beta","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},"api-version":{"name":"api-version","type":"option","char":"a","summary":"Target API version for the deploy.","description":"Use this flag to override the default API version, which is the latest version supported the CLI, with the API version of your package.xml file.","multiple":false},"async":{"name":"async","type":"boolean","summary":"Run the command asynchronously.","description":"The command immediately returns the job ID and control of the terminal to you. This way, you can continue to use the CLI. To resume the deployment, run \"sf deploy metadata resume\". To check the status of the deployment, run \"sf deploy metadata report\".","allowNo":false,"exclusive":["wait"]},"concise":{"name":"concise","type":"boolean","summary":"Show concise output of the deploy result.","allowNo":false,"exclusive":["verbose"]},"dry-run":{"name":"dry-run","type":"boolean","summary":"Validate deploy and run Apex tests but don’t save to the org.","allowNo":false},"ignore-errors":{"name":"ignore-errors","type":"boolean","char":"r","summary":"Ignore any errors and don’t roll back deployment.","description":"When deploying to a production org, keep this flag set to false (default value). When set to true, components without errors are deployed and components with errors are skipped, and could result in an inconsistent production org.","allowNo":false},"ignore-warnings":{"name":"ignore-warnings","type":"boolean","char":"g","summary":"Ignore warnings and allow a deployment to complete successfully.","description":"If a warning occurs and this flag is set to true, the success status of the deployment is set to true. When this flag is set to false, success is set to false, and the warning is treated like an error.","allowNo":false},"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},"metadata":{"name":"metadata","type":"option","char":"m","summary":"Metadata component names to deploy.","multiple":true},"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},"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},"tests":{"name":"tests","type":"option","char":"t","summary":"Apex tests to run when --test-level is RunSpecifiedTests.","description":"Separate multiple test names with commas, and enclose the entire flag value in double quotes if a test contains a space.","multiple":true},"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"},"verbose":{"name":"verbose","type":"boolean","summary":"Show verbose output of the deploy result.","allowNo":false,"exclusive":["concise"]},"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 and returns the job ID. To resume the deployment, run \"sf deploy metadata resume\". To check the status of the deployment, run \"sf deploy metadata report\".","helpValue":"<minutes>","multiple":false,"exclusive":["async"],"default":{"quantity":33,"unit":0}}},"args":[],"requiresProject":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}},"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":"org-api-version","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":"SF_USE_PROGRESS_BAR","description":"Set to false to disable the progress bar when running the metadata deploy command."}]},"errorCodes":{"header":"ERROR CODES","body":[{"name":"Succeeded (0)","description":"The deploy succeeded."},{"name":"Canceled (1)","description":"The deploy was canceled."},{"name":"Failed (1)","description":"The deploy failed."},{"name":"SucceededPartial (68)","description":"The deploy partially succeeded."},{"name":"InProgress (69)","description":"The deploy is in progress."},{"name":"Pending (69)","description":"The deploy is pending."},{"name":"Canceling (69)","description":"The deploy is being canceled."}]},"hasDynamicHelp":true},"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","state":"beta","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":{"quantity":33,"unit":0}}},"args":[],"requiresProject":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}},"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":"org-api-version","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":"SF_USE_PROGRESS_BAR","description":"Set to false to disable the progress bar when running the metadata deploy command."}]},"hasDynamicHelp":true},"deploy:metadata:cancel":{"id":"deploy:metadata:cancel","summary":"Cancel a deploy operation.","description":"Use this command to cancel a deploy operation that hasn't yet completed in the org. Deploy operations include standard deploys, quick deploys, deploy validations, and deploy cancellations.\n\nRun this command by either passing it a job ID or specifying the --use-most-recent flag to use the job ID of the most recent deploy operation.","strict":true,"pluginName":"@salesforce/plugin-deploy-retrieve","pluginAlias":"@salesforce/plugin-deploy-retrieve","pluginType":"core","state":"beta","aliases":[],"examples":["Cancel a deploy operation using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 0Af0x000017yLUFCA2","Cancel the most recent deploy operation:\n<%= config.bin %> <%= command.id %> --use-most-recent"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"async":{"name":"async","type":"boolean","summary":"Run the command asynchronously.","description":"The command immediately returns the control of the terminal to you. This way, you can continue to use the CLI. To resume watching the cancellation, run \"sf deploy metadata resume\". To check the status of the cancellation, run \"sf deploy metadata report\".","allowNo":false,"exclusive":["wait"]},"job-id":{"name":"job-id","type":"option","char":"i","summary":"Job ID of the deploy operation you want to cancel.","description":"These commands return a job ID if they time out or you specified the --async flag:\n\n- sf deploy metadata\n- sf deploy metadata validate\n- sf deploy metadata quick\n- sf deploy metadata cancel\n\nThe job ID is valid for 10 days from when you started the deploy operation.","multiple":false},"use-most-recent":{"name":"use-most-recent","type":"boolean","char":"r","summary":"Use the job ID of the most recent deploy operation.","description":"For performance reasons, this flag uses job IDs for deploy operations that started only in the past 3 days or less. If your most recent deploy operations was more than 3 days ago, this flag won't find a job ID.","allowNo":false},"wait":{"name":"wait","type":"option","char":"w","summary":"Number of minutes to wait for the 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. To resume watching the cancellation, run \"sf deploy metadata resume\". To check the status of the cancellation, run \"sf deploy metadata report\".","helpValue":"<minutes>","multiple":false,"exclusive":["async"]}},"args":[],"requiresProject":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}},"deploy:metadata:quick":{"id":"deploy:metadata:quick","summary":"Quickly deploy a validated deployment to an org.","description":"Before you run this command, first create a validated deployment with the \"sf deploy metadata validate\" command, which returns a job ID. Validated deployments haven't been deployed to the org yet; you deploy them with this command. Either pass the job ID to this command or use the --use-most-recent flag to use the job ID of the most recently validated deployment. For the quick deploy to succeed, the associated validated deployment must also have succeeded.\n\nExecuting this quick deploy command takes less time than a standard deploy because it skips running Apex tests. These tests were previously run as part of the validation. Validating first and then running a quick deploy is useful if the deployment to your production org take several hours and you don’t want to risk a failed deploy.\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.","strict":true,"pluginName":"@salesforce/plugin-deploy-retrieve","pluginAlias":"@salesforce/plugin-deploy-retrieve","pluginType":"core","state":"beta","aliases":[],"examples":["Run a quick deploy to your default org using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 0Af0x000017yLUFCA2","Asynchronously run a quick deploy of the most recently validated deployment to an org with alias \"my-prod-org\":\n<%= config.bin %> <%= command.id %> --async --use-most-recent --target-org my-prod-org"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"async":{"name":"async","type":"boolean","summary":"Run the command asynchronously.","description":"The command immediately returns the control of the terminal to you. This way, you can continue to use the CLI. To resume watching the deploy, run \"sf deploy metadata resume\". To check the status of the deploy, run \"sf deploy metadata report\".","allowNo":false,"exclusive":["wait"]},"concise":{"name":"concise","type":"boolean","summary":"Show concise output of the deploy result.","allowNo":false,"exclusive":["verbose"]},"job-id":{"name":"job-id","type":"option","char":"i","summary":"Job ID of the deployment you want to quick deploy.","description":"The job ID is valid for 10 days from when you started the validation.","multiple":false},"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},"use-most-recent":{"name":"use-most-recent","type":"boolean","char":"r","summary":"Use the job ID of the most recently validated deployment.","description":"For performance reasons, this flag uses only job IDs that were validated in the past 3 days or less. If your most recent deployment validation was more than 3 days ago, this flag won't find a job ID.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","summary":"Show verbose output of the deploy result.","allowNo":false,"exclusive":["concise"]},"wait":{"name":"wait","type":"option","char":"w","summary":"Number of minutes to wait for the 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. To resume watching the deploy, run \"sf deploy metadata resume\". To check the status of the deploy, run \"sf deploy metadata report\".","helpValue":"<minutes>","multiple":false,"exclusive":["async"],"default":{"quantity":33,"unit":0}}},"args":[],"requiresProject":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}},"errorCodes":{"header":"ERROR CODES","body":[{"name":"Succeeded (0)","description":"The deploy succeeded."},{"name":"Canceled (1)","description":"The deploy was canceled."},{"name":"Failed (1)","description":"The deploy failed."},{"name":"SucceededPartial (68)","description":"The deploy partially succeeded."},{"name":"InProgress (69)","description":"The deploy is in progress."},{"name":"Pending (69)","description":"The deploy is pending."},{"name":"Canceling (69)","description":"The deploy is being canceled."}]},"hasDynamicHelp":true},"deploy:metadata:report":{"id":"deploy:metadata:report","summary":"Check the status of a deploy operation.","description":"Deploy operations include standard deploys, quick deploys, deploy validations, and deploy cancellations.\n\nRun this command by either passing it a job ID or specifying the --use-most-recent flag to use the job ID of the most recent deploy operation.","strict":true,"pluginName":"@salesforce/plugin-deploy-retrieve","pluginAlias":"@salesforce/plugin-deploy-retrieve","pluginType":"core","state":"beta","aliases":[],"examples":["Check the status using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 0Af0x000017yLUFCA2","Check the status of the most recent deploy operation:\n<%= config.bin %> <%= command.id %> --use-most-recent"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"job-id":{"name":"job-id","type":"option","char":"i","summary":"Job ID of the deploy operation you want to check the status of.","description":"These commands return a job ID if they time out or you specified the --async flag:\n\n- sf deploy metadata\n- sf deploy metadata validate\n- sf deploy metadata quick\n- sf deploy metadata cancel\n\nThe job ID is valid for 10 days from when you started the deploy operation.","multiple":false},"use-most-recent":{"name":"use-most-recent","type":"boolean","char":"r","summary":"Use the job ID of the most recent deploy operation.","description":"For performance reasons, this flag uses job IDs for deploy operations that started only in the past 3 days or less. If your most recent operation was more than 3 days ago, this flag won't find a job ID.","allowNo":false}},"args":[],"requiresProject":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}},"deploy:metadata:resume":{"id":"deploy:metadata:resume","summary":"Resume watching a deploy operation.","description":"Use this command to resume watching a deploy operation if the original command times out or you specified the --async flag. Deploy operations include standard deploys, quick deploys, deploy validations, and deploy cancellations. This command doesn't resume the original operation itself, because the operation always continues after you've started it, regardless of whether you're watching it or not.\n\nRun this command by either passing it a job ID or specifying the --use-most-recent flag to use the job ID of the most recent deploy operation.","strict":true,"pluginName":"@salesforce/plugin-deploy-retrieve","pluginAlias":"@salesforce/plugin-deploy-retrieve","pluginType":"core","state":"beta","aliases":[],"examples":["Resume watching a deploy operation using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 0Af0x000017yLUFCA2","Resume watching the most recent deploy operation:\n<%= config.bin %> <%= command.id %> --use-most-recent"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"concise":{"name":"concise","type":"boolean","summary":"Show concise output of the deploy operation result.","allowNo":false,"exclusive":["verbose"]},"job-id":{"name":"job-id","type":"option","char":"i","summary":"Job ID of the deploy operation you want to resume.","description":"These commands return a job ID if they time out or you specified the --async flag:\n\n- sf deploy metadata\n- sf deploy metadata validate\n- sf deploy metadata quick\n- sf deploy metadata cancel\n\nThe job ID is valid for 10 days from when you started the deploy operation.","multiple":false},"use-most-recent":{"name":"use-most-recent","type":"boolean","char":"r","summary":"Use the job ID of the most recent deploy operation.","description":"For performance reasons, this flag uses job IDs for deploy operations that started only in the past 3 days or less. If your most recent operation was more than 3 days ago, this flag won't find a job ID.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","summary":"Show verbose output of the deploy operation result.","allowNo":false,"exclusive":["concise"]},"wait":{"name":"wait","type":"option","char":"w","summary":"Number of minutes to wait for the 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. To resume watching the deploy operation, run this command again. To check the status of the deploy operation, run \"sf deploy metadata report\".","helpValue":"<minutes>","multiple":false}},"args":[],"requiresProject":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}},"envVariablesSection":{"header":"ENVIRONMENT VARIABLES","body":[{"name":"SF_USE_PROGRESS_BAR","description":"Set to false to disable the progress bar when running the metadata deploy command."}]},"errorCodes":{"header":"ERROR CODES","body":[{"name":"Succeeded (0)","description":"The deploy succeeded."},{"name":"Canceled (1)","description":"The deploy was canceled."},{"name":"Failed (1)","description":"The deploy failed."},{"name":"SucceededPartial (68)","description":"The deploy partially succeeded."},{"name":"InProgress (69)","description":"The deploy is in progress."},{"name":"Pending (69)","description":"The deploy is pending."},{"name":"Canceling (69)","description":"The deploy is being canceled."}]}},"deploy:metadata:validate":{"id":"deploy:metadata:validate","summary":"Validate a metadata deployment without actually executing it.","description":"Use this command to verify whether a deployment will succeed without actually deploying the metadata to your org. This command is similar to \"sf deploy metadata\", except you're required to run Apex tests, and the command returns a job ID rather than executing the deployment. If the validation succeeds, then you pass this job ID to the \"sf deploy metadata quick\" command to actually deploy the metadata. This quick deploy takes less time because it skips running Apex tests. The job ID is valid for 10 days from when you started the validation. Validating first is useful if the deployment to your production org take several hours and you don’t want to risk a failed deploy.\n\nYou must run this command from within a project.\n\nThis command doesn't support source-tracking. When you quick deploy with the resulting job ID, the source you deploy overwrites the corresponding metadata in your org.\n\nTo validate the deployment of 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","state":"beta","aliases":[],"examples":["NOTE: These examples focus on validating large deployments. See the help for \"sf deploy metadata\" for examples of deploying smaller sets of metadata which you can also use to validate.","Validate the deployment of all source files in a directory to the default org:\n<%= config.bin %> <%= command.id %> --source-dir path/to/source","Asynchronously validate the deployment and run all tests in the org with alias \"my-prod-org\"; command immediately returns the job ID:\n<%= config.bin %> <%= command.id %> --source-dir path/to/source --async --test-level RunAllTestsInOrg --target-org my-prod-org","Validate the deployment of all components listed in a manifest:\n<%= config.bin %> <%= command.id %> --manifest path/to/package.xml"],"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 validation.","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},"async":{"name":"async","type":"boolean","summary":"Run the command asynchronously.","description":"The command immediately returns the job ID and control of the terminal to you. This way, you can continue to use the CLI. To resume watching the validation, run \"sf deploy metadata resume\". To check the status of the validation, run \"sf deploy metadata report\".","allowNo":false},"concise":{"name":"concise","type":"boolean","summary":"Show concise output of the validation result.","allowNo":false,"exclusive":["verbose"]},"manifest":{"name":"manifest","type":"option","char":"x","summary":"Full file path for manifest (package.xml) of components to validate for deployment.","description":"All child components are included. If you specify this flag, 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 validate for deployment.","multiple":true,"exclusive":["manifest","source-dir"]},"source-dir":{"name":"source-dir","type":"option","char":"d","summary":"Path to the local source files to validate for deployment.","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},"tests":{"name":"tests","type":"option","char":"t","summary":"Apex tests to run when --test-level is RunSpecifiedTests.","multiple":true},"test-level":{"name":"test-level","type":"option","char":"l","summary":"Deployment Apex testing level.","description":"Valid values are:\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 \nIf 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":["RunAllTestsInOrg","RunLocalTests","RunSpecifiedTests"],"default":"RunLocalTests"},"verbose":{"name":"verbose","type":"boolean","summary":"Show verbose output of the validation result.","allowNo":false,"exclusive":["concise"]},"wait":{"name":"wait","type":"option","char":"w","summary":"Number of minutes to wait for the 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 and returns the job ID. To resume watching the validation, run \"sf deploy metadata resume\". To check the status of the validation, run \"sf deploy metadata report\".","helpValue":"<minutes>","multiple":false,"default":{"quantity":33,"unit":0}}},"args":[],"requiresProject":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}},"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":"org-api-version","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":"SF_USE_PROGRESS_BAR","description":"Set to false to disable the progress bar when running the metadata deploy command."}]},"errorCodes":{"header":"ERROR CODES","body":[{"name":"Succeeded (0)","description":"The deploy succeeded."},{"name":"Canceled (1)","description":"The deploy was canceled."},{"name":"Failed (1)","description":"The deploy failed."},{"name":"SucceededPartial (68)","description":"The deploy partially succeeded."},{"name":"InProgress (69)","description":"The deploy is in progress."},{"name":"Pending (69)","description":"The deploy is pending."},{"name":"Canceling (69)","description":"The deploy is being canceled."}]},"hasDynamicHelp":true}}}
|
|
1
|
+
{"version":"1.4.3","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,"_globalFlags":{}},"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 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","state":"beta","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},"api-version":{"name":"api-version","type":"option","char":"a","summary":"Target API version for the deploy.","description":"Use this flag to override the default API version, which is the latest version supported the CLI, with the API version of your package.xml file.","multiple":false},"async":{"name":"async","type":"boolean","summary":"Run the command asynchronously.","description":"The command immediately returns the job ID and control of the terminal to you. This way, you can continue to use the CLI. To resume the deployment, run \"sf deploy metadata resume\". To check the status of the deployment, run \"sf deploy metadata report\".","allowNo":false,"exclusive":["wait"]},"concise":{"name":"concise","type":"boolean","summary":"Show concise output of the deploy result.","allowNo":false,"exclusive":["verbose"]},"dry-run":{"name":"dry-run","type":"boolean","summary":"Validate deploy and run Apex tests but don’t save to the org.","allowNo":false},"ignore-errors":{"name":"ignore-errors","type":"boolean","char":"r","summary":"Ignore any errors and don’t roll back deployment.","description":"When deploying to a production org, keep this flag set to false (default value). When set to true, components without errors are deployed and components with errors are skipped, and could result in an inconsistent production org.","allowNo":false},"ignore-warnings":{"name":"ignore-warnings","type":"boolean","char":"g","summary":"Ignore warnings and allow a deployment to complete successfully.","description":"If a warning occurs and this flag is set to true, the success status of the deployment is set to true. When this flag is set to false, success is set to false, and the warning is treated like an error.","allowNo":false},"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},"metadata":{"name":"metadata","type":"option","char":"m","summary":"Metadata component names to deploy.","multiple":true},"metadata-dir":{"name":"metadata-dir","type":"option","summary":"Root of directory or zip file of metadata formatted files to deploy.","multiple":false},"single-package":{"name":"single-package","type":"boolean","summary":"Indicates that the metadata zip file points to a directory structure for a single package.","allowNo":false,"dependsOn":["metadata-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},"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},"tests":{"name":"tests","type":"option","char":"t","summary":"Apex tests to run when --test-level is RunSpecifiedTests.","description":"Separate multiple test names with commas, and enclose the entire flag value in double quotes if a test contains a space.","multiple":true},"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"},"verbose":{"name":"verbose","type":"boolean","summary":"Show verbose output of the deploy result.","allowNo":false,"exclusive":["concise"]},"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 and returns the job ID. To resume the deployment, run \"sf deploy metadata resume\". To check the status of the deployment, run \"sf deploy metadata report\".","helpValue":"<minutes>","multiple":false,"exclusive":["async"],"default":{"quantity":33,"unit":0}}},"args":[],"requiresProject":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}},"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":"org-api-version","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":"SF_USE_PROGRESS_BAR","description":"Set to false to disable the progress bar when running the metadata deploy command."}]},"errorCodes":{"header":"ERROR CODES","body":[{"name":"Succeeded (0)","description":"The deploy succeeded."},{"name":"Canceled (1)","description":"The deploy was canceled."},{"name":"Failed (1)","description":"The deploy failed."},{"name":"SucceededPartial (68)","description":"The deploy partially succeeded."},{"name":"InProgress (69)","description":"The deploy is in progress."},{"name":"Pending (69)","description":"The deploy is pending."},{"name":"Canceling (69)","description":"The deploy is being canceled."}]},"hasDynamicHelp":true},"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","state":"beta","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":{"quantity":33,"unit":0}}},"args":[],"requiresProject":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}},"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":"org-api-version","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":"SF_USE_PROGRESS_BAR","description":"Set to false to disable the progress bar when running the metadata deploy command."}]},"hasDynamicHelp":true},"deploy:metadata:cancel":{"id":"deploy:metadata:cancel","summary":"Cancel a deploy operation.","description":"Use this command to cancel a deploy operation that hasn't yet completed in the org. Deploy operations include standard deploys, quick deploys, deploy validations, and deploy cancellations.\n\nRun this command by either passing it a job ID or specifying the --use-most-recent flag to use the job ID of the most recent deploy operation.","strict":true,"pluginName":"@salesforce/plugin-deploy-retrieve","pluginAlias":"@salesforce/plugin-deploy-retrieve","pluginType":"core","state":"beta","aliases":[],"examples":["Cancel a deploy operation using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 0Af0x000017yLUFCA2","Cancel the most recent deploy operation:\n<%= config.bin %> <%= command.id %> --use-most-recent"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"async":{"name":"async","type":"boolean","summary":"Run the command asynchronously.","description":"The command immediately returns the control of the terminal to you. This way, you can continue to use the CLI. To resume watching the cancellation, run \"sf deploy metadata resume\". To check the status of the cancellation, run \"sf deploy metadata report\".","allowNo":false,"exclusive":["wait"]},"job-id":{"name":"job-id","type":"option","char":"i","summary":"Job ID of the deploy operation you want to cancel.","description":"These commands return a job ID if they time out or you specified the --async flag:\n\n- sf deploy metadata\n- sf deploy metadata validate\n- sf deploy metadata quick\n- sf deploy metadata cancel\n\nThe job ID is valid for 10 days from when you started the deploy operation.","multiple":false},"use-most-recent":{"name":"use-most-recent","type":"boolean","char":"r","summary":"Use the job ID of the most recent deploy operation.","description":"For performance reasons, this flag uses job IDs for deploy operations that started only in the past 3 days or less. If your most recent deploy operations was more than 3 days ago, this flag won't find a job ID.","allowNo":false},"wait":{"name":"wait","type":"option","char":"w","summary":"Number of minutes to wait for the 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. To resume watching the cancellation, run \"sf deploy metadata resume\". To check the status of the cancellation, run \"sf deploy metadata report\".","helpValue":"<minutes>","multiple":false,"exclusive":["async"]}},"args":[],"requiresProject":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}},"deploy:metadata:quick":{"id":"deploy:metadata:quick","summary":"Quickly deploy a validated deployment to an org.","description":"Before you run this command, first create a validated deployment with the \"sf deploy metadata validate\" command, which returns a job ID. Validated deployments haven't been deployed to the org yet; you deploy them with this command. Either pass the job ID to this command or use the --use-most-recent flag to use the job ID of the most recently validated deployment. For the quick deploy to succeed, the associated validated deployment must also have succeeded.\n\nExecuting this quick deploy command takes less time than a standard deploy because it skips running Apex tests. These tests were previously run as part of the validation. Validating first and then running a quick deploy is useful if the deployment to your production org take several hours and you don’t want to risk a failed deploy.\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.","strict":true,"pluginName":"@salesforce/plugin-deploy-retrieve","pluginAlias":"@salesforce/plugin-deploy-retrieve","pluginType":"core","state":"beta","aliases":[],"examples":["Run a quick deploy to your default org using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 0Af0x000017yLUFCA2","Asynchronously run a quick deploy of the most recently validated deployment to an org with alias \"my-prod-org\":\n<%= config.bin %> <%= command.id %> --async --use-most-recent --target-org my-prod-org"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"async":{"name":"async","type":"boolean","summary":"Run the command asynchronously.","description":"The command immediately returns the control of the terminal to you. This way, you can continue to use the CLI. To resume watching the deploy, run \"sf deploy metadata resume\". To check the status of the deploy, run \"sf deploy metadata report\".","allowNo":false,"exclusive":["wait"]},"concise":{"name":"concise","type":"boolean","summary":"Show concise output of the deploy result.","allowNo":false,"exclusive":["verbose"]},"job-id":{"name":"job-id","type":"option","char":"i","summary":"Job ID of the deployment you want to quick deploy.","description":"The job ID is valid for 10 days from when you started the validation.","multiple":false},"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},"use-most-recent":{"name":"use-most-recent","type":"boolean","char":"r","summary":"Use the job ID of the most recently validated deployment.","description":"For performance reasons, this flag uses only job IDs that were validated in the past 3 days or less. If your most recent deployment validation was more than 3 days ago, this flag won't find a job ID.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","summary":"Show verbose output of the deploy result.","allowNo":false,"exclusive":["concise"]},"wait":{"name":"wait","type":"option","char":"w","summary":"Number of minutes to wait for the 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. To resume watching the deploy, run \"sf deploy metadata resume\". To check the status of the deploy, run \"sf deploy metadata report\".","helpValue":"<minutes>","multiple":false,"exclusive":["async"],"default":{"quantity":33,"unit":0}}},"args":[],"requiresProject":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}},"errorCodes":{"header":"ERROR CODES","body":[{"name":"Succeeded (0)","description":"The deploy succeeded."},{"name":"Canceled (1)","description":"The deploy was canceled."},{"name":"Failed (1)","description":"The deploy failed."},{"name":"SucceededPartial (68)","description":"The deploy partially succeeded."},{"name":"InProgress (69)","description":"The deploy is in progress."},{"name":"Pending (69)","description":"The deploy is pending."},{"name":"Canceling (69)","description":"The deploy is being canceled."}]},"hasDynamicHelp":true},"deploy:metadata:report":{"id":"deploy:metadata:report","summary":"Check the status of a deploy operation.","description":"Deploy operations include standard deploys, quick deploys, deploy validations, and deploy cancellations.\n\nRun this command by either passing it a job ID or specifying the --use-most-recent flag to use the job ID of the most recent deploy operation.","strict":true,"pluginName":"@salesforce/plugin-deploy-retrieve","pluginAlias":"@salesforce/plugin-deploy-retrieve","pluginType":"core","state":"beta","aliases":[],"examples":["Check the status using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 0Af0x000017yLUFCA2","Check the status of the most recent deploy operation:\n<%= config.bin %> <%= command.id %> --use-most-recent"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"job-id":{"name":"job-id","type":"option","char":"i","summary":"Job ID of the deploy operation you want to check the status of.","description":"These commands return a job ID if they time out or you specified the --async flag:\n\n- sf deploy metadata\n- sf deploy metadata validate\n- sf deploy metadata quick\n- sf deploy metadata cancel\n\nThe job ID is valid for 10 days from when you started the deploy operation.","multiple":false},"use-most-recent":{"name":"use-most-recent","type":"boolean","char":"r","summary":"Use the job ID of the most recent deploy operation.","description":"For performance reasons, this flag uses job IDs for deploy operations that started only in the past 3 days or less. If your most recent operation was more than 3 days ago, this flag won't find a job ID.","allowNo":false}},"args":[],"requiresProject":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}}},"deploy:metadata:resume":{"id":"deploy:metadata:resume","summary":"Resume watching a deploy operation.","description":"Use this command to resume watching a deploy operation if the original command times out or you specified the --async flag. Deploy operations include standard deploys, quick deploys, deploy validations, and deploy cancellations. This command doesn't resume the original operation itself, because the operation always continues after you've started it, regardless of whether you're watching it or not.\n\nRun this command by either passing it a job ID or specifying the --use-most-recent flag to use the job ID of the most recent deploy operation.","strict":true,"pluginName":"@salesforce/plugin-deploy-retrieve","pluginAlias":"@salesforce/plugin-deploy-retrieve","pluginType":"core","state":"beta","aliases":[],"examples":["Resume watching a deploy operation using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 0Af0x000017yLUFCA2","Resume watching the most recent deploy operation:\n<%= config.bin %> <%= command.id %> --use-most-recent"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"concise":{"name":"concise","type":"boolean","summary":"Show concise output of the deploy operation result.","allowNo":false,"exclusive":["verbose"]},"job-id":{"name":"job-id","type":"option","char":"i","summary":"Job ID of the deploy operation you want to resume.","description":"These commands return a job ID if they time out or you specified the --async flag:\n\n- sf deploy metadata\n- sf deploy metadata validate\n- sf deploy metadata quick\n- sf deploy metadata cancel\n\nThe job ID is valid for 10 days from when you started the deploy operation.","multiple":false},"use-most-recent":{"name":"use-most-recent","type":"boolean","char":"r","summary":"Use the job ID of the most recent deploy operation.","description":"For performance reasons, this flag uses job IDs for deploy operations that started only in the past 3 days or less. If your most recent operation was more than 3 days ago, this flag won't find a job ID.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","summary":"Show verbose output of the deploy operation result.","allowNo":false,"exclusive":["concise"]},"wait":{"name":"wait","type":"option","char":"w","summary":"Number of minutes to wait for the 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. To resume watching the deploy operation, run this command again. To check the status of the deploy operation, run \"sf deploy metadata report\".","helpValue":"<minutes>","multiple":false}},"args":[],"requiresProject":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}},"envVariablesSection":{"header":"ENVIRONMENT VARIABLES","body":[{"name":"SF_USE_PROGRESS_BAR","description":"Set to false to disable the progress bar when running the metadata deploy command."}]},"errorCodes":{"header":"ERROR CODES","body":[{"name":"Succeeded (0)","description":"The deploy succeeded."},{"name":"Canceled (1)","description":"The deploy was canceled."},{"name":"Failed (1)","description":"The deploy failed."},{"name":"SucceededPartial (68)","description":"The deploy partially succeeded."},{"name":"InProgress (69)","description":"The deploy is in progress."},{"name":"Pending (69)","description":"The deploy is pending."},{"name":"Canceling (69)","description":"The deploy is being canceled."}]}},"deploy:metadata:validate":{"id":"deploy:metadata:validate","summary":"Validate a metadata deployment without actually executing it.","description":"Use this command to verify whether a deployment will succeed without actually deploying the metadata to your org. This command is similar to \"sf deploy metadata\", except you're required to run Apex tests, and the command returns a job ID rather than executing the deployment. If the validation succeeds, then you pass this job ID to the \"sf deploy metadata quick\" command to actually deploy the metadata. This quick deploy takes less time because it skips running Apex tests. The job ID is valid for 10 days from when you started the validation. Validating first is useful if the deployment to your production org take several hours and you don’t want to risk a failed deploy.\n\nYou must run this command from within a project.\n\nThis command doesn't support source-tracking. When you quick deploy with the resulting job ID, the source you deploy overwrites the corresponding metadata in your org.\n\nTo validate the deployment of 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","state":"beta","aliases":[],"examples":["NOTE: These examples focus on validating large deployments. See the help for \"sf deploy metadata\" for examples of deploying smaller sets of metadata which you can also use to validate.","Validate the deployment of all source files in a directory to the default org:\n<%= config.bin %> <%= command.id %> --source-dir path/to/source","Asynchronously validate the deployment and run all tests in the org with alias \"my-prod-org\"; command immediately returns the job ID:\n<%= config.bin %> <%= command.id %> --source-dir path/to/source --async --test-level RunAllTestsInOrg --target-org my-prod-org","Validate the deployment of all components listed in a manifest:\n<%= config.bin %> <%= command.id %> --manifest path/to/package.xml"],"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 validation.","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},"async":{"name":"async","type":"boolean","summary":"Run the command asynchronously.","description":"The command immediately returns the job ID and control of the terminal to you. This way, you can continue to use the CLI. To resume watching the validation, run \"sf deploy metadata resume\". To check the status of the validation, run \"sf deploy metadata report\".","allowNo":false},"concise":{"name":"concise","type":"boolean","summary":"Show concise output of the validation result.","allowNo":false,"exclusive":["verbose"]},"manifest":{"name":"manifest","type":"option","char":"x","summary":"Full file path for manifest (package.xml) of components to validate for deployment.","description":"All child components are included. If you specify this flag, don’t specify --metadata or --source-dir.","multiple":false},"metadata":{"name":"metadata","type":"option","char":"m","summary":"Metadata component names to validate for deployment.","multiple":true},"source-dir":{"name":"source-dir","type":"option","char":"d","summary":"Path to the local source files to validate for deployment.","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},"metadata-dir":{"name":"metadata-dir","type":"option","summary":"Root of directory or zip file of metadata formatted files to deploy.","multiple":false},"single-package":{"name":"single-package","type":"boolean","summary":"Indicates that the metadata zip file points to a directory structure for a single package.","allowNo":false,"dependsOn":["metadata-dir"]},"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},"tests":{"name":"tests","type":"option","char":"t","summary":"Apex tests to run when --test-level is RunSpecifiedTests.","multiple":true},"test-level":{"name":"test-level","type":"option","char":"l","summary":"Deployment Apex testing level.","description":"Valid values are:\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\nIf 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":["RunAllTestsInOrg","RunLocalTests","RunSpecifiedTests"],"default":"RunLocalTests"},"verbose":{"name":"verbose","type":"boolean","summary":"Show verbose output of the validation result.","allowNo":false,"exclusive":["concise"]},"wait":{"name":"wait","type":"option","char":"w","summary":"Number of minutes to wait for the 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 and returns the job ID. To resume watching the validation, run \"sf deploy metadata resume\". To check the status of the validation, run \"sf deploy metadata report\".","helpValue":"<minutes>","multiple":false,"default":{"quantity":33,"unit":0}}},"args":[],"requiresProject":true,"_globalFlags":{"json":{"description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false,"type":"boolean"}},"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":"org-api-version","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":"SF_USE_PROGRESS_BAR","description":"Set to false to disable the progress bar when running the metadata deploy command."}]},"errorCodes":{"header":"ERROR CODES","body":[{"name":"Succeeded (0)","description":"The deploy succeeded."},{"name":"Canceled (1)","description":"The deploy was canceled."},{"name":"Failed (1)","description":"The deploy failed."},{"name":"SucceededPartial (68)","description":"The deploy partially succeeded."},{"name":"InProgress (69)","description":"The deploy is in progress."},{"name":"Pending (69)","description":"The deploy is pending."},{"name":"Canceling (69)","description":"The deploy is being canceled."}]},"hasDynamicHelp":true}}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-deploy-retrieve",
|
|
3
3
|
"description": "deploy and retrieve commands for sf",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.3",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"@salesforce/core": "^3.15.5",
|
|
10
10
|
"@salesforce/kit": "^1.5.41",
|
|
11
11
|
"@salesforce/sf-plugins-core": "^1.12.3",
|
|
12
|
-
"@salesforce/source-deploy-retrieve": "^5.
|
|
12
|
+
"@salesforce/source-deploy-retrieve": "^5.13.1",
|
|
13
13
|
"chalk": "^4.1.2",
|
|
14
14
|
"fs-extra": "^10.0.1",
|
|
15
15
|
"shelljs": "^0.8.5",
|
|
@@ -28,10 +28,12 @@
|
|
|
28
28
|
"@salesforce/prettier-config": "^0.0.2",
|
|
29
29
|
"@salesforce/source-testkit": "^0.0.18",
|
|
30
30
|
"@salesforce/ts-sinon": "1.3.21",
|
|
31
|
+
"@types/archiver": "^5.3.1",
|
|
31
32
|
"@types/fs-extra": "^9.0.13",
|
|
32
33
|
"@types/shelljs": "^0.8.11",
|
|
33
34
|
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
34
35
|
"@typescript-eslint/parser": "^4.33.0",
|
|
36
|
+
"archiver": "^5.3.1",
|
|
35
37
|
"chai": "^4.3.6",
|
|
36
38
|
"cross-env": "^7.0.3",
|
|
37
39
|
"cz-conventional-changelog": "^3.3.0",
|
|
@@ -138,6 +140,7 @@
|
|
|
138
140
|
"test:json-schema": "./bin/dev schema:compare",
|
|
139
141
|
"test:nuts": "ts-node ./test/nuts/generateNuts.ts && nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel --retries 0",
|
|
140
142
|
"test:nuts:deploy:metadata:manifest": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.manifest ts-node ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 600000 --parallel --retries 0",
|
|
143
|
+
"test:nuts:deploy:metadata:metadata-dir": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.metadata-dir ts-node ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 600000 --parallel --retries 0",
|
|
141
144
|
"test:nuts:deploy:metadata:metadata": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.metadata ts-node ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 600000 --parallel --retries 0",
|
|
142
145
|
"test:nuts:deploy:metadata:source-dir": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.source-dir ts-node ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 600000 --parallel --retries 0",
|
|
143
146
|
"test:nuts:deploy:metadata:test-level": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.test-level ts-node ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 600000 --parallel --retries 0",
|
|
@@ -149,7 +152,7 @@
|
|
|
149
152
|
},
|
|
150
153
|
"main": "lib/index.js",
|
|
151
154
|
"sfdx": {
|
|
152
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/1.4.
|
|
153
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/1.4.
|
|
155
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/1.4.3.crt",
|
|
156
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/1.4.3.sig"
|
|
154
157
|
}
|
|
155
158
|
}
|