@socketsecurity/cli 0.14.32 → 0.14.34

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.
Files changed (38) hide show
  1. package/bin/cli.js +2 -4
  2. package/bin/npm-cli.js +2 -4
  3. package/bin/npx-cli.js +2 -4
  4. package/dist/constants.js +68 -0
  5. package/dist/module-sync/cli.d.ts +0 -1
  6. package/dist/module-sync/cli.js +184 -164
  7. package/dist/module-sync/constants.d.ts +91 -18
  8. package/dist/module-sync/constants.js +2 -79
  9. package/dist/module-sync/link.js +9 -12
  10. package/dist/module-sync/npm-cli.js +23 -19
  11. package/dist/module-sync/npm-injection.js +126 -123
  12. package/dist/module-sync/npx-cli.js +21 -17
  13. package/dist/module-sync/path-resolve.js +11 -14
  14. package/dist/module-sync/sdk.js +30 -29
  15. package/dist/module-sync/vendor.js +0 -12
  16. package/dist/require/cli.js +168 -148
  17. package/dist/require/constants.js +2 -79
  18. package/dist/require/link.js +9 -12
  19. package/dist/require/npm-cli.js +23 -19
  20. package/dist/require/npm-injection.js +126 -123
  21. package/dist/require/npx-cli.js +21 -17
  22. package/dist/require/path-resolve.js +11 -14
  23. package/dist/require/sdk.js +26 -25
  24. package/dist/require/vendor.js +30 -115
  25. package/package.json +18 -32
  26. package/dist/module-sync/cli.d.ts.map +0 -1
  27. package/dist/require/cli.d.ts +0 -3
  28. package/dist/require/cli.d.ts.map +0 -1
  29. package/dist/require/color-or-markdown.d.ts +0 -23
  30. package/dist/require/constants.d.ts +0 -21
  31. package/dist/require/errors.d.ts +0 -7
  32. package/dist/require/link.d.ts +0 -2
  33. package/dist/require/npm-cli.d.ts +0 -2
  34. package/dist/require/npm-injection.d.ts +0 -1
  35. package/dist/require/npx-cli.d.ts +0 -2
  36. package/dist/require/path-resolve.d.ts +0 -8
  37. package/dist/require/sdk.d.ts +0 -8
  38. package/dist/require/settings.d.ts +0 -9
@@ -1,23 +1,20 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
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
- }
4
+ function _socketInterop(e) {
5
+ let c = 0
6
+ for (const k in e ?? {}) {
7
+ c = c === 0 && k === 'default' ? 1 : 0
8
+ if (!c) break
12
9
  }
13
- return d ?? e
10
+ return c ? e.default : e
14
11
  }
15
12
 
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'));
13
+ var vendor = require('./vendor.js');
14
+ var require$$1 = require('node:path');
15
+ var require$$1$1 = _socketInterop(require('@npmcli/promise-spawn'));
16
+ var constants = require('./constants.js');
17
+ var link = require('./link.js');
21
18
 
22
19
  var npxCli$2 = {};
23
20
 
@@ -27,10 +24,17 @@ var _nodePath = require$$1;
27
24
  var _promiseSpawn = require$$1$1;
28
25
  var _constants = constants.constants;
29
26
  var _link = link.link;
30
- const npxPath = (0, _link.installLinks)(_constants.shadowBinPath, 'npx');
31
- const injectionPath = _nodePath.join(_constants.distPath, 'npm-injection.js');
27
+ const {
28
+ distPath,
29
+ execPath,
30
+ shadowBinPath
31
+ } = _constants;
32
+ const npxPath = (0, _link.installLinks)(shadowBinPath, 'npx');
33
+ const injectionPath = _nodePath.join(distPath, 'npm-injection.js');
32
34
  process.exitCode = 1;
