unjwt 0.7.1 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/_internal.mjs +5 -5
- package/dist/_chunks/index.d.mts +42 -17
- package/dist/_chunks/jwe.d.mts +2 -2
- package/dist/_chunks/jwe.mjs +5 -5
- package/dist/_chunks/jwk.mjs +51 -35
- package/dist/_chunks/jws.d.mts +2 -2
- package/dist/_chunks/jws.mjs +6 -6
- package/dist/_chunks/libs/unsecure.d.mts +1 -1
- package/dist/_chunks/libs/unsecure.mjs +3 -3
- package/dist/_chunks/utils.mjs +8 -6
- package/dist/adapters/elysia/index.d.mts +244 -0
- package/dist/adapters/elysia/index.mjs +608 -0
- package/dist/adapters/h3v1/index.d.mts +120 -42
- package/dist/adapters/h3v1/index.mjs +18 -15
- package/dist/adapters/h3v2/index.d.mts +140 -20
- package/dist/adapters/h3v2/index.mjs +18 -15
- package/dist/core/jwe.d.mts +3 -3
- package/dist/core/jwe.mjs +2 -2
- package/dist/core/jwk.d.mts +10 -10
- package/dist/core/jwk.mjs +2 -2
- package/dist/core/jws.d.mts +3 -3
- package/dist/core/jws.mjs +2 -2
- package/dist/core/utils/index.d.mts +24 -8
- package/dist/core/utils/index.mjs +2 -2
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +34 -21
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Duration, ExpiresIn, JWK, JWKSet, JWK_EC_Private, JWK_EC_Public, JWK_OKP_Private, JWK_OKP_Public, JWK_Private, JWK_Public, JWK_RSA_Private, JWK_RSA_Public, JWK_oct, JWSAlgorithm, JWTClaimValidationOptions, JWTClaims, KeyManagementAlgorithm, StrictOmit } from "../../_chunks/index.mjs";
|
|
2
|
+
import { base64Decode, base64Encode, base64UrlDecode, base64UrlEncode, safeJsonParse, sanitizeObject, sanitizeObjectCopy, secureRandomBytes, textDecoder, textEncoder } from "../../_chunks/libs/unsecure.mjs";
|
|
3
3
|
/**
|
|
4
4
|
* Infer the set of JWS signing algorithms a key unambiguously supports.
|
|
5
5
|
* Returns `undefined` when inference is not possible — callers must pass
|
|
@@ -93,7 +93,10 @@ declare function validateCriticalHeadersJWE(protectedHeader: {
|
|
|
93
93
|
declare function concatUint8Arrays(...arrays: Readonly<Uint8Array<ArrayBuffer>[]>): Uint8Array<ArrayBuffer>;
|
|
94
94
|
/** Wrap a value in an array; returns the array unchanged if already an array. */
|
|
95
95
|
declare function maybeArray<T>(item: T | T[]): T[];
|
|
96
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* Type guard for {@link JWK} — an object whose `kty` this library models
|
|
98
|
+
* (`"oct"`/`"RSA"`/`"EC"`/`"OKP"`).
|
|
99
|
+
*/
|
|
97
100
|
declare function isJWK(key: any): key is JWK;
|
|
98
101
|
/** Type guard for {@link JWKSet} — checks for an object with a `keys` array. */
|
|
99
102
|
declare function isJWKSet(key: any): key is JWKSet;
|
|
@@ -109,6 +112,11 @@ declare const isCryptoKeyPair: (key: any) => key is CryptoKeyPair;
|
|
|
109
112
|
/**
|
|
110
113
|
* Returns true if the JWK is a symmetric (oct) key.
|
|
111
114
|
*
|
|
115
|
+
* NOTE: a symmetric JWK's `k` is always secret key material. {@link isPrivateJWK}
|
|
116
|
+
* returns `false` for `oct` keys (it only detects asymmetric `d`), so use this
|
|
117
|
+
* guard — not `!isPrivateJWK(key)` — when deciding whether a JWK is safe to
|
|
118
|
+
* publish.
|
|
119
|
+
*
|
|
112
120
|
* The `T` inference preserves the caller's narrowed alg type — passing a
|
|
113
121
|
* `JWK_oct<"HS256">` refines to `JWK_oct<"HS256">`, not `JWK_oct<string>`.
|
|
114
122
|
*/
|
|
@@ -124,19 +132,27 @@ declare function isSymmetricJWK(key: unknown): key is JWK_oct;
|
|
|
124
132
|
declare function isAsymmetricJWK<T>(key: T): key is Exclude<T, JWK_oct>;
|
|
125
133
|
declare function isAsymmetricJWK(key: unknown): key is Exclude<JWK, JWK_oct>;
|
|
126
134
|
/**
|
|
127
|
-
* Type guard that checks if the provided JWK contains private key
|
|
128
|
-
* It relies purely on the presence of private components (e.g. "d"),
|
|
135
|
+
* Type guard that checks if the provided JWK contains *asymmetric* private key
|
|
136
|
+
* material. It relies purely on the presence of private components (e.g. "d"),
|
|
137
|
+
* not on the alg value.
|
|
138
|
+
*
|
|
139
|
+
* WARNING: this returns `false` for symmetric (`oct`) keys — their `k` is secret
|
|
140
|
+
* material too, but it is not a `d` component. `!isPrivateJWK(key)` is therefore
|
|
141
|
+
* NOT a "safe to share" check: it passes every `oct` key. To filter keys that
|
|
142
|
+
* are safe to publish, use {@link isPublicJWK} (true only for asymmetric public
|
|
143
|
+
* keys); to detect any secret material, combine with {@link isSymmetricJWK}.
|
|
129
144
|
*
|
|
130
145
|
* Preserves narrow alg types from the caller.
|
|
131
146
|
*/
|
|
132
147
|
declare function isPrivateJWK<T>(key: T): key is Extract<T, JWK_EC_Private | JWK_OKP_Private | JWK_RSA_Private>;
|
|
133
148
|
declare function isPrivateJWK(key: unknown): key is JWK_Private;
|
|
134
149
|
/**
|
|
135
|
-
* Type guard that checks if the provided JWK is a public (asymmetric) key
|
|
136
|
-
*
|
|
150
|
+
* Type guard that checks if the provided JWK is a public (asymmetric) key:
|
|
151
|
+
* public components present, no private `d`. Returns `false` for `oct` keys
|
|
152
|
+
* (which are always secret), making it the correct "safe to publish" predicate.
|
|
137
153
|
*
|
|
138
154
|
* Preserves narrow alg types from the caller.
|
|
139
155
|
*/
|
|
140
156
|
declare function isPublicJWK<T>(key: T): key is Exclude<Extract<T, JWK_EC_Public | JWK_OKP_Public | JWK_RSA_Public>, JWK_Private>;
|
|
141
157
|
declare function isPublicJWK(key: unknown): key is JWK_Public;
|
|
142
|
-
export { ComputeJwtTimeClaimsOptions, StrictOmit, applyTypCtyDefaults, assertCryptoKey, base64Decode, base64Encode, base64UrlDecode, base64UrlEncode, computeDurationInSeconds, computeExpiresInSeconds, computeJwtTimeClaims, computeMaxTokenAgeSeconds, concatUint8Arrays, decodeMaybeJWTString, decodePayloadFromB64UrlSegment, decodePayloadFromBytes, getPlaintextBytes, inferJWEAllowedAlgorithms, inferJWSAllowedAlgorithms, isAsymmetricJWK, isCryptoKey, isCryptoKeyPair, isJWK, isJWKSet, isJWTContent, isPrivateJWK, isPublicJWK, isSymmetricJWK, maybeArray, safeJsonParse, sanitizeObject, sanitizeObjectCopy, secureRandomBytes, textDecoder, textEncoder, validateCriticalHeadersJWE, validateCriticalHeadersJWS, validateJwtClaims };
|
|
158
|
+
export { ComputeJwtTimeClaimsOptions, type StrictOmit, applyTypCtyDefaults, assertCryptoKey, base64Decode, base64Encode, base64UrlDecode, base64UrlEncode, computeDurationInSeconds, computeExpiresInSeconds, computeJwtTimeClaims, computeMaxTokenAgeSeconds, concatUint8Arrays, decodeMaybeJWTString, decodePayloadFromB64UrlSegment, decodePayloadFromBytes, getPlaintextBytes, inferJWEAllowedAlgorithms, inferJWSAllowedAlgorithms, isAsymmetricJWK, isCryptoKey, isCryptoKeyPair, isJWK, isJWKSet, isJWTContent, isPrivateJWK, isPublicJWK, isSymmetricJWK, maybeArray, safeJsonParse, sanitizeObject, sanitizeObjectCopy, secureRandomBytes, textDecoder, textEncoder, validateCriticalHeadersJWE, validateCriticalHeadersJWS, validateJwtClaims };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { applyTypCtyDefaults, assertCryptoKey, computeDurationInSeconds, computeExpiresInSeconds, computeJwtTimeClaims, computeMaxTokenAgeSeconds, concatUint8Arrays, decodeMaybeJWTString, decodePayloadFromB64UrlSegment, decodePayloadFromBytes, getPlaintextBytes, inferJWEAllowedAlgorithms, inferJWSAllowedAlgorithms, isAsymmetricJWK, isCryptoKey, isCryptoKeyPair, isJWK, isJWKSet, isJWTContent, isPrivateJWK, isPublicJWK, isSymmetricJWK, maybeArray, validateCriticalHeadersJWE, validateCriticalHeadersJWS, validateJwtClaims } from "../../_chunks/utils.mjs";
|
|
2
|
+
import { base64Decode, base64Encode, base64UrlDecode, base64UrlEncode, safeJsonParse, sanitizeObject, sanitizeObjectCopy, secureRandomBytes, textDecoder, textEncoder } from "../../_chunks/libs/unsecure.mjs";
|
|
3
3
|
export { applyTypCtyDefaults, assertCryptoKey, base64Decode, base64Encode, base64UrlDecode, base64UrlEncode, computeDurationInSeconds, computeExpiresInSeconds, computeJwtTimeClaims, computeMaxTokenAgeSeconds, concatUint8Arrays, decodeMaybeJWTString, decodePayloadFromB64UrlSegment, decodePayloadFromBytes, getPlaintextBytes, inferJWEAllowedAlgorithms, inferJWSAllowedAlgorithms, isAsymmetricJWK, isCryptoKey, isCryptoKeyPair, isJWK, isJWKSet, isJWTContent, isPrivateJWK, isPublicJWK, isSymmetricJWK, maybeArray, safeJsonParse, sanitizeObject, sanitizeObjectCopy, secureRandomBytes, textDecoder, textEncoder, validateCriticalHeadersJWE, validateCriticalHeadersJWS, validateJwtClaims };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CompositeKey, ContentEncryptionAlgorithm, DeriveKeyOptions, DeriveKeyReturn, Duration, ExpiresIn, GenerateJWKOptions, GenerateJWKReturn, GenerateKeyAlgorithm, GenerateKeyOptions, GenerateKeyReturn, JOSEPayload, JWEAsymmetricPrivateJWK, JWEAsymmetricPublicJWK, JWEDecryptJWK, JWEDecryptOptions, JWEDecryptResult, JWEEncryptJWK, JWEEncryptOptions, JWEFlattenedSerialization, JWEGeneralRecipient, JWEGeneralSerialization, JWEHeaderParameters, JWEKeyManagementHeaderParameters, JWEMultiDecryptOptions, JWEMultiDecryptResult, JWEMultiEncryptOptions, JWEMultiRecipient, JWEProtectedHeader, JWK, JWKAlgorithm, JWKCacheAdapter, JWKLookupFunction, JWKLookupFunctionHeader, JWKPEMAlgorithm, JWKParameters, JWKSet, JWK_AES_CBC_HMAC, JWK_AES_GCM, JWK_AES_GCM_KW, JWK_AES_KW, JWK_Asymmetric, JWK_Asymmetric_Algorithm, JWK_EC, JWK_ECDH_ES, JWK_ECDSA, JWK_EC_Private, JWK_EC_Public, JWK_HMAC, JWK_OKP, JWK_OKP_Private, JWK_OKP_Public, JWK_OKP_SIGN, JWK_PBES2, JWK_Pair, JWK_Private, JWK_Public, JWK_RSA, JWK_RSA_ENC, JWK_RSA_PSS, JWK_RSA_Private, JWK_RSA_Public, JWK_RSA_SIGN, JWK_Symmetric, JWK_Symmetric_Algorithm, JWK_oct, JWSAlgorithm, JWSAsymmetricPrivateJWK, JWSAsymmetricPublicJWK, JWSFlattenedSerialization, JWSGeneralSerialization, JWSGeneralSignature, JWSHeaderParameters, JWSMultiSignOptions, JWSMultiSigner, JWSMultiVerifyAllOptions, JWSMultiVerifyOptions, JWSMultiVerifyOutcome, JWSMultiVerifyResult, JWSProtectedHeader, JWSSignJWK, JWSSignOptions, JWSVerifyJWK, JWSVerifyOptions, JWSVerifyResult, JWT, JWTClaimValidationOptions, JWTClaims, JWTError, JWTErrorCauseMap, JWTErrorCode, JoseHeaderParameters, KeyManagementAlgorithm, MaxTokenAge, NotBeforeIn, UnwrapKeyOptions, UnwrappingKeyFor, WrapKeyOptions, WrapKeyResult, WrappingKeyFor, isJWTError } from "./_chunks/index.mjs";
|
|
2
2
|
import { WeakMapJWKCache, clearJWKCache, configureJWKCache, deriveJWKFromPassword, deriveKeyFromPassword, deriveSharedSecret, exportKey, exportPEM, exportToPEM, generateJWK, generateKey, getJWKFromSet, getJWKsFromSet, importFromPEM, importKey, importPEM, unwrapKey, wrapKey } from "./core/jwk.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { decrypt, decryptMulti, encrypt, encryptMulti, generalToFlattened } from "./_chunks/jwe.mjs";
|
|
4
|
+
import { generalToFlattenedJWS, sign, signMulti, verify, verifyMulti, verifyMultiAll } from "./_chunks/jws.mjs";
|
|
5
5
|
import { assertCryptoKey, computeDurationInSeconds, computeExpiresInSeconds, computeMaxTokenAgeSeconds, isAsymmetricJWK, isCryptoKey, isCryptoKeyPair, isJWK, isJWKSet, isPrivateJWK, isPublicJWK, isSymmetricJWK, validateJwtClaims } from "./core/utils/index.mjs";
|
|
6
|
-
export { CompositeKey, ContentEncryptionAlgorithm, DeriveKeyOptions, DeriveKeyReturn, Duration, ExpiresIn, GenerateJWKOptions, GenerateJWKReturn, GenerateKeyAlgorithm, GenerateKeyOptions, GenerateKeyReturn, JOSEPayload, JWEAsymmetricPrivateJWK, JWEAsymmetricPublicJWK, JWEDecryptJWK, JWEDecryptOptions, JWEDecryptResult, JWEEncryptJWK, JWEEncryptOptions, JWEFlattenedSerialization, JWEGeneralRecipient, JWEGeneralSerialization, JWEHeaderParameters, JWEKeyManagementHeaderParameters, JWEMultiDecryptOptions, JWEMultiDecryptResult, JWEMultiEncryptOptions, JWEMultiRecipient, JWEProtectedHeader, JWK, JWKAlgorithm, JWKCacheAdapter, JWKLookupFunction, JWKLookupFunctionHeader, JWKPEMAlgorithm, JWKParameters, JWKSet, JWK_AES_CBC_HMAC, JWK_AES_GCM, JWK_AES_GCM_KW, JWK_AES_KW, JWK_Asymmetric, JWK_Asymmetric_Algorithm, JWK_EC, JWK_ECDH_ES, JWK_ECDSA, JWK_EC_Private, JWK_EC_Public, JWK_HMAC, JWK_OKP, JWK_OKP_Private, JWK_OKP_Public, JWK_OKP_SIGN, JWK_PBES2, JWK_Pair, JWK_Private, JWK_Public, JWK_RSA, JWK_RSA_ENC, JWK_RSA_PSS, JWK_RSA_Private, JWK_RSA_Public, JWK_RSA_SIGN, JWK_Symmetric, JWK_Symmetric_Algorithm, JWK_oct, JWSAlgorithm, JWSAsymmetricPrivateJWK, JWSAsymmetricPublicJWK, JWSFlattenedSerialization, JWSGeneralSerialization, JWSGeneralSignature, JWSHeaderParameters, JWSMultiSignOptions, JWSMultiSigner, JWSMultiVerifyAllOptions, JWSMultiVerifyOptions, JWSMultiVerifyOutcome, JWSMultiVerifyResult, JWSProtectedHeader, JWSSignJWK, JWSSignOptions, JWSVerifyJWK, JWSVerifyOptions, JWSVerifyResult, JWT, JWTClaimValidationOptions, JWTClaims, JWTError, type JWTErrorCauseMap, type JWTErrorCode, JoseHeaderParameters, KeyManagementAlgorithm, MaxTokenAge, NotBeforeIn, UnwrapKeyOptions, UnwrappingKeyFor, WeakMapJWKCache, WrapKeyOptions, WrapKeyResult, WrappingKeyFor, assertCryptoKey, clearJWKCache, computeDurationInSeconds, computeExpiresInSeconds, computeMaxTokenAgeSeconds, configureJWKCache, decrypt, decryptMulti, deriveJWKFromPassword, deriveKeyFromPassword, deriveSharedSecret, encrypt, encryptMulti, exportKey, exportPEM, exportToPEM, generalToFlattened, generalToFlattenedJWS, generateJWK, generateKey, getJWKFromSet, getJWKsFromSet, importFromPEM, importKey, importPEM, isAsymmetricJWK, isCryptoKey, isCryptoKeyPair, isJWK, isJWKSet, isJWTError, isPrivateJWK, isPublicJWK, isSymmetricJWK, sign, signMulti, unwrapKey, validateJwtClaims, verify, verifyMulti, verifyMultiAll, wrapKey };
|
|
6
|
+
export { type CompositeKey, type ContentEncryptionAlgorithm, type DeriveKeyOptions, type DeriveKeyReturn, type Duration, type ExpiresIn, type GenerateJWKOptions, type GenerateJWKReturn, type GenerateKeyAlgorithm, type GenerateKeyOptions, type GenerateKeyReturn, type JOSEPayload, type JWEAsymmetricPrivateJWK, type JWEAsymmetricPublicJWK, type JWEDecryptJWK, type JWEDecryptOptions, type JWEDecryptResult, type JWEEncryptJWK, type JWEEncryptOptions, type JWEFlattenedSerialization, type JWEGeneralRecipient, type JWEGeneralSerialization, type JWEHeaderParameters, type JWEKeyManagementHeaderParameters, type JWEMultiDecryptOptions, type JWEMultiDecryptResult, type JWEMultiEncryptOptions, type JWEMultiRecipient, type JWEProtectedHeader, type JWK, type JWKAlgorithm, type JWKCacheAdapter, type JWKLookupFunction, type JWKLookupFunctionHeader, type JWKPEMAlgorithm, type JWKParameters, type JWKSet, type JWK_AES_CBC_HMAC, type JWK_AES_GCM, type JWK_AES_GCM_KW, type JWK_AES_KW, type JWK_Asymmetric, type JWK_Asymmetric_Algorithm, type JWK_EC, type JWK_ECDH_ES, type JWK_ECDSA, type JWK_EC_Private, type JWK_EC_Public, type JWK_HMAC, type JWK_OKP, type JWK_OKP_Private, type JWK_OKP_Public, type JWK_OKP_SIGN, type JWK_PBES2, type JWK_Pair, type JWK_Private, type JWK_Public, type JWK_RSA, type JWK_RSA_ENC, type JWK_RSA_PSS, type JWK_RSA_Private, type JWK_RSA_Public, type JWK_RSA_SIGN, type JWK_Symmetric, type JWK_Symmetric_Algorithm, type JWK_oct, type JWSAlgorithm, type JWSAsymmetricPrivateJWK, type JWSAsymmetricPublicJWK, type JWSFlattenedSerialization, type JWSGeneralSerialization, type JWSGeneralSignature, type JWSHeaderParameters, type JWSMultiSignOptions, type JWSMultiSigner, type JWSMultiVerifyAllOptions, type JWSMultiVerifyOptions, type JWSMultiVerifyOutcome, type JWSMultiVerifyResult, type JWSProtectedHeader, type JWSSignJWK, type JWSSignOptions, type JWSVerifyJWK, type JWSVerifyOptions, type JWSVerifyResult, type JWT, type JWTClaimValidationOptions, type JWTClaims, JWTError, type JWTErrorCauseMap, type JWTErrorCode, type JoseHeaderParameters, type KeyManagementAlgorithm, type MaxTokenAge, type NotBeforeIn, type UnwrapKeyOptions, type UnwrappingKeyFor, WeakMapJWKCache, type WrapKeyOptions, type WrapKeyResult, type WrappingKeyFor, assertCryptoKey, clearJWKCache, computeDurationInSeconds, computeExpiresInSeconds, computeMaxTokenAgeSeconds, configureJWKCache, decrypt, decryptMulti, deriveJWKFromPassword, deriveKeyFromPassword, deriveSharedSecret, encrypt, encryptMulti, exportKey, exportPEM, exportToPEM, generalToFlattened, generalToFlattenedJWS, generateJWK, generateKey, getJWKFromSet, getJWKsFromSet, importFromPEM, importKey, importPEM, isAsymmetricJWK, isCryptoKey, isCryptoKeyPair, isJWK, isJWKSet, isJWTError, isPrivateJWK, isPublicJWK, isSymmetricJWK, sign, signMulti, unwrapKey, validateJwtClaims, verify, verifyMulti, verifyMultiAll, wrapKey };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { JWTError, assertCryptoKey, computeDurationInSeconds, computeExpiresInSeconds, computeMaxTokenAgeSeconds, isAsymmetricJWK, isCryptoKey, isCryptoKeyPair, isJWK, isJWKSet, isJWTError, isPrivateJWK, isPublicJWK, isSymmetricJWK, validateJwtClaims } from "./_chunks/utils.mjs";
|
|
2
|
+
import { WeakMapJWKCache, clearJWKCache, configureJWKCache, deriveJWKFromPassword, deriveKeyFromPassword, deriveSharedSecret, exportKey, exportPEM, exportToPEM, generateJWK, generateKey, getJWKFromSet, getJWKsFromSet, importFromPEM, importKey, importPEM, unwrapKey, wrapKey } from "./_chunks/jwk.mjs";
|
|
3
|
+
import { generalToFlattenedJWS, sign, signMulti, verify, verifyMulti, verifyMultiAll } from "./_chunks/jws.mjs";
|
|
4
|
+
import { decrypt, decryptMulti, encrypt, encryptMulti, generalToFlattened } from "./_chunks/jwe.mjs";
|
|
5
5
|
export { JWTError, WeakMapJWKCache, assertCryptoKey, clearJWKCache, computeDurationInSeconds, computeExpiresInSeconds, computeMaxTokenAgeSeconds, configureJWKCache, decrypt, decryptMulti, deriveJWKFromPassword, deriveKeyFromPassword, deriveSharedSecret, encrypt, encryptMulti, exportKey, exportPEM, exportToPEM, generalToFlattened, generalToFlattenedJWS, generateJWK, generateKey, getJWKFromSet, getJWKsFromSet, importFromPEM, importKey, importPEM, isAsymmetricJWK, isCryptoKey, isCryptoKeyPair, isJWK, isJWKSet, isJWTError, isPrivateJWK, isPublicJWK, isSymmetricJWK, sign, signMulti, unwrapKey, validateJwtClaims, verify, verifyMulti, verifyMultiAll, wrapKey };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unjwt",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"description": "Low-level JWT utilities",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -51,40 +51,48 @@
|
|
|
51
51
|
"./adapters/h3v2": {
|
|
52
52
|
"types": "./dist/adapters/h3v2/index.d.mts",
|
|
53
53
|
"default": "./dist/adapters/h3v2/index.mjs"
|
|
54
|
+
},
|
|
55
|
+
"./adapters/elysia": {
|
|
56
|
+
"types": "./dist/adapters/elysia/index.d.mts",
|
|
57
|
+
"default": "./dist/adapters/elysia/index.mjs"
|
|
54
58
|
}
|
|
55
59
|
},
|
|
56
60
|
"devDependencies": {
|
|
57
|
-
"@types/node": "^
|
|
61
|
+
"@types/node": "^25",
|
|
58
62
|
"@types/supertest": "^7.2.0",
|
|
59
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
60
|
-
"@vitest/coverage-v8": "^4.1.
|
|
63
|
+
"@typescript/native-preview": "7.0.0-dev.20260611.2",
|
|
64
|
+
"@vitest/coverage-v8": "^4.1.9",
|
|
61
65
|
"automd": "^0.4.3",
|
|
62
|
-
"changelogen": "^0.6.2",
|
|
63
66
|
"cookie-esv1": "npm:cookie-es@^1.2.3",
|
|
64
67
|
"cookie-esv3": "npm:cookie-es@^3.1.1",
|
|
68
|
+
"elysia": "^1.4.29",
|
|
65
69
|
"h3v1": "npm:h3@^1.15.11",
|
|
66
|
-
"h3v2": "npm:h3@^2.0.1-rc.
|
|
67
|
-
"jose": "^6.2.
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"oxlint": "^
|
|
72
|
-
"rolldown": "1.
|
|
70
|
+
"h3v2": "npm:h3@^2.0.1-rc.22",
|
|
71
|
+
"jose": "^6.2.3",
|
|
72
|
+
"obuild": "^0.4.37",
|
|
73
|
+
"oxfmt": "^0.57.0",
|
|
74
|
+
"oxlint": "^1.72.0",
|
|
75
|
+
"oxlint-tsgolint": "^0.24.0",
|
|
76
|
+
"rolldown": "1.1.4",
|
|
73
77
|
"simple-git-hooks": "^2.13.1",
|
|
74
78
|
"supertest": "^7.2.2",
|
|
75
79
|
"typescript": "^6.0.3",
|
|
76
80
|
"unsecure": "^0.2.2",
|
|
77
|
-
"vitest": "^4.1.
|
|
81
|
+
"vitest": "^4.1.9"
|
|
78
82
|
},
|
|
79
83
|
"peerDependencies": {
|
|
80
84
|
"cookie-es": "^1.2.3 || ^3.1.1",
|
|
81
|
-
"
|
|
85
|
+
"elysia": "^1.4.0",
|
|
86
|
+
"h3": "^1.15.4 || >=2.0.1-rc.22 || ^2.0.1",
|
|
82
87
|
"rou3": "^0.8.1"
|
|
83
88
|
},
|
|
84
89
|
"peerDependenciesMeta": {
|
|
85
90
|
"cookie-es": {
|
|
86
91
|
"optional": true
|
|
87
92
|
},
|
|
93
|
+
"elysia": {
|
|
94
|
+
"optional": true
|
|
95
|
+
},
|
|
88
96
|
"h3": {
|
|
89
97
|
"optional": true
|
|
90
98
|
},
|
|
@@ -96,12 +104,19 @@
|
|
|
96
104
|
"unjwt": "link:."
|
|
97
105
|
},
|
|
98
106
|
"simple-git-hooks": {
|
|
99
|
-
"pre-commit": "
|
|
107
|
+
"pre-commit": "pnpm build --stub && pnpm lint && pnpm typecheck"
|
|
100
108
|
},
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
|
|
109
|
+
"devEngines": {
|
|
110
|
+
"packageManager": {
|
|
111
|
+
"name": "pnpm",
|
|
112
|
+
"version": "11.9.0",
|
|
113
|
+
"onFail": "download"
|
|
114
|
+
},
|
|
115
|
+
"runtime": {
|
|
116
|
+
"name": "node",
|
|
117
|
+
"version": ">=24.17",
|
|
118
|
+
"onFail": "error"
|
|
119
|
+
}
|
|
105
120
|
},
|
|
106
121
|
"scripts": {
|
|
107
122
|
"build": "obuild",
|
|
@@ -109,8 +124,6 @@
|
|
|
109
124
|
"dev:prepare": "obuild --stub && pnpm simple-git-hooks",
|
|
110
125
|
"lint": "oxlint . && oxfmt --check .",
|
|
111
126
|
"fmt": "automd && oxlint --fix . && oxfmt .",
|
|
112
|
-
"release": "pnpm test && pnpm prepack && changelogen --release --push",
|
|
113
|
-
"stub": "obuild --stub",
|
|
114
127
|
"test": "vitest run --slowTestThreshold=1000",
|
|
115
128
|
"test:coverage": "vitest run --coverage --slowTestThreshold=1000",
|
|
116
129
|
"typecheck": "tsgo --noEmit",
|