@openclaw/firecrawl-plugin 2026.9.8 → 2026.10.1-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/.setup/{firecrawl-client-S2gdb9zo.mjs → firecrawl-client-Bqyr6x90.mjs} +58 -104
- package/dist/.setup/{firecrawl-fetch-provider-Cq_h8okw.mjs → firecrawl-fetch-provider-CcYAp_u6.mjs} +1 -1
- package/dist/.setup/{firecrawl-search-provider-DzEHIoq7.mjs → firecrawl-search-provider-lAiZ3IJ5.mjs} +1 -1
- package/dist/api.js +1 -1
- package/dist/index.js +17 -28
- package/dist/web-fetch-contract-api.js +1 -1
- package/dist/web-fetch-provider.js +1 -1
- package/dist/web-search-contract-api.js +1 -1
- package/dist/web-search-provider.js +1 -1
- package/package.json +6 -8
- package/node_modules/zod/LICENSE +0 -21
- package/node_modules/zod/README.md +0 -218
- package/node_modules/zod/compile.cjs +0 -96
- package/node_modules/zod/compile.d.cts +0 -1
- package/node_modules/zod/compile.d.ts +0 -1
- package/node_modules/zod/compile.js +0 -52
- package/node_modules/zod/index.cjs +0 -52
- package/node_modules/zod/index.d.cts +0 -3
- package/node_modules/zod/index.d.ts +0 -3
- package/node_modules/zod/index.js +0 -7
- package/node_modules/zod/locales/index.cjs +0 -36
- package/node_modules/zod/locales/index.d.cts +0 -1
- package/node_modules/zod/locales/index.d.ts +0 -1
- package/node_modules/zod/locales/index.js +0 -1
- package/node_modules/zod/locales/package.json +0 -7
- package/node_modules/zod/mini/index.cjs +0 -51
- package/node_modules/zod/mini/index.d.cts +0 -3
- package/node_modules/zod/mini/index.d.ts +0 -3
- package/node_modules/zod/mini/index.js +0 -3
- package/node_modules/zod/mini/package.json +0 -7
- package/node_modules/zod/package.json +0 -147
- package/node_modules/zod/src/compile.ts +0 -56
- package/node_modules/zod/src/index.ts +0 -7
- package/node_modules/zod/src/locales/index.ts +0 -1
- package/node_modules/zod/src/mini/index.ts +0 -3
- package/node_modules/zod/src/v3/ZodError.ts +0 -340
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +0 -58
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +0 -80
- package/node_modules/zod/src/v3/benchmarks/index.ts +0 -59
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +0 -57
- package/node_modules/zod/src/v3/benchmarks/object.ts +0 -69
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +0 -162
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +0 -63
- package/node_modules/zod/src/v3/benchmarks/string.ts +0 -55
- package/node_modules/zod/src/v3/benchmarks/union.ts +0 -80
- package/node_modules/zod/src/v3/errors.ts +0 -13
- package/node_modules/zod/src/v3/external.ts +0 -6
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +0 -17
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +0 -8
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +0 -176
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +0 -34
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +0 -2
- package/node_modules/zod/src/v3/helpers/util.ts +0 -224
- package/node_modules/zod/src/v3/index.ts +0 -4
- package/node_modules/zod/src/v3/locales/en.ts +0 -124
- package/node_modules/zod/src/v3/standard-schema.ts +0 -113
- package/node_modules/zod/src/v3/tests/Mocker.ts +0 -54
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +0 -157
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +0 -28
- package/node_modules/zod/src/v3/tests/array.test.ts +0 -71
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +0 -388
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +0 -46
- package/node_modules/zod/src/v3/tests/base.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/bigint.test.ts +0 -55
- package/node_modules/zod/src/v3/tests/branded.test.ts +0 -53
- package/node_modules/zod/src/v3/tests/catch.test.ts +0 -220
- package/node_modules/zod/src/v3/tests/coerce.test.ts +0 -133
- package/node_modules/zod/src/v3/tests/complex.test.ts +0 -70
- package/node_modules/zod/src/v3/tests/custom.test.ts +0 -31
- package/node_modules/zod/src/v3/tests/date.test.ts +0 -32
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +0 -186
- package/node_modules/zod/src/v3/tests/default.test.ts +0 -112
- package/node_modules/zod/src/v3/tests/description.test.ts +0 -33
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +0 -315
- package/node_modules/zod/src/v3/tests/enum.test.ts +0 -80
- package/node_modules/zod/src/v3/tests/error.test.ts +0 -586
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +0 -87
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +0 -21
- package/node_modules/zod/src/v3/tests/function.test.ts +0 -261
- package/node_modules/zod/src/v3/tests/generics.test.ts +0 -48
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +0 -37
- package/node_modules/zod/src/v3/tests/intersection.test.ts +0 -128
- package/node_modules/zod/src/v3/tests/language-server.source.ts +0 -76
- package/node_modules/zod/src/v3/tests/language-server.test.ts +0 -206
- package/node_modules/zod/src/v3/tests/literal.test.ts +0 -36
- package/node_modules/zod/src/v3/tests/map.test.ts +0 -110
- package/node_modules/zod/src/v3/tests/masking.test.ts +0 -4
- package/node_modules/zod/src/v3/tests/mocker.test.ts +0 -19
- package/node_modules/zod/src/v3/tests/nan.test.ts +0 -24
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +0 -87
- package/node_modules/zod/src/v3/tests/nullable.test.ts +0 -42
- package/node_modules/zod/src/v3/tests/number.test.ts +0 -176
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/object.test.ts +0 -431
- package/node_modules/zod/src/v3/tests/optional.test.ts +0 -42
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +0 -23
- package/node_modules/zod/src/v3/tests/parser.test.ts +0 -41
- package/node_modules/zod/src/v3/tests/partials.test.ts +0 -243
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +0 -111
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +0 -186
- package/node_modules/zod/src/v3/tests/primitive.test.ts +0 -440
- package/node_modules/zod/src/v3/tests/promise.test.ts +0 -90
- package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -114
- package/node_modules/zod/src/v3/tests/record.test.ts +0 -171
- package/node_modules/zod/src/v3/tests/recursive.test.ts +0 -197
- package/node_modules/zod/src/v3/tests/refine.test.ts +0 -313
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +0 -27
- package/node_modules/zod/src/v3/tests/set.test.ts +0 -142
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +0 -83
- package/node_modules/zod/src/v3/tests/string.test.ts +0 -922
- package/node_modules/zod/src/v3/tests/transformer.test.ts +0 -233
- package/node_modules/zod/src/v3/tests/tuple.test.ts +0 -90
- package/node_modules/zod/src/v3/tests/unions.test.ts +0 -57
- package/node_modules/zod/src/v3/tests/validations.test.ts +0 -133
- package/node_modules/zod/src/v3/tests/void.test.ts +0 -15
- package/node_modules/zod/src/v3/types.ts +0 -5138
- package/node_modules/zod/src/v4/classic/checks.ts +0 -33
- package/node_modules/zod/src/v4/classic/coerce.ts +0 -27
- package/node_modules/zod/src/v4/classic/compat.ts +0 -78
- package/node_modules/zod/src/v4/classic/deep-partial.ts +0 -76
- package/node_modules/zod/src/v4/classic/errors.ts +0 -97
- package/node_modules/zod/src/v4/classic/external.ts +0 -57
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +0 -944
- package/node_modules/zod/src/v4/classic/in-out.ts +0 -45
- package/node_modules/zod/src/v4/classic/index.ts +0 -5
- package/node_modules/zod/src/v4/classic/iso.ts +0 -20
- package/node_modules/zod/src/v4/classic/parse.ts +0 -88
- package/node_modules/zod/src/v4/classic/schemas.ts +0 -2937
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +0 -26
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +0 -86
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +0 -264
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +0 -402
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +0 -381
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +0 -7
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +0 -89
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +0 -106
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +0 -604
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +0 -20
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +0 -572
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +0 -704
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +0 -160
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +0 -374
- package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +0 -76
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +0 -40
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +0 -985
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +0 -92
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +0 -316
- package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +0 -380
- package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +0 -32
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +0 -455
- package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +0 -27
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +0 -32
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +0 -221
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -942
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +0 -305
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +0 -917
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +0 -1108
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +0 -96
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -179
- package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +0 -26
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +0 -1467
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +0 -391
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +0 -72
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +0 -32
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +0 -67
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +0 -81
- package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +0 -159
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +0 -958
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +0 -319
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +0 -127
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +0 -334
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +0 -215
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +0 -39
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +0 -109
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +0 -262
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +0 -128
- package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +0 -29
- package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +0 -24
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +0 -342
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +0 -21
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +0 -168
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +0 -101
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +0 -22
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +0 -401
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +0 -1006
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +0 -235
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +0 -366
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +0 -497
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +0 -211
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +0 -101
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +0 -144
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +0 -44
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +0 -351
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +0 -175
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +0 -81
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +0 -141
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +0 -23
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -184
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +0 -885
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -707
- package/node_modules/zod/src/v4/classic/tests/redos.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +0 -693
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +0 -243
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +0 -190
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +0 -153
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +0 -125
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +0 -1440
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +0 -124
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -812
- package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +0 -438
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -4733
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +0 -378
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +0 -511
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +0 -310
- package/node_modules/zod/src/v4/classic/tests/url.test.ts +0 -13
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +0 -645
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +0 -283
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +0 -12
- package/node_modules/zod/src/v4/core/api.ts +0 -1875
- package/node_modules/zod/src/v4/core/checks.ts +0 -1266
- package/node_modules/zod/src/v4/core/compile.ts +0 -2313
- package/node_modules/zod/src/v4/core/core.ts +0 -230
- package/node_modules/zod/src/v4/core/doc.ts +0 -52
- package/node_modules/zod/src/v4/core/errors.ts +0 -543
- package/node_modules/zod/src/v4/core/index.ts +0 -19
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +0 -131
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +0 -934
- package/node_modules/zod/src/v4/core/json-schema.ts +0 -148
- package/node_modules/zod/src/v4/core/memoizer.ts +0 -331
- package/node_modules/zod/src/v4/core/parse.ts +0 -309
- package/node_modules/zod/src/v4/core/regexes.ts +0 -217
- package/node_modules/zod/src/v4/core/registries.ts +0 -105
- package/node_modules/zod/src/v4/core/schemas.ts +0 -5192
- package/node_modules/zod/src/v4/core/standard-schema.ts +0 -159
- package/node_modules/zod/src/v4/core/tests/cached.test.ts +0 -54
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +0 -1004
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +0 -445
- package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +0 -89
- package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +0 -26
- package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +0 -34
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +0 -2036
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +0 -140
- package/node_modules/zod/src/v4/core/tests/extend.test.ts +0 -59
- package/node_modules/zod/src/v4/core/tests/index.test.ts +0 -46
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +0 -124
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +0 -214
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +0 -22
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +0 -180
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +0 -72
- package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +0 -379
- package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +0 -163
- package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +0 -46
- package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +0 -42
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +0 -128
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +0 -85
- package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +0 -69
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +0 -69
- package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +0 -105
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +0 -46
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +0 -125
- package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +0 -45
- package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +0 -51
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +0 -133
- package/node_modules/zod/src/v4/core/to-json-schema.ts +0 -857
- package/node_modules/zod/src/v4/core/util.ts +0 -1280
- package/node_modules/zod/src/v4/core/versions.ts +0 -5
- package/node_modules/zod/src/v4/core/visit.ts +0 -193
- package/node_modules/zod/src/v4/core/zsf.ts +0 -323
- package/node_modules/zod/src/v4/index.ts +0 -4
- package/node_modules/zod/src/v4/locales/ar.ts +0 -120
- package/node_modules/zod/src/v4/locales/az.ts +0 -116
- package/node_modules/zod/src/v4/locales/be.ts +0 -188
- package/node_modules/zod/src/v4/locales/bg.ts +0 -133
- package/node_modules/zod/src/v4/locales/bn.ts +0 -123
- package/node_modules/zod/src/v4/locales/ca.ts +0 -121
- package/node_modules/zod/src/v4/locales/ckb.ts +0 -140
- package/node_modules/zod/src/v4/locales/cs.ts +0 -123
- package/node_modules/zod/src/v4/locales/da.ts +0 -128
- package/node_modules/zod/src/v4/locales/de.ts +0 -121
- package/node_modules/zod/src/v4/locales/el.ts +0 -124
- package/node_modules/zod/src/v4/locales/en.ts +0 -136
- package/node_modules/zod/src/v4/locales/eo.ts +0 -123
- package/node_modules/zod/src/v4/locales/es.ts +0 -145
- package/node_modules/zod/src/v4/locales/fa.ts +0 -131
- package/node_modules/zod/src/v4/locales/fi.ts +0 -126
- package/node_modules/zod/src/v4/locales/fr-CA.ts +0 -121
- package/node_modules/zod/src/v4/locales/fr.ts +0 -139
- package/node_modules/zod/src/v4/locales/gu.ts +0 -123
- package/node_modules/zod/src/v4/locales/he.ts +0 -253
- package/node_modules/zod/src/v4/locales/hi.ts +0 -126
- package/node_modules/zod/src/v4/locales/hr.ts +0 -135
- package/node_modules/zod/src/v4/locales/hu.ts +0 -122
- package/node_modules/zod/src/v4/locales/hy.ts +0 -175
- package/node_modules/zod/src/v4/locales/id.ts +0 -120
- package/node_modules/zod/src/v4/locales/index.ts +0 -63
- package/node_modules/zod/src/v4/locales/is.ts +0 -124
- package/node_modules/zod/src/v4/locales/it.ts +0 -121
- package/node_modules/zod/src/v4/locales/ja.ts +0 -119
- package/node_modules/zod/src/v4/locales/ka.ts +0 -128
- package/node_modules/zod/src/v4/locales/kh.ts +0 -7
- package/node_modules/zod/src/v4/locales/km.ts +0 -124
- package/node_modules/zod/src/v4/locales/kn.ts +0 -126
- package/node_modules/zod/src/v4/locales/ko.ts +0 -126
- package/node_modules/zod/src/v4/locales/lt.ts +0 -243
- package/node_modules/zod/src/v4/locales/mk.ts +0 -123
- package/node_modules/zod/src/v4/locales/ms.ts +0 -120
- package/node_modules/zod/src/v4/locales/ne.ts +0 -128
- package/node_modules/zod/src/v4/locales/nl.ts +0 -126
- package/node_modules/zod/src/v4/locales/nn.ts +0 -121
- package/node_modules/zod/src/v4/locales/no.ts +0 -121
- package/node_modules/zod/src/v4/locales/ota.ts +0 -122
- package/node_modules/zod/src/v4/locales/pl.ts +0 -123
- package/node_modules/zod/src/v4/locales/ps.ts +0 -131
- package/node_modules/zod/src/v4/locales/pt-BR.ts +0 -161
- package/node_modules/zod/src/v4/locales/pt.ts +0 -159
- package/node_modules/zod/src/v4/locales/ro.ts +0 -132
- package/node_modules/zod/src/v4/locales/ru.ts +0 -188
- package/node_modules/zod/src/v4/locales/sk.ts +0 -123
- package/node_modules/zod/src/v4/locales/sl.ts +0 -123
- package/node_modules/zod/src/v4/locales/sv.ts +0 -124
- package/node_modules/zod/src/v4/locales/ta.ts +0 -123
- package/node_modules/zod/src/v4/locales/tg.ts +0 -135
- package/node_modules/zod/src/v4/locales/th.ts +0 -124
- package/node_modules/zod/src/v4/locales/tk.ts +0 -113
- package/node_modules/zod/src/v4/locales/tr.ts +0 -116
- package/node_modules/zod/src/v4/locales/ua.ts +0 -7
- package/node_modules/zod/src/v4/locales/uk.ts +0 -122
- package/node_modules/zod/src/v4/locales/ur.ts +0 -124
- package/node_modules/zod/src/v4/locales/uz.ts +0 -120
- package/node_modules/zod/src/v4/locales/vi.ts +0 -122
- package/node_modules/zod/src/v4/locales/yo.ts +0 -129
- package/node_modules/zod/src/v4/locales/zh-CN.ts +0 -121
- package/node_modules/zod/src/v4/locales/zh-TW.ts +0 -120
- package/node_modules/zod/src/v4/mini/checks.ts +0 -33
- package/node_modules/zod/src/v4/mini/coerce.ts +0 -27
- package/node_modules/zod/src/v4/mini/deep-partial.ts +0 -73
- package/node_modules/zod/src/v4/mini/external.ts +0 -52
- package/node_modules/zod/src/v4/mini/in-out.ts +0 -45
- package/node_modules/zod/src/v4/mini/index.ts +0 -3
- package/node_modules/zod/src/v4/mini/iso.ts +0 -66
- package/node_modules/zod/src/v4/mini/parse.ts +0 -16
- package/node_modules/zod/src/v4/mini/schemas.ts +0 -2051
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +0 -57
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +0 -190
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +0 -94
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +0 -158
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +0 -582
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +0 -30
- package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +0 -84
- package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +0 -54
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +0 -41
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -14
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +0 -1146
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +0 -109
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +0 -292
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +0 -43
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +0 -341
- package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +0 -50
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +0 -396
- package/node_modules/zod/src/v4-mini/index.ts +0 -3
- package/node_modules/zod/v3/ZodError.cjs +0 -167
- package/node_modules/zod/v3/ZodError.d.cts +0 -164
- package/node_modules/zod/v3/ZodError.d.ts +0 -164
- package/node_modules/zod/v3/ZodError.js +0 -143
- package/node_modules/zod/v3/errors.cjs +0 -36
- package/node_modules/zod/v3/errors.d.cts +0 -5
- package/node_modules/zod/v3/errors.d.ts +0 -5
- package/node_modules/zod/v3/errors.js +0 -9
- package/node_modules/zod/v3/external.cjs +0 -41
- package/node_modules/zod/v3/external.d.cts +0 -6
- package/node_modules/zod/v3/external.d.ts +0 -6
- package/node_modules/zod/v3/external.js +0 -6
- package/node_modules/zod/v3/helpers/enumUtil.cjs +0 -21
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +0 -8
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +0 -8
- package/node_modules/zod/v3/helpers/enumUtil.js +0 -1
- package/node_modules/zod/v3/helpers/errorUtil.cjs +0 -28
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +0 -9
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +0 -9
- package/node_modules/zod/v3/helpers/errorUtil.js +0 -6
- package/node_modules/zod/v3/helpers/parseUtil.cjs +0 -143
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +0 -78
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +0 -78
- package/node_modules/zod/v3/helpers/parseUtil.js +0 -109
- package/node_modules/zod/v3/helpers/partialUtil.cjs +0 -21
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +0 -8
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +0 -8
- package/node_modules/zod/v3/helpers/partialUtil.js +0 -1
- package/node_modules/zod/v3/helpers/typeAliases.cjs +0 -21
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +0 -2
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +0 -2
- package/node_modules/zod/v3/helpers/typeAliases.js +0 -1
- package/node_modules/zod/v3/helpers/util.cjs +0 -156
- package/node_modules/zod/v3/helpers/util.d.cts +0 -85
- package/node_modules/zod/v3/helpers/util.d.ts +0 -85
- package/node_modules/zod/v3/helpers/util.js +0 -133
- package/node_modules/zod/v3/index.cjs +0 -52
- package/node_modules/zod/v3/index.d.cts +0 -4
- package/node_modules/zod/v3/index.d.ts +0 -4
- package/node_modules/zod/v3/index.js +0 -4
- package/node_modules/zod/v3/locales/en.cjs +0 -112
- package/node_modules/zod/v3/locales/en.d.cts +0 -3
- package/node_modules/zod/v3/locales/en.d.ts +0 -3
- package/node_modules/zod/v3/locales/en.js +0 -109
- package/node_modules/zod/v3/package.json +0 -7
- package/node_modules/zod/v3/standard-schema.cjs +0 -21
- package/node_modules/zod/v3/standard-schema.d.cts +0 -102
- package/node_modules/zod/v3/standard-schema.d.ts +0 -102
- package/node_modules/zod/v3/standard-schema.js +0 -1
- package/node_modules/zod/v3/types.cjs +0 -3798
- package/node_modules/zod/v3/types.d.cts +0 -1034
- package/node_modules/zod/v3/types.d.ts +0 -1034
- package/node_modules/zod/v3/types.js +0 -3697
- package/node_modules/zod/v4/classic/checks.cjs +0 -53
- package/node_modules/zod/v4/classic/checks.d.cts +0 -1
- package/node_modules/zod/v4/classic/checks.d.ts +0 -1
- package/node_modules/zod/v4/classic/checks.js +0 -1
- package/node_modules/zod/v4/classic/coerce.cjs +0 -66
- package/node_modules/zod/v4/classic/coerce.d.cts +0 -17
- package/node_modules/zod/v4/classic/coerce.d.ts +0 -17
- package/node_modules/zod/v4/classic/coerce.js +0 -17
- package/node_modules/zod/v4/classic/compat.cjs +0 -80
- package/node_modules/zod/v4/classic/compat.d.cts +0 -48
- package/node_modules/zod/v4/classic/compat.d.ts +0 -48
- package/node_modules/zod/v4/classic/compat.js +0 -31
- package/node_modules/zod/v4/classic/deep-partial.cjs +0 -58
- package/node_modules/zod/v4/classic/deep-partial.d.cts +0 -14
- package/node_modules/zod/v4/classic/deep-partial.d.ts +0 -14
- package/node_modules/zod/v4/classic/deep-partial.js +0 -13
- package/node_modules/zod/v4/classic/errors.cjs +0 -102
- package/node_modules/zod/v4/classic/errors.d.cts +0 -29
- package/node_modules/zod/v4/classic/errors.d.ts +0 -29
- package/node_modules/zod/v4/classic/errors.js +0 -57
- package/node_modules/zod/v4/classic/external.cjs +0 -97
- package/node_modules/zod/v4/classic/external.d.cts +0 -19
- package/node_modules/zod/v4/classic/external.d.ts +0 -19
- package/node_modules/zod/v4/classic/external.js +0 -17
- package/node_modules/zod/v4/classic/from-json-schema.cjs +0 -926
- package/node_modules/zod/v4/classic/from-json-schema.d.cts +0 -12
- package/node_modules/zod/v4/classic/from-json-schema.d.ts +0 -12
- package/node_modules/zod/v4/classic/from-json-schema.js +0 -881
- package/node_modules/zod/v4/classic/in-out.cjs +0 -82
- package/node_modules/zod/v4/classic/in-out.d.cts +0 -8
- package/node_modules/zod/v4/classic/in-out.d.ts +0 -8
- package/node_modules/zod/v4/classic/in-out.js +0 -36
- package/node_modules/zod/v4/classic/index.cjs +0 -52
- package/node_modules/zod/v4/classic/index.d.cts +0 -3
- package/node_modules/zod/v4/classic/index.d.ts +0 -3
- package/node_modules/zod/v4/classic/index.js +0 -4
- package/node_modules/zod/v4/classic/iso.cjs +0 -68
- package/node_modules/zod/v4/classic/iso.d.cts +0 -7
- package/node_modules/zod/v4/classic/iso.d.ts +0 -7
- package/node_modules/zod/v4/classic/iso.js +0 -15
- package/node_modules/zod/v4/classic/package.json +0 -7
- package/node_modules/zod/v4/classic/parse.cjs +0 -63
- package/node_modules/zod/v4/classic/parse.d.cts +0 -44
- package/node_modules/zod/v4/classic/parse.d.ts +0 -44
- package/node_modules/zod/v4/classic/parse.js +0 -16
- package/node_modules/zod/v4/classic/schemas.cjs +0 -1676
- package/node_modules/zod/v4/classic/schemas.d.cts +0 -816
- package/node_modules/zod/v4/classic/schemas.d.ts +0 -816
- package/node_modules/zod/v4/classic/schemas.js +0 -1535
- package/node_modules/zod/v4/core/api.cjs +0 -1269
- package/node_modules/zod/v4/core/api.d.cts +0 -335
- package/node_modules/zod/v4/core/api.d.ts +0 -335
- package/node_modules/zod/v4/core/api.js +0 -1107
- package/node_modules/zod/v4/core/checks.cjs +0 -561
- package/node_modules/zod/v4/core/checks.d.cts +0 -294
- package/node_modules/zod/v4/core/checks.d.ts +0 -294
- package/node_modules/zod/v4/core/checks.js +0 -516
- package/node_modules/zod/v4/core/compile.cjs +0 -1908
- package/node_modules/zod/v4/core/compile.d.cts +0 -65
- package/node_modules/zod/v4/core/compile.d.ts +0 -65
- package/node_modules/zod/v4/core/compile.js +0 -1858
- package/node_modules/zod/v4/core/core.cjs +0 -167
- package/node_modules/zod/v4/core/core.d.cts +0 -82
- package/node_modules/zod/v4/core/core.d.ts +0 -82
- package/node_modules/zod/v4/core/core.js +0 -141
- package/node_modules/zod/v4/core/doc.cjs +0 -61
- package/node_modules/zod/v4/core/doc.d.cts +0 -16
- package/node_modules/zod/v4/core/doc.d.ts +0 -16
- package/node_modules/zod/v4/core/doc.js +0 -38
- package/node_modules/zod/v4/core/errors.cjs +0 -317
- package/node_modules/zod/v4/core/errors.d.cts +0 -225
- package/node_modules/zod/v4/core/errors.d.ts +0 -225
- package/node_modules/zod/v4/core/errors.js +0 -267
- package/node_modules/zod/v4/core/index.cjs +0 -70
- package/node_modules/zod/v4/core/index.d.cts +0 -19
- package/node_modules/zod/v4/core/index.d.ts +0 -19
- package/node_modules/zod/v4/core/index.js +0 -19
- package/node_modules/zod/v4/core/json-schema-generator.cjs +0 -122
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +0 -65
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +0 -65
- package/node_modules/zod/v4/core/json-schema-generator.js +0 -99
- package/node_modules/zod/v4/core/json-schema-processors.cjs +0 -929
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +0 -65
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +0 -65
- package/node_modules/zod/v4/core/json-schema-processors.js +0 -843
- package/node_modules/zod/v4/core/json-schema.cjs +0 -21
- package/node_modules/zod/v4/core/json-schema.d.cts +0 -89
- package/node_modules/zod/v4/core/json-schema.d.ts +0 -89
- package/node_modules/zod/v4/core/json-schema.js +0 -1
- package/node_modules/zod/v4/core/memoizer.cjs +0 -360
- package/node_modules/zod/v4/core/memoizer.d.cts +0 -15
- package/node_modules/zod/v4/core/memoizer.d.ts +0 -15
- package/node_modules/zod/v4/core/memoizer.js +0 -311
- package/node_modules/zod/v4/core/package.json +0 -7
- package/node_modules/zod/v4/core/parse.cjs +0 -233
- package/node_modules/zod/v4/core/parse.d.cts +0 -52
- package/node_modules/zod/v4/core/parse.d.ts +0 -52
- package/node_modules/zod/v4/core/parse.js +0 -175
- package/node_modules/zod/v4/core/regexes.cjs +0 -209
- package/node_modules/zod/v4/core/regexes.d.cts +0 -90
- package/node_modules/zod/v4/core/regexes.d.ts +0 -90
- package/node_modules/zod/v4/core/regexes.js +0 -156
- package/node_modules/zod/v4/core/registries.cjs +0 -75
- package/node_modules/zod/v4/core/registries.d.cts +0 -35
- package/node_modules/zod/v4/core/registries.d.ts +0 -35
- package/node_modules/zod/v4/core/registries.js +0 -51
- package/node_modules/zod/v4/core/schemas.cjs +0 -2669
- package/node_modules/zod/v4/core/schemas.d.cts +0 -1273
- package/node_modules/zod/v4/core/schemas.d.ts +0 -1273
- package/node_modules/zod/v4/core/schemas.js +0 -2606
- package/node_modules/zod/v4/core/standard-schema.cjs +0 -21
- package/node_modules/zod/v4/core/standard-schema.d.cts +0 -126
- package/node_modules/zod/v4/core/standard-schema.d.ts +0 -126
- package/node_modules/zod/v4/core/standard-schema.js +0 -1
- package/node_modules/zod/v4/core/to-json-schema.cjs +0 -681
- package/node_modules/zod/v4/core/to-json-schema.d.cts +0 -154
- package/node_modules/zod/v4/core/to-json-schema.d.ts +0 -154
- package/node_modules/zod/v4/core/to-json-schema.js +0 -651
- package/node_modules/zod/v4/core/util.cjs +0 -949
- package/node_modules/zod/v4/core/util.d.cts +0 -278
- package/node_modules/zod/v4/core/util.d.ts +0 -278
- package/node_modules/zod/v4/core/util.js +0 -859
- package/node_modules/zod/v4/core/versions.cjs +0 -27
- package/node_modules/zod/v4/core/versions.d.cts +0 -5
- package/node_modules/zod/v4/core/versions.d.ts +0 -5
- package/node_modules/zod/v4/core/versions.js +0 -5
- package/node_modules/zod/v4/core/visit.cjs +0 -214
- package/node_modules/zod/v4/core/visit.d.cts +0 -30
- package/node_modules/zod/v4/core/visit.d.ts +0 -30
- package/node_modules/zod/v4/core/visit.js +0 -169
- package/node_modules/zod/v4/index.cjs +0 -51
- package/node_modules/zod/v4/index.d.cts +0 -3
- package/node_modules/zod/v4/index.d.ts +0 -3
- package/node_modules/zod/v4/index.js +0 -4
- package/node_modules/zod/v4/locales/ar.cjs +0 -138
- package/node_modules/zod/v4/locales/ar.d.cts +0 -5
- package/node_modules/zod/v4/locales/ar.d.ts +0 -4
- package/node_modules/zod/v4/locales/ar.js +0 -111
- package/node_modules/zod/v4/locales/az.cjs +0 -137
- package/node_modules/zod/v4/locales/az.d.cts +0 -5
- package/node_modules/zod/v4/locales/az.d.ts +0 -4
- package/node_modules/zod/v4/locales/az.js +0 -110
- package/node_modules/zod/v4/locales/be.cjs +0 -195
- package/node_modules/zod/v4/locales/be.d.cts +0 -5
- package/node_modules/zod/v4/locales/be.d.ts +0 -4
- package/node_modules/zod/v4/locales/be.js +0 -168
- package/node_modules/zod/v4/locales/bg.cjs +0 -152
- package/node_modules/zod/v4/locales/bg.d.cts +0 -5
- package/node_modules/zod/v4/locales/bg.d.ts +0 -4
- package/node_modules/zod/v4/locales/bg.js +0 -125
- package/node_modules/zod/v4/locales/bn.cjs +0 -140
- package/node_modules/zod/v4/locales/bn.d.cts +0 -5
- package/node_modules/zod/v4/locales/bn.d.ts +0 -4
- package/node_modules/zod/v4/locales/bn.js +0 -113
- package/node_modules/zod/v4/locales/ca.cjs +0 -139
- package/node_modules/zod/v4/locales/ca.d.cts +0 -5
- package/node_modules/zod/v4/locales/ca.d.ts +0 -4
- package/node_modules/zod/v4/locales/ca.js +0 -112
- package/node_modules/zod/v4/locales/ckb.cjs +0 -160
- package/node_modules/zod/v4/locales/ckb.d.cts +0 -5
- package/node_modules/zod/v4/locales/ckb.d.ts +0 -4
- package/node_modules/zod/v4/locales/ckb.js +0 -133
- package/node_modules/zod/v4/locales/cs.cjs +0 -143
- package/node_modules/zod/v4/locales/cs.d.cts +0 -5
- package/node_modules/zod/v4/locales/cs.d.ts +0 -4
- package/node_modules/zod/v4/locales/cs.js +0 -116
- package/node_modules/zod/v4/locales/da.cjs +0 -147
- package/node_modules/zod/v4/locales/da.d.cts +0 -5
- package/node_modules/zod/v4/locales/da.d.ts +0 -4
- package/node_modules/zod/v4/locales/da.js +0 -120
- package/node_modules/zod/v4/locales/de.cjs +0 -140
- package/node_modules/zod/v4/locales/de.d.cts +0 -5
- package/node_modules/zod/v4/locales/de.d.ts +0 -4
- package/node_modules/zod/v4/locales/de.js +0 -113
- package/node_modules/zod/v4/locales/el.cjs +0 -139
- package/node_modules/zod/v4/locales/el.d.cts +0 -5
- package/node_modules/zod/v4/locales/el.d.ts +0 -4
- package/node_modules/zod/v4/locales/el.js +0 -112
- package/node_modules/zod/v4/locales/en.cjs +0 -152
- package/node_modules/zod/v4/locales/en.d.cts +0 -5
- package/node_modules/zod/v4/locales/en.d.ts +0 -4
- package/node_modules/zod/v4/locales/en.js +0 -125
- package/node_modules/zod/v4/locales/eo.cjs +0 -141
- package/node_modules/zod/v4/locales/eo.d.cts +0 -5
- package/node_modules/zod/v4/locales/eo.d.ts +0 -4
- package/node_modules/zod/v4/locales/eo.js +0 -114
- package/node_modules/zod/v4/locales/es.cjs +0 -163
- package/node_modules/zod/v4/locales/es.d.cts +0 -5
- package/node_modules/zod/v4/locales/es.d.ts +0 -4
- package/node_modules/zod/v4/locales/es.js +0 -136
- package/node_modules/zod/v4/locales/fa.cjs +0 -146
- package/node_modules/zod/v4/locales/fa.d.cts +0 -5
- package/node_modules/zod/v4/locales/fa.d.ts +0 -4
- package/node_modules/zod/v4/locales/fa.js +0 -119
- package/node_modules/zod/v4/locales/fi.cjs +0 -144
- package/node_modules/zod/v4/locales/fi.d.cts +0 -5
- package/node_modules/zod/v4/locales/fi.d.ts +0 -4
- package/node_modules/zod/v4/locales/fi.js +0 -117
- package/node_modules/zod/v4/locales/fr-CA.cjs +0 -139
- package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -5
- package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
- package/node_modules/zod/v4/locales/fr-CA.js +0 -112
- package/node_modules/zod/v4/locales/fr.cjs +0 -156
- package/node_modules/zod/v4/locales/fr.d.cts +0 -5
- package/node_modules/zod/v4/locales/fr.d.ts +0 -4
- package/node_modules/zod/v4/locales/fr.js +0 -129
- package/node_modules/zod/v4/locales/gu.cjs +0 -140
- package/node_modules/zod/v4/locales/gu.d.cts +0 -5
- package/node_modules/zod/v4/locales/gu.d.ts +0 -4
- package/node_modules/zod/v4/locales/gu.js +0 -113
- package/node_modules/zod/v4/locales/he.cjs +0 -248
- package/node_modules/zod/v4/locales/he.d.cts +0 -5
- package/node_modules/zod/v4/locales/he.d.ts +0 -4
- package/node_modules/zod/v4/locales/he.js +0 -221
- package/node_modules/zod/v4/locales/hi.cjs +0 -138
- package/node_modules/zod/v4/locales/hi.d.cts +0 -5
- package/node_modules/zod/v4/locales/hi.d.ts +0 -4
- package/node_modules/zod/v4/locales/hi.js +0 -111
- package/node_modules/zod/v4/locales/hr.cjs +0 -153
- package/node_modules/zod/v4/locales/hr.d.cts +0 -5
- package/node_modules/zod/v4/locales/hr.d.ts +0 -4
- package/node_modules/zod/v4/locales/hr.js +0 -126
- package/node_modules/zod/v4/locales/hu.cjs +0 -140
- package/node_modules/zod/v4/locales/hu.d.cts +0 -5
- package/node_modules/zod/v4/locales/hu.d.ts +0 -4
- package/node_modules/zod/v4/locales/hu.js +0 -113
- package/node_modules/zod/v4/locales/hy.cjs +0 -185
- package/node_modules/zod/v4/locales/hy.d.cts +0 -5
- package/node_modules/zod/v4/locales/hy.d.ts +0 -4
- package/node_modules/zod/v4/locales/hy.js +0 -158
- package/node_modules/zod/v4/locales/id.cjs +0 -138
- package/node_modules/zod/v4/locales/id.d.cts +0 -5
- package/node_modules/zod/v4/locales/id.d.ts +0 -4
- package/node_modules/zod/v4/locales/id.js +0 -111
- package/node_modules/zod/v4/locales/index.cjs +0 -152
- package/node_modules/zod/v4/locales/index.d.cts +0 -63
- package/node_modules/zod/v4/locales/index.d.ts +0 -63
- package/node_modules/zod/v4/locales/index.js +0 -63
- package/node_modules/zod/v4/locales/is.cjs +0 -141
- package/node_modules/zod/v4/locales/is.d.cts +0 -5
- package/node_modules/zod/v4/locales/is.d.ts +0 -4
- package/node_modules/zod/v4/locales/is.js +0 -114
- package/node_modules/zod/v4/locales/it.cjs +0 -140
- package/node_modules/zod/v4/locales/it.d.cts +0 -5
- package/node_modules/zod/v4/locales/it.d.ts +0 -4
- package/node_modules/zod/v4/locales/it.js +0 -113
- package/node_modules/zod/v4/locales/ja.cjs +0 -139
- package/node_modules/zod/v4/locales/ja.d.cts +0 -5
- package/node_modules/zod/v4/locales/ja.d.ts +0 -4
- package/node_modules/zod/v4/locales/ja.js +0 -112
- package/node_modules/zod/v4/locales/ka.cjs +0 -144
- package/node_modules/zod/v4/locales/ka.d.cts +0 -5
- package/node_modules/zod/v4/locales/ka.d.ts +0 -4
- package/node_modules/zod/v4/locales/ka.js +0 -117
- package/node_modules/zod/v4/locales/kh.cjs +0 -12
- package/node_modules/zod/v4/locales/kh.d.cts +0 -5
- package/node_modules/zod/v4/locales/kh.d.ts +0 -5
- package/node_modules/zod/v4/locales/kh.js +0 -5
- package/node_modules/zod/v4/locales/km.cjs +0 -142
- package/node_modules/zod/v4/locales/km.d.cts +0 -5
- package/node_modules/zod/v4/locales/km.d.ts +0 -4
- package/node_modules/zod/v4/locales/km.js +0 -115
- package/node_modules/zod/v4/locales/kn.cjs +0 -143
- package/node_modules/zod/v4/locales/kn.d.cts +0 -5
- package/node_modules/zod/v4/locales/kn.d.ts +0 -4
- package/node_modules/zod/v4/locales/kn.js +0 -116
- package/node_modules/zod/v4/locales/ko.cjs +0 -143
- package/node_modules/zod/v4/locales/ko.d.cts +0 -5
- package/node_modules/zod/v4/locales/ko.d.ts +0 -4
- package/node_modules/zod/v4/locales/ko.js +0 -116
- package/node_modules/zod/v4/locales/lt.cjs +0 -234
- package/node_modules/zod/v4/locales/lt.d.cts +0 -5
- package/node_modules/zod/v4/locales/lt.d.ts +0 -4
- package/node_modules/zod/v4/locales/lt.js +0 -207
- package/node_modules/zod/v4/locales/mk.cjs +0 -141
- package/node_modules/zod/v4/locales/mk.d.cts +0 -5
- package/node_modules/zod/v4/locales/mk.d.ts +0 -4
- package/node_modules/zod/v4/locales/mk.js +0 -114
- package/node_modules/zod/v4/locales/ms.cjs +0 -139
- package/node_modules/zod/v4/locales/ms.d.cts +0 -5
- package/node_modules/zod/v4/locales/ms.d.ts +0 -4
- package/node_modules/zod/v4/locales/ms.js +0 -112
- package/node_modules/zod/v4/locales/ne.cjs +0 -138
- package/node_modules/zod/v4/locales/ne.d.cts +0 -5
- package/node_modules/zod/v4/locales/ne.d.ts +0 -4
- package/node_modules/zod/v4/locales/ne.js +0 -111
- package/node_modules/zod/v4/locales/nl.cjs +0 -142
- package/node_modules/zod/v4/locales/nl.d.cts +0 -5
- package/node_modules/zod/v4/locales/nl.d.ts +0 -4
- package/node_modules/zod/v4/locales/nl.js +0 -115
- package/node_modules/zod/v4/locales/nn.cjs +0 -140
- package/node_modules/zod/v4/locales/nn.d.cts +0 -5
- package/node_modules/zod/v4/locales/nn.d.ts +0 -4
- package/node_modules/zod/v4/locales/nn.js +0 -113
- package/node_modules/zod/v4/locales/no.cjs +0 -140
- package/node_modules/zod/v4/locales/no.d.cts +0 -5
- package/node_modules/zod/v4/locales/no.d.ts +0 -4
- package/node_modules/zod/v4/locales/no.js +0 -113
- package/node_modules/zod/v4/locales/ota.cjs +0 -141
- package/node_modules/zod/v4/locales/ota.d.cts +0 -5
- package/node_modules/zod/v4/locales/ota.d.ts +0 -4
- package/node_modules/zod/v4/locales/ota.js +0 -114
- package/node_modules/zod/v4/locales/package.json +0 -7
- package/node_modules/zod/v4/locales/pl.cjs +0 -141
- package/node_modules/zod/v4/locales/pl.d.cts +0 -5
- package/node_modules/zod/v4/locales/pl.d.ts +0 -4
- package/node_modules/zod/v4/locales/pl.js +0 -114
- package/node_modules/zod/v4/locales/ps.cjs +0 -146
- package/node_modules/zod/v4/locales/ps.d.cts +0 -5
- package/node_modules/zod/v4/locales/ps.d.ts +0 -4
- package/node_modules/zod/v4/locales/ps.js +0 -119
- package/node_modules/zod/v4/locales/pt-BR.cjs +0 -170
- package/node_modules/zod/v4/locales/pt-BR.d.cts +0 -5
- package/node_modules/zod/v4/locales/pt-BR.d.ts +0 -4
- package/node_modules/zod/v4/locales/pt-BR.js +0 -143
- package/node_modules/zod/v4/locales/pt.cjs +0 -169
- package/node_modules/zod/v4/locales/pt.d.cts +0 -5
- package/node_modules/zod/v4/locales/pt.d.ts +0 -4
- package/node_modules/zod/v4/locales/pt.js +0 -142
- package/node_modules/zod/v4/locales/ro.cjs +0 -149
- package/node_modules/zod/v4/locales/ro.d.cts +0 -5
- package/node_modules/zod/v4/locales/ro.d.ts +0 -4
- package/node_modules/zod/v4/locales/ro.js +0 -122
- package/node_modules/zod/v4/locales/ru.cjs +0 -195
- package/node_modules/zod/v4/locales/ru.d.cts +0 -5
- package/node_modules/zod/v4/locales/ru.d.ts +0 -4
- package/node_modules/zod/v4/locales/ru.js +0 -168
- package/node_modules/zod/v4/locales/sk.cjs +0 -143
- package/node_modules/zod/v4/locales/sk.d.cts +0 -5
- package/node_modules/zod/v4/locales/sk.d.ts +0 -4
- package/node_modules/zod/v4/locales/sk.js +0 -116
- package/node_modules/zod/v4/locales/sl.cjs +0 -141
- package/node_modules/zod/v4/locales/sl.d.cts +0 -5
- package/node_modules/zod/v4/locales/sl.d.ts +0 -4
- package/node_modules/zod/v4/locales/sl.js +0 -114
- package/node_modules/zod/v4/locales/sv.cjs +0 -142
- package/node_modules/zod/v4/locales/sv.d.cts +0 -5
- package/node_modules/zod/v4/locales/sv.d.ts +0 -4
- package/node_modules/zod/v4/locales/sv.js +0 -115
- package/node_modules/zod/v4/locales/ta.cjs +0 -142
- package/node_modules/zod/v4/locales/ta.d.cts +0 -5
- package/node_modules/zod/v4/locales/ta.d.ts +0 -4
- package/node_modules/zod/v4/locales/ta.js +0 -115
- package/node_modules/zod/v4/locales/tg.cjs +0 -144
- package/node_modules/zod/v4/locales/tg.d.cts +0 -5
- package/node_modules/zod/v4/locales/tg.d.ts +0 -4
- package/node_modules/zod/v4/locales/tg.js +0 -117
- package/node_modules/zod/v4/locales/th.cjs +0 -142
- package/node_modules/zod/v4/locales/th.d.cts +0 -5
- package/node_modules/zod/v4/locales/th.d.ts +0 -4
- package/node_modules/zod/v4/locales/th.js +0 -115
- package/node_modules/zod/v4/locales/tk.cjs +0 -134
- package/node_modules/zod/v4/locales/tk.d.cts +0 -5
- package/node_modules/zod/v4/locales/tk.d.ts +0 -4
- package/node_modules/zod/v4/locales/tk.js +0 -107
- package/node_modules/zod/v4/locales/tr.cjs +0 -137
- package/node_modules/zod/v4/locales/tr.d.cts +0 -5
- package/node_modules/zod/v4/locales/tr.d.ts +0 -4
- package/node_modules/zod/v4/locales/tr.js +0 -110
- package/node_modules/zod/v4/locales/ua.cjs +0 -12
- package/node_modules/zod/v4/locales/ua.d.cts +0 -5
- package/node_modules/zod/v4/locales/ua.d.ts +0 -5
- package/node_modules/zod/v4/locales/ua.js +0 -5
- package/node_modules/zod/v4/locales/uk.cjs +0 -140
- package/node_modules/zod/v4/locales/uk.d.cts +0 -5
- package/node_modules/zod/v4/locales/uk.d.ts +0 -4
- package/node_modules/zod/v4/locales/uk.js +0 -113
- package/node_modules/zod/v4/locales/ur.cjs +0 -142
- package/node_modules/zod/v4/locales/ur.d.cts +0 -5
- package/node_modules/zod/v4/locales/ur.d.ts +0 -4
- package/node_modules/zod/v4/locales/ur.js +0 -115
- package/node_modules/zod/v4/locales/uz.cjs +0 -140
- package/node_modules/zod/v4/locales/uz.d.cts +0 -5
- package/node_modules/zod/v4/locales/uz.d.ts +0 -4
- package/node_modules/zod/v4/locales/uz.js +0 -113
- package/node_modules/zod/v4/locales/vi.cjs +0 -140
- package/node_modules/zod/v4/locales/vi.d.cts +0 -5
- package/node_modules/zod/v4/locales/vi.d.ts +0 -4
- package/node_modules/zod/v4/locales/vi.js +0 -113
- package/node_modules/zod/v4/locales/yo.cjs +0 -139
- package/node_modules/zod/v4/locales/yo.d.cts +0 -5
- package/node_modules/zod/v4/locales/yo.d.ts +0 -4
- package/node_modules/zod/v4/locales/yo.js +0 -112
- package/node_modules/zod/v4/locales/zh-CN.cjs +0 -141
- package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -5
- package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
- package/node_modules/zod/v4/locales/zh-CN.js +0 -114
- package/node_modules/zod/v4/locales/zh-TW.cjs +0 -139
- package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -5
- package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
- package/node_modules/zod/v4/locales/zh-TW.js +0 -112
- package/node_modules/zod/v4/mini/checks.cjs +0 -54
- package/node_modules/zod/v4/mini/checks.d.cts +0 -1
- package/node_modules/zod/v4/mini/checks.d.ts +0 -1
- package/node_modules/zod/v4/mini/checks.js +0 -1
- package/node_modules/zod/v4/mini/coerce.cjs +0 -71
- package/node_modules/zod/v4/mini/coerce.d.cts +0 -7
- package/node_modules/zod/v4/mini/coerce.d.ts +0 -7
- package/node_modules/zod/v4/mini/coerce.js +0 -22
- package/node_modules/zod/v4/mini/deep-partial.cjs +0 -58
- package/node_modules/zod/v4/mini/deep-partial.d.cts +0 -14
- package/node_modules/zod/v4/mini/deep-partial.d.ts +0 -14
- package/node_modules/zod/v4/mini/deep-partial.js +0 -13
- package/node_modules/zod/v4/mini/external.cjs +0 -95
- package/node_modules/zod/v4/mini/external.d.cts +0 -16
- package/node_modules/zod/v4/mini/external.d.ts +0 -16
- package/node_modules/zod/v4/mini/external.js +0 -16
- package/node_modules/zod/v4/mini/in-out.cjs +0 -82
- package/node_modules/zod/v4/mini/in-out.d.cts +0 -8
- package/node_modules/zod/v4/mini/in-out.d.ts +0 -8
- package/node_modules/zod/v4/mini/in-out.js +0 -36
- package/node_modules/zod/v4/mini/index.cjs +0 -51
- package/node_modules/zod/v4/mini/index.d.cts +0 -3
- package/node_modules/zod/v4/mini/index.d.ts +0 -3
- package/node_modules/zod/v4/mini/index.js +0 -3
- package/node_modules/zod/v4/mini/iso.cjs +0 -83
- package/node_modules/zod/v4/mini/iso.d.cts +0 -22
- package/node_modules/zod/v4/mini/iso.d.ts +0 -22
- package/node_modules/zod/v4/mini/iso.js +0 -34
- package/node_modules/zod/v4/mini/package.json +0 -7
- package/node_modules/zod/v4/mini/parse.cjs +0 -37
- package/node_modules/zod/v4/mini/parse.d.cts +0 -1
- package/node_modules/zod/v4/mini/parse.d.ts +0 -1
- package/node_modules/zod/v4/mini/parse.js +0 -1
- package/node_modules/zod/v4/mini/schemas.cjs +0 -1147
- package/node_modules/zod/v4/mini/schemas.d.cts +0 -480
- package/node_modules/zod/v4/mini/schemas.d.ts +0 -480
- package/node_modules/zod/v4/mini/schemas.js +0 -1002
- package/node_modules/zod/v4/package.json +0 -7
- package/node_modules/zod/v4-mini/index.cjs +0 -51
- package/node_modules/zod/v4-mini/index.d.cts +0 -3
- package/node_modules/zod/v4-mini/index.d.ts +0 -3
- package/node_modules/zod/v4-mini/index.js +0 -3
- package/node_modules/zod/v4-mini/package.json +0 -7
|
@@ -5,8 +5,7 @@ import { DEFAULT_CACHE_TTL_MINUTES, markdownToText, normalizeCacheKey, readCache
|
|
|
5
5
|
import { normalizeSecretInput } from "openclaw/plugin-sdk/secret-input";
|
|
6
6
|
import { truncateSanitizedExternalContent, wrapExternalContent, wrapWebContent } from "openclaw/plugin-sdk/security-runtime";
|
|
7
7
|
import { SsrFBlockedError, isBlockedHostnameOrIp, isPrivateIpAddress, resolvePinnedHostnameWithPolicy } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
8
|
-
import { asOptionalObjectRecord, asOptionalRecord, asRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
|
-
import { z } from "zod";
|
|
8
|
+
import { asBoolean, asOptionalObjectRecord, asOptionalRecord, asRecord, normalizeOptionalString, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
9
|
import { resolveReadOnlyEnvSecretRef } from "openclaw/plugin-sdk/secret-ref-readonly";
|
|
11
10
|
//#region \0rolldown/runtime.js
|
|
12
11
|
var __defProp = Object.defineProperty;
|
|
@@ -62,13 +61,10 @@ function resolveFirecrawlApiKey(cfg) {
|
|
|
62
61
|
function resolveFirecrawlBaseUrl(cfg) {
|
|
63
62
|
const search = resolveFirecrawlSearchConfig(cfg);
|
|
64
63
|
const fetch = resolveFirecrawlFetchConfig(cfg);
|
|
65
|
-
return (
|
|
64
|
+
return normalizeOptionalString(search?.baseUrl) || normalizeOptionalString(fetch?.baseUrl) || normalizeSecretInput(process.env.FIRECRAWL_BASE_URL) || "https://api.firecrawl.dev";
|
|
66
65
|
}
|
|
67
66
|
function resolveFirecrawlOnlyMainContent(cfg, override) {
|
|
68
|
-
|
|
69
|
-
const fetch = resolveFirecrawlFetchConfig(cfg);
|
|
70
|
-
if (typeof fetch?.onlyMainContent === "boolean") return fetch.onlyMainContent;
|
|
71
|
-
return true;
|
|
67
|
+
return asBoolean(override) ?? asBoolean(resolveFirecrawlFetchConfig(cfg)?.onlyMainContent) ?? true;
|
|
72
68
|
}
|
|
73
69
|
function resolveFirecrawlMaxAgeMs(cfg, override) {
|
|
74
70
|
return Math.floor(asNonNegativeFiniteNumber(override) ?? asNonNegativeFiniteNumber(resolveFirecrawlFetchConfig(cfg)?.maxAgeMs) ?? DEFAULT_FIRECRAWL_MAX_AGE_MS);
|
|
@@ -153,7 +149,7 @@ async function resolveEndpoint(baseUrl, pathname, lookupFn) {
|
|
|
153
149
|
}
|
|
154
150
|
async function postFirecrawlJson(params, parse) {
|
|
155
151
|
const apiKey = normalizeSecretInput(params.apiKey);
|
|
156
|
-
const result = await (
|
|
152
|
+
const result = await (params.mode === "selfHosted" ? withSelfHostedWebToolsEndpoint : withStrictWebToolsEndpoint)({
|
|
157
153
|
url: params.url,
|
|
158
154
|
timeoutSeconds: params.timeoutSeconds,
|
|
159
155
|
...params.signal ? { signal: params.signal } : {},
|
|
@@ -168,23 +164,13 @@ async function postFirecrawlJson(params, parse) {
|
|
|
168
164
|
}, async ({ response }) => {
|
|
169
165
|
if (!response.ok) {
|
|
170
166
|
let detail = typeof response.statusText === "string" && response.statusText.trim() ? response.statusText.trim() : "request failed";
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
const payload = JSON.parse(body.text);
|
|
177
|
-
return asOptionalRecord(payload) ?? null;
|
|
178
|
-
} catch {
|
|
179
|
-
return null;
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
const payload = await readJsonPayload();
|
|
167
|
+
const errorBody = await readResponseText(response, { maxBytes: 64e3 });
|
|
168
|
+
let payload;
|
|
169
|
+
try {
|
|
170
|
+
payload = asOptionalRecord(JSON.parse(errorBody.text));
|
|
171
|
+
} catch {}
|
|
183
172
|
if (payload) detail = typeof payload.error === "string" ? payload.error : typeof payload.message === "string" ? payload.message : detail;
|
|
184
|
-
else
|
|
185
|
-
const errorBody = await readResponseText(response, { maxBytes: 64e3 });
|
|
186
|
-
if (errorBody.text) detail = errorBody.text;
|
|
187
|
-
}
|
|
173
|
+
else if (errorBody.text) detail = errorBody.text;
|
|
188
174
|
const safeDetail = wrapWebContent(truncateSanitizedExternalContent(detail, 1e3).text, "web_fetch");
|
|
189
175
|
throw new ProviderHttpError(`${params.errorLabel} API error (${response.status}): ${safeDetail}`, { status: response.status });
|
|
190
176
|
}
|
|
@@ -209,28 +195,6 @@ function isValidFirecrawlPublishedDate(value) {
|
|
|
209
195
|
const timestamp = parseDateStringTimestampMs(calendarDate);
|
|
210
196
|
return timestamp !== void 0 && new Date(timestamp).toISOString().startsWith(calendarDate);
|
|
211
197
|
}
|
|
212
|
-
const optionalFirecrawlStringSchema = z.string().optional().catch(void 0);
|
|
213
|
-
const firecrawlSearchMetadataSchema = z.object({
|
|
214
|
-
sourceURL: optionalFirecrawlStringSchema,
|
|
215
|
-
title: optionalFirecrawlStringSchema,
|
|
216
|
-
publishedTime: optionalFirecrawlStringSchema,
|
|
217
|
-
publishedDate: optionalFirecrawlStringSchema
|
|
218
|
-
}).optional().catch(void 0);
|
|
219
|
-
const firecrawlSearchItemSchema = z.object({
|
|
220
|
-
url: optionalFirecrawlStringSchema,
|
|
221
|
-
sourceURL: optionalFirecrawlStringSchema,
|
|
222
|
-
sourceUrl: optionalFirecrawlStringSchema,
|
|
223
|
-
title: optionalFirecrawlStringSchema,
|
|
224
|
-
description: optionalFirecrawlStringSchema,
|
|
225
|
-
snippet: optionalFirecrawlStringSchema,
|
|
226
|
-
summary: optionalFirecrawlStringSchema,
|
|
227
|
-
markdown: optionalFirecrawlStringSchema,
|
|
228
|
-
content: optionalFirecrawlStringSchema,
|
|
229
|
-
text: optionalFirecrawlStringSchema,
|
|
230
|
-
publishedDate: optionalFirecrawlStringSchema,
|
|
231
|
-
published: optionalFirecrawlStringSchema,
|
|
232
|
-
metadata: firecrawlSearchMetadataSchema
|
|
233
|
-
});
|
|
234
198
|
function resolveSearchItems(payload, count) {
|
|
235
199
|
const nestedData = asOptionalRecord(payload.data);
|
|
236
200
|
const rawItems = [
|
|
@@ -246,17 +210,16 @@ function resolveSearchItems(payload, count) {
|
|
|
246
210
|
let inspectedObjects = 0;
|
|
247
211
|
for (const rawItem of rawItems) {
|
|
248
212
|
if (inspectedObjects >= FIRECRAWL_SEARCH_MAX_RESULTS || items.length >= count) break;
|
|
249
|
-
const
|
|
250
|
-
if (!
|
|
213
|
+
const entry = asOptionalRecord(rawItem);
|
|
214
|
+
if (!entry) continue;
|
|
251
215
|
inspectedObjects += 1;
|
|
252
|
-
const
|
|
253
|
-
const
|
|
254
|
-
const url = normalizeFirecrawlResultUrl(entry.url || entry.sourceURL || entry.sourceUrl || metadata?.sourceURL || "");
|
|
216
|
+
const metadata = asOptionalRecord(entry.metadata);
|
|
217
|
+
const url = normalizeFirecrawlResultUrl(readStringField(entry, "url") || readStringField(entry, "sourceURL") || readStringField(entry, "sourceUrl") || readStringField(metadata, "sourceURL") || "");
|
|
255
218
|
if (!url) continue;
|
|
256
|
-
const title = entry
|
|
257
|
-
const description = entry
|
|
258
|
-
const content = entry
|
|
259
|
-
const rawPublished = entry
|
|
219
|
+
const title = readStringField(entry, "title") || readStringField(metadata, "title") || "";
|
|
220
|
+
const description = readStringField(entry, "description") || readStringField(entry, "snippet") || readStringField(entry, "summary") || void 0;
|
|
221
|
+
const content = readStringField(entry, "markdown") || readStringField(entry, "content") || readStringField(entry, "text") || void 0;
|
|
222
|
+
const rawPublished = readStringField(entry, "publishedDate") || readStringField(entry, "published") || readStringField(metadata, "publishedTime") || readStringField(metadata, "publishedDate") || void 0;
|
|
260
223
|
const published = rawPublished && isValidFirecrawlPublishedDate(rawPublished) ? rawPublished : void 0;
|
|
261
224
|
items.push({
|
|
262
225
|
title,
|
|
@@ -269,38 +232,6 @@ function resolveSearchItems(payload, count) {
|
|
|
269
232
|
}
|
|
270
233
|
return items;
|
|
271
234
|
}
|
|
272
|
-
function buildSearchPayload(params) {
|
|
273
|
-
let remainingContentChars = FIRECRAWL_SEARCH_MAX_CONTENT_CHARS;
|
|
274
|
-
let truncated = false;
|
|
275
|
-
const wrapBoundedContent = (value) => {
|
|
276
|
-
const bounded = truncateSanitizedExternalContent(value, remainingContentChars);
|
|
277
|
-
truncated ||= bounded.truncated;
|
|
278
|
-
remainingContentChars -= bounded.text.length;
|
|
279
|
-
return wrapWebContent(bounded.text, "web_search");
|
|
280
|
-
};
|
|
281
|
-
const results = params.items.map((entry) => ({
|
|
282
|
-
title: entry.title ? wrapBoundedContent(entry.title) : "",
|
|
283
|
-
url: entry.url,
|
|
284
|
-
description: entry.description ? wrapBoundedContent(entry.description) : "",
|
|
285
|
-
...entry.published ? { published: entry.published } : {},
|
|
286
|
-
...entry.siteName ? { siteName: entry.siteName } : {},
|
|
287
|
-
...params.scrapeResults && entry.content ? { content: wrapBoundedContent(entry.content) } : {}
|
|
288
|
-
}));
|
|
289
|
-
return {
|
|
290
|
-
query: params.query,
|
|
291
|
-
provider: params.provider,
|
|
292
|
-
count: params.items.length,
|
|
293
|
-
tookMs: params.tookMs,
|
|
294
|
-
externalContent: {
|
|
295
|
-
untrusted: true,
|
|
296
|
-
source: "web_search",
|
|
297
|
-
provider: params.provider,
|
|
298
|
-
wrapped: true
|
|
299
|
-
},
|
|
300
|
-
results,
|
|
301
|
-
...truncated ? { truncated: true } : {}
|
|
302
|
-
};
|
|
303
|
-
}
|
|
304
235
|
async function runFirecrawlSearch(params) {
|
|
305
236
|
params.signal?.throwIfAborted();
|
|
306
237
|
const keyless = params.access === "keyless";
|
|
@@ -345,19 +276,19 @@ async function runFirecrawlSearch(params) {
|
|
|
345
276
|
};
|
|
346
277
|
const body = {
|
|
347
278
|
query: params.query,
|
|
348
|
-
limit: count
|
|
279
|
+
limit: count,
|
|
280
|
+
...sources.length > 0 ? { sources } : {},
|
|
281
|
+
...categories.length > 0 ? { categories } : {},
|
|
282
|
+
...includeDomains.length > 0 ? { includeDomains } : {},
|
|
283
|
+
...excludeDomains.length > 0 ? { excludeDomains } : {},
|
|
284
|
+
...tbs ? { tbs } : {},
|
|
285
|
+
...location ? { location } : {},
|
|
286
|
+
...country ? { country } : {},
|
|
287
|
+
...scrapeResults ? { scrapeOptions: { formats: ["markdown"] } } : {}
|
|
349
288
|
};
|
|
350
|
-
if (sources.length > 0) body.sources = sources;
|
|
351
|
-
if (categories.length > 0) body.categories = categories;
|
|
352
|
-
if (includeDomains.length > 0) body.includeDomains = includeDomains;
|
|
353
|
-
if (excludeDomains.length > 0) body.excludeDomains = excludeDomains;
|
|
354
|
-
if (tbs) body.tbs = tbs;
|
|
355
|
-
if (location) body.location = location;
|
|
356
|
-
if (country) body.country = country;
|
|
357
|
-
if (scrapeResults) body.scrapeOptions = { formats: ["markdown"] };
|
|
358
289
|
const start = Date.now();
|
|
359
290
|
const endpoint = await resolveEndpoint(baseUrl, "/v2/search");
|
|
360
|
-
const
|
|
291
|
+
const items = resolveSearchItems(await postFirecrawlJson({
|
|
361
292
|
url: endpoint.url,
|
|
362
293
|
mode: endpoint.mode,
|
|
363
294
|
timeoutSeconds,
|
|
@@ -373,14 +304,38 @@ async function runFirecrawlSearch(params) {
|
|
|
373
304
|
throw new Error(`Firecrawl Search API error: ${safeError}`);
|
|
374
305
|
}
|
|
375
306
|
return payloadValue;
|
|
376
|
-
});
|
|
377
|
-
const
|
|
307
|
+
}), count);
|
|
308
|
+
const tookMs = Date.now() - start;
|
|
309
|
+
let remainingContentChars = FIRECRAWL_SEARCH_MAX_CONTENT_CHARS;
|
|
310
|
+
let truncated = false;
|
|
311
|
+
const wrapBoundedContent = (value) => {
|
|
312
|
+
const bounded = truncateSanitizedExternalContent(value, remainingContentChars);
|
|
313
|
+
truncated ||= bounded.truncated;
|
|
314
|
+
remainingContentChars -= bounded.text.length;
|
|
315
|
+
return wrapWebContent(bounded.text, "web_search");
|
|
316
|
+
};
|
|
317
|
+
const results = items.map((entry) => ({
|
|
318
|
+
title: entry.title ? wrapBoundedContent(entry.title) : "",
|
|
319
|
+
url: entry.url,
|
|
320
|
+
description: entry.description ? wrapBoundedContent(entry.description) : "",
|
|
321
|
+
...entry.published ? { published: entry.published } : {},
|
|
322
|
+
...entry.siteName ? { siteName: entry.siteName } : {},
|
|
323
|
+
...scrapeResults && entry.content ? { content: wrapBoundedContent(entry.content) } : {}
|
|
324
|
+
}));
|
|
325
|
+
const result = {
|
|
378
326
|
query: params.query,
|
|
379
327
|
provider: providerId,
|
|
380
|
-
|
|
381
|
-
tookMs
|
|
382
|
-
|
|
383
|
-
|
|
328
|
+
count: items.length,
|
|
329
|
+
tookMs,
|
|
330
|
+
externalContent: {
|
|
331
|
+
untrusted: true,
|
|
332
|
+
source: "web_search",
|
|
333
|
+
provider: providerId,
|
|
334
|
+
wrapped: true
|
|
335
|
+
},
|
|
336
|
+
results,
|
|
337
|
+
...truncated ? { truncated: true } : {}
|
|
338
|
+
};
|
|
384
339
|
writeCache(SEARCH_CACHE, cacheKey, result, cacheTtlMs);
|
|
385
340
|
return result;
|
|
386
341
|
}
|
|
@@ -476,7 +431,6 @@ async function runFirecrawlScrape(params) {
|
|
|
476
431
|
const testing = {
|
|
477
432
|
assertFirecrawlScrapeTargetAllowed,
|
|
478
433
|
parseFirecrawlScrapePayload,
|
|
479
|
-
postFirecrawlJson,
|
|
480
434
|
resolveEndpoint,
|
|
481
435
|
resolveSearchItems
|
|
482
436
|
};
|
package/dist/.setup/{firecrawl-fetch-provider-Cq_h8okw.mjs → firecrawl-fetch-provider-CcYAp_u6.mjs}
RENAMED
|
@@ -51,7 +51,7 @@ const FIRECRAWL_WEB_FETCH_PROVIDER_SHARED = {
|
|
|
51
51
|
};
|
|
52
52
|
//#endregion
|
|
53
53
|
//#region extensions/firecrawl/src/firecrawl-fetch-provider.ts
|
|
54
|
-
const loadFirecrawlClientModule = createLazyRuntimeModule(() => import("./firecrawl-client-
|
|
54
|
+
const loadFirecrawlClientModule = createLazyRuntimeModule(() => import("./firecrawl-client-Bqyr6x90.mjs").then((n) => n.t));
|
|
55
55
|
function createFirecrawlWebFetchProvider() {
|
|
56
56
|
return {
|
|
57
57
|
...FIRECRAWL_WEB_FETCH_PROVIDER_SHARED,
|
|
@@ -4,7 +4,7 @@ import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
|
4
4
|
import { createWebSearchProviderContractFields, enablePluginInConfig } from "openclaw/plugin-sdk/provider-web-search-contract";
|
|
5
5
|
//#region extensions/firecrawl/src/firecrawl-search-provider.ts
|
|
6
6
|
const FIRECRAWL_CREDENTIAL_PATH = "plugins.entries.firecrawl.config.webSearch.apiKey";
|
|
7
|
-
const loadFirecrawlClientModule = createLazyRuntimeModule(() => import("./firecrawl-client-
|
|
7
|
+
const loadFirecrawlClientModule = createLazyRuntimeModule(() => import("./firecrawl-client-Bqyr6x90.mjs").then((n) => n.t));
|
|
8
8
|
const GenericFirecrawlSearchSchema = {
|
|
9
9
|
type: "object",
|
|
10
10
|
properties: {
|
package/dist/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as runFirecrawlScrape } from "./.setup/firecrawl-client-
|
|
1
|
+
import { n as runFirecrawlScrape } from "./.setup/firecrawl-client-Bqyr6x90.mjs";
|
|
2
2
|
import { readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
//#region extensions/firecrawl/api.ts
|
|
4
4
|
async function fetchFirecrawlContent(params) {
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as runFirecrawlScrape, r as runFirecrawlSearch } from "./.setup/firecrawl-client-
|
|
2
|
-
import { t as createFirecrawlWebFetchProvider } from "./.setup/firecrawl-fetch-provider-
|
|
3
|
-
import { n as createFirecrawlWebSearchProvider, t as createFirecrawlFreeWebSearchProvider } from "./.setup/firecrawl-search-provider-
|
|
1
|
+
import { n as runFirecrawlScrape, r as runFirecrawlSearch } from "./.setup/firecrawl-client-Bqyr6x90.mjs";
|
|
2
|
+
import { t as createFirecrawlWebFetchProvider } from "./.setup/firecrawl-fetch-provider-CcYAp_u6.mjs";
|
|
3
|
+
import { n as createFirecrawlWebSearchProvider, t as createFirecrawlFreeWebSearchProvider } from "./.setup/firecrawl-search-provider-lAiZ3IJ5.mjs";
|
|
4
4
|
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
5
5
|
import { optionalStringEnum } from "openclaw/plugin-sdk/channel-actions";
|
|
6
6
|
import { jsonResult, readNonNegativeIntegerParam, readPositiveIntegerParam, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/provider-web-search";
|
|
@@ -93,33 +93,22 @@ function createFirecrawlSearchTool(api) {
|
|
|
93
93
|
parameters: FirecrawlSearchToolSchema,
|
|
94
94
|
execute: async (_toolCallId, rawParams, signal) => {
|
|
95
95
|
signal?.throwIfAborted();
|
|
96
|
-
const query = readStringParam(rawParams, "query", { required: true });
|
|
97
|
-
const count = readPositiveIntegerParam(rawParams, "count", {
|
|
98
|
-
max: 100,
|
|
99
|
-
message: "count must be an integer from 1 to 100"
|
|
100
|
-
});
|
|
101
|
-
const timeoutSeconds = readPositiveIntegerParam(rawParams, "timeoutSeconds");
|
|
102
|
-
const sources = readStringArrayParam(rawParams, "sources");
|
|
103
|
-
const categories = readStringArrayParam(rawParams, "categories");
|
|
104
|
-
const includeDomains = readStringArrayParam(rawParams, "includeDomains");
|
|
105
|
-
const excludeDomains = readStringArrayParam(rawParams, "excludeDomains");
|
|
106
|
-
const tbs = readStringParam(rawParams, "tbs");
|
|
107
|
-
const location = readStringParam(rawParams, "location");
|
|
108
|
-
const country = readStringParam(rawParams, "country");
|
|
109
|
-
const scrapeResults = rawParams.scrapeResults === true;
|
|
110
96
|
return jsonResult(await runFirecrawlSearch({
|
|
97
|
+
query: readStringParam(rawParams, "query", { required: true }),
|
|
98
|
+
count: readPositiveIntegerParam(rawParams, "count", {
|
|
99
|
+
max: 100,
|
|
100
|
+
message: "count must be an integer from 1 to 100"
|
|
101
|
+
}),
|
|
102
|
+
timeoutSeconds: readPositiveIntegerParam(rawParams, "timeoutSeconds"),
|
|
103
|
+
sources: readStringArrayParam(rawParams, "sources"),
|
|
104
|
+
categories: readStringArrayParam(rawParams, "categories"),
|
|
105
|
+
includeDomains: readStringArrayParam(rawParams, "includeDomains"),
|
|
106
|
+
excludeDomains: readStringArrayParam(rawParams, "excludeDomains"),
|
|
107
|
+
tbs: readStringParam(rawParams, "tbs"),
|
|
108
|
+
location: readStringParam(rawParams, "location"),
|
|
109
|
+
country: readStringParam(rawParams, "country"),
|
|
110
|
+
scrapeResults: rawParams.scrapeResults === true,
|
|
111
111
|
cfg: api.config,
|
|
112
|
-
query,
|
|
113
|
-
count,
|
|
114
|
-
timeoutSeconds,
|
|
115
|
-
sources,
|
|
116
|
-
categories,
|
|
117
|
-
includeDomains,
|
|
118
|
-
excludeDomains,
|
|
119
|
-
tbs,
|
|
120
|
-
location,
|
|
121
|
-
country,
|
|
122
|
-
scrapeResults,
|
|
123
112
|
...signal ? { signal } : {}
|
|
124
113
|
}));
|
|
125
114
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as createFirecrawlWebFetchProvider } from "./.setup/firecrawl-fetch-provider-
|
|
1
|
+
import { t as createFirecrawlWebFetchProvider } from "./.setup/firecrawl-fetch-provider-CcYAp_u6.mjs";
|
|
2
2
|
import "./web-fetch-provider.js";
|
|
3
3
|
export { createFirecrawlWebFetchProvider };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createFirecrawlWebFetchProvider } from "./.setup/firecrawl-fetch-provider-
|
|
1
|
+
import { t as createFirecrawlWebFetchProvider } from "./.setup/firecrawl-fetch-provider-CcYAp_u6.mjs";
|
|
2
2
|
export { createFirecrawlWebFetchProvider };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as createFirecrawlWebSearchProvider, t as createFirecrawlFreeWebSearchProvider } from "./.setup/firecrawl-search-provider-
|
|
1
|
+
import { n as createFirecrawlWebSearchProvider, t as createFirecrawlFreeWebSearchProvider } from "./.setup/firecrawl-search-provider-lAiZ3IJ5.mjs";
|
|
2
2
|
import "./web-search-provider.js";
|
|
3
3
|
export { createFirecrawlFreeWebSearchProvider, createFirecrawlWebSearchProvider };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createFirecrawlWebSearchProvider, t as createFirecrawlFreeWebSearchProvider } from "./.setup/firecrawl-search-provider-
|
|
1
|
+
import { n as createFirecrawlWebSearchProvider, t as createFirecrawlFreeWebSearchProvider } from "./.setup/firecrawl-search-provider-lAiZ3IJ5.mjs";
|
|
2
2
|
export { createFirecrawlFreeWebSearchProvider, createFirecrawlWebSearchProvider };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/firecrawl-plugin",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.10.1-beta.1",
|
|
4
4
|
"description": "OpenClaw Firecrawl plugin.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"typebox": "1.3.34"
|
|
12
|
-
"zod": "4.6.5"
|
|
11
|
+
"typebox": "1.3.34"
|
|
13
12
|
},
|
|
14
13
|
"openclaw": {
|
|
15
14
|
"extensions": [
|
|
@@ -22,10 +21,10 @@
|
|
|
22
21
|
"minHostVersion": ">=2026.6.8"
|
|
23
22
|
},
|
|
24
23
|
"compat": {
|
|
25
|
-
"pluginApi": ">=2026.
|
|
24
|
+
"pluginApi": ">=2026.10.1-beta.1"
|
|
26
25
|
},
|
|
27
26
|
"build": {
|
|
28
|
-
"openclawVersion": "2026.
|
|
27
|
+
"openclawVersion": "2026.10.1-beta.1",
|
|
29
28
|
"bundledDist": false
|
|
30
29
|
},
|
|
31
30
|
"release": {
|
|
@@ -44,7 +43,7 @@
|
|
|
44
43
|
"assets/activity.svg"
|
|
45
44
|
],
|
|
46
45
|
"peerDependencies": {
|
|
47
|
-
"openclaw": ">=2026.
|
|
46
|
+
"openclaw": ">=2026.10.1-beta.1"
|
|
48
47
|
},
|
|
49
48
|
"peerDependenciesMeta": {
|
|
50
49
|
"openclaw": {
|
|
@@ -52,7 +51,6 @@
|
|
|
52
51
|
}
|
|
53
52
|
},
|
|
54
53
|
"bundledDependencies": [
|
|
55
|
-
"typebox"
|
|
56
|
-
"zod"
|
|
54
|
+
"typebox"
|
|
57
55
|
]
|
|
58
56
|
}
|
package/node_modules/zod/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Colin McDonnell
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="logo.svg" width="200px" align="center" alt="Zod logo" />
|
|
3
|
-
<h1 align="center">Zod</h1>
|
|
4
|
-
<p align="center">
|
|
5
|
-
TypeScript-first schema validation with static type inference
|
|
6
|
-
<br/>
|
|
7
|
-
by <a href="https://x.com/colinhacks">@colinhacks</a>
|
|
8
|
-
</p>
|
|
9
|
-
</p>
|
|
10
|
-
<br/>
|
|
11
|
-
|
|
12
|
-
<p align="center">
|
|
13
|
-
<a href="https://github.com/colinhacks/zod/actions?query=branch%3Amain"><img src="https://github.com/colinhacks/zod/actions/workflows/test.yml/badge.svg?event=push&branch=main" alt="Zod CI status" /></a>
|
|
14
|
-
<a href="https://opensource.org/licenses/MIT" rel="nofollow"><img src="https://img.shields.io/github/license/colinhacks/zod" alt="License"></a>
|
|
15
|
-
<a href="https://www.npmjs.com/package/zod" rel="nofollow"><img src="https://img.shields.io/npm/dw/zod.svg" alt="npm"></a>
|
|
16
|
-
<a href="https://discord.gg/KaSRdyX2vc" rel="nofollow"><img src="https://img.shields.io/discord/893487829802418277?label=Discord&logo=discord&logoColor=white" alt="discord server"></a>
|
|
17
|
-
<a href="https://github.com/colinhacks/zod" rel="nofollow"><img src="https://img.shields.io/github/stars/colinhacks/zod" alt="stars"></a>
|
|
18
|
-
</p>
|
|
19
|
-
|
|
20
|
-
<div align="center">
|
|
21
|
-
<a href="https://zod.dev/api">Docs</a>
|
|
22
|
-
<span> • </span>
|
|
23
|
-
<a href="https://discord.gg/RcG33DQJdf">Discord</a>
|
|
24
|
-
<span> • </span>
|
|
25
|
-
<a href="https://twitter.com/colinhacks">𝕏</a>
|
|
26
|
-
<span> • </span>
|
|
27
|
-
<a href="https://bsky.app/profile/zod.dev">Bluesky</a>
|
|
28
|
-
<br />
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
<br/>
|
|
32
|
-
<br/>
|
|
33
|
-
|
|
34
|
-
### [Read the docs →](https://zod.dev/api)
|
|
35
|
-
|
|
36
|
-
<br/>
|
|
37
|
-
<br/>
|
|
38
|
-
|
|
39
|
-
## What is Zod?
|
|
40
|
-
|
|
41
|
-
Zod is a TypeScript-first validation library. Define a schema and parse some data with it. You'll get back a strongly typed, validated result.
|
|
42
|
-
|
|
43
|
-
```ts
|
|
44
|
-
import * as z from "zod";
|
|
45
|
-
|
|
46
|
-
const User = z.object({
|
|
47
|
-
name: z.string(),
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
// some untrusted data...
|
|
51
|
-
const input = {
|
|
52
|
-
/* stuff */
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
// the parsed result is validated and type safe!
|
|
56
|
-
const data = User.parse(input);
|
|
57
|
-
|
|
58
|
-
// so you can use it with confidence :)
|
|
59
|
-
console.log(data.name);
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
<br/>
|
|
63
|
-
|
|
64
|
-
## Features
|
|
65
|
-
|
|
66
|
-
- Zero external dependencies
|
|
67
|
-
- Works in Node.js and all modern browsers
|
|
68
|
-
- Tiny: `2kb` core bundle (gzipped)
|
|
69
|
-
- Immutable API: methods return a new instance
|
|
70
|
-
- Concise interface
|
|
71
|
-
- Works with TypeScript and plain JS
|
|
72
|
-
- Built-in JSON Schema conversion
|
|
73
|
-
- Extensive ecosystem
|
|
74
|
-
|
|
75
|
-
<br/>
|
|
76
|
-
|
|
77
|
-
## Installation
|
|
78
|
-
|
|
79
|
-
```sh
|
|
80
|
-
npm install zod
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
<br/>
|
|
84
|
-
|
|
85
|
-
## Basic usage
|
|
86
|
-
|
|
87
|
-
Before you can do anything else, you need to define a schema. For the purposes of this guide, we'll use a simple object schema.
|
|
88
|
-
|
|
89
|
-
```ts
|
|
90
|
-
import * as z from "zod";
|
|
91
|
-
|
|
92
|
-
const Player = z.object({
|
|
93
|
-
username: z.string(),
|
|
94
|
-
xp: z.number(),
|
|
95
|
-
});
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### Parsing data
|
|
99
|
-
|
|
100
|
-
Given any Zod schema, use `.parse` to validate an input. If it's valid, Zod returns a strongly-typed _deep clone_ of the input.
|
|
101
|
-
|
|
102
|
-
```ts
|
|
103
|
-
Player.parse({ username: "billie", xp: 100 });
|
|
104
|
-
// => returns { username: "billie", xp: 100 }
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
**Note** — If your schema uses certain asynchronous APIs like `async` [refinements](https://zod.dev/api#refinements) or [transforms](https://zod.dev/api#transforms), you'll need to use the `.parseAsync()` method instead.
|
|
108
|
-
|
|
109
|
-
```ts
|
|
110
|
-
const schema = z.string().refine(async (val) => val.length <= 8);
|
|
111
|
-
|
|
112
|
-
await schema.parseAsync("hello");
|
|
113
|
-
// => "hello"
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
### AOT compilation
|
|
117
|
-
|
|
118
|
-
For hot validation paths, `z.compile(schema)` returns a schema clone with an ahead-of-time compiled fast path. Valid inputs take the compiled path; invalid inputs fall back to the regular parser so error reporting stays identical.
|
|
119
|
-
|
|
120
|
-
Across a 55-schema benchmark the median speedup is **2.4x**, and it scales with how much work the schema does per parse: a large array of objects is ~9x, a 20-key object ~9x, a nested object ~4.5x, while a bare `z.string()` gains nothing — compilation removes per-node dispatch and allocation, and a single `typeof` has none to remove.
|
|
121
|
-
|
|
122
|
-
```ts
|
|
123
|
-
const CompiledPlayer = z.compile(Player);
|
|
124
|
-
|
|
125
|
-
CompiledPlayer.parse({ username: "billie", xp: 100 });
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
To enable compilation globally for schemas constructed after import:
|
|
129
|
-
|
|
130
|
-
```ts
|
|
131
|
-
import "zod/compile"; // place before modules that define schemas
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
Things to know:
|
|
135
|
-
|
|
136
|
-
- Compilation uses `new Function`. Global mode is automatically disabled when `z.config({ jitless: true })` is set (e.g. CSP environments); calling `z.compile()` directly is an explicit opt-in.
|
|
137
|
-
- Schemas with async refinements or transforms can't be compiled, and neither can a few other constructs. That is not an error: `z.compile()` hands the schema back unchanged and it keeps using the regular parser, exactly as global mode leaves it. Pass `{ strict: true }` to throw `ZodCompileAsyncError` / `ZodCompileUnsupportedError` instead.
|
|
138
|
-
- On invalid input, refinements and transforms may run twice (fast path, then fallback).
|
|
139
|
-
- Deriving a new schema from a compiled one (`.refine()`, `.extend()`, etc.) returns an uncompiled schema — compile the final schema.
|
|
140
|
-
|
|
141
|
-
See [`compile` docs](https://zod.dev/compile) for details.
|
|
142
|
-
|
|
143
|
-
### Handling errors
|
|
144
|
-
|
|
145
|
-
When validation fails, the `.parse()` method will throw a `ZodError` instance with granular information about the validation issues.
|
|
146
|
-
|
|
147
|
-
```ts
|
|
148
|
-
try {
|
|
149
|
-
Player.parse({ username: 42, xp: "100" });
|
|
150
|
-
} catch (err) {
|
|
151
|
-
if (err instanceof z.ZodError) {
|
|
152
|
-
err.issues;
|
|
153
|
-
/* [
|
|
154
|
-
{
|
|
155
|
-
expected: 'string',
|
|
156
|
-
code: 'invalid_type',
|
|
157
|
-
path: [ 'username' ],
|
|
158
|
-
message: 'Invalid input: expected string, received number'
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
expected: 'number',
|
|
162
|
-
code: 'invalid_type',
|
|
163
|
-
path: [ 'xp' ],
|
|
164
|
-
message: 'Invalid input: expected number, received string'
|
|
165
|
-
}
|
|
166
|
-
] */
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
To avoid a `try/catch` block, you can use the `.safeParse()` method to get back a plain result object containing either the successfully parsed data or a `ZodError`. The result type is a [discriminated union](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#discriminated-unions), so you can handle both cases conveniently.
|
|
172
|
-
|
|
173
|
-
```ts
|
|
174
|
-
const result = Player.safeParse({ username: 42, xp: "100" });
|
|
175
|
-
if (!result.success) {
|
|
176
|
-
result.error; // ZodError instance
|
|
177
|
-
} else {
|
|
178
|
-
result.data; // { username: string; xp: number }
|
|
179
|
-
}
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
**Note** — If your schema uses certain asynchronous APIs like `async` [refinements](https://zod.dev/api#refinements) or [transforms](https://zod.dev/api#transforms), you'll need to use the `.safeParseAsync()` method instead.
|
|
183
|
-
|
|
184
|
-
```ts
|
|
185
|
-
const schema = z.string().refine(async (val) => val.length <= 8);
|
|
186
|
-
|
|
187
|
-
await schema.safeParseAsync("hello");
|
|
188
|
-
// => { success: true; data: "hello" }
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
### Inferring types
|
|
192
|
-
|
|
193
|
-
Zod infers a static type from your schema definitions. You can extract this type with the `z.infer<>` utility and use it however you like.
|
|
194
|
-
|
|
195
|
-
```ts
|
|
196
|
-
const Player = z.object({
|
|
197
|
-
username: z.string(),
|
|
198
|
-
xp: z.number(),
|
|
199
|
-
});
|
|
200
|
-
|
|
201
|
-
// extract the inferred type
|
|
202
|
-
type Player = z.infer<typeof Player>;
|
|
203
|
-
|
|
204
|
-
// use it in your code
|
|
205
|
-
const player: Player = { username: "billie", xp: 100 };
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
In some cases, the input & output types of a schema can diverge. For instance, the `.transform()` API can convert the input from one type to another. In these cases, you can extract the input and output types independently:
|
|
209
|
-
|
|
210
|
-
```ts
|
|
211
|
-
const mySchema = z.string().transform((val) => val.length);
|
|
212
|
-
|
|
213
|
-
type MySchemaIn = z.input<typeof mySchema>;
|
|
214
|
-
// => string
|
|
215
|
-
|
|
216
|
-
type MySchemaOut = z.output<typeof mySchema>; // equivalent to z.infer<typeof mySchema>
|
|
217
|
-
// number
|
|
218
|
-
```
|