@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.
- package/dist/boilerplates/@batijs/auth0/files/$.env.js +6 -5
- package/dist/boilerplates/@batijs/auth0/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/auth0/files/$wrangler.toml.js +32 -0
- package/dist/boilerplates/@batijs/authjs/files/$package.json.js +7 -6
- package/dist/boilerplates/@batijs/authjs/files/server/authjs-handler.ts +42 -35
- package/dist/boilerplates/@batijs/authjs/types/server/authjs-handler.d.ts +8 -3
- package/dist/boilerplates/@batijs/aws/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/aws/files/$package.json.js +10 -10
- package/dist/boilerplates/@batijs/aws/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/biome/files/$package.json.js +4 -4
- package/dist/boilerplates/@batijs/cloudflare/files/$package.json.js +17 -26
- package/dist/boilerplates/@batijs/cloudflare/files/wrangler.toml +2 -3
- package/dist/boilerplates/@batijs/compiled/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/compiled/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/d1/files/$README.md.js +4 -4
- package/dist/boilerplates/@batijs/d1/files/$package.json.js +8 -8
- package/dist/boilerplates/@batijs/d1/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/d1/files/database/d1/helpers.ts +3 -11
- package/dist/boilerplates/@batijs/d1-sqlite/files/$package.json.js +7 -7
- package/dist/boilerplates/@batijs/drizzle/files/$.env.js +3 -3
- package/dist/boilerplates/@batijs/drizzle/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/drizzle/files/$package.json.js +8 -8
- package/dist/boilerplates/@batijs/eslint/files/$package.json.js +8 -8
- package/dist/boilerplates/@batijs/eslint/types/eslint.config.d.ts +1 -1
- package/dist/boilerplates/@batijs/express/files/$package.json.js +16 -29
- package/dist/boilerplates/@batijs/express/files/server/entry.ts +45 -0
- package/dist/boilerplates/@batijs/express/types/server/entry.d.ts +3 -0
- package/dist/boilerplates/@batijs/fastify/files/$package.json.js +18 -32
- package/dist/boilerplates/@batijs/fastify/files/server/entry.ts +52 -0
- package/dist/boilerplates/@batijs/fastify/types/server/entry.d.ts +4 -0
- package/dist/boilerplates/@batijs/google-analytics/files/$.env.js +3 -3
- package/dist/boilerplates/@batijs/h3/files/$package.json.js +21 -32
- package/dist/boilerplates/@batijs/h3/files/server/entry.ts +45 -0
- package/dist/boilerplates/@batijs/{express/types/express-entry.d.ts → h3/types/server/entry.d.ts} +1 -1
- package/dist/boilerplates/@batijs/hono/files/$package.json.js +23 -40
- package/dist/boilerplates/@batijs/hono/files/entry_aws_lambda.ts +2 -9
- package/dist/boilerplates/@batijs/hono/files/server/entry.ts +53 -0
- package/dist/boilerplates/@batijs/hono/types/server/entry.d.ts +4 -0
- package/dist/boilerplates/@batijs/mantine/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/mantine/files/$package.json.js +12 -12
- package/dist/boilerplates/@batijs/photon/files/$README.md.js +29 -0
- package/dist/boilerplates/@batijs/photon/files/$package.json.js +109 -0
- package/dist/boilerplates/@batijs/photon/files/+photon.ts +7 -0
- package/dist/boilerplates/@batijs/photon/types/+photon.d.ts +4 -0
- package/dist/boilerplates/@batijs/pnpm/files/$pnpm-workspace.yaml.js +3 -3
- package/dist/boilerplates/@batijs/prettier/files/$package.json.js +4 -4
- package/dist/boilerplates/@batijs/prisma/files/$.env.js +3 -3
- package/dist/boilerplates/@batijs/prisma/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/prisma/files/$package.json.js +6 -6
- package/dist/boilerplates/@batijs/react/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/react/files/$package.json.js +16 -15
- package/dist/boilerplates/@batijs/react/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/react/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/react/files/pages/+config.ts +6 -1
- package/dist/boilerplates/@batijs/react/types/pages/+config.d.ts +63 -2
- package/dist/boilerplates/@batijs/react-sentry/files/$package.json.js +10 -10
- package/dist/boilerplates/@batijs/sentry/files/$.env.js +4 -4
- package/dist/boilerplates/@batijs/sentry/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/sentry/files/$package.json.js +6 -6
- package/dist/boilerplates/@batijs/sentry/files/$vite.config.ts.js +7 -7
- package/dist/boilerplates/@batijs/sentry/files/pages/$+client.ts.js +9 -9
- package/dist/boilerplates/@batijs/shadcn-ui/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/shadcn-ui/files/$package.json.js +7 -7
- package/dist/boilerplates/@batijs/shadcn-ui/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/shadcn-ui/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/shared/files/$README.md.js +9 -9
- package/dist/boilerplates/@batijs/shared/files/package.json +3 -3
- package/dist/boilerplates/@batijs/shared/files/vite.config.ts +1 -20
- package/dist/boilerplates/@batijs/shared-db/files/server/db-middleware.ts +21 -15
- package/dist/boilerplates/@batijs/shared-db/types/server/db-middleware.d.ts +2 -2
- package/dist/boilerplates/@batijs/shared-server/files/$package.json.js +8 -14
- package/dist/boilerplates/@batijs/shared-server/files/server/create-todo-handler.ts +33 -34
- package/dist/boilerplates/@batijs/shared-server/types/server/create-todo-handler.d.ts +3 -4
- package/dist/boilerplates/@batijs/solid/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/solid/files/$package.json.js +11 -10
- package/dist/boilerplates/@batijs/solid/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/solid/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/solid/files/pages/+config.ts +6 -1
- package/dist/boilerplates/@batijs/solid/types/pages/+config.d.ts +70 -2
- package/dist/boilerplates/@batijs/solid-sentry/files/$package.json.js +7 -7
- package/dist/boilerplates/@batijs/sqlite/files/$.env.js +3 -3
- package/dist/boilerplates/@batijs/sqlite/files/$README.md.js +4 -3
- package/dist/boilerplates/@batijs/sqlite/files/$package.json.js +7 -7
- package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +9 -9
- package/dist/boilerplates/@batijs/tailwindcss/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +9 -9
- package/dist/boilerplates/@batijs/telefunc/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/telefunc/files/server/telefunc-handler.ts +34 -27
- package/dist/boilerplates/@batijs/telefunc/types/server/telefunc-handler.d.ts +2 -2
- package/dist/boilerplates/@batijs/trpc/files/$package.json.js +9 -9
- package/dist/boilerplates/@batijs/trpc/files/server/trpc-handler.ts +26 -18
- package/dist/boilerplates/@batijs/trpc/types/server/trpc-handler.d.ts +6 -1
- package/dist/boilerplates/@batijs/trpc/types/trpc/client.d.ts +1 -1
- package/dist/boilerplates/@batijs/ts-rest/files/$package.json.js +6 -6
- package/dist/boilerplates/@batijs/ts-rest/files/server/ts-rest-handler.ts +21 -14
- package/dist/boilerplates/@batijs/ts-rest/types/server/ts-rest-handler.d.ts +2 -2
- package/dist/boilerplates/@batijs/vercel/files/$package.json.js +8 -9
- package/dist/boilerplates/@batijs/vercel/files/pages/$+config.ts.js +3 -3
- package/dist/boilerplates/@batijs/vue/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/vue/files/$package.json.js +15 -14
- package/dist/boilerplates/@batijs/vue/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/vue/files/$vite.config.ts.js +6 -6
- package/dist/boilerplates/@batijs/vue/files/pages/+config.ts +6 -1
- package/dist/boilerplates/@batijs/vue/types/pages/+config.d.ts +1 -2
- package/dist/boilerplates/@batijs/vue-sentry/files/$package.json.js +8 -8
- package/dist/boilerplates/boilerplates.json +20 -0
- package/dist/{chunk-2SZ4N3E5.js → chunk-LRTYGOU6.js} +83539 -83181
- package/dist/index.js +720 -659
- package/dist/jiti-ZW3ADF2F-7XIEJQMO.js +2982 -0
- package/dist/src-5HGZFBZ3-KQZBBJSW.js +468 -0
- package/package.json +10 -10
- package/dist/boilerplates/@batijs/cloudflare/files/$tsconfig.json.js +0 -19
- package/dist/boilerplates/@batijs/cloudflare/files/$vite.config.ts.js +0 -34
- package/dist/boilerplates/@batijs/express/files/express-entry.ts +0 -102
- package/dist/boilerplates/@batijs/fastify/files/fastify-entry.ts +0 -140
- package/dist/boilerplates/@batijs/fastify/types/fastify-entry.d.ts +0 -3
- package/dist/boilerplates/@batijs/h3/files/h3-entry.ts +0 -144
- package/dist/boilerplates/@batijs/h3/types/h3-entry.d.ts +0 -4
- package/dist/boilerplates/@batijs/hono/files/$vite.config.ts.js +0 -36
- package/dist/boilerplates/@batijs/hono/files/hono-entry.node.ts +0 -31
- package/dist/boilerplates/@batijs/hono/files/hono-entry.ts +0 -74
- package/dist/boilerplates/@batijs/hono/types/hono-entry.d.ts +0 -6
- package/dist/boilerplates/@batijs/hono/types/hono-entry.node.d.ts +0 -1
- package/dist/boilerplates/@batijs/shared-server/files/server/vike-handler.ts +0 -20
- package/dist/boilerplates/@batijs/shared-server/types/server/vike-handler.d.ts +0 -2
- package/dist/boilerplates/@batijs/vercel/files/$tsconfig.json.js +0 -19
- package/dist/boilerplates/@batijs/vercel/files/$vite.config.ts.js +0 -27
- package/dist/jiti-W5Y5D52V-VBLACVBV.js +0 -30587
- 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
|
|
9
|
+
import { enhance, type UniversalHandler } from "@universal-middleware/core";
|
|
11
10
|
|
|
12
|
-
export const createTodoHandler:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
BATI.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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
|
|
5
|
-
export declare const createTodoHandler:
|
|
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
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
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
|
|
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
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
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.
|
|
54
|
+
"@types/node": "^20.19.21",
|
|
55
55
|
"solid-js": "^1.9.9",
|
|
56
|
-
tailwindcss: "^4.1.
|
|
57
|
-
typescript: "^5.9.
|
|
58
|
-
vike: "^0.4.
|
|
59
|
-
"vike-
|
|
60
|
-
|
|
61
|
-
|
|
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
|
|
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
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
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
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
} from "../../../../chunk-
|
|
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
|
|
15
|
-
|
|
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:
|
|
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
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
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.
|
|
55
|
-
"@types/node": "^20.19.
|
|
54
|
+
"@sentry/solid": "^10.19.0",
|
|
55
|
+
"@types/node": "^20.19.21",
|
|
56
56
|
"solid-js": "^1.9.9",
|
|
57
|
-
"vike-solid": "^0.7.
|
|
58
|
-
vite: "^7.1.
|
|
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
|
|
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
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
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
|
|
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
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
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
|
-
|
|
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
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
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.
|
|
56
|
-
"better-sqlite3": "^12.
|
|
57
|
-
dotenv: "^17.2.
|
|
58
|
-
tsx: "^4.20.
|
|
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
|
|
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
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
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.
|
|
55
|
-
"@types/node": "^20.19.
|
|
54
|
+
"@tailwindcss/vite": "^4.1.14",
|
|
55
|
+
"@types/node": "^20.19.21",
|
|
56
56
|
autoprefixer: "^10.4.21",
|
|
57
|
-
daisyui: "^5.
|
|
58
|
-
tailwindcss: "^4.1.
|
|
59
|
-
vike: "^0.4.
|
|
60
|
-
vite: "^7.1.
|
|
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
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
} from "../../../../chunk-
|
|
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
|
|
15
|
-
|
|
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
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
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.
|
|
55
|
-
"@types/node": "^20.19.
|
|
56
|
-
"@universal-middleware/core": "^0.4.
|
|
57
|
-
telefunc: "^0.2.
|
|
58
|
-
vike: "^0.4.
|
|
59
|
-
vite: "^7.1.
|
|
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
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
} from "../../../../chunk-
|
|
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
|
|
15
|
-
|
|
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
|
-
|
|
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:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
|
2
|
-
export declare const telefuncHandler:
|
|
1
|
+
import { type UniversalHandler } from "@universal-middleware/core";
|
|
2
|
+
export declare const telefuncHandler: UniversalHandler;
|