@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
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Owns unique temporary directories created by this SDK process.
|
|
6
|
+
*
|
|
7
|
+
* Shared parent directories are never registered for deletion. Configuration
|
|
8
|
+
* modules and runtime modules use the same registry and termination hook, so
|
|
9
|
+
* one process cannot sweep another process's live compiler inputs.
|
|
10
|
+
*
|
|
11
|
+
* @evidence contracts/common.md#principled-implementation Only mkdtemp results created by this process enter the registry; cleanup visits those exact directories and leaves shared parents and sibling processes' directories alone.
|
|
12
|
+
* @evidence contracts/common.md#clear-and-simple-design Creation and explicit release share one private registry and one exit/signal hook for configuration and runtime materialization.
|
|
13
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Ownership is established by creation rather than a directory-name pattern, process ID guess or sweeping the entire project cache.
|
|
14
|
+
* @evidence contracts/common.md#meaningful-documentation The comment defines ownership, shared-parent preservation and why both compiler paths use one registry.
|
|
15
|
+
* @evidence contracts/portability.md#os-neutral-implementation Node fs/path operations create and remove native paths. The shared hook sweeps all registered directories before re-raising a termination signal; abrupt OS termination can bypass JavaScript cleanup.
|
|
16
|
+
* efficient algorithms: Set membership and registration are constant-time on average; a termination sweep visits each retained directory once and removal costs the owned subtree's filesystem entries. Shared parents are never scanned.
|
|
17
|
+
* reuse equivalent work: Configuration and runtime materializers share the same registry and once-installed exit/signal hooks. Each child has distinct contents and ownership, so allocations and deletions themselves are not substituted by a cached path.
|
|
18
|
+
* bound retention and release resources: The registry retains one path per unreleased materialization; explicit release forgets it and process termination sweeps the remainder. Failed removals are reported and cause a failing exit rather than hiding them.
|
|
19
|
+
*/
|
|
20
|
+
export namespace TemporaryDirectory {
|
|
21
|
+
/**
|
|
22
|
+
* Creates and registers an owned child under a possibly shared parent.
|
|
23
|
+
*
|
|
24
|
+
* @evidence contracts/common.md#principled-implementation mkdir establishes the parent and mkdtemp creates an exclusive child before its path is registered, so concurrent processes never acquire ownership of the same directory.
|
|
25
|
+
* @evidence contracts/common.md#clear-and-simple-design The function creates one child and registers the shared cleanup hook once.
|
|
26
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The random child is allocated by the filesystem; no shared parent is eligible for cleanup and existing signal listeners do not suppress this registration.
|
|
27
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states that the returned child is owned and its parent may be shared.
|
|
28
|
+
* @evidence contracts/portability.md#os-neutral-implementation Node mkdir/mkdtemp and path.join operate on filesystem paths supplied by the materializers; no URL spelling, separator literal or OS-specific shell creates the child. Signal delivery remains best effort under abrupt termination.
|
|
29
|
+
* efficient algorithms: The function makes one filesystem allocation and one average constant-time Set insertion; parent creation follows its path depth, and the fixed termination hooks are installed only on the first allocation.
|
|
30
|
+
* reuse equivalent work: All create calls reuse the one cleanup-hook registration. Directory allocations cannot be shared because each compiler materialization needs independent mutable contents and deletion ownership.
|
|
31
|
+
* bound retention and release resources: Each returned child transfers its contents to the caller while its path remains registered until explicit remove or process termination. Retention grows with unreleased materializations; process exit bounds the registry lifetime but a long-running process has no independent byte/count limit.
|
|
32
|
+
*/
|
|
33
|
+
export const create = (parent: string, prefix: string): string => {
|
|
34
|
+
fs.mkdirSync(parent, { recursive: true });
|
|
35
|
+
const directory: string = fs.mkdtempSync(path.join(parent, prefix));
|
|
36
|
+
owned.add(directory);
|
|
37
|
+
if (!registered) {
|
|
38
|
+
registered = true;
|
|
39
|
+
process.once("exit", sweep);
|
|
40
|
+
for (const signal of ["SIGINT", "SIGTERM", "SIGHUP"] as const)
|
|
41
|
+
process.once(signal, () => {
|
|
42
|
+
sweep();
|
|
43
|
+
process.kill(process.pid, signal);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
return directory;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Releases a registered child early; an unowned path is rejected.
|
|
51
|
+
*
|
|
52
|
+
* @evidence contracts/common.md#principled-implementation Registry membership is required before recursive removal, and ownership is forgotten only after removal succeeds; an arbitrary or already released path cannot be deleted through this operation.
|
|
53
|
+
* @evidence contracts/common.md#clear-and-simple-design One membership guard, one removal and one registry deletion own explicit release.
|
|
54
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It never broadens the requested deletion to the parent and does not swallow filesystem errors.
|
|
55
|
+
* @evidence contracts/common.md#meaningful-documentation The comment identifies early release and rejection of unowned paths.
|
|
56
|
+
* @evidence contracts/portability.md#os-neutral-implementation The returned native path is an ownership token checked by exact Set membership before Node recursive removal; alternate spellings are rejected rather than guessing filesystem case identity or invoking a platform shell.
|
|
57
|
+
* efficient algorithms: One average constant-time ownership lookup/deletion surrounds removal proportional to that child's filesystem subtree; siblings and shared parents are neither enumerated nor removed.
|
|
58
|
+
* reuse equivalent work: A deletion is a one-time ownership-consuming effect, not a reusable computation. Explicit releases unregister children so the shared termination sweep does not repeat their removals.
|
|
59
|
+
* bound retention and release resources: Successful removal releases contents and registry identity together; a failed removal retains ownership for later cleanup and propagates the error. Termination cleanup attempts other retained children and reports failures.
|
|
60
|
+
*/
|
|
61
|
+
export const remove = (directory: string): void => {
|
|
62
|
+
if (!owned.has(directory))
|
|
63
|
+
throw new Error(`Unowned temporary directory: ${directory}`);
|
|
64
|
+
fs.rmSync(directory, { recursive: true, force: true });
|
|
65
|
+
owned.delete(directory);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Releases all materializations owned by a completed disposable generation.
|
|
70
|
+
*
|
|
71
|
+
* Every child is attempted even when another removal fails; failed ownership
|
|
72
|
+
* remains registered for the termination hook to attempt again.
|
|
73
|
+
*
|
|
74
|
+
* @evidence contracts/common.md#principled-implementation The snapshot contains only registered mkdtemp results and remove checks ownership again; all children are attempted and aggregate failure prevents reporting successful cleanup.
|
|
75
|
+
* @evidence contracts/common.md#clear-and-simple-design One loop delegates deletion to the existing ownership-consuming operation and collects only removal errors.
|
|
76
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Shared parents and foreign directories never enter this cleanup, and a failed removal is retained and reported rather than forgotten.
|
|
77
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states generation-end release, continuation after a failed deletion and retained ownership for termination cleanup.
|
|
78
|
+
* @evidence contracts/portability.md#os-neutral-implementation The existing native fs/path removal operation handles each exact registered directory; no shell or platform-dependent signal is needed for explicit generation completion.
|
|
79
|
+
* efficient algorithms: The loop visits each currently owned child once and stores only failed removals; filesystem cost follows their subtrees rather than the shared parent contents.
|
|
80
|
+
* reuse equivalent work: Explicit disposal consumes ownership, so the later shared exit hook sees no successfully released child and cannot repeat equivalent removals.
|
|
81
|
+
* bound retention and release resources: Successful completion releases every owned directory and registry entry before the worker reports its result. Failed entries remain owned and an AggregateError propagates the unresolved cleanup.
|
|
82
|
+
*/
|
|
83
|
+
export const dispose = (): void => {
|
|
84
|
+
const errors: unknown[] = [];
|
|
85
|
+
for (const directory of [...owned])
|
|
86
|
+
try {
|
|
87
|
+
remove(directory);
|
|
88
|
+
} catch (error) {
|
|
89
|
+
errors.push(error);
|
|
90
|
+
}
|
|
91
|
+
if (errors.length)
|
|
92
|
+
throw new AggregateError(errors, "SDK temporary cleanup failed.");
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const owned: Set<string> = new Set();
|
|
97
|
+
let registered = false;
|
|
98
|
+
const sweep = (): void => {
|
|
99
|
+
for (const directory of owned)
|
|
100
|
+
try {
|
|
101
|
+
TemporaryDirectory.remove(directory);
|
|
102
|
+
} catch (error) {
|
|
103
|
+
process.stderr.write(
|
|
104
|
+
`Failed to remove SDK temporary directory: ${String(error)}\n`,
|
|
105
|
+
);
|
|
106
|
+
process.exitCode = 1;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
@@ -1,49 +1,125 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import path from "path";
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Reads a tsconfig with its `extends` chain without the compiler API.
|
|
6
|
+
*
|
|
7
|
+
* Later bases override earlier bases, including shared ancestors. Circular
|
|
8
|
+
* inheritance rejects rather than returning a partial configuration.
|
|
9
|
+
*
|
|
10
|
+
* @evidence contracts/common.md#principled-implementation The file is read as JSON with comments and trailing commas removed, each base is resolved and merged before the file itself, active ancestors reject cycles, and the relative `typeRoots` of each file are resolved against that file's own directory, as the compiler resolves them, before the merge forgets where they came from.
|
|
11
|
+
* @evidence contracts/common.md#clear-and-simple-design One public function with private parsing and resolution helpers.
|
|
12
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It reads the files the compiler reads.
|
|
13
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
|
|
14
|
+
* @evidence contracts/portability.md#os-neutral-implementation Files are read as UTF-8 through `fs`, a leading byte order mark is dropped, relative bases and `typeRoots` are resolved with `path.resolve` against the directory of the file that names them, and package bases go through Node module resolution from that directory. Resolved native path spellings key the per-read cache and active-ancestor set. Relative bases and option paths retain the directory of the requested config rather than being rebased onto a symlink target.
|
|
15
|
+
* efficient algorithms: Each distinct resolved configuration is parsed and merged once per read. Every extends edge contributes its already-merged options in declared order; work scales with input bytes, edges and the option records being combined rather than repeated traversal of shared ancestry.
|
|
16
|
+
* reuse equivalent work: A read owns a cache of completed results keyed by resolved config pathname. It shares the same base across branches only within that read, and a later read observes edits rather than retaining stale configuration state.
|
|
17
|
+
* bound retention and release resources: The active-ancestor set and completed-config map belong to one read. Active entries leave in finally, and the map is released when the returned read promise settles; no process-wide cache or open file handle survives.
|
|
18
|
+
*/
|
|
4
19
|
export namespace TsConfigReader {
|
|
20
|
+
/**
|
|
21
|
+
* A tsconfig: its `extends` and its compiler options.
|
|
22
|
+
*
|
|
23
|
+
* @evidence contracts/common.md#principled-implementation The record has the two members the loader reads.
|
|
24
|
+
* @evidence contracts/common.md#clear-and-simple-design A two-member record.
|
|
25
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
26
|
+
* @evidence contracts/common.md#meaningful-documentation The comment names the members.
|
|
27
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation The record holds parsed option values and opens no path or process of its own.
|
|
28
|
+
* efficient algorithms: The record represents config options and chooses no computation.
|
|
29
|
+
* reuse equivalent work: The record coordinates no reads or reuse.
|
|
30
|
+
* bound retention and release resources: The record owns no cache, task or filesystem handle.
|
|
31
|
+
*/
|
|
5
32
|
export interface ITsConfig {
|
|
6
33
|
extends?: string | string[];
|
|
7
34
|
compilerOptions?: Record<string, any>;
|
|
8
35
|
}
|
|
9
36
|
|
|
37
|
+
/**
|
|
38
|
+
* Returns the merged tsconfig of a file: bases first, later files override
|
|
39
|
+
* earlier ones, and compiler options are merged by key. The `typeRoots` of a
|
|
40
|
+
* file are returned absolute, resolved against the directory of the file that
|
|
41
|
+
* wrote them.
|
|
42
|
+
*
|
|
43
|
+
* @evidence contracts/common.md#principled-implementation Relative bases are resolved from the file's directory and package bases through module resolution, a base that cannot be found is skipped, and completed base configurations are reused by resolved pathname, and only a revisit to an active ancestor is a rejected cycle. A shared base contributes its full inherited values to every branch, so later extends entries override earlier ones even in a diamond.
|
|
44
|
+
* @evidence contracts/common.md#clear-and-simple-design One function delegating the merge.
|
|
45
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The comment stripper and the trailing-comma remover are one-pass scanners that track strings, so a slash or a comma inside a string value is kept; the files are read as the compiler reads them, apart from the stated limit that only `typeRoots` is rebased and the other path-valued options keep their written form.
|
|
46
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the merge order.
|
|
47
|
+
* @evidence contracts/portability.md#os-neutral-implementation The `typeRoots` of the result are absolute native paths, but every other path-valued option keeps its written form relative to the directory of the file that wrote it, so a caller must not read such an option as relative to its own directory.
|
|
48
|
+
* efficient algorithms: One per-read completed map avoids re-reading and recursively merging shared ancestors, while each direct base's option record is combined in order to preserve last-base precedence.
|
|
49
|
+
* reuse equivalent work: Completed ancestors share their parsed and merged values within this request. Each call starts fresh state because files can change between generations.
|
|
50
|
+
* bound retention and release resources: The call allocates its own ancestor set and result map and retains neither globally. Each recursive active entry is removed in finally, including parse and resolution failures.
|
|
51
|
+
*/
|
|
10
52
|
export const read = async (file: string): Promise<ITsConfig> =>
|
|
11
|
-
merge(file, new Set());
|
|
53
|
+
merge(file, new Set(), new Map());
|
|
12
54
|
|
|
13
55
|
const merge = async (
|
|
14
56
|
file: string,
|
|
15
|
-
|
|
57
|
+
active: Set<string>,
|
|
58
|
+
completed: Map<string, ITsConfig>,
|
|
16
59
|
): Promise<ITsConfig> => {
|
|
17
60
|
const location: string = path.resolve(file);
|
|
18
|
-
if (
|
|
19
|
-
|
|
61
|
+
if (active.has(location))
|
|
62
|
+
throw new Error(`Circular tsconfig extends: ${location}`);
|
|
63
|
+
const cached: ITsConfig | undefined = completed.get(location);
|
|
64
|
+
if (cached !== undefined) return cached;
|
|
65
|
+
active.add(location);
|
|
20
66
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const bases: ITsConfig[] = [];
|
|
25
|
-
for (const parent of asArray(current.extends)) {
|
|
26
|
-
const next: string | null = resolveExtends(
|
|
27
|
-
parent,
|
|
67
|
+
try {
|
|
68
|
+
const current: ITsConfig = rebase(
|
|
69
|
+
parse(await fs.promises.readFile(location, "utf8")),
|
|
28
70
|
path.dirname(location),
|
|
29
71
|
);
|
|
30
|
-
|
|
72
|
+
const bases: ITsConfig[] = [];
|
|
73
|
+
for (const parent of asArray(current.extends)) {
|
|
74
|
+
const next: string | null = resolveExtends(
|
|
75
|
+
parent,
|
|
76
|
+
path.dirname(location),
|
|
77
|
+
);
|
|
78
|
+
if (next !== null) bases.push(await merge(next, active, completed));
|
|
79
|
+
}
|
|
80
|
+
const result = [...bases, current].reduce<ITsConfig>(
|
|
81
|
+
(acc, elem) => ({
|
|
82
|
+
...acc,
|
|
83
|
+
...elem,
|
|
84
|
+
compilerOptions: {
|
|
85
|
+
...(acc.compilerOptions ?? {}),
|
|
86
|
+
...(elem.compilerOptions ?? {}),
|
|
87
|
+
},
|
|
88
|
+
}),
|
|
89
|
+
{},
|
|
90
|
+
);
|
|
91
|
+
completed.set(location, result);
|
|
92
|
+
return result;
|
|
93
|
+
} finally {
|
|
94
|
+
active.delete(location);
|
|
31
95
|
}
|
|
32
|
-
return [...bases, current].reduce<ITsConfig>(
|
|
33
|
-
(acc, elem) => ({
|
|
34
|
-
...acc,
|
|
35
|
-
...elem,
|
|
36
|
-
compilerOptions: {
|
|
37
|
-
...(acc.compilerOptions ?? {}),
|
|
38
|
-
...(elem.compilerOptions ?? {}),
|
|
39
|
-
},
|
|
40
|
-
}),
|
|
41
|
-
{},
|
|
42
|
-
);
|
|
43
96
|
};
|
|
44
97
|
|
|
98
|
+
// The compiler reads a relative path of a config against the directory of the
|
|
99
|
+
// file that wrote it, and the merged result no longer says which file that
|
|
100
|
+
// was, so `typeRoots`, the one path-valued option a caller forwards to another
|
|
101
|
+
// project, is made absolute here.
|
|
102
|
+
const rebase = (config: ITsConfig, directory: string): ITsConfig => {
|
|
103
|
+
const typeRoots: unknown = config.compilerOptions?.typeRoots;
|
|
104
|
+
if (Array.isArray(typeRoots) === false) return config;
|
|
105
|
+
return {
|
|
106
|
+
...config,
|
|
107
|
+
compilerOptions: {
|
|
108
|
+
...config.compilerOptions,
|
|
109
|
+
typeRoots: (typeRoots as unknown[]).map((root) =>
|
|
110
|
+
typeof root === "string" ? path.resolve(directory, root) : root,
|
|
111
|
+
),
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
// A byte order mark, which editors on some platforms write, is no JSON.
|
|
45
117
|
const parse = (text: string): ITsConfig =>
|
|
46
|
-
JSON.parse(
|
|
118
|
+
JSON.parse(
|
|
119
|
+
stripTrailingCommas(
|
|
120
|
+
stripJsonComments(text.charCodeAt(0) === 0xfeff ? text.slice(1) : text),
|
|
121
|
+
),
|
|
122
|
+
) as ITsConfig;
|
|
47
123
|
|
|
48
124
|
const asArray = <T>(value: T | T[] | undefined): T[] =>
|
|
49
125
|
value === undefined ? [] : Array.isArray(value) ? value : [value];
|
|
@@ -111,6 +187,28 @@ export namespace TsConfigReader {
|
|
|
111
187
|
return output;
|
|
112
188
|
};
|
|
113
189
|
|
|
114
|
-
|
|
115
|
-
|
|
190
|
+
// a comma followed, past whitespace, by a closing brace or bracket, outside
|
|
191
|
+
// every string, so that the text of a value is never changed
|
|
192
|
+
const stripTrailingCommas = (input: string): string => {
|
|
193
|
+
let output = "";
|
|
194
|
+
let string: false | '"' | "'" = false;
|
|
195
|
+
let escaped = false;
|
|
196
|
+
for (let i = 0; i < input.length; ++i) {
|
|
197
|
+
const ch = input[i]!;
|
|
198
|
+
if (string !== false) {
|
|
199
|
+
output += ch;
|
|
200
|
+
if (escaped) escaped = false;
|
|
201
|
+
else if (ch === "\\") escaped = true;
|
|
202
|
+
else if (ch === string) string = false;
|
|
203
|
+
} else if (ch === '"' || ch === "'") {
|
|
204
|
+
string = ch;
|
|
205
|
+
output += ch;
|
|
206
|
+
} else if (ch === ",") {
|
|
207
|
+
let next = i + 1;
|
|
208
|
+
while (next < input.length && /\s/.test(input[next]!)) ++next;
|
|
209
|
+
if (input[next] !== "}" && input[next] !== "]") output += ch;
|
|
210
|
+
} else output += ch;
|
|
211
|
+
}
|
|
212
|
+
return output;
|
|
213
|
+
};
|
|
116
214
|
}
|
|
@@ -2,13 +2,35 @@ import cp from "child_process";
|
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
import path from "path";
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Runs the `ttsc` compiler of the project.
|
|
7
|
+
*
|
|
8
|
+
* @evidence contracts/common.md#principled-implementation The binary is found from the project's own `ttsc` package, with the SDK's dependency as a fallback, and is run with the current Node.
|
|
9
|
+
* @evidence contracts/common.md#clear-and-simple-design One function and a resolution cache.
|
|
10
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The binary comes from the package manifest, not a fixed path.
|
|
11
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
|
|
12
|
+
* @evidence contracts/portability.md#os-neutral-implementation The compiler runs as a child of the current Node executable (`process.execPath`) on the JavaScript entry that the package manifest's `bin` names, found through Node module resolution from the project directory, so no platform shim (`.cmd`, `.ps1` or shell script) and no `PATH` lookup is involved. Arguments are an array, never a command line, and the entry path is joined with `path.join` and checked with `existsSync`.
|
|
13
|
+
*/
|
|
5
14
|
export namespace TtscExecutor {
|
|
15
|
+
/**
|
|
16
|
+
* Compiles a project with `ttsc` and returns captured output, or null when
|
|
17
|
+
* the selected stdio does not pipe standard output.
|
|
18
|
+
*
|
|
19
|
+
* The cache directory of the environment is passed on, and a non-zero exit
|
|
20
|
+
* throws.
|
|
21
|
+
*
|
|
22
|
+
* @evidence contracts/common.md#principled-implementation The command is run with an argument array and the current Node executable, so no shell or platform shim is involved.
|
|
23
|
+
* @evidence contracts/common.md#clear-and-simple-design One function.
|
|
24
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The environment is extended, not replaced.
|
|
25
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the arguments and the failure.
|
|
26
|
+
* @evidence contracts/portability.md#os-neutral-implementation The working directory and the environment are explicit. Standard output is piped by default with a 64 MiB buffer; callers may select another stdio mode. A non-zero exit surfaces as Node's process error carrying `status` and available captured output.
|
|
27
|
+
*/
|
|
6
28
|
export const run = (props: {
|
|
7
29
|
cwd: string;
|
|
8
30
|
env?: NodeJS.ProcessEnv;
|
|
9
31
|
project: string;
|
|
10
32
|
stdio?: cp.StdioOptions;
|
|
11
|
-
}): Buffer => {
|
|
33
|
+
}): Buffer | null => {
|
|
12
34
|
const args: string[] = [bin(props.cwd), "-p", props.project];
|
|
13
35
|
if (process.env.TTSC_CACHE_DIR !== undefined)
|
|
14
36
|
args.push("--cache-dir", process.env.TTSC_CACHE_DIR);
|
|
@@ -2,27 +2,62 @@ import { VERSION_NEUTRAL, VersionValue } from "@nestjs/common/interfaces";
|
|
|
2
2
|
|
|
3
3
|
import { INestiaProject } from "../structures/INestiaProject";
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Resolves the URI versions of a controller method as NestJS does.
|
|
7
|
+
*
|
|
8
|
+
* @evidence contracts/common.md#principled-implementation The namespace turns version metadata and the default version into path segments.
|
|
9
|
+
* @evidence contracts/common.md#clear-and-simple-design Two functions.
|
|
10
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The precedence is NestJS's.
|
|
11
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
|
|
12
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation VersioningStrategy maps Nest version metadata to URI segments, which are protocol spelling rather than native file paths.
|
|
13
|
+
*/
|
|
5
14
|
export namespace VersioningStrategy {
|
|
15
|
+
/**
|
|
16
|
+
* Casts version metadata to a list: absence stays absent and a single value
|
|
17
|
+
* is a one-element list.
|
|
18
|
+
*
|
|
19
|
+
* @evidence contracts/common.md#principled-implementation A single version becomes a list while absence stays distinct from an explicit empty list, which registers no paths rather than inheriting other versions.
|
|
20
|
+
* @evidence contracts/common.md#clear-and-simple-design One conditional.
|
|
21
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It adds nothing.
|
|
22
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the cases.
|
|
23
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation VersioningStrategy.cast maps Nest version metadata to URI segments, which are protocol spelling rather than native file paths.
|
|
24
|
+
*/
|
|
6
25
|
export const cast = (
|
|
7
26
|
value: VersionValue | undefined,
|
|
8
|
-
): Array<string | typeof VERSION_NEUTRAL> =>
|
|
9
|
-
value === undefined ?
|
|
27
|
+
): Array<string | typeof VERSION_NEUTRAL> | undefined =>
|
|
28
|
+
value === undefined ? undefined : Array.isArray(value) ? value : [value];
|
|
10
29
|
|
|
30
|
+
/**
|
|
31
|
+
* Version path segments of a route, resolved as NestJS resolves them: the
|
|
32
|
+
* method's versions, else the controller's, else the default version, and no
|
|
33
|
+
* version at all is the unversioned path.
|
|
34
|
+
*
|
|
35
|
+
* The controller's and the method's versions were joined, so a method
|
|
36
|
+
* overriding its controller's version was also described at the controller's,
|
|
37
|
+
* and a route with no version and no default got no path at all (#1735).
|
|
38
|
+
*
|
|
39
|
+
* @evidence contracts/common.md#principled-implementation The first present method, controller or default list wins, including an empty list that registers no paths. Duplicates are removed, neutral and absent versions have no segment, and with versioning off the only segment is empty.
|
|
40
|
+
* @evidence contracts/common.md#clear-and-simple-design One curried function.
|
|
41
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The precedence is NestJS's.
|
|
42
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the precedence.
|
|
43
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation VersioningStrategy.merge maps Nest version metadata to URI segments, which are protocol spelling rather than native file paths.
|
|
44
|
+
*/
|
|
11
45
|
export const merge =
|
|
12
46
|
(project: Omit<INestiaProject, "config">) =>
|
|
13
|
-
(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
:
|
|
47
|
+
(props: {
|
|
48
|
+
controller: Array<string | typeof VERSION_NEUTRAL> | undefined;
|
|
49
|
+
method: Array<string | typeof VERSION_NEUTRAL> | undefined;
|
|
50
|
+
}): string[] => {
|
|
51
|
+
const versioning = project.input.versioning;
|
|
52
|
+
if (versioning === undefined) return [""];
|
|
53
|
+
const chosen: Array<string | typeof VERSION_NEUTRAL> | undefined =
|
|
54
|
+
props.method ?? props.controller ?? cast(versioning.defaultVersion);
|
|
55
|
+
if (chosen === undefined) return [""];
|
|
56
|
+
const unique: Array<string | typeof VERSION_NEUTRAL> = [
|
|
57
|
+
...new Set(chosen),
|
|
58
|
+
];
|
|
59
|
+
return unique.map((x) =>
|
|
60
|
+
typeof x === "symbol" ? "" : `${versioning.prefix}${x}`,
|
|
61
|
+
);
|
|
27
62
|
};
|
|
28
63
|
}
|
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
import { MetadataSchema, sizeOf } from "../internal/legacy";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Validates that a type can be a `text/plain` body or response.
|
|
5
|
+
*
|
|
6
|
+
* @evidence contracts/common.md#principled-implementation A plain text body is a string, so the type may hold only string forms.
|
|
7
|
+
* @evidence contracts/common.md#clear-and-simple-design One function.
|
|
8
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rule follows the content type.
|
|
9
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
|
|
10
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation TextPlainValidator checks the metadata union accepted for a text/plain payload; it owns no native filesystem or executable representation.
|
|
11
|
+
*/
|
|
3
12
|
export namespace TextPlainValidator {
|
|
13
|
+
/**
|
|
14
|
+
* Returns an error message unless every member of the metadata is a string, a
|
|
15
|
+
* string constant, a string template, or the native String.
|
|
16
|
+
*
|
|
17
|
+
* @evidence contracts/common.md#principled-implementation The number of string forms is counted and compared with the size of the metadata, so any other form makes the counts differ, and an empty type is also refused.
|
|
18
|
+
* @evidence contracts/common.md#clear-and-simple-design One function.
|
|
19
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The count is exact and no type is special-cased.
|
|
20
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the accepted forms.
|
|
21
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation TextPlainValidator.validate checks the metadata union accepted for a text/plain payload; it owns no native filesystem or executable representation.
|
|
22
|
+
*/
|
|
4
23
|
export const validate = (props: { metadata: MetadataSchema }): string[] => {
|
|
5
24
|
const expected: number =
|
|
6
25
|
props.metadata.atomics.filter((a) => a.type === "string").length +
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { OpenApi } from "@typia/interface";
|
|
2
|
-
import { MetadataSchema } from "../../internal/legacy";
|
|
3
|
-
export declare namespace SwaggerReadonlyArrayEmender {
|
|
4
|
-
const emend: (props: {
|
|
5
|
-
components: OpenApi.IComponents;
|
|
6
|
-
schema: OpenApi.IJsonSchema | undefined;
|
|
7
|
-
metadata: MetadataSchema;
|
|
8
|
-
}) => void;
|
|
9
|
-
}
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SwaggerReadonlyArrayEmender = void 0;
|
|
4
|
-
var SwaggerReadonlyArrayEmender;
|
|
5
|
-
(function (SwaggerReadonlyArrayEmender) {
|
|
6
|
-
SwaggerReadonlyArrayEmender.emend = (props) => {
|
|
7
|
-
const visited = {
|
|
8
|
-
aliases: new WeakSet(),
|
|
9
|
-
arrays: new WeakSet(),
|
|
10
|
-
objects: new WeakSet(),
|
|
11
|
-
schemas: new WeakSet(),
|
|
12
|
-
tuples: new WeakSet(),
|
|
13
|
-
};
|
|
14
|
-
visitMetadata({
|
|
15
|
-
components: props.components,
|
|
16
|
-
schema: props.schema,
|
|
17
|
-
metadata: props.metadata,
|
|
18
|
-
visited,
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
})(SwaggerReadonlyArrayEmender || (exports.SwaggerReadonlyArrayEmender = SwaggerReadonlyArrayEmender = {}));
|
|
22
|
-
const visitMetadata = (props) => {
|
|
23
|
-
if (props.schema !== undefined && isReadonlyArrayLike(props.metadata))
|
|
24
|
-
setReadonlyArray(props.schema);
|
|
25
|
-
if (props.visited.schemas.has(props.metadata))
|
|
26
|
-
return;
|
|
27
|
-
props.visited.schemas.add(props.metadata);
|
|
28
|
-
for (const array of props.metadata.arrays) {
|
|
29
|
-
const type = array.type;
|
|
30
|
-
if (type !== undefined)
|
|
31
|
-
visitArrayType({
|
|
32
|
-
components: props.components,
|
|
33
|
-
schema: arraySchema(props.schema),
|
|
34
|
-
type,
|
|
35
|
-
visited: props.visited,
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
for (const tuple of props.metadata.tuples) {
|
|
39
|
-
const type = tuple.type;
|
|
40
|
-
if (type !== undefined)
|
|
41
|
-
visitTupleType({
|
|
42
|
-
components: props.components,
|
|
43
|
-
schema: props.schema,
|
|
44
|
-
type,
|
|
45
|
-
visited: props.visited,
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
for (const alias of props.metadata.aliases) {
|
|
49
|
-
const type = alias.type;
|
|
50
|
-
if (type !== undefined)
|
|
51
|
-
visitAliasType({
|
|
52
|
-
components: props.components,
|
|
53
|
-
schema: componentSchema(props.components, type.name),
|
|
54
|
-
type,
|
|
55
|
-
visited: props.visited,
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
for (const object of props.metadata.objects) {
|
|
59
|
-
const type = object.type;
|
|
60
|
-
if (type !== undefined)
|
|
61
|
-
visitObjectType({
|
|
62
|
-
components: props.components,
|
|
63
|
-
type,
|
|
64
|
-
visited: props.visited,
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
const visitAliasType = (props) => {
|
|
69
|
-
if (props.visited.aliases.has(props.type))
|
|
70
|
-
return;
|
|
71
|
-
props.visited.aliases.add(props.type);
|
|
72
|
-
if (props.schema !== undefined && isReadonlyArrayLike(props.type.value))
|
|
73
|
-
setReadonlyArray(props.schema);
|
|
74
|
-
visitMetadata({
|
|
75
|
-
components: props.components,
|
|
76
|
-
schema: props.schema,
|
|
77
|
-
metadata: props.type.value,
|
|
78
|
-
visited: props.visited,
|
|
79
|
-
});
|
|
80
|
-
};
|
|
81
|
-
const visitArrayType = (props) => {
|
|
82
|
-
var _a;
|
|
83
|
-
if (props.visited.arrays.has(props.type))
|
|
84
|
-
return;
|
|
85
|
-
props.visited.arrays.add(props.type);
|
|
86
|
-
const component = componentSchema(props.components, props.type.name);
|
|
87
|
-
if (component !== undefined && isReadonlyArrayName(props.type.name))
|
|
88
|
-
setReadonlyArray(component);
|
|
89
|
-
visitMetadata({
|
|
90
|
-
components: props.components,
|
|
91
|
-
schema: arraySchema((_a = props.schema) !== null && _a !== void 0 ? _a : component),
|
|
92
|
-
metadata: props.type.value,
|
|
93
|
-
visited: props.visited,
|
|
94
|
-
});
|
|
95
|
-
};
|
|
96
|
-
const visitTupleType = (props) => {
|
|
97
|
-
var _a;
|
|
98
|
-
if (props.visited.tuples.has(props.type))
|
|
99
|
-
return;
|
|
100
|
-
props.visited.tuples.add(props.type);
|
|
101
|
-
const component = componentSchema(props.components, props.type.name);
|
|
102
|
-
if (component !== undefined && isReadonlyArrayName(props.type.name))
|
|
103
|
-
setReadonlyArray(component);
|
|
104
|
-
const schema = objectSchema((_a = props.schema) !== null && _a !== void 0 ? _a : component);
|
|
105
|
-
props.type.elements.forEach((metadata, index) => visitMetadata({
|
|
106
|
-
components: props.components,
|
|
107
|
-
schema: Array.isArray(schema === null || schema === void 0 ? void 0 : schema.prefixItems)
|
|
108
|
-
? schema.prefixItems[index]
|
|
109
|
-
: undefined,
|
|
110
|
-
metadata,
|
|
111
|
-
visited: props.visited,
|
|
112
|
-
}));
|
|
113
|
-
};
|
|
114
|
-
const visitObjectType = (props) => {
|
|
115
|
-
if (props.visited.objects.has(props.type))
|
|
116
|
-
return;
|
|
117
|
-
props.visited.objects.add(props.type);
|
|
118
|
-
const schema = objectSchema(componentSchema(props.components, props.type.name));
|
|
119
|
-
const properties = schema === null || schema === void 0 ? void 0 : schema.properties;
|
|
120
|
-
for (const property of props.type.properties) {
|
|
121
|
-
const key = propertyKey(property.key);
|
|
122
|
-
const child = key === undefined ? undefined : properties === null || properties === void 0 ? void 0 : properties[key];
|
|
123
|
-
visitMetadata({
|
|
124
|
-
components: props.components,
|
|
125
|
-
schema: child,
|
|
126
|
-
metadata: property.value,
|
|
127
|
-
visited: props.visited,
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
const isReadonlyArrayLike = (metadata, visited = new WeakSet()) => {
|
|
132
|
-
if (visited.has(metadata))
|
|
133
|
-
return false;
|
|
134
|
-
visited.add(metadata);
|
|
135
|
-
const name = metadata.name;
|
|
136
|
-
return ((typeof name === "string" && isReadonlyArrayName(name)) ||
|
|
137
|
-
metadata.arrays.some((array) => isReadonlyArrayName(array.name)) ||
|
|
138
|
-
metadata.tuples.some((tuple) => isReadonlyArrayName(tuple.name)) ||
|
|
139
|
-
metadata.aliases.some((alias) => {
|
|
140
|
-
const type = alias.type;
|
|
141
|
-
return type !== undefined && isReadonlyArrayLike(type.value, visited);
|
|
142
|
-
}));
|
|
143
|
-
};
|
|
144
|
-
const isReadonlyArrayName = (name) => {
|
|
145
|
-
const compact = name.replace(/\s+/g, "");
|
|
146
|
-
// Metadata identity names pass through the generator's name replacer, which
|
|
147
|
-
// strips TypeScript punctuation for schema-key safety — depending on the
|
|
148
|
-
// compiler shim, `ReadonlyArray<string>` arrives here as "ReadonlyArray",
|
|
149
|
-
// "ReadonlyArray<string>", or the stripped "ReadonlyArraystring", and
|
|
150
|
-
// `readonly string[]` as "readonly string[]" or "readonlystring". Match on
|
|
151
|
-
// the prefixes that survive every form; this predicate only ever sees names
|
|
152
|
-
// of array/tuple metadata entries, whose spelling the generator controls
|
|
153
|
-
// ("readonly" is case-sensitive, so PascalCase user types cannot collide).
|
|
154
|
-
return compact.startsWith("ReadonlyArray") || compact.startsWith("readonly");
|
|
155
|
-
};
|
|
156
|
-
const componentSchema = (components, name) => { var _a; return ((_a = components.schemas) !== null && _a !== void 0 ? _a : {})[name]; };
|
|
157
|
-
const arraySchema = (schema) => {
|
|
158
|
-
const obj = objectSchema(schema);
|
|
159
|
-
return obj === null || obj === void 0 ? void 0 : obj.items;
|
|
160
|
-
};
|
|
161
|
-
const objectSchema = (schema) => typeof schema === "object" && schema !== null
|
|
162
|
-
? schema
|
|
163
|
-
: undefined;
|
|
164
|
-
const propertyKey = (metadata) => {
|
|
165
|
-
var _a, _b;
|
|
166
|
-
const value = (_b = (_a = metadata.constants[0]) === null || _a === void 0 ? void 0 : _a.values[0]) === null || _b === void 0 ? void 0 : _b.value;
|
|
167
|
-
return typeof value === "string"
|
|
168
|
-
? value
|
|
169
|
-
: typeof value === "number"
|
|
170
|
-
? String(value)
|
|
171
|
-
: undefined;
|
|
172
|
-
};
|
|
173
|
-
const setReadonlyArray = (schema) => {
|
|
174
|
-
const obj = objectSchema(schema);
|
|
175
|
-
if (obj !== undefined)
|
|
176
|
-
obj["x-readonly-array"] = true;
|
|
177
|
-
};
|
|
178
|
-
//# sourceMappingURL=SwaggerReadonlyArrayEmender.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SwaggerReadonlyArrayEmender.js","sourceRoot":"","sources":["../../../src/generates/internal/SwaggerReadonlyArrayEmender.ts"],"names":[],"mappings":";;;AAYA,IAAiB,2BAA2B,CAoB3C;AApBD,WAAiB,2BAA2B;IAC7B,iCAAK,GAAG,CAAC,KAIrB,EAAQ,EAAE;QACT,MAAM,OAAO,GAAa;YACxB,OAAO,EAAE,IAAI,OAAO,EAAE;YACtB,MAAM,EAAE,IAAI,OAAO,EAAE;YACrB,OAAO,EAAE,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