@batijs/cli 0.0.287 → 0.0.289

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 (84) hide show
  1. package/dist/boilerplates/@batijs/auth0/files/$.env.js +5 -5
  2. package/dist/boilerplates/@batijs/auth0/files/$README.md.js +5 -5
  3. package/dist/boilerplates/@batijs/authjs/files/$package.json.js +4 -7
  4. package/dist/boilerplates/@batijs/aws/files/$README.md.js +7 -6
  5. package/dist/boilerplates/@batijs/aws/files/$package.json.js +19 -46
  6. package/dist/boilerplates/@batijs/aws/files/$tsconfig.json.js +3 -3
  7. package/dist/boilerplates/@batijs/aws/files/tests/aws_handler.spec.ts +1 -1
  8. package/dist/boilerplates/@batijs/biome/files/$package.json.js +10 -18
  9. package/dist/boilerplates/@batijs/cloudflare/files/$package.json.js +21 -42
  10. package/dist/boilerplates/@batijs/cloudflare/files/$tsconfig.json.js +3 -3
  11. package/dist/boilerplates/@batijs/cloudflare/files/$vite.config.ts.js +5 -5
  12. package/dist/boilerplates/@batijs/compiled/files/$package.json.js +4 -8
  13. package/dist/boilerplates/@batijs/compiled/files/$vite.config.ts.js +5 -5
  14. package/dist/boilerplates/@batijs/d1/files/$README.md.js +5 -5
  15. package/dist/boilerplates/@batijs/d1/files/$package.json.js +5 -8
  16. package/dist/boilerplates/@batijs/d1/files/$tsconfig.json.js +3 -3
  17. package/dist/boilerplates/@batijs/d1/files/$wrangler.toml.js +1 -1
  18. package/dist/boilerplates/@batijs/d1-sqlite/files/$package.json.js +91 -5
  19. package/dist/boilerplates/@batijs/drizzle/files/$.env.js +3 -3
  20. package/dist/boilerplates/@batijs/drizzle/files/$README.md.js +5 -5
  21. package/dist/boilerplates/@batijs/drizzle/files/$package.json.js +14 -19
  22. package/dist/boilerplates/@batijs/edgedb/files/$README.md.js +5 -5
  23. package/dist/boilerplates/@batijs/edgedb/files/$package.json.js +11 -11
  24. package/dist/boilerplates/@batijs/eslint/files/$package.json.js +10 -37
  25. package/dist/boilerplates/@batijs/express/files/$package.json.js +15 -33
  26. package/dist/boilerplates/@batijs/fastify/files/$package.json.js +15 -33
  27. package/dist/boilerplates/@batijs/firebase-auth/files/$.env.js +3 -3
  28. package/dist/boilerplates/@batijs/firebase-auth/files/$README.md.js +5 -5
  29. package/dist/boilerplates/@batijs/firebase-auth/files/$package.json.js +4 -8
  30. package/dist/boilerplates/@batijs/google-analytics/files/$.env.js +3 -3
  31. package/dist/boilerplates/@batijs/h3/files/$package.json.js +15 -36
  32. package/dist/boilerplates/@batijs/hattip/files/$package.json.js +12 -49
  33. package/dist/boilerplates/@batijs/hono/files/$package.json.js +16 -39
  34. package/dist/boilerplates/@batijs/hono/files/$vite.config.ts.js +5 -5
  35. package/dist/boilerplates/@batijs/lucia-auth/files/$.env.js +4 -4
  36. package/dist/boilerplates/@batijs/lucia-auth/files/$README.md.js +5 -5
  37. package/dist/boilerplates/@batijs/lucia-auth/files/$package.json.js +4 -22
  38. package/dist/boilerplates/@batijs/mantine/files/$README.md.js +5 -5
  39. package/dist/boilerplates/@batijs/mantine/files/$package.json.js +5 -9
  40. package/dist/boilerplates/@batijs/prettier/files/$package.json.js +4 -7
  41. package/dist/boilerplates/@batijs/prisma/files/$.env.js +3 -3
  42. package/dist/boilerplates/@batijs/prisma/files/$README.md.js +5 -5
  43. package/dist/boilerplates/@batijs/prisma/files/$package.json.js +12 -12
  44. package/dist/boilerplates/@batijs/react/files/$README.md.js +6 -5
  45. package/dist/boilerplates/@batijs/react/files/$package.json.js +6 -10
  46. package/dist/boilerplates/@batijs/react/files/$tsconfig.json.js +3 -3
  47. package/dist/boilerplates/@batijs/react/files/$vite.config.ts.js +5 -5
  48. package/dist/boilerplates/@batijs/react-sentry/files/$package.json.js +5 -8
  49. package/dist/boilerplates/@batijs/sentry/files/$.env.js +4 -4
  50. package/dist/boilerplates/@batijs/sentry/files/$README.md.js +5 -5
  51. package/dist/boilerplates/@batijs/sentry/files/$package.json.js +4 -7
  52. package/dist/boilerplates/@batijs/sentry/files/$vite.config.ts.js +7 -7
  53. package/dist/boilerplates/@batijs/sentry/files/pages/$+client.ts.js +9 -9
  54. package/dist/boilerplates/@batijs/shadcn-ui/files/$README.md.js +5 -5
  55. package/dist/boilerplates/@batijs/shadcn-ui/files/$package.json.js +16 -24
  56. package/dist/boilerplates/@batijs/shadcn-ui/files/$tsconfig.json.js +3 -3
  57. package/dist/boilerplates/@batijs/shadcn-ui/files/$vite.config.ts.js +5 -5
  58. package/dist/boilerplates/@batijs/shared/files/$README.md.js +33 -11
  59. package/dist/boilerplates/@batijs/shared-server/files/$package.json.js +4 -7
  60. package/dist/boilerplates/@batijs/solid/files/$README.md.js +5 -5
  61. package/dist/boilerplates/@batijs/solid/files/$package.json.js +6 -10
  62. package/dist/boilerplates/@batijs/solid/files/$tsconfig.json.js +3 -3
  63. package/dist/boilerplates/@batijs/solid/files/$vite.config.ts.js +5 -5
  64. package/dist/boilerplates/@batijs/solid-sentry/files/$package.json.js +5 -8
  65. package/dist/boilerplates/@batijs/sqlite/files/$.env.js +3 -3
  66. package/dist/boilerplates/@batijs/sqlite/files/$README.md.js +5 -5
  67. package/dist/boilerplates/@batijs/sqlite/files/$package.json.js +7 -9
  68. package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +5 -13
  69. package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +4 -7
  70. package/dist/boilerplates/@batijs/telefunc/files/$vite.config.ts.js +5 -5
  71. package/dist/boilerplates/@batijs/trpc/files/$package.json.js +4 -7
  72. package/dist/boilerplates/@batijs/ts-rest/files/$package.json.js +4 -9
  73. package/dist/boilerplates/@batijs/vercel/files/$package.json.js +4 -7
  74. package/dist/boilerplates/@batijs/vercel/files/$tsconfig.json.js +3 -3
  75. package/dist/boilerplates/@batijs/vercel/files/$vite.config.ts.js +5 -5
  76. package/dist/boilerplates/@batijs/vue/files/$README.md.js +5 -5
  77. package/dist/boilerplates/@batijs/vue/files/$package.json.js +13 -22
  78. package/dist/boilerplates/@batijs/vue/files/$tsconfig.json.js +3 -3
  79. package/dist/boilerplates/@batijs/vue/files/$vite.config.ts.js +6 -6
  80. package/dist/boilerplates/@batijs/vue-sentry/files/$package.json.js +4 -7
  81. package/dist/{chunk-ZPMGCQ2D.js → chunk-TUL4TJRN.js} +118739 -115559
  82. package/dist/index.js +99 -20
  83. package/package.json +6 -6
  84. package/dist/boilerplates/@batijs/shared-no-db/files/$package.json.js +0 -94
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- T7s
4
- } from "../../../../chunk-ZPMGCQ2D.js";
3
+ vWs
4
+ } from "../../../../chunk-TUL4TJRN.js";
5
5
  import "../../../../chunk-LU7IBQI7.js";
