socket 0.14.154 → 0.15.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/dist/.config/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/cli.js +1470 -2680
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +15 -12
- package/dist/constants.js.map +1 -1
- package/dist/shadow-bin.js +5 -7
- package/dist/shadow-bin.js.map +1 -1
- package/dist/shadow-npm-inject.js +130 -1646
- package/dist/shadow-npm-inject.js.map +1 -1
- package/dist/types/commands/analytics/cmd-analytics.d.mts.map +1 -1
- package/dist/types/commands/analytics/fetch-org-analytics.d.mts.map +1 -1
- package/dist/types/commands/analytics/fetch-repo-analytics.d.mts.map +1 -1
- package/dist/types/commands/analytics/handle-analytics.d.mts.map +1 -1
- package/dist/types/commands/analytics/output-analytics.d.mts +15 -16
- package/dist/types/commands/analytics/output-analytics.d.mts.map +1 -1
- package/dist/types/commands/audit-log/fetch-audit-log.d.mts.map +1 -1
- package/dist/types/commands/cdxgen/cmd-cdxgen.d.mts.map +1 -1
- package/dist/types/commands/ci/fetch-default-org-slug.d.mts.map +1 -1
- package/dist/types/commands/dependencies/fetch-dependencies.d.mts.map +1 -1
- package/dist/types/commands/diff-scan/fetch-diff-scan.d.mts.map +1 -1
- package/dist/types/commands/fix/git.d.mts +9 -1
- package/dist/types/commands/fix/git.d.mts.map +1 -1
- package/dist/types/commands/fix/npm-fix.d.mts.map +1 -1
- package/dist/types/commands/fix/open-pr.d.mts +30 -16
- package/dist/types/commands/fix/open-pr.d.mts.map +1 -1
- package/dist/types/commands/fix/pnpm-fix.d.mts.map +1 -1
- package/dist/types/commands/info/fetch-package-info.d.mts.map +1 -1
- package/dist/types/commands/login/attempt-login.d.mts.map +1 -1
- package/dist/types/commands/npm/wrap-npm.d.mts.map +1 -1
- package/dist/types/commands/npx/wrap-npx.d.mts.map +1 -1
- package/dist/types/commands/oops/cmd-oops.d.mts.map +1 -1
- package/dist/types/commands/optimize/deps-includes-by-agent.d.mts +1 -1
- package/dist/types/commands/optimize/get-overrides-by-agent.d.mts +1 -1
- package/dist/types/commands/optimize/lockfile-includes-by-agent.d.mts +1 -1
- package/dist/types/commands/optimize/ls-by-agent.d.mts +1 -1
- package/dist/types/commands/optimize/update-manifest-by-agent.d.mts +1 -1
- package/dist/types/commands/organization/fetch-license-policy.d.mts.map +1 -1
- package/dist/types/commands/organization/fetch-organization-list.d.mts.map +1 -1
- package/dist/types/commands/organization/fetch-quota.d.mts.map +1 -1
- package/dist/types/commands/organization/fetch-security-policy.d.mts.map +1 -1
- package/dist/types/commands/organization/output-organization-list.d.mts.map +1 -1
- package/dist/types/commands/package/cmd-package-score.d.mts.map +1 -1
- package/dist/types/commands/package/fetch-purl-deep-score.d.mts.map +1 -1
- package/dist/types/commands/package/fetch-purls-shallow-score.d.mts.map +1 -1
- package/dist/types/commands/repos/fetch-create-repo.d.mts.map +1 -1
- package/dist/types/commands/repos/fetch-delete-repo.d.mts.map +1 -1
- package/dist/types/commands/repos/fetch-list-repos.d.mts.map +1 -1
- package/dist/types/commands/repos/fetch-update-repo.d.mts.map +1 -1
- package/dist/types/commands/repos/fetch-view-repo.d.mts.map +1 -1
- package/dist/types/commands/repos/handle-create-repo.d.mts.map +1 -1
- package/dist/types/commands/repos/output-create-repo.d.mts +1 -1
- package/dist/types/commands/repos/output-create-repo.d.mts.map +1 -1
- package/dist/types/commands/scan/fetch-create-org-full-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/fetch-delete-org-full-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/fetch-diff-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/fetch-list-scans.d.mts.map +1 -1
- package/dist/types/commands/scan/fetch-report-data.d.mts.map +1 -1
- package/dist/types/commands/scan/fetch-scan-metadata.d.mts.map +1 -1
- package/dist/types/commands/scan/fetch-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts.map +1 -1
- package/dist/types/commands/scan/generate-report.d.mts.map +1 -1
- package/dist/types/commands/scan/stream-scan.d.mts +1 -1
- package/dist/types/commands/scan/stream-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/suggest-org-slug.d.mts.map +1 -1
- package/dist/types/commands/scan/suggest-repo-slug.d.mts.map +1 -1
- package/dist/types/commands/threat-feed/fetch-threat-feed.d.mts.map +1 -1
- package/dist/types/commands/threat-feed/output-threat-feed.d.mts.map +1 -1
- package/dist/types/constants.d.mts +1 -1
- package/dist/types/constants.d.mts.map +1 -1
- package/dist/types/shadow/npm/arborist/lib/dep-valid.d.mts +2 -2
- package/dist/types/shadow/npm/arborist/lib/dep-valid.d.mts.map +1 -1
- package/dist/types/{utils → shadow/npm}/arborist-helpers.d.mts +19 -3
- package/dist/types/shadow/npm/arborist-helpers.d.mts.map +1 -0
- package/dist/types/{utils/npm.d.mts → shadow/npm/install.d.mts} +2 -2
- package/dist/types/shadow/npm/install.d.mts.map +1 -0
- package/dist/types/shadow/npm/paths.d.mts +0 -6
- package/dist/types/shadow/npm/paths.d.mts.map +1 -1
- package/dist/types/utils/agent.d.mts +2 -2
- package/dist/types/utils/agent.d.mts.map +1 -1
- package/dist/types/utils/alerts-map.d.mts +0 -11
- package/dist/types/utils/alerts-map.d.mts.map +1 -1
- package/dist/types/utils/api.d.mts +22 -12
- package/dist/types/utils/api.d.mts.map +1 -1
- package/dist/types/utils/meow-with-subcommands.d.mts.map +1 -1
- package/dist/types/utils/npm-paths.d.mts +7 -0
- package/dist/types/utils/npm-paths.d.mts.map +1 -0
- package/dist/types/utils/pnpm.d.mts +2 -1
- package/dist/types/utils/pnpm.d.mts.map +1 -1
- package/dist/types/utils/sdk.d.mts +4 -1
- package/dist/types/utils/sdk.d.mts.map +1 -1
- package/dist/types/utils/socket-url.d.mts +10 -2
- package/dist/types/utils/socket-url.d.mts.map +1 -1
- package/dist/types/utils/translations.d.mts.map +1 -1
- package/dist/utils.js +3323 -0
- package/dist/utils.js.map +1 -0
- package/dist/vendor.js +1284 -1231
- package/dist/vendor.js.map +1 -1
- package/external/@socketsecurity/registry/external/browserslist.js +382 -366
- package/external/@socketsecurity/registry/external/browserslist.js.map +1 -1
- package/external/@socketsecurity/registry/lib/constants/maintained-node-versions.js +10 -16
- package/external/@socketsecurity/registry/lib/fs.d.ts +6 -4
- package/external/@socketsecurity/registry/package.json +7 -7
- package/package.json +20 -20
- package/dist/shadow-npm-paths.js +0 -291
- package/dist/shadow-npm-paths.js.map +0 -1
- package/dist/types/utils/arborist-helpers.d.mts.map +0 -1
- package/dist/types/utils/npm.d.mts.map +0 -1
|
@@ -6,17 +6,15 @@
|
|
|
6
6
|
// So we maintain a manual version list for now.
|
|
7
7
|
// https://nodejs.org/en/about/previous-releases#looking-for-latest-release-of-a-version-branch
|
|
8
8
|
//
|
|
9
|
-
// Updated
|
|
10
|
-
const manualNext = '
|
|
11
|
-
const manualCurr = '22.
|
|
12
|
-
const manualPrev = '20.
|
|
13
|
-
const manualLast = '18.20.
|
|
9
|
+
// Updated May 5th, 2025.
|
|
10
|
+
const manualNext = '24.0.0'
|
|
11
|
+
const manualCurr = '22.15.0'
|
|
12
|
+
const manualPrev = '20.19.1'
|
|
13
|
+
const manualLast = '18.20.8'
|
|
14
14
|
|
|
15
15
|
const browsersList = /*@__PURE__*/ require('../../external/browserslist')
|
|
16
|
-
const semver = /*@__PURE__*/ require('../../external/semver')
|
|
17
|
-
|
|
18
16
|
const query = browsersList('maintained node versions')
|
|
19
|
-
// Trim value, e.g. 'node 22.
|
|
17
|
+
// Trim value, e.g. 'node 22.15.0' to '22.15.0'.
|
|
20
18
|
.map(s => s.slice(5 /*'node '.length*/))
|
|
21
19
|
// browsersList returns results in descending order.
|
|
22
20
|
const queryNext = query.at(0) ?? manualNext
|
|
@@ -24,10 +22,9 @@ const queryCurr = query.at(1) ?? manualCurr
|
|
|
24
22
|
const queryPrev = query.at(2) ?? manualPrev
|
|
25
23
|
const queryLast = query.at(-1) ?? manualLast
|
|
26
24
|
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
)
|
|
25
|
+
const semver = /*@__PURE__*/ require('../../external/semver')
|
|
26
|
+
const next = semver.gt(manualNext, queryNext) ? manualNext : queryNext
|
|
27
|
+
|
|
31
28
|
const current = semver.maxSatisfying(
|
|
32
29
|
[queryCurr, manualCurr],
|
|
33
30
|
`^${semver.major(queryCurr)}`
|
|
@@ -36,10 +33,7 @@ const previous = semver.maxSatisfying(
|
|
|
36
33
|
[queryPrev, manualPrev],
|
|
37
34
|
`^${semver.major(queryPrev)}`
|
|
38
35
|
)
|
|
39
|
-
const last = semver.
|
|
40
|
-
[queryLast, manualLast],
|
|
41
|
-
`^${semver.major(queryLast)}`
|
|
42
|
-
)
|
|
36
|
+
const last = semver.lt(manualLast, queryLast) ? manualLast : queryLast
|
|
43
37
|
|
|
44
38
|
module.exports = Object.freeze(
|
|
45
39
|
Object.assign([last, previous, current, next], {
|
|
@@ -23,6 +23,7 @@ declare type BufferEncoding =
|
|
|
23
23
|
| 'utf-16le'
|
|
24
24
|
| 'ucs2'
|
|
25
25
|
| 'ucs-2'
|
|
26
|
+
declare type JsonContent = NPMCliPackageJson.Content
|
|
26
27
|
declare type ReadFileOptions =
|
|
27
28
|
| Remap<
|
|
28
29
|
ObjectEncodingOptions & {
|
|
@@ -63,28 +64,29 @@ declare const Fs: {
|
|
|
63
64
|
readJson(
|
|
64
65
|
filepath: PathLike,
|
|
65
66
|
options?: ReadJsonOptions | undefined
|
|
66
|
-
): Promise<
|
|
67
|
+
): Promise<JsonContent>
|
|
67
68
|
readJsonSync(
|
|
68
69
|
filepath: PathLike,
|
|
69
70
|
options?: ReadJsonOptions | undefined
|
|
70
|
-
):
|
|
71
|
+
): JsonContent
|
|
71
72
|
remove(filepath: PathLike, options?: RmOptions): Promise<void>
|
|
72
73
|
removeSync(filepath: PathLike, options?: RmOptions): void
|
|
73
74
|
uniqueSync(filepath: PathLike): string
|
|
74
75
|
writeJson(
|
|
75
76
|
filepath: PathLike,
|
|
76
|
-
json:
|
|
77
|
+
json: JsonContent,
|
|
77
78
|
options?: WriteJsonOptions | undefined
|
|
78
79
|
): Promise<void>
|
|
79
80
|
writeJsonSync(
|
|
80
81
|
filepath: PathLike,
|
|
81
|
-
json:
|
|
82
|
+
json: JsonContent,
|
|
82
83
|
options?: WriteJsonOptions | undefined
|
|
83
84
|
): void
|
|
84
85
|
}
|
|
85
86
|
declare namespace Fs {
|
|
86
87
|
export {
|
|
87
88
|
BufferEncoding,
|
|
89
|
+
JsonContent,
|
|
88
90
|
ReadFileOptions,
|
|
89
91
|
ReadJsonOptions,
|
|
90
92
|
ReadDirOptions,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@socketsecurity/registry",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.161",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Socket.dev registry helpers methods and metadata",
|
|
6
6
|
"keywords": [
|
|
@@ -611,22 +611,22 @@
|
|
|
611
611
|
"@socketregistry/yocto-spinner": "1.0.13",
|
|
612
612
|
"@types/pacote": "11.1.8",
|
|
613
613
|
"@yarnpkg/extensions": "2.0.5",
|
|
614
|
-
"browserslist": "4.24.
|
|
614
|
+
"browserslist": "4.24.5",
|
|
615
615
|
"cacache": "19.0.1",
|
|
616
616
|
"cross-env": "7.0.3",
|
|
617
617
|
"del-cli": "6.0.0",
|
|
618
618
|
"dev-null-cli": "2.0.0",
|
|
619
|
-
"eslint": "9.
|
|
619
|
+
"eslint": "9.26.0",
|
|
620
620
|
"fast-sort": "3.4.1",
|
|
621
621
|
"libnpmpack": "9.0.2",
|
|
622
622
|
"make-fetch-happen": "14.0.3",
|
|
623
623
|
"normalize-package-data": "6.0.1",
|
|
624
624
|
"npm-package-arg": "12.0.2",
|
|
625
|
-
"npm-run-all2": "
|
|
626
|
-
"oxlint": "0.16.
|
|
625
|
+
"npm-run-all2": "8.0.1",
|
|
626
|
+
"oxlint": "0.16.9",
|
|
627
627
|
"pacote": "21.0.0",
|
|
628
628
|
"picomatch": "4.0.2",
|
|
629
|
-
"rollup": "4.40.
|
|
629
|
+
"rollup": "4.40.2",
|
|
630
630
|
"semver": "7.7.1",
|
|
631
631
|
"signal-exit": "4.1.0",
|
|
632
632
|
"spdx-correct": "3.2.0",
|
|
@@ -637,7 +637,7 @@
|
|
|
637
637
|
"yoctocolors-cjs": "2.1.2"
|
|
638
638
|
},
|
|
639
639
|
"engines": {
|
|
640
|
-
"node": ">=18.20.
|
|
640
|
+
"node": ">=18.20.8"
|
|
641
641
|
},
|
|
642
642
|
"files": [
|
|
643
643
|
"*.d.ts",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "socket",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "CLI tool for Socket.dev",
|
|
5
5
|
"homepage": "https://github.com/SocketDev/socket-cli",
|
|
6
6
|
"license": "MIT",
|
|
@@ -82,9 +82,9 @@
|
|
|
82
82
|
"@babel/preset-typescript": "7.27.1",
|
|
83
83
|
"@babel/runtime": "7.27.1",
|
|
84
84
|
"@biomejs/biome": "1.9.4",
|
|
85
|
-
"@cyclonedx/cdxgen": "11.2.
|
|
86
|
-
"@eslint/compat": "1.2.
|
|
87
|
-
"@eslint/js": "9.
|
|
85
|
+
"@cyclonedx/cdxgen": "11.2.7",
|
|
86
|
+
"@eslint/compat": "1.2.9",
|
|
87
|
+
"@eslint/js": "9.26.0",
|
|
88
88
|
"@octokit/graphql": "8.2.2",
|
|
89
89
|
"@octokit/openapi-types": "25.0.0",
|
|
90
90
|
"@octokit/request-error": "6.1.8",
|
|
@@ -105,52 +105,52 @@
|
|
|
105
105
|
"@socketregistry/is-interactive": "1.0.5",
|
|
106
106
|
"@socketregistry/packageurl-js": "1.0.6",
|
|
107
107
|
"@socketsecurity/config": "2.1.3",
|
|
108
|
-
"@socketsecurity/registry": "1.0.
|
|
109
|
-
"@socketsecurity/sdk": "1.4.
|
|
108
|
+
"@socketsecurity/registry": "1.0.161",
|
|
109
|
+
"@socketsecurity/sdk": "1.4.32",
|
|
110
110
|
"@types/blessed": "0.1.25",
|
|
111
111
|
"@types/cmd-shim": "5.0.2",
|
|
112
112
|
"@types/micromatch": "4.0.9",
|
|
113
113
|
"@types/mock-fs": "4.13.4",
|
|
114
|
-
"@types/node": "22.15.
|
|
114
|
+
"@types/node": "22.15.15",
|
|
115
115
|
"@types/npmcli__arborist": "6.3.0",
|
|
116
116
|
"@types/proc-log": "3.0.4",
|
|
117
117
|
"@types/semver": "7.7.0",
|
|
118
118
|
"@types/which": "3.0.4",
|
|
119
119
|
"@types/yargs-parser": "21.0.3",
|
|
120
|
-
"@typescript-eslint/parser": "8.
|
|
121
|
-
"@vitest/coverage-v8": "3.1.
|
|
120
|
+
"@typescript-eslint/parser": "8.32.0",
|
|
121
|
+
"@vitest/coverage-v8": "3.1.3",
|
|
122
122
|
"blessed": "0.1.81",
|
|
123
123
|
"blessed-contrib": "4.11.0",
|
|
124
|
-
"browserslist": "4.24.
|
|
124
|
+
"browserslist": "4.24.5",
|
|
125
125
|
"chalk-table": "1.0.2",
|
|
126
126
|
"cmd-shim": "7.0.0",
|
|
127
127
|
"cross-env": "7.0.3",
|
|
128
128
|
"custompatch": "1.1.4",
|
|
129
129
|
"del-cli": "6.0.0",
|
|
130
130
|
"dev-null-cli": "2.0.0",
|
|
131
|
-
"eslint": "9.
|
|
131
|
+
"eslint": "9.26.0",
|
|
132
132
|
"eslint-import-resolver-typescript": "4.3.4",
|
|
133
133
|
"eslint-plugin-import-x": "4.11.0",
|
|
134
134
|
"eslint-plugin-n": "17.17.0",
|
|
135
135
|
"eslint-plugin-sort-destructure-keys": "2.0.0",
|
|
136
136
|
"eslint-plugin-unicorn": "56.0.1",
|
|
137
|
-
"globals": "16.
|
|
137
|
+
"globals": "16.1.0",
|
|
138
138
|
"hpagent": "1.2.0",
|
|
139
139
|
"husky": "9.1.7",
|
|
140
140
|
"ignore": "7.0.4",
|
|
141
|
-
"knip": "5.
|
|
142
|
-
"lint-staged": "15.5.
|
|
141
|
+
"knip": "5.55.0",
|
|
142
|
+
"lint-staged": "15.5.2",
|
|
143
143
|
"magic-string": "0.30.17",
|
|
144
144
|
"meow": "13.2.0",
|
|
145
145
|
"micromatch": "4.0.8",
|
|
146
146
|
"mock-fs": "5.5.0",
|
|
147
147
|
"nock": "14.0.4",
|
|
148
148
|
"npm-package-arg": "12.0.2",
|
|
149
|
-
"npm-run-all2": "
|
|
149
|
+
"npm-run-all2": "8.0.1",
|
|
150
150
|
"open": "10.1.2",
|
|
151
|
-
"oxlint": "0.16.
|
|
151
|
+
"oxlint": "0.16.9",
|
|
152
152
|
"pony-cause": "2.1.11",
|
|
153
|
-
"rollup": "4.40.
|
|
153
|
+
"rollup": "4.40.2",
|
|
154
154
|
"semver": "7.7.1",
|
|
155
155
|
"synp": "1.9.14",
|
|
156
156
|
"terminal-link": "2.1.1",
|
|
@@ -158,9 +158,9 @@
|
|
|
158
158
|
"tinyglobby": "0.2.13",
|
|
159
159
|
"type-coverage": "2.29.7",
|
|
160
160
|
"typescript": "5.8.3",
|
|
161
|
-
"typescript-eslint": "8.
|
|
161
|
+
"typescript-eslint": "8.32.0",
|
|
162
162
|
"unplugin-purge-polyfills": "0.1.0",
|
|
163
|
-
"vitest": "3.1.
|
|
163
|
+
"vitest": "3.1.3",
|
|
164
164
|
"which": "5.0.0",
|
|
165
165
|
"yaml": "2.7.1",
|
|
166
166
|
"yargs-parser": "21.1.1",
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
"tiny-colors": "$yoctocolors-cjs",
|
|
194
194
|
"typedarray": "npm:@socketregistry/typedarray@^1",
|
|
195
195
|
"undici": "6.21.1",
|
|
196
|
-
"vite": "6.
|
|
196
|
+
"vite": "6.3.5",
|
|
197
197
|
"xml2js": "0.5.0",
|
|
198
198
|
"yaml": "2.7.1"
|
|
199
199
|
},
|
package/dist/shadow-npm-paths.js
DELETED
|
@@ -1,291 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const fs = require('node:fs')
|
|
4
|
-
const Module = require('node:module')
|
|
5
|
-
const path = require('node:path')
|
|
6
|
-
const logger = require('../external/@socketsecurity/registry/lib/logger')
|
|
7
|
-
const path$1 = require('../external/@socketsecurity/registry/lib/path')
|
|
8
|
-
const constants = require('./constants.js')
|
|
9
|
-
const vendor = require('./vendor.js')
|
|
10
|
-
const debug = require('../external/@socketsecurity/registry/lib/debug')
|
|
11
|
-
const npm = require('../external/@socketsecurity/registry/lib/npm')
|
|
12
|
-
const words = require('../external/@socketsecurity/registry/lib/words')
|
|
13
|
-
const shadowNpmInject = require('./shadow-npm-inject.js')
|
|
14
|
-
|
|
15
|
-
const { NODE_MODULES: NODE_MODULES$1, NPM: NPM$1, shadowBinPath } = constants
|
|
16
|
-
function findBinPathDetailsSync(binName) {
|
|
17
|
-
const binPaths =
|
|
18
|
-
vendor.libExports$3.sync(binName, {
|
|
19
|
-
all: true,
|
|
20
|
-
nothrow: true
|
|
21
|
-
}) ?? []
|
|
22
|
-
let shadowIndex = -1
|
|
23
|
-
let theBinPath
|
|
24
|
-
for (let i = 0, { length } = binPaths; i < length; i += 1) {
|
|
25
|
-
const binPath = binPaths[i]
|
|
26
|
-
// Skip our bin directory if it's in the front.
|
|
27
|
-
if (path.dirname(binPath) === shadowBinPath) {
|
|
28
|
-
shadowIndex = i
|
|
29
|
-
} else {
|
|
30
|
-
theBinPath = npm.resolveBinPath(binPath)
|
|
31
|
-
break
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return {
|
|
35
|
-
name: binName,
|
|
36
|
-
path: theBinPath,
|
|
37
|
-
shadowed: shadowIndex !== -1
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
function findNpmPathSync(npmBinPath) {
|
|
41
|
-
// Lazily access constants.WIN32.
|
|
42
|
-
const { WIN32 } = constants
|
|
43
|
-
let thePath = npmBinPath
|
|
44
|
-
while (true) {
|
|
45
|
-
const libNmNpmPath = path.join(thePath, 'lib', NODE_MODULES$1, NPM$1)
|
|
46
|
-
// mise puts its npm bin in a path like:
|
|
47
|
-
// /Users/SomeUsername/.local/share/mise/installs/node/vX.X.X/bin/npm.
|
|
48
|
-
// HOWEVER, the location of the npm install is:
|
|
49
|
-
// /Users/SomeUsername/.local/share/mise/installs/node/vX.X.X/lib/node_modules/npm.
|
|
50
|
-
if (
|
|
51
|
-
// Use existsSync here because statsSync, even with { throwIfNoEntry: false },
|
|
52
|
-
// will throw an ENOTDIR error for paths like ./a-file-that-exists/a-directory-that-does-not.
|
|
53
|
-
// See https://github.com/nodejs/node/issues/56993.
|
|
54
|
-
fs.existsSync(libNmNpmPath) &&
|
|
55
|
-
fs
|
|
56
|
-
.statSync(libNmNpmPath, {
|
|
57
|
-
throwIfNoEntry: false
|
|
58
|
-
})
|
|
59
|
-
?.isDirectory()
|
|
60
|
-
) {
|
|
61
|
-
thePath = path.join(libNmNpmPath, NPM$1)
|
|
62
|
-
}
|
|
63
|
-
const nmPath = path.join(thePath, NODE_MODULES$1)
|
|
64
|
-
if (
|
|
65
|
-
// npm bin paths may look like:
|
|
66
|
-
// /usr/local/share/npm/bin/npm
|
|
67
|
-
// /Users/SomeUsername/.nvm/versions/node/vX.X.X/bin/npm
|
|
68
|
-
// C:\Users\SomeUsername\AppData\Roaming\npm\bin\npm.cmd
|
|
69
|
-
// OR
|
|
70
|
-
// C:\Program Files\nodejs\npm.cmd
|
|
71
|
-
//
|
|
72
|
-
// In practically all cases the npm path contains a node_modules folder:
|
|
73
|
-
// /usr/local/share/npm/bin/npm/node_modules
|
|
74
|
-
// C:\Program Files\nodejs\node_modules
|
|
75
|
-
fs.existsSync(nmPath) &&
|
|
76
|
-
fs
|
|
77
|
-
.statSync(nmPath, {
|
|
78
|
-
throwIfNoEntry: false
|
|
79
|
-
})
|
|
80
|
-
?.isDirectory() &&
|
|
81
|
-
// Optimistically look for the default location.
|
|
82
|
-
(path.basename(thePath) === NPM$1 ||
|
|
83
|
-
// Chocolatey installs npm bins in the same directory as node bins.
|
|
84
|
-
(WIN32 && fs.existsSync(path.join(thePath, `${NPM$1}.cmd`))))
|
|
85
|
-
) {
|
|
86
|
-
return thePath
|
|
87
|
-
}
|
|
88
|
-
const parent = path.dirname(thePath)
|
|
89
|
-
if (parent === thePath) {
|
|
90
|
-
return undefined
|
|
91
|
-
}
|
|
92
|
-
thePath = parent
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
async function getPackageFilesForScan(cwd, inputPaths, supportedFiles, config) {
|
|
96
|
-
debug.debugLog(
|
|
97
|
-
`getPackageFilesForScan: resolving ${inputPaths.length} paths:\n`,
|
|
98
|
-
inputPaths
|
|
99
|
-
)
|
|
100
|
-
|
|
101
|
-
// Lazily access constants.spinner.
|
|
102
|
-
const { spinner } = constants
|
|
103
|
-
const patterns = shadowNpmInject.pathsToGlobPatterns(inputPaths)
|
|
104
|
-
spinner.start('Searching for local files to include in scan...')
|
|
105
|
-
const entries = await shadowNpmInject.globWithGitIgnore(patterns, {
|
|
106
|
-
cwd,
|
|
107
|
-
socketConfig: config
|
|
108
|
-
})
|
|
109
|
-
if (debug.isDebug()) {
|
|
110
|
-
spinner.stop()
|
|
111
|
-
debug.debugLog(
|
|
112
|
-
`Resolved ${inputPaths.length} paths to ${entries.length} local paths:\n`,
|
|
113
|
-
entries
|
|
114
|
-
)
|
|
115
|
-
spinner.start('Searching for files now...')
|
|
116
|
-
} else {
|
|
117
|
-
spinner.start(
|
|
118
|
-
`Resolved ${inputPaths.length} paths to ${entries.length} local paths, searching for files now...`
|
|
119
|
-
)
|
|
120
|
-
}
|
|
121
|
-
const packageFiles = await shadowNpmInject.filterGlobResultToSupportedFiles(
|
|
122
|
-
entries,
|
|
123
|
-
supportedFiles
|
|
124
|
-
)
|
|
125
|
-
spinner.successAndStop(
|
|
126
|
-
`Found ${packageFiles.length} local ${words.pluralize('file', packageFiles.length)}`
|
|
127
|
-
)
|
|
128
|
-
debug.debugLog('Absolute paths:\n', packageFiles)
|
|
129
|
-
return packageFiles
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
const { NODE_MODULES, NPM, NPX, SOCKET_CLI_ISSUES_URL } = constants
|
|
133
|
-
function exitWithBinPathError(binName) {
|
|
134
|
-
logger.logger.fail(
|
|
135
|
-
`Socket unable to locate ${binName}; ensure it is available in the PATH environment variable`
|
|
136
|
-
)
|
|
137
|
-
// The exit code 127 indicates that the command or binary being executed
|
|
138
|
-
// could not be found.
|
|
139
|
-
// eslint-disable-next-line n/no-process-exit
|
|
140
|
-
process.exit(127)
|
|
141
|
-
}
|
|
142
|
-
let _npmBinPathDetails
|
|
143
|
-
function getNpmBinPathDetails() {
|
|
144
|
-
if (_npmBinPathDetails === undefined) {
|
|
145
|
-
_npmBinPathDetails = findBinPathDetailsSync(NPM)
|
|
146
|
-
}
|
|
147
|
-
return _npmBinPathDetails
|
|
148
|
-
}
|
|
149
|
-
let _npxBinPathDetails
|
|
150
|
-
function getNpxBinPathDetails() {
|
|
151
|
-
if (_npxBinPathDetails === undefined) {
|
|
152
|
-
_npxBinPathDetails = findBinPathDetailsSync(NPX)
|
|
153
|
-
}
|
|
154
|
-
return _npxBinPathDetails
|
|
155
|
-
}
|
|
156
|
-
let _npmBinPath
|
|
157
|
-
function getNpmBinPath() {
|
|
158
|
-
if (_npmBinPath === undefined) {
|
|
159
|
-
_npmBinPath = getNpmBinPathDetails().path
|
|
160
|
-
if (!_npmBinPath) {
|
|
161
|
-
exitWithBinPathError(NPM)
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
return _npmBinPath
|
|
165
|
-
}
|
|
166
|
-
function isNpmBinPathShadowed() {
|
|
167
|
-
return getNpmBinPathDetails().shadowed
|
|
168
|
-
}
|
|
169
|
-
let _npxBinPath
|
|
170
|
-
function getNpxBinPath() {
|
|
171
|
-
if (_npxBinPath === undefined) {
|
|
172
|
-
_npxBinPath = getNpxBinPathDetails().path
|
|
173
|
-
if (!_npxBinPath) {
|
|
174
|
-
exitWithBinPathError(NPX)
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
return _npxBinPath
|
|
178
|
-
}
|
|
179
|
-
function isNpxBinPathShadowed() {
|
|
180
|
-
return getNpxBinPathDetails().shadowed
|
|
181
|
-
}
|
|
182
|
-
let _npmPath
|
|
183
|
-
function getNpmPath() {
|
|
184
|
-
if (_npmPath === undefined) {
|
|
185
|
-
const npmBinPath = getNpmBinPath()
|
|
186
|
-
_npmPath = npmBinPath ? findNpmPathSync(npmBinPath) : undefined
|
|
187
|
-
if (!_npmPath) {
|
|
188
|
-
let message = 'Unable to find npm CLI install directory.'
|
|
189
|
-
if (npmBinPath) {
|
|
190
|
-
message += `\nSearched parent directories of ${path.dirname(npmBinPath)}.`
|
|
191
|
-
}
|
|
192
|
-
message += `\n\nThis is may be a bug with socket-npm related to changes to the npm CLI.\nPlease report to ${SOCKET_CLI_ISSUES_URL}.`
|
|
193
|
-
logger.logger.fail(message)
|
|
194
|
-
// The exit code 127 indicates that the command or binary being executed
|
|
195
|
-
// could not be found.
|
|
196
|
-
// eslint-disable-next-line n/no-process-exit
|
|
197
|
-
process.exit(127)
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
return _npmPath
|
|
201
|
-
}
|
|
202
|
-
let _npmRequire
|
|
203
|
-
function getNpmRequire() {
|
|
204
|
-
if (_npmRequire === undefined) {
|
|
205
|
-
const npmPath = getNpmPath()
|
|
206
|
-
const npmNmPath = path.join(npmPath, NODE_MODULES, NPM)
|
|
207
|
-
_npmRequire = Module.createRequire(
|
|
208
|
-
path.join(
|
|
209
|
-
fs.existsSync(npmNmPath) ? npmNmPath : npmPath,
|
|
210
|
-
'<dummy-basename>'
|
|
211
|
-
)
|
|
212
|
-
)
|
|
213
|
-
}
|
|
214
|
-
return _npmRequire
|
|
215
|
-
}
|
|
216
|
-
let _arboristPkgPath
|
|
217
|
-
function getArboristPackagePath() {
|
|
218
|
-
if (_arboristPkgPath === undefined) {
|
|
219
|
-
const pkgName = '@npmcli/arborist'
|
|
220
|
-
const mainPathWithForwardSlashes = path$1.normalizePath(
|
|
221
|
-
getNpmRequire().resolve(pkgName)
|
|
222
|
-
)
|
|
223
|
-
const arboristPkgPathWithForwardSlashes = mainPathWithForwardSlashes.slice(
|
|
224
|
-
0,
|
|
225
|
-
mainPathWithForwardSlashes.lastIndexOf(pkgName) + pkgName.length
|
|
226
|
-
)
|
|
227
|
-
// Lazily access constants.WIN32.
|
|
228
|
-
_arboristPkgPath = constants.WIN32
|
|
229
|
-
? path.normalize(arboristPkgPathWithForwardSlashes)
|
|
230
|
-
: arboristPkgPathWithForwardSlashes
|
|
231
|
-
}
|
|
232
|
-
return _arboristPkgPath
|
|
233
|
-
}
|
|
234
|
-
let _arboristClassPath
|
|
235
|
-
function getArboristClassPath() {
|
|
236
|
-
if (_arboristClassPath === undefined) {
|
|
237
|
-
_arboristClassPath = path.join(
|
|
238
|
-
getArboristPackagePath(),
|
|
239
|
-
'lib/arborist/index.js'
|
|
240
|
-
)
|
|
241
|
-
}
|
|
242
|
-
return _arboristClassPath
|
|
243
|
-
}
|
|
244
|
-
let _arboristDepValidPath
|
|
245
|
-
function getArboristDepValidPath() {
|
|
246
|
-
if (_arboristDepValidPath === undefined) {
|
|
247
|
-
_arboristDepValidPath = path.join(
|
|
248
|
-
getArboristPackagePath(),
|
|
249
|
-
'lib/dep-valid.js'
|
|
250
|
-
)
|
|
251
|
-
}
|
|
252
|
-
return _arboristDepValidPath
|
|
253
|
-
}
|
|
254
|
-
let _arboristEdgeClassPath
|
|
255
|
-
function getArboristEdgeClassPath() {
|
|
256
|
-
if (_arboristEdgeClassPath === undefined) {
|
|
257
|
-
_arboristEdgeClassPath = path.join(getArboristPackagePath(), 'lib/edge.js')
|
|
258
|
-
}
|
|
259
|
-
return _arboristEdgeClassPath
|
|
260
|
-
}
|
|
261
|
-
let _arboristNodeClassPath
|
|
262
|
-
function getArboristNodeClassPath() {
|
|
263
|
-
if (_arboristNodeClassPath === undefined) {
|
|
264
|
-
_arboristNodeClassPath = path.join(getArboristPackagePath(), 'lib/node.js')
|
|
265
|
-
}
|
|
266
|
-
return _arboristNodeClassPath
|
|
267
|
-
}
|
|
268
|
-
let _arboristOverrideSetClassPath
|
|
269
|
-
function getArboristOverrideSetClassPath() {
|
|
270
|
-
if (_arboristOverrideSetClassPath === undefined) {
|
|
271
|
-
_arboristOverrideSetClassPath = path.join(
|
|
272
|
-
getArboristPackagePath(),
|
|
273
|
-
'lib/override-set.js'
|
|
274
|
-
)
|
|
275
|
-
}
|
|
276
|
-
return _arboristOverrideSetClassPath
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
exports.getArboristClassPath = getArboristClassPath
|
|
280
|
-
exports.getArboristDepValidPath = getArboristDepValidPath
|
|
281
|
-
exports.getArboristEdgeClassPath = getArboristEdgeClassPath
|
|
282
|
-
exports.getArboristNodeClassPath = getArboristNodeClassPath
|
|
283
|
-
exports.getArboristOverrideSetClassPath = getArboristOverrideSetClassPath
|
|
284
|
-
exports.getNpmBinPath = getNpmBinPath
|
|
285
|
-
exports.getNpmRequire = getNpmRequire
|
|
286
|
-
exports.getNpxBinPath = getNpxBinPath
|
|
287
|
-
exports.getPackageFilesForScan = getPackageFilesForScan
|
|
288
|
-
exports.isNpmBinPathShadowed = isNpmBinPathShadowed
|
|
289
|
-
exports.isNpxBinPathShadowed = isNpxBinPathShadowed
|
|
290
|
-
//# debugId=b482d192-205f-4708-8cc8-9c74bbc66f2b
|
|
291
|
-
//# sourceMappingURL=shadow-npm-paths.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shadow-npm-paths.js","sources":["../src/utils/path-resolve.mts","../src/shadow/npm/paths.mts"],"sourcesContent":["import { existsSync, statSync } from 'node:fs'\nimport path from 'node:path'\n\nimport which from 'which'\n\nimport { debugLog, isDebug } from '@socketsecurity/registry/lib/debug'\nimport { resolveBinPath } from '@socketsecurity/registry/lib/npm'\nimport { pluralize } from '@socketsecurity/registry/lib/words'\n\nimport constants from '../constants.mts'\nimport {\n filterGlobResultToSupportedFiles,\n globWithGitIgnore,\n pathsToGlobPatterns\n} from './glob.mts'\n\nimport type { SocketYml } from '@socketsecurity/config'\nimport type { SocketSdkReturnType } from '@socketsecurity/sdk'\n\nconst { NODE_MODULES, NPM, shadowBinPath } = constants\n\nexport function findBinPathDetailsSync(binName: string): {\n name: string\n path: string | undefined\n shadowed: boolean\n} {\n const binPaths =\n which.sync(binName, {\n all: true,\n nothrow: true\n }) ?? []\n let shadowIndex = -1\n let theBinPath: string | undefined\n for (let i = 0, { length } = binPaths; i < length; i += 1) {\n const binPath = binPaths[i]!\n // Skip our bin directory if it's in the front.\n if (path.dirname(binPath) === shadowBinPath) {\n shadowIndex = i\n } else {\n theBinPath = resolveBinPath(binPath)\n break\n }\n }\n return { name: binName, path: theBinPath, shadowed: shadowIndex !== -1 }\n}\n\nexport function findNpmPathSync(npmBinPath: string): string | undefined {\n // Lazily access constants.WIN32.\n const { WIN32 } = constants\n let thePath = npmBinPath\n while (true) {\n const libNmNpmPath = path.join(thePath, 'lib', NODE_MODULES, NPM)\n // mise puts its npm bin in a path like:\n // /Users/SomeUsername/.local/share/mise/installs/node/vX.X.X/bin/npm.\n // HOWEVER, the location of the npm install is:\n // /Users/SomeUsername/.local/share/mise/installs/node/vX.X.X/lib/node_modules/npm.\n if (\n // Use existsSync here because statsSync, even with { throwIfNoEntry: false },\n // will throw an ENOTDIR error for paths like ./a-file-that-exists/a-directory-that-does-not.\n // See https://github.com/nodejs/node/issues/56993.\n existsSync(libNmNpmPath) &&\n statSync(libNmNpmPath, { throwIfNoEntry: false })?.isDirectory()\n ) {\n thePath = path.join(libNmNpmPath, NPM)\n }\n const nmPath = path.join(thePath, NODE_MODULES)\n if (\n // npm bin paths may look like:\n // /usr/local/share/npm/bin/npm\n // /Users/SomeUsername/.nvm/versions/node/vX.X.X/bin/npm\n // C:\\Users\\SomeUsername\\AppData\\Roaming\\npm\\bin\\npm.cmd\n // OR\n // C:\\Program Files\\nodejs\\npm.cmd\n //\n // In practically all cases the npm path contains a node_modules folder:\n // /usr/local/share/npm/bin/npm/node_modules\n // C:\\Program Files\\nodejs\\node_modules\n existsSync(nmPath) &&\n statSync(nmPath, { throwIfNoEntry: false })?.isDirectory() &&\n // Optimistically look for the default location.\n (path.basename(thePath) === NPM ||\n // Chocolatey installs npm bins in the same directory as node bins.\n (WIN32 && existsSync(path.join(thePath, `${NPM}.cmd`))))\n ) {\n return thePath\n }\n const parent = path.dirname(thePath)\n if (parent === thePath) {\n return undefined\n }\n thePath = parent\n }\n}\n\nexport async function getPackageFilesForScan(\n cwd: string,\n inputPaths: string[],\n supportedFiles: SocketSdkReturnType<'getReportSupportedFiles'>['data'],\n config?: SocketYml | undefined\n): Promise<string[]> {\n debugLog(\n `getPackageFilesForScan: resolving ${inputPaths.length} paths:\\n`,\n inputPaths\n )\n\n // Lazily access constants.spinner.\n const { spinner } = constants\n\n const patterns = pathsToGlobPatterns(inputPaths)\n\n spinner.start('Searching for local files to include in scan...')\n\n const entries = await globWithGitIgnore(patterns, {\n cwd,\n socketConfig: config\n })\n\n if (isDebug()) {\n spinner.stop()\n debugLog(\n `Resolved ${inputPaths.length} paths to ${entries.length} local paths:\\n`,\n entries\n )\n spinner.start('Searching for files now...')\n } else {\n spinner.start(\n `Resolved ${inputPaths.length} paths to ${entries.length} local paths, searching for files now...`\n )\n }\n\n const packageFiles = await filterGlobResultToSupportedFiles(\n entries,\n supportedFiles\n )\n\n spinner.successAndStop(\n `Found ${packageFiles.length} local ${pluralize('file', packageFiles.length)}`\n )\n debugLog('Absolute paths:\\n', packageFiles)\n\n return packageFiles\n}\n","import { existsSync } from 'node:fs'\nimport Module from 'node:module'\nimport path from 'node:path'\n\nimport { logger } from '@socketsecurity/registry/lib/logger'\nimport { normalizePath } from '@socketsecurity/registry/lib/path'\n\nimport constants from '../../constants.mts'\nimport {\n findBinPathDetailsSync,\n findNpmPathSync\n} from '../../utils/path-resolve.mts'\n\nconst { NODE_MODULES, NPM, NPX, SOCKET_CLI_ISSUES_URL } = constants\n\nfunction exitWithBinPathError(binName: string): never {\n logger.fail(\n `Socket unable to locate ${binName}; ensure it is available in the PATH environment variable`\n )\n // The exit code 127 indicates that the command or binary being executed\n // could not be found.\n // eslint-disable-next-line n/no-process-exit\n process.exit(127)\n}\n\nlet _npmBinPathDetails: ReturnType<typeof findBinPathDetailsSync> | undefined\nfunction getNpmBinPathDetails(): ReturnType<typeof findBinPathDetailsSync> {\n if (_npmBinPathDetails === undefined) {\n _npmBinPathDetails = findBinPathDetailsSync(NPM)\n }\n return _npmBinPathDetails\n}\n\nlet _npxBinPathDetails: ReturnType<typeof findBinPathDetailsSync> | undefined\nfunction getNpxBinPathDetails(): ReturnType<typeof findBinPathDetailsSync> {\n if (_npxBinPathDetails === undefined) {\n _npxBinPathDetails = findBinPathDetailsSync(NPX)\n }\n return _npxBinPathDetails\n}\n\nlet _npmBinPath: string | undefined\nexport function getNpmBinPath(): string {\n if (_npmBinPath === undefined) {\n _npmBinPath = getNpmBinPathDetails().path\n if (!_npmBinPath) {\n exitWithBinPathError(NPM)\n }\n }\n return _npmBinPath\n}\n\nexport function isNpmBinPathShadowed() {\n return getNpmBinPathDetails().shadowed\n}\n\nlet _npxBinPath: string | undefined\nexport function getNpxBinPath(): string {\n if (_npxBinPath === undefined) {\n _npxBinPath = getNpxBinPathDetails().path\n if (!_npxBinPath) {\n exitWithBinPathError(NPX)\n }\n }\n return _npxBinPath\n}\n\nexport function isNpxBinPathShadowed() {\n return getNpxBinPathDetails().shadowed\n}\n\nlet _npmPath: string | undefined\nexport function getNpmPath() {\n if (_npmPath === undefined) {\n const npmBinPath = getNpmBinPath()\n _npmPath = npmBinPath ? findNpmPathSync(npmBinPath) : undefined\n if (!_npmPath) {\n let message = 'Unable to find npm CLI install directory.'\n if (npmBinPath) {\n message += `\\nSearched parent directories of ${path.dirname(npmBinPath)}.`\n }\n message += `\\n\\nThis is may be a bug with socket-npm related to changes to the npm CLI.\\nPlease report to ${SOCKET_CLI_ISSUES_URL}.`\n logger.fail(message)\n // The exit code 127 indicates that the command or binary being executed\n // could not be found.\n // eslint-disable-next-line n/no-process-exit\n process.exit(127)\n }\n }\n return _npmPath\n}\n\nlet _npmRequire: NodeJS.Require | undefined\nexport function getNpmRequire(): NodeJS.Require {\n if (_npmRequire === undefined) {\n const npmPath = getNpmPath()\n const npmNmPath = path.join(npmPath, NODE_MODULES, NPM)\n _npmRequire = Module.createRequire(\n path.join(existsSync(npmNmPath) ? npmNmPath : npmPath, '<dummy-basename>')\n )\n }\n return _npmRequire\n}\n\nlet _arboristPkgPath: string | undefined\nexport function getArboristPackagePath() {\n if (_arboristPkgPath === undefined) {\n const pkgName = '@npmcli/arborist'\n const mainPathWithForwardSlashes = normalizePath(\n getNpmRequire().resolve(pkgName)\n )\n const arboristPkgPathWithForwardSlashes = mainPathWithForwardSlashes.slice(\n 0,\n mainPathWithForwardSlashes.lastIndexOf(pkgName) + pkgName.length\n )\n // Lazily access constants.WIN32.\n _arboristPkgPath = constants.WIN32\n ? path.normalize(arboristPkgPathWithForwardSlashes)\n : arboristPkgPathWithForwardSlashes\n }\n return _arboristPkgPath\n}\n\nlet _arboristClassPath: string | undefined\nexport function getArboristClassPath() {\n if (_arboristClassPath === undefined) {\n _arboristClassPath = path.join(\n getArboristPackagePath(),\n 'lib/arborist/index.js'\n )\n }\n return _arboristClassPath\n}\n\nlet _arboristDepValidPath: string | undefined\nexport function getArboristDepValidPath() {\n if (_arboristDepValidPath === undefined) {\n _arboristDepValidPath = path.join(\n getArboristPackagePath(),\n 'lib/dep-valid.js'\n )\n }\n return _arboristDepValidPath\n}\n\nlet _arboristEdgeClassPath: string | undefined\nexport function getArboristEdgeClassPath() {\n if (_arboristEdgeClassPath === undefined) {\n _arboristEdgeClassPath = path.join(getArboristPackagePath(), 'lib/edge.js')\n }\n return _arboristEdgeClassPath\n}\n\nlet _arboristNodeClassPath: string | undefined\nexport function getArboristNodeClassPath() {\n if (_arboristNodeClassPath === undefined) {\n _arboristNodeClassPath = path.join(getArboristPackagePath(), 'lib/node.js')\n }\n return _arboristNodeClassPath\n}\n\nlet _arboristOverrideSetClassPath: string | undefined\nexport function getArboristOverrideSetClassPath() {\n if (_arboristOverrideSetClassPath === undefined) {\n _arboristOverrideSetClassPath = path.join(\n getArboristPackagePath(),\n 'lib/override-set.js'\n )\n }\n return _arboristOverrideSetClassPath\n}\n"],"names":["shadowBinPath","all","nothrow","length","shadowIndex","theBinPath","name","path","WIN32","existsSync","throwIfNoEntry","thePath","spinner","socketConfig","debugLog","SOCKET_CLI_ISSUES_URL","logger","process","_npmBinPathDetails","_npxBinPathDetails","_npmBinPath","_npxBinPath","_arboristPkgPath"],"mappings":";;;;;;;;;;;;;;AAmBA;;;AAA2BA;AAAc;AAElC;AAKL;AAEIC;AACAC;;;AAGJ;AACA;AAAkBC;;AAChB;AACA;;AAEEC;AACF;AACEC;AACA;AACF;AACF;;AACSC;AAAeC;;;AAC1B;AAEO;AACL;;AACQC;AAAM;;AAEd;AACE;AACA;AACA;AACA;AACA;AACA;AACE;AACA;AACA;AACAC;AACyBC;AAAsB;;AAGjD;;AAEA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACAD;AACmBC;AAAsB;AACzC;AACCH;AACC;AACCC;AAEH;AACF;AACA;;AAEE;AACF;AACAG;AACF;AACF;AAEO;;;AAWL;;AACQC;AAAQ;AAEhB;AAEAA;AAEA;;AAEEC;AACF;;;AAIEC;AAIAF;AACF;AACEA;AAGF;;AAOAA;AAGAE;AAEA;AACF;;AChIA;;;;AAAgCC;AAAsB;AAEtD;AACEC;AAGA;AACA;AACA;AACAC;AACF;AAEA;AACA;;AAEIC;AACF;AACA;AACF;AAEA;AACA;;AAEIC;AACF;AACA;AACF;AAEA;AACO;;AAEHC;;;AAGA;AACF;AACA;AACF;AAEO;AACL;AACF;AAEA;AACO;;AAEHC;;;AAGA;AACF;AACA;AACF;AAEO;AACL;AACF;AAEA;AACO;;AAEH;;;;AAIE;;AAEA;;AAEAL;AACA;AACA;AACA;AACAC;AACF;AACF;AACA;AACF;AAEA;AACO;;AAEH;;;AAKF;AACA;AACF;AAEA;AACO;;;AAGH;AAGA;AAIA;AACAK;AAGF;AACA;AACF;AAEA;AACO;;;AAML;AACA;AACF;AAEA;AACO;;;AAML;AACA;AACF;AAEA;AACO;;;AAGL;AACA;AACF;AAEA;AACO;;;AAGL;AACA;AACF;AAEA;AACO;;;AAML;AACA;AACF;;;;;;;;;;;;","debugId":"b482d192-205f-4708-8cc8-9c74bbc66f2b"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"arborist-helpers.d.mts","sourceRoot":"","sources":["../../../src/utils/arborist-helpers.mts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAA;AAQ7E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,+CAA+C,CAAA;AAEzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAA;AACnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAA;AAchF,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,QAAQ,EACd,iBAAiB,EAAE,MAAM,EAAE,EAC3B,sBAAsB,CAAC,EAAE,MAAM,EAC/B,8BAA8B,CAAC,EAAE,MAAM,GAAG,SAAS,GAClD,MAAM,GAAG,IAAI,CAwBf;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAC3B,QAAQ,GAAG,SAAS,CAiBtB;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAC3B,QAAQ,EAAE,CAmBZ;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC/B,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CACpC,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,CAAC,EAAE,sBAAsB,GAAG,SAAS,CAAA;CAC7C,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;CAChC,CAAA;AAED,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,IAAI,GAAG,IAAI,EAClB,OAAO,CAAC,EAAE,gBAAgB,GAAG,SAAS,GACrC,aAAa,EAAE,CA+EjB;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAElE;AAED,MAAM,MAAM,SAAS,GAAG,OAAO,CAC7B,OAAO,CAAC,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC,EACjD,IAAI,CACL,CAAA;AAED,wBAAgB,UAAU,CACxB,IAAI,EAAE,QAAQ,EACd,UAAU,EAAE,MAAM,EAClB,mBAAmB,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,GACjD,IAAI,CAsDN;AAED,wBAAgB,yBAAyB,CACvC,eAAe,EAAE,mBAAmB,EACpC,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE,QAAQ,EACd,UAAU,EAAE,MAAM,EAClB,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,GAClC,OAAO,CA+BT"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"npm.d.mts","sourceRoot":"","sources":["../../../src/utils/npm.mts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,EAAE,MAAM,oCAAoC,CAAA;AAK1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAA;AASnE,KAAK,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;AAElE,KAAK,qBAAqB,GAAG,WAAW,GAAG;IACzC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAClC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,CAAA;IAC/C,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B,CAAA;AAED,wBAAgB,cAAc,CAAC,OAAO,CAAC,EAAE,qBAAqB,kGAgF7D"}
|