@palbase/backend 23.1.0 → 24.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 +400 -47
- package/dist/bin/palbase-backend.cjs.map +1 -1
- package/dist/bin/palbase-backend.js +4 -5
- package/dist/bin/palbase-backend.js.map +1 -1
- package/dist/{chunk-OHALWEOG.js → chunk-7Z6MGMXQ.js} +57 -2
- package/dist/chunk-7Z6MGMXQ.js.map +1 -0
- package/dist/{chunk-RCLNBJCM.js → chunk-H3JAISUY.js} +136 -1
- package/dist/chunk-H3JAISUY.js.map +1 -0
- package/dist/{chunk-PY7YJDCT.js → chunk-LCL7TUAI.js} +32 -3
- package/dist/chunk-LCL7TUAI.js.map +1 -0
- package/dist/{chunk-NS5V43YQ.js → chunk-P2Q27SGP.js} +19 -3
- package/dist/chunk-P2Q27SGP.js.map +1 -0
- package/dist/{chunk-R3KN6RHD.js → chunk-T5IOSOE5.js} +7 -2
- package/dist/chunk-T5IOSOE5.js.map +1 -0
- package/dist/{chunk-M5MCBWJI.js → chunk-YSQBC2VL.js} +275 -31
- package/dist/chunk-YSQBC2VL.js.map +1 -0
- package/dist/db/index.cjs +48 -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 +2 -2
- package/dist/{endpoint-CVWXh6oG.d.ts → endpoint-0_DGBajf.d.ts} +100 -3
- package/dist/{endpoint-c9h5jriX.d.cts → endpoint-CcQ1a36a.d.cts} +100 -3
- package/dist/engine/index.cjs +389 -34
- 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 +4 -4
- package/dist/{index-CwAJ7HEe.d.ts → index-BOS_rFBO.d.ts} +125 -21
- package/dist/{index-CxeQSfJP.d.cts → index-C84bLgeO.d.cts} +134 -9
- package/dist/{index-By8Dle5U.d.cts → index-MoQ31B6M.d.cts} +125 -21
- package/dist/{index-BZrJXnVh.d.ts → index-dJNhDZ7j.d.ts} +134 -9
- package/dist/index.cjs +166 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +54 -12
- package/dist/index.d.ts +54 -12
- package/dist/index.js +28 -11
- package/dist/index.js.map +1 -1
- package/dist/openapi/index.cjs +16 -1
- package/dist/openapi/index.cjs.map +1 -1
- package/dist/openapi/index.d.cts +6 -4
- package/dist/openapi/index.d.ts +6 -4
- package/dist/openapi/index.js +6 -7
- package/dist/openapi/index.js.map +1 -1
- package/dist/{registry-CqPK2Qby.d.cts → registry-1X-skBNu.d.cts} +1 -1
- package/dist/{registry-B3niOVYp.d.ts → registry-CEod_5sz.d.ts} +1 -1
- package/dist/test/index.cjs +27 -0
- 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 +27 -0
- package/dist/test/index.js.map +1 -1
- package/docs/README.md +4 -4
- package/docs/database.md +115 -11
- package/docs/getting-started.md +5 -4
- package/docs/llms-full.txt +385 -89
- package/docs/migrations.md +81 -59
- package/docs/schema.md +82 -2
- package/docs/services.md +98 -9
- package/package.json +2 -2
- package/template/AGENTS.md +121 -41
- package/template/controllers/notes.controller.ts +64 -0
- package/template/package.json +1 -1
- package/template/services/note.service.ts +74 -0
- package/template/tsconfig.json +11 -1
- package/dist/chunk-HQRJDARQ.js +0 -90
- package/dist/chunk-HQRJDARQ.js.map +0 -1
- package/dist/chunk-M5MCBWJI.js.map +0 -1
- package/dist/chunk-NS5V43YQ.js.map +0 -1
- package/dist/chunk-OHALWEOG.js.map +0 -1
- package/dist/chunk-PY7YJDCT.js.map +0 -1
- package/dist/chunk-R3KN6RHD.js.map +0 -1
- package/dist/chunk-RCLNBJCM.js.map +0 -1
package/dist/openapi/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OpenApiGeneratorV31 } from '@asteasolutions/zod-to-openapi';
|
|
2
2
|
import { ZodTypeAny } from 'zod';
|
|
3
|
-
import { A as AuthSpec, R as RateLimitConfig } from '../endpoint-
|
|
4
|
-
import { P as ParamMeta, T as ThrowDescriptor, U as UploadConfig, S as SseConfig } from '../registry-
|
|
3
|
+
import { A as AuthSpec, R as RateLimitConfig } from '../endpoint-CcQ1a36a.cjs';
|
|
4
|
+
import { P as ParamMeta, T as ThrowDescriptor, U as UploadConfig, S as SseConfig } from '../registry-1X-skBNu.cjs';
|
|
5
5
|
import '../stack.cjs';
|
|
6
6
|
|
|
7
7
|
/** A controller class (constructor). Kept loose — the only contract is that it
|
|
@@ -39,7 +39,8 @@ interface FlatRoute {
|
|
|
39
39
|
* (MembersController → "members"). "" when the derivation is empty — the
|
|
40
40
|
* operationId then falls back to the flat verb-prefixed form. */
|
|
41
41
|
controllerName: string;
|
|
42
|
-
/** Resolved auth: route option ?? controller default ??
|
|
42
|
+
/** Resolved auth: route option ?? controller default ?? application default
|
|
43
|
+
* ?? true (secure) — the cascade lives in `resolveEffectiveAuth`. */
|
|
43
44
|
effectiveAuth: AuthSpec;
|
|
44
45
|
/** All parameter metas for this route (ordered by index). */
|
|
45
46
|
params: ParamMeta[];
|
|
@@ -68,7 +69,8 @@ interface FlatRoute {
|
|
|
68
69
|
* `<controllerName>.<fnName>` id (PlacesController.importNearby →
|
|
69
70
|
* places.importNearby) — matching the Go runtime (extract_meta.js derives the
|
|
70
71
|
* namespace from the class name; generator.go joins). Effective auth resolves
|
|
71
|
-
* the cascade (route ?? controller default ??
|
|
72
|
+
* the cascade (route ?? controller default ?? application default ??
|
|
73
|
+
* secure-by-default) through the one resolver the route table asks too.
|
|
72
74
|
*/
|
|
73
75
|
declare function flattenController(controller: ControllerClass): FlatRoute[];
|
|
74
76
|
/** The operationId for a route — exposed so callers (convert/aggregate)
|
package/dist/openapi/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OpenApiGeneratorV31 } from '@asteasolutions/zod-to-openapi';
|
|
2
2
|
import { ZodTypeAny } from 'zod';
|
|
3
|
-
import { A as AuthSpec, R as RateLimitConfig } from '../endpoint-
|
|
4
|
-
import { P as ParamMeta, T as ThrowDescriptor, U as UploadConfig, S as SseConfig } from '../registry-
|
|
3
|
+
import { A as AuthSpec, R as RateLimitConfig } from '../endpoint-0_DGBajf.js';
|
|
4
|
+
import { P as ParamMeta, T as ThrowDescriptor, U as UploadConfig, S as SseConfig } from '../registry-CEod_5sz.js';
|
|
5
5
|
import '../stack.js';
|
|
6
6
|
|
|
7
7
|
/** A controller class (constructor). Kept loose — the only contract is that it
|
|
@@ -39,7 +39,8 @@ interface FlatRoute {
|
|
|
39
39
|
* (MembersController → "members"). "" when the derivation is empty — the
|
|
40
40
|
* operationId then falls back to the flat verb-prefixed form. */
|
|
41
41
|
controllerName: string;
|
|
42
|
-
/** Resolved auth: route option ?? controller default ??
|
|
42
|
+
/** Resolved auth: route option ?? controller default ?? application default
|
|
43
|
+
* ?? true (secure) — the cascade lives in `resolveEffectiveAuth`. */
|
|
43
44
|
effectiveAuth: AuthSpec;
|
|
44
45
|
/** All parameter metas for this route (ordered by index). */
|
|
45
46
|
params: ParamMeta[];
|
|
@@ -68,7 +69,8 @@ interface FlatRoute {
|
|
|
68
69
|
* `<controllerName>.<fnName>` id (PlacesController.importNearby →
|
|
69
70
|
* places.importNearby) — matching the Go runtime (extract_meta.js derives the
|
|
70
71
|
* namespace from the class name; generator.go joins). Effective auth resolves
|
|
71
|
-
* the cascade (route ?? controller default ??
|
|
72
|
+
* the cascade (route ?? controller default ?? application default ??
|
|
73
|
+
* secure-by-default) through the one resolver the route table asks too.
|
|
72
74
|
*/
|
|
73
75
|
declare function flattenController(controller: ControllerClass): FlatRoute[];
|
|
74
76
|
/** The operationId for a route — exposed so callers (convert/aggregate)
|
package/dist/openapi/index.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getErrorRegistry
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-T5IOSOE5.js";
|
|
4
4
|
import {
|
|
5
|
+
getRoutes,
|
|
5
6
|
isController,
|
|
6
|
-
resolveController
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
getRoutes
|
|
10
|
-
} from "../chunk-RCLNBJCM.js";
|
|
7
|
+
resolveController,
|
|
8
|
+
resolveEffectiveAuth
|
|
9
|
+
} from "../chunk-H3JAISUY.js";
|
|
11
10
|
import {
|
|
12
11
|
__commonJS,
|
|
13
12
|
__require,
|
|
@@ -5853,7 +5852,7 @@ function flattenController(controller) {
|
|
|
5853
5852
|
const out = [];
|
|
5854
5853
|
for (const route of routes) {
|
|
5855
5854
|
const fullPath = joinControllerPath(meta.basePath, route.subpath);
|
|
5856
|
-
const effectiveAuth = route.options.auth
|
|
5855
|
+
const effectiveAuth = resolveEffectiveAuth(route.options.auth, meta.defaultAuth);
|
|
5857
5856
|
const inputSchemas = {};
|
|
5858
5857
|
const pathParams = [];
|
|
5859
5858
|
for (const p of route.params) {
|