@batijs/cli 0.0.476 → 0.0.478

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 (129) hide show
  1. package/dist/boilerplates/@batijs/auth0/files/$.env.js +6 -5
  2. package/dist/boilerplates/@batijs/auth0/files/$README.md.js +3 -3
  3. package/dist/boilerplates/@batijs/auth0/files/$wrangler.toml.js +32 -0
  4. package/dist/boilerplates/@batijs/authjs/files/$package.json.js +7 -6
  5. package/dist/boilerplates/@batijs/authjs/files/server/authjs-handler.ts +42 -35
  6. package/dist/boilerplates/@batijs/authjs/types/server/authjs-handler.d.ts +8 -3
  7. package/dist/boilerplates/@batijs/aws/files/$README.md.js +3 -3
  8. package/dist/boilerplates/@batijs/aws/files/$package.json.js +10 -10
  9. package/dist/boilerplates/@batijs/aws/files/$tsconfig.json.js +3 -3
  10. package/dist/boilerplates/@batijs/biome/files/$package.json.js +4 -4
  11. package/dist/boilerplates/@batijs/cloudflare/files/$package.json.js +17 -26
  12. package/dist/boilerplates/@batijs/cloudflare/files/wrangler.toml +2 -3
  13. package/dist/boilerplates/@batijs/compiled/files/$package.json.js +5 -5
  14. package/dist/boilerplates/@batijs/compiled/files/$vite.config.ts.js +5 -5
  15. package/dist/boilerplates/@batijs/d1/files/$README.md.js +4 -4
  16. package/dist/boilerplates/@batijs/d1/files/$package.json.js +8 -8
  17. package/dist/boilerplates/@batijs/d1/files/$tsconfig.json.js +3 -3
  18. package/dist/boilerplates/@batijs/d1/files/database/d1/helpers.ts +3 -11
  19. package/dist/boilerplates/@batijs/d1-sqlite/files/$package.json.js +7 -7
  20. package/dist/boilerplates/@batijs/drizzle/files/$.env.js +3 -3
  21. package/dist/boilerplates/@batijs/drizzle/files/$README.md.js +3 -3
  22. package/dist/boilerplates/@batijs/drizzle/files/$package.json.js +8 -8
  23. package/dist/boilerplates/@batijs/eslint/files/$package.json.js +8 -8
  24. package/dist/boilerplates/@batijs/eslint/types/eslint.config.d.ts +1 -1
  25. package/dist/boilerplates/@batijs/express/files/$package.json.js +16 -29
  26. package/dist/boilerplates/@batijs/express/files/server/entry.ts +45 -0
  27. package/dist/boilerplates/@batijs/express/types/server/entry.d.ts +3 -0
  28. package/dist/boilerplates/@batijs/fastify/files/$package.json.js +18 -32
  29. package/dist/boilerplates/@batijs/fastify/files/server/entry.ts +52 -0
  30. package/dist/boilerplates/@batijs/fastify/types/server/entry.d.ts +4 -0
  31. package/dist/boilerplates/@batijs/google-analytics/files/$.env.js +3 -3
  32. package/dist/boilerplates/@batijs/h3/files/$package.json.js +21 -32
  33. package/dist/boilerplates/@batijs/h3/files/server/entry.ts +45 -0
  34. package/dist/boilerplates/@batijs/{express/types/express-entry.d.ts → h3/types/server/entry.d.ts} +1 -1
  35. package/dist/boilerplates/@batijs/hono/files/$package.json.js +23 -40
  36. package/dist/boilerplates/@batijs/hono/files/entry_aws_lambda.ts +2 -9
  37. package/dist/boilerplates/@batijs/hono/files/server/entry.ts +53 -0
  38. package/dist/boilerplates/@batijs/hono/types/server/entry.d.ts +4 -0
  39. package/dist/boilerplates/@batijs/mantine/files/$README.md.js +3 -3
  40. package/dist/boilerplates/@batijs/mantine/files/$package.json.js +12 -12
  41. package/dist/boilerplates/@batijs/photon/files/$README.md.js +29 -0
  42. package/dist/boilerplates/@batijs/photon/files/$package.json.js +109 -0
  43. package/dist/boilerplates/@batijs/photon/files/+photon.ts +7 -0
  44. package/dist/boilerplates/@batijs/photon/types/+photon.d.ts +4 -0
  45. package/dist/boilerplates/@batijs/pnpm/files/$pnpm-workspace.yaml.js +3 -3
  46. package/dist/boilerplates/@batijs/prettier/files/$package.json.js +4 -4
  47. package/dist/boilerplates/@batijs/prisma/files/$.env.js +3 -3
  48. package/dist/boilerplates/@batijs/prisma/files/$README.md.js +3 -3
  49. package/dist/boilerplates/@batijs/prisma/files/$package.json.js +6 -6
  50. package/dist/boilerplates/@batijs/react/files/$README.md.js +3 -3
  51. package/dist/boilerplates/@batijs/react/files/$package.json.js +16 -15
  52. package/dist/boilerplates/@batijs/react/files/$tsconfig.json.js +3 -3
  53. package/dist/boilerplates/@batijs/react/files/$vite.config.ts.js +5 -5
  54. package/dist/boilerplates/@batijs/react/files/pages/+config.ts +6 -1
  55. package/dist/boilerplates/@batijs/react/types/pages/+config.d.ts +63 -2
  56. package/dist/boilerplates/@batijs/react-sentry/files/$package.json.js +10 -10
  57. package/dist/boilerplates/@batijs/sentry/files/$.env.js +4 -4
  58. package/dist/boilerplates/@batijs/sentry/files/$README.md.js +3 -3
  59. package/dist/boilerplates/@batijs/sentry/files/$package.json.js +6 -6
  60. package/dist/boilerplates/@batijs/sentry/files/$vite.config.ts.js +7 -7
  61. package/dist/boilerplates/@batijs/sentry/files/pages/$+client.ts.js +9 -9
  62. package/dist/boilerplates/@batijs/shadcn-ui/files/$README.md.js +3 -3
  63. package/dist/boilerplates/@batijs/shadcn-ui/files/$package.json.js +7 -7
  64. package/dist/boilerplates/@batijs/shadcn-ui/files/$tsconfig.json.js +3 -3
  65. package/dist/boilerplates/@batijs/shadcn-ui/files/$vite.config.ts.js +5 -5
  66. package/dist/boilerplates/@batijs/shared/files/$README.md.js +9 -9
  67. package/dist/boilerplates/@batijs/shared/files/package.json +3 -3
  68. package/dist/boilerplates/@batijs/shared/files/vite.config.ts +1 -20
  69. package/dist/boilerplates/@batijs/shared-db/files/server/db-middleware.ts +21 -15
  70. package/dist/boilerplates/@batijs/shared-db/types/server/db-middleware.d.ts +2 -2
  71. package/dist/boilerplates/@batijs/shared-server/files/$package.json.js +8 -14
  72. package/dist/boilerplates/@batijs/shared-server/files/server/create-todo-handler.ts +33 -34
  73. package/dist/boilerplates/@batijs/shared-server/types/server/create-todo-handler.d.ts +3 -4
  74. package/dist/boilerplates/@batijs/solid/files/$README.md.js +3 -3
  75. package/dist/boilerplates/@batijs/solid/files/$package.json.js +11 -10
  76. package/dist/boilerplates/@batijs/solid/files/$tsconfig.json.js +3 -3
  77. package/dist/boilerplates/@batijs/solid/files/$vite.config.ts.js +5 -5
  78. package/dist/boilerplates/@batijs/solid/files/pages/+config.ts +6 -1
  79. package/dist/boilerplates/@batijs/solid/types/pages/+config.d.ts +70 -2
  80. package/dist/boilerplates/@batijs/solid-sentry/files/$package.json.js +7 -7
  81. package/dist/boilerplates/@batijs/sqlite/files/$.env.js +3 -3
  82. package/dist/boilerplates/@batijs/sqlite/files/$README.md.js +4 -3
  83. package/dist/boilerplates/@batijs/sqlite/files/$package.json.js +7 -7
  84. package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +9 -9
  85. package/dist/boilerplates/@batijs/tailwindcss/files/$vite.config.ts.js +5 -5
  86. package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +9 -9
  87. package/dist/boilerplates/@batijs/telefunc/files/$vite.config.ts.js +5 -5
  88. package/dist/boilerplates/@batijs/telefunc/files/server/telefunc-handler.ts +34 -27
  89. package/dist/boilerplates/@batijs/telefunc/types/server/telefunc-handler.d.ts +2 -2
  90. package/dist/boilerplates/@batijs/trpc/files/$package.json.js +9 -9
  91. package/dist/boilerplates/@batijs/trpc/files/server/trpc-handler.ts +26 -18
  92. package/dist/boilerplates/@batijs/trpc/types/server/trpc-handler.d.ts +6 -1
  93. package/dist/boilerplates/@batijs/trpc/types/trpc/client.d.ts +1 -1
  94. package/dist/boilerplates/@batijs/ts-rest/files/$package.json.js +6 -6
  95. package/dist/boilerplates/@batijs/ts-rest/files/server/ts-rest-handler.ts +21 -14
  96. package/dist/boilerplates/@batijs/ts-rest/types/server/ts-rest-handler.d.ts +2 -2
  97. package/dist/boilerplates/@batijs/vercel/files/$package.json.js +8 -9
  98. package/dist/boilerplates/@batijs/vercel/files/pages/$+config.ts.js +3 -3
  99. package/dist/boilerplates/@batijs/vue/files/$README.md.js +3 -3
  100. package/dist/boilerplates/@batijs/vue/files/$package.json.js +15 -14
  101. package/dist/boilerplates/@batijs/vue/files/$tsconfig.json.js +3 -3
  102. package/dist/boilerplates/@batijs/vue/files/$vite.config.ts.js +6 -6
  103. package/dist/boilerplates/@batijs/vue/files/pages/+config.ts +6 -1
  104. package/dist/boilerplates/@batijs/vue/types/pages/+config.d.ts +1 -2
  105. package/dist/boilerplates/@batijs/vue-sentry/files/$package.json.js +8 -8
  106. package/dist/boilerplates/boilerplates.json +20 -0
  107. package/dist/{chunk-2SZ4N3E5.js → chunk-LRTYGOU6.js} +83539 -83181
  108. package/dist/index.js +720 -659
  109. package/dist/jiti-ZW3ADF2F-7XIEJQMO.js +2982 -0
  110. package/dist/src-5HGZFBZ3-KQZBBJSW.js +468 -0
  111. package/package.json +10 -10
  112. package/dist/boilerplates/@batijs/cloudflare/files/$tsconfig.json.js +0 -19
  113. package/dist/boilerplates/@batijs/cloudflare/files/$vite.config.ts.js +0 -34
  114. package/dist/boilerplates/@batijs/express/files/express-entry.ts +0 -102
  115. package/dist/boilerplates/@batijs/fastify/files/fastify-entry.ts +0 -140
  116. package/dist/boilerplates/@batijs/fastify/types/fastify-entry.d.ts +0 -3
  117. package/dist/boilerplates/@batijs/h3/files/h3-entry.ts +0 -144
  118. package/dist/boilerplates/@batijs/h3/types/h3-entry.d.ts +0 -4
  119. package/dist/boilerplates/@batijs/hono/files/$vite.config.ts.js +0 -36
  120. package/dist/boilerplates/@batijs/hono/files/hono-entry.node.ts +0 -31
  121. package/dist/boilerplates/@batijs/hono/files/hono-entry.ts +0 -74
  122. package/dist/boilerplates/@batijs/hono/types/hono-entry.d.ts +0 -6
  123. package/dist/boilerplates/@batijs/hono/types/hono-entry.node.d.ts +0 -1
  124. package/dist/boilerplates/@batijs/shared-server/files/server/vike-handler.ts +0 -20
  125. package/dist/boilerplates/@batijs/shared-server/types/server/vike-handler.d.ts +0 -2
  126. package/dist/boilerplates/@batijs/vercel/files/$tsconfig.json.js +0 -19
  127. package/dist/boilerplates/@batijs/vercel/files/$vite.config.ts.js +0 -27
  128. package/dist/jiti-W5Y5D52V-VBLACVBV.js +0 -30587
  129. package/dist/src-UAKFXUB2-DFO2P37K.js +0 -417
