@palbase/backend 25.0.1 → 25.0.3

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 (44) hide show
  1. package/dist/bin/palbase-backend.cjs +7 -7
  2. package/dist/bin/palbase-backend.cjs.map +1 -1
  3. package/dist/bin/palbase-backend.js +1 -1
  4. package/dist/{chunk-HBOJLP2Z.js → chunk-7JSEN7UR.js} +2 -1
  5. package/dist/chunk-7JSEN7UR.js.map +1 -0
  6. package/dist/{chunk-34I4GB7D.js → chunk-WH2EV2LT.js} +8 -8
  7. package/dist/{chunk-34I4GB7D.js.map → chunk-WH2EV2LT.js.map} +1 -1
  8. package/dist/db/index.cjs.map +1 -1
  9. package/dist/db/index.d.cts +2 -2
  10. package/dist/db/index.d.ts +2 -2
  11. package/dist/db/index.js +1 -1
  12. package/dist/{endpoint-DMwJjEHQ.d.ts → endpoint-CTEHhb7A.d.ts} +19 -8
  13. package/dist/{endpoint-BSGw1pTu.d.cts → endpoint-DYHMo6cC.d.cts} +19 -8
  14. package/dist/engine/index.cjs +7 -7
  15. package/dist/engine/index.cjs.map +1 -1
  16. package/dist/engine/index.d.cts +4 -4
  17. package/dist/engine/index.d.ts +4 -4
  18. package/dist/engine/index.js +1 -1
  19. package/dist/{index-B8v6hVyU.d.ts → index-CUomTA3e.d.ts} +3 -3
  20. package/dist/{index-B4CcpqLb.d.ts → index-CW21M9Z3.d.ts} +1 -1
  21. package/dist/{index-VsjBQ4Kw.d.cts → index-ClpDeSos.d.cts} +3 -3
  22. package/dist/{index-DmVyY6N7.d.cts → index-CmBK76nx.d.cts} +1 -1
  23. package/dist/index.cjs +5 -2
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.cts +9 -8
  26. package/dist/index.d.ts +9 -8
  27. package/dist/index.js +5 -3
  28. package/dist/index.js.map +1 -1
  29. package/dist/openapi/index.d.cts +2 -2
  30. package/dist/openapi/index.d.ts +2 -2
  31. package/dist/{registry-CgJvDYUW.d.cts → registry-CC0WBQq6.d.cts} +1 -1
  32. package/dist/{registry-B8pld3fj.d.ts → registry-dZZ5JKYg.d.ts} +1 -1
  33. package/dist/test/index.d.cts +1 -1
  34. package/dist/test/index.d.ts +1 -1
  35. package/docs/README.md +29 -28
  36. package/docs/database.md +2 -2
  37. package/docs/endpoints.md +6 -5
  38. package/docs/getting-started.md +1 -1
  39. package/docs/llms-full.txt +58 -53
  40. package/docs/migrations.md +16 -14
  41. package/docs/schema.md +2 -2
  42. package/docs/services.md +2 -1
  43. package/package.json +1 -1
  44. package/dist/chunk-HBOJLP2Z.js.map +0 -1
@@ -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-VsjBQ4Kw.cjs';
2
- import '../endpoint-BSGw1pTu.cjs';
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-ClpDeSos.cjs';
2
+ import '../endpoint-DYHMo6cC.cjs';
3
3
  import '../stack.cjs';
4
4
  import 'node:async_hooks';
5
- import '../index-DmVyY6N7.cjs';
5
+ import '../index-CmBK76nx.cjs';
6
6
  import '../db/env.cjs';
7
- import '../registry-CgJvDYUW.cjs';
7
+ import '../registry-CC0WBQq6.cjs';
8
8
  import 'zod';
@@ -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-B8v6hVyU.js';
2
- import '../endpoint-DMwJjEHQ.js';
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-CUomTA3e.js';
2
+ import '../endpoint-CTEHhb7A.js';
3
3
  import '../stack.js';
4
4
  import 'node:async_hooks';
