@openclaw/whatsapp 2026.9.3 → 2026.9.5
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/assets/activity.svg +40 -0
- package/assets/icon.png +0 -0
- package/dist/{accounts-CiKHiuEe.js → .setup/accounts-D_NGDjCx.mjs} +2 -2
- package/dist/{action-runtime-CRZLhN3f.js → .setup/action-runtime-DZZFamfl.mjs} +3 -3
- package/dist/{active-listener-BEjWsCNM.js → .setup/active-listener-CDjoX9QR.mjs} +2 -2
- package/dist/{agent-tools-login-B-2qZPzc.js → .setup/agent-tools-login-B6MAs75N.mjs} +2 -2
- package/dist/{approval-handler.runtime-DGJEaoqh.js → .setup/approval-handler.runtime-C0hzmMSj.mjs} +12 -12
- package/dist/{approval-reactions-DSFH6Mtx.js → .setup/approval-reactions-BnXw-UZI.mjs} +13 -13
- package/dist/{auth-store-ZWaclAbd.js → .setup/auth-store-Dh8a3cba.mjs} +5 -5
- package/dist/{channel-BeBrHPVa.js → .setup/channel-CSclZYjU.mjs} +21 -29
- package/dist/{channel-react-action-CHeJSG9F.js → .setup/channel-react-action-1iBiEnq7.mjs} +5 -5
- package/dist/.setup/channel.runtime-ddGY37w8.mjs +16 -0
- package/dist/.setup/channel.setup-CqUl8COe.mjs +5 -0
- package/dist/{connection-controller-DNp6U1NN.js → .setup/connection-controller-C60mU7j7.mjs} +5 -5
- package/dist/{connection-controller-runtime-context-DG0tuYuw.js → .setup/connection-controller-runtime-context-hgLJoRc8.mjs} +1 -1
- package/dist/{directory-config-CoWFw1zn.js → .setup/directory-config-BHPoBklt.mjs} +8 -8
- package/dist/{group-session-key-BmVDSPr1.js → .setup/group-session-key-D22hYMdE.mjs} +5 -5
- package/dist/.setup/legacy-session-surface-api-B2szjq4r.mjs +2 -0
- package/dist/{login-6j2iP9nR.js → .setup/login-2dmd1TfE.mjs} +5 -5
- package/dist/{login-qr-DRFgI6k1.js → .setup/login-qr-CgKtO_ef.mjs} +6 -6
- package/dist/{monitor-DNGfO3k0.js → .setup/monitor-BblvzLpX.mjs} +72 -89
- package/dist/.setup/normalize-DdsROMMa.mjs +2 -0
- package/dist/{normalize-target-CugRyONv.js → .setup/normalize-target-BGra1ZnM.mjs} +8 -30
- package/dist/{question-reactions-bbe0Qnjn.js → .setup/question-reactions-D3Zq9Gbn.mjs} +2 -2
- package/dist/{resolve-outbound-target-1GqbT1uX.js → .setup/resolve-outbound-target-C2eUvsTc.mjs} +1 -1
- package/dist/{send-BDDGPxav.js → .setup/send-C6jDmcL9.mjs} +7 -7
- package/dist/{send-api-C_Zn4Ij-.js → .setup/send-api-B4DOt2RJ.mjs} +7 -7
- package/dist/{session.runtime-Nsqaehbd.js → .setup/session.runtime-DcJuO42v.mjs} +1 -1
- package/dist/{setup-finalize-Bp-4QnVw.js → .setup/setup-finalize-BYEgU0hb.mjs} +6 -6
- package/dist/.setup/setup-plugin-api-CXfU-7vN.mjs +3 -0
- package/dist/{setup-surface-B5UnuLT_.js → .setup/setup-surface-Cd3wN5HD.mjs} +4 -4
- package/dist/{shared-D6cUWXiq.js → .setup/shared-C9OEtKgc.mjs} +48 -60
- package/dist/{socket-close-B3X9uerq.js → .setup/socket-close-CCVSFufF.mjs} +4 -4
- package/dist/{text-runtime-DyfmcATV.js → .setup/text-runtime-CHl0iPYe.mjs} +1 -1
- package/dist/action-runtime-api.js +1 -1
- package/dist/action-runtime.runtime.js +1 -1
- package/dist/agent-tools-api.js +4 -4
- package/dist/api.js +15 -15
- package/dist/auth-presence.js +1 -1
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/contract-api.js +5 -5
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +2 -2
- package/dist/legacy-session-surface-api.js +1 -1
- package/dist/light-runtime-api.js +4 -4
- package/dist/login-qr-runtime.js +1 -1
- package/dist/runtime-api.js +13 -13
- package/dist/runtime-setter-api.js +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/setup-entry.js +3 -2
- package/dist/setup-plugin-api.js +1 -1
- package/node_modules/audio-decode/node_modules/@thi.ng/bitstream/README.md +1 -1
- package/node_modules/audio-decode/node_modules/@thi.ng/bitstream/package.json +5 -5
- package/node_modules/audio-decode/node_modules/@thi.ng/errors/README.md +1 -1
- package/node_modules/audio-decode/node_modules/@thi.ng/errors/package.json +5 -5
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/flac/dist/flac-decoder.min.js +1 -1
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/flac/dist/flac-decoder.min.js.map +1 -1
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/flac/package.json +1 -1
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/flac/src/FLACDecoder.js +6 -6
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/flac/src/FLACDecoderWebWorker.js +2 -2
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/dist/opus-ml-decoder.min.js +11603 -11540
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/dist/opus-ml-decoder.min.js.map +1 -1
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/package.json +1 -1
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/src/EmscriptenWasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/types.d.ts +1 -5
- package/node_modules/audio-decode/node_modules/audio-type/audio-type.js +156 -2
- package/node_modules/audio-decode/node_modules/audio-type/package.json +23 -2
- package/node_modules/audio-decode/node_modules/audio-type/readme.md +40 -2
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/README.md +1 -1
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.min.js +3 -3
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.min.js.map +1 -1
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.opus-ml.min.js +0 -0
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.opus-ml.min.js.map +1 -1
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/package.json +8 -8
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/src/OggOpusDecoder.js +1 -1
- package/node_modules/audio-decode/node_modules/opus-decoder/README.md +1 -1
- package/node_modules/audio-decode/node_modules/opus-decoder/dist/opus-decoder.min.js +3 -3
- package/node_modules/audio-decode/node_modules/opus-decoder/dist/opus-decoder.min.js.map +1 -1
- package/node_modules/audio-decode/node_modules/opus-decoder/package.json +1 -1
- package/node_modules/audio-decode/node_modules/opus-decoder/types.d.ts +1 -5
- package/node_modules/baileys/node_modules/protobufjs/README.md +24 -17
- package/node_modules/baileys/node_modules/protobufjs/dist/light/protobuf.js +124 -14
- package/node_modules/baileys/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/baileys/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/minimal/protobuf.js +63 -9
- package/node_modules/baileys/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
- package/node_modules/baileys/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/protobuf.js +133 -18
- package/node_modules/baileys/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/baileys/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/ext/descriptor.generated.d.ts +7 -0
- package/node_modules/baileys/node_modules/protobufjs/ext/descriptor.js +24 -0
- package/node_modules/baileys/node_modules/protobufjs/ext/protojson.js +14 -4
- package/node_modules/baileys/node_modules/protobufjs/ext/textformat.js +8 -4
- package/node_modules/baileys/node_modules/protobufjs/google/protobuf/descriptor.json +20 -1
- package/node_modules/baileys/node_modules/protobufjs/google/protobuf/descriptor.proto +14 -1
- package/node_modules/baileys/node_modules/protobufjs/index.d.ts +12 -0
- package/node_modules/baileys/node_modules/protobufjs/package.json +1 -1
- package/node_modules/baileys/node_modules/protobufjs/src/decoder.js +31 -2
- package/node_modules/baileys/node_modules/protobufjs/src/enum.js +10 -0
- package/node_modules/baileys/node_modules/protobufjs/src/object.js +5 -2
- package/node_modules/baileys/node_modules/protobufjs/src/parse.js +9 -4
- package/node_modules/baileys/node_modules/protobufjs/src/reader.js +61 -7
- package/node_modules/baileys/node_modules/protobufjs/src/type.js +10 -0
- package/node_modules/baileys/node_modules/protobufjs/src/wrappers.js +5 -1
- package/node_modules/typebox/build/compile/validator.d.mts +1 -1
- package/node_modules/typebox/build/compile/validator.mjs +1 -1
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +7 -5
- package/node_modules/typebox/build/format/iri.mjs +5 -1
- package/node_modules/typebox/build/guard/emit.mjs +2 -4
- package/node_modules/typebox/build/guard/guard.mjs +6 -18
- package/node_modules/typebox/build/guard/string.mjs +16 -24
- package/node_modules/typebox/build/schema/build.mjs +2 -2
- package/node_modules/typebox/build/schema/check.mjs +1 -1
- package/node_modules/typebox/build/schema/compile.d.mts +3 -2
- package/node_modules/typebox/build/schema/compile.mjs +8 -8
- package/node_modules/typebox/build/schema/engine/_context.d.mts +6 -7
- package/node_modules/typebox/build/schema/engine/_context.mjs +23 -15
- package/node_modules/typebox/build/schema/engine/_functions.d.mts +2 -2
- package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/_reducer.d.mts +3 -3
- package/node_modules/typebox/build/schema/engine/_refine.d.mts +5 -5
- package/node_modules/typebox/build/schema/engine/_refine.mjs +4 -7
- package/node_modules/typebox/build/schema/engine/_stack.d.mts +34 -16
- package/node_modules/typebox/build/schema/engine/_stack.mjs +148 -104
- package/node_modules/typebox/build/schema/engine/additionalItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +8 -8
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +26 -18
- package/node_modules/typebox/build/schema/engine/allOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/allOf.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/anyOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/anyOf.mjs +5 -10
- package/node_modules/typebox/build/schema/engine/boolean.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/boolean.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/const.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/const.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/contains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/contains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/dependencies.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dependencies.mjs +3 -6
- package/node_modules/typebox/build/schema/engine/dependentRequired.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dependentRequired.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/dependentSchemas.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +11 -7
- package/node_modules/typebox/build/schema/engine/enum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/enum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/format.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/format.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/if.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/if.mjs +7 -15
- package/node_modules/typebox/build/schema/engine/items.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/items.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/maxContains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxItems.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxLength.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxLength.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxProperties.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maximum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maximum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minContains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minContains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minItems.d.mts +5 -5
- package/node_modules/typebox/build/schema/engine/minItems.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minLength.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minLength.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minProperties.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minimum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minimum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/multipleOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/multipleOf.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/not.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/not.mjs +4 -8
- package/node_modules/typebox/build/schema/engine/oneOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +6 -11
- package/node_modules/typebox/build/schema/engine/pattern.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -7
- package/node_modules/typebox/build/schema/engine/patternProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/prefixItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/prefixItems.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/properties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/properties.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/propertyNames.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +4 -10
- package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +11 -7
- package/node_modules/typebox/build/schema/engine/ref.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/ref.mjs +19 -15
- package/node_modules/typebox/build/schema/engine/required.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/required.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/schema.d.mts +7 -7
- package/node_modules/typebox/build/schema/engine/schema.mjs +137 -133
- package/node_modules/typebox/build/schema/engine/type.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/type.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +5 -9
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +5 -9
- package/node_modules/typebox/build/schema/engine/uniqueItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/uniqueItems.mjs +2 -6
- package/node_modules/typebox/build/schema/errors.d.mts +2 -2
- package/node_modules/typebox/build/schema/errors.mjs +8 -14
- package/node_modules/typebox/build/schema/intern/index.d.mts +1 -0
- package/node_modules/typebox/build/schema/intern/index.mjs +1 -0
- package/node_modules/typebox/build/schema/intern/intern.d.mts +11 -0
- package/node_modules/typebox/build/schema/intern/intern.mjs +293 -0
- package/node_modules/typebox/build/schema/meta/draft_2019_09.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_2019_09.mjs +288 -0
- package/node_modules/typebox/build/schema/meta/draft_2020_12.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_2020_12.mjs +300 -0
- package/node_modules/typebox/build/schema/meta/draft_3.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_3.mjs +143 -0
- package/node_modules/typebox/build/schema/meta/draft_4.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_4.mjs +149 -0
- package/node_modules/typebox/build/schema/meta/draft_6.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_6.mjs +155 -0
- package/node_modules/typebox/build/schema/meta/draft_7.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_7.mjs +172 -0
- package/node_modules/typebox/build/schema/meta/index.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/index.mjs +2 -0
- package/node_modules/typebox/build/schema/meta/meta.d.mts +9 -0
- package/node_modules/typebox/build/schema/meta/meta.mjs +15 -0
- package/node_modules/typebox/build/schema/meta/schema.d.mts +6 -0
- package/node_modules/typebox/build/schema/meta/schema.mjs +1 -0
- package/node_modules/typebox/build/schema/parse.d.mts +1 -0
- package/node_modules/typebox/build/schema/parse.mjs +10 -5
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +8 -3
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +268 -139
- package/node_modules/typebox/build/schema/schema.d.mts +2 -0
- package/node_modules/typebox/build/schema/schema.mjs +2 -0
- package/node_modules/typebox/build/value/errors/errors.d.mts +2 -12
- package/node_modules/typebox/build/value/errors/errors.mjs +2 -7
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +59 -89
- package/openclaw.plugin.json +13 -0
- package/package.json +7 -5
- package/dist/channel.runtime-qi6Zbi9p.js +0 -55
- package/dist/channel.setup-DhuZ51Kg.js +0 -14
- package/dist/normalize-C7Hkc_vE.js +0 -2
- /package/dist/{account-ids-CB5SOWjc.js → .setup/account-ids-CB5SOWjc.mjs} +0 -0
- /package/dist/{audio-preflight.runtime-C_glQhZY.js → .setup/audio-preflight.runtime-C_glQhZY.mjs} +0 -0
- /package/dist/{command-policy-BIOSHySD.js → .setup/command-policy-BIOSHySD.mjs} +0 -0
- /package/dist/{config-schema-BYA6e_Ii.js → .setup/config-schema-BYA6e_Ii.mjs} +0 -0
- /package/dist/{constants-C7m81BNe.js → .setup/constants-C7m81BNe.mjs} +0 -0
- /package/dist/{creds-files-Drg3usj1.js → .setup/creds-files-Drg3usj1.mjs} +0 -0
- /package/dist/{doctor-BPb-SjdE.js → .setup/doctor-BPb-SjdE.mjs} +0 -0
- /package/dist/{group-config-path-BGyzT9Lg.js → .setup/group-config-path-BGyzT9Lg.mjs} +0 -0
- /package/dist/{group-session-contract-DDnZSsJ1.js → .setup/group-session-contract-DDnZSsJ1.mjs} +0 -0
- /package/dist/{reply-resolver.runtime-Ded8D58Y.js → .setup/reply-resolver.runtime-Ded8D58Y.mjs} +0 -0
- /package/dist/{rolldown-runtime-D7D4PA-g.js → .setup/rolldown-runtime-D7D4PA-g.mjs} +0 -0
- /package/dist/{runtime-BLlToOi6.js → .setup/runtime-BLlToOi6.mjs} +0 -0
- /package/dist/{runtime-group-policy-DeSRFXEV.js → .setup/runtime-group-policy-DeSRFXEV.mjs} +0 -0
- /package/dist/{security-contract-nAzD945y.js → .setup/security-contract-nAzD945y.mjs} +0 -0
- /package/dist/{session-contract-DMTm6Q_L.js → .setup/session-contract-DMTm6Q_L.mjs} +0 -0
- /package/dist/{session-errors-JuazczrA.js → .setup/session-errors-JuazczrA.mjs} +0 -0
- /package/dist/{targets-runtime-RBjx3pg_.js → .setup/targets-runtime-RBjx3pg_.mjs} +0 -0
|
@@ -45,10 +45,6 @@ export function CheckContains(stack, context, schema, value) {
|
|
|
45
45
|
// Error
|
|
46
46
|
// ------------------------------------------------------------------
|
|
47
47
|
export function ErrorContains(stack, context, schemaPath, instancePath, schema, value) {
|
|
48
|
-
return CheckContains(stack, context, schema, value) ||
|
|
49
|
-
|
|
50
|
-
schemaPath,
|
|
51
|
-
instancePath,
|
|
52
|
-
params: { minContains: 1 },
|
|
53
|
-
});
|
|
48
|
+
return CheckContains(stack, context, schema, value) ||
|
|
49
|
+
context.AddError('contains', schemaPath, instancePath, { minContains: 1 });
|
|
54
50
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Schema from '../types/index.mjs';
|
|
2
|
-
import
|
|
2
|
+
import * as Stack from './_stack.mjs';
|
|
3
3
|
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
4
|
-
export declare function BuildDependencies(stack: Stack, context: BuildContext, schema: Schema.XDependencies, value: string): string;
|
|
5
|
-
export declare function CheckDependencies(stack: Stack, context: CheckContext, schema: Schema.XDependencies, value: Record<PropertyKey, unknown>): boolean;
|
|
6
|
-
export declare function ErrorDependencies(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XDependencies, value: Record<PropertyKey, unknown>): boolean;
|
|
4
|
+
export declare function BuildDependencies(stack: Stack.XStack, context: BuildContext, schema: Schema.XDependencies, value: string): string;
|
|
5
|
+
export declare function CheckDependencies(stack: Stack.XStack, context: CheckContext, schema: Schema.XDependencies, value: Record<PropertyKey, unknown>): boolean;
|
|
6
|
+
export declare function ErrorDependencies(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XDependencies, value: Record<PropertyKey, unknown>): boolean;
|
|
@@ -34,12 +34,9 @@ export function ErrorDependencies(stack, context, schemaPath, instancePath, sche
|
|
|
34
34
|
const isEvery = G.EveryAll(G.Entries(schema.dependencies), 0, ([key, schema]) => {
|
|
35
35
|
const nextSchemaPath = `${schemaPath}/dependencies/${key}`;
|
|
36
36
|
return !G.HasPropertyKey(value, key) || (G.IsArray(schema)
|
|
37
|
-
? schema.every((dependency) => G.HasPropertyKey(value, dependency) ||
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
instancePath,
|
|
41
|
-
params: { property: key, dependencies: schema },
|
|
42
|
-
})) : ErrorSchema(stack, context, nextSchemaPath, instancePath, schema, value));
|
|
37
|
+
? schema.every((dependency) => G.HasPropertyKey(value, dependency) ||
|
|
38
|
+
context.AddError('dependencies', schemaPath, instancePath, { property: key, dependencies: schema }))
|
|
39
|
+
: ErrorSchema(stack, context, nextSchemaPath, instancePath, schema, value));
|
|
43
40
|
});
|
|
44
41
|
return isLength || isEvery;
|
|
45
42
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Schema from '../types/index.mjs';
|
|
2
|
-
import
|
|
2
|
+
import * as Stack from './_stack.mjs';
|
|
3
3
|
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
4
|
-
export declare function BuildDependentRequired(_stack: Stack, _context: BuildContext, schema: Schema.XDependentRequired, value: string): string;
|
|
5
|
-
export declare function CheckDependentRequired(_stack: Stack, _context: CheckContext, schema: Schema.XDependentRequired, value: Record<PropertyKey, unknown>): boolean;
|
|
6
|
-
export declare function ErrorDependentRequired(_stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XDependentRequired, value: Record<PropertyKey, unknown>): boolean;
|
|
4
|
+
export declare function BuildDependentRequired(_stack: Stack.XStack, _context: BuildContext, schema: Schema.XDependentRequired, value: string): string;
|
|
5
|
+
export declare function CheckDependentRequired(_stack: Stack.XStack, _context: CheckContext, schema: Schema.XDependentRequired, value: Record<PropertyKey, unknown>): boolean;
|
|
6
|
+
export declare function ErrorDependentRequired(_stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XDependentRequired, value: Record<PropertyKey, unknown>): boolean;
|
|
@@ -29,12 +29,8 @@ export function CheckDependentRequired(_stack, _context, schema, value) {
|
|
|
29
29
|
export function ErrorDependentRequired(_stack, context, schemaPath, instancePath, schema, value) {
|
|
30
30
|
const isLength = G.IsEqual(G.Keys(value).length, 0);
|
|
31
31
|
const isEveryEntry = G.EveryAll(G.Entries(schema.dependentRequired), 0, ([key, keys]) => {
|
|
32
|
-
return !G.HasPropertyKey(value, key) || G.EveryAll(keys, 0, (dependency) => G.HasPropertyKey(value, dependency) ||
|
|
33
|
-
|
|
34
|
-
schemaPath,
|
|
35
|
-
instancePath,
|
|
36
|
-
params: { property: key, dependencies: keys },
|
|
37
|
-
}));
|
|
32
|
+
return !G.HasPropertyKey(value, key) || G.EveryAll(keys, 0, (dependency) => G.HasPropertyKey(value, dependency) ||
|
|
33
|
+
context.AddError('dependentRequired', schemaPath, instancePath, { property: key, dependencies: keys }));
|
|
38
34
|
});
|
|
39
35
|
return isLength || isEveryEntry;
|
|
40
36
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Schema from '../types/index.mjs';
|
|
2
|
-
import
|
|
2
|
+
import * as Stack from './_stack.mjs';
|
|
3
3
|
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
4
|
-
export declare function BuildDependentSchemas(stack: Stack, context: BuildContext, schema: Schema.XDependentSchemas, value: string): string;
|
|
5
|
-
export declare function CheckDependentSchemas(stack: Stack, context: CheckContext, schema: Schema.XDependentSchemas, value: Record<PropertyKey, unknown>): boolean;
|
|
6
|
-
export declare function ErrorDependentSchemas(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XDependentSchemas, value: Record<PropertyKey, unknown>): boolean;
|
|
4
|
+
export declare function BuildDependentSchemas(stack: Stack.XStack, context: BuildContext, schema: Schema.XDependentSchemas, value: string): string;
|
|
5
|
+
export declare function CheckDependentSchemas(stack: Stack.XStack, context: CheckContext, schema: Schema.XDependentSchemas, value: Record<PropertyKey, unknown>): boolean;
|
|
6
|
+
export declare function ErrorDependentSchemas(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XDependentSchemas, value: Record<PropertyKey, unknown>): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Schema from '../types/index.mjs';
|
|
2
|
-
import
|
|
2
|
+
import * as Stack from './_stack.mjs';
|
|
3
3
|
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
4
|
-
export declare function BuildDynamicRef(stack: Stack, context: BuildContext, schema: Schema.XDynamicRef, value: string): string;
|
|
5
|
-
export declare function CheckDynamicRef(stack: Stack, context: CheckContext, schema: Schema.XDynamicRef, value: unknown): boolean;
|
|
6
|
-
export declare function ErrorDynamicRef(stack: Stack, context: ErrorContext, _schemaPath: string, instancePath: string, schema: Schema.XDynamicRef, value: unknown): boolean;
|
|
4
|
+
export declare function BuildDynamicRef(stack: Stack.XStack, context: BuildContext, schema: Schema.XDynamicRef, value: string): string;
|
|
5
|
+
export declare function CheckDynamicRef(stack: Stack.XStack, context: CheckContext, schema: Schema.XDynamicRef, value: unknown): boolean;
|
|
6
|
+
export declare function ErrorDynamicRef(stack: Stack.XStack, context: ErrorContext, _schemaPath: string, instancePath: string, schema: Schema.XDynamicRef, value: unknown): boolean;
|
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
|
-
import * as Functions from './_functions.mjs';
|
|
3
2
|
import * as Schema from '../types/index.mjs';
|
|
3
|
+
import * as Functions from './_functions.mjs';
|
|
4
|
+
import { Resolve } from '../resolve/index.mjs';
|
|
4
5
|
import { CheckSchema, ErrorSchema } from './schema.mjs';
|
|
5
6
|
// ------------------------------------------------------------------
|
|
6
7
|
// Build
|
|
7
8
|
// ------------------------------------------------------------------
|
|
8
9
|
export function BuildDynamicRef(stack, context, schema, value) {
|
|
9
|
-
const target =
|
|
10
|
-
|
|
10
|
+
const target = Resolve.DynamicRef(stack, schema) ?? false;
|
|
11
|
+
const nextStack = target ? { ...stack, pendingResource: true } : stack;
|
|
12
|
+
return Functions.CreateFunction(nextStack, context, target, value);
|
|
11
13
|
}
|
|
12
14
|
// ------------------------------------------------------------------
|
|
13
15
|
// Check
|
|
14
16
|
// ------------------------------------------------------------------
|
|
15
17
|
export function CheckDynamicRef(stack, context, schema, value) {
|
|
16
|
-
const target =
|
|
17
|
-
|
|
18
|
+
const target = Resolve.DynamicRef(stack, schema) ?? false;
|
|
19
|
+
const nextStack = target ? { ...stack, pendingResource: true } : stack;
|
|
20
|
+
return (Schema.IsSchema(target) && CheckSchema(nextStack, context, target, value));
|
|
18
21
|
}
|
|
19
22
|
// ------------------------------------------------------------------
|
|
20
23
|
// Error
|
|
21
24
|
// ------------------------------------------------------------------
|
|
22
25
|
export function ErrorDynamicRef(stack, context, _schemaPath, instancePath, schema, value) {
|
|
23
|
-
const target =
|
|
24
|
-
|
|
26
|
+
const target = Resolve.DynamicRef(stack, schema) ?? false;
|
|
27
|
+
const nextStack = target ? { ...stack, pendingResource: true } : stack;
|
|
28
|
+
return (Schema.IsSchema(target) && ErrorSchema(nextStack, context, '#', instancePath, target, value));
|
|
25
29
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Schema from '../types/index.mjs';
|
|
2
|
-
import
|
|
2
|
+
import * as Stack from './_stack.mjs';
|
|
3
3
|
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
4
|
-
export declare function BuildEnum(_stack: Stack, _context: BuildContext, schema: Schema.XEnum, value: string): string;
|
|
5
|
-
export declare function CheckEnum(_stack: Stack, _context: CheckContext, schema: Schema.XEnum, value: unknown): boolean;
|
|
6
|
-
export declare function ErrorEnum(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XEnum, value: unknown): boolean;
|
|
4
|
+
export declare function BuildEnum(_stack: Stack.XStack, _context: BuildContext, schema: Schema.XEnum, value: string): string;
|
|
5
|
+
export declare function CheckEnum(_stack: Stack.XStack, _context: CheckContext, schema: Schema.XEnum, value: unknown): boolean;
|
|
6
|
+
export declare function ErrorEnum(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XEnum, value: unknown): boolean;
|
|
@@ -24,10 +24,6 @@ export function CheckEnum(_stack, _context, schema, value) {
|
|
|
24
24
|
// Error
|
|
25
25
|
// ------------------------------------------------------------------
|
|
26
26
|
export function ErrorEnum(stack, context, schemaPath, instancePath, schema, value) {
|
|
27
|
-
return CheckEnum(stack, context, schema, value) ||
|
|
28
|
-
|
|
29
|
-
schemaPath,
|
|
30
|
-
instancePath,
|
|
31
|
-
params: { allowedValues: schema.enum }
|
|
32
|
-
});
|
|
27
|
+
return CheckEnum(stack, context, schema, value) ||
|
|
28
|
+
context.AddError('enum', schemaPath, instancePath, { allowedValues: schema.enum });
|
|
33
29
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Schema from '../types/index.mjs';
|
|
2
|
-
import
|
|
2
|
+
import * as Stack from './_stack.mjs';
|
|
3
3
|
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
4
|
-
export declare function BuildExclusiveMaximum(_stack: Stack, _context: BuildContext, schema: Schema.XExclusiveMaximum, value: string): string;
|
|
5
|
-
export declare function CheckExclusiveMaximum(_stack: Stack, _context: CheckContext, schema: Schema.XExclusiveMaximum, value: number | bigint): boolean;
|
|
6
|
-
export declare function ErrorExclusiveMaximum(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XExclusiveMaximum, value: number | bigint): boolean;
|
|
4
|
+
export declare function BuildExclusiveMaximum(_stack: Stack.XStack, _context: BuildContext, schema: Schema.XExclusiveMaximum, value: string): string;
|
|
5
|
+
export declare function CheckExclusiveMaximum(_stack: Stack.XStack, _context: CheckContext, schema: Schema.XExclusiveMaximum, value: number | bigint): boolean;
|
|
6
|
+
export declare function ErrorExclusiveMaximum(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XExclusiveMaximum, value: number | bigint): boolean;
|
|
@@ -16,10 +16,6 @@ export function CheckExclusiveMaximum(_stack, _context, schema, value) {
|
|
|
16
16
|
// Error
|
|
17
17
|
// ------------------------------------------------------------------
|
|
18
18
|
export function ErrorExclusiveMaximum(stack, context, schemaPath, instancePath, schema, value) {
|
|
19
|
-
return CheckExclusiveMaximum(stack, context, schema, value) ||
|
|
20
|
-
|
|
21
|
-
schemaPath,
|
|
22
|
-
instancePath,
|
|
23
|
-
params: { comparison: '<', limit: schema.exclusiveMaximum }
|
|
24
|
-
});
|
|
19
|
+
return CheckExclusiveMaximum(stack, context, schema, value) ||
|
|
20
|
+
context.AddError('exclusiveMaximum', schemaPath, instancePath, { comparison: '<', limit: schema.exclusiveMaximum });
|
|
25
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Schema from '../types/index.mjs';
|
|
2
|
-
import
|
|
2
|
+
import * as Stack from './_stack.mjs';
|
|
3
3
|
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
4
|
-
export declare function BuildExclusiveMinimum(_stack: Stack, _context: BuildContext, schema: Schema.XExclusiveMinimum, value: string): string;
|
|
5
|
-
export declare function CheckExclusiveMinimum(_stack: Stack, _context: CheckContext, schema: Schema.XExclusiveMinimum, value: number | bigint): boolean;
|
|
6
|
-
export declare function ErrorExclusiveMinimum(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XExclusiveMinimum, value: number | bigint): boolean;
|
|
4
|
+
export declare function BuildExclusiveMinimum(_stack: Stack.XStack, _context: BuildContext, schema: Schema.XExclusiveMinimum, value: string): string;
|
|
5
|
+
export declare function CheckExclusiveMinimum(_stack: Stack.XStack, _context: CheckContext, schema: Schema.XExclusiveMinimum, value: number | bigint): boolean;
|
|
6
|
+
export declare function ErrorExclusiveMinimum(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XExclusiveMinimum, value: number | bigint): boolean;
|
|
@@ -16,10 +16,6 @@ export function CheckExclusiveMinimum(_stack, _context, schema, value) {
|
|
|
16
16
|
// Error
|
|
17
17
|
// ------------------------------------------------------------------
|
|
18
18
|
export function ErrorExclusiveMinimum(stack, context, schemaPath, instancePath, schema, value) {
|
|
19
|
-
return CheckExclusiveMinimum(stack, context, schema, value) ||
|
|
20
|
-
|
|
21
|
-
schemaPath,
|
|
22
|
-
instancePath,
|
|
23
|
-
params: { comparison: '>', limit: schema.exclusiveMinimum }
|
|
24
|
-
});
|
|
19
|
+
return CheckExclusiveMinimum(stack, context, schema, value) ||
|
|
20
|
+
context.AddError('exclusiveMinimum', schemaPath, instancePath, { comparison: '>', limit: schema.exclusiveMinimum });
|
|
25
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Schema from '../types/index.mjs';
|
|
2
|
-
import
|
|
2
|
+
import * as Stack from './_stack.mjs';
|
|
3
3
|
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
4
|
-
export declare function BuildFormat(_stack: Stack, _context: BuildContext, schema: Schema.XFormat, value: string): string;
|
|
5
|
-
export declare function CheckFormat(_stack: Stack, _context: CheckContext, schema: Schema.XFormat, value: string): boolean;
|
|
6
|
-
export declare function ErrorFormat(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XFormat, value: string): boolean;
|
|
4
|
+
export declare function BuildFormat(_stack: Stack.XStack, _context: BuildContext, schema: Schema.XFormat, value: string): string;
|
|
5
|
+
export declare function CheckFormat(_stack: Stack.XStack, _context: CheckContext, schema: Schema.XFormat, value: string): boolean;
|
|
6
|
+
export declare function ErrorFormat(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XFormat, value: string): boolean;
|
|
@@ -17,10 +17,6 @@ export function CheckFormat(_stack, _context, schema, value) {
|
|
|
17
17
|
// Error
|
|
18
18
|
// ------------------------------------------------------------------
|
|
19
19
|
export function ErrorFormat(stack, context, schemaPath, instancePath, schema, value) {
|
|
20
|
-
return CheckFormat(stack, context, schema, value) ||
|
|
21
|
-
|
|
22
|
-
schemaPath,
|
|
23
|
-
instancePath,
|
|
24
|
-
params: { format: schema.format },
|
|
25
|
-
});
|
|
20
|
+
return CheckFormat(stack, context, schema, value) ||
|
|
21
|
+
context.AddError('format', schemaPath, instancePath, { format: schema.format });
|
|
26
22
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Schema from '../types/index.mjs';
|
|
2
|
-
import
|
|
2
|
+
import * as Stack from './_stack.mjs';
|
|
3
3
|
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
4
|
-
export declare function BuildIf(stack: Stack, context: BuildContext, schema: Schema.XIf, value: string): string;
|
|
5
|
-
export declare function CheckIf(stack: Stack, context: CheckContext, schema: Schema.XIf, value: unknown): boolean;
|
|
6
|
-
export declare function ErrorIf(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XIf, value: unknown): boolean;
|
|
4
|
+
export declare function BuildIf(stack: Stack.XStack, context: BuildContext, schema: Schema.XIf, value: string): string;
|
|
5
|
+
export declare function CheckIf(stack: Stack.XStack, context: CheckContext, schema: Schema.XIf, value: unknown): boolean;
|
|
6
|
+
export declare function ErrorIf(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XIf, value: unknown): boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
2
|
import * as Schema from '../types/index.mjs';
|
|
3
|
-
import {
|
|
4
|
-
import { EmitGuard as E } from '../../guard/index.mjs';
|
|
3
|
+
import { ErrorContext } from './_context.mjs';
|
|
5
4
|
import { BuildSchema, CheckSchema, ErrorSchema } from './schema.mjs';
|
|
5
|
+
import { EmitGuard as E } from '../../guard/index.mjs';
|
|
6
6
|
// ------------------------------------------------------------------
|
|
7
7
|
// Build
|
|
8
8
|
// ------------------------------------------------------------------
|
|
@@ -27,20 +27,12 @@ export function CheckIf(stack, context, schema, value) {
|
|
|
27
27
|
export function ErrorIf(stack, context, schemaPath, instancePath, schema, value) {
|
|
28
28
|
const thenSchema = Schema.IsThen(schema) ? schema.then : true;
|
|
29
29
|
const elseSchema = Schema.IsElse(schema) ? schema.else : true;
|
|
30
|
-
const trueContext = new
|
|
30
|
+
const trueContext = new ErrorContext();
|
|
31
31
|
const isIf = ErrorSchema(stack, trueContext, `${schemaPath}/if`, instancePath, schema.if, value)
|
|
32
|
-
? ErrorSchema(stack, trueContext, `${schemaPath}/then`, instancePath, thenSchema, value) ||
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
instancePath,
|
|
36
|
-
params: { failingKeyword: 'then' },
|
|
37
|
-
})
|
|
38
|
-
: ErrorSchema(stack, context, `${schemaPath}/else`, instancePath, elseSchema, value) || context.AddError({
|
|
39
|
-
keyword: 'if',
|
|
40
|
-
schemaPath,
|
|
41
|
-
instancePath,
|
|
42
|
-
params: { failingKeyword: 'else' },
|
|
43
|
-
});
|
|
32
|
+
? ErrorSchema(stack, trueContext, `${schemaPath}/then`, instancePath, thenSchema, value) ||
|
|
33
|
+
context.AddError('if', schemaPath, instancePath, { failingKeyword: 'then' })
|
|
34
|
+
: ErrorSchema(stack, context, `${schemaPath}/else`, instancePath, elseSchema, value) ||
|
|
35
|
+
context.AddError('if', schemaPath, instancePath, { failingKeyword: 'else' });
|
|
44
36
|
if (isIf)
|
|
45
37
|
context.Merge([trueContext]);
|
|
46
38
|
return isIf;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Schema from '../types/index.mjs';
|
|
2
|
-
import
|
|
2
|
+
import * as Stack from './_stack.mjs';
|
|
3
3
|
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
4
|
-
export declare function BuildItems(stack: Stack, context: BuildContext, schema: Schema.XItems, value: string): string;
|
|
5
|
-
export declare function CheckItems(stack: Stack, context: CheckContext, schema: Schema.XItems, value: unknown[]): boolean;
|
|
6
|
-
export declare function ErrorItems(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XItems, value: unknown[]): boolean;
|
|
4
|
+
export declare function BuildItems(stack: Stack.XStack, context: BuildContext, schema: Schema.XItems, value: string): string;
|
|
5
|
+
export declare function CheckItems(stack: Stack.XStack, context: CheckContext, schema: Schema.XItems, value: unknown[]): boolean;
|
|
6
|
+
export declare function ErrorItems(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XItems, value: unknown[]): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
2
|
import * as Schema from '../types/index.mjs';
|
|
3
|
-
import { Guard as G, EmitGuard as E } from '../../guard/index.mjs';
|
|
4
3
|
import { BuildSchemaPushStack, CheckSchemaPushStack, ErrorSchemaPushStack } from './schema.mjs';
|
|
4
|
+
import { Guard as G, EmitGuard as E } from '../../guard/index.mjs';
|
|
5
5
|
// ------------------------------------------------------------------
|
|
6
6
|
// ItemsSized
|
|
7
7
|
// ------------------------------------------------------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Schema from '../types/index.mjs';
|
|
2
|
-
import
|
|
2
|
+
import * as Stack from './_stack.mjs';
|
|
3
3
|
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
4
|
-
export declare function BuildMaxContains(stack: Stack, context: BuildContext, schema: Schema.XMaxContains, value: string): string;
|
|
5
|
-
export declare function CheckMaxContains(stack: Stack, context: CheckContext, schema: Schema.XMaxContains, value: unknown[]): boolean;
|
|
6
|
-
export declare function ErrorMaxContains(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XMaxContains, value: unknown[]): boolean;
|
|
4
|
+
export declare function BuildMaxContains(stack: Stack.XStack, context: BuildContext, schema: Schema.XMaxContains, value: string): string;
|
|
5
|
+
export declare function CheckMaxContains(stack: Stack.XStack, context: CheckContext, schema: Schema.XMaxContains, value: unknown[]): boolean;
|
|
6
|
+
export declare function ErrorMaxContains(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XMaxContains, value: unknown[]): boolean;
|
|
@@ -33,10 +33,6 @@ export function CheckMaxContains(stack, context, schema, value) {
|
|
|
33
33
|
// ------------------------------------------------------------------
|
|
34
34
|
export function ErrorMaxContains(stack, context, schemaPath, instancePath, schema, value) {
|
|
35
35
|
const minContains = Schema.IsMinContains(schema) ? schema.minContains : 1;
|
|
36
|
-
return CheckMaxContains(stack, context, schema, value) ||
|
|
37
|
-
|
|
38
|
-
schemaPath,
|
|
39
|
-
instancePath,
|
|
40
|
-
params: { minContains, maxContains: schema.maxContains },
|
|
41
|
-
});
|
|
36
|
+
return CheckMaxContains(stack, context, schema, value) ||
|
|
37
|
+
context.AddError('contains', schemaPath, instancePath, { minContains, maxContains: schema.maxContains });
|
|
42
38
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Schema from '../types/index.mjs';
|
|
2
|
-
import
|
|
2
|
+
import * as Stack from './_stack.mjs';
|
|
3
3
|
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
4
|
-
export declare function BuildMaxItems(_stack: Stack, _context: BuildContext, schema: Schema.XMaxItems, value: string): string;
|
|
5
|
-
export declare function CheckMaxItems(_stack: Stack, _context: CheckContext, schema: Schema.XMaxItems, value: unknown[]): boolean;
|
|
6
|
-
export declare function ErrorMaxItems(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XMaxItems, value: unknown[]): boolean;
|
|
4
|
+
export declare function BuildMaxItems(_stack: Stack.XStack, _context: BuildContext, schema: Schema.XMaxItems, value: string): string;
|
|
5
|
+
export declare function CheckMaxItems(_stack: Stack.XStack, _context: CheckContext, schema: Schema.XMaxItems, value: unknown[]): boolean;
|
|
6
|
+
export declare function ErrorMaxItems(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XMaxItems, value: unknown[]): boolean;
|
|
@@ -16,10 +16,6 @@ export function CheckMaxItems(_stack, _context, schema, value) {
|
|
|
16
16
|
// Error
|
|
17
17
|
// ------------------------------------------------------------------
|
|
18
18
|
export function ErrorMaxItems(stack, context, schemaPath, instancePath, schema, value) {
|
|
19
|
-
return CheckMaxItems(stack, context, schema, value) ||
|
|
20
|
-
|
|
21
|
-
schemaPath,
|
|
22
|
-
instancePath,
|
|
23
|
-
params: { limit: schema.maxItems }
|
|
24
|
-
});
|
|
19
|
+
return CheckMaxItems(stack, context, schema, value) ||
|
|
20
|
+
context.AddError('maxItems', schemaPath, instancePath, { limit: schema.maxItems });
|
|
25
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Schema from '../types/index.mjs';
|
|
2
|
-
import
|
|
2
|
+
import * as Stack from './_stack.mjs';
|
|
3
3
|
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
4
|
-
export declare function BuildMaxLength(_stack: Stack, _context: BuildContext, schema: Schema.XMaxLength, value: string): string;
|
|
5
|
-
export declare function CheckMaxLength(_stack: Stack, _context: CheckContext, schema: Schema.XMaxLength, value: string): boolean;
|
|
6
|
-
export declare function ErrorMaxLength(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XMaxLength, value: string): boolean;
|
|
4
|
+
export declare function BuildMaxLength(_stack: Stack.XStack, _context: BuildContext, schema: Schema.XMaxLength, value: string): string;
|
|
5
|
+
export declare function CheckMaxLength(_stack: Stack.XStack, _context: CheckContext, schema: Schema.XMaxLength, value: string): boolean;
|
|
6
|
+
export declare function ErrorMaxLength(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XMaxLength, value: string): boolean;
|
|
@@ -16,10 +16,6 @@ export function CheckMaxLength(_stack, _context, schema, value) {
|
|
|
16
16
|
// Error
|
|
17
17
|
// ------------------------------------------------------------------
|
|
18
18
|
export function ErrorMaxLength(stack, context, schemaPath, instancePath, schema, value) {
|
|
19
|
-
return CheckMaxLength(stack, context, schema, value) ||
|
|
20
|
-
|
|
21
|
-
schemaPath,
|
|
22
|
-
instancePath,
|
|
23
|
-
params: { limit: schema.maxLength }
|
|
24
|
-
});
|
|
19
|
+
return CheckMaxLength(stack, context, schema, value) ||
|
|
20
|
+
context.AddError('maxLength', schemaPath, instancePath, { limit: schema.maxLength });
|
|
25
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Schema from '../types/index.mjs';
|
|
2
|
-
import
|
|
2
|
+
import * as Stack from './_stack.mjs';
|
|
3
3
|
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
4
|
-
export declare function BuildMaxProperties(_stack: Stack, _context: BuildContext, schema: Schema.XMaxProperties, value: string): string;
|
|
5
|
-
export declare function CheckMaxProperties(_stack: Stack, _context: CheckContext, schema: Schema.XMaxProperties, value: Record<PropertyKey, unknown>): boolean;
|
|
6
|
-
export declare function ErrorMaxProperties(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XMaxProperties, value: Record<PropertyKey, unknown>): boolean;
|
|
4
|
+
export declare function BuildMaxProperties(_stack: Stack.XStack, _context: BuildContext, schema: Schema.XMaxProperties, value: string): string;
|
|
5
|
+
export declare function CheckMaxProperties(_stack: Stack.XStack, _context: CheckContext, schema: Schema.XMaxProperties, value: Record<PropertyKey, unknown>): boolean;
|
|
6
|
+
export declare function ErrorMaxProperties(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XMaxProperties, value: Record<PropertyKey, unknown>): boolean;
|
|
@@ -16,10 +16,6 @@ export function CheckMaxProperties(_stack, _context, schema, value) {
|
|
|
16
16
|
// Check
|
|
17
17
|
// ------------------------------------------------------------------
|
|
18
18
|
export function ErrorMaxProperties(stack, context, schemaPath, instancePath, schema, value) {
|
|
19
|
-
return CheckMaxProperties(stack, context, schema, value) ||
|
|
20
|
-
|
|
21
|
-
schemaPath,
|
|
22
|
-
instancePath,
|
|
23
|
-
params: { limit: schema.maxProperties },
|
|
24
|
-
});
|
|
19
|
+
return CheckMaxProperties(stack, context, schema, value) ||
|
|
20
|
+
context.AddError('maxProperties', schemaPath, instancePath, { limit: schema.maxProperties });
|
|
25
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Schema from '../types/index.mjs';
|
|
2
|
-
import
|
|
2
|
+
import * as Stack from './_stack.mjs';
|
|
3
3
|
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
4
|
-
export declare function BuildMaximum(_stack: Stack, _context: BuildContext, schema: Schema.XMaximum, value: string): string;
|
|
5
|
-
export declare function CheckMaximum(_stack: Stack, _context: CheckContext, schema: Schema.XMaximum, value: number | bigint): boolean;
|
|
6
|
-
export declare function ErrorMaximum(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XMaximum, value: number | bigint): boolean;
|
|
4
|
+
export declare function BuildMaximum(_stack: Stack.XStack, _context: BuildContext, schema: Schema.XMaximum, value: string): string;
|
|
5
|
+
export declare function CheckMaximum(_stack: Stack.XStack, _context: CheckContext, schema: Schema.XMaximum, value: number | bigint): boolean;
|
|
6
|
+
export declare function ErrorMaximum(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XMaximum, value: number | bigint): boolean;
|
|
@@ -16,10 +16,6 @@ export function CheckMaximum(_stack, _context, schema, value) {
|
|
|
16
16
|
// Error
|
|
17
17
|
// ------------------------------------------------------------------
|
|
18
18
|
export function ErrorMaximum(stack, context, schemaPath, instancePath, schema, value) {
|
|
19
|
-
return CheckMaximum(stack, context, schema, value) ||
|
|
20
|
-
|
|
21
|
-
schemaPath,
|
|
22
|
-
instancePath,
|
|
23
|
-
params: { comparison: '<=', limit: schema.maximum }
|
|
24
|
-
});
|
|
19
|
+
return CheckMaximum(stack, context, schema, value) ||
|
|
20
|
+
context.AddError('maximum', schemaPath, instancePath, { comparison: '<=', limit: schema.maximum });
|
|
25
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Schema from '../types/index.mjs';
|
|
2
|
-
import
|
|
2
|
+
import * as Stack from './_stack.mjs';
|
|
3
3
|
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
4
|
-
export declare function BuildMinContains(stack: Stack, context: BuildContext, schema: Schema.XMinContains, value: string): string;
|
|
5
|
-
export declare function CheckMinContains(stack: Stack, context: CheckContext, schema: Schema.XMinContains, value: unknown[]): boolean;
|
|
6
|
-
export declare function ErrorMinContains(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XMinContains, value: unknown[]): boolean;
|
|
4
|
+
export declare function BuildMinContains(stack: Stack.XStack, context: BuildContext, schema: Schema.XMinContains, value: string): string;
|
|
5
|
+
export declare function CheckMinContains(stack: Stack.XStack, context: CheckContext, schema: Schema.XMinContains, value: unknown[]): boolean;
|
|
6
|
+
export declare function ErrorMinContains(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XMinContains, value: unknown[]): boolean;
|
|
@@ -42,10 +42,6 @@ export function CheckMinContains(stack, context, schema, value) {
|
|
|
42
42
|
// Error
|
|
43
43
|
// ------------------------------------------------------------------
|
|
44
44
|
export function ErrorMinContains(stack, context, schemaPath, instancePath, schema, value) {
|
|
45
|
-
return CheckMinContains(stack, context, schema, value) ||
|
|
46
|
-
|
|
47
|
-
schemaPath,
|
|
48
|
-
instancePath,
|
|
49
|
-
params: { minContains: schema.minContains }
|
|
50
|
-
});
|
|
45
|
+
return CheckMinContains(stack, context, schema, value) ||
|
|
46
|
+
context.AddError('contains', schemaPath, instancePath, { minContains: schema.minContains });
|
|
51
47
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Stack } from './_stack.mjs';
|
|
2
|
-
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
3
1
|
import * as Schema from '../types/index.mjs';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare function
|
|
2
|
+
import * as Stack from './_stack.mjs';
|
|
3
|
+
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
4
|
+
export declare function BuildMinItems(_stack: Stack.XStack, _context: BuildContext, schema: Schema.XMinItems, value: string): string;
|
|
5
|
+
export declare function CheckMinItems(_stack: Stack.XStack, _context: CheckContext, schema: Schema.XMinItems, value: unknown[]): boolean;
|
|
6
|
+
export declare function ErrorMinItems(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XMinItems, value: unknown[]): boolean;
|
|
@@ -16,10 +16,6 @@ export function CheckMinItems(_stack, _context, schema, value) {
|
|
|
16
16
|
// Error
|
|
17
17
|
// ------------------------------------------------------------------
|
|
18
18
|
export function ErrorMinItems(stack, context, schemaPath, instancePath, schema, value) {
|
|
19
|
-
return CheckMinItems(stack, context, schema, value) ||
|
|
20
|
-
|
|
21
|
-
schemaPath,
|
|
22
|
-
instancePath,
|
|
23
|
-
params: { limit: schema.minItems }
|
|
24
|
-
});
|
|
19
|
+
return CheckMinItems(stack, context, schema, value) ||
|
|
20
|
+
context.AddError('minItems', schemaPath, instancePath, { limit: schema.minItems });
|
|
25
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Schema from '../types/index.mjs';
|
|
2
|
-
import
|
|
2
|
+
import * as Stack from './_stack.mjs';
|
|
3
3
|
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
4
|
-
export declare function BuildMinLength(_stack: Stack, _context: BuildContext, schema: Schema.XMinLength, value: string): string;
|
|
5
|
-
export declare function CheckMinLength(_stack: Stack, _context: CheckContext, schema: Schema.XMinLength, value: string): boolean;
|
|
6
|
-
export declare function ErrorMinLength(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XMinLength, value: string): boolean;
|
|
4
|
+
export declare function BuildMinLength(_stack: Stack.XStack, _context: BuildContext, schema: Schema.XMinLength, value: string): string;
|
|
5
|
+
export declare function CheckMinLength(_stack: Stack.XStack, _context: CheckContext, schema: Schema.XMinLength, value: string): boolean;
|
|
6
|
+
export declare function ErrorMinLength(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XMinLength, value: string): boolean;
|
|
@@ -16,10 +16,6 @@ export function CheckMinLength(_stack, _context, schema, value) {
|
|
|
16
16
|
// Error
|
|
17
17
|
// ------------------------------------------------------------------
|
|
18
18
|
export function ErrorMinLength(stack, context, schemaPath, instancePath, schema, value) {
|
|
19
|
-
return CheckMinLength(stack, context, schema, value) ||
|
|
20
|
-
|
|
21
|
-
schemaPath,
|
|
22
|
-
instancePath,
|
|
23
|
-
params: { limit: schema.minLength }
|
|
24
|
-
});
|
|
19
|
+
return CheckMinLength(stack, context, schema, value) ||
|
|
20
|
+
context.AddError('minLength', schemaPath, instancePath, { limit: schema.minLength });
|
|
25
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Schema from '../types/index.mjs';
|
|
2
|
-
import
|
|
2
|
+
import * as Stack from './_stack.mjs';
|
|
3
3
|
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
4
|
-
export declare function BuildMinProperties(_stack: Stack, _context: BuildContext, schema: Schema.XMinProperties, value: string): string;
|
|
5
|
-
export declare function CheckMinProperties(_stack: Stack, _context: CheckContext, schema: Schema.XMinProperties, value: Record<PropertyKey, unknown>): boolean;
|
|
6
|
-
export declare function ErrorMinProperties(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XMinProperties, value: Record<PropertyKey, unknown>): boolean;
|
|
4
|
+
export declare function BuildMinProperties(_stack: Stack.XStack, _context: BuildContext, schema: Schema.XMinProperties, value: string): string;
|
|
5
|
+
export declare function CheckMinProperties(_stack: Stack.XStack, _context: CheckContext, schema: Schema.XMinProperties, value: Record<PropertyKey, unknown>): boolean;
|
|
6
|
+
export declare function ErrorMinProperties(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XMinProperties, value: Record<PropertyKey, unknown>): boolean;
|
|
@@ -16,10 +16,6 @@ export function CheckMinProperties(_stack, _context, schema, value) {
|
|
|
16
16
|
// Error
|
|
17
17
|
// ------------------------------------------------------------------
|
|
18
18
|
export function ErrorMinProperties(stack, context, schemaPath, instancePath, schema, value) {
|
|
19
|
-
return CheckMinProperties(stack, context, schema, value) ||
|
|
20
|
-
|
|
21
|
-
schemaPath,
|
|
22
|
-
instancePath,
|
|
23
|
-
params: { limit: schema.minProperties },
|
|
24
|
-
});
|
|
19
|
+
return CheckMinProperties(stack, context, schema, value) ||
|
|
20
|
+
context.AddError('minProperties', schemaPath, instancePath, { limit: schema.minProperties });
|
|
25
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Schema from '../types/index.mjs';
|
|
2
|
-
import
|
|
2
|
+
import * as Stack from './_stack.mjs';
|
|
3
3
|
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
4
|
-
export declare function BuildMinimum(_stack: Stack, _context: BuildContext, schema: Schema.XMinimum, value: string): string;
|
|
5
|
-
export declare function CheckMinimum(_stack: Stack, _context: CheckContext, schema: Schema.XMinimum, value: number | bigint): boolean;
|
|
6
|
-
export declare function ErrorMinimum(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XMinimum, value: number | bigint): boolean;
|
|
4
|
+
export declare function BuildMinimum(_stack: Stack.XStack, _context: BuildContext, schema: Schema.XMinimum, value: string): string;
|
|
5
|
+
export declare function CheckMinimum(_stack: Stack.XStack, _context: CheckContext, schema: Schema.XMinimum, value: number | bigint): boolean;
|
|
6
|
+
export declare function ErrorMinimum(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XMinimum, value: number | bigint): boolean;
|
|
@@ -16,10 +16,6 @@ export function CheckMinimum(_stack, _context, schema, value) {
|
|
|
16
16
|
// Error
|
|
17
17
|
// ------------------------------------------------------------------
|
|
18
18
|
export function ErrorMinimum(stack, context, schemaPath, instancePath, schema, value) {
|
|
19
|
-
return CheckMinimum(stack, context, schema, value) ||
|
|
20
|
-
|
|
21
|
-
schemaPath,
|
|
22
|
-
instancePath,
|
|
23
|
-
params: { comparison: '>=', limit: schema.minimum }
|
|
24
|
-
});
|
|
19
|
+
return CheckMinimum(stack, context, schema, value) ||
|
|
20
|
+
context.AddError('minimum', schemaPath, instancePath, { comparison: '>=', limit: schema.minimum });
|
|
25
21
|
}
|