@@ -1,5 +1,4 @@
1
1
  /*# BATI include-if-imported #*/
2
- // TODO: stop using universal-middleware and directly integrate server middlewares instead and/or use vike-server https://vike.dev/vike-server. (Bati generates boilerplates that use universal-middleware https://github.com/magne4000/universal-middleware to make Bati's internal logic easier. This is temporary and will be removed soon.)
3
2
 
4
3
  import * as d1Queries from "@batijs/d1-sqlite/database/d1/queries/todos";
5
4
  import type { dbD1, dbSqlite } from "@batijs/drizzle/database/drizzle/db";
@@ -7,39 +6,39 @@ import * as drizzleQueries from "@batijs/drizzle/database/drizzle/queries/todos"
7
6
  import type { db as sqliteDb } from "@batijs/sqlite/database/sqlite/db";
8
7
  import * as sqliteQueries from "@batijs/sqlite/database/sqlite/queries/todos";
9
8
  import type { D1Database } from "@cloudflare/workers-types";
10
- import type { Get, UniversalHandler } from "@universal-middleware/core";
9
+ import { enhance, type UniversalHandler } from "@universal-middleware/core";
11
10
 
12
- export const createTodoHandler: Get<
13
- [],
14
- UniversalHandler<
15
- Universal.Context &
16
- BATI.If<{
17
- 'BATI.has("sqlite") && !BATI.hasD1': { db: ReturnType<typeof sqliteDb> };
18
- 'BATI.has("drizzle") && !BATI.hasD1': { db: ReturnType<typeof dbSqlite> };
19
- 'BATI.has("drizzle")': { db: ReturnType<typeof dbD1> };
20
- "BATI.hasD1": { db: D1Database };
21
- _: object;
22
- }>
23
- >
24
- > = () => async (request, _context, _runtime) => {
25
- // In a real case, user-provided data should ALWAYS be validated with tools like zod
26
- const newTodo = (await request.json()) as { text: string };
11
+ export const createTodoHandler: UniversalHandler<
12
+ Universal.Context &
13
+ BATI.If<{
14
+ 'BATI.has("sqlite") && !BATI.hasD1': { db: ReturnType<typeof sqliteDb> };
15
+ 'BATI.has("drizzle") && !BATI.hasD1': { db: ReturnType<typeof dbSqlite> };
16
+ 'BATI.has("drizzle")': { db: ReturnType<typeof dbD1> };
17
+ "BATI.hasD1": { db: D1Database };
18
+ _: object;
19
+ }>
20
+ > = enhance(
21
+ async (request, _context, _runtime) => {
22
+ // In a real case, user-provided data should ALWAYS be validated with tools like zod
23
+ const newTodo = (await request.json()) as { text: string };
27
24
 
28
- if (BATI.has("drizzle")) {
29
- await drizzleQueries.insertTodo(_context.db, newTodo.text);
30
- } else if (BATI.has("sqlite") && !BATI.hasD1) {
31
- sqliteQueries.insertTodo(_context.db, newTodo.text);
32
- } else if (BATI.hasD1) {
33
- await d1Queries.insertTodo(_context.db, newTodo.text);
34
- } else {
35
- // This is where you'd persist the data
36
- console.log("Received new todo", newTodo);
37
- }
25
+ if (BATI.has("drizzle")) {
26
+ await drizzleQueries.insertTodo(_context.db, newTodo.text);
27
+ } else if (BATI.has("sqlite") && !BATI.hasD1) {
28
+ sqliteQueries.insertTodo(_context.db, newTodo.text);
29
+ } else if (BATI.hasD1) {
30
+ await d1Queries.insertTodo(_context.db, newTodo.text);
31
+ } else {
32
+ // This is where you'd persist the data
33
+ console.log("Received new todo", newTodo);
34
+ }
38
35
 
39
- return new Response(JSON.stringify({ status: "OK" }), {
40
- status: 200,
41
- headers: {
42
- "content-type": "application/json",
43
- },
44
- });
45
- };
36
+ return new Response(JSON.stringify({ status: "OK" }), {
37
+ status: 200,
38
+ headers: {
39
+ "content-type": "application/json",
40
+ },
41
+ });
42
+ },
43
+ { name: "my-app:todo-handler", path: `/api/todo/create`, method: ["GET", "POST"], immutable: false },
44
+ );
@@ -1,9 +1,8 @@
1
1
  import type { dbD1, dbSqlite } from "@batijs/drizzle/database/drizzle/db";