6
6
 
7
7
  // ../../boilerplates/auth0/dist/files/$.env.js
@@ -10,9 +10,9 @@ async function getEnv(props) {
10
10
  const auth0ClientSecret = process.env.TEST_AUTH0_CLIENT_SECRET;
11
11
  const auth0BaseUrl = process.env.TEST_AUTH0_ISSUER_BASE_URL;
12
12
  let envContent = await props.readfile?.();
13
- envContent = T7s(envContent, "AUTH0_CLIENT_ID", auth0ClientId ?? "", "Auth0 Client ID");
14
- envContent = T7s(envContent, "AUTH0_CLIENT_SECRET", auth0ClientSecret ?? "", "Auth0 Client Secret");
15
- envContent = T7s(envContent, "AUTH0_ISSUER_BASE_URL", auth0BaseUrl ?? "", "Auth0 base URL");
13
+ envContent = vWs(envContent, "AUTH0_CLIENT_ID", auth0ClientId ?? "", "Auth0 Client ID");
14
+ envContent = vWs(envContent, "AUTH0_CLIENT_SECRET", auth0ClientSecret ?? "", "Auth0 Client Secret");
15
+ envContent = vWs(envContent, "AUTH0_ISSUER_BASE_URL", auth0BaseUrl ?? "", "Auth0 base URL");
16
16
  return envContent;
17
17
  }
