@salesforce/plugin-trust 1.0.10 → 2.0.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 +21 -13
- package/LICENSE.txt +1 -1
- package/README.md +13 -10
- package/bin/dev +21 -0
- package/bin/dev.cmd +3 -0
- package/bin/run +1 -2
- package/lib/commands/plugins/trust/verify.js +8 -4
- package/lib/commands/plugins/trust/verify.js.map +1 -1
- package/lib/hooks/verifyInstallSignature.d.ts +3 -3
- package/lib/hooks/verifyInstallSignature.js +2 -2
- package/lib/hooks/verifyInstallSignature.js.map +1 -1
- package/lib/{lib → shared}/NpmName.d.ts +0 -0
- package/lib/{lib → shared}/NpmName.js +16 -4
- package/lib/shared/NpmName.js.map +1 -0
- package/lib/{lib → shared}/installationVerification.d.ts +1 -1
- package/lib/{lib → shared}/installationVerification.js +80 -24
- package/lib/shared/installationVerification.js.map +1 -0
- package/lib/{lib → shared}/npmCommand.d.ts +3 -3
- package/lib/shared/npmCommand.js +200 -0
- package/lib/shared/npmCommand.js.map +1 -0
- package/messages/verify.json +2 -1
- package/oclif.manifest.json +1 -1
- package/package.json +19 -26
- package/lib/lib/NpmName.js.map +0 -1
- package/lib/lib/installationVerification.js.map +0 -1
- package/lib/lib/npmCommand.js +0 -125
- package/lib/lib/npmCommand.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,49 +2,57 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## [2.0.0](https://github.com/salesforcecli/plugin-trust/compare/v1.1.0...v2.0.0) (2022-04-20)
|
|
6
|
+
|
|
7
|
+
## [1.1.0](https://github.com/salesforcecli/plugin-trust/compare/v1.0.11...v1.1.0) (2021-12-02)
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- bump deps ([6edb393](https://github.com/salesforcecli/plugin-trust/commit/6edb393b14afb094cfaf8b85e1d95b4f0dd79fbc))
|
|
12
|
+
|
|
13
|
+
### [1.0.11](https://github.com/salesforcecli/plugin-trust/compare/v1.0.10...v1.0.11) (2021-11-03)
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
6
16
|
|
|
17
|
+
- poll `npm pack` until tarball is available ([#185](https://github.com/salesforcecli/plugin-trust/issues/185)) ([001c1ab](https://github.com/salesforcecli/plugin-trust/commit/001c1ab3c79277bf411bc3e4459396e859e5672c))
|
|
18
|
+
|
|
19
|
+
### [1.0.10](https://github.com/salesforcecli/plugin-trust/compare/v1.0.9...v1.0.10) (2021-10-12)
|
|
7
20
|
|
|
8
21
|
### Bug Fixes
|
|
9
22
|
|
|
10
|
-
|
|
23
|
+
- update dependencies ([094ea03](https://github.com/salesforcecli/plugin-trust/commit/094ea03c1f99333b75008376d8be1494e3a794ea))
|
|
11
24
|
|
|
12
25
|
### [1.0.9](https://github.com/salesforcecli/plugin-trust/compare/v1.0.8...v1.0.9) (2021-10-12)
|
|
13
26
|
|
|
14
27
|
### [1.0.8](https://github.com/salesforcecli/plugin-trust/compare/v1.0.7...v1.0.8) (2021-09-24)
|
|
15
28
|
|
|
16
|
-
|
|
17
29
|
### Bug Fixes
|
|
18
30
|
|
|
19
|
-
|
|
31
|
+
- verify fails if node not installed ([#167](https://github.com/salesforcecli/plugin-trust/issues/167)) ([0393b90](https://github.com/salesforcecli/plugin-trust/commit/0393b906a30e8858816625517eda5db69377c178)), closes [#168](https://github.com/salesforcecli/plugin-trust/issues/168)
|
|
20
32
|
|
|
21
33
|
### [1.0.7](https://github.com/salesforcecli/plugin-trust/compare/v1.0.6...v1.0.7) (2021-09-17)
|
|
22
34
|
|
|
23
|
-
|
|
24
35
|
### Bug Fixes
|
|
25
36
|
|
|
26
|
-
|
|
37
|
+
- use tag when getting npm meta ([#165](https://github.com/salesforcecli/plugin-trust/issues/165)) ([e9fe7f2](https://github.com/salesforcecli/plugin-trust/commit/e9fe7f229a716e4685b7cd54ee753c02667bccd8))
|
|
27
38
|
|
|
28
39
|
### [1.0.6](https://github.com/salesforcecli/plugin-trust/compare/v1.0.5...v1.0.6) (2021-09-10)
|
|
29
40
|
|
|
30
|
-
|
|
31
41
|
### Bug Fixes
|
|
32
42
|
|
|
33
|
-
|
|
43
|
+
- install plugin-trust as an executable ([#164](https://github.com/salesforcecli/plugin-trust/issues/164)) ([34b293c](https://github.com/salesforcecli/plugin-trust/commit/34b293c1e9276e7653aff41a9fc8e17635ee0a92))
|
|
34
44
|
|
|
35
45
|
### [1.0.5](https://github.com/salesforcecli/plugin-trust/compare/v1.0.4...v1.0.5) (2021-09-07)
|
|
36
46
|
|
|
37
|
-
|
|
38
47
|
### Bug Fixes
|
|
39
48
|
|
|
40
|
-
|
|
49
|
+
- use npm instead of http ([#154](https://github.com/salesforcecli/plugin-trust/issues/154)) ([2bce1f9](https://github.com/salesforcecli/plugin-trust/commit/2bce1f9bd331b75d81f0309bc46962b5c5d19b16))
|
|
41
50
|
|
|
42
51
|
### [1.0.4](https://github.com/salesforcecli/plugin-template/compare/v1.0.3...v1.0.4) (2021-05-10)
|
|
43
52
|
|
|
44
53
|
### [1.0.3](https://github.com/salesforcecli/plugin-template/compare/v1.0.2...v1.0.3) (2021-04-09)
|
|
45
54
|
|
|
46
|
-
|
|
47
55
|
### Bug Fixes
|
|
48
56
|
|
|
49
|
-
|
|
50
|
-
|
|
57
|
+
- leif .yml merge [skip-validate-pr] ([2e6d278](https://github.com/salesforcecli/plugin-template/commit/2e6d2785cf04497ea87a871564adc68c5a19f6be))
|
|
58
|
+
- leif .yml merge [skip-validate-pr] ([3703564](https://github.com/salesforcecli/plugin-template/commit/37035649f051b0d42667be7bdf3f878c631d43a9))
|
package/LICENSE.txt
CHANGED
package/README.md
CHANGED
|
@@ -90,7 +90,8 @@ sfdx plugins
|
|
|
90
90
|
## Commands
|
|
91
91
|
|
|
92
92
|
<!-- commands -->
|
|
93
|
-
|
|
93
|
+
|
|
94
|
+
- [`@salesforce/plugin-trust plugins:trust:verify -n <string> [-r <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#salesforceplugin-trust-pluginstrustverify--n-string--r-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
94
95
|
|
|
95
96
|
## `@salesforce/plugin-trust plugins:trust:verify -n <string> [-r <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
96
97
|
|
|
@@ -98,25 +99,27 @@ validate a digital signature for a npm package
|
|
|
98
99
|
|
|
99
100
|
```
|
|
100
101
|
USAGE
|
|
101
|
-
$ @salesforce/plugin-trust plugins:trust:verify -n <string> [-r <string>] [--json] [--loglevel
|
|
102
|
-
|
|
102
|
+
$ @salesforce/plugin-trust plugins:trust:verify -n <string> [-r <string>] [--json] [--loglevel
|
|
103
|
+
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
103
104
|
|
|
104
|
-
|
|
105
|
-
-n, --npm
|
|
105
|
+
FLAGS
|
|
106
|
+
-n, --npm=<value> (required) Specify the npm name.
|
|
106
107
|
This can include a tag/version
|
|
107
|
-
|
|
108
|
-
-r, --registry=registry The registry name. the behavior is
|
|
108
|
+
-r, --registry=<value> The registry name. the behavior is
|
|
109
109
|
the same as npm
|
|
110
|
-
|
|
111
110
|
--json format output as json
|
|
112
|
-
|
|
113
111
|
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
114
112
|
this command invocation
|
|
115
113
|
|
|
114
|
+
DESCRIPTION
|
|
115
|
+
validate a digital signature for a npm package
|
|
116
|
+
|
|
116
117
|
EXAMPLES
|
|
117
118
|
sfdx plugins:trust:verify --npm @scope/npmName --registry http://my.repo.org:4874
|
|
119
|
+
|
|
118
120
|
sfdx plugins:trust:verify --npm @scope/npmName
|
|
119
121
|
```
|
|
120
122
|
|
|
121
|
-
_See code: [src/commands/plugins/trust/verify.ts](https://github.com/salesforcecli/plugin-trust/blob/
|
|
123
|
+
_See code: [src/commands/plugins/trust/verify.ts](https://github.com/salesforcecli/plugin-trust/blob/v2.0.0/src/commands/plugins/trust/verify.ts)_
|
|
124
|
+
|
|
122
125
|
<!-- commandsstop -->
|
package/bin/dev
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const oclif = require('@oclif/core');
|
|
4
|
+
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const project = path.join(__dirname, '..', 'tsconfig.json');
|
|
7
|
+
|
|
8
|
+
// In dev mode -> use ts-node and dev plugins
|
|
9
|
+
process.env.NODE_ENV = 'development';
|
|
10
|
+
|
|
11
|
+
require('ts-node').register({ project });
|
|
12
|
+
// oclif.settings.tsconfigPath = project;
|
|
13
|
+
|
|
14
|
+
// In dev mode, always show stack traces
|
|
15
|
+
const g = (global.oclif = global.oclif || {});
|
|
16
|
+
|
|
17
|
+
// In dev mode, always show stack traces
|
|
18
|
+
global.oclif.debug = true;
|
|
19
|
+
|
|
20
|
+
// Start the CLI
|
|
21
|
+
oclif.run().then(require('@oclif/core/flush')).catch(require('@oclif/core/handle'));
|
package/bin/dev.cmd
ADDED
package/bin/run
CHANGED
|
@@ -11,8 +11,8 @@ const os = require("os");
|
|
|
11
11
|
const ts_types_1 = require("@salesforce/ts-types");
|
|
12
12
|
const command_1 = require("@salesforce/command");
|
|
13
13
|
const core_1 = require("@salesforce/core");
|
|
14
|
-
const installationVerification_1 = require("../../../
|
|
15
|
-
const NpmName_1 = require("../../../
|
|
14
|
+
const installationVerification_1 = require("../../../shared/installationVerification");
|
|
15
|
+
const NpmName_1 = require("../../../shared/NpmName");
|
|
16
16
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
17
17
|
const messages = core_1.Messages.loadMessages('@salesforce/plugin-trust', 'verify');
|
|
18
18
|
class Verify extends command_1.SfdxCommand {
|
|
@@ -39,7 +39,11 @@ class Verify extends command_1.SfdxCommand {
|
|
|
39
39
|
const meta = await vConfig.verifier.verify();
|
|
40
40
|
this.logger.debug(`meta.verified: ${meta.verified}`);
|
|
41
41
|
if (!meta.verified) {
|
|
42
|
-
|
|
42
|
+
const e = messages.createError('FailedDigitalSignatureVerification');
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
44
|
+
// @ts-ignore override readonly .name field
|
|
45
|
+
e.name = 'FailedDigitalSignatureVerification';
|
|
46
|
+
throw e;
|
|
43
47
|
}
|
|
44
48
|
const message = `Successfully validated digital signature for ${npmName.name}.`;
|
|
45
49
|
if (!this.flags.json) {
|
|
@@ -70,7 +74,7 @@ class Verify extends command_1.SfdxCommand {
|
|
|
70
74
|
}
|
|
71
75
|
return response;
|
|
72
76
|
}
|
|
73
|
-
throw core_1.
|
|
77
|
+
throw core_1.SfError.wrap(err);
|
|
74
78
|
}
|
|
75
79
|
}
|
|
76
80
|
getVerifier(npmName, config) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify.js","sourceRoot":"","sources":["../../../../src/commands/plugins/trust/verify.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,yBAAyB;AACzB,mDAA2C;AAC3C,iDAAsE;AACtE,
|
|
1
|
+
{"version":3,"file":"verify.js","sourceRoot":"","sources":["../../../../src/commands/plugins/trust/verify.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,yBAAyB;AACzB,mDAA2C;AAC3C,iDAAsE;AACtE,2CAAqD;AACrD,uFAAuH;AACvH,qDAAkD;AAElD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,0BAA0B,EAAE,QAAQ,CAAC,CAAC;AAO7E,MAAa,MAAO,SAAQ,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B,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;iBAC5B;qBAAM;oBACL,OAAO,GAAG,qCAAqC,CAAC;oBAChD,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACrB,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;iBAC5B;gBACD,OAAO,QAAQ,CAAC;aACjB;YACD,MAAM,cAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACzB;IACH,CAAC;IAEO,WAAW,CAAC,OAAgB,EAAE,MAAqB;QACzD,OAAO,IAAI,mDAAwB,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACpF,CAAC;;AA1FH,wBA2FC;AA1FwB,kBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AACjD,eAAQ,GAAG,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAEtD,kBAAW,GAAgB;IACnD,GAAG,EAAE,eAAK,CAAC,MAAM,CAAC;QAChB,IAAI,EAAE,GAAG;QACT,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,WAAW,CAAC;KAC9C,CAAC;IACF,QAAQ,EAAE,eAAK,CAAC,MAAM,CAAC;QACrB,IAAI,EAAE,GAAG;QACT,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,gBAAgB,CAAC;KACnD,CAAC;CACH,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Hook } from '@oclif/
|
|
2
|
-
import { ConfigContext, VerificationConfig } from '../
|
|
3
|
-
import { NpmName } from '../
|
|
1
|
+
import { Hook } from '@oclif/core';
|
|
2
|
+
import { ConfigContext, VerificationConfig } from '../shared/installationVerification';
|
|
3
|
+
import { NpmName } from '../shared/NpmName';
|
|
4
4
|
/**
|
|
5
5
|
* Build a VerificationConfig. Useful for testing.
|
|
6
6
|
*/
|
|
@@ -9,8 +9,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.hook = exports.VerificationConfigBuilder = void 0;
|
|
10
10
|
const core_1 = require("@salesforce/core");
|
|
11
11
|
const cli_ux_1 = require("cli-ux");
|
|
12
|
-
const installationVerification_1 = require("../
|
|
13
|
-
const NpmName_1 = require("../
|
|
12
|
+
const installationVerification_1 = require("../shared/installationVerification");
|
|
13
|
+
const NpmName_1 = require("../shared/NpmName");
|
|
14
14
|
/**
|
|
15
15
|
* Build a VerificationConfig. Useful for testing.
|
|
16
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyInstallSignature.js","sourceRoot":"","sources":["../../src/hooks/verifyInstallSignature.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,
|
|
1
|
+
{"version":3,"file":"verifyInstallSignature.js","sourceRoot":"","sources":["../../src/hooks/verifyInstallSignature.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,2CAAmD;AACnD,mCAA6B;AAC7B,iFAM4C;AAE5C,+CAA4C;AAE5C;;GAEG;AACH,MAAa,yBAAyB;IAC7B,MAAM,CAAC,KAAK,CAAC,OAAgB,EAAE,aAA4B;QAChE,MAAM,OAAO,GAAG,IAAI,6CAAkB,EAAE,CAAC;QACzC,OAAO,CAAC,QAAQ,GAAG,IAAI,mDAAwB,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;QAErG,OAAO,CAAC,GAAG,GAAG,YAAG,CAAC,GAAG,CAAC,IAAI,CAAC,YAAG,CAA0B,CAAC;QACzD,mEAAmE;QACnE,OAAO,CAAC,MAAM,GAAG,YAAG,CAAC,MAAM,CAAC,IAAI,CAAC,YAAG,CAAC,CAAC;QACtC,OAAO,OAAO,CAAC;IACjB,CAAC;IACM,MAAM,CAAC,YAAY;QAC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AC,CAAC;QACxE,MAAM,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;QAEhE,IAAI;YACF,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;YACnC,MAAM,IAAA,gEAAqC,EAAC,aAAa,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,CAAC;YAC9G,YAAG,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;SAC9C;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,GAAG,GAAG,KAAgB,CAAC;YAC7B,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAC1B,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SACjB;KACF;SAAM;QACL,MAAM,IAAA,mCAAQ,EAAC,yBAAyB,CAAC,YAAY,EAAE,CAAC,CAAC;KAC1D;AACH,CAAC,CAAC;AArCW,QAAA,IAAI,QAqCf;AAEF,kBAAe,YAAI,CAAC"}
|
|
File without changes
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NpmName = void 0;
|
|
4
4
|
/*
|
|
5
|
-
* Copyright (c)
|
|
5
|
+
* Copyright (c) 2022, salesforce.com, inc.
|
|
6
6
|
* All rights reserved.
|
|
7
7
|
* Licensed under the BSD 3-Clause license.
|
|
8
8
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
@@ -30,7 +30,11 @@ class NpmName {
|
|
|
30
30
|
*/
|
|
31
31
|
static parse(npmName) {
|
|
32
32
|
if (!npmName || npmName.length < 1) {
|
|
33
|
-
|
|
33
|
+
const err = new core_1.SfError('The npm name is missing or invalid.', 'MissingOrInvalidNpmName');
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
35
|
+
// @ts-ignore override readonly .name field
|
|
36
|
+
err.name = 'MissingOrInvalidNpmName';
|
|
37
|
+
throw err;
|
|
34
38
|
}
|
|
35
39
|
const returnNpmName = new NpmName();
|
|
36
40
|
const components = npmName.split('@');
|
|
@@ -77,7 +81,11 @@ class NpmName {
|
|
|
77
81
|
returnNpmName.name = NpmName.validateComponentString(subComponents[0]);
|
|
78
82
|
}
|
|
79
83
|
else {
|
|
80
|
-
|
|
84
|
+
const err = new core_1.SfError('The npm name is invalid.', 'InvalidNpmName');
|
|
85
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
86
|
+
// @ts-ignore override readonly .name field
|
|
87
|
+
err.name = 'InvalidNpmName';
|
|
88
|
+
throw err;
|
|
81
89
|
}
|
|
82
90
|
}
|
|
83
91
|
/**
|
|
@@ -92,7 +100,11 @@ class NpmName {
|
|
|
92
100
|
return trimmedName;
|
|
93
101
|
}
|
|
94
102
|
else {
|
|
95
|
-
|
|
103
|
+
const err = new core_1.SfError('The npm name is missing or invalid.', 'MissingOrInvalidNpmName');
|
|
104
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
105
|
+
// @ts-ignore override readonly .name field
|
|
106
|
+
err.name = 'MissingOrInvalidNpmName';
|
|
107
|
+
throw err;
|
|
96
108
|
}
|
|
97
109
|
}
|
|
98
110
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NpmName.js","sourceRoot":"","sources":["../../src/shared/NpmName.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,2CAA2C;AAO3C;;;;;;GAMG;AACH,MAAa,OAAO;IAMlB;;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,GAAG,GAAG,IAAI,cAAO,CAAC,q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,7 +2,7 @@
|
|
|
2
2
|
import { Readable } from 'stream';
|
|
3
3
|
import { URL } from 'url';
|
|
4
4
|
import * as request from 'request';
|
|
5
|
-
import { NpmMeta } from '../
|
|
5
|
+
import { NpmMeta } from '../shared/npmCommand';
|
|
6
6
|
import { NpmName } from './NpmName';
|
|
7
7
|
export declare const ALLOW_LIST_FILENAME = "unsignedPluginAllowList.json";
|
|
8
8
|
export declare const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2022, salesforce.com, inc.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Licensed under the BSD 3-Clause license.
|
|
6
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
@@ -16,9 +16,11 @@ const stream_1 = require("stream");
|
|
|
16
16
|
const url_1 = require("url");
|
|
17
17
|
const util_1 = require("util");
|
|
18
18
|
const crypto = require("crypto");
|
|
19
|
+
const fs = require("fs");
|
|
20
|
+
const promises_1 = require("fs/promises");
|
|
19
21
|
const core_1 = require("@salesforce/core");
|
|
20
22
|
const request = require("request");
|
|
21
|
-
const npmCommand_1 = require("../
|
|
23
|
+
const npmCommand_1 = require("../shared/npmCommand");
|
|
22
24
|
const CRYPTO_LEVEL = 'RSA-SHA256';
|
|
23
25
|
exports.ALLOW_LIST_FILENAME = 'unsignedPluginAllowList.json';
|
|
24
26
|
exports.DEFAULT_REGISTRY = 'https://registry.npmjs.org/';
|
|
@@ -65,7 +67,7 @@ function retrieveKey(stream) {
|
|
|
65
67
|
});
|
|
66
68
|
stream.on('end', () => {
|
|
67
69
|
if (!key.includes('-----BEGIN')) {
|
|
68
|
-
return reject(new core_1.
|
|
70
|
+
return reject(new core_1.SfError('The specified key format is invalid.', 'InvalidKeyFormat'));
|
|
69
71
|
}
|
|
70
72
|
return resolve(key);
|
|
71
73
|
});
|
|
@@ -88,7 +90,7 @@ async function verify(codeVerifierInfo) {
|
|
|
88
90
|
});
|
|
89
91
|
codeVerifierInfo.signatureStream.on('end', () => {
|
|
90
92
|
if (signature.byteLength === 0) {
|
|
91
|
-
return reject(new core_1.
|
|
93
|
+
return reject(new core_1.SfError('The provided signature is invalid or missing.', 'InvalidSignature'));
|
|
92
94
|
}
|
|
93
95
|
else {
|
|
94
96
|
const verification = signApi.verify(publicKey, signature.toString('utf8'), 'base64');
|
|
@@ -116,7 +118,7 @@ class InstallationVerification {
|
|
|
116
118
|
constructor(requestImpl, fsImpl) {
|
|
117
119
|
// why? dependency injection is better than sinon
|
|
118
120
|
this.requestImpl = requestImpl ? requestImpl : request;
|
|
119
|
-
this.fsImpl = fsImpl ? fsImpl :
|
|
121
|
+
this.fsImpl = fsImpl ? fsImpl : fs;
|
|
120
122
|
this.readFileAsync = (0, util_1.promisify)(this.fsImpl.readFile);
|
|
121
123
|
this.unlinkAsync = (0, util_1.promisify)(this.fsImpl.unlink);
|
|
122
124
|
}
|
|
@@ -130,7 +132,11 @@ class InstallationVerification {
|
|
|
130
132
|
this.config = _config;
|
|
131
133
|
return this;
|
|
132
134
|
}
|
|
133
|
-
|
|
135
|
+
const err = new core_1.SfError('the cli engine config cannot be null', 'InvalidParam');
|
|
136
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
137
|
+
// @ts-ignore override readonly .name field
|
|
138
|
+
err.name = 'InvalidParam';
|
|
139
|
+
throw err;
|
|
134
140
|
}
|
|
135
141
|
/**
|
|
136
142
|
* setter for the plugin name
|
|
@@ -142,7 +148,11 @@ class InstallationVerification {
|
|
|
142
148
|
this.pluginNpmName = _pluginName;
|
|
143
149
|
return this;
|
|
144
150
|
}
|
|
145
|
-
|
|
151
|
+
const err = new core_1.SfError('pluginName must be specified.', 'InvalidParam');
|
|
152
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
153
|
+
// @ts-ignore override readonly .name field
|
|
154
|
+
err.name = 'InvalidParam';
|
|
155
|
+
throw err;
|
|
146
156
|
}
|
|
147
157
|
/**
|
|
148
158
|
* validates the digital signature.
|
|
@@ -173,7 +183,11 @@ class InstallationVerification {
|
|
|
173
183
|
})
|
|
174
184
|
.catch((e) => {
|
|
175
185
|
if (e.code === 'DEPTH_ZERO_SELF_SIGNED_CERT') {
|
|
176
|
-
|
|
186
|
+
const err = new core_1.SfError('Encountered a self signed certificated. To enable "export NODE_TLS_REJECT_UNAUTHORIZED=0"', 'SelfSignedCert');
|
|
187
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
188
|
+
// @ts-ignore override readonly .name field
|
|
189
|
+
err.name = 'SelfSignedCert';
|
|
190
|
+
throw err;
|
|
177
191
|
}
|
|
178
192
|
throw e;
|
|
179
193
|
});
|
|
@@ -220,7 +234,7 @@ class InstallationVerification {
|
|
|
220
234
|
}));
|
|
221
235
|
}
|
|
222
236
|
else {
|
|
223
|
-
return reject(new core_1.
|
|
237
|
+
return reject(new core_1.SfError(`A request to url ${url} failed with error code: [${
|
|
224
238
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
225
239
|
response ? response.statusCode : 'undefined'}]`, 'ErrorGettingContent'));
|
|
226
240
|
}
|
|
@@ -242,18 +256,19 @@ class InstallationVerification {
|
|
|
242
256
|
logger.debug(`streamTagGz | fileNameStr: ${fileNameStr}`);
|
|
243
257
|
// Make sure the cache path exists.
|
|
244
258
|
try {
|
|
245
|
-
await
|
|
246
|
-
new npmCommand_1.NpmModule(npmMeta.moduleName, npmMeta.version, this.config.cliRoot)
|
|
259
|
+
await (0, promises_1.mkdir)(this.getCachePath(), { recursive: true });
|
|
260
|
+
const npmModule = new npmCommand_1.NpmModule(npmMeta.moduleName, npmMeta.version, this.config.cliRoot);
|
|
261
|
+
await npmModule.fetchTarball((0, exports.getNpmRegistry)().href, {
|
|
247
262
|
cwd: this.getCachePath(),
|
|
248
263
|
});
|
|
249
|
-
const tarBallFile =
|
|
264
|
+
const tarBallFile = fs
|
|
250
265
|
.readdirSync(this.getCachePath(), { withFileTypes: true })
|
|
251
266
|
.find((entry) => entry.isFile() && entry.name.includes(npmMeta.version));
|
|
252
267
|
npmMeta.tarballLocalPath = path.join(this.getCachePath(), tarBallFile.name);
|
|
253
268
|
}
|
|
254
269
|
catch (err) {
|
|
255
270
|
logger.debug(err);
|
|
256
|
-
throw
|
|
271
|
+
throw err;
|
|
257
272
|
}
|
|
258
273
|
return npmMeta;
|
|
259
274
|
}
|
|
@@ -282,7 +297,11 @@ class InstallationVerification {
|
|
|
282
297
|
const npmMetadata = npmModule.show(npmRegistry.href);
|
|
283
298
|
logger.debug('retrieveNpmMeta | Found npm meta information.');
|
|
284
299
|
if (!npmMetadata.versions) {
|
|
285
|
-
|
|
300
|
+
const err = new core_1.SfError(`The npm metadata for plugin ${this.pluginNpmName.name} is missing the versions attribute.`, 'InvalidNpmMetadata');
|
|
301
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
302
|
+
// @ts-ignore override readonly .name field
|
|
303
|
+
err.name = 'InvalidNpmMetadata';
|
|
304
|
+
throw err;
|
|
286
305
|
}
|
|
287
306
|
// Assume the tag is version tag.
|
|
288
307
|
let versionNumber = npmMetadata.versions.find((version) => version === this.pluginNpmName.tag);
|
|
@@ -301,27 +320,47 @@ class InstallationVerification {
|
|
|
301
320
|
logger.debug(`retrieveNpmMeta | versionObject: ${versionNumber}`);
|
|
302
321
|
}
|
|
303
322
|
else {
|
|
304
|
-
|
|
323
|
+
const err = new core_1.SfError(`The dist tag ${this.pluginNpmName.tag} was not found for plugin: ${this.pluginNpmName.name}`, 'NpmTagNotFound');
|
|
324
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
325
|
+
// @ts-ignore override readonly .name field
|
|
326
|
+
err.name = 'NpmTagNotFound';
|
|
327
|
+
throw err;
|
|
305
328
|
}
|
|
306
329
|
}
|
|
307
330
|
else {
|
|
308
|
-
|
|
331
|
+
const err = new core_1.SfError('The deployed NPM is missing dist-tags.', 'UnexpectedNpmFormat');
|
|
332
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
333
|
+
// @ts-ignore override readonly .name field
|
|
334
|
+
err.name = 'UnexpectedNpmFormat';
|
|
335
|
+
throw err;
|
|
309
336
|
}
|
|
310
337
|
}
|
|
311
338
|
npmModule.npmMeta.version = versionNumber;
|
|
312
339
|
if (!npmMetadata.sfdx) {
|
|
313
|
-
|
|
340
|
+
const err = new core_1.SfError('This plugin is not signed by Salesforce.com, Inc.', 'NotSigned');
|
|
341
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
342
|
+
// @ts-ignore override readonly .name field
|
|
343
|
+
err.name = 'NotSigned';
|
|
344
|
+
throw err;
|
|
314
345
|
}
|
|
315
346
|
else {
|
|
316
347
|
if (!validSalesforceHostname(npmMetadata.sfdx.publicKeyUrl)) {
|
|
317
|
-
|
|
348
|
+
const err = new core_1.SfError(`The host is not allowed to provide signing information. [${npmMetadata.sfdx.publicKeyUrl}]`, 'UnexpectedHost');
|
|
349
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
350
|
+
// @ts-ignore override readonly .name field
|
|
351
|
+
err.name = 'UnexpectedHost';
|
|
352
|
+
throw err;
|
|
318
353
|
}
|
|
319
354
|
else {
|
|
320
355
|
logger.debug(`retrieveNpmMeta | versionObject.sfdx.publicKeyUrl: ${npmMetadata.sfdx.publicKeyUrl}`);
|
|
321
356
|
npmModule.npmMeta.publicKeyUrl = npmMetadata.sfdx.publicKeyUrl;
|
|
322
357
|
}
|
|
323
358
|
if (!validSalesforceHostname(npmMetadata.sfdx.signatureUrl)) {
|
|
324
|
-
|
|
359
|
+
const err = new core_1.SfError(`The host is not allowed to provide signing information. [${npmMetadata.sfdx.signatureUrl}]`, 'UnexpectedHost');
|
|
360
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
361
|
+
// @ts-ignore override readonly .name field
|
|
362
|
+
err.name = 'UnexpectedHost';
|
|
363
|
+
throw err;
|
|
325
364
|
}
|
|
326
365
|
else {
|
|
327
366
|
logger.debug(`retrieveNpmMeta | versionObject.sfdx.signatureUrl: ${npmMetadata.sfdx.signatureUrl}`);
|
|
@@ -366,8 +405,13 @@ async function doPrompt(vconfig) {
|
|
|
366
405
|
switch (shouldContinue.toLowerCase()) {
|
|
367
406
|
case 'y':
|
|
368
407
|
return;
|
|
369
|
-
default:
|
|
370
|
-
|
|
408
|
+
default: {
|
|
409
|
+
const err = new core_1.SfError('The user canceled the plugin installation.', 'InstallationCanceledError');
|
|
410
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
411
|
+
// @ts-ignore override readonly .name field
|
|
412
|
+
err.name = 'InstallationCanceledError';
|
|
413
|
+
throw err;
|
|
414
|
+
}
|
|
371
415
|
}
|
|
372
416
|
}
|
|
373
417
|
exports.doPrompt = doPrompt;
|
|
@@ -375,7 +419,11 @@ async function doInstallationCodeSigningVerification(config, plugin, verificatio
|
|
|
375
419
|
try {
|
|
376
420
|
const meta = await verificationConfig.verifier.verify();
|
|
377
421
|
if (!meta.verified) {
|
|
378
|
-
|
|
422
|
+
const err = new core_1.SfError("A digital signature is specified for this plugin but it didn't verify against the certificate.", 'FailedDigitalSignatureVerification');
|
|
423
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
424
|
+
// @ts-ignore override readonly .name field
|
|
425
|
+
err.name = 'FailedDigitalSignatureVerification';
|
|
426
|
+
throw err;
|
|
379
427
|
}
|
|
380
428
|
verificationConfig.log(`Successfully validated digital signature for ${plugin.plugin}.`);
|
|
381
429
|
}
|
|
@@ -390,9 +438,17 @@ async function doInstallationCodeSigningVerification(config, plugin, verificatio
|
|
|
390
438
|
}
|
|
391
439
|
}
|
|
392
440
|
else if (err.name === 'PluginNotFound' || err.name === 'PluginAccessDenied') {
|
|
393
|
-
|
|
441
|
+
const e = new core_1.SfError(err.message || 'The user canceled the plugin installation.');
|
|
442
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
443
|
+
// @ts-ignore override readonly .name field
|
|
444
|
+
e.name = '';
|
|
445
|
+
throw e;
|
|
394
446
|
}
|
|
395
|
-
|
|
447
|
+
const sfErr = core_1.SfError.wrap(err);
|
|
448
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
449
|
+
// @ts-ignore override readonly .name field
|
|
450
|
+
sfErr.name = err.name;
|
|
451
|
+
throw sfErr;
|
|
396
452
|
}
|
|
397
453
|
}
|
|
398
454
|
exports.doInstallationCodeSigningVerification = doInstallationCodeSigningVerification;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installationVerification.js","sourceRoot":"","sources":["../../src/shared/installationVerification.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,4DAA4D;AAC5D,sDAAsD;AACtD,+DAA+D;AAC/D,wDAAwD;AAExD,6BAA6B;AAC7B,mCAAkC;AAClC,6BAAiE;AACjE,+BAAkD;AAClD,iCAAiC;AACjC,yBAAyB;AACzB,0CAAoC;AACpC,2CAAmD;AACnD,mCAAmC;AACnC,qDAA0D;AAG1D,MAAM,YAAY,GAAG,YAAY,CAAC;AACrB,QAAA,mBAAmB,GAAG,8BAA8B,CAAC;AACrD,QAAA,gBAAgB,GAAG,6BAA6B,CAAC;AAc9D,MAAa,gBAAgB;IAK3B,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,IAAW,YAAY,CAAC,KAAe;QACrC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;IACpB,CAAC;IAED,IAAW,eAAe;QACxB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,IAAW,eAAe,CAAC,KAAe;QACxC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IACzB,CAAC;IAED,IAAW,eAAe;QACxB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC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O,GAAG,EAAE;QACZ,IAAI,GAAG,CAAC,IAAI,KAAK,WAAW,EAAE;YAC5B,IAAI,MAAM,kBAAkB,CAAC,QAAQ,CAAC,aAAa,EAAE,EAAE;gBACrD,kBAAkB,CAAC,GAAG,CAAC,eAAe,MAAM,CAAC,MAAM,mDAAmD,CAAC,CAAC;gBACxG,OAAO;aACR;iBAAM;gBACL,OAAO,MAAM,QAAQ,CAAC,kBAAkB,CAAC,CAAC;aAC3C;SACF;aAAM,IAAI,GAAG,CAAC,IAAI,KAAK,gBAAgB,IAAI,GAAG,CAAC,IAAI,KAAK,oBAAoB,EAAE;YAC7E,MAAM,CAAC,GAAG,IAAI,cAAO,CAAC,GAAG,CAAC,OAAO,IAAI,4CAA4C,CAAC,CAAC;YACnF,6DAA6D;YAC7D,2CAA2C;YAC3C,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC;YACZ,MAAM,CAAC,CAAC;SACT;QACD,MAAM,KAAK,GAAG,cAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChC,6DAA6D;QAC7D,2CAA2C;QAC3C,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;QACtB,MAAM,KAAK,CAAC;KACb;AACH,CAAC;AAvCD,sFAuCC"}
|
|
@@ -27,9 +27,7 @@ declare type NpmCommandOptions = shelljs.ExecOptions & {
|
|
|
27
27
|
registry?: string;
|
|
28
28
|
cliRoot?: string;
|
|
29
29
|
};
|
|
30
|
-
declare type NpmCommandResult =
|
|
31
|
-
[name: string]: string;
|
|
32
|
-
};
|
|
30
|
+
declare type NpmCommandResult = shelljs.ShellString;
|
|
33
31
|
export declare class NpmCommand {
|
|
34
32
|
private static npmPkgPath;
|
|
35
33
|
static runNpmCmd(cmd: string, options?: NpmCommandOptions): NpmCommandResult;
|
|
@@ -66,5 +64,7 @@ export declare class NpmModule {
|
|
|
66
64
|
constructor(module: string, version?: string, cliRoot?: string);
|
|
67
65
|
show(registry: string): NpmShowResults;
|
|
68
66
|
pack(registry: string, options?: shelljs.ExecOptions): void;
|
|
67
|
+
fetchTarball(registry: string, options?: shelljs.ExecOptions): Promise<void>;
|
|
68
|
+
pollForAvailability(checkFn: () => void): Promise<void>;
|
|
69
69
|
}
|
|
70
70
|
export {};
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2020, 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
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.NpmModule = exports.NpmCommand = void 0;
|
|
11
|
+
const os_1 = require("os");
|
|
12
|
+
const path = require("path");
|
|
13
|
+
const fs = require("fs");
|
|
14
|
+
const npm_run_path_1 = require("npm-run-path");
|
|
15
|
+
const shelljs = require("shelljs");
|
|
16
|
+
const core_1 = require("@salesforce/core");
|
|
17
|
+
const command_1 = require("@salesforce/command");
|
|
18
|
+
const kit_1 = require("@salesforce/kit");
|
|
19
|
+
class NpmCommand {
|
|
20
|
+
static runNpmCmd(cmd, options = {}) {
|
|
21
|
+
const nodeExecutable = NpmCommand.findNode(options.cliRoot);
|
|
22
|
+
const npmCli = NpmCommand.npmCli();
|
|
23
|
+
const command = `"${nodeExecutable}" "${npmCli}" ${cmd} --registry=${options.registry}`;
|
|
24
|
+
const npmCmdResult = shelljs.exec(command, {
|
|
25
|
+
...options,
|
|
26
|
+
silent: true,
|
|
27
|
+
async: false,
|
|
28
|
+
env: npm_run_path_1.default.env({ env: process.env }),
|
|
29
|
+
});
|
|
30
|
+
if (npmCmdResult.code !== 0) {
|
|
31
|
+
const err = new core_1.SfError(npmCmdResult.stderr, 'ShellExecError');
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
33
|
+
// @ts-ignore override readonly .name field
|
|
34
|
+
err.name = 'ShellExecError';
|
|
35
|
+
throw err;
|
|
36
|
+
}
|
|
37
|
+
return npmCmdResult;
|
|
38
|
+
}
|
|
39
|
+
static npmPackagePath() {
|
|
40
|
+
return this.npmPkgPath;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Returns the path to the npm-cli.js file in this package's node_modules
|
|
44
|
+
*
|
|
45
|
+
* @private
|
|
46
|
+
*/
|
|
47
|
+
static npmCli() {
|
|
48
|
+
const pkgPath = NpmCommand.npmPackagePath();
|
|
49
|
+
const fileData = fs.readFileSync(pkgPath, 'utf8');
|
|
50
|
+
const pkgJson = (0, kit_1.parseJson)(fileData, pkgPath);
|
|
51
|
+
const prjPath = pkgPath.substring(0, pkgPath.lastIndexOf(path.sep));
|
|
52
|
+
return path.join(prjPath, pkgJson.bin['npm']);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Locate node executable and return its absolute path
|
|
56
|
+
* First it tries to locate the node executable on the root path passed in
|
|
57
|
+
* If not found then tries to use whatver 'node' resolves to on the user's PATH
|
|
58
|
+
* If found return absolute path to the executable
|
|
59
|
+
* If the node executable cannot be found, an error is thrown
|
|
60
|
+
*
|
|
61
|
+
* @private
|
|
62
|
+
*/
|
|
63
|
+
static findNode(root = undefined) {
|
|
64
|
+
const isExecutable = (filepath) => {
|
|
65
|
+
if ((0, os_1.type)() === 'Windows_NT')
|
|
66
|
+
return filepath.endsWith('node.exe');
|
|
67
|
+
try {
|
|
68
|
+
if (filepath.endsWith('node')) {
|
|
69
|
+
// This checks if the filepath is executable on Mac or Linux, if it is not it errors.
|
|
70
|
+
fs.accessSync(filepath, fs.constants.X_OK);
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
return false;
|
|
78
|
+
};
|
|
79
|
+
if (root) {
|
|
80
|
+
const sfdxBinDirs = NpmCommand.findSfdxBinDirs(root);
|
|
81
|
+
if (sfdxBinDirs.length > 0) {
|
|
82
|
+
// Find the node executable
|
|
83
|
+
const node = shelljs.find(sfdxBinDirs).filter((file) => isExecutable(file))[0];
|
|
84
|
+
if (node) {
|
|
85
|
+
return fs.realpathSync(node);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
// Check to see if node is installed
|
|
90
|
+
const nodeShellString = shelljs.which('node');
|
|
91
|
+
if ((nodeShellString === null || nodeShellString === void 0 ? void 0 : nodeShellString.code) === 0 && (nodeShellString === null || nodeShellString === void 0 ? void 0 : nodeShellString.stdout))
|
|
92
|
+
return nodeShellString.stdout;
|
|
93
|
+
const err = new core_1.SfError('Cannot locate node executable.', 'CannotFindNodeExecutable');
|
|
94
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
95
|
+
// @ts-ignore override readonly .name field
|
|
96
|
+
err.name = 'CannotFindNodeExecutable';
|
|
97
|
+
throw err;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Finds the bin directory in the sfdx installation root path
|
|
101
|
+
*
|
|
102
|
+
* @param sfdxPath
|
|
103
|
+
* @private
|
|
104
|
+
*/
|
|
105
|
+
static findSfdxBinDirs(sfdxPath) {
|
|
106
|
+
return sfdxPath
|
|
107
|
+
? [path.join(sfdxPath, 'bin'), path.join(sfdxPath, 'client', 'bin')].filter((p) => fs.existsSync(p))
|
|
108
|
+
: [];
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
exports.NpmCommand = NpmCommand;
|
|
112
|
+
NpmCommand.npmPkgPath = require.resolve('npm/package.json');
|
|
113
|
+
class NpmModule {
|
|
114
|
+
constructor(module, version = 'latest', cliRoot = undefined) {
|
|
115
|
+
this.module = module;
|
|
116
|
+
this.version = version;
|
|
117
|
+
this.cliRoot = cliRoot;
|
|
118
|
+
this.npmMeta = {
|
|
119
|
+
moduleName: module,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
show(registry) {
|
|
123
|
+
const showCmd = NpmCommand.runNpmCmd(`show ${this.module}@${this.version} --json`, {
|
|
124
|
+
registry,
|
|
125
|
+
cliRoot: this.cliRoot,
|
|
126
|
+
});
|
|
127
|
+
// `npm show` doesn't return exit code 1 when it fails to get a specific package version
|
|
128
|
+
// If `stdout` is empty then no info was found in the registry.
|
|
129
|
+
if (showCmd.stdout === '') {
|
|
130
|
+
const err = new core_1.SfError(`Failed to find ${this.module}@${this.version} in the registry`, 'NpmError');
|
|
131
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
132
|
+
// @ts-ignore override readonly .name field
|
|
133
|
+
err.name = 'NpmError';
|
|
134
|
+
throw err;
|
|
135
|
+
}
|
|
136
|
+
try {
|
|
137
|
+
return JSON.parse(showCmd.stdout);
|
|
138
|
+
}
|
|
139
|
+
catch (error) {
|
|
140
|
+
const err = new core_1.SfError(error, 'ShellParseError');
|
|
141
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
142
|
+
// @ts-ignore override readonly .name field
|
|
143
|
+
err.name = 'ShellParseError';
|
|
144
|
+
throw err;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
pack(registry, options) {
|
|
148
|
+
try {
|
|
149
|
+
NpmCommand.runNpmCmd(`pack ${this.module}@${this.version}`, {
|
|
150
|
+
...options,
|
|
151
|
+
registry,
|
|
152
|
+
cliRoot: this.cliRoot,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
catch (err) {
|
|
156
|
+
const sfErr = core_1.SfError.wrap(err);
|
|
157
|
+
const e = new core_1.SfError(`Failed to fetch tarball from the registry: \n${sfErr.message}`, 'NpmError');
|
|
158
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
159
|
+
// @ts-ignore override readonly .name field
|
|
160
|
+
e.name = 'NpmError';
|
|
161
|
+
throw e;
|
|
162
|
+
}
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
async fetchTarball(registry, options) {
|
|
166
|
+
await this.pollForAvailability(() => {
|
|
167
|
+
this.pack(registry, options);
|
|
168
|
+
});
|
|
169
|
+
this.pack(registry, options);
|
|
170
|
+
}
|
|
171
|
+
async pollForAvailability(checkFn) {
|
|
172
|
+
const ux = await command_1.UX.create();
|
|
173
|
+
const isNonTTY = process.env.CI !== undefined || process.env.CIRCLECI !== undefined;
|
|
174
|
+
let found = false;
|
|
175
|
+
let attempts = 0;
|
|
176
|
+
const maxAttempts = 300;
|
|
177
|
+
const start = isNonTTY ? (msg) => ux.log(msg) : (msg) => ux.startSpinner(msg);
|
|
178
|
+
const update = isNonTTY ? (msg) => ux.log(msg) : (msg) => ux.setSpinnerStatus(msg);
|
|
179
|
+
const stop = isNonTTY ? (msg) => ux.log(msg) : (msg) => ux.stopSpinner(msg);
|
|
180
|
+
start('Polling for new version(s) to become available on npm');
|
|
181
|
+
while (!found && attempts < maxAttempts) {
|
|
182
|
+
attempts += 1;
|
|
183
|
+
update(`attempt: ${attempts} of ${maxAttempts}`);
|
|
184
|
+
try {
|
|
185
|
+
checkFn();
|
|
186
|
+
found = true;
|
|
187
|
+
}
|
|
188
|
+
catch (error) {
|
|
189
|
+
if (attempts === maxAttempts) {
|
|
190
|
+
throw error;
|
|
191
|
+
}
|
|
192
|
+
found = false;
|
|
193
|
+
}
|
|
194
|
+
await (0, kit_1.sleep)(1000);
|
|
195
|
+
}
|
|
196
|
+
stop(attempts >= maxAttempts ? 'failed' : 'done');
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
exports.NpmModule = NpmModule;
|
|
200
|
+
//# sourceMappingURL=npmCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npmCommand.js","sourceRoot":"","sources":["../../src/shared/npmCommand.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,sDAAsD;;;AAEtD,2BAAoC;AACpC,6BAA6B;AAE7B,yBAAyB;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Q,IAAI,CAAC,CAAC;YACd,MAAM,CAAC,YAAY,QAAQ,OAAO,WAAW,EAAE,CAAC,CAAC;YAEjD,IAAI;gBACF,OAAO,EAAE,CAAC;gBACV,KAAK,GAAG,IAAI,CAAC;aACd;YAAC,OAAO,KAAK,EAAE;gBACd,IAAI,QAAQ,KAAK,WAAW,EAAE;oBAC5B,MAAM,KAAK,CAAC;iBACb;gBACD,KAAK,GAAG,KAAK,CAAC;aACf;YAED,MAAM,IAAA,WAAK,EAAC,IAAI,CAAC,CAAC;SACnB;QACD,IAAI,CAAC,QAAQ,IAAI,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACpD,CAAC;CACF;AA1FD,8BA0FC"}
|
package/messages/verify.json
CHANGED
|
@@ -7,5 +7,6 @@
|
|
|
7
7
|
"flags": {
|
|
8
8
|
"npm": "Specify the npm name. This can include a tag/version",
|
|
9
9
|
"registry": "The registry name. the behavior is the same as npm"
|
|
10
|
-
}
|
|
10
|
+
},
|
|
11
|
+
"FailedDigitalSignatureVerification": "A digital signature is specified for this plugin but it didn't verify against the certificate."
|
|
11
12
|
}
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"2.0.0","commands":{"plugins:trust:verify":{"id":"plugins:trust:verify","description":"validate a digital signature for a npm package","strict":true,"usage":"<%= command.id %> -n <string> [-r <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-trust","pluginAlias":"@salesforce/plugin-trust","pluginType":"core","aliases":[],"examples":["sfdx plugins:trust:verify --npm @scope/npmName --registry http://my.repo.org:4874","sfdx plugins:trust:verify --npm @scope/npmName"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"npm":{"name":"npm","type":"option","char":"n","description":"Specify the npm name. This can include a tag/version","required":true,"multiple":false},"registry":{"name":"registry","type":"option","char":"r","description":"The registry name. the behavior is the same as npm","required":false,"multiple":false}},"args":[],"flagsConfig":{"npm":{"kind":"string","char":"n","required":true,"description":"Specify the npm name. This can include a tag/version","input":[],"multiple":false,"type":"option"},"registry":{"kind":"string","char":"r","required":false,"description":"The registry name. the behavior is the same as npm","input":[],"multiple":false,"type":"option"}}}}}
|
package/package.json
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-trust",
|
|
3
3
|
"description": "validate a digital signature for a npm package",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
|
+
"main": "lib/index.js",
|
|
6
7
|
"bin": {
|
|
7
8
|
"sf-trust": "bin/run"
|
|
8
9
|
},
|
|
9
10
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
10
11
|
"dependencies": {
|
|
11
|
-
"@oclif/
|
|
12
|
-
"@salesforce/command": "^
|
|
13
|
-
"@salesforce/core": "^
|
|
12
|
+
"@oclif/core": "^1.6.3",
|
|
13
|
+
"@salesforce/command": "^5.0.4",
|
|
14
|
+
"@salesforce/core": "^3.10.1",
|
|
14
15
|
"npm": "^7.21.0",
|
|
15
16
|
"npm-run-path": "^4.0.1",
|
|
16
17
|
"shelljs": "^0.8.4",
|
|
17
18
|
"tslib": "^2"
|
|
18
19
|
},
|
|
19
20
|
"devDependencies": {
|
|
20
|
-
"
|
|
21
|
-
"@oclif/plugin-command-snapshot": "^
|
|
21
|
+
"oclif": "^2.6.1",
|
|
22
|
+
"@oclif/plugin-command-snapshot": "^3.1.3",
|
|
22
23
|
"@salesforce/cli-plugins-testkit": "^1.3.0",
|
|
23
|
-
"@salesforce/dev-config": "^
|
|
24
|
-
"@salesforce/dev-scripts": "0.
|
|
24
|
+
"@salesforce/dev-config": "^3.0.0",
|
|
25
|
+
"@salesforce/dev-scripts": "^2.0.0",
|
|
25
26
|
"@salesforce/plugin-command-reference": "^1.3.0",
|
|
26
27
|
"@salesforce/prettier-config": "^0.0.2",
|
|
27
28
|
"@salesforce/ts-sinon": "1.3.21",
|
|
@@ -37,16 +38,15 @@
|
|
|
37
38
|
"eslint-config-salesforce-license": "^0.1.6",
|
|
38
39
|
"eslint-config-salesforce-typescript": "^0.2.7",
|
|
39
40
|
"eslint-plugin-header": "^3.1.1",
|
|
40
|
-
"eslint-plugin-import": "2.
|
|
41
|
+
"eslint-plugin-import": "2.25.4",
|
|
41
42
|
"eslint-plugin-jsdoc": "^35.1.2",
|
|
42
43
|
"eslint-plugin-prettier": "^3.4.0",
|
|
43
|
-
"husky": "^
|
|
44
|
-
"
|
|
45
|
-
"mocha": "^8.4.0",
|
|
44
|
+
"husky": "^7.0.4",
|
|
45
|
+
"mocha": "^9.1.3",
|
|
46
46
|
"nyc": "^15.1.0",
|
|
47
47
|
"prettier": "^2.3.0",
|
|
48
48
|
"pretty-quick": "^3.1.0",
|
|
49
|
-
"shx": "0.3.
|
|
49
|
+
"shx": "0.3.4",
|
|
50
50
|
"sinon": "10.0.0",
|
|
51
51
|
"sinon-chai": "^3.7.0",
|
|
52
52
|
"ts-node": "^10.0.0",
|
|
@@ -114,23 +114,16 @@
|
|
|
114
114
|
"prepare": "sf-install",
|
|
115
115
|
"pretest": "sf-compile-test",
|
|
116
116
|
"test": "sf-test",
|
|
117
|
-
"test:command-reference": "./bin/
|
|
118
|
-
"test:deprecation-policy": "./bin/
|
|
119
|
-
"test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000",
|
|
120
|
-
"version": "oclif
|
|
121
|
-
},
|
|
122
|
-
"husky": {
|
|
123
|
-
"hooks": {
|
|
124
|
-
"pre-commit": "sf-husky-pre-commit",
|
|
125
|
-
"commit-msg": "sf-husky-commit-msg",
|
|
126
|
-
"pre-push": "sf-husky-pre-push"
|
|
127
|
-
}
|
|
117
|
+
"test:command-reference": "./bin/dev commandreference:generate --erroronwarnings",
|
|
118
|
+
"test:deprecation-policy": "./bin/dev snapshot:compare",
|
|
119
|
+
"test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel",
|
|
120
|
+
"version": "oclif readme"
|
|
128
121
|
},
|
|
129
122
|
"publishConfig": {
|
|
130
123
|
"access": "public"
|
|
131
124
|
},
|
|
132
125
|
"sfdx": {
|
|
133
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-trust/
|
|
134
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-trust/
|
|
126
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-trust/2.0.0.crt",
|
|
127
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-trust/2.0.0.sig"
|
|
135
128
|
}
|
|
136
129
|
}
|
package/lib/lib/NpmName.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NpmName.js","sourceRoot":"","sources":["../../src/lib/NpmName.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,2CAA6C;AAO7C;;;;;;GAMG;AACH,MAAa,OAAO;IAMlB;;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,IAAI,gBAAS,CAAC,qCAAqC,EAAE,yBAAyB,CAAC,CAAC;SACvF;QAED,MAAM,aAAa,GAAG,IAAI,O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IAAI,CAAC,GAAG,CAAC,CAAC;aAC/B;SACF;QAED,OAAO,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;OAIG;IACI,QAAQ,CAAC,UAAU,GAAG,KAAK;QAChC,MAAM,cAAc,GAAa,EAAE,CAAC;QACpC,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;;AAnIH,0BAoIC;AAnIwB,mBAAW,GAAG,QAAQ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"installationVerification.js","sourceRoot":"","sources":["../../src/lib/installationVerification.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,4DAA4D;AAC5D,sDAAsD;AACtD,+DAA+D;AAC/D,wDAAwD;AAExD,6BAA6B;AAC7B,mCAAkC;AAClC,6BAAiE;AACjE,+BAAkD;AAClD,iCAAiC;AACjC,2CAAyD;AACzD,mCAAmC;AACnC,kDAAuD;AAGvD,MAAM,YAAY,GAAG,YAAY,CAAC;AACrB,QAAA,mBAAmB,GAAG,8BAA8B,CAAC;AACrD,QAAA,gBAAgB,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AAK,UAAU,qCAAqC,CACzD,MAAqB,EACrB,MAAuC,EACvC,kBAAsC;IAEtC,IAAI;QACF,MAAM,IAAI,GAAG,MAAM,kBAAkB,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QACxD,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,MAAM,IAAI,gBAAS,CACjB,gGAAgG,EAChG,oCAAoC,CACrC,CAAC;SACH;QACD,kBAAkB,CAAC,GAAG,CAAC,gDAAgD,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;KAC1F;IAAC,OAAO,GAAG,EAAE;QACZ,IAAI,GAAG,CAAC,IAAI,KAAK,WAAW,EAAE;YAC5B,IAAI,MAAM,kBAAkB,CAAC,QAAQ,CAAC,aAAa,EAAE,EAAE;gBACrD,kBAAkB,CAAC,GAAG,CAAC,eAAe,MAAM,CAAC,MAAM,mDAAmD,CAAC,CAAC;gBACxG,OAAO;aACR;iBAAM;gBACL,OAAO,MAAM,QAAQ,CAAC,kBAAkB,CAAC,CAAC;aAC3C;SACF;aAAM,IAAI,GAAG,CAAC,IAAI,KAAK,gBAAgB,IAAI,GAAG,CAAC,IAAI,KAAK,oBAAoB,EAAE;YAC7E,MAAM,IAAI,gBAAS,CAAC,GAAG,CAAC,OAAO,IAAI,4CAA4C,CAAC,CAAC;SAClF;QACD,MAAM,gBAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KAC3B;AACH,CAAC;AA3BD,sFA2BC"}
|
package/lib/lib/npmCommand.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2020, 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
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.NpmModule = exports.NpmCommand = void 0;
|
|
11
|
-
const os_1 = require("os");
|
|
12
|
-
const path = require("path");
|
|
13
|
-
const npm_run_path_1 = require("npm-run-path");
|
|
14
|
-
const shelljs = require("shelljs");
|
|
15
|
-
const core_1 = require("@salesforce/core");
|
|
16
|
-
class NpmCommand {
|
|
17
|
-
static runNpmCmd(cmd, options = {}) {
|
|
18
|
-
const nodeExecutable = NpmCommand.findNode(options.cliRoot);
|
|
19
|
-
const npmCli = NpmCommand.npmCli();
|
|
20
|
-
const command = `"${nodeExecutable}" "${npmCli}" ${cmd} --registry=${options.registry} --json`;
|
|
21
|
-
const npmShowResult = shelljs.exec(command, {
|
|
22
|
-
...options,
|
|
23
|
-
silent: true,
|
|
24
|
-
fatal: true,
|
|
25
|
-
async: false,
|
|
26
|
-
env: npm_run_path_1.default.env({ env: process.env }),
|
|
27
|
-
});
|
|
28
|
-
if (npmShowResult.code !== 0) {
|
|
29
|
-
throw new core_1.SfdxError(npmShowResult.stderr, 'ShellExecError');
|
|
30
|
-
}
|
|
31
|
-
try {
|
|
32
|
-
return JSON.parse(npmShowResult.stdout);
|
|
33
|
-
}
|
|
34
|
-
catch (error) {
|
|
35
|
-
throw new core_1.SfdxError(error, 'ShellParseError');
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
static npmPackagePath() {
|
|
39
|
-
return this.npmPkgPath;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Returns the path to the npm-cli.js file in this package's node_modules
|
|
43
|
-
*
|
|
44
|
-
* @private
|
|
45
|
-
*/
|
|
46
|
-
static npmCli() {
|
|
47
|
-
const pkgPath = NpmCommand.npmPackagePath();
|
|
48
|
-
const pkgJson = core_1.fs.readJsonSync(pkgPath);
|
|
49
|
-
const prjPath = pkgPath.substring(0, pkgPath.lastIndexOf(path.sep));
|
|
50
|
-
return path.join(prjPath, pkgJson.bin['npm']);
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Locate node executable and return its absolute path
|
|
54
|
-
* First it tries to locate the node executable on the root path passed in
|
|
55
|
-
* If not found then tries to use whatver 'node' resolves to on the user's PATH
|
|
56
|
-
* If found return absolute path to the executable
|
|
57
|
-
* If the node executable cannot be found, an error is thrown
|
|
58
|
-
*
|
|
59
|
-
* @private
|
|
60
|
-
*/
|
|
61
|
-
static findNode(root = undefined) {
|
|
62
|
-
const isExecutable = (filepath) => {
|
|
63
|
-
if ((0, os_1.type)() === 'Windows_NT')
|
|
64
|
-
return filepath.endsWith('node.exe');
|
|
65
|
-
try {
|
|
66
|
-
if (filepath.endsWith('node')) {
|
|
67
|
-
// This checks if the filepath is executable on Mac or Linux, if it is not it errors.
|
|
68
|
-
core_1.fs.accessSync(filepath, core_1.fs.constants.X_OK);
|
|
69
|
-
return true;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
catch {
|
|
73
|
-
return false;
|
|
74
|
-
}
|
|
75
|
-
return false;
|
|
76
|
-
};
|
|
77
|
-
if (root) {
|
|
78
|
-
const sfdxBinDirs = NpmCommand.findSfdxBinDirs(root);
|
|
79
|
-
if (sfdxBinDirs.length > 0) {
|
|
80
|
-
// Find the node executable
|
|
81
|
-
const node = shelljs.find(sfdxBinDirs).filter((file) => isExecutable(file))[0];
|
|
82
|
-
if (node) {
|
|
83
|
-
return core_1.fs.realpathSync(node);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
// Check to see if node is installed
|
|
88
|
-
const nodeShellString = shelljs.which('node');
|
|
89
|
-
if ((nodeShellString === null || nodeShellString === void 0 ? void 0 : nodeShellString.code) === 0 && (nodeShellString === null || nodeShellString === void 0 ? void 0 : nodeShellString.stdout))
|
|
90
|
-
return nodeShellString.stdout;
|
|
91
|
-
throw new core_1.SfdxError('Cannot locate node executable.', 'CannotFindNodeExecutable');
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Finds the bin directory in the sfdx installation root path
|
|
95
|
-
*
|
|
96
|
-
* @param sfdxPath
|
|
97
|
-
* @private
|
|
98
|
-
*/
|
|
99
|
-
static findSfdxBinDirs(sfdxPath) {
|
|
100
|
-
return sfdxPath
|
|
101
|
-
? [path.join(sfdxPath, 'bin'), path.join(sfdxPath, 'client', 'bin')].filter((p) => core_1.fs.existsSync(p))
|
|
102
|
-
: [];
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
exports.NpmCommand = NpmCommand;
|
|
106
|
-
NpmCommand.npmPkgPath = require.resolve('npm/package.json');
|
|
107
|
-
class NpmModule {
|
|
108
|
-
constructor(module, version = 'latest', cliRoot = undefined) {
|
|
109
|
-
this.module = module;
|
|
110
|
-
this.version = version;
|
|
111
|
-
this.cliRoot = cliRoot;
|
|
112
|
-
this.npmMeta = {
|
|
113
|
-
moduleName: module,
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
show(registry) {
|
|
117
|
-
return NpmCommand.runNpmCmd(`show ${this.module}@${this.version}`, { registry, cliRoot: this.cliRoot });
|
|
118
|
-
}
|
|
119
|
-
pack(registry, options) {
|
|
120
|
-
NpmCommand.runNpmCmd(`pack ${this.module}@${this.version}`, { ...options, registry, cliRoot: this.cliRoot });
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
exports.NpmModule = NpmModule;
|
|
125
|
-
//# sourceMappingURL=npmCommand.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"npmCommand.js","sourceRoot":"","sources":["../../src/lib/npmCommand.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,sDAAsD;;;AAEtD,2BAAoC;AACpC,6BAA6B;AAE7B,+CAAsC;AACtC,mCAAmC;AAEnC,2CAAiD;AA2CjD,MAAa,UAAU;IAGd,MAAM,CAAC,SAAS,CAAC,GAAW,EAAE,UAAU,EAAuB;QACpE,MAAM,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC,OAAO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