socket 1.1.23 → 1.1.24

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
@@ -3550,6 +3550,7 @@ async function coanaFix(fixConfig) {
3550
3550
  ghsas,
3551
3551
  glob,
3552
3552
  limit,
3553
+ minimumReleaseAge,
3553
3554
  orgSlug,
3554
3555
  outputFile,
3555
3556
  spinner
@@ -3616,7 +3617,7 @@ async function coanaFix(fixConfig) {
3616
3617
  }
3617
3618
  };
3618
3619
  }
3619
- 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] : []), ...(glob ? ['--glob', glob] : []), ...(!applyFixes ? [constants.FLAG_DRY_RUN] : []), ...(outputFile ? ['--output-file', outputFile] : []), ...fixConfig.unknownFlags], fixConfig.orgSlug, {
3620
+ 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] : []), ...(glob ? ['--glob', glob] : []), ...(!applyFixes ? [constants.FLAG_DRY_RUN] : []), ...(outputFile ? ['--output-file', outputFile] : []), ...fixConfig.unknownFlags], fixConfig.orgSlug, {
3620
3621
  cwd,
3621
3622
  spinner,
3622
3623
  stdio: 'inherit'
@@ -3651,7 +3652,7 @@ async function coanaFix(fixConfig) {
3651
3652
  const shouldSpawnCoana = adjustedLimit > 0;
3652
3653
  let ids;
3653
3654
  if (shouldSpawnCoana && isAll) {
3654
- const foundCResult = await utils.spawnCoanaDlx(['compute-fixes-and-upgrade-purls', cwd, '--manifests-tar-hash', tarHash, ...(fixConfig.rangeStyle ? ['--range-style', fixConfig.rangeStyle] : []), ...(glob ? ['--glob', glob] : []), ...fixConfig.unknownFlags], fixConfig.orgSlug, {
3655
+ 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] : []), ...(glob ? ['--glob', glob] : []), ...fixConfig.unknownFlags], fixConfig.orgSlug, {
3655
3656
  cwd,
3656
3657
  spinner
3657
3658
  });
@@ -3693,7 +3694,7 @@ async function coanaFix(fixConfig) {
3693
3694
 
3694
3695
  // Apply fix for single GHSA ID.
3695
3696
  // eslint-disable-next-line no-await-in-loop
3696
- 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] : []), ...(glob ? ['--glob', glob] : []), ...fixConfig.unknownFlags], fixConfig.orgSlug, {
3697
+ 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] : []), ...(glob ? ['--glob', glob] : []), ...fixConfig.unknownFlags], fixConfig.orgSlug, {
3697
3698
  cwd,
3698
3699
  spinner,
3699
3700
  stdio: 'inherit'
@@ -3910,6 +3911,7 @@ async function handleFix({
3910
3911
  glob,
3911
3912
  limit,
3912
3913
  minSatisfying,
3914
+ minimumReleaseAge,
3913
3915
  orgSlug,
3914
3916
  outputFile,
3915
3917
  outputKind,
@@ -3941,6 +3943,7 @@ async function handleFix({
3941
3943
  ghsas: await convertIdsToGhsas(ghsas),
3942
3944
  glob,
3943
3945
  limit,
3946
+ minimumReleaseAge,
3944
3947
  orgSlug,
3945
3948
  rangeStyle,
3946
3949
  spinner,
@@ -4001,6 +4004,11 @@ Available styles:
4001
4004
  type: 'string',
4002
4005
  default: '',
4003
4006
  description: 'Path to store upgrades as a JSON file at this path.'
4007
+ },
4008
+ minimumReleaseAge: {
4009
+ type: 'string',
4010
+ default: '',
4011
+ description: 'Set a minimum age requirement for suggested upgrade versions (e.g., 1h, 2d, 3w). A higher age requirement reduces the risk of upgrading to malicious versions. For example, setting the value to 1 week (1w) gives ecosystem maintainers one week to remove potentially malicious versions.'
4004
4012
  }
4005
4013
  };
4006
4014
  const hiddenFlags = {
@@ -4115,6 +4123,7 @@ async function run$K(argv, importMeta, {
4115
4123
  limit,
4116
4124
  markdown,
4117
4125
  maxSatisfying,
4126
+ minimumReleaseAge,
4118
4127
  outputFile,
4119
4128
  prCheck,
4120
4129
  rangeStyle,
@@ -4164,6 +4173,7 @@ async function run$K(argv, importMeta, {
4164
4173
  ghsas,
4165
4174
  glob,
4166
4175
  limit,
4176
+ minimumReleaseAge,
4167
4177
  minSatisfying,
4168
4178
  prCheck,
4169
4179
  orgSlug,
@@ -14954,5 +14964,5 @@ void (async () => {
14954
14964
  await utils.captureException(e);
14955
14965
  }
14956
14966
  })();
14957
- //# debugId=7d7feb5c-caaa-4477-9563-76861e408418
14967
+ //# debugId=a37ba0b8-5e27-487b-ba57-2d9a99bbccae
14958
14968
  //# sourceMappingURL=cli.js.map