typia 6.10.0 → 7.0.0-dev.20240916
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/lib/_external/node_modules_@samchon_openapi_lib_utils/LlmSchemaSeparator.mjs +44 -129
- package/lib/_external/node_modules_@samchon_openapi_lib_utils/LlmSchemaSeparator.mjs.map +1 -1
- package/lib/_external/node_modules_@samchon_openapi_lib_utils/LlmTypeChecker.mjs +19 -167
- package/lib/_external/node_modules_@samchon_openapi_lib_utils/LlmTypeChecker.mjs.map +1 -1
- package/lib/_virtual/_commonjsHelpers.mjs +1 -3
- package/lib/_virtual/_commonjsHelpers.mjs.map +1 -1
- package/lib/executable/TypiaSetupWizard.js +3 -1
- package/lib/executable/TypiaSetupWizard.js.map +1 -1
- package/lib/factories/internal/metadata/iterate_metadata_function.js +4 -1
- package/lib/factories/internal/metadata/iterate_metadata_function.js.map +1 -1
- package/lib/functional/Namespace/index.mjs +0 -1
- package/lib/functional/Namespace/index.mjs.map +1 -1
- package/lib/functional/Namespace/llm.mjs +2 -2
- package/lib/functional/Namespace/llm.mjs.map +1 -1
- package/lib/programmers/AssertProgrammer.d.ts +12 -8
- package/lib/programmers/AssertProgrammer.js +40 -42
- package/lib/programmers/AssertProgrammer.js.map +1 -1
- package/lib/programmers/CheckerProgrammer.d.ts +7 -7
- package/lib/programmers/CheckerProgrammer.js +23 -11
- package/lib/programmers/CheckerProgrammer.js.map +1 -1
- package/lib/programmers/FeatureProgrammer.d.ts +4 -4
- package/lib/programmers/FeatureProgrammer.js +1 -1
- package/lib/programmers/FeatureProgrammer.js.map +1 -1
- package/lib/programmers/IsProgrammer.d.ts +15 -8
- package/lib/programmers/IsProgrammer.js +19 -28
- package/lib/programmers/IsProgrammer.js.map +1 -1
- package/lib/programmers/RandomProgrammer.d.ts +13 -5
- package/lib/programmers/RandomProgrammer.js +10 -22
- package/lib/programmers/RandomProgrammer.js.map +1 -1
- package/lib/programmers/ValidateProgrammer.d.ts +11 -4
- package/lib/programmers/ValidateProgrammer.js +41 -43
- package/lib/programmers/ValidateProgrammer.js.map +1 -1
- package/lib/programmers/functional/FunctionalAssertFunctionProgrammer.d.ts +18 -3
- package/lib/programmers/functional/FunctionalAssertFunctionProgrammer.js +37 -29
- package/lib/programmers/functional/FunctionalAssertFunctionProgrammer.js.map +1 -1
- package/lib/programmers/functional/FunctionalAssertParametersProgrammer.d.ts +23 -4
- package/lib/programmers/functional/FunctionalAssertParametersProgrammer.js +51 -40
- package/lib/programmers/functional/FunctionalAssertParametersProgrammer.js.map +1 -1
- package/lib/programmers/functional/FunctionalAssertReturnProgrammer.d.ts +24 -4
- package/lib/programmers/functional/FunctionalAssertReturnProgrammer.js +48 -36
- package/lib/programmers/functional/FunctionalAssertReturnProgrammer.js.map +1 -1
- package/lib/programmers/functional/FunctionalIsFunctionProgrammer.d.ts +17 -3
- package/lib/programmers/functional/FunctionalIsFunctionProgrammer.js +18 -20
- package/lib/programmers/functional/FunctionalIsFunctionProgrammer.js.map +1 -1
- package/lib/programmers/functional/FunctionalIsParametersProgrammer.d.ts +22 -4
- package/lib/programmers/functional/FunctionalIsParametersProgrammer.js +36 -35
- package/lib/programmers/functional/FunctionalIsParametersProgrammer.js.map +1 -1
- package/lib/programmers/functional/FunctionalIsReturnProgrammer.d.ts +23 -4
- package/lib/programmers/functional/FunctionalIsReturnProgrammer.js +39 -34
- package/lib/programmers/functional/FunctionalIsReturnProgrammer.js.map +1 -1
- package/lib/programmers/functional/FunctionalValidateFunctionProgrammer.d.ts +17 -3
- package/lib/programmers/functional/FunctionalValidateFunctionProgrammer.js +17 -20
- package/lib/programmers/functional/FunctionalValidateFunctionProgrammer.js.map +1 -1
- package/lib/programmers/functional/FunctionalValidateParametersProgrammer.d.ts +22 -4
- package/lib/programmers/functional/FunctionalValidateParametersProgrammer.js +70 -68
- package/lib/programmers/functional/FunctionalValidateParametersProgrammer.js.map +1 -1
- package/lib/programmers/functional/FunctionalValidateReturnProgrammer.d.ts +23 -4
- package/lib/programmers/functional/FunctionalValidateReturnProgrammer.js +43 -38
- package/lib/programmers/functional/FunctionalValidateReturnProgrammer.js.map +1 -1
- package/lib/programmers/functional/internal/FunctionalGeneralProgrammer.d.ts +5 -1
- package/lib/programmers/functional/internal/FunctionalGeneralProgrammer.js +14 -16
- package/lib/programmers/functional/internal/FunctionalGeneralProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpAssertFormDataProgrammer.d.ts +5 -4
- package/lib/programmers/http/HttpAssertFormDataProgrammer.js +12 -19
- package/lib/programmers/http/HttpAssertFormDataProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpAssertHeadersProgrammer.d.ts +5 -4
- package/lib/programmers/http/HttpAssertHeadersProgrammer.js +12 -19
- package/lib/programmers/http/HttpAssertHeadersProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpAssertQueryProgrammer.d.ts +8 -4
- package/lib/programmers/http/HttpAssertQueryProgrammer.js +12 -21
- package/lib/programmers/http/HttpAssertQueryProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpFormDataProgrammer.d.ts +4 -3
- package/lib/programmers/http/HttpFormDataProgrammer.js +21 -19
- package/lib/programmers/http/HttpFormDataProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpHeadersProgrammer.d.ts +4 -3
- package/lib/programmers/http/HttpHeadersProgrammer.js +21 -19
- package/lib/programmers/http/HttpHeadersProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpIsFormDataProgrammer.d.ts +4 -3
- package/lib/programmers/http/HttpIsFormDataProgrammer.js +11 -18
- package/lib/programmers/http/HttpIsFormDataProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpIsHeadersProgrammer.d.ts +4 -3
- package/lib/programmers/http/HttpIsHeadersProgrammer.js +11 -18
- package/lib/programmers/http/HttpIsHeadersProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpIsQueryProgrammer.d.ts +7 -3
- package/lib/programmers/http/HttpIsQueryProgrammer.js +11 -20
- package/lib/programmers/http/HttpIsQueryProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpParameterProgrammer.d.ts +2 -2
- package/lib/programmers/http/HttpParameterProgrammer.js +27 -27
- package/lib/programmers/http/HttpParameterProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpQueryProgrammer.d.ts +7 -3
- package/lib/programmers/http/HttpQueryProgrammer.js +21 -21
- package/lib/programmers/http/HttpQueryProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpValidateFormDataProgrammer.d.ts +4 -3
- package/lib/programmers/http/HttpValidateFormDataProgrammer.js +11 -19
- package/lib/programmers/http/HttpValidateFormDataProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpValidateHeadersProgrammer.d.ts +4 -3
- package/lib/programmers/http/HttpValidateHeadersProgrammer.js +11 -19
- package/lib/programmers/http/HttpValidateHeadersProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpValidateQueryProgrammer.d.ts +7 -3
- package/lib/programmers/http/HttpValidateQueryProgrammer.js +11 -21
- package/lib/programmers/http/HttpValidateQueryProgrammer.js.map +1 -1
- package/lib/programmers/internal/check_array_length.js +1 -1
- package/lib/programmers/internal/check_array_length.js.map +1 -1
- package/lib/programmers/internal/check_bigint.js +1 -1
- package/lib/programmers/internal/check_bigint.js.map +1 -1
- package/lib/programmers/internal/check_dynamic_key.d.ts +2 -2
- package/lib/programmers/internal/check_dynamic_key.js.map +1 -1
- package/lib/programmers/internal/check_dynamic_properties.js.map +1 -1
- package/lib/programmers/internal/check_number.js +1 -1
- package/lib/programmers/internal/check_number.js.map +1 -1
- package/lib/programmers/internal/check_object.js.map +1 -1
- package/lib/programmers/internal/check_string.js +1 -1
- package/lib/programmers/internal/check_string.js.map +1 -1
- package/lib/programmers/json/JsonAssertParseProgrammer.d.ts +4 -3
- package/lib/programmers/json/JsonAssertParseProgrammer.js +19 -20
- package/lib/programmers/json/JsonAssertParseProgrammer.js.map +1 -1
- package/lib/programmers/json/JsonAssertStringifyProgrammer.d.ts +4 -3
- package/lib/programmers/json/JsonAssertStringifyProgrammer.js +18 -19
- package/lib/programmers/json/JsonAssertStringifyProgrammer.js.map +1 -1
- package/lib/programmers/json/JsonIsParseProgrammer.d.ts +4 -3
- package/lib/programmers/json/JsonIsParseProgrammer.js +17 -19
- package/lib/programmers/json/JsonIsParseProgrammer.js.map +1 -1
- package/lib/programmers/json/JsonIsStringifyProgrammer.d.ts +4 -3
- package/lib/programmers/json/JsonIsStringifyProgrammer.js +12 -19
- package/lib/programmers/json/JsonIsStringifyProgrammer.js.map +1 -1
- package/lib/programmers/json/JsonStringifyProgrammer.d.ts +4 -3
- package/lib/programmers/json/JsonStringifyProgrammer.js +11 -21
- package/lib/programmers/json/JsonStringifyProgrammer.js.map +1 -1
- package/lib/programmers/json/JsonValidateParseProgrammer.d.ts +4 -3
- package/lib/programmers/json/JsonValidateParseProgrammer.js +18 -20
- package/lib/programmers/json/JsonValidateParseProgrammer.js.map +1 -1
- package/lib/programmers/json/JsonValidateStringifyProgrammer.d.ts +4 -3
- package/lib/programmers/json/JsonValidateStringifyProgrammer.js +17 -19
- package/lib/programmers/json/JsonValidateStringifyProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscAssertCloneProgrammer.d.ts +5 -4
- package/lib/programmers/misc/MiscAssertCloneProgrammer.js +12 -19
- package/lib/programmers/misc/MiscAssertCloneProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscAssertPruneProgrammer.d.ts +5 -4
- package/lib/programmers/misc/MiscAssertPruneProgrammer.js +13 -20
- package/lib/programmers/misc/MiscAssertPruneProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscCloneProgrammer.d.ts +4 -3
- package/lib/programmers/misc/MiscCloneProgrammer.js +11 -21
- package/lib/programmers/misc/MiscCloneProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscIsCloneProgrammer.d.ts +4 -3
- package/lib/programmers/misc/MiscIsCloneProgrammer.js +11 -18
- package/lib/programmers/misc/MiscIsCloneProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscIsPruneProgrammer.d.ts +4 -3
- package/lib/programmers/misc/MiscIsPruneProgrammer.js +11 -18
- package/lib/programmers/misc/MiscIsPruneProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscLiteralsProgrammer.d.ts +6 -2
- package/lib/programmers/misc/MiscLiteralsProgrammer.js +4 -4
- package/lib/programmers/misc/MiscLiteralsProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscPruneProgrammer.d.ts +4 -3
- package/lib/programmers/misc/MiscPruneProgrammer.js +11 -21
- package/lib/programmers/misc/MiscPruneProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscValidateCloneProgrammer.d.ts +4 -3
- package/lib/programmers/misc/MiscValidateCloneProgrammer.js +11 -19
- package/lib/programmers/misc/MiscValidateCloneProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscValidatePruneProgrammer.d.ts +4 -3
- package/lib/programmers/misc/MiscValidatePruneProgrammer.js +12 -20
- package/lib/programmers/misc/MiscValidatePruneProgrammer.js.map +1 -1
- package/lib/programmers/notations/NotationAssertGeneralProgrammer.d.ts +8 -4
- package/lib/programmers/notations/NotationAssertGeneralProgrammer.js +12 -22
- package/lib/programmers/notations/NotationAssertGeneralProgrammer.js.map +1 -1
- package/lib/programmers/notations/NotationGeneralProgrammer.d.ts +7 -3
- package/lib/programmers/notations/NotationGeneralProgrammer.js +12 -25
- package/lib/programmers/notations/NotationGeneralProgrammer.js.map +1 -1
- package/lib/programmers/notations/NotationIsGeneralProgrammer.d.ts +7 -3
- package/lib/programmers/notations/NotationIsGeneralProgrammer.js +11 -21
- package/lib/programmers/notations/NotationIsGeneralProgrammer.js.map +1 -1
- package/lib/programmers/notations/NotationValidateGeneralProgrammer.d.ts +7 -3
- package/lib/programmers/notations/NotationValidateGeneralProgrammer.js +11 -22
- package/lib/programmers/notations/NotationValidateGeneralProgrammer.js.map +1 -1
- package/lib/programmers/protobuf/ProtobufAssertDecodeProgrammer.d.ts +5 -4
- package/lib/programmers/protobuf/ProtobufAssertDecodeProgrammer.js +12 -20
- package/lib/programmers/protobuf/ProtobufAssertDecodeProgrammer.js.map +1 -1
- package/lib/programmers/protobuf/ProtobufAssertEncodeProgrammer.d.ts +5 -4
- package/lib/programmers/protobuf/ProtobufAssertEncodeProgrammer.js +12 -20
- package/lib/programmers/protobuf/ProtobufAssertEncodeProgrammer.js.map +1 -1
- package/lib/programmers/protobuf/ProtobufDecodeProgrammer.d.ts +4 -3
- package/lib/programmers/protobuf/ProtobufDecodeProgrammer.js +11 -21
- package/lib/programmers/protobuf/ProtobufDecodeProgrammer.js.map +1 -1
- package/lib/programmers/protobuf/ProtobufEncodeProgrammer.d.ts +4 -3
- package/lib/programmers/protobuf/ProtobufEncodeProgrammer.js +11 -21
- package/lib/programmers/protobuf/ProtobufEncodeProgrammer.js.map +1 -1
- package/lib/programmers/protobuf/ProtobufIsDecodeProgrammer.d.ts +4 -3
- package/lib/programmers/protobuf/ProtobufIsDecodeProgrammer.js +11 -19
- package/lib/programmers/protobuf/ProtobufIsDecodeProgrammer.js.map +1 -1
- package/lib/programmers/protobuf/ProtobufIsEncodeProgrammer.d.ts +4 -3
- package/lib/programmers/protobuf/ProtobufIsEncodeProgrammer.js +11 -19
- package/lib/programmers/protobuf/ProtobufIsEncodeProgrammer.js.map +1 -1
- package/lib/programmers/protobuf/ProtobufMessageProgrammer.d.ts +6 -2
- package/lib/programmers/protobuf/ProtobufMessageProgrammer.js +3 -3
- package/lib/programmers/protobuf/ProtobufMessageProgrammer.js.map +1 -1
- package/lib/programmers/protobuf/ProtobufValidateDecodeProgrammer.d.ts +4 -3
- package/lib/programmers/protobuf/ProtobufValidateDecodeProgrammer.js +11 -19
- package/lib/programmers/protobuf/ProtobufValidateDecodeProgrammer.js.map +1 -1
- package/lib/programmers/protobuf/ProtobufValidateEncodeProgrammer.d.ts +4 -3
- package/lib/programmers/protobuf/ProtobufValidateEncodeProgrammer.js +11 -19
- package/lib/programmers/protobuf/ProtobufValidateEncodeProgrammer.js.map +1 -1
- package/lib/transform.d.ts +2 -2
- package/lib/transform.js.map +1 -1
- package/lib/transformers/CallExpressionTransformer.d.ts +2 -2
- package/lib/transformers/CallExpressionTransformer.js +81 -47
- package/lib/transformers/CallExpressionTransformer.js.map +1 -1
- package/lib/transformers/FileTransformer.d.ts +2 -2
- package/lib/transformers/FileTransformer.js +4 -4
- package/lib/transformers/FileTransformer.js.map +1 -1
- package/lib/transformers/IProgrammerProps.d.ts +9 -0
- package/lib/transformers/IProgrammerProps.js +3 -0
- package/lib/transformers/IProgrammerProps.js.map +1 -0
- package/lib/transformers/ITransformProps.d.ts +7 -0
- package/lib/transformers/ITransformProps.js +3 -0
- package/lib/transformers/ITransformProps.js.map +1 -0
- package/lib/transformers/{IProject.d.ts → ITypiaContext.d.ts} +2 -2
- package/lib/transformers/{IProject.js → ITypiaContext.js} +1 -1
- package/lib/transformers/ITypiaContext.js.map +1 -0
- package/lib/transformers/NodeTransformer.d.ts +2 -2
- package/lib/transformers/NodeTransformer.js.map +1 -1
- package/lib/transformers/features/AssertTransformer.d.ts +3 -4
- package/lib/transformers/features/AssertTransformer.js +22 -9
- package/lib/transformers/features/AssertTransformer.js.map +1 -1
- package/lib/transformers/features/CreateAssertTransformer.d.ts +3 -4
- package/lib/transformers/features/CreateAssertTransformer.js +22 -9
- package/lib/transformers/features/CreateAssertTransformer.js.map +1 -1
- package/lib/transformers/features/CreateIsTransformer.d.ts +3 -1
- package/lib/transformers/features/CreateIsTransformer.js +16 -3
- package/lib/transformers/features/CreateIsTransformer.js.map +1 -1
- package/lib/transformers/features/CreateRandomTransformer.d.ts +2 -2
- package/lib/transformers/features/CreateRandomTransformer.js +24 -22
- package/lib/transformers/features/CreateRandomTransformer.js.map +1 -1
- package/lib/transformers/features/CreateValidateTransformer.d.ts +3 -1
- package/lib/transformers/features/CreateValidateTransformer.js +16 -5
- package/lib/transformers/features/CreateValidateTransformer.js.map +1 -1
- package/lib/transformers/features/IsTransformer.d.ts +3 -1
- package/lib/transformers/features/IsTransformer.js +16 -3
- package/lib/transformers/features/IsTransformer.js.map +1 -1
- package/lib/transformers/features/RandomTransformer.d.ts +2 -2
- package/lib/transformers/features/RandomTransformer.js +25 -33
- package/lib/transformers/features/RandomTransformer.js.map +1 -1
- package/lib/transformers/features/ValidateTransformer.d.ts +3 -1
- package/lib/transformers/features/ValidateTransformer.js +16 -5
- package/lib/transformers/features/ValidateTransformer.js.map +1 -1
- package/lib/transformers/features/functional/FunctionalGenericTransformer.d.ts +17 -5
- package/lib/transformers/features/functional/FunctionalGenericTransformer.js +29 -28
- package/lib/transformers/features/functional/FunctionalGenericTransformer.js.map +1 -1
- package/lib/transformers/features/http/CreateHttpAssertFormDataTransformer.d.ts +2 -1
- package/lib/transformers/features/http/CreateHttpAssertFormDataTransformer.js +14 -3
- package/lib/transformers/features/http/CreateHttpAssertFormDataTransformer.js.map +1 -1
- package/lib/transformers/features/http/CreateHttpAssertHeadersTransformer.d.ts +2 -1
- package/lib/transformers/features/http/CreateHttpAssertHeadersTransformer.js +14 -1
- package/lib/transformers/features/http/CreateHttpAssertHeadersTransformer.js.map +1 -1
- package/lib/transformers/features/http/CreateHttpAssertQueryTransformer.d.ts +2 -1
- package/lib/transformers/features/http/CreateHttpAssertQueryTransformer.js +14 -1
- package/lib/transformers/features/http/CreateHttpAssertQueryTransformer.js.map +1 -1
- package/lib/transformers/features/http/CreateHttpFormDataTransformer.d.ts +2 -1
- package/lib/transformers/features/http/CreateHttpFormDataTransformer.js +14 -1
- package/lib/transformers/features/http/CreateHttpFormDataTransformer.js.map +1 -1
- package/lib/transformers/features/http/CreateHttpHeadersTransformer.d.ts +2 -1
- package/lib/transformers/features/http/CreateHttpHeadersTransformer.js +14 -1
- package/lib/transformers/features/http/CreateHttpHeadersTransformer.js.map +1 -1
- package/lib/transformers/features/http/CreateHttpIsFormDataTransformer.d.ts +2 -1
- package/lib/transformers/features/http/CreateHttpIsFormDataTransformer.js +14 -1
- package/lib/transformers/features/http/CreateHttpIsFormDataTransformer.js.map +1 -1
- package/lib/transformers/features/http/CreateHttpIsHeadersTransformer.d.ts +2 -1
- package/lib/transformers/features/http/CreateHttpIsHeadersTransformer.js +14 -1
- package/lib/transformers/features/http/CreateHttpIsHeadersTransformer.js.map +1 -1
- package/lib/transformers/features/http/CreateHttpIsQueryTransformer.d.ts +2 -1
- package/lib/transformers/features/http/CreateHttpIsQueryTransformer.js +14 -1
- package/lib/transformers/features/http/CreateHttpIsQueryTransformer.js.map +1 -1
- package/lib/transformers/features/http/CreateHttpParameterTransformer.d.ts +2 -1
- package/lib/transformers/features/http/CreateHttpParameterTransformer.js +14 -1
- package/lib/transformers/features/http/CreateHttpParameterTransformer.js.map +1 -1
- package/lib/transformers/features/http/CreateHttpQueryTransformer.d.ts +2 -1
- package/lib/transformers/features/http/CreateHttpQueryTransformer.js +14 -1
- package/lib/transformers/features/http/CreateHttpQueryTransformer.js.map +1 -1
- package/lib/transformers/features/http/CreateHttpValidateFormDataTransformer.d.ts +2 -1
- package/lib/transformers/features/http/CreateHttpValidateFormDataTransformer.js +14 -3
- package/lib/transformers/features/http/CreateHttpValidateFormDataTransformer.js.map +1 -1
- package/lib/transformers/features/http/CreateHttpValidateHeadersTransformer.d.ts +2 -1
- package/lib/transformers/features/http/CreateHttpValidateHeadersTransformer.js +14 -3
- package/lib/transformers/features/http/CreateHttpValidateHeadersTransformer.js.map +1 -1
- package/lib/transformers/features/http/CreateHttpValidateQueryTransformer.d.ts +2 -1
- package/lib/transformers/features/http/CreateHttpValidateQueryTransformer.js +14 -1
- package/lib/transformers/features/http/CreateHttpValidateQueryTransformer.js.map +1 -1
- package/lib/transformers/features/http/HttpAssertFormDataTransformer.d.ts +2 -1
- package/lib/transformers/features/http/HttpAssertFormDataTransformer.js +14 -3
- package/lib/transformers/features/http/HttpAssertFormDataTransformer.js.map +1 -1
- package/lib/transformers/features/http/HttpAssertHeadersTransformer.d.ts +2 -1
- package/lib/transformers/features/http/HttpAssertHeadersTransformer.js +14 -1
- package/lib/transformers/features/http/HttpAssertHeadersTransformer.js.map +1 -1
- package/lib/transformers/features/http/HttpAssertQueryTransformer.d.ts +2 -1
- package/lib/transformers/features/http/HttpAssertQueryTransformer.js +14 -1
- package/lib/transformers/features/http/HttpAssertQueryTransformer.js.map +1 -1
- package/lib/transformers/features/http/HttpFormDataTransformer.d.ts +2 -1
- package/lib/transformers/features/http/HttpFormDataTransformer.js +14 -1
- package/lib/transformers/features/http/HttpFormDataTransformer.js.map +1 -1
- package/lib/transformers/features/http/HttpHeadersTransformer.d.ts +2 -1
- package/lib/transformers/features/http/HttpHeadersTransformer.js +14 -1
- package/lib/transformers/features/http/HttpHeadersTransformer.js.map +1 -1
- package/lib/transformers/features/http/HttpIsFormDataTransformer.d.ts +2 -1
- package/lib/transformers/features/http/HttpIsFormDataTransformer.js +14 -1
- package/lib/transformers/features/http/HttpIsFormDataTransformer.js.map +1 -1
- package/lib/transformers/features/http/HttpIsHeadersTransformer.d.ts +2 -1
- package/lib/transformers/features/http/HttpIsHeadersTransformer.js +14 -1
- package/lib/transformers/features/http/HttpIsHeadersTransformer.js.map +1 -1
- package/lib/transformers/features/http/HttpIsQueryTransformer.d.ts +2 -1
- package/lib/transformers/features/http/HttpIsQueryTransformer.js +14 -1
- package/lib/transformers/features/http/HttpIsQueryTransformer.js.map +1 -1
- package/lib/transformers/features/http/HttpParameterTransformer.d.ts +2 -1
- package/lib/transformers/features/http/HttpParameterTransformer.js +14 -1
- package/lib/transformers/features/http/HttpParameterTransformer.js.map +1 -1
- package/lib/transformers/features/http/HttpQueryTransformer.d.ts +2 -1
- package/lib/transformers/features/http/HttpQueryTransformer.js +14 -1
- package/lib/transformers/features/http/HttpQueryTransformer.js.map +1 -1
- package/lib/transformers/features/http/HttpValidateFormDataTransformer.d.ts +2 -1
- package/lib/transformers/features/http/HttpValidateFormDataTransformer.js +14 -3
- package/lib/transformers/features/http/HttpValidateFormDataTransformer.js.map +1 -1
- package/lib/transformers/features/http/HttpValidateHeadersTransformer.d.ts +2 -1
- package/lib/transformers/features/http/HttpValidateHeadersTransformer.js +14 -3
- package/lib/transformers/features/http/HttpValidateHeadersTransformer.js.map +1 -1
- package/lib/transformers/features/http/HttpValidateQueryTransformer.d.ts +2 -1
- package/lib/transformers/features/http/HttpValidateQueryTransformer.js +14 -1
- package/lib/transformers/features/http/HttpValidateQueryTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonApplicationTransformer.d.ts +2 -2
- package/lib/transformers/features/json/JsonApplicationTransformer.js +69 -71
- package/lib/transformers/features/json/JsonApplicationTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonAssertParseTransformer.d.ts +2 -1
- package/lib/transformers/features/json/JsonAssertParseTransformer.js +14 -1
- package/lib/transformers/features/json/JsonAssertParseTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonAssertStringifyTransformer.d.ts +2 -1
- package/lib/transformers/features/json/JsonAssertStringifyTransformer.js +14 -3
- package/lib/transformers/features/json/JsonAssertStringifyTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonCreateAssertParseTransformer.d.ts +2 -1
- package/lib/transformers/features/json/JsonCreateAssertParseTransformer.js +14 -1
- package/lib/transformers/features/json/JsonCreateAssertParseTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonCreateAssertStringifyTransformer.d.ts +2 -1
- package/lib/transformers/features/json/JsonCreateAssertStringifyTransformer.js +14 -3
- package/lib/transformers/features/json/JsonCreateAssertStringifyTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonCreateIsParseTransformer.d.ts +2 -1
- package/lib/transformers/features/json/JsonCreateIsParseTransformer.js +14 -1
- package/lib/transformers/features/json/JsonCreateIsParseTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonCreateIsStringifyTransformer.d.ts +2 -1
- package/lib/transformers/features/json/JsonCreateIsStringifyTransformer.js +14 -1
- package/lib/transformers/features/json/JsonCreateIsStringifyTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonCreateStringifyTransformer.d.ts +2 -1
- package/lib/transformers/features/json/JsonCreateStringifyTransformer.js +14 -1
- package/lib/transformers/features/json/JsonCreateStringifyTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonCreateValidateParseTransformer.d.ts +2 -1
- package/lib/transformers/features/json/JsonCreateValidateParseTransformer.js +14 -1
- package/lib/transformers/features/json/JsonCreateValidateParseTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonCreateValidateStringifyProgrammer.d.ts +2 -1
- package/lib/transformers/features/json/JsonCreateValidateStringifyProgrammer.js +14 -3
- package/lib/transformers/features/json/JsonCreateValidateStringifyProgrammer.js.map +1 -1
- package/lib/transformers/features/json/JsonIsParseTransformer.d.ts +2 -1
- package/lib/transformers/features/json/JsonIsParseTransformer.js +14 -1
- package/lib/transformers/features/json/JsonIsParseTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonIsStringifyTransformer.d.ts +2 -1
- package/lib/transformers/features/json/JsonIsStringifyTransformer.js +14 -1
- package/lib/transformers/features/json/JsonIsStringifyTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonStringifyTransformer.d.ts +2 -1
- package/lib/transformers/features/json/JsonStringifyTransformer.js +14 -1
- package/lib/transformers/features/json/JsonStringifyTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonValidateParseTransformer.d.ts +2 -1
- package/lib/transformers/features/json/JsonValidateParseTransformer.js +14 -1
- package/lib/transformers/features/json/JsonValidateParseTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonValidateStringifyTransformer.d.ts +2 -1
- package/lib/transformers/features/json/JsonValidateStringifyTransformer.js +14 -3
- package/lib/transformers/features/json/JsonValidateStringifyTransformer.js.map +1 -1
- package/lib/transformers/features/llm/LlmApplicationTransformer.d.ts +2 -2
- package/lib/transformers/features/llm/LlmApplicationTransformer.js +36 -40
- package/lib/transformers/features/llm/LlmApplicationTransformer.js.map +1 -1
- package/lib/transformers/features/llm/LlmSchemaTransformer.d.ts +2 -2
- package/lib/transformers/features/llm/LlmSchemaTransformer.js +26 -28
- package/lib/transformers/features/llm/LlmSchemaTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscAssertCloneTransformer.d.ts +2 -1
- package/lib/transformers/features/misc/MiscAssertCloneTransformer.js +14 -1
- package/lib/transformers/features/misc/MiscAssertCloneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscAssertPruneTransformer.d.ts +2 -1
- package/lib/transformers/features/misc/MiscAssertPruneTransformer.js +14 -1
- package/lib/transformers/features/misc/MiscAssertPruneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscCloneTransformer.d.ts +2 -1
- package/lib/transformers/features/misc/MiscCloneTransformer.js +14 -1
- package/lib/transformers/features/misc/MiscCloneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscCreateAssertCloneTransformer.d.ts +2 -1
- package/lib/transformers/features/misc/MiscCreateAssertCloneTransformer.js +14 -1
- package/lib/transformers/features/misc/MiscCreateAssertCloneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscCreateAssertPruneTransformer.d.ts +2 -1
- package/lib/transformers/features/misc/MiscCreateAssertPruneTransformer.js +14 -1
- package/lib/transformers/features/misc/MiscCreateAssertPruneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscCreateCloneTransformer.d.ts +2 -1
- package/lib/transformers/features/misc/MiscCreateCloneTransformer.js +14 -1
- package/lib/transformers/features/misc/MiscCreateCloneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscCreateIsCloneTransformer.d.ts +2 -1
- package/lib/transformers/features/misc/MiscCreateIsCloneTransformer.js +14 -1
- package/lib/transformers/features/misc/MiscCreateIsCloneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscCreateIsPruneTransformer.d.ts +2 -1
- package/lib/transformers/features/misc/MiscCreateIsPruneTransformer.js +14 -1
- package/lib/transformers/features/misc/MiscCreateIsPruneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscCreatePruneTransformer.d.ts +2 -1
- package/lib/transformers/features/misc/MiscCreatePruneTransformer.js +14 -1
- package/lib/transformers/features/misc/MiscCreatePruneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscCreateValidateCloneTransformer.d.ts +2 -1
- package/lib/transformers/features/misc/MiscCreateValidateCloneTransformer.js +14 -1
- package/lib/transformers/features/misc/MiscCreateValidateCloneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscCreateValidatePruneTransformer.d.ts +2 -1
- package/lib/transformers/features/misc/MiscCreateValidatePruneTransformer.js +14 -1
- package/lib/transformers/features/misc/MiscCreateValidatePruneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscIsCloneTransformer.d.ts +2 -1
- package/lib/transformers/features/misc/MiscIsCloneTransformer.js +14 -1
- package/lib/transformers/features/misc/MiscIsCloneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscIsPruneTransformer.d.ts +2 -1
- package/lib/transformers/features/misc/MiscIsPruneTransformer.js +14 -1
- package/lib/transformers/features/misc/MiscIsPruneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscLiteralsTransformer.d.ts +2 -2
- package/lib/transformers/features/misc/MiscLiteralsTransformer.js +21 -20
- package/lib/transformers/features/misc/MiscLiteralsTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscPruneTransformer.d.ts +2 -1
- package/lib/transformers/features/misc/MiscPruneTransformer.js +14 -1
- package/lib/transformers/features/misc/MiscPruneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscValidateCloneTransformer.d.ts +2 -1
- package/lib/transformers/features/misc/MiscValidateCloneTransformer.js +14 -1
- package/lib/transformers/features/misc/MiscValidateCloneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscValidatePruneTransformer.d.ts +2 -1
- package/lib/transformers/features/misc/MiscValidatePruneTransformer.js +14 -1
- package/lib/transformers/features/misc/MiscValidatePruneTransformer.js.map +1 -1
- package/lib/transformers/features/notations/NotationAssertGeneralTransformer.d.ts +2 -1
- package/lib/transformers/features/notations/NotationAssertGeneralTransformer.js +16 -5
- package/lib/transformers/features/notations/NotationAssertGeneralTransformer.js.map +1 -1
- package/lib/transformers/features/notations/NotationCreateAssertGeneralTransformer.d.ts +2 -1
- package/lib/transformers/features/notations/NotationCreateAssertGeneralTransformer.js +16 -5
- package/lib/transformers/features/notations/NotationCreateAssertGeneralTransformer.js.map +1 -1
- package/lib/transformers/features/notations/NotationCreateGeneralTransformer.d.ts +2 -1
- package/lib/transformers/features/notations/NotationCreateGeneralTransformer.js +16 -5
- package/lib/transformers/features/notations/NotationCreateGeneralTransformer.js.map +1 -1
- package/lib/transformers/features/notations/NotationCreateIsGeneralTransformer.d.ts +2 -1
- package/lib/transformers/features/notations/NotationCreateIsGeneralTransformer.js +16 -5
- package/lib/transformers/features/notations/NotationCreateIsGeneralTransformer.js.map +1 -1
- package/lib/transformers/features/notations/NotationCreateValidateGeneralTransformer.d.ts +2 -1
- package/lib/transformers/features/notations/NotationCreateValidateGeneralTransformer.js +16 -5
- package/lib/transformers/features/notations/NotationCreateValidateGeneralTransformer.js.map +1 -1
- package/lib/transformers/features/notations/NotationGeneralTransformer.d.ts +2 -1
- package/lib/transformers/features/notations/NotationGeneralTransformer.js +16 -5
- package/lib/transformers/features/notations/NotationGeneralTransformer.js.map +1 -1
- package/lib/transformers/features/notations/NotationIsGeneralTransformer.d.ts +2 -1
- package/lib/transformers/features/notations/NotationIsGeneralTransformer.js +16 -5
- package/lib/transformers/features/notations/NotationIsGeneralTransformer.js.map +1 -1
- package/lib/transformers/features/notations/NotationValidateGeneralTransformer.d.ts +2 -1
- package/lib/transformers/features/notations/NotationValidateGeneralTransformer.js +16 -5
- package/lib/transformers/features/notations/NotationValidateGeneralTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufAssertDecodeTransformer.d.ts +2 -1
- package/lib/transformers/features/protobuf/ProtobufAssertDecodeTransformer.js +14 -3
- package/lib/transformers/features/protobuf/ProtobufAssertDecodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufAssertEncodeTransformer.d.ts +2 -1
- package/lib/transformers/features/protobuf/ProtobufAssertEncodeTransformer.js +14 -3
- package/lib/transformers/features/protobuf/ProtobufAssertEncodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufCreateAssertDecodeTransformer.d.ts +2 -1
- package/lib/transformers/features/protobuf/ProtobufCreateAssertDecodeTransformer.js +14 -3
- package/lib/transformers/features/protobuf/ProtobufCreateAssertDecodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufCreateAssertEncodeTransformer.d.ts +2 -1
- package/lib/transformers/features/protobuf/ProtobufCreateAssertEncodeTransformer.js +14 -3
- package/lib/transformers/features/protobuf/ProtobufCreateAssertEncodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufCreateDecodeTransformer.d.ts +2 -1
- package/lib/transformers/features/protobuf/ProtobufCreateDecodeTransformer.js +14 -1
- package/lib/transformers/features/protobuf/ProtobufCreateDecodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufCreateEncodeTransformer.d.ts +2 -1
- package/lib/transformers/features/protobuf/ProtobufCreateEncodeTransformer.js +14 -1
- package/lib/transformers/features/protobuf/ProtobufCreateEncodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufCreateIsDecodeTransformer.d.ts +2 -1
- package/lib/transformers/features/protobuf/ProtobufCreateIsDecodeTransformer.js +14 -1
- package/lib/transformers/features/protobuf/ProtobufCreateIsDecodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufCreateIsEncodeTransformer.d.ts +2 -1
- package/lib/transformers/features/protobuf/ProtobufCreateIsEncodeTransformer.js +14 -1
- package/lib/transformers/features/protobuf/ProtobufCreateIsEncodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufCreateValidateDecodeTransformer.d.ts +2 -1
- package/lib/transformers/features/protobuf/ProtobufCreateValidateDecodeTransformer.js +14 -3
- package/lib/transformers/features/protobuf/ProtobufCreateValidateDecodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufCreateValidateEncodeTransformer.d.ts +2 -1
- package/lib/transformers/features/protobuf/ProtobufCreateValidateEncodeTransformer.js +14 -3
- package/lib/transformers/features/protobuf/ProtobufCreateValidateEncodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufDecodeTransformer.d.ts +2 -1
- package/lib/transformers/features/protobuf/ProtobufDecodeTransformer.js +14 -1
- package/lib/transformers/features/protobuf/ProtobufDecodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufEncodeTransformer.d.ts +2 -1
- package/lib/transformers/features/protobuf/ProtobufEncodeTransformer.js +14 -1
- package/lib/transformers/features/protobuf/ProtobufEncodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufIsDecodeTransformer.d.ts +2 -1
- package/lib/transformers/features/protobuf/ProtobufIsDecodeTransformer.js +14 -1
- package/lib/transformers/features/protobuf/ProtobufIsDecodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufIsEncodeTransformer.d.ts +2 -1
- package/lib/transformers/features/protobuf/ProtobufIsEncodeTransformer.js +14 -1
- package/lib/transformers/features/protobuf/ProtobufIsEncodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufMessageTransformer.d.ts +2 -2
- package/lib/transformers/features/protobuf/ProtobufMessageTransformer.js +19 -20
- package/lib/transformers/features/protobuf/ProtobufMessageTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufValidateDecodeTransformer.d.ts +2 -1
- package/lib/transformers/features/protobuf/ProtobufValidateDecodeTransformer.js +14 -3
- package/lib/transformers/features/protobuf/ProtobufValidateDecodeTransformer.js.map +1 -1
- package/lib/transformers/features/protobuf/ProtobufValidateEncodeTransformer.d.ts +2 -1
- package/lib/transformers/features/protobuf/ProtobufValidateEncodeTransformer.js +14 -3
- package/lib/transformers/features/protobuf/ProtobufValidateEncodeTransformer.js.map +1 -1
- package/lib/transformers/features/reflect/ReflectMetadataTransformer.d.ts +2 -2
- package/lib/transformers/features/reflect/ReflectMetadataTransformer.js +38 -40
- package/lib/transformers/features/reflect/ReflectMetadataTransformer.js.map +1 -1
- package/lib/transformers/features/reflect/ReflectNameTransformer.d.ts +2 -2
- package/lib/transformers/features/reflect/ReflectNameTransformer.js +45 -41
- package/lib/transformers/features/reflect/ReflectNameTransformer.js.map +1 -1
- package/lib/transformers/internal/GenericTransformer.d.ts +8 -3
- package/lib/transformers/internal/GenericTransformer.js +63 -68
- package/lib/transformers/internal/GenericTransformer.js.map +1 -1
- package/package.json +1 -1
- package/src/executable/TypiaSetupWizard.ts +4 -1
- package/src/factories/internal/metadata/iterate_metadata_function.ts +4 -1
- package/src/programmers/AssertProgrammer.ts +45 -37
- package/src/programmers/CheckerProgrammer.ts +27 -21
- package/src/programmers/FeatureProgrammer.ts +5 -5
- package/src/programmers/IsProgrammer.ts +42 -33
- package/src/programmers/RandomProgrammer.ts +32 -26
- package/src/programmers/TypiaProgrammer.ts +157 -157
- package/src/programmers/ValidateProgrammer.ts +39 -31
- package/src/programmers/functional/FunctionalAssertFunctionProgrammer.ts +92 -76
- package/src/programmers/functional/FunctionalAssertParametersProgrammer.ts +117 -88
- package/src/programmers/functional/FunctionalAssertReturnProgrammer.ts +96 -79
- package/src/programmers/functional/FunctionalIsFunctionProgrammer.ts +50 -50
- package/src/programmers/functional/FunctionalIsParametersProgrammer.ts +91 -79
- package/src/programmers/functional/FunctionalIsReturnProgrammer.ts +93 -84
- package/src/programmers/functional/FunctionalValidateFunctionProgrammer.ts +49 -49
- package/src/programmers/functional/FunctionalValidateParametersProgrammer.ts +230 -223
- package/src/programmers/functional/FunctionalValidateReturnProgrammer.ts +104 -97
- package/src/programmers/functional/internal/FunctionalGeneralProgrammer.ts +23 -23
- package/src/programmers/http/HttpAssertFormDataProgrammer.ts +25 -26
- package/src/programmers/http/HttpAssertHeadersProgrammer.ts +25 -26
- package/src/programmers/http/HttpAssertQueryProgrammer.ts +30 -27
- package/src/programmers/http/HttpFormDataProgrammer.ts +20 -22
- package/src/programmers/http/HttpHeadersProgrammer.ts +20 -22
- package/src/programmers/http/HttpIsFormDataProgrammer.ts +23 -23
- package/src/programmers/http/HttpIsHeadersProgrammer.ts +23 -23
- package/src/programmers/http/HttpIsQueryProgrammer.ts +28 -24
- package/src/programmers/http/HttpParameterProgrammer.ts +63 -53
- package/src/programmers/http/HttpQueryProgrammer.ts +25 -23
- package/src/programmers/http/HttpValidateFormDataProgrammer.ts +23 -24
- package/src/programmers/http/HttpValidateHeadersProgrammer.ts +23 -24
- package/src/programmers/http/HttpValidateQueryProgrammer.ts +28 -25
- package/src/programmers/internal/check_array_length.ts +4 -4
- package/src/programmers/internal/check_bigint.ts +4 -4
- package/src/programmers/internal/check_dynamic_key.ts +2 -2
- package/src/programmers/internal/check_dynamic_properties.ts +3 -3
- package/src/programmers/internal/check_number.ts +4 -4
- package/src/programmers/internal/check_object.ts +2 -2
- package/src/programmers/internal/check_string.ts +4 -4
- package/src/programmers/json/JsonAssertParseProgrammer.ts +28 -26
- package/src/programmers/json/JsonAssertStringifyProgrammer.ts +27 -25
- package/src/programmers/json/JsonIsParseProgrammer.ts +26 -24
- package/src/programmers/json/JsonIsStringifyProgrammer.ts +26 -26
- package/src/programmers/json/JsonStringifyProgrammer.ts +30 -32
- package/src/programmers/json/JsonValidateParseProgrammer.ts +27 -25
- package/src/programmers/json/JsonValidateStringifyProgrammer.ts +26 -24
- package/src/programmers/misc/MiscAssertCloneProgrammer.ts +22 -23
- package/src/programmers/misc/MiscAssertPruneProgrammer.ts +23 -24
- package/src/programmers/misc/MiscCloneProgrammer.ts +29 -31
- package/src/programmers/misc/MiscIsCloneProgrammer.ts +20 -20
- package/src/programmers/misc/MiscIsPruneProgrammer.ts +20 -20
- package/src/programmers/misc/MiscLiteralsProgrammer.ts +9 -5
- package/src/programmers/misc/MiscPruneProgrammer.ts +27 -29
- package/src/programmers/misc/MiscValidateCloneProgrammer.ts +20 -21
- package/src/programmers/misc/MiscValidatePruneProgrammer.ts +21 -22
- package/src/programmers/notations/NotationAssertGeneralProgrammer.ts +26 -25
- package/src/programmers/notations/NotationGeneralProgrammer.ts +34 -34
- package/src/programmers/notations/NotationIsGeneralProgrammer.ts +24 -22
- package/src/programmers/notations/NotationValidateGeneralProgrammer.ts +24 -23
- package/src/programmers/protobuf/ProtobufAssertDecodeProgrammer.ts +25 -27
- package/src/programmers/protobuf/ProtobufAssertEncodeProgrammer.ts +25 -27
- package/src/programmers/protobuf/ProtobufDecodeProgrammer.ts +27 -30
- package/src/programmers/protobuf/ProtobufEncodeProgrammer.ts +28 -31
- package/src/programmers/protobuf/ProtobufIsDecodeProgrammer.ts +23 -24
- package/src/programmers/protobuf/ProtobufIsEncodeProgrammer.ts +23 -24
- package/src/programmers/protobuf/ProtobufMessageProgrammer.ts +10 -5
- package/src/programmers/protobuf/ProtobufValidateDecodeProgrammer.ts +23 -24
- package/src/programmers/protobuf/ProtobufValidateEncodeProgrammer.ts +23 -24
- package/src/transform.ts +2 -2
- package/src/transformers/CallExpressionTransformer.ts +82 -50
- package/src/transformers/FileTransformer.ts +10 -10
- package/src/transformers/IProgrammerProps.ts +11 -0
- package/src/transformers/ITransformProps.ts +9 -0
- package/src/transformers/{IProject.ts → ITypiaContext.ts} +2 -2
- package/src/transformers/NodeTransformer.ts +2 -2
- package/src/transformers/features/AssertTransformer.ts +18 -10
- package/src/transformers/features/CreateAssertTransformer.ts +18 -10
- package/src/transformers/features/CreateIsTransformer.ts +12 -4
- package/src/transformers/features/CreateRandomTransformer.ts +28 -25
- package/src/transformers/features/CreateValidateTransformer.ts +12 -7
- package/src/transformers/features/IsTransformer.ts +12 -4
- package/src/transformers/features/RandomTransformer.ts +30 -33
- package/src/transformers/features/ValidateTransformer.ts +12 -5
- package/src/transformers/features/functional/FunctionalGenericTransformer.ts +36 -36
- package/src/transformers/features/http/CreateHttpAssertFormDataTransformer.ts +7 -6
- package/src/transformers/features/http/CreateHttpAssertHeadersTransformer.ts +7 -5
- package/src/transformers/features/http/CreateHttpAssertQueryTransformer.ts +7 -3
- package/src/transformers/features/http/CreateHttpFormDataTransformer.ts +7 -3
- package/src/transformers/features/http/CreateHttpHeadersTransformer.ts +7 -3
- package/src/transformers/features/http/CreateHttpIsFormDataTransformer.ts +7 -3
- package/src/transformers/features/http/CreateHttpIsHeadersTransformer.ts +7 -3
- package/src/transformers/features/http/CreateHttpIsQueryTransformer.ts +7 -3
- package/src/transformers/features/http/CreateHttpParameterTransformer.ts +7 -3
- package/src/transformers/features/http/CreateHttpQueryTransformer.ts +7 -3
- package/src/transformers/features/http/CreateHttpValidateFormDataTransformer.ts +7 -6
- package/src/transformers/features/http/CreateHttpValidateHeadersTransformer.ts +7 -6
- package/src/transformers/features/http/CreateHttpValidateQueryTransformer.ts +7 -5
- package/src/transformers/features/http/HttpAssertFormDataTransformer.ts +7 -4
- package/src/transformers/features/http/HttpAssertHeadersTransformer.ts +7 -3
- package/src/transformers/features/http/HttpAssertQueryTransformer.ts +7 -3
- package/src/transformers/features/http/HttpFormDataTransformer.ts +7 -3
- package/src/transformers/features/http/HttpHeadersTransformer.ts +7 -3
- package/src/transformers/features/http/HttpIsFormDataTransformer.ts +7 -3
- package/src/transformers/features/http/HttpIsHeadersTransformer.ts +7 -3
- package/src/transformers/features/http/HttpIsQueryTransformer.ts +7 -3
- package/src/transformers/features/http/HttpParameterTransformer.ts +7 -3
- package/src/transformers/features/http/HttpQueryTransformer.ts +7 -3
- package/src/transformers/features/http/HttpValidateFormDataTransformer.ts +7 -4
- package/src/transformers/features/http/HttpValidateHeadersTransformer.ts +7 -4
- package/src/transformers/features/http/HttpValidateQueryTransformer.ts +7 -3
- package/src/transformers/features/json/JsonApplicationTransformer.ts +67 -67
- package/src/transformers/features/json/JsonAssertParseTransformer.ts +7 -3
- package/src/transformers/features/json/JsonAssertStringifyTransformer.ts +7 -4
- package/src/transformers/features/json/JsonCreateAssertParseTransformer.ts +7 -3
- package/src/transformers/features/json/JsonCreateAssertStringifyTransformer.ts +7 -6
- package/src/transformers/features/json/JsonCreateIsParseTransformer.ts +7 -3
- package/src/transformers/features/json/JsonCreateIsStringifyTransformer.ts +7 -3
- package/src/transformers/features/json/JsonCreateStringifyTransformer.ts +7 -3
- package/src/transformers/features/json/JsonCreateValidateParseTransformer.ts +7 -5
- package/src/transformers/features/json/JsonCreateValidateStringifyProgrammer.ts +7 -6
- package/src/transformers/features/json/JsonIsParseTransformer.ts +7 -3
- package/src/transformers/features/json/JsonIsStringifyTransformer.ts +7 -3
- package/src/transformers/features/json/JsonStringifyTransformer.ts +7 -3
- package/src/transformers/features/json/JsonValidateParseTransformer.ts +7 -3
- package/src/transformers/features/json/JsonValidateStringifyTransformer.ts +7 -4
- package/src/transformers/features/llm/LlmApplicationTransformer.ts +53 -60
- package/src/transformers/features/llm/LlmSchemaTransformer.ts +35 -35
- package/src/transformers/features/misc/MiscAssertCloneTransformer.ts +7 -3
- package/src/transformers/features/misc/MiscAssertPruneTransformer.ts +7 -3
- package/src/transformers/features/misc/MiscCloneTransformer.ts +7 -3
- package/src/transformers/features/misc/MiscCreateAssertCloneTransformer.ts +7 -3
- package/src/transformers/features/misc/MiscCreateAssertPruneTransformer.ts +7 -3
- package/src/transformers/features/misc/MiscCreateCloneTransformer.ts +7 -3
- package/src/transformers/features/misc/MiscCreateIsCloneTransformer.ts +7 -3
- package/src/transformers/features/misc/MiscCreateIsPruneTransformer.ts +7 -3
- package/src/transformers/features/misc/MiscCreatePruneTransformer.ts +7 -3
- package/src/transformers/features/misc/MiscCreateValidateCloneTransformer.ts +7 -5
- package/src/transformers/features/misc/MiscCreateValidatePruneTransformer.ts +7 -5
- package/src/transformers/features/misc/MiscIsCloneTransformer.ts +7 -3
- package/src/transformers/features/misc/MiscIsPruneTransformer.ts +7 -3
- package/src/transformers/features/misc/MiscLiteralsTransformer.ts +24 -21
- package/src/transformers/features/misc/MiscPruneTransformer.ts +7 -3
- package/src/transformers/features/misc/MiscValidateCloneTransformer.ts +7 -3
- package/src/transformers/features/misc/MiscValidatePruneTransformer.ts +7 -3
- package/src/transformers/features/notations/NotationAssertGeneralTransformer.ts +12 -7
- package/src/transformers/features/notations/NotationCreateAssertGeneralTransformer.ts +12 -7
- package/src/transformers/features/notations/NotationCreateGeneralTransformer.ts +12 -7
- package/src/transformers/features/notations/NotationCreateIsGeneralTransformer.ts +12 -7
- package/src/transformers/features/notations/NotationCreateValidateGeneralTransformer.ts +12 -7
- package/src/transformers/features/notations/NotationGeneralTransformer.ts +12 -5
- package/src/transformers/features/notations/NotationIsGeneralTransformer.ts +12 -7
- package/src/transformers/features/notations/NotationValidateGeneralTransformer.ts +12 -7
- package/src/transformers/features/protobuf/ProtobufAssertDecodeTransformer.ts +7 -4
- package/src/transformers/features/protobuf/ProtobufAssertEncodeTransformer.ts +7 -4
- package/src/transformers/features/protobuf/ProtobufCreateAssertDecodeTransformer.ts +7 -6
- package/src/transformers/features/protobuf/ProtobufCreateAssertEncodeTransformer.ts +7 -6
- package/src/transformers/features/protobuf/ProtobufCreateDecodeTransformer.ts +7 -3
- package/src/transformers/features/protobuf/ProtobufCreateEncodeTransformer.ts +7 -3
- package/src/transformers/features/protobuf/ProtobufCreateIsDecodeTransformer.ts +7 -3
- package/src/transformers/features/protobuf/ProtobufCreateIsEncodeTransformer.ts +7 -3
- package/src/transformers/features/protobuf/ProtobufCreateValidateDecodeTransformer.ts +7 -6
- package/src/transformers/features/protobuf/ProtobufCreateValidateEncodeTransformer.ts +7 -6
- package/src/transformers/features/protobuf/ProtobufDecodeTransformer.ts +7 -3
- package/src/transformers/features/protobuf/ProtobufEncodeTransformer.ts +7 -3
- package/src/transformers/features/protobuf/ProtobufIsDecodeTransformer.ts +7 -3
- package/src/transformers/features/protobuf/ProtobufIsEncodeTransformer.ts +7 -3
- package/src/transformers/features/protobuf/ProtobufMessageTransformer.ts +25 -23
- package/src/transformers/features/protobuf/ProtobufValidateDecodeTransformer.ts +7 -4
- package/src/transformers/features/protobuf/ProtobufValidateEncodeTransformer.ts +7 -4
- package/src/transformers/features/reflect/ReflectMetadataTransformer.ts +47 -47
- package/src/transformers/features/reflect/ReflectNameTransformer.ts +60 -50
- package/src/transformers/internal/GenericTransformer.ts +88 -91
- package/lib/_virtual/LlmSchemaSeparator.mjs +0 -4
- package/lib/_virtual/LlmSchemaSeparator.mjs.map +0 -1
- package/lib/_virtual/LlmTypeChecker.mjs +0 -4
- package/lib/_virtual/LlmTypeChecker.mjs.map +0 -1
- package/lib/transformers/IProject.js.map +0 -1
|
@@ -2,70 +2,70 @@ import ts from "typescript";
|
|
|
2
2
|
|
|
3
3
|
import { ExpressionFactory } from "../../factories/ExpressionFactory";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { ITypiaContext } from "../../transformers/ITypiaContext";
|
|
6
6
|
|
|
7
7
|
import { FunctionalIsParametersProgrammer } from "./FunctionalIsParametersProgrammer";
|
|
8
8
|
import { FunctionalIsReturnProgrammer } from "./FunctionalIsReturnProgrammer";
|
|
9
9
|
|
|
10
10
|
export namespace FunctionalIsFunctionProgrammer {
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
ts.factory.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
),
|
|
45
|
-
),
|
|
11
|
+
export interface IConfig {
|
|
12
|
+
equals: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface IProps {
|
|
15
|
+
context: ITypiaContext;
|
|
16
|
+
modulo: ts.LeftHandSideExpression;
|
|
17
|
+
config: IConfig;
|
|
18
|
+
declaration: ts.FunctionDeclaration;
|
|
19
|
+
expression: ts.Expression;
|
|
20
|
+
init?: ts.Expression | undefined;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const write = (props: IProps): ts.CallExpression => {
|
|
24
|
+
const p = FunctionalIsParametersProgrammer.decompose(props);
|
|
25
|
+
const r = FunctionalIsReturnProgrammer.decompose(props);
|
|
26
|
+
return ExpressionFactory.selfCall(
|
|
27
|
+
ts.factory.createBlock(
|
|
28
|
+
[
|
|
29
|
+
...p.functions,
|
|
30
|
+
...r.functions,
|
|
31
|
+
ts.factory.createReturnStatement(
|
|
32
|
+
ts.factory.createArrowFunction(
|
|
33
|
+
r.async
|
|
34
|
+
? [ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword)]
|
|
35
|
+
: undefined,
|
|
36
|
+
undefined,
|
|
37
|
+
props.declaration.parameters,
|
|
38
|
+
getReturnTypeNode({
|
|
39
|
+
declaration: props.declaration,
|
|
40
|
+
async: r.async,
|
|
41
|
+
}),
|
|
42
|
+
undefined,
|
|
43
|
+
ts.factory.createBlock([...p.statements, ...r.statements], true),
|
|
46
44
|
),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
)
|
|
51
|
-
|
|
45
|
+
),
|
|
46
|
+
],
|
|
47
|
+
true,
|
|
48
|
+
),
|
|
49
|
+
);
|
|
50
|
+
};
|
|
52
51
|
|
|
53
|
-
export const getReturnTypeNode = (
|
|
54
|
-
declaration: ts.FunctionDeclaration
|
|
55
|
-
async: boolean
|
|
56
|
-
): ts.TypeNode | undefined =>
|
|
57
|
-
declaration.type
|
|
58
|
-
? async
|
|
59
|
-
? !!(declaration.type! as ts.TypeReferenceNode).typeArguments?.[0]
|
|
52
|
+
export const getReturnTypeNode = (props: {
|
|
53
|
+
declaration: ts.FunctionDeclaration;
|
|
54
|
+
async: boolean;
|
|
55
|
+
}): ts.TypeNode | undefined =>
|
|
56
|
+
props.declaration.type
|
|
57
|
+
? props.async
|
|
58
|
+
? !!(props.declaration.type! as ts.TypeReferenceNode).typeArguments?.[0]
|
|
60
59
|
? ts.factory.createTypeReferenceNode("Promise", [
|
|
61
60
|
ts.factory.createUnionTypeNode([
|
|
62
|
-
(declaration.type! as ts.TypeReferenceNode)
|
|
61
|
+
(props.declaration.type! as ts.TypeReferenceNode)
|
|
62
|
+
.typeArguments![0]!,
|
|
63
63
|
ts.factory.createTypeReferenceNode("null"),
|
|
64
64
|
]),
|
|
65
65
|
])
|
|
66
66
|
: undefined
|
|
67
67
|
: ts.factory.createUnionTypeNode([
|
|
68
|
-
declaration.type,
|
|
68
|
+
props.declaration.type,
|
|
69
69
|
ts.factory.createTypeReferenceNode("null"),
|
|
70
70
|
])
|
|
71
71
|
: undefined;
|
|
@@ -4,98 +4,110 @@ import { ExpressionFactory } from "../../factories/ExpressionFactory";
|
|
|
4
4
|
import { StatementFactory } from "../../factories/StatementFactory";
|
|
5
5
|
import { TypeFactory } from "../../factories/TypeFactory";
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { ITypiaContext } from "../../transformers/ITypiaContext";
|
|
8
8
|
|
|
9
9
|
import { IsProgrammer } from "../IsProgrammer";
|
|
10
10
|
import { FunctionalIsFunctionProgrammer } from "./FunctionalIsFunctionProgrammer";
|
|
11
11
|
import { FunctionalGeneralProgrammer } from "./internal/FunctionalGeneralProgrammer";
|
|
12
12
|
|
|
13
13
|
export namespace FunctionalIsParametersProgrammer {
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
14
|
+
export interface IConfig {
|
|
15
|
+
equals: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface IProps {
|
|
18
|
+
context: ITypiaContext;
|
|
19
|
+
modulo: ts.LeftHandSideExpression;
|
|
20
|
+
config: IConfig;
|
|
21
|
+
declaration: ts.FunctionDeclaration;
|
|
22
|
+
expression: ts.Expression;
|
|
23
|
+
init?: ts.Expression | undefined;
|
|
24
|
+
}
|
|
25
|
+
export interface IDecomposeProps {
|
|
26
|
+
context: ITypiaContext;
|
|
27
|
+
config: IConfig;
|
|
28
|
+
modulo: ts.LeftHandSideExpression;
|
|
29
|
+
declaration: ts.FunctionDeclaration;
|
|
30
|
+
}
|
|
31
|
+
export interface IDecomposeOutput {
|
|
32
|
+
functions: ts.Statement[];
|
|
33
|
+
statements: ts.Statement[];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const write = (props: IProps): ts.CallExpression => {
|
|
37
|
+
const { async } = FunctionalGeneralProgrammer.getReturnType({
|
|
38
|
+
checker: props.context.checker,
|
|
39
|
+
declaration: props.declaration,
|
|
40
|
+
});
|
|
41
|
+
const result = decompose(props);
|
|
42
|
+
return ExpressionFactory.selfCall(
|
|
43
|
+
ts.factory.createBlock(
|
|
44
|
+
[
|
|
45
|
+
...result.functions,
|
|
46
|
+
ts.factory.createReturnStatement(
|
|
47
|
+
ts.factory.createArrowFunction(
|
|
48
|
+
async
|
|
49
|
+
? [ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword)]
|
|
50
|
+
: undefined,
|
|
51
|
+
undefined,
|
|
52
|
+
props.declaration.parameters,
|
|
53
|
+
FunctionalIsFunctionProgrammer.getReturnTypeNode({
|
|
54
|
+
declaration: props.declaration,
|
|
55
|
+
async,
|
|
56
|
+
}),
|
|
57
|
+
undefined,
|
|
58
|
+
ts.factory.createBlock(
|
|
59
|
+
[
|
|
60
|
+
...result.statements,
|
|
61
|
+
ts.factory.createReturnStatement(
|
|
62
|
+
ts.factory.createCallExpression(
|
|
63
|
+
props.expression,
|
|
64
|
+
undefined,
|
|
65
|
+
props.declaration.parameters.map((p) =>
|
|
66
|
+
ts.factory.createIdentifier(p.name.getText()),
|
|
52
67
|
),
|
|
53
68
|
),
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
69
|
+
),
|
|
70
|
+
],
|
|
71
|
+
true,
|
|
57
72
|
),
|
|
58
73
|
),
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
)
|
|
63
|
-
|
|
74
|
+
),
|
|
75
|
+
],
|
|
76
|
+
true,
|
|
77
|
+
),
|
|
78
|
+
);
|
|
79
|
+
};
|
|
64
80
|
|
|
65
|
-
export const decompose =
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
functions: declaration.parameters.map((p, i) =>
|
|
76
|
-
StatementFactory.constant(
|
|
77
|
-
`__is_param_${i}`,
|
|
78
|
-
IsProgrammer.write(project)(modulo)(equals)(
|
|
79
|
-
project.checker.getTypeFromTypeNode(
|
|
80
|
-
p.type ?? TypeFactory.keyword("any"),
|
|
81
|
-
),
|
|
81
|
+
export const decompose = (props: IDecomposeProps): IDecomposeOutput => ({
|
|
82
|
+
functions: props.declaration.parameters.map((p, i) =>
|
|
83
|
+
StatementFactory.constant(
|
|
84
|
+
`__is_param_${i}`,
|
|
85
|
+
IsProgrammer.write({
|
|
86
|
+
context: props.context,
|
|
87
|
+
modulo: props.modulo,
|
|
88
|
+
config: props.config,
|
|
89
|
+
type: props.context.checker.getTypeFromTypeNode(
|
|
90
|
+
p.type ?? TypeFactory.keyword("any"),
|
|
82
91
|
),
|
|
83
|
-
|
|
92
|
+
init: undefined,
|
|
93
|
+
name: undefined,
|
|
94
|
+
}),
|
|
84
95
|
),
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
),
|
|
96
|
+
),
|
|
97
|
+
statements: props.declaration.parameters
|
|
98
|
+
.map((p, i) => [
|
|
99
|
+
ts.factory.createIfStatement(
|
|
100
|
+
ts.factory.createStrictEquality(
|
|
101
|
+
ts.factory.createFalse(),
|
|
102
|
+
ts.factory.createCallExpression(
|
|
103
|
+
ts.factory.createIdentifier(`__is_param_${i}`),
|
|
104
|
+
undefined,
|
|
105
|
+
[ts.factory.createIdentifier(p.name.getText())],
|
|
95
106
|
),
|
|
96
|
-
ts.factory.createReturnStatement(ts.factory.createNull()),
|
|
97
107
|
),
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
108
|
+
ts.factory.createReturnStatement(ts.factory.createNull()),
|
|
109
|
+
),
|
|
110
|
+
])
|
|
111
|
+
.flat(),
|
|
112
|
+
});
|
|
101
113
|
}
|
|
@@ -3,7 +3,7 @@ import ts from "typescript";
|
|
|
3
3
|
import { ExpressionFactory } from "../../factories/ExpressionFactory";
|
|
4
4
|
import { StatementFactory } from "../../factories/StatementFactory";
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { ITypiaContext } from "../../transformers/ITypiaContext";
|
|
7
7
|
|
|
8
8
|
import { StringUtil } from "../../utils/StringUtil";
|
|
9
9
|
|
|
@@ -12,95 +12,104 @@ import { FunctionalIsFunctionProgrammer } from "./FunctionalIsFunctionProgrammer
|
|
|
12
12
|
import { FunctionalGeneralProgrammer } from "./internal/FunctionalGeneralProgrammer";
|
|
13
13
|
|
|
14
14
|
export namespace FunctionalIsReturnProgrammer {
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
FunctionalIsFunctionProgrammer.getReturnTypeNode(
|
|
39
|
-
declaration,
|
|
40
|
-
result.async,
|
|
41
|
-
),
|
|
42
|
-
undefined,
|
|
43
|
-
ts.factory.createBlock(result.statements, true),
|
|
44
|
-
),
|
|
45
|
-
),
|
|
46
|
-
],
|
|
47
|
-
true,
|
|
48
|
-
),
|
|
49
|
-
);
|
|
50
|
-
};
|
|
15
|
+
export interface IConfig {
|
|
16
|
+
equals: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface IProps {
|
|
19
|
+
context: ITypiaContext;
|
|
20
|
+
modulo: ts.LeftHandSideExpression;
|
|
21
|
+
config: IConfig;
|
|
22
|
+
declaration: ts.FunctionDeclaration;
|
|
23
|
+
expression: ts.Expression;
|
|
24
|
+
init?: ts.Expression | undefined;
|
|
25
|
+
}
|
|
26
|
+
export interface IDecomposeProps {
|
|
27
|
+
context: ITypiaContext;
|
|
28
|
+
modulo: ts.LeftHandSideExpression;
|
|
29
|
+
config: IConfig;
|
|
30
|
+
expression: ts.Expression;
|
|
31
|
+
declaration: ts.FunctionDeclaration;
|
|
32
|
+
}
|
|
33
|
+
export interface IDecomposeOutput {
|
|
34
|
+
async: boolean;
|
|
35
|
+
functions: ts.Statement[];
|
|
36
|
+
statements: ts.Statement[];
|
|
37
|
+
}
|
|
51
38
|
|
|
52
|
-
export const
|
|
53
|
-
(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
declaration: ts.FunctionDeclaration,
|
|
59
|
-
): {
|
|
60
|
-
async: boolean;
|
|
61
|
-
functions: ts.Statement[];
|
|
62
|
-
statements: ts.Statement[];
|
|
63
|
-
} => {
|
|
64
|
-
const { type, async } = FunctionalGeneralProgrammer.getReturnType(
|
|
65
|
-
project.checker,
|
|
66
|
-
)(declaration);
|
|
67
|
-
const caller: ts.CallExpression = ts.factory.createCallExpression(
|
|
68
|
-
expression,
|
|
69
|
-
undefined,
|
|
70
|
-
declaration.parameters.map((p) =>
|
|
71
|
-
ts.factory.createIdentifier(p.name.getText()),
|
|
72
|
-
),
|
|
73
|
-
);
|
|
74
|
-
const name: string = StringUtil.escapeDuplicate(
|
|
75
|
-
declaration.parameters.map((p) => p.name.getText()),
|
|
76
|
-
)("result");
|
|
77
|
-
return {
|
|
78
|
-
async,
|
|
79
|
-
functions: [
|
|
80
|
-
StatementFactory.constant(
|
|
81
|
-
"__is_return",
|
|
82
|
-
IsProgrammer.write(project)(modulo)(equals)(type),
|
|
83
|
-
),
|
|
84
|
-
],
|
|
85
|
-
statements: [
|
|
86
|
-
StatementFactory.constant(
|
|
87
|
-
name,
|
|
88
|
-
async ? ts.factory.createAwaitExpression(caller) : caller,
|
|
89
|
-
),
|
|
39
|
+
export const write = (props: IProps): ts.CallExpression => {
|
|
40
|
+
const result = decompose(props);
|
|
41
|
+
return ExpressionFactory.selfCall(
|
|
42
|
+
ts.factory.createBlock(
|
|
43
|
+
[
|
|
44
|
+
...result.functions,
|
|
90
45
|
ts.factory.createReturnStatement(
|
|
91
|
-
ts.factory.
|
|
92
|
-
|
|
93
|
-
ts.factory.
|
|
94
|
-
undefined,
|
|
95
|
-
[ts.factory.createIdentifier(name)],
|
|
96
|
-
),
|
|
46
|
+
ts.factory.createArrowFunction(
|
|
47
|
+
result.async
|
|
48
|
+
? [ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword)]
|
|
49
|
+
: undefined,
|
|
97
50
|
undefined,
|
|
98
|
-
|
|
51
|
+
props.declaration.parameters,
|
|
52
|
+
FunctionalIsFunctionProgrammer.getReturnTypeNode({
|
|
53
|
+
declaration: props.declaration,
|
|
54
|
+
async: result.async,
|
|
55
|
+
}),
|
|
99
56
|
undefined,
|
|
100
|
-
ts.factory.
|
|
57
|
+
ts.factory.createBlock(result.statements, true),
|
|
101
58
|
),
|
|
102
59
|
),
|
|
103
60
|
],
|
|
104
|
-
|
|
61
|
+
true,
|
|
62
|
+
),
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const decompose = (props: IDecomposeProps): IDecomposeOutput => {
|
|
67
|
+
const { type, async } = FunctionalGeneralProgrammer.getReturnType({
|
|
68
|
+
checker: props.context.checker,
|
|
69
|
+
declaration: props.declaration,
|
|
70
|
+
});
|
|
71
|
+
const caller: ts.CallExpression = ts.factory.createCallExpression(
|
|
72
|
+
props.expression,
|
|
73
|
+
undefined,
|
|
74
|
+
props.declaration.parameters.map((p) =>
|
|
75
|
+
ts.factory.createIdentifier(p.name.getText()),
|
|
76
|
+
),
|
|
77
|
+
);
|
|
78
|
+
const name: string = StringUtil.escapeDuplicate(
|
|
79
|
+
props.declaration.parameters.map((p) => p.name.getText()),
|
|
80
|
+
)("result");
|
|
81
|
+
return {
|
|
82
|
+
async,
|
|
83
|
+
functions: [
|
|
84
|
+
StatementFactory.constant(
|
|
85
|
+
"__is_return",
|
|
86
|
+
IsProgrammer.write({
|
|
87
|
+
...props,
|
|
88
|
+
type,
|
|
89
|
+
name: undefined,
|
|
90
|
+
init: undefined,
|
|
91
|
+
}),
|
|
92
|
+
),
|
|
93
|
+
],
|
|
94
|
+
statements: [
|
|
95
|
+
StatementFactory.constant(
|
|
96
|
+
name,
|
|
97
|
+
async ? ts.factory.createAwaitExpression(caller) : caller,
|
|
98
|
+
),
|
|
99
|
+
ts.factory.createReturnStatement(
|
|
100
|
+
ts.factory.createConditionalExpression(
|
|
101
|
+
ts.factory.createCallExpression(
|
|
102
|
+
ts.factory.createIdentifier("__is_return"),
|
|
103
|
+
undefined,
|
|
104
|
+
[ts.factory.createIdentifier(name)],
|
|
105
|
+
),
|
|
106
|
+
undefined,
|
|
107
|
+
ts.factory.createIdentifier(name),
|
|
108
|
+
undefined,
|
|
109
|
+
ts.factory.createNull(),
|
|
110
|
+
),
|
|
111
|
+
),
|
|
112
|
+
],
|
|
105
113
|
};
|
|
114
|
+
};
|
|
106
115
|
}
|
|
@@ -3,52 +3,52 @@ import ts from "typescript";
|
|
|
3
3
|
import { ExpressionFactory } from "../../factories/ExpressionFactory";
|
|
4
4
|
import { IdentifierFactory } from "../../factories/IdentifierFactory";
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { ITypiaContext } from "../../transformers/ITypiaContext";
|
|
7
7
|
|
|
8
8
|
import { FunctionalValidateParametersProgrammer } from "./FunctionalValidateParametersProgrammer";
|
|
9
9
|
import { FunctionalValidateReturnProgrammer } from "./FunctionalValidateReturnProgrammer";
|
|
10
10
|
|
|
11
11
|
export namespace FunctionalValidateFunctionProgrammer {
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
),
|
|
12
|
+
export interface IConfig {
|
|
13
|
+
equals: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface IProps {
|
|
16
|
+
context: ITypiaContext;
|
|
17
|
+
modulo: ts.LeftHandSideExpression;
|
|
18
|
+
config: IConfig;
|
|
19
|
+
declaration: ts.FunctionDeclaration;
|
|
20
|
+
expression: ts.Expression;
|
|
21
|
+
init?: ts.Expression | undefined;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const write = (props: IProps): ts.CallExpression => {
|
|
25
|
+
const p = FunctionalValidateParametersProgrammer.decompose(props);
|
|
26
|
+
const r = FunctionalValidateReturnProgrammer.decompose(props);
|
|
27
|
+
return ExpressionFactory.selfCall(
|
|
28
|
+
ts.factory.createBlock(
|
|
29
|
+
[
|
|
30
|
+
...p.functions,
|
|
31
|
+
...r.functions,
|
|
32
|
+
ts.factory.createReturnStatement(
|
|
33
|
+
ts.factory.createArrowFunction(
|
|
34
|
+
r.async
|
|
35
|
+
? [ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword)]
|
|
36
|
+
: undefined,
|
|
37
|
+
undefined,
|
|
38
|
+
props.declaration.parameters,
|
|
39
|
+
getReturnTypeNode({
|
|
40
|
+
declaration: props.declaration,
|
|
41
|
+
async: r.async,
|
|
42
|
+
}),
|
|
43
|
+
undefined,
|
|
44
|
+
ts.factory.createBlock([...p.statements, ...r.statements], true),
|
|
46
45
|
),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
)
|
|
51
|
-
|
|
46
|
+
),
|
|
47
|
+
],
|
|
48
|
+
true,
|
|
49
|
+
),
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
52
|
|
|
53
53
|
export const hookErrors = (props: {
|
|
54
54
|
expression: ts.Expression;
|
|
@@ -90,13 +90,13 @@ export namespace FunctionalValidateFunctionProgrammer {
|
|
|
90
90
|
],
|
|
91
91
|
);
|
|
92
92
|
|
|
93
|
-
export const getReturnTypeNode = (
|
|
94
|
-
declaration: ts.FunctionDeclaration
|
|
95
|
-
async: boolean
|
|
96
|
-
): ts.TypeNode | undefined =>
|
|
97
|
-
declaration.type
|
|
98
|
-
? async
|
|
99
|
-
? !!(declaration.type! as ts.TypeReferenceNode).typeArguments?.[0]
|
|
93
|
+
export const getReturnTypeNode = (props: {
|
|
94
|
+
declaration: ts.FunctionDeclaration;
|
|
95
|
+
async: boolean;
|
|
96
|
+
}): ts.TypeNode | undefined =>
|
|
97
|
+
props.declaration.type
|
|
98
|
+
? props.async
|
|
99
|
+
? !!(props.declaration.type! as ts.TypeReferenceNode).typeArguments?.[0]
|
|
100
100
|
? ts.factory.createTypeReferenceNode("Promise", [
|
|
101
101
|
ts.factory.createImportTypeNode(
|
|
102
102
|
ts.factory.createLiteralTypeNode(
|
|
@@ -105,7 +105,7 @@ export namespace FunctionalValidateFunctionProgrammer {
|
|
|
105
105
|
undefined,
|
|
106
106
|
ts.factory.createIdentifier("IValidation"),
|
|
107
107
|
[
|
|
108
|
-
(declaration.type! as ts.TypeReferenceNode)
|
|
108
|
+
(props.declaration.type! as ts.TypeReferenceNode)
|
|
109
109
|
.typeArguments![0]!,
|
|
110
110
|
],
|
|
111
111
|
),
|
|
@@ -117,7 +117,7 @@ export namespace FunctionalValidateFunctionProgrammer {
|
|
|
117
117
|
),
|
|
118
118
|
undefined,
|
|
119
119
|
ts.factory.createIdentifier("IValidation"),
|
|
120
|
-
[declaration.type],
|
|
120
|
+
[props.declaration.type],
|
|
121
121
|
)
|
|
122
122
|
: undefined;
|
|
123
123
|
}
|