@stackframe/init-stack 2.5.17 → 2.5.19
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 +12 -0
- package/index.mjs +16 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/index.mjs
CHANGED
|
@@ -48,16 +48,16 @@ const commandsExecuted = [];
|
|
|
48
48
|
async function main() {
|
|
49
49
|
console.log();
|
|
50
50
|
console.log(`
|
|
51
|
-
██████
|
|
52
|
-
██████████████
|
|
53
|
-
████████████████████
|
|
51
|
+
██████
|
|
52
|
+
██████████████
|
|
53
|
+
████████████████████
|
|
54
54
|
████████████████████ WELCOME TO
|
|
55
55
|
█████████████████ ╔═╗╔╦╗╔═╗╔═╗╦╔═ ┌─┐┬ ┬┌┬┐┬ ┬
|
|
56
56
|
█████████████ ╚═╗ ║ ╠═╣║ ╠╩╗ ├─┤│ │ │ ├─┤
|
|
57
57
|
█████████████ ████ ╚═╝ ╩ ╩ ╩╚═╝╩ ╩ ┴ ┴└─┘ ┴ ┴ ┴
|
|
58
|
-
█████████████████
|
|
59
|
-
██████ ██
|
|
60
|
-
████ ████
|
|
58
|
+
█████████████████
|
|
59
|
+
██████ ██
|
|
60
|
+
████ ████
|
|
61
61
|
█████ █████
|
|
62
62
|
██████
|
|
63
63
|
`);
|
|
@@ -81,7 +81,8 @@ async function main() {
|
|
|
81
81
|
`The project at ${projectPath} does not appear to be a Next.js project, or does not have 'next' installed as a dependency. Only Next.js projects are currently supported.`
|
|
82
82
|
);
|
|
83
83
|
}
|
|
84
|
-
|
|
84
|
+
const nextPackageJsonVersion = packageJson.dependencies["next"];
|
|
85
|
+
if (!nextPackageJsonVersion.includes("14") && nextPackageJsonVersion !== "latest") {
|
|
85
86
|
throw new UserError(
|
|
86
87
|
`The project at ${projectPath} is using an unsupported version of Next.js (found ${packageJson.dependencies["next"]}).\n\nOnly Next.js 14 projects are currently supported. See Next's upgrade guide: https://nextjs.org/docs/app/building-your-application/upgrading/version-14`
|
|
87
88
|
);
|
|
@@ -195,7 +196,7 @@ async function main() {
|
|
|
195
196
|
{
|
|
196
197
|
type: "confirm",
|
|
197
198
|
name: "ready",
|
|
198
|
-
message: `Found a Next.js project at ${projectPath}
|
|
199
|
+
message: `Found a Next.js project at ${projectPath} — ready to install Stack?`,
|
|
199
200
|
default: true,
|
|
200
201
|
},
|
|
201
202
|
]);
|
|
@@ -431,13 +432,16 @@ async function getPackageManager() {
|
|
|
431
432
|
const yarnLock = fs.existsSync(path.join(projectPath, "yarn.lock"));
|
|
432
433
|
const pnpmLock = fs.existsSync(path.join(projectPath, "pnpm-lock.yaml"));
|
|
433
434
|
const npmLock = fs.existsSync(path.join(projectPath, "package-lock.json"));
|
|
435
|
+
const bunLock = fs.existsSync(path.join(projectPath, "bun.lockb"));
|
|
434
436
|
|
|
435
|
-
if (yarnLock && !pnpmLock && !npmLock) {
|
|
437
|
+
if (yarnLock && !pnpmLock && !npmLock && !bunLock) {
|
|
436
438
|
return "yarn";
|
|
437
|
-
} else if (!yarnLock && pnpmLock && !npmLock) {
|
|
439
|
+
} else if (!yarnLock && pnpmLock && !npmLock && !bunLock) {
|
|
438
440
|
return "pnpm";
|
|
439
|
-
} else if (!yarnLock && !pnpmLock && npmLock) {
|
|
441
|
+
} else if (!yarnLock && !pnpmLock && npmLock && !bunLock) {
|
|
440
442
|
return "npm";
|
|
443
|
+
} else if (!yarnLock && !pnpmLock && !npmLock && bunLock) {
|
|
444
|
+
return "bun";
|
|
441
445
|
}
|
|
442
446
|
|
|
443
447
|
const answers = await inquirer.prompt([
|
|
@@ -445,7 +449,7 @@ async function getPackageManager() {
|
|
|
445
449
|
type: "list",
|
|
446
450
|
name: "packageManager",
|
|
447
451
|
message: "Which package manager are you using for this project?",
|
|
448
|
-
choices: ["npm", "yarn", "pnpm"],
|
|
452
|
+
choices: ["npm", "yarn", "pnpm", "bun"],
|
|
449
453
|
},
|
|
450
454
|
]);
|
|
451
455
|
return answers.packageManager;
|