@palbase/backend 35.0.1 → 36.0.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/palbase-backend.cjs +556 -487
- package/dist/bin/palbase-backend.cjs.map +1 -1
- package/dist/bin/palbase-backend.js +6 -6
- package/dist/{chunk-L4R7WXLH.js → chunk-7WAGQ3VR.js} +4 -171
- package/dist/chunk-7WAGQ3VR.js.map +1 -0
- package/dist/{chunk-UMESJJRS.js → chunk-CS6NQ6PO.js} +2 -1
- package/dist/chunk-CS6NQ6PO.js.map +1 -0
- package/dist/{chunk-BOD3DT6D.js → chunk-EHKEMHB4.js} +560 -430
- package/dist/chunk-EHKEMHB4.js.map +1 -0
- package/dist/{chunk-PRH45NZU.js → chunk-FFO36MQQ.js} +2 -45
- package/dist/chunk-FFO36MQQ.js.map +1 -0
- package/dist/{chunk-P7MGSAFT.js → chunk-LFUNRWUE.js} +1 -40
- package/dist/chunk-LFUNRWUE.js.map +1 -0
- package/dist/{chunk-RZLY4BOY.js → chunk-PDD55QWN.js} +2 -2
- package/dist/{chunk-YO5GYM73.js → chunk-X7UR3VXA.js} +5 -6
- package/dist/chunk-X7UR3VXA.js.map +1 -0
- package/dist/{chunk-6FEHCEB7.js → chunk-YANGWAIM.js} +3 -3
- package/dist/db/index.cjs +1 -232
- package/dist/db/index.cjs.map +1 -1
- package/dist/db/index.d.cts +3 -46
- package/dist/db/index.d.ts +3 -46
- package/dist/db/index.js +4 -12
- package/dist/engine/index.cjs +556 -487
- package/dist/engine/index.cjs.map +1 -1
- package/dist/engine/index.d.cts +4 -4
- package/dist/engine/index.d.ts +4 -4
- package/dist/engine/index.js +6 -6
- package/dist/{index-DllNjpTl.d.cts → index-CI7S0Wqv.d.cts} +61 -8
- package/dist/{endpoint-BI0yGuEL.d.ts → index-CUy50OLU.d.ts} +6 -82
- package/dist/{endpoint-DaGnjt42.d.cts → index-DRx880KY.d.cts} +6 -82
- package/dist/{index-E8Sd6NFy.d.ts → index-Ogi30dbt.d.ts} +61 -8
- package/dist/index.cjs +5 -237
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -7
- package/dist/index.d.ts +6 -7
- package/dist/index.js +7 -15
- package/dist/index.js.map +1 -1
- package/dist/openapi/index.cjs +1 -0
- package/dist/openapi/index.cjs.map +1 -1
- package/dist/openapi/index.d.cts +3 -3
- package/dist/openapi/index.d.ts +3 -3
- package/dist/openapi/index.js +2 -2
- package/dist/{registry-BnKvIyve.d.cts → registry-C7UCkQf0.d.cts} +1 -1
- package/dist/{registry-zDCj0eOU.d.ts → registry-DJcvbomD.d.ts} +1 -1
- package/dist/test/index.cjs +3 -11
- package/dist/test/index.cjs.map +1 -1
- package/dist/test/index.d.cts +2 -2
- package/dist/test/index.d.ts +2 -2
- package/dist/test/index.js +2 -9
- package/dist/test/index.js.map +1 -1
- package/docs/README.md +1 -1
- package/docs/database.md +2 -60
- package/docs/examples/database-dx.ts +12 -17
- package/docs/llms-full.txt +3 -61
- package/package.json +1 -1
- package/stager/inferred_returns.js +153 -0
- package/stager/return_types.js +9 -4
- package/stager/stage.js +3 -1
- package/template/AGENTS.md +5 -5
- package/template/package.json +2 -2
- package/dist/chunk-BOD3DT6D.js.map +0 -1
- package/dist/chunk-L4R7WXLH.js.map +0 -1
- package/dist/chunk-P7MGSAFT.js.map +0 -1
- package/dist/chunk-PRH45NZU.js.map +0 -1
- package/dist/chunk-UMESJJRS.js.map +0 -1
- package/dist/chunk-YO5GYM73.js.map +0 -1
- package/docs/examples/check-query-contracts.ts +0 -5
- package/docs/examples/database-dx.contract.json +0 -65
- /package/dist/{chunk-RZLY4BOY.js.map → chunk-PDD55QWN.js.map} +0 -0
- /package/dist/{chunk-6FEHCEB7.js.map → chunk-YANGWAIM.js.map} +0 -0
package/dist/openapi/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { OpenApiGeneratorV31 } from '@asteasolutions/zod-to-openapi';
|
|
2
2
|
import { ZodTypeAny } from 'zod';
|
|
3
|
-
import { A as AuthSpec, R as RateLimitConfig } from '../
|
|
4
|
-
import { P as ParamMeta, T as ThrowDescriptor, U as UploadConfig, S as SseConfig } from '../registry-
|
|
5
|
-
import '../stack.cjs';
|
|
3
|
+
import { A as AuthSpec, R as RateLimitConfig } from '../index-DRx880KY.cjs';
|
|
4
|
+
import { P as ParamMeta, T as ThrowDescriptor, U as UploadConfig, S as SseConfig } from '../registry-C7UCkQf0.cjs';
|
|
6
5
|
import '../db/env.cjs';
|
|
6
|
+
import '../stack.cjs';
|
|
7
7
|
import 'node:async_hooks';
|
|
8
8
|
|
|
9
9
|
/** A controller class (constructor). Kept loose — the only contract is that it
|
package/dist/openapi/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { OpenApiGeneratorV31 } from '@asteasolutions/zod-to-openapi';
|
|
2
2
|
import { ZodTypeAny } from 'zod';
|
|
3
|
-
import { A as AuthSpec, R as RateLimitConfig } from '../
|
|
4
|
-
import { P as ParamMeta, T as ThrowDescriptor, U as UploadConfig, S as SseConfig } from '../registry-
|
|
5
|
-
import '../stack.js';
|
|
3
|
+
import { A as AuthSpec, R as RateLimitConfig } from '../index-CUy50OLU.js';
|
|
4
|
+
import { P as ParamMeta, T as ThrowDescriptor, U as UploadConfig, S as SseConfig } from '../registry-DJcvbomD.js';
|
|
6
5
|
import '../db/env.js';
|
|
6
|
+
import '../stack.js';
|
|
7
7
|
import 'node:async_hooks';
|
|
8
8
|
|
|
9
9
|
/** A controller class (constructor). Kept loose — the only contract is that it
|
package/dist/openapi/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getErrorRegistry
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-PDD55QWN.js";
|
|
4
4
|
import {
|
|
5
5
|
getRoom,
|
|
6
6
|
getRoutes,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
resolveController,
|
|
9
9
|
resolveEffectiveAuth
|
|
10
10
|
} from "../chunk-JJW3L62T.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-CS6NQ6PO.js";
|
|
12
12
|
import {
|
|
13
13
|
__commonJS,
|
|
14
14
|
__name,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DatabaseBudget, A as AuthSpec, R as RateLimitConfig } from './
|
|
1
|
+
import { D as DatabaseBudget, A as AuthSpec, R as RateLimitConfig } from './index-DRx880KY.cjs';
|
|
2
2
|
import { ZodTypeAny } from 'zod';
|
|
3
3
|
import { PalbaseBucketName } from './stack.cjs';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DatabaseBudget, A as AuthSpec, R as RateLimitConfig } from './
|
|
1
|
+
import { D as DatabaseBudget, A as AuthSpec, R as RateLimitConfig } from './index-CUy50OLU.js';
|
|
2
2
|
import { ZodTypeAny } from 'zod';
|
|
3
3
|
import { PalbaseBucketName } from './stack.js';
|
|
4
4
|
|
package/dist/test/index.cjs
CHANGED
|
@@ -2292,13 +2292,6 @@ function createMockDB() {
|
|
|
2292
2292
|
__name(resolveInsertValues, "resolveInsertValues");
|
|
2293
2293
|
const ops = {
|
|
2294
2294
|
diagnostics: /* @__PURE__ */ __name(() => null, "diagnostics"),
|
|
2295
|
-
readQuery: /* @__PURE__ */ __name((query) => ops.findMany(query.table, query.where, query.options), "readQuery"),
|
|
2296
|
-
compileQuery() {
|
|
2297
|
-
throw new Error("MockDB cannot compile PostgreSQL query plans; use the real engine to inspect SQL");
|
|
2298
|
-
},
|
|
2299
|
-
async explainQuery() {
|
|
2300
|
-
throw new Error("MockDB cannot EXPLAIN PostgreSQL plans; use a PostgreSQL integration test");
|
|
2301
|
-
},
|
|
2302
2295
|
// The bulk ops and count run against the SAME in-memory store the direct
|
|
2303
2296
|
// ops write to, so a test that writes three rows and counts them gets 3 —
|
|
2304
2297
|
// a mock that answered 0 would make the surface look broken in exactly the
|
|
@@ -3005,7 +2998,9 @@ function makeTableProxy(ops, prefix) {
|
|
|
3005
2998
|
// Older than this run, but the run rewrote this proxy for
|
|
3006
2999
|
// `Database.schema(name).tables.*` and would have carried the gap onto
|
|
3007
3000
|
// the new surface too.
|
|
3008
|
-
updateMany: /* @__PURE__ */ __name((q) => ops().updateMany(name, q.where, q.set
|
|
3001
|
+
updateMany: /* @__PURE__ */ __name((q) => ops().updateMany(name, q.where, q.set, q.returning === void 0 ? void 0 : {
|
|
3002
|
+
returning: q.returning
|
|
3003
|
+
}), "updateMany"),
|
|
3009
3004
|
deleteMany: /* @__PURE__ */ __name((q) => ops().deleteMany(name, q.where), "deleteMany"),
|
|
3010
3005
|
count: /* @__PURE__ */ __name((q) => ops().count(name, q?.where), "count"),
|
|
3011
3006
|
search: /* @__PURE__ */ __name((params) => ops().search(name, params), "search"),
|
|
@@ -3025,9 +3020,6 @@ function makeTypedSurface(raw) {
|
|
|
3025
3020
|
const ops = {
|
|
3026
3021
|
$query: /* @__PURE__ */ __name((sql, params) => raw.query(sql, params), "$query"),
|
|
3027
3022
|
$diagnostics: /* @__PURE__ */ __name(() => raw.diagnostics(), "$diagnostics"),
|
|
3028
|
-
$readQuery: /* @__PURE__ */ __name((query) => raw.readQuery(query), "$readQuery"),
|
|
3029
|
-
$compileQuery: /* @__PURE__ */ __name((query) => raw.compileQuery(query), "$compileQuery"),
|
|
3030
|
-
$explainQuery: /* @__PURE__ */ __name((query) => raw.explainQuery(query), "$explainQuery"),
|
|
3031
3023
|
$insert: /* @__PURE__ */ __name((table, data) => raw.insert(table, data), "$insert"),
|
|
3032
3024
|
$update: /* @__PURE__ */ __name((table, id, data) => raw.update(table, id, data), "$update"),
|
|
3033
3025
|
$delete: /* @__PURE__ */ __name((table, id) => raw.delete(table, id), "$delete"),
|