@socketsecurity/cli-with-sentry 1.0.82 → 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.
@@ -26,7 +26,11 @@ export type InstallOptions = {
26
26
  spinner?: Spinner | undefined;
27
27
  };
28
28
  export type InstallPhaseHandler = (editablePkgJson: EditablePackageJson, packument: Packument, oldVersion: string, newVersion: string, vulnerableVersionRange: string, fixConfig: FixConfig) => Promise<void>;
29
- export type Installer = (pkgEnvDetails: EnvDetails, options: InstallOptions) => Promise<NodeClass | null>;
29
+ export type Installer = (pkgEnvDetails: EnvDetails, options: InstallOptions) => Promise<InstallerResult>;
30
+ export type InstallerResult = {
31
+ actualTree?: NodeClass | undefined;
32
+ error?: unknown | undefined;
33
+ };
30
34
  export declare function agentFix(pkgEnvDetails: EnvDetails, actualTree: NodeClass | undefined, alertsMap: AlertsByPurl, installer: Installer, { afterInstall, afterUpdate, beforeInstall, revertInstall }: {
31
35
  beforeInstall?: InstallPhaseHandler | undefined;
32
36
  afterUpdate?: InstallPhaseHandler | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"agent-fix.d.mts","sourceRoot":"","sources":["../../../../src/commands/fix/agent-fix.mts"],"names":[],"mappings":"AAsDA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAA;AACpE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAA;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAA;AACxE,OAAO,KAAK,EACV,mBAAmB,EACnB,SAAS,EACV,MAAM,uCAAuC,CAAA;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAA;AAEnE,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,EA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/commands/fix/npm-fix.mts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,SAAS,EAAkB,MAAM,iBAAiB,CAAA;AAEhE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAA;AA+ErE,wBAAsB,MAAM,CAC1B,aAAa,EAAE,UAAU,EACzB,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC,OAAO,CAAC;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC,CA8FtC"}
1
+ {"version":3,"file":"npm-fix.d.mts","sourceRoot":"","sources":["../../../../src/commands/fix/npm-fix.mts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,SAAS,EAGV,MAAM,iBAAiB,CAAA;AAExB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAA;AAsFrE,wBAAsB,MAAM,CAC1B,aAAa,EAAE,UAAU,EACzB,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC,OAAO,CAAC;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC,CA8FtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"pnpm-fix.d.mts","sourceRoot":"","sources":["../../../../src/commands/fix/pnpm-fix.mts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,SAAS,EAAkB,MAAM,iBAAiB,CAAA;AAEhE,OAAO,KAAK,EAAE,OAAO,EAAwB,MAAM,iBAAiB,CAAA;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAA;AA+DrE,wBAAsB,OAAO,CAC3B,aAAa,EAAE,UAAU,EACzB,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC,OAAO,CAAC;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC,CAwLtC"}
1
+ {"version":3,"file":"pnpm-fix.d.mts","sourceRoot":"","sources":["../../../../src/commands/fix/pnpm-fix.mts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EACV,SAAS,EAGV,MAAM,iBAAiB,CAAA;AAExB,OAAO,KAAK,EAAE,OAAO,EAAwB,MAAM,iBAAiB,CAAA;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAA;AAsErE,wBAAsB,OAAO,CAC3B,aAAa,EAAE,UAAU,EACzB,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC,OAAO,CAAC;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC,CAyLtC"}
@@ -10,7 +10,7 @@ export type HandleApiCallOptions = {
10
10
  export declare function handleApiCall<T extends SocketSdkOperations>(value: Promise<SocketSdkResult<T>>, options?: HandleApiCallOptions | undefined): Promise<CResult<SocketSdkSuccessResult<T>['data']>>;
11
11
  export declare function handleApiCallNoSpinner<T extends SocketSdkOperations>(value: Promise<SocketSdkResult<T>>, description: string): Promise<CResult<SocketSdkSuccessResult<T>['data']>>;
12
12
  export declare function getErrorMessageForHttpStatusCode(code: number): Promise<string>;
13
- // The API server that should be used for operations.
13
+ // The Socket API server that should be used for operations.
14
14
  export declare function getDefaultApiBaseUrl(): string | undefined;
15
15
  export declare function queryApi(path: string, apiToken: string): Promise<Response>;
16
16
  export declare function queryApiSafeText(path: string, fetchSpinnerDesc?: string): Promise<CResult<string>>;
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.mts","sourceRoot":"","sources":["../../../src/utils/api.mts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAA;AACnE,OAAO,KAAK,EAEV,mBAAmB,EACnB,eAAe,EACf,sBAAsB,EACvB,MAAM,qBAAqB,CAAA;AAI5B,8CAA8C;AAC9C,wBAAgB,6BAA6B,CAAC,CA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,SAAS,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,CAAA;IAC9D,0BAA0B,CAAC,EAAE,OAAO,CAAA;IACpC,GAAG,CAAC,EAAE,MAAM,CAAA,CAAC,mCAAmC;CACjD;AAiFD,wBAAgB,iBAAiB,CAAC,GAAG,SAAgB;;;SAuBpD;AAED,wBAAgB,cAAc,CAAC,GAAG,SAAS,MAAM,WAAW,EAC1D,GAAG,EAAE,GAAG,GACP,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAO3B;AAED,6DAA6D;AAC7D,qEAAqE;AACrE,wBAAgB,qBAAqB,CAAC,GAAG,SAAS,MAAM,WAAW,EACjE,GAAG,EAAE,GAAG,GACP,WAAW,CAAC,GAAG,CAAC,GAAG,SAAS,CAO9B;AAMD,wBAAgB,yBAAyB,kCAExC;AAED,wBAAgB,sBAAsB,0BAErC;AAED,wBAAgB,gBAAgB,YAE/B;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,IAAI,MAAM,WAAW,CAE1E;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,IAAI,MAAM,WAAW,CAE1E;AAMD,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CA6C5E;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,OAAO,QAQvD;AAGD,wBAAgB,iBAAiB,CAAC,GAAG,SAAS,MAAM,WAAW,EAC7D,SAAS,EAAE,MAAM,WAAW,EAC5B,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC,GACtB,OAAO,CAAC,SAAS,GAAG,MAAM,CAAC,CAoD7B"}
package/dist/utils.js CHANGED
@@ -26,7 +26,7 @@ var globs = require('../external/@socketsecurity/registry/lib/globs');
26
26
 
27
27
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
28
28
  const sensitiveConfigKeyLookup = new Set(['apiToken']);
29
- const supportedConfig = new Map([['apiBaseUrl', 'Base URL of the API endpoint'], ['apiProxy', 'A proxy through which to access the API'], ['apiToken', 'The API token required to access most API endpoints'], ['defaultOrg', 'The default org slug to use; usually the org your API token has access to. When set, all orgSlug arguments are implied to be this value.'], ['enforcedOrgs', 'Orgs in this list have their security policies enforced on this machine'], ['skipAskToPersistDefaultOrg', 'This flag prevents the CLI from asking you to persist the org slug when you selected one interactively'], ['org', 'Alias for defaultOrg']]);
29
+ const supportedConfig = new Map([['apiBaseUrl', 'Base URL of the Socket API endpoint'], ['apiProxy', 'A proxy through which to access the Socket API'], ['apiToken', 'The Socket API token required to access most Socket API endpoints'], ['defaultOrg', 'The default org slug to use; usually the org your Socket API token has access to. When set, all orgSlug arguments are implied to be this value.'], ['enforcedOrgs', 'Orgs in this list have their security policies enforced on this machine'], ['skipAskToPersistDefaultOrg', 'This flag prevents the Socket CLI from asking you to persist the org slug when you selected one interactively'], ['org', 'Alias for defaultOrg']]);
30
30
  const supportedConfigEntries = [...supportedConfig.entries()].sort((a, b) => sorts.naturalCompare(a[0], b[0]));
31
31
  const supportedConfigKeys = supportedConfigEntries.map(p => p[0]);
32
32
  function getConfigValues() {
@@ -189,7 +189,7 @@ function overrideCachedConfig(jsonConfig) {
189
189
  };
190
190
  }
191
191
  function overrideConfigApiToken(apiToken) {
192
- require$$6.debugFn('notice', 'override: API token (not stored)');
192
+ require$$6.debugFn('notice', 'override: Socket API token (not stored)');
193
193
  // Set token to the local cached config and mark it read-only so it doesn't persist.
194
194
  _cachedConfig = {
195
195
  ...vendor.configExports,
@@ -288,7 +288,7 @@ const {
288
288
  length: TOKEN_PREFIX_LENGTH
289
289
  } = TOKEN_PREFIX;
290
290
 
291
- // The API server that should be used for operations.
291
+ // The Socket API server that should be used for operations.
292
292
  function getDefaultApiBaseUrl$1() {
293
293
  const baseUrl =
294
294
  // Lazily access constants.ENV.SOCKET_CLI_API_BASE_URL.
@@ -296,7 +296,7 @@ function getDefaultApiBaseUrl$1() {
296
296
  return isUrl(baseUrl) ? baseUrl : undefined;
297
297
  }
298
298
 
299
- // The API server that should be used for operations.
299
+ // The Socket API server that should be used for operations.
300
300
  function getDefaultProxyUrl() {
301
301
  const apiProxy =
302
302
  // Lazily access constants.ENV.SOCKET_CLI_API_PROXY.
@@ -314,7 +314,7 @@ function isUrl(value) {
314
314
  return false;
315
315
  }
316
316
 
317
- // This API key should be stored globally for the duration of the CLI execution.
317
+ // This Socket API token should be stored globally for the duration of the CLI execution.
318
318
  let _defaultToken;
319
319
  function getDefaultToken() {
320
320
  // Lazily access constants.ENV.SOCKET_CLI_NO_API_TOKEN.
@@ -352,7 +352,7 @@ async function setupSdk(options) {
352
352
  } = opts;
353
353
  if (typeof apiToken !== 'string' && vendor.isInteractiveExports()) {
354
354
  apiToken = await prompts.password({
355
- message: 'Enter your Socket.dev API key (not saved, use socket login to persist)'
355
+ message: 'Enter your Socket.dev API token (not saved, use socket login to persist)'
356
356
  });
357
357
  _defaultToken = apiToken;
358
358
  }
@@ -360,7 +360,7 @@ async function setupSdk(options) {
360
360
  return {
361
361
  ok: false,
362
362
  message: 'Auth Error',
363
- cause: 'You need to provide an API Token. Run `socket login` first.'
363
+ cause: 'You need to provide an API token. Run `socket login` first.'
364
364
  };
365
365
  }
366
366
  let {
@@ -411,7 +411,7 @@ async function handleApiCall(value, options) {
411
411
  sdkResult = await value;
412
412
  spinner?.stop();
413
413
  if (desc) {
414
- const message = `Received API response (after requesting ${desc}).`;
414
+ const message = `Received Socket API response (after requesting ${desc}).`;
415
415
  if (sdkResult.success) {
416
416
  logger.logger.success(message);
417
417
  } else {
@@ -424,7 +424,7 @@ async function handleApiCall(value, options) {
424
424
  logger.logger.fail(`An error was thrown while requesting ${desc}`);
425
425
  require$$6.debugFn('error', `caught: ${desc} error`);
426
426
  } else {
427
- require$$6.debugFn('error', `caught: API request error`);
427
+ require$$6.debugFn('error', `caught: Socket API request error`);
428
428
  }
429
429
  require$$6.debugDir('inspect', {
430
430
  error: e
@@ -516,7 +516,7 @@ async function getErrorMessageForHttpStatusCode(code) {
516
516
  return 'One of the options passed might be incorrect';
517
517
  }
518
518
  if (code === 403 || code === 401) {
519
- return 'Your API token may not have the required permissions for this command or you might be trying to access (data from) an organization that is not linked to the API key you are logged in with';
519
+ return 'Your Socket API token may not have the required permissions for this command or you might be trying to access (data from) an organization that is not linked to the API token you are logged in with';
520
520
  }
521
521
  if (code === 404) {
522
522
  return 'The requested Socket API endpoint was not found (404) or there was no result for the requested parameters. If unexpected, this could be a temporary problem caused by an incident or a bug in the CLI. If the problem persists please let us know.';
@@ -527,7 +527,7 @@ async function getErrorMessageForHttpStatusCode(code) {
527
527
  return `Server responded with status code ${code}`;
528
528
  }
529
529
 
530
- // The API server that should be used for operations.
530
+ // The Socket API server that should be used for operations.
531
531
  function getDefaultApiBaseUrl() {
532
532
  const baseUrl =
533
533
  // Lazily access constants.ENV.SOCKET_CLI_API_BASE_URL.
@@ -557,7 +557,7 @@ async function queryApiSafeText(path, fetchSpinnerDesc) {
557
557
  return {
558
558
  ok: false,
559
559
  message: 'Authentication Error',
560
- cause: 'User must be authenticated to run this command. To log in, run the command `socket login` and enter your API key.'
560
+ cause: 'User must be authenticated to run this command. To log in, run the command `socket login` and enter your Socket API token.'
561
561
  };
562
562
  }
563
563
 
@@ -572,7 +572,7 @@ async function queryApiSafeText(path, fetchSpinnerDesc) {
572
572
  try {
573
573
  result = await queryApi(path, apiToken);
574
574
  if (fetchSpinnerDesc) {
575
- spinner.successAndStop(`Received API response (after requesting ${fetchSpinnerDesc}).`);
575
+ spinner.successAndStop(`Received Socket API response (after requesting ${fetchSpinnerDesc}).`);
576
576
  }
577
577
  } catch (e) {
578
578
  if (fetchSpinnerDesc) {
@@ -1044,7 +1044,7 @@ async function meowWithSubcommands(subcommands, options) {
1044
1044
  out.push('');
1045
1045
  out.push(' Main commands');
1046
1046
  out.push('');
1047
- out.push(' socket login Setup the CLI with an API Token and defaults');
1047
+ out.push(' socket login Setup the Socket CLI with an API token and defaults');
1048
1048
  out.push(' socket scan create Create a new Scan and report');
1049
1049
  out.push(' socket npm/eslint@1.0.0 Request the security score of a particular package');
1050
1050
  out.push(' socket ci Shorthand for CI; socket scan create --report --no-interactive');
@@ -1365,7 +1365,7 @@ async function determineOrgSlug(orgFlag, interactive, dryRun) {
1365
1365
  let orgSlug = String(orgFlag || defaultOrgSlug || '');
1366
1366
  if (!orgSlug) {
1367
1367
  if (!interactive) {
1368
- logger.logger.warn('Note: This command requires an org slug because the remote API endpoint does.');
1368
+ logger.logger.warn('Note: This command requires an org slug because the remote Socket API endpoint does.');
1369
1369
  logger.logger.warn('');
1370
1370
  logger.logger.warn('It seems no default org was setup and the `--org` flag was not used.');
1371
1371
  logger.logger.warn("Additionally, `--no-interactive` was set so we can't ask for it.");
@@ -1428,7 +1428,7 @@ async function getDefaultOrgSlug() {
1428
1428
  return {
1429
1429
  ok: false,
1430
1430
  message: 'Failed to establish identity',
1431
- data: `No organization associated with the API token. Unable to continue.`
1431
+ data: `No organization associated with the Socket API token. Unable to continue.`
1432
1432
  };
1433
1433
  }
1434
1434
  const slug = organizations[keys[0]]?.name ?? undefined;
@@ -3876,5 +3876,5 @@ exports.tildify = tildify;
3876
3876
  exports.updateConfigValue = updateConfigValue;
3877
3877
  exports.walkNestedMap = walkNestedMap;
3878
3878
  exports.writeSocketJson = writeSocketJson;
3879
- //# debugId=33d7d9ed-c114-4c4b-a303-2eb7edbe3fb3
3879
+ //# debugId=a8f49554-8fe7-44da-98ac-f1fce824b07c
3880
3880
  //# sourceMappingURL=utils.js.map