18
18
  export {
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- dLs
4
- } from "../../../../chunk-ZPMGCQ2D.js";
3
+ oWs
4
+ } from "../../../../chunk-TUL4TJRN.js";
5
5
  import "../../../../chunk-LU7IBQI7.js";
6
6
 
7
7
  // ../../boilerplates/auth0/dist/files/$README.md.js
8
8
  async function getReadme(props) {
9
- const content = await dLs(props);
9
+ const content = await oWs(props);
10
10
  const todo = `
11
11
  ## *Auth0*
12
12
  - Sign up or login to an Auth0 account, then go to [your Dashboard](https://manage.auth0.com/dashboard/)
@@ -31,8 +31,8 @@ AUTH0_ISSUER_BASE_URL=https://<your-auth0-domain>.<eu>.auth0.com
31
31
 
32
32
  - Read more [Auth.js: Auth0 provider](https://authjs.dev/reference/core/providers/auth0)
33
33
  `;
34
- content.addTodo(todo);
35
- return content.finalize();
34
+ content.addMarkdownFeature(todo, "auth0");
35
+ return content;
36
36
  }
37
37
  export {
38
38
  getReadme as default
@@ -1,8 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- g7s,
4
- mLs
5
- } from "../../../../chunk-ZPMGCQ2D.js";
3
+ lWs
4
+ } from "../../../../chunk-TUL4TJRN.js";
6
5
  import "../../../../chunk-LU7IBQI7.js";
7
6
 
8
7
  // ../../boilerplates/authjs/dist/files/$package.json.js
@@ -84,10 +83,8 @@ var require_package = __commonJS({
84
83
  }
85
84
  });
86
85
  async function getPackageJson(props) {
87
- const packageJson = await mLs(props);
88
- return g7s(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default), {
89
- dependencies: ["@auth/core", "@universal-middleware/core"]
90
- });
86
+ const packageJson = await lWs(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
87
+ return packageJson.addDependencies(["@auth/core", "@universal-middleware/core"]);
91
88
  }
92
89
  export {
93
90
  getPackageJson as default
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- dLs
4
- } from "../../../../chunk-ZPMGCQ2D.js";
3
+ oWs
4
+ } from "../../../../chunk-TUL4TJRN.js";
5
5
  import "../../../../chunk-LU7IBQI7.js";
6
6
 
7
7
  // ../../boilerplates/aws/dist/files/$README.md.js
