@batijs/cli 0.0.653 → 0.0.654

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.
Files changed (77) hide show
  1. package/dist/{asset-package.json-Si0Lg6sw.js → asset-package.json-B9hqkASo.js} +1 -1
  2. package/dist/{asset-package.json-Cr9kL--9.js → asset-package.json-BTRRukgq.js} +1 -1
  3. package/dist/{asset-package.json-CK8Focys.js → asset-package.json-D0F4ITHn.js} +1 -1
  4. package/dist/{asset-package.json-DP7v-FYq.js → asset-package.json-DbnTcIM5.js} +1 -1
  5. package/dist/boilerplates/@batijs/auth0/bati.config.mjs +1 -1
  6. package/dist/boilerplates/@batijs/authjs/bati.config.mjs +16 -2
  7. package/dist/boilerplates/@batijs/aws/bati.config.mjs +13 -1
  8. package/dist/boilerplates/@batijs/better-auth/bati.config.mjs +17 -2
  9. package/dist/boilerplates/@batijs/biome/bati.config.mjs +16 -2
  10. package/dist/boilerplates/@batijs/cloudflare/bati.config.mjs +15 -1
  11. package/dist/boilerplates/@batijs/compiled/bati.config.mjs +13 -1
  12. package/dist/boilerplates/@batijs/compiled/files/$package.json.js +1 -1
  13. package/dist/boilerplates/@batijs/compiled/files/asset-package.json.mjs +1 -1
  14. package/dist/boilerplates/@batijs/d1/bati.config.mjs +1 -1
  15. package/dist/boilerplates/@batijs/d1-kysely/bati.config.mjs +1 -1
  16. package/dist/boilerplates/@batijs/d1-sqlite/bati.config.mjs +18 -4
  17. package/dist/boilerplates/@batijs/docker-compose/bati.config.mjs +14 -2
  18. package/dist/boilerplates/@batijs/dokploy/bati.config.mjs +14 -2
  19. package/dist/boilerplates/@batijs/drizzle/bati.config.mjs +17 -1
  20. package/dist/boilerplates/@batijs/edgeone/bati.config.mjs +14 -2
  21. package/dist/boilerplates/@batijs/elysia/bati.config.mjs +15 -2
  22. package/dist/boilerplates/@batijs/elysia/files/$package.json.js +1 -1
  23. package/dist/boilerplates/@batijs/elysia/files/asset-package.json.mjs +1 -1
  24. package/dist/boilerplates/@batijs/eslint/bati.config.mjs +14 -2
  25. package/dist/boilerplates/@batijs/express/bati.config.mjs +15 -2
  26. package/dist/boilerplates/@batijs/express/files/$package.json.js +1 -1
  27. package/dist/boilerplates/@batijs/express/files/asset-package.json.mjs +1 -1
  28. package/dist/boilerplates/@batijs/fastify/bati.config.mjs +15 -2
  29. package/dist/boilerplates/@batijs/fastify/files/$package.json.js +1 -1
  30. package/dist/boilerplates/@batijs/fastify/files/asset-package.json.mjs +1 -1
  31. package/dist/boilerplates/@batijs/google-analytics/bati.config.mjs +14 -2
  32. package/dist/boilerplates/@batijs/hono/bati.config.mjs +15 -2
  33. package/dist/boilerplates/@batijs/hono/files/$package.json.js +1 -1
  34. package/dist/boilerplates/@batijs/hono/files/asset-package.json.mjs +1 -1
  35. package/dist/boilerplates/@batijs/kysely/bati.config.mjs +16 -2
  36. package/dist/boilerplates/@batijs/mantine/bati.config.mjs +14 -2
  37. package/dist/boilerplates/@batijs/netlify/bati.config.mjs +18 -4
  38. package/dist/boilerplates/@batijs/oxlint/bati.config.mjs +14 -2
  39. package/dist/boilerplates/@batijs/plausible.io/bati.config.mjs +18 -4
  40. package/dist/boilerplates/@batijs/pnpm/bati.config.mjs +1 -1
  41. package/dist/boilerplates/@batijs/postgres/bati.config.mjs +13 -1
  42. package/dist/boilerplates/@batijs/prettier/bati.config.mjs +14 -2
  43. package/dist/boilerplates/@batijs/prisma/bati.config.mjs +20 -2
  44. package/dist/boilerplates/@batijs/react/bati.config.mjs +14 -2
  45. package/dist/boilerplates/@batijs/react-better-auth/bati.config.mjs +1 -1
  46. package/dist/boilerplates/@batijs/react-sentry/bati.config.mjs +1 -1
  47. package/dist/boilerplates/@batijs/sentry/bati.config.mjs +14 -1
  48. package/dist/boilerplates/@batijs/shadcn-ui/bati.config.mjs +19 -4
  49. package/dist/boilerplates/@batijs/shared/bati.config.mjs +94 -1
  50. package/dist/boilerplates/@batijs/shared-agents/bati.config.mjs +17 -0
  51. package/dist/boilerplates/@batijs/shared-agents/hooks/after.mjs +15 -0
  52. package/dist/boilerplates/@batijs/shared-agents/hooks/asset-boilerplates/shared-agents/agents-md.mjs +70 -0
  53. package/dist/boilerplates/@batijs/shared-agents/hooks/asset-boilerplates/shared-agents/compose.mjs +44 -0
  54. package/dist/boilerplates/@batijs/shared-agents/hooks/asset-packages/features/dist/features-CStxEDu3.mjs +690 -0
  55. package/dist/boilerplates/@batijs/shared-agents/hooks/asset-packages/features/dist/index.mjs +160 -0
  56. package/dist/boilerplates/@batijs/shared-db/bati.config.mjs +1 -1
  57. package/dist/boilerplates/@batijs/shared-env/bati.config.mjs +1 -1
  58. package/dist/boilerplates/@batijs/shared-server/bati.config.mjs +1 -1
  59. package/dist/boilerplates/@batijs/shared-todo/bati.config.mjs +1 -1
  60. package/dist/boilerplates/@batijs/solid/bati.config.mjs +18 -4
  61. package/dist/boilerplates/@batijs/solid-better-auth/bati.config.mjs +1 -1
  62. package/dist/boilerplates/@batijs/solid-sentry/bati.config.mjs +1 -1
  63. package/dist/boilerplates/@batijs/sqlite/bati.config.mjs +13 -1
  64. package/dist/boilerplates/@batijs/storybook/bati.config.mjs +14 -2
  65. package/dist/boilerplates/@batijs/tailwindcss/bati.config.mjs +27 -2
  66. package/dist/boilerplates/@batijs/telefunc/bati.config.mjs +20 -4
  67. package/dist/boilerplates/@batijs/trpc/bati.config.mjs +19 -4
  68. package/dist/boilerplates/@batijs/ts-rest/bati.config.mjs +14 -2
  69. package/dist/boilerplates/@batijs/universal-deploy/bati.config.mjs +21 -4
  70. package/dist/boilerplates/@batijs/vercel/bati.config.mjs +13 -1
  71. package/dist/boilerplates/@batijs/vue/bati.config.mjs +14 -2
  72. package/dist/boilerplates/@batijs/vue-better-auth/bati.config.mjs +1 -1
  73. package/dist/boilerplates/@batijs/vue-sentry/bati.config.mjs +1 -1
  74. package/dist/boilerplates/boilerplates.json +6 -0
  75. package/dist/index.js +6 -2
  76. package/package.json +5 -5
  77. package/dist/{asset-package.json-uf2g2h8M.js → asset-package.json-C5reKTg3.js} +1 -1
