@palbase/backend 32.0.0 → 33.0.0

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.
Files changed (53) hide show
  1. package/dist/bin/palbase-backend.cjs +79 -26
  2. package/dist/bin/palbase-backend.cjs.map +1 -1
  3. package/dist/bin/palbase-backend.js +5 -5
  4. package/dist/{chunk-IXAX5CON.js → chunk-C4ZA5AT2.js} +1 -1
  5. package/dist/{chunk-IXAX5CON.js.map → chunk-C4ZA5AT2.js.map} +1 -1
  6. package/dist/{chunk-AZJIKCOR.js → chunk-DCDHAKF3.js} +39 -23
  7. package/dist/{chunk-AZJIKCOR.js.map → chunk-DCDHAKF3.js.map} +1 -1
  8. package/dist/{chunk-Z4CZRMNF.js → chunk-GOPZPM2A.js} +2 -2
  9. package/dist/{chunk-5C5UCILO.js → chunk-N54QZER3.js} +3 -3
  10. package/dist/{chunk-XEGZ3S2Q.js → chunk-QMFOL2K6.js} +32 -7
  11. package/dist/chunk-QMFOL2K6.js.map +1 -0
  12. package/dist/{chunk-KGP6ALIU.js → chunk-XOX6RFPZ.js} +30 -8
  13. package/dist/chunk-XOX6RFPZ.js.map +1 -0
  14. package/dist/db/index.cjs +14 -4
  15. package/dist/db/index.cjs.map +1 -1
  16. package/dist/db/index.d.cts +1 -1
  17. package/dist/db/index.d.ts +1 -1
  18. package/dist/db/index.js +3 -3
  19. package/dist/engine/index.cjs +79 -26
  20. package/dist/engine/index.cjs.map +1 -1
  21. package/dist/engine/index.d.cts +3 -3
  22. package/dist/engine/index.d.ts +3 -3
  23. package/dist/engine/index.js +5 -5
  24. package/dist/{index-DgYkdNT9.d.cts → index-BWgnGj68.d.cts} +68 -20
  25. package/dist/{index-BILC9WwS.d.ts → index-Bi74dcOu.d.ts} +2 -2
  26. package/dist/{index-BgWnP07a.d.ts → index-Dg10RnZO.d.ts} +68 -20
  27. package/dist/{index-CWGiJ2Up.d.cts → index-g6iQyYci.d.cts} +2 -2
  28. package/dist/index.cjs +59 -12
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.d.cts +6 -6
  31. package/dist/index.d.ts +6 -6
  32. package/dist/index.js +5 -5
  33. package/dist/openapi/index.d.cts +2 -2
  34. package/dist/openapi/index.d.ts +2 -2
  35. package/dist/{registry-BcRYIQ-R.d.cts → registry-6VT5RPeO.d.cts} +1 -1
  36. package/dist/{registry-ClzjxIWy.d.ts → registry-B-sxJJN0.d.ts} +1 -1
  37. package/dist/test/index.cjs +35 -8
  38. package/dist/test/index.cjs.map +1 -1
  39. package/dist/test/index.d.cts +1 -1
  40. package/dist/test/index.d.ts +1 -1
  41. package/dist/test/index.js +7 -5
  42. package/dist/test/index.js.map +1 -1
  43. package/docs/README.md +1 -1
  44. package/docs/auth.md +102 -20
  45. package/docs/llms-full.txt +129 -21
  46. package/docs/schema.md +26 -0
  47. package/package.json +1 -1
  48. package/template/db/public.ts +23 -0
  49. package/template/package.json +1 -1
  50. package/dist/chunk-KGP6ALIU.js.map +0 -1
  51. package/dist/chunk-XEGZ3S2Q.js.map +0 -1
  52. /package/dist/{chunk-Z4CZRMNF.js.map → chunk-GOPZPM2A.js.map} +0 -0
  53. /package/dist/{chunk-5C5UCILO.js.map → chunk-N54QZER3.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { T as Token } from '../module-Dl1KFVtc.cjs';
2
- import { E as EnvServiceDatabase, D as DBClient, a as RuntimeServices } from '../index-DgYkdNT9.cjs';
2
+ import { E as EnvServiceDatabase, D as DBClient, a as RuntimeServices } from '../index-BWgnGj68.cjs';
3
3
  import '../db/env.cjs';
4
4
  import '../stack.cjs';
5
5
  import 'zod';
@@ -1,5 +1,5 @@
1
1
  import { T as Token } from '../module-Dl1KFVtc.js';
2
- import { E as EnvServiceDatabase, D as DBClient, a as RuntimeServices } from '../index-BgWnP07a.js';
2
+ import { E as EnvServiceDatabase, D as DBClient, a as RuntimeServices } from '../index-Dg10RnZO.js';
3
3
  import '../db/env.js';
4
4
  import '../stack.js';
5
5
  import 'zod';
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __requestALS,
3
3
  makeTypedSurface
4
- } from "../chunk-XEGZ3S2Q.js";
4
+ } from "../chunk-QMFOL2K6.js";
5
5
  import {
6
6
  assertNoExpressionHandles,
7
7
  assertUsableFilter,
@@ -11,7 +11,7 @@ import {
11
11
  isColumnExpr,
12
12
  isNowExpr,
13
13
  isSqlFragment
14
- } from "../chunk-IXAX5CON.js";
14
+ } from "../chunk-C4ZA5AT2.js";
15
15
  import {
16
16
  __name
17
17
  } from "../chunk-KATPXCJ5.js";
@@ -531,7 +531,7 @@ function createMockDB() {
531
531
  // ops write to, so a test that writes three rows and counts them gets 3 —
532
532
  // a mock that answered 0 would make the surface look broken in exactly the
533
533
  // tests meant to prove it works.
534
- async updateMany(table, where, set) {
534
+ async updateMany(table, where, set, opts) {
535
535
  if (Object.keys(where).length === 0) throw new Error(`updateMany(${table}): bo\u015F filtre`);
536
536
  assertUsableFilter("updateMany", table, where);
537
537
  refuseFragment("updateMany", table, where);
@@ -551,7 +551,8 @@ function createMockDB() {
551
551
  row[k] = v;
552
552
  }
553
553
  }
554
- return hit;
554
+ for (const row of hit) track(tracked.updated, table, row);
555
+ return opts?.returning === false ? hit.length : hit;
555
556
  },
556
557
  async deleteMany(table, where) {
557
558
  if (Object.keys(where).length === 0) throw new Error(`deleteMany(${table}): bo\u015F filtre`);
@@ -801,7 +802,8 @@ function createMockDB() {
801
802
  async delete(table, id) {
802
803
  const rows = store.get(table) ?? [];
803
804
  const idx = rows.findIndex((r) => r["id"] === id);
804
- if (idx >= 0) rows.splice(idx, 1);
805
+ if (idx < 0) return;
806
+ rows.splice(idx, 1);
805
807
  const list = tracked.deleted.get(table);
806
808
  if (list) list.push(id);
807
809
  else tracked.deleted.set(table, [