2
2
  import type { db as sqliteDb } from "@batijs/sqlite/database/sqlite/db";
3
3
  import type { D1Database } from "@cloudflare/workers-types";
4
- import type { Get, UniversalHandler } from "@universal-middleware/core";
5
- export declare const createTodoHandler: Get<[
6
- ], UniversalHandler<Universal.Context & BATI.If<{
4
+ import { type UniversalHandler } from "@universal-middleware/core";
5
+ export declare const createTodoHandler: UniversalHandler<Universal.Context & BATI.If<{
7
6
  'BATI.has("sqlite") && !BATI.hasD1': {
8
7
  db: ReturnType<typeof sqliteDb>;
9
8
  };
@@ -17,4 +16,4 @@ export declare const createTodoHandler: Get<[
17
16
  db: D1Database;
18
17
  };
19
18
  _: object;
20
- }>>>;
19
+ }>>;
@@ -3,14 +3,14 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
3
3
  const require = createRequire_BATI_CLI(import.meta.url);
4
4
 
5
5
  import {
6
- ZEs
7
- } from "../../../../chunk-2SZ4N3E5.js";
6
+ Wxs
7
+ } from "../../../../chunk-LRTYGOU6.js";
8
8
  import "../../../../chunk-IAWYWZSL.js";
9
9
  import "../../../../chunk-DHZ7AZKP.js";
