@batijs/cli 0.0.629 → 0.0.631
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-env-Jk0sS-Q2.js +35 -0
- package/dist/{asset-package.json-BpYtzVUp.js → asset-package.json-B-yhAahL.js} +2 -0
- package/dist/{asset-package.json-WJvmKmkO.js → asset-package.json-BKz7RIOA.js} +4 -2
- package/dist/asset-package.json-DKULIe-Z.js +26 -0
- package/dist/asset-package.json-DoD27uYD.js +26 -0
- package/dist/{asset-package.json-CHD5b5fl.js → asset-package.json-Y6cFx6TQ.js} +1 -0
- package/dist/boilerplates/@batijs/auth0/bati.config.mjs +24 -1
- package/dist/boilerplates/@batijs/authjs/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/aws/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/aws/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/biome/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/cloudflare/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/cloudflare/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/cloudflare/files/$wrangler.jsonc.js +22 -0
- package/dist/boilerplates/@batijs/cloudflare/files/asset-env.mjs +9 -0
- package/dist/boilerplates/@batijs/cloudflare/files/asset-package.json.mjs +2 -0
- package/dist/boilerplates/@batijs/compiled/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/d1/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/d1-kysely/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/d1-sqlite/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/docker-compose/bati.config.mjs +17 -0
- package/dist/boilerplates/@batijs/docker-compose/files/$.dockerignore.js +19 -0
- package/dist/boilerplates/@batijs/docker-compose/files/$Dockerfile.js +80 -0
- package/dist/boilerplates/@batijs/docker-compose/files/$docker-compose.yml.js +10 -0
- package/dist/boilerplates/@batijs/docker-compose/files/asset-env.mjs +33 -0
- package/dist/boilerplates/@batijs/docker-compose/files/docker-compose.yml +18 -0
- package/dist/boilerplates/@batijs/dokploy/bati.config.mjs +23 -0
- package/dist/boilerplates/@batijs/dokploy/files/$TODO.md.js +28 -0
- package/dist/boilerplates/@batijs/dokploy/files/$package.json.js +13 -0
- package/dist/boilerplates/@batijs/dokploy/files/asset-package.json.mjs +24 -0
- package/dist/boilerplates/@batijs/drizzle/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/edgeone/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/eslint/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/eslint/files/$package.json.js +3 -2
- package/dist/boilerplates/@batijs/eslint/files/asset-package.json.mjs +1 -0
- package/dist/boilerplates/@batijs/express/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/express/files/$package.json.js +5 -2
- package/dist/boilerplates/@batijs/fastify/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/fastify/files/$package.json.js +2 -3
- package/dist/boilerplates/@batijs/google-analytics/bati.config.mjs +14 -4
- package/dist/boilerplates/@batijs/h3/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/h3/files/$package.json.js +1 -2
- package/dist/boilerplates/@batijs/hono/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/hono/files/$package.json.js +1 -2
- package/dist/boilerplates/@batijs/kysely/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/kysely/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/kysely/files/$vite.config.ts.js +20 -0
- package/dist/boilerplates/@batijs/kysely/files/asset-package.json.mjs +4 -2
- package/dist/boilerplates/@batijs/kysely/files/vite-plugin-input.ts +28 -0
- package/dist/boilerplates/@batijs/kysely/types/vite-plugin-input.d.mts +17 -0
- package/dist/boilerplates/@batijs/mantine/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/netlify/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/oxlint/bati.config.mjs +7 -4
- package/dist/boilerplates/@batijs/plausible.io/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/pnpm/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/pnpm/files/$pnpm-workspace.yaml.js +20 -13
- package/dist/boilerplates/@batijs/prettier/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/prisma/bati.config.mjs +13 -1
- package/dist/boilerplates/@batijs/react/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/react-sentry/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/sentry/bati.config.mjs +13 -1
- package/dist/boilerplates/@batijs/shadcn-ui/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/shadcn-ui/files/$package.json.js +2 -3
- package/dist/boilerplates/@batijs/shared/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/shared/files/$.env.js +31 -0
- package/dist/boilerplates/@batijs/shared/files/$package.json.js +23 -0
- package/dist/boilerplates/@batijs/shared/files/asset-env.mjs +24 -0
- package/dist/boilerplates/@batijs/shared-db/bati.config.mjs +17 -4
- package/dist/boilerplates/@batijs/shared-server/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/shared-todo/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/solid/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/solid-sentry/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/sqlite/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/sqlite/files/$package.json.js +2 -2
- package/dist/boilerplates/@batijs/storybook/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/storybook/files/$package.json.js +9 -0
- package/dist/boilerplates/@batijs/storybook/files/asset-package.json.mjs +24 -0
- package/dist/boilerplates/@batijs/tailwindcss/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/telefunc/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/trpc/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/ts-rest/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/universal-deploy/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/universal-deploy/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/vercel/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/vercel/files/$package.json.js +1 -1
- package/dist/boilerplates/@batijs/vue/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/vue-sentry/bati.config.mjs +1 -1
- package/dist/boilerplates/@batijs/vue-sentry/files/$package.json.js +1 -1
- package/dist/boilerplates/boilerplates.json +14 -3
- package/dist/index.js +15 -7
- package/package.json +3 -3
- package/dist/boilerplates/@batijs/auth0/files/$.env.js +0 -17
- package/dist/boilerplates/@batijs/auth0/files/$wrangler.jsonc.js +0 -18
- package/dist/boilerplates/@batijs/drizzle/files/$.env.js +0 -10
- package/dist/boilerplates/@batijs/google-analytics/files/$.env.js +0 -11
- package/dist/boilerplates/@batijs/kysely/files/$.env.js +0 -10
- package/dist/boilerplates/@batijs/prisma/files/$.env.js +0 -15
- package/dist/boilerplates/@batijs/sentry/files/$.env.js +0 -13
- package/dist/boilerplates/@batijs/shared/files/package.json +0 -15
- package/dist/boilerplates/@batijs/sqlite/files/$.env.js +0 -10
- /package/dist/{asset-package.json-BdZNR8Cf.js → asset-package2.json-BdZNR8Cf.js} +0 -0
- /package/dist/{asset-package.json-CGHsBMPO.js → asset-package2.json-CGHsBMPO.js} +0 -0
- /package/dist/{asset-package.json-JaXo-ozU.js → asset-package2.json-JaXo-ozU.js} +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { committedValue, secretDevValue } from "@batijs/core";
|
|
4
|
+
//#region ../../boilerplates/shared/dist/files/asset-env.mjs
|
|
5
|
+
/**
|
|
6
|
+
* Render the whole `.env` from the registry. Returns `undefined` when no var
|
|
7
|
+
* targets `.env`, so the caller writes no (empty) file.
|
|
8
|
+
*/
|
|
9
|
+
function renderDotenv(registry, meta) {
|
|
10
|
+
let content;
|
|
11
|
+
for (const def of registry) {
|
|
12
|
+
if (def.scope !== "public" && !meta.BATI.hasDotEnvSecrets) continue;
|
|
13
|
+
content = appendEntry(content, def.key, dotenvValue(def), def.comment);
|
|
14
|
+
}
|
|
15
|
+
return content;
|
|
16
|
+
}
|
|
17
|
+
function dotenvValue(def) {
|
|
18
|
+
return def.scope === "secret" ? secretDevValue(def) : committedValue(def, "dotenv");
|
|
19
|
+
}
|
|
20
|
+
function appendEntry(content, key, value, comment) {
|
|
21
|
+
const blank = content ? "\n" : "";
|
|
22
|
+
const comments = comment ? `${comment.replace(/^(.+)/gm, "# $1")}\n` : "";
|
|
23
|
+
return `${content ?? ""}${blank}${comments}${key}=${value ? JSON.stringify(value) : ""}\n`;
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region ../../boilerplates/shared/dist/files/$.env.mjs
|
|
27
|
+
function getEnv(props) {
|
|
28
|
+
return renderDotenv(props.env, props.meta);
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { getEnv as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
//#region ../../boilerplates/shared/dist/files/$package.json.mjs
|
|
4
|
+
async function getPackageJson(props) {
|
|
5
|
+
const split = props.target.split(/[\\/]/);
|
|
6
|
+
split.pop();
|
|
7
|
+
return {
|
|
8
|
+
name: split.pop(),
|
|
9
|
+
scripts: {
|
|
10
|
+
dev: "vike dev",
|
|
11
|
+
build: "vike build",
|
|
12
|
+
preview: "vike build && vike preview"
|
|
13
|
+
},
|
|
14
|
+
dependencies: { vike: "0.4.259" },
|
|
15
|
+
devDependencies: {
|
|
16
|
+
typescript: "^6.0.3",
|
|
17
|
+
vite: "^8.0.13"
|
|
18
|
+
},
|
|
19
|
+
type: "module"
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { getPackageJson as default };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { committedValue, secretDevValue } from "@batijs/core";
|
|
2
|
+
//#region env.ts
|
|
3
|
+
/**
|
|
4
|
+
* Render the whole `.env` from the registry. Returns `undefined` when no var
|
|
5
|
+
* targets `.env`, so the caller writes no (empty) file.
|
|
6
|
+
*/
|
|
7
|
+
function renderDotenv(registry, meta) {
|
|
8
|
+
let content;
|
|
9
|
+
for (const def of registry) {
|
|
10
|
+
if (def.scope !== "public" && !meta.BATI.hasDotEnvSecrets) continue;
|
|
11
|
+
content = appendEntry(content, def.key, dotenvValue(def), def.comment);
|
|
12
|
+
}
|
|
13
|
+
return content;
|
|
14
|
+
}
|
|
15
|
+
function dotenvValue(def) {
|
|
16
|
+
return def.scope === "secret" ? secretDevValue(def) : committedValue(def, "dotenv");
|
|
17
|
+
}
|
|
18
|
+
function appendEntry(content, key, value, comment) {
|
|
19
|
+
const blank = content ? "\n" : "";
|
|
20
|
+
const comments = comment ? `${comment.replace(/^(.+)/gm, "# $1")}\n` : "";
|
|
21
|
+
return `${content ?? ""}${blank}${comments}${key}=${value ? JSON.stringify(value) : ""}\n`;
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { renderDotenv };
|
|
@@ -3,12 +3,25 @@ function e(e, t) {
|
|
|
3
3
|
if (!e) throw Error(t);
|
|
4
4
|
}
|
|
5
5
|
function t(t) {
|
|
6
|
-
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), t;
|
|
6
|
+
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), t;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region bati.config.ts
|
|
10
|
-
var bati_config_default = t({
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
var bati_config_default = t({
|
|
11
|
+
if(meta) {
|
|
12
|
+
return meta.BATI.hasDatabase;
|
|
13
|
+
},
|
|
14
|
+
env: (meta) => meta.BATI.hasD1 ? [] : [{
|
|
15
|
+
key: "DATABASE_URL",
|
|
16
|
+
scope: "server-default",
|
|
17
|
+
comment: "Path to the database",
|
|
18
|
+
default: "sqlite.db",
|
|
19
|
+
perSink: {
|
|
20
|
+
compose: "/app/data/db.sqlite",
|
|
21
|
+
dockerfile: "/app/database/sqlite.db"
|
|
22
|
+
},
|
|
23
|
+
group: "non-D1 database"
|
|
24
|
+
}]
|
|
25
|
+
});
|
|
13
26
|
//#endregion
|
|
14
27
|
export { bati_config_default as default };
|
|
@@ -3,7 +3,7 @@ function e(e, t) {
|
|
|
3
3
|
if (!e) throw Error(t);
|
|
4
4
|
}
|
|
5
5
|
function t(t) {
|
|
6
|
-
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), t;
|
|
6
|
+
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), t;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region bati.config.ts
|
|
@@ -3,7 +3,7 @@ function e(e, t) {
|
|
|
3
3
|
if (!e) throw Error(t);
|
|
4
4
|
}
|
|
5
5
|
function t(t) {
|
|
6
|
-
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), t;
|
|
6
|
+
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), t;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region bati.config.ts
|
|
@@ -3,7 +3,7 @@ function e(e, t) {
|
|
|
3
3
|
if (!e) throw Error(t);
|
|
4
4
|
}
|
|
5
5
|
function t(t) {
|
|
6
|
-
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), t;
|
|
6
|
+
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), t;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region bati.config.ts
|
|
@@ -3,7 +3,7 @@ function e(e, t) {
|
|
|
3
3
|
if (!e) throw Error(t);
|
|
4
4
|
}
|
|
5
5
|
function t(t) {
|
|
6
|
-
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), t;
|
|
6
|
+
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), t;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region bati.config.ts
|
|
@@ -3,7 +3,7 @@ function e(e, t) {
|
|
|
3
3
|
if (!e) throw Error(t);
|
|
4
4
|
}
|
|
5
5
|
function t(t) {
|
|
6
|
-
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), t;
|
|
6
|
+
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), t;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region bati.config.ts
|
|
@@ -4,9 +4,9 @@ import { loadPackageJson } from "@batijs/core";
|
|
|
4
4
|
//#region ../../boilerplates/sqlite/dist/files/$package.json.mjs
|
|
5
5
|
async function getPackageJson(props) {
|
|
6
6
|
return (await loadPackageJson(props, await import("../../../../asset-package.json-Cx9SXQz5.js").then((x) => x.default))).setScript("sqlite:migrate", {
|
|
7
|
-
value:
|
|
7
|
+
value: `tsx ./database/sqlite/schema/all.ts`,
|
|
8
8
|
precedence: 1
|
|
9
|
-
}).addDevDependencies(["@types/better-sqlite3"]).addDevDependencies(["tsx"], ["sqlite:migrate"]).addDependencies(["
|
|
9
|
+
}).addDevDependencies(["@types/better-sqlite3"]).addDependencies(["better-sqlite3"]).addDevDependencies(["tsx"], ["sqlite:migrate"]).addDependencies(["dotenv"]);
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
12
12
|
export { getPackageJson as default };
|
|
@@ -3,7 +3,7 @@ function e(e, t) {
|
|
|
3
3
|
if (!e) throw Error(t);
|
|
4
4
|
}
|
|
5
5
|
function t(t) {
|
|
6
|
-
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), t;
|
|
6
|
+
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), t;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region bati.config.ts
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { loadPackageJson } from "@batijs/core";
|
|
4
|
+
//#region ../../boilerplates/storybook/dist/files/$package.json.mjs
|
|
5
|
+
async function getPackageJson(props) {
|
|
6
|
+
return (await loadPackageJson(props, await import("../../../../asset-package.json-DKULIe-Z.js").then((x) => x.default))).addDevDependencies(["@types/node"]);
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { getPackageJson as default };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//#region package.json
|
|
2
|
+
var package_default = {
|
|
3
|
+
name: "@batijs/storybook",
|
|
4
|
+
"private": true,
|
|
5
|
+
version: "0.0.1",
|
|
6
|
+
description: "",
|
|
7
|
+
type: "module",
|
|
8
|
+
scripts: {
|
|
9
|
+
"check-types": "tsc --noEmit",
|
|
10
|
+
"build": "bati-compile-boilerplate"
|
|
11
|
+
},
|
|
12
|
+
keywords: [],
|
|
13
|
+
author: "",
|
|
14
|
+
license: "MIT",
|
|
15
|
+
devDependencies: {
|
|
16
|
+
"@batijs/compile": "workspace:*",
|
|
17
|
+
"@batijs/core": "workspace:",
|
|
18
|
+
"@types/node": "^20.19.37"
|
|
19
|
+
},
|
|
20
|
+
files: ["dist/"],
|
|
21
|
+
nx: { "tags": ["type:boilerplate"] }
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { package_default as default };
|
|
@@ -3,7 +3,7 @@ function e(e, t) {
|
|
|
3
3
|
if (!e) throw Error(t);
|
|
4
4
|
}
|
|
5
5
|
function t(t) {
|
|
6
|
-
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), t;
|
|
6
|
+
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), t;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region bati.config.ts
|
|
@@ -3,7 +3,7 @@ function e(e, t) {
|
|
|
3
3
|
if (!e) throw Error(t);
|
|
4
4
|
}
|
|
5
5
|
function t(t) {
|
|
6
|
-
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), t;
|
|
6
|
+
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), t;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region bati.config.ts
|
|
@@ -3,7 +3,7 @@ function e(e, t) {
|
|
|
3
3
|
if (!e) throw Error(t);
|
|
4
4
|
}
|
|
5
5
|
function t(t) {
|
|
6
|
-
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), t;
|
|
6
|
+
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), t;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region bati.config.ts
|
|
@@ -3,7 +3,7 @@ function e(e, t) {
|
|
|
3
3
|
if (!e) throw Error(t);
|
|
4
4
|
}
|
|
5
5
|
function t(t) {
|
|
6
|
-
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), t;
|
|
6
|
+
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), t;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region bati.config.ts
|
|
@@ -3,7 +3,7 @@ function e(e, t) {
|
|
|
3
3
|
if (!e) throw Error(t);
|
|
4
4
|
}
|
|
5
5
|
function t(t) {
|
|
6
|
-
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), t;
|
|
6
|
+
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), t;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region bati.config.ts
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { loadPackageJson } from "@batijs/core";
|
|
4
4
|
//#region ../../boilerplates/universal-deploy/dist/files/$package.json.mjs
|
|
5
5
|
async function getPackageJson(props) {
|
|
6
|
-
return (await loadPackageJson(props, await import("../../../../asset-
|
|
6
|
+
return (await loadPackageJson(props, await import("../../../../asset-package2.json-BdZNR8Cf.js").then((x) => x.default))).setScript("dev", {
|
|
7
7
|
value: "vike dev",
|
|
8
8
|
precedence: 20,
|
|
9
9
|
warnIfReplaced: true
|
|
@@ -3,7 +3,7 @@ function e(e, t) {
|
|
|
3
3
|
if (!e) throw Error(t);
|
|
4
4
|
}
|
|
5
5
|
function t(t) {
|
|
6
|
-
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), t;
|
|
6
|
+
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), t;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region bati.config.ts
|
|
@@ -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-
|
|
6
|
+
return (await loadPackageJson(props, await import("../../../../asset-package2.json-JaXo-ozU.js").then((x) => x.default))).removeScript("prod").addDevDependencies(["vite-plugin-vercel"]);
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
export { getPackageJson as default };
|
|
@@ -3,7 +3,7 @@ function e(e, t) {
|
|
|
3
3
|
if (!e) throw Error(t);
|
|
4
4
|
}
|
|
5
5
|
function t(t) {
|
|
6
|
-
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), t;
|
|
6
|
+
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), t;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region bati.config.ts
|
|
@@ -3,7 +3,7 @@ function e(e, t) {
|
|
|
3
3
|
if (!e) throw Error(t);
|
|
4
4
|
}
|
|
5
5
|
function t(t) {
|
|
6
|
-
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), t;
|
|
6
|
+
return `enforce` in t && e(t.enforce === `pre` || t.enforce === `post`, `'enforce' must be 'pre' or 'post', was ${t.enforce}`), `if` in t && e(typeof t.if == `function`, `'if' must be a function`), `nextSteps` in t && e(typeof t.nextSteps == `function`, `'nextSteps' must be a function`), `knip` in t && (e(typeof t.knip == `object` && t.knip !== null, `'knip' must be an object`), `entry` in t.knip && e(Array.isArray(t.knip.entry), `'knip.entry' must be an array`), `ignoreDependencies` in t.knip && e(Array.isArray(t.knip.ignoreDependencies), `'knip.ignoreDependencies' must be an array`), `ignore` in t.knip && e(Array.isArray(t.knip.ignore), `'knip.ignore' must be an array`), `vite` in t.knip && e(typeof t.knip.vite == `boolean`, `'knip.vite' must be a boolean`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), t;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region bati.config.ts
|
|
@@ -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-
|
|
6
|
+
return (await loadPackageJson(props, await import("../../../../asset-package2.json-CGHsBMPO.js").then((x) => x.default))).addDependencies(["@sentry/vue"]);
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
9
|
export { getPackageJson as default };
|
|
@@ -53,6 +53,18 @@
|
|
|
53
53
|
"files"
|
|
54
54
|
]
|
|
55
55
|
},
|
|
56
|
+
{
|
|
57
|
+
"folder": "@batijs/docker-compose",
|
|
58
|
+
"subfolders": [
|
|
59
|
+
"files"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"folder": "@batijs/dokploy",
|
|
64
|
+
"subfolders": [
|
|
65
|
+
"files"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
56
68
|
{
|
|
57
69
|
"folder": "@batijs/drizzle",
|
|
58
70
|
"subfolders": [
|
|
@@ -85,9 +97,7 @@
|
|
|
85
97
|
},
|
|
86
98
|
{
|
|
87
99
|
"folder": "@batijs/google-analytics",
|
|
88
|
-
"subfolders": [
|
|
89
|
-
"files"
|
|
90
|
-
]
|
|
100
|
+
"subfolders": []
|
|
91
101
|
},
|
|
92
102
|
{
|
|
93
103
|
"folder": "@batijs/h3",
|
|
@@ -219,6 +229,7 @@
|
|
|
219
229
|
{
|
|
220
230
|
"folder": "@batijs/storybook",
|
|
221
231
|
"subfolders": [
|
|
232
|
+
"files",
|
|
222
233
|
"hooks"
|
|
223
234
|
]
|
|
224
235
|
},
|
package/dist/index.js
CHANGED
|
@@ -154,7 +154,9 @@ async function transformFileAfterExec(filepath, fileContent) {
|
|
|
154
154
|
case ".env.production.local":
|
|
155
155
|
case ".html":
|
|
156
156
|
case ".md":
|
|
157
|
-
case ".toml":
|
|
157
|
+
case ".toml":
|
|
158
|
+
case "Dockerfile":
|
|
159
|
+
case ".dockerignore": return fileContent;
|
|
158
160
|
case ".json":
|
|
159
161
|
case ".jsonc":
|
|
160
162
|
if (typeof fileContent === "string") return fileContent;
|
|
@@ -169,7 +171,7 @@ async function transformFileAfterExec(filepath, fileContent) {
|
|
|
169
171
|
async function importTransformer(p) {
|
|
170
172
|
return (await (isWin$1 ? import(`file://${p}`) : import(p))).default;
|
|
171
173
|
}
|
|
172
|
-
async function executeOperationTransform(op, { meta, previousOperationSameDestination, packageJson }) {
|
|
174
|
+
async function executeOperationTransform(op, { meta, previousOperationSameDestination, packageJson, env }) {
|
|
173
175
|
const transformer = await importTransformer(op.sourceAbsolute);
|
|
174
176
|
const previousContent = previousOperationSameDestination?.content;
|
|
175
177
|
const fileContent = await transformFileAfterExec(op.destination, await transformer({
|
|
@@ -177,7 +179,8 @@ async function executeOperationTransform(op, { meta, previousOperationSameDestin
|
|
|
177
179
|
meta,
|
|
178
180
|
source: op.source,
|
|
179
181
|
target: op.destination,
|
|
180
|
-
packageJson
|
|
182
|
+
packageJson,
|
|
183
|
+
env
|
|
181
184
|
}));
|
|
182
185
|
return { content: fileContent !== null ? fileContent : void 0 };
|
|
183
186
|
}
|
|
@@ -283,6 +286,7 @@ async function* walk(dir) {
|
|
|
283
286
|
}
|
|
284
287
|
async function main(options, meta) {
|
|
285
288
|
const sources = Array.isArray(options.source) ? options.source : [options.source];
|
|
289
|
+
const env = options.env ?? [];
|
|
286
290
|
function updateAllImports(target, imports, includeIfImported) {
|
|
287
291
|
const rf = new RelationFile(target, includeIfImported);
|
|
288
292
|
if (!imports) return;
|
|
@@ -333,7 +337,8 @@ Please report this issue to https://github.com/vikejs/bati`);
|
|
|
333
337
|
} else if (op.kind === "transform") report = await executeOperationTransform(op, {
|
|
334
338
|
meta,
|
|
335
339
|
previousOperationSameDestination: previousOp,
|
|
336
|
-
packageJson
|
|
340
|
+
packageJson,
|
|
341
|
+
env
|
|
337
342
|
});
|
|
338
343
|
if (report.content) {
|
|
339
344
|
await safeWriteFile(op.destination, report.content.trimStart());
|
|
@@ -2617,7 +2622,7 @@ function kebabCase(str, joiner) {
|
|
|
2617
2622
|
//#endregion
|
|
2618
2623
|
//#region package.json
|
|
2619
2624
|
var name = "@batijs/cli";
|
|
2620
|
-
var version = "0.0.
|
|
2625
|
+
var version = "0.0.631";
|
|
2621
2626
|
var description = "Next-gen scaffolder. Get started with fully-functional apps, and choose any tool you want";
|
|
2622
2627
|
//#endregion
|
|
2623
2628
|
//#region rules.ts
|
|
@@ -2638,6 +2643,7 @@ const rulesMessages = {
|
|
|
2638
2643
|
[RulesMessage.ERROR_COMPILED_R_REACT]: error(`${inverse(bold("React"))} is required when using ${inverse(bold("Compiled"))}`),
|
|
2639
2644
|
[RulesMessage.ERROR_MANTINE_R_REACT]: error(`${inverse(bold("React"))} is required when using ${inverse(bold("Mantine"))}`),
|
|
2640
2645
|
[RulesMessage.ERROR_DRIZZLE_R_SERVER]: error(`A ${inverse(bold("Server"))} is required when using ${inverse(bold("Drizzle"))}`),
|
|
2646
|
+
[RulesMessage.ERROR_SQLITE_R_SERVER]: error(`A ${inverse(bold("Server"))} is required when using ${inverse(bold("SQLite"))}`),
|
|
2641
2647
|
[RulesMessage.ERROR_KYSELY_R_SERVER]: error(`A ${inverse(bold("Server"))} is required when using ${inverse(bold("Kysely"))}`),
|
|
2642
2648
|
[RulesMessage.ERROR_DATA_R_SERVER]: error(`A ${inverse(bold("Server"))} is required when using ${inverse(bold("Data fetching"))}`),
|
|
2643
2649
|
[RulesMessage.ERROR_CLOUDFLARE_R_COMPAT_SERVER]: error(`${inverse(bold("Cloudflare"))} is only compatible with ${inverse(bold("Hono"))} or ${inverse(bold("H3"))}.
|
|
@@ -3003,7 +3009,7 @@ async function run() {
|
|
|
3003
3009
|
await checkFlagsIncludesUiFramework(flags);
|
|
3004
3010
|
checkRules(flags);
|
|
3005
3011
|
const meta = {
|
|
3006
|
-
BATI: new BatiSet(flags, features),
|
|
3012
|
+
BATI: new BatiSet(flags, features, pm.name),
|
|
3007
3013
|
BATI_TEST: Boolean(process.env.BATI_TEST),
|
|
3008
3014
|
BATI_SKIP_GIT: args["skip-git"],
|
|
3009
3015
|
BATI_IS_CI: Boolean(process.env.CI)
|
|
@@ -3021,9 +3027,11 @@ async function run() {
|
|
|
3021
3027
|
if (bl.subfolders.includes("hooks")) hooks.set(bl, join(dir, bl.folder, "hooks"));
|
|
3022
3028
|
}
|
|
3023
3029
|
const hooksMap = await retrieveHooks(hooks);
|
|
3030
|
+
const env = filteredBoilerplates.flatMap((b) => b.config.env?.(meta) ?? []);
|
|
3024
3031
|
await main({
|
|
3025
3032
|
source: sources,
|
|
3026
|
-
dist: args.project
|
|
3033
|
+
dist: args.project,
|
|
3034
|
+
env
|
|
3027
3035
|
}, meta);
|
|
3028
3036
|
for (const onafter of hooksMap.get("after") ?? []) await onafter(args.project, meta);
|
|
3029
3037
|
if (args.knip) await generateKnipConfig(args.project, filteredBoilerplates);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@batijs/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.631",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"description": "Next-gen scaffolder. Get started with fully-functional apps, and choose any tool you want",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"typescript": "^6.0.3",
|
|
21
21
|
"unplugin-purge-polyfills": "^0.1.0",
|
|
22
22
|
"vite": "^8.0.14",
|
|
23
|
-
"@batijs/
|
|
24
|
-
"@batijs/
|
|
23
|
+
"@batijs/build": "0.0.631",
|
|
24
|
+
"@batijs/compile": "0.0.631"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@batijs/core": "",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { appendToEnv } from "@batijs/core";
|
|
4
|
-
//#region ../../boilerplates/auth0/dist/files/$.env.mjs
|
|
5
|
-
async function getEnv(props) {
|
|
6
|
-
if (props.meta.BATI.has("cloudflare")) return;
|
|
7
|
-
const auth0ClientId = process.env.TEST_AUTH0_CLIENT_ID;
|
|
8
|
-
const auth0ClientSecret = process.env.TEST_AUTH0_CLIENT_SECRET;
|
|
9
|
-
const auth0BaseUrl = process.env.TEST_AUTH0_ISSUER_BASE_URL;
|
|
10
|
-
let envContent = await props.readfile?.();
|
|
11
|
-
envContent = appendToEnv(envContent, "AUTH0_CLIENT_ID", auth0ClientId ?? "", "Auth0 Client ID");
|
|
12
|
-
envContent = appendToEnv(envContent, "AUTH0_CLIENT_SECRET", auth0ClientSecret ?? "", "Auth0 Client Secret");
|
|
13
|
-
envContent = appendToEnv(envContent, "AUTH0_ISSUER_BASE_URL", auth0BaseUrl ?? "", "Auth0 base URL");
|
|
14
|
-
return envContent;
|
|
15
|
-
}
|
|
16
|
-
//#endregion
|
|
17
|
-
export { getEnv as default };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { loadAsJson } from "@batijs/core";
|
|
4
|
-
//#region ../../boilerplates/auth0/dist/files/$wrangler.jsonc.mjs
|
|
5
|
-
async function getEnv(props) {
|
|
6
|
-
if (!props.meta.BATI.has("cloudflare")) return;
|
|
7
|
-
const wrangler = await loadAsJson(props);
|
|
8
|
-
const auth0ClientId = process.env.TEST_AUTH0_CLIENT_ID;
|
|
9
|
-
const auth0ClientSecret = process.env.TEST_AUTH0_CLIENT_SECRET;
|
|
10
|
-
const auth0BaseUrl = process.env.TEST_AUTH0_ISSUER_BASE_URL;
|
|
11
|
-
wrangler.vars ??= {};
|
|
12
|
-
wrangler.vars.AUTH0_CLIENT_ID = auth0ClientId ?? "";
|
|
13
|
-
wrangler.vars.AUTH0_CLIENT_SECRET = auth0ClientSecret ?? "";
|
|
14
|
-
wrangler.vars.AUTH0_ISSUER_BASE_URL = auth0BaseUrl ?? "";
|
|
15
|
-
return wrangler;
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
18
|
-
export { getEnv as default };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { appendToEnv } from "@batijs/core";
|
|
4
|
-
//#region ../../boilerplates/drizzle/dist/files/$.env.mjs
|
|
5
|
-
async function getEnv(props) {
|
|
6
|
-
if (props.meta.BATI.hasD1) return;
|
|
7
|
-
return appendToEnv(await props.readfile?.(), "DATABASE_URL", "sqlite.db", "Path to the sqlite database");
|
|
8
|
-
}
|
|
9
|
-
//#endregion
|
|
10
|
-
export { getEnv as default };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { appendToEnv } from "@batijs/core";
|
|
4
|
-
//#region ../../boilerplates/google-analytics/dist/files/$.env.mjs
|
|
5
|
-
async function getEnv(props) {
|
|
6
|
-
return appendToEnv(await props.readfile?.(), "PUBLIC_ENV__GOOGLE_ANALYTICS", "G-XXXXXXXXXX", `Google Analytics
|
|
7
|
-
|
|
8
|
-
See the documentation https://support.google.com/analytics/answer/9304153?hl=en#zippy=%2Cweb`);
|
|
9
|
-
}
|
|
10
|
-
//#endregion
|
|
11
|
-
export { getEnv as default };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { appendToEnv } from "@batijs/core";
|
|
4
|
-
//#region ../../boilerplates/kysely/dist/files/$.env.mjs
|
|
5
|
-
async function getEnv(props) {
|
|
6
|
-
if (props.meta.BATI.hasD1) return;
|
|
7
|
-
return appendToEnv(await props.readfile?.(), "DATABASE_URL", "sqlite.db", "Path to the sqlite database");
|
|
8
|
-
}
|
|
9
|
-
//#endregion
|
|
10
|
-
export { getEnv as default };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { appendToEnv } from "@batijs/core";
|
|
4
|
-
//#region ../../boilerplates/prisma/dist/files/$.env.mjs
|
|
5
|
-
async function getEnv(props) {
|
|
6
|
-
return appendToEnv(await props.readfile?.(), "DATABASE_URL", "postgresql://johndoe:randompassword@localhost:5432/mydb?schema=public", `Prisma
|
|
7
|
-
|
|
8
|
-
Environment variables declared in this file are automatically made available to Prisma.
|
|
9
|
-
See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema
|
|
10
|
-
|
|
11
|
-
Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
|
|
12
|
-
See the documentation for all the connection string options: https://pris.ly/d/connection-strings`);
|
|
13
|
-
}
|
|
14
|
-
//#endregion
|
|
15
|
-
export { getEnv as default };
|