plugin-build-visualization-block 0.1.1
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/client-v2.d.ts +2 -0
- package/client-v2.js +1 -0
- package/client.d.ts +2 -0
- package/client.js +1 -0
- package/dist/client/index.js +10 -0
- package/dist/client-v2/812.25692e474e296143.js +10 -0
- package/dist/client-v2/index.js +10 -0
- package/dist/externalVersion.js +24 -0
- package/dist/index.js +48 -0
- package/dist/locale/en-US.json +45 -0
- package/dist/locale/namespace.js +36 -0
- package/dist/locale/vi-VN.json +46 -0
- package/dist/locale/zh-CN.json +46 -0
- package/dist/node_modules/zod/LICENSE +21 -0
- package/dist/node_modules/zod/index.cjs +1 -0
- package/dist/node_modules/zod/index.d.cts +4 -0
- package/dist/node_modules/zod/index.d.ts +4 -0
- package/dist/node_modules/zod/index.js +4 -0
- package/dist/node_modules/zod/locales/index.cjs +17 -0
- package/dist/node_modules/zod/locales/index.d.cts +1 -0
- package/dist/node_modules/zod/locales/index.d.ts +1 -0
- package/dist/node_modules/zod/locales/index.js +1 -0
- package/dist/node_modules/zod/locales/package.json +6 -0
- package/dist/node_modules/zod/mini/index.cjs +17 -0
- package/dist/node_modules/zod/mini/index.d.cts +1 -0
- package/dist/node_modules/zod/mini/index.d.ts +1 -0
- package/dist/node_modules/zod/mini/index.js +1 -0
- package/dist/node_modules/zod/mini/package.json +6 -0
- package/dist/node_modules/zod/package.json +1 -0
- package/dist/node_modules/zod/src/index.ts +4 -0
- package/dist/node_modules/zod/src/locales/index.ts +1 -0
- package/dist/node_modules/zod/src/mini/index.ts +1 -0
- package/dist/node_modules/zod/src/v3/ZodError.ts +330 -0
- package/dist/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/dist/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/dist/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/dist/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/dist/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/dist/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/dist/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/dist/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/dist/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/dist/node_modules/zod/src/v3/errors.ts +13 -0
- package/dist/node_modules/zod/src/v3/external.ts +6 -0
- package/dist/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/dist/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/dist/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/dist/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/dist/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/dist/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/dist/node_modules/zod/src/v3/index.ts +4 -0
- package/dist/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/dist/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/dist/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/dist/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/dist/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/dist/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/dist/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/dist/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/dist/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/dist/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/dist/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/dist/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/dist/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/dist/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
- package/dist/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/dist/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/dist/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/dist/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/dist/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/dist/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/dist/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/dist/node_modules/zod/src/v3/tests/error.test.ts +551 -0
- package/dist/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/dist/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/dist/node_modules/zod/src/v3/tests/function.test.ts +261 -0
- package/dist/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/dist/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/dist/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
- package/dist/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/dist/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
- package/dist/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/dist/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/dist/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/dist/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/dist/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
- package/dist/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/dist/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/dist/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/dist/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/dist/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/dist/node_modules/zod/src/v3/tests/object.test.ts +434 -0
- package/dist/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/dist/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/dist/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/dist/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/dist/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/dist/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/dist/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/dist/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/dist/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/dist/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
- package/dist/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/dist/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/dist/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/dist/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/dist/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/dist/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/dist/node_modules/zod/src/v3/tests/string.test.ts +916 -0
- package/dist/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/dist/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/dist/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/dist/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/dist/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/dist/node_modules/zod/src/v3/types.ts +5138 -0
- package/dist/node_modules/zod/src/v4/classic/checks.ts +32 -0
- package/dist/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/dist/node_modules/zod/src/v4/classic/compat.ts +70 -0
- package/dist/node_modules/zod/src/v4/classic/errors.ts +82 -0
- package/dist/node_modules/zod/src/v4/classic/external.ts +51 -0
- package/dist/node_modules/zod/src/v4/classic/from-json-schema.ts +643 -0
- package/dist/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/dist/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/dist/node_modules/zod/src/v4/classic/parse.ts +82 -0
- package/dist/node_modules/zod/src/v4/classic/schemas.ts +2409 -0
- package/dist/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/dist/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
- package/dist/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/dist/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
- package/dist/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/dist/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/dist/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/dist/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
- package/dist/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
- package/dist/node_modules/zod/src/v4/classic/tests/catch.test.ts +276 -0
- package/dist/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/dist/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
- package/dist/node_modules/zod/src/v4/classic/tests/codec.test.ts +562 -0
- package/dist/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/dist/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
- package/dist/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/dist/node_modules/zod/src/v4/classic/tests/date.test.ts +62 -0
- package/dist/node_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
- package/dist/node_modules/zod/src/v4/classic/tests/default.test.ts +365 -0
- package/dist/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
- package/dist/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/dist/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +661 -0
- package/dist/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/dist/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +595 -0
- package/dist/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/dist/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
- package/dist/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
- package/dist/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
- package/dist/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +734 -0
- package/dist/node_modules/zod/src/v4/classic/tests/function.test.ts +360 -0
- package/dist/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/dist/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
- package/dist/node_modules/zod/src/v4/classic/tests/index.test.ts +939 -0
- package/dist/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +60 -0
- package/dist/node_modules/zod/src/v4/classic/tests/intersection.test.ts +198 -0
- package/dist/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
- package/dist/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/dist/node_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
- package/dist/node_modules/zod/src/v4/classic/tests/map.test.ts +330 -0
- package/dist/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/dist/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/dist/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
- package/dist/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/dist/node_modules/zod/src/v4/classic/tests/number.test.ts +270 -0
- package/dist/node_modules/zod/src/v4/classic/tests/object.test.ts +640 -0
- package/dist/node_modules/zod/src/v4/classic/tests/optional.test.ts +223 -0
- package/dist/node_modules/zod/src/v4/classic/tests/partial.test.ts +427 -0
- package/dist/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
- package/dist/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
- package/dist/node_modules/zod/src/v4/classic/tests/prefault.test.ts +74 -0
- package/dist/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +282 -0
- package/dist/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/dist/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/dist/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/dist/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/dist/node_modules/zod/src/v4/classic/tests/record.test.ts +600 -0
- package/dist/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +582 -0
- package/dist/node_modules/zod/src/v4/classic/tests/refine.test.ts +570 -0
- package/dist/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
- package/dist/node_modules/zod/src/v4/classic/tests/set.test.ts +181 -0
- package/dist/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +134 -0
- package/dist/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
- package/dist/node_modules/zod/src/v4/classic/tests/string.test.ts +1175 -0
- package/dist/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +106 -0
- package/dist/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +771 -0
- package/dist/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
- package/dist/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2975 -0
- package/dist/node_modules/zod/src/v4/classic/tests/transform.test.ts +361 -0
- package/dist/node_modules/zod/src/v4/classic/tests/tuple.test.ts +183 -0
- package/dist/node_modules/zod/src/v4/classic/tests/union.test.ts +219 -0
- package/dist/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
- package/dist/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/dist/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/dist/node_modules/zod/src/v4/core/api.ts +1798 -0
- package/dist/node_modules/zod/src/v4/core/checks.ts +1293 -0
- package/dist/node_modules/zod/src/v4/core/config.ts +15 -0
- package/dist/node_modules/zod/src/v4/core/core.ts +138 -0
- package/dist/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/dist/node_modules/zod/src/v4/core/errors.ts +448 -0
- package/dist/node_modules/zod/src/v4/core/index.ts +16 -0
- package/dist/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
- package/dist/node_modules/zod/src/v4/core/json-schema-processors.ts +667 -0
- package/dist/node_modules/zod/src/v4/core/json-schema.ts +147 -0
- package/dist/node_modules/zod/src/v4/core/parse.ts +195 -0
- package/dist/node_modules/zod/src/v4/core/regexes.ts +183 -0
- package/dist/node_modules/zod/src/v4/core/registries.ts +105 -0
- package/dist/node_modules/zod/src/v4/core/schemas.ts +4543 -0
- package/dist/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
- package/dist/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
- package/dist/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/dist/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/dist/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/dist/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
- package/dist/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
- package/dist/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
- package/dist/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/dist/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/dist/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +83 -0
- package/dist/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +67 -0
- package/dist/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
- package/dist/node_modules/zod/src/v4/core/to-json-schema.ts +613 -0
- package/dist/node_modules/zod/src/v4/core/util.ts +966 -0
- package/dist/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/dist/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/dist/node_modules/zod/src/v4/index.ts +4 -0
- package/dist/node_modules/zod/src/v4/locales/ar.ts +115 -0
- package/dist/node_modules/zod/src/v4/locales/az.ts +111 -0
- package/dist/node_modules/zod/src/v4/locales/be.ts +176 -0
- package/dist/node_modules/zod/src/v4/locales/bg.ts +128 -0
- package/dist/node_modules/zod/src/v4/locales/ca.ts +116 -0
- package/dist/node_modules/zod/src/v4/locales/cs.ts +118 -0
- package/dist/node_modules/zod/src/v4/locales/da.ts +123 -0
- package/dist/node_modules/zod/src/v4/locales/de.ts +116 -0
- package/dist/node_modules/zod/src/v4/locales/en.ts +119 -0
- package/dist/node_modules/zod/src/v4/locales/eo.ts +118 -0
- package/dist/node_modules/zod/src/v4/locales/es.ts +141 -0
- package/dist/node_modules/zod/src/v4/locales/fa.ts +126 -0
- package/dist/node_modules/zod/src/v4/locales/fi.ts +121 -0
- package/dist/node_modules/zod/src/v4/locales/fr-CA.ts +116 -0
- package/dist/node_modules/zod/src/v4/locales/fr.ts +116 -0
- package/dist/node_modules/zod/src/v4/locales/he.ts +246 -0
- package/dist/node_modules/zod/src/v4/locales/hu.ts +117 -0
- package/dist/node_modules/zod/src/v4/locales/hy.ts +164 -0
- package/dist/node_modules/zod/src/v4/locales/id.ts +115 -0
- package/dist/node_modules/zod/src/v4/locales/index.ts +49 -0
- package/dist/node_modules/zod/src/v4/locales/is.ts +119 -0
- package/dist/node_modules/zod/src/v4/locales/it.ts +116 -0
- package/dist/node_modules/zod/src/v4/locales/ja.ts +114 -0
- package/dist/node_modules/zod/src/v4/locales/ka.ts +123 -0
- package/dist/node_modules/zod/src/v4/locales/kh.ts +7 -0
- package/dist/node_modules/zod/src/v4/locales/km.ts +119 -0
- package/dist/node_modules/zod/src/v4/locales/ko.ts +121 -0
- package/dist/node_modules/zod/src/v4/locales/lt.ts +239 -0
- package/dist/node_modules/zod/src/v4/locales/mk.ts +118 -0
- package/dist/node_modules/zod/src/v4/locales/ms.ts +115 -0
- package/dist/node_modules/zod/src/v4/locales/nl.ts +121 -0
- package/dist/node_modules/zod/src/v4/locales/no.ts +116 -0
- package/dist/node_modules/zod/src/v4/locales/ota.ts +117 -0
- package/dist/node_modules/zod/src/v4/locales/pl.ts +118 -0
- package/dist/node_modules/zod/src/v4/locales/ps.ts +126 -0
- package/dist/node_modules/zod/src/v4/locales/pt.ts +116 -0
- package/dist/node_modules/zod/src/v4/locales/ru.ts +176 -0
- package/dist/node_modules/zod/src/v4/locales/sl.ts +118 -0
- package/dist/node_modules/zod/src/v4/locales/sv.ts +119 -0
- package/dist/node_modules/zod/src/v4/locales/ta.ts +118 -0
- package/dist/node_modules/zod/src/v4/locales/th.ts +119 -0
- package/dist/node_modules/zod/src/v4/locales/tr.ts +111 -0
- package/dist/node_modules/zod/src/v4/locales/ua.ts +7 -0
- package/dist/node_modules/zod/src/v4/locales/uk.ts +117 -0
- package/dist/node_modules/zod/src/v4/locales/ur.ts +119 -0
- package/dist/node_modules/zod/src/v4/locales/uz.ts +116 -0
- package/dist/node_modules/zod/src/v4/locales/vi.ts +117 -0
- package/dist/node_modules/zod/src/v4/locales/yo.ts +124 -0
- package/dist/node_modules/zod/src/v4/locales/zh-CN.ts +116 -0
- package/dist/node_modules/zod/src/v4/locales/zh-TW.ts +115 -0
- package/dist/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/dist/node_modules/zod/src/v4/mini/coerce.ts +27 -0
- package/dist/node_modules/zod/src/v4/mini/external.ts +40 -0
- package/dist/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/dist/node_modules/zod/src/v4/mini/iso.ts +66 -0
- package/dist/node_modules/zod/src/v4/mini/parse.ts +14 -0
- package/dist/node_modules/zod/src/v4/mini/schemas.ts +1916 -0
- package/dist/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
- package/dist/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/dist/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
- package/dist/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/dist/node_modules/zod/src/v4/mini/tests/codec.test.ts +529 -0
- package/dist/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/dist/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/dist/node_modules/zod/src/v4/mini/tests/functions.test.ts +5 -0
- package/dist/node_modules/zod/src/v4/mini/tests/index.test.ts +963 -0
- package/dist/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/dist/node_modules/zod/src/v4/mini/tests/object.test.ts +227 -0
- package/dist/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/dist/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
- package/dist/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
- package/dist/node_modules/zod/src/v4/mini/tests/string.test.ts +347 -0
- package/dist/node_modules/zod/src/v4-mini/index.ts +1 -0
- package/dist/node_modules/zod/v3/ZodError.cjs +138 -0
- package/dist/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/dist/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/dist/node_modules/zod/v3/ZodError.js +133 -0
- package/dist/node_modules/zod/v3/errors.cjs +17 -0
- package/dist/node_modules/zod/v3/errors.d.cts +5 -0
- package/dist/node_modules/zod/v3/errors.d.ts +5 -0
- package/dist/node_modules/zod/v3/errors.js +9 -0
- package/dist/node_modules/zod/v3/external.cjs +22 -0
- package/dist/node_modules/zod/v3/external.d.cts +6 -0
- package/dist/node_modules/zod/v3/external.d.ts +6 -0
- package/dist/node_modules/zod/v3/external.js +6 -0
- package/dist/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
- package/dist/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/dist/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/dist/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/dist/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
- package/dist/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/dist/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/dist/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/dist/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
- package/dist/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/dist/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/dist/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/dist/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
- package/dist/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/dist/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/dist/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/dist/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
- package/dist/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/dist/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/dist/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/dist/node_modules/zod/v3/helpers/util.cjs +137 -0
- package/dist/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/dist/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/dist/node_modules/zod/v3/helpers/util.js +133 -0
- package/dist/node_modules/zod/v3/index.cjs +33 -0
- package/dist/node_modules/zod/v3/index.d.cts +4 -0
- package/dist/node_modules/zod/v3/index.d.ts +4 -0
- package/dist/node_modules/zod/v3/index.js +4 -0
- package/dist/node_modules/zod/v3/locales/en.cjs +112 -0
- package/dist/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/dist/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/dist/node_modules/zod/v3/locales/en.js +109 -0
- package/dist/node_modules/zod/v3/package.json +6 -0
- package/dist/node_modules/zod/v3/standard-schema.cjs +2 -0
- package/dist/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/dist/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/dist/node_modules/zod/v3/standard-schema.js +1 -0
- package/dist/node_modules/zod/v3/types.cjs +3777 -0
- package/dist/node_modules/zod/v3/types.d.cts +1034 -0
- package/dist/node_modules/zod/v3/types.d.ts +1034 -0
- package/dist/node_modules/zod/v3/types.js +3695 -0
- package/dist/node_modules/zod/v4/classic/checks.cjs +33 -0
- package/dist/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/dist/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/dist/node_modules/zod/v4/classic/checks.js +1 -0
- package/dist/node_modules/zod/v4/classic/coerce.cjs +47 -0
- package/dist/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/dist/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/dist/node_modules/zod/v4/classic/coerce.js +17 -0
- package/dist/node_modules/zod/v4/classic/compat.cjs +61 -0
- package/dist/node_modules/zod/v4/classic/compat.d.cts +50 -0
- package/dist/node_modules/zod/v4/classic/compat.d.ts +50 -0
- package/dist/node_modules/zod/v4/classic/compat.js +31 -0
- package/dist/node_modules/zod/v4/classic/errors.cjs +74 -0
- package/dist/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/dist/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/dist/node_modules/zod/v4/classic/errors.js +48 -0
- package/dist/node_modules/zod/v4/classic/external.cjs +73 -0
- package/dist/node_modules/zod/v4/classic/external.d.cts +15 -0
- package/dist/node_modules/zod/v4/classic/external.d.ts +15 -0
- package/dist/node_modules/zod/v4/classic/external.js +20 -0
- package/dist/node_modules/zod/v4/classic/from-json-schema.cjs +610 -0
- package/dist/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
- package/dist/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
- package/dist/node_modules/zod/v4/classic/from-json-schema.js +584 -0
- package/dist/node_modules/zod/v4/classic/index.cjs +33 -0
- package/dist/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/dist/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/dist/node_modules/zod/v4/classic/index.js +4 -0
- package/dist/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/dist/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/dist/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/dist/node_modules/zod/v4/classic/iso.js +30 -0
- package/dist/node_modules/zod/v4/classic/package.json +6 -0
- package/dist/node_modules/zod/v4/classic/parse.cjs +41 -0
- package/dist/node_modules/zod/v4/classic/parse.d.cts +31 -0
- package/dist/node_modules/zod/v4/classic/parse.d.ts +31 -0
- package/dist/node_modules/zod/v4/classic/parse.js +15 -0
- package/dist/node_modules/zod/v4/classic/schemas.cjs +1272 -0
- package/dist/node_modules/zod/v4/classic/schemas.d.cts +739 -0
- package/dist/node_modules/zod/v4/classic/schemas.d.ts +739 -0
- package/dist/node_modules/zod/v4/classic/schemas.js +1157 -0
- package/dist/node_modules/zod/v4/core/api.cjs +1222 -0
- package/dist/node_modules/zod/v4/core/api.d.cts +304 -0
- package/dist/node_modules/zod/v4/core/api.d.ts +304 -0
- package/dist/node_modules/zod/v4/core/api.js +1082 -0
- package/dist/node_modules/zod/v4/core/checks.cjs +601 -0
- package/dist/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/dist/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/dist/node_modules/zod/v4/core/checks.js +575 -0
- package/dist/node_modules/zod/v4/core/core.cjs +83 -0
- package/dist/node_modules/zod/v4/core/core.d.cts +70 -0
- package/dist/node_modules/zod/v4/core/core.d.ts +70 -0
- package/dist/node_modules/zod/v4/core/core.js +76 -0
- package/dist/node_modules/zod/v4/core/doc.cjs +39 -0
- package/dist/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/dist/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/dist/node_modules/zod/v4/core/doc.js +35 -0
- package/dist/node_modules/zod/v4/core/errors.cjs +213 -0
- package/dist/node_modules/zod/v4/core/errors.d.cts +220 -0
- package/dist/node_modules/zod/v4/core/errors.d.ts +220 -0
- package/dist/node_modules/zod/v4/core/errors.js +182 -0
- package/dist/node_modules/zod/v4/core/index.cjs +47 -0
- package/dist/node_modules/zod/v4/core/index.d.cts +16 -0
- package/dist/node_modules/zod/v4/core/index.d.ts +16 -0
- package/dist/node_modules/zod/v4/core/index.js +16 -0
- package/dist/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
- package/dist/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
- package/dist/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
- package/dist/node_modules/zod/v4/core/json-schema-generator.js +95 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.cjs +648 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +605 -0
- package/dist/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/dist/node_modules/zod/v4/core/json-schema.d.cts +88 -0
- package/dist/node_modules/zod/v4/core/json-schema.d.ts +88 -0
- package/dist/node_modules/zod/v4/core/json-schema.js +1 -0
- package/dist/node_modules/zod/v4/core/package.json +6 -0
- package/dist/node_modules/zod/v4/core/parse.cjs +131 -0
- package/dist/node_modules/zod/v4/core/parse.d.cts +49 -0
- package/dist/node_modules/zod/v4/core/parse.d.ts +49 -0
- package/dist/node_modules/zod/v4/core/parse.js +93 -0
- package/dist/node_modules/zod/v4/core/regexes.cjs +166 -0
- package/dist/node_modules/zod/v4/core/regexes.d.cts +79 -0
- package/dist/node_modules/zod/v4/core/regexes.d.ts +79 -0
- package/dist/node_modules/zod/v4/core/regexes.js +133 -0
- package/dist/node_modules/zod/v4/core/registries.cjs +56 -0
- package/dist/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/dist/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/dist/node_modules/zod/v4/core/registries.js +51 -0
- package/dist/node_modules/zod/v4/core/schemas.cjs +2126 -0
- package/dist/node_modules/zod/v4/core/schemas.d.cts +1146 -0
- package/dist/node_modules/zod/v4/core/schemas.d.ts +1146 -0
- package/dist/node_modules/zod/v4/core/schemas.js +2095 -0
- package/dist/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/dist/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
- package/dist/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
- package/dist/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.cjs +446 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.d.cts +114 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.d.ts +114 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.js +437 -0
- package/dist/node_modules/zod/v4/core/util.cjs +710 -0
- package/dist/node_modules/zod/v4/core/util.d.cts +199 -0
- package/dist/node_modules/zod/v4/core/util.d.ts +199 -0
- package/dist/node_modules/zod/v4/core/util.js +651 -0
- package/dist/node_modules/zod/v4/core/versions.cjs +8 -0
- package/dist/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/dist/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/dist/node_modules/zod/v4/core/versions.js +5 -0
- package/dist/node_modules/zod/v4/index.cjs +22 -0
- package/dist/node_modules/zod/v4/index.d.cts +3 -0
- package/dist/node_modules/zod/v4/index.d.ts +3 -0
- package/dist/node_modules/zod/v4/index.js +3 -0
- package/dist/node_modules/zod/v4/locales/ar.cjs +133 -0
- package/dist/node_modules/zod/v4/locales/ar.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ar.js +106 -0
- package/dist/node_modules/zod/v4/locales/az.cjs +132 -0
- package/dist/node_modules/zod/v4/locales/az.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/az.js +105 -0
- package/dist/node_modules/zod/v4/locales/be.cjs +183 -0
- package/dist/node_modules/zod/v4/locales/be.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/be.js +156 -0
- package/dist/node_modules/zod/v4/locales/bg.cjs +147 -0
- package/dist/node_modules/zod/v4/locales/bg.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/bg.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/bg.js +120 -0
- package/dist/node_modules/zod/v4/locales/ca.cjs +134 -0
- package/dist/node_modules/zod/v4/locales/ca.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ca.js +107 -0
- package/dist/node_modules/zod/v4/locales/cs.cjs +138 -0
- package/dist/node_modules/zod/v4/locales/cs.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/cs.js +111 -0
- package/dist/node_modules/zod/v4/locales/da.cjs +142 -0
- package/dist/node_modules/zod/v4/locales/da.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/da.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/da.js +115 -0
- package/dist/node_modules/zod/v4/locales/de.cjs +135 -0
- package/dist/node_modules/zod/v4/locales/de.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/de.js +108 -0
- package/dist/node_modules/zod/v4/locales/en.cjs +136 -0
- package/dist/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/en.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/en.js +109 -0
- package/dist/node_modules/zod/v4/locales/eo.cjs +136 -0
- package/dist/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/eo.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/eo.js +109 -0
- package/dist/node_modules/zod/v4/locales/es.cjs +159 -0
- package/dist/node_modules/zod/v4/locales/es.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/es.js +132 -0
- package/dist/node_modules/zod/v4/locales/fa.cjs +141 -0
- package/dist/node_modules/zod/v4/locales/fa.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/fa.js +114 -0
- package/dist/node_modules/zod/v4/locales/fi.cjs +139 -0
- package/dist/node_modules/zod/v4/locales/fi.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/fi.js +112 -0
- package/dist/node_modules/zod/v4/locales/fr-CA.cjs +134 -0
- package/dist/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/fr-CA.js +107 -0
- package/dist/node_modules/zod/v4/locales/fr.cjs +135 -0
- package/dist/node_modules/zod/v4/locales/fr.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/fr.js +108 -0
- package/dist/node_modules/zod/v4/locales/he.cjs +241 -0
- package/dist/node_modules/zod/v4/locales/he.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/he.js +214 -0
- package/dist/node_modules/zod/v4/locales/hu.cjs +135 -0
- package/dist/node_modules/zod/v4/locales/hu.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/hu.js +108 -0
- package/dist/node_modules/zod/v4/locales/hy.cjs +174 -0
- package/dist/node_modules/zod/v4/locales/hy.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/hy.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/hy.js +147 -0
- package/dist/node_modules/zod/v4/locales/id.cjs +133 -0
- package/dist/node_modules/zod/v4/locales/id.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/id.js +106 -0
- package/dist/node_modules/zod/v4/locales/index.cjs +104 -0
- package/dist/node_modules/zod/v4/locales/index.d.cts +49 -0
- package/dist/node_modules/zod/v4/locales/index.d.ts +49 -0
- package/dist/node_modules/zod/v4/locales/index.js +49 -0
- package/dist/node_modules/zod/v4/locales/is.cjs +136 -0
- package/dist/node_modules/zod/v4/locales/is.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/is.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/is.js +109 -0
- package/dist/node_modules/zod/v4/locales/it.cjs +135 -0
- package/dist/node_modules/zod/v4/locales/it.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/it.js +108 -0
- package/dist/node_modules/zod/v4/locales/ja.cjs +134 -0
- package/dist/node_modules/zod/v4/locales/ja.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ja.js +107 -0
- package/dist/node_modules/zod/v4/locales/ka.cjs +139 -0
- package/dist/node_modules/zod/v4/locales/ka.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ka.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ka.js +112 -0
- package/dist/node_modules/zod/v4/locales/kh.cjs +12 -0
- package/dist/node_modules/zod/v4/locales/kh.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/kh.d.ts +5 -0
- package/dist/node_modules/zod/v4/locales/kh.js +5 -0
- package/dist/node_modules/zod/v4/locales/km.cjs +137 -0
- package/dist/node_modules/zod/v4/locales/km.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/km.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/km.js +110 -0
- package/dist/node_modules/zod/v4/locales/ko.cjs +138 -0
- package/dist/node_modules/zod/v4/locales/ko.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ko.js +111 -0
- package/dist/node_modules/zod/v4/locales/lt.cjs +230 -0
- package/dist/node_modules/zod/v4/locales/lt.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/lt.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/lt.js +203 -0
- package/dist/node_modules/zod/v4/locales/mk.cjs +136 -0
- package/dist/node_modules/zod/v4/locales/mk.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/mk.js +109 -0
- package/dist/node_modules/zod/v4/locales/ms.cjs +134 -0
- package/dist/node_modules/zod/v4/locales/ms.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ms.js +107 -0
- package/dist/node_modules/zod/v4/locales/nl.cjs +137 -0
- package/dist/node_modules/zod/v4/locales/nl.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/nl.js +110 -0
- package/dist/node_modules/zod/v4/locales/no.cjs +135 -0
- package/dist/node_modules/zod/v4/locales/no.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/no.js +108 -0
- package/dist/node_modules/zod/v4/locales/ota.cjs +136 -0
- package/dist/node_modules/zod/v4/locales/ota.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ota.js +109 -0
- package/dist/node_modules/zod/v4/locales/package.json +6 -0
- package/dist/node_modules/zod/v4/locales/pl.cjs +136 -0
- package/dist/node_modules/zod/v4/locales/pl.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/pl.js +109 -0
- package/dist/node_modules/zod/v4/locales/ps.cjs +141 -0
- package/dist/node_modules/zod/v4/locales/ps.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ps.js +114 -0
- package/dist/node_modules/zod/v4/locales/pt.cjs +135 -0
- package/dist/node_modules/zod/v4/locales/pt.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/pt.js +108 -0
- package/dist/node_modules/zod/v4/locales/ru.cjs +183 -0
- package/dist/node_modules/zod/v4/locales/ru.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ru.js +156 -0
- package/dist/node_modules/zod/v4/locales/sl.cjs +136 -0
- package/dist/node_modules/zod/v4/locales/sl.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/sl.js +109 -0
- package/dist/node_modules/zod/v4/locales/sv.cjs +137 -0
- package/dist/node_modules/zod/v4/locales/sv.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/sv.js +110 -0
- package/dist/node_modules/zod/v4/locales/ta.cjs +137 -0
- package/dist/node_modules/zod/v4/locales/ta.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ta.js +110 -0
- package/dist/node_modules/zod/v4/locales/th.cjs +137 -0
- package/dist/node_modules/zod/v4/locales/th.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/th.js +110 -0
- package/dist/node_modules/zod/v4/locales/tr.cjs +132 -0
- package/dist/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/tr.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/tr.js +105 -0
- package/dist/node_modules/zod/v4/locales/ua.cjs +12 -0
- package/dist/node_modules/zod/v4/locales/ua.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ua.d.ts +5 -0
- package/dist/node_modules/zod/v4/locales/ua.js +5 -0
- package/dist/node_modules/zod/v4/locales/uk.cjs +135 -0
- package/dist/node_modules/zod/v4/locales/uk.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/uk.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/uk.js +108 -0
- package/dist/node_modules/zod/v4/locales/ur.cjs +137 -0
- package/dist/node_modules/zod/v4/locales/ur.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ur.js +110 -0
- package/dist/node_modules/zod/v4/locales/uz.cjs +136 -0
- package/dist/node_modules/zod/v4/locales/uz.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/uz.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/uz.js +109 -0
- package/dist/node_modules/zod/v4/locales/vi.cjs +135 -0
- package/dist/node_modules/zod/v4/locales/vi.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/vi.js +108 -0
- package/dist/node_modules/zod/v4/locales/yo.cjs +134 -0
- package/dist/node_modules/zod/v4/locales/yo.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/yo.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/yo.js +107 -0
- package/dist/node_modules/zod/v4/locales/zh-CN.cjs +136 -0
- package/dist/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/zh-CN.js +109 -0
- package/dist/node_modules/zod/v4/locales/zh-TW.cjs +134 -0
- package/dist/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/zh-TW.js +107 -0
- package/dist/node_modules/zod/v4/mini/checks.cjs +34 -0
- package/dist/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/dist/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/dist/node_modules/zod/v4/mini/checks.js +1 -0
- package/dist/node_modules/zod/v4/mini/coerce.cjs +52 -0
- package/dist/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/dist/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/dist/node_modules/zod/v4/mini/coerce.js +22 -0
- package/dist/node_modules/zod/v4/mini/external.cjs +63 -0
- package/dist/node_modules/zod/v4/mini/external.d.cts +12 -0
- package/dist/node_modules/zod/v4/mini/external.d.ts +12 -0
- package/dist/node_modules/zod/v4/mini/external.js +14 -0
- package/dist/node_modules/zod/v4/mini/index.cjs +32 -0
- package/dist/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/dist/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/dist/node_modules/zod/v4/mini/index.js +3 -0
- package/dist/node_modules/zod/v4/mini/iso.cjs +64 -0
- package/dist/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/dist/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/dist/node_modules/zod/v4/mini/iso.js +34 -0
- package/dist/node_modules/zod/v4/mini/package.json +6 -0
- package/dist/node_modules/zod/v4/mini/parse.cjs +16 -0
- package/dist/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/dist/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/dist/node_modules/zod/v4/mini/parse.js +1 -0
- package/dist/node_modules/zod/v4/mini/schemas.cjs +1046 -0
- package/dist/node_modules/zod/v4/mini/schemas.d.cts +427 -0
- package/dist/node_modules/zod/v4/mini/schemas.d.ts +427 -0
- package/dist/node_modules/zod/v4/mini/schemas.js +925 -0
- package/dist/node_modules/zod/v4/package.json +6 -0
- package/dist/node_modules/zod/v4-mini/index.cjs +17 -0
- package/dist/node_modules/zod/v4-mini/index.d.cts +1 -0
- package/dist/node_modules/zod/v4-mini/index.d.ts +1 -0
- package/dist/node_modules/zod/v4-mini/index.js +1 -0
- package/dist/node_modules/zod/v4-mini/package.json +6 -0
- package/dist/server/actions/build.js +915 -0
- package/dist/server/collections/ai-visualization-build-settings.js +68 -0
- package/dist/server/collections/ai-visualization-builds.js +143 -0
- package/dist/server/index.js +48 -0
- package/dist/server/pipeline/analyzer.js +220 -0
- package/dist/server/pipeline/fallback.js +113 -0
- package/dist/server/pipeline/generator.js +386 -0
- package/dist/server/pipeline/introspector.js +118 -0
- package/dist/server/pipeline/validator.js +323 -0
- package/dist/server/plugin.js +210 -0
- package/dist/server/resource/settings.js +106 -0
- package/dist/server/tools/build-visualization-block.js +130 -0
- package/dist/server/tools/index.js +46 -0
- package/dist/shared/blockSpec.js +76 -0
- package/dist/shared/constants.js +67 -0
- package/package.json +44 -0
- package/server.d.ts +2 -0
- package/server.js +1 -0
- package/src/client/BuildForm.tsx +376 -0
- package/src/client/BuildVisualizationBlockInitializer.tsx +81 -0
- package/src/client/PreviewPanel.tsx +136 -0
- package/src/client/SettingsPage.tsx +138 -0
- package/src/client/components/BuildPhaseTag.tsx +62 -0
- package/src/client/components/CollectionMultiSelect.tsx +124 -0
- package/src/client/components/LLMServiceSelect.tsx +108 -0
- package/src/client/components/ModelSelect.tsx +105 -0
- package/src/client/components/index.ts +8 -0
- package/src/client/hooks/useBuildPolling.ts +215 -0
- package/src/client/index.tsx +2 -0
- package/src/client/locale.ts +18 -0
- package/src/client/plugin.tsx +90 -0
- package/src/client-v2/index.tsx +1 -0
- package/src/client-v2/plugin.tsx +24 -0
- package/src/index.ts +2 -0
- package/src/locale/en-US.json +45 -0
- package/src/locale/namespace.ts +6 -0
- package/src/locale/vi-VN.json +46 -0
- package/src/locale/zh-CN.json +46 -0
- package/src/server/__tests__/build-action.test.ts +440 -0
- package/src/server/__tests__/plugin.test.ts +187 -0
- package/src/server/actions/build.ts +1318 -0
- package/src/server/collections/ai-visualization-build-settings.ts +43 -0
- package/src/server/collections/ai-visualization-builds.ts +122 -0
- package/src/server/index.ts +2 -0
- package/src/server/pipeline/__tests__/analyzer.test.ts +226 -0
- package/src/server/pipeline/__tests__/generator.test.ts +576 -0
- package/src/server/pipeline/__tests__/introspector.test.ts +268 -0
- package/src/server/pipeline/__tests__/validator.test.ts +517 -0
- package/src/server/pipeline/analyzer.ts +368 -0
- package/src/server/pipeline/fallback.ts +157 -0
- package/src/server/pipeline/generator.ts +651 -0
- package/src/server/pipeline/introspector.ts +206 -0
- package/src/server/pipeline/validator.ts +609 -0
- package/src/server/plugin.ts +255 -0
- package/src/server/resource/settings.ts +97 -0
- package/src/server/tools/build-visualization-block.ts +173 -0
- package/src/server/tools/index.ts +1 -0
- package/src/shared/blockSpec.ts +214 -0
- package/src/shared/constants.ts +46 -0
|
@@ -0,0 +1,576 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit and property-based tests for the Schema Generator.
|
|
3
|
+
*
|
|
4
|
+
* These tests drive the pure builders ({@link generateChartSchema} /
|
|
5
|
+
* {@link generateTableSchema} / {@link generateFormSchema}) and the public
|
|
6
|
+
* {@link generate} contract directly — no server boot is required, because the
|
|
7
|
+
* generator is a pure function over a {@link BlockSpec} (+ a {@link SchemaSummary}
|
|
8
|
+
* the chart/table/form paths intentionally ignore).
|
|
9
|
+
*
|
|
10
|
+
* Property-based coverage:
|
|
11
|
+
* - Property 1 (key uniqueness, Req 7.3): for many randomized VALID specs, every
|
|
12
|
+
* generated node key is unique across the emitted tree. NocoBase's ported core
|
|
13
|
+
* schemas legitimately reuse a small set of *structural* literal keys
|
|
14
|
+
* (`actions`, `grid`) at different nesting levels — those are sibling-scoped
|
|
15
|
+
* framework conventions, not generated identifiers, so the global-uniqueness
|
|
16
|
+
* invariant of Req 7.3 ("assign a unique property key to every generated schema
|
|
17
|
+
* node") is asserted over the generated keys (every key except that reserved
|
|
18
|
+
* structural set). A `uid()` collision — the real failure mode Req 7.3 guards
|
|
19
|
+
* against — would still surface as a duplicate.
|
|
20
|
+
* - Property 4 (chart binds ACL, Req 13.3): for many randomized chart specs,
|
|
21
|
+
* every chart block node's `x-acl-action` equals `<primaryCollection>:list`.
|
|
22
|
+
*
|
|
23
|
+
* `fast-check` is not a dependency of this repository and AGENTS.md forbids
|
|
24
|
+
* adding new runtime dependencies, so the property tests use a small seeded
|
|
25
|
+
* deterministic PRNG (`mulberry32`) and a fixed iteration count. The seed is
|
|
26
|
+
* fixed so failures are reproducible.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
import type { ISchema } from '@formily/react';
|
|
30
|
+
import { describe, expect, it } from 'vitest';
|
|
31
|
+
|
|
32
|
+
import type { BlockSpec, ChartSpecItem, SchemaSummary } from '../../../shared/blockSpec';
|
|
33
|
+
import { generate, generateChartSchema, generateFormSchema, generateTableSchema } from '../generator';
|
|
34
|
+
|
|
35
|
+
// ---------------------------------------------------------------------------
|
|
36
|
+
// Schema traversal helpers (typed without `any`).
|
|
37
|
+
// ---------------------------------------------------------------------------
|
|
38
|
+
|
|
39
|
+
/** A schema node viewed as an open record so `x-*` keys can be read safely. */
|
|
40
|
+
type Node = Record<string, unknown>;
|
|
41
|
+
|
|
42
|
+
/** View an {@link ISchema} as an open record for traversal/reads. */
|
|
43
|
+
function asNode(schema: ISchema): Node {
|
|
44
|
+
return schema as unknown as Node;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** The `[key, childNode]` entries of a node's `properties`, or `[]`. */
|
|
48
|
+
function propertyEntries(node: Node): Array<[string, Node]> {
|
|
49
|
+
const props = node.properties;
|
|
50
|
+
if (props && typeof props === 'object') {
|
|
51
|
+
return Object.entries(props as Record<string, Node>);
|
|
52
|
+
}
|
|
53
|
+
return [];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** Invoke `visit` on `node` and every descendant reachable via `properties`. */
|
|
57
|
+
function eachNode(node: Node, visit: (node: Node) => void): void {
|
|
58
|
+
visit(node);
|
|
59
|
+
for (const [, child] of propertyEntries(node)) {
|
|
60
|
+
eachNode(child, visit);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** Collect every property key declared anywhere in the tree (recursively). */
|
|
65
|
+
function collectPropertyKeys(schema: ISchema): string[] {
|
|
66
|
+
const keys: string[] = [];
|
|
67
|
+
const walk = (node: Node): void => {
|
|
68
|
+
for (const [key, child] of propertyEntries(node)) {
|
|
69
|
+
keys.push(key);
|
|
70
|
+
walk(child);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
walk(asNode(schema));
|
|
74
|
+
return keys;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** Read a string-valued attribute (e.g. an `x-*` key) from a node, or undefined. */
|
|
78
|
+
function str(node: Node, key: string): string | undefined {
|
|
79
|
+
const value = node[key];
|
|
80
|
+
return typeof value === 'string' ? value : undefined;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** All nodes (root + descendants) for which `predicate` holds. */
|
|
84
|
+
function findNodes(schema: ISchema, predicate: (node: Node) => boolean): Node[] {
|
|
85
|
+
const matches: Node[] = [];
|
|
86
|
+
eachNode(asNode(schema), (node) => {
|
|
87
|
+
if (predicate(node)) {
|
|
88
|
+
matches.push(node);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
return matches;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** Nodes whose `x-decorator` equals `name`. */
|
|
95
|
+
function nodesByDecorator(schema: ISchema, name: string): Node[] {
|
|
96
|
+
return findNodes(schema, (node) => str(node, 'x-decorator') === name);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** Nodes whose `x-component` equals `name`. */
|
|
100
|
+
function nodesByComponent(schema: ISchema, name: string): Node[] {
|
|
101
|
+
return findNodes(schema, (node) => str(node, 'x-component') === name);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** Every distinct `x-decorator` value present in the tree. */
|
|
105
|
+
function decoratorSet(schema: ISchema): Set<string> {
|
|
106
|
+
const set = new Set<string>();
|
|
107
|
+
eachNode(asNode(schema), (node) => {
|
|
108
|
+
const value = str(node, 'x-decorator');
|
|
109
|
+
if (value) set.add(value);
|
|
110
|
+
});
|
|
111
|
+
return set;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** Every distinct `x-component` value present in the tree. */
|
|
115
|
+
function componentSet(schema: ISchema): Set<string> {
|
|
116
|
+
const set = new Set<string>();
|
|
117
|
+
eachNode(asNode(schema), (node) => {
|
|
118
|
+
const value = str(node, 'x-component');
|
|
119
|
+
if (value) set.add(value);
|
|
120
|
+
});
|
|
121
|
+
return set;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** Every distinct `x-`-prefixed attribute key present on any node in the tree. */
|
|
125
|
+
function xAttributeKeys(schema: ISchema): Set<string> {
|
|
126
|
+
const set = new Set<string>();
|
|
127
|
+
eachNode(asNode(schema), (node) => {
|
|
128
|
+
for (const key of Object.keys(node)) {
|
|
129
|
+
if (key.startsWith('x-')) set.add(key);
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
return set;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/** Collect the `x-collection-field` bindings declared anywhere in the tree. */
|
|
136
|
+
function collectionFieldBindings(schema: ISchema): string[] {
|
|
137
|
+
const bindings: string[] = [];
|
|
138
|
+
eachNode(asNode(schema), (node) => {
|
|
139
|
+
const value = str(node, 'x-collection-field');
|
|
140
|
+
if (value) bindings.push(value);
|
|
141
|
+
});
|
|
142
|
+
return bindings;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// ---------------------------------------------------------------------------
|
|
146
|
+
// Spec fixtures + a minimal summary (the chart/table/form paths ignore it).
|
|
147
|
+
// ---------------------------------------------------------------------------
|
|
148
|
+
|
|
149
|
+
/** A minimal summary for the paths that bind purely from the spec. */
|
|
150
|
+
const EMPTY_SUMMARY: SchemaSummary = { dataSource: 'main', collections: [] };
|
|
151
|
+
|
|
152
|
+
/** A summary whose primary collection has an `id` field (fallback-friendly). */
|
|
153
|
+
const SUMMARY_WITH_ID: SchemaSummary = {
|
|
154
|
+
dataSource: 'main',
|
|
155
|
+
collections: [
|
|
156
|
+
{
|
|
157
|
+
name: 'orders',
|
|
158
|
+
fields: [
|
|
159
|
+
{ name: 'id', type: 'bigInt', interface: 'integer', title: 'ID' },
|
|
160
|
+
{ name: 'status', type: 'string', interface: 'select', title: 'Status' },
|
|
161
|
+
{ name: 'createdAt', type: 'date', interface: 'createdAt', title: 'Created' },
|
|
162
|
+
],
|
|
163
|
+
relations: [],
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
function chartSpec(): BlockSpec {
|
|
169
|
+
return {
|
|
170
|
+
version: 1,
|
|
171
|
+
blockType: 'chart',
|
|
172
|
+
title: 'Orders overview',
|
|
173
|
+
primaryCollection: 'orders',
|
|
174
|
+
dataSource: 'main',
|
|
175
|
+
charts: [
|
|
176
|
+
{
|
|
177
|
+
key: 'by-status',
|
|
178
|
+
title: 'Orders by status',
|
|
179
|
+
chartType: 'ant-design-charts.pie',
|
|
180
|
+
measures: [{ field: 'id', aggregation: 'count', alias: 'value' }],
|
|
181
|
+
dimensions: [{ field: 'status', alias: 'status' }],
|
|
182
|
+
config: { angleField: 'value', colorField: 'status' },
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
key: 'total',
|
|
186
|
+
title: 'Total orders',
|
|
187
|
+
chartType: 'antd.statistic',
|
|
188
|
+
measures: [{ field: 'id', aggregation: 'count', alias: 'value' }],
|
|
189
|
+
},
|
|
190
|
+
],
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
function tableSpec(): BlockSpec {
|
|
195
|
+
return {
|
|
196
|
+
version: 1,
|
|
197
|
+
blockType: 'table',
|
|
198
|
+
title: 'Posts',
|
|
199
|
+
primaryCollection: 'posts',
|
|
200
|
+
dataSource: 'main',
|
|
201
|
+
table: { fields: ['title', 'status', 'createdAt'] },
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function formSpec(): BlockSpec {
|
|
206
|
+
return {
|
|
207
|
+
version: 1,
|
|
208
|
+
blockType: 'form',
|
|
209
|
+
title: 'New post',
|
|
210
|
+
primaryCollection: 'posts',
|
|
211
|
+
dataSource: 'main',
|
|
212
|
+
form: { fields: ['title', 'body'], mode: 'create' },
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// ---------------------------------------------------------------------------
|
|
217
|
+
// Unit tests — chart path (Req 7.1, 7.3, 7.4, 13.3 / Property 4).
|
|
218
|
+
// ---------------------------------------------------------------------------
|
|
219
|
+
|
|
220
|
+
describe('generateChartSchema', () => {
|
|
221
|
+
it('builds the data-visualization component tree with one renderer per chart', () => {
|
|
222
|
+
const spec = chartSpec();
|
|
223
|
+
const schema = generateChartSchema(spec, EMPTY_SUMMARY);
|
|
224
|
+
|
|
225
|
+
// Outer block: ChartCardItem / ChartBlockProvider / ChartV2Block (Req 7.1).
|
|
226
|
+
expect(componentSet(schema).has('ChartCardItem')).toBe(true);
|
|
227
|
+
expect(decoratorSet(schema).has('ChartBlockProvider')).toBe(true);
|
|
228
|
+
expect(decoratorSet(schema).has('ChartV2Block')).toBe(true);
|
|
229
|
+
|
|
230
|
+
// One ChartRendererProvider / ChartRenderer pair per chart in the spec.
|
|
231
|
+
const renderers = nodesByDecorator(schema, 'ChartRendererProvider');
|
|
232
|
+
expect(renderers).toHaveLength(spec.charts?.length ?? 0);
|
|
233
|
+
expect(nodesByComponent(schema, 'ChartRenderer')).toHaveLength(spec.charts?.length ?? 0);
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
it('binds every renderer to `<primaryCollection>:list` (Req 13.3)', () => {
|
|
237
|
+
const spec = chartSpec();
|
|
238
|
+
const schema = generateChartSchema(spec, EMPTY_SUMMARY);
|
|
239
|
+
|
|
240
|
+
const renderers = nodesByDecorator(schema, 'ChartRendererProvider');
|
|
241
|
+
expect(renderers.length).toBeGreaterThan(0);
|
|
242
|
+
for (const renderer of renderers) {
|
|
243
|
+
expect(str(renderer, 'x-acl-action')).toBe(`${spec.primaryCollection}:list`);
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
// ---------------------------------------------------------------------------
|
|
249
|
+
// Unit tests — table path (Req 7.2, 7.3, 7.4, 13.3).
|
|
250
|
+
// ---------------------------------------------------------------------------
|
|
251
|
+
|
|
252
|
+
describe('generateTableSchema', () => {
|
|
253
|
+
it('builds a TableBlockProvider / TableV2 block with one column per field', () => {
|
|
254
|
+
const spec = tableSpec();
|
|
255
|
+
const fields = spec.table?.fields ?? [];
|
|
256
|
+
const schema = generateTableSchema(spec, EMPTY_SUMMARY);
|
|
257
|
+
|
|
258
|
+
expect(decoratorSet(schema).has('TableBlockProvider')).toBe(true);
|
|
259
|
+
expect(componentSet(schema).has('TableV2')).toBe(true);
|
|
260
|
+
|
|
261
|
+
// A field column per spec field (the action column uses a different decorator).
|
|
262
|
+
const fieldColumns = findNodes(
|
|
263
|
+
schema,
|
|
264
|
+
(node) =>
|
|
265
|
+
str(node, 'x-component') === 'TableV2.Column' && str(node, 'x-decorator') === 'TableV2.Column.Decorator',
|
|
266
|
+
);
|
|
267
|
+
expect(fieldColumns).toHaveLength(fields.length);
|
|
268
|
+
|
|
269
|
+
// Each field is rendered via `<collection>.<field>` (Req 7.2).
|
|
270
|
+
expect(collectionFieldBindings(schema).sort()).toEqual(fields.map((f) => `${spec.primaryCollection}.${f}`).sort());
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
it('carries `x-acl-action: <collection>:list` on the block node (Req 13.3)', () => {
|
|
274
|
+
const spec = tableSpec();
|
|
275
|
+
const schema = generateTableSchema(spec, EMPTY_SUMMARY);
|
|
276
|
+
|
|
277
|
+
const providers = nodesByDecorator(schema, 'TableBlockProvider');
|
|
278
|
+
expect(providers).toHaveLength(1);
|
|
279
|
+
expect(str(providers[0], 'x-acl-action')).toBe(`${spec.primaryCollection}:list`);
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
// ---------------------------------------------------------------------------
|
|
284
|
+
// Unit tests — form path (Req 7.2, 7.3, 7.4).
|
|
285
|
+
// ---------------------------------------------------------------------------
|
|
286
|
+
|
|
287
|
+
describe('generateFormSchema', () => {
|
|
288
|
+
it('builds a FormBlockProvider / FormV2 block with one field item per field', () => {
|
|
289
|
+
const spec = formSpec();
|
|
290
|
+
const fields = spec.form?.fields ?? [];
|
|
291
|
+
const schema = generateFormSchema(spec, EMPTY_SUMMARY);
|
|
292
|
+
|
|
293
|
+
expect(decoratorSet(schema).has('FormBlockProvider')).toBe(true);
|
|
294
|
+
expect(componentSet(schema).has('FormV2')).toBe(true);
|
|
295
|
+
|
|
296
|
+
// One CollectionField (FormItem) per spec field (Req 7.2).
|
|
297
|
+
const fieldItems = findNodes(
|
|
298
|
+
schema,
|
|
299
|
+
(node) => str(node, 'x-component') === 'CollectionField' && str(node, 'x-decorator') === 'FormItem',
|
|
300
|
+
);
|
|
301
|
+
expect(fieldItems).toHaveLength(fields.length);
|
|
302
|
+
expect(collectionFieldBindings(schema).sort()).toEqual(fields.map((f) => `${spec.primaryCollection}.${f}`).sort());
|
|
303
|
+
});
|
|
304
|
+
|
|
305
|
+
it('uses the create-form ACL action for `mode: create`', () => {
|
|
306
|
+
const schema = generateFormSchema(formSpec(), EMPTY_SUMMARY);
|
|
307
|
+
const providers = nodesByDecorator(schema, 'FormBlockProvider');
|
|
308
|
+
expect(providers).toHaveLength(1);
|
|
309
|
+
expect(str(providers[0], 'x-acl-action')).toBe('posts:create');
|
|
310
|
+
});
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
// ---------------------------------------------------------------------------
|
|
314
|
+
// Unit tests — required `x-*` keys on block-level nodes (Req 7.4).
|
|
315
|
+
// ---------------------------------------------------------------------------
|
|
316
|
+
|
|
317
|
+
describe('block-level x-* keys (Req 7.4)', () => {
|
|
318
|
+
const required = ['x-decorator', 'x-component', 'x-settings', 'x-initializer'];
|
|
319
|
+
|
|
320
|
+
it.each([
|
|
321
|
+
['chart', chartSpec()],
|
|
322
|
+
['table', tableSpec()],
|
|
323
|
+
['form', formSpec()],
|
|
324
|
+
] as const)('every required x-* key is present in the %s schema tree', (_label, spec) => {
|
|
325
|
+
const result = generate(spec, EMPTY_SUMMARY);
|
|
326
|
+
expect(result.ok).toBe(true);
|
|
327
|
+
if (!result.ok) return;
|
|
328
|
+
|
|
329
|
+
const present = xAttributeKeys(result.schema);
|
|
330
|
+
for (const key of required) {
|
|
331
|
+
expect(present.has(key)).toBe(true);
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
// ---------------------------------------------------------------------------
|
|
337
|
+
// Unit tests — GenerateResult contract: empty spec → fallback (Req 7.5).
|
|
338
|
+
// ---------------------------------------------------------------------------
|
|
339
|
+
|
|
340
|
+
describe('generate (empty / unproducible spec → fallback, Req 7.5)', () => {
|
|
341
|
+
it.each([
|
|
342
|
+
['chart with no charts', { ...chartSpec(), charts: [] } as BlockSpec],
|
|
343
|
+
['table with no fields', { ...tableSpec(), table: { fields: [] } } as BlockSpec],
|
|
344
|
+
['form with no fields', { ...formSpec(), form: { fields: [] } } as BlockSpec],
|
|
345
|
+
])('returns a fallback schema for a %s', (_label, spec) => {
|
|
346
|
+
const result = generate(spec, SUMMARY_WITH_ID);
|
|
347
|
+
|
|
348
|
+
expect(result.ok).toBe(true);
|
|
349
|
+
if (!result.ok) return;
|
|
350
|
+
expect(result.usedFallback).toBe(true);
|
|
351
|
+
expect(result.schema).toBeDefined();
|
|
352
|
+
// The fallback is always a chart overview bound to the summary's collection.
|
|
353
|
+
expect(decoratorSet(result.schema).has('ChartBlockProvider')).toBe(true);
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
it('marks a directly-produced spec as not using the fallback', () => {
|
|
357
|
+
const result = generate(chartSpec(), EMPTY_SUMMARY);
|
|
358
|
+
expect(result.ok).toBe(true);
|
|
359
|
+
if (!result.ok) return;
|
|
360
|
+
expect(result.usedFallback).toBe(false);
|
|
361
|
+
});
|
|
362
|
+
});
|
|
363
|
+
|
|
364
|
+
// ---------------------------------------------------------------------------
|
|
365
|
+
// Unit tests — error path: no partial schema (Req 7.6 / Property 5).
|
|
366
|
+
// ---------------------------------------------------------------------------
|
|
367
|
+
|
|
368
|
+
describe('generate (generation error → no partial schema, Req 7.6)', () => {
|
|
369
|
+
it('returns an error result and emits no schema when construction throws', () => {
|
|
370
|
+
// A chart spec that is "producible" (charts.length > 0) but whose single
|
|
371
|
+
// chart is malformed (no `measures`) — this reaches the internal builder and
|
|
372
|
+
// makes `createChartSchema` throw on `chart.measures.map(...)`. This is the
|
|
373
|
+
// only way generation throws *after* the producibility gate: an unknown
|
|
374
|
+
// `blockType` is treated as unproducible and routed to the fallback before
|
|
375
|
+
// `generateSchema` is reached, so the throwing dispatcher path is exercised
|
|
376
|
+
// here through the malformed-but-producible chart instead.
|
|
377
|
+
const malformed: BlockSpec = {
|
|
378
|
+
version: 1,
|
|
379
|
+
blockType: 'chart',
|
|
380
|
+
title: 'Broken',
|
|
381
|
+
primaryCollection: 'orders',
|
|
382
|
+
dataSource: 'main',
|
|
383
|
+
charts: [{} as ChartSpecItem],
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
const result = generate(malformed, EMPTY_SUMMARY);
|
|
387
|
+
|
|
388
|
+
expect(result.ok).toBe(false);
|
|
389
|
+
if (result.ok) return;
|
|
390
|
+
expect(typeof result.error).toBe('string');
|
|
391
|
+
expect(result.error.length).toBeGreaterThan(0);
|
|
392
|
+
// No partial schema object is emitted on the failure result.
|
|
393
|
+
expect('schema' in result).toBe(false);
|
|
394
|
+
});
|
|
395
|
+
});
|
|
396
|
+
|
|
397
|
+
// ---------------------------------------------------------------------------
|
|
398
|
+
// Seeded deterministic PRNG + valid-spec generators for the property tests.
|
|
399
|
+
// ---------------------------------------------------------------------------
|
|
400
|
+
|
|
401
|
+
/** Deterministic 32-bit PRNG (mulberry32). Returns a float in [0, 1). */
|
|
402
|
+
function mulberry32(seed: number): () => number {
|
|
403
|
+
let a = seed >>> 0;
|
|
404
|
+
return () => {
|
|
405
|
+
a |= 0;
|
|
406
|
+
a = (a + 0x6d2b79f5) | 0;
|
|
407
|
+
let t = Math.imul(a ^ (a >>> 15), 1 | a);
|
|
408
|
+
t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
|
|
409
|
+
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/** Integer in [min, max] inclusive. */
|
|
414
|
+
function intBetween(rng: () => number, min: number, max: number): number {
|
|
415
|
+
return min + Math.floor(rng() * (max - min + 1));
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/** Pick one element from a non-empty list. */
|
|
419
|
+
function pick<T>(rng: () => number, items: readonly T[]): T {
|
|
420
|
+
return items[intBetween(rng, 0, items.length - 1)];
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
const COLLECTION_POOL = ['orders', 'posts', 'users', 'invoices', 'products'] as const;
|
|
424
|
+
const FIELD_POOL = [
|
|
425
|
+
'id',
|
|
426
|
+
'title',
|
|
427
|
+
'status',
|
|
428
|
+
'amount',
|
|
429
|
+
'createdAt',
|
|
430
|
+
'updatedAt',
|
|
431
|
+
'name',
|
|
432
|
+
'total',
|
|
433
|
+
'category',
|
|
434
|
+
'priority',
|
|
435
|
+
] as const;
|
|
436
|
+
const CHART_TYPE_POOL = [
|
|
437
|
+
'ant-design-charts.pie',
|
|
438
|
+
'ant-design-charts.line',
|
|
439
|
+
'ant-design-charts.column',
|
|
440
|
+
'antd.statistic',
|
|
441
|
+
] as const;
|
|
442
|
+
const AGGREGATIONS = ['count', 'sum', 'avg', 'max', 'min'] as const;
|
|
443
|
+
|
|
444
|
+
/** A set of `count` distinct field names drawn from the pool. */
|
|
445
|
+
function distinctFields(rng: () => number, count: number): string[] {
|
|
446
|
+
const shuffled = [...FIELD_POOL].sort(() => rng() - 0.5);
|
|
447
|
+
return shuffled.slice(0, count);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
function randomChartSpec(rng: () => number): BlockSpec {
|
|
451
|
+
const primaryCollection = pick(rng, COLLECTION_POOL);
|
|
452
|
+
const chartCount = intBetween(rng, 1, 4);
|
|
453
|
+
const charts: ChartSpecItem[] = [];
|
|
454
|
+
for (let i = 0; i < chartCount; i += 1) {
|
|
455
|
+
const measureCount = intBetween(rng, 1, 3);
|
|
456
|
+
const measures = Array.from({ length: measureCount }, (_, m) => ({
|
|
457
|
+
field: pick(rng, FIELD_POOL),
|
|
458
|
+
aggregation: pick(rng, AGGREGATIONS),
|
|
459
|
+
alias: `m${i}_${m}`,
|
|
460
|
+
}));
|
|
461
|
+
const dimensionCount = intBetween(rng, 0, 2);
|
|
462
|
+
const dimensions = Array.from({ length: dimensionCount }, (_, d) => ({
|
|
463
|
+
field: pick(rng, FIELD_POOL),
|
|
464
|
+
alias: `d${i}_${d}`,
|
|
465
|
+
}));
|
|
466
|
+
charts.push({
|
|
467
|
+
key: `chart-${i}`,
|
|
468
|
+
title: `Chart ${i}`,
|
|
469
|
+
chartType: pick(rng, CHART_TYPE_POOL),
|
|
470
|
+
measures,
|
|
471
|
+
dimensions,
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
return {
|
|
475
|
+
version: 1,
|
|
476
|
+
blockType: 'chart',
|
|
477
|
+
title: 'Generated chart',
|
|
478
|
+
primaryCollection,
|
|
479
|
+
dataSource: 'main',
|
|
480
|
+
charts,
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
function randomTableSpec(rng: () => number): BlockSpec {
|
|
485
|
+
return {
|
|
486
|
+
version: 1,
|
|
487
|
+
blockType: 'table',
|
|
488
|
+
title: 'Generated table',
|
|
489
|
+
primaryCollection: pick(rng, COLLECTION_POOL),
|
|
490
|
+
dataSource: 'main',
|
|
491
|
+
table: { fields: distinctFields(rng, intBetween(rng, 1, 6)) },
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
function randomFormSpec(rng: () => number): BlockSpec {
|
|
496
|
+
return {
|
|
497
|
+
version: 1,
|
|
498
|
+
blockType: 'form',
|
|
499
|
+
title: 'Generated form',
|
|
500
|
+
primaryCollection: pick(rng, COLLECTION_POOL),
|
|
501
|
+
dataSource: 'main',
|
|
502
|
+
form: {
|
|
503
|
+
fields: distinctFields(rng, intBetween(rng, 1, 6)),
|
|
504
|
+
mode: pick(rng, ['create', 'edit'] as const),
|
|
505
|
+
},
|
|
506
|
+
};
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
function randomValidBlockSpec(rng: () => number): BlockSpec {
|
|
510
|
+
switch (intBetween(rng, 0, 2)) {
|
|
511
|
+
case 0:
|
|
512
|
+
return randomChartSpec(rng);
|
|
513
|
+
case 1:
|
|
514
|
+
return randomTableSpec(rng);
|
|
515
|
+
default:
|
|
516
|
+
return randomFormSpec(rng);
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* Structural literal keys that NocoBase's ported core schemas reuse across
|
|
522
|
+
* nesting levels (sibling-scoped framework conventions, not generated ids). They
|
|
523
|
+
* are excluded from the global key-uniqueness assertion — see the file header.
|
|
524
|
+
*/
|
|
525
|
+
const RESERVED_STRUCTURAL_KEYS = new Set(['actions', 'grid']);
|
|
526
|
+
|
|
527
|
+
const PROPERTY_ITERATIONS = 200;
|
|
528
|
+
const PROPERTY_SEED = 0x5eed1234;
|
|
529
|
+
|
|
530
|
+
// ---------------------------------------------------------------------------
|
|
531
|
+
// Property 1 — SchemaGenerator key uniqueness (Req 7.3).
|
|
532
|
+
// ---------------------------------------------------------------------------
|
|
533
|
+
|
|
534
|
+
describe('Property 1: SchemaGenerator key uniqueness', () => {
|
|
535
|
+
// Validates: Requirements 7.3
|
|
536
|
+
it('generated node keys are globally unique across the emitted schema', () => {
|
|
537
|
+
const rng = mulberry32(PROPERTY_SEED);
|
|
538
|
+
for (let iteration = 0; iteration < PROPERTY_ITERATIONS; iteration += 1) {
|
|
539
|
+
const spec = randomValidBlockSpec(rng);
|
|
540
|
+
const result = generate(spec, EMPTY_SUMMARY);
|
|
541
|
+
|
|
542
|
+
expect(result.ok, `spec ${JSON.stringify(spec)} should generate`).toBe(true);
|
|
543
|
+
if (!result.ok) continue;
|
|
544
|
+
|
|
545
|
+
const keys = collectPropertyKeys(result.schema).filter((key) => !RESERVED_STRUCTURAL_KEYS.has(key));
|
|
546
|
+
const distinct = new Set(keys);
|
|
547
|
+
expect(distinct.size, `duplicate generated key for spec ${JSON.stringify(spec)}`).toBe(keys.length);
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
});
|
|
551
|
+
|
|
552
|
+
// ---------------------------------------------------------------------------
|
|
553
|
+
// Property 4 — Generated chart binds ACL (Req 13.3).
|
|
554
|
+
// ---------------------------------------------------------------------------
|
|
555
|
+
|
|
556
|
+
describe('Property 4: generated chart binds ACL', () => {
|
|
557
|
+
// Validates: Requirements 13.3
|
|
558
|
+
it('every chart block node carries `x-acl-action` = `<primaryCollection>:list`', () => {
|
|
559
|
+
const rng = mulberry32(PROPERTY_SEED ^ 0x1357);
|
|
560
|
+
for (let iteration = 0; iteration < PROPERTY_ITERATIONS; iteration += 1) {
|
|
561
|
+
const spec = randomChartSpec(rng);
|
|
562
|
+
const result = generate(spec, EMPTY_SUMMARY);
|
|
563
|
+
|
|
564
|
+
expect(result.ok).toBe(true);
|
|
565
|
+
if (!result.ok) continue;
|
|
566
|
+
|
|
567
|
+
const renderers = nodesByDecorator(result.schema, 'ChartRendererProvider');
|
|
568
|
+
expect(renderers.length, `expected one renderer per chart for ${JSON.stringify(spec.charts?.length)}`).toBe(
|
|
569
|
+
spec.charts?.length ?? 0,
|
|
570
|
+
);
|
|
571
|
+
for (const renderer of renderers) {
|
|
572
|
+
expect(str(renderer, 'x-acl-action')).toBe(`${spec.primaryCollection}:list`);
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
});
|
|
576
|
+
});
|