@nestia/sdk 14.0.1 → 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/assets/bundle/distribute/build-sdk.cjs +28 -0
- package/assets/bundle/distribute/package.json +6 -2
- package/lib/INestiaConfig.d.ts +55 -24
- package/lib/NestiaSdkApplication.d.ts +60 -0
- package/lib/NestiaSdkApplication.js +63 -5
- package/lib/NestiaSdkApplication.js.map +1 -1
- package/lib/NestiaSwaggerComposer.d.ts +21 -0
- package/lib/NestiaSwaggerComposer.js +21 -3
- 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 +48 -73
- 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 +24 -0
- package/lib/analyses/ParameterNameAnalyzer.js +15 -0
- package/lib/analyses/ParameterNameAnalyzer.js.map +1 -1
- package/lib/analyses/PathAnalyzer.d.ts +63 -1
- package/lib/analyses/PathAnalyzer.js +54 -9
- package/lib/analyses/PathAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectControllerAnalyzer.d.ts +32 -0
- package/lib/analyses/ReflectControllerAnalyzer.js +22 -0
- package/lib/analyses/ReflectControllerAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectHttpOperationAnalyzer.d.ts +29 -0
- package/lib/analyses/ReflectHttpOperationAnalyzer.js +28 -17
- 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 +21 -0
- package/lib/analyses/ReflectHttpOperationParameterAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectHttpOperationResponseAnalyzer.d.ts +32 -0
- package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js +22 -0
- package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectMcpOperationAnalyzer.d.ts +29 -0
- package/lib/analyses/ReflectMcpOperationAnalyzer.js +30 -9
- 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 +21 -2
- package/lib/analyses/ReflectWebSocketOperationAnalyzer.js.map +1 -1
- package/lib/analyses/SecurityAnalyzer.d.ts +15 -0
- package/lib/analyses/SecurityAnalyzer.js +15 -0
- package/lib/analyses/SecurityAnalyzer.js.map +1 -1
- package/lib/analyses/SwaggerExampleAnalyzer.d.ts +16 -0
- package/lib/analyses/SwaggerExampleAnalyzer.js +16 -0
- package/lib/analyses/SwaggerExampleAnalyzer.js.map +1 -1
- package/lib/analyses/TypedHttpRouteAnalyzer.d.ts +41 -3
- package/lib/analyses/TypedHttpRouteAnalyzer.js +172 -157
- 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 +19 -0
- 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 +122 -38
- 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/factories/ExpressionFactory.d.ts +17 -2
- package/lib/factories/ExpressionFactory.js +17 -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 +30 -10
- 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 +40 -2
- package/lib/generates/SdkGenerator.js.map +1 -1
- package/lib/generates/SwaggerGenerator.d.ts +36 -6
- package/lib/generates/SwaggerGenerator.js +55 -13
- 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 +43 -0
- package/lib/generates/internal/FilePrinter.js +43 -0
- package/lib/generates/internal/FilePrinter.js.map +1 -1
- package/lib/generates/internal/ImportDictionary.d.ts +92 -2
- package/lib/generates/internal/ImportDictionary.js +91 -3
- package/lib/generates/internal/ImportDictionary.js.map +1 -1
- package/lib/generates/internal/SdkAliasCollection.d.ts +119 -0
- package/lib/generates/internal/SdkAliasCollection.js +124 -7
- package/lib/generates/internal/SdkAliasCollection.js.map +1 -1
- package/lib/generates/internal/SdkDistributionComposer.d.ts +19 -0
- package/lib/generates/internal/SdkDistributionComposer.js +98 -59
- package/lib/generates/internal/SdkDistributionComposer.js.map +1 -1
- package/lib/generates/internal/SdkFileProgrammer.d.ts +18 -0
- package/lib/generates/internal/SdkFileProgrammer.js +18 -0
- 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 +19 -0
- package/lib/generates/internal/SdkHttpFunctionProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.d.ts +19 -0
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.js +19 -0
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpParameterProgrammer.d.ts +104 -2
- package/lib/generates/internal/SdkHttpParameterProgrammer.js +70 -0
- package/lib/generates/internal/SdkHttpParameterProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpRouteProgrammer.d.ts +20 -0
- package/lib/generates/internal/SdkHttpRouteProgrammer.js +20 -0
- package/lib/generates/internal/SdkHttpRouteProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpSimulationProgrammer.d.ts +38 -0
- package/lib/generates/internal/SdkHttpSimulationProgrammer.js +49 -5
- 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 +33 -13
- package/lib/generates/internal/SdkMcpRouteProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkPathTemplate.d.ts +15 -0
- package/lib/generates/internal/SdkPathTemplate.js +15 -0
- package/lib/generates/internal/SdkPathTemplate.js.map +1 -1
- 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 +96 -12
- package/lib/generates/internal/SdkTypeProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkTypeTagProgrammer.d.ts +36 -3
- package/lib/generates/internal/SdkTypeTagProgrammer.js +28 -7
- 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 +19 -0
- package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkWebSocketParameterProgrammer.d.ts +81 -2
- package/lib/generates/internal/SdkWebSocketParameterProgrammer.js +48 -0
- package/lib/generates/internal/SdkWebSocketParameterProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkWebSocketRouteProgrammer.d.ts +18 -0
- package/lib/generates/internal/SdkWebSocketRouteProgrammer.js +18 -0
- 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 +18 -0
- package/lib/generates/internal/SwaggerOperationComposer.js.map +1 -1
- package/lib/generates/internal/SwaggerOperationParameterComposer.d.ts +39 -0
- package/lib/generates/internal/SwaggerOperationParameterComposer.js +31 -8
- package/lib/generates/internal/SwaggerOperationParameterComposer.js.map +1 -1
- package/lib/generates/internal/SwaggerOperationResponseComposer.d.ts +19 -0
- package/lib/generates/internal/SwaggerOperationResponseComposer.js +19 -0
- package/lib/generates/internal/SwaggerOperationResponseComposer.js.map +1 -1
- package/lib/internal/legacy.d.ts +296 -16
- package/lib/internal/legacy.js +127 -10
- 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 +55 -0
- package/lib/structures/IReflectController.d.ts +10 -0
- package/lib/structures/IReflectHttpOperation.d.ts +10 -0
- package/lib/structures/IReflectHttpOperationException.d.ts +10 -0
- package/lib/structures/IReflectHttpOperationParameter.d.ts +47 -0
- package/lib/structures/IReflectHttpOperationSuccess.d.ts +11 -0
- 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 +10 -0
- package/lib/structures/ITypedHttpRouteException.d.ts +10 -0
- package/lib/structures/ITypedHttpRouteParameter.d.ts +45 -0
- package/lib/structures/ITypedHttpRouteSuccess.d.ts +10 -0
- package/lib/structures/ITypedMcpRoute.d.ts +11 -0
- package/lib/structures/ITypedWebSocketRoute.d.ts +10 -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 +35 -0
- package/lib/utils/SourceFinder.js +47 -12
- 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 +26 -1
- package/lib/utils/VersioningStrategy.js +30 -9
- 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_metadata_json.go +6 -1
- package/native/sdk/sdk_transform.go +388 -397
- package/package.json +7 -5
- package/src/INestiaConfig.ts +55 -24
- package/src/NestiaSdkApplication.ts +66 -7
- package/src/NestiaSwaggerComposer.ts +21 -6
- package/src/analyses/AccessorAnalyzer.ts +26 -0
- package/src/analyses/ConfigAnalyzer.ts +49 -87
- package/src/analyses/ImportAnalyzer.ts +25 -0
- package/src/analyses/ParameterNameAnalyzer.ts +24 -0
- package/src/analyses/PathAnalyzer.ts +63 -11
- package/src/analyses/ReflectControllerAnalyzer.ts +32 -0
- package/src/analyses/ReflectHttpOperationAnalyzer.ts +32 -10
- package/src/analyses/ReflectHttpOperationExceptionAnalyzer.ts +31 -0
- package/src/analyses/ReflectHttpOperationParameterAnalyzer.ts +31 -0
- package/src/analyses/ReflectHttpOperationResponseAnalyzer.ts +32 -0
- package/src/analyses/ReflectMcpOperationAnalyzer.ts +32 -1
- package/src/analyses/ReflectMetadataAnalyzer.ts +47 -0
- package/src/analyses/ReflectWebSocketOperationAnalyzer.ts +33 -4
- package/src/analyses/SecurityAnalyzer.ts +15 -0
- package/src/analyses/SwaggerExampleAnalyzer.ts +16 -0
- package/src/analyses/TypedHttpRouteAnalyzer.ts +240 -184
- package/src/analyses/TypedMcpRouteAnalyzer.ts +180 -20
- package/src/analyses/TypedWebSocketRouteAnalyzer.ts +19 -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 +169 -41
- package/src/executable/internal/NestiaSwaggerWatch.ts +359 -0
- package/src/factories/ExpressionFactory.ts +17 -2
- package/src/factories/IdentifierFactory.ts +24 -0
- package/src/factories/LiteralFactory.ts +44 -11
- 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 +40 -9
- package/src/generates/SwaggerGenerator.ts +56 -14
- package/src/generates/internal/E2eFileProgrammer.ts +20 -0
- package/src/generates/internal/FilePrinter.ts +43 -0
- package/src/generates/internal/ImportDictionary.ts +110 -3
- package/src/generates/internal/SdkAliasCollection.ts +133 -11
- package/src/generates/internal/SdkDistributionComposer.ts +117 -66
- package/src/generates/internal/SdkFileProgrammer.ts +18 -0
- package/src/generates/internal/SdkHttpCloneProgrammer.ts +55 -0
- package/src/generates/internal/SdkHttpCloneReferencer.ts +97 -23
- package/src/generates/internal/SdkHttpFunctionProgrammer.ts +19 -0
- package/src/generates/internal/SdkHttpNamespaceProgrammer.ts +19 -0
- package/src/generates/internal/SdkHttpParameterProgrammer.ts +104 -2
- package/src/generates/internal/SdkHttpRouteProgrammer.ts +20 -0
- package/src/generates/internal/SdkHttpSimulationProgrammer.ts +72 -5
- package/src/generates/internal/SdkImportWizard.ts +63 -0
- package/src/generates/internal/SdkMcpRouteProgrammer.ts +38 -18
- package/src/generates/internal/SdkPathTemplate.ts +15 -0
- package/src/generates/internal/SdkRouteDirectory.ts +10 -0
- package/src/generates/internal/SdkTypeProgrammer.ts +118 -14
- package/src/generates/internal/SdkTypeTagProgrammer.ts +37 -7
- package/src/generates/internal/SdkWebSocketCloneProgrammer.ts +185 -142
- package/src/generates/internal/SdkWebSocketNamespaceProgrammer.ts +19 -0
- package/src/generates/internal/SdkWebSocketParameterProgrammer.ts +81 -2
- package/src/generates/internal/SdkWebSocketRouteProgrammer.ts +18 -0
- package/src/generates/internal/SwaggerDescriptionComposer.ts +47 -1
- package/src/generates/internal/SwaggerOperationComposer.ts +18 -0
- package/src/generates/internal/SwaggerOperationParameterComposer.ts +41 -8
- package/src/generates/internal/SwaggerOperationResponseComposer.ts +19 -0
- package/src/internal/legacy-augmentation.d.ts +16 -0
- package/src/internal/legacy.ts +296 -26
- package/src/structures/INestiaProject.ts +10 -0
- package/src/structures/INestiaSdkInput.ts +30 -0
- package/src/structures/IOperationMetadata.ts +55 -0
- package/src/structures/IReflectController.ts +10 -0
- package/src/structures/IReflectHttpOperation.ts +10 -0
- package/src/structures/IReflectHttpOperationException.ts +10 -0
- package/src/structures/IReflectHttpOperationParameter.ts +47 -0
- package/src/structures/IReflectHttpOperationSuccess.ts +11 -0
- 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 +10 -0
- package/src/structures/ITypedHttpRouteException.ts +10 -0
- package/src/structures/ITypedHttpRouteParameter.ts +45 -0
- package/src/structures/ITypedHttpRouteSuccess.ts +10 -0
- package/src/structures/ITypedMcpRoute.ts +12 -0
- package/src/structures/ITypedWebSocketRoute.ts +10 -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 +51 -14
- 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 +33 -13
- 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/src/generates/internal/SwaggerReadonlyArrayEmender.ts +0 -264
|
@@ -2,7 +2,26 @@ import { IOperationMetadata } from "../structures/IOperationMetadata";
|
|
|
2
2
|
import { IReflectController } from "../structures/IReflectController";
|
|
3
3
|
import { IReflectHttpOperationParameter } from "../structures/IReflectHttpOperationParameter";
|
|
4
4
|
import { IReflectOperationError } from "../structures/IReflectOperationError";
|
|
5
|
+
/**
|
|
6
|
+
* Reflects the parameters of a route method.
|
|
7
|
+
*
|
|
8
|
+
* @evidence contracts/common.md#principled-implementation Nest's route argument metadata gives each parameter's category and position, the nestia decorators are recognized by the name of their factory function, the metadata of the transform gives the type, and the wire rules of the HTTP input are checked against it.
|
|
9
|
+
* @evidence contracts/common.md#clear-and-simple-design One public function with private classification and duplicate checks.
|
|
10
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The recognition by factory name couples this package to the function names of `@nestia/core`, a contract between the two packages.
|
|
11
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
|
|
12
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationParameterAnalyzer analyzes reflected route metadata; 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 ReflectHttpOperationParameterAnalyzer {
|
|
15
|
+
/**
|
|
16
|
+
* The input of the parameter analysis: the controller, the method, its name,
|
|
17
|
+
* the HTTP method, the metadata, and the error list.
|
|
18
|
+
*
|
|
19
|
+
* @evidence contracts/common.md#principled-implementation The record holds what the analysis needs.
|
|
20
|
+
* @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
|
|
21
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
22
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the type describes and the meaning of its members.
|
|
23
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationParameterAnalyzer.IContext analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
24
|
+
*/
|
|
6
25
|
interface IContext {
|
|
7
26
|
controller: IReflectController;
|
|
8
27
|
function: Function;
|
|
@@ -11,5 +30,17 @@ export declare namespace ReflectHttpOperationParameterAnalyzer {
|
|
|
11
30
|
metadata: IOperationMetadata;
|
|
12
31
|
errors: IReflectOperationError[];
|
|
13
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Returns the parameters of a route method in position order.
|
|
35
|
+
*
|
|
36
|
+
* Contradictions, such as a body on GET, duplicated bodies or fields,
|
|
37
|
+
* unreadable types, and types the HTTP input cannot carry, are errors.
|
|
38
|
+
*
|
|
39
|
+
* @evidence contracts/common.md#principled-implementation Contradictions are collected first, each parameter is composed with the schema that matches its content type, its wire rules are checked, unnamed parameters are named, and duplicate keys between field parameters and objects are reported.
|
|
40
|
+
* @evidence contracts/common.md#clear-and-simple-design One function that gathers every error before returning.
|
|
41
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Every rule follows the HTTP or NestJS contract, and a parameter that cannot be sent is an error, not silently dropped.
|
|
42
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the errors.
|
|
43
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationParameterAnalyzer.analyze analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
44
|
+
*/
|
|
14
45
|
const analyze: (ctx: IContext) => IReflectHttpOperationParameter[];
|
|
15
46
|
}
|
|
@@ -18,8 +18,29 @@ const legacy_1 = require("../internal/legacy");
|
|
|
18
18
|
const TextPlainValidator_1 = require("../validators/TextPlainValidator");
|
|
19
19
|
const ParameterNameAnalyzer_1 = require("./ParameterNameAnalyzer");
|
|
20
20
|
const SwaggerExampleAnalyzer_1 = require("./SwaggerExampleAnalyzer");
|
|
21
|
+
/**
|
|
22
|
+
* Reflects the parameters of a route method.
|
|
23
|
+
*
|
|
24
|
+
* @evidence contracts/common.md#principled-implementation Nest's route argument metadata gives each parameter's category and position, the nestia decorators are recognized by the name of their factory function, the metadata of the transform gives the type, and the wire rules of the HTTP input are checked against it.
|
|
25
|
+
* @evidence contracts/common.md#clear-and-simple-design One public function with private classification and duplicate checks.
|
|
26
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The recognition by factory name couples this package to the function names of `@nestia/core`, a contract between the two packages.
|
|
27
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
|
|
28
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationParameterAnalyzer analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
29
|
+
*/
|
|
21
30
|
var ReflectHttpOperationParameterAnalyzer;
|
|
22
31
|
(function (ReflectHttpOperationParameterAnalyzer) {
|
|
32
|
+
/**
|
|
33
|
+
* Returns the parameters of a route method in position order.
|
|
34
|
+
*
|
|
35
|
+
* Contradictions, such as a body on GET, duplicated bodies or fields,
|
|
36
|
+
* unreadable types, and types the HTTP input cannot carry, are errors.
|
|
37
|
+
*
|
|
38
|
+
* @evidence contracts/common.md#principled-implementation Contradictions are collected first, each parameter is composed with the schema that matches its content type, its wire rules are checked, unnamed parameters are named, and duplicate keys between field parameters and objects are reported.
|
|
39
|
+
* @evidence contracts/common.md#clear-and-simple-design One function that gathers every error before returning.
|
|
40
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Every rule follows the HTTP or NestJS contract, and a parameter that cannot be sent is an error, not silently dropped.
|
|
41
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the errors.
|
|
42
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationParameterAnalyzer.analyze analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
43
|
+
*/
|
|
23
44
|
ReflectHttpOperationParameterAnalyzer.analyze = (ctx) => {
|
|
24
45
|
const preconfigured = analyzePreconfigured(ctx);
|
|
25
46
|
const errors = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReflectHttpOperationParameterAnalyzer.js","sourceRoot":"","sources":["../../src/analyses/ReflectHttpOperationParameterAnalyzer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,wDAA+D;AAC/D,sFAA6E;AAE7E,+CAAyD;AAKzD,yEAAsE;AACtE,mEAAgE;AAChE,qEAAkE;AAElE,IAAiB,qCAAqC,CAiZrD;AAjZD,WAAiB,qCAAqC;IASvC,6CAAO,GAAG,CAAC,GAAa,EAAoC,EAAE;QACzE,MAAM,aAAa,GACjB,oBAAoB,CAAC,GAAG,CAAC,CAAC;QAC5B,MAAM,MAAM,GAA6B,EAAE,CAAC;QAE5C,MAAM;QACN,sBAAsB;QACtB,MAAM;QACN,sBAAsB;QACtB,MAAM,gBAAgB,GAAa,EAAE,CAAC;QACtC,MAAM,UAAU,GAAG,CAAC,OAAe,EAAE,EAAE;YACrC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,CAAC;QACF,IACE,CAAC,GAAG,CAAC,UAAU,KAAK,KAAK,IAAI,GAAG,CAAC,UAAU,KAAK,MAAM,CAAC;YACvD,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC;YAEhD,UAAU,CAAC,iCAAiC,GAAG,CAAC,UAAU,UAAU,CAAC,CAAC;QAExE,uBAAuB;QACvB,IACE,aAAa,CAAC,MAAM,CAClB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,IAAI,CAAC,CAAC,KAAK,KAAK,SAAS,CACtD,CAAC,MAAM,GAAG,CAAC;YAEZ,UAAU,CAAC,oCAAoC,CAAC,C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O;gBACL,QAAQ,EAAE,OAAO;gBACjB,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,KAAK,EAAE,KAAK,CAAC,IAAI;aAClB,CAAC;aACC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,YAAY;YAC1C,OAAO;gBACL,QAAQ,EAAE,OAAO;gBACjB,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,KAAK,EAAE,SAAS;aACjB,CAAC;;YACC,OAAO,IAAI,CAAC;IACnB,CAAC,CAAC;IAEF,MAAM,QAAQ,GAAG,CAAC,MAAgB,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,MAAM,CAAC;AAChF,CAAC,EAjZgB,qCAAqC,aAArC,qCAAqC,GAArC,qCAAqC,QAiZrD;AAYD,MAAM,gBAAgB,GAAG,CAAC,KAAsB,EAAE,EAAE;IAClD,IAAI,KAAK,KAAK,uCAAe,CAAC,IAAI;QAAE,OAAO,MAAM,CAAC;SAC7C,IAAI,KAAK,KAAK,uCAAe,CAAC,OAAO;QAAE,OAAO,SAAS,CAAC;SACxD,IAAI,KAAK,KAAK,uCAAe,CAAC,KAAK;QAAE,OAAO,OAAO,CAAC;SACpD,IAAI,KAAK,KAAK,uCAAe,CAAC,KAAK;QAAE,OAAO,OAAO,CAAC;IACzD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"ReflectHttpOperationParameterAnalyzer.js","sourceRoot":"","sources":["../../src/analyses/ReflectHttpOperationParameterAnalyzer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,wDAA+D;AAC/D,sFAA6E;AAE7E,+CAAyD;AAKzD,yEAAsE;AACtE,mEAAgE;AAChE,qEAAkE;AAElE;;;;;;;;GAQG;AACH,IAAiB,qCAAqC,CAuarD;AAvaD,WAAiB,qCAAqC;IAmBpD;;;;;;;;;;;OAWG;IACU,6CAAO,GAAG,CAAC,GAAa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F,CAAC,EAvagB,qCAAqC,aAArC,qCAAqC,GAArC,qCAAqC,QAuarD;AAYD,MAAM,gBAAgB,GAAG,CAAC,KAAsB,EAAE,EAAE;IAClD,IAAI,KAAK,KAAK,uCAAe,CAAC,IAAI;QAAE,OAAO,MAAM,CAAC;SAC7C,IAAI,KAAK,KAAK,uCAAe,CAAC,OAAO;QAAE,OAAO,SAAS,CAAC;SACxD,IAAI,KAAK,KAAK,uCAAe,CAAC,KAAK;QAAE,OAAO,OAAO,CAAC;SACpD,IAAI,KAAK,KAAK,uCAAe,CAAC,KAAK;QAAE,OAAO,OAAO,CAAC;IACzD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
|
@@ -2,7 +2,26 @@ import { IOperationMetadata } from "../structures/IOperationMetadata";
|
|
|
2
2
|
import { IReflectController } from "../structures/IReflectController";
|
|
3
3
|
import { IReflectHttpOperationSuccess } from "../structures/IReflectHttpOperationSuccess";
|
|
4
4
|
import { IReflectOperationError } from "../structures/IReflectOperationError";
|
|
5
|
+
/**
|
|
6
|
+
* Reflects the success response of a route method.
|
|
7
|
+
*
|
|
8
|
+
* @evidence contracts/common.md#principled-implementation The content type comes from the encryption and query interceptors, then the headers metadata, then the produces metadata, then the method default; the status comes from the HTTP code metadata or the method default; binary types skip the schema.
|
|
9
|
+
* @evidence contracts/common.md#clear-and-simple-design One public function with small private helpers.
|
|
10
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The order follows how NestJS and nestia decorate a route.
|
|
11
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
|
|
12
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationResponseAnalyzer analyzes reflected route metadata; 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 ReflectHttpOperationResponseAnalyzer {
|
|
15
|
+
/**
|
|
16
|
+
* The input of the response analysis: the controller, the method, its name,
|
|
17
|
+
* the HTTP method, the metadata, and the error list.
|
|
18
|
+
*
|
|
19
|
+
* @evidence contracts/common.md#principled-implementation The record holds what the analysis needs.
|
|
20
|
+
* @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
|
|
21
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
22
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the type describes and the meaning of its members.
|
|
23
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationResponseAnalyzer.IContext analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
24
|
+
*/
|
|
6
25
|
interface IContext {
|
|
7
26
|
controller: IReflectController;
|
|
8
27
|
function: Function;
|
|
@@ -11,5 +30,18 @@ export declare namespace ReflectHttpOperationResponseAnalyzer {
|
|
|
11
30
|
metadata: IOperationMetadata;
|
|
12
31
|
errors: IReflectOperationError[];
|
|
13
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Returns the success response of a method, or `null` when it cannot be
|
|
35
|
+
* described; the reasons are pushed to the errors.
|
|
36
|
+
*
|
|
37
|
+
* A HEAD method must have no content type, and an unsupported content type is
|
|
38
|
+
* an error.
|
|
39
|
+
*
|
|
40
|
+
* @evidence contracts/common.md#principled-implementation The schema is the primitive form for JSON and the resolved form for other types, the validator depends on the content type, and the status defaults to 201 for POST and 200 otherwise.
|
|
41
|
+
* @evidence contracts/common.md#clear-and-simple-design One function.
|
|
42
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The defaults are NestJS's.
|
|
43
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the null result and the two errors.
|
|
44
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationResponseAnalyzer.analyze analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
45
|
+
*/
|
|
14
46
|
const analyze: (ctx: IContext) => IReflectHttpOperationSuccess | null;
|
|
15
47
|
}
|
|
@@ -6,8 +6,30 @@ const legacy_1 = require("../internal/legacy");
|
|
|
6
6
|
const HttpResponseContentTypeUtil_1 = require("../utils/HttpResponseContentTypeUtil");
|
|
7
7
|
const TextPlainValidator_1 = require("../validators/TextPlainValidator");
|
|
8
8
|
const SwaggerExampleAnalyzer_1 = require("./SwaggerExampleAnalyzer");
|
|
9
|
+
/**
|
|
10
|
+
* Reflects the success response of a route method.
|
|
11
|
+
*
|
|
12
|
+
* @evidence contracts/common.md#principled-implementation The content type comes from the encryption and query interceptors, then the headers metadata, then the produces metadata, then the method default; the status comes from the HTTP code metadata or the method default; binary types skip the schema.
|
|
13
|
+
* @evidence contracts/common.md#clear-and-simple-design One public function with small private helpers.
|
|
14
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The order follows how NestJS and nestia decorate a route.
|
|
15
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
|
|
16
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationResponseAnalyzer analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
17
|
+
*/
|
|
9
18
|
var ReflectHttpOperationResponseAnalyzer;
|
|
10
19
|
(function (ReflectHttpOperationResponseAnalyzer) {
|
|
20
|
+
/**
|
|
21
|
+
* Returns the success response of a method, or `null` when it cannot be
|
|
22
|
+
* described; the reasons are pushed to the errors.
|
|
23
|
+
*
|
|
24
|
+
* A HEAD method must have no content type, and an unsupported content type is
|
|
25
|
+
* an error.
|
|
26
|
+
*
|
|
27
|
+
* @evidence contracts/common.md#principled-implementation The schema is the primitive form for JSON and the resolved form for other types, the validator depends on the content type, and the status defaults to 201 for POST and 200 otherwise.
|
|
28
|
+
* @evidence contracts/common.md#clear-and-simple-design One function.
|
|
29
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The defaults are NestJS's.
|
|
30
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the null result and the two errors.
|
|
31
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectHttpOperationResponseAnalyzer.analyze analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
32
|
+
*/
|
|
11
33
|
ReflectHttpOperationResponseAnalyzer.analyze = (ctx) => {
|
|
12
34
|
var _a, _b, _c;
|
|
13
35
|
var _d, _e, _f, _g;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReflectHttpOperationResponseAnalyzer.js","sourceRoot":"","sources":["../../src/analyses/ReflectHttpOperationResponseAnalyzer.ts"],"names":[],"mappings":";;;AACA,wDAIkC;AAElC,+CAAiE;AAKjE,sFAAmF;AACnF,yEAAsE;AACtE,qEAAkE;AAElE,IAAiB,oCAAoC,
|
|
1
|
+
{"version":3,"file":"ReflectHttpOperationResponseAnalyzer.js","sourceRoot":"","sources":["../../src/analyses/ReflectHttpOperationResponseAnalyzer.ts"],"names":[],"mappings":";;;AACA,wDAIkC;AAElC,+CAAiE;AAKjE,sFAAmF;AACnF,yEAAsE;AACtE,qEAAkE;AAElE;;;;;;;;GAQG;AACH,IAAiB,oCAAoC,CAwKpD;AAxKD,WAAiB,oCAAoC;IAoBnD;;;;;;;;;;;;OAYG;IACU,4CAAO,GAAG,CACrB,GAAa,EACwB,EAAE;;;QACvC,MAAM,MAAM,GAA8C,EAAE,CAAC;QAC7D,MAAM,MAAM,GAAG,GAAG,EAAE;YAClB,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC;gBACd,IAAI,EAAE,GAAG,CAAC,UAAU,CAAC,IAAI;gBACzB,KAAK,EAAE,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI;gBAChC,QAAQ,EAAE,GAAG,CAAC,YAAY;gBAC1B,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,MAAM;aACjB,CAAC,CAAC;YACH,OAAO,IAAI,CAAC;QACd,CAAC,CAAC;QAEF,MAAM,SAAS,GAAY,cAAc,CAAC;YACxC,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rE,CAAC,CAAC;IAEF,MAAM,YAAY,GAA+B;QAC/C,UAAU,EAAE;YACV,OAAO,EAAE,EAAE;YACX,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,EAAE;YACX,MAAM,EAAE,EAAE;SACX;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,EAAE;YACX,GAAG,EAAE,KAAK;YACV,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,EAAE;YACX,SAAS,EAAE,EAAE;YACb,OAAO,EAAE,IAAI;YACb,SAAS,EAAE,EAAE;YACb,IAAI,EAAE,EAAE;YACR,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,EAAE;YACR,SAAS,EAAE,EAAE;YACb,MAAM,EAAE,EAAE;YACV,IAAI,EAAE,CAAC;YACP,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,IAAI;SAC8B;KAC5C,CAAC;AACJ,CAAC,EAxKgB,oCAAoC,aAApC,oCAAoC,GAApC,oCAAoC,QAwKpD"}
|
|
@@ -2,7 +2,26 @@ import { INestiaProject } from "../structures/INestiaProject";
|
|
|
2
2
|
import { IOperationMetadata } from "../structures/IOperationMetadata";
|
|
3
3
|
import { IReflectController } from "../structures/IReflectController";
|
|
4
4
|
import { IReflectMcpOperation } from "../structures/IReflectMcpOperation";
|
|
5
|
+
/**
|
|
6
|
+
* Reflects an `@McpRoute` method into a tool operation.
|
|
7
|
+
*
|
|
8
|
+
* @evidence contracts/common.md#principled-implementation The tool definition comes from the route metadata, the single params parameter is matched with its compile-time type, and combinations with HTTP or WebSocket decorators and extra parameters are errors.
|
|
9
|
+
* @evidence contracts/common.md#clear-and-simple-design One public function.
|
|
10
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rules follow the decorator contract.
|
|
11
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
|
|
12
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectMcpOperationAnalyzer analyzes reflected route metadata; 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 ReflectMcpOperationAnalyzer {
|
|
15
|
+
/**
|
|
16
|
+
* The input of the MCP operation analysis: the project, the controller, the
|
|
17
|
+
* method, and its metadata.
|
|
18
|
+
*
|
|
19
|
+
* @evidence contracts/common.md#principled-implementation The record holds what the analysis needs.
|
|
20
|
+
* @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
|
|
21
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
22
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the type describes and the meaning of its members.
|
|
23
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectMcpOperationAnalyzer.IProps analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
24
|
+
*/
|
|
6
25
|
interface IProps {
|
|
7
26
|
project: Omit<INestiaProject, "config">;
|
|
8
27
|
controller: IReflectController;
|
|
@@ -10,5 +29,15 @@ export declare namespace ReflectMcpOperationAnalyzer {
|
|
|
10
29
|
name: string;
|
|
11
30
|
metadata: IOperationMetadata;
|
|
12
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Returns the tool operation of a method, or `null` when the method is not an
|
|
34
|
+
* MCP route or has errors.
|
|
35
|
+
*
|
|
36
|
+
* @evidence contracts/common.md#principled-implementation The method is an MCP route when it carries the route metadata; at most one params parameter is allowed and the function may have at most one argument; the return type and imports come from the metadata.
|
|
37
|
+
* @evidence contracts/common.md#clear-and-simple-design One function that collects errors once and reports them together.
|
|
38
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rules follow the decorator contract.
|
|
39
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the null result.
|
|
40
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectMcpOperationAnalyzer.analyze analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
41
|
+
*/
|
|
13
42
|
const analyze: (ctx: IProps) => IReflectMcpOperation | null;
|
|
14
43
|
}
|
|
@@ -4,11 +4,30 @@ exports.ReflectMcpOperationAnalyzer = void 0;
|
|
|
4
4
|
const constants_1 = require("@nestjs/common/constants");
|
|
5
5
|
const ImportAnalyzer_1 = require("./ImportAnalyzer");
|
|
6
6
|
const ParameterNameAnalyzer_1 = require("./ParameterNameAnalyzer");
|
|
7
|
+
/**
|
|
8
|
+
* Reflects an `@McpRoute` method into a tool operation.
|
|
9
|
+
*
|
|
10
|
+
* @evidence contracts/common.md#principled-implementation The tool definition comes from the route metadata, the single params parameter is matched with its compile-time type, and combinations with HTTP or WebSocket decorators and extra parameters are errors.
|
|
11
|
+
* @evidence contracts/common.md#clear-and-simple-design One public function.
|
|
12
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rules follow the decorator contract.
|
|
13
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
|
|
14
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectMcpOperationAnalyzer analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
15
|
+
*/
|
|
7
16
|
var ReflectMcpOperationAnalyzer;
|
|
8
17
|
(function (ReflectMcpOperationAnalyzer) {
|
|
18
|
+
/**
|
|
19
|
+
* Returns the tool operation of a method, or `null` when the method is not an
|
|
20
|
+
* MCP route or has errors.
|
|
21
|
+
*
|
|
22
|
+
* @evidence contracts/common.md#principled-implementation The method is an MCP route when it carries the route metadata; at most one params parameter is allowed and the function may have at most one argument; the return type and imports come from the metadata.
|
|
23
|
+
* @evidence contracts/common.md#clear-and-simple-design One function that collects errors once and reports them together.
|
|
24
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rules follow the decorator contract.
|
|
25
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the null result.
|
|
26
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectMcpOperationAnalyzer.analyze analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
27
|
+
*/
|
|
9
28
|
ReflectMcpOperationAnalyzer.analyze = (ctx) => {
|
|
10
|
-
var _a, _b, _c;
|
|
11
|
-
var
|
|
29
|
+
var _a, _b, _c, _d;
|
|
30
|
+
var _e, _f, _g, _h, _j, _k, _l;
|
|
12
31
|
const route = Reflect.getMetadata("nestia/McpRoute", ctx.function);
|
|
13
32
|
if (route === undefined)
|
|
14
33
|
return null;
|
|
@@ -18,7 +37,7 @@ var ReflectMcpOperationAnalyzer;
|
|
|
18
37
|
const hasWebSocketRoute = Reflect.getMetadata("nestia/WebSocketRoute", ctx.function) !== undefined;
|
|
19
38
|
if (hasHttpRoute || hasWebSocketRoute)
|
|
20
39
|
errors.push("@McpRoute must not be combined with HTTP or WebSocket route decorators on the same method.");
|
|
21
|
-
const preconfigured = ((
|
|
40
|
+
const preconfigured = ((_e = Reflect.getMetadata("nestia/McpRoute/Parameters", ctx.controller.class.prototype, ctx.name)) !== null && _e !== void 0 ? _e : []).sort((a, b) => a.index - b.index);
|
|
22
41
|
if (preconfigured.length > 1)
|
|
23
42
|
errors.push("@McpRoute tools may declare at most one @McpRoute.Params() parameter.");
|
|
24
43
|
if (ctx.function.length > 1)
|
|
@@ -41,6 +60,7 @@ var ReflectMcpOperationAnalyzer;
|
|
|
41
60
|
name: matched.name,
|
|
42
61
|
index: p.index,
|
|
43
62
|
type: matched.type,
|
|
63
|
+
metadata: matched.primitive,
|
|
44
64
|
imports: matched.imports,
|
|
45
65
|
description: matched.description,
|
|
46
66
|
jsDocTags: matched.jsDocTags,
|
|
@@ -65,16 +85,17 @@ var ReflectMcpOperationAnalyzer;
|
|
|
65
85
|
protocol: "mcp",
|
|
66
86
|
name: ctx.name,
|
|
67
87
|
toolName: route.name,
|
|
68
|
-
title: (
|
|
69
|
-
toolDescription: (
|
|
88
|
+
title: (_f = route.title) !== null && _f !== void 0 ? _f : null,
|
|
89
|
+
toolDescription: (_g = route.description) !== null && _g !== void 0 ? _g : null,
|
|
70
90
|
inputSchema: route.inputSchema,
|
|
71
|
-
outputSchema: (
|
|
72
|
-
annotations: (
|
|
91
|
+
outputSchema: (_h = route.outputSchema) !== null && _h !== void 0 ? _h : null,
|
|
92
|
+
annotations: (_j = route.annotations) !== null && _j !== void 0 ? _j : null,
|
|
73
93
|
function: ctx.function,
|
|
74
94
|
parameters,
|
|
75
|
-
returnType: (
|
|
95
|
+
returnType: (_k = (_c = ctx.metadata.success) === null || _c === void 0 ? void 0 : _c.type) !== null && _k !== void 0 ? _k : null,
|
|
96
|
+
returnMetadata: (_d = ctx.metadata.success) === null || _d === void 0 ? void 0 : _d.primitive,
|
|
76
97
|
imports: ImportAnalyzer_1.ImportAnalyzer.merge(imports),
|
|
77
|
-
description: (
|
|
98
|
+
description: (_l = ctx.metadata.description) !== null && _l !== void 0 ? _l : null,
|
|
78
99
|
jsDocTags: ctx.metadata.jsDocTags,
|
|
79
100
|
};
|
|
80
101
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReflectMcpOperationAnalyzer.js","sourceRoot":"","sources":["../../src/analyses/ReflectMcpOperationAnalyzer.ts"],"names":[],"mappings":";;;AAAA,wDAA0E;AAQ1E,qDAAkD;AAClD,mEAAgE;AAEhE,IAAiB,2BAA2B,
|
|
1
|
+
{"version":3,"file":"ReflectMcpOperationAnalyzer.js","sourceRoot":"","sources":["../../src/analyses/ReflectMcpOperationAnalyzer.ts"],"names":[],"mappings":";;;AAAA,wDAA0E;AAQ1E,qDAAkD;AAClD,mEAAgE;AAEhE;;;;;;;;GAQG;AACH,IAAiB,2BAA2B,CA0I3C;AA1ID,WAAiB,2BAA2B;IAmB1C;;;;;;;;;OASG;IACU,mCAAO,GAAG,CAAC,GA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|
|
@@ -1,7 +1,54 @@
|
|
|
1
1
|
import { VERSION_NEUTRAL } from "@nestjs/common";
|
|
2
|
+
/**
|
|
3
|
+
* Reads the NestJS and Swagger metadata of a class or method.
|
|
4
|
+
*
|
|
5
|
+
* @evidence contracts/common.md#principled-implementation The functions read the reflect metadata keys that Nest and `@nestjs/swagger` define and normalize them into arrays.
|
|
6
|
+
* @evidence contracts/common.md#clear-and-simple-design Four small readers.
|
|
7
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts They read only public metadata keys.
|
|
8
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
|
|
9
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectMetadataAnalyzer analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
10
|
+
*/
|
|
2
11
|
export declare namespace ReflectMetadataAnalyzer {
|
|
12
|
+
/**
|
|
13
|
+
* Returns the path list of a controller or route: a string is a one-element
|
|
14
|
+
* list and an empty list is one empty path.
|
|
15
|
+
*
|
|
16
|
+
* @evidence contracts/common.md#principled-implementation Nest stores a path as a string or an array, and an empty array means the root path, so the result is never empty.
|
|
17
|
+
* @evidence contracts/common.md#clear-and-simple-design One conditional.
|
|
18
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It normalizes without changing paths.
|
|
19
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the normalization.
|
|
20
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectMetadataAnalyzer.paths analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
21
|
+
*/
|
|
3
22
|
const paths: (target: Function) => string[];
|
|
23
|
+
/**
|
|
24
|
+
* Returns the `@ApiExtension` values of a target.
|
|
25
|
+
*
|
|
26
|
+
* @evidence contracts/common.md#principled-implementation The metadata is returned as recorded, and an absent value is an empty object.
|
|
27
|
+
* @evidence contracts/common.md#clear-and-simple-design One read.
|
|
28
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It reads the Swagger metadata key.
|
|
29
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the result.
|
|
30
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectMetadataAnalyzer.extensions analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
31
|
+
*/
|
|
4
32
|
const extensions: (value: any) => Record<string, any>;
|
|
33
|
+
/**
|
|
34
|
+
* Returns the deduplicated security requirements of a target.
|
|
35
|
+
*
|
|
36
|
+
* @evidence contracts/common.md#principled-implementation The `@ApiSecurity` metadata is merged by `SecurityAnalyzer.merge`, and an absent value is an empty list.
|
|
37
|
+
* @evidence contracts/common.md#clear-and-simple-design One read and one merge.
|
|
38
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It reads the Swagger metadata key.
|
|
39
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the result.
|
|
40
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectMetadataAnalyzer.securities analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
41
|
+
*/
|
|
5
42
|
const securities: (value: any) => Record<string, string[]>[];
|
|
43
|
+
/**
|
|
44
|
+
* Returns the version list of a target, or `undefined` when it is
|
|
45
|
+
* unversioned.
|
|
46
|
+
*
|
|
47
|
+
* @evidence contracts/common.md#principled-implementation A single version becomes a one-element list, and an absent value stays absent so callers can tell unversioned from versioned.
|
|
48
|
+
* @evidence contracts/common.md#clear-and-simple-design One conditional.
|
|
49
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It reads Nest's version metadata.
|
|
50
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the three cases.
|
|
51
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectMetadataAnalyzer.versions analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
52
|
+
*/
|
|
6
53
|
const versions: (target: any) => Array<string | typeof VERSION_NEUTRAL> | undefined;
|
|
7
54
|
}
|
|
@@ -3,8 +3,27 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ReflectMetadataAnalyzer = void 0;
|
|
4
4
|
const constants_1 = require("@nestjs/common/constants");
|
|
5
5
|
const SecurityAnalyzer_1 = require("./SecurityAnalyzer");
|
|
6
|
+
/**
|
|
7
|
+
* Reads the NestJS and Swagger metadata of a class or method.
|
|
8
|
+
*
|
|
9
|
+
* @evidence contracts/common.md#principled-implementation The functions read the reflect metadata keys that Nest and `@nestjs/swagger` define and normalize them into arrays.
|
|
10
|
+
* @evidence contracts/common.md#clear-and-simple-design Four small readers.
|
|
11
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts They read only public metadata keys.
|
|
12
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
|
|
13
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectMetadataAnalyzer analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
14
|
+
*/
|
|
6
15
|
var ReflectMetadataAnalyzer;
|
|
7
16
|
(function (ReflectMetadataAnalyzer) {
|
|
17
|
+
/**
|
|
18
|
+
* Returns the path list of a controller or route: a string is a one-element
|
|
19
|
+
* list and an empty list is one empty path.
|
|
20
|
+
*
|
|
21
|
+
* @evidence contracts/common.md#principled-implementation Nest stores a path as a string or an array, and an empty array means the root path, so the result is never empty.
|
|
22
|
+
* @evidence contracts/common.md#clear-and-simple-design One conditional.
|
|
23
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It normalizes without changing paths.
|
|
24
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the normalization.
|
|
25
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectMetadataAnalyzer.paths analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
26
|
+
*/
|
|
8
27
|
ReflectMetadataAnalyzer.paths = (target) => {
|
|
9
28
|
const value = Reflect.getMetadata(constants_1.PATH_METADATA, target);
|
|
10
29
|
if (typeof value === "string")
|
|
@@ -14,14 +33,42 @@ var ReflectMetadataAnalyzer;
|
|
|
14
33
|
else
|
|
15
34
|
return value;
|
|
16
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* Returns the `@ApiExtension` values of a target.
|
|
38
|
+
*
|
|
39
|
+
* @evidence contracts/common.md#principled-implementation The metadata is returned as recorded, and an absent value is an empty object.
|
|
40
|
+
* @evidence contracts/common.md#clear-and-simple-design One read.
|
|
41
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It reads the Swagger metadata key.
|
|
42
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the result.
|
|
43
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectMetadataAnalyzer.extensions analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
44
|
+
*/
|
|
17
45
|
ReflectMetadataAnalyzer.extensions = (value) => {
|
|
18
46
|
const entire = Reflect.getMetadata("swagger/apiExtension", value);
|
|
19
47
|
return entire !== null && entire !== void 0 ? entire : {};
|
|
20
48
|
};
|
|
49
|
+
/**
|
|
50
|
+
* Returns the deduplicated security requirements of a target.
|
|
51
|
+
*
|
|
52
|
+
* @evidence contracts/common.md#principled-implementation The `@ApiSecurity` metadata is merged by `SecurityAnalyzer.merge`, and an absent value is an empty list.
|
|
53
|
+
* @evidence contracts/common.md#clear-and-simple-design One read and one merge.
|
|
54
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It reads the Swagger metadata key.
|
|
55
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the result.
|
|
56
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectMetadataAnalyzer.securities analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
57
|
+
*/
|
|
21
58
|
ReflectMetadataAnalyzer.securities = (value) => {
|
|
22
59
|
const entire = Reflect.getMetadata("swagger/apiSecurity", value);
|
|
23
60
|
return entire ? SecurityAnalyzer_1.SecurityAnalyzer.merge(...entire) : [];
|
|
24
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* Returns the version list of a target, or `undefined` when it is
|
|
64
|
+
* unversioned.
|
|
65
|
+
*
|
|
66
|
+
* @evidence contracts/common.md#principled-implementation A single version becomes a one-element list, and an absent value stays absent so callers can tell unversioned from versioned.
|
|
67
|
+
* @evidence contracts/common.md#clear-and-simple-design One conditional.
|
|
68
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It reads Nest's version metadata.
|
|
69
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the three cases.
|
|
70
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectMetadataAnalyzer.versions analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
71
|
+
*/
|
|
25
72
|
ReflectMetadataAnalyzer.versions = (target) => {
|
|
26
73
|
const value = Reflect.getMetadata(constants_1.VERSION_METADATA, target);
|
|
27
74
|
return value === undefined
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReflectMetadataAnalyzer.js","sourceRoot":"","sources":["../../src/analyses/ReflectMetadataAnalyzer.ts"],"names":[],"mappings":";;;AACA,wDAA2E;AAG3E,yDAAsD;AAEtD,IAAiB,uBAAuB,
|
|
1
|
+
{"version":3,"file":"ReflectMetadataAnalyzer.js","sourceRoot":"","sources":["../../src/analyses/ReflectMetadataAnalyzer.ts"],"names":[],"mappings":";;;AACA,wDAA2E;AAG3E,yDAAsD;AAEtD;;;;;;;;GAQG;AACH,IAAiB,uBAAuB,CA2EvC;AA3ED,WAAiB,uBAAuB;IACtC;;;;;;;;;OASG;IACU,6BAAK,GAAG,CAAC,MAAgB,EAAY,EAAE;QAClD,MAAM,KAAK,GAAsB,OAAO,CAAC,WAAW,CAAC,yBAAa,EAAE,MAAM,CAAC,CAAC;QAC5E,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,CAAC,KAAK,CAAC,CAAC;aACzC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,CAAC,EAAE,CAAC,CAAC;;YACpC,OAAO,KAAK,CAAC;IACpB,CAAC,CAAC;IAEF;;;;;;;;OAQG;IACU,kCAAU,GAAG,CAAC,KAAU,EAAuB,EAAE;QAC5D,MAAM,MAAM,GAAsC,OAAO,CAAC,WAAW,CACnE,sBAAsB,EACtB,KAAK,CACN,CAAC;QACF,OAAO,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC;IACtB,CAAC,CAAC;IAEF;;;;;;;;OAQG;IACU,kCAAU,GAAG,CAAC,KAAU,EAA8B,EAAE;QACnE,MAAM,MAAM,GAA2C,OAAO,CAAC,WAAW,CACxE,qBAAqB,EACrB,KAAK,CACN,CAAC;QACF,OAAO,MAAM,CAAC,CAAC,CAAC,mCAAgB,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACzD,CAAC,CAAC;IAEF;;;;;;;;;OASG;IACU,gCAAQ,GAAG,CACtB,MAAW,EACyC,EAAE;QACtD,MAAM,KAAK,GAA6B,OAAO,CAAC,WAAW,CACzD,4BAAgB,EAChB,MAAM,CACP,CAAC;QACF,OAAO,KAAK,KAAK,SAAS;YACxB,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;gBACpB,CAAC,CAAC,KAAK;gBACP,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC,EA3EgB,uBAAuB,aAAvB,uBAAuB,GAAvB,uBAAuB,QA2EvC"}
|
|
@@ -2,7 +2,26 @@ import { INestiaProject } from "../structures/INestiaProject";
|
|
|
2
2
|
import { IOperationMetadata } from "../structures/IOperationMetadata";
|
|
3
3
|
import { IReflectController } from "../structures/IReflectController";
|
|
4
4
|
import { IReflectWebSocketOperation } from "../structures/IReflectWebSocketOperation";
|
|
5
|
+
/**
|
|
6
|
+
* Reflects a `@WebSocketRoute` method into an operation.
|
|
7
|
+
*
|
|
8
|
+
* @evidence contracts/common.md#principled-implementation The parameter decorators give each parameter's category, the acceptor and driver type arguments are checked, the path parameters of the route are matched against the param decorators, and the tgrid declarations are not imported into the SDK.
|
|
9
|
+
* @evidence contracts/common.md#clear-and-simple-design One public function.
|
|
10
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rules follow the decorator contract.
|
|
11
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
|
|
12
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectWebSocketOperationAnalyzer analyzes reflected route metadata; 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 ReflectWebSocketOperationAnalyzer {
|
|
15
|
+
/**
|
|
16
|
+
* The input of the WebSocket operation analysis: the project, the controller,
|
|
17
|
+
* the method, and its metadata.
|
|
18
|
+
*
|
|
19
|
+
* @evidence contracts/common.md#principled-implementation The record holds what the analysis needs.
|
|
20
|
+
* @evidence contracts/common.md#clear-and-simple-design A flat record with no behavior.
|
|
21
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
22
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the type describes and the meaning of its members.
|
|
23
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectWebSocketOperationAnalyzer.IProps analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
24
|
+
*/
|
|
6
25
|
interface IProps {
|
|
7
26
|
project: Omit<INestiaProject, "config">;
|
|
8
27
|
controller: IReflectController;
|
|
@@ -10,5 +29,15 @@ export declare namespace ReflectWebSocketOperationAnalyzer {
|
|
|
10
29
|
name: string;
|
|
11
30
|
metadata: IOperationMetadata;
|
|
12
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Returns the WebSocket operation of a method, or `null` when the method is
|
|
34
|
+
* not a WebSocket route or has errors.
|
|
35
|
+
*
|
|
36
|
+
* @evidence contracts/common.md#principled-implementation An acceptor is required, every parameter must carry one of the five decorators, the acceptor has three type arguments and the driver one, and the path parameters must equal the param fields.
|
|
37
|
+
* @evidence contracts/common.md#clear-and-simple-design One function.
|
|
38
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rules follow the decorator contract.
|
|
39
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the null result.
|
|
40
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectWebSocketOperationAnalyzer.analyze analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
41
|
+
*/
|
|
13
42
|
const analyze: (ctx: IProps) => IReflectWebSocketOperation | null;
|
|
14
43
|
}
|
|
@@ -7,8 +7,27 @@ const ImportAnalyzer_1 = require("./ImportAnalyzer");
|
|
|
7
7
|
const ParameterNameAnalyzer_1 = require("./ParameterNameAnalyzer");
|
|
8
8
|
const PathAnalyzer_1 = require("./PathAnalyzer");
|
|
9
9
|
const ReflectMetadataAnalyzer_1 = require("./ReflectMetadataAnalyzer");
|
|
10
|
+
/**
|
|
11
|
+
* Reflects a `@WebSocketRoute` method into an operation.
|
|
12
|
+
*
|
|
13
|
+
* @evidence contracts/common.md#principled-implementation The parameter decorators give each parameter's category, the acceptor and driver type arguments are checked, the path parameters of the route are matched against the param decorators, and the tgrid declarations are not imported into the SDK.
|
|
14
|
+
* @evidence contracts/common.md#clear-and-simple-design One public function.
|
|
15
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rules follow the decorator contract.
|
|
16
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states its purpose.
|
|
17
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectWebSocketOperationAnalyzer analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
18
|
+
*/
|
|
10
19
|
var ReflectWebSocketOperationAnalyzer;
|
|
11
20
|
(function (ReflectWebSocketOperationAnalyzer) {
|
|
21
|
+
/**
|
|
22
|
+
* Returns the WebSocket operation of a method, or `null` when the method is
|
|
23
|
+
* not a WebSocket route or has errors.
|
|
24
|
+
*
|
|
25
|
+
* @evidence contracts/common.md#principled-implementation An acceptor is required, every parameter must carry one of the five decorators, the acceptor has three type arguments and the driver one, and the path parameters must equal the param fields.
|
|
26
|
+
* @evidence contracts/common.md#clear-and-simple-design One function.
|
|
27
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rules follow the decorator contract.
|
|
28
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the null result.
|
|
29
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation ReflectWebSocketOperationAnalyzer.analyze analyzes reflected route metadata; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
30
|
+
*/
|
|
12
31
|
ReflectWebSocketOperationAnalyzer.analyze = (ctx) => {
|
|
13
32
|
var _a, _b;
|
|
14
33
|
const route = Reflect.getMetadata("nestia/WebSocketRoute", ctx.function);
|
|
@@ -58,14 +77,14 @@ var ReflectWebSocketOperationAnalyzer;
|
|
|
58
77
|
i.file.endsWith("WebSocketAcceptor.d.ts")))));
|
|
59
78
|
if (p.category === "acceptor" ||
|
|
60
79
|
p.category === "driver" ||
|
|
80
|
+
p.category === "header" ||
|
|
61
81
|
p.category === "query")
|
|
62
82
|
return Object.assign(Object.assign({}, p), { name: matched.name, type: matched.type });
|
|
63
83
|
else if (p.category === "param")
|
|
64
84
|
return Object.assign(Object.assign({}, p), { category: "param", field: p.field, name: matched.name, type: matched.type, imports: matched.imports, description: matched.description, jsDocTags: matched.jsDocTags });
|
|
65
85
|
// UNKNOWN TYPE, MAYBE NEW FEATURE
|
|
66
86
|
else {
|
|
67
|
-
|
|
68
|
-
reject(`@WebSocketRoute.${StringUtil_1.StringUtil.capitalize(p.category)}() has not been supported yet. How about upgrading the nestia packages?`);
|
|
87
|
+
reject(`@WebSocketRoute.${StringUtil_1.StringUtil.capitalize(p.category)}() has not been supported yet. How about upgrading the nestia packages?`);
|
|
69
88
|
return null;
|
|
70
89
|
}
|
|
71
90
|
})
|