@salesforce/plugin-release-management 4.5.26 → 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.
- package/README.md +112 -135
- package/bin/dev.js +8 -6
- package/bin/run.js +7 -5
- package/lib/amazonS3.d.ts +4 -8
- package/lib/amazonS3.js +76 -81
- package/lib/amazonS3.js.map +1 -1
- package/lib/codeSigning/NpmName.js +5 -9
- package/lib/codeSigning/NpmName.js.map +1 -1
- package/lib/codeSigning/SimplifiedSigning.d.ts +1 -1
- package/lib/codeSigning/SimplifiedSigning.js +16 -21
- package/lib/codeSigning/SimplifiedSigning.js.map +1 -1
- package/lib/codeSigning/error.js +2 -6
- package/lib/codeSigning/error.js.map +1 -1
- package/lib/codeSigning/packAndSign.d.ts +2 -2
- package/lib/codeSigning/packAndSign.js +45 -44
- package/lib/codeSigning/packAndSign.js.map +1 -1
- package/lib/codeSigning/upload.d.ts +1 -1
- package/lib/codeSigning/upload.js +4 -8
- package/lib/codeSigning/upload.js.map +1 -1
- package/lib/commands/channel/promote.d.ts +11 -4
- package/lib/commands/channel/promote.js +113 -115
- package/lib/commands/channel/promote.js.map +1 -1
- package/lib/commands/cli/artifacts/compare.js +58 -52
- package/lib/commands/cli/artifacts/compare.js.map +1 -1
- package/lib/commands/cli/install/jit/test.d.ts +1 -1
- package/lib/commands/cli/install/jit/test.js +18 -21
- package/lib/commands/cli/install/jit/test.js.map +1 -1
- package/lib/commands/cli/install/test.d.ts +4 -4
- package/lib/commands/cli/install/test.js +114 -106
- package/lib/commands/cli/install/test.js.map +1 -1
- package/lib/commands/cli/release/automerge.d.ts +5 -5
- package/lib/commands/cli/release/automerge.js +44 -47
- package/lib/commands/cli/release/automerge.js.map +1 -1
- package/lib/commands/cli/release/build.d.ts +12 -12
- package/lib/commands/cli/release/build.js +78 -81
- package/lib/commands/cli/release/build.js.map +1 -1
- package/lib/commands/cli/releasenotes.d.ts +4 -4
- package/lib/commands/cli/releasenotes.js +49 -54
- package/lib/commands/cli/releasenotes.js.map +1 -1
- package/lib/commands/cli/tarballs/prepare.js +31 -33
- package/lib/commands/cli/tarballs/prepare.js.map +1 -1
- package/lib/commands/cli/tarballs/smoke.js +33 -32
- package/lib/commands/cli/tarballs/smoke.js.map +1 -1
- package/lib/commands/cli/tarballs/verify.d.ts +1 -1
- package/lib/commands/cli/tarballs/verify.js +58 -62
- package/lib/commands/cli/tarballs/verify.js.map +1 -1
- package/lib/commands/cli/versions/inspect.d.ts +4 -3
- package/lib/commands/cli/versions/inspect.js +79 -84
- package/lib/commands/cli/versions/inspect.js.map +1 -1
- package/lib/commands/dependabot/automerge.d.ts +6 -6
- package/lib/commands/dependabot/automerge.js +48 -48
- package/lib/commands/dependabot/automerge.js.map +1 -1
- package/lib/commands/github/check/closed.d.ts +7 -5
- package/lib/commands/github/check/closed.js +25 -28
- package/lib/commands/github/check/closed.js.map +1 -1
- package/lib/commands/npm/dependencies/pin.d.ts +3 -3
- package/lib/commands/npm/dependencies/pin.js +21 -24
- package/lib/commands/npm/dependencies/pin.js.map +1 -1
- package/lib/commands/npm/package/release.d.ts +11 -12
- package/lib/commands/npm/package/release.js +58 -61
- package/lib/commands/npm/package/release.js.map +1 -1
- package/lib/commands/repositories/index.d.ts +4 -3
- package/lib/commands/repositories/index.js +17 -20
- package/lib/commands/repositories/index.js.map +1 -1
- package/lib/dependabot.d.ts +1 -1
- package/lib/dependabot.js +13 -17
- package/lib/dependabot.js.map +1 -1
- package/lib/dependencies.d.ts +1 -1
- package/lib/dependencies.js +3 -7
- package/lib/dependencies.js.map +1 -1
- package/lib/index.d.ts +1 -2
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/lib/jit.js +18 -22
- package/lib/jit.js.map +1 -1
- package/lib/package.d.ts +0 -2
- package/lib/package.js +36 -59
- package/lib/package.js.map +1 -1
- package/lib/registry.js +19 -18
- package/lib/registry.js.map +1 -1
- package/lib/repositories.js +5 -9
- package/lib/repositories.js.map +1 -1
- package/lib/repository.d.ts +5 -7
- package/lib/repository.js +41 -43
- package/lib/repository.js.map +1 -1
- package/lib/types.js +4 -7
- package/lib/types.js.map +1 -1
- package/npm-shrinkwrap.json +2992 -2265
- package/oclif.manifest.json +17 -69
- package/package.json +12 -11
- package/lib/commands/cli/schemas/compare.d.ts +0 -19
- package/lib/commands/cli/schemas/compare.js +0 -114
- package/lib/commands/cli/schemas/compare.js.map +0 -1
- package/messages/cli.schemas.compare.md +0 -7
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
-
import { ChangedPackageVersions } from '../../../package';
|
|
2
|
+
import { ChangedPackageVersions } from '../../../package.js';
|
|
3
3
|
export default class Pin extends SfCommand<ChangedPackageVersions> {
|
|
4
4
|
static readonly summary: string;
|
|
5
5
|
static readonly description: string;
|
|
6
6
|
static readonly flags: {
|
|
7
|
-
dryrun: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
-
tag: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
dryrun: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
8
|
+
tag: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
9
9
|
};
|
|
10
10
|
run(): Promise<ChangedPackageVersions>;
|
|
11
11
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
4
3
|
* All rights reserved.
|
|
@@ -6,16 +5,29 @@
|
|
|
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 sf-plugin/command-example */
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
import { Flags, SfCommand } from '@salesforce/sf-plugins-core';
|
|
9
|
+
import { Messages } from '@salesforce/core';
|
|
10
|
+
import { Package } from '../../../package.js';
|
|
11
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
12
|
+
const messages = Messages.loadMessages('@salesforce/plugin-release-management', 'npm.dependencies.pin');
|
|
13
|
+
export default class Pin extends SfCommand {
|
|
14
|
+
static summary = messages.getMessage('description');
|
|
15
|
+
static description = messages.getMessage('description');
|
|
16
|
+
static flags = {
|
|
17
|
+
dryrun: Flags.boolean({
|
|
18
|
+
char: 'd',
|
|
19
|
+
default: false,
|
|
20
|
+
summary: messages.getMessage('flags.dryrun.summary'),
|
|
21
|
+
}),
|
|
22
|
+
tag: Flags.string({
|
|
23
|
+
char: 't',
|
|
24
|
+
summary: messages.getMessage('flags.tag.summary'),
|
|
25
|
+
default: 'latest',
|
|
26
|
+
}),
|
|
27
|
+
};
|
|
16
28
|
async run() {
|
|
17
29
|
const { flags } = await this.parse(Pin);
|
|
18
|
-
const packageJson = await
|
|
30
|
+
const packageJson = await Package.create();
|
|
19
31
|
const pkg = packageJson.pinDependencyVersions(flags.tag);
|
|
20
32
|
if (flags.dryrun) {
|
|
21
33
|
this.warn('Running in --dryrun mode. No changes will be written to the package.json.');
|
|
@@ -32,19 +44,4 @@ class Pin extends sf_plugins_core_1.SfCommand {
|
|
|
32
44
|
return pkg;
|
|
33
45
|
}
|
|
34
46
|
}
|
|
35
|
-
Pin.summary = messages.getMessage('description');
|
|
36
|
-
Pin.description = messages.getMessage('description');
|
|
37
|
-
Pin.flags = {
|
|
38
|
-
dryrun: sf_plugins_core_1.Flags.boolean({
|
|
39
|
-
char: 'd',
|
|
40
|
-
default: false,
|
|
41
|
-
summary: messages.getMessage('flags.dryrun.summary'),
|
|
42
|
-
}),
|
|
43
|
-
tag: sf_plugins_core_1.Flags.string({
|
|
44
|
-
char: 't',
|
|
45
|
-
summary: messages.getMessage('flags.tag.summary'),
|
|
46
|
-
default: 'latest',
|
|
47
|
-
}),
|
|
48
|
-
};
|
|
49
|
-
exports.default = Pin;
|
|
50
47
|
//# sourceMappingURL=pin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pin.js","sourceRoot":"","sources":["../../../../src/commands/npm/dependencies/pin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pin.js","sourceRoot":"","sources":["../../../../src/commands/npm/dependencies/pin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,8CAA8C;AAE9C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAA0B,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEtE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,uCAAuC,EAAE,sBAAsB,CAAC,CAAC;AAExG,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,SAAiC;IACzD,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IAC7D,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IAEjE,MAAM,CAAU,KAAK,GAAG;QAC7B,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC;YACpB,IAAI,EAAE,GAAG;YACT,OAAO,EAAE,KAAK;YACd,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,sBAAsB,CAAC;SACrD,CAAC;QACF,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC;YAChB,IAAI,EAAE,GAAG;YACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,mBAAmB,CAAC;YACjD,OAAO,EAAE,QAAQ;SAClB,CAAC;KACH,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxC,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC;QAC3C,MAAM,GAAG,GAAG,WAAW,CAAC,qBAAqB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEzD,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;YACjB,IAAI,CAAC,IAAI,CAAC,2EAA2E,CAAC,CAAC;QACzF,CAAC;aAAM,CAAC;YACN,WAAW,CAAC,gBAAgB,EAAE,CAAC;QACjC,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE;YACd,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;YACxB,OAAO,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE;YAC9B,GAAG,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;YACtB,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE;SAC3B,CAAC,CAAC;QAEH,OAAO,GAAG,CAAC;IACb,CAAC"}
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
-
import { PackageInfo } from '../../../repository';
|
|
3
|
-
|
|
2
|
+
import { PackageInfo } from '../../../repository.js';
|
|
3
|
+
export type ReleaseResult = {
|
|
4
4
|
version: string;
|
|
5
5
|
name: string;
|
|
6
|
-
}
|
|
6
|
+
};
|
|
7
7
|
export default class Release extends SfCommand<ReleaseResult> {
|
|
8
8
|
static readonly summary: string;
|
|
9
9
|
static readonly description: string;
|
|
10
10
|
static readonly flags: {
|
|
11
|
-
dryrun: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
|
-
sign: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
|
-
npmtag: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
-
npmaccess: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
|
-
install: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
|
-
prerelease: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
|
-
verify: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
18
|
-
githubtag: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
dryrun: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
12
|
+
sign: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
13
|
+
npmtag: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
14
|
+
npmaccess: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
15
|
+
install: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
16
|
+
prerelease: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
17
|
+
verify: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
18
|
+
githubtag: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
19
19
|
};
|
|
20
20
|
run(): Promise<ReleaseResult>;
|
|
21
21
|
protected verifySign(pkgInfo: PackageInfo): void;
|
|
22
22
|
}
|
|
23
|
-
export {};
|
|
@@ -1,35 +1,73 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright (c) 2020, 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
|
-
|
|
7
|
+
import os from 'node:os';
|
|
8
|
+
import chalk from 'chalk';
|
|
9
|
+
import { Flags, SfCommand, Ux } from '@salesforce/sf-plugins-core';
|
|
10
|
+
import { Messages, SfError } from '@salesforce/core';
|
|
11
|
+
import shelljs from 'shelljs';
|
|
12
|
+
import { isString } from '@salesforce/ts-types';
|
|
13
|
+
import { verifyDependencies } from '../../../dependencies.js';
|
|
14
|
+
import { PackageRepo } from '../../../repository.js';
|
|
15
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
16
|
+
const messages = Messages.loadMessages('@salesforce/plugin-release-management', 'npm.package.release');
|
|
17
|
+
export default class Release extends SfCommand {
|
|
18
|
+
static summary = messages.getMessage('description');
|
|
19
|
+
static description = messages.getMessage('description');
|
|
20
|
+
static flags = {
|
|
21
|
+
dryrun: Flags.boolean({
|
|
22
|
+
char: 'd',
|
|
23
|
+
default: false,
|
|
24
|
+
summary: messages.getMessage('flags.dryrun.summary'),
|
|
25
|
+
}),
|
|
26
|
+
sign: Flags.boolean({
|
|
27
|
+
char: 's',
|
|
28
|
+
default: false,
|
|
29
|
+
summary: messages.getMessage('flags.sign.summary'),
|
|
30
|
+
}),
|
|
31
|
+
npmtag: Flags.string({
|
|
32
|
+
char: 't',
|
|
33
|
+
default: 'latest',
|
|
34
|
+
summary: messages.getMessage('flags.npmtag.summary'),
|
|
35
|
+
}),
|
|
36
|
+
npmaccess: Flags.string({
|
|
37
|
+
char: 'a',
|
|
38
|
+
default: 'public',
|
|
39
|
+
summary: messages.getMessage('flags.npmaccess.summary'),
|
|
40
|
+
}),
|
|
41
|
+
install: Flags.boolean({
|
|
42
|
+
default: true,
|
|
43
|
+
summary: messages.getMessage('flags.install.summary'),
|
|
44
|
+
allowNo: true,
|
|
45
|
+
}),
|
|
46
|
+
prerelease: Flags.string({
|
|
47
|
+
summary: messages.getMessage('flags.prerelease.summary'),
|
|
48
|
+
}),
|
|
49
|
+
verify: Flags.boolean({
|
|
50
|
+
summary: messages.getMessage('flags.verify.summary'),
|
|
51
|
+
default: true,
|
|
52
|
+
allowNo: true,
|
|
53
|
+
}),
|
|
54
|
+
githubtag: Flags.string({
|
|
55
|
+
summary: messages.getMessage('flags.githubtag.summary'),
|
|
56
|
+
}),
|
|
57
|
+
};
|
|
20
58
|
async run() {
|
|
21
59
|
const { flags } = await this.parse(Release);
|
|
22
|
-
const deps =
|
|
60
|
+
const deps = verifyDependencies(flags);
|
|
23
61
|
if (deps.failures > 0) {
|
|
24
62
|
const errType = 'MissingDependencies';
|
|
25
63
|
const missing = deps.results
|
|
26
64
|
.filter((d) => d.passed === false)
|
|
27
65
|
.map((d) => d.message)
|
|
28
|
-
.filter(
|
|
29
|
-
throw new
|
|
66
|
+
.filter(isString);
|
|
67
|
+
throw new SfError(messages.getMessage(errType), errType, missing);
|
|
30
68
|
}
|
|
31
|
-
const pkg = await
|
|
32
|
-
ux: new
|
|
69
|
+
const pkg = await PackageRepo.create({
|
|
70
|
+
ux: new Ux({ jsonEnabled: this.jsonEnabled() }),
|
|
33
71
|
useprerelease: flags.prerelease,
|
|
34
72
|
});
|
|
35
73
|
await pkg.writeNpmToken();
|
|
@@ -84,7 +122,7 @@ class Release extends sf_plugins_core_1.SfCommand {
|
|
|
84
122
|
const argv = `--npm ${pkgInfo.name}@${pkgInfo.nextVersion} ${pkgInfo.registryParam}`;
|
|
85
123
|
this.log(chalk.dim(`sf-release ${cmd} ${argv}`) + os.EOL);
|
|
86
124
|
try {
|
|
87
|
-
const result =
|
|
125
|
+
const result = shelljs.exec(`DEBUG=sfdx:* ${this.config.root}/bin/run ${cmd} ${argv}`);
|
|
88
126
|
if (result.code !== 0) {
|
|
89
127
|
const sfdxVerifyCmd = `sfdx plugins:trust:verify ${argv}`;
|
|
90
128
|
this.warn('Unable to verify the package signature due to:\n\nFailed to find @salesforce/sfdx-scanner@3.1.0 in the registry\n' +
|
|
@@ -95,49 +133,8 @@ class Release extends sf_plugins_core_1.SfCommand {
|
|
|
95
133
|
if (!(err instanceof Error) || typeof err !== 'string') {
|
|
96
134
|
throw err;
|
|
97
135
|
}
|
|
98
|
-
throw new
|
|
136
|
+
throw new SfError(err, 'FailedCommandExecution');
|
|
99
137
|
}
|
|
100
138
|
}
|
|
101
139
|
}
|
|
102
|
-
Release.summary = messages.getMessage('description');
|
|
103
|
-
Release.description = messages.getMessage('description');
|
|
104
|
-
Release.flags = {
|
|
105
|
-
dryrun: sf_plugins_core_1.Flags.boolean({
|
|
106
|
-
char: 'd',
|
|
107
|
-
default: false,
|
|
108
|
-
summary: messages.getMessage('flags.dryrun.summary'),
|
|
109
|
-
}),
|
|
110
|
-
sign: sf_plugins_core_1.Flags.boolean({
|
|
111
|
-
char: 's',
|
|
112
|
-
default: false,
|
|
113
|
-
summary: messages.getMessage('flags.sign.summary'),
|
|
114
|
-
}),
|
|
115
|
-
npmtag: sf_plugins_core_1.Flags.string({
|
|
116
|
-
char: 't',
|
|
117
|
-
default: 'latest',
|
|
118
|
-
summary: messages.getMessage('flags.npmtag.summary'),
|
|
119
|
-
}),
|
|
120
|
-
npmaccess: sf_plugins_core_1.Flags.string({
|
|
121
|
-
char: 'a',
|
|
122
|
-
default: 'public',
|
|
123
|
-
summary: messages.getMessage('flags.npmaccess.summary'),
|
|
124
|
-
}),
|
|
125
|
-
install: sf_plugins_core_1.Flags.boolean({
|
|
126
|
-
default: true,
|
|
127
|
-
summary: messages.getMessage('flags.install.summary'),
|
|
128
|
-
allowNo: true,
|
|
129
|
-
}),
|
|
130
|
-
prerelease: sf_plugins_core_1.Flags.string({
|
|
131
|
-
summary: messages.getMessage('flags.prerelease.summary'),
|
|
132
|
-
}),
|
|
133
|
-
verify: sf_plugins_core_1.Flags.boolean({
|
|
134
|
-
summary: messages.getMessage('flags.verify.summary'),
|
|
135
|
-
default: true,
|
|
136
|
-
allowNo: true,
|
|
137
|
-
}),
|
|
138
|
-
githubtag: sf_plugins_core_1.Flags.string({
|
|
139
|
-
summary: messages.getMessage('flags.githubtag.summary'),
|
|
140
|
-
}),
|
|
141
|
-
};
|
|
142
|
-
exports.default = Release;
|
|
143
140
|
//# sourceMappingURL=release.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release.js","sourceRoot":"","sources":["../../../../src/commands/npm/package/release.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"release.js","sourceRoot":"","sources":["../../../../src/commands/npm/package/release.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAU,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG7D,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,uCAAuC,EAAE,qBAAqB,CAAC,CAAC;AAOvG,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,SAAwB;IACpD,MAAM,CAAU,OAAO,GAAG,QAAQ,C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AAC;YACD,MAAM,IAAI,OAAO,CAAC,GAAG,EAAE,wBAAwB,CAAC,CAAC;QACnD,CAAC;IACH,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
-
import { RepositoryInfo } from '../../repositories';
|
|
3
|
-
export
|
|
2
|
+
import { RepositoryInfo } from '../../repositories.js';
|
|
3
|
+
export type RepositoryResult = RepositoryInfo[];
|
|
4
|
+
export default class Repositories extends SfCommand<RepositoryResult> {
|
|
4
5
|
static readonly summary: string;
|
|
5
6
|
static readonly description: string;
|
|
6
7
|
static readonly examples: string[];
|
|
7
8
|
static readonly flags: any;
|
|
8
|
-
run(): Promise<
|
|
9
|
+
run(): Promise<RepositoryResult>;
|
|
9
10
|
}
|
|
@@ -1,23 +1,29 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright (c) 2020, 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
|
-
|
|
7
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
8
|
+
import { Messages } from '@salesforce/core';
|
|
9
|
+
import { ux } from '@oclif/core';
|
|
10
|
+
import { retrieveKnownRepositories } from '../../repositories.js';
|
|
11
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
12
|
+
const messages = Messages.loadMessages('@salesforce/plugin-release-management', 'repositories');
|
|
13
|
+
export default class Repositories extends SfCommand {
|
|
14
|
+
static summary = messages.getMessage('description');
|
|
15
|
+
static description = messages.getMessage('description');
|
|
16
|
+
static examples = messages.getMessages('examples');
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
18
|
+
static flags = {
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
|
+
...ux.table.flags(),
|
|
21
|
+
};
|
|
16
22
|
async run() {
|
|
17
23
|
const { flags } = await this.parse(Repositories);
|
|
18
|
-
const repositories = await
|
|
24
|
+
const repositories = await retrieveKnownRepositories();
|
|
19
25
|
if (!flags.json) {
|
|
20
|
-
|
|
26
|
+
ux.table(repositories, {
|
|
21
27
|
organization: {},
|
|
22
28
|
name: {},
|
|
23
29
|
url: {},
|
|
@@ -34,13 +40,4 @@ class Repositories extends sf_plugins_core_1.SfCommand {
|
|
|
34
40
|
return repositories;
|
|
35
41
|
}
|
|
36
42
|
}
|
|
37
|
-
Repositories.summary = messages.getMessage('description');
|
|
38
|
-
Repositories.description = messages.getMessage('description');
|
|
39
|
-
Repositories.examples = messages.getMessages('examples');
|
|
40
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
41
|
-
Repositories.flags = {
|
|
42
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
43
|
-
...core_2.ux.table.flags(),
|
|
44
|
-
};
|
|
45
|
-
exports.default = Repositories;
|
|
46
43
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/repositories/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/repositories/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAkB,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAElF,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IA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C;QACJ,CAAC;QACD,OAAO,YAAY,CAAC;IACtB,CAAC"}
|
package/lib/dependabot.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const maxVersionBumpFlag: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
1
|
+
export declare const maxVersionBumpFlag: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
2
2
|
export declare const getOwnerAndRepo: (ownerFlag?: string, repoFlag?: string) => Promise<{
|
|
3
3
|
owner: string;
|
|
4
4
|
repo: string;
|
package/lib/dependabot.js
CHANGED
|
@@ -1,43 +1,39 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getOwnerAndRepo = exports.maxVersionBumpFlag = 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
|
-
|
|
15
|
-
|
|
16
|
-
const messages =
|
|
17
|
-
|
|
7
|
+
import fs from 'node:fs';
|
|
8
|
+
import { Flags } from '@salesforce/sf-plugins-core';
|
|
9
|
+
import { Messages } from '@salesforce/core';
|
|
10
|
+
import { parseJson } from '@salesforce/kit';
|
|
11
|
+
import { ensureString, isString } from '@salesforce/ts-types';
|
|
12
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
13
|
+
const messages = Messages.loadMessages('@salesforce/plugin-release-management', 'dependabot.consolidate');
|
|
14
|
+
export const maxVersionBumpFlag = Flags.string({
|
|
18
15
|
description: messages.getMessage('maxVersionBump'),
|
|
19
16
|
char: 'm',
|
|
20
17
|
options: ['major', 'minor', 'patch'],
|
|
21
18
|
default: 'minor',
|
|
22
19
|
required: true,
|
|
23
20
|
});
|
|
24
|
-
const getOwnerAndRepo = async (ownerFlag, repoFlag) => {
|
|
21
|
+
export const getOwnerAndRepo = async (ownerFlag, repoFlag) => {
|
|
25
22
|
if (ownerFlag && repoFlag) {
|
|
26
23
|
return { owner: ownerFlag, repo: repoFlag };
|
|
27
24
|
}
|
|
28
25
|
// read it from package.json
|
|
29
26
|
const fileData = await fs.promises.readFile('package.json', 'utf8');
|
|
30
|
-
const pkgJson =
|
|
31
|
-
if (
|
|
27
|
+
const pkgJson = parseJson(fileData, 'package.json', false);
|
|
28
|
+
if (isString(pkgJson.repository)) {
|
|
32
29
|
const [owner, repo] = pkgJson.repository.split('/');
|
|
33
30
|
return { owner, repo };
|
|
34
31
|
}
|
|
35
32
|
else {
|
|
36
33
|
return {
|
|
37
|
-
owner:
|
|
38
|
-
repo:
|
|
34
|
+
owner: ensureString(ownerFlag, 'You must specify an owner'),
|
|
35
|
+
repo: ensureString(repoFlag, 'You must specify a repository'),
|
|
39
36
|
};
|
|
40
37
|
}
|
|
41
38
|
};
|
|
42
|
-
exports.getOwnerAndRepo = getOwnerAndRepo;
|
|
43
39
|
//# sourceMappingURL=dependabot.js.map
|
package/lib/dependabot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependabot.js","sourceRoot":"","sources":["../src/dependabot.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dependabot.js","sourceRoot":"","sources":["../src/dependabot.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAA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,EAAE,+BAA+B,CAAC;SAC9D,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
|
package/lib/dependencies.d.ts
CHANGED
package/lib/dependencies.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.verifyDependencies = 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
|
-
|
|
7
|
+
import { Env } from '@salesforce/kit';
|
|
11
8
|
const DEPENDENCIES = [
|
|
12
9
|
{
|
|
13
10
|
name: 'AWS_ACCESS_KEY_ID',
|
|
@@ -37,8 +34,8 @@ const DEPENDENCIES = [
|
|
|
37
34
|
* @param condition a function that runs on the args
|
|
38
35
|
* @returns
|
|
39
36
|
*/
|
|
40
|
-
function verifyDependencies(args, depFilter = (dep) => !!dep, condition = (a) => !!a && false) {
|
|
41
|
-
const env = new
|
|
37
|
+
export function verifyDependencies(args, depFilter = (dep) => !!dep, condition = (a) => !!a && false) {
|
|
38
|
+
const env = new Env();
|
|
42
39
|
const results = [];
|
|
43
40
|
for (const dep of DEPENDENCIES.filter(depFilter)) {
|
|
44
41
|
const result = {
|
|
@@ -57,5 +54,4 @@ function verifyDependencies(args, depFilter = (dep) => !!dep, condition = (a) =>
|
|
|
57
54
|
const failures = results.filter((r) => r.passed === false).length;
|
|
58
55
|
return { failures, results };
|
|
59
56
|
}
|
|
60
|
-
exports.verifyDependencies = verifyDependencies;
|
|
61
57
|
//# sourceMappingURL=dependencies.js.map
|
package/lib/dependencies.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependencies.js","sourceRoot":"","sources":["../src/dependencies.ts"],"names":[],"m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C,IAAI,CAAC,IAAI,GAAG,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;YAC7C,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAC1C,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;gBACnB,MAAM,CAAC,OAAO,GAAG,OAAO,GAAG,CAAC,IAAI,uBAAuB,CAAC;YAC1D,CAAC;QACH,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,KAAK,CAAC,CAAC,MAAM,CAAC;IAClE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;AAC/B,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export = _default;
|
|
1
|
+
export {};
|
package/lib/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright (c) 2020, 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
|
-
|
|
7
|
+
export {};
|
|
9
8
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
package/lib/jit.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.testJITInstall = void 0;
|
|
4
1
|
/*
|
|
5
2
|
* Copyright (c) 2023, salesforce.com, inc.
|
|
6
3
|
* All rights reserved.
|
|
@@ -8,17 +5,17 @@ exports.testJITInstall = void 0;
|
|
|
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
7
|
/* eslint-disable no-await-in-loop */
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const exec =
|
|
8
|
+
import fs from 'node:fs';
|
|
9
|
+
import path from 'node:path';
|
|
10
|
+
import os from 'node:os';
|
|
11
|
+
import { promisify } from 'node:util';
|
|
12
|
+
import { exec as execSync } from 'node:child_process';
|
|
13
|
+
import { Ux } from '@salesforce/sf-plugins-core';
|
|
14
|
+
import chalk from 'chalk';
|
|
15
|
+
import { SfError } from '@salesforce/core';
|
|
16
|
+
import { parseJson } from '@salesforce/kit';
|
|
17
|
+
import stripAnsi from 'strip-ansi';
|
|
18
|
+
const exec = promisify(execSync);
|
|
22
19
|
async function exists(filePath) {
|
|
23
20
|
try {
|
|
24
21
|
await fs.promises.access(filePath);
|
|
@@ -28,10 +25,10 @@ async function exists(filePath) {
|
|
|
28
25
|
return false;
|
|
29
26
|
}
|
|
30
27
|
}
|
|
31
|
-
async function testJITInstall(options) {
|
|
28
|
+
export async function testJITInstall(options) {
|
|
32
29
|
const { jsonEnabled, jitPlugin } = options;
|
|
33
30
|
let { executable } = options;
|
|
34
|
-
const ux = new
|
|
31
|
+
const ux = new Ux({ jsonEnabled });
|
|
35
32
|
if (executable.endsWith('run') && !(await exists(executable))) {
|
|
36
33
|
// This is a workaround for the ESM branch of sf.
|
|
37
34
|
// If the executable is bin/run but it doesn't exist, that likely means
|
|
@@ -44,7 +41,7 @@ async function testJITInstall(options) {
|
|
|
44
41
|
await fs.promises.mkdir(tmpDir, { recursive: true });
|
|
45
42
|
ux.styledHeader('Testing JIT installation');
|
|
46
43
|
const fileData = await fs.promises.readFile('package.json', 'utf8');
|
|
47
|
-
const packageJson =
|
|
44
|
+
const packageJson = parseJson(fileData);
|
|
48
45
|
const jitPlugins = jitPlugin ?? Object.keys(packageJson.oclif?.jitPlugins ?? {});
|
|
49
46
|
if (jitPlugins.length === 0)
|
|
50
47
|
return;
|
|
@@ -59,7 +56,7 @@ async function testJITInstall(options) {
|
|
|
59
56
|
await exec('yarn oclif manifest');
|
|
60
57
|
manifestData = await fs.promises.readFile('oclif.manifest.json', 'utf8');
|
|
61
58
|
}
|
|
62
|
-
const manifest =
|
|
59
|
+
const manifest = parseJson(manifestData);
|
|
63
60
|
const commands = Object.values(manifest.commands);
|
|
64
61
|
const help = async (command) => {
|
|
65
62
|
try {
|
|
@@ -72,7 +69,7 @@ async function testJITInstall(options) {
|
|
|
72
69
|
};
|
|
73
70
|
const verifyInstall = async (plugin, dataDir) => {
|
|
74
71
|
const userPjsonRaw = await fs.promises.readFile(path.join(dataDir, 'package.json'), 'utf-8');
|
|
75
|
-
const userPjson =
|
|
72
|
+
const userPjson = parseJson(userPjsonRaw);
|
|
76
73
|
return Boolean(userPjson.dependencies?.[plugin]);
|
|
77
74
|
};
|
|
78
75
|
const passedInstalls = [];
|
|
@@ -90,7 +87,7 @@ async function testJITInstall(options) {
|
|
|
90
87
|
try {
|
|
91
88
|
const firstCommand = commands.find((c) => c.pluginName === plugin);
|
|
92
89
|
if (!firstCommand) {
|
|
93
|
-
throw new
|
|
90
|
+
throw new SfError(`Unable to find command for ${plugin}`);
|
|
94
91
|
}
|
|
95
92
|
// Test that --help works on JIT commands
|
|
96
93
|
const helpResult = await help(firstCommand.id);
|
|
@@ -140,8 +137,7 @@ async function testJITInstall(options) {
|
|
|
140
137
|
ux.log();
|
|
141
138
|
ux.log(`Failed (${failedInstalls.length})`);
|
|
142
139
|
failedInstalls.forEach((msg) => ux.log(`• ${msg}`));
|
|
143
|
-
throw new
|
|
140
|
+
throw new SfError('Failed JIT installation');
|
|
144
141
|
}
|
|
145
142
|
}
|
|
146
|
-
exports.testJITInstall = testJITInstall;
|
|
147
143
|
//# sourceMappingURL=jit.js.map
|