@socketsecurity/cli 0.14.5 → 0.14.7

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/cli.js CHANGED
@@ -12,9 +12,9 @@ var sdk = require('./sdk.js');
12
12
  var require$$1$2 = require('@inquirer/prompts');
13
13
  var require$$3$2 = require('@npmcli/package-json');
14
14
  var require$$4 = require('@socketsecurity/registry');
15
+ var require$$3$1 = require('semver');
15
16
  var require$$1$3 = require('@socketregistry/hyrious__bun.lockb');
16
17
  var require$$3 = require('browserslist');
17
- var require$$3$1 = require('semver');
18
18
  var require$$5$1 = require('which');
19
19
  var require$$2 = require('@apideck/better-ajv-errors');
20
20
  var require$$3$3 = require('@socketsecurity/config');
@@ -937,12 +937,13 @@ var _nodePath$3 = require$$1;
937
937
  var _hyrious__bun = require$$1$3;
938
938
  var _promiseSpawn$3 = require$$1$1;
939
939
  var _browserslist = require$$3;
940
- var _semver = require$$3$1;
940
+ var _semver$1 = require$$3$1;
941
941
  var _which = require$$5$1;
942
942
  var _fs = fs;
943
943
  var _json = json;
944
944
  var _objects$1 = objects;
945
945
  var _strings = strings;
946
+ const PNPM_WORKSPACE = 'pnpm-workspace';
946
947
  const AGENTS = packageManagerDetector.AGENTS = ['bun', 'npm', 'pnpm', 'yarn'];
947
948
  const LOCKS = packageManagerDetector.LOCKS = {
948
949
  'bun.lockb': 'bun',
@@ -993,17 +994,16 @@ const readLockFileByAgent = (() => {
993
994
  };
994
995
  })();
