@batijs/cli 0.0.194 → 0.0.196

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 (59) hide show
  1. package/dist/boilerplates/@batijs/auth0/files/$.env.js +5 -9
  2. package/dist/boilerplates/@batijs/auth0/files/$README.md.js +8 -17
  3. package/dist/boilerplates/@batijs/authjs/files/server/authjs-handler.ts +100 -0
  4. package/dist/boilerplates/@batijs/authjs/types/server/authjs-handler.d.ts +16 -0
  5. package/dist/boilerplates/@batijs/edgedb/files/$package.json.js +1 -1
  6. package/dist/boilerplates/@batijs/eslint/files/$package.json.js +2 -2
  7. package/dist/boilerplates/@batijs/eslint/files/.eslintrc.json +15 -2
  8. package/dist/boilerplates/@batijs/express/files/$package.json.js +10 -11
  9. package/dist/boilerplates/@batijs/express/files/express-entry.ts +51 -144
  10. package/dist/boilerplates/@batijs/express/types/express-entry.d.ts +5 -0
  11. package/dist/boilerplates/@batijs/fastify/files/$package.json.js +8 -12
  12. package/dist/boilerplates/@batijs/fastify/files/fastify-entry.ts +63 -149
  13. package/dist/boilerplates/@batijs/fastify/types/fastify-entry.d.ts +6 -0
  14. package/dist/boilerplates/@batijs/firebase-auth/files/$package.json.js +11 -3
  15. package/dist/boilerplates/@batijs/firebase-auth/files/libs/firebaseAdmin.ts +2 -1
  16. package/dist/boilerplates/@batijs/firebase-auth/files/server/firebase-auth-middleware.ts +72 -0
  17. package/dist/boilerplates/@batijs/firebase-auth/types/libs/firebaseAdmin.d.ts +2 -1
  18. package/dist/boilerplates/@batijs/firebase-auth/types/server/firebase-auth-middleware.d.ts +4 -0
  19. package/dist/boilerplates/@batijs/h3/files/$package.json.js +6 -8
  20. package/dist/boilerplates/@batijs/h3/files/h3-entry.ts +36 -175
  21. package/dist/boilerplates/@batijs/h3/types/h3-entry.d.ts +5 -0
  22. package/dist/boilerplates/@batijs/hattip/files/$package.json.js +8 -4
  23. package/dist/boilerplates/@batijs/hattip/files/hattip-entry.ts +40 -60
  24. package/dist/boilerplates/@batijs/hattip/types/hattip-entry.d.ts +1 -0
  25. package/dist/boilerplates/@batijs/hono/files/$package.json.js +8 -6
  26. package/dist/boilerplates/@batijs/hono/files/hono-entry.ts +54 -116
  27. package/dist/boilerplates/@batijs/hono/types/hono-entry.d.ts +5 -0
  28. package/dist/boilerplates/@batijs/react/files/$.eslintrc.json.js +0 -4
  29. package/dist/boilerplates/@batijs/react/files/$package.json.js +6 -6
  30. package/dist/boilerplates/@batijs/react-telefunc/files/pages/todo/TodoList.tsx +4 -4
  31. package/dist/boilerplates/@batijs/shared/files/package.json +2 -1
  32. package/dist/boilerplates/@batijs/shared-server/files/server/vike-handler.ts +15 -0
  33. package/dist/boilerplates/@batijs/shared-server/types/server/vike-handler.d.ts +2 -0
  34. package/dist/boilerplates/@batijs/solid/files/$package.json.js +1 -1
  35. package/dist/boilerplates/@batijs/solid-telefunc/files/pages/todo/+Page.tsx +6 -3
  36. package/dist/boilerplates/@batijs/solid-telefunc/files/pages/todo/+data.ts +9 -0
  37. package/dist/boilerplates/@batijs/solid-telefunc/files/pages/todo/TodoList.tsx +4 -4
  38. package/dist/boilerplates/@batijs/solid-telefunc/types/pages/todo/+Page.d.ts +1 -4
  39. package/dist/boilerplates/@batijs/solid-telefunc/types/pages/todo/+data.d.ts +2 -0
  40. package/dist/boilerplates/@batijs/solid-trpc/files/pages/todo-trpc/+Page.tsx +6 -3
  41. package/dist/boilerplates/@batijs/solid-trpc/files/pages/todo-trpc/+data.ts +9 -0
  42. package/dist/boilerplates/@batijs/solid-trpc/files/pages/todo-trpc/TodoList.tsx +4 -4
  43. package/dist/boilerplates/@batijs/solid-trpc/types/pages/todo-trpc/+Page.d.ts +1 -4
  44. package/dist/boilerplates/@batijs/solid-trpc/types/pages/todo-trpc/+data.d.ts +2 -0
  45. package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +1 -1
  46. package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +13 -1
  47. package/dist/boilerplates/@batijs/telefunc/files/server/telefunc-handler.ts +20 -0
  48. package/dist/boilerplates/@batijs/telefunc/types/server/telefunc-handler.d.ts +2 -0
  49. package/dist/boilerplates/@batijs/vercel/files/$package.json.js +3 -3
  50. package/dist/boilerplates/@batijs/vue/files/$package.json.js +1 -1
  51. package/dist/boilerplates/@batijs/vue-telefunc/files/components/TodoList.vue +6 -6
  52. package/dist/boilerplates/@batijs/vue-trpc/files/components/TodoListTrpc.vue +6 -6
  53. package/dist/boilerplates/boilerplates.json +35 -0
  54. package/dist/index.js +3 -6
  55. package/package.json +7 -7
  56. package/dist/boilerplates/@batijs/solid-telefunc/files/pages/todo/+onBeforeRender.ts +0 -15
  57. package/dist/boilerplates/@batijs/solid-telefunc/types/pages/todo/+onBeforeRender.d.ts +0 -8
  58. package/dist/boilerplates/@batijs/solid-trpc/files/pages/todo-trpc/+onBeforeRender.ts +0 -15
  59. package/dist/boilerplates/@batijs/solid-trpc/types/pages/todo-trpc/+onBeforeRender.d.ts +0 -8
