@openclaw/whatsapp 2026.9.4 → 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-CzEIEZqG.js → .setup/channel-CSclZYjU.mjs} +20 -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-DaIAK4fT.js → .setup/monitor-BblvzLpX.mjs} +68 -65
- 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-CZ6fHFFU.js → .setup/setup-finalize-BYEgU0hb.mjs} +6 -6
- package/dist/.setup/setup-plugin-api-CXfU-7vN.mjs +3 -0
- package/dist/{setup-surface-CnK_PPiA.js → .setup/setup-surface-Cd3wN5HD.mjs} +4 -4
- package/dist/{shared-CLKLJLgY.js → .setup/shared-C9OEtKgc.mjs} +47 -50
- 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 +11 -2
- package/package.json +7 -5
- package/dist/channel.runtime-BFiZ9WhU.js +0 -55
- package/dist/channel.setup-gIWoRLzt.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
|
@@ -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 BuildMultipleOf(_stack: Stack, _context: BuildContext, schema: Schema.XMultipleOf, value: string): string;
|
|
5
|
-
export declare function CheckMultipleOf(_stack: Stack, _context: CheckContext, schema: Schema.XMultipleOf, value: number | bigint): boolean;
|
|
6
|
-
export declare function ErrorMultipleOf(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XMultipleOf, value: number | bigint): boolean;
|
|
4
|
+
export declare function BuildMultipleOf(_stack: Stack.XStack, _context: BuildContext, schema: Schema.XMultipleOf, value: string): string;
|
|
5
|
+
export declare function CheckMultipleOf(_stack: Stack.XStack, _context: CheckContext, schema: Schema.XMultipleOf, value: number | bigint): boolean;
|
|
6
|
+
export declare function ErrorMultipleOf(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XMultipleOf, value: number | bigint): boolean;
|
|
@@ -16,10 +16,6 @@ export function CheckMultipleOf(_stack, _context, schema, value) {
|
|
|
16
16
|
// Error
|
|
17
17
|
// ------------------------------------------------------------------
|
|
18
18
|
export function ErrorMultipleOf(stack, context, schemaPath, instancePath, schema, value) {
|
|
19
|
-
return CheckMultipleOf(stack, context, schema, value) ||
|
|
20
|
-
|
|
21
|
-
schemaPath,
|
|
22
|
-
instancePath,
|
|
23
|
-
params: { multipleOf: schema.multipleOf }
|
|
24
|
-
});
|
|
19
|
+
return CheckMultipleOf(stack, context, schema, value) ||
|
|
20
|
+
context.AddError('multipleOf', schemaPath, instancePath, { multipleOf: schema.multipleOf });
|
|
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 BuildNot(stack: Stack, context: BuildContext, schema: Schema.XNot, value: string): string;
|
|
5
|
-
export declare function CheckNot(stack: Stack, context: CheckContext, schema: Schema.XNot, value: unknown): boolean;
|
|
6
|
-
export declare function ErrorNot(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XNot, value: unknown): boolean;
|
|
4
|
+
export declare function BuildNot(stack: Stack.XStack, context: BuildContext, schema: Schema.XNot, value: string): string;
|
|
5
|
+
export declare function CheckNot(stack: Stack.XStack, context: CheckContext, schema: Schema.XNot, value: unknown): boolean;
|
|
6
|
+
export declare function ErrorNot(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XNot, value: unknown): boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
|
-
import { CheckContext } from './_context.mjs';
|
|
3
2
|
import { Reducer } from './_reducer.mjs';
|
|
4
|
-
import {
|
|
3
|
+
import { CheckContext } from './_context.mjs';
|
|
5
4
|
import { BuildSchema, CheckSchema } from './schema.mjs';
|
|
5
|
+
import { EmitGuard as E } from '../../guard/index.mjs';
|
|
6
6
|
// ------------------------------------------------------------------
|
|
7
7
|
// Build
|
|
8
8
|
// ------------------------------------------------------------------
|
|
@@ -30,10 +30,6 @@ export function CheckNot(stack, context, schema, value) {
|
|
|
30
30
|
// Error
|
|
31
31
|
// ------------------------------------------------------------------
|
|
32
32
|
export function ErrorNot(stack, context, schemaPath, instancePath, schema, value) {
|
|
33
|
-
return CheckNot(stack, context, schema, value) ||
|
|
34
|
-
|
|
35
|
-
schemaPath,
|
|
36
|
-
instancePath,
|
|
37
|
-
params: {},
|
|
38
|
-
});
|
|
33
|
+
return CheckNot(stack, context, schema, value) ||
|
|
34
|
+
context.AddError('not', schemaPath, instancePath, {});
|
|
39
35
|
}
|
|
@@ -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 BuildOneOf(stack: Stack, context: BuildContext, schema: Schema.XOneOf, value: string): string;
|
|
5
|
-
export declare function CheckOneOf(stack: Stack, context: CheckContext, schema: Schema.XOneOf, value: unknown): boolean;
|
|
6
|
-
export declare function ErrorOneOf(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XOneOf, value: unknown): boolean;
|
|
4
|
+
export declare function BuildOneOf(stack: Stack.XStack, context: BuildContext, schema: Schema.XOneOf, value: string): string;
|
|
5
|
+
export declare function CheckOneOf(stack: Stack.XStack, context: CheckContext, schema: Schema.XOneOf, value: unknown): boolean;
|
|
6
|
+
export declare function ErrorOneOf(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XOneOf, value: unknown): boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
|
-
import { CheckContext, AccumulatedErrorContext } from './_context.mjs';
|
|
3
2
|
import { Reducer } from './_reducer.mjs';
|
|
4
|
-
import { EmitGuard as E, Guard as G } from '../../guard/index.mjs';
|
|
5
|
-
import { BuildSchema, CheckSchema, ErrorSchema } from './schema.mjs';
|
|
6
3
|
import { Unique } from './_unique.mjs';
|
|
4
|
+
import { CheckContext, ErrorContext } from './_context.mjs';
|
|
5
|
+
import { BuildSchema, CheckSchema, ErrorSchema } from './schema.mjs';
|
|
6
|
+
import { EmitGuard as E, Guard as G } from '../../guard/index.mjs';
|
|
7
7
|
// ------------------------------------------------------------------
|
|
8
8
|
// Build
|
|
9
9
|
// ------------------------------------------------------------------
|
|
@@ -38,7 +38,7 @@ export function ErrorOneOf(stack, context, schemaPath, instancePath, schema, val
|
|
|
38
38
|
const failedContexts = [];
|
|
39
39
|
const passingSchemas = [];
|
|
40
40
|
const passedContexts = schema.oneOf.reduce((result, schema, index) => {
|
|
41
|
-
const nextContext = new
|
|
41
|
+
const nextContext = new ErrorContext();
|
|
42
42
|
const nextSchemaPath = `${schemaPath}/oneOf/${index}`;
|
|
43
43
|
const isSchema = ErrorSchema(stack, nextContext, nextSchemaPath, instancePath, schema, value);
|
|
44
44
|
if (isSchema)
|
|
@@ -49,11 +49,6 @@ export function ErrorOneOf(stack, context, schemaPath, instancePath, schema, val
|
|
|
49
49
|
}, []);
|
|
50
50
|
const isOneOf = G.IsEqual(passedContexts.length, 1) && context.Merge(passedContexts);
|
|
51
51
|
if (!isOneOf && G.IsEqual(passingSchemas.length, 0))
|
|
52
|
-
failedContexts.forEach(failed => failed.GetErrors()
|
|
53
|
-
return isOneOf || context.AddError({
|
|
54
|
-
keyword: 'oneOf',
|
|
55
|
-
schemaPath,
|
|
56
|
-
instancePath,
|
|
57
|
-
params: { passingSchemas },
|
|
58
|
-
});
|
|
52
|
+
failedContexts.forEach(failed => context.AddErrors(failed.GetErrors()));
|
|
53
|
+
return isOneOf || context.AddError('oneOf', schemaPath, instancePath, { passingSchemas });
|
|
59
54
|
}
|
|
@@ -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 BuildPattern(_stack: Stack, _context: BuildContext, schema: Schema.XPattern, value: string): string;
|
|
5
|
-
export declare function CheckPattern(_stack: Stack, _context: CheckContext, schema: Schema.XPattern, value: string): boolean;
|
|
6
|
-
export declare function ErrorPattern(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XPattern, value: string): boolean;
|
|
4
|
+
export declare function BuildPattern(_stack: Stack.XStack, _context: BuildContext, schema: Schema.XPattern, value: string): string;
|
|
5
|
+
export declare function CheckPattern(_stack: Stack.XStack, _context: CheckContext, schema: Schema.XPattern, value: string): boolean;
|
|
6
|
+
export declare function ErrorPattern(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XPattern, value: string): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
2
|
import * as Externals from './_externals.mjs';
|
|
3
|
-
import { Guard as G, EmitGuard as E } from '../../guard/index.mjs';
|
|
4
3
|
import { UnicodeRegExp } from './_regexp.mjs';
|
|
4
|
+
import { Guard as G, EmitGuard as E } from '../../guard/index.mjs';
|
|
5
5
|
// ------------------------------------------------------------------
|
|
6
6
|
// Build
|
|
7
7
|
// ------------------------------------------------------------------
|
|
@@ -20,10 +20,6 @@ export function CheckPattern(_stack, _context, schema, value) {
|
|
|
20
20
|
// Error
|
|
21
21
|
// ------------------------------------------------------------------
|
|
22
22
|
export function ErrorPattern(stack, context, schemaPath, instancePath, schema, value) {
|
|
23
|
-
return CheckPattern(stack, context, schema, value) ||
|
|
24
|
-
|
|
25
|
-
schemaPath,
|
|
26
|
-
instancePath,
|
|
27
|
-
params: { pattern: schema.pattern }
|
|
28
|
-
});
|
|
23
|
+
return CheckPattern(stack, context, schema, value) ||
|
|
24
|
+
context.AddError('pattern', schemaPath, instancePath, { pattern: schema.pattern });
|
|
29
25
|
}
|
|
@@ -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 BuildPatternProperties(stack: Stack, context: BuildContext, schema: Schema.XPatternProperties, value: string): string;
|
|
5
|
-
export declare function CheckPatternProperties(stack: Stack, context: CheckContext, schema: Schema.XPatternProperties, value: Record<PropertyKey, unknown>): boolean;
|
|
6
|
-
export declare function ErrorPatternProperties(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XPatternProperties, value: Record<PropertyKey, unknown>): boolean;
|
|
4
|
+
export declare function BuildPatternProperties(stack: Stack.XStack, context: BuildContext, schema: Schema.XPatternProperties, value: string): string;
|
|
5
|
+
export declare function CheckPatternProperties(stack: Stack.XStack, context: CheckContext, schema: Schema.XPatternProperties, value: Record<PropertyKey, unknown>): boolean;
|
|
6
|
+
export declare function ErrorPatternProperties(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XPatternProperties, value: Record<PropertyKey, unknown>): boolean;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import * as Externals from './_externals.mjs';
|
|
3
3
|
import { Unique } from './_unique.mjs';
|
|
4
4
|
import { UnicodeRegExp } from './_regexp.mjs';
|
|
5
|
-
import { Guard as G, EmitGuard as E } from '../../guard/index.mjs';
|
|
6
5
|
import { BuildSchemaPushStack, CheckSchemaPushStack, ErrorSchemaPushStack } from './schema.mjs';
|
|
6
|
+
import { Guard as G, EmitGuard as E } from '../../guard/index.mjs';
|
|
7
7
|
// ------------------------------------------------------------------
|
|
8
8
|
// Build
|
|
9
9
|
// ------------------------------------------------------------------
|
|
@@ -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 BuildPrefixItems(stack: Stack, context: BuildContext, schema: Schema.XPrefixItems, value: string): string;
|
|
5
|
-
export declare function CheckPrefixItems(stack: Stack, context: CheckContext, schema: Schema.XPrefixItems, value: unknown[]): boolean;
|
|
6
|
-
export declare function ErrorPrefixItems(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XPrefixItems, value: unknown[]): boolean;
|
|
4
|
+
export declare function BuildPrefixItems(stack: Stack.XStack, context: BuildContext, schema: Schema.XPrefixItems, value: string): string;
|
|
5
|
+
export declare function CheckPrefixItems(stack: Stack.XStack, context: CheckContext, schema: Schema.XPrefixItems, value: unknown[]): boolean;
|
|
6
|
+
export declare function ErrorPrefixItems(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XPrefixItems, value: unknown[]): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
|
-
import { Guard as G, EmitGuard as E } from '../../guard/index.mjs';
|
|
3
2
|
import { BuildSchemaPushStack, CheckSchemaPushStack, ErrorSchemaPushStack } from './schema.mjs';
|
|
3
|
+
import { Guard as G, EmitGuard as E } from '../../guard/index.mjs';
|
|
4
4
|
// ------------------------------------------------------------------
|
|
5
5
|
// Build
|
|
6
6
|
// ------------------------------------------------------------------
|
|
@@ -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 BuildProperties(stack: Stack, context: BuildContext, schema: Schema.XProperties, value: string): string;
|
|
5
|
-
export declare function CheckProperties(stack: Stack, context: CheckContext, schema: Schema.XProperties, value: Record<PropertyKey, unknown>): boolean;
|
|
6
|
-
export declare function ErrorProperties(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XProperties, value: Record<PropertyKey, unknown>): boolean;
|
|
4
|
+
export declare function BuildProperties(stack: Stack.XStack, context: BuildContext, schema: Schema.XProperties, value: string): string;
|
|
5
|
+
export declare function CheckProperties(stack: Stack.XStack, context: CheckContext, schema: Schema.XProperties, value: Record<PropertyKey, unknown>): boolean;
|
|
6
|
+
export declare function ErrorProperties(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XProperties, value: Record<PropertyKey, unknown>): boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
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';
|
|
5
4
|
import { InexactOptionalCheck, InexactOptionalBuild, IsExactOptional } from './_exact_optional.mjs';
|
|
5
|
+
import { Guard as G, EmitGuard as E } from '../../guard/index.mjs';
|
|
6
6
|
// ------------------------------------------------------------------
|
|
7
7
|
// Build
|
|
8
8
|
// ------------------------------------------------------------------
|
|
@@ -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 BuildPropertyNames(stack: Stack, context: BuildContext, schema: Schema.XPropertyNames, value: string): string;
|
|
5
|
-
export declare function CheckPropertyNames(stack: Stack, context: CheckContext, schema: Schema.XPropertyNames, value: Record<PropertyKey, unknown>): boolean;
|
|
6
|
-
export declare function ErrorPropertyNames(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XPropertyNames, value: Record<PropertyKey, unknown>): boolean;
|
|
4
|
+
export declare function BuildPropertyNames(stack: Stack.XStack, context: BuildContext, schema: Schema.XPropertyNames, value: string): string;
|
|
5
|
+
export declare function CheckPropertyNames(stack: Stack.XStack, context: CheckContext, schema: Schema.XPropertyNames, value: Record<PropertyKey, unknown>): boolean;
|
|
6
|
+
export declare function ErrorPropertyNames(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XPropertyNames, value: Record<PropertyKey, unknown>): boolean;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
2
|
import { Unique } from './_unique.mjs';
|
|
3
|
-
import { AccumulatedErrorContext } from './_context.mjs';
|
|
4
|
-
import { EmitGuard as E, Guard as G } from '../../guard/index.mjs';
|
|
5
3
|
import { BuildSchema, CheckSchema, ErrorSchema } from './schema.mjs';
|
|
4
|
+
import { EmitGuard as E, Guard as G } from '../../guard/index.mjs';
|
|
6
5
|
// ------------------------------------------------------------------
|
|
7
6
|
// Build
|
|
8
7
|
// ------------------------------------------------------------------
|
|
@@ -24,16 +23,11 @@ export function ErrorPropertyNames(stack, context, schemaPath, instancePath, sch
|
|
|
24
23
|
const isPropertyNames = G.EveryAll(G.Keys(value), 0, (key, _index) => {
|
|
25
24
|
const nextInstancePath = `${instancePath}/${key}`;
|
|
26
25
|
const nextSchemaPath = `${schemaPath}/propertyNames`;
|
|
27
|
-
const
|
|
28
|
-
const isPropertyName = ErrorSchema(stack, nextContext, nextSchemaPath, nextInstancePath, schema.propertyNames, key);
|
|
26
|
+
const isPropertyName = ErrorSchema(stack, context, nextSchemaPath, nextInstancePath, schema.propertyNames, key);
|
|
29
27
|
if (!isPropertyName)
|
|
30
28
|
propertyNames.push(key);
|
|
31
29
|
return isPropertyName;
|
|
32
30
|
});
|
|
33
|
-
return isPropertyNames ||
|
|
34
|
-
|
|
35
|
-
schemaPath,
|
|
36
|
-
instancePath,
|
|
37
|
-
params: { propertyNames }
|
|
38
|
-
});
|
|
31
|
+
return isPropertyNames ||
|
|
32
|
+
context.AddError('propertyNames', schemaPath, instancePath, { propertyNames });
|
|
39
33
|
}
|
|
@@ -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 BuildRecursiveRef(stack: Stack, context: BuildContext, schema: Schema.XRecursiveRef, value: string): string;
|
|
5
|
-
export declare function CheckRecursiveRef(stack: Stack, context: CheckContext, schema: Schema.XRecursiveRef, value: unknown): boolean;
|
|
6
|
-
export declare function ErrorRecursiveRef(stack: Stack, context: ErrorContext, _schemaPath: string, instancePath: string, schema: Schema.XRecursiveRef, value: unknown): boolean;
|
|
4
|
+
export declare function BuildRecursiveRef(stack: Stack.XStack, context: BuildContext, schema: Schema.XRecursiveRef, value: string): string;
|
|
5
|
+
export declare function CheckRecursiveRef(stack: Stack.XStack, context: CheckContext, schema: Schema.XRecursiveRef, value: unknown): boolean;
|
|
6
|
+
export declare function ErrorRecursiveRef(stack: Stack.XStack, context: ErrorContext, _schemaPath: string, instancePath: string, schema: Schema.XRecursiveRef, 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 BuildRecursiveRef(stack, context, schema, value) {
|
|
9
|
-
const target =
|
|
10
|
-
|
|
10
|
+
const target = Resolve.RecursiveRef(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 CheckRecursiveRef(stack, context, schema, value) {
|
|
16
|
-
const target =
|
|
17
|
-
|
|
18
|
+
const target = Resolve.RecursiveRef(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 ErrorRecursiveRef(stack, context, _schemaPath, instancePath, schema, value) {
|
|
23
|
-
const target =
|
|
24
|
-
|
|
26
|
+
const target = Resolve.RecursiveRef(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 BuildRef(stack: Stack, context: BuildContext, schema: Schema.XRef, value: string): string;
|
|
5
|
-
export declare function CheckRef(stack: Stack, context: CheckContext, schema: Schema.XRef, value: unknown): boolean;
|
|
6
|
-
export declare function ErrorRef(stack: Stack, context: ErrorContext, _schemaPath: string, instancePath: string, schema: Schema.XRef, value: unknown): boolean;
|
|
4
|
+
export declare function BuildRef(stack: Stack.XStack, context: BuildContext, schema: Schema.XRef, value: string): string;
|
|
5
|
+
export declare function CheckRef(stack: Stack.XStack, context: CheckContext, schema: Schema.XRef, value: unknown): boolean;
|
|
6
|
+
export declare function ErrorRef(stack: Stack.XStack, context: ErrorContext, _schemaPath: string, instancePath: string, schema: Schema.XRef, value: unknown): boolean;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
2
|
import * as Functions from './_functions.mjs';
|
|
3
3
|
import * as Schema from '../types/index.mjs';
|
|
4
|
-
import {
|
|
4
|
+
import { Resolve } from '../resolve/index.mjs';
|
|
5
|
+
import { CheckContext, ErrorContext } from './_context.mjs';
|
|
5
6
|
import { EmitGuard as E } from '../../guard/index.mjs';
|
|
6
7
|
import { CheckSchema, ErrorSchema } from './schema.mjs';
|
|
7
8
|
// ------------------------------------------------------------------
|
|
@@ -21,32 +22,35 @@ function BuildRefFast(stack, context, target, value) {
|
|
|
21
22
|
return Functions.CreateFunction(stack, context, target, value);
|
|
22
23
|
}
|
|
23
24
|
export function BuildRef(stack, context, schema, value) {
|
|
24
|
-
const
|
|
25
|
+
const result = Resolve.Ref(stack, schema);
|
|
26
|
+
const target = result.schema ?? false;
|
|
25
27
|
return context.UseUnevaluated()
|
|
26
|
-
? BuildRefStandard(stack, context, target, value)
|
|
27
|
-
: BuildRefFast(stack, context, target, value);
|
|
28
|
+
? BuildRefStandard(result.stack, context, target, value)
|
|
29
|
+
: BuildRefFast(result.stack, context, target, value);
|
|
28
30
|
}
|
|
29
31
|
// ------------------------------------------------------------------
|
|
30
32
|
// Check
|
|
31
33
|
// ------------------------------------------------------------------
|
|
32
34
|
export function CheckRef(stack, context, schema, value) {
|
|
33
|
-
const
|
|
35
|
+
const result = Resolve.Ref(stack, schema);
|
|
36
|
+
const target = result.schema ?? false;
|
|
34
37
|
const nextContext = new CheckContext();
|
|
35
|
-
const
|
|
36
|
-
if (
|
|
38
|
+
const valid = (Schema.IsSchema(target) && CheckSchema(result.stack, nextContext, target, value));
|
|
39
|
+
if (valid)
|
|
37
40
|
context.Merge([nextContext]);
|
|
38
|
-
return
|
|
41
|
+
return valid;
|
|
39
42
|
}
|
|
40
43
|
// ------------------------------------------------------------------
|
|
41
44
|
// Error
|
|
42
45
|
// ------------------------------------------------------------------
|
|
43
46
|
export function ErrorRef(stack, context, _schemaPath, instancePath, schema, value) {
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
|
|
47
|
+
const result = Resolve.Ref(stack, schema);
|
|
48
|
+
const target = result.schema ?? false;
|
|
49
|
+
const nextContext = new ErrorContext();
|
|
50
|
+
const valid = (Schema.IsSchema(target) && ErrorSchema(result.stack, nextContext, '#', instancePath, target, value));
|
|
51
|
+
if (valid)
|
|
48
52
|
context.Merge([nextContext]);
|
|
49
|
-
if (!
|
|
50
|
-
nextContext.GetErrors()
|
|
51
|
-
return
|
|
53
|
+
if (!valid)
|
|
54
|
+
context.AddErrors(nextContext.GetErrors());
|
|
55
|
+
return valid;
|
|
52
56
|
}
|
|
@@ -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 BuildRequired(_stack: Stack, _context: BuildContext, schema: Schema.XRequired, value: string): string;
|
|
5
|
-
export declare function CheckRequired(_stack: Stack, _context: CheckContext, schema: Schema.XRequired, value: Record<PropertyKey, unknown>): boolean;
|
|
6
|
-
export declare function ErrorRequired(_stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XRequired, value: Record<PropertyKey, unknown>): boolean;
|
|
4
|
+
export declare function BuildRequired(_stack: Stack.XStack, _context: BuildContext, schema: Schema.XRequired, value: string): string;
|
|
5
|
+
export declare function CheckRequired(_stack: Stack.XStack, _context: CheckContext, schema: Schema.XRequired, value: Record<PropertyKey, unknown>): boolean;
|
|
6
|
+
export declare function ErrorRequired(_stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XRequired, value: Record<PropertyKey, unknown>): boolean;
|
|
@@ -23,10 +23,6 @@ export function ErrorRequired(_stack, context, schemaPath, instancePath, schema,
|
|
|
23
23
|
requiredProperties.push(key);
|
|
24
24
|
return hasKey;
|
|
25
25
|
});
|
|
26
|
-
return isRequired ||
|
|
27
|
-
|
|
28
|
-
schemaPath,
|
|
29
|
-
instancePath,
|
|
30
|
-
params: { requiredProperties }
|
|
31
|
-
});
|
|
26
|
+
return isRequired ||
|
|
27
|
+
context.AddError('required', schemaPath, instancePath, { requiredProperties });
|
|
32
28
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as Schema from '../types/index.mjs';
|
|
2
|
-
import { Stack } from './_stack.mjs';
|
|
3
2
|
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
4
|
-
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
7
|
-
export declare function
|
|
8
|
-
export declare function
|
|
9
|
-
export declare function
|
|
3
|
+
import * as Stack from './_stack.mjs';
|
|
4
|
+
export declare function BuildSchemaPushStack(stack: Stack.XStack, context: BuildContext, schema: Schema.XSchema, value: string): string;
|
|
5
|
+
export declare function BuildSchema(stack: Stack.XStack, context: BuildContext, schema: Schema.XSchema, value: string): string;
|
|
6
|
+
export declare function CheckSchemaPushStack(stack: Stack.XStack, context: CheckContext, schema: Schema.XSchema, value: unknown): boolean;
|
|
7
|
+
export declare function CheckSchema(stack: Stack.XStack, context: CheckContext, schema: Schema.XSchema, value: unknown): boolean;
|
|
8
|
+
export declare function ErrorSchemaPushStack(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XSchema, value: unknown): boolean;
|
|
9
|
+
export declare function ErrorSchema(stack: Stack.XStack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XSchema, value: unknown): boolean;
|