@@ -3,7 +3,7 @@
3
3
  import { loadPackageJson } from "@batijs/core";
4
4
  //#region ../../boilerplates/express/dist/files/$package.json.mjs
5
5
  async function getPackageJson(props) {
6
- return (await loadPackageJson(props, await import("../../../../asset-package.json-Cr9kL--9.js").then((x) => x.default))).addDevDependencies([
6
+ return (await loadPackageJson(props, await import("../../../../asset-package.json-BTRRukgq.js").then((x) => x.default))).addDevDependencies([
7
7
  "@types/express",
8
8
  "@types/node",
9
9
  "vite"
@@ -27,7 +27,7 @@ var package_default = {
27
27
  "@trpc/server": "^11.17.0",
28
28
  "@types/express": "^5.0.6",
29
29
  "@types/node": "^20.19.37",
30
- "@vikejs/express": "^0.2.2",
30
+ "@vikejs/express": "^0.2.3",
31
31
  "express": "^5.2.1",
32
32
  "telefunc": "^0.2.20",
33
33
  "vike": "0.4.259",
@@ -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`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), 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`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), `skills` in t && e(typeof t.skills == `function`, `'skills' must be a function of meta`), t;
7
7
  }
8
8
  //#endregion
9
9
  //#region bati.config.ts
@@ -11,7 +11,20 @@ var bati_config_default = t({
11
11
  if(meta) {
12
12
  return meta.BATI.has("fastify");
13
13
  },
14
- knip: { entry: ["+server.ts"] }
14
+ knip: { entry: ["+server.ts"] },
15
+ skills() {
16
+ return [{
17
+ name: "server",
18
+ description: "How to add a server route or middleware in this Fastify + Vike app. Use when adding an API endpoint, middleware, or changing server behavior.",
19
+ body: `The server entry is \`+server.ts\`, which builds a Fastify \`app\` and mounts Vike with \`await vike(app, [...])\` (the array holds Universal Middlewares: db, auth, RPC handlers). The \`fastify-raw-body\` plugin is registered so middlewares can read the request body.
20
+
21
+ - **Add an API route:** register it on the Fastify \`app\` before the \`vike(app, …)\` call, e.g. \`app.get("/api/hello", () => ({ ok: true }))\`, or \`app.register(myPlugin)\`.
22
+ - **Add middleware:** push a Universal Middleware handler into the \`vike(app, [...])\` array to share Vike's \`context\`.
23
+ - \`PORT\` is read from the environment.
24
+
25
+ See https://vike.dev/server and https://fastify.dev.`
26
+ }];
27
+ }
15
28
  });
16
29
  //#endregion
17
30
  export { bati_config_default as default };
@@ -3,7 +3,7 @@
3
3
  import { loadPackageJson } from "@batijs/core";
4
4
  //#region ../../boilerplates/fastify/dist/files/$package.json.mjs
5
5
  async function getPackageJson(props) {
6
- return (await loadPackageJson(props, await import("../../../../asset-package.json-Si0Lg6sw.js").then((x) => x.default))).addDevDependencies(["@types/node", "vite"]).addDependencies([
6
+ return (await loadPackageJson(props, await import("../../../../asset-package.json-B9hqkASo.js").then((x) => x.default))).addDevDependencies(["@types/node", "vite"]).addDependencies([
7
7
  "@vikejs/fastify",
8
8
  "fastify",
9
9
  "fastify-raw-body",
@@ -27,7 +27,7 @@ var package_default = {
27
27
  "@trpc/server": "^11.17.0",
28
28
  "@types/express": "^5.0.6",
29
29
  "@types/node": "^20.19.37",
30
- "@vikejs/fastify": "^0.2.4",
30
+ "@vikejs/fastify": "^0.2.5",
31
31
  "fastify": "^5.8.5",
32
32
  "fastify-raw-body": "^5.0.0",
33
33
  "telefunc": "^0.2.20",
@@ -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`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), 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`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), `skills` in t && e(typeof t.skills == `function`, `'skills' must be a function of meta`), t;
7
7
  }
8
8
  //#endregion
9
9
  //#region bati.config.ts
@@ -18,7 +18,19 @@ var bati_config_default = t({
18
18
  comment: `Google Analytics
19
19
 
20
20
  See the documentation https://support.google.com/analytics/answer/9304153?hl=en#zippy=%2Cweb`
21
- }]
21
+ }],
22
+ skills() {
23
+ return [{
24
+ name: "analytics",
25
+ description: "How analytics works in this app (Google Analytics). Use when configuring analytics or tracking events.",
26
+ body: `Google Analytics (gtag). The tag is injected in \`pages/+Head.*\` and reads \`PUBLIC_ENV__GOOGLE_ANALYTICS\`.
27
+
28
+ - **Configure:** set \`PUBLIC_ENV__GOOGLE_ANALYTICS\` (your \`G-XXXX\` measurement ID) in \`.env\`.
29
+ - **Track events:** call \`gtag("event", "<name>", { ... })\` in the browser.
30
+
31
+ See https://developers.google.com/analytics.`
32
+ }];
33
+ }
22
34
  });
23
35
  //#endregion
24
36
  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`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), 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`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), `skills` in t && e(typeof t.skills == `function`, `'skills' must be a function of meta`), t;
7
7
  }
8
8
  //#endregion
9
9
  //#region bati.config.ts
@@ -11,7 +11,20 @@ var bati_config_default = t({
11
11
  if(meta) {
12
12
  return meta.BATI.has("hono");
13
13
  },
14
- knip: { entry: ["+server.ts"] }
14
+ knip: { entry: ["+server.ts"] },
15
+ skills() {
16
+ return [{
17
+ name: "server",
18
+ description: "How to add a server route or middleware in this Hono + Vike app. Use when adding an API endpoint, middleware, or changing server behavior.",
19
+ body: `The server entry is \`+server.ts\` (it exports a Vike \`Server\`). The Hono \`app\` is built in \`server/hono.ts\`, where \`vike(app, [...])\` mounts Vike as the catch-all and the array holds Universal Middlewares (db, auth, RPC handlers).
20
+
21
+ - **Add an API route:** register it on the Hono \`app\` in \`server/hono.ts\`, e.g. \`app.get("/api/hello", (c) => c.json({ ok: true }))\`.
22
+ - **Add middleware:** use \`app.use(...)\`, or push a Universal Middleware handler into the \`vike(app, [...])\` array to share Vike's \`context\`.
23
+ - \`PORT\` is read from the environment.
24
+
25
+ See https://vike.dev/server and https://hono.dev.`
26
+ }];
27
+ }
15
28
  });
16
29
  //#endregion
17
30
  export { bati_config_default as default };
@@ -3,7 +3,7 @@
3
3
  import { loadPackageJson } from "@batijs/core";
4
4
  //#region ../../boilerplates/hono/dist/files/$package.json.mjs
5
5
  async function getPackageJson(props) {
6
- return (await loadPackageJson(props, await import("../../../../asset-package.json-DP7v-FYq.js").then((x) => x.default))).addDevDependencies(["@types/node", "vite"]).addDevDependencies(["@types/aws-lambda"], props.meta.BATI.has("aws")).addDependencies([
6
+ return (await loadPackageJson(props, await import("../../../../asset-package.json-DbnTcIM5.js").then((x) => x.default))).addDevDependencies(["@types/node", "vite"]).addDevDependencies(["@types/aws-lambda"], props.meta.BATI.has("aws")).addDependencies([
7
7
  "@vikejs/hono",
8
8
  "hono",
9
9
  "vike"
@@ -27,7 +27,7 @@ var package_default = {
27
27
  "@trpc/server": "^11.17.0",
28
28
  "@types/aws-lambda": "^8.10.162",
29
29
  "@types/node": "^20.19.37",
30
- "@vikejs/hono": "^0.2.0",
30
+ "@vikejs/hono": "^0.2.1",
31
31
  "hono": "^4.12.25",
32
32
  "telefunc": "^0.2.20",
33
33
  "vike": "0.4.259",
@@ -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`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), 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`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), `skills` in t && e(typeof t.skills == `function`, `'skills' must be a function of meta`), t;
7
7
  }
8
8
  //#endregion
9
9
  //#region bati.config.ts
@@ -22,7 +22,21 @@ var bati_config_default = t({
22
22
  step: `${packageManager} kysely:migrate`
23
23
  }];
24
24
  },
25
- knip: { entry: ["database/kysely/migrations/*.ts"] }
25
+ knip: { entry: ["database/kysely/migrations/*.ts"] },
26
+ skills(meta) {
27
+ const run = meta.BATI.pmRun;
28
+ return [{
29
+ name: "kysely",
30
+ description: "How to work with the database via the Kysely query builder in this app. Use when adding a table, writing a query, or running a migration.",
31
+ body: `Kysely query builder on ${meta.BATI.has("postgres") ? "PostgreSQL" : meta.BATI.hasD1 ? "Cloudflare D1 (SQLite)" : "SQLite"}. Typed DB interface in \`database/kysely/types.ts\`, queries in \`database/kysely/queries/\`, connection in \`database/kysely/db.ts\`. Migrations are hand-written in \`database/kysely/migrations/\`.
32
+
33
+ - **Add a table:** add a migration file in \`database/kysely/migrations/\` (e.g. \`002_*.ts\`) exporting \`up\`/\`down\`, and add the table to the \`Database\` interface in \`database/kysely/types.ts\`.
34
+ - **Run migrations:** \`${meta.BATI.hasD1 ? "wrangler d1 migrations apply MY_VIKE_DEMO_DATABASE --local" : `${run} kysely:migrate`}\`.
35
+ - **Write queries:** add functions in \`database/kysely/queries/\` using the typed \`db\`; on the server it's available as \`context.db\`.
36
+
37
+ See https://kysely.dev.`
38
+ }];
39
+ }
26
40
  });
27
41
  //#endregion
28
42
  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`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), 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`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), `skills` in t && e(typeof t.skills == `function`, `'skills' must be a function of meta`), t;
7
7
  }
8
8
  //#endregion
9
9
  //#region bati.config.ts
@@ -12,7 +12,19 @@ var bati_config_default = t({
12
12
  if(meta) {
13
13
  return meta.BATI.has("mantine") && meta.BATI.has("react");
14
14
  },
15
- knip: { ignoreDependencies: ["postcss"] }
15
+ knip: { ignoreDependencies: ["postcss"] },
16
+ skills() {
17
+ return [{
18
+ name: "mantine",
19
+ description: "How to use Mantine components in this app. Use when building UI with Mantine.",
20
+ body: `Mantine (React). \`MantineProvider\` wraps the app in \`pages/+Layout.tsx\`; global styles are in \`pages/Layout.css\`; PostCSS is set up in \`postcss.config.cjs\`.
21
+
22
+ - **Use a component:** import from \`@mantine/core\` (or another \`@mantine/*\` package) and render it inside the provider.
23
+ - **Theme:** pass a theme to \`MantineProvider\` in \`pages/+Layout.tsx\`.
24
+
25
+ See https://mantine.dev.`
26
+ }];
27
+ }
16
28
  });
17
29
  //#endregion
18
30
  export { bati_config_default as default };
@@ -3,12 +3,26 @@ 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`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), 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`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), `skills` in t && e(typeof t.skills == `function`, `'skills' must be a function of meta`), t;
7
7
  }
