@palbase/backend 25.0.0 → 25.0.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/palbase-backend.cjs +2 -0
- package/dist/bin/palbase-backend.cjs.map +1 -1
- package/dist/bin/palbase-backend.js +2 -2
- package/dist/{chunk-43A3KGWL.js → chunk-34I4GB7D.js} +4 -2
- package/dist/{chunk-43A3KGWL.js.map → chunk-34I4GB7D.js.map} +1 -1
- package/dist/{chunk-ZQRWW37O.js → chunk-35PNTIRN.js} +5 -1
- package/dist/chunk-35PNTIRN.js.map +1 -0
- package/dist/{chunk-OEQBHE2Z.js → chunk-7JSEN7UR.js} +20 -4
- package/dist/chunk-7JSEN7UR.js.map +1 -0
- package/dist/{chunk-5CMLOAEF.js → chunk-YOY5DFQS.js} +2 -2
- package/dist/db/env.cjs.map +1 -1
- package/dist/db/env.d.cts +2 -1
- package/dist/db/env.d.ts +2 -1
- package/dist/db/index.cjs +17 -3
- package/dist/db/index.cjs.map +1 -1
- package/dist/db/index.d.cts +2 -2
- package/dist/db/index.d.ts +2 -2
- package/dist/db/index.js +1 -1
- package/dist/{endpoint-DMwJjEHQ.d.ts → endpoint-CTEHhb7A.d.ts} +19 -8
- package/dist/{endpoint-BSGw1pTu.d.cts → endpoint-DYHMo6cC.d.cts} +19 -8
- package/dist/engine/index.cjs +2 -0
- 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 +2 -2
- package/dist/{index-BF1f0DfA.d.ts → index-CUomTA3e.d.ts} +3 -3
- package/dist/{index-Ct1iiB4N.d.ts → index-CW21M9Z3.d.ts} +24 -17
- package/dist/{index-CoaDN9dL.d.cts → index-ClpDeSos.d.cts} +3 -3
- package/dist/{index-CwaWRhyc.d.cts → index-CmBK76nx.d.cts} +24 -17
- package/dist/index.cjs +80 -51
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -11
- package/dist/index.d.ts +13 -11
- package/dist/index.js +62 -51
- package/dist/index.js.map +1 -1
- package/dist/openapi/index.cjs +1 -1
- package/dist/openapi/index.cjs.map +1 -1
- package/dist/openapi/index.d.cts +2 -2
- package/dist/openapi/index.d.ts +2 -2
- package/dist/openapi/index.js +3 -3
- package/dist/openapi/index.js.map +1 -1
- package/dist/{registry-CgJvDYUW.d.cts → registry-CC0WBQq6.d.cts} +1 -1
- package/dist/{registry-B8pld3fj.d.ts → registry-dZZ5JKYg.d.ts} +1 -1
- package/dist/test/index.d.cts +1 -1
- package/dist/test/index.d.ts +1 -1
- package/docs/README.md +9 -8
- package/docs/database.md +2 -2
- package/docs/endpoints.md +6 -5
- package/docs/getting-started.md +1 -1
- package/docs/llms-full.txt +74 -38
- package/docs/migrations.md +16 -14
- package/docs/schema.md +38 -7
- package/docs/services.md +2 -1
- package/package.json +1 -1
- package/dist/chunk-OEQBHE2Z.js.map +0 -1
- package/dist/chunk-ZQRWW37O.js.map +0 -1
- /package/dist/{chunk-5CMLOAEF.js.map → chunk-YOY5DFQS.js.map} +0 -0
package/dist/db/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as AnyColumn, C as ColumnBuilder, a as ColumnDef, b as ColumnMap, c as ColumnType, d as EXTENSION_DEPENDENCIES, e as EmbeddingModelRef, g as EnvServiceDatabase, E as EnvTypedDatabase, I as InsertShape, O as OnDeleteAction, P as PALBASE_EXTENSIONS, j as PalbaseExtension, k as PolicyBuilder, l as PolicyCommand, m as PolicyDef, n as PolicyMode, R as RawConstraintDef, o as RowShape, S as SchemaDef,
|
|
2
|
-
export { M as Materialized, b1 as Ref, b3 as TxColumnExpr, b4 as TxInsertShape, b6 as TxNow, T as TxPlanBody, b7 as TxPlanError, b8 as TxPlanHandle, b9 as TxPlanOpResult, ba as TxPlanRejection, g as TxPlanResponse, bb as TxRefError, bc as TxRow, bd as TxRows, be as TxSelectOptions, bf as TxSetShape, bh as TxTable, bi as TxWhere, bs as dec, bu as inc, bv as now } from '../endpoint-
|
|
1
|
+
export { A as AnyColumn, C as ColumnBuilder, a as ColumnDef, b as ColumnMap, c as ColumnType, d as EXTENSION_DEPENDENCIES, e as EmbeddingModelRef, g as EnvServiceDatabase, E as EnvTypedDatabase, I as InsertShape, O as OnDeleteAction, P as PALBASE_EXTENSIONS, j as PalbaseExtension, k as PolicyBuilder, l as PolicyCommand, m as PolicyDef, n as PolicyMode, R as RawConstraintDef, o as RowShape, S as SchemaDef, T as TABLE_META, p as TableDef, q as TableHandle, r as TableInput, s as TxPlan, t as TxTables, u as TypedDB, v as TypedTable, w as TypedTx, x as bigint, y as boolean, z as defineSchema, B as defineTable, D as enumType, F as installationRef, G as integer, H as isPalbaseExtension, J as jsonb, K as makeTypedDB, M as openai, N as ownedByUser, Q as policy, U as raw, V as text, W as timestamp, X as userRef, Y as uuid, Z as vector } from '../index-CmBK76nx.cjs';
|
|
2
|
+
export { M as Materialized, b1 as Ref, b3 as TxColumnExpr, b4 as TxInsertShape, b6 as TxNow, T as TxPlanBody, b7 as TxPlanError, b8 as TxPlanHandle, b9 as TxPlanOpResult, ba as TxPlanRejection, g as TxPlanResponse, bb as TxRefError, bc as TxRow, bd as TxRows, be as TxSelectOptions, bf as TxSetShape, bh as TxTable, bi as TxWhere, bs as dec, bu as inc, bv as now } from '../endpoint-DYHMo6cC.cjs';
|
|
3
3
|
import './env.cjs';
|
|
4
4
|
import '../stack.cjs';
|
|
5
5
|
import 'zod';
|
package/dist/db/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as AnyColumn, C as ColumnBuilder, a as ColumnDef, b as ColumnMap, c as ColumnType, d as EXTENSION_DEPENDENCIES, e as EmbeddingModelRef, g as EnvServiceDatabase, E as EnvTypedDatabase, I as InsertShape, O as OnDeleteAction, P as PALBASE_EXTENSIONS, j as PalbaseExtension, k as PolicyBuilder, l as PolicyCommand, m as PolicyDef, n as PolicyMode, R as RawConstraintDef, o as RowShape, S as SchemaDef,
|
|
2
|
-
export { M as Materialized, b1 as Ref, b3 as TxColumnExpr, b4 as TxInsertShape, b6 as TxNow, T as TxPlanBody, b7 as TxPlanError, b8 as TxPlanHandle, b9 as TxPlanOpResult, ba as TxPlanRejection, g as TxPlanResponse, bb as TxRefError, bc as TxRow, bd as TxRows, be as TxSelectOptions, bf as TxSetShape, bh as TxTable, bi as TxWhere, bs as dec, bu as inc, bv as now } from '../endpoint-
|
|
1
|
+
export { A as AnyColumn, C as ColumnBuilder, a as ColumnDef, b as ColumnMap, c as ColumnType, d as EXTENSION_DEPENDENCIES, e as EmbeddingModelRef, g as EnvServiceDatabase, E as EnvTypedDatabase, I as InsertShape, O as OnDeleteAction, P as PALBASE_EXTENSIONS, j as PalbaseExtension, k as PolicyBuilder, l as PolicyCommand, m as PolicyDef, n as PolicyMode, R as RawConstraintDef, o as RowShape, S as SchemaDef, T as TABLE_META, p as TableDef, q as TableHandle, r as TableInput, s as TxPlan, t as TxTables, u as TypedDB, v as TypedTable, w as TypedTx, x as bigint, y as boolean, z as defineSchema, B as defineTable, D as enumType, F as installationRef, G as integer, H as isPalbaseExtension, J as jsonb, K as makeTypedDB, M as openai, N as ownedByUser, Q as policy, U as raw, V as text, W as timestamp, X as userRef, Y as uuid, Z as vector } from '../index-CW21M9Z3.js';
|
|
2
|
+
export { M as Materialized, b1 as Ref, b3 as TxColumnExpr, b4 as TxInsertShape, b6 as TxNow, T as TxPlanBody, b7 as TxPlanError, b8 as TxPlanHandle, b9 as TxPlanOpResult, ba as TxPlanRejection, g as TxPlanResponse, bb as TxRefError, bc as TxRow, bd as TxRows, be as TxSelectOptions, bf as TxSetShape, bh as TxTable, bi as TxWhere, bs as dec, bu as inc, bv as now } from '../endpoint-CTEHhb7A.js';
|
|
3
3
|
import './env.js';
|
|
4
4
|
import '../stack.js';
|
|
5
5
|
import 'zod';
|
package/dist/db/index.js
CHANGED
|
@@ -77,17 +77,28 @@ interface MiddlewareContext extends PalbaseModuleClients {
|
|
|
77
77
|
/** Middleware function signature — receives context and next function. */
|
|
78
78
|
type MiddlewareHandler = (ctx: MiddlewareContext, next: () => Promise<void>) => Promise<void>;
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
81
|
-
* as endpoint-specific middleware.
|
|
80
|
+
* REMOVED IN BEHAVIOUR, KEPT IN NAME.
|
|
82
81
|
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
82
|
+
* There is no middleware pipeline in this runtime. No bundler reads a
|
|
83
|
+
* `middleware/` directory, the engine never calls a handler defined here, and
|
|
84
|
+
* measured on 2026-08-31 this function had no caller anywhere in the runtime or
|
|
85
|
+
* the CLI. It returned its argument unchanged, so code written against it
|
|
86
|
+
* compiled, deployed, and then never ran — with nothing reporting that.
|
|
86
87
|
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
88
|
+
* A silent shell is the worst version of a retired feature: it lets a user (or a
|
|
89
|
+
* coding assistant, which is how this surfaced) ship a request logger, an auth
|
|
90
|
+
* check or a rate limiter that simply does not exist in production. So the call
|
|
91
|
+
* refuses, and says where the work belongs.
|
|
92
|
+
*
|
|
93
|
+
* The SYMBOL survives because removing a published export costs a major and
|
|
94
|
+
* 25.0.1 had just shipped. Deleting it is a proposal for the next one; the types
|
|
95
|
+
* below stay either way, so a file that only annotates with them still compiles.
|
|
96
|
+
*
|
|
97
|
+
* This is the shape the SDK already uses for a retired surface: `@Query(schema)`
|
|
98
|
+
* on a parameter throws at decoration time with a message naming its
|
|
99
|
+
* replacement.
|
|
89
100
|
*/
|
|
90
|
-
declare function defineMiddleware(
|
|
101
|
+
declare function defineMiddleware(_fn: MiddlewareHandler): never;
|
|
91
102
|
|
|
92
103
|
/**
|
|
93
104
|
* tx-plan.ts — `Database.transaction()` as a PLAN, not a pinned session.
|
|
@@ -77,17 +77,28 @@ interface MiddlewareContext extends PalbaseModuleClients {
|
|
|
77
77
|
/** Middleware function signature — receives context and next function. */
|
|
78
78
|
type MiddlewareHandler = (ctx: MiddlewareContext, next: () => Promise<void>) => Promise<void>;
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
81
|
-
* as endpoint-specific middleware.
|
|
80
|
+
* REMOVED IN BEHAVIOUR, KEPT IN NAME.
|
|
82
81
|
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
82
|
+
* There is no middleware pipeline in this runtime. No bundler reads a
|
|
83
|
+
* `middleware/` directory, the engine never calls a handler defined here, and
|
|
84
|
+
* measured on 2026-08-31 this function had no caller anywhere in the runtime or
|
|
85
|
+
* the CLI. It returned its argument unchanged, so code written against it
|
|
86
|
+
* compiled, deployed, and then never ran — with nothing reporting that.
|
|
86
87
|
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
88
|
+
* A silent shell is the worst version of a retired feature: it lets a user (or a
|
|
89
|
+
* coding assistant, which is how this surfaced) ship a request logger, an auth
|
|
90
|
+
* check or a rate limiter that simply does not exist in production. So the call
|
|
91
|
+
* refuses, and says where the work belongs.
|
|
92
|
+
*
|
|
93
|
+
* The SYMBOL survives because removing a published export costs a major and
|
|
94
|
+
* 25.0.1 had just shipped. Deleting it is a proposal for the next one; the types
|
|
95
|
+
* below stay either way, so a file that only annotates with them still compiles.
|
|
96
|
+
*
|
|
97
|
+
* This is the shape the SDK already uses for a retired surface: `@Query(schema)`
|
|
98
|
+
* on a parameter throws at decoration time with a message naming its
|
|
99
|
+
* replacement.
|
|
89
100
|
*/
|
|
90
|
-
declare function defineMiddleware(
|
|
101
|
+
declare function defineMiddleware(_fn: MiddlewareHandler): never;
|
|
91
102
|
|
|
92
103
|
/**
|
|
93
104
|
* tx-plan.ts — `Database.transaction()` as a PLAN, not a pinned session.
|
package/dist/engine/index.cjs
CHANGED
|
@@ -2610,6 +2610,7 @@ function assertZeroArgConstructor(Ctrl, kind) {
|
|
|
2610
2610
|
}
|
|
2611
2611
|
|
|
2612
2612
|
// src/engine/router.ts
|
|
2613
|
+
var ROOM_META = /* @__PURE__ */ Symbol.for("palbase.backend.room");
|
|
2613
2614
|
var CONTROLLER_META = /* @__PURE__ */ Symbol.for("palbase.backend.controllerMeta");
|
|
2614
2615
|
function toSegments(path) {
|
|
2615
2616
|
return path.split("/").filter(Boolean).map((s) => s.startsWith("{") && s.endsWith("}") ? `:${s.slice(1, -1)}` : s);
|
|
@@ -2617,6 +2618,7 @@ function toSegments(path) {
|
|
|
2617
2618
|
function buildRouteTable(controllers) {
|
|
2618
2619
|
const table = [];
|
|
2619
2620
|
for (const Ctrl of controllers) {
|
|
2621
|
+
if (Ctrl[ROOM_META] !== void 0) continue;
|
|
2620
2622
|
const ctor = Ctrl;
|
|
2621
2623
|
const meta = ctor[CONTROLLER_META];
|
|
2622
2624
|
const basePath = meta?.basePath ?? "";
|