bunkit-cli 0.5.0 → 0.5.1
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/index.js +81 -38
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10433,7 +10433,7 @@ var require_package = __commonJS((exports, module) => {
|
|
|
10433
10433
|
|
|
10434
10434
|
// ../../node_modules/.bun/ejs@3.1.10/node_modules/ejs/lib/ejs.js
|
|
10435
10435
|
var require_ejs = __commonJS((exports) => {
|
|
10436
|
-
var
|
|
10436
|
+
var fs5 = __require("fs");
|
|
10437
10437
|
var path7 = __require("path");
|
|
10438
10438
|
var utils = require_utils7();
|
|
10439
10439
|
var scopeOptionWarned = false;
|
|
@@ -10461,7 +10461,7 @@ var require_ejs = __commonJS((exports) => {
|
|
|
10461
10461
|
var _BOM = /^\uFEFF/;
|
|
10462
10462
|
var _JS_IDENTIFIER = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
|
|
10463
10463
|
exports.cache = utils.cache;
|
|
10464
|
-
exports.fileLoader =
|
|
10464
|
+
exports.fileLoader = fs5.readFileSync;
|
|
10465
10465
|
exports.localsName = _DEFAULT_LOCALS_NAME;
|
|
10466
10466
|
exports.promiseImpl = new Function("return this;")().Promise;
|
|
10467
10467
|
exports.resolveInclude = function(name, filename, isDir) {
|
|
@@ -10479,7 +10479,7 @@ var require_ejs = __commonJS((exports) => {
|
|
|
10479
10479
|
var filePath;
|
|
10480
10480
|
if (paths.some(function(v2) {
|
|
10481
10481
|
filePath = exports.resolveInclude(name, v2, true);
|
|
10482
|
-
return
|
|
10482
|
+
return fs5.existsSync(filePath);
|
|
10483
10483
|
})) {
|
|
10484
10484
|
return filePath;
|
|
10485
10485
|
}
|
|
@@ -10499,7 +10499,7 @@ var require_ejs = __commonJS((exports) => {
|
|
|
10499
10499
|
} else {
|
|
10500
10500
|
if (options.filename) {
|
|
10501
10501
|
filePath = exports.resolveInclude(path8, options.filename);
|
|
10502
|
-
if (
|
|
10502
|
+
if (fs5.existsSync(filePath)) {
|
|
10503
10503
|
includePath = filePath;
|
|
10504
10504
|
}
|
|
10505
10505
|
}
|
|
@@ -24006,7 +24006,7 @@ async function createPackageJson(projectPath, config) {
|
|
|
24006
24006
|
dependencies: {},
|
|
24007
24007
|
devDependencies: {
|
|
24008
24008
|
"@types/bun": "latest",
|
|
24009
|
-
typescript: "^5.
|
|
24009
|
+
typescript: "^5.9.3"
|
|
24010
24010
|
},
|
|
24011
24011
|
...gitUser.name && { author: gitUser.name }
|
|
24012
24012
|
};
|
|
@@ -24118,10 +24118,14 @@ function createTemplateContext(config) {
|
|
|
24118
24118
|
};
|
|
24119
24119
|
}
|
|
24120
24120
|
// ../core/src/install.ts
|
|
24121
|
+
var import_fs_extra3 = __toESM(require_lib(), 1);
|
|
24121
24122
|
async function installDependencies(cwd, packages) {
|
|
24122
24123
|
logger.step("Installing dependencies...");
|
|
24123
24124
|
try {
|
|
24124
|
-
if (packages && packages
|
|
24125
|
+
if (packages && typeof packages === "object" && !Array.isArray(packages)) {
|
|
24126
|
+
await addDependenciesToPackageJson(cwd, packages);
|
|
24127
|
+
await execa("bun", ["install"], { cwd, stdio: "inherit" });
|
|
24128
|
+
} else if (packages && Array.isArray(packages) && packages.length > 0) {
|
|
24125
24129
|
await execa("bun", ["add", ...packages], { cwd, stdio: "inherit" });
|
|
24126
24130
|
} else {
|
|
24127
24131
|
await execa("bun", ["install"], { cwd, stdio: "inherit" });
|
|
@@ -24132,6 +24136,15 @@ async function installDependencies(cwd, packages) {
|
|
|
24132
24136
|
throw error;
|
|
24133
24137
|
}
|
|
24134
24138
|
}
|
|
24139
|
+
async function addDependenciesToPackageJson(cwd, dependencies) {
|
|
24140
|
+
const packageJsonPath = join(cwd, "package.json");
|
|
24141
|
+
const packageJson = await import_fs_extra3.default.readJson(packageJsonPath);
|
|
24142
|
+
packageJson.dependencies = {
|
|
24143
|
+
...packageJson.dependencies,
|
|
24144
|
+
...dependencies
|
|
24145
|
+
};
|
|
24146
|
+
await import_fs_extra3.default.writeJson(packageJsonPath, packageJson, { spaces: 2 });
|
|
24147
|
+
}
|
|
24135
24148
|
// src/commands/init.enhanced.ts
|
|
24136
24149
|
var import_picocolors4 = __toESM(require_picocolors(), 1);
|
|
24137
24150
|
|
|
@@ -24419,9 +24432,14 @@ async function setupBiome(projectPath, context) {
|
|
|
24419
24432
|
}
|
|
24420
24433
|
function getCodeQualityDependencies(codeQuality) {
|
|
24421
24434
|
if (codeQuality === "ultracite") {
|
|
24422
|
-
return
|
|
24435
|
+
return {
|
|
24436
|
+
ultracite: "catalog:",
|
|
24437
|
+
"@biomejs/biome": "catalog:"
|
|
24438
|
+
};
|
|
24423
24439
|
}
|
|
24424
|
-
return
|
|
24440
|
+
return {
|
|
24441
|
+
"@biomejs/biome": "catalog:"
|
|
24442
|
+
};
|
|
24425
24443
|
}
|
|
24426
24444
|
|
|
24427
24445
|
// ../templates/src/generators/docker.ts
|
|
@@ -25009,13 +25027,25 @@ DATABASE_URL=./local.db
|
|
|
25009
25027
|
function getDatabaseDependencies(databaseType) {
|
|
25010
25028
|
switch (databaseType) {
|
|
25011
25029
|
case "postgres-drizzle":
|
|
25012
|
-
return
|
|
25030
|
+
return {
|
|
25031
|
+
"drizzle-orm": "catalog:",
|
|
25032
|
+
"drizzle-kit": "catalog:",
|
|
25033
|
+
postgres: "catalog:"
|
|
25034
|
+
};
|
|
25013
25035
|
case "supabase":
|
|
25014
|
-
return
|
|
25036
|
+
return {
|
|
25037
|
+
"@supabase/supabase-js": "catalog:",
|
|
25038
|
+
"drizzle-orm": "catalog:",
|
|
25039
|
+
"drizzle-kit": "catalog:",
|
|
25040
|
+
postgres: "catalog:"
|
|
25041
|
+
};
|
|
25015
25042
|
case "sqlite-drizzle":
|
|
25016
|
-
return
|
|
25043
|
+
return {
|
|
25044
|
+
"drizzle-orm": "catalog:",
|
|
25045
|
+
"drizzle-kit": "catalog:"
|
|
25046
|
+
};
|
|
25017
25047
|
default:
|
|
25018
|
-
return
|
|
25048
|
+
return {};
|
|
25019
25049
|
}
|
|
25020
25050
|
}
|
|
25021
25051
|
|
|
@@ -25229,15 +25259,21 @@ async function buildFullPreset(projectPath, context) {
|
|
|
25229
25259
|
test: "bun test"
|
|
25230
25260
|
},
|
|
25231
25261
|
devDependencies: {
|
|
25232
|
-
"@biomejs/biome": "
|
|
25262
|
+
"@biomejs/biome": "catalog:",
|
|
25233
25263
|
"@types/bun": "latest",
|
|
25234
|
-
typescript: "
|
|
25264
|
+
typescript: "catalog:"
|
|
25235
25265
|
},
|
|
25236
25266
|
catalog: {
|
|
25237
25267
|
react: "^19.1.0",
|
|
25238
25268
|
"react-dom": "^19.1.0",
|
|
25239
25269
|
next: "^16.0.0",
|
|
25240
|
-
hono: "^4.7.12"
|
|
25270
|
+
hono: "^4.7.12",
|
|
25271
|
+
"@biomejs/biome": "^2.3.0",
|
|
25272
|
+
typescript: "^5.9.3",
|
|
25273
|
+
"@types/react": "^19.1.0",
|
|
25274
|
+
"@types/react-dom": "^19.1.0",
|
|
25275
|
+
"@types/node": "^22.10.6",
|
|
25276
|
+
tailwindcss: "^4.1.7"
|
|
25241
25277
|
}
|
|
25242
25278
|
};
|
|
25243
25279
|
await writeFile(join(projectPath, "package.json"), JSON.stringify(rootPackageJson, null, 2));
|
|
@@ -25264,11 +25300,11 @@ coverage = true
|
|
|
25264
25300
|
[`@${context.packageName}/types`]: "workspace:*"
|
|
25265
25301
|
},
|
|
25266
25302
|
devDependencies: {
|
|
25267
|
-
"@types/react": "
|
|
25268
|
-
"@types/react-dom": "
|
|
25269
|
-
"@types/node": "
|
|
25270
|
-
typescript: "
|
|
25271
|
-
tailwindcss: "
|
|
25303
|
+
"@types/react": "catalog:",
|
|
25304
|
+
"@types/react-dom": "catalog:",
|
|
25305
|
+
"@types/node": "catalog:",
|
|
25306
|
+
typescript: "catalog:",
|
|
25307
|
+
tailwindcss: "catalog:"
|
|
25272
25308
|
}
|
|
25273
25309
|
};
|
|
25274
25310
|
await writeFile(join(projectPath, "apps/web/package.json"), JSON.stringify(webPackageJson, null, 2));
|
|
@@ -25288,11 +25324,11 @@ coverage = true
|
|
|
25288
25324
|
[`@${context.packageName}/types`]: "workspace:*"
|
|
25289
25325
|
},
|
|
25290
25326
|
devDependencies: {
|
|
25291
|
-
"@types/react": "
|
|
25292
|
-
"@types/react-dom": "
|
|
25293
|
-
"@types/node": "
|
|
25294
|
-
typescript: "
|
|
25295
|
-
tailwindcss: "
|
|
25327
|
+
"@types/react": "catalog:",
|
|
25328
|
+
"@types/react-dom": "catalog:",
|
|
25329
|
+
"@types/node": "catalog:",
|
|
25330
|
+
typescript: "catalog:",
|
|
25331
|
+
tailwindcss: "catalog:"
|
|
25296
25332
|
}
|
|
25297
25333
|
};
|
|
25298
25334
|
await writeFile(join(projectPath, "apps/platform/package.json"), JSON.stringify(platformPackageJson, null, 2));
|
|
@@ -25311,7 +25347,7 @@ coverage = true
|
|
|
25311
25347
|
},
|
|
25312
25348
|
devDependencies: {
|
|
25313
25349
|
"@types/bun": "latest",
|
|
25314
|
-
typescript: "
|
|
25350
|
+
typescript: "catalog:"
|
|
25315
25351
|
}
|
|
25316
25352
|
};
|
|
25317
25353
|
await writeFile(join(projectPath, "apps/api/package.json"), JSON.stringify(apiPackageJson, null, 2));
|
|
@@ -25749,16 +25785,16 @@ Built with \u2764\uFE0F using Bun monorepo features
|
|
|
25749
25785
|
main: "./src/index.ts",
|
|
25750
25786
|
types: "./src/index.ts",
|
|
25751
25787
|
dependencies: context.database === "supabase" ? {
|
|
25752
|
-
"@supabase/supabase-js": "
|
|
25753
|
-
"drizzle-orm": "
|
|
25754
|
-
postgres: "
|
|
25788
|
+
"@supabase/supabase-js": "catalog:",
|
|
25789
|
+
"drizzle-orm": "catalog:",
|
|
25790
|
+
postgres: "catalog:"
|
|
25755
25791
|
} : {
|
|
25756
|
-
"drizzle-orm": "
|
|
25792
|
+
"drizzle-orm": "catalog:"
|
|
25757
25793
|
},
|
|
25758
25794
|
devDependencies: {
|
|
25759
|
-
"drizzle-kit": "
|
|
25795
|
+
"drizzle-kit": "catalog:",
|
|
25760
25796
|
"@types/bun": "latest",
|
|
25761
|
-
typescript: "
|
|
25797
|
+
typescript: "catalog:"
|
|
25762
25798
|
}
|
|
25763
25799
|
};
|
|
25764
25800
|
await writeFile(join(dbPackagePath, "package.json"), JSON.stringify(dbPackageJson, null, 2));
|
|
@@ -26236,20 +26272,27 @@ async function enhancedInitCommand(options = {}) {
|
|
|
26236
26272
|
}
|
|
26237
26273
|
s.stop("\u2705 Project created!");
|
|
26238
26274
|
if (shouldInstall) {
|
|
26239
|
-
const additionalDeps =
|
|
26275
|
+
const additionalDeps = {};
|
|
26240
26276
|
if (database && database !== "none") {
|
|
26241
|
-
|
|
26277
|
+
Object.assign(additionalDeps, getDatabaseDependencies(database));
|
|
26242
26278
|
}
|
|
26243
26279
|
if (codeQuality) {
|
|
26244
|
-
|
|
26280
|
+
Object.assign(additionalDeps, getCodeQualityDependencies(codeQuality));
|
|
26245
26281
|
}
|
|
26246
26282
|
if (testing === "vitest") {
|
|
26247
|
-
additionalDeps
|
|
26283
|
+
additionalDeps["vitest"] = "catalog:";
|
|
26284
|
+
additionalDeps["@vitest/ui"] = "catalog:";
|
|
26248
26285
|
}
|
|
26249
26286
|
if (uiLibrary === "shadcn") {
|
|
26250
|
-
additionalDeps
|
|
26287
|
+
additionalDeps["class-variance-authority"] = "catalog:";
|
|
26288
|
+
additionalDeps["clsx"] = "catalog:";
|
|
26289
|
+
additionalDeps["tailwind-merge"] = "catalog:";
|
|
26290
|
+
}
|
|
26291
|
+
if (Object.keys(additionalDeps).length > 0) {
|
|
26292
|
+
await installDependencies(projectPath, additionalDeps);
|
|
26293
|
+
} else {
|
|
26294
|
+
await installDependencies(projectPath);
|
|
26251
26295
|
}
|
|
26252
|
-
await installDependencies(projectPath, additionalDeps);
|
|
26253
26296
|
}
|
|
26254
26297
|
const getDevCommand = () => {
|
|
26255
26298
|
if (preset === "full" || preset === "web")
|