@batijs/cli 0.0.650 → 0.0.652
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/{asset-package.json-Wd5j3EKB.js → asset-package.json-0oMdGF0g.js} +1 -1
- package/dist/{asset-package.json-CFrBrqtV.js → asset-package.json-B0NdK0ho.js} +2 -2
- package/dist/{asset-package.json-9qjIK96w.js → asset-package.json-B8AVDNBU.js} +1 -1
- package/dist/{asset-package.json-By7CVlYM.js → asset-package.json-BklLTc-3.js} +2 -2
- package/dist/{asset-package.json-CAXFrLbi.js → asset-package.json-BmDnXWQm.js} +2 -2
- package/dist/{asset-package.json-PRKYrxEU.js → asset-package.json-BmtFF7PF.js} +1 -1
- package/dist/{asset-package.json-BkoVqsYe.js → asset-package.json-CDymEsIZ.js} +1 -1
- package/dist/{asset-package.json-C_aGwesI.js → asset-package.json-CEuTzbzC.js} +1 -1
- package/dist/{asset-package.json-Dcax-8-H.js → asset-package.json-CJw7XEsv.js} +4 -4
- package/dist/{asset-package.json-CBKGvpRO.js → asset-package.json-CS3bcBbB.js} +2 -2
- package/dist/{asset-package.json-BO_mG8iv.js → asset-package.json-CeCtp88g.js} +1 -1
- package/dist/{asset-package.json-BjED634i.js → asset-package.json-CuYvHpfF.js} +1 -1
- package/dist/{asset-package.json-IZ_nF8HA.js → asset-package.json-CvDm4Paq.js} +3 -3
- package/dist/{asset-package.json-2qBJNO7t.js → asset-package.json-D1flHhPS.js} +1 -1
- package/dist/{asset-package.json-F_LaGIFG.js → asset-package.json-DID-HIRh.js} +1 -1
- package/dist/{asset-package.json-Dp8_jZlq.js → asset-package.json-DP7v-FYq.js} +1 -1
- package/dist/{asset-package.json-DobDM57N.js → asset-package.json-DQGSDwIQ.js} +1 -1
- package/dist/{asset-package.json-B4-el3C8.js → asset-package.json-DSgQY-Gf.js} +3 -3
- package/dist/{asset-package.json-Bz2A-j3e.js → asset-package.json-DldqNQpY.js} +1 -1
- package/dist/{asset-package.json-D__Qv8zc.js → asset-package.json-NB4WcxPN.js} +1 -1
- package/dist/{asset-package.json-JX4l_iJo.js → asset-package.json-O4v_VJIB.js} +3 -3
- package/dist/{asset-package.json-BvDYjR1q.js → asset-package.json-QlrVXkbH.js} +3 -3
- package/dist/{asset-package.json-CEIIoP83.js → asset-package.json-UccRgYgA.js} +1 -1
- package/dist/{asset-package.json-BD7JeKOS.js → asset-package.json-oXC06ijh.js} +2 -2
- package/dist/{asset-package.json-CuqCIRq1.js → asset-package.json-uf2g2h8M.js} +1 -1
- package/dist/{asset-package2.json-BvSATRUX.js → asset-package2.json-BTOfT2Qt.js} +2 -2
- package/dist/{asset-package2.json-DPPOFRzH.js → asset-package2.json-BcQxgRCo.js} +1 -1
- package/dist/{asset-package2.json-4ZXPt1c-.js → asset-package2.json-Bn9yI1Th.js} +1 -1
- package/dist/{asset-package2.json-Cqt3zXsB.js → asset-package2.json-KyL19vnl.js} +1 -1
- package/dist/{asset-package2.json-B0r28M_8.js → asset-package2.json-tycQSmlY.js} +2 -2
- package/dist/boilerplates/@batijs/authjs/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/authjs/files/asset-package.json.mjs +1 -1
- package/dist/boilerplates/@batijs/authjs/files/server/authjs-handler.ts +1 -1
- package/dist/boilerplates/@batijs/aws/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/aws/files/asset-package.json.mjs +4 -4
- package/dist/boilerplates/@batijs/aws/files/cdk/bin/infrastructure.ts +1 -1
- package/dist/boilerplates/@batijs/better-auth/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/better-auth/files/asset-package.json.mjs +3 -3
- package/dist/boilerplates/@batijs/better-auth/files/database/better-auth/migrate.ts +1 -3
- package/dist/boilerplates/@batijs/better-auth/files/database/drizzle/schema/auth.ts +5 -5
- package/dist/boilerplates/@batijs/better-auth/files/server/better-auth-handler.ts +2 -2
- package/dist/boilerplates/@batijs/better-auth/files/server/better-auth.ts +8 -8
- package/dist/boilerplates/@batijs/biome/files/$biome.json.js +3 -3
- package/dist/boilerplates/@batijs/biome/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/biome/files/asset-package.json.mjs +2 -2
- package/dist/boilerplates/@batijs/cloudflare/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/cloudflare/files/$vite.config.ts.js +9 -9
- package/dist/boilerplates/@batijs/cloudflare/files/asset-package.json.mjs +3 -3
- package/dist/boilerplates/@batijs/compiled/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/compiled/files/$vite.config.ts.js +9 -9
- package/dist/boilerplates/@batijs/compiled/files/asset-package.json.mjs +1 -1
- package/dist/boilerplates/@batijs/d1/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/d1/files/asset-package.json.mjs +2 -2
- package/dist/boilerplates/@batijs/d1-sqlite/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/d1-sqlite/files/asset-package.json.mjs +1 -1
- package/dist/boilerplates/@batijs/docker-compose/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/docker-compose/files/asset-package.json.mjs +1 -1
- package/dist/boilerplates/@batijs/docker-compose/files/docker-compose.yml +6 -6
- package/dist/boilerplates/@batijs/drizzle/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/drizzle/files/asset-package.json.mjs +1 -1
- package/dist/boilerplates/@batijs/drizzle/files/database/drizzle/db.ts +3 -3
- package/dist/boilerplates/@batijs/drizzle/files/database/drizzle/queries/todos.ts +10 -10
- package/dist/boilerplates/@batijs/drizzle/files/database/drizzle/schema/todos.ts +2 -2
- package/dist/boilerplates/@batijs/drizzle/files/drizzle.config.ts +3 -3
- package/dist/boilerplates/@batijs/drizzle/types/database/drizzle/queries/todos.d.mts +6 -6
- package/dist/boilerplates/@batijs/edgeone/files/$vite.config.ts.js +7 -7
- package/dist/boilerplates/@batijs/elysia/files/+server.ts +1 -1
- package/dist/boilerplates/@batijs/elysia/files/server/elysia.ts +9 -9
- package/dist/boilerplates/@batijs/eslint/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/eslint/files/asset-package.json.mjs +1 -1
- package/dist/boilerplates/@batijs/eslint/files/eslint.config.ts +14 -14
- package/dist/boilerplates/@batijs/express/files/+server.ts +10 -10
- package/dist/boilerplates/@batijs/fastify/files/+server.ts +10 -10
- package/dist/boilerplates/@batijs/hono/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/hono/files/+server.ts +2 -2
- package/dist/boilerplates/@batijs/hono/files/asset-package.json.mjs +1 -1
- package/dist/boilerplates/@batijs/hono/files/entry_aws_lambda.ts +1 -3
- package/dist/boilerplates/@batijs/hono/files/server/hono.ts +9 -9
- package/dist/boilerplates/@batijs/kysely/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/kysely/files/$vite.config.ts.js +9 -12
- package/dist/boilerplates/@batijs/kysely/files/asset-package.json.mjs +2 -2
- package/dist/boilerplates/@batijs/kysely/files/database/kysely/db.ts +5 -5
- package/dist/boilerplates/@batijs/kysely/files/database/kysely/migrate.ts +2 -4
- package/dist/boilerplates/@batijs/kysely/files/database/kysely/migrations/001_create_todos_table.ts +2 -3
- package/dist/boilerplates/@batijs/kysely/files/database/kysely/queries/todos.ts +8 -8
- package/dist/boilerplates/@batijs/kysely/files/vite-plugin-input.ts +1 -2
- package/dist/boilerplates/@batijs/kysely/types/database/kysely/queries/todos.d.mts +8 -8
- package/dist/boilerplates/@batijs/mantine/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/mantine/files/asset-package.json.mjs +3 -3
- package/dist/boilerplates/@batijs/netlify/files/$vite.config.ts.js +8 -8
- package/dist/boilerplates/@batijs/oxlint/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/oxlint/files/asset-package.json.mjs +1 -1
- package/dist/boilerplates/@batijs/postgres/files/database/postgres/db.ts +1 -1
- package/dist/boilerplates/@batijs/postgres/files/database/postgres/schema/todos.ts +1 -1
- package/dist/boilerplates/@batijs/prettier/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/prettier/files/asset-package.json.mjs +1 -1
- package/dist/boilerplates/@batijs/react/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/react/files/$vite.config.ts.js +7 -7
- package/dist/boilerplates/@batijs/react/files/asset-package.json.mjs +3 -3
- package/dist/boilerplates/@batijs/react/files/assets/logo.svg +1 -0
- package/dist/boilerplates/@batijs/react/files/pages/+Head.tsx +6 -6
- package/dist/boilerplates/@batijs/react/files/pages/+Layout.tsx +14 -14
- package/dist/boilerplates/@batijs/react/files/pages/+config.ts +3 -3
- package/dist/boilerplates/@batijs/react/files/pages/index/+Page.tsx +1 -1
- package/dist/boilerplates/@batijs/react/files/pages/index/Counter.tsx +3 -3
- package/dist/boilerplates/@batijs/react/files/pages/todo/TodoList.tsx +6 -6
- package/dist/boilerplates/@batijs/react-better-auth/files/pages/account/+Page.tsx +1 -1
- package/dist/boilerplates/@batijs/react-better-auth/files/pages/login/+Page.tsx +4 -4
- package/dist/boilerplates/@batijs/react-better-auth/files/pages/signup/+Page.tsx +4 -4
- package/dist/boilerplates/@batijs/react-sentry/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/react-sentry/files/asset-package.json.mjs +1 -1
- package/dist/boilerplates/@batijs/sentry/files/$vite.config.ts.js +10 -10
- package/dist/boilerplates/@batijs/sentry/files/pages/$+client.ts.js +12 -18
- package/dist/boilerplates/@batijs/shadcn-ui/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/shadcn-ui/files/$vite.config.ts.js +5 -27
- package/dist/boilerplates/@batijs/shadcn-ui/files/asset-package.json.mjs +2 -2
- package/dist/boilerplates/@batijs/shared/files/vite.config.ts +1 -1
- package/dist/boilerplates/@batijs/shared-db/files/server/db-middleware.ts +21 -21
- package/dist/boilerplates/@batijs/shared-db/types/server/db-middleware.d.mts +10 -10
- package/dist/boilerplates/@batijs/shared-env/files/server/env.ts +6 -4
- package/dist/boilerplates/@batijs/shared-env/files/server/load.ts +1 -1
- package/dist/boilerplates/@batijs/shared-env/types/server/env.d.mts +2 -2
- package/dist/boilerplates/@batijs/shared-server/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/shared-server/files/asset-package.json.mjs +1 -1
- package/dist/boilerplates/@batijs/shared-server/files/server/create-todo-handler.ts +16 -16
- package/dist/boilerplates/@batijs/shared-server/types/server/create-todo-handler.d.mts +10 -10
- package/dist/boilerplates/@batijs/shared-todo/files/global.d.ts +11 -11
- package/dist/boilerplates/@batijs/shared-todo/files/pages/todo/+config.ts +1 -4
- package/dist/boilerplates/@batijs/shared-todo/files/pages/todo/+data.ts +5 -5
- package/dist/boilerplates/@batijs/solid/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/solid/files/$vite.config.ts.js +7 -7
- package/dist/boilerplates/@batijs/solid/files/asset-package.json.mjs +1 -1
- package/dist/boilerplates/@batijs/solid/files/assets/logo.svg +1 -0
- package/dist/boilerplates/@batijs/solid/files/pages/+Head.tsx +3 -4
- package/dist/boilerplates/@batijs/solid/files/pages/+Layout.tsx +10 -10
- package/dist/boilerplates/@batijs/solid/files/pages/+config.ts +3 -3
- package/dist/boilerplates/@batijs/solid/files/pages/index/Counter.tsx +2 -2
- package/dist/boilerplates/@batijs/solid/files/pages/todo/TodoList.tsx +6 -6
- package/dist/boilerplates/@batijs/solid-better-auth/files/pages/account/+Page.tsx +1 -1
- package/dist/boilerplates/@batijs/solid-better-auth/files/pages/login/+Page.tsx +4 -4
- package/dist/boilerplates/@batijs/solid-better-auth/files/pages/signup/+Page.tsx +4 -4
- package/dist/boilerplates/@batijs/solid-sentry/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/solid-sentry/files/asset-package.json.mjs +1 -1
- package/dist/boilerplates/@batijs/sqlite/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/sqlite/files/asset-package.json.mjs +1 -1
- package/dist/boilerplates/@batijs/sqlite/files/database/sqlite/db.ts +1 -1
- package/dist/boilerplates/@batijs/sqlite/files/database/sqlite/schema/todos.ts +1 -1
- package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/tailwindcss/files/$vite.config.ts.js +7 -7
- package/dist/boilerplates/@batijs/tailwindcss/files/asset-package.json.mjs +2 -2
- package/dist/boilerplates/@batijs/tailwindcss/files/pages/tailwind.css +2 -2
- package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/telefunc/files/$vite.config.ts.js +8 -8
- package/dist/boilerplates/@batijs/telefunc/files/asset-package.json.mjs +1 -1
- package/dist/boilerplates/@batijs/telefunc/files/global.d.ts +12 -12
- package/dist/boilerplates/@batijs/telefunc/files/pages/todo/TodoList.telefunc.ts +5 -5
- package/dist/boilerplates/@batijs/telefunc/files/server/telefunc-handler.ts +12 -12
- package/dist/boilerplates/@batijs/trpc/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/trpc/files/asset-package.json.mjs +1 -1
- package/dist/boilerplates/@batijs/trpc/files/server/trpc-handler.ts +4 -4
- package/dist/boilerplates/@batijs/trpc/files/trpc/server.ts +15 -15
- package/dist/boilerplates/@batijs/ts-rest/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/ts-rest/files/asset-package.json.mjs +1 -1
- package/dist/boilerplates/@batijs/ts-rest/files/server/ts-rest-handler.ts +15 -15
- package/dist/boilerplates/@batijs/vercel/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/vercel/files/$vite.config.ts.js +8 -8
- package/dist/boilerplates/@batijs/vercel/files/asset-package.json.mjs +1 -1
- package/dist/boilerplates/@batijs/vue/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/vue/files/$vite.config.ts.js +7 -7
- package/dist/boilerplates/@batijs/vue/files/asset-package.json.mjs +2 -2
- package/dist/boilerplates/@batijs/vue/files/assets/logo.svg +1 -0
- package/dist/boilerplates/@batijs/vue/files/components/Content.vue +2 -2
- package/dist/boilerplates/@batijs/vue/files/components/{Counter.vue → CounterButton.vue} +3 -3
- package/dist/boilerplates/@batijs/vue/files/components/Logo.vue +2 -2
- package/dist/boilerplates/@batijs/vue/files/components/Sidebar.vue +2 -2
- package/dist/boilerplates/@batijs/vue/files/pages/+Head.vue +2 -3
- package/dist/boilerplates/@batijs/vue/files/pages/+Layout.vue +7 -7
- package/dist/boilerplates/@batijs/vue/files/pages/+config.ts +3 -3
- package/dist/boilerplates/@batijs/vue/files/pages/+onCreateApp.ts +1 -1
- package/dist/boilerplates/@batijs/vue/files/pages/index/+Page.vue +2 -2
- package/dist/boilerplates/@batijs/vue/files/pages/todo/TodoList.vue +8 -8
- package/dist/boilerplates/@batijs/vue/types/node_modules/.bun/{vike-vue@0.9.11+7230c3f931f788a8 → vike-vue@0.9.11+b486b24823877407}/node_modules/vike-vue/dist/types/VikeHooks.d.mts +1 -1
- package/dist/boilerplates/@batijs/vue/types/pages/+onCreateApp.d.mts +1 -1
- package/dist/boilerplates/@batijs/vue-better-auth/files/pages/account/+Page.vue +1 -1
- package/dist/boilerplates/@batijs/vue-better-auth/files/pages/login/+Page.vue +3 -3
- package/dist/boilerplates/@batijs/vue-better-auth/files/pages/signup/+Page.vue +2 -2
- package/dist/boilerplates/@batijs/vue-sentry/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/vue-sentry/files/asset-package.json.mjs +2 -2
- package/dist/index.js +40 -43
- package/package.json +7 -7
- /package/dist/boilerplates/@batijs/vue/files/components/{Link.vue → NavLink.vue} +0 -0
- /package/dist/boilerplates/@batijs/vue/types/node_modules/.bun/{vike-vue@0.9.11+7230c3f931f788a8 → vike-vue@0.9.11+b486b24823877407}/node_modules/vike-vue/dist/types/public.d.mts +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { loadPackageJson } from "@batijs/core";
|
|
4
4
|
//#region ../../boilerplates/solid/dist/files/$package.json.mjs
|
|
5
5
|
async function getPackageJson(props) {
|
|
6
|
-
return (await loadPackageJson(props, await import("../../../../asset-package.json-
|
|
6
|
+
return (await loadPackageJson(props, await import("../../../../asset-package.json-CEuTzbzC.js").then((x) => x.default))).addDevDependencies(["vite", "vite-plugin-solid"]).addDependencies([
|
|
7
7
|
"solid-js",
|
|
8
8
|
"vike-solid",
|
|
9
9
|
"vike"
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { addVitePlugin,
|
|
3
|
+
import { addVitePlugin, transformConfig } from "@batijs/core";
|
|
4
4
|
//#region ../../boilerplates/solid/dist/files/$vite.config.ts.mjs
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
function getViteConfig(props) {
|
|
6
|
+
return transformConfig(props, (root) => {
|
|
7
|
+
addVitePlugin(root, {
|
|
8
|
+
from: "vike-solid/vite",
|
|
9
|
+
constructor: "vikeSolid"
|
|
10
|
+
});
|
|
10
11
|
});
|
|
11
|
-
return mod.generate().code;
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|
|
14
14
|
export { getViteConfig as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<svg class="hammer" width="41.217" height="41.217" version="1.1" viewBox="-50 -50 41.217 41.217" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<title>Logo</title>
|
|
2
3
|
<defs>
|
|
3
4
|
<mask id="mask111">
|
|
4
5
|
<rect x="-19.21" y="-25.7" width="46.217" height="41.217" fill="url(#linearGradient115)"/>
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
/* eslint-disable solid/no-innerhtml */
|
|
2
|
-
|
|
3
1
|
// https://vike.dev/Head
|
|
4
2
|
|
|
5
3
|
import logoUrl from "../assets/logo.svg";
|
|
6
4
|
|
|
7
5
|
export function Head() {
|
|
8
|
-
if (BATI.has("plausible.io")) {
|
|
6
|
+
if ($$.BATI.has("plausible.io")) {
|
|
9
7
|
return (
|
|
10
8
|
<>
|
|
11
9
|
<link rel="icon" href={logoUrl} />
|
|
@@ -14,7 +12,7 @@ export function Head() {
|
|
|
14
12
|
<script defer data-domain="yourdomain.com" src="https://plausible.io/js/script.js" />
|
|
15
13
|
</>
|
|
16
14
|
);
|
|
17
|
-
} else if (BATI.has("google-analytics")) {
|
|
15
|
+
} else if ($$.BATI.has("google-analytics")) {
|
|
18
16
|
return (
|
|
19
17
|
<>
|
|
20
18
|
<script
|
|
@@ -22,6 +20,7 @@ export function Head() {
|
|
|
22
20
|
src={`https://www.googletagmanager.com/gtag/js?id=${import.meta.env.PUBLIC_ENV__GOOGLE_ANALYTICS}`}
|
|
23
21
|
/>
|
|
24
22
|
<script
|
|
23
|
+
// eslint-disable-next-line solid/no-innerhtml
|
|
25
24
|
innerHTML={`window.dataLayer = window.dataLayer || [];
|
|
26
25
|
function gtag(){dataLayer.push(arguments);}
|
|
27
26
|
gtag('js', new Date());
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// https://vike.dev/Layout
|
|
2
2
|
|
|
3
3
|
import "./Layout.css";
|
|
4
|
-
|
|
4
|
+
// $$.BATI.has("tailwindcss")
|
|
5
5
|
import "./tailwind.css";
|
|
6
6
|
import { AuthNav } from "@batijs/solid-better-auth/components/AuthNav";
|
|
7
7
|
import type { JSX } from "solid-js";
|
|
@@ -11,9 +11,9 @@ import { Link } from "../components/Link";
|
|
|
11
11
|
export default function Layout(props: { children?: JSX.Element }) {
|
|
12
12
|
return (
|
|
13
13
|
<div
|
|
14
|
-
|
|
14
|
+
// $$.BATI.has("tailwindcss")
|
|
15
15
|
class={"flex max-w-5xl m-auto"}
|
|
16
|
-
|
|
16
|
+
// !$$.BATI.has("tailwindcss")
|
|
17
17
|
style={{
|
|
18
18
|
display: "flex",
|
|
19
19
|
"max-width": "900px",
|
|
@@ -25,7 +25,7 @@ export default function Layout(props: { children?: JSX.Element }) {
|
|
|
25
25
|
<Link href="/">Welcome</Link>
|
|
26
26
|
<Link href="/todo">Todo</Link>
|
|
27
27
|
<Link href="/star-wars">Data Fetching</Link>
|
|
28
|
-
{BATI.has("better-auth") ? <AuthNav /> : null}
|
|
28
|
+
{$$.BATI.has("better-auth") ? <AuthNav /> : null}
|
|
29
29
|
</Sidebar>
|
|
30
30
|
<Content>{props.children}</Content>
|
|
31
31
|
</div>
|
|
@@ -36,9 +36,9 @@ function Sidebar(props: { children: JSX.Element }) {
|
|
|
36
36
|
return (
|
|
37
37
|
<div
|
|
38
38
|
id="sidebar"
|
|
39
|
-
|
|
39
|
+
// $$.BATI.has("tailwindcss")
|
|
40
40
|
class={"p-5 flex flex-col shrink-0 border-r-2 border-r-gray-200"}
|
|
41
|
-
|
|
41
|
+
// !$$.BATI.has("tailwindcss")
|
|
42
42
|
style={{
|
|
43
43
|
padding: "20px",
|
|
44
44
|
"flex-shrink": 0,
|
|
@@ -58,9 +58,9 @@ function Content(props: { children: JSX.Element }) {
|
|
|
58
58
|
<div id="page-container">
|
|
59
59
|
<div
|
|
60
60
|
id="page-content"
|
|
61
|
-
|
|
61
|
+
// $$.BATI.has("tailwindcss")
|
|
62
62
|
class={"p-5 pb-12 min-h-screen"}
|
|
63
|
-
|
|
63
|
+
// !$$.BATI.has("tailwindcss")
|
|
64
64
|
style={{
|
|
65
65
|
padding: "20px",
|
|
66
66
|
"padding-bottom": "50px",
|
|
@@ -76,9 +76,9 @@ function Content(props: { children: JSX.Element }) {
|
|
|
76
76
|
function Logo() {
|
|
77
77
|
return (
|
|
78
78
|
<div
|
|
79
|
-
|
|
79
|
+
// $$.BATI.has("tailwindcss")
|
|
80
80
|
class={"p-5 mb-2"}
|
|
81
|
-
|
|
81
|
+
// !$$.BATI.has("tailwindcss")
|
|
82
82
|
style={{
|
|
83
83
|
"margin-top": "20px",
|
|
84
84
|
"margin-bottom": "10px",
|
|
@@ -9,14 +9,14 @@ const config: Config = {
|
|
|
9
9
|
title: "My Vike App",
|
|
10
10
|
description: "Demo showcasing Vike",
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// $$.BATI.has("auth0") || $$.BATI.has("authjs") || $$.BATI.has("better-auth")
|
|
13
13
|
passToClient: ["user"],
|
|
14
14
|
extends: [vikeSolid],
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
// $$.BATI.has("vercel")
|
|
17
17
|
prerender: true,
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
// $$.BATI.hasUD && !$$.BATI.hasServer
|
|
20
20
|
// https://vike.dev/server
|
|
21
21
|
server: true,
|
|
22
22
|
};
|
|
@@ -8,9 +8,9 @@ function Counter() {
|
|
|
8
8
|
return (
|
|
9
9
|
<button
|
|
10
10
|
type="button"
|
|
11
|
-
|
|
11
|
+
// $$.BATI.has("tailwindcss")
|
|
12
12
|
class={
|
|
13
|
-
BATI.has("daisyui")
|
|
13
|
+
$$.BATI.has("daisyui")
|
|
14
14
|
? "btn"
|
|
15
15
|
: "inline-block border border-black rounded bg-gray-200 px-2 py-1 text-xs font-medium uppercase leading-normal"
|
|
16
16
|
}
|
|
@@ -22,12 +22,12 @@ export function TodoList() {
|
|
|
22
22
|
const text = untrack(newTodo);
|
|
23
23
|
setTodoItems((prev) => [...prev, { text }]);
|
|
24
24
|
setNewTodo("");
|
|
25
|
-
if (BATI.hasServer) {
|
|
26
|
-
if (BATI.has("telefunc")) {
|
|
25
|
+
if ($$.BATI.hasServer) {
|
|
26
|
+
if ($$.BATI.has("telefunc")) {
|
|
27
27
|
await onNewTodo({ text });
|
|
28
|
-
} else if (BATI.has("trpc")) {
|
|
28
|
+
} else if ($$.BATI.has("trpc")) {
|
|
29
29
|
await trpc.onNewTodo.mutate(text);
|
|
30
|
-
} else if (BATI.has("ts-rest")) {
|
|
30
|
+
} else if ($$.BATI.has("ts-rest")) {
|
|
31
31
|
await client.createTodo({ body: { text } });
|
|
32
32
|
} else {
|
|
33
33
|
const response = await fetch("/api/todo/create", {
|
|
@@ -46,14 +46,14 @@ export function TodoList() {
|
|
|
46
46
|
type="text"
|
|
47
47
|
onChange={(ev) => setNewTodo(ev.target.value)}
|
|
48
48
|
value={newTodo()}
|
|
49
|
-
|
|
49
|
+
// $$.BATI.has("tailwindcss")
|
|
50
50
|
class={
|
|
51
51
|
"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 w-full sm:w-auto p-2 mr-1 mb-1"
|
|
52
52
|
}
|
|
53
53
|
/>
|
|
54
54
|
<button
|
|
55
55
|
type="submit"
|
|
56
|
-
|
|
56
|
+
// $$.BATI.has("tailwindcss")
|
|
57
57
|
class={
|
|
58
58
|
"text-white bg-blue-700 hover:bg-blue-800 focus:ring-2 focus:outline-hidden focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto p-2"
|
|
59
59
|
}
|
|
@@ -19,7 +19,7 @@ export default function Page() {
|
|
|
19
19
|
await authClient.signOut();
|
|
20
20
|
await navigate("/");
|
|
21
21
|
}}
|
|
22
|
-
|
|
22
|
+
// $$.BATI.has("tailwindcss")
|
|
23
23
|
class={
|
|
24
24
|
"text-white bg-blue-700 hover:bg-blue-800 focus:ring-2 focus:outline-hidden focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto p-2"
|
|
25
25
|
}
|
|
@@ -32,7 +32,7 @@ export default function Page() {
|
|
|
32
32
|
required
|
|
33
33
|
value={email()}
|
|
34
34
|
onInput={(ev) => setEmail(ev.currentTarget.value)}
|
|
35
|
-
|
|
35
|
+
// $$.BATI.has("tailwindcss")
|
|
36
36
|
class={
|
|
37
37
|
"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 w-full sm:w-auto p-2 mr-1 mb-1"
|
|
38
38
|
}
|
|
@@ -46,7 +46,7 @@ export default function Page() {
|
|
|
46
46
|
required
|
|
47
47
|
value={password()}
|
|
48
48
|
onInput={(ev) => setPassword(ev.currentTarget.value)}
|
|
49
|
-
|
|
49
|
+
// $$.BATI.has("tailwindcss")
|
|
50
50
|
class={
|
|
51
51
|
"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 w-full sm:w-auto p-2 mr-1 mb-1"
|
|
52
52
|
}
|
|
@@ -54,7 +54,7 @@ export default function Page() {
|
|
|
54
54
|
</p>
|
|
55
55
|
<button
|
|
56
56
|
type="submit"
|
|
57
|
-
|
|
57
|
+
// $$.BATI.has("tailwindcss")
|
|
58
58
|
class={
|
|
59
59
|
"text-white bg-blue-700 hover:bg-blue-800 focus:ring-2 focus:outline-hidden focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto p-2"
|
|
60
60
|
}
|
|
@@ -68,7 +68,7 @@ export default function Page() {
|
|
|
68
68
|
onClick={async () => {
|
|
69
69
|
await authClient.signIn.social({ provider: "github" });
|
|
70
70
|
}}
|
|
71
|
-
|
|
71
|
+
// $$.BATI.has("tailwindcss")
|
|
72
72
|
class={
|
|
73
73
|
"text-white bg-gray-800 hover:bg-gray-900 focus:ring-2 focus:outline-hidden focus:ring-gray-300 font-medium rounded-lg text-sm w-full sm:w-auto p-2"
|
|
74
74
|
}
|
|
@@ -33,7 +33,7 @@ export default function Page() {
|
|
|
33
33
|
required
|
|
34
34
|
value={name()}
|
|
35
35
|
onInput={(ev) => setName(ev.currentTarget.value)}
|
|
36
|
-
|
|
36
|
+
// $$.BATI.has("tailwindcss")
|
|
37
37
|
class={
|
|
38
38
|
"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 w-full sm:w-auto p-2 mr-1 mb-1"
|
|
39
39
|
}
|
|
@@ -47,7 +47,7 @@ export default function Page() {
|
|
|
47
47
|
required
|
|
48
48
|
value={email()}
|
|
49
49
|
onInput={(ev) => setEmail(ev.currentTarget.value)}
|
|
50
|
-
|
|
50
|
+
// $$.BATI.has("tailwindcss")
|
|
51
51
|
class={
|
|
52
52
|
"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 w-full sm:w-auto p-2 mr-1 mb-1"
|
|
53
53
|
}
|
|
@@ -62,7 +62,7 @@ export default function Page() {
|
|
|
62
62
|
minLength={8}
|
|
63
63
|
value={password()}
|
|
64
64
|
onInput={(ev) => setPassword(ev.currentTarget.value)}
|
|
65
|
-
|
|
65
|
+
// $$.BATI.has("tailwindcss")
|
|
66
66
|
class={
|
|
67
67
|
"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 w-full sm:w-auto p-2 mr-1 mb-1"
|
|
68
68
|
}
|
|
@@ -70,7 +70,7 @@ export default function Page() {
|
|
|
70
70
|
</p>
|
|
71
71
|
<button
|
|
72
72
|
type="submit"
|
|
73
|
-
|
|
73
|
+
// $$.BATI.has("tailwindcss")
|
|
74
74
|
class={
|
|
75
75
|
"text-white bg-blue-700 hover:bg-blue-800 focus:ring-2 focus:outline-hidden focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto p-2"
|
|
76
76
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { loadPackageJson } from "@batijs/core";
|
|
4
4
|
//#region ../../boilerplates/solid-sentry/dist/files/$package.json.mjs
|
|
5
5
|
async function getPackageJson(props) {
|
|
6
|
-
return (await loadPackageJson(props, await import("../../../../asset-package.json-
|
|
6
|
+
return (await loadPackageJson(props, await import("../../../../asset-package.json-BmtFF7PF.js").then((x) => x.default))).addDependencies(["@sentry/solid"]);
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
export { getPackageJson as default };
|
|
@@ -15,7 +15,7 @@ var package_default = {
|
|
|
15
15
|
devDependencies: {
|
|
16
16
|
"@batijs/compile": "workspace:*",
|
|
17
17
|
"@batijs/core": "workspace:*",
|
|
18
|
-
"@sentry/solid": "^10.
|
|
18
|
+
"@sentry/solid": "^10.57.0",
|
|
19
19
|
"@types/node": "^20.19.37",
|
|
20
20
|
"solid-js": "^1.9.13",
|
|
21
21
|
"vike-solid": "^0.8.2",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { loadPackageJson } from "@batijs/core";
|
|
4
4
|
//#region ../../boilerplates/sqlite/dist/files/$package.json.mjs
|
|
5
5
|
async function getPackageJson(props) {
|
|
6
|
-
return (await loadPackageJson(props, await import("../../../../asset-package.json-
|
|
6
|
+
return (await loadPackageJson(props, await import("../../../../asset-package.json-0oMdGF0g.js").then((x) => x.default))).setScript("sqlite:migrate", {
|
|
7
7
|
value: `tsx ./database/sqlite/schema/all.ts`,
|
|
8
8
|
precedence: 1
|
|
9
9
|
}).addDevDependencies(["@types/better-sqlite3"]).addDependencies(["better-sqlite3"]).addDevDependencies(["tsx"], ["sqlite:migrate"]);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { loadPackageJson } from "@batijs/core";
|
|
4
4
|
//#region ../../boilerplates/tailwindcss/dist/files/$package.json.mjs
|
|
5
5
|
async function getPackageJson(props) {
|
|
6
|
-
return (await loadPackageJson(props, await import("../../../../asset-package.json-
|
|
6
|
+
return (await loadPackageJson(props, await import("../../../../asset-package.json-BklLTc-3.js").then((x) => x.default))).addDevDependencies(["tailwindcss", "@tailwindcss/vite"]).addDevDependencies(["daisyui"], props.meta.BATI.has("daisyui"));
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
export { getPackageJson as default };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { addVitePlugin,
|
|
3
|
+
import { addVitePlugin, transformConfig } from "@batijs/core";
|
|
4
4
|
//#region ../../boilerplates/tailwindcss/dist/files/$vite.config.ts.mjs
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
function getViteConfig(props) {
|
|
6
|
+
return transformConfig(props, (root) => {
|
|
7
|
+
addVitePlugin(root, {
|
|
8
|
+
from: "@tailwindcss/vite",
|
|
9
|
+
constructor: "tailwindcss"
|
|
10
|
+
});
|
|
10
11
|
});
|
|
11
|
-
return mod.generate().code;
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|
|
14
14
|
export { getViteConfig as default };
|
|
@@ -15,11 +15,11 @@ var package_default = {
|
|
|
15
15
|
devDependencies: {
|
|
16
16
|
"@batijs/compile": "workspace:*",
|
|
17
17
|
"@batijs/core": "workspace:*",
|
|
18
|
-
"@tailwindcss/vite": "^4.3.
|
|
18
|
+
"@tailwindcss/vite": "^4.3.1",
|
|
19
19
|
"@types/node": "^20.19.37",
|
|
20
20
|
"autoprefixer": "^10.5.0",
|
|
21
21
|
"daisyui": "^5.5.23",
|
|
22
|
-
"tailwindcss": "^4.3.
|
|
22
|
+
"tailwindcss": "^4.3.1",
|
|
23
23
|
"vike": "0.4.259",
|
|
24
24
|
"vite": "^8.0.16"
|
|
25
25
|
},
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { loadPackageJson } from "@batijs/core";
|
|
4
4
|
//#region ../../boilerplates/telefunc/dist/files/$package.json.mjs
|
|
5
5
|
async function getPackageJson(props) {
|
|
6
|
-
return (await loadPackageJson(props, await import("../../../../asset-package.json-
|
|
6
|
+
return (await loadPackageJson(props, await import("../../../../asset-package.json-DldqNQpY.js").then((x) => x.default))).addDependencies(["telefunc", "@universal-middleware/core"]);
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
export { getPackageJson as default };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { addVitePlugin,
|
|
3
|
+
import { addVitePlugin, transformConfig } from "@batijs/core";
|
|
4
4
|
//#region ../../boilerplates/telefunc/dist/files/$vite.config.ts.mjs
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
function getViteConfig(props) {
|
|
6
|
+
return transformConfig(props, (root) => {
|
|
7
|
+
addVitePlugin(root, {
|
|
8
|
+
from: "telefunc/vite",
|
|
9
|
+
constructor: "telefunc",
|
|
10
|
+
named: true
|
|
11
|
+
});
|
|
11
12
|
});
|
|
12
|
-
return mod.generate().code;
|
|
13
13
|
}
|
|
14
14
|
//#endregion
|
|
15
15
|
export { getViteConfig as default };
|
|
@@ -21,7 +21,7 @@ var package_default = {
|
|
|
21
21
|
"@batijs/postgres": "workspace:*",
|
|
22
22
|
"@batijs/sqlite": "workspace:*",
|
|
23
23
|
"@types/node": "^20.19.37",
|
|
24
|
-
"@universal-middleware/core": "^0.4.
|
|
24
|
+
"@universal-middleware/core": "^0.4.18",
|
|
25
25
|
"telefunc": "^0.2.20",
|
|
26
26
|
"vike": "0.4.259",
|
|
27
27
|
"vite": "^8.0.16"
|
|
@@ -3,25 +3,25 @@ import type { dbKysely, dbKyselyD1, dbKyselyPostgres } from "@batijs/kysely/data
|
|
|
3
3
|
import type { db as pgDb } from "@batijs/postgres/database/postgres/db";
|
|
4
4
|
import type { db as sqliteDb } from "@batijs/sqlite/database/sqlite/db";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// $$.BATI.hasDbDemo
|
|
7
7
|
declare module "telefunc" {
|
|
8
8
|
namespace Telefunc {
|
|
9
9
|
interface Context {
|
|
10
|
-
db:
|
|
11
|
-
'BATI.has("drizzle") && BATI.has("postgres")': ReturnType<typeof dbPostgres>;
|
|
12
|
-
'BATI.has("kysely") && BATI.has("postgres")': ReturnType<typeof dbKyselyPostgres>;
|
|
13
|
-
'BATI.has("postgres") &&
|
|
14
|
-
'BATI.has("sqlite") &&
|
|
15
|
-
'BATI.has("drizzle") &&
|
|
16
|
-
'BATI.has("drizzle")': ReturnType<typeof dbD1>;
|
|
17
|
-
'BATI.has("kysely") &&
|
|
18
|
-
'BATI.has("kysely")': ReturnType<typeof dbKyselyD1>;
|
|
19
|
-
"BATI.hasD1 &&
|
|
10
|
+
db: $$.If<{
|
|
11
|
+
'$$.BATI.has("drizzle") && $$.BATI.has("postgres")': ReturnType<typeof dbPostgres>;
|
|
12
|
+
'$$.BATI.has("kysely") && $$.BATI.has("postgres")': ReturnType<typeof dbKyselyPostgres>;
|
|
13
|
+
'$$.BATI.has("postgres") && !$$.BATI.hasOrm': ReturnType<typeof pgDb>;
|
|
14
|
+
'$$.BATI.has("sqlite") && !$$.BATI.hasD1 && !$$.BATI.hasOrm': ReturnType<typeof sqliteDb>;
|
|
15
|
+
'$$.BATI.has("drizzle") && !$$.BATI.hasD1': ReturnType<typeof dbSqlite>;
|
|
16
|
+
'$$.BATI.has("drizzle")': ReturnType<typeof dbD1>;
|
|
17
|
+
'$$.BATI.has("kysely") && !$$.BATI.hasD1': ReturnType<typeof dbKysely>;
|
|
18
|
+
'$$.BATI.has("kysely")': ReturnType<typeof dbKyselyD1>;
|
|
19
|
+
"$$.BATI.hasD1 && !$$.BATI.hasOrm": D1Database;
|
|
20
20
|
}>;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
// $$.keepCommentsIf(false)
|
|
26
26
|
// biome-ignore lint/complexity/noUselessEmptyExport: ensure that the file is considered as a module
|
|
27
27
|
export {};
|
|
@@ -8,19 +8,19 @@ import * as sqliteQueries from "@batijs/sqlite/database/sqlite/queries/todos";
|
|
|
8
8
|
import { getContext } from "telefunc";
|
|
9
9
|
|
|
10
10
|
export async function onNewTodo({ text }: { text: string }) {
|
|
11
|
-
if (BATI.has("drizzle")) {
|
|
11
|
+
if ($$.BATI.has("drizzle")) {
|
|
12
12
|
const context = getContext();
|
|
13
13
|
await drizzleQueries.insertTodo(context.db, text);
|
|
14
|
-
} else if (BATI.has("sqlite") &&
|
|
14
|
+
} else if ($$.BATI.has("sqlite") && !$$.BATI.hasD1 && !$$.BATI.hasOrm) {
|
|
15
15
|
const context = getContext();
|
|
16
16
|
sqliteQueries.insertTodo(context.db, text);
|
|
17
|
-
} else if (BATI.has("kysely")) {
|
|
17
|
+
} else if ($$.BATI.has("kysely")) {
|
|
18
18
|
const context = getContext();
|
|
19
19
|
await kyselyQueries.insertTodo(context.db, text);
|
|
20
|
-
} else if (BATI.hasD1 &&
|
|
20
|
+
} else if ($$.BATI.hasD1 && !$$.BATI.hasOrm) {
|
|
21
21
|
const context = getContext();
|
|
22
22
|
await d1Queries.insertTodo(context.db, text);
|
|
23
|
-
} else if (BATI.has("postgres") &&
|
|
23
|
+
} else if ($$.BATI.has("postgres") && !$$.BATI.hasOrm) {
|
|
24
24
|
const context = getContext();
|
|
25
25
|
await pgQueries.insertTodo(context.db, text);
|
|
26
26
|
} else {
|
|
@@ -11,20 +11,20 @@ export const telefuncHandler: UniversalHandler = enhance(
|
|
|
11
11
|
const httpResponse = await telefunc({
|
|
12
12
|
request,
|
|
13
13
|
context: {
|
|
14
|
-
...(context as
|
|
15
|
-
'BATI.has("drizzle") && BATI.has("postgres")': { db: ReturnType<typeof dbPostgres> };
|
|
16
|
-
'BATI.has("kysely") && BATI.has("postgres")': { db: ReturnType<typeof dbKyselyPostgres> };
|
|
17
|
-
'BATI.has("postgres") &&
|
|
18
|
-
'BATI.has("sqlite") &&
|
|
19
|
-
'BATI.has("drizzle") &&
|
|
20
|
-
'BATI.has("drizzle")': { db: ReturnType<typeof dbD1> };
|
|
21
|
-
'BATI.has("kysely") &&
|
|
22
|
-
'BATI.has("kysely")': { db: ReturnType<typeof dbKyselyD1> };
|
|
23
|
-
"BATI.hasD1 &&
|
|
14
|
+
...(context as $$.If<{
|
|
15
|
+
'$$.BATI.has("drizzle") && $$.BATI.has("postgres")': { db: ReturnType<typeof dbPostgres> };
|
|
16
|
+
'$$.BATI.has("kysely") && $$.BATI.has("postgres")': { db: ReturnType<typeof dbKyselyPostgres> };
|
|
17
|
+
'$$.BATI.has("postgres") && !$$.BATI.hasOrm': { db: ReturnType<typeof pgDb> };
|
|
18
|
+
'$$.BATI.has("sqlite") && !$$.BATI.hasD1 && !$$.BATI.hasOrm': { db: ReturnType<typeof sqliteDb> };
|
|
19
|
+
'$$.BATI.has("drizzle") && !$$.BATI.hasD1': { db: ReturnType<typeof dbSqlite> };
|
|
20
|
+
'$$.BATI.has("drizzle")': { db: ReturnType<typeof dbD1> };
|
|
21
|
+
'$$.BATI.has("kysely") && !$$.BATI.hasD1': { db: ReturnType<typeof dbKysely> };
|
|
22
|
+
'$$.BATI.has("kysely")': { db: ReturnType<typeof dbKyselyD1> };
|
|
23
|
+
"$$.BATI.hasD1 && !$$.BATI.hasOrm": { db: D1Database };
|
|
24
24
|
_: object;
|
|
25
25
|
}>),
|
|
26
|
-
...(runtime as
|
|
27
|
-
"BATI.hasD1": { runtime: "workerd"; env?: { DB: D1Database } };
|
|
26
|
+
...(runtime as $$.If<{
|
|
27
|
+
"$$.BATI.hasD1": { runtime: "workerd"; env?: { DB: D1Database } };
|
|
28
28
|
}>),
|
|
29
29
|
},
|
|
30
30
|
});
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { loadPackageJson } from "@batijs/core";
|
|
4
4
|
//#region ../../boilerplates/trpc/dist/files/$package.json.mjs
|
|
5
5
|
async function getPackageJson(props) {
|
|
6
|
-
return (await loadPackageJson(props, await import("../../../../asset-package2.json-
|
|
6
|
+
return (await loadPackageJson(props, await import("../../../../asset-package2.json-BcQxgRCo.js").then((x) => x.default))).addDependencies(["@trpc/server", "@trpc/client"]);
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
export { getPackageJson as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/* $$.keepFileIfImported */
|
|
2
2
|
|
|
3
3
|
import { fetchRequestHandler } from "@trpc/server/adapters/fetch";
|
|
4
4
|
import { enhance, type Get, type UniversalHandler } from "@universal-middleware/core";
|
|
@@ -14,9 +14,9 @@ export const trpcHandler = ((endpoint) =>
|
|
|
14
14
|
router: appRouter,
|
|
15
15
|
createContext({ req, resHeaders }) {
|
|
16
16
|
return {
|
|
17
|
-
...(context as
|
|
18
|
-
...(runtime as
|
|
19
|
-
"BATI.hasD1": { runtime: "workerd"; env?: { DB: D1Database } };
|
|
17
|
+
...(context as $$.Any),
|
|
18
|
+
...(runtime as $$.If<{
|
|
19
|
+
"$$.BATI.hasD1": { runtime: "workerd"; env?: { DB: D1Database } };
|
|
20
20
|
}>),
|
|
21
21
|
req,
|
|
22
22
|
resHeaders,
|