@socketsecurity/cli-with-sentry 1.0.35 → 1.0.36
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
|
@@ -4037,6 +4037,8 @@ async function agentFix(pkgEnvDetails, actualTree, alertsMap, installer, {
|
|
|
4037
4037
|
continue infosLoop;
|
|
4038
4038
|
}
|
|
4039
4039
|
|
|
4040
|
+
// eslint-disable-next-line no-await-in-loop
|
|
4041
|
+
const pkgJsonSrc = await fs$1.promises.readFile(editablePkgJson.filename, 'utf8');
|
|
4040
4042
|
// eslint-disable-next-line no-await-in-loop
|
|
4041
4043
|
const lockSrc = await utils.readLockfile(pkgEnvDetails.lockPath);
|
|
4042
4044
|
if (!hasAnnouncedWorkspace) {
|
|
@@ -4081,9 +4083,7 @@ async function agentFix(pkgEnvDetails, actualTree, alertsMap, installer, {
|
|
|
4081
4083
|
if (!errored && fixEnv.isCi && fixEnv.repoInfo) {
|
|
4082
4084
|
// Rewrite files in case the install reverted them.
|
|
4083
4085
|
// eslint-disable-next-line no-await-in-loop
|
|
4084
|
-
await editablePkgJson.
|
|
4085
|
-
ignoreWhitespace: true
|
|
4086
|
-
});
|
|
4086
|
+
await fs$1.promises.writeFile(editablePkgJson.filename, pkgJsonSrc, 'utf8');
|
|
4087
4087
|
// eslint-disable-next-line no-await-in-loop
|
|
4088
4088
|
await fs$1.promises.writeFile(pkgEnvDetails.lockPath, lockSrc, 'utf8');
|
|
4089
4089
|
try {
|
|
@@ -4267,17 +4267,16 @@ async function npmFix(pkgEnvDetails, fixConfig) {
|
|
|
4267
4267
|
spinner
|
|
4268
4268
|
} = fixConfig;
|
|
4269
4269
|
spinner?.start();
|
|
4270
|
-
|
|
4270
|
+
const flatConfig = await utils.getNpmConfig({
|
|
4271
|
+
npmVersion: pkgEnvDetails.agentVersion
|
|
4272
|
+
});
|
|
4271
4273
|
let actualTree;
|
|
4272
4274
|
let alertsMap;
|
|
4273
4275
|
try {
|
|
4274
4276
|
if (purls.length) {
|
|
4275
4277
|
alertsMap = await utils.getAlertsMapFromPurls(purls, getFixAlertsMapOptions());
|
|
4276
4278
|
} else {
|
|
4277
|
-
const
|
|
4278
|
-
npmVersion: pkgEnvDetails.agentVersion
|
|
4279
|
-
});
|
|
4280
|
-
arb = new shadowNpmInject.Arborist({
|
|
4279
|
+
const arb = new shadowNpmInject.Arborist({
|
|
4281
4280
|
path: pkgEnvDetails.pkgPath,
|
|
4282
4281
|
...flatConfig
|
|
4283
4282
|
});
|
|
@@ -4318,6 +4317,10 @@ async function npmFix(pkgEnvDetails, fixConfig) {
|
|
|
4318
4317
|
}
|
|
4319
4318
|
})
|
|
4320
4319
|
};
|
|
4320
|
+
const arb = new shadowNpmInject.Arborist({
|
|
4321
|
+
path: pkgEnvDetails.pkgPath,
|
|
4322
|
+
...flatConfig
|
|
4323
|
+
});
|
|
4321
4324
|
const idealTree = await arb.buildIdealTree();
|
|
4322
4325
|
const node = shadowNpmInject.findPackageNode(idealTree, packument.name, oldVersion);
|
|
4323
4326
|
if (node) {
|
|
@@ -14263,5 +14266,5 @@ void (async () => {
|
|
|
14263
14266
|
await utils.captureException(e);
|
|
14264
14267
|
}
|
|
14265
14268
|
})();
|
|
14266
|
-
//# debugId=
|
|
14269
|
+
//# debugId=de722ff7-23df-4530-81e3-f05cc7c7a02e
|
|
14267
14270
|
//# sourceMappingURL=cli.js.map
|