8
8
  async function getReadme(props) {
9
- const content = await dLs(props);
9
+ const content = await oWs(props);
10
10
  const todo = `
11
11
  ## *AWS CDK Deployment*
12
12
 
@@ -75,8 +75,9 @@ You can also access the CloudFront distribution domainname in the AWS SSM regist
75
75
  ### Stack Configuration
76
76
 
77
77
  You can configure the stack in the \`cdk/bin/infrastructure.ts\` file:
78
- | --- | --- | --- |
78
+
79
79
  | Variable | Examples | Description |
80
+ | --- | --- | --- |
80
81
  | \`domainName: "example.com",\` | "example.com" | |
81
82
  | \`subDomain: "www",\` |"www" | |
82
83
  | \`certificate: undefined,\` | "arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012" or a certificatemanager.ICertificate | reuse an existing AWS Certificate |
@@ -106,8 +107,8 @@ To destroy the stack on AWS, run the following command:
106
107
  Or delete the CloudFormation stack which starts with "VikeStack-<Your App Name>" created by this project.
107
108
 
108
109
  `;
109
- content.addTodo(todo);
110
- return content.finalize();
110
+ content.addMarkdownFeature(todo, "aws");
111
+ return content;
111
112
  }
112
113
  export {
113
114
  getReadme as default
@@ -1,9 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- b7s,
4
- g7s,
5
- mLs
6
- } from "../../../../chunk-ZPMGCQ2D.js";
3
+ lWs
4
+ } from "../../../../chunk-TUL4TJRN.js";
7
5
  import "../../../../chunk-LU7IBQI7.js";
8
6
 
9
7
  // ../../boilerplates/aws/dist/files/$package.json.js
@@ -51,9 +49,9 @@ var require_package = __commonJS({
51
49
  "@batijs/compile": "workspace:*",
52
50
  "@types/node": "^18.19.14",
53
51
  "@types/which": "^3.0.4",
54
- "aws-cdk": "^2.159.1",
55
- "aws-cdk-lib": "^2.159.1",
56
- cdk: "^2.159.1",
52
+ "aws-cdk": "^2.160.0",
53
+ "aws-cdk-lib": "^2.160.0",
54
+ cdk: "^2.160.0",
57
55
  constructs: "^10.3.0",
58
56
  esbuild: "^0.24.0",
59
57
  "npm-run-all2": "^6.2.3",
@@ -109,45 +107,20 @@ var require_package = __commonJS({
109
107
  }
110
108
  });
111
109
  async function getPackageJson(props) {
112
- const packageJson = await mLs(props);
113
- b7s(packageJson, {
114
- test: {
115
- value: "vitest",
116
- precedence: 0
117
- },
118
- "deploy:cdk": {
119
- value: "cdk",
120
- precedence: 0
121
- },
122
- "deploy:cdk-deploy-all": {
123
- value: "cdk deploy --all",
124
- precedence: 0
125
- },
126
- "deploy:aws": {
127
- value: "run-s build deploy:cdk-deploy-all",
128
- precedence: 0
129
- },
130
- // @ts-ignore
131
- "cdk:app": {
132
- value: "tsx cdk/bin/infrastructure.ts",
133
- precedence: 0
134
- }
135
- });
136
- return g7s(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default), {
137
- devDependencies: [
138
- "cdk",
139
- "aws-cdk",
140
- "npm-run-all2",
141
- "@types/node",
142
- "tsx",
143
- "typescript",
144
- "esbuild",
145
- "vitest",
146
- "which",
147
- "@types/which"
148
- ],
149
- dependencies: ["aws-cdk-lib", "constructs", "source-map-support"]
150
- });
110
+ const packageJson = await lWs(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
111
+ return packageJson.setScript("test", {
112
+ value: "vitest",
113
+ precedence: 0
114
+ }).setScript("deploy:cdk-deploy-all", {
115
+ value: "cdk deploy --all",
116
+ precedence: 0
117
+ }).setScript("deploy:aws", {
118
+ value: "run-s build deploy:cdk-deploy-all",
119
+ precedence: 0
120
+ }).setScript("cdk:app", {
121
+ value: "tsx cdk/bin/infrastructure.ts",
122
+ precedence: 0
123
+ }).addDependencies(["aws-cdk-lib", "constructs", "source-map-support"]).addDevDependencies(["cdk", "aws-cdk", "@types/node", "@types/which", "typescript", "esbuild", "vitest", "which"]).addDevDependencies(["npm-run-all2"], ["deploy:aws"]).addDevDependencies(["tsx"], ["cdk:app"]);
151
124
  }
152
125
  export {
153
126
  getPackageJson as default
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- mLs
4
- } from "../../../../chunk-ZPMGCQ2D.js";
3
+ cWs
4
+ } from "../../../../chunk-TUL4TJRN.js";
5
5
  import "../../../../chunk-LU7IBQI7.js";
