@palbase/backend 25.1.0 → 27.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 +2432 -1039
- package/dist/bin/palbase-backend.cjs.map +1 -1
- package/dist/bin/palbase-backend.js +87 -51
- package/dist/bin/palbase-backend.js.map +1 -1
- package/dist/chunk-BQN723PL.js +930 -0
- package/dist/chunk-BQN723PL.js.map +1 -0
- package/dist/chunk-CGNN2PUH.js +213 -0
- package/dist/chunk-CGNN2PUH.js.map +1 -0
- package/dist/{chunk-VDF2T4AS.js → chunk-EB3TUX5J.js} +1228 -591
- package/dist/chunk-EB3TUX5J.js.map +1 -0
- package/dist/chunk-JVZQCC77.js +728 -0
- package/dist/chunk-JVZQCC77.js.map +1 -0
- package/dist/chunk-OZKSM3JW.js +370 -0
- package/dist/chunk-OZKSM3JW.js.map +1 -0
- package/dist/{chunk-YOY5DFQS.js → chunk-TWX6JTGJ.js} +76 -34
- package/dist/{chunk-YOY5DFQS.js.map → chunk-TWX6JTGJ.js.map} +1 -1
- package/dist/{chunk-35PNTIRN.js → chunk-VVMJEVQP.js} +63 -162
- package/dist/chunk-VVMJEVQP.js.map +1 -0
- package/dist/{chunk-7D4SUZUM.js → chunk-VXPNPVAG.js} +3 -1
- package/dist/chunk-XABHGMUT.js +885 -0
- package/dist/chunk-XABHGMUT.js.map +1 -0
- package/dist/db/env.cjs.map +1 -1
- package/dist/db/env.d.cts +2 -2
- package/dist/db/env.d.ts +2 -2
- package/dist/db/index.cjs +780 -344
- 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 +7 -4
- package/dist/engine/index.cjs +2366 -1002
- package/dist/engine/index.cjs.map +1 -1
- package/dist/engine/index.d.cts +6 -6
- package/dist/engine/index.d.ts +6 -6
- package/dist/engine/index.js +7 -6
- package/dist/{index-CUomTA3e.d.ts → index-CAKOgAlP.d.ts} +171 -296
- package/dist/index-CgE4sVhg.d.cts +4864 -0
- package/dist/{index-ClpDeSos.d.cts → index-H-0qv5d4.d.cts} +171 -296
- package/dist/index-V7QRh1wg.d.ts +4864 -0
- package/dist/index.cjs +2720 -1169
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +165 -19
- package/dist/index.d.ts +165 -19
- package/dist/index.js +738 -477
- package/dist/index.js.map +1 -1
- package/dist/module-Dl1KFVtc.d.cts +54 -0
- package/dist/module-Dl1KFVtc.d.ts +54 -0
- package/dist/openapi/index.cjs +1330 -484
- package/dist/openapi/index.cjs.map +1 -1
- package/dist/openapi/index.d.cts +4 -2
- package/dist/openapi/index.d.ts +4 -2
- package/dist/openapi/index.js +1264 -474
- package/dist/openapi/index.js.map +1 -1
- package/dist/{registry-dZZ5JKYg.d.ts → registry-4EI8aaFs.d.ts} +1 -1
- package/dist/{registry-CC0WBQq6.d.cts → registry-DHsPDY0_.d.cts} +1 -1
- package/dist/stack.cjs.map +1 -1
- package/dist/test/index.cjs +732 -141
- package/dist/test/index.cjs.map +1 -1
- package/dist/test/index.d.cts +30 -4
- package/dist/test/index.d.ts +30 -4
- package/dist/test/index.js +490 -124
- package/dist/test/index.js.map +1 -1
- package/docs/README.md +33 -18
- package/docs/auth.md +1 -1
- package/docs/background.md +2 -2
- package/docs/database.md +255 -50
- package/docs/endpoints.md +3 -4
- package/docs/events.md +3 -3
- package/docs/getting-started.md +1 -1
- package/docs/llms-full.txt +435 -117
- package/docs/migrations.md +2 -2
- package/docs/schema.md +19 -10
- package/docs/services.md +116 -26
- package/package.json +8 -4
- package/stager/generics.js +205 -0
- package/stager/stage.js +39 -3
- package/template/AGENTS.md +110 -72
- package/template/db/public.ts +1 -1
- package/template/{controllers → modules/health}/health.controller.ts +1 -1
- package/template/modules/health/health.module.ts +24 -0
- package/template/modules/notes/note.service.test.ts +49 -0
- package/template/modules/notes/note.service.ts +108 -0
- package/template/{controllers → modules/notes}/notes.controller.ts +17 -11
- package/template/modules/notes/notes.module.ts +37 -0
- package/template/package.json +5 -3
- package/template/scripts/test.sh +33 -0
- package/template/tsconfig.json +29 -30
- package/dist/chunk-35PNTIRN.js.map +0 -1
- package/dist/chunk-CJSKYY76.js +0 -627
- package/dist/chunk-CJSKYY76.js.map +0 -1
- package/dist/chunk-CRQKCRGF.js +0 -276
- package/dist/chunk-CRQKCRGF.js.map +0 -1
- package/dist/chunk-G4R6BTLV.js +0 -662
- package/dist/chunk-G4R6BTLV.js.map +0 -1
- package/dist/chunk-VDF2T4AS.js.map +0 -1
- package/dist/chunk-XABBC7JP.js +0 -55
- package/dist/chunk-XABBC7JP.js.map +0 -1
- package/dist/endpoint-CTEHhb7A.d.ts +0 -2386
- package/dist/endpoint-DYHMo6cC.d.cts +0 -2386
- package/dist/index-CW21M9Z3.d.ts +0 -1222
- package/dist/index-CmBK76nx.d.cts +0 -1222
- package/template/services/note.service.test.ts +0 -45
- package/template/services/note.service.ts +0 -76
- /package/dist/{chunk-7D4SUZUM.js.map → chunk-VXPNPVAG.js.map} +0 -0
- /package/template/{models/notes → modules/notes/dto}/create.ts +0 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A class the container can resolve, named by its own constructor.
|
|
3
|
+
*
|
|
4
|
+
* There is NO separate token concept — no strings, no symbols, no `@Inject`.
|
|
5
|
+
* An abstraction is an `abstract class`, which is still a runtime value and so
|
|
6
|
+
* is still a token. `never[]` on the parameters makes a token something you can
|
|
7
|
+
* NAME but not call: `Token` is an identity, not a factory.
|
|
8
|
+
*/
|
|
9
|
+
type Token<T = unknown> = abstract new (...args: never[]) => T;
|
|
10
|
+
/**
|
|
11
|
+
* The four lists a module declares.
|
|
12
|
+
*
|
|
13
|
+
* `providers` is OWNERSHIP — a class belongs to exactly one module and this is
|
|
14
|
+
* where that is said. `exports` is VISIBILITY — what other modules may reach.
|
|
15
|
+
* `imports` is PERMISSION — whose exports this module may reach. `controllers`
|
|
16
|
+
* are the entry points the module owns.
|
|
17
|
+
*
|
|
18
|
+
* Position in a list means nothing; ownership is read from this declaration and
|
|
19
|
+
* from nowhere else — not from a directory, not from a file name, not from the
|
|
20
|
+
* class's own decorator (spec FR-009).
|
|
21
|
+
*/
|
|
22
|
+
interface ModuleDef {
|
|
23
|
+
imports?: Token[];
|
|
24
|
+
controllers?: Token[];
|
|
25
|
+
providers?: Token[];
|
|
26
|
+
exports?: Token[];
|
|
27
|
+
}
|
|
28
|
+
/** One `@Module` declaration: the class that carried it, and what it declared. */
|
|
29
|
+
interface ModuleEntry {
|
|
30
|
+
mod: Token;
|
|
31
|
+
def: ModuleDef;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Declares a module.
|
|
35
|
+
*
|
|
36
|
+
* There is no root module and nothing to mount it into: registration IS the
|
|
37
|
+
* decorator running, which happens when the file is imported. A project with no
|
|
38
|
+
* module file at all is not an error — it simply owns nothing, and every entry
|
|
39
|
+
* point it declares is refused by name (FR-035) rather than quietly served.
|
|
40
|
+
*/
|
|
41
|
+
declare function Module(def: ModuleDef): ClassDecorator;
|
|
42
|
+
/**
|
|
43
|
+
* TAKES the accumulated declarations — it does not read them.
|
|
44
|
+
*
|
|
45
|
+
* Same reason `__runStartHooks` splices (runtime.ts:297): a candidate bundle is
|
|
46
|
+
* imported into the SAME process as the live app it might replace. Reading
|
|
47
|
+
* would let the candidate build a container out of the live app's modules, and
|
|
48
|
+
* a discarded candidate would leave its own behind for the next release to
|
|
49
|
+
* adopt. Claiming makes each `createApp` see exactly the modules imported since
|
|
50
|
+
* the last one, and a rollback leave nothing behind.
|
|
51
|
+
*/
|
|
52
|
+
declare function __claimModules(): ModuleEntry[];
|
|
53
|
+
|
|
54
|
+
export { Module as M, type Token as T, __claimModules as _, type ModuleDef as a };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A class the container can resolve, named by its own constructor.
|
|
3
|
+
*
|
|
4
|
+
* There is NO separate token concept — no strings, no symbols, no `@Inject`.
|
|
5
|
+
* An abstraction is an `abstract class`, which is still a runtime value and so
|
|
6
|
+
* is still a token. `never[]` on the parameters makes a token something you can
|
|
7
|
+
* NAME but not call: `Token` is an identity, not a factory.
|
|
8
|
+
*/
|
|
9
|
+
type Token<T = unknown> = abstract new (...args: never[]) => T;
|
|
10
|
+
/**
|
|
11
|
+
* The four lists a module declares.
|
|
12
|
+
*
|
|
13
|
+
* `providers` is OWNERSHIP — a class belongs to exactly one module and this is
|
|
14
|
+
* where that is said. `exports` is VISIBILITY — what other modules may reach.
|
|
15
|
+
* `imports` is PERMISSION — whose exports this module may reach. `controllers`
|
|
16
|
+
* are the entry points the module owns.
|
|
17
|
+
*
|
|
18
|
+
* Position in a list means nothing; ownership is read from this declaration and
|
|
19
|
+
* from nowhere else — not from a directory, not from a file name, not from the
|
|
20
|
+
* class's own decorator (spec FR-009).
|
|
21
|
+
*/
|
|
22
|
+
interface ModuleDef {
|
|
23
|
+
imports?: Token[];
|
|
24
|
+
controllers?: Token[];
|
|
25
|
+
providers?: Token[];
|
|
26
|
+
exports?: Token[];
|
|
27
|
+
}
|
|
28
|
+
/** One `@Module` declaration: the class that carried it, and what it declared. */
|
|
29
|
+
interface ModuleEntry {
|
|
30
|
+
mod: Token;
|
|
31
|
+
def: ModuleDef;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Declares a module.
|
|
35
|
+
*
|
|
36
|
+
* There is no root module and nothing to mount it into: registration IS the
|
|
37
|
+
* decorator running, which happens when the file is imported. A project with no
|
|
38
|
+
* module file at all is not an error — it simply owns nothing, and every entry
|
|
39
|
+
* point it declares is refused by name (FR-035) rather than quietly served.
|
|
40
|
+
*/
|
|
41
|
+
declare function Module(def: ModuleDef): ClassDecorator;
|
|
42
|
+
/**
|
|
43
|
+
* TAKES the accumulated declarations — it does not read them.
|
|
44
|
+
*
|
|
45
|
+
* Same reason `__runStartHooks` splices (runtime.ts:297): a candidate bundle is
|
|
46
|
+
* imported into the SAME process as the live app it might replace. Reading
|
|
47
|
+
* would let the candidate build a container out of the live app's modules, and
|
|
48
|
+
* a discarded candidate would leave its own behind for the next release to
|
|
49
|
+
* adopt. Claiming makes each `createApp` see exactly the modules imported since
|
|
50
|
+
* the last one, and a rollback leave nothing behind.
|
|
51
|
+
*/
|
|
52
|
+
declare function __claimModules(): ModuleEntry[];
|
|
53
|
+
|
|
54
|
+
export { Module as M, type Token as T, __claimModules as _, type ModuleDef as a };
|