socket 1.1.20 → 1.1.21

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 (52) hide show
  1. package/CHANGELOG.md +25 -10
  2. package/dist/cli.js +179 -137
  3. package/dist/cli.js.map +1 -1
  4. package/dist/constants.js +25 -4
  5. package/dist/constants.js.map +1 -1
  6. package/dist/flags.js +21 -3
  7. package/dist/flags.js.map +1 -1
  8. package/dist/shadow-npm-bin2.js +2 -29
  9. package/dist/shadow-npm-bin2.js.map +1 -1
  10. package/dist/shadow-pnpm-bin2.js +2 -29
  11. package/dist/shadow-pnpm-bin2.js.map +1 -1
  12. package/dist/shadow-yarn-bin.js +4 -27
  13. package/dist/shadow-yarn-bin.js.map +1 -1
  14. package/dist/tsconfig.dts.tsbuildinfo +1 -1
  15. package/dist/types/commands/fix/cmd-fix.d.mts.map +1 -1
  16. package/dist/types/commands/manifest/cmd-manifest.d.mts.map +1 -1
  17. package/dist/types/commands/optimize/handle-optimize.d.mts.map +1 -1
  18. package/dist/types/commands/organization/cmd-organization-policy.d.mts.map +1 -1
  19. package/dist/types/commands/organization/cmd-organization.d.mts.map +1 -1
  20. package/dist/types/commands/package/cmd-package.d.mts.map +1 -1
  21. package/dist/types/commands/patch/cmd-patch.d.mts.map +1 -1
  22. package/dist/types/commands/patch/handle-patch.d.mts.map +1 -1
  23. package/dist/types/commands/scan/cmd-scan.d.mts.map +1 -1
  24. package/dist/types/commands/scan/perform-reachability-analysis.d.mts.map +1 -1
  25. package/dist/types/constants.d.mts +6 -1
  26. package/dist/types/constants.d.mts.map +1 -1
  27. package/dist/types/flags.d.mts.map +1 -1
  28. package/dist/types/shadow/npm-base.d.mts.map +1 -1
  29. package/dist/types/test/json-output-validation.d.mts +37 -0
  30. package/dist/types/test/json-output-validation.d.mts.map +1 -0
  31. package/dist/types/test/mocks/socket-auth.d.mts +88 -0
  32. package/dist/types/test/mocks/socket-auth.d.mts.map +1 -0
  33. package/dist/types/utils/config.d.mts +1 -1
  34. package/dist/types/utils/dlx-binary.d.mts +58 -0
  35. package/dist/types/utils/dlx-binary.d.mts.map +1 -0
  36. package/dist/types/utils/dlx-detection.d.mts +29 -0
  37. package/dist/types/utils/dlx-detection.d.mts.map +1 -0
  38. package/dist/types/utils/meow-with-subcommands.d.mts +33 -12
  39. package/dist/types/utils/meow-with-subcommands.d.mts.map +1 -1
  40. package/dist/types/utils/shadow-links.d.mts +5 -0
  41. package/dist/types/utils/shadow-links.d.mts.map +1 -0
  42. package/dist/types/utils/terminal-link.d.mts +19 -12
  43. package/dist/types/utils/terminal-link.d.mts.map +1 -1
  44. package/dist/utils.js +451 -126
  45. package/dist/utils.js.map +1 -1
  46. package/package.json +1 -1
  47. package/dist/types/shadow/npm/link.d.mts +0 -2
  48. package/dist/types/shadow/npm/link.d.mts.map +0 -1
  49. package/dist/types/shadow/pnpm/link.d.mts +0 -2
  50. package/dist/types/shadow/pnpm/link.d.mts.map +0 -1
  51. package/dist/types/shadow/yarn/link.d.mts +0 -2
  52. package/dist/types/shadow/yarn/link.d.mts.map +0 -1