8
8
  //#endregion
9
9
  //#region bati.config.ts
10
- var bati_config_default = t({ if(meta) {
11
- return meta.BATI.has("netlify");
12
- } });
10
+ var bati_config_default = t({
11
+ if(meta) {
12
+ return meta.BATI.has("netlify");
13
+ },
14
+ skills(meta) {
15
+ return [{
16
+ name: "deploy",
17
+ description: "How to deploy this app to Netlify. Use when deploying or managing environment variables.",
18
+ body: `Deploys to Netlify.
19
+
20
+ - **Deploy:** push to a Netlify-connected Git repo, or run \`netlify deploy\` (Netlify CLI). \`${meta.BATI.pmRun} build\` builds locally.
21
+ - **Env vars:** set them in the Netlify dashboard (Site settings → Environment variables); locally they're in \`.env\`.
22
+
23
+ See https://docs.netlify.com and \`TODO.md\`.`
24
+ }];
25
+ }
26
+ });
13
27
  //#endregion
14
28
  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`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), 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`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), `skills` in t && e(typeof t.skills == `function`, `'skills' must be a function of meta`), t;
7
7
  }
8
8
  //#endregion
9
9
  //#region bati.config.ts
@@ -11,7 +11,19 @@ var bati_config_default = t({
11
11
  if(meta) {
12
12
  return meta.BATI.has("oxlint");
13
13
  },
14
- knip: { ignoreDependencies: ["oxlint", "oxlint-tsgolint"] }
14
+ knip: { ignoreDependencies: ["oxlint", "oxlint-tsgolint"] },
15
+ skills(meta) {
16
+ return [{
17
+ name: "oxlint",
18
+ description: "How linting works in this app (Oxlint). Use when running the linter or adjusting lint rules.",
19
+ body: `Oxlint — a fast Rust-based linter (config in \`.oxlintrc.json\`).
20
+
21
+ - **Lint:** \`${meta.BATI.pmRun} lint\` (\`oxlint --type-aware\`).
22
+ - **Rules:** edit \`.oxlintrc.json\`.
23
+
24
+ See https://oxc.rs/docs/guide/usage/linter.html.`
25
+ }];
26
+ }
15
27
  });