33
- const spawnPromise = _promiseSpawn(process.execPath, ['--disable-warning', 'ExperimentalWarning', '--require', injectionPath, npxPath, ...process.argv.slice(2)], {
35
+ const spawnPromise = _promiseSpawn(execPath, [
36
+ // Lazily access constants.nodeNoWarningsFlags.
37
+ ..._constants.nodeNoWarningsFlags, '--require', injectionPath, npxPath, ...process.argv.slice(2)], {
34
38
  stdio: 'inherit'
35
39
  });
36
40
  spawnPromise.process.on('exit', (code, signal) => {
@@ -1,22 +1,19 @@
1
1
  'use strict';
2
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
- }
3
+ function _socketInterop(e) {
4
+ let c = 0
5
+ for (const k in e ?? {}) {
6
+ c = c === 0 && k === 'default' ? 1 : 0
7
+ if (!c) break
11
8
  }
12
- return d ?? e
9
+ return c ? e.default : e
13
10
  }
14
11
 
15
- var require$$1$1 = _interop(require('node:fs/promises'));
16
- var require$$1 = _interop(require('node:path'));
17
- var require$$2 = _interop(require('ignore'));
18
- var require$$3 = _interop(require('micromatch'));
19
- var require$$8 = _interop(require('tinyglobby'));
12
+ var require$$1$1 = require('node:fs/promises');
13
+ var require$$1 = require('node:path');
14
+ var require$$2 = _socketInterop(require('ignore'));
15
+ var require$$3 = _socketInterop(require('micromatch'));
16
+ var require$$8 = _socketInterop(require('tinyglobby'));
20
17
 
21
18
  var pathResolve = {};
22
19
 
@@ -1,28 +1,25 @@
1
1
  'use strict';
2
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
- }
3
+ function _socketInterop(e) {
4
+ let c = 0
5
+ for (const k in e ?? {}) {
6
+ c = c === 0 && k === 'default' ? 1 : 0
7
+ if (!c) break
11
8
  }
12
- return d ?? e
9
+ return c ? e.default : e
13
10
  }
14
11
 
15
- var vendor = _interop(require('./vendor.js'));
16
- var require$$1 = _interop(require('yoctocolors-cjs'));
17
- var require$$1$3 = _interop(require('@inquirer/password'));
18
- var require$$2 = _interop(require('hpagent'));
19
- var require$$4 = _interop(require('@socketsecurity/registry/lib/strings'));
20
- var require$$5 = _interop(require('@socketsecurity/sdk'));
21
- var constants = _interop(require('./constants.js'));
22
- var require$$0 = _interop(require('node:fs'));
23
- var require$$1$1 = _interop(require('node:os'));
24
- var require$$1$2 = _interop(require('node:path'));
25
- var require$$3 = _interop(require('@socketregistry/yocto-spinner'));
12
+ var vendor = require('./vendor.js');
13
+ var require$$1 = _socketInterop(require('yoctocolors-cjs'));
14
+ var require$$1$3 = _socketInterop(require('hpagent'));
15
+ var require$$1$4 = require('@socketsecurity/registry/lib/prompts');
16
+ var require$$4 = require('@socketsecurity/registry/lib/strings');
17
+ var require$$5 = require('@socketsecurity/sdk');
18
+ var constants = require('./constants.js');
19
+ var require$$0 = require('node:fs');
20
+ var require$$1$1 = require('node:os');
21
+ var require$$1$2 = require('node:path');
22
+ var require$$3 = require('@socketregistry/yocto-spinner');
26
23
 
27
24
  var errors = {};
28
25
 
@@ -165,7 +162,7 @@ if (!dataHome) {
165
162
  const settingsPath = _nodePath.join(dataHome, 'socket', 'settings');
166
163
  let settings = {};
167
164
  if ((0, _nodeFs.existsSync)(settingsPath)) {
168
- const raw = (0, _nodeFs.readFileSync)(settingsPath, 'utf-8');
165
+ const raw = (0, _nodeFs.readFileSync)(settingsPath, 'utf8');
169
166
  try {
170
167
  settings = JSON.parse(Buffer.from(raw, 'base64').toString());
171
168
  } catch {
@@ -197,14 +194,18 @@ Object.defineProperty(sdk, "__esModule", {
197
194
  });
198
195
  sdk.getDefaultKey = getDefaultKey;
199
196
  sdk.setupSdk = setupSdk;
200
- var _password = require$$1$3;
201
- var _hpagent = require$$2;
197
+ var _hpagent = require$$1$3;
202
198
  var _isInteractive = _interopRequireDefault(vendor.isInteractive);
199
+ var _prompts = require$$1$4;
203
200
  var _strings = require$$4;
204
201
  var _sdk = require$$5;
205
202
  var _constants = constants.constants;
206
203
  var _errors = errors;
207
204
  var _settings = settings$1;
205
+ const {
206
+ rootPkgJsonPath
207
+ } = _constants;
208
+
208
209
  // This API key should be stored globally for the duration of the CLI execution.
209
210
  let defaultKey;
210
211
  function getDefaultKey() {
@@ -226,7 +227,7 @@ function getDefaultHTTPProxy() {
226
227
  }
227
228
  async function setupSdk(apiKey = getDefaultKey(), apiBaseUrl = getDefaultAPIBaseUrl(), proxy = getDefaultHTTPProxy()) {
228
229
  if (typeof apiKey !== 'string' && (0, _isInteractive.default)()) {
229
- apiKey = await _password({
230
+ apiKey = await (0, _prompts.password)({
230
231
  message: 'Enter your Socket.dev API key (not saved, use socket login to persist)'
231
232
  });
232
233
  defaultKey = apiKey;
@@ -248,7 +249,7 @@ async function setupSdk(apiKey = getDefaultKey(), apiBaseUrl = getDefaultAPIBase
248
249
  const sdkOptions = {
249
250
  agent,
250
251
  baseUrl: apiBaseUrl,
251
- userAgent: (0, _sdk.createUserAgentFromPkgJson)(require(_constants.rootPkgJsonPath))
252
+ userAgent: (0, _sdk.createUserAgentFromPkgJson)(require(rootPkgJsonPath))
252
253
  };
253
254
  return new _sdk.SocketSdk(apiKey || '', sdkOptions);
254
255
  }
@@ -1,28 +1,26 @@
1
1
  'use strict';
2
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
- }
3
+ function _socketInterop(e) {
4
+ let c = 0
5
+ for (const k in e ?? {}) {
6
+ c = c === 0 && k === 'default' ? 1 : 0
7
+ if (!c) break
11
8
  }
12
- return d ?? e
9
+ return c ? e.default : e
13
10
  }
14
11
 
15
- var require$$8 = _interop(require('node:url'));
16
- var require$$0 = _interop(require('node:fs'));
17
- var require$$1 = _interop(require('node:os'));
18
- var require$$1$1 = _interop(require('node:path'));
19
- var require$$0$1 = _interop(require('node:process'));
20
- var require$$0$2 = _interop(require('node:util'));
21
- var require$$1$2 = _interop(require('node:tty'));
22
- var require$$2 = _interop(require('has-flag'));
23
- var require$$1$3 = _interop(require('node:fs/promises'));
24
- var require$$2$2 = _interop(require('node:buffer'));
25
- var require$$2$1 = _interop(require('node:child_process'));
12
+ var require$$8 = require('node:url');
13
+ var require$$0 = require('node:fs');
14
+ var require$$1 = require('node:os');
15
+ var require$$1$1 = require('node:path');
16
+ var require$$0$2 = _socketInterop(require('tiny-colors'));
17
+ var require$$0$1 = require('node:process');
18
+ var require$$0$3 = require('node:util');
19
+ var require$$1$2 = require('node:tty');
20
+ var require$$2 = _socketInterop(require('has-flag'));
21
+ var require$$1$3 = require('node:fs/promises');
22
+ var require$$2$2 = require('node:buffer');
23
+ var require$$2$1 = require('node:child_process');
26
24
 
27
25
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
28
26
  function getDefaultExportFromCjs (x) {
@@ -90,7 +88,7 @@ function _interopRequireDefault(e) {
90
88
  };
91
89
  }
92
90
 
93
- var dist$1 = {};
91
+ var dist = {};
94
92
 
95
93
  var store = {};
96
94
 
@@ -213,89 +211,6 @@ node$1.default = NodeStore;
213
211
 
214
212
  var utils$1 = {};
215
213
 
216
- var dist = {};
217
-
218
- var constants$1 = {};
219
-
220
- Object.defineProperty(constants$1, "__esModule", {
221
- value: true
222
- });
223
- constants$1.ENABLED = void 0;
224
- /* MAIN */
225
- const ENV = globalThis.process?.env || {};
226
- const ARGV = globalThis.process?.argv || [];
227
- constants$1.ENABLED = !('NO_COLOR' in ENV) && ENV.COLOR !== '0' && ENV.TERM !== 'dumb' && !ARGV.includes('--no-color') && !ARGV.includes('--no-colors') && (ENV.COLOR === '1' || !globalThis.process?.stdout || globalThis.process?.stdout?.isTTY === true);
228
-
229
- (function (exports) {
230
-
231
- Object.defineProperty(exports, "__esModule", {
232
- value: true
233
- });
234
- Object.defineProperty(exports, "ENABLED", {
235
- enumerable: true,
236
- get: function () {
237
- return _constants.ENABLED;
238
- }
239
- });
240
- exports.default = void 0;
241
- var _constants = constants$1;
242
- /* IMPORT */
243
-
244
- /* HELPERS */
245
- const chain = modifier => {
246
- return new Proxy(modifier, {
247
- get(target, prop) {
248
- if (prop in colors) {
249
- return chain(string => modifier(colors[prop](string)));
250
- } else {
251
- return target[prop];
252
- }
253
- }
254
- });
255
- };
256
- const wrap = (start, end) => {
257
- return chain(string => {
258
- if (!_constants.ENABLED) return string;
259
- return `\u001B[${start}m${string}\u001B[${end}m`;
260
- });
261
- };
262
- /* MAIN */
263
- const colors = {
264
- /* MODIFIERS */
265
- reset: wrap(0, 0),
266
- bold: wrap(1, 22),
267
- dim: wrap(2, 22),
268
- italic: wrap(3, 23),
269
- underline: wrap(4, 24),
270
- overline: wrap(53, 55),
271
- inverse: wrap(7, 27),
272
- hidden: wrap(8, 28),
273
- strikethrough: wrap(9, 29),
274
- /* FOREGOUND */
275
- black: wrap(30, 39),
276
- red: wrap(31, 39),
277
- green: wrap(32, 39),
278
- yellow: wrap(33, 39),
279
- blue: wrap(34, 39),
280
- magenta: wrap(35, 39),
281
- cyan: wrap(36, 39),
282
- white: wrap(37, 39),
283
- gray: wrap(90, 39),
284
- /* BACKGROUND */
285
- bgBlack: wrap(40, 49),
286
- bgRed: wrap(41, 49),
287
- bgGreen: wrap(42, 49),
288
- bgYellow: wrap(43, 49),
289
- bgBlue: wrap(44, 49),
290
- bgMagenta: wrap(45, 49),
291
- bgCyan: wrap(46, 49),
292
- bgWhite: wrap(47, 49),
293
- bgGray: wrap(100, 49)
294
- };
295
- /* EXPORT */
296
- exports.default = colors;
297
- } (dist));
298
-
299
214
  var node = {};
300
215
 
301
216
  var interceptor = {};
@@ -448,7 +363,7 @@ Object.defineProperty(utils$1, "__esModule", {
448
363
  value: true
449
364
  });
450
365
  utils$1.default = void 0;
451
- var _tinyColors = dist;
366
+ var _tinyColors = require$$0$2;
452
367
  var _whenExit = node;
453
368
  var _compare = compare$1;
454
369
  /* IMPORT */
@@ -488,7 +403,7 @@ const Utils = {
488
403
  },
489
404
  notify: (name, version, latest) => {
490
405
  if (!globalThis.process?.stdout?.isTTY) return; // Probably piping stdout
491
- const log = () => console.log(`\n\n📦 Update available for ${_tinyColors.default.cyan(name)}: ${_tinyColors.default.gray(version)} → ${_tinyColors.default.green(latest)}`);
406
+ const log = () => console.log(`\n\n📦 Update available for ${_tinyColors.cyan(name)}: ${_tinyColors.gray(version)} → ${_tinyColors.green(latest)}`);
492
407
  (0, _whenExit.default)(log);
493
408
  }
494
409
  };
@@ -530,10 +445,10 @@ class Store {
530
445
  /* EXPORT */
531
446
  store.default = new Store();
532
447
 
533
- Object.defineProperty(dist$1, "__esModule", {
448
+ Object.defineProperty(dist, "__esModule", {
534
449
  value: true
535
450
  });
536
- dist$1.default = void 0;
451
+ dist.default = void 0;
537
452
  var _store = store;
538
453
  var _utils$2 = utils$1;
539
454
  /* IMPORT */
@@ -567,7 +482,7 @@ const updater = async ({
567
482
  return true;
568
483
  };
569
484
  /* EXPORT */
570
- dist$1.default = updater;
485
+ dist.default = updater;
571
486
 
572
487
  var build = {};
573
488
 
@@ -588,7 +503,7 @@ var dependencies = {};
588
503
  exports.r = redent;
589
504
  exports.t = trimNewlines;
590
505
  exports.y = void 0;
591
- var _util = _interopRequireWildcard2(require$$0$2, true);
506
+ var _util = _interopRequireWildcard2(require$$0$3, true);
592
507
  var _path = require$$1$1;
593
508
  var _fs = require$$0;
594
509
  var _nodePath = require$$1$1;
@@ -9501,7 +9416,7 @@ Object.defineProperty(defaultBrowserId$1, "__esModule", {
9501
9416
  value: true
9502
9417
  });
9503
9418
  defaultBrowserId$1.default = defaultBrowserId;
9504
- var _nodeUtil$3 = require$$0$2;
9419
+ var _nodeUtil$3 = require$$0$3;
9505
9420
  var _nodeProcess$3 = require$$0$1;
9506
9421
  var _nodeChild_process$4 = require$$2$1;
9507
9422
  const execFileAsync$3 = (0, _nodeUtil$3.promisify)(_nodeChild_process$4.execFile);
@@ -9528,7 +9443,7 @@ Object.defineProperty(runApplescript, "__esModule", {
9528
9443
  runApplescript.runAppleScript = runAppleScript;
9529
9444
  runApplescript.runAppleScriptSync = runAppleScriptSync;
9530
9445
  var _nodeProcess$2 = require$$0$1;
9531
- var _nodeUtil$2 = require$$0$2;
9446
+ var _nodeUtil$2 = require$$0$3;
9532
9447
  var _nodeChild_process$3 = require$$2$1;
9533
9448
  const execFileAsync$2 = (0, _nodeUtil$2.promisify)(_nodeChild_process$3.execFile);
9534
9449
  async function runAppleScript(script, {
@@ -9574,7 +9489,7 @@ Object.defineProperty(windows, "__esModule", {
9574
9489
  });
9575
9490
  windows.UnknownBrowserError = void 0;
9576
9491
  windows.default = defaultBrowser$1;
9577
- var _nodeUtil$1 = require$$0$2;
9492
+ var _nodeUtil$1 = require$$0$3;
9578
9493
  var _nodeChild_process$2 = require$$2$1;
9579
9494
  const execFileAsync$1 = (0, _nodeUtil$1.promisify)(_nodeChild_process$2.execFile);
9580
9495
 
@@ -9644,7 +9559,7 @@ Object.defineProperty(defaultBrowser$2, "__esModule", {
9644
9559
  value: true
9645
9560
  });
9646
9561
  defaultBrowser$2.default = defaultBrowser;
9647
- var _nodeUtil = require$$0$2;
9562
+ var _nodeUtil = require$$0$3;
9648
9563
  var _nodeProcess$1 = require$$0$1;
9649
9564
  var _nodeChild_process$1 = require$$2$1;
9650
9565
  var _defaultBrowserId = defaultBrowserId$1;
@@ -9991,7 +9906,7 @@ const apps = open$1.apps = {};
9991
9906
  open$1.default = open;
9992
9907
 
9993
9908
  exports.build = build;
9994
- exports.dist = dist$1;
9909
+ exports.dist = dist;
9995
9910
  exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
9996
9911
  exports.interopRequireDefault = interopRequireDefault;
9997
9912
  exports.interopRequireWildcard = interopRequireWildcard;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@socketsecurity/cli",
3
- "version": "0.14.32",
3
+ "version": "0.14.34",
4
4
  "description": "CLI tool for Socket.dev",
5
5
  "homepage": "http://github.com/SocketDev/socket-cli",
6
6
  "license": "MIT",
@@ -21,34 +21,19 @@
21
21
  },
22
22
  "exports": {
23
23
  "./bin/cli.js": {
24
- "module-sync": {
25
- "types": "./dist/module-sync/cli.d.ts",
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
+ "module-sync": "./dist/module-sync/cli.js",
26
+ "require": "./dist/require/cli.js"
32
27
  },
33
28
  "./bin/npm-cli.js": {
34
- "module-sync": {
35
- "types": "./dist/module-sync/npm-cli.d.ts",
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
- }
29
+ "types": "./dist/module-sync/npm-cli.d.ts",
30
+ "module-sync": "./dist/module-sync/npm-cli.js",
31
+ "require": "./dist/require/npm-cli.js"
42
32
  },
43
33
  "./bin/npx-cli.js": {
44
- "module-sync": {
45
- "types": "./dist/module-sync/npx-cli.d.ts",
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
- }
34
+ "types": "./dist/module-sync/npx-cli.d.ts",
35
+ "module-sync": "./dist/module-sync/npx-cli.js",
36
+ "require": "./dist/require/npx-cli.js"
52
37
  },
53
38
  "./package.json": "./package.json",
54
39
  "./translations.json": "./translations.json"
@@ -67,23 +52,20 @@
67
52
  "lint:fix": "npm run lint -- --fix && npm run lint:fix:fast",
68
53
  "lint:fix:fast": "prettier --cache --log-level warn --write .",
69
54
  "prepare": "husky && custompatch",
70
- "test": "run-s check build:* test:*",
71
- "test:c8": "c8 --reporter=none node --test 'test/socket-npm.test.cjs'",
55
+ "test": "run-s check build:* test:* test:coverage:*",
72
56
  "test-ci": "run-s build:* test:*",
73
57
  "test:unit": "tap-run",
74
- "test:coverage": "cp -r .tap/coverage/*.json coverage/tmp && c8 --reporter=lcov --reporter=text --include 'dist/{module-sync,require}/*.js' --exclude 'dist/require/vendor.js' report"
58
+ "test:coverage:c8": "c8 --reporter=none node --test 'test/socket-npm.test.cjs'",
59
+ "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
60
  },
76
61
  "dependencies": {
77
62
  "@apideck/better-ajv-errors": "^0.3.6",
78
63
  "@cyclonedx/cdxgen": "^11.0.5",
79
- "@inquirer/confirm": "^5.0.2",
80
- "@inquirer/password": "^4.0.3",
81
- "@inquirer/select": "^4.0.3",
82
64
  "@npmcli/promise-spawn": "^8.0.2",
83
65
  "@socketregistry/hyrious__bun.lockb": "1.0.5",
84
66
  "@socketregistry/yocto-spinner": "^1.0.1",
85
67
  "@socketsecurity/config": "^2.1.3",
86
- "@socketsecurity/registry": "^1.0.35",
68
+ "@socketsecurity/registry": "^1.0.51",
87
69
  "@socketsecurity/sdk": "^1.3.0",
88
70
  "blessed": "^0.1.81",
89
71
  "blessed-contrib": "^4.11.0",
@@ -187,6 +169,8 @@
187
169
  "semver": "$semver",
188
170
  "set-function-length": "npm:@socketregistry/set-function-length@^1",
189
171
  "side-channel": "npm:@socketregistry/side-channel@^1",
172
+ "tiny-colors": "$yoctocolors-cjs",
173
+ "typedarray": "npm:@socketregistry/typedarray@^1",
190
174
  "yaml": "$yaml"
191
175
  },
192
176
  "resolutions": {
@@ -210,6 +194,8 @@
210
194
  "semver": "^7.6.3",
211
195
  "set-function-length": "npm:@socketregistry/set-function-length@^1",
212
196
  "side-channel": "npm:@socketregistry/side-channel@^1",
197
+ "tiny-colors": "npm:yoctocolors-cjs@^2.1.2",
198
+ "typedarray": "npm:@socketregistry/typedarray@^1",
213
199
  "yaml": "^2.6.0"
214
200
  },
215
201
  "engines": {
@@ -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,3 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
3
- //# sourceMappingURL=cli.d.ts.map
@@ -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 };
@@ -1,7 +0,0 @@
1
- declare class AuthError extends Error {
2
- }
3
- declare class InputError extends Error {
4
- body: string | undefined;
5
- constructor(message: string, body?: string);
6
- }
7
- export { AuthError, InputError };
@@ -1,2 +0,0 @@
1
- declare function installLinks(realDirname: string, binName: 'npm' | 'npx'): string;
2
- export { installLinks };
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1,8 +0,0 @@
1
- /// <reference types="node" />
2
- import { SocketYml } from '@socketsecurity/config';
3
- import { SocketSdkReturnType } from '@socketsecurity/sdk';
4
- declare function directoryPatterns(): string[];
5
- declare function findRoot(filepath: string): string | undefined;
6
- declare function getPackageFiles(cwd: string, inputPaths: string[], config: SocketYml | undefined, supportedFiles: SocketSdkReturnType<'getReportSupportedFiles'>['data'], debugLog?: typeof console.error): Promise<string[]>;
7
- declare function getPackageFilesFullScans(cwd: string, inputPaths: string[], supportedFiles: SocketSdkReturnType<'getReportSupportedFiles'>['data'], debugLog?: typeof console.error): Promise<string[]>;
8
- export { directoryPatterns, findRoot, getPackageFiles, getPackageFilesFullScans };
@@ -1,8 +0,0 @@
1
- /// <reference types="node" />
2
- import { SocketSdk } from '@socketsecurity/sdk';
3
- declare function createDebugLogger(printDebugLogs?: boolean): typeof console.error;
4
- declare function isErrnoException(value: unknown): value is NodeJS.ErrnoException;
5
- declare function stringJoinWithSeparateFinalSeparator(list: (string | undefined)[], separator?: string): string;
6
- declare function getDefaultKey(): string | undefined;
7
- declare function setupSdk(apiKey?: string | undefined, apiBaseUrl?: string | undefined, proxy?: string | undefined): Promise<SocketSdk>;
8
- export { createDebugLogger, isErrnoException, stringJoinWithSeparateFinalSeparator, getDefaultKey, setupSdk };
@@ -1,9 +0,0 @@
1
- interface Settings {
2
- apiKey?: string | null;
3
- enforcedOrgs?: string[] | null;
4
- apiBaseUrl?: string | null;
5
- apiProxy?: string | null;
6
- }
7
- declare function getSetting<Key extends keyof Settings>(key: Key): Settings[Key];
8
- declare function updateSetting<Key extends keyof Settings>(key: Key, value: Settings[Key]): void;
9
- export { getSetting, updateSetting };