@nestia/sdk 14.0.0 → 14.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/assets/bundle/distribute/build-sdk.cjs +28 -0
- package/assets/bundle/distribute/package.json +7 -3
- package/assets/bundle/distribute/tsconfig.json +15 -105
- package/lib/INestiaConfig.d.ts +74 -34
- package/lib/NestiaSdkApplication.d.ts +60 -0
- package/lib/NestiaSdkApplication.js +121 -32
- package/lib/NestiaSdkApplication.js.map +1 -1
- package/lib/NestiaSwaggerComposer.d.ts +21 -0
- package/lib/NestiaSwaggerComposer.js +32 -13
- package/lib/NestiaSwaggerComposer.js.map +1 -1
- package/lib/analyses/AccessorAnalyzer.d.ts +26 -0
- package/lib/analyses/AccessorAnalyzer.js +26 -0
- package/lib/analyses/AccessorAnalyzer.js.map +1 -1
- package/lib/analyses/ConfigAnalyzer.d.ts +41 -0
- package/lib/analyses/ConfigAnalyzer.js +52 -77
- package/lib/analyses/ConfigAnalyzer.js.map +1 -1
- package/lib/analyses/ImportAnalyzer.d.ts +25 -0
- package/lib/analyses/ImportAnalyzer.js +25 -0
- package/lib/analyses/ImportAnalyzer.js.map +1 -1
- package/lib/analyses/ParameterNameAnalyzer.d.ts +44 -0
- package/lib/analyses/ParameterNameAnalyzer.js +63 -0
- package/lib/analyses/ParameterNameAnalyzer.js.map +1 -0
- package/lib/analyses/PathAnalyzer.d.ts +93 -1
- package/lib/analyses/PathAnalyzer.js +160 -23
- package/lib/analyses/PathAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectControllerAnalyzer.d.ts +32 -0
- package/lib/analyses/ReflectControllerAnalyzer.js +24 -1
- package/lib/analyses/ReflectControllerAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectHttpOperationAnalyzer.d.ts +29 -0
- package/lib/analyses/ReflectHttpOperationAnalyzer.js +35 -24
- package/lib/analyses/ReflectHttpOperationAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.d.ts +31 -0
- package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.js +21 -0
- package/lib/analyses/ReflectHttpOperationExceptionAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectHttpOperationParameterAnalyzer.d.ts +31 -0
- package/lib/analyses/ReflectHttpOperationParameterAnalyzer.js +143 -23
- package/lib/analyses/ReflectHttpOperationParameterAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectHttpOperationResponseAnalyzer.d.ts +32 -0
- package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js +27 -2
- package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectMcpOperationAnalyzer.d.ts +29 -0
- package/lib/analyses/ReflectMcpOperationAnalyzer.js +35 -11
- package/lib/analyses/ReflectMcpOperationAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectMetadataAnalyzer.d.ts +47 -0
- package/lib/analyses/ReflectMetadataAnalyzer.js +47 -0
- package/lib/analyses/ReflectMetadataAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectWebSocketOperationAnalyzer.d.ts +29 -0
- package/lib/analyses/ReflectWebSocketOperationAnalyzer.js +27 -5
- package/lib/analyses/ReflectWebSocketOperationAnalyzer.js.map +1 -1
- package/lib/analyses/SecurityAnalyzer.d.ts +25 -0
- package/lib/analyses/SecurityAnalyzer.js +39 -19
- package/lib/analyses/SecurityAnalyzer.js.map +1 -1
- package/lib/analyses/SwaggerExampleAnalyzer.d.ts +31 -0
- package/lib/analyses/SwaggerExampleAnalyzer.js +36 -0
- package/lib/analyses/SwaggerExampleAnalyzer.js.map +1 -0
- package/lib/analyses/TypedHttpRouteAnalyzer.d.ts +41 -3
- package/lib/analyses/TypedHttpRouteAnalyzer.js +196 -172
- package/lib/analyses/TypedHttpRouteAnalyzer.js.map +1 -1
- package/lib/analyses/TypedMcpRouteAnalyzer.d.ts +29 -0
- package/lib/analyses/TypedMcpRouteAnalyzer.js +152 -20
- package/lib/analyses/TypedMcpRouteAnalyzer.js.map +1 -1
- package/lib/analyses/TypedWebSocketRouteAnalyzer.d.ts +19 -0
- package/lib/analyses/TypedWebSocketRouteAnalyzer.js +20 -1
- package/lib/analyses/TypedWebSocketRouteAnalyzer.js.map +1 -1
- package/lib/decorators/OperationMetadata.d.ts +6 -0
- package/lib/decorators/OperationMetadata.js +6 -0
- package/lib/decorators/OperationMetadata.js.map +1 -1
- package/lib/executable/internal/CommandParser.d.ts +19 -0
- package/lib/executable/internal/CommandParser.js +19 -0
- package/lib/executable/internal/CommandParser.js.map +1 -1
- package/lib/executable/internal/NestiaConfigLoader.d.ts +56 -0
- package/lib/executable/internal/NestiaConfigLoader.js +48 -42
- package/lib/executable/internal/NestiaConfigLoader.js.map +1 -1
- package/lib/executable/internal/NestiaSdkCommand.d.ts +60 -0
- package/lib/executable/internal/NestiaSdkCommand.js +95 -3
- package/lib/executable/internal/NestiaSdkCommand.js.map +1 -1
- package/lib/executable/internal/NestiaSdkWatcher.d.ts +81 -0
- package/lib/executable/internal/NestiaSdkWatcher.js +125 -41
- package/lib/executable/internal/NestiaSdkWatcher.js.map +1 -1
- package/lib/executable/internal/NestiaSwaggerWatch.d.ts +80 -0
- package/lib/executable/internal/NestiaSwaggerWatch.js +308 -0
- package/lib/executable/internal/NestiaSwaggerWatch.js.map +1 -0
- package/lib/executable/sdk.js +16 -1
- package/lib/executable/sdk.js.map +1 -1
- package/lib/factories/ExpressionFactory.d.ts +18 -0
- package/lib/factories/ExpressionFactory.js +21 -2
- package/lib/factories/ExpressionFactory.js.map +1 -1
- package/lib/factories/IdentifierFactory.d.ts +24 -0
- package/lib/factories/IdentifierFactory.js +24 -0
- package/lib/factories/IdentifierFactory.js.map +1 -1
- package/lib/factories/LiteralFactory.d.ts +22 -4
- package/lib/factories/LiteralFactory.js +33 -11
- package/lib/factories/LiteralFactory.js.map +1 -1
- package/lib/factories/StatementFactory.d.ts +28 -1
- package/lib/factories/StatementFactory.js +28 -1
- package/lib/factories/StatementFactory.js.map +1 -1
- package/lib/factories/TypeFactory.d.ts +24 -0
- package/lib/factories/TypeFactory.js +15 -0
- package/lib/factories/TypeFactory.js.map +1 -1
- package/lib/generates/CloneGenerator.d.ts +22 -0
- package/lib/generates/CloneGenerator.js +26 -5
- package/lib/generates/CloneGenerator.js.map +1 -1
- package/lib/generates/E2eGenerator.d.ts +19 -0
- package/lib/generates/E2eGenerator.js +19 -0
- package/lib/generates/E2eGenerator.js.map +1 -1
- package/lib/generates/SdkGenerator.d.ts +38 -0
- package/lib/generates/SdkGenerator.js +43 -5
- package/lib/generates/SdkGenerator.js.map +1 -1
- package/lib/generates/SwaggerGenerator.d.ts +36 -6
- package/lib/generates/SwaggerGenerator.js +190 -40
- package/lib/generates/SwaggerGenerator.js.map +1 -1
- package/lib/generates/internal/E2eFileProgrammer.d.ts +19 -0
- package/lib/generates/internal/E2eFileProgrammer.js +20 -1
- package/lib/generates/internal/E2eFileProgrammer.js.map +1 -1
- package/lib/generates/internal/FilePrinter.d.ts +57 -0
- package/lib/generates/internal/FilePrinter.js +74 -0
- package/lib/generates/internal/FilePrinter.js.map +1 -1
- package/lib/generates/internal/ImportDictionary.d.ts +93 -1
- package/lib/generates/internal/ImportDictionary.js +103 -2
- package/lib/generates/internal/ImportDictionary.js.map +1 -1
- package/lib/generates/internal/SdkAliasCollection.d.ts +121 -1
- package/lib/generates/internal/SdkAliasCollection.js +132 -11
- package/lib/generates/internal/SdkAliasCollection.js.map +1 -1
- package/lib/generates/internal/SdkDistributionComposer.d.ts +19 -0
- package/lib/generates/internal/SdkDistributionComposer.js +149 -52
- package/lib/generates/internal/SdkDistributionComposer.js.map +1 -1
- package/lib/generates/internal/SdkFileProgrammer.d.ts +18 -0
- package/lib/generates/internal/SdkFileProgrammer.js +101 -12
- package/lib/generates/internal/SdkFileProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpCloneProgrammer.d.ts +29 -0
- package/lib/generates/internal/SdkHttpCloneProgrammer.js +33 -0
- package/lib/generates/internal/SdkHttpCloneProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpCloneReferencer.d.ts +19 -0
- package/lib/generates/internal/SdkHttpCloneReferencer.js +78 -25
- package/lib/generates/internal/SdkHttpCloneReferencer.js.map +1 -1
- package/lib/generates/internal/SdkHttpFunctionProgrammer.d.ts +19 -0
- package/lib/generates/internal/SdkHttpFunctionProgrammer.js +40 -23
- package/lib/generates/internal/SdkHttpFunctionProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.d.ts +19 -0
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.js +46 -34
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpParameterProgrammer.d.ts +142 -1
- package/lib/generates/internal/SdkHttpParameterProgrammer.js +175 -6
- package/lib/generates/internal/SdkHttpParameterProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpRouteProgrammer.d.ts +20 -0
- package/lib/generates/internal/SdkHttpRouteProgrammer.js +36 -32
- package/lib/generates/internal/SdkHttpRouteProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpSimulationProgrammer.d.ts +38 -0
- package/lib/generates/internal/SdkHttpSimulationProgrammer.js +66 -18
- package/lib/generates/internal/SdkHttpSimulationProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkImportWizard.d.ts +63 -0
- package/lib/generates/internal/SdkImportWizard.js +63 -0
- package/lib/generates/internal/SdkImportWizard.js.map +1 -1
- package/lib/generates/internal/SdkMcpRouteProgrammer.d.ts +17 -2
- package/lib/generates/internal/SdkMcpRouteProgrammer.js +72 -24
- package/lib/generates/internal/SdkMcpRouteProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkPathTemplate.d.ts +36 -0
- package/lib/generates/internal/SdkPathTemplate.js +65 -0
- package/lib/generates/internal/SdkPathTemplate.js.map +1 -0
- package/lib/generates/internal/SdkRouteDirectory.d.ts +10 -0
- package/lib/generates/internal/SdkRouteDirectory.js +10 -0
- package/lib/generates/internal/SdkRouteDirectory.js.map +1 -1
- package/lib/generates/internal/SdkTypeProgrammer.d.ts +54 -1
- package/lib/generates/internal/SdkTypeProgrammer.js +111 -27
- package/lib/generates/internal/SdkTypeProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkTypeTagProgrammer.d.ts +53 -1
- package/lib/generates/internal/SdkTypeTagProgrammer.js +407 -67
- package/lib/generates/internal/SdkTypeTagProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkWebSocketCloneProgrammer.d.ts +40 -0
- package/lib/generates/internal/SdkWebSocketCloneProgrammer.js +149 -142
- package/lib/generates/internal/SdkWebSocketCloneProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.d.ts +19 -0
- package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js +46 -36
- package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkWebSocketParameterProgrammer.d.ts +114 -1
- package/lib/generates/internal/SdkWebSocketParameterProgrammer.js +120 -5
- package/lib/generates/internal/SdkWebSocketParameterProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkWebSocketRouteProgrammer.d.ts +18 -0
- package/lib/generates/internal/SdkWebSocketRouteProgrammer.js +75 -33
- package/lib/generates/internal/SdkWebSocketRouteProgrammer.js.map +1 -1
- package/lib/generates/internal/SwaggerDescriptionComposer.d.ts +42 -0
- package/lib/generates/internal/SwaggerDescriptionComposer.js +44 -1
- package/lib/generates/internal/SwaggerDescriptionComposer.js.map +1 -1
- package/lib/generates/internal/SwaggerOperationComposer.d.ts +18 -0
- package/lib/generates/internal/SwaggerOperationComposer.js +37 -8
- package/lib/generates/internal/SwaggerOperationComposer.js.map +1 -1
- package/lib/generates/internal/SwaggerOperationParameterComposer.d.ts +40 -1
- package/lib/generates/internal/SwaggerOperationParameterComposer.js +230 -25
- package/lib/generates/internal/SwaggerOperationParameterComposer.js.map +1 -1
- package/lib/generates/internal/SwaggerOperationResponseComposer.d.ts +21 -0
- package/lib/generates/internal/SwaggerOperationResponseComposer.js +58 -7
- package/lib/generates/internal/SwaggerOperationResponseComposer.js.map +1 -1
- package/lib/internal/legacy.d.ts +342 -31
- package/lib/internal/legacy.js +207 -31
- package/lib/internal/legacy.js.map +1 -1
- package/lib/structures/INestiaProject.d.ts +10 -0
- package/lib/structures/INestiaSdkInput.d.ts +30 -0
- package/lib/structures/IOperationMetadata.d.ts +77 -0
- package/lib/structures/IReflectController.d.ts +10 -0
- package/lib/structures/IReflectHttpOperation.d.ts +10 -0
- package/lib/structures/IReflectHttpOperationException.d.ts +13 -2
- package/lib/structures/IReflectHttpOperationParameter.d.ts +55 -3
- package/lib/structures/IReflectHttpOperationSuccess.d.ts +15 -3
- package/lib/structures/IReflectImport.d.ts +10 -0
- package/lib/structures/IReflectMcpOperation.d.ts +19 -0
- package/lib/structures/IReflectMcpOperationParameter.d.ts +9 -0
- package/lib/structures/IReflectOperationError.d.ts +28 -0
- package/lib/structures/IReflectOperationError.js +22 -2
- package/lib/structures/IReflectOperationError.js.map +1 -1
- package/lib/structures/IReflectType.d.ts +9 -0
- package/lib/structures/IReflectWebSocketOperation.d.ts +10 -0
- package/lib/structures/IReflectWebSocketOperationParameter.d.ts +55 -0
- package/lib/structures/ITypedApplication.d.ts +10 -0
- package/lib/structures/ITypedHttpRoute.d.ts +18 -0
- package/lib/structures/ITypedHttpRouteException.d.ts +13 -1
- package/lib/structures/ITypedHttpRouteParameter.d.ts +48 -1
- package/lib/structures/ITypedHttpRouteSuccess.d.ts +13 -1
- package/lib/structures/ITypedMcpRoute.d.ts +11 -0
- package/lib/structures/ITypedWebSocketRoute.d.ts +18 -0
- package/lib/transform.d.ts +6 -0
- package/lib/transform.js +6 -0
- package/lib/transform.js.map +1 -1
- package/lib/utils/ArrayUtil.d.ts +31 -1
- package/lib/utils/ArrayUtil.js +32 -11
- package/lib/utils/ArrayUtil.js.map +1 -1
- package/lib/utils/EmittedJavaScriptPatcher.d.ts +20 -0
- package/lib/utils/EmittedJavaScriptPatcher.js +65 -46
- package/lib/utils/EmittedJavaScriptPatcher.js.map +1 -1
- package/lib/utils/FileRetriever.d.ts +29 -0
- package/lib/utils/FileRetriever.js +29 -0
- package/lib/utils/FileRetriever.js.map +1 -1
- package/lib/utils/HttpResponseContentTypeUtil.d.ts +41 -0
- package/lib/utils/HttpResponseContentTypeUtil.js +31 -0
- package/lib/utils/HttpResponseContentTypeUtil.js.map +1 -1
- package/lib/utils/MapUtil.d.ts +64 -1
- package/lib/utils/MapUtil.js +24 -3
- package/lib/utils/MapUtil.js.map +1 -1
- package/lib/utils/PathUtil.d.ts +31 -0
- package/lib/utils/PathUtil.js +38 -0
- package/lib/utils/PathUtil.js.map +1 -1
- package/lib/utils/SdkBundlePath.d.ts +2 -0
- package/lib/utils/SdkBundlePath.js +10 -0
- package/lib/utils/SdkBundlePath.js.map +1 -0
- package/lib/utils/SdkInputFilter.d.ts +31 -0
- package/lib/utils/SdkInputFilter.js +115 -0
- package/lib/utils/SdkInputFilter.js.map +1 -0
- package/lib/utils/SourceFinder.d.ts +45 -0
- package/lib/utils/SourceFinder.js +74 -16
- package/lib/utils/SourceFinder.js.map +1 -1
- package/lib/utils/StringUtil.d.ts +77 -2
- package/lib/utils/StringUtil.js +166 -4
- package/lib/utils/StringUtil.js.map +1 -1
- package/lib/utils/TemporaryDirectory.d.ts +60 -0
- package/lib/utils/TemporaryDirectory.js +112 -0
- package/lib/utils/TemporaryDirectory.js.map +1 -0
- package/lib/utils/TsConfigReader.d.ts +42 -0
- package/lib/utils/TsConfigReader.js +98 -14
- package/lib/utils/TsConfigReader.js.map +1 -1
- package/lib/utils/TtscExecutor.d.ts +23 -1
- package/lib/utils/TtscExecutor.js +22 -0
- package/lib/utils/TtscExecutor.js.map +1 -1
- package/lib/utils/VersioningStrategy.d.ts +39 -2
- package/lib/utils/VersioningStrategy.js +46 -13
- package/lib/utils/VersioningStrategy.js.map +1 -1
- package/lib/validators/TextPlainValidator.d.ts +19 -0
- package/lib/validators/TextPlainValidator.js +19 -0
- package/lib/validators/TextPlainValidator.js.map +1 -1
- package/native/go.mod +1 -1
- package/native/go.sum +2 -2
- package/native/sdk/register.go +12 -2
- package/native/sdk/sdk_http_rules.go +210 -0
- package/native/sdk/sdk_metadata_json.go +79 -4
- package/native/sdk/sdk_transform.go +1157 -414
- package/package.json +8 -6
- package/src/INestiaConfig.ts +74 -34
- package/src/NestiaSdkApplication.ts +129 -41
- package/src/NestiaSwaggerComposer.ts +32 -14
- package/src/analyses/AccessorAnalyzer.ts +26 -0
- package/src/analyses/ConfigAnalyzer.ts +52 -90
- package/src/analyses/ImportAnalyzer.ts +25 -0
- package/src/analyses/ParameterNameAnalyzer.ts +75 -0
- package/src/analyses/PathAnalyzer.ts +167 -23
- package/src/analyses/ReflectControllerAnalyzer.ts +34 -1
- package/src/analyses/ReflectHttpOperationAnalyzer.ts +36 -14
- package/src/analyses/ReflectHttpOperationExceptionAnalyzer.ts +31 -0
- package/src/analyses/ReflectHttpOperationParameterAnalyzer.ts +153 -39
- package/src/analyses/ReflectHttpOperationResponseAnalyzer.ts +38 -7
- package/src/analyses/ReflectMcpOperationAnalyzer.ts +38 -3
- package/src/analyses/ReflectMetadataAnalyzer.ts +47 -0
- package/src/analyses/ReflectWebSocketOperationAnalyzer.ts +40 -7
- package/src/analyses/SecurityAnalyzer.ts +45 -20
- package/src/analyses/SwaggerExampleAnalyzer.ts +39 -0
- package/src/analyses/TypedHttpRouteAnalyzer.ts +263 -198
- package/src/analyses/TypedMcpRouteAnalyzer.ts +180 -20
- package/src/analyses/TypedWebSocketRouteAnalyzer.ts +20 -0
- package/src/decorators/OperationMetadata.ts +6 -0
- package/src/executable/internal/CommandParser.ts +19 -0
- package/src/executable/internal/NestiaConfigLoader.ts +66 -50
- package/src/executable/internal/NestiaSdkCommand.ts +96 -3
- package/src/executable/internal/NestiaSdkWatcher.ts +172 -44
- package/src/executable/internal/NestiaSwaggerWatch.ts +359 -0
- package/src/executable/sdk.ts +24 -1
- package/src/factories/ExpressionFactory.ts +23 -2
- package/src/factories/IdentifierFactory.ts +24 -0
- package/src/factories/LiteralFactory.ts +51 -13
- package/src/factories/StatementFactory.ts +28 -1
- package/src/factories/TypeFactory.ts +24 -0
- package/src/generates/CloneGenerator.ts +26 -5
- package/src/generates/E2eGenerator.ts +19 -0
- package/src/generates/SdkGenerator.ts +43 -12
- package/src/generates/SwaggerGenerator.ts +229 -46
- package/src/generates/internal/E2eFileProgrammer.ts +20 -0
- package/src/generates/internal/FilePrinter.ts +71 -0
- package/src/generates/internal/ImportDictionary.ts +120 -2
- package/src/generates/internal/SdkAliasCollection.ts +144 -15
- package/src/generates/internal/SdkDistributionComposer.ts +181 -56
- package/src/generates/internal/SdkFileProgrammer.ts +126 -16
- package/src/generates/internal/SdkHttpCloneProgrammer.ts +55 -0
- package/src/generates/internal/SdkHttpCloneReferencer.ts +97 -23
- package/src/generates/internal/SdkHttpFunctionProgrammer.ts +47 -30
- package/src/generates/internal/SdkHttpNamespaceProgrammer.ts +53 -64
- package/src/generates/internal/SdkHttpParameterProgrammer.ts +295 -13
- package/src/generates/internal/SdkHttpRouteProgrammer.ts +37 -31
- package/src/generates/internal/SdkHttpSimulationProgrammer.ts +122 -18
- package/src/generates/internal/SdkImportWizard.ts +63 -0
- package/src/generates/internal/SdkMcpRouteProgrammer.ts +150 -33
- package/src/generates/internal/SdkPathTemplate.ts +88 -0
- package/src/generates/internal/SdkRouteDirectory.ts +10 -0
- package/src/generates/internal/SdkTypeProgrammer.ts +137 -36
- package/src/generates/internal/SdkTypeTagProgrammer.ts +536 -78
- package/src/generates/internal/SdkWebSocketCloneProgrammer.ts +185 -142
- package/src/generates/internal/SdkWebSocketNamespaceProgrammer.ts +62 -68
- package/src/generates/internal/SdkWebSocketParameterProgrammer.ts +205 -5
- package/src/generates/internal/SdkWebSocketRouteProgrammer.ts +89 -48
- package/src/generates/internal/SwaggerDescriptionComposer.ts +47 -1
- package/src/generates/internal/SwaggerOperationComposer.ts +38 -6
- package/src/generates/internal/SwaggerOperationParameterComposer.ts +318 -36
- package/src/generates/internal/SwaggerOperationResponseComposer.ts +74 -11
- package/src/internal/legacy-augmentation.d.ts +16 -0
- package/src/internal/legacy.ts +407 -49
- package/src/structures/INestiaProject.ts +10 -0
- package/src/structures/INestiaSdkInput.ts +30 -0
- package/src/structures/IOperationMetadata.ts +83 -0
- package/src/structures/IReflectController.ts +10 -0
- package/src/structures/IReflectHttpOperation.ts +10 -0
- package/src/structures/IReflectHttpOperationException.ts +17 -2
- package/src/structures/IReflectHttpOperationParameter.ts +56 -2
- package/src/structures/IReflectHttpOperationSuccess.ts +19 -3
- package/src/structures/IReflectImport.ts +10 -0
- package/src/structures/IReflectMcpOperation.ts +19 -0
- package/src/structures/IReflectMcpOperationParameter.ts +9 -0
- package/src/structures/IReflectOperationError.ts +31 -2
- package/src/structures/IReflectType.ts +9 -0
- package/src/structures/IReflectWebSocketOperation.ts +10 -0
- package/src/structures/IReflectWebSocketOperationParameter.ts +55 -0
- package/src/structures/ITypedApplication.ts +10 -0
- package/src/structures/ITypedHttpRoute.ts +18 -0
- package/src/structures/ITypedHttpRouteException.ts +14 -1
- package/src/structures/ITypedHttpRouteParameter.ts +48 -1
- package/src/structures/ITypedHttpRouteSuccess.ts +14 -1
- package/src/structures/ITypedMcpRoute.ts +12 -0
- package/src/structures/ITypedWebSocketRoute.ts +18 -0
- package/src/transform.ts +6 -0
- package/src/utils/ArrayUtil.ts +32 -13
- package/src/utils/EmittedJavaScriptPatcher.ts +70 -47
- package/src/utils/FileRetriever.ts +29 -0
- package/src/utils/HttpResponseContentTypeUtil.ts +41 -0
- package/src/utils/MapUtil.ts +68 -3
- package/src/utils/PathUtil.ts +38 -0
- package/src/utils/SdkBundlePath.ts +11 -0
- package/src/utils/SdkInputFilter.ts +108 -0
- package/src/utils/SourceFinder.ts +76 -18
- package/src/utils/StringUtil.ts +182 -5
- package/src/utils/TemporaryDirectory.ts +108 -0
- package/src/utils/TsConfigReader.ts +124 -26
- package/src/utils/TtscExecutor.ts +23 -1
- package/src/utils/VersioningStrategy.ts +51 -16
- package/src/validators/TextPlainValidator.ts +19 -0
- package/lib/generates/internal/SwaggerReadonlyArrayEmender.d.ts +0 -9
- package/lib/generates/internal/SwaggerReadonlyArrayEmender.js +0 -178
- package/lib/generates/internal/SwaggerReadonlyArrayEmender.js.map +0 -1
- package/lib/validators/HttpHeadersValidator.d.ts +0 -11
- package/lib/validators/HttpHeadersValidator.js +0 -15
- package/lib/validators/HttpHeadersValidator.js.map +0 -1
- package/lib/validators/HttpQueryValidator.d.ts +0 -10
- package/lib/validators/HttpQueryValidator.js +0 -14
- package/lib/validators/HttpQueryValidator.js.map +0 -1
- package/src/generates/internal/SwaggerReadonlyArrayEmender.ts +0 -264
- package/src/validators/HttpHeadersValidator.ts +0 -12
- package/src/validators/HttpQueryValidator.ts +0 -11
|
@@ -1,22 +1,135 @@
|
|
|
1
|
-
import { type ParameterDeclaration, type TypeNode } from "@ttsc/factory";
|
|
1
|
+
import { type Expression, type ParameterDeclaration, type TypeNode } from "@ttsc/factory";
|
|
2
2
|
import { INestiaProject } from "../../structures/INestiaProject";
|
|
3
3
|
import { ITypedWebSocketRoute } from "../../structures/ITypedWebSocketRoute";
|
|
4
|
+
import { ITypedWebSocketRouteParameter } from "../../structures/ITypedWebSocketRouteParameter";
|
|
5
|
+
/**
|
|
6
|
+
* The parameters of a WebSocket route's SDK function.
|
|
7
|
+
*
|
|
8
|
+
* @evidence contracts/common.md#principled-implementation The namespace decides the identifiers, lists the entries, and writes the declarations, as the HTTP one does.
|
|
9
|
+
* @evidence contracts/common.md#clear-and-simple-design Several small functions.
|
|
10
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The identifiers are decided once.
|
|
11
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
12
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
13
|
+
*/
|
|
4
14
|
export declare namespace SdkWebSocketParameterProgrammer {
|
|
15
|
+
/**
|
|
16
|
+
* One parameter of a WebSocket route: its key and its type.
|
|
17
|
+
*
|
|
18
|
+
* @evidence contracts/common.md#principled-implementation The record is what a declaration needs.
|
|
19
|
+
* @evidence contracts/common.md#clear-and-simple-design A two-member record.
|
|
20
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
21
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
22
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.IEntry composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
23
|
+
*/
|
|
5
24
|
interface IEntry {
|
|
6
25
|
key: string;
|
|
7
26
|
type: TypeNode;
|
|
8
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* The identifiers one WebSocket route's SDK function and `path()` use,
|
|
30
|
+
* decided once so the two cannot disagree; the HTTP counterpart,
|
|
31
|
+
* `SdkHttpParameterProgrammer.INames`, gives the rules.
|
|
32
|
+
*
|
|
33
|
+
* Path parameters are the user's names. `query` and `provider` are the SDK's
|
|
34
|
+
* own: the positional parameters, or the `props` keys in keyword mode, that
|
|
35
|
+
* carry the query object and the provider, so they yield to a path parameter
|
|
36
|
+
* of the same name instead of repeating it. A `props` key shadows nothing, so
|
|
37
|
+
* it yields to nothing else.
|
|
38
|
+
*
|
|
39
|
+
* @evidence contracts/common.md#principled-implementation One decision serves the two scopes.
|
|
40
|
+
* @evidence contracts/common.md#clear-and-simple-design A record of names and two lookups.
|
|
41
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
42
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
43
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.INames composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
44
|
+
*/
|
|
45
|
+
interface INames {
|
|
46
|
+
connection: string;
|
|
47
|
+
props: string;
|
|
48
|
+
query: string;
|
|
49
|
+
provider: string;
|
|
50
|
+
url: string;
|
|
51
|
+
connector: string;
|
|
52
|
+
driver: string;
|
|
53
|
+
variables: string;
|
|
54
|
+
location: string;
|
|
55
|
+
key: string;
|
|
56
|
+
value: string;
|
|
57
|
+
elem: string;
|
|
58
|
+
/**
|
|
59
|
+
* Local identifier of a path parameter in positional mode.
|
|
60
|
+
*
|
|
61
|
+
* @evidence contracts/common.md#principled-implementation A path parameter keeps its name unless the SDK cannot change the name it collides with.
|
|
62
|
+
* @evidence contracts/common.md#clear-and-simple-design One lookup.
|
|
63
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It reads the decision.
|
|
64
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
65
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.INames.parameter composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
66
|
+
*/
|
|
67
|
+
parameter: (p: ITypedWebSocketRouteParameter.IParam) => string;
|
|
68
|
+
/**
|
|
69
|
+
* Reads a parameter, or one of `query` and `provider`, by its key.
|
|
70
|
+
*
|
|
71
|
+
* @evidence contracts/common.md#principled-implementation The read follows the mode of the function.
|
|
72
|
+
* @evidence contracts/common.md#clear-and-simple-design One lookup.
|
|
73
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It reads the decision.
|
|
74
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
75
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.INames.access composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
76
|
+
*/
|
|
77
|
+
access: (key: string) => Expression;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Decides the identifiers of a WebSocket route's function and `path()` once.
|
|
81
|
+
*
|
|
82
|
+
* @evidence contracts/common.md#principled-implementation The fixed names each scope references are collected, and `query` and `provider` yield to a path parameter of the same name.
|
|
83
|
+
* @evidence contracts/common.md#clear-and-simple-design One function over the scope sets.
|
|
84
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Only shadowed names are renamed.
|
|
85
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
86
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.getNames composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
87
|
+
*/
|
|
88
|
+
const getNames: (props: {
|
|
89
|
+
project: INestiaProject;
|
|
90
|
+
route: ITypedWebSocketRoute;
|
|
91
|
+
}) => INames;
|
|
92
|
+
/**
|
|
93
|
+
* Returns the entries of a WebSocket route: its path parameters, its query,
|
|
94
|
+
* and its provider.
|
|
95
|
+
*
|
|
96
|
+
* @evidence contracts/common.md#principled-implementation The query exists only when the route has one, and the provider is included only when the caller requests it.
|
|
97
|
+
* @evidence contracts/common.md#clear-and-simple-design One list.
|
|
98
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The order is the call order.
|
|
99
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
100
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.getEntries composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
101
|
+
*/
|
|
9
102
|
const getEntries: (props: {
|
|
10
103
|
project: INestiaProject;
|
|
11
104
|
route: ITypedWebSocketRoute;
|
|
12
105
|
provider: boolean;
|
|
13
106
|
prefix: boolean;
|
|
14
107
|
}) => IEntry[];
|
|
108
|
+
/**
|
|
109
|
+
* Returns the parameter declarations of a WebSocket route's function: `props`
|
|
110
|
+
* in keyword mode, and one positional parameter per entry otherwise.
|
|
111
|
+
*
|
|
112
|
+
* @evidence contracts/common.md#principled-implementation The names come from `getNames`.
|
|
113
|
+
* @evidence contracts/common.md#clear-and-simple-design One function of two modes.
|
|
114
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The two modes share the entries.
|
|
115
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
116
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.getParameterDeclarations composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
117
|
+
*/
|
|
15
118
|
const getParameterDeclarations: (props: {
|
|
16
119
|
project: INestiaProject;
|
|
17
120
|
route: ITypedWebSocketRoute;
|
|
18
121
|
provider: boolean;
|
|
19
122
|
prefix: boolean;
|
|
20
123
|
}) => ParameterDeclaration[];
|
|
124
|
+
/**
|
|
125
|
+
* Reports whether the route's path holds no parameter, so `path()` takes
|
|
126
|
+
* none.
|
|
127
|
+
*
|
|
128
|
+
* @evidence contracts/common.md#principled-implementation The route has no path parameter and no query.
|
|
129
|
+
* @evidence contracts/common.md#clear-and-simple-design One expression.
|
|
130
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It reads the route.
|
|
131
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
132
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.isPathEmpty composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
133
|
+
*/
|
|
21
134
|
const isPathEmpty: (route: ITypedWebSocketRoute) => boolean;
|
|
22
135
|
}
|
|
@@ -2,20 +2,114 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SdkWebSocketParameterProgrammer = void 0;
|
|
4
4
|
const factory_1 = require("@ttsc/factory");
|
|
5
|
+
const StringUtil_1 = require("../../utils/StringUtil");
|
|
5
6
|
const SdkAliasCollection_1 = require("./SdkAliasCollection");
|
|
7
|
+
/**
|
|
8
|
+
* The parameters of a WebSocket route's SDK function.
|
|
9
|
+
*
|
|
10
|
+
* @evidence contracts/common.md#principled-implementation The namespace decides the identifiers, lists the entries, and writes the declarations, as the HTTP one does.
|
|
11
|
+
* @evidence contracts/common.md#clear-and-simple-design Several small functions.
|
|
12
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The identifiers are decided once.
|
|
13
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
14
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
15
|
+
*/
|
|
6
16
|
var SdkWebSocketParameterProgrammer;
|
|
7
17
|
(function (SdkWebSocketParameterProgrammer) {
|
|
18
|
+
/**
|
|
19
|
+
* Decides the identifiers of a WebSocket route's function and `path()` once.
|
|
20
|
+
*
|
|
21
|
+
* @evidence contracts/common.md#principled-implementation The fixed names each scope references are collected, and `query` and `provider` yield to a path parameter of the same name.
|
|
22
|
+
* @evidence contracts/common.md#clear-and-simple-design One function over the scope sets.
|
|
23
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Only shadowed names are renamed.
|
|
24
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
25
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.getNames composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
26
|
+
*/
|
|
27
|
+
SdkWebSocketParameterProgrammer.getNames = (props) => {
|
|
28
|
+
const { project, route } = props;
|
|
29
|
+
// names each scope references and the SDK cannot change
|
|
30
|
+
const functional = [route.name, "WebSocketConnector"];
|
|
31
|
+
const path = [
|
|
32
|
+
...(route.pathParameters.length !== 0 ? ["PathParameter"] : []),
|
|
33
|
+
...(route.query !== null
|
|
34
|
+
? ["URLSearchParams", "Object", "Array", "String", "undefined"]
|
|
35
|
+
: []),
|
|
36
|
+
];
|
|
37
|
+
const locals = new Map();
|
|
38
|
+
if (project.config.keyword !== true)
|
|
39
|
+
for (const p of route.pathParameters)
|
|
40
|
+
locals.set(p, StringUtil_1.StringUtil.escapeDuplicate([
|
|
41
|
+
...functional,
|
|
42
|
+
...path,
|
|
43
|
+
...route.pathParameters.filter((q) => q !== p).map((q) => q.name),
|
|
44
|
+
...locals.values(),
|
|
45
|
+
])(p.name));
|
|
46
|
+
// `query` and `provider` sit beside the path parameters, as parameters or
|
|
47
|
+
// as `props` keys. Every other own identifier avoids the positional
|
|
48
|
+
// path parameters its scope reads where it is visible: all of them for
|
|
49
|
+
// the function's locals, `variables`, and `location`, none for the
|
|
50
|
+
// loop's `key` and `value`, whose header reads only the query, and for
|
|
51
|
+
// `elem`.
|
|
52
|
+
const keys = route.pathParameters.map((p) => { var _a; return (_a = locals.get(p)) !== null && _a !== void 0 ? _a : p.name; });
|
|
53
|
+
const positional = [...locals.values()];
|
|
54
|
+
const own = (fixed, reads, taken) => (name) => {
|
|
55
|
+
const escaped = StringUtil_1.StringUtil.escapeDuplicate([
|
|
56
|
+
...fixed,
|
|
57
|
+
...reads,
|
|
58
|
+
...taken,
|
|
59
|
+
])(name);
|
|
60
|
+
taken.push(escaped);
|
|
61
|
+
return escaped;
|
|
62
|
+
};
|
|
63
|
+
const shared = [];
|
|
64
|
+
const $props = own([...functional, ...path], [], shared)("props");
|
|
65
|
+
// Positional `query` and `provider` also yield to the names their scopes
|
|
66
|
+
// reference; as `props` keys they shadow nothing, so a route named
|
|
67
|
+
// `query` keeps its `query` key.
|
|
68
|
+
const beside = (fixed) => own(project.config.keyword === true ? [] : fixed, keys, shared);
|
|
69
|
+
const $query = beside([...functional, ...path])("query");
|
|
70
|
+
const $provider = beside(functional)("provider");
|
|
71
|
+
const inFunction = [...shared];
|
|
72
|
+
const inPath = [...shared];
|
|
73
|
+
const names = {
|
|
74
|
+
props: $props,
|
|
75
|
+
query: $query,
|
|
76
|
+
provider: $provider,
|
|
77
|
+
connection: own(functional, positional, inFunction)("connection"),
|
|
78
|
+
url: own(functional, positional, inFunction)("url"),
|
|
79
|
+
connector: own(functional, positional, inFunction)("connector"),
|
|
80
|
+
driver: own(functional, positional, inFunction)("driver"),
|
|
81
|
+
variables: own(path, positional, inPath)("variables"),
|
|
82
|
+
location: own(path, positional, inPath)("location"),
|
|
83
|
+
key: own(path, [], inPath)("key"),
|
|
84
|
+
value: own(path, [], inPath)("value"),
|
|
85
|
+
elem: own(path, [], inPath)("elem"),
|
|
86
|
+
};
|
|
87
|
+
return Object.assign(Object.assign({}, names), { parameter: (p) => { var _a; return (_a = locals.get(p)) !== null && _a !== void 0 ? _a : p.name; }, access: (key) => project.config.keyword === true
|
|
88
|
+
? factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier(names.props), key)
|
|
89
|
+
: factory_1.factory.createIdentifier(key) });
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Returns the entries of a WebSocket route: its path parameters, its query,
|
|
93
|
+
* and its provider.
|
|
94
|
+
*
|
|
95
|
+
* @evidence contracts/common.md#principled-implementation The query exists only when the route has one, and the provider is included only when the caller requests it.
|
|
96
|
+
* @evidence contracts/common.md#clear-and-simple-design One list.
|
|
97
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The order is the call order.
|
|
98
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
99
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.getEntries composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
100
|
+
*/
|
|
8
101
|
SdkWebSocketParameterProgrammer.getEntries = (props) => {
|
|
102
|
+
const names = SdkWebSocketParameterProgrammer.getNames(props);
|
|
9
103
|
const prefix = props.prefix ? `${props.route.name}.` : "";
|
|
10
104
|
return [
|
|
11
105
|
...props.route.pathParameters.map((p) => ({
|
|
12
|
-
key: p
|
|
106
|
+
key: names.parameter(p),
|
|
13
107
|
type: SdkAliasCollection_1.SdkAliasCollection.name(p),
|
|
14
108
|
})),
|
|
15
109
|
...(props.route.query
|
|
16
110
|
? [
|
|
17
111
|
{
|
|
18
|
-
key:
|
|
112
|
+
key: names.query,
|
|
19
113
|
type: factory_1.factory.createTypeReferenceNode(`${prefix}Query`),
|
|
20
114
|
},
|
|
21
115
|
]
|
|
@@ -23,18 +117,29 @@ var SdkWebSocketParameterProgrammer;
|
|
|
23
117
|
...(props.provider
|
|
24
118
|
? [
|
|
25
119
|
{
|
|
26
|
-
key:
|
|
120
|
+
key: names.provider,
|
|
27
121
|
type: factory_1.factory.createTypeReferenceNode(`${prefix}Provider`),
|
|
28
122
|
},
|
|
29
123
|
]
|
|
30
124
|
: []),
|
|
31
125
|
];
|
|
32
126
|
};
|
|
127
|
+
/**
|
|
128
|
+
* Returns the parameter declarations of a WebSocket route's function: `props`
|
|
129
|
+
* in keyword mode, and one positional parameter per entry otherwise.
|
|
130
|
+
*
|
|
131
|
+
* @evidence contracts/common.md#principled-implementation The names come from `getNames`.
|
|
132
|
+
* @evidence contracts/common.md#clear-and-simple-design One function of two modes.
|
|
133
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The two modes share the entries.
|
|
134
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
135
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.getParameterDeclarations composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
136
|
+
*/
|
|
33
137
|
SdkWebSocketParameterProgrammer.getParameterDeclarations = (props) => {
|
|
34
138
|
const entries = SdkWebSocketParameterProgrammer.getEntries(props);
|
|
35
139
|
if (entries.length === 0)
|
|
36
140
|
return [];
|
|
37
141
|
else if (props.project.config.keyword === true) {
|
|
142
|
+
const names = SdkWebSocketParameterProgrammer.getNames(props);
|
|
38
143
|
const typeName = props.prefix
|
|
39
144
|
? `${props.route.name}.Props`
|
|
40
145
|
: "Props";
|
|
@@ -42,14 +147,24 @@ var SdkWebSocketParameterProgrammer;
|
|
|
42
147
|
? factory_1.factory.createTypeReferenceNode(typeName)
|
|
43
148
|
: factory_1.factory.createTypeReferenceNode("Omit", [
|
|
44
149
|
factory_1.factory.createTypeReferenceNode(typeName),
|
|
45
|
-
factory_1.factory.createLiteralTypeNode(factory_1.factory.createStringLiteral(
|
|
150
|
+
factory_1.factory.createLiteralTypeNode(factory_1.factory.createStringLiteral(names.provider)),
|
|
46
151
|
]);
|
|
47
152
|
return [
|
|
48
|
-
factory_1.factory.createParameterDeclaration(undefined, undefined,
|
|
153
|
+
factory_1.factory.createParameterDeclaration(undefined, undefined, names.props, undefined, node),
|
|
49
154
|
];
|
|
50
155
|
}
|
|
51
156
|
return entries.map((entry) => factory_1.factory.createParameterDeclaration(undefined, undefined, entry.key, undefined, entry.type));
|
|
52
157
|
};
|
|
158
|
+
/**
|
|
159
|
+
* Reports whether the route's path holds no parameter, so `path()` takes
|
|
160
|
+
* none.
|
|
161
|
+
*
|
|
162
|
+
* @evidence contracts/common.md#principled-implementation The route has no path parameter and no query.
|
|
163
|
+
* @evidence contracts/common.md#clear-and-simple-design One expression.
|
|
164
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It reads the route.
|
|
165
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
166
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketParameterProgrammer.isPathEmpty composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
167
|
+
*/
|
|
53
168
|
SdkWebSocketParameterProgrammer.isPathEmpty = (route) => route.pathParameters.length === 0 && route.query === null;
|
|
54
169
|
})(SdkWebSocketParameterProgrammer || (exports.SdkWebSocketParameterProgrammer = SdkWebSocketParameterProgrammer = {}));
|
|
55
170
|
//# sourceMappingURL=SdkWebSocketParameterProgrammer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdkWebSocketParameterProgrammer.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkWebSocketParameterProgrammer.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"SdkWebSocketParameterProgrammer.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkWebSocketParameterProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CAKuB;AAKvB,uDAAoD;AACpD,6DAA0D;AAE1D;;;;;;;;GAQG;AACH,IAAiB,+BAA+B,CA4Q/C;AA5QD,WAAiB,+BAA+B;IAqE9C;;;;;;;;OAQG;IACU,wCAAQ,GAAG,CAAC,KAGxB,EAAU,EAAE;QACX,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;QACjC,wDAAwD;QACxD,MAAM,UAAU,GAAa,CAAC,KAAK,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC;QAChE,MAAM,IAAI,GAAa;YACrB,GAAG,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/D,GAAG,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI;gBACtB,CAAC,CAAC,CAAC,iBAAiB,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,CAAC;gBAC/D,CAAC,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CAAC,CAAC;YACP,OAAO;gBACL,iBAAO,CAAC,0BAA0B,CAChC,SAAS,EACT,SAAS,EACT,KAAK,CAAC,KAAK,EACX,SAAS,EACT,IAAI,CACL;aACF,CAAC;QACJ,CAAC;QACD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAC3B,iBAAO,CAAC,0BAA0B,CAChC,SAAS,EACT,SAAS,EACT,KAAK,CAAC,GAAG,EACT,SAAS,EACT,KAAK,CAAC,IAAI,CACX,CACF,CAAC;IACJ,CAAC,CAAC;IAEF;;;;;;;;;OASG;IACU,2CAAW,GAAG,CAAC,KAA2B,EAAW,EAAE,CAClE,KAAK,CAAC,cAAc,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC;AAC9D,CAAC,EA5QgB,+BAA+B,aAA/B,+BAA+B,GAA/B,+BAA+B,QA4Q/C"}
|
|
@@ -2,6 +2,24 @@ import { type Statement } from "@ttsc/factory";
|
|
|
2
2
|
import { INestiaProject } from "../../structures/INestiaProject";
|
|
3
3
|
import { ITypedWebSocketRoute } from "../../structures/ITypedWebSocketRoute";
|
|
4
4
|
import { ImportDictionary } from "./ImportDictionary";
|
|
5
|
+
/**
|
|
6
|
+
* Writes a WebSocket route into the SDK: its function and its namespace.
|
|
7
|
+
*
|
|
8
|
+
* @evidence contracts/common.md#principled-implementation The namespace prints the async function that opens the connection with `tgrid`.
|
|
9
|
+
* @evidence contracts/common.md#clear-and-simple-design One public function and the writers.
|
|
10
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The identifiers are decided by the parameter programmer.
|
|
11
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
12
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketRouteProgrammer composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
13
|
+
*/
|
|
5
14
|
export declare namespace SdkWebSocketRouteProgrammer {
|
|
15
|
+
/**
|
|
16
|
+
* Returns the function and the namespace of a WebSocket route.
|
|
17
|
+
*
|
|
18
|
+
* @evidence contracts/common.md#principled-implementation The two nodes are composed together so they share names.
|
|
19
|
+
* @evidence contracts/common.md#clear-and-simple-design One function.
|
|
20
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The shape follows the route.
|
|
21
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
22
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketRouteProgrammer.write composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
23
|
+
*/
|
|
6
24
|
const write: (project: INestiaProject) => (importer: ImportDictionary) => (route: ITypedWebSocketRoute) => Statement[];
|
|
7
25
|
}
|
|
@@ -3,46 +3,87 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SdkWebSocketRouteProgrammer = void 0;
|
|
4
4
|
const factory_1 = require("@ttsc/factory");
|
|
5
5
|
const IdentifierFactory_1 = require("../../factories/IdentifierFactory");
|
|
6
|
-
const StringUtil_1 = require("../../utils/StringUtil");
|
|
7
6
|
const FilePrinter_1 = require("./FilePrinter");
|
|
8
7
|
const SdkImportWizard_1 = require("./SdkImportWizard");
|
|
9
8
|
const SdkWebSocketNamespaceProgrammer_1 = require("./SdkWebSocketNamespaceProgrammer");
|
|
10
9
|
const SdkWebSocketParameterProgrammer_1 = require("./SdkWebSocketParameterProgrammer");
|
|
10
|
+
/**
|
|
11
|
+
* Writes a WebSocket route into the SDK: its function and its namespace.
|
|
12
|
+
*
|
|
13
|
+
* @evidence contracts/common.md#principled-implementation The namespace prints the async function that opens the connection with `tgrid`.
|
|
14
|
+
* @evidence contracts/common.md#clear-and-simple-design One public function and the writers.
|
|
15
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The identifiers are decided by the parameter programmer.
|
|
16
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
17
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketRouteProgrammer composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
18
|
+
*/
|
|
11
19
|
var SdkWebSocketRouteProgrammer;
|
|
12
20
|
(function (SdkWebSocketRouteProgrammer) {
|
|
21
|
+
/**
|
|
22
|
+
* Returns the function and the namespace of a WebSocket route.
|
|
23
|
+
*
|
|
24
|
+
* @evidence contracts/common.md#principled-implementation The two nodes are composed together so they share names.
|
|
25
|
+
* @evidence contracts/common.md#clear-and-simple-design One function.
|
|
26
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The shape follows the route.
|
|
27
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
28
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkWebSocketRouteProgrammer.write composes SDK syntax, identifiers or import bindings; it does not resolve native file identity or launch a process. Source resolution and file emission belong to their filesystem owners.
|
|
29
|
+
*/
|
|
13
30
|
SdkWebSocketRouteProgrammer.write = (project) => (importer) => (route) => [
|
|
14
|
-
FilePrinter_1.FilePrinter.description(writeFunction(project)(importer)(route), writeDescription(route)),
|
|
31
|
+
FilePrinter_1.FilePrinter.description(writeFunction(project)(importer)(route), writeDescription(project, route)),
|
|
15
32
|
SdkWebSocketNamespaceProgrammer_1.SdkWebSocketNamespaceProgrammer.write(project)(importer)(route),
|
|
16
33
|
];
|
|
17
|
-
const writeDescription = (route) => {
|
|
34
|
+
const writeDescription = (project, route) => {
|
|
18
35
|
// MAIN DESCRIPTION
|
|
19
36
|
const comments = route.description
|
|
20
37
|
? route.description.split("\n")
|
|
21
38
|
: [];
|
|
22
|
-
// COMMENT TAGS
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
39
|
+
// COMMENT TAGS, each `@param` naming what the SDK function declares,
|
|
40
|
+
// which yields on a collision
|
|
41
|
+
const names = SdkWebSocketParameterProgrammer_1.SdkWebSocketParameterProgrammer.getNames({ project, route });
|
|
42
|
+
const declared = (name) => {
|
|
43
|
+
const path = route.pathParameters.find((p) => p.name === name);
|
|
44
|
+
const key = path !== undefined
|
|
45
|
+
? project.config.keyword === true
|
|
46
|
+
? path.name
|
|
47
|
+
: names.parameter(path)
|
|
48
|
+
: route.query !== null && route.query.name === name
|
|
49
|
+
? names.query
|
|
50
|
+
: null;
|
|
51
|
+
return key === null
|
|
52
|
+
? null
|
|
53
|
+
: project.config.keyword === true
|
|
54
|
+
? `${names.props}.${key}`
|
|
55
|
+
: key;
|
|
56
|
+
};
|
|
57
|
+
const tags = route.jsDocTags
|
|
58
|
+
.map((tag) => {
|
|
59
|
+
var _a, _b, _c, _d, _e;
|
|
60
|
+
var _f, _g;
|
|
61
|
+
if (tag.name !== "param")
|
|
62
|
+
return FilePrinter_1.FilePrinter.jsDocTag(tag.name, (_f = (_a = tag.text) === null || _a === void 0 ? void 0 : _a.map((e) => e.text).join("")) !== null && _f !== void 0 ? _f : "");
|
|
63
|
+
const name = declared((_c = (_b = tag.text) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.text);
|
|
64
|
+
return name === null
|
|
65
|
+
? null
|
|
66
|
+
: FilePrinter_1.FilePrinter.jsDocTag(`param ${name}`, (_g = (_e = (_d = tag.text) === null || _d === void 0 ? void 0 : _d.find((e) => e.kind === "text")) === null || _e === void 0 ? void 0 : _e.text) !== null && _g !== void 0 ? _g : "");
|
|
67
|
+
})
|
|
68
|
+
.filter((tag) => tag !== null);
|
|
69
|
+
// apart from the description, when there is one
|
|
70
|
+
if (tags.length !== 0)
|
|
71
|
+
comments.push(...(comments.length !== 0 ? [""] : []), ...new Set(tags));
|
|
33
72
|
// POSTFIX
|
|
34
73
|
if (!!comments.length)
|
|
35
74
|
comments.push("");
|
|
36
|
-
comments.push(
|
|
75
|
+
comments.push(
|
|
76
|
+
// the public name, kept by a route declared under a local one
|
|
77
|
+
`@controller ${route.controller.class.name}.${route.key}`, `@path ${route.path}`, `@nestia Generated by Nestia - https://github.com/samchon/nestia`);
|
|
37
78
|
return comments.join("\n");
|
|
38
79
|
};
|
|
39
80
|
const writeFunction = (project) => (importer) => (route) => {
|
|
40
|
-
const
|
|
81
|
+
const names = SdkWebSocketParameterProgrammer_1.SdkWebSocketParameterProgrammer.getNames({ project, route });
|
|
41
82
|
return factory_1.factory.createFunctionDeclaration([
|
|
42
83
|
factory_1.factory.createModifier(factory_1.SyntaxKind.ExportKeyword),
|
|
43
84
|
factory_1.factory.createModifier(factory_1.SyntaxKind.AsyncKeyword),
|
|
44
85
|
], undefined, route.name, undefined, [
|
|
45
|
-
IdentifierFactory_1.IdentifierFactory.parameter(connection, factory_1.factory.createTypeReferenceNode(SdkImportWizard_1.SdkImportWizard.IConnection(importer), [factory_1.factory.createTypeReferenceNode(`${route.name}.Header`)])),
|
|
86
|
+
IdentifierFactory_1.IdentifierFactory.parameter(names.connection, factory_1.factory.createTypeReferenceNode(SdkImportWizard_1.SdkImportWizard.IConnection(importer), [factory_1.factory.createTypeReferenceNode(`${route.name}.Header`)])),
|
|
46
87
|
...SdkWebSocketParameterProgrammer_1.SdkWebSocketParameterProgrammer.getParameterDeclarations({
|
|
47
88
|
project,
|
|
48
89
|
route,
|
|
@@ -51,23 +92,20 @@ var SdkWebSocketRouteProgrammer;
|
|
|
51
92
|
}),
|
|
52
93
|
], factory_1.factory.createTypeReferenceNode("Promise", [
|
|
53
94
|
factory_1.factory.createTypeReferenceNode(`${route.name}.Output`),
|
|
54
|
-
]), factory_1.factory.createBlock(writeFunctionBody(project)(importer)(route)(
|
|
95
|
+
]), factory_1.factory.createBlock(writeFunctionBody(project)(importer)(route)(names), true));
|
|
55
96
|
};
|
|
56
|
-
const writeFunctionBody = (project) => (importer) => (route) => (
|
|
57
|
-
const access = (key) => project.config.keyword === true
|
|
58
|
-
? factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier("props"), key)
|
|
59
|
-
: factory_1.factory.createIdentifier(key);
|
|
97
|
+
const writeFunctionBody = (project) => (importer) => (route) => (names) => {
|
|
60
98
|
return [
|
|
61
|
-
local(
|
|
99
|
+
local(names.url)(factory_1.factory.createTypeReferenceNode("string"))(joinPath(names.connection, factory_1.factory.createCallExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier(route.name), "path"), [], project.config.keyword === true &&
|
|
62
100
|
SdkWebSocketParameterProgrammer_1.SdkWebSocketParameterProgrammer.isPathEmpty(route) === false
|
|
63
|
-
? [factory_1.factory.createIdentifier(
|
|
101
|
+
? [factory_1.factory.createIdentifier(names.props)]
|
|
64
102
|
: SdkWebSocketParameterProgrammer_1.SdkWebSocketParameterProgrammer.getEntries({
|
|
65
103
|
project,
|
|
66
104
|
route,
|
|
67
105
|
provider: false,
|
|
68
106
|
prefix: true,
|
|
69
107
|
}).map((p) => factory_1.factory.createIdentifier(p.key))))),
|
|
70
|
-
local(
|
|
108
|
+
local(names.connector)(factory_1.factory.createTypeReferenceNode(importer.external({
|
|
71
109
|
declaration: false,
|
|
72
110
|
file: "tgrid",
|
|
73
111
|
type: "element",
|
|
@@ -82,24 +120,28 @@ var SdkWebSocketRouteProgrammer;
|
|
|
82
120
|
type: "element",
|
|
83
121
|
name: "WebSocketConnector",
|
|
84
122
|
})), undefined, [
|
|
85
|
-
factory_1.factory.createAsExpression(factory_1.factory.createBinaryExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier(connection), "headers"), factory_1.factory.createToken(factory_1.SyntaxKind.QuestionQuestionToken), factory_1.factory.createObjectLiteralExpression([], false)), factory_1.factory.createKeywordTypeNode(factory_1.SyntaxKind.AnyKeyword)),
|
|
86
|
-
access(
|
|
123
|
+
factory_1.factory.createAsExpression(factory_1.factory.createBinaryExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier(names.connection), "headers"), factory_1.factory.createToken(factory_1.SyntaxKind.QuestionQuestionToken), factory_1.factory.createObjectLiteralExpression([], false)), factory_1.factory.createKeywordTypeNode(factory_1.SyntaxKind.AnyKeyword)),
|
|
124
|
+
names.access(names.provider),
|
|
87
125
|
])),
|
|
88
|
-
factory_1.factory.createExpressionStatement(factory_1.factory.createAwaitExpression(factory_1.factory.createCallExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier(
|
|
89
|
-
local(
|
|
126
|
+
factory_1.factory.createExpressionStatement(factory_1.factory.createAwaitExpression(factory_1.factory.createCallExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier(names.connector), "connect"), undefined, [factory_1.factory.createIdentifier(names.url)]))),
|
|
127
|
+
local(names.driver)(factory_1.factory.createTypeReferenceNode(importer.external({
|
|
90
128
|
declaration: true,
|
|
91
129
|
file: "tgrid",
|
|
92
130
|
type: "element",
|
|
93
131
|
name: "Driver",
|
|
94
|
-
}), [factory_1.factory.createTypeReferenceNode(`${route.name}.Listener`)]))(factory_1.factory.createCallExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier(
|
|
132
|
+
}), [factory_1.factory.createTypeReferenceNode(`${route.name}.Listener`)]))(factory_1.factory.createCallExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier(names.connector), "getDriver"), undefined, undefined)),
|
|
95
133
|
factory_1.factory.createReturnStatement(factory_1.factory.createObjectLiteralExpression([
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
factory_1.factory.createPropertyAssignment(factory_1.factory.createIdentifier("reconnect"), factory_1.factory.createArrowFunction([factory_1.factory.createToken(factory_1.SyntaxKind.AsyncKeyword)], undefined, [], undefined, factory_1.factory.createToken(factory_1.SyntaxKind.EqualsGreaterThanToken), factory_1.factory.createAwaitExpression(factory_1.factory.createCallExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier(
|
|
134
|
+
writeOutputMember("connector", names.connector),
|
|
135
|
+
writeOutputMember("driver", names.driver),
|
|
136
|
+
factory_1.factory.createPropertyAssignment(factory_1.factory.createIdentifier("reconnect"), factory_1.factory.createArrowFunction([factory_1.factory.createToken(factory_1.SyntaxKind.AsyncKeyword)], undefined, [], undefined, factory_1.factory.createToken(factory_1.SyntaxKind.EqualsGreaterThanToken), factory_1.factory.createAwaitExpression(factory_1.factory.createCallExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier(names.connector), factory_1.factory.createIdentifier("connect")), undefined, [factory_1.factory.createIdentifier(names.url)])))),
|
|
99
137
|
], true)),
|
|
100
138
|
];
|
|
101
139
|
};
|
|
102
140
|
})(SdkWebSocketRouteProgrammer || (exports.SdkWebSocketRouteProgrammer = SdkWebSocketRouteProgrammer = {}));
|
|
141
|
+
/** A member of the returned `Output`, shorthand when its local has its name. */
|
|
142
|
+
const writeOutputMember = (key, local) => key === local
|
|
143
|
+
? factory_1.factory.createShorthandPropertyAssignment(key)
|
|
144
|
+
: factory_1.factory.createPropertyAssignment(key, factory_1.factory.createIdentifier(local));
|
|
103
145
|
const local = (name) => (type) => (expression) => factory_1.factory.createVariableStatement([], factory_1.factory.createVariableDeclarationList([factory_1.factory.createVariableDeclaration(name, undefined, type, expression)], factory_1.NodeFlags.Const));
|
|
104
146
|
const joinPath = (connection, caller) => factory_1.factory.createTemplateExpression(factory_1.factory.createTemplateHead("", ""), [
|
|
105
147
|
factory_1.factory.createTemplateSpan(factory_1.factory.createConditionalExpression(factory_1.factory.createCallExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier(connection), factory_1.factory.createIdentifier("host")), factory_1.factory.createIdentifier("endsWith")), undefined, [factory_1.factory.createStringLiteral("/")]), factory_1.factory.createToken(factory_1.SyntaxKind.QuestionToken), factory_1.factory.createCallExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createPropertyAccessExpression(factory_1.factory.createIdentifier(connection), factory_1.factory.createIdentifier("host")), factory_1.factory.createIdentifier("substring")), undefined, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdkWebSocketRouteProgrammer.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkWebSocketRouteProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CAOuB;
|
|
1
|
+
{"version":3,"file":"SdkWebSocketRouteProgrammer.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkWebSocketRouteProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CAOuB;AAEvB,yEAAsE;AAGtE,+CAA4C;AAE5C,uDAAoD;AACpD,uFAAoF;AACpF,uFAAoF;AAEpF;;;;;;;;GAQG;AACH,IAAiB,2BAA2B,CA2P3C;AA3PD,WAAiB,2BAA2B;IAC1C;;;;;;;;OAQG;IACU,iCAAK,GAChB,CAAC,OAAuB,EAAE,EAAE,CAC5B,CAAC,QAA0B,EAAE,EAAE,CAC/B,CAAC,KAA2B,EAAe,EAAE,CAAC;QAC5C,yBAAW,CAAC,WAAW,CACrB,aAAa,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,EACvC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,CACjC;QACD,iEAA+B,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC;KAChE,CAAC;IAEJ,MAAM,gBAAgB,GAAG,CACvB,OAAuB,EACvB,KAA2B,EACnB,EAAE;QACV,mBAAmB;QACnB,MAAM,QAAQ,GAAa,KAAK,CAAC,WAAW;YAC1C,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC;YAC/B,CAAC,CAAC,EAAE,CAAC;QAEP,qEAAqE;QACrE,8BAA8B;QAC9B,MAAM,KAAK,GACT,iEAA+B,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;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