package/dist/cli.js CHANGED
@@ -376,8 +376,8 @@ async function run$S(argv, importMeta, {
376
376
  const cli = utils.meowOrExit({
377
377
  argv,
378
378
  config,
379
- importMeta,
380
- parentName
379
+ parentName,
380
+ importMeta
381
381
  });
382
382
 
383
383
  // Supported inputs:
@@ -818,8 +818,8 @@ async function run$R(argv, importMeta, {
818
818
  const cli = utils.meowOrExit({
819
819
  argv,
820
820
  config,
821
- importMeta,
822
- parentName
821
+ parentName,
822
+ importMeta
823
823
  });
824
824
  const {
825
825
  interactive,
@@ -1574,7 +1574,7 @@ async function performReachabilityAnalysis(options) {
1574
1574
  return {
1575
1575
  ok: false,
1576
1576
  message: 'Tier 1 Reachability analysis requires an enterprise plan',
1577
- cause: `Please ${vendor.terminalLinkExports('upgrade your plan', `${constants.SOCKET_WEBSITE_URL}/pricing`)}. This feature is only available for organizations with an enterprise plan.`
1577
+ cause: `Please ${utils.socketDevLink('upgrade your plan', '/pricing')}. This feature is only available for organizations with an enterprise plan.`
1578
1578
  };
1579
1579
  }
1580
1580
  const wasSpinning = !!spinner?.isSpinning;
@@ -2422,8 +2422,8 @@ async function run$Q(argv, importMeta, {
2422
2422
  const cli = utils.meowOrExit({
2423
2423
  argv,
2424
2424
  config: config$k,
2425
- importMeta,
2426
- parentName
2425
+ parentName,
2426
+ importMeta
2427
2427
  });
2428
2428
  const dryRun = !!cli.flags['dryRun'];
2429
2429
  if (dryRun) {
@@ -2596,7 +2596,7 @@ async function outputConfigAuto(key, result, outputKind) {
2596
2596
  }
2597
2597
  logger.logger.log(`- ${key}: ${result.data}`);
2598
2598
  logger.logger.log('');
2599
- if (utils.isReadOnlyConfig()) {
2599
+ if (utils.isConfigFromFlag()) {
2600
2600
  logger.logger.log('(Unable to persist this value because the config is in read-only mode, meaning it was overridden through env or flag.)');
2601
2601
  } else if (key === 'defaultOrg') {
2602
2602
  const proceed = await prompts.select({
@@ -2744,7 +2744,7 @@ async function outputConfigGet(key, result, outputKind) {
2744
2744
  logger.logger.fail(utils.failMsgWithBadge(result.message, result.cause));
2745
2745
  return;
2746
2746
  }
2747
- const readOnly = utils.isReadOnlyConfig();
2747
+ const readOnly = utils.isConfigFromFlag();
2748
2748
  if (outputKind === 'markdown') {
2749
2749
  logger.logger.log(`# Config Value`);
2750
2750
  logger.logger.log('');
@@ -2847,7 +2847,7 @@ async function outputConfigList({
2847
2847
  full,
2848
2848
  outputKind
2849
2849
  }) {
2850
- const readOnly = utils.isReadOnlyConfig();
2850
+ const readOnly = utils.isConfigFromFlag();
2851
2851
  const supportedConfigKeys = utils.getSupportedConfigKeys();
2852
2852
  if (outputKind === 'json') {
2853
2853
  let failed = false;
@@ -3235,16 +3235,18 @@ const cmdConfig = {
3235
3235
  parentName
3236
3236
  }) {
3237
3237
  await utils.meowWithSubcommands({
3238
- auto: cmdConfigAuto,
3239
- get: cmdConfigGet,
3240
- list: cmdConfigList,
3241
- set: cmdConfigSet,
3242
- unset: cmdConfigUnset
3243
- }, {
3244
3238
  argv,
3245
- description: description$A,
3239
+ name: `${parentName} config`,
3246
3240
  importMeta,
3247
- name: `${parentName} config`
3241
+ subcommands: {
3242
+ auto: cmdConfigAuto,
3243
+ get: cmdConfigGet,
3244
+ list: cmdConfigList,
3245
+ set: cmdConfigSet,
3246
+ unset: cmdConfigUnset
3247
+ }
3248
+ }, {
3249
+ description: description$A
3248
3250
  });
3249
3251
  }
3250
3252
  };
@@ -4088,11 +4090,12 @@ async function run$K(argv, importMeta, {
4088
4090
  `
4089
4091
  };
4090
4092
  const cli = utils.meowOrExit({
4091
- allowUnknownFlags: false,
4092
4093
  argv,
4093
4094
  config,
4094
- importMeta,
4095
- parentName
4095
+ parentName,
4096
+ importMeta
4097
+ }, {
4098
+ allowUnknownFlags: false
4096
4099
  });
4097
4100
  const {
4098
4101
  autopilot,
@@ -4323,8 +4326,8 @@ async function run$J(argv, importMeta, {
4323
4326
  const cli = utils.meowOrExit({
4324
4327
  argv,
4325
4328
  config: config$h,
4326
- importMeta,
4327
- parentName
4329
+ parentName,
4330
+ importMeta
4328
4331
  });
4329
4332
  const dryRun = !!cli.flags['dryRun'];
4330
4333
  if (dryRun) {
@@ -4343,18 +4346,20 @@ const cmdInstall = {
4343
4346
  parentName
4344
4347
  }) {
4345
4348
  await utils.meowWithSubcommands({
4346
- completion: cmdInstallCompletion
4347
- }, {
4348
4349
  argv,
4349
- description: description$y,
4350
+ name: `${parentName} install`,
4350
4351
  importMeta,
4351
- name: `${parentName} install`
4352
+ subcommands: {
4353
+ completion: cmdInstallCompletion
4354
+ }
4355
+ }, {
4356
+ description: description$y
4352
4357
  });
4353
4358
  }
4354
4359
  };
4355
4360
 
4356
4361
  async function outputCmdJson(cwd) {
4357
- logger.logger.info('Target cwd:', constants.default.ENV.VITEST ? '<redacted>' : utils.tildify(cwd));
4362
+ logger.logger.info('Target cwd:', constants.default.ENV.VITEST ? constants.REDACTED : utils.tildify(cwd));
4358
4363
  const sockJsonPath = path.join(cwd, constants.SOCKET_JSON);
4359
4364
  const tildeSockJsonPath = constants.default.ENV.VITEST ? '<redacted>' : utils.tildify(sockJsonPath);
4360
4365
  if (!fs$1.existsSync(sockJsonPath)) {
@@ -4406,8 +4411,8 @@ async function run$I(argv, importMeta, {
4406
4411
  const cli = utils.meowOrExit({
4407
4412
  argv,
4408
4413
  config: config$g,
4409
- importMeta,
4410
- parentName
4414
+ parentName,
4415
+ importMeta
4411
4416
  });
4412
4417
  let [cwd = '.'] = cli.input;
4413
4418
  // Note: path.resolve vs .join:
@@ -4544,7 +4549,7 @@ async function attemptLogin(apiBaseUrl, apiProxy) {
4544
4549
  try {
4545
4550
  applyLogin(apiToken, enforcedOrgs, apiBaseUrl, apiProxy);
4546
4551
  logger.logger.success(`API credentials ${previousPersistedToken === apiToken ? 'refreshed' : previousPersistedToken ? 'updated' : 'set'}`);
4547
- if (utils.isReadOnlyConfig()) {
4552
+ if (utils.isConfigFromFlag()) {
4548
4553
  logger.logger.log('');
4549
4554
  logger.logger.warn('Note: config is in read-only mode, at least one key was overridden through flag/env, so the login was not persisted!');
4550
4555
  }
@@ -4602,8 +4607,8 @@ async function run$H(argv, importMeta, {
4602
4607
  const cli = utils.meowOrExit({
4603
4608
  argv,
4604
4609
  config,
4605
- importMeta,
4606
- parentName
4610
+ parentName,
4611
+ importMeta
4607
4612
  });
4608
4613
  const dryRun = !!cli.flags['dryRun'];
4609
4614
  if (dryRun) {
@@ -4631,7 +4636,7 @@ function attemptLogout() {
4631
4636
  try {
4632
4637
  applyLogout();
4633
4638
  logger.logger.success('Successfully logged out');
4634
- if (utils.isReadOnlyConfig()) {
4639
+ if (utils.isConfigFromFlag()) {
4635
4640
  logger.logger.log('');
4636
4641
  logger.logger.warn('Note: config is in read-only mode, at least one key was overridden through flag/env, so the logout was not persisted!');
4637
4642
  }
@@ -6303,15 +6308,19 @@ async function run$y(argv, importMeta, {
6303
6308
  parentName
6304
6309
  }) {
6305
6310
  await utils.meowWithSubcommands({
6306
- auto: cmdManifestAuto,
6307
- cdxgen: cmdManifestCdxgen,
6308
- conda: cmdManifestConda,
6309
- gradle: cmdManifestGradle,
6310
- kotlin: cmdManifestKotlin,
6311
- scala: cmdManifestScala,
6312
- setup: cmdManifestSetup
6313
- }, {
6314
6311
  argv,
6312
+ name: `${parentName} ${config$7.commandName}`,
6313
+ importMeta,
6314
+ subcommands: {
6315
+ auto: cmdManifestAuto,
6316
+ cdxgen: cmdManifestCdxgen,
6317
+ conda: cmdManifestConda,
6318
+ gradle: cmdManifestGradle,
6319
+ kotlin: cmdManifestKotlin,
6320
+ scala: cmdManifestScala,
6321
+ setup: cmdManifestSetup
6322
+ }
6323
+ }, {
6315
6324
  aliases: {
6316
6325
  yolo: {
6317
6326
  description: config$7.description,
@@ -6320,9 +6329,7 @@ async function run$y(argv, importMeta, {
6320
6329
  }
6321
6330
  },
6322
6331
  description: config$7.description,
6323
- importMeta,
6324
- flags: config$7.flags,
6325
- name: `${parentName} ${config$7.commandName}`
6332
+ flags: config$7.flags
6326
6333
  });
6327
6334
  }
6328
6335
 
@@ -6443,8 +6450,8 @@ async function run$w(argv, importMeta, {
6443
6450
  const cli = utils.meowOrExit({
6444
6451
  argv,
6445
6452
  config,
6446
- importMeta,
6447
- parentName
6453
+ parentName,
6454
+ importMeta
6448
6455
  });
6449
6456
  const dryRun = !!cli.flags['dryRun'];
6450
6457
  if (dryRun) {
@@ -6502,8 +6509,8 @@ async function run$v(argv, importMeta, {
6502
6509
  const cli = utils.meowOrExit({
6503
6510
  argv,
6504
6511
  config: config$6,
6505
- importMeta,
6506
- parentName
6512
+ parentName,
6513
+ importMeta
6507
6514
  });
6508
6515
  const {
6509
6516
  json,
@@ -7405,6 +7412,7 @@ async function handleOptimize({
7405
7412
  prod
7406
7413
  });
7407
7414
  if (!pkgEnvCResult.ok) {
7415
+ process.exitCode = pkgEnvCResult.code ?? 1;
7408
7416
  require$$9.debugFn('warn', 'Package environment validation failed');
7409
7417
  require$$9.debugDir('inspect', {
7410
7418
  pkgEnvCResult
@@ -7414,6 +7422,7 @@ async function handleOptimize({
7414
7422
  }
7415
7423
  const pkgEnvDetails = pkgEnvCResult.data;
7416
7424
  if (!pkgEnvDetails) {
7425
+ process.exitCode = 1;
7417
7426
  require$$9.debugFn('warn', 'No package environment details found');
7418
7427
  await outputOptimizeResult({
7419
7428
  ok: false,
@@ -7431,6 +7440,7 @@ async function handleOptimize({
7431
7440
  agentVersion
7432
7441
  } = pkgEnvDetails;
7433
7442
  if (agent === VLT) {
7443
+ process.exitCode = 1;
7434
7444
  require$$9.debugFn('warn', `${agent} does not support overrides`);
7435
7445
  await outputOptimizeResult({
7436
7446
  ok: false,
@@ -7445,6 +7455,9 @@ async function handleOptimize({
7445
7455
  pin,
7446
7456
  prod
7447
7457
  });
7458
+ if (!optimizationResult.ok) {
7459
+ process.exitCode = optimizationResult.code ?? 1;
7460
+ }
7448
7461
  require$$9.debugFn('notice', `Optimization ${optimizationResult.ok ? 'succeeded' : 'failed'}`);
7449
7462
  require$$9.debugDir('inspect', {
7450
7463
  optimizationResult
@@ -7685,8 +7698,8 @@ async function run$t(argv, importMeta, {
7685
7698
  const cli = utils.meowOrExit({
7686
7699
  argv,
7687
7700
  config,
7688
- importMeta,
7689
- parentName
7701
+ parentName,
7702
+ importMeta
7690
7703
  });
7691
7704
  const {
7692
7705
  json,
@@ -7821,8 +7834,8 @@ async function run$s(argv, importMeta, {
7821
7834
  const cli = utils.meowOrExit({
7822
7835
  argv,
7823
7836
  config,
7824
- importMeta,
7825
- parentName
7837
+ parentName,
7838
+ importMeta
7826
7839
  });
7827
7840
  const {
7828
7841
  json,
@@ -7957,8 +7970,8 @@ async function run$r(argv, importMeta, {
7957
7970
  const cli = utils.meowOrExit({
7958
7971
  argv,
7959
7972
  config,
7960
- importMeta,
7961
- parentName
7973
+ parentName,
7974
+ importMeta
7962
7975
  });
7963
7976
  const {
7964
7977
  json,
@@ -8090,8 +8103,8 @@ async function run$q(argv, importMeta, {
8090
8103
  const cli = utils.meowOrExit({
8091
8104
  argv,
8092
8105
  config,
8093
- importMeta,
8094
- parentName
8106
+ parentName,
8107
+ importMeta
8095
8108
  });
8096
8109
  const {
8097
8110
  json,
@@ -8133,15 +8146,16 @@ const cmdOrganizationPolicy = {
8133
8146
  parentName
8134
8147
  }) {
8135
8148
  await utils.meowWithSubcommands({
8136
- security: cmdOrganizationPolicySecurity,
8137
- license: cmdOrganizationPolicyLicense
8138
- }, {
8139
8149
  argv,
8140
- description: description$p,
8141
- defaultSub: 'list',
8142
- // Backwards compat
8150
+ name: `${parentName} policy`,
8143
8151
  importMeta,
8144
- name: `${parentName} policy`
8152
+ subcommands: {
8153
+ security: cmdOrganizationPolicySecurity,
8154
+ license: cmdOrganizationPolicyLicense
8155
+ }
8156
+ }, {
8157
+ description: description$p,
8158
+ defaultSub: 'list' // Backwards compat
8145
8159
  });
8146
8160
  }
8147
8161
  };
@@ -8222,8 +8236,8 @@ async function run$p(argv, importMeta, {
8222
8236
  const cli = utils.meowOrExit({
8223
8237
  argv,
8224
8238
  config: config$5,
8225
- importMeta,
8226
- parentName
8239
+ parentName,
8240
+ importMeta
8227
8241
  });
8228
8242
  const dryRun = !!cli.flags['dryRun'];
8229
8243
  const json = Boolean(cli.flags['json']);
@@ -8259,10 +8273,15 @@ const cmdOrganization = {
8259
8273
  parentName
8260
8274
  }) {
8261
8275
  await utils.meowWithSubcommands({
8262
- dependencies: cmdOrganizationDependencies,
8263
- list: cmdOrganizationList,
8264
- quota: cmdOrganizationQuota,
8265
- policy: cmdOrganizationPolicy
8276
+ argv,
8277
+ name: `${parentName} organization`,
8278
+ importMeta,
8279
+ subcommands: {
8280
+ dependencies: cmdOrganizationDependencies,
8281
+ list: cmdOrganizationList,
8282
+ quota: cmdOrganizationQuota,
8283
+ policy: cmdOrganizationPolicy
8284
+ }
8266
8285
  }, {
8267
8286
  aliases: {
8268
8287
  deps: {
@@ -8281,10 +8300,7 @@ const cmdOrganization = {
8281
8300
  argv: ['policy', 'security']
8282
8301
  }
8283
8302
  },
8284
- argv,
8285
- description: description$o,
8286
- importMeta,
8287
- name: `${parentName} organization`
8303
+ description: description$o
8288
8304
  });
8289
8305
  }
8290
8306
  };
@@ -9020,8 +9036,13 @@ const cmdPackage = {
9020
9036
  parentName
9021
9037
  }) {
9022
9038
  await utils.meowWithSubcommands({
9023
- score: cmdPackageScore,
9024
- shallow: cmdPackageShallow
9039
+ argv,
9040
+ name: `${parentName} package`,
9041
+ importMeta,
9042
+ subcommands: {
9043
+ score: cmdPackageScore,
9044
+ shallow: cmdPackageShallow
9045
+ }
9025
9046
  }, {
9026
9047
  aliases: {
9027
9048
  deep: {
@@ -9030,10 +9051,7 @@ const cmdPackage = {
9030
9051
  argv: ['score']
9031
9052
  }
9032
9053
  },
9033
- argv,
9034
- description: description$l,
9035
- importMeta,
9036
- name: `${parentName} package`
9054
+ description: description$l
9037
9055
  });
9038
9056
  }
9039
9057
  };
@@ -9299,7 +9317,22 @@ async function processFilePatch(pkgPath, fileName, fileInfo, socketDir, options)
9299
9317
  let result = true;
9300
9318
  try {
9301
9319
  await fs$1.promises.copyFile(blobPath, filepath);
9302
- logger.logger.success(`Patch applied successfully`);
9320
+
9321
+ // Verify the hash after copying to ensure file integrity.
9322
+ const verifyHashResult = await computeSHA256(filepath);
9323
+ if (!verifyHashResult.ok) {
9324
+ logger.logger.error(`Failed to verify hash after patch: ${verifyHashResult.cause || verifyHashResult.message}`);
9325
+ result = false;
9326
+ } else if (verifyHashResult.data !== fileInfo.afterHash) {
9327
+ logger.logger.error(`Hash verification failed after patch`);
9328
+ logger.logger.group();
9329
+ logger.logger.log(`Expected: ${fileInfo.afterHash}`);
9330
+ logger.logger.log(`Got: ${verifyHashResult.data}`);
9331
+ logger.logger.groupEnd();
9332
+ result = false;
9333
+ } else {
9334
+ logger.logger.success(`Patch applied successfully`);
9335
+ }
9303
9336
  } catch (e) {
9304
9337
  logger.logger.error('Error applying patch');
9305
9338
  require$$9.debugDir('error', e);
@@ -9442,11 +9475,12 @@ async function run$m(argv, importMeta, {
9442
9475
  `
9443
9476
  };
9444
9477
  const cli = utils.meowOrExit({
9445
- allowUnknownFlags: false,
9446
9478
  argv,
9447
9479
  config,
9448
- importMeta,
9449
- parentName
9480
+ parentName,
9481
+ importMeta
9482
+ }, {
9483
+ allowUnknownFlags: false
9450
9484
  });
9451
9485
  const {
9452
9486
  dryRun,
@@ -9535,8 +9569,8 @@ async function run$l(argv, importMeta, context) {
9535
9569
  const cli = utils.meowOrExit({
9536
9570
  argv,
9537
9571
  config,
9538
- importMeta,
9539
- parentName
9572
+ parentName,
9573
+ importMeta
9540
9574
  });
9541
9575
  const dryRun = !!cli.flags['dryRun'];
9542
9576
  if (dryRun) {
@@ -9612,8 +9646,8 @@ async function run$k(argv, importMeta, {
9612
9646
  const cli = utils.meowOrExit({
9613
9647
  argv,
9614
9648
  config: config$4,
9615
- importMeta,
9616
- parentName
9649
+ parentName,
9650
+ importMeta
9617
9651
  });
9618
9652
  const dryRun = !!cli.flags['dryRun'];
9619
9653
  if (dryRun) {
@@ -9678,8 +9712,8 @@ async function run$j(argv, importMeta, {
9678
9712
  const cli = utils.meowOrExit({
9679
9713
  argv,
9680
9714
  config: config$3,
9681
- importMeta,
9682
- parentName
9715
+ parentName,
9716
+ importMeta
9683
9717
  });
9684
9718
  const dryRun = !!cli.flags['dryRun'];
9685
9719
  if (dryRun) {
@@ -9839,8 +9873,8 @@ async function run$i(argv, importMeta, {
9839
9873
  const cli = utils.meowOrExit({
9840
9874
  argv,
9841
9875
  config,
9842
- importMeta,
9843
- parentName
9876
+ parentName,
9877
+ importMeta
9844
9878
  });
9845
9879
  const {
9846
9880
  json,
@@ -9975,8 +10009,8 @@ async function run$h(argv, importMeta, {
9975
10009
  const cli = utils.meowOrExit({
9976
10010
  argv,
9977
10011
  config,
9978
- importMeta,
9979
- parentName
10012
+ parentName,
10013
+ importMeta
9980
10014
  });
9981
10015
  const {
9982
10016
  json,
@@ -10268,8 +10302,8 @@ async function run$g(argv, importMeta, {
10268
10302
  const cli = utils.meowOrExit({
10269
10303
  argv,
10270
10304
  config,
10271
- importMeta,
10272
- parentName
10305
+ parentName,
10306
+ importMeta
10273
10307
  });
10274
10308
  const {
10275
10309
  all,
@@ -10466,8 +10500,8 @@ async function run$f(argv, importMeta, {
10466
10500
  const cli = utils.meowOrExit({
10467
10501
  argv,
10468
10502
  config,
10469
- importMeta,
10470
- parentName
10503
+ parentName,
10504
+ importMeta
10471
10505
  });
10472
10506
  const {
10473
10507
  json,
@@ -10628,8 +10662,8 @@ async function run$e(argv, importMeta, {
10628
10662
  const cli = utils.meowOrExit({
10629
10663
  argv,
10630
10664
  config,
10631
- importMeta,
10632
- parentName
10665
+ parentName,
10666
+ importMeta
10633
10667
  });
10634
10668
  const {
10635
10669
  json,
@@ -10687,16 +10721,18 @@ const cmdRepository = {
10687
10721
  parentName
10688
10722
  }) {
10689
10723
  await utils.meowWithSubcommands({
10690
- create: cmdRepositoryCreate,
10691
- view: cmdRepositoryView,
10692
- list: cmdRepositoryList,
10693
- del: cmdRepositoryDel,
10694
- update: cmdRepositoryUpdate
10695
- }, {
10696
10724
  argv,
10697
- description: description$d,
10725
+ name: `${parentName} repository`,
10698
10726
  importMeta,
10699
- name: `${parentName} repository`
10727
+ subcommands: {
10728
+ create: cmdRepositoryCreate,
10729
+ view: cmdRepositoryView,
10730
+ list: cmdRepositoryList,
10731
+ del: cmdRepositoryDel,
10732
+ update: cmdRepositoryUpdate
10733
+ }
10734
+ }, {
10735
+ description: description$d
10700
10736
  });
10701
10737
  }
10702
10738
  };
@@ -10918,8 +10954,8 @@ async function run$d(argv, importMeta, {
10918
10954
  const cli = utils.meowOrExit({
10919
10955
  argv,
10920
10956
  config,
10921
- importMeta,
10922
- parentName
10957
+ parentName,
10958
+ importMeta
10923
10959
  });
10924
10960
  const {
10925
10961
  commitHash,
@@ -13565,8 +13601,8 @@ async function run$5(argv, importMeta, {
13565
13601
  const cli = utils.meowOrExit({
13566
13602
  argv,
13567
13603
  config: config$2,
13568
- importMeta,
13569
- parentName
13604
+ parentName,
13605
+ importMeta
13570
13606
  });
13571
13607
  const dryRun = !!cli.flags['dryRun'];
13572
13608
  if (dryRun) {
@@ -13833,16 +13869,21 @@ const cmdScan = {
13833
13869
  parentName
13834
13870
  }) {
13835
13871
  await utils.meowWithSubcommands({
13836
- create: cmdScanCreate,
13837
- del: cmdScanDel,
13838
- diff: cmdScanDiff,
13839
- github: cmdScanGithub,
13840
- list: cmdScanList,
13841
- metadata: cmdScanMetadata,
13842
- reach: cmdScanReach,
13843
- report: cmdScanReport,
13844
- setup: cmdScanSetup,
13845
- view: cmdScanView
13872
+ argv,
13873
+ name: `${parentName} scan`,
13874
+ importMeta,
13875
+ subcommands: {
13876
+ create: cmdScanCreate,
13877
+ del: cmdScanDel,
13878
+ diff: cmdScanDiff,
13879
+ github: cmdScanGithub,
13880
+ list: cmdScanList,
13881
+ metadata: cmdScanMetadata,
13882
+ reach: cmdScanReach,
13883
+ report: cmdScanReport,
13884
+ setup: cmdScanSetup,
13885
+ view: cmdScanView
13886
+ }
13846
13887
  }, {
13847
13888
  aliases: {
13848
13889
  meta: {
@@ -13856,10 +13897,7 @@ const cmdScan = {
13856
13897
  argv: ['reach']
13857
13898
  }
13858
13899
  },
13859
- argv,
13860
- description: description$3,
13861
- importMeta,
13862
- name: `${parentName} scan`
13900
+ description: description$3
13863
13901
  });
13864
13902
  }
13865
13903
  };
@@ -14384,8 +14422,8 @@ async function run$2(argv, importMeta, {
14384
14422
  const cli = utils.meowOrExit({
14385
14423
  argv,
14386
14424
  config: config$1,
14387
- importMeta,
14388
- parentName
14425
+ parentName,
14426
+ importMeta
14389
14427
  });
14390
14428
  const dryRun = !!cli.flags['dryRun'];
14391
14429
  if (dryRun) {
@@ -14404,12 +14442,14 @@ const cmdUninstall = {
14404
14442
  parentName
14405
14443
  }) {
14406
14444
  await utils.meowWithSubcommands({
14407
- completion: cmdUninstallCompletion
14408
- }, {
14409
14445
  argv,
14410
- description: description$1,
14446
+ name: `${parentName} uninstall`,
14411
14447
  importMeta,
14412
- name: `${parentName} uninstall`
14448
+ subcommands: {
14449
+ completion: cmdUninstallCompletion
14450
+ }
14451
+ }, {
14452
+ description: description$1
14413
14453
  });
14414
14454
  }
14415
14455
  };
@@ -14839,13 +14879,15 @@ void (async () => {
14839
14879
  }
14840
14880
  });
14841
14881
  try {
14842
- await utils.meowWithSubcommands(rootCommands, {
14843
- aliases: rootAliases,
14844
- argv: process.argv.slice(2),
14882
+ await utils.meowWithSubcommands({
14845
14883
  name: constants.default.SOCKET_CLI_BIN_NAME,
14884
+ argv: process.argv.slice(2),
14846
14885
  importMeta: {
14847
14886
  url: `${require$$0.pathToFileURL(__filename$1)}`
14848
- }
14887
+ },
14888
+ subcommands: rootCommands
14889
+ }, {
14890
+ aliases: rootAliases
14849
14891
  });
14850
14892
  } catch (e) {
14851
14893
  process.exitCode = 1;
@@ -14902,5 +14944,5 @@ void (async () => {
14902
14944
  await utils.captureException(e);
14903
14945
  }
14904
14946
  })();
14905
- //# debugId=c2710cf0-3d3a-46a7-8ead-88053b9e55be
14947
+ //# debugId=506030ac-6b44-42d9-8af7-b61f2468318b
14906
14948
  //# sourceMappingURL=cli.js.map