@zuplo/cli 7.6.8 → 7.6.10
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/@inquirer/checkbox/package.json +3 -3
- package/node_modules/@inquirer/confirm/dist/index.js +1 -1
- package/node_modules/@inquirer/confirm/package.json +3 -3
- package/node_modules/@inquirer/core/dist/lib/create-prompt.js +66 -47
- package/node_modules/@inquirer/core/package.json +2 -2
- package/node_modules/@inquirer/editor/package.json +3 -3
- package/node_modules/@inquirer/expand/package.json +3 -3
- package/node_modules/@inquirer/input/package.json +3 -3
- package/node_modules/@inquirer/number/package.json +3 -3
- package/node_modules/@inquirer/password/package.json +3 -3
- package/node_modules/@inquirer/rawlist/package.json +3 -3
- package/node_modules/@inquirer/search/package.json +3 -3
- package/node_modules/@inquirer/select/package.json +3 -3
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/index.d.ts +1 -2
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +12 -25
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +18 -32
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +12 -25
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +24 -50
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +15 -30
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +29 -52
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwk/embedded.d.ts +5 -8
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwk/thumbprint.d.ts +7 -9
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwks/local.d.ts +10 -13
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwks/remote.d.ts +29 -41
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jws/compact/sign.d.ts +8 -13
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jws/compact/verify.d.ts +14 -26
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jws/flattened/sign.d.ts +10 -19
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jws/flattened/verify.d.ts +14 -26
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jws/general/sign.d.ts +19 -33
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jws/general/verify.d.ts +17 -32
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwt/decrypt.d.ts +20 -27
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwt/encrypt.d.ts +30 -35
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwt/sign.d.ts +8 -13
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwt/unsecured.d.ts +10 -19
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/jwt/verify.d.ts +19 -22
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/key/export.d.ts +10 -10
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/key/generate_key_pair.d.ts +15 -22
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/key/generate_secret.d.ts +12 -19
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/key/import.d.ts +25 -31
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/types.d.ts +184 -319
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/util/base64url.d.ts +7 -7
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/util/decode_jwt.d.ts +5 -7
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/util/decode_protected_header.d.ts +6 -5
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/util/errors.d.ts +50 -88
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/index.js +70 -32
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +6 -8
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwe/compact/encrypt.js +25 -48
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +14 -14
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +34 -64
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwe/general/decrypt.js +38 -49
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwe/general/encrypt.js +100 -172
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwk/embedded.js +29 -32
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwk/thumbprint.js +51 -70
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwks/local.js +53 -64
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwks/remote.js +88 -136
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jws/compact/sign.js +19 -21
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jws/compact/verify.js +7 -8
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jws/flattened/sign.js +22 -31
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jws/flattened/verify.js +11 -24
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jws/general/sign.js +55 -73
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jws/general/verify.js +43 -69
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwt/decrypt.js +12 -20
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwt/encrypt.js +43 -70
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwt/sign.js +17 -16
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwt/unsecured.js +31 -40
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/jwt/verify.js +12 -14
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/key/export.js +32 -41
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/key/generate_key_pair.js +32 -49
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/key/generate_secret.js +35 -40
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/key/import.js +48 -56
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/asn1.js +128 -169
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/buffer_utils.js +72 -41
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/content_encryption.js +75 -119
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/deflate.js +35 -47
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jwe_algorithms.js +102 -93
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +178 -234
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +71 -138
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jws_algorithms.js +62 -61
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jws_sign.js +43 -82
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jws_verify.js +78 -131
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +123 -209
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/key.js +147 -139
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/key_algorithm.js +13 -8
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/key_descriptor.js +8 -6
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/key_management.js +169 -235
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/validate.js +122 -0
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/util/base64url.js +14 -37
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/util/decode_jwt.js +32 -31
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/util/decode_protected_header.js +18 -23
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/util/errors.js +94 -84
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/package.json +17 -81
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/index.d.ts +1 -2
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +12 -25
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +18 -32
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +12 -25
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +24 -50
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +15 -30
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +29 -52
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwk/embedded.d.ts +5 -8
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwk/thumbprint.d.ts +7 -9
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwks/local.d.ts +10 -13
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwks/remote.d.ts +29 -41
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jws/compact/sign.d.ts +8 -13
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jws/compact/verify.d.ts +14 -26
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jws/flattened/sign.d.ts +10 -19
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jws/flattened/verify.d.ts +14 -26
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jws/general/sign.d.ts +19 -33
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jws/general/verify.d.ts +17 -32
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwt/decrypt.d.ts +20 -27
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwt/encrypt.d.ts +30 -35
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwt/sign.d.ts +8 -13
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwt/unsecured.d.ts +10 -19
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/jwt/verify.d.ts +19 -22
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/key/export.d.ts +10 -10
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/key/generate_key_pair.d.ts +15 -22
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/key/generate_secret.d.ts +12 -19
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/key/import.d.ts +25 -31
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/types.d.ts +184 -319
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/util/base64url.d.ts +7 -7
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/util/decode_jwt.d.ts +5 -7
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/util/decode_protected_header.d.ts +6 -5
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/types/util/errors.d.ts +50 -88
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/index.js +70 -32
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +6 -8
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwe/compact/encrypt.js +25 -48
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +14 -14
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +34 -64
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwe/general/decrypt.js +38 -49
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwe/general/encrypt.js +100 -172
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwk/embedded.js +29 -32
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwk/thumbprint.js +51 -70
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwks/local.js +53 -64
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwks/remote.js +88 -136
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jws/compact/sign.js +19 -21
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jws/compact/verify.js +7 -8
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jws/flattened/sign.js +22 -31
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jws/flattened/verify.js +11 -24
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jws/general/sign.js +55 -73
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jws/general/verify.js +43 -69
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwt/decrypt.js +12 -20
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwt/encrypt.js +43 -70
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwt/sign.js +17 -16
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwt/unsecured.js +31 -40
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/jwt/verify.js +12 -14
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/key/export.js +32 -41
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/key/generate_key_pair.js +32 -49
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/key/generate_secret.js +35 -40
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/key/import.js +48 -56
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/asn1.js +128 -169
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/buffer_utils.js +72 -41
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/content_encryption.js +75 -119
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/deflate.js +35 -47
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwe_algorithms.js +102 -93
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +178 -234
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +71 -138
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jws_algorithms.js +62 -61
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jws_sign.js +43 -82
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jws_verify.js +78 -131
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +123 -209
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/key.js +147 -139
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/key_algorithm.js +13 -8
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/key_descriptor.js +8 -6
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/key_management.js +169 -235
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/validate.js +122 -0
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/util/base64url.js +14 -37
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/util/decode_jwt.js +32 -31
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/util/decode_protected_header.js +18 -23
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/util/errors.js +94 -84
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/package.json +17 -81
- package/node_modules/@posthog/core/dist/cookie.js +17 -13
- package/node_modules/@posthog/core/dist/error-tracking/chunk-ids.js +15 -11
- package/node_modules/@posthog/core/dist/error-tracking/coercers/dom-exception-coercer.js +12 -8
- package/node_modules/@posthog/core/dist/error-tracking/coercers/error-coercer.js +12 -8
- package/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.js +12 -9
- package/node_modules/@posthog/core/dist/error-tracking/coercers/error-event-coercer.mjs +0 -1
- package/node_modules/@posthog/core/dist/error-tracking/coercers/event-coercer.js +12 -8
- package/node_modules/@posthog/core/dist/error-tracking/coercers/index.js +51 -63
- package/node_modules/@posthog/core/dist/error-tracking/coercers/object-coercer.js +12 -8
- package/node_modules/@posthog/core/dist/error-tracking/coercers/primitive-coercer.js +12 -8
- package/node_modules/@posthog/core/dist/error-tracking/coercers/promise-rejection-event.js +12 -8
- package/node_modules/@posthog/core/dist/error-tracking/coercers/string-coercer.js +15 -11
- package/node_modules/@posthog/core/dist/error-tracking/coercers/utils.js +16 -12
- package/node_modules/@posthog/core/dist/error-tracking/error-properties-builder.js +12 -8
- package/node_modules/@posthog/core/dist/error-tracking/exception-steps.js +18 -14
- package/node_modules/@posthog/core/dist/error-tracking/exception-steps.mjs +2 -2
- package/node_modules/@posthog/core/dist/error-tracking/index.js +41 -49
- package/node_modules/@posthog/core/dist/error-tracking/parsers/base.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/error-tracking/parsers/base.js +13 -9
- package/node_modules/@posthog/core/dist/error-tracking/parsers/base.mjs +1 -1
- package/node_modules/@posthog/core/dist/error-tracking/parsers/chrome.js +12 -8
- package/node_modules/@posthog/core/dist/error-tracking/parsers/gecko.js +12 -8
- package/node_modules/@posthog/core/dist/error-tracking/parsers/index.js +17 -13
- package/node_modules/@posthog/core/dist/error-tracking/parsers/index.mjs +4 -4
- package/node_modules/@posthog/core/dist/error-tracking/parsers/node.js +12 -8
- package/node_modules/@posthog/core/dist/error-tracking/parsers/opera.js +14 -10
- package/node_modules/@posthog/core/dist/error-tracking/parsers/safari.js +12 -8
- package/node_modules/@posthog/core/dist/error-tracking/parsers/winjs.js +12 -8
- package/node_modules/@posthog/core/dist/error-tracking/release.js +15 -11
- package/node_modules/@posthog/core/dist/error-tracking/types.js +15 -11
- package/node_modules/@posthog/core/dist/error-tracking/utils.js +15 -11
- package/node_modules/@posthog/core/dist/eventemitter.js +15 -11
- package/node_modules/@posthog/core/dist/featureFlagLocalEvaluation.js +18 -14
- package/node_modules/@posthog/core/dist/featureFlagLocalEvaluation.mjs +1 -1
- package/node_modules/@posthog/core/dist/featureFlagUtils.js +30 -25
- package/node_modules/@posthog/core/dist/featureFlagUtils.mjs +2 -2
- package/node_modules/@posthog/core/dist/gzip.js +16 -12
- package/node_modules/@posthog/core/dist/index.js +302 -310
- package/node_modules/@posthog/core/dist/index.mjs +12 -12
- package/node_modules/@posthog/core/dist/logs/index.js +13 -9
- package/node_modules/@posthog/core/dist/logs/index.mjs +1 -1
- package/node_modules/@posthog/core/dist/logs/logs-utils.js +16 -12
- package/node_modules/@posthog/core/dist/logs/types.js +2 -2
- package/node_modules/@posthog/core/dist/logs/types.mjs +1 -0
- package/node_modules/@posthog/core/dist/metrics/config.js +15 -11
- package/node_modules/@posthog/core/dist/metrics/index.js +15 -11
- package/node_modules/@posthog/core/dist/metrics/index.mjs +2 -2
- package/node_modules/@posthog/core/dist/metrics/metrics-utils.js +14 -10
- package/node_modules/@posthog/core/dist/metrics/types.js +2 -2
- package/node_modules/@posthog/core/dist/metrics/types.mjs +1 -0
- package/node_modules/@posthog/core/dist/posthog-core-stateless.js +16 -12
- package/node_modules/@posthog/core/dist/posthog-core-stateless.mjs +1 -1
- package/node_modules/@posthog/core/dist/posthog-core.d.ts +14 -0
- package/node_modules/@posthog/core/dist/posthog-core.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/posthog-core.js +12 -8
- package/node_modules/@posthog/core/dist/surveys/activation.js +14 -10
- package/node_modules/@posthog/core/dist/surveys/events.js +14 -10
- package/node_modules/@posthog/core/dist/surveys/index.js +30 -26
- package/node_modules/@posthog/core/dist/surveys/index.mjs +6 -7
- package/node_modules/@posthog/core/dist/surveys/keys.js +16 -12
- package/node_modules/@posthog/core/dist/surveys/property-matching.js +19 -14
- package/node_modules/@posthog/core/dist/surveys/translations.js +16 -12
- package/node_modules/@posthog/core/dist/surveys/validation.js +13 -9
- package/node_modules/@posthog/core/dist/testing/PostHogCoreTestClient.d.ts +3 -3
- package/node_modules/@posthog/core/dist/testing/PostHogCoreTestClient.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/testing/PostHogCoreTestClient.js +15 -11
- package/node_modules/@posthog/core/dist/testing/PostHogCoreTestClient.mjs +3 -3
- package/node_modules/@posthog/core/dist/testing/index.js +21 -21
- package/node_modules/@posthog/core/dist/testing/test-utils.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/testing/test-utils.js +19 -18
- package/node_modules/@posthog/core/dist/testing/test-utils.mjs +7 -10
- package/node_modules/@posthog/core/dist/tracing-headers.js +12 -8
- package/node_modules/@posthog/core/dist/types.d.ts +1 -0
- package/node_modules/@posthog/core/dist/types.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/types.js +31 -26
- package/node_modules/@posthog/core/dist/types.mjs +1 -1
- package/node_modules/@posthog/core/dist/utils/bot-detection.js +16 -12
- package/node_modules/@posthog/core/dist/utils/browser-utils.js +12 -8
- package/node_modules/@posthog/core/dist/utils/bucketed-rate-limiter.js +14 -10
- package/node_modules/@posthog/core/dist/utils/index.d.ts +1 -0
- package/node_modules/@posthog/core/dist/utils/index.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/utils/index.js +205 -192
- package/node_modules/@posthog/core/dist/utils/index.mjs +4 -3
- package/node_modules/@posthog/core/dist/utils/json-utils.js +24 -19
- package/node_modules/@posthog/core/dist/utils/logger.js +17 -12
- package/node_modules/@posthog/core/dist/utils/number-utils.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/utils/number-utils.js +14 -10
- package/node_modules/@posthog/core/dist/utils/number-utils.mjs +1 -1
- package/node_modules/@posthog/core/dist/utils/otlp-any-value.js +15 -11
- package/node_modules/@posthog/core/dist/utils/otlp-any-value.mjs +1 -1
- package/node_modules/@posthog/core/dist/utils/otlp-resource.js +17 -13
- package/node_modules/@posthog/core/dist/utils/promise-queue.js +12 -8
- package/node_modules/@posthog/core/dist/utils/string-utils.js +21 -16
- package/node_modules/@posthog/core/dist/utils/type-utils.js +31 -27
- package/node_modules/@posthog/core/dist/utils/type-utils.mjs +2 -2
- package/node_modules/@posthog/core/dist/utils/user-agent-utils.js +16 -12
- package/node_modules/@posthog/core/dist/utils/webview-app-utils.d.ts +12 -0
- package/node_modules/@posthog/core/dist/utils/webview-app-utils.d.ts.map +1 -0
- package/node_modules/@posthog/core/dist/utils/webview-app-utils.js +132 -0
- package/node_modules/@posthog/core/dist/utils/webview-app-utils.mjs +94 -0
- package/node_modules/@posthog/core/dist/vendor/uuidv7.js +22 -17
- package/node_modules/@posthog/core/dist/vendor/uuidv7.mjs +1 -1
- package/node_modules/@posthog/core/package.json +8 -8
- package/node_modules/@posthog/core/src/error-tracking/coercers/promise-rejection-event.spec.ts +4 -4
- package/node_modules/@posthog/core/src/error-tracking/error-properties-builder.parse.spec.ts +1 -1
- package/node_modules/@posthog/core/src/error-tracking/parsers/base.spec.ts +21 -2
- package/node_modules/@posthog/core/src/error-tracking/parsers/base.ts +6 -2
- package/node_modules/@posthog/core/src/featureFlagLocalEvaluation.ts +1 -1
- package/node_modules/@posthog/core/src/featureFlagUtils.ts +4 -4
- package/node_modules/@posthog/core/src/logs/index.spec.ts +89 -89
- package/node_modules/@posthog/core/src/metrics/index.spec.ts +24 -24
- package/node_modules/@posthog/core/src/posthog-core.ts +14 -1
- package/node_modules/@posthog/core/src/surveys/activation.spec.ts +1 -1
- package/node_modules/@posthog/core/src/surveys/events.spec.ts +1 -1
- package/node_modules/@posthog/core/src/surveys/keys.spec.ts +1 -1
- package/node_modules/@posthog/core/src/surveys/translations.spec.ts +8 -8
- package/node_modules/@posthog/core/src/testing/PostHogCoreTestClient.ts +6 -6
- package/node_modules/@posthog/core/src/testing/test-utils.ts +7 -12
- package/node_modules/@posthog/core/src/types.ts +1 -0
- package/node_modules/@posthog/core/src/utils/bucketed-rate-limiter.spec.ts +13 -13
- package/node_modules/@posthog/core/src/utils/index.ts +1 -0
- package/node_modules/@posthog/core/src/utils/json-utils.spec.ts +5 -5
- package/node_modules/@posthog/core/src/utils/number-utils.spec.ts +20 -0
- package/node_modules/@posthog/core/src/utils/number-utils.ts +3 -1
- package/node_modules/@posthog/core/src/utils/otlp-any-value.spec.ts +4 -4
- package/node_modules/@posthog/core/src/utils/promise-queue.spec.ts +3 -3
- package/node_modules/@posthog/core/src/utils/type-utils.ts +4 -4
- package/node_modules/@posthog/core/src/utils/webview-app-utils.spec.ts +118 -0
- package/node_modules/@posthog/core/src/utils/webview-app-utils.ts +49 -0
- package/node_modules/@posthog/types/dist/capture-log.js +2 -2
- package/node_modules/@posthog/types/dist/capture-log.mjs +1 -0
- package/node_modules/@posthog/types/dist/capture-metric.js +15 -11
- package/node_modules/@posthog/types/dist/capture.js +2 -2
- package/node_modules/@posthog/types/dist/capture.mjs +1 -0
- package/node_modules/@posthog/types/dist/common.js +2 -2
- package/node_modules/@posthog/types/dist/common.mjs +1 -0
- package/node_modules/@posthog/types/dist/feature-flags.d.ts +1 -1
- package/node_modules/@posthog/types/dist/feature-flags.d.ts.map +1 -1
- package/node_modules/@posthog/types/dist/feature-flags.js +2 -2
- package/node_modules/@posthog/types/dist/feature-flags.mjs +1 -0
- package/node_modules/@posthog/types/dist/index.js +12 -8
- package/node_modules/@posthog/types/dist/index.mjs +1 -2
- package/node_modules/@posthog/types/dist/posthog-config.d.ts +15 -1
- package/node_modules/@posthog/types/dist/posthog-config.d.ts.map +1 -1
- package/node_modules/@posthog/types/dist/posthog-config.js +2 -2
- package/node_modules/@posthog/types/dist/posthog-config.mjs +1 -0
- package/node_modules/@posthog/types/dist/posthog.d.ts +2 -2
- package/node_modules/@posthog/types/dist/posthog.d.ts.map +1 -1
- package/node_modules/@posthog/types/dist/posthog.js +2 -2
- package/node_modules/@posthog/types/dist/posthog.mjs +1 -0
- package/node_modules/@posthog/types/dist/request.js +2 -2
- package/node_modules/@posthog/types/dist/request.mjs +1 -0
- package/node_modules/@posthog/types/dist/segment.js +2 -2
- package/node_modules/@posthog/types/dist/segment.mjs +1 -0
- package/node_modules/@posthog/types/dist/session-recording.js +2 -2
- package/node_modules/@posthog/types/dist/session-recording.mjs +1 -0
- package/node_modules/@posthog/types/dist/survey.js +2 -2
- package/node_modules/@posthog/types/dist/survey.mjs +1 -0
- package/node_modules/@posthog/types/dist/toolbar.js +2 -2
- package/node_modules/@posthog/types/dist/toolbar.mjs +1 -0
- package/node_modules/@posthog/types/dist/tree-shakeable.js +2 -2
- package/node_modules/@posthog/types/dist/tree-shakeable.mjs +1 -0
- package/node_modules/@posthog/types/package.json +4 -6
- package/node_modules/@posthog/types/src/feature-flags.ts +1 -1
- package/node_modules/@posthog/types/src/posthog-config.ts +16 -1
- package/node_modules/@posthog/types/src/posthog.ts +2 -2
- package/node_modules/@posthog/types/src/tree-shakeable.ts +1 -1
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +1 -1
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/out/esm/{chunk-ZZCZZHOD.js → chunk-R4PTES5B.js} +104 -104
- package/node_modules/@zuplo/runtime/out/esm/chunk-R4PTES5B.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/types/index.d.ts +59 -9
- package/node_modules/@zuplo/runtime/package.json +1 -1
- 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/package.json +11 -11
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/base64.js +0 -22
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/crypto_key.js +0 -28
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/helpers.js +0 -42
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/invalid_key_input.js +0 -26
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/is_key_like.js +0 -17
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jwk_metadata.js +0 -20
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/jwk_to_key.js +0 -17
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/key_options.js +0 -6
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/options.js +0 -74
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/signing.js +0 -26
- package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/webapi/lib/type_checks.js +0 -33
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/base64.js +0 -22
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/crypto_key.js +0 -28
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/helpers.js +0 -42
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/invalid_key_input.js +0 -26
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/is_key_like.js +0 -17
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwk_metadata.js +0 -20
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/jwk_to_key.js +0 -17
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/key_options.js +0 -6
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/options.js +0 -74
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/signing.js +0 -26
- package/node_modules/@modelcontextprotocol/sdk/node_modules/jose/dist/webapi/lib/type_checks.js +0 -33
- package/node_modules/@zuplo/runtime/out/esm/chunk-ZZCZZHOD.js.map +0 -1
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-ZZCZZHOD.js.LEGAL.txt → chunk-R4PTES5B.js.LEGAL.txt} +0 -0
package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/util/base64url.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Decodes
|
|
2
|
+
* Decodes base64url text or its UTF-8 bytes.
|
|
3
3
|
*
|
|
4
|
-
* @param input
|
|
4
|
+
* @param input Base64url-encoded string or its UTF-8 bytes.
|
|
5
5
|
* @returns The decoded bytes.
|
|
6
|
-
* @throws {
|
|
7
|
-
*
|
|
6
|
+
* @throws {TypeError} If the input is not valid base64url. Standard Base64 `+` and `/` are
|
|
7
|
+
* rejected.
|
|
8
8
|
*/
|
|
9
9
|
export declare function decode(input: Uint8Array | string): Uint8Array;
|
|
10
10
|
/**
|
|
11
|
-
* Encodes
|
|
11
|
+
* Encodes unpadded base64url; strings are first encoded as UTF-8.
|
|
12
12
|
*
|
|
13
|
-
* @param input
|
|
14
|
-
* @returns The
|
|
13
|
+
* @param input Bytes or a string to encode. Strings are first encoded as UTF-8.
|
|
14
|
+
* @returns The unpadded base64url representation of the input.
|
|
15
15
|
*/
|
|
16
16
|
export declare function encode(input: Uint8Array | string): string;
|
package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/util/decode_jwt.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import type * as
|
|
1
|
+
import type * as t from '../types.d.ts';
|
|
2
2
|
/**
|
|
3
|
-
* Decodes
|
|
4
|
-
*
|
|
5
|
-
* and JWS signature verification use `jose.jwtVerify()`. For an encrypted JWT Claims Set validation
|
|
6
|
-
* and JWE decryption use `jose.jwtDecrypt()`.
|
|
3
|
+
* Decodes the Claims Set of a JWT in Compact JWS serialization without checking its signature or
|
|
4
|
+
* validating claim types and values.
|
|
7
5
|
*
|
|
8
|
-
* @
|
|
6
|
+
* @returns The parsed JWT Claims Set.
|
|
9
7
|
*/
|
|
10
|
-
export declare function decodeJwt<PayloadType =
|
|
8
|
+
export declare function decodeJwt<PayloadType = t.JWTPayload>(jwt: string): PayloadType & t.JWTPayload & ([PayloadType] extends [object] ? unknown : unknown extends PayloadType ? unknown : never);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type * as
|
|
2
|
-
/** JWE and JWS Header Parameters */
|
|
3
|
-
export type ProtectedHeaderParameters =
|
|
1
|
+
import type * as t from '../types.d.ts';
|
|
2
|
+
/** JWE and JWS Header Parameters returned by {@link decodeProtectedHeader}. */
|
|
3
|
+
export type ProtectedHeaderParameters = t.JWSHeaderParameters & t.JWEHeaderParameters;
|
|
4
4
|
/**
|
|
5
|
-
* Decodes the Protected Header of a JWE
|
|
5
|
+
* Decodes the Protected Header of a JWE, JWS, or JWT without authenticating the token.
|
|
6
6
|
*
|
|
7
|
-
* @param token
|
|
7
|
+
* @param token Compact token or JSON serialization object with a `protected` member.
|
|
8
|
+
* @returns The parsed Protected Header.
|
|
8
9
|
*/
|
|
9
10
|
export declare function decodeProtectedHeader(token: string | object): ProtectedHeaderParameters;
|
package/node_modules/@modelcontextprotocol/client/node_modules/jose/dist/types/util/errors.d.ts
CHANGED
|
@@ -1,193 +1,155 @@
|
|
|
1
|
-
import type * as
|
|
2
|
-
/**
|
|
3
|
-
* Every stable error code used by this module. {@link AnyJOSEError} pairs each subclass with the one
|
|
4
|
-
* it is thrown with, making that union a discriminated one.
|
|
5
|
-
*/
|
|
1
|
+
import type * as t from '../types.d.ts';
|
|
2
|
+
/** Stable error codes used by this module. */
|
|
6
3
|
export type JOSEErrorCode = 'ERR_JOSE_ALG_NOT_ALLOWED' | 'ERR_JOSE_GENERIC' | 'ERR_JOSE_NOT_SUPPORTED' | 'ERR_JWE_DECRYPTION_FAILED' | 'ERR_JWE_INVALID' | 'ERR_JWK_INVALID' | 'ERR_JWKS_INVALID' | 'ERR_JWKS_MULTIPLE_MATCHING_KEYS' | 'ERR_JWKS_NO_MATCHING_KEY' | 'ERR_JWKS_TIMEOUT' | 'ERR_JWS_INVALID' | 'ERR_JWS_SIGNATURE_VERIFICATION_FAILED' | 'ERR_JWT_CLAIM_VALIDATION_FAILED' | 'ERR_JWT_EXPIRED' | 'ERR_JWT_INVALID';
|
|
7
|
-
/**
|
|
8
|
-
* The shape shared by the two errors thrown during JWT Claims Set validation.
|
|
9
|
-
*
|
|
10
|
-
* > Note: {@link JWTExpired} does not extend {@link JWTClaimValidationFailed}, so `instanceof
|
|
11
|
-
* > JWTClaimValidationFailed` is `false` for an expired JWT. Use {@link JWTClaimValidationError} or
|
|
12
|
-
* > the {@link JOSEError.code code} discriminant to handle both.
|
|
13
|
-
*/
|
|
4
|
+
/** Shared details of JWT claim or header validation failures. */
|
|
14
5
|
export interface JWTClaimValidationFailure {
|
|
15
|
-
/**
|
|
6
|
+
/** Claim or header that failed validation. */
|
|
16
7
|
claim: string;
|
|
17
8
|
/** Reason code for the validation failure. */
|
|
18
9
|
reason: JWTClaimValidationReason;
|
|
19
|
-
/** The parsed JWT Claims Set
|
|
20
|
-
payload:
|
|
10
|
+
/** The parsed JWT Claims Set; validation of other claims may be incomplete. */
|
|
11
|
+
payload: t.JWTPayload;
|
|
21
12
|
}
|
|
22
13
|
/** Reason codes produced by JWT Claims Set validation. */
|
|
23
14
|
export type JWTClaimValidationReason = 'check_failed' | 'invalid' | 'mismatch' | 'missing' | 'unspecified' | (string & {});
|
|
24
|
-
/**
|
|
15
|
+
/** Base class for JOSE errors. */
|
|
25
16
|
export declare class JOSEError extends Error {
|
|
26
|
-
/**
|
|
17
|
+
/** Stable code identifying the error class. */
|
|
27
18
|
static code: JOSEErrorCode | (string & {});
|
|
28
|
-
/**
|
|
29
|
-
* A unique error code for {@link JOSEError}. Each subclass sets its own; see {@link AnyJOSEError}
|
|
30
|
-
* to switch over them as a discriminated union.
|
|
31
|
-
*/
|
|
19
|
+
/** Stable code identifying the error class. Use {@link AnyJOSEError} to narrow subclasses by code. */
|
|
32
20
|
code: JOSEErrorCode | (string & {});
|
|
33
21
|
constructor(message?: string, options?: {
|
|
34
22
|
cause?: unknown;
|
|
35
23
|
});
|
|
36
24
|
}
|
|
37
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Thrown when JWT claim or header validation fails. Expiration is reported separately as
|
|
27
|
+
* {@link JWTExpired}.
|
|
28
|
+
*/
|
|
38
29
|
export declare class JWTClaimValidationFailed extends JOSEError implements JWTClaimValidationFailure {
|
|
39
30
|
static code: JOSEErrorCode | (string & {});
|
|
40
|
-
/** A unique error code for {@link JWTClaimValidationFailed}. */
|
|
41
31
|
code: JOSEErrorCode | (string & {});
|
|
42
|
-
/** The {@link JWTClaimValidationFailure} carried by
|
|
32
|
+
/** The {@link JWTClaimValidationFailure} details carried by this error. */
|
|
43
33
|
cause: JWTClaimValidationFailure;
|
|
44
|
-
/**
|
|
34
|
+
/** Claim or header that failed validation. */
|
|
45
35
|
claim: string;
|
|
46
36
|
/** Reason code for the validation failure. */
|
|
47
37
|
reason: JWTClaimValidationReason;
|
|
48
38
|
/**
|
|
49
|
-
* The parsed JWT Claims Set
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
39
|
+
* The parsed JWT Claims Set; validation of other claims may be incomplete. With
|
|
40
|
+
* {@link jwt/verify.jwtVerify jwtVerify} and {@link jwt/decrypt.jwtDecrypt jwtDecrypt}, token
|
|
41
|
+
* authentication precedes claim validation. {@link jwt/unsecured.UnsecuredJWT.decode} does not
|
|
42
|
+
* authenticate tokens.
|
|
53
43
|
*/
|
|
54
|
-
payload:
|
|
55
|
-
constructor(message: string, payload:
|
|
44
|
+
payload: t.JWTPayload;
|
|
45
|
+
constructor(message: string, payload: t.JWTPayload, claim?: string, reason?: JWTClaimValidationReason);
|
|
56
46
|
}
|
|
57
|
-
/**
|
|
47
|
+
/** Thrown when a JWT has expired or exceeds the configured maximum token age. */
|
|
58
48
|
export declare class JWTExpired extends JOSEError implements JWTClaimValidationFailure {
|
|
59
49
|
static code: JOSEErrorCode | (string & {});
|
|
60
|
-
/** A unique error code for {@link JWTExpired}. */
|
|
61
50
|
code: JOSEErrorCode | (string & {});
|
|
62
|
-
/** The {@link JWTClaimValidationFailure} carried by
|
|
51
|
+
/** The {@link JWTClaimValidationFailure} details carried by this error. */
|
|
63
52
|
cause: JWTClaimValidationFailure;
|
|
64
|
-
/**
|
|
53
|
+
/** Claim or header that failed validation. */
|
|
65
54
|
claim: string;
|
|
66
55
|
/** Reason code for the validation failure. */
|
|
67
56
|
reason: JWTClaimValidationReason;
|
|
68
57
|
/**
|
|
69
|
-
* The parsed JWT Claims Set
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
58
|
+
* The parsed JWT Claims Set; validation of other claims may be incomplete. With
|
|
59
|
+
* {@link jwt/verify.jwtVerify jwtVerify} and {@link jwt/decrypt.jwtDecrypt jwtDecrypt}, token
|
|
60
|
+
* authentication precedes claim validation. {@link jwt/unsecured.UnsecuredJWT.decode} does not
|
|
61
|
+
* authenticate tokens.
|
|
73
62
|
*/
|
|
74
|
-
payload:
|
|
75
|
-
constructor(message: string, payload:
|
|
63
|
+
payload: t.JWTPayload;
|
|
64
|
+
constructor(message: string, payload: t.JWTPayload, claim?: string, reason?: JWTClaimValidationReason);
|
|
76
65
|
}
|
|
77
|
-
/**
|
|
66
|
+
/** Thrown when an algorithm is disallowed by configuration. */
|
|
78
67
|
export declare class JOSEAlgNotAllowed extends JOSEError {
|
|
79
68
|
static code: JOSEErrorCode | (string & {});
|
|
80
|
-
/** A unique error code for {@link JOSEAlgNotAllowed}. */
|
|
81
69
|
code: JOSEErrorCode | (string & {});
|
|
82
70
|
}
|
|
83
|
-
/**
|
|
84
|
-
* An error subclass thrown when a particular feature or algorithm is not supported by this
|
|
85
|
-
* implementation or JOSE in general.
|
|
86
|
-
*/
|
|
71
|
+
/** Thrown when a feature or algorithm is unsupported. */
|
|
87
72
|
export declare class JOSENotSupported extends JOSEError {
|
|
88
73
|
static code: JOSEErrorCode | (string & {});
|
|
89
|
-
/** A unique error code for {@link JOSENotSupported}. */
|
|
90
74
|
code: JOSEErrorCode | (string & {});
|
|
91
75
|
}
|
|
92
|
-
/**
|
|
76
|
+
/** Thrown when JWE ciphertext decryption or authentication fails. */
|
|
93
77
|
export declare class JWEDecryptionFailed extends JOSEError {
|
|
94
78
|
static code: JOSEErrorCode | (string & {});
|
|
95
|
-
/** A unique error code for {@link JWEDecryptionFailed}. */
|
|
96
79
|
code: JOSEErrorCode | (string & {});
|
|
97
80
|
constructor(message?: string, options?: {
|
|
98
81
|
cause?: unknown;
|
|
99
82
|
});
|
|
100
83
|
}
|
|
101
|
-
/**
|
|
84
|
+
/** Thrown when a JWE is invalid. */
|
|
102
85
|
export declare class JWEInvalid extends JOSEError {
|
|
103
86
|
static code: JOSEErrorCode | (string & {});
|
|
104
|
-
/** A unique error code for {@link JWEInvalid}. */
|
|
105
87
|
code: JOSEErrorCode | (string & {});
|
|
106
88
|
}
|
|
107
|
-
/**
|
|
89
|
+
/** Thrown when a JWS is invalid. */
|
|
108
90
|
export declare class JWSInvalid extends JOSEError {
|
|
109
91
|
static code: JOSEErrorCode | (string & {});
|
|
110
|
-
/** A unique error code for {@link JWSInvalid}. */
|
|
111
92
|
code: JOSEErrorCode | (string & {});
|
|
112
93
|
}
|
|
113
|
-
/**
|
|
94
|
+
/** Thrown when a JWT is invalid. */
|
|
114
95
|
export declare class JWTInvalid extends JOSEError {
|
|
115
96
|
static code: JOSEErrorCode | (string & {});
|
|
116
|
-
/** A unique error code for {@link JWTInvalid}. */
|
|
117
97
|
code: JOSEErrorCode | (string & {});
|
|
118
98
|
}
|
|
119
|
-
/**
|
|
99
|
+
/** Thrown when a JWK is invalid. */
|
|
120
100
|
export declare class JWKInvalid extends JOSEError {
|
|
121
101
|
static code: JOSEErrorCode | (string & {});
|
|
122
|
-
/** A unique error code for {@link JWKInvalid}. */
|
|
123
102
|
code: JOSEErrorCode | (string & {});
|
|
124
103
|
}
|
|
125
|
-
/**
|
|
104
|
+
/** Thrown when a JWKS is invalid. */
|
|
126
105
|
export declare class JWKSInvalid extends JOSEError {
|
|
127
106
|
static code: JOSEErrorCode | (string & {});
|
|
128
|
-
/** A unique error code for {@link JWKSInvalid}. */
|
|
129
107
|
code: JOSEErrorCode | (string & {});
|
|
130
108
|
}
|
|
131
|
-
/**
|
|
109
|
+
/** Thrown when no keys match in a JWKS. */
|
|
132
110
|
export declare class JWKSNoMatchingKey extends JOSEError {
|
|
133
111
|
static code: JOSEErrorCode | (string & {});
|
|
134
|
-
/** A unique error code for {@link JWKSNoMatchingKey}. */
|
|
135
112
|
code: JOSEErrorCode | (string & {});
|
|
136
113
|
constructor(message?: string, options?: {
|
|
137
114
|
cause?: unknown;
|
|
138
115
|
});
|
|
139
116
|
}
|
|
140
|
-
/**
|
|
117
|
+
/** Thrown when multiple keys match in a JWKS. */
|
|
141
118
|
export declare class JWKSMultipleMatchingKeys extends JOSEError {
|
|
142
119
|
/**
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
* nothing.
|
|
120
|
+
* Yields public keys matching the JWS Header so verification can be attempted with each. See the
|
|
121
|
+
* {@link jwks/remote.createRemoteJWKSet createRemoteJWKSet} and
|
|
122
|
+
* {@link jwks/local.createLocalJWKSet createLocalJWKSet} examples. Empty on manually constructed
|
|
123
|
+
* errors.
|
|
148
124
|
*/
|
|
149
|
-
[Symbol.asyncIterator]: () => AsyncIterableIterator<
|
|
125
|
+
[Symbol.asyncIterator]: () => AsyncIterableIterator<t.CryptoKey>;
|
|
150
126
|
static code: JOSEErrorCode | (string & {});
|
|
151
|
-
/** A unique error code for {@link JWKSMultipleMatchingKeys}. */
|
|
152
127
|
code: JOSEErrorCode | (string & {});
|
|
153
128
|
constructor(message?: string, options?: {
|
|
154
129
|
cause?: unknown;
|
|
155
130
|
});
|
|
156
131
|
}
|
|
157
|
-
/**
|
|
132
|
+
/** Thrown when fetching a remote JWKS times out. */
|
|
158
133
|
export declare class JWKSTimeout extends JOSEError {
|
|
159
134
|
static code: JOSEErrorCode | (string & {});
|
|
160
|
-
/** A unique error code for {@link JWKSTimeout}. */
|
|
161
135
|
code: JOSEErrorCode | (string & {});
|
|
162
136
|
constructor(message?: string, options?: {
|
|
163
137
|
cause?: unknown;
|
|
164
138
|
});
|
|
165
139
|
}
|
|
166
|
-
/**
|
|
140
|
+
/** Thrown when JWS signature verification fails. */
|
|
167
141
|
export declare class JWSSignatureVerificationFailed extends JOSEError {
|
|
168
142
|
static code: JOSEErrorCode | (string & {});
|
|
169
|
-
/** A unique error code for {@link JWSSignatureVerificationFailed}. */
|
|
170
143
|
code: JOSEErrorCode | (string & {});
|
|
171
144
|
constructor(message?: string, options?: {
|
|
172
145
|
cause?: unknown;
|
|
173
146
|
});
|
|
174
147
|
}
|
|
175
|
-
/**
|
|
176
|
-
* Union of the errors thrown during JWT Claims Set validation. {@link JWTExpired} does not extend
|
|
177
|
-
* {@link JWTClaimValidationFailed}, so a single `instanceof` check cannot cover both. Use this type
|
|
178
|
-
* — together with the {@link JOSEError.code code} discriminant — when handling either.
|
|
179
|
-
*/
|
|
148
|
+
/** Errors thrown during JWT Claims Set validation. */
|
|
180
149
|
export type JWTClaimValidationError = JWTClaimValidationFailed | JWTExpired;
|
|
181
150
|
/**
|
|
182
|
-
*
|
|
183
|
-
* {@link
|
|
184
|
-
* that `code` stays assignable, writable, and overridable on them exactly as before, while a value
|
|
185
|
-
* of this type can still be switched over as a discriminated union.
|
|
186
|
-
*
|
|
187
|
-
* > Note: The base {@link JOSEError} is deliberately not a member — its `code` spans every value, which
|
|
188
|
-
* > would defeat the discriminant. A small number of JSON Web Key Set HTTP failures are thrown as the
|
|
189
|
-
* > base class itself, so `instanceof JOSEError` remains the catch-all; this union is for handling a
|
|
190
|
-
* > value already known to be one of the specific errors.
|
|
151
|
+
* Discriminated union of specific {@link JOSEError} subclasses, narrowed by `code`. Excludes base
|
|
152
|
+
* {@link JOSEError} instances; use `instanceof JOSEError` to catch all module errors.
|
|
191
153
|
*/
|
|
192
154
|
export type AnyJOSEError = (JOSEAlgNotAllowed & {
|
|
193
155
|
code: 'ERR_JOSE_ALG_NOT_ALLOWED';
|
|
@@ -1,32 +1,70 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
import * as errors from
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
export {
|
|
32
|
-
|
|
1
|
+
import { compactDecrypt } from "./jwe/compact/decrypt.js";
|
|
2
|
+
import { flattenedDecrypt } from "./jwe/flattened/decrypt.js";
|
|
3
|
+
import { generalDecrypt } from "./jwe/general/decrypt.js";
|
|
4
|
+
import { GeneralEncrypt } from "./jwe/general/encrypt.js";
|
|
5
|
+
import { compactVerify } from "./jws/compact/verify.js";
|
|
6
|
+
import { flattenedVerify } from "./jws/flattened/verify.js";
|
|
7
|
+
import { generalVerify } from "./jws/general/verify.js";
|
|
8
|
+
import { jwtVerify } from "./jwt/verify.js";
|
|
9
|
+
import { jwtDecrypt } from "./jwt/decrypt.js";
|
|
10
|
+
import { CompactEncrypt } from "./jwe/compact/encrypt.js";
|
|
11
|
+
import { FlattenedEncrypt } from "./jwe/flattened/encrypt.js";
|
|
12
|
+
import { CompactSign } from "./jws/compact/sign.js";
|
|
13
|
+
import { FlattenedSign } from "./jws/flattened/sign.js";
|
|
14
|
+
import { GeneralSign } from "./jws/general/sign.js";
|
|
15
|
+
import { SignJWT } from "./jwt/sign.js";
|
|
16
|
+
import { EncryptJWT } from "./jwt/encrypt.js";
|
|
17
|
+
import { calculateJwkThumbprint, calculateJwkThumbprintUri } from "./jwk/thumbprint.js";
|
|
18
|
+
import { EmbeddedJWK } from "./jwk/embedded.js";
|
|
19
|
+
import { createLocalJWKSet } from "./jwks/local.js";
|
|
20
|
+
import { createRemoteJWKSet, jwksCache, customFetch } from "./jwks/remote.js";
|
|
21
|
+
import { UnsecuredJWT } from "./jwt/unsecured.js";
|
|
22
|
+
import { exportPKCS8, exportSPKI, exportJWK } from "./key/export.js";
|
|
23
|
+
import { importSPKI, importPKCS8, importX509, importJWK } from "./key/import.js";
|
|
24
|
+
import { decodeProtectedHeader } from "./util/decode_protected_header.js";
|
|
25
|
+
import { decodeJwt } from "./util/decode_jwt.js";
|
|
26
|
+
import * as errors from "./util/errors.js";
|
|
27
|
+
import { generateKeyPair } from "./key/generate_key_pair.js";
|
|
28
|
+
import { generateSecret } from "./key/generate_secret.js";
|
|
29
|
+
import * as base64url from "./util/base64url.js";
|
|
30
|
+
const cryptoRuntime = "WebCryptoAPI";
|
|
31
|
+
export {
|
|
32
|
+
CompactEncrypt,
|
|
33
|
+
CompactSign,
|
|
34
|
+
EmbeddedJWK,
|
|
35
|
+
EncryptJWT,
|
|
36
|
+
FlattenedEncrypt,
|
|
37
|
+
FlattenedSign,
|
|
38
|
+
GeneralEncrypt,
|
|
39
|
+
GeneralSign,
|
|
40
|
+
SignJWT,
|
|
41
|
+
UnsecuredJWT,
|
|
42
|
+
base64url,
|
|
43
|
+
calculateJwkThumbprint,
|
|
44
|
+
calculateJwkThumbprintUri,
|
|
45
|
+
compactDecrypt,
|
|
46
|
+
compactVerify,
|
|
47
|
+
createLocalJWKSet,
|
|
48
|
+
createRemoteJWKSet,
|
|
49
|
+
cryptoRuntime,
|
|
50
|
+
customFetch,
|
|
51
|
+
decodeJwt,
|
|
52
|
+
decodeProtectedHeader,
|
|
53
|
+
errors,
|
|
54
|
+
exportJWK,
|
|
55
|
+
exportPKCS8,
|
|
56
|
+
exportSPKI,
|
|
57
|
+
flattenedDecrypt,
|
|
58
|
+
flattenedVerify,
|
|
59
|
+
generalDecrypt,
|
|
60
|
+
generalVerify,
|
|
61
|
+
generateKeyPair,
|
|
62
|
+
generateSecret,
|
|
63
|
+
importJWK,
|
|
64
|
+
importPKCS8,
|
|
65
|
+
importSPKI,
|
|
66
|
+
importX509,
|
|
67
|
+
jwksCache,
|
|
68
|
+
jwtDecrypt,
|
|
69
|
+
jwtVerify
|
|
70
|
+
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { prepareDecrypt, decryptCompact } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const result = { plaintext: decrypted[0], protectedHeader: decrypted[1] };
|
|
5
|
-
if (typeof key === 'function') {
|
|
6
|
-
return { ...result, key: decrypted[2] };
|
|
7
|
-
}
|
|
8
|
-
return result;
|
|
1
|
+
import { prepareDecrypt, decryptCompact } from "../../lib/jwe_decrypt.js";
|
|
2
|
+
async function compactDecrypt(jwe, key, options) {
|
|
3
|
+
return decryptCompact(jwe, prepareDecrypt(options), key);
|
|
9
4
|
}
|
|
5
|
+
export {
|
|
6
|
+
compactDecrypt
|
|
7
|
+
};
|
|
@@ -1,49 +1,26 @@
|
|
|
1
|
-
import { assertNotSet } from
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
setProtectedHeader(protectedHeader) {
|
|
25
|
-
assertNotSet(this.#protectedHeader, 'setProtectedHeader');
|
|
26
|
-
this.#protectedHeader = protectedHeader;
|
|
27
|
-
return this;
|
|
28
|
-
}
|
|
29
|
-
setKeyManagementParameters(parameters) {
|
|
30
|
-
assertNotSet(this.#keyManagementParameters, 'setKeyManagementParameters');
|
|
31
|
-
this.#keyManagementParameters = parameters;
|
|
32
|
-
return this;
|
|
33
|
-
}
|
|
34
|
-
async encrypt(key, options) {
|
|
35
|
-
const jwe = await createJWE([
|
|
36
|
-
this.#plaintext,
|
|
37
|
-
this.#protectedHeader,
|
|
38
|
-
undefined,
|
|
39
|
-
undefined,
|
|
40
|
-
undefined,
|
|
41
|
-
this.#cek,
|
|
42
|
-
this.#iv,
|
|
43
|
-
this.#keyManagementParameters,
|
|
44
|
-
undefined,
|
|
45
|
-
false,
|
|
46
|
-
], key, options);
|
|
47
|
-
return [jwe.protected, jwe.encrypted_key, jwe.iv, jwe.ciphertext, jwe.tag].join('.');
|
|
48
|
-
}
|
|
1
|
+
import { assertNotSet, assertUint8Array } from "../../lib/validate.js";
|
|
2
|
+
import { compactJWE, createJWE } from "../../lib/jwe_encrypt.js";
|
|
3
|
+
class CompactEncrypt {
|
|
4
|
+
#input;
|
|
5
|
+
constructor(plaintext) {
|
|
6
|
+
assertUint8Array(plaintext, "plaintext"), this.#input = [plaintext];
|
|
7
|
+
}
|
|
8
|
+
setContentEncryptionKey(cek) {
|
|
9
|
+
return assertNotSet(this.#input[5], "setContentEncryptionKey"), this.#input[5] = cek, this;
|
|
10
|
+
}
|
|
11
|
+
setInitializationVector(iv) {
|
|
12
|
+
return assertNotSet(this.#input[6], "setInitializationVector"), this.#input[6] = iv, this;
|
|
13
|
+
}
|
|
14
|
+
setProtectedHeader(protectedHeader) {
|
|
15
|
+
return assertNotSet(this.#input[1], "setProtectedHeader"), this.#input[1] = protectedHeader, this;
|
|
16
|
+
}
|
|
17
|
+
setKeyManagementParameters(parameters) {
|
|
18
|
+
return assertNotSet(this.#input[7], "setKeyManagementParameters"), this.#input[7] = parameters, this;
|
|
19
|
+
}
|
|
20
|
+
async encrypt(key, options) {
|
|
21
|
+
return compactJWE(await createJWE([...this.#input], key, options));
|
|
22
|
+
}
|
|
49
23
|
}
|
|
24
|
+
export {
|
|
25
|
+
CompactEncrypt
|
|
26
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { JWEInvalid } from
|
|
2
|
-
import { isObject } from
|
|
3
|
-
import { prepareDecrypt, decryptJWE,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const snapshot = { ...shared, ...recipient };
|
|
13
|
-
checkRecipient(snapshot);
|
|
14
|
-
return decryptResult(snapshot, await decryptJWE(snapshot, prepareDecrypt(options), key));
|
|
1
|
+
import { JWEInvalid } from "../../util/errors.js";
|
|
2
|
+
import { isObject } from "../../lib/validate.js";
|
|
3
|
+
import { prepareDecrypt, decryptJWE, checkRecipient, snapshotSharedJWE, snapshotRecipientJWE } from "../../lib/jwe_decrypt.js";
|
|
4
|
+
async function flattenedDecrypt(jwe, key, options) {
|
|
5
|
+
if (!isObject(jwe))
|
|
6
|
+
throw new JWEInvalid("Flattened JWE must be an object");
|
|
7
|
+
const shared = snapshotSharedJWE(jwe), [recipient, , error] = snapshotRecipientJWE(jwe);
|
|
8
|
+
if (!recipient)
|
|
9
|
+
throw error;
|
|
10
|
+
const snapshot = { ...shared, ...recipient };
|
|
11
|
+
return checkRecipient(snapshot), decryptJWE(snapshot, prepareDecrypt(options), key);
|
|
15
12
|
}
|
|
13
|
+
export {
|
|
14
|
+
flattenedDecrypt
|
|
15
|
+
};
|
|
@@ -1,65 +1,35 @@
|
|
|
1
|
-
import { assertNotSet } from
|
|
2
|
-
import { createJWE } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
setUnprotectedHeader(unprotectedHeader) {
|
|
33
|
-
assertNotSet(this.#unprotectedHeader, 'setUnprotectedHeader');
|
|
34
|
-
this.#unprotectedHeader = unprotectedHeader;
|
|
35
|
-
return this;
|
|
36
|
-
}
|
|
37
|
-
setAdditionalAuthenticatedData(aad) {
|
|
38
|
-
this.#aad = aad;
|
|
39
|
-
return this;
|
|
40
|
-
}
|
|
41
|
-
setContentEncryptionKey(cek) {
|
|
42
|
-
assertNotSet(this.#cek, 'setContentEncryptionKey');
|
|
43
|
-
this.#cek = cek;
|
|
44
|
-
return this;
|
|
45
|
-
}
|
|
46
|
-
setInitializationVector(iv) {
|
|
47
|
-
assertNotSet(this.#iv, 'setInitializationVector');
|
|
48
|
-
this.#iv = iv;
|
|
49
|
-
return this;
|
|
50
|
-
}
|
|
51
|
-
async encrypt(key, options) {
|
|
52
|
-
return createJWE([
|
|
53
|
-
this.#plaintext,
|
|
54
|
-
this.#protectedHeader,
|
|
55
|
-
this.#unprotectedHeader,
|
|
56
|
-
this.#sharedUnprotectedHeader,
|
|
57
|
-
this.#aad,
|
|
58
|
-
this.#cek,
|
|
59
|
-
this.#iv,
|
|
60
|
-
this.#keyManagementParameters,
|
|
61
|
-
undefined,
|
|
62
|
-
false,
|
|
63
|
-
], key, options);
|
|
64
|
-
}
|
|
1
|
+
import { assertNotSet, assertUint8Array } from "../../lib/validate.js";
|
|
2
|
+
import { createJWE } from "../../lib/jwe_encrypt.js";
|
|
3
|
+
class FlattenedEncrypt {
|
|
4
|
+
#input;
|
|
5
|
+
constructor(plaintext) {
|
|
6
|
+
assertUint8Array(plaintext, "plaintext"), this.#input = [plaintext];
|
|
7
|
+
}
|
|
8
|
+
setKeyManagementParameters(parameters) {
|
|
9
|
+
return assertNotSet(this.#input[7], "setKeyManagementParameters"), this.#input[7] = parameters, this;
|
|
10
|
+
}
|
|
11
|
+
setProtectedHeader(protectedHeader) {
|
|
12
|
+
return assertNotSet(this.#input[1], "setProtectedHeader"), this.#input[1] = protectedHeader, this;
|
|
13
|
+
}
|
|
14
|
+
setSharedUnprotectedHeader(sharedUnprotectedHeader) {
|
|
15
|
+
return assertNotSet(this.#input[3], "setSharedUnprotectedHeader"), this.#input[3] = sharedUnprotectedHeader, this;
|
|
16
|
+
}
|
|
17
|
+
setUnprotectedHeader(unprotectedHeader) {
|
|
18
|
+
return assertNotSet(this.#input[2], "setUnprotectedHeader"), this.#input[2] = unprotectedHeader, this;
|
|
19
|
+
}
|
|
20
|
+
setAdditionalAuthenticatedData(aad) {
|
|
21
|
+
return this.#input[4] = aad, this;
|
|
22
|
+
}
|
|
23
|
+
setContentEncryptionKey(cek) {
|
|
24
|
+
return assertNotSet(this.#input[5], "setContentEncryptionKey"), this.#input[5] = cek, this;
|
|
25
|
+
}
|
|
26
|
+
setInitializationVector(iv) {
|
|
27
|
+
return assertNotSet(this.#input[6], "setInitializationVector"), this.#input[6] = iv, this;
|
|
28
|
+
}
|
|
29
|
+
async encrypt(key, options) {
|
|
30
|
+
return createJWE([...this.#input], key, options);
|
|
31
|
+
}
|
|
65
32
|
}
|
|
33
|
+
export {
|
|
34
|
+
FlattenedEncrypt
|
|
35
|
+
};
|