16
28
  //#endregion
17
29
  export { bati_config_default as default };
@@ -3,12 +3,26 @@ 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`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), 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`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), `skills` in t && e(typeof t.skills == `function`, `'skills' must be a function of meta`), t;
7
7
  }
8
8
  //#endregion
9
9
  //#region bati.config.ts
10
- var bati_config_default = t({ if(meta) {
11
- return meta.BATI.has("plausible.io");
12
- } });
10
+ var bati_config_default = t({
11
+ if(meta) {
12
+ return meta.BATI.has("plausible.io");
13
+ },
14
+ skills() {
15
+ return [{
16
+ name: "analytics",
17
+ description: "How analytics works in this app (Plausible). Use when configuring analytics or tracking events.",
18
+ body: `Plausible analytics. The tracking script lives in \`pages/+Head.*\`.
19
+
20
+ - **Configure:** set the \`data-domain\` attribute on the Plausible \`<script>\` to your domain.
21
+ - **Custom events:** use the Plausible script API (\`window.plausible("<event>")\`); enable the events extension on the script tag if needed.
22
+
23
+ See https://plausible.io/docs.`
24
+ }];
25
+ }
26
+ });
13
27
  //#endregion
14
28
  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`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), 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`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), `skills` in t && e(typeof t.skills == `function`, `'skills' 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`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), 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`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), `skills` in t && e(typeof t.skills == `function`, `'skills' must be a function of meta`), t;
7
7
  }
8
8
  //#endregion
9
9
  //#region bati.config.ts
@@ -20,6 +20,18 @@ var bati_config_default = t({
20
20
  type: "command",
21
21
  step: `${packageManager} postgres:migrate`
22
22
  }];
23
+ },
24
+ skills(meta) {
25
+ return [{
26
+ name: "database",
27
+ description: "How to work with the database in this app (raw PostgreSQL / postgres.js). Use when querying, adding a table, or migrating.",
28
+ body: `Raw PostgreSQL via postgres.js (no ORM). The client is in \`database/postgres/db.ts\`, schema in \`database/postgres/schema/\`, queries in \`database/postgres/queries/\`. Connection comes from \`DATABASE_URL\` in \`.env\`.
29
+
30
+ - **Add a table:** add it to \`database/postgres/schema/\` and migrate with \`${meta.BATI.pmRun} postgres:migrate\`.
31
+ - **Write queries:** add functions in \`database/postgres/queries/\` using the \`sql\` client; on the server it's available as \`context.db\`.
32
+
33
+ See https://github.com/porsager/postgres.`
34
+ }];
23
35
  }
