@nocobase/plugin-flow-engine 2.0.0-beta.9 → 2.1.0-beta.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/dist/ai/docs/meta.json +6 -0
- package/dist/ai/docs/runjs/context/block-model.md +90 -0
- package/dist/ai/docs/runjs/context/collection-field.md +130 -0
- package/dist/ai/docs/runjs/context/collection.md +100 -0
- package/dist/ai/docs/runjs/context/data-source-manager.md +110 -0
- package/dist/ai/docs/runjs/context/data-source.md +128 -0
- package/dist/ai/docs/runjs/context/element.md +98 -0
- package/dist/ai/docs/runjs/context/exit-all.md +94 -0
- package/dist/ai/docs/runjs/context/exit.md +101 -0
- package/dist/ai/docs/runjs/context/filter-manager.md +96 -0
- package/dist/ai/docs/runjs/context/form.md +169 -0
- package/dist/ai/docs/runjs/context/get-model.md +84 -0
- package/dist/ai/docs/runjs/context/get-value.md +64 -0
- package/dist/ai/docs/runjs/context/get-var.md +151 -0
- package/dist/ai/docs/runjs/context/i18n.md +77 -0
- package/dist/ai/docs/runjs/context/import-async.md +200 -0
- package/dist/ai/docs/runjs/context/init-resource.md +74 -0
- package/dist/ai/docs/runjs/context/libs.md +109 -0
- package/dist/ai/docs/runjs/context/location.md +85 -0
- package/dist/ai/docs/runjs/context/logger.md +84 -0
- package/dist/ai/docs/runjs/context/make-resource.md +89 -0
- package/dist/ai/docs/runjs/context/message.md +106 -0
- package/dist/ai/docs/runjs/context/modal.md +115 -0
- package/dist/ai/docs/runjs/context/model.md +82 -0
- package/dist/ai/docs/runjs/context/notification.md +105 -0
- package/dist/ai/docs/runjs/context/off.md +48 -0
- package/dist/ai/docs/runjs/context/on.md +79 -0
- package/dist/ai/docs/runjs/context/open-view.md +120 -0
- package/dist/ai/docs/runjs/context/render.md +109 -0
- package/dist/ai/docs/runjs/context/request.md +162 -0
- package/dist/ai/docs/runjs/context/require-async.md +107 -0
- package/dist/ai/docs/runjs/context/resource.md +92 -0
- package/dist/ai/docs/runjs/context/route.md +74 -0
- package/dist/ai/docs/runjs/context/router.md +99 -0
- package/dist/ai/docs/runjs/context/set-value.md +72 -0
- package/dist/ai/docs/runjs/context/sql.md +208 -0
- package/dist/ai/docs/runjs/context/t.md +79 -0
- package/dist/ai/docs/runjs/context/view.md +128 -0
- package/dist/ai/docs/runjs/document.md +0 -0
- package/dist/ai/docs/runjs/import-modules.md +110 -0
- package/dist/ai/docs/runjs/index.md +65 -0
- package/dist/ai/docs/runjs/jsx.md +84 -0
- package/dist/ai/docs/runjs/model/form-block-model.md +3 -0
- package/dist/ai/docs/runjs/render.md +64 -0
- package/dist/ai/docs/runjs/resource/api-resource.md +155 -0
- package/dist/ai/docs/runjs/resource/multi-record-resource.md +188 -0
- package/dist/ai/docs/runjs/resource/single-record-resource.md +169 -0
- package/dist/ai/docs/runjs/resource/sql-resource.md +170 -0
- package/dist/ai/docs/runjs/window.md +20 -0
- package/dist/ai/tools/getContextApis.d.ts +10 -0
- package/dist/ai/tools/getContextApis.js +62 -0
- package/dist/ai/tools/getContextEnvs.d.ts +10 -0
- package/dist/ai/tools/getContextEnvs.js +62 -0
- package/dist/ai/tools/getContextVars.d.ts +10 -0
- package/dist/ai/tools/getContextVars.js +78 -0
- package/dist/ai/tools/lintAndTestJS.d.ts +10 -0
- package/dist/ai/tools/lintAndTestJS.js +64 -0
- package/dist/externalVersion.js +10 -9
- package/dist/locale/en-US.json +9 -2
- package/dist/locale/index.d.ts +14 -0
- package/dist/locale/zh-CN.json +8 -1
- package/dist/node_modules/ses/package.json +1 -1
- 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/repository.d.ts +9 -1
- package/dist/server/repository.js +138 -0
- package/dist/server/server.js +12 -0
- package/dist/server/template/contexts.d.ts +0 -1
- package/dist/server/template/contexts.js +0 -39
- package/dist/server/template/resolver.js +10 -6
- package/dist/server/variables/records.d.ts +38 -0
- package/dist/server/variables/records.js +120 -0
- package/dist/server/variables/registry.js +130 -51
- package/dist/server/variables/utils.js +56 -16
- package/package.json +2 -2
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# ctx.route
|
|
2
|
+
|
|
3
|
+
Current route match info, corresponding to React Router’s route; used to get the matched route config, params, etc. Use with `ctx.router` and `ctx.location`.
|
|
4
|
+
|
|
5
|
+
## Use Cases
|
|
6
|
+
|
|
7
|
+
| Scenario | Description |
|
|
8
|
+
|----------|-------------|
|
|
9
|
+
| **JSBlock / JSField** | Conditional render or display based on `route.pathname` or `route.params` |
|
|
10
|
+
| **Linkage / event flow** | Read route params (e.g. `params.name`) for logic or pass to children |
|
|
11
|
+
| **View navigation** | Compare `ctx.route.pathname` with target path to decide `ctx.router.navigate` |
|
|
12
|
+
|
|
13
|
+
> Note: `ctx.route` is only available in RunJS when a router context exists (e.g. JSBlock on a page, Flow page); in pure backend or non-routed contexts (e.g. workflow) it may be empty.
|
|
14
|
+
|
|
15
|
+
## Type
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
type RouteOptions = {
|
|
19
|
+
name?: string;
|
|
20
|
+
path?: string;
|
|
21
|
+
params?: Record<string, any>;
|
|
22
|
+
pathname?: string;
|
|
23
|
+
};
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Common fields
|
|
27
|
+
|
|
28
|
+
| Field | Type | Description |
|
|
29
|
+
|-------|------|-------------|
|
|
30
|
+
| `pathname` | `string` | Full path of current route; same as `ctx.location.pathname` |
|
|
31
|
+
| `params` | `Record<string, any>` | Dynamic params from route template, e.g. `{ name: 'users' }` |
|
|
32
|
+
| `path` | `string` | Route template, e.g. `/admin/:name` |
|
|
33
|
+
| `name` | `string` | Route unique id; often used for tabs/views |
|
|
34
|
+
|
|
35
|
+
## Relation to ctx.router, ctx.location
|
|
36
|
+
|
|
37
|
+
| Use | Recommended |
|
|
38
|
+
|-----|-------------|
|
|
39
|
+
| **Current path** | `ctx.route.pathname` or `ctx.location.pathname`; they match when route is matched |
|
|
40
|
+
| **Route params** | `ctx.route.params`, e.g. `params.name` for current page UID |
|
|
41
|
+
| **Navigate** | `ctx.router.navigate(path)` |
|
|
42
|
+
| **Query params, state** | `ctx.location.search`, `ctx.location.state` |
|
|
43
|
+
|
|
44
|
+
`ctx.route` is “matched route config”; `ctx.location` is “current URL”; together they describe the current route state.
|
|
45
|
+
|
|
46
|
+
## Examples
|
|
47
|
+
|
|
48
|
+
### Read pathname
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
ctx.message.info('Current page: ' + ctx.route.pathname);
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Branch by params
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
if (ctx.route.params?.name === 'users') {
|
|
58
|
+
// On user management page
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### In Flow page
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
<div>
|
|
66
|
+
<h1>Current page - {ctx.route.pathname}</h1>
|
|
67
|
+
<p>Route id: {ctx.route.params?.name}</p>
|
|
68
|
+
</div>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Related
|
|
72
|
+
|
|
73
|
+
- [ctx.router](./router.md): navigation; after `ctx.router.navigate()`, `ctx.route` updates
|
|
74
|
+
- [ctx.location](./location.md): current URL (pathname, search, hash, state); use with `ctx.route`
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# ctx.router
|
|
2
|
+
|
|
3
|
+
Router instance based on React Router; used for programmatic navigation in RunJS. Use with `ctx.route` and `ctx.location`.
|
|
4
|
+
|
|
5
|
+
## Use Cases
|
|
6
|
+
|
|
7
|
+
| Scenario | Description |
|
|
8
|
+
|----------|-------------|
|
|
9
|
+
| **JSBlock / JSField** | Button navigates to detail, list, or external link |
|
|
10
|
+
| **Linkage / event flow** | After submit success, `navigate` to list or detail, or pass state to target |
|
|
11
|
+
| **JSAction / event handler** | Navigate on form submit, link click, etc. |
|
|
12
|
+
| **View navigation** | Update URL when switching views |
|
|
13
|
+
|
|
14
|
+
> Note: `ctx.router` is only available in RunJS when a router context exists (e.g. JSBlock on a page, Flow page, event flow); in pure backend or non-routed contexts (e.g. workflow) it may be empty.
|
|
15
|
+
|
|
16
|
+
## Type
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
router: Router
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`Router` is from `@remix-run/router`; use `ctx.router.navigate()` for navigation, back, refresh.
|
|
23
|
+
|
|
24
|
+
## Methods
|
|
25
|
+
|
|
26
|
+
### ctx.router.navigate()
|
|
27
|
+
|
|
28
|
+
Navigate to a path, or go back/refresh.
|
|
29
|
+
|
|
30
|
+
**Signature:**
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
navigate(to: string | number | null, options?: RouterNavigateOptions): Promise<void>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Parameters:**
|
|
37
|
+
|
|
38
|
+
- `to`: Target path (string), relative history position (number, e.g. `-1` for back), or `null` (refresh current page)
|
|
39
|
+
- `options`:
|
|
40
|
+
- `replace?: boolean`: Replace current history entry (default `false`, i.e. push)
|
|
41
|
+
- `state?: any`: State passed to the target route. Not in URL; target page reads it via `ctx.location.state`. Use for sensitive or temporary data.
|
|
42
|
+
|
|
43
|
+
## Examples
|
|
44
|
+
|
|
45
|
+
### Basic navigation
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
ctx.router.navigate('/admin/users');
|
|
49
|
+
|
|
50
|
+
ctx.router.navigate(`/admin/users/${recordId}`);
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Replace (no new history entry)
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
ctx.router.navigate('/admin', { replace: true });
|
|
57
|
+
|
|
58
|
+
ctx.router.navigate(`/admin/users/${newId}`, { replace: true });
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Pass state
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
ctx.router.navigate('/admin/users/123', {
|
|
65
|
+
state: { from: 'dashboard', tab: 'profile' }
|
|
66
|
+
});
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Back and refresh
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
ctx.router.navigate(-1);
|
|
73
|
+
|
|
74
|
+
ctx.router.navigate(-2);
|
|
75
|
+
|
|
76
|
+
ctx.router.navigate(null);
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Relation to ctx.route, ctx.location
|
|
80
|
+
|
|
81
|
+
| Use | Recommended |
|
|
82
|
+
|-----|-------------|
|
|
83
|
+
| **Navigate** | `ctx.router.navigate(path)` |
|
|
84
|
+
| **Current path** | `ctx.route.pathname` or `ctx.location.pathname` |
|
|
85
|
+
| **State from navigation** | `ctx.location.state` |
|
|
86
|
+
| **Route params** | `ctx.route.params` |
|
|
87
|
+
|
|
88
|
+
`ctx.router` does “navigation”; `ctx.route` and `ctx.location` describe “current route state”.
|
|
89
|
+
|
|
90
|
+
## Notes
|
|
91
|
+
|
|
92
|
+
- `navigate(path)` by default pushes a new history entry; user can use browser back.
|
|
93
|
+
- `replace: true` replaces the current entry; use after login redirect, submit-success redirect, etc.
|
|
94
|
+
- **`state`**: Data in `state` is not in the URL; target page reads it via `ctx.location.state`. State is stored in history (back/forward keep it); it is lost on page refresh.
|
|
95
|
+
|
|
96
|
+
## Related
|
|
97
|
+
|
|
98
|
+
- [ctx.route](./route.md): current route match (pathname, params)
|
|
99
|
+
- [ctx.location](./location.md): current URL; read `state` here after navigation
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# ctx.setValue()
|
|
2
|
+
|
|
3
|
+
In JSField, JSItem, and other editable field contexts, sets the current field’s value. Use with `ctx.getValue()` for two-way binding with the form.
|
|
4
|
+
|
|
5
|
+
## Use Cases
|
|
6
|
+
|
|
7
|
+
| Scenario | Description |
|
|
8
|
+
|----------|-------------|
|
|
9
|
+
| **JSField** | Write user selection or computed value in editable custom fields |
|
|
10
|
+
| **JSItem** | Update current cell value in table/sub-table editable items |
|
|
11
|
+
| **JSColumn** | Update row field value when rendering a column |
|
|
12
|
+
|
|
13
|
+
> Note: `ctx.setValue(v)` is only available in RunJS contexts with form binding; in event flow, linkage, JSBlock, etc. (no field binding) the method may not exist—use optional chaining: `ctx.setValue?.(value)`.
|
|
14
|
+
|
|
15
|
+
## Type
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
setValue<T = any>(value: T): void;
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
- **Parameter**: `value` is the value to write; type depends on the field’s form item type.
|
|
22
|
+
|
|
23
|
+
## Behavior
|
|
24
|
+
|
|
25
|
+
- `ctx.setValue(v)` updates the current field’s value in the Ant Design Form and triggers linkage and validation.
|
|
26
|
+
- If the form is not yet rendered or the field is not registered, the call may have no effect; use `ctx.getValue()` to confirm.
|
|
27
|
+
|
|
28
|
+
## Examples
|
|
29
|
+
|
|
30
|
+
### Two-way binding with getValue
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
const { Input } = ctx.libs.antd;
|
|
34
|
+
|
|
35
|
+
const defaultValue = ctx.getValue() ?? '';
|
|
36
|
+
|
|
37
|
+
ctx.render(
|
|
38
|
+
<Input
|
|
39
|
+
defaultValue={defaultValue}
|
|
40
|
+
onChange={(e) => ctx.setValue(e.target.value)}
|
|
41
|
+
/>
|
|
42
|
+
);
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Set default by condition
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
const status = ctx.getValue();
|
|
49
|
+
if (status == null || status === '') {
|
|
50
|
+
ctx.setValue?.('draft');
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Write current field when linking others
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
const otherValue = ctx.form?.getFieldValue('type');
|
|
58
|
+
if (otherValue === 'custom') {
|
|
59
|
+
ctx.setValue?.({ label: 'Custom', value: 'custom' });
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Notes
|
|
64
|
+
|
|
65
|
+
- In non-editable contexts (e.g. JSField detail mode, JSBlock), `ctx.setValue` may be `undefined`; use `ctx.setValue?.(value)`.
|
|
66
|
+
- For association fields (m2o, o2m, etc.), pass a value that matches the field type (e.g. `{ id, [titleField]: label }`); see field config.
|
|
67
|
+
|
|
68
|
+
## Related
|
|
69
|
+
|
|
70
|
+
- [ctx.getValue()](./get-value.md): get current field value; use with setValue for two-way binding
|
|
71
|
+
- [ctx.form](./form.md): Ant Design Form; read/write other fields
|
|
72
|
+
- `js-field:value-change`: container event when value changes from outside; use to update display
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# ctx.sql
|
|
2
|
+
|
|
3
|
+
`ctx.sql` provides SQL execution and management, often used in RunJS (e.g. JSBlock, event flow) to access the database directly. It supports ad-hoc SQL, running saved SQL templates by ID, parameter binding, template variables (`{{ctx.xxx}}`), and result type control.
|
|
4
|
+
|
|
5
|
+
## Use Cases
|
|
6
|
+
|
|
7
|
+
| Scenario | Description |
|
|
8
|
+
|----------|-------------|
|
|
9
|
+
| **JSBlock** | Custom reports, complex filtered lists, cross-table aggregation |
|
|
10
|
+
| **Chart block** | Saved SQL templates as chart data source |
|
|
11
|
+
| **Event flow / linkage** | Run predefined SQL and use results in logic |
|
|
12
|
+
| **SQLResource** | With `ctx.initResource('SQLResource')` for paginated lists, etc. |
|
|
13
|
+
|
|
14
|
+
> Note: `ctx.sql` uses the `flowSql` API to access the database; ensure the current user has execute permission on the target data source.
|
|
15
|
+
|
|
16
|
+
## Permissions
|
|
17
|
+
|
|
18
|
+
| Permission | Method | Description |
|
|
19
|
+
|------------|--------|-------------|
|
|
20
|
+
| **Logged-in user** | `runById` | Run by configured SQL template ID |
|
|
21
|
+
| **SQL config permission** | `run`, `save`, `destroy` | Ad-hoc SQL, save/update/delete SQL templates |
|
|
22
|
+
|
|
23
|
+
Front-end logic for normal users can use `ctx.sql.runById(uid, options)`; for dynamic SQL or template management, the current role must have SQL config permission.
|
|
24
|
+
|
|
25
|
+
## Type
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
sql: FlowSQLRepository;
|
|
29
|
+
|
|
30
|
+
interface FlowSQLRepository {
|
|
31
|
+
run<T = any>(
|
|
32
|
+
sql: string,
|
|
33
|
+
options?: {
|
|
34
|
+
bind?: Record<string, any> | any[];
|
|
35
|
+
type?: 'selectRows' | 'selectRow' | 'selectVar';
|
|
36
|
+
dataSourceKey?: string;
|
|
37
|
+
filter?: Record<string, any>;
|
|
38
|
+
},
|
|
39
|
+
): Promise<T>;
|
|
40
|
+
|
|
41
|
+
save(options: { uid: string; sql: string; dataSourceKey?: string }): Promise<void>;
|
|
42
|
+
|
|
43
|
+
runById<T = any>(
|
|
44
|
+
uid: string,
|
|
45
|
+
options?: {
|
|
46
|
+
bind?: Record<string, any> | any[];
|
|
47
|
+
type?: 'selectRows' | 'selectRow' | 'selectVar';
|
|
48
|
+
dataSourceKey?: string;
|
|
49
|
+
filter?: Record<string, any>;
|
|
50
|
+
},
|
|
51
|
+
): Promise<T>;
|
|
52
|
+
|
|
53
|
+
destroy(uid: string): Promise<void>;
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Common Methods
|
|
58
|
+
|
|
59
|
+
| Method | Description | Permission |
|
|
60
|
+
|--------|-------------|------------|
|
|
61
|
+
| `ctx.sql.run(sql, options?)` | Run ad-hoc SQL; supports parameter binding and template variables | SQL config |
|
|
62
|
+
| `ctx.sql.save({ uid, sql, dataSourceKey? })` | Save/update SQL template by ID for reuse | SQL config |
|
|
63
|
+
| `ctx.sql.runById(uid, options?)` | Run saved SQL template by ID | Any logged-in user |
|
|
64
|
+
| `ctx.sql.destroy(uid)` | Delete SQL template by ID | SQL config |
|
|
65
|
+
|
|
66
|
+
- `run`: for debugging SQL; requires config permission.
|
|
67
|
+
- `save`, `destroy`: for managing SQL templates; require config permission.
|
|
68
|
+
- `runById`: available to normal users; only runs saved templates.
|
|
69
|
+
- Call `save` when a SQL template changes.
|
|
70
|
+
|
|
71
|
+
## Options
|
|
72
|
+
|
|
73
|
+
### run / runById options
|
|
74
|
+
|
|
75
|
+
| Option | Type | Description |
|
|
76
|
+
|--------|------|-------------|
|
|
77
|
+
| `bind` | `Record<string, any>` \| `any[]` | Bound variables. Object with `:name`, array with `?` |
|
|
78
|
+
| `type` | `'selectRows'` \| `'selectRow'` \| `'selectVar'` | Result type: multiple rows, single row, single value; default `selectRows` |
|
|
79
|
+
| `dataSourceKey` | `string` | Data source key; default is main data source |
|
|
80
|
+
| `filter` | `Record<string, any>` | Extra filter (if supported) |
|
|
81
|
+
|
|
82
|
+
### save options
|
|
83
|
+
|
|
84
|
+
| Option | Type | Description |
|
|
85
|
+
|--------|------|-------------|
|
|
86
|
+
| `uid` | `string` | Template unique id; use with `runById(uid, ...)` |
|
|
87
|
+
| `sql` | `string` | SQL text; supports `{{ctx.xxx}}` and `:name` / `?` placeholders |
|
|
88
|
+
| `dataSourceKey` | `string` | Optional data source key |
|
|
89
|
+
|
|
90
|
+
## Template Variables and Parameter Binding
|
|
91
|
+
|
|
92
|
+
### Template variables `{{ctx.xxx}}`
|
|
93
|
+
|
|
94
|
+
In SQL you can use `{{ctx.xxx}}` to reference context variables; they are resolved before execution:
|
|
95
|
+
|
|
96
|
+
```js
|
|
97
|
+
// Reference ctx.user.id
|
|
98
|
+
const user = await ctx.sql.run(
|
|
99
|
+
'SELECT * FROM users WHERE id = {{ctx.user.id}}',
|
|
100
|
+
{ type: 'selectRow' }
|
|
101
|
+
);
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Variable sources are the same as for `ctx.getVar()` (e.g. `ctx.user.*`, `ctx.record.*`, custom `ctx.defineProperty`, etc.).
|
|
105
|
+
|
|
106
|
+
### Parameter binding
|
|
107
|
+
|
|
108
|
+
- **Named**: use `:name` in SQL and pass `bind: { name: value }`
|
|
109
|
+
- **Positional**: use `?` in SQL and pass `bind: [value1, value2]`
|
|
110
|
+
|
|
111
|
+
```js
|
|
112
|
+
// Named
|
|
113
|
+
const users = await ctx.sql.run(
|
|
114
|
+
'SELECT * FROM users WHERE status = :status AND age > :minAge',
|
|
115
|
+
{ bind: { status: 'active', minAge: 18 }, type: 'selectRows' }
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
// Positional
|
|
119
|
+
const count = await ctx.sql.run(
|
|
120
|
+
'SELECT COUNT(*) AS total FROM users WHERE city = ? AND status = ?',
|
|
121
|
+
{ bind: ['Beijing', 'active'], type: 'selectVar' }
|
|
122
|
+
);
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Examples
|
|
126
|
+
|
|
127
|
+
### Ad-hoc SQL (requires SQL config permission)
|
|
128
|
+
|
|
129
|
+
```js
|
|
130
|
+
// Multiple rows (default)
|
|
131
|
+
const rows = await ctx.sql.run('SELECT * FROM users LIMIT 10');
|
|
132
|
+
|
|
133
|
+
// Single row
|
|
134
|
+
const user = await ctx.sql.run(
|
|
135
|
+
'SELECT * FROM users WHERE id = :id',
|
|
136
|
+
{ bind: { id: 1 }, type: 'selectRow' }
|
|
137
|
+
);
|
|
138
|
+
|
|
139
|
+
// Single value (e.g. COUNT, SUM)
|
|
140
|
+
const total = await ctx.sql.run(
|
|
141
|
+
'SELECT COUNT(*) AS total FROM users',
|
|
142
|
+
{ type: 'selectVar' }
|
|
143
|
+
);
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Template variables
|
|
147
|
+
|
|
148
|
+
```js
|
|
149
|
+
ctx.defineProperty('minId', { get: () => 1 });
|
|
150
|
+
|
|
151
|
+
const rows = await ctx.sql.run(
|
|
152
|
+
'SELECT * FROM users WHERE id > {{ctx.minId}}',
|
|
153
|
+
{ type: 'selectRows' }
|
|
154
|
+
);
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Save template and reuse
|
|
158
|
+
|
|
159
|
+
```js
|
|
160
|
+
// Save (requires SQL config permission)
|
|
161
|
+
await ctx.sql.save({
|
|
162
|
+
uid: 'active-users-report',
|
|
163
|
+
sql: 'SELECT * FROM users WHERE status = :status ORDER BY created_at DESC',
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
// Any logged-in user can run
|
|
167
|
+
const users = await ctx.sql.runById('active-users-report', {
|
|
168
|
+
bind: { status: 'active' },
|
|
169
|
+
type: 'selectRows',
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
// Delete template (requires SQL config permission)
|
|
173
|
+
await ctx.sql.destroy('active-users-report');
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Paginated list (SQLResource)
|
|
177
|
+
|
|
178
|
+
```js
|
|
179
|
+
// For pagination and filters, use SQLResource
|
|
180
|
+
ctx.initResource('SQLResource');
|
|
181
|
+
ctx.resource.setFilterByTk('saved-sql-uid'); // Saved SQL template ID
|
|
182
|
+
ctx.resource.setBind({ status: 'active' });
|
|
183
|
+
await ctx.resource.refresh();
|
|
184
|
+
const data = ctx.resource.getData();
|
|
185
|
+
const meta = ctx.resource.getMeta(); // page, pageSize, etc.
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Relation to ctx.resource, ctx.request
|
|
189
|
+
|
|
190
|
+
| Use | Recommended |
|
|
191
|
+
|-----|-------------|
|
|
192
|
+
| **Run SQL** | `ctx.sql.run()` or `ctx.sql.runById()` |
|
|
193
|
+
| **SQL paginated list (block)** | `ctx.initResource('SQLResource')` + `ctx.resource.refresh()` |
|
|
194
|
+
| **Generic HTTP** | `ctx.request()` |
|
|
195
|
+
|
|
196
|
+
`ctx.sql` wraps the `flowSql` API for SQL; `ctx.request` is for arbitrary API calls.
|
|
197
|
+
|
|
198
|
+
## Notes
|
|
199
|
+
|
|
200
|
+
- Use parameter binding (`:name` / `?`) instead of string concatenation to avoid SQL injection.
|
|
201
|
+
- With `type: 'selectVar'` the result is a scalar (e.g. for `COUNT`, `SUM`).
|
|
202
|
+
- Template variables `{{ctx.xxx}}` are resolved before execution; ensure the context defines them.
|
|
203
|
+
|
|
204
|
+
## Related
|
|
205
|
+
|
|
206
|
+
- [ctx.resource](./resource.md): data resource; SQLResource uses flowSql internally
|
|
207
|
+
- [ctx.initResource()](./init-resource.md): initialize SQLResource for paginated lists
|
|
208
|
+
- [ctx.request()](./request.md): generic HTTP requests
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# ctx.t()
|
|
2
|
+
|
|
3
|
+
i18n helper in RunJS for translating copy; uses the current context’s language. Use for buttons, titles, hints, etc.
|
|
4
|
+
|
|
5
|
+
## Use Cases
|
|
6
|
+
|
|
7
|
+
Available in all RunJS environments.
|
|
8
|
+
|
|
9
|
+
## Type
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
t(key: string, options?: Record<string, any>): string
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
|-----------|------|-------------|
|
|
19
|
+
| `key` | `string` | Translation key or template with placeholders (e.g. `Hello {{name}}`, `{{count}} rows`) |
|
|
20
|
+
| `options` | `object` | Optional. Interpolation (e.g. `{ name: 'John', count: 5 }`) or i18n options (`defaultValue`, `ns`) |
|
|
21
|
+
|
|
22
|
+
## Returns
|
|
23
|
+
|
|
24
|
+
- Translated string; if key has no translation and no `defaultValue`, may return the key or the interpolated string.
|
|
25
|
+
|
|
26
|
+
## Namespace (ns)
|
|
27
|
+
|
|
28
|
+
RunJS **default namespace is `runjs`**. Without `ns`, `ctx.t(key)` looks up the key in the `runjs` namespace.
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
ctx.t('Submit'); // same as ctx.t('Submit', { ns: 'runjs' })
|
|
32
|
+
|
|
33
|
+
ctx.t('Submit', { ns: 'myModule' });
|
|
34
|
+
|
|
35
|
+
ctx.t('Save', { ns: ['runjs', 'common'] });
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Examples
|
|
39
|
+
|
|
40
|
+
### Simple key
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
ctx.t('Submit');
|
|
44
|
+
ctx.t('No data');
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### With interpolation
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
const text = ctx.t('Hello {{name}}', { name: ctx.user?.nickname || 'Guest' });
|
|
51
|
+
ctx.render(`<div>${text}</div>`);
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
ctx.message.success(ctx.t('Processed {{count}} rows', { count: rows.length }));
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Relative time etc.
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
if (minutes < 60) return ctx.t('{{count}} minutes ago', { count: minutes });
|
|
62
|
+
if (hours < 24) return ctx.t('{{count}} hours ago', { count: hours });
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Specify namespace
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
ctx.t('Hello {{name}}', { name: 'Guest', ns: 'myModule' });
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Notes
|
|
72
|
+
|
|
73
|
+
- **Localization plugin**: Activate the localization plugin to manage translations. Missing keys can be collected for translation.
|
|
74
|
+
- i18next-style interpolation: use `{{varName}}` in the key and pass the same name in `options`.
|
|
75
|
+
- Language comes from the current context (e.g. `ctx.i18n.language`, user locale).
|
|
76
|
+
|
|
77
|
+
## Related
|
|
78
|
+
|
|
79
|
+
- [ctx.i18n](./i18n.md): read or change language
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# ctx.view
|
|
2
|
+
|
|
3
|
+
The currently active view controller (dialog, drawer, popover, embed, etc.); used to access view-level info and actions. Provided by FlowViewContext; only available inside content opened via `ctx.viewer` or `ctx.openView`.
|
|
4
|
+
|
|
5
|
+
## Use Cases
|
|
6
|
+
|
|
7
|
+
| Scenario | Description |
|
|
8
|
+
|----------|-------------|
|
|
9
|
+
| **Dialog/drawer content** | In `content`, use `ctx.view.close()` to close, or render `Header`, `Footer` for title and actions |
|
|
10
|
+
| **After form submit** | Call `ctx.view.close(result)` to close and pass result back |
|
|
11
|
+
| **JSBlock / Action** | Check `ctx.view.type` for view type, or read `ctx.view.inputArgs` for open params |
|
|
12
|
+
| **Association select, sub-table** | Read `inputArgs` for `collectionName`, `filterByTk`, `parentId`, etc. for loading data |
|
|
13
|
+
|
|
14
|
+
> Note: `ctx.view` is only available in RunJS when a view context exists (e.g. inside `ctx.viewer.dialog()` content, dialog form, association selector); in a normal page or backend context it is `undefined`—use optional chaining: `ctx.view?.close?.()`.
|
|
15
|
+
|
|
16
|
+
## Type
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
type FlowView = {
|
|
20
|
+
type: 'drawer' | 'popover' | 'dialog' | 'embed';
|
|
21
|
+
inputArgs: Record<string, any>;
|
|
22
|
+
Header: React.FC<{ title?: React.ReactNode; extra?: React.ReactNode }> | null;
|
|
23
|
+
Footer: React.FC<{ children?: React.ReactNode }> | null;
|
|
24
|
+
close: (result?: any, force?: boolean) => void;
|
|
25
|
+
update: (newConfig: any) => void;
|
|
26
|
+
navigation?: ViewNavigation;
|
|
27
|
+
destroy?: () => void;
|
|
28
|
+
submit?: () => Promise<any>;
|
|
29
|
+
};
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Common properties and methods
|
|
33
|
+
|
|
34
|
+
| Property/Method | Type | Description |
|
|
35
|
+
|-----------------|------|-------------|
|
|
36
|
+
| `type` | `'drawer' \| 'popover' \| 'dialog' \| 'embed'` | Current view type |
|
|
37
|
+
| `inputArgs` | `Record<string, any>` | Params passed when opening the view |
|
|
38
|
+
| `Header` | `React.FC \| null` | Header component for title and actions |
|
|
39
|
+
| `Footer` | `React.FC \| null` | Footer for buttons, etc. |
|
|
40
|
+
| `close(result?, force?)` | `void` | Close current view; optional `result` passed back to caller |
|
|
41
|
+
| `update(newConfig)` | `void` | Update view config (e.g. width, title) |
|
|
42
|
+
| `navigation` | `ViewNavigation \| undefined` | In-view navigation (tabs, etc.) |
|
|
43
|
+
|
|
44
|
+
> Currently only `dialog` and `drawer` support `Header` and `Footer`.
|
|
45
|
+
|
|
46
|
+
## inputArgs (common fields)
|
|
47
|
+
|
|
48
|
+
Fields in `inputArgs` depend on how the view was opened; common ones:
|
|
49
|
+
|
|
50
|
+
| Field | Description |
|
|
51
|
+
|-------|-------------|
|
|
52
|
+
| `viewUid` | View UID |
|
|
53
|
+
| `collectionName` | Collection name |
|
|
54
|
+
| `filterByTk` | Primary key filter (single record) |
|
|
55
|
+
| `parentId` | Parent id (associations) |
|
|
56
|
+
| `sourceId` | Source record id |
|
|
57
|
+
| `parentItem` | Parent item data |
|
|
58
|
+
| `scene` | Scene (e.g. `create`, `edit`, `select`) |
|
|
59
|
+
| `onChange` | Callback after select/change |
|
|
60
|
+
| `tabUid` | Current tab UID (in-page) |
|
|
61
|
+
|
|
62
|
+
Access via `ctx.getVar('ctx.view.inputArgs.xxx')` or `ctx.view.inputArgs.xxx`.
|
|
63
|
+
|
|
64
|
+
## Examples
|
|
65
|
+
|
|
66
|
+
### Close current view
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
await ctx.resource.runAction('create', { data: formData });
|
|
70
|
+
ctx.view?.close();
|
|
71
|
+
|
|
72
|
+
ctx.view?.close({ id: newRecord.id, name: newRecord.name });
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Header / Footer in content
|
|
76
|
+
|
|
77
|
+
```tsx
|
|
78
|
+
function DialogContent() {
|
|
79
|
+
const ctx = useFlowViewContext();
|
|
80
|
+
const { Header, Footer, close } = ctx.view;
|
|
81
|
+
return (
|
|
82
|
+
<div>
|
|
83
|
+
<Header title="Edit" extra={<Button size="small">Help</Button>} />
|
|
84
|
+
<div>Form content...</div>
|
|
85
|
+
<Footer>
|
|
86
|
+
<Button onClick={() => close()}>Cancel</Button>
|
|
87
|
+
<Button type="primary" onClick={handleSubmit}>OK</Button>
|
|
88
|
+
</Footer>
|
|
89
|
+
</div>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Branch by view type or inputArgs
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
if (ctx.view?.type === 'embed') {
|
|
98
|
+
ctx.model.setProps('headerStyle', { display: 'none' });
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const collectionName = ctx.view?.inputArgs?.collectionName;
|
|
102
|
+
if (collectionName === 'users') {
|
|
103
|
+
// User selector
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Relation to ctx.viewer, ctx.openView
|
|
108
|
+
|
|
109
|
+
| Use | Recommended |
|
|
110
|
+
|-----|-------------|
|
|
111
|
+
| **Open new view** | `ctx.viewer.dialog()` / `ctx.viewer.drawer()` or `ctx.openView()` |
|
|
112
|
+
| **Operate current view** | `ctx.view.close()`, `ctx.view.update()` |
|
|
113
|
+
| **Open params** | `ctx.view.inputArgs` |
|
|
114
|
+
|
|
115
|
+
`ctx.viewer` opens views; `ctx.view` is the current view instance; `ctx.openView` opens configured flow views.
|
|
116
|
+
|
|
117
|
+
## Notes
|
|
118
|
+
|
|
119
|
+
- `ctx.view` is only available inside a view; on a normal page it is `undefined`.
|
|
120
|
+
- Use optional chaining: `ctx.view?.close?.()` to avoid errors when no view context.
|
|
121
|
+
- `close(result)` passes `result` to the Promise returned by `ctx.viewer.open()`.
|
|
122
|
+
|
|
123
|
+
## Related
|
|
124
|
+
|
|
125
|
+
- [ctx.openView()](./open-view.md): open configured flow view
|
|
126
|
+
- [ctx.modal](./modal.md): lightweight modals (info, confirm, etc.)
|
|
127
|
+
|
|
128
|
+
> `ctx.viewer` provides `dialog()`, `drawer()`, `popover()`, `embed()`; inside their `content` you can use `ctx.view`.
|
|
File without changes
|