@udibo/oauth2 0.14.1 → 0.15.0
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/README.md +45 -24
- package/{esm → dist}/adapters/hono/_common.d.ts +5 -5
- package/{esm → dist}/adapters/hono/_common.js +1 -1
- package/{esm → dist}/adapters/hono/authorization-server.d.ts +6 -7
- package/{esm → dist}/adapters/hono/authorization-server.js +0 -1
- package/{esm → dist}/adapters/hono/bff/auth-request-store.d.ts +2 -2
- package/{esm → dist}/adapters/hono/bff/auth-request-store.js +2 -2
- package/{esm → dist}/adapters/hono/bff/bff.d.ts +8 -8
- package/{esm → dist}/adapters/hono/bff/bff.js +31 -26
- package/{esm → dist}/adapters/hono/bff/cookie-prefix.js +1 -2
- package/{esm → dist}/adapters/hono/bff/mod.d.ts +5 -6
- package/{esm → dist}/adapters/hono/bff/mod.js +1 -2
- package/{esm → dist}/adapters/hono/bff/proxy.js +2 -1
- package/{esm → dist}/adapters/hono/bff/session-store.d.ts +2 -2
- package/{esm → dist}/adapters/hono/bff/session-store.js +7 -6
- package/{esm → dist}/adapters/hono/bff/testing.d.ts +7 -8
- package/{esm → dist}/adapters/hono/bff/testing.js +19 -22
- package/{esm → dist}/adapters/hono/identity.d.ts +1 -2
- package/{esm → dist}/adapters/hono/identity.js +10 -10
- package/{esm → dist}/adapters/hono/log.d.ts +0 -1
- package/{esm → dist}/adapters/hono/log.js +0 -6
- package/{esm → dist}/adapters/hono/resource-server.d.ts +5 -6
- package/{esm → dist}/adapters/hono/resource-server.js +0 -1
- package/dist/cli/bin.d.ts +2 -0
- package/dist/cli/bin.js +3 -0
- package/dist/cli/idp/config.d.ts +110 -0
- package/dist/cli/idp/config.js +269 -0
- package/dist/cli/idp/mod.d.ts +20 -0
- package/dist/cli/idp/mod.js +175 -0
- package/dist/cli/idp/pages.d.ts +56 -0
- package/dist/cli/idp/pages.js +190 -0
- package/dist/cli/idp/server.d.ts +93 -0
- package/dist/cli/idp/server.js +559 -0
- package/dist/cli/keygen.d.ts +13 -0
- package/dist/cli/keygen.js +30 -0
- package/dist/cli/mod.d.ts +34 -0
- package/dist/cli/mod.js +94 -0
- package/{esm → dist}/client/_http.d.ts +1 -1
- package/{esm → dist}/client/base.d.ts +1 -1
- package/{esm → dist}/client/bff-client.d.ts +1 -1
- package/{esm → dist}/client/bff-client.js +7 -6
- package/{esm → dist}/client/browser-storage.d.ts +1 -1
- package/{esm → dist}/client/check.js +1 -1
- package/{esm → dist}/client/direct-client.d.ts +6 -6
- package/{esm → dist}/client/direct-client.js +11 -13
- package/{esm → dist}/client/discovery-cache.d.ts +1 -1
- package/{esm → dist}/client/discovery-cache.js +2 -2
- package/{esm → dist}/client/events.d.ts +1 -1
- package/{esm → dist}/client/mod.d.ts +11 -12
- package/{esm → dist}/client/mod.js +1 -1
- package/{esm → dist}/errors.d.ts +1 -1
- package/{esm → dist}/errors.js +1 -1
- package/{esm → dist}/identity/events.d.ts +1 -1
- package/{esm → dist}/identity/external/_shared.d.ts +1 -1
- package/{esm → dist}/identity/external/_shared.js +1 -2
- package/{esm → dist}/identity/external/apple-client-secret.d.ts +1 -1
- package/{esm → dist}/identity/external/apple-client-secret.js +6 -7
- package/{esm → dist}/identity/external/apple.d.ts +5 -5
- package/{esm → dist}/identity/external/apple.js +10 -11
- package/{esm → dist}/identity/external/discord.d.ts +3 -3
- package/{esm → dist}/identity/external/discord.js +2 -2
- package/{esm → dist}/identity/external/flow.d.ts +1 -1
- package/{esm → dist}/identity/external/flow.js +2 -2
- package/{esm → dist}/identity/external/github.d.ts +3 -3
- package/{esm → dist}/identity/external/github.js +12 -17
- package/{esm → dist}/identity/external/google.d.ts +5 -5
- package/{esm → dist}/identity/external/google.js +2 -2
- package/{esm → dist}/identity/external/mod.d.ts +12 -13
- package/{esm → dist}/identity/external/mod.js +0 -1
- package/{esm → dist}/identity/external/oauth2.d.ts +1 -1
- package/{esm → dist}/identity/external/oauth2.js +8 -8
- package/{esm → dist}/identity/external/oidc.d.ts +4 -4
- package/{esm → dist}/identity/external/oidc.js +9 -8
- package/{esm → dist}/identity/hibp.d.ts +1 -1
- package/{esm → dist}/identity/hibp.js +1 -1
- package/{esm → dist}/identity/lockout.js +1 -2
- package/{esm → dist}/identity/mfa/mod.d.ts +4 -5
- package/{esm → dist}/identity/mfa/mod.js +1 -2
- package/{esm → dist}/identity/mfa/service.d.ts +3 -3
- package/{esm → dist}/identity/mfa/service.js +4 -3
- package/{esm → dist}/identity/mfa/totp.d.ts +1 -1
- package/{esm → dist}/identity/mfa/totp.js +2 -2
- package/{esm → dist}/identity/migration.d.ts +2 -3
- package/{esm → dist}/identity/migration.js +3 -4
- package/{esm → dist}/identity/mod.d.ts +14 -15
- package/{esm → dist}/identity/mod.js +0 -1
- package/{esm → dist}/identity/otp.d.ts +1 -1
- package/{esm → dist}/identity/otp.js +4 -2
- package/{esm → dist}/identity/password.js +8 -5
- package/{esm → dist}/identity/rate-limit.d.ts +1 -1
- package/{esm → dist}/identity/service.d.ts +10 -10
- package/{esm → dist}/identity/service.js +17 -18
- package/{esm → dist}/identity/session.js +2 -2
- package/{esm → dist}/identity/token-flow.js +3 -2
- package/{esm → dist}/models/authorization-code.d.ts +3 -3
- package/{esm → dist}/models/authorization.d.ts +1 -1
- package/{esm → dist}/models/authorization.js +1 -2
- package/{esm → dist}/models/device-authorization.d.ts +2 -2
- package/{esm → dist}/models/token.d.ts +3 -3
- package/{esm → dist}/react/callback.d.ts +1 -1
- package/{esm → dist}/react/callback.js +0 -1
- package/{esm → dist}/react/components/class-names.d.ts +1 -1
- package/{esm → dist}/react/components/class-names.js +3 -2
- package/{esm → dist}/react/components/internal.d.ts +2 -2
- package/{esm → dist}/react/components/internal.js +5 -11
- package/{esm → dist}/react/components/mfa-challenge-form.d.ts +2 -2
- package/{esm → dist}/react/components/mfa-challenge-form.js +4 -6
- package/{esm → dist}/react/components/mfa-enrollment-form.d.ts +2 -2
- package/{esm → dist}/react/components/mfa-enrollment-form.js +2 -6
- package/{esm → dist}/react/components/mod.d.ts +20 -21
- package/{esm → dist}/react/components/mod.js +1 -2
- package/{esm → dist}/react/components/request-password-reset-form.d.ts +2 -2
- package/{esm → dist}/react/components/request-password-reset-form.js +1 -3
- package/{esm → dist}/react/components/reset-password-form.d.ts +2 -2
- package/{esm → dist}/react/components/reset-password-form.js +2 -2
- package/{esm → dist}/react/components/sign-in-form.d.ts +2 -2
- package/{esm → dist}/react/components/sign-in-form.js +1 -5
- package/{esm → dist}/react/components/sign-up-form.d.ts +2 -2
- package/{esm → dist}/react/components/sign-up-form.js +4 -10
- package/{esm → dist}/react/components/types.d.ts +2 -2
- package/{esm → dist}/react/components/use-auth-form.d.ts +3 -3
- package/{esm → dist}/react/components/use-auth-form.js +4 -7
- package/{esm → dist}/react/components/user-menu.d.ts +2 -2
- package/{esm → dist}/react/components/user-menu.js +9 -14
- package/{esm → dist}/react/context.d.ts +1 -1
- package/{esm → dist}/react/mod.d.ts +6 -7
- package/{esm → dist}/react/mod.js +0 -1
- package/{esm → dist}/react/provider.d.ts +2 -2
- package/{esm → dist}/react/require-auth.js +1 -3
- package/{esm → dist}/react/testing.d.ts +2 -3
- package/{esm → dist}/react/testing.js +1 -2
- package/{esm → dist}/react/use-authorization.d.ts +1 -1
- package/{esm → dist}/react/use-oauth2.d.ts +8 -1
- package/{esm → dist}/react/use-oauth2.js +0 -1
- package/{esm → dist}/server/_clock-skew.js +2 -1
- package/{esm → dist}/server/authorization-server.d.ts +40 -41
- package/{esm → dist}/server/authorization-server.js +32 -42
- package/{esm → dist}/server/client-authentication.d.ts +2 -2
- package/{esm → dist}/server/grants/authorization-code.d.ts +9 -9
- package/{esm → dist}/server/grants/authorization-code.js +5 -6
- package/{esm → dist}/server/grants/client-credentials.d.ts +4 -4
- package/{esm → dist}/server/grants/device-authorization.d.ts +6 -6
- package/{esm → dist}/server/grants/device-authorization.js +4 -4
- package/{esm → dist}/server/grants/grant.d.ts +7 -7
- package/{esm → dist}/server/grants/grant.js +7 -7
- package/{esm → dist}/server/grants/password.d.ts +5 -5
- package/{esm → dist}/server/grants/refresh-token.d.ts +4 -4
- package/{esm → dist}/server/grants/refresh-token.js +5 -6
- package/{esm → dist}/server/introspection-token-reader.d.ts +5 -5
- package/{esm → dist}/server/introspection-token-reader.js +4 -4
- package/{esm → dist}/server/jwks-token-reader.d.ts +5 -5
- package/{esm → dist}/server/jwks-token-reader.js +4 -4
- package/{esm → dist}/server/mod.d.ts +12 -13
- package/{esm → dist}/server/mod.js +0 -1
- package/{esm → dist}/server/public-suffix/mod.d.ts +2 -3
- package/{esm → dist}/server/public-suffix/mod.js +1 -2
- package/{esm → dist}/server/public-suffix/rules.d.ts +1 -1
- package/{esm → dist}/server/public-suffix/rules.js +1 -1
- package/{esm → dist}/server/redirect-uri.js +5 -4
- package/{esm → dist}/server/resource-server.d.ts +11 -12
- package/{esm → dist}/server/resource-server.js +12 -14
- package/{esm → dist}/server/services/authorization-code.d.ts +5 -5
- package/{esm → dist}/server/services/client.d.ts +1 -1
- package/{esm → dist}/server/services/device-authorization.d.ts +3 -3
- package/{esm → dist}/server/services/token.d.ts +6 -6
- package/{esm → dist}/server/services/token.js +3 -1
- package/{esm → dist}/server/services/user.d.ts +1 -1
- package/{esm → dist}/server/signing-keys.d.ts +1 -1
- package/{esm → dist}/server/signing-keys.js +8 -2
- package/{esm → dist}/server/utils/hash.js +1 -1
- package/{esm → dist}/testing/contract/auth-request-storage.d.ts +1 -1
- package/{esm → dist}/testing/contract/auth-request-storage.js +24 -29
- package/{esm → dist}/testing/contract/authorization-code.d.ts +6 -6
- package/{esm → dist}/testing/contract/authorization-code.js +16 -17
- package/{esm → dist}/testing/contract/client.d.ts +4 -4
- package/{esm → dist}/testing/contract/client.js +14 -15
- package/{esm → dist}/testing/contract/device-authorization.d.ts +6 -6
- package/{esm → dist}/testing/contract/device-authorization.js +37 -39
- package/{esm → dist}/testing/contract/identity-session.d.ts +6 -1
- package/{esm → dist}/testing/contract/identity-session.js +44 -36
- package/{esm → dist}/testing/contract/identity-user-store.d.ts +8 -2
- package/{esm → dist}/testing/contract/identity-user-store.js +48 -46
- package/{esm → dist}/testing/contract/lockout-store.d.ts +1 -1
- package/{esm → dist}/testing/contract/lockout-store.js +23 -24
- package/{esm → dist}/testing/contract/mfa-store.d.ts +1 -1
- package/{esm → dist}/testing/contract/mfa-store.js +53 -54
- package/{esm → dist}/testing/contract/mod.d.ts +15 -16
- package/{esm → dist}/testing/contract/mod.js +0 -1
- package/{esm → dist}/testing/contract/otp-store.d.ts +1 -1
- package/{esm → dist}/testing/contract/otp-store.js +33 -34
- package/{esm → dist}/testing/contract/rate-limit-store.d.ts +1 -1
- package/{esm → dist}/testing/contract/rate-limit-store.js +15 -16
- package/{esm → dist}/testing/contract/tenant.js +361 -330
- package/{esm → dist}/testing/contract/token-flow-store.d.ts +1 -1
- package/{esm → dist}/testing/contract/token-flow-store.js +27 -32
- package/{esm → dist}/testing/contract/token-reader.d.ts +3 -3
- package/{esm → dist}/testing/contract/token-reader.js +6 -7
- package/{esm → dist}/testing/contract/token.d.ts +7 -7
- package/{esm → dist}/testing/contract/token.js +48 -53
- package/{esm → dist}/testing/contract/user.d.ts +2 -2
- package/{esm → dist}/testing/contract/user.js +8 -9
- package/{esm → dist}/testing/mod.d.ts +5 -6
- package/{esm → dist}/testing/mod.js +2 -3
- package/{esm → dist}/testing/server.d.ts +7 -6
- package/{esm → dist}/testing/server.js +2 -1
- package/{esm → dist}/testing/services.d.ts +11 -11
- package/{esm → dist}/testing/services.js +8 -8
- package/{esm → dist}/testing/tenant.d.ts +11 -7
- package/{esm → dist}/testing/tenant.js +109 -94
- package/dist/utils/_constant-time.d.ts +12 -0
- package/dist/utils/_constant-time.js +19 -0
- package/{esm → dist}/utils/_default-fetch.js +4 -1
- package/dist/utils/_delay.d.ts +13 -0
- package/dist/utils/_delay.js +28 -0
- package/dist/utils/_encoding.d.ts +39 -0
- package/dist/utils/_encoding.js +126 -0
- package/{esm → dist}/utils/authentication-context.d.ts +1 -1
- package/{esm → dist}/utils/crypto.d.ts +2 -3
- package/{esm → dist}/utils/crypto.js +3 -4
- package/{esm → dist}/utils/pkce.js +1 -1
- package/{esm → dist}/utils/text.js +1 -1
- package/{esm → dist}/utils/url.d.ts +0 -1
- package/{esm → dist}/utils/url.js +0 -1
- package/package.json +156 -33
- package/esm/_dnt.polyfills.d.ts +0 -31
- package/esm/_dnt.polyfills.js +0 -26
- package/esm/deps/jsr.io/@std/assert/1.0.19/almost_equals.d.ts +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.19/almost_equals.js +0 -47
- package/esm/deps/jsr.io/@std/assert/1.0.19/array_includes.d.ts +0 -28
- package/esm/deps/jsr.io/@std/assert/1.0.19/array_includes.js +0 -65
- package/esm/deps/jsr.io/@std/assert/1.0.19/assert.d.ts +0 -16
- package/esm/deps/jsr.io/@std/assert/1.0.19/assert.js +0 -23
- package/esm/deps/jsr.io/@std/assert/1.0.19/assertion_error.d.ts +0 -25
- package/esm/deps/jsr.io/@std/assert/1.0.19/assertion_error.js +0 -30
- package/esm/deps/jsr.io/@std/assert/1.0.19/equal.d.ts +0 -24
- package/esm/deps/jsr.io/@std/assert/1.0.19/equal.js +0 -193
- package/esm/deps/jsr.io/@std/assert/1.0.19/equals.d.ts +0 -36
- package/esm/deps/jsr.io/@std/assert/1.0.19/equals.js +0 -61
- package/esm/deps/jsr.io/@std/assert/1.0.19/exists.d.ts +0 -17
- package/esm/deps/jsr.io/@std/assert/1.0.19/exists.js +0 -27
- package/esm/deps/jsr.io/@std/assert/1.0.19/fail.d.ts +0 -14
- package/esm/deps/jsr.io/@std/assert/1.0.19/fail.js +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.19/false.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.19/false.js +0 -23
- package/esm/deps/jsr.io/@std/assert/1.0.19/greater.d.ts +0 -19
- package/esm/deps/jsr.io/@std/assert/1.0.19/greater.js +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.19/greater_or_equal.d.ts +0 -19
- package/esm/deps/jsr.io/@std/assert/1.0.19/greater_or_equal.js +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.19/instance_of.d.ts +0 -22
- package/esm/deps/jsr.io/@std/assert/1.0.19/instance_of.js +0 -52
- package/esm/deps/jsr.io/@std/assert/1.0.19/is_error.d.ts +0 -24
- package/esm/deps/jsr.io/@std/assert/1.0.19/is_error.js +0 -53
- package/esm/deps/jsr.io/@std/assert/1.0.19/less.d.ts +0 -18
- package/esm/deps/jsr.io/@std/assert/1.0.19/less.js +0 -28
- package/esm/deps/jsr.io/@std/assert/1.0.19/less_or_equal.d.ts +0 -19
- package/esm/deps/jsr.io/@std/assert/1.0.19/less_or_equal.js +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.19/match.d.ts +0 -17
- package/esm/deps/jsr.io/@std/assert/1.0.19/match.js +0 -26
- package/esm/deps/jsr.io/@std/assert/1.0.19/mod.d.ts +0 -43
- package/esm/deps/jsr.io/@std/assert/1.0.19/mod.js +0 -45
- package/esm/deps/jsr.io/@std/assert/1.0.19/not_equals.d.ts +0 -26
- package/esm/deps/jsr.io/@std/assert/1.0.19/not_equals.js +0 -39
- package/esm/deps/jsr.io/@std/assert/1.0.19/not_instance_of.d.ts +0 -19
- package/esm/deps/jsr.io/@std/assert/1.0.19/not_instance_of.js +0 -29
- package/esm/deps/jsr.io/@std/assert/1.0.19/not_match.d.ts +0 -17
- package/esm/deps/jsr.io/@std/assert/1.0.19/not_match.js +0 -26
- package/esm/deps/jsr.io/@std/assert/1.0.19/not_strict_equals.d.ts +0 -22
- package/esm/deps/jsr.io/@std/assert/1.0.19/not_strict_equals.js +0 -32
- package/esm/deps/jsr.io/@std/assert/1.0.19/object_match.d.ts +0 -28
- package/esm/deps/jsr.io/@std/assert/1.0.19/object_match.js +0 -177
- package/esm/deps/jsr.io/@std/assert/1.0.19/rejects.d.ts +0 -41
- package/esm/deps/jsr.io/@std/assert/1.0.19/rejects.js +0 -53
- package/esm/deps/jsr.io/@std/assert/1.0.19/strict_equals.d.ts +0 -23
- package/esm/deps/jsr.io/@std/assert/1.0.19/strict_equals.js +0 -58
- package/esm/deps/jsr.io/@std/assert/1.0.19/string_includes.d.ts +0 -17
- package/esm/deps/jsr.io/@std/assert/1.0.19/string_includes.js +0 -26
- package/esm/deps/jsr.io/@std/assert/1.0.19/throws.d.ts +0 -44
- package/esm/deps/jsr.io/@std/assert/1.0.19/throws.js +0 -44
- package/esm/deps/jsr.io/@std/assert/1.0.19/unimplemented.d.ts +0 -14
- package/esm/deps/jsr.io/@std/assert/1.0.19/unimplemented.js +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.19/unreachable.d.ts +0 -14
- package/esm/deps/jsr.io/@std/assert/1.0.19/unreachable.js +0 -20
- package/esm/deps/jsr.io/@std/async/1.5.0/delay.d.ts +0 -44
- package/esm/deps/jsr.io/@std/async/1.5.0/delay.js +0 -84
- package/esm/deps/jsr.io/@std/crypto/1.1.0/timing_safe_equal.d.ts +0 -39
- package/esm/deps/jsr.io/@std/crypto/1.1.0/timing_safe_equal.js +0 -61
- package/esm/deps/jsr.io/@std/encoding/1.0.11/_common16.d.ts +0 -22
- package/esm/deps/jsr.io/@std/encoding/1.0.11/_common16.js +0 -51
- package/esm/deps/jsr.io/@std/encoding/1.0.11/_common32.d.ts +0 -34
- package/esm/deps/jsr.io/@std/encoding/1.0.11/_common32.js +0 -192
- package/esm/deps/jsr.io/@std/encoding/1.0.11/_common64.d.ts +0 -34
- package/esm/deps/jsr.io/@std/encoding/1.0.11/_common64.js +0 -113
- package/esm/deps/jsr.io/@std/encoding/1.0.11/_common_detach.d.ts +0 -3
- package/esm/deps/jsr.io/@std/encoding/1.0.11/_common_detach.js +0 -13
- package/esm/deps/jsr.io/@std/encoding/1.0.11/_types.d.ts +0 -8
- package/esm/deps/jsr.io/@std/encoding/1.0.11/_types.js +0 -2
- package/esm/deps/jsr.io/@std/encoding/1.0.11/_validate_binary_like.d.ts +0 -1
- package/esm/deps/jsr.io/@std/encoding/1.0.11/_validate_binary_like.js +0 -26
- package/esm/deps/jsr.io/@std/encoding/1.0.11/ascii85.d.ts +0 -60
- package/esm/deps/jsr.io/@std/encoding/1.0.11/ascii85.js +0 -152
- package/esm/deps/jsr.io/@std/encoding/1.0.11/base32.d.ts +0 -39
- package/esm/deps/jsr.io/@std/encoding/1.0.11/base32.js +0 -87
- package/esm/deps/jsr.io/@std/encoding/1.0.11/base58.d.ts +0 -39
- package/esm/deps/jsr.io/@std/encoding/1.0.11/base58.js +0 -131
- package/esm/deps/jsr.io/@std/encoding/1.0.11/base64.d.ts +0 -39
- package/esm/deps/jsr.io/@std/encoding/1.0.11/base64.js +0 -82
- package/esm/deps/jsr.io/@std/encoding/1.0.11/base64url.d.ts +0 -39
- package/esm/deps/jsr.io/@std/encoding/1.0.11/base64url.js +0 -72
- package/esm/deps/jsr.io/@std/encoding/1.0.11/hex.d.ts +0 -38
- package/esm/deps/jsr.io/@std/encoding/1.0.11/hex.js +0 -87
- package/esm/deps/jsr.io/@std/encoding/1.0.11/mod.d.ts +0 -97
- package/esm/deps/jsr.io/@std/encoding/1.0.11/mod.js +0 -99
- package/esm/deps/jsr.io/@std/encoding/1.0.11/varint.d.ts +0 -119
- package/esm/deps/jsr.io/@std/encoding/1.0.11/varint.js +0 -209
- package/esm/deps/jsr.io/@std/http/1.1.3/status.d.ts +0 -343
- package/esm/deps/jsr.io/@std/http/1.1.3/status.js +0 -343
- package/esm/deps/jsr.io/@std/internal/1.0.14/assertion_state.d.ts +0 -159
- package/esm/deps/jsr.io/@std/internal/1.0.14/assertion_state.js +0 -223
- package/esm/deps/jsr.io/@std/internal/1.0.14/build_message.d.ts +0 -79
- package/esm/deps/jsr.io/@std/internal/1.0.14/build_message.js +0 -116
- package/esm/deps/jsr.io/@std/internal/1.0.14/diff.d.ts +0 -139
- package/esm/deps/jsr.io/@std/internal/1.0.14/diff.js +0 -277
- package/esm/deps/jsr.io/@std/internal/1.0.14/diff_str.d.ts +0 -98
- package/esm/deps/jsr.io/@std/internal/1.0.14/diff_str.js +0 -181
- package/esm/deps/jsr.io/@std/internal/1.0.14/format.d.ts +0 -29
- package/esm/deps/jsr.io/@std/internal/1.0.14/format.js +0 -68
- package/esm/deps/jsr.io/@std/internal/1.0.14/styles.d.ts +0 -158
- package/esm/deps/jsr.io/@std/internal/1.0.14/styles.js +0 -206
- package/esm/deps/jsr.io/@std/internal/1.0.14/types.d.ts +0 -24
- package/esm/deps/jsr.io/@std/internal/1.0.14/types.js +0 -3
- package/esm/deps/jsr.io/@std/testing/1.0.20/_test_suite.d.ts +0 -91
- package/esm/deps/jsr.io/@std/testing/1.0.20/_test_suite.js +0 -347
- package/esm/deps/jsr.io/@std/testing/1.0.20/bdd.d.ts +0 -382
- package/esm/deps/jsr.io/@std/testing/1.0.20/bdd.js +0 -1110
- package/esm/deps/jsr.io/@udibo/http-error/0.11.1/mod.d.ts +0 -363
- package/esm/deps/jsr.io/@udibo/http-error/0.11.1/mod.js +0 -616
- package/esm/package.json +0 -3
- /package/{esm → dist}/adapters/hono/bff/cookie-prefix.d.ts +0 -0
- /package/{esm → dist}/adapters/hono/bff/proxy.d.ts +0 -0
- /package/{esm → dist}/client/_http.js +0 -0
- /package/{esm → dist}/client/base.js +0 -0
- /package/{esm → dist}/client/browser-storage.js +0 -0
- /package/{esm → dist}/client/check.d.ts +0 -0
- /package/{esm → dist}/client/events.js +0 -0
- /package/{esm → dist}/client/storage.d.ts +0 -0
- /package/{esm → dist}/client/storage.js +0 -0
- /package/{esm → dist}/identity/captcha.d.ts +0 -0
- /package/{esm → dist}/identity/captcha.js +0 -0
- /package/{esm → dist}/identity/delivery.d.ts +0 -0
- /package/{esm → dist}/identity/delivery.js +0 -0
- /package/{esm → dist}/identity/errors.d.ts +0 -0
- /package/{esm → dist}/identity/errors.js +0 -0
- /package/{esm → dist}/identity/events.js +0 -0
- /package/{esm → dist}/identity/external/_token-exchange.d.ts +0 -0
- /package/{esm → dist}/identity/external/_token-exchange.js +0 -0
- /package/{esm → dist}/identity/external/errors.d.ts +0 -0
- /package/{esm → dist}/identity/external/errors.js +0 -0
- /package/{esm → dist}/identity/external/provider.d.ts +0 -0
- /package/{esm → dist}/identity/external/provider.js +0 -0
- /package/{esm → dist}/identity/identifier.d.ts +0 -0
- /package/{esm → dist}/identity/identifier.js +0 -0
- /package/{esm → dist}/identity/lockout.d.ts +0 -0
- /package/{esm → dist}/identity/mfa/recovery-codes.d.ts +0 -0
- /package/{esm → dist}/identity/mfa/recovery-codes.js +0 -0
- /package/{esm → dist}/identity/password-policy.d.ts +0 -0
- /package/{esm → dist}/identity/password-policy.js +0 -0
- /package/{esm → dist}/identity/password.d.ts +0 -0
- /package/{esm → dist}/identity/rate-limit.js +0 -0
- /package/{esm → dist}/identity/session.d.ts +0 -0
- /package/{esm → dist}/identity/token-flow.d.ts +0 -0
- /package/{esm → dist}/models/authentication.d.ts +0 -0
- /package/{esm → dist}/models/authentication.js +0 -0
- /package/{esm → dist}/models/authorization-code.js +0 -0
- /package/{esm → dist}/models/client.d.ts +0 -0
- /package/{esm → dist}/models/client.js +0 -0
- /package/{esm → dist}/models/device-authorization.js +0 -0
- /package/{esm → dist}/models/responses.d.ts +0 -0
- /package/{esm → dist}/models/responses.js +0 -0
- /package/{esm → dist}/models/scope.d.ts +0 -0
- /package/{esm → dist}/models/scope.js +0 -0
- /package/{esm → dist}/models/token.js +0 -0
- /package/{esm → dist}/react/components/types.js +0 -0
- /package/{esm → dist}/react/context.js +0 -0
- /package/{esm → dist}/react/provider.js +0 -0
- /package/{esm → dist}/react/require-auth.d.ts +0 -0
- /package/{esm → dist}/react/use-authorization.js +0 -0
- /package/{esm → dist}/server/_clock-skew.d.ts +0 -0
- /package/{esm → dist}/server/client-authentication.js +0 -0
- /package/{esm → dist}/server/grants/client-credentials.js +0 -0
- /package/{esm → dist}/server/grants/password.js +0 -0
- /package/{esm → dist}/server/redirect-uri.d.ts +0 -0
- /package/{esm → dist}/server/services/authorization-code.js +0 -0
- /package/{esm → dist}/server/services/client.js +0 -0
- /package/{esm → dist}/server/services/device-authorization.js +0 -0
- /package/{esm → dist}/server/services/user.js +0 -0
- /package/{esm → dist}/server/utils/hash.d.ts +0 -0
- /package/{esm → dist}/testing/contract/_race.d.ts +0 -0
- /package/{esm → dist}/testing/contract/_race.js +0 -0
- /package/{esm → dist}/testing/contract/tenant.d.ts +0 -0
- /package/{esm → dist}/utils/_body.d.ts +0 -0
- /package/{esm → dist}/utils/_body.js +0 -0
- /package/{esm → dist}/utils/_buffer.d.ts +0 -0
- /package/{esm → dist}/utils/_buffer.js +0 -0
- /package/{esm → dist}/utils/_default-fetch.d.ts +0 -0
- /package/{esm → dist}/utils/_timing-safe.d.ts +0 -0
- /package/{esm → dist}/utils/_timing-safe.js +0 -0
- /package/{esm → dist}/utils/authentication-context.js +0 -0
- /package/{esm → dist}/utils/basic-auth.d.ts +0 -0
- /package/{esm → dist}/utils/basic-auth.js +0 -0
- /package/{esm → dist}/utils/pkce.d.ts +0 -0
- /package/{esm → dist}/utils/text.d.ts +0 -0
|
@@ -1,347 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2026 the Deno authors. MIT license.
|
|
2
|
-
import { getAssertionState } from "../../internal/1.0.14/assertion_state.js";
|
|
3
|
-
import { AssertionError } from "../../assert/1.0.19/assertion_error.js";
|
|
4
|
-
export const globalSanitizersState = {
|
|
5
|
-
sanitizeExit: undefined,
|
|
6
|
-
sanitizeOps: undefined,
|
|
7
|
-
sanitizeResources: undefined,
|
|
8
|
-
};
|
|
9
|
-
const assertionState = getAssertionState();
|
|
10
|
-
/**
|
|
11
|
-
* An internal representation of a group of tests.
|
|
12
|
-
*/
|
|
13
|
-
export class TestSuiteInternal {
|
|
14
|
-
symbol;
|
|
15
|
-
describe;
|
|
16
|
-
steps;
|
|
17
|
-
hasOnlyStep;
|
|
18
|
-
#registeredOptions;
|
|
19
|
-
constructor(describe) {
|
|
20
|
-
this.describe = describe;
|
|
21
|
-
this.steps = [];
|
|
22
|
-
this.hasOnlyStep = false;
|
|
23
|
-
const { suite } = describe;
|
|
24
|
-
if (suite && !TestSuiteInternal.suites.has(suite.symbol)) {
|
|
25
|
-
throw new Error("Cannot construct Test Suite: suite does not represent a registered test suite");
|
|
26
|
-
}
|
|
27
|
-
const testSuite = suite
|
|
28
|
-
? TestSuiteInternal.suites.get(suite.symbol)
|
|
29
|
-
: TestSuiteInternal.current;
|
|
30
|
-
this.symbol = Symbol();
|
|
31
|
-
TestSuiteInternal.suites.set(this.symbol, this);
|
|
32
|
-
const { fn, ignore } = describe;
|
|
33
|
-
if (ignore) {
|
|
34
|
-
const { name, only, permissions, sanitizeExit = globalSanitizersState.sanitizeExit, sanitizeOps = globalSanitizersState.sanitizeOps, sanitizeResources = globalSanitizersState.sanitizeResources, } = describe;
|
|
35
|
-
const options = {
|
|
36
|
-
name,
|
|
37
|
-
fn: async () => { },
|
|
38
|
-
ignore: true,
|
|
39
|
-
};
|
|
40
|
-
if (only !== undefined) {
|
|
41
|
-
options.only = only;
|
|
42
|
-
}
|
|
43
|
-
if (permissions !== undefined) {
|
|
44
|
-
options.permissions = permissions;
|
|
45
|
-
}
|
|
46
|
-
if (sanitizeExit !== undefined) {
|
|
47
|
-
options.sanitizeExit = sanitizeExit;
|
|
48
|
-
}
|
|
49
|
-
if (sanitizeOps !== undefined) {
|
|
50
|
-
options.sanitizeOps = sanitizeOps;
|
|
51
|
-
}
|
|
52
|
-
if (sanitizeResources !== undefined) {
|
|
53
|
-
options.sanitizeResources = sanitizeResources;
|
|
54
|
-
}
|
|
55
|
-
TestSuiteInternal.registerTest(options);
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
if (fn) {
|
|
59
|
-
const temp = TestSuiteInternal.current;
|
|
60
|
-
TestSuiteInternal.current = this;
|
|
61
|
-
try {
|
|
62
|
-
// deno-lint-ignore no-explicit-any
|
|
63
|
-
const value = fn();
|
|
64
|
-
if (value instanceof Promise) {
|
|
65
|
-
throw new Error('Returning a Promise from "describe" is not supported: tests must be defined synchronously');
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
finally {
|
|
69
|
-
TestSuiteInternal.current = temp;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
if (testSuite) {
|
|
73
|
-
TestSuiteInternal.addStep(testSuite, this);
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
const { name, ignore, permissions, sanitizeExit = globalSanitizersState.sanitizeExit, sanitizeOps = globalSanitizersState.sanitizeOps, sanitizeResources = globalSanitizersState.sanitizeResources, } = describe;
|
|
77
|
-
let { only } = describe;
|
|
78
|
-
if (!ignore && this.hasOnlyStep) {
|
|
79
|
-
only = true;
|
|
80
|
-
}
|
|
81
|
-
const options = {
|
|
82
|
-
name,
|
|
83
|
-
fn: async (t) => {
|
|
84
|
-
TestSuiteInternal.runningCount++;
|
|
85
|
-
try {
|
|
86
|
-
const context = {};
|
|
87
|
-
const { beforeAll } = this.describe;
|
|
88
|
-
if (typeof beforeAll === "function") {
|
|
89
|
-
await beforeAll.call(context);
|
|
90
|
-
}
|
|
91
|
-
else if (beforeAll) {
|
|
92
|
-
for (const hook of beforeAll) {
|
|
93
|
-
await hook.call(context);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
try {
|
|
97
|
-
TestSuiteInternal.active.push(this.symbol);
|
|
98
|
-
await TestSuiteInternal.run(this, context, t);
|
|
99
|
-
}
|
|
100
|
-
finally {
|
|
101
|
-
TestSuiteInternal.active.pop();
|
|
102
|
-
const { afterAll } = this.describe;
|
|
103
|
-
if (typeof afterAll === "function") {
|
|
104
|
-
await afterAll.call(context);
|
|
105
|
-
}
|
|
106
|
-
else if (afterAll) {
|
|
107
|
-
for (const hook of afterAll) {
|
|
108
|
-
await hook.call(context);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
finally {
|
|
114
|
-
TestSuiteInternal.runningCount--;
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
};
|
|
118
|
-
if (ignore !== undefined) {
|
|
119
|
-
options.ignore = ignore;
|
|
120
|
-
}
|
|
121
|
-
if (only !== undefined) {
|
|
122
|
-
options.only = only;
|
|
123
|
-
}
|
|
124
|
-
if (permissions !== undefined) {
|
|
125
|
-
options.permissions = permissions;
|
|
126
|
-
}
|
|
127
|
-
if (sanitizeExit !== undefined) {
|
|
128
|
-
options.sanitizeExit = sanitizeExit;
|
|
129
|
-
}
|
|
130
|
-
if (sanitizeOps !== undefined) {
|
|
131
|
-
options.sanitizeOps = sanitizeOps;
|
|
132
|
-
}
|
|
133
|
-
if (sanitizeResources !== undefined) {
|
|
134
|
-
options.sanitizeResources = sanitizeResources;
|
|
135
|
-
}
|
|
136
|
-
this.#registeredOptions = TestSuiteInternal.registerTest(options);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
/** Stores how many test suites are executing. */
|
|
140
|
-
static runningCount = 0;
|
|
141
|
-
/** If a test has been registered yet. Block adding global hooks if a test has been registered. */
|
|
142
|
-
static started = false;
|
|
143
|
-
/** A map of all test suites by symbol. */
|
|
144
|
-
// deno-lint-ignore no-explicit-any
|
|
145
|
-
static suites = new Map();
|
|
146
|
-
/** The current test suite being registered. */
|
|
147
|
-
// deno-lint-ignore no-explicit-any
|
|
148
|
-
static current = null;
|
|
149
|
-
/** The stack of tests that are actively running. */
|
|
150
|
-
static active = [];
|
|
151
|
-
/** This is used internally for testing this module. */
|
|
152
|
-
static reset() {
|
|
153
|
-
TestSuiteInternal.runningCount = 0;
|
|
154
|
-
TestSuiteInternal.started = false;
|
|
155
|
-
TestSuiteInternal.current = null;
|
|
156
|
-
TestSuiteInternal.active = [];
|
|
157
|
-
}
|
|
158
|
-
/** This is used internally to register tests. */
|
|
159
|
-
static registerTest(options) {
|
|
160
|
-
options = { ...options };
|
|
161
|
-
if (options.only === undefined) {
|
|
162
|
-
delete options.only;
|
|
163
|
-
}
|
|
164
|
-
if (options.permissions === undefined) {
|
|
165
|
-
delete options.permissions;
|
|
166
|
-
}
|
|
167
|
-
if (options.ignore === undefined) {
|
|
168
|
-
delete options.ignore;
|
|
169
|
-
}
|
|
170
|
-
if (options.sanitizeExit === undefined) {
|
|
171
|
-
delete options.sanitizeExit;
|
|
172
|
-
}
|
|
173
|
-
if (options.sanitizeOps === undefined) {
|
|
174
|
-
delete options.sanitizeOps;
|
|
175
|
-
}
|
|
176
|
-
if (options.sanitizeResources === undefined) {
|
|
177
|
-
delete options.sanitizeResources;
|
|
178
|
-
}
|
|
179
|
-
Deno.test(options);
|
|
180
|
-
return options;
|
|
181
|
-
}
|
|
182
|
-
/** Updates all steps within top level suite to have ignore set to true if only is not set to true on step. */
|
|
183
|
-
static addingOnlyStep(suite) {
|
|
184
|
-
if (!suite.hasOnlyStep) {
|
|
185
|
-
for (let i = 0; i < suite.steps.length; i++) {
|
|
186
|
-
const step = suite.steps[i];
|
|
187
|
-
if (!(step instanceof TestSuiteInternal) && !step.only) {
|
|
188
|
-
suite.steps.splice(i--, 1);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
suite.hasOnlyStep = true;
|
|
192
|
-
}
|
|
193
|
-
const parentSuite = suite.describe.suite;
|
|
194
|
-
const parentTestSuite = parentSuite &&
|
|
195
|
-
TestSuiteInternal.suites.get(parentSuite.symbol);
|
|
196
|
-
if (parentTestSuite) {
|
|
197
|
-
TestSuiteInternal.addingOnlyStep(parentTestSuite);
|
|
198
|
-
}
|
|
199
|
-
// If this suite was already registered with Deno.test (e.g. a global
|
|
200
|
-
// suite created by beforeAll), retroactively mark it as only.
|
|
201
|
-
if (suite.#registeredOptions) {
|
|
202
|
-
suite.#registeredOptions.only = true;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
/** This is used internally to add steps to a test suite. */
|
|
206
|
-
static addStep(suite, step) {
|
|
207
|
-
if (!suite.hasOnlyStep) {
|
|
208
|
-
if (step instanceof TestSuiteInternal) {
|
|
209
|
-
if (step.hasOnlyStep || step.describe.only) {
|
|
210
|
-
TestSuiteInternal.addingOnlyStep(suite);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
else {
|
|
214
|
-
if (step.only)
|
|
215
|
-
TestSuiteInternal.addingOnlyStep(suite);
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
if (!(suite.hasOnlyStep && !(step instanceof TestSuiteInternal) && !step.only)) {
|
|
219
|
-
suite.steps.push(step);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
/** This is used internally to add hooks to a test suite. */
|
|
223
|
-
static setHook(suite, name, fn) {
|
|
224
|
-
if (suite.describe[name]) {
|
|
225
|
-
if (typeof suite.describe[name] === "function") {
|
|
226
|
-
suite.describe[name] = [
|
|
227
|
-
suite.describe[name],
|
|
228
|
-
];
|
|
229
|
-
}
|
|
230
|
-
suite.describe[name].push(fn);
|
|
231
|
-
}
|
|
232
|
-
else {
|
|
233
|
-
suite.describe[name] = fn;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
/** This is used internally to run all steps for a test suite. */
|
|
237
|
-
static async run(suite, context, t) {
|
|
238
|
-
const hasOnly = suite.hasOnlyStep || suite.describe.only || false;
|
|
239
|
-
for (const step of suite.steps) {
|
|
240
|
-
if (hasOnly && step instanceof TestSuiteInternal &&
|
|
241
|
-
!(step.hasOnlyStep || step.describe.only || false)) {
|
|
242
|
-
continue;
|
|
243
|
-
}
|
|
244
|
-
const { name, fn, ignore, permissions, sanitizeExit = globalSanitizersState.sanitizeExit, sanitizeOps = globalSanitizersState.sanitizeOps, sanitizeResources = globalSanitizersState.sanitizeResources, } = step instanceof TestSuiteInternal ? step.describe : step;
|
|
245
|
-
const options = {
|
|
246
|
-
name,
|
|
247
|
-
fn: async (t) => {
|
|
248
|
-
if (permissions) {
|
|
249
|
-
throw new Error(
|
|
250
|
-
// deno-lint-ignore deno-style-guide/error-message
|
|
251
|
-
"permissions option not available for nested tests");
|
|
252
|
-
}
|
|
253
|
-
context = { ...context };
|
|
254
|
-
if (step instanceof TestSuiteInternal) {
|
|
255
|
-
const { beforeAll } = step.describe;
|
|
256
|
-
if (typeof beforeAll === "function") {
|
|
257
|
-
await beforeAll.call(context);
|
|
258
|
-
}
|
|
259
|
-
else if (beforeAll) {
|
|
260
|
-
for (const hook of beforeAll) {
|
|
261
|
-
await hook.call(context);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
try {
|
|
265
|
-
TestSuiteInternal.active.push(step.symbol);
|
|
266
|
-
await TestSuiteInternal.run(step, context, t);
|
|
267
|
-
}
|
|
268
|
-
finally {
|
|
269
|
-
TestSuiteInternal.active.pop();
|
|
270
|
-
const { afterAll } = step.describe;
|
|
271
|
-
if (typeof afterAll === "function") {
|
|
272
|
-
await afterAll.call(context);
|
|
273
|
-
}
|
|
274
|
-
else if (afterAll) {
|
|
275
|
-
for (const hook of afterAll) {
|
|
276
|
-
await hook.call(context);
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
else {
|
|
282
|
-
await TestSuiteInternal.runTest(t, fn, context);
|
|
283
|
-
}
|
|
284
|
-
},
|
|
285
|
-
};
|
|
286
|
-
if (ignore !== undefined) {
|
|
287
|
-
options.ignore = ignore;
|
|
288
|
-
}
|
|
289
|
-
if (sanitizeExit !== undefined) {
|
|
290
|
-
options.sanitizeExit = sanitizeExit;
|
|
291
|
-
}
|
|
292
|
-
if (sanitizeOps !== undefined) {
|
|
293
|
-
options.sanitizeOps = sanitizeOps;
|
|
294
|
-
}
|
|
295
|
-
if (sanitizeResources !== undefined) {
|
|
296
|
-
options.sanitizeResources = sanitizeResources;
|
|
297
|
-
}
|
|
298
|
-
await t.step(options);
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
static async runTest(t, fn, context, activeIndex = 0) {
|
|
302
|
-
const suite = TestSuiteInternal.active[activeIndex];
|
|
303
|
-
const testSuite = suite && TestSuiteInternal.suites.get(suite);
|
|
304
|
-
if (testSuite) {
|
|
305
|
-
if (activeIndex === 0)
|
|
306
|
-
context = { ...context };
|
|
307
|
-
const { beforeEach } = testSuite.describe;
|
|
308
|
-
if (typeof beforeEach === "function") {
|
|
309
|
-
await beforeEach.call(context);
|
|
310
|
-
}
|
|
311
|
-
else if (beforeEach) {
|
|
312
|
-
for (const hook of beforeEach) {
|
|
313
|
-
await hook.call(context);
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
try {
|
|
317
|
-
await TestSuiteInternal.runTest(t, fn, context, activeIndex + 1);
|
|
318
|
-
}
|
|
319
|
-
finally {
|
|
320
|
-
const { afterEach } = testSuite.describe;
|
|
321
|
-
if (typeof afterEach === "function") {
|
|
322
|
-
await afterEach.call(context);
|
|
323
|
-
}
|
|
324
|
-
else if (afterEach) {
|
|
325
|
-
for (const hook of afterEach) {
|
|
326
|
-
await hook.call(context);
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
else {
|
|
332
|
-
await fn.call(context, t);
|
|
333
|
-
}
|
|
334
|
-
try {
|
|
335
|
-
if (assertionState.checkAssertionErrorState()) {
|
|
336
|
-
throw new AssertionError("Expected at least one assertion to be called but received none");
|
|
337
|
-
}
|
|
338
|
-
if (assertionState.checkAssertionCountSatisfied()) {
|
|
339
|
-
throw new AssertionError(`Expected exactly ${assertionState.assertionCount} ${assertionState.assertionCount === 1 ? "assertion" : "assertions"} to be called, ` +
|
|
340
|
-
`but received ${assertionState.assertionTriggeredCount}`);
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
finally {
|
|
344
|
-
assertionState.resetAssertionState();
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
}
|