@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
|
@@ -15,16 +15,16 @@ import { initTRPC } from "@trpc/server";
|
|
|
15
15
|
*/
|
|
16
16
|
const t = initTRPC
|
|
17
17
|
.context<
|
|
18
|
-
|
|
19
|
-
'BATI.has("drizzle") && BATI.has("postgres")': { db: ReturnType<typeof dbPostgres> };
|
|
20
|
-
'BATI.has("kysely") && BATI.has("postgres")': { db: ReturnType<typeof dbKyselyPostgres> };
|
|
21
|
-
'BATI.has("postgres") &&
|
|
22
|
-
'BATI.has("sqlite") &&
|
|
23
|
-
'BATI.has("drizzle") &&
|
|
24
|
-
'BATI.has("drizzle")': { db: ReturnType<typeof dbD1> };
|
|
25
|
-
'BATI.has("kysely") &&
|
|
26
|
-
'BATI.has("kysely")': { db: ReturnType<typeof dbKyselyD1> };
|
|
27
|
-
"BATI.hasD1 &&
|
|
18
|
+
$$.If<{
|
|
19
|
+
'$$.BATI.has("drizzle") && $$.BATI.has("postgres")': { db: ReturnType<typeof dbPostgres> };
|
|
20
|
+
'$$.BATI.has("kysely") && $$.BATI.has("postgres")': { db: ReturnType<typeof dbKyselyPostgres> };
|
|
21
|
+
'$$.BATI.has("postgres") && !$$.BATI.hasOrm': { db: ReturnType<typeof pgDb> };
|
|
22
|
+
'$$.BATI.has("sqlite") && !$$.BATI.hasD1 && !$$.BATI.hasOrm': { db: ReturnType<typeof sqliteDb> };
|
|
23
|
+
'$$.BATI.has("drizzle") && !$$.BATI.hasD1': { db: ReturnType<typeof dbSqlite> };
|
|
24
|
+
'$$.BATI.has("drizzle")': { db: ReturnType<typeof dbD1> };
|
|
25
|
+
'$$.BATI.has("kysely") && !$$.BATI.hasD1': { db: ReturnType<typeof dbKysely> };
|
|
26
|
+
'$$.BATI.has("kysely")': { db: ReturnType<typeof dbKyselyD1> };
|
|
27
|
+
"$$.BATI.hasD1 && !$$.BATI.hasOrm": { db: D1Database };
|
|
28
28
|
_: object;
|
|
29
29
|
}>
|
|
30
30
|
>()
|
|
@@ -49,15 +49,15 @@ export const appRouter = router({
|
|
|
49
49
|
throw new Error("Input is not a string");
|
|
50
50
|
})
|
|
51
51
|
.mutation(async (opts) => {
|
|
52
|
-
if (BATI.has("drizzle")) {
|
|
52
|
+
if ($$.BATI.has("drizzle")) {
|
|
53
53
|
await drizzleQueries.insertTodo(opts.ctx.db, opts.input);
|
|
54
|
-
} else if (BATI.has("sqlite") &&
|
|
54
|
+
} else if ($$.BATI.has("sqlite") && !$$.BATI.hasD1 && !$$.BATI.hasOrm) {
|
|
55
55
|
sqliteQueries.insertTodo(opts.ctx.db, opts.input);
|
|
56
|
-
} else if (BATI.has("kysely")) {
|
|
56
|
+
} else if ($$.BATI.has("kysely")) {
|
|
57
57
|
await kyselyQueries.insertTodo(opts.ctx.db, opts.input);
|
|
58
|
-
} else if (BATI.hasD1 &&
|
|
58
|
+
} else if ($$.BATI.hasD1 && !$$.BATI.hasOrm) {
|
|
59
59
|
await d1Queries.insertTodo(opts.ctx.db, opts.input);
|
|
60
|
-
} else if (BATI.has("postgres") &&
|
|
60
|
+
} else if ($$.BATI.has("postgres") && !$$.BATI.hasOrm) {
|
|
61
61
|
await pgQueries.insertTodo(opts.ctx.db, opts.input);
|
|
62
62
|
} else {
|
|
63
63
|
// This is where you'd persist the data
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { loadPackageJson } from "@batijs/core";
|
|
4
4
|
//#region ../../boilerplates/ts-rest/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-KyL19vnl.js").then((x) => x.default))).addDevDependencies(["zod"]).addDependencies([
|
|
7
7
|
"@ts-rest/core",
|
|
8
8
|
"@ts-rest/serverless",
|
|
9
9
|
"@universal-middleware/core"
|
|
@@ -19,16 +19,16 @@ import { contract } from "../ts-rest/contract";
|
|
|
19
19
|
**/
|
|
20
20
|
const router = tsr
|
|
21
21
|
.platformContext<
|
|
22
|
-
|
|
23
|
-
'BATI.has("drizzle") && BATI.has("postgres")': { db: ReturnType<typeof dbPostgres> };
|
|
24
|
-
'BATI.has("kysely") && BATI.has("postgres")': { db: ReturnType<typeof dbKyselyPostgres> };
|
|
25
|
-
'BATI.has("postgres") &&
|
|
26
|
-
'BATI.has("sqlite") &&
|
|
27
|
-
'BATI.has("drizzle") &&
|
|
28
|
-
'BATI.has("drizzle")': { db: ReturnType<typeof dbD1> };
|
|
29
|
-
'BATI.has("kysely") &&
|
|
30
|
-
'BATI.has("kysely")': { db: ReturnType<typeof dbKyselyD1> };
|
|
31
|
-
"BATI.hasD1 &&
|
|
22
|
+
$$.If<{
|
|
23
|
+
'$$.BATI.has("drizzle") && $$.BATI.has("postgres")': { db: ReturnType<typeof dbPostgres> };
|
|
24
|
+
'$$.BATI.has("kysely") && $$.BATI.has("postgres")': { db: ReturnType<typeof dbKyselyPostgres> };
|
|
25
|
+
'$$.BATI.has("postgres") && !$$.BATI.hasOrm': { db: ReturnType<typeof pgDb> };
|
|
26
|
+
'$$.BATI.has("sqlite") && !$$.BATI.hasD1 && !$$.BATI.hasOrm': { db: ReturnType<typeof sqliteDb> };
|
|
27
|
+
'$$.BATI.has("drizzle") && !$$.BATI.hasD1': { db: ReturnType<typeof dbSqlite> };
|
|
28
|
+
'$$.BATI.has("drizzle")': { db: ReturnType<typeof dbD1> };
|
|
29
|
+
'$$.BATI.has("kysely") && !$$.BATI.hasD1': { db: ReturnType<typeof dbKysely> };
|
|
30
|
+
'$$.BATI.has("kysely")': { db: ReturnType<typeof dbKyselyD1> };
|
|
31
|
+
"$$.BATI.hasD1 && !$$.BATI.hasOrm": { db: D1Database };
|
|
32
32
|
_: object;
|
|
33
33
|
}>
|
|
34
34
|
>()
|
|
@@ -42,15 +42,15 @@ const router = tsr
|
|
|
42
42
|
};
|
|
43
43
|
},
|
|
44
44
|
createTodo: async ({ body }, _ctx) => {
|
|
45
|
-
if (BATI.has("drizzle")) {
|
|
45
|
+
if ($$.BATI.has("drizzle")) {
|
|
46
46
|
await drizzleQueries.insertTodo(_ctx.db, body.text);
|
|
47
|
-
} else if (BATI.has("sqlite") &&
|
|
47
|
+
} else if ($$.BATI.has("sqlite") && !$$.BATI.hasD1 && !$$.BATI.hasOrm) {
|
|
48
48
|
sqliteQueries.insertTodo(_ctx.db, body.text);
|
|
49
|
-
} else if (BATI.has("kysely")) {
|
|
49
|
+
} else if ($$.BATI.has("kysely")) {
|
|
50
50
|
await kyselyQueries.insertTodo(_ctx.db, body.text);
|
|
51
|
-
} else if (BATI.hasD1 &&
|
|
51
|
+
} else if ($$.BATI.hasD1 && !$$.BATI.hasOrm) {
|
|
52
52
|
await d1Queries.insertTodo(_ctx.db, body.text);
|
|
53
|
-
} else if (BATI.has("postgres") &&
|
|
53
|
+
} else if ($$.BATI.has("postgres") && !$$.BATI.hasOrm) {
|
|
54
54
|
await pgQueries.insertTodo(_ctx.db, body.text);
|
|
55
55
|
} else {
|
|
56
56
|
// This is where you'd persist the data
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { loadPackageJson } from "@batijs/core";
|
|
4
4
|
//#region ../../boilerplates/vercel/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-Bn9yI1Th.js").then((x) => x.default))).removeScript("prod").addDevDependencies(["vite-plugin-vercel"]);
|
|
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/vercel/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: "vite-plugin-vercel/vite",
|
|
9
|
+
constructor: "vercel",
|
|
10
|
+
named: true
|
|
11
|
+
});
|
|
11
12
|
});
|
|
12
|
-
return mod.generate().code;
|
|
13
13
|
}
|
|
14
14
|
//#endregion
|
|
15
15
|
export { getViteConfig as default };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { loadPackageJson } from "@batijs/core";
|
|
4
4
|
//#region ../../boilerplates/vue/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-BTOfT2Qt.js").then((x) => x.default))).addDevDependencies(["vite", "@vitejs/plugin-vue"]).addDependencies([
|
|
7
7
|
"vike-vue",
|
|
8
8
|
"vike",
|
|
9
9
|
"vue"
|
|
@@ -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/vue/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: "@vitejs/plugin-vue",
|
|
9
|
+
constructor: "vue"
|
|
10
|
+
});
|
|
10
11
|
});
|
|
11
|
-
return mod.generate().code;
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|
|
14
14
|
export { getViteConfig as default };
|
|
@@ -22,12 +22,12 @@ var package_default = {
|
|
|
22
22
|
"@batijs/ts-rest": "workspace:*",
|
|
23
23
|
"@types/node": "^20.19.37",
|
|
24
24
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
25
|
-
"tailwindcss": "^4.3.
|
|
25
|
+
"tailwindcss": "^4.3.1",
|
|
26
26
|
"typescript": "^6.0.3",
|
|
27
27
|
"vike": "0.4.259",
|
|
28
28
|
"vike-vue": "^0.9.11",
|
|
29
29
|
"vite": "^8.0.16",
|
|
30
|
-
"vue": "^3.5.
|
|
30
|
+
"vue": "^3.5.38",
|
|
31
31
|
"vue-gtag": "^3.7.1"
|
|
32
32
|
},
|
|
33
33
|
files: ["dist/"],
|
|
@@ -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,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="page-container">
|
|
3
|
-
<!-- BATI.has("tailwindcss") -->
|
|
3
|
+
<!-- $$.BATI.has("tailwindcss") -->
|
|
4
4
|
<div id="page-content" class="p-5 pb-12 min-h-screen">
|
|
5
5
|
<slot />
|
|
6
6
|
</div>
|
|
7
|
-
<!--
|
|
7
|
+
<!-- !$$.BATI.has("tailwindcss") -->
|
|
8
8
|
<div id="page-content" style="padding: 20px; padding-bottom: 50px; min-height: 100vh">
|
|
9
9
|
<slot />
|
|
10
10
|
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<!-- BATI.has("daisyui") -->
|
|
2
|
+
<!-- $$.BATI.has("daisyui") -->
|
|
3
3
|
<button type="button" class="btn" @click="state.count++">Counter {{ state.count }}</button>
|
|
4
|
-
<!-- BATI.has("tailwindcss") &&
|
|
4
|
+
<!-- $$.BATI.has("tailwindcss") && !$$.BATI.has("daisyui") -->
|
|
5
5
|
<button
|
|
6
6
|
type="button"
|
|
7
7
|
class="inline-block border border-black rounded bg-gray-200 px-2 py-1 text-xs font-medium uppercase leading-normal"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
>
|
|
10
10
|
Counter {{ state.count }}
|
|
11
11
|
</button>
|
|
12
|
-
<!--
|
|
12
|
+
<!-- !$$.BATI.has("tailwindcss") -->
|
|
13
13
|
<button type="button" @click="state.count++">Counter {{ state.count }}</button>
|
|
14
14
|
</template>
|
|
15
15
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<!-- BATI.has("tailwindcss") -->
|
|
2
|
+
<!-- $$.BATI.has("tailwindcss") -->
|
|
3
3
|
<div class="p-5 mb-2">
|
|
4
4
|
<a href="/">
|
|
5
5
|
<img src="../assets/logo.svg" height="64" width="64" />
|
|
6
6
|
</a>
|
|
7
7
|
</div>
|
|
8
|
-
<!--
|
|
8
|
+
<!-- !$$.BATI.has("tailwindcss") -->
|
|
9
9
|
<div style="margin-top: 20px; margin-bottom: 10px">
|
|
10
10
|
<a href="/">
|
|
11
11
|
<img src="../assets/logo.svg" height="64" width="64" />
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<!-- BATI.has("tailwindcss") -->
|
|
2
|
+
<!-- $$.BATI.has("tailwindcss") -->
|
|
3
3
|
<div id="sidebar" class="p-5 flex flex-col shrink-0 border-r-2 border-r-gray-200">
|
|
4
4
|
<slot />
|
|
5
5
|
</div>
|
|
6
|
-
<!--
|
|
6
|
+
<!-- !$$.BATI.has("tailwindcss") -->
|
|
7
7
|
<div
|
|
8
8
|
id="sidebar"
|
|
9
9
|
style="
|
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
<template>
|
|
4
4
|
<link rel="icon" :href="logoUrl" />
|
|
5
|
-
|
|
6
|
-
<!-- BATI.has("plausible.io") -->
|
|
5
|
+
<!-- $$.BATI.has("plausible.io") -->
|
|
7
6
|
<!-- See https://plausible.io/docs/plausible-script -->
|
|
8
7
|
<!-- TODO: update data-domain -->
|
|
9
8
|
<component :is="'script'" defer data-domain="yourdomain.com" src="https://plausible.io/js/script.js" />
|
|
10
9
|
</template>
|
|
11
10
|
|
|
12
11
|
<script setup lang="ts">
|
|
13
|
-
|
|
12
|
+
// $$.BATI.has("tailwindcss")
|
|
14
13
|
import "@batijs/tailwindcss/pages/tailwind.css";
|
|
15
14
|
import logoUrl from "../assets/logo.svg";
|
|
16
15
|
</script>
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
<div class="layout">
|
|
5
5
|
<Sidebar>
|
|
6
6
|
<Logo />
|
|
7
|
-
<
|
|
8
|
-
<
|
|
9
|
-
<
|
|
10
|
-
<!-- BATI.has("better-auth") -->
|
|
7
|
+
<NavLink href="/"> Welcome </NavLink>
|
|
8
|
+
<NavLink href="/todo"> Todo </NavLink>
|
|
9
|
+
<NavLink href="/star-wars"> Data Fetching </NavLink>
|
|
10
|
+
<!-- $$.BATI.has("better-auth") -->
|
|
11
11
|
<AuthNav />
|
|
12
12
|
</Sidebar>
|
|
13
13
|
<Content><slot /></Content>
|
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
</template>
|
|
16
16
|
|
|
17
17
|
<script lang="ts" setup>
|
|
18
|
-
|
|
18
|
+
// $$.BATI.has("better-auth")
|
|
19
19
|
import AuthNav from "../components/AuthNav.vue";
|
|
20
20
|
import Content from "../components/Content.vue";
|
|
21
|
-
import Link from "../components/Link.vue";
|
|
22
21
|
import Logo from "../components/Logo.vue";
|
|
22
|
+
import NavLink from "../components/NavLink.vue";
|
|
23
23
|
import Sidebar from "../components/Sidebar.vue";
|
|
24
24
|
import { sentryBrowserConfig } from "../sentry.browser.config";
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
// $$.BATI.has("sentry")
|
|
27
27
|
sentryBrowserConfig();
|
|
28
28
|
</script>
|
|
29
29
|
|
|
@@ -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: [vikeVue],
|
|
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
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { OnCreateAppSync } from "vike-vue/types";
|
|
2
2
|
import { createGtag } from "vue-gtag";
|
|
3
3
|
|
|
4
|
-
// BATI.has("google-analytics")
|
|
4
|
+
// $$.BATI.has("google-analytics")
|
|
5
5
|
export const onCreateApp: OnCreateAppSync = (pageContext): ReturnType<OnCreateAppSync> => {
|
|
6
6
|
const { app } = pageContext;
|
|
7
7
|
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
<p>This page is:</p>
|
|
4
4
|
<ul>
|
|
5
5
|
<li>Rendered to HTML.</li>
|
|
6
|
-
<li>Interactive. <
|
|
6
|
+
<li>Interactive. <CounterButton /></li>
|
|
7
7
|
</ul>
|
|
8
8
|
</template>
|
|
9
9
|
|
|
10
10
|
<script setup lang="ts">
|
|
11
|
-
import
|
|
11
|
+
import CounterButton from "../../components/CounterButton.vue";
|
|
12
12
|
</script>
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
</li>
|
|
6
6
|
<li>
|
|
7
7
|
<form @submit.prevent="submitNewTodo()">
|
|
8
|
-
<!-- BATI.has("tailwindcss") -->
|
|
8
|
+
<!-- $$.BATI.has("tailwindcss") -->
|
|
9
9
|
<input v-model="newTodo" type="text" class="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" />
|
|
10
|
-
<!--
|
|
10
|
+
<!-- !$$.BATI.has("tailwindcss") -->
|
|
11
11
|
<input v-model="newTodo" type="text" />
|
|
12
|
-
<!-- BATI.has("tailwindcss") -->
|
|
12
|
+
<!-- $$.BATI.has("tailwindcss") -->
|
|
13
13
|
<button type="submit" class="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">Add to-do</button>
|
|
14
|
-
<!--
|
|
14
|
+
<!-- !$$.BATI.has("tailwindcss") -->
|
|
15
15
|
<button type="submit">Add to-do</button>
|
|
16
16
|
</form>
|
|
17
17
|
</li>
|
|
@@ -34,12 +34,12 @@ const submitNewTodo = async () => {
|
|
|
34
34
|
const text = newTodo.value;
|
|
35
35
|
todoItems.value.push({ text });
|
|
36
36
|
newTodo.value = "";
|
|
37
|
-
if (BATI.hasServer) {
|
|
38
|
-
if (BATI.has("telefunc")) {
|
|
37
|
+
if ($$.BATI.hasServer) {
|
|
38
|
+
if ($$.BATI.has("telefunc")) {
|
|
39
39
|
await onNewTodo({ text });
|
|
40
|
-
} else if (BATI.has("trpc")) {
|
|
40
|
+
} else if ($$.BATI.has("trpc")) {
|
|
41
41
|
await trpc.onNewTodo.mutate(text);
|
|
42
|
-
} else if (BATI.has("ts-rest")) {
|
|
42
|
+
} else if ($$.BATI.has("ts-rest")) {
|
|
43
43
|
await client.createTodo({ body: { text } });
|
|
44
44
|
} else {
|
|
45
45
|
const response = await fetch("/api/todo/create", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PageContext, PageContextClient, PageContextServer } from "vike/types";
|
|
2
2
|
|
|
3
|
-
//#region ../../node_modules/.bun/vike-vue@0.9.11+
|
|
3
|
+
//#region ../../node_modules/.bun/vike-vue@0.9.11+b486b24823877407/node_modules/vike-vue/dist/types/VikeHooks.d.ts
|
|
4
4
|
type PageContextWithApp = PageContext & {
|
|
5
5
|
app: NonNullable<PageContext['app']>;
|
|
6
6
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnCreateAppSync } from "../node_modules/.bun/vike-vue@0.9.11+
|
|
1
|
+
import { OnCreateAppSync } from "../node_modules/.bun/vike-vue@0.9.11+b486b24823877407/node_modules/vike-vue/dist/types/VikeHooks.mjs";
|
|
2
2
|
//#region files/pages/+onCreateApp.d.ts
|
|
3
3
|
declare const onCreateApp: OnCreateAppSync;
|
|
4
4
|
//#endregion
|
|
@@ -15,7 +15,7 @@ import { usePageContext } from "vike-vue/usePageContext";
|
|
|
15
15
|
const authClient = createAuthClient();
|
|
16
16
|
const pageContext = usePageContext();
|
|
17
17
|
|
|
18
|
-
const buttonClass = BATI.has("tailwindcss")
|
|
18
|
+
const buttonClass = $$.BATI.has("tailwindcss")
|
|
19
19
|
? "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"
|
|
20
20
|
: "";
|
|
21
21
|
|
|
@@ -39,13 +39,13 @@ const email = ref("");
|
|
|
39
39
|
const password = ref("");
|
|
40
40
|
const error = ref<string | null>(null);
|
|
41
41
|
|
|
42
|
-
const inputClass = BATI.has("tailwindcss")
|
|
42
|
+
const inputClass = $$.BATI.has("tailwindcss")
|
|
43
43
|
? "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"
|
|
44
44
|
: "";
|
|
45
|
-
const buttonClass = BATI.has("tailwindcss")
|
|
45
|
+
const buttonClass = $$.BATI.has("tailwindcss")
|
|
46
46
|
? "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"
|
|
47
47
|
: "";
|
|
48
|
-
const githubButtonClass = BATI.has("tailwindcss")
|
|
48
|
+
const githubButtonClass = $$.BATI.has("tailwindcss")
|
|
49
49
|
? "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"
|
|
50
50
|
: "";
|
|
51
51
|
|
|
@@ -35,10 +35,10 @@ const email = ref("");
|
|
|
35
35
|
const password = ref("");
|
|
36
36
|
const error = ref<string | null>(null);
|
|
37
37
|
|
|
38
|
-
const inputClass = BATI.has("tailwindcss")
|
|
38
|
+
const inputClass = $$.BATI.has("tailwindcss")
|
|
39
39
|
? "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"
|
|
40
40
|
: "";
|
|
41
|
-
const buttonClass = BATI.has("tailwindcss")
|
|
41
|
+
const buttonClass = $$.BATI.has("tailwindcss")
|
|
42
42
|
? "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"
|
|
43
43
|
: "";
|
|
44
44
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { loadPackageJson } from "@batijs/core";
|
|
4
4
|
//#region ../../boilerplates/vue-sentry/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-tycQSmlY.js").then((x) => x.default))).addDependencies(["@sentry/vue"]);
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
export { getPackageJson as default };
|
|
@@ -15,11 +15,11 @@ var package_default = {
|
|
|
15
15
|
devDependencies: {
|
|
16
16
|
"@batijs/compile": "workspace:*",
|
|
17
17
|
"@batijs/core": "workspace:*",
|
|
18
|
-
"@sentry/vue": "^10.
|
|
18
|
+
"@sentry/vue": "^10.57.0",
|
|
19
19
|
"@types/node": "^20.19.37",
|
|
20
20
|
"vike-vue": "^0.9.11",
|
|
21
21
|
"vite": "^8.0.16",
|
|
22
|
-
"vue": "^3.5.
|
|
22
|
+
"vue": "^3.5.38"
|
|
23
23
|
},
|
|
24
24
|
files: ["dist/"],
|
|
25
25
|
exports: { "./sentry.browser.config": { "types": "./dist/types/sentry.browser.config.d.mts" } },
|