fragment-ts 1.0.21 → 1.0.23
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/cli/commands/init.command.d.ts +1 -0
- package/dist/cli/commands/init.command.d.ts.map +1 -1
- package/dist/cli/commands/init.command.js +56 -30
- package/dist/cli/commands/init.command.js.map +1 -1
- package/dist/core/decorators/application.decorator.d.ts +6 -1
- package/dist/core/decorators/application.decorator.d.ts.map +1 -1
- package/dist/core/decorators/application.decorator.js +7 -2
- package/dist/core/decorators/application.decorator.js.map +1 -1
- package/dist/core/decorators/auto-configuration.decorator.d.ts.map +1 -1
- package/dist/core/decorators/auto-configuration.decorator.js +4 -5
- package/dist/core/decorators/auto-configuration.decorator.js.map +1 -1
- package/dist/core/decorators/conditional.decorators.d.ts +4 -0
- package/dist/core/decorators/conditional.decorators.d.ts.map +1 -1
- package/dist/core/decorators/conditional.decorators.js +32 -0
- package/dist/core/decorators/conditional.decorators.js.map +1 -1
- package/dist/core/decorators/controller.decorator.d.ts.map +1 -1
- package/dist/core/decorators/controller.decorator.js +1 -2
- package/dist/core/decorators/controller.decorator.js.map +1 -1
- package/dist/core/decorators/http.decorators.d.ts +1 -0
- package/dist/core/decorators/http.decorators.d.ts.map +1 -1
- package/dist/core/decorators/http.decorators.js +10 -10
- package/dist/core/decorators/http.decorators.js.map +1 -1
- package/dist/core/decorators/injectable.decorator.d.ts +3 -0
- package/dist/core/decorators/injectable.decorator.d.ts.map +1 -1
- package/dist/core/decorators/injectable.decorator.js +12 -5
- package/dist/core/decorators/injectable.decorator.js.map +1 -1
- package/dist/core/decorators/injection.decorators.d.ts +2 -37
- package/dist/core/decorators/injection.decorators.d.ts.map +1 -1
- package/dist/core/decorators/injection.decorators.js +43 -75
- package/dist/core/decorators/injection.decorators.js.map +1 -1
- package/dist/core/decorators/repository.decorator.d.ts.map +1 -1
- package/dist/core/decorators/repository.decorator.js +4 -5
- package/dist/core/decorators/repository.decorator.js.map +1 -1
- package/dist/core/decorators/service.decorator.d.ts.map +1 -1
- package/dist/core/decorators/service.decorator.js +4 -5
- package/dist/core/decorators/service.decorator.js.map +1 -1
- package/dist/core/metadata/metadata-storage.d.ts +9 -20
- package/dist/core/metadata/metadata-storage.d.ts.map +1 -1
- package/dist/core/metadata/metadata-storage.js +58 -10
- package/dist/core/metadata/metadata-storage.js.map +1 -1
- package/dist/core/types/decoration.types.d.ts +21 -0
- package/dist/core/types/decoration.types.d.ts.map +1 -0
- package/dist/core/types/decoration.types.js +3 -0
- package/dist/core/types/decoration.types.js.map +1 -0
- package/examples/blog-api/package-lock.json +190 -6
- package/examples/blog-api/package.json +6 -3
- package/examples/blog-api/src/services/app.service.ts +2 -2
- package/examples/blog-api/src/test/app.spec.ts +23 -0
- package/package.json +1 -1
- package/src/cli/commands/init.command.ts +61 -31
- package/src/core/decorators/application.decorator.ts +13 -3
- package/src/core/decorators/auto-configuration.decorator.ts +8 -10
- package/src/core/decorators/conditional.decorators.ts +37 -1
- package/src/core/decorators/controller.decorator.ts +1 -3
- package/src/core/decorators/http.decorators.ts +11 -32
- package/src/core/decorators/injectable.decorator.ts +15 -8
- package/src/core/decorators/injection.decorators.ts +50 -103
- package/src/core/decorators/repository.decorator.ts +8 -10
- package/src/core/decorators/service.decorator.ts +8 -10
- package/src/core/metadata/metadata-storage.ts +75 -43
- package/src/core/types/decoration.types.ts +38 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface ClassMetadata {
|
|
2
|
+
target: Function;
|
|
3
|
+
type:
|
|
4
|
+
| "injectable"
|
|
5
|
+
| "service"
|
|
6
|
+
| "controller"
|
|
7
|
+
| "repository"
|
|
8
|
+
| "auto-configuration";
|
|
9
|
+
scope?: "singleton" | "request" | "transient";
|
|
10
|
+
path?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface MethodMetadata {
|
|
14
|
+
target: any;
|
|
15
|
+
propertyKey: string;
|
|
16
|
+
method: string;
|
|
17
|
+
path: string;
|
|
18
|
+
paramMetadata: ParamMetadata[];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ParamMetadata {
|
|
22
|
+
target: any;
|
|
23
|
+
propertyKey: string;
|
|
24
|
+
index: number;
|
|
25
|
+
type:
|
|
26
|
+
| "body"
|
|
27
|
+
| "param"
|
|
28
|
+
| "query"
|
|
29
|
+
| "header"
|
|
30
|
+
| "req"
|
|
31
|
+
| "res"
|
|
32
|
+
| "autowired"
|
|
33
|
+
| "inject"
|
|
34
|
+
| "inject-repo"
|
|
35
|
+
| "value"
|
|
36
|
+
| "qualifier";
|
|
37
|
+
paramName?: string;
|
|
38
|
+
}
|