socket 1.1.26 → 1.1.27
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/CHANGELOG.md +5 -0
- package/dist/cli.js +42 -25
- 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/cmd-fix.d.mts.map +1 -1
- package/dist/types/commands/fix/coana-fix.d.mts.map +1 -1
- package/dist/types/commands/fix/handle-fix.d.mts +1 -4
- package/dist/types/commands/fix/handle-fix.d.mts.map +1 -1
- package/dist/types/commands/fix/types.d.mts +4 -3
- package/dist/types/commands/fix/types.d.mts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
6
|
|
|
7
|
+
## [1.1.27](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.27) - 2025-11-12
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- Backported `--exclude` and `--include` flags for `socket fix` command from v2
|
|
11
|
+
|
|
7
12
|
## [1.1.26](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.26) - 2025-11-08
|
|
8
13
|
|
|
9
14
|
### Added
|
package/dist/cli.js
CHANGED
|
@@ -3559,8 +3559,9 @@ async function coanaFix(fixConfig) {
|
|
|
3559
3559
|
autopilot,
|
|
3560
3560
|
cwd,
|
|
3561
3561
|
disableMajorUpdates,
|
|
3562
|
+
exclude,
|
|
3562
3563
|
ghsas,
|
|
3563
|
-
|
|
3564
|
+
include,
|
|
3564
3565
|
limit,
|
|
3565
3566
|
minimumReleaseAge,
|
|
3566
3567
|
orgSlug,
|
|
@@ -3630,7 +3631,7 @@ async function coanaFix(fixConfig) {
|
|
|
3630
3631
|
}
|
|
3631
3632
|
};
|
|
3632
3633
|
}
|
|
3633
|
-
const fixCResult = await utils.spawnCoanaDlx(['compute-fixes-and-upgrade-purls', cwd, '--manifests-tar-hash', tarHash, '--apply-fixes-to', ...(isAll ? ['all'] : ghsas), ...(fixConfig.rangeStyle ? ['--range-style', fixConfig.rangeStyle] : []), ...(minimumReleaseAge ? ['--minimum-release-age', minimumReleaseAge] : []), ...(
|
|
3634
|
+
const fixCResult = await utils.spawnCoanaDlx(['compute-fixes-and-upgrade-purls', cwd, '--manifests-tar-hash', tarHash, '--apply-fixes-to', ...(isAll ? ['all'] : ghsas), ...(fixConfig.rangeStyle ? ['--range-style', fixConfig.rangeStyle] : []), ...(minimumReleaseAge ? ['--minimum-release-age', minimumReleaseAge] : []), ...(include.length ? ['--include', ...include] : []), ...(exclude.length ? ['--exclude', ...exclude] : []), ...(!applyFixes ? [constants.FLAG_DRY_RUN] : []), ...(outputFile ? ['--output-file', outputFile] : []), ...(disableMajorUpdates ? ['--disable-major-updates'] : []), ...(showAffectedDirectDependencies ? ['--show-affected-direct-dependencies'] : []), ...fixConfig.unknownFlags], fixConfig.orgSlug, {
|
|
3634
3635
|
cwd,
|
|
3635
3636
|
spinner,
|
|
3636
3637
|
stdio: 'inherit'
|
|
@@ -3665,7 +3666,7 @@ async function coanaFix(fixConfig) {
|
|
|
3665
3666
|
const shouldSpawnCoana = adjustedLimit > 0;
|
|
3666
3667
|
let ids;
|
|
3667
3668
|
if (shouldSpawnCoana && isAll) {
|
|
3668
|
-
const foundCResult = await utils.spawnCoanaDlx(['compute-fixes-and-upgrade-purls', cwd, '--manifests-tar-hash', tarHash, ...(fixConfig.rangeStyle ? ['--range-style', fixConfig.rangeStyle] : []), ...(minimumReleaseAge ? ['--minimum-release-age', minimumReleaseAge] : []), ...(
|
|
3669
|
+
const foundCResult = await utils.spawnCoanaDlx(['compute-fixes-and-upgrade-purls', cwd, '--manifests-tar-hash', tarHash, ...(fixConfig.rangeStyle ? ['--range-style', fixConfig.rangeStyle] : []), ...(minimumReleaseAge ? ['--minimum-release-age', minimumReleaseAge] : []), ...(include.length ? ['--include', ...include] : []), ...(exclude.length ? ['--exclude', ...exclude] : []), ...(disableMajorUpdates ? ['--disable-major-updates'] : []), ...(showAffectedDirectDependencies ? ['--show-affected-direct-dependencies'] : []), ...fixConfig.unknownFlags], fixConfig.orgSlug, {
|
|
3669
3670
|
cwd,
|
|
3670
3671
|
spinner
|
|
3671
3672
|
});
|
|
@@ -3707,7 +3708,7 @@ async function coanaFix(fixConfig) {
|
|
|
3707
3708
|
|
|
3708
3709
|
// Apply fix for single GHSA ID.
|
|
3709
3710
|
// eslint-disable-next-line no-await-in-loop
|
|
3710
|
-
const fixCResult = await utils.spawnCoanaDlx(['compute-fixes-and-upgrade-purls', cwd, '--manifests-tar-hash', tarHash, '--apply-fixes-to', ghsaId, ...(fixConfig.rangeStyle ? ['--range-style', fixConfig.rangeStyle] : []), ...(minimumReleaseAge ? ['--minimum-release-age', minimumReleaseAge] : []), ...(
|
|
3711
|
+
const fixCResult = await utils.spawnCoanaDlx(['compute-fixes-and-upgrade-purls', cwd, '--manifests-tar-hash', tarHash, '--apply-fixes-to', ghsaId, ...(fixConfig.rangeStyle ? ['--range-style', fixConfig.rangeStyle] : []), ...(minimumReleaseAge ? ['--minimum-release-age', minimumReleaseAge] : []), ...(include.length ? ['--include', ...include] : []), ...(exclude.length ? ['--exclude', ...exclude] : []), ...(disableMajorUpdates ? ['--disable-major-updates'] : []), ...(showAffectedDirectDependencies ? ['--show-affected-direct-dependencies'] : []), ...fixConfig.unknownFlags], fixConfig.orgSlug, {
|
|
3711
3712
|
cwd,
|
|
3712
3713
|
spinner,
|
|
3713
3714
|
stdio: 'inherit'
|
|
@@ -3921,8 +3922,9 @@ async function handleFix({
|
|
|
3921
3922
|
autopilot,
|
|
3922
3923
|
cwd,
|
|
3923
3924
|
disableMajorUpdates,
|
|
3925
|
+
exclude,
|
|
3924
3926
|
ghsas,
|
|
3925
|
-
|
|
3927
|
+
include,
|
|
3926
3928
|
limit,
|
|
3927
3929
|
minSatisfying,
|
|
3928
3930
|
minimumReleaseAge,
|
|
@@ -3937,14 +3939,16 @@ async function handleFix({
|
|
|
3937
3939
|
}) {
|
|
3938
3940
|
require$$9.debugFn('notice', `Starting fix command for ${orgSlug}`);
|
|
3939
3941
|
require$$9.debugDir('inspect', {
|
|
3942
|
+
applyFixes,
|
|
3940
3943
|
autopilot,
|
|
3941
3944
|
cwd,
|
|
3942
3945
|
disableMajorUpdates,
|
|
3946
|
+
exclude,
|
|
3943
3947
|
ghsas,
|
|
3944
|
-
|
|
3948
|
+
include,
|
|
3945
3949
|
limit,
|
|
3946
3950
|
minSatisfying,
|
|
3947
|
-
|
|
3951
|
+
minimumReleaseAge,
|
|
3948
3952
|
outputFile,
|
|
3949
3953
|
outputKind,
|
|
3950
3954
|
prCheck,
|
|
@@ -3953,21 +3957,22 @@ async function handleFix({
|
|
|
3953
3957
|
unknownFlags
|
|
3954
3958
|
});
|
|
3955
3959
|
await outputFixResult(await coanaFix({
|
|
3956
|
-
autopilot,
|
|
3957
3960
|
applyFixes,
|
|
3961
|
+
autopilot,
|
|
3958
3962
|
cwd,
|
|
3959
3963
|
disableMajorUpdates,
|
|
3960
|
-
|
|
3964
|
+
exclude,
|
|
3965
|
+
// Convert mixed CVE/GHSA/PURL inputs to GHSA IDs only.
|
|
3961
3966
|
ghsas: await convertIdsToGhsas(ghsas),
|
|
3962
|
-
|
|
3967
|
+
include,
|
|
3963
3968
|
limit,
|
|
3964
3969
|
minimumReleaseAge,
|
|
3965
3970
|
orgSlug,
|
|
3971
|
+
outputFile,
|
|
3966
3972
|
rangeStyle,
|
|
3967
3973
|
showAffectedDirectDependencies,
|
|
3968
3974
|
spinner,
|
|
3969
|
-
unknownFlags
|
|
3970
|
-
outputFile
|
|
3975
|
+
unknownFlags
|
|
3971
3976
|
}), outputKind);
|
|
3972
3977
|
}
|
|
3973
3978
|
|
|
@@ -3994,6 +3999,20 @@ const generalFlags$2 = {
|
|
|
3994
3999
|
// Hidden to allow custom documenting of the negated `--no-apply-fixes` variant.
|
|
3995
4000
|
hidden: true
|
|
3996
4001
|
},
|
|
4002
|
+
exclude: {
|
|
4003
|
+
type: 'string',
|
|
4004
|
+
default: [],
|
|
4005
|
+
description: 'Exclude workspaces matching these glob patterns. Can be provided as comma separated values or as multiple flags',
|
|
4006
|
+
isMultiple: true,
|
|
4007
|
+
hidden: false
|
|
4008
|
+
},
|
|
4009
|
+
include: {
|
|
4010
|
+
type: 'string',
|
|
4011
|
+
default: [],
|
|
4012
|
+
description: 'Include workspaces matching these glob patterns. Can be provided as comma separated values or as multiple flags',
|
|
4013
|
+
isMultiple: true,
|
|
4014
|
+
hidden: false
|
|
4015
|
+
},
|
|
3997
4016
|
majorUpdates: {
|
|
3998
4017
|
type: 'boolean',
|
|
3999
4018
|
default: true,
|
|
@@ -4051,12 +4070,6 @@ const hiddenFlags = {
|
|
|
4051
4070
|
...generalFlags$2['id'],
|
|
4052
4071
|
hidden: true
|
|
4053
4072
|
},
|
|
4054
|
-
glob: {
|
|
4055
|
-
type: 'string',
|
|
4056
|
-
default: '',
|
|
4057
|
-
description: 'Glob pattern to filter workspaces by',
|
|
4058
|
-
hidden: true
|
|
4059
|
-
},
|
|
4060
4073
|
maxSatisfying: {
|
|
4061
4074
|
type: 'boolean',
|
|
4062
4075
|
default: true,
|
|
@@ -4155,7 +4168,8 @@ async function run$K(argv, importMeta, {
|
|
|
4155
4168
|
const {
|
|
4156
4169
|
applyFixes,
|
|
4157
4170
|
autopilot,
|
|
4158
|
-
|
|
4171
|
+
exclude,
|
|
4172
|
+
include,
|
|
4159
4173
|
json,
|
|
4160
4174
|
limit,
|
|
4161
4175
|
majorUpdates,
|
|
@@ -4206,24 +4220,27 @@ async function run$K(argv, importMeta, {
|
|
|
4206
4220
|
spinner
|
|
4207
4221
|
} = constants.default;
|
|
4208
4222
|
const ghsas = arrays.arrayUnique([...utils.cmdFlagValueToArray(cli.flags['id']), ...utils.cmdFlagValueToArray(cli.flags['ghsa']), ...utils.cmdFlagValueToArray(cli.flags['purl'])]);
|
|
4223
|
+
const includePatterns = utils.cmdFlagValueToArray(include);
|
|
4224
|
+
const excludePatterns = utils.cmdFlagValueToArray(exclude);
|
|
4209
4225
|
await handleFix({
|
|
4210
|
-
autopilot,
|
|
4211
4226
|
applyFixes,
|
|
4227
|
+
autopilot,
|
|
4212
4228
|
cwd,
|
|
4213
4229
|
disableMajorUpdates,
|
|
4230
|
+
exclude: excludePatterns,
|
|
4214
4231
|
ghsas,
|
|
4215
|
-
|
|
4232
|
+
include: includePatterns,
|
|
4216
4233
|
limit,
|
|
4217
4234
|
minimumReleaseAge,
|
|
4218
4235
|
minSatisfying,
|
|
4219
|
-
prCheck,
|
|
4220
4236
|
orgSlug,
|
|
4237
|
+
outputFile,
|
|
4221
4238
|
outputKind,
|
|
4239
|
+
prCheck,
|
|
4222
4240
|
rangeStyle,
|
|
4223
4241
|
showAffectedDirectDependencies,
|
|
4224
4242
|
spinner,
|
|
4225
|
-
unknownFlags
|
|
4226
|
-
outputFile
|
|
4243
|
+
unknownFlags
|
|
4227
4244
|
});
|
|
4228
4245
|
}
|
|
4229
4246
|
|
|
@@ -15043,5 +15060,5 @@ void (async () => {
|
|
|
15043
15060
|
await utils.captureException(e);
|
|
15044
15061
|
}
|
|
15045
15062
|
})();
|
|
15046
|
-
//# debugId=
|
|
15063
|
+
//# debugId=ede65737-8f7f-42fe-be24-d7339a0b3189
|
|
15047
15064
|
//# sourceMappingURL=cli.js.map
|