vela 0.13.0 → 0.13.2
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 +35 -6
- package/dist/bin.js.map +3 -3
- package/package.json +3 -3
- package/templates/minimal/package.template.json +1 -4
package/dist/bin.js
CHANGED
|
@@ -21,7 +21,7 @@ import pc42 from "picocolors";
|
|
|
21
21
|
// package.json
|
|
22
22
|
var package_default = {
|
|
23
23
|
name: "vela",
|
|
24
|
-
version: "0.13.
|
|
24
|
+
version: "0.13.2",
|
|
25
25
|
type: "module",
|
|
26
26
|
description: "A CLI for creating and updating SvelteKit projects",
|
|
27
27
|
license: "MIT",
|
|
@@ -70,7 +70,7 @@ var package_default = {
|
|
|
70
70
|
"package-manager-detector": "^1.8.0",
|
|
71
71
|
picocolors: "^1.1.1",
|
|
72
72
|
pocketbase: "^0.28.0",
|
|
73
|
-
"pocketbase-server": "^0.40.
|
|
73
|
+
"pocketbase-server": "^0.40.5-beta.1",
|
|
74
74
|
stripe: "^19.3.0",
|
|
75
75
|
svelte: "^5.56.10",
|
|
76
76
|
tar: "^7.5.22",
|
|
@@ -86,7 +86,7 @@ var package_default = {
|
|
|
86
86
|
shellcheck: "^4.1.0",
|
|
87
87
|
typescript: "^5.6.0",
|
|
88
88
|
vite: "^8.2.2",
|
|
89
|
-
vitest: "^
|
|
89
|
+
vitest: "^5.0.1"
|
|
90
90
|
},
|
|
91
91
|
peerDependencies: {
|
|
92
92
|
"@sveltejs/kit": "^2.57.1",
|
|
@@ -1648,7 +1648,11 @@ var VELA_ONLY_FILES = [
|
|
|
1648
1648
|
adds: "the shadcn-svelte config (vega style, lucide icons) that `vela ui add` reads"
|
|
1649
1649
|
},
|
|
1650
1650
|
{ path: ".npmrc", adds: "engine-strict=true" },
|
|
1651
|
-
{ path: ".ignore", adds: "search ignores for generated files" }
|
|
1651
|
+
{ path: ".ignore", adds: "search ignores for generated files" },
|
|
1652
|
+
{
|
|
1653
|
+
path: "vitest.config.ts",
|
|
1654
|
+
adds: "the server test project `vela test:server` runs \u2014 without it test/setup.ts never loads"
|
|
1655
|
+
}
|
|
1652
1656
|
];
|
|
1653
1657
|
var VELA_ONLY_DIRS = ["src/lib/components", "data", "test", "static"];
|
|
1654
1658
|
var bless = new Command2("bless").description("upgrade a vanilla SvelteKit project into a VelaStack project").argument("[path]", "path to the existing SvelteKit project").option("--template <type>", "template to scaffold from", "minimal").option("--email <email>", "email of the admin user").option("--password <password>", "password of the admin user").option("--no-install", "skip installing dependencies").addOption(installOption).option("--skip-routes", "preserve src/routes even if it looks untouched").option("--force-routes", "replace src/routes with the vela template without detection").configureHelp(helpConfig).action((projectPath, rawOpts) => {
|
|
@@ -8500,6 +8504,30 @@ import { Command as Command76, InvalidArgumentError as InvalidArgumentError4 } f
|
|
|
8500
8504
|
import pc15 from "picocolors";
|
|
8501
8505
|
import PocketBase4 from "pocketbase";
|
|
8502
8506
|
|
|
8507
|
+
// src/lib/pocketbase-log-filter.ts
|
|
8508
|
+
import { Transform } from "node:stream";
|
|
8509
|
+
var ANSI = /\x1b\[[0-9;]*m/g;
|
|
8510
|
+
var AUTH_LOOKUP = /^\[\d+(?:\.\d+)?ms\] SELECT [`"]?_superusers[`"]?\.\* FROM [`"]?_superusers[`"]? WHERE [`"]?_superusers[`"]?\.[`"]?id[`"]?\s*=\s*'[^']*' LIMIT 1$/;
|
|
8511
|
+
function isAuthLookupLine(line) {
|
|
8512
|
+
return AUTH_LOOKUP.test(line.replace(ANSI, "").trim());
|
|
8513
|
+
}
|
|
8514
|
+
function createPocketbaseLogFilter() {
|
|
8515
|
+
let pending = "";
|
|
8516
|
+
return new Transform({
|
|
8517
|
+
transform(chunk, _encoding, callback) {
|
|
8518
|
+
const lines = (pending + chunk.toString()).split("\n");
|
|
8519
|
+
pending = lines.pop() ?? "";
|
|
8520
|
+
const kept = lines.filter((line) => !isAuthLookupLine(line));
|
|
8521
|
+
callback(null, kept.length ? kept.join("\n") + "\n" : void 0);
|
|
8522
|
+
},
|
|
8523
|
+
flush(callback) {
|
|
8524
|
+
const rest = pending;
|
|
8525
|
+
pending = "";
|
|
8526
|
+
callback(null, rest && !isAuthLookupLine(rest) ? rest : void 0);
|
|
8527
|
+
}
|
|
8528
|
+
});
|
|
8529
|
+
}
|
|
8530
|
+
|
|
8503
8531
|
// src/lib/vite.ts
|
|
8504
8532
|
import path31 from "node:path";
|
|
8505
8533
|
import process26 from "node:process";
|
|
@@ -8545,7 +8573,7 @@ function parsePort(value) {
|
|
|
8545
8573
|
}
|
|
8546
8574
|
return port;
|
|
8547
8575
|
}
|
|
8548
|
-
var dev = new Command76("dev").description("start the development server").option("--open [path]", "open the app in a browser once the server is ready").option("--host [host]", "expose the server on the network").option("--port <port>", "port to listen on", parsePort).option("--strictPort", "exit if the port is already in use instead of taking the next one").option("--cors", "enable CORS").option("--force", "re-bundle dependencies, ignoring the optimizer cache").configureHelp(helpConfig).action(async (options) => {
|
|
8576
|
+
var dev = new Command76("dev").description("start the development server").option("--open [path]", "open the app in a browser once the server is ready").option("--host [host]", "expose the server on the network").option("--port <port>", "port to listen on", parsePort).option("--strictPort", "exit if the port is already in use instead of taking the next one").option("--cors", "enable CORS").option("--force", "re-bundle dependencies, ignoring the optimizer cache").option("--all-sql", "also print the auth lookup PocketBase runs on every request").configureHelp(helpConfig).action(async (options) => {
|
|
8549
8577
|
const cwd = process27.cwd();
|
|
8550
8578
|
process27.env.VELA_DATA_DIR ??= localDataDir(cwd);
|
|
8551
8579
|
const startTime = performance.now();
|
|
@@ -8570,7 +8598,8 @@ var dev = new Command76("dev").description("start the development server").optio
|
|
|
8570
8598
|
});
|
|
8571
8599
|
pbProc = started.proc;
|
|
8572
8600
|
process27.env.POCKETBASE_URL = started.url;
|
|
8573
|
-
pbProc.stdout?.pipe(process27.stdout);
|
|
8601
|
+
if (options.allSql) pbProc.stdout?.pipe(process27.stdout);
|
|
8602
|
+
else pbProc.stdout?.pipe(createPocketbaseLogFilter()).pipe(process27.stdout);
|
|
8574
8603
|
pbProc.stderr?.pipe(process27.stderr);
|
|
8575
8604
|
pbProc.on("error", (err) => console.error("PocketBase error:", err));
|
|
8576
8605
|
pbProc.on("exit", (code) => console.log(`PocketBase exited with code ${code}`));
|