@nestia/sdk 3.10.0 → 3.11.0-dev.20240812
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/lib/NestiaSdkApplication.d.ts +1 -3
- package/lib/NestiaSdkApplication.js +138 -136
- package/lib/NestiaSdkApplication.js.map +1 -1
- package/lib/analyses/ConfigAnalyzer.d.ts +2 -2
- package/lib/analyses/ConfigAnalyzer.js +39 -80
- package/lib/analyses/ConfigAnalyzer.js.map +1 -1
- package/lib/analyses/ExceptionAnalyzer.d.ts +0 -16
- package/lib/analyses/ExceptionAnalyzer.js +142 -105
- package/lib/analyses/ExceptionAnalyzer.js.map +1 -1
- package/lib/analyses/GenericAnalyzer.d.ts +1 -2
- package/lib/analyses/GenericAnalyzer.js.map +1 -1
- package/lib/analyses/ImportAnalyzer.d.ts +6 -11
- package/lib/analyses/ImportAnalyzer.js +70 -42
- package/lib/analyses/ImportAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectControllerAnalyzer.d.ts +7 -1
- package/lib/analyses/ReflectControllerAnalyzer.js +28 -99
- package/lib/analyses/ReflectControllerAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectHttpOperationAnalyzer.d.ts +6 -2
- package/lib/analyses/ReflectHttpOperationAnalyzer.js +72 -152
- package/lib/analyses/ReflectHttpOperationAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectHttpOperationParameterAnalyzer.d.ts +15 -0
- package/lib/analyses/ReflectHttpOperationParameterAnalyzer.js +215 -0
- package/lib/analyses/ReflectHttpOperationParameterAnalyzer.js.map +1 -0
- package/lib/analyses/ReflectHttpOperationResponseAnalyzer.d.ts +15 -0
- package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js +81 -0
- package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js.map +1 -0
- package/lib/analyses/ReflectMetadataAnalyzer.d.ts +1 -3
- package/lib/analyses/ReflectMetadataAnalyzer.js +0 -4
- package/lib/analyses/ReflectMetadataAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectWebSocketOperationAnalyzer.d.ts +6 -2
- package/lib/analyses/ReflectWebSocketOperationAnalyzer.js +72 -48
- package/lib/analyses/ReflectWebSocketOperationAnalyzer.js.map +1 -1
- package/lib/analyses/TypedHttpRouteAnalyzer.d.ts +15 -0
- package/lib/analyses/TypedHttpRouteAnalyzer.js +111 -0
- package/lib/analyses/TypedHttpRouteAnalyzer.js.map +1 -0
- package/lib/analyses/TypedWebSocketRouteAnalyzer.d.ts +10 -0
- package/lib/analyses/TypedWebSocketRouteAnalyzer.js +9 -0
- package/lib/analyses/TypedWebSocketRouteAnalyzer.js.map +1 -0
- package/lib/decorators/OperationMetadata.d.ts +2 -0
- package/lib/decorators/OperationMetadata.js +10 -0
- package/lib/decorators/OperationMetadata.js.map +1 -0
- package/lib/executable/internal/NestiaConfigLoader.d.ts +1 -1
- package/lib/executable/internal/NestiaConfigLoader.js +33 -3
- package/lib/executable/internal/NestiaConfigLoader.js.map +1 -1
- package/lib/executable/internal/NestiaSdkCommand.js +1 -1
- package/lib/executable/internal/NestiaSdkCommand.js.map +1 -1
- package/lib/generates/CloneGenerator.d.ts +0 -5
- package/lib/generates/CloneGenerator.js +60 -60
- package/lib/generates/CloneGenerator.js.map +1 -1
- package/lib/generates/E2eGenerator.d.ts +2 -3
- package/lib/generates/E2eGenerator.js +9 -8
- package/lib/generates/E2eGenerator.js.map +1 -1
- package/lib/generates/OpenAiGenerator.d.ts +2 -4
- package/lib/generates/OpenAiGenerator.js +13 -3
- package/lib/generates/OpenAiGenerator.js.map +1 -1
- package/lib/generates/SdkGenerator.d.ts +4 -4
- package/lib/generates/SdkGenerator.js +63 -73
- package/lib/generates/SdkGenerator.js.map +1 -1
- package/lib/generates/SwaggerGenerator.d.ts +6 -18
- package/lib/generates/SwaggerGenerator.js +60 -235
- package/lib/generates/SwaggerGenerator.js.map +1 -1
- package/lib/generates/internal/E2eFileProgrammer.js +5 -9
- package/lib/generates/internal/E2eFileProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkAliasCollection.d.ts +6 -4
- package/lib/generates/internal/SdkAliasCollection.js +33 -31
- package/lib/generates/internal/SdkAliasCollection.js.map +1 -1
- package/lib/generates/internal/SdkDistributionComposer.d.ts +4 -1
- package/lib/generates/internal/SdkDistributionComposer.js +6 -6
- package/lib/generates/internal/SdkDistributionComposer.js.map +1 -1
- package/lib/generates/internal/SdkFileProgrammer.d.ts +2 -4
- package/lib/generates/internal/SdkFileProgrammer.js +6 -6
- package/lib/generates/internal/SdkFileProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpCloneProgrammer.d.ts +0 -12
- package/lib/generates/internal/SdkHttpCloneProgrammer.js +142 -97
- package/lib/generates/internal/SdkHttpCloneProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpFunctionProgrammer.d.ts +4 -3
- package/lib/generates/internal/SdkHttpFunctionProgrammer.js +37 -59
- package/lib/generates/internal/SdkHttpFunctionProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.d.ts +4 -3
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.js +31 -48
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpRouteProgrammer.js +7 -3
- package/lib/generates/internal/SdkHttpRouteProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpSimulationProgrammer.d.ts +4 -3
- package/lib/generates/internal/SdkHttpSimulationProgrammer.js +7 -13
- package/lib/generates/internal/SdkHttpSimulationProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.d.ts +1 -2
- package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js +11 -16
- package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkWebSocketRouteProgrammer.d.ts +1 -2
- package/lib/generates/internal/SdkWebSocketRouteProgrammer.js +7 -10
- package/lib/generates/internal/SdkWebSocketRouteProgrammer.js.map +1 -1
- package/lib/generates/internal/SwaggerDescriptionComposer.d.ts +23 -0
- package/lib/generates/internal/SwaggerDescriptionComposer.js +44 -0
- package/lib/generates/internal/SwaggerDescriptionComposer.js.map +1 -0
- package/lib/generates/internal/SwaggerOperationComposer.d.ts +12 -0
- package/lib/generates/internal/SwaggerOperationComposer.js +68 -0
- package/lib/generates/internal/SwaggerOperationComposer.js.map +1 -0
- package/lib/generates/internal/SwaggerOperationParameterComposer.d.ts +18 -0
- package/lib/generates/internal/SwaggerOperationParameterComposer.js +99 -0
- package/lib/generates/internal/SwaggerOperationParameterComposer.js.map +1 -0
- package/lib/generates/internal/SwaggerOperationResponseComposer.d.ts +9 -0
- package/lib/generates/internal/SwaggerOperationResponseComposer.js +91 -0
- package/lib/generates/internal/SwaggerOperationResponseComposer.js.map +1 -0
- package/lib/structures/INestiaProject.d.ts +5 -5
- package/lib/structures/INestiaSdkInput.d.ts +20 -0
- package/lib/structures/{ISwaggerError.js → INestiaSdkInput.js} +1 -1
- package/lib/structures/INestiaSdkInput.js.map +1 -0
- package/lib/structures/IReflectApplication.d.ts +6 -0
- package/lib/structures/IReflectApplication.js +3 -0
- package/lib/structures/IReflectApplication.js.map +1 -0
- package/lib/structures/IReflectController.d.ts +3 -5
- package/lib/structures/IReflectHttpOperation.d.ts +13 -65
- package/lib/structures/IReflectHttpOperationException.d.ts +14 -0
- package/lib/structures/IReflectHttpOperationException.js +3 -0
- package/lib/structures/IReflectHttpOperationException.js.map +1 -0
- package/lib/structures/IReflectHttpOperationParameter.d.ts +35 -0
- package/lib/structures/IReflectHttpOperationParameter.js +3 -0
- package/lib/structures/IReflectHttpOperationParameter.js.map +1 -0
- package/lib/structures/IReflectHttpOperationSuccess.d.ts +15 -0
- package/lib/structures/IReflectHttpOperationSuccess.js +3 -0
- package/lib/structures/IReflectHttpOperationSuccess.js.map +1 -0
- package/lib/structures/IReflectOperationError.d.ts +16 -0
- package/lib/structures/IReflectOperationError.js +23 -0
- package/lib/structures/IReflectOperationError.js.map +1 -0
- package/lib/structures/IReflectType.d.ts +4 -0
- package/lib/structures/{IErrorReport.js → IReflectType.js} +1 -1
- package/lib/structures/IReflectType.js.map +1 -0
- package/lib/structures/IReflectTypeImport.d.ts +4 -0
- package/lib/structures/{ISwaggerLazySchema.js → IReflectTypeImport.js} +1 -1
- package/lib/structures/IReflectTypeImport.js.map +1 -0
- package/lib/structures/IReflectWebSocketOperation.d.ts +8 -9
- package/lib/structures/IReflectWebSocketOperationParameter.d.ts +23 -0
- package/lib/structures/IReflectWebSocketOperationParameter.js +3 -0
- package/lib/structures/IReflectWebSocketOperationParameter.js.map +1 -0
- package/lib/structures/ITypedApplication.d.ts +7 -0
- package/lib/structures/{INormalizedInput.js → ITypedApplication.js} +1 -1
- package/lib/structures/ITypedApplication.js.map +1 -0
- package/lib/structures/ITypedHttpRoute.d.ts +14 -42
- package/lib/structures/ITypedHttpRouteException.d.ts +10 -0
- package/lib/structures/ITypedHttpRouteException.js +3 -0
- package/lib/structures/ITypedHttpRouteException.js.map +1 -0
- package/lib/structures/ITypedHttpRouteParameter.d.ts +31 -0
- package/lib/structures/ITypedHttpRouteParameter.js +3 -0
- package/lib/structures/ITypedHttpRouteParameter.js.map +1 -0
- package/lib/structures/ITypedHttpRouteSuccess.d.ts +19 -0
- package/lib/structures/{ISwaggerLazyProperty.js → ITypedHttpRouteSuccess.js} +1 -1
- package/lib/structures/ITypedHttpRouteSuccess.js.map +1 -0
- package/lib/structures/ITypedWebSocketRoute.d.ts +8 -44
- package/lib/structures/ITypedWebSocketRouteParameter.d.ts +2 -0
- package/lib/structures/ITypedWebSocketRouteParameter.js +3 -0
- package/lib/structures/ITypedWebSocketRouteParameter.js.map +1 -0
- package/lib/transform.d.ts +3 -0
- package/lib/transform.js +8 -0
- package/lib/transform.js.map +1 -0
- package/lib/transformers/IOperationMetadata.d.ts +36 -0
- package/lib/transformers/IOperationMetadata.js +3 -0
- package/lib/transformers/IOperationMetadata.js.map +1 -0
- package/lib/transformers/ISdkTransformerContext.d.ts +7 -0
- package/lib/transformers/ISdkTransformerContext.js +3 -0
- package/lib/transformers/ISdkTransformerContext.js.map +1 -0
- package/lib/transformers/SdkMetadataProgrammer.d.ts +11 -0
- package/lib/transformers/SdkMetadataProgrammer.js +159 -0
- package/lib/transformers/SdkMetadataProgrammer.js.map +1 -0
- package/lib/transformers/SdkTransformer.d.ts +4 -0
- package/lib/transformers/SdkTransformer.js +88 -0
- package/lib/transformers/SdkTransformer.js.map +1 -0
- package/lib/transformers/TextPlainValidator.d.ts +4 -0
- package/lib/transformers/TextPlainValidator.js +19 -0
- package/lib/transformers/TextPlainValidator.js.map +1 -0
- package/lib/utils/StringUtil.d.ts +1 -0
- package/lib/utils/StringUtil.js +1 -0
- package/lib/utils/StringUtil.js.map +1 -1
- package/package.json +8 -8
- package/src/NestiaSdkApplication.ts +173 -160
- package/src/analyses/ConfigAnalyzer.ts +50 -98
- package/src/analyses/ExceptionAnalyzer.ts +142 -142
- package/src/analyses/GenericAnalyzer.ts +3 -5
- package/src/analyses/ImportAnalyzer.ts +130 -115
- package/src/analyses/ReflectControllerAnalyzer.ts +63 -115
- package/src/analyses/ReflectHttpOperationAnalyzer.ts +142 -278
- package/src/analyses/ReflectHttpOperationParameterAnalyzer.ts +319 -0
- package/src/analyses/ReflectHttpOperationResponseAnalyzer.ts +117 -0
- package/src/analyses/ReflectMetadataAnalyzer.ts +1 -18
- package/src/analyses/ReflectWebSocketOperationAnalyzer.ts +143 -78
- package/src/analyses/TypedHttpRouteAnalyzer.ts +178 -0
- package/src/analyses/TypedWebSocketRouteAnalyzer.ts +18 -0
- package/src/decorators/OperationMetadata.ts +15 -0
- package/src/executable/internal/NestiaConfigLoader.ts +17 -3
- package/src/executable/internal/NestiaSdkCommand.ts +1 -4
- package/src/generates/CloneGenerator.ts +60 -59
- package/src/generates/E2eGenerator.ts +20 -21
- package/src/generates/OpenAiGenerator.ts +44 -45
- package/src/generates/SdkGenerator.ts +97 -125
- package/src/generates/SwaggerGenerator.ts +114 -416
- package/src/generates/internal/E2eFileProgrammer.ts +5 -14
- package/src/generates/internal/SdkAliasCollection.ts +33 -41
- package/src/generates/internal/SdkDistributionComposer.ts +9 -6
- package/src/generates/internal/SdkFileProgrammer.ts +11 -14
- package/src/generates/internal/SdkHttpCloneProgrammer.ts +142 -142
- package/src/generates/internal/SdkHttpFunctionProgrammer.ts +20 -47
- package/src/generates/internal/SdkHttpNamespaceProgrammer.ts +245 -275
- package/src/generates/internal/SdkHttpRouteProgrammer.ts +7 -7
- package/src/generates/internal/SdkHttpSimulationProgrammer.ts +11 -23
- package/src/generates/internal/SdkWebSocketNamespaceProgrammer.ts +197 -233
- package/src/generates/internal/SdkWebSocketRouteProgrammer.ts +5 -15
- package/src/generates/internal/{SwaggerDescriptionGenerator.ts → SwaggerDescriptionComposer.ts} +25 -5
- package/src/generates/internal/SwaggerOperationComposer.ts +90 -0
- package/src/generates/internal/SwaggerOperationParameterComposer.ts +173 -0
- package/src/generates/internal/SwaggerOperationResponseComposer.ts +110 -0
- package/src/structures/INestiaProject.ts +5 -5
- package/src/structures/INestiaSdkInput.ts +25 -0
- package/src/structures/IReflectApplication.ts +8 -0
- package/src/structures/IReflectController.ts +3 -5
- package/src/structures/IReflectHttpOperation.ts +14 -76
- package/src/structures/IReflectHttpOperationException.ts +19 -0
- package/src/structures/IReflectHttpOperationParameter.ts +81 -0
- package/src/structures/IReflectHttpOperationSuccess.ts +22 -0
- package/src/structures/IReflectOperationError.ts +26 -0
- package/src/structures/IReflectType.ts +4 -0
- package/src/structures/IReflectTypeImport.ts +4 -0
- package/src/structures/IReflectWebSocketOperation.ts +9 -9
- package/src/structures/IReflectWebSocketOperationParameter.ts +38 -0
- package/src/structures/ITypedApplication.ts +8 -0
- package/src/structures/ITypedHttpRoute.ts +15 -45
- package/src/structures/ITypedHttpRouteException.ts +15 -0
- package/src/structures/ITypedHttpRouteParameter.ts +41 -0
- package/src/structures/ITypedHttpRouteSuccess.ts +22 -0
- package/src/structures/ITypedWebSocketRoute.ts +8 -56
- package/src/structures/ITypedWebSocketRouteParameter.ts +3 -0
- package/src/transform.ts +9 -0
- package/src/transformers/IOperationMetadata.ts +38 -0
- package/src/transformers/ISdkTransformerContext.ts +8 -0
- package/src/transformers/SdkMetadataProgrammer.ts +227 -0
- package/src/transformers/SdkTransformer.ts +168 -0
- package/src/transformers/TextPlainValidator.ts +17 -0
- package/src/utils/StringUtil.ts +3 -0
- package/lib/analyses/TypedControllerAnalyzer.d.ts +0 -8
- package/lib/analyses/TypedControllerAnalyzer.js +0 -77
- package/lib/analyses/TypedControllerAnalyzer.js.map +0 -1
- package/lib/analyses/TypedHttpOperationAnalyzer.d.ts +0 -15
- package/lib/analyses/TypedHttpOperationAnalyzer.js +0 -263
- package/lib/analyses/TypedHttpOperationAnalyzer.js.map +0 -1
- package/lib/analyses/TypedWebSocketOperationAnalyzer.d.ts +0 -15
- package/lib/analyses/TypedWebSocketOperationAnalyzer.js +0 -226
- package/lib/analyses/TypedWebSocketOperationAnalyzer.js.map +0 -1
- package/lib/generates/internal/SwaggerDescriptionGenerator.d.ts +0 -14
- package/lib/generates/internal/SwaggerDescriptionGenerator.js +0 -33
- package/lib/generates/internal/SwaggerDescriptionGenerator.js.map +0 -1
- package/lib/generates/internal/SwaggerSchemaGenerator.d.ts +0 -21
- package/lib/generates/internal/SwaggerSchemaGenerator.js +0 -289
- package/lib/generates/internal/SwaggerSchemaGenerator.js.map +0 -1
- package/lib/generates/internal/SwaggerSchemaValidator.d.ts +0 -7
- package/lib/generates/internal/SwaggerSchemaValidator.js +0 -191
- package/lib/generates/internal/SwaggerSchemaValidator.js.map +0 -1
- package/lib/structures/IErrorReport.d.ts +0 -6
- package/lib/structures/IErrorReport.js.map +0 -1
- package/lib/structures/INormalizedInput.d.ts +0 -19
- package/lib/structures/INormalizedInput.js.map +0 -1
- package/lib/structures/ISwaggerError.d.ts +0 -6
- package/lib/structures/ISwaggerError.js.map +0 -1
- package/lib/structures/ISwaggerLazyProperty.d.ts +0 -6
- package/lib/structures/ISwaggerLazyProperty.js.map +0 -1
- package/lib/structures/ISwaggerLazySchema.d.ts +0 -6
- package/lib/structures/ISwaggerLazySchema.js.map +0 -1
- package/lib/structures/ITypeTuple.d.ts +0 -5
- package/lib/structures/ITypeTuple.js +0 -3
- package/lib/structures/ITypeTuple.js.map +0 -1
- package/src/analyses/TypedControllerAnalyzer.ts +0 -92
- package/src/analyses/TypedHttpOperationAnalyzer.ts +0 -365
- package/src/analyses/TypedWebSocketOperationAnalyzer.ts +0 -375
- package/src/generates/internal/SwaggerSchemaGenerator.ts +0 -473
- package/src/generates/internal/SwaggerSchemaValidator.ts +0 -206
- package/src/structures/IErrorReport.ts +0 -6
- package/src/structures/INormalizedInput.ts +0 -20
- package/src/structures/ISwaggerError.ts +0 -8
- package/src/structures/ISwaggerLazyProperty.ts +0 -7
- package/src/structures/ISwaggerLazySchema.ts +0 -7
- package/src/structures/ITypeTuple.ts +0 -6
|
@@ -1,99 +1,144 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
2
|
+
// import { IPointer } from "tstl";
|
|
3
|
+
// import ts from "typescript";
|
|
4
|
+
// import { IJsDocTagInfo } from "typia";
|
|
5
|
+
// import { MetadataCollection } from "typia/lib/factories/MetadataCollection";
|
|
6
|
+
// import { MetadataFactory } from "typia/lib/factories/MetadataFactory";
|
|
7
|
+
// import { MetadataAlias } from "typia/lib/schemas/metadata/MetadataAlias";
|
|
8
|
+
// import { MetadataAtomic } from "typia/lib/schemas/metadata/MetadataAtomic";
|
|
9
|
+
// import { MetadataObject } from "typia/lib/schemas/metadata/MetadataObject";
|
|
10
|
+
// import { INestiaProject } from "../../structures/INestiaProject";
|
|
11
|
+
// import { ITypedHttpRoute } from "../../structures/ITypedHttpRoute";
|
|
12
|
+
// import { MapUtil } from "../../utils/MapUtil";
|
|
13
|
+
// import { FilePrinter } from "./FilePrinter";
|
|
14
|
+
// import { ImportDictionary } from "./ImportDictionary";
|
|
15
|
+
// import { SdkTypeProgrammer } from "./SdkTypeProgrammer";
|
|
16
|
+
// export namespace SdkHttpCloneProgrammer {
|
|
17
|
+
// export interface IModule {
|
|
18
|
+
// name: string;
|
|
19
|
+
// children: Map<string, IModule>;
|
|
20
|
+
// programmer:
|
|
21
|
+
// | null
|
|
22
|
+
// | ((importer: ImportDictionary) => ts.TypeAliasDeclaration);
|
|
23
|
+
// }
|
|
24
|
+
// export const write =
|
|
25
|
+
// (project: INestiaProject) =>
|
|
26
|
+
// (routes: ITypedHttpRoute[]): Map<string, IModule> => {
|
|
27
|
+
// const collection = new MetadataCollection({
|
|
28
|
+
// replace: MetadataCollection.replace,
|
|
29
|
+
// });
|
|
30
|
+
// for (const r of routes) {
|
|
31
|
+
// for (const p of r.parameters) {
|
|
32
|
+
// const res = MetadataFactory.analyze(project.checker)({
|
|
33
|
+
// escape: false,
|
|
34
|
+
// constant: true,
|
|
35
|
+
// absorb: false,
|
|
36
|
+
// })(collection)(p.type);
|
|
37
|
+
// if (res.success) p.metadata = res.data;
|
|
38
|
+
// }
|
|
39
|
+
// for (const e of Object.values(r.exceptions)) {
|
|
40
|
+
// const res = MetadataFactory.analyze(project.checker)({
|
|
41
|
+
// escape: true,
|
|
42
|
+
// constant: true,
|
|
43
|
+
// absorb: false,
|
|
44
|
+
// })(collection)(e.type);
|
|
45
|
+
// if (res.success) e.metadata = res.data;
|
|
46
|
+
// }
|
|
47
|
+
// const res = MetadataFactory.analyze(project.checker)({
|
|
48
|
+
// escape: true,
|
|
49
|
+
// constant: true,
|
|
50
|
+
// absorb: false,
|
|
51
|
+
// })(collection)(r.output.type);
|
|
52
|
+
// if (res.success) r.success.metadata = res.data;
|
|
53
|
+
// }
|
|
54
|
+
// const dict: Map<string, IModule> = new Map();
|
|
55
|
+
// for (const alias of collection.aliases())
|
|
56
|
+
// if (isNamedDeclaration(alias.name))
|
|
57
|
+
// prepare(dict)(alias.name)((importer) =>
|
|
58
|
+
// write_alias(project)(importer)(alias),
|
|
59
|
+
// );
|
|
60
|
+
// for (const object of collection.objects())
|
|
61
|
+
// if (isNamedDeclaration(object.name))
|
|
62
|
+
// prepare(dict)(object.name)((importer) =>
|
|
63
|
+
// write_object(project)(importer)(object),
|
|
64
|
+
// );
|
|
65
|
+
// return dict;
|
|
66
|
+
// };
|
|
67
|
+
// const prepare =
|
|
68
|
+
// (dict: Map<string, IModule>) =>
|
|
69
|
+
// (name: string) =>
|
|
70
|
+
// (programmer: (importer: ImportDictionary) => ts.TypeAliasDeclaration) => {
|
|
71
|
+
// const accessors: string[] = name.split(".");
|
|
72
|
+
// const modulo: IPointer<IModule> = { value: null! };
|
|
73
|
+
// accessors.forEach((acc, i) => {
|
|
74
|
+
// modulo.value = MapUtil.take(dict, acc, () => ({
|
|
75
|
+
// name: acc,
|
|
76
|
+
// children: new Map(),
|
|
77
|
+
// programmer: null,
|
|
78
|
+
// }));
|
|
79
|
+
// if (i === accessors.length - 1) modulo.value.programmer = programmer;
|
|
80
|
+
// dict = modulo.value.children;
|
|
81
|
+
// });
|
|
82
|
+
// return modulo!;
|
|
83
|
+
// };
|
|
84
|
+
// const write_alias =
|
|
85
|
+
// (project: INestiaProject) =>
|
|
86
|
+
// (importer: ImportDictionary) =>
|
|
87
|
+
// (alias: MetadataAlias): ts.TypeAliasDeclaration =>
|
|
88
|
+
// FilePrinter.description(
|
|
89
|
+
// ts.factory.createTypeAliasDeclaration(
|
|
90
|
+
// [ts.factory.createToken(ts.SyntaxKind.ExportKeyword)],
|
|
91
|
+
// alias.name.split(".").at(-1)!,
|
|
92
|
+
// [],
|
|
93
|
+
// SdkTypeProgrammer.write(project)(importer)(alias.value),
|
|
94
|
+
// ),
|
|
95
|
+
// writeComment([])(alias.description, alias.jsDocTags),
|
|
96
|
+
// );
|
|
97
|
+
// const write_object =
|
|
98
|
+
// (project: INestiaProject) =>
|
|
99
|
+
// (importer: ImportDictionary) =>
|
|
100
|
+
// (object: MetadataObject): ts.TypeAliasDeclaration => {
|
|
101
|
+
// return FilePrinter.description(
|
|
102
|
+
// ts.factory.createTypeAliasDeclaration(
|
|
103
|
+
// [ts.factory.createToken(ts.SyntaxKind.ExportKeyword)],
|
|
104
|
+
// object.name.split(".").at(-1)!,
|
|
105
|
+
// [],
|
|
106
|
+
// SdkTypeProgrammer.write_object(project)(importer)(object),
|
|
107
|
+
// ),
|
|
108
|
+
// writeComment([])(object.description ?? null, object.jsDocTags),
|
|
109
|
+
// );
|
|
110
|
+
// };
|
|
111
|
+
// }
|
|
112
|
+
// const isNamedDeclaration = (name: string) =>
|
|
113
|
+
// name !== "object" &&
|
|
114
|
+
// name !== "__type" &&
|
|
115
|
+
// !name.startsWith("__type.") &&
|
|
116
|
+
// name !== "__object" &&
|
|
117
|
+
// !name.startsWith("__object.");
|
|
118
|
+
// const writeComment =
|
|
119
|
+
// (atomics: MetadataAtomic[]) =>
|
|
120
|
+
// (description: string | null, jsDocTags: IJsDocTagInfo[]): string => {
|
|
121
|
+
// const lines: string[] = [];
|
|
122
|
+
// if (description?.length)
|
|
123
|
+
// lines.push(...description.split("\n").map((s) => `${s}`));
|
|
124
|
+
// const filtered: IJsDocTagInfo[] =
|
|
125
|
+
// !!atomics.length && !!jsDocTags?.length
|
|
126
|
+
// ? jsDocTags.filter(
|
|
127
|
+
// (tag) =>
|
|
128
|
+
// !atomics.some((a) =>
|
|
129
|
+
// a.tags.some((r) => r.some((t) => t.kind === tag.name)),
|
|
130
|
+
// ),
|
|
131
|
+
// )
|
|
132
|
+
// : jsDocTags ?? [];
|
|
133
|
+
// if (description?.length && filtered.length) lines.push("");
|
|
134
|
+
// if (filtered.length)
|
|
135
|
+
// lines.push(
|
|
136
|
+
// ...filtered.map((t) =>
|
|
137
|
+
// t.text?.length
|
|
138
|
+
// ? `@${t.name} ${t.text.map((e) => e.text).join("")}`
|
|
139
|
+
// : `@${t.name}`,
|
|
140
|
+
// ),
|
|
141
|
+
// );
|
|
142
|
+
// return lines.join("\n");
|
|
143
|
+
// };
|
|
99
144
|
//# sourceMappingURL=SdkHttpCloneProgrammer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdkHttpCloneProgrammer.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkHttpCloneProgrammer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SdkHttpCloneProgrammer.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkHttpCloneProgrammer.ts"],"names":[],"mappings":";AAAA,mCAAmC;AACnC,+BAA+B;AAC/B,yCAAyC;AACzC,+EAA+E;AAC/E,yEAAyE;AACzE,4EAA4E;AAC5E,8EAA8E;AAC9E,8EAA8E;AAE9E,oEAAoE;AACpE,sEAAsE;AACtE,iDAAiD;AACjD,+CAA+C;AAC/C,yDAAyD;AACzD,2DAA2D;AAE3D,4CAA4C;AAC5C,+BAA+B;AAC/B,oBAAoB;AACpB,sCAAsC;AACtC,kBAAkB;AAClB,eAAe;AACf,qEAAqE;AACrE,MAAM;AAEN,yBAAyB;AACzB,mCAAmC;AACnC,6DAA6D;AAC7D,oDAAoD;AACpD,+CAA+C;AAC/C,YAAY;AACZ,kCAAkC;AAClC,0CAA0C;AAC1C,mEAAmE;AACnE,6BAA6B;AAC7B,8BAA8B;AAC9B,6BAA6B;AAC7B,oCAAoC;AACpC,oDAAoD;AACpD,YAAY;AACZ,yDAAyD;AACzD,mEAAmE;AACnE,4BAA4B;AAC5B,8BAA8B;AAC9B,6BAA6B;AAC7B,oCAAoC;AACpC,oDAAoD;AACpD,YAAY;AACZ,iEAAiE;AACjE,0BAA0B;AAC1B,4BAA4B;AAC5B,2BAA2B;AAC3B,yCAAyC;AACzC,0DAA0D;AAC1D,UAAU;AAEV,sDAAsD;AACtD,kDAAkD;AAClD,8CAA8C;AAC9C,oDAAoD;AACpD,qDAAqD;AACrD,eAAe;AACf,mDAAmD;AACnD,+CAA+C;AAC/C,qDAAqD;AACrD,uDAAuD;AACvD,eAAe;AACf,qBAAqB;AACrB,SAAS;AAET,oBAAoB;AACpB,sCAAsC;AACtC,wBAAwB;AACxB,iFAAiF;AACjF,qDAAqD;AACrD,4DAA4D;AAE5D,wCAAwC;AACxC,0DAA0D;AAC1D,uBAAuB;AACvB,iCAAiC;AACjC,8BAA8B;AAC9B,eAAe;AACf,gFAAgF;AAChF,wCAAwC;AACxC,YAAY;AACZ,wBAAwB;AACxB,SAAS;AAET,wBAAwB;AACxB,mCAAmC;AACnC,sCAAsC;AACtC,yDAAyD;AACzD,iCAAiC;AACjC,iDAAiD;AACjD,mEAAmE;AACnE,2CAA2C;AAC3C,gBAAgB;AAChB,qEAAqE;AACrE,aAAa;AACb,gEAAgE;AAChE,WAAW;AAEX,yBAAyB;AACzB,mCAAmC;AACnC,sCAAsC;AACtC,6DAA6D;AAC7D,wCAAwC;AACxC,iDAAiD;AACjD,mEAAmE;AACnE,4CAA4C;AAC5C,gBAAgB;AAChB,uEAAuE;AACvE,aAAa;AACb,0EAA0E;AAC1E,WAAW;AACX,SAAS;AACT,IAAI;AAEJ,+CAA+C;AAC/C,yBAAyB;AACzB,yBAAyB;AACzB,mCAAmC;AACnC,2BAA2B;AAC3B,mCAAmC;AAEnC,uBAAuB;AACvB,mCAAmC;AACnC,0EAA0E;AAC1E,kCAAkC;AAClC,+BAA+B;AAC/B,mEAAmE;AAEnE,wCAAwC;AACxC,gDAAgD;AAChD,8BAA8B;AAC9B,uBAAuB;AACvB,qCAAqC;AACrC,0EAA0E;AAC1E,mBAAmB;AACnB,cAAc;AACd,6BAA6B;AAE7B,kEAAkE;AAClE,2BAA2B;AAC3B,oBAAoB;AACpB,iCAAiC;AACjC,2BAA2B;AAC3B,mEAAmE;AACnE,8BAA8B;AAC9B,aAAa;AACb,WAAW;AACX,+BAA+B;AAC/B,OAAO"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import ts from "typescript";
|
|
2
2
|
import { INestiaProject } from "../../structures/INestiaProject";
|
|
3
3
|
import { ITypedHttpRoute } from "../../structures/ITypedHttpRoute";
|
|
4
|
+
import { ITypedHttpRouteParameter } from "../../structures/ITypedHttpRouteParameter";
|
|
4
5
|
import { ImportDictionary } from "./ImportDictionary";
|
|
5
6
|
export declare namespace SdkHttpFunctionProgrammer {
|
|
6
7
|
const write: (project: INestiaProject) => (importer: ImportDictionary) => (route: ITypedHttpRoute, props: {
|
|
7
|
-
headers:
|
|
8
|
-
query:
|
|
9
|
-
input:
|
|
8
|
+
headers: ITypedHttpRouteParameter.IHeaders | undefined;
|
|
9
|
+
query: ITypedHttpRouteParameter.IQuery | undefined;
|
|
10
|
+
input: ITypedHttpRouteParameter.IBody | undefined;
|
|
10
11
|
}) => ts.FunctionDeclaration;
|
|
11
12
|
}
|
|
@@ -5,11 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.SdkHttpFunctionProgrammer = void 0;
|
|
7
7
|
const typescript_1 = __importDefault(require("typescript"));
|
|
8
|
-
const typia_1 = __importDefault(require("typia"));
|
|
9
8
|
const IdentifierFactory_1 = require("typia/lib/factories/IdentifierFactory");
|
|
10
9
|
const StringUtil_1 = require("../../utils/StringUtil");
|
|
10
|
+
const SdkAliasCollection_1 = require("./SdkAliasCollection");
|
|
11
11
|
const SdkImportWizard_1 = require("./SdkImportWizard");
|
|
12
|
-
const SdkTypeProgrammer_1 = require("./SdkTypeProgrammer");
|
|
13
12
|
var SdkHttpFunctionProgrammer;
|
|
14
13
|
(function (SdkHttpFunctionProgrammer) {
|
|
15
14
|
SdkHttpFunctionProgrammer.write = (project) => (importer) => (route, props) => typescript_1.default.factory.createFunctionDeclaration([
|
|
@@ -21,61 +20,46 @@ var SdkHttpFunctionProgrammer;
|
|
|
21
20
|
: undefined)),
|
|
22
21
|
...route.parameters
|
|
23
22
|
.filter((p) => p.category !== "headers")
|
|
24
|
-
.map((p) => typescript_1.default.factory.createParameterDeclaration([], undefined, p.name, p.optional
|
|
23
|
+
.map((p) => typescript_1.default.factory.createParameterDeclaration([], undefined, p.name, p.metadata.optional
|
|
25
24
|
? typescript_1.default.factory.createToken(typescript_1.default.SyntaxKind.QuestionToken)
|
|
26
25
|
: undefined, project.config.primitive !== false &&
|
|
27
26
|
(p === props.query || p === props.input)
|
|
28
27
|
? typescript_1.default.factory.createTypeReferenceNode(`${route.name}.${p === props.query ? "Query" : "Input"}`)
|
|
29
|
-
:
|
|
28
|
+
: SdkAliasCollection_1.SdkAliasCollection.name(p.type))),
|
|
30
29
|
], typescript_1.default.factory.createTypeReferenceNode("Promise", [
|
|
31
|
-
|
|
30
|
+
SdkAliasCollection_1.SdkAliasCollection.name(route.success.type),
|
|
32
31
|
]), typescript_1.default.factory.createBlock(write_body(project.config)(importer)(route, props), true));
|
|
33
32
|
const write_body = (config) => (importer) => (route, props) => {
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
props.input
|
|
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
|
-
], true),
|
|
65
|
-
...(props.input
|
|
66
|
-
? [typescript_1.default.factory.createIdentifier(props.input.name)]
|
|
67
|
-
: []),
|
|
68
|
-
...(config.json && (() => { const $io0 = input => true === input.custom && "body" === input.category && "number" === typeof input.index && "string" === typeof input.name && (undefined === input.field || "string" === typeof input.field) && "boolean" === typeof input.encrypted && ("application/json" === input.contentType || "text/plain" === input.contentType || "application/x-www-form-urlencoded" === input.contentType || "multipart/form-data" === input.contentType) && true && (undefined === input.examples || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && $io1(input.examples)); const $io1 = input => Object.keys(input).every(key => {
|
|
69
|
-
const value = input[key];
|
|
70
|
-
if (undefined === value)
|
|
71
|
-
return true;
|
|
72
|
-
return true;
|
|
73
|
-
}); return input => "object" === typeof input && null !== input && $io0(input); })()(props.input) &&
|
|
74
|
-
(props.input.contentType === "application/json" ||
|
|
75
|
-
props.input.encrypted === true)
|
|
76
|
-
? [typescript_1.default.factory.createIdentifier(`${route.name}.stringify`)]
|
|
77
|
-
: []),
|
|
78
|
-
]);
|
|
33
|
+
const caller = () => {
|
|
34
|
+
var _a, _b, _c, _d;
|
|
35
|
+
return typescript_1.default.factory.createCallExpression(IdentifierFactory_1.IdentifierFactory.access(typescript_1.default.factory.createIdentifier(SdkImportWizard_1.SdkImportWizard.Fetcher(!!((_a = props.input) === null || _a === void 0 ? void 0 : _a.encrypted))(importer)))(config.propagate ? "propagate" : "fetch"), undefined, [
|
|
36
|
+
((_b = props.input) === null || _b === void 0 ? void 0 : _b.contentType) !== "multipart/form-data"
|
|
37
|
+
? typescript_1.default.factory.createObjectLiteralExpression([
|
|
38
|
+
typescript_1.default.factory.createSpreadAssignment(typescript_1.default.factory.createIdentifier("connection")),
|
|
39
|
+
typescript_1.default.factory.createPropertyAssignment("headers", typescript_1.default.factory.createObjectLiteralExpression([
|
|
40
|
+
typescript_1.default.factory.createSpreadAssignment(IdentifierFactory_1.IdentifierFactory.access(typescript_1.default.factory.createIdentifier("connection"))("headers")),
|
|
41
|
+
typescript_1.default.factory.createPropertyAssignment(typescript_1.default.factory.createStringLiteral("Content-Type"), typescript_1.default.factory.createStringLiteral((_d = (_c = props.input) === null || _c === void 0 ? void 0 : _c.contentType) !== null && _d !== void 0 ? _d : "application/json")),
|
|
42
|
+
], true)),
|
|
43
|
+
], true)
|
|
44
|
+
: typescript_1.default.factory.createIdentifier("connection"),
|
|
45
|
+
typescript_1.default.factory.createObjectLiteralExpression([
|
|
46
|
+
typescript_1.default.factory.createSpreadAssignment(IdentifierFactory_1.IdentifierFactory.access(typescript_1.default.factory.createIdentifier(route.name))("METADATA")),
|
|
47
|
+
typescript_1.default.factory.createPropertyAssignment("template", IdentifierFactory_1.IdentifierFactory.access(IdentifierFactory_1.IdentifierFactory.access(typescript_1.default.factory.createIdentifier(route.name))("METADATA"))("path")),
|
|
48
|
+
typescript_1.default.factory.createPropertyAssignment("path", typescript_1.default.factory.createCallExpression(IdentifierFactory_1.IdentifierFactory.access(typescript_1.default.factory.createIdentifier(route.name))("path"), undefined, route.parameters
|
|
49
|
+
.filter((p) => p.category === "param" || p.category === "query")
|
|
50
|
+
.map((p) => typescript_1.default.factory.createIdentifier(p.name)))),
|
|
51
|
+
], true),
|
|
52
|
+
...(props.input
|
|
53
|
+
? [typescript_1.default.factory.createIdentifier(props.input.name)]
|
|
54
|
+
: []),
|
|
55
|
+
...(config.json &&
|
|
56
|
+
props.input !== undefined &&
|
|
57
|
+
(props.input.contentType === "application/json" ||
|
|
58
|
+
props.input.encrypted === true)
|
|
59
|
+
? [typescript_1.default.factory.createIdentifier(`${route.name}.stringify`)]
|
|
60
|
+
: []),
|
|
61
|
+
]);
|
|
62
|
+
};
|
|
79
63
|
const output = (awaiter) => config.simulate
|
|
80
64
|
? typescript_1.default.factory.createConditionalExpression(typescript_1.default.factory.createIdentifier("!!connection.simulate"), undefined, typescript_1.default.factory.createCallExpression(typescript_1.default.factory.createIdentifier(`${route.name}.simulate`), [], [
|
|
81
65
|
typescript_1.default.factory.createIdentifier("connection"),
|
|
@@ -94,7 +78,7 @@ var SdkHttpFunctionProgrammer;
|
|
|
94
78
|
typescript_1.default.factory.createTypeQueryNode(typescript_1.default.factory.createIdentifier(p.name)),
|
|
95
79
|
], [typescript_1.default.factory.createIdentifier(p.name)])))
|
|
96
80
|
: []),
|
|
97
|
-
...(route.setHeaders.length === 0
|
|
81
|
+
...(route.success.setHeaders.length === 0
|
|
98
82
|
? [typescript_1.default.factory.createReturnStatement(output(false))]
|
|
99
83
|
: write_set_headers(config)(route)(output(true))),
|
|
100
84
|
];
|
|
@@ -109,7 +93,7 @@ var SdkHttpFunctionProgrammer;
|
|
|
109
93
|
const data = config.propagate ? accessor(output)("data") : output;
|
|
110
94
|
const assigners = [
|
|
111
95
|
typescript_1.default.factory.createBinaryExpression(typescript_1.default.factory.createIdentifier(headers), typescript_1.default.factory.createToken(typescript_1.default.SyntaxKind.QuestionQuestionEqualsToken), typescript_1.default.factory.createObjectLiteralExpression([])),
|
|
112
|
-
...route.setHeaders.map((tuple) => {
|
|
96
|
+
...route.success.setHeaders.map((tuple) => {
|
|
113
97
|
var _a;
|
|
114
98
|
return tuple.type === "assigner"
|
|
115
99
|
? typescript_1.default.factory.createCallExpression(typescript_1.default.factory.createIdentifier("Object.assign"), [], [
|
|
@@ -121,7 +105,7 @@ var SdkHttpFunctionProgrammer;
|
|
|
121
105
|
].map(typescript_1.default.factory.createExpressionStatement);
|
|
122
106
|
return [
|
|
123
107
|
typescript_1.default.factory.createVariableStatement([], typescript_1.default.factory.createVariableDeclarationList([
|
|
124
|
-
typescript_1.default.factory.createVariableDeclaration(output, undefined,
|
|
108
|
+
typescript_1.default.factory.createVariableDeclaration(output, undefined, SdkAliasCollection_1.SdkAliasCollection.name(route.success.type), condition),
|
|
125
109
|
], typescript_1.default.NodeFlags.Const)),
|
|
126
110
|
...(config.propagate
|
|
127
111
|
? [
|
|
@@ -134,10 +118,4 @@ var SdkHttpFunctionProgrammer;
|
|
|
134
118
|
];
|
|
135
119
|
};
|
|
136
120
|
})(SdkHttpFunctionProgrammer || (exports.SdkHttpFunctionProgrammer = SdkHttpFunctionProgrammer = {}));
|
|
137
|
-
const getTypeName = (project) => (importer) => (p) => p.metadata
|
|
138
|
-
? SdkTypeProgrammer_1.SdkTypeProgrammer.write(project)(importer)(p.metadata)
|
|
139
|
-
: typescript_1.default.factory.createTypeReferenceNode(p.typeName);
|
|
140
|
-
const getReturnType = (config) => (route) => typescript_1.default.factory.createTypeReferenceNode(config.propagate !== true && route.output.typeName === "void"
|
|
141
|
-
? "void"
|
|
142
|
-
: `${route.name}.Output`);
|
|
143
121
|
//# sourceMappingURL=SdkHttpFunctionProgrammer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdkHttpFunctionProgrammer.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkHttpFunctionProgrammer.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA4B;AAC5B,
|
|
1
|
+
{"version":3,"file":"SdkHttpFunctionProgrammer.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkHttpFunctionProgrammer.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA4B;AAC5B,6EAA0E;AAM1E,uDAAoD;AAEpD,6DAA0D;AAC1D,uDAAoD;AAEpD,IAAiB,yBAAyB,CA0QzC;AA1QD,WAAiB,yBAAyB;IAC3B,+BAAK,GAChB,CAAC,OAAuB,EAAE,EAAE,CAC5B,CAAC,QAA0B,EAAE,EAAE,CAC/B,CACE,KAAsB,EACtB,KAIC,EACuB,EAAE,CAC1B,oBAAE,CAAC,OAAO,CAAC,yBAAyB,CAClC;QACE,oBAAE,CAAC,OAAO,CAAC,cAAc,CAAC,oBAAE,CAAC,UAAU,CAAC,aAAa,CAAC;QACtD,oBAAE,CAAC,OAAO,CAAC,cAAc,CAAC,oBAAE,CAAC,UAAU,CAAC,YAAY,CAAC;KACtD,EACD,SAAS,EACT,KAAK,CAAC,IAAI,EACV,SAAS,EACT;QACE,qCAAiB,CAAC,SAAS,CACzB,YAAY,EACZ,oBAAE,CAAC,OAAO,CAAC,uBAAuB,CAChC,iCAAe,CAAC,WAAW,CAAC,QAAQ,CAAC,EACrC,KAAK,CAAC,OAAO;YACX,CAAC,CAAC,CAAC,oBAAE,CAAC,OAAO,CAAC,uBAAuB,CAAC,GAAG,KAAK,CAAC,IAAI,UAAU,CAAC,CAAC;YAC/D,CAAC,CAAC,SAAS,CACd,CACF;QACD,GAAG,KAAK,CAAC,UAAU;aAChB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,SAAS,CAAC;aACvC,GAAG,CAAC,C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jD,oBAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAC1D,CAAA;aAAA,CACN;SACF,CAAC,GAAG,CAAC,oBAAE,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;QAC5C,OAAO;YACL,oBAAE,CAAC,OAAO,CAAC,uBAAuB,CAChC,EAAE,EACF,oBAAE,CAAC,OAAO,CAAC,6BAA6B,CACtC;gBACE,oBAAE,CAAC,OAAO,CAAC,yBAAyB,CAClC,MAAM,EACN,SAAS,EACT,uCAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAC3C,SAAS,CACV;aACF,EACD,oBAAE,CAAC,SAAS,CAAC,KAAK,CACnB,CACF;YACD,GAAG,CAAC,MAAM,CAAC,SAAS;gBAClB,CAAC,CAAC;oBACE,oBAAE,CAAC,OAAO,CAAC,iBAAiB,CAC1B,oBAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,EACxD,SAAS,CAAC,MAAM,KAAK,CAAC;wBACpB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;wBACd,CAAC,CAAC,oBAAE,CAAC,OAAO,CAAC,WAAW,CAAC,SAAS,EAAE,IAAI,CAAC,EAC3C,SAAS,CACV;iBACF;gBACH,CAAC,CAAC,SAAS,CAAC;YACd,oBAAE,CAAC,OAAO,CAAC,qBAAqB,CAAC,oBAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;SACtE,CAAC;IACJ,CAAC,CAAC;AACN,CAAC,EA1QgB,yBAAyB,yCAAzB,yBAAyB,QA0QzC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import ts from "typescript";
|
|
2
2
|
import { INestiaProject } from "../../structures/INestiaProject";
|
|
3
3
|
import { ITypedHttpRoute } from "../../structures/ITypedHttpRoute";
|
|
4
|
+
import { ITypedHttpRouteParameter } from "../../structures/ITypedHttpRouteParameter";
|
|
4
5
|
import { ImportDictionary } from "./ImportDictionary";
|
|
5
6
|
export declare namespace SdkHttpNamespaceProgrammer {
|
|
6
7
|
const write: (project: INestiaProject) => (importer: ImportDictionary) => (route: ITypedHttpRoute, props: {
|
|
7
|
-
headers:
|
|
8
|
-
query:
|
|
9
|
-
input:
|
|
8
|
+
headers: ITypedHttpRouteParameter.IHeaders | undefined;
|
|
9
|
+
query: ITypedHttpRouteParameter.IQuery | undefined;
|
|
10
|
+
input: ITypedHttpRouteParameter.IBody | undefined;
|
|
10
11
|
}) => ts.ModuleDeclaration;
|
|
11
12
|
}
|