socket 1.0.83 → 1.0.84
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 +31 -17
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +3 -3
- package/dist/constants.js.map +1 -1
- package/dist/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/types/commands/fix/npm-fix.d.mts.map +1 -1
- package/dist/utils.js +7 -7
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1047,15 +1047,15 @@ async function fetchScanData(orgSlug, scanId, options) {
|
|
|
1047
1047
|
updateScan('failure; unknown blocking error occurred');
|
|
1048
1048
|
return {
|
|
1049
1049
|
ok: false,
|
|
1050
|
-
message: '
|
|
1051
|
-
cause: `
|
|
1050
|
+
message: 'Socket API error',
|
|
1051
|
+
cause: `Error requesting scan: ${e?.message || '(no error message found)'}${e?.cause ? ` (cause: ${e.cause})` : ''}`
|
|
1052
1052
|
};
|
|
1053
1053
|
}), fetchSecurityPolicy().catch(e => {
|
|
1054
1054
|
updatePolicy('failure; unknown blocking error occurred');
|
|
1055
1055
|
return {
|
|
1056
1056
|
ok: false,
|
|
1057
|
-
message: '
|
|
1058
|
-
cause: `
|
|
1057
|
+
message: 'Socket API error',
|
|
1058
|
+
cause: `Error requesting policy: ${e?.message || '(no error message found)'}${e?.cause ? ` (cause: ${e.cause})` : ''}`
|
|
1059
1059
|
};
|
|
1060
1060
|
})]).finally(() => {
|
|
1061
1061
|
finishedFetching = true;
|
|
@@ -4318,25 +4318,39 @@ async function npmFix(pkgEnvDetails, fixConfig) {
|
|
|
4318
4318
|
if (purls.length) {
|
|
4319
4319
|
alertsMap = await utils.getAlertsMapFromPurls(purls, getFixAlertsMapOptions());
|
|
4320
4320
|
} else {
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4321
|
+
let arb;
|
|
4322
|
+
try {
|
|
4323
|
+
arb = new shadowNpmInject.Arborist({
|
|
4324
|
+
path: pkgEnvDetails.pkgPath,
|
|
4325
|
+
...flatConfig,
|
|
4326
|
+
...shadowNpmInject.SAFE_WITH_SAVE_ARBORIST_REIFY_OPTIONS_OVERRIDES
|
|
4327
|
+
});
|
|
4328
|
+
// Calling arb.reify() creates the arb.diff object, nulls-out arb.idealTree,
|
|
4329
|
+
// and populates arb.actualTree.
|
|
4330
|
+
actualTree = await arb.reify();
|
|
4331
|
+
} catch (e) {
|
|
4332
|
+
spinner?.stop();
|
|
4333
|
+
require$$6.debugFn('error', 'caught: await arb.reify() error');
|
|
4334
|
+
require$$6.debugDir('inspect', {
|
|
4335
|
+
error: e
|
|
4336
|
+
});
|
|
4337
|
+
return {
|
|
4338
|
+
ok: false,
|
|
4339
|
+
message: 'Arborist error',
|
|
4340
|
+
cause: e?.message || 'Unknown Arborist error.'
|
|
4341
|
+
};
|
|
4342
|
+
}
|
|
4329
4343
|
alertsMap = await shadowNpmInject.getAlertsMapFromArborist(arb, getFixAlertsMapOptions());
|
|
4330
4344
|
}
|
|
4331
4345
|
} catch (e) {
|
|
4332
4346
|
spinner?.stop();
|
|
4333
|
-
require$$6.debugFn('error', 'caught: PURL API');
|
|
4347
|
+
require$$6.debugFn('error', 'caught: Socket batch PURL API error');
|
|
4334
4348
|
require$$6.debugDir('inspect', {
|
|
4335
4349
|
error: e
|
|
4336
4350
|
});
|
|
4337
4351
|
return {
|
|
4338
4352
|
ok: false,
|
|
4339
|
-
message: 'API
|
|
4353
|
+
message: 'Socket API error',
|
|
4340
4354
|
cause: e?.message || 'Unknown Socket batch PURL API error.'
|
|
4341
4355
|
};
|
|
4342
4356
|
}
|
|
@@ -4527,13 +4541,13 @@ async function pnpmFix(pkgEnvDetails, fixConfig) {
|
|
|
4527
4541
|
alertsMap = purls.length ? await utils.getAlertsMapFromPurls(purls, getFixAlertsMapOptions()) : await utils.getAlertsMapFromPnpmLockfile(lockfile, getFixAlertsMapOptions());
|
|
4528
4542
|
} catch (e) {
|
|
4529
4543
|
spinner?.stop();
|
|
4530
|
-
require$$6.debugFn('error', 'caught: PURL API');
|
|
4544
|
+
require$$6.debugFn('error', 'caught: Socket batch PURL API error');
|
|
4531
4545
|
require$$6.debugDir('inspect', {
|
|
4532
4546
|
error: e
|
|
4533
4547
|
});
|
|
4534
4548
|
return {
|
|
4535
4549
|
ok: false,
|
|
4536
|
-
message: 'API
|
|
4550
|
+
message: 'Socket API error',
|
|
4537
4551
|
cause: e?.message || 'Unknown Socket batch PURL API error.'
|
|
4538
4552
|
};
|
|
4539
4553
|
}
|
|
@@ -14670,5 +14684,5 @@ void (async () => {
|
|
|
14670
14684
|
await utils.captureException(e);
|
|
14671
14685
|
}
|
|
14672
14686
|
})();
|
|
14673
|
-
//# debugId=
|
|
14687
|
+
//# debugId=537e02e0-17da-42ea-8417-fef153f5f5ca
|
|
14674
14688
|
//# sourceMappingURL=cli.js.map
|