vela 0.13.1 → 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 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.1",
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.4",
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",
@@ -8504,6 +8504,30 @@ import { Command as Command76, InvalidArgumentError as InvalidArgumentError4 } f
8504
8504
  import pc15 from "picocolors";
8505
8505
  import PocketBase4 from "pocketbase";
8506
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
+
8507
8531
  // src/lib/vite.ts
8508
8532
  import path31 from "node:path";
8509
8533
  import process26 from "node:process";
@@ -8549,7 +8573,7 @@ function parsePort(value) {
8549
8573
  }
8550
8574
  return port;
8551
8575
  }
8552
- 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) => {
8553
8577
  const cwd = process27.cwd();
8554
8578
  process27.env.VELA_DATA_DIR ??= localDataDir(cwd);
8555
8579
  const startTime = performance.now();
@@ -8574,7 +8598,8 @@ var dev = new Command76("dev").description("start the development server").optio
8574
8598
  });
8575
8599
  pbProc = started.proc;
8576
8600
  process27.env.POCKETBASE_URL = started.url;
8577
- pbProc.stdout?.pipe(process27.stdout);
8601
+ if (options.allSql) pbProc.stdout?.pipe(process27.stdout);
8602
+ else pbProc.stdout?.pipe(createPocketbaseLogFilter()).pipe(process27.stdout);
8578
8603
  pbProc.stderr?.pipe(process27.stderr);
8579
8604
  pbProc.on("error", (err) => console.error("PocketBase error:", err));
8580
8605
  pbProc.on("exit", (code) => console.log(`PocketBase exited with code ${code}`));