6
6
 
7
7
  // ../../boilerplates/aws/dist/files/$tsconfig.json.js
8
8
  async function getTsConfig(props) {
9
- const tsConfig = await mLs(props);
9
+ const tsConfig = await cWs(props);
10
10
  tsConfig.compilerOptions.types = [
11
11
  ...tsConfig.compilerOptions.types ?? [],
12
12
  "@types/node",
@@ -3,7 +3,7 @@ import { beforeAll, describe, expect, it } from "vitest";
3
3
  import { execSync } from "node:child_process";
4
4
  import { existsSync, readdirSync, readFileSync, rmSync } from "node:fs";
5
5
  import path from "node:path";
6
- import * as which from "which";
6
+ import which from "which";
7
7
 
8
8
  const bunExists = which.sync("bun", { nothrow: true }) !== null;
9
9
  const npmCli = bunExists ? "bun" : "pnpm";
@@ -1,9 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- b7s,
4
- g7s,
5
- mLs
6
- } from "../../../../chunk-ZPMGCQ2D.js";
3
+ lWs
4
+ } from "../../../../chunk-TUL4TJRN.js";
7
5
  import "../../../../chunk-LU7IBQI7.js";
8
6
 
9
7
  // ../../boilerplates/biome/dist/files/$package.json.js
@@ -67,20 +65,14 @@ var require_package = __commonJS({
67
65
  }
68
66
  });
69
67
  async function getPackageJson(props) {
70
- const packageJson = await mLs(props);
71
- b7s(packageJson, {
72
- lint: {
73
- value: "biome lint --write .",
74
- precedence: 0
75
- },
76
- format: {
77
- value: "biome format --write .",
78
- precedence: 0
79
- }
80
- });
81
- return g7s(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default), {
82
- devDependencies: ["@biomejs/biome"]
83
- });
68
+ const packageJson = await lWs(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
69
+ return packageJson.setScript("lint", {
70
+ value: "biome lint --write .",
71
+ precedence: 0
72
+ }).setScript("format", {
73
+ value: "biome format --write .",
74
+ precedence: 0
75
+ }).addDevDependencies(["@biomejs/biome"]);
84
76
  }
85
77
  export {
86
78
  getPackageJson as default
@@ -1,10 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- b7s,
4
- g7s,
5
- mLs,
6
- y7s
7
- } from "../../../../chunk-ZPMGCQ2D.js";
3
+ lWs
4
+ } from "../../../../chunk-TUL4TJRN.js";
8
5
  import "../../../../chunk-LU7IBQI7.js";
9
6
 
10
7
  // ../../boilerplates/cloudflare/dist/files/$package.json.js
@@ -55,7 +52,7 @@ var require_package = __commonJS({
55
52
  "@types/node": "^18.19.14",
56
53
  "npm-run-all2": "^6.2.3",
57
54
  "vike-cloudflare": "^0.1.2",
58
- wrangler: "^3.78.7"
55
+ wrangler: "^3.78.8"
59
56
  },
60
57
  dependencies: {
61
58
  "@batijs/core": "workspace:*"
@@ -85,42 +82,24 @@ var require_package = __commonJS({
85
82
  }
86
83
  });
87
84
  async function getPackageJson(props) {
88
- const packageJson = await mLs(props);
89
- b7s(packageJson, {
90
- "preview:wrangler": {
91
- value: "wrangler pages dev",
92
- precedence: 40,
93
- warnIfReplaced: true
94
- },
95
- preview: {
96
- value: "run-s build preview:wrangler",
97
- precedence: 40,
98
- warnIfReplaced: true
99
- },
100
- "deploy:wrangler": {
101
- value: "wrangler pages deploy",
102
- precedence: 40,
103
- warnIfReplaced: true
104
- },
105
- deploy: {
106
- value: "run-s build deploy:wrangler",
107
- precedence: 40,
108
- warnIfReplaced: true
109
- }
110
- });
111
- g7s(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default), {
112
- devDependencies: ["wrangler", "npm-run-all2", "@cloudflare/workers-types"],
113
- dependencies: ["vike-cloudflare"]
114
- });
115
- if (props.meta.BATI.has("hattip")) {
116
- g7s(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default), {
117
- dependencies: ["@hattip/adapter-cloudflare-workers"]
118
- });
119
- } else {
120
- y7s(packageJson, "tsx");
121
- y7s(packageJson, "cross-env");
122
- }
123
- return packageJson;
85
+ const packageJson = await lWs(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
86
+ return packageJson.setScript("preview:wrangler", {
87
+ value: "wrangler pages dev",
88
+ precedence: 40,
89
+ warnIfReplaced: true
90
+ }).setScript("preview", {
91
+ value: "run-s build preview:wrangler",
92
+ precedence: 40,
93
+ warnIfReplaced: true
94
+ }).setScript("deploy:wrangler", {
95
+ value: "wrangler pages deploy",
96
+ precedence: 40,
97
+ warnIfReplaced: true
98
+ }).setScript("deploy", {
99
+ value: "run-s build deploy:wrangler",
100
+ precedence: 40,
101
+ warnIfReplaced: true
102
+ }).addDevDependencies(["@cloudflare/workers-types"]).addDependencies(["vike-cloudflare"]).addDevDependencies(["wrangler"], ["preview:wrangler", "deploy:wrangler", "preview", "deploy"]).addDevDependencies(["npm-run-all2"], ["preview", "deploy"]).addDependencies(["@hattip/adapter-cloudflare-workers"], props.meta.BATI.has("hattip"));
124
103
  }