995
996
  async function detect({
996
- cwd,
997
+ cwd = process.cwd(),
997
998
  onUnknown
998
999
  } = {}) {
999
- const lockPath = await (0, _fs.findUp)(Object.keys(LOCKS), {
1000
+ let lockPath = await (0, _fs.findUp)(Object.keys(LOCKS), {
1000
1001
  cwd
1001
1002
  });
1002
1003
  const isHiddenLockFile = lockPath?.endsWith('.package-lock.json') ?? false;
1003
1004
  const pkgJsonPath = lockPath ? _nodePath$3.resolve(lockPath, `${isHiddenLockFile ? '../' : ''}../package.json`) : await (0, _fs.findUp)('package.json', {
1004
1005
  cwd
1005
1006
  });
1006
-
1007
1007
  // Read Corepack `packageManager` field in package.json:
1008
1008
  // https://nodejs.org/api/packages.html#packagemanager
1009
1009
  const pkgJsonStr = (0, _fs.existsSync)(pkgJsonPath) ? await (0, _fs.readFileUtf8)(pkgJsonPath) : undefined;
@@ -1022,7 +1022,7 @@ async function detect({
1022
1022
  }
1023
1023
  }
1024
1024
  }
1025
- if (agent === undefined && !isHiddenLockFile && typeof lockPath === 'string') {
1025
+ if (agent === undefined && !isHiddenLockFile && typeof pkgJsonPath === 'string' && typeof lockPath === 'string') {
1026
1026
  agent = LOCKS[_nodePath$3.basename(lockPath)];
1027
1027
  }
1028
1028
  if (agent === undefined) {
@@ -1042,7 +1042,7 @@ async function detect({
1042
1042
  if (pkgJson) {
1043
1043
  const pkgPath = _nodePath$3.dirname(pkgJsonPath);
1044
1044
  isPrivate = !!pkgJson['private'];
1045
- isWorkspace = !!pkgJson['workspaces'] || agent === 'pnpm' && (0, _fs.existsSync)(_nodePath$3.join(pkgPath, 'pnpm-workspace.yaml'));
1045
+ isWorkspace = !!pkgJson['workspaces'] || (0, _fs.existsSync)(_nodePath$3.join(pkgPath, `${PNPM_WORKSPACE}.yaml`)) || (0, _fs.existsSync)(_nodePath$3.join(pkgPath, `${PNPM_WORKSPACE}.yml`));
1046
1046
  let browser;
1047
1047
  let node;
1048
1048
  const browserField = (0, _objects$1.getOwn)(pkgJson, 'browser');
@@ -1051,7 +1051,7 @@ async function detect({
1051
1051
  }
1052
1052
  const nodeRange = (0, _objects$1.getOwn)(pkgJson['engines'], 'node');
1053
1053
  if ((0, _strings.isNonEmptyString)(nodeRange)) {
1054
- node = MAINTAINED_NODE_VERSIONS.some(v => _semver.satisfies(v, nodeRange));
1054
+ node = MAINTAINED_NODE_VERSIONS.some(v => _semver$1.satisfies(v, nodeRange));
1055
1055
  }
1056
1056
  const browserslistQuery = (0, _objects$1.getOwn)(pkgJson, 'browserslist');
1057
1057
  if (Array.isArray(browserslistQuery)) {
@@ -1061,7 +1061,7 @@ async function detect({
1061
1061
  browser = browserslistTargets.length !== browserslistNodeTargets.length;
1062
1062
  }
1063
1063
  if (node === undefined && browserslistNodeTargets.length) {
1064
- node = MAINTAINED_NODE_VERSIONS.some(r => browserslistNodeTargets.some(v => _semver.satisfies(v, `^${r}`)));
1064
+ node = MAINTAINED_NODE_VERSIONS.some(r => browserslistNodeTargets.some(v => _semver$1.satisfies(v, `^${r}`)));
1065
1065
  }
1066
1066
  }
1067
1067
  if (browser !== undefined) {
@@ -1071,6 +1071,8 @@ async function detect({
1071
1071
  targets.node = node;
1072
1072
  }
1073
1073
  lockSrc = typeof lockPath === 'string' ? await readLockFileByAgent[agent](lockPath, agentExecPath) : undefined;
1074
+ } else {
1075
+ lockPath = undefined;
1074
1076
  }
1075
1077
  return {
1076
1078
  agent,
@@ -1130,29 +1132,47 @@ var _packageJson = require$$3$2;
1130
1132
  var _registry = require$$4;
1131
1133
  var _meow$m = _interopRequireDefault$n(vendor.build);
1132
1134
  var _ora$i = _interopRequireDefault$n(vendor.ora);
1135
+ var _semver = require$$3$1;
1133
1136
  var _formatting$k = formatting;
1134
1137
  var _objects = objects;
1135
1138
  var _packageManagerDetector = packageManagerDetector;
1136
1139
  var _regexps = regexps;
1137
1140
  var _sorts$1 = sorts;
1138
1141
  const distPath$1 = __dirname;
1142
+ const COMMAND_TITLE = 'Socket Optimize';
1139
1143
  const OVERRIDES_FIELD_NAME = 'overrides';
1140
1144
  const RESOLUTIONS_FIELD_NAME = 'resolutions';
1141
- const SOCKET_REGISTRY_NAME = '@socketregistry';
1142
- const SOCKET_REGISTRY_MAJOR_VERSION = '^1';
1143
- const allPackages = (0, _registry.getManifestData)('npm').map(({
1145
+ const availableOverrides = (0, _registry.getManifestData)('npm').filter(({
1144
1146
  1: d
1145
- }) => d.package);
1146
- const getManifestOverridesByAgent = {
1147
+ }) => d.engines?.node?.startsWith('>=18'));
1148
+ const getOverridesDataByAgent = {
1147
1149
  // npm overrides documentation:
1148
1150
  // https://docs.npmjs.com/cli/v10/configuring-npm/package-json#overrides
1149
- npm: pkgJson => pkgJson?.overrides ?? undefined,
1151
+ npm: pkgJson => {
1152
+ const overrides = pkgJson?.overrides ?? {};
1153
+ return {
1154
+ type: 'npm',
1155
+ overrides
1156
+ };
1157
+ },
1150
1158
  // pnpm overrides documentation:
1151
1159
  // https://pnpm.io/package_json#pnpmoverrides
1152
- pnpm: pkgJson => pkgJson?.pnpm?.overrides ?? undefined,
1160
+ pnpm: pkgJson => {
1161
+ const overrides = pkgJson?.pnpm?.overrides ?? undefined;
1162
+ return overrides ? {
1163
+ type: 'pnpm',
1164
+ overrides
1165
+ } : undefined;
1166
+ },
1153
1167
  // Yarn resolutions documentation:
1154
1168
  // https://yarnpkg.com/configuration/manifest#resolutions
1155
- yarn: pkgJson => pkgJson?.resolutions ?? undefined
1169
+ yarn: pkgJson => {
1170
+ const overrides = pkgJson?.resolutions ?? {};
1171
+ return {
1172
+ type: 'yarn',
1173
+ overrides
1174
+ };
1175
+ }
1156
1176
  };
1157
1177
  const lockIncludesByAgent = {
1158
1178
  npm: (lockSrc, name) => {
@@ -1184,16 +1204,22 @@ const updateManifestByAgent = {
1184
1204
  __proto__: null,
1185
1205
  npm(editablePkgJson, overrides) {
1186
1206
  editablePkgJson.update({
1207
+ __proto__: null,
1187
1208
  [OVERRIDES_FIELD_NAME]: overrides
1188
1209
  });
1189
1210
  },
1190
1211
  pnpm(editablePkgJson, overrides) {
1191
1212
  editablePkgJson.update({
1192
- [OVERRIDES_FIELD_NAME]: overrides
1213
+ pnpm: {
1214
+ __proto__: null,
1215
+ ...editablePkgJson.content['pnpm'],
1216
+ [OVERRIDES_FIELD_NAME]: overrides
1217
+ }
1193
1218
  });
1194
1219
  },
1195
1220
  yarn(editablePkgJson, overrides) {
1196
1221
  editablePkgJson.update({
1222
+ __proto__: null,
1197
1223
  [RESOLUTIONS_FIELD_NAME]: overrides
1198
1224
  });
1199
1225
  }
@@ -1204,48 +1230,74 @@ async function addOverrides({
1204
1230
  isWorkspace,
1205
1231
  lockSrc,
1206
1232
  lockIncludes,
1207
- pkgJsonPath,
1208
- overrides
1233
+ pkgJsonPath
1209
1234
  }, aoState) {
1210
1235
  const {
1211
1236
  packageNames
1212
1237
  } = aoState;
1213
- let addedCount = 0;
1214
- let clonedOverrides;
1215
- for (const name of allPackages) {
1216
- if (!(0, _objects.hasOwn)(overrides, name) && lockIncludes(lockSrc, name)) {
1217
- if (clonedOverrides === undefined) {
1218
- clonedOverrides = {
1219
- __proto__: null,
1220
- ...overrides
1221
- };
1238
+ const editablePkgJson = await _packageJson.load(_nodePath$2.dirname(pkgJsonPath));
1239
+ const {
1240
+ dependencies,
1241
+ devDependencies,
1242
+ peerDependencies,
1243
+ optionalDependencies
1244
+ } = editablePkgJson.content;
1245
+ const depEntries = [['dependencies', dependencies ? {
1246
+ __proto__: null,
1247
+ ...dependencies
1248
+ } : undefined], ['devDependencies', devDependencies ? {
1249
+ __proto__: null,
1250
+ ...devDependencies
1251
+ } : undefined], ['peerDependencies', peerDependencies ? {
1252
+ __proto__: null,
1253
+ ...peerDependencies
1254
+ } : undefined], ['optionalDependencies', optionalDependencies ? {
1255
+ __proto__: null,
1256
+ ...optionalDependencies
1257
+ } : undefined]].filter(({
1258
+ 1: o
1259
+ }) => o);
1260
+ const overridesDataObjects = [getOverridesDataByAgent['npm'](editablePkgJson.content)];
1261
+ const isApp = isPrivate || isWorkspace;
1262
+ const overridesData = !isApp || agent !== 'npm' ? getOverridesDataByAgent[isApp ? agent : 'yarn'](editablePkgJson.content) : undefined;
1263
+ if (overridesData) {
1264
+ overridesDataObjects.push(overridesData);
1265
+ }
1266
+ for (const {
1267
+ 1: data
1268
+ } of availableOverrides) {
1269
+ const {
1270
+ name: regPkgName,
1271
+ package: origPkgName,
1272
+ version
1273
+ } = data;
1274
+ for (const {
1275
+ 1: depObj
1276
+ } of depEntries) {
1277
+ const pkgSpec = depObj[origPkgName];
1278
+ if (pkgSpec) {
1279
+ if (!pkgSpec.startsWith(`npm:${regPkgName}@`)) {
1280
+ packageNames.add(regPkgName);
1281
+ depObj[origPkgName] = `npm:${regPkgName}@^${version}`;
1282
+ }
1222
1283
  }
1223
- addedCount += 1;
1224
- packageNames.add(name);
1225
- clonedOverrides[name] = `npm:${SOCKET_REGISTRY_NAME}/${name}@${SOCKET_REGISTRY_MAJOR_VERSION}`;
1226
1284
  }
1227
- }
1228
- if (addedCount) {
1229
- const editablePkgJson = await _packageJson.load(_nodePath$2.dirname(pkgJsonPath));
1230
- const sortedOverrides = (0, _sorts$1.toSortedObject)(clonedOverrides);
1231
- updateManifestByAgent[agent](editablePkgJson, sortedOverrides);
1232
- if (!isPrivate && !isWorkspace) {
1233
- if ((0, _objects.hasOwn)(editablePkgJson.content, 'pnpm') && (0, _objects.isObjectObject)(editablePkgJson.content['pnpm'])) {
1234
- const pnpmKeys = Object.keys(editablePkgJson.content['pnpm']);
1235
- editablePkgJson.update(pnpmKeys.length === 1 && pnpmKeys[0] === 'overrides' ?
1236
- // Properties with undefined values are omitted when saved as JSON.
1237
- {
1238
- pnpm: undefined
1239
- } : {
1240
- pnpm: {
1241
- __proto__: null,
1242
- ...editablePkgJson.content['pnpm'],
1243
- overrides: undefined
1244
- }
1245
- });
1285
+ for (const {
1286
+ overrides
1287
+ } of overridesDataObjects) {
1288
+ if (overrides && !(0, _objects.hasOwn)(overrides, origPkgName) && lockIncludes(lockSrc, origPkgName)) {
1289
+ packageNames.add(regPkgName);
1290
+ overrides[origPkgName] = `npm:${regPkgName}@^${_semver.major(version)}`;
1246
1291
  }
1247
- updateManifestByAgent.npm(editablePkgJson, sortedOverrides);
1248
- updateManifestByAgent.yarn(editablePkgJson, sortedOverrides);
1292
+ }
1293
+ }
1294
+ if (packageNames.size) {
1295
+ editablePkgJson.update(Object.fromEntries(depEntries));
1296
+ for (const {
1297
+ type,
1298
+ overrides
1299
+ } of overridesDataObjects) {
1300
+ updateManifestByAgent[type](editablePkgJson, (0, _sorts$1.toSortedObject)(overrides));
1249
1301
  }
1250
1302
  await editablePkgJson.save();
1251
1303
  }
@@ -1258,6 +1310,7 @@ const optimize = optimize$1.optimize = {
1258
1310
  }) {
1259
1311
  const commandContext = setupCommand$l(`${parentName} dependency optimize`, optimize.description, argv, importMeta);
1260
1312
  if (commandContext) {
1313
+ const cwd = process.cwd();
1261
1314
  const {
1262
1315
  agent,
1263
1316
  agentExecPath,
@@ -1270,49 +1323,44 @@ const optimize = optimize$1.optimize = {
1270
1323
  pkgJson,
1271
1324
  supported
1272
1325
  } = await (0, _packageManagerDetector.detect)({
1273
- cwd: process.cwd(),
1326
+ cwd,
1274
1327
  onUnknown(pkgManager) {
1275
- console.log(`⚠️ Unknown package manager${pkgManager ? ` ${pkgManager}` : ''}: Defaulting to npm`);
1328
+ console.log(`⚠️ ${COMMAND_TITLE}: Unknown package manager${pkgManager ? ` ${pkgManager}` : ''}, defaulting to npm`);
1276
1329
  }
1277
1330
  });
1278
1331
  if (!supported) {
1279
- console.log('✘ The engines.node range is not supported.');
1332
+ console.log(`✘ ${COMMAND_TITLE}: Package engines.node range is not supported`);
1333
+ return;
1334
+ }
1335
+ const lockName = lockPath ? _nodePath$2.basename(lockPath) : 'lock file';
1336
+ if (lockSrc === undefined) {
1337
+ console.log(`✘ ${COMMAND_TITLE}: No ${lockName} found`);
1280
1338
  return;
1281
1339
  }
1282
1340
  if (pkgJson === undefined) {
1283
- console.log('✘ No package.json found.');
1341
+ console.log(`✘ ${COMMAND_TITLE}: No package.json found`);
1284
1342
  return;
1285
1343
  }
1344
+ if (lockPath && _nodePath$2.relative(cwd, lockPath).startsWith('.')) {
1345
+ console.log(`⚠️ ${COMMAND_TITLE}: Package ${lockName} found at ${lockPath}`);
1346
+ }
1286
1347
  const aoState = {
1287
1348
  output: pkgJsonStr,
1288
1349
  packageNames: new Set()
1289
1350
  };
1290
1351
  if (lockSrc) {
1291
- const configs = agent === 'bun' ? [{
1292
- agent: 'npm',
1293
- lockIncludes: lockIncludesByAgent.yarn,
1294
- overrides: getManifestOverridesByAgent.npm(pkgJson)
1295
- }, {
1296
- agent: 'yarn',
1297
- lockIncludes: lockIncludesByAgent.yarn,
1298
- overrides: getManifestOverridesByAgent.yarn(pkgJson)
1299
- }] : [{
1300
- agent,
1301
- lockIncludes: lockIncludesByAgent[agent],
1302
- overrides: getManifestOverridesByAgent[agent](pkgJson)
1303
- }];
1304
- for (const config of configs) {
1305
- await addOverrides({
1306
- __proto__: null,
1307
- isPrivate,
1308
- isWorkspace,
1309
- lockSrc,
1310
- pkgJsonPath,
1311
- pkgJsonStr,
1312
- pkgJson,
1313
- ...config
1314
- }, aoState);
1315
- }
1352
+ const lockIncludes = agent === 'bun' ? lockIncludesByAgent.yarn : lockIncludesByAgent[agent];
1353
+ await addOverrides({
1354
+ __proto__: null,
1355
+ agent: agent === 'bun' ? 'yarn' : agent,
1356
+ isPrivate,
1357
+ isWorkspace,
1358
+ lockIncludes,
1359
+ lockSrc,
1360
+ pkgJsonPath,
1361
+ pkgJsonStr,
1362
+ pkgJson
1363
+ }, aoState);
1316
1364
  }
1317
1365
  const {
1318
1366
  size: count
@@ -1322,7 +1370,6 @@ const optimize = optimize$1.optimize = {
1322
1370
  } else {
1323
1371
  console.log('Congratulations! Already Socket.dev optimized 🎉');
1324
1372
  }
1325
- const lockName = lockPath ? _nodePath$2.basename(lockPath) : 'lock file';
1326
1373
  const isNpm = agent === 'npm';
1327
1374
  if (isNpm || count) {
1328
1375
  // Always update package-lock.json until the npm overrides PR lands:
@@ -1345,9 +1392,12 @@ const optimize = optimize$1.optimize = {
1345
1392
  });
1346
1393
  }
1347
1394
  spinner.stop();
1395
+ if (isNpm) {
1396
+ console.log(`💡 Re-run ${COMMAND_TITLE} whenever ${lockName} changes.\n This can be skipped once npm ships https://github.com/npm/cli/pull/7025.`);
1397
+ }
1348
1398
  } catch {
1349
1399
  spinner.stop();
1350
- console.log(`✘ socket ${agent} install: Failed to update ${lockName}`);
1400
+ console.log(`✘ ${COMMAND_TITLE}: ${agent} install failed to update ${lockName}`);
1351
1401
  }
1352
1402
  }
1353
1403
  }
@@ -12,6 +12,7 @@ var require$$8 = require('node:timers/promises');
12
12
  var require$$3$1 = require('@socketsecurity/config');
13
13
  var require$$1$1 = require('node:net');
14
14
  var require$$2 = require('node:os');
15
+ var require$$6 = require('../package.json');
15
16
  var sdk = require('./sdk.js');
16
17
  var pathResolve = require('./path-resolve.js');
17
18
  var require$$21 = require('pacote');
@@ -24,195 +25,6 @@ var arborist = {};
24
25
 
25
26
  var ttyServer$1 = {};
26
27
 
27
- var name = "@socketsecurity/cli";
28
- var version = "0.14.5";
29
- var description = "CLI tool for Socket.dev";
30
- var homepage = "http://github.com/SocketDev/socket-cli-js";
31
- var license = "MIT";
32
- var repository = {
33
- type: "git",
34
- url: "git+https://github.com/SocketDev/socket-cli-js.git"
35
- };
36
- var author = {
37
- name: "Socket Inc",
38
- email: "eng@socket.dev",
39
- url: "https://socket.dev"
40
- };
41
- var bin = {
42
- cli: "dist/cli.js",
43
- socket: "dist/cli.js",
44
- "socket-npm": "dist/npm-cli.js",
45
- "socket-npx": "dist/npx-cli.js"
46
- };
47
- var scripts = {
48
- build: "npm run build:dist && npm run build:test",
49
- "build:dist": "rollup -c .config/rollup.dist.config.mjs",
50
- "build:test": "rollup -c .config/rollup.test.config.mjs",
51
- check: "run-p -c --aggregate-output check:*",
52
- "check:lint": "eslint --report-unused-disable-directives .",
53
- "check:tsc": "tsc",
54
- "check:type-coverage": "type-coverage --detail --strict --at-least 95 --ignore-files 'test/*'",
55
- "knip:dependencies": "knip --dependencies",
56
- "knip:exports": "knip --include exports,duplicates",
57
- lint: "oxlint -c=./.oxlintrc.json --ignore-path=./.prettierignore --tsconfig=./tsconfig.json . -D correctness -D perf -D suspicious --promise-plugin --import-plugin",
58
- "lint:fix": "npm run lint -- --fix && npm run lint:fix:fast",
59
- "lint:fix:fast": "prettier --cache --log-level warn --write .",
60
- prepare: "husky",
61
- test: "run-s check build:* test:*",
62
- "test:c8": "c8 --reporter=none node --test 'test/socket-npm.test.cjs'",
63
- "test-ci": "run-s build:* test:*",
64
- "test:unit": "tap",
65
- "test:coverage": "cp -r .tap/coverage/*.json coverage/tmp && c8 --reporter=lcov --reporter=text --include 'dist/*.js' --exclude 'dist/vendor.js' report"
66
- };
67
- var dependencies = {
68
- "@apideck/better-ajv-errors": "^0.3.6",
69
- "@cyclonedx/cdxgen": "^10.10.4",
70
- "@inquirer/prompts": "^7.0.0",
71
- "@npmcli/package-json": "6.0.1",
72
- "@npmcli/promise-spawn": "^8.0.1",
73
- "@socketregistry/hyrious__bun.lockb": "1.0.0",
74
- "@socketsecurity/config": "^2.1.3",
75
- "@socketsecurity/registry": "^1.0.4",
76
- "@socketsecurity/sdk": "^1.3.0",
77
- "ansi-align": "^3.0.1",
78
- blessed: "^0.1.81",
79
- "blessed-contrib": "^4.11.0",
80
- browserslist: "4.24.0",
81
- "chalk-table": "^1.0.2",
82
- "cli-boxes": "^4.0.1",
83
- "cli-spinners": "^3.2.0",
84
- "cross-spawn": "^7.0.3",
85
- "dot-prop": "^9.0.0",
86
- eastasianwidth: "^0.3.0",
87
- "emoji-regex": "^10.4.0",
88
- "fast-glob": "^3.3.2",
89
- "graceful-fs": "^4.2.11",
90
- "has-flag": "^5.0.1",
91
- hpagent: "^1.2.0",
92
- ignore: "^6.0.2",
93
- ini: "5.0.0",
94
- onetime: "^7.0.0",
95
- pacote: "^19.0.0",
96
- "pony-cause": "^2.1.11",
97
- rc: "1.2.8",
98
- "registry-auth-token": "^5.0.2",
99
- semver: "^7.6.3",
100
- "signal-exit": "^4.1.0",
101
- "supports-color": "^9.4.0",
102
- "supports-hyperlinks": "^3.1.0",
103
- synp: "^1.9.13",
104
- which: "^5.0.0",
105
- "write-file-atomic": "^6.0.0",
106
- "yargs-parser": "^21.1.1"
107
- };
108
- var devDependencies = {
109
- "@babel/core": "^7.25.8",
110
- "@babel/plugin-proposal-export-default-from": "^7.25.8",
111
- "@babel/plugin-syntax-dynamic-import": "^7.8.3",
112
- "@babel/plugin-transform-export-namespace-from": "^7.25.8",
113
- "@babel/plugin-transform-modules-commonjs": "^7.25.7",
114
- "@babel/plugin-transform-runtime": "^7.25.7",
115
- "@babel/preset-env": "^7.25.8",
116
- "@babel/preset-typescript": "^7.25.7",
117
- "@babel/runtime": "^7.25.7",
118
- "@eslint/compat": "^1.2.0",
119
- "@rollup/plugin-commonjs": "^28.0.0",
120
- "@rollup/plugin-json": "^6.1.0",
121
- "@rollup/plugin-node-resolve": "^15.3.0",
122
- "@rollup/plugin-replace": "^6.0.1",
123
- "@rollup/pluginutils": "^5.1.2",
124
- "@types/blessed": "^0.1.25",
125
- "@types/micromatch": "^4.0.9",
126
- "@types/mocha": "^10.0.9",
127
- "@types/mock-fs": "^4.13.4",
128
- "@types/node": "^22.7.5",
129
- "@types/npmcli__arborist": "^5.6.11",
130
- "@types/npmcli__package-json": "^4.0.4",
131
- "@types/npmcli__promise-spawn": "^6.0.3",
132
- "@types/semver": "^7.5.8",
133
- "@types/update-notifier": "^6.0.8",
134
- "@types/which": "^3.0.4",
135
- "@types/yargs-parser": "^21.0.3",
136
- "@typescript-eslint/eslint-plugin": "^8.8.1",
137
- "@typescript-eslint/parser": "^8.8.1",
138
- c8: "^10.1.2",
139
- chalk: "^5.3.0",
140
- eslint: "^9.12.0",
141
- "eslint-plugin-depend": "^0.11.0",
142
- globby: "^14.0.2",
143
- husky: "^9.1.6",
144
- "is-interactive": "^2.0.0",
145
- "is-unicode-supported": "^2.1.0",
146
- knip: "^5.33.3",
147
- "magic-string": "^0.30.11",
148
- meow: "^13.2.0",
149
- "mock-fs": "^5.3.0",
150
- nock: "^13.5.5",
151
- "normalize-package-data": "^7.0.0",
152
- "npm-run-all2": "^6.2.3",
153
- open: "^10.1.0",
154
- ora: "^8.1.0",
155
- oxlint: "^0.9.10",
156
- prettier: "3.3.3",
157
- "read-package-up": "^11.0.0",
158
- rollup: "4.24.0",
159
- "rollup-plugin-ts": "^3.4.5",
160
- tap: "^21.0.1",
161
- "terminal-link": "^3.0.0",
162
- "type-coverage": "^2.29.1",
163
- typescript: "5.4.5",
164
- "typescript-eslint": "^8.8.1",
165
- "unplugin-purge-polyfills": "^0.0.7",
166
- "update-notifier": "^7.3.1",
167
- "validate-npm-package-name": "^6.0.0"
168
- };
169
- var overrides = {
170
- "@cyclonedx/cdxgen": {
171
- "packageurl-js": "https://registry.npmjs.org/packageurl-js/-/packageurl-js-2.0.1.tgz"
172
- },
173
- "aggregate-error": "npm:@socketregistry/aggregate-error@^1",
174
- "es-define-property": "npm:@socketregistry/es-define-property@^1",
175
- "function-bind": "npm:@socketregistry/function-bind@^1",
176
- globalthis: "npm:@socketregistry/globalthis@^1",
177
- gopd: "npm:@socketregistry/gopd@^1",
178
- "has-property-descriptors": "npm:@socketregistry/has-property-descriptors@^1",
179
- "has-proto": "npm:@socketregistry/has-proto@^1",
180
- "has-symbols": "npm:@socketregistry/has-symbols@^1",
181
- hasown: "npm:@socketregistry/hasown@^1",
182
- "indent-string": "npm:@socketregistry/indent-string@^1",
183
- "is-core-module": "npm:@socketregistry/is-core-module@^1",
184
- isarray: "npm:@socketregistry/isarray@^1",
185
- "path-parse": "npm:@socketregistry/path-parse@^1",
186
- "safe-buffer": "npm:@socketregistry/safe-buffer@^1",
187
- "safer-buffer": "npm:@socketregistry/safer-buffer@^1",
188
- "set-function-length": "npm:@socketregistry/set-function-length@^1",
189
- "side-channel": "npm:@socketregistry/side-channel@^1"
190
- };
191
- var engines = {
192
- node: "^20.9.0 || >=22.0.0"
193
- };
194
- var files = [
195
- "bin/**",
196
- "dist/**",
197
- "translations.json"
198
- ];
199
- var require$$6 = {
200
- name: name,
201
- version: version,
202
- description: description,
203
- homepage: homepage,
204
- license: license,
205
- repository: repository,
206
- author: author,
207
- bin: bin,
208
- scripts: scripts,
209
- dependencies: dependencies,
210
- devDependencies: devDependencies,
211
- overrides: overrides,
212
- engines: engines,
213
- files: files
214
- };
215
-
216
28
  Object.defineProperty(ttyServer$1, "__esModule", {
217
29
  value: true
218
30
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@socketsecurity/cli",
3
- "version": "0.14.5",
3
+ "version": "0.14.7",
4
4
  "description": "CLI tool for Socket.dev",
5
5
  "homepage": "http://github.com/SocketDev/socket-cli-js",
6
6
  "license": "MIT",
@@ -20,7 +20,7 @@
20
20
  "socket-npx": "dist/npx-cli.js"
21
21
  },
22
22
  "scripts": {
23
- "build": "npm run build:dist && npm run build:test",
23
+ "build": "run-s build:*",
24
24
  "build:dist": "rollup -c .config/rollup.dist.config.mjs",
25
25
  "build:test": "rollup -c .config/rollup.test.config.mjs",
26
26
  "check": "run-p -c --aggregate-output check:*",
@@ -47,7 +47,7 @@
47
47
  "@npmcli/promise-spawn": "^8.0.1",
48
48
  "@socketregistry/hyrious__bun.lockb": "1.0.0",
49
49
  "@socketsecurity/config": "^2.1.3",
50
- "@socketsecurity/registry": "^1.0.4",
50
+ "@socketsecurity/registry": "^1.0.8",
51
51
  "@socketsecurity/sdk": "^1.3.0",
52
52
  "ansi-align": "^3.0.1",
53
53
  "blessed": "^0.1.81",