@openclaw/slack 2026.7.1-beta.2 → 2026.7.1-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{account-inspect-DOtQbKkB.js → account-inspect-Di7ditqZ.js} +1 -1
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-BPCiCe8y.js → accounts-BOJJiHSr.js} +14 -1
- package/dist/accounts.runtime-DWvaCb-X.js +2 -0
- package/dist/{action-runtime-E9QZMf0z.js → action-runtime-DoQGk_8D.js} +36 -32
- package/dist/action-runtime.runtime-BABj3aM-.js +2 -0
- package/dist/{actions-CqRHPciJ.js → actions-DMpDmKEA.js} +211 -57
- package/dist/actions.runtime-C103_BPW.js +2 -0
- package/dist/api.js +13 -13
- package/dist/{approval-handler.runtime-BqNO_HC_.js → approval-handler.runtime-CIUbOt5T.js} +2 -2
- package/dist/{channel-jO8Jdkge.js → channel-CG29WLVd.js} +198 -87
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-CDOZ8V3p.js → channel.setup-Dq6syTNU.js} +3 -3
- package/dist/{client-DG9cyk55.js → client-DGxwSL7f.js} +0 -1
- package/dist/{directory-config-DDVHDmrN.js → directory-config-BZuS8141.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-DC-YA5SQ.js → directory-live-BNsxCgqP.js} +2 -2
- package/dist/format-YCNoNkM2.js +107 -0
- package/dist/http-routes-api.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{interactive-replies-D-22gTp3.js → interactive-replies-CXpT-vA_.js} +13 -2
- package/dist/interactive-replies-api.js +1 -1
- package/dist/{message-tool-api--zYyTqrR.js → message-tool-api-BgWKyu2r.js} +11 -4
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-BQ7P93ll.js → monitor-D6Km2CFH.js} +3 -3
- package/dist/outbound-adapter-DVoBfBW5.js +272 -0
- package/dist/{pipeline.runtime-cxw6Zihc.js → pipeline.runtime-0wEFX2CS.js} +184 -260
- package/dist/{plugin-routes-B9PvcDQJ.js → plugin-routes-CLp4obpN.js} +1 -1
- package/dist/{policy-DAE6BTN3.js → policy-Dj-puVPb.js} +10 -4
- package/dist/{probe-DFKt9Ute.js → probe-CuwRDE5j.js} +10 -4
- package/dist/{provider-BdoeWKr8.js → provider-Cot8h818.js} +153 -120
- package/dist/{relay-source-OcqQzKfX.js → relay-source-CU1LhyBj.js} +2 -2
- package/dist/{replies-D_G-EPr8.js → replies-Bbx6pG_B.js} +4 -3
- package/dist/{reply-blocks-CfJqf7eq.js → reply-blocks-BGQ6zSqM.js} +184 -36
- package/dist/{resolve-channels-eniB45fy.js → resolve-channels-CstkChBE.js} +1 -1
- package/dist/{resolve-users-DDKzl37a.js → resolve-users-C3NP2c-Q.js} +1 -1
- package/dist/{runtime-api-DHJ8ntLr.js → runtime-api-CEmqYxR-.js} +1 -1
- package/dist/runtime-api.js +12 -12
- package/dist/{scopes-BdVdJxFf.js → scopes-DCWVD5-8.js} +2 -2
- package/dist/{send-Dg6U9K7_.js → send-DKDXoeoV.js} +392 -225
- package/dist/send.runtime-GPRa63l1.js +2 -0
- package/dist/{setup-core-BCGzyZhx.js → setup-core-fGd6Gquy.js} +4 -3
- package/dist/setup-entry.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-D7xdZLxB.js → setup-surface-Dv2fIJNB.js} +5 -5
- package/dist/{shared-iMaNxOIL.js → shared-CosfcFri.js} +5 -5
- package/dist/{slash-dispatch.runtime-DVhs_fpQ.js → slash-dispatch.runtime-Ccm3quU1.js} +1 -1
- package/node_modules/@slack/web-api/dist/chat-stream.d.ts +6 -0
- package/node_modules/@slack/web-api/dist/chat-stream.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/chat-stream.js +8 -0
- package/node_modules/@slack/web-api/dist/chat-stream.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/request/assistant.d.ts +1 -1
- package/node_modules/@slack/web-api/dist/types/request/assistant.d.ts.map +1 -1
- package/node_modules/@slack/web-api/package.json +1 -1
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/assert/strict.d.ts +10 -1
- package/node_modules/@types/node/assert.d.ts +144 -17
- package/node_modules/@types/node/async_hooks.d.ts +9 -9
- package/node_modules/@types/node/buffer.d.ts +64 -30
- package/node_modules/@types/node/child_process.d.ts +17 -21
- package/node_modules/@types/node/cluster.d.ts +13 -13
- package/node_modules/@types/node/console.d.ts +1 -1
- package/node_modules/@types/node/crypto.d.ts +471 -575
- package/node_modules/@types/node/diagnostics_channel.d.ts +274 -32
- package/node_modules/@types/node/dns.d.ts +15 -15
- package/node_modules/@types/node/events.d.ts +3 -3
- package/node_modules/@types/node/ffi.d.ts +486 -0
- package/node_modules/@types/node/fs/promises.d.ts +7 -4
- package/node_modules/@types/node/fs.d.ts +24 -18
- package/node_modules/@types/node/globals.d.ts +4 -4
- package/node_modules/@types/node/http.d.ts +30 -5
- package/node_modules/@types/node/http2.d.ts +2 -1
- package/node_modules/@types/node/index.d.ts +1 -3
- package/node_modules/@types/node/inspector.d.ts +1 -1
- package/node_modules/@types/node/module.d.ts +16 -45
- package/node_modules/@types/node/net.d.ts +1 -1
- package/node_modules/@types/node/os.d.ts +2 -2
- package/node_modules/@types/node/package.json +4 -4
- package/node_modules/@types/node/perf_hooks.d.ts +1 -9
- package/node_modules/@types/node/process.d.ts +25 -12
- package/node_modules/@types/node/quic.d.ts +92 -11
- package/node_modules/@types/node/readline.d.ts +12 -11
- package/node_modules/@types/node/repl.d.ts +10 -10
- package/node_modules/@types/node/sqlite.d.ts +56 -1
- package/node_modules/@types/node/stream/iter.d.ts +150 -0
- package/node_modules/@types/node/stream/promises.d.ts +2 -2
- package/node_modules/@types/node/stream/web.d.ts +1 -1
- package/node_modules/@types/node/stream.d.ts +37 -5
- package/node_modules/@types/node/test/reporters.d.ts +1 -1
- package/node_modules/@types/node/test.d.ts +120 -10
- package/node_modules/@types/node/tls.d.ts +1 -1
- package/node_modules/@types/node/ts5.6/index.d.ts +2 -4
- package/node_modules/@types/node/ts5.7/index.d.ts +1 -3
- package/node_modules/@types/node/url.d.ts +3 -3
- package/node_modules/@types/node/util/types.d.ts +1 -1
- package/node_modules/@types/node/util.d.ts +22 -22
- package/node_modules/@types/node/v8.d.ts +85 -3
- package/node_modules/@types/node/vm.d.ts +9 -9
- package/node_modules/@types/node/web-globals/domexception.d.ts +15 -0
- package/node_modules/@types/node/worker_threads.d.ts +10 -12
- package/node_modules/@types/node/zlib.d.ts +3 -3
- package/node_modules/body-parser/README.md +16 -1
- package/node_modules/body-parser/index.js +4 -20
- package/node_modules/body-parser/lib/read.js +17 -17
- package/node_modules/body-parser/lib/types/json.js +60 -32
- package/node_modules/body-parser/lib/types/raw.js +3 -3
- package/node_modules/body-parser/lib/types/text.js +3 -3
- package/node_modules/body-parser/lib/types/urlencoded.js +16 -20
- package/node_modules/body-parser/lib/utils.js +18 -16
- package/node_modules/body-parser/node_modules/content-type/LICENSE +22 -0
- package/node_modules/body-parser/node_modules/content-type/README.md +69 -0
- package/node_modules/body-parser/node_modules/content-type/dist/index.d.ts +26 -0
- package/node_modules/body-parser/node_modules/content-type/dist/index.js +170 -0
- package/node_modules/body-parser/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/body-parser/node_modules/content-type/package.json +52 -0
- package/node_modules/body-parser/package.json +23 -10
- package/node_modules/range-parser/README.md +13 -12
- package/node_modules/range-parser/index.js +27 -8
- package/node_modules/range-parser/package.json +12 -8
- package/node_modules/semver/classes/range.js +6 -2
- package/node_modules/semver/package.json +1 -1
- package/node_modules/side-channel/CHANGELOG.md +10 -0
- package/node_modules/side-channel/README.md +1 -1
- package/node_modules/side-channel/index.js +5 -2
- package/node_modules/side-channel/package.json +10 -10
- package/node_modules/side-channel/test/index.js +16 -0
- package/node_modules/typebox/build/compile/validator.d.mts +2 -7
- package/node_modules/typebox/build/compile/validator.mjs +6 -36
- package/node_modules/typebox/build/error/errors.d.mts +1 -7
- package/node_modules/typebox/build/format/_idna.mjs +36 -6
- package/node_modules/typebox/build/format/_puny.mjs +4 -1
- package/node_modules/typebox/build/format/uuid.d.mts +2 -2
- package/node_modules/typebox/build/format/uuid.mjs +3 -3
- package/node_modules/typebox/build/guard/emit.d.mts +0 -4
- package/node_modules/typebox/build/guard/emit.mjs +0 -8
- package/node_modules/typebox/build/guard/guard.d.mts +4 -8
- package/node_modules/typebox/build/guard/guard.mjs +5 -13
- package/node_modules/typebox/build/schema/engine/boolean.d.mts +3 -3
- package/node_modules/typebox/build/schema/engine/boolean.mjs +4 -4
- package/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
- package/node_modules/typebox/build/schema/engine/index.mjs +0 -1
- package/node_modules/typebox/build/schema/engine/schema.mjs +5 -10
- package/node_modules/typebox/build/schema/engine/type.mjs +14 -18
- package/node_modules/typebox/build/schema/types/dependencies.mjs +1 -1
- package/node_modules/typebox/build/schema/types/index.d.mts +0 -1
- package/node_modules/typebox/build/schema/types/index.mjs +0 -1
- package/node_modules/typebox/build/schema/types/schema.d.mts +1 -1
- package/node_modules/typebox/build/schema/types/schema.mjs +2 -2
- package/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
- package/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
- package/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
- package/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
- package/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
- package/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
- package/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
- package/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
- package/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
- package/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
- package/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
- package/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
- package/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
- package/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
- package/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
- package/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
- package/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
- package/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
- package/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
- package/node_modules/typebox/build/system/memory/clone.mjs +73 -26
- package/node_modules/typebox/build/system/settings/settings.d.mts +15 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +3 -1
- package/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
- package/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
- package/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
- package/node_modules/typebox/build/type/action/conditional.d.mts +2 -3
- package/node_modules/typebox/build/type/action/conditional.mjs +2 -1
- package/node_modules/typebox/build/type/action/index.d.mts +7 -4
- package/node_modules/typebox/build/type/action/index.mjs +7 -4
- package/node_modules/typebox/build/type/action/mapped.d.mts +2 -3
- package/node_modules/typebox/build/type/action/mapped.mjs +2 -1
- package/node_modules/typebox/build/type/action/module.d.mts +8 -7
- package/node_modules/typebox/build/type/action/module.mjs +7 -6
- package/node_modules/typebox/build/type/action/readonly_object.d.mts +0 -5
- package/node_modules/typebox/build/type/action/readonly_object.mjs +0 -5
- package/node_modules/typebox/build/type/action/with.d.mts +11 -0
- package/node_modules/typebox/build/type/action/with.mjs +11 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
- package/node_modules/typebox/build/type/engine/call/instantiate.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +3 -2
- package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +2 -2
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +3 -4
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +2 -1
- package/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +2 -3
- package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +3 -6
- package/node_modules/typebox/build/type/engine/cyclic/check.d.mts +6 -9
- package/node_modules/typebox/build/type/engine/cyclic/check.mjs +10 -16
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
- package/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +2 -5
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +3 -2
- package/node_modules/typebox/build/type/engine/enum/index.d.mts +0 -1
- package/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +1 -2
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +2 -6
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +10 -6
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +10 -6
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +3 -3
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +17 -5
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +34 -8
- package/node_modules/typebox/build/type/engine/exclude/operation.d.mts +5 -6
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +11 -12
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +5 -6
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +11 -12
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/index.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/index.mjs +2 -2
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +3 -3
- package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +4 -4
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +9 -6
- package/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +5 -2
- package/node_modules/typebox/build/type/engine/instantiate.d.mts +44 -31
- package/node_modules/typebox/build/type/engine/instantiate.mjs +82 -83
- package/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +3 -6
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +5 -1
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +4 -4
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +3 -3
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +5 -4
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +10 -5
- package/node_modules/typebox/build/type/engine/module/instantiate.d.mts +7 -9
- package/node_modules/typebox/build/type/engine/module/instantiate.mjs +17 -15
- package/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/object/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/object/from_type.mjs +8 -5
- package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +3 -4
- package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +2 -1
- package/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/partial/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/partial/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/partial/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/partial/from_type.mjs +7 -4
- package/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +28 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +8 -5
- package/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +2 -2
- package/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +3 -3
- package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +6 -6
- package/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/required/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/required/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/required/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/required/from_type.mjs +7 -4
- package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +3 -3
- package/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +6 -6
- package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
- package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +1 -0
- package/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
- package/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/{options → with}/instantiate.mjs +5 -5
- package/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
- package/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
- package/node_modules/typebox/build/type/extends/enum.d.mts +4 -4
- package/node_modules/typebox/build/type/extends/enum.mjs +3 -2
- package/node_modules/typebox/build/type/extends/extends_left.d.mts +5 -7
- package/node_modules/typebox/build/type/extends/extends_left.mjs +24 -27
- package/node_modules/typebox/build/type/extends/extends_right.d.mts +7 -5
- package/node_modules/typebox/build/type/extends/extends_right.mjs +20 -15
- package/node_modules/typebox/build/type/extends/inference.mjs +1 -1
- package/node_modules/typebox/build/type/extends/object.d.mts +8 -1
- package/node_modules/typebox/build/type/extends/object.mjs +25 -3
- package/node_modules/typebox/build/type/extends/parameters.mjs +2 -2
- package/node_modules/typebox/build/type/extends/record.d.mts +13 -0
- package/node_modules/typebox/build/type/extends/record.mjs +23 -0
- package/node_modules/typebox/build/type/extends/template_literal.d.mts +3 -3
- package/node_modules/typebox/build/type/extends/template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/extends/tuple.d.mts +3 -6
- package/node_modules/typebox/build/type/extends/tuple.mjs +6 -5
- package/node_modules/typebox/build/type/extends/union.mjs +2 -2
- package/node_modules/typebox/build/type/script/mapping.d.mts +84 -99
- package/node_modules/typebox/build/type/script/mapping.mjs +81 -85
- package/node_modules/typebox/build/type/script/parser.d.mts +40 -40
- package/node_modules/typebox/build/type/script/parser.mjs +22 -22
- package/node_modules/typebox/build/type/script/script.d.mts +3 -4
- package/node_modules/typebox/build/type/script/script.mjs +3 -2
- package/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -1
- package/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/internal/take.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/until.mjs +2 -2
- package/node_modules/typebox/build/type/types/_codec.d.mts +12 -12
- package/node_modules/typebox/build/type/types/_codec.mjs +0 -1
- package/node_modules/typebox/build/type/types/_immutable.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_immutable.mjs +2 -10
- package/node_modules/typebox/build/type/types/_optional.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_optional.mjs +2 -11
- package/node_modules/typebox/build/type/types/_readonly.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_readonly.mjs +2 -10
- package/node_modules/typebox/build/type/types/_refine.d.mts +8 -10
- package/node_modules/typebox/build/type/types/_refine.mjs +1 -2
- package/node_modules/typebox/build/type/types/call.d.mts +3 -3
- package/node_modules/typebox/build/type/types/call.mjs +3 -2
- package/node_modules/typebox/build/type/types/deferred.d.mts +1 -0
- package/node_modules/typebox/build/type/types/deferred.mjs +1 -1
- package/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
- package/node_modules/typebox/build/type/types/dependent.mjs +24 -0
- package/node_modules/typebox/build/type/types/enum.d.mts +3 -1
- package/node_modules/typebox/build/type/types/enum.mjs +5 -0
- package/node_modules/typebox/build/type/types/index.d.mts +1 -4
- package/node_modules/typebox/build/type/types/index.mjs +1 -4
- package/node_modules/typebox/build/type/types/number.d.mts +1 -1
- package/node_modules/typebox/build/type/types/number.mjs +1 -1
- package/node_modules/typebox/build/type/types/record.d.mts +13 -7
- package/node_modules/typebox/build/type/types/record.mjs +15 -9
- package/node_modules/typebox/build/type/types/static.d.mts +2 -5
- package/node_modules/typebox/build/typebox.d.mts +4 -8
- package/node_modules/typebox/build/typebox.mjs +4 -8
- package/node_modules/typebox/build/value/clean/clean.mjs +4 -2
- package/node_modules/typebox/build/value/clean/from_intersect.mjs +2 -2
- package/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
- package/node_modules/typebox/build/value/clean/from_union.d.mts +1 -1
- package/node_modules/typebox/build/value/clean/from_union.mjs +1 -2
- package/node_modules/typebox/build/value/clone/clone.mjs +2 -73
- package/node_modules/typebox/build/value/codec/decode.mjs +4 -2
- package/node_modules/typebox/build/value/codec/encode.mjs +4 -2
- package/node_modules/typebox/build/value/codec/from_array.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_object.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_record.mjs +2 -7
- package/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_union.mjs +2 -3
- package/node_modules/typebox/build/value/convert/from_enum.mjs +3 -4
- package/node_modules/typebox/build/value/convert/from_template_literal.d.mts +1 -1
- package/node_modules/typebox/build/value/convert/from_template_literal.mjs +2 -3
- package/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
- package/node_modules/typebox/build/value/create/from_enum.mjs +2 -2
- package/node_modules/typebox/build/value/create/from_type.mjs +23 -31
- package/node_modules/typebox/build/value/default/from_object.mjs +1 -1
- package/node_modules/typebox/build/value/default/from_type.mjs +8 -10
- package/node_modules/typebox/build/value/index.d.mts +0 -1
- package/node_modules/typebox/build/value/index.mjs +0 -1
- package/node_modules/typebox/build/value/repair/from_enum.mjs +2 -3
- package/node_modules/typebox/build/value/repair/from_type.mjs +24 -22
- package/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +6 -2
- package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +62 -26
- package/node_modules/typebox/build/value/value.d.mts +0 -1
- package/node_modules/typebox/build/value/value.mjs +0 -1
- package/node_modules/typebox/package.json +25 -25
- package/node_modules/typebox/readme.md +97 -80
- package/node_modules/undici-types/agent.d.ts +0 -2
- package/node_modules/undici-types/client.d.ts +25 -19
- package/node_modules/undici-types/dispatcher.d.ts +7 -33
- package/node_modules/undici-types/dispatcher1-wrapper.d.ts +7 -0
- package/node_modules/undici-types/fetch.d.ts +24 -4
- package/node_modules/undici-types/h2c-client.d.ts +6 -6
- package/node_modules/undici-types/handlers.d.ts +1 -2
- package/node_modules/undici-types/header.d.ts +5 -0
- package/node_modules/undici-types/index.d.ts +3 -1
- package/node_modules/undici-types/interceptors.d.ts +1 -1
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/pool.d.ts +0 -2
- package/node_modules/undici-types/proxy-agent.d.ts +2 -2
- package/node_modules/undici-types/round-robin-pool.d.ts +0 -2
- package/node_modules/undici-types/snapshot-agent.d.ts +4 -0
- package/node_modules/undici-types/socks5-proxy-agent.d.ts +2 -2
- package/node_modules/undici-types/webidl.d.ts +0 -1
- package/npm-shrinkwrap.json +55 -56
- package/openclaw.plugin.json +46 -0
- package/package.json +6 -6
- package/dist/accounts.runtime-CgWgzjLX.js +0 -2
- package/dist/action-runtime.runtime-BQrVgSOq.js +0 -2
- package/dist/actions.runtime-Dl6AfO_g.js +0 -2
- package/dist/errors-CZtmv-h0.js +0 -107
- package/dist/outbound-adapter-BHUtpXz0.js +0 -188
- package/dist/send.runtime-a-O4PP2B.js +0 -2
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/LICENSE +0 -21
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/README.md +0 -15
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/assert/strict.d.ts +0 -59
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/assert.d.ts +0 -950
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/async_hooks.d.ts +0 -711
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/buffer.buffer.d.ts +0 -466
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/buffer.d.ts +0 -1765
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/child_process.d.ts +0 -1366
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/cluster.d.ts +0 -432
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/console.d.ts +0 -93
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/constants.d.ts +0 -14
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/crypto.d.ts +0 -4058
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/dgram.d.ts +0 -537
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/diagnostics_channel.d.ts +0 -552
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/dns/promises.d.ts +0 -497
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/dns.d.ts +0 -876
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/domain.d.ts +0 -150
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/events.d.ts +0 -1008
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/fs/promises.d.ts +0 -1468
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/fs.d.ts +0 -4780
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/globals.d.ts +0 -150
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/globals.typedarray.d.ts +0 -101
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/http.d.ts +0 -2147
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/http2.d.ts +0 -2485
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/https.d.ts +0 -400
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/index.d.ts +0 -117
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/inspector/promises.d.ts +0 -35
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/inspector.d.ts +0 -264
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/inspector.generated.d.ts +0 -4406
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/module.d.ts +0 -755
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/net.d.ts +0 -970
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/os.d.ts +0 -498
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/package.json +0 -155
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/path/posix.d.ts +0 -8
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/path/win32.d.ts +0 -8
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/path.d.ts +0 -178
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/perf_hooks.d.ts +0 -612
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/process.d.ts +0 -2204
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/punycode.d.ts +0 -89
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/querystring.d.ts +0 -139
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/quic.d.ts +0 -897
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/readline/promises.d.ts +0 -158
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/readline.d.ts +0 -507
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/repl.d.ts +0 -420
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/sea.d.ts +0 -47
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/sqlite.d.ts +0 -1068
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/consumers.d.ts +0 -114
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/iter.d.ts +0 -301
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/promises.d.ts +0 -211
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/web.d.ts +0 -300
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream.d.ts +0 -1774
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/string_decoder.d.ts +0 -27
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/test/reporters.d.ts +0 -59
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/test.d.ts +0 -2279
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/timers/promises.d.ts +0 -93
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/timers.d.ts +0 -149
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/tls.d.ts +0 -1193
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/trace_events.d.ts +0 -103
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -462
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +0 -71
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -36
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/index.d.ts +0 -119
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +0 -72
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.7/index.d.ts +0 -119
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/tty.d.ts +0 -225
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/url.d.ts +0 -556
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/util/types.d.ts +0 -558
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/util.d.ts +0 -1677
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/v8.d.ts +0 -980
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/vm.d.ts +0 -1136
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/wasi.d.ts +0 -131
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -59
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/blob.d.ts +0 -23
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/console.d.ts +0 -9
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/crypto.d.ts +0 -39
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/encoding.d.ts +0 -11
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/events.d.ts +0 -106
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/fetch.d.ts +0 -69
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/importmeta.d.ts +0 -13
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/messaging.d.ts +0 -23
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/navigator.d.ts +0 -25
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/performance.d.ts +0 -45
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/storage.d.ts +0 -24
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/streams.d.ts +0 -115
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/timers.d.ts +0 -44
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/url.d.ts +0 -24
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/worker_threads.d.ts +0 -671
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/zlib/iter.d.ts +0 -131
- package/node_modules/@types/jsonwebtoken/node_modules/@types/node/zlib.d.ts +0 -589
- package/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
- package/node_modules/@types/ws/node_modules/@types/node/LICENSE +0 -21
- package/node_modules/@types/ws/node_modules/@types/node/README.md +0 -15
- package/node_modules/@types/ws/node_modules/@types/node/assert/strict.d.ts +0 -59
- package/node_modules/@types/ws/node_modules/@types/node/assert.d.ts +0 -950
- package/node_modules/@types/ws/node_modules/@types/node/async_hooks.d.ts +0 -711
- package/node_modules/@types/ws/node_modules/@types/node/buffer.buffer.d.ts +0 -466
- package/node_modules/@types/ws/node_modules/@types/node/buffer.d.ts +0 -1765
- package/node_modules/@types/ws/node_modules/@types/node/child_process.d.ts +0 -1366
- package/node_modules/@types/ws/node_modules/@types/node/cluster.d.ts +0 -432
- package/node_modules/@types/ws/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
- package/node_modules/@types/ws/node_modules/@types/node/console.d.ts +0 -93
- package/node_modules/@types/ws/node_modules/@types/node/constants.d.ts +0 -14
- package/node_modules/@types/ws/node_modules/@types/node/crypto.d.ts +0 -4058
- package/node_modules/@types/ws/node_modules/@types/node/dgram.d.ts +0 -537
- package/node_modules/@types/ws/node_modules/@types/node/diagnostics_channel.d.ts +0 -552
- package/node_modules/@types/ws/node_modules/@types/node/dns/promises.d.ts +0 -497
- package/node_modules/@types/ws/node_modules/@types/node/dns.d.ts +0 -876
- package/node_modules/@types/ws/node_modules/@types/node/domain.d.ts +0 -150
- package/node_modules/@types/ws/node_modules/@types/node/events.d.ts +0 -1008
- package/node_modules/@types/ws/node_modules/@types/node/fs/promises.d.ts +0 -1468
- package/node_modules/@types/ws/node_modules/@types/node/fs.d.ts +0 -4780
- package/node_modules/@types/ws/node_modules/@types/node/globals.d.ts +0 -150
- package/node_modules/@types/ws/node_modules/@types/node/globals.typedarray.d.ts +0 -101
- package/node_modules/@types/ws/node_modules/@types/node/http.d.ts +0 -2147
- package/node_modules/@types/ws/node_modules/@types/node/http2.d.ts +0 -2485
- package/node_modules/@types/ws/node_modules/@types/node/https.d.ts +0 -400
- package/node_modules/@types/ws/node_modules/@types/node/index.d.ts +0 -117
- package/node_modules/@types/ws/node_modules/@types/node/inspector/promises.d.ts +0 -35
- package/node_modules/@types/ws/node_modules/@types/node/inspector.d.ts +0 -264
- package/node_modules/@types/ws/node_modules/@types/node/inspector.generated.d.ts +0 -4406
- package/node_modules/@types/ws/node_modules/@types/node/module.d.ts +0 -755
- package/node_modules/@types/ws/node_modules/@types/node/net.d.ts +0 -970
- package/node_modules/@types/ws/node_modules/@types/node/os.d.ts +0 -498
- package/node_modules/@types/ws/node_modules/@types/node/package.json +0 -155
- package/node_modules/@types/ws/node_modules/@types/node/path/posix.d.ts +0 -8
- package/node_modules/@types/ws/node_modules/@types/node/path/win32.d.ts +0 -8
- package/node_modules/@types/ws/node_modules/@types/node/path.d.ts +0 -178
- package/node_modules/@types/ws/node_modules/@types/node/perf_hooks.d.ts +0 -612
- package/node_modules/@types/ws/node_modules/@types/node/process.d.ts +0 -2204
- package/node_modules/@types/ws/node_modules/@types/node/punycode.d.ts +0 -89
- package/node_modules/@types/ws/node_modules/@types/node/querystring.d.ts +0 -139
- package/node_modules/@types/ws/node_modules/@types/node/quic.d.ts +0 -897
- package/node_modules/@types/ws/node_modules/@types/node/readline/promises.d.ts +0 -158
- package/node_modules/@types/ws/node_modules/@types/node/readline.d.ts +0 -507
- package/node_modules/@types/ws/node_modules/@types/node/repl.d.ts +0 -420
- package/node_modules/@types/ws/node_modules/@types/node/sea.d.ts +0 -47
- package/node_modules/@types/ws/node_modules/@types/node/sqlite.d.ts +0 -1068
- package/node_modules/@types/ws/node_modules/@types/node/stream/consumers.d.ts +0 -114
- package/node_modules/@types/ws/node_modules/@types/node/stream/iter.d.ts +0 -301
- package/node_modules/@types/ws/node_modules/@types/node/stream/promises.d.ts +0 -211
- package/node_modules/@types/ws/node_modules/@types/node/stream/web.d.ts +0 -300
- package/node_modules/@types/ws/node_modules/@types/node/stream.d.ts +0 -1774
- package/node_modules/@types/ws/node_modules/@types/node/string_decoder.d.ts +0 -27
- package/node_modules/@types/ws/node_modules/@types/node/test/reporters.d.ts +0 -59
- package/node_modules/@types/ws/node_modules/@types/node/test.d.ts +0 -2279
- package/node_modules/@types/ws/node_modules/@types/node/timers/promises.d.ts +0 -93
- package/node_modules/@types/ws/node_modules/@types/node/timers.d.ts +0 -149
- package/node_modules/@types/ws/node_modules/@types/node/tls.d.ts +0 -1193
- package/node_modules/@types/ws/node_modules/@types/node/trace_events.d.ts +0 -103
- package/node_modules/@types/ws/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -462
- package/node_modules/@types/ws/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +0 -71
- package/node_modules/@types/ws/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -36
- package/node_modules/@types/ws/node_modules/@types/node/ts5.6/index.d.ts +0 -119
- package/node_modules/@types/ws/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +0 -72
- package/node_modules/@types/ws/node_modules/@types/node/ts5.7/index.d.ts +0 -119
- package/node_modules/@types/ws/node_modules/@types/node/tty.d.ts +0 -225
- package/node_modules/@types/ws/node_modules/@types/node/url.d.ts +0 -556
- package/node_modules/@types/ws/node_modules/@types/node/util/types.d.ts +0 -558
- package/node_modules/@types/ws/node_modules/@types/node/util.d.ts +0 -1677
- package/node_modules/@types/ws/node_modules/@types/node/v8.d.ts +0 -980
- package/node_modules/@types/ws/node_modules/@types/node/vm.d.ts +0 -1136
- package/node_modules/@types/ws/node_modules/@types/node/wasi.d.ts +0 -131
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -59
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/blob.d.ts +0 -23
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/console.d.ts +0 -9
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/crypto.d.ts +0 -39
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/encoding.d.ts +0 -11
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/events.d.ts +0 -106
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/fetch.d.ts +0 -69
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/importmeta.d.ts +0 -13
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/messaging.d.ts +0 -23
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/navigator.d.ts +0 -25
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/performance.d.ts +0 -45
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/storage.d.ts +0 -24
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/streams.d.ts +0 -115
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/timers.d.ts +0 -44
- package/node_modules/@types/ws/node_modules/@types/node/web-globals/url.d.ts +0 -24
- package/node_modules/@types/ws/node_modules/@types/node/worker_threads.d.ts +0 -671
- package/node_modules/@types/ws/node_modules/@types/node/zlib/iter.d.ts +0 -131
- package/node_modules/@types/ws/node_modules/@types/node/zlib.d.ts +0 -589
- package/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
- package/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
- package/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
- package/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
- package/node_modules/typebox/build/type/action/_optional.d.mts +0 -19
- package/node_modules/typebox/build/type/action/_optional.mjs +0 -40
- package/node_modules/typebox/build/type/action/_readonly.d.mts +0 -19
- package/node_modules/typebox/build/type/action/_readonly.mjs +0 -40
- package/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
- package/node_modules/typebox/build/type/action/awaited.mjs +0 -15
- package/node_modules/typebox/build/type/action/options.d.mts +0 -11
- package/node_modules/typebox/build/type/action/options.mjs +0 -11
- package/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
- package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +0 -14
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +0 -24
- package/node_modules/typebox/build/type/engine/options/index.d.mts +0 -1
- package/node_modules/typebox/build/type/engine/options/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/options/instantiate.d.mts +0 -8
- package/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
- package/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
- package/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/promise.mjs +0 -9
- package/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
- package/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
- package/node_modules/typebox/build/type/types/base.d.mts +0 -50
- package/node_modules/typebox/build/type/types/base.mjs +0 -84
- package/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
- package/node_modules/typebox/build/type/types/iterator.mjs +0 -28
- package/node_modules/typebox/build/type/types/promise.d.mts +0 -21
- package/node_modules/typebox/build/type/types/promise.mjs +0 -29
- package/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
- package/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/default/from_base.mjs +0 -5
- package/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
- package/node_modules/typebox/build/value/mutate/error.mjs +0 -6
- package/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
- package/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
- package/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
- package/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
- package/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
- package/node_modules/typebox/build/value/mutate/index.mjs +0 -1
- package/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
- package/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
- package/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
- /package/node_modules/typebox/build/type/engine/{awaited → with}/index.d.mts +0 -0
- /package/node_modules/typebox/build/type/engine/{awaited → with}/index.mjs +0 -0
|
@@ -4,37 +4,37 @@ import { Guard } from '../../guard/index.mjs';
|
|
|
4
4
|
// ------------------------------------------------------------------
|
|
5
5
|
// Modifiers
|
|
6
6
|
// ------------------------------------------------------------------
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
// ------------------------------------------------------------------
|
|
11
|
-
// Types
|
|
12
|
-
// ------------------------------------------------------------------
|
|
13
|
-
import { IsBase } from '../types/base.mjs';
|
|
7
|
+
import { AddImmutableAction } from './immutable/instantiate_add.mjs';
|
|
8
|
+
import { AddReadonlyAction } from './readonly/instantiate_add.mjs';
|
|
9
|
+
import { AddOptionalAction } from './optional/instantiate_add.mjs';
|
|
14
10
|
import { _Array_, IsArray, ArrayOptions } from '../types/array.mjs';
|
|
15
|
-
import { AsyncIterator, IsAsyncIterator, AsyncIteratorOptions } from '../types/async_iterator.mjs';
|
|
16
11
|
import { Constructor, IsConstructor, ConstructorOptions } from '../types/constructor.mjs';
|
|
17
12
|
import { Deferred, IsDeferred } from '../types/deferred.mjs';
|
|
18
13
|
import { _Function_, IsFunction, FunctionOptions } from '../types/function.mjs';
|
|
19
14
|
import { IsCall } from '../types/call.mjs';
|
|
15
|
+
import { Dependent, IsDependent, DependentOptions } from '../types/dependent.mjs';
|
|
20
16
|
import { Intersect, IsIntersect, IntersectOptions } from '../types/intersect.mjs';
|
|
21
|
-
import { Iterator, IsIterator, IteratorOptions } from '../types/iterator.mjs';
|
|
22
17
|
import { Object, IsObject, ObjectOptions } from '../types/object.mjs';
|
|
23
|
-
import { _Promise_, IsPromise, PromiseOptions } from '../types/promise.mjs';
|
|
24
18
|
import { RecordFromPattern, IsRecord, RecordPattern, RecordValue } from '../types/record.mjs';
|
|
25
19
|
import { Tuple, IsTuple, TupleOptions } from '../types/tuple.mjs';
|
|
26
20
|
import { Union, IsUnion, UnionOptions } from '../types/union.mjs';
|
|
27
21
|
import { IsRef } from '../types/ref.mjs';
|
|
28
22
|
import { Rest, IsRest } from '../types/rest.mjs';
|
|
29
23
|
// ------------------------------------------------------------------
|
|
30
|
-
// Modifier
|
|
24
|
+
// Modifier Instantiate
|
|
31
25
|
// ------------------------------------------------------------------
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
26
|
+
import { AddImmutableInstantiate } from './immutable/instantiate_add.mjs';
|
|
27
|
+
import { RemoveImmutableInstantiate } from './immutable/instantiate_remove.mjs';
|
|
28
|
+
import { AddReadonlyInstantiate } from './readonly/instantiate_add.mjs';
|
|
29
|
+
import { RemoveReadonlyInstantiate } from './readonly/instantiate_remove.mjs';
|
|
30
|
+
import { AddOptionalInstantiate } from './optional/instantiate_add.mjs';
|
|
31
|
+
import { RemoveOptionalInstantiate } from './optional/instantiate_remove.mjs';
|
|
32
|
+
import { IsOptional } from '../types/_optional.mjs';
|
|
33
|
+
import { IsImmutable } from '../types/_immutable.mjs';
|
|
34
|
+
import { IsReadonly } from '../types/_readonly.mjs';
|
|
34
35
|
// ------------------------------------------------------------------
|
|
35
36
|
// Instantiate
|
|
36
37
|
// ------------------------------------------------------------------
|
|
37
|
-
import { AwaitedInstantiate } from './awaited/instantiate.mjs';
|
|
38
38
|
import { CallInstantiate } from './call/instantiate.mjs';
|
|
39
39
|
import { CapitalizeInstantiate } from './intrinsics/instantiate.mjs';
|
|
40
40
|
import { ConditionalInstantiate } from './conditional/index.mjs';
|
|
@@ -51,7 +51,6 @@ import { MappedInstantiate } from './mapped/instantiate.mjs';
|
|
|
51
51
|
import { ModuleInstantiate } from './module/instantiate.mjs';
|
|
52
52
|
import { NonNullableInstantiate } from './non_nullable/instantiate.mjs';
|
|
53
53
|
import { OmitInstantiate } from './omit/instantiate.mjs';
|
|
54
|
-
import { OptionsInstantiate } from './options/instantiate.mjs';
|
|
55
54
|
import { ParametersInstantiate } from './parameters/instantiate.mjs';
|
|
56
55
|
import { PartialInstantiate } from './partial/instantiate.mjs';
|
|
57
56
|
import { PickInstantiate } from './pick/instantiate.mjs';
|
|
@@ -63,29 +62,16 @@ import { ReturnTypeInstantiate } from './return_type/instantiate.mjs';
|
|
|
63
62
|
import { TemplateLiteralInstantiate } from './template_literal/instantiate.mjs';
|
|
64
63
|
import { UncapitalizeInstantiate } from './intrinsics/instantiate.mjs';
|
|
65
64
|
import { UppercaseInstantiate } from './intrinsics/instantiate.mjs';
|
|
65
|
+
import { WithInstantiate } from './with/instantiate.mjs';
|
|
66
66
|
import { RestSpread } from './rest/index.mjs';
|
|
67
|
+
export function State(callstack, visited) {
|
|
68
|
+
return { callstack, visited };
|
|
69
|
+
}
|
|
67
70
|
export function CanInstantiate(types) {
|
|
68
|
-
return Guard.
|
|
71
|
+
return Guard.ShiftLeft(types, (left, right) => IsRef(left)
|
|
69
72
|
? false
|
|
70
73
|
: CanInstantiate(right), () => true);
|
|
71
74
|
}
|
|
72
|
-
function ModifierActions(type, readonly, optional) {
|
|
73
|
-
return (IsReadonlyRemoveAction(type) ? ModifierActions(type.type, 'remove', optional) :
|
|
74
|
-
IsOptionalRemoveAction(type) ? ModifierActions(type.type, readonly, 'remove') :
|
|
75
|
-
IsReadonlyAddAction(type) ? ModifierActions(type.type, 'add', optional) :
|
|
76
|
-
IsOptionalAddAction(type) ? ModifierActions(type.type, readonly, 'add') :
|
|
77
|
-
[type, readonly, optional]);
|
|
78
|
-
}
|
|
79
|
-
function ApplyReadonly(action, type) {
|
|
80
|
-
return (Guard.IsEqual(action, 'remove') ? ReadonlyRemove(type) :
|
|
81
|
-
Guard.IsEqual(action, 'add') ? ReadonlyAdd(type) :
|
|
82
|
-
type);
|
|
83
|
-
}
|
|
84
|
-
function ApplyOptional(action, type) {
|
|
85
|
-
return (Guard.IsEqual(action, 'remove') ? OptionalRemove(type) :
|
|
86
|
-
Guard.IsEqual(action, 'add') ? OptionalAdd(type) :
|
|
87
|
-
type);
|
|
88
|
-
}
|
|
89
75
|
export function InstantiateProperties(context, state, properties) {
|
|
90
76
|
return Guard.Keys(properties).reduce((result, key) => {
|
|
91
77
|
return { ...result, [key]: InstantiateType(context, state, properties[key]) };
|
|
@@ -99,61 +85,74 @@ export function InstantiateElements(context, state, types) {
|
|
|
99
85
|
export function InstantiateTypes(context, state, types) {
|
|
100
86
|
return types.map(type => InstantiateType(context, state, type));
|
|
101
87
|
}
|
|
88
|
+
function WithModifiers(type, instantiatedType) {
|
|
89
|
+
const withOptional = IsOptional(type) ? AddOptionalAction(instantiatedType, {}) : instantiatedType;
|
|
90
|
+
const withReadonly = IsReadonly(type) ? AddReadonlyAction(withOptional, {}) : withOptional;
|
|
91
|
+
const withImmutable = IsImmutable(type) ? AddImmutableAction(withReadonly, {}) : withReadonly;
|
|
92
|
+
return withImmutable;
|
|
93
|
+
}
|
|
102
94
|
function InstantiateDeferred(context, state, action, parameters, options) {
|
|
103
|
-
return (
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
95
|
+
return (
|
|
96
|
+
// Modifiers
|
|
97
|
+
Guard.IsEqual(action, 'AddImmutable') ? AddImmutableInstantiate(context, state, parameters[0], options) :
|
|
98
|
+
Guard.IsEqual(action, 'RemoveImmutable') ? RemoveImmutableInstantiate(context, state, parameters[0], options) :
|
|
99
|
+
Guard.IsEqual(action, 'AddReadonly') ? AddReadonlyInstantiate(context, state, parameters[0], options) :
|
|
100
|
+
Guard.IsEqual(action, 'RemoveReadonly') ? RemoveReadonlyInstantiate(context, state, parameters[0], options) :
|
|
101
|
+
Guard.IsEqual(action, 'AddOptional') ? AddOptionalInstantiate(context, state, parameters[0], options) :
|
|
102
|
+
Guard.IsEqual(action, 'RemoveOptional') ? RemoveOptionalInstantiate(context, state, parameters[0], options) :
|
|
103
|
+
// Actions
|
|
104
|
+
Guard.IsEqual(action, 'Capitalize') ? CapitalizeInstantiate(context, state, parameters[0], options) :
|
|
105
|
+
Guard.IsEqual(action, 'Conditional') ? ConditionalInstantiate(context, state, parameters[0], parameters[1], parameters[2], parameters[3], options) :
|
|
106
|
+
Guard.IsEqual(action, 'ConstructorParameters') ? ConstructorParametersInstantiate(context, state, parameters[0], options) :
|
|
107
|
+
Guard.IsEqual(action, 'Evaluate') ? EvaluateInstantiate(context, state, parameters[0], options) :
|
|
108
|
+
Guard.IsEqual(action, 'Exclude') ? ExcludeInstantiate(context, state, parameters[0], parameters[1], options) :
|
|
109
|
+
Guard.IsEqual(action, 'Extract') ? ExtractInstantiate(context, state, parameters[0], parameters[1], options) :
|
|
110
|
+
Guard.IsEqual(action, 'Index') ? IndexInstantiate(context, state, parameters[0], parameters[1], options) :
|
|
111
|
+
Guard.IsEqual(action, 'InstanceType') ? InstanceTypeInstantiate(context, state, parameters[0], options) :
|
|
112
|
+
Guard.IsEqual(action, 'Interface') ? InterfaceInstantiate(context, state, parameters[0], parameters[1], options) :
|
|
113
|
+
Guard.IsEqual(action, 'KeyOf') ? KeyOfInstantiate(context, state, parameters[0], options) :
|
|
114
|
+
Guard.IsEqual(action, 'Lowercase') ? LowercaseInstantiate(context, state, parameters[0], options) :
|
|
115
|
+
Guard.IsEqual(action, 'Mapped') ? MappedInstantiate(context, state, parameters[0], parameters[1], parameters[2], parameters[3], options) :
|
|
116
|
+
Guard.IsEqual(action, 'Module') ? ModuleInstantiate(context, state, parameters[0], options) :
|
|
117
|
+
Guard.IsEqual(action, 'NonNullable') ? NonNullableInstantiate(context, state, parameters[0], options) :
|
|
118
|
+
Guard.IsEqual(action, 'Pick') ? PickInstantiate(context, state, parameters[0], parameters[1], options) :
|
|
119
|
+
Guard.IsEqual(action, 'Parameters') ? ParametersInstantiate(context, state, parameters[0], options) :
|
|
120
|
+
Guard.IsEqual(action, 'Partial') ? PartialInstantiate(context, state, parameters[0], options) :
|
|
121
|
+
Guard.IsEqual(action, 'Omit') ? OmitInstantiate(context, state, parameters[0], parameters[1], options) :
|
|
122
|
+
Guard.IsEqual(action, 'ReadonlyObject') ? ReadonlyObjectInstantiate(context, state, parameters[0], options) :
|
|
123
|
+
Guard.IsEqual(action, 'Record') ? RecordInstantiate(context, state, parameters[0], parameters[1], options) :
|
|
124
|
+
Guard.IsEqual(action, 'Required') ? RequiredInstantiate(context, state, parameters[0], options) :
|
|
125
|
+
Guard.IsEqual(action, 'ReturnType') ? ReturnTypeInstantiate(context, state, parameters[0], options) :
|
|
126
|
+
Guard.IsEqual(action, 'TemplateLiteral') ? TemplateLiteralInstantiate(context, state, parameters[0], options) :
|
|
127
|
+
Guard.IsEqual(action, 'Uncapitalize') ? UncapitalizeInstantiate(context, state, parameters[0], options) :
|
|
128
|
+
Guard.IsEqual(action, 'Uppercase') ? UppercaseInstantiate(context, state, parameters[0], options) :
|
|
129
|
+
Guard.IsEqual(action, 'With') ? WithInstantiate(context, state, parameters[0], parameters[1]) :
|
|
130
|
+
Deferred(action, parameters, options));
|
|
131
131
|
}
|
|
132
|
-
|
|
133
|
-
const
|
|
134
|
-
const modifiers = ModifierActions(input, IsReadonly(input) ? 'add' : 'none', IsOptional(input) ? 'add' : 'none');
|
|
135
|
-
const type = IsBase(modifiers[0]) ? modifiers[0].Clone() : modifiers[0];
|
|
136
|
-
const instantiated = (IsRef(type) ? RefInstantiate(context, state, type, type.$ref) :
|
|
132
|
+
function InstantiateImmediate(context, state, type) {
|
|
133
|
+
const instantiatedType = (IsRef(type) ? RefInstantiate(context, state, type, type.$ref) :
|
|
137
134
|
IsArray(type) ? _Array_(InstantiateType(context, state, type.items), ArrayOptions(type)) :
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
IsUnion(type) ? Union(InstantiateTypes(context, state, type.anyOf), UnionOptions(type)) :
|
|
151
|
-
type);
|
|
152
|
-
const withImmutable = immutable ? Immutable(instantiated) : instantiated;
|
|
153
|
-
const withModifiers = ApplyReadonly(modifiers[1], ApplyOptional(modifiers[2], withImmutable));
|
|
135
|
+
IsCall(type) ? CallInstantiate(context, state, type.target, type.arguments) :
|
|
136
|
+
IsConstructor(type) ? Constructor(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.instanceType), ConstructorOptions(type)) :
|
|
137
|
+
IsFunction(type) ? _Function_(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.returnType), FunctionOptions(type)) :
|
|
138
|
+
IsDependent(type) ? Dependent(InstantiateType(context, state, type.if), InstantiateType(context, state, type.then), InstantiateType(context, state, type.else), DependentOptions(type)) :
|
|
139
|
+
IsIntersect(type) ? Intersect(InstantiateTypes(context, state, type.allOf), IntersectOptions(type)) :
|
|
140
|
+
IsObject(type) ? Object(InstantiateProperties(context, state, type.properties), ObjectOptions(type)) :
|
|
141
|
+
IsRecord(type) ? RecordFromPattern(RecordPattern(type), InstantiateType(context, state, RecordValue(type))) :
|
|
142
|
+
IsRest(type) ? Rest(InstantiateType(context, state, type.items)) :
|
|
143
|
+
IsTuple(type) ? Tuple(InstantiateElements(context, state, type.items), TupleOptions(type)) :
|
|
144
|
+
IsUnion(type) ? Union(InstantiateTypes(context, state, type.anyOf), UnionOptions(type)) :
|
|
145
|
+
type);
|
|
146
|
+
const withModifiers = WithModifiers(type, instantiatedType);
|
|
154
147
|
return withModifiers;
|
|
155
148
|
}
|
|
149
|
+
export function InstantiateType(context, state, type) {
|
|
150
|
+
const result = IsDeferred(type)
|
|
151
|
+
? InstantiateDeferred(context, state, type.action, type.parameters, type.options)
|
|
152
|
+
: InstantiateImmediate(context, state, type);
|
|
153
|
+
return result;
|
|
154
|
+
}
|
|
156
155
|
/** Instantiates computed schematics using the given context and type. */
|
|
157
156
|
export function Instantiate(context, type) {
|
|
158
|
-
return InstantiateType(context,
|
|
157
|
+
return InstantiateType(context, State([], []), type);
|
|
159
158
|
}
|
|
@@ -3,16 +3,13 @@ import { type TProperties } from '../../types/properties.mjs';
|
|
|
3
3
|
import { type TObject } from '../../types/object.mjs';
|
|
4
4
|
import { type TEvaluateIntersect } from '../evaluate/evaluate.mjs';
|
|
5
5
|
import { type TInterfaceDeferred } from '../../action/index.mjs';
|
|
6
|
-
import { type
|
|
6
|
+
import { type TCanInstantiate } from '../instantiate.mjs';
|
|
7
7
|
import { type TInstantiateProperties } from '../instantiate.mjs';
|
|
8
8
|
import { type TInstantiateTypes } from '../instantiate.mjs';
|
|
9
|
+
import { type TState } from '../instantiate.mjs';
|
|
9
10
|
type TInterfaceOperation<Heritage extends TSchema[], Properties extends TProperties, Result extends TSchema = TEvaluateIntersect<[...Heritage, TObject<Properties>]>> = Result;
|
|
10
11
|
export type TInterfaceAction<Heritage extends TSchema[], Properties extends TProperties, Result extends TSchema = TCanInstantiate<Heritage> extends true ? TInterfaceOperation<Heritage, Properties> : TInterfaceDeferred<Heritage, Properties>> = Result;
|
|
11
12
|
export declare function InterfaceAction<Heritage extends TSchema[], Properties extends TProperties>(heritage: [...Heritage], properties: Properties, options: TSchemaOptions): TInterfaceAction<Heritage, Properties>;
|
|
12
|
-
export type TInterfaceInstantiate<Context extends TProperties, State extends TState, Heritage extends TSchema[], Properties extends TProperties, InstantiatedHeritage extends TSchema[] = TInstantiateTypes<Context,
|
|
13
|
-
callstack: [];
|
|
14
|
-
}, Heritage>, InstantiatedProperties extends TProperties = TInstantiateProperties<Context, {
|
|
15
|
-
callstack: [];
|
|
16
|
-
}, Properties>> = TInterfaceAction<InstantiatedHeritage, InstantiatedProperties>;
|
|
13
|
+
export type TInterfaceInstantiate<Context extends TProperties, State extends TState, Heritage extends TSchema[], Properties extends TProperties, InstantiatedHeritage extends TSchema[] = TInstantiateTypes<Context, State, Heritage>, InstantiatedProperties extends TProperties = TInstantiateProperties<Context, State, Properties>> = TInterfaceAction<InstantiatedHeritage, InstantiatedProperties>;
|
|
17
14
|
export declare function InterfaceInstantiate<Context extends TProperties, State extends TState, Heritage extends TSchema[], Properties extends TProperties>(context: Context, state: State, heritage: [...Heritage], properties: Properties, options: TSchemaOptions): TInterfaceInstantiate<Context, State, Heritage, Properties>;
|
|
18
15
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type TSchema } from '../../types/schema.mjs';
|
|
2
2
|
import { type TMappingType, type TMappingFunc } from './mapping.mjs';
|
|
3
|
-
import { type TTemplateLiteralDecode } from '../template_literal/decode.mjs';
|
|
4
3
|
import { type TFromType } from './from_type.mjs';
|
|
5
|
-
|
|
4
|
+
import { type TEvaluateTemplateLiteral } from '../evaluate/index.mjs';
|
|
5
|
+
export type TFromTemplateLiteral<Mapping extends TMappingType, Pattern extends string, Evaluated extends TSchema = TEvaluateTemplateLiteral<Pattern>, Result extends TSchema = TFromType<Mapping, Evaluated>> = Result;
|
|
6
6
|
export declare function FromTemplateLiteral(mapping: TMappingFunc, pattern: string): TSchema;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
|
-
import { TemplateLiteralDecode } from '../template_literal/decode.mjs';
|
|
3
2
|
import { FromType } from './from_type.mjs';
|
|
3
|
+
import { EvaluateTemplateLiteral } from '../evaluate/index.mjs';
|
|
4
4
|
export function FromTemplateLiteral(mapping, pattern) {
|
|
5
|
-
const
|
|
6
|
-
const result = FromType(mapping,
|
|
5
|
+
const evaluated = EvaluateTemplateLiteral(pattern);
|
|
6
|
+
const result = FromType(mapping, evaluated);
|
|
7
7
|
return result;
|
|
8
8
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { type TSchema, type TSchemaOptions } from '../../types/schema.mjs';
|
|
2
2
|
import { type TProperties } from '../../types/properties.mjs';
|
|
3
3
|
import { type TCyclic } from '../../types/cyclic.mjs';
|
|
4
|
+
import { type TDependent } from '../../types/dependent.mjs';
|
|
4
5
|
import { type TIntersect } from '../../types/intersect.mjs';
|
|
5
6
|
import { type TUnion } from '../../types/union.mjs';
|
|
6
7
|
import { type TKeyOfDeferred } from '../../action/keyof.mjs';
|
|
7
8
|
import { type TState, type TInstantiateType, type TCanInstantiate } from '../instantiate.mjs';
|
|
8
9
|
import { type TCollapseToObject } from '../object/index.mjs';
|
|
9
10
|
import { type TFromType } from './from_type.mjs';
|
|
10
|
-
type TNormalizeType<Type extends TSchema, Result extends TSchema = (Type extends TCyclic
|
|
11
|
+
type TNormalizeType<Type extends TSchema, Result extends TSchema = (Type extends TCyclic ? TCollapseToObject<Type> : Type extends TDependent ? TCollapseToObject<Type> : Type extends TIntersect ? TCollapseToObject<Type> : Type extends TUnion ? TCollapseToObject<Type> : Type)> = Result;
|
|
11
12
|
export type TKeyOfAction<Type extends TSchema, Result extends TSchema = TCanInstantiate<[Type]> extends true ? TFromType<TNormalizeType<Type>> : TKeyOfDeferred<Type>> = Result;
|
|
12
13
|
export declare function KeyOfAction<Type extends TSchema>(type: Type, options: TSchemaOptions): TKeyOfAction<Type>;
|
|
13
14
|
export type TKeyOfInstantiate<Context extends TProperties, State extends TState, Type extends TSchema, InstantiatedType extends TSchema = TInstantiateType<Context, State, Type>> = TKeyOfAction<InstantiatedType>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
2
|
import { Memory } from '../../../system/memory/index.mjs';
|
|
3
3
|
import { IsCyclic } from '../../types/cyclic.mjs';
|
|
4
|
+
import { IsDependent } from '../../types/dependent.mjs';
|
|
4
5
|
import { IsIntersect } from '../../types/intersect.mjs';
|
|
5
6
|
import { IsUnion } from '../../types/union.mjs';
|
|
6
7
|
import { KeyOfDeferred } from '../../action/keyof.mjs';
|
|
@@ -11,7 +12,10 @@ import { CollapseToObject } from '../object/index.mjs';
|
|
|
11
12
|
// ------------------------------------------------------------------
|
|
12
13
|
import { FromType } from './from_type.mjs';
|
|
13
14
|
function NormalizeType(type) {
|
|
14
|
-
const result = (IsCyclic(type) ||
|
|
15
|
+
const result = (IsCyclic(type) ||
|
|
16
|
+
IsDependent(type) ||
|
|
17
|
+
IsIntersect(type) ||
|
|
18
|
+
IsUnion(type)) ? CollapseToObject(type) : type;
|
|
15
19
|
return result;
|
|
16
20
|
}
|
|
17
21
|
export function KeyOfAction(type, options) {
|
|
@@ -5,11 +5,11 @@ import { type TObject } from '../../types/object.mjs';
|
|
|
5
5
|
import { type TProperties } from '../../types/properties.mjs';
|
|
6
6
|
import { type TIdentifier } from '../../types/identifier.mjs';
|
|
7
7
|
import { type TTemplateLiteral } from '../../types/template_literal.mjs';
|
|
8
|
-
import { type
|
|
9
|
-
import { type
|
|
10
|
-
import { type
|
|
8
|
+
import { type TInstantiateType, type TState } from '../instantiate.mjs';
|
|
9
|
+
import { type TEvaluateIntersect } from '../evaluate/evaluate.mjs';
|
|
10
|
+
import { type TEvaluateTemplateLiteral } from '../evaluate/evaluate.mjs';
|
|
11
11
|
import { type TMappedVariants } from './mapped_variants.mjs';
|
|
12
|
-
type TCanonicalAs<InstantiatedAs extends TSchema, Result extends TSchema = InstantiatedAs extends TTemplateLiteral<infer Pattern extends string> ?
|
|
12
|
+
type TCanonicalAs<InstantiatedAs extends TSchema, Result extends TSchema = InstantiatedAs extends TTemplateLiteral<infer Pattern extends string> ? TEvaluateTemplateLiteral<Pattern> : InstantiatedAs> = Result;
|
|
13
13
|
type TMappedVariant<Context extends TProperties, State extends TState, Identifier extends TIdentifier, Variant extends TSchema, As extends TSchema, Property extends TSchema, VariantContext extends TProperties = Memory.TAssign<Context, {
|
|
14
14
|
[_ in Identifier['name']]: Variant;
|
|
15
15
|
}>, InstantiatedAs extends TSchema = TInstantiateType<VariantContext, State, As>, CanonicalAs extends TSchema = TCanonicalAs<InstantiatedAs>, InstantiatedProperty extends TSchema = TInstantiateType<VariantContext, State, Property>, Result extends TProperties = CanonicalAs extends TLiteral<string | number> ? {
|
|
@@ -4,13 +4,13 @@ import { Memory } from '../../../system/memory/index.mjs';
|
|
|
4
4
|
import { IsLiteralNumber, IsLiteralString } from '../../types/literal.mjs';
|
|
5
5
|
import { Object } from '../../types/object.mjs';
|
|
6
6
|
import { IsTemplateLiteral } from '../../types/template_literal.mjs';
|
|
7
|
-
import { TemplateLiteralDecode } from '../template_literal/decode.mjs';
|
|
8
7
|
import { InstantiateType } from '../instantiate.mjs';
|
|
9
|
-
import { EvaluateIntersect } from '../evaluate/
|
|
8
|
+
import { EvaluateIntersect } from '../evaluate/evaluate.mjs';
|
|
9
|
+
import { EvaluateTemplateLiteral } from '../evaluate/evaluate.mjs';
|
|
10
10
|
import { MappedVariants } from './mapped_variants.mjs';
|
|
11
11
|
function CanonicalAs(instantiatedAs) {
|
|
12
12
|
const result = IsTemplateLiteral(instantiatedAs)
|
|
13
|
-
?
|
|
13
|
+
? EvaluateTemplateLiteral(instantiatedAs.pattern)
|
|
14
14
|
: instantiatedAs;
|
|
15
15
|
return result;
|
|
16
16
|
}
|
|
@@ -3,12 +3,13 @@ import { type TLiteral, type TLiteralValue } from '../../types/literal.mjs';
|
|
|
3
3
|
import { type TEnum, type TEnumValue } from '../../types/enum.mjs';
|
|
4
4
|
import { type TTemplateLiteral } from '../../types/template_literal.mjs';
|
|
5
5
|
import { type TUnion } from '../../types/union.mjs';
|
|
6
|
-
import { type
|
|
7
|
-
import { type
|
|
8
|
-
type TFromTemplateLiteral<Pattern extends string,
|
|
6
|
+
import { type TEvaluateEnum } from '../evaluate/evaluate.mjs';
|
|
7
|
+
import { type TEvaluateTemplateLiteral } from '../evaluate/evaluate.mjs';
|
|
8
|
+
type TFromTemplateLiteral<Pattern extends string, Evaluated extends TSchema = TEvaluateTemplateLiteral<Pattern>, Result extends TSchema[] = TFromType<Evaluated>> = Result;
|
|
9
9
|
type TFromUnion<Types extends TSchema[], Result extends TSchema[] = []> = (Types extends [infer Left extends TSchema, ...infer Right extends TSchema[]] ? TFromUnion<Right, [...Result, ...TFromType<Left>]> : Result);
|
|
10
|
+
type TFromEnum<Values extends TEnumValue[], Evaluated extends TSchema = TEvaluateEnum<Values>, Result extends TSchema[] = TFromType<Evaluated>> = Result;
|
|
10
11
|
type TFromLiteral<Value extends TLiteralValue, Result extends TSchema[] = Value extends number ? [TLiteral<`${Value}`>] : [TLiteral<Value>]> = Result;
|
|
11
|
-
type TFromType<Type extends TSchema, Result extends TSchema[] = (Type extends TEnum<infer Values extends TEnumValue[]> ?
|
|
12
|
+
type TFromType<Type extends TSchema, Result extends TSchema[] = (Type extends TEnum<infer Values extends TEnumValue[]> ? TFromEnum<Values> : Type extends TLiteral<infer Value extends number> ? TFromLiteral<Value> : Type extends TTemplateLiteral<infer Pattern extends string> ? TFromTemplateLiteral<Pattern> : Type extends TUnion<infer Types extends TSchema[]> ? TFromUnion<Types> : [
|
|
12
13
|
Type
|
|
13
14
|
])> = Result;
|
|
14
15
|
export type TMappedVariants<Type extends TSchema, Result extends TSchema[] = TFromType<Type>> = Result;
|
|
@@ -4,11 +4,11 @@ import { Literal, IsLiteral } from '../../types/literal.mjs';
|
|
|
4
4
|
import { IsEnum } from '../../types/enum.mjs';
|
|
5
5
|
import { IsTemplateLiteral } from '../../types/template_literal.mjs';
|
|
6
6
|
import { IsUnion } from '../../types/union.mjs';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { EvaluateEnum } from '../evaluate/evaluate.mjs';
|
|
8
|
+
import { EvaluateTemplateLiteral } from '../evaluate/evaluate.mjs';
|
|
9
9
|
function FromTemplateLiteral(pattern) {
|
|
10
|
-
const
|
|
11
|
-
const result = FromType(
|
|
10
|
+
const evaluated = EvaluateTemplateLiteral(pattern);
|
|
11
|
+
const result = FromType(evaluated);
|
|
12
12
|
return result;
|
|
13
13
|
}
|
|
14
14
|
function FromUnion(types) {
|
|
@@ -16,12 +16,17 @@ function FromUnion(types) {
|
|
|
16
16
|
return [...result, ...FromType(left)];
|
|
17
17
|
}, []);
|
|
18
18
|
}
|
|
19
|
+
function FromEnum(values) {
|
|
20
|
+
const evaluated = EvaluateEnum(values);
|
|
21
|
+
const result = FromType(evaluated);
|
|
22
|
+
return result;
|
|
23
|
+
}
|
|
19
24
|
function FromLiteral(value) {
|
|
20
25
|
const result = Guard.IsNumber(value) ? [Literal(`${value}`)] : [Literal(value)];
|
|
21
26
|
return result;
|
|
22
27
|
}
|
|
23
28
|
function FromType(type) {
|
|
24
|
-
const result = (IsEnum(type) ?
|
|
29
|
+
const result = (IsEnum(type) ? FromEnum(type.enum) :
|
|
25
30
|
IsLiteral(type) ? FromLiteral(type.const) :
|
|
26
31
|
IsTemplateLiteral(type) ? FromTemplateLiteral(type.pattern) :
|
|
27
32
|
IsUnion(type) ? FromUnion(type.anyOf) :
|
|
@@ -5,17 +5,15 @@ import { type TState } from '../instantiate.mjs';
|
|
|
5
5
|
import { type TCyclicCandidates } from '../cyclic/candidates.mjs';
|
|
6
6
|
import { type TInstantiateCyclic } from '../cyclic/instantiate.mjs';
|
|
7
7
|
import { type TInstantiateType } from '../instantiate.mjs';
|
|
8
|
-
type TInstantiateCyclics<Context extends TProperties, CyclicKeys extends string[], Result extends TProperties = {
|
|
9
|
-
[Key in Extract<keyof
|
|
8
|
+
type TInstantiateCyclics<Context extends TProperties, Declarations extends TProperties, CyclicKeys extends string[], DeclarationContext extends TProperties = Memory.TAssign<Context, Declarations>, Result extends TProperties = {
|
|
9
|
+
[Key in Extract<keyof Declarations, CyclicKeys[number]>]: TInstantiateCyclic<DeclarationContext, Key, Declarations[Key]>;
|
|
10
10
|
}> = Result;
|
|
11
|
-
type TInstantiateNonCyclics<Context extends TProperties, CyclicKeys extends string[], Result extends TProperties = {
|
|
12
|
-
[Key in Exclude<keyof
|
|
13
|
-
callstack: [];
|
|
14
|
-
}, Context[Key]>;
|
|
11
|
+
type TInstantiateNonCyclics<Context extends TProperties, Declarations extends TProperties, CyclicKeys extends string[], DeclarationContext extends TProperties = Memory.TAssign<Context, Declarations>, Result extends TProperties = {
|
|
12
|
+
[Key in Exclude<keyof Declarations, CyclicKeys[number]>]: TInstantiateType<DeclarationContext, TState<[], []>, Declarations[Key]>;
|
|
15
13
|
}> = Result;
|
|
16
|
-
type TInstantiateModule<Context extends TProperties, CyclicCandidates extends string[] = TCyclicCandidates<
|
|
14
|
+
type TInstantiateModule<Context extends TProperties, Declarations extends TProperties, CyclicCandidates extends string[] = TCyclicCandidates<Declarations>, InstantiatedCyclics extends TProperties = TInstantiateCyclics<Context, Declarations, CyclicCandidates>, InstantiatedNonCyclics extends TProperties = TInstantiateNonCyclics<Context, Declarations, CyclicCandidates>, InstantiatedModule extends TProperties = InstantiatedCyclics & InstantiatedNonCyclics> = {
|
|
17
15
|
[Key in keyof InstantiatedModule]: InstantiatedModule[Key];
|
|
18
16
|
} & {};
|
|
19
|
-
export type TModuleInstantiate<Context extends TProperties, _State extends TState,
|
|
20
|
-
export declare function ModuleInstantiate<Context extends TProperties, State extends TState,
|
|
17
|
+
export type TModuleInstantiate<Context extends TProperties, _State extends TState, Declarations extends TProperties, InstantiatedModule extends TProperties = TInstantiateModule<Context, Declarations>> = InstantiatedModule;
|
|
18
|
+
export declare function ModuleInstantiate<Context extends TProperties, State extends TState, Declarations extends TProperties>(context: Context, _state: State, declarations: Declarations, options: TSchemaOptions): TModuleInstantiate<Context, State, Declarations>;
|
|
21
19
|
export {};
|
|
@@ -2,33 +2,35 @@
|
|
|
2
2
|
// deno-fmt-ignore-file
|
|
3
3
|
import { Guard } from '../../../guard/index.mjs';
|
|
4
4
|
import { Memory } from '../../../system/memory/index.mjs';
|
|
5
|
+
import { State } from '../instantiate.mjs';
|
|
5
6
|
// ------------------------------------------------------------------
|
|
6
7
|
// Module: Instantiation Infrastructure
|
|
7
8
|
// ------------------------------------------------------------------
|
|
8
9
|
import { CyclicCandidates } from '../cyclic/candidates.mjs';
|
|
9
10
|
import { InstantiateCyclic } from '../cyclic/instantiate.mjs';
|
|
10
11
|
import { InstantiateType } from '../instantiate.mjs';
|
|
11
|
-
function InstantiateCyclics(context, cyclicKeys) {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
function InstantiateCyclics(context, declarations, cyclicKeys) {
|
|
13
|
+
const declarationContext = Memory.Assign(context, declarations);
|
|
14
|
+
const declarationKeys = Guard.Keys(declarations).filter(key => cyclicKeys.includes(key));
|
|
15
|
+
return declarationKeys.reduce((result, key) => {
|
|
16
|
+
return { ...result, [key]: InstantiateCyclic(declarationContext, key, declarations[key]) };
|
|
15
17
|
}, {});
|
|
16
18
|
}
|
|
17
|
-
function InstantiateNonCyclics(context, cyclicKeys) {
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
function InstantiateNonCyclics(context, declarations, cyclicKeys) {
|
|
20
|
+
const declarationContext = Memory.Assign(context, declarations);
|
|
21
|
+
const declarationKeys = Guard.Keys(declarations).filter(key => !cyclicKeys.includes(key));
|
|
22
|
+
return declarationKeys.reduce((result, key) => {
|
|
23
|
+
return { ...result, [key]: InstantiateType(declarationContext, State([], []), declarations[key]) };
|
|
21
24
|
}, {});
|
|
22
25
|
}
|
|
23
|
-
function InstantiateModule(context, options) {
|
|
24
|
-
const cyclicCandidates = CyclicCandidates(
|
|
25
|
-
const instantiatedCyclics = InstantiateCyclics(context, cyclicCandidates);
|
|
26
|
-
const instantiatedNonCyclics = InstantiateNonCyclics(context, cyclicCandidates);
|
|
26
|
+
function InstantiateModule(context, declarations, options) {
|
|
27
|
+
const cyclicCandidates = CyclicCandidates(declarations);
|
|
28
|
+
const instantiatedCyclics = InstantiateCyclics(context, declarations, cyclicCandidates);
|
|
29
|
+
const instantiatedNonCyclics = InstantiateNonCyclics(context, declarations, cyclicCandidates);
|
|
27
30
|
const instantiatedModule = { ...instantiatedCyclics, ...instantiatedNonCyclics };
|
|
28
31
|
return Memory.Update(instantiatedModule, {}, options);
|
|
29
32
|
}
|
|
30
|
-
export function ModuleInstantiate(context, _state,
|
|
31
|
-
const
|
|
32
|
-
const instantiatedModule = InstantiateModule(moduleContext, options);
|
|
33
|
+
export function ModuleInstantiate(context, _state, declarations, options) {
|
|
34
|
+
const instantiatedModule = InstantiateModule(context, declarations, options);
|
|
33
35
|
return instantiatedModule;
|
|
34
36
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type TSchema } from '../../types/schema.mjs';
|
|
2
|
+
import { type TFromType } from './from_type.mjs';
|
|
3
|
+
import { type TEvaluateDependent } from '../evaluate/evaluate.mjs';
|
|
4
|
+
export type TFromDependent<If extends TSchema, Then extends TSchema, Else extends TSchema, Evaluated extends TSchema = TEvaluateDependent<If, Then, Else>, Result extends TSchema = TFromType<Evaluated>> = Result;
|
|
5
|
+
export declare function FromDependent<If extends TSchema, Then extends TSchema, Else extends TSchema>(if_: If, then_: Then, else_: Else): TFromDependent<If, Then, Else>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// deno-fmt-ignore-file
|
|
2
|
+
import { FromType } from './from_type.mjs';
|
|
3
|
+
import { EvaluateDependent } from '../evaluate/evaluate.mjs';
|
|
4
|
+
export function FromDependent(if_, then_, else_) {
|
|
5
|
+
const evaluated = EvaluateDependent(if_, then_, else_);
|
|
6
|
+
const result = FromType(evaluated);
|
|
7
|
+
return result;
|
|
8
|
+
}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { type TSchema } from '../../types/schema.mjs';
|
|
2
2
|
import { type TCyclic } from '../../types/cyclic.mjs';
|
|
3
|
+
import { type TDependent } from '../../types/dependent.mjs';
|
|
3
4
|
import { type TIntersect } from '../../types/intersect.mjs';
|
|
4
5
|
import { type TProperties } from '../../types/properties.mjs';
|
|
5
6
|
import { type TObject } from '../../types/object.mjs';
|
|
6
7
|
import { type TTuple } from '../../types/tuple.mjs';
|
|
7
8
|
import { type TUnion } from '../../types/union.mjs';
|
|
8
9
|
import { type TFromCyclic } from './from_cyclic.mjs';
|
|
10
|
+
import { type TFromDependent } from './from_dependent.mjs';
|
|
9
11
|
import { type TFromIntersect } from './from_intersect.mjs';
|
|
10
12
|
import { type TFromObject } from './from_object.mjs';
|
|
11
13
|
import { type TFromTuple } from './from_tuple.mjs';
|
|
12
14
|
import { type TFromUnion } from './from_union.mjs';
|
|
13
|
-
export type TFromType<Type extends TSchema, Result extends TProperties = (Type extends TCyclic<infer Defs extends TProperties, infer Ref extends string> ? TFromCyclic<Defs, Ref> : Type extends TIntersect<infer Types extends TSchema[]> ? TFromIntersect<Types> : Type extends TUnion<infer Types extends TSchema[]> ? TFromUnion<Types> : Type extends TTuple<infer Types extends TSchema[]> ? TFromTuple<Types> : Type extends TObject<infer Properties extends TProperties> ? TFromObject<Properties> : {})> = Result;
|
|
15
|
+
export type TFromType<Type extends TSchema, Result extends TProperties = (Type extends TCyclic<infer Defs extends TProperties, infer Ref extends string> ? TFromCyclic<Defs, Ref> : Type extends TDependent<infer If extends TSchema, infer Then extends TSchema, infer Else extends TSchema> ? TFromDependent<If, Then, Else> : Type extends TIntersect<infer Types extends TSchema[]> ? TFromIntersect<Types> : Type extends TUnion<infer Types extends TSchema[]> ? TFromUnion<Types> : Type extends TTuple<infer Types extends TSchema[]> ? TFromTuple<Types> : Type extends TObject<infer Properties extends TProperties> ? TFromObject<Properties> : {})> = Result;
|
|
14
16
|
export declare function FromType<Type extends TSchema>(type: Type): TFromType<Type>;
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
// deno-lint-ignore-file ban-types
|
|
2
2
|
// deno-fmt-ignore-file
|
|
3
3
|
import { IsCyclic } from '../../types/cyclic.mjs';
|
|
4
|
+
import { IsDependent } from '../../types/dependent.mjs';
|
|
4
5
|
import { IsIntersect } from '../../types/intersect.mjs';
|
|
5
6
|
import { IsObject } from '../../types/object.mjs';
|
|
6
7
|
import { IsTuple } from '../../types/tuple.mjs';
|
|
7
8
|
import { IsUnion } from '../../types/union.mjs';
|
|
8
9
|
import { FromCyclic } from './from_cyclic.mjs';
|
|
10
|
+
import { FromDependent } from './from_dependent.mjs';
|
|
9
11
|
import { FromIntersect } from './from_intersect.mjs';
|
|
10
12
|
import { FromObject } from './from_object.mjs';
|
|
11
13
|
import { FromTuple } from './from_tuple.mjs';
|
|
12
14
|
import { FromUnion } from './from_union.mjs';
|
|
13
15
|
export function FromType(type) {
|
|
14
16
|
return (IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) :
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
IsDependent(type) ? FromDependent(type.if, type.then, type.else) :
|
|
18
|
+
IsIntersect(type) ? FromIntersect(type.allOf) :
|
|
19
|
+
IsUnion(type) ? FromUnion(type.anyOf) :
|
|
20
|
+
IsTuple(type) ? FromTuple(type.items) :
|
|
21
|
+
IsObject(type) ? FromObject(type.properties) :
|
|
22
|
+
{});
|
|
20
23
|
}
|
|
@@ -11,9 +11,9 @@ function CollapseUnionProperties(left, right) {
|
|
|
11
11
|
return result;
|
|
12
12
|
}
|
|
13
13
|
function ReduceVariants(types, result) {
|
|
14
|
-
return Guard.
|
|
14
|
+
return Guard.ShiftLeft(types, (left, right) => ReduceVariants(right, CollapseUnionProperties(result, FromType(left))), () => result);
|
|
15
15
|
}
|
|
16
16
|
export function FromUnion(types) {
|
|
17
|
-
return Guard.
|
|
17
|
+
return Guard.ShiftLeft(types, (left, right) => ReduceVariants(right, FromType(left)), () => Unreachable());
|
|
18
18
|
}
|
|
19
19
|
// deno-coverage-ignore-stop
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type TSchema, type TSchemaOptions } from '../../types/schema.mjs';
|
|
2
|
+
import { type TProperties } from '../../types/properties.mjs';
|
|
3
|
+
import { type TOptional } from '../../types/_optional.mjs';
|
|
4
|
+
import { type TState, type TInstantiateType } from '../instantiate.mjs';
|
|
5
|
+
type TAddOptionalOperation<Type extends TSchema, Result extends TSchema = `~optional` extends keyof Type ? Type : TOptional<Type>> = Result;
|
|
6
|
+
export type TAddOptionalAction<Type extends TSchema, Result extends TSchema = TAddOptionalOperation<Type>> = Result;
|
|
7
|
+
export declare function AddOptionalAction<Type extends TSchema>(type: Type, options: TSchemaOptions): TAddOptionalAction<Type>;
|
|
8
|
+
export type TAddOptionalInstantiate<Context extends TProperties, State extends TState, Type extends TSchema, InstantiateType extends TSchema = TInstantiateType<Context, State, Type>> = TAddOptionalAction<InstantiateType>;
|
|
9
|
+
export declare function AddOptionalInstantiate<Context extends TProperties, State extends TState, Type extends TSchema>(context: Context, state: State, type: Type, options: TSchemaOptions): TAddOptionalInstantiate<Context, State, Type>;
|
|
10
|
+
export {};
|