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,440 @@
|
|
|
1
|
+
import { randomUUID } from 'crypto';
|
|
2
|
+
|
|
3
|
+
import type { Context, Next } from '@nocobase/actions';
|
|
4
|
+
import { createMockServer, MockServer } from '@nocobase/test';
|
|
5
|
+
|
|
6
|
+
import { COLLECTION_NAME } from '../../shared/constants';
|
|
7
|
+
import { build, processQueuedBuild, unregisterBuildQueue } from '../actions/build';
|
|
8
|
+
import PluginBuildVisualizationBlockServer from '../plugin';
|
|
9
|
+
import { buildVisualizationBlockTool } from '../tools';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Integration tests for the build action + worker pipeline (task 7.5).
|
|
13
|
+
*
|
|
14
|
+
* Coverage:
|
|
15
|
+
* - Req 10.1 — the `build` action creates a `queued` record and returns
|
|
16
|
+
* immediately (the UI never blocks on generation).
|
|
17
|
+
* - Input rejection — empty collections, empty/whitespace requirement, and a
|
|
18
|
+
* missing llmService/model are all rejected with 400 before any record is
|
|
19
|
+
* created.
|
|
20
|
+
* - Req 13.2 — per-collection `list` permission is enforced; a role without it
|
|
21
|
+
* is denied with 403.
|
|
22
|
+
* - Req 5.5 / 5.6 / 12.1 — the worker pipeline is driven end-to-end against a
|
|
23
|
+
* stubbed AI provider for three provider outputs (valid BlockSpec, garbage
|
|
24
|
+
* text, and a throwing invocation), asserting the build always reaches a
|
|
25
|
+
* `completed`, never-broken state with the correct `usedFallback` flag.
|
|
26
|
+
*
|
|
27
|
+
* NOTE: server tests must NOT run in parallel (they share a database) — run
|
|
28
|
+
* this file on its own with `yarn test <path> --run`.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/** A simple, deterministic collection the pipeline introspects/generates over. */
|
|
32
|
+
const TEST_COLLECTION = 'tvizPosts';
|
|
33
|
+
|
|
34
|
+
/** The minimal record shape we read back off a build record model instance. */
|
|
35
|
+
interface BuildRecordView {
|
|
36
|
+
id: number | string;
|
|
37
|
+
status: string;
|
|
38
|
+
buildPhase: string;
|
|
39
|
+
usedFallback: boolean;
|
|
40
|
+
blockSchema: unknown;
|
|
41
|
+
blockSpec: unknown;
|
|
42
|
+
errorMessage: string | null;
|
|
43
|
+
buildLog: string | null;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** The stubbed AI provider chat model surface (`app.pm.get('ai')`). */
|
|
47
|
+
interface ChatModelStub {
|
|
48
|
+
invoke: (messages: unknown[]) => Promise<{ content: unknown }>;
|
|
49
|
+
}
|
|
50
|
+
interface AiPluginStub {
|
|
51
|
+
aiManager: {
|
|
52
|
+
getLLMService: (args: unknown) => Promise<{ provider: { chatModel: ChatModelStub } }>;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** Records the `(status, message)` of the first `ctx.throw(...)` call. */
|
|
57
|
+
interface ThrownRecord {
|
|
58
|
+
status?: number;
|
|
59
|
+
message?: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const noopNext: Next = async () => {};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Build a hand-rolled action `ctx` for invoking `build(ctx, next)` directly
|
|
66
|
+
* (no HTTP layer). `ctx.throw` records the status then throws, mirroring Koa.
|
|
67
|
+
*/
|
|
68
|
+
function makeCtx(opts: {
|
|
69
|
+
values: Record<string, unknown>;
|
|
70
|
+
currentRoles: string[];
|
|
71
|
+
app: unknown;
|
|
72
|
+
db?: unknown;
|
|
73
|
+
userId?: number | null;
|
|
74
|
+
}): {
|
|
75
|
+
ctx: Context;
|
|
76
|
+
thrown: ThrownRecord;
|
|
77
|
+
getBody: () => { id?: unknown; status?: string; buildPhase?: string } | undefined;
|
|
78
|
+
} {
|
|
79
|
+
const thrown: ThrownRecord = {};
|
|
80
|
+
const ctx = {
|
|
81
|
+
app: opts.app,
|
|
82
|
+
db: opts.db,
|
|
83
|
+
action: { params: { values: opts.values } },
|
|
84
|
+
state: { currentRoles: opts.currentRoles },
|
|
85
|
+
auth: { user: { id: opts.userId ?? null } },
|
|
86
|
+
t: (text: string) => text,
|
|
87
|
+
throw: (status: number, message?: string) => {
|
|
88
|
+
if (thrown.status === undefined) {
|
|
89
|
+
thrown.status = status;
|
|
90
|
+
thrown.message = message;
|
|
91
|
+
}
|
|
92
|
+
const error = new Error(message ?? `HTTP ${status}`) as Error & { status?: number };
|
|
93
|
+
error.status = status;
|
|
94
|
+
throw error;
|
|
95
|
+
},
|
|
96
|
+
body: undefined as unknown,
|
|
97
|
+
};
|
|
98
|
+
return {
|
|
99
|
+
ctx: ctx as unknown as Context,
|
|
100
|
+
thrown,
|
|
101
|
+
getBody: () => (ctx as unknown as { body?: { id?: unknown; status?: string; buildPhase?: string } }).body,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
describe('plugin-build-visualization-block build action + pipeline', () => {
|
|
106
|
+
let app: MockServer | undefined;
|
|
107
|
+
let bootError: unknown;
|
|
108
|
+
|
|
109
|
+
beforeAll(async () => {
|
|
110
|
+
try {
|
|
111
|
+
app = await createMockServer({
|
|
112
|
+
plugins: ['nocobase', PluginBuildVisualizationBlockServer],
|
|
113
|
+
});
|
|
114
|
+
// A small, deterministic collection the introspector/generator run over.
|
|
115
|
+
app.db.collection({
|
|
116
|
+
name: TEST_COLLECTION,
|
|
117
|
+
fields: [
|
|
118
|
+
{ type: 'bigInt', name: 'id', primaryKey: true, autoIncrement: true },
|
|
119
|
+
{ type: 'string', name: 'title' },
|
|
120
|
+
{ type: 'string', name: 'status' },
|
|
121
|
+
],
|
|
122
|
+
});
|
|
123
|
+
await app.db.sync();
|
|
124
|
+
|
|
125
|
+
// `createMockServer` runs a single all-jobs node, so the plugin's build
|
|
126
|
+
// queue treats it as a worker and a background poller would claim queued
|
|
127
|
+
// records the moment they are created. Stop that poller so the
|
|
128
|
+
// queued-state assertions are deterministic; the pipeline test drives a
|
|
129
|
+
// record through `processQueuedBuild` explicitly instead.
|
|
130
|
+
unregisterBuildQueue(app);
|
|
131
|
+
} catch (error) {
|
|
132
|
+
// The mock-server harness needs a reachable test database. If it cannot
|
|
133
|
+
// boot here, record the reason and let each test skip with a clear
|
|
134
|
+
// message rather than reporting a false failure.
|
|
135
|
+
bootError = error;
|
|
136
|
+
// eslint-disable-next-line no-console
|
|
137
|
+
console.warn(
|
|
138
|
+
`[plugin-build-visualization-block] Skipping build-action tests; mock server could not start: ${String(error)}`,
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
afterAll(async () => {
|
|
144
|
+
await app?.destroy();
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
/** Returns the booted app or skips the calling test with a clear reason. */
|
|
148
|
+
const requireApp = (): MockServer | undefined => {
|
|
149
|
+
if (!app) {
|
|
150
|
+
// eslint-disable-next-line no-console
|
|
151
|
+
console.warn(`[plugin-build-visualization-block] Test skipped — mock server unavailable: ${String(bootError)}`);
|
|
152
|
+
}
|
|
153
|
+
return app;
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
it('creates a queued record and returns immediately (Req 10.1)', async () => {
|
|
157
|
+
const server = requireApp();
|
|
158
|
+
if (!server) return;
|
|
159
|
+
|
|
160
|
+
const { ctx, thrown, getBody } = makeCtx({
|
|
161
|
+
values: {
|
|
162
|
+
requirement: 'Show a table of posts',
|
|
163
|
+
collections: [TEST_COLLECTION],
|
|
164
|
+
primaryCollection: TEST_COLLECTION,
|
|
165
|
+
dataSource: 'main',
|
|
166
|
+
llmService: 'openai',
|
|
167
|
+
model: 'gpt-4o-mini',
|
|
168
|
+
},
|
|
169
|
+
currentRoles: ['root'], // bypass ACL
|
|
170
|
+
app: server,
|
|
171
|
+
db: server.db,
|
|
172
|
+
userId: 1,
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
// `beforeAll` unregistered the build queue (to stop the background poller
|
|
176
|
+
// from claiming queued records mid-assertion), which also unsubscribed the
|
|
177
|
+
// in-process event-queue channel. On this single all-jobs (worker) node the
|
|
178
|
+
// `build` action's `enqueueBuild` would otherwise try to publish to that
|
|
179
|
+
// now-unsubscribed channel and throw. Stub `publish` to a no-op so enqueue
|
|
180
|
+
// succeeds without kicking off processing — the record must stay `queued`.
|
|
181
|
+
const eventQueue = server.eventQueue as unknown as {
|
|
182
|
+
publish: (...args: unknown[]) => Promise<void>;
|
|
183
|
+
};
|
|
184
|
+
const originalPublish = eventQueue.publish;
|
|
185
|
+
eventQueue.publish = async () => {};
|
|
186
|
+
try {
|
|
187
|
+
await build(ctx, noopNext);
|
|
188
|
+
} finally {
|
|
189
|
+
eventQueue.publish = originalPublish;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// The action returns synchronously with the queued identity (no blocking).
|
|
193
|
+
expect(thrown.status).toBeUndefined();
|
|
194
|
+
const body = getBody();
|
|
195
|
+
expect(body?.id).toBeTruthy();
|
|
196
|
+
expect(body?.buildPhase).toBe('queued');
|
|
197
|
+
|
|
198
|
+
// And the persisted record is genuinely in the queued phase.
|
|
199
|
+
const repo = server.db.getRepository(COLLECTION_NAME);
|
|
200
|
+
const persisted = (await repo.findOne({ filterByTk: body?.id })) as unknown as BuildRecordView;
|
|
201
|
+
expect(persisted).toBeTruthy();
|
|
202
|
+
expect(persisted.buildPhase).toBe('queued');
|
|
203
|
+
expect(persisted.status).toBe('building');
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
describe('rejects invalid input with 400', () => {
|
|
207
|
+
const base = {
|
|
208
|
+
requirement: 'Valid requirement',
|
|
209
|
+
collections: [TEST_COLLECTION],
|
|
210
|
+
llmService: 'openai',
|
|
211
|
+
model: 'gpt-4o-mini',
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
/** Invoke `build` with the given values and assert it throws with `status`. */
|
|
215
|
+
const expectRejected = async (values: Record<string, unknown>, status: number) => {
|
|
216
|
+
// A bare app stub is enough — validation throws before app/db are used.
|
|
217
|
+
const { ctx, thrown } = makeCtx({ values, currentRoles: ['root'], app: {} });
|
|
218
|
+
await expect(build(ctx, noopNext)).rejects.toBeDefined();
|
|
219
|
+
expect(thrown.status).toBe(status);
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
it('empty collections → 400', async () => {
|
|
223
|
+
await expectRejected({ ...base, collections: [] }, 400);
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
it('empty/whitespace requirement → 400', async () => {
|
|
227
|
+
await expectRejected({ ...base, requirement: ' ' }, 400);
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
it('missing llmService → 400', async () => {
|
|
231
|
+
const values = { ...base };
|
|
232
|
+
delete (values as Record<string, unknown>).llmService;
|
|
233
|
+
await expectRejected(values, 400);
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
it('missing model → 400', async () => {
|
|
237
|
+
const values = { ...base };
|
|
238
|
+
delete (values as Record<string, unknown>).model;
|
|
239
|
+
await expectRejected(values, 400);
|
|
240
|
+
});
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
it('denies a role without list permission with 403 (Req 13.2)', async () => {
|
|
244
|
+
// `assertCollectionPermissions` reads `ctx.app.acl.can(...)`. A non-root
|
|
245
|
+
// role whose `can` returns false must be denied before any record is made.
|
|
246
|
+
const aclStub = { acl: { can: () => false } };
|
|
247
|
+
const { ctx, thrown } = makeCtx({
|
|
248
|
+
values: {
|
|
249
|
+
requirement: 'Valid requirement',
|
|
250
|
+
collections: [TEST_COLLECTION],
|
|
251
|
+
llmService: 'openai',
|
|
252
|
+
model: 'gpt-4o-mini',
|
|
253
|
+
},
|
|
254
|
+
currentRoles: ['member'],
|
|
255
|
+
app: aclStub,
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
await expect(build(ctx, noopNext)).rejects.toBeDefined();
|
|
259
|
+
expect(thrown.status).toBe(403);
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
it('AI tool invoke creates a queued build record using saved defaults', async () => {
|
|
263
|
+
const server = requireApp();
|
|
264
|
+
if (!server) return;
|
|
265
|
+
|
|
266
|
+
const settingsRepo = server.db.getRepository('aiVisualizationBuildSettings');
|
|
267
|
+
const existingSettings = await settingsRepo.findOne();
|
|
268
|
+
if (existingSettings) {
|
|
269
|
+
await existingSettings.update({
|
|
270
|
+
defaultDataSource: 'main',
|
|
271
|
+
defaultCollections: [TEST_COLLECTION],
|
|
272
|
+
defaultLLMService: 'openai',
|
|
273
|
+
defaultModel: 'gpt-4o-mini',
|
|
274
|
+
enableAITool: true,
|
|
275
|
+
});
|
|
276
|
+
} else {
|
|
277
|
+
await settingsRepo.create({
|
|
278
|
+
values: {
|
|
279
|
+
defaultDataSource: 'main',
|
|
280
|
+
defaultCollections: [TEST_COLLECTION],
|
|
281
|
+
defaultLLMService: 'openai',
|
|
282
|
+
defaultModel: 'gpt-4o-mini',
|
|
283
|
+
enableAITool: true,
|
|
284
|
+
},
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
const eventQueue = server.eventQueue as unknown as {
|
|
289
|
+
publish: (...args: unknown[]) => Promise<void>;
|
|
290
|
+
};
|
|
291
|
+
const originalPublish = eventQueue.publish;
|
|
292
|
+
eventQueue.publish = async () => {};
|
|
293
|
+
try {
|
|
294
|
+
const result = await buildVisualizationBlockTool.tool.invoke(
|
|
295
|
+
{
|
|
296
|
+
app: server,
|
|
297
|
+
auth: { user: { id: 1 } },
|
|
298
|
+
} as never,
|
|
299
|
+
{ requirement: 'Create a table of posts' },
|
|
300
|
+
);
|
|
301
|
+
|
|
302
|
+
expect(result.status).toBe('success');
|
|
303
|
+
expect((result.content as { collection?: string }).collection).toBe(COLLECTION_NAME);
|
|
304
|
+
const buildId = String((result.content as { id: number | string }).id);
|
|
305
|
+
const persisted = (await server.db
|
|
306
|
+
.getRepository(COLLECTION_NAME)
|
|
307
|
+
.findOne({ filterByTk: buildId })) as unknown as BuildRecordView;
|
|
308
|
+
expect(persisted).toBeTruthy();
|
|
309
|
+
expect(persisted.status).toBe('building');
|
|
310
|
+
expect(persisted.buildPhase).toBe('queued');
|
|
311
|
+
} finally {
|
|
312
|
+
eventQueue.publish = originalPublish;
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
describe('worker pipeline with a stubbed AI provider (Req 5.5 / 5.6 / 12.1)', () => {
|
|
317
|
+
/**
|
|
318
|
+
* Create a queued record, stub `app.pm.get('ai')` with the given chat-model
|
|
319
|
+
* invocation, drive the single record through the worker pipeline, and
|
|
320
|
+
* return the final persisted record. Returns `null` (skip) when driving the
|
|
321
|
+
* worker is not feasible in this environment.
|
|
322
|
+
*/
|
|
323
|
+
const driveBuild = async (server: MockServer, invoke: ChatModelStub['invoke']): Promise<BuildRecordView | null> => {
|
|
324
|
+
const repo = server.db.getRepository(COLLECTION_NAME);
|
|
325
|
+
const runId = randomUUID();
|
|
326
|
+
const created = await repo.create({
|
|
327
|
+
values: {
|
|
328
|
+
requirement: 'Pipeline run',
|
|
329
|
+
collections: [TEST_COLLECTION],
|
|
330
|
+
primaryCollection: TEST_COLLECTION,
|
|
331
|
+
dataSource: 'main',
|
|
332
|
+
llmService: 'openai',
|
|
333
|
+
model: 'gpt-4o-mini',
|
|
334
|
+
status: 'building',
|
|
335
|
+
buildPhase: 'queued',
|
|
336
|
+
buildRunId: runId,
|
|
337
|
+
buildQueuedAt: new Date(),
|
|
338
|
+
},
|
|
339
|
+
});
|
|
340
|
+
const buildId = String((created as unknown as { id: number | string }).id);
|
|
341
|
+
|
|
342
|
+
const aiStub: AiPluginStub = {
|
|
343
|
+
aiManager: {
|
|
344
|
+
getLLMService: async () => ({ provider: { chatModel: { invoke } } }),
|
|
345
|
+
},
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
const pm = server.pm as unknown as { get: (name: unknown) => unknown };
|
|
349
|
+
const originalGet = pm.get;
|
|
350
|
+
const previousRole = process.env.APP_ROLE;
|
|
351
|
+
pm.get = (name: unknown) => (name === 'ai' ? aiStub : originalGet.call(server.pm, name));
|
|
352
|
+
process.env.APP_ROLE = 'worker';
|
|
353
|
+
|
|
354
|
+
try {
|
|
355
|
+
await processQueuedBuild(server, {
|
|
356
|
+
buildId,
|
|
357
|
+
runId,
|
|
358
|
+
userId: null,
|
|
359
|
+
queuedAt: new Date().toISOString(),
|
|
360
|
+
});
|
|
361
|
+
} catch (error) {
|
|
362
|
+
// The worker drive itself is not feasible here (e.g. lock manager or
|
|
363
|
+
// model surface unavailable) — skip rather than fail.
|
|
364
|
+
// eslint-disable-next-line no-console
|
|
365
|
+
console.warn(
|
|
366
|
+
`[plugin-build-visualization-block] Skipping pipeline assertion — worker drive not feasible: ${String(
|
|
367
|
+
error,
|
|
368
|
+
)}`,
|
|
369
|
+
);
|
|
370
|
+
return null;
|
|
371
|
+
} finally {
|
|
372
|
+
pm.get = originalGet;
|
|
373
|
+
if (previousRole === undefined) {
|
|
374
|
+
delete process.env.APP_ROLE;
|
|
375
|
+
} else {
|
|
376
|
+
process.env.APP_ROLE = previousRole;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
return (await repo.findOne({ filterByTk: buildId })) as unknown as BuildRecordView;
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
it('valid BlockSpec referencing a real field → completed without fallback (Req 12.1)', async () => {
|
|
384
|
+
const server = requireApp();
|
|
385
|
+
if (!server) return;
|
|
386
|
+
|
|
387
|
+
const validSpec = {
|
|
388
|
+
version: 1,
|
|
389
|
+
blockType: 'table',
|
|
390
|
+
title: 'Posts',
|
|
391
|
+
primaryCollection: TEST_COLLECTION,
|
|
392
|
+
dataSource: 'main',
|
|
393
|
+
table: { fields: ['title'] },
|
|
394
|
+
};
|
|
395
|
+
const record = await driveBuild(server, async () => ({ content: JSON.stringify(validSpec) }));
|
|
396
|
+
if (!record) return;
|
|
397
|
+
|
|
398
|
+
expect(record.status).toBe('completed');
|
|
399
|
+
expect(record.buildPhase).toBe('completed');
|
|
400
|
+
expect(record.usedFallback).toBe(false);
|
|
401
|
+
expect(record.blockSchema).toBeTruthy();
|
|
402
|
+
});
|
|
403
|
+
|
|
404
|
+
it('garbage provider output → completed via analyzer fallback (Req 5.5)', async () => {
|
|
405
|
+
const server = requireApp();
|
|
406
|
+
if (!server) return;
|
|
407
|
+
|
|
408
|
+
const record = await driveBuild(server, async () => ({
|
|
409
|
+
content: 'I am not JSON at all, just prose from a confused model.',
|
|
410
|
+
}));
|
|
411
|
+
if (!record) return;
|
|
412
|
+
|
|
413
|
+
expect(record.status).toBe('completed');
|
|
414
|
+
expect(record.buildPhase).toBe('completed');
|
|
415
|
+
expect(record.usedFallback).toBe(true);
|
|
416
|
+
expect(record.blockSchema).toBeTruthy();
|
|
417
|
+
});
|
|
418
|
+
|
|
419
|
+
it('provider invocation throws → completed via fallback (Req 5.6)', async () => {
|
|
420
|
+
const server = requireApp();
|
|
421
|
+
if (!server) return;
|
|
422
|
+
|
|
423
|
+
const record = await driveBuild(server, async () => {
|
|
424
|
+
throw new Error('LLM transport failure');
|
|
425
|
+
});
|
|
426
|
+
if (!record) return;
|
|
427
|
+
|
|
428
|
+
// Graceful degradation: a transport failure never leaves the build broken
|
|
429
|
+
// — it completes using the grounded fallback spec. The analyzer records
|
|
430
|
+
// the underlying error mid-run; the build log preserves the fallback
|
|
431
|
+
// evidence after the run completes (the completion write clears the
|
|
432
|
+
// transient errorMessage).
|
|
433
|
+
expect(record.status).toBe('completed');
|
|
434
|
+
expect(record.buildPhase).toBe('completed');
|
|
435
|
+
expect(record.usedFallback).toBe(true);
|
|
436
|
+
expect(record.blockSchema).toBeTruthy();
|
|
437
|
+
expect(String(record.buildLog ?? '')).toMatch(/fallback/i);
|
|
438
|
+
});
|
|
439
|
+
});
|
|
440
|
+
});
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { createMockServer, MockServer } from '@nocobase/test';
|
|
2
|
+
import { COLLECTION_NAME, SETTINGS_COLLECTION_NAME } from '../../shared/constants';
|
|
3
|
+
import PluginBuildVisualizationBlockServer from '../plugin';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Server tests for the `plugin-build-visualization-block` schema bootstrap.
|
|
7
|
+
*
|
|
8
|
+
* These cover task 2.3 (Requirement 11.2): the `aiVisualizationBuilds`
|
|
9
|
+
* collection is registered with its key fields, records can be created and read
|
|
10
|
+
* back, and the `ensureSchema`-equivalent bootstrap is idempotent across
|
|
11
|
+
* repeated `upgrade()` invocations.
|
|
12
|
+
*
|
|
13
|
+
* NOTE: server tests must NOT run in parallel (they share a database) — run
|
|
14
|
+
* this file on its own with `yarn test <path> --run`.
|
|
15
|
+
*/
|
|
16
|
+
describe('plugin-build-visualization-block schema bootstrap', () => {
|
|
17
|
+
let app: MockServer | undefined;
|
|
18
|
+
let bootError: unknown;
|
|
19
|
+
|
|
20
|
+
beforeAll(async () => {
|
|
21
|
+
try {
|
|
22
|
+
app = await createMockServer({
|
|
23
|
+
plugins: ['nocobase', PluginBuildVisualizationBlockServer],
|
|
24
|
+
});
|
|
25
|
+
} catch (error) {
|
|
26
|
+
// The mock-server harness needs a reachable test database. If it cannot
|
|
27
|
+
// boot in this environment, record the reason and let each test skip with
|
|
28
|
+
// a clear message rather than reporting a false failure.
|
|
29
|
+
bootError = error;
|
|
30
|
+
// eslint-disable-next-line no-console
|
|
31
|
+
console.warn(
|
|
32
|
+
`[plugin-build-visualization-block] Skipping bootstrap tests; mock server could not start: ${String(error)}`,
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
afterAll(async () => {
|
|
38
|
+
await app?.destroy();
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
/** Returns the booted app or skips the calling test with a clear reason. */
|
|
42
|
+
const requireApp = (): MockServer | undefined => {
|
|
43
|
+
if (!app) {
|
|
44
|
+
// eslint-disable-next-line no-console
|
|
45
|
+
console.warn(`[plugin-build-visualization-block] Test skipped — mock server unavailable: ${String(bootError)}`);
|
|
46
|
+
}
|
|
47
|
+
return app;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
it('registers the aiVisualizationBuilds collection', () => {
|
|
51
|
+
const server = requireApp();
|
|
52
|
+
if (!server) return;
|
|
53
|
+
|
|
54
|
+
const collection = server.db.getCollection(COLLECTION_NAME);
|
|
55
|
+
expect(collection).toBeTruthy();
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it('registers the singleton settings collection', () => {
|
|
59
|
+
const server = requireApp();
|
|
60
|
+
if (!server) return;
|
|
61
|
+
|
|
62
|
+
const collection = server.db.getCollection(SETTINGS_COLLECTION_NAME);
|
|
63
|
+
expect(collection).toBeTruthy();
|
|
64
|
+
|
|
65
|
+
const expectedFields: Record<string, string> = {
|
|
66
|
+
defaultDataSource: 'string',
|
|
67
|
+
defaultCollections: 'json',
|
|
68
|
+
defaultLLMService: 'string',
|
|
69
|
+
defaultModel: 'string',
|
|
70
|
+
enableAITool: 'boolean',
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
for (const [name, type] of Object.entries(expectedFields)) {
|
|
74
|
+
const field = collection.getField(name);
|
|
75
|
+
expect(field).toBeTruthy();
|
|
76
|
+
expect(field.type).toBe(type);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
it('defines the key Build_Record fields', () => {
|
|
81
|
+
const server = requireApp();
|
|
82
|
+
if (!server) return;
|
|
83
|
+
|
|
84
|
+
const collection = server.db.getCollection(COLLECTION_NAME);
|
|
85
|
+
expect(collection).toBeTruthy();
|
|
86
|
+
|
|
87
|
+
// name -> expected field type, covering the fields called out by the task.
|
|
88
|
+
const expectedFields: Record<string, string> = {
|
|
89
|
+
requirement: 'text',
|
|
90
|
+
dataSource: 'string',
|
|
91
|
+
collections: 'json',
|
|
92
|
+
buildPhase: 'string',
|
|
93
|
+
buildRunId: 'uuid',
|
|
94
|
+
blockSpec: 'json',
|
|
95
|
+
blockSchema: 'json',
|
|
96
|
+
usedFallback: 'boolean',
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
for (const [name, type] of Object.entries(expectedFields)) {
|
|
100
|
+
const field = collection.getField(name);
|
|
101
|
+
expect(field).toBeTruthy();
|
|
102
|
+
expect(field.type).toBe(type);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
it('can create and read back a build record', async () => {
|
|
107
|
+
const server = requireApp();
|
|
108
|
+
if (!server) return;
|
|
109
|
+
|
|
110
|
+
const repo = server.db.getRepository(COLLECTION_NAME);
|
|
111
|
+
expect(repo).toBeTruthy();
|
|
112
|
+
|
|
113
|
+
const created = await repo.create({
|
|
114
|
+
values: {
|
|
115
|
+
title: 'Manage X and Y',
|
|
116
|
+
requirement: 'Build a block to manage and visualize data from collection X and Y.',
|
|
117
|
+
dataSource: 'main',
|
|
118
|
+
collections: ['x', 'y'],
|
|
119
|
+
primaryCollection: 'x',
|
|
120
|
+
llmService: 'openai',
|
|
121
|
+
model: 'gpt-4o-mini',
|
|
122
|
+
buildPhase: 'queued',
|
|
123
|
+
blockSpec: { version: 1, blockType: 'table', primaryCollection: 'x' },
|
|
124
|
+
usedFallback: false,
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
expect(created.id).toBeTruthy();
|
|
129
|
+
|
|
130
|
+
const found = await repo.findOne({ filterByTk: created.id });
|
|
131
|
+
expect(found).toBeTruthy();
|
|
132
|
+
expect(found.requirement).toBe('Build a block to manage and visualize data from collection X and Y.');
|
|
133
|
+
expect(found.dataSource).toBe('main');
|
|
134
|
+
expect(found.collections).toEqual(['x', 'y']);
|
|
135
|
+
expect(found.buildPhase).toBe('queued');
|
|
136
|
+
expect(found.blockSpec).toMatchObject({ blockType: 'table', primaryCollection: 'x' });
|
|
137
|
+
expect(found.usedFallback).toBe(false);
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
it('applies sensible defaults for status / buildPhase / usedFallback', async () => {
|
|
141
|
+
const server = requireApp();
|
|
142
|
+
if (!server) return;
|
|
143
|
+
|
|
144
|
+
const repo = server.db.getRepository(COLLECTION_NAME);
|
|
145
|
+
const created = await repo.create({
|
|
146
|
+
values: {
|
|
147
|
+
requirement: 'Defaults check',
|
|
148
|
+
},
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
const found = await repo.findOne({ filterByTk: created.id });
|
|
152
|
+
expect(found.status).toBe('idle');
|
|
153
|
+
expect(found.buildPhase).toBe('idle');
|
|
154
|
+
expect(found.usedFallback).toBe(false);
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
it('runs the schema bootstrap idempotently across repeated upgrades', async () => {
|
|
158
|
+
const server = requireApp();
|
|
159
|
+
if (!server) return;
|
|
160
|
+
|
|
161
|
+
const plugin = server.pm.get(PluginBuildVisualizationBlockServer);
|
|
162
|
+
expect(plugin).toBeTruthy();
|
|
163
|
+
|
|
164
|
+
// `upgrade()` runs the ensureSchema-equivalent bootstrap. Invoking it twice
|
|
165
|
+
// must not throw and must leave the collection fully functional.
|
|
166
|
+
await expect(plugin.upgrade()).resolves.not.toThrow();
|
|
167
|
+
await expect(plugin.upgrade()).resolves.not.toThrow();
|
|
168
|
+
|
|
169
|
+
// The collection is still registered and writable after re-running bootstrap.
|
|
170
|
+
const collection = server.db.getCollection(COLLECTION_NAME);
|
|
171
|
+
expect(collection).toBeTruthy();
|
|
172
|
+
|
|
173
|
+
const repo = server.db.getRepository(COLLECTION_NAME);
|
|
174
|
+
const created = await repo.create({
|
|
175
|
+
values: {
|
|
176
|
+
requirement: 'Post-upgrade write',
|
|
177
|
+
dataSource: 'main',
|
|
178
|
+
collections: ['x'],
|
|
179
|
+
buildPhase: 'queued',
|
|
180
|
+
},
|
|
181
|
+
});
|
|
182
|
+
const found = await repo.findOne({ filterByTk: created.id });
|
|
183
|
+
expect(found).toBeTruthy();
|
|
184
|
+
expect(found.requirement).toBe('Post-upgrade write');
|
|
185
|
+
expect(found.buildPhase).toBe('queued');
|
|
186
|
+
});
|
|
187
|
+
});
|