@nestbridge/core 1.1.0 → 1.1.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/build/nestbridge.core.d.ts +132 -118
- package/build/nestbridge.core.js +914 -989
- package/build/nestbridge.core.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,118 +1,132 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export declare
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
1
|
+
//#region src/diagnostics/nestbridge-diagnostic.d.ts
|
|
2
|
+
type NestBridgeDiagnosticCode = "unsupported-route" | "unsupported-parameter" | "unsupported-argument" | "unsupported-return-type" | "circular-type";
|
|
3
|
+
interface NestBridgeDiagnostic {
|
|
4
|
+
code: NestBridgeDiagnosticCode;
|
|
5
|
+
title: string;
|
|
6
|
+
controllerName: string;
|
|
7
|
+
memberName: string;
|
|
8
|
+
detail: string;
|
|
9
|
+
found?: string;
|
|
10
|
+
expected?: string;
|
|
11
|
+
filePath: string;
|
|
12
|
+
line: number;
|
|
13
|
+
column: number;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/diagnostics/format-diagnostic.d.ts
|
|
17
|
+
export declare const formatDiagnostic: (diagnostic: NestBridgeDiagnostic) => string;
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/diagnostics/nestbridge-diagnostic-error.d.ts
|
|
20
|
+
export declare class NestBridgeDiagnosticError extends Error {
|
|
21
|
+
readonly diagnostic: NestBridgeDiagnostic;
|
|
22
|
+
constructor(diagnostic: NestBridgeDiagnostic);
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/models/controller-parameter-definition.d.ts
|
|
26
|
+
type ParameterSourceKind = "param" | "query" | "body" | "header";
|
|
27
|
+
interface ControllerParameterBase {
|
|
28
|
+
index: number;
|
|
29
|
+
parameterName: string;
|
|
30
|
+
}
|
|
31
|
+
type ControllerParameterDefinition = (ControllerParameterBase & {
|
|
32
|
+
kind: "param";
|
|
33
|
+
name: string;
|
|
34
|
+
}) | (ControllerParameterBase & {
|
|
35
|
+
kind: "query";
|
|
36
|
+
name?: string;
|
|
37
|
+
}) | (ControllerParameterBase & {
|
|
38
|
+
kind: "body";
|
|
39
|
+
name?: string;
|
|
40
|
+
}) | (ControllerParameterBase & {
|
|
41
|
+
kind: "header";
|
|
42
|
+
name: string;
|
|
43
|
+
});
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/models/http-method.d.ts
|
|
46
|
+
type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region src/models/response-kind.d.ts
|
|
49
|
+
type ResponseKind = "json" | "observable" | "stream";
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/models/controller-method-definition.d.ts
|
|
52
|
+
interface ControllerMethodDefinition {
|
|
53
|
+
name: string;
|
|
54
|
+
httpMethod: HttpMethod;
|
|
55
|
+
path: string;
|
|
56
|
+
parameters: ControllerParameterDefinition[];
|
|
57
|
+
responseKind: ResponseKind;
|
|
58
|
+
line: number;
|
|
59
|
+
column: number;
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/models/controller-definition.d.ts
|
|
63
|
+
interface ControllerDefinition {
|
|
64
|
+
name: string;
|
|
65
|
+
path: string;
|
|
66
|
+
sourceFile: string;
|
|
67
|
+
methods: ControllerMethodDefinition[];
|
|
68
|
+
}
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region src/models/graphql-operation-kind.d.ts
|
|
71
|
+
type GraphqlOperationKind = "query" | "mutation";
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/models/resolver-argument-definition.d.ts
|
|
74
|
+
interface ResolverArgumentDefinition {
|
|
75
|
+
index: number;
|
|
76
|
+
parameterName: string;
|
|
77
|
+
name: string;
|
|
78
|
+
graphqlType: string;
|
|
79
|
+
}
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region src/models/selection-field.d.ts
|
|
82
|
+
interface SelectionField {
|
|
83
|
+
name: string;
|
|
84
|
+
children?: SelectionField[];
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/models/resolver-method-definition.d.ts
|
|
88
|
+
interface ResolverMethodDefinition {
|
|
89
|
+
name: string;
|
|
90
|
+
operationKind: GraphqlOperationKind;
|
|
91
|
+
operationName: string;
|
|
92
|
+
arguments: ResolverArgumentDefinition[];
|
|
93
|
+
selection: SelectionField[];
|
|
94
|
+
line: number;
|
|
95
|
+
column: number;
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/models/resolver-definition.d.ts
|
|
99
|
+
interface ResolverDefinition {
|
|
100
|
+
name: string;
|
|
101
|
+
sourceFile: string;
|
|
102
|
+
methods: ResolverMethodDefinition[];
|
|
103
|
+
}
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region src/analysis/analyze-controllers.d.ts
|
|
106
|
+
export declare const analyzeControllers: (filePaths: readonly string[]) => {
|
|
107
|
+
controllers: ControllerDefinition[];
|
|
108
|
+
diagnostics: NestBridgeDiagnostic[];
|
|
109
|
+
};
|
|
110
|
+
//#endregion
|
|
111
|
+
//#region src/analysis/analyze-resolvers.d.ts
|
|
112
|
+
export declare const analyzeResolvers: (filePaths: readonly string[]) => {
|
|
113
|
+
resolvers: ResolverDefinition[];
|
|
114
|
+
diagnostics: NestBridgeDiagnostic[];
|
|
115
|
+
};
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region src/declarations/generate-controller-declaration.d.ts
|
|
118
|
+
interface ClientDeclarationSource {
|
|
119
|
+
name: string;
|
|
120
|
+
sourceFile: string;
|
|
121
|
+
methods: readonly {
|
|
122
|
+
name: string;
|
|
123
|
+
responseKind?: ResponseKind;
|
|
124
|
+
}[];
|
|
125
|
+
}
|
|
126
|
+
export declare const generateControllerDeclaration: (controller: ClientDeclarationSource, outputFilePath: string) => string;
|
|
127
|
+
//#endregion
|
|
128
|
+
//#region src/version.d.ts
|
|
129
|
+
export declare const VERSION: string;
|
|
130
|
+
//#endregion
|
|
131
|
+
export type { ControllerDefinition, ControllerMethodDefinition, ControllerParameterDefinition, GraphqlOperationKind, HttpMethod, NestBridgeDiagnostic, NestBridgeDiagnosticCode, ParameterSourceKind, ResolverArgumentDefinition, ResolverDefinition, ResolverMethodDefinition, ResponseKind, SelectionField };
|
|
132
|
+
//# sourceMappingURL=nestbridge.core.d.ts.map
|