@socketsecurity/cli-with-sentry 1.0.58 → 1.0.59

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
@@ -3716,6 +3716,7 @@ async function agentFix(pkgEnvDetails, actualTree, alertsMap, installer, {
3716
3716
  };
3717
3717
  const handleInstallFail = () => {
3718
3718
  cleanupInfoEntriesLoop();
3719
+ spinner?.stop();
3719
3720
  return {
3720
3721
  ok: false,
3721
3722
  message: 'Install failed',
@@ -4119,6 +4120,9 @@ async function install$1(pkgEnvDetails, options) {
4119
4120
  const args = ['--ignore-scripts', '--no-audit', '--no-fund', '--no-progress', '--no-save', '--silent', ...(extraArgs ?? [])];
4120
4121
  const quotedCmd = `\`${pkgEnvDetails.agent} install ${args.join(' ')}\``;
4121
4122
  debug.debugFn('stdio', `spawn: ${quotedCmd}`);
4123
+ const isSpinning = spinner?.isSpinning;
4124
+ spinner?.stop();
4125
+ let errored = false;
4122
4126
  try {
4123
4127
  await utils.runAgentInstall(pkgEnvDetails, {
4124
4128
  args,
@@ -4130,17 +4134,23 @@ async function install$1(pkgEnvDetails, options) {
4130
4134
  debug.debugDir('inspect', {
4131
4135
  error: e
4132
4136
  });
4133
- return null;
4137
+ errored = true;
4134
4138
  }
4135
- try {
4136
- return await getActualTree(cwd);
4137
- } catch (e) {
4138
- debug.debugFn('error', 'caught: Arborist error');
4139
- debug.debugDir('inspect', {
4140
- error: e
4141
- });
4139
+ let actualTree = null;
4140
+ if (!errored) {
4141
+ try {
4142
+ actualTree = await getActualTree(cwd);
4143
+ } catch (e) {
4144
+ debug.debugFn('error', 'caught: Arborist error');
4145
+ debug.debugDir('inspect', {
4146
+ error: e
4147
+ });
4148
+ }
4142
4149
  }
4143
- return null;
4150
+ if (isSpinning) {
4151
+ spinner.start();
4152
+ }
4153
+ return actualTree;
4144
4154
  }
4145
4155
  async function npmFix(pkgEnvDetails, fixConfig) {
4146
4156
  const {
@@ -4262,6 +4272,9 @@ async function install(pkgEnvDetails, options) {
4262
4272
  '--config.confirmModulesPurge=false', ...(extraArgs ?? [])];
4263
4273
  const quotedCmd = `\`${pkgEnvDetails.agent} install ${args.join(' ')}\``;
4264
4274
  debug.debugFn('stdio', `spawn: ${quotedCmd}`);
4275
+ const isSpinning = spinner?.isSpinning;
4276
+ spinner?.stop();
4277
+ let errored = false;
4265
4278
  try {
4266
4279
  await utils.runAgentInstall(pkgEnvDetails, {
4267
4280
  args,
@@ -4273,17 +4286,23 @@ async function install(pkgEnvDetails, options) {
4273
4286
  debug.debugDir('inspect', {
4274
4287
  error: e
4275
4288
  });
4276
- return null;
4289
+ errored = true;
4277
4290
  }
4278
- try {
4279
- return await getActualTree(cwd);
4280
- } catch (e) {
4281
- debug.debugFn('error', 'caught: Arborist error');
4282
- debug.debugDir('inspect', {
4283
- error: e
4284
- });
4291
+ let actualTree = null;
4292
+ if (!errored) {
4293
+ try {
4294
+ actualTree = await getActualTree(cwd);
4295
+ } catch (e) {
4296
+ debug.debugFn('error', 'caught: Arborist error');
4297
+ debug.debugDir('inspect', {
4298
+ error: e
4299
+ });
4300
+ }
4285
4301
  }
4286
- return null;
4302
+ if (isSpinning) {
4303
+ spinner.start();
4304
+ }
4305
+ return actualTree;
4287
4306
  }
4288
4307
  async function pnpmFix(pkgEnvDetails, fixConfig) {
4289
4308
  const {
@@ -7520,7 +7539,7 @@ async function updateLockfile(pkgEnvDetails, options) {
7520
7539
  __proto__: null,
7521
7540
  ...options
7522
7541
  };
7523
- const isSpinning = !!spinner?.['isSpinning'];
7542
+ const isSpinning = !!spinner?.isSpinning;
7524
7543
  if (!isSpinning) {
7525
7544
  spinner?.start();
7526
7545
  }
@@ -14191,5 +14210,5 @@ void (async () => {
14191
14210
  await utils.captureException(e);
14192
14211
  }
14193
14212
  })();
14194
- //# debugId=1ea5a8dd-5995-4b46-91ba-648181473483
14213
+ //# debugId=b9685bcd-e040-4012-90f5-54b3bfba5ba0
14195
14214
  //# sourceMappingURL=cli.js.map