@salesforce/plugin-release-management 4.5.27 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/README.md +18 -41
  2. package/bin/dev.js +8 -6
  3. package/bin/run.js +7 -5
  4. package/lib/amazonS3.d.ts +4 -8
  5. package/lib/amazonS3.js +76 -81
  6. package/lib/amazonS3.js.map +1 -1
  7. package/lib/codeSigning/NpmName.js +5 -9
  8. package/lib/codeSigning/NpmName.js.map +1 -1
  9. package/lib/codeSigning/SimplifiedSigning.d.ts +1 -1
  10. package/lib/codeSigning/SimplifiedSigning.js +16 -21
  11. package/lib/codeSigning/SimplifiedSigning.js.map +1 -1
  12. package/lib/codeSigning/error.js +2 -6
  13. package/lib/codeSigning/error.js.map +1 -1
  14. package/lib/codeSigning/packAndSign.d.ts +2 -2
  15. package/lib/codeSigning/packAndSign.js +45 -44
  16. package/lib/codeSigning/packAndSign.js.map +1 -1
  17. package/lib/codeSigning/upload.d.ts +1 -1
  18. package/lib/codeSigning/upload.js +4 -8
  19. package/lib/codeSigning/upload.js.map +1 -1
  20. package/lib/commands/channel/promote.d.ts +11 -4
  21. package/lib/commands/channel/promote.js +113 -115
  22. package/lib/commands/channel/promote.js.map +1 -1
  23. package/lib/commands/cli/artifacts/compare.js +58 -52
  24. package/lib/commands/cli/artifacts/compare.js.map +1 -1
  25. package/lib/commands/cli/install/jit/test.d.ts +1 -1
  26. package/lib/commands/cli/install/jit/test.js +18 -21
  27. package/lib/commands/cli/install/jit/test.js.map +1 -1
  28. package/lib/commands/cli/install/test.d.ts +4 -4
  29. package/lib/commands/cli/install/test.js +114 -106
  30. package/lib/commands/cli/install/test.js.map +1 -1
  31. package/lib/commands/cli/release/automerge.d.ts +5 -5
  32. package/lib/commands/cli/release/automerge.js +44 -47
  33. package/lib/commands/cli/release/automerge.js.map +1 -1
  34. package/lib/commands/cli/release/build.d.ts +12 -12
  35. package/lib/commands/cli/release/build.js +78 -81
  36. package/lib/commands/cli/release/build.js.map +1 -1
  37. package/lib/commands/cli/releasenotes.d.ts +4 -4
  38. package/lib/commands/cli/releasenotes.js +49 -54
  39. package/lib/commands/cli/releasenotes.js.map +1 -1
  40. package/lib/commands/cli/tarballs/prepare.js +31 -33
  41. package/lib/commands/cli/tarballs/prepare.js.map +1 -1
  42. package/lib/commands/cli/tarballs/smoke.js +32 -31
  43. package/lib/commands/cli/tarballs/smoke.js.map +1 -1
  44. package/lib/commands/cli/tarballs/verify.d.ts +1 -1
  45. package/lib/commands/cli/tarballs/verify.js +58 -62
  46. package/lib/commands/cli/tarballs/verify.js.map +1 -1
  47. package/lib/commands/cli/versions/inspect.d.ts +4 -3
  48. package/lib/commands/cli/versions/inspect.js +79 -84
  49. package/lib/commands/cli/versions/inspect.js.map +1 -1
  50. package/lib/commands/dependabot/automerge.d.ts +6 -6
  51. package/lib/commands/dependabot/automerge.js +48 -48
  52. package/lib/commands/dependabot/automerge.js.map +1 -1
  53. package/lib/commands/github/check/closed.d.ts +7 -5
  54. package/lib/commands/github/check/closed.js +25 -28
  55. package/lib/commands/github/check/closed.js.map +1 -1
  56. package/lib/commands/npm/dependencies/pin.d.ts +3 -3
  57. package/lib/commands/npm/dependencies/pin.js +21 -24
  58. package/lib/commands/npm/dependencies/pin.js.map +1 -1
  59. package/lib/commands/npm/package/release.d.ts +11 -12
  60. package/lib/commands/npm/package/release.js +58 -61
  61. package/lib/commands/npm/package/release.js.map +1 -1
  62. package/lib/commands/repositories/index.d.ts +4 -3
  63. package/lib/commands/repositories/index.js +17 -20
  64. package/lib/commands/repositories/index.js.map +1 -1
  65. package/lib/dependabot.d.ts +1 -1
  66. package/lib/dependabot.js +13 -17
  67. package/lib/dependabot.js.map +1 -1
  68. package/lib/dependencies.d.ts +1 -1
  69. package/lib/dependencies.js +3 -7
  70. package/lib/dependencies.js.map +1 -1
  71. package/lib/index.d.ts +1 -2
  72. package/lib/index.js +1 -2
  73. package/lib/index.js.map +1 -1
  74. package/lib/jit.js +18 -22
  75. package/lib/jit.js.map +1 -1
  76. package/lib/package.d.ts +0 -2
  77. package/lib/package.js +36 -59
  78. package/lib/package.js.map +1 -1
  79. package/lib/registry.js +19 -18
  80. package/lib/registry.js.map +1 -1
  81. package/lib/repositories.js +5 -9
  82. package/lib/repositories.js.map +1 -1
  83. package/lib/repository.d.ts +5 -7
  84. package/lib/repository.js +41 -43
  85. package/lib/repository.js.map +1 -1
  86. package/lib/types.js +4 -7
  87. package/lib/types.js.map +1 -1
  88. package/npm-shrinkwrap.json +2952 -2228
  89. package/oclif.manifest.json +17 -69
  90. package/package.json +9 -9
  91. package/lib/commands/cli/schemas/compare.d.ts +0 -19
  92. package/lib/commands/cli/schemas/compare.js +0 -114
  93. package/lib/commands/cli/schemas/compare.js.map +0 -1
  94. package/messages/cli.schemas.compare.md +0 -7