@@ -2,22 +2,23 @@
2
2
  import "dotenv/config";
3
3
  import { dirname } from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
- import CredentialsProvider from "@auth/core/providers/credentials";
6
- import { firebaseAdmin } from "@batijs/firebase-auth/libs/firebaseAdmin";
5
+ import { authjsHandler, authjsSessionMiddleware } from "@batijs/authjs/server/authjs-handler";
6
+ import {
7
+ firebaseAuthLoginHandler,
8
+ firebaseAuthLogoutHandler,
9
+ firebaseAuthMiddleware,
10
+ } from "@batijs/firebase-auth/server/firebase-auth-middleware";
11
+ import { vikeHandler } from "@batijs/shared-server/server/vike-handler";
12
+ import { telefuncHandler } from "@batijs/telefunc/server/telefunc-handler";
7
13
  import { appRouter, type AppRouter } from "@batijs/trpc/trpc/server";
8
- import { createMiddleware } from "@hattip/adapter-node";
9
14
  import {
10
15
  fastifyTRPCPlugin,
11
16
  type CreateFastifyContextOptions,
12
17
  type FastifyTRPCPluginOptions,
13
18
  } from "@trpc/server/adapters/fastify";
14
- import express from "express";
15
- import { auth, type ConfigParams } from "express-openid-connect";
19
+ import { createRequestAdapter } from "@universal-middleware/express";
16
20
  import Fastify from "fastify";
17
- import { getAuth } from "firebase-admin/auth";
18
- import { telefunc } from "telefunc";
19
- import { VikeAuth } from "vike-authjs";
20
- import { renderPage } from "vike/server";
21
+ import type { RouteHandlerMethod } from "fastify/types/route";
21
22
 
22
23
  const __filename = fileURLToPath(import.meta.url);
23
24
  const __dirname = dirname(__filename);
@@ -26,11 +27,51 @@ const root = __dirname;
26
27
  const port = process.env.PORT ? parseInt(process.env.PORT, 10) : 3000;
27
28
  const hmrPort = process.env.HMR_PORT ? parseInt(process.env.HMR_PORT, 10) : 24678;
28
29
 
