@batijs/cli 0.0.287 → 0.0.288
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 +5 -5
- package/dist/boilerplates/@batijs/auth0/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/authjs/files/$package.json.js +4 -7
- package/dist/boilerplates/@batijs/aws/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/aws/files/$package.json.js +19 -46
- package/dist/boilerplates/@batijs/aws/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/aws/files/tests/aws_handler.spec.ts +1 -1
- package/dist/boilerplates/@batijs/biome/files/$package.json.js +10 -18
- package/dist/boilerplates/@batijs/cloudflare/files/$package.json.js +21 -42
- package/dist/boilerplates/@batijs/cloudflare/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/cloudflare/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/compiled/files/$package.json.js +4 -8
- package/dist/boilerplates/@batijs/compiled/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/d1/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/d1/files/$package.json.js +5 -8
- package/dist/boilerplates/@batijs/d1/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/d1/files/$wrangler.toml.js +1 -1
- package/dist/boilerplates/@batijs/d1-sqlite/files/$package.json.js +91 -5
- 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 +14 -19
- package/dist/boilerplates/@batijs/edgedb/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/edgedb/files/$package.json.js +11 -11
- package/dist/boilerplates/@batijs/eslint/files/$package.json.js +10 -37
- package/dist/boilerplates/@batijs/express/files/$package.json.js +15 -33
- package/dist/boilerplates/@batijs/fastify/files/$package.json.js +15 -33
- package/dist/boilerplates/@batijs/firebase-auth/files/$.env.js +3 -3
- package/dist/boilerplates/@batijs/firebase-auth/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/firebase-auth/files/$package.json.js +4 -8
- package/dist/boilerplates/@batijs/google-analytics/files/$.env.js +3 -3
- package/dist/boilerplates/@batijs/h3/files/$package.json.js +15 -36
- package/dist/boilerplates/@batijs/hattip/files/$package.json.js +12 -49
- package/dist/boilerplates/@batijs/hono/files/$package.json.js +16 -39
- package/dist/boilerplates/@batijs/hono/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/lucia-auth/files/$.env.js +4 -4
- package/dist/boilerplates/@batijs/lucia-auth/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/lucia-auth/files/$package.json.js +4 -22
- package/dist/boilerplates/@batijs/mantine/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/mantine/files/$package.json.js +5 -9
- package/dist/boilerplates/@batijs/prettier/files/$package.json.js +4 -7
- 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 +12 -12
- package/dist/boilerplates/@batijs/react/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/react/files/$package.json.js +6 -10
- 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-sentry/files/$package.json.js +5 -8
- 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 +4 -7
- package/dist/boilerplates/@batijs/sentry/files/$vite.config.ts.js +7 -7
- package/dist/boilerplates/@batijs/sentry/files/pages/$+client.ts.js +7 -7
- package/dist/boilerplates/@batijs/shadcn-ui/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/shadcn-ui/files/$package.json.js +16 -24
- 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-server/files/$package.json.js +4 -7
- package/dist/boilerplates/@batijs/solid/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/solid/files/$package.json.js +6 -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-sentry/files/$package.json.js +5 -8
- package/dist/boilerplates/@batijs/sqlite/files/$.env.js +3 -3
- package/dist/boilerplates/@batijs/sqlite/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/sqlite/files/$package.json.js +7 -9
- package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +5 -13
- package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +4 -7
- package/dist/boilerplates/@batijs/telefunc/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/trpc/files/$package.json.js +4 -7
- package/dist/boilerplates/@batijs/trpc/types/server/trpc-handler.d.ts +1 -1
- package/dist/boilerplates/@batijs/trpc/types/trpc/client.d.ts +12 -12
- package/dist/boilerplates/@batijs/ts-rest/files/$package.json.js +4 -9
- package/dist/boilerplates/@batijs/vercel/files/$package.json.js +4 -7
- package/dist/boilerplates/@batijs/vercel/files/$tsconfig.json.js +3 -3
- package/dist/boilerplates/@batijs/vercel/files/$vite.config.ts.js +5 -5
- package/dist/boilerplates/@batijs/vue/files/$README.md.js +3 -3
- package/dist/boilerplates/@batijs/vue/files/$package.json.js +13 -22
- 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-sentry/files/$package.json.js +4 -7
- package/dist/{chunk-ZPMGCQ2D.js → chunk-BX6YHROU.js} +55914 -55882
- package/dist/index.js +25 -20
- package/package.json +6 -6
- package/dist/boilerplates/@batijs/shared-no-db/files/$package.json.js +0 -94
package/dist/index.js
CHANGED
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
consola
|
|
5
5
|
} from "./chunk-FWD3UPBV.js";
|
|
6
6
|
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
JLe,
|
|
8
|
+
Vtt,
|
|
9
|
+
Xus,
|
|
10
10
|
export_which,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} from "./chunk-
|
|
11
|
+
hrs,
|
|
12
|
+
sWr
|
|
13
|
+
} from "./chunk-BX6YHROU.js";
|
|
14
14
|
import "./chunk-LU7IBQI7.js";
|
|
15
15
|
|
|
16
16
|
// index.ts
|
|
@@ -34,8 +34,8 @@ async function mergeDts({
|
|
|
34
34
|
filepath,
|
|
35
35
|
meta
|
|
36
36
|
}) {
|
|
37
|
-
const previousAst =
|
|
38
|
-
const currentAst =
|
|
37
|
+
const previousAst = JLe(previousContent);
|
|
38
|
+
const currentAst = JLe(fileContent);
|
|
39
39
|
for (const imp of previousAst.imports.$items) {
|
|
40
40
|
currentAst.imports[imp.local] = imp;
|
|
41
41
|
}
|
|
@@ -52,7 +52,7 @@ async function mergeDts({
|
|
|
52
52
|
currentAst.$ast.body.splice(index, 0, node);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
const res = await
|
|
55
|
+
const res = await hrs(currentAst.generate().code, meta, {
|
|
56
56
|
filepath
|
|
57
57
|
});
|
|
58
58
|
return res.code;
|
|
@@ -63,7 +63,7 @@ async function executeOperationFile(op, {
|
|
|
63
63
|
}) {
|
|
64
64
|
const code = await readFile(op.sourceAbsolute, { encoding: "utf-8" });
|
|
65
65
|
const filepath = relative(op.source, op.sourceAbsolute);
|
|
66
|
-
const result = await
|
|
66
|
+
const result = await hrs(code, meta, {
|
|
67
67
|
filepath
|
|
68
68
|
});
|
|
69
69
|
let fileContent = result.code;
|
|
@@ -83,6 +83,12 @@ async function executeOperationFile(op, {
|
|
|
83
83
|
var isWin = process.platform === "win32";
|
|
84
84
|
async function transformFileAfterExec(filepath, fileContent) {
|
|
85
85
|
if (fileContent === void 0 || fileContent === null) return null;
|
|
86
|
+
if (typeof fileContent == "object" && typeof fileContent.finalize === "function") {
|
|
87
|
+
fileContent = fileContent.finalize();
|
|
88
|
+
if (typeof fileContent !== "string") {
|
|
89
|
+
throw new Error("finalize() must return a string");
|
|
90
|
+
}
|
|
91
|
+
}
|
|
86
92
|
const parsed = parse(filepath);
|
|
87
93
|
const toTest = [parsed.base, parsed.ext, parsed.name].filter(Boolean);
|
|
88
94
|
for (const ext of toTest) {
|
|
@@ -91,7 +97,7 @@ async function transformFileAfterExec(filepath, fileContent) {
|
|
|
91
97
|
case ".js":
|
|
92
98
|
case ".tsx":
|
|
93
99
|
case ".jsx":
|
|
94
|
-
return
|
|
100
|
+
return Vtt(fileContent, {
|
|
95
101
|
filepath
|
|
96
102
|
});
|
|
97
103
|
case ".env":
|
|
@@ -107,6 +113,7 @@ async function transformFileAfterExec(filepath, fileContent) {
|
|
|
107
113
|
case ".toml":
|
|
108
114
|
return fileContent;
|
|
109
115
|
case ".json":
|
|
116
|
+
if (typeof fileContent === "string") return fileContent;
|
|
110
117
|
return JSON.stringify(fileContent, null, 2);
|
|
111
118
|
case ".yml":
|
|
112
119
|
case ".yaml":
|
|
@@ -302,8 +309,6 @@ async function* walk(dir) {
|
|
|
302
309
|
}
|
|
303
310
|
async function main(options, meta) {
|
|
304
311
|
const sources = Array.isArray(options.source) ? options.source : [options.source];
|
|
305
|
-
const allImports = /* @__PURE__ */ new Map();
|
|
306
|
-
const filesContainingIncludeIfImported = /* @__PURE__ */ new Set();
|
|
307
312
|
function updateAllImports(target, imports, includeIfImported) {
|
|
308
313
|
const rf = new RelationFile(target, includeIfImported);
|
|
309
314
|
if (!imports) return;
|
|
@@ -2463,7 +2468,7 @@ var createDefaultQueryTester = function(query, options) {
|
|
|
2463
2468
|
// package.json
|
|
2464
2469
|
var package_default = {
|
|
2465
2470
|
name: "@batijs/cli",
|
|
2466
|
-
version: "0.0.
|
|
2471
|
+
version: "0.0.288",
|
|
2467
2472
|
type: "module",
|
|
2468
2473
|
scripts: {
|
|
2469
2474
|
"check-types": "tsc --noEmit",
|
|
@@ -2489,7 +2494,7 @@ var package_default = {
|
|
|
2489
2494
|
sift: "^17.1.3",
|
|
2490
2495
|
tsup: "^8.3.0",
|
|
2491
2496
|
typescript: "^5.6.2",
|
|
2492
|
-
"unplugin-purge-polyfills": "^0.0.
|
|
2497
|
+
"unplugin-purge-polyfills": "^0.0.7",
|
|
2493
2498
|
vite: "^5.4.7"
|
|
2494
2499
|
},
|
|
2495
2500
|
dependencies: {
|
|
@@ -2567,7 +2572,7 @@ Choose one of them, or simply remove selected Server`
|
|
|
2567
2572
|
var __filename = fileURLToPath(import.meta.url);
|
|
2568
2573
|
var __dirname = dirname(__filename);
|
|
2569
2574
|
var isWin2 = process.platform === "win32";
|
|
2570
|
-
var pm =
|
|
2575
|
+
var pm = Xus();
|
|
2571
2576
|
function boilerplatesDir() {
|
|
2572
2577
|
if (existsSync2(join(__dirname, "boilerplates", "boilerplates.json"))) {
|
|
2573
2578
|
return join(__dirname, "boilerplates");
|
|
@@ -2601,10 +2606,10 @@ function findDescription(key) {
|
|
|
2601
2606
|
}
|
|
2602
2607
|
}
|
|
2603
2608
|
function printOK(dist, flags2) {
|
|
2604
|
-
const arrow0 =
|
|
2605
|
-
const book0 =
|
|
2606
|
-
const list3 =
|
|
2607
|
-
const cmd3 =
|
|
2609
|
+
const arrow0 = sWr("\u2192", blueBright);
|
|
2610
|
+
const book0 = sWr("\u{1F4DA}", blueBright);
|
|
2611
|
+
const list3 = sWr("-", void 0, 3);
|
|
2612
|
+
const cmd3 = sWr("$", gray, 3);
|
|
2608
2613
|
console.log(bold(`${green("\u2713")} Project created at ${cyan(dist)} with:`));
|
|
2609
2614
|
console.log(list3(green("Vike")));
|
|
2610
2615
|
for (const key of flags2) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@batijs/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.288",
|
|
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",
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
"sift": "^17.1.3",
|
|
19
19
|
"tsup": "^8.3.0",
|
|
20
20
|
"typescript": "^5.6.2",
|
|
21
|
-
"unplugin-purge-polyfills": "^0.0.
|
|
21
|
+
"unplugin-purge-polyfills": "^0.0.7",
|
|
22
22
|
"vite": "^5.4.7",
|
|
23
|
-
"@batijs/compile": "0.0.
|
|
24
|
-
"@batijs/build": "0.0.
|
|
23
|
+
"@batijs/compile": "0.0.288",
|
|
24
|
+
"@batijs/build": "0.0.288"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@batijs/
|
|
28
|
-
"@batijs/
|
|
27
|
+
"@batijs/features": "0.0.288",
|
|
28
|
+
"@batijs/core": "0.0.288"
|
|
29
29
|
},
|
|
30
30
|
"bin": "./dist/index.js",
|
|
31
31
|
"exports": {
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
g7s,
|
|
4
|
-
mLs
|
|
5
|
-
} from "../../../../chunk-ZPMGCQ2D.js";
|
|
6
|
-
import "../../../../chunk-LU7IBQI7.js";
|
|
7
|
-
|
|
8
|
-
// ../../boilerplates/shared-no-db/dist/files/$package.json.js
|
|
9
|
-
var __create = Object.create;
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
14
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
15
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
16
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
27
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
28
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
29
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
30
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
31
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
32
|
-
mod
|
|
33
|
-
));
|
|
34
|
-
var require_package = __commonJS({
|
|
35
|
-
"package.json"(exports, module) {
|
|
36
|
-
module.exports = {
|
|
37
|
-
name: "@batijs/shared-no-db",
|
|
38
|
-
private: true,
|
|
39
|
-
version: "0.0.1",
|
|
40
|
-
description: "",
|
|
41
|
-
type: "module",
|
|
42
|
-
scripts: {
|
|
43
|
-
"check-types": "tsc --noEmit",
|
|
44
|
-
build: "bati-compile-boilerplate"
|
|
45
|
-
},
|
|
46
|
-
keywords: [],
|
|
47
|
-
author: "",
|
|
48
|
-
license: "MIT",
|
|
49
|
-
devDependencies: {
|
|
50
|
-
"@batijs/compile": "workspace:*",
|
|
51
|
-
"@types/node": "^18.19.14"
|
|
52
|
-
},
|
|
53
|
-
dependencies: {
|
|
54
|
-
"@batijs/core": "workspace:*"
|
|
55
|
-
},
|
|
56
|
-
files: [
|
|
57
|
-
"dist/"
|
|
58
|
-
],
|
|
59
|
-
bati: {
|
|
60
|
-
if: {
|
|
61
|
-
flag: {
|
|
62
|
-
$not: {
|
|
63
|
-
$in: [
|
|
64
|
-
"drizzle",
|
|
65
|
-
"sqlite"
|
|
66
|
-
]
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
exports: {
|
|
72
|
-
"./database/todoItems": {
|
|
73
|
-
types: "./dist/types/database/todoItems.d.ts"
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
typesVersions: {
|
|
77
|
-
"*": {
|
|
78
|
-
"database/todoItems": [
|
|
79
|
-
"./dist/types/database/todoItems.d.ts"
|
|
80
|
-
]
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
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: []
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
export {
|
|
93
|
-
getPackageJson as default
|
|
94
|
-
};
|