@batijs/cli 0.0.476 → 0.0.478
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/boilerplates/@batijs/auth0/files/$.env.js +6 -5
- package/dist/boilerplates/@batijs/auth0/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/auth0/files/$wrangler.toml.js +32 -0
- package/dist/boilerplates/@batijs/authjs/files/$package.json.js +7 -6
- package/dist/boilerplates/@batijs/authjs/files/server/authjs-handler.ts +42 -35
- package/dist/boilerplates/@batijs/authjs/types/server/authjs-handler.d.ts +8 -3
- package/dist/boilerplates/@batijs/aws/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/aws/files/$package.json.js +10 -10
- package/dist/boilerplates/@batijs/aws/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/biome/files/$package.json.js +4 -4
- package/dist/boilerplates/@batijs/cloudflare/files/$package.json.js +17 -26
- package/dist/boilerplates/@batijs/cloudflare/files/wrangler.toml +2 -3
- package/dist/boilerplates/@batijs/compiled/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/compiled/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/d1/files/$README.md.js +4 -4
- package/dist/boilerplates/@batijs/d1/files/$package.json.js +8 -8
- package/dist/boilerplates/@batijs/d1/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/d1/files/database/d1/helpers.ts +3 -11
- package/dist/boilerplates/@batijs/d1-sqlite/files/$package.json.js +7 -7
- package/dist/boilerplates/@batijs/drizzle/files/$.env.js +3 -3
- package/dist/boilerplates/@batijs/drizzle/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/drizzle/files/$package.json.js +8 -8
- package/dist/boilerplates/@batijs/eslint/files/$package.json.js +8 -8
- package/dist/boilerplates/@batijs/eslint/types/eslint.config.d.ts +1 -1
- package/dist/boilerplates/@batijs/express/files/$package.json.js +16 -29
- package/dist/boilerplates/@batijs/express/files/server/entry.ts +45 -0
- package/dist/boilerplates/@batijs/express/types/server/entry.d.ts +3 -0
- package/dist/boilerplates/@batijs/fastify/files/$package.json.js +18 -32
- package/dist/boilerplates/@batijs/fastify/files/server/entry.ts +52 -0
- package/dist/boilerplates/@batijs/fastify/types/server/entry.d.ts +4 -0
- package/dist/boilerplates/@batijs/google-analytics/files/$.env.js +3 -3
- package/dist/boilerplates/@batijs/h3/files/$package.json.js +21 -32
- package/dist/boilerplates/@batijs/h3/files/server/entry.ts +45 -0
- package/dist/boilerplates/@batijs/{express/types/express-entry.d.ts → h3/types/server/entry.d.ts} +1 -1
- package/dist/boilerplates/@batijs/hono/files/$package.json.js +23 -40
- package/dist/boilerplates/@batijs/hono/files/entry_aws_lambda.ts +2 -9
- package/dist/boilerplates/@batijs/hono/files/server/entry.ts +53 -0
- package/dist/boilerplates/@batijs/hono/types/server/entry.d.ts +4 -0
- package/dist/boilerplates/@batijs/mantine/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/mantine/files/$package.json.js +12 -12
- package/dist/boilerplates/@batijs/photon/files/$README.md.js +29 -0
- package/dist/boilerplates/@batijs/photon/files/$package.json.js +109 -0
- package/dist/boilerplates/@batijs/photon/files/+photon.ts +7 -0
- package/dist/boilerplates/@batijs/photon/types/+photon.d.ts +4 -0
- package/dist/boilerplates/@batijs/pnpm/files/$pnpm-workspace.yaml.js +3 -3
- package/dist/boilerplates/@batijs/prettier/files/$package.json.js +4 -4
- package/dist/boilerplates/@batijs/prisma/files/$.env.js +3 -3
- package/dist/boilerplates/@batijs/prisma/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/prisma/files/$package.json.js +6 -6
- package/dist/boilerplates/@batijs/react/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/react/files/$package.json.js +16 -15
- package/dist/boilerplates/@batijs/react/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/react/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/react/files/pages/+config.ts +6 -1
- package/dist/boilerplates/@batijs/react/types/pages/+config.d.ts +63 -2
- package/dist/boilerplates/@batijs/react-sentry/files/$package.json.js +10 -10
- package/dist/boilerplates/@batijs/sentry/files/$.env.js +4 -4
- package/dist/boilerplates/@batijs/sentry/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/sentry/files/$package.json.js +6 -6
- package/dist/boilerplates/@batijs/sentry/files/$vite.config.ts.js +7 -7
- package/dist/boilerplates/@batijs/sentry/files/pages/$+client.ts.js +9 -9
- package/dist/boilerplates/@batijs/shadcn-ui/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/shadcn-ui/files/$package.json.js +7 -7
- package/dist/boilerplates/@batijs/shadcn-ui/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/shadcn-ui/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/shared/files/$README.md.js +9 -9
- package/dist/boilerplates/@batijs/shared/files/package.json +3 -3
- package/dist/boilerplates/@batijs/shared/files/vite.config.ts +1 -20
- package/dist/boilerplates/@batijs/shared-db/files/server/db-middleware.ts +21 -15
- package/dist/boilerplates/@batijs/shared-db/types/server/db-middleware.d.ts +2 -2
- package/dist/boilerplates/@batijs/shared-server/files/$package.json.js +8 -14
- package/dist/boilerplates/@batijs/shared-server/files/server/create-todo-handler.ts +33 -34
- package/dist/boilerplates/@batijs/shared-server/types/server/create-todo-handler.d.ts +3 -4
- package/dist/boilerplates/@batijs/solid/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/solid/files/$package.json.js +11 -10
- package/dist/boilerplates/@batijs/solid/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/solid/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/solid/files/pages/+config.ts +6 -1
- package/dist/boilerplates/@batijs/solid/types/pages/+config.d.ts +70 -2
- package/dist/boilerplates/@batijs/solid-sentry/files/$package.json.js +7 -7
- package/dist/boilerplates/@batijs/sqlite/files/$.env.js +3 -3
- package/dist/boilerplates/@batijs/sqlite/files/$README.md.js +4 -3
- package/dist/boilerplates/@batijs/sqlite/files/$package.json.js +7 -7
- package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +9 -9
- package/dist/boilerplates/@batijs/tailwindcss/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +9 -9
- package/dist/boilerplates/@batijs/telefunc/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/telefunc/files/server/telefunc-handler.ts +34 -27
- package/dist/boilerplates/@batijs/telefunc/types/server/telefunc-handler.d.ts +2 -2
- package/dist/boilerplates/@batijs/trpc/files/$package.json.js +9 -9
- package/dist/boilerplates/@batijs/trpc/files/server/trpc-handler.ts +26 -18
- package/dist/boilerplates/@batijs/trpc/types/server/trpc-handler.d.ts +6 -1
- package/dist/boilerplates/@batijs/trpc/types/trpc/client.d.ts +1 -1
- package/dist/boilerplates/@batijs/ts-rest/files/$package.json.js +6 -6
- package/dist/boilerplates/@batijs/ts-rest/files/server/ts-rest-handler.ts +21 -14
- package/dist/boilerplates/@batijs/ts-rest/types/server/ts-rest-handler.d.ts +2 -2
- package/dist/boilerplates/@batijs/vercel/files/$package.json.js +8 -9
- package/dist/boilerplates/@batijs/vercel/files/pages/$+config.ts.js +3 -3
- package/dist/boilerplates/@batijs/vue/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/vue/files/$package.json.js +15 -14
- package/dist/boilerplates/@batijs/vue/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/vue/files/$vite.config.ts.js +6 -6
- package/dist/boilerplates/@batijs/vue/files/pages/+config.ts +6 -1
- package/dist/boilerplates/@batijs/vue/types/pages/+config.d.ts +1 -2
- package/dist/boilerplates/@batijs/vue-sentry/files/$package.json.js +8 -8
- package/dist/boilerplates/boilerplates.json +20 -0
- package/dist/{chunk-2SZ4N3E5.js → chunk-LRTYGOU6.js} +83539 -83181
- package/dist/index.js +720 -659
- package/dist/jiti-ZW3ADF2F-7XIEJQMO.js +2982 -0
- package/dist/src-5HGZFBZ3-KQZBBJSW.js +468 -0
- package/package.json +10 -10
- package/dist/boilerplates/@batijs/cloudflare/files/$tsconfig.json.js +0 -19
- package/dist/boilerplates/@batijs/cloudflare/files/$vite.config.ts.js +0 -34
- package/dist/boilerplates/@batijs/express/files/express-entry.ts +0 -102
- package/dist/boilerplates/@batijs/fastify/files/fastify-entry.ts +0 -140
- package/dist/boilerplates/@batijs/fastify/types/fastify-entry.d.ts +0 -3
- package/dist/boilerplates/@batijs/h3/files/h3-entry.ts +0 -144
- package/dist/boilerplates/@batijs/h3/types/h3-entry.d.ts +0 -4
- package/dist/boilerplates/@batijs/hono/files/$vite.config.ts.js +0 -36
- package/dist/boilerplates/@batijs/hono/files/hono-entry.node.ts +0 -31
- package/dist/boilerplates/@batijs/hono/files/hono-entry.ts +0 -74
- package/dist/boilerplates/@batijs/hono/types/hono-entry.d.ts +0 -6
- package/dist/boilerplates/@batijs/hono/types/hono-entry.node.d.ts +0 -1
- package/dist/boilerplates/@batijs/shared-server/files/server/vike-handler.ts +0 -20
- package/dist/boilerplates/@batijs/shared-server/types/server/vike-handler.d.ts +0 -2
- package/dist/boilerplates/@batijs/vercel/files/$tsconfig.json.js +0 -19
- package/dist/boilerplates/@batijs/vercel/files/$vite.config.ts.js +0 -27
- package/dist/jiti-W5Y5D52V-VBLACVBV.js +0 -30587
- package/dist/src-UAKFXUB2-DFO2P37K.js +0 -417
|
@@ -3,8 +3,8 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
$xs
|
|
7
|
+
} from "../../../../chunk-LRTYGOU6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
@@ -50,22 +50,19 @@ var require_package = __commonJS({
|
|
|
50
50
|
author: "",
|
|
51
51
|
license: "MIT",
|
|
52
52
|
devDependencies: {
|
|
53
|
-
"@auth/core": "^0.
|
|
53
|
+
"@auth/core": "^0.41.0",
|
|
54
54
|
"@batijs/compile": "workspace:*",
|
|
55
|
-
"@cloudflare/workers-types": "^4.
|
|
56
|
-
"@hono
|
|
57
|
-
"@
|
|
58
|
-
"@
|
|
59
|
-
"@types/
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
tsx: "^4.20.5",
|
|
67
|
-
vike: "^0.4.239",
|
|
68
|
-
vite: "^7.1.4"
|
|
55
|
+
"@cloudflare/workers-types": "^4.20251011.0",
|
|
56
|
+
"@photonjs/hono": "^0.1.3",
|
|
57
|
+
"@trpc/server": "^11.6.0",
|
|
58
|
+
"@types/aws-lambda": "^8.10.155",
|
|
59
|
+
"@types/node": "^20.19.21",
|
|
60
|
+
dotenv: "^17.2.3",
|
|
61
|
+
hono: "^4.9.12",
|
|
62
|
+
telefunc: "^0.2.15",
|
|
63
|
+
vike: "^0.4.242",
|
|
64
|
+
"vike-photon": "^0.1.10",
|
|
65
|
+
vite: "^7.1.10"
|
|
69
66
|
},
|
|
70
67
|
dependencies: {
|
|
71
68
|
"@batijs/core": "workspace:*"
|
|
@@ -79,26 +76,20 @@ var require_package = __commonJS({
|
|
|
79
76
|
}
|
|
80
77
|
},
|
|
81
78
|
exports: {
|
|
82
|
-
"./hono-entry": {
|
|
83
|
-
types: "./dist/types/hono-entry.d.ts"
|
|
84
|
-
},
|
|
85
79
|
"./entry_aws_lambda": {
|
|
86
80
|
types: "./dist/types/entry_aws_lambda.d.ts"
|
|
87
81
|
},
|
|
88
|
-
"./
|
|
89
|
-
types: "./dist/types/
|
|
82
|
+
"./server/entry": {
|
|
83
|
+
types: "./dist/types/server/entry.d.ts"
|
|
90
84
|
}
|
|
91
85
|
},
|
|
92
86
|
typesVersions: {
|
|
93
87
|
"*": {
|
|
94
|
-
"hono-entry": [
|
|
95
|
-
"./dist/types/hono-entry.d.ts"
|
|
96
|
-
],
|
|
97
88
|
entry_aws_lambda: [
|
|
98
89
|
"./dist/types/entry_aws_lambda.d.ts"
|
|
99
90
|
],
|
|
100
|
-
"
|
|
101
|
-
"./dist/types/
|
|
91
|
+
"server/entry": [
|
|
92
|
+
"./dist/types/server/entry.d.ts"
|
|
102
93
|
]
|
|
103
94
|
}
|
|
104
95
|
}
|
|
@@ -106,19 +97,11 @@ var require_package = __commonJS({
|
|
|
106
97
|
}
|
|
107
98
|
});
|
|
108
99
|
async function getPackageJson(props) {
|
|
109
|
-
const packageJson = await
|
|
110
|
-
return packageJson.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}).setScript("build", {
|
|
115
|
-
value: "vike build",
|
|
116
|
-
precedence: 1,
|
|
117
|
-
warnIfReplaced: true
|
|
118
|
-
}).setScript("preview", {
|
|
119
|
-
value: "cross-env NODE_ENV=production tsx ./hono-entry.node.ts",
|
|
120
|
-
precedence: 20
|
|
121
|
-
}).addDevDependencies(["@hono/vite-dev-server", "@types/node"]).addDevDependencies(["@types/aws-lambda"], props.meta.BATI.has("aws")).addDependencies(["@hono/node-server", "@universal-middleware/hono", "hono", "vite", "vike"]).addDependencies(["dotenv"], props.meta.BATI.has("auth0") || props.meta.BATI.hasDatabase).addDevDependencies(["tsx", "cross-env"], ["preview"]);
|
|
100
|
+
const packageJson = await $xs(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
|
|
101
|
+
return packageJson.addDevDependencies(["@types/node"]).addDevDependencies(["@types/aws-lambda", "vike-photon"], props.meta.BATI.has("aws")).addDependencies(["@photonjs/hono", "hono", "vite", "vike"]).addDependencies(
|
|
102
|
+
["dotenv"],
|
|
103
|
+
(props.meta.BATI.has("auth0") || props.meta.BATI.hasDatabase) && !props.meta.BATI.has("cloudflare")
|
|
104
|
+
);
|
|
122
105
|
}
|
|
123
106
|
export {
|
|
124
107
|
getPackageJson as default
|
|
@@ -9,8 +9,8 @@ Notes:
|
|
|
9
9
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
import
|
|
12
|
+
// @ts-expect-error loading file compiled by Vite
|
|
13
|
+
import app from "./dist/server/index.mjs";
|
|
14
14
|
import type { APIGatewayProxyResult, Handler } from "aws-lambda";
|
|
15
15
|
import { Hono } from "hono";
|
|
16
16
|
import type { LambdaContext, LambdaEvent } from "hono/aws-lambda";
|
|
@@ -23,13 +23,6 @@ type Bindings = {
|
|
|
23
23
|
|
|
24
24
|
const lambdaApp = new Hono<{ Bindings: Bindings }>();
|
|
25
25
|
|
|
26
|
-
lambdaApp.use(
|
|
27
|
-
"/*",
|
|
28
|
-
serveStatic({
|
|
29
|
-
root: `./dist/client/`,
|
|
30
|
-
}),
|
|
31
|
-
);
|
|
32
|
-
|
|
33
26
|
lambdaApp.route("/", app as Hono);
|
|
34
27
|
const awsHandler = handle(lambdaApp);
|
|
35
28
|
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// (BATI.has("auth0") || BATI.hasDatabase) && !BATI.has("cloudflare")
|
|
2
|
+
import "dotenv/config";
|
|
3
|
+
import { authjsHandler, authjsSessionMiddleware } from "@batijs/authjs/server/authjs-handler";
|
|
4
|
+
import { dbMiddleware } from "@batijs/shared-db/server/db-middleware";
|
|
5
|
+
import { createTodoHandler } from "@batijs/shared-server/server/create-todo-handler";
|
|
6
|
+
import { telefuncHandler } from "@batijs/telefunc/server/telefunc-handler";
|
|
7
|
+
import { trpcHandler } from "@batijs/trpc/server/trpc-handler";
|
|
8
|
+
import { tsRestHandler } from "@batijs/ts-rest/server/ts-rest-handler";
|
|
9
|
+
import { apply, serve } from "@photonjs/hono";
|
|
10
|
+
import { Hono } from "hono";
|
|
11
|
+
import { getMiddlewares } from "vike-photon/universal-middlewares";
|
|
12
|
+
|
|
13
|
+
const port = process.env.PORT ? parseInt(process.env.PORT, 10) : 3000;
|
|
14
|
+
|
|
15
|
+
export default startServer();
|
|
16
|
+
|
|
17
|
+
function startServer() {
|
|
18
|
+
const app = new Hono();
|
|
19
|
+
|
|
20
|
+
apply(app, [
|
|
21
|
+
//# BATI.has("aws")
|
|
22
|
+
...getMiddlewares({
|
|
23
|
+
static: {
|
|
24
|
+
// We need to override static root config when deploying to AWS
|
|
25
|
+
root: `${process.cwd()}/dist/client`,
|
|
26
|
+
},
|
|
27
|
+
}),
|
|
28
|
+
//# BATI.hasDatabase
|
|
29
|
+
// Make database available in Context as `context.db`
|
|
30
|
+
dbMiddleware,
|
|
31
|
+
//# BATI.has("authjs") || BATI.has("auth0")
|
|
32
|
+
// Append Auth.js session to context
|
|
33
|
+
authjsSessionMiddleware,
|
|
34
|
+
//# BATI.has("authjs") || BATI.has("auth0")
|
|
35
|
+
// Auth.js route. See https://authjs.dev/getting-started/installation
|
|
36
|
+
authjsHandler,
|
|
37
|
+
//# BATI.has("trpc")
|
|
38
|
+
// tRPC route. See https://trpc.io/docs/server/adapters
|
|
39
|
+
trpcHandler("/api/trpc"),
|
|
40
|
+
//# BATI.has("telefunc")
|
|
41
|
+
// Telefunc route. See https://telefunc.com
|
|
42
|
+
telefuncHandler,
|
|
43
|
+
//# BATI.has("ts-rest")
|
|
44
|
+
// ts-rest route. See https://ts-rest.com
|
|
45
|
+
tsRestHandler,
|
|
46
|
+
//# !BATI.has("telefunc") && !BATI.has("trpc") && !BATI.has("ts-rest")
|
|
47
|
+
createTodoHandler,
|
|
48
|
+
]);
|
|
49
|
+
|
|
50
|
+
return serve(app, {
|
|
51
|
+
port,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
@@ -3,14 +3,14 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
Wxs
|
|
7
|
+
} from "../../../../chunk-LRTYGOU6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/mantine/dist/files/$README.md.js
|
|
12
12
|
async function getReadme(props) {
|
|
13
|
-
const content = await
|
|
13
|
+
const content = await Wxs(props);
|
|
14
14
|
const todo = `
|
|
15
15
|
## Mantine
|
|
16
16
|
|
|
@@ -3,8 +3,8 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
$xs
|
|
7
|
+
} from "../../../../chunk-LRTYGOU6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
@@ -51,18 +51,18 @@ var require_package = __commonJS({
|
|
|
51
51
|
license: "MIT",
|
|
52
52
|
devDependencies: {
|
|
53
53
|
"@batijs/compile": "workspace:*",
|
|
54
|
-
"@mantine/core": "^8.
|
|
55
|
-
"@mantine/hooks": "^8.
|
|
56
|
-
"@types/node": "^20.19.
|
|
57
|
-
"@types/react": "^19.
|
|
58
|
-
"@types/react-dom": "^19.
|
|
54
|
+
"@mantine/core": "^8.3.5",
|
|
55
|
+
"@mantine/hooks": "^8.3.5",
|
|
56
|
+
"@types/node": "^20.19.21",
|
|
57
|
+
"@types/react": "^19.2.2",
|
|
58
|
+
"@types/react-dom": "^19.2.2",
|
|
59
59
|
postcss: "^8.5.6",
|
|
60
60
|
"postcss-preset-mantine": "^1.18.0",
|
|
61
61
|
"postcss-simple-vars": "^7.0.1",
|
|
62
|
-
react: "^19.
|
|
63
|
-
"react-dom": "^19.
|
|
64
|
-
"vike-react": "^0.6.
|
|
65
|
-
vite: "^7.1.
|
|
62
|
+
react: "^19.2.0",
|
|
63
|
+
"react-dom": "^19.2.0",
|
|
64
|
+
"vike-react": "^0.6.9",
|
|
65
|
+
vite: "^7.1.10",
|
|
66
66
|
"vite-plugin-compiled-react": "^1.3.1"
|
|
67
67
|
},
|
|
68
68
|
dependencies: {
|
|
@@ -110,7 +110,7 @@ var require_package = __commonJS({
|
|
|
110
110
|
}
|
|
111
111
|
});
|
|
112
112
|
async function getPackageJson(props) {
|
|
113
|
-
const packageJson = await
|
|
113
|
+
const packageJson = await $xs(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
|
|
114
114
|
return packageJson.addDevDependencies(["postcss", "postcss-preset-mantine", "postcss-simple-vars"]).addDependencies(["@mantine/core", "@mantine/hooks"]);
|
|
115
115
|
}
|
|
116
116
|
export {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
3
|
+
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
Wxs
|
|
7
|
+
} from "../../../../chunk-LRTYGOU6.js";
|
|
8
|
+
import "../../../../chunk-IAWYWZSL.js";
|
|
9
|
+
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
|
+
|
|
11
|
+
// ../../boilerplates/photon/dist/files/$README.md.js
|
|
12
|
+
async function getReadme(props) {
|
|
13
|
+
const content = await Wxs(props);
|
|
14
|
+
const photon = `
|
|
15
|
+
## Photon
|
|
16
|
+
[Photon](https://photonjs.dev) is a next-generation server and deployment toolkit.
|
|
17
|
+
It supports popular deployments ([self-hosted](https://photonjs.dev/self-hosted), [Cloudflare](https://photonjs.dev/cloudflare), [Vercel](https://photonjs.dev/vercel), and [more](https://photonjs.dev/deploy))
|
|
18
|
+
and popular servers ([Hono](https://photonjs.dev/hono), [Express](https://photonjs.dev/express), [Fastify](https://photonjs.dev/fastify), and [more](https://photonjs.dev/server)).
|
|
19
|
+
`;
|
|
20
|
+
content.addMarkdown(photon, {
|
|
21
|
+
filter: {
|
|
22
|
+
section: "features"
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
return content;
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
getReadme as default
|
|
29
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
3
|
+
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
$xs
|
|
7
|
+
} from "../../../../chunk-LRTYGOU6.js";
|
|
8
|
+
import "../../../../chunk-IAWYWZSL.js";
|
|
9
|
+
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
|
+
|
|
11
|
+
// ../../boilerplates/photon/dist/files/$package.json.js
|
|
12
|
+
var __create = Object.create;
|
|
13
|
+
var __defProp = Object.defineProperty;
|
|
14
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
15
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
16
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
17
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
18
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
19
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
20
|
+
};
|
|
21
|
+
var __copyProps = (to, from, except, desc) => {
|
|
22
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
23
|
+
for (let key of __getOwnPropNames(from))
|
|
24
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
25
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
26
|
+
}
|
|
27
|
+
return to;
|
|
28
|
+
};
|
|
29
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
30
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
31
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
32
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
33
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
34
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
35
|
+
mod
|
|
36
|
+
));
|
|
37
|
+
var require_package = __commonJS({
|
|
38
|
+
"package.json"(exports, module) {
|
|
39
|
+
module.exports = {
|
|
40
|
+
name: "@batijs/photon",
|
|
41
|
+
private: true,
|
|
42
|
+
version: "0.0.1",
|
|
43
|
+
description: "",
|
|
44
|
+
type: "module",
|
|
45
|
+
scripts: {
|
|
46
|
+
"check-types": "tsc --noEmit",
|
|
47
|
+
build: "bati-compile-boilerplate"
|
|
48
|
+
},
|
|
49
|
+
keywords: [],
|
|
50
|
+
author: "",
|
|
51
|
+
license: "MIT",
|
|
52
|
+
devDependencies: {
|
|
53
|
+
"@batijs/compile": "workspace:*",
|
|
54
|
+
"@types/node": "^20.19.21",
|
|
55
|
+
"vike-photon": "^0.1.10"
|
|
56
|
+
},
|
|
57
|
+
dependencies: {
|
|
58
|
+
"@batijs/core": "workspace:*"
|
|
59
|
+
},
|
|
60
|
+
files: [
|
|
61
|
+
"dist/"
|
|
62
|
+
],
|
|
63
|
+
bati: {
|
|
64
|
+
if: {
|
|
65
|
+
flag: {
|
|
66
|
+
$in: [
|
|
67
|
+
"h3",
|
|
68
|
+
"express",
|
|
69
|
+
"hono",
|
|
70
|
+
"fastify",
|
|
71
|
+
"vercel",
|
|
72
|
+
"cloudflare"
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
exports: {
|
|
78
|
+
"./+photon": {
|
|
79
|
+
types: "./dist/types/+photon.d.ts"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
typesVersions: {
|
|
83
|
+
"*": {
|
|
84
|
+
"+photon": [
|
|
85
|
+
"./dist/types/+photon.d.ts"
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
async function getPackageJson(props) {
|
|
93
|
+
const packageJson = await $xs(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
|
|
94
|
+
return packageJson.setScript("dev", {
|
|
95
|
+
value: "vike dev",
|
|
96
|
+
precedence: 20,
|
|
97
|
+
warnIfReplaced: true
|
|
98
|
+
}).setScript("build", {
|
|
99
|
+
value: "vike build",
|
|
100
|
+
precedence: 20,
|
|
101
|
+
warnIfReplaced: true
|
|
102
|
+
}).setScript("prod", {
|
|
103
|
+
value: "vike build && node ./dist/server/index.mjs",
|
|
104
|
+
precedence: 20
|
|
105
|
+
}).addDependencies(["vike-photon"]);
|
|
106
|
+
}
|
|
107
|
+
export {
|
|
108
|
+
getPackageJson as default
|
|
109
|
+
};
|
|
@@ -3,8 +3,8 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
Hxs
|
|
7
|
+
} from "../../../../chunk-LRTYGOU6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
@@ -28,7 +28,7 @@ async function getPnpmWorkspace(props) {
|
|
|
28
28
|
];
|
|
29
29
|
const intersection = intersect(dependenciesApproveBuild, deps);
|
|
30
30
|
if (intersection.length === 0) return;
|
|
31
|
-
const pnpmWorkspace = await
|
|
31
|
+
const pnpmWorkspace = await Hxs(props, { fallbackEmpty: true });
|
|
32
32
|
if (!pnpmWorkspace.has("onlyBuiltDependencies")) {
|
|
33
33
|
pnpmWorkspace.set("onlyBuiltDependencies", []);
|
|
34
34
|
}
|
|
@@ -3,8 +3,8 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
$xs
|
|
7
|
+
} from "../../../../chunk-LRTYGOU6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
@@ -51,7 +51,7 @@ var require_package = __commonJS({
|
|
|
51
51
|
license: "MIT",
|
|
52
52
|
devDependencies: {
|
|
53
53
|
"@batijs/compile": "workspace:*",
|
|
54
|
-
"@types/node": "^20.19.
|
|
54
|
+
"@types/node": "^20.19.21",
|
|
55
55
|
prettier: "^3.6.2"
|
|
56
56
|
},
|
|
57
57
|
dependencies: {
|
|
@@ -69,7 +69,7 @@ var require_package = __commonJS({
|
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
71
|
async function getPackageJson(props) {
|
|
72
|
-
const packageJson = await
|
|
72
|
+
const packageJson = await $xs(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
|
|
73
73
|
return packageJson.addDevDependencies(["prettier"]);
|
|
74
74
|
}
|
|
75
75
|
export {
|
|
@@ -3,15 +3,15 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
kUs
|
|
7
|
+
} from "../../../../chunk-LRTYGOU6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/prisma/dist/files/$.env.js
|
|
12
12
|
async function getEnv(props) {
|
|
13
13
|
const envContent = await props.readfile?.();
|
|
14
|
-
return
|
|
14
|
+
return kUs(
|
|
15
15
|
envContent,
|
|
16
16
|
"DATABASE_URL",
|
|
17
17
|
"postgresql://johndoe:randompassword@localhost:5432/mydb?schema=public",
|
|
@@ -3,14 +3,14 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
Wxs
|
|
7
|
+
} from "../../../../chunk-LRTYGOU6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/prisma/dist/files/$README.md.js
|
|
12
12
|
async function getReadme(props) {
|
|
13
|
-
const content = await
|
|
13
|
+
const content = await Wxs(props);
|
|
14
14
|
const todo = `
|
|
15
15
|
## *Prisma*
|
|
16
16
|
### Setup
|
|
@@ -3,8 +3,8 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
$xs
|
|
7
|
+
} from "../../../../chunk-LRTYGOU6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
@@ -51,10 +51,10 @@ var require_package = __commonJS({
|
|
|
51
51
|
license: "MIT",
|
|
52
52
|
devDependencies: {
|
|
53
53
|
"@batijs/compile": "workspace:*",
|
|
54
|
-
"@prisma/client": "^6.
|
|
55
|
-
"@types/node": "^20.19.
|
|
54
|
+
"@prisma/client": "^6.17.1",
|
|
55
|
+
"@types/node": "^20.19.21",
|
|
56
56
|
colorette: "^2.0.20",
|
|
57
|
-
prisma: "^6.
|
|
57
|
+
prisma: "^6.17.1"
|
|
58
58
|
},
|
|
59
59
|
dependencies: {
|
|
60
60
|
"@batijs/core": "workspace:*"
|
|
@@ -71,7 +71,7 @@ var require_package = __commonJS({
|
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
73
|
async function getPackageJson(props) {
|
|
74
|
-
const packageJson = await
|
|
74
|
+
const packageJson = await $xs(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
|
|
75
75
|
return packageJson.setScript("prisma:studio", {
|
|
76
76
|
value: "prisma studio",
|
|
77
77
|
precedence: 1
|
|
@@ -3,14 +3,14 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
Wxs
|
|
7
|
+
} from "../../../../chunk-LRTYGOU6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/react/dist/files/$README.md.js
|
|
12
12
|
async function getReadme(props) {
|
|
13
|
-
const content = await
|
|
13
|
+
const content = await Wxs(props);
|
|
14
14
|
const about = `
|
|
15
15
|
## React
|
|
16
16
|
|
|
@@ -3,8 +3,8 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
$xs
|
|
7
|
+
} from "../../../../chunk-LRTYGOU6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
@@ -54,18 +54,19 @@ var require_package = __commonJS({
|
|
|
54
54
|
"@babel/plugin-syntax-flow": "^7.27.1",
|
|
55
55
|
"@babel/plugin-transform-react-jsx": "^7.27.1",
|
|
56
56
|
"@batijs/compile": "workspace:*",
|
|
57
|
-
"@mantine/core": "^8.
|
|
58
|
-
"@types/node": "^20.19.
|
|
59
|
-
"@types/react": "^19.
|
|
60
|
-
"@types/react-dom": "^19.
|
|
61
|
-
"@vitejs/plugin-react": "^5.0.
|
|
62
|
-
react: "^19.
|
|
63
|
-
"react-dom": "^19.
|
|
64
|
-
tailwindcss: "^4.1.
|
|
65
|
-
typescript: "^5.9.
|
|
66
|
-
vike: "^0.4.
|
|
67
|
-
"vike-
|
|
68
|
-
|
|
57
|
+
"@mantine/core": "^8.3.5",
|
|
58
|
+
"@types/node": "^20.19.21",
|
|
59
|
+
"@types/react": "^19.2.2",
|
|
60
|
+
"@types/react-dom": "^19.2.2",
|
|
61
|
+
"@vitejs/plugin-react": "^5.0.4",
|
|
62
|
+
react: "^19.2.0",
|
|
63
|
+
"react-dom": "^19.2.0",
|
|
64
|
+
tailwindcss: "^4.1.14",
|
|
65
|
+
typescript: "^5.9.3",
|
|
66
|
+
vike: "^0.4.242",
|
|
67
|
+
"vike-photon": "^0.1.10",
|
|
68
|
+
"vike-react": "^0.6.9",
|
|
69
|
+
vite: "^7.1.10",
|
|
69
70
|
"vite-plugin-compiled-react": "^1.3.1"
|
|
70
71
|
},
|
|
71
72
|
dependencies: {
|
|
@@ -185,7 +186,7 @@ var require_package = __commonJS({
|
|
|
185
186
|
}
|
|
186
187
|
});
|
|
187
188
|
async function getPackageJson(props) {
|
|
188
|
-
const packageJson = await
|
|
189
|
+
const packageJson = await $xs(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
|
|
189
190
|
return packageJson.addDevDependencies(["vite", "@types/react", "@types/react-dom"]).addDependencies(["@vitejs/plugin-react", "react", "react-dom", "vike", "vike-react"]);
|
|
190
191
|
}
|
|
191
192
|
export {
|
|
@@ -3,14 +3,14 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "../../../../chunk-
|
|
6
|
+
Jxs
|
|
7
|
+
} from "../../../../chunk-LRTYGOU6.js";
|
|
8
8
|
import "../../../../chunk-IAWYWZSL.js";
|
|
9
9
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
10
|
|
|
11
11
|
// ../../boilerplates/react/dist/files/$tsconfig.json.js
|
|
12
12
|
async function getTsConfig(props) {
|
|
13
|
-
const tsConfig = await
|
|
13
|
+
const tsConfig = await Jxs(props);
|
|
14
14
|
tsConfig.compilerOptions.jsx = "react-jsx";
|
|
15
15
|
tsConfig.compilerOptions.jsxImportSource = "react";
|
|
16
16
|
tsConfig.compilerOptions.types = [...tsConfig.compilerOptions.types ?? [], "vike-react"];
|
|
@@ -3,16 +3,16 @@ import { createRequire as createRequire_BATI_CLI } from 'module';
|
|
|
3
3
|
const require = createRequire_BATI_CLI(import.meta.url);
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from "../../../../chunk-
|
|
6
|
+
Kxs,
|
|
7
|
+
hni
|
|
8
|
+
} from "../../../../chunk-LRTYGOU6.js";
|
|
9
9
|
import "../../../../chunk-IAWYWZSL.js";
|
|
10
10
|
import "../../../../chunk-DHZ7AZKP.js";
|
|
11
11
|
|
|
12
12
|
// ../../boilerplates/react/dist/files/$vite.config.ts.js
|
|
13
13
|
async function getViteConfig(props) {
|
|
14
|
-
const mod = await
|
|
15
|
-
|
|
14
|
+
const mod = await Kxs(props);
|
|
15
|
+
hni(mod, {
|
|
16
16
|
from: "@vitejs/plugin-react",
|
|
17
17
|
constructor: "react"
|
|
18
18
|
});
|