24
36
  });
25
37
  //#endregion
@@ -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`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), 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`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), `skills` in t && e(typeof t.skills == `function`, `'skills' must be a function of meta`), t;
7
7
  }
8
8
  //#endregion
9
9
  //#region bati.config.ts
@@ -11,7 +11,19 @@ var bati_config_default = t({
11
11
  if(meta) {
12
12
  return meta.BATI.has("prettier");
13
13
  },
14
- knip: { ignoreDependencies: ["prettier", "eslint-config-prettier"] }
14
+ knip: { ignoreDependencies: ["prettier", "eslint-config-prettier"] },
15
+ skills(meta) {
16
+ return [{
17
+ name: "prettier",
18
+ description: "How formatting works in this app (Prettier). Use when formatting code or adjusting formatting rules.",
19
+ body: `Prettier handles code formatting (config in \`prettier.config.js\`).
20
+
21
+ - **Format:** \`${meta.BATI.pmExec} prettier --write .\`.
22
+ - **Rules:** edit \`prettier.config.js\`.
23
+
24
+ See https://prettier.io/docs.`
25
+ }];
26
+ }
15
27
  });
16
28
  //#endregion
17
29
  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`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), 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`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), `skills` in t && e(typeof t.skills == `function`, `'skills' must be a function of meta`), t;
