@stackframe/init-stack 2.5.27 → 2.5.29

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/index.mjs +44 -19
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @stackframe/init-stack
2
2
 
3
+ ## 2.5.29
4
+
5
+ ## 2.5.28
6
+
7
+ ### Patch Changes
8
+
9
+ - Bugfixes
10
+
3
11
  ## 2.5.27
4
12
 
5
13
  ### Patch Changes
package/index.mjs CHANGED
@@ -63,7 +63,6 @@ async function main() {
63
63
  `);
64
64
  console.log();
65
65
 
66
-
67
66
  let projectPath = await getProjectPath();
68
67
  if (!fs.existsSync(projectPath)) {
69
68
  throw new UserError(`The project path ${projectPath} does not exist`);
@@ -82,7 +81,10 @@ async function main() {
82
81
  );
83
82
  }
84
83
  const nextPackageJsonVersion = packageJson.dependencies["next"];
85
- if (!nextPackageJsonVersion.includes("14") && nextPackageJsonVersion !== "latest") {
84
+ if (
85
+ !nextPackageJsonVersion.includes("14") &&
86
+ nextPackageJsonVersion !== "latest"
87
+ ) {
86
88
  throw new UserError(
87
89
  `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`
88
90
  );
@@ -226,7 +228,9 @@ async function main() {
226
228
  );
227
229
  await writeFileIfNotExists(
228
230
  handlerPath,
229
- `import { StackHandler } from "@stackframe/stack";\nimport { stackServerApp } from "../../../stack";\n\nexport default function Handler(props${handlerFileExtension.includes("ts") ? ": any" : ""}) {\n${ind}return <StackHandler fullPage app={stackServerApp} {...props} />;\n}\n`
231
+ `import { StackHandler } from "@stackframe/stack";\nimport { stackServerApp } from "../../../stack";\n\nexport default function Handler(props${
232
+ handlerFileExtension.includes("ts") ? ": any" : ""
233
+ }) {\n${ind}return <StackHandler fullPage app={stackServerApp} {...props} />;\n}\n`
230
234
  );
231
235
  await writeFileIfNotExists(
232
236
  stackAppPath,
@@ -238,7 +242,9 @@ async function main() {
238
242
  console.log();
239
243
  console.log();
240
244
  console.log();
241
- console.log(`${ansis.bold}${ansis.green}Installation succeeded!${ansis.clear}`);
245
+ console.log(
246
+ `${ansis.bold}${ansis.green}Installation succeeded!${ansis.clear}`
247
+ );
242
248
  console.log();
243
249
  console.log("Commands executed:");
244
250
  for (const command of commandsExecuted) {
@@ -259,19 +265,29 @@ main()
259
265
  console.log();
260
266
  console.log();
261
267
  console.log();
262
- console.log(`${ansis.green}===============================================${ansis.clear}`);
268
+ console.log(
269
+ `${ansis.green}===============================================${ansis.clear}`
270
+ );
263
271
  console.log();
264
- console.log(`${ansis.green}Successfully installed Stack! 🚀🚀🚀${ansis.clear}`);
272
+ console.log(
273
+ `${ansis.green}Successfully installed Stack! 🚀🚀🚀${ansis.clear}`
274
+ );
265
275
  console.log();
266
276
  console.log("Next steps:");
267
- console.log(" 1. Create an account and project on https://app.stack-auth.com");
268
- console.log(" 2. Copy the environment variables from the new API key into your .env.local file");
277
+ console.log(
278
+ " 1. Create an account and project on https://app.stack-auth.com"
279
+ );
280
+ console.log(
281
+ " 2. Copy the environment variables from the new API key into your .env.local file"
282
+ );
269
283
  console.log();
270
284
  console.log(
271
285
  "Then, you will be able to access your sign-in page on http://your-website.example.com/handler/sign-in. That's it!"
272
286
  );
273
287
  console.log();
274
- console.log(`${ansis.green}===============================================${ansis.clear}`);
288
+ console.log(
289
+ `${ansis.green}===============================================${ansis.clear}`
290
+ );
275
291
  console.log();
276
292
  console.log(
277
293
  "For more information, please visit https://docs.stack-auth.com/docs/getting-started/setup"
@@ -287,20 +303,22 @@ main()
287
303
  console.error();
288
304
  console.error();
289
305
  console.error();
290
- console.error(`${ansis.red}===============================================${ansis.clear}`);
306
+ console.error(
307
+ `${ansis.red}===============================================${ansis.clear}`
308
+ );
291
309
  console.error();
292
310
  if (err instanceof UserError) {
293
311
  console.error(`${ansis.red}ERROR!${ansis.clear} ${err.message}`);
294
312
  } else {
295
- console.error(
296
- "An error occurred during the initialization process."
297
- );
313
+ console.error("An error occurred during the initialization process.");
298
314
  }
299
315
  console.error();
300
- console.error(`${ansis.red}===============================================${ansis.clear}`);
316
+ console.error(
317
+ `${ansis.red}===============================================${ansis.clear}`
318
+ );
301
319
  console.error();
302
320
  console.error(
303
- "If you need assistance, please try installing Slack manually as described in https://docs.stack-auth.com/docs/getting-started/setup or join our Discord where we're happy to help: https://discord.stack-auth.com"
321
+ "If you need assistance, please try installing Stack manually as described in https://docs.stack-auth.com/docs/getting-started/setup or join our Discord where we're happy to help: https://discord.stack-auth.com"
304
322
  );
305
323
  if (!(err instanceof UserError)) {
306
324
  console.error("");
@@ -455,16 +473,19 @@ async function getPackageManager() {
455
473
  return answers.packageManager;
456
474
  }
457
475
 
458
-
459
476
  async function shellNicelyFormatted(command, { quiet, ...options }) {
460
477
  console.log();
461
478
  const ui = new inquirer.ui.BottomBar();
462
479
  let dots = 4;
463
- ui.updateBottomBar(`${ansis.blue}Running command: ${command}...${ansis.clear}`);
480
+ ui.updateBottomBar(
481
+ `${ansis.blue}Running command: ${command}...${ansis.clear}`
482
+ );
464
483
  const interval = setInterval(() => {
465
484
  if (!isDryRun) {
466
485
  ui.updateBottomBar(
467
- `${ansis.blue}Running command: ${command}${".".repeat(dots++ % 5)}${ansis.clear}`
486
+ `${ansis.blue}Running command: ${command}${".".repeat(dots++ % 5)}${
487
+ ansis.clear
488
+ }`
468
489
  );
469
490
  }
470
491
  }, 700);
@@ -494,7 +515,11 @@ async function shellNicelyFormatted(command, { quiet, ...options }) {
494
515
  }
495
516
  } finally {
496
517
  clearTimeout(interval);
497
- ui.updateBottomBar(quiet ? "" : `${ansis.green}√${ansis.clear} Command ${command} succeeded\n`);
518
+ ui.updateBottomBar(
519
+ quiet
520
+ ? ""
521
+ : `${ansis.green}√${ansis.clear} Command ${command} succeeded\n`
522
+ );
498
523
  ui.close();
499
524
  }
500
525
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackframe/init-stack",
3
- "version": "2.5.27",
3
+ "version": "2.5.29",
4
4
  "description": "The setup wizard for Stack. https://stack-auth.com",
5
5
  "main": "index.mjs",
6
6
  "bin": "./index.mjs",