@coana-tech/cli 14.12.47 → 14.12.48

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/cli.mjs CHANGED
@@ -198932,89 +198932,67 @@ function getDependencyXml(pom, dependency, parentIndentLevel) {
198932
198932
  ${parentIndent}`;
198933
198933
  return dependenciesXml;
198934
198934
  }
198935
- var managedDependenciesPatchCache = /* @__PURE__ */ new Map();
198936
- function getSingletonManagedDependenciesPatch(pom) {
198937
- function computeManagedDependenciesPatch() {
198938
- const projectElement = pom.xml.children.filter((child) => child instanceof import_parse_xml2.XmlElement).find((child) => child.name === "project");
198939
- if (!projectElement) {
198940
- return void 0;
198941
- }
198942
- const dependencyManagementElement = projectElement.children.filter((child) => child instanceof import_parse_xml2.XmlElement).find((child) => child.name === "dependencyManagement");
198943
- const dependenciesElement = dependencyManagementElement?.children.filter((child) => child instanceof import_parse_xml2.XmlElement).find((child) => child.name === "dependencies");
198944
- const indentL1 = indent(1, pom.indentation);
198945
- const indentL2 = indent(2, pom.indentation);
198946
- if (!dependencyManagementElement) {
198947
- const insertPos = getInsertPos(projectElement);
198948
- return insertPos ? {
198949
- file: pom.validatedPomFile,
198950
- offset: insertPos,
198951
- artifacts: [],
198952
- render: (t4) => `
198935
+ function getManagedDependenciesPatch(pom, dependencies) {
198936
+ const projectElement = pom.xml.children.filter((child) => child instanceof import_parse_xml2.XmlElement).find((child) => child.name === "project");
198937
+ if (!projectElement) {
198938
+ return void 0;
198939
+ }
198940
+ const dependencyManagementElement = projectElement.children.filter((child) => child instanceof import_parse_xml2.XmlElement).find((child) => child.name === "dependencyManagement");
198941
+ const dependenciesElement = dependencyManagementElement?.children.filter((child) => child instanceof import_parse_xml2.XmlElement).find((child) => child.name === "dependencies");
198942
+ const indentL1 = indent(1, pom.indentation);
198943
+ const indentL2 = indent(2, pom.indentation);
198944
+ const depXmls = dependencies.map((dep) => getDependencyXml(pom, dep, 2)).join("");
198945
+ if (!dependencyManagementElement) {
198946
+ return {
198947
+ file: pom.validatedPomFile,
198948
+ offset: getInsertPos(projectElement),
198949
+ text: `
198953
198950
  ${indentL1}<dependencyManagement>
198954
198951
  ${indentL2}<dependencies>
198955
- ${indentL2}${t4 ?? ""}</dependencies>
198952
+ ${indentL2}${depXmls}</dependencies>
198956
198953
  ${indentL1}</dependencyManagement>
198957
198954
  `
198958
- } : void 0;
198959
- } else if (!dependenciesElement) {
198960
- const insertPos = getInsertPos(dependencyManagementElement);
198961
- return insertPos ? {
198962
- file: pom.validatedPomFile,
198963
- offset: insertPos,
198964
- artifacts: [],
198965
- render: (t4) => `${indentL1}<dependencies>
198966
- ${indentL2}${t4 ?? ""}</dependencies>
198955
+ };
198956
+ } else if (!dependenciesElement) {
198957
+ return {
198958
+ file: pom.validatedPomFile,
198959
+ offset: getInsertPos(dependencyManagementElement),
198960
+ text: `${indentL1}<dependencies>
198961
+ ${indentL2}${depXmls}</dependencies>
198967
198962
  ${indentL1}`
198968
- } : void 0;
198969
- } else {
198970
- const insertPos = getInsertPos(dependenciesElement);
198971
- return insertPos ? {
198972
- file: pom.validatedPomFile,
198973
- offset: insertPos,
198974
- artifacts: [],
198975
- render: (t4) => t4 ?? ""
198976
- } : void 0;
198977
- }
198978
- }
198979
- if (!managedDependenciesPatchCache.has(pom.validatedPomFile)) {
198980
- managedDependenciesPatchCache.set(pom.validatedPomFile, computeManagedDependenciesPatch());
198963
+ };
198964
+ } else {
198965
+ return {
198966
+ file: pom.validatedPomFile,
198967
+ offset: getInsertPos(dependenciesElement),
198968
+ text: depXmls
198969
+ };
198981
198970
  }
198982
- return managedDependenciesPatchCache.get(pom.validatedPomFile);
198983
198971
  }
198984
- var dependenciesPatchCache = /* @__PURE__ */ new Map();
198985
- function getSingletonDependenciesPatch(pom) {
198986
- function computeDependenciesGroup() {
198987
- const projectElement = pom.xml.children.filter((child) => child instanceof import_parse_xml2.XmlElement).find((child) => child.name === "project");
198988
- if (!projectElement) {
198989
- return void 0;
198990
- }
198991
- const dependenciesElement = projectElement.children.filter((child) => child instanceof import_parse_xml2.XmlElement).find((child) => child.name === "dependencies");
198992
- const indentL1 = indent(1, pom.indentation);
198993
- if (!dependenciesElement) {
198994
- const insertPos = getInsertPos(projectElement);
198995
- return insertPos ? {
198996
- file: pom.validatedPomFile,
198997
- offset: insertPos,
198998
- artifacts: [],
198999
- render: (t4) => `
198972
+ function getDependenicesPatch(pom, dependencies) {
198973
+ const projectElement = pom.xml.children.filter((child) => child instanceof import_parse_xml2.XmlElement).find((child) => child.name === "project");
198974
+ if (!projectElement) {
198975
+ return void 0;
198976
+ }
198977
+ const dependenciesElement = projectElement.children.filter((child) => child instanceof import_parse_xml2.XmlElement).find((child) => child.name === "dependencies");
198978
+ const indentL1 = indent(1, pom.indentation);
198979
+ const depXmls = dependencies.map((dep) => getDependencyXml(pom, dep, 1)).join("");
198980
+ if (!dependenciesElement) {
198981
+ return {
198982
+ file: pom.validatedPomFile,
198983
+ offset: getInsertPos(projectElement),
198984
+ text: `
199000
198985
  ${indentL1}<dependencies>
199001
- ${indentL1}${t4 ?? ""}</dependencies>
198986
+ ${indentL1}${depXmls}</dependencies>
199002
198987
  `
199003
- } : void 0;
199004
- } else {
199005
- const insertPos = getInsertPos(dependenciesElement);
199006
- return insertPos ? {
199007
- file: pom.validatedPomFile,
199008
- offset: insertPos,
199009
- artifacts: [],
199010
- render: (t4) => t4 ?? ""
199011
- } : void 0;
199012
- }
199013
- }
199014
- if (!dependenciesPatchCache.has(pom.validatedPomFile)) {
199015
- dependenciesPatchCache.set(pom.validatedPomFile, computeDependenciesGroup());
198988
+ };
198989
+ } else {
198990
+ return {
198991
+ file: pom.validatedPomFile,
198992
+ offset: getInsertPos(dependenciesElement),
198993
+ text: depXmls
198994
+ };
199016
198995
  }
199017
- return dependenciesPatchCache.get(pom.validatedPomFile);
199018
198996
  }
199019
198997
  function getParentPomPath(pom) {
199020
198998
  const projectElement = pom.xml.children.filter((child) => child instanceof import_parse_xml2.XmlElement).find((child) => child.name === "project");
@@ -199226,7 +199204,10 @@ var MavenFixingManager = class {
199226
199204
  }
199227
199205
  if (upgradesNeedingManagedDependencies.length > 0) {
199228
199206
  try {
199229
- const patch = getSingletonManagedDependenciesPatch(pom);
199207
+ const patch = getManagedDependenciesPatch(
199208
+ pom,
199209
+ upgradesNeedingManagedDependencies.map((dep) => dep.dependency)
199210
+ );
199230
199211
  if (patch) {
199231
199212
  patches.push({
199232
199213
  success: true,
@@ -199234,9 +199215,7 @@ var MavenFixingManager = class {
199234
199215
  patch: {
199235
199216
  file: pom.validatedPomFile,
199236
199217
  offset: patch.offset,
199237
- newText: patch.render(
199238
- upgradesNeedingManagedDependencies.map((dep) => getDependencyXml(pom, dep.dependency, 3)).join("")
199239
- )
199218
+ newText: patch.text
199240
199219
  }
199241
199220
  });
199242
199221
  } else {
@@ -199340,7 +199319,10 @@ var MavenFixingManager = class {
199340
199319
  }
199341
199320
  if (upgradesNeedingManagedDependencies.length > 0) {
199342
199321
  try {
199343
- const patch = getSingletonManagedDependenciesPatch(pom);
199322
+ const patch = getManagedDependenciesPatch(
199323
+ pom,
199324
+ upgradesNeedingManagedDependencies.map((dep) => dep.dependency)
199325
+ );
199344
199326
  if (patch) {
199345
199327
  patches.push({
199346
199328
  success: true,
@@ -199348,9 +199330,7 @@ var MavenFixingManager = class {
199348
199330
  patch: {
199349
199331
  file: pom.validatedPomFile,
199350
199332
  offset: patch.offset,
199351
- newText: patch.render(
199352
- upgradesNeedingManagedDependencies.map((dep) => getDependencyXml(pom, dep.dependency, 3)).join("")
199353
- )
199333
+ newText: patch.text
199354
199334
  }
199355
199335
  });
199356
199336
  } else {
@@ -199837,21 +199817,14 @@ async function applyPatches(ecosystem, rootDir, patches, ctxt) {
199837
199817
  await writeFile2(fullPath, "", "utf-8");
199838
199818
  }
199839
199819
  let fileContent = await readFile7(fullPath, "utf-8");
199840
- const renderedPatches = patches2.map((patch) => ({
199841
- file: patch.file,
199842
- offset: patch.offset,
199843
- length: patch.length,
199844
- artifacts: patch.artifacts,
199845
- renderedText: patch.render()
199846
- }));
199847
- const groupedPatches = groupPatches(rootDir, renderedPatches);
199820
+ const groupedPatches = groupPatches(rootDir, patches2);
199848
199821
  const resolvedPatches = resolveConflicts2(ecosystem, groupedPatches, ctxt);
199849
199822
  const sortedPatches = resolvedPatches.sort(
199850
199823
  (a4, b) => b.offset !== a4.offset ? b.offset - a4.offset : (b.length ?? 0) - (a4.length ?? 0)
199851
199824
  );
199852
199825
  for (const patch of sortedPatches) {
199853
199826
  const oldFileContent = fileContent;
199854
- fileContent = fileContent.substring(0, patch.offset) + patch.renderedText + fileContent.substring(patch.offset + (patch.length ?? 0));
199827
+ fileContent = fileContent.substring(0, patch.offset) + patch.text + fileContent.substring(patch.offset + (patch.length ?? 0));
199855
199828
  ctxt.statusUpdater?.({
199856
199829
  status: "success",
199857
199830
  file: patch.file,
@@ -199866,7 +199839,7 @@ async function applyPatches(ecosystem, rootDir, patches, ctxt) {
199866
199839
  function groupPatches(rootDir, patches) {
199867
199840
  const groupMap = /* @__PURE__ */ new Map();
199868
199841
  for (const patch of patches) {
199869
- const groupKey = `${resolve7(rootDir, patch.file)}|${patch.offset}|${patch.length ?? 0}|${patch.renderedText}`;
199842
+ const groupKey = `${resolve7(rootDir, patch.file)}|${patch.offset}|${patch.length ?? 0}|${patch.text}`;
199870
199843
  const existing = groupMap.get(groupKey);
199871
199844
  if (existing) {
199872
199845
  existing.artifacts = i(existing.artifacts.concat(patch.artifacts));
@@ -203863,6 +203836,7 @@ var PomUpgradeHandler = class {
203863
203836
  };
203864
203837
  async handle(ctxt) {
203865
203838
  const patches = [];
203839
+ const managedDependenciesToAdd = /* @__PURE__ */ new Map();
203866
203840
  for (const [idx, upgradeVersion] of ctxt.upgrades) {
203867
203841
  const artifact = ctxt.artifacts[idx];
203868
203842
  const validatedManifestFiles = i(
@@ -203873,9 +203847,41 @@ var PomUpgradeHandler = class {
203873
203847
  ).map((f6) => resolve9(this.rootDir, f6)).filter(this.validateFile)
203874
203848
  );
203875
203849
  await asyncForEach(validatedManifestFiles, async (validatedManifestFile) => {
203876
- patches.push(...await this.getPatchesForUpgrade(validatedManifestFile, idx, upgradeVersion, ctxt));
203850
+ const res = await this.getPatchesAndManagedDependencies(validatedManifestFile, idx, upgradeVersion, ctxt);
203851
+ patches.push(...res.patches ?? []);
203852
+ if (res.managedDependencies) {
203853
+ if (!managedDependenciesToAdd.has(validatedManifestFile)) {
203854
+ managedDependenciesToAdd.set(validatedManifestFile, { artifacts: [], dependencies: [] });
203855
+ }
203856
+ const { artifacts, dependencies } = managedDependenciesToAdd.get(validatedManifestFile);
203857
+ artifacts.push(idx);
203858
+ dependencies.push(...res.managedDependencies);
203859
+ }
203877
203860
  });
203878
203861
  }
203862
+ for (const [validatedManifestFile, { artifacts, dependencies }] of managedDependenciesToAdd) {
203863
+ const pom = await loadPom(this.rootDir, validatedManifestFile, this.validateFile);
203864
+ if (!pom) {
203865
+ ctxt.statusUpdater?.({
203866
+ status: "error",
203867
+ file: validatedManifestFile,
203868
+ artifacts,
203869
+ message: `Manifest file not valid for updates`
203870
+ });
203871
+ continue;
203872
+ }
203873
+ const patch = getManagedDependenciesPatch(pom, dependencies);
203874
+ if (patch) {
203875
+ patches.push({ ...patch, artifacts });
203876
+ } else {
203877
+ ctxt.statusUpdater?.({
203878
+ status: "error",
203879
+ file: validatedManifestFile,
203880
+ artifacts,
203881
+ message: `Could not find or create managedDependencies patch`
203882
+ });
203883
+ }
203884
+ }
203879
203885
  await applyPatches("MAVEN", this.rootDir, patches, ctxt);
203880
203886
  const recomputedArtifacts = patches.length ? await Spinner.instance().wrap(
203881
203887
  "Computing remaining upgrades",
@@ -203892,6 +203898,7 @@ var PomUpgradeHandler = class {
203892
203898
  }
203893
203899
  const reindex = computeRemainingSocketUpgrades("MAVEN", ctxt.upgrades, ctxt.artifacts, recomputedArtifacts);
203894
203900
  const fallbackPatches = [];
203901
+ const dependenciesToAdd = /* @__PURE__ */ new Map();
203895
203902
  for (const [oldIdx, { idx: newIdx }] of reindex) {
203896
203903
  const newArtifact = ctxt.artifacts[newIdx];
203897
203904
  const validatedManifestFiles = i(
@@ -203902,21 +203909,49 @@ var PomUpgradeHandler = class {
203902
203909
  ).map((f6) => resolve9(this.rootDir, f6)).filter(this.validateFile)
203903
203910
  );
203904
203911
  await asyncForEach(validatedManifestFiles, async (validatedManifestFile) => {
203905
- const patch = await this.getFallbackPatchForUpgrade(
203912
+ const dependency = await this.getFallbackDependency(
203906
203913
  validatedManifestFile,
203907
203914
  oldIdx,
203908
203915
  newIdx,
203909
203916
  recomputedArtifacts,
203910
203917
  ctxt
203911
203918
  );
203912
- if (patch) {
203913
- fallbackPatches.push(patch);
203919
+ if (dependency) {
203920
+ if (!dependenciesToAdd.has(validatedManifestFile)) {
203921
+ dependenciesToAdd.set(validatedManifestFile, { artifacts: [], dependencies: [] });
203922
+ }
203923
+ const { artifacts, dependencies } = dependenciesToAdd.get(validatedManifestFile);
203924
+ artifacts.push(oldIdx);
203925
+ dependencies.push(dependency);
203914
203926
  }
203915
203927
  });
203916
203928
  }
203929
+ for (const [validatedManifestFile, { artifacts, dependencies }] of dependenciesToAdd) {
203930
+ const pom = await loadPom(this.rootDir, validatedManifestFile, this.validateFile);
203931
+ if (!pom) {
203932
+ ctxt.statusUpdater?.({
203933
+ status: "error",
203934
+ file: validatedManifestFile,
203935
+ artifacts,
203936
+ message: `Manifest file not valid for updates`
203937
+ });
203938
+ continue;
203939
+ }
203940
+ const patch = getDependenicesPatch(pom, dependencies);
203941
+ if (patch) {
203942
+ fallbackPatches.push({ ...patch, artifacts });
203943
+ } else {
203944
+ ctxt.statusUpdater?.({
203945
+ status: "error",
203946
+ file: validatedManifestFile,
203947
+ artifacts,
203948
+ message: `Could not find or create dependencies patch`
203949
+ });
203950
+ }
203951
+ }
203917
203952
  await applyPatches("MAVEN", this.rootDir, fallbackPatches, ctxt);
203918
203953
  }
203919
- async getPatchesForUpgrade(manifestFile, idx, upgradeVersion, ctxt) {
203954
+ async getPatchesAndManagedDependencies(manifestFile, idx, upgradeVersion, ctxt) {
203920
203955
  const pom = await loadPom(this.rootDir, manifestFile, this.validateFile);
203921
203956
  if (!pom) {
203922
203957
  ctxt.statusUpdater?.({
@@ -203925,9 +203960,10 @@ var PomUpgradeHandler = class {
203925
203960
  artifacts: [idx],
203926
203961
  message: `Manifest file not valid for updates`
203927
203962
  });
203928
- return [];
203963
+ return {};
203929
203964
  }
203930
203965
  const patches = [];
203966
+ const managedDependencies = [];
203931
203967
  const artifact = ctxt.artifacts[idx];
203932
203968
  assert3(artifact.namespace);
203933
203969
  assert3(artifact.name);
@@ -203956,7 +203992,7 @@ var PomUpgradeHandler = class {
203956
203992
  file: patchLocation.file,
203957
203993
  offset: patchLocation.offset,
203958
203994
  length: patchLocation.text.length,
203959
- render: () => ctxt.rangeStyle === "pin" || !existingVersionRange.containsVersion(upgradeMavenVersion) ? upgradeMavenRangePinned.toString() : existingVersionRange.hasRestrictions() ? upgradeMavenRange.restrict(existingVersionRange).toString() : upgradeMavenVersion.toString()
203995
+ text: ctxt.rangeStyle === "pin" || !existingVersionRange.containsVersion(upgradeMavenVersion) ? upgradeMavenRangePinned.toString() : existingVersionRange.hasRestrictions() ? upgradeMavenRange.restrict(existingVersionRange).toString() : upgradeMavenVersion.toString()
203960
203996
  });
203961
203997
  } else {
203962
203998
  ctxt.statusUpdater?.({
@@ -203985,7 +204021,7 @@ var PomUpgradeHandler = class {
203985
204021
  file: patchLocation.file,
203986
204022
  offset: patchLocation.offset,
203987
204023
  length: patchLocation.text.length,
203988
- render: () => ctxt.rangeStyle === "pin" || !existingVersionRange.containsVersion(upgradeMavenVersion) ? upgradeMavenRangePinned.toString() : existingVersionRange.hasRestrictions() ? upgradeMavenRange.restrict(existingVersionRange).toString() : upgradeMavenVersion.toString()
204024
+ text: ctxt.rangeStyle === "pin" || !existingVersionRange.containsVersion(upgradeMavenVersion) ? upgradeMavenRangePinned.toString() : existingVersionRange.hasRestrictions() ? upgradeMavenRange.restrict(existingVersionRange).toString() : upgradeMavenVersion.toString()
203989
204025
  });
203990
204026
  } else {
203991
204027
  ctxt.statusUpdater?.({
@@ -203996,34 +204032,19 @@ var PomUpgradeHandler = class {
203996
204032
  });
203997
204033
  }
203998
204034
  } else {
203999
- const dependency = {
204035
+ managedDependencies.push({
204000
204036
  groupId: artifact.namespace,
204001
204037
  artifactId: artifact.name,
204002
204038
  version: ctxt.rangeStyle === "pin" ? upgradeMavenRangePinned.toString() : upgradeMavenVersion.toString(),
204003
204039
  type: artifact.qualifiers?.type,
204004
204040
  classifier: artifact.qualifiers?.classifier
204005
- };
204006
- const patch = getSingletonManagedDependenciesPatch(pom);
204007
- if (patch) {
204008
- if (patch.artifacts.length === 0) {
204009
- patches.push(patch);
204010
- }
204011
- patch.artifacts.push(idx);
204012
- patch.render = /* @__PURE__ */ ((render3) => (t4) => render3((t4 ?? "") + getDependencyXml(pom, dependency, 2)))(patch.render);
204013
- } else {
204014
- ctxt.statusUpdater?.({
204015
- status: "error",
204016
- file: manifestFile,
204017
- artifacts: [idx],
204018
- message: `Could not find or create managedDependencies group`
204019
- });
204020
- }
204041
+ });
204021
204042
  }
204022
204043
  }
204023
204044
  }
204024
- return patches;
204045
+ return { patches, managedDependencies };
204025
204046
  }
204026
- async getFallbackPatchForUpgrade(manifestFile, oldIdx, newIdx, recomputedArtifacts, { statusUpdater }) {
204047
+ async getFallbackDependency(manifestFile, oldIdx, newIdx, recomputedArtifacts, { statusUpdater }) {
204027
204048
  const pom = await loadPom(this.rootDir, manifestFile, this.validateFile);
204028
204049
  if (!pom) {
204029
204050
  statusUpdater?.({
@@ -204037,28 +204058,12 @@ var PomUpgradeHandler = class {
204037
204058
  const artifact = recomputedArtifacts[newIdx];
204038
204059
  assert3(artifact.namespace);
204039
204060
  assert3(artifact.name);
204040
- assert3(artifact.version);
204041
- const dependency = {
204061
+ return {
204042
204062
  groupId: artifact.namespace,
204043
204063
  artifactId: artifact.name,
204044
204064
  type: artifact.qualifiers?.type,
204045
204065
  classifier: artifact.qualifiers?.classifier
204046
204066
  };
204047
- const patch = getSingletonDependenciesPatch(pom);
204048
- if (patch) {
204049
- patch.artifacts.push(oldIdx);
204050
- patch.render = /* @__PURE__ */ ((render3) => (t4) => render3((t4 ?? "") + getDependencyXml(pom, dependency, 1)))(patch.render);
204051
- if (patch.artifacts.length === 1) {
204052
- return patch;
204053
- }
204054
- } else {
204055
- statusUpdater?.({
204056
- status: "error",
204057
- file: manifestFile,
204058
- artifacts: [oldIdx],
204059
- message: `Could not find or create dependencies group`
204060
- });
204061
- }
204062
204067
  }
204063
204068
  };
204064
204069
 
@@ -204114,7 +204119,7 @@ var GradleLockfileUpgradeHandler = class {
204114
204119
  file: lockFile.file,
204115
204120
  offset: startIndex,
204116
204121
  length: currentVersionPattern.length,
204117
- render: () => newVersionPattern
204122
+ text: newVersionPattern
204118
204123
  });
204119
204124
  } else {
204120
204125
  ctxt.statusUpdater?.({
@@ -204419,7 +204424,7 @@ var SbtUpgradeHandler = class {
204419
204424
  file: sbtFile,
204420
204425
  offset: moduleId.version.offset,
204421
204426
  length: moduleId.version.text.length,
204422
- render: () => delim + (rangeStyle === "pin" || !existingVersionRange.containsVersion(upgradeMavenVersion) ? upgradeMavenRangePinned.toString() : existingVersionRange.hasRestrictions() ? upgradeMavenRange.restrict(existingVersionRange).toString() : upgradeMavenVersion.toString()) + delim
204427
+ text: delim + (rangeStyle === "pin" || !existingVersionRange.containsVersion(upgradeMavenVersion) ? upgradeMavenRangePinned.toString() : existingVersionRange.hasRestrictions() ? upgradeMavenRange.restrict(existingVersionRange).toString() : upgradeMavenVersion.toString()) + delim
204423
204428
  };
204424
204429
  }
204425
204430
  }
@@ -204450,7 +204455,7 @@ var SbtUpgradeHandler = class {
204450
204455
  file: dependencyOverridesFile,
204451
204456
  artifacts: upgrades.map(({ idx }) => idx),
204452
204457
  offset: 0,
204453
- render: () => `dependencyOverrides ++= Seq(
204458
+ text: `dependencyOverrides ++= Seq(
204454
204459
  ${indent(1, indentationSize)}${moduleIds.join(`,
204455
204460
  ${indent(1, indentationSize)}`)}
204456
204461
  )
@@ -204464,7 +204469,7 @@ ${indent(1, indentationSize)}`)}
204464
204469
  file: dependencyOverridesFile,
204465
204470
  artifacts: upgrades.map(({ idx }) => idx),
204466
204471
  offset: fileContent.length,
204467
- render: () => `${prependNewline ? "\n" : ""}dependencyOverrides ++= Seq(
204472
+ text: `${prependNewline ? "\n" : ""}dependencyOverrides ++= Seq(
204468
204473
  ${indent(1, indentationSize)}${moduleIds.join(`,
204469
204474
  ${indent(1, indentationSize)}`)})
204470
204475
  `
@@ -213002,7 +213007,7 @@ function createPackageReferencePatch(project, parent2, idx, packageName, version
213002
213007
  file: project.validatedProjectPath,
213003
213008
  offset: parent2.end - 3 - parent2.name.length,
213004
213009
  artifacts: [idx],
213005
- render: () => `${indent2}<PackageReference Include="${packageName}"${versionAttr}${conditionAttr} />
213010
+ text: `${indent2}<PackageReference Include="${packageName}"${versionAttr}${conditionAttr} />
213006
213011
  ${indent2}`
213007
213012
  };
213008
213013
  }
@@ -213013,7 +213018,7 @@ function createPackageVersionPatch(project, parent2, idx, packageName, version3,
213013
213018
  file: project.validatedProjectPath,
213014
213019
  offset: parent2.end - 3 - parent2.name.length,
213015
213020
  artifacts: [idx],
213016
- render: () => `${indent2}<PackageVersion Include="${packageName}" Version="${version3}"${conditionAttr} />
213021
+ text: `${indent2}<PackageVersion Include="${packageName}" Version="${version3}"${conditionAttr} />
213017
213022
  ${indent2}`
213018
213023
  };
213019
213024
  }
@@ -213024,7 +213029,7 @@ function createPackagesConfigPackagePatch(config3, idx, packageName, version3, t
213024
213029
  file: config3.validatedConfigPath,
213025
213030
  offset: packagesElement.end - 3 - packagesElement.name.length,
213026
213031
  artifacts: [idx],
213027
- render: () => `
213032
+ text: `
213028
213033
  ${" ".repeat(2)}<package id="${packageName}" version="${version3}"${targetFramework ? ` targetFramework="${targetFramework}"` : ""}/>
213029
213034
  `
213030
213035
  };
@@ -213035,7 +213040,7 @@ function createPropertyPatch(project, idx, parent2, propertyName, value) {
213035
213040
  file: project.validatedProjectPath,
213036
213041
  offset: parent2.end - 3 - parent2.name.length,
213037
213042
  artifacts: [idx],
213038
- render: () => `${indent2}<${propertyName}>${value}</${propertyName}>
213043
+ text: `${indent2}<${propertyName}>${value}</${propertyName}>
213039
213044
  ${indent2}`
213040
213045
  };
213041
213046
  }
@@ -213189,7 +213194,7 @@ var NuGetSocketUpgradeManager = class {
213189
213194
  offset: patchLocation.offset,
213190
213195
  length: patchLocation.text.length,
213191
213196
  artifacts: [idx],
213192
- render: () => "true"
213197
+ text: "true"
213193
213198
  });
213194
213199
  } else {
213195
213200
  ctxt.statusUpdater?.({
@@ -213231,7 +213236,7 @@ var NuGetSocketUpgradeManager = class {
213231
213236
  offset: patchLocation.offset,
213232
213237
  length: patchLocation.text.length,
213233
213238
  artifacts: [idx],
213234
- render: () => (
213239
+ text: (
213235
213240
  // Use pinned version if rangeStyle is set or if we break existing spec!
213236
213241
  ctxt.rangeStyle === "pin" || !existingVersionRange.contains(upgradeNuGetVersion) ? upgradeNuGetRangePinned.toString() : NuGetRange.commonSubset(upgradeNuGetRange, existingVersionRange).toString()
213237
213242
  )
@@ -213257,7 +213262,7 @@ var NuGetSocketUpgradeManager = class {
213257
213262
  offset: patchLocation.offset,
213258
213263
  length: patchLocation.text.length,
213259
213264
  artifacts: [idx],
213260
- render: () => (
213265
+ text: (
213261
213266
  // Use pinned version if rangeStyle is set or if we break existing spec!
213262
213267
  ctxt.rangeStyle === "pin" || !existingVersionOverrideRange.contains(upgradeNuGetVersion) ? upgradeNuGetRangePinned.toString() : NuGetRange.commonSubset(upgradeNuGetRange, existingVersionOverrideRange).toString()
213263
213268
  )
@@ -213284,7 +213289,7 @@ var NuGetSocketUpgradeManager = class {
213284
213289
  offset: patchLocation.offset,
213285
213290
  length: patchLocation.text.length,
213286
213291
  artifacts: [idx],
213287
- render: () => (
213292
+ text: (
213288
213293
  // Use pinned version if rangeStyle is set or if we break existing spec!
213289
213294
  ctxt.rangeStyle === "pin" || !existingVersionRange.contains(upgradeNuGetVersion) ? upgradeNuGetRangePinned.toString() : NuGetRange.commonSubset(upgradeNuGetRange, existingVersionRange).toString()
213290
213295
  )
@@ -213317,7 +213322,7 @@ var NuGetSocketUpgradeManager = class {
213317
213322
  offset: pkg.version.offset,
213318
213323
  length: pkg.version.text.length,
213319
213324
  artifacts: [idx],
213320
- render: () => upgradeVersion
213325
+ text: upgradeVersion
213321
213326
  });
213322
213327
  } else {
213323
213328
  ctxt.statusUpdater?.({
@@ -213506,7 +213511,7 @@ var CargoSocketUpgradeManager = class {
213506
213511
  offset: kvPair.value.range[0] + 1,
213507
213512
  length: kvPair.value.value.length,
213508
213513
  artifacts: [idx],
213509
- render: () => newVersionString
213514
+ text: newVersionString
213510
213515
  });
213511
213516
  }
213512
213517
  } else if (kvPair.value.type === "TOMLInlineTable") {
@@ -213574,7 +213579,7 @@ var CargoSocketUpgradeManager = class {
213574
213579
  // Skip opening quote
213575
213580
  length: packageVersion.length,
213576
213581
  artifacts: [idx],
213577
- render: () => upgradeVersion
213582
+ text: upgradeVersion
213578
213583
  });
213579
213584
  if (checksumNode) {
213580
213585
  const checksumKvPair = node.body.find(
@@ -213587,7 +213592,7 @@ var CargoSocketUpgradeManager = class {
213587
213592
  offset: checksumKvPair.range[0],
213588
213593
  length: checksumText.length,
213589
213594
  artifacts: [idx],
213590
- render: () => ""
213595
+ text: ""
213591
213596
  });
213592
213597
  }
213593
213598
  }
@@ -213661,7 +213666,7 @@ var CargoSocketUpgradeManager = class {
213661
213666
  // Skip opening quote
213662
213667
  length: currentVersion.length,
213663
213668
  artifacts: [idx],
213664
- render: () => newVersionString
213669
+ text: newVersionString
213665
213670
  };
213666
213671
  }
213667
213672
  }
@@ -213781,14 +213786,14 @@ var PipSocketUpgradeManager = class {
213781
213786
  offset: firstSpec.data.operator.location.startIdx,
213782
213787
  length: lastSpec.location.endIdx - firstSpec.data.operator.location.startIdx,
213783
213788
  artifacts: [idx],
213784
- render: () => `==${operatorToVersionWhitespace}${upgradeVersion}`
213789
+ text: `==${operatorToVersionWhitespace}${upgradeVersion}`
213785
213790
  });
213786
213791
  } else {
213787
213792
  patches.push({
213788
213793
  file: ref.file,
213789
213794
  offset: foundRequirement.location.endIdx,
213790
213795
  artifacts: [idx],
213791
- render: () => `==${upgradeVersion}`
213796
+ text: `==${upgradeVersion}`
213792
213797
  });
213793
213798
  }
213794
213799
  } else if (foundRequirement.data.versionSpec?.length) {
@@ -213801,19 +213806,19 @@ var PipSocketUpgradeManager = class {
213801
213806
  spec.data.version.location.startIdx
213802
213807
  );
213803
213808
  const patch = operator === ">" ? {
213804
- render: () => `>=${whitespace2}${upgradeVersion}`,
213809
+ text: `>=${whitespace2}${upgradeVersion}`,
213805
213810
  offset: spec.data.operator.location.startIdx,
213806
213811
  length: spec.data.version.location.endIdx - spec.data.operator.location.startIdx
213807
213812
  } : operator === "<" ? {
213808
- render: () => `<=${whitespace2}${upgradeVersion}`,
213813
+ text: `<=${whitespace2}${upgradeVersion}`,
213809
213814
  offset: spec.data.operator.location.startIdx,
213810
213815
  length: spec.data.version.location.endIdx - spec.data.operator.location.startIdx
213811
213816
  } : operator === "!=" && pipCompareVersions(specVersion, upgradeVersion) === 0 ? {
213812
- render: () => "",
213817
+ text: "",
213813
213818
  offset: spec.data.operator.location.startIdx,
213814
213819
  length: spec.data.version.location.endIdx - spec.data.operator.location.startIdx
213815
213820
  } : operator === "!=" ? void 0 : {
213816
- render: () => upgradeVersion,
213821
+ text: upgradeVersion,
213817
213822
  offset: spec.data.version.location.startIdx,
213818
213823
  length: spec.data.version.location.endIdx - spec.data.version.location.startIdx
213819
213824
  };
@@ -213835,7 +213840,7 @@ var PipSocketUpgradeManager = class {
213835
213840
  file: ref.file,
213836
213841
  offset: firstSpec.data.operator.location.startIdx,
213837
213842
  artifacts: [idx],
213838
- render: () => `>=${upgradeVersion},${commaSpacing}`
213843
+ text: `>=${upgradeVersion},${commaSpacing}`
213839
213844
  });
213840
213845
  }
213841
213846
  } else {
@@ -213843,7 +213848,7 @@ var PipSocketUpgradeManager = class {
213843
213848
  file: ref.file,
213844
213849
  offset: foundRequirement.data.name.location.endIdx,
213845
213850
  artifacts: [idx],
213846
- render: () => `==${upgradeVersion}`
213851
+ text: `==${upgradeVersion}`
213847
213852
  });
213848
213853
  }
213849
213854
  } else {
@@ -213880,7 +213885,7 @@ var PipSocketUpgradeManager = class {
213880
213885
  file: requirementsFile,
213881
213886
  offset: content.length,
213882
213887
  artifacts: [idx],
213883
- render: () => content.endsWith("\n") ? `${newText}
213888
+ text: content.endsWith("\n") ? `${newText}
213884
213889
  ` : `
213885
213890
  ${newText}
213886
213891
  `
@@ -216342,7 +216347,8 @@ var ADVISORY_SEVERITIES = [
216342
216347
  "HIGH",
216343
216348
  "CRITICAL"
216344
216349
  ];
216345
- var ADVISORY_SEVERITIES_SORTED = ADVISORY_SEVERITIES.toReversed();
216350
+ var ADVISORY_SEVERITIES_SORTED = ADVISORY_SEVERITIES;
216351
+ ADVISORY_SEVERITIES_SORTED.reverse();
216346
216352
  function toPlainDependencyTree(dependencyTree) {
216347
216353
  function pickNode(node) {
216348
216354
  return i3(node, ["packageName", "version", "dependencies", "resolvedType"]);
@@ -233563,7 +233569,7 @@ async function onlineScan(dependencyTree, apiKey, timeout) {
233563
233569
  }
233564
233570
 
233565
233571
  // dist/version.js
233566
- var version2 = "14.12.47";
233572
+ var version2 = "14.12.48";
233567
233573
 
233568
233574
  // dist/cli-core.js
233569
233575
  var { mapValues, omit, partition, pick } = import_lodash15.default;