7
7
  }
8
8
  //#endregion
9
9
  //#region bati.config.ts
@@ -26,7 +26,25 @@ var bati_config_default = t({
26
26
  step: `Then define your models and run ${packageManager} prisma migrate dev — https://www.prisma.io/docs/getting-started`
27
27
  }];
28
28
  },
29
- knip: { ignoreDependencies: ["@prisma/client", "prisma"] }
29
+ knip: { ignoreDependencies: ["@prisma/client", "prisma"] },
30
+ skills(meta) {
31
+ const run = meta.BATI.pmRun;
32
+ const exec = meta.BATI.pmExec;
33
+ const provider = meta.BATI.has("postgres") ? "postgresql" : "sqlite";
34
+ return [{
35
+ name: "prisma",
36
+ description: "How to work with the database via Prisma in this app. Use when defining a model, running a migration, or querying with the Prisma client.",
37
+ body: `Prisma (self-managed) on ${provider}. It uses the \`DATABASE_URL\` in \`.env\`.
38
+
39
+ - **First-time setup:** \`${exec} prisma init --datasource-provider ${provider}\` (creates \`prisma/schema.prisma\`).
40
+ - **Add or change a model:** edit \`prisma/schema.prisma\`.
41
+ - **Create & apply a migration:** \`${exec} prisma migrate dev\`.
42
+ - **Generate the client / inspect data:** \`${run} prisma:generate\` / \`${run} prisma:studio\`.
43
+ - **Query:** \`import { PrismaClient } from "@prisma/client"\`.
44
+
45
+ See https://www.prisma.io/docs.`
46
+ }];
47
+ }
30
48
  });
