@openclaw/slack 2026.9.6 → 2026.9.7
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/icon.png +0 -0
- package/dist/.setup/{account-inspect-DP1Bcwj4.mjs → account-inspect-DWBXpER6.mjs} +1 -1
- package/dist/.setup/{accounts-BBHvg0pY.mjs → accounts-D_N9IqNA.mjs} +23 -1
- package/dist/.setup/{action-runtime-B01d85zt.mjs → action-runtime-DfWvuiZd.mjs} +26 -41
- package/dist/.setup/action-runtime.runtime-Ck4bAWOX.mjs +2 -0
- package/dist/.setup/{actions-DKCtBgCI.mjs → actions-Df0CzcDl.mjs} +88 -175
- package/dist/.setup/{approval-handler.runtime-DMszKn_7.mjs → approval-handler.runtime-Ed6Sw5VK.mjs} +37 -47
- package/dist/.setup/{approval-message-updates-Tb_qRokK.mjs → approval-message-updates-BadvtA7R.mjs} +1 -2
- package/dist/.setup/{channel-CErYZ5zw.mjs → channel-C7bgPSTE.mjs} +181 -273
- package/dist/.setup/channel-meta-C443t-lI.mjs +27 -0
- package/dist/.setup/{channel-type-Dxk8VJUb.mjs → channel-type-ClOttrZ5.mjs} +13 -21
- package/dist/.setup/{channel.setup-BVoUtdPn.mjs → channel.setup-Dh2jzAjN.mjs} +35 -42
- package/dist/.setup/{config-schema-CyL279e7.mjs → config-schema-BZCxmHKG.mjs} +24 -21
- package/dist/.setup/{directory-config-CQTSH45W.mjs → directory-config-BOUWH3hR.mjs} +7 -10
- package/dist/.setup/{directory-live-BCcj89QV.mjs → directory-live-B2O4B_Ho.mjs} +9 -21
- package/dist/.setup/doctor-contract-CRN1Z_c7.mjs +342 -0
- package/dist/.setup/{message-tool-api-C0PTFaNV.mjs → message-tool-api-Cu4lwlGy.mjs} +34 -48
- package/dist/.setup/{provider-C-jPaGt2.mjs → monitor-BPVfkumU.mjs} +2181 -2693
- package/dist/.setup/{outbound-adapter-A7Wdn8ZT.mjs → outbound-adapter-Bv48XUjq.mjs} +10 -21
- package/dist/.setup/{pipeline.runtime-BlPOexmJ.mjs → pipeline.runtime-B1H63Frf.mjs} +311 -457
- package/dist/.setup/{plugin-routes-C3X0eVaK.mjs → plugin-routes-B8tooDLj.mjs} +1 -1
- package/dist/.setup/{policy-BApW53pI.mjs → policy-D-jfM174.mjs} +5 -5
- package/dist/.setup/{probe-DiYIMPJo.mjs → probe-B2Y9qc_z.mjs} +101 -39
- package/dist/.setup/{registry-bbjH7IHX.mjs → registry-CIbMfuf8.mjs} +6 -2
- package/dist/.setup/{relay-source-DfOnjJTE.mjs → relay-source-BpKdjsll.mjs} +10 -12
- package/dist/.setup/{replies-BBAJxUOQ.mjs → replies-BAnUtr2f.mjs} +16 -76
- package/dist/.setup/{reply-blocks-Bm8kf6mK.mjs → reply-blocks-SE1kTE3I.mjs} +27 -154
- package/dist/.setup/{resolve-channels-BXbMBbJD.mjs → resolve-channels-XXBn8UU_.mjs} +4 -5
- package/dist/.setup/{resolve-users-65WqvIqD.mjs → resolve-users-DW0ngD03.mjs} +20 -22
- package/dist/.setup/{scopes-h3YB-mMs.mjs → scopes-CasuDvaa.mjs} +6 -17
- package/dist/.setup/{secret-contract-DxmvbxBF.mjs → secret-contract-BaZcu6P_.mjs} +15 -20
- package/dist/.setup/{secret-contract-api-D9UfYujm.mjs → secret-contract-api-Dp6290Vg.mjs} +1 -1
- package/dist/.setup/{security-audit-BypHqcq5.mjs → security-audit-BqDc-6VL.mjs} +1 -1
- package/dist/.setup/{send-Cp6omkOg.mjs → send-BOVLQi3n.mjs} +84 -171
- package/dist/.setup/{session-status-Cf7AvWOt.mjs → session-status-DscajIsd.mjs} +315 -238
- package/dist/.setup/{setup-plugin-api-dLPkL06L.mjs → setup-plugin-api-DTtbTKNk.mjs} +1 -1
- package/dist/.setup/{setup-surface-D3DLcCxu.mjs → setup-surface-Dn7QgWRE.mjs} +24 -56
- package/dist/.setup/{shared-CJ3arAFL.mjs → shared-qau-uDGl.mjs} +30 -56
- package/dist/.setup/{slash-dispatch.runtime-HFy_XvyO.mjs → slash-dispatch.runtime--AEzLVBF.mjs} +1 -1
- package/dist/.setup/{streaming-compat-B-e0mqM0.mjs → streaming-compat-C5Wut626.mjs} +31 -8
- package/dist/.setup/{target-parsing-DEsPjngB.mjs → target-parsing-FFE26kOV.mjs} +1 -7
- package/dist/.setup/{targets-Cku2KCvg.mjs → targets-C6LZQL1Q.mjs} +1 -1
- package/dist/.setup/{thread-ts-CukseRVL.mjs → thread-ts-Cvt7WD6B.mjs} +0 -1
- package/dist/account-inspect-api.js +1 -1
- package/dist/api.js +18 -17
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/http-routes-api.js +1 -1
- package/dist/index.js +1 -1
- package/dist/message-tool-api.js +1 -1
- package/dist/runtime-api.js +11 -12
- package/dist/secret-contract-api.js +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/setup-entry.js +2 -2
- package/dist/setup-plugin-api.js +1 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/child_process.d.ts +1 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/crypto.d.ts +20 -8
- package/node_modules/@slack/bolt/node_modules/@types/node/ffi.d.ts +14 -0
- package/node_modules/@slack/bolt/node_modules/@types/node/http2.d.ts +3 -2
- package/node_modules/@slack/bolt/node_modules/@types/node/net.d.ts +16 -4
- package/node_modules/@slack/bolt/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/bolt/node_modules/@types/node/process.d.ts +1 -0
- package/node_modules/@slack/bolt/node_modules/@types/node/quic.d.ts +39 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/stream/iter.d.ts +9 -12
- package/node_modules/@slack/bolt/node_modules/@types/node/test/reporters.d.ts +1 -0
- package/node_modules/@slack/bolt/node_modules/@types/node/test.d.ts +72 -0
- package/node_modules/@slack/bolt/node_modules/@types/node/tls.d.ts +14 -10
- package/node_modules/@slack/bolt/node_modules/@types/node/vm.d.ts +2 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/worker_threads.d.ts +4 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/child_process.d.ts +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +20 -8
- package/node_modules/@slack/web-api/node_modules/@types/node/ffi.d.ts +14 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/http2.d.ts +3 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/net.d.ts +16 -4
- package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/process.d.ts +1 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/quic.d.ts +39 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/stream/iter.d.ts +9 -12
- package/node_modules/@slack/web-api/node_modules/@types/node/test/reporters.d.ts +1 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/test.d.ts +72 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/tls.d.ts +14 -10
- package/node_modules/@slack/web-api/node_modules/@types/node/vm.d.ts +2 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/worker_threads.d.ts +4 -1
- package/node_modules/get-east-asian-width/index.js +8 -3
- package/node_modules/get-east-asian-width/lookup-data.js +1 -1
- package/node_modules/get-east-asian-width/lookup.js +4 -4
- package/node_modules/get-east-asian-width/package.json +1 -1
- package/node_modules/typebox/build/compile/code.mjs +1 -2
- package/node_modules/typebox/build/compile/validator.mjs +5 -1
- package/node_modules/typebox/build/format/iri.mjs +16 -9
- package/node_modules/typebox/build/guard/emit.mjs +2 -2
- package/node_modules/typebox/build/guard/guard.d.mts +7 -5
- package/node_modules/typebox/build/guard/guard.mjs +14 -9
- package/node_modules/typebox/build/guard/index.mjs +6 -0
- package/node_modules/typebox/build/guard/unicode/unicode.d.mts +6 -0
- package/node_modules/typebox/build/guard/unicode/unicode.mjs +35 -0
- package/node_modules/typebox/build/guard/{string.mjs → unicode/unicode_segment.mjs} +16 -19
- package/node_modules/typebox/build/schema/build.mjs +2 -3
- package/node_modules/typebox/build/schema/engine/_pathing.d.mts +1 -0
- package/node_modules/typebox/build/schema/engine/_pathing.mjs +11 -0
- package/node_modules/typebox/build/schema/engine/_refine.mjs +13 -5
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/dependencies.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/dependentSchemas.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +1 -1
- package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/format.mjs +9 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/properties.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +1 -1
- package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/ref.d.mts +1 -1
- package/node_modules/typebox/build/schema/engine/ref.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/schema.mjs +24 -24
- package/node_modules/typebox/build/schema/parse.mjs +3 -0
- package/node_modules/typebox/build/schema/pointer/pointer.d.mts +1 -6
- package/node_modules/typebox/build/schema/pointer/pointer.mjs +47 -64
- package/node_modules/typebox/build/system/settings/internal.d.mts +2 -0
- package/node_modules/typebox/build/system/settings/internal.mjs +20 -0
- package/node_modules/typebox/build/system/settings/settings.d.mts +11 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +14 -0
- package/node_modules/typebox/build/type/extends/inference.d.mts +1 -1
- package/node_modules/typebox/build/type/extends/inference.mjs +15 -2
- package/node_modules/typebox/build/type/extends/tuple.d.mts +2 -1
- package/node_modules/typebox/build/type/extends/tuple.mjs +21 -1
- package/node_modules/typebox/build/value/parse/parse.mjs +10 -4
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +3 -1
- package/node_modules/undici/README.md +81 -25
- package/node_modules/undici/docs/docs/api/Agent.md +249 -42
- package/node_modules/undici/docs/docs/api/BalancedPool.md +246 -48
- package/node_modules/undici/docs/docs/api/CacheStorage.md +171 -13
- package/node_modules/undici/docs/docs/api/CacheStore.md +294 -98
- package/node_modules/undici/docs/docs/api/Client.md +407 -162
- package/node_modules/undici/docs/docs/api/ClientStats.md +80 -14
- package/node_modules/undici/docs/docs/api/Connector.md +118 -35
- package/node_modules/undici/docs/docs/api/ContentType.md +65 -25
- package/node_modules/undici/docs/docs/api/Cookies.md +122 -71
- package/node_modules/undici/docs/docs/api/Debug.md +34 -18
- package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +364 -164
- package/node_modules/undici/docs/docs/api/Dispatcher.md +490 -1055
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +105 -93
- package/node_modules/undici/docs/docs/api/Errors.md +503 -28
- package/node_modules/undici/docs/docs/api/EventSource.md +326 -13
- package/node_modules/undici/docs/docs/api/Fetch.md +681 -30
- package/node_modules/undici/docs/docs/api/GlobalInstallation.md +78 -96
- package/node_modules/undici/docs/docs/api/H2CClient.md +298 -176
- package/node_modules/undici/docs/docs/api/Interceptors.md +418 -0
- package/node_modules/undici/docs/docs/api/MockAgent.md +333 -314
- package/node_modules/undici/docs/docs/api/MockCallHistory.md +272 -98
- package/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +189 -26
- package/node_modules/undici/docs/docs/api/MockClient.md +151 -33
- package/node_modules/undici/docs/docs/api/MockErrors.md +56 -5
- package/node_modules/undici/docs/docs/api/MockPool.md +321 -258
- package/node_modules/undici/docs/docs/api/Pool.md +236 -41
- package/node_modules/undici/docs/docs/api/PoolStats.md +119 -13
- package/node_modules/undici/docs/docs/api/ProxyAgent.md +179 -160
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +238 -55
- package/node_modules/undici/docs/docs/api/RetryAgent.md +113 -27
- package/node_modules/undici/docs/docs/api/RetryHandler.md +161 -79
- package/node_modules/undici/docs/docs/api/RoundRobinPool.md +166 -72
- package/node_modules/undici/docs/docs/api/SnapshotAgent.md +262 -517
- package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +177 -196
- package/node_modules/undici/docs/docs/api/Util.md +68 -11
- package/node_modules/undici/docs/docs/api/WebSocket.md +475 -80
- package/node_modules/undici/docs/docs/api/api-lifecycle.md +100 -32
- package/node_modules/undici/docs/docs/best-practices/client-certificate.md +2 -0
- package/node_modules/undici/docs/docs/best-practices/crawling.md +3 -1
- package/node_modules/undici/docs/docs/best-practices/migrating-from-v7-to-v8.md +233 -0
- package/node_modules/undici/docs/docs/best-practices/mocking-request.md +9 -7
- package/node_modules/undici/docs/docs/best-practices/proxy.md +3 -1
- package/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +10 -8
- package/node_modules/undici/docs/docs/best-practices/writing-tests.md +2 -0
- package/node_modules/undici/docs/docs/getting-started.md +281 -0
- package/node_modules/undici/docs/docs/index.md +784 -0
- package/node_modules/undici/docs/docs/site.json +125 -0
- package/node_modules/undici/docs/docs/type-map.json +79 -0
- package/node_modules/undici/index.js +4 -2
- package/node_modules/undici/lib/api/api-connect.js +13 -11
- package/node_modules/undici/lib/api/api-pipeline.js +26 -13
- package/node_modules/undici/lib/api/api-request.js +51 -21
- package/node_modules/undici/lib/api/api-stream.js +81 -20
- package/node_modules/undici/lib/api/api-upgrade.js +21 -11
- package/node_modules/undici/lib/api/readable.js +45 -9
- package/node_modules/undici/lib/cache/memory-cache-store.js +3 -3
- package/node_modules/undici/lib/cache/sqlite-cache-store.js +3 -1
- package/node_modules/undici/lib/core/connect.js +46 -7
- package/node_modules/undici/lib/core/constants.js +1 -24
- package/node_modules/undici/lib/core/errors.js +22 -2
- package/node_modules/undici/lib/core/request.js +100 -18
- package/node_modules/undici/lib/core/symbols.js +4 -0
- package/node_modules/undici/lib/core/util.js +105 -48
- package/node_modules/undici/lib/dispatcher/agent.js +51 -32
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +23 -27
- package/node_modules/undici/lib/dispatcher/client-h1.js +86 -24
- package/node_modules/undici/lib/dispatcher/client-h2.js +1091 -361
- package/node_modules/undici/lib/dispatcher/client.js +109 -36
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +19 -6
- package/node_modules/undici/lib/dispatcher/dispatcher.js +15 -5
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +110 -0
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +37 -8
- package/node_modules/undici/lib/dispatcher/h2c-client.js +4 -4
- package/node_modules/undici/lib/dispatcher/pool-base.js +28 -10
- package/node_modules/undici/lib/dispatcher/pool.js +30 -5
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +95 -19
- package/node_modules/undici/lib/dispatcher/retry-agent.js +3 -0
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +32 -10
- package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +153 -63
- package/node_modules/undici/lib/global.js +37 -14
- package/node_modules/undici/lib/handler/cache-handler.js +49 -7
- package/node_modules/undici/lib/handler/cache-revalidation-handler.js +10 -0
- package/node_modules/undici/lib/handler/decorator-handler.js +8 -3
- package/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
- package/node_modules/undici/lib/handler/redirect-handler.js +66 -66
- package/node_modules/undici/lib/handler/retry-handler.js +191 -50
- package/node_modules/undici/lib/interceptor/cache.js +75 -25
- package/node_modules/undici/lib/interceptor/decompress.js +5 -2
- package/node_modules/undici/lib/interceptor/deduplicate.js +5 -4
- package/node_modules/undici/lib/interceptor/dns.js +12 -1
- package/node_modules/undici/lib/interceptor/redirect.js +3 -3
- package/node_modules/undici/lib/llhttp/llhttp-wasm.js +1 -1
- package/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +1 -1
- package/node_modules/undici/lib/mock/mock-agent.js +21 -9
- package/node_modules/undici/lib/mock/mock-call-history.js +1 -1
- package/node_modules/undici/lib/mock/mock-interceptor.js +25 -7
- package/node_modules/undici/lib/mock/mock-utils.js +281 -47
- package/node_modules/undici/lib/mock/snapshot-agent.js +25 -7
- package/node_modules/undici/lib/mock/snapshot-recorder.js +38 -3
- package/node_modules/undici/lib/util/cache.js +92 -10
- package/node_modules/undici/lib/util/runtime-features.js +3 -34
- package/node_modules/undici/lib/web/cache/cache.js +6 -8
- package/node_modules/undici/lib/web/cookies/parse.js +150 -146
- package/node_modules/undici/lib/web/cookies/util.js +1 -1
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
- package/node_modules/undici/lib/web/eventsource/eventsource.js +20 -21
- package/node_modules/undici/lib/web/eventsource/util.js +32 -1
- package/node_modules/undici/lib/web/fetch/body.js +48 -10
- package/node_modules/undici/lib/web/fetch/constants.js +1 -1
- package/node_modules/undici/lib/web/fetch/formdata.js +21 -2
- package/node_modules/undici/lib/web/fetch/index.js +242 -223
- package/node_modules/undici/lib/web/fetch/request.js +35 -6
- package/node_modules/undici/lib/web/fetch/response.js +1 -3
- package/node_modules/undici/lib/web/fetch/util.js +10 -2
- package/node_modules/undici/lib/web/webidl/index.js +5 -7
- package/node_modules/undici/lib/web/websocket/frame.js +1 -7
- package/node_modules/undici/lib/web/websocket/receiver.js +1 -1
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +10 -10
- package/node_modules/undici/lib/web/websocket/websocket.js +25 -3
- package/node_modules/undici/package.json +10 -10
- package/node_modules/undici/types/agent.d.ts +0 -2
- package/node_modules/undici/types/client.d.ts +69 -24
- package/node_modules/undici/types/connector.d.ts +1 -0
- package/node_modules/undici/types/cookies.d.ts +1 -1
- package/node_modules/undici/types/dispatcher.d.ts +8 -30
- package/node_modules/undici/types/dispatcher1-wrapper.d.ts +7 -0
- package/node_modules/undici/types/errors.d.ts +10 -0
- package/node_modules/undici/types/fetch.d.ts +5 -1
- package/node_modules/undici/types/formdata.d.ts +0 -6
- package/node_modules/undici/types/h2c-client.d.ts +6 -6
- package/node_modules/undici/types/handlers.d.ts +2 -0
- 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/mock-agent.d.ts +11 -10
- package/node_modules/undici/types/mock-interceptor.d.ts +5 -1
- package/node_modules/undici/types/pool.d.ts +0 -2
- package/node_modules/undici/types/proxy-agent.d.ts +9 -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 +4 -2
- package/node_modules/undici/types/webidl.d.ts +0 -1
- package/openclaw.plugin.json +31 -3
- package/package.json +7 -7
- package/dist/.setup/accounts.runtime-DN-PPocC.mjs +0 -2
- package/dist/.setup/action-runtime.runtime-C8R8CUan.mjs +0 -2
- package/dist/.setup/doctor-contract-CtMUqjvk.mjs +0 -186
- package/dist/.setup/monitor-_Sht7Dqy.mjs +0 -13
- package/dist/.setup/rolldown-runtime-D7D4PA-g.mjs +0 -13
- package/dist/.setup/send.runtime-B4caZU6T.mjs +0 -2
- package/dist/.setup/slash-commands.runtime-BpSH0b3q.mjs +0 -2
- package/dist/.setup/slash-skill-commands.runtime-Bi1JWZHY.mjs +0 -2
- package/node_modules/undici/lib/handler/unwrap-handler.js +0 -106
- package/node_modules/undici/lib/handler/wrap-handler.js +0 -105
- package/node_modules/undici/lib/llhttp/.gitkeep +0 -0
- package/node_modules/undici/lib/util/promise.js +0 -28
- /package/node_modules/typebox/build/guard/{string.d.mts → unicode/unicode_segment.d.mts} +0 -0
|
@@ -353,10 +353,11 @@ declare module "node:net" {
|
|
|
353
353
|
/**
|
|
354
354
|
* This property represents the state of the connection as a string.
|
|
355
355
|
*
|
|
356
|
-
* * If the
|
|
357
|
-
* * If the
|
|
358
|
-
* * If the
|
|
359
|
-
* * If the
|
|
356
|
+
* * If the socket is connecting, `socket.readyState` is `opening`.
|
|
357
|
+
* * If the socket is readable and writable, it is `open`.
|
|
358
|
+
* * If the socket is readable and not writable, it is `readOnly`.
|
|
359
|
+
* * If the socket is not readable and writable, it is `writeOnly`.
|
|
360
|
+
* * Otherwise, it is `closed`.
|
|
360
361
|
* @since v0.5.0
|
|
361
362
|
*/
|
|
362
363
|
readonly readyState: SocketReadyState;
|
|
@@ -378,6 +379,12 @@ declare module "node:net" {
|
|
|
378
379
|
* @since v0.5.10
|
|
379
380
|
*/
|
|
380
381
|
readonly remotePort: number | undefined;
|
|
382
|
+
/**
|
|
383
|
+
* Reference to the server that accepted the socket. This is `null` for sockets
|
|
384
|
+
* that were not accepted by a server.
|
|
385
|
+
* @since v0.3.4
|
|
386
|
+
*/
|
|
387
|
+
readonly server: Server | null;
|
|
381
388
|
/**
|
|
382
389
|
* The socket timeout in milliseconds as set by `socket.setTimeout()`.
|
|
383
390
|
* It is `undefined` if a timeout has not been set.
|
|
@@ -486,6 +493,11 @@ declare module "node:net" {
|
|
|
486
493
|
* throw `ERR_SOCKET_HANDLE_ADOPTED`. A handle that is never adopted must be
|
|
487
494
|
* closed to avoid leaking the socket.
|
|
488
495
|
*
|
|
496
|
+
* When an adopted `BoundSocket` connects to a numeric IP literal, `connect(2)` is
|
|
497
|
+
* issued synchronously, so `socket.localAddress` is resolved once
|
|
498
|
+
* `socket.connect()` returns. Connection failures are still reported via a
|
|
499
|
+
* deferred `'error'` event.
|
|
500
|
+
*
|
|
489
501
|
* ```js
|
|
490
502
|
* import net from 'node:net';
|
|
491
503
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.6.1",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -150,6 +150,6 @@
|
|
|
150
150
|
"undici-types": "~8.9.0"
|
|
151
151
|
},
|
|
152
152
|
"peerDependencies": {},
|
|
153
|
-
"typesPublisherContentHash": "
|
|
153
|
+
"typesPublisherContentHash": "1e408625d85b96f18c0a395aedf69ae790959325edaa8e30a262777918c6c127",
|
|
154
154
|
"typeScriptVersion": "5.6"
|
|
155
155
|
}
|
|
@@ -110,6 +110,7 @@ declare module "node:process" {
|
|
|
110
110
|
"node:util/types": typeof import("node:util/types");
|
|
111
111
|
"v8": typeof import("v8");
|
|
112
112
|
"node:v8": typeof import("node:v8");
|
|
113
|
+
"node:vfs": typeof import("node:vfs");
|
|
113
114
|
"vm": typeof import("vm");
|
|
114
115
|
"node:vm": typeof import("node:vm");
|
|
115
116
|
"wasi": typeof import("wasi");
|
|
@@ -4,7 +4,7 @@ declare module "node:quic" {
|
|
|
4
4
|
import { FileHandle } from "node:fs/promises";
|
|
5
5
|
import { BlockList, SocketAddress } from "node:net";
|
|
6
6
|
import { Writer } from "node:stream/iter";
|
|
7
|
-
import { EphemeralKeyInfo } from "node:tls";
|
|
7
|
+
import { CertificateCompressionAlgorithm, EphemeralKeyInfo } from "node:tls";
|
|
8
8
|
/**
|
|
9
9
|
* @since v23.8.0
|
|
10
10
|
*/
|
|
@@ -277,6 +277,28 @@ declare module "node:quic" {
|
|
|
277
277
|
* @since v23.8.0
|
|
278
278
|
*/
|
|
279
279
|
ca?: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray<ArrayBuffer | NodeJS.ArrayBufferView> | undefined;
|
|
280
|
+
/**
|
|
281
|
+
* Enables TLS certificate compression ([RFC 8879](https://www.rfc-editor.org/rfc/rfc8879)) for this session. When
|
|
282
|
+
* omitted, certificate compression is disabled.
|
|
283
|
+
*
|
|
284
|
+
* On the server side, the certificate chain is compressed using the first
|
|
285
|
+
* listed algorithm that the client advertises support for. On the client side,
|
|
286
|
+
* the listed algorithms are advertised to the server so that the server may
|
|
287
|
+
* compress its certificate. When client authentication is in use, the option
|
|
288
|
+
* also controls compression of the client's certificate.
|
|
289
|
+
*
|
|
290
|
+
* Compressing the certificate chain is especially useful for QUIC because it
|
|
291
|
+
* reduces the size of the server's first flight, which is bounded by the
|
|
292
|
+
* anti-amplification limit (see [Certificate size and handshake
|
|
293
|
+
* performance](https://nodejs.org/docs/latest-v26.x/api/quic.html#certificate-size-and-handshake-performance)). Certificate compression requires TLS 1.3, which QUIC always
|
|
294
|
+
* uses.
|
|
295
|
+
*
|
|
296
|
+
* At most three algorithms may be specified. The option is silently ignored if
|
|
297
|
+
* Node.js was built against a shared OpenSSL that lacks certificate compression
|
|
298
|
+
* support.
|
|
299
|
+
* @since v26.6.0
|
|
300
|
+
*/
|
|
301
|
+
certificateCompression?: readonly CertificateCompressionAlgorithm[] | undefined;
|
|
280
302
|
/**
|
|
281
303
|
* Specifies the congestion control algorithm that will be used.
|
|
282
304
|
* Must be set to one of either `'reno'`, `'cubic'`, or `'bbr'`.
|
|
@@ -1438,6 +1460,22 @@ declare module "node:quic" {
|
|
|
1438
1460
|
datagram: string | NodeJS.ArrayBufferView | Promise<string | NodeJS.ArrayBufferView>,
|
|
1439
1461
|
encoding?: BufferEncoding,
|
|
1440
1462
|
): Promise<bigint>;
|
|
1463
|
+
/**
|
|
1464
|
+
* The SNI (Server Name Indication) host name associated with the session. This is
|
|
1465
|
+
* `null` before the client hello is processed. Once the hello has been
|
|
1466
|
+
* processed, this is either the host name string or `false` if the handshake
|
|
1467
|
+
* had no SNI.
|
|
1468
|
+
* @since v26.6.0
|
|
1469
|
+
*/
|
|
1470
|
+
readonly servername: string | false | null;
|
|
1471
|
+
/**
|
|
1472
|
+
* The negotiated ALPN protocol. This is `null` before the client hello is
|
|
1473
|
+
* processed. Once ALPN has been negotiated, this is the protocol string. ALPN
|
|
1474
|
+
* is mandatory in QUIC so this is never `false` on successful connections,
|
|
1475
|
+
* unlike `node:tls` where this is optional.
|
|
1476
|
+
* @since v26.6.0
|
|
1477
|
+
*/
|
|
1478
|
+
readonly alpnProtocol: string | null;
|
|
1441
1479
|
/**
|
|
1442
1480
|
* The local certificate as a `crypto.X509Certificate` instance. Server
|
|
1443
1481
|
* sessions return the certificate configured for the negotiated SNI host.
|
|
@@ -45,14 +45,14 @@ declare module "node:stream/iter" {
|
|
|
45
45
|
[shareSyncProtocol](options: ShareSyncOptions): SyncShare;
|
|
46
46
|
}
|
|
47
47
|
// IDL dictionaries, enums, typedefs
|
|
48
|
-
type BackpressurePolicy = "strict" | "
|
|
48
|
+
type BackpressurePolicy = "strict" | "unbounded" | "drop-oldest" | "drop-newest";
|
|
49
49
|
type ByteReadableStream = AsyncIterable<Uint8Array[]>;
|
|
50
50
|
type SyncByteReadableStream = Iterable<Uint8Array[]>;
|
|
51
51
|
interface WriteOptions {
|
|
52
52
|
signal?: AbortSignal;
|
|
53
53
|
}
|
|
54
54
|
interface PushStreamOptions {
|
|
55
|
-
|
|
55
|
+
budget?: number;
|
|
56
56
|
backpressure?: BackpressurePolicy;
|
|
57
57
|
signal?: AbortSignal;
|
|
58
58
|
}
|
|
@@ -85,21 +85,21 @@ declare module "node:stream/iter" {
|
|
|
85
85
|
signal?: AbortSignal;
|
|
86
86
|
}
|
|
87
87
|
interface BroadcastOptions {
|
|
88
|
-
|
|
88
|
+
budget?: number;
|
|
89
89
|
backpressure?: BackpressurePolicy;
|
|
90
90
|
signal?: AbortSignal;
|
|
91
91
|
}
|
|
92
92
|
interface ShareOptions {
|
|
93
|
-
|
|
93
|
+
budget?: number;
|
|
94
94
|
backpressure?: BackpressurePolicy;
|
|
95
95
|
signal?: AbortSignal;
|
|
96
96
|
}
|
|
97
97
|
interface ShareSyncOptions {
|
|
98
|
-
|
|
98
|
+
budget?: number;
|
|
99
99
|
backpressure?: BackpressurePolicy;
|
|
100
100
|
}
|
|
101
101
|
interface DuplexDirectionOptions {
|
|
102
|
-
|
|
102
|
+
budget?: number;
|
|
103
103
|
backpressure?: BackpressurePolicy;
|
|
104
104
|
}
|
|
105
105
|
interface DuplexOptions {
|
|
@@ -142,7 +142,7 @@ declare module "node:stream/iter" {
|
|
|
142
142
|
broadcast: Broadcast;
|
|
143
143
|
}
|
|
144
144
|
interface Writer extends Disposable, AsyncDisposable {
|
|
145
|
-
readonly
|
|
145
|
+
readonly canWrite: boolean | null;
|
|
146
146
|
write(chunk: Uint8Array | string, options?: WriteOptions): Promise<void>;
|
|
147
147
|
writev(chunks: Array<Uint8Array | string>, options?: WriteOptions): Promise<void>;
|
|
148
148
|
writeSync(chunk: Uint8Array | string): boolean;
|
|
@@ -155,7 +155,7 @@ declare module "node:stream/iter" {
|
|
|
155
155
|
write(chunk: Uint8Array | string, options?: WriteOptions): Promise<void>;
|
|
156
156
|
}
|
|
157
157
|
interface SyncWriter extends Disposable {
|
|
158
|
-
readonly
|
|
158
|
+
readonly canWrite: boolean | null;
|
|
159
159
|
writeSync(chunk: Uint8Array | string): number;
|
|
160
160
|
writevSync(chunks: Array<Uint8Array | string>): number;
|
|
161
161
|
endSync(): number;
|
|
@@ -166,19 +166,16 @@ declare module "node:stream/iter" {
|
|
|
166
166
|
}
|
|
167
167
|
interface Broadcast extends Disposable {
|
|
168
168
|
readonly consumerCount: number;
|
|
169
|
-
readonly bufferSize: number;
|
|
170
169
|
push(...args: any[]): ByteReadableStream;
|
|
171
170
|
cancel(reason?: any): void;
|
|
172
171
|
}
|
|
173
172
|
interface Share extends Disposable {
|
|
174
173
|
readonly consumerCount: number;
|
|
175
|
-
readonly bufferSize: number;
|
|
176
174
|
pull(...args: any[]): ByteReadableStream;
|
|
177
175
|
cancel(reason?: any): void;
|
|
178
176
|
}
|
|
179
177
|
interface SyncShare extends Disposable {
|
|
180
178
|
readonly consumerCount: number;
|
|
181
|
-
readonly bufferSize: number;
|
|
182
179
|
pull(...args: any): SyncByteReadableStream;
|
|
183
180
|
cancel(reason?: any): void;
|
|
184
181
|
}
|
|
@@ -329,7 +326,7 @@ declare module "node:stream/iter" {
|
|
|
329
326
|
* });
|
|
330
327
|
*
|
|
331
328
|
* await pipeTo(from('hello world'),
|
|
332
|
-
* fromWritable(writable, { backpressure: '
|
|
329
|
+
* fromWritable(writable, { backpressure: 'unbounded' }));
|
|
333
330
|
* ```
|
|
334
331
|
* @since v26.1.0
|
|
335
332
|
* @experimental
|
|
@@ -9,6 +9,7 @@ declare module "node:test/reporters" {
|
|
|
9
9
|
| { type: "test:enqueue"; data: EventData.TestEnqueue }
|
|
10
10
|
| { type: "test:fail"; data: EventData.TestFail }
|
|
11
11
|
| { type: "test:interrupted"; data: EventData.TestInterrupted }
|
|
12
|
+
| { type: "test:log"; data: EventData.TestLog }
|
|
12
13
|
| { type: "test:pass"; data: EventData.TestPass }
|
|
13
14
|
| { type: "test:plan"; data: EventData.TestPlan }
|
|
14
15
|
| { type: "test:start"; data: EventData.TestStart }
|
|
@@ -375,6 +375,7 @@ declare module "node:test" {
|
|
|
375
375
|
"test:enqueue": [data: EventData.TestEnqueue];
|
|
376
376
|
"test:fail": [data: EventData.TestFail];
|
|
377
377
|
"test:interrupted": [data: EventData.TestInterrupted];
|
|
378
|
+
"test:log": [data: EventData.TestLog];
|
|
378
379
|
"test:pass": [data: EventData.TestPass];
|
|
379
380
|
"test:plan": [data: EventData.TestPlan];
|
|
380
381
|
"test:start": [data: EventData.TestStart];
|
|
@@ -455,6 +456,13 @@ declare module "node:test" {
|
|
|
455
456
|
* `undefined` if the test was run through the REPL.
|
|
456
457
|
*/
|
|
457
458
|
column?: number;
|
|
459
|
+
/**
|
|
460
|
+
* The path of the test file that was
|
|
461
|
+
* executed as the entry point of the child process that emitted this event.
|
|
462
|
+
* Only present when tests run with process isolation. May differ from
|
|
463
|
+
* `file` when the test is defined in a module imported by the entry file.
|
|
464
|
+
*/
|
|
465
|
+
entryFile?: string;
|
|
458
466
|
/**
|
|
459
467
|
* The path of the test file, `undefined` if test was run through the REPL.
|
|
460
468
|
*/
|
|
@@ -845,6 +853,36 @@ declare module "node:test" {
|
|
|
845
853
|
*/
|
|
846
854
|
tests: TestStart[];
|
|
847
855
|
}
|
|
856
|
+
interface TestLog extends LocationInfo {
|
|
857
|
+
/**
|
|
858
|
+
* The structured payload passed to `context.log`, or
|
|
859
|
+
* `undefined` if none was provided. The test runner does not interpret this
|
|
860
|
+
* value.
|
|
861
|
+
*/
|
|
862
|
+
data: unknown;
|
|
863
|
+
/**
|
|
864
|
+
* The log message.
|
|
865
|
+
*/
|
|
866
|
+
message: string;
|
|
867
|
+
/**
|
|
868
|
+
* The test name.
|
|
869
|
+
*/
|
|
870
|
+
name: string;
|
|
871
|
+
/**
|
|
872
|
+
* The nesting level of the test.
|
|
873
|
+
*/
|
|
874
|
+
nesting: number;
|
|
875
|
+
/**
|
|
876
|
+
* The `testId` of the enclosing test, or
|
|
877
|
+
* `undefined` for top-level tests.
|
|
878
|
+
*/
|
|
879
|
+
parentId: number | undefined;
|
|
880
|
+
/**
|
|
881
|
+
* A numeric identifier for the test instance that emitted
|
|
882
|
+
* the log message.
|
|
883
|
+
*/
|
|
884
|
+
testId: number;
|
|
885
|
+
}
|
|
848
886
|
interface TestPass extends LocationInfo {
|
|
849
887
|
/**
|
|
850
888
|
* Additional execution metadata.
|
|
@@ -1130,6 +1168,25 @@ declare module "node:test" {
|
|
|
1130
1168
|
* @param message Message to be reported.
|
|
1131
1169
|
*/
|
|
1132
1170
|
diagnostic(message: string): void;
|
|
1171
|
+
/**
|
|
1172
|
+
* This function is used to write a log message to the output. Unlike
|
|
1173
|
+
* `context.diagnostic`, the resulting `'test:log'` event is emitted
|
|
1174
|
+
* immediately, in the order that the tests execute, rather than being buffered
|
|
1175
|
+
* until the test reports its results. This function does not return a value.
|
|
1176
|
+
*
|
|
1177
|
+
* ```js
|
|
1178
|
+
* test('top level test', (t) => {
|
|
1179
|
+
* t.log('fetched user', { userId: 42 });
|
|
1180
|
+
* t.log('retrying flaky endpoint', { attempt: 3 });
|
|
1181
|
+
* });
|
|
1182
|
+
* ```
|
|
1183
|
+
* @since v26.6.0
|
|
1184
|
+
* @param message Message to be reported.
|
|
1185
|
+
* @param data Optional structured payload attached to the message. The test
|
|
1186
|
+
* runner passes it through untouched. When tests run with process isolation,
|
|
1187
|
+
* this value must be compatible with the [HTML structured clone algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm).
|
|
1188
|
+
*/
|
|
1189
|
+
log(message: string, data?: unknown): void;
|
|
1133
1190
|
/**
|
|
1134
1191
|
* The absolute path of the test file that created the current test. If a test file imports
|
|
1135
1192
|
* additional modules that generate tests, the imported tests will return the path of the root test file.
|
|
@@ -1492,6 +1549,21 @@ declare module "node:test" {
|
|
|
1492
1549
|
* @param message A diagnostic message to output.
|
|
1493
1550
|
*/
|
|
1494
1551
|
diagnostic(message: string): void;
|
|
1552
|
+
/**
|
|
1553
|
+
* Write a log message to the output. The resulting `'test:log'` event is
|
|
1554
|
+
* emitted immediately, in the order that the tests execute.
|
|
1555
|
+
*
|
|
1556
|
+
* ```js
|
|
1557
|
+
* test.describe('my suite', (suite) => {
|
|
1558
|
+
* suite.log('Suite log message');
|
|
1559
|
+
* });
|
|
1560
|
+
* ```
|
|
1561
|
+
* @since v26.6.0
|
|
1562
|
+
* @param message Message to be reported.
|
|
1563
|
+
* @param data Optional structured payload attached to the message. The test
|
|
1564
|
+
* runner passes it through untouched.
|
|
1565
|
+
*/
|
|
1566
|
+
log(message: string, data?: unknown): void;
|
|
1495
1567
|
}
|
|
1496
1568
|
interface TestOptions {
|
|
1497
1569
|
/**
|
|
@@ -219,6 +219,13 @@ declare module "node:tls" {
|
|
|
219
219
|
* @since v0.11.4
|
|
220
220
|
*/
|
|
221
221
|
authorized: boolean;
|
|
222
|
+
/**
|
|
223
|
+
* The negotiated ALPN protocol. This is `null` before the handshake completes.
|
|
224
|
+
* Once the handshake completes, it settles as either the negotiated protocol
|
|
225
|
+
* name, or `false` if the peers did not negotiate an ALPN protocol.
|
|
226
|
+
* @since v6.0.0
|
|
227
|
+
*/
|
|
228
|
+
alpnProtocol: string | false | null;
|
|
222
229
|
/**
|
|
223
230
|
* Returns the reason why the peer's certificate was not been verified. This
|
|
224
231
|
* property is set only when `tlsSocket.authorized === false`.
|
|
@@ -230,16 +237,6 @@ declare module "node:tls" {
|
|
|
230
237
|
* @since v0.11.4
|
|
231
238
|
*/
|
|
232
239
|
encrypted: true;
|
|
233
|
-
/**
|
|
234
|
-
* String containing the selected ALPN protocol.
|
|
235
|
-
* Before a handshake has completed, this value is always null.
|
|
236
|
-
* When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false.
|
|
237
|
-
*/
|
|
238
|
-
alpnProtocol: string | false | null;
|
|
239
|
-
/**
|
|
240
|
-
* String containing the server name requested via SNI (Server Name Indication) TLS extension.
|
|
241
|
-
*/
|
|
242
|
-
servername: string | false | null;
|
|
243
240
|
/**
|
|
244
241
|
* Returns an object representing the local certificate. The returned object has
|
|
245
242
|
* some properties corresponding to the fields of the certificate.
|
|
@@ -402,6 +399,13 @@ declare module "node:tls" {
|
|
|
402
399
|
},
|
|
403
400
|
callback: (err: Error | null) => void,
|
|
404
401
|
): undefined | boolean;
|
|
402
|
+
/**
|
|
403
|
+
* The SNI (Server Name Indication) host name associated with the socket. This is
|
|
404
|
+
* `null` before the handshake completes. Once the handshake completes it settles
|
|
405
|
+
* as either the host name string, or `false` if SNI was not used.
|
|
406
|
+
* @since v0.11.3
|
|
407
|
+
*/
|
|
408
|
+
servername: string | false | null;
|
|
405
409
|
/**
|
|
406
410
|
* The `tlsSocket.setKeyCert()` method sets the private key and certificate to use for the socket.
|
|
407
411
|
* This is mainly useful if you wish to select a server certificate from a TLS server's `ALPNCallback`.
|
|
@@ -886,6 +886,7 @@ declare module "node:vm" {
|
|
|
886
886
|
* const module = new vm.SourceTextModule(
|
|
887
887
|
* 'Object.getPrototypeOf(import.meta.prop).secret = secret;',
|
|
888
888
|
* {
|
|
889
|
+
* context: contextifiedObject,
|
|
889
890
|
* initializeImportMeta(meta) {
|
|
890
891
|
* // Note: this object is created in the top context. As such,
|
|
891
892
|
* // Object.getPrototypeOf(import.meta.prop) points to the
|
|
@@ -904,7 +905,7 @@ declare module "node:vm" {
|
|
|
904
905
|
* // To fix this problem, replace
|
|
905
906
|
* // meta.prop = {};
|
|
906
907
|
* // above with
|
|
907
|
-
* // meta.prop = vm.runInContext('{}', contextifiedObject);
|
|
908
|
+
* // meta.prop = vm.runInContext('({})', contextifiedObject);
|
|
908
909
|
* ```
|
|
909
910
|
* @param code JavaScript Module code to parse
|
|
910
911
|
*/
|
|
@@ -6,6 +6,7 @@ declare module "node:worker_threads" {
|
|
|
6
6
|
NodeEventTarget,
|
|
7
7
|
} from "node:events";
|
|
8
8
|
import { FileHandle } from "node:fs/promises";
|
|
9
|
+
import { Server, Socket } from "node:net";
|
|
9
10
|
import { Performance } from "node:perf_hooks";
|
|
10
11
|
import { Readable, Writable } from "node:stream";
|
|
11
12
|
import { ReadableStream, TransformStream, WritableStream } from "node:stream/web";
|
|
@@ -514,7 +515,9 @@ declare module "node:worker_threads" {
|
|
|
514
515
|
| FileHandle
|
|
515
516
|
| ReadableStream
|
|
516
517
|
| WritableStream
|
|
517
|
-
| TransformStream
|
|
518
|
+
| TransformStream
|
|
519
|
+
| Server
|
|
520
|
+
| Socket;
|
|
518
521
|
interface LockGrantedCallback<T> {
|
|
519
522
|
(lock: Lock | null): T;
|
|
520
523
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {getCategory, isAmbiguous,
|
|
1
|
+
import {getCategory, isAmbiguous, isFullwidth, isWide} from './lookup.js';
|
|
2
2
|
|
|
3
3
|
function validate(codePoint) {
|
|
4
4
|
if (!Number.isSafeInteger(codePoint)) {
|
|
@@ -16,7 +16,7 @@ export function eastAsianWidth(codePoint, {ambiguousAsWide = false} = {}) {
|
|
|
16
16
|
validate(codePoint);
|
|
17
17
|
|
|
18
18
|
if (
|
|
19
|
-
|
|
19
|
+
isFullwidth(codePoint)
|
|
20
20
|
|| isWide(codePoint)
|
|
21
21
|
|| (ambiguousAsWide && isAmbiguous(codePoint))
|
|
22
22
|
) {
|
|
@@ -27,4 +27,9 @@ export function eastAsianWidth(codePoint, {ambiguousAsWide = false} = {}) {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
// Private exports for https://github.com/sindresorhus/is-fullwidth-code-point
|
|
30
|
-
export {
|
|
30
|
+
export {
|
|
31
|
+
isFullwidth as _isFullwidth,
|
|
32
|
+
// TODO: Remove this in the next major version.
|
|
33
|
+
isFullwidth as _isFullWidth,
|
|
34
|
+
isWide as _isWide,
|
|
35
|
+
} from './lookup.js';
|
|
@@ -18,4 +18,4 @@ export const narrowRanges = [32, 126, 162, 163, 165, 166, 172, 172, 175, 175, 10
|
|
|
18
18
|
|
|
19
19
|
export const wideMinimalCodePoint = 4352;
|
|
20
20
|
export const wideMaximumCodePoint = 262141;
|
|
21
|
-
export const wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208,
|
|
21
|
+
export const wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101594, 101631, 101664, 101760, 101874, 101888, 102801, 102816, 102866, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110888, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110952, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127406, 127406, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128729, 128732, 128735, 128747, 128748, 128756, 128764, 128986, 128986, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129734, 129736, 129736, 129740, 129757, 129759, 129771, 129775, 129786, 131072, 196605, 196608, 262141];
|
|
@@ -62,7 +62,7 @@ export const isAmbiguous = codePoint => {
|
|
|
62
62
|
return isInRange(ambiguousRanges, codePoint);
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
export const
|
|
65
|
+
export const isFullwidth = codePoint => {
|
|
66
66
|
if (
|
|
67
67
|
codePoint < fullwidthMinimalCodePoint
|
|
68
68
|
|| codePoint > fullwidthMaximumCodePoint
|
|
@@ -73,7 +73,7 @@ export const isFullWidth = codePoint => {
|
|
|
73
73
|
return isInRange(fullwidthRanges, codePoint);
|
|
74
74
|
};
|
|
75
75
|
|
|
76
|
-
const
|
|
76
|
+
const isHalfwidth = codePoint => {
|
|
77
77
|
if (
|
|
78
78
|
codePoint < halfwidthMinimalCodePoint
|
|
79
79
|
|| codePoint > halfwidthMaximumCodePoint
|
|
@@ -118,11 +118,11 @@ export function getCategory(codePoint) {
|
|
|
118
118
|
return 'ambiguous';
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
if (
|
|
121
|
+
if (isFullwidth(codePoint)) {
|
|
122
122
|
return 'fullwidth';
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
if (
|
|
125
|
+
if (isHalfwidth(codePoint)) {
|
|
126
126
|
return 'halfwidth';
|
|
127
127
|
}
|
|
128
128
|
|
|
@@ -16,9 +16,8 @@ function Separator() {
|
|
|
16
16
|
function ImportSection(build) {
|
|
17
17
|
const context = build.UseUnevaluated() ? [`import { CheckContext } from "typebox/schema"`] : [];
|
|
18
18
|
const hashing = `import { Hashing } from "typebox/system"`;
|
|
19
|
-
const format = `import { Format } from "typebox/format"`;
|
|
20
19
|
const guard = `import { Guard } from "typebox/guard"`;
|
|
21
|
-
return [...context, hashing,
|
|
20
|
+
return [...context, hashing, guard];
|
|
22
21
|
}
|
|
23
22
|
// ------------------------------------------------------------------
|
|
24
23
|
// ExternalSection
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
|
+
import { EnableParseErrors, DisableParseErrors } from '../system/settings/internal.mjs';
|
|
2
3
|
import { Settings } from '../system/settings/index.mjs';
|
|
3
4
|
import { Errors, Clean, Convert, Create, Default, Decode, Encode, HasCodec, Parser, ParseError } from '../value/index.mjs';
|
|
4
5
|
import { Build } from '../schema/index.mjs';
|
|
@@ -51,7 +52,10 @@ export class Validator {
|
|
|
51
52
|
return value;
|
|
52
53
|
if (Settings.Get().correctiveParse)
|
|
53
54
|
return Parser(this.Context(), this.Type(), value);
|
|
54
|
-
|
|
55
|
+
EnableParseErrors();
|
|
56
|
+
const errors = this.Errors(value);
|
|
57
|
+
DisableParseErrors();
|
|
58
|
+
throw new ParseError(value, errors);
|
|
55
59
|
}
|
|
56
60
|
/** Returns an array of validation errors for the given value. */
|
|
57
61
|
Errors(value) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// deno-lint-ignore-file no-control-regex
|
|
2
|
-
const IpvFutureMatchMaxLength = 2048;
|
|
3
|
-
const IpvFutureMatch = /\[[vV][0-9a-fA-F]+\.[^\]]+\]/; // Guarded By IpvFutureMatchMaxLength
|
|
4
|
-
const InvalidIriChars = /[\x00-\x20<>\^`{|}\\]/;
|
|
5
|
-
const InvalidPercentEncoding = /%(?![0-9a-fA-F]{2})/;
|
|
6
2
|
// ------------------------------------------------------------------
|
|
3
|
+
//
|
|
4
|
+
// Removed by the following PR
|
|
5
|
+
//
|
|
6
|
+
// https://github.com/json-schema-org/JSON-Schema-Test-Suite/pull/1176
|
|
7
|
+
//
|
|
7
8
|
// NarrowIpvFuture
|
|
8
9
|
//
|
|
9
10
|
// Substitutes an IPvFuture address with a standard IPv6 loopback
|
|
@@ -13,12 +14,18 @@ const InvalidPercentEncoding = /%(?![0-9a-fA-F]{2})/;
|
|
|
13
14
|
// be expensive on large strings, this operation is strictly
|
|
14
15
|
// limited to inputs under a defined length threshold.
|
|
15
16
|
//
|
|
16
|
-
//
|
|
17
|
+
// ------------------------------------------------------------------
|
|
18
|
+
//
|
|
19
|
+
// const IpvFutureMatchMaxLength = 2048
|
|
20
|
+
// const IpvFutureMatch = /\[[vV][0-9a-fA-F]+\.[^\]]+\]/ // Guarded By IpvFutureMatchMaxLength
|
|
21
|
+
//
|
|
22
|
+
// function NarrowIpvFuture(value: string): string {
|
|
23
|
+
// return value.length < IpvFutureMatchMaxLength ? value.replace(IpvFutureMatch, '[::1]') : value
|
|
24
|
+
// }
|
|
17
25
|
//
|
|
18
26
|
// ------------------------------------------------------------------
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
27
|
+
const InvalidIriChars = /[\x00-\x20<>\^`{|}\\]/;
|
|
28
|
+
const InvalidPercentEncoding = /%(?![0-9a-fA-F]{2})/;
|
|
22
29
|
/**
|
|
23
30
|
* Returns true if the value is a valid Internationalized Resource Identifier.
|
|
24
31
|
* @specification https://datatracker.ietf.org/doc/html/rfc3987
|
|
@@ -31,5 +38,5 @@ export function IsIri(value) {
|
|
|
31
38
|
if (InvalidPercentEncoding.test(value))
|
|
32
39
|
return false;
|
|
33
40
|
// 3. Delegate to the native URL parser, patching the IPvFuture edge case beforehand.
|
|
34
|
-
return URL.canParse(
|
|
41
|
+
return URL.canParse(value);
|
|
35
42
|
}
|
|
@@ -97,10 +97,10 @@ export function IsGreaterEqualThan(left, right) {
|
|
|
97
97
|
// String
|
|
98
98
|
// --------------------------------------------------------------------------
|
|
99
99
|
export function IsMinLength(value, length) {
|
|
100
|
-
return `Guard.
|
|
100
|
+
return `(${value}.length >= ${(+length) << 1} || (${value}.length >= ${length} && Guard.CodePointCount(${value}) >= ${length}))`;
|
|
101
101
|
}
|
|
102
102
|
export function IsMaxLength(value, length) {
|
|
103
|
-
return `Guard.
|
|
103
|
+
return `(${value}.length <= ${length} || (${value}.length <= ${(+length) << 1} && Guard.CodePointCount(${value}) <= ${length}))`;
|
|
104
104
|
}
|
|
105
105
|
// --------------------------------------------------------------------------
|
|
106
106
|
// Array
|
|
@@ -33,12 +33,14 @@ export declare function IsMultipleOf(dividend: bigint | number, divisor: bigint
|
|
|
33
33
|
/** Returns true if the value appears to be an instance of a class. */
|
|
34
34
|
export declare function IsClassInstance(value: unknown): boolean;
|
|
35
35
|
export declare function IsValueLike(value: unknown): value is bigint | boolean | null | number | string | undefined;
|
|
36
|
-
/** Returns the number of grapheme clusters in the string */
|
|
36
|
+
/** Returns the total number of visual grapheme clusters in the string. */
|
|
37
37
|
export declare function GraphemeCount(value: string): number;
|
|
38
|
-
/** Returns
|
|
39
|
-
export declare function
|
|
40
|
-
/** Returns true if the string
|
|
41
|
-
export declare function
|
|
38
|
+
/** Returns the total number of Unicode code points in the string. */
|
|
39
|
+
export declare function CodePointCount(value: string): number;
|
|
40
|
+
/** Returns true if the string length in Unicode code points does not exceed maxLength */
|
|
41
|
+
export declare function IsMaxLength(value: string, maxLength: number): boolean;
|
|
42
|
+
/** Returns true if the string length in Unicode code points is at least minLength */
|
|
43
|
+
export declare function IsMinLength(value: string, minLength: number): boolean;
|
|
42
44
|
/** Returns true if every element from offset satisfies the callback, short-circuiting on the first failure */
|
|
43
45
|
export declare function Every<T>(value: T[], offset: number, callback: (value: T, index: number) => boolean): boolean;
|
|
44
46
|
/** Returns true if every element from offset satisfies the callback, using exhaustive enumeration */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
|
-
import * as
|
|
2
|
+
import * as UnicodeSegmentGuard from './unicode/unicode_segment.mjs';
|
|
3
|
+
import * as UnicodeGuard from './unicode/unicode.mjs';
|
|
3
4
|
// --------------------------------------------------------------------------
|
|
4
5
|
// Guards
|
|
5
6
|
// --------------------------------------------------------------------------
|
|
@@ -123,17 +124,21 @@ export function IsValueLike(value) {
|
|
|
123
124
|
// --------------------------------------------------------------------------
|
|
124
125
|
// String
|
|
125
126
|
// --------------------------------------------------------------------------
|
|
126
|
-
/** Returns the number of grapheme clusters in the string */
|
|
127
|
+
/** Returns the total number of visual grapheme clusters in the string. */
|
|
127
128
|
export function GraphemeCount(value) {
|
|
128
|
-
return
|
|
129
|
+
return UnicodeSegmentGuard.GraphemeCount(value);
|
|
129
130
|
}
|
|
130
|
-
/** Returns
|
|
131
|
-
export function
|
|
132
|
-
return
|
|
131
|
+
/** Returns the total number of Unicode code points in the string. */
|
|
132
|
+
export function CodePointCount(value) {
|
|
133
|
+
return UnicodeGuard.CodePointCount(value);
|
|
133
134
|
}
|
|
134
|
-
/** Returns true if the string
|
|
135
|
-
export function
|
|
136
|
-
return
|
|
135
|
+
/** Returns true if the string length in Unicode code points does not exceed maxLength */
|
|
136
|
+
export function IsMaxLength(value, maxLength) {
|
|
137
|
+
return UnicodeGuard.IsMaxLength(value, maxLength);
|
|
138
|
+
}
|
|
139
|
+
/** Returns true if the string length in Unicode code points is at least minLength */
|
|
140
|
+
export function IsMinLength(value, minLength) {
|
|
141
|
+
return UnicodeGuard.IsMinLength(value, minLength);
|
|
137
142
|
}
|
|
138
143
|
// --------------------------------------------------------------------------
|
|
139
144
|
// Array
|