@nestia/sdk 14.0.0 → 14.0.2
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/README.md +1 -1
- package/assets/bundle/distribute/build-sdk.cjs +28 -0
- package/assets/bundle/distribute/package.json +7 -3
- package/assets/bundle/distribute/tsconfig.json +15 -105
- package/lib/INestiaConfig.d.ts +74 -34
- package/lib/NestiaSdkApplication.d.ts +60 -0
- package/lib/NestiaSdkApplication.js +121 -32
- package/lib/NestiaSdkApplication.js.map +1 -1
- package/lib/NestiaSwaggerComposer.d.ts +21 -0
- package/lib/NestiaSwaggerComposer.js +32 -13
- package/lib/NestiaSwaggerComposer.js.map +1 -1
- package/lib/analyses/AccessorAnalyzer.d.ts +26 -0
- package/lib/analyses/AccessorAnalyzer.js +26 -0
- package/lib/analyses/AccessorAnalyzer.js.map +1 -1
- package/lib/analyses/ConfigAnalyzer.d.ts +41 -0
- package/lib/analyses/ConfigAnalyzer.js +52 -77
- package/lib/analyses/ConfigAnalyzer.js.map +1 -1
- package/lib/analyses/ImportAnalyzer.d.ts +25 -0
- package/lib/analyses/ImportAnalyzer.js +25 -0
- package/lib/analyses/ImportAnalyzer.js.map +1 -1
- package/lib/analyses/ParameterNameAnalyzer.d.ts +44 -0
- package/lib/analyses/ParameterNameAnalyzer.js +63 -0
- package/lib/analyses/ParameterNameAnalyzer.js.map +1 -0
- package/lib/analyses/PathAnalyzer.d.ts +93 -1
- package/lib/analyses/PathAnalyzer.js +160 -23
- package/lib/analyses/PathAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectControllerAnalyzer.d.ts +32 -0
- package/lib/analyses/ReflectControllerAnalyzer.js +24 -1
- package/lib/analyses/ReflectControllerAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectHttpOperationAnalyzer.d.ts +29 -0
- package/lib/analyses/ReflectHttpOperationAnalyzer.js +35 -24
- package/lib/analyses/ReflectHttpOperationAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.d.ts +31 -0
- package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.js +21 -0
- package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectHttpOperationParameterAnalyzer.d.ts +31 -0
- package/lib/analyses/ReflectHttpOperationParameterAnalyzer.js +143 -23
- package/lib/analyses/ReflectHttpOperationParameterAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectHttpOperationResponseAnalyzer.d.ts +32 -0
- package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js +27 -2
- package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectMcpOperationAnalyzer.d.ts +29 -0
- package/lib/analyses/ReflectMcpOperationAnalyzer.js +35 -11
- package/lib/analyses/ReflectMcpOperationAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectMetadataAnalyzer.d.ts +47 -0
- package/lib/analyses/ReflectMetadataAnalyzer.js +47 -0
- package/lib/analyses/ReflectMetadataAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectWebSocketOperationAnalyzer.d.ts +29 -0
- package/lib/analyses/ReflectWebSocketOperationAnalyzer.js +27 -5
- package/lib/analyses/ReflectWebSocketOperationAnalyzer.js.map +1 -1
- package/lib/analyses/SecurityAnalyzer.d.ts +25 -0
- package/lib/analyses/SecurityAnalyzer.js +39 -19
- package/lib/analyses/SecurityAnalyzer.js.map +1 -1
- package/lib/analyses/SwaggerExampleAnalyzer.d.ts +31 -0
- package/lib/analyses/SwaggerExampleAnalyzer.js +36 -0
- package/lib/analyses/SwaggerExampleAnalyzer.js.map +1 -0
- package/lib/analyses/TypedHttpRouteAnalyzer.d.ts +41 -3
- package/lib/analyses/TypedHttpRouteAnalyzer.js +196 -172
- package/lib/analyses/TypedHttpRouteAnalyzer.js.map +1 -1
- package/lib/analyses/TypedMcpRouteAnalyzer.d.ts +29 -0
- package/lib/analyses/TypedMcpRouteAnalyzer.js +152 -20
- package/lib/analyses/TypedMcpRouteAnalyzer.js.map +1 -1
- package/lib/analyses/TypedWebSocketRouteAnalyzer.d.ts +19 -0
- package/lib/analyses/TypedWebSocketRouteAnalyzer.js +20 -1
- package/lib/analyses/TypedWebSocketRouteAnalyzer.js.map +1 -1
- package/lib/decorators/OperationMetadata.d.ts +6 -0
- package/lib/decorators/OperationMetadata.js +6 -0
- package/lib/decorators/OperationMetadata.js.map +1 -1
- package/lib/executable/internal/CommandParser.d.ts +19 -0
- package/lib/executable/internal/CommandParser.js +19 -0
- package/lib/executable/internal/CommandParser.js.map +1 -1
- package/lib/executable/internal/NestiaConfigLoader.d.ts +56 -0
- package/lib/executable/internal/NestiaConfigLoader.js +48 -42
- package/lib/executable/internal/NestiaConfigLoader.js.map +1 -1
- package/lib/executable/internal/NestiaSdkCommand.d.ts +60 -0
- package/lib/executable/internal/NestiaSdkCommand.js +95 -3
- package/lib/executable/internal/NestiaSdkCommand.js.map +1 -1
- package/lib/executable/internal/NestiaSdkWatcher.d.ts +81 -0
- package/lib/executable/internal/NestiaSdkWatcher.js +125 -41
- package/lib/executable/internal/NestiaSdkWatcher.js.map +1 -1
- package/lib/executable/internal/NestiaSwaggerWatch.d.ts +80 -0
- package/lib/executable/internal/NestiaSwaggerWatch.js +308 -0
- package/lib/executable/internal/NestiaSwaggerWatch.js.map +1 -0
- package/lib/executable/sdk.js +16 -1
- package/lib/executable/sdk.js.map +1 -1
- package/lib/factories/ExpressionFactory.d.ts +18 -0
- package/lib/factories/ExpressionFactory.js +21 -2
- package/lib/factories/ExpressionFactory.js.map +1 -1
- package/lib/factories/IdentifierFactory.d.ts +24 -0
- package/lib/factories/IdentifierFactory.js +24 -0
- package/lib/factories/IdentifierFactory.js.map +1 -1
- package/lib/factories/LiteralFactory.d.ts +22 -4
- package/lib/factories/LiteralFactory.js +33 -11
- package/lib/factories/LiteralFactory.js.map +1 -1
- package/lib/factories/StatementFactory.d.ts +28 -1
- package/lib/factories/StatementFactory.js +28 -1
- package/lib/factories/StatementFactory.js.map +1 -1
- package/lib/factories/TypeFactory.d.ts +24 -0
- package/lib/factories/TypeFactory.js +15 -0
- package/lib/factories/TypeFactory.js.map +1 -1
- package/lib/generates/CloneGenerator.d.ts +22 -0
- package/lib/generates/CloneGenerator.js +26 -5
- package/lib/generates/CloneGenerator.js.map +1 -1
- package/lib/generates/E2eGenerator.d.ts +19 -0
- package/lib/generates/E2eGenerator.js +19 -0
- package/lib/generates/E2eGenerator.js.map +1 -1
- package/lib/generates/SdkGenerator.d.ts +38 -0
- package/lib/generates/SdkGenerator.js +43 -5
- package/lib/generates/SdkGenerator.js.map +1 -1
- package/lib/generates/SwaggerGenerator.d.ts +36 -6
- package/lib/generates/SwaggerGenerator.js +190 -40
- package/lib/generates/SwaggerGenerator.js.map +1 -1
- package/lib/generates/internal/E2eFileProgrammer.d.ts +19 -0
- package/lib/generates/internal/E2eFileProgrammer.js +20 -1
- package/lib/generates/internal/E2eFileProgrammer.js.map +1 -1
- package/lib/generates/internal/FilePrinter.d.ts +57 -0
- package/lib/generates/internal/FilePrinter.js +74 -0
- package/lib/generates/internal/FilePrinter.js.map +1 -1
- package/lib/generates/internal/ImportDictionary.d.ts +93 -1
- package/lib/generates/internal/ImportDictionary.js +103 -2
- package/lib/generates/internal/ImportDictionary.js.map +1 -1
- package/lib/generates/internal/SdkAliasCollection.d.ts +121 -1
- package/lib/generates/internal/SdkAliasCollection.js +132 -11
- package/lib/generates/internal/SdkAliasCollection.js.map +1 -1
- package/lib/generates/internal/SdkDistributionComposer.d.ts +19 -0
- package/lib/generates/internal/SdkDistributionComposer.js +149 -52
- package/lib/generates/internal/SdkDistributionComposer.js.map +1 -1
- package/lib/generates/internal/SdkFileProgrammer.d.ts +18 -0
- package/lib/generates/internal/SdkFileProgrammer.js +101 -12
- package/lib/generates/internal/SdkFileProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpCloneProgrammer.d.ts +29 -0
- package/lib/generates/internal/SdkHttpCloneProgrammer.js +33 -0
- package/lib/generates/internal/SdkHttpCloneProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpCloneReferencer.d.ts +19 -0
- package/lib/generates/internal/SdkHttpCloneReferencer.js +78 -25
- package/lib/generates/internal/SdkHttpCloneReferencer.js.map +1 -1
- package/lib/generates/internal/SdkHttpFunctionProgrammer.d.ts +19 -0
- package/lib/generates/internal/SdkHttpFunctionProgrammer.js +40 -23
- package/lib/generates/internal/SdkHttpFunctionProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.d.ts +19 -0
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.js +46 -34
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpParameterProgrammer.d.ts +142 -1
- package/lib/generates/internal/SdkHttpParameterProgrammer.js +175 -6
- package/lib/generates/internal/SdkHttpParameterProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpRouteProgrammer.d.ts +20 -0
- package/lib/generates/internal/SdkHttpRouteProgrammer.js +36 -32
- package/lib/generates/internal/SdkHttpRouteProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpSimulationProgrammer.d.ts +38 -0
- package/lib/generates/internal/SdkHttpSimulationProgrammer.js +66 -18
- package/lib/generates/internal/SdkHttpSimulationProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkImportWizard.d.ts +63 -0
- package/lib/generates/internal/SdkImportWizard.js +63 -0
- package/lib/generates/internal/SdkImportWizard.js.map +1 -1
- package/lib/generates/internal/SdkMcpRouteProgrammer.d.ts +17 -2
- package/lib/generates/internal/SdkMcpRouteProgrammer.js +72 -24
- package/lib/generates/internal/SdkMcpRouteProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkPathTemplate.d.ts +36 -0
- package/lib/generates/internal/SdkPathTemplate.js +65 -0
- package/lib/generates/internal/SdkPathTemplate.js.map +1 -0
- package/lib/generates/internal/SdkRouteDirectory.d.ts +10 -0
- package/lib/generates/internal/SdkRouteDirectory.js +10 -0
- package/lib/generates/internal/SdkRouteDirectory.js.map +1 -1
- package/lib/generates/internal/SdkTypeProgrammer.d.ts +54 -1
- package/lib/generates/internal/SdkTypeProgrammer.js +111 -27
- package/lib/generates/internal/SdkTypeProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkTypeTagProgrammer.d.ts +53 -1
- package/lib/generates/internal/SdkTypeTagProgrammer.js +407 -67
- package/lib/generates/internal/SdkTypeTagProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkWebSocketCloneProgrammer.d.ts +40 -0
- package/lib/generates/internal/SdkWebSocketCloneProgrammer.js +149 -142
- package/lib/generates/internal/SdkWebSocketCloneProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.d.ts +19 -0
- package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js +46 -36
- package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkWebSocketParameterProgrammer.d.ts +114 -1
- package/lib/generates/internal/SdkWebSocketParameterProgrammer.js +120 -5
- package/lib/generates/internal/SdkWebSocketParameterProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkWebSocketRouteProgrammer.d.ts +18 -0
- package/lib/generates/internal/SdkWebSocketRouteProgrammer.js +75 -33
- package/lib/generates/internal/SdkWebSocketRouteProgrammer.js.map +1 -1
- package/lib/generates/internal/SwaggerDescriptionComposer.d.ts +42 -0
- package/lib/generates/internal/SwaggerDescriptionComposer.js +44 -1
- package/lib/generates/internal/SwaggerDescriptionComposer.js.map +1 -1
- package/lib/generates/internal/SwaggerOperationComposer.d.ts +18 -0
- package/lib/generates/internal/SwaggerOperationComposer.js +37 -8
- package/lib/generates/internal/SwaggerOperationComposer.js.map +1 -1
- package/lib/generates/internal/SwaggerOperationParameterComposer.d.ts +40 -1
- package/lib/generates/internal/SwaggerOperationParameterComposer.js +230 -25
- package/lib/generates/internal/SwaggerOperationParameterComposer.js.map +1 -1
- package/lib/generates/internal/SwaggerOperationResponseComposer.d.ts +21 -0
- package/lib/generates/internal/SwaggerOperationResponseComposer.js +58 -7
- package/lib/generates/internal/SwaggerOperationResponseComposer.js.map +1 -1
- package/lib/internal/legacy.d.ts +342 -31
- package/lib/internal/legacy.js +207 -31
- package/lib/internal/legacy.js.map +1 -1
- package/lib/structures/INestiaProject.d.ts +10 -0
- package/lib/structures/INestiaSdkInput.d.ts +30 -0
- package/lib/structures/IOperationMetadata.d.ts +77 -0
- package/lib/structures/IReflectController.d.ts +10 -0
- package/lib/structures/IReflectHttpOperation.d.ts +10 -0
- package/lib/structures/IReflectHttpOperationException.d.ts +13 -2
- package/lib/structures/IReflectHttpOperationParameter.d.ts +55 -3
- package/lib/structures/IReflectHttpOperationSuccess.d.ts +15 -3
- package/lib/structures/IReflectImport.d.ts +10 -0
- package/lib/structures/IReflectMcpOperation.d.ts +19 -0
- package/lib/structures/IReflectMcpOperationParameter.d.ts +9 -0
- package/lib/structures/IReflectOperationError.d.ts +28 -0
- package/lib/structures/IReflectOperationError.js +22 -2
- package/lib/structures/IReflectOperationError.js.map +1 -1
- package/lib/structures/IReflectType.d.ts +9 -0
- package/lib/structures/IReflectWebSocketOperation.d.ts +10 -0
- package/lib/structures/IReflectWebSocketOperationParameter.d.ts +55 -0
- package/lib/structures/ITypedApplication.d.ts +10 -0
- package/lib/structures/ITypedHttpRoute.d.ts +18 -0
- package/lib/structures/ITypedHttpRouteException.d.ts +13 -1
- package/lib/structures/ITypedHttpRouteParameter.d.ts +48 -1
- package/lib/structures/ITypedHttpRouteSuccess.d.ts +13 -1
- package/lib/structures/ITypedMcpRoute.d.ts +11 -0
- package/lib/structures/ITypedWebSocketRoute.d.ts +18 -0
- package/lib/transform.d.ts +6 -0
- package/lib/transform.js +6 -0
- package/lib/transform.js.map +1 -1
- package/lib/utils/ArrayUtil.d.ts +31 -1
- package/lib/utils/ArrayUtil.js +32 -11
- package/lib/utils/ArrayUtil.js.map +1 -1
- package/lib/utils/EmittedJavaScriptPatcher.d.ts +20 -0
- package/lib/utils/EmittedJavaScriptPatcher.js +65 -46
- package/lib/utils/EmittedJavaScriptPatcher.js.map +1 -1
- package/lib/utils/FileRetriever.d.ts +29 -0
- package/lib/utils/FileRetriever.js +29 -0
- package/lib/utils/FileRetriever.js.map +1 -1
- package/lib/utils/HttpResponseContentTypeUtil.d.ts +41 -0
- package/lib/utils/HttpResponseContentTypeUtil.js +31 -0
- package/lib/utils/HttpResponseContentTypeUtil.js.map +1 -1
- package/lib/utils/MapUtil.d.ts +64 -1
- package/lib/utils/MapUtil.js +24 -3
- package/lib/utils/MapUtil.js.map +1 -1
- package/lib/utils/PathUtil.d.ts +31 -0
- package/lib/utils/PathUtil.js +38 -0
- package/lib/utils/PathUtil.js.map +1 -1
- package/lib/utils/SdkBundlePath.d.ts +2 -0
- package/lib/utils/SdkBundlePath.js +10 -0
- package/lib/utils/SdkBundlePath.js.map +1 -0
- package/lib/utils/SdkInputFilter.d.ts +31 -0
- package/lib/utils/SdkInputFilter.js +115 -0
- package/lib/utils/SdkInputFilter.js.map +1 -0
- package/lib/utils/SourceFinder.d.ts +45 -0
- package/lib/utils/SourceFinder.js +74 -16
- package/lib/utils/SourceFinder.js.map +1 -1
- package/lib/utils/StringUtil.d.ts +77 -2
- package/lib/utils/StringUtil.js +166 -4
- package/lib/utils/StringUtil.js.map +1 -1
- package/lib/utils/TemporaryDirectory.d.ts +60 -0
- package/lib/utils/TemporaryDirectory.js +112 -0
- package/lib/utils/TemporaryDirectory.js.map +1 -0
- package/lib/utils/TsConfigReader.d.ts +42 -0
- package/lib/utils/TsConfigReader.js +98 -14
- package/lib/utils/TsConfigReader.js.map +1 -1
- package/lib/utils/TtscExecutor.d.ts +23 -1
- package/lib/utils/TtscExecutor.js +22 -0
- package/lib/utils/TtscExecutor.js.map +1 -1
- package/lib/utils/VersioningStrategy.d.ts +39 -2
- package/lib/utils/VersioningStrategy.js +46 -13
- package/lib/utils/VersioningStrategy.js.map +1 -1
- package/lib/validators/TextPlainValidator.d.ts +19 -0
- package/lib/validators/TextPlainValidator.js +19 -0
- package/lib/validators/TextPlainValidator.js.map +1 -1
- package/native/go.mod +1 -1
- package/native/go.sum +2 -2
- package/native/sdk/register.go +12 -2
- package/native/sdk/sdk_http_rules.go +210 -0
- package/native/sdk/sdk_metadata_json.go +79 -4
- package/native/sdk/sdk_transform.go +1157 -414
- package/package.json +8 -6
- package/src/INestiaConfig.ts +74 -34
- package/src/NestiaSdkApplication.ts +129 -41
- package/src/NestiaSwaggerComposer.ts +32 -14
- package/src/analyses/AccessorAnalyzer.ts +26 -0
- package/src/analyses/ConfigAnalyzer.ts +52 -90
- package/src/analyses/ImportAnalyzer.ts +25 -0
- package/src/analyses/ParameterNameAnalyzer.ts +75 -0
- package/src/analyses/PathAnalyzer.ts +167 -23
- package/src/analyses/ReflectControllerAnalyzer.ts +34 -1
- package/src/analyses/ReflectHttpOperationAnalyzer.ts +36 -14
- package/src/analyses/ReflectHttpOperationExceptionAnalyzer.ts +31 -0
- package/src/analyses/ReflectHttpOperationParameterAnalyzer.ts +153 -39
- package/src/analyses/ReflectHttpOperationResponseAnalyzer.ts +38 -7
- package/src/analyses/ReflectMcpOperationAnalyzer.ts +38 -3
- package/src/analyses/ReflectMetadataAnalyzer.ts +47 -0
- package/src/analyses/ReflectWebSocketOperationAnalyzer.ts +40 -7
- package/src/analyses/SecurityAnalyzer.ts +45 -20
- package/src/analyses/SwaggerExampleAnalyzer.ts +39 -0
- package/src/analyses/TypedHttpRouteAnalyzer.ts +263 -198
- package/src/analyses/TypedMcpRouteAnalyzer.ts +180 -20
- package/src/analyses/TypedWebSocketRouteAnalyzer.ts +20 -0
- package/src/decorators/OperationMetadata.ts +6 -0
- package/src/executable/internal/CommandParser.ts +19 -0
- package/src/executable/internal/NestiaConfigLoader.ts +66 -50
- package/src/executable/internal/NestiaSdkCommand.ts +96 -3
- package/src/executable/internal/NestiaSdkWatcher.ts +172 -44
- package/src/executable/internal/NestiaSwaggerWatch.ts +359 -0
- package/src/executable/sdk.ts +24 -1
- package/src/factories/ExpressionFactory.ts +23 -2
- package/src/factories/IdentifierFactory.ts +24 -0
- package/src/factories/LiteralFactory.ts +51 -13
- package/src/factories/StatementFactory.ts +28 -1
- package/src/factories/TypeFactory.ts +24 -0
- package/src/generates/CloneGenerator.ts +26 -5
- package/src/generates/E2eGenerator.ts +19 -0
- package/src/generates/SdkGenerator.ts +43 -12
- package/src/generates/SwaggerGenerator.ts +229 -46
- package/src/generates/internal/E2eFileProgrammer.ts +20 -0
- package/src/generates/internal/FilePrinter.ts +71 -0
- package/src/generates/internal/ImportDictionary.ts +120 -2
- package/src/generates/internal/SdkAliasCollection.ts +144 -15
- package/src/generates/internal/SdkDistributionComposer.ts +181 -56
- package/src/generates/internal/SdkFileProgrammer.ts +126 -16
- package/src/generates/internal/SdkHttpCloneProgrammer.ts +55 -0
- package/src/generates/internal/SdkHttpCloneReferencer.ts +97 -23
- package/src/generates/internal/SdkHttpFunctionProgrammer.ts +47 -30
- package/src/generates/internal/SdkHttpNamespaceProgrammer.ts +53 -64
- package/src/generates/internal/SdkHttpParameterProgrammer.ts +295 -13
- package/src/generates/internal/SdkHttpRouteProgrammer.ts +37 -31
- package/src/generates/internal/SdkHttpSimulationProgrammer.ts +122 -18
- package/src/generates/internal/SdkImportWizard.ts +63 -0
- package/src/generates/internal/SdkMcpRouteProgrammer.ts +150 -33
- package/src/generates/internal/SdkPathTemplate.ts +88 -0
- package/src/generates/internal/SdkRouteDirectory.ts +10 -0
- package/src/generates/internal/SdkTypeProgrammer.ts +137 -36
- package/src/generates/internal/SdkTypeTagProgrammer.ts +536 -78
- package/src/generates/internal/SdkWebSocketCloneProgrammer.ts +185 -142
- package/src/generates/internal/SdkWebSocketNamespaceProgrammer.ts +62 -68
- package/src/generates/internal/SdkWebSocketParameterProgrammer.ts +205 -5
- package/src/generates/internal/SdkWebSocketRouteProgrammer.ts +89 -48
- package/src/generates/internal/SwaggerDescriptionComposer.ts +47 -1
- package/src/generates/internal/SwaggerOperationComposer.ts +38 -6
- package/src/generates/internal/SwaggerOperationParameterComposer.ts +318 -36
- package/src/generates/internal/SwaggerOperationResponseComposer.ts +74 -11
- package/src/internal/legacy-augmentation.d.ts +16 -0
- package/src/internal/legacy.ts +407 -49
- package/src/structures/INestiaProject.ts +10 -0
- package/src/structures/INestiaSdkInput.ts +30 -0
- package/src/structures/IOperationMetadata.ts +83 -0
- package/src/structures/IReflectController.ts +10 -0
- package/src/structures/IReflectHttpOperation.ts +10 -0
- package/src/structures/IReflectHttpOperationException.ts +17 -2
- package/src/structures/IReflectHttpOperationParameter.ts +56 -2
- package/src/structures/IReflectHttpOperationSuccess.ts +19 -3
- package/src/structures/IReflectImport.ts +10 -0
- package/src/structures/IReflectMcpOperation.ts +19 -0
- package/src/structures/IReflectMcpOperationParameter.ts +9 -0
- package/src/structures/IReflectOperationError.ts +31 -2
- package/src/structures/IReflectType.ts +9 -0
- package/src/structures/IReflectWebSocketOperation.ts +10 -0
- package/src/structures/IReflectWebSocketOperationParameter.ts +55 -0
- package/src/structures/ITypedApplication.ts +10 -0
- package/src/structures/ITypedHttpRoute.ts +18 -0
- package/src/structures/ITypedHttpRouteException.ts +14 -1
- package/src/structures/ITypedHttpRouteParameter.ts +48 -1
- package/src/structures/ITypedHttpRouteSuccess.ts +14 -1
- package/src/structures/ITypedMcpRoute.ts +12 -0
- package/src/structures/ITypedWebSocketRoute.ts +18 -0
- package/src/transform.ts +6 -0
- package/src/utils/ArrayUtil.ts +32 -13
- package/src/utils/EmittedJavaScriptPatcher.ts +70 -47
- package/src/utils/FileRetriever.ts +29 -0
- package/src/utils/HttpResponseContentTypeUtil.ts +41 -0
- package/src/utils/MapUtil.ts +68 -3
- package/src/utils/PathUtil.ts +38 -0
- package/src/utils/SdkBundlePath.ts +11 -0
- package/src/utils/SdkInputFilter.ts +108 -0
- package/src/utils/SourceFinder.ts +76 -18
- package/src/utils/StringUtil.ts +182 -5
- package/src/utils/TemporaryDirectory.ts +108 -0
- package/src/utils/TsConfigReader.ts +124 -26
- package/src/utils/TtscExecutor.ts +23 -1
- package/src/utils/VersioningStrategy.ts +51 -16
- package/src/validators/TextPlainValidator.ts +19 -0
- package/lib/generates/internal/SwaggerReadonlyArrayEmender.d.ts +0 -9
- package/lib/generates/internal/SwaggerReadonlyArrayEmender.js +0 -178
- package/lib/generates/internal/SwaggerReadonlyArrayEmender.js.map +0 -1
- package/lib/validators/HttpHeadersValidator.d.ts +0 -11
- package/lib/validators/HttpHeadersValidator.js +0 -15
- package/lib/validators/HttpHeadersValidator.js.map +0 -1
- package/lib/validators/HttpQueryValidator.d.ts +0 -10
- package/lib/validators/HttpQueryValidator.js +0 -14
- package/lib/validators/HttpQueryValidator.js.map +0 -1
- package/src/generates/internal/SwaggerReadonlyArrayEmender.ts +0 -264
- package/src/validators/HttpHeadersValidator.ts +0 -12
- package/src/validators/HttpQueryValidator.ts +0 -11
|
@@ -1,17 +1,138 @@
|
|
|
1
|
-
import { type Node, type TypeNode } from "@ttsc/factory";
|
|
1
|
+
import { type Expression, type Node, type TypeNode } from "@ttsc/factory";
|
|
2
2
|
import { INestiaProject } from "../../structures/INestiaProject";
|
|
3
3
|
import { ITypedHttpRoute } from "../../structures/ITypedHttpRoute";
|
|
4
4
|
import { ITypedHttpRouteParameter } from "../../structures/ITypedHttpRouteParameter";
|
|
5
5
|
import { ImportDictionary } from "./ImportDictionary";
|
|
6
|
+
/**
|
|
7
|
+
* The parameters of an HTTP route's SDK function.
|
|
8
|
+
*
|
|
9
|
+
* @evidence contracts/common.md#principled-implementation The namespace decides the identifiers, lists the entries, and writes the declarations and the arguments in positional or keyword mode.
|
|
10
|
+
* @evidence contracts/common.md#clear-and-simple-design Several small functions over one entry type.
|
|
11
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The three consumers share one decision.
|
|
12
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
13
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkHttpParameterProgrammer composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
14
|
+
*/
|
|
6
15
|
export declare namespace SdkHttpParameterProgrammer {
|
|
16
|
+
/**
|
|
17
|
+
* One parameter of a route: its key, whether it is required, its type, and
|
|
18
|
+
* the reflected parameter.
|
|
19
|
+
*
|
|
20
|
+
* @evidence contracts/common.md#principled-implementation The record is what a declaration or an argument needs.
|
|
21
|
+
* @evidence contracts/common.md#clear-and-simple-design A four-member record.
|
|
22
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
23
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
24
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkHttpParameterProgrammer.IEntry composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
25
|
+
*/
|
|
7
26
|
interface IEntry {
|
|
8
27
|
key: string;
|
|
9
28
|
required: boolean;
|
|
10
29
|
type: TypeNode;
|
|
11
30
|
parameter: ITypedHttpRouteParameter;
|
|
12
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* The identifiers one route's SDK function, `path()`, and `simulate()` use,
|
|
34
|
+
* decided once so the three cannot disagree.
|
|
35
|
+
*
|
|
36
|
+
* A user parameter shares those scopes with identifiers the SDK writes: its
|
|
37
|
+
* own `connection` and `props` parameters and locals, and names it cannot
|
|
38
|
+
* change — the route's function and namespace, which are public, and the
|
|
39
|
+
* imports, namespace members, and globals the bodies reference. Nothing kept
|
|
40
|
+
* them apart, so a parameter named like its method or `connection` produced
|
|
41
|
+
* an SDK that does not compile (#1647).
|
|
42
|
+
*
|
|
43
|
+
* The SDK's own identifiers are escaped with `_` prefixes, as it already
|
|
44
|
+
* escaped `output` and `variables`. A user parameter keeps its name, which an
|
|
45
|
+
* IDE shows and which is a `props` key in keyword mode, unless the name is
|
|
46
|
+
* one the SDK cannot change; then the positional parameter alone is renamed,
|
|
47
|
+
* which positional callers never see. The fixed names are only those the
|
|
48
|
+
* generated code actually references for this route and configuration, and an
|
|
49
|
+
* own identifier yields only to the names its scope can see, so nothing is
|
|
50
|
+
* renamed where no name is shadowed.
|
|
51
|
+
*
|
|
52
|
+
* @evidence contracts/common.md#principled-implementation One decision serves the three scopes, so they cannot disagree.
|
|
53
|
+
* @evidence contracts/common.md#clear-and-simple-design A record of names and two lookups.
|
|
54
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
55
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
56
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkHttpParameterProgrammer.INames composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
57
|
+
*/
|
|
58
|
+
interface INames {
|
|
59
|
+
connection: string;
|
|
60
|
+
props: string;
|
|
61
|
+
output: string;
|
|
62
|
+
assert: string;
|
|
63
|
+
variables: string;
|
|
64
|
+
location: string;
|
|
65
|
+
key: string;
|
|
66
|
+
value: string;
|
|
67
|
+
elem: string;
|
|
68
|
+
/**
|
|
69
|
+
* Local identifier of a significant parameter in positional mode.
|
|
70
|
+
*
|
|
71
|
+
* @evidence contracts/common.md#principled-implementation A parameter yields to a name the SDK cannot change and keeps its own otherwise.
|
|
72
|
+
* @evidence contracts/common.md#clear-and-simple-design One lookup.
|
|
73
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It reads the decision.
|
|
74
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
75
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkHttpParameterProgrammer.INames.parameter composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
76
|
+
*/
|
|
77
|
+
parameter: (p: ITypedHttpRouteParameter) => string;
|
|
78
|
+
/**
|
|
79
|
+
* Reads a significant parameter: `props.<name>` or its local.
|
|
80
|
+
*
|
|
81
|
+
* @evidence contracts/common.md#principled-implementation The read follows the mode of the function.
|
|
82
|
+
* @evidence contracts/common.md#clear-and-simple-design One lookup.
|
|
83
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It reads the decision.
|
|
84
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
85
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkHttpParameterProgrammer.INames.access composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
86
|
+
*/
|
|
87
|
+
access: (p: ITypedHttpRouteParameter) => Expression;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Decides the identifiers of a route's function, `path()`, and `simulate()`
|
|
91
|
+
* once.
|
|
92
|
+
*
|
|
93
|
+
* @evidence contracts/common.md#principled-implementation The fixed names each scope references are collected, and every own identifier avoids them and the other own identifiers it can see.
|
|
94
|
+
* @evidence contracts/common.md#clear-and-simple-design One function over the scope sets.
|
|
95
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Only shadowed names are renamed.
|
|
96
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
97
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkHttpParameterProgrammer.getNames composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
98
|
+
*/
|
|
99
|
+
const getNames: (props: {
|
|
100
|
+
project: INestiaProject;
|
|
101
|
+
route: ITypedHttpRoute;
|
|
102
|
+
}) => INames;
|
|
103
|
+
/**
|
|
104
|
+
* Returns every parameter of a route: path, query, header, query object,
|
|
105
|
+
* body, and header object.
|
|
106
|
+
*
|
|
107
|
+
* @evidence contracts/common.md#principled-implementation The list is the concatenation in that order.
|
|
108
|
+
* @evidence contracts/common.md#clear-and-simple-design One list.
|
|
109
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It adds no parameter.
|
|
110
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
111
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkHttpParameterProgrammer.getAll composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
112
|
+
*/
|
|
13
113
|
const getAll: (route: ITypedHttpRoute) => ITypedHttpRouteParameter[];
|
|
114
|
+
/**
|
|
115
|
+
* Returns the parameters that make up a call: path, query, the query object,
|
|
116
|
+
* and the body when asked.
|
|
117
|
+
*
|
|
118
|
+
* @evidence contracts/common.md#principled-implementation Headers travel in the connection and are not arguments.
|
|
119
|
+
* @evidence contracts/common.md#clear-and-simple-design One list.
|
|
120
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The body is included by the caller's choice.
|
|
121
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
122
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkHttpParameterProgrammer.getSignificant composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
123
|
+
*/
|
|
14
124
|
const getSignificant: (route: ITypedHttpRoute, body: boolean) => (ITypedHttpRouteParameter.IBody | ITypedHttpRouteParameter.IPath | ITypedHttpRouteParameter.IQuery)[];
|
|
125
|
+
/**
|
|
126
|
+
* Returns the entries of a route: path and query parameters, the query
|
|
127
|
+
* object, and the body when asked, with the type each has in the function or
|
|
128
|
+
* in the test.
|
|
129
|
+
*
|
|
130
|
+
* @evidence contracts/common.md#principled-implementation The type is the alias `Query` or `Body` in the function, and the reflected or cloned type in a test.
|
|
131
|
+
* @evidence contracts/common.md#clear-and-simple-design One list of three groups.
|
|
132
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts An empty route has no entries.
|
|
133
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
134
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkHttpParameterProgrammer.getEntries composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
135
|
+
*/
|
|
15
136
|
const getEntries: (props: {
|
|
16
137
|
project: INestiaProject;
|
|
17
138
|
importer: ImportDictionary;
|
|
@@ -20,6 +141,16 @@ export declare namespace SdkHttpParameterProgrammer {
|
|
|
20
141
|
prefix: boolean | string;
|
|
21
142
|
e2e?: boolean;
|
|
22
143
|
}) => IEntry[];
|
|
144
|
+
/**
|
|
145
|
+
* Returns the parameter declarations of a route's function: one `props`
|
|
146
|
+
* object in keyword mode, and one positional parameter per entry otherwise.
|
|
147
|
+
*
|
|
148
|
+
* @evidence contracts/common.md#principled-implementation A required parameter cannot follow an optional one, so an optional one before a required one trades its `?` for `undefined` in its type.
|
|
149
|
+
* @evidence contracts/common.md#clear-and-simple-design One function of two modes.
|
|
150
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The names come from `getNames`.
|
|
151
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
152
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkHttpParameterProgrammer.getParameterDeclarations composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
153
|
+
*/
|
|
23
154
|
const getParameterDeclarations: (props: {
|
|
24
155
|
project: INestiaProject;
|
|
25
156
|
importer: ImportDictionary;
|
|
@@ -27,6 +158,16 @@ export declare namespace SdkHttpParameterProgrammer {
|
|
|
27
158
|
body: boolean;
|
|
28
159
|
prefix: boolean;
|
|
29
160
|
}) => Node[];
|
|
161
|
+
/**
|
|
162
|
+
* Returns the arguments to call a route's function with: the `props` object
|
|
163
|
+
* in keyword mode, and the parameters otherwise.
|
|
164
|
+
*
|
|
165
|
+
* @evidence contracts/common.md#principled-implementation The identifiers are those declared by `getNames`.
|
|
166
|
+
* @evidence contracts/common.md#clear-and-simple-design One function of two modes.
|
|
167
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No argument is invented for an empty route.
|
|
168
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
169
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkHttpParameterProgrammer.getArguments composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
170
|
+
*/
|
|
30
171
|
const getArguments: (props: {
|
|
31
172
|
project: INestiaProject;
|
|
32
173
|
route: ITypedHttpRoute;
|
|
@@ -2,9 +2,116 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SdkHttpParameterProgrammer = void 0;
|
|
4
4
|
const factory_1 = require("@ttsc/factory");
|
|
5
|
+
const StringUtil_1 = require("../../utils/StringUtil");
|
|
5
6
|
const SdkAliasCollection_1 = require("./SdkAliasCollection");
|
|
7
|
+
/**
|
|
8
|
+
* The parameters of an HTTP route's SDK function.
|
|
9
|
+
*
|
|
10
|
+
* @evidence contracts/common.md#principled-implementation The namespace decides the identifiers, lists the entries, and writes the declarations and the arguments in positional or keyword mode.
|
|
11
|
+
* @evidence contracts/common.md#clear-and-simple-design Several small functions over one entry type.
|
|
12
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The three consumers share one decision.
|
|
13
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
14
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkHttpParameterProgrammer composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
15
|
+
*/
|
|
6
16
|
var SdkHttpParameterProgrammer;
|
|
7
17
|
(function (SdkHttpParameterProgrammer) {
|
|
18
|
+
/**
|
|
19
|
+
* Decides the identifiers of a route's function, `path()`, and `simulate()`
|
|
20
|
+
* once.
|
|
21
|
+
*
|
|
22
|
+
* @evidence contracts/common.md#principled-implementation The fixed names each scope references are collected, and every own identifier avoids them and the other own identifiers it can see.
|
|
23
|
+
* @evidence contracts/common.md#clear-and-simple-design One function over the scope sets.
|
|
24
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Only shadowed names are renamed.
|
|
25
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
26
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkHttpParameterProgrammer.getNames composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
27
|
+
*/
|
|
28
|
+
SdkHttpParameterProgrammer.getNames = (props) => {
|
|
29
|
+
var _a;
|
|
30
|
+
const { project, route } = props;
|
|
31
|
+
const parameters = SdkHttpParameterProgrammer.getSignificant(route, true);
|
|
32
|
+
const simulate = project.config.simulate === true && parameters.length !== 0;
|
|
33
|
+
// names each scope references and the SDK cannot change
|
|
34
|
+
const functional = [
|
|
35
|
+
route.name,
|
|
36
|
+
!!((_a = route.body) === null || _a === void 0 ? void 0 : _a.encrypted) || route.success.encrypted
|
|
37
|
+
? "EncryptedFetcher"
|
|
38
|
+
: "PlainFetcher",
|
|
39
|
+
...(project.config.assert === true ? ["typia"] : []),
|
|
40
|
+
...(route.success.setHeaders.some((h) => h.type === "assigner")
|
|
41
|
+
? ["Object"]
|
|
42
|
+
: []),
|
|
43
|
+
];
|
|
44
|
+
const path = [
|
|
45
|
+
...(route.pathParameters.length !== 0 ? ["PathParameter"] : []),
|
|
46
|
+
...(route.queryObject !== null || route.queryParameters.length !== 0
|
|
47
|
+
? ["URLSearchParams", "Object", "Array", "String", "undefined"]
|
|
48
|
+
: []),
|
|
49
|
+
];
|
|
50
|
+
const simulation = simulate
|
|
51
|
+
? ["NestiaSimulator", "METADATA", "path", "random", "typia"]
|
|
52
|
+
: [];
|
|
53
|
+
const locals = new Map();
|
|
54
|
+
if (project.config.keyword !== true)
|
|
55
|
+
for (const p of parameters)
|
|
56
|
+
locals.set(p, StringUtil_1.StringUtil.escapeDuplicate([
|
|
57
|
+
...functional,
|
|
58
|
+
...simulation,
|
|
59
|
+
...(p.category !== "body" ? path : []),
|
|
60
|
+
...parameters.filter((q) => q !== p).map((q) => q.name),
|
|
61
|
+
...locals.values(),
|
|
62
|
+
])(p.name));
|
|
63
|
+
// An SDK-own identifier avoids the fixed names and the other own ones of
|
|
64
|
+
// its scope, and the positional parameters whose values its scope reads
|
|
65
|
+
// where it is visible: the SDK function's and simulate()'s parameters and
|
|
66
|
+
// locals see every one; in path(), `variables` and `location` see its
|
|
67
|
+
// parameters, the loop's `key` and `value` the query values its header
|
|
68
|
+
// reads, and `elem` none.
|
|
69
|
+
const declared = (list) => list
|
|
70
|
+
.map((p) => locals.get(p))
|
|
71
|
+
.filter((name) => name !== undefined);
|
|
72
|
+
const queries = [
|
|
73
|
+
...route.queryParameters,
|
|
74
|
+
...(route.queryObject ? [route.queryObject] : []),
|
|
75
|
+
];
|
|
76
|
+
const own = (fixed, reads, taken) => (name) => {
|
|
77
|
+
const escaped = StringUtil_1.StringUtil.escapeDuplicate([
|
|
78
|
+
...fixed,
|
|
79
|
+
...reads,
|
|
80
|
+
...taken,
|
|
81
|
+
])(name);
|
|
82
|
+
taken.push(escaped);
|
|
83
|
+
return escaped;
|
|
84
|
+
};
|
|
85
|
+
const every = declared(parameters);
|
|
86
|
+
const shared = [];
|
|
87
|
+
const $props = own([...functional, ...path, ...simulation], every, shared)("props");
|
|
88
|
+
const $connection = own([...functional, ...simulation], every, shared)("connection");
|
|
89
|
+
const inPath = [...shared];
|
|
90
|
+
const names = {
|
|
91
|
+
props: $props,
|
|
92
|
+
connection: $connection,
|
|
93
|
+
output: own(functional, every, [...shared])("output"),
|
|
94
|
+
assert: own(simulation, every, [...shared])("assert"),
|
|
95
|
+
variables: own(path, declared([...route.pathParameters, ...queries]), inPath)("variables"),
|
|
96
|
+
location: own(path, declared([...route.pathParameters, ...queries]), inPath)("location"),
|
|
97
|
+
key: own(path, declared(queries), inPath)("key"),
|
|
98
|
+
value: own(path, declared(queries), inPath)("value"),
|
|
99
|
+
elem: own(path, [], inPath)("elem"),
|
|
100
|
+
};
|
|
101
|
+
return Object.assign(Object.assign({}, names), { parameter: (p) => { var _a; return (_a = locals.get(p)) !== null && _a !== void 0 ? _a : p.name; }, access: (p) => { var _a; return project.config.keyword === true
|
|
102
|
+
? factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier(names.props), p.name)
|
|
103
|
+
: factory_1.factory.createIdentifier((_a = locals.get(p)) !== null && _a !== void 0 ? _a : p.name); } });
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Returns every parameter of a route: path, query, header, query object,
|
|
107
|
+
* body, and header object.
|
|
108
|
+
*
|
|
109
|
+
* @evidence contracts/common.md#principled-implementation The list is the concatenation in that order.
|
|
110
|
+
* @evidence contracts/common.md#clear-and-simple-design One list.
|
|
111
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It adds no parameter.
|
|
112
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
113
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkHttpParameterProgrammer.getAll composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
114
|
+
*/
|
|
8
115
|
SdkHttpParameterProgrammer.getAll = (route) => [
|
|
9
116
|
...route.pathParameters,
|
|
10
117
|
...route.queryParameters,
|
|
@@ -13,12 +120,33 @@ var SdkHttpParameterProgrammer;
|
|
|
13
120
|
...(route.body ? [route.body] : []),
|
|
14
121
|
...(route.headerObject ? [route.headerObject] : []),
|
|
15
122
|
];
|
|
123
|
+
/**
|
|
124
|
+
* Returns the parameters that make up a call: path, query, the query object,
|
|
125
|
+
* and the body when asked.
|
|
126
|
+
*
|
|
127
|
+
* @evidence contracts/common.md#principled-implementation Headers travel in the connection and are not arguments.
|
|
128
|
+
* @evidence contracts/common.md#clear-and-simple-design One list.
|
|
129
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The body is included by the caller's choice.
|
|
130
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
131
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkHttpParameterProgrammer.getSignificant composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
132
|
+
*/
|
|
16
133
|
SdkHttpParameterProgrammer.getSignificant = (route, body) => [
|
|
17
134
|
...route.pathParameters,
|
|
18
135
|
...route.queryParameters,
|
|
19
136
|
...(route.queryObject ? [route.queryObject] : []),
|
|
20
137
|
...(body && route.body ? [route.body] : []),
|
|
21
138
|
];
|
|
139
|
+
/**
|
|
140
|
+
* Returns the entries of a route: path and query parameters, the query
|
|
141
|
+
* object, and the body when asked, with the type each has in the function or
|
|
142
|
+
* in the test.
|
|
143
|
+
*
|
|
144
|
+
* @evidence contracts/common.md#principled-implementation The type is the alias `Query` or `Body` in the function, and the reflected or cloned type in a test.
|
|
145
|
+
* @evidence contracts/common.md#clear-and-simple-design One list of three groups.
|
|
146
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts An empty route has no entries.
|
|
147
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
148
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkHttpParameterProgrammer.getEntries composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
149
|
+
*/
|
|
22
150
|
SdkHttpParameterProgrammer.getEntries = (props) => {
|
|
23
151
|
if (props.route.pathParameters.length === 0 &&
|
|
24
152
|
props.route.queryParameters.length === 0 &&
|
|
@@ -69,11 +197,22 @@ var SdkHttpParameterProgrammer;
|
|
|
69
197
|
: []),
|
|
70
198
|
];
|
|
71
199
|
};
|
|
200
|
+
/**
|
|
201
|
+
* Returns the parameter declarations of a route's function: one `props`
|
|
202
|
+
* object in keyword mode, and one positional parameter per entry otherwise.
|
|
203
|
+
*
|
|
204
|
+
* @evidence contracts/common.md#principled-implementation A required parameter cannot follow an optional one, so an optional one before a required one trades its `?` for `undefined` in its type.
|
|
205
|
+
* @evidence contracts/common.md#clear-and-simple-design One function of two modes.
|
|
206
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The names come from `getNames`.
|
|
207
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
208
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkHttpParameterProgrammer.getParameterDeclarations composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
209
|
+
*/
|
|
72
210
|
SdkHttpParameterProgrammer.getParameterDeclarations = (props) => {
|
|
73
211
|
const entries = SdkHttpParameterProgrammer.getEntries(props);
|
|
74
212
|
if (entries.length === 0)
|
|
75
213
|
return [];
|
|
76
|
-
|
|
214
|
+
const names = SdkHttpParameterProgrammer.getNames(props);
|
|
215
|
+
if (props.project.config.keyword === true) {
|
|
77
216
|
const typeName = props.prefix
|
|
78
217
|
? `${props.route.name}.Props`
|
|
79
218
|
: "Props";
|
|
@@ -84,18 +223,48 @@ var SdkHttpParameterProgrammer;
|
|
|
84
223
|
])
|
|
85
224
|
: factory_1.factory.createTypeReferenceNode(typeName);
|
|
86
225
|
return [
|
|
87
|
-
factory_1.factory.createParameterDeclaration(undefined, undefined,
|
|
226
|
+
factory_1.factory.createParameterDeclaration(undefined, undefined, names.props, undefined, node, undefined),
|
|
88
227
|
];
|
|
89
228
|
}
|
|
90
|
-
|
|
229
|
+
// a required parameter cannot follow an optional one (TS1016), so an
|
|
230
|
+
// optional parameter before a required one trades its `?` for `undefined`
|
|
231
|
+
// in its type
|
|
232
|
+
return entries.map((e, i) => {
|
|
233
|
+
const trailing = e.required === false &&
|
|
234
|
+
entries.slice(i + 1).every((next) => next.required === false);
|
|
235
|
+
return factory_1.factory.createParameterDeclaration(undefined, undefined, names.parameter(e.parameter), trailing ? factory_1.factory.createToken(factory_1.SyntaxKind.QuestionToken) : undefined, e.required || trailing ? e.type : undefinable(props.project, e), undefined);
|
|
236
|
+
});
|
|
91
237
|
};
|
|
238
|
+
// a cloned field's type admits `undefined` when optional, and a reflected
|
|
239
|
+
// field's does when its name says so (`mode: string | undefined`, not
|
|
240
|
+
// `mode?: string`); the `Query` and `Body` aliases are not inspected
|
|
241
|
+
const undefinable = (project, e) => e.parameter.category !== "body" &&
|
|
242
|
+
e.parameter.field !== null &&
|
|
243
|
+
(project.config.clone === true ||
|
|
244
|
+
e.parameter.type.name.split("|").some((t) => t.trim() === "undefined"))
|
|
245
|
+
? e.type
|
|
246
|
+
: factory_1.factory.createUnionTypeNode([
|
|
247
|
+
e.type,
|
|
248
|
+
factory_1.factory.createKeywordTypeNode(factory_1.SyntaxKind.UndefinedKeyword),
|
|
249
|
+
]);
|
|
250
|
+
/**
|
|
251
|
+
* Returns the arguments to call a route's function with: the `props` object
|
|
252
|
+
* in keyword mode, and the parameters otherwise.
|
|
253
|
+
*
|
|
254
|
+
* @evidence contracts/common.md#principled-implementation The identifiers are those declared by `getNames`.
|
|
255
|
+
* @evidence contracts/common.md#clear-and-simple-design One function of two modes.
|
|
256
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No argument is invented for an empty route.
|
|
257
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
258
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkHttpParameterProgrammer.getArguments composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
259
|
+
*/
|
|
92
260
|
SdkHttpParameterProgrammer.getArguments = (props) => {
|
|
93
261
|
const parameters = SdkHttpParameterProgrammer.getSignificant(props.route, props.body);
|
|
94
262
|
if (parameters.length === 0)
|
|
95
263
|
return [];
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
264
|
+
const names = SdkHttpParameterProgrammer.getNames(props);
|
|
265
|
+
if (props.project.config.keyword === true)
|
|
266
|
+
return [factory_1.factory.createIdentifier(names.props)];
|
|
267
|
+
return parameters.map((p) => factory_1.factory.createIdentifier(names.parameter(p)));
|
|
99
268
|
};
|
|
100
269
|
})(SdkHttpParameterProgrammer || (exports.SdkHttpParameterProgrammer = SdkHttpParameterProgrammer = {}));
|
|
101
270
|
//# sourceMappingURL=SdkHttpParameterProgrammer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdkHttpParameterProgrammer.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkHttpParameterProgrammer.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"SdkHttpParameterProgrammer.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkHttpParameterProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CAMuB;AAKvB,uDAAoD;AAEpD,6DAA0D;AAE1D;;;;;;;;GAQG;AACH,IAAiB,0BAA0B,CAoa1C;AApaD,WAAiB,0BAA0B;IA8EzC;;;;;;;;;OASG;IACU,mCAAQ,GAAG,CAAC,KAGxB,EAAU,EAAE;;QACX,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;QACjC,MAAM,UAAU,GAA+B,yCAAc,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAC3E,MAAM,QAAQ,GACZ,OAAO,CAAC,MAAM,CAAC,QAAQ,KAAK,IAAI,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC;QAE9D,wDAAwD;QACxD,MAAM,UAAU,GAAa;YAC3B,KAAK,CAAC,IAAI;YACV,CAAC,EAAC,MAAA,KAAK,CAAC,IAAI,0CAAE,SAAS,CAAA,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS;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AC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,WAAW,CAAC,CAAC;QACvE,CAAC,CAAC,CAAC,CAAC,IAAI;QACR,CAAC,CAAC,iBAAO,CAAC,mBAAmB,CAAC;YAC1B,CAAC,CAAC,IAAI;YACN,iBAAO,CAAC,qBAAqB,CAAC,oBAAU,CAAC,gBAAgB,CAAC;SAC3D,CAAC,CAAC;IAET;;;;;;;;;OASG;IACU,uCAAY,GAAG,CAAC,KAI5B,EAAU,EAAE;QACX,MAAM,UAAU,GAAG,yCAAc,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3D,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QACvC,MAAM,KAAK,GAAW,mCAAQ,CAAC,KAAK,CAAC,CAAC;QACtC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,KAAK,IAAI;YACvC,OAAO,CAAC,iBAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;QACjD,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iBAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7E,CAAC,CAAC;AACJ,CAAC,EApagB,0BAA0B,aAA1B,0BAA0B,GAA1B,0BAA0B,QAoa1C"}
|
|
@@ -2,6 +2,26 @@ import { type Node } from "@ttsc/factory";
|
|
|
2
2
|
import { INestiaProject } from "../../structures/INestiaProject";
|
|
3
3
|
import { ITypedHttpRoute } from "../../structures/ITypedHttpRoute";
|
|
4
4
|
import { ImportDictionary } from "./ImportDictionary";
|
|
5
|
+
/**
|
|
6
|
+
* Writes an HTTP route into the SDK: its function and its namespace.
|
|
7
|
+
*
|
|
8
|
+
* @evidence contracts/common.md#principled-implementation The namespace pairs the two declarations and describes the function.
|
|
9
|
+
* @evidence contracts/common.md#clear-and-simple-design One public function and one description helper.
|
|
10
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The description is from the route's own comment.
|
|
11
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
12
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkHttpRouteProgrammer composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
13
|
+
*/
|
|
5
14
|
export declare namespace SdkHttpRouteProgrammer {
|
|
15
|
+
/**
|
|
16
|
+
* Returns the function and the namespace of a route, the function carrying
|
|
17
|
+
* the route's description, `@param`, and exception tags, and a `@nestia`
|
|
18
|
+
* postfix.
|
|
19
|
+
*
|
|
20
|
+
* @evidence contracts/common.md#principled-implementation The two nodes share the identifiers of one decision.
|
|
21
|
+
* @evidence contracts/common.md#clear-and-simple-design One function.
|
|
22
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The description keeps the names the function declares.
|
|
23
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
24
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkHttpRouteProgrammer.write composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
25
|
+
*/
|
|
6
26
|
const write: (project: INestiaProject) => (importer: ImportDictionary) => (route: ITypedHttpRoute) => Node[];
|
|
7
27
|
}
|
|
@@ -5,15 +5,36 @@ const FilePrinter_1 = require("./FilePrinter");
|
|
|
5
5
|
const SdkHttpFunctionProgrammer_1 = require("./SdkHttpFunctionProgrammer");
|
|
6
6
|
const SdkHttpNamespaceProgrammer_1 = require("./SdkHttpNamespaceProgrammer");
|
|
7
7
|
const SdkHttpParameterProgrammer_1 = require("./SdkHttpParameterProgrammer");
|
|
8
|
+
/**
|
|
9
|
+
* Writes an HTTP route into the SDK: its function and its namespace.
|
|
10
|
+
*
|
|
11
|
+
* @evidence contracts/common.md#principled-implementation The namespace pairs the two declarations and describes the function.
|
|
12
|
+
* @evidence contracts/common.md#clear-and-simple-design One public function and one description helper.
|
|
13
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The description is from the route's own comment.
|
|
14
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
15
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkHttpRouteProgrammer composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
16
|
+
*/
|
|
8
17
|
var SdkHttpRouteProgrammer;
|
|
9
18
|
(function (SdkHttpRouteProgrammer) {
|
|
19
|
+
/**
|
|
20
|
+
* Returns the function and the namespace of a route, the function carrying
|
|
21
|
+
* the route's description, `@param`, and exception tags, and a `@nestia`
|
|
22
|
+
* postfix.
|
|
23
|
+
*
|
|
24
|
+
* @evidence contracts/common.md#principled-implementation The two nodes share the identifiers of one decision.
|
|
25
|
+
* @evidence contracts/common.md#clear-and-simple-design One function.
|
|
26
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The description keeps the names the function declares.
|
|
27
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
28
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkHttpRouteProgrammer.write composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
29
|
+
*/
|
|
10
30
|
SdkHttpRouteProgrammer.write = (project) => (importer) => (route) => [
|
|
11
|
-
FilePrinter_1.FilePrinter.description(SdkHttpFunctionProgrammer_1.SdkHttpFunctionProgrammer.write(project)(importer)(route), describe(project
|
|
31
|
+
FilePrinter_1.FilePrinter.description(SdkHttpFunctionProgrammer_1.SdkHttpFunctionProgrammer.write(project)(importer)(route), describe(project, route)),
|
|
12
32
|
SdkHttpNamespaceProgrammer_1.SdkHttpNamespaceProgrammer.write(project)(importer)(route),
|
|
13
33
|
];
|
|
14
|
-
const describe = (
|
|
15
|
-
var _a, _b, _c, _d, _e, _f;
|
|
16
|
-
var
|
|
34
|
+
const describe = (project, route) => {
|
|
35
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
36
|
+
var _h, _j;
|
|
37
|
+
const names = SdkHttpParameterProgrammer_1.SdkHttpParameterProgrammer.getNames({ project, route });
|
|
17
38
|
// MAIN DESCRIPTION
|
|
18
39
|
const descriptionComments = route.description
|
|
19
40
|
? route.description.split("\n")
|
|
@@ -21,45 +42,27 @@ var SdkHttpRouteProgrammer;
|
|
|
21
42
|
const tagComments = [];
|
|
22
43
|
// PARAMETERS
|
|
23
44
|
for (const p of SdkHttpParameterProgrammer_1.SdkHttpParameterProgrammer.getSignificant(route, true)) {
|
|
24
|
-
const description = (
|
|
25
|
-
.find((tag) => { var _a, _b; return tag.name === "param" && ((_b = (_a = tag.text) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.text) === p.name; })) === null || _d === void 0 ? void 0 : _d.text) === null || _e === void 0 ? void 0 : _e.
|
|
45
|
+
const description = (_j = (_h = p.description) !== null && _h !== void 0 ? _h : (_c = (_b = (_a = p.jsDocTags.find((tag) => tag.name === "description")) === null || _a === void 0 ? void 0 : _a.text) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.text) !== null && _j !== void 0 ? _j : (_f = (_e = (_d = route.jsDocTags
|
|
46
|
+
.find((tag) => { var _a, _b; return tag.name === "param" && ((_b = (_a = tag.text) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.text) === p.name; })) === null || _d === void 0 ? void 0 : _d.text) === null || _e === void 0 ? void 0 : _e.find((e) => e.kind === "text")) === null || _f === void 0 ? void 0 : _f.text;
|
|
26
47
|
if (!(description === null || description === void 0 ? void 0 : description.length))
|
|
27
48
|
continue;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if (i === 0)
|
|
34
|
-
return str;
|
|
35
|
-
const rpad = p.name.length + 8;
|
|
36
|
-
return `${" ".repeat(rpad)}${str}`;
|
|
37
|
-
})
|
|
38
|
-
.join("\n")}`);
|
|
49
|
+
// the name the SDK function declares, which yields on a collision
|
|
50
|
+
const name = project.config.keyword === true
|
|
51
|
+
? `${names.props}.${p.name}`
|
|
52
|
+
: names.parameter(p);
|
|
53
|
+
tagComments.push(FilePrinter_1.FilePrinter.jsDocTag(`param ${name}`, description));
|
|
39
54
|
}
|
|
40
55
|
// COMMENT TAGS
|
|
41
56
|
const tags = route.jsDocTags.filter((tag) => tag.name !== "param");
|
|
42
57
|
if (tags.length !== 0) {
|
|
43
|
-
const content = tags.map((t) => { var _a; return ((_a = t.text) === null || _a === void 0 ? void 0 : _a.
|
|
44
|
-
? `@${t.name} ${t.text
|
|
45
|
-
.map((e) => e.text)
|
|
46
|
-
.join("")
|
|
47
|
-
.split("\n")
|
|
48
|
-
.map((str) => str.trim())
|
|
49
|
-
.map((str, i) => {
|
|
50
|
-
if (i === 0)
|
|
51
|
-
return str;
|
|
52
|
-
return `${" ".repeat(t.name.length + 1)} ${str}`;
|
|
53
|
-
})
|
|
54
|
-
.join("\n")}`
|
|
55
|
-
: `@${t.name}`; });
|
|
58
|
+
const content = tags.map((t) => { var _a; var _b; return FilePrinter_1.FilePrinter.jsDocTag(t.name, (_b = (_a = t.text) === null || _a === void 0 ? void 0 : _a.map((e) => e.text).join("")) !== null && _b !== void 0 ? _b : ""); });
|
|
56
59
|
tagComments.push(...new Set(content));
|
|
57
60
|
}
|
|
58
61
|
// EXCEPTIONS
|
|
59
62
|
for (const [key, value] of Object.entries(route.exceptions)) {
|
|
60
63
|
if (tagComments.some((str) => str.startsWith(`@throw ${key}`) || str.startsWith(`@throws ${key}`)))
|
|
61
64
|
continue;
|
|
62
|
-
tagComments.push(((
|
|
65
|
+
tagComments.push(((_g = value.description) === null || _g === void 0 ? void 0 : _g.length)
|
|
63
66
|
? `@throws ${key} ${value.description.split("\n")[0]}`
|
|
64
67
|
: `@throws ${key}`);
|
|
65
68
|
}
|
|
@@ -69,7 +72,8 @@ var SdkHttpRouteProgrammer;
|
|
|
69
72
|
...(descriptionComments.length && tagComments.length ? [""] : []),
|
|
70
73
|
...tagComments,
|
|
71
74
|
...(descriptionComments.length && tagComments.length ? [""] : []),
|
|
72
|
-
|
|
75
|
+
// the public name, kept by a route declared under a local one
|
|
76
|
+
`@controller ${route.controller.class.name}.${route.key}`,
|
|
73
77
|
`@path ${route.method} ${route.path}`,
|
|
74
78
|
`@accessor api.functional.${route.accessor.join(".")}`,
|
|
75
79
|
`@nestia Generated by Nestia - https://github.com/samchon/nestia`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdkHttpRouteProgrammer.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkHttpRouteProgrammer.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"SdkHttpRouteProgrammer.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkHttpRouteProgrammer.ts"],"names":[],"mappings":";;;AAKA,+CAA4C;AAE5C,2EAAwE;AACxE,6EAA0E;AAC1E,6EAA0E;AAE1E;;;;;;;;GAQG;AACH,IAAiB,sBAAsB,CA8FtC;AA9FD,WAAiB,sBAAsB;IACrC;;;;;;;;;;OAUG;IACU,4BAAK,GAChB,CAAC,OAAuB,EAAE,EAAE,CAC5B,CAAC,QAA0B,EAAE,EAAE,CAC/B,CAAC,KAAsB,EAAU,EAAE,CAAC;QAClC,yBAAW,CAAC,WAAW,CACrB,qDAAyB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,EACzD,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC,CACzB;QACD,uDAA0B,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC;KAC3D,CAAC;IAEJ,M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