125
104
  export {
126
105
  getPackageJson as default
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- mLs
4
- } from "../../../../chunk-ZPMGCQ2D.js";
3
+ cWs
4
+ } from "../../../../chunk-TUL4TJRN.js";
5
5
  import "../../../../chunk-LU7IBQI7.js";
6
6
 
7
7
  // ../../boilerplates/cloudflare/dist/files/$tsconfig.json.js
8
8
  async function getTsConfig(props) {
9
- const tsConfig = await mLs(props);
9
+ const tsConfig = await cWs(props);
10
10
  tsConfig.compilerOptions.types = [...tsConfig.compilerOptions.types ?? [], "vike-cloudflare/types"];
11
11
  return tsConfig;
12
12
  }
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- Uus,
4
- hLs
5
- } from "../../../../chunk-ZPMGCQ2D.js";
3
+ Mhs,
4
+ uWs
5
+ } from "../../../../chunk-TUL4TJRN.js";
6
6
  import "../../../../chunk-LU7IBQI7.js";
7
7
 
8
8
  // ../../boilerplates/cloudflare/dist/files/$vite.config.ts.js
9
9
  async function getViteConfig(props) {
10
- const mod = await hLs(props);
10
+ const mod = await uWs(props);
11
11
  let options = void 0;
12
12
  if (props.meta.BATI.has("hattip") || props.meta.BATI.has("hono")) {
13
13
  options = {
@@ -17,7 +17,7 @@ async function getViteConfig(props) {
17
17
  }
18
18
  };
19
19
  }
20
- Uus(mod, {
20
+ Mhs(mod, {
21
21
  from: "vike-cloudflare",
22
22
  constructor: "pages",
23
23
  imported: "pages",
@@ -1,8 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- g7s,
4
- mLs
5
- } from "../../../../chunk-ZPMGCQ2D.js";
3
+ lWs
4
+ } from "../../../../chunk-TUL4TJRN.js";
6
5
  import "../../../../chunk-LU7IBQI7.js";
7
6
 
8
7
  // ../../boilerplates/compiled/dist/files/$package.json.js
@@ -68,11 +67,8 @@ var require_package = __commonJS({
68
67
  }
69
68
  });
70
69
  async function getPackageJson(props) {
71
- const packageJson = await mLs(props);
72
- return g7s(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default), {
73
- devDependencies: ["vite-plugin-compiled-react"],
74
- dependencies: ["@compiled/react"]
75
- });
70
+ const packageJson = await lWs(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
71
+ return packageJson.addDevDependencies(["vite-plugin-compiled-react"]).addDependencies(["@compiled/react"]);
76
72
  }
77
73
  export {
78
74
  getPackageJson as default
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- Uus,
4
- hLs
5
- } from "../../../../chunk-ZPMGCQ2D.js";
3
+ Mhs,
4
+ uWs
5
+ } from "../../../../chunk-TUL4TJRN.js";
6
6
  import "../../../../chunk-LU7IBQI7.js";
7
7
 
8
8
  // ../../boilerplates/compiled/dist/files/$vite.config.ts.js
9
9
  async function getViteConfig(props) {
10
- const mod = await hLs(props);
11
- Uus(mod, {
10
+ const mod = await uWs(props);
11
+ Mhs(mod, {
12
12
  from: "vite-plugin-compiled-react",
13
13
  constructor: "compiled",
14
14
  imported: "compiled",
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- dLs
4
- } from "../../../../chunk-ZPMGCQ2D.js";
3
+ oWs
4
+ } from "../../../../chunk-TUL4TJRN.js";
5
5
  import "../../../../chunk-LU7IBQI7.js";
6
6
 
7
7
  // ../../boilerplates/d1/dist/files/$README.md.js
8
8
  async function getReadme(props) {
9
- const content = await dLs(props);
9
+ const content = await oWs(props);
10
10
  const todo = `
11
11
  ## *Cloudflare D1*
12
12
 
@@ -24,8 +24,8 @@ wrangler d1 create <your-db-name>
24
24
  > - Only used for describing the database, and is not directly referenced in code.
25
25
 
26
26
  Then copy the output to \`wrangler.toml\``;
27
- content.addTodo(todo);
28
- return content.finalize();
27
+ content.addMarkdownFeature(todo, "sqlite");
28
+ return content;
29
29
  }
30
30
  export {
31
31
  getReadme as default
@@ -1,8 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- g7s,
4
- mLs
5
- } from "../../../../chunk-ZPMGCQ2D.js";
3
+ lWs
4
+ } from "../../../../chunk-TUL4TJRN.js";
6
5
  import "../../../../chunk-LU7IBQI7.js";
7
6
 
8
7
  // ../../boilerplates/d1/dist/files/$package.json.js
@@ -52,7 +51,7 @@ var require_package = __commonJS({
52
51
  "@types/node": "^18.19.14",
53
52
  "@universal-middleware/core": "^0.2.10",
54
53
  vike: "^0.4.196",
55
- wrangler: "^3.78.7"
54
+ wrangler: "^3.78.8"
56
55
  },
57
56
  dependencies: {
58
57
  "@batijs/core": "workspace:*"
@@ -89,10 +88,8 @@ var require_package = __commonJS({
89
88
  }
90
89
  });
91
90
  async function getPackageJson(props) {
92
- const packageJson = await mLs(props);
93
- return g7s(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default), {
94
- devDependencies: ["@universal-middleware/core"]
95
- });
91
+ const packageJson = await lWs(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
92
+ return packageJson.addDevDependencies(["@universal-middleware/core"]);
96
93
  }
97
94
  export {
98
95
  getPackageJson as default
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- mLs
4
- } from "../../../../chunk-ZPMGCQ2D.js";
3
+ cWs
4
+ } from "../../../../chunk-TUL4TJRN.js";
5
5
  import "../../../../chunk-LU7IBQI7.js";
6
6
 
7
7
  // ../../boilerplates/d1/dist/files/$tsconfig.json.js
8
8
  async function getTsConfig(props) {
9
- const tsConfig = await mLs(props);
9
+ const tsConfig = await cWs(props);
10
10
  tsConfig.compilerOptions.types = [...tsConfig.compilerOptions.types ?? [], "@cloudflare/workers-types"];
11
11
  return tsConfig;
12
12
  }
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import "../../../../chunk-ZPMGCQ2D.js";
2
+ import "../../../../chunk-TUL4TJRN.js";
3
3
  import "../../../../chunk-LU7IBQI7.js";
4
4
 
5
5
  // ../../boilerplates/d1/dist/files/$wrangler.toml.js
@@ -1,14 +1,100 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- mLs
4
- } from "../../../../chunk-ZPMGCQ2D.js";
3
+ lWs
4
+ } from "../../../../chunk-TUL4TJRN.js";
5
5
  import "../../../../chunk-LU7IBQI7.js";
6
6
 
7
7
  // ../../boilerplates/d1-sqlite/dist/files/$package.json.js
8
+ var __create = Object.create;
9
+ var __defProp = Object.defineProperty;
10
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11
+ var __getOwnPropNames = Object.getOwnPropertyNames;
12
+ var __getProtoOf = Object.getPrototypeOf;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __commonJS = (cb, mod) => function __require() {
15
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
16
+ };
17
+ var __copyProps = (to, from, except, desc) => {
18
+ if (from && typeof from === "object" || typeof from === "function") {
19
+ for (let key of __getOwnPropNames(from))
20
+ if (!__hasOwnProp.call(to, key) && key !== except)
21
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
22
+ }
23
+ return to;
24
+ };
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
26
+ // If the importer is in node compatibility mode or this is not an ESM
27
+ // file that has been converted to a CommonJS file using a Babel-
28
+ // compatible transform (i.e. "__esModule" has not been set), then set
29
+ // "default" to the CommonJS "module.exports" for node compatibility.
30
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
31
+ mod
32
+ ));
33
+ var require_package = __commonJS({
34
+ "package.json"(exports, module) {
35
+ module.exports = {
36
+ name: "@batijs/d1-sqlite",
37
+ private: true,
38
+ version: "0.0.1",
39
+ description: "",
40
+ type: "module",
41
+ scripts: {
42
+ "check-types": "tsc --noEmit",
43
+ build: "bati-compile-boilerplate"
44
+ },
45
+ keywords: [],
46
+ author: "",
47
+ license: "MIT",
48
+ devDependencies: {
49
+ "@batijs/compile": "workspace:*",
50
+ "@cloudflare/workers-types": "^4.20240919.0",
51
+ "@types/node": "^18.19.14",
52
+ "@universal-middleware/core": "^0.2.10",
53
+ vike: "^0.4.196"
54
+ },
55
+ dependencies: {
56
+ "@batijs/core": "workspace:*"
57
+ },
58
+ files: [
59
+ "dist/"
60
+ ],
61
+ bati: {
62
+ if: {
63
+ flag: {
64
+ $all: [
65
+ "sqlite",
66
+ "cloudflare"
67
+ ]
68
+ }
69
+ }
70
+ },
71
+ exports: {
72
+ "./database/d1/queries/lucia-auth": {
73
+ types: "./dist/types/database/d1/queries/lucia-auth.d.ts"
74
+ },
75
+ "./database/d1/queries/todos": {
76
+ types: "./dist/types/database/d1/queries/todos.d.ts"
77
+ }
78
+ },
79
+ typesVersions: {
80
+ "*": {
81
+ "database/d1/queries/lucia-auth": [
82
+ "./dist/types/database/d1/queries/lucia-auth.d.ts"
83
+ ],
84
+ "database/d1/queries/todos": [
85
+ "./dist/types/database/d1/queries/todos.d.ts"
86
+ ]
87
+ }
88
+ }
89
+ };
90
+ }
91
+ });
8
92
  async function getPackageJson(props) {
9
- const packageJson = await mLs(props);
10
- packageJson.scripts["d1:migrate"] = "wrangler d1 migrations apply YOUR_DATABASE_NAME --local";
11
- return packageJson;
93
+ const packageJson = await lWs(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
94
+ return packageJson.setScript("d1:migrate", {
95
+ value: "wrangler d1 migrations apply YOUR_DATABASE_NAME --local",
96
+ precedence: 0
97
+ });
12
98
  }
13
99
  export {
14
100
  getPackageJson as default
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- T7s
4
- } from "../../../../chunk-ZPMGCQ2D.js";
3
+ vWs
4
+ } from "../../../../chunk-TUL4TJRN.js";
5
5
  import "../../../../chunk-LU7IBQI7.js";
6
6
 
7
7
  // ../../boilerplates/drizzle/dist/files/$.env.js
8
8
  async function getEnv(props) {
9
9
  if (props.meta.BATI.hasD1) return;
10
10
  const envContent = await props.readfile?.();
11
- return T7s(envContent, "DATABASE_URL", "sqlite.db", "Path to the sqlite database");
11
+ return vWs(envContent, "DATABASE_URL", "sqlite.db", "Path to the sqlite database");
12
12
  }
13
13
  export {
14
14
  getEnv as default