@socketsecurity/cli-with-sentry 1.0.81 → 1.0.83

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
@@ -446,7 +446,7 @@ async function run$P(argv, importMeta, {
446
446
  test: hasApiToken,
447
447
  message: 'You need to be logged in to use this command. See `socket login`.',
448
448
  pass: 'ok',
449
- fail: 'missing API token'
449
+ fail: 'missing Socket API token'
450
450
  });
451
451
  if (!wasValidInput) {
452
452
  return;
@@ -619,7 +619,7 @@ ${table}
619
619
  } catch (e) {
620
620
  process.exitCode = 1;
621
621
  logger.logger.fail('There was a problem converting the logs to Markdown, please try the `--json` flag');
622
- require$$6.debugFn('error', 'caught: unexpected error');
622
+ require$$6.debugFn('error', 'caught: markdown conversion error');
623
623
  require$$6.debugDir('inspect', {
624
624
  error: e
625
625
  });
@@ -860,7 +860,7 @@ async function run$O(argv, importMeta, {
860
860
  test: hasApiToken,
861
861
  message: 'You need to be logged in to use this command. See `socket login`.',
862
862
  pass: 'ok',
863
- fail: 'missing API token'
863
+ fail: 'missing Socket API token'
864
864
  }, {
865
865
  nook: true,
866
866
  test: !json || !markdown,
@@ -1033,8 +1033,8 @@ async function fetchScanData(orgSlug, scanId, options) {
1033
1033
  updateScan('received invalid JSON response');
1034
1034
  return {
1035
1035
  ok: false,
1036
- message: 'Invalid API response',
1037
- cause: 'The API responded with at least one line that was not valid JSON. Please report if this persists.'
1036
+ message: 'Invalid Socket API response',
1037
+ cause: 'The Socket API responded with at least one line that was not valid JSON. Please report if this persists.'
1038
1038
  };
1039
1039
  }
1040
1040
  async function fetchSecurityPolicy() {
@@ -1044,18 +1044,18 @@ async function fetchScanData(orgSlug, scanId, options) {
1044
1044
  }
1045
1045
  updateProgress();
1046
1046
  const [scan, securityPolicy] = await Promise.all([fetchScanResult().catch(e => {
1047
- updateScan('failure; unknown blocking problem occurred');
1047
+ updateScan('failure; unknown blocking error occurred');
1048
1048
  return {
1049
1049
  ok: false,
1050
- message: 'Unexpected API problem',
1051
- cause: `We encountered an unexpected problem while requesting the Scan from the API: ${e?.message || '(no error message found)'}${e?.cause ? ` (cause: ${e.cause})` : ''}`
1050
+ message: 'Unexpected Socket API error',
1051
+ cause: `We encountered an unexpected error while requesting the Scan from the API: ${e?.message || '(no error message found)'}${e?.cause ? ` (cause: ${e.cause})` : ''}`
1052
1052
  };
1053
1053
  }), fetchSecurityPolicy().catch(e => {
1054
- updatePolicy('failure; unknown blocking problem occurred');
1054
+ updatePolicy('failure; unknown blocking error occurred');
1055
1055
  return {
1056
1056
  ok: false,
1057
- message: 'Unexpected API problem',
1058
- cause: `We encountered an unexpected problem while requesting the policy from the API: ${e?.message || '(no error message found)'}${e?.cause ? ` (cause: ${e.cause})` : ''}`
1057
+ message: 'Unexpected Socket API error',
1058
+ cause: `We encountered an unexpected error while requesting the policy from the Socket API: ${e?.message || '(no error message found)'}${e?.cause ? ` (cause: ${e.cause})` : ''}`
1059
1059
  };
1060
1060
  })]).finally(() => {
1061
1061
  finishedFetching = true;
@@ -2156,7 +2156,7 @@ const config$K = {
2156
2156
  accept or reject a current build. When the scan does not pass your security
2157
2157
  policy, the exit code will be non-zero.
2158
2158
 
2159
- It will use the default org for the set API token.
2159
+ It will use the default org for the Socket API token.
2160
2160
 
2161
2161
  The --autoManifest flag does the same as the one from \`socket scan create\`
2162
2162
  but is not enabled by default since the CI is less likely to be set up with
@@ -3802,13 +3802,13 @@ async function agentFix(pkgEnvDetails, actualTree, alertsMap, installer, {
3802
3802
  return basename === 'package.json' || basename === pkgEnvDetails.lockName;
3803
3803
  }) : [];
3804
3804
  };
3805
- const handleInstallFail = () => {
3805
+ const handleInstallFail = error => {
3806
3806
  cleanupInfoEntriesLoop();
3807
3807
  spinner?.stop();
3808
3808
  return {
3809
3809
  ok: false,
3810
3810
  message: 'Install failed',
3811
- cause: `Unexpected condition: ${pkgEnvDetails.agent} install failed`
3811
+ cause: `${pkgEnvDetails.agent} install failed${error ? `; ${error}` : ''}`
3812
3812
  };
3813
3813
  };
3814
3814
  const hasModifiedFiles = async (cwd = process.cwd()) => {
@@ -3863,21 +3863,26 @@ async function agentFix(pkgEnvDetails, actualTree, alertsMap, installer, {
3863
3863
  // eslint-disable-next-line no-await-in-loop
3864
3864
  await utils.removeNodeModules(cwd);
3865
3865
  }
3866
- const maybeActualTree = fixEnv.isCi && fs$1.existsSync(path.join(rootPath, 'node_modules')) ?
3867
- // eslint-disable-next-line no-await-in-loop
3868
- await getActualTree(cwd) :
3869
- // eslint-disable-next-line no-await-in-loop
3870
- await installer(pkgEnvDetails, {
3871
- cwd,
3872
- spinner
3873
- });
3874
- if (maybeActualTree && fs$1.existsSync(pkgEnvDetails.lockPath)) {
3866
+ if (fixEnv.isCi && fs$1.existsSync(path.join(rootPath, 'node_modules'))) {
3867
+ // eslint-disable-next-line no-await-in-loop
3868
+ actualTree = await getActualTree(cwd);
3869
+ } else {
3870
+ // eslint-disable-next-line no-await-in-loop
3871
+ const installResult = await installer(pkgEnvDetails, {
3872
+ cwd,
3873
+ spinner
3874
+ });
3875
+ const maybeActualTree = installResult.actualTree;
3876
+ if (!maybeActualTree) {
3877
+ // Exit early if install fails.
3878
+ return handleInstallFail(installResult.error);
3879
+ }
3875
3880
  actualTree = maybeActualTree;
3876
3881
  }
3877
- }
3878
- if (!actualTree) {
3879
- // Exit early if install fails.
3880
- return handleInstallFail();
3882
+ if (!fs$1.existsSync(pkgEnvDetails.lockPath)) {
3883
+ // Exit early if lockfile is missing.
3884
+ return handleInstallFail(new Error(`Missing lockfile at ${pkgEnvDetails.lockPath}`));
3885
+ }
3881
3886
  }
3882
3887
  const oldVersions = arrays.arrayUnique(shadowNpmInject.findPackageNodes(actualTree, name).map(n => n.version).filter(Boolean));
3883
3888
  if (!oldVersions.length) {
@@ -3994,11 +3999,18 @@ async function agentFix(pkgEnvDetails, actualTree, alertsMap, installer, {
3994
3999
  let errored = false;
3995
4000
  try {
3996
4001
  // eslint-disable-next-line no-await-in-loop
3997
- const maybeActualTree = await installer(pkgEnvDetails, {
4002
+ const installResult = await installer(pkgEnvDetails, {
3998
4003
  cwd,
3999
4004
  spinner
4000
4005
  });
4001
- if (maybeActualTree && fs$1.existsSync(pkgEnvDetails.lockPath)) {
4006
+ const maybeActualTree = installResult.actualTree;
4007
+ if (!maybeActualTree) {
4008
+ errored = true;
4009
+ error = installResult.error;
4010
+ } else if (!fs$1.existsSync(pkgEnvDetails.lockPath)) {
4011
+ errored = true;
4012
+ error = new Error(`Missing lockfile at ${pkgEnvDetails.lockPath}`);
4013
+ } else {
4002
4014
  actualTree = maybeActualTree;
4003
4015
  // eslint-disable-next-line no-await-in-loop
4004
4016
  await afterInstall(editablePkgJson, packument, oldVersion, newVersion, vulnerableVersionRange, fixConfig);
@@ -4012,8 +4024,6 @@ async function agentFix(pkgEnvDetails, actualTree, alertsMap, installer, {
4012
4024
  }
4013
4025
  spinner?.success(`Fixed ${name} in ${workspace}.`);
4014
4026
  seenVersions.add(newVersion);
4015
- } else {
4016
- errored = true;
4017
4027
  }
4018
4028
  } catch (e) {
4019
4029
  error = e;
@@ -4049,16 +4059,21 @@ async function agentFix(pkgEnvDetails, actualTree, alertsMap, installer, {
4049
4059
  // eslint-disable-next-line no-await-in-loop
4050
4060
  await utils.gitDeleteBranch(branch, cwd);
4051
4061
  // eslint-disable-next-line no-await-in-loop
4052
- const maybeActualTree = await installer(pkgEnvDetails, {
4062
+ const installResult = await installer(pkgEnvDetails, {
4053
4063
  cwd,
4054
4064
  spinner
4055
4065
  });
4056
- if (maybeActualTree && fs$1.existsSync(pkgEnvDetails.lockPath)) {
4057
- actualTree = maybeActualTree;
4058
- continue infosLoop;
4066
+ const maybeActualTree = installResult.actualTree;
4067
+ if (!maybeActualTree) {
4068
+ // Exit early if install fails.
4069
+ return handleInstallFail(installResult.error);
4059
4070
  }
4060
- // Exit early if install fails.
4061
- return handleInstallFail();
4071
+ if (!fs$1.existsSync(pkgEnvDetails.lockPath)) {
4072
+ // Exit early if lockfile is missing.
4073
+ return handleInstallFail(new Error(`Missing lockfile at ${pkgEnvDetails.lockPath}`));
4074
+ }
4075
+ actualTree = maybeActualTree;
4076
+ continue infosLoop;
4062
4077
  }
4063
4078
  seenBranches.add(branch);
4064
4079
 
@@ -4112,15 +4127,17 @@ async function agentFix(pkgEnvDetails, actualTree, alertsMap, installer, {
4112
4127
  // eslint-disable-next-line no-await-in-loop
4113
4128
  await utils.gitCheckoutBranch(fixEnv.baseBranch, cwd);
4114
4129
  // eslint-disable-next-line no-await-in-loop
4115
- const maybeActualTree = await installer(pkgEnvDetails, {
4130
+ const installResult = await installer(pkgEnvDetails, {
4116
4131
  cwd,
4117
4132
  spinner
4118
4133
  });
4119
4134
  spinner?.stop();
4135
+ const maybeActualTree = installResult.actualTree;
4120
4136
  if (maybeActualTree) {
4121
4137
  actualTree = maybeActualTree;
4122
4138
  } else {
4123
4139
  errored = true;
4140
+ error = installResult.error;
4124
4141
  }
4125
4142
  }
4126
4143
  if (errored) {
@@ -4133,17 +4150,17 @@ async function agentFix(pkgEnvDetails, actualTree, alertsMap, installer, {
4133
4150
  ignoreWhitespace: true
4134
4151
  })]);
4135
4152
  // eslint-disable-next-line no-await-in-loop
4136
- const maybeActualTree = await installer(pkgEnvDetails, {
4153
+ const installResult = await installer(pkgEnvDetails, {
4137
4154
  cwd,
4138
4155
  spinner
4139
4156
  });
4140
4157
  spinner?.stop();
4141
- if (maybeActualTree) {
4142
- actualTree = maybeActualTree;
4143
- } else {
4158
+ const maybeActualTree = installResult.actualTree;
4159
+ if (!maybeActualTree) {
4144
4160
  // Exit early if install fails.
4145
- return handleInstallFail();
4161
+ return handleInstallFail(installResult.error);
4146
4162
  }
4163
+ actualTree = maybeActualTree;
4147
4164
  }
4148
4165
  return {
4149
4166
  ok: false,
@@ -4245,6 +4262,7 @@ async function install$1(pkgEnvDetails, options) {
4245
4262
  require$$6.debugFn('stdio', `spawn: ${quotedCmd}`);
4246
4263
  const isSpinning = spinner?.isSpinning;
4247
4264
  spinner?.stop();
4265
+ let error;
4248
4266
  let errored = false;
4249
4267
  try {
4250
4268
  await utils.runAgentInstall(pkgEnvDetails, {
@@ -4253,27 +4271,37 @@ async function install$1(pkgEnvDetails, options) {
4253
4271
  stdio: useDebug ? 'inherit' : 'ignore'
4254
4272
  });
4255
4273
  } catch (e) {
4274
+ errored = true;
4275
+ error = e;
4256
4276
  require$$6.debugFn('error', `caught: ${quotedCmd} failed`);
4257
4277
  require$$6.debugDir('inspect', {
4258
- error: e
4278
+ error
4259
4279
  });
4260
- errored = true;
4261
4280
  }
4262
- let actualTree = null;
4281
+ let actualTree = undefined;
4263
4282
  if (!errored) {
4264
4283
  try {
4265
4284
  actualTree = await getActualTree(cwd);
4266
4285
  } catch (e) {
4286
+ errored = true;
4287
+ error = e;
4267
4288
  require$$6.debugFn('error', 'caught: Arborist error');
4268
4289
  require$$6.debugDir('inspect', {
4269
- error: e
4290
+ error
4270
4291
  });
4271
4292
  }
4272
4293
  }
4273
4294
  if (isSpinning) {
4274
4295
  spinner.start();
4275
4296
  }
4276
- return actualTree;
4297
+ return {
4298
+ ...(actualTree ? {
4299
+ actualTree
4300
+ } : undefined),
4301
+ ...(errored ? {
4302
+ error
4303
+ } : undefined)
4304
+ };
4277
4305
  }
4278
4306
  async function npmFix(pkgEnvDetails, fixConfig) {
4279
4307
  const {
@@ -4411,6 +4439,7 @@ async function install(pkgEnvDetails, options) {
4411
4439
  require$$6.debugFn('stdio', `spawn: ${quotedCmd}`);
4412
4440
  const isSpinning = spinner?.isSpinning;
4413
4441
  spinner?.stop();
4442
+ let error;
4414
4443
  let errored = false;
4415
4444
  try {
4416
4445
  await utils.runAgentInstall(pkgEnvDetails, {
@@ -4419,27 +4448,37 @@ async function install(pkgEnvDetails, options) {
4419
4448
  stdio: require$$6.isDebug('stdio') ? 'inherit' : 'ignore'
4420
4449
  });
4421
4450
  } catch (e) {
4451
+ errored = true;
4452
+ error = e;
4422
4453
  require$$6.debugFn('error', `caught: ${quotedCmd} failed`);
4423
4454
  require$$6.debugDir('inspect', {
4424
- error: e
4455
+ error
4425
4456
  });
4426
- errored = true;
4427
4457
  }
4428
- let actualTree = null;
4458
+ let actualTree = undefined;
4429
4459
  if (!errored) {
4430
4460
  try {
4431
4461
  actualTree = await getActualTree(cwd);
4432
4462
  } catch (e) {
4463
+ errored = true;
4464
+ error = e;
4433
4465
  require$$6.debugFn('error', 'caught: Arborist error');
4434
4466
  require$$6.debugDir('inspect', {
4435
- error: e
4467
+ error
4436
4468
  });
4437
4469
  }
4438
4470
  }
4439
4471
  if (isSpinning) {
4440
4472
  spinner.start();
4441
4473
  }
4442
- return actualTree;
4474
+ return {
4475
+ ...(actualTree ? {
4476
+ actualTree
4477
+ } : undefined),
4478
+ ...(errored ? {
4479
+ error
4480
+ } : undefined)
4481
+ };
4443
4482
  }
4444
4483
  async function pnpmFix(pkgEnvDetails, fixConfig) {
4445
4484
  const {
@@ -4454,11 +4493,12 @@ async function pnpmFix(pkgEnvDetails, fixConfig) {
4454
4493
  // Update pnpm-lock.yaml if its version is older than what the installed pnpm
4455
4494
  // produces.
4456
4495
  if (pkgEnvDetails.agentVersion.major >= 10 && (utils.parsePnpmLockfileVersion(lockfile?.lockfileVersion)?.major ?? 0) <= 6) {
4457
- const maybeActualTree = await install(pkgEnvDetails, {
4496
+ const installResult = await install(pkgEnvDetails, {
4458
4497
  args: ['--lockfile-only'],
4459
4498
  cwd,
4460
4499
  spinner
4461
4500
  });
4501
+ const maybeActualTree = installResult.actualTree;
4462
4502
  if (maybeActualTree) {
4463
4503
  lockSrc = (await utils.readLockfile(pkgEnvDetails.lockPath)) ?? '';
4464
4504
  } else {
@@ -5152,7 +5192,7 @@ async function attemptLogin(apiBaseUrl, apiProxy) {
5152
5192
  apiBaseUrl ??= utils.getConfigValueOrUndef('apiBaseUrl') ?? undefined;
5153
5193
  apiProxy ??= utils.getConfigValueOrUndef('apiProxy') ?? undefined;
5154
5194
  const apiTokenInput = await prompts.password({
5155
- message: `Enter your ${vendor.terminalLinkExports('Socket.dev API key', 'https://docs.socket.dev/docs/api-keys')} (leave blank for a public key)`
5195
+ message: `Enter your ${vendor.terminalLinkExports('Socket.dev API token', 'https://docs.socket.dev/docs/api-keys')} (leave blank for a public key)`
5156
5196
  });
5157
5197
  if (apiTokenInput === undefined) {
5158
5198
  logger.logger.fail('Canceled by user');
@@ -5186,7 +5226,7 @@ async function attemptLogin(apiBaseUrl, apiProxy) {
5186
5226
  organizations
5187
5227
  } = orgsCResult.data;
5188
5228
  const orgSlugs = Object.values(organizations).map(obj => obj.slug);
5189
- logger.logger.success(`API key verified: ${orgSlugs}`);
5229
+ logger.logger.success(`API token verified: ${orgSlugs}`);
5190
5230
  const enforcedChoices = Object.values(organizations).filter(org => org?.plan === 'enterprise').map(org => ({
5191
5231
  name: org.name ?? 'undefined',
5192
5232
  value: org.id
@@ -5301,7 +5341,7 @@ const config$E = {
5301
5341
  API Token Requirements
5302
5342
  - Quota: 1 unit
5303
5343
 
5304
- Logs into the Socket API by prompting for an API key
5344
+ Logs into the Socket API by prompting for an API token
5305
5345
 
5306
5346
  Options
5307
5347
  ${utils.getFlagListOutput(config.flags)}
@@ -8220,7 +8260,7 @@ async function run$q(argv, importMeta, {
8220
8260
  test: hasApiToken,
8221
8261
  message: 'You need to be logged in to use this command. See `socket login`.',
8222
8262
  pass: 'ok',
8223
- fail: 'missing API token'
8263
+ fail: 'missing Socket API token'
8224
8264
  });
8225
8265
  if (!wasValidInput) {
8226
8266
  return;
@@ -8360,7 +8400,7 @@ async function run$p(argv, importMeta, {
8360
8400
  test: hasApiToken,
8361
8401
  message: 'You need to be logged in to use this command. See `socket login`.',
8362
8402
  pass: 'ok',
8363
- fail: 'missing API token'
8403
+ fail: 'missing Socket API token'
8364
8404
  });
8365
8405
  if (!wasValidInput) {
8366
8406
  return;
@@ -8499,7 +8539,7 @@ async function run$o(argv, importMeta, {
8499
8539
  test: hasApiToken,
8500
8540
  message: 'You need to be logged in to use this command. See `socket login`.',
8501
8541
  pass: 'ok',
8502
- fail: 'missing API token'
8542
+ fail: 'missing Socket API token'
8503
8543
  });
8504
8544
  if (!wasValidInput) {
8505
8545
  return;
@@ -8541,7 +8581,7 @@ async function outputOrganizationList(result, outputKind = 'text') {
8541
8581
  mw3 = Math.max(mw3, o.plan.length);
8542
8582
  }
8543
8583
  logger.logger.log('# Organizations\n');
8544
- logger.logger.log(`List of organizations associated with your API key, starting with: ${vendor.yoctocolorsCjsExports.italic(visibleTokenPrefix)}\n`);
8584
+ logger.logger.log(`List of organizations associated with your API token, starting with: ${vendor.yoctocolorsCjsExports.italic(visibleTokenPrefix)}\n`);
8545
8585
  logger.logger.log(`| Name${' '.repeat(mw1 - 4)} | ID${' '.repeat(mw2 - 2)} | Plan${' '.repeat(mw3 - 4)} |`);
8546
8586
  logger.logger.log(`| ${'-'.repeat(mw1)} | ${'-'.repeat(mw2)} | ${'-'.repeat(mw3)} |`);
8547
8587
  for (const o of organizations) {
@@ -8552,7 +8592,7 @@ async function outputOrganizationList(result, outputKind = 'text') {
8552
8592
  }
8553
8593
  default:
8554
8594
  {
8555
- logger.logger.log(`List of organizations associated with your API key, starting with: ${vendor.yoctocolorsCjsExports.italic(visibleTokenPrefix)}\n`);
8595
+ logger.logger.log(`List of organizations associated with your API token, starting with: ${vendor.yoctocolorsCjsExports.italic(visibleTokenPrefix)}\n`);
8556
8596
  // Just dump
8557
8597
  for (const o of organizations) {
8558
8598
  logger.logger.log(`- Name: ${vendor.yoctocolorsCjsExports.bold(o.name ?? 'undefined')}, ID: ${vendor.yoctocolorsCjsExports.bold(o.id)}, Plan: ${vendor.yoctocolorsCjsExports.bold(o.plan)}`);
@@ -8571,7 +8611,7 @@ const {
8571
8611
  } = constants;
8572
8612
  const config$n = {
8573
8613
  commandName: 'list',
8574
- description: 'List organizations associated with the API key used',
8614
+ description: 'List organizations associated with the Socket API token',
8575
8615
  hidden: false,
8576
8616
  flags: {
8577
8617
  ...flags.commonFlags,
@@ -8624,7 +8664,7 @@ async function run$n(argv, importMeta, {
8624
8664
  test: hasApiToken,
8625
8665
  message: 'You need to be logged in to use this command. See `socket login`.',
8626
8666
  pass: 'ok',
8627
- fail: 'missing API token'
8667
+ fail: 'missing Socket API token'
8628
8668
  });
8629
8669
  if (!wasValidInput) {
8630
8670
  return;
@@ -8711,7 +8751,7 @@ const {
8711
8751
  } = constants;
8712
8752
  const config$m = {
8713
8753
  commandName: 'quota',
8714
- description: 'List organizations associated with the API key used',
8754
+ description: 'List organizations associated with the Socket API token',
8715
8755
  hidden: true,
8716
8756
  flags: {
8717
8757
  ...flags.commonFlags,
@@ -8758,7 +8798,7 @@ async function run$m(argv, importMeta, {
8758
8798
  test: hasApiToken,
8759
8799
  message: 'You need to be logged in to use this command. See `socket login`.',
8760
8800
  pass: 'ok',
8761
- fail: 'missing API token'
8801
+ fail: 'missing Socket API token'
8762
8802
  });
8763
8803
  if (!wasValidInput) {
8764
8804
  return;
@@ -9122,7 +9162,7 @@ async function run$l(argv, importMeta, {
9122
9162
  test: hasApiToken,
9123
9163
  message: 'You need to be logged in to use this command. See `socket login`.',
9124
9164
  pass: 'ok',
9125
- fail: 'missing API token'
9165
+ fail: 'missing Socket API token'
9126
9166
  });
9127
9167
  if (!wasValidInput) {
9128
9168
  return;
@@ -9825,7 +9865,7 @@ async function run$h(argv, importMeta, {
9825
9865
  test: hasApiToken,
9826
9866
  message: 'You need to be logged in to use this command. See `socket login`.',
9827
9867
  pass: 'ok',
9828
- fail: 'missing API token'
9868
+ fail: 'missing Socket API token'
9829
9869
  });
9830
9870
  if (!wasValidInput) {
9831
9871
  return;
@@ -9964,7 +10004,7 @@ async function run$g(argv, importMeta, {
9964
10004
  test: hasApiToken,
9965
10005
  message: 'You need to be logged in to use this command. See `socket login`.',
9966
10006
  pass: 'ok',
9967
- fail: 'missing API token'
10007
+ fail: 'missing Socket API token'
9968
10008
  });
9969
10009
  if (!wasValidInput) {
9970
10010
  return;
@@ -10258,7 +10298,7 @@ async function run$f(argv, importMeta, {
10258
10298
  test: hasApiToken,
10259
10299
  message: 'You need to be logged in to use this command. See `socket login`.',
10260
10300
  pass: 'ok',
10261
- fail: 'missing API token'
10301
+ fail: 'missing Socket API token'
10262
10302
  }, {
10263
10303
  nook: true,
10264
10304
  test: direction === 'asc' || direction === 'desc',
@@ -10461,7 +10501,7 @@ async function run$e(argv, importMeta, {
10461
10501
  test: hasApiToken,
10462
10502
  message: 'You need to be logged in to use this command. See `socket login`.',
10463
10503
  pass: 'ok',
10464
- fail: 'missing API token'
10504
+ fail: 'missing Socket API token'
10465
10505
  });
10466
10506
  if (!wasValidInput) {
10467
10507
  return;
@@ -10632,7 +10672,7 @@ async function run$d(argv, importMeta, {
10632
10672
  test: hasApiToken,
10633
10673
  message: 'You need to be logged in to use this command. See `socket login`.',
10634
10674
  pass: 'ok',
10635
- fail: 'missing API token'
10675
+ fail: 'missing Socket API token'
10636
10676
  });
10637
10677
  if (!wasValidInput) {
10638
10678
  return;
@@ -11125,7 +11165,7 @@ async function run$b(argv, importMeta, {
11125
11165
  test: hasApiToken,
11126
11166
  message: 'You need to be logged in to use this command. See `socket login`.',
11127
11167
  pass: 'ok',
11128
- fail: 'missing API token'
11168
+ fail: 'missing Socket API token'
11129
11169
  });
11130
11170
  if (!wasValidInput) {
11131
11171
  return;
@@ -11440,7 +11480,7 @@ async function run$a(argv, importMeta, {
11440
11480
  test: hasApiToken,
11441
11481
  message: 'You need to be logged in to use this command. See `socket login`.',
11442
11482
  pass: 'ok',
11443
- fail: 'missing API token'
11483
+ fail: 'missing Socket API token'
11444
11484
  });
11445
11485
  if (!wasValidInput) {
11446
11486
  return;
@@ -12282,7 +12322,7 @@ async function run$9(argv, importMeta, {
12282
12322
  }, {
12283
12323
  nook: true,
12284
12324
  test: hasSocketApiToken,
12285
- message: 'This command requires an API token for access',
12325
+ message: 'This command requires an Socket API token for access',
12286
12326
  pass: 'ok',
12287
12327
  fail: 'missing (try `socket login`)'
12288
12328
  }, {
@@ -12556,7 +12596,7 @@ async function run$8(argv, importMeta, {
12556
12596
  test: hasApiToken,
12557
12597
  message: 'You need to be logged in to use this command. See `socket login`.',
12558
12598
  pass: 'ok',
12559
- fail: 'missing API token'
12599
+ fail: 'missing Socket API token'
12560
12600
  }, {
12561
12601
  nook: true,
12562
12602
  test: !branchFlag || !branchArg,
@@ -12718,7 +12758,7 @@ async function run$7(argv, importMeta, {
12718
12758
  test: hasApiToken,
12719
12759
  message: 'You need to be logged in to use this command. See `socket login`.',
12720
12760
  pass: 'ok',
12721
- fail: 'missing API token'
12761
+ fail: 'missing Socket API token'
12722
12762
  });
12723
12763
  if (!wasValidInput) {
12724
12764
  return;
@@ -12963,7 +13003,7 @@ async function run$5(argv, importMeta, {
12963
13003
  test: hasApiToken,
12964
13004
  message: 'You need to be logged in to use this command. See `socket login`.',
12965
13005
  pass: 'ok',
12966
- fail: 'missing API token'
13006
+ fail: 'missing Socket API token'
12967
13007
  });
12968
13008
  if (!wasValidInput) {
12969
13009
  return;
@@ -13182,7 +13222,7 @@ async function configureScan(config, cwd = process.cwd()) {
13182
13222
  return notCanceled();
13183
13223
  }
13184
13224
  async function configureGithub(config) {
13185
- // Do not store the github API token. Just leads to a security rabbit hole.
13225
+ // Do not store the GitHub API token. Just leads to a security rabbit hole.
13186
13226
 
13187
13227
  const all = await prompts.select({
13188
13228
  message: '(--all) Do you by default want to fetch all repos from the GitHub API and scan all known repos?',
@@ -13382,8 +13422,8 @@ async function fetchScan(orgSlug, scanId) {
13382
13422
  }
13383
13423
  return {
13384
13424
  ok: false,
13385
- message: 'Invalid API response',
13386
- cause: 'The API responded with at least one line that was not valid JSON. Please report if this persists.'
13425
+ message: 'Invalid Socket API response',
13426
+ cause: 'The Socket API responded with at least one line that was not valid JSON. Please report if this persists.'
13387
13427
  };
13388
13428
  }
13389
13429
 
@@ -13577,7 +13617,7 @@ async function run$3(argv, importMeta, {
13577
13617
  test: hasApiToken,
13578
13618
  message: 'You need to be logged in to use this command. See `socket login`.',
13579
13619
  pass: 'ok',
13580
- fail: 'missing API token'
13620
+ fail: 'missing Socket API token'
13581
13621
  }, {
13582
13622
  nook: true,
13583
13623
  test: !stream || !!json,
@@ -14014,7 +14054,7 @@ async function run$2(argv, importMeta, {
14014
14054
  test: hasApiToken,
14015
14055
  message: 'You need to be logged in to use this command. See `socket login`.',
14016
14056
  pass: 'ok',
14017
- fail: 'missing API token'
14057
+ fail: 'missing Socket API token'
14018
14058
  });
14019
14059
  if (!wasValidInput) {
14020
14060
  return;
@@ -14630,5 +14670,5 @@ void (async () => {
14630
14670
  await utils.captureException(e);
14631
14671
  }
14632
14672
  })();
14633
- //# debugId=8579bbdd-d381-460b-9333-6759b277974a
14673
+ //# debugId=2badc2bc-a4d7-4304-94c6-958c975e9822
14634
14674
  //# sourceMappingURL=cli.js.map