vela 0.12.0 → 0.12.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/bin.js +7 -2
- package/dist/bin.js.map +2 -2
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -21,7 +21,7 @@ import pc38 from "picocolors";
|
|
|
21
21
|
// package.json
|
|
22
22
|
var package_default = {
|
|
23
23
|
name: "vela",
|
|
24
|
-
version: "0.12.
|
|
24
|
+
version: "0.12.1",
|
|
25
25
|
type: "module",
|
|
26
26
|
description: "A CLI for creating and updating SvelteKit projects",
|
|
27
27
|
license: "MIT",
|
|
@@ -363,6 +363,11 @@ function hasBackend(from = process3.cwd()) {
|
|
|
363
363
|
const root = findWorkspaceRoot(from);
|
|
364
364
|
return root !== null && fs2.existsSync(path.join(root, DATA_DIR));
|
|
365
365
|
}
|
|
366
|
+
function hasApiRoutes(root) {
|
|
367
|
+
const dir = path.join(root, "src", "routes", "api");
|
|
368
|
+
if (!fs2.existsSync(dir)) return false;
|
|
369
|
+
return fs2.readdirSync(dir).some((entry) => entry !== "README.md");
|
|
370
|
+
}
|
|
366
371
|
function localDataDir(from = process3.cwd()) {
|
|
367
372
|
return path.join(findWorkspaceRoot(from) ?? from, DATA_DIR);
|
|
368
373
|
}
|
|
@@ -404,7 +409,7 @@ function detectFeatures(root, { isAppMode, isPaymentsMode }) {
|
|
|
404
409
|
const hasDep = (name) => Boolean(pkg.dependencies?.[name] || pkg.devDependencies?.[name]);
|
|
405
410
|
return {
|
|
406
411
|
auth: isAppMode,
|
|
407
|
-
api:
|
|
412
|
+
api: hasApiRoutes(root),
|
|
408
413
|
apiKeys: has("src/routes/api/api-keys") || has("src/routes/(app)/api-keys"),
|
|
409
414
|
backend: has(DATA_DIR),
|
|
410
415
|
i18n: has("wuchale.config.js") || hasDep("wuchale"),
|