@stackframe/init-stack 2.6.21 → 2.6.23

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @stackframe/init-stack
2
2
 
3
+ ## 2.6.23
4
+
5
+ ### Patch Changes
6
+
7
+ - Bugfixes
8
+
9
+ ## 2.6.22
10
+
11
+ ### Patch Changes
12
+
13
+ - Bugfixes
14
+
3
15
  ## 2.6.21
4
16
 
5
17
  ### Patch Changes
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} @stackframe/stack`, {
214
+ await shellNicelyFormatted(`${installCommand} ${stackPackageName}`, {
213
215
  shell: true,
214
216
  cwd: projectPath,
215
217
  });
@@ -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
- await open("https://app.stack-auth.com/wizard-congrats");
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.21",
3
+ "version": "2.6.23",
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
- "init-stack": "node index.mjs"
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
  }