create-cronus-stack 0.6.4 → 0.6.5
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/dist/scaffold.js +19 -10
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
package/dist/scaffold.js
CHANGED
|
@@ -986,6 +986,19 @@ function newId(): string {
|
|
|
986
986
|
return crypto.randomUUID().replaceAll("-", "");
|
|
987
987
|
}
|
|
988
988
|
|
|
989
|
+
function authBaseURL() {
|
|
990
|
+
const env = process.env.BETTER_AUTH_URL;
|
|
991
|
+
const hosts = ["localhost:*", "127.0.0.1:*"];
|
|
992
|
+
if (env) {
|
|
993
|
+
try {
|
|
994
|
+
hosts.push(new URL(env).host);
|
|
995
|
+
} catch {
|
|
996
|
+
// ignore invalid BETTER_AUTH_URL
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
return { allowedHosts: hosts, fallback: env || "http://localhost:3000" };
|
|
1000
|
+
}
|
|
1001
|
+
|
|
989
1002
|
export const auth = betterAuth({
|
|
990
1003
|
database: drizzleAdapter(db, { provider: "${provider}", schema }),
|
|
991
1004
|
emailAndPassword: {
|
|
@@ -1044,14 +1057,13 @@ export const auth = betterAuth({
|
|
|
1044
1057
|
plugins: [
|
|
1045
1058
|
organization({
|
|
1046
1059
|
sendInvitationEmail: async (data) => {
|
|
1047
|
-
|
|
1048
|
-
console.info(\`Invite \${data.email}: \${base}/accept-invitation?id=\${data.id}\`);
|
|
1060
|
+
console.info(\`Invite \${data.email}: /accept-invitation?id=\${data.id}\`);
|
|
1049
1061
|
},
|
|
1050
1062
|
}),
|
|
1051
1063
|
nextCookies(),
|
|
1052
1064
|
],
|
|
1053
1065
|
secret: process.env.BETTER_AUTH_SECRET,
|
|
1054
|
-
baseURL:
|
|
1066
|
+
baseURL: authBaseURL(),
|
|
1055
1067
|
});
|
|
1056
1068
|
`;
|
|
1057
1069
|
}
|
|
@@ -1084,13 +1096,10 @@ export function middleware(request: NextRequest) {
|
|
|
1084
1096
|
if (invitation) url.searchParams.set("invitation", invitation);
|
|
1085
1097
|
return NextResponse.redirect(url);
|
|
1086
1098
|
}
|
|
1087
|
-
if (sessionCookie && isAuthPage) {
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
);
|
|
1092
|
-
}
|
|
1093
|
-
return NextResponse.redirect(new URL("/", request.url));
|
|
1099
|
+
if (sessionCookie && isAuthPage && invitation) {
|
|
1100
|
+
return NextResponse.redirect(
|
|
1101
|
+
new URL(\`/accept-invitation?id=\${encodeURIComponent(invitation)}\`, request.url),
|
|
1102
|
+
);
|
|
1094
1103
|
}
|
|
1095
1104
|
return NextResponse.next();
|
|
1096
1105
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const CREATE_STACK_VERSION = "0.6.
|
|
1
|
+
export declare const CREATE_STACK_VERSION = "0.6.5";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const CREATE_STACK_VERSION = "0.6.
|
|
1
|
+
export const CREATE_STACK_VERSION = "0.6.5";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-cronus-stack",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5",
|
|
4
4
|
"description": "Scaffold a Cronus stack from the Cronus Stack Builder contract: app files, stack.json, KICKOFF.md, and optional AI Kit.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"prepublishOnly": "tsc -p tsconfig.json"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@cronus-ui/ai-kit": "0.6.
|
|
48
|
-
"@cronus-ui/stack": "0.6.
|
|
47
|
+
"@cronus-ui/ai-kit": "0.6.5",
|
|
48
|
+
"@cronus-ui/stack": "0.6.5"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/node": "^22.10.0",
|