5
- import '../index-B4CcpqLb.js';
5
+ import '../index-CW21M9Z3.js';
6
6
  import '../db/env.js';
7
- import '../registry-B8pld3fj.js';
7
+ import '../registry-dZZ5JKYg.js';
8
8
  import 'zod';
@@ -16,7 +16,7 @@ import {
16
16
  quoteIdent,
17
17
  scrubSecrets,
18
18
  withTables
19
- } from "../chunk-34I4GB7D.js";
19
+ } from "../chunk-WH2EV2LT.js";
20
20
  import "../chunk-XJ2RSHEU.js";
21
21
  import "../chunk-XABBC7JP.js";
22
22
  import "../chunk-P2Q27SGP.js";
@@ -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-DMwJjEHQ.js';
4
- import { E as EnvTypedDatabase } from './index-B4CcpqLb.js';
5
- import { R as RouteMeta } from './registry-B8pld3fj.js';
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-CTEHhb7A.js';
4
+ import { E as EnvTypedDatabase } from './index-CW21M9Z3.js';
5
+ import { R as RouteMeta } from './registry-dZZ5JKYg.js';
6
6
 
7
7
  /**
8
8
  * runtime.ts — request-scoped service singletons.
@@ -1,5 +1,5 @@
1
1
  import { Tables, TableTypes, Schemas } from './db/env.js';
2
- import { D as DBClient, b8 as TxPlanHandle, bh as TxTable, M as Materialized } from './endpoint-DMwJjEHQ.js';
2
+ import { D as DBClient, b8 as TxPlanHandle, bh as TxTable, M as Materialized } from './endpoint-CTEHhb7A.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.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-BSGw1pTu.cjs';
4
- import { E as EnvTypedDatabase } from './index-DmVyY6N7.cjs';
5
- import { R as RouteMeta } from './registry-CgJvDYUW.cjs';
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-DYHMo6cC.cjs';
4
+ import { E as EnvTypedDatabase } from './index-CmBK76nx.cjs';
5
+ import { R as RouteMeta } from './registry-CC0WBQq6.cjs';
6
6
 
7
7
  /**
8
8
  * runtime.ts — request-scoped service singletons.
@@ -1,5 +1,5 @@
1
1
  import { Tables, TableTypes, Schemas } from './db/env.cjs';
2
- import { D as DBClient, b8 as TxPlanHandle, bh as TxTable, M as Materialized } from './endpoint-BSGw1pTu.cjs';
2
+ import { D as DBClient, b8 as TxPlanHandle, bh as TxTable, M as Materialized } from './endpoint-DYHMo6cC.cjs';
3
3
 
4
4
  /** On delete action for foreign key references. */
5
5
  type OnDeleteAction = 'cascade' | 'set null' | 'restrict' | 'no action';
package/dist/index.cjs CHANGED
@@ -1703,6 +1703,7 @@ function columnToJSON(column) {
1703
1703
  if (def.defaultNow === true) out.defaultNow = true;
1704
1704
  if (def.renamedFrom !== void 0) out.renamedFrom = def.renamedFrom;
1705
1705
  if (def.ignored === true) out.ignored = true;
1706
+ if (def.owns === true) out.owns = true;
1706
1707
  if (def.references !== void 0) {
1707
1708
  out.references = { table: def.references.table, column: def.references.column };
1708
1709
  }
@@ -3312,8 +3313,10 @@ function Req() {
3312
3313
  }
3313
3314
 
3314
3315
  // src/middleware.ts
3315
- function defineMiddleware(fn) {
3316
- return fn;
3316
+ function defineMiddleware(_fn) {
3317
+ throw new Error(
3318
+ "defineMiddleware() is not wired to anything: no bundler reads a `middleware/` directory and the engine has no middleware pipeline, so a handler defined here deploys and never runs. Put cross-cutting work in a service the controllers call, and use route options for auth (`@Controller(path, { auth })`) and rate limits (`@Get(path, { rateLimit })`)."
3319
+ );
3317
3320
  }
3318
3321
 
3319
3322
  // src/errors.ts