create-authhero 0.31.0 → 0.32.0

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.
@@ -81,7 +81,9 @@ try {
81
81
  copyDirectory(widgetSourceDir, widgetTargetDir);
82
82
  } else {
83
83
  console.warn(`⚠️ Widget directory not found: ${widgetSourceDir}`);
84
- console.warn("Widget features may not work. Install @authhero/widget to enable.");
84
+ console.warn(
85
+ "Widget features may not work. Install @authhero/widget to enable.",
86
+ );
85
87
  }
86
88
 
87
89
  console.log(`✅ Assets copied to ${targetDir}`);
@@ -81,7 +81,9 @@ try {
81
81
  copyDirectory(widgetSourceDir, widgetTargetDir);
82
82
  } else {
83
83
  console.warn(`⚠️ Widget directory not found: ${widgetSourceDir}`);
84
- console.warn("Widget features may not work. Install @authhero/widget to enable.");
84
+ console.warn(
85
+ "Widget features may not work. Install @authhero/widget to enable.",
86
+ );
85
87
  }
86
88
 
87
89
  console.log(`✅ Assets copied to ${targetDir}`);
@@ -49,13 +49,13 @@ async function waitForWorker(maxAttempts = 30, delayMs = 1000) {
49
49
  try {
50
50
  // Just check if the server responds (even with an error is fine)
51
51
  const response = await fetch(workerUrl, {
52
- signal: AbortSignal.timeout(2000)
52
+ signal: AbortSignal.timeout(2000),
53
53
  });
54
54
  // Any response means the server is up
55
55
  return true;
56
56
  } catch (e) {
57
57
  // ECONNREFUSED means server not ready yet
58
- if (e.cause?.code !== 'ECONNREFUSED') {
58
+ if (e.cause?.code !== "ECONNREFUSED") {
59
59
  // Other errors might mean the server is actually responding
60
60
  return true;
61
61
  }
@@ -69,7 +69,9 @@ async function waitForWorker(maxAttempts = 30, delayMs = 1000) {
69
69
 
70
70
  await setTimeout(delayMs);
71
71
  if (i > 0 && i % 5 === 0) {
72
- console.log(`Still waiting for worker... (attempt ${i + 1}/${maxAttempts})`);
72
+ console.log(
73
+ `Still waiting for worker... (attempt ${i + 1}/${maxAttempts})`,
74
+ );
73
75
  }
74
76
  }
75
77
  return false;
@@ -857,7 +857,10 @@ T.version("1.0.0").description("Create a new AuthHero project").argument("[proje
857
857
  ).option("--multi-tenant", "enable multi-tenant mode").option("--skip-install", "skip installing dependencies").option("--skip-migrate", "skip running database migrations").option("--skip-seed", "skip seeding the database").option("--skip-start", "skip starting the development server").option("--github-ci", "include GitHub CI workflows with semantic versioning").option("--conformance", "add OpenID conformance suite test clients").option(
858
858
  "--conformance-alias <alias>",
859
859
  "alias for conformance suite (default: authhero-local)"
860
- ).option("--workspace", "use workspace:* dependencies for local monorepo development").option("-y, --yes", "skip all prompts and use defaults/provided options").action(async (o, e) => {
860
+ ).option(
861
+ "--workspace",
862
+ "use workspace:* dependencies for local monorepo development"
863
+ ).option("-y, --yes", "skip all prompts and use defaults/provided options").action(async (o, e) => {
861
864
  const r = e.yes === !0;
862
865
  console.log(`
863
866
  🔐 Welcome to AuthHero!
@@ -921,7 +924,11 @@ T.version("1.0.0").description("Create a new AuthHero project").argument("[proje
921
924
  const y = p[s];
922
925
  a.mkdirSync(t, { recursive: !0 }), a.writeFileSync(
923
926
  l.join(t, "package.json"),
924
- JSON.stringify(y.packageJson(n, c, g, C), null, 2)
927
+ JSON.stringify(
928
+ y.packageJson(n, c, g, C),
929
+ null,
930
+ 2
931
+ )
925
932
  );
926
933
  const b = y.templateDir, k = l.join(
927
934
  import.meta.url.replace("file://", "").replace("/create-authhero.js", ""),
@@ -1085,13 +1092,9 @@ To start the development server:`), console.log(` cd ${n}`), console.log(" npm
1085
1092
  ❌ An error occurred:`, d), process.exit(1);
1086
1093
  }
1087
1094
  }
1088
- v || (console.log("Next steps:"), console.log(` cd ${n}`), s === "local" ? (console.log(" npm install"), console.log(" npm run migrate"), console.log(
1089
- " npm run seed # defaults to admin/admin"
1090
- ), console.log(" npm run dev")) : s === "cloudflare" ? (console.log(" npm install"), console.log(
1095
+ v || (console.log("Next steps:"), console.log(` cd ${n}`), s === "local" ? (console.log(" npm install"), console.log(" npm run migrate"), console.log(" npm run seed # defaults to admin/admin"), console.log(" npm run dev")) : s === "cloudflare" ? (console.log(" npm install"), console.log(
1091
1096
  " npm run migrate # or npm run db:migrate:remote for production"
1092
- ), console.log(
1093
- " npm run seed # defaults to admin/admin"
1094
- ), console.log(" npm run dev # or npm run dev:remote for production")) : s === "aws-sst" && (console.log(" npm install"), console.log(" npm run dev # Deploys to AWS in development mode"), console.log(" # After deploy, get TABLE_NAME from output, then:"), console.log(
1097
+ ), console.log(" npm run seed # defaults to admin/admin"), console.log(" npm run dev # or npm run dev:remote for production")) : s === "aws-sst" && (console.log(" npm install"), console.log(" npm run dev # Deploys to AWS in development mode"), console.log(" # After deploy, get TABLE_NAME from output, then:"), console.log(
1095
1098
  " TABLE_NAME=<your-table> npm run seed # defaults to admin/admin"
1096
1099
  )), console.log(`
1097
1100
  Server will be available at: https://localhost:3000`), console.log("Portal available at: https://local.authhero.net"), g && (console.log(`
package/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import './dist/create-authhero.js'
3
+ import "./dist/create-authhero.js";
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "https://github.com/markusahlstrand/authhero"
7
7
  },
8
- "version": "0.31.0",
8
+ "version": "0.32.0",
9
9
  "type": "module",
10
10
  "main": "dist/create-authhero.js",
11
11
  "bin": {