@batijs/cli 0.0.529 → 0.0.531
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/bati.config.js +9 -1
- package/dist/boilerplates/@batijs/auth0/files/$.env.js +2 -2
- package/dist/boilerplates/@batijs/auth0/files/$TODO.md.js +2 -2
- package/dist/boilerplates/@batijs/auth0/files/$wrangler.jsonc.js +2 -2
- package/dist/boilerplates/@batijs/authjs/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/authjs/files/$package.json.js +2 -3
- package/dist/boilerplates/@batijs/authjs/files/server/authjs-handler.ts +2 -4
- package/dist/boilerplates/@batijs/aws/bati.config.js +9 -1
- package/dist/boilerplates/@batijs/aws/files/$README.md.js +2 -2
- package/dist/boilerplates/@batijs/aws/files/$TODO.md.js +2 -2
- package/dist/boilerplates/@batijs/aws/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/aws/files/$tsconfig.json.js +2 -2
- package/dist/boilerplates/@batijs/aws/files/$vite.config.ts.js +1 -1
- package/dist/boilerplates/@batijs/aws/files/cdk/$stack-name-suffix.json.js +1 -1
- package/dist/boilerplates/@batijs/biome/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/biome/files/$biome.json.js +11 -4
- package/dist/boilerplates/@batijs/biome/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/cloudflare/bati.config.js +9 -1
- package/dist/boilerplates/@batijs/cloudflare/files/$TODO.md.js +2 -2
- package/dist/boilerplates/@batijs/cloudflare/files/$package.json.js +5 -6
- package/dist/boilerplates/@batijs/cloudflare/files/$tsconfig.json.js +2 -2
- package/dist/boilerplates/@batijs/compiled/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/compiled/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/compiled/files/$vite.config.ts.js +2 -2
- package/dist/boilerplates/@batijs/d1/bati.config.js +17 -1
- package/dist/boilerplates/@batijs/d1/files/$TODO.md.js +2 -2
- package/dist/boilerplates/@batijs/d1/files/$package.json.js +2 -3
- package/dist/boilerplates/@batijs/d1/files/$wrangler.jsonc.js +2 -2
- package/dist/boilerplates/@batijs/d1/files/database/d1/helpers.ts +0 -1
- package/dist/boilerplates/@batijs/d1/files/global.d.ts +3 -8
- package/dist/boilerplates/@batijs/d1/types/database/d1/helpers.d.ts +0 -1
- package/dist/boilerplates/@batijs/d1-sqlite/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/d1-sqlite/files/$package.json.js +2 -3
- package/dist/boilerplates/@batijs/d1-sqlite/files/database/d1/queries/todos.ts +0 -2
- package/dist/boilerplates/@batijs/d1-sqlite/types/database/d1/queries/todos.d.ts +1 -2
- package/dist/boilerplates/@batijs/drizzle/bati.config.js +17 -1
- package/dist/boilerplates/@batijs/drizzle/files/$.env.js +2 -2
- package/dist/boilerplates/@batijs/drizzle/files/$TODO.md.js +2 -2
- package/dist/boilerplates/@batijs/drizzle/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/drizzle/files/database/drizzle/db.ts +0 -1
- package/dist/boilerplates/@batijs/drizzle/types/database/drizzle/db.d.ts +0 -1
- package/dist/boilerplates/@batijs/eslint/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/eslint/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/eslint/files/eslint.config.ts +2 -0
- package/dist/boilerplates/@batijs/express/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/express/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/fastify/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/fastify/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/google-analytics/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/google-analytics/files/$.env.js +2 -2
- package/dist/boilerplates/@batijs/h3/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/h3/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/hono/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/hono/files/$package.json.js +2 -3
- package/dist/boilerplates/@batijs/mantine/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/mantine/files/$README.md.js +2 -2
- package/dist/boilerplates/@batijs/mantine/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/photon/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/photon/files/$README.md.js +2 -2
- package/dist/boilerplates/@batijs/photon/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/plausible.io/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/plausible.io/files/$TODO.md.js +2 -2
- package/dist/boilerplates/@batijs/pnpm/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/pnpm/files/$pnpm-workspace.yaml.js +2 -2
- package/dist/boilerplates/@batijs/prettier/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/prettier/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/prisma/bati.config.js +13 -1
- package/dist/boilerplates/@batijs/prisma/files/$.env.js +2 -2
- package/dist/boilerplates/@batijs/prisma/files/$TODO.md.js +7 -5
- package/dist/boilerplates/@batijs/prisma/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/react/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/react/files/$README.md.js +2 -2
- package/dist/boilerplates/@batijs/react/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/react/files/$tsconfig.json.js +2 -2
- package/dist/boilerplates/@batijs/react/files/$vite.config.ts.js +2 -2
- package/dist/boilerplates/@batijs/react-sentry/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/react-sentry/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/sentry/bati.config.js +9 -1
- package/dist/boilerplates/@batijs/sentry/files/$.env.js +2 -2
- package/dist/boilerplates/@batijs/sentry/files/$README.md.js +2 -2
- package/dist/boilerplates/@batijs/sentry/files/$TODO.md.js +2 -2
- package/dist/boilerplates/@batijs/sentry/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/sentry/files/$vite.config.ts.js +2 -2
- package/dist/boilerplates/@batijs/sentry/files/pages/$+client.ts.js +2 -2
- package/dist/boilerplates/@batijs/shadcn-ui/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/shadcn-ui/files/$README.md.js +2 -2
- package/dist/boilerplates/@batijs/shadcn-ui/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/shadcn-ui/files/$tsconfig.json.js +2 -2
- package/dist/boilerplates/@batijs/shadcn-ui/files/$vite.config.ts.js +2 -2
- package/dist/boilerplates/@batijs/shared/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/shared/files/$README.md.js +2 -2
- package/dist/boilerplates/@batijs/shared/files/$TODO.md.js +2 -2
- package/dist/boilerplates/@batijs/shared-db/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/shared-db/files/server/db-middleware.ts +0 -1
- package/dist/boilerplates/@batijs/shared-db/types/server/db-middleware.d.ts +0 -1
- package/dist/boilerplates/@batijs/shared-server/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/shared-server/files/$package.json.js +2 -3
- package/dist/boilerplates/@batijs/shared-server/files/server/create-todo-handler.ts +0 -1
- package/dist/boilerplates/@batijs/shared-server/types/server/create-todo-handler.d.ts +0 -1
- package/dist/boilerplates/@batijs/shared-todo/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/shared-todo/files/global.d.ts +1 -2
- package/dist/boilerplates/@batijs/shared-todo/types/pages/todo/+data.d.ts +1 -3
- package/dist/boilerplates/@batijs/solid/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/solid/files/$README.md.js +2 -2
- package/dist/boilerplates/@batijs/solid/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/solid/files/$tsconfig.json.js +2 -2
- package/dist/boilerplates/@batijs/solid/files/$vite.config.ts.js +2 -2
- package/dist/boilerplates/@batijs/solid-sentry/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/solid-sentry/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/sqlite/bati.config.js +9 -1
- package/dist/boilerplates/@batijs/sqlite/files/$.env.js +2 -2
- package/dist/boilerplates/@batijs/sqlite/files/$TODO.md.js +7 -5
- package/dist/boilerplates/@batijs/sqlite/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/tailwindcss/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/tailwindcss/files/$vite.config.ts.js +2 -2
- package/dist/boilerplates/@batijs/telefunc/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +2 -3
- package/dist/boilerplates/@batijs/telefunc/files/$vite.config.ts.js +2 -2
- package/dist/boilerplates/@batijs/telefunc/files/global.d.ts +4 -1
- package/dist/boilerplates/@batijs/telefunc/files/server/telefunc-handler.ts +0 -1
- package/dist/boilerplates/@batijs/trpc/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/trpc/files/$package.json.js +2 -3
- package/dist/boilerplates/@batijs/trpc/files/server/trpc-handler.ts +0 -1
- package/dist/boilerplates/@batijs/trpc/files/trpc/server.ts +0 -1
- package/dist/boilerplates/@batijs/trpc/types/server/trpc-handler.d.ts +1 -1
- package/dist/boilerplates/@batijs/trpc/types/trpc/client.d.ts +4 -4
- package/dist/boilerplates/@batijs/trpc/types/trpc/server.d.ts +0 -1
- package/dist/boilerplates/@batijs/ts-rest/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/ts-rest/files/$package.json.js +2 -3
- package/dist/boilerplates/@batijs/ts-rest/files/server/ts-rest-handler.ts +0 -1
- package/dist/boilerplates/@batijs/vercel/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/vercel/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/vercel/files/pages/$+config.ts.js +2 -2
- package/dist/boilerplates/@batijs/vue/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/vue/files/$README.md.js +2 -2
- package/dist/boilerplates/@batijs/vue/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/vue/files/$tsconfig.json.js +2 -2
- package/dist/boilerplates/@batijs/vue/files/$vite.config.ts.js +2 -2
- package/dist/boilerplates/@batijs/vue-sentry/bati.config.js +1 -1
- package/dist/boilerplates/@batijs/vue-sentry/files/$package.json.js +2 -2
- package/dist/{chunk-DHZ7AZKP.js → chunk-IHX3I5SM.js} +5 -0
- package/dist/{chunk-F525H6YP.js → chunk-VIDUWABF.js} +6 -6
- package/dist/index.js +71 -15
- package/dist/{jiti-ZW3ADF2F-7XIEJQMO.js → jiti-ZW3ADF2F-2SLKRUEN.js} +1 -1
- package/dist/{prompt-HBAIF7ML.js → prompt-YBELZKBA.js} +1 -1
- package/dist/{src-5HGZFBZ3-KQZBBJSW.js → src-5HGZFBZ3-CGUDMVWF.js} +1 -1
- package/package.json +5 -5
- package/dist/boilerplates/@batijs/cloudflare/files/worker-configuration.d.ts +0 -1
- package/dist/boilerplates/@batijs/d1/files/$tsconfig.json.js +0 -19
|
@@ -3,13 +3,21 @@ function t(e, r) {
|
|
|
3
3
|
if (!e) throw new Error(r);
|
|
4
4
|
}
|
|
5
5
|
function i(e) {
|
|
6
|
-
return "enforce" in e && t(e.enforce === "pre" || e.enforce === "post", `'enforce' must be 'pre' or 'post', was ${e.enforce}`), "if" in e && t(typeof e.if == "function", "'if' must be a function"), e;
|
|
6
|
+
return "enforce" in e && t(e.enforce === "pre" || e.enforce === "post", `'enforce' must be 'pre' or 'post', was ${e.enforce}`), "if" in e && t(typeof e.if == "function", "'if' must be a function"), "nextSteps" in e && t(typeof e.nextSteps == "function", "'nextSteps' must be a function"), e;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
// bati.config.ts
|
|
10
10
|
var bati_config_default = i({
|
|
11
11
|
if(meta) {
|
|
12
12
|
return meta.BATI.has("auth0");
|
|
13
|
+
},
|
|
14
|
+
nextSteps(_meta, _packageManager, { bold }) {
|
|
15
|
+
return [
|
|
16
|
+
{
|
|
17
|
+
type: "text",
|
|
18
|
+
step: `Add the Auth0 configuration to the .env file. Check ${bold("TODO.md")} for details`
|
|
19
|
+
}
|
|
20
|
+
];
|
|
13
21
|
}
|
|
14
22
|
});
|
|
15
23
|
export {
|
|
@@ -4,9 +4,9 @@ const require = createRequire_BATI_CLI(import.meta.url);
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
UMs
|
|
7
|
-
} from "../../../../chunk-
|
|
7
|
+
} from "../../../../chunk-VIDUWABF.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
|
-
import "../../../../chunk-
|
|
9
|
+
import "../../../../chunk-IHX3I5SM.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/auth0/dist/files/$.env.js
|
|
12
12
|
async function getEnv(props) {
|
|
@@ -4,9 +4,9 @@ const require = createRequire_BATI_CLI(import.meta.url);
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
t1s
|
|
7
|
-
} from "../../../../chunk-
|
|
7
|
+
} from "../../../../chunk-VIDUWABF.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
|
-
import "../../../../chunk-
|
|
9
|
+
import "../../../../chunk-IHX3I5SM.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/auth0/dist/files/$TODO.md.js
|
|
12
12
|
async function getTodo(props) {
|
|
@@ -4,9 +4,9 @@ const require = createRequire_BATI_CLI(import.meta.url);
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
r1s
|
|
7
|
-
} from "../../../../chunk-
|
|
7
|
+
} from "../../../../chunk-VIDUWABF.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
|
-
import "../../../../chunk-
|
|
9
|
+
import "../../../../chunk-IHX3I5SM.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/auth0/dist/files/$wrangler.jsonc.js
|
|
12
12
|
async function getEnv(props) {
|
|
@@ -3,7 +3,7 @@ function t(e, r) {
|
|
|
3
3
|
if (!e) throw new Error(r);
|
|
4
4
|
}
|
|
5
5
|
function i(e) {
|
|
6
|
-
return "enforce" in e && t(e.enforce === "pre" || e.enforce === "post", `'enforce' must be 'pre' or 'post', was ${e.enforce}`), "if" in e && t(typeof e.if == "function", "'if' must be a function"), e;
|
|
6
|
+
return "enforce" in e && t(e.enforce === "pre" || e.enforce === "post", `'enforce' must be 'pre' or 'post', was ${e.enforce}`), "if" in e && t(typeof e.if == "function", "'if' must be a function"), "nextSteps" in e && t(typeof e.nextSteps == "function", "'nextSteps' must be a function"), e;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
// bati.config.ts
|
|
@@ -4,9 +4,9 @@ const require = createRequire_BATI_CLI(import.meta.url);
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
n1s
|
|
7
|
-
} from "../../../../chunk-
|
|
7
|
+
} from "../../../../chunk-VIDUWABF.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
|
-
import "../../../../chunk-
|
|
9
|
+
import "../../../../chunk-IHX3I5SM.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/authjs/dist/files/$package.json.js
|
|
12
12
|
var __create = Object.create;
|
|
@@ -52,7 +52,6 @@ var require_package = __commonJS({
|
|
|
52
52
|
devDependencies: {
|
|
53
53
|
"@auth/core": "^0.41.1",
|
|
54
54
|
"@batijs/compile": "workspace:*",
|
|
55
|
-
"@cloudflare/workers-types": "^4.20251125.0",
|
|
56
55
|
"@types/node": "^20.19.25",
|
|
57
56
|
"@universal-middleware/core": "^0.4.13"
|
|
58
57
|
},
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
//# BATI.has("cloudflare")
|
|
2
|
-
/// <reference types="@cloudflare/workers-types" />
|
|
3
1
|
import { env as cloudflareEnv } from "cloudflare:workers";
|
|
4
2
|
import { Auth, type AuthConfig, createActionURL, setEnvDefaults } from "@auth/core";
|
|
5
3
|
import Auth0 from "@auth/core/providers/auth0";
|
|
@@ -8,8 +6,8 @@ import type { Session } from "@auth/core/types";
|
|
|
8
6
|
import { enhance, type UniversalHandler, type UniversalMiddleware } from "@universal-middleware/core";
|
|
9
7
|
|
|
10
8
|
//# BATI.has("auth0")
|
|
11
|
-
const env: Record<string, string | undefined> = BATI.has("cloudflare")
|
|
12
|
-
? (cloudflareEnv as
|
|
9
|
+
const env: BATI.If<{ '!BATI.has("cloudflare")': Record<string, string | undefined> }> = BATI.has("cloudflare")
|
|
10
|
+
? (cloudflareEnv as BATI.Any)
|
|
13
11
|
: typeof process?.env !== "undefined"
|
|
14
12
|
? process.env
|
|
15
13
|
: import.meta && "env" in import.meta
|
|
@@ -3,7 +3,7 @@ function t(e, r) {
|
|
|
3
3
|
if (!e) throw new Error(r);
|
|
4
4
|
}
|
|
5
5
|
function i(e) {
|
|
6
|
-
return "enforce" in e && t(e.enforce === "pre" || e.enforce === "post", `'enforce' must be 'pre' or 'post', was ${e.enforce}`), "if" in e && t(typeof e.if == "function", "'if' must be a function"), e;
|
|
6
|
+
return "enforce" in e && t(e.enforce === "pre" || e.enforce === "post", `'enforce' must be 'pre' or 'post', was ${e.enforce}`), "if" in e && t(typeof e.if == "function", "'if' must be a function"), "nextSteps" in e && t(typeof e.nextSteps == "function", "'nextSteps' must be a function"), e;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
// bati.config.ts
|
|
@@ -11,6 +11,14 @@ var bati_config_default = i({
|
|
|
11
11
|
if(meta) {
|
|
12
12
|
return meta.BATI.has("aws");
|
|
13
13
|
},
|
|
14
|
+
nextSteps(_meta, _packageManager, { bold }) {
|
|
15
|
+
return [
|
|
16
|
+
{
|
|
17
|
+
type: "text",
|
|
18
|
+
step: `Ensure that AWS credentials are configured. Check ${bold("TODO.md")} for details`
|
|
19
|
+
}
|
|
20
|
+
];
|
|
21
|
+
},
|
|
14
22
|
enforce: "post"
|
|
15
23
|
});
|
|
16
24
|
export {
|
|
@@ -5,9 +5,9 @@ const require = createRequire_BATI_CLI(import.meta.url);
|
|
|
5
5
|
import {
|
|
6
6
|
t1s,
|
|
7
7
|
xas
|
|
8
|
-
} from "../../../../chunk-
|
|
8
|
+
} from "../../../../chunk-VIDUWABF.js";
|
|
9
9
|
import "../../../../chunk-IAWYWZSL.js";
|
|
10
|
-
import "../../../../chunk-
|
|
10
|
+
import "../../../../chunk-IHX3I5SM.js";
|
|
11
11
|
|
|
12
12
|
// ../../boilerplates/aws/dist/files/$README.md.js
|
|
13
13
|
async function getReadme(props) {
|
|
@@ -5,9 +5,9 @@ const require = createRequire_BATI_CLI(import.meta.url);
|
|
|
5
5
|
import {
|
|
6
6
|
t1s,
|
|
7
7
|
xas
|
|
8
|
-
} from "../../../../chunk-
|
|
8
|
+
} from "../../../../chunk-VIDUWABF.js";
|
|
9
9
|
import "../../../../chunk-IAWYWZSL.js";
|
|
10
|
-
import "../../../../chunk-
|
|
10
|
+
import "../../../../chunk-IHX3I5SM.js";
|
|
11
11
|
|
|
12
12
|
// ../../boilerplates/aws/dist/files/$TODO.md.js
|
|
13
13
|
async function getTodo(props) {
|
|
@@ -4,9 +4,9 @@ const require = createRequire_BATI_CLI(import.meta.url);
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
n1s
|
|
7
|
-
} from "../../../../chunk-
|
|
7
|
+
} from "../../../../chunk-VIDUWABF.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
|
-
import "../../../../chunk-
|
|
9
|
+
import "../../../../chunk-IHX3I5SM.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/aws/dist/files/$package.json.js
|
|
12
12
|
var __create = Object.create;
|
|
@@ -4,9 +4,9 @@ const require = createRequire_BATI_CLI(import.meta.url);
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
r1s
|
|
7
|
-
} from "../../../../chunk-
|
|
7
|
+
} from "../../../../chunk-VIDUWABF.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
|
-
import "../../../../chunk-
|
|
9
|
+
import "../../../../chunk-IHX3I5SM.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/aws/dist/files/$tsconfig.json.js
|
|
12
12
|
async function getTsConfig(props) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
|
-
import "../../../../chunk-
|
|
5
|
+
import "../../../../chunk-IHX3I5SM.js";
|
|
6
6
|
|
|
7
7
|
// ../../boilerplates/aws/dist/files/$vite.config.ts.js
|
|
8
8
|
var plugin = `{
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
|
-
import "../../../../../chunk-
|
|
5
|
+
import "../../../../../chunk-IHX3I5SM.js";
|
|
6
6
|
|
|
7
7
|
// ../../boilerplates/aws/dist/files/cdk/$stack-name-suffix.json.js
|
|
8
8
|
async function getDataJson() {
|
|
@@ -3,7 +3,7 @@ function t(e, r) {
|
|
|
3
3
|
if (!e) throw new Error(r);
|
|
4
4
|
}
|
|
5
5
|
function i(e) {
|
|
6
|
-
return "enforce" in e && t(e.enforce === "pre" || e.enforce === "post", `'enforce' must be 'pre' or 'post', was ${e.enforce}`), "if" in e && t(typeof e.if == "function", "'if' must be a function"), e;
|
|
6
|
+
return "enforce" in e && t(e.enforce === "pre" || e.enforce === "post", `'enforce' must be 'pre' or 'post', was ${e.enforce}`), "if" in e && t(typeof e.if == "function", "'if' must be a function"), "nextSteps" in e && t(typeof e.nextSteps == "function", "'nextSteps' must be a function"), e;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
// bati.config.ts
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
|
-
import "../../../../chunk-
|
|
5
|
+
import "../../../../chunk-IHX3I5SM.js";
|
|
6
6
|
|
|
7
7
|
// ../../boilerplates/biome/dist/files/$biome.json.js
|
|
8
8
|
async function getBiomeJson(props) {
|
|
@@ -51,7 +51,13 @@ async function getBiomeJson(props) {
|
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
+
additionalConfig.files ??= {};
|
|
55
|
+
additionalConfig.files.includes ??= [];
|
|
56
|
+
if (props.meta.BATI.has("cloudflare")) {
|
|
57
|
+
additionalConfig.files.includes.push("!worker-configuration.d.ts");
|
|
58
|
+
}
|
|
54
59
|
return {
|
|
60
|
+
...additionalConfig,
|
|
55
61
|
$schema: "./node_modules/@biomejs/biome/configuration_schema.json",
|
|
56
62
|
formatter: {
|
|
57
63
|
indentStyle: "space"
|
|
@@ -65,6 +71,7 @@ async function getBiomeJson(props) {
|
|
|
65
71
|
...additionalLinter
|
|
66
72
|
},
|
|
67
73
|
files: {
|
|
74
|
+
...additionalConfig.files,
|
|
68
75
|
includes: [
|
|
69
76
|
"**",
|
|
70
77
|
"!*.cjs",
|
|
@@ -74,15 +81,15 @@ async function getBiomeJson(props) {
|
|
|
74
81
|
"!**/*.ts.build-*.mjs",
|
|
75
82
|
"!dist/*",
|
|
76
83
|
"!node_modules/*",
|
|
77
|
-
"!**/.DS_Store"
|
|
84
|
+
"!**/.DS_Store",
|
|
85
|
+
...additionalConfig.files.includes
|
|
78
86
|
]
|
|
79
87
|
},
|
|
80
88
|
vcs: {
|
|
81
89
|
enabled: true,
|
|
82
90
|
clientKind: "git",
|
|
83
91
|
useIgnoreFile: true
|
|
84
|
-
}
|
|
85
|
-
...additionalConfig
|
|
92
|
+
}
|
|
86
93
|
};
|
|
87
94
|
}
|
|
88
95
|
export {
|
|
@@ -4,9 +4,9 @@ const require = createRequire_BATI_CLI(import.meta.url);
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
n1s
|
|
7
|
-
} from "../../../../chunk-
|
|
7
|
+
} from "../../../../chunk-VIDUWABF.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
|
-
import "../../../../chunk-
|
|
9
|
+
import "../../../../chunk-IHX3I5SM.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/biome/dist/files/$package.json.js
|
|
12
12
|
var __create = Object.create;
|
|
@@ -3,7 +3,7 @@ function t(e, r) {
|
|
|
3
3
|
if (!e) throw new Error(r);
|
|
4
4
|
}
|
|
5
5
|
function i(e) {
|
|
6
|
-
return "enforce" in e && t(e.enforce === "pre" || e.enforce === "post", `'enforce' must be 'pre' or 'post', was ${e.enforce}`), "if" in e && t(typeof e.if == "function", "'if' must be a function"), e;
|
|
6
|
+
return "enforce" in e && t(e.enforce === "pre" || e.enforce === "post", `'enforce' must be 'pre' or 'post', was ${e.enforce}`), "if" in e && t(typeof e.if == "function", "'if' must be a function"), "nextSteps" in e && t(typeof e.nextSteps == "function", "'nextSteps' must be a function"), e;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
// bati.config.ts
|
|
@@ -11,6 +11,14 @@ var bati_config_default = i({
|
|
|
11
11
|
if(meta) {
|
|
12
12
|
return meta.BATI.has("cloudflare");
|
|
13
13
|
},
|
|
14
|
+
nextSteps(_meta, packageManager) {
|
|
15
|
+
return [
|
|
16
|
+
{
|
|
17
|
+
type: "command",
|
|
18
|
+
step: `${packageManager} wrangler types`
|
|
19
|
+
}
|
|
20
|
+
];
|
|
21
|
+
},
|
|
14
22
|
enforce: "post"
|
|
15
23
|
});
|
|
16
24
|
export {
|
|
@@ -5,9 +5,9 @@ const require = createRequire_BATI_CLI(import.meta.url);
|
|
|
5
5
|
import {
|
|
6
6
|
t1s,
|
|
7
7
|
xas
|
|
8
|
-
} from "../../../../chunk-
|
|
8
|
+
} from "../../../../chunk-VIDUWABF.js";
|
|
9
9
|
import "../../../../chunk-IAWYWZSL.js";
|
|
10
|
-
import "../../../../chunk-
|
|
10
|
+
import "../../../../chunk-IHX3I5SM.js";
|
|
11
11
|
|
|
12
12
|
// ../../boilerplates/cloudflare/dist/files/$TODO.md.js
|
|
13
13
|
async function getTodo(props) {
|
|
@@ -4,9 +4,9 @@ const require = createRequire_BATI_CLI(import.meta.url);
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
n1s
|
|
7
|
-
} from "../../../../chunk-
|
|
7
|
+
} from "../../../../chunk-VIDUWABF.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
|
-
import "../../../../chunk-
|
|
9
|
+
import "../../../../chunk-IHX3I5SM.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/cloudflare/dist/files/$package.json.js
|
|
12
12
|
var __create = Object.create;
|
|
@@ -51,7 +51,6 @@ var require_package = __commonJS({
|
|
|
51
51
|
license: "MIT",
|
|
52
52
|
devDependencies: {
|
|
53
53
|
"@batijs/compile": "workspace:*",
|
|
54
|
-
"@cloudflare/workers-types": "^4.20251125.0",
|
|
55
54
|
"@photonjs/cloudflare": "^0.1.8",
|
|
56
55
|
"@types/node": "^20.19.25",
|
|
57
56
|
wrangler: "^4.50.0"
|
|
@@ -83,11 +82,11 @@ async function getPackageJson(props) {
|
|
|
83
82
|
value: "vike build && wrangler deploy",
|
|
84
83
|
precedence: 25,
|
|
85
84
|
warnIfReplaced: true
|
|
86
|
-
}).setScript("
|
|
85
|
+
}).setScript("generate-types", {
|
|
87
86
|
value: "wrangler types",
|
|
88
|
-
precedence:
|
|
87
|
+
precedence: 0,
|
|
89
88
|
warnIfReplaced: true
|
|
90
|
-
}).addDevDependencies(["
|
|
89
|
+
}).addDevDependencies(["wrangler"]).addDependencies(["@photonjs/cloudflare"]);
|
|
91
90
|
}
|
|
92
91
|
export {
|
|
93
92
|
getPackageJson as default
|
|
@@ -4,9 +4,9 @@ const require = createRequire_BATI_CLI(import.meta.url);
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
r1s
|
|
7
|
-
} from "../../../../chunk-
|
|
7
|
+
} from "../../../../chunk-VIDUWABF.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
|
-
import "../../../../chunk-
|
|
9
|
+
import "../../../../chunk-IHX3I5SM.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/cloudflare/dist/files/$tsconfig.json.js
|
|
12
12
|
async function getTsConfig(props) {
|
|
@@ -3,7 +3,7 @@ function t(e, r) {
|
|
|
3
3
|
if (!e) throw new Error(r);
|
|
4
4
|
}
|
|
5
5
|
function i(e) {
|
|
6
|
-
return "enforce" in e && t(e.enforce === "pre" || e.enforce === "post", `'enforce' must be 'pre' or 'post', was ${e.enforce}`), "if" in e && t(typeof e.if == "function", "'if' must be a function"), e;
|
|
6
|
+
return "enforce" in e && t(e.enforce === "pre" || e.enforce === "post", `'enforce' must be 'pre' or 'post', was ${e.enforce}`), "if" in e && t(typeof e.if == "function", "'if' must be a function"), "nextSteps" in e && t(typeof e.nextSteps == "function", "'nextSteps' must be a function"), e;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
// bati.config.ts
|
|
@@ -4,9 +4,9 @@ const require = createRequire_BATI_CLI(import.meta.url);
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
n1s
|
|
7
|
-
} from "../../../../chunk-
|
|
7
|
+
} from "../../../../chunk-VIDUWABF.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
|
-
import "../../../../chunk-
|
|
9
|
+
import "../../../../chunk-IHX3I5SM.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/compiled/dist/files/$package.json.js
|
|
12
12
|
var __create = Object.create;
|
|
@@ -5,9 +5,9 @@ const require = createRequire_BATI_CLI(import.meta.url);
|
|
|
5
5
|
import {
|
|
6
6
|
i1s,
|
|
7
7
|
iQn
|
|
8
|
-
} from "../../../../chunk-
|
|
8
|
+
} from "../../../../chunk-VIDUWABF.js";
|
|
9
9
|
import "../../../../chunk-IAWYWZSL.js";
|
|
10
|
-
import "../../../../chunk-
|
|
10
|
+
import "../../../../chunk-IHX3I5SM.js";
|
|
11
11
|
|
|
12
12
|
// ../../boilerplates/compiled/dist/files/$vite.config.ts.js
|
|
13
13
|
async function getViteConfig(props) {
|
|
@@ -3,13 +3,29 @@ function t(e, r) {
|
|
|
3
3
|
if (!e) throw new Error(r);
|
|
4
4
|
}
|
|
5
5
|
function i(e) {
|
|
6
|
-
return "enforce" in e && t(e.enforce === "pre" || e.enforce === "post", `'enforce' must be 'pre' or 'post', was ${e.enforce}`), "if" in e && t(typeof e.if == "function", "'if' must be a function"), e;
|
|
6
|
+
return "enforce" in e && t(e.enforce === "pre" || e.enforce === "post", `'enforce' must be 'pre' or 'post', was ${e.enforce}`), "if" in e && t(typeof e.if == "function", "'if' must be a function"), "nextSteps" in e && t(typeof e.nextSteps == "function", "'nextSteps' must be a function"), e;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
// bati.config.ts
|
|
10
10
|
var bati_config_default = i({
|
|
11
11
|
if(meta) {
|
|
12
12
|
return meta.BATI.hasD1;
|
|
13
|
+
},
|
|
14
|
+
nextSteps(meta, packageManager) {
|
|
15
|
+
const step = {
|
|
16
|
+
type: "command",
|
|
17
|
+
step: `${packageManager} wrangler d1 create my-vike-demo-database`
|
|
18
|
+
};
|
|
19
|
+
if (!meta.BATI.has("drizzle")) {
|
|
20
|
+
return [
|
|
21
|
+
step,
|
|
22
|
+
{
|
|
23
|
+
type: "command",
|
|
24
|
+
step: `${packageManager} d1:migrate`
|
|
25
|
+
}
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
return [step];
|
|
13
29
|
}
|
|
14
30
|
});
|
|
15
31
|
export {
|
|
@@ -5,9 +5,9 @@ const require = createRequire_BATI_CLI(import.meta.url);
|
|
|
5
5
|
import {
|
|
6
6
|
t1s,
|
|
7
7
|
xas
|
|
8
|
-
} from "../../../../chunk-
|
|
8
|
+
} from "../../../../chunk-VIDUWABF.js";
|
|
9
9
|
import "../../../../chunk-IAWYWZSL.js";
|
|
10
|
-
import "../../../../chunk-
|
|
10
|
+
import "../../../../chunk-IHX3I5SM.js";
|
|
11
11
|
|
|
12
12
|
// ../../boilerplates/d1/dist/files/$TODO.md.js
|
|
13
13
|
async function getTodo(props) {
|
|
@@ -4,9 +4,9 @@ const require = createRequire_BATI_CLI(import.meta.url);
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
n1s
|
|
7
|
-
} from "../../../../chunk-
|
|
7
|
+
} from "../../../../chunk-VIDUWABF.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
|
-
import "../../../../chunk-
|
|
9
|
+
import "../../../../chunk-IHX3I5SM.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/d1/dist/files/$package.json.js
|
|
12
12
|
var __create = Object.create;
|
|
@@ -51,7 +51,6 @@ var require_package = __commonJS({
|
|
|
51
51
|
license: "MIT",
|
|
52
52
|
devDependencies: {
|
|
53
53
|
"@batijs/compile": "workspace:*",
|
|
54
|
-
"@cloudflare/workers-types": "^4.20251125.0",
|
|
55
54
|
"@types/node": "^20.19.25",
|
|
56
55
|
"@universal-middleware/core": "^0.4.13",
|
|
57
56
|
vike: "^0.4.247",
|
|
@@ -4,9 +4,9 @@ const require = createRequire_BATI_CLI(import.meta.url);
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
r1s
|
|
7
|
-
} from "../../../../chunk-
|
|
7
|
+
} from "../../../../chunk-VIDUWABF.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
|
-
import "../../../../chunk-
|
|
9
|
+
import "../../../../chunk-IHX3I5SM.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/d1/dist/files/$wrangler.jsonc.js
|
|
12
12
|
async function getToml(props) {
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import type { D1Database } from "@cloudflare/workers-types";
|
|
2
|
-
|
|
3
|
-
// Cloudflare typings
|
|
4
|
-
interface Env {
|
|
5
|
-
DB: D1Database;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
1
|
declare global {
|
|
9
2
|
namespace Vike {
|
|
10
|
-
interface
|
|
3
|
+
interface PageContextServer {
|
|
11
4
|
env: Env;
|
|
12
5
|
}
|
|
13
6
|
}
|
|
14
7
|
}
|
|
8
|
+
|
|
9
|
+
export {};
|
|
@@ -3,7 +3,7 @@ function t(e, r) {
|
|
|
3
3
|
if (!e) throw new Error(r);
|
|
4
4
|
}
|
|
5
5
|
function i(e) {
|
|
6
|
-
return "enforce" in e && t(e.enforce === "pre" || e.enforce === "post", `'enforce' must be 'pre' or 'post', was ${e.enforce}`), "if" in e && t(typeof e.if == "function", "'if' must be a function"), e;
|
|
6
|
+
return "enforce" in e && t(e.enforce === "pre" || e.enforce === "post", `'enforce' must be 'pre' or 'post', was ${e.enforce}`), "if" in e && t(typeof e.if == "function", "'if' must be a function"), "nextSteps" in e && t(typeof e.nextSteps == "function", "'nextSteps' must be a function"), e;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
// bati.config.ts
|
|
@@ -4,9 +4,9 @@ const require = createRequire_BATI_CLI(import.meta.url);
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
n1s
|
|
7
|
-
} from "../../../../chunk-
|
|
7
|
+
} from "../../../../chunk-VIDUWABF.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
|
-
import "../../../../chunk-
|
|
9
|
+
import "../../../../chunk-IHX3I5SM.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/d1-sqlite/dist/files/$package.json.js
|
|
12
12
|
var __create = Object.create;
|
|
@@ -51,7 +51,6 @@ var require_package = __commonJS({
|
|
|
51
51
|
license: "MIT",
|
|
52
52
|
devDependencies: {
|
|
53
53
|
"@batijs/compile": "workspace:*",
|
|
54
|
-
"@cloudflare/workers-types": "^4.20251125.0",
|
|
55
54
|
"@types/node": "^20.19.25",
|
|
56
55
|
"@universal-middleware/core": "^0.4.13",
|
|
57
56
|
vike: "^0.4.247"
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function insertTodo(db: D1Database, text: string): Promise<import("@cloudflare/workers-types").D1Result<Record<string, unknown>>>;
|
|
1
|
+
export declare function insertTodo(db: D1Database, text: string): Promise<D1Result<Record<string, unknown>>>;
|
|
3
2
|
export declare function getAllTodos(db: D1Database): Promise<{
|
|
4
3
|
id: number;
|
|
5
4
|
text: string;
|
|
@@ -3,13 +3,29 @@ function t(e, r) {
|
|
|
3
3
|
if (!e) throw new Error(r);
|
|
4
4
|
}
|
|
5
5
|
function i(e) {
|
|
6
|
-
return "enforce" in e && t(e.enforce === "pre" || e.enforce === "post", `'enforce' must be 'pre' or 'post', was ${e.enforce}`), "if" in e && t(typeof e.if == "function", "'if' must be a function"), e;
|
|
6
|
+
return "enforce" in e && t(e.enforce === "pre" || e.enforce === "post", `'enforce' must be 'pre' or 'post', was ${e.enforce}`), "if" in e && t(typeof e.if == "function", "'if' must be a function"), "nextSteps" in e && t(typeof e.nextSteps == "function", "'nextSteps' must be a function"), e;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
// bati.config.ts
|
|
10
10
|
var bati_config_default = i({
|
|
11
11
|
if(meta) {
|
|
12
12
|
return meta.BATI.has("drizzle");
|
|
13
|
+
},
|
|
14
|
+
nextSteps(_meta, packageManager, { bold }) {
|
|
15
|
+
return [
|
|
16
|
+
{
|
|
17
|
+
type: "text",
|
|
18
|
+
step: `Add your drizzle ${bold("DATABASE_URL")} to the .env file. Check ${bold("TODO.md")} for details`
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
type: "command",
|
|
22
|
+
step: `${packageManager} drizzle:generate`
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
type: "command",
|
|
26
|
+
step: `${packageManager} drizzle:migrate`
|
|
27
|
+
}
|
|
28
|
+
];
|
|
13
29
|
}
|
|
14
30
|
});
|
|
15
31
|
export {
|
|
@@ -4,9 +4,9 @@ const require = createRequire_BATI_CLI(import.meta.url);
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
UMs
|
|
7
|
-
} from "../../../../chunk-
|
|
7
|
+
} from "../../../../chunk-VIDUWABF.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
|
-
import "../../../../chunk-
|
|
9
|
+
import "../../../../chunk-IHX3I5SM.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/drizzle/dist/files/$.env.js
|
|
12
12
|
async function getEnv(props) {
|
|
@@ -5,9 +5,9 @@ const require = createRequire_BATI_CLI(import.meta.url);
|
|
|
5
5
|
import {
|
|
6
6
|
t1s,
|
|
7
7
|
xas
|
|
8
|
-
} from "../../../../chunk-
|
|
8
|
+
} from "../../../../chunk-VIDUWABF.js";
|
|
9
9
|
import "../../../../chunk-IAWYWZSL.js";
|
|
10
|
-
import "../../../../chunk-
|
|
10
|
+
import "../../../../chunk-IHX3I5SM.js";
|
|
11
11
|
|
|
12
12
|
// ../../boilerplates/drizzle/dist/files/$TODO.md.js
|
|
13
13
|
async function getTodo(props) {
|
|
@@ -4,9 +4,9 @@ const require = createRequire_BATI_CLI(import.meta.url);
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
n1s
|
|
7
|
-
} from "../../../../chunk-
|
|
7
|
+
} from "../../../../chunk-VIDUWABF.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
|
-
import "../../../../chunk-
|
|
9
|
+
import "../../../../chunk-IHX3I5SM.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/drizzle/dist/files/$package.json.js
|
|
12
12
|
var __create = Object.create;
|