@psnext/slingcli 3.1.20260904-1 → 3.3.20260911-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +5 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/hasOwn.js +3 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/index.js +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/util/hasOwn.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/util/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/hasOwn.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/package.json +1 -1
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-websocket/package.json +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-PBNSMEG7.js → chunk-VDBOM5UG.js} +9 -9
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/index.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/rpc-entry.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Client.md +25 -8
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/EventSource.md +4 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Interceptors.md +7 -3
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +7 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/readable.js +33 -43
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/cache/memory-cache-store.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/connect.js +16 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/symbols.js +3 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/agent.js +7 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/balanced-pool.js +7 -4
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client-h1.js +9 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client-h2.js +221 -12
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client.js +76 -30
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher.js +15 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +3 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +37 -8
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/retry-agent.js +3 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +106 -22
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/cache-handler.js +29 -5
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/decorator-handler.js +7 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/redirect-handler.js +21 -4
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/retry-handler.js +155 -32
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/cache.js +65 -9
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/decompress.js +115 -13
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/deduplicate.js +5 -4
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/dns.js +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/dump.js +10 -23
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-agent.js +13 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-utils.js +217 -27
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/util/cache.js +43 -3
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cookies/parse.js +150 -147
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/eventsource.js +13 -3
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/index.js +6 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/request.js +2 -3
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/util.js +6 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/webidl/index.js +3 -3
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/connection.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/websocket.js +22 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/package.json +3 -3
- package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +4 -4
- package/node_modules/@earendil-works/pi-coding-agent/package.json +1 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/errors/index.js +20 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +11 -10
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +11 -10
- package/node_modules/@smithy/core/dist-es/submodules/errors/errors.js +18 -0
- package/node_modules/@smithy/core/dist-es/submodules/errors/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/service-error-classification.js +11 -10
- package/node_modules/@smithy/core/dist-types/submodules/errors/errors.d.ts +44 -0
- package/node_modules/@smithy/core/dist-types/submodules/errors/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/errors.d.ts +44 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
- package/node_modules/@smithy/core/errors.d.ts +5 -0
- package/node_modules/@smithy/core/errors.js +5 -0
- package/node_modules/@smithy/core/package.json +11 -2
- package/node_modules/@types/node/README.md +3 -3
- package/node_modules/@types/node/assert/strict.d.ts +56 -13
- package/node_modules/@types/node/assert.d.ts +190 -189
- package/node_modules/@types/node/async_hooks.d.ts +43 -151
- package/node_modules/@types/node/buffer.buffer.d.ts +13 -12
- package/node_modules/@types/node/buffer.d.ts +237 -102
- package/node_modules/@types/node/child_process.d.ts +154 -39
- package/node_modules/@types/node/cluster.d.ts +384 -238
- package/node_modules/@types/node/compatibility/disposable.d.ts +14 -0
- package/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
- package/node_modules/@types/node/compatibility/iterators.d.ts +20 -0
- package/node_modules/@types/node/console.d.ts +404 -45
- package/node_modules/@types/node/constants.d.ts +10 -3
- package/node_modules/@types/node/crypto.d.ts +1600 -1007
- package/node_modules/@types/node/dgram.d.ts +81 -133
- package/node_modules/@types/node/diagnostics_channel.d.ts +59 -277
- package/node_modules/@types/node/dns/promises.d.ts +15 -9
- package/node_modules/@types/node/dns.d.ts +183 -136
- package/node_modules/@types/node/domain.d.ts +32 -12
- package/node_modules/@types/node/events.d.ts +696 -728
- package/node_modules/@types/node/fs/promises.d.ts +85 -256
- package/node_modules/@types/node/fs.d.ts +525 -865
- package/node_modules/@types/node/globals.d.ts +34 -12
- package/node_modules/@types/node/globals.typedarray.d.ts +0 -63
- package/node_modules/@types/node/http.d.ts +311 -432
- package/node_modules/@types/node/http2.d.ts +891 -545
- package/node_modules/@types/node/https.d.ts +243 -64
- package/node_modules/@types/node/index.d.ts +7 -25
- package/node_modules/@types/node/inspector.d.ts +58 -70
- package/node_modules/@types/node/inspector.generated.d.ts +411 -765
- package/node_modules/@types/node/module.d.ts +219 -54
- package/node_modules/@types/node/net.d.ts +222 -208
- package/node_modules/@types/node/os.d.ts +49 -41
- package/node_modules/@types/node/package.json +3 -13
- package/node_modules/@types/node/path.d.ts +141 -119
- package/node_modules/@types/node/perf_hooks.d.ts +673 -310
- package/node_modules/@types/node/process.d.ts +205 -389
- package/node_modules/@types/node/punycode.d.ts +31 -3
- package/node_modules/@types/node/querystring.d.ts +16 -3
- package/node_modules/@types/node/readline/promises.d.ts +6 -3
- package/node_modules/@types/node/readline.d.ts +152 -66
- package/node_modules/@types/node/repl.d.ts +109 -101
- package/node_modules/@types/node/sea.d.ts +116 -1
- package/node_modules/@types/node/sqlite.d.ts +68 -486
- package/node_modules/@types/node/stream/consumers.d.ts +15 -91
- package/node_modules/@types/node/stream/promises.d.ts +15 -136
- package/node_modules/@types/node/stream/web.d.ts +456 -179
- package/node_modules/@types/node/stream.d.ts +491 -603
- package/node_modules/@types/node/string_decoder.d.ts +43 -3
- package/node_modules/@types/node/test.d.ts +292 -513
- package/node_modules/@types/node/timers/promises.d.ts +18 -3
- package/node_modules/@types/node/timers.d.ts +141 -3
- package/node_modules/@types/node/tls.d.ts +242 -140
- package/node_modules/@types/node/trace_events.d.ts +97 -3
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +8 -7
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -2
- package/node_modules/@types/node/ts5.6/index.d.ts +6 -26
- package/node_modules/@types/node/tty.d.ts +43 -61
- package/node_modules/@types/node/url.d.ts +584 -156
- package/node_modules/@types/node/util.d.ts +1110 -181
- package/node_modules/@types/node/v8.d.ts +36 -175
- package/node_modules/@types/node/vm.d.ts +209 -292
- package/node_modules/@types/node/wasi.d.ts +74 -24
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +2 -27
- package/node_modules/@types/node/web-globals/domexception.d.ts +0 -15
- package/node_modules/@types/node/web-globals/events.d.ts +0 -9
- package/node_modules/@types/node/web-globals/fetch.d.ts +0 -14
- package/node_modules/@types/node/web-globals/navigator.d.ts +0 -3
- package/node_modules/@types/node/web-globals/streams.d.ts +0 -93
- package/node_modules/@types/node/worker_threads.d.ts +407 -257
- package/node_modules/@types/node/zlib.d.ts +165 -7
- package/node_modules/hono/dist/cjs/client/client.js +4 -4
- package/node_modules/hono/dist/cjs/hono-base.js +7 -6
- package/node_modules/hono/dist/cjs/jsx/base.js +18 -1
- package/node_modules/hono/dist/cjs/jsx/components.js +25 -26
- package/node_modules/hono/dist/cjs/jsx/context.js +5 -5
- package/node_modules/hono/dist/cjs/jsx/dom/server.js +5 -1
- package/node_modules/hono/dist/cjs/jsx/intrinsic-element/components.js +2 -2
- package/node_modules/hono/dist/cjs/jsx/streaming.js +4 -5
- package/node_modules/hono/dist/client/client.js +4 -4
- package/node_modules/hono/dist/hono-base.js +7 -6
- package/node_modules/hono/dist/jsx/base.js +15 -1
- package/node_modules/hono/dist/jsx/components.js +26 -27
- package/node_modules/hono/dist/jsx/context.js +6 -6
- package/node_modules/hono/dist/jsx/dom/server.js +5 -1
- package/node_modules/hono/dist/jsx/intrinsic-element/components.js +3 -3
- package/node_modules/hono/dist/jsx/streaming.js +5 -6
- package/node_modules/hono/dist/types/context.d.ts +2 -2
- package/node_modules/hono/dist/types/jsx/base.d.ts +3 -0
- package/node_modules/hono/package.json +2 -2
- package/node_modules/jose/dist/types/index.d.ts +1 -2
- package/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +7 -11
- package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +13 -16
- package/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +7 -11
- package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +16 -19
- package/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +10 -16
- package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +18 -21
- package/node_modules/jose/dist/types/jwk/embedded.d.ts +3 -1
- package/node_modules/jose/dist/types/jwk/thumbprint.d.ts +4 -6
- package/node_modules/jose/dist/types/jwks/local.d.ts +5 -4
- package/node_modules/jose/dist/types/jwks/remote.d.ts +20 -21
- package/node_modules/jose/dist/types/jws/compact/sign.d.ts +4 -4
- package/node_modules/jose/dist/types/jws/compact/verify.d.ts +8 -11
- package/node_modules/jose/dist/types/jws/flattened/sign.d.ts +5 -5
- package/node_modules/jose/dist/types/jws/flattened/verify.d.ts +8 -11
- package/node_modules/jose/dist/types/jws/general/sign.d.ts +10 -14
- package/node_modules/jose/dist/types/jws/general/verify.d.ts +11 -17
- package/node_modules/jose/dist/types/jwt/decrypt.d.ts +14 -11
- package/node_modules/jose/dist/types/jwt/encrypt.d.ts +24 -22
- package/node_modules/jose/dist/types/jwt/sign.d.ts +3 -7
- package/node_modules/jose/dist/types/jwt/unsecured.d.ts +2 -6
- package/node_modules/jose/dist/types/jwt/verify.d.ts +13 -6
- package/node_modules/jose/dist/types/key/export.d.ts +6 -6
- package/node_modules/jose/dist/types/key/generate_key_pair.d.ts +9 -14
- package/node_modules/jose/dist/types/key/generate_secret.d.ts +10 -10
- package/node_modules/jose/dist/types/key/import.d.ts +19 -18
- package/node_modules/jose/dist/types/types.d.ts +152 -247
- package/node_modules/jose/dist/types/util/base64url.d.ts +7 -7
- package/node_modules/jose/dist/types/util/decode_jwt.d.ts +6 -1
- package/node_modules/jose/dist/types/util/decode_protected_header.d.ts +4 -3
- package/node_modules/jose/dist/types/util/errors.d.ts +29 -40
- package/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +1 -2
- package/node_modules/jose/dist/webapi/jwe/compact/encrypt.js +9 -26
- package/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +3 -3
- package/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +11 -30
- package/node_modules/jose/dist/webapi/jwe/general/decrypt.js +6 -6
- package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +33 -57
- package/node_modules/jose/dist/webapi/jwk/embedded.js +3 -4
- package/node_modules/jose/dist/webapi/jwk/thumbprint.js +3 -6
- package/node_modules/jose/dist/webapi/jwks/local.js +16 -10
- package/node_modules/jose/dist/webapi/jwks/remote.js +2 -2
- package/node_modules/jose/dist/webapi/jws/compact/sign.js +2 -4
- package/node_modules/jose/dist/webapi/jws/compact/verify.js +2 -2
- package/node_modules/jose/dist/webapi/jws/flattened/sign.js +8 -15
- package/node_modules/jose/dist/webapi/jws/flattened/verify.js +4 -14
- package/node_modules/jose/dist/webapi/jws/general/sign.js +4 -11
- package/node_modules/jose/dist/webapi/jws/general/verify.js +5 -7
- package/node_modules/jose/dist/webapi/jwt/decrypt.js +2 -3
- package/node_modules/jose/dist/webapi/jwt/encrypt.js +11 -25
- package/node_modules/jose/dist/webapi/jwt/sign.js +1 -1
- package/node_modules/jose/dist/webapi/jwt/unsecured.js +1 -2
- package/node_modules/jose/dist/webapi/jwt/verify.js +4 -4
- package/node_modules/jose/dist/webapi/key/export.js +12 -16
- package/node_modules/jose/dist/webapi/key/generate_key_pair.js +4 -13
- package/node_modules/jose/dist/webapi/key/generate_secret.js +1 -1
- package/node_modules/jose/dist/webapi/key/import.js +5 -9
- package/node_modules/jose/dist/webapi/lib/asn1.js +2 -4
- package/node_modules/jose/dist/webapi/lib/buffer_utils.js +35 -0
- package/node_modules/jose/dist/webapi/lib/content_encryption.js +21 -29
- package/node_modules/jose/dist/webapi/lib/deflate.js +9 -19
- package/node_modules/jose/dist/webapi/lib/jwe_algorithms.js +0 -4
- package/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +21 -54
- package/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +26 -59
- package/node_modules/jose/dist/webapi/lib/jws_sign.js +29 -43
- package/node_modules/jose/dist/webapi/lib/jws_verify.js +37 -45
- package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +1 -1
- package/node_modules/jose/dist/webapi/lib/key.js +119 -59
- package/node_modules/jose/dist/webapi/lib/key_management.js +45 -80
- package/node_modules/jose/dist/webapi/lib/{options.js → validate.js} +64 -3
- package/node_modules/jose/dist/webapi/util/base64url.js +5 -19
- package/node_modules/jose/dist/webapi/util/decode_jwt.js +1 -1
- package/node_modules/jose/dist/webapi/util/decode_protected_header.js +1 -1
- package/node_modules/jose/package.json +1 -1
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +4 -2
- package/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
- package/node_modules/undici/lib/dispatcher/client-h2.js +70 -14
- package/node_modules/undici/lib/dispatcher/client.js +6 -2
- package/node_modules/undici/lib/handler/cache-handler.js +21 -5
- package/node_modules/undici/lib/handler/retry-handler.js +42 -7
- package/node_modules/undici/lib/interceptor/cache.js +20 -1
- package/node_modules/undici/lib/interceptor/decompress.js +146 -14
- package/node_modules/undici/lib/interceptor/dump.js +10 -23
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +245 -150
- package/node_modules/undici/lib/web/websocket/connection.js +1 -1
- package/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
- package/node_modules/undici/package.json +1 -1
- package/node_modules/undici/types/interceptors.d.ts +2 -0
- package/node_modules/undici-types/agent.d.ts +13 -12
- package/node_modules/undici-types/api.d.ts +26 -26
- package/node_modules/undici-types/balanced-pool.d.ts +12 -13
- package/node_modules/undici-types/client.d.ts +34 -55
- package/node_modules/undici-types/connector.d.ts +2 -4
- package/node_modules/undici-types/cookies.d.ts +0 -2
- package/node_modules/undici-types/diagnostics-channel.d.ts +10 -18
- package/node_modules/undici-types/dispatcher.d.ts +137 -134
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +3 -4
- package/node_modules/undici-types/errors.d.ts +54 -82
- package/node_modules/undici-types/eventsource.d.ts +4 -9
- package/node_modules/undici-types/fetch.d.ts +24 -46
- package/node_modules/undici-types/file.d.ts +39 -0
- package/node_modules/undici-types/filereader.d.ts +54 -0
- package/node_modules/undici-types/formdata.d.ts +7 -7
- package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
- package/node_modules/undici-types/global-origin.d.ts +5 -5
- package/node_modules/undici-types/handlers.d.ts +9 -8
- package/node_modules/undici-types/header.d.ts +1 -162
- package/node_modules/undici-types/index.d.ts +47 -69
- package/node_modules/undici-types/interceptors.d.ts +9 -72
- package/node_modules/undici-types/mock-agent.d.ts +18 -36
- package/node_modules/undici-types/mock-client.d.ts +4 -6
- package/node_modules/undici-types/mock-errors.d.ts +3 -3
- package/node_modules/undici-types/mock-interceptor.d.ts +20 -21
- package/node_modules/undici-types/mock-pool.d.ts +4 -6
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/patch.d.ts +4 -0
- package/node_modules/undici-types/pool-stats.d.ts +8 -8
- package/node_modules/undici-types/pool.d.ts +14 -14
- package/node_modules/undici-types/proxy-agent.d.ts +6 -7
- package/node_modules/undici-types/readable.d.ts +16 -19
- package/node_modules/undici-types/retry-agent.d.ts +1 -1
- package/node_modules/undici-types/retry-handler.d.ts +10 -19
- package/node_modules/undici-types/util.d.ts +3 -3
- package/node_modules/undici-types/webidl.d.ts +30 -148
- package/node_modules/undici-types/websocket.d.ts +10 -48
- package/node_modules/zod/compile.cjs +19 -0
- package/node_modules/zod/index.cjs +19 -0
- package/node_modules/zod/locales/index.cjs +19 -0
- package/node_modules/zod/mini/index.cjs +19 -0
- package/node_modules/zod/package.json +8 -7
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
- package/node_modules/zod/src/v4/classic/checks.ts +0 -1
- package/node_modules/zod/src/v4/classic/external.ts +2 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +248 -25
- package/node_modules/zod/src/v4/classic/schemas.ts +255 -164
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +59 -9
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +6 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +274 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +9 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +130 -1
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +4 -0
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +157 -0
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +18 -2
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +27 -7
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +88 -56
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +56 -0
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +3 -2
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +225 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +46 -1
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +25 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +33 -1
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +147 -3
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +569 -0
- package/node_modules/zod/src/v4/core/api.ts +30 -6
- package/node_modules/zod/src/v4/core/checks.ts +1 -101
- package/node_modules/zod/src/v4/core/compile.ts +202 -88
- package/node_modules/zod/src/v4/core/doc.ts +6 -2
- package/node_modules/zod/src/v4/core/errors.ts +3 -6
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +2 -2
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +226 -68
- package/node_modules/zod/src/v4/core/memoizer.ts +78 -28
- package/node_modules/zod/src/v4/core/parse.ts +37 -16
- package/node_modules/zod/src/v4/core/regexes.ts +10 -4
- package/node_modules/zod/src/v4/core/schemas.ts +359 -122
- package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +222 -2
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +10 -8
- package/node_modules/zod/src/v4/core/util.ts +222 -147
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/core/visit.ts +11 -0
- package/node_modules/zod/src/v4/locales/ar.ts +1 -0
- package/node_modules/zod/src/v4/locales/az.ts +1 -0
- package/node_modules/zod/src/v4/locales/be.ts +1 -0
- package/node_modules/zod/src/v4/locales/bg.ts +1 -0
- package/node_modules/zod/src/v4/locales/bn.ts +1 -0
- package/node_modules/zod/src/v4/locales/ca.ts +1 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +1 -0
- package/node_modules/zod/src/v4/locales/cs.ts +1 -0
- package/node_modules/zod/src/v4/locales/da.ts +1 -0
- package/node_modules/zod/src/v4/locales/de.ts +1 -0
- package/node_modules/zod/src/v4/locales/el.ts +1 -0
- package/node_modules/zod/src/v4/locales/en.ts +1 -0
- package/node_modules/zod/src/v4/locales/eo.ts +1 -0
- package/node_modules/zod/src/v4/locales/es.ts +1 -0
- package/node_modules/zod/src/v4/locales/fa.ts +1 -0
- package/node_modules/zod/src/v4/locales/fi.ts +1 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +1 -0
- package/node_modules/zod/src/v4/locales/fr.ts +1 -0
- package/node_modules/zod/src/v4/locales/gu.ts +1 -0
- package/node_modules/zod/src/v4/locales/he.ts +1 -0
- package/node_modules/zod/src/v4/locales/hi.ts +1 -0
- package/node_modules/zod/src/v4/locales/hr.ts +1 -0
- package/node_modules/zod/src/v4/locales/hu.ts +1 -0
- package/node_modules/zod/src/v4/locales/hy.ts +1 -0
- package/node_modules/zod/src/v4/locales/id.ts +1 -0
- package/node_modules/zod/src/v4/locales/index.ts +1 -0
- package/node_modules/zod/src/v4/locales/is.ts +1 -0
- package/node_modules/zod/src/v4/locales/it.ts +1 -0
- package/node_modules/zod/src/v4/locales/ja.ts +1 -0
- package/node_modules/zod/src/v4/locales/ka.ts +1 -0
- package/node_modules/zod/src/v4/locales/km.ts +1 -0
- package/node_modules/zod/src/v4/locales/kn.ts +1 -0
- package/node_modules/zod/src/v4/locales/ko.ts +1 -0
- package/node_modules/zod/src/v4/locales/lt.ts +1 -0
- package/node_modules/zod/src/v4/locales/mk.ts +1 -0
- package/node_modules/zod/src/v4/locales/ms.ts +1 -0
- package/node_modules/zod/src/v4/locales/ne.ts +1 -0
- package/node_modules/zod/src/v4/locales/nl.ts +1 -0
- package/node_modules/zod/src/v4/locales/nn.ts +1 -0
- package/node_modules/zod/src/v4/locales/no.ts +1 -0
- package/node_modules/zod/src/v4/locales/ota.ts +1 -0
- package/node_modules/zod/src/v4/locales/pl.ts +1 -0
- package/node_modules/zod/src/v4/locales/ps.ts +1 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +1 -0
- package/node_modules/zod/src/v4/locales/pt.ts +1 -0
- package/node_modules/zod/src/v4/locales/ro.ts +1 -0
- package/node_modules/zod/src/v4/locales/ru.ts +1 -0
- package/node_modules/zod/src/v4/locales/sk.ts +1 -0
- package/node_modules/zod/src/v4/locales/sl.ts +1 -0
- package/node_modules/zod/src/v4/locales/sv.ts +1 -0
- package/node_modules/zod/src/v4/locales/ta.ts +1 -0
- package/node_modules/zod/src/v4/locales/tg.ts +134 -0
- package/node_modules/zod/src/v4/locales/th.ts +1 -0
- package/node_modules/zod/src/v4/locales/tk.ts +1 -0
- package/node_modules/zod/src/v4/locales/tr.ts +1 -0
- package/node_modules/zod/src/v4/locales/uk.ts +1 -0
- package/node_modules/zod/src/v4/locales/ur.ts +1 -0
- package/node_modules/zod/src/v4/locales/uz.ts +1 -0
- package/node_modules/zod/src/v4/locales/vi.ts +1 -0
- package/node_modules/zod/src/v4/locales/yo.ts +1 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +1 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +1 -0
- package/node_modules/zod/src/v4/mini/checks.ts +0 -1
- package/node_modules/zod/src/v4/mini/external.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +39 -3
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +30 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +16 -0
- package/node_modules/zod/v3/ZodError.cjs +19 -0
- package/node_modules/zod/v3/errors.cjs +19 -0
- package/node_modules/zod/v3/external.cjs +19 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
- package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
- package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
- package/node_modules/zod/v3/helpers/util.cjs +19 -0
- package/node_modules/zod/v3/index.cjs +19 -0
- package/node_modules/zod/v3/standard-schema.cjs +19 -0
- package/node_modules/zod/v3/types.cjs +19 -0
- package/node_modules/zod/v4/classic/checks.cjs +20 -2
- package/node_modules/zod/v4/classic/checks.d.cts +1 -1
- package/node_modules/zod/v4/classic/checks.d.ts +1 -1
- package/node_modules/zod/v4/classic/checks.js +1 -1
- package/node_modules/zod/v4/classic/coerce.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.cjs +19 -0
- package/node_modules/zod/v4/classic/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/classic/errors.cjs +19 -0
- package/node_modules/zod/v4/classic/external.cjs +22 -1
- package/node_modules/zod/v4/classic/external.d.cts +1 -1
- package/node_modules/zod/v4/classic/external.d.ts +1 -1
- package/node_modules/zod/v4/classic/external.js +1 -1
- package/node_modules/zod/v4/classic/from-json-schema.cjs +264 -24
- package/node_modules/zod/v4/classic/from-json-schema.js +245 -24
- package/node_modules/zod/v4/classic/in-out.cjs +19 -0
- package/node_modules/zod/v4/classic/index.cjs +19 -0
- package/node_modules/zod/v4/classic/iso.cjs +19 -0
- package/node_modules/zod/v4/classic/parse.cjs +19 -0
- package/node_modules/zod/v4/classic/schemas.cjs +100 -31
- package/node_modules/zod/v4/classic/schemas.d.cts +17 -1
- package/node_modules/zod/v4/classic/schemas.d.ts +17 -1
- package/node_modules/zod/v4/classic/schemas.js +77 -29
- package/node_modules/zod/v4/core/api.cjs +37 -2
- package/node_modules/zod/v4/core/api.d.cts +6 -4
- package/node_modules/zod/v4/core/api.d.ts +6 -4
- package/node_modules/zod/v4/core/api.js +17 -2
- package/node_modules/zod/v4/core/checks.cjs +19 -96
- package/node_modules/zod/v4/core/checks.d.cts +1 -1
- package/node_modules/zod/v4/core/checks.d.ts +1 -1
- package/node_modules/zod/v4/core/checks.js +0 -96
- package/node_modules/zod/v4/core/compile.cjs +172 -72
- package/node_modules/zod/v4/core/compile.d.cts +18 -4
- package/node_modules/zod/v4/core/compile.d.ts +18 -4
- package/node_modules/zod/v4/core/compile.js +153 -73
- package/node_modules/zod/v4/core/core.cjs +19 -0
- package/node_modules/zod/v4/core/doc.cjs +26 -2
- package/node_modules/zod/v4/core/doc.js +7 -2
- package/node_modules/zod/v4/core/errors.cjs +21 -5
- package/node_modules/zod/v4/core/errors.js +2 -5
- package/node_modules/zod/v4/core/index.cjs +19 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +20 -1
- package/node_modules/zod/v4/core/json-schema-generator.js +2 -2
- package/node_modules/zod/v4/core/json-schema-processors.cjs +215 -63
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +17 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +17 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +195 -64
- package/node_modules/zod/v4/core/json-schema.cjs +19 -0
- package/node_modules/zod/v4/core/memoizer.cjs +114 -23
- package/node_modules/zod/v4/core/memoizer.js +72 -23
- package/node_modules/zod/v4/core/parse.cjs +56 -16
- package/node_modules/zod/v4/core/parse.js +37 -16
- package/node_modules/zod/v4/core/regexes.cjs +29 -6
- package/node_modules/zod/v4/core/regexes.d.cts +2 -0
- package/node_modules/zod/v4/core/regexes.d.ts +2 -0
- package/node_modules/zod/v4/core/regexes.js +8 -4
- package/node_modules/zod/v4/core/registries.cjs +19 -0
- package/node_modules/zod/v4/core/schemas.cjs +331 -103
- package/node_modules/zod/v4/core/schemas.d.cts +43 -8
- package/node_modules/zod/v4/core/schemas.d.ts +43 -8
- package/node_modules/zod/v4/core/schemas.js +310 -102
- package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +29 -7
- package/node_modules/zod/v4/core/to-json-schema.d.cts +7 -3
- package/node_modules/zod/v4/core/to-json-schema.d.ts +7 -3
- package/node_modules/zod/v4/core/to-json-schema.js +8 -7
- package/node_modules/zod/v4/core/util.cjs +181 -143
- package/node_modules/zod/v4/core/util.d.cts +25 -4
- package/node_modules/zod/v4/core/util.d.ts +25 -4
- package/node_modules/zod/v4/core/util.js +160 -143
- package/node_modules/zod/v4/core/versions.cjs +21 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +31 -0
- package/node_modules/zod/v4/core/visit.js +12 -0
- package/node_modules/zod/v4/index.cjs +19 -0
- package/node_modules/zod/v4/locales/ar.cjs +1 -0
- package/node_modules/zod/v4/locales/ar.js +1 -0
- package/node_modules/zod/v4/locales/az.cjs +1 -0
- package/node_modules/zod/v4/locales/az.js +1 -0
- package/node_modules/zod/v4/locales/be.cjs +1 -0
- package/node_modules/zod/v4/locales/be.js +1 -0
- package/node_modules/zod/v4/locales/bg.cjs +1 -0
- package/node_modules/zod/v4/locales/bg.js +1 -0
- package/node_modules/zod/v4/locales/bn.cjs +1 -0
- package/node_modules/zod/v4/locales/bn.js +1 -0
- package/node_modules/zod/v4/locales/ca.cjs +1 -0
- package/node_modules/zod/v4/locales/ca.js +1 -0
- package/node_modules/zod/v4/locales/ckb.cjs +1 -0
- package/node_modules/zod/v4/locales/ckb.js +1 -0
- package/node_modules/zod/v4/locales/cs.cjs +1 -0
- package/node_modules/zod/v4/locales/cs.js +1 -0
- package/node_modules/zod/v4/locales/da.cjs +1 -0
- package/node_modules/zod/v4/locales/da.js +1 -0
- package/node_modules/zod/v4/locales/de.cjs +1 -0
- package/node_modules/zod/v4/locales/de.js +1 -0
- package/node_modules/zod/v4/locales/el.cjs +1 -0
- package/node_modules/zod/v4/locales/el.js +1 -0
- package/node_modules/zod/v4/locales/en.cjs +1 -0
- package/node_modules/zod/v4/locales/en.js +1 -0
- package/node_modules/zod/v4/locales/eo.cjs +1 -0
- package/node_modules/zod/v4/locales/eo.js +1 -0
- package/node_modules/zod/v4/locales/es.cjs +1 -0
- package/node_modules/zod/v4/locales/es.js +1 -0
- package/node_modules/zod/v4/locales/fa.cjs +1 -0
- package/node_modules/zod/v4/locales/fa.js +1 -0
- package/node_modules/zod/v4/locales/fi.cjs +1 -0
- package/node_modules/zod/v4/locales/fi.js +1 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +1 -0
- package/node_modules/zod/v4/locales/fr-CA.js +1 -0
- package/node_modules/zod/v4/locales/fr.cjs +1 -0
- package/node_modules/zod/v4/locales/fr.js +1 -0
- package/node_modules/zod/v4/locales/gu.cjs +1 -0
- package/node_modules/zod/v4/locales/gu.js +1 -0
- package/node_modules/zod/v4/locales/he.cjs +1 -0
- package/node_modules/zod/v4/locales/he.js +1 -0
- package/node_modules/zod/v4/locales/hi.cjs +1 -0
- package/node_modules/zod/v4/locales/hi.js +1 -0
- package/node_modules/zod/v4/locales/hr.cjs +1 -0
- package/node_modules/zod/v4/locales/hr.js +1 -0
- package/node_modules/zod/v4/locales/hu.cjs +1 -0
- package/node_modules/zod/v4/locales/hu.js +1 -0
- package/node_modules/zod/v4/locales/hy.cjs +1 -0
- package/node_modules/zod/v4/locales/hy.js +1 -0
- package/node_modules/zod/v4/locales/id.cjs +1 -0
- package/node_modules/zod/v4/locales/id.js +1 -0
- package/node_modules/zod/v4/locales/index.cjs +22 -1
- package/node_modules/zod/v4/locales/index.d.cts +1 -0
- package/node_modules/zod/v4/locales/index.d.ts +1 -0
- package/node_modules/zod/v4/locales/index.js +1 -0
- package/node_modules/zod/v4/locales/is.cjs +1 -0
- package/node_modules/zod/v4/locales/is.js +1 -0
- package/node_modules/zod/v4/locales/it.cjs +1 -0
- package/node_modules/zod/v4/locales/it.js +1 -0
- package/node_modules/zod/v4/locales/ja.cjs +1 -0
- package/node_modules/zod/v4/locales/ja.js +1 -0
- package/node_modules/zod/v4/locales/ka.cjs +1 -0
- package/node_modules/zod/v4/locales/ka.js +1 -0
- package/node_modules/zod/v4/locales/km.cjs +1 -0
- package/node_modules/zod/v4/locales/km.js +1 -0
- package/node_modules/zod/v4/locales/kn.cjs +1 -0
- package/node_modules/zod/v4/locales/kn.js +1 -0
- package/node_modules/zod/v4/locales/ko.cjs +1 -0
- package/node_modules/zod/v4/locales/ko.js +1 -0
- package/node_modules/zod/v4/locales/lt.cjs +1 -0
- package/node_modules/zod/v4/locales/lt.js +1 -0
- package/node_modules/zod/v4/locales/mk.cjs +1 -0
- package/node_modules/zod/v4/locales/mk.js +1 -0
- package/node_modules/zod/v4/locales/ms.cjs +1 -0
- package/node_modules/zod/v4/locales/ms.js +1 -0
- package/node_modules/zod/v4/locales/ne.cjs +1 -0
- package/node_modules/zod/v4/locales/ne.js +1 -0
- package/node_modules/zod/v4/locales/nl.cjs +1 -0
- package/node_modules/zod/v4/locales/nl.js +1 -0
- package/node_modules/zod/v4/locales/nn.cjs +1 -0
- package/node_modules/zod/v4/locales/nn.js +1 -0
- package/node_modules/zod/v4/locales/no.cjs +1 -0
- package/node_modules/zod/v4/locales/no.js +1 -0
- package/node_modules/zod/v4/locales/ota.cjs +1 -0
- package/node_modules/zod/v4/locales/ota.js +1 -0
- package/node_modules/zod/v4/locales/pl.cjs +1 -0
- package/node_modules/zod/v4/locales/pl.js +1 -0
- package/node_modules/zod/v4/locales/ps.cjs +1 -0
- package/node_modules/zod/v4/locales/ps.js +1 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +1 -0
- package/node_modules/zod/v4/locales/pt-BR.js +1 -0
- package/node_modules/zod/v4/locales/pt.cjs +1 -0
- package/node_modules/zod/v4/locales/pt.js +1 -0
- package/node_modules/zod/v4/locales/ro.cjs +1 -0
- package/node_modules/zod/v4/locales/ro.js +1 -0
- package/node_modules/zod/v4/locales/ru.cjs +1 -0
- package/node_modules/zod/v4/locales/ru.js +1 -0
- package/node_modules/zod/v4/locales/sk.cjs +1 -0
- package/node_modules/zod/v4/locales/sk.js +1 -0
- package/node_modules/zod/v4/locales/sl.cjs +1 -0
- package/node_modules/zod/v4/locales/sl.js +1 -0
- package/node_modules/zod/v4/locales/sv.cjs +1 -0
- package/node_modules/zod/v4/locales/sv.js +1 -0
- package/node_modules/zod/v4/locales/ta.cjs +1 -0
- package/node_modules/zod/v4/locales/ta.js +1 -0
- package/node_modules/zod/v4/locales/tg.cjs +143 -0
- package/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/node_modules/zod/v4/locales/tg.js +116 -0
- package/node_modules/zod/v4/locales/th.cjs +1 -0
- package/node_modules/zod/v4/locales/th.js +1 -0
- package/node_modules/zod/v4/locales/tk.cjs +1 -0
- package/node_modules/zod/v4/locales/tk.js +1 -0
- package/node_modules/zod/v4/locales/tr.cjs +1 -0
- package/node_modules/zod/v4/locales/tr.js +1 -0
- package/node_modules/zod/v4/locales/uk.cjs +1 -0
- package/node_modules/zod/v4/locales/uk.js +1 -0
- package/node_modules/zod/v4/locales/ur.cjs +1 -0
- package/node_modules/zod/v4/locales/ur.js +1 -0
- package/node_modules/zod/v4/locales/uz.cjs +1 -0
- package/node_modules/zod/v4/locales/uz.js +1 -0
- package/node_modules/zod/v4/locales/vi.cjs +1 -0
- package/node_modules/zod/v4/locales/vi.js +1 -0
- package/node_modules/zod/v4/locales/yo.cjs +1 -0
- package/node_modules/zod/v4/locales/yo.js +1 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +1 -0
- package/node_modules/zod/v4/locales/zh-CN.js +1 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +1 -0
- package/node_modules/zod/v4/locales/zh-TW.js +1 -0
- package/node_modules/zod/v4/mini/checks.cjs +20 -2
- package/node_modules/zod/v4/mini/checks.d.cts +1 -1
- package/node_modules/zod/v4/mini/checks.d.ts +1 -1
- package/node_modules/zod/v4/mini/checks.js +1 -1
- package/node_modules/zod/v4/mini/coerce.cjs +19 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/mini/external.cjs +22 -1
- package/node_modules/zod/v4/mini/external.d.cts +1 -1
- package/node_modules/zod/v4/mini/external.d.ts +1 -1
- package/node_modules/zod/v4/mini/external.js +1 -1
- package/node_modules/zod/v4/mini/in-out.cjs +19 -0
- package/node_modules/zod/v4/mini/index.cjs +19 -0
- package/node_modules/zod/v4/mini/iso.cjs +19 -0
- package/node_modules/zod/v4/mini/parse.cjs +19 -0
- package/node_modules/zod/v4/mini/schemas.cjs +42 -4
- package/node_modules/zod/v4/mini/schemas.d.cts +9 -1
- package/node_modules/zod/v4/mini/schemas.d.ts +9 -1
- package/node_modules/zod/v4/mini/schemas.js +19 -2
- package/node_modules/zod/v4-mini/index.cjs +19 -0
- package/package.json +2 -2
- package/slingshot/index.js +151 -149
- package/node_modules/@types/node/ffi.d.ts +0 -486
- package/node_modules/@types/node/inspector/promises.d.ts +0 -35
- package/node_modules/@types/node/path/posix.d.ts +0 -8
- package/node_modules/@types/node/path/win32.d.ts +0 -8
- package/node_modules/@types/node/quic.d.ts +0 -2151
- package/node_modules/@types/node/stream/iter.d.ts +0 -452
- package/node_modules/@types/node/test/reporters.d.ts +0 -59
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +0 -71
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +0 -72
- package/node_modules/@types/node/ts5.7/index.d.ts +0 -118
- package/node_modules/@types/node/util/types.d.ts +0 -558
- package/node_modules/@types/node/vfs.d.ts +0 -210
- package/node_modules/@types/node/web-globals/blob.d.ts +0 -23
- package/node_modules/@types/node/web-globals/console.d.ts +0 -9
- package/node_modules/@types/node/web-globals/crypto.d.ts +0 -39
- package/node_modules/@types/node/web-globals/encoding.d.ts +0 -11
- package/node_modules/@types/node/web-globals/importmeta.d.ts +0 -13
- package/node_modules/@types/node/web-globals/messaging.d.ts +0 -23
- package/node_modules/@types/node/web-globals/performance.d.ts +0 -45
- package/node_modules/@types/node/web-globals/timers.d.ts +0 -44
- package/node_modules/@types/node/web-globals/url.d.ts +0 -24
- package/node_modules/@types/node/zlib/iter.d.ts +0 -131
- package/node_modules/jose/dist/webapi/lib/base64.js +0 -20
- package/node_modules/jose/dist/webapi/lib/crypto_key.js +0 -27
- package/node_modules/jose/dist/webapi/lib/helpers.js +0 -45
- package/node_modules/jose/dist/webapi/lib/invalid_key_input.js +0 -12
- package/node_modules/jose/dist/webapi/lib/is_key_like.js +0 -19
- package/node_modules/jose/dist/webapi/lib/jwk_metadata.js +0 -19
- package/node_modules/jose/dist/webapi/lib/jwk_to_key.js +0 -10
- package/node_modules/jose/dist/webapi/lib/key_options.js +0 -8
- package/node_modules/jose/dist/webapi/lib/signing.js +0 -22
- package/node_modules/jose/dist/webapi/lib/type_checks.js +0 -30
- package/node_modules/undici-types/cache-interceptor.d.ts +0 -179
- package/node_modules/undici-types/client-stats.d.ts +0 -15
- package/node_modules/undici-types/dispatcher1-wrapper.d.ts +0 -7
- package/node_modules/undici-types/h2c-client.d.ts +0 -73
- package/node_modules/undici-types/mock-call-history.d.ts +0 -111
- package/node_modules/undici-types/round-robin-pool.d.ts +0 -39
- package/node_modules/undici-types/snapshot-agent.d.ts +0 -113
- package/node_modules/undici-types/socks5-proxy-agent.d.ts +0 -25
- package/node_modules/undici-types/utility.d.ts +0 -7
|
@@ -1,7 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `node:test` module facilitates the creation of JavaScript tests.
|
|
3
|
+
* To access it:
|
|
4
|
+
*
|
|
5
|
+
* ```js
|
|
6
|
+
* import test from 'node:test';
|
|
7
|
+
* ```
|
|
8
|
+
*
|
|
9
|
+
* This module is only available under the `node:` scheme. The following will not
|
|
10
|
+
* work:
|
|
11
|
+
*
|
|
12
|
+
* ```js
|
|
13
|
+
* import test from 'node:test';
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* Tests created via the `test` module consist of a single function that is
|
|
17
|
+
* processed in one of three ways:
|
|
18
|
+
*
|
|
19
|
+
* 1. A synchronous function that is considered failing if it throws an exception,
|
|
20
|
+
* and is considered passing otherwise.
|
|
21
|
+
* 2. A function that returns a `Promise` that is considered failing if the `Promise` rejects, and is considered passing if the `Promise` fulfills.
|
|
22
|
+
* 3. A function that receives a callback function. If the callback receives any
|
|
23
|
+
* truthy value as its first argument, the test is considered failing. If a
|
|
24
|
+
* falsy value is passed as the first argument to the callback, the test is
|
|
25
|
+
* considered passing. If the test function receives a callback function and
|
|
26
|
+
* also returns a `Promise`, the test will fail.
|
|
27
|
+
*
|
|
28
|
+
* The following example illustrates how tests are written using the `test` module.
|
|
29
|
+
*
|
|
30
|
+
* ```js
|
|
31
|
+
* test('synchronous passing test', (t) => {
|
|
32
|
+
* // This test passes because it does not throw an exception.
|
|
33
|
+
* assert.strictEqual(1, 1);
|
|
34
|
+
* });
|
|
35
|
+
*
|
|
36
|
+
* test('synchronous failing test', (t) => {
|
|
37
|
+
* // This test fails because it throws an exception.
|
|
38
|
+
* assert.strictEqual(1, 2);
|
|
39
|
+
* });
|
|
40
|
+
*
|
|
41
|
+
* test('asynchronous passing test', async (t) => {
|
|
42
|
+
* // This test passes because the Promise returned by the async
|
|
43
|
+
* // function is settled and not rejected.
|
|
44
|
+
* assert.strictEqual(1, 1);
|
|
45
|
+
* });
|
|
46
|
+
*
|
|
47
|
+
* test('asynchronous failing test', async (t) => {
|
|
48
|
+
* // This test fails because the Promise returned by the async
|
|
49
|
+
* // function is rejected.
|
|
50
|
+
* assert.strictEqual(1, 2);
|
|
51
|
+
* });
|
|
52
|
+
*
|
|
53
|
+
* test('failing test using Promises', (t) => {
|
|
54
|
+
* // Promises can be used directly as well.
|
|
55
|
+
* return new Promise((resolve, reject) => {
|
|
56
|
+
* setImmediate(() => {
|
|
57
|
+
* reject(new Error('this will cause the test to fail'));
|
|
58
|
+
* });
|
|
59
|
+
* });
|
|
60
|
+
* });
|
|
61
|
+
*
|
|
62
|
+
* test('callback passing test', (t, done) => {
|
|
63
|
+
* // done() is the callback function. When the setImmediate() runs, it invokes
|
|
64
|
+
* // done() with no arguments.
|
|
65
|
+
* setImmediate(done);
|
|
66
|
+
* });
|
|
67
|
+
*
|
|
68
|
+
* test('callback failing test', (t, done) => {
|
|
69
|
+
* // When the setImmediate() runs, done() is invoked with an Error object and
|
|
70
|
+
* // the test fails.
|
|
71
|
+
* setImmediate(() => {
|
|
72
|
+
* done(new Error('callback failure'));
|
|
73
|
+
* });
|
|
74
|
+
* });
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* If any tests fail, the process exit code is set to `1`.
|
|
78
|
+
* @since v18.0.0, v16.17.0
|
|
79
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/test.js)
|
|
80
|
+
*/
|
|
1
81
|
declare module "node:test" {
|
|
2
|
-
import { AssertMethodNames
|
|
3
|
-
import { Readable
|
|
4
|
-
import { TestEvent } from "node:test/reporters";
|
|
82
|
+
import { AssertMethodNames } from "node:assert";
|
|
83
|
+
import { Readable } from "node:stream";
|
|
5
84
|
import { URL } from "node:url";
|
|
6
85
|
import TestFn = test.TestFn;
|
|
7
86
|
import TestOptions = test.TestOptions;
|
|
@@ -111,16 +190,6 @@ declare module "node:test" {
|
|
|
111
190
|
function only(name?: string, fn?: SuiteFn): Promise<void>;
|
|
112
191
|
function only(options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
113
192
|
function only(fn?: SuiteFn): Promise<void>;
|
|
114
|
-
/**
|
|
115
|
-
* This flips the pass/fail reporting for a specific test or suite: a flagged test
|
|
116
|
-
* case must throw in order to pass, and a flagged test case that does not throw
|
|
117
|
-
* fails.
|
|
118
|
-
* @since v25.5.0
|
|
119
|
-
*/
|
|
120
|
-
function expectFailure(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
121
|
-
function expectFailure(name?: string, fn?: SuiteFn): Promise<void>;
|
|
122
|
-
function expectFailure(options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
|
123
|
-
function expectFailure(fn?: SuiteFn): Promise<void>;
|
|
124
193
|
}
|
|
125
194
|
/**
|
|
126
195
|
* Shorthand for skipping a test. This is the same as calling {@link test} with `options.skip` set to `true`.
|
|
@@ -146,11 +215,6 @@ declare module "node:test" {
|
|
|
146
215
|
function only(name?: string, fn?: TestFn): Promise<void>;
|
|
147
216
|
function only(options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
148
217
|
function only(fn?: TestFn): Promise<void>;
|
|
149
|
-
// added in v25.5.0, undocumented
|
|
150
|
-
function expectFailure(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
151
|
-
function expectFailure(name?: string, fn?: TestFn): Promise<void>;
|
|
152
|
-
function expectFailure(options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
153
|
-
function expectFailure(fn?: TestFn): Promise<void>;
|
|
154
218
|
/**
|
|
155
219
|
* The type of a function passed to {@link test}. The first argument to this function is a {@link TestContext} object.
|
|
156
220
|
* If the test uses callbacks, the callback function is passed as the second argument.
|
|
@@ -172,22 +236,14 @@ declare module "node:test" {
|
|
|
172
236
|
}
|
|
173
237
|
interface RunOptions {
|
|
174
238
|
/**
|
|
175
|
-
* If a number is provided, then that many
|
|
239
|
+
* If a number is provided, then that many test processes would run in parallel, where each process corresponds to one test file.
|
|
176
240
|
* If `true`, it would run `os.availableParallelism() - 1` test files in parallel. If `false`, it would only run one test file at a time.
|
|
177
241
|
* @default false
|
|
178
242
|
*/
|
|
179
243
|
concurrency?: number | boolean | undefined;
|
|
180
244
|
/**
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
* [test runner execution model](https://nodejs.org/docs/latest-v26.x/api/test.html#test-runner-execution-model).
|
|
184
|
-
* @since v23.0.0
|
|
185
|
-
* @default process.cwd()
|
|
186
|
-
*/
|
|
187
|
-
cwd?: string | undefined;
|
|
188
|
-
/**
|
|
189
|
-
* An array containing the list of files to run. If omitted, files are run according to the
|
|
190
|
-
* [test runner execution model](https://nodejs.org/docs/latest-v26.x/api/test.html#test-runner-execution-model).
|
|
245
|
+
* An array containing the list of files to run.
|
|
246
|
+
* **Default:** Same as [running tests from the command line](https://nodejs.org/docs/latest-v22.x/api/test.html#running-tests-from-the-command-line).
|
|
191
247
|
*/
|
|
192
248
|
files?: readonly string[] | undefined;
|
|
193
249
|
/**
|
|
@@ -199,8 +255,8 @@ declare module "node:test" {
|
|
|
199
255
|
forceExit?: boolean | undefined;
|
|
200
256
|
/**
|
|
201
257
|
* An array containing the list of glob patterns to match test files.
|
|
202
|
-
* This option cannot be used together with `files`.
|
|
203
|
-
* [
|
|
258
|
+
* This option cannot be used together with `files`.
|
|
259
|
+
* **Default:** Same as [running tests from the command line](https://nodejs.org/docs/latest-v22.x/api/test.html#running-tests-from-the-command-line).
|
|
204
260
|
* @since v22.6.0
|
|
205
261
|
*/
|
|
206
262
|
globPatterns?: readonly string[] | undefined;
|
|
@@ -264,15 +320,6 @@ declare module "node:test" {
|
|
|
264
320
|
* @since v22.1.0
|
|
265
321
|
*/
|
|
266
322
|
testSkipPatterns?: string | RegExp | ReadonlyArray<string | RegExp> | undefined;
|
|
267
|
-
/**
|
|
268
|
-
* A tag name, or an array of tag names,
|
|
269
|
-
* used to filter tests by their declared tags. Tests must contain every
|
|
270
|
-
* listed tag to run. Equivalent to passing `--experimental-test-tag-filter`
|
|
271
|
-
* on the command line. See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
272
|
-
* @default undefined
|
|
273
|
-
* @since v26.2.0
|
|
274
|
-
*/
|
|
275
|
-
testTagFilters?: string | readonly string[] | undefined;
|
|
276
323
|
/**
|
|
277
324
|
* The number of milliseconds after which the test execution will fail.
|
|
278
325
|
* If unspecified, subtests inherit this value from their parent.
|
|
@@ -290,28 +337,7 @@ declare module "node:test" {
|
|
|
290
337
|
*/
|
|
291
338
|
shard?: TestShard | undefined;
|
|
292
339
|
/**
|
|
293
|
-
*
|
|
294
|
-
* This option is not supported with `watch: true`.
|
|
295
|
-
* @since v26.1.0
|
|
296
|
-
* @default false
|
|
297
|
-
*/
|
|
298
|
-
randomize?: boolean | undefined;
|
|
299
|
-
/**
|
|
300
|
-
* Seed used when randomizing execution order. If this
|
|
301
|
-
* option is set, runs can replay the same randomized order deterministically,
|
|
302
|
-
* and setting this option also enables randomization. The value must be an
|
|
303
|
-
* integer between `0` and `4294967295`.
|
|
304
|
-
*/
|
|
305
|
-
randomSeed?: number | undefined;
|
|
306
|
-
/**
|
|
307
|
-
* A file path where the test runner will
|
|
308
|
-
* store the state of the tests to allow rerunning only the failed tests on a next run.
|
|
309
|
-
* @since v24.7.0
|
|
310
|
-
* @default undefined
|
|
311
|
-
*/
|
|
312
|
-
rerunFailuresFilePath?: string | undefined;
|
|
313
|
-
/**
|
|
314
|
-
* enable [code coverage](https://nodejs.org/docs/latest-v26.x/api/test.html#collecting-code-coverage) collection.
|
|
340
|
+
* enable [code coverage](https://nodejs.org/docs/latest-v22.x/api/test.html#collecting-code-coverage) collection.
|
|
315
341
|
* @since v22.10.0
|
|
316
342
|
* @default false
|
|
317
343
|
*/
|
|
@@ -357,32 +383,6 @@ declare module "node:test" {
|
|
|
357
383
|
* @default 0
|
|
358
384
|
*/
|
|
359
385
|
functionCoverage?: number | undefined;
|
|
360
|
-
/**
|
|
361
|
-
* Specify environment variables to be passed along to the test process.
|
|
362
|
-
* This option is not compatible with `isolation='none'`. These variables will override
|
|
363
|
-
* those from the main process, and are not merged with `process.env`.
|
|
364
|
-
* @since v25.6.0
|
|
365
|
-
* @default process.env
|
|
366
|
-
*/
|
|
367
|
-
env?: NodeJS.ProcessEnv | undefined;
|
|
368
|
-
}
|
|
369
|
-
interface TestsStreamEventMap extends ReadableEventMap {
|
|
370
|
-
"data": [data: TestEvent];
|
|
371
|
-
"test:coverage": [data: EventData.TestCoverage];
|
|
372
|
-
"test:complete": [data: EventData.TestComplete];
|
|
373
|
-
"test:dequeue": [data: EventData.TestDequeue];
|
|
374
|
-
"test:diagnostic": [data: EventData.TestDiagnostic];
|
|
375
|
-
"test:enqueue": [data: EventData.TestEnqueue];
|
|
376
|
-
"test:fail": [data: EventData.TestFail];
|
|
377
|
-
"test:interrupted": [data: EventData.TestInterrupted];
|
|
378
|
-
"test:pass": [data: EventData.TestPass];
|
|
379
|
-
"test:plan": [data: EventData.TestPlan];
|
|
380
|
-
"test:start": [data: EventData.TestStart];
|
|
381
|
-
"test:stderr": [data: EventData.TestStderr];
|
|
382
|
-
"test:stdout": [data: EventData.TestStdout];
|
|
383
|
-
"test:summary": [data: EventData.TestSummary];
|
|
384
|
-
"test:watch:drained": [];
|
|
385
|
-
"test:watch:restarted": [];
|
|
386
386
|
}
|
|
387
387
|
/**
|
|
388
388
|
* A successful call to `run()` will return a new `TestsStream` object, streaming a series of events representing the execution of the tests.
|
|
@@ -391,63 +391,94 @@ declare module "node:test" {
|
|
|
391
391
|
* @since v18.9.0, v16.19.0
|
|
392
392
|
*/
|
|
393
393
|
interface TestsStream extends Readable {
|
|
394
|
-
|
|
395
|
-
addListener
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
): this;
|
|
399
|
-
addListener(
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
):
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
):
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
):
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
): this;
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
): this;
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
): this;
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
): this;
|
|
445
|
-
|
|
446
|
-
|
|
394
|
+
addListener(event: "test:coverage", listener: (data: EventData.TestCoverage) => void): this;
|
|
395
|
+
addListener(event: "test:complete", listener: (data: EventData.TestComplete) => void): this;
|
|
396
|
+
addListener(event: "test:dequeue", listener: (data: EventData.TestDequeue) => void): this;
|
|
397
|
+
addListener(event: "test:diagnostic", listener: (data: EventData.TestDiagnostic) => void): this;
|
|
398
|
+
addListener(event: "test:enqueue", listener: (data: EventData.TestEnqueue) => void): this;
|
|
399
|
+
addListener(event: "test:fail", listener: (data: EventData.TestFail) => void): this;
|
|
400
|
+
addListener(event: "test:pass", listener: (data: EventData.TestPass) => void): this;
|
|
401
|
+
addListener(event: "test:plan", listener: (data: EventData.TestPlan) => void): this;
|
|
402
|
+
addListener(event: "test:start", listener: (data: EventData.TestStart) => void): this;
|
|
403
|
+
addListener(event: "test:stderr", listener: (data: EventData.TestStderr) => void): this;
|
|
404
|
+
addListener(event: "test:stdout", listener: (data: EventData.TestStdout) => void): this;
|
|
405
|
+
addListener(event: "test:summary", listener: (data: EventData.TestSummary) => void): this;
|
|
406
|
+
addListener(event: "test:watch:drained", listener: () => void): this;
|
|
407
|
+
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
408
|
+
emit(event: "test:coverage", data: EventData.TestCoverage): boolean;
|
|
409
|
+
emit(event: "test:complete", data: EventData.TestComplete): boolean;
|
|
410
|
+
emit(event: "test:dequeue", data: EventData.TestDequeue): boolean;
|
|
411
|
+
emit(event: "test:diagnostic", data: EventData.TestDiagnostic): boolean;
|
|
412
|
+
emit(event: "test:enqueue", data: EventData.TestEnqueue): boolean;
|
|
413
|
+
emit(event: "test:fail", data: EventData.TestFail): boolean;
|
|
414
|
+
emit(event: "test:pass", data: EventData.TestPass): boolean;
|
|
415
|
+
emit(event: "test:plan", data: EventData.TestPlan): boolean;
|
|
416
|
+
emit(event: "test:start", data: EventData.TestStart): boolean;
|
|
417
|
+
emit(event: "test:stderr", data: EventData.TestStderr): boolean;
|
|
418
|
+
emit(event: "test:stdout", data: EventData.TestStdout): boolean;
|
|
419
|
+
emit(event: "test:summary", data: EventData.TestSummary): boolean;
|
|
420
|
+
emit(event: "test:watch:drained"): boolean;
|
|
421
|
+
emit(event: string | symbol, ...args: any[]): boolean;
|
|
422
|
+
on(event: "test:coverage", listener: (data: EventData.TestCoverage) => void): this;
|
|
423
|
+
on(event: "test:complete", listener: (data: EventData.TestComplete) => void): this;
|
|
424
|
+
on(event: "test:dequeue", listener: (data: EventData.TestDequeue) => void): this;
|
|
425
|
+
on(event: "test:diagnostic", listener: (data: EventData.TestDiagnostic) => void): this;
|
|
426
|
+
on(event: "test:enqueue", listener: (data: EventData.TestEnqueue) => void): this;
|
|
427
|
+
on(event: "test:fail", listener: (data: EventData.TestFail) => void): this;
|
|
428
|
+
on(event: "test:pass", listener: (data: EventData.TestPass) => void): this;
|
|
429
|
+
on(event: "test:plan", listener: (data: EventData.TestPlan) => void): this;
|
|
430
|
+
on(event: "test:start", listener: (data: EventData.TestStart) => void): this;
|
|
431
|
+
on(event: "test:stderr", listener: (data: EventData.TestStderr) => void): this;
|
|
432
|
+
on(event: "test:stdout", listener: (data: EventData.TestStdout) => void): this;
|
|
433
|
+
on(event: "test:summary", listener: (data: EventData.TestSummary) => void): this;
|
|
434
|
+
on(event: "test:watch:drained", listener: () => void): this;
|
|
435
|
+
on(event: string, listener: (...args: any[]) => void): this;
|
|
436
|
+
once(event: "test:coverage", listener: (data: EventData.TestCoverage) => void): this;
|
|
437
|
+
once(event: "test:complete", listener: (data: EventData.TestComplete) => void): this;
|
|
438
|
+
once(event: "test:dequeue", listener: (data: EventData.TestDequeue) => void): this;
|
|
439
|
+
once(event: "test:diagnostic", listener: (data: EventData.TestDiagnostic) => void): this;
|
|
440
|
+
once(event: "test:enqueue", listener: (data: EventData.TestEnqueue) => void): this;
|
|
441
|
+
once(event: "test:fail", listener: (data: EventData.TestFail) => void): this;
|
|
442
|
+
once(event: "test:pass", listener: (data: EventData.TestPass) => void): this;
|
|
443
|
+
once(event: "test:plan", listener: (data: EventData.TestPlan) => void): this;
|
|
444
|
+
once(event: "test:start", listener: (data: EventData.TestStart) => void): this;
|
|
445
|
+
once(event: "test:stderr", listener: (data: EventData.TestStderr) => void): this;
|
|
446
|
+
once(event: "test:stdout", listener: (data: EventData.TestStdout) => void): this;
|
|
447
|
+
once(event: "test:summary", listener: (data: EventData.TestSummary) => void): this;
|
|
448
|
+
once(event: "test:watch:drained", listener: () => void): this;
|
|
449
|
+
once(event: string, listener: (...args: any[]) => void): this;
|
|
450
|
+
prependListener(event: "test:coverage", listener: (data: EventData.TestCoverage) => void): this;
|
|
451
|
+
prependListener(event: "test:complete", listener: (data: EventData.TestComplete) => void): this;
|
|
452
|
+
prependListener(event: "test:dequeue", listener: (data: EventData.TestDequeue) => void): this;
|
|
453
|
+
prependListener(event: "test:diagnostic", listener: (data: EventData.TestDiagnostic) => void): this;
|
|
454
|
+
prependListener(event: "test:enqueue", listener: (data: EventData.TestEnqueue) => void): this;
|
|
455
|
+
prependListener(event: "test:fail", listener: (data: EventData.TestFail) => void): this;
|
|
456
|
+
prependListener(event: "test:pass", listener: (data: EventData.TestPass) => void): this;
|
|
457
|
+
prependListener(event: "test:plan", listener: (data: EventData.TestPlan) => void): this;
|
|
458
|
+
prependListener(event: "test:start", listener: (data: EventData.TestStart) => void): this;
|
|
459
|
+
prependListener(event: "test:stderr", listener: (data: EventData.TestStderr) => void): this;
|
|
460
|
+
prependListener(event: "test:stdout", listener: (data: EventData.TestStdout) => void): this;
|
|
461
|
+
prependListener(event: "test:summary", listener: (data: EventData.TestSummary) => void): this;
|
|
462
|
+
prependListener(event: "test:watch:drained", listener: () => void): this;
|
|
463
|
+
prependListener(event: string, listener: (...args: any[]) => void): this;
|
|
464
|
+
prependOnceListener(event: "test:coverage", listener: (data: EventData.TestCoverage) => void): this;
|
|
465
|
+
prependOnceListener(event: "test:complete", listener: (data: EventData.TestComplete) => void): this;
|
|
466
|
+
prependOnceListener(event: "test:dequeue", listener: (data: EventData.TestDequeue) => void): this;
|
|
467
|
+
prependOnceListener(event: "test:diagnostic", listener: (data: EventData.TestDiagnostic) => void): this;
|
|
468
|
+
prependOnceListener(event: "test:enqueue", listener: (data: EventData.TestEnqueue) => void): this;
|
|
469
|
+
prependOnceListener(event: "test:fail", listener: (data: EventData.TestFail) => void): this;
|
|
470
|
+
prependOnceListener(event: "test:pass", listener: (data: EventData.TestPass) => void): this;
|
|
471
|
+
prependOnceListener(event: "test:plan", listener: (data: EventData.TestPlan) => void): this;
|
|
472
|
+
prependOnceListener(event: "test:start", listener: (data: EventData.TestStart) => void): this;
|
|
473
|
+
prependOnceListener(event: "test:stderr", listener: (data: EventData.TestStderr) => void): this;
|
|
474
|
+
prependOnceListener(event: "test:stdout", listener: (data: EventData.TestStdout) => void): this;
|
|
475
|
+
prependOnceListener(event: "test:summary", listener: (data: EventData.TestSummary) => void): this;
|
|
476
|
+
prependOnceListener(event: "test:watch:drained", listener: () => void): this;
|
|
477
|
+
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
|
447
478
|
}
|
|
448
479
|
namespace EventData {
|
|
449
480
|
interface Error extends globalThis.Error {
|
|
450
|
-
cause:
|
|
481
|
+
cause: globalThis.Error;
|
|
451
482
|
}
|
|
452
483
|
interface LocationInfo {
|
|
453
484
|
/**
|
|
@@ -667,7 +698,7 @@ declare module "node:test" {
|
|
|
667
698
|
/**
|
|
668
699
|
* The type of the test, used to denote whether this is a suite.
|
|
669
700
|
*/
|
|
670
|
-
type?: "suite"
|
|
701
|
+
type?: "suite";
|
|
671
702
|
};
|
|
672
703
|
/**
|
|
673
704
|
* The test name.
|
|
@@ -677,24 +708,6 @@ declare module "node:test" {
|
|
|
677
708
|
* The nesting level of the test.
|
|
678
709
|
*/
|
|
679
710
|
nesting: number;
|
|
680
|
-
/**
|
|
681
|
-
* The `testId` of the enclosing test, or
|
|
682
|
-
* `undefined` for top-level tests. Lets custom reporters track lineage
|
|
683
|
-
* when concurrent siblings at the same nesting level interleave.
|
|
684
|
-
*/
|
|
685
|
-
parentId: number | undefined;
|
|
686
|
-
/**
|
|
687
|
-
* The flattened lowercased tags declared on the test
|
|
688
|
-
* and its ancestor suites, in declaration order. Empty for untagged tests.
|
|
689
|
-
* See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
690
|
-
*/
|
|
691
|
-
tags: string[];
|
|
692
|
-
/**
|
|
693
|
-
* A numeric identifier for this test instance, unique
|
|
694
|
-
* within the test file's process. Consistent across all events for the same
|
|
695
|
-
* test instance, enabling reliable correlation in custom reporters.
|
|
696
|
-
*/
|
|
697
|
-
testId: number;
|
|
698
711
|
/**
|
|
699
712
|
* The ordinal number of the test.
|
|
700
713
|
*/
|
|
@@ -717,24 +730,6 @@ declare module "node:test" {
|
|
|
717
730
|
* The nesting level of the test.
|
|
718
731
|
*/
|
|
719
732
|
nesting: number;
|
|
720
|
-
/**
|
|
721
|
-
* The `testId` of the enclosing test, or
|
|
722
|
-
* `undefined` for top-level tests. Lets custom reporters track lineage
|
|
723
|
-
* when concurrent siblings at the same nesting level interleave.
|
|
724
|
-
*/
|
|
725
|
-
parentId: number | undefined;
|
|
726
|
-
/**
|
|
727
|
-
* The flattened lowercased tags declared on the test
|
|
728
|
-
* and its ancestor suites, in declaration order. Empty for untagged tests.
|
|
729
|
-
* See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
730
|
-
*/
|
|
731
|
-
tags: string[];
|
|
732
|
-
/**
|
|
733
|
-
* A numeric identifier for this test instance, unique
|
|
734
|
-
* within the test file's process. Consistent across all events for the same
|
|
735
|
-
* test instance, enabling reliable correlation in custom reporters.
|
|
736
|
-
*/
|
|
737
|
-
testId: number;
|
|
738
733
|
/**
|
|
739
734
|
* The test type. Either `'suite'` or `'test'`.
|
|
740
735
|
* @since v22.15.0
|
|
@@ -750,24 +745,6 @@ declare module "node:test" {
|
|
|
750
745
|
* The nesting level of the test.
|
|
751
746
|
*/
|
|
752
747
|
nesting: number;
|
|
753
|
-
/**
|
|
754
|
-
* The `testId` of the enclosing test, or
|
|
755
|
-
* `undefined` for top-level tests. Lets custom reporters track lineage
|
|
756
|
-
* when concurrent siblings at the same nesting level interleave.
|
|
757
|
-
*/
|
|
758
|
-
parentId: number | undefined;
|
|
759
|
-
/**
|
|
760
|
-
* The flattened lowercased tags declared on the test
|
|
761
|
-
* and its ancestor suites, in declaration order. Empty for untagged tests.
|
|
762
|
-
* See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
763
|
-
*/
|
|
764
|
-
tags: string[];
|
|
765
|
-
/**
|
|
766
|
-
* A numeric identifier for this test instance, unique
|
|
767
|
-
* within the test file's process. Consistent across all events for the same
|
|
768
|
-
* test instance, enabling reliable correlation in custom reporters.
|
|
769
|
-
*/
|
|
770
|
-
testId: number;
|
|
771
748
|
/**
|
|
772
749
|
* The test type. Either `'suite'` or `'test'`.
|
|
773
750
|
* @since v22.15.0
|
|
@@ -791,13 +768,7 @@ declare module "node:test" {
|
|
|
791
768
|
* The type of the test, used to denote whether this is a suite.
|
|
792
769
|
* @since v20.0.0, v19.9.0, v18.17.0
|
|
793
770
|
*/
|
|
794
|
-
type?: "suite"
|
|
795
|
-
/**
|
|
796
|
-
* The attempt number of the test run,
|
|
797
|
-
* present only when using the `--test-rerun-failures` flag.
|
|
798
|
-
* @since v24.7.0
|
|
799
|
-
*/
|
|
800
|
-
attempt?: number;
|
|
771
|
+
type?: "suite";
|
|
801
772
|
};
|
|
802
773
|
/**
|
|
803
774
|
* The test name.
|
|
@@ -807,24 +778,6 @@ declare module "node:test" {
|
|
|
807
778
|
* The nesting level of the test.
|
|
808
779
|
*/
|
|
809
780
|
nesting: number;
|
|
810
|
-
/**
|
|
811
|
-
* The `testId` of the enclosing test, or
|
|
812
|
-
* `undefined` for top-level tests. Lets custom reporters track lineage
|
|
813
|
-
* when concurrent siblings at the same nesting level interleave.
|
|
814
|
-
*/
|
|
815
|
-
parentId: number | undefined;
|
|
816
|
-
/**
|
|
817
|
-
* The flattened lowercased tags declared on the test
|
|
818
|
-
* and its ancestor suites, in declaration order. Empty for untagged tests.
|
|
819
|
-
* See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
820
|
-
*/
|
|
821
|
-
tags: string[];
|
|
822
|
-
/**
|
|
823
|
-
* A numeric identifier for this test instance, unique
|
|
824
|
-
* within the test file's process. Consistent across all events for the same
|
|
825
|
-
* test instance, enabling reliable correlation in custom reporters.
|
|
826
|
-
*/
|
|
827
|
-
testId: number;
|
|
828
781
|
/**
|
|
829
782
|
* The ordinal number of the test.
|
|
830
783
|
*/
|
|
@@ -838,13 +791,6 @@ declare module "node:test" {
|
|
|
838
791
|
*/
|
|
839
792
|
skip?: string | boolean;
|
|
840
793
|
}
|
|
841
|
-
interface TestInterrupted {
|
|
842
|
-
/**
|
|
843
|
-
* An array of objects containing information about the
|
|
844
|
-
* interrupted tests.
|
|
845
|
-
*/
|
|
846
|
-
tests: TestStart[];
|
|
847
|
-
}
|
|
848
794
|
interface TestPass extends LocationInfo {
|
|
849
795
|
/**
|
|
850
796
|
* Additional execution metadata.
|
|
@@ -858,19 +804,7 @@ declare module "node:test" {
|
|
|
858
804
|
* The type of the test, used to denote whether this is a suite.
|
|
859
805
|
* @since 20.0.0, 19.9.0, 18.17.0
|
|
860
806
|
*/
|
|
861
|
-
type?: "suite"
|
|
862
|
-
/**
|
|
863
|
-
* The attempt number of the test run,
|
|
864
|
-
* present only when using the `--test-rerun-failures` flag.
|
|
865
|
-
* @since v24.7.0
|
|
866
|
-
*/
|
|
867
|
-
attempt?: number;
|
|
868
|
-
/**
|
|
869
|
-
* The attempt number the test passed on,
|
|
870
|
-
* present only when using the `--test-rerun-failures` flag.
|
|
871
|
-
* @since v24.7.0
|
|
872
|
-
*/
|
|
873
|
-
passed_on_attempt?: number;
|
|
807
|
+
type?: "suite";
|
|
874
808
|
};
|
|
875
809
|
/**
|
|
876
810
|
* The test name.
|
|
@@ -880,24 +814,6 @@ declare module "node:test" {
|
|
|
880
814
|
* The nesting level of the test.
|
|
881
815
|
*/
|
|
882
816
|
nesting: number;
|
|
883
|
-
/**
|
|
884
|
-
* The `testId` of the enclosing test, or
|
|
885
|
-
* `undefined` for top-level tests. Lets custom reporters track lineage
|
|
886
|
-
* when concurrent siblings at the same nesting level interleave.
|
|
887
|
-
*/
|
|
888
|
-
parentId: number | undefined;
|
|
889
|
-
/**
|
|
890
|
-
* The flattened lowercased tags declared on the test
|
|
891
|
-
* and its ancestor suites, in declaration order. Empty for untagged tests.
|
|
892
|
-
* See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
893
|
-
*/
|
|
894
|
-
tags: string[];
|
|
895
|
-
/**
|
|
896
|
-
* A numeric identifier for this test instance, unique
|
|
897
|
-
* within the test file's process. Consistent across all events for the same
|
|
898
|
-
* test instance, enabling reliable correlation in custom reporters.
|
|
899
|
-
*/
|
|
900
|
-
testId: number;
|
|
901
817
|
/**
|
|
902
818
|
* The ordinal number of the test.
|
|
903
819
|
*/
|
|
@@ -930,24 +846,6 @@ declare module "node:test" {
|
|
|
930
846
|
* The nesting level of the test.
|
|
931
847
|
*/
|
|
932
848
|
nesting: number;
|
|
933
|
-
/**
|
|
934
|
-
* The `testId` of the enclosing test, or
|
|
935
|
-
* `undefined` for top-level tests. Lets custom reporters track lineage
|
|
936
|
-
* when concurrent siblings at the same nesting level interleave.
|
|
937
|
-
*/
|
|
938
|
-
parentId: number | undefined;
|
|
939
|
-
/**
|
|
940
|
-
* The flattened lowercased tags declared on the test
|
|
941
|
-
* and its ancestor suites, in declaration order. Empty for untagged tests.
|
|
942
|
-
* See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
943
|
-
*/
|
|
944
|
-
tags: string[];
|
|
945
|
-
/**
|
|
946
|
-
* A numeric identifier for this test instance, unique
|
|
947
|
-
* within the test file's process. Consistent across all events for the same
|
|
948
|
-
* test instance, enabling reliable correlation in custom reporters.
|
|
949
|
-
*/
|
|
950
|
-
testId: number;
|
|
951
849
|
}
|
|
952
850
|
interface TestStderr {
|
|
953
851
|
/**
|
|
@@ -1021,39 +919,6 @@ declare module "node:test" {
|
|
|
1021
919
|
success: boolean;
|
|
1022
920
|
}
|
|
1023
921
|
}
|
|
1024
|
-
/**
|
|
1025
|
-
* Returns the {@link TestContext} or {@link SuiteContext} object associated with the
|
|
1026
|
-
* currently executing test or suite, or `undefined` if called outside of a test or
|
|
1027
|
-
* suite. This function can be used to access context information from within the
|
|
1028
|
-
* test or suite function or any async operations within them.
|
|
1029
|
-
|
|
1030
|
-
* ```js
|
|
1031
|
-
* import { getTestContext } from 'node:test';
|
|
1032
|
-
*
|
|
1033
|
-
* test('example test', async () => {
|
|
1034
|
-
* const ctx = getTestContext();
|
|
1035
|
-
* console.log(`Running test: ${ctx.name}`);
|
|
1036
|
-
* });
|
|
1037
|
-
*
|
|
1038
|
-
* describe('example suite', () => {
|
|
1039
|
-
* const ctx = getTestContext();
|
|
1040
|
-
* console.log(`Running suite: ${ctx.name}`);
|
|
1041
|
-
* });
|
|
1042
|
-
* ```
|
|
1043
|
-
*
|
|
1044
|
-
* When called from a test, returns a `TestContext`.
|
|
1045
|
-
* When called from a suite, returns a `SuiteContext`.
|
|
1046
|
-
*
|
|
1047
|
-
* If called from outside a test or suite (e.g., at the top level of a module or in
|
|
1048
|
-
* a setTimeout callback after execution has completed), this function returns
|
|
1049
|
-
* `undefined`.
|
|
1050
|
-
*
|
|
1051
|
-
* When called from within a hook (before, beforeEach, after, afterEach), this
|
|
1052
|
-
* function returns the context of the test or suite that the hook is associated
|
|
1053
|
-
* with.
|
|
1054
|
-
* @since v26.1.0
|
|
1055
|
-
*/
|
|
1056
|
-
function getTestContext(): TestContext | SuiteContext | undefined;
|
|
1057
922
|
/**
|
|
1058
923
|
* An instance of `TestContext` is passed to each test function in order to
|
|
1059
924
|
* interact with the test runner. However, the `TestContext` constructor is not
|
|
@@ -1146,58 +1011,6 @@ declare module "node:test" {
|
|
|
1146
1011
|
* @since v18.8.0, v16.18.0
|
|
1147
1012
|
*/
|
|
1148
1013
|
readonly name: string;
|
|
1149
|
-
/**
|
|
1150
|
-
* Indicated whether the test succeeded.
|
|
1151
|
-
* @since v21.7.0, v20.12.0
|
|
1152
|
-
*/
|
|
1153
|
-
readonly passed: boolean;
|
|
1154
|
-
/**
|
|
1155
|
-
* The failure reason for the test/case; wrapped and available via `context.error.cause`.
|
|
1156
|
-
* @since v21.7.0, v20.12.0
|
|
1157
|
-
*/
|
|
1158
|
-
readonly error: EventData.Error | null;
|
|
1159
|
-
/**
|
|
1160
|
-
* The attempt number of the test. This value is zero-based, so the first attempt is `0`,
|
|
1161
|
-
* the second attempt is `1`, and so on. This property is useful in conjunction with the
|
|
1162
|
-
* `--test-rerun-failures` option to determine which attempt the test is currently running.
|
|
1163
|
-
* @since v21.7.0, v20.12.0
|
|
1164
|
-
*/
|
|
1165
|
-
readonly attempt: number;
|
|
1166
|
-
/**
|
|
1167
|
-
* A frozen array of the test's flattened lowercased tags, in declaration
|
|
1168
|
-
* order, including any tags inherited from ancestor suites. Empty when the
|
|
1169
|
-
* test has no tags. See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
1170
|
-
* @since v26.2.0
|
|
1171
|
-
*/
|
|
1172
|
-
readonly tags: readonly string[];
|
|
1173
|
-
/**
|
|
1174
|
-
* The unique identifier of the worker running the current test file. This value is
|
|
1175
|
-
* derived from the `NODE_TEST_WORKER_ID` environment variable. When running tests
|
|
1176
|
-
* with `--test-isolation=process` (the default), each test file runs in a separate
|
|
1177
|
-
* child process and is assigned a worker ID from 1 to N, where N is the number of
|
|
1178
|
-
* concurrent workers. When running with `--test-isolation=none`, all tests run in
|
|
1179
|
-
* the same process and the worker ID is always 1. This value is `undefined` when
|
|
1180
|
-
* not running in a test context.
|
|
1181
|
-
*
|
|
1182
|
-
* This property is useful for splitting resources (like database connections or
|
|
1183
|
-
* server ports) across concurrent test files:
|
|
1184
|
-
*
|
|
1185
|
-
* ```js
|
|
1186
|
-
* import { test } from 'node:test';
|
|
1187
|
-
* import { process } from 'node:process';
|
|
1188
|
-
*
|
|
1189
|
-
* test('database operations', async (t) => {
|
|
1190
|
-
* // Worker ID is available via context
|
|
1191
|
-
* console.log(`Running in worker ${t.workerId}`);
|
|
1192
|
-
*
|
|
1193
|
-
* // Or via environment variable (available at import time)
|
|
1194
|
-
* const workerId = process.env.NODE_TEST_WORKER_ID;
|
|
1195
|
-
* // Use workerId to allocate separate resources per worker
|
|
1196
|
-
* });
|
|
1197
|
-
* ```
|
|
1198
|
-
* @since v25.8.0
|
|
1199
|
-
*/
|
|
1200
|
-
readonly workerId: number | undefined;
|
|
1201
1014
|
/**
|
|
1202
1015
|
* This function is used to set the number of assertions and subtests that are expected to run
|
|
1203
1016
|
* within the test. If the number of assertions and subtests that run does not match the
|
|
@@ -1366,7 +1179,7 @@ declare module "node:test" {
|
|
|
1366
1179
|
* highlighting.
|
|
1367
1180
|
* @since v22.14.0
|
|
1368
1181
|
* @param value A value to serialize to a string. If Node.js was started with
|
|
1369
|
-
* the [`--test-update-snapshots`](https://nodejs.org/docs/latest-
|
|
1182
|
+
* the [`--test-update-snapshots`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--test-update-snapshots)
|
|
1370
1183
|
* flag, the serialized value is written to
|
|
1371
1184
|
* `path`. Otherwise, the serialized value is compared to the contents of the
|
|
1372
1185
|
* existing snapshot file.
|
|
@@ -1389,7 +1202,7 @@ declare module "node:test" {
|
|
|
1389
1202
|
* ```
|
|
1390
1203
|
* @since v22.3.0
|
|
1391
1204
|
* @param value A value to serialize to a string. If Node.js was started with
|
|
1392
|
-
* the [`--test-update-snapshots`](https://nodejs.org/docs/latest-
|
|
1205
|
+
* the [`--test-update-snapshots`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--test-update-snapshots)
|
|
1393
1206
|
* flag, the serialized value is written to
|
|
1394
1207
|
* the snapshot file. Otherwise, the serialized value is compared to the
|
|
1395
1208
|
* corresponding value in the existing snapshot file.
|
|
@@ -1452,11 +1265,6 @@ declare module "node:test" {
|
|
|
1452
1265
|
* @since v22.6.0
|
|
1453
1266
|
*/
|
|
1454
1267
|
readonly filePath: string | undefined;
|
|
1455
|
-
/**
|
|
1456
|
-
* The name of the suite and each of its ancestors, separated by `>`.
|
|
1457
|
-
* @since v22.3.0, v20.16.0
|
|
1458
|
-
*/
|
|
1459
|
-
readonly fullName: string;
|
|
1460
1268
|
/**
|
|
1461
1269
|
* The name of the suite.
|
|
1462
1270
|
* @since v18.8.0, v16.18.0
|
|
@@ -1467,31 +1275,6 @@ declare module "node:test" {
|
|
|
1467
1275
|
* @since v18.7.0, v16.17.0
|
|
1468
1276
|
*/
|
|
1469
1277
|
readonly signal: AbortSignal;
|
|
1470
|
-
/**
|
|
1471
|
-
* Indicates whether the suite and all of its subtests have passed.
|
|
1472
|
-
* @since v26.1.0
|
|
1473
|
-
*/
|
|
1474
|
-
readonly passed: boolean;
|
|
1475
|
-
/**
|
|
1476
|
-
* The attempt number of the suite. This value is zero-based, so the first attempt is `0`,
|
|
1477
|
-
* the second attempt is `1`, and so on. This property is useful in conjunction with the
|
|
1478
|
-
* `--test-rerun-failures` option to determine the attempt number of the current run.
|
|
1479
|
-
* @since v26.1.0
|
|
1480
|
-
*/
|
|
1481
|
-
readonly attempt: number;
|
|
1482
|
-
/**
|
|
1483
|
-
* Output a diagnostic message. This is typically used for logging information
|
|
1484
|
-
* about the current suite or its tests.
|
|
1485
|
-
*
|
|
1486
|
-
* ```js
|
|
1487
|
-
* test.describe('my suite', (suite) => {
|
|
1488
|
-
* suite.diagnostic('Suite diagnostic message');
|
|
1489
|
-
* });
|
|
1490
|
-
* ```
|
|
1491
|
-
* @since v26.1.0
|
|
1492
|
-
* @param message A diagnostic message to output.
|
|
1493
|
-
*/
|
|
1494
|
-
diagnostic(message: string): void;
|
|
1495
1278
|
}
|
|
1496
1279
|
interface TestOptions {
|
|
1497
1280
|
/**
|
|
@@ -1503,17 +1286,6 @@ declare module "node:test" {
|
|
|
1503
1286
|
* @default false
|
|
1504
1287
|
*/
|
|
1505
1288
|
concurrency?: number | boolean | undefined;
|
|
1506
|
-
/**
|
|
1507
|
-
* If truthy, the test is expected to fail. If a non-empty string is provided, that string is displayed
|
|
1508
|
-
* in the test results as the reason why the test is expected to fail. If a
|
|
1509
|
-
* `RegExp`, `Function`, `Object`, or `Error` is provided directly (without wrapping in `{ match: … }`), the test passes
|
|
1510
|
-
* only if the thrown error matches, following the behavior of
|
|
1511
|
-
* `assert.throws`. To provide both a reason and validation, pass an object
|
|
1512
|
-
* with `label` (string) and `match` (RegExp, Function, Object, or Error).
|
|
1513
|
-
* @since v25.5.0
|
|
1514
|
-
* @default false
|
|
1515
|
-
*/
|
|
1516
|
-
expectFailure?: boolean | string | AssertPredicate | undefined;
|
|
1517
1289
|
/**
|
|
1518
1290
|
* If truthy, and the test context is configured to run `only` tests, then this test will be
|
|
1519
1291
|
* run. Otherwise, the test is skipped.
|
|
@@ -1531,15 +1303,6 @@ declare module "node:test" {
|
|
|
1531
1303
|
* @default false
|
|
1532
1304
|
*/
|
|
1533
1305
|
skip?: boolean | string | undefined;
|
|
1534
|
-
/**
|
|
1535
|
-
* An array of string labels associated with the test.
|
|
1536
|
-
* Used together with `--experimental-test-tag-filter` to filter which
|
|
1537
|
-
* tests run. Tags inherit from suites to nested tests by union. See
|
|
1538
|
-
* [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
1539
|
-
* @default []
|
|
1540
|
-
* @since v26.2.0
|
|
1541
|
-
*/
|
|
1542
|
-
tags?: readonly string[] | undefined;
|
|
1543
1306
|
/**
|
|
1544
1307
|
* A number of milliseconds the test will fail after. If unspecified, subtests inherit this
|
|
1545
1308
|
* value from their parent.
|
|
@@ -1569,7 +1332,7 @@ declare module "node:test" {
|
|
|
1569
1332
|
* describe('tests', async () => {
|
|
1570
1333
|
* before(() => console.log('about to run some test'));
|
|
1571
1334
|
* it('is a subtest', () => {
|
|
1572
|
-
*
|
|
1335
|
+
* assert.ok('some relevant assertion here');
|
|
1573
1336
|
* });
|
|
1574
1337
|
* });
|
|
1575
1338
|
* ```
|
|
@@ -1585,7 +1348,7 @@ declare module "node:test" {
|
|
|
1585
1348
|
* describe('tests', async () => {
|
|
1586
1349
|
* after(() => console.log('finished running tests'));
|
|
1587
1350
|
* it('is a subtest', () => {
|
|
1588
|
-
*
|
|
1351
|
+
* assert.ok('some relevant assertion here');
|
|
1589
1352
|
* });
|
|
1590
1353
|
* });
|
|
1591
1354
|
* ```
|
|
@@ -1601,7 +1364,7 @@ declare module "node:test" {
|
|
|
1601
1364
|
* describe('tests', async () => {
|
|
1602
1365
|
* beforeEach(() => console.log('about to run a test'));
|
|
1603
1366
|
* it('is a subtest', () => {
|
|
1604
|
-
*
|
|
1367
|
+
* assert.ok('some relevant assertion here');
|
|
1605
1368
|
* });
|
|
1606
1369
|
* });
|
|
1607
1370
|
* ```
|
|
@@ -1618,7 +1381,7 @@ declare module "node:test" {
|
|
|
1618
1381
|
* describe('tests', async () => {
|
|
1619
1382
|
* afterEach(() => console.log('finished running a test'));
|
|
1620
1383
|
* it('is a subtest', () => {
|
|
1621
|
-
*
|
|
1384
|
+
* assert.ok('some relevant assertion here');
|
|
1622
1385
|
* });
|
|
1623
1386
|
* });
|
|
1624
1387
|
* ```
|
|
@@ -1686,40 +1449,19 @@ declare module "node:test" {
|
|
|
1686
1449
|
*/
|
|
1687
1450
|
cache?: boolean | undefined;
|
|
1688
1451
|
/**
|
|
1689
|
-
*
|
|
1690
|
-
*
|
|
1691
|
-
*
|
|
1692
|
-
*
|
|
1693
|
-
*
|
|
1694
|
-
* the value of `module.exports`.
|
|
1695
|
-
* * If `exports.default` is not provided for a CommonJS or builtin mock,
|
|
1696
|
-
* `module.exports` defaults to an empty object.
|
|
1697
|
-
* * If named exports are provided with a non-object default export, the mock
|
|
1698
|
-
* throws an exception when used as a CommonJS or builtin module.
|
|
1699
|
-
*/
|
|
1700
|
-
exports?: object | undefined;
|
|
1701
|
-
/**
|
|
1702
|
-
* An optional value used as the mocked module's default
|
|
1703
|
-
* export. If this value is not provided, ESM mocks do not include a default
|
|
1704
|
-
* export. If the mock is a CommonJS or builtin module, this setting is used as
|
|
1705
|
-
* the value of `module.exports`. If this value is not provided, CJS and builtin
|
|
1706
|
-
* mocks use an empty object as the value of `module.exports`.
|
|
1707
|
-
* **This option cannot be used with `options.exports`.**
|
|
1708
|
-
* This option is deprecated and will be removed in a later version.
|
|
1709
|
-
* Prefer `options.exports.default`.
|
|
1710
|
-
* @deprecated
|
|
1452
|
+
* The value to use as the mocked module's default export.
|
|
1453
|
+
*
|
|
1454
|
+
* If this value is not provided, ESM mocks do not include a default export.
|
|
1455
|
+
* If the mock is a CommonJS or builtin module, this setting is used as the value of `module.exports`.
|
|
1456
|
+
* If this value is not provided, CJS and builtin mocks use an empty object as the value of `module.exports`.
|
|
1711
1457
|
*/
|
|
1712
1458
|
defaultExport?: any;
|
|
1713
1459
|
/**
|
|
1714
|
-
* An
|
|
1715
|
-
*
|
|
1716
|
-
* builtin module, these values are copied onto `module.exports`.
|
|
1717
|
-
* mock is created with both named exports and a non-object default export,
|
|
1718
|
-
* mock will throw an exception when used as a CJS or builtin module.
|
|
1719
|
-
* **This option cannot be used with `options.exports`.**
|
|
1720
|
-
* This option is deprecated and will be removed in a later version.
|
|
1721
|
-
* Prefer `options.exports`.
|
|
1722
|
-
* @deprecated
|
|
1460
|
+
* An object whose keys and values are used to create the named exports of the mock module.
|
|
1461
|
+
*
|
|
1462
|
+
* If the mock is a CommonJS or builtin module, these values are copied onto `module.exports`.
|
|
1463
|
+
* Therefore, if a mock is created with both named exports and a non-object default export,
|
|
1464
|
+
* the mock will throw an exception when used as a CJS or builtin module.
|
|
1723
1465
|
*/
|
|
1724
1466
|
namedExports?: object | undefined;
|
|
1725
1467
|
}
|
|
@@ -1888,48 +1630,10 @@ declare module "node:test" {
|
|
|
1888
1630
|
options?: MockFunctionOptions,
|
|
1889
1631
|
): Mock<((value: MockedObject[MethodName]) => void) | Implementation>;
|
|
1890
1632
|
/**
|
|
1891
|
-
* This function is used to mock the exports of ECMAScript modules, CommonJS modules,
|
|
1892
|
-
*
|
|
1893
|
-
* order to enable module mocking, Node.js must be started with the
|
|
1894
|
-
* [`--experimental-test-module-mocks`](https://nodejs.org/docs/latest-v26.x/api/cli.html#--experimental-test-module-mocks)
|
|
1895
|
-
* command-line flag.
|
|
1896
|
-
*
|
|
1897
|
-
* **Note**: [module customization hooks](https://nodejs.org/docs/latest-v26.x/api/module.html#customization-hooks) registered via the **synchronous** API effect resolution of
|
|
1898
|
-
* the `specifier` provided to `mock.module`. Customization hooks registered via the **asynchronous**
|
|
1899
|
-
* API are currently ignored (because the test runner's loader is synchronous, and node does not
|
|
1900
|
-
* support multi-chain / cross-chain loading).
|
|
1901
|
-
*
|
|
1902
|
-
* The following example demonstrates how a mock is created for a module.
|
|
1903
|
-
*
|
|
1904
|
-
* ```js
|
|
1905
|
-
* test('mocks a builtin module in both module systems', async (t) => {
|
|
1906
|
-
* // Create a mock of 'node:readline' with a named export named 'foo', which
|
|
1907
|
-
* // does not exist in the original 'node:readline' module.
|
|
1908
|
-
* const mock = t.mock.module('node:readline', {
|
|
1909
|
-
* exports: { foo: () => 42 },
|
|
1910
|
-
* });
|
|
1911
|
-
*
|
|
1912
|
-
* let esmImpl = await import('node:readline');
|
|
1913
|
-
* let cjsImpl = require('node:readline');
|
|
1914
|
-
*
|
|
1915
|
-
* // cursorTo() is an export of the original 'node:readline' module.
|
|
1916
|
-
* assert.strictEqual(esmImpl.cursorTo, undefined);
|
|
1917
|
-
* assert.strictEqual(cjsImpl.cursorTo, undefined);
|
|
1918
|
-
* assert.strictEqual(esmImpl.fn(), 42);
|
|
1919
|
-
* assert.strictEqual(cjsImpl.fn(), 42);
|
|
1920
|
-
*
|
|
1921
|
-
* mock.restore();
|
|
1633
|
+
* This function is used to mock the exports of ECMAScript modules, CommonJS modules, and Node.js builtin modules.
|
|
1634
|
+
* Any references to the original module prior to mocking are not impacted.
|
|
1922
1635
|
*
|
|
1923
|
-
*
|
|
1924
|
-
* esmImpl = await import('node:readline');
|
|
1925
|
-
* cjsImpl = require('node:readline');
|
|
1926
|
-
*
|
|
1927
|
-
* assert.strictEqual(typeof esmImpl.cursorTo, 'function');
|
|
1928
|
-
* assert.strictEqual(typeof cjsImpl.cursorTo, 'function');
|
|
1929
|
-
* assert.strictEqual(esmImpl.fn, undefined);
|
|
1930
|
-
* assert.strictEqual(cjsImpl.fn, undefined);
|
|
1931
|
-
* });
|
|
1932
|
-
* ```
|
|
1636
|
+
* Only available through the [--experimental-test-module-mocks](https://nodejs.org/api/cli.html#--experimental-test-module-mocks) flag.
|
|
1933
1637
|
* @since v22.3.0
|
|
1934
1638
|
* @experimental
|
|
1935
1639
|
* @param specifier A string identifying the module to mock.
|
|
@@ -1959,14 +1663,14 @@ declare module "node:test" {
|
|
|
1959
1663
|
* assert.strictEqual(obj.foo, 42);
|
|
1960
1664
|
* });
|
|
1961
1665
|
* ```
|
|
1962
|
-
* @since
|
|
1666
|
+
* @since v22.20.0
|
|
1963
1667
|
* @param object The object whose value is being mocked.
|
|
1964
1668
|
* @param propertyName The identifier of the property on `object` to mock.
|
|
1965
1669
|
* @param value An optional value used as the mock value
|
|
1966
1670
|
* for `object[propertyName]`. **Default:** The original property value.
|
|
1967
1671
|
* @returns A proxy to the mocked object. The mocked object contains a
|
|
1968
|
-
* special `mock` property, which is an instance of [`MockPropertyContext`]
|
|
1969
|
-
* can be used for inspecting and changing the behavior of the mocked property.
|
|
1672
|
+
* special `mock` property, which is an instance of [`MockPropertyContext`](https://nodejs.org/docs/latest-v22.x/api/test.html#class-mockpropertycontext),
|
|
1673
|
+
* and can be used for inspecting and changing the behavior of the mocked property.
|
|
1970
1674
|
*/
|
|
1971
1675
|
property<
|
|
1972
1676
|
MockedObject extends object,
|
|
@@ -2146,7 +1850,7 @@ declare module "node:test" {
|
|
|
2146
1850
|
restore(): void;
|
|
2147
1851
|
}
|
|
2148
1852
|
/**
|
|
2149
|
-
* @since
|
|
1853
|
+
* @since v22.20.0
|
|
2150
1854
|
*/
|
|
2151
1855
|
class MockPropertyContext<PropertyType = any> {
|
|
2152
1856
|
/**
|
|
@@ -2184,8 +1888,6 @@ declare module "node:test" {
|
|
|
2184
1888
|
* test('changes a mock behavior once', (t) => {
|
|
2185
1889
|
* const obj = { foo: 1 };
|
|
2186
1890
|
*
|
|
2187
|
-
* const prop = t.mock.property(obj, 'foo', 5);
|
|
2188
|
-
*
|
|
2189
1891
|
* assert.strictEqual(obj.foo, 5);
|
|
2190
1892
|
* prop.mock.mockImplementationOnce(25);
|
|
2191
1893
|
* assert.strictEqual(obj.foo, 25);
|
|
@@ -2224,6 +1926,7 @@ declare module "node:test" {
|
|
|
2224
1926
|
* The `MockTracker` provides a top-level `timers` export
|
|
2225
1927
|
* which is a `MockTimers` instance.
|
|
2226
1928
|
* @since v20.4.0
|
|
1929
|
+
* @experimental
|
|
2227
1930
|
*/
|
|
2228
1931
|
interface MockTimers {
|
|
2229
1932
|
/**
|
|
@@ -2276,28 +1979,24 @@ declare module "node:test" {
|
|
|
2276
1979
|
*/
|
|
2277
1980
|
enable(options?: MockTimersOptions): void;
|
|
2278
1981
|
/**
|
|
2279
|
-
*
|
|
2280
|
-
*
|
|
2281
|
-
*
|
|
1982
|
+
* You can use the `.setTime()` method to manually move the mocked date to another time. This method only accepts a positive integer.
|
|
1983
|
+
* Note: This method will execute any mocked timers that are in the past from the new time.
|
|
1984
|
+
* In the below example we are setting a new time for the mocked date.
|
|
2282
1985
|
* ```js
|
|
2283
1986
|
* import assert from 'node:assert';
|
|
2284
1987
|
* import { test } from 'node:test';
|
|
2285
|
-
*
|
|
2286
|
-
*
|
|
2287
|
-
*
|
|
2288
|
-
*
|
|
2289
|
-
* //
|
|
2290
|
-
*
|
|
2291
|
-
*
|
|
2292
|
-
*
|
|
2293
|
-
* context.mock.timers.setTime(setTime);
|
|
2294
|
-
* // Date.now is now 1000
|
|
2295
|
-
* assert.strictEqual(Date.now(), setTime);
|
|
1988
|
+
* test('sets the time of a date object', (context) => {
|
|
1989
|
+
* // Optionally choose what to mock
|
|
1990
|
+
* context.mock.timers.enable({ apis: ['Date'], now: 100 });
|
|
1991
|
+
* assert.strictEqual(Date.now(), 100);
|
|
1992
|
+
* // Advance in time will also advance the date
|
|
1993
|
+
* context.mock.timers.setTime(1000);
|
|
1994
|
+
* context.mock.timers.tick(200);
|
|
1995
|
+
* assert.strictEqual(Date.now(), 1200);
|
|
2296
1996
|
* });
|
|
2297
1997
|
* ```
|
|
2298
|
-
* @since v21.2.0, v20.11.0
|
|
2299
1998
|
*/
|
|
2300
|
-
setTime(
|
|
1999
|
+
setTime(time: number): void;
|
|
2301
2000
|
/**
|
|
2302
2001
|
* This function restores the default behavior of all mocks that were previously
|
|
2303
2002
|
* created by this `MockTimers` instance and disassociates the mocks
|
|
@@ -2484,3 +2183,83 @@ declare module "node:test" {
|
|
|
2484
2183
|
}[keyof T];
|
|
2485
2184
|
export = test;
|
|
2486
2185
|
}
|
|
2186
|
+
|
|
2187
|
+
/**
|
|
2188
|
+
* The `node:test/reporters` module exposes the builtin-reporters for `node:test`.
|
|
2189
|
+
* To access it:
|
|
2190
|
+
*
|
|
2191
|
+
* ```js
|
|
2192
|
+
* import test from 'node:test/reporters';
|
|
2193
|
+
* ```
|
|
2194
|
+
*
|
|
2195
|
+
* This module is only available under the `node:` scheme. The following will not
|
|
2196
|
+
* work:
|
|
2197
|
+
*
|
|
2198
|
+
* ```js
|
|
2199
|
+
* import test from 'node:test/reporters';
|
|
2200
|
+
* ```
|
|
2201
|
+
* @since v19.9.0
|
|
2202
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/test/reporters.js)
|
|
2203
|
+
*/
|
|
2204
|
+
declare module "node:test/reporters" {
|
|
2205
|
+
import { Transform, TransformOptions } from "node:stream";
|
|
2206
|
+
import { EventData } from "node:test";
|
|
2207
|
+
|
|
2208
|
+
type TestEvent =
|
|
2209
|
+
| { type: "test:coverage"; data: EventData.TestCoverage }
|
|
2210
|
+
| { type: "test:complete"; data: EventData.TestComplete }
|
|
2211
|
+
| { type: "test:dequeue"; data: EventData.TestDequeue }
|
|
2212
|
+
| { type: "test:diagnostic"; data: EventData.TestDiagnostic }
|
|
2213
|
+
| { type: "test:enqueue"; data: EventData.TestEnqueue }
|
|
2214
|
+
| { type: "test:fail"; data: EventData.TestFail }
|
|
2215
|
+
| { type: "test:pass"; data: EventData.TestPass }
|
|
2216
|
+
| { type: "test:plan"; data: EventData.TestPlan }
|
|
2217
|
+
| { type: "test:start"; data: EventData.TestStart }
|
|
2218
|
+
| { type: "test:stderr"; data: EventData.TestStderr }
|
|
2219
|
+
| { type: "test:stdout"; data: EventData.TestStdout }
|
|
2220
|
+
| { type: "test:summary"; data: EventData.TestSummary }
|
|
2221
|
+
| { type: "test:watch:drained"; data: undefined };
|
|
2222
|
+
type TestEventGenerator = AsyncGenerator<TestEvent, void>;
|
|
2223
|
+
|
|
2224
|
+
interface ReporterConstructorWrapper<T extends new(...args: any[]) => Transform> {
|
|
2225
|
+
new(...args: ConstructorParameters<T>): InstanceType<T>;
|
|
2226
|
+
(...args: ConstructorParameters<T>): InstanceType<T>;
|
|
2227
|
+
}
|
|
2228
|
+
|
|
2229
|
+
/**
|
|
2230
|
+
* The `dot` reporter outputs the test results in a compact format,
|
|
2231
|
+
* where each passing test is represented by a `.`,
|
|
2232
|
+
* and each failing test is represented by a `X`.
|
|
2233
|
+
* @since v20.0.0
|
|
2234
|
+
*/
|
|
2235
|
+
function dot(source: TestEventGenerator): AsyncGenerator<"\n" | "." | "X", void>;
|
|
2236
|
+
/**
|
|
2237
|
+
* The `tap` reporter outputs the test results in the [TAP](https://testanything.org/) format.
|
|
2238
|
+
* @since v20.0.0
|
|
2239
|
+
*/
|
|
2240
|
+
function tap(source: TestEventGenerator): AsyncGenerator<string, void>;
|
|
2241
|
+
class SpecReporter extends Transform {
|
|
2242
|
+
constructor();
|
|
2243
|
+
}
|
|
2244
|
+
/**
|
|
2245
|
+
* The `spec` reporter outputs the test results in a human-readable format.
|
|
2246
|
+
* @since v20.0.0
|
|
2247
|
+
*/
|
|
2248
|
+
const spec: ReporterConstructorWrapper<typeof SpecReporter>;
|
|
2249
|
+
/**
|
|
2250
|
+
* The `junit` reporter outputs test results in a jUnit XML format.
|
|
2251
|
+
* @since v21.0.0
|
|
2252
|
+
*/
|
|
2253
|
+
function junit(source: TestEventGenerator): AsyncGenerator<string, void>;
|
|
2254
|
+
class LcovReporter extends Transform {
|
|
2255
|
+
constructor(opts?: Omit<TransformOptions, "writableObjectMode">);
|
|
2256
|
+
}
|
|
2257
|
+
/**
|
|
2258
|
+
* The `lcov` reporter outputs test coverage when used with the
|
|
2259
|
+
* [`--experimental-test-coverage`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--experimental-test-coverage) flag.
|
|
2260
|
+
* @since v22.0.0
|
|
2261
|
+
*/
|
|
2262
|
+
const lcov: LcovReporter;
|
|
2263
|
+
|
|
2264
|
+
export { dot, junit, lcov, spec, tap, TestEvent };
|
|
2265
|
+
}
|