create-authhero 0.35.0 โ†’ 0.36.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.
@@ -103,11 +103,15 @@ try {
103
103
  // Inject runtime config into index.html
104
104
  // Uses window.location.origin so the admin UI automatically points to its own server
105
105
  const adminIndexPath = path.join(adminSourceDir, "index.html");
106
- const adminHtml = fs.readFileSync(adminIndexPath, "utf-8")
106
+ const adminHtml = fs
107
+ .readFileSync(adminIndexPath, "utf-8")
107
108
  .replace(/src="\.\/assets\//g, 'src="/admin/assets/')
108
109
  .replace(/href="\.\/assets\//g, 'href="/admin/assets/');
109
110
  const configScript = `<script>window.__AUTHHERO_ADMIN_CONFIG__={domain:window.location.origin,basePath:"/admin"}</script>`;
110
- const injectedHtml = adminHtml.replace("</head>", configScript + "\n</head>");
111
+ const injectedHtml = adminHtml.replace(
112
+ "</head>",
113
+ configScript + "\n</head>",
114
+ );
111
115
 
112
116
  // Write injected HTML to CDN assets (for direct /admin/ access)
113
117
  fs.writeFileSync(path.join(adminTargetDir, "index.html"), injectedHtml);
@@ -732,9 +732,7 @@ function H(n, e) {
732
732
  );
733
733
  }
734
734
  function I() {
735
- console.log("\\n" + "โ”€".repeat(50)), console.log("๐Ÿ” AuthHero deployed to AWS!"), console.log("๐Ÿ“š Check SST output for your API URL"), console.log(
736
- "๐Ÿš€ Open your server URL /setup to complete initial setup"
737
- ), console.log("๐ŸŒ Portal available at https://local.authhero.net"), console.log("โ”€".repeat(50) + "\\n");
735
+ console.log("\\n" + "โ”€".repeat(50)), console.log("๐Ÿ” AuthHero deployed to AWS!"), console.log("๐Ÿ“š Check SST output for your API URL"), console.log("๐Ÿš€ Open your server URL /setup to complete initial setup"), console.log("๐ŸŒ Portal available at https://local.authhero.net"), console.log("โ”€".repeat(50) + "\\n");
738
736
  }
739
737
  function M(n) {
740
738
  const e = i.join(n, ".github", "workflows");
@@ -874,16 +872,12 @@ function W(n, e, r) {
874
872
  }
875
873
  function x() {
876
874
  console.log(`
877
- ` + "โ”€".repeat(50)), console.log("๐Ÿ” AuthHero server running at https://localhost:3000"), console.log("๐Ÿ“š API documentation available at https://localhost:3000/docs"), console.log(
878
- "๐Ÿš€ Open https://localhost:3000/setup to complete initial setup"
879
- ), console.log("๐ŸŒ Portal available at https://local.authhero.net"), console.log("โ”€".repeat(50) + `
875
+ ` + "โ”€".repeat(50)), console.log("๐Ÿ” AuthHero server running at https://localhost:3000"), console.log("๐Ÿ“š API documentation available at https://localhost:3000/docs"), console.log("๐Ÿš€ Open https://localhost:3000/setup to complete initial setup"), console.log("๐ŸŒ Portal available at https://local.authhero.net"), console.log("โ”€".repeat(50) + `
880
876
  `);
881
877
  }
882
878
  function k() {
883
879
  console.log(`
884
- ` + "โ”€".repeat(50)), console.log("โœ… Self-signed certificates generated with openssl"), console.log("โš ๏ธ You may need to trust the certificate in your browser"), console.log("๐Ÿ” AuthHero server running at https://localhost:3000"), console.log("๐Ÿ“š API documentation available at https://localhost:3000/docs"), console.log(
885
- "๐Ÿš€ Open https://localhost:3000/setup to complete initial setup"
886
- ), console.log("๐ŸŒ Portal available at https://local.authhero.net"), console.log("โ”€".repeat(50) + `
880
+ ` + "โ”€".repeat(50)), console.log("โœ… Self-signed certificates generated with openssl"), console.log("โš ๏ธ You may need to trust the certificate in your browser"), console.log("๐Ÿ” AuthHero server running at https://localhost:3000"), console.log("๐Ÿ“š API documentation available at https://localhost:3000/docs"), console.log("๐Ÿš€ Open https://localhost:3000/setup to complete initial setup"), console.log("๐ŸŒ Portal available at https://local.authhero.net"), console.log("โ”€".repeat(50) + `
887
881
  `);
888
882
  }
889
883
  D.version("1.0.0").description("Create a new AuthHero project").argument("[project-name]", "name of the project").option("-t, --template <type>", "template type: local or cloudflare").option(
@@ -968,7 +962,13 @@ D.version("1.0.0").description("Create a new AuthHero project").argument("[proje
968
962
  s.mkdirSync(o, { recursive: !0 }), s.writeFileSync(
969
963
  i.join(o, "package.json"),
970
964
  JSON.stringify(
971
- y.packageJson(a, c, f, C, d),
965
+ y.packageJson(
966
+ a,
967
+ c,
968
+ f,
969
+ C,
970
+ d
971
+ ),
972
972
  null,
973
973
  2
974
974
  )
@@ -1108,10 +1108,8 @@ Open https://localhost:3000/setup to complete initial setup`
1108
1108
  ), console.log(" npm run dev # or npm run dev:remote for production"), console.log(
1109
1109
  `
1110
1110
  Open https://localhost:3000/setup to complete initial setup`
1111
- )) : t === "aws-sst" && (console.log(" npm install"), console.log(" npm run dev # Deploys to AWS in development mode"), console.log(
1112
- `
1113
- Open your server URL /setup to complete initial setup`
1114
- )), console.log(`
1111
+ )) : t === "aws-sst" && (console.log(" npm install"), console.log(" npm run dev # Deploys to AWS in development mode"), console.log(`
1112
+ Open your server URL /setup to complete initial setup`)), console.log(`
1115
1113
  Server will be available at: https://localhost:3000`), console.log("Portal available at: https://local.authhero.net"), f && (console.log(`
1116
1114
  ๐Ÿงช OpenID Conformance Suite Testing:`), console.log(
1117
1115
  " 1. Clone and start the conformance suite (if not already running):"
@@ -34,7 +34,8 @@ export default function createApp(config: AuthHeroConfig) {
34
34
  if (fs.existsSync(adminIndexPath)) {
35
35
  const issuer =
36
36
  process.env.ISSUER || `https://localhost:${process.env.PORT || 3000}/`;
37
- const rawHtml = fs.readFileSync(adminIndexPath, "utf-8")
37
+ const rawHtml = fs
38
+ .readFileSync(adminIndexPath, "utf-8")
38
39
  .replace(/src="\.\/assets\//g, 'src="/admin/assets/')
39
40
  .replace(/href="\.\/assets\//g, 'href="/admin/assets/');
40
41
  const configJson = JSON.stringify({
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.35.0",
8
+ "version": "0.36.0",
9
9
  "type": "module",
10
10
  "main": "dist/create-authhero.js",
11
11
  "bin": {