@typia/utils 12.1.0-dev.20260325 → 13.0.0-dev.20260425
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/LICENSE +21 -21
- package/README.md +85 -85
- package/lib/_virtual/ArrayUtil.mjs +4 -0
- package/lib/_virtual/ArrayUtil.mjs.map +1 -0
- package/lib/_virtual/EndpointUtil.mjs +4 -0
- package/lib/_virtual/EndpointUtil.mjs.map +1 -0
- package/lib/_virtual/HttpError.mjs +4 -0
- package/lib/_virtual/HttpError.mjs.map +1 -0
- package/lib/_virtual/HttpLlm.mjs +4 -0
- package/lib/_virtual/HttpLlm.mjs.map +1 -0
- package/lib/_virtual/HttpLlmApplicationComposer.mjs +4 -0
- package/lib/_virtual/HttpLlmApplicationComposer.mjs.map +1 -0
- package/lib/_virtual/HttpLlmFunctionFetcher.mjs +4 -0
- package/lib/_virtual/HttpLlmFunctionFetcher.mjs.map +1 -0
- package/lib/_virtual/HttpMigrateApplicationComposer.mjs +4 -0
- package/lib/_virtual/HttpMigrateApplicationComposer.mjs.map +1 -0
- package/lib/_virtual/HttpMigrateRouteAccessor.mjs +4 -0
- package/lib/_virtual/HttpMigrateRouteAccessor.mjs.map +1 -0
- package/lib/_virtual/HttpMigrateRouteComposer.mjs +4 -0
- package/lib/_virtual/HttpMigrateRouteComposer.mjs.map +1 -0
- package/lib/_virtual/HttpMigrateRouteFetcher.mjs +4 -0
- package/lib/_virtual/HttpMigrateRouteFetcher.mjs.map +1 -0
- package/lib/_virtual/HttpMigration.mjs +4 -0
- package/lib/_virtual/HttpMigration.mjs.map +1 -0
- package/lib/_virtual/IOpenApiValidatorContext.mjs +4 -0
- package/lib/_virtual/IOpenApiValidatorContext.mjs.map +1 -0
- package/lib/_virtual/JsonDescriptor.mjs +4 -0
- package/lib/_virtual/JsonDescriptor.mjs.map +1 -0
- package/lib/_virtual/LlmDescriptionInverter.mjs +4 -0
- package/lib/_virtual/LlmDescriptionInverter.mjs.map +1 -0
- package/lib/_virtual/LlmJson.mjs +4 -0
- package/lib/_virtual/LlmJson.mjs.map +1 -0
- package/lib/_virtual/LlmParametersComposer.mjs +4 -0
- package/lib/_virtual/LlmParametersComposer.mjs.map +1 -0
- package/lib/_virtual/LlmSchemaConverter.mjs +4 -0
- package/lib/_virtual/LlmSchemaConverter.mjs.map +1 -0
- package/lib/_virtual/LlmTypeChecker.mjs +4 -0
- package/lib/_virtual/LlmTypeChecker.mjs.map +1 -0
- package/lib/_virtual/MapUtil.mjs +4 -0
- package/lib/_virtual/MapUtil.mjs.map +1 -0
- package/lib/_virtual/NamingConvention.mjs +4 -0
- package/lib/_virtual/NamingConvention.mjs.map +1 -0
- package/lib/_virtual/OpenApiArrayValidator.mjs +4 -0
- package/lib/_virtual/OpenApiArrayValidator.mjs.map +1 -0
- package/lib/_virtual/OpenApiBooleanValidator.mjs +4 -0
- package/lib/_virtual/OpenApiBooleanValidator.mjs.map +1 -0
- package/lib/_virtual/OpenApiConstantValidator.mjs +4 -0
- package/lib/_virtual/OpenApiConstantValidator.mjs.map +1 -0
- package/lib/_virtual/OpenApiConstraintShifter.mjs +4 -0
- package/lib/_virtual/OpenApiConstraintShifter.mjs.map +1 -0
- package/lib/_virtual/OpenApiConverter.mjs +4 -0
- package/lib/_virtual/OpenApiConverter.mjs.map +1 -0
- package/lib/_virtual/OpenApiExclusiveEmender.mjs +4 -0
- package/lib/_virtual/OpenApiExclusiveEmender.mjs.map +1 -0
- package/lib/_virtual/OpenApiIntegerValidator.mjs +4 -0
- package/lib/_virtual/OpenApiIntegerValidator.mjs.map +1 -0
- package/lib/_virtual/OpenApiNumberValidator.mjs +4 -0
- package/lib/_virtual/OpenApiNumberValidator.mjs.map +1 -0
- package/lib/_virtual/OpenApiObjectValidator.mjs +4 -0
- package/lib/_virtual/OpenApiObjectValidator.mjs.map +1 -0
- package/lib/_virtual/OpenApiOneOfValidator.mjs +4 -0
- package/lib/_virtual/OpenApiOneOfValidator.mjs.map +1 -0
- package/lib/_virtual/OpenApiSchemaNamingRule.mjs +4 -0
- package/lib/_virtual/OpenApiSchemaNamingRule.mjs.map +1 -0
- package/lib/_virtual/OpenApiStationValidator.mjs +4 -0
- package/lib/_virtual/OpenApiStationValidator.mjs.map +1 -0
- package/lib/_virtual/OpenApiStringValidator.mjs +4 -0
- package/lib/_virtual/OpenApiStringValidator.mjs.map +1 -0
- package/lib/_virtual/OpenApiTupleValidator.mjs +4 -0
- package/lib/_virtual/OpenApiTupleValidator.mjs.map +1 -0
- package/lib/_virtual/OpenApiTypeChecker.mjs +4 -0
- package/lib/_virtual/OpenApiTypeChecker.mjs.map +1 -0
- package/lib/_virtual/OpenApiTypeCheckerBase.mjs +4 -0
- package/lib/_virtual/OpenApiTypeCheckerBase.mjs.map +1 -0
- package/lib/_virtual/OpenApiV3Downgrader.mjs +4 -0
- package/lib/_virtual/OpenApiV3Downgrader.mjs.map +1 -0
- package/lib/_virtual/OpenApiV3TypeChecker.mjs +4 -0
- package/lib/_virtual/OpenApiV3TypeChecker.mjs.map +1 -0
- package/lib/_virtual/OpenApiV3Upgrader.mjs +4 -0
- package/lib/_virtual/OpenApiV3Upgrader.mjs.map +1 -0
- package/lib/_virtual/OpenApiV3_1Downgrader.mjs +4 -0
- package/lib/_virtual/OpenApiV3_1Downgrader.mjs.map +1 -0
- package/lib/_virtual/OpenApiV3_1TypeChecker.mjs +4 -0
- package/lib/_virtual/OpenApiV3_1TypeChecker.mjs.map +1 -0
- package/lib/_virtual/OpenApiV3_1Upgrader.mjs +4 -0
- package/lib/_virtual/OpenApiV3_1Upgrader.mjs.map +1 -0
- package/lib/_virtual/OpenApiV3_2Upgrader.mjs +4 -0
- package/lib/_virtual/OpenApiV3_2Upgrader.mjs.map +1 -0
- package/lib/_virtual/OpenApiValidator.mjs +4 -0
- package/lib/_virtual/OpenApiValidator.mjs.map +1 -0
- package/lib/_virtual/Singleton.mjs +4 -0
- package/lib/_virtual/Singleton.mjs.map +1 -0
- package/lib/_virtual/StringUtil.mjs +4 -0
- package/lib/_virtual/StringUtil.mjs.map +1 -0
- package/lib/_virtual/SwaggerV2Downgrader.mjs +4 -0
- package/lib/_virtual/SwaggerV2Downgrader.mjs.map +1 -0
- package/lib/_virtual/SwaggerV2TypeChecker.mjs +4 -0
- package/lib/_virtual/SwaggerV2TypeChecker.mjs.map +1 -0
- package/lib/_virtual/SwaggerV2Upgrader.mjs +4 -0
- package/lib/_virtual/SwaggerV2Upgrader.mjs.map +1 -0
- package/lib/_virtual/_commonjsHelpers.mjs +6 -0
- package/lib/_virtual/_commonjsHelpers.mjs.map +1 -0
- package/lib/_virtual/_isBigintString.mjs +4 -0
- package/lib/_virtual/_isBigintString.mjs.map +1 -0
- package/lib/_virtual/_isFormatByte.mjs +4 -0
- package/lib/_virtual/_isFormatByte.mjs.map +1 -0
- package/lib/_virtual/_isFormatDate.mjs +4 -0
- package/lib/_virtual/_isFormatDate.mjs.map +1 -0
- package/lib/_virtual/_isFormatDateTime.mjs +4 -0
- package/lib/_virtual/_isFormatDateTime.mjs.map +1 -0
- package/lib/_virtual/_isFormatDuration.mjs +4 -0
- package/lib/_virtual/_isFormatDuration.mjs.map +1 -0
- package/lib/_virtual/_isFormatEmail.mjs +4 -0
- package/lib/_virtual/_isFormatEmail.mjs.map +1 -0
- package/lib/_virtual/_isFormatHostname.mjs +4 -0
- package/lib/_virtual/_isFormatHostname.mjs.map +1 -0
- package/lib/_virtual/_isFormatIdnEmail.mjs +4 -0
- package/lib/_virtual/_isFormatIdnEmail.mjs.map +1 -0
- package/lib/_virtual/_isFormatIdnHostname.mjs +4 -0
- package/lib/_virtual/_isFormatIdnHostname.mjs.map +1 -0
- package/lib/_virtual/_isFormatIpv4.mjs +4 -0
- package/lib/_virtual/_isFormatIpv4.mjs.map +1 -0
- package/lib/_virtual/_isFormatIpv6.mjs +4 -0
- package/lib/_virtual/_isFormatIpv6.mjs.map +1 -0
- package/lib/_virtual/_isFormatIri.mjs +4 -0
- package/lib/_virtual/_isFormatIri.mjs.map +1 -0
- package/lib/_virtual/_isFormatIriReference.mjs +4 -0
- package/lib/_virtual/_isFormatIriReference.mjs.map +1 -0
- package/lib/_virtual/_isFormatJsonPointer.mjs +4 -0
- package/lib/_virtual/_isFormatJsonPointer.mjs.map +1 -0
- package/lib/_virtual/_isFormatPassword.mjs +4 -0
- package/lib/_virtual/_isFormatPassword.mjs.map +1 -0
- package/lib/_virtual/_isFormatRegex.mjs +4 -0
- package/lib/_virtual/_isFormatRegex.mjs.map +1 -0
- package/lib/_virtual/_isFormatRelativeJsonPointer.mjs +4 -0
- package/lib/_virtual/_isFormatRelativeJsonPointer.mjs.map +1 -0
- package/lib/_virtual/_isFormatTime.mjs +4 -0
- package/lib/_virtual/_isFormatTime.mjs.map +1 -0
- package/lib/_virtual/_isFormatUri.mjs +4 -0
- package/lib/_virtual/_isFormatUri.mjs.map +1 -0
- package/lib/_virtual/_isFormatUriReference.mjs +4 -0
- package/lib/_virtual/_isFormatUriReference.mjs.map +1 -0
- package/lib/_virtual/_isFormatUriTemplate.mjs +4 -0
- package/lib/_virtual/_isFormatUriTemplate.mjs.map +1 -0
- package/lib/_virtual/_isFormatUrl.mjs +4 -0
- package/lib/_virtual/_isFormatUrl.mjs.map +1 -0
- package/lib/_virtual/_isFormatUuid.mjs +4 -0
- package/lib/_virtual/_isFormatUuid.mjs.map +1 -0
- package/lib/_virtual/_isUniqueItems.mjs +4 -0
- package/lib/_virtual/_isUniqueItems.mjs.map +1 -0
- package/lib/_virtual/coerceLlmArguments.mjs +4 -0
- package/lib/_virtual/coerceLlmArguments.mjs.map +1 -0
- package/lib/_virtual/dedent.mjs +4 -0
- package/lib/_virtual/dedent.mjs.map +1 -0
- package/lib/_virtual/index.mjs +4 -0
- package/lib/_virtual/index.mjs.map +1 -0
- package/lib/_virtual/index2.mjs +4 -0
- package/lib/_virtual/index2.mjs.map +1 -0
- package/lib/_virtual/index3.mjs +4 -0
- package/lib/_virtual/index3.mjs.map +1 -0
- package/lib/_virtual/index4.mjs +4 -0
- package/lib/_virtual/index4.mjs.map +1 -0
- package/lib/_virtual/index5.mjs +4 -0
- package/lib/_virtual/index5.mjs.map +1 -0
- package/lib/_virtual/parseLenientJson.mjs +4 -0
- package/lib/_virtual/parseLenientJson.mjs.map +1 -0
- package/lib/_virtual/stringifyValidationFailure.mjs +4 -0
- package/lib/_virtual/stringifyValidationFailure.mjs.map +1 -0
- package/lib/converters/LlmSchemaConverter.js +149 -51
- package/lib/converters/LlmSchemaConverter.js.map +1 -1
- package/lib/converters/LlmSchemaConverter.mjs +5 -511
- package/lib/converters/LlmSchemaConverter.mjs.map +1 -1
- package/lib/converters/LlmSchemaConverter2.mjs +551 -0
- package/lib/converters/LlmSchemaConverter2.mjs.map +1 -0
- package/lib/converters/OpenApiConverter.js.map +1 -1
- package/lib/converters/OpenApiConverter.mjs +5 -146
- package/lib/converters/OpenApiConverter.mjs.map +1 -1
- package/lib/converters/OpenApiConverter2.mjs +167 -0
- package/lib/converters/OpenApiConverter2.mjs.map +1 -0
- package/lib/converters/index.mjs +7 -3
- package/lib/converters/index.mjs.map +1 -1
- package/lib/converters/index2.mjs +37 -0
- package/lib/converters/index2.mjs.map +1 -0
- package/lib/converters/internal/LlmDescriptionInverter.js.map +1 -1
- package/lib/converters/internal/LlmDescriptionInverter.mjs +5 -138
- package/lib/converters/internal/LlmDescriptionInverter.mjs.map +1 -1
- package/lib/converters/internal/LlmDescriptionInverter2.mjs +153 -0
- package/lib/converters/internal/LlmDescriptionInverter2.mjs.map +1 -0
- package/lib/converters/internal/LlmParametersComposer.js +14 -17
- package/lib/converters/internal/LlmParametersComposer.js.map +1 -1
- package/lib/converters/internal/LlmParametersComposer.mjs +5 -39
- package/lib/converters/internal/LlmParametersComposer.mjs.map +1 -1
- package/lib/converters/internal/LlmParametersComposer2.mjs +48 -0
- package/lib/converters/internal/LlmParametersComposer2.mjs.map +1 -0
- package/lib/converters/internal/OpenApiConstraintShifter.js.map +1 -1
- package/lib/converters/internal/OpenApiConstraintShifter.mjs +5 -99
- package/lib/converters/internal/OpenApiConstraintShifter.mjs.map +1 -1
- package/lib/converters/internal/OpenApiConstraintShifter2.mjs +115 -0
- package/lib/converters/internal/OpenApiConstraintShifter2.mjs.map +1 -0
- package/lib/converters/internal/OpenApiExclusiveEmender.js.map +1 -1
- package/lib/converters/internal/OpenApiExclusiveEmender.mjs +6 -33
- package/lib/converters/internal/OpenApiExclusiveEmender.mjs.map +1 -1
- package/lib/converters/internal/OpenApiExclusiveEmender2.mjs +43 -0
- package/lib/converters/internal/OpenApiExclusiveEmender2.mjs.map +1 -0
- package/lib/converters/internal/OpenApiV3Downgrader.js +2 -1
- package/lib/converters/internal/OpenApiV3Downgrader.js.map +1 -1
- package/lib/converters/internal/OpenApiV3Downgrader.mjs +5 -299
- package/lib/converters/internal/OpenApiV3Downgrader.mjs.map +1 -1
- package/lib/converters/internal/OpenApiV3Downgrader2.mjs +247 -0
- package/lib/converters/internal/OpenApiV3Downgrader2.mjs.map +1 -0
- package/lib/converters/internal/OpenApiV3Upgrader.js +58 -67
- package/lib/converters/internal/OpenApiV3Upgrader.js.map +1 -1
- package/lib/converters/internal/OpenApiV3Upgrader.mjs +5 -367
- package/lib/converters/internal/OpenApiV3Upgrader.mjs.map +1 -1
- package/lib/converters/internal/OpenApiV3Upgrader2.mjs +308 -0
- package/lib/converters/internal/OpenApiV3Upgrader2.mjs.map +1 -0
- package/lib/converters/internal/OpenApiV3_1Downgrader.js.map +1 -1
- package/lib/converters/internal/OpenApiV3_1Downgrader.mjs +5 -236
- package/lib/converters/internal/OpenApiV3_1Downgrader.mjs.map +1 -1
- package/lib/converters/internal/OpenApiV3_1Downgrader2.mjs +203 -0
- package/lib/converters/internal/OpenApiV3_1Downgrader2.mjs.map +1 -0
- package/lib/converters/internal/OpenApiV3_1Upgrader.js +68 -70
- package/lib/converters/internal/OpenApiV3_1Upgrader.js.map +1 -1
- package/lib/converters/internal/OpenApiV3_1Upgrader.mjs +5 -564
- package/lib/converters/internal/OpenApiV3_1Upgrader.mjs.map +1 -1
- package/lib/converters/internal/OpenApiV3_1Upgrader2.mjs +435 -0
- package/lib/converters/internal/OpenApiV3_1Upgrader2.mjs.map +1 -0
- package/lib/converters/internal/OpenApiV3_2Upgrader.js +57 -63
- package/lib/converters/internal/OpenApiV3_2Upgrader.js.map +1 -1
- package/lib/converters/internal/OpenApiV3_2Upgrader.mjs +5 -240
- package/lib/converters/internal/OpenApiV3_2Upgrader.mjs.map +1 -1
- package/lib/converters/internal/OpenApiV3_2Upgrader2.mjs +211 -0
- package/lib/converters/internal/OpenApiV3_2Upgrader2.mjs.map +1 -0
- package/lib/converters/internal/SwaggerV2Downgrader.js +44 -56
- package/lib/converters/internal/SwaggerV2Downgrader.js.map +1 -1
- package/lib/converters/internal/SwaggerV2Downgrader.mjs +5 -352
- package/lib/converters/internal/SwaggerV2Downgrader.mjs.map +1 -1
- package/lib/converters/internal/SwaggerV2Downgrader2.mjs +297 -0
- package/lib/converters/internal/SwaggerV2Downgrader2.mjs.map +1 -0
- package/lib/converters/internal/SwaggerV2Upgrader.js +52 -63
- package/lib/converters/internal/SwaggerV2Upgrader.js.map +1 -1
- package/lib/converters/internal/SwaggerV2Upgrader.mjs +5 -421
- package/lib/converters/internal/SwaggerV2Upgrader.mjs.map +1 -1
- package/lib/converters/internal/SwaggerV2Upgrader2.mjs +378 -0
- package/lib/converters/internal/SwaggerV2Upgrader2.mjs.map +1 -0
- package/lib/http/HttpError.js.map +1 -1
- package/lib/http/HttpError.mjs +6 -74
- package/lib/http/HttpError.mjs.map +1 -1
- package/lib/http/HttpError2.mjs +81 -0
- package/lib/http/HttpError2.mjs.map +1 -0
- package/lib/http/HttpLlm.js +5 -4
- package/lib/http/HttpLlm.js.map +1 -1
- package/lib/http/HttpLlm.mjs +5 -96
- package/lib/http/HttpLlm.mjs.map +1 -1
- package/lib/http/HttpLlm2.mjs +115 -0
- package/lib/http/HttpLlm2.mjs.map +1 -0
- package/lib/http/HttpMigration.js.map +1 -1
- package/lib/http/HttpMigration.mjs +5 -49
- package/lib/http/HttpMigration.mjs.map +1 -1
- package/lib/http/HttpMigration2.mjs +66 -0
- package/lib/http/HttpMigration2.mjs.map +1 -0
- package/lib/http/index.mjs +7 -3
- package/lib/http/index.mjs.map +1 -1
- package/lib/http/index2.mjs +36 -0
- package/lib/http/index2.mjs.map +1 -0
- package/lib/http/internal/HttpLlmApplicationComposer.js +12 -13
- package/lib/http/internal/HttpLlmApplicationComposer.js.map +1 -1
- package/lib/http/internal/HttpLlmApplicationComposer.mjs +5 -297
- package/lib/http/internal/HttpLlmApplicationComposer.mjs.map +1 -1
- package/lib/http/internal/HttpLlmApplicationComposer2.mjs +309 -0
- package/lib/http/internal/HttpLlmApplicationComposer2.mjs.map +1 -0
- package/lib/http/internal/HttpLlmFunctionFetcher.js.map +1 -1
- package/lib/http/internal/HttpLlmFunctionFetcher.mjs +5 -21
- package/lib/http/internal/HttpLlmFunctionFetcher.mjs.map +1 -1
- package/lib/http/internal/HttpLlmFunctionFetcher2.mjs +36 -0
- package/lib/http/internal/HttpLlmFunctionFetcher2.mjs.map +1 -0
- package/lib/http/internal/HttpMigrateApplicationComposer.js.map +1 -1
- package/lib/http/internal/HttpMigrateApplicationComposer.mjs +5 -44
- package/lib/http/internal/HttpMigrateApplicationComposer.mjs.map +1 -1
- package/lib/http/internal/HttpMigrateApplicationComposer2.mjs +59 -0
- package/lib/http/internal/HttpMigrateApplicationComposer2.mjs.map +1 -0
- package/lib/http/internal/HttpMigrateRouteAccessor.js.map +1 -1
- package/lib/http/internal/HttpMigrateRouteAccessor.mjs +5 -103
- package/lib/http/internal/HttpMigrateRouteAccessor.mjs.map +1 -1
- package/lib/http/internal/HttpMigrateRouteAccessor2.mjs +121 -0
- package/lib/http/internal/HttpMigrateRouteAccessor2.mjs.map +1 -0
- package/lib/http/internal/HttpMigrateRouteComposer.js +35 -54
- package/lib/http/internal/HttpMigrateRouteComposer.js.map +1 -1
- package/lib/http/internal/HttpMigrateRouteComposer.mjs +5 -381
- package/lib/http/internal/HttpMigrateRouteComposer.mjs.map +1 -1
- package/lib/http/internal/HttpMigrateRouteComposer2.mjs +384 -0
- package/lib/http/internal/HttpMigrateRouteComposer2.mjs.map +1 -0
- package/lib/http/internal/HttpMigrateRouteFetcher.js +7 -6
- package/lib/http/internal/HttpMigrateRouteFetcher.js.map +1 -1
- package/lib/http/internal/HttpMigrateRouteFetcher.mjs +5 -171
- package/lib/http/internal/HttpMigrateRouteFetcher.mjs.map +1 -1
- package/lib/http/internal/HttpMigrateRouteFetcher2.mjs +192 -0
- package/lib/http/internal/HttpMigrateRouteFetcher2.mjs.map +1 -0
- package/lib/index.mjs +7 -19
- package/lib/index.mjs.map +1 -1
- package/lib/index2.mjs +38 -0
- package/lib/index2.mjs.map +1 -0
- package/lib/utils/ArrayUtil.js.map +1 -1
- package/lib/utils/ArrayUtil.mjs +6 -26
- package/lib/utils/ArrayUtil.mjs.map +1 -1
- package/lib/utils/ArrayUtil2.mjs +40 -0
- package/lib/utils/ArrayUtil2.mjs.map +1 -0
- package/lib/utils/LlmJson.d.ts +1 -1
- package/lib/utils/LlmJson.js.map +1 -1
- package/lib/utils/LlmJson.mjs +5 -153
- package/lib/utils/LlmJson.mjs.map +1 -1
- package/lib/utils/LlmJson2.mjs +172 -0
- package/lib/utils/LlmJson2.mjs.map +1 -0
- package/lib/utils/MapUtil.js.map +1 -1
- package/lib/utils/MapUtil.mjs +6 -13
- package/lib/utils/MapUtil.mjs.map +1 -1
- package/lib/utils/MapUtil2.mjs +27 -0
- package/lib/utils/MapUtil2.mjs.map +1 -0
- package/lib/utils/NamingConvention.js.map +1 -1
- package/lib/utils/NamingConvention.mjs +6 -196
- package/lib/utils/NamingConvention.mjs.map +1 -1
- package/lib/utils/NamingConvention2.mjs +210 -0
- package/lib/utils/NamingConvention2.mjs.map +1 -0
- package/lib/utils/Singleton.d.ts +6 -1
- package/lib/utils/Singleton.js +0 -1
- package/lib/utils/Singleton.js.map +1 -1
- package/lib/utils/Singleton.mjs +6 -16
- package/lib/utils/Singleton.mjs.map +1 -1
- package/lib/utils/Singleton2.mjs +28 -0
- package/lib/utils/Singleton2.mjs.map +1 -0
- package/lib/utils/StringUtil.js +6 -9
- package/lib/utils/StringUtil.js.map +1 -1
- package/lib/utils/StringUtil.mjs +6 -11
- package/lib/utils/StringUtil.mjs.map +1 -1
- package/lib/utils/StringUtil2.mjs +25 -0
- package/lib/utils/StringUtil2.mjs.map +1 -0
- package/lib/utils/dedent.js.map +1 -1
- package/lib/utils/dedent.mjs +6 -48
- package/lib/utils/dedent.mjs.map +1 -1
- package/lib/utils/dedent2.mjs +62 -0
- package/lib/utils/dedent2.mjs.map +1 -0
- package/lib/utils/index.mjs +7 -7
- package/lib/utils/index.mjs.map +1 -1
- package/lib/utils/index2.mjs +44 -0
- package/lib/utils/index2.mjs.map +1 -0
- package/lib/utils/internal/EndpointUtil.js.map +1 -1
- package/lib/utils/internal/EndpointUtil.mjs +5 -34
- package/lib/utils/internal/EndpointUtil.mjs.map +1 -1
- package/lib/utils/internal/EndpointUtil2.mjs +49 -0
- package/lib/utils/internal/EndpointUtil2.mjs.map +1 -0
- package/lib/utils/internal/JsonDescriptor.js +18 -25
- package/lib/utils/internal/JsonDescriptor.js.map +1 -1
- package/lib/utils/internal/JsonDescriptor.mjs +5 -45
- package/lib/utils/internal/JsonDescriptor.mjs.map +1 -1
- package/lib/utils/internal/JsonDescriptor2.mjs +64 -0
- package/lib/utils/internal/JsonDescriptor2.mjs.map +1 -0
- package/lib/utils/internal/OpenApiTypeCheckerBase.js +15 -9
- package/lib/utils/internal/OpenApiTypeCheckerBase.js.map +1 -1
- package/lib/utils/internal/OpenApiTypeCheckerBase.mjs +5 -581
- package/lib/utils/internal/OpenApiTypeCheckerBase.mjs.map +1 -1
- package/lib/utils/internal/OpenApiTypeCheckerBase2.mjs +539 -0
- package/lib/utils/internal/OpenApiTypeCheckerBase2.mjs.map +1 -0
- package/lib/utils/internal/coerceLlmArguments.js +18 -4
- package/lib/utils/internal/coerceLlmArguments.js.map +1 -1
- package/lib/utils/internal/coerceLlmArguments.mjs +5 -245
- package/lib/utils/internal/coerceLlmArguments.mjs.map +1 -1
- package/lib/utils/internal/coerceLlmArguments2.mjs +276 -0
- package/lib/utils/internal/coerceLlmArguments2.mjs.map +1 -0
- package/lib/utils/internal/parseLenientJson.js.map +1 -1
- package/lib/utils/internal/parseLenientJson.mjs +6 -803
- package/lib/utils/internal/parseLenientJson.mjs.map +1 -1
- package/lib/utils/internal/parseLenientJson2.mjs +815 -0
- package/lib/utils/internal/parseLenientJson2.mjs.map +1 -0
- package/lib/utils/internal/stringifyValidationFailure.js.map +1 -1
- package/lib/utils/internal/stringifyValidationFailure.mjs +5 -315
- package/lib/utils/internal/stringifyValidationFailure.mjs.map +1 -1
- package/lib/utils/internal/stringifyValidationFailure2.mjs +333 -0
- package/lib/utils/internal/stringifyValidationFailure2.mjs.map +1 -0
- package/lib/validators/LlmTypeChecker.js +4 -3
- package/lib/validators/LlmTypeChecker.js.map +1 -1
- package/lib/validators/LlmTypeChecker.mjs +5 -297
- package/lib/validators/LlmTypeChecker.mjs.map +1 -1
- package/lib/validators/LlmTypeChecker2.mjs +323 -0
- package/lib/validators/LlmTypeChecker2.mjs.map +1 -0
- package/lib/validators/OpenApiTypeChecker.js.map +1 -1
- package/lib/validators/OpenApiTypeChecker.mjs +5 -215
- package/lib/validators/OpenApiTypeChecker.mjs.map +1 -1
- package/lib/validators/OpenApiTypeChecker2.mjs +219 -0
- package/lib/validators/OpenApiTypeChecker2.mjs.map +1 -0
- package/lib/validators/OpenApiV3TypeChecker.js.map +1 -1
- package/lib/validators/OpenApiV3TypeChecker.mjs +6 -27
- package/lib/validators/OpenApiV3TypeChecker.mjs.map +1 -1
- package/lib/validators/OpenApiV3TypeChecker2.mjs +41 -0
- package/lib/validators/OpenApiV3TypeChecker2.mjs.map +1 -0
- package/lib/validators/OpenApiV3_1TypeChecker.js.map +1 -1
- package/lib/validators/OpenApiV3_1TypeChecker.mjs +6 -31
- package/lib/validators/OpenApiV3_1TypeChecker.mjs.map +1 -1
- package/lib/validators/OpenApiV3_1TypeChecker2.mjs +45 -0
- package/lib/validators/OpenApiV3_1TypeChecker2.mjs.map +1 -0
- package/lib/validators/OpenApiValidator.js.map +1 -1
- package/lib/validators/OpenApiValidator.mjs +5 -72
- package/lib/validators/OpenApiValidator.mjs.map +1 -1
- package/lib/validators/OpenApiValidator2.mjs +83 -0
- package/lib/validators/OpenApiValidator2.mjs.map +1 -0
- package/lib/validators/SwaggerV2TypeChecker.js.map +1 -1
- package/lib/validators/SwaggerV2TypeChecker.mjs +6 -28
- package/lib/validators/SwaggerV2TypeChecker.mjs.map +1 -1
- package/lib/validators/SwaggerV2TypeChecker2.mjs +42 -0
- package/lib/validators/SwaggerV2TypeChecker2.mjs.map +1 -0
- package/lib/validators/functional/_isBigintString.js.map +1 -1
- package/lib/validators/functional/_isBigintString.mjs +6 -10
- package/lib/validators/functional/_isBigintString.mjs.map +1 -1
- package/lib/validators/functional/_isBigintString2.mjs +25 -0
- package/lib/validators/functional/_isBigintString2.mjs.map +1 -0
- package/lib/validators/functional/_isFormatByte.js.map +1 -1
- package/lib/validators/functional/_isFormatByte.mjs +6 -6
- package/lib/validators/functional/_isFormatByte.mjs.map +1 -1
- package/lib/validators/functional/_isFormatByte2.mjs +21 -0
- package/lib/validators/functional/_isFormatByte2.mjs.map +1 -0
- package/lib/validators/functional/_isFormatDate.js.map +1 -1
- package/lib/validators/functional/_isFormatDate.mjs +6 -3
- package/lib/validators/functional/_isFormatDate.mjs.map +1 -1
- package/lib/validators/functional/_isFormatDate2.mjs +18 -0
- package/lib/validators/functional/_isFormatDate2.mjs.map +1 -0
- package/lib/validators/functional/_isFormatDateTime.js.map +1 -1
- package/lib/validators/functional/_isFormatDateTime.mjs +6 -3
- package/lib/validators/functional/_isFormatDateTime.mjs.map +1 -1
- package/lib/validators/functional/_isFormatDateTime2.mjs +18 -0
- package/lib/validators/functional/_isFormatDateTime2.mjs.map +1 -0
- package/lib/validators/functional/_isFormatDuration.js.map +1 -1
- package/lib/validators/functional/_isFormatDuration.mjs +6 -3
- package/lib/validators/functional/_isFormatDuration.mjs.map +1 -1
- package/lib/validators/functional/_isFormatDuration2.mjs +18 -0
- package/lib/validators/functional/_isFormatDuration2.mjs.map +1 -0
- package/lib/validators/functional/_isFormatEmail.js.map +1 -1
- package/lib/validators/functional/_isFormatEmail.mjs +6 -3
- package/lib/validators/functional/_isFormatEmail.mjs.map +1 -1
- package/lib/validators/functional/_isFormatEmail2.mjs +18 -0
- package/lib/validators/functional/_isFormatEmail2.mjs.map +1 -0
- package/lib/validators/functional/_isFormatHostname.js.map +1 -1
- package/lib/validators/functional/_isFormatHostname.mjs +6 -3
- package/lib/validators/functional/_isFormatHostname.mjs.map +1 -1
- package/lib/validators/functional/_isFormatHostname2.mjs +18 -0
- package/lib/validators/functional/_isFormatHostname2.mjs.map +1 -0
- package/lib/validators/functional/_isFormatIdnEmail.js.map +1 -1
- package/lib/validators/functional/_isFormatIdnEmail.mjs +6 -3
- package/lib/validators/functional/_isFormatIdnEmail.mjs.map +1 -1
- package/lib/validators/functional/_isFormatIdnEmail2.mjs +18 -0
- package/lib/validators/functional/_isFormatIdnEmail2.mjs.map +1 -0
- package/lib/validators/functional/_isFormatIdnHostname.js.map +1 -1
- package/lib/validators/functional/_isFormatIdnHostname.mjs +6 -3
- package/lib/validators/functional/_isFormatIdnHostname.mjs.map +1 -1
- package/lib/validators/functional/_isFormatIdnHostname2.mjs +18 -0
- package/lib/validators/functional/_isFormatIdnHostname2.mjs.map +1 -0
- package/lib/validators/functional/_isFormatIpv4.js.map +1 -1
- package/lib/validators/functional/_isFormatIpv4.mjs +6 -3
- package/lib/validators/functional/_isFormatIpv4.mjs.map +1 -1
- package/lib/validators/functional/_isFormatIpv42.mjs +18 -0
- package/lib/validators/functional/_isFormatIpv42.mjs.map +1 -0
- package/lib/validators/functional/_isFormatIpv6.js.map +1 -1
- package/lib/validators/functional/_isFormatIpv6.mjs +6 -3
- package/lib/validators/functional/_isFormatIpv6.mjs.map +1 -1
- package/lib/validators/functional/_isFormatIpv62.mjs +18 -0
- package/lib/validators/functional/_isFormatIpv62.mjs.map +1 -0
- package/lib/validators/functional/_isFormatIri.js.map +1 -1
- package/lib/validators/functional/_isFormatIri.mjs +6 -3
- package/lib/validators/functional/_isFormatIri.mjs.map +1 -1
- package/lib/validators/functional/_isFormatIri2.mjs +18 -0
- package/lib/validators/functional/_isFormatIri2.mjs.map +1 -0
- package/lib/validators/functional/_isFormatIriReference.js.map +1 -1
- package/lib/validators/functional/_isFormatIriReference.mjs +6 -3
- package/lib/validators/functional/_isFormatIriReference.mjs.map +1 -1
- package/lib/validators/functional/_isFormatIriReference2.mjs +18 -0
- package/lib/validators/functional/_isFormatIriReference2.mjs.map +1 -0
- package/lib/validators/functional/_isFormatJsonPointer.js.map +1 -1
- package/lib/validators/functional/_isFormatJsonPointer.mjs +6 -3
- package/lib/validators/functional/_isFormatJsonPointer.mjs.map +1 -1
- package/lib/validators/functional/_isFormatJsonPointer2.mjs +18 -0
- package/lib/validators/functional/_isFormatJsonPointer2.mjs.map +1 -0
- package/lib/validators/functional/_isFormatPassword.js.map +1 -1
- package/lib/validators/functional/_isFormatPassword.mjs +6 -2
- package/lib/validators/functional/_isFormatPassword.mjs.map +1 -1
- package/lib/validators/functional/_isFormatPassword2.mjs +17 -0
- package/lib/validators/functional/_isFormatPassword2.mjs.map +1 -0
- package/lib/validators/functional/_isFormatRegex.js.map +1 -1
- package/lib/validators/functional/_isFormatRegex.mjs +6 -10
- package/lib/validators/functional/_isFormatRegex.mjs.map +1 -1
- package/lib/validators/functional/_isFormatRegex2.mjs +25 -0
- package/lib/validators/functional/_isFormatRegex2.mjs.map +1 -0
- package/lib/validators/functional/_isFormatRelativeJsonPointer.js.map +1 -1
- package/lib/validators/functional/_isFormatRelativeJsonPointer.mjs +6 -3
- package/lib/validators/functional/_isFormatRelativeJsonPointer.mjs.map +1 -1
- package/lib/validators/functional/_isFormatRelativeJsonPointer2.mjs +18 -0
- package/lib/validators/functional/_isFormatRelativeJsonPointer2.mjs.map +1 -0
- package/lib/validators/functional/_isFormatTime.js.map +1 -1
- package/lib/validators/functional/_isFormatTime.mjs +6 -3
- package/lib/validators/functional/_isFormatTime.mjs.map +1 -1
- package/lib/validators/functional/_isFormatTime2.mjs +18 -0
- package/lib/validators/functional/_isFormatTime2.mjs.map +1 -0
- package/lib/validators/functional/_isFormatUri.js.map +1 -1
- package/lib/validators/functional/_isFormatUri.mjs +6 -4
- package/lib/validators/functional/_isFormatUri.mjs.map +1 -1
- package/lib/validators/functional/_isFormatUri2.mjs +19 -0
- package/lib/validators/functional/_isFormatUri2.mjs.map +1 -0
- package/lib/validators/functional/_isFormatUriReference.js.map +1 -1
- package/lib/validators/functional/_isFormatUriReference.mjs +6 -3
- package/lib/validators/functional/_isFormatUriReference.mjs.map +1 -1
- package/lib/validators/functional/_isFormatUriReference2.mjs +18 -0
- package/lib/validators/functional/_isFormatUriReference2.mjs.map +1 -0
- package/lib/validators/functional/_isFormatUriTemplate.js.map +1 -1
- package/lib/validators/functional/_isFormatUriTemplate.mjs +6 -3
- package/lib/validators/functional/_isFormatUriTemplate.mjs.map +1 -1
- package/lib/validators/functional/_isFormatUriTemplate2.mjs +18 -0
- package/lib/validators/functional/_isFormatUriTemplate2.mjs.map +1 -0
- package/lib/validators/functional/_isFormatUrl.js.map +1 -1
- package/lib/validators/functional/_isFormatUrl.mjs +6 -3
- package/lib/validators/functional/_isFormatUrl.mjs.map +1 -1
- package/lib/validators/functional/_isFormatUrl2.mjs +18 -0
- package/lib/validators/functional/_isFormatUrl2.mjs.map +1 -0
- package/lib/validators/functional/_isFormatUuid.js.map +1 -1
- package/lib/validators/functional/_isFormatUuid.mjs +6 -3
- package/lib/validators/functional/_isFormatUuid.mjs.map +1 -1
- package/lib/validators/functional/_isFormatUuid2.mjs +18 -0
- package/lib/validators/functional/_isFormatUuid2.mjs.map +1 -0
- package/lib/validators/functional/_isUniqueItems.js.map +1 -1
- package/lib/validators/functional/_isUniqueItems.mjs +6 -136
- package/lib/validators/functional/_isUniqueItems.mjs.map +1 -1
- package/lib/validators/functional/_isUniqueItems2.mjs +151 -0
- package/lib/validators/functional/_isUniqueItems2.mjs.map +1 -0
- package/lib/validators/index.d.ts +1 -0
- package/lib/validators/index.js +0 -1
- package/lib/validators/index.js.map +1 -1
- package/lib/validators/index.mjs +7 -6
- package/lib/validators/index.mjs.map +1 -1
- package/lib/validators/index2.mjs +45 -0
- package/lib/validators/index2.mjs.map +1 -0
- package/lib/validators/internal/IOpenApiValidatorContext.mjs +6 -0
- package/lib/validators/internal/IOpenApiValidatorContext.mjs.map +1 -1
- package/lib/validators/internal/IOpenApiValidatorContext2.mjs +14 -0
- package/lib/validators/internal/IOpenApiValidatorContext2.mjs.map +1 -0
- package/lib/validators/internal/OpenApiArrayValidator.js.map +1 -1
- package/lib/validators/internal/OpenApiArrayValidator.mjs +5 -44
- package/lib/validators/internal/OpenApiArrayValidator.mjs.map +1 -1
- package/lib/validators/internal/OpenApiArrayValidator2.mjs +45 -0
- package/lib/validators/internal/OpenApiArrayValidator2.mjs.map +1 -0
- package/lib/validators/internal/OpenApiBooleanValidator.js.map +1 -1
- package/lib/validators/internal/OpenApiBooleanValidator.mjs +6 -7
- package/lib/validators/internal/OpenApiBooleanValidator.mjs.map +1 -1
- package/lib/validators/internal/OpenApiBooleanValidator2.mjs +21 -0
- package/lib/validators/internal/OpenApiBooleanValidator2.mjs.map +1 -0
- package/lib/validators/internal/OpenApiConstantValidator.js.map +1 -1
- package/lib/validators/internal/OpenApiConstantValidator.mjs +6 -7
- package/lib/validators/internal/OpenApiConstantValidator.mjs.map +1 -1
- package/lib/validators/internal/OpenApiConstantValidator2.mjs +21 -0
- package/lib/validators/internal/OpenApiConstantValidator2.mjs.map +1 -0
- package/lib/validators/internal/OpenApiIntegerValidator.js.map +1 -1
- package/lib/validators/internal/OpenApiIntegerValidator.mjs +6 -45
- package/lib/validators/internal/OpenApiIntegerValidator.mjs.map +1 -1
- package/lib/validators/internal/OpenApiIntegerValidator2.mjs +44 -0
- package/lib/validators/internal/OpenApiIntegerValidator2.mjs.map +1 -0
- package/lib/validators/internal/OpenApiNumberValidator.js.map +1 -1
- package/lib/validators/internal/OpenApiNumberValidator.mjs +6 -45
- package/lib/validators/internal/OpenApiNumberValidator.mjs.map +1 -1
- package/lib/validators/internal/OpenApiNumberValidator2.mjs +44 -0
- package/lib/validators/internal/OpenApiNumberValidator2.mjs.map +1 -0
- package/lib/validators/internal/OpenApiObjectValidator.js +6 -12
- package/lib/validators/internal/OpenApiObjectValidator.js.map +1 -1
- package/lib/validators/internal/OpenApiObjectValidator.mjs +5 -65
- package/lib/validators/internal/OpenApiObjectValidator.mjs.map +1 -1
- package/lib/validators/internal/OpenApiObjectValidator2.mjs +65 -0
- package/lib/validators/internal/OpenApiObjectValidator2.mjs.map +1 -0
- package/lib/validators/internal/OpenApiOneOfValidator.js +20 -20
- package/lib/validators/internal/OpenApiOneOfValidator.js.map +1 -1
- package/lib/validators/internal/OpenApiOneOfValidator.mjs +5 -203
- package/lib/validators/internal/OpenApiOneOfValidator.mjs.map +1 -1
- package/lib/validators/internal/OpenApiOneOfValidator2.mjs +196 -0
- package/lib/validators/internal/OpenApiOneOfValidator2.mjs.map +1 -0
- package/lib/validators/internal/OpenApiSchemaNamingRule.js.map +1 -1
- package/lib/validators/internal/OpenApiSchemaNamingRule.mjs +5 -118
- package/lib/validators/internal/OpenApiSchemaNamingRule.mjs.map +1 -1
- package/lib/validators/internal/OpenApiSchemaNamingRule2.mjs +134 -0
- package/lib/validators/internal/OpenApiSchemaNamingRule2.mjs.map +1 -0
- package/lib/validators/internal/OpenApiStationValidator.js +2 -1
- package/lib/validators/internal/OpenApiStationValidator.js.map +1 -1
- package/lib/validators/internal/OpenApiStationValidator.mjs +5 -104
- package/lib/validators/internal/OpenApiStationValidator.mjs.map +1 -1
- package/lib/validators/internal/OpenApiStationValidator2.mjs +86 -0
- package/lib/validators/internal/OpenApiStationValidator2.mjs.map +1 -0
- package/lib/validators/internal/OpenApiStringValidator.js.map +1 -1
- package/lib/validators/internal/OpenApiStringValidator.mjs +5 -82
- package/lib/validators/internal/OpenApiStringValidator.mjs.map +1 -1
- package/lib/validators/internal/OpenApiStringValidator2.mjs +105 -0
- package/lib/validators/internal/OpenApiStringValidator2.mjs.map +1 -0
- package/lib/validators/internal/OpenApiTupleValidator.js.map +1 -1
- package/lib/validators/internal/OpenApiTupleValidator.mjs +5 -43
- package/lib/validators/internal/OpenApiTupleValidator.mjs.map +1 -1
- package/lib/validators/internal/OpenApiTupleValidator2.mjs +43 -0
- package/lib/validators/internal/OpenApiTupleValidator2.mjs.map +1 -0
- package/package.json +8 -9
- package/src/converters/LlmSchemaConverter.ts +152 -33
- package/src/converters/OpenApiConverter.ts +375 -375
- package/src/converters/internal/OpenApiV3Downgrader.ts +381 -381
- package/src/converters/internal/OpenApiV3Upgrader.ts +494 -494
- package/src/converters/internal/OpenApiV3_1Downgrader.ts +318 -318
- package/src/converters/internal/OpenApiV3_1Upgrader.ts +713 -710
- package/src/converters/internal/OpenApiV3_2Upgrader.ts +342 -342
- package/src/converters/internal/SwaggerV2Downgrader.ts +450 -450
- package/src/converters/internal/SwaggerV2Upgrader.ts +547 -547
- package/src/http/HttpError.ts +114 -114
- package/src/http/HttpLlm.ts +169 -169
- package/src/http/HttpMigration.ts +94 -94
- package/src/http/internal/HttpMigrateApplicationComposer.ts +56 -56
- package/src/http/internal/HttpMigrateRouteComposer.ts +505 -505
- package/src/utils/LlmJson.ts +173 -173
- package/src/utils/Singleton.ts +0 -1
- package/src/utils/internal/OpenApiTypeCheckerBase.ts +2 -0
- package/src/utils/internal/coerceLlmArguments.ts +21 -3
- package/src/utils/internal/parseLenientJson.ts +919 -919
- package/src/validators/index.ts +0 -1
|
@@ -1,174 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getDefaultExportFromCjs } from '../../_virtual/_commonjsHelpers.mjs';
|
|
2
|
+
import { __require as requireHttpMigrateRouteFetcher } from './HttpMigrateRouteFetcher2.mjs';
|
|
2
3
|
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
HttpMigrateRouteFetcher.execute = async (props) => {
|
|
6
|
-
const result = await _Propagate("request", props);
|
|
7
|
-
props.route.success?.media;
|
|
8
|
-
if (result.status !== 200 && result.status !== 201)
|
|
9
|
-
throw new HttpError(props.route.method.toUpperCase(), props.route.path, result.status, result.headers, result.body);
|
|
10
|
-
return result.body;
|
|
11
|
-
};
|
|
12
|
-
HttpMigrateRouteFetcher.propagate = (props) => _Propagate("propagate", props);
|
|
13
|
-
})(HttpMigrateRouteFetcher || (HttpMigrateRouteFetcher = {}));
|
|
14
|
-
const _Propagate = async (from, props) => {
|
|
15
|
-
// VALIDATE PARAMETERS
|
|
16
|
-
const error = (message) => new Error(`Error on MigrateRouteFetcher.${from}(): ${message}`);
|
|
17
|
-
if (Array.isArray(props.parameters)) {
|
|
18
|
-
if (props.route.parameters.length !== props.parameters.length)
|
|
19
|
-
throw error(`number of parameters is not matched.`);
|
|
20
|
-
}
|
|
21
|
-
else if (props.route.parameters.every((p) => props.parameters[p.key] !== undefined) === false)
|
|
22
|
-
throw error(`number of parameters is not matched.`);
|
|
23
|
-
// VALIDATE QUERY
|
|
24
|
-
if (!!props.route.query !== !!props.query)
|
|
25
|
-
throw error(`query is not matched.`);
|
|
26
|
-
else if (!!props.route.body !== (props.body !== undefined))
|
|
27
|
-
throw error(`body is not matched.`);
|
|
28
|
-
// INIT REQUEST DATA
|
|
29
|
-
const headers = {
|
|
30
|
-
...(props.connection.headers ?? {}),
|
|
31
|
-
...(props.route.body?.type &&
|
|
32
|
-
props.route.body.type !== "multipart/form-data"
|
|
33
|
-
? { "Content-Type": props.route.body.type }
|
|
34
|
-
: {}),
|
|
35
|
-
};
|
|
36
|
-
const init = {
|
|
37
|
-
...(props.connection.options ?? {}),
|
|
38
|
-
method: props.route.method.toUpperCase(),
|
|
39
|
-
headers: (() => {
|
|
40
|
-
const output = [];
|
|
41
|
-
for (const [key, value] of Object.entries(headers))
|
|
42
|
-
if (value === undefined)
|
|
43
|
-
continue;
|
|
44
|
-
else if (Array.isArray(value))
|
|
45
|
-
for (const v of value)
|
|
46
|
-
output.push([key, String(v)]);
|
|
47
|
-
else
|
|
48
|
-
output.push([key, String(value)]);
|
|
49
|
-
return output;
|
|
50
|
-
})(),
|
|
51
|
-
};
|
|
52
|
-
if (props.body !== undefined)
|
|
53
|
-
init.body = (props.route.body?.type === "application/x-www-form-urlencoded"
|
|
54
|
-
? requestQueryBody(props.body)
|
|
55
|
-
: props.route.body?.type === "multipart/form-data"
|
|
56
|
-
? requestFormDataBody(props.body)
|
|
57
|
-
: props.route.body?.type === "application/json"
|
|
58
|
-
? JSON.stringify(props.body)
|
|
59
|
-
: props.body);
|
|
60
|
-
// DO REQUEST
|
|
61
|
-
const resolvedPath = props.connection.host.endsWith("/") === false &&
|
|
62
|
-
props.route.emendedPath.startsWith("/") === false
|
|
63
|
-
? `/${getPath(props)}`
|
|
64
|
-
: getPath(props);
|
|
65
|
-
const url = new URL(`${props.connection.host}${resolvedPath}`);
|
|
66
|
-
const response = await (props.connection.fetch ?? fetch)(url, init);
|
|
67
|
-
const status = response.status;
|
|
68
|
-
const out = (body) => ({
|
|
69
|
-
status,
|
|
70
|
-
headers: responseHeaders(response.headers),
|
|
71
|
-
body,
|
|
72
|
-
});
|
|
73
|
-
if (status === 200 || status === 201) {
|
|
74
|
-
// SUCCESS CASE
|
|
75
|
-
if (props.route.method.toUpperCase() === "HEAD")
|
|
76
|
-
return out(undefined);
|
|
77
|
-
else if (props.route.success === null ||
|
|
78
|
-
props.route.success.type === "text/plain")
|
|
79
|
-
return out(await response.text());
|
|
80
|
-
else if (props.route.success.type === "application/json") {
|
|
81
|
-
const text = await response.text();
|
|
82
|
-
return out(text.length ? JSON.parse(text) : undefined);
|
|
83
|
-
}
|
|
84
|
-
else if (props.route.success.type === "application/x-www-form-urlencoded")
|
|
85
|
-
return out(new URLSearchParams(await response.text()));
|
|
86
|
-
else if (props.route.success.type === "multipart/form-data")
|
|
87
|
-
return out(await response.formData());
|
|
88
|
-
throw error("Unsupported response body type.");
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
// FAILURE CASE
|
|
92
|
-
const type = (response.headers.get("content-type") ??
|
|
93
|
-
response.headers.get("Content-Type") ??
|
|
94
|
-
"")
|
|
95
|
-
.split(";")[0]
|
|
96
|
-
.trim();
|
|
97
|
-
if (type === "" || type.startsWith("text/"))
|
|
98
|
-
return out(await response.text());
|
|
99
|
-
else if (type === "application/json")
|
|
100
|
-
return out(await response.json());
|
|
101
|
-
else if (type === "application/x-www-form-urlencoded")
|
|
102
|
-
return out(new URLSearchParams(await response.text()));
|
|
103
|
-
else if (type === "multipart/form-data")
|
|
104
|
-
return out(await response.formData());
|
|
105
|
-
else if (type === "application/octet-stream")
|
|
106
|
-
return out(await response.blob());
|
|
107
|
-
return out(await response.text());
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
const getPath = (props) => {
|
|
111
|
-
let path = props.route.emendedPath;
|
|
112
|
-
props.route.parameters.forEach((p, i) => {
|
|
113
|
-
path = path.replace(`:${p.key}`, encodeURIComponent(String((Array.isArray(props.parameters)
|
|
114
|
-
? props.parameters[i]
|
|
115
|
-
: props.parameters[p.key]) ?? "null")));
|
|
116
|
-
});
|
|
117
|
-
if (props.route.query)
|
|
118
|
-
path += getQueryPath(props.query ?? {});
|
|
119
|
-
return path;
|
|
120
|
-
};
|
|
121
|
-
const getQueryPath = (query) => {
|
|
122
|
-
const variables = new URLSearchParams();
|
|
123
|
-
for (const [key, value] of Object.entries(query))
|
|
124
|
-
if (undefined === value)
|
|
125
|
-
continue;
|
|
126
|
-
else if (Array.isArray(value))
|
|
127
|
-
value.forEach((elem) => variables.append(key, String(elem)));
|
|
128
|
-
else
|
|
129
|
-
variables.set(key, String(value));
|
|
130
|
-
return 0 === variables.size ? "" : `?${variables.toString()}`;
|
|
131
|
-
};
|
|
132
|
-
const requestQueryBody = (input) => {
|
|
133
|
-
const q = new URLSearchParams();
|
|
134
|
-
for (const [key, value] of Object.entries(input))
|
|
135
|
-
if (value === undefined)
|
|
136
|
-
continue;
|
|
137
|
-
else if (Array.isArray(value))
|
|
138
|
-
value.forEach((elem) => q.append(key, String(elem)));
|
|
139
|
-
else
|
|
140
|
-
q.set(key, String(value));
|
|
141
|
-
return q;
|
|
142
|
-
};
|
|
143
|
-
const requestFormDataBody = (input) => {
|
|
144
|
-
const encoded = new FormData();
|
|
145
|
-
const append = (key) => (value) => {
|
|
146
|
-
if (value === undefined)
|
|
147
|
-
return;
|
|
148
|
-
else if (typeof File === "function" && value instanceof File)
|
|
149
|
-
encoded.append(key, value, value.name);
|
|
150
|
-
else
|
|
151
|
-
encoded.append(key, value);
|
|
152
|
-
};
|
|
153
|
-
for (const [key, value] of Object.entries(input))
|
|
154
|
-
if (Array.isArray(value))
|
|
155
|
-
value.map(append(key));
|
|
156
|
-
else
|
|
157
|
-
append(key)(value);
|
|
158
|
-
return encoded;
|
|
159
|
-
};
|
|
160
|
-
const responseHeaders = (headers) => {
|
|
161
|
-
const output = {};
|
|
162
|
-
headers.forEach((value, key) => {
|
|
163
|
-
if (key === "set-cookie") {
|
|
164
|
-
output[key] ??= [];
|
|
165
|
-
output[key].push(...value.split(";").map((str) => str.trim()));
|
|
166
|
-
}
|
|
167
|
-
else
|
|
168
|
-
output[key] = value;
|
|
169
|
-
});
|
|
170
|
-
return output;
|
|
171
|
-
};
|
|
4
|
+
var HttpMigrateRouteFetcherExports = requireHttpMigrateRouteFetcher();
|
|
5
|
+
var HttpMigrateRouteFetcher = /*@__PURE__*/getDefaultExportFromCjs(HttpMigrateRouteFetcherExports);
|
|
172
6
|
|
|
173
|
-
export { HttpMigrateRouteFetcher };
|
|
7
|
+
export { HttpMigrateRouteFetcher as default };
|
|
174
8
|
//# sourceMappingURL=HttpMigrateRouteFetcher.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpMigrateRouteFetcher.mjs","sources":["
|
|
1
|
+
{"version":3,"file":"HttpMigrateRouteFetcher.mjs","sources":["HttpMigrateRouteFetcher.js?commonjs-entry"],"sourcesContent":["import { getDefaultExportFromCjs } from \"\u0000commonjsHelpers.js\";\nimport { __require as requireHttpMigrateRouteFetcher } from \"/home/samchon/github/samchon/typia@next/packages/utils/lib/http/internal/HttpMigrateRouteFetcher.js\";\nvar HttpMigrateRouteFetcherExports = requireHttpMigrateRouteFetcher();\nexport { HttpMigrateRouteFetcherExports as __moduleExports };\nexport default /*@__PURE__*/getDefaultExportFromCjs(HttpMigrateRouteFetcherExports);"],"names":[],"mappings":";;;AAEA,IAAI,8BAA8B,GAAG,8BAA8B,EAAE;AAErE,8BAAe,aAAa,uBAAuB,CAAC,8BAA8B,CAAC;;;;"}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { __exports as HttpMigrateRouteFetcher } from '../../_virtual/HttpMigrateRouteFetcher.mjs';
|
|
2
|
+
import { __require as requireHttpError } from '../HttpError2.mjs';
|
|
3
|
+
|
|
4
|
+
var hasRequiredHttpMigrateRouteFetcher;
|
|
5
|
+
|
|
6
|
+
function requireHttpMigrateRouteFetcher () {
|
|
7
|
+
if (hasRequiredHttpMigrateRouteFetcher) return HttpMigrateRouteFetcher;
|
|
8
|
+
hasRequiredHttpMigrateRouteFetcher = 1;
|
|
9
|
+
var __awaiter = (HttpMigrateRouteFetcher && HttpMigrateRouteFetcher.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
10
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
11
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
12
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
13
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
14
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
15
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(HttpMigrateRouteFetcher, "__esModule", { value: true });
|
|
19
|
+
HttpMigrateRouteFetcher.HttpMigrateRouteFetcher = void 0;
|
|
20
|
+
const HttpError_1 = requireHttpError();
|
|
21
|
+
var HttpMigrateRouteFetcher$1;
|
|
22
|
+
(function (HttpMigrateRouteFetcher) {
|
|
23
|
+
HttpMigrateRouteFetcher.execute = (props) => __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
var _a;
|
|
25
|
+
const result = yield _Propagate("request", props);
|
|
26
|
+
(_a = props.route.success) === null || _a === void 0 ? void 0 : _a.media;
|
|
27
|
+
if (result.status !== 200 && result.status !== 201)
|
|
28
|
+
throw new HttpError_1.HttpError(props.route.method.toUpperCase(), props.route.path, result.status, result.headers, result.body);
|
|
29
|
+
return result.body;
|
|
30
|
+
});
|
|
31
|
+
HttpMigrateRouteFetcher.propagate = (props) => _Propagate("propagate", props);
|
|
32
|
+
})(HttpMigrateRouteFetcher$1 || (HttpMigrateRouteFetcher.HttpMigrateRouteFetcher = HttpMigrateRouteFetcher$1 = {}));
|
|
33
|
+
const _Propagate = (from, props) => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
|
+
var _a, _b, _c, _d;
|
|
35
|
+
var _e, _f, _g, _h, _j;
|
|
36
|
+
// VALIDATE PARAMETERS
|
|
37
|
+
const error = (message) => new Error(`Error on MigrateRouteFetcher.${from}(): ${message}`);
|
|
38
|
+
if (Array.isArray(props.parameters)) {
|
|
39
|
+
if (props.route.parameters.length !== props.parameters.length)
|
|
40
|
+
throw error(`number of parameters is not matched.`);
|
|
41
|
+
}
|
|
42
|
+
else if (props.route.parameters.every((p) => props.parameters[p.key] !== undefined) === false)
|
|
43
|
+
throw error(`number of parameters is not matched.`);
|
|
44
|
+
// VALIDATE QUERY
|
|
45
|
+
if (!!props.route.query !== !!props.query)
|
|
46
|
+
throw error(`query is not matched.`);
|
|
47
|
+
else if (!!props.route.body !== (props.body !== undefined))
|
|
48
|
+
throw error(`body is not matched.`);
|
|
49
|
+
// INIT REQUEST DATA
|
|
50
|
+
const headers = Object.assign(Object.assign({}, ((_e = props.connection.headers) !== null && _e !== void 0 ? _e : {})), (((_a = props.route.body) === null || _a === void 0 ? void 0 : _a.type) &&
|
|
51
|
+
props.route.body.type !== "multipart/form-data"
|
|
52
|
+
? { "Content-Type": props.route.body.type }
|
|
53
|
+
: {}));
|
|
54
|
+
const init = Object.assign(Object.assign({}, ((_f = props.connection.options) !== null && _f !== void 0 ? _f : {})), { method: props.route.method.toUpperCase(), headers: (() => {
|
|
55
|
+
const output = [];
|
|
56
|
+
for (const [key, value] of Object.entries(headers))
|
|
57
|
+
if (value === undefined)
|
|
58
|
+
continue;
|
|
59
|
+
else if (Array.isArray(value))
|
|
60
|
+
for (const v of value)
|
|
61
|
+
output.push([key, String(v)]);
|
|
62
|
+
else
|
|
63
|
+
output.push([key, String(value)]);
|
|
64
|
+
return output;
|
|
65
|
+
})() });
|
|
66
|
+
if (props.body !== undefined)
|
|
67
|
+
init.body = (((_b = props.route.body) === null || _b === void 0 ? void 0 : _b.type) === "application/x-www-form-urlencoded"
|
|
68
|
+
? requestQueryBody(props.body)
|
|
69
|
+
: ((_c = props.route.body) === null || _c === void 0 ? void 0 : _c.type) === "multipart/form-data"
|
|
70
|
+
? requestFormDataBody(props.body)
|
|
71
|
+
: ((_d = props.route.body) === null || _d === void 0 ? void 0 : _d.type) === "application/json"
|
|
72
|
+
? JSON.stringify(props.body)
|
|
73
|
+
: props.body);
|
|
74
|
+
// DO REQUEST
|
|
75
|
+
const resolvedPath = props.connection.host.endsWith("/") === false &&
|
|
76
|
+
props.route.emendedPath.startsWith("/") === false
|
|
77
|
+
? `/${getPath(props)}`
|
|
78
|
+
: getPath(props);
|
|
79
|
+
const url = new URL(`${props.connection.host}${resolvedPath}`);
|
|
80
|
+
const response = yield ((_g = props.connection.fetch) !== null && _g !== void 0 ? _g : fetch)(url, init);
|
|
81
|
+
const status = response.status;
|
|
82
|
+
const out = (body) => ({
|
|
83
|
+
status,
|
|
84
|
+
headers: responseHeaders(response.headers),
|
|
85
|
+
body,
|
|
86
|
+
});
|
|
87
|
+
if (status === 200 || status === 201) {
|
|
88
|
+
// SUCCESS CASE
|
|
89
|
+
if (props.route.method.toUpperCase() === "HEAD")
|
|
90
|
+
return out(undefined);
|
|
91
|
+
else if (props.route.success === null ||
|
|
92
|
+
props.route.success.type === "text/plain")
|
|
93
|
+
return out(yield response.text());
|
|
94
|
+
else if (props.route.success.type === "application/json") {
|
|
95
|
+
const text = yield response.text();
|
|
96
|
+
return out(text.length ? JSON.parse(text) : undefined);
|
|
97
|
+
}
|
|
98
|
+
else if (props.route.success.type === "application/x-www-form-urlencoded")
|
|
99
|
+
return out(new URLSearchParams(yield response.text()));
|
|
100
|
+
else if (props.route.success.type === "multipart/form-data")
|
|
101
|
+
return out(yield response.formData());
|
|
102
|
+
throw error("Unsupported response body type.");
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
// FAILURE CASE
|
|
106
|
+
const type = ((_j = (_h = response.headers.get("content-type")) !== null && _h !== void 0 ? _h : response.headers.get("Content-Type")) !== null && _j !== void 0 ? _j : "")
|
|
107
|
+
.split(";")[0]
|
|
108
|
+
.trim();
|
|
109
|
+
if (type === "" || type.startsWith("text/"))
|
|
110
|
+
return out(yield response.text());
|
|
111
|
+
else if (type === "application/json")
|
|
112
|
+
return out(yield response.json());
|
|
113
|
+
else if (type === "application/x-www-form-urlencoded")
|
|
114
|
+
return out(new URLSearchParams(yield response.text()));
|
|
115
|
+
else if (type === "multipart/form-data")
|
|
116
|
+
return out(yield response.formData());
|
|
117
|
+
else if (type === "application/octet-stream")
|
|
118
|
+
return out(yield response.blob());
|
|
119
|
+
return out(yield response.text());
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
const getPath = (props) => {
|
|
123
|
+
var _a;
|
|
124
|
+
let path = props.route.emendedPath;
|
|
125
|
+
props.route.parameters.forEach((p, i) => {
|
|
126
|
+
var _a;
|
|
127
|
+
path = path.replace(`:${p.key}`, encodeURIComponent(String((_a = (Array.isArray(props.parameters)
|
|
128
|
+
? props.parameters[i]
|
|
129
|
+
: props.parameters[p.key])) !== null && _a !== void 0 ? _a : "null")));
|
|
130
|
+
});
|
|
131
|
+
if (props.route.query)
|
|
132
|
+
path += getQueryPath((_a = props.query) !== null && _a !== void 0 ? _a : {});
|
|
133
|
+
return path;
|
|
134
|
+
};
|
|
135
|
+
const getQueryPath = (query) => {
|
|
136
|
+
const variables = new URLSearchParams();
|
|
137
|
+
for (const [key, value] of Object.entries(query))
|
|
138
|
+
if (undefined === value)
|
|
139
|
+
continue;
|
|
140
|
+
else if (Array.isArray(value))
|
|
141
|
+
value.forEach((elem) => variables.append(key, String(elem)));
|
|
142
|
+
else
|
|
143
|
+
variables.set(key, String(value));
|
|
144
|
+
return 0 === variables.size ? "" : `?${variables.toString()}`;
|
|
145
|
+
};
|
|
146
|
+
const requestQueryBody = (input) => {
|
|
147
|
+
const q = new URLSearchParams();
|
|
148
|
+
for (const [key, value] of Object.entries(input))
|
|
149
|
+
if (value === undefined)
|
|
150
|
+
continue;
|
|
151
|
+
else if (Array.isArray(value))
|
|
152
|
+
value.forEach((elem) => q.append(key, String(elem)));
|
|
153
|
+
else
|
|
154
|
+
q.set(key, String(value));
|
|
155
|
+
return q;
|
|
156
|
+
};
|
|
157
|
+
const requestFormDataBody = (input) => {
|
|
158
|
+
const encoded = new FormData();
|
|
159
|
+
const append = (key) => (value) => {
|
|
160
|
+
if (value === undefined)
|
|
161
|
+
return;
|
|
162
|
+
else if (typeof File === "function" && value instanceof File)
|
|
163
|
+
encoded.append(key, value, value.name);
|
|
164
|
+
else
|
|
165
|
+
encoded.append(key, value);
|
|
166
|
+
};
|
|
167
|
+
for (const [key, value] of Object.entries(input))
|
|
168
|
+
if (Array.isArray(value))
|
|
169
|
+
value.map(append(key));
|
|
170
|
+
else
|
|
171
|
+
append(key)(value);
|
|
172
|
+
return encoded;
|
|
173
|
+
};
|
|
174
|
+
const responseHeaders = (headers) => {
|
|
175
|
+
const output = {};
|
|
176
|
+
headers.forEach((value, key) => {
|
|
177
|
+
var _a;
|
|
178
|
+
if (key === "set-cookie") {
|
|
179
|
+
(_a = output[key]) !== null && _a !== void 0 ? _a : (output[key] = []);
|
|
180
|
+
output[key].push(...value.split(";").map((str) => str.trim()));
|
|
181
|
+
}
|
|
182
|
+
else
|
|
183
|
+
output[key] = value;
|
|
184
|
+
});
|
|
185
|
+
return output;
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
return HttpMigrateRouteFetcher;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export { requireHttpMigrateRouteFetcher as __require };
|
|
192
|
+
//# sourceMappingURL=HttpMigrateRouteFetcher2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HttpMigrateRouteFetcher2.mjs","sources":["HttpMigrateRouteFetcher.js"],"sourcesContent":["\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HttpMigrateRouteFetcher = void 0;\nconst HttpError_1 = require(\"../HttpError\");\nvar HttpMigrateRouteFetcher;\n(function (HttpMigrateRouteFetcher) {\n HttpMigrateRouteFetcher.execute = (props) => __awaiter(this, void 0, void 0, function* () {\n var _a;\n const result = yield _Propagate(\"request\", props);\n (_a = props.route.success) === null || _a === void 0 ? void 0 : _a.media;\n if (result.status !== 200 && result.status !== 201)\n throw new HttpError_1.HttpError(props.route.method.toUpperCase(), props.route.path, result.status, result.headers, result.body);\n return result.body;\n });\n HttpMigrateRouteFetcher.propagate = (props) => _Propagate(\"propagate\", props);\n})(HttpMigrateRouteFetcher || (exports.HttpMigrateRouteFetcher = HttpMigrateRouteFetcher = {}));\nconst _Propagate = (from, props) => __awaiter(void 0, void 0, void 0, function* () {\n var _a, _b, _c, _d;\n var _e, _f, _g, _h, _j;\n // VALIDATE PARAMETERS\n const error = (message) => new Error(`Error on MigrateRouteFetcher.${from}(): ${message}`);\n if (Array.isArray(props.parameters)) {\n if (props.route.parameters.length !== props.parameters.length)\n throw error(`number of parameters is not matched.`);\n }\n else if (props.route.parameters.every((p) => props.parameters[p.key] !== undefined) === false)\n throw error(`number of parameters is not matched.`);\n // VALIDATE QUERY\n if (!!props.route.query !== !!props.query)\n throw error(`query is not matched.`);\n else if (!!props.route.body !== (props.body !== undefined))\n throw error(`body is not matched.`);\n // INIT REQUEST DATA\n const headers = Object.assign(Object.assign({}, ((_e = props.connection.headers) !== null && _e !== void 0 ? _e : {})), (((_a = props.route.body) === null || _a === void 0 ? void 0 : _a.type) &&\n props.route.body.type !== \"multipart/form-data\"\n ? { \"Content-Type\": props.route.body.type }\n : {}));\n const init = Object.assign(Object.assign({}, ((_f = props.connection.options) !== null && _f !== void 0 ? _f : {})), { method: props.route.method.toUpperCase(), headers: (() => {\n const output = [];\n for (const [key, value] of Object.entries(headers))\n if (value === undefined)\n continue;\n else if (Array.isArray(value))\n for (const v of value)\n output.push([key, String(v)]);\n else\n output.push([key, String(value)]);\n return output;\n })() });\n if (props.body !== undefined)\n init.body = (((_b = props.route.body) === null || _b === void 0 ? void 0 : _b.type) === \"application/x-www-form-urlencoded\"\n ? requestQueryBody(props.body)\n : ((_c = props.route.body) === null || _c === void 0 ? void 0 : _c.type) === \"multipart/form-data\"\n ? requestFormDataBody(props.body)\n : ((_d = props.route.body) === null || _d === void 0 ? void 0 : _d.type) === \"application/json\"\n ? JSON.stringify(props.body)\n : props.body);\n // DO REQUEST\n const resolvedPath = props.connection.host.endsWith(\"/\") === false &&\n props.route.emendedPath.startsWith(\"/\") === false\n ? `/${getPath(props)}`\n : getPath(props);\n const url = new URL(`${props.connection.host}${resolvedPath}`);\n const response = yield ((_g = props.connection.fetch) !== null && _g !== void 0 ? _g : fetch)(url, init);\n const status = response.status;\n const out = (body) => ({\n status,\n headers: responseHeaders(response.headers),\n body,\n });\n if (status === 200 || status === 201) {\n // SUCCESS CASE\n if (props.route.method.toUpperCase() === \"HEAD\")\n return out(undefined);\n else if (props.route.success === null ||\n props.route.success.type === \"text/plain\")\n return out(yield response.text());\n else if (props.route.success.type === \"application/json\") {\n const text = yield response.text();\n return out(text.length ? JSON.parse(text) : undefined);\n }\n else if (props.route.success.type === \"application/x-www-form-urlencoded\")\n return out(new URLSearchParams(yield response.text()));\n else if (props.route.success.type === \"multipart/form-data\")\n return out(yield response.formData());\n throw error(\"Unsupported response body type.\");\n }\n else {\n // FAILURE CASE\n const type = ((_j = (_h = response.headers.get(\"content-type\")) !== null && _h !== void 0 ? _h : response.headers.get(\"Content-Type\")) !== null && _j !== void 0 ? _j : \"\")\n .split(\";\")[0]\n .trim();\n if (type === \"\" || type.startsWith(\"text/\"))\n return out(yield response.text());\n else if (type === \"application/json\")\n return out(yield response.json());\n else if (type === \"application/x-www-form-urlencoded\")\n return out(new URLSearchParams(yield response.text()));\n else if (type === \"multipart/form-data\")\n return out(yield response.formData());\n else if (type === \"application/octet-stream\")\n return out(yield response.blob());\n return out(yield response.text());\n }\n});\nconst getPath = (props) => {\n var _a;\n let path = props.route.emendedPath;\n props.route.parameters.forEach((p, i) => {\n var _a;\n path = path.replace(`:${p.key}`, encodeURIComponent(String((_a = (Array.isArray(props.parameters)\n ? props.parameters[i]\n : props.parameters[p.key])) !== null && _a !== void 0 ? _a : \"null\")));\n });\n if (props.route.query)\n path += getQueryPath((_a = props.query) !== null && _a !== void 0 ? _a : {});\n return path;\n};\nconst getQueryPath = (query) => {\n const variables = new URLSearchParams();\n for (const [key, value] of Object.entries(query))\n if (undefined === value)\n continue;\n else if (Array.isArray(value))\n value.forEach((elem) => variables.append(key, String(elem)));\n else\n variables.set(key, String(value));\n return 0 === variables.size ? \"\" : `?${variables.toString()}`;\n};\nconst requestQueryBody = (input) => {\n const q = new URLSearchParams();\n for (const [key, value] of Object.entries(input))\n if (value === undefined)\n continue;\n else if (Array.isArray(value))\n value.forEach((elem) => q.append(key, String(elem)));\n else\n q.set(key, String(value));\n return q;\n};\nconst requestFormDataBody = (input) => {\n const encoded = new FormData();\n const append = (key) => (value) => {\n if (value === undefined)\n return;\n else if (typeof File === \"function\" && value instanceof File)\n encoded.append(key, value, value.name);\n else\n encoded.append(key, value);\n };\n for (const [key, value] of Object.entries(input))\n if (Array.isArray(value))\n value.map(append(key));\n else\n append(key)(value);\n return encoded;\n};\nconst responseHeaders = (headers) => {\n const output = {};\n headers.forEach((value, key) => {\n var _a;\n if (key === \"set-cookie\") {\n (_a = output[key]) !== null && _a !== void 0 ? _a : (output[key] = []);\n output[key].push(...value.split(\";\").map((str) => str.trim()));\n }\n else\n output[key] = value;\n });\n return output;\n};\n//# sourceMappingURL=HttpMigrateRouteFetcher.js.map"],"names":["this","HttpMigrateRouteFetcher_1","require$$0","HttpMigrateRouteFetcher"],"mappings":";;;;;;;;AACA,CAAA,IAAI,SAAS,GAAG,CAACA,uBAAI,IAAIA,uBAAI,CAAC,SAAS,KAAK,UAAU,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;KACrF,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA,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AG,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;AAC1E,SAAA;AACA;AACA,aAAY,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK;AAC/B,KAAA,CAAK,CAAC;AACN,KAAI,OAAO,MAAM;CACjB,CAAC;AACD;;;;;;"}
|
package/lib/index.mjs
CHANGED
|
@@ -1,20 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export {
|
|
8
|
-
export { HttpError } from './http/HttpError.mjs';
|
|
9
|
-
export { HttpLlm } from './http/HttpLlm.mjs';
|
|
10
|
-
export { HttpMigration } from './http/HttpMigration.mjs';
|
|
11
|
-
export { LlmJson } from './utils/LlmJson.mjs';
|
|
12
|
-
export { LlmSchemaConverter } from './converters/LlmSchemaConverter.mjs';
|
|
13
|
-
export { MapUtil } from './utils/MapUtil.mjs';
|
|
14
|
-
export { NamingConvention } from './utils/NamingConvention.mjs';
|
|
15
|
-
export { OpenApiConverter } from './converters/OpenApiConverter.mjs';
|
|
16
|
-
export { OpenApiExclusiveEmender } from './converters/internal/OpenApiExclusiveEmender.mjs';
|
|
17
|
-
export { Singleton } from './utils/Singleton.mjs';
|
|
18
|
-
export { StringUtil } from './utils/StringUtil.mjs';
|
|
19
|
-
export { dedent } from './utils/dedent.mjs';
|
|
1
|
+
import { getDefaultExportFromCjs } from './_virtual/_commonjsHelpers.mjs';
|
|
2
|
+
import { __require as requireLib } from './index2.mjs';
|
|
3
|
+
|
|
4
|
+
var libExports = requireLib();
|
|
5
|
+
var index = /*@__PURE__*/getDefaultExportFromCjs(libExports);
|
|
6
|
+
|
|
7
|
+
export { index as default };
|
|
20
8
|
//# sourceMappingURL=index.mjs.map
|
package/lib/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["index.js?commonjs-entry"],"sourcesContent":["import { getDefaultExportFromCjs } from \"\u0000commonjsHelpers.js\";\nimport { __require as requireLib } from \"/home/samchon/github/samchon/typia@next/packages/utils/lib/index.js\";\nvar libExports = requireLib();\nexport { libExports as __moduleExports };\nexport default /*@__PURE__*/getDefaultExportFromCjs(libExports);"],"names":[],"mappings":";;;AAEA,IAAI,UAAU,GAAG,UAAU,EAAE;AAE7B,YAAe,aAAa,uBAAuB,CAAC,UAAU,CAAC;;;;"}
|
package/lib/index2.mjs
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { __exports as lib } from './_virtual/index.mjs';
|
|
2
|
+
import { __require as requireConverters } from './converters/index2.mjs';
|
|
3
|
+
import { __require as requireHttp } from './http/index2.mjs';
|
|
4
|
+
import { __require as requireUtils } from './utils/index2.mjs';
|
|
5
|
+
import { __require as requireValidators } from './validators/index2.mjs';
|
|
6
|
+
|
|
7
|
+
var hasRequiredLib;
|
|
8
|
+
|
|
9
|
+
function requireLib () {
|
|
10
|
+
if (hasRequiredLib) return lib;
|
|
11
|
+
hasRequiredLib = 1;
|
|
12
|
+
(function (exports$1) {
|
|
13
|
+
var __createBinding = (lib && lib.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __exportStar = (lib && lib.__exportStar) || function(m, exports$1) {
|
|
25
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
28
|
+
__exportStar(requireConverters(), exports$1);
|
|
29
|
+
__exportStar(requireHttp(), exports$1);
|
|
30
|
+
__exportStar(requireUtils(), exports$1);
|
|
31
|
+
__exportStar(requireValidators(), exports$1);
|
|
32
|
+
|
|
33
|
+
} (lib));
|
|
34
|
+
return lib;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { requireLib as __require };
|
|
38
|
+
//# sourceMappingURL=index2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index2.mjs","sources":["index.js"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./converters/index\"), exports);\n__exportStar(require(\"./http/index\"), exports);\n__exportStar(require(\"./utils/index\"), exports);\n__exportStar(require(\"./validators/index\"), exports);\n//# sourceMappingURL=index.js.map"],"names":["this","exports","require$$0","require$$1","require$$2","require$$3"],"mappings":";;;;;;;;;;;;EACA,IAAI,eAAe,GAAG,CAACA,GAAI,IAAIA,GAAI,CAAC,eAAe,MAAM,MAAM,CAAC,MAAM,IAAI,SAAS,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE;AAChG,MAAI,IAAI,EAAE,KAAK,S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AA,EAAwB,EAAEH,SAAO,CAAC;AAC/C,EAAA,YAAY,CAACI,iBAAA,EAA6B,EAAEJ,SAAO,CAAC;AACpD;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayUtil.js","sourceRoot":"","sources":["../../src/utils/ArrayUtil.ts"],"names":[],"mappings":";;;AAAA,gBAAgB;AAChB,IAAiB,SAAS,CAwCzB;AAxCD,WAAiB,SAAS;IACX,aAAG,GAAG,CAAI,KAAU,EAAE,IAA0B,EAAW,EAAE,CACxE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEN,aAAG,GAAG,CACjB,KAAU,EACV,KAAQ,EACR,
|
|
1
|
+
{"version":3,"file":"ArrayUtil.js","sourceRoot":"","sources":["../../src/utils/ArrayUtil.ts"],"names":[],"mappings":";;;AAAA,gBAAgB;AAChB,IAAiB,SAAS,CAwCzB;AAxCD,WAAiB,SAAS;IACX,aAAG,GAAG,CAAI,KAAU,EAAE,IAA0B,EAAW,EAAE,CACxE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEN,aAAG,GAAG,CACjB,KAAU,EACV,KAAQ,EACR,IAAI,GAA4B,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,EACxC,EAAE;QACX,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YAAE,OAAO,KAAK,CAAC;QAC1D,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEW,aAAG,GAAG,CACjB,KAAU,EACV,KAAQ,EACR,GAAqB,EACf,EAAE;QACR,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;YAAE,OAAO;QAC3D,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC,CAAC;IAEW,cAAI,GAAG,CAClB,KAAU,EACV,IAA0B,EAC1B,IAAa,EACV,EAAE;QACL,MAAM,KAAK,GAAW,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC5C,IAAI,KAAK,KAAK,CAAC,CAAC;YAAE,OAAO,KAAK,CAAC,KAAK,CAAE,CAAC;QAEvC,MAAM,IAAI,GAAM,IAAI,EAAE,CAAC;QACvB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEW,gBAAM,GAAG,CACpB,KAAa,EACb,OAA4C,EACvC,EAAE,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AAC/E,CAAC,EAxCgB,SAAS,aAAT,SAAS,GAAT,SAAS,QAwCzB"}
|
package/lib/utils/ArrayUtil.mjs
CHANGED
|
@@ -1,28 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
(function (ArrayUtil) {
|
|
4
|
-
ArrayUtil.has = (array, pred) => array.some(pred);
|
|
5
|
-
ArrayUtil.add = (array, value, pred = (x, y) => x === y) => {
|
|
6
|
-
if (array.some((elem) => pred(elem, value)))
|
|
7
|
-
return false;
|
|
8
|
-
array.push(value);
|
|
9
|
-
return true;
|
|
10
|
-
};
|
|
11
|
-
ArrayUtil.set = (array, value, key) => {
|
|
12
|
-
if (array.some((elem) => key(elem) === key(value)))
|
|
13
|
-
return;
|
|
14
|
-
array.push(value);
|
|
15
|
-
};
|
|
16
|
-
ArrayUtil.take = (array, pred, init) => {
|
|
17
|
-
const index = array.findIndex(pred);
|
|
18
|
-
if (index !== -1)
|
|
19
|
-
return array[index];
|
|
20
|
-
const elem = init();
|
|
21
|
-
array.push(elem);
|
|
22
|
-
return elem;
|
|
23
|
-
};
|
|
24
|
-
ArrayUtil.repeat = (count, closure) => new Array(count).fill("").map((_, index) => closure(index, count));
|
|
25
|
-
})(ArrayUtil || (ArrayUtil = {}));
|
|
1
|
+
import { getDefaultExportFromCjs } from '../_virtual/_commonjsHelpers.mjs';
|
|
2
|
+
import { __require as requireArrayUtil } from './ArrayUtil2.mjs';
|
|
26
3
|
|
|
27
|
-
|
|
4
|
+
var ArrayUtilExports = requireArrayUtil();
|
|
5
|
+
var ArrayUtil = /*@__PURE__*/getDefaultExportFromCjs(ArrayUtilExports);
|
|
6
|
+
|
|
7
|
+
export { ArrayUtil as default };
|
|
28
8
|
//# sourceMappingURL=ArrayUtil.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayUtil.mjs","sources":["
|
|
1
|
+
{"version":3,"file":"ArrayUtil.mjs","sources":["ArrayUtil.js?commonjs-entry"],"sourcesContent":["import { getDefaultExportFromCjs } from \"\u0000commonjsHelpers.js\";\nimport { __require as requireArrayUtil } from \"/home/samchon/github/samchon/typia@next/packages/utils/lib/utils/ArrayUtil.js\";\nvar ArrayUtilExports = requireArrayUtil();\nexport { ArrayUtilExports as __moduleExports };\nexport default /*@__PURE__*/getDefaultExportFromCjs(ArrayUtilExports);"],"names":[],"mappings":";;;AAEA,IAAI,gBAAgB,GAAG,gBAAgB,EAAE;AAEzC,gBAAe,aAAa,uBAAuB,CAAC,gBAAgB,CAAC;;;;"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { __exports as ArrayUtil } from '../_virtual/ArrayUtil.mjs';
|
|
2
|
+
|
|
3
|
+
var hasRequiredArrayUtil;
|
|
4
|
+
|
|
5
|
+
function requireArrayUtil () {
|
|
6
|
+
if (hasRequiredArrayUtil) return ArrayUtil;
|
|
7
|
+
hasRequiredArrayUtil = 1;
|
|
8
|
+
Object.defineProperty(ArrayUtil, "__esModule", { value: true });
|
|
9
|
+
ArrayUtil.ArrayUtil = void 0;
|
|
10
|
+
/** @internal */
|
|
11
|
+
var ArrayUtil$1;
|
|
12
|
+
(function (ArrayUtil) {
|
|
13
|
+
ArrayUtil.has = (array, pred) => array.some(pred);
|
|
14
|
+
ArrayUtil.add = (array, value, pred = (x, y) => x === y) => {
|
|
15
|
+
if (array.some((elem) => pred(elem, value)))
|
|
16
|
+
return false;
|
|
17
|
+
array.push(value);
|
|
18
|
+
return true;
|
|
19
|
+
};
|
|
20
|
+
ArrayUtil.set = (array, value, key) => {
|
|
21
|
+
if (array.some((elem) => key(elem) === key(value)))
|
|
22
|
+
return;
|
|
23
|
+
array.push(value);
|
|
24
|
+
};
|
|
25
|
+
ArrayUtil.take = (array, pred, init) => {
|
|
26
|
+
const index = array.findIndex(pred);
|
|
27
|
+
if (index !== -1)
|
|
28
|
+
return array[index];
|
|
29
|
+
const elem = init();
|
|
30
|
+
array.push(elem);
|
|
31
|
+
return elem;
|
|
32
|
+
};
|
|
33
|
+
ArrayUtil.repeat = (count, closure) => new Array(count).fill("").map((_, index) => closure(index, count));
|
|
34
|
+
})(ArrayUtil$1 || (ArrayUtil.ArrayUtil = ArrayUtil$1 = {}));
|
|
35
|
+
|
|
36
|
+
return ArrayUtil;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { requireArrayUtil as __require };
|
|
40
|
+
//# sourceMappingURL=ArrayUtil2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArrayUtil2.mjs","sources":["ArrayUtil.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ArrayUtil = void 0;\n/** @internal */\nvar ArrayUtil;\n(function (ArrayUtil) {\n ArrayUtil.has = (array, pred) => array.some(pred);\n ArrayUtil.add = (array, value, pred = (x, y) => x === y) => {\n if (array.some((elem) => pred(elem, value)))\n return false;\n array.push(value);\n return true;\n };\n ArrayUtil.set = (array, value, key) => {\n if (array.some((elem) => key(elem) === key(value)))\n return;\n array.push(value);\n };\n ArrayUtil.take = (array, pred, init) => {\n const index = array.findIndex(pred);\n if (index !== -1)\n return array[index];\n const elem = init();\n array.push(elem);\n return elem;\n };\n ArrayUtil.repeat = (count, closure) => new Array(count).fill(\"\").map((_, index) => closure(index, count));\n})(ArrayUtil || (exports.ArrayUtil = ArrayUtil = {}));\n//# sourceMappingURL=ArrayUtil.js.map"],"names":["ArrayUtil_1","ArrayUtil"],"mappings":";;;;;;;AACA,CAAA,MAAM,CAAC,cAAc,CAACA,SAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,CAAAA,SAAA,CAAA,SAAiB,GAAG,MAAM;AAC1B;AACA,CAAA,IAAIC,WAAS;CACb,CAAC,UAAU,SAAS,EAAE;AACtB,KAAI,SAAS,CAAC,GAAG,GAAG,CAAC,KAAK,EAAE,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;AACrD,KAAI,SAAS,CAAC,GAAG,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK;AAChE,SAAQ,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACnD,aAAY,OAAO,KAAK;AACxB,SAAQ,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;AACzB,SAAQ,OAAO,IAAI;KACnB,CAAK;KACD,SAAS,CAAC,GAAG,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK;AAC3C,SAAQ,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;aAC9C;AACZ,SAAQ,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;KACzB,CAAK;KACD,SAAS,CAAC,IAAI,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,KAAK;SACpC,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC;AAC3C,SAAQ,IAAI,KAAK,KAAK,EAAE;AACxB,aAAY,OAAO,KAAK,CAAC,KAAK,CAAC;AAC/B,SAAQ,MAAM,IAAI,GAAG,IAAI,EAAE;AAC3B,SAAQ,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;AACxB,SAAQ,OAAO,IAAI;KACnB,CAAK;AACL,KAAI,SAAS,CAAC,MAAM,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;CAC7G,CAAC,EAAEA,WAAS,KAAKD,SAAA,CAAA,SAAiB,GAAGC,WAAS,GAAG,EAAE,CAAC,CAAC;AACrD;;;;;;"}
|
package/lib/utils/LlmJson.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ export declare namespace LlmJson {
|
|
|
83
83
|
* schema. Otherwise, extra properties are ignored.
|
|
84
84
|
* @returns Validator function that checks data against the schema
|
|
85
85
|
*/
|
|
86
|
-
function validate(parameters: ILlmSchema.IParameters, equals?: boolean | undefined): (
|
|
86
|
+
function validate(parameters: ILlmSchema.IParameters, equals?: boolean | undefined): (input: unknown) => IValidation<unknown>;
|
|
87
87
|
/**
|
|
88
88
|
* Convert LLM parameters schema to structured output interface.
|
|
89
89
|
*
|
package/lib/utils/LlmJson.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LlmJson.js","sourceRoot":"","sources":["../../src/utils/LlmJson.ts"],"names":[],"mappings":";;;AAQA,8CAAmD;AACnD,8CAAiD;AACjD,sEAAmE;AACnE,kEAA+D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