@batijs/cli 0.0.448 → 0.0.450
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 -6
- package/dist/boilerplates/@batijs/auth0/files/$README.md.js +4 -4
- package/dist/boilerplates/@batijs/authjs/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/aws/files/$README.md.js +4 -4
- package/dist/boilerplates/@batijs/aws/files/$package.json.js +8 -8
- package/dist/boilerplates/@batijs/aws/files/$tsconfig.json.js +4 -4
- package/dist/boilerplates/@batijs/biome/files/$package.json.js +4 -4
- package/dist/boilerplates/@batijs/cloudflare/files/$package.json.js +7 -8
- package/dist/boilerplates/@batijs/cloudflare/files/$tsconfig.json.js +4 -4
- package/dist/boilerplates/@batijs/cloudflare/files/$vite.config.ts.js +9 -9
- package/dist/boilerplates/@batijs/compiled/files/$package.json.js +4 -4
- package/dist/boilerplates/@batijs/compiled/files/$vite.config.ts.js +6 -6
- package/dist/boilerplates/@batijs/d1/files/$README.md.js +4 -4
- package/dist/boilerplates/@batijs/d1/files/$package.json.js +7 -7
- package/dist/boilerplates/@batijs/d1/files/$tsconfig.json.js +4 -4
- package/dist/boilerplates/@batijs/d1/files/$wrangler.toml.js +2 -2
- package/dist/boilerplates/@batijs/d1-sqlite/files/$package.json.js +6 -6
- package/dist/boilerplates/@batijs/drizzle/files/$.env.js +4 -4
- package/dist/boilerplates/@batijs/drizzle/files/$README.md.js +4 -4
- package/dist/boilerplates/@batijs/drizzle/files/$package.json.js +4 -4
- package/dist/boilerplates/@batijs/eslint/files/$package.json.js +6 -6
- package/dist/boilerplates/@batijs/express/files/$package.json.js +7 -7
- package/dist/boilerplates/@batijs/fastify/files/$package.json.js +7 -7
- package/dist/boilerplates/@batijs/google-analytics/files/$.env.js +4 -4
- package/dist/boilerplates/@batijs/h3/files/$package.json.js +7 -7
- package/dist/boilerplates/@batijs/hono/files/$package.json.js +10 -10
- package/dist/boilerplates/@batijs/hono/files/$vite.config.ts.js +6 -6
- package/dist/boilerplates/@batijs/mantine/files/$README.md.js +4 -4
- package/dist/boilerplates/@batijs/mantine/files/$package.json.js +7 -7
- package/dist/boilerplates/@batijs/pnpm/files/$pnpm-workspace.yaml.js +4 -4
- package/dist/boilerplates/@batijs/prettier/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/prisma/files/$.env.js +4 -4
- package/dist/boilerplates/@batijs/prisma/files/$README.md.js +4 -4
- package/dist/boilerplates/@batijs/prisma/files/$package.json.js +6 -6
- package/dist/boilerplates/@batijs/react/files/$README.md.js +4 -4
- package/dist/boilerplates/@batijs/react/files/$package.json.js +7 -7
- package/dist/boilerplates/@batijs/react/files/$tsconfig.json.js +4 -4
- package/dist/boilerplates/@batijs/react/files/$vite.config.ts.js +7 -9
- package/dist/boilerplates/@batijs/react-sentry/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/sentry/files/$.env.js +5 -5
- package/dist/boilerplates/@batijs/sentry/files/$README.md.js +4 -4
- package/dist/boilerplates/@batijs/sentry/files/$package.json.js +4 -4
- package/dist/boilerplates/@batijs/sentry/files/$vite.config.ts.js +8 -8
- package/dist/boilerplates/@batijs/sentry/files/pages/$+client.ts.js +10 -10
- package/dist/boilerplates/@batijs/shadcn-ui/files/$README.md.js +4 -4
- package/dist/boilerplates/@batijs/shadcn-ui/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/shadcn-ui/files/$tsconfig.json.js +4 -4
- package/dist/boilerplates/@batijs/shadcn-ui/files/$vite.config.ts.js +6 -6
- package/dist/boilerplates/@batijs/shared/files/$README.md.js +10 -10
- package/dist/boilerplates/@batijs/shared/files/package.json +1 -1
- package/dist/boilerplates/@batijs/shared/files/vite.config.ts +4 -15
- package/dist/boilerplates/@batijs/shared-server/files/$package.json.js +6 -7
- package/dist/boilerplates/@batijs/solid/files/$README.md.js +4 -4
- package/dist/boilerplates/@batijs/solid/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/solid/files/$tsconfig.json.js +4 -4
- package/dist/boilerplates/@batijs/solid/files/$vite.config.ts.js +6 -6
- package/dist/boilerplates/@batijs/solid-sentry/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/sqlite/files/$.env.js +4 -4
- package/dist/boilerplates/@batijs/sqlite/files/$README.md.js +4 -4
- package/dist/boilerplates/@batijs/sqlite/files/$package.json.js +4 -4
- package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/tailwindcss/files/$vite.config.ts.js +6 -6
- package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +6 -6
- package/dist/boilerplates/@batijs/telefunc/files/$vite.config.ts.js +6 -6
- package/dist/boilerplates/@batijs/trpc/files/$package.json.js +7 -7
- 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/vercel/files/$package.json.js +5 -5
- package/dist/boilerplates/@batijs/vercel/files/$tsconfig.json.js +4 -4
- package/dist/boilerplates/@batijs/vercel/files/$vite.config.ts.js +6 -6
- package/dist/boilerplates/@batijs/vercel/files/pages/$+config.ts.js +4 -4
- package/dist/boilerplates/@batijs/vue/files/$README.md.js +4 -4
- package/dist/boilerplates/@batijs/vue/files/$package.json.js +8 -8
- package/dist/boilerplates/@batijs/vue/files/$tsconfig.json.js +4 -4
- package/dist/boilerplates/@batijs/vue/files/$vite.config.ts.js +7 -7
- package/dist/boilerplates/@batijs/vue-sentry/files/$package.json.js +6 -6
- package/dist/boilerplates/boilerplates.json +0 -12
- package/dist/{chunk-V7W2TXCE.js → chunk-IAWYWZSL.js} +3 -3
- package/dist/{chunk-2HJGZ6VH.js → chunk-TQSLK5E5.js} +86804 -86524
- package/dist/index.js +26 -48
- package/dist/{jiti-M7FFFMJY-RVXB3PI2.js → jiti-D5GFFX4C-B5MVETTC.js} +4 -4
- package/dist/{src-C44KL7DE-XYL3IAQY.js → src-UAKFXUB2-DFO2P37K.js} +4 -4
- package/package.json +5 -5
- package/dist/boilerplates/@batijs/hattip/files/$package.json.js +0 -121
- package/dist/boilerplates/@batijs/hattip/files/entry_aws_lambda.ts +0 -37
- package/dist/boilerplates/@batijs/hattip/files/hattip-entry.ts +0 -77
- package/dist/boilerplates/@batijs/hattip/types/entry_aws_lambda.d.ts +0 -2
- package/dist/boilerplates/@batijs/hattip/types/hattip-entry.d.ts +0 -6
package/dist/index.js
CHANGED
|
@@ -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
|
-
|
|
8
|
-
ZZr,
|
|
9
|
-
cst,
|
|
6
|
+
Wms,
|
|
7
|
+
bRe,
|
|
10
8
|
export_which,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
hen,
|
|
10
|
+
n2s,
|
|
11
|
+
ost
|
|
12
|
+
} from "./chunk-TQSLK5E5.js";
|
|
13
|
+
import "./chunk-IAWYWZSL.js";
|
|
14
14
|
import {
|
|
15
15
|
__commonJS,
|
|
16
16
|
__require,
|
|
@@ -13425,8 +13425,8 @@ async function mergeDts({
|
|
|
13425
13425
|
filepath,
|
|
13426
13426
|
meta
|
|
13427
13427
|
}) {
|
|
13428
|
-
const previousAst =
|
|
13429
|
-
const currentAst =
|
|
13428
|
+
const previousAst = bRe(previousContent);
|
|
13429
|
+
const currentAst = bRe(fileContent);
|
|
13430
13430
|
for (const imp of previousAst.imports.$items) {
|
|
13431
13431
|
currentAst.imports[imp.local] = imp;
|
|
13432
13432
|
}
|
|
@@ -13443,7 +13443,7 @@ async function mergeDts({
|
|
|
13443
13443
|
currentAst.$ast.body.splice(index, 0, node);
|
|
13444
13444
|
}
|
|
13445
13445
|
}
|
|
13446
|
-
const res = await
|
|
13446
|
+
const res = await Wms(currentAst.generate().code, meta, {
|
|
13447
13447
|
filepath
|
|
13448
13448
|
});
|
|
13449
13449
|
return clearExports(res.code, meta);
|
|
@@ -13464,7 +13464,7 @@ async function executeOperationFile(op, {
|
|
|
13464
13464
|
}) {
|
|
13465
13465
|
const code = await readFile(op.sourceAbsolute, { encoding: "utf-8" });
|
|
13466
13466
|
const filepath = relative(op.source, op.sourceAbsolute);
|
|
13467
|
-
const result = await
|
|
13467
|
+
const result = await Wms(code, meta, {
|
|
13468
13468
|
filepath
|
|
13469
13469
|
});
|
|
13470
13470
|
let fileContent = result.code;
|
|
@@ -13502,7 +13502,7 @@ async function transformFileAfterExec(filepath, fileContent) {
|
|
|
13502
13502
|
case ".js":
|
|
13503
13503
|
case ".tsx":
|
|
13504
13504
|
case ".jsx":
|
|
13505
|
-
return
|
|
13505
|
+
return ost(fileContent, {
|
|
13506
13506
|
filepath
|
|
13507
13507
|
});
|
|
13508
13508
|
case ".env":
|
|
@@ -13808,7 +13808,7 @@ Please report this issue to https://github.com/vikejs/bati`
|
|
|
13808
13808
|
}
|
|
13809
13809
|
}
|
|
13810
13810
|
|
|
13811
|
-
// ../features/dist/chunk-
|
|
13811
|
+
// ../features/dist/chunk-KDRIUZA5.js
|
|
13812
13812
|
var features = [
|
|
13813
13813
|
// Vike
|
|
13814
13814
|
{
|
|
@@ -14139,16 +14139,6 @@ var features = [
|
|
|
14139
14139
|
}
|
|
14140
14140
|
]
|
|
14141
14141
|
},
|
|
14142
|
-
{
|
|
14143
|
-
category: "Server",
|
|
14144
|
-
label: "HatTip",
|
|
14145
|
-
flag: "hattip",
|
|
14146
|
-
image: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2aWV3Qm94PSIwIDAgMjYzIDIyOCIgc3R5bGU9ImZpbGwtcnVsZTpldmVub2RkO2NsaXAtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoyOyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyBpZD0iSGF0VGlwTG9nbyIgdHJhbnNmb3JtPSJtYXRyaXgoMSwgMCwgMCwgMSwgMC43MTcxMDUsIDcuODg4MTU4KSI+CiAgICA8cGF0aCBkPSJNMzQuNjMsMTYyLjMxMWMtMCwwIC0xMi4xNjEsLTYxLjc4IC0xMi42NzksLTgxLjAxOGMwLC0wIDEuODkyLC01My4zNDIgNzUuMDU3LC02OC41OGMwLDAgNzkuMTcxLC0zMC4wNzYgMTA1LjUzOCwyNC4zMzZjMCwtMCAyMy4wNDMsNTcuMzIzIDI1LjM0LDc2Ljg5Yy0wLC0wIC01NC40NywzOS4wNzMgLTE5MS44MjEsNTQuMzY3bC0xLjQzNSwtNS45OTVaIiBzdHlsZT0iZmlsbDojMjMzNjNmO2ZpbGwtcnVsZTpub256ZXJvOyIvPgogICAgPHBhdGggZD0iTTM5LjI3NywxODEuNjkybC0zLjIxMiwtMTMuMzg2YzAsMCAxMjEuOTM0LC0xMS4yMzUgMTkxLjgyMSwtNTQuMzY3bDMuODg3LDE2LjIwNGMtMCwwIC04OS4xLDU5LjYzNyAtMTkyLjQ5Niw1MS41NDlaIiBzdHlsZT0iZmlsbDojMDRiNTc4O2ZpbGwtcnVsZTpub256ZXJvOyIvPgogICAgPHBhdGggZD0iTTMzLjg1MiwxNTguMDI0bDUuNDI1LDIzLjY2OGMtMCwtMCA4OS4wNTksMTEuMTM3IDE5Mi40OTYsLTUxLjU0OWwtMy44ODcsLTE2LjIwNGwyNC44ODksLTEyLjAwNmMwLDAgNy4yMzEsLTMuOTczIDQuNTI0LDcuNDgxYy0wLC0wIDEuNjM5LDU3Ljk1MyAtMTMwLjI1MSw4Ny4zMTRjLTEyNi43NTQsMjguMjE4IC0xMzEuMzg1LC0zMi41NzUgLTExNy4wOTQsLTM1LjYxM2wyMy44OTgsLTMuMDkxWiIgc3R5bGU9ImZpbGw6IzIzMzY0MDtmaWxsLXJ1bGU6bm9uemVybzsiLz4KICA8L2c+Cjwvc3ZnPg==",
|
|
14147
|
-
url: "https://github.com/hattipjs/hattip",
|
|
14148
|
-
spectrum: "bleeding_edge",
|
|
14149
|
-
tagline: "Like Express, but for the future",
|
|
14150
|
-
repo: "hattipjs/hattip"
|
|
14151
|
-
},
|
|
14152
14142
|
// Database
|
|
14153
14143
|
{
|
|
14154
14144
|
category: "Database",
|
|
@@ -14390,17 +14380,13 @@ var RulesMessage = /* @__PURE__ */ ((RulesMessage2) => {
|
|
|
14390
14380
|
RulesMessage2[RulesMessage2["ERROR_MANTINE_R_REACT"] = 6] = "ERROR_MANTINE_R_REACT";
|
|
14391
14381
|
RulesMessage2[RulesMessage2["ERROR_SHADCN_R_REACT"] = 7] = "ERROR_SHADCN_R_REACT";
|
|
14392
14382
|
RulesMessage2[RulesMessage2["WARN_SHADCN_R_TAILWINDCSS"] = 8] = "WARN_SHADCN_R_TAILWINDCSS";
|
|
14393
|
-
RulesMessage2[RulesMessage2["
|
|
14394
|
-
RulesMessage2[RulesMessage2["INFO_STACKBLITZ_COMPAT"] = 10] = "INFO_STACKBLITZ_COMPAT";
|
|
14383
|
+
RulesMessage2[RulesMessage2["INFO_STACKBLITZ_COMPAT"] = 9] = "INFO_STACKBLITZ_COMPAT";
|
|
14395
14384
|
return RulesMessage2;
|
|
14396
14385
|
})(RulesMessage || {});
|
|
14397
14386
|
function requires(message, ifPresent, mustAlsoInclude) {
|
|
14398
14387
|
const m = Array.from(prepare(mustAlsoInclude));
|
|
14399
14388
|
return (fts) => fts.has(ifPresent) && !m.every((r2) => fts.has(r2)) && message;
|
|
14400
14389
|
}
|
|
14401
|
-
function includes(message, ifPresent) {
|
|
14402
|
-
return (fts) => fts.has(ifPresent) && message;
|
|
14403
|
-
}
|
|
14404
14390
|
function filter(message, callback) {
|
|
14405
14391
|
return (fts) => callback(fts) && message;
|
|
14406
14392
|
}
|
|
@@ -14417,12 +14403,11 @@ function prepare(fts) {
|
|
|
14417
14403
|
var rules_default = [
|
|
14418
14404
|
requires(0, "Auth", ["Server"]),
|
|
14419
14405
|
requires(1, "compiled-css", ["react"]),
|
|
14420
|
-
includes(9, "hattip"),
|
|
14421
14406
|
requires(2, "drizzle", ["Server"]),
|
|
14422
14407
|
requires(3, "Data fetching", ["Server"]),
|
|
14423
14408
|
filter(4, (fts) => {
|
|
14424
14409
|
if (fts.has("cloudflare")) {
|
|
14425
|
-
if (fts.has("hono")
|
|
14410
|
+
if (fts.has("hono")) {
|
|
14426
14411
|
return false;
|
|
14427
14412
|
}
|
|
14428
14413
|
return fts.has("Server");
|
|
@@ -14431,7 +14416,7 @@ var rules_default = [
|
|
|
14431
14416
|
}),
|
|
14432
14417
|
filter(5, (fts) => {
|
|
14433
14418
|
if (fts.has("aws")) {
|
|
14434
|
-
if (fts.has("hono")
|
|
14419
|
+
if (fts.has("hono")) {
|
|
14435
14420
|
return false;
|
|
14436
14421
|
}
|
|
14437
14422
|
return true;
|
|
@@ -14456,7 +14441,7 @@ var rules_default = [
|
|
|
14456
14441
|
}
|
|
14457
14442
|
return false;
|
|
14458
14443
|
}),
|
|
14459
|
-
filter(
|
|
14444
|
+
filter(9, (fts) => {
|
|
14460
14445
|
return fts.has("drizzle") || fts.has("sqlite") || fts.has("cloudflare");
|
|
14461
14446
|
})
|
|
14462
14447
|
];
|
|
@@ -16929,7 +16914,7 @@ var createDefaultQueryTester = function(query, options) {
|
|
|
16929
16914
|
// package.json
|
|
16930
16915
|
var package_default = {
|
|
16931
16916
|
name: "@batijs/cli",
|
|
16932
|
-
version: "0.0.
|
|
16917
|
+
version: "0.0.450",
|
|
16933
16918
|
type: "module",
|
|
16934
16919
|
scripts: {
|
|
16935
16920
|
"check-types": "tsc --noEmit",
|
|
@@ -16985,12 +16970,6 @@ function warning(value) {
|
|
|
16985
16970
|
value
|
|
16986
16971
|
};
|
|
16987
16972
|
}
|
|
16988
|
-
function info(value) {
|
|
16989
|
-
return {
|
|
16990
|
-
type: "info",
|
|
16991
|
-
value
|
|
16992
|
-
};
|
|
16993
|
-
}
|
|
16994
16973
|
var rulesMessages = {
|
|
16995
16974
|
[RulesMessage.ERROR_AUTH_R_SERVER]: error(
|
|
16996
16975
|
`A ${inverse(bold("Server"))} is required when using ${inverse(
|
|
@@ -17003,7 +16982,6 @@ var rulesMessages = {
|
|
|
17003
16982
|
[RulesMessage.ERROR_MANTINE_R_REACT]: error(
|
|
17004
16983
|
`${inverse(bold("React"))} is required when using ${inverse(bold("Mantine"))}`
|
|
17005
16984
|
),
|
|
17006
|
-
[RulesMessage.INFO_HATTIP]: info(`${inverse(bold("HatTip"))} is an experimental project`),
|
|
17007
16985
|
[RulesMessage.ERROR_DRIZZLE_R_SERVER]: error(
|
|
17008
16986
|
`A ${inverse(bold("Server"))} is required when using ${inverse(bold("Drizzle"))}`
|
|
17009
16987
|
),
|
|
@@ -17011,11 +16989,11 @@ var rulesMessages = {
|
|
|
17011
16989
|
`A ${inverse(bold("Server"))} is required when using ${inverse(bold("Data fetching"))}`
|
|
17012
16990
|
),
|
|
17013
16991
|
[RulesMessage.ERROR_CLOUDFLARE_R_COMPAT_SERVER]: error(
|
|
17014
|
-
`${inverse(bold("Cloudflare"))} is only compatible with ${inverse(bold("Hono"))}
|
|
17015
|
-
Choose
|
|
16992
|
+
`${inverse(bold("Cloudflare"))} is only compatible with ${inverse(bold("Hono"))}.
|
|
16993
|
+
Choose Hono or remove selected Server`
|
|
17016
16994
|
),
|
|
17017
16995
|
[RulesMessage.ERROR_AWS_R_COMPAT_SERVER]: error(
|
|
17018
|
-
`${inverse(bold("AWS"))} deployment is only compatible with ${inverse(bold("Hono"))}
|
|
16996
|
+
`${inverse(bold("AWS"))} deployment is only compatible with ${inverse(bold("Hono"))}`
|
|
17019
16997
|
),
|
|
17020
16998
|
[RulesMessage.ERROR_SHADCN_R_REACT]: error(
|
|
17021
16999
|
`${inverse(bold("shadcn/ui"))} is only compatible with ${inverse(bold("React"))}`
|
|
@@ -17030,7 +17008,7 @@ Choose one of them, or simply remove selected Server`
|
|
|
17030
17008
|
var __filename = fileURLToPath(import.meta.url);
|
|
17031
17009
|
var __dirname = dirname(__filename);
|
|
17032
17010
|
var isWin2 = process.platform === "win32";
|
|
17033
|
-
var pm =
|
|
17011
|
+
var pm = n2s();
|
|
17034
17012
|
function boilerplatesDir() {
|
|
17035
17013
|
if (existsSync2(join(__dirname, "boilerplates", "boilerplates.json"))) {
|
|
17036
17014
|
return join(__dirname, "boilerplates");
|
|
@@ -17064,10 +17042,10 @@ function findDescription(key) {
|
|
|
17064
17042
|
}
|
|
17065
17043
|
}
|
|
17066
17044
|
function printOK(dist, flags2) {
|
|
17067
|
-
const arrow0 =
|
|
17068
|
-
const book0 =
|
|
17069
|
-
const list3 =
|
|
17070
|
-
const cmd3 =
|
|
17045
|
+
const arrow0 = hen("\u2192", blueBright);
|
|
17046
|
+
const book0 = hen("\u{1F4DA}", blueBright);
|
|
17047
|
+
const list3 = hen("-", void 0, 3);
|
|
17048
|
+
const cmd3 = hen("$", gray, 3);
|
|
17071
17049
|
console.log(bold(`${green("\u2713")} Project created at ${cyan(dist)} with:`));
|
|
17072
17050
|
console.log(list3(green("Vike")));
|
|
17073
17051
|
for (const key of flags2) {
|
|
@@ -7,15 +7,15 @@ import {
|
|
|
7
7
|
n,
|
|
8
8
|
o,
|
|
9
9
|
q
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IAWYWZSL.js";
|
|
11
11
|
import "./chunk-DHZ7AZKP.js";
|
|
12
12
|
|
|
13
|
-
// ../core/dist/jiti-
|
|
14
|
-
import { createRequire } from "module";
|
|
13
|
+
// ../core/dist/jiti-D5GFFX4C.js
|
|
14
|
+
import { createRequire as BATI_core_createRequire } from "module";
|
|
15
15
|
import { fileURLToPath as BATI_fileURLToPath } from "url";
|
|
16
16
|
import { dirname as BATI_dirname } from "path";
|
|
17
17
|
import { createRequire as xr } from "module";
|
|
18
|
-
var require2 =
|
|
18
|
+
var require2 = BATI_core_createRequire(import.meta.url);
|
|
19
19
|
var __filename = BATI_fileURLToPath(import.meta.url);
|
|
20
20
|
var __dirname = BATI_dirname(__filename);
|
|
21
21
|
var Ji = o((kr, Xi) => {
|
|
@@ -4,17 +4,17 @@ const require = createRequire_BATI_CLI(import.meta.url);
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
n
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IAWYWZSL.js";
|
|
8
8
|
import "./chunk-DHZ7AZKP.js";
|
|
9
9
|
|
|
10
|
-
// ../core/dist/src-
|
|
11
|
-
import { createRequire } from "module";
|
|
10
|
+
// ../core/dist/src-UAKFXUB2.js
|
|
11
|
+
import { createRequire as BATI_core_createRequire } from "module";
|
|
12
12
|
import { fileURLToPath as BATI_fileURLToPath } from "url";
|
|
13
13
|
import { dirname as BATI_dirname } from "path";
|
|
14
14
|
import w from "path";
|
|
15
15
|
import V from "fs/promises";
|
|
16
16
|
import { fileURLToPath as d } from "url";
|
|
17
|
-
var require2 =
|
|
17
|
+
var require2 = BATI_core_createRequire(import.meta.url);
|
|
18
18
|
var __filename = BATI_fileURLToPath(import.meta.url);
|
|
19
19
|
var __dirname = BATI_dirname(__filename);
|
|
20
20
|
function i(s) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@batijs/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.450",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"description": "Next-gen scaffolder. Get started with fully-functional apps, and choose any tool you want",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"typescript": "^5.8.3",
|
|
21
21
|
"unplugin-purge-polyfills": "^0.1.0",
|
|
22
22
|
"vite": "^6.3.5",
|
|
23
|
-
"@batijs/build": "0.0.
|
|
24
|
-
"@batijs/compile": "0.0.
|
|
23
|
+
"@batijs/build": "0.0.450",
|
|
24
|
+
"@batijs/compile": "0.0.450"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@batijs/core": "0.0.
|
|
28
|
-
"@batijs/features": "0.0.
|
|
27
|
+
"@batijs/core": "0.0.450",
|
|
28
|
+
"@batijs/features": "0.0.450"
|
|
29
29
|
},
|
|
30
30
|
"bin": "./cli.js",
|
|
31
31
|
"exports": {
|
|
@@ -1,121 +0,0 @@
|
|
|
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
|
-
ata
|
|
7
|
-
} from "../../../../chunk-2HJGZ6VH.js";
|
|
8
|
-
import "../../../../chunk-V7W2TXCE.js";
|
|
9
|
-
import "../../../../chunk-DHZ7AZKP.js";
|
|
10
|
-
|
|
11
|
-
// ../../boilerplates/hattip/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/hattip",
|
|
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
|
-
"@auth/core": "^0.39.1",
|
|
54
|
-
"@batijs/compile": "workspace:*",
|
|
55
|
-
"@cloudflare/workers-types": "^4.20250614.0",
|
|
56
|
-
"@hattip/adapter-aws-lambda": "^0.0.49",
|
|
57
|
-
"@hattip/adapter-node": "^0.0.49",
|
|
58
|
-
"@hattip/adapter-vercel-edge": "^0.0.49",
|
|
59
|
-
"@hattip/core": "^0.0.49",
|
|
60
|
-
"@hattip/router": "^0.0.49",
|
|
61
|
-
"@hattip/static": "^0.0.49",
|
|
62
|
-
"@hattip/vite": "^0.0.49",
|
|
63
|
-
"@hattip/walk": "^0.0.49",
|
|
64
|
-
"@trpc/server": "^11.4.1",
|
|
65
|
-
"@types/aws-lambda": "^8.10.149",
|
|
66
|
-
"@types/node": "^20.19.0",
|
|
67
|
-
"@universal-middleware/hattip": "^0.4.10",
|
|
68
|
-
"cross-env": "^7.0.3",
|
|
69
|
-
dotenv: "^16.5.0",
|
|
70
|
-
hattip: "^0.0.33",
|
|
71
|
-
telefunc: "^0.2.7",
|
|
72
|
-
vike: "^0.4.231",
|
|
73
|
-
vite: "^6.3.5"
|
|
74
|
-
},
|
|
75
|
-
dependencies: {
|
|
76
|
-
"@batijs/core": "workspace:*"
|
|
77
|
-
},
|
|
78
|
-
files: [
|
|
79
|
-
"dist/"
|
|
80
|
-
],
|
|
81
|
-
bati: {
|
|
82
|
-
if: {
|
|
83
|
-
flag: "hattip"
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
exports: {
|
|
87
|
-
"./hattip-entry": {
|
|
88
|
-
types: "./dist/types/hattip-entry.d.ts"
|
|
89
|
-
},
|
|
90
|
-
"./entry_aws_lambda": {
|
|
91
|
-
types: "./dist/types/entry_aws_lambda.d.ts"
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
typesVersions: {
|
|
95
|
-
"*": {
|
|
96
|
-
"hattip-entry": [
|
|
97
|
-
"./dist/types/hattip-entry.d.ts"
|
|
98
|
-
],
|
|
99
|
-
entry_aws_lambda: [
|
|
100
|
-
"./dist/types/entry_aws_lambda.d.ts"
|
|
101
|
-
]
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
async function getPackageJson(props) {
|
|
108
|
-
const packageJson = await ata(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
|
|
109
|
-
return packageJson.setScript("dev", {
|
|
110
|
-
value: "hattip serve ./hattip-entry.ts --client",
|
|
111
|
-
precedence: 20,
|
|
112
|
-
warnIfReplaced: true
|
|
113
|
-
}).setScript("build", {
|
|
114
|
-
value: "cross-env NODE_ENV=production vike build",
|
|
115
|
-
precedence: 20,
|
|
116
|
-
warnIfReplaced: true
|
|
117
|
-
}).removeScript("preview").addDevDependencies(["@hattip/vite", "@hattip/adapter-node"]).addDependencies(["@hattip/core", "@hattip/router", "hattip", "vite", "vike", "@universal-middleware/hattip"]).addDependencies(["dotenv"], props.meta.BATI.has("auth0") || props.meta.BATI.hasDatabase).addDependencies(["@hattip/adapter-vercel-edge"], props.meta.BATI.has("vercel")).addDependencies(["@hattip/adapter-aws-lambda", "@hattip/static", "@hattip/walk"], props.meta.BATI.has("aws")).addDevDependencies(["@types/aws-lambda"], props.meta.BATI.has("aws")).addDevDependencies(["cross-env"], ["build"]);
|
|
118
|
-
}
|
|
119
|
-
export {
|
|
120
|
-
getPackageJson as default
|
|
121
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/*{ @if (it.BATI.has("aws")) }*/
|
|
2
|
-
/*
|
|
3
|
-
entry_aws_lambda.ts
|
|
4
|
-
|
|
5
|
-
This file is the entry point for AWS Lambda
|
|
6
|
-
|
|
7
|
-
Notes:
|
|
8
|
-
* The file name must not have any special characters or dots except for the extension. https://docs.aws.amazon.com/lambda/latest/api/API_CreateFunction.html#API_CreateFunction_RequestSyntax
|
|
9
|
-
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import { existsSync } from "node:fs";
|
|
13
|
-
import awsLambdaAdapter from "@hattip/adapter-aws-lambda";
|
|
14
|
-
import { walk } from "@hattip/walk";
|
|
15
|
-
import type { FileInfo } from "@hattip/walk";
|
|
16
|
-
import { createStaticMiddleware } from "@hattip/static";
|
|
17
|
-
import { createFileReader } from "@hattip/static/fs";
|
|
18
|
-
import hattipHandler from "@batijs/hattip/hattip-entry";
|
|
19
|
-
import type { Handler, APIGatewayProxyResultV2, APIGatewayProxyEventV2 } from "aws-lambda";
|
|
20
|
-
|
|
21
|
-
const root = new URL("./dist/client", import.meta.url);
|
|
22
|
-
const staticRootExists = existsSync(root);
|
|
23
|
-
const files = staticRootExists ? walk(root) : new Map<string, FileInfo>();
|
|
24
|
-
const staticMiddleware = staticRootExists
|
|
25
|
-
? createStaticMiddleware(files, createFileReader(root), {
|
|
26
|
-
urlRoot: "/",
|
|
27
|
-
})
|
|
28
|
-
: undefined;
|
|
29
|
-
|
|
30
|
-
const awsHandler = awsLambdaAdapter((ctx) => {
|
|
31
|
-
if (hattipHandler === undefined) throw new Error("hattipHandler is undefined");
|
|
32
|
-
if (staticMiddleware === undefined) return hattipHandler(ctx);
|
|
33
|
-
return staticMiddleware(ctx) || hattipHandler(ctx);
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
export const handler: Handler<APIGatewayProxyEventV2, APIGatewayProxyResultV2> = awsHandler;
|
|
37
|
-
/*{ /if }*/
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
// BATI.has("auth0") || BATI.hasDatabase
|
|
2
|
-
import "dotenv/config";
|
|
3
|
-
import { authjsHandler, authjsSessionMiddleware } from "@batijs/authjs/server/authjs-handler";
|
|
4
|
-
import { createTodoHandler } from "@batijs/shared-server/server/create-todo-handler";
|
|
5
|
-
import { vikeHandler } from "@batijs/shared-server/server/vike-handler";
|
|
6
|
-
import { telefuncHandler } from "@batijs/telefunc/server/telefunc-handler";
|
|
7
|
-
import { tsRestHandler } from "@batijs/ts-rest/server/ts-rest-handler";
|
|
8
|
-
import type { HattipHandler } from "@hattip/core";
|
|
9
|
-
import { createRouter } from "@hattip/router";
|
|
10
|
-
import vercelAdapter from "@hattip/adapter-vercel-edge";
|
|
11
|
-
import { createHandler, createMiddleware } from "@universal-middleware/hattip";
|
|
12
|
-
import { dbMiddleware } from "@batijs/shared-db/server/db-middleware";
|
|
13
|
-
import { trpcHandler } from "@batijs/trpc/server/trpc-handler";
|
|
14
|
-
|
|
15
|
-
const router = createRouter();
|
|
16
|
-
|
|
17
|
-
if (BATI.hasDatabase) {
|
|
18
|
-
/**
|
|
19
|
-
* Make database available in Context as `context.db`
|
|
20
|
-
*/
|
|
21
|
-
router.use(createMiddleware(dbMiddleware)());
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if (BATI.has("telefunc")) {
|
|
25
|
-
/**
|
|
26
|
-
* Telefunc route
|
|
27
|
-
*
|
|
28
|
-
* @link {@see https://telefunc.com}
|
|
29
|
-
**/
|
|
30
|
-
router.post("/_telefunc", createHandler(telefuncHandler)());
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (BATI.has("trpc")) {
|
|
34
|
-
/**
|
|
35
|
-
* tRPC route
|
|
36
|
-
*
|
|
37
|
-
* @link {@see https://trpc.io/docs/server/adapters/fetch}
|
|
38
|
-
**/
|
|
39
|
-
router.use("/api/trpc/*", createHandler(trpcHandler)("/api/trpc"));
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if (BATI.has("ts-rest")) {
|
|
43
|
-
router.use("/api/*", createMiddleware(tsRestHandler)());
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (BATI.has("authjs") || BATI.has("auth0")) {
|
|
47
|
-
/**
|
|
48
|
-
* Append Auth.js session to context
|
|
49
|
-
**/
|
|
50
|
-
router.use(createMiddleware(authjsSessionMiddleware)());
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Auth.js route
|
|
54
|
-
* @link {@see https://authjs.dev/getting-started/installation}
|
|
55
|
-
**/
|
|
56
|
-
router.use("/api/auth/*", createHandler(authjsHandler)());
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
if (!BATI.has("telefunc") && !BATI.has("trpc") && !BATI.has("ts-rest")) {
|
|
60
|
-
router.post("/api/todo/create", createHandler(createTodoHandler)());
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Vike route
|
|
65
|
-
*
|
|
66
|
-
* @link {@see https://vike.dev}
|
|
67
|
-
**/
|
|
68
|
-
router.use(createHandler(vikeHandler)());
|
|
69
|
-
|
|
70
|
-
const handler: HattipHandler = router.buildHandler();
|
|
71
|
-
|
|
72
|
-
//# BATI.has("vercel")
|
|
73
|
-
export const GET = vercelAdapter(handler);
|
|
74
|
-
//# BATI.has("vercel")
|
|
75
|
-
export const POST = vercelAdapter(handler);
|
|
76
|
-
|
|
77
|
-
export default BATI.has("vercel") ? (process.env.NODE_ENV === "production" ? undefined : handler) : handler;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import "dotenv/config";
|
|
2
|
-
import type { HattipHandler } from "@hattip/core";
|
|
3
|
-
export declare const GET: import("@hattip/adapter-vercel-edge").VercelEdgeFunction;
|
|
4
|
-
export declare const POST: import("@hattip/adapter-vercel-edge").VercelEdgeFunction;
|
|
5
|
-
declare const _default: HattipHandler | undefined;
|
|
6
|
-
export default _default;
|