30
+ interface Middleware<Context extends Record<string | number | symbol, unknown>> {
31
+ (request: Request, context: Context): Response | void | Promise<Response> | Promise<void>;
32
+ }
33
+
34
+ export function handlerAdapter<Context extends Record<string | number | symbol, unknown>>(
35
+ handler: Middleware<Context>,
36
+ ) {
37
+ const requestAdapter = createRequestAdapter();
38
+ return (async (request, reply) => {
39
+ const config = request.routeOptions.config as unknown as Record<string, unknown>;
40
+ config.context ??= {};
41
+ const response = await handler(requestAdapter(request.raw)[0], config.context as Context);
42
+
43
+ if (response) {
44
+ if (!response.body) {
45
+ // Fastify currently doesn't send a response for body is null.
46
+ // To mimic express behavior, we convert the body to an empty ReadableStream.
47
+ Object.defineProperty(response, "body", {
48
+ value: new ReadableStream({
49
+ start(controller) {
50
+ controller.close();
51
+ },
52
+ }),
53
+ writable: false,
54
+ configurable: true,
55
+ });
56
+ }
57
+
58
+ return reply.send(response);
59
+ }
60
+ }) satisfies RouteHandlerMethod;
61
+ }
62
+
29
63
  startServer();
30
64
 
