@salesforce/plugin-trust 2.6.21 → 2.6.23
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 +6 -6
- package/bin/dev.cmd +1 -1
- package/bin/dev.js +8 -0
- package/bin/run.cmd +1 -1
- package/bin/run.js +9 -0
- package/lib/commands/plugins/trust/verify.d.ts +3 -3
- package/lib/commands/plugins/trust/verify.js +32 -33
- package/lib/commands/plugins/trust/verify.js.map +1 -1
- package/lib/hooks/jitPluginInstall.js +5 -7
- package/lib/hooks/jitPluginInstall.js.map +1 -1
- package/lib/hooks/verifyInstallSignature.js +13 -17
- package/lib/hooks/verifyInstallSignature.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/lib/shared/NpmName.js +12 -11
- package/lib/shared/NpmName.js.map +1 -1
- package/lib/shared/errors.js +1 -5
- package/lib/shared/errors.js.map +1 -1
- package/lib/shared/installationVerification.d.ts +3 -3
- package/lib/shared/installationVerification.js +71 -69
- package/lib/shared/installationVerification.js.map +1 -1
- package/lib/shared/npmCommand.d.ts +1 -1
- package/lib/shared/npmCommand.js +29 -31
- package/lib/shared/npmCommand.js.map +1 -1
- package/oclif.lock +9078 -0
- package/oclif.manifest.json +49 -25
- package/package.json +35 -51
- package/bin/dev +0 -21
- package/bin/run +0 -3
package/README.md
CHANGED
|
@@ -91,15 +91,15 @@ sfdx plugins
|
|
|
91
91
|
|
|
92
92
|
<!-- commands -->
|
|
93
93
|
|
|
94
|
-
- [`@salesforce/plugin-trust plugins
|
|
94
|
+
- [`@salesforce/plugin-trust plugins trust verify`](#salesforceplugin-trust-plugins-trust-verify)
|
|
95
95
|
|
|
96
|
-
## `@salesforce/plugin-trust plugins
|
|
96
|
+
## `@salesforce/plugin-trust plugins trust verify`
|
|
97
97
|
|
|
98
98
|
Validate a digital signature.
|
|
99
99
|
|
|
100
100
|
```
|
|
101
101
|
USAGE
|
|
102
|
-
$ @salesforce/plugin-trust plugins
|
|
102
|
+
$ @salesforce/plugin-trust plugins trust verify -n <value> [--json] [-r <value>]
|
|
103
103
|
|
|
104
104
|
FLAGS
|
|
105
105
|
-n, --npm=<value> (required) Specify the npm name. This can include a tag/version.
|
|
@@ -114,11 +114,11 @@ DESCRIPTION
|
|
|
114
114
|
Verifies the digital signature on an npm package matches the signature and key stored at the expected URLs.
|
|
115
115
|
|
|
116
116
|
EXAMPLES
|
|
117
|
-
$ @salesforce/plugin-trust plugins
|
|
117
|
+
$ @salesforce/plugin-trust plugins trust verify --npm @scope/npmName --registry http://my.repo.org:4874
|
|
118
118
|
|
|
119
|
-
$ @salesforce/plugin-trust plugins
|
|
119
|
+
$ @salesforce/plugin-trust plugins trust verify --npm @scope/npmName
|
|
120
120
|
```
|
|
121
121
|
|
|
122
|
-
_See code: [src/commands/plugins/trust/verify.ts](https://github.com/salesforcecli/plugin-trust/blob/2.6.
|
|
122
|
+
_See code: [src/commands/plugins/trust/verify.ts](https://github.com/salesforcecli/plugin-trust/blob/2.6.23/src/commands/plugins/trust/verify.ts)_
|
|
123
123
|
|
|
124
124
|
<!-- commandsstop -->
|
package/bin/dev.cmd
CHANGED
package/bin/dev.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env -S node --loader ts-node/esm --no-warnings=ExperimentalWarning
|
|
2
|
+
// eslint-disable-next-line node/shebang
|
|
3
|
+
async function main() {
|
|
4
|
+
const { execute } = await import('@oclif/core');
|
|
5
|
+
await execute({ development: true, dir: import.meta.url });
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
await main();
|
package/bin/run.cmd
CHANGED
package/bin/run.js
ADDED
|
@@ -9,9 +9,9 @@ export declare class Verify extends SfCommand<VerifyResponse> {
|
|
|
9
9
|
static readonly examples: string[];
|
|
10
10
|
static readonly hidden: true;
|
|
11
11
|
static readonly flags: {
|
|
12
|
-
npm: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
13
|
-
registry: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
14
|
-
loglevel: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
12
|
+
npm: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
13
|
+
registry: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
14
|
+
loglevel: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
15
15
|
};
|
|
16
16
|
private static getVerifier;
|
|
17
17
|
run(): Promise<VerifyResponse>;
|
|
@@ -1,30 +1,45 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright (c) 2018, 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
|
-
const messages =
|
|
17
|
-
class Verify extends
|
|
7
|
+
import { fileURLToPath } from 'node:url';
|
|
8
|
+
import { dirname } from 'node:path';
|
|
9
|
+
import { SfCommand, Flags, loglevel } from '@salesforce/sf-plugins-core';
|
|
10
|
+
import { Messages, SfError, Logger } from '@salesforce/core';
|
|
11
|
+
import { InstallationVerification, VerificationConfig, } from '../../../shared/installationVerification.js';
|
|
12
|
+
import { NpmName } from '../../../shared/NpmName.js';
|
|
13
|
+
import { setErrorName } from '../../../shared/errors.js';
|
|
14
|
+
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
|
|
15
|
+
const messages = Messages.loadMessages('@salesforce/plugin-trust', 'verify');
|
|
16
|
+
export class Verify extends SfCommand {
|
|
17
|
+
static summary = messages.getMessage('summary');
|
|
18
|
+
static description = messages.getMessage('description');
|
|
19
|
+
static examples = messages.getMessages('examples');
|
|
20
|
+
static hidden;
|
|
21
|
+
static flags = {
|
|
22
|
+
npm: Flags.string({
|
|
23
|
+
char: 'n',
|
|
24
|
+
required: true,
|
|
25
|
+
summary: messages.getMessage('flags.npm.summary'),
|
|
26
|
+
}),
|
|
27
|
+
registry: Flags.string({
|
|
28
|
+
char: 'r',
|
|
29
|
+
summary: messages.getMessage('flags.registry.summary'),
|
|
30
|
+
}),
|
|
31
|
+
loglevel,
|
|
32
|
+
};
|
|
18
33
|
static getVerifier(npmName, config) {
|
|
19
|
-
return new
|
|
34
|
+
return new InstallationVerification().setPluginNpmName(npmName).setConfig(config);
|
|
20
35
|
}
|
|
21
36
|
async run() {
|
|
22
37
|
const { flags } = await this.parse(Verify);
|
|
23
|
-
const logger = await
|
|
38
|
+
const logger = await Logger.child('verify');
|
|
24
39
|
this.log('Checking for digital signature.');
|
|
25
|
-
const npmName =
|
|
40
|
+
const npmName = NpmName.parse(flags.npm);
|
|
26
41
|
logger.debug(`running verify command for npm: ${npmName.name}`);
|
|
27
|
-
const vConfig = new
|
|
42
|
+
const vConfig = new VerificationConfig();
|
|
28
43
|
const configContext = {
|
|
29
44
|
cacheDir: this.config.cacheDir,
|
|
30
45
|
configDir: this.config.configDir,
|
|
@@ -44,7 +59,7 @@ class Verify extends sf_plugins_core_1.SfCommand {
|
|
|
44
59
|
logger.debug(`meta.verified: ${meta.verified}`);
|
|
45
60
|
if (!meta.verified) {
|
|
46
61
|
const e = messages.createError('FailedDigitalSignatureVerification');
|
|
47
|
-
throw
|
|
62
|
+
throw setErrorName(e, 'FailedDigitalSignatureVerification');
|
|
48
63
|
}
|
|
49
64
|
const message = `Successfully validated digital signature for ${npmName.name}.`;
|
|
50
65
|
if (!flags.json) {
|
|
@@ -75,24 +90,8 @@ class Verify extends sf_plugins_core_1.SfCommand {
|
|
|
75
90
|
}
|
|
76
91
|
return response;
|
|
77
92
|
}
|
|
78
|
-
throw
|
|
93
|
+
throw SfError.wrap(error);
|
|
79
94
|
}
|
|
80
95
|
}
|
|
81
96
|
}
|
|
82
|
-
exports.Verify = Verify;
|
|
83
|
-
Verify.summary = messages.getMessage('summary');
|
|
84
|
-
Verify.description = messages.getMessage('description');
|
|
85
|
-
Verify.examples = messages.getMessages('examples');
|
|
86
|
-
Verify.flags = {
|
|
87
|
-
npm: sf_plugins_core_1.Flags.string({
|
|
88
|
-
char: 'n',
|
|
89
|
-
required: true,
|
|
90
|
-
summary: messages.getMessage('flags.npm.summary'),
|
|
91
|
-
}),
|
|
92
|
-
registry: sf_plugins_core_1.Flags.string({
|
|
93
|
-
char: 'r',
|
|
94
|
-
summary: messages.getMessage('flags.registry.summary'),
|
|
95
|
-
}),
|
|
96
|
-
loglevel: sf_plugins_core_1.loglevel,
|
|
97
|
-
};
|
|
98
97
|
//# sourceMappingURL=verify.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify.js","sourceRoot":"","sources":["../../../../src/commands/plugins/trust/verify.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verify.js","sourceRoot":"","sources":["../../../../src/commands/plugins/trust/verify.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAEL,wBAAwB,EACxB,kBAAkB,GACnB,MA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IAAI,CAAC,KAAK,CAAC,CAAC;SAC3B;IACH,CAAC"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
1
|
/*
|
|
4
2
|
* Copyright (c) 2022, salesforce.com, inc.
|
|
5
3
|
* All rights reserved.
|
|
6
4
|
* Licensed under the BSD 3-Clause license.
|
|
7
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
8
6
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
import { homedir } from 'node:os';
|
|
8
|
+
import { SfError } from '@salesforce/core';
|
|
11
9
|
const hook = async function (opts) {
|
|
12
10
|
try {
|
|
13
11
|
global.cliTelemetry?.record({
|
|
@@ -31,13 +29,13 @@ const hook = async function (opts) {
|
|
|
31
29
|
eventName: 'JIT_INSTALL_FAILED',
|
|
32
30
|
type: 'EVENT',
|
|
33
31
|
message: error instanceof Error ? error.message : 'malformed error',
|
|
34
|
-
stackTrace: error instanceof Error ? error?.stack?.replace(new RegExp(
|
|
32
|
+
stackTrace: error instanceof Error ? error?.stack?.replace(new RegExp(homedir(), 'g'), '<GDPR_HIDDEN>') : undefined,
|
|
35
33
|
version: opts.pluginVersion,
|
|
36
34
|
plugin: opts.command.pluginName,
|
|
37
35
|
command: opts.command.id,
|
|
38
36
|
});
|
|
39
|
-
throw new
|
|
37
|
+
throw new SfError(`Could not install ${opts.command.pluginName}`, 'JitPluginInstallError');
|
|
40
38
|
}
|
|
41
39
|
};
|
|
42
|
-
|
|
40
|
+
export default hook;
|
|
43
41
|
//# sourceMappingURL=jitPluginInstall.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jitPluginInstall.js","sourceRoot":"","sources":["../../src/hooks/jitPluginInstall.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jitPluginInstall.js","sourceRoot":"","sources":["../../src/hooks/jitPluginInstall.ts"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zG,OAAO,EAAE,IAAI,CAAC,aAAa;YAC3B,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU;YAC/B,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE;SACzB,CAAC,CAAC;QAEH,MAAM,IAAI,OAAO,CAAC,qBAAqB,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,uBAAuB,CAAC,CAAC;KAC5F;AACH,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright (c) 2018, 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
|
-
const
|
|
13
|
-
const NpmName_1 = require("../shared/NpmName");
|
|
14
|
-
const hook = async function (options) {
|
|
7
|
+
import { Logger } from '@salesforce/core';
|
|
8
|
+
import { ux } from '@oclif/core';
|
|
9
|
+
import { doInstallationCodeSigningVerification, doPrompt, InstallationVerification, VerificationConfig, } from '../shared/installationVerification.js';
|
|
10
|
+
import { NpmName } from '../shared/NpmName.js';
|
|
11
|
+
export const hook = async function (options) {
|
|
15
12
|
if (options.plugin && options.plugin.type === 'npm') {
|
|
16
|
-
const logger = await
|
|
13
|
+
const logger = await Logger.child('verifyInstallSignature');
|
|
17
14
|
const plugin = options.plugin;
|
|
18
15
|
// skip if the plugin version being installed is listed in the CLI's JIT config
|
|
19
16
|
if (plugin.tag &&
|
|
@@ -24,7 +21,7 @@ const hook = async function (options) {
|
|
|
24
21
|
return;
|
|
25
22
|
}
|
|
26
23
|
logger.debug('parsing npm name');
|
|
27
|
-
const npmName =
|
|
24
|
+
const npmName = NpmName.parse(plugin.name);
|
|
28
25
|
logger.debug(`npmName components: ${JSON.stringify(npmName, null, 4)}`);
|
|
29
26
|
npmName.tag = plugin.tag || 'latest';
|
|
30
27
|
if (/^v[0-9].*/.test(npmName.tag)) {
|
|
@@ -40,8 +37,8 @@ const hook = async function (options) {
|
|
|
40
37
|
logger.debug('finished building the VerificationConfigBuilder');
|
|
41
38
|
try {
|
|
42
39
|
logger.debug('doing verification');
|
|
43
|
-
await
|
|
44
|
-
|
|
40
|
+
await doInstallationCodeSigningVerification(configContext, { plugin: plugin.name, tag: plugin.tag }, vConfig);
|
|
41
|
+
ux.log('Finished digital signature check.');
|
|
45
42
|
}
|
|
46
43
|
catch (error) {
|
|
47
44
|
if (!(error instanceof Error)) {
|
|
@@ -52,17 +49,16 @@ const hook = async function (options) {
|
|
|
52
49
|
}
|
|
53
50
|
}
|
|
54
51
|
else {
|
|
55
|
-
await
|
|
52
|
+
await doPrompt();
|
|
56
53
|
}
|
|
57
54
|
};
|
|
58
|
-
|
|
59
|
-
exports.default = exports.hook;
|
|
55
|
+
export default hook;
|
|
60
56
|
/**
|
|
61
57
|
* Build a VerificationConfig. Useful for testing.
|
|
62
58
|
*/
|
|
63
59
|
const buildVerificationConfig = (npmName, configContext) => {
|
|
64
|
-
const vConfig = new
|
|
65
|
-
vConfig.verifier = new
|
|
60
|
+
const vConfig = new VerificationConfig();
|
|
61
|
+
vConfig.verifier = new InstallationVerification().setPluginNpmName(npmName).setConfig(configContext);
|
|
66
62
|
return vConfig;
|
|
67
63
|
};
|
|
68
64
|
//# sourceMappingURL=verifyInstallSignature.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyInstallSignature.js","sourceRoot":"","sources":["../../src/hooks/verifyInstallSignature.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verifyInstallSignature.js","sourceRoot":"","sources":["../../src/hooks/verifyInstallSignature.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAk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,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IACrG,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
declare const _default: {};
|
|
2
|
-
export
|
|
2
|
+
export default _default;
|
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 default {};
|
|
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;AAEH,eAAe,EAAE,CAAC"}
|
package/lib/shared/NpmName.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NpmName = void 0;
|
|
4
1
|
/*
|
|
5
2
|
* Copyright (c) 2022, 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
|
-
|
|
7
|
+
import { SfError } from '@salesforce/core';
|
|
8
|
+
import { setErrorName } from './errors.js';
|
|
12
9
|
/**
|
|
13
10
|
* String representing the parsed components of an NpmName
|
|
14
11
|
*
|
|
@@ -16,7 +13,13 @@ const errors_1 = require("./errors");
|
|
|
16
13
|
* const f: NpmName = NpmName.parse('@salesforce/jj@foo');
|
|
17
14
|
* console.log(f.tag === 'foo')
|
|
18
15
|
*/
|
|
19
|
-
class NpmName {
|
|
16
|
+
export class NpmName {
|
|
17
|
+
static DEFAULT_TAG = 'latest';
|
|
18
|
+
tag;
|
|
19
|
+
// next 2 props won't exist until after parse is called
|
|
20
|
+
// TODO: make this more functional and deterministic
|
|
21
|
+
scope;
|
|
22
|
+
name;
|
|
20
23
|
/**
|
|
21
24
|
* Private ctor. Use static parse method.
|
|
22
25
|
*/
|
|
@@ -31,7 +34,7 @@ class NpmName {
|
|
|
31
34
|
*/
|
|
32
35
|
static parse(npmName) {
|
|
33
36
|
if (!npmName || npmName.length < 1) {
|
|
34
|
-
throw
|
|
37
|
+
throw setErrorName(new SfError('The npm name is missing or invalid.', 'MissingOrInvalidNpmName'), 'MissingOrInvalidNpmName');
|
|
35
38
|
}
|
|
36
39
|
const returnNpmName = new NpmName();
|
|
37
40
|
const components = npmName.split('@');
|
|
@@ -72,7 +75,7 @@ class NpmName {
|
|
|
72
75
|
returnNpmName.name = NpmName.validateComponentString(subComponents[0]);
|
|
73
76
|
}
|
|
74
77
|
else {
|
|
75
|
-
throw
|
|
78
|
+
throw setErrorName(new SfError('The npm name is invalid.', 'InvalidNpmName'), 'InvalidNpmName');
|
|
76
79
|
}
|
|
77
80
|
}
|
|
78
81
|
/**
|
|
@@ -87,7 +90,7 @@ class NpmName {
|
|
|
87
90
|
return trimmedName;
|
|
88
91
|
}
|
|
89
92
|
else {
|
|
90
|
-
throw
|
|
93
|
+
throw setErrorName(new SfError('The npm name is missing or invalid.', 'MissingOrInvalidNpmName'), 'MissingOrInvalidNpmName');
|
|
91
94
|
}
|
|
92
95
|
}
|
|
93
96
|
/**
|
|
@@ -130,6 +133,4 @@ class NpmName {
|
|
|
130
133
|
return nameComponents.join('');
|
|
131
134
|
}
|
|
132
135
|
}
|
|
133
|
-
exports.NpmName = NpmName;
|
|
134
|
-
NpmName.DEFAULT_TAG = 'latest';
|
|
135
136
|
//# sourceMappingURL=NpmName.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NpmName.js","sourceRoot":"","sources":["../../src/shared/NpmName.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NpmName.js","sourceRoot":"","sources":["../../src/shared/NpmName.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAO3C;;;;;;GAMG;AACH,MAAM,OAAO,OAAO;IACX,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC;IACvC,GAAG,CAAS;IACnB,uDAAuD;IACvD,oDAAoD;IAC7C,KAAK,CAAU;IACf,IAAI,CAAU;IAErB;;OAEG;IACH;QACE,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,WAAW,CAAC;IACjC,CAAC;IACD;;;;;OAKG;IACI,MAAM,CAAC,KAAK,CAAC,OAAe;QACjC,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;YAClC,MAAM,YAAY,CAChB,IAAI,OAAO,CAAC,qCAAqC,EAAE,yBAAyB,CAAC,EAC7E,yBAAyB,CAC1B,CAAC;SACH;QAED,MAAM,aAAa,GAAG,IAAI,OAAO,EAAE,CAAC;QAEpC,MAAM,UAAU,GAAa,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEhD,gBAAgB;QAChB,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;YAC3B,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;SACvD;aAAM,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACtC,OAA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pC,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YACvC,cAAc,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;SACxC;QAED,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE/B,IAAI,UAAU,IAAI,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE;YACjD,cAAc,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;SACrC;QAED,OAAO,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjC,CAAC"}
|
package/lib/shared/errors.js
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright (c) 2023, 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
|
-
exports.setErrorName = void 0;
|
|
10
7
|
/**
|
|
11
8
|
* convenience method for doing something SfError doesn't allow
|
|
12
9
|
* (explicitly setting the error name)
|
|
13
10
|
*/
|
|
14
|
-
const setErrorName = (err, name) => {
|
|
11
|
+
export const setErrorName = (err, name) => {
|
|
15
12
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
16
13
|
// @ts-ignore override readonly .name field
|
|
17
14
|
err.name = name;
|
|
18
15
|
return err;
|
|
19
16
|
};
|
|
20
|
-
exports.setErrorName = setErrorName;
|
|
21
17
|
//# sourceMappingURL=errors.js.map
|
package/lib/shared/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/shared/errors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/shared/errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAY,EAAE,IAAY,EAAW,EAAE;IAClE,6DAA6D;IAC7D,2CAA2C;IAC3C,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC;IAChB,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
import { Readable } from 'node:stream';
|
|
3
3
|
import { URL } from 'node:url';
|
|
4
|
-
import { NpmMeta } from '
|
|
5
|
-
import { NpmName } from './NpmName';
|
|
4
|
+
import { NpmMeta } from './npmCommand.js';
|
|
5
|
+
import { NpmName } from './NpmName.js';
|
|
6
6
|
export declare const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
|
|
7
7
|
export interface ConfigContext {
|
|
8
8
|
configDir?: string;
|