@socketsecurity/cli 0.14.33 → 0.14.35
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/bin/cli.js +34 -4
- package/bin/npm-cli.js +3 -4
- package/bin/npx-cli.js +3 -4
- package/dist/constants.js +59 -0
- package/dist/module-sync/cli.d.ts +0 -1
- package/dist/module-sync/cli.js +637 -1423
- package/dist/module-sync/constants.d.ts +24 -21
- package/dist/module-sync/constants.d.ts.map +1 -0
- package/dist/module-sync/constants.js +2 -79
- package/dist/module-sync/npm-injection.js +116 -436
- package/dist/module-sync/path-resolve.js +24 -45
- package/dist/module-sync/sdk.js +69 -118
- package/dist/module-sync/shadow-bin.d.ts +2 -0
- package/dist/module-sync/shadow-bin.js +109 -0
- package/dist/require/cli.js +633 -1418
- package/dist/require/constants.d.ts.map +1 -0
- package/dist/require/constants.js +2 -79
- package/dist/require/npm-injection.js +116 -435
- package/dist/require/path-resolve.js +24 -45
- package/dist/require/sdk.js +67 -115
- package/dist/require/shadow-bin.js +109 -0
- package/dist/require/vendor.js +8300 -8798
- package/package.json +39 -54
- package/shadow-bin/npm +4 -0
- package/shadow-bin/npx +4 -0
- package/bin/shadow/module-sync/npm +0 -3
- package/bin/shadow/module-sync/npx +0 -3
- package/bin/shadow/require/npm +0 -3
- package/bin/shadow/require/npx +0 -3
- package/dist/module-sync/cli.d.ts.map +0 -1
- package/dist/module-sync/link.d.ts +0 -2
- package/dist/module-sync/link.js +0 -57
- package/dist/module-sync/npm-cli.d.ts +0 -2
- package/dist/module-sync/npm-cli.js +0 -97
- package/dist/module-sync/npx-cli.d.ts +0 -2
- package/dist/module-sync/npx-cli.js +0 -73
- package/dist/module-sync/vendor.js +0 -82
- package/dist/require/cli.d.ts +0 -3
- package/dist/require/cli.d.ts.map +0 -1
- package/dist/require/color-or-markdown.d.ts +0 -23
- package/dist/require/constants.d.ts +0 -21
- package/dist/require/errors.d.ts +0 -7
- package/dist/require/link.d.ts +0 -2
- package/dist/require/link.js +0 -57
- package/dist/require/npm-cli.d.ts +0 -2
- package/dist/require/npm-cli.js +0 -97
- package/dist/require/npm-injection.d.ts +0 -1
- package/dist/require/npx-cli.d.ts +0 -2
- package/dist/require/npx-cli.js +0 -73
- package/dist/require/path-resolve.d.ts +0 -8
- package/dist/require/sdk.d.ts +0 -8
- package/dist/require/settings.d.ts +0 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@socketsecurity/cli",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.35",
|
|
4
4
|
"description": "CLI tool for Socket.dev",
|
|
5
5
|
"homepage": "http://github.com/SocketDev/socket-cli",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,34 +21,16 @@
|
|
|
21
21
|
},
|
|
22
22
|
"exports": {
|
|
23
23
|
"./bin/cli.js": {
|
|
24
|
-
"module-sync"
|
|
25
|
-
|
|
26
|
-
"default": "./dist/module-sync/cli.js"
|
|
27
|
-
},
|
|
28
|
-
"require": {
|
|
29
|
-
"types": "./dist/require/cli.d.ts",
|
|
30
|
-
"default": "./dist/require/cli.js"
|
|
31
|
-
}
|
|
24
|
+
"types": "./dist/module-sync/cli.d.ts",
|
|
25
|
+
"default": "./dist/cli.js"
|
|
32
26
|
},
|
|
33
27
|
"./bin/npm-cli.js": {
|
|
34
|
-
"module-sync"
|
|
35
|
-
|
|
36
|
-
"default": "./dist/module-sync/npm-cli.js"
|
|
37
|
-
},
|
|
38
|
-
"require": {
|
|
39
|
-
"types": "./dist/require/npm-cli.d.ts",
|
|
40
|
-
"default": "./dist/require/npm-cli.js"
|
|
41
|
-
}
|
|
28
|
+
"types": "./dist/module-sync/npm-cli.d.ts",
|
|
29
|
+
"default": "./dist/npm-cli.js"
|
|
42
30
|
},
|
|
43
31
|
"./bin/npx-cli.js": {
|
|
44
|
-
"module-sync"
|
|
45
|
-
|
|
46
|
-
"default": "./dist/module-sync/npx-cli.js"
|
|
47
|
-
},
|
|
48
|
-
"require": {
|
|
49
|
-
"types": "./dist/require/npx-cli.d.ts",
|
|
50
|
-
"default": "./dist/require/npx-cli.js"
|
|
51
|
-
}
|
|
32
|
+
"types": "./dist/module-sync/npx-cli.d.ts",
|
|
33
|
+
"default": "./dist/npx-cli.js"
|
|
52
34
|
},
|
|
53
35
|
"./package.json": "./package.json",
|
|
54
36
|
"./translations.json": "./translations.json"
|
|
@@ -67,33 +49,31 @@
|
|
|
67
49
|
"lint:fix": "npm run lint -- --fix && npm run lint:fix:fast",
|
|
68
50
|
"lint:fix:fast": "prettier --cache --log-level warn --write .",
|
|
69
51
|
"prepare": "husky && custompatch",
|
|
70
|
-
"test": "run-s check build:* test:*",
|
|
71
|
-
"test:c8": "c8 --reporter=none node --test 'test/socket-npm.test.cjs'",
|
|
52
|
+
"test": "run-s check build:* test:* test:coverage:*",
|
|
72
53
|
"test-ci": "run-s build:* test:*",
|
|
73
54
|
"test:unit": "tap-run",
|
|
74
|
-
"test:coverage": "
|
|
55
|
+
"test:coverage:c8": "c8 --reporter=none node --test 'test/socket-npm.test.cjs'",
|
|
56
|
+
"test:coverage:merge": "cp -r .tap/coverage/*.json coverage/tmp && c8 --reporter=lcov --reporter=text --include 'dist/{module-sync,require}/*.js' --exclude 'dist/require/vendor.js' report"
|
|
75
57
|
},
|
|
76
58
|
"dependencies": {
|
|
77
59
|
"@apideck/better-ajv-errors": "^0.3.6",
|
|
78
|
-
"@cyclonedx/cdxgen": "^11.0.
|
|
79
|
-
"@inquirer/confirm": "^5.0.2",
|
|
80
|
-
"@inquirer/password": "^4.0.3",
|
|
81
|
-
"@inquirer/select": "^4.0.3",
|
|
60
|
+
"@cyclonedx/cdxgen": "^11.0.7",
|
|
82
61
|
"@npmcli/promise-spawn": "^8.0.2",
|
|
83
|
-
"@socketregistry/hyrious__bun.lockb": "1.0.
|
|
84
|
-
"@socketregistry/yocto-spinner": "^1.0.
|
|
62
|
+
"@socketregistry/hyrious__bun.lockb": "1.0.6",
|
|
63
|
+
"@socketregistry/yocto-spinner": "^1.0.2",
|
|
85
64
|
"@socketsecurity/config": "^2.1.3",
|
|
86
|
-
"@socketsecurity/registry": "^1.0.
|
|
65
|
+
"@socketsecurity/registry": "^1.0.52",
|
|
87
66
|
"@socketsecurity/sdk": "^1.3.0",
|
|
88
67
|
"blessed": "^0.1.81",
|
|
89
68
|
"blessed-contrib": "^4.11.0",
|
|
90
|
-
"browserslist": "4.24.
|
|
69
|
+
"browserslist": "4.24.3",
|
|
91
70
|
"chalk-table": "^1.0.2",
|
|
71
|
+
"cmd-shim": "^7.0.0",
|
|
92
72
|
"has-flag": "^4.0.0",
|
|
93
73
|
"hpagent": "^1.2.0",
|
|
94
74
|
"ignore": "^6.0.2",
|
|
95
75
|
"micromatch": "^4.0.8",
|
|
96
|
-
"npm-package-arg": "^12.0.
|
|
76
|
+
"npm-package-arg": "^12.0.1",
|
|
97
77
|
"pony-cause": "^2.1.11",
|
|
98
78
|
"semver": "^7.6.3",
|
|
99
79
|
"synp": "^1.9.14",
|
|
@@ -108,24 +88,24 @@
|
|
|
108
88
|
"@babel/plugin-proposal-export-default-from": "^7.25.9",
|
|
109
89
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
110
90
|
"@babel/plugin-transform-export-namespace-from": "^7.25.9",
|
|
111
|
-
"@babel/plugin-transform-modules-commonjs": "^7.26.3",
|
|
112
91
|
"@babel/plugin-transform-runtime": "^7.25.9",
|
|
113
92
|
"@babel/preset-env": "^7.26.0",
|
|
114
93
|
"@babel/preset-typescript": "^7.26.0",
|
|
115
94
|
"@babel/runtime": "^7.26.0",
|
|
116
95
|
"@eslint/compat": "^1.2.4",
|
|
117
|
-
"@eslint/js": "^9.
|
|
118
|
-
"@rollup/plugin-commonjs": "^28.0.
|
|
96
|
+
"@eslint/js": "^9.17.0",
|
|
97
|
+
"@rollup/plugin-commonjs": "^28.0.2",
|
|
119
98
|
"@rollup/plugin-json": "^6.1.0",
|
|
120
|
-
"@rollup/plugin-node-resolve": "^
|
|
121
|
-
"@rollup/plugin-replace": "^6.0.
|
|
122
|
-
"@rollup/pluginutils": "^5.1.
|
|
99
|
+
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
100
|
+
"@rollup/plugin-replace": "^6.0.2",
|
|
101
|
+
"@rollup/pluginutils": "^5.1.4",
|
|
123
102
|
"@tapjs/run": "^4.0.1",
|
|
124
103
|
"@types/blessed": "^0.1.25",
|
|
104
|
+
"@types/cmd-shim": "^5.0.2",
|
|
125
105
|
"@types/micromatch": "^4.0.9",
|
|
126
106
|
"@types/mocha": "^10.0.10",
|
|
127
107
|
"@types/mock-fs": "^4.13.4",
|
|
128
|
-
"@types/node": "^22.10.
|
|
108
|
+
"@types/node": "^22.10.2",
|
|
129
109
|
"@types/npmcli__arborist": "^5.6.11",
|
|
130
110
|
"@types/npmcli__promise-spawn": "^6.0.3",
|
|
131
111
|
"@types/proc-log": "^3.0.4",
|
|
@@ -133,28 +113,28 @@
|
|
|
133
113
|
"@types/update-notifier": "^6.0.8",
|
|
134
114
|
"@types/which": "^3.0.4",
|
|
135
115
|
"@types/yargs-parser": "^21.0.3",
|
|
136
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
137
|
-
"@typescript-eslint/parser": "^8.
|
|
138
|
-
"c8": "^10.1.
|
|
116
|
+
"@typescript-eslint/eslint-plugin": "^8.18.1",
|
|
117
|
+
"@typescript-eslint/parser": "^8.18.1",
|
|
118
|
+
"c8": "^10.1.3",
|
|
139
119
|
"custompatch": "^1.0.28",
|
|
140
|
-
"eslint": "^9.
|
|
120
|
+
"eslint": "^9.17.0",
|
|
141
121
|
"eslint-import-resolver-oxc": "^0.6.0",
|
|
142
122
|
"eslint-plugin-depend": "^0.12.0",
|
|
143
123
|
"eslint-plugin-import-x": "^4.5.0",
|
|
144
|
-
"eslint-plugin-n": "^17.
|
|
124
|
+
"eslint-plugin-n": "^17.15.0",
|
|
145
125
|
"eslint-plugin-sort-destructure-keys": "^2.0.0",
|
|
146
126
|
"eslint-plugin-unicorn": "^56.0.1",
|
|
147
127
|
"husky": "^9.1.7",
|
|
148
128
|
"is-interactive": "^2.0.0",
|
|
149
129
|
"is-unicode-supported": "^2.1.0",
|
|
150
|
-
"knip": "^5.
|
|
151
|
-
"magic-string": "^0.30.
|
|
130
|
+
"knip": "^5.41.0",
|
|
131
|
+
"magic-string": "^0.30.17",
|
|
152
132
|
"meow": "^13.2.0",
|
|
153
133
|
"mock-fs": "^5.4.1",
|
|
154
134
|
"nock": "^13.5.6",
|
|
155
|
-
"npm-run-all2": "^7.0.
|
|
135
|
+
"npm-run-all2": "^7.0.2",
|
|
156
136
|
"open": "^10.1.0",
|
|
157
|
-
"oxlint": "0.
|
|
137
|
+
"oxlint": "0.15.2",
|
|
158
138
|
"prettier": "3.4.2",
|
|
159
139
|
"read-package-up": "^11.0.0",
|
|
160
140
|
"rollup": "4.28.1",
|
|
@@ -163,7 +143,7 @@
|
|
|
163
143
|
"tiny-updater": "^3.5.2",
|
|
164
144
|
"type-coverage": "^2.29.7",
|
|
165
145
|
"typescript": "5.4.5",
|
|
166
|
-
"typescript-eslint": "^8.
|
|
146
|
+
"typescript-eslint": "^8.18.1",
|
|
167
147
|
"unplugin-purge-polyfills": "^0.0.7"
|
|
168
148
|
},
|
|
169
149
|
"overrides": {
|
|
@@ -187,6 +167,8 @@
|
|
|
187
167
|
"semver": "$semver",
|
|
188
168
|
"set-function-length": "npm:@socketregistry/set-function-length@^1",
|
|
189
169
|
"side-channel": "npm:@socketregistry/side-channel@^1",
|
|
170
|
+
"tiny-colors": "$yoctocolors-cjs",
|
|
171
|
+
"typedarray": "npm:@socketregistry/typedarray@^1",
|
|
190
172
|
"yaml": "$yaml"
|
|
191
173
|
},
|
|
192
174
|
"resolutions": {
|
|
@@ -210,6 +192,8 @@
|
|
|
210
192
|
"semver": "^7.6.3",
|
|
211
193
|
"set-function-length": "npm:@socketregistry/set-function-length@^1",
|
|
212
194
|
"side-channel": "npm:@socketregistry/side-channel@^1",
|
|
195
|
+
"tiny-colors": "npm:yoctocolors-cjs@^2.1.2",
|
|
196
|
+
"typedarray": "npm:@socketregistry/typedarray@^1",
|
|
213
197
|
"yaml": "^2.6.0"
|
|
214
198
|
},
|
|
215
199
|
"engines": {
|
|
@@ -218,6 +202,7 @@
|
|
|
218
202
|
"files": [
|
|
219
203
|
"bin/**",
|
|
220
204
|
"dist/**",
|
|
205
|
+
"shadow-bin/**",
|
|
221
206
|
"translations.json"
|
|
222
207
|
]
|
|
223
208
|
}
|
package/shadow-bin/npm
ADDED
package/shadow-bin/npx
ADDED
package/bin/shadow/require/npm
DELETED
package/bin/shadow/require/npx
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts","../../src/utils/formatting.ts","../../src/flags.ts","../../src/utils/meow-with-subcommands.ts","../../src/commands/cdxgen.ts","../../src/utils/api-helpers.ts","../../src/utils/objects.ts","../../src/utils/format-issues.ts","../../src/commands/info.ts","../../src/commands/login.ts","../../src/commands/logout.ts","../../src/commands/npm.ts","../../src/commands/npx.ts","../../src/utils/fs.ts","../../src/utils/package-manager-detector.ts","../../src/commands/optimize.ts","../../src/commands/organization.ts","../../src/commands/raw-npm.ts","../../src/commands/raw-npx.ts","../../src/commands/report/view.ts","../../src/commands/report/create.ts","../../src/commands/report/index.ts","../../src/commands/wrapper.ts","../../src/commands/scan/create.ts","../../src/commands/scan/delete.ts","../../src/commands/scan/list.ts","../../src/commands/scan/metadata.ts","../../src/commands/scan/stream.ts","../../src/commands/scan/index.ts","../../src/commands/audit-log.ts","../../src/commands/repos/create.ts","../../src/commands/repos/delete.ts","../../src/commands/repos/list.ts","../../src/commands/repos/update.ts","../../src/commands/repos/view.ts","../../src/commands/repos/index.ts","../../src/commands/dependencies.ts","../../src/commands/analytics.ts","../../src/commands/diff-scan/get.ts","../../src/commands/diff-scan/index.ts","../../src/commands/threat-feed.ts","../../src/commands/index.ts"],"names":[],"mappings":""}
|
package/dist/module-sync/link.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _interop(e) {
|
|
4
|
-
let d
|
|
5
|
-
if (e) {
|
|
6
|
-
let c = 0
|
|
7
|
-
for (const k in e) {
|
|
8
|
-
d = c++ === 0 && k === 'default' ? e[k] : void 0
|
|
9
|
-
if (!d) break
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
return d ?? e
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
var require$$0 = _interop(require('node:fs'));
|
|
16
|
-
var require$$1 = _interop(require('node:path'));
|
|
17
|
-
var require$$4 = _interop(require('which'));
|
|
18
|
-
|
|
19
|
-
var link = {};
|
|
20
|
-
|
|
21
|
-
Object.defineProperty(link, "__esModule", {
|
|
22
|
-
value: true
|
|
23
|
-
});
|
|
24
|
-
link.installLinks = installLinks;
|
|
25
|
-
var _nodeFs = require$$0;
|
|
26
|
-
var _nodePath = require$$1;
|
|
27
|
-
var _which = require$$4;
|
|
28
|
-
function installLinks(realDirname, binName) {
|
|
29
|
-
const realShadowBinDir = realDirname;
|
|
30
|
-
// find package manager being shadowed by this process
|
|
31
|
-
const bins = _which.sync(binName, {
|
|
32
|
-
all: true
|
|
33
|
-
});
|
|
34
|
-
let shadowIndex = -1;
|
|
35
|
-
const binPath = bins.find((binPath, i) => {
|
|
36
|
-
if ((0, _nodeFs.realpathSync)(_nodePath.dirname(binPath)) === realShadowBinDir) {
|
|
37
|
-
shadowIndex = i;
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
return true;
|
|
41
|
-
});
|
|
42
|
-
const isWin = process.platform === 'win32';
|
|
43
|
-
if (isWin && binPath) {
|
|
44
|
-
return binPath;
|
|
45
|
-
}
|
|
46
|
-
if (!binPath) {
|
|
47
|
-
console.error(`Socket unable to locate ${binName}; ensure it is available in the PATH environment variable`);
|
|
48
|
-
process.exit(127);
|
|
49
|
-
}
|
|
50
|
-
if (shadowIndex === -1) {
|
|
51
|
-
const binDir = _nodePath.join(realDirname);
|
|
52
|
-
process.env['PATH'] = `${binDir}${isWin ? ';' : ':'}${process.env['PATH']}`;
|
|
53
|
-
}
|
|
54
|
-
return binPath;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
exports.link = link;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
function _interop(e) {
|
|
5
|
-
let d
|
|
6
|
-
if (e) {
|
|
7
|
-
let c = 0
|
|
8
|
-
for (const k in e) {
|
|
9
|
-
d = c++ === 0 && k === 'default' ? e[k] : void 0
|
|
10
|
-
if (!d) break
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
return d ?? e
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
var vendor = _interop(require('./vendor.js'));
|
|
17
|
-
var require$$0 = _interop(require('node:fs'));
|
|
18
|
-
var require$$1 = _interop(require('node:path'));
|
|
19
|
-
var require$$1$1 = _interop(require('@npmcli/promise-spawn'));
|
|
20
|
-
var constants = _interop(require('./constants.js'));
|
|
21
|
-
var link = _interop(require('./link.js'));
|
|
22
|
-
var pathResolve = _interop(require('./path-resolve.js'));
|
|
23
|
-
|
|
24
|
-
var npmCli$2 = {};
|
|
25
|
-
|
|
26
|
-
var npmCli$1 = {};
|
|
27
|
-
|
|
28
|
-
var _nodeFs = require$$0;
|
|
29
|
-
var _nodePath = require$$1;
|
|
30
|
-
var _promiseSpawn = require$$1$1;
|
|
31
|
-
var _constants = constants.constants;
|
|
32
|
-
var _link = link.link;
|
|
33
|
-
var _pathResolve = pathResolve.pathResolve;
|
|
34
|
-
const npmPath = (0, _link.installLinks)(_constants.shadowBinPath, 'npm');
|
|
35
|
-
const injectionPath = _nodePath.join(_constants.distPath, 'npm-injection.js');
|
|
36
|
-
|
|
37
|
-
// Adding the `--quiet` and `--no-progress` flags when the `proc-log` module
|
|
38
|
-
// is found to fix a UX issue when running the command with recent versions of
|
|
39
|
-
// npm (input swallowed by the standard npm spinner)
|
|
40
|
-
const npmArgs = process.argv.slice(2);
|
|
41
|
-
if (npmArgs.includes('install') && !npmArgs.includes('--no-progress') && !npmArgs.includes('--quiet')) {
|
|
42
|
-
const npmEntrypoint = (0, _nodeFs.realpathSync)(npmPath);
|
|
43
|
-
const npmRootPath = (0, _pathResolve.findRoot)(_nodePath.dirname(npmEntrypoint));
|
|
44
|
-
if (npmRootPath === undefined) {
|
|
45
|
-
process.exit(127);
|
|
46
|
-
}
|
|
47
|
-
const npmDepPath = _nodePath.join(npmRootPath, 'node_modules');
|
|
48
|
-
let procLog;
|
|
49
|
-
try {
|
|
50
|
-
procLog = require(_nodePath.join(npmDepPath, 'proc-log/lib/index.js')).log;
|
|
51
|
-
} catch {}
|
|
52
|
-
if (procLog) {
|
|
53
|
-
npmArgs.push('--no-progress', '--quiet');
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
process.exitCode = 1;
|
|
57
|
-
const spawnPromise = _promiseSpawn(process.execPath, ['--disable-warning', 'ExperimentalWarning', '--require', injectionPath, npmPath, ...npmArgs], {
|
|
58
|
-
stdio: 'inherit'
|
|
59
|
-
});
|
|
60
|
-
spawnPromise.process.on('exit', (code, signal) => {
|
|
61
|
-
if (signal) {
|
|
62
|
-
process.kill(process.pid, signal);
|
|
63
|
-
} else if (code !== null) {
|
|
64
|
-
process.exit(code);
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
(function (exports) {
|
|
69
|
-
|
|
70
|
-
var _interopRequireWildcard = vendor.interopRequireWildcard.default;
|
|
71
|
-
Object.defineProperty(exports, "__esModule", {
|
|
72
|
-
value: true
|
|
73
|
-
});
|
|
74
|
-
var _exportNames = {};
|
|
75
|
-
Object.defineProperty(exports, "default", {
|
|
76
|
-
enumerable: true,
|
|
77
|
-
get: function () {
|
|
78
|
-
return _npmCli.default;
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
var _npmCli = _interopRequireWildcard(npmCli$1, true);
|
|
82
|
-
Object.keys(_npmCli).forEach(function (key) {
|
|
83
|
-
if (key === "default" || key === "__esModule") return;
|
|
84
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
85
|
-
if (key in exports && exports[key] === _npmCli[key]) return;
|
|
86
|
-
Object.defineProperty(exports, key, {
|
|
87
|
-
enumerable: true,
|
|
88
|
-
get: function () {
|
|
89
|
-
return _npmCli[key];
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
} (npmCli$2));
|
|
94
|
-
|
|
95
|
-
var npmCli = /*@__PURE__*/vendor.getDefaultExportFromCjs(npmCli$2);
|
|
96
|
-
|
|
97
|
-
module.exports = npmCli;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
function _interop(e) {
|
|
5
|
-
let d
|
|
6
|
-
if (e) {
|
|
7
|
-
let c = 0
|
|
8
|
-
for (const k in e) {
|
|
9
|
-
d = c++ === 0 && k === 'default' ? e[k] : void 0
|
|
10
|
-
if (!d) break
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
return d ?? e
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
var vendor = _interop(require('./vendor.js'));
|
|
17
|
-
var require$$1 = _interop(require('node:path'));
|
|
18
|
-
var require$$1$1 = _interop(require('@npmcli/promise-spawn'));
|
|
19
|
-
var constants = _interop(require('./constants.js'));
|
|
20
|
-
var link = _interop(require('./link.js'));
|
|
21
|
-
|
|
22
|
-
var npxCli$2 = {};
|
|
23
|
-
|
|
24
|
-
var npxCli$1 = {};
|
|
25
|
-
|
|
26
|
-
var _nodePath = require$$1;
|
|
27
|
-
var _promiseSpawn = require$$1$1;
|
|
28
|
-
var _constants = constants.constants;
|
|
29
|
-
var _link = link.link;
|
|
30
|
-
const npxPath = (0, _link.installLinks)(_constants.shadowBinPath, 'npx');
|
|
31
|
-
const injectionPath = _nodePath.join(_constants.distPath, 'npm-injection.js');
|
|
32
|
-
process.exitCode = 1;
|
|
33
|
-
const spawnPromise = _promiseSpawn(process.execPath, ['--disable-warning', 'ExperimentalWarning', '--require', injectionPath, npxPath, ...process.argv.slice(2)], {
|
|
34
|
-
stdio: 'inherit'
|
|
35
|
-
});
|
|
36
|
-
spawnPromise.process.on('exit', (code, signal) => {
|
|
37
|
-
if (signal) {
|
|
38
|
-
process.kill(process.pid, signal);
|
|
39
|
-
} else if (code !== null) {
|
|
40
|
-
process.exit(code);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
(function (exports) {
|
|
45
|
-
|
|
46
|
-
var _interopRequireWildcard = vendor.interopRequireWildcard.default;
|
|
47
|
-
Object.defineProperty(exports, "__esModule", {
|
|
48
|
-
value: true
|
|
49
|
-
});
|
|
50
|
-
var _exportNames = {};
|
|
51
|
-
Object.defineProperty(exports, "default", {
|
|
52
|
-
enumerable: true,
|
|
53
|
-
get: function () {
|
|
54
|
-
return _npxCli.default;
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
var _npxCli = _interopRequireWildcard(npxCli$1, true);
|
|
58
|
-
Object.keys(_npxCli).forEach(function (key) {
|
|
59
|
-
if (key === "default" || key === "__esModule") return;
|
|
60
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
61
|
-
if (key in exports && exports[key] === _npxCli[key]) return;
|
|
62
|
-
Object.defineProperty(exports, key, {
|
|
63
|
-
enumerable: true,
|
|
64
|
-
get: function () {
|
|
65
|
-
return _npxCli[key];
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
} (npxCli$2));
|
|
70
|
-
|
|
71
|
-
var npxCli = /*@__PURE__*/vendor.getDefaultExportFromCjs(npxCli$2);
|
|
72
|
-
|
|
73
|
-
module.exports = npxCli;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _interop(e) {
|
|
4
|
-
let d
|
|
5
|
-
if (e) {
|
|
6
|
-
let c = 0
|
|
7
|
-
for (const k in e) {
|
|
8
|
-
d = c++ === 0 && k === 'default' ? e[k] : void 0
|
|
9
|
-
if (!d) break
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
return d ?? e
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function getDefaultExportFromCjs (x) {
|
|
16
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
var interopRequireWildcard = {};
|
|
20
|
-
|
|
21
|
-
var _typeof$1 = {};
|
|
22
|
-
|
|
23
|
-
Object.defineProperty(_typeof$1, "__esModule", {
|
|
24
|
-
value: true
|
|
25
|
-
});
|
|
26
|
-
_typeof$1.default = _typeof;
|
|
27
|
-
function _typeof(o) {
|
|
28
|
-
"@babel/helpers - typeof";
|
|
29
|
-
|
|
30
|
-
return _typeof$1.default = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
31
|
-
return typeof o;
|
|
32
|
-
} : function (o) {
|
|
33
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
34
|
-
}, _typeof(o);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
Object.defineProperty(interopRequireWildcard, "__esModule", {
|
|
38
|
-
value: true
|
|
39
|
-
});
|
|
40
|
-
interopRequireWildcard.default = _interopRequireWildcard;
|
|
41
|
-
var _typeof2 = _typeof$1;
|
|
42
|
-
function _getRequireWildcardCache(e) {
|
|
43
|
-
if ("function" != typeof WeakMap) return null;
|
|
44
|
-
var r = new WeakMap(),
|
|
45
|
-
t = new WeakMap();
|
|
46
|
-
return (_getRequireWildcardCache = function _getRequireWildcardCache(e) {
|
|
47
|
-
return e ? t : r;
|
|
48
|
-
})(e);
|
|
49
|
-
}
|
|
50
|
-
function _interopRequireWildcard(e, r) {
|
|
51
|
-
if (!r && e && e.__esModule) return e;
|
|
52
|
-
if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return {
|
|
53
|
-
"default": e
|
|
54
|
-
};
|
|
55
|
-
var t = _getRequireWildcardCache(r);
|
|
56
|
-
if (t && t.has(e)) return t.get(e);
|
|
57
|
-
var n = {
|
|
58
|
-
__proto__: null
|
|
59
|
-
},
|
|
60
|
-
a = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
61
|
-
for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) {
|
|
62
|
-
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
|
63
|
-
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u];
|
|
64
|
-
}
|
|
65
|
-
return n["default"] = e, t && t.set(e, n), n;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
var interopRequireDefault = {};
|
|
69
|
-
|
|
70
|
-
Object.defineProperty(interopRequireDefault, "__esModule", {
|
|
71
|
-
value: true
|
|
72
|
-
});
|
|
73
|
-
interopRequireDefault.default = _interopRequireDefault;
|
|
74
|
-
function _interopRequireDefault(e) {
|
|
75
|
-
return e && e.__esModule ? e : {
|
|
76
|
-
"default": e
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
|
|
81
|
-
exports.interopRequireDefault = interopRequireDefault;
|
|
82
|
-
exports.interopRequireWildcard = interopRequireWildcard;
|
package/dist/require/cli.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts","../../src/utils/formatting.ts","../../src/flags.ts","../../src/utils/meow-with-subcommands.ts","../../src/commands/cdxgen.ts","../../src/utils/api-helpers.ts","../../src/utils/objects.ts","../../src/utils/format-issues.ts","../../src/commands/info.ts","../../src/commands/login.ts","../../src/commands/logout.ts","../../src/commands/npm.ts","../../src/commands/npx.ts","../../src/utils/fs.ts","../../src/utils/package-manager-detector.ts","../../src/commands/optimize.ts","../../src/commands/organization.ts","../../src/commands/raw-npm.ts","../../src/commands/raw-npx.ts","../../src/commands/report/view.ts","../../src/commands/report/create.ts","../../src/commands/report/index.ts","../../src/commands/wrapper.ts","../../src/commands/scan/create.ts","../../src/commands/scan/delete.ts","../../src/commands/scan/list.ts","../../src/commands/scan/metadata.ts","../../src/commands/scan/stream.ts","../../src/commands/scan/index.ts","../../src/commands/audit-log.ts","../../src/commands/repos/create.ts","../../src/commands/repos/delete.ts","../../src/commands/repos/list.ts","../../src/commands/repos/update.ts","../../src/commands/repos/view.ts","../../src/commands/repos/index.ts","../../src/commands/dependencies.ts","../../src/commands/analytics.ts","../../src/commands/diff-scan/get.ts","../../src/commands/diff-scan/index.ts","../../src/commands/threat-feed.ts","../../src/commands/index.ts"],"names":[],"mappings":""}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
declare const logSymbols: {
|
|
2
|
-
__proto__: null;
|
|
3
|
-
info: string;
|
|
4
|
-
success: string;
|
|
5
|
-
warning: string;
|
|
6
|
-
error: string;
|
|
7
|
-
};
|
|
8
|
-
declare class ColorOrMarkdown {
|
|
9
|
-
useMarkdown: boolean;
|
|
10
|
-
constructor(useMarkdown: boolean);
|
|
11
|
-
header(text: string, level?: number): string;
|
|
12
|
-
bold(text: string): string;
|
|
13
|
-
italic(text: string): string;
|
|
14
|
-
hyperlink(text: string, url: string | undefined, { fallback, fallbackToUrl }?: {
|
|
15
|
-
fallback?: boolean;
|
|
16
|
-
fallbackToUrl?: boolean;
|
|
17
|
-
}): string;
|
|
18
|
-
list(items: string[]): string;
|
|
19
|
-
get logSymbols(): typeof logSymbols;
|
|
20
|
-
indent(text: string, level?: number): string;
|
|
21
|
-
json(value: unknown): string;
|
|
22
|
-
}
|
|
23
|
-
export { logSymbols, ColorOrMarkdown };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
declare const SUPPORTS_SYNC_ESM: boolean;
|
|
2
|
-
declare const API_V0_URL = "https://api.socket.dev/v0";
|
|
3
|
-
declare const DIST_TYPE: string;
|
|
4
|
-
declare const LOOP_SENTINEL = 1000000;
|
|
5
|
-
declare const NPM_REGISTRY_URL = "https://registry.npmjs.org";
|
|
6
|
-
declare const SOCKET_PUBLIC_API_KEY = "sktsec_t_--RAN5U4ivauy4w37-6aoKyYPDt5ZbaT5JBVMqiwKo_api";
|
|
7
|
-
declare const SOCKET_CLI_ISSUES_URL = "https://github.com/SocketDev/socket-cli/issues";
|
|
8
|
-
declare const UPDATE_SOCKET_OVERRIDES_IN_PACKAGE_LOCK_FILE = "UPDATE_SOCKET_OVERRIDES_IN_PACKAGE_LOCK_FILE";
|
|
9
|
-
declare const ENV: Readonly<{
|
|
10
|
-
UPDATE_SOCKET_OVERRIDES_IN_PACKAGE_LOCK_FILE: boolean;
|
|
11
|
-
}>;
|
|
12
|
-
declare const rootPath: string;
|
|
13
|
-
declare const rootDistPath: string;
|
|
14
|
-
declare const rootBinPath: string;
|
|
15
|
-
declare const rootPkgJsonPath: string;
|
|
16
|
-
declare const nmBinPath: string;
|
|
17
|
-
declare const cdxgenBinPath: string;
|
|
18
|
-
declare const distPath: string;
|
|
19
|
-
declare const shadowBinPath: string;
|
|
20
|
-
declare const synpBinPath: string;
|
|
21
|
-
export { SUPPORTS_SYNC_ESM, API_V0_URL, DIST_TYPE, LOOP_SENTINEL, NPM_REGISTRY_URL, SOCKET_PUBLIC_API_KEY, SOCKET_CLI_ISSUES_URL, UPDATE_SOCKET_OVERRIDES_IN_PACKAGE_LOCK_FILE, ENV, rootPath, rootDistPath, rootBinPath, rootPkgJsonPath, nmBinPath, cdxgenBinPath, distPath, shadowBinPath, synpBinPath };
|
package/dist/require/errors.d.ts
DELETED
package/dist/require/link.d.ts
DELETED