10
10
 
11
11
  // ../../boilerplates/solid/dist/files/$README.md.js
12
12
  async function getReadme(props) {
13
- const content = await ZEs(props);
13
+ const content = await Wxs(props);
14
14
  const about = `
15
15
 
16
16
  This app is ready to start. It's powered by [Vike](https://vike.dev) and [SolidJS](https://www.solidjs.com/guides/getting-started).
@@ -3,8 +3,8 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
3
3
  const require = createRequire_BATI_CLI(import.meta.url);
4
4
 
5
5
  import {
6
- txs
7
- } from "../../../../chunk-2SZ4N3E5.js";
6
+ $xs
7
+ } from "../../../../chunk-LRTYGOU6.js";
8
8
  import "../../../../chunk-IAWYWZSL.js";
9
9
  import "../../../../chunk-DHZ7AZKP.js";
10
10
 
@@ -51,14 +51,15 @@ var require_package = __commonJS({
51
51
  license: "MIT",
52
52
  devDependencies: {
53
53
  "@batijs/compile": "workspace:*",
54
- "@types/node": "^20.19.9",
54
+ "@types/node": "^20.19.21",
55
55
  "solid-js": "^1.9.9",
56
- tailwindcss: "^4.1.13",
57
- typescript: "^5.9.2",
58
- vike: "^0.4.239",
59
- "vike-solid": "^0.7.12",
60
- vite: "^7.1.4",
61
- "vite-plugin-solid": "^2.11.8"
56
+ tailwindcss: "^4.1.14",
57
+ typescript: "^5.9.3",
58
+ vike: "^0.4.242",
59
+ "vike-photon": "^0.1.10",
60
+ "vike-solid": "^0.7.13",
61
+ vite: "^7.1.10",
62
+ "vite-plugin-solid": "^2.11.9"
62
63
  },
63
64
  dependencies: {
64
65
  "@batijs/core": "workspace:*"
@@ -177,7 +178,7 @@ var require_package = __commonJS({
177
178
  }
178
179
  });
179
180
  async function getPackageJson(props) {
180
- const packageJson = await txs(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
181
+ const packageJson = await $xs(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
181
182
  return packageJson.addDevDependencies(["vite"]).addDependencies(["solid-js", "vike-solid", "vike"]);
182
183
  }
183
184
  export {
@@ -3,14 +3,14 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
3
3
  const require = createRequire_BATI_CLI(import.meta.url);
4
4
 
5
5
  import {
6
- exs
7
- } from "../../../../chunk-2SZ4N3E5.js";
6
+ Jxs
7
+ } from "../../../../chunk-LRTYGOU6.js";
8
8
  import "../../../../chunk-IAWYWZSL.js";
9
9
  import "../../../../chunk-DHZ7AZKP.js";
10
10
 
11
11
  // ../../boilerplates/solid/dist/files/$tsconfig.json.js
12
12
  async function getTsConfig(props) {
13
- const tsConfig = await exs(props);
13
+ const tsConfig = await Jxs(props);
14
14
  tsConfig.compilerOptions.jsx = "react-jsx";
15
15
  tsConfig.compilerOptions.jsxImportSource = "solid-js";
16
16
  tsConfig.compilerOptions.types = [...tsConfig.compilerOptions.types ?? [], "vike-solid/client"];
@@ -3,16 +3,16 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
3
3
  const require = createRequire_BATI_CLI(import.meta.url);
4
4
 
5
5
  import {
6
- Zri,
7
- rxs
8
- } from "../../../../chunk-2SZ4N3E5.js";
6
+ Kxs,
7
+ hni
8
+ } from "../../../../chunk-LRTYGOU6.js";
9
9
  import "../../../../chunk-IAWYWZSL.js";
10
10
  import "../../../../chunk-DHZ7AZKP.js";
11
11
 
12
12
  // ../../boilerplates/solid/dist/files/$vite.config.ts.js
13
13
  async function getViteConfig(props) {
14
- const mod = await rxs(props);
15
- Zri(mod, {
14
+ const mod = await Kxs(props);
15
+ hni(mod, {
16
16
  from: "vike-solid/vite",
17
17
  constructor: "vikeSolid"
18
18
  });
@@ -1,4 +1,5 @@
1
1
  import type { Config } from "vike/types";
2
+ import vikePhoton from "vike-photon/config";
2
3
  import vikeSolid from "vike-solid/config";
3
4
  import Layout from "../layouts/LayoutDefault.js";
4
5
 
@@ -15,5 +16,9 @@ export default {
15
16
 
16
17
  //# BATI.has("auth0") || BATI.has("authjs")
17
18
  passToClient: ["user"],
18
- extends: vikeSolid,
19
+ extends: [
20
+ vikeSolid,
21
+ //# BATI.hasPhoton
22
+ vikePhoton,
23
+ ],
19
24
  } satisfies Config;
@@ -4,11 +4,18 @@ declare const _default: {
4
4
  title: string;
5
5
  description: string;
6
6
  passToClient: string[];
7
- extends: {
7
+ extends: ({
8
8
  name: string;
9
9
  require: {
10
10
  vike: string;
11
11
  };
12
+ vite: {
13
+ ssr: {
14
+ optimizeDeps: {
15
+ include: string[];
16
+ };
17
+ };
18
+ };
12
19
  onRenderHtml: "import:vike-solid/__internal/integration/onRenderHtml:onRenderHtml";
13
20
  onRenderClient: "import:vike-solid/__internal/integration/onRenderClient:onRenderClient";
14
21
  clientRouting: true;
@@ -102,6 +109,67 @@ declare const _default: {
102
109
  cumulative: true;
103
110
  };
104
111
  };
105
- };
112
+ } | Omit<{
113
+ name: "vike-photon";
114
+ require: {
115
+ vike: ">=0.4.238";
116
+ "vike-react": {
117
+ version: ">=0.6.4";
118
+ optional: true;
119
+ };
120
+ "vike-vue": {
121
+ version: ">=0.9.2";
122
+ optional: true;
123
+ };
124
+ "vike-solid": {
125
+ version: ">=0.7.11";
126
+ optional: true;
127
+ };
128
+ };
129
+ vite: {
130
+ plugins: (((Record<string, unknown> & {
131
+ name: string;
132
+ }) | Promise<(Record<string, unknown> & {
133
+ name: string;
134
+ }) | (Record<string, unknown> & {
135
+ name: string;
136
+ })[]>)[] | import("vite").Plugin<any>[])[];
137
+ };
138
+ stream: {
139
+ enable: null;
140
+ type: "web";
141
+ };
142
+ meta: {
143
+ stream: {
144
+ isDefinedByPeerDependency: true;
145
+ };
146
+ photon: {
147
+ env: {
148
+ config: true;
149
+ };
150
+ global: true;
151
+ };
152
+ isr: {
153
+ env: {
154
+ server: true;
155
+ config: true;
156
+ };
157
+ eager: true;
158
+ effect({ configValue }: {
159
+ configValue: unknown;
160
+ configDefinedAt: `Config ${string} defined at ${string}`;
161
+ }): {
162
+ prerender: false;
163
+ } | undefined;
164
+ };
165
+ edge: {
166
+ env: {
167
+ server: true;
168
+ config: true;
169
+ };
170
+ eager: true;
171
+ };
172
+ };
173
+ }, "stream">)[];
106
174
  };
107
175
  export default _default;
@@ -3,8 +3,8 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
3
3
  const require = createRequire_BATI_CLI(import.meta.url);
4
4
 
5
5
  import {
6
- txs
7
- } from "../../../../chunk-2SZ4N3E5.js";
6
+ $xs
7
+ } from "../../../../chunk-LRTYGOU6.js";
8
8
  import "../../../../chunk-IAWYWZSL.js";
9
9
  import "../../../../chunk-DHZ7AZKP.js";
10
10
 
@@ -51,11 +51,11 @@ var require_package = __commonJS({
51
51
  license: "MIT",
52
52
  devDependencies: {
53
53
  "@batijs/compile": "workspace:*",
54
- "@sentry/solid": "^10.10.0",
55
- "@types/node": "^20.19.9",
54
+ "@sentry/solid": "^10.19.0",
55
+ "@types/node": "^20.19.21",
56
56
  "solid-js": "^1.9.9",
57
- "vike-solid": "^0.7.12",
58
- vite: "^7.1.4"
57
+ "vike-solid": "^0.7.13",
58
+ vite: "^7.1.10"
59
59
  },
60
60
  dependencies: {
61
61
  "@batijs/core": "workspace:*"
@@ -95,7 +95,7 @@ var require_package = __commonJS({
95
95
  }
96
96
  });
97
97
  async function getPackageJson(props) {
98
- const packageJson = await txs(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
98
+ const packageJson = await $xs(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
99
99
  return packageJson.addDependencies(["@sentry/solid"]);
100
100
  }
101
101
  export {
@@ -3,8 +3,8 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
3
3
  const require = createRequire_BATI_CLI(import.meta.url);
4
4
 
5
5
  import {
6
- MBs
7
- } from "../../../../chunk-2SZ4N3E5.js";
6
+ kUs
7
+ } from "../../../../chunk-LRTYGOU6.js";
8
8
  import "../../../../chunk-IAWYWZSL.js";
9
9
  import "../../../../chunk-DHZ7AZKP.js";
10
10
 
@@ -12,7 +12,7 @@ import "../../../../chunk-DHZ7AZKP.js";
12
12
  async function getEnv(props) {
13
13
  if (props.meta.BATI.hasD1) return;
14
14
  const envContent = await props.readfile?.();
15
- return MBs(envContent, "DATABASE_URL", "sqlite.db", "Path to the sqlite database");
15
+ return kUs(envContent, "DATABASE_URL", "sqlite.db", "Path to the sqlite database");
16
16
  }
17
17
  export {
18
18
  getEnv as default
@@ -3,14 +3,15 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
3
3
  const require = createRequire_BATI_CLI(import.meta.url);
4
4
 
5
5
  import {
6
- ZEs
7
- } from "../../../../chunk-2SZ4N3E5.js";
6
+ Wxs
7
+ } from "../../../../chunk-LRTYGOU6.js";
8
8
  import "../../../../chunk-IAWYWZSL.js";
9
9
  import "../../../../chunk-DHZ7AZKP.js";
10
10
 
11
11
  // ../../boilerplates/sqlite/dist/files/$README.md.js
12
12
  async function getReadme(props) {
13
- const content = await ZEs(props);
13
+ if (props.meta.BATI.hasD1) return;
14
+ const content = await Wxs(props);
14
15
  const todo = `
15
16
  ## *Sqlite*
16
17
 
@@ -3,8 +3,8 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
3
3
  const require = createRequire_BATI_CLI(import.meta.url);
4
4
 
5
5
  import {
6
- txs
7
- } from "../../../../chunk-2SZ4N3E5.js";
6
+ $xs
7
+ } from "../../../../chunk-LRTYGOU6.js";
8
8
  import "../../../../chunk-IAWYWZSL.js";
