@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
|
@@ -7,16 +7,73 @@ const legacy_1 = require("../../internal/legacy");
|
|
|
7
7
|
const FilePrinter_1 = require("./FilePrinter");
|
|
8
8
|
const SdkHttpParameterProgrammer_1 = require("./SdkHttpParameterProgrammer");
|
|
9
9
|
const SdkTypeProgrammer_1 = require("./SdkTypeProgrammer");
|
|
10
|
+
/**
|
|
11
|
+
* Type nodes of the SDK: the named types of routes, and the request and
|
|
12
|
+
* response aliases.
|
|
13
|
+
*
|
|
14
|
+
* @evidence contracts/common.md#principled-implementation The namespace builds each type as the syntax tree that the printer writes, from the reflected names or from the metadata when `clone` is on.
|
|
15
|
+
* @evidence contracts/common.md#clear-and-simple-design Several small builders.
|
|
16
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The builders depend on the project configuration for the choice of source.
|
|
17
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
18
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection 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.
|
|
19
|
+
*/
|
|
10
20
|
var SdkAliasCollection;
|
|
11
21
|
(function (SdkAliasCollection) {
|
|
22
|
+
/**
|
|
23
|
+
* Returns the type reference of a reflected type, with its type arguments.
|
|
24
|
+
*
|
|
25
|
+
* @evidence contracts/common.md#principled-implementation The arguments are built recursively.
|
|
26
|
+
* @evidence contracts/common.md#clear-and-simple-design One recursion.
|
|
27
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It writes the name as reflected.
|
|
28
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
29
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.name 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.
|
|
30
|
+
*/
|
|
12
31
|
SdkAliasCollection.name = ({ type }) => factory_1.factory.createTypeReferenceNode(type.name, type.typeArguments
|
|
13
32
|
? type.typeArguments.map((a) => SdkAliasCollection.name({ type: a }))
|
|
14
33
|
: undefined);
|
|
34
|
+
/**
|
|
35
|
+
* Returns the type of one chunk of a binary response:
|
|
36
|
+
* `Uint8Array<ArrayBufferLike>`.
|
|
37
|
+
*
|
|
38
|
+
* @evidence contracts/common.md#principled-implementation The chunk type of the platform stream is a byte array.
|
|
39
|
+
* @evidence contracts/common.md#clear-and-simple-design One node.
|
|
40
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The type is fixed.
|
|
41
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
42
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.binaryChunk 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.
|
|
43
|
+
*/
|
|
15
44
|
SdkAliasCollection.binaryChunk = () => factory_1.factory.createTypeReferenceNode("Uint8Array", [
|
|
16
45
|
factory_1.factory.createTypeReferenceNode("ArrayBufferLike"),
|
|
17
46
|
]);
|
|
47
|
+
/**
|
|
48
|
+
* Returns the type of a binary response: `ReadableStream` of its chunks.
|
|
49
|
+
*
|
|
50
|
+
* @evidence contracts/common.md#principled-implementation A binary response is streamed, not read into memory.
|
|
51
|
+
* @evidence contracts/common.md#clear-and-simple-design One node.
|
|
52
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The chunk type is shared.
|
|
53
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
54
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.binaryResponse 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.
|
|
55
|
+
*/
|
|
18
56
|
SdkAliasCollection.binaryResponse = () => factory_1.factory.createTypeReferenceNode("ReadableStream", [SdkAliasCollection.binaryChunk()]);
|
|
57
|
+
/**
|
|
58
|
+
* Returns the type node of a metadata.
|
|
59
|
+
*
|
|
60
|
+
* @evidence contracts/common.md#principled-implementation The metadata is written by the type programmer, so the result is the DTO the clone declares.
|
|
61
|
+
* @evidence contracts/common.md#clear-and-simple-design One delegation.
|
|
62
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It shares the type writer.
|
|
63
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
64
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.from 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.
|
|
65
|
+
*/
|
|
19
66
|
SdkAliasCollection.from = (project) => (importer) => (metadata) => SdkTypeProgrammer_1.SdkTypeProgrammer.write(project)(importer)(metadata);
|
|
67
|
+
/**
|
|
68
|
+
* Returns the object type of a route's keyword parameters, each with the
|
|
69
|
+
* description of its parameter or its `@param` tag.
|
|
70
|
+
*
|
|
71
|
+
* @evidence contracts/common.md#principled-implementation The entries are the route's path, query, and body parameters, optional where the metadata is, without prefix.
|
|
72
|
+
* @evidence contracts/common.md#clear-and-simple-design One map over the entries.
|
|
73
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts A parameter with a description carries it as a comment.
|
|
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 SdkAliasCollection.httpProps 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
|
+
*/
|
|
20
77
|
SdkAliasCollection.httpProps = (project) => (importer) => (route) => factory_1.factory.createTypeLiteralNode(SdkHttpParameterProgrammer_1.SdkHttpParameterProgrammer.getEntries({
|
|
21
78
|
project,
|
|
22
79
|
importer,
|
|
@@ -41,6 +98,16 @@ var SdkAliasCollection;
|
|
|
41
98
|
: [signature];
|
|
42
99
|
})
|
|
43
100
|
.flat());
|
|
101
|
+
/**
|
|
102
|
+
* Returns the object type of a WebSocket route's keyword parameters: its path
|
|
103
|
+
* parameters, its query, and its provider.
|
|
104
|
+
*
|
|
105
|
+
* @evidence contracts/common.md#principled-implementation The keys are the names decided by the parameter programmer, so the type and the function agree.
|
|
106
|
+
* @evidence contracts/common.md#clear-and-simple-design One literal.
|
|
107
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The names are shared.
|
|
108
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
109
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.websocketProps 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.
|
|
110
|
+
*/
|
|
44
111
|
SdkAliasCollection.websocketProps = (route, names) => factory_1.factory.createTypeLiteralNode([
|
|
45
112
|
...route.pathParameters.map((p) => factory_1.factory.createPropertySignature(undefined, p.name, undefined, SdkAliasCollection.name(p))),
|
|
46
113
|
...(route.query
|
|
@@ -50,6 +117,16 @@ var SdkAliasCollection;
|
|
|
50
117
|
: []),
|
|
51
118
|
factory_1.factory.createPropertySignature(undefined, names.provider, undefined, factory_1.factory.createTypeReferenceNode("Provider")),
|
|
52
119
|
]);
|
|
120
|
+
/**
|
|
121
|
+
* Returns the type of a route's headers: its reflected name, or the
|
|
122
|
+
* metadata's type under `clone`.
|
|
123
|
+
*
|
|
124
|
+
* @evidence contracts/common.md#principled-implementation The source follows the `clone` setting.
|
|
125
|
+
* @evidence contracts/common.md#clear-and-simple-design One conditional.
|
|
126
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The choice is made on one flag.
|
|
127
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
128
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.headers 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.
|
|
129
|
+
*/
|
|
53
130
|
SdkAliasCollection.headers = (project) => (importer) => (param) => {
|
|
54
131
|
if (project.config.clone === true)
|
|
55
132
|
return SdkAliasCollection.from(project)(importer)(param.metadata);
|
|
@@ -63,6 +140,16 @@ var SdkAliasCollection;
|
|
|
63
140
|
name: "Resolved",
|
|
64
141
|
}), [type]);
|
|
65
142
|
};
|
|
143
|
+
/**
|
|
144
|
+
* Returns the type of a route's query: its metadata under `clone`, otherwise
|
|
145
|
+
* its reflected type wrapped in Resolved unless primitive conversion is off.
|
|
146
|
+
*
|
|
147
|
+
* @evidence contracts/common.md#principled-implementation Clone mode uses the resolved metadata graph; source mode uses the declared type with the configured Resolved conversion.
|
|
148
|
+
* @evidence contracts/common.md#clear-and-simple-design One conditional.
|
|
149
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The choice is made on one flag.
|
|
150
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
151
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.query 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.
|
|
152
|
+
*/
|
|
66
153
|
SdkAliasCollection.query = (project) => (importer) => (param) => {
|
|
67
154
|
if (project.config.clone === true)
|
|
68
155
|
return SdkAliasCollection.from(project)(importer)(param.metadata);
|
|
@@ -76,6 +163,16 @@ var SdkAliasCollection;
|
|
|
76
163
|
name: "Resolved",
|
|
77
164
|
}), [type]);
|
|
78
165
|
};
|
|
166
|
+
/**
|
|
167
|
+
* Returns the type of a route's body: a form data input for a multipart body,
|
|
168
|
+
* and otherwise the reflected name or the metadata's type under `clone`.
|
|
169
|
+
*
|
|
170
|
+
* @evidence contracts/common.md#principled-implementation The multipart body is an input of files and fields, not the declared class.
|
|
171
|
+
* @evidence contracts/common.md#clear-and-simple-design One conditional.
|
|
172
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The cases are the content types.
|
|
173
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
174
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.body 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.
|
|
175
|
+
*/
|
|
79
176
|
SdkAliasCollection.body = (project) => (importer) => (param) => {
|
|
80
177
|
if (project.config.clone === true) {
|
|
81
178
|
const type = SdkAliasCollection.from(project)(importer)(param.metadata);
|
|
@@ -97,9 +194,20 @@ var SdkAliasCollection;
|
|
|
97
194
|
: "Resolved",
|
|
98
195
|
}), [type]);
|
|
99
196
|
};
|
|
197
|
+
/**
|
|
198
|
+
* Returns the type of a route's output: the success and every exception as a
|
|
199
|
+
* union of `IPropagation` members, or the success body alone when propagation
|
|
200
|
+
* is off.
|
|
201
|
+
*
|
|
202
|
+
* @evidence contracts/common.md#principled-implementation Status keys retain their declared numeric or range spelling for IPropagation to expand. Source success types follow their content type, while declared exceptions use JSON Primitive conversion independently of the success media type; primitive:false preserves declared source types.
|
|
203
|
+
* @evidence contracts/common.md#clear-and-simple-design One function of two branches.
|
|
204
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The exceptions are the declared ones.
|
|
205
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
206
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.response 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.
|
|
207
|
+
*/
|
|
100
208
|
SdkAliasCollection.response = (project) => (importer) => (route) => {
|
|
101
209
|
var _a;
|
|
102
|
-
const schema = (p) => (0, legacy_1.sizeOf)(p.metadata) === 0
|
|
210
|
+
const schema = (p, json) => (0, legacy_1.sizeOf)(p.metadata) === 0
|
|
103
211
|
? TypeFactory_1.TypeFactory.keyword("void")
|
|
104
212
|
: project.config.clone === true
|
|
105
213
|
? SdkAliasCollection.from(project)(importer)(p.metadata)
|
|
@@ -108,15 +216,13 @@ var SdkAliasCollection;
|
|
|
108
216
|
file: "typia",
|
|
109
217
|
declaration: true,
|
|
110
218
|
type: "element",
|
|
111
|
-
name:
|
|
112
|
-
route.success.encrypted === true
|
|
113
|
-
? "Primitive"
|
|
114
|
-
: "Resolved",
|
|
219
|
+
name: json ? "Primitive" : "Resolved",
|
|
115
220
|
}), [SdkAliasCollection.name(p)])
|
|
116
221
|
: SdkAliasCollection.name(p);
|
|
117
222
|
const success = route.success.binary === true
|
|
118
223
|
? SdkAliasCollection.binaryResponse()
|
|
119
|
-
: schema(route.success
|
|
224
|
+
: schema(route.success, route.success.contentType === "application/json" ||
|
|
225
|
+
route.success.encrypted === true);
|
|
120
226
|
if (project.config.propagate !== true)
|
|
121
227
|
return success;
|
|
122
228
|
const branches = [
|
|
@@ -126,7 +232,7 @@ var SdkAliasCollection;
|
|
|
126
232
|
},
|
|
127
233
|
...Object.entries(route.exceptions).map(([status, value]) => ({
|
|
128
234
|
status,
|
|
129
|
-
type: schema(value),
|
|
235
|
+
type: schema(value, true),
|
|
130
236
|
})),
|
|
131
237
|
];
|
|
132
238
|
return factory_1.factory.createTypeReferenceNode(importer.external({
|
|
@@ -147,6 +253,17 @@ var SdkAliasCollection;
|
|
|
147
253
|
: []),
|
|
148
254
|
]);
|
|
149
255
|
};
|
|
256
|
+
/**
|
|
257
|
+
* Returns the type of the success body: a stream for a binary response, the
|
|
258
|
+
* reflected type for a plain one, and its primitive form for a JSON
|
|
259
|
+
* response.
|
|
260
|
+
*
|
|
261
|
+
* @evidence contracts/common.md#principled-implementation The route's metadata decides between the branches.
|
|
262
|
+
* @evidence contracts/common.md#clear-and-simple-design One function.
|
|
263
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The branches are the response kinds.
|
|
264
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
265
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation SdkAliasCollection.responseBody 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.
|
|
266
|
+
*/
|
|
150
267
|
SdkAliasCollection.responseBody = (project) => (importer) => (route) => SdkAliasCollection.response(Object.assign(Object.assign({}, project), { config: Object.assign(Object.assign({}, project.config), { propagate: false }) }))(importer)(route);
|
|
151
268
|
const formDataInput = (importer) => (type) => factory_1.factory.createTypeReferenceNode(importer.external({
|
|
152
269
|
file: "@nestia/fetcher",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdkAliasCollection.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkAliasCollection.ts"],"names":[],"mappings":";;;AAAA,2CAKuB;AAEvB,6DAA0D;AAC1D,kDAA+D;AAM/D,+CAA4C;AAE5C,6EAA0E;AAC1E,2DAAwD;AAGxD,IAAiB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"SdkAliasCollection.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkAliasCollection.ts"],"names":[],"mappings":";;;AAAA,2CAKuB;AAEvB,6DAA0D;AAC1D,kDAA+D;AAM/D,+CAA4C;AAE5C,6EAA0E;AAC1E,2DAAwD;AAGxD;;;;;;;;;GASG;AACH,IAAiB,kBAAkB,CAqXlC;AArXD,WAAiB,kBAAkB;IACjC;;;;;;;;OAQG;IACU,uBAAI,GAAG,CAAC,EAAE,IAAI,EAA0B,EAAY,EAAE,CACjE,iBAAO,CAAC,uBAAuB,CAC7B,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,aAAa;QAChB,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,uBAAI,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;QAClD,CAAC,CAAC,SAAS,CACd,CAAC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CAAC,KAAsB,EAAY,EAAE,CACnC,2BAAQ,iCACH,OAAO,KACV,MAAM,kCACD,OAAO,CAAC,MAAM,KACjB,SAAS,EAAE,KAAK,OAElB,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC;IAExB,MAAM,aAAa,GAAG,CAAC,QAA0B,EAAE,EAAE,CAAC,CAAC,IAAc,EAAE,EAAE,CACvE,iBAAO,CAAC,uBAAuB,CAC7B,QAAQ,CAAC,QAAQ,CAAC;QAChB,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,IAAI;QACjB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,eAAe;KACtB,CAAC,EACF,CAAC,IAAI,CAAC,CACP,CAAC;AACN,CAAC,EArXgB,kBAAkB,aAAlB,kBAAkB,GAAlB,kBAAkB,QAqXlC"}
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
import { INestiaConfig } from "../../INestiaConfig";
|
|
2
|
+
/**
|
|
3
|
+
* Composes the npm package of the SDK in the distribution directory.
|
|
4
|
+
*
|
|
5
|
+
* @evidence contracts/common.md#principled-implementation The namespace copies the bundle, fills its paths in, and installs the dependencies at the versions the project uses.
|
|
6
|
+
* @evidence contracts/common.md#clear-and-simple-design One public function and the private steps.
|
|
7
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Each filesystem step resolves against the distribution directory; no process-global directory or foreign method is changed.
|
|
8
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
9
|
+
* @evidence contracts/portability.md#os-neutral-implementation Native paths use path.relative/path.join and generated paths use slash separators. npm receives an argument vector and an explicit cwd. POSIX launches npm directly; Windows launches the npm-cli.js shipped beside the first npm.cmd on PATH through Node because a cmd shim itself requires shell interpretation. A nonstandard Windows npm shim lacking that adjacent npm installation is rejected explicitly.
|
|
10
|
+
*/
|
|
2
11
|
export declare namespace SdkDistributionComposer {
|
|
12
|
+
/**
|
|
13
|
+
* Prepares the distribution package once: files, paths, and dependencies, and
|
|
14
|
+
* does nothing when the package is already configured.
|
|
15
|
+
*
|
|
16
|
+
* @evidence contracts/common.md#principled-implementation The package counts as configured when it holds `@nestia/fetcher`, which is installed last with its peers, so an interrupted setup runs again. The caller directory is captured once, and every output path and package-manager cwd is explicit.
|
|
17
|
+
* @evidence contracts/common.md#clear-and-simple-design One function of sequential steps.
|
|
18
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No process-global directory is changed, so independent compositions retain their own destinations.
|
|
19
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
20
|
+
* @evidence contracts/portability.md#os-neutral-implementation Existence of the two package files is the filesystem's own answer, and the bundle files are copied over any file of the same name in a distribution directory that is not yet configured, so an interrupted setup repeats the copy.
|
|
21
|
+
*/
|
|
3
22
|
const compose: (props: {
|
|
4
23
|
config: INestiaConfig;
|
|
5
24
|
mcp: boolean;
|
|
@@ -16,79 +16,118 @@ exports.SdkDistributionComposer = void 0;
|
|
|
16
16
|
const child_process_1 = __importDefault(require("child_process"));
|
|
17
17
|
const fs_1 = __importDefault(require("fs"));
|
|
18
18
|
const path_1 = __importDefault(require("path"));
|
|
19
|
+
/**
|
|
20
|
+
* Composes the npm package of the SDK in the distribution directory.
|
|
21
|
+
*
|
|
22
|
+
* @evidence contracts/common.md#principled-implementation The namespace copies the bundle, fills its paths in, and installs the dependencies at the versions the project uses.
|
|
23
|
+
* @evidence contracts/common.md#clear-and-simple-design One public function and the private steps.
|
|
24
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Each filesystem step resolves against the distribution directory; no process-global directory or foreign method is changed.
|
|
25
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
26
|
+
* @evidence contracts/portability.md#os-neutral-implementation Native paths use path.relative/path.join and generated paths use slash separators. npm receives an argument vector and an explicit cwd. POSIX launches npm directly; Windows launches the npm-cli.js shipped beside the first npm.cmd on PATH through Node because a cmd shim itself requires shell interpretation. A nonstandard Windows npm shim lacking that adjacent npm installation is rejected explicitly.
|
|
27
|
+
*/
|
|
19
28
|
var SdkDistributionComposer;
|
|
20
29
|
(function (SdkDistributionComposer) {
|
|
30
|
+
/**
|
|
31
|
+
* Prepares the distribution package once: files, paths, and dependencies, and
|
|
32
|
+
* does nothing when the package is already configured.
|
|
33
|
+
*
|
|
34
|
+
* @evidence contracts/common.md#principled-implementation The package counts as configured when it holds `@nestia/fetcher`, which is installed last with its peers, so an interrupted setup runs again. The caller directory is captured once, and every output path and package-manager cwd is explicit.
|
|
35
|
+
* @evidence contracts/common.md#clear-and-simple-design One function of sequential steps.
|
|
36
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No process-global directory is changed, so independent compositions retain their own destinations.
|
|
37
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
38
|
+
* @evidence contracts/portability.md#os-neutral-implementation Existence of the two package files is the filesystem's own answer, and the bundle files are copied over any file of the same name in a distribution directory that is not yet configured, so an interrupted setup repeats the copy.
|
|
39
|
+
*/
|
|
21
40
|
SdkDistributionComposer.compose = (props) => __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
if (!fs_1.default.existsSync(props.config.distribute))
|
|
23
|
-
yield fs_1.default.promises.mkdir(props.config.distribute, { recursive: true });
|
|
24
41
|
const root = process.cwd();
|
|
42
|
+
const directory = path_1.default.resolve(props.config.distribute);
|
|
25
43
|
const output = path_1.default.resolve(props.config.output);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
...(props.websocket && v.tgrid !== undefined
|
|
59
|
-
? [`tgrid@${v.tgrid}`]
|
|
60
|
-
: []),
|
|
61
|
-
].join(" "));
|
|
62
|
-
}
|
|
63
|
-
finally {
|
|
64
|
-
process.chdir(root);
|
|
65
|
-
}
|
|
44
|
+
yield fs_1.default.promises.mkdir(directory, { recursive: true });
|
|
45
|
+
if (yield configured(directory))
|
|
46
|
+
return;
|
|
47
|
+
console.log("Composing SDK distribution environments...");
|
|
48
|
+
for (const file of yield fs_1.default.promises.readdir(BUNDLE))
|
|
49
|
+
yield fs_1.default.promises.copyFile(path_1.default.join(BUNDLE, file), path_1.default.join(directory, file));
|
|
50
|
+
for (const file of ["package.json", "tsconfig.json"])
|
|
51
|
+
yield replace({ root, output, directory })(file);
|
|
52
|
+
// Compile with ttsc, which applies typia's transform; typia no longer has
|
|
53
|
+
// a setup command. Install each dependency kind together so an interrupted
|
|
54
|
+
// setup cannot mark @nestia/fetcher configured before its runtime peers.
|
|
55
|
+
const v = yield dependencies({
|
|
56
|
+
root,
|
|
57
|
+
websocket: props.websocket,
|
|
58
|
+
});
|
|
59
|
+
execute(directory, [
|
|
60
|
+
"install",
|
|
61
|
+
"--save-dev",
|
|
62
|
+
"rimraf",
|
|
63
|
+
`ttsc@${v.ttsc}`,
|
|
64
|
+
`typescript@${v.typescript}`,
|
|
65
|
+
]);
|
|
66
|
+
execute(directory, [
|
|
67
|
+
"install",
|
|
68
|
+
"--save",
|
|
69
|
+
`@nestia/fetcher@${v.version}`,
|
|
70
|
+
`typia@${v.typia}`,
|
|
71
|
+
...(props.mcp && v.mcp !== undefined
|
|
72
|
+
? [`@modelcontextprotocol/sdk@${v.mcp}`]
|
|
73
|
+
: []),
|
|
74
|
+
...(props.websocket && v.tgrid !== undefined ? [`tgrid@${v.tgrid}`] : []),
|
|
75
|
+
]);
|
|
66
76
|
});
|
|
67
|
-
const configured = () => __awaiter(this, void 0, void 0, function* () {
|
|
68
|
-
return ["package.json", "tsconfig.json"].every(fs_1.default.existsSync) &&
|
|
77
|
+
const configured = (directory) => __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
return ["package.json", "tsconfig.json"].every((file) => fs_1.default.existsSync(path_1.default.join(directory, file))) &&
|
|
69
79
|
(yield (() => __awaiter(this, void 0, void 0, function* () {
|
|
70
80
|
var _a;
|
|
71
|
-
const content = JSON.parse(yield fs_1.default.promises.readFile("package.json", "utf8"));
|
|
81
|
+
const content = JSON.parse(yield fs_1.default.promises.readFile(path_1.default.join(directory, "package.json"), "utf8"));
|
|
72
82
|
return !!((_a = content.dependencies) === null || _a === void 0 ? void 0 : _a["@nestia/fetcher"]);
|
|
73
83
|
}))());
|
|
74
84
|
});
|
|
75
|
-
const execute = (
|
|
76
|
-
|
|
77
|
-
|
|
85
|
+
const execute = (cwd, args) => {
|
|
86
|
+
var _a;
|
|
87
|
+
console.log(` - npm ${args.join(" ")}`);
|
|
88
|
+
if (process.platform !== "win32")
|
|
89
|
+
child_process_1.default.execFileSync("npm", args, { cwd, stdio: "ignore" });
|
|
90
|
+
else {
|
|
91
|
+
// Windows cannot execute npm.cmd without cmd.exe. Launch the JavaScript
|
|
92
|
+
// entry point installed beside that shim instead, so dependency ranges
|
|
93
|
+
// and paths never pass through a shell's metacharacter interpretation.
|
|
94
|
+
const directories = ((_a = process.env.PATH) !== null && _a !== void 0 ? _a : "").split(path_1.default.delimiter);
|
|
95
|
+
const directory = directories.find((entry) => fs_1.default.existsSync(path_1.default.join(entry, "npm.cmd")));
|
|
96
|
+
const cli = directory === undefined
|
|
97
|
+
? undefined
|
|
98
|
+
: [
|
|
99
|
+
path_1.default.join(directory, "node_modules/npm/bin/npm-cli.js"),
|
|
100
|
+
path_1.default.resolve(directory, "../npm/bin/npm-cli.js"),
|
|
101
|
+
].find((entry) => fs_1.default.existsSync(entry));
|
|
102
|
+
if (cli === undefined)
|
|
103
|
+
throw new Error("Unable to locate npm's JavaScript entry point beside npm.cmd on PATH.");
|
|
104
|
+
child_process_1.default.execFileSync(process.execPath, [cli, ...args], {
|
|
105
|
+
cwd,
|
|
106
|
+
stdio: "ignore",
|
|
107
|
+
});
|
|
108
|
+
}
|
|
78
109
|
};
|
|
79
110
|
const replace = (props) => (file) => __awaiter(this, void 0, void 0, function* () {
|
|
80
111
|
const relative = (from) => (to) => path_1.default.relative(from, to).split("\\").join("/");
|
|
81
|
-
const root = relative(
|
|
82
|
-
const output = relative(
|
|
83
|
-
const current = relative(props.root)(
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
.
|
|
91
|
-
|
|
112
|
+
const root = relative(props.directory)(props.root);
|
|
113
|
+
const output = relative(props.directory)(props.output);
|
|
114
|
+
const current = relative(props.root)(props.directory);
|
|
115
|
+
const replacements = { root, output, current };
|
|
116
|
+
const location = path_1.default.join(props.directory, file);
|
|
117
|
+
const content = JSON.parse(yield fs_1.default.promises.readFile(location, "utf8"));
|
|
118
|
+
const substitute = (value) => {
|
|
119
|
+
if (typeof value === "string")
|
|
120
|
+
return value.replace(/\$\{(root|output|current)\}/g, (_match, key) => replacements[key]);
|
|
121
|
+
if (Array.isArray(value))
|
|
122
|
+
return value.map(substitute);
|
|
123
|
+
if (value !== null && typeof value === "object")
|
|
124
|
+
return Object.fromEntries(Object.entries(value).map(([key, element]) => [
|
|
125
|
+
key,
|
|
126
|
+
substitute(element),
|
|
127
|
+
]));
|
|
128
|
+
return value;
|
|
129
|
+
};
|
|
130
|
+
yield fs_1.default.promises.writeFile(location, JSON.stringify(substitute(content), null, 2) + "\n", "utf8");
|
|
92
131
|
});
|
|
93
132
|
/**
|
|
94
133
|
* The version of a package the project installed, exactly: the staged package
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdkDistributionComposer.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkDistributionComposer.ts"],"names":[],"mappings":";;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C,CACzD,CAAC;YACJ,OAAO,KAAK,CAAC;QACf,CAAC,CAAC;QACF,MAAM,OAAO,GAAG,CAAC,IAAY,EAAsB,EAAE,CACnD,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;QACjD,OAAO;YACL,OAAO,EAAE,QAAQ,CAAC,iBAAiB,EAAE,IAAI,CAAC,OAAO,CAAC;YAClD,KAAK,EAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;YAC1C,IAAI,EAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;YACvC,UAAU,EAAE,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;YACzD,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS;YACpD,GAAG,EAAE,OAAO,CAAC,2BAA2B,CAAC;SAC1C,CAAC;IACJ,CAAC,CAAA,CAAC;AACJ,CAAC,EAhOgB,uBAAuB,aAAvB,uBAAuB,GAAvB,uBAAuB,QAgOvC;AAUD,MAAM,MAAM,GAAG,SAAS,GAAG,oCAAoC,CAAC"}
|
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
import { ITypedApplication } from "../../structures/ITypedApplication";
|
|
2
|
+
/**
|
|
3
|
+
* Writes the functional part of the SDK.
|
|
4
|
+
*
|
|
5
|
+
* @evidence contracts/common.md#principled-implementation The namespace builds the directory tree of the routes by accessor and prints one `index.ts` per directory.
|
|
6
|
+
* @evidence contracts/common.md#clear-and-simple-design One public function and two private helpers.
|
|
7
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The tree follows the accessors of the routes.
|
|
8
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
9
|
+
* @evidence contracts/portability.md#os-neutral-implementation Node mkdir creates native directories from the configured output and analyzed identifier accessors; ImportDictionary separately renders relative module specifiers with forward slashes. No filesystem case equivalence is inferred from route names.
|
|
10
|
+
*/
|
|
2
11
|
export declare namespace SdkFileProgrammer {
|
|
12
|
+
/**
|
|
13
|
+
* Writes the `functional` tree of the SDK from the routes' accessors.
|
|
14
|
+
*
|
|
15
|
+
* @evidence contracts/common.md#principled-implementation A route lands in the directory of its accessor without the last segment, and each directory exports its children as namespaces.
|
|
16
|
+
* @evidence contracts/common.md#clear-and-simple-design One tree build and one recursive writer.
|
|
17
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The order of routes is the analysis order.
|
|
18
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
19
|
+
* @evidence contracts/portability.md#os-neutral-implementation The recursive writer passes output paths to Node fs and FilePrinter, which accept the slash suffixes on Windows and POSIX. Accessor analysis supplies valid namespace names; module specifier spelling remains the importer’s separate responsibility.
|
|
20
|
+
*/
|
|
3
21
|
const generate: (app: ITypedApplication) => Promise<void>;
|
|
4
22
|
}
|
|
@@ -23,11 +23,29 @@ const SdkHttpRouteProgrammer_1 = require("./SdkHttpRouteProgrammer");
|
|
|
23
23
|
const SdkMcpRouteProgrammer_1 = require("./SdkMcpRouteProgrammer");
|
|
24
24
|
const SdkRouteDirectory_1 = require("./SdkRouteDirectory");
|
|
25
25
|
const SdkWebSocketRouteProgrammer_1 = require("./SdkWebSocketRouteProgrammer");
|
|
26
|
+
/**
|
|
27
|
+
* Writes the functional part of the SDK.
|
|
28
|
+
*
|
|
29
|
+
* @evidence contracts/common.md#principled-implementation The namespace builds the directory tree of the routes by accessor and prints one `index.ts` per directory.
|
|
30
|
+
* @evidence contracts/common.md#clear-and-simple-design One public function and two private helpers.
|
|
31
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The tree follows the accessors of the routes.
|
|
32
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
33
|
+
* @evidence contracts/portability.md#os-neutral-implementation Node mkdir creates native directories from the configured output and analyzed identifier accessors; ImportDictionary separately renders relative module specifiers with forward slashes. No filesystem case equivalence is inferred from route names.
|
|
34
|
+
*/
|
|
26
35
|
var SdkFileProgrammer;
|
|
27
36
|
(function (SdkFileProgrammer) {
|
|
28
37
|
/* ---------------------------------------------------------
|
|
29
38
|
CONSTRUCTOR
|
|
30
39
|
--------------------------------------------------------- */
|
|
40
|
+
/**
|
|
41
|
+
* Writes the `functional` tree of the SDK from the routes' accessors.
|
|
42
|
+
*
|
|
43
|
+
* @evidence contracts/common.md#principled-implementation A route lands in the directory of its accessor without the last segment, and each directory exports its children as namespaces.
|
|
44
|
+
* @evidence contracts/common.md#clear-and-simple-design One tree build and one recursive writer.
|
|
45
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The order of routes is the analysis order.
|
|
46
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what the declaration produces and its result.
|
|
47
|
+
* @evidence contracts/portability.md#os-neutral-implementation The recursive writer passes output paths to Node fs and FilePrinter, which accept the slash suffixes on Windows and POSIX. Accessor analysis supplies valid namespace names; module specifier spelling remains the importer’s separate responsibility.
|
|
48
|
+
*/
|
|
31
49
|
SdkFileProgrammer.generate = (app) => __awaiter(this, void 0, void 0, function* () {
|
|
32
50
|
// CONSTRUCT FOLDER TREE
|
|
33
51
|
const root = new SdkRouteDirectory_1.SdkRouteDirectory(null, "functional");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdkFileProgrammer.js","sourceRoot":"","sources":["../../../src/generates/internal/SdkFileProgrammer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA+D;AAC/D,4CAAoB;AAOpB,iDAA8C;AAC9C,uDAAoD;AACpD,+CAA4C;AAC5C,yDAAsD;AACtD,qEAAkE;AAClE,mEAAgE;AAChE,2DAAwD;AACxD,+EAA4E;AAE5E,IAAiB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"SdkFileProgrammer.js","sourceRoot":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