@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.
- package/dist/bin/palbase-backend.cjs +79 -26
- package/dist/bin/palbase-backend.cjs.map +1 -1
- package/dist/bin/palbase-backend.js +5 -5
- package/dist/{chunk-IXAX5CON.js → chunk-C4ZA5AT2.js} +1 -1
- package/dist/{chunk-IXAX5CON.js.map → chunk-C4ZA5AT2.js.map} +1 -1
- package/dist/{chunk-AZJIKCOR.js → chunk-DCDHAKF3.js} +39 -23
- package/dist/{chunk-AZJIKCOR.js.map → chunk-DCDHAKF3.js.map} +1 -1
- package/dist/{chunk-Z4CZRMNF.js → chunk-GOPZPM2A.js} +2 -2
- package/dist/{chunk-5C5UCILO.js → chunk-N54QZER3.js} +3 -3
- package/dist/{chunk-XEGZ3S2Q.js → chunk-QMFOL2K6.js} +32 -7
- package/dist/chunk-QMFOL2K6.js.map +1 -0
- package/dist/{chunk-KGP6ALIU.js → chunk-XOX6RFPZ.js} +30 -8
- package/dist/chunk-XOX6RFPZ.js.map +1 -0
- package/dist/db/index.cjs +14 -4
- package/dist/db/index.cjs.map +1 -1
- package/dist/db/index.d.cts +1 -1
- package/dist/db/index.d.ts +1 -1
- package/dist/db/index.js +3 -3
- package/dist/engine/index.cjs +79 -26
- package/dist/engine/index.cjs.map +1 -1
- package/dist/engine/index.d.cts +3 -3
- package/dist/engine/index.d.ts +3 -3
- package/dist/engine/index.js +5 -5
- package/dist/{index-DgYkdNT9.d.cts → index-BWgnGj68.d.cts} +68 -20
- package/dist/{index-BILC9WwS.d.ts → index-Bi74dcOu.d.ts} +2 -2
- package/dist/{index-BgWnP07a.d.ts → index-Dg10RnZO.d.ts} +68 -20
- package/dist/{index-CWGiJ2Up.d.cts → index-g6iQyYci.d.cts} +2 -2
- package/dist/index.cjs +59 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +5 -5
- package/dist/openapi/index.d.cts +2 -2
- package/dist/openapi/index.d.ts +2 -2
- package/dist/{registry-BcRYIQ-R.d.cts → registry-6VT5RPeO.d.cts} +1 -1
- package/dist/{registry-ClzjxIWy.d.ts → registry-B-sxJJN0.d.ts} +1 -1
- package/dist/test/index.cjs +35 -8
- package/dist/test/index.cjs.map +1 -1
- package/dist/test/index.d.cts +1 -1
- package/dist/test/index.d.ts +1 -1
- package/dist/test/index.js +7 -5
- package/dist/test/index.js.map +1 -1
- package/docs/README.md +1 -1
- package/docs/auth.md +102 -20
- package/docs/llms-full.txt +129 -21
- package/docs/schema.md +26 -0
- package/package.json +1 -1
- package/template/db/public.ts +23 -0
- package/template/package.json +1 -1
- package/dist/chunk-KGP6ALIU.js.map +0 -1
- package/dist/chunk-XEGZ3S2Q.js.map +0 -1
- /package/dist/{chunk-Z4CZRMNF.js.map → chunk-GOPZPM2A.js.map} +0 -0
- /package/dist/{chunk-5C5UCILO.js.map → chunk-N54QZER3.js.map} +0 -0
package/dist/test/index.d.cts
CHANGED
|
@@ -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-
|
|
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';
|
package/dist/test/index.d.ts
CHANGED
|
@@ -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-
|
|
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';
|
package/dist/test/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__requestALS,
|
|
3
3
|
makeTypedSurface
|
|
4
|
-
} from "../chunk-
|
|
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-
|
|
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
|
-
|
|
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
|
|
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, [
|