@stackframe/init-stack 2.6.21 → 2.6.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/CHANGELOG.md +18 -0
- package/index.mjs +8 -4
- package/package.json +6 -2
package/CHANGELOG.md
CHANGED
package/index.mjs
CHANGED
|
@@ -75,7 +75,7 @@ async function main() {
|
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
77
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
|
|
78
|
-
const nextVersionInPackageJson = packageJson?.dependencies["next"] ?? packageJson?.devDependencies["next"];
|
|
78
|
+
const nextVersionInPackageJson = packageJson?.dependencies?.["next"] ?? packageJson?.devDependencies?.["next"];
|
|
79
79
|
if (!nextVersionInPackageJson) {
|
|
80
80
|
throw new UserError(
|
|
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.`
|
|
@@ -195,6 +195,8 @@ async function main() {
|
|
|
195
195
|
);
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
+
const stackPackageName = process.env.STACK_PACKAGE_NAME_OVERRIDE || "@stackframe/stack";
|
|
199
|
+
|
|
198
200
|
const isReady = await inquirer.prompt([
|
|
199
201
|
{
|
|
200
202
|
type: "confirm",
|
|
@@ -209,7 +211,7 @@ async function main() {
|
|
|
209
211
|
|
|
210
212
|
console.log();
|
|
211
213
|
console.log(`${ansis.bold}Installing dependencies...${ansis.clear}`);
|
|
212
|
-
await shellNicelyFormatted(`${installCommand}
|
|
214
|
+
await shellNicelyFormatted(`${installCommand} ${stackPackageName}`, {
|
|
213
215
|
shell: true,
|
|
214
216
|
cwd: projectPath,
|
|
215
217
|
});
|
|
@@ -230,7 +232,7 @@ async function main() {
|
|
|
230
232
|
await writeFileIfNotExists(
|
|
231
233
|
handlerPath,
|
|
232
234
|
`import { StackHandler } from "@stackframe/stack";\nimport { stackServerApp } from "../../../stack";\n\nexport default function Handler(props${
|
|
233
|
-
handlerFileExtension.includes("ts") ? ":
|
|
235
|
+
handlerFileExtension.includes("ts") ? ": unknown" : ""
|
|
234
236
|
}) {\n${ind}return <StackHandler fullPage app={stackServerApp} routeProps={props} />;\n}\n`
|
|
235
237
|
);
|
|
236
238
|
await writeFileIfNotExists(
|
|
@@ -294,7 +296,9 @@ main()
|
|
|
294
296
|
"For more information, please visit https://docs.stack-auth.com/getting-started/setup"
|
|
295
297
|
);
|
|
296
298
|
console.log();
|
|
297
|
-
|
|
299
|
+
if (!process.env.STACK_DISABLE_INTERACTIVE) {
|
|
300
|
+
await open("https://app.stack-auth.com/wizard-congrats");
|
|
301
|
+
}
|
|
298
302
|
})
|
|
299
303
|
.catch((err) => {
|
|
300
304
|
if (!(err instanceof UserError)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackframe/init-stack",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.24",
|
|
4
4
|
"description": "The setup wizard for Stack. https://stack-auth.com",
|
|
5
5
|
"main": "index.mjs",
|
|
6
6
|
"bin": "./index.mjs",
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
"open": "^10.1.0"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
|
-
"
|
|
22
|
+
"clean": "rimraf test-run-output && rimraf node_modules",
|
|
23
|
+
"init-stack": "node index.mjs",
|
|
24
|
+
"init-stack:local": "STACK_PACKAGE_NAME_OVERRIDE=../../stack node index.mjs",
|
|
25
|
+
"test-run": "rimraf test-run-output && npx -y create-next-app@latest test-run-output && pnpm run init-stack:local test-run-output",
|
|
26
|
+
"test-run-auto": "rimraf test-run-output && npx -y create-next-app@latest test-run-output --app --ts --no-src-dir --tailwind --use-npm --eslint --import-alias '##@#/*' --turbopack && STACK_DISABLE_INTERACTIVE=true pnpm run init-stack:local test-run-output"
|
|
23
27
|
}
|
|
24
28
|
}
|