31
49
  //#endregion
32
50
  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`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), 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`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), `skills` in t && e(typeof t.skills == `function`, `'skills' must be a function of meta`), t;
7
7
  }
8
8
  //#endregion
9
9
  //#region bati.config.ts
@@ -11,7 +11,19 @@ var bati_config_default = t({
11
11
  if(meta) {
12
12
  return meta.BATI.has("react");
13
13
  },
14
- knip: { ignoreDependencies: ["react-dom", "@types/react-dom"] }
14
+ knip: { ignoreDependencies: ["react-dom", "@types/react-dom"] },
15
+ skills() {
16
+ return [{
17
+ name: "ui-framework",
18
+ description: "React conventions in this app. Use when writing components or handling SSR/hydration.",
19
+ body: `This app renders with React via \`vike-react\`. Components are \`.tsx\` files (pages under \`pages/\`, shared ones in \`components/\`).
20
+
21
+ - **SSR-safe:** components render on the server first — guard browser-only APIs (\`window\`, \`document\`, \`localStorage\`) behind \`useEffect\` or a \`typeof window !== "undefined"\` check to avoid hydration mismatches.
22
+ - **Page data:** read it with \`useData()\` (see the \`vike-data-fetching\` skill) rather than fetching in the component body.
23
+
24
+ See https://vike.dev/react.`
25
+ }];
26
+ }
15
27
  });