@@ -1,25 +1,23 @@
1
- "use strict";
2
1
  /*
3
2
  * Copyright (c) 2021, 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
- Object.defineProperty(exports, "__esModule", { value: true });
9
- const fs = require("node:fs/promises");
10
- const path = require("node:path");
11
- const fg = require("fast-glob");
12
- const shelljs_1 = require("shelljs");
13
- const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
14
- const core_1 = require("@salesforce/core");
15
- const ts_types_1 = require("@salesforce/ts-types");
16
- const chalk_1 = require("chalk");
17
- const kit_1 = require("@salesforce/kit");
18
- const types_1 = require("../../../types");
19
- core_1.Messages.importMessagesDirectory(__dirname);
20
- const messages = core_1.Messages.loadMessages('@salesforce/plugin-release-management', 'cli.tarballs.verify');
21
- const PASSED = chalk_1.green.bold('PASSED');
22
- const FAILED = chalk_1.red.bold('FAILED');
7
+ import fs from 'node:fs/promises';
8
+ import path from 'node:path';
9
+ import fg from 'fast-glob';
10
+ import shelljs from 'shelljs';
11
+ import { Flags, SfCommand } from '@salesforce/sf-plugins-core';
12
+ import { Messages, SfError } from '@salesforce/core';
13
+ import { ensure, ensureNumber, get } from '@salesforce/ts-types';
14
+ import chalk from 'chalk';
15
+ import { parseJson } from '@salesforce/kit';
16
+ import { CLI } from '../../../types.js';
17
+ Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
18
+ const messages = Messages.loadMessages('@salesforce/plugin-release-management', 'cli.tarballs.verify');
19
+ const PASSED = chalk.green.bold('PASSED');
20
+ const FAILED = chalk.red.bold('FAILED');
23
21
  /**
24
22
  * Checks if a file path exists
25
23
  *
@@ -37,19 +35,35 @@ async function fileExists(filePath) {
37
35
  /**
38
36
  * The functionality of this command is taken entirely from https://github.com/salesforcecli/sfdx-cli/blob/v7.109.0/scripts/verify-tarballs
39
37
  */
