MCPcopy
hub / github.com/vercel/next-forge / selectVersion

Function selectVersion

scripts/update.ts:79–97  ·  view source on GitHub ↗
(
  label: string,
  availableVersions: string[],
  initialValue: string | undefined
)

Source from the content-addressed store, hash-verified

77};
78
79const selectVersion = async (
80 label: string,
81 availableVersions: string[],
82 initialValue: string | undefined
83) => {
84 const version = await select({
85 message: `Select a version to update ${label}:`,
86 options: availableVersions.map((v) => ({ value: v, label: `v${v}` })),
87 initialValue,
88 maxItems: 10,
89 });
90
91 if (isCancel(version)) {
92 cancel("Operation cancelled.");
93 process.exit(0);
94 }
95
96 return version.toString();
97};
98
99const getDiff = (
100 from: { version: string; files: string[] },

Callers 1

updateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected