@marshulll/openclaw-wecom 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +3 -0
- package/README.md +3 -0
- package/README.zh.md +3 -0
- package/docs/INSTALL.md +3 -0
- package/node_modules/fast-xml-parser/CHANGELOG.md +606 -0
- package/node_modules/fast-xml-parser/LICENSE +21 -0
- package/node_modules/fast-xml-parser/README.md +237 -0
- package/node_modules/fast-xml-parser/package.json +72 -0
- package/node_modules/fast-xml-parser/src/cli/cli.js +93 -0
- package/node_modules/fast-xml-parser/src/cli/man.js +12 -0
- package/node_modules/fast-xml-parser/src/cli/read.js +92 -0
- package/node_modules/fast-xml-parser/src/fxp.d.ts +418 -0
- package/node_modules/fast-xml-parser/src/fxp.js +11 -0
- package/node_modules/fast-xml-parser/src/ignoreAttributes.js +20 -0
- package/node_modules/fast-xml-parser/src/util.js +72 -0
- package/node_modules/fast-xml-parser/src/v5/CharsSymbol.js +16 -0
- package/node_modules/fast-xml-parser/src/v5/EntitiesParser.js +107 -0
- package/node_modules/fast-xml-parser/src/v5/OptionsBuilder.js +64 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/BaseOutputBuilder.js +71 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsArrBuilder.js +103 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsMinArrBuilder.js +102 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsObjBuilder.js +156 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/ParserOptionsBuilder.js +99 -0
- package/node_modules/fast-xml-parser/src/v5/Report.js +0 -0
- package/node_modules/fast-xml-parser/src/v5/TagPath.js +81 -0
- package/node_modules/fast-xml-parser/src/v5/TagPathMatcher.js +15 -0
- package/node_modules/fast-xml-parser/src/v5/XMLParser.js +85 -0
- package/node_modules/fast-xml-parser/src/v5/Xml2JsParser.js +237 -0
- package/node_modules/fast-xml-parser/src/v5/XmlPartReader.js +216 -0
- package/node_modules/fast-xml-parser/src/v5/XmlSpecialTagsReader.js +118 -0
- package/node_modules/fast-xml-parser/src/v5/inputSource/BufferSource.js +118 -0
- package/node_modules/fast-xml-parser/src/v5/inputSource/StringSource.js +123 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/EntitiesParser.js +107 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/booleanParser.js +23 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/booleanParserExt.js +20 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/currency.js +40 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/join.js +14 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/number.js +16 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/trim.js +8 -0
- package/node_modules/fast-xml-parser/src/v6/CharsSymbol.js +16 -0
- package/node_modules/fast-xml-parser/src/v6/EntitiesParser.js +104 -0
- package/node_modules/fast-xml-parser/src/v6/OptionsBuilder.js +61 -0
- package/node_modules/fast-xml-parser/src/v6/OutputBuilders/BaseOutputBuilder.js +69 -0
- package/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsArrBuilder.js +103 -0
- package/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsMinArrBuilder.js +100 -0
- package/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsObjBuilder.js +154 -0
- package/node_modules/fast-xml-parser/src/v6/OutputBuilders/ParserOptionsBuilder.js +94 -0
- package/node_modules/fast-xml-parser/src/v6/Report.js +0 -0
- package/node_modules/fast-xml-parser/src/v6/TagPath.js +81 -0
- package/node_modules/fast-xml-parser/src/v6/TagPathMatcher.js +13 -0
- package/node_modules/fast-xml-parser/src/v6/XMLParser.js +83 -0
- package/node_modules/fast-xml-parser/src/v6/Xml2JsParser.js +235 -0
- package/node_modules/fast-xml-parser/src/v6/XmlPartReader.js +210 -0
- package/node_modules/fast-xml-parser/src/v6/XmlSpecialTagsReader.js +111 -0
- package/node_modules/fast-xml-parser/src/v6/inputSource/BufferSource.js +116 -0
- package/node_modules/fast-xml-parser/src/v6/inputSource/StringSource.js +121 -0
- package/node_modules/fast-xml-parser/src/v6/valueParsers/EntitiesParser.js +105 -0
- package/node_modules/fast-xml-parser/src/v6/valueParsers/booleanParser.js +22 -0
- package/node_modules/fast-xml-parser/src/v6/valueParsers/booleanParserExt.js +19 -0
- package/node_modules/fast-xml-parser/src/v6/valueParsers/currency.js +38 -0
- package/node_modules/fast-xml-parser/src/v6/valueParsers/join.js +13 -0
- package/node_modules/fast-xml-parser/src/v6/valueParsers/number.js +14 -0
- package/node_modules/fast-xml-parser/src/v6/valueParsers/trim.js +6 -0
- package/node_modules/fast-xml-parser/src/validator.js +425 -0
- package/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +286 -0
- package/node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js +135 -0
- package/node_modules/fast-xml-parser/src/xmlbuilder/prettifyJs2Xml.js +0 -0
- package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +153 -0
- package/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +48 -0
- package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +606 -0
- package/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +58 -0
- package/node_modules/fast-xml-parser/src/xmlparser/node2json.js +113 -0
- package/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js +25 -0
- package/node_modules/strnum/.vscode/launch.json +25 -0
- package/node_modules/strnum/CHANGELOG.md +22 -0
- package/node_modules/strnum/LICENSE +21 -0
- package/node_modules/strnum/README.md +97 -0
- package/node_modules/strnum/package.json +30 -0
- package/node_modules/strnum/strnum.js +111 -0
- package/node_modules/strnum/strnum.test.js +165 -0
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +208 -0
- package/node_modules/zod/index.cjs +33 -0
- package/node_modules/zod/index.d.cts +4 -0
- package/node_modules/zod/index.d.ts +4 -0
- package/node_modules/zod/index.js +4 -0
- package/node_modules/zod/package.json +118 -0
- package/node_modules/zod/src/index.ts +4 -0
- package/node_modules/zod/src/v3/ZodError.ts +330 -0
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/complex.test.ts +56 -0
- package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/function.test.ts +257 -0
- package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
- package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/node_modules/zod/src/v3/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
- package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
- package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
- package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/node_modules/zod/src/v3/types.ts +5136 -0
- package/node_modules/zod/src/v4/classic/checks.ts +30 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +66 -0
- package/node_modules/zod/src/v4/classic/errors.ts +75 -0
- package/node_modules/zod/src/v4/classic/external.ts +50 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/node_modules/zod/src/v4/classic/parse.ts +33 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2054 -0
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +296 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +619 -0
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +527 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +91 -0
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +92 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +86 -0
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +247 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +123 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +147 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +298 -0
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +342 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +356 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +881 -0
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +758 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2314 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +250 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +94 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/node_modules/zod/src/v4/core/api.ts +1594 -0
- package/node_modules/zod/src/v4/core/checks.ts +1283 -0
- package/node_modules/zod/src/v4/core/config.ts +15 -0
- package/node_modules/zod/src/v4/core/core.ts +134 -0
- package/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/node_modules/zod/src/v4/core/errors.ts +424 -0
- package/node_modules/zod/src/v4/core/function.ts +176 -0
- package/node_modules/zod/src/v4/core/index.ts +15 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +143 -0
- package/node_modules/zod/src/v4/core/parse.ts +94 -0
- package/node_modules/zod/src/v4/core/regexes.ts +135 -0
- package/node_modules/zod/src/v4/core/registries.ts +96 -0
- package/node_modules/zod/src/v4/core/schemas.ts +3842 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +64 -0
- package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +977 -0
- package/node_modules/zod/src/v4/core/util.ts +775 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/zod/src/v4/locales/ar.ts +125 -0
- package/node_modules/zod/src/v4/locales/az.ts +121 -0
- package/node_modules/zod/src/v4/locales/be.ts +184 -0
- package/node_modules/zod/src/v4/locales/ca.ts +127 -0
- package/node_modules/zod/src/v4/locales/cs.ts +142 -0
- package/node_modules/zod/src/v4/locales/de.ts +124 -0
- package/node_modules/zod/src/v4/locales/en.ts +127 -0
- package/node_modules/zod/src/v4/locales/eo.ts +125 -0
- package/node_modules/zod/src/v4/locales/es.ts +125 -0
- package/node_modules/zod/src/v4/locales/fa.ts +134 -0
- package/node_modules/zod/src/v4/locales/fi.ts +131 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +126 -0
- package/node_modules/zod/src/v4/locales/fr.ts +124 -0
- package/node_modules/zod/src/v4/locales/he.ts +125 -0
- package/node_modules/zod/src/v4/locales/hu.ts +126 -0
- package/node_modules/zod/src/v4/locales/id.ts +125 -0
- package/node_modules/zod/src/v4/locales/index.ts +39 -0
- package/node_modules/zod/src/v4/locales/it.ts +125 -0
- package/node_modules/zod/src/v4/locales/ja.ts +122 -0
- package/node_modules/zod/src/v4/locales/kh.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +131 -0
- package/node_modules/zod/src/v4/locales/mk.ts +127 -0
- package/node_modules/zod/src/v4/locales/ms.ts +124 -0
- package/node_modules/zod/src/v4/locales/nl.ts +126 -0
- package/node_modules/zod/src/v4/locales/no.ts +124 -0
- package/node_modules/zod/src/v4/locales/ota.ts +125 -0
- package/node_modules/zod/src/v4/locales/pl.ts +126 -0
- package/node_modules/zod/src/v4/locales/ps.ts +133 -0
- package/node_modules/zod/src/v4/locales/pt.ts +123 -0
- package/node_modules/zod/src/v4/locales/ru.ts +184 -0
- package/node_modules/zod/src/v4/locales/sl.ts +126 -0
- package/node_modules/zod/src/v4/locales/sv.ts +127 -0
- package/node_modules/zod/src/v4/locales/ta.ts +125 -0
- package/node_modules/zod/src/v4/locales/th.ts +126 -0
- package/node_modules/zod/src/v4/locales/tr.ts +121 -0
- package/node_modules/zod/src/v4/locales/ua.ts +126 -0
- package/node_modules/zod/src/v4/locales/ur.ts +126 -0
- package/node_modules/zod/src/v4/locales/vi.ts +125 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +123 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +125 -0
- package/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +22 -0
- package/node_modules/zod/src/v4/mini/external.ts +40 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +62 -0
- package/node_modules/zod/src/v4/mini/parse.ts +1 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +1579 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +185 -0
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
- package/node_modules/zod/src/v4-mini/index.ts +1 -0
- package/node_modules/zod/v3/ZodError.cjs +138 -0
- package/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/node_modules/zod/v3/ZodError.js +133 -0
- package/node_modules/zod/v3/errors.cjs +17 -0
- package/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/zod/v3/errors.d.ts +5 -0
- package/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/zod/v3/external.cjs +22 -0
- package/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/zod/v3/external.js +6 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/v3/helpers/util.cjs +137 -0
- package/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/zod/v3/index.cjs +33 -0
- package/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/zod/v3/index.js +4 -0
- package/node_modules/zod/v3/locales/en.cjs +111 -0
- package/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/zod/v3/standard-schema.cjs +2 -0
- package/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/zod/v3/types.cjs +3775 -0
- package/node_modules/zod/v3/types.d.cts +1031 -0
- package/node_modules/zod/v3/types.d.ts +1031 -0
- package/node_modules/zod/v3/types.js +3693 -0
- package/node_modules/zod/v4/classic/checks.cjs +32 -0
- package/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/zod/v4/classic/coerce.cjs +47 -0
- package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/zod/v4/classic/compat.cjs +57 -0
- package/node_modules/zod/v4/classic/compat.d.cts +46 -0
- package/node_modules/zod/v4/classic/compat.d.ts +46 -0
- package/node_modules/zod/v4/classic/compat.js +27 -0
- package/node_modules/zod/v4/classic/errors.cjs +67 -0
- package/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/node_modules/zod/v4/classic/errors.js +41 -0
- package/node_modules/zod/v4/classic/external.cjs +70 -0
- package/node_modules/zod/v4/classic/external.d.cts +13 -0
- package/node_modules/zod/v4/classic/external.d.ts +13 -0
- package/node_modules/zod/v4/classic/external.js +18 -0
- package/node_modules/zod/v4/classic/index.cjs +33 -0
- package/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/node_modules/zod/v4/classic/iso.js +30 -0
- package/node_modules/zod/v4/classic/parse.cjs +32 -0
- package/node_modules/zod/v4/classic/parse.d.cts +23 -0
- package/node_modules/zod/v4/classic/parse.d.ts +23 -0
- package/node_modules/zod/v4/classic/parse.js +6 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1109 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +630 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +630 -0
- package/node_modules/zod/v4/classic/schemas.js +1006 -0
- package/node_modules/zod/v4/core/api.cjs +1039 -0
- package/node_modules/zod/v4/core/api.d.cts +284 -0
- package/node_modules/zod/v4/core/api.d.ts +284 -0
- package/node_modules/zod/v4/core/api.js +906 -0
- package/node_modules/zod/v4/core/checks.cjs +591 -0
- package/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/node_modules/zod/v4/core/checks.js +565 -0
- package/node_modules/zod/v4/core/core.cjs +67 -0
- package/node_modules/zod/v4/core/core.d.cts +49 -0
- package/node_modules/zod/v4/core/core.d.ts +49 -0
- package/node_modules/zod/v4/core/core.js +61 -0
- package/node_modules/zod/v4/core/doc.cjs +39 -0
- package/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/node_modules/zod/v4/core/doc.js +35 -0
- package/node_modules/zod/v4/core/errors.cjs +226 -0
- package/node_modules/zod/v4/core/errors.d.cts +208 -0
- package/node_modules/zod/v4/core/errors.d.ts +208 -0
- package/node_modules/zod/v4/core/errors.js +195 -0
- package/node_modules/zod/v4/core/function.cjs +102 -0
- package/node_modules/zod/v4/core/function.d.cts +52 -0
- package/node_modules/zod/v4/core/function.d.ts +52 -0
- package/node_modules/zod/v4/core/function.js +75 -0
- package/node_modules/zod/v4/core/index.cjs +44 -0
- package/node_modules/zod/v4/core/index.d.cts +15 -0
- package/node_modules/zod/v4/core/index.d.ts +15 -0
- package/node_modules/zod/v4/core/index.js +15 -0
- package/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +87 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +87 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/parse.cjs +87 -0
- package/node_modules/zod/v4/core/parse.d.cts +25 -0
- package/node_modules/zod/v4/core/parse.d.ts +25 -0
- package/node_modules/zod/v4/core/parse.js +57 -0
- package/node_modules/zod/v4/core/regexes.cjs +103 -0
- package/node_modules/zod/v4/core/regexes.d.cts +62 -0
- package/node_modules/zod/v4/core/regexes.d.ts +62 -0
- package/node_modules/zod/v4/core/regexes.js +95 -0
- package/node_modules/zod/v4/core/registries.cjs +56 -0
- package/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/zod/v4/core/schemas.cjs +1748 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1041 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1041 -0
- package/node_modules/zod/v4/core/schemas.js +1717 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +55 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +55 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +854 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +88 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +88 -0
- package/node_modules/zod/v4/core/to-json-schema.js +849 -0
- package/node_modules/zod/v4/core/util.cjs +539 -0
- package/node_modules/zod/v4/core/util.d.cts +183 -0
- package/node_modules/zod/v4/core/util.d.ts +183 -0
- package/node_modules/zod/v4/core/util.js +493 -0
- package/node_modules/zod/v4/core/versions.cjs +8 -0
- package/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/zod/v4/index.cjs +22 -0
- package/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +3 -0
- package/node_modules/zod/v4/locales/ar.cjs +142 -0
- package/node_modules/zod/v4/locales/ar.d.cts +4 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +116 -0
- package/node_modules/zod/v4/locales/az.cjs +141 -0
- package/node_modules/zod/v4/locales/az.d.cts +4 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +115 -0
- package/node_modules/zod/v4/locales/be.cjs +190 -0
- package/node_modules/zod/v4/locales/be.d.cts +4 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +164 -0
- package/node_modules/zod/v4/locales/ca.cjs +144 -0
- package/node_modules/zod/v4/locales/ca.d.cts +4 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +118 -0
- package/node_modules/zod/v4/locales/cs.cjs +161 -0
- package/node_modules/zod/v4/locales/cs.d.cts +4 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +135 -0
- package/node_modules/zod/v4/locales/de.cjs +142 -0
- package/node_modules/zod/v4/locales/de.d.cts +4 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +116 -0
- package/node_modules/zod/v4/locales/en.cjs +145 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +5 -0
- package/node_modules/zod/v4/locales/en.js +117 -0
- package/node_modules/zod/v4/locales/eo.cjs +144 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +5 -0
- package/node_modules/zod/v4/locales/eo.js +116 -0
- package/node_modules/zod/v4/locales/es.cjs +143 -0
- package/node_modules/zod/v4/locales/es.d.cts +4 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +117 -0
- package/node_modules/zod/v4/locales/fa.cjs +148 -0
- package/node_modules/zod/v4/locales/fa.d.cts +4 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +122 -0
- package/node_modules/zod/v4/locales/fi.cjs +148 -0
- package/node_modules/zod/v4/locales/fi.d.cts +4 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +122 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +143 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +117 -0
- package/node_modules/zod/v4/locales/fr.cjs +142 -0
- package/node_modules/zod/v4/locales/fr.d.cts +4 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +116 -0
- package/node_modules/zod/v4/locales/he.cjs +143 -0
- package/node_modules/zod/v4/locales/he.d.cts +4 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +117 -0
- package/node_modules/zod/v4/locales/hu.cjs +143 -0
- package/node_modules/zod/v4/locales/hu.d.cts +4 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +117 -0
- package/node_modules/zod/v4/locales/id.cjs +142 -0
- package/node_modules/zod/v4/locales/id.d.cts +4 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +116 -0
- package/node_modules/zod/v4/locales/index.cjs +84 -0
- package/node_modules/zod/v4/locales/index.d.cts +39 -0
- package/node_modules/zod/v4/locales/index.d.ts +39 -0
- package/node_modules/zod/v4/locales/index.js +39 -0
- package/node_modules/zod/v4/locales/it.cjs +143 -0
- package/node_modules/zod/v4/locales/it.d.cts +4 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +117 -0
- package/node_modules/zod/v4/locales/ja.cjs +141 -0
- package/node_modules/zod/v4/locales/ja.d.cts +4 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +115 -0
- package/node_modules/zod/v4/locales/kh.cjs +143 -0
- package/node_modules/zod/v4/locales/kh.d.cts +4 -0
- package/node_modules/zod/v4/locales/kh.d.ts +4 -0
- package/node_modules/zod/v4/locales/kh.js +117 -0
- package/node_modules/zod/v4/locales/ko.cjs +147 -0
- package/node_modules/zod/v4/locales/ko.d.cts +4 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +121 -0
- package/node_modules/zod/v4/locales/mk.cjs +144 -0
- package/node_modules/zod/v4/locales/mk.d.cts +4 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +118 -0
- package/node_modules/zod/v4/locales/ms.cjs +142 -0
- package/node_modules/zod/v4/locales/ms.d.cts +4 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +116 -0
- package/node_modules/zod/v4/locales/nl.cjs +143 -0
- package/node_modules/zod/v4/locales/nl.d.cts +4 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +117 -0
- package/node_modules/zod/v4/locales/no.cjs +142 -0
- package/node_modules/zod/v4/locales/no.d.cts +4 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +116 -0
- package/node_modules/zod/v4/locales/ota.cjs +143 -0
- package/node_modules/zod/v4/locales/ota.d.cts +4 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +117 -0
- package/node_modules/zod/v4/locales/pl.cjs +143 -0
- package/node_modules/zod/v4/locales/pl.d.cts +4 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +117 -0
- package/node_modules/zod/v4/locales/ps.cjs +148 -0
- package/node_modules/zod/v4/locales/ps.d.cts +4 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +122 -0
- package/node_modules/zod/v4/locales/pt.cjs +142 -0
- package/node_modules/zod/v4/locales/pt.d.cts +4 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +116 -0
- package/node_modules/zod/v4/locales/ru.cjs +190 -0
- package/node_modules/zod/v4/locales/ru.d.cts +4 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +164 -0
- package/node_modules/zod/v4/locales/sl.cjs +143 -0
- package/node_modules/zod/v4/locales/sl.d.cts +4 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +117 -0
- package/node_modules/zod/v4/locales/sv.cjs +144 -0
- package/node_modules/zod/v4/locales/sv.d.cts +4 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +118 -0
- package/node_modules/zod/v4/locales/ta.cjs +143 -0
- package/node_modules/zod/v4/locales/ta.d.cts +4 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +143 -0
- package/node_modules/zod/v4/locales/th.d.cts +4 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +117 -0
- package/node_modules/zod/v4/locales/tr.cjs +143 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +5 -0
- package/node_modules/zod/v4/locales/tr.js +115 -0
- package/node_modules/zod/v4/locales/ua.cjs +143 -0
- package/node_modules/zod/v4/locales/ua.d.cts +4 -0
- package/node_modules/zod/v4/locales/ua.d.ts +4 -0
- package/node_modules/zod/v4/locales/ua.js +117 -0
- package/node_modules/zod/v4/locales/ur.cjs +143 -0
- package/node_modules/zod/v4/locales/ur.d.cts +4 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +117 -0
- package/node_modules/zod/v4/locales/vi.cjs +142 -0
- package/node_modules/zod/v4/locales/vi.d.cts +4 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +116 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +142 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +116 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +143 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +117 -0
- package/node_modules/zod/v4/mini/checks.cjs +34 -0
- package/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/zod/v4/mini/coerce.cjs +47 -0
- package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/v4/mini/coerce.js +17 -0
- package/node_modules/zod/v4/mini/external.cjs +62 -0
- package/node_modules/zod/v4/mini/external.d.cts +11 -0
- package/node_modules/zod/v4/mini/external.d.ts +11 -0
- package/node_modules/zod/v4/mini/external.js +13 -0
- package/node_modules/zod/v4/mini/index.cjs +32 -0
- package/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/zod/v4/mini/iso.cjs +60 -0
- package/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/v4/mini/iso.js +30 -0
- package/node_modules/zod/v4/mini/parse.cjs +8 -0
- package/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/zod/v4/mini/schemas.cjs +839 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +356 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +356 -0
- package/node_modules/zod/v4/mini/schemas.js +732 -0
- package/node_modules/zod/v4-mini/index.cjs +17 -0
- package/node_modules/zod/v4-mini/index.d.cts +1 -0
- package/node_modules/zod/v4-mini/index.d.ts +1 -0
- package/node_modules/zod/v4-mini/index.js +1 -0
- package/package.json +5 -1
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
class BaseOutputBuilder{
|
|
2
|
+
constructor(){
|
|
3
|
+
// this.attributes = {};
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
addAttribute(name, value){
|
|
7
|
+
if(this.options.onAttribute){
|
|
8
|
+
//TODO: better to pass tag path
|
|
9
|
+
const v = this.options.onAttribute(name, value, this.tagName);
|
|
10
|
+
if(v) this.attributes[v.name] = v.value;
|
|
11
|
+
}else{
|
|
12
|
+
name = this.options.attributes.prefix + name + this.options.attributes.suffix;
|
|
13
|
+
this.attributes[name] = this.parseValue(value, this.options.attributes.valueParsers);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* parse value by chain of parsers
|
|
19
|
+
* @param {string} val
|
|
20
|
+
* @returns {any} parsed value if matching parser found
|
|
21
|
+
*/
|
|
22
|
+
parseValue = function(val, valParsers){
|
|
23
|
+
for (let i = 0; i < valParsers.length; i++) {
|
|
24
|
+
let valParser = valParsers[i];
|
|
25
|
+
if(typeof valParser === "string"){
|
|
26
|
+
valParser = this.registeredParsers[valParser];
|
|
27
|
+
}
|
|
28
|
+
if(valParser){
|
|
29
|
+
val = valParser.parse(val);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return val;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* To add a nested empty tag.
|
|
37
|
+
* @param {string} key
|
|
38
|
+
* @param {any} val
|
|
39
|
+
*/
|
|
40
|
+
_addChild(key, val){}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* skip the comment if property is not set
|
|
44
|
+
*/
|
|
45
|
+
addComment(text){
|
|
46
|
+
if(this.options.nameFor.comment)
|
|
47
|
+
this._addChild(this.options.nameFor.comment, text);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
//store CDATA separately if property is set
|
|
51
|
+
//otherwise add to tag's value
|
|
52
|
+
addCdata(text){
|
|
53
|
+
if (this.options.nameFor.cdata) {
|
|
54
|
+
this._addChild(this.options.nameFor.cdata, text);
|
|
55
|
+
} else {
|
|
56
|
+
this.addRawValue(text || "");
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
addRawValue = text => this.addValue(text);
|
|
61
|
+
|
|
62
|
+
addDeclaration(){
|
|
63
|
+
if(!this.options.declaration){
|
|
64
|
+
}else{
|
|
65
|
+
this.addPi("?xml");
|
|
66
|
+
}
|
|
67
|
+
this.attributes = {}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
module.exports = BaseOutputBuilder;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
const {buildOptions,registerCommonValueParsers} = require("./ParserOptionsBuilder");
|
|
2
|
+
|
|
3
|
+
class OutputBuilder{
|
|
4
|
+
constructor(options){
|
|
5
|
+
this.options = buildOptions(options);
|
|
6
|
+
this.registeredParsers = registerCommonValueParsers(this.options);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
registerValueParser(name,parserInstance){//existing name will override the parser without warning
|
|
10
|
+
this.registeredParsers[name] = parserInstance;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
getInstance(parserOptions){
|
|
14
|
+
return new JsArrBuilder(parserOptions, this.options, this.registeredParsers);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const rootName = '!js_arr';
|
|
19
|
+
const BaseOutputBuilder = require("./BaseOutputBuilder");
|
|
20
|
+
|
|
21
|
+
class JsArrBuilder extends BaseOutputBuilder{
|
|
22
|
+
|
|
23
|
+
constructor(parserOptions, options,registeredParsers) {
|
|
24
|
+
super();
|
|
25
|
+
this.tagsStack = [];
|
|
26
|
+
this.parserOptions = parserOptions;
|
|
27
|
+
this.options = options;
|
|
28
|
+
this.registeredParsers = registeredParsers;
|
|
29
|
+
|
|
30
|
+
this.root = new Node(rootName);
|
|
31
|
+
this.currentNode = this.root;
|
|
32
|
+
this.attributes = {};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
addTag(tag){
|
|
36
|
+
//when a new tag is added, it should be added as child of current node
|
|
37
|
+
//TODO: shift this check to the parser
|
|
38
|
+
if(tag.name === "__proto__") tag.name = "#__proto__";
|
|
39
|
+
|
|
40
|
+
this.tagsStack.push(this.currentNode);
|
|
41
|
+
this.currentNode = new Node(tag.name, this.attributes);
|
|
42
|
+
this.attributes = {};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Check if the node should be added by checking user's preference
|
|
47
|
+
* @param {Node} node
|
|
48
|
+
* @returns boolean: true if the node should not be added
|
|
49
|
+
*/
|
|
50
|
+
closeTag(){
|
|
51
|
+
const node = this.currentNode;
|
|
52
|
+
this.currentNode = this.tagsStack.pop(); //set parent node in scope
|
|
53
|
+
if(this.options.onClose !== undefined){
|
|
54
|
+
//TODO TagPathMatcher
|
|
55
|
+
const resultTag = this.options.onClose(node,
|
|
56
|
+
new TagPathMatcher(this.tagsStack,node));
|
|
57
|
+
|
|
58
|
+
if(resultTag) return;
|
|
59
|
+
}
|
|
60
|
+
this.currentNode.child.push(node); //to parent node
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
//Called by parent class methods
|
|
64
|
+
_addChild(key, val){
|
|
65
|
+
// if(key === "__proto__") tagName = "#__proto__";
|
|
66
|
+
this.currentNode.child.push( {[key]: val });
|
|
67
|
+
// this.currentNode.leafType = false;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Add text value child node
|
|
72
|
+
* @param {string} text
|
|
73
|
+
*/
|
|
74
|
+
addValue(text){
|
|
75
|
+
this.currentNode.child.push( {[this.options.nameFor.text]: this.parseValue(text, this.options.tags.valueParsers) });
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
addPi(name){
|
|
79
|
+
//TODO: set pi flag
|
|
80
|
+
if(!this.options.ignorePiTags){
|
|
81
|
+
const node = new Node(name, this.attributes);
|
|
82
|
+
this.currentNode[":@"] = this.attributes;
|
|
83
|
+
this.currentNode.child.push(node);
|
|
84
|
+
}
|
|
85
|
+
this.attributes = {};
|
|
86
|
+
}
|
|
87
|
+
getOutput(){
|
|
88
|
+
return this.root.child[0];
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class Node{
|
|
95
|
+
constructor(tagname, attributes){
|
|
96
|
+
this.tagname = tagname;
|
|
97
|
+
this.child = []; //nested tags, text, cdata, comments
|
|
98
|
+
if(attributes && Object.keys(attributes).length > 0)
|
|
99
|
+
this[":@"] = attributes;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
module.exports = OutputBuilder;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
const {buildOptions,registerCommonValueParsers} = require("./ParserOptionsBuilder");
|
|
2
|
+
|
|
3
|
+
class OutputBuilder{
|
|
4
|
+
constructor(options){
|
|
5
|
+
this.options = buildOptions(options);
|
|
6
|
+
this.registeredParsers = registerCommonValueParsers(this.options);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
registerValueParser(name,parserInstance){//existing name will override the parser without warning
|
|
10
|
+
this.registeredParsers[name] = parserInstance;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
getInstance(parserOptions){
|
|
14
|
+
return new JsMinArrBuilder(parserOptions, this.options, this.registeredParsers);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const BaseOutputBuilder = require("./BaseOutputBuilder");
|
|
19
|
+
const rootName = '^';
|
|
20
|
+
|
|
21
|
+
class JsMinArrBuilder extends BaseOutputBuilder{
|
|
22
|
+
|
|
23
|
+
constructor(parserOptions, options,registeredParsers) {
|
|
24
|
+
super();
|
|
25
|
+
this.tagsStack = [];
|
|
26
|
+
this.parserOptions = parserOptions;
|
|
27
|
+
this.options = options;
|
|
28
|
+
this.registeredParsers = registeredParsers;
|
|
29
|
+
|
|
30
|
+
this.root = {[rootName]: []};
|
|
31
|
+
this.currentNode = this.root;
|
|
32
|
+
this.currentNodeTagName = rootName;
|
|
33
|
+
this.attributes = {};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
addTag(tag){
|
|
37
|
+
//when a new tag is added, it should be added as child of current node
|
|
38
|
+
//TODO: shift this check to the parser
|
|
39
|
+
if(tag.name === "__proto__") tag.name = "#__proto__";
|
|
40
|
+
|
|
41
|
+
this.tagsStack.push([this.currentNodeTagName,this.currentNode]); //this.currentNode is parent node here
|
|
42
|
+
this.currentNodeTagName = tag.name;
|
|
43
|
+
this.currentNode = { [tag.name]:[]}
|
|
44
|
+
if(Object.keys(this.attributes).length > 0){
|
|
45
|
+
this.currentNode[":@"] = this.attributes;
|
|
46
|
+
this.attributes = {};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Check if the node should be added by checking user's preference
|
|
52
|
+
* @param {Node} node
|
|
53
|
+
* @returns boolean: true if the node should not be added
|
|
54
|
+
*/
|
|
55
|
+
closeTag(){
|
|
56
|
+
const node = this.currentNode;
|
|
57
|
+
const nodeName = this.currentNodeTagName;
|
|
58
|
+
const arr = this.tagsStack.pop(); //set parent node in scope
|
|
59
|
+
this.currentNodeTagName = arr[0];
|
|
60
|
+
this.currentNode = arr[1];
|
|
61
|
+
|
|
62
|
+
if(this.options.onClose !== undefined){
|
|
63
|
+
//TODO TagPathMatcher
|
|
64
|
+
const resultTag = this.options.onClose(node,
|
|
65
|
+
new TagPathMatcher(this.tagsStack,node));
|
|
66
|
+
|
|
67
|
+
if(resultTag) return;
|
|
68
|
+
}
|
|
69
|
+
this.currentNode[this.currentNodeTagName].push(node); //to parent node
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
//Called by parent class methods
|
|
73
|
+
_addChild(key, val){
|
|
74
|
+
// if(key === "__proto__") tagName = "#__proto__";
|
|
75
|
+
this.currentNode.push( {[key]: val });
|
|
76
|
+
// this.currentNode.leafType = false;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Add text value child node
|
|
81
|
+
* @param {string} text
|
|
82
|
+
*/
|
|
83
|
+
addValue(text){
|
|
84
|
+
this.currentNode[this.currentNodeTagName].push( {[this.options.nameFor.text]: this.parseValue(text, this.options.tags.valueParsers) });
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
addPi(name){
|
|
88
|
+
if(!this.options.ignorePiTags){
|
|
89
|
+
const node = { [name]:[]}
|
|
90
|
+
if(this.attributes){
|
|
91
|
+
node[":@"] = this.attributes;
|
|
92
|
+
}
|
|
93
|
+
this.currentNode.push(node);
|
|
94
|
+
}
|
|
95
|
+
this.attributes = {};
|
|
96
|
+
}
|
|
97
|
+
getOutput(){
|
|
98
|
+
return this.root[rootName];
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
module.exports = OutputBuilder;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
const {buildOptions,registerCommonValueParsers} = require("./ParserOptionsBuilder");
|
|
4
|
+
|
|
5
|
+
class OutputBuilder{
|
|
6
|
+
constructor(builderOptions){
|
|
7
|
+
this.options = buildOptions(builderOptions);
|
|
8
|
+
this.registeredParsers = registerCommonValueParsers(this.options);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
registerValueParser(name,parserInstance){//existing name will override the parser without warning
|
|
12
|
+
this.registeredParsers[name] = parserInstance;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
getInstance(parserOptions){
|
|
16
|
+
return new JsObjBuilder(parserOptions, this.options, this.registeredParsers);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const BaseOutputBuilder = require("./BaseOutputBuilder");
|
|
21
|
+
const rootName = '^';
|
|
22
|
+
|
|
23
|
+
class JsObjBuilder extends BaseOutputBuilder{
|
|
24
|
+
|
|
25
|
+
constructor(parserOptions, builderOptions,registeredParsers) {
|
|
26
|
+
super();
|
|
27
|
+
//hold the raw detail of a tag and sequence with reference to the output
|
|
28
|
+
this.tagsStack = [];
|
|
29
|
+
this.parserOptions = parserOptions;
|
|
30
|
+
this.options = builderOptions;
|
|
31
|
+
this.registeredParsers = registeredParsers;
|
|
32
|
+
|
|
33
|
+
this.root = {};
|
|
34
|
+
this.parent = this.root;
|
|
35
|
+
this.tagName = rootName;
|
|
36
|
+
this.value = {};
|
|
37
|
+
this.textValue = "";
|
|
38
|
+
this.attributes = {};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
addTag(tag){
|
|
42
|
+
|
|
43
|
+
let value = "";
|
|
44
|
+
if( !isEmpty(this.attributes)){
|
|
45
|
+
value = {};
|
|
46
|
+
if(this.options.attributes.groupBy){
|
|
47
|
+
value[this.options.attributes.groupBy] = this.attributes;
|
|
48
|
+
}else{
|
|
49
|
+
value = this.attributes;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
this.tagsStack.push([this.tagName, this.textValue, this.value]); //parent tag, parent text value, parent tag value (jsobj)
|
|
54
|
+
this.tagName = tag.name;
|
|
55
|
+
this.value = value;
|
|
56
|
+
this.textValue = "";
|
|
57
|
+
this.attributes = {};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if the node should be added by checking user's preference
|
|
62
|
+
* @param {Node} node
|
|
63
|
+
* @returns boolean: true if the node should not be added
|
|
64
|
+
*/
|
|
65
|
+
closeTag(){
|
|
66
|
+
const tagName = this.tagName;
|
|
67
|
+
let value = this.value;
|
|
68
|
+
let textValue = this.textValue;
|
|
69
|
+
|
|
70
|
+
//update tag text value
|
|
71
|
+
if(typeof value !== "object" && !Array.isArray(value)){
|
|
72
|
+
value = this.parseValue(textValue.trim(), this.options.tags.valueParsers);
|
|
73
|
+
}else if(textValue.length > 0){
|
|
74
|
+
value[this.options.nameFor.text] = this.parseValue(textValue.trim(), this.options.tags.valueParsers);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
let resultTag= {
|
|
79
|
+
tagName: tagName,
|
|
80
|
+
value: value
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
if(this.options.onTagClose !== undefined){
|
|
84
|
+
//TODO TagPathMatcher
|
|
85
|
+
resultTag = this.options.onClose(tagName, value, this.textValue, new TagPathMatcher(this.tagsStack,node));
|
|
86
|
+
|
|
87
|
+
if(!resultTag) return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
//set parent node in scope
|
|
91
|
+
let arr = this.tagsStack.pop();
|
|
92
|
+
let parentTag = arr[2];
|
|
93
|
+
parentTag=this._addChildTo(resultTag.tagName, resultTag.value, parentTag);
|
|
94
|
+
|
|
95
|
+
this.tagName = arr[0];
|
|
96
|
+
this.textValue = arr[1];
|
|
97
|
+
this.value = parentTag;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
_addChild(key, val){
|
|
101
|
+
if(typeof this.value === "string"){
|
|
102
|
+
this.value = { [this.options.nameFor.text] : this.value };
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
this._addChildTo(key, val, this.value);
|
|
106
|
+
// this.currentNode.leafType = false;
|
|
107
|
+
this.attributes = {};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
_addChildTo(key, val, node){
|
|
111
|
+
if(typeof node === 'string') node = {};
|
|
112
|
+
if(!node[key]){
|
|
113
|
+
node[key] = val;
|
|
114
|
+
}else{ //Repeated
|
|
115
|
+
if(!Array.isArray(node[key])){ //but not stored as array
|
|
116
|
+
node[key] = [node[key]];
|
|
117
|
+
}
|
|
118
|
+
node[key].push(val);
|
|
119
|
+
}
|
|
120
|
+
return node;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Add text value child node
|
|
126
|
+
* @param {string} text
|
|
127
|
+
*/
|
|
128
|
+
addValue(text){
|
|
129
|
+
//TODO: use bytes join
|
|
130
|
+
if(this.textValue.length > 0) this.textValue += " " + text;
|
|
131
|
+
else this.textValue = text;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
addPi(name){
|
|
135
|
+
let value = "";
|
|
136
|
+
if( !isEmpty(this.attributes)){
|
|
137
|
+
value = {};
|
|
138
|
+
if(this.options.attributes.groupBy){
|
|
139
|
+
value[this.options.attributes.groupBy] = this.attributes;
|
|
140
|
+
}else{
|
|
141
|
+
value = this.attributes;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
this._addChild(name, value);
|
|
145
|
+
|
|
146
|
+
}
|
|
147
|
+
getOutput(){
|
|
148
|
+
return this.value;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function isEmpty(obj) {
|
|
153
|
+
return Object.keys(obj).length === 0;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
module.exports = OutputBuilder;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
const trimParser = require("../valueParsers/trim")
|
|
2
|
+
const booleanParser = require("../valueParsers/booleanParser")
|
|
3
|
+
const currencyParser = require("../valueParsers/currency")
|
|
4
|
+
const numberParser = require("../valueParsers/number")
|
|
5
|
+
|
|
6
|
+
const defaultOptions={
|
|
7
|
+
nameFor:{
|
|
8
|
+
text: "#text",
|
|
9
|
+
comment: "",
|
|
10
|
+
cdata: "",
|
|
11
|
+
},
|
|
12
|
+
// onTagClose: () => {},
|
|
13
|
+
// onAttribute: () => {},
|
|
14
|
+
piTag: false,
|
|
15
|
+
declaration: false, //"?xml"
|
|
16
|
+
tags: {
|
|
17
|
+
valueParsers: [
|
|
18
|
+
// "trim",
|
|
19
|
+
// "boolean",
|
|
20
|
+
// "number",
|
|
21
|
+
// "currency",
|
|
22
|
+
// "date",
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
attributes:{
|
|
26
|
+
prefix: "@_",
|
|
27
|
+
suffix: "",
|
|
28
|
+
groupBy: "",
|
|
29
|
+
|
|
30
|
+
valueParsers: [
|
|
31
|
+
// "trim",
|
|
32
|
+
// "boolean",
|
|
33
|
+
// "number",
|
|
34
|
+
// "currency",
|
|
35
|
+
// "date",
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
dataType:{
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
//TODO
|
|
44
|
+
const withJoin = ["trim","join", /*"entities",*/"number","boolean","currency"/*, "date"*/]
|
|
45
|
+
const withoutJoin = ["trim", /*"entities",*/"number","boolean","currency"/*, "date"*/]
|
|
46
|
+
|
|
47
|
+
function buildOptions(options){
|
|
48
|
+
//clone
|
|
49
|
+
const finalOptions = { ... defaultOptions};
|
|
50
|
+
|
|
51
|
+
//add config missed in cloning
|
|
52
|
+
finalOptions.tags.valueParsers.push(...withJoin)
|
|
53
|
+
if(!this.preserveOrder)
|
|
54
|
+
finalOptions.tags.valueParsers.push(...withoutJoin);
|
|
55
|
+
|
|
56
|
+
//add config missed in cloning
|
|
57
|
+
finalOptions.attributes.valueParsers.push(...withJoin)
|
|
58
|
+
|
|
59
|
+
//override configuration
|
|
60
|
+
copyProperties(finalOptions,options);
|
|
61
|
+
return finalOptions;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function copyProperties(target, source) {
|
|
65
|
+
for (let key in source) {
|
|
66
|
+
if (source.hasOwnProperty(key)) {
|
|
67
|
+
if (typeof source[key] === 'object' && !Array.isArray(source[key])) {
|
|
68
|
+
// Recursively copy nested properties
|
|
69
|
+
if (typeof target[key] === 'undefined') {
|
|
70
|
+
target[key] = {};
|
|
71
|
+
}
|
|
72
|
+
copyProperties(target[key], source[key]);
|
|
73
|
+
} else {
|
|
74
|
+
// Copy non-nested properties
|
|
75
|
+
target[key] = source[key];
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function registerCommonValueParsers(options){
|
|
82
|
+
return {
|
|
83
|
+
"trim": new trimParser(),
|
|
84
|
+
// "join": this.entityParser.parse,
|
|
85
|
+
"boolean": new booleanParser(),
|
|
86
|
+
"number": new numberParser({
|
|
87
|
+
hex: true,
|
|
88
|
+
leadingZeros: true,
|
|
89
|
+
eNotation: true
|
|
90
|
+
}),
|
|
91
|
+
"currency": new currencyParser(),
|
|
92
|
+
// "date": this.entityParser.parse,
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
module.exports = {
|
|
97
|
+
buildOptions : buildOptions,
|
|
98
|
+
registerCommonValueParsers: registerCommonValueParsers
|
|
99
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
class TagPath{
|
|
2
|
+
constructor(pathStr){
|
|
3
|
+
let text = "";
|
|
4
|
+
let tName = "";
|
|
5
|
+
let pos;
|
|
6
|
+
let aName = "";
|
|
7
|
+
let aVal = "";
|
|
8
|
+
this.stack = []
|
|
9
|
+
|
|
10
|
+
for (let i = 0; i < pathStr.length; i++) {
|
|
11
|
+
let ch = pathStr[i];
|
|
12
|
+
if(ch === " ") {
|
|
13
|
+
if(text.length === 0) continue;
|
|
14
|
+
tName = text; text = "";
|
|
15
|
+
}else if(ch === "["){
|
|
16
|
+
if(tName.length === 0){
|
|
17
|
+
tName = text; text = "";
|
|
18
|
+
}
|
|
19
|
+
i++;
|
|
20
|
+
for (; i < pathStr.length; i++) {
|
|
21
|
+
ch = pathStr[i];
|
|
22
|
+
if(ch=== "=") continue;
|
|
23
|
+
else if(ch=== "]") {aName = text.trim(); text=""; break; i--;}
|
|
24
|
+
else if(ch === "'" || ch === '"'){
|
|
25
|
+
let attrEnd = pathStr.indexOf(ch,i+1);
|
|
26
|
+
aVal = pathStr.substring(i+1, attrEnd);
|
|
27
|
+
i = attrEnd;
|
|
28
|
+
}else{
|
|
29
|
+
text +=ch;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}else if(ch !== " " && text.length === 0 && tName.length > 0){//reading tagName
|
|
33
|
+
//save previous tag
|
|
34
|
+
this.stack.push(new TagPathNode(tName,pos,aName,aVal));
|
|
35
|
+
text = ch; tName = ""; aName = ""; aVal = "";
|
|
36
|
+
}else{
|
|
37
|
+
text+=ch;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
//last tag in the path
|
|
42
|
+
if(tName.length >0 || text.length>0){
|
|
43
|
+
this.stack.push(new TagPathNode(text||tName,pos,aName,aVal));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
match(tagStack,node){
|
|
48
|
+
if(this.stack[0].name !== "*"){
|
|
49
|
+
if(this.stack.length !== tagStack.length +1) return false;
|
|
50
|
+
|
|
51
|
+
//loop through tagPath and tagStack and match
|
|
52
|
+
for (let i = 0; i < this.tagStack.length; i++) {
|
|
53
|
+
if(!this.stack[i].match(tagStack[i])) return false;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if(!this.stack[this.stack.length - 1].match(node)) return false;
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
class TagPathNode{
|
|
62
|
+
constructor(name,position,attrName,attrVal){
|
|
63
|
+
this.name = name;
|
|
64
|
+
this.position = position;
|
|
65
|
+
this.attrName = attrName,
|
|
66
|
+
this.attrVal = attrVal;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
match(node){
|
|
70
|
+
let matching = true;
|
|
71
|
+
matching = node.name === this.name;
|
|
72
|
+
if(this.position) matching = node.position === this.position;
|
|
73
|
+
if(this.attrName) matching = node.attrs[this.attrName !== undefined];
|
|
74
|
+
if(this.attrVal) matching = node.attrs[this.attrName !== this.attrVal];
|
|
75
|
+
return matching;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// console.log((new TagPath("* b[b]")).stack);
|
|
80
|
+
// console.log((new TagPath("a[a] b[b] c")).stack);
|
|
81
|
+
// console.log((new TagPath(" b [ b= 'cf sdadwa' ] a ")).stack);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const TagPath = require("./TagPath");
|
|
2
|
+
|
|
3
|
+
class TagPathMatcher{
|
|
4
|
+
constructor(stack,node){
|
|
5
|
+
this.stack = stack;
|
|
6
|
+
this.node= node;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
match(path){
|
|
10
|
+
const tagPath = new TagPath(path);
|
|
11
|
+
return tagPath.match(this.stack, this.node);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
module.exports = TagPathMatcher;
|