40
- class Verify extends sf_plugins_core_1.SfCommand {
41
- constructor() {
42
- super(...arguments);
43
- this.step = 1;
44
- this.totalSteps = 1;
45
- }
38
+ export default class Verify extends SfCommand {
39
+ static summary = messages.getMessage('description');
40
+ static description = messages.getMessage('description');
41
+ static examples = messages.getMessages('examples');
42
+ static flags = {
43
+ cli: Flags.custom({
44
+ options: Object.values(CLI),
45
+ })({
46
+ summary: messages.getMessage('cli'),
47
+ default: CLI.SFDX,
48
+ char: 'c',
49
+ }),
50
+ ['windows-username-buffer']: Flags.integer({
51
+ summary: messages.getMessage('flags.windows-username-buffer.summary'),
52
+ default: 41,
53
+ char: 'w',
54
+ }),
55
+ };
56
+ baseDir;
57
+ step = 1;
58
+ totalSteps = 1;
59
+ flags;
46
60
  async run() {
47
61
  const { flags } = await this.parse(Verify);
48
62
  this.flags = flags;
49
- const cli = (0, ts_types_1.ensure)(this.flags.cli);
63
+ const cli = ensure(this.flags.cli);
50
64
  this.baseDir = path.join('tmp', cli);
51
65
  const cliRunLists = {
52
- [types_1.CLI.SFDX]: [
66
+ [CLI.SFDX]: [
53
67
  this.ensureNoWebDriverIO.bind(this),
54
68
  this.ensureNoHerokuCliUtilNyc.bind(this),
55
69
  this.ensureWindowsPathLengths.bind(this),
@@ -59,7 +73,7 @@ class Verify extends sf_plugins_core_1.SfCommand {
59
73
  this.ensureNoUnexpectedFiles.bind(this),
60
74
  this.ensureSfIsIncluded.bind(this),
61
75
  ],
62
- [types_1.CLI.SF]: [
76
+ [CLI.SF]: [
63
77
  this.ensureNoDistTestsOrMaps.bind(this),
64
78
  this.ensureNoUnexpectedFiles.bind(this),
65
79
  this.ensureWindowsPathLengths.bind(this),
@@ -87,7 +101,7 @@ class Verify extends sf_plugins_core_1.SfCommand {
87
101
  const validate = async () => !(await fileExists(webDriverIo));
88
102
  const passed = await this.execute('Ensure webdriverio does not exist', validate);
89
103
  if (!passed) {
90
- throw new core_1.SfError(`${webDriverIo} is present. Was the clean not aggressive enough?`);
104
+ throw new SfError(`${webDriverIo} is present. Was the clean not aggressive enough?`);
91
105
  }
92
106
  }
93
107
  async ensureNoHerokuCliUtilNyc() {
@@ -95,7 +109,7 @@ class Verify extends sf_plugins_core_1.SfCommand {
95
109
  const validate = async () => !(await fileExists(herokuCliUtil));
96
110
  const passed = await this.execute('Ensure heroku-cli-util/.nyc_output does not exist', validate);
97
111
  if (!passed) {
98
- throw new core_1.SfError(`${herokuCliUtil} is present. Was the clean not aggressive enough?`);
112
+ throw new SfError(`${herokuCliUtil} is present. Was the clean not aggressive enough?`);
99
113
  }
100
114
  }
101
115
  /**
@@ -108,8 +122,8 @@ class Verify extends sf_plugins_core_1.SfCommand {
108
122
  async ensureWindowsPathLengths() {
109
123
  const validate = async () => {
110
124
  const maxWindowsPath = 259;
111
- const cli = (0, ts_types_1.ensure)(this.flags.cli);
112
- const supportedUsernameLength = (0, ts_types_1.ensureNumber)(this.flags['windows-username-buffer']);
125
+ const cli = ensure(this.flags.cli);
126
+ const supportedUsernameLength = ensureNumber(this.flags['windows-username-buffer']);
113
127
  const fakeSupportedUsername = 'u'.repeat(supportedUsernameLength);
114
128
  const supportedBaseWindowsPath = `C:\\Users\\${fakeSupportedUsername}\\AppData\\Local\\${cli}\\tmp\\${cli}-cli-v1.xxx.yyy-abcdef-windows-x64\\`;
115
129
  const maxUsernameLength = 64;
@@ -133,11 +147,11 @@ class Verify extends sf_plugins_core_1.SfCommand {
133
147
  .sort();
134
148
  const errorPaths = paths.filter((p) => p.length >= supportedWindowsPathLength).sort();
135
149
  if (warnPaths.length) {
136
- this.log(`${chalk_1.yellow.bold('WARNING:')} Some paths could result in errors for Windows users with usernames that are ${maxUsernameLength} characters!`);
150
+ this.log(`${chalk.yellow.bold('WARNING:')} Some paths could result in errors for Windows users with usernames that are ${maxUsernameLength} characters!`);
137
151
  warnPaths.forEach((p) => this.log(`${p.length} - ${p}`));
138
152
  }
139
153
  if (errorPaths.length) {
140
- this.log(`${chalk_1.red.bold('ERROR:')} Unacceptably long paths detected in base build!`);
154
+ this.log(`${chalk.red.bold('ERROR:')} Unacceptably long paths detected in base build!`);
141
155
  errorPaths.forEach((p) => this.log(`${p.length} - ${p}`));
142
156
  return false;
143
157
  }
@@ -145,7 +159,7 @@ class Verify extends sf_plugins_core_1.SfCommand {
145
159
  };
146
160
  const passed = await this.execute('Ensure windows path lengths', validate);
147
161
  if (!passed) {
148
- throw new core_1.SfError('Unacceptably long paths detected in base build!');
162
+ throw new SfError('Unacceptably long paths detected in base build!');
149
163
  }
150
164
  }
151
165
  async ensureApexNode() {
@@ -153,7 +167,7 @@ class Verify extends sf_plugins_core_1.SfCommand {
153
167
  const validate = async () => fileExists(apexNodePath);
154
168
  const passed = await this.execute('Ensure apex-node exists', validate);
155
169
  if (!passed) {
156
- throw new core_1.SfError(`${apexNodePath} is missing!. Was the clean too aggressive?`);
170
+ throw new SfError(`${apexNodePath} is missing!. Was the clean too aggressive?`);
157
171
  }
158
172
  }
159
173
  async ensureTemplatesCommands() {
@@ -161,14 +175,14 @@ class Verify extends sf_plugins_core_1.SfCommand {
161
175
  const validate = async () => fileExists(templatesPath);
162
176
  const passed = await this.execute('Ensure templates commands exist', validate);
163
177
  if (!passed) {
164
- throw new core_1.SfError(`${templatesPath} is missing!. Was the doc clean too aggressive?`);
178
+ throw new SfError(`${templatesPath} is missing!. Was the doc clean too aggressive?`);
165
179
  }
166
180
  }
167
181
  async ensureNoDistTestsOrMaps() {
168
182
  const validate = async () => {
169
183
  const files = await fg([`${this.baseDir}/dist/*.test.js`, `${this.baseDir}/dist/*.js.map`]);
170
184
  if (files.length) {
171
- this.log(chalk_1.red.bold('Found the following in dist:'));
185
+ this.log(chalk.red.bold('Found the following in dist:'));
172
186
  for (const file of files)
173
187
  this.log(file);
174
188
  return false;
@@ -177,7 +191,7 @@ class Verify extends sf_plugins_core_1.SfCommand {
177
191
  };
178
192
  const passed = await this.execute('Ensure no tests or maps in dist', validate);
179
193
  if (!passed) {
180
- throw new core_1.SfError(`Found .test.js and/or .js.map files in ${path.join(this.baseDir, 'dist')}`);
194
+ throw new SfError(`Found .test.js and/or .js.map files in ${path.join(this.baseDir, 'dist')}`);
181
195
  }
182
196
  }
183
197
  async ensureNoUnexpectedFiles() {
@@ -199,7 +213,7 @@ class Verify extends sf_plugins_core_1.SfCommand {
199
213
  const allFiles = await fg([`${this.baseDir}/**/*`, `!${this.baseDir}/node_modules/**/*`]);
200
214
  const unexpectedFiles = allFiles.filter((f) => !expectedFiles.includes(f));
201
215
  if (unexpectedFiles.length) {
202
- this.log(chalk_1.red.bold('Found unexpected files in base build dir:'));
216
+ this.log(chalk.red.bold('Found unexpected files in base build dir:'));
203
217
  for (const file of unexpectedFiles)
204
218
  this.log(file);
205
219
  return false;
@@ -208,21 +222,21 @@ class Verify extends sf_plugins_core_1.SfCommand {
208
222
  };
209
223
  const passed = await this.execute('Ensure no unexpected files', validate);
210
224
  if (!passed) {
211
- throw new core_1.SfError('Unexpected file found in base build dir!');
225
+ throw new SfError('Unexpected file found in base build dir!');
212
226
  }
213
227
  }
214
228
  async ensureMdMessagesExist() {
215
229
  const validate = async () => {
216
230
  const fileData = await fs.readFile(path.join(this.baseDir, 'package.json'), 'utf8');
217
- const packageJson = (0, kit_1.parseJson)(fileData, path.join(this.baseDir, 'package.json'), false);
218
- const plugins = (0, ts_types_1.get)(packageJson, 'oclif.plugins', []);
231
+ const packageJson = parseJson(fileData, path.join(this.baseDir, 'package.json'), false);
232
+ const plugins = get(packageJson, 'oclif.plugins', []);
219
233
  const globs = plugins.map((p) => `${this.baseDir}/node_modules/${p}/messages/*.md`);
220
234
  const files = await fg(globs);
221
235
  return Boolean(files.length);
222
236
  };
223
237
  const passed = await this.execute('Ensure .md messages exist', validate);
224
238
  if (!passed) {
225
- throw new core_1.SfError('Found no .md message files. Was the clean too aggressive?');
239
+ throw new SfError('Found no .md message files. Was the clean too aggressive?');
226
240
  }
227
241
  }
228
242
  async ensureSfIsIncluded() {
@@ -231,32 +245,14 @@ class Verify extends sf_plugins_core_1.SfCommand {
231
245
  const sfBinExists = await fileExists(sfBin);
232
246
  const sfCmd = path.join(this.baseDir, 'bin', 'sf.cmd');
233
247
  const sfCmdExists = await fileExists(sfCmd);
234
- const version = (0, shelljs_1.exec)(`${sfBin} --version`, { silent: false });
235
- const help = (0, shelljs_1.exec)(`${sfBin} --help`, { silent: false });
248
+ const version = shelljs.exec(`${sfBin} --version`, { silent: false });
249
+ const help = shelljs.exec(`${sfBin} --help`, { silent: false });
236
250
  return sfBinExists && sfCmdExists && version.code === 0 && help.code === 0;
237
251
  };
238
252
  const passed = await this.execute('Ensure sf is included\n', validate);
239
253
  if (!passed) {
240
- throw new core_1.SfError('sf was not included! Did include-sf.js succeed?');
254
+ throw new SfError('sf was not included! Did include-sf.js succeed?');
241
255
  }
242
256
  }
243
257
  }
244
- Verify.summary = messages.getMessage('description');
245
- Verify.description = messages.getMessage('description');
246
- Verify.examples = messages.getMessages('examples');
247
- Verify.flags = {
248
- cli: sf_plugins_core_1.Flags.custom({
249
- options: Object.values(types_1.CLI),
250
- })({
251
- summary: messages.getMessage('cli'),
252
- default: types_1.CLI.SFDX,
253
- char: 'c',
254
- }),
255
- ['windows-username-buffer']: sf_plugins_core_1.Flags.integer({
256
- summary: messages.getMessage('flags.windows-username-buffer.summary'),
257
- default: 41,
258
- char: 'w',
259
- }),
260
- };
261
- exports.default = Verify;
262
258
  //# sourceMappingURL=verify.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"verify.js","sourceRoot":"","sources":["../../../../src/commands/cli/tarballs/verify.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,gCAAgC;AAChC,qCAA+B;AAC/B,iEAA+D;AAC/D,2CAAqD;AACrD,mDAAiE;AACjE,iCAA2C;AAC3C,yCAA4C;AAE5C,0CAAqC;AAErC,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,uCAAuC,EAAE,qBAAqB,CAAC,CAAC;AAEvG,MAAM,MAAM,GAAG,aAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACpC,MAAM,MAAM,GAAG,WAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAElC;;;;GAIG;AACH,KAAK,UAAU,UAAU,CAAC,QAAgB;IACxC,IAAI,CAAC;QACH,MAAM,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAqB,MAAO,SAAQ,2BAAe;IAAnD;;QAqBU,SAAI,GAAG,CAAC,CAAC;QACT,eAAU,GAAG,CAAC,CAAC;IAwOzB,CAAC;IApOQ,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC3C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,MAAM,GAAG,GAAG,IAAA,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CAAC,IAAI,KAAK,CAAC,CAAC;QAC7E,CAAC,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,yBAAyB,EAAE,QAAQ,CAAC,CAAC;QACvE,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,OAAO,CAAC,iDAAiD,CAAC,CAAC;QACvE,CAAC;IACH,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { SfCommand } from '@salesforce/sf-plugins-core';
2
2
  import { Interfaces } from '@oclif/core';
3
- import { CLI } from '../../../types';
3
+ import { CLI } from '../../../types.js';
4
4
  export type Info = {
5
5
  origin: string;
6
6
  version: string;
@@ -8,6 +8,7 @@ export type Info = {
8
8
  location: Location;
9
9
  dependencies: Dependency[];
10
10
  };
11
+ export type InspectResult = Info[];
11
12
  export type Dependency = {
12
13
  name: string;
13
14
  version: string;
@@ -26,7 +27,7 @@ export declare enum Location {
26
27
  }
27
28
  type ArchiveChannel = Extract<Channel, Channel.STABLE | Channel.STABLE_RC | Channel.NIGHTLY | Channel.LEGACY>;
28
29
  type Archives = Record<ArchiveChannel, string[]>;
29
- export default class Inspect extends SfCommand<Info[]> {
30
+ export default class Inspect extends SfCommand<InspectResult> {
30
31
  static readonly summary: string;
31
32
  static readonly description: string;
32
33
  static readonly examples: string[];
@@ -40,7 +41,7 @@ export default class Inspect extends SfCommand<Info[]> {
40
41
  workingDir: string;
41
42
  archives?: Archives;
42
43
  private flags;
43
- run(): Promise<Info[]>;
44
+ run(): Promise<InspectResult>;
44
45
  private initArchives;
45
46
  private inspectArchives;
46
47
  private inspectNpm;
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  /*
3
2
  * Copyright (c) 2020, salesforce.com, inc.
4
3
  * All rights reserved.
@@ -6,26 +5,24 @@
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
7
  /* eslint-disable no-await-in-loop */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.Location = exports.Channel = void 0;
11
- const os = require("node:os");
12
- const path = require("node:path");
13
- const util = require("node:util");
14
- const fs = require("node:fs/promises");
15
- const fg = require("fast-glob");
16
- const shelljs_1 = require("shelljs");
17
- const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
18
- const core_1 = require("@salesforce/core");
19
- const chalk_1 = require("chalk");
20
- const ts_types_1 = require("@salesforce/ts-types");
21
- const kit_1 = require("@salesforce/kit");
22
- const types_1 = require("../../../types");
23
- core_1.Messages.importMessagesDirectory(__dirname);
24
- const messages = core_1.Messages.loadMessages('@salesforce/plugin-release-management', 'cli.versions.inspect');
8
+ import os from 'node:os';
9
+ import path from 'node:path';
10
+ import util from 'node:util';
11
+ import fs from 'node:fs/promises';
12
+ import fg from 'fast-glob';
13
+ import shelljs from 'shelljs';
14
+ import { Flags, SfCommand } from '@salesforce/sf-plugins-core';
15
+ import { Messages, SfError } from '@salesforce/core';
16
+ import chalk from 'chalk';
17
+ import { ensure, entriesOf } from '@salesforce/ts-types';
18
+ import { parseJson } from '@salesforce/kit';
19
+ import { CLI } from '../../../types.js';
20
+ Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
21
+ const messages = Messages.loadMessages('@salesforce/plugin-release-management', 'cli.versions.inspect');
25
22
  const LEGACY_PATH = 'https://developer.salesforce.com/media/salesforce-cli/sfdx-cli/channels/stable';
26
23
  const LEGACY_TOP_LEVEL_PATH = 'https://developer.salesforce.com/media/salesforce-cli';
27
24
  const SALESFORCE_DEP_GLOBS = ['@salesforce/**/*', 'salesforce-alm', 'salesforcedx'];
28
- var Channel;
25
+ export var Channel;
29
26
  (function (Channel) {
30
27
  Channel["LEGACY"] = "legacy";
31
28
  Channel["STABLE"] = "stable";
@@ -33,12 +30,12 @@ var Channel;
33
30
  Channel["LATEST"] = "latest";
34
31
  Channel["LATEST_RC"] = "latest-rc";
35
32
  Channel["NIGHTLY"] = "nightly";
36
- })(Channel || (exports.Channel = Channel = {}));
37
- var Location;
33
+ })(Channel || (Channel = {}));
34
+ export var Location;
38
35
  (function (Location) {
39
36
  Location["ARCHIVE"] = "archive";
40
37
  Location["NPM"] = "npm";
41
- })(Location || (exports.Location = Location = {}));
38
+ })(Location || (Location = {}));
42
39
  const ARCHIVES = {
43
40
  [Channel.STABLE]: [
44
41
  '%s/%s-darwin-x64.tar.gz',
@@ -116,29 +113,64 @@ const CHANNEL_MAPPING = {
116
113
  },
117
114
  };
118
115
  const CLI_META = {
119
- [types_1.CLI.SFDX]: {
116
+ [CLI.SFDX]: {
120
117
  npm: 'https://www.npmjs.com/package/sfdx-cli',
121
118
  repoName: 'sfdx-cli',
122
119
  packageName: 'sfdx-cli',
123
120
  },
124
- [types_1.CLI.SF]: {
121
+ [CLI.SF]: {
125
122
  npm: 'https://www.npmjs.com/package/@salesforce/cli',
126
123
  repoName: 'cli',
127
124
  packageName: '@salesforce/cli',
128
125
  },
129
126
  };
130
- class Inspect extends sf_plugins_core_1.SfCommand {
131
- constructor() {
132
- super(...arguments);
133
- this.workingDir = path.join(os.tmpdir(), 'cli_inspection');
134
- }
127
+ export default class Inspect extends SfCommand {
128
+ static summary = messages.getMessage('description');
129
+ static description = messages.getMessage('description');
130
+ static examples = messages.getMessages('examples');
131
+ static flags = {
132
+ dependencies: Flags.string({
133
+ summary: messages.getMessage('flags.dependencies.summary'),
134
+ char: 'd',
135
+ multiple: true,
136
+ }),
137
+ salesforce: Flags.boolean({
138
+ summary: messages.getMessage('flags.salesforce.summary'),
139
+ char: 's',
140
+ default: false,
141
+ }),
142
+ channels: Flags.string({
143
+ summary: messages.getMessage('flags.channels.summary'),
144
+ char: 'c',
145
+ options: Object.values(Channel),
146
+ required: true,
147
+ multiple: true,
148
+ }),
149
+ locations: Flags.string({
150
+ summary: messages.getMessage('flags.locations.summary'),
151
+ char: 'l',
152
+ options: Object.values(Location),
153
+ required: true,
154
+ multiple: true,
155
+ }),
156
+ cli: Flags.custom({
157
+ options: Object.values(CLI),
158
+ })({
159
+ summary: messages.getMessage('flags.cli.summary'),
160
+ default: CLI.SFDX,
161
+ required: true,
162
+ }),
163
+ };
164
+ workingDir = path.join(os.tmpdir(), 'cli_inspection');
165
+ archives;
166
+ flags;
135
167
  async run() {
136
168
  const { flags } = await this.parse(Inspect);
137
169
  this.flags = flags;
138
170
  const locations = this.flags.locations;
139
171
  const channels = this.flags.channels;
140
- if (this.flags.cli === types_1.CLI.SF && channels.includes(Channel.LEGACY)) {
141
- throw new core_1.SfError('the sf CLI does not have a legacy channel');
172
+ if (this.flags.cli === CLI.SF && channels.includes(Channel.LEGACY)) {
173
+ throw new SfError('the sf CLI does not have a legacy channel');
142
174
  }
143
175
  this.log(`Working Directory: ${this.workingDir}`);
144
176
  // ensure that we are starting with a clean directory
@@ -158,13 +190,13 @@ class Inspect extends sf_plugins_core_1.SfCommand {
158
190
  return results;
159
191
  }
160
192
  initArchives() {
161
- const cli = (0, ts_types_1.ensure)(this.flags.cli);
193
+ const cli = ensure(this.flags.cli);
162
194
  const stablePath = `https://developer.salesforce.com/media/salesforce-cli/${cli}/channels/stable`;
163
195
  const stableRcPath = `https://developer.salesforce.com/media/salesforce-cli/${cli}/channels/stable-rc`;
164
196
  const nightlyPath = `https://developer.salesforce.com/media/salesforce-cli/${cli}/channels/nightly`;
165
197
  this.archives = {};
166
- for (const [channel, paths] of (0, ts_types_1.entriesOf)(ARCHIVES)) {
167
- if (channel === Channel.LEGACY && cli === types_1.CLI.SFDX) {
198
+ for (const [channel, paths] of entriesOf(ARCHIVES)) {
199
+ if (channel === Channel.LEGACY && cli === CLI.SFDX) {
168
200
  this.archives[channel] = paths.map((p) => {
169
201
  if (p.includes('amd64')) {
170
202
  return util.format(p, this.flags.cli);
@@ -195,20 +227,20 @@ class Inspect extends sf_plugins_core_1.SfCommand {
195
227
  for (const channel of Object.keys(pathsByChannel)) {
196
228
  this.log(`---- ${Location.ARCHIVE} ${channel} ----`);
197
229
  for (const archivePath of pathsByChannel[channel] ?? []) {
198
- this.spinner.start(`Downloading: ${(0, chalk_1.cyan)(archivePath)}`);
199
- const curlResult = (0, shelljs_1.exec)(`curl ${archivePath} -Os`, { cwd: tarDir });
230
+ this.spinner.start(`Downloading: ${chalk.cyan(archivePath)}`);
231
+ const curlResult = shelljs.exec(`curl ${archivePath} -Os`, { cwd: tarDir });
200
232
  this.spinner.stop();
201
233
  if (curlResult.code !== 0) {
202
- this.log((0, chalk_1.red)('Download failed. That is a big deal. Investigate immediately.'));
234
+ this.log(chalk.red('Download failed. That is a big deal. Investigate immediately.'));
203
235
  continue;
204
236
  }
205
237
  const filename = path.basename(archivePath);
206
238
  const unpackedDir = await mkdir(this.workingDir, 'unpacked', filename);
207
- this.spinner.start(`Unpacking: ${(0, chalk_1.cyan)(unpackedDir)}`);
208
- const tarResult = (0, shelljs_1.exec)(`tar -xf ${filename} -C ${unpackedDir} --strip-components 1`, { cwd: tarDir });
239
+ this.spinner.start(`Unpacking: ${chalk.cyan(unpackedDir)}`);
240
+ const tarResult = shelljs.exec(`tar -xf ${filename} -C ${unpackedDir} --strip-components 1`, { cwd: tarDir });
209
241
  this.spinner.stop();
210
242
  if (tarResult.code !== 0) {
211
- this.log((0, chalk_1.red)('Failed to unpack. Skipping...'));
243
+ this.log(chalk.red('Failed to unpack. Skipping...'));
212
244
  continue;
213
245
  }
214
246
  const pkgJson = await readPackageJson(unpackedDir);
@@ -232,8 +264,8 @@ class Inspect extends sf_plugins_core_1.SfCommand {
232
264
  this.log(`---- ${Location.NPM} ${tag} ----`);
233
265
  const installDir = await mkdir(npmDir, tag);
234
266
  const name = `${cliMeta.packageName}@${tag}`;
235
- this.spinner.start(`Installing: ${(0, chalk_1.cyan)(name)}`);
236
- (0, shelljs_1.exec)(`npm install ${name}`, { cwd: installDir, silent: true });
267
+ this.spinner.start(`Installing: ${chalk.cyan(name)}`);
268
+ shelljs.exec(`npm install ${name}`, { cwd: installDir, silent: true });
237
269
  this.spinner.stop();
238
270
  const pkgJson = await readPackageJson(path.join(installDir, 'node_modules', cliMeta.repoName));
239
271
  results.push({
@@ -272,7 +304,7 @@ class Inspect extends sf_plugins_core_1.SfCommand {
272
304
  let npmAndArchivesMatch;
273
305
  this.log();
274
306
  results.forEach((result) => {
275
- this.log((0, chalk_1.bold)(`${result.origin}: ${(0, chalk_1.green)(result.version)}`));
307
+ this.log(chalk.bold(`${result.origin}: ${chalk.green(result.version)}`));
276
308
  result.dependencies.forEach((dep) => {
277
309
  this.log(` ${dep.name}: ${dep.version}`);
278
310
  });
@@ -280,10 +312,10 @@ class Inspect extends sf_plugins_core_1.SfCommand {
280
312
  this.log();
281
313
  if (locations.includes(Location.ARCHIVE)) {
282
314
  const archivesMatch = new Set(results.filter((r) => r.location === Location.ARCHIVE).map((r) => r.version)).size === 1;
283
- this.log(`${'All archives match?'} ${archivesMatch ? (0, chalk_1.green)(archivesMatch) : (0, chalk_1.yellow)(archivesMatch)}`);
315
+ this.log(`${'All archives match?'} ${archivesMatch ? chalk.green(archivesMatch) : chalk.yellow(archivesMatch)}`);
284
316
  channels.forEach((channel) => {
285
317
  allMatch = new Set(results.filter((r) => r.channel === channel).map((r) => r.version)).size === 1;
286
- this.log(`${`All ${Location.ARCHIVE}@${channel} versions match?`} ${allMatch ? (0, chalk_1.green)(allMatch) : (0, chalk_1.red)(allMatch)}`);
318
+ this.log(`${`All ${Location.ARCHIVE}@${channel} versions match?`} ${allMatch ? chalk.green(allMatch) : chalk.red(allMatch)}`);
287
319
  });
288
320
  }
289
321
  if (locations.includes(Location.NPM) && locations.includes(Location.ARCHIVE)) {
@@ -294,56 +326,19 @@ class Inspect extends sf_plugins_core_1.SfCommand {
294
326
  const archiveChannel = CHANNEL_MAPPING[Location.ARCHIVE][channel];
295
327
  npmAndArchivesMatch =
296
328
  new Set(results.filter((r) => r.channel === npmChannel || r.channel === archiveChannel).map((r) => r.version)).size === 1;
297
- const match = npmAndArchivesMatch ? (0, chalk_1.green)(true) : (0, chalk_1.red)(false);
329
+ const match = npmAndArchivesMatch ? chalk.green(true) : chalk.red(false);
298
330
  this.log(`${Location.NPM}@${npmChannel} and all ${Location.ARCHIVE}@${archiveChannel} versions match? ${match}`);
299
331
  });
300
332
  }
301
333
  // npmAndArchivesMatch can be undefined
302
334
  if ((npmAndArchivesMatch !== undefined && !npmAndArchivesMatch) || !allMatch) {
303
- throw new core_1.SfError('Version Mismatch');
335
+ throw new SfError('Version Mismatch');
304
336
  }
305
337
  }
306
338
  }
307
- Inspect.summary = messages.getMessage('description');
308
- Inspect.description = messages.getMessage('description');
309
- Inspect.examples = messages.getMessages('examples');
310
- Inspect.flags = {
311
- dependencies: sf_plugins_core_1.Flags.string({
312
- summary: messages.getMessage('flags.dependencies.summary'),
313
- char: 'd',
314
- multiple: true,
315
- }),
316
- salesforce: sf_plugins_core_1.Flags.boolean({
317
- summary: messages.getMessage('flags.salesforce.summary'),
318
- char: 's',
319
- default: false,
320
- }),
321
- channels: sf_plugins_core_1.Flags.string({
322
- summary: messages.getMessage('flags.channels.summary'),
323
- char: 'c',
324
- options: Object.values(Channel),
325
- required: true,
326
- multiple: true,
327
- }),
328
- locations: sf_plugins_core_1.Flags.string({
329
- summary: messages.getMessage('flags.locations.summary'),
330
- char: 'l',
331
- options: Object.values(Location),
332
- required: true,
333
- multiple: true,
334
- }),
335
- cli: sf_plugins_core_1.Flags.custom({
336
- options: Object.values(types_1.CLI),
337
- })({
338
- summary: messages.getMessage('flags.cli.summary'),
339
- default: types_1.CLI.SFDX,
340
- required: true,
341
- }),
342
- };
343
- exports.default = Inspect;
344
339
  const readPackageJson = async (pkgDir) => {
345
340
  const fileData = await fs.readFile(path.join(pkgDir, 'package.json'), 'utf8');
346
- return (0, kit_1.parseJson)(fileData, path.join(pkgDir, 'package.json'), false);
341
+ return parseJson(fileData, path.join(pkgDir, 'package.json'), false);
347
342
  };
348
343
  const mkdir = async (...parts) => {
349
344
  const dir = path.resolve(path.join(...parts));