@salesforce/plugin-packaging 0.0.1 → 1.2.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/CHANGELOG.md +31 -1
- package/README.md +732 -14
- package/lib/commands/force/package/beta/convert.d.ts +13 -0
- package/lib/commands/force/package/beta/convert.js +61 -0
- package/lib/commands/force/package/beta/convert.js.map +1 -0
- package/lib/commands/force/package/beta/create.d.ts +15 -0
- package/lib/commands/force/package/beta/create.js +87 -0
- package/lib/commands/force/package/beta/create.js.map +1 -0
- package/lib/commands/force/package/beta/delete.d.ts +14 -0
- package/lib/commands/force/package/beta/delete.js +61 -0
- package/lib/commands/force/package/beta/delete.js.map +1 -0
- package/lib/commands/force/package/beta/install/report.d.ts +15 -0
- package/lib/commands/force/package/beta/install/report.js +66 -0
- package/lib/commands/force/package/beta/install/report.js.map +1 -0
- package/lib/commands/force/package/beta/install.d.ts +22 -0
- package/lib/commands/force/package/beta/install.js +228 -0
- package/lib/commands/force/package/beta/install.js.map +1 -0
- package/lib/commands/force/package/beta/installed/list.d.ts +17 -0
- package/lib/commands/force/package/beta/installed/list.js +46 -0
- package/lib/commands/force/package/beta/installed/list.js.map +1 -0
- package/lib/commands/force/package/beta/list.d.ts +21 -0
- package/lib/commands/force/package/beta/list.js +90 -0
- package/lib/commands/force/package/beta/list.js.map +1 -0
- package/lib/commands/force/package/beta/uninstall/report.d.ts +10 -0
- package/lib/commands/force/package/beta/uninstall/report.js +33 -0
- package/lib/commands/force/package/beta/uninstall/report.js.map +1 -0
- package/lib/commands/force/package/beta/uninstall.d.ts +12 -0
- package/lib/commands/force/package/beta/uninstall.js +52 -0
- package/lib/commands/force/package/beta/uninstall.js.map +1 -0
- package/lib/commands/force/package/beta/update.d.ts +12 -0
- package/lib/commands/force/package/beta/update.js +51 -0
- package/lib/commands/force/package/beta/update.js.map +1 -0
- package/lib/commands/force/package/beta/version/create/list.d.ts +12 -0
- package/lib/commands/force/package/beta/version/create/list.js +40 -0
- package/lib/commands/force/package/beta/version/create/list.js.map +1 -0
- package/lib/commands/force/package/beta/version/create/report.d.ts +12 -0
- package/lib/commands/force/package/beta/version/create/report.js +87 -0
- package/lib/commands/force/package/beta/version/create/report.js.map +1 -0
- package/lib/commands/force/package/beta/version/create.d.ts +12 -0
- package/lib/commands/force/package/beta/version/create.js +136 -0
- package/lib/commands/force/package/beta/version/create.js.map +1 -0
- package/lib/commands/force/package/beta/version/delete.d.ts +15 -0
- package/lib/commands/force/package/beta/version/delete.js +64 -0
- package/lib/commands/force/package/beta/version/delete.js.map +1 -0
- package/lib/commands/force/package/beta/version/displayancestry.d.ts +13 -0
- package/lib/commands/force/package/beta/version/displayancestry.js +46 -0
- package/lib/commands/force/package/beta/version/displayancestry.js.map +1 -0
- package/lib/commands/force/package/beta/version/list.d.ts +12 -0
- package/lib/commands/force/package/beta/version/list.js +62 -0
- package/lib/commands/force/package/beta/version/list.js.map +1 -0
- package/lib/commands/force/package/beta/version/promote.d.ts +12 -0
- package/lib/commands/force/package/beta/version/promote.js +40 -0
- package/lib/commands/force/package/beta/version/promote.js.map +1 -0
- package/lib/commands/force/package/beta/version/report.d.ts +24 -0
- package/lib/commands/force/package/beta/version/report.js +209 -0
- package/lib/commands/force/package/beta/version/report.js.map +1 -0
- package/lib/commands/force/package/beta/version/update.d.ts +12 -0
- package/lib/commands/force/package/beta/version/update.js +60 -0
- package/lib/commands/force/package/beta/version/update.js.map +1 -0
- package/lib/commands/force/package1/beta/version/create/get.d.ts +9 -0
- package/lib/commands/force/package1/beta/version/create/get.js +48 -0
- package/lib/commands/force/package1/beta/version/create/get.js.map +1 -0
- package/lib/commands/force/package1/beta/version/create.d.ts +14 -0
- package/lib/commands/force/package1/beta/version/create.js +116 -0
- package/lib/commands/force/package1/beta/version/create.js.map +1 -0
- package/lib/commands/force/package1/beta/version/display.d.ts +9 -0
- package/lib/commands/force/package1/beta/version/display.js +55 -0
- package/lib/commands/force/package1/beta/version/display.js.map +1 -0
- package/lib/commands/force/package1/beta/version/list.d.ts +10 -0
- package/lib/commands/force/package1/beta/version/list.js +54 -0
- package/lib/commands/force/package1/beta/version/list.js.map +1 -0
- package/messages/default.md +1127 -0
- package/messages/package1_version_create.md +128 -0
- package/messages/package1_version_create_get.md +31 -0
- package/messages/package1_version_display.md +19 -0
- package/messages/package1_version_list.md +31 -0
- package/messages/package2.md +87 -0
- package/messages/package2_create.md +56 -0
- package/messages/package2_list.md +35 -0
- package/messages/package2_update.md +45 -0
- package/messages/package2_version_create.md +149 -0
- package/messages/package2_version_create_get.md +34 -0
- package/messages/package2_version_create_list.md +62 -0
- package/messages/package2_version_get.md +14 -0
- package/messages/package2_version_list.md +98 -0
- package/messages/package2_version_update.md +89 -0
- package/messages/package_convert.md +72 -0
- package/messages/package_create.md +90 -0
- package/messages/package_delete.md +63 -0
- package/messages/package_displayancestry.md +64 -0
- package/messages/package_install.md +178 -0
- package/messages/package_install_get.md +34 -0
- package/messages/package_install_report.md +34 -0
- package/messages/package_install_request.md +34 -0
- package/messages/package_installed_list.md +16 -0
- package/messages/package_list.md +67 -0
- package/messages/package_uninstall.md +73 -0
- package/messages/package_uninstall_get.md +34 -0
- package/messages/package_uninstall_report.md +34 -0
- package/messages/package_update.md +45 -0
- package/messages/package_version_create.md +301 -0
- package/messages/package_version_create_list.md +62 -0
- package/messages/package_version_create_report.md +35 -0
- package/messages/package_version_delete.md +63 -0
- package/messages/package_version_list.md +135 -0
- package/messages/package_version_promote.md +50 -0
- package/messages/package_version_report.md +51 -0
- package/messages/package_version_update.md +74 -0
- package/messages/packaging.md +157 -0
- package/oclif.manifest.json +1 -1
- package/package.json +68 -15
- package/lib/commands/force/package/placeholder.d.ts +0 -6
- package/lib/commands/force/package/placeholder.js +0 -18
- package/lib/commands/force/package/placeholder.js.map +0 -1
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2022, salesforce.com, inc.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Licensed under the BSD 3-Clause license.
|
|
6
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.PackageVersionReportCommand = void 0;
|
|
10
|
+
const command_1 = require("@salesforce/command");
|
|
11
|
+
const core_1 = require("@salesforce/core");
|
|
12
|
+
const packaging_1 = require("@salesforce/packaging");
|
|
13
|
+
const chalk = require("chalk");
|
|
14
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
15
|
+
const messages = core_1.Messages.loadMessages('@salesforce/plugin-packaging', 'package_version_report');
|
|
16
|
+
const pvlMessages = core_1.Messages.loadMessages('@salesforce/plugin-packaging', 'package_version_list');
|
|
17
|
+
const plMessages = core_1.Messages.loadMessages('@salesforce/plugin-packaging', 'package_list');
|
|
18
|
+
class PackageVersionReportCommand extends command_1.SfdxCommand {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
this.haveCodeCoverageData = false;
|
|
22
|
+
}
|
|
23
|
+
async run() {
|
|
24
|
+
const packageVersion = new packaging_1.PackageVersion({ connection: this.hubOrg.getConnection(), project: this.project });
|
|
25
|
+
const results = await packageVersion.report(this.flags.package, this.flags.verbose);
|
|
26
|
+
const massagedResults = this.massageResultsForDisplay(results);
|
|
27
|
+
this.display(massagedResults);
|
|
28
|
+
return massagedResults;
|
|
29
|
+
}
|
|
30
|
+
display(record) {
|
|
31
|
+
var _a;
|
|
32
|
+
if (this.flags.json) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
let dependencies = null;
|
|
36
|
+
// collect the Dependency 04ts into a comma-separated list for non-json output
|
|
37
|
+
if (this.flags.verbose && record.SubscriberPackageVersion.Dependencies != null) {
|
|
38
|
+
dependencies = record.SubscriberPackageVersion.Dependencies.ids
|
|
39
|
+
.map((d) => d.subscriberPackageVersionId)
|
|
40
|
+
.join(', ');
|
|
41
|
+
}
|
|
42
|
+
// transform the results into a table
|
|
43
|
+
const displayRecords = [
|
|
44
|
+
{
|
|
45
|
+
key: pvlMessages.getMessage('name'),
|
|
46
|
+
value: record.Name,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
key: pvlMessages.getMessage('subscriberPackageVersionId'),
|
|
50
|
+
value: record.SubscriberPackageVersionId,
|
|
51
|
+
},
|
|
52
|
+
{ key: 'Id', value: record.Id },
|
|
53
|
+
{
|
|
54
|
+
key: pvlMessages.getMessage('packageId'),
|
|
55
|
+
value: record.Package2Id,
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
key: pvlMessages.getMessage('version'),
|
|
59
|
+
value: record.Version,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
key: pvlMessages.getMessage('description'),
|
|
63
|
+
value: record.Description,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
key: pvlMessages.getMessage('packageBranch'),
|
|
67
|
+
value: record.Branch,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
key: pvlMessages.getMessage('packageTag'),
|
|
71
|
+
value: record.Tag,
|
|
72
|
+
},
|
|
73
|
+
{ key: messages.getMessage('isReleased'), value: `${record.IsReleased}` },
|
|
74
|
+
{
|
|
75
|
+
key: pvlMessages.getMessage('validationSkipped'),
|
|
76
|
+
value: record.ValidationSkipped,
|
|
77
|
+
},
|
|
78
|
+
{ key: messages.getMessage('ancestorId'), value: record.AncestorId },
|
|
79
|
+
{ key: messages.getMessage('ancestorVersion'), value: record.AncestorVersion },
|
|
80
|
+
{
|
|
81
|
+
key: pvlMessages.getMessage('codeCoverage'),
|
|
82
|
+
value: record.CodeCoverage,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
key: pvlMessages.getMessage('hasPassedCodeCoverageCheck'),
|
|
86
|
+
value: record.HasPassedCodeCoverageCheck,
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
key: pvlMessages.getMessage('convertedFromVersionId'),
|
|
90
|
+
value: record.ConvertedFromVersionId,
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
key: plMessages.getMessage('isOrgDependent'),
|
|
94
|
+
value: record.Package2.IsOrgDependent,
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
key: pvlMessages.getMessage('releaseVersion'),
|
|
98
|
+
value: record.ReleaseVersion === null ? '' : record.ReleaseVersion.toFixed(1),
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
key: pvlMessages.getMessage('buildDurationInSeconds'),
|
|
102
|
+
value: record.BuildDurationInSeconds === null ? '' : record.BuildDurationInSeconds.toFixed(1),
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
key: pvlMessages.getMessage('hasMetadataRemoved'),
|
|
106
|
+
value: record.HasMetadataRemoved,
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
key: messages.getMessage('dependencies'),
|
|
110
|
+
value: this.flags.verbose && dependencies != null ? dependencies : ' ',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
key: plMessages.getMessage('createdBy'),
|
|
114
|
+
value: record.CreatedById,
|
|
115
|
+
},
|
|
116
|
+
];
|
|
117
|
+
const maximumNumClasses = 15; // Number of least code covered classes displayed on the cli output for better UX.
|
|
118
|
+
let codeCovStr = ''; // String to display when code coverage data is empty or null
|
|
119
|
+
let displayCoverageRecords = [];
|
|
120
|
+
// collect the code coverage data into an array of key value records for non-json output
|
|
121
|
+
if (this.flags.verbose) {
|
|
122
|
+
const coverageData = (_a = record.CodeCoveragePercentages) === null || _a === void 0 ? void 0 : _a.codeCovPercentages;
|
|
123
|
+
if (!coverageData) {
|
|
124
|
+
codeCovStr = 'N/A'; // Code coverage isn't calculated as part of version create command
|
|
125
|
+
}
|
|
126
|
+
else if (!coverageData.length) {
|
|
127
|
+
// Calculated code coverage data is too big to fit into a DB field. Retrieve it from the packageZip
|
|
128
|
+
codeCovStr =
|
|
129
|
+
'The code coverage details are too large to display. To request code coverage details for this package version, log a case in the Salesforce Partner Community.';
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
displayCoverageRecords = coverageData.slice(0, maximumNumClasses).map((coverageDatum) => {
|
|
133
|
+
return {
|
|
134
|
+
key: coverageDatum.className,
|
|
135
|
+
value: `${coverageDatum.codeCoveragePercentage}%`,
|
|
136
|
+
};
|
|
137
|
+
});
|
|
138
|
+
this.haveCodeCoverageData = displayCoverageRecords.length > 0;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
// Always append code coverage column label ar the end
|
|
142
|
+
displayRecords.push({
|
|
143
|
+
key: messages.getMessage('codeCoveragePercentages'),
|
|
144
|
+
value: this.haveCodeCoverageData === true ? '...' : codeCovStr,
|
|
145
|
+
});
|
|
146
|
+
if (!this.flags.verbose) {
|
|
147
|
+
displayRecords.splice(displayRecords.map((e) => e.key).indexOf('Id'), 1);
|
|
148
|
+
displayRecords.splice(displayRecords.map((e) => e.key).indexOf(pvlMessages.getMessage('convertedFromVersionId')), 1);
|
|
149
|
+
displayRecords.splice(displayRecords.map((e) => e.key).indexOf(messages.getMessage('dependencies')), 1);
|
|
150
|
+
displayRecords.splice(displayRecords.map((e) => e.key).indexOf(messages.getMessage('codeCoveragePercentages')), 1);
|
|
151
|
+
displayCoverageRecords.splice(0, displayCoverageRecords.length);
|
|
152
|
+
}
|
|
153
|
+
this.ux.styledHeader(chalk.blue('Package Version'));
|
|
154
|
+
this.ux.table(displayRecords, { key: { header: 'Name' }, value: { header: 'Value' } });
|
|
155
|
+
if (displayCoverageRecords.length > 0) {
|
|
156
|
+
this.ux.table(displayCoverageRecords, { key: { header: 'Class Name' }, value: { header: 'Code Coverage' } });
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
massageResultsForDisplay(results) {
|
|
160
|
+
var _a, _b, _c, _d, _e, _f;
|
|
161
|
+
const record = JSON.parse(JSON.stringify(results));
|
|
162
|
+
record.Version = [record.MajorVersion, record.MinorVersion, record.PatchVersion, record.BuildNumber].join('.');
|
|
163
|
+
if (results.PackageType !== 'Managed') {
|
|
164
|
+
record.AncestorVersion = 'N/A';
|
|
165
|
+
record.AncestorId = 'N/A';
|
|
166
|
+
}
|
|
167
|
+
if (results.Package2.IsOrgDependent === true || results.ValidationSkipped === true) {
|
|
168
|
+
record.CodeCoverage = 'N/A';
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
record.CodeCoverage = ((_a = results.CodeCoverage) === null || _a === void 0 ? void 0 : _a.apexCodeCoveragePercentage)
|
|
172
|
+
? `${(_b = results.CodeCoverage) === null || _b === void 0 ? void 0 : _b.apexCodeCoveragePercentage}%`
|
|
173
|
+
: 'N/A';
|
|
174
|
+
}
|
|
175
|
+
record.HasPassedCodeCoverageCheck =
|
|
176
|
+
results.Package2.IsOrgDependent || results.ValidationSkipped ? 'N/A' : results.HasPassedCodeCoverageCheck;
|
|
177
|
+
record.Package2.IsOrgDependent =
|
|
178
|
+
results.PackageType === 'Managed' ? 'N/A' : results.Package2.IsOrgDependent === true ? 'Yes' : 'No';
|
|
179
|
+
// set HasMetadataRemoved to N/A for Unlocked, and No when value is false or absent (pre-230)
|
|
180
|
+
record.HasMetadataRemoved = results.PackageType !== 'Managed' ? 'N/A' : results.HasMetadataRemoved ? 'Yes' : 'No';
|
|
181
|
+
(_c = record.Description) !== null && _c !== void 0 ? _c : (record.Description = ' ');
|
|
182
|
+
(_d = record.Branch) !== null && _d !== void 0 ? _d : (record.Branch = ' ');
|
|
183
|
+
(_e = record.Tag) !== null && _e !== void 0 ? _e : (record.Tag = ' ');
|
|
184
|
+
(_f = record.ConvertedFromVersionId) !== null && _f !== void 0 ? _f : (record.ConvertedFromVersionId = ' ');
|
|
185
|
+
// for backward compatibility, remove PackageType from the record
|
|
186
|
+
delete record['PackageType'];
|
|
187
|
+
return record;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
exports.PackageVersionReportCommand = PackageVersionReportCommand;
|
|
191
|
+
PackageVersionReportCommand.description = messages.getMessage('cliDescription');
|
|
192
|
+
PackageVersionReportCommand.longDescription = messages.getMessage('cliLongDescription');
|
|
193
|
+
PackageVersionReportCommand.help = messages.getMessage('help');
|
|
194
|
+
PackageVersionReportCommand.orgType = core_1.OrgConfigProperties.TARGET_DEV_HUB;
|
|
195
|
+
PackageVersionReportCommand.requiresDevhubUsername = true;
|
|
196
|
+
PackageVersionReportCommand.requiresProject = true;
|
|
197
|
+
PackageVersionReportCommand.flagsConfig = {
|
|
198
|
+
package: command_1.flags.string({
|
|
199
|
+
char: 'p',
|
|
200
|
+
description: messages.getMessage('package'),
|
|
201
|
+
longDescription: messages.getMessage('packageLong'),
|
|
202
|
+
required: true,
|
|
203
|
+
}),
|
|
204
|
+
verbose: command_1.flags.builtin({
|
|
205
|
+
description: messages.getMessage('verboseDescription'),
|
|
206
|
+
longDescription: messages.getMessage('verboseLongDescription'),
|
|
207
|
+
}),
|
|
208
|
+
};
|
|
209
|
+
//# sourceMappingURL=report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../../../../../src/commands/force/package/beta/version/report.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,iDAAsE;AACtE,2CAAiE;AACjE,qDAAsG;AACtG,+BAA+B;AAE/B,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,wBAAwB,CAAC,CAAC;AACjG,MAAM,WAAW,GAAG,eAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,sBAAsB,CAAC,CAAC;AAClG,MAAM,UAAU,GAAG,eAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,cAAc,CAAC,CAAC;AAUzF,MAAa,2BAA4B,SAAQ,qBAAW;IAA5D;;QAmBY,yBAAoB,GAAG,KAAK,CAAC;IAuLzC,CAAC;IArLQ,KAAK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MAAM,CAAC,sBAAsB,oCAA7B,MAAM,CAAC,sBAAsB,GAAK,GAAG,EAAC;QAEtC,iEAAiE;QACjE,OAAO,MAAM,CAAC,aAAa,CAAC,CAAC;QAE7B,OAAO,MAAM,CAAC;IAChB,CAAC;;AAzMH,kEA0MC;AAzMwB,uCAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;AACpD,2CAAe,GAAG,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAC5D,gCAAI,GAAG,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AACnC,mCAAO,GAAG,0BAAmB,CAAC,cAAc,CAAC;AAC7C,kDAAsB,GAAG,IAAI,CAAC;AAC9B,2CAAe,GAAG,IAAI,CAAC;AACvB,uCAAW,GAAgB;IAChD,OAAO,EAAE,eAAK,CAAC,MAAM,CAAC;QACpB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC;QAC3C,eAAe,EAAE,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC;QACnD,QAAQ,EAAE,IAAI;KACf,CAAC;IACF,OAAO,EAAE,eAAK,CAAC,OAAO,CAAC;QACrB,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC;QACtD,eAAe,EAAE,QAAQ,CAAC,UAAU,CAAC,wBAAwB,CAAC;KAC/D,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FlagsConfig, SfdxCommand } from '@salesforce/command';
|
|
2
|
+
import { SfdxPropertyKeys } from '@salesforce/core';
|
|
3
|
+
export declare class PackageVersionUpdateCommand extends SfdxCommand {
|
|
4
|
+
static readonly description: string;
|
|
5
|
+
static readonly longDescription: string;
|
|
6
|
+
static readonly help: string;
|
|
7
|
+
static readonly orgType = SfdxPropertyKeys.DEFAULT_DEV_HUB_USERNAME;
|
|
8
|
+
static readonly requiresDevhubUsername = true;
|
|
9
|
+
static readonly requiresProject = true;
|
|
10
|
+
static readonly flagsConfig: FlagsConfig;
|
|
11
|
+
run(): Promise<unknown>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2022, salesforce.com, inc.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Licensed under the BSD 3-Clause license.
|
|
6
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.PackageVersionUpdateCommand = void 0;
|
|
10
|
+
const command_1 = require("@salesforce/command");
|
|
11
|
+
const core_1 = require("@salesforce/core");
|
|
12
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
13
|
+
const messages = core_1.Messages.loadMessages('@salesforce/plugin-packaging', 'package_version_update');
|
|
14
|
+
class PackageVersionUpdateCommand extends command_1.SfdxCommand {
|
|
15
|
+
async run() {
|
|
16
|
+
process.exitCode = 1;
|
|
17
|
+
return Promise.resolve('Not yet implemented');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.PackageVersionUpdateCommand = PackageVersionUpdateCommand;
|
|
21
|
+
PackageVersionUpdateCommand.description = messages.getMessage('cliDescription');
|
|
22
|
+
PackageVersionUpdateCommand.longDescription = messages.getMessage('cliLongDescription');
|
|
23
|
+
PackageVersionUpdateCommand.help = messages.getMessage('help');
|
|
24
|
+
PackageVersionUpdateCommand.orgType = core_1.SfdxPropertyKeys.DEFAULT_DEV_HUB_USERNAME;
|
|
25
|
+
PackageVersionUpdateCommand.requiresDevhubUsername = true;
|
|
26
|
+
PackageVersionUpdateCommand.requiresProject = true;
|
|
27
|
+
PackageVersionUpdateCommand.flagsConfig = {
|
|
28
|
+
package: command_1.flags.string({
|
|
29
|
+
char: 'p',
|
|
30
|
+
description: messages.getMessage('package'),
|
|
31
|
+
longDescription: messages.getMessage('packageLong'),
|
|
32
|
+
required: true,
|
|
33
|
+
}),
|
|
34
|
+
versionname: command_1.flags.string({
|
|
35
|
+
char: 'a',
|
|
36
|
+
description: messages.getMessage('name'),
|
|
37
|
+
longDescription: messages.getMessage('nameLong'),
|
|
38
|
+
}),
|
|
39
|
+
versiondescription: command_1.flags.string({
|
|
40
|
+
char: 'e',
|
|
41
|
+
description: messages.getMessage('description'),
|
|
42
|
+
longDescription: messages.getMessage('descriptionLong'),
|
|
43
|
+
}),
|
|
44
|
+
branch: command_1.flags.string({
|
|
45
|
+
char: 'b',
|
|
46
|
+
description: messages.getMessage('branch'),
|
|
47
|
+
longDescription: messages.getMessage('branchLong'),
|
|
48
|
+
}),
|
|
49
|
+
tag: command_1.flags.string({
|
|
50
|
+
char: 't',
|
|
51
|
+
description: messages.getMessage('tag'),
|
|
52
|
+
longDescription: messages.getMessage('tagLong'),
|
|
53
|
+
}),
|
|
54
|
+
installationkey: command_1.flags.string({
|
|
55
|
+
char: 'k',
|
|
56
|
+
description: messages.getMessage('key'),
|
|
57
|
+
longDescription: messages.getMessage('longKey'),
|
|
58
|
+
}),
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../../../src/commands/force/package/beta/version/update.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,iDAAsE;AACtE,2CAA8D;AAE9D,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,wBAAwB,CAAC,CAAC;AAEjG,MAAa,2BAA4B,SAAQ,qBAAW;IAyCnD,KAAK,CAAC,GAAG;QACd,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACrB,OAAO,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAChD,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AU,CAAC,KAAK,CAAC;QACvC,eAAe,EAAE,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC;KAChD,CAAC;IACF,eAAe,EAAE,eAAK,CAAC,MAAM,CAAC;QAC5B,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC;QACvC,eAAe,EAAE,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC;KAChD,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FlagsConfig, SfdxCommand } from '@salesforce/command';
|
|
2
|
+
import { PackagingSObjects } from '@salesforce/packaging';
|
|
3
|
+
export declare class Package1VersionCreateGetCommand extends SfdxCommand {
|
|
4
|
+
static readonly description: string;
|
|
5
|
+
static readonly examples: string[];
|
|
6
|
+
static readonly requiresUsername = true;
|
|
7
|
+
static readonly flagsConfig: FlagsConfig;
|
|
8
|
+
run(): Promise<PackagingSObjects.PackageUploadRequest>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2022, salesforce.com, inc.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Licensed under the BSD 3-Clause license.
|
|
6
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Package1VersionCreateGetCommand = void 0;
|
|
10
|
+
const os = require("os");
|
|
11
|
+
const command_1 = require("@salesforce/command");
|
|
12
|
+
const core_1 = require("@salesforce/core");
|
|
13
|
+
const packaging_1 = require("@salesforce/packaging");
|
|
14
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
15
|
+
const messages = core_1.Messages.loadMessages('@salesforce/plugin-packaging', 'package1_version_create_get');
|
|
16
|
+
const defaultMessages = core_1.Messages.loadMessages('@salesforce/plugin-packaging', 'default');
|
|
17
|
+
class Package1VersionCreateGetCommand extends command_1.SfdxCommand {
|
|
18
|
+
async run() {
|
|
19
|
+
var _a, _b;
|
|
20
|
+
const result = await (0, packaging_1.package1VersionCreateGet)(this.org.getConnection(), this.flags.requestid);
|
|
21
|
+
if (result.Status === 'ERROR') {
|
|
22
|
+
// toolbelt was accessing request.Errors.errors, I'm unsure about this type, but was unable to reproduce an error
|
|
23
|
+
// in the wild, and decided to trust how it was working
|
|
24
|
+
const errors = (_b = (_a = result.Errors) === null || _a === void 0 ? void 0 : _a.errors) === null || _b === void 0 ? void 0 : _b.map((e) => e.message).join('\n');
|
|
25
|
+
throw defaultMessages.createError('package1VersionCreateCommandUploadFailure', [
|
|
26
|
+
errors !== null && errors !== void 0 ? errors : 'Package version creation failed with unknown error',
|
|
27
|
+
]);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
const arg = result.Status === 'SUCCESS' ? [result.MetadataPackageVersionId] : [result.Id, this.org.getUsername()];
|
|
31
|
+
this.ux.log(messages.getMessage(result.Status, arg));
|
|
32
|
+
}
|
|
33
|
+
return result;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.Package1VersionCreateGetCommand = Package1VersionCreateGetCommand;
|
|
37
|
+
Package1VersionCreateGetCommand.description = messages.getMessage('cliDescription');
|
|
38
|
+
Package1VersionCreateGetCommand.examples = messages.getMessage('examples').split(os.EOL);
|
|
39
|
+
Package1VersionCreateGetCommand.requiresUsername = true;
|
|
40
|
+
Package1VersionCreateGetCommand.flagsConfig = {
|
|
41
|
+
requestid: command_1.flags.id({
|
|
42
|
+
char: 'i',
|
|
43
|
+
description: messages.getMessage('requestId'),
|
|
44
|
+
longDescription: messages.getMessage('requestIdLong'),
|
|
45
|
+
required: true,
|
|
46
|
+
}),
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../../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C,CAAC;SACtD;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;;AA7BH,0EA8BC;AA7BwB,2CAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;AACpD,wCAAQ,GAAG,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AACzD,gDAAgB,GAAG,IAAI,CAAC;AACxB,2CAAW,GAAgB;IAChD,SAAS,EAAE,eAAK,CAAC,EAAE,CAAC;QAClB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,WAAW,CAAC;QAC7C,eAAe,EAAE,QAAQ,CAAC,UAAU,CAAC,eAAe,CAAC;QACrD,QAAQ,EAAE,IAAI;KACf,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FlagsConfig, SfdxCommand } from '@salesforce/command';
|
|
2
|
+
import { PackagingSObjects } from '@salesforce/packaging';
|
|
3
|
+
declare type PackageUploadRequest = PackagingSObjects.PackageUploadRequest;
|
|
4
|
+
export declare class Package1VersionCreateCommand extends SfdxCommand {
|
|
5
|
+
static readonly description: string;
|
|
6
|
+
static readonly longDescription: string;
|
|
7
|
+
static readonly help: string;
|
|
8
|
+
static readonly requiresUsername = true;
|
|
9
|
+
static readonly requiresProject = true;
|
|
10
|
+
static readonly flagsConfig: FlagsConfig;
|
|
11
|
+
run(): Promise<PackageUploadRequest>;
|
|
12
|
+
private parseVersion;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2022, salesforce.com, inc.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Licensed under the BSD 3-Clause license.
|
|
6
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Package1VersionCreateCommand = void 0;
|
|
10
|
+
const command_1 = require("@salesforce/command");
|
|
11
|
+
const core_1 = require("@salesforce/core");
|
|
12
|
+
const kit_1 = require("@salesforce/kit");
|
|
13
|
+
const packaging_1 = require("@salesforce/packaging");
|
|
14
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
15
|
+
const messages = core_1.Messages.loadMessages('@salesforce/plugin-packaging', 'package1_version_create');
|
|
16
|
+
class Package1VersionCreateCommand extends command_1.SfdxCommand {
|
|
17
|
+
async run() {
|
|
18
|
+
var _a;
|
|
19
|
+
const version = this.parseVersion(this.flags.version);
|
|
20
|
+
if (this.flags.wait) {
|
|
21
|
+
// if we're waiting for the request, set up the listener
|
|
22
|
+
core_1.Lifecycle.getInstance().on('package1VersionCreate:progress',
|
|
23
|
+
// the 'on' method requires an async method, but we don't have any async calls
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
25
|
+
async (data) => {
|
|
26
|
+
this.ux.log(`Package upload is ${data.pollingResult.Status === 'QUEUED' ? 'enqueued' : 'in progress'}. Waiting ${data.timeout} more seconds`);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
const result = await (0, packaging_1.package1VersionCreate)(this.org.getConnection(), {
|
|
30
|
+
MetadataPackageId: this.flags.packageid,
|
|
31
|
+
VersionName: this.flags.name,
|
|
32
|
+
Description: this.flags.description,
|
|
33
|
+
MajorVersion: version.major,
|
|
34
|
+
MinorVersion: version.minor,
|
|
35
|
+
IsReleaseVersion: this.flags.managedreleased,
|
|
36
|
+
ReleaseNotesUrl: this.flags.releasenotesurl,
|
|
37
|
+
PostInstallUrl: this.flags.postinstallurl,
|
|
38
|
+
Password: this.flags.installationkey,
|
|
39
|
+
}, { frequency: kit_1.Duration.seconds(5), timeout: (_a = this.flags.wait) !== null && _a !== void 0 ? _a : kit_1.Duration.seconds(0) });
|
|
40
|
+
const arg = result.Status === 'SUCCESS' ? [result.MetadataPackageVersionId] : [result.Id, this.org.getUsername()];
|
|
41
|
+
this.ux.log(messages.getMessage(result.Status, arg));
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
parseVersion(versionString) {
|
|
45
|
+
const versions = versionString === null || versionString === void 0 ? void 0 : versionString.split('.');
|
|
46
|
+
if (!versions) {
|
|
47
|
+
// return nulls so when no version flag is provided, the server can infer the correct version
|
|
48
|
+
return { major: null, minor: null };
|
|
49
|
+
}
|
|
50
|
+
if (versions.length === 2) {
|
|
51
|
+
return {
|
|
52
|
+
major: Number(versions[0]),
|
|
53
|
+
minor: Number(versions[1]),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
throw messages.createError('package1VersionCreateCommandInvalidVersion', [versionString]);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.Package1VersionCreateCommand = Package1VersionCreateCommand;
|
|
62
|
+
Package1VersionCreateCommand.description = messages.getMessage('cliDescription');
|
|
63
|
+
Package1VersionCreateCommand.longDescription = messages.getMessage('cliDescriptionLong');
|
|
64
|
+
Package1VersionCreateCommand.help = messages.getMessage('cliHelp');
|
|
65
|
+
Package1VersionCreateCommand.requiresUsername = true;
|
|
66
|
+
Package1VersionCreateCommand.requiresProject = true;
|
|
67
|
+
Package1VersionCreateCommand.flagsConfig = {
|
|
68
|
+
packageid: command_1.flags.id({
|
|
69
|
+
char: 'i',
|
|
70
|
+
description: messages.getMessage('id'),
|
|
71
|
+
longDescription: messages.getMessage('idLong'),
|
|
72
|
+
required: true,
|
|
73
|
+
}),
|
|
74
|
+
name: command_1.flags.string({
|
|
75
|
+
char: 'n',
|
|
76
|
+
description: messages.getMessage('name'),
|
|
77
|
+
longDescription: messages.getMessage('nameLong'),
|
|
78
|
+
required: true,
|
|
79
|
+
}),
|
|
80
|
+
description: command_1.flags.string({
|
|
81
|
+
char: 'd',
|
|
82
|
+
description: messages.getMessage('description'),
|
|
83
|
+
longDescription: messages.getMessage('descriptionLong'),
|
|
84
|
+
}),
|
|
85
|
+
version: command_1.flags.string({
|
|
86
|
+
char: 'v',
|
|
87
|
+
description: messages.getMessage('version'),
|
|
88
|
+
longDescription: messages.getMessage('versionLong'),
|
|
89
|
+
}),
|
|
90
|
+
managedreleased: command_1.flags.boolean({
|
|
91
|
+
char: 'm',
|
|
92
|
+
description: messages.getMessage('managedReleased'),
|
|
93
|
+
longDescription: messages.getMessage('managedReleasedLong'),
|
|
94
|
+
}),
|
|
95
|
+
releasenotesurl: command_1.flags.url({
|
|
96
|
+
char: 'r',
|
|
97
|
+
description: messages.getMessage('releaseNotes'),
|
|
98
|
+
longDescription: messages.getMessage('releaseNotesLong'),
|
|
99
|
+
}),
|
|
100
|
+
postinstallurl: command_1.flags.url({
|
|
101
|
+
char: 'p',
|
|
102
|
+
description: messages.getMessage('postInstall'),
|
|
103
|
+
longDescription: messages.getMessage('postInstallLong'),
|
|
104
|
+
}),
|
|
105
|
+
installationkey: command_1.flags.string({
|
|
106
|
+
char: 'k',
|
|
107
|
+
description: messages.getMessage('installationKey'),
|
|
108
|
+
longDescription: messages.getMessage('installationKeyLong'),
|
|
109
|
+
}),
|
|
110
|
+
wait: command_1.flags.minutes({
|
|
111
|
+
char: 'w',
|
|
112
|
+
description: messages.getMessage('wait'),
|
|
113
|
+
longDescription: messages.getMessage('waitLong'),
|
|
114
|
+
}),
|
|
115
|
+
};
|
|
116
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../../../src/commands/force/package1/beta/version/create.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,iDAAsE;AACtE,2CAAuD;AACvD,yCAA2C;AAC3C,qDAAiF;AAEjF,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,8BAA8B,EA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AAG,CAAC;QACxB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC;QAC/C,eAAe,EAAE,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC;KACxD,CAAC;IACF,eAAe,EAAE,eAAK,CAAC,MAAM,CAAC;QAC5B,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC;QACnD,eAAe,EAAE,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC;KAC5D,CAAC;IACF,IAAI,EAAE,eAAK,CAAC,OAAO,CAAC;QAClB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC;QACxC,eAAe,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC;KACjD,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FlagsConfig, SfdxCommand } from '@salesforce/command';
|
|
2
|
+
import { Package1Display } from '@salesforce/packaging';
|
|
3
|
+
export declare class Package1VersionDisplayCommand extends SfdxCommand {
|
|
4
|
+
static readonly description: string;
|
|
5
|
+
static readonly help: string;
|
|
6
|
+
static readonly requiresUsername = true;
|
|
7
|
+
static readonly flagsConfig: FlagsConfig;
|
|
8
|
+
run(): Promise<Package1Display[]>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2022, salesforce.com, inc.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Licensed under the BSD 3-Clause license.
|
|
6
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Package1VersionDisplayCommand = void 0;
|
|
10
|
+
const command_1 = require("@salesforce/command");
|
|
11
|
+
const core_1 = require("@salesforce/core");
|
|
12
|
+
const packaging_1 = require("@salesforce/packaging");
|
|
13
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
14
|
+
const messages = core_1.Messages.loadMessages('@salesforce/plugin-packaging', 'package1_version_display');
|
|
15
|
+
class Package1VersionDisplayCommand extends command_1.SfdxCommand {
|
|
16
|
+
async run() {
|
|
17
|
+
const conn = this.org.getConnection();
|
|
18
|
+
const results = await (0, packaging_1.package1Display)(conn, this.flags.packageversionid);
|
|
19
|
+
if (results.length === 0) {
|
|
20
|
+
this.ux.log('No results found');
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
this.ux.table(results, {
|
|
24
|
+
MetadataPackageVersionId: { header: 'MetadataPackageVersionId' },
|
|
25
|
+
MetadataPackageId: { header: 'MetadataPackageId' },
|
|
26
|
+
Name: { header: 'Name' },
|
|
27
|
+
Version: { header: 'Version' },
|
|
28
|
+
ReleaseState: { header: 'ReleaseState' },
|
|
29
|
+
BuildNumber: { header: 'BuildNumber' },
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return results;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.Package1VersionDisplayCommand = Package1VersionDisplayCommand;
|
|
36
|
+
Package1VersionDisplayCommand.description = messages.getMessage('description');
|
|
37
|
+
Package1VersionDisplayCommand.help = messages.getMessage('help');
|
|
38
|
+
Package1VersionDisplayCommand.requiresUsername = true;
|
|
39
|
+
Package1VersionDisplayCommand.flagsConfig = {
|
|
40
|
+
packageversionid: command_1.flags.id({
|
|
41
|
+
char: 'i',
|
|
42
|
+
description: messages.getMessage('packageId'),
|
|
43
|
+
longDescription: messages.getMessage('packageIdLong'),
|
|
44
|
+
required: true,
|
|
45
|
+
validate: (id) => {
|
|
46
|
+
if (id.startsWith('04t') && [18, 15].includes(id.length)) {
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
throw new core_1.SfError(messages.getMessage('packageIdInvalid'));
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
}),
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=display.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"display.js","sourceRoot":"","sources":["../../../../../../src/commands/force/package1/beta/version/display.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,iDAAsE;AACtE,2CAAqD;AACrD,qDAAyE;AAEzE,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,0BAA0B,CAAC,CAAC;AAEnG,MAAa,6BAA8B,SAAQ,qBAAW;IAoBrD,KAAK,CAAC,GAAG;QACd,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;QACtC,MAAM,OAAO,GAAG,MAAM,IAAA,2BAAe,EAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;QAEzE,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;YACxB,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;SACjC;aAAM;YACL,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE;gBACrB,wBAAwB,EAAE,EAAE,MAAM,EAAE,0BAA0B,EAAE;gBAChE,iBAAiB,EAAE,EAAE,MAAM,EAAE,mBAAmB,EAAE;gBAClD,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;gBACxB,OAAO,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE;gBAC9B,YAAY,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE;gBACxC,WAAW,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE;aACvC,CAAC,CAAC;SACJ;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;;AAtCH,sEAuCC;AAtCwB,yCAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AACjD,kCAAI,GAAG,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AACnC,8CAAgB,GAAG,IAAI,CAAC;AACxB,yCAAW,GAAgB;IAChD,gBAAgB,EAAE,eAAK,CAAC,EAAE,CAAC;QACzB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,WAAW,CAAC;QAC7C,eAAe,EAAE,QAAQ,CAAC,UAAU,CAAC,eAAe,CAAC;QACrD,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE;YACf,IAAI,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;gBACxD,OAAO,IAAI,CAAC;aACb;iBAAM;gBACL,MAAM,IAAI,cAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC,CAAC;aAC5D;QACH,CAAC;KACF,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FlagsConfig, SfdxCommand } from '@salesforce/command';
|
|
2
|
+
import { Package1Display } from '@salesforce/packaging';
|
|
3
|
+
export declare class Package1VersionListCommand extends SfdxCommand {
|
|
4
|
+
static readonly description: string;
|
|
5
|
+
static readonly longDescription: string;
|
|
6
|
+
static readonly help: string;
|
|
7
|
+
static readonly requiresUsername = true;
|
|
8
|
+
static readonly flagsConfig: FlagsConfig;
|
|
9
|
+
run(): Promise<Package1Display[]>;
|
|
10
|
+
}
|