@socketsecurity/cli-with-sentry 0.14.152 → 0.14.153
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/.config/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/cli.js +31 -12
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +3 -3
- package/dist/constants.js.map +1 -1
- package/dist/shadow-npm-inject.js +1 -2
- package/dist/shadow-npm-inject.js.map +1 -1
- package/dist/types/commands/fix/npm-fix.d.mts.map +1 -1
- package/dist/types/commands/fix/pnpm-fix.d.mts.map +1 -1
- package/dist/types/commands/organization/output-license-policy.d.mts.map +1 -1
- package/dist/types/utils/socket-package-alert.d.mts.map +1 -1
- package/dist/vendor.js +74 -19
- package/dist/vendor.js.map +1 -1
- package/external/@socketsecurity/registry/lib/packages.d.ts +6 -2
- package/external/@socketsecurity/registry/lib/packages.js +192 -139
- package/external/@socketsecurity/registry/package.json +1 -1
- package/package.json +5 -5
package/dist/cli.js
CHANGED
|
@@ -4602,13 +4602,19 @@ async function npmFix(
|
|
|
4602
4602
|
}
|
|
4603
4603
|
const revertData = {
|
|
4604
4604
|
...(editablePkgJson.content.dependencies && {
|
|
4605
|
-
dependencies:
|
|
4605
|
+
dependencies: {
|
|
4606
|
+
...editablePkgJson.content.dependencies
|
|
4607
|
+
}
|
|
4606
4608
|
}),
|
|
4607
4609
|
...(editablePkgJson.content.optionalDependencies && {
|
|
4608
|
-
optionalDependencies:
|
|
4610
|
+
optionalDependencies: {
|
|
4611
|
+
...editablePkgJson.content.optionalDependencies
|
|
4612
|
+
}
|
|
4609
4613
|
}),
|
|
4610
4614
|
...(editablePkgJson.content.peerDependencies && {
|
|
4611
|
-
peerDependencies:
|
|
4615
|
+
peerDependencies: {
|
|
4616
|
+
...editablePkgJson.content.peerDependencies
|
|
4617
|
+
}
|
|
4612
4618
|
})
|
|
4613
4619
|
}
|
|
4614
4620
|
shadowNpmInject.updateNode(node, newVersion, newVersionPackument)
|
|
@@ -4620,7 +4626,11 @@ async function npmFix(
|
|
|
4620
4626
|
rangeStyle
|
|
4621
4627
|
)
|
|
4622
4628
|
// eslint-disable-next-line no-await-in-loop
|
|
4623
|
-
if (
|
|
4629
|
+
if (
|
|
4630
|
+
!(await editablePkgJson.save({
|
|
4631
|
+
ignoreWhitespace: true
|
|
4632
|
+
}))
|
|
4633
|
+
) {
|
|
4624
4634
|
debug.debugLog(
|
|
4625
4635
|
`Nothing changed for ${workspaceName}, skipping install`
|
|
4626
4636
|
)
|
|
@@ -4938,7 +4948,6 @@ async function pnpmFix(
|
|
|
4938
4948
|
const infoByPkg = shadowNpmInject.getCveInfoByAlertsMap(alertsMap, {
|
|
4939
4949
|
limit
|
|
4940
4950
|
})
|
|
4941
|
-
console.log(infoByPkg)
|
|
4942
4951
|
if (!infoByPkg) {
|
|
4943
4952
|
spinner?.stop()
|
|
4944
4953
|
logger.logger.info('No fixable vulnerabilities found.')
|
|
@@ -5077,13 +5086,19 @@ async function pnpmFix(
|
|
|
5077
5086
|
}
|
|
5078
5087
|
: {}),
|
|
5079
5088
|
...(editablePkgJson.content.dependencies && {
|
|
5080
|
-
dependencies:
|
|
5089
|
+
dependencies: {
|
|
5090
|
+
...editablePkgJson.content.dependencies
|
|
5091
|
+
}
|
|
5081
5092
|
}),
|
|
5082
5093
|
...(editablePkgJson.content.optionalDependencies && {
|
|
5083
|
-
optionalDependencies:
|
|
5094
|
+
optionalDependencies: {
|
|
5095
|
+
...editablePkgJson.content.optionalDependencies
|
|
5096
|
+
}
|
|
5084
5097
|
}),
|
|
5085
5098
|
...(editablePkgJson.content.peerDependencies && {
|
|
5086
|
-
peerDependencies:
|
|
5099
|
+
peerDependencies: {
|
|
5100
|
+
...editablePkgJson.content.peerDependencies
|
|
5101
|
+
}
|
|
5087
5102
|
})
|
|
5088
5103
|
}
|
|
5089
5104
|
if (updateData) {
|
|
@@ -5097,7 +5112,11 @@ async function pnpmFix(
|
|
|
5097
5112
|
rangeStyle
|
|
5098
5113
|
)
|
|
5099
5114
|
// eslint-disable-next-line no-await-in-loop
|
|
5100
|
-
if (
|
|
5115
|
+
if (
|
|
5116
|
+
!(await editablePkgJson.save({
|
|
5117
|
+
ignoreWhitespace: true
|
|
5118
|
+
}))
|
|
5119
|
+
) {
|
|
5101
5120
|
debug.debugLog(
|
|
5102
5121
|
`Nothing changed for ${workspaceName}, skipping install`
|
|
5103
5122
|
)
|
|
@@ -8569,11 +8588,11 @@ async function outputLicensePolicy(result, outputKind) {
|
|
|
8569
8588
|
logger.logger.log('')
|
|
8570
8589
|
logger.logger.log('This is the license policy for your organization:')
|
|
8571
8590
|
logger.logger.log('')
|
|
8572
|
-
const rules = result.data
|
|
8591
|
+
const rules = result.data['license_policy']
|
|
8573
8592
|
const entries = rules ? Object.entries(rules) : []
|
|
8574
8593
|
const mapped = entries.map(([key, value]) => [
|
|
8575
8594
|
key,
|
|
8576
|
-
value
|
|
8595
|
+
value?.['allowed'] ? ' yes' : ' no'
|
|
8577
8596
|
])
|
|
8578
8597
|
mapped.sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0))
|
|
8579
8598
|
logger.logger.log(mdTableOfPairs(mapped, ['License Name', 'Allowed']))
|
|
@@ -13387,5 +13406,5 @@ void (async () => {
|
|
|
13387
13406
|
await shadowNpmInject.captureException(e)
|
|
13388
13407
|
}
|
|
13389
13408
|
})()
|
|
13390
|
-
//# debugId=
|
|
13409
|
+
//# debugId=a3d4578d-d282-43c9-a0a8-92f02a4c7983
|
|
13391
13410
|
//# sourceMappingURL=cli.js.map
|