typia 15.0.1 → 15.1.0
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/TypeGuardError.d.ts +20 -4
- package/lib/TypeGuardError.mjs.map +1 -1
- package/lib/basic.d.ts +787 -0
- package/lib/basic.js +104 -0
- package/lib/basic.js.map +1 -0
- package/lib/basic.mjs +86 -0
- package/lib/basic.mjs.map +1 -0
- package/lib/compare.d.ts +21 -0
- package/lib/compare.js.map +1 -1
- package/lib/compare.mjs.map +1 -1
- package/lib/functional.d.ts +42 -0
- package/lib/functional.js.map +1 -1
- package/lib/functional.mjs.map +1 -1
- package/lib/http.d.ts +75 -0
- package/lib/http.js.map +1 -1
- package/lib/http.mjs.map +1 -1
- package/lib/index.mjs +2 -1
- package/lib/index.mjs.map +1 -1
- package/lib/internal/_IProtobufWriter.d.ts +115 -0
- package/lib/internal/_ProtobufReader.d.ts +159 -1
- package/lib/internal/_ProtobufReader.js +159 -1
- package/lib/internal/_ProtobufReader.js.map +1 -1
- package/lib/internal/_ProtobufReader.mjs +159 -1
- package/lib/internal/_ProtobufReader.mjs.map +1 -1
- package/lib/internal/_ProtobufSizer.d.ts +135 -4
- package/lib/internal/_ProtobufSizer.js +134 -2
- package/lib/internal/_ProtobufSizer.js.map +1 -1
- package/lib/internal/_ProtobufSizer.mjs +133 -2
- package/lib/internal/_ProtobufSizer.mjs.map +1 -1
- package/lib/internal/_ProtobufWriter.d.ts +151 -0
- package/lib/internal/_ProtobufWriter.js +154 -1
- package/lib/internal/_ProtobufWriter.js.map +1 -1
- package/lib/internal/_ProtobufWriter.mjs +153 -2
- package/lib/internal/_ProtobufWriter.mjs.map +1 -1
- package/lib/internal/_accessExpressionAsString.d.ts +11 -0
- package/lib/internal/_accessExpressionAsString.js +11 -0
- package/lib/internal/_accessExpressionAsString.js.map +1 -1
- package/lib/internal/_accessExpressionAsString.mjs +11 -0
- package/lib/internal/_accessExpressionAsString.mjs.map +1 -1
- package/lib/internal/_assertGuard.d.ts +12 -0
- package/lib/internal/_assertGuard.js +12 -0
- package/lib/internal/_assertGuard.js.map +1 -1
- package/lib/internal/_assertGuard.mjs +12 -0
- package/lib/internal/_assertGuard.mjs.map +1 -1
- package/lib/internal/_coerceLlmArguments.d.ts +10 -0
- package/lib/internal/_coerceLlmArguments.js +10 -0
- package/lib/internal/_coerceLlmArguments.js.map +1 -1
- package/lib/internal/_coerceLlmArguments.mjs +10 -0
- package/lib/internal/_coerceLlmArguments.mjs.map +1 -1
- package/lib/internal/_createLlmEvaluation.js +9 -46
- package/lib/internal/_createLlmEvaluation.js.map +1 -1
- package/lib/internal/_createLlmEvaluation.mjs +7 -35
- package/lib/internal/_createLlmEvaluation.mjs.map +1 -1
- package/lib/internal/_createStandardSchema.d.ts +13 -0
- package/lib/internal/_createStandardSchema.js +13 -0
- package/lib/internal/_createStandardSchema.js.map +1 -1
- package/lib/internal/_createStandardSchema.mjs +13 -0
- package/lib/internal/_createStandardSchema.mjs.map +1 -1
- package/lib/internal/_decimal.d.ts +75 -0
- package/lib/internal/_decimal.js +55 -0
- package/lib/internal/_decimal.js.map +1 -1
- package/lib/internal/_decimal.mjs +55 -0
- package/lib/internal/_decimal.mjs.map +1 -1
- package/lib/internal/_functionalTypeGuardErrorFactory.d.ts +8 -0
- package/lib/internal/_functionalTypeGuardErrorFactory.js +8 -0
- package/lib/internal/_functionalTypeGuardErrorFactory.js.map +1 -1
- package/lib/internal/_functionalTypeGuardErrorFactory.mjs +8 -0
- package/lib/internal/_functionalTypeGuardErrorFactory.mjs.map +1 -1
- package/lib/internal/_httpFormDataReadArray.d.ts +9 -0
- package/lib/internal/_httpFormDataReadArray.js +9 -0
- package/lib/internal/_httpFormDataReadArray.js.map +1 -1
- package/lib/internal/_httpFormDataReadArray.mjs +9 -0
- package/lib/internal/_httpFormDataReadArray.mjs.map +1 -1
- package/lib/internal/_httpFormDataReadBigint.d.ts +12 -0
- package/lib/internal/_httpFormDataReadBigint.js +12 -0
- package/lib/internal/_httpFormDataReadBigint.js.map +1 -1
- package/lib/internal/_httpFormDataReadBigint.mjs +12 -0
- package/lib/internal/_httpFormDataReadBigint.mjs.map +1 -1
- package/lib/internal/_httpFormDataReadBlob.d.ts +11 -0
- package/lib/internal/_httpFormDataReadBlob.js +11 -0
- package/lib/internal/_httpFormDataReadBlob.js.map +1 -1
- package/lib/internal/_httpFormDataReadBlob.mjs +11 -0
- package/lib/internal/_httpFormDataReadBlob.mjs.map +1 -1
- package/lib/internal/_httpFormDataReadBoolean.d.ts +11 -0
- package/lib/internal/_httpFormDataReadBoolean.js +11 -0
- package/lib/internal/_httpFormDataReadBoolean.js.map +1 -1
- package/lib/internal/_httpFormDataReadBoolean.mjs +11 -0
- package/lib/internal/_httpFormDataReadBoolean.mjs.map +1 -1
- package/lib/internal/_httpFormDataReadFile.d.ts +11 -0
- package/lib/internal/_httpFormDataReadFile.js +11 -0
- package/lib/internal/_httpFormDataReadFile.js.map +1 -1
- package/lib/internal/_httpFormDataReadFile.mjs +11 -0
- package/lib/internal/_httpFormDataReadFile.mjs.map +1 -1
- package/lib/internal/_httpFormDataReadNumber.d.ts +11 -0
- package/lib/internal/_httpFormDataReadNumber.js +11 -0
- package/lib/internal/_httpFormDataReadNumber.js.map +1 -1
- package/lib/internal/_httpFormDataReadNumber.mjs +11 -0
- package/lib/internal/_httpFormDataReadNumber.mjs.map +1 -1
- package/lib/internal/_httpFormDataReadString.d.ts +5 -0
- package/lib/internal/_httpFormDataReadString.js +5 -0
- package/lib/internal/_httpFormDataReadString.js.map +1 -1
- package/lib/internal/_httpFormDataReadString.mjs +5 -0
- package/lib/internal/_httpFormDataReadString.mjs.map +1 -1
- package/lib/internal/_httpHeaderReadBigint.d.ts +11 -0
- package/lib/internal/_httpHeaderReadBigint.js +11 -0
- package/lib/internal/_httpHeaderReadBigint.js.map +1 -1
- package/lib/internal/_httpHeaderReadBigint.mjs +11 -0
- package/lib/internal/_httpHeaderReadBigint.mjs.map +1 -1
- package/lib/internal/_httpHeaderReadBoolean.d.ts +12 -0
- package/lib/internal/_httpHeaderReadBoolean.js +12 -0
- package/lib/internal/_httpHeaderReadBoolean.js.map +1 -1
- package/lib/internal/_httpHeaderReadBoolean.mjs +12 -0
- package/lib/internal/_httpHeaderReadBoolean.mjs.map +1 -1
- package/lib/internal/_httpHeaderReadNumber.d.ts +11 -0
- package/lib/internal/_httpHeaderReadNumber.js +11 -0
- package/lib/internal/_httpHeaderReadNumber.js.map +1 -1
- package/lib/internal/_httpHeaderReadNumber.mjs +11 -0
- package/lib/internal/_httpHeaderReadNumber.mjs.map +1 -1
- package/lib/internal/_httpParameterReadBigint.d.ts +11 -0
- package/lib/internal/_httpParameterReadBigint.js +11 -0
- package/lib/internal/_httpParameterReadBigint.js.map +1 -1
- package/lib/internal/_httpParameterReadBigint.mjs +11 -0
- package/lib/internal/_httpParameterReadBigint.mjs.map +1 -1
- package/lib/internal/_httpParameterReadBoolean.d.ts +11 -0
- package/lib/internal/_httpParameterReadBoolean.js +11 -0
- package/lib/internal/_httpParameterReadBoolean.js.map +1 -1
- package/lib/internal/_httpParameterReadBoolean.mjs +11 -0
- package/lib/internal/_httpParameterReadBoolean.mjs.map +1 -1
- package/lib/internal/_httpParameterReadNumber.d.ts +11 -0
- package/lib/internal/_httpParameterReadNumber.js +11 -0
- package/lib/internal/_httpParameterReadNumber.js.map +1 -1
- package/lib/internal/_httpParameterReadNumber.mjs +11 -0
- package/lib/internal/_httpParameterReadNumber.mjs.map +1 -1
- package/lib/internal/_httpParameterReadString.d.ts +5 -0
- package/lib/internal/_httpParameterReadString.js +5 -0
- package/lib/internal/_httpParameterReadString.js.map +1 -1
- package/lib/internal/_httpParameterReadString.mjs +5 -0
- package/lib/internal/_httpParameterReadString.mjs.map +1 -1
- package/lib/internal/_httpQueryParseURLSearchParams.d.ts +14 -0
- package/lib/internal/_httpQueryParseURLSearchParams.js +14 -0
- package/lib/internal/_httpQueryParseURLSearchParams.js.map +1 -1
- package/lib/internal/_httpQueryParseURLSearchParams.mjs +14 -0
- package/lib/internal/_httpQueryParseURLSearchParams.mjs.map +1 -1
- package/lib/internal/_httpQueryReadArray.d.ts +9 -0
- package/lib/internal/_httpQueryReadArray.js +9 -0
- package/lib/internal/_httpQueryReadArray.js.map +1 -1
- package/lib/internal/_httpQueryReadArray.mjs +9 -0
- package/lib/internal/_httpQueryReadArray.mjs.map +1 -1
- package/lib/internal/_httpQueryReadBigint.d.ts +11 -0
- package/lib/internal/_httpQueryReadBigint.js +11 -0
- package/lib/internal/_httpQueryReadBigint.js.map +1 -1
- package/lib/internal/_httpQueryReadBigint.mjs +11 -0
- package/lib/internal/_httpQueryReadBigint.mjs.map +1 -1
- package/lib/internal/_httpQueryReadBoolean.d.ts +12 -0
- package/lib/internal/_httpQueryReadBoolean.js +12 -0
- package/lib/internal/_httpQueryReadBoolean.js.map +1 -1
- package/lib/internal/_httpQueryReadBoolean.mjs +12 -0
- package/lib/internal/_httpQueryReadBoolean.mjs.map +1 -1
- package/lib/internal/_httpQueryReadNumber.d.ts +11 -0
- package/lib/internal/_httpQueryReadNumber.js +11 -0
- package/lib/internal/_httpQueryReadNumber.js.map +1 -1
- package/lib/internal/_httpQueryReadNumber.mjs +11 -0
- package/lib/internal/_httpQueryReadNumber.mjs.map +1 -1
- package/lib/internal/_httpQueryReadString.d.ts +5 -0
- package/lib/internal/_httpQueryReadString.js +5 -0
- package/lib/internal/_httpQueryReadString.js.map +1 -1
- package/lib/internal/_httpQueryReadString.mjs +5 -0
- package/lib/internal/_httpQueryReadString.mjs.map +1 -1
- package/lib/internal/_isBetween.d.ts +8 -0
- package/lib/internal/_isBetween.js +8 -0
- package/lib/internal/_isBetween.js.map +1 -1
- package/lib/internal/_isBetween.mjs +8 -0
- package/lib/internal/_isBetween.mjs.map +1 -1
- package/lib/internal/_isBigintString.d.ts +11 -0
- package/lib/internal/_isBigintString.js +11 -0
- package/lib/internal/_isBigintString.js.map +1 -1
- package/lib/internal/_isBigintString.mjs +11 -0
- package/lib/internal/_isBigintString.mjs.map +1 -1
- package/lib/internal/_isFormatByte.d.ts +12 -0
- package/lib/internal/_isFormatByte.js +12 -0
- package/lib/internal/_isFormatByte.js.map +1 -1
- package/lib/internal/_isFormatByte.mjs +12 -0
- package/lib/internal/_isFormatByte.mjs.map +1 -1
- package/lib/internal/_isFormatDate.d.ts +11 -0
- package/lib/internal/_isFormatDate.js +11 -0
- package/lib/internal/_isFormatDate.js.map +1 -1
- package/lib/internal/_isFormatDate.mjs +11 -0
- package/lib/internal/_isFormatDate.mjs.map +1 -1
- package/lib/internal/_isFormatDateTime.d.ts +13 -0
- package/lib/internal/_isFormatDateTime.js +13 -0
- package/lib/internal/_isFormatDateTime.js.map +1 -1
- package/lib/internal/_isFormatDateTime.mjs +13 -0
- package/lib/internal/_isFormatDateTime.mjs.map +1 -1
- package/lib/internal/_isFormatDuration.d.ts +13 -0
- package/lib/internal/_isFormatDuration.js +13 -0
- package/lib/internal/_isFormatDuration.js.map +1 -1
- package/lib/internal/_isFormatDuration.mjs +13 -0
- package/lib/internal/_isFormatDuration.mjs.map +1 -1
- package/lib/internal/_isFormatEmail.d.ts +13 -0
- package/lib/internal/_isFormatEmail.js +13 -0
- package/lib/internal/_isFormatEmail.js.map +1 -1
- package/lib/internal/_isFormatEmail.mjs +13 -0
- package/lib/internal/_isFormatEmail.mjs.map +1 -1
- package/lib/internal/_isFormatHostname.d.ts +12 -0
- package/lib/internal/_isFormatHostname.js +12 -0
- package/lib/internal/_isFormatHostname.js.map +1 -1
- package/lib/internal/_isFormatHostname.mjs +12 -0
- package/lib/internal/_isFormatHostname.mjs.map +1 -1
- package/lib/internal/_isFormatIdnEmail.d.ts +14 -0
- package/lib/internal/_isFormatIdnEmail.js +14 -0
- package/lib/internal/_isFormatIdnEmail.js.map +1 -1
- package/lib/internal/_isFormatIdnEmail.mjs +14 -0
- package/lib/internal/_isFormatIdnEmail.mjs.map +1 -1
- package/lib/internal/_isFormatIdnHostname.d.ts +14 -0
- package/lib/internal/_isFormatIdnHostname.js +14 -0
- package/lib/internal/_isFormatIdnHostname.js.map +1 -1
- package/lib/internal/_isFormatIdnHostname.mjs +14 -0
- package/lib/internal/_isFormatIdnHostname.mjs.map +1 -1
- package/lib/internal/_isFormatIpv4.d.ts +11 -0
- package/lib/internal/_isFormatIpv4.js +11 -0
- package/lib/internal/_isFormatIpv4.js.map +1 -1
- package/lib/internal/_isFormatIpv4.mjs +11 -0
- package/lib/internal/_isFormatIpv4.mjs.map +1 -1
- package/lib/internal/_isFormatIpv6.d.ts +12 -0
- package/lib/internal/_isFormatIpv6.js +12 -0
- package/lib/internal/_isFormatIpv6.js.map +1 -1
- package/lib/internal/_isFormatIpv6.mjs +12 -0
- package/lib/internal/_isFormatIpv6.mjs.map +1 -1
- package/lib/internal/_isFormatIri.d.ts +11 -0
- package/lib/internal/_isFormatIri.js +11 -0
- package/lib/internal/_isFormatIri.js.map +1 -1
- package/lib/internal/_isFormatIri.mjs +11 -0
- package/lib/internal/_isFormatIri.mjs.map +1 -1
- package/lib/internal/_isFormatIriReference.d.ts +13 -0
- package/lib/internal/_isFormatIriReference.js +13 -0
- package/lib/internal/_isFormatIriReference.js.map +1 -1
- package/lib/internal/_isFormatIriReference.mjs +13 -0
- package/lib/internal/_isFormatIriReference.mjs.map +1 -1
- package/lib/internal/_isFormatJsonPointer.d.ts +11 -0
- package/lib/internal/_isFormatJsonPointer.js +11 -0
- package/lib/internal/_isFormatJsonPointer.js.map +1 -1
- package/lib/internal/_isFormatJsonPointer.mjs +11 -0
- package/lib/internal/_isFormatJsonPointer.mjs.map +1 -1
- package/lib/internal/_isFormatPassword.d.ts +11 -0
- package/lib/internal/_isFormatPassword.js +11 -0
- package/lib/internal/_isFormatPassword.js.map +1 -1
- package/lib/internal/_isFormatPassword.mjs +11 -0
- package/lib/internal/_isFormatPassword.mjs.map +1 -1
- package/lib/internal/_isFormatRegex.d.ts +11 -0
- package/lib/internal/_isFormatRegex.js +11 -0
- package/lib/internal/_isFormatRegex.js.map +1 -1
- package/lib/internal/_isFormatRegex.mjs +11 -0
- package/lib/internal/_isFormatRegex.mjs.map +1 -1
- package/lib/internal/_isFormatRelativeJsonPointer.d.ts +11 -0
- package/lib/internal/_isFormatRelativeJsonPointer.js +11 -0
- package/lib/internal/_isFormatRelativeJsonPointer.js.map +1 -1
- package/lib/internal/_isFormatRelativeJsonPointer.mjs +11 -0
- package/lib/internal/_isFormatRelativeJsonPointer.mjs.map +1 -1
- package/lib/internal/_isFormatTime.d.ts +12 -0
- package/lib/internal/_isFormatTime.js +12 -0
- package/lib/internal/_isFormatTime.js.map +1 -1
- package/lib/internal/_isFormatTime.mjs +12 -0
- package/lib/internal/_isFormatTime.mjs.map +1 -1
- package/lib/internal/_isFormatUri.d.ts +15 -0
- package/lib/internal/_isFormatUri.js +15 -0
- package/lib/internal/_isFormatUri.js.map +1 -1
- package/lib/internal/_isFormatUri.mjs +15 -0
- package/lib/internal/_isFormatUri.mjs.map +1 -1
- package/lib/internal/_isFormatUriReference.d.ts +11 -0
- package/lib/internal/_isFormatUriReference.js +11 -0
- package/lib/internal/_isFormatUriReference.js.map +1 -1
- package/lib/internal/_isFormatUriReference.mjs +11 -0
- package/lib/internal/_isFormatUriReference.mjs.map +1 -1
- package/lib/internal/_isFormatUriTemplate.d.ts +13 -0
- package/lib/internal/_isFormatUriTemplate.js +14 -1
- package/lib/internal/_isFormatUriTemplate.js.map +1 -1
- package/lib/internal/_isFormatUriTemplate.mjs +14 -1
- package/lib/internal/_isFormatUriTemplate.mjs.map +1 -1
- package/lib/internal/_isFormatUrl.d.ts +15 -0
- package/lib/internal/_isFormatUrl.js +15 -0
- package/lib/internal/_isFormatUrl.js.map +1 -1
- package/lib/internal/_isFormatUrl.mjs +15 -0
- package/lib/internal/_isFormatUrl.mjs.map +1 -1
- package/lib/internal/_isFormatUuid.d.ts +11 -0
- package/lib/internal/_isFormatUuid.js +11 -0
- package/lib/internal/_isFormatUuid.js.map +1 -1
- package/lib/internal/_isFormatUuid.mjs +11 -0
- package/lib/internal/_isFormatUuid.mjs.map +1 -1
- package/lib/internal/_isMultipleOf.d.ts +11 -0
- package/lib/internal/_isMultipleOf.js +11 -0
- package/lib/internal/_isMultipleOf.js.map +1 -1
- package/lib/internal/_isMultipleOf.mjs +11 -0
- package/lib/internal/_isMultipleOf.mjs.map +1 -1
- package/lib/internal/_isTypeFloat.d.ts +9 -0
- package/lib/internal/_isTypeFloat.js +9 -0
- package/lib/internal/_isTypeFloat.js.map +1 -1
- package/lib/internal/_isTypeFloat.mjs +9 -0
- package/lib/internal/_isTypeFloat.mjs.map +1 -1
- package/lib/internal/_isTypeInt16.d.ts +8 -0
- package/lib/internal/_isTypeInt16.js +8 -0
- package/lib/internal/_isTypeInt16.js.map +1 -1
- package/lib/internal/_isTypeInt16.mjs +8 -0
- package/lib/internal/_isTypeInt16.mjs.map +1 -1
- package/lib/internal/_isTypeInt32.d.ts +8 -0
- package/lib/internal/_isTypeInt32.js +8 -0
- package/lib/internal/_isTypeInt32.js.map +1 -1
- package/lib/internal/_isTypeInt32.mjs +8 -0
- package/lib/internal/_isTypeInt32.mjs.map +1 -1
- package/lib/internal/_isTypeInt64.d.ts +11 -0
- package/lib/internal/_isTypeInt64.js +11 -0
- package/lib/internal/_isTypeInt64.js.map +1 -1
- package/lib/internal/_isTypeInt64.mjs +11 -0
- package/lib/internal/_isTypeInt64.mjs.map +1 -1
- package/lib/internal/_isTypeInt64Bigint.d.ts +8 -0
- package/lib/internal/_isTypeInt64Bigint.js +8 -0
- package/lib/internal/_isTypeInt64Bigint.js.map +1 -1
- package/lib/internal/_isTypeInt64Bigint.mjs +8 -0
- package/lib/internal/_isTypeInt64Bigint.mjs.map +1 -1
- package/lib/internal/_isTypeInt8.d.ts +8 -0
- package/lib/internal/_isTypeInt8.js +8 -0
- package/lib/internal/_isTypeInt8.js.map +1 -1
- package/lib/internal/_isTypeInt8.mjs +8 -0
- package/lib/internal/_isTypeInt8.mjs.map +1 -1
- package/lib/internal/_isTypeUint16.d.ts +8 -0
- package/lib/internal/_isTypeUint16.js +8 -0
- package/lib/internal/_isTypeUint16.js.map +1 -1
- package/lib/internal/_isTypeUint16.mjs +8 -0
- package/lib/internal/_isTypeUint16.mjs.map +1 -1
- package/lib/internal/_isTypeUint32.d.ts +8 -0
- package/lib/internal/_isTypeUint32.js +8 -0
- package/lib/internal/_isTypeUint32.js.map +1 -1
- package/lib/internal/_isTypeUint32.mjs +8 -0
- package/lib/internal/_isTypeUint32.mjs.map +1 -1
- package/lib/internal/_isTypeUint64.d.ts +11 -0
- package/lib/internal/_isTypeUint64.js +11 -0
- package/lib/internal/_isTypeUint64.js.map +1 -1
- package/lib/internal/_isTypeUint64.mjs +11 -0
- package/lib/internal/_isTypeUint64.mjs.map +1 -1
- package/lib/internal/_isTypeUint64Bigint.d.ts +8 -0
- package/lib/internal/_isTypeUint64Bigint.js +8 -0
- package/lib/internal/_isTypeUint64Bigint.js.map +1 -1
- package/lib/internal/_isTypeUint64Bigint.mjs +8 -0
- package/lib/internal/_isTypeUint64Bigint.mjs.map +1 -1
- package/lib/internal/_isTypeUint8.d.ts +8 -0
- package/lib/internal/_isTypeUint8.js +8 -0
- package/lib/internal/_isTypeUint8.js.map +1 -1
- package/lib/internal/_isTypeUint8.mjs +8 -0
- package/lib/internal/_isTypeUint8.mjs.map +1 -1
- package/lib/internal/_isUniqueItems.d.ts +17 -0
- package/lib/internal/_isUniqueItems.js +58 -0
- package/lib/internal/_isUniqueItems.js.map +1 -1
- package/lib/internal/_isUniqueItems.mjs +41 -0
- package/lib/internal/_isUniqueItems.mjs.map +1 -1
- package/lib/internal/_jsonStringifyArray.js +2 -0
- package/lib/internal/_jsonStringifyArray.js.map +1 -1
- package/lib/internal/_jsonStringifyArray.mjs +2 -0
- package/lib/internal/_jsonStringifyArray.mjs.map +1 -1
- package/lib/internal/_jsonStringifyElement.js +2 -0
- package/lib/internal/_jsonStringifyElement.js.map +1 -1
- package/lib/internal/_jsonStringifyElement.mjs +2 -0
- package/lib/internal/_jsonStringifyElement.mjs.map +1 -1
- package/lib/internal/_jsonStringifyNumber.d.ts +9 -0
- package/lib/internal/_jsonStringifyNumber.js +9 -0
- package/lib/internal/_jsonStringifyNumber.js.map +1 -1
- package/lib/internal/_jsonStringifyNumber.mjs +9 -0
- package/lib/internal/_jsonStringifyNumber.mjs.map +1 -1
- package/lib/internal/_jsonStringifyProperty.js +3 -1
- package/lib/internal/_jsonStringifyProperty.js.map +1 -1
- package/lib/internal/_jsonStringifyProperty.mjs +3 -1
- package/lib/internal/_jsonStringifyProperty.mjs.map +1 -1
- package/lib/internal/_jsonStringifyRest.d.ts +11 -0
- package/lib/internal/_jsonStringifyRest.js +11 -0
- package/lib/internal/_jsonStringifyRest.js.map +1 -1
- package/lib/internal/_jsonStringifyRest.mjs +11 -0
- package/lib/internal/_jsonStringifyRest.mjs.map +1 -1
- package/lib/internal/_jsonStringifyString.d.ts +13 -0
- package/lib/internal/_jsonStringifyString.js +13 -0
- package/lib/internal/_jsonStringifyString.js.map +1 -1
- package/lib/internal/_jsonStringifyString.mjs +13 -0
- package/lib/internal/_jsonStringifyString.mjs.map +1 -1
- package/lib/internal/_jsonStringifyTail.d.ts +8 -0
- package/lib/internal/_jsonStringifyTail.js +8 -0
- package/lib/internal/_jsonStringifyTail.js.map +1 -1
- package/lib/internal/_jsonStringifyTail.mjs +8 -0
- package/lib/internal/_jsonStringifyTail.mjs.map +1 -1
- package/lib/internal/_llmApplicationFinalize.d.ts +13 -0
- package/lib/internal/_llmApplicationFinalize.js +13 -0
- package/lib/internal/_llmApplicationFinalize.js.map +1 -1
- package/lib/internal/_llmApplicationFinalize.mjs +13 -0
- package/lib/internal/_llmApplicationFinalize.mjs.map +1 -1
- package/lib/internal/_notationAny.d.ts +14 -0
- package/lib/internal/_notationAny.js +14 -0
- package/lib/internal/_notationAny.js.map +1 -1
- package/lib/internal/_notationAny.mjs +14 -0
- package/lib/internal/_notationAny.mjs.map +1 -1
- package/lib/internal/_notationAssign.d.ts +12 -0
- package/lib/internal/_notationAssign.js +12 -0
- package/lib/internal/_notationAssign.js.map +1 -1
- package/lib/internal/_notationAssign.mjs +12 -0
- package/lib/internal/_notationAssign.mjs.map +1 -1
- package/lib/internal/_notationKebab.d.ts +9 -0
- package/lib/internal/_notationKebab.js +9 -0
- package/lib/internal/_notationKebab.js.map +1 -1
- package/lib/internal/_notationKebab.mjs +9 -0
- package/lib/internal/_notationKebab.mjs.map +1 -1
- package/lib/internal/_notationKeyCollision.d.ts +8 -0
- package/lib/internal/_notationKeyCollision.js +8 -0
- package/lib/internal/_notationKeyCollision.js.map +1 -1
- package/lib/internal/_notationKeyCollision.mjs +8 -0
- package/lib/internal/_notationKeyCollision.mjs.map +1 -1
- package/lib/internal/_notationSnake.d.ts +12 -0
- package/lib/internal/_notationSnake.js +12 -0
- package/lib/internal/_notationSnake.js.map +1 -1
- package/lib/internal/_notationSnake.mjs +12 -0
- package/lib/internal/_notationSnake.mjs.map +1 -1
- package/lib/internal/_parseLlmArguments.d.ts +12 -0
- package/lib/internal/_parseLlmArguments.js +12 -0
- package/lib/internal/_parseLlmArguments.js.map +1 -1
- package/lib/internal/_parseLlmArguments.mjs +12 -0
- package/lib/internal/_parseLlmArguments.mjs.map +1 -1
- package/lib/internal/_plainCloneAny.d.ts +15 -0
- package/lib/internal/_plainCloneAny.js +15 -0
- package/lib/internal/_plainCloneAny.js.map +1 -1
- package/lib/internal/_plainCloneAny.mjs +15 -0
- package/lib/internal/_plainCloneAny.mjs.map +1 -1
- package/lib/internal/_randomArray.d.ts +19 -1
- package/lib/internal/_randomArray.js +32 -14
- package/lib/internal/_randomArray.js.map +1 -1
- package/lib/internal/_randomArray.mjs +24 -6
- package/lib/internal/_randomArray.mjs.map +1 -1
- package/lib/internal/_randomBigint.d.ts +5 -0
- package/lib/internal/_randomBigint.js +5 -0
- package/lib/internal/_randomBigint.js.map +1 -1
- package/lib/internal/_randomBigint.mjs +5 -0
- package/lib/internal/_randomBigint.mjs.map +1 -1
- package/lib/internal/_randomBoolean.d.ts +8 -0
- package/lib/internal/_randomBoolean.js +8 -0
- package/lib/internal/_randomBoolean.js.map +1 -1
- package/lib/internal/_randomBoolean.mjs +8 -0
- package/lib/internal/_randomBoolean.mjs.map +1 -1
- package/lib/internal/_randomFormatByte.d.ts +8 -0
- package/lib/internal/_randomFormatByte.js +8 -0
- package/lib/internal/_randomFormatByte.js.map +1 -1
- package/lib/internal/_randomFormatByte.mjs +8 -0
- package/lib/internal/_randomFormatByte.mjs.map +1 -1
- package/lib/internal/_randomFormatDate.d.ts +10 -0
- package/lib/internal/_randomFormatDate.js +10 -0
- package/lib/internal/_randomFormatDate.js.map +1 -1
- package/lib/internal/_randomFormatDate.mjs +10 -0
- package/lib/internal/_randomFormatDate.mjs.map +1 -1
- package/lib/internal/_randomFormatDatetime.d.ts +10 -0
- package/lib/internal/_randomFormatDatetime.js +10 -0
- package/lib/internal/_randomFormatDatetime.js.map +1 -1
- package/lib/internal/_randomFormatDatetime.mjs +10 -0
- package/lib/internal/_randomFormatDatetime.mjs.map +1 -1
- package/lib/internal/_randomFormatDuration.d.ts +8 -0
- package/lib/internal/_randomFormatDuration.js +8 -0
- package/lib/internal/_randomFormatDuration.js.map +1 -1
- package/lib/internal/_randomFormatDuration.mjs +8 -0
- package/lib/internal/_randomFormatDuration.mjs.map +1 -1
- package/lib/internal/_randomFormatEmail.d.ts +8 -0
- package/lib/internal/_randomFormatEmail.js +8 -0
- package/lib/internal/_randomFormatEmail.js.map +1 -1
- package/lib/internal/_randomFormatEmail.mjs +8 -0
- package/lib/internal/_randomFormatEmail.mjs.map +1 -1
- package/lib/internal/_randomFormatHostname.d.ts +15 -1
- package/lib/internal/_randomFormatHostname.js +15 -1
- package/lib/internal/_randomFormatHostname.js.map +1 -1
- package/lib/internal/_randomFormatHostname.mjs +15 -1
- package/lib/internal/_randomFormatHostname.mjs.map +1 -1
- package/lib/internal/_randomFormatIdnEmail.d.ts +13 -0
- package/lib/internal/_randomFormatIdnEmail.js +13 -0
- package/lib/internal/_randomFormatIdnEmail.js.map +1 -1
- package/lib/internal/_randomFormatIdnEmail.mjs +13 -0
- package/lib/internal/_randomFormatIdnEmail.mjs.map +1 -1
- package/lib/internal/_randomFormatIdnHostname.d.ts +12 -0
- package/lib/internal/_randomFormatIdnHostname.js +12 -0
- package/lib/internal/_randomFormatIdnHostname.js.map +1 -1
- package/lib/internal/_randomFormatIdnHostname.mjs +12 -0
- package/lib/internal/_randomFormatIdnHostname.mjs.map +1 -1
- package/lib/internal/_randomFormatIpv4.d.ts +8 -0
- package/lib/internal/_randomFormatIpv4.js +8 -0
- package/lib/internal/_randomFormatIpv4.js.map +1 -1
- package/lib/internal/_randomFormatIpv4.mjs +8 -0
- package/lib/internal/_randomFormatIpv4.mjs.map +1 -1
- package/lib/internal/_randomFormatIpv6.d.ts +8 -0
- package/lib/internal/_randomFormatIpv6.js +8 -0
- package/lib/internal/_randomFormatIpv6.js.map +1 -1
- package/lib/internal/_randomFormatIpv6.mjs +8 -0
- package/lib/internal/_randomFormatIpv6.mjs.map +1 -1
- package/lib/internal/_randomFormatIri.d.ts +11 -0
- package/lib/internal/_randomFormatIri.js +11 -0
- package/lib/internal/_randomFormatIri.js.map +1 -1
- package/lib/internal/_randomFormatIri.mjs +11 -0
- package/lib/internal/_randomFormatIri.mjs.map +1 -1
- package/lib/internal/_randomFormatIriReference.d.ts +12 -0
- package/lib/internal/_randomFormatIriReference.js +12 -0
- package/lib/internal/_randomFormatIriReference.js.map +1 -1
- package/lib/internal/_randomFormatIriReference.mjs +12 -0
- package/lib/internal/_randomFormatIriReference.mjs.map +1 -1
- package/lib/internal/_randomFormatJsonPointer.d.ts +12 -0
- package/lib/internal/_randomFormatJsonPointer.js +12 -0
- package/lib/internal/_randomFormatJsonPointer.js.map +1 -1
- package/lib/internal/_randomFormatJsonPointer.mjs +12 -0
- package/lib/internal/_randomFormatJsonPointer.mjs.map +1 -1
- package/lib/internal/_randomFormatPassword.d.ts +13 -0
- package/lib/internal/_randomFormatPassword.js +13 -0
- package/lib/internal/_randomFormatPassword.js.map +1 -1
- package/lib/internal/_randomFormatPassword.mjs +13 -0
- package/lib/internal/_randomFormatPassword.mjs.map +1 -1
- package/lib/internal/_randomFormatRegex.d.ts +8 -0
- package/lib/internal/_randomFormatRegex.js +8 -0
- package/lib/internal/_randomFormatRegex.js.map +1 -1
- package/lib/internal/_randomFormatRegex.mjs +8 -0
- package/lib/internal/_randomFormatRegex.mjs.map +1 -1
- package/lib/internal/_randomFormatRelativeJsonPointer.d.ts +8 -0
- package/lib/internal/_randomFormatRelativeJsonPointer.js +8 -0
- package/lib/internal/_randomFormatRelativeJsonPointer.js.map +1 -1
- package/lib/internal/_randomFormatRelativeJsonPointer.mjs +8 -0
- package/lib/internal/_randomFormatRelativeJsonPointer.mjs.map +1 -1
- package/lib/internal/_randomFormatTime.d.ts +13 -0
- package/lib/internal/_randomFormatTime.js +13 -0
- package/lib/internal/_randomFormatTime.js.map +1 -1
- package/lib/internal/_randomFormatTime.mjs +13 -0
- package/lib/internal/_randomFormatTime.mjs.map +1 -1
- package/lib/internal/_randomFormatUri.d.ts +12 -0
- package/lib/internal/_randomFormatUri.js +12 -0
- package/lib/internal/_randomFormatUri.js.map +1 -1
- package/lib/internal/_randomFormatUri.mjs +12 -0
- package/lib/internal/_randomFormatUri.mjs.map +1 -1
- package/lib/internal/_randomFormatUriReference.d.ts +12 -0
- package/lib/internal/_randomFormatUriReference.js +12 -0
- package/lib/internal/_randomFormatUriReference.js.map +1 -1
- package/lib/internal/_randomFormatUriReference.mjs +12 -0
- package/lib/internal/_randomFormatUriReference.mjs.map +1 -1
- package/lib/internal/_randomFormatUriTemplate.d.ts +12 -0
- package/lib/internal/_randomFormatUriTemplate.js +12 -0
- package/lib/internal/_randomFormatUriTemplate.js.map +1 -1
- package/lib/internal/_randomFormatUriTemplate.mjs +12 -0
- package/lib/internal/_randomFormatUriTemplate.mjs.map +1 -1
- package/lib/internal/_randomFormatUrl.d.ts +12 -0
- package/lib/internal/_randomFormatUrl.js +12 -0
- package/lib/internal/_randomFormatUrl.js.map +1 -1
- package/lib/internal/_randomFormatUrl.mjs +12 -0
- package/lib/internal/_randomFormatUrl.mjs.map +1 -1
- package/lib/internal/_randomFormatUuid.d.ts +13 -0
- package/lib/internal/_randomFormatUuid.js +13 -0
- package/lib/internal/_randomFormatUuid.js.map +1 -1
- package/lib/internal/_randomFormatUuid.mjs +13 -0
- package/lib/internal/_randomFormatUuid.mjs.map +1 -1
- package/lib/internal/_randomInteger.d.ts +17 -1
- package/lib/internal/_randomInteger.js +53 -11
- package/lib/internal/_randomInteger.js.map +1 -1
- package/lib/internal/_randomInteger.mjs +41 -7
- package/lib/internal/_randomInteger.mjs.map +1 -1
- package/lib/internal/_randomMultiple.d.ts +18 -1
- package/lib/internal/_randomMultiple.js +30 -13
- package/lib/internal/_randomMultiple.js.map +1 -1
- package/lib/internal/_randomMultiple.mjs +30 -13
- package/lib/internal/_randomMultiple.mjs.map +1 -1
- package/lib/internal/_randomNumber.d.ts +17 -1
- package/lib/internal/_randomNumber.js +48 -8
- package/lib/internal/_randomNumber.js.map +1 -1
- package/lib/internal/_randomNumber.mjs +40 -8
- package/lib/internal/_randomNumber.mjs.map +1 -1
- package/lib/internal/_randomPattern.d.ts +12 -0
- package/lib/internal/_randomPattern.js +12 -0
- package/lib/internal/_randomPattern.js.map +1 -1
- package/lib/internal/_randomPattern.mjs +12 -0
- package/lib/internal/_randomPattern.mjs.map +1 -1
- package/lib/internal/_randomPick.d.ts +13 -1
- package/lib/internal/_randomPick.js +15 -3
- package/lib/internal/_randomPick.js.map +1 -1
- package/lib/internal/_randomPick.mjs +15 -3
- package/lib/internal/_randomPick.mjs.map +1 -1
- package/lib/internal/_randomString.d.ts +15 -1
- package/lib/internal/_randomString.js +19 -5
- package/lib/internal/_randomString.js.map +1 -1
- package/lib/internal/_randomString.mjs +19 -5
- package/lib/internal/_randomString.mjs.map +1 -1
- package/lib/internal/_randomStringLength.d.ts +30 -1
- package/lib/internal/_randomStringLength.js +23 -1
- package/lib/internal/_randomStringLength.js.map +1 -1
- package/lib/internal/_randomStringLength.mjs +23 -1
- package/lib/internal/_randomStringLength.mjs.map +1 -1
- package/lib/internal/_stringLength.d.ts +11 -0
- package/lib/internal/_stringLength.js +11 -0
- package/lib/internal/_stringLength.js.map +1 -1
- package/lib/internal/_stringLength.mjs +11 -0
- package/lib/internal/_stringLength.mjs.map +1 -1
- package/lib/internal/_stringLengthGte.d.ts +11 -0
- package/lib/internal/_stringLengthGte.js +11 -0
- package/lib/internal/_stringLengthGte.js.map +1 -1
- package/lib/internal/_stringLengthGte.mjs +11 -0
- package/lib/internal/_stringLengthGte.mjs.map +1 -1
- package/lib/internal/_stringLengthLte.d.ts +11 -0
- package/lib/internal/_stringLengthLte.js +11 -0
- package/lib/internal/_stringLengthLte.js.map +1 -1
- package/lib/internal/_stringLengthLte.mjs +11 -0
- package/lib/internal/_stringLengthLte.mjs.map +1 -1
- package/lib/internal/_throwTypeGuardError.d.ts +9 -0
- package/lib/internal/_throwTypeGuardError.js +9 -0
- package/lib/internal/_throwTypeGuardError.js.map +1 -1
- package/lib/internal/_throwTypeGuardError.mjs +9 -0
- package/lib/internal/_throwTypeGuardError.mjs.map +1 -1
- package/lib/internal/_validateReport.d.ts +15 -0
- package/lib/internal/_validateReport.js +15 -0
- package/lib/internal/_validateReport.js.map +1 -1
- package/lib/internal/_validateReport.mjs +15 -0
- package/lib/internal/_validateReport.mjs.map +1 -1
- package/lib/internal/private/__notationRename.d.ts +5 -0
- package/lib/internal/private/__notationRename.js +5 -0
- package/lib/internal/private/__notationRename.js.map +1 -1
- package/lib/internal/private/__notationRename.mjs +5 -0
- package/lib/internal/private/__notationRename.mjs.map +1 -1
- package/lib/internal/private/__randomComposition.d.ts +27 -3
- package/lib/internal/private/__randomComposition.js +27 -3
- package/lib/internal/private/__randomComposition.js.map +1 -1
- package/lib/internal/private/__randomComposition.mjs +27 -3
- package/lib/internal/private/__randomComposition.mjs.map +1 -1
- package/lib/internal/private/__randomEpoch.d.ts +15 -0
- package/lib/internal/private/__randomEpoch.js +5 -0
- package/lib/internal/private/__randomEpoch.js.map +1 -1
- package/lib/internal/private/__randomEpoch.mjs +5 -0
- package/lib/internal/private/__randomEpoch.mjs.map +1 -1
- package/lib/json.d.ts +49 -14
- package/lib/json.js.map +1 -1
- package/lib/json.mjs.map +1 -1
- package/lib/llm.d.ts +41 -25
- package/lib/llm.js.map +1 -1
- package/lib/llm.mjs.map +1 -1
- package/lib/module.d.ts +1 -702
- package/lib/module.js +1 -101
- package/lib/module.js.map +1 -1
- package/lib/module.mjs +1 -81
- package/lib/module.mjs.map +1 -1
- package/lib/notations.d.ts +60 -0
- package/lib/notations.js.map +1 -1
- package/lib/notations.mjs.map +1 -1
- package/lib/plain.d.ts +38 -0
- package/lib/plain.js.map +1 -1
- package/lib/plain.mjs.map +1 -1
- package/lib/protobuf.d.ts +38 -4
- package/lib/protobuf.js.map +1 -1
- package/lib/protobuf.mjs.map +1 -1
- package/lib/reflect.d.ts +16 -12
- package/lib/reflect.js.map +1 -1
- package/lib/reflect.mjs.map +1 -1
- package/lib/transform.d.ts +17 -0
- package/lib/transform.js +17 -0
- package/lib/transform.js.map +1 -1
- package/lib/transform.mjs +17 -0
- package/lib/transform.mjs.map +1 -1
- package/native/adapter/adapter.go +28 -3
- package/native/adapter/adapter_options_branch_matrix_test.go +39 -34
- package/native/adapter/plugin_options.go +5 -0
- package/native/adapter/plugin_options_payload_matrix_test.go +5 -0
- package/native/cmd/ttsc-typia/any_array_type_tags_transform_test.go +38 -131
- package/native/cmd/ttsc-typia/assert_guard_factory_contract_test.go +31 -58
- package/native/cmd/ttsc-typia/atomic_intersection_schema_transform_test.go +28 -79
- package/native/cmd/ttsc-typia/bigint_literal_precision_transform_test.go +16 -82
- package/native/cmd/ttsc-typia/build_diagnostics_preserve_details_test.go +41 -0
- package/native/cmd/ttsc-typia/build_no_emit_preserves_analysis_options_test.go +9 -10
- package/native/cmd/ttsc-typia/build_no_emit_transform_diagnostics_test.go +9 -7
- package/native/cmd/ttsc-typia/build_plugin_options_come_from_payload_test.go +9 -11
- package/native/cmd/ttsc-typia/build_transactional_emit_success_test.go +9 -7
- package/native/cmd/ttsc-typia/build_transform_failure_atomicity_test.go +9 -7
- package/native/cmd/ttsc-typia/callable_interface_function_semantics_transform_test.go +9 -164
- package/native/cmd/ttsc-typia/callable_type_literal_boundaries_transform_test.go +20 -580
- package/native/cmd/ttsc-typia/compare_equal_cover_transform_test.go +10 -127
- package/native/cmd/ttsc-typia/compare_functional_union_membership_transform_test.go +93 -289
- package/native/cmd/ttsc-typia/compare_less_nan_transform_test.go +15 -66
- package/native/cmd/ttsc-typia/compare_nondiscriminable_union_transform_test.go +9 -221
- package/native/cmd/ttsc-typia/create_assert_error_factory_arity_test.go +11 -82
- package/native/cmd/ttsc-typia/default_library_spoof_native_identity_transform_test.go +10 -100
- package/native/cmd/ttsc-typia/demo_rejects_bad_flag_test.go +15 -14
- package/native/cmd/ttsc-typia/dependency_collector_virtual_scheme_test.go +8 -17
- package/native/cmd/ttsc-typia/dynamic_key_path_helper_alias_transform_test.go +10 -70
- package/native/cmd/ttsc-typia/dynamic_key_tags_transform_test.go +9 -120
- package/native/cmd/ttsc-typia/exact_optional_family_emission_contract_test.go +252 -0
- package/native/cmd/ttsc-typia/exclude_type_tag_transform_test.go +10 -102
- package/native/cmd/ttsc-typia/fixture_directories_test.go +154 -0
- package/native/cmd/ttsc-typia/functional_promised_type_transform_test.go +11 -104
- package/native/cmd/ttsc-typia/functional_receiver_transform_test.go +16 -124
- package/native/cmd/ttsc-typia/inline_type_display_name_transform_test.go +10 -183
- package/native/cmd/ttsc-typia/instance_union_create_is_transform_test.go +11 -88
- package/native/cmd/ttsc-typia/intersection_nonsensible_backstop_transform_test.go +17 -30
- package/native/cmd/ttsc-typia/intersection_union_validation_transform_test.go +10 -404
- package/native/cmd/ttsc-typia/json_application_alias_function_validation_transform_test.go +10 -22
- package/native/cmd/ttsc-typia/json_is_stringify_scoped_checker_transform_test.go +10 -111
- package/native/cmd/ttsc-typia/json_schema_dynamic_key_determinism_transform_test.go +25 -110
- package/native/cmd/ttsc-typia/json_schema_nonsensible_intersection_diagnostic_test.go +10 -22
- package/native/cmd/ttsc-typia/json_stringify_constant_atomic_union_transform_test.go +10 -101
- package/native/cmd/ttsc-typia/lib_replacement_native_identity_transform_test.go +11 -98
- package/native/cmd/ttsc-typia/llm_evaluation_accepts_property_probability_test.go +5 -0
- package/native/cmd/ttsc-typia/llm_evaluation_accepts_unselected_source_probability_test.go +5 -0
- package/native/cmd/ttsc-typia/llm_evaluation_complete_object_shape_test.go +5 -0
- package/native/cmd/ttsc-typia/llm_evaluation_emits_configured_decimals_test.go +53 -0
- package/native/cmd/ttsc-typia/llm_evaluation_ignores_declaration_probability_without_call_test.go +5 -0
- package/native/cmd/ttsc-typia/llm_evaluation_plan_emission_transform_test.go +5 -0
- package/native/cmd/ttsc-typia/llm_evaluation_program_scan_dependencies_test.go +5 -0
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_alias_comment_test.go +5 -0
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_alias_refinement_test.go +5 -0
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_computed_method_probability_test.go +5 -0
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_conflicting_boolean_tags_test.go +52 -0
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_finer_than_probability_decimals_test.go +100 -0
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_imported_declaration_probability_test.go +6 -1
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_invalid_config_test.go +51 -0
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_invalid_probability_test.go +5 -0
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_oversized_questions_test.go +79 -0
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_refinements_test.go +5 -0
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_shared_values_test.go +128 -0
- package/native/cmd/ttsc-typia/llm_evaluation_rejects_undecidable_types_test.go +6 -12
- package/native/cmd/ttsc-typia/local_function_named_like_typia_operation_transform_test.go +9 -17
- package/native/cmd/ttsc-typia/metadata_type_tag_sole_malformed_diagnostic_test.go +10 -28
- package/native/cmd/ttsc-typia/native_collection_identity_is_transform_test.go +9 -129
- package/native/cmd/ttsc-typia/native_generic_name_guard_is_transform_test.go +10 -95
- package/native/cmd/ttsc-typia/native_name_collision_is_transform_test.go +9 -122
- package/native/cmd/ttsc-typia/native_named_intersection_union_transform_test.go +10 -135
- package/native/cmd/ttsc-typia/node_buffer_native_exports_is_transform_test.go +18 -234
- package/native/cmd/ttsc-typia/non_trailing_rest_tuple_transform_test.go +19 -71
- package/native/cmd/ttsc-typia/notation_kebab_case_transform_test.go +10 -109
- package/native/cmd/ttsc-typia/notation_pascal_case_transform_test.go +10 -142
- package/native/cmd/ttsc-typia/notation_unicode_key_transform_test.go +9 -201
- package/native/cmd/ttsc-typia/nullable_primitive_property_is_transform_test.go +10 -102
- package/native/cmd/ttsc-typia/object_custom_tag_validation_transform_test.go +10 -112
- package/native/cmd/ttsc-typia/object_union_explicit_pointer_schema_transform_test.go +68 -114
- package/native/cmd/ttsc-typia/package_declaration_native_identity_is_transform_test.go +10 -114
- package/native/cmd/ttsc-typia/pattern_line_terminator_escape_transform_test.go +45 -123
- package/native/cmd/ttsc-typia/plain_classify_class_ref_transform_test.go +12 -97
- package/native/cmd/ttsc-typia/plain_classify_container_seed_transform_test.go +12 -74
- package/native/cmd/ttsc-typia/plain_classify_cross_module_extra_transform_test.go +15 -91
- package/native/cmd/ttsc-typia/plain_classify_cross_module_transform_test.go +40 -0
- package/native/cmd/ttsc-typia/plain_classify_deep_nested_transform_test.go +12 -103
- package/native/cmd/ttsc-typia/plain_classify_field_copy_transform_test.go +10 -120
- package/native/cmd/ttsc-typia/plain_classify_from_new_transform_test.go +12 -255
- package/native/cmd/ttsc-typia/plain_classify_generic_private_rejected_test.go +30 -0
- package/native/cmd/ttsc-typia/plain_classify_inherited_private_rejected_test.go +33 -0
- package/native/cmd/ttsc-typia/plain_classify_named_interface_field_copy_test.go +33 -0
- package/native/cmd/ttsc-typia/plain_classify_private_field_rejected_test.go +36 -0
- package/native/cmd/ttsc-typia/plain_classify_recursive_anonymous_object_test.go +30 -0
- package/native/cmd/ttsc-typia/plain_classify_self_ref_private_rejected_test.go +33 -0
- package/native/cmd/ttsc-typia/plain_classify_static_private_allowed_test.go +35 -0
- package/native/cmd/ttsc-typia/plain_classify_strategy_edges_transform_test.go +16 -291
- package/native/cmd/ttsc-typia/plain_classify_unbound_anonymous_class_test.go +35 -0
- package/native/cmd/ttsc-typia/plain_classify_union_transform_test.go +12 -73
- package/native/cmd/ttsc-typia/plain_classify_validated_union_transform_test.go +11 -146
- package/native/cmd/ttsc-typia/plain_clone_bigint_wrapper_transform_test.go +10 -80
- package/native/cmd/ttsc-typia/private_field_filter_is_transform_test.go +10 -137
- package/native/cmd/ttsc-typia/project_catalog_transform_coverage_test.go +4 -0
- package/native/cmd/ttsc-typia/project_dependencies_barrel_reexport_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_callee_argument_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_callee_barrel_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_callee_inference_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_callee_shape_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_callee_untransformed_barrel_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_collapsed_alias_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_complete_diagnostic_transform_test.go +7 -11
- package/native/cmd/ttsc-typia/project_dependencies_complete_envelope_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_complete_inferred_type_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_complete_replaced_library_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_complete_untouched_reprint_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_computed_key_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_custom_lib_name_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_default_barrel_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_empty_heritage_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_enum_member_value_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_envelope_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_index_signature_alias_transform_test.go +9 -12
- package/native/cmd/ttsc-typia/project_dependencies_inferred_declaration_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_jsdoc_typedef_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_local_reexport_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_named_tuple_member_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_qualified_barrel_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_signature_alias_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_star_barrel_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_dependencies_type_parameter_default_transform_test.go +6 -10
- package/native/cmd/ttsc-typia/project_reference_graph_envelope_transform_test.go +10 -32
- package/native/cmd/ttsc-typia/protobuf_diagnostic_code_transform_test.go +9 -31
- package/native/cmd/ttsc-typia/protobuf_is_encode_finite_number_transform_test.go +10 -23
- package/native/cmd/ttsc-typia/protobuf_object_generic_union_encode_transform_test.go +12 -114
- package/native/cmd/ttsc-typia/protobuf_sequence_field_numbers_transform_test.go +9 -26
- package/native/cmd/ttsc-typia/random_recursive_min_items_diagnostic_test.go +10 -23
- package/native/cmd/ttsc-typia/random_unsatisfiable_recursive_diagnostic_test.go +10 -26
- package/native/cmd/ttsc-typia/recursive_conditional_alias_name_transform_test.go +10 -185
- package/native/cmd/ttsc-typia/recursive_visit_tracking_transform_test.go +10 -291
- package/native/cmd/ttsc-typia/reflect_literals_non_literal_rejection_transform_test.go +9 -28
- package/native/cmd/ttsc-typia/schema_dts_role_transform_test.go +11 -206
- package/native/cmd/ttsc-typia/schema_literal_helpers_test.go +110 -0
- package/native/cmd/ttsc-typia/shadowed_typia_module_declaration_diagnostic_test.go +9 -17
- package/native/cmd/ttsc-typia/shallow_depth_argument_error_transform_test.go +10 -24
- package/native/cmd/ttsc-typia/shallow_depth_limit_transform_test.go +10 -105
- package/native/cmd/ttsc-typia/shallow_nested_depth_transform_test.go +10 -24
- package/native/cmd/ttsc-typia/symbol_key_member_filter_transform_test.go +10 -147
- package/native/cmd/ttsc-typia/template_interpolation_type_tags_transform_test.go +10 -272
- package/native/cmd/ttsc-typia/template_literal_type_tags_transform_test.go +10 -92
- package/native/cmd/ttsc-typia/transform_diagnostics_preserve_details_test.go +9 -86
- package/native/cmd/ttsc-typia/transform_fixtures_emit_coverage_test.go +48 -29
- package/native/cmd/ttsc-typia/transform_helpers_test.go +41 -360
- package/native/cmd/ttsc-typia/transform_plugin_options_come_from_payload_test.go +9 -12
- package/native/cmd/ttsc-typia/transform_project_diagnostics_preserve_details_test.go +54 -0
- package/native/cmd/ttsc-typia/transform_single_file_failure_atomicity_test.go +9 -11
- package/native/cmd/ttsc-typia/transform_single_file_failure_writes_no_stdout_test.go +9 -8
- package/native/cmd/ttsc-typia/transform_single_file_js_distinguishes_same_basename_sources_test.go +9 -14
- package/native/cmd/ttsc-typia/transform_single_file_js_locates_output_across_layouts_test.go +9 -16
- package/native/cmd/ttsc-typia/transform_single_file_success_publishes_artifact_test.go +9 -9
- package/native/cmd/ttsc-typia/transform_wasm_host_argv_reports_diagnostics_test.go +9 -10
- package/native/cmd/ttsc-typia/tuple_optional_compare_clone_transform_test.go +33 -181
- package/native/cmd/ttsc-typia/typia_diagnostic_formatting_test.go +46 -0
- package/native/cmd/ttsc-typia/uri_template_comment_dotted_variable_transform_test.go +57 -0
- package/native/cmd/ttsc-typia/user_global_native_identity_transform_test.go +16 -202
- package/native/cmd/ttsc-typia/wrong_type_tag_target_diagnostic_test.go +12 -12
- package/native/core/context/EmitFactory.go +10 -0
- package/native/core/context/IProgrammerProps.go +21 -4
- package/native/core/context/ITransformOptions.go +22 -4
- package/native/core/context/ITypiaContext.go +61 -11
- package/native/core/context/ImportProgrammer.go +144 -6
- package/native/core/context/TransformerError.go +74 -7
- package/native/core/context/import_programmer_default_type_only_needs_every_request_test.go +58 -0
- package/native/core/context/import_programmer_module_identifier_test.go +5 -0
- package/native/core/context/import_programmer_statement_coverage_test.go +106 -50
- package/native/core/context/transformer_error_formatting_test.go +82 -77
- package/native/core/factories/CommentFactory.go +8 -0
- package/native/core/factories/ExpressionFactory.go +105 -4
- package/native/core/factories/FormatCheatSheet.go +1 -1
- package/native/core/factories/JsonMetadataFactory.go +29 -4
- package/native/core/factories/LiteralFactory.go +24 -1
- package/native/core/factories/MetadataFactory.go +59 -5
- package/native/core/factories/ProtobufFactory.go +17 -4
- package/native/core/factories/StatementFactory.go +38 -5
- package/native/core/factories/TemplateFactory.go +10 -0
- package/native/core/factories/TypeFactory.go +33 -5
- package/native/core/factories/expression_factory_number_spells_non_finite_values_test.go +5 -0
- package/native/core/factories/factory_utility_coverage_test.go +8 -3
- package/native/core/factories/format_alias_resolves_to_cheat_sheet_test.go +5 -0
- package/native/core/factories/format_alias_table_targets_the_cheat_sheet_test.go +20 -30
- package/native/core/factories/identifier_factory_postfix_escapes_every_key_test.go +5 -0
- package/native/core/factories/identifier_factory_postfix_survives_every_code_point_test.go +5 -0
- package/native/core/factories/internal/metadata/IMetadataIteratorProps.go +115 -22
- package/native/core/factories/internal/metadata/MetadataHelper.go +64 -1
- package/native/core/factories/internal/metadata/comment_tags_coverage_test.go +167 -148
- package/native/core/factories/internal/metadata/emend_metadata_atomics.go +28 -1
- package/native/core/factories/internal/metadata/emplace_metadata_alias.go +10 -3
- package/native/core/factories/internal/metadata/emplace_metadata_array_type.go +17 -0
- package/native/core/factories/internal/metadata/emplace_metadata_object.go +12 -1
- package/native/core/factories/internal/metadata/emplace_metadata_tuple.go +10 -0
- package/native/core/factories/internal/metadata/explore_metadata.go +48 -9
- package/native/core/factories/internal/metadata/iterate_metadata.go +12 -0
- package/native/core/factories/internal/metadata/iterate_metadata_alias.go +8 -0
- package/native/core/factories/internal/metadata/iterate_metadata_array.go +7 -0
- package/native/core/factories/internal/metadata/iterate_metadata_atomic.go +7 -0
- package/native/core/factories/internal/metadata/iterate_metadata_coalesce.go +8 -0
- package/native/core/factories/internal/metadata/iterate_metadata_collection.go +8 -0
- package/native/core/factories/internal/metadata/iterate_metadata_collection_branch_matrix_test.go +148 -143
- package/native/core/factories/internal/metadata/iterate_metadata_comment_tags.go +7 -0
- package/native/core/factories/internal/metadata/iterate_metadata_constant.go +68 -0
- package/native/core/factories/internal/metadata/iterate_metadata_escape.go +7 -0
- package/native/core/factories/internal/metadata/iterate_metadata_function.go +33 -10
- package/native/core/factories/internal/metadata/iterate_metadata_intersection.go +22 -11
- package/native/core/factories/internal/metadata/iterate_metadata_intersection_brand_coverage_test.go +5 -0
- package/native/core/factories/internal/metadata/iterate_metadata_intersection_coverage_test.go +88 -83
- package/native/core/factories/internal/metadata/iterate_metadata_intersection_shareable_name_test.go +4 -0
- package/native/core/factories/internal/metadata/iterate_metadata_map.go +7 -0
- package/native/core/factories/internal/metadata/iterate_metadata_native.go +11 -1
- package/native/core/factories/internal/metadata/iterate_metadata_object.go +8 -0
- package/native/core/factories/internal/metadata/iterate_metadata_set.go +7 -0
- package/native/core/factories/internal/metadata/iterate_metadata_sort.go +11 -0
- package/native/core/factories/internal/metadata/iterate_metadata_template.go +7 -0
- package/native/core/factories/internal/metadata/iterate_metadata_tuple.go +7 -0
- package/native/core/factories/internal/metadata/iterate_metadata_union.go +10 -0
- package/native/core/factories/internal/metadata/js_doc_link_text_test.go +5 -0
- package/native/core/factories/internal/metadata/js_doc_parameter_name_reads_qualified_name_test.go +31 -26
- package/native/core/factories/internal/metadata/js_doc_type_tag_blank_separation_test.go +88 -0
- package/native/core/factories/internal/metadata/sort_constants_coverage_test.go +50 -39
- package/native/core/factories/internal/metadata/type_arguments_precondition_test.go +5 -0
- package/native/core/factories/json_metadata_factory_dedupes_bigint_diagnostics_test.go +5 -0
- package/native/core/factories/json_metadata_factory_rejects_bigint_native_test.go +5 -0
- package/native/core/factories/literal_factory_null_survives_objects_test.go +5 -0
- package/native/core/factories/literal_factory_ordered_object_marshals_json_test.go +5 -0
- package/native/core/factories/metadata_comment_tag_factory_coverage_test.go +5 -0
- package/native/core/factories/metadata_comment_tag_factory_exclusivity_matches_interface_test.go +10 -5
- package/native/core/factories/metadata_comment_tag_factory_holds_bigint_tags_exact_test.go +5 -0
- package/native/core/factories/metadata_comment_tag_factory_reads_javascript_numbers_test.go +5 -0
- package/native/core/factories/metadata_comment_tag_factory_rejects_out_of_range_integer_test.go +7 -2
- package/native/core/factories/metadata_comment_tag_factory_string_length_helpers_test.go +5 -0
- package/native/core/factories/metadata_type_tag_factory_accepts_legal_tag_combinations_test.go +6 -1
- package/native/core/factories/metadata_type_tag_factory_keeps_bool_form_exclusivity_test.go +5 -0
- package/native/core/factories/metadata_type_tag_factory_rejects_cross_kind_exclusive_tags_test.go +5 -0
- package/native/core/factories/metadata_type_tag_factory_rejects_duplicated_array_form_tags_test.go +5 -0
- package/native/core/factories/metadata_type_tag_factory_reports_all_invalid_candidates_test.go +5 -0
- package/native/core/factories/numeric_range_factory_enforces_64bit_bounds_test.go +58 -2
- package/native/core/factories/protobuf_factory_bigint_keeps_each_width_test.go +47 -0
- package/native/core/factories/protobuf_factory_rejects_invalid_field_names_test.go +5 -0
- package/native/core/factories/protobuf_recovery_ownership_test.go +5 -0
- package/native/core/programmers/AssertProgrammer.go +27 -0
- package/native/core/programmers/IsProgrammer.go +67 -1
- package/native/core/programmers/RandomProgrammer.go +39 -22
- package/native/core/programmers/ValidateProgrammer.go +28 -1
- package/native/core/programmers/compare/CompareEqualProgrammer.go +26 -3
- package/native/core/programmers/compare/CompareLessProgrammer.go +17 -3
- package/native/core/programmers/functional/FunctionalAssertFunctionProgrammer.go +47 -6
- package/native/core/programmers/functional/FunctionalAssertParametersProgrammer.go +69 -10
- package/native/core/programmers/functional/FunctionalAssertReturnProgrammer.go +76 -12
- package/native/core/programmers/functional/FunctionalIsFunctionProgrammer.go +31 -5
- package/native/core/programmers/functional/FunctionalIsParametersProgrammer.go +62 -9
- package/native/core/programmers/functional/FunctionalIsReturnProgrammer.go +67 -11
- package/native/core/programmers/functional/FunctionalValidateFunctionProgrammer.go +31 -5
- package/native/core/programmers/functional/FunctionalValidateParametersProgrammer.go +62 -9
- package/native/core/programmers/functional/FunctionalValidateReturnProgrammer.go +68 -11
- package/native/core/programmers/functional/internal/FunctionalGeneralProgrammer.go +22 -2
- package/native/core/programmers/helpers/ClassifyJoiner.go +14 -6
- package/native/core/programmers/helpers/CloneJoiner.go +29 -0
- package/native/core/programmers/helpers/FunctionProgrammer.go +98 -0
- package/native/core/programmers/helpers/ICheckEntry.go +16 -0
- package/native/core/programmers/helpers/IExpressionEntry.go +8 -0
- package/native/core/programmers/helpers/ModuloText.go +5 -0
- package/native/core/programmers/helpers/NotationJoiner.go +23 -0
- package/native/core/programmers/helpers/ProtobufWire.go +8 -0
- package/native/core/programmers/helpers/PruneJoiner.go +21 -0
- package/native/core/programmers/helpers/RandomJoiner.go +52 -5
- package/native/core/programmers/helpers/StringifyJoinder.go +31 -12
- package/native/core/programmers/helpers/UnionExplorer.go +202 -70
- package/native/core/programmers/helpers/UnionPredicator.go +9 -0
- package/native/core/programmers/helpers/clone_joiner_optional_condition_test.go +14 -1
- package/native/core/programmers/helpers/function_programmer_unique_names_test.go +5 -0
- package/native/core/programmers/helpers/joiner_branch_coverage_test.go +5 -0
- package/native/core/programmers/helpers/option_predicator_contract_matrix_test.go +84 -0
- package/native/core/programmers/helpers/random_joiner_recursive_array_guard_test.go +5 -0
- package/native/core/programmers/helpers/union_explorer_coverage_test.go +120 -112
- package/native/core/programmers/helpers/union_predicator_checks_neighbor_flag_test.go +5 -0
- package/native/core/programmers/helpers/union_predicator_skips_atomic_like_native_fields_test.go +5 -0
- package/native/core/programmers/helpers/union_predicator_skips_collection_bucket_fields_test.go +5 -0
- package/native/core/programmers/helpers/union_predicator_skips_shared_native_names_test.go +5 -0
- package/native/core/programmers/helpers/union_predicator_skips_shared_object_fields_test.go +5 -0
- package/native/core/programmers/helpers/union_predicator_skips_shared_template_fields_test.go +5 -0
- package/native/core/programmers/http/HttpAssertFormDataProgrammer.go +9 -0
- package/native/core/programmers/http/HttpAssertHeadersProgrammer.go +9 -0
- package/native/core/programmers/http/HttpAssertQueryProgrammer.go +20 -0
- package/native/core/programmers/http/HttpFormDataProgrammer.go +7 -0
- package/native/core/programmers/http/HttpHeadersProgrammer.go +7 -0
- package/native/core/programmers/http/HttpIsFormDataProgrammer.go +8 -0
- package/native/core/programmers/http/HttpIsHeadersProgrammer.go +8 -0
- package/native/core/programmers/http/HttpIsQueryProgrammer.go +19 -1
- package/native/core/programmers/http/HttpQueryProgrammer.go +18 -1
- package/native/core/programmers/http/HttpValidateFormDataProgrammer.go +8 -0
- package/native/core/programmers/http/HttpValidateHeadersProgrammer.go +8 -0
- package/native/core/programmers/http/HttpValidateQueryProgrammer.go +18 -1
- package/native/core/programmers/http/http_programmer_helper_coverage_test.go +98 -93
- package/native/core/programmers/internal/CheckerProgrammer.go +162 -18
- package/native/core/programmers/internal/FeatureProgrammer.go +254 -38
- package/native/core/programmers/internal/feature_programmer_visit_guard_test.go +82 -55
- package/native/core/programmers/internal/internal_utility_coverage_test.go +338 -345
- package/native/core/programmers/iterate/check_array_length.go +15 -0
- package/native/core/programmers/iterate/check_bigint.go +14 -0
- package/native/core/programmers/iterate/check_dynamic_key.go +33 -19
- package/native/core/programmers/iterate/check_dynamic_key_tag_rows_test.go +59 -32
- package/native/core/programmers/iterate/check_dynamic_properties.go +70 -16
- package/native/core/programmers/iterate/check_everything.go +7 -0
- package/native/core/programmers/iterate/check_native.go +14 -0
- package/native/core/programmers/iterate/check_number.go +16 -0
- package/native/core/programmers/iterate/check_number_option_contract_matrix_test.go +84 -0
- package/native/core/programmers/iterate/check_object.go +28 -0
- package/native/core/programmers/iterate/check_object_strict_optional_undefined_test.go +6 -1
- package/native/core/programmers/iterate/check_object_type_tags.go +15 -0
- package/native/core/programmers/iterate/check_string.go +14 -0
- package/native/core/programmers/iterate/check_template.go +15 -0
- package/native/core/programmers/iterate/decode_union_object.go +35 -2
- package/native/core/programmers/iterate/exact_optional_checker_entry_contract_test.go +142 -0
- package/native/core/programmers/iterate/exact_optional_graph_clone_random_contract_test.go +213 -0
- package/native/core/programmers/iterate/feature_object_entries.go +40 -0
- package/native/core/programmers/iterate/iterate_utility_coverage_test.go +30 -5
- package/native/core/programmers/iterate/json_schema_array.go +16 -0
- package/native/core/programmers/iterate/json_schema_bigint.go +7 -0
- package/native/core/programmers/iterate/json_schema_boolean.go +7 -0
- package/native/core/programmers/iterate/json_schema_discriminator_declaration_syntax_test.go +10 -5
- package/native/core/programmers/iterate/json_schema_jsdoc_tags_cast_reads_javascript_numbers_test.go +6 -1
- package/native/core/programmers/iterate/json_schema_native.go +27 -0
- package/native/core/programmers/iterate/json_schema_number.go +7 -0
- package/native/core/programmers/iterate/json_schema_pattern_property_order_test.go +5 -0
- package/native/core/programmers/iterate/json_schema_plugin.go +7 -0
- package/native/core/programmers/iterate/json_schema_station.go +16 -0
- package/native/core/programmers/iterate/json_schema_string.go +7 -0
- package/native/core/programmers/iterate/openapi_v3_downgrader.go +29 -10
- package/native/core/programmers/iterate/openapi_v3_downgrader_boolean_default_test.go +9 -4
- package/native/core/programmers/iterate/openapi_v3_downgrader_test.go +9 -4
- package/native/core/programmers/iterate/postfix_of_tuple.go +8 -0
- package/native/core/programmers/iterate/template_interpolation_tags_test.go +46 -4
- package/native/core/programmers/iterate/template_runtime_pattern.go +10 -4
- package/native/core/programmers/iterate/wrap_metadata_rest_tuple.go +8 -0
- package/native/core/programmers/json/JsonApplicationProgrammer.go +9 -0
- package/native/core/programmers/json/JsonAssertParseProgrammer.go +9 -0
- package/native/core/programmers/json/JsonAssertStringifyProgrammer.go +9 -0
- package/native/core/programmers/json/JsonIsParseProgrammer.go +7 -0
- package/native/core/programmers/json/JsonIsStringifyProgrammer.go +8 -0
- package/native/core/programmers/json/JsonSchemaProgrammer.go +15 -0
- package/native/core/programmers/json/JsonSchemasProgrammer.go +16 -0
- package/native/core/programmers/json/JsonStringifyProgrammer.go +20 -32
- package/native/core/programmers/json/JsonValidateParseProgrammer.go +8 -0
- package/native/core/programmers/json/JsonValidateStringifyProgrammer.go +8 -0
- package/native/core/programmers/json/json_schema_programmer_coverage_test.go +176 -171
- package/native/core/programmers/json/json_schemas_programmer_dedupes_bigint_diagnostics_test.go +5 -0
- package/native/core/programmers/json/json_schemas_programmer_rejects_bigint_native_test.go +5 -0
- package/native/core/programmers/json/json_stringify_programmer_coverage_test.go +400 -398
- package/native/core/programmers/llm/LlmApplicationProgrammer.go +10 -9
- package/native/core/programmers/llm/LlmCoerceProgrammer.go +16 -9
- package/native/core/programmers/llm/LlmControllerProgrammer.go +10 -0
- package/native/core/programmers/llm/LlmEvaluationProgrammer.go +101 -9
- package/native/core/programmers/llm/LlmParametersProgrammer.go +8 -9
- package/native/core/programmers/llm/LlmParseProgrammer.go +24 -9
- package/native/core/programmers/llm/LlmSchemaProgrammer.go +16 -9
- package/native/core/programmers/llm/LlmStructuredOutputProgrammer.go +8 -9
- package/native/core/programmers/llm/llm_application_programmer_coverage_test.go +146 -141
- package/native/core/programmers/llm/llm_reference_codec_test.go +5 -0
- package/native/core/programmers/llm/llm_reference_description_test.go +13 -3
- package/native/core/programmers/llm/llm_schema_programmer_coverage_test.go +255 -250
- package/native/core/programmers/llm/llm_schema_programmer_dedupes_bigint_diagnostics_test.go +5 -0
- package/native/core/programmers/llm/llm_schema_programmer_rejects_bigint_native_test.go +5 -0
- package/native/core/programmers/llm/llm_schema_programmer_rejects_exclude_tag_in_strict_test.go +7 -3
- package/native/core/programmers/notations/NotationAssertGeneralProgrammer.go +32 -4
- package/native/core/programmers/notations/NotationGeneralProgrammer.go +70 -42
- package/native/core/programmers/notations/NotationIsGeneralProgrammer.go +29 -3
- package/native/core/programmers/notations/NotationValidateGeneralProgrammer.go +32 -4
- package/native/core/programmers/notations/notation_general_helpers_test.go +363 -367
- package/native/core/programmers/notations/notation_general_programmer_pascal_multiword_test.go +5 -0
- package/native/core/programmers/notations/notation_general_programmer_snake_prefix_test.go +5 -0
- package/native/core/programmers/notations/notation_general_programmer_underscore_boundary_test.go +5 -0
- package/native/core/programmers/plain/PlainAssertClassifyProgrammer.go +23 -3
- package/native/core/programmers/plain/PlainAssertCloneProgrammer.go +22 -3
- package/native/core/programmers/plain/PlainAssertPruneProgrammer.go +22 -3
- package/native/core/programmers/plain/PlainClassifyProgrammer.go +61 -85
- package/native/core/programmers/plain/PlainCloneProgrammer.go +34 -38
- package/native/core/programmers/plain/PlainIsCloneProgrammer.go +18 -2
- package/native/core/programmers/plain/PlainIsPruneProgrammer.go +18 -2
- package/native/core/programmers/plain/PlainPruneProgrammer.go +29 -10
- package/native/core/programmers/plain/PlainValidateClassifyProgrammer.go +22 -3
- package/native/core/programmers/plain/PlainValidateCloneProgrammer.go +22 -3
- package/native/core/programmers/plain/PlainValidatePruneProgrammer.go +22 -3
- package/native/core/programmers/plain/plain_programmer_helper_coverage_test.go +6 -3
- package/native/core/programmers/plain/plain_prune_programmer_branch_matrix_test.go +5 -0
- package/native/core/programmers/plain/plain_tuple_seed_recovery_ownership_test.go +5 -0
- package/native/core/programmers/protobuf/ProtobufAssertDecodeProgrammer.go +19 -0
- package/native/core/programmers/protobuf/ProtobufAssertEncodeProgrammer.go +19 -0
- package/native/core/programmers/protobuf/ProtobufDecodeProgrammer.go +19 -1
- package/native/core/programmers/protobuf/ProtobufEncodeProgrammer.go +30 -30
- package/native/core/programmers/protobuf/ProtobufIsDecodeProgrammer.go +19 -1
- package/native/core/programmers/protobuf/ProtobufIsEncodeProgrammer.go +19 -1
- package/native/core/programmers/protobuf/ProtobufMessageProgrammer.go +11 -5
- package/native/core/programmers/protobuf/ProtobufValidateDecodeProgrammer.go +19 -1
- package/native/core/programmers/protobuf/ProtobufValidateEncodeProgrammer.go +19 -1
- package/native/core/programmers/protobuf/protobuf_programmer_helper_coverage_test.go +493 -453
- package/native/core/programmers/random_programmer_helper_coverage_test.go +350 -342
- package/native/core/programmers/random_programmer_length_argument_test.go +32 -1
- package/native/core/programmers/random_programmer_min_items_tag_test.go +5 -0
- package/native/core/programmers/random_programmer_pick_hook_test.go +88 -0
- package/native/core/programmers/reflect/ReflectLiteralsProgrammer.go +15 -0
- package/native/core/schemas/metadata/IMetadataTypeTagSequence.go +12 -1
- package/native/core/schemas/metadata/MetadataAlias.go +41 -1
- package/native/core/schemas/metadata/MetadataAliasType.go +57 -21
- package/native/core/schemas/metadata/MetadataArray.go +37 -1
- package/native/core/schemas/metadata/MetadataArrayType.go +52 -18
- package/native/core/schemas/metadata/MetadataAtomic.go +44 -10
- package/native/core/schemas/metadata/MetadataBigint.go +20 -4
- package/native/core/schemas/metadata/MetadataCollection.go +264 -53
- package/native/core/schemas/metadata/MetadataComponents.go +13 -116
- package/native/core/schemas/metadata/MetadataConstant.go +35 -13
- package/native/core/schemas/metadata/MetadataConstantValue.go +87 -20
- package/native/core/schemas/metadata/MetadataDefaultLibrary.go +20 -0
- package/native/core/schemas/metadata/MetadataDependency.go +52 -2
- package/native/core/schemas/metadata/MetadataEscaped.go +48 -8
- package/native/core/schemas/metadata/MetadataFunction.go +42 -16
- package/native/core/schemas/metadata/MetadataMap.go +53 -4
- package/native/core/schemas/metadata/MetadataNative.go +65 -9
- package/native/core/schemas/metadata/MetadataObject.go +37 -1
- package/native/core/schemas/metadata/MetadataObjectType.go +117 -74
- package/native/core/schemas/metadata/MetadataParameter.go +51 -16
- package/native/core/schemas/metadata/MetadataProperty.go +49 -19
- package/native/core/schemas/metadata/MetadataSchema.go +324 -198
- package/native/core/schemas/metadata/MetadataSet.go +49 -2
- package/native/core/schemas/metadata/MetadataTemplate.go +61 -15
- package/native/core/schemas/metadata/MetadataTuple.go +21 -0
- package/native/core/schemas/metadata/MetadataTupleType.go +61 -19
- package/native/core/schemas/metadata/metadata_atomic_tags_are_owned_test.go +75 -0
- package/native/core/schemas/metadata/metadata_bigint_is_comparable_test.go +5 -0
- package/native/core/schemas/metadata/metadata_collection_generic_argument_dot_test.go +13 -8
- package/native/core/schemas/metadata/metadata_collection_name_allocation_test.go +9 -2
- package/native/core/schemas/metadata/metadata_collection_openapi_name_cascade_test.go +5 -0
- package/native/core/schemas/metadata/metadata_collection_openapi_name_test.go +7 -1
- package/native/core/schemas/metadata/metadata_object_coverage_compares_property_values_test.go +61 -0
- package/native/core/schemas/metadata/metadata_object_type_required_literal_property_test.go +7 -1
- package/native/core/schemas/metadata/metadata_schema_covers_tag_matrix_test.go +8 -3
- package/native/core/schemas/metadata/metadata_schema_merge_keeps_inputs_test.go +117 -0
- package/native/core/schemas/metadata/metadata_schema_optional_root_isolation_test.go +59 -0
- package/native/core/schemas/metadata/metadata_schema_shallow_clone_names_test.go +36 -0
- package/native/core/schemas/metadata/metadata_schema_sole_literal_caches_pointer_test.go +5 -0
- package/native/core/schemas/metadata/schema_sequence_and_json_coverage_test.go +289 -387
- package/native/core/schemas/protobuf/IProtobufProperty.go +11 -0
- package/native/core/schemas/protobuf/IProtobufPropertyType.go +94 -0
- package/native/core/schemas/protobuf/IProtobufSchema.go +89 -5
- package/native/core/utils/NumberUtil.go +7 -1
- package/native/core/utils/PromiseTypeFactory.go +12 -1
- package/native/core/utils/number_util_rational_keeps_written_value_test.go +5 -0
- package/native/core/utils/number_util_reads_javascript_number_grammar_test.go +5 -0
- package/native/core/utils/promise_type_factory_semantics_test.go +5 -0
- package/native/transform/CallExpressionTransformer.go +42 -10
- package/native/transform/FileTransformer.go +72 -53
- package/native/transform/ITransformProps.go +7 -0
- package/native/transform/NodeTransformer.go +10 -1
- package/native/transform/TransformerError.go +31 -0
- package/native/transform/call_expression_transformer_registry_coverage_test.go +40 -31
- package/native/transform/call_expression_transformer_target_test.go +33 -4
- package/native/transform/features/CreateIsTransformer.go +0 -1
- package/native/transform/features/CreateShallowTransformer.go +0 -1
- package/native/transform/features/CreateValidateTransformer.go +0 -1
- package/native/transform/features/IsTransformer.go +0 -1
- package/native/transform/features/ShallowTransformer.go +0 -1
- package/native/transform/features/ValidateTransformer.go +0 -1
- package/native/transform/features/functional/FunctionalGenericTransformer.go +46 -7
- package/native/transform/features/http/CreateHttpIsQueryTransformer.go +0 -1
- package/native/transform/features/http/CreateHttpQueryTransformer.go +0 -1
- package/native/transform/features/http/CreateHttpValidateQueryTransformer.go +0 -1
- package/native/transform/features/http/HttpIsQueryTransformer.go +0 -1
- package/native/transform/features/http/HttpQueryTransformer.go +0 -1
- package/native/transform/features/http/HttpValidateQueryTransformer.go +0 -1
- package/native/transform/features/llm/LlmEvaluationProbabilityDeclarations_test.go +6 -1
- package/native/transform/features/llm/LlmEvaluationTransformer.go +55 -1
- package/native/transform/features/notations/notation_transformer_capitalize_test.go +29 -0
- package/native/transform/features/protobuf/ProtobufCreateDecodeTransformer.go +1 -1
- package/native/transform/features/protobuf/ProtobufCreateEncodeTransformer.go +1 -1
- package/native/transform/features/protobuf/ProtobufCreateIsDecodeTransformer.go +1 -1
- package/native/transform/features/protobuf/ProtobufCreateIsEncodeTransformer.go +1 -1
- package/native/transform/features/protobuf/ProtobufCreateValidateDecodeTransformer.go +1 -1
- package/native/transform/features/protobuf/ProtobufCreateValidateEncodeTransformer.go +1 -1
- package/native/transform/features/protobuf/ProtobufDecodeTransformer.go +1 -1
- package/native/transform/features/protobuf/ProtobufEncodeTransformer.go +1 -1
- package/native/transform/features/protobuf/ProtobufIsDecodeTransformer.go +1 -1
- package/native/transform/features/protobuf/ProtobufIsEncodeTransformer.go +1 -1
- package/native/transform/features/protobuf/ProtobufValidateDecodeTransformer.go +1 -1
- package/native/transform/features/protobuf/ProtobufValidateEncodeTransformer.go +1 -1
- package/native/transform/features/reflect/reflect_metadata_transformer_edge_branches_test.go +42 -30
- package/native/transform/file_transformer_coverage_test.go +17 -3
- package/native/transform/internal/GenericTransformer.go +67 -113
- package/native/transform/transform.go +16 -2
- package/package.json +7 -6
- package/src/TypeGuardError.ts +20 -4
- package/src/basic.ts +1020 -0
- package/src/compare.ts +21 -0
- package/src/functional.ts +42 -0
- package/src/http.ts +75 -0
- package/src/internal/_IProtobufWriter.ts +115 -0
- package/src/internal/_ProtobufReader.ts +159 -1
- package/src/internal/_ProtobufSizer.ts +137 -5
- package/src/internal/_ProtobufWriter.ts +154 -1
- package/src/internal/_accessExpressionAsString.ts +11 -0
- package/src/internal/_assertGuard.ts +12 -0
- package/src/internal/_coerceLlmArguments.ts +10 -0
- package/src/internal/_createLlmEvaluation.ts +10 -53
- package/src/internal/_createStandardSchema.ts +13 -0
- package/src/internal/_decimal.ts +77 -0
- package/src/internal/_functionalTypeGuardErrorFactory.ts +8 -0
- package/src/internal/_httpFormDataReadArray.ts +9 -0
- package/src/internal/_httpFormDataReadBigint.ts +12 -0
- package/src/internal/_httpFormDataReadBlob.ts +11 -0
- package/src/internal/_httpFormDataReadBoolean.ts +11 -0
- package/src/internal/_httpFormDataReadFile.ts +11 -0
- package/src/internal/_httpFormDataReadNumber.ts +11 -0
- package/src/internal/_httpFormDataReadString.ts +5 -0
- package/src/internal/_httpHeaderReadBigint.ts +11 -0
- package/src/internal/_httpHeaderReadBoolean.ts +12 -0
- package/src/internal/_httpHeaderReadNumber.ts +11 -0
- package/src/internal/_httpParameterReadBigint.ts +11 -0
- package/src/internal/_httpParameterReadBoolean.ts +11 -0
- package/src/internal/_httpParameterReadNumber.ts +11 -0
- package/src/internal/_httpParameterReadString.ts +5 -0
- package/src/internal/_httpQueryParseURLSearchParams.ts +14 -0
- package/src/internal/_httpQueryReadArray.ts +9 -0
- package/src/internal/_httpQueryReadBigint.ts +11 -0
- package/src/internal/_httpQueryReadBoolean.ts +12 -0
- package/src/internal/_httpQueryReadNumber.ts +11 -0
- package/src/internal/_httpQueryReadString.ts +5 -0
- package/src/internal/_isBetween.ts +8 -0
- package/src/internal/_isBigintString.ts +11 -0
- package/src/internal/_isFormatByte.ts +12 -0
- package/src/internal/_isFormatDate.ts +11 -0
- package/src/internal/_isFormatDateTime.ts +13 -0
- package/src/internal/_isFormatDuration.ts +13 -0
- package/src/internal/_isFormatEmail.ts +13 -0
- package/src/internal/_isFormatHostname.ts +12 -0
- package/src/internal/_isFormatIdnEmail.ts +14 -0
- package/src/internal/_isFormatIdnHostname.ts +14 -0
- package/src/internal/_isFormatIpv4.ts +11 -0
- package/src/internal/_isFormatIpv6.ts +12 -0
- package/src/internal/_isFormatIri.ts +11 -0
- package/src/internal/_isFormatIriReference.ts +13 -0
- package/src/internal/_isFormatJsonPointer.ts +11 -0
- package/src/internal/_isFormatPassword.ts +11 -0
- package/src/internal/_isFormatRegex.ts +11 -0
- package/src/internal/_isFormatRelativeJsonPointer.ts +11 -0
- package/src/internal/_isFormatTime.ts +12 -0
- package/src/internal/_isFormatUri.ts +15 -0
- package/src/internal/_isFormatUriReference.ts +11 -0
- package/src/internal/_isFormatUriTemplate.ts +14 -1
- package/src/internal/_isFormatUrl.ts +15 -0
- package/src/internal/_isFormatUuid.ts +11 -0
- package/src/internal/_isMultipleOf.ts +11 -0
- package/src/internal/_isTypeFloat.ts +9 -0
- package/src/internal/_isTypeInt16.ts +8 -0
- package/src/internal/_isTypeInt32.ts +8 -0
- package/src/internal/_isTypeInt64.ts +11 -0
- package/src/internal/_isTypeInt64Bigint.ts +8 -0
- package/src/internal/_isTypeInt8.ts +8 -0
- package/src/internal/_isTypeUint16.ts +8 -0
- package/src/internal/_isTypeUint32.ts +8 -0
- package/src/internal/_isTypeUint64.ts +11 -0
- package/src/internal/_isTypeUint64Bigint.ts +8 -0
- package/src/internal/_isTypeUint8.ts +8 -0
- package/src/internal/_isUniqueItems.ts +46 -0
- package/src/internal/_jsonStringifyArray.ts +2 -0
- package/src/internal/_jsonStringifyElement.ts +2 -0
- package/src/internal/_jsonStringifyNumber.ts +9 -0
- package/src/internal/_jsonStringifyProperty.ts +3 -1
- package/src/internal/_jsonStringifyRest.ts +11 -0
- package/src/internal/_jsonStringifyString.ts +13 -0
- package/src/internal/_jsonStringifyTail.ts +8 -0
- package/src/internal/_llmApplicationFinalize.ts +13 -0
- package/src/internal/_notationAny.ts +14 -0
- package/src/internal/_notationAssign.ts +12 -0
- package/src/internal/_notationKebab.ts +9 -0
- package/src/internal/_notationKeyCollision.ts +8 -0
- package/src/internal/_notationSnake.ts +12 -0
- package/src/internal/_parseLlmArguments.ts +12 -0
- package/src/internal/_plainCloneAny.ts +15 -0
- package/src/internal/_randomArray.ts +42 -20
- package/src/internal/_randomBigint.ts +5 -0
- package/src/internal/_randomBoolean.ts +8 -0
- package/src/internal/_randomFormatByte.ts +8 -0
- package/src/internal/_randomFormatDate.ts +10 -0
- package/src/internal/_randomFormatDatetime.ts +10 -0
- package/src/internal/_randomFormatDuration.ts +8 -0
- package/src/internal/_randomFormatEmail.ts +8 -0
- package/src/internal/_randomFormatHostname.ts +15 -1
- package/src/internal/_randomFormatIdnEmail.ts +13 -0
- package/src/internal/_randomFormatIdnHostname.ts +12 -0
- package/src/internal/_randomFormatIpv4.ts +8 -0
- package/src/internal/_randomFormatIpv6.ts +8 -0
- package/src/internal/_randomFormatIri.ts +11 -0
- package/src/internal/_randomFormatIriReference.ts +12 -0
- package/src/internal/_randomFormatJsonPointer.ts +12 -0
- package/src/internal/_randomFormatPassword.ts +13 -0
- package/src/internal/_randomFormatRegex.ts +8 -0
- package/src/internal/_randomFormatRelativeJsonPointer.ts +8 -0
- package/src/internal/_randomFormatTime.ts +13 -0
- package/src/internal/_randomFormatUri.ts +12 -0
- package/src/internal/_randomFormatUriReference.ts +12 -0
- package/src/internal/_randomFormatUriTemplate.ts +12 -0
- package/src/internal/_randomFormatUrl.ts +12 -0
- package/src/internal/_randomFormatUuid.ts +13 -0
- package/src/internal/_randomInteger.ts +68 -17
- package/src/internal/_randomMultiple.ts +47 -15
- package/src/internal/_randomNumber.ts +84 -26
- package/src/internal/_randomPattern.ts +12 -0
- package/src/internal/_randomPick.ts +25 -7
- package/src/internal/_randomString.ts +36 -13
- package/src/internal/_randomStringLength.ts +31 -1
- package/src/internal/_stringLength.ts +11 -0
- package/src/internal/_stringLengthGte.ts +11 -0
- package/src/internal/_stringLengthLte.ts +11 -0
- package/src/internal/_throwTypeGuardError.ts +9 -0
- package/src/internal/_validateReport.ts +15 -0
- package/src/internal/private/__notationRename.ts +5 -0
- package/src/internal/private/__randomComposition.ts +27 -3
- package/src/internal/private/__randomEpoch.ts +15 -0
- package/src/json.ts +49 -14
- package/src/llm.ts +45 -26
- package/src/module.ts +1 -935
- package/src/notations.ts +60 -0
- package/src/plain.ts +38 -0
- package/src/protobuf.ts +41 -7
- package/src/reflect.ts +16 -12
- package/src/transform.ts +17 -0
- package/native/cmd/ttsc-typia/boolean_literal_discriminant_schema_transform_test.go +0 -374
- package/native/cmd/ttsc-typia/build_reports_semantic_diagnostics_test.go +0 -34
- package/native/cmd/ttsc-typia/build_reports_syntactic_diagnostics_test.go +0 -34
- package/native/cmd/ttsc-typia/command_routes_and_diagnostics_coverage_test.go +0 -316
- package/native/cmd/ttsc-typia/compare_less_transform_test.go +0 -180
- package/native/cmd/ttsc-typia/compare_method_delegation_transform_test.go +0 -173
- package/native/cmd/ttsc-typia/compare_native_object_overmatch_transform_test.go +0 -161
- package/native/cmd/ttsc-typia/compare_template_literal_union_transform_test.go +0 -241
- package/native/cmd/ttsc-typia/compare_union_discrimination_transform_test.go +0 -289
- package/native/cmd/ttsc-typia/escaped_property_key_path_transform_test.go +0 -193
- package/native/cmd/ttsc-typia/finite_option_number_leaf_transform_test.go +0 -240
- package/native/cmd/ttsc-typia/intersection_all_never_union_transform_test.go +0 -168
- package/native/cmd/ttsc-typia/intersection_brand_transform_test.go +0 -267
- package/native/cmd/ttsc-typia/is_object_function_member_transform_test.go +0 -205
- package/native/cmd/ttsc-typia/json_is_stringify_finite_number_transform_test.go +0 -198
- package/native/cmd/ttsc-typia/json_stringify_contextual_undefined_transform_test.go +0 -556
- package/native/cmd/ttsc-typia/json_stringify_special_key_transform_test.go +0 -238
- package/native/cmd/ttsc-typia/notation_dynamic_keys_transform_test.go +0 -286
- package/native/cmd/ttsc-typia/notation_literal_collision_transform_test.go +0 -164
- package/native/cmd/ttsc-typia/plain_prune_union_object_overmatch_transform_test.go +0 -219
- package/native/cmd/ttsc-typia/recursive_container_helper_index_transform_test.go +0 -206
- package/native/cmd/ttsc-typia/reflect_literals_bigint_transform_test.go +0 -148
- package/native/cmd/ttsc-typia/reflect_schema_bigint_transform_test.go +0 -173
- package/native/cmd/ttsc-typia/run_default_build_route_test.go +0 -31
- package/native/cmd/ttsc-typia/shallow_depth_runtime_test.go +0 -173
- package/native/cmd/ttsc-typia/shallow_factory_depth_runtime_test.go +0 -171
- package/native/cmd/ttsc-typia/symbol_index_domain_transform_test.go +0 -316
- package/native/cmd/ttsc-typia/transform_declaration_source_produces_no_javascript_test.go +0 -67
- package/native/cmd/ttsc-typia/transform_single_file_js_empty_emit_reports_no_output_test.go +0 -100
- package/native/core/factories/internal/metadata/optional_coalesce_coverage_test.go +0 -38
- package/native/core/programmers/functional/functional_assert_helper_coverage_test.go +0 -26
- package/native/core/programmers/iterate/iterate_check_coverage_test.go +0 -96
- package/native/core/programmers/programmer_direct_helper_coverage_test.go +0 -70
- package/native/core/schemas/metadata/IMetadataDictionary.go +0 -8
- package/native/core/schemas/protobuf/protobuf_marker_coverage_test.go +0 -58
- package/native/core/typings/Writable.go +0 -5
- package/native/transform/ImportTransformer.go +0 -285
- package/native/transform/TypiaGenerator.go +0 -171
- package/native/transform/features/feature_transformer_entry_coverage_test.go +0 -59
- package/native/transform/features/http/http_transformer_entry_coverage_test.go +0 -65
- package/native/transform/features/json/json_transformer_entry_coverage_test.go +0 -56
- package/native/transform/features/llm/llm_transformer_entry_coverage_test.go +0 -50
- package/native/transform/features/notations/notation_transformer_entry_coverage_test.go +0 -58
- package/native/transform/features/plain/plain_transformer_entry_coverage_test.go +0 -61
- package/native/transform/features/protobuf/protobuf_transformer_entry_coverage_test.go +0 -56
- package/native/transform/features/reflect/reflect_transformer_entry_coverage_test.go +0 -47
- package/native/transform/import_transformer_coverage_test.go +0 -153
- package/native/transform/typia_generator_helpers_coverage_test.go +0 -166
|
@@ -1,27 +1,158 @@
|
|
|
1
1
|
import { _IProtobufWriter } from "./_IProtobufWriter";
|
|
2
|
+
/**
|
|
3
|
+
* Measures a Protocol Buffer message before it is written.
|
|
4
|
+
*
|
|
5
|
+
* It receives the same calls as {@link _ProtobufWriter}, counts the bytes and
|
|
6
|
+
* records the byte length of every string and length-delimited message, which
|
|
7
|
+
* the writer reads back in order. The writer then allocates exactly one
|
|
8
|
+
* buffer.
|
|
9
|
+
*
|
|
10
|
+
* @evidence contracts/common.md#principled-implementation The sizer replays the encoder's calls to compute the exact byte length and, for each string or length-delimited message, the prefix lengths, which the writer then consumes in the same order, so the buffer is allocated once and filled without a growth step. Varint lengths follow from the value ranges, a negative int32 takes ten bytes and 64-bit values are measured after reduction to an unsigned 64-bit pattern.
|
|
11
|
+
* @evidence contracts/common.md#clear-and-simple-design One class holding the total length, a position stack for open messages and the list of recorded lengths; its private varint measurers are shared by the scalar methods.
|
|
12
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The size rules are the protobuf wire format's, with no caller special-cased. An ldelim call without an open fork throws; callers must finish any forks they open.
|
|
13
|
+
* @evidence contracts/common.md#meaningful-documentation A comment explains the two-pass role with the writer, and the fields have comments.
|
|
14
|
+
*/
|
|
2
15
|
export declare class _ProtobufSizer implements _IProtobufWriter {
|
|
3
|
-
/** Total length. */
|
|
16
|
+
/** Total measured byte length, including length prefixes. */
|
|
4
17
|
len: number;
|
|
5
|
-
/**
|
|
18
|
+
/** Byte positions at which still-open messages started. */
|
|
6
19
|
readonly pos: Array<number>;
|
|
7
|
-
/**
|
|
20
|
+
/** String and message byte lengths in the writer's consumption order. */
|
|
8
21
|
readonly varlen: Array<number>;
|
|
9
|
-
/**
|
|
22
|
+
/** Reserved length-list indices for still-open messages. */
|
|
10
23
|
readonly varlenidx: Array<number>;
|
|
24
|
+
/** Start measuring from an optional existing byte count. */
|
|
11
25
|
constructor(length?: number);
|
|
26
|
+
/**
|
|
27
|
+
* Count one byte.
|
|
28
|
+
*
|
|
29
|
+
* @evidence contracts/common.md#principled-implementation A boolean always takes one byte.
|
|
30
|
+
* @evidence contracts/common.md#clear-and-simple-design One increment.
|
|
31
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts A fixed wire size.
|
|
32
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
33
|
+
*/
|
|
12
34
|
bool(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Count the varint of a signed 32-bit integer, which is ten bytes when
|
|
37
|
+
* negative.
|
|
38
|
+
*
|
|
39
|
+
* @evidence contracts/common.md#principled-implementation A negative value takes ten bytes because it is sign-extended to 64 bits, otherwise the varint length of the value is used.
|
|
40
|
+
* @evidence contracts/common.md#clear-and-simple-design One branch over the shared measurer.
|
|
41
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rule is the wire format's.
|
|
42
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
43
|
+
*/
|
|
13
44
|
int32(value: number): void;
|
|
45
|
+
/**
|
|
46
|
+
* Count the varint of the unsigned ZigZag form of a signed 32-bit integer.
|
|
47
|
+
*
|
|
48
|
+
* @evidence contracts/common.md#principled-implementation The ZigZag mapping is taken as an unsigned 32-bit value before measuring, so magnitudes of 2^30 or more are measured as five bytes and not as a negative number; the writer applies the same mapping.
|
|
49
|
+
* @evidence contracts/common.md#clear-and-simple-design One expression over the shared measurer.
|
|
50
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The mapping is the protobuf definition and is not special-cased.
|
|
51
|
+
* @evidence contracts/common.md#meaningful-documentation A comment states the unsigned mapping and the reason for it.
|
|
52
|
+
*/
|
|
14
53
|
sint32(value: number): void;
|
|
54
|
+
/**
|
|
55
|
+
* Count the varint of an unsigned 32-bit integer.
|
|
56
|
+
*
|
|
57
|
+
* @evidence contracts/common.md#principled-implementation The varint length of an unsigned 32-bit value, one to five bytes.
|
|
58
|
+
* @evidence contracts/common.md#clear-and-simple-design One delegation.
|
|
59
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rule is the wire format's.
|
|
60
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
61
|
+
*/
|
|
15
62
|
uint32(value: number): void;
|
|
63
|
+
/**
|
|
64
|
+
* Count the varint of a signed 64-bit integer.
|
|
65
|
+
*
|
|
66
|
+
* @evidence contracts/common.md#principled-implementation A number is converted to a bigint and measured as an unsigned 64-bit pattern, which gives ten bytes for a negative value.
|
|
67
|
+
* @evidence contracts/common.md#clear-and-simple-design One delegation to the 64-bit measurer.
|
|
68
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rule is the wire format's.
|
|
69
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
70
|
+
*/
|
|
16
71
|
int64(value: bigint | number): void;
|
|
72
|
+
/**
|
|
73
|
+
* Count the varint of the ZigZag form of a signed 64-bit integer.
|
|
74
|
+
*
|
|
75
|
+
* @evidence contracts/common.md#principled-implementation The ZigZag mapping on a bigint, `(n << 1) ^ (n >> 63)`, is measured as an unsigned 64-bit pattern.
|
|
76
|
+
* @evidence contracts/common.md#clear-and-simple-design One expression over the 64-bit measurer.
|
|
77
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The mapping is the protobuf definition.
|
|
78
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
79
|
+
*/
|
|
17
80
|
sint64(value: bigint | number): void;
|
|
81
|
+
/**
|
|
82
|
+
* Count the varint of an unsigned 64-bit integer.
|
|
83
|
+
*
|
|
84
|
+
* @evidence contracts/common.md#principled-implementation A number or bigint is measured as an unsigned 64-bit varint.
|
|
85
|
+
* @evidence contracts/common.md#clear-and-simple-design One delegation to the 64-bit measurer.
|
|
86
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rule is the wire format's.
|
|
87
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
88
|
+
*/
|
|
18
89
|
uint64(value: bigint | number): void;
|
|
90
|
+
/**
|
|
91
|
+
* Count four bytes.
|
|
92
|
+
*
|
|
93
|
+
* @evidence contracts/common.md#principled-implementation A float takes four bytes regardless of value.
|
|
94
|
+
* @evidence contracts/common.md#clear-and-simple-design One increment.
|
|
95
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts A fixed wire size.
|
|
96
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
97
|
+
*/
|
|
19
98
|
float(_value: number): void;
|
|
99
|
+
/**
|
|
100
|
+
* Count eight bytes.
|
|
101
|
+
*
|
|
102
|
+
* @evidence contracts/common.md#principled-implementation A double takes eight bytes regardless of value.
|
|
103
|
+
* @evidence contracts/common.md#clear-and-simple-design One increment.
|
|
104
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts A fixed wire size.
|
|
105
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
106
|
+
*/
|
|
20
107
|
double(_value: number): void;
|
|
108
|
+
/**
|
|
109
|
+
* Count the length prefix and the bytes.
|
|
110
|
+
*
|
|
111
|
+
* @evidence contracts/common.md#principled-implementation The length prefix is measured as an unsigned 32-bit varint and the byte length is added.
|
|
112
|
+
* @evidence contracts/common.md#clear-and-simple-design Two increments.
|
|
113
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rule is the wire format's.
|
|
114
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
115
|
+
*/
|
|
21
116
|
bytes(value: Uint8Array): void;
|
|
117
|
+
/**
|
|
118
|
+
* Count the length prefix and the UTF-8 bytes, and record the byte length for
|
|
119
|
+
* the writer.
|
|
120
|
+
*
|
|
121
|
+
* @evidence contracts/common.md#principled-implementation The UTF-8 byte length is measured by encoding through a Blob, recorded in the length list so the writer reuses it and not recomputes it, and added with its varint prefix.
|
|
122
|
+
* @evidence contracts/common.md#clear-and-simple-design One function using a module-level measuring helper.
|
|
123
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The measure counts UTF-8 bytes and not code units.
|
|
124
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
125
|
+
*/
|
|
22
126
|
string(value: string): void;
|
|
127
|
+
/**
|
|
128
|
+
* Save the position and reserve a length slot for a message that is starting.
|
|
129
|
+
*
|
|
130
|
+
* @evidence contracts/common.md#principled-implementation The current length and the length list's size are saved on stacks and a zero is reserved in the list, to be filled when the message ends.
|
|
131
|
+
* @evidence contracts/common.md#clear-and-simple-design Three stack operations.
|
|
132
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The bookkeeping is the two-pass design's.
|
|
133
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is saved.
|
|
134
|
+
*/
|
|
23
135
|
fork(): void;
|
|
136
|
+
/**
|
|
137
|
+
* Fill the reserved length slot with the size of the message that ends here,
|
|
138
|
+
* and count its length prefix.
|
|
139
|
+
*
|
|
140
|
+
* @throws Error when no `fork` is open
|
|
141
|
+
*
|
|
142
|
+
* @evidence contracts/common.md#principled-implementation The length of the message since its fork is stored in the reserved list slot and its varint prefix is counted; an unmatched call throws a typed error instead of corrupting the stacks.
|
|
143
|
+
* @evidence contracts/common.md#clear-and-simple-design One function paired with fork.
|
|
144
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The unmatched case throws rather than being tolerated.
|
|
145
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is recorded.
|
|
146
|
+
*/
|
|
24
147
|
ldelim(): void;
|
|
148
|
+
/**
|
|
149
|
+
* Clear the counters and stacks so the sizer can measure another message.
|
|
150
|
+
*
|
|
151
|
+
* @evidence contracts/common.md#principled-implementation The counters and stacks are cleared in place, so the same sizer can measure another message without allocating new arrays.
|
|
152
|
+
* @evidence contracts/common.md#clear-and-simple-design Four assignments.
|
|
153
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No hidden state is kept.
|
|
154
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states that the arrays are reused.
|
|
155
|
+
*/
|
|
25
156
|
reset(): void;
|
|
26
157
|
private varint32;
|
|
27
158
|
private varint64;
|
|
@@ -2,16 +2,47 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports._ProtobufSizer = void 0;
|
|
4
4
|
/// @reference https://github.com/piotr-oles/as-proto/blob/main/packages/as-proto/assembly/internal/FixedSizer.ts
|
|
5
|
+
/**
|
|
6
|
+
* Measures a Protocol Buffer message before it is written.
|
|
7
|
+
*
|
|
8
|
+
* It receives the same calls as {@link _ProtobufWriter}, counts the bytes and
|
|
9
|
+
* records the byte length of every string and length-delimited message, which
|
|
10
|
+
* the writer reads back in order. The writer then allocates exactly one
|
|
11
|
+
* buffer.
|
|
12
|
+
*
|
|
13
|
+
* @evidence contracts/common.md#principled-implementation The sizer replays the encoder's calls to compute the exact byte length and, for each string or length-delimited message, the prefix lengths, which the writer then consumes in the same order, so the buffer is allocated once and filled without a growth step. Varint lengths follow from the value ranges, a negative int32 takes ten bytes and 64-bit values are measured after reduction to an unsigned 64-bit pattern.
|
|
14
|
+
* @evidence contracts/common.md#clear-and-simple-design One class holding the total length, a position stack for open messages and the list of recorded lengths; its private varint measurers are shared by the scalar methods.
|
|
15
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The size rules are the protobuf wire format's, with no caller special-cased. An ldelim call without an open fork throws; callers must finish any forks they open.
|
|
16
|
+
* @evidence contracts/common.md#meaningful-documentation A comment explains the two-pass role with the writer, and the fields have comments.
|
|
17
|
+
*/
|
|
5
18
|
class _ProtobufSizer {
|
|
19
|
+
/** Start measuring from an optional existing byte count. */
|
|
6
20
|
constructor(length = 0) {
|
|
7
21
|
this.len = length;
|
|
8
22
|
this.pos = [];
|
|
9
23
|
this.varlen = [];
|
|
10
24
|
this.varlenidx = [];
|
|
11
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Count one byte.
|
|
28
|
+
*
|
|
29
|
+
* @evidence contracts/common.md#principled-implementation A boolean always takes one byte.
|
|
30
|
+
* @evidence contracts/common.md#clear-and-simple-design One increment.
|
|
31
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts A fixed wire size.
|
|
32
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
33
|
+
*/
|
|
12
34
|
bool() {
|
|
13
35
|
this.len += 1;
|
|
14
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Count the varint of a signed 32-bit integer, which is ten bytes when
|
|
39
|
+
* negative.
|
|
40
|
+
*
|
|
41
|
+
* @evidence contracts/common.md#principled-implementation A negative value takes ten bytes because it is sign-extended to 64 bits, otherwise the varint length of the value is used.
|
|
42
|
+
* @evidence contracts/common.md#clear-and-simple-design One branch over the shared measurer.
|
|
43
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rule is the wire format's.
|
|
44
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
45
|
+
*/
|
|
15
46
|
int32(value) {
|
|
16
47
|
if (value < 0) {
|
|
17
48
|
// 10 bytes to encode negative number
|
|
@@ -21,20 +52,61 @@ class _ProtobufSizer {
|
|
|
21
52
|
this.varint32(value);
|
|
22
53
|
}
|
|
23
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Count the varint of the unsigned ZigZag form of a signed 32-bit integer.
|
|
57
|
+
*
|
|
58
|
+
* @evidence contracts/common.md#principled-implementation The ZigZag mapping is taken as an unsigned 32-bit value before measuring, so magnitudes of 2^30 or more are measured as five bytes and not as a negative number; the writer applies the same mapping.
|
|
59
|
+
* @evidence contracts/common.md#clear-and-simple-design One expression over the shared measurer.
|
|
60
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The mapping is the protobuf definition and is not special-cased.
|
|
61
|
+
* @evidence contracts/common.md#meaningful-documentation A comment states the unsigned mapping and the reason for it.
|
|
62
|
+
*/
|
|
24
63
|
sint32(value) {
|
|
25
|
-
|
|
26
|
-
|
|
64
|
+
// The ZigZag value is unsigned, so it never takes the negative-number length.
|
|
65
|
+
this.varint32(((value << 1) ^ (value >> 31)) >>> 0);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Count the varint of an unsigned 32-bit integer.
|
|
69
|
+
*
|
|
70
|
+
* @evidence contracts/common.md#principled-implementation The varint length of an unsigned 32-bit value, one to five bytes.
|
|
71
|
+
* @evidence contracts/common.md#clear-and-simple-design One delegation.
|
|
72
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rule is the wire format's.
|
|
73
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
74
|
+
*/
|
|
27
75
|
uint32(value) {
|
|
28
76
|
this.varint32(value);
|
|
29
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Count the varint of a signed 64-bit integer.
|
|
80
|
+
*
|
|
81
|
+
* @evidence contracts/common.md#principled-implementation A number is converted to a bigint and measured as an unsigned 64-bit pattern, which gives ten bytes for a negative value.
|
|
82
|
+
* @evidence contracts/common.md#clear-and-simple-design One delegation to the 64-bit measurer.
|
|
83
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rule is the wire format's.
|
|
84
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
85
|
+
*/
|
|
30
86
|
int64(value) {
|
|
31
87
|
this.varint64(typeof value === "number" ? BigInt(value) : value);
|
|
32
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* Count the varint of the ZigZag form of a signed 64-bit integer.
|
|
91
|
+
*
|
|
92
|
+
* @evidence contracts/common.md#principled-implementation The ZigZag mapping on a bigint, `(n << 1) ^ (n >> 63)`, is measured as an unsigned 64-bit pattern.
|
|
93
|
+
* @evidence contracts/common.md#clear-and-simple-design One expression over the 64-bit measurer.
|
|
94
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The mapping is the protobuf definition.
|
|
95
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
96
|
+
*/
|
|
33
97
|
sint64(value) {
|
|
34
98
|
if (typeof value === "number")
|
|
35
99
|
value = BigInt(value);
|
|
36
100
|
this.varint64((value << BigInt(1)) ^ (value >> BigInt(63)));
|
|
37
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* Count the varint of an unsigned 64-bit integer.
|
|
104
|
+
*
|
|
105
|
+
* @evidence contracts/common.md#principled-implementation A number or bigint is measured as an unsigned 64-bit varint.
|
|
106
|
+
* @evidence contracts/common.md#clear-and-simple-design One delegation to the 64-bit measurer.
|
|
107
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rule is the wire format's.
|
|
108
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
109
|
+
*/
|
|
38
110
|
uint64(value) {
|
|
39
111
|
this.varint64(typeof value === "number" ? BigInt(value) : value);
|
|
40
112
|
}
|
|
@@ -50,27 +122,79 @@ class _ProtobufSizer {
|
|
|
50
122
|
// public sfixed64(_value: number | bigint): void {
|
|
51
123
|
// this.len += 8;
|
|
52
124
|
// }
|
|
125
|
+
/**
|
|
126
|
+
* Count four bytes.
|
|
127
|
+
*
|
|
128
|
+
* @evidence contracts/common.md#principled-implementation A float takes four bytes regardless of value.
|
|
129
|
+
* @evidence contracts/common.md#clear-and-simple-design One increment.
|
|
130
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts A fixed wire size.
|
|
131
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
132
|
+
*/
|
|
53
133
|
float(_value) {
|
|
54
134
|
this.len += 4;
|
|
55
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Count eight bytes.
|
|
138
|
+
*
|
|
139
|
+
* @evidence contracts/common.md#principled-implementation A double takes eight bytes regardless of value.
|
|
140
|
+
* @evidence contracts/common.md#clear-and-simple-design One increment.
|
|
141
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts A fixed wire size.
|
|
142
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
143
|
+
*/
|
|
56
144
|
double(_value) {
|
|
57
145
|
this.len += 8;
|
|
58
146
|
}
|
|
147
|
+
/**
|
|
148
|
+
* Count the length prefix and the bytes.
|
|
149
|
+
*
|
|
150
|
+
* @evidence contracts/common.md#principled-implementation The length prefix is measured as an unsigned 32-bit varint and the byte length is added.
|
|
151
|
+
* @evidence contracts/common.md#clear-and-simple-design Two increments.
|
|
152
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rule is the wire format's.
|
|
153
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
154
|
+
*/
|
|
59
155
|
bytes(value) {
|
|
60
156
|
this.uint32(value.byteLength);
|
|
61
157
|
this.len += value.byteLength;
|
|
62
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* Count the length prefix and the UTF-8 bytes, and record the byte length for
|
|
161
|
+
* the writer.
|
|
162
|
+
*
|
|
163
|
+
* @evidence contracts/common.md#principled-implementation The UTF-8 byte length is measured by encoding through a Blob, recorded in the length list so the writer reuses it and not recomputes it, and added with its varint prefix.
|
|
164
|
+
* @evidence contracts/common.md#clear-and-simple-design One function using a module-level measuring helper.
|
|
165
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The measure counts UTF-8 bytes and not code units.
|
|
166
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
167
|
+
*/
|
|
63
168
|
string(value) {
|
|
64
169
|
const len = strlen(value);
|
|
65
170
|
this.varlen.push(len);
|
|
66
171
|
this.uint32(len);
|
|
67
172
|
this.len += len;
|
|
68
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
* Save the position and reserve a length slot for a message that is starting.
|
|
176
|
+
*
|
|
177
|
+
* @evidence contracts/common.md#principled-implementation The current length and the length list's size are saved on stacks and a zero is reserved in the list, to be filled when the message ends.
|
|
178
|
+
* @evidence contracts/common.md#clear-and-simple-design Three stack operations.
|
|
179
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The bookkeeping is the two-pass design's.
|
|
180
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is saved.
|
|
181
|
+
*/
|
|
69
182
|
fork() {
|
|
70
183
|
this.pos.push(this.len); // save current position
|
|
71
184
|
this.varlenidx.push(this.varlen.length); // save current index in varlen array
|
|
72
185
|
this.varlen.push(0); // add 0 length to varlen array (to be updated in ldelim())
|
|
73
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* Fill the reserved length slot with the size of the message that ends here,
|
|
189
|
+
* and count its length prefix.
|
|
190
|
+
*
|
|
191
|
+
* @throws Error when no `fork` is open
|
|
192
|
+
*
|
|
193
|
+
* @evidence contracts/common.md#principled-implementation The length of the message since its fork is stored in the reserved list slot and its varint prefix is counted; an unmatched call throws a typed error instead of corrupting the stacks.
|
|
194
|
+
* @evidence contracts/common.md#clear-and-simple-design One function paired with fork.
|
|
195
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The unmatched case throws rather than being tolerated.
|
|
196
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is recorded.
|
|
197
|
+
*/
|
|
74
198
|
ldelim() {
|
|
75
199
|
if (!(this.pos.length && this.varlenidx.length))
|
|
76
200
|
throw new Error("Error on typia.protobuf.encode(): missing fork() before ldelim() call.");
|
|
@@ -81,6 +205,14 @@ class _ProtobufSizer {
|
|
|
81
205
|
this.varlen[idx] = len; // update variable length
|
|
82
206
|
this.uint32(len); // add uint32 that should be called in fork()
|
|
83
207
|
}
|
|
208
|
+
/**
|
|
209
|
+
* Clear the counters and stacks so the sizer can measure another message.
|
|
210
|
+
*
|
|
211
|
+
* @evidence contracts/common.md#principled-implementation The counters and stacks are cleared in place, so the same sizer can measure another message without allocating new arrays.
|
|
212
|
+
* @evidence contracts/common.md#clear-and-simple-design Four assignments.
|
|
213
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No hidden state is kept.
|
|
214
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states that the arrays are reused.
|
|
215
|
+
*/
|
|
84
216
|
reset() {
|
|
85
217
|
this.len = 0;
|
|
86
218
|
// re-use arrays
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_ProtobufSizer.js","sourceRoot":"","sources":["../../src/internal/_ProtobufSizer.ts"],"names":[],"mappings":";;;AAEA,iHAAiH;AACjH;IAaE,YAAmB,MAAM,GAAW,CAAC;QACnC,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC;QAClB,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACd,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IACtB,CAAC;
|
|
1
|
+
{"version":3,"file":"_ProtobufSizer.js","sourceRoot":"","sources":["../../src/internal/_ProtobufSizer.ts"],"names":[],"mappings":";;;AAEA,iHAAiH;AACjH;;;;;;;;;;;;GAYG;AACH;IAaE,4DAA4D;IAC5D,YAAmB,MAAM,GAAW,CAAC;QACnC,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC;QAClB,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACd,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IACtB,CAAC;IAED;;;;;;;OAOG;IACI,IAAI;QACT,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IAChB,CAAC;IACD;;;;;;;;OAQG;IACI,KAAK,CAAC,KAAa;QACxB,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;YACd,qCAAqC;YACrC,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC;QACjB,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IACD;;;;;;;OAOG;IACI,MAAM,CAAC,KAAa;QACzB,8EAA8E;QAC9E,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IACtD,CAAC;IACD;;;;;;;OAOG;IACI,MAAM,CAAC,KAAa;QACzB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACI,KAAK,CAAC,KAAsB;QACjC,IAAI,CAAC,QAAQ,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACnE,CAAC;IACD;;;;;;;OAOG;IACI,MAAM,CAAC,KAAsB;QAClC,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QACrD,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC9D,CAAC;IACD;;;;;;;OAOG;IACI,MAAM,CAAC,KAAsB;QAClC,IAAI,CAAC,QAAQ,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACnE,CAAC;IAED,yCAAyC;IACzC,qBAAqB;IACrB,IAAI;IACJ,0CAA0C;IAC1C,qBAAqB;IACrB,IAAI;IACJ,kDAAkD;IAClD,qBAAqB;IACrB,IAAI;IACJ,mDAAmD;IACnD,qBAAqB;IACrB,IAAI;IACJ;;;;;;;OAOG;IACI,KAAK,CAAC,MAAc;QACzB,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IAChB,CAAC;IACD;;;;;;;OAOG;IACI,MAAM,CAAC,MAAc;QAC1B,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACI,KAAK,CAAC,KAAiB;QAC5B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC9B,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,UAAU,CAAC;IAC/B,CAAC;IACD;;;;;;;;OAQG;IACI,MAAM,CAAC,KAAa;QACzB,MAAM,GAAG,GAAW,MAAM,CAAC,KAAK,CAAC,CAAC;QAClC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACtB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACjB,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC;IAClB,CAAC;IAED;;;;;;;OAOG;IACI,IAAI;QACT,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,wBAAwB;QACjD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,qCAAqC;QAC9E,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,2DAA2D;IAClF,CAAC;IAED;;;;;;;;;;OAUG;IACI,MAAM;QACX,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;YAC7C,MAAM,IAAI,KAAK,CACb,wEAAwE,CACzE,CAAC;QAEJ,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,mCAAmC;QAC5D,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAG,CAAC,CAAC,gCAAgC;QAClE,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,EAAG,CAAC,CAAC,8BAA8B;QACjE,MAAM,GAAG,GAAG,MAAM,GAAG,QAAQ,CAAC,CAAC,mBAAmB;QAElD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,yBAAyB;QACjD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,6CAA6C;IACjE,CAAC;IAED;;;;;;;OAOG;IACI,KAAK;QACV,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;QACb,gBAAgB;QAChB,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;QACvB,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;IAC5B,CAAC;IAEO,QAAQ,CAAC,KAAa;QAC5B,IAAI,CAAC,GAAG;YACN,KAAK,GAAG,CAAC;gBACP,CAAC,CAAC,EAAE,CAAC,2BAA2B;gBAChC,CAAC,CAAC,KAAK,GAAG,IAAI;oBACZ,CAAC,CAAC,CAAC;oBACH,CAAC,CAAC,KAAK,GAAG,MAAM;wBACd,CAAC,CAAC,CAAC;wBACH,CAAC,CAAC,KAAK,GAAG,QAAQ;4BAChB,CAAC,CAAC,CAAC;4BACH,CAAC,CAAC,KAAK,GAAG,UAAU;gCAClB,CAAC,CAAC,CAAC;gCACH,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAEO,QAAQ,CAAC,GAAW;QAC1B,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;QAC9B,OAAO,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1B,EAAE,IAAI,CAAC,GAAG,CAAC;YACX,GAAG,GAAG,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;QACD,EAAE,IAAI,CAAC,GAAG,CAAC;IACb,CAAC;CACF;;AAED,MAAM,MAAM,GAAG,CAAC,GAAW,EAAU,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC"}
|
|
@@ -1,55 +1,178 @@
|
|
|
1
1
|
//#region src/internal/_ProtobufSizer.ts
|
|
2
|
+
/**
|
|
3
|
+
* Measures a Protocol Buffer message before it is written.
|
|
4
|
+
*
|
|
5
|
+
* It receives the same calls as {@link _ProtobufWriter}, counts the bytes and
|
|
6
|
+
* records the byte length of every string and length-delimited message, which
|
|
7
|
+
* the writer reads back in order. The writer then allocates exactly one
|
|
8
|
+
* buffer.
|
|
9
|
+
*
|
|
10
|
+
* @evidence contracts/common.md#principled-implementation The sizer replays the encoder's calls to compute the exact byte length and, for each string or length-delimited message, the prefix lengths, which the writer then consumes in the same order, so the buffer is allocated once and filled without a growth step. Varint lengths follow from the value ranges, a negative int32 takes ten bytes and 64-bit values are measured after reduction to an unsigned 64-bit pattern.
|
|
11
|
+
* @evidence contracts/common.md#clear-and-simple-design One class holding the total length, a position stack for open messages and the list of recorded lengths; its private varint measurers are shared by the scalar methods.
|
|
12
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The size rules are the protobuf wire format's, with no caller special-cased. An ldelim call without an open fork throws; callers must finish any forks they open.
|
|
13
|
+
* @evidence contracts/common.md#meaningful-documentation A comment explains the two-pass role with the writer, and the fields have comments.
|
|
14
|
+
*/
|
|
2
15
|
var _ProtobufSizer = class {
|
|
16
|
+
/** Start measuring from an optional existing byte count. */
|
|
3
17
|
constructor(length = 0) {
|
|
4
18
|
this.len = length;
|
|
5
19
|
this.pos = [];
|
|
6
20
|
this.varlen = [];
|
|
7
21
|
this.varlenidx = [];
|
|
8
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Count one byte.
|
|
25
|
+
*
|
|
26
|
+
* @evidence contracts/common.md#principled-implementation A boolean always takes one byte.
|
|
27
|
+
* @evidence contracts/common.md#clear-and-simple-design One increment.
|
|
28
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts A fixed wire size.
|
|
29
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
30
|
+
*/
|
|
9
31
|
bool() {
|
|
10
32
|
this.len += 1;
|
|
11
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Count the varint of a signed 32-bit integer, which is ten bytes when
|
|
36
|
+
* negative.
|
|
37
|
+
*
|
|
38
|
+
* @evidence contracts/common.md#principled-implementation A negative value takes ten bytes because it is sign-extended to 64 bits, otherwise the varint length of the value is used.
|
|
39
|
+
* @evidence contracts/common.md#clear-and-simple-design One branch over the shared measurer.
|
|
40
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rule is the wire format's.
|
|
41
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
42
|
+
*/
|
|
12
43
|
int32(value) {
|
|
13
44
|
if (value < 0) this.len += 10;
|
|
14
45
|
else this.varint32(value);
|
|
15
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Count the varint of the unsigned ZigZag form of a signed 32-bit integer.
|
|
49
|
+
*
|
|
50
|
+
* @evidence contracts/common.md#principled-implementation The ZigZag mapping is taken as an unsigned 32-bit value before measuring, so magnitudes of 2^30 or more are measured as five bytes and not as a negative number; the writer applies the same mapping.
|
|
51
|
+
* @evidence contracts/common.md#clear-and-simple-design One expression over the shared measurer.
|
|
52
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The mapping is the protobuf definition and is not special-cased.
|
|
53
|
+
* @evidence contracts/common.md#meaningful-documentation A comment states the unsigned mapping and the reason for it.
|
|
54
|
+
*/
|
|
16
55
|
sint32(value) {
|
|
17
|
-
this.varint32(value << 1 ^ value >> 31);
|
|
18
|
-
}
|
|
56
|
+
this.varint32((value << 1 ^ value >> 31) >>> 0);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Count the varint of an unsigned 32-bit integer.
|
|
60
|
+
*
|
|
61
|
+
* @evidence contracts/common.md#principled-implementation The varint length of an unsigned 32-bit value, one to five bytes.
|
|
62
|
+
* @evidence contracts/common.md#clear-and-simple-design One delegation.
|
|
63
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rule is the wire format's.
|
|
64
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
65
|
+
*/
|
|
19
66
|
uint32(value) {
|
|
20
67
|
this.varint32(value);
|
|
21
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Count the varint of a signed 64-bit integer.
|
|
71
|
+
*
|
|
72
|
+
* @evidence contracts/common.md#principled-implementation A number is converted to a bigint and measured as an unsigned 64-bit pattern, which gives ten bytes for a negative value.
|
|
73
|
+
* @evidence contracts/common.md#clear-and-simple-design One delegation to the 64-bit measurer.
|
|
74
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rule is the wire format's.
|
|
75
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
76
|
+
*/
|
|
22
77
|
int64(value) {
|
|
23
78
|
this.varint64(typeof value === "number" ? BigInt(value) : value);
|
|
24
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Count the varint of the ZigZag form of a signed 64-bit integer.
|
|
82
|
+
*
|
|
83
|
+
* @evidence contracts/common.md#principled-implementation The ZigZag mapping on a bigint, `(n << 1) ^ (n >> 63)`, is measured as an unsigned 64-bit pattern.
|
|
84
|
+
* @evidence contracts/common.md#clear-and-simple-design One expression over the 64-bit measurer.
|
|
85
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The mapping is the protobuf definition.
|
|
86
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
87
|
+
*/
|
|
25
88
|
sint64(value) {
|
|
26
89
|
if (typeof value === "number") value = BigInt(value);
|
|
27
90
|
this.varint64(value << BigInt(1) ^ value >> BigInt(63));
|
|
28
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* Count the varint of an unsigned 64-bit integer.
|
|
94
|
+
*
|
|
95
|
+
* @evidence contracts/common.md#principled-implementation A number or bigint is measured as an unsigned 64-bit varint.
|
|
96
|
+
* @evidence contracts/common.md#clear-and-simple-design One delegation to the 64-bit measurer.
|
|
97
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rule is the wire format's.
|
|
98
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
99
|
+
*/
|
|
29
100
|
uint64(value) {
|
|
30
101
|
this.varint64(typeof value === "number" ? BigInt(value) : value);
|
|
31
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* Count four bytes.
|
|
105
|
+
*
|
|
106
|
+
* @evidence contracts/common.md#principled-implementation A float takes four bytes regardless of value.
|
|
107
|
+
* @evidence contracts/common.md#clear-and-simple-design One increment.
|
|
108
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts A fixed wire size.
|
|
109
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
110
|
+
*/
|
|
32
111
|
float(_value) {
|
|
33
112
|
this.len += 4;
|
|
34
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Count eight bytes.
|
|
116
|
+
*
|
|
117
|
+
* @evidence contracts/common.md#principled-implementation A double takes eight bytes regardless of value.
|
|
118
|
+
* @evidence contracts/common.md#clear-and-simple-design One increment.
|
|
119
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts A fixed wire size.
|
|
120
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
121
|
+
*/
|
|
35
122
|
double(_value) {
|
|
36
123
|
this.len += 8;
|
|
37
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* Count the length prefix and the bytes.
|
|
127
|
+
*
|
|
128
|
+
* @evidence contracts/common.md#principled-implementation The length prefix is measured as an unsigned 32-bit varint and the byte length is added.
|
|
129
|
+
* @evidence contracts/common.md#clear-and-simple-design Two increments.
|
|
130
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The rule is the wire format's.
|
|
131
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
132
|
+
*/
|
|
38
133
|
bytes(value) {
|
|
39
134
|
this.uint32(value.byteLength);
|
|
40
135
|
this.len += value.byteLength;
|
|
41
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* Count the length prefix and the UTF-8 bytes, and record the byte length for
|
|
139
|
+
* the writer.
|
|
140
|
+
*
|
|
141
|
+
* @evidence contracts/common.md#principled-implementation The UTF-8 byte length is measured by encoding through a Blob, recorded in the length list so the writer reuses it and not recomputes it, and added with its varint prefix.
|
|
142
|
+
* @evidence contracts/common.md#clear-and-simple-design One function using a module-level measuring helper.
|
|
143
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The measure counts UTF-8 bytes and not code units.
|
|
144
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.
|
|
145
|
+
*/
|
|
42
146
|
string(value) {
|
|
43
147
|
const len = strlen(value);
|
|
44
148
|
this.varlen.push(len);
|
|
45
149
|
this.uint32(len);
|
|
46
150
|
this.len += len;
|
|
47
151
|
}
|
|
152
|
+
/**
|
|
153
|
+
* Save the position and reserve a length slot for a message that is starting.
|
|
154
|
+
*
|
|
155
|
+
* @evidence contracts/common.md#principled-implementation The current length and the length list's size are saved on stacks and a zero is reserved in the list, to be filled when the message ends.
|
|
156
|
+
* @evidence contracts/common.md#clear-and-simple-design Three stack operations.
|
|
157
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The bookkeeping is the two-pass design's.
|
|
158
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is saved.
|
|
159
|
+
*/
|
|
48
160
|
fork() {
|
|
49
161
|
this.pos.push(this.len);
|
|
50
162
|
this.varlenidx.push(this.varlen.length);
|
|
51
163
|
this.varlen.push(0);
|
|
52
164
|
}
|
|
165
|
+
/**
|
|
166
|
+
* Fill the reserved length slot with the size of the message that ends here,
|
|
167
|
+
* and count its length prefix.
|
|
168
|
+
*
|
|
169
|
+
* @throws Error when no `fork` is open
|
|
170
|
+
*
|
|
171
|
+
* @evidence contracts/common.md#principled-implementation The length of the message since its fork is stored in the reserved list slot and its varint prefix is counted; an unmatched call throws a typed error instead of corrupting the stacks.
|
|
172
|
+
* @evidence contracts/common.md#clear-and-simple-design One function paired with fork.
|
|
173
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The unmatched case throws rather than being tolerated.
|
|
174
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states what is recorded.
|
|
175
|
+
*/
|
|
53
176
|
ldelim() {
|
|
54
177
|
if (!(this.pos.length && this.varlenidx.length)) throw new Error("Error on typia.protobuf.encode(): missing fork() before ldelim() call.");
|
|
55
178
|
const endPos = this.len;
|
|
@@ -59,6 +182,14 @@ var _ProtobufSizer = class {
|
|
|
59
182
|
this.varlen[idx] = len;
|
|
60
183
|
this.uint32(len);
|
|
61
184
|
}
|
|
185
|
+
/**
|
|
186
|
+
* Clear the counters and stacks so the sizer can measure another message.
|
|
187
|
+
*
|
|
188
|
+
* @evidence contracts/common.md#principled-implementation The counters and stacks are cleared in place, so the same sizer can measure another message without allocating new arrays.
|
|
189
|
+
* @evidence contracts/common.md#clear-and-simple-design Four assignments.
|
|
190
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No hidden state is kept.
|
|
191
|
+
* @evidence contracts/common.md#meaningful-documentation A one-line comment states that the arrays are reused.
|
|
192
|
+
*/
|
|
62
193
|
reset() {
|
|
63
194
|
this.len = 0;
|
|
64
195
|
this.pos.length = 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_ProtobufSizer.mjs","names":[],"sources":["../../src/internal/_ProtobufSizer.ts"],"sourcesContent":["import { _IProtobufWriter } from \"./_IProtobufWriter\";\n\n/// @reference https://github.com/piotr-oles/as-proto/blob/main/packages/as-proto/assembly/internal/FixedSizer.ts\nexport class _ProtobufSizer implements _IProtobufWriter {\n /** Total length. */\n public len: number;\n\n /** Position stack. */\n public readonly pos: Array<number>;\n\n /** Variable length list. */\n public readonly varlen: Array<number>;\n\n /** Variable length index stack. */\n public readonly varlenidx: Array<number>;\n\n public constructor(length: number = 0) {\n this.len = length;\n this.pos = [];\n this.varlen = [];\n this.varlenidx = [];\n }\n\n public bool(): void {\n this.len += 1;\n }\n public int32(value: number): void {\n if (value < 0) {\n // 10 bytes to encode negative number\n this.len += 10;\n } else {\n this.varint32(value);\n }\n }\n public sint32(value: number): void {\n this.varint32((value << 1) ^ (value >> 31));\n }\n public uint32(value: number): void {\n this.varint32(value);\n }\n\n public int64(value: bigint | number): void {\n this.varint64(typeof value === \"number\" ? BigInt(value) : value);\n }\n public sint64(value: bigint | number): void {\n if (typeof value === \"number\") value = BigInt(value);\n this.varint64((value << BigInt(1)) ^ (value >> BigInt(63)));\n }\n public uint64(value: bigint | number): void {\n this.varint64(typeof value === \"number\" ? BigInt(value) : value);\n }\n\n // public fixed32(_value: number): void {\n // this.len += 4;\n // }\n // public sfixed32(_value: number): void {\n // this.len += 4;\n // }\n // public fixed64(_value: number | bigint): void {\n // this.len += 8;\n // }\n // public sfixed64(_value: number | bigint): void {\n // this.len += 8;\n // }\n public float(_value: number): void {\n this.len += 4;\n }\n public double(_value: number): void {\n this.len += 8;\n }\n\n public bytes(value: Uint8Array): void {\n this.uint32(value.byteLength);\n this.len += value.byteLength;\n }\n public string(value: string): void {\n const len: number = strlen(value);\n this.varlen.push(len);\n this.uint32(len);\n this.len += len;\n }\n\n public fork(): void {\n this.pos.push(this.len); // save current position\n this.varlenidx.push(this.varlen.length); // save current index in varlen array\n this.varlen.push(0); // add 0 length to varlen array (to be updated in ldelim())\n }\n\n public ldelim(): void {\n if (!(this.pos.length && this.varlenidx.length))\n throw new Error(\n \"Error on typia.protobuf.encode(): missing fork() before ldelim() call.\",\n );\n\n const endPos = this.len; // current position is end position\n const startPos = this.pos.pop()!; // get start position from stack\n const idx = this.varlenidx.pop()!; // get varlen index from stack\n const len = endPos - startPos; // calculate length\n\n this.varlen[idx] = len; // update variable length\n this.uint32(len); // add uint32 that should be called in fork()\n }\n\n public reset(): void {\n this.len = 0;\n // re-use arrays\n this.pos.length = 0;\n this.varlen.length = 0;\n this.varlenidx.length = 0;\n }\n\n private varint32(value: number): void {\n this.len +=\n value < 0\n ? 10 // 10 bits with leading 1's\n : value < 0x80\n ? 1\n : value < 0x4000\n ? 2\n : value < 0x200000\n ? 3\n : value < 0x10000000\n ? 4\n : 5;\n }\n\n private varint64(val: bigint): void {\n val = BigInt.asUintN(64, val);\n while (val > BigInt(0x7f)) {\n ++this.len;\n val = val >> BigInt(0x07);\n }\n ++this.len;\n }\n}\n\nconst strlen = (str: string): number => new Blob([str]).size;\n"],"mappings":";AAGA,IAAa,iBAAb,MAAwD;CAatD,YAAmB,SAAiB,GAAG;EACrC,KAAK,MAAM;EACX,KAAK,MAAM,CAAC;EACZ,KAAK,SAAS,CAAC;EACf,KAAK,YAAY,CAAC;CACpB;CAEA,OAAoB;EAClB,KAAK,OAAO;CACd;CACA,MAAa,OAAqB;EAChC,IAAI,QAAQ,GAEV,KAAK,OAAO;OAEZ,KAAK,SAAS,KAAK;CAEvB;CACA,OAAc,OAAqB;EACjC,KAAK,SAAU,SAAS,IAAM,SAAS,EAAG;CAC5C;CACA,OAAc,OAAqB;EACjC,KAAK,SAAS,KAAK;CACrB;CAEA,MAAa,OAA8B;EACzC,KAAK,SAAS,OAAO,UAAU,WAAW,OAAO,KAAK,IAAI,KAAK;CACjE;CACA,OAAc,OAA8B;EAC1C,IAAI,OAAO,UAAU,UAAU,QAAQ,OAAO,KAAK;EACnD,KAAK,SAAU,SAAS,OAAO,CAAC,IAAM,SAAS,OAAO,EAAE,CAAE;CAC5D;CACA,OAAc,OAA8B;EAC1C,KAAK,SAAS,OAAO,UAAU,WAAW,OAAO,KAAK,IAAI,KAAK;CACjE;CAcA,MAAa,QAAsB;EACjC,KAAK,OAAO;CACd;CACA,OAAc,QAAsB;EAClC,KAAK,OAAO;CACd;CAEA,MAAa,OAAyB;EACpC,KAAK,OAAO,MAAM,UAAU;EAC5B,KAAK,OAAO,MAAM;CACpB;CACA,OAAc,OAAqB;EACjC,MAAM,MAAc,OAAO,KAAK;EAChC,KAAK,OAAO,KAAK,GAAG;EACpB,KAAK,OAAO,GAAG;EACf,KAAK,OAAO;CACd;CAEA,OAAoB;EAClB,KAAK,IAAI,KAAK,KAAK,GAAG;EACtB,KAAK,UAAU,KAAK,KAAK,OAAO,MAAM;EACtC,KAAK,OAAO,KAAK,CAAC;CACpB;CAEA,SAAsB;EACpB,IAAI,EAAE,KAAK,IAAI,UAAU,KAAK,UAAU,SACtC,MAAM,IAAI,MACR,wEACF;EAEF,MAAM,SAAS,KAAK;EACpB,MAAM,WAAW,KAAK,IAAI,IAAI;EAC9B,MAAM,MAAM,KAAK,UAAU,IAAI;EAC/B,MAAM,MAAM,SAAS;EAErB,KAAK,OAAO,OAAO;EACnB,KAAK,OAAO,GAAG;CACjB;CAEA,QAAqB;EACnB,KAAK,MAAM;EAEX,KAAK,IAAI,SAAS;EAClB,KAAK,OAAO,SAAS;EACrB,KAAK,UAAU,SAAS;CAC1B;CAEA,SAAiB,OAAqB;EACpC,KAAK,OACH,QAAQ,IACJ,KACA,QAAQ,MACN,IACA,QAAQ,QACN,IACA,QAAQ,UACN,IACA,QAAQ,YACN,IACA;CAChB;CAEA,SAAiB,KAAmB;EAClC,MAAM,OAAO,QAAQ,IAAI,GAAG;EAC5B,OAAO,MAAM,OAAO,GAAI,GAAG;GACzB,EAAE,KAAK;GACP,MAAM,OAAO,OAAO,CAAI;EAC1B;EACA,EAAE,KAAK;CACT;AACF;AAEA,MAAM,UAAU,QAAwB,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"_ProtobufSizer.mjs","names":[],"sources":["../../src/internal/_ProtobufSizer.ts"],"sourcesContent":["import { _IProtobufWriter } from \"./_IProtobufWriter\";\n\n/// @reference https://github.com/piotr-oles/as-proto/blob/main/packages/as-proto/assembly/internal/FixedSizer.ts\n/**\n * Measures a Protocol Buffer message before it is written.\n *\n * It receives the same calls as {@link _ProtobufWriter}, counts the bytes and\n * records the byte length of every string and length-delimited message, which\n * the writer reads back in order. The writer then allocates exactly one\n * buffer.\n *\n * @evidence contracts/common.md#principled-implementation The sizer replays the encoder's calls to compute the exact byte length and, for each string or length-delimited message, the prefix lengths, which the writer then consumes in the same order, so the buffer is allocated once and filled without a growth step. Varint lengths follow from the value ranges, a negative int32 takes ten bytes and 64-bit values are measured after reduction to an unsigned 64-bit pattern.\n * @evidence contracts/common.md#clear-and-simple-design One class holding the total length, a position stack for open messages and the list of recorded lengths; its private varint measurers are shared by the scalar methods.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The size rules are the protobuf wire format's, with no caller special-cased. An ldelim call without an open fork throws; callers must finish any forks they open.\n * @evidence contracts/common.md#meaningful-documentation A comment explains the two-pass role with the writer, and the fields have comments.\n */\nexport class _ProtobufSizer implements _IProtobufWriter {\n /** Total measured byte length, including length prefixes. */\n public len: number;\n\n /** Byte positions at which still-open messages started. */\n public readonly pos: Array<number>;\n\n /** String and message byte lengths in the writer's consumption order. */\n public readonly varlen: Array<number>;\n\n /** Reserved length-list indices for still-open messages. */\n public readonly varlenidx: Array<number>;\n\n /** Start measuring from an optional existing byte count. */\n public constructor(length: number = 0) {\n this.len = length;\n this.pos = [];\n this.varlen = [];\n this.varlenidx = [];\n }\n\n /**\n * Count one byte.\n *\n * @evidence contracts/common.md#principled-implementation A boolean always takes one byte.\n * @evidence contracts/common.md#clear-and-simple-design One increment.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts A fixed wire size.\n * @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.\n */\n public bool(): void {\n this.len += 1;\n }\n /**\n * Count the varint of a signed 32-bit integer, which is ten bytes when\n * negative.\n *\n * @evidence contracts/common.md#principled-implementation A negative value takes ten bytes because it is sign-extended to 64 bits, otherwise the varint length of the value is used.\n * @evidence contracts/common.md#clear-and-simple-design One branch over the shared measurer.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The rule is the wire format's.\n * @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.\n */\n public int32(value: number): void {\n if (value < 0) {\n // 10 bytes to encode negative number\n this.len += 10;\n } else {\n this.varint32(value);\n }\n }\n /**\n * Count the varint of the unsigned ZigZag form of a signed 32-bit integer.\n *\n * @evidence contracts/common.md#principled-implementation The ZigZag mapping is taken as an unsigned 32-bit value before measuring, so magnitudes of 2^30 or more are measured as five bytes and not as a negative number; the writer applies the same mapping.\n * @evidence contracts/common.md#clear-and-simple-design One expression over the shared measurer.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The mapping is the protobuf definition and is not special-cased.\n * @evidence contracts/common.md#meaningful-documentation A comment states the unsigned mapping and the reason for it.\n */\n public sint32(value: number): void {\n // The ZigZag value is unsigned, so it never takes the negative-number length.\n this.varint32(((value << 1) ^ (value >> 31)) >>> 0);\n }\n /**\n * Count the varint of an unsigned 32-bit integer.\n *\n * @evidence contracts/common.md#principled-implementation The varint length of an unsigned 32-bit value, one to five bytes.\n * @evidence contracts/common.md#clear-and-simple-design One delegation.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The rule is the wire format's.\n * @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.\n */\n public uint32(value: number): void {\n this.varint32(value);\n }\n\n /**\n * Count the varint of a signed 64-bit integer.\n *\n * @evidence contracts/common.md#principled-implementation A number is converted to a bigint and measured as an unsigned 64-bit pattern, which gives ten bytes for a negative value.\n * @evidence contracts/common.md#clear-and-simple-design One delegation to the 64-bit measurer.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The rule is the wire format's.\n * @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.\n */\n public int64(value: bigint | number): void {\n this.varint64(typeof value === \"number\" ? BigInt(value) : value);\n }\n /**\n * Count the varint of the ZigZag form of a signed 64-bit integer.\n *\n * @evidence contracts/common.md#principled-implementation The ZigZag mapping on a bigint, `(n << 1) ^ (n >> 63)`, is measured as an unsigned 64-bit pattern.\n * @evidence contracts/common.md#clear-and-simple-design One expression over the 64-bit measurer.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The mapping is the protobuf definition.\n * @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.\n */\n public sint64(value: bigint | number): void {\n if (typeof value === \"number\") value = BigInt(value);\n this.varint64((value << BigInt(1)) ^ (value >> BigInt(63)));\n }\n /**\n * Count the varint of an unsigned 64-bit integer.\n *\n * @evidence contracts/common.md#principled-implementation A number or bigint is measured as an unsigned 64-bit varint.\n * @evidence contracts/common.md#clear-and-simple-design One delegation to the 64-bit measurer.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The rule is the wire format's.\n * @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.\n */\n public uint64(value: bigint | number): void {\n this.varint64(typeof value === \"number\" ? BigInt(value) : value);\n }\n\n // public fixed32(_value: number): void {\n // this.len += 4;\n // }\n // public sfixed32(_value: number): void {\n // this.len += 4;\n // }\n // public fixed64(_value: number | bigint): void {\n // this.len += 8;\n // }\n // public sfixed64(_value: number | bigint): void {\n // this.len += 8;\n // }\n /**\n * Count four bytes.\n *\n * @evidence contracts/common.md#principled-implementation A float takes four bytes regardless of value.\n * @evidence contracts/common.md#clear-and-simple-design One increment.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts A fixed wire size.\n * @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.\n */\n public float(_value: number): void {\n this.len += 4;\n }\n /**\n * Count eight bytes.\n *\n * @evidence contracts/common.md#principled-implementation A double takes eight bytes regardless of value.\n * @evidence contracts/common.md#clear-and-simple-design One increment.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts A fixed wire size.\n * @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.\n */\n public double(_value: number): void {\n this.len += 8;\n }\n\n /**\n * Count the length prefix and the bytes.\n *\n * @evidence contracts/common.md#principled-implementation The length prefix is measured as an unsigned 32-bit varint and the byte length is added.\n * @evidence contracts/common.md#clear-and-simple-design Two increments.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The rule is the wire format's.\n * @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.\n */\n public bytes(value: Uint8Array): void {\n this.uint32(value.byteLength);\n this.len += value.byteLength;\n }\n /**\n * Count the length prefix and the UTF-8 bytes, and record the byte length for\n * the writer.\n *\n * @evidence contracts/common.md#principled-implementation The UTF-8 byte length is measured by encoding through a Blob, recorded in the length list so the writer reuses it and not recomputes it, and added with its varint prefix.\n * @evidence contracts/common.md#clear-and-simple-design One function using a module-level measuring helper.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The measure counts UTF-8 bytes and not code units.\n * @evidence contracts/common.md#meaningful-documentation A one-line comment states what is counted.\n */\n public string(value: string): void {\n const len: number = strlen(value);\n this.varlen.push(len);\n this.uint32(len);\n this.len += len;\n }\n\n /**\n * Save the position and reserve a length slot for a message that is starting.\n *\n * @evidence contracts/common.md#principled-implementation The current length and the length list's size are saved on stacks and a zero is reserved in the list, to be filled when the message ends.\n * @evidence contracts/common.md#clear-and-simple-design Three stack operations.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The bookkeeping is the two-pass design's.\n * @evidence contracts/common.md#meaningful-documentation A one-line comment states what is saved.\n */\n public fork(): void {\n this.pos.push(this.len); // save current position\n this.varlenidx.push(this.varlen.length); // save current index in varlen array\n this.varlen.push(0); // add 0 length to varlen array (to be updated in ldelim())\n }\n\n /**\n * Fill the reserved length slot with the size of the message that ends here,\n * and count its length prefix.\n *\n * @throws Error when no `fork` is open\n *\n * @evidence contracts/common.md#principled-implementation The length of the message since its fork is stored in the reserved list slot and its varint prefix is counted; an unmatched call throws a typed error instead of corrupting the stacks.\n * @evidence contracts/common.md#clear-and-simple-design One function paired with fork.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The unmatched case throws rather than being tolerated.\n * @evidence contracts/common.md#meaningful-documentation A one-line comment states what is recorded.\n */\n public ldelim(): void {\n if (!(this.pos.length && this.varlenidx.length))\n throw new Error(\n \"Error on typia.protobuf.encode(): missing fork() before ldelim() call.\",\n );\n\n const endPos = this.len; // current position is end position\n const startPos = this.pos.pop()!; // get start position from stack\n const idx = this.varlenidx.pop()!; // get varlen index from stack\n const len = endPos - startPos; // calculate length\n\n this.varlen[idx] = len; // update variable length\n this.uint32(len); // add uint32 that should be called in fork()\n }\n\n /**\n * Clear the counters and stacks so the sizer can measure another message.\n *\n * @evidence contracts/common.md#principled-implementation The counters and stacks are cleared in place, so the same sizer can measure another message without allocating new arrays.\n * @evidence contracts/common.md#clear-and-simple-design Four assignments.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts No hidden state is kept.\n * @evidence contracts/common.md#meaningful-documentation A one-line comment states that the arrays are reused.\n */\n public reset(): void {\n this.len = 0;\n // re-use arrays\n this.pos.length = 0;\n this.varlen.length = 0;\n this.varlenidx.length = 0;\n }\n\n private varint32(value: number): void {\n this.len +=\n value < 0\n ? 10 // 10 bits with leading 1's\n : value < 0x80\n ? 1\n : value < 0x4000\n ? 2\n : value < 0x200000\n ? 3\n : value < 0x10000000\n ? 4\n : 5;\n }\n\n private varint64(val: bigint): void {\n val = BigInt.asUintN(64, val);\n while (val > BigInt(0x7f)) {\n ++this.len;\n val = val >> BigInt(0x07);\n }\n ++this.len;\n }\n}\n\nconst strlen = (str: string): number => new Blob([str]).size;\n"],"mappings":";;;;;;;;;;;;;;AAgBA,IAAa,iBAAb,MAAwD;;CActD,YAAmB,SAAiB,GAAG;EACrC,KAAK,MAAM;EACX,KAAK,MAAM,CAAC;EACZ,KAAK,SAAS,CAAC;EACf,KAAK,YAAY,CAAC;CACpB;;;;;;;;;CAUA,OAAoB;EAClB,KAAK,OAAO;CACd;;;;;;;;;;CAUA,MAAa,OAAqB;EAChC,IAAI,QAAQ,GAEV,KAAK,OAAO;OAEZ,KAAK,SAAS,KAAK;CAEvB;;;;;;;;;CASA,OAAc,OAAqB;EAEjC,KAAK,UAAW,SAAS,IAAM,SAAS,QAAS,CAAC;CACpD;;;;;;;;;CASA,OAAc,OAAqB;EACjC,KAAK,SAAS,KAAK;CACrB;;;;;;;;;CAUA,MAAa,OAA8B;EACzC,KAAK,SAAS,OAAO,UAAU,WAAW,OAAO,KAAK,IAAI,KAAK;CACjE;;;;;;;;;CASA,OAAc,OAA8B;EAC1C,IAAI,OAAO,UAAU,UAAU,QAAQ,OAAO,KAAK;EACnD,KAAK,SAAU,SAAS,OAAO,CAAC,IAAM,SAAS,OAAO,EAAE,CAAE;CAC5D;;;;;;;;;CASA,OAAc,OAA8B;EAC1C,KAAK,SAAS,OAAO,UAAU,WAAW,OAAO,KAAK,IAAI,KAAK;CACjE;;;;;;;;;CAsBA,MAAa,QAAsB;EACjC,KAAK,OAAO;CACd;;;;;;;;;CASA,OAAc,QAAsB;EAClC,KAAK,OAAO;CACd;;;;;;;;;CAUA,MAAa,OAAyB;EACpC,KAAK,OAAO,MAAM,UAAU;EAC5B,KAAK,OAAO,MAAM;CACpB;;;;;;;;;;CAUA,OAAc,OAAqB;EACjC,MAAM,MAAc,OAAO,KAAK;EAChC,KAAK,OAAO,KAAK,GAAG;EACpB,KAAK,OAAO,GAAG;EACf,KAAK,OAAO;CACd;;;;;;;;;CAUA,OAAoB;EAClB,KAAK,IAAI,KAAK,KAAK,GAAG;EACtB,KAAK,UAAU,KAAK,KAAK,OAAO,MAAM;EACtC,KAAK,OAAO,KAAK,CAAC;CACpB;;;;;;;;;;;;CAaA,SAAsB;EACpB,IAAI,EAAE,KAAK,IAAI,UAAU,KAAK,UAAU,SACtC,MAAM,IAAI,MACR,wEACF;EAEF,MAAM,SAAS,KAAK;EACpB,MAAM,WAAW,KAAK,IAAI,IAAI;EAC9B,MAAM,MAAM,KAAK,UAAU,IAAI;EAC/B,MAAM,MAAM,SAAS;EAErB,KAAK,OAAO,OAAO;EACnB,KAAK,OAAO,GAAG;CACjB;;;;;;;;;CAUA,QAAqB;EACnB,KAAK,MAAM;EAEX,KAAK,IAAI,SAAS;EAClB,KAAK,OAAO,SAAS;EACrB,KAAK,UAAU,SAAS;CAC1B;CAEA,SAAiB,OAAqB;EACpC,KAAK,OACH,QAAQ,IACJ,KACA,QAAQ,MACN,IACA,QAAQ,QACN,IACA,QAAQ,UACN,IACA,QAAQ,YACN,IACA;CAChB;CAEA,SAAiB,KAAmB;EAClC,MAAM,OAAO,QAAQ,IAAI,GAAG;EAC5B,OAAO,MAAM,OAAO,GAAI,GAAG;GACzB,EAAE,KAAK;GACP,MAAM,OAAO,OAAO,CAAI;EAC1B;EACA,EAAE,KAAK;CACT;AACF;AAEA,MAAM,UAAU,QAAwB,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC"}
|