9
9
  import "../../../../chunk-DHZ7AZKP.js";
10
10
 
@@ -52,10 +52,10 @@ var require_package = __commonJS({
52
52
  devDependencies: {
53
53
  "@batijs/compile": "workspace:*",
54
54
  "@types/better-sqlite3": "^7.6.13",
55
- "@types/node": "^20.19.9",
56
- "better-sqlite3": "^12.2.0",
57
- dotenv: "^17.2.2",
58
- tsx: "^4.20.5"
55
+ "@types/node": "^20.19.21",
56
+ "better-sqlite3": "^12.4.1",
57
+ dotenv: "^17.2.3",
58
+ tsx: "^4.20.6"
59
59
  },
60
60
  dependencies: {
61
61
  "@batijs/core": "workspace:*"
@@ -111,7 +111,7 @@ var require_package = __commonJS({
111
111
  }
112
112
  });
113
113
  async function getPackageJson(props) {
114
- const packageJson = await txs(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
114
+ const packageJson = await $xs(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
115
115
  return packageJson.setScript("sqlite:migrate", {
116
116
  value: "tsx ./database/sqlite/schema/all.ts",
117
117
  precedence: 1
@@ -3,8 +3,8 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
3
3
  const require = createRequire_BATI_CLI(import.meta.url);
4
4
 
5
5
  import {
6
- txs
7
- } from "../../../../chunk-2SZ4N3E5.js";
6
+ $xs
7
+ } from "../../../../chunk-LRTYGOU6.js";
8
8
  import "../../../../chunk-IAWYWZSL.js";
9
9
  import "../../../../chunk-DHZ7AZKP.js";
10
10
 
@@ -51,13 +51,13 @@ var require_package = __commonJS({
51
51
  license: "MIT",
52
52
  devDependencies: {
53
53
  "@batijs/compile": "workspace:*",
54
- "@tailwindcss/vite": "^4.1.13",
55
- "@types/node": "^20.19.9",
54
+ "@tailwindcss/vite": "^4.1.14",
55
+ "@types/node": "^20.19.21",
56
56
  autoprefixer: "^10.4.21",
57
- daisyui: "^5.1.8",
58
- tailwindcss: "^4.1.13",
59
- vike: "^0.4.239",
60
- vite: "^7.1.4"
57
+ daisyui: "^5.3.2",
58
+ tailwindcss: "^4.1.14",
59
+ vike: "^0.4.242",
60
+ vite: "^7.1.10"
61
61
  },
62
62
  dependencies: {
63
63
  "@batijs/core": "workspace:*"
@@ -75,7 +75,7 @@ var require_package = __commonJS({
75
75
  });
76
76
  async function getPackageJson(props) {
77
77
  const pkgjson = await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default);
78
- const packageJson = await txs(props, pkgjson);
78
+ const packageJson = await $xs(props, pkgjson);
79
79
  return packageJson.addDevDependencies(["tailwindcss", "@tailwindcss/vite"]).addDevDependencies(["daisyui"], props.meta.BATI.has("daisyui"));
80
80
  }
81
81
  export {
@@ -3,16 +3,16 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
3
3
  const require = createRequire_BATI_CLI(import.meta.url);
4
4
 
5
5
  import {
6
- Zri,
7
- rxs
8
- } from "../../../../chunk-2SZ4N3E5.js";
6
+ Kxs,
7
+ hni
8
+ } from "../../../../chunk-LRTYGOU6.js";
9
9
  import "../../../../chunk-IAWYWZSL.js";
10
10
  import "../../../../chunk-DHZ7AZKP.js";
11
11
 
12
12
  // ../../boilerplates/tailwindcss/dist/files/$vite.config.ts.js
13
13
  async function getViteConfig(props) {
14
- const mod = await rxs(props);
15
- Zri(mod, {
14
+ const mod = await Kxs(props);
15
+ hni(mod, {
16
16
  from: "@tailwindcss/vite",
17
17
  constructor: "tailwindcss"
18
18
  });
@@ -3,8 +3,8 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
3
3
  const require = createRequire_BATI_CLI(import.meta.url);
4
4
 
5
5
  import {
6
- txs
7
- } from "../../../../chunk-2SZ4N3E5.js";
6
+ $xs
7
+ } from "../../../../chunk-LRTYGOU6.js";
8
8
  import "../../../../chunk-IAWYWZSL.js";
9
9
  import "../../../../chunk-DHZ7AZKP.js";
10
10
 
@@ -51,12 +51,12 @@ var require_package = __commonJS({
51
51
  license: "MIT",
52
52
  devDependencies: {
53
53
  "@batijs/compile": "workspace:*",
54
- "@cloudflare/workers-types": "^4.20250906.0",
55
- "@types/node": "^20.19.9",
56
- "@universal-middleware/core": "^0.4.10",
57
- telefunc: "^0.2.12",
58
- vike: "^0.4.239",
59
- vite: "^7.1.4"
54
+ "@cloudflare/workers-types": "^4.20251011.0",
55
+ "@types/node": "^20.19.21",
56
+ "@universal-middleware/core": "^0.4.11",
57
+ telefunc: "^0.2.15",
58
+ vike: "^0.4.242",
59
+ vite: "^7.1.10"
60
60
  },
61
61
  dependencies: {
62
62
  "@batijs/core": "workspace:*"
@@ -91,7 +91,7 @@ var require_package = __commonJS({
91
91
  }
92
92
  });
93
93
  async function getPackageJson(props) {
94
- const packageJson = await txs(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
94
+ const packageJson = await $xs(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
95
95
  return packageJson.addDependencies(["telefunc", "@universal-middleware/core"]);
96
96
  }
97
97
  export {
@@ -3,16 +3,16 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
3
3
  const require = createRequire_BATI_CLI(import.meta.url);
4
4
 
5
5
  import {
6
- Zri,
7
- rxs
8
- } from "../../../../chunk-2SZ4N3E5.js";
6
+ Kxs,
7
+ hni
8
+ } from "../../../../chunk-LRTYGOU6.js";
9
9
  import "../../../../chunk-IAWYWZSL.js";
10
10
  import "../../../../chunk-DHZ7AZKP.js";
11
11
 
12
12
  // ../../boilerplates/telefunc/dist/files/$vite.config.ts.js
13
13
  async function getViteConfig(props) {
14
- const mod = await rxs(props);
15
- Zri(mod, {
14
+ const mod = await Kxs(props);
15
+ hni(mod, {
16
16
  from: "telefunc/vite",
17
17
  constructor: "telefunc",
18
18
  imported: "telefunc"
@@ -1,32 +1,39 @@
1
1
  import type { dbD1, dbSqlite } from "@batijs/drizzle/database/drizzle/db";
2
2
  import type { db as sqliteDb } from "@batijs/sqlite/database/sqlite/db";
3
3
  import type { D1Database } from "@cloudflare/workers-types";
4
- // TODO: stop using universal-middleware and directly integrate server middlewares instead and/or use vike-server https://vike.dev/vike-server. (Bati generates boilerplates that use universal-middleware https://github.com/magne4000/universal-middleware to make Bati's internal logic easier. This is temporary and will be removed soon.)
5
- import type { Get, UniversalHandler } from "@universal-middleware/core";
4
+ import { enhance, type UniversalHandler } from "@universal-middleware/core";
6
5
  import { telefunc } from "telefunc";
7
6
 
8
- export const telefuncHandler: Get<[], UniversalHandler> = () => async (request, context, runtime) => {
9
- const httpResponse = await telefunc({
10
- url: request.url.toString(),
11
- method: request.method,
12
- body: await request.text(),
13
- context: {
14
- ...(context as BATI.If<{
15
- 'BATI.has("sqlite") && !BATI.hasD1': { db: ReturnType<typeof sqliteDb> };
16
- 'BATI.has("drizzle") && !BATI.hasD1': { db: ReturnType<typeof dbSqlite> };
17
- 'BATI.has("drizzle")': { db: ReturnType<typeof dbD1> };
18
- "BATI.hasD1": { db: D1Database };
19
- }>),
20
- ...(runtime as BATI.If<{
21
- "BATI.hasD1": { runtime: "workerd"; adapter: "cloudflare-pages"; env?: { DB: D1Database } };
22
- }>),
23
- },
24
- });
25
- const { body, statusCode, contentType } = httpResponse;
26
- return new Response(body, {
27
- status: statusCode,
28
- headers: {
29
- "content-type": contentType,
30
- },
31
- });
32
- };
7
+ export const telefuncHandler: UniversalHandler = enhance(
8
+ async (request, context, runtime) => {
9
+ const httpResponse = await telefunc({
10
+ url: request.url.toString(),
11
+ method: request.method,
12
+ body: await request.text(),
13
+ context: {
14
+ ...(context as BATI.If<{
15
+ 'BATI.has("sqlite") && !BATI.hasD1': { db: ReturnType<typeof sqliteDb> };
16
+ 'BATI.has("drizzle") && !BATI.hasD1': { db: ReturnType<typeof dbSqlite> };
17
+ 'BATI.has("drizzle")': { db: ReturnType<typeof dbD1> };
18
+ "BATI.hasD1": { db: D1Database };
19
+ }>),
20
+ ...(runtime as BATI.If<{
21
+ "BATI.hasD1": { runtime: "workerd"; adapter: "cloudflare-pages"; env?: { DB: D1Database } };
22
+ }>),
23
+ },
24
+ });
25
+ const { body, statusCode, contentType } = httpResponse;
26
+ return new Response(body, {
27
+ status: statusCode,
28
+ headers: {
29
+ "content-type": contentType,
30
+ },
31
+ });
32
+ },
33
+ {
34
+ name: "my-app:telefunc-handler",
35
+ path: `/_telefunc`,
36
+ method: ["GET", "POST"],
37
+ immutable: false,
38
+ },
39
+ );
@@ -1,2 +1,2 @@
1
- import type { Get, UniversalHandler } from "@universal-middleware/core";
2
- export declare const telefuncHandler: Get<[], UniversalHandler>;
1
+ import { type UniversalHandler } from "@universal-middleware/core";
2
+ export declare const telefuncHandler: UniversalHandler;