@palbase/backend 24.0.1 → 24.1.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 +75 -18
- package/dist/bin/palbase-backend.cjs.map +1 -1
- package/dist/bin/palbase-backend.js +2 -2
- package/dist/{chunk-T5IOSOE5.js → chunk-ERDL5VAE.js} +2 -2
- package/dist/{chunk-YSQBC2VL.js → chunk-HPUSV4AZ.js} +71 -20
- package/dist/chunk-HPUSV4AZ.js.map +1 -0
- package/dist/{chunk-H3JAISUY.js → chunk-UWSYTUGM.js} +11 -1
- package/dist/{chunk-H3JAISUY.js.map → chunk-UWSYTUGM.js.map} +1 -1
- package/dist/db/index.d.cts +2 -2
- package/dist/db/index.d.ts +2 -2
- package/dist/engine/index.cjs +75 -18
- 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-BOS_rFBO.d.ts → index-ByBMibIJ.d.ts} +1 -1
- package/dist/{index-dJNhDZ7j.d.ts → index-C0PMn5jl.d.ts} +3 -3
- package/dist/{index-MoQ31B6M.d.cts → index-D4rts8T7.d.cts} +1 -1
- package/dist/{index-C84bLgeO.d.cts → index-DAwHMppB.d.cts} +3 -3
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -9
- package/dist/index.d.ts +23 -9
- package/dist/index.js +5 -3
- package/dist/index.js.map +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 +2 -2
- package/dist/{registry-CEod_5sz.d.ts → registry-B8pld3fj.d.ts} +1 -1
- package/dist/{registry-1X-skBNu.d.cts → registry-CgJvDYUW.d.cts} +1 -1
- 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.map +1 -1
- package/docs/README.md +5 -1
- package/docs/llms-full.txt +5 -1
- package/package.json +1 -1
- package/template/AGENTS.md +34 -22
- package/template/tsconfig.json +6 -0
- package/dist/chunk-YSQBC2VL.js.map +0 -1
- package/dist/{chunk-T5IOSOE5.js.map → chunk-ERDL5VAE.js.map} +0 -0
- package/dist/{endpoint-CcQ1a36a.d.cts → endpoint-BSGw1pTu.d.cts} +16 -16
- package/dist/{endpoint-0_DGBajf.d.ts → endpoint-DMwJjEHQ.d.ts} +16 -16
package/dist/engine/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { A as App, m as AuthVerifier, B as BootRefused, n as CreateAppOptions, E as EgressPolicy, p as EngineConfig, M as ModuleClients, q as RateLimiter, r as RequestDatabase, s as RouteEntry, t as RuntimeHooks, u as ScrubResult, v as SqlDriver, w as SqlTx, x as buildRouteTable, y as createApp, z as createLazyTransaction, G as createOps, H as createRequestDatabase, I as effectiveAuth, J as hostAllowed, K as installEgressFence, O as loadConfig, P as makeMemoryCache, Q as matchRoute, T as quoteIdent, U as scrubSecrets, V as withTables } from '../index-
|
|
2
|
-
import '../endpoint-
|
|
1
|
+
export { A as App, m as AuthVerifier, B as BootRefused, n as CreateAppOptions, E as EgressPolicy, p as EngineConfig, M as ModuleClients, q as RateLimiter, r as RequestDatabase, s as RouteEntry, t as RuntimeHooks, u as ScrubResult, v as SqlDriver, w as SqlTx, x as buildRouteTable, y as createApp, z as createLazyTransaction, G as createOps, H as createRequestDatabase, I as effectiveAuth, J as hostAllowed, K as installEgressFence, O as loadConfig, P as makeMemoryCache, Q as matchRoute, T as quoteIdent, U as scrubSecrets, V as withTables } from '../index-DAwHMppB.cjs';
|
|
2
|
+
import '../endpoint-BSGw1pTu.cjs';
|
|
3
3
|
import '../stack.cjs';
|
|
4
4
|
import 'node:async_hooks';
|
|
5
|
-
import '../index-
|
|
5
|
+
import '../index-D4rts8T7.cjs';
|
|
6
6
|
import '../db/env.cjs';
|
|
7
|
-
import '../registry-
|
|
7
|
+
import '../registry-CgJvDYUW.cjs';
|
|
8
8
|
import 'zod';
|
package/dist/engine/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { A as App, m as AuthVerifier, B as BootRefused, n as CreateAppOptions, E as EgressPolicy, p as EngineConfig, M as ModuleClients, q as RateLimiter, r as RequestDatabase, s as RouteEntry, t as RuntimeHooks, u as ScrubResult, v as SqlDriver, w as SqlTx, x as buildRouteTable, y as createApp, z as createLazyTransaction, G as createOps, H as createRequestDatabase, I as effectiveAuth, J as hostAllowed, K as installEgressFence, O as loadConfig, P as makeMemoryCache, Q as matchRoute, T as quoteIdent, U as scrubSecrets, V as withTables } from '../index-
|
|
2
|
-
import '../endpoint-
|
|
1
|
+
export { A as App, m as AuthVerifier, B as BootRefused, n as CreateAppOptions, E as EgressPolicy, p as EngineConfig, M as ModuleClients, q as RateLimiter, r as RequestDatabase, s as RouteEntry, t as RuntimeHooks, u as ScrubResult, v as SqlDriver, w as SqlTx, x as buildRouteTable, y as createApp, z as createLazyTransaction, G as createOps, H as createRequestDatabase, I as effectiveAuth, J as hostAllowed, K as installEgressFence, O as loadConfig, P as makeMemoryCache, Q as matchRoute, T as quoteIdent, U as scrubSecrets, V as withTables } from '../index-C0PMn5jl.js';
|
|
2
|
+
import '../endpoint-DMwJjEHQ.js';
|
|
3
3
|
import '../stack.js';
|
|
4
4
|
import 'node:async_hooks';
|
|
5
|
-
import '../index-
|
|
5
|
+
import '../index-ByBMibIJ.js';
|
|
6
6
|
import '../db/env.js';
|
|
7
|
-
import '../registry-
|
|
7
|
+
import '../registry-B8pld3fj.js';
|
|
8
8
|
import 'zod';
|
package/dist/engine/index.js
CHANGED
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
quoteIdent,
|
|
17
17
|
scrubSecrets,
|
|
18
18
|
withTables
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-HPUSV4AZ.js";
|
|
20
20
|
import "../chunk-7Z6MGMXQ.js";
|
|
21
21
|
import "../chunk-P2Q27SGP.js";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-UWSYTUGM.js";
|
|
23
23
|
import "../chunk-7D4SUZUM.js";
|
|
24
24
|
export {
|
|
25
25
|
AuthVerifier,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tables, TableTypes } from './db/env.js';
|
|
2
|
-
import { D as DBClient, b8 as TxPlanHandle, bh as TxTable, M as Materialized } from './endpoint-
|
|
2
|
+
import { D as DBClient, b8 as TxPlanHandle, bh as TxTable, M as Materialized } from './endpoint-DMwJjEHQ.js';
|
|
3
3
|
|
|
4
4
|
/** On delete action for foreign key references. */
|
|
5
5
|
type OnDeleteAction = 'cascade' | 'set null' | 'restrict' | 'no action';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Buckets, BucketTypes } from './stack.js';
|
|
2
2
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
3
|
-
import { C as CacheClient, P as PalbaseDocsClient, a as PalbaseFlagsClient, L as Logger, b as PalbaseNotificationsClient, c as PalbaseRealtimeClient, D as DBClient, S as SecretsService, d as PalbaseStorageClient, e as PalbaseBucketClient, f as DBOps, T as TxPlanBody, g as TxPlanResponse, A as AuthSpec } from './endpoint-
|
|
4
|
-
import { E as EnvTypedDatabase } from './index-
|
|
5
|
-
import { R as RouteMeta } from './registry-
|
|
3
|
+
import { C as CacheClient, P as PalbaseDocsClient, a as PalbaseFlagsClient, L as Logger, b as PalbaseNotificationsClient, c as PalbaseRealtimeClient, D as DBClient, S as SecretsService, d as PalbaseStorageClient, e as PalbaseBucketClient, f as DBOps, T as TxPlanBody, g as TxPlanResponse, A as AuthSpec } from './endpoint-DMwJjEHQ.js';
|
|
4
|
+
import { E as EnvTypedDatabase } from './index-ByBMibIJ.js';
|
|
5
|
+
import { R as RouteMeta } from './registry-B8pld3fj.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* runtime.ts — request-scoped service singletons.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tables, TableTypes } from './db/env.cjs';
|
|
2
|
-
import { D as DBClient, b8 as TxPlanHandle, bh as TxTable, M as Materialized } from './endpoint-
|
|
2
|
+
import { D as DBClient, b8 as TxPlanHandle, bh as TxTable, M as Materialized } from './endpoint-BSGw1pTu.cjs';
|
|
3
3
|
|
|
4
4
|
/** On delete action for foreign key references. */
|
|
5
5
|
type OnDeleteAction = 'cascade' | 'set null' | 'restrict' | 'no action';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Buckets, BucketTypes } from './stack.cjs';
|
|
2
2
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
3
|
-
import { C as CacheClient, P as PalbaseDocsClient, a as PalbaseFlagsClient, L as Logger, b as PalbaseNotificationsClient, c as PalbaseRealtimeClient, D as DBClient, S as SecretsService, d as PalbaseStorageClient, e as PalbaseBucketClient, f as DBOps, T as TxPlanBody, g as TxPlanResponse, A as AuthSpec } from './endpoint-
|
|
4
|
-
import { E as EnvTypedDatabase } from './index-
|
|
5
|
-
import { R as RouteMeta } from './registry-
|
|
3
|
+
import { C as CacheClient, P as PalbaseDocsClient, a as PalbaseFlagsClient, L as Logger, b as PalbaseNotificationsClient, c as PalbaseRealtimeClient, D as DBClient, S as SecretsService, d as PalbaseStorageClient, e as PalbaseBucketClient, f as DBOps, T as TxPlanBody, g as TxPlanResponse, A as AuthSpec } from './endpoint-BSGw1pTu.cjs';
|
|
4
|
+
import { E as EnvTypedDatabase } from './index-D4rts8T7.cjs';
|
|
5
|
+
import { R as RouteMeta } from './registry-CgJvDYUW.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* runtime.ts — request-scoped service singletons.
|
package/dist/index.cjs
CHANGED
|
@@ -114,6 +114,7 @@ __export(src_exports, {
|
|
|
114
114
|
publicChannel: () => publicChannel,
|
|
115
115
|
raw: () => raw,
|
|
116
116
|
recordThrows: () => recordThrows,
|
|
117
|
+
resolveEffectiveAuth: () => resolveEffectiveAuth,
|
|
117
118
|
text: () => text,
|
|
118
119
|
timestamp: () => timestamp,
|
|
119
120
|
toSchemaJSON: () => toSchemaJSON,
|
|
@@ -2691,9 +2692,15 @@ function appAuthSlot() {
|
|
|
2691
2692
|
function defineDefaultAuth(auth) {
|
|
2692
2693
|
appAuthSlot()[APP_DEFAULT_AUTH] = auth;
|
|
2693
2694
|
}
|
|
2695
|
+
function getDefaultAuth() {
|
|
2696
|
+
return appAuthSlot()[APP_DEFAULT_AUTH];
|
|
2697
|
+
}
|
|
2694
2698
|
function __resetDefaultAuth() {
|
|
2695
2699
|
delete appAuthSlot()[APP_DEFAULT_AUTH];
|
|
2696
2700
|
}
|
|
2701
|
+
function resolveEffectiveAuth(routeAuth, controllerAuth) {
|
|
2702
|
+
return routeAuth ?? controllerAuth ?? getDefaultAuth() ?? true;
|
|
2703
|
+
}
|
|
2697
2704
|
var RESERVED_FIRST_SEGMENT = "webhooks";
|
|
2698
2705
|
function assertNotReserved(path, subject) {
|
|
2699
2706
|
const [first] = path.split("/").filter(Boolean);
|
|
@@ -3464,6 +3471,7 @@ var import_zod2 = require("zod");
|
|
|
3464
3471
|
publicChannel,
|
|
3465
3472
|
raw,
|
|
3466
3473
|
recordThrows,
|
|
3474
|
+
resolveEffectiveAuth,
|
|
3467
3475
|
text,
|
|
3468
3476
|
timestamp,
|
|
3469
3477
|
toSchemaJSON,
|