31
65
  async function startServer() {
32
66
  const app = Fastify();
33
67
 
68
+ // Avoid pre-parsing body, otherwise it will cause issue with universal handlers
69
+ // This will probably change in the future though, you can follow https://github.com/magne4000/universal-handler for updates
70
+ app.removeAllContentTypeParsers();
71
+ app.addContentTypeParser("*", function (_request, _payload, done) {
72
+ done(null, "");
73
+ });
74
+
34
75
  await app.register(await import("@fastify/middie"));
35
76
 
36
77
  if (isProduction) {
@@ -52,118 +93,23 @@ async function startServer() {
52
93
  app.use(viteDevMiddleware);
53
94
  }
54
95
 
55
- if (BATI.has("authjs")) {
56
- await app.register(await import("@fastify/formbody"));
96
+ if (BATI.has("authjs") || BATI.has("auth0")) {
57
97
  /**
58
- * AuthJS
59
- *
60
- * TODO: Replace secret {@see https://authjs.dev/reference/core#secret}
61
- * TODO: Choose and implement providers
62
- *
63
- * @link {@see https://authjs.dev/guides/providers/custom-provider}
98
+ * Append Auth.js session to context
64
99
  **/
65
- const Auth = VikeAuth({
66
- secret: "MY_SECRET",
67
- providers: [
68
- CredentialsProvider({
69
- name: "Credentials",
70
- credentials: {
71
- username: { label: "Username", type: "text", placeholder: "jsmith" },
72
- password: { label: "Password", type: "password" },
73
- },
74
- async authorize() {
75
- // Add logic here to look up the user from the credentials supplied
76
- const user = { id: "1", name: "J Smith", email: "jsmith@example.com" };
77
-
78
- // Any object returned will be saved in `user` property of the JWT
79
- // If you return null then an error will be displayed advising the user to check their details.
80
- // You can also Reject this callback with an Error thus the user will be sent to the error page with the error message as a query parameter
81
- return user ?? null;
82
- },
83
- }),
84
- ],
85
- });
100
+ app.addHook("onRequest", handlerAdapter(authjsSessionMiddleware));
86
101
 
87
- app.addHook("onRequest", async (request, reply) => {
88
- const vikeAuth = createMiddleware(Auth, {
89
- alwaysCallNext: false,
90
- });
91
- const next = () =>
92
- new Promise<void>((resolve) => {
93
- vikeAuth(request.raw, reply.raw, () => resolve());
94
- });
95
- if (request.url.startsWith("/api/auth/")) {
96
- await next();
97
- }
98
- return;
99
- });
102
+ /**
103
+ * Auth.js route
104
+ * @link {@see https://authjs.dev/getting-started/installation}
105
+ **/
106
+ app.all("/api/auth/*", handlerAdapter(authjsHandler));
100
107
  }
101
108
 
102
109
  if (BATI.has("firebase-auth")) {
103
- await app.register(await import("@fastify/cookie"));
104
-
105
- app.addHook("onRequest", async (request) => {
106
- const sessionCookie = request.cookies.__session;
107
- if (sessionCookie) {
108
- try {
109
- const auth = getAuth(firebaseAdmin);
110
- const decodedIdToken = await auth.verifySessionCookie(sessionCookie);
111
- const user = await auth.getUser(decodedIdToken.sub);
112
- request.user = user;
113
- } catch (error) {
114
- console.debug("verifySessionCookie:", error);
115
- request.user = null;
116
- }
117
- }
118
- });
119
-
120
- app.post<{ Body: { idToken: string } }>("/api/sessionLogin", async (request, reply) => {
121
- const idToken = request.body.idToken || "";
122
-
123
- const expiresIn = 60 * 60 * 24 * 5 * 1000; // 5 days
124
-
125
- try {
126
- const auth = getAuth(firebaseAdmin);
127
- const sessionCookie = await auth.createSessionCookie(idToken, { expiresIn });
128
- reply.setCookie("__session", sessionCookie, {
129
- path: "/", // The path needs to be set manually; otherwise, it will default to "/api" in this case.
130
- maxAge: expiresIn,
131
- httpOnly: true,
132
- secure: true,
133
- });
134
-
135
- reply.code(200);
136
- return reply.send({ status: "success" });
137
- } catch (error) {
138
- console.error("createSessionCookie failed :", error);
139
-
140
- reply.code(401);
141
- return reply.send({ status: "Unauthorized" });
142
- }
143
- });
144
-
145
- app.post("/api/sessionLogout", (_, reply) => {
146
- reply.clearCookie("__session");
147
- reply.code(200);
148
- return reply.send({ status: "Logged Out" });
149
- });
150
- }
151
-
152
- if (BATI.has("auth0")) {
153
- const config: ConfigParams = {
154
- authRequired: false, // Controls whether authentication is required for all routes
155
- auth0Logout: true, // Uses Auth0 logout feature
156
- baseURL: process.env.BASE_URL?.startsWith("http") ? process.env.BASE_URL : `http://localhost:${port}`, // The URL where the application is served
157
- routes: {
158
- login: "/api/auth/login", // Custom login route, default is "/login"
159
- logout: "/api/auth/logout", // Custom logout route, default is "/logout"
160
- callback: "/api/auth/callback", // Custom callback route, default is "/callback"
161
- },
162
- };
163
-
164
- const expressApp = express();
165
-
166
- app.use(expressApp.use(auth(config)));
110
+ app.addHook("onRequest", handlerAdapter(firebaseAuthMiddleware));
111
+ app.post("/api/sessionLogin", handlerAdapter(firebaseAuthLoginHandler));
112
+ app.post("/api/sessionLogout", handlerAdapter(firebaseAuthLogoutHandler));
167
113
  }
168
114
 
169
115
  if (BATI.has("trpc")) {
@@ -193,19 +139,7 @@ async function startServer() {
193
139
  *
194
140
  * @link {@see https://telefunc.com}
195
141
  **/
196
- app.post<{ Body: string }>("/_telefunc", async (request, reply) => {
197
- const httpResponse = await telefunc({
198
- url: request.originalUrl || request.url,
199
- method: request.method,
200
- body: request.body,
201
- context: request,
202
- });
203
- const { body, statusCode, contentType } = httpResponse;
204
-
205
- reply.code(statusCode);
206
- reply.type(contentType);
207
- return reply.send(body);
208
- });
142
+ app.post<{ Body: string }>("/_telefunc", handlerAdapter(telefuncHandler));
209
143
  }
210
144
 
211
145
  /**
@@ -213,27 +147,7 @@ async function startServer() {
213
147
  *
214
148
  * @link {@see https://vike.dev}
215
149
  **/
216
- app.all("/*", async function (request, reply) {
217
- const pageContextInit = BATI.has("auth0")
218
- ? { urlOriginal: request.originalUrl || request.url, user: request.raw.oidc.user }
219
- : BATI.has("firebase-auth")
220
- ? { urlOriginal: request.originalUrl || request.url, user: request.user }
221
- : { urlOriginal: request.originalUrl || request.url };
222
-
223
- const pageContext = await renderPage(pageContextInit);
224
- const { httpResponse } = pageContext;
225
-
226
- if (!httpResponse) {
227
- return;
228
- } else {
229
- const { statusCode, headers, body } = httpResponse;
230
-
231
- headers.forEach(([name, value]) => reply.header(name, value));
232
- reply.code(statusCode);
233
-
234
- return reply.send(body);
235
- }
236
- });
150
+ app.all("/*", handlerAdapter(vikeHandler));
237
151
 
238
152
  app.listen(
239
153
  {
@@ -1 +1,7 @@
1
+ /// <reference types="node" />
1
2
  import "dotenv/config";
3
+ interface Middleware<Context extends Record<string | number | symbol, unknown>> {
4
+ (request: Request, context: Context): Response | void | Promise<Response> | Promise<void>;
5
+ }
6
+ export declare function handlerAdapter<Context extends Record<string | number | symbol, unknown>>(handler: Middleware<Context>): (this: import("fastify").FastifyInstance<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify").FastifyBaseLogger, import("fastify").FastifyTypeProviderDefault>, request: import("fastify").FastifyRequest<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("http").IncomingMessage, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown, import("fastify").FastifyBaseLogger, import("fastify/types/type-provider").ResolveFastifyRequestType<import("fastify").FastifyTypeProviderDefault, import("fastify").FastifySchema, import("fastify").RouteGenericInterface>>, reply: import("fastify").FastifyReply<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify").RouteGenericInterface, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>) => Promise<undefined>;
7
+ export {};
@@ -42,12 +42,14 @@ var require_package = __commonJS({
42
42
  license: "MIT",
43
43
  devDependencies: {
44
44
  "@batijs/compile": "workspace:*",
45
+ "@types/cookie": "^0.6.0",
45
46
  "@types/node": "^18.19.14",
47
+ cookie: "^0.6.0",
46
48
  dotenv: "^16.4.5",
47
- firebase: "^10.12.0",
48
- "firebase-admin": "^12.1.0",
49
+ firebase: "^10.12.1",
50
+ "firebase-admin": "^12.1.1",
49
51
  firebaseui: "^6.1.0",
50
- vike: "^0.4.171",
52
+ vike: "^0.4.172",
51
53
  vite: "^5.2.11"
52
54
  },
53
55
  dependencies: {
@@ -76,6 +78,9 @@ var require_package = __commonJS({
76
78
  },
77
79
  "./pages/login/+guard": {
78
80
  types: "./dist/types/pages/login/+guard.d.ts"
81
+ },
82
+ "./server/firebase-auth-middleware": {
83
+ types: "./dist/types/server/firebase-auth-middleware.d.ts"
79
84
  }
80
85
  },
81
86
  typesVersions: {
@@ -94,6 +99,9 @@ var require_package = __commonJS({
94
99
  ],
95
100
  "pages/login/+guard": [
96
101
  "./dist/types/pages/login/+guard.d.ts"
102
+ ],
103
+ "server/firebase-auth-middleware": [
104
+ "./dist/types/server/firebase-auth-middleware.d.ts"
97
105
  ]
98
106
  }
99
107
  }
@@ -1,5 +1,6 @@
1
1
  import "dotenv/config";
2
2
  import { applicationDefault, getApp, getApps, initializeApp, type App } from "firebase-admin/app";
3
+ import { getAuth } from "firebase-admin/auth";
3
4
 
4
5
  let firebaseAdmin: App | undefined;
5
6
 
@@ -11,4 +12,4 @@ if (!getApps().length) {
11
12
  firebaseAdmin = getApp();
12
13
  }
13
14
 
14
- export { firebaseAdmin };
15
+ export { firebaseAdmin, getAuth };
@@ -0,0 +1,72 @@
1
+ import { parse, serialize } from "cookie";
2
+ import { getAuth } from "firebase-admin/auth";
3
+ import { firebaseAdmin } from "../libs/firebaseAdmin";
4
+
5
+ export async function firebaseAuthMiddleware(
6
+ request: Request,
7
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8
+ context: any,
9
+ ): Promise<void> {
10
+ if (!request.headers.has("cookie")) return;
11
+
12
+ const cookies = parse(request.headers.get("cookie")!);
13
+ const sessionCookie: string = cookies.__session || "";
14
+
15
+ try {
16
+ const auth = getAuth(firebaseAdmin);
17
+ const decodedIdToken = await auth.verifySessionCookie(sessionCookie, true);
18
+ context.user = await auth.getUser(decodedIdToken.sub);
19
+ } catch (error) {
20
+ console.debug("verifySessionCookie:", error);
21
+ context.user = null;
22
+ }
23
+ }
24
+
25
+ export async function firebaseAuthLoginHandler<Context extends Record<string | number | symbol, unknown>>(
26
+ request: Request,
27
+ _context?: Context,
28
+ ): Promise<Response> {
29
+ const body = await request.json();
30
+ const idToken: string = (body as { idToken?: string }).idToken || "";
31
+
32
+ const expiresIn = 60 * 60 * 24 * 5 * 1000; // 5 days
33
+
34
+ try {
35
+ const sessionCookie = await getAuth(firebaseAdmin).createSessionCookie(idToken, { expiresIn });
36
+
37
+ const options = { maxAge: expiresIn / 1000, httpOnly: true, secure: true };
38
+
39
+ return new Response(JSON.stringify({ status: "success" }), {
40
+ status: 200,
41
+ headers: {
42
+ "content-type": "application/json",
43
+ "set-cookie": serialize("__session", sessionCookie, options),
44
+ },
45
+ });
46
+ } catch (error) {
47
+ console.error("createSessionCookie:", error);
48
+
49
+ return new Response("Unauthorized Request", {
50
+ status: 401,
51
+ });
52
+ }
53
+ }
54
+
55
+ export async function firebaseAuthLogoutHandler<Context extends Record<string | number | symbol, unknown>>(
56
+ _request: Request,
57
+ _context?: Context,
58
+ ): Promise<Response> {
59
+ return new Response(JSON.stringify({ status: "success" }), {
60
+ status: 200,
61
+ headers: {
62
+ "content-type": "application/json",
63
+ "set-cookie": serialize("__session", "", {
64
+ maxAge: 0,
65
+ httpOnly: true,
66
+ secure: true,
67
+ expires: new Date(1),
68
+ path: "/",
69
+ }),
70
+ },
71
+ });
72
+ }
@@ -1,4 +1,5 @@
1
1
  import "dotenv/config";
2
2
  import { type App } from "firebase-admin/app";
3
+ import { getAuth } from "firebase-admin/auth";
3
4
  declare let firebaseAdmin: App | undefined;
4
- export { firebaseAdmin };
5
+ export { firebaseAdmin, getAuth };
@@ -0,0 +1,4 @@
1
+ /// <reference types="node" />
2
+ export declare function firebaseAuthMiddleware(request: Request, context: any): Promise<void>;
3
+ export declare function firebaseAuthLoginHandler<Context extends Record<string | number | symbol, unknown>>(request: Request, _context?: Context): Promise<Response>;
4
+ export declare function firebaseAuthLogoutHandler<Context extends Record<string | number | symbol, unknown>>(_request: Request, _context?: Context): Promise<Response>;
@@ -42,8 +42,11 @@ var require_package = __commonJS({
42
42
  license: "MIT",
43
43
  devDependencies: {
44
44
  "@auth/core": "^0.31.0",
45
+ "@batijs/authjs": "workspace:*",
45
46
  "@batijs/compile": "workspace:*",
46
47
  "@batijs/firebase-auth": "workspace:*",
48
+ "@batijs/shared-server": "workspace:^",
49
+ "@batijs/telefunc": "workspace:^",
47
50
  "@batijs/trpc": "workspace:^",
48
51
  "@hattip/polyfills": "^0.0.45",
49
52
  "@trpc/server": "^10.45.2",
@@ -51,15 +54,11 @@ var require_package = __commonJS({
51
54
  "@types/node": "^18.19.14",
52
55
  "@types/serve-static": "^1.15.7",
53
56
  dotenv: "^16.4.5",
54
- express: "^4.19.2",
55
- "express-openid-connect": "^2.17.1",
56
- "firebase-admin": "^12.1.0",
57
57
  h3: "~1.11.1",
58
58
  "serve-static": "^1.15.0",
59
59
  telefunc: "^0.1.72",
60
- tsx: "^4.10.5",
61
- vike: "^0.4.171",
62
- "vike-authjs": "^0.1.6",
60
+ tsx: "^4.11.0",
61
+ vike: "^0.4.172",
63
62
  vite: "^5.2.11"
64
63
  },
65
64
  dependencies: {
@@ -121,8 +120,7 @@ async function getPackageJson(props) {
121
120
  "tsx",
122
121
  "vike",
123
122
  "vite",
124
- ...props.meta.BATI.has("authjs") ? ["@auth/core", "vike-authjs"] : [],
125
- ...props.meta.BATI.has("auth0") ? ["express", "express-openid-connect"] : []
123
+ ...props.meta.BATI.has("authjs") || props.meta.BATI.has("auth0") ? ["@auth/core"] : []
126
124
  ]
127
125
  });
128
126
  }