@salesforce/plugin-deploy-retrieve 1.20.3 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +69 -67
- package/lib/commands/deploy.d.ts +1 -1
- package/lib/commands/deploy.js +48 -51
- package/lib/commands/deploy.js.map +1 -1
- package/lib/commands/project/convert/mdapi.d.ts +8 -8
- package/lib/commands/project/convert/mdapi.js +63 -63
- package/lib/commands/project/convert/mdapi.js.map +1 -1
- package/lib/commands/project/convert/source.d.ts +16 -40
- package/lib/commands/project/convert/source.js +71 -72
- package/lib/commands/project/convert/source.js.map +1 -1
- package/lib/commands/project/delete/source.d.ts +9 -61
- package/lib/commands/project/delete/source.js +182 -180
- package/lib/commands/project/delete/source.js.map +1 -1
- package/lib/commands/project/delete/tracking.d.ts +4 -4
- package/lib/commands/project/delete/tracking.js +27 -29
- package/lib/commands/project/delete/tracking.js.map +1 -1
- package/lib/commands/project/deploy/cancel.d.ts +5 -5
- package/lib/commands/project/deploy/cancel.js +58 -59
- package/lib/commands/project/deploy/cancel.js.map +1 -1
- package/lib/commands/project/deploy/preview.d.ts +6 -6
- package/lib/commands/project/deploy/preview.js +57 -58
- package/lib/commands/project/deploy/preview.js.map +1 -1
- package/lib/commands/project/deploy/quick.d.ts +9 -9
- package/lib/commands/project/deploy/quick.js +85 -86
- package/lib/commands/project/deploy/quick.js.map +1 -1
- package/lib/commands/project/deploy/report.d.ts +8 -60
- package/lib/commands/project/deploy/report.js +72 -73
- package/lib/commands/project/deploy/report.js.map +1 -1
- package/lib/commands/project/deploy/resume.d.ts +9 -61
- package/lib/commands/project/deploy/resume.js +82 -83
- package/lib/commands/project/deploy/resume.js.map +1 -1
- package/lib/commands/project/deploy/start.d.ts +24 -128
- package/lib/commands/project/deploy/start.js +168 -169
- package/lib/commands/project/deploy/start.js.map +1 -1
- package/lib/commands/project/deploy/validate.d.ts +21 -125
- package/lib/commands/project/deploy/validate.js +149 -149
- package/lib/commands/project/deploy/validate.js.map +1 -1
- package/lib/commands/project/generate/manifest.d.ts +9 -9
- package/lib/commands/project/generate/manifest.js +73 -78
- package/lib/commands/project/generate/manifest.js.map +1 -1
- package/lib/commands/project/list/ignored.d.ts +1 -1
- package/lib/commands/project/list/ignored.js +27 -29
- package/lib/commands/project/list/ignored.js.map +1 -1
- package/lib/commands/project/reset/tracking.d.ts +5 -5
- package/lib/commands/project/reset/tracking.js +33 -35
- package/lib/commands/project/reset/tracking.js.map +1 -1
- package/lib/commands/project/retrieve/preview.d.ts +3 -3
- package/lib/commands/project/retrieve/preview.js +35 -36
- package/lib/commands/project/retrieve/preview.js.map +1 -1
- package/lib/commands/project/retrieve/start.d.ts +11 -11
- package/lib/commands/project/retrieve/start.js +148 -149
- package/lib/commands/project/retrieve/start.js.map +1 -1
- package/lib/configMeta.js +8 -9
- package/lib/configMeta.js.map +1 -1
- package/lib/formatters/asyncDeployCancelResultFormatter.d.ts +1 -1
- package/lib/formatters/asyncDeployCancelResultFormatter.js +12 -12
- package/lib/formatters/asyncDeployCancelResultFormatter.js.map +1 -1
- package/lib/formatters/asyncDeployResultFormatter.d.ts +1 -1
- package/lib/formatters/asyncDeployResultFormatter.js +14 -14
- package/lib/formatters/asyncDeployResultFormatter.js.map +1 -1
- package/lib/formatters/deleteResultFormatter.d.ts +2 -2
- package/lib/formatters/deleteResultFormatter.js +21 -23
- package/lib/formatters/deleteResultFormatter.js.map +1 -1
- package/lib/formatters/deployCancelResultFormatter.d.ts +1 -1
- package/lib/formatters/deployCancelResultFormatter.js +7 -10
- package/lib/formatters/deployCancelResultFormatter.js.map +1 -1
- package/lib/formatters/deployReportResultFormatter.d.ts +1 -1
- package/lib/formatters/deployReportResultFormatter.js +18 -22
- package/lib/formatters/deployReportResultFormatter.js.map +1 -1
- package/lib/formatters/deployResultFormatter.d.ts +2 -2
- package/lib/formatters/deployResultFormatter.js +53 -50
- package/lib/formatters/deployResultFormatter.js.map +1 -1
- package/lib/formatters/metadataConvertResultFormatter.d.ts +1 -1
- package/lib/formatters/metadataConvertResultFormatter.js +7 -9
- package/lib/formatters/metadataConvertResultFormatter.js.map +1 -1
- package/lib/formatters/metadataRetrieveResultFormatter.d.ts +1 -1
- package/lib/formatters/metadataRetrieveResultFormatter.js +17 -16
- package/lib/formatters/metadataRetrieveResultFormatter.js.map +1 -1
- package/lib/formatters/retrieveResultFormatter.d.ts +1 -1
- package/lib/formatters/retrieveResultFormatter.js +17 -17
- package/lib/formatters/retrieveResultFormatter.js.map +1 -1
- package/lib/formatters/sourceConvertResultFormatter.d.ts +1 -1
- package/lib/formatters/sourceConvertResultFormatter.js +12 -14
- package/lib/formatters/sourceConvertResultFormatter.js.map +1 -1
- package/lib/formatters/testResultsFormatter.d.ts +1 -1
- package/lib/formatters/testResultsFormatter.js +38 -38
- package/lib/formatters/testResultsFormatter.js.map +1 -1
- package/lib/hooks/deploy.d.ts +1 -1
- package/lib/hooks/deploy.js +5 -7
- package/lib/hooks/deploy.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/lib/utils/conflicts.js +3 -7
- package/lib/utils/conflicts.js.map +1 -1
- package/lib/utils/coverage.js +20 -30
- package/lib/utils/coverage.js.map +1 -1
- package/lib/utils/deploy.d.ts +1 -1
- package/lib/utils/deploy.js +55 -64
- package/lib/utils/deploy.js.map +1 -1
- package/lib/utils/deployCache.d.ts +1 -1
- package/lib/utils/deployCache.js +12 -16
- package/lib/utils/deployCache.js.map +1 -1
- package/lib/utils/errorCodes.js +15 -16
- package/lib/utils/errorCodes.js.map +1 -1
- package/lib/utils/flags.d.ts +25 -7
- package/lib/utils/flags.js +25 -28
- package/lib/utils/flags.js.map +1 -1
- package/lib/utils/manifestCache.js +9 -14
- package/lib/utils/manifestCache.js.map +1 -1
- package/lib/utils/metadataDeployer.d.ts +1 -1
- package/lib/utils/metadataDeployer.js +40 -39
- package/lib/utils/metadataDeployer.js.map +1 -1
- package/lib/utils/output.js +13 -22
- package/lib/utils/output.js.map +1 -1
- package/lib/utils/previewOutput.js +46 -52
- package/lib/utils/previewOutput.js.map +1 -1
- package/lib/utils/progressBar.js +19 -21
- package/lib/utils/progressBar.js.map +1 -1
- package/lib/utils/project.js +7 -13
- package/lib/utils/project.js.map +1 -1
- package/lib/utils/promiseQueue.js +3 -7
- package/lib/utils/promiseQueue.js.map +1 -1
- package/lib/utils/types.js +12 -19
- package/lib/utils/types.js.map +1 -1
- package/oclif.lock +8667 -0
- package/oclif.manifest.json +1432 -941
- package/package.json +37 -35
- package/schemas/project-retrieve-start.json +14 -11
package/lib/utils/coverage.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCoverageNumbers = exports.getCoveragePct = exports.coverageOutput = exports.transformCoverageToApexCoverage = exports.getCoverageFormattersOptions = exports.generateCoveredLines = exports.mapTestResults = void 0;
|
|
4
1
|
/*
|
|
5
2
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
6
3
|
* All rights reserved.
|
|
7
4
|
* Licensed under the BSD 3-Clause license.
|
|
8
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
6
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const mapTestResults = (testResults) => testResults.map((testResult) => ({
|
|
7
|
+
import * as path from 'node:path';
|
|
8
|
+
import { DefaultReportOptions, } from '@salesforce/apex-node';
|
|
9
|
+
import { ensureArray } from '@salesforce/kit';
|
|
10
|
+
import { StandardColors } from '@salesforce/sf-plugins-core';
|
|
11
|
+
export const mapTestResults = (testResults) => testResults.map((testResult) => ({
|
|
15
12
|
apexClass: { fullName: testResult.name, id: testResult.id, name: testResult.name, namespacePrefix: '' },
|
|
16
13
|
apexLogId: '',
|
|
17
14
|
asyncApexJobId: '',
|
|
@@ -26,20 +23,18 @@ const mapTestResults = (testResults) => testResults.map((testResult) => ({
|
|
|
26
23
|
stackTrace: 'stackTrace' in testResult ? testResult.stackTrace : null,
|
|
27
24
|
testTimestamp: '',
|
|
28
25
|
}));
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const uncoveredLines = (0, kit_1.ensureArray)(cov.locationsNotCovered).map((location) => parseInt(location.line, 10));
|
|
26
|
+
export const generateCoveredLines = (cov) => {
|
|
27
|
+
const [lineCount, uncoveredLineCount] = getCoverageNumbers(cov);
|
|
28
|
+
const uncoveredLines = ensureArray(cov.locationsNotCovered).map((location) => parseInt(location.line, 10));
|
|
33
29
|
const minLineNumber = uncoveredLines.length ? Math.min(...uncoveredLines) : 1;
|
|
34
30
|
const lines = [...Array(lineCount + uncoveredLineCount).keys()].map((i) => i + minLineNumber);
|
|
35
31
|
const coveredLines = lines.filter((line) => !uncoveredLines.includes(line));
|
|
36
32
|
return [uncoveredLines, coveredLines];
|
|
37
33
|
};
|
|
38
|
-
|
|
39
|
-
const getCoverageFormattersOptions = (formatters = []) => {
|
|
34
|
+
export const getCoverageFormattersOptions = (formatters = []) => {
|
|
40
35
|
const reportFormats = formatters;
|
|
41
36
|
const reportOptions = Object.fromEntries(reportFormats.map((format) => {
|
|
42
|
-
const formatDefaults =
|
|
37
|
+
const formatDefaults = DefaultReportOptions[format];
|
|
43
38
|
return [
|
|
44
39
|
format,
|
|
45
40
|
{
|
|
@@ -58,11 +53,10 @@ const getCoverageFormattersOptions = (formatters = []) => {
|
|
|
58
53
|
reportOptions,
|
|
59
54
|
};
|
|
60
55
|
};
|
|
61
|
-
|
|
62
|
-
const transformCoverageToApexCoverage = (mdCoverage) => {
|
|
56
|
+
export const transformCoverageToApexCoverage = (mdCoverage) => {
|
|
63
57
|
const apexCoverage = mdCoverage.map((cov) => {
|
|
64
|
-
const [NumLinesCovered, NumLinesUncovered] =
|
|
65
|
-
const [uncoveredLines, coveredLines] =
|
|
58
|
+
const [NumLinesCovered, NumLinesUncovered] = getCoverageNumbers(cov);
|
|
59
|
+
const [uncoveredLines, coveredLines] = generateCoveredLines(cov);
|
|
66
60
|
return {
|
|
67
61
|
ApexClassOrTrigger: {
|
|
68
62
|
Id: cov.id,
|
|
@@ -78,29 +72,25 @@ const transformCoverageToApexCoverage = (mdCoverage) => {
|
|
|
78
72
|
});
|
|
79
73
|
return { done: true, totalSize: apexCoverage.length, records: apexCoverage };
|
|
80
74
|
};
|
|
81
|
-
|
|
82
|
-
const coverageOutput = (cov) => ({
|
|
75
|
+
export const coverageOutput = (cov) => ({
|
|
83
76
|
name: cov.name,
|
|
84
|
-
coveragePercent: formatPercent(
|
|
77
|
+
coveragePercent: formatPercent(getCoveragePct(cov)),
|
|
85
78
|
linesNotCovered: cov.locationsNotCovered
|
|
86
|
-
?
|
|
79
|
+
? ensureArray(cov.locationsNotCovered)
|
|
87
80
|
.map((location) => location.line)
|
|
88
81
|
.join(',')
|
|
89
82
|
: '',
|
|
90
83
|
});
|
|
91
|
-
|
|
92
|
-
const color = (percent) => percent >= 90 ? sf_plugins_core_1.StandardColors.success : percent >= 75 ? sf_plugins_core_1.StandardColors.warning : sf_plugins_core_1.StandardColors.error;
|
|
84
|
+
const color = (percent) => percent >= 90 ? StandardColors.success : percent >= 75 ? StandardColors.warning : StandardColors.error;
|
|
93
85
|
const formatPercent = (percent) => color(percent)(`${percent}%`);
|
|
94
|
-
const getCoveragePct = (cov) => {
|
|
95
|
-
const [lineCount, uncoveredLineCount] =
|
|
86
|
+
export const getCoveragePct = (cov) => {
|
|
87
|
+
const [lineCount, uncoveredLineCount] = getCoverageNumbers(cov);
|
|
96
88
|
const coverageDecimal = parseFloat(((lineCount - uncoveredLineCount) / lineCount).toFixed(2));
|
|
97
89
|
return lineCount > 0 ? coverageDecimal * 100 : 100;
|
|
98
90
|
};
|
|
99
|
-
exports.getCoveragePct = getCoveragePct;
|
|
100
91
|
/** returns the number of total line for which coverage should apply, and the total uncovered line */
|
|
101
|
-
const getCoverageNumbers = (cov) => [
|
|
92
|
+
export const getCoverageNumbers = (cov) => [
|
|
102
93
|
parseInt(cov.numLocations, 10),
|
|
103
94
|
parseInt(cov.numLocationsNotCovered, 10),
|
|
104
95
|
];
|
|
105
|
-
exports.getCoverageNumbers = getCoverageNumbers;
|
|
106
96
|
//# sourceMappingURL=coverage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coverage.js","sourceRoot":"","sources":["../../src/utils/coverage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"coverage.js","sourceRoot":"","sources":["../../src/utils/coverage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAKL,oBAAoB,GAGrB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,MAAM,CAAC,MAAM,cAAc,GAAG,CAAiC,WAAgB,EAAwB,EAAE,CACvG,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC/B,SAAS,EAAE,EAAE,QAAQ,EAAE,UAAU,CAAC,IAAI,EAAE,EAAE,EAAE,UAAU,CAAC,EAAE,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE;IACvG,SAAS,EAAE,EAAE;IACb,cAAc,EAAE,EAAE;IAClB,QAAQ,EAAE,UAAU,CAAC,IAAI;IACzB,EAAE,EAAE,UAAU,CAAC,EAAE;IACjB,GAAG,CAAC,SAAS,IAAI,UAAU,IAAI,UAAU,CAAC,OAAO;QAC/C,CAAC,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE,OAAO,yCAA4B,EAAE;QACtE,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,yCAA4B,EAAE,C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,CAAC,CAAC,CAAC,GAAG,CAAC;AACrD,CAAC,CAAC;AAEF,sGAAsG;AACtG,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,GAAiB,EAAmD,EAAE,CAAC;IACxG,QAAQ,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC;IAC9B,QAAQ,CAAC,GAAG,CAAC,sBAAsB,EAAE,EAAE,CAAC;CACzC,CAAC"}
|
package/lib/utils/deploy.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Duration } from '@salesforce/kit';
|
|
|
3
3
|
import { Nullable } from '@salesforce/ts-types';
|
|
4
4
|
import { ComponentSet, DeployResult, MetadataApiDeploy, RequestStatus } from '@salesforce/source-deploy-retrieve';
|
|
5
5
|
import { SourceTracking } from '@salesforce/source-tracking';
|
|
6
|
-
import { API, PathInfo, TestLevel } from './types';
|
|
6
|
+
import { API, PathInfo, TestLevel } from './types.js';
|
|
7
7
|
export declare const cacheMessages: Messages<string>;
|
|
8
8
|
export type DeployOptions = {
|
|
9
9
|
api: API;
|
package/lib/utils/deploy.js
CHANGED
|
@@ -1,42 +1,39 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright (c) 2022, salesforce.com, inc.
|
|
4
3
|
* All rights reserved.
|
|
5
4
|
* Licensed under the BSD 3-Clause license.
|
|
6
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
6
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const deployMessages =
|
|
23
|
-
function validateTests(testLevel, tests) {
|
|
24
|
-
return !(testLevel ===
|
|
7
|
+
import { dirname } from 'node:path';
|
|
8
|
+
import { fileURLToPath } from 'node:url';
|
|
9
|
+
import { ConfigAggregator, Messages, Org, SfError, SfProject } from '@salesforce/core';
|
|
10
|
+
import { Duration } from '@salesforce/kit';
|
|
11
|
+
import { ComponentSet, ComponentSetBuilder, MetadataApiDeploy, RequestStatus, } from '@salesforce/source-deploy-retrieve';
|
|
12
|
+
import { SourceTracking } from '@salesforce/source-tracking';
|
|
13
|
+
import ConfigMeta, { ConfigVars } from '../configMeta.js';
|
|
14
|
+
import { getPackageDirs, getSourceApiVersion } from './project.js';
|
|
15
|
+
import { API, TestLevel } from './types.js';
|
|
16
|
+
import { DEPLOY_STATUS_CODES } from './errorCodes.js';
|
|
17
|
+
import { DeployCache } from './deployCache.js';
|
|
18
|
+
import { writeManifest } from './manifestCache.js';
|
|
19
|
+
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
|
|
20
|
+
export const cacheMessages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'cache');
|
|
21
|
+
const deployMessages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'deploy.metadata');
|
|
22
|
+
export function validateTests(testLevel, tests) {
|
|
23
|
+
return !(testLevel === TestLevel.RunSpecifiedTests && (tests ?? []).length === 0);
|
|
25
24
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
return restDeployConfig === 'true' ? types_1.API.REST : types_1.API.SOAP;
|
|
25
|
+
export async function resolveApi(existingConfigAggregator) {
|
|
26
|
+
const agg = existingConfigAggregator ?? (await ConfigAggregator.create({ customConfigMeta: ConfigMeta }));
|
|
27
|
+
const restDeployConfig = agg.getInfo(ConfigVars.ORG_METADATA_REST_DEPLOY)?.value;
|
|
28
|
+
return restDeployConfig === 'true' ? API.REST : API.SOAP;
|
|
31
29
|
}
|
|
32
|
-
|
|
33
|
-
async function buildComponentSet(opts, stl) {
|
|
30
|
+
export async function buildComponentSet(opts, stl) {
|
|
34
31
|
// if you specify nothing, you'll get the changes, like sfdx push, as long as there's an stl
|
|
35
32
|
if (!opts['source-dir'] && !opts.manifest && !opts.metadata && stl) {
|
|
36
33
|
/** localChangesAsComponentSet returned an array to support multiple sequential deploys.
|
|
37
34
|
* `sf` chooses not to support this so we force one ComponentSet
|
|
38
35
|
*/
|
|
39
|
-
const cs = (await stl.localChangesAsComponentSet(false))
|
|
36
|
+
const cs = (await stl.localChangesAsComponentSet(false))[0] ?? new ComponentSet();
|
|
40
37
|
// stl produces a cs with api version already set. command might have specified a version.
|
|
41
38
|
if (opts['api-version']) {
|
|
42
39
|
cs.apiVersion = opts['api-version'];
|
|
@@ -44,38 +41,37 @@ async function buildComponentSet(opts, stl) {
|
|
|
44
41
|
}
|
|
45
42
|
return cs;
|
|
46
43
|
}
|
|
47
|
-
return
|
|
44
|
+
return ComponentSetBuilder.build({
|
|
48
45
|
apiversion: opts['api-version'],
|
|
49
|
-
sourceapiversion: await
|
|
46
|
+
sourceapiversion: await getSourceApiVersion(),
|
|
50
47
|
sourcepath: opts['source-dir'],
|
|
51
48
|
...(opts.manifest
|
|
52
49
|
? {
|
|
53
50
|
manifest: {
|
|
54
51
|
manifestPath: opts.manifest,
|
|
55
|
-
directoryPaths: await
|
|
52
|
+
directoryPaths: await getPackageDirs(),
|
|
56
53
|
destructiveChangesPre: opts['pre-destructive-changes'],
|
|
57
54
|
destructiveChangesPost: opts['post-destructive-changes'],
|
|
58
55
|
},
|
|
59
56
|
}
|
|
60
57
|
: {}),
|
|
61
|
-
...(opts.metadata ? { metadata: { metadataEntries: opts.metadata, directoryPaths: await
|
|
58
|
+
...(opts.metadata ? { metadata: { metadataEntries: opts.metadata, directoryPaths: await getPackageDirs() } } : {}),
|
|
62
59
|
});
|
|
63
60
|
}
|
|
64
|
-
|
|
65
|
-
async function executeDeploy(opts, bin = 'sf', project, id, throwOnEmpty = false) {
|
|
61
|
+
export async function executeDeploy(opts, bin = 'sf', project, id, throwOnEmpty = false) {
|
|
66
62
|
const apiOptions = buildApiOptions(opts);
|
|
67
63
|
let deploy;
|
|
68
64
|
let componentSet;
|
|
69
|
-
const org = await
|
|
65
|
+
const org = await Org.create({ aliasOrUsername: opts['target-org'] });
|
|
70
66
|
// for mdapi deploys, use the passed in api-version.
|
|
71
67
|
const usernameOrConnection = org.getConnection(opts['metadata-dir'] ? opts['api-version'] : undefined);
|
|
72
68
|
if (opts['metadata-dir']) {
|
|
73
69
|
if (id) {
|
|
74
|
-
deploy = new
|
|
70
|
+
deploy = new MetadataApiDeploy({ id, usernameOrConnection });
|
|
75
71
|
}
|
|
76
72
|
else {
|
|
77
73
|
const key = opts['metadata-dir'].type === 'directory' ? 'mdapiPath' : 'zipPath';
|
|
78
|
-
deploy = new
|
|
74
|
+
deploy = new MetadataApiDeploy({
|
|
79
75
|
[key]: opts['metadata-dir'].path,
|
|
80
76
|
usernameOrConnection,
|
|
81
77
|
apiOptions: { ...apiOptions, singlePackage: opts['single-package'] ?? false },
|
|
@@ -85,10 +81,10 @@ async function executeDeploy(opts, bin = 'sf', project, id, throwOnEmpty = false
|
|
|
85
81
|
}
|
|
86
82
|
else {
|
|
87
83
|
// mdapi format deploys don't require a project, but at this point we need one
|
|
88
|
-
project ??= await
|
|
84
|
+
project ??= await SfProject.resolve();
|
|
89
85
|
// instantiate source tracking
|
|
90
86
|
// stl will decide, based on the org's properties, what needs to be done
|
|
91
|
-
const stl = await
|
|
87
|
+
const stl = await SourceTracking.create({
|
|
92
88
|
org,
|
|
93
89
|
project,
|
|
94
90
|
subscribeSDREvents: true,
|
|
@@ -98,7 +94,7 @@ async function executeDeploy(opts, bin = 'sf', project, id, throwOnEmpty = false
|
|
|
98
94
|
if (componentSet.size === 0) {
|
|
99
95
|
if (Boolean(opts['source-dir']) ?? Boolean(opts.manifest) ?? Boolean(opts.metadata) ?? throwOnEmpty) {
|
|
100
96
|
// the user specified something to deploy, but there isn't anything
|
|
101
|
-
throw new
|
|
97
|
+
throw new SfError(deployMessages.getMessage('error.nothingToDeploy'), 'NothingToDeploy', deployMessages.getMessages('error.nothingToDeploy.Actions', [bin]));
|
|
102
98
|
}
|
|
103
99
|
else {
|
|
104
100
|
// this is a push-like "deploy changes" but there aren't any.
|
|
@@ -107,62 +103,57 @@ async function executeDeploy(opts, bin = 'sf', project, id, throwOnEmpty = false
|
|
|
107
103
|
}
|
|
108
104
|
}
|
|
109
105
|
deploy = id
|
|
110
|
-
? new
|
|
106
|
+
? new MetadataApiDeploy({ id, usernameOrConnection, components: componentSet })
|
|
111
107
|
: await componentSet.deploy({
|
|
112
108
|
usernameOrConnection,
|
|
113
109
|
apiOptions,
|
|
114
110
|
});
|
|
115
111
|
}
|
|
116
112
|
if (!deploy.id) {
|
|
117
|
-
throw new
|
|
113
|
+
throw new SfError('The deploy id is not available.');
|
|
118
114
|
}
|
|
119
115
|
// does not apply to mdapi deploys
|
|
120
|
-
const manifestPath = componentSet ? await
|
|
121
|
-
await
|
|
116
|
+
const manifestPath = componentSet ? await writeManifest(deploy.id, componentSet) : undefined;
|
|
117
|
+
await DeployCache.set(deploy.id, { ...opts, manifest: manifestPath });
|
|
122
118
|
return { deploy, componentSet };
|
|
123
119
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
const org = await core_1.Org.create({ aliasOrUsername: opts['target-org'] });
|
|
120
|
+
export async function cancelDeploy(opts, id) {
|
|
121
|
+
const org = await Org.create({ aliasOrUsername: opts['target-org'] });
|
|
127
122
|
const usernameOrConnection = org.getUsername() ?? org.getConnection();
|
|
128
|
-
const deploy = new
|
|
123
|
+
const deploy = new MetadataApiDeploy({ usernameOrConnection, id });
|
|
129
124
|
if (!deploy.id) {
|
|
130
|
-
throw new
|
|
125
|
+
throw new SfError('The deploy id is not available.');
|
|
131
126
|
}
|
|
132
|
-
await
|
|
127
|
+
await DeployCache.set(deploy.id, { ...opts });
|
|
133
128
|
await deploy.cancel();
|
|
134
129
|
return deploy.pollStatus({
|
|
135
|
-
frequency:
|
|
136
|
-
timeout: opts.wait ??
|
|
130
|
+
frequency: Duration.milliseconds(500),
|
|
131
|
+
timeout: opts.wait ?? Duration.minutes(33),
|
|
137
132
|
});
|
|
138
133
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
const org = await core_1.Org.create({ aliasOrUsername: opts['target-org'] });
|
|
134
|
+
export async function cancelDeployAsync(opts, id) {
|
|
135
|
+
const org = await Org.create({ aliasOrUsername: opts['target-org'] });
|
|
142
136
|
const usernameOrConnection = org.getUsername() ?? org.getConnection();
|
|
143
|
-
const deploy = new
|
|
137
|
+
const deploy = new MetadataApiDeploy({ usernameOrConnection, id });
|
|
144
138
|
await deploy.cancel();
|
|
145
139
|
if (!deploy.id) {
|
|
146
|
-
throw new
|
|
140
|
+
throw new SfError('The deploy id is not available.');
|
|
147
141
|
}
|
|
148
142
|
return { id: deploy.id };
|
|
149
143
|
}
|
|
150
|
-
|
|
151
|
-
function determineExitCode(result, async = false) {
|
|
144
|
+
export function determineExitCode(result, async = false) {
|
|
152
145
|
if (async) {
|
|
153
|
-
return result.response.status ===
|
|
146
|
+
return result.response.status === RequestStatus.Succeeded ? 0 : 1;
|
|
154
147
|
}
|
|
155
|
-
return
|
|
148
|
+
return DEPLOY_STATUS_CODES.get(result.response.status) ?? 1;
|
|
156
149
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
[source_deploy_retrieve_1.RequestStatus.Succeeded, source_deploy_retrieve_1.RequestStatus.Failed, source_deploy_retrieve_1.RequestStatus.SucceededPartial, source_deploy_retrieve_1.RequestStatus.Canceled].includes(status);
|
|
160
|
-
exports.isNotResumable = isNotResumable;
|
|
150
|
+
export const isNotResumable = (status) => status !== undefined &&
|
|
151
|
+
[RequestStatus.Succeeded, RequestStatus.Failed, RequestStatus.SucceededPartial, RequestStatus.Canceled].includes(status);
|
|
161
152
|
/** apply some defaults to the DeployOptions object */
|
|
162
153
|
const buildApiOptions = (opts) => ({
|
|
163
154
|
checkOnly: opts['dry-run'] ?? false,
|
|
164
155
|
ignoreWarnings: opts['ignore-warnings'] ?? false,
|
|
165
|
-
rest: opts.api ===
|
|
156
|
+
rest: opts.api === API['REST'],
|
|
166
157
|
rollbackOnError: !opts['ignore-errors'] || false,
|
|
167
158
|
...(opts.tests ? { runTests: opts.tests } : {}),
|
|
168
159
|
...(opts['test-level'] ? { testLevel: opts['test-level'] } : {}),
|
package/lib/utils/deploy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/utils/deploy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/utils/deploy.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EACL,YAAY,EACZ,mBAAmB,EAEnB,iBAAiB,EAEjB,aAAa,GACd,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,UAAU,EAAE,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,GAAG,EAAY,SAAS,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,QAAQ,CAAC,uBAAuB,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1E,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,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC9D,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAsB,EAAW,EAAE,CAChE,MAAM,KAAK,SAAS;IACpB,CAAC,aAAa,CAAC,SAAS,EAAE,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,gBAAgB,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAC9G,MAAM,CACP,CAAC;AAEJ,uDAAuD;AACvD,MAAM,eAAe,GAAG,CAAC,IAA4B,EAA0C,EAAE,CAAC,CAAC;IACjG,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,KAAK;IACnC,cAAc,EAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,KAAK;IAChD,IAAI,EAAE,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,MAAM,CAAC;IAC9B,eAAe,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,KAAK;IAChD,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/C,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAChE,aAAa,EAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,KAAK;CAChD,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TTLConfig } from '@salesforce/core';
|
|
2
2
|
import { JsonMap } from '@salesforce/ts-types';
|
|
3
|
-
import { DeployOptions, CachedOptions } from './deploy';
|
|
3
|
+
import { DeployOptions, CachedOptions } from './deploy.js';
|
|
4
4
|
export declare class DeployCache extends TTLConfig<TTLConfig.Options, CachedOptions> {
|
|
5
5
|
static getFileName(): string;
|
|
6
6
|
static getDefaultOptions(): TTLConfig.Options;
|
package/lib/utils/deployCache.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DeployCache = void 0;
|
|
4
1
|
/*
|
|
5
2
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
6
3
|
* All rights reserved.
|
|
7
4
|
* Licensed under the BSD 3-Clause license.
|
|
8
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
6
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class DeployCache extends
|
|
7
|
+
import { Global, TTLConfig } from '@salesforce/core';
|
|
8
|
+
import { Duration } from '@salesforce/kit';
|
|
9
|
+
import { cacheMessages } from './deploy.js';
|
|
10
|
+
import { maybeDestroyManifest } from './manifestCache.js';
|
|
11
|
+
export class DeployCache extends TTLConfig {
|
|
15
12
|
static getFileName() {
|
|
16
13
|
return 'deploy-cache.json';
|
|
17
14
|
}
|
|
@@ -20,8 +17,8 @@ class DeployCache extends core_1.TTLConfig {
|
|
|
20
17
|
isGlobal: true,
|
|
21
18
|
isState: true,
|
|
22
19
|
filename: DeployCache.getFileName(),
|
|
23
|
-
stateFolder:
|
|
24
|
-
ttl:
|
|
20
|
+
stateFolder: Global.SF_STATE_FOLDER,
|
|
21
|
+
ttl: Duration.days(3),
|
|
25
22
|
};
|
|
26
23
|
}
|
|
27
24
|
/**
|
|
@@ -40,7 +37,7 @@ class DeployCache extends core_1.TTLConfig {
|
|
|
40
37
|
static async unset(key) {
|
|
41
38
|
const cache = await DeployCache.create();
|
|
42
39
|
cache.unset(key);
|
|
43
|
-
await Promise.all([cache.write(),
|
|
40
|
+
await Promise.all([cache.write(), maybeDestroyManifest(key)]);
|
|
44
41
|
}
|
|
45
42
|
static async update(key, obj) {
|
|
46
43
|
const cache = await DeployCache.create();
|
|
@@ -50,10 +47,10 @@ class DeployCache extends core_1.TTLConfig {
|
|
|
50
47
|
resolveLatest(useMostRecent, key, throwOnNotFound = true) {
|
|
51
48
|
const keyFromLatest = useMostRecent ? this.getLatestKey() : key;
|
|
52
49
|
if (!keyFromLatest)
|
|
53
|
-
throw
|
|
50
|
+
throw cacheMessages.createError('error.NoRecentJobId');
|
|
54
51
|
const jobId = this.resolveLongId(keyFromLatest);
|
|
55
52
|
if (throwOnNotFound && !this.has(jobId)) {
|
|
56
|
-
throw
|
|
53
|
+
throw cacheMessages.createError('error.InvalidJobId', [jobId]);
|
|
57
54
|
}
|
|
58
55
|
return jobId;
|
|
59
56
|
}
|
|
@@ -66,15 +63,14 @@ class DeployCache extends core_1.TTLConfig {
|
|
|
66
63
|
if (match) {
|
|
67
64
|
return match;
|
|
68
65
|
}
|
|
69
|
-
throw
|
|
66
|
+
throw cacheMessages.createError('error.InvalidJobId', [jobId]);
|
|
70
67
|
}
|
|
71
68
|
else {
|
|
72
|
-
throw
|
|
69
|
+
throw cacheMessages.createError('error.InvalidJobId', [jobId]);
|
|
73
70
|
}
|
|
74
71
|
}
|
|
75
72
|
get(jobId) {
|
|
76
73
|
return super.get(this.resolveLongId(jobId));
|
|
77
74
|
}
|
|
78
75
|
}
|
|
79
|
-
exports.DeployCache = DeployCache;
|
|
80
76
|
//# sourceMappingURL=deployCache.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployCache.js","sourceRoot":"","sources":["../../src/utils/deployCache.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deployCache.js","sourceRoot":"","sources":["../../src/utils/deployCache.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAAgC,aAAa,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,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AAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9C,CAAC;CACF"}
|
package/lib/utils/errorCodes.js
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright (c) 2022, salesforce.com, inc.
|
|
4
3
|
* All rights reserved.
|
|
5
4
|
* Licensed under the BSD 3-Clause license.
|
|
6
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
6
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const messages =
|
|
14
|
-
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
19
|
-
[
|
|
20
|
-
[
|
|
21
|
-
[
|
|
7
|
+
import { dirname } from 'node:path';
|
|
8
|
+
import { fileURLToPath } from 'node:url';
|
|
9
|
+
import { Messages } from '@salesforce/core';
|
|
10
|
+
import { RequestStatus } from '@salesforce/source-deploy-retrieve';
|
|
11
|
+
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
|
|
12
|
+
const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'errorCodes');
|
|
13
|
+
export const DEPLOY_STATUS_CODES = new Map([
|
|
14
|
+
[RequestStatus.Succeeded, 0],
|
|
15
|
+
[RequestStatus.Canceled, 1],
|
|
16
|
+
[RequestStatus.Failed, 1],
|
|
17
|
+
[RequestStatus.SucceededPartial, 68],
|
|
18
|
+
[RequestStatus.InProgress, 69],
|
|
19
|
+
[RequestStatus.Pending, 69],
|
|
20
|
+
[RequestStatus.Canceling, 69],
|
|
22
21
|
]);
|
|
23
|
-
|
|
22
|
+
export const DEPLOY_STATUS_CODES_DESCRIPTIONS = Object.fromEntries(Array.from(DEPLOY_STATUS_CODES).map(([status, code]) => [
|
|
24
23
|
`${status} (${code})`,
|
|
25
24
|
messages.getMessage(`errorCode.deploy.${status}`),
|
|
26
25
|
]));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorCodes.js","sourceRoot":"","sources":["../../src/utils/errorCodes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"errorCodes.js","sourceRoot":"","sources":["../../src/utils/errorCodes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAEnE,QAAQ,CAAC,uBAAuB,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1E,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,oCAAoC,EAAE,YAAY,CAAC,CAAC;AAE3F,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAwB;IAChE,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC,CAAC;IAC5B,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3B,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC;IACzB,CAAC,aAAa,CAAC,gBAAgB,EAAE,EAAE,CAAC;IACpC,CAAC,aAAa,CAAC,UAAU,EAAE,EAAE,CAAC;IAC9B,CAAC,aAAa,CAAC,OAAO,EAAE,EAAE,CAAC;IAC3B,CAAC,aAAa,CAAC,SAAS,EAAE,EAAE,CAAC;CAC9B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gCAAgC,GAAG,MAAM,CAAC,WAAW,CAChE,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;IACtD,GAAG,MAAM,KAAK,IAAI,GAAG;IACrB,QAAQ,CAAC,UAAU,CAAC,oBAAoB,MAAM,EAAE,CAAC;CAClD,CAAC,CACH,CAAC"}
|
package/lib/utils/flags.d.ts
CHANGED
|
@@ -1,22 +1,40 @@
|
|
|
1
|
-
import { PathInfo, TestLevel } from './types';
|
|
1
|
+
import { PathInfo, TestLevel } from './types.js';
|
|
2
2
|
export declare const DEFAULT_ZIP_FILE_NAME = "unpackaged.zip";
|
|
3
3
|
/**
|
|
4
4
|
* Flag value is a directory path that may or may not exist. If it doesn't exist, then it will be created.
|
|
5
5
|
*/
|
|
6
|
-
export declare const ensuredDirFlag: import("@oclif/core/lib/interfaces/parser").FlagDefinition<string,
|
|
7
|
-
|
|
6
|
+
export declare const ensuredDirFlag: import("@oclif/core/lib/interfaces/parser.js").FlagDefinition<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions, {
|
|
7
|
+
multiple: false;
|
|
8
|
+
requiredOrDefaulted: false;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const testLevelFlag: import("@oclif/core/lib/interfaces/parser.js").FlagDefinition<TestLevel, import("@oclif/core/lib/interfaces/parser.js").CustomOptions, {
|
|
11
|
+
multiple: false;
|
|
12
|
+
requiredOrDefaulted: true;
|
|
13
|
+
}>;
|
|
8
14
|
/**
|
|
9
15
|
* Flag value could either be a file path or a directory path.
|
|
10
16
|
*/
|
|
11
|
-
export declare const fileOrDirFlag: import("@oclif/core/lib/interfaces/parser").FlagDefinition<PathInfo, {
|
|
17
|
+
export declare const fileOrDirFlag: import("@oclif/core/lib/interfaces/parser.js").FlagDefinition<PathInfo, {
|
|
12
18
|
exists?: boolean | undefined;
|
|
19
|
+
}, {
|
|
20
|
+
multiple: false;
|
|
21
|
+
requiredOrDefaulted: false;
|
|
13
22
|
}>;
|
|
14
23
|
/**
|
|
15
24
|
* Flag value is the name of a zip file that defaults to 'unpackaged.zip'.
|
|
16
25
|
*/
|
|
17
|
-
export declare const zipFileFlag: import("@oclif/core/lib/interfaces/parser").FlagDefinition<string,
|
|
18
|
-
|
|
19
|
-
|
|
26
|
+
export declare const zipFileFlag: import("@oclif/core/lib/interfaces/parser.js").FlagDefinition<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions, {
|
|
27
|
+
multiple: false;
|
|
28
|
+
requiredOrDefaulted: false;
|
|
29
|
+
}>;
|
|
30
|
+
export declare const testsFlag: import("@oclif/core/lib/interfaces/parser.js").FlagDefinition<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions, {
|
|
31
|
+
multiple: true;
|
|
32
|
+
requiredOrDefaulted: false;
|
|
33
|
+
}>;
|
|
34
|
+
export declare const coverageFormattersFlag: import("@oclif/core/lib/interfaces/parser.js").FlagDefinition<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions, {
|
|
35
|
+
multiple: true;
|
|
36
|
+
requiredOrDefaulted: false;
|
|
37
|
+
}>;
|
|
20
38
|
/**
|
|
21
39
|
* use when the old version allowed comma separated values, and the change is confusing enough to deserve a warning
|
|
22
40
|
* Put this as the parse function, like the testsFlag above
|