@nestia/sdk 11.2.1 → 12.0.0-dev.20260520.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/assets/bundle/distribute/package.json +1 -1
- package/lib/NestiaSdkApplication.js +5 -4
- package/lib/NestiaSdkApplication.js.map +1 -1
- package/lib/NestiaSwaggerComposer.js +2 -2
- package/lib/NestiaSwaggerComposer.js.map +1 -1
- package/lib/analyses/AccessorAnalyzer.js.map +1 -1
- package/lib/analyses/ConfigAnalyzer.js +133 -7
- package/lib/analyses/ConfigAnalyzer.js.map +1 -1
- package/lib/analyses/ImportAnalyzer.d.ts +9 -2
- package/lib/analyses/ImportAnalyzer.js +13 -50
- package/lib/analyses/ImportAnalyzer.js.map +1 -1
- package/lib/analyses/PathAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectControllerAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectHttpOperationAnalyzer.d.ts +1 -1
- package/lib/analyses/ReflectHttpOperationAnalyzer.js +5 -4
- package/lib/analyses/ReflectHttpOperationAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.d.ts +1 -1
- package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.js +22 -5
- package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectHttpOperationParameterAnalyzer.d.ts +1 -1
- package/lib/analyses/ReflectHttpOperationParameterAnalyzer.js +8 -8
- package/lib/analyses/ReflectHttpOperationParameterAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectHttpOperationResponseAnalyzer.d.ts +1 -1
- package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js +15 -15
- package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectMetadataAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectWebSocketOperationAnalyzer.d.ts +1 -1
- package/lib/analyses/ReflectWebSocketOperationAnalyzer.js +1 -1
- package/lib/analyses/ReflectWebSocketOperationAnalyzer.js.map +1 -1
- package/lib/analyses/SecurityAnalyzer.js.map +1 -1
- package/lib/analyses/TypedHttpRouteAnalyzer.d.ts +2 -1
- package/lib/analyses/TypedHttpRouteAnalyzer.js +296 -39
- package/lib/analyses/TypedHttpRouteAnalyzer.js.map +1 -1
- package/lib/analyses/TypedWebSocketRouteAnalyzer.js +1 -4
- package/lib/analyses/TypedWebSocketRouteAnalyzer.js.map +1 -1
- package/lib/decorators/OperationMetadata.d.ts +1 -1
- package/lib/decorators/OperationMetadata.js.map +1 -1
- package/lib/executable/internal/CommandParser.js.map +1 -1
- package/lib/executable/internal/NestiaConfigLoader.d.ts +6 -2
- package/lib/executable/internal/NestiaConfigLoader.js +285 -793
- package/lib/executable/internal/NestiaConfigLoader.js.map +1 -1
- package/lib/executable/internal/NestiaSdkCommand.js +6 -4
- package/lib/executable/internal/NestiaSdkCommand.js.map +1 -1
- package/lib/executable/sdk.js +17 -5
- package/lib/executable/sdk.js.map +1 -1
- package/lib/generates/CloneGenerator.js +2 -2
- package/lib/generates/CloneGenerator.js.map +1 -1
- package/lib/generates/E2eGenerator.js.map +1 -1
- package/lib/generates/SdkGenerator.js +6 -9
- package/lib/generates/SdkGenerator.js.map +1 -1
- package/lib/generates/SwaggerGenerator.js +20 -107
- package/lib/generates/SwaggerGenerator.js.map +1 -1
- package/lib/generates/internal/E2eFileProgrammer.js +44 -28
- package/lib/generates/internal/E2eFileProgrammer.js.map +1 -1
- package/lib/generates/internal/FilePrinter.d.ts +4 -4
- package/lib/generates/internal/FilePrinter.js +25 -16
- package/lib/generates/internal/FilePrinter.js.map +1 -1
- package/lib/generates/internal/ImportDictionary.d.ts +2 -2
- package/lib/generates/internal/ImportDictionary.js +7 -5
- package/lib/generates/internal/ImportDictionary.js.map +1 -1
- package/lib/generates/internal/SdkAliasCollection.d.ts +11 -11
- package/lib/generates/internal/SdkAliasCollection.js +27 -31
- package/lib/generates/internal/SdkAliasCollection.js.map +1 -1
- package/lib/generates/internal/SdkDistributionComposer.js +15 -70
- package/lib/generates/internal/SdkDistributionComposer.js.map +1 -1
- package/lib/generates/internal/SdkFileProgrammer.js +2 -2
- package/lib/generates/internal/SdkFileProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpCloneProgrammer.d.ts +2 -2
- package/lib/generates/internal/SdkHttpCloneProgrammer.js +6 -12
- package/lib/generates/internal/SdkHttpCloneProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpCloneReferencer.js +2 -1
- package/lib/generates/internal/SdkHttpCloneReferencer.js.map +1 -1
- package/lib/generates/internal/SdkHttpFunctionProgrammer.d.ts +2 -2
- package/lib/generates/internal/SdkHttpFunctionProgrammer.js +73 -77
- package/lib/generates/internal/SdkHttpFunctionProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.d.ts +2 -2
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.js +64 -66
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpParameterProgrammer.d.ts +4 -10
- package/lib/generates/internal/SdkHttpParameterProgrammer.js +15 -22
- package/lib/generates/internal/SdkHttpParameterProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpRouteProgrammer.d.ts +2 -2
- package/lib/generates/internal/SdkHttpRouteProgrammer.js +18 -20
- package/lib/generates/internal/SdkHttpRouteProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpSimulationProgrammer.d.ts +3 -3
- package/lib/generates/internal/SdkHttpSimulationProgrammer.js +47 -49
- package/lib/generates/internal/SdkHttpSimulationProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkImportWizard.js.map +1 -1
- package/lib/generates/internal/SdkRouteDirectory.js.map +1 -1
- package/lib/generates/internal/SdkTypeProgrammer.d.ts +4 -4
- package/lib/generates/internal/SdkTypeProgrammer.js +66 -67
- package/lib/generates/internal/SdkTypeProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkTypeTagProgrammer.d.ts +1 -2
- package/lib/generates/internal/SdkTypeTagProgrammer.js +29 -11
- package/lib/generates/internal/SdkTypeTagProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.d.ts +2 -2
- package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js +55 -55
- package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkWebSocketParameterProgrammer.d.ts +3 -3
- package/lib/generates/internal/SdkWebSocketParameterProgrammer.js +9 -12
- package/lib/generates/internal/SdkWebSocketParameterProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkWebSocketRouteProgrammer.d.ts +2 -2
- package/lib/generates/internal/SdkWebSocketRouteProgrammer.js +43 -45
- package/lib/generates/internal/SdkWebSocketRouteProgrammer.js.map +1 -1
- package/lib/generates/internal/SwaggerDescriptionComposer.js.map +1 -1
- package/lib/generates/internal/SwaggerOperationComposer.d.ts +1 -1
- package/lib/generates/internal/SwaggerOperationComposer.js +5 -4
- package/lib/generates/internal/SwaggerOperationComposer.js.map +1 -1
- package/lib/generates/internal/SwaggerOperationParameterComposer.d.ts +0 -3
- package/lib/generates/internal/SwaggerOperationParameterComposer.js +19 -20
- package/lib/generates/internal/SwaggerOperationParameterComposer.js.map +1 -1
- package/lib/generates/internal/SwaggerOperationResponseComposer.d.ts +1 -1
- package/lib/generates/internal/SwaggerOperationResponseComposer.js +4 -3
- package/lib/generates/internal/SwaggerOperationResponseComposer.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/internal/legacy.d.ts +180 -0
- package/lib/internal/legacy.js +361 -0
- package/lib/internal/legacy.js.map +1 -0
- package/lib/structures/INestiaProject.d.ts +0 -2
- package/lib/{transformers → structures}/IOperationMetadata.d.ts +2 -7
- package/lib/structures/IOperationMetadata.js.map +1 -0
- package/lib/structures/IReflectHttpOperationException.d.ts +1 -1
- package/lib/structures/IReflectHttpOperationParameter.d.ts +1 -1
- package/lib/structures/IReflectHttpOperationSuccess.d.ts +1 -1
- package/lib/structures/IReflectOperationError.d.ts +1 -1
- package/lib/structures/IReflectOperationError.js.map +1 -1
- package/lib/structures/IReflectWebSocketOperation.d.ts +2 -2
- package/lib/structures/ITypedApplication.d.ts +1 -1
- package/lib/structures/ITypedHttpRouteException.d.ts +1 -1
- package/lib/structures/ITypedHttpRouteParameter.d.ts +1 -1
- package/lib/structures/ITypedHttpRouteSuccess.d.ts +1 -1
- package/lib/structures/ITypedWebSocketRoute.d.ts +2 -2
- package/lib/transform.d.ts +9 -3
- package/lib/transform.js +47 -5
- package/lib/transform.js.map +1 -1
- package/lib/utils/ArrayUtil.js.map +1 -1
- package/lib/utils/FileRetriever.js.map +1 -1
- package/lib/utils/MapUtil.js.map +1 -1
- package/lib/utils/PathUtil.js.map +1 -1
- package/lib/utils/SourceFinder.js.map +1 -1
- package/lib/utils/StringUtil.js.map +1 -1
- package/lib/utils/TsConfigReader.d.ts +7 -0
- package/lib/utils/TsConfigReader.js +102 -0
- package/lib/utils/TsConfigReader.js.map +1 -0
- package/lib/utils/TtscExecutor.d.ts +8 -0
- package/lib/utils/TtscExecutor.js +58 -0
- package/lib/utils/TtscExecutor.js.map +1 -0
- package/lib/utils/VersioningStrategy.js.map +1 -1
- package/lib/validators/HttpHeadersValidator.d.ts +8 -5
- package/lib/validators/HttpHeadersValidator.js +7 -26
- package/lib/validators/HttpHeadersValidator.js.map +1 -1
- package/lib/validators/HttpQueryValidator.d.ts +8 -5
- package/lib/validators/HttpQueryValidator.js +7 -26
- package/lib/validators/HttpQueryValidator.js.map +1 -1
- package/lib/{transformers → validators}/TextPlainValidator.d.ts +1 -1
- package/lib/{transformers → validators}/TextPlainValidator.js +2 -1
- package/lib/validators/TextPlainValidator.js.map +1 -0
- package/package.json +21 -19
- package/src/NestiaSdkApplication.ts +9 -5
- package/src/NestiaSwaggerComposer.ts +2 -3
- package/src/analyses/ConfigAnalyzer.ts +175 -1
- package/src/analyses/ImportAnalyzer.ts +15 -49
- package/src/analyses/ReflectControllerAnalyzer.ts +1 -1
- package/src/analyses/ReflectHttpOperationAnalyzer.ts +1 -1
- package/src/analyses/ReflectHttpOperationExceptionAnalyzer.ts +24 -6
- package/src/analyses/ReflectHttpOperationParameterAnalyzer.ts +3 -3
- package/src/analyses/ReflectHttpOperationResponseAnalyzer.ts +14 -10
- package/src/analyses/ReflectWebSocketOperationAnalyzer.ts +2 -2
- package/src/analyses/TypedHttpRouteAnalyzer.ts +354 -22
- package/src/decorators/OperationMetadata.ts +1 -1
- package/src/executable/internal/NestiaConfigLoader.ts +419 -53
- package/src/executable/internal/NestiaSdkCommand.ts +9 -10
- package/src/executable/sdk.ts +15 -4
- package/src/generates/CloneGenerator.ts +10 -10
- package/src/generates/SwaggerGenerator.ts +28 -9
- package/src/generates/internal/E2eFileProgrammer.ts +80 -43
- package/src/generates/internal/FilePrinter.ts +38 -37
- package/src/generates/internal/ImportDictionary.ts +18 -16
- package/src/generates/internal/SdkAliasCollection.ts +41 -40
- package/src/generates/internal/SdkDistributionComposer.ts +21 -8
- package/src/generates/internal/SdkFileProgrammer.ts +7 -5
- package/src/generates/internal/SdkHttpCloneProgrammer.ts +10 -10
- package/src/generates/internal/SdkHttpCloneReferencer.ts +6 -6
- package/src/generates/internal/SdkHttpFunctionProgrammer.ts +101 -78
- package/src/generates/internal/SdkHttpNamespaceProgrammer.ts +153 -145
- package/src/generates/internal/SdkHttpParameterProgrammer.ts +20 -33
- package/src/generates/internal/SdkHttpRouteProgrammer.ts +2 -2
- package/src/generates/internal/SdkHttpSimulationProgrammer.ts +88 -86
- package/src/generates/internal/SdkTypeProgrammer.ts +93 -99
- package/src/generates/internal/SdkTypeTagProgrammer.ts +12 -12
- package/src/generates/internal/SdkWebSocketNamespaceProgrammer.ts +128 -118
- package/src/generates/internal/SdkWebSocketParameterProgrammer.ts +15 -13
- package/src/generates/internal/SdkWebSocketRouteProgrammer.ts +133 -112
- package/src/generates/internal/SwaggerOperationComposer.ts +1 -1
- package/src/generates/internal/SwaggerOperationParameterComposer.ts +10 -9
- package/src/generates/internal/SwaggerOperationResponseComposer.ts +1 -1
- package/src/internal/legacy.ts +492 -0
- package/src/structures/INestiaProject.ts +0 -3
- package/src/{transformers → structures}/IOperationMetadata.ts +2 -7
- package/src/structures/IReflectHttpOperationException.ts +1 -1
- package/src/structures/IReflectHttpOperationParameter.ts +1 -1
- package/src/structures/IReflectHttpOperationSuccess.ts +1 -1
- package/src/structures/IReflectOperationError.ts +1 -1
- package/src/structures/IReflectWebSocketOperation.ts +2 -2
- package/src/structures/ITypedApplication.ts +1 -1
- package/src/structures/ITypedHttpRouteException.ts +1 -1
- package/src/structures/ITypedHttpRouteParameter.ts +1 -1
- package/src/structures/ITypedHttpRouteSuccess.ts +1 -1
- package/src/structures/ITypedWebSocketRoute.ts +2 -2
- package/src/transform.ts +68 -7
- package/src/utils/TsConfigReader.ts +108 -0
- package/src/utils/TtscExecutor.ts +63 -0
- package/src/validators/HttpHeadersValidator.ts +8 -37
- package/src/validators/HttpQueryValidator.ts +8 -37
- package/src/{transformers → validators}/TextPlainValidator.ts +2 -2
- package/lib/analyses/DtoAnalyzer.d.ts +0 -21
- package/lib/analyses/DtoAnalyzer.js +0 -219
- package/lib/analyses/DtoAnalyzer.js.map +0 -1
- package/lib/analyses/ExceptionAnalyzer.d.ts +0 -0
- package/lib/analyses/ExceptionAnalyzer.js +0 -2
- package/lib/analyses/ExceptionAnalyzer.js.map +0 -1
- package/lib/analyses/GenericAnalyzer.d.ts +0 -4
- package/lib/analyses/GenericAnalyzer.js +0 -42
- package/lib/analyses/GenericAnalyzer.js.map +0 -1
- package/lib/structures/IReflectApplication.d.ts +0 -6
- package/lib/structures/IReflectApplication.js +0 -3
- package/lib/structures/IReflectApplication.js.map +0 -1
- package/lib/structures/MethodType.d.ts +0 -4
- package/lib/structures/MethodType.js +0 -8
- package/lib/structures/MethodType.js.map +0 -1
- package/lib/structures/ParamCategory.d.ts +0 -1
- package/lib/structures/ParamCategory.js +0 -3
- package/lib/structures/ParamCategory.js.map +0 -1
- package/lib/structures/TypeEntry.d.ts +0 -9
- package/lib/structures/TypeEntry.js +0 -21
- package/lib/structures/TypeEntry.js.map +0 -1
- package/lib/transformers/IOperationMetadata.js.map +0 -1
- package/lib/transformers/ISdkOperationTransformerContext.d.ts +0 -7
- package/lib/transformers/ISdkOperationTransformerContext.js +0 -3
- package/lib/transformers/ISdkOperationTransformerContext.js.map +0 -1
- package/lib/transformers/SdkOperationProgrammer.d.ts +0 -15
- package/lib/transformers/SdkOperationProgrammer.js +0 -186
- package/lib/transformers/SdkOperationProgrammer.js.map +0 -1
- package/lib/transformers/SdkOperationTransformer.d.ts +0 -4
- package/lib/transformers/SdkOperationTransformer.js +0 -128
- package/lib/transformers/SdkOperationTransformer.js.map +0 -1
- package/lib/transformers/TextPlainValidator.js.map +0 -1
- package/lib/utils/MetadataUtil.d.ts +0 -4
- package/lib/utils/MetadataUtil.js +0 -34
- package/lib/utils/MetadataUtil.js.map +0 -1
- package/lib/utils/StripEnums.d.ts +0 -3
- package/lib/utils/StripEnums.js +0 -3
- package/lib/utils/StripEnums.js.map +0 -1
- package/lib/utils/TypeLiteralExpression.d.ts +0 -0
- package/lib/utils/TypeLiteralExpression.js +0 -2
- package/lib/utils/TypeLiteralExpression.js.map +0 -1
- package/src/analyses/DtoAnalyzer.ts +0 -260
- package/src/analyses/ExceptionAnalyzer.ts +0 -154
- package/src/analyses/GenericAnalyzer.ts +0 -49
- package/src/structures/IReflectApplication.ts +0 -8
- package/src/structures/MethodType.ts +0 -5
- package/src/structures/ParamCategory.ts +0 -1
- package/src/structures/TypeEntry.ts +0 -22
- package/src/transformers/ISdkOperationTransformerContext.ts +0 -8
- package/src/transformers/SdkOperationProgrammer.ts +0 -240
- package/src/transformers/SdkOperationTransformer.ts +0 -248
- package/src/utils/MetadataUtil.ts +0 -26
- package/src/utils/StripEnums.ts +0 -5
- package/src/utils/TypeLiteralExpression.ts +0 -0
- /package/lib/{transformers → structures}/IOperationMetadata.js +0 -0
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
// nestia-internal namespace of utility functions that fill the surface
|
|
2
|
+
// the legacy `@typia/core` 12.x package exposed at JS runtime. typia v13
|
|
3
|
+
// dropped that package because the equivalent logic lives in the Go-side
|
|
4
|
+
// transform; the nestia native transform now embeds the pre-computed
|
|
5
|
+
// results next to each metadata blob (see `packages/core/native/cmd/
|
|
6
|
+
// ttsc-nestia/sdk_transform.go`), and the helpers here are thin
|
|
7
|
+
// consumers — no runtime class wrapping, no vendored fork.
|
|
8
|
+
//
|
|
9
|
+
// `MetadataComponents.from` is the only utility that performs a real
|
|
10
|
+
// runtime transformation: it walks the aggregated `IMetadataComponents`
|
|
11
|
+
// and indexes each entry by name so the analyzer can resolve
|
|
12
|
+
// cross-reference lookups in O(1). Everything else either reads a
|
|
13
|
+
// pre-baked field or short-circuits because typia's compile-time
|
|
14
|
+
// transform already enforces the invariant.
|
|
15
|
+
|
|
16
|
+
import type {
|
|
17
|
+
IJsonSchemaCollection,
|
|
18
|
+
IMetadataComponents,
|
|
19
|
+
IMetadataSchema,
|
|
20
|
+
IMetadataTypeTag,
|
|
21
|
+
OpenApi,
|
|
22
|
+
} from "@typia/interface";
|
|
23
|
+
|
|
24
|
+
// Module augmentation: typia v13's `IReference` carries only a symbolic
|
|
25
|
+
// `name` + tags, but `MetadataSchema.from(plain, dictionary)` mutates
|
|
26
|
+
// each reference to also hold the resolved target type so downstream
|
|
27
|
+
// sdk code can keep its `ref.type!.value` / `ref.type!.elements` access
|
|
28
|
+
// pattern from the legacy `@typia/core` `MetadataArray` / `MetadataTuple`
|
|
29
|
+
// classes. The field is optional because it is only populated after a
|
|
30
|
+
// `MetadataSchema.from` walk against a dictionary.
|
|
31
|
+
declare module "@typia/interface" {
|
|
32
|
+
namespace IMetadataSchema {
|
|
33
|
+
interface IReference {
|
|
34
|
+
type?: IArrayType | ITupleType | IObjectType | IAliasType;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Plain `IMetadataSchema` augmented with the fields the nestia transform
|
|
41
|
+
* pre-bakes. `size`, `name`, and `empty` replace the methods the legacy
|
|
42
|
+
* `MetadataSchema` class exposed; `jsonSchema` is the OpenAPI 3.1
|
|
43
|
+
* conversion typia's Go-side produces but does not expose to JS at
|
|
44
|
+
* runtime.
|
|
45
|
+
*
|
|
46
|
+
* Fields are declared optional so that nested `IMetadataSchema` values
|
|
47
|
+
* (`metadata.rest`, `metadata.escaped.original`, `IObjectType.value`,
|
|
48
|
+
* …) — which are not top-level route inputs and therefore do not carry
|
|
49
|
+
* the pre-baked overlay — still satisfy the type when passed through
|
|
50
|
+
* legacy utilities. The utilities read the fields via the optional
|
|
51
|
+
* accessor and fall back when absent.
|
|
52
|
+
*/
|
|
53
|
+
export interface IReflectMetadata extends IMetadataSchema {
|
|
54
|
+
size?: number;
|
|
55
|
+
name?: string;
|
|
56
|
+
empty?: boolean;
|
|
57
|
+
jsonSchema?: IReflectJsonSchema;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface IReflectJsonSchema {
|
|
61
|
+
version: "3.0" | "3.1";
|
|
62
|
+
components: OpenApi.IComponents;
|
|
63
|
+
schema: OpenApi.IJsonSchema;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Cross-reference dictionary produced by `MetadataComponents.from`. Each
|
|
68
|
+
* map is keyed by the entry's `.name`, matching the lookup pattern the
|
|
69
|
+
* legacy `MetadataComponents.dictionary` getter offered.
|
|
70
|
+
*/
|
|
71
|
+
export interface IMetadataDictionary {
|
|
72
|
+
objects: Map<string, IMetadataSchema.IObjectType>;
|
|
73
|
+
aliases: Map<string, IMetadataSchema.IAliasType>;
|
|
74
|
+
arrays: Map<string, IMetadataSchema.IArrayType>;
|
|
75
|
+
tuples: Map<string, IMetadataSchema.ITupleType>;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// ---------------------------------------------------------------------
|
|
79
|
+
// Type aliases — the legacy class names ↔ typia v13 plain interfaces.
|
|
80
|
+
// ---------------------------------------------------------------------
|
|
81
|
+
|
|
82
|
+
export type MetadataSchema = IMetadataSchema;
|
|
83
|
+
export type MetadataComponents = IMetadataComponents & {
|
|
84
|
+
dictionary: IMetadataDictionary;
|
|
85
|
+
};
|
|
86
|
+
export type MetadataAliasType = IMetadataSchema.IAliasType;
|
|
87
|
+
export type MetadataArrayType = IMetadataSchema.IArrayType;
|
|
88
|
+
export type MetadataTupleType = IMetadataSchema.ITupleType;
|
|
89
|
+
export type MetadataObjectType = IMetadataSchema.IObjectType;
|
|
90
|
+
export type MetadataAtomic = IMetadataSchema.IAtomic;
|
|
91
|
+
/**
|
|
92
|
+
* Flattened constant-value shape: typia v13 splits `IConstant.IValue<T>` by
|
|
93
|
+
* the atomic discriminator, but sdk's literal writer just needs the runtime
|
|
94
|
+
* `value` payload, so collapse the union to a single ergonomic shape.
|
|
95
|
+
*/
|
|
96
|
+
export interface MetadataConstantValue {
|
|
97
|
+
value: string | number | bigint | boolean;
|
|
98
|
+
tags: IMetadataTypeTag[][];
|
|
99
|
+
}
|
|
100
|
+
export type MetadataEscaped = IMetadataSchema.IEscaped;
|
|
101
|
+
export type MetadataProperty = IMetadataSchema.IProperty;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Reference to a named array/tuple/object/alias type. typia v13's
|
|
105
|
+
* plain `IReference` carries only the symbolic `name` + tags; the
|
|
106
|
+
* legacy class additionally exposed `.type` as a getter that resolved
|
|
107
|
+
* against the dictionary. `MetadataSchema.from` walks the metadata
|
|
108
|
+
* tree once and attaches the resolved `.type` field so downstream
|
|
109
|
+
* sdk code can keep its `ref.type` access pattern.
|
|
110
|
+
*/
|
|
111
|
+
export type MetadataArray = IMetadataSchema.IReference & {
|
|
112
|
+
type: MetadataArrayType;
|
|
113
|
+
};
|
|
114
|
+
export type MetadataTuple = IMetadataSchema.IReference & {
|
|
115
|
+
type: MetadataTupleType;
|
|
116
|
+
};
|
|
117
|
+
export type MetadataObject = IMetadataSchema.IReference & {
|
|
118
|
+
type: MetadataObjectType;
|
|
119
|
+
};
|
|
120
|
+
export type MetadataAlias = IMetadataSchema.IReference & {
|
|
121
|
+
type: MetadataAliasType;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
// ---------------------------------------------------------------------
|
|
125
|
+
// Metadata utility functions — read pre-baked fields, no class wrapping.
|
|
126
|
+
// ---------------------------------------------------------------------
|
|
127
|
+
|
|
128
|
+
/** `MetadataSchema.size()` → reads the pre-baked `size` field. */
|
|
129
|
+
export const sizeOf = (m: IMetadataSchema): number =>
|
|
130
|
+
(m as IReflectMetadata).size ?? 0;
|
|
131
|
+
|
|
132
|
+
/** `MetadataSchema.getName()` → reads the pre-baked `name` field. */
|
|
133
|
+
export const nameOf = (m: IMetadataSchema): string =>
|
|
134
|
+
(m as IReflectMetadata).name ?? "";
|
|
135
|
+
|
|
136
|
+
/** `MetadataSchema.empty()` → reads the pre-baked `empty` field. */
|
|
137
|
+
export const emptyOf = (m: IMetadataSchema): boolean =>
|
|
138
|
+
(m as IReflectMetadata).empty ?? false;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Equivalent of the legacy `MetadataSchema.isSoleLiteral()` method:
|
|
142
|
+
* `true` when the schema represents exactly one constant literal value
|
|
143
|
+
* and nothing else. Used by sdk's type printer to fall back to literal
|
|
144
|
+
* emission instead of a union.
|
|
145
|
+
*/
|
|
146
|
+
export const isSoleLiteralOf = (m: IMetadataSchema): boolean => {
|
|
147
|
+
if (m.any) return false;
|
|
148
|
+
if (m.nullable) return false;
|
|
149
|
+
if (m.functions.length !== 0) return false;
|
|
150
|
+
if (m.atomics.length !== 0) return false;
|
|
151
|
+
if (m.templates.length !== 0) return false;
|
|
152
|
+
if (m.arrays.length !== 0) return false;
|
|
153
|
+
if (m.tuples.length !== 0) return false;
|
|
154
|
+
if (m.objects.length !== 0) return false;
|
|
155
|
+
if (m.aliases.length !== 0) return false;
|
|
156
|
+
if (m.natives.length !== 0) return false;
|
|
157
|
+
if (m.sets.length !== 0) return false;
|
|
158
|
+
if (m.maps.length !== 0) return false;
|
|
159
|
+
if (m.rest !== null) return false;
|
|
160
|
+
if (m.escaped !== null) return false;
|
|
161
|
+
if (m.constants.length !== 1) return false;
|
|
162
|
+
return m.constants[0]!.values.length === 1;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
// ---------------------------------------------------------------------
|
|
166
|
+
// `MetadataComponents.from(plain)` — namespace utility, not a class.
|
|
167
|
+
// ---------------------------------------------------------------------
|
|
168
|
+
|
|
169
|
+
export namespace MetadataComponents {
|
|
170
|
+
export const from = (plain: IMetadataComponents): MetadataComponents => {
|
|
171
|
+
const dictionary: IMetadataDictionary = {
|
|
172
|
+
objects: new Map(plain.objects.map((o) => [o.name, o])),
|
|
173
|
+
aliases: new Map(plain.aliases.map((a) => [a.name, a])),
|
|
174
|
+
arrays: new Map(plain.arrays.map((a) => [a.name, a])),
|
|
175
|
+
tuples: new Map(plain.tuples.map((t) => [t.name, t])),
|
|
176
|
+
};
|
|
177
|
+
return Object.assign({}, plain, { dictionary });
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// ---------------------------------------------------------------------
|
|
182
|
+
// `MetadataSchema.from(plain, _dictionary)` — passthrough.
|
|
183
|
+
// ---------------------------------------------------------------------
|
|
184
|
+
|
|
185
|
+
export namespace MetadataSchema {
|
|
186
|
+
/**
|
|
187
|
+
* Walks the metadata tree and attaches the resolved `.type` field to
|
|
188
|
+
* every `IReference` it encounters, using the supplied dictionary as
|
|
189
|
+
* the lookup index. This is idempotent — references whose `.type`
|
|
190
|
+
* has already been resolved are left alone — and mutates the input,
|
|
191
|
+
* matching the in-place resolution model `@typia/core` 12.x used.
|
|
192
|
+
*/
|
|
193
|
+
export const from = (
|
|
194
|
+
plain: IMetadataSchema,
|
|
195
|
+
dictionary?: IMetadataDictionary,
|
|
196
|
+
): IMetadataSchema => {
|
|
197
|
+
if (dictionary !== undefined) {
|
|
198
|
+
attachTypes(plain, dictionary, new WeakSet());
|
|
199
|
+
}
|
|
200
|
+
return plain;
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* The walk tracks visited *targets* (the IObjectType / IArrayType / …
|
|
206
|
+
* instances reached through the dictionary), not the wrapper schemas.
|
|
207
|
+
* Wrapper schemas are reconstructed on the JS side and are not shared
|
|
208
|
+
* across recursive references, so a `visited<IMetadataSchema>` set never
|
|
209
|
+
* matches and the walk would recurse forever on cycles like
|
|
210
|
+
* `interface Node { children: Node[] }`.
|
|
211
|
+
*/
|
|
212
|
+
const attachTypes = (
|
|
213
|
+
schema: IMetadataSchema | null | undefined,
|
|
214
|
+
dict: IMetadataDictionary,
|
|
215
|
+
visited: WeakSet<object>,
|
|
216
|
+
): void => {
|
|
217
|
+
if (schema === null || schema === undefined) return;
|
|
218
|
+
attachReferences(schema.arrays, dict.arrays, visited, (target) =>
|
|
219
|
+
attachTypes(target.value, dict, visited),
|
|
220
|
+
);
|
|
221
|
+
attachReferences(schema.tuples, dict.tuples, visited, (target) => {
|
|
222
|
+
for (const elem of target.elements) attachTypes(elem, dict, visited);
|
|
223
|
+
});
|
|
224
|
+
attachReferences(schema.objects, dict.objects, visited, (target) => {
|
|
225
|
+
for (const prop of target.properties) attachTypes(prop.value, dict, visited);
|
|
226
|
+
});
|
|
227
|
+
attachReferences(schema.aliases, dict.aliases, visited, (target) =>
|
|
228
|
+
attachTypes(target.value, dict, visited),
|
|
229
|
+
);
|
|
230
|
+
for (const fn of schema.functions ?? []) {
|
|
231
|
+
for (const param of fn.parameters) attachTypes(param.type, dict, visited);
|
|
232
|
+
attachTypes(fn.output, dict, visited);
|
|
233
|
+
}
|
|
234
|
+
for (const set of schema.sets ?? []) attachTypes(set.value, dict, visited);
|
|
235
|
+
for (const map of schema.maps ?? []) {
|
|
236
|
+
attachTypes(map.key, dict, visited);
|
|
237
|
+
attachTypes(map.value, dict, visited);
|
|
238
|
+
}
|
|
239
|
+
if (schema.rest) attachTypes(schema.rest, dict, visited);
|
|
240
|
+
if (schema.escaped) {
|
|
241
|
+
attachTypes(schema.escaped.original, dict, visited);
|
|
242
|
+
attachTypes(schema.escaped.returns, dict, visited);
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
const attachReferences = <Target extends { name: string }>(
|
|
247
|
+
refs: ReadonlyArray<IMetadataSchema.IReference> | undefined,
|
|
248
|
+
index: Map<string, Target>,
|
|
249
|
+
visited: WeakSet<object>,
|
|
250
|
+
walk: (target: Target) => void,
|
|
251
|
+
): void => {
|
|
252
|
+
if (!refs) return;
|
|
253
|
+
for (const ref of refs) {
|
|
254
|
+
const mutable = ref as IMetadataSchema.IReference & { type?: Target };
|
|
255
|
+
if (mutable.type === undefined) {
|
|
256
|
+
const target = index.get(ref.name);
|
|
257
|
+
if (target !== undefined)
|
|
258
|
+
(mutable as { type?: Target }).type = target;
|
|
259
|
+
}
|
|
260
|
+
if (mutable.type !== undefined && visited.has(mutable.type) === false) {
|
|
261
|
+
visited.add(mutable.type);
|
|
262
|
+
walk(mutable.type);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
// ---------------------------------------------------------------------
|
|
268
|
+
// Validators — the typia native transform already enforces most of the
|
|
269
|
+
// invariants the legacy `@typia/core` 12.x helpers re-checked at runtime,
|
|
270
|
+
// but a few JSON-serialization constraints (bare `bigint` payloads, etc.)
|
|
271
|
+
// are SDK-policy choices that the SDK still has to flag itself.
|
|
272
|
+
// ---------------------------------------------------------------------
|
|
273
|
+
|
|
274
|
+
export namespace MetadataFactory {
|
|
275
|
+
export interface IExplore {
|
|
276
|
+
object: IMetadataSchema.IObjectType | null;
|
|
277
|
+
property: string | null;
|
|
278
|
+
parameter: string | null;
|
|
279
|
+
output: boolean;
|
|
280
|
+
}
|
|
281
|
+
export interface IError {
|
|
282
|
+
name: string;
|
|
283
|
+
explore: IExplore;
|
|
284
|
+
messages: string[];
|
|
285
|
+
}
|
|
286
|
+
export type Validator = (props: {
|
|
287
|
+
metadata: IMetadataSchema;
|
|
288
|
+
explore: IExplore;
|
|
289
|
+
}) => string[];
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Walks the metadata tree once, invoking the provided validator on each
|
|
293
|
+
* visited node, and accumulates the produced messages into `IError`
|
|
294
|
+
* entries. The walk skips back-edges through references so cyclic
|
|
295
|
+
* structures terminate. This is a faithful reimplementation of the
|
|
296
|
+
* legacy `@typia/core` walker, kept lean: the typia native transform
|
|
297
|
+
* has already validated structural invariants, so the validator is only
|
|
298
|
+
* called for SDK-side policy checks (JSON-serializability, query/header
|
|
299
|
+
* atomic-only rules, …).
|
|
300
|
+
*/
|
|
301
|
+
export const validate = (props: {
|
|
302
|
+
options?: unknown;
|
|
303
|
+
functor: Validator;
|
|
304
|
+
metadata: IMetadataSchema;
|
|
305
|
+
}): IError[] => {
|
|
306
|
+
const errors: IError[] = [];
|
|
307
|
+
// Tracks visited *targets* (IObjectType / IArrayType / IAliasType /
|
|
308
|
+
// ITupleType) so recursive schemas like `interface Node { children:
|
|
309
|
+
// Node[] }` terminate. Wrapper IMetadataSchema instances are not
|
|
310
|
+
// shared across recursive references, so they cannot stand in for
|
|
311
|
+
// the visit marker.
|
|
312
|
+
const visited = new WeakSet<object>();
|
|
313
|
+
const visit = (metadata: IMetadataSchema, explore: IExplore): void => {
|
|
314
|
+
const messages = props.functor({ metadata, explore });
|
|
315
|
+
if (messages.length)
|
|
316
|
+
errors.push({ name: nameOf(metadata), explore, messages });
|
|
317
|
+
for (const obj of metadata.objects) {
|
|
318
|
+
const type = (obj as IMetadataSchema.IReference & {
|
|
319
|
+
type?: IMetadataSchema.IObjectType;
|
|
320
|
+
}).type;
|
|
321
|
+
if (type === undefined || visited.has(type)) continue;
|
|
322
|
+
visited.add(type);
|
|
323
|
+
for (const prop of type.properties)
|
|
324
|
+
visit(prop.value, {
|
|
325
|
+
object: type,
|
|
326
|
+
property: nameOf(prop.key) || String(prop.key.constants[0]?.values[0]?.value ?? ""),
|
|
327
|
+
parameter: null,
|
|
328
|
+
output: explore.output,
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
for (const arr of metadata.arrays) {
|
|
332
|
+
const type = (arr as IMetadataSchema.IReference & {
|
|
333
|
+
type?: IMetadataSchema.IArrayType;
|
|
334
|
+
}).type;
|
|
335
|
+
if (type === undefined || visited.has(type)) continue;
|
|
336
|
+
visited.add(type);
|
|
337
|
+
visit(type.value, explore);
|
|
338
|
+
}
|
|
339
|
+
for (const tuple of metadata.tuples) {
|
|
340
|
+
const type = (tuple as IMetadataSchema.IReference & {
|
|
341
|
+
type?: IMetadataSchema.ITupleType;
|
|
342
|
+
}).type;
|
|
343
|
+
if (type === undefined || visited.has(type)) continue;
|
|
344
|
+
visited.add(type);
|
|
345
|
+
for (const elem of type.elements) visit(elem, explore);
|
|
346
|
+
}
|
|
347
|
+
for (const alias of metadata.aliases) {
|
|
348
|
+
const type = (alias as IMetadataSchema.IReference & {
|
|
349
|
+
type?: IMetadataSchema.IAliasType;
|
|
350
|
+
}).type;
|
|
351
|
+
if (type === undefined || visited.has(type)) continue;
|
|
352
|
+
visited.add(type);
|
|
353
|
+
visit(type.value, explore);
|
|
354
|
+
}
|
|
355
|
+
if (metadata.escaped) {
|
|
356
|
+
visit(metadata.escaped.original, explore);
|
|
357
|
+
visit(metadata.escaped.returns, explore);
|
|
358
|
+
}
|
|
359
|
+
};
|
|
360
|
+
visit(props.metadata, {
|
|
361
|
+
object: null,
|
|
362
|
+
property: null,
|
|
363
|
+
parameter: null,
|
|
364
|
+
output: false,
|
|
365
|
+
});
|
|
366
|
+
return errors;
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
export namespace JsonMetadataFactory {
|
|
371
|
+
/**
|
|
372
|
+
* Rejects metadata that cannot be losslessly JSON-serialized. The typia
|
|
373
|
+
* native runtime already screens out most structurally invalid types, so
|
|
374
|
+
* this only adds the JSON-policy bans the legacy `@typia/core` walker
|
|
375
|
+
* enforced — bare `bigint` payloads, function-typed properties, and
|
|
376
|
+
* `Map` / `Set` containers that have no canonical JSON representation.
|
|
377
|
+
*/
|
|
378
|
+
export const validate: MetadataFactory.Validator = (props) => {
|
|
379
|
+
const messages: string[] = [];
|
|
380
|
+
if (props.metadata.atomics.some((a) => a.type === "bigint"))
|
|
381
|
+
messages.push("does not allow bigint type in JSON.");
|
|
382
|
+
if (props.metadata.functions.length !== 0)
|
|
383
|
+
messages.push("does not allow function type in JSON.");
|
|
384
|
+
if (props.metadata.sets.length !== 0)
|
|
385
|
+
messages.push("does not allow Set type in JSON.");
|
|
386
|
+
if (props.metadata.maps.length !== 0)
|
|
387
|
+
messages.push("does not allow Map type in JSON.");
|
|
388
|
+
return messages;
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
export namespace HttpQueryProgrammer {
|
|
393
|
+
export const validate: MetadataFactory.Validator = () => [];
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
export namespace HttpHeadersProgrammer {
|
|
397
|
+
export const validate: MetadataFactory.Validator = () => [];
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
export namespace HttpParameterProgrammer {
|
|
401
|
+
export const validate: MetadataFactory.Validator = () => [];
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
export namespace HttpFormDataProgrammer {
|
|
405
|
+
export const validate: MetadataFactory.Validator = () => [];
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
// ---------------------------------------------------------------------
|
|
409
|
+
// `JsonSchemasProgrammer.writeSchemas` — consumes the per-metadata
|
|
410
|
+
// pre-baked `jsonSchema` field the nestia transform emits.
|
|
411
|
+
// ---------------------------------------------------------------------
|
|
412
|
+
|
|
413
|
+
export namespace JsonSchemasProgrammer {
|
|
414
|
+
/**
|
|
415
|
+
* Consumes the per-metadata `jsonSchema` field the nestia transform
|
|
416
|
+
* pre-bakes. Top-level route metadata (success / parameter / exception)
|
|
417
|
+
* always carries a baked schema; for nested metadata (object property
|
|
418
|
+
* values reached by the decomposed-query path), the bake is absent and
|
|
419
|
+
* this function falls back to a minimal JS-side converter that handles
|
|
420
|
+
* the schema shapes decompose actually emits — atomics, constants,
|
|
421
|
+
* templates, arrays of those, named references — without re-implementing
|
|
422
|
+
* the typia native programmer wholesale.
|
|
423
|
+
*/
|
|
424
|
+
export const writeSchemas = (props: {
|
|
425
|
+
version: "3.0" | "3.1";
|
|
426
|
+
metadatas: readonly IMetadataSchema[];
|
|
427
|
+
}): IJsonSchemaCollection => {
|
|
428
|
+
const components: OpenApi.IComponents = { schemas: {} };
|
|
429
|
+
const schemas: OpenApi.IJsonSchema[] = [];
|
|
430
|
+
for (const m of props.metadatas) {
|
|
431
|
+
const baked = (m as IReflectMetadata).jsonSchema;
|
|
432
|
+
if (baked !== undefined) {
|
|
433
|
+
schemas.push(baked.schema);
|
|
434
|
+
Object.assign(
|
|
435
|
+
(components.schemas ??= {}),
|
|
436
|
+
baked.components.schemas ?? {},
|
|
437
|
+
);
|
|
438
|
+
} else {
|
|
439
|
+
schemas.push(schemaFromMetadata(m));
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
return {
|
|
443
|
+
version: props.version,
|
|
444
|
+
components,
|
|
445
|
+
schemas,
|
|
446
|
+
} as IJsonSchemaCollection;
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
const schemaFromMetadata = (m: IMetadataSchema): OpenApi.IJsonSchema => {
|
|
451
|
+
const union: OpenApi.IJsonSchema[] = [];
|
|
452
|
+
if (m.nullable) union.push({ type: "null" } as OpenApi.IJsonSchema);
|
|
453
|
+
for (const atomic of m.atomics)
|
|
454
|
+
union.push(schemaFromAtomic(atomic) as OpenApi.IJsonSchema);
|
|
455
|
+
for (const constant of m.constants)
|
|
456
|
+
for (const value of constant.values)
|
|
457
|
+
union.push({
|
|
458
|
+
const: value.value,
|
|
459
|
+
} as unknown as OpenApi.IJsonSchema);
|
|
460
|
+
for (const tpl of m.templates) {
|
|
461
|
+
union.push({ type: "string" } as OpenApi.IJsonSchema);
|
|
462
|
+
void tpl;
|
|
463
|
+
}
|
|
464
|
+
for (const arr of m.arrays) {
|
|
465
|
+
const inner = (arr as IMetadataSchema.IReference & {
|
|
466
|
+
type?: IMetadataSchema.IArrayType;
|
|
467
|
+
}).type;
|
|
468
|
+
union.push({
|
|
469
|
+
type: "array",
|
|
470
|
+
items: inner ? schemaFromMetadata(inner.value) : ({} as OpenApi.IJsonSchema),
|
|
471
|
+
} as unknown as OpenApi.IJsonSchema);
|
|
472
|
+
}
|
|
473
|
+
for (const obj of m.objects)
|
|
474
|
+
union.push({
|
|
475
|
+
$ref: `#/components/schemas/${obj.name}`,
|
|
476
|
+
} as unknown as OpenApi.IJsonSchema);
|
|
477
|
+
for (const alias of m.aliases)
|
|
478
|
+
union.push({
|
|
479
|
+
$ref: `#/components/schemas/${alias.name}`,
|
|
480
|
+
} as unknown as OpenApi.IJsonSchema);
|
|
481
|
+
if (m.any || union.length === 0) return {} as OpenApi.IJsonSchema;
|
|
482
|
+
if (union.length === 1) return union[0]!;
|
|
483
|
+
return { oneOf: union } as unknown as OpenApi.IJsonSchema;
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
const schemaFromAtomic = (atomic: IMetadataSchema.IAtomic): unknown => {
|
|
487
|
+
if (atomic.type === "boolean") return { type: "boolean" };
|
|
488
|
+
if (atomic.type === "bigint" || atomic.type === "number")
|
|
489
|
+
return { type: atomic.type === "bigint" ? "integer" : "number" };
|
|
490
|
+
if (atomic.type === "string") return { type: "string" };
|
|
491
|
+
return {};
|
|
492
|
+
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import ts from "typescript";
|
|
2
|
-
|
|
3
1
|
import { INestiaConfig } from "../INestiaConfig";
|
|
4
2
|
import { INestiaSdkInput } from "./INestiaSdkInput";
|
|
5
3
|
import { IReflectOperationError } from "./IReflectOperationError";
|
|
@@ -7,7 +5,6 @@ import { IReflectOperationError } from "./IReflectOperationError";
|
|
|
7
5
|
export interface INestiaProject {
|
|
8
6
|
config: INestiaConfig;
|
|
9
7
|
input: INestiaSdkInput;
|
|
10
|
-
checker: ts.TypeChecker;
|
|
11
8
|
errors: IReflectOperationError[];
|
|
12
9
|
warnings: IReflectOperationError[];
|
|
13
10
|
}
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
} from "@typia/interface";
|
|
6
6
|
import { IJsDocTagInfo } from "typia";
|
|
7
7
|
|
|
8
|
-
import { IReflectImport } from "
|
|
9
|
-
import { IReflectType } from "
|
|
8
|
+
import { IReflectImport } from "./IReflectImport";
|
|
9
|
+
import { IReflectType } from "./IReflectType";
|
|
10
10
|
|
|
11
11
|
export interface IOperationMetadata {
|
|
12
12
|
parameters: IOperationMetadata.IParameter[];
|
|
@@ -28,11 +28,6 @@ export namespace IOperationMetadata {
|
|
|
28
28
|
primitive: ValidationPipe<ISchema, IError>;
|
|
29
29
|
resolved: ValidationPipe<ISchema, IError>;
|
|
30
30
|
}
|
|
31
|
-
export interface IException {
|
|
32
|
-
type: IReflectType | null;
|
|
33
|
-
imports: IReflectImport[];
|
|
34
|
-
primitive: ValidationPipe<ISchema, IError>;
|
|
35
|
-
}
|
|
36
31
|
|
|
37
32
|
export interface ISchema {
|
|
38
33
|
components: IMetadataComponents;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VERSION_NEUTRAL } from "@nestjs/common";
|
|
2
|
-
import
|
|
2
|
+
import { IJsDocTagInfo } from "typia";
|
|
3
3
|
|
|
4
4
|
import { IReflectImport } from "./IReflectImport";
|
|
5
5
|
import { IReflectWebSocketOperationParameter } from "./IReflectWebSocketOperationParameter";
|
|
@@ -13,5 +13,5 @@ export interface IReflectWebSocketOperation {
|
|
|
13
13
|
parameters: IReflectWebSocketOperationParameter[];
|
|
14
14
|
imports: IReflectImport[];
|
|
15
15
|
description: string | null;
|
|
16
|
-
jsDocTags:
|
|
16
|
+
jsDocTags: IJsDocTagInfo[];
|
|
17
17
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VERSION_NEUTRAL } from "@nestjs/common";
|
|
2
|
-
import
|
|
2
|
+
import { IJsDocTagInfo } from "typia";
|
|
3
3
|
|
|
4
4
|
import { IReflectController } from "./IReflectController";
|
|
5
5
|
import { IReflectImport } from "./IReflectImport";
|
|
@@ -20,5 +20,5 @@ export interface ITypedWebSocketRoute {
|
|
|
20
20
|
driver: ITypedWebSocketRouteParameter.IDriver | null;
|
|
21
21
|
imports: IReflectImport[];
|
|
22
22
|
description: string | null;
|
|
23
|
-
jsDocTags:
|
|
23
|
+
jsDocTags: IJsDocTagInfo[];
|
|
24
24
|
}
|