create-authhero 0.30.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(
|
|
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(
|
|
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 !==
|
|
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(
|
|
72
|
+
console.log(
|
|
73
|
+
`Still waiting for worker... (attempt ${i + 1}/${maxAttempts})`,
|
|
74
|
+
);
|
|
73
75
|
}
|
|
74
76
|
}
|
|
75
77
|
return false;
|
package/dist/create-authhero.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Command as
|
|
2
|
+
import { Command as R } from "commander";
|
|
3
3
|
import u from "inquirer";
|
|
4
|
-
import
|
|
4
|
+
import a from "fs";
|
|
5
5
|
import l from "path";
|
|
6
|
-
import { spawn as
|
|
7
|
-
const
|
|
6
|
+
import { spawn as I } from "child_process";
|
|
7
|
+
const T = new R(), p = {
|
|
8
8
|
local: {
|
|
9
9
|
name: "Local (SQLite)",
|
|
10
10
|
description: "Local development setup with SQLite database - great for getting started",
|
|
@@ -134,13 +134,13 @@ const I = new U(), p = {
|
|
|
134
134
|
}
|
|
135
135
|
};
|
|
136
136
|
function E(o, e) {
|
|
137
|
-
|
|
138
|
-
const t = l.join(o, n),
|
|
139
|
-
|
|
137
|
+
a.readdirSync(o).forEach((n) => {
|
|
138
|
+
const t = l.join(o, n), s = l.join(e, n);
|
|
139
|
+
a.lstatSync(t).isDirectory() ? (a.mkdirSync(s, { recursive: !0 }), E(t, s)) : a.copyFileSync(t, s);
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
const n = o ? "control_plane" : "main", t = o ? "Control Plane" : "Main",
|
|
142
|
+
function U(o, e = !1, r = "authhero-local") {
|
|
143
|
+
const n = o ? "control_plane" : "main", t = o ? "Control Plane" : "Main", s = [
|
|
144
144
|
"https://manage.authhero.net/auth-callback",
|
|
145
145
|
"https://local.authhero.net/auth-callback",
|
|
146
146
|
"http://localhost:5173/auth-callback",
|
|
@@ -148,7 +148,7 @@ function j(o, e = !1, r = "authhero-local") {
|
|
|
148
148
|
], c = e ? [
|
|
149
149
|
`https://localhost.emobix.co.uk:8443/test/a/${r}/callback`,
|
|
150
150
|
`https://localhost:8443/test/a/${r}/callback`
|
|
151
|
-
] : [], g = [...
|
|
151
|
+
] : [], g = [...s, ...c], w = [
|
|
152
152
|
"https://manage.authhero.net",
|
|
153
153
|
"https://local.authhero.net",
|
|
154
154
|
"http://localhost:5173",
|
|
@@ -210,7 +210,7 @@ function j(o, e = !1, r = "authhero-local") {
|
|
|
210
210
|
// This is required for OIDCC-5.4 (VerifyScopesReturnedInUserInfoClaims) test
|
|
211
211
|
try {
|
|
212
212
|
await adapters.users.create("${n}", {
|
|
213
|
-
user_id:
|
|
213
|
+
user_id: \`\${USERNAME_PASSWORD_PROVIDER}|conformance-user\`,
|
|
214
214
|
email: "conformance@example.com",
|
|
215
215
|
email_verified: true,
|
|
216
216
|
name: "Conformance Test User",
|
|
@@ -227,7 +227,7 @@ function j(o, e = !1, r = "authhero-local") {
|
|
|
227
227
|
zoneinfo: "Europe/London",
|
|
228
228
|
locale: "en-US",
|
|
229
229
|
connection: "Username-Password-Authentication",
|
|
230
|
-
provider:
|
|
230
|
+
provider: USERNAME_PASSWORD_PROVIDER,
|
|
231
231
|
is_social: false,
|
|
232
232
|
});
|
|
233
233
|
console.log("✅ Created conformance test user (conformance@example.com)");
|
|
@@ -245,7 +245,7 @@ function j(o, e = !1, r = "authhero-local") {
|
|
|
245
245
|
const bcrypt = await import("bcryptjs");
|
|
246
246
|
const hashedPassword = await bcrypt.hash("ConformanceTest123!", 10);
|
|
247
247
|
await adapters.passwords.create("${n}", {
|
|
248
|
-
user_id:
|
|
248
|
+
user_id: \`\${USERNAME_PASSWORD_PROVIDER}|conformance-user\`,
|
|
249
249
|
password: hashedPassword,
|
|
250
250
|
});
|
|
251
251
|
console.log("✅ Created password for conformance test user");
|
|
@@ -289,7 +289,7 @@ ${b}
|
|
|
289
289
|
main().catch(console.error);
|
|
290
290
|
`;
|
|
291
291
|
}
|
|
292
|
-
function
|
|
292
|
+
function O(o) {
|
|
293
293
|
return o ? `import { Context } from "hono";
|
|
294
294
|
import { swaggerUI } from "@hono/swagger-ui";
|
|
295
295
|
import { AuthHeroConfig, DataAdapters } from "authhero";
|
|
@@ -393,7 +393,7 @@ export default function createApp(config: AuthHeroConfig) {
|
|
|
393
393
|
}
|
|
394
394
|
`;
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function j(o) {
|
|
397
397
|
return `import { D1Dialect } from "kysely-d1";
|
|
398
398
|
import { Kysely } from "kysely";
|
|
399
399
|
import createAdapters from "@authhero/kysely-adapter";
|
|
@@ -453,7 +453,7 @@ export default {
|
|
|
453
453
|
};
|
|
454
454
|
`;
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function L(o) {
|
|
457
457
|
return o ? `import { Context } from "hono";
|
|
458
458
|
import { swaggerUI } from "@hono/swagger-ui";
|
|
459
459
|
import { AuthHeroConfig, DataAdapters } from "authhero";
|
|
@@ -681,20 +681,20 @@ main().catch(console.error);
|
|
|
681
681
|
}
|
|
682
682
|
function H(o, e) {
|
|
683
683
|
const r = l.join(o, "src");
|
|
684
|
-
|
|
684
|
+
a.writeFileSync(
|
|
685
685
|
l.join(r, "app.ts"),
|
|
686
686
|
$(e)
|
|
687
|
-
),
|
|
687
|
+
), a.writeFileSync(
|
|
688
688
|
l.join(r, "seed.ts"),
|
|
689
689
|
M(e)
|
|
690
690
|
);
|
|
691
691
|
}
|
|
692
|
-
function
|
|
692
|
+
function D(o) {
|
|
693
693
|
console.log("\\n" + "─".repeat(50)), console.log("🔐 AuthHero deployed to AWS!"), console.log("📚 Check SST output for your API URL"), console.log("🌐 Portal available at https://local.authhero.net"), console.log(o ? "🏢 Multi-tenant mode enabled with control_plane tenant" : "🏠 Single-tenant mode with 'main' tenant"), console.log("─".repeat(50) + "\\n");
|
|
694
694
|
}
|
|
695
695
|
function F(o) {
|
|
696
696
|
const e = l.join(o, ".github", "workflows");
|
|
697
|
-
|
|
697
|
+
a.mkdirSync(e, { recursive: !0 });
|
|
698
698
|
const r = `name: Unit tests
|
|
699
699
|
|
|
700
700
|
on: push
|
|
@@ -781,7 +781,7 @@ jobs:
|
|
|
781
781
|
apiToken: \${{ secrets.PROD_CLOUDFLARE_API_TOKEN }}
|
|
782
782
|
command: deploy --env production
|
|
783
783
|
`;
|
|
784
|
-
|
|
784
|
+
a.writeFileSync(l.join(e, "unit-tests.yml"), r), a.writeFileSync(l.join(e, "deploy-dev.yml"), n), a.writeFileSync(l.join(e, "release.yml"), t), console.log("\\n📦 GitHub CI workflows created!");
|
|
785
785
|
}
|
|
786
786
|
function W(o) {
|
|
787
787
|
const e = {
|
|
@@ -792,11 +792,11 @@ function W(o) {
|
|
|
792
792
|
"@semantic-release/github"
|
|
793
793
|
]
|
|
794
794
|
};
|
|
795
|
-
|
|
795
|
+
a.writeFileSync(
|
|
796
796
|
l.join(o, ".releaserc.json"),
|
|
797
797
|
JSON.stringify(e, null, 2)
|
|
798
798
|
);
|
|
799
|
-
const r = l.join(o, "package.json"), n = JSON.parse(
|
|
799
|
+
const r = l.join(o, "package.json"), n = JSON.parse(a.readFileSync(r, "utf-8"));
|
|
800
800
|
n.devDependencies = {
|
|
801
801
|
...n.devDependencies,
|
|
802
802
|
"semantic-release": "^24.0.0"
|
|
@@ -804,60 +804,63 @@ function W(o) {
|
|
|
804
804
|
...n.scripts,
|
|
805
805
|
test: 'echo "No tests yet"',
|
|
806
806
|
"type-check": "tsc --noEmit"
|
|
807
|
-
},
|
|
807
|
+
}, a.writeFileSync(r, JSON.stringify(n, null, 2));
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function A(o, e) {
|
|
810
810
|
return new Promise((r, n) => {
|
|
811
|
-
const t =
|
|
811
|
+
const t = I(o, [], {
|
|
812
812
|
cwd: e,
|
|
813
813
|
shell: !0,
|
|
814
814
|
stdio: "inherit"
|
|
815
815
|
});
|
|
816
|
-
t.on("close", (
|
|
817
|
-
|
|
816
|
+
t.on("close", (s) => {
|
|
817
|
+
s === 0 ? r() : n(new Error(`Command failed with exit code ${s}`));
|
|
818
818
|
}), t.on("error", n);
|
|
819
819
|
});
|
|
820
820
|
}
|
|
821
|
-
function
|
|
821
|
+
function _(o, e, r) {
|
|
822
822
|
return new Promise((n, t) => {
|
|
823
|
-
const
|
|
823
|
+
const s = I(o, [], {
|
|
824
824
|
cwd: e,
|
|
825
825
|
shell: !0,
|
|
826
826
|
stdio: "inherit",
|
|
827
827
|
env: { ...process.env, ...r }
|
|
828
828
|
});
|
|
829
|
-
|
|
829
|
+
s.on("close", (c) => {
|
|
830
830
|
c === 0 ? n() : t(new Error(`Command failed with exit code ${c}`));
|
|
831
|
-
}),
|
|
831
|
+
}), s.on("error", t);
|
|
832
832
|
});
|
|
833
833
|
}
|
|
834
834
|
function q(o, e) {
|
|
835
835
|
const r = l.join(o, "src");
|
|
836
|
-
|
|
836
|
+
a.writeFileSync(
|
|
837
837
|
l.join(r, "app.ts"),
|
|
838
|
-
|
|
839
|
-
),
|
|
838
|
+
L(e)
|
|
839
|
+
), a.writeFileSync(
|
|
840
840
|
l.join(r, "seed.ts"),
|
|
841
|
-
|
|
841
|
+
j(e)
|
|
842
842
|
);
|
|
843
843
|
}
|
|
844
|
-
function
|
|
844
|
+
function x(o) {
|
|
845
845
|
console.log(`
|
|
846
846
|
` + "─".repeat(50)), console.log("🔐 AuthHero server running at https://localhost:3000"), console.log("📚 API documentation available at https://localhost:3000/docs"), console.log("🌐 Portal available at https://local.authhero.net"), console.log(o ? "🏢 Multi-tenant mode enabled with control_plane tenant" : "🏠 Single-tenant mode with 'main' tenant"), console.log("─".repeat(50) + `
|
|
847
847
|
`);
|
|
848
848
|
}
|
|
849
|
-
function
|
|
849
|
+
function N(o) {
|
|
850
850
|
console.log(`
|
|
851
851
|
` + "─".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("🌐 Portal available at https://local.authhero.net"), console.log(o ? "🏢 Multi-tenant mode enabled with control_plane tenant" : "🏠 Single-tenant mode with 'main' tenant"), console.log("─".repeat(50) + `
|
|
852
852
|
`);
|
|
853
853
|
}
|
|
854
|
-
|
|
854
|
+
T.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("-e, --email <email>", "admin email address").option("-p, --password <password>", "admin password (min 8 characters)").option(
|
|
855
855
|
"--package-manager <pm>",
|
|
856
856
|
"package manager to use: npm, yarn, pnpm, or bun"
|
|
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(
|
|
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!
|
|
@@ -873,9 +876,9 @@ I.version("1.0.0").description("Create a new AuthHero project").argument("[proje
|
|
|
873
876
|
}
|
|
874
877
|
])).projectName);
|
|
875
878
|
const t = l.join(process.cwd(), n);
|
|
876
|
-
|
|
877
|
-
let
|
|
878
|
-
e.template ? (["local", "cloudflare", "aws-sst"].includes(e.template) || (console.error(`❌ Invalid template: ${e.template}`), console.error("Valid options: local, cloudflare, aws-sst"), process.exit(1)),
|
|
879
|
+
a.existsSync(t) && (console.error(`❌ Project "${n}" already exists.`), process.exit(1));
|
|
880
|
+
let s;
|
|
881
|
+
e.template ? (["local", "cloudflare", "aws-sst"].includes(e.template) || (console.error(`❌ Invalid template: ${e.template}`), console.error("Valid options: local, cloudflare, aws-sst"), process.exit(1)), s = e.template, console.log(`Using template: ${p[s].name}`)) : s = (await u.prompt([
|
|
879
882
|
{
|
|
880
883
|
type: "list",
|
|
881
884
|
name: "setupType",
|
|
@@ -918,42 +921,46 @@ I.version("1.0.0").description("Create a new AuthHero project").argument("[proje
|
|
|
918
921
|
);
|
|
919
922
|
const C = e.workspace || !1;
|
|
920
923
|
C && console.log("Workspace mode: enabled (using workspace:* dependencies)");
|
|
921
|
-
const y = p[
|
|
922
|
-
|
|
924
|
+
const y = p[s];
|
|
925
|
+
a.mkdirSync(t, { recursive: !0 }), a.writeFileSync(
|
|
923
926
|
l.join(t, "package.json"),
|
|
924
|
-
JSON.stringify(
|
|
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", ""),
|
|
928
935
|
b
|
|
929
936
|
);
|
|
930
|
-
if (
|
|
937
|
+
if (a.existsSync(k) ? E(k, t) : (console.error(`❌ Template directory not found: ${k}`), process.exit(1)), s === "cloudflare" && q(t, c), s === "cloudflare") {
|
|
931
938
|
const i = l.join(t, "wrangler.toml"), d = l.join(t, "wrangler.local.toml");
|
|
932
|
-
|
|
939
|
+
a.existsSync(i) && a.copyFileSync(i, d);
|
|
933
940
|
const m = l.join(t, ".dev.vars.example"), f = l.join(t, ".dev.vars");
|
|
934
|
-
|
|
941
|
+
a.existsSync(m) && a.copyFileSync(m, f), console.log(
|
|
935
942
|
"📁 Created wrangler.local.toml and .dev.vars for local development"
|
|
936
943
|
);
|
|
937
944
|
}
|
|
938
|
-
let
|
|
939
|
-
if (
|
|
945
|
+
let S = !1;
|
|
946
|
+
if (s === "cloudflare" && (e.githubCi !== void 0 ? (S = e.githubCi, S && console.log("Including GitHub CI workflows with semantic versioning")) : r || (S = (await u.prompt([
|
|
940
947
|
{
|
|
941
948
|
type: "confirm",
|
|
942
949
|
name: "includeGithubCi",
|
|
943
950
|
message: "Would you like to include GitHub CI with semantic versioning?",
|
|
944
951
|
default: !1
|
|
945
952
|
}
|
|
946
|
-
])).includeGithubCi),
|
|
947
|
-
const i =
|
|
953
|
+
])).includeGithubCi), S && (F(t), W(t))), s === "local") {
|
|
954
|
+
const i = U(
|
|
948
955
|
c,
|
|
949
956
|
g,
|
|
950
957
|
w
|
|
951
958
|
);
|
|
952
|
-
|
|
953
|
-
const d =
|
|
954
|
-
|
|
959
|
+
a.writeFileSync(l.join(t, "src/seed.ts"), i);
|
|
960
|
+
const d = O(c);
|
|
961
|
+
a.writeFileSync(l.join(t, "src/app.ts"), d);
|
|
955
962
|
}
|
|
956
|
-
if (
|
|
963
|
+
if (s === "aws-sst" && H(t, c), g) {
|
|
957
964
|
const i = {
|
|
958
965
|
alias: w,
|
|
959
966
|
description: "AuthHero Conformance Test",
|
|
@@ -972,7 +979,7 @@ I.version("1.0.0").description("Create a new AuthHero project").argument("[proje
|
|
|
972
979
|
resourceUrl: "http://host.docker.internal:3000/userinfo"
|
|
973
980
|
}
|
|
974
981
|
};
|
|
975
|
-
|
|
982
|
+
a.writeFileSync(
|
|
976
983
|
l.join(t, "conformance-config.json"),
|
|
977
984
|
JSON.stringify(i, null, 2)
|
|
978
985
|
), console.log(
|
|
@@ -1015,11 +1022,11 @@ I.version("1.0.0").description("Create a new AuthHero project").argument("[proje
|
|
|
1015
1022
|
`);
|
|
1016
1023
|
try {
|
|
1017
1024
|
const d = i === "pnpm" ? "pnpm install --ignore-workspace" : `${i} install`;
|
|
1018
|
-
if (await
|
|
1025
|
+
if (await A(d, t), s === "local" && (console.log(`
|
|
1019
1026
|
🔧 Building native modules...
|
|
1020
|
-
`), await
|
|
1027
|
+
`), await A("npm rebuild better-sqlite3", t)), console.log(`
|
|
1021
1028
|
✅ Dependencies installed successfully!
|
|
1022
|
-
`),
|
|
1029
|
+
`), s === "local" || s === "cloudflare") {
|
|
1023
1030
|
let f;
|
|
1024
1031
|
if (e.skipMigrate && e.skipSeed ? f = !1 : r ? f = !e.skipMigrate || !e.skipSeed : f = (await u.prompt([
|
|
1025
1032
|
{
|
|
@@ -1049,16 +1056,16 @@ I.version("1.0.0").description("Create a new AuthHero project").argument("[proje
|
|
|
1049
1056
|
}
|
|
1050
1057
|
]), e.skipMigrate || (console.log(`
|
|
1051
1058
|
🔄 Running migrations...
|
|
1052
|
-
`), await
|
|
1059
|
+
`), await A(`${i} run migrate`, t)), e.skipSeed || (console.log(`
|
|
1053
1060
|
🌱 Seeding database...
|
|
1054
|
-
`),
|
|
1061
|
+
`), s === "local" ? await _(
|
|
1055
1062
|
`${i} run seed`,
|
|
1056
1063
|
t,
|
|
1057
1064
|
{
|
|
1058
1065
|
ADMIN_USERNAME: h.username,
|
|
1059
1066
|
ADMIN_PASSWORD: h.password
|
|
1060
1067
|
}
|
|
1061
|
-
) : await
|
|
1068
|
+
) : await _(
|
|
1062
1069
|
`${i} run seed:local`,
|
|
1063
1070
|
t,
|
|
1064
1071
|
{
|
|
@@ -1076,22 +1083,18 @@ I.version("1.0.0").description("Create a new AuthHero project").argument("[proje
|
|
|
1076
1083
|
message: "Would you like to start the development server?",
|
|
1077
1084
|
default: !0
|
|
1078
1085
|
}
|
|
1079
|
-
])).shouldStart, m && (
|
|
1080
|
-
`), await
|
|
1086
|
+
])).shouldStart, m && (s === "cloudflare" ? x(c) : s === "aws-sst" ? D(c) : N(c), console.log(`🚀 Starting development server...
|
|
1087
|
+
`), await A(`${i} run dev`, t)), r && !m && (console.log(`
|
|
1081
1088
|
✅ Setup complete!`), console.log(`
|
|
1082
|
-
To start the development server:`), console.log(` cd ${n}`), console.log(" npm run dev"),
|
|
1089
|
+
To start the development server:`), console.log(` cd ${n}`), console.log(" npm run dev"), s === "cloudflare" ? x(c) : s === "aws-sst" ? D(c) : N(c));
|
|
1083
1090
|
} catch (d) {
|
|
1084
1091
|
console.error(`
|
|
1085
1092
|
❌ An error occurred:`, d), process.exit(1);
|
|
1086
1093
|
}
|
|
1087
1094
|
}
|
|
1088
|
-
v || (console.log("Next steps:"), console.log(` cd ${n}`),
|
|
1089
|
-
" npm run seed # defaults to admin/admin"
|
|
1090
|
-
), console.log(" npm run dev")) : a === "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")) : a === "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(`
|
|
@@ -1105,4 +1108,4 @@ Server will be available at: https://localhost:3000`), console.log("Portal avail
|
|
|
1105
1108
|
For more information, visit: https://authhero.net/docs
|
|
1106
1109
|
`));
|
|
1107
1110
|
});
|
|
1108
|
-
|
|
1111
|
+
T.parse(process.argv);
|
package/index.js
CHANGED