16
28
  //#endregion
17
29
  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`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), 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`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), `skills` in t && e(typeof t.skills == `function`, `'skills' 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`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), 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`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), `skills` in t && e(typeof t.skills == `function`, `'skills' 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`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), 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`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), `skills` in t && e(typeof t.skills == `function`, `'skills' must be a function of meta`), t;
7
7
  }
8
8
  //#endregion
9
9
  //#region bati.config.ts
@@ -28,6 +28,19 @@ var bati_config_default = t({
28
28
  type: "text",
29
29
  step: `Add your Sentry DSN to the .env file. Check ${bold("TODO.md")} for details`
30
30
  }];
31
+ },
32
+ skills(meta) {
33
+ const sdk = meta.BATI.has("vue") ? "@sentry/vue" : meta.BATI.has("solid") ? "@sentry/solid" : "@sentry/react";
34
+ return [{
35
+ name: "sentry",
36
+ description: "How error tracking works in this app (Sentry). Use when capturing errors or configuring Sentry.",
37
+ body: `Sentry error tracking. Browser init is in \`sentry.browser.config.ts\` (using \`${sdk}\`); the \`sentryVitePlugin\` (source maps) is in \`vite.config.ts\`.
38
+
39
+ - **Configure:** set \`SENTRY_DSN\` + \`PUBLIC_ENV__SENTRY_DSN\` in \`.env\`, and the org/project in \`.env.sentry-build-plugin\`.
40
+ - **Capture errors:** \`import * as Sentry from "${sdk}"\` and call \`Sentry.captureException(err)\`; uncaught errors are reported automatically.
41
+
42
+ See https://docs.sentry.io.`
43
+ }];
31
44
  }
32
45
  });
33
46
  //#endregion
@@ -3,12 +3,27 @@ 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`)), `env` in t && e(typeof t.env == `function`, `'env' must be a function of meta`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), 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`), `deploy` in t && e(Array.isArray(t.deploy) || typeof t.deploy == `function`, `'deploy' must be an array or a function of meta`), `skills` in t && e(typeof t.skills == `function`, `'skills' must be a function of meta`), t;
7
7
  }
8
8
  //#endregion
9
9
  //#region bati.config.ts
10
- var bati_config_default = t({ if(meta) {
11
- return meta.BATI.has("shadcn-ui");
12
- } });
10
+ var bati_config_default = t({
11
+ if(meta) {
12
+ return meta.BATI.has("shadcn-ui");
13
+ },
14
+ skills(meta) {
15
+ return [{
16
+ name: "shadcn-ui",
17
+ description: "How to use shadcn/ui in this app. Use when adding a shadcn/ui component or working with its styling.",
18
+ body: `shadcn/ui on Tailwind — components are copied into your project (you own them). \`components.json\` holds the config and the \`cn()\` class-merge helper is in \`lib/utils.ts\`.
19
+
20
+ - **Add a component:** \`${meta.BATI.pmDlx} shadcn@latest add <name>\` (e.g. \`button\`); it's written under the components path configured in \`components.json\`.
21
+ - **Use it:** import from that components path and compose classes with \`cn()\`.
22
+ - Styling is Tailwind-based (see the \`styling\` skill).
23
+
24
+ See https://ui.shadcn.com.`
25
+ }];
26
+ }
27
+ });
13
28
  //#endregion
14
29
  export { bati_config_default as default };