From 91dc8b7af3dd7421d8ef048e03232cd7360e490d Mon Sep 17 00:00:00 2001 From: Diane Huxley Date: Thu, 18 Jan 2024 11:20:01 -0800 Subject: [PATCH 01/16] Fold paymentInstructions inside payin and payout (#140) * Fold paymentInstructions inside payin and payout * Update submodule to latest main --- packages/protocol/src/dev-tools.ts | 22 +++++++++----------- packages/protocol/src/message-kinds/quote.ts | 6 ------ packages/protocol/src/types.ts | 15 ++----------- tbdex | 2 +- 4 files changed, 13 insertions(+), 32 deletions(-) diff --git a/packages/protocol/src/dev-tools.ts b/packages/protocol/src/dev-tools.ts index cf372468..029a0764 100644 --- a/packages/protocol/src/dev-tools.ts +++ b/packages/protocol/src/dev-tools.ts @@ -175,20 +175,18 @@ export class DevTools { return { expiresAt : new Date().toISOString(), payin : { - currencyCode : 'BTC', - amount : '0.01', - fee : '0.0001' - }, - payout: { - currencyCode : 'USD', - amount : '1000.00' - }, - paymentInstructions: { - payin: { + currencyCode : 'BTC', + amount : '0.01', + fee : '0.0001', + paymentInstruction : { link : 'tbdex.io/example', instruction : 'Fake instruction' - }, - payout: { + } + }, + payout: { + currencyCode : 'USD', + amount : '1000.00', + paymentInstruction : { link : 'tbdex.io/example', instruction : 'Fake instruction' } diff --git a/packages/protocol/src/message-kinds/quote.ts b/packages/protocol/src/message-kinds/quote.ts index 401c5e76..d687e1f9 100644 --- a/packages/protocol/src/message-kinds/quote.ts +++ b/packages/protocol/src/message-kinds/quote.ts @@ -30,7 +30,6 @@ export class Quote extends Message<'quote'> { id : Message.generateId('quote'), createdAt : new Date().toISOString() } - const message = { metadata, data: opts.data } Message.validateData('quote', message.data) return new Quote(message) @@ -50,9 +49,4 @@ export class Quote extends Message<'quote'> { get payout() { return this.data.payout } - - /** Object that describes how to pay the PFI, and how to get paid by the PFI (e.g. BTC address, payment link) */ - get paymentInstructions() { - return this.data.paymentInstructions - } } \ No newline at end of file diff --git a/packages/protocol/src/types.ts b/packages/protocol/src/types.ts index b390ec0b..dc036738 100644 --- a/packages/protocol/src/types.ts +++ b/packages/protocol/src/types.ts @@ -214,8 +214,6 @@ export type QuoteData = { payin: QuoteDetails /** the amount of payout currency that Alice will receive */ payout: QuoteDetails - /** Object that describes how to pay the PFI, and how to get paid by the PFI (e.g. BTC address, payment link) */ - paymentInstructions?: PaymentInstructions } /** @@ -229,17 +227,8 @@ export type QuoteDetails = { amount: string /** The amount paid in fees */ fee?: string -} - -/** - * Payment Instructions payin and payout pairs - * @beta - */ -export type PaymentInstructions = { - /** link or instruction describing how to send payin currency to the PFI. */ - payin?: PaymentInstruction - /** link or Instruction describing how to get recieve payout currency from the PFI */ - payout?: PaymentInstruction + /** Object that describes how to pay the PFI, and how to get paid by the PFI (e.g. BTC address, payment link) */ + paymentInstruction?: PaymentInstruction } /** diff --git a/tbdex b/tbdex index 2e88e9e5..e3e304cc 160000 --- a/tbdex +++ b/tbdex @@ -1 +1 @@ -Subproject commit 2e88e9e5655a7035a032c5d0c6bb59d0bed11648 +Subproject commit e3e304ccf62e26d01e85fdbcd72200cde3b94cff From f4c0bf08f596f69f0a3a06c7ed3f82bd08a8ba9a Mon Sep 17 00:00:00 2001 From: Leo Ribeiro Date: Fri, 19 Jan 2024 15:19:05 -0500 Subject: [PATCH 02/16] Fix docs-publish.yaml (#144) * Fix docs-publish.yaml * fix docs warnings --- .github/workflows/docs-publish.yml | 2 ++ packages/protocol/src/message-kinds/rfq.ts | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs-publish.yml b/.github/workflows/docs-publish.yml index 7a985c5b..6edec5b6 100644 --- a/.github/workflows/docs-publish.yml +++ b/.github/workflows/docs-publish.yml @@ -24,6 +24,8 @@ jobs: steps: - name: Checkout source uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + submodules: 'true' - name: install pnpm uses: pnpm/action-setup@v2 diff --git a/packages/protocol/src/message-kinds/rfq.ts b/packages/protocol/src/message-kinds/rfq.ts index 4efd9305..c7487c81 100644 --- a/packages/protocol/src/message-kinds/rfq.ts +++ b/packages/protocol/src/message-kinds/rfq.ts @@ -96,8 +96,8 @@ export class Rfq extends Message<'rfq'> { /** * Validate the Rfq's payin/payout method against an Offering's allow payin/payout methods * - * @param rfqPaymentMethod The Rfq's selected payin/payout method being validated - * @param allowedPaymentMethods The Offering's allowed payin/payout methods + * @param rfqPaymentMethod - The Rfq's selected payin/payout method being validated + * @param allowedPaymentMethods - The Offering's allowed payin/payout methods * * @throws if {@link Rfq.payinMethod} property `kind` cannot be validated against the provided offering's payinMethod kinds * @throws if {@link Rfq.payinMethod} property `paymentDetails` cannot be validated against the provided offering's payinMethod requiredPaymentDetails From 64f1747feb1d3f8f094f97fa2a9d06516908af5a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 19 Jan 2024 13:40:26 -0700 Subject: [PATCH 03/16] Version Packages (#114) Co-authored-by: github-actions[bot] --- .changeset/dull-dots-repair.md | 5 ----- .changeset/few-donkeys-smile.md | 5 ----- .changeset/four-mangos-swim.md | 5 ----- .changeset/proud-icons-knock.md | 5 ----- .changeset/smooth-keys-roll.md | 6 ------ .changeset/soft-lizards-peel.md | 5 ----- packages/http-client/CHANGELOG.md | 14 ++++++++++++++ packages/http-client/package.json | 2 +- packages/http-server/CHANGELOG.md | 14 ++++++++++++++ packages/http-server/package.json | 2 +- packages/protocol/CHANGELOG.md | 8 ++++++++ packages/protocol/package.json | 2 +- 12 files changed, 39 insertions(+), 34 deletions(-) delete mode 100644 .changeset/dull-dots-repair.md delete mode 100644 .changeset/few-donkeys-smile.md delete mode 100644 .changeset/four-mangos-swim.md delete mode 100644 .changeset/proud-icons-knock.md delete mode 100644 .changeset/smooth-keys-roll.md delete mode 100644 .changeset/soft-lizards-peel.md diff --git a/.changeset/dull-dots-repair.md b/.changeset/dull-dots-repair.md deleted file mode 100644 index 6b82e548..00000000 --- a/.changeset/dull-dots-repair.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@tbdex/protocol": patch ---- - -make required claims nullable diff --git a/.changeset/few-donkeys-smile.md b/.changeset/few-donkeys-smile.md deleted file mode 100644 index b6ea0c28..00000000 --- a/.changeset/few-donkeys-smile.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@tbdex/protocol": patch ---- - -Replace pex implementation with web5 diff --git a/.changeset/four-mangos-swim.md b/.changeset/four-mangos-swim.md deleted file mode 100644 index 7d2886a7..00000000 --- a/.changeset/four-mangos-swim.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@tbdex/http-client": minor ---- - -Introduces custom errors types and breaking changes: functions now throw instead of return on failure diff --git a/.changeset/proud-icons-knock.md b/.changeset/proud-icons-knock.md deleted file mode 100644 index 5e5ce9be..00000000 --- a/.changeset/proud-icons-knock.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@tbdex/http-server": patch ---- - -Improve http-server error handling and test coverage diff --git a/.changeset/smooth-keys-roll.md b/.changeset/smooth-keys-roll.md deleted file mode 100644 index 8c28df2d..00000000 --- a/.changeset/smooth-keys-roll.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@tbdex/http-client": patch -"@tbdex/http-server": patch ---- - -Removes HttpResponse and ErrorResponse types from http-client package diff --git a/.changeset/soft-lizards-peel.md b/.changeset/soft-lizards-peel.md deleted file mode 100644 index b564cb9c..00000000 --- a/.changeset/soft-lizards-peel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@tbdex/protocol": patch ---- - -Adds more checks to validate an RFQ against a provided Offering diff --git a/packages/http-client/CHANGELOG.md b/packages/http-client/CHANGELOG.md index edd1e7d9..0aa9be04 100644 --- a/packages/http-client/CHANGELOG.md +++ b/packages/http-client/CHANGELOG.md @@ -1,5 +1,19 @@ # @tbdex/http-client +## 0.23.0 + +### Minor Changes + +- 9e1015e: Introduces custom errors types and breaking changes: functions now throw instead of return on failure + +### Patch Changes + +- 47105ca: Removes HttpResponse and ErrorResponse types from http-client package +- Updated dependencies [a7bc582] +- Updated dependencies [5631d32] +- Updated dependencies [c3610ed] + - @tbdex/protocol@0.23.0 + ## 0.22.1 ### Patch Changes diff --git a/packages/http-client/package.json b/packages/http-client/package.json index be72592d..7ed7b278 100644 --- a/packages/http-client/package.json +++ b/packages/http-client/package.json @@ -1,6 +1,6 @@ { "name": "@tbdex/http-client", - "version": "0.22.1", + "version": "0.23.0", "type": "module", "description": "Http client that can be used to send tbdex messages", "license": "Apache-2.0", diff --git a/packages/http-server/CHANGELOG.md b/packages/http-server/CHANGELOG.md index 2d2aeeda..1d3d1649 100644 --- a/packages/http-server/CHANGELOG.md +++ b/packages/http-server/CHANGELOG.md @@ -1,5 +1,19 @@ # @tbdex/http-server +## 0.23.0 + +### Patch Changes + +- 941e8f6: Improve http-server error handling and test coverage +- 47105ca: Removes HttpResponse and ErrorResponse types from http-client package +- Updated dependencies [a7bc582] +- Updated dependencies [5631d32] +- Updated dependencies [9e1015e] +- Updated dependencies [47105ca] +- Updated dependencies [c3610ed] + - @tbdex/protocol@0.23.0 + - @tbdex/http-client@0.23.0 + ## 0.22.1 ### Patch Changes diff --git a/packages/http-server/package.json b/packages/http-server/package.json index 7cb47195..5b148f14 100644 --- a/packages/http-server/package.json +++ b/packages/http-server/package.json @@ -9,7 +9,7 @@ }, "license": "Apache-2.0", "type": "module", - "version": "0.22.1", + "version": "0.23.0", "module": "./dist/main.js", "types": "./dist/types/main.d.ts", "files": [ diff --git a/packages/protocol/CHANGELOG.md b/packages/protocol/CHANGELOG.md index 5526a216..70b09334 100644 --- a/packages/protocol/CHANGELOG.md +++ b/packages/protocol/CHANGELOG.md @@ -1,5 +1,13 @@ # @tbdex/protocol +## 0.23.0 + +### Patch Changes + +- a7bc582: make required claims nullable +- 5631d32: Replace pex implementation with web5 +- c3610ed: Adds more checks to validate an RFQ against a provided Offering + ## 0.22.1 ### Patch Changes diff --git a/packages/protocol/package.json b/packages/protocol/package.json index c52da0b0..24a31fc8 100644 --- a/packages/protocol/package.json +++ b/packages/protocol/package.json @@ -1,6 +1,6 @@ { "name": "@tbdex/protocol", - "version": "0.22.1", + "version": "0.23.0", "type": "module", "description": "Library that includes type definitions for tbdex messages", "license": "Apache-2.0", From faf4510810f9785cd1a1ddf0d9530f539d49a7c1 Mon Sep 17 00:00:00 2001 From: Diane Huxley Date: Fri, 19 Jan 2024 15:15:59 -0800 Subject: [PATCH 04/16] Stricten typescript in protocol package (#141) * Stricten typescript in protocol package * Add TODO --- packages/protocol/src/crypto.ts | 33 +++++++++++++------ packages/protocol/src/dev-tools.ts | 13 +++++--- packages/protocol/src/did-resolver.ts | 14 ++++---- packages/protocol/src/message-kinds/rfq.ts | 8 +++-- packages/protocol/src/message.ts | 13 +++++--- .../protocol/src/resource-kinds/offering.ts | 2 +- packages/protocol/src/resource.ts | 12 ++++--- packages/protocol/src/types.ts | 6 ++-- packages/protocol/src/utils.ts | 4 +++ packages/protocol/tests/offering.spec.ts | 13 ++++---- packages/protocol/tests/rfq.spec.ts | 6 ++-- packages/protocol/tests/tsconfig.json | 2 ++ packages/protocol/tsconfig.json | 2 +- 13 files changed, 84 insertions(+), 44 deletions(-) diff --git a/packages/protocol/src/crypto.ts b/packages/protocol/src/crypto.ts index 33efd6d4..c5a1e091 100644 --- a/packages/protocol/src/crypto.ts +++ b/packages/protocol/src/crypto.ts @@ -2,7 +2,9 @@ import type { PrivateKeyJwk as Web5PrivateKeyJwk, CryptoAlgorithm, Web5Crypto, - JwsHeaderParams + JwsHeaderParams, + PrivateKeyJwk, + PublicKeyJwk } from '@web5/crypto' import { sha256 } from '@noble/hashes/sha256' @@ -42,7 +44,7 @@ export type VerifyOptions = { */ type SignerValue = { signer: CryptoAlgorithm, - options?: T, + options: T, alg: JwsHeader['alg'], crv: JsonWebKey['crv'] } @@ -99,18 +101,18 @@ export class Crypto { static async sign(opts: SignOptions) { const { did, payload, detached } = opts - const { privateKeyJwk } = did.keySet.verificationMethodKeys[0] + const privateKeyJwk = did.keySet.verificationMethodKeys?.[0]?.privateKeyJwk - const algorithmName = privateKeyJwk['alg'] || '' - const namedCurve = privateKeyJwk['crv'] || '' + const algorithmName = privateKeyJwk?.['alg'] || '' + let namedCurve = Crypto.extractNamedCurve(privateKeyJwk) const algorithmId = `${algorithmName}:${namedCurve}` const algorithm = this.algorithms[algorithmId] if (!algorithm) { - throw new Error(`${algorithmId} not supported`) + throw new Error(`Algorithm (${algorithmId}) not supported`) } - let verificationMethodId = did.document.verificationMethod[0].id + let verificationMethodId = did.document.verificationMethod?.[0]?.id || '' if (verificationMethodId.startsWith('#')) { verificationMethodId = `${did.did}#${verificationMethodId}` } @@ -168,7 +170,7 @@ export class Crypto { throw new Error('Signature verification failed: Expected JWS header to contain alg and kid') } - const verificationMethod = await deferenceDidUrl(jwsHeader.kid as string) + const verificationMethod = await deferenceDidUrl(jwsHeader.kid) if (!isVerificationMethod(verificationMethod)) { // ensure that appropriate verification method was found throw new Error('Signature verification failed: Expected kid in JWS header to dereference to a DID Document Verification Method') } @@ -184,7 +186,7 @@ export class Crypto { const signatureBytes = Convert.base64Url(base64UrlEncodedSignature).toUint8Array() - const algorithmId = `${jwsHeader['alg']}:${publicKeyJwk['crv']}` + const algorithmId = `${jwsHeader['alg']}:${Crypto.extractNamedCurve(publicKeyJwk)}` const { signer, options } = Crypto.algorithms[algorithmId] // TODO: remove this monkeypatch once 'ext' is no longer a required property within a jwk passed to `jwkToCryptoKey` @@ -201,9 +203,20 @@ export class Crypto { throw new Error('Signature verification failed: Integrity mismatch') } - const [did] = (jwsHeader as JwsHeaderParams).kid.split('#') + const [did] = jwsHeader.kid.split('#') return did } + + /** + * Gets crv property from a PublicKeyJwk or PrivateKeyJwk. Returns empty string if crv is undefined. + */ + static extractNamedCurve(jwk: PrivateKeyJwk | PublicKeyJwk | undefined): string { + if (jwk && 'crv' in jwk) { + return jwk.crv + } else { + return '' + } + } } /** diff --git a/packages/protocol/src/dev-tools.ts b/packages/protocol/src/dev-tools.ts index 029a0764..285bba12 100644 --- a/packages/protocol/src/dev-tools.ts +++ b/packages/protocol/src/dev-tools.ts @@ -285,12 +285,17 @@ export class DevTools { */ static async createJwt(opts: CreateJwtOptions) { const { issuer, subject, payload } = opts - const { privateKeyJwk } = issuer.keySet.verificationMethodKeys[0] + const privateKeyJwk = issuer.keySet.verificationMethodKeys?.[0].privateKeyJwk + if (!privateKeyJwk) { + throw Error('Could not get private key JWK from issuer') + } // build jwt header - const algorithmId = `${privateKeyJwk['alg']}:${privateKeyJwk['crv']}` + const algorithmName = privateKeyJwk['alg'] || '' + let namedCurve = Crypto.extractNamedCurve(privateKeyJwk) + const algorithmId = `${algorithmName}:${namedCurve}` const algorithm = Crypto.algorithms[algorithmId] - const jwtHeader = { alg: algorithm.alg, kid: issuer.document.verificationMethod[0].id } + const jwtHeader = { alg: algorithm.alg, kid: issuer.document.verificationMethod?.[0]?.id } const base64urlEncodedJwtHeader = Convert.object(jwtHeader).toBase64Url() // build jwt payload @@ -317,7 +322,7 @@ export class DevTools { * @param compactJwt - the JWT to decode * @returns */ - static decodeJwt(compactJwt) { + static decodeJwt(compactJwt: string) { const [base64urlEncodedJwtHeader, base64urlEncodedJwtPayload, base64urlEncodedSignature] = compactJwt.split('.') return { diff --git a/packages/protocol/src/did-resolver.ts b/packages/protocol/src/did-resolver.ts index 69152f25..8ec30fd0 100644 --- a/packages/protocol/src/did-resolver.ts +++ b/packages/protocol/src/did-resolver.ts @@ -26,7 +26,8 @@ export async function resolveDid(did: string): Promise { throw new Error(`Failed to resolve DID: ${did}. Error: ${didResolutionMetadata.error}`) } - return didDocument + // If did resolution has no errors, assume we have did document + return didDocument! } /** @@ -35,6 +36,7 @@ export async function resolveDid(did: string): Promise { */ export type DidResource = DidDocument | VerificationMethod | DidService +// TODO https://github.com/TBD54566975/tbdex-js/issues/147 Remove deferenceDidUrl with web5/dids DidResolver#dereference /** * Dereferences a DID URL according to [specification](https://www.w3.org/TR/did-core/#did-url-dereferencing). * See also: [DID URL Syntax](https://www.w3.org/TR/did-core/#did-url-syntax) @@ -47,7 +49,7 @@ export type DidResource = DidDocument | VerificationMethod | DidService * @throws if DID cannot be resolved * @beta */ -export async function deferenceDidUrl(didUrl: string): Promise { +export async function deferenceDidUrl(didUrl: string): Promise { const parsedDid = didUtils.parseDid({ didUrl }) if (!parsedDid) { throw new Error('failed to parse did') @@ -67,13 +69,13 @@ export async function deferenceDidUrl(didUrl: string): Promise { // using a set for fast string comparison. DIDs can be lonnng. const idSet = new Set([didUrl, parsedDid.fragment, `#${parsedDid.fragment}`]) - for (let vm of verificationMethod) { + for (let vm of verificationMethod || []) { if (idSet.has(vm.id)) { return vm } } - for (let svc of service) { + for (let svc of service || []) { if (idSet.has(svc.id)) { return svc } @@ -86,6 +88,6 @@ export async function deferenceDidUrl(didUrl: string): Promise { * @returns true if the didResource is a `VerificationMethod` * @beta */ -export function isVerificationMethod(didResource: DidResource): didResource is VerificationMethod { - return didResource && 'id' in didResource && 'type' in didResource && 'controller' in didResource +export function isVerificationMethod(didResource: DidResource | undefined): didResource is VerificationMethod { + return !!didResource && 'id' in didResource && 'type' in didResource && 'controller' in didResource } \ No newline at end of file diff --git a/packages/protocol/src/message-kinds/rfq.ts b/packages/protocol/src/message-kinds/rfq.ts index c7487c81..2073a9ab 100644 --- a/packages/protocol/src/message-kinds/rfq.ts +++ b/packages/protocol/src/message-kinds/rfq.ts @@ -25,7 +25,7 @@ export class Rfq extends Message<'rfq'> { readonly validNext = new Set(['quote', 'close']) /** private data (PII or PCI) */ - _private: Record + _private: Record | undefined /** * Creates an rfq with the given options @@ -141,7 +141,11 @@ export class Rfq extends Message<'rfq'> { * @param offering - the offering to check against * @throws if rfq's claims do not fulfill the offering's requirements */ - async verifyClaims(offering: Offering | ResourceModel<'offering'>) { + async verifyClaims(offering: Offering | ResourceModel<'offering'>): Promise { + if (!offering.data.requiredClaims) { + return + } + const credentials = PresentationExchange.selectCredentials(this.claims, offering.data.requiredClaims) if (!credentials.length) { diff --git a/packages/protocol/src/message.ts b/packages/protocol/src/message.ts index 14c07279..41a33e17 100644 --- a/packages/protocol/src/message.ts +++ b/packages/protocol/src/message.ts @@ -16,7 +16,7 @@ import { PortableDid } from '@web5/dids' export abstract class Message { private _metadata: MessageMetadata private _data: MessageKindModel - private _signature: string + private _signature: string | undefined /** * used by {@link Message.parse} to return an instance of message kind's class. This abstraction is needed @@ -41,7 +41,8 @@ export abstract class Message { try { jsonMessage = typeof message === 'string' ? JSON.parse(message): message } catch(e) { - throw new Error(`parse: Failed to parse message. Error: ${e.message}`) + const errorMessage = e instanceof Error ? e.message : e + throw new Error(`parse: Failed to parse message. Error: ${errorMessage}`) } await Message.verify(jsonMessage) @@ -53,6 +54,7 @@ export abstract class Message { * validates the message and verifies the cryptographic signature * @throws if the message is invalid * @throws see {@link Crypto.verify} + * @returns Message signer's DID */ static async verify(message: MessageModel | Message): Promise { let jsonMessage: MessageModel = message instanceof Message ? message.toJSON() : message @@ -60,7 +62,8 @@ export abstract class Message { Message.validate(jsonMessage) const digest = Crypto.digest({ metadata: jsonMessage.metadata, data: jsonMessage.data }) - const signer = await Crypto.verify({ detachedPayload: digest, signature: jsonMessage.signature }) + // Message.validate() guarantees presence of signature + const signer = await Crypto.verify({ detachedPayload: digest, signature: jsonMessage.signature! }) if (jsonMessage.metadata.from !== signer) { // ensure that DID used to sign matches `from` property in metadata throw new Error('Signature verification failed: Expected DID in kid of JWS header must match metadata.from') @@ -122,8 +125,9 @@ export abstract class Message { * validates the message and verifies the cryptographic signature * @throws if the message is invalid * @throws see {@link Crypto.verify} + * @returns Signer's DID */ - async verify() { + async verify(): Promise { return Message.verify(this) } @@ -199,6 +203,7 @@ export abstract class Message { /** * returns the message as a json object. Automatically used by `JSON.stringify` method. + * @throws if message is missing signature */ toJSON() { const message: MessageModel = { diff --git a/packages/protocol/src/resource-kinds/offering.ts b/packages/protocol/src/resource-kinds/offering.ts index b97cf2fc..516d53f9 100644 --- a/packages/protocol/src/resource-kinds/offering.ts +++ b/packages/protocol/src/resource-kinds/offering.ts @@ -68,7 +68,7 @@ export class Offering extends Resource<'offering'> { /** Articulates the claim(s) required when submitting an RFQ for this offering. */ // TODO: Remove type annotation once type alias replaced with direct export in @web5/credentials // [Link to the PR](https://github.com/TBD54566975/web5-js/pull/336) - get requiredClaims(): PresentationDefinitionV2 { + get requiredClaims(): PresentationDefinitionV2 | undefined { return this.data.requiredClaims } } \ No newline at end of file diff --git a/packages/protocol/src/resource.ts b/packages/protocol/src/resource.ts index 235bd520..af3b461a 100644 --- a/packages/protocol/src/resource.ts +++ b/packages/protocol/src/resource.ts @@ -15,7 +15,7 @@ import { PortableDid } from '@web5/dids' export abstract class Resource { private _metadata: ResourceMetadata private _data: ResourceKindModel - private _signature: string + private _signature: string | undefined /** * used by {@link Resource.parse} to return an instance of resource kind's class. This abstraction is needed @@ -47,7 +47,8 @@ export abstract class Resource { try { jsonResource = typeof resource === 'string' ? JSON.parse(resource): resource } catch(e) { - throw new Error(`parse: Failed to parse resource. Error: ${e.message}`) + const errorMessage = e instanceof Error ? e.message : e + throw new Error(`parse: Failed to parse resource. Error: ${errorMessage}`) } await Resource.verify(jsonResource) @@ -59,13 +60,15 @@ export abstract class Resource { * validates the resource and verifies the cryptographic signature * @throws if the message is invalid * @throws see {@link Crypto.verify} + * @returns Resource signer's DID */ static async verify(resource: ResourceModel | Resource): Promise { let jsonResource: ResourceModel = resource instanceof Resource ? resource.toJSON() : resource Resource.validate(jsonResource) const digest = Crypto.digest({ metadata: jsonResource.metadata, data: jsonResource.data }) - const signerDid = await Crypto.verify({ detachedPayload: digest, signature: jsonResource.signature }) + // Resource.validate() guarantees presence of signature + const signerDid = await Crypto.verify({ detachedPayload: digest, signature: jsonResource.signature! }) if (jsonResource.metadata.from !== signerDid) { // ensure that DID used to sign matches `from` property in metadata throw new Error('Signature verification failed: Expected DID in kid of JWS header must match metadata.from') @@ -116,8 +119,9 @@ export abstract class Resource { * validates the resource and verifies the cryptographic signature * @throws if the resource is invalid * @throws see {@link Crypto.verify} + * @returns Resource signer's DID */ - async verify() { + async verify(): Promise { return Resource.verify(this) } diff --git a/packages/protocol/src/types.ts b/packages/protocol/src/types.ts index dc036738..afac5987 100644 --- a/packages/protocol/src/types.ts +++ b/packages/protocol/src/types.ts @@ -25,7 +25,7 @@ export type ResourceModel = { /** The actual resource content */ data: ResourceKindModel /** signature that verifies that authenticity and integrity of a message */ - signature: string + signature?: string } /** @@ -121,8 +121,10 @@ export type MessageModel = { metadata: MessageMetadata /** The actual message content */ data: MessageKindModel + /** Private data that must not be in the main */ + private?: T extends 'rfq' ? Record : never /** signature that verifies that authenticity and integrity of a message */ - signature: string + signature?: string } /** diff --git a/packages/protocol/src/utils.ts b/packages/protocol/src/utils.ts index 990d12a6..eb9b39c0 100644 --- a/packages/protocol/src/utils.ts +++ b/packages/protocol/src/utils.ts @@ -23,6 +23,8 @@ export function messageFactory(jsonMessage: MessageModel< case 'order': return new Order(jsonMessage as NewMessage<'order'>) case 'orderstatus': return new OrderStatus(jsonMessage as NewMessage<'orderstatus'>) case 'close': return new Close(jsonMessage as NewMessage<'close'>) + default: + throw new Error(`Unrecognized message kind (${jsonMessage.metadata.kind})`) } } @@ -36,5 +38,7 @@ export function messageFactory(jsonMessage: MessageModel< export function resourceFactory(jsonResource: ResourceModel): ResourceKindClass { switch(jsonResource.metadata.kind) { case 'offering': return new Offering(jsonResource as NewResource<'offering'>) + default: + throw new Error(`Unrecognized resource kind (${jsonResource.metadata.kind})`) } } \ No newline at end of file diff --git a/packages/protocol/tests/offering.spec.ts b/packages/protocol/tests/offering.spec.ts index bd7599c1..f5fe8559 100644 --- a/packages/protocol/tests/offering.spec.ts +++ b/packages/protocol/tests/offering.spec.ts @@ -43,8 +43,8 @@ describe('Offering', () => { const pfi = await DevTools.createDid() try { - const offeringData = DevTools.createOfferingData() - offeringData['foo'] = 'bar' + const offeringData = DevTools.createOfferingData(); + (offeringData as any)['foo'] = 'bar' const offering = Offering.create({ metadata : { from: pfi.did }, data : offeringData @@ -81,14 +81,13 @@ describe('Offering', () => { data : DevTools.createOfferingData() }) - await offering.sign(pfi) - const [base64UrlEncodedJwsHeader] = offering.signature.split('.') - const jwsHeader = Convert.base64Url(base64UrlEncodedJwsHeader).toObject() + const [base64UrlEncodedJwsHeader] = offering.signature!.split('.') + const jwsHeader: { kid?: string, alg?: string} = Convert.base64Url(base64UrlEncodedJwsHeader).toObject() - expect(jwsHeader['kid']).to.equal(pfi.document.verificationMethod[0].id) - expect(jwsHeader['alg']).to.exist + expect(jwsHeader.kid).to.equal(pfi.document.verificationMethod![0].id) + expect(jwsHeader.alg).to.exist }) }) diff --git a/packages/protocol/tests/rfq.spec.ts b/packages/protocol/tests/rfq.spec.ts index b4a72a2b..7e2c5a16 100644 --- a/packages/protocol/tests/rfq.spec.ts +++ b/packages/protocol/tests/rfq.spec.ts @@ -66,10 +66,10 @@ describe('Rfq', () => { await rfq.sign(did) - const [base64UrlEncodedJwsHeader] = rfq.signature.split('.') - const jwsHeader = Convert.base64Url(base64UrlEncodedJwsHeader).toObject() + const [base64UrlEncodedJwsHeader] = rfq.signature!.split('.') + const jwsHeader: { kid?: string, alg?: string} = Convert.base64Url(base64UrlEncodedJwsHeader).toObject() - expect(jwsHeader['kid']).to.equal(did.document.verificationMethod[0].id) + expect(jwsHeader['kid']).to.equal(did.document.verificationMethod![0].id) expect(jwsHeader['alg']).to.exist }) }) diff --git a/packages/protocol/tests/tsconfig.json b/packages/protocol/tests/tsconfig.json index 7c6d2c8e..359d3749 100644 --- a/packages/protocol/tests/tsconfig.json +++ b/packages/protocol/tests/tsconfig.json @@ -1,6 +1,8 @@ { "extends": "../tsconfig.json", "compilerOptions": { + "strict": true, + "useUnknownInCatchVariables": false, "outDir": "compiled", "declarationDir": "compiled/types", "sourceMap": true, diff --git a/packages/protocol/tsconfig.json b/packages/protocol/tsconfig.json index 03068737..ed440e53 100644 --- a/packages/protocol/tsconfig.json +++ b/packages/protocol/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "strict": false, + "strict": true, "lib": [ "DOM", "ES6" From 9d3e9e811f187bffc81b112929dea22388b650c4 Mon Sep 17 00:00:00 2001 From: Leo Ribeiro Date: Mon, 22 Jan 2024 14:38:49 -0500 Subject: [PATCH 05/16] Setup CodeQL SAST (#146) --- .github/workflows/codeql.yml | 86 ++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..bf9b6b76 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,86 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + schedule: + - cron: '33 1 * * 5' + +jobs: + analyze: + name: Analyze + # Runner size impacts CodeQL analysis time. To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners + # Consider using larger runners for possible analysis time improvements. + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} + permissions: + # required for all workflows + security-events: write + + # only required for workflows in private repositories + actions: read + contents: read + + strategy: + fail-fast: false + matrix: + language: [ 'javascript-typescript' ] + # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ] + # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both + # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: 'true' + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v3 + + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" From d22baae8839d68783905771011abc3adf8e21deb Mon Sep 17 00:00:00 2001 From: Leo Ribeiro Date: Mon, 22 Jan 2024 14:39:47 -0500 Subject: [PATCH 06/16] Setup Codecov (#145) * Setup codecov * codecov config * add codecoverage reports * fix codecov component name * add codecov badge --- .github/workflows/integrity-check.yml | 5 ++ README.md | 2 + codecov.yml | 33 ++++++++ package.json | 1 + packages/http-client/.c8rc.json | 19 +++++ packages/http-client/package.json | 4 +- packages/http-server/.c8rc.json | 19 +++++ packages/http-server/package.json | 4 +- packages/protocol/.c8rc.json | 19 +++++ packages/protocol/package.json | 4 +- pnpm-lock.yaml | 105 ++++++++++++++++++++++++++ 11 files changed, 209 insertions(+), 6 deletions(-) create mode 100644 codecov.yml create mode 100644 packages/http-client/.c8rc.json create mode 100644 packages/http-server/.c8rc.json create mode 100644 packages/protocol/.c8rc.json diff --git a/.github/workflows/integrity-check.yml b/.github/workflows/integrity-check.yml index 40e938ee..66159f2b 100644 --- a/.github/workflows/integrity-check.yml +++ b/.github/workflows/integrity-check.yml @@ -72,6 +72,11 @@ jobs: name: junit-results path: packages/*/results.xml + - name: Upload test coverage to Codecov + uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + - name: Generate an access token to trigger downstream repo uses: actions/create-github-app-token@2986852ad836768dfea7781f31828eb3e17990fa # v1.6.2 id: generate_token diff --git a/README.md b/README.md index 94fec5e0..6c95951a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # tbdex-js +[![codecov](https://codecov.io/github/TBD54566975/tbdex-js/graph/badge.svg?token=NE0263LUKG)](https://codecov.io/github/TBD54566975/tbdex-js) + This repo contains 3 npm packages: - [`@tbdex/protocol`](./packages/protocol/) - create, parse, verify, and validate the tbdex messages and resources defined in the [protocol draft specification](https://github.com/TBD54566975/tbdex-protocol/blob/main/README.md) diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..b36ec514 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,33 @@ +comment: + layout: "header, diff, components" + +component_management: + default_rules: + statuses: + - type: project + target: auto # auto compares coverage to the previous base commit + threshold: 5% # allows a 5% drop from the previous base commit coverage + - type: patch + target: 90 # every PR opened should strive for at least 90% coverage + + individual_components: + - component_id: package-protocol + name: protocol + paths: ["packages/protocol/**"] + + - component_id: package-http-client + name: http-client + paths: ["packages/http-client/**"] + + - component_id: package-http-server + name: http-server + paths: ["packages/http-server/**"] + +coverage: + status: + project: + default: + informational: true + patch: + default: + informational: true # Don't gate PRs based on Codecov passing thresholds diff --git a/package.json b/package.json index 866db1d1..e86ec205 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "@types/mocha": "10.0.1", "@typescript-eslint/eslint-plugin": "6.7.0", "@typescript-eslint/parser": "6.7.0", + "c8": "^9.1.0", "eslint": "8.49.0", "mocha": "10.2.0", "mocha-junit-reporter": "2.2.1", diff --git a/packages/http-client/.c8rc.json b/packages/http-client/.c8rc.json new file mode 100644 index 00000000..ab680f66 --- /dev/null +++ b/packages/http-client/.c8rc.json @@ -0,0 +1,19 @@ +{ + "all": true, + "cache": false, + "extension": [ + ".js" + ], + "include": [ + "tests/compiled/src/**" + ], + "exclude": [ + "tests/compiled/src/index.js", + "tests/compiled/src/types.js", + "tests/compiled/src/types/**" + ], + "reporter": [ + "cobertura", + "text" + ] +} \ No newline at end of file diff --git a/packages/http-client/package.json b/packages/http-client/package.json index 7ed7b278..a50ee644 100644 --- a/packages/http-client/package.json +++ b/packages/http-client/package.json @@ -88,7 +88,7 @@ "build:esm": "rimraf dist/esm dist/types && tsc", "build:cjs": "rimraf dist/cjs && tsc -p tsconfig.cjs.json && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json", "build:browser": "rimraf dist/browser.mjs dist/browser.js && node build/bundles.js", - "test:node": "rimraf tests/compiled && tsc -p tests/tsconfig.json && mocha", + "test:node": "rimraf tests/compiled && tsc -p tests/tsconfig.json && c8 mocha", "test:browser": "karma start karma.conf.cjs", "build": "pnpm clean && pnpm build:esm && pnpm build:cjs && pnpm build:browser", "lint": "eslint . --ext .ts --max-warnings 0", @@ -96,4 +96,4 @@ "docs": "pnpm build:esm && typedoc --plugin typedoc-plugin-markdown --out docs src/main.ts", "try": "pnpm build:esm && node dist/esm/src/try.js" } -} +} \ No newline at end of file diff --git a/packages/http-server/.c8rc.json b/packages/http-server/.c8rc.json new file mode 100644 index 00000000..ab680f66 --- /dev/null +++ b/packages/http-server/.c8rc.json @@ -0,0 +1,19 @@ +{ + "all": true, + "cache": false, + "extension": [ + ".js" + ], + "include": [ + "tests/compiled/src/**" + ], + "exclude": [ + "tests/compiled/src/index.js", + "tests/compiled/src/types.js", + "tests/compiled/src/types/**" + ], + "reporter": [ + "cobertura", + "text" + ] +} \ No newline at end of file diff --git a/packages/http-server/package.json b/packages/http-server/package.json index 5b148f14..608f3566 100644 --- a/packages/http-server/package.json +++ b/packages/http-server/package.json @@ -43,10 +43,10 @@ "clean": "rimraf dist tests/compiled", "lint": "eslint . --ext .ts --max-warnings 0", "lint:fix": "eslint . --ext .ts --fix", - "test:node": "rimraf tests/compiled && tsc -p tests/tsconfig.json && mocha", + "test:node": "rimraf tests/compiled && tsc -p tests/tsconfig.json && c8 mocha", "try": "pnpm build && node dist/try.js" }, "keywords": [ "tbdex" ] -} +} \ No newline at end of file diff --git a/packages/protocol/.c8rc.json b/packages/protocol/.c8rc.json new file mode 100644 index 00000000..ab680f66 --- /dev/null +++ b/packages/protocol/.c8rc.json @@ -0,0 +1,19 @@ +{ + "all": true, + "cache": false, + "extension": [ + ".js" + ], + "include": [ + "tests/compiled/src/**" + ], + "exclude": [ + "tests/compiled/src/index.js", + "tests/compiled/src/types.js", + "tests/compiled/src/types/**" + ], + "reporter": [ + "cobertura", + "text" + ] +} \ No newline at end of file diff --git a/packages/protocol/package.json b/packages/protocol/package.json index 24a31fc8..2a12ee71 100644 --- a/packages/protocol/package.json +++ b/packages/protocol/package.json @@ -87,7 +87,7 @@ "build:cjs": "rimraf dist/cjs && tsc -p tsconfig.cjs.json && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json", "build:browser": "rimraf dist/browser.mjs dist/browser.js && node build/bundles.js", "cp:test-vectors": "mkdir -p generated/test-vectors/ && cp -r ../../tbdex/hosted/test-vectors/protocol/vectors/ generated/test-vectors", - "test:node": "rimraf tests/compiled && pnpm compile-validators && pnpm cp:test-vectors && tsc -p tests/tsconfig.json && mocha", + "test:node": "rimraf tests/compiled && pnpm compile-validators && pnpm cp:test-vectors && tsc -p tests/tsconfig.json && c8 mocha", "test:browser": "pnpm compile-validators && pnpm cp:test-vectors && karma start karma.conf.cjs", "generate-test-vectors": "tsc -p tests/tsconfig.json && node tests/compiled/tests/generate-test-vectors.js", "build": "pnpm clean && pnpm compile-validators && pnpm cp:test-vectors && pnpm build:esm && pnpm build:cjs && pnpm build:browser", @@ -96,4 +96,4 @@ "docs": "pnpm build:esm && typedoc --plugin typedoc-plugin-markdown --out docs src/main.ts", "try": "pnpm compile-validators && pnpm cp:test-vectors && pnpm build:esm && node dist/esm/src/try.js" } -} +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 16458550..eefc539e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33,6 +33,9 @@ importers: '@typescript-eslint/parser': specifier: 6.7.0 version: 6.7.0(eslint@8.49.0)(typescript@5.2.2) + c8: + specifier: ^9.1.0 + version: 9.1.0 eslint: specifier: 8.49.0 version: 8.49.0 @@ -322,6 +325,10 @@ packages: regenerator-runtime: 0.14.0 dev: true + /@bcoe/v8-coverage@0.2.3: + resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} + dev: true + /@changesets/apply-release-plan@6.1.4: resolution: {integrity: sha512-FMpKF1fRlJyCZVYHr3CbinpZZ+6MwvOtWUuO8uo+svcATEoc1zRDcj23pAurJ2TZ/uVz1wFHH6K3NlACy0PLew==} dependencies: @@ -814,6 +821,27 @@ packages: wrap-ansi-cjs: /wrap-ansi@7.0.0 dev: true + /@istanbuljs/schema@0.1.3: + resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} + engines: {node: '>=8'} + dev: true + + /@jridgewell/resolve-uri@3.1.1: + resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} + engines: {node: '>=6.0.0'} + dev: true + + /@jridgewell/sourcemap-codec@1.4.15: + resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + dev: true + + /@jridgewell/trace-mapping@0.3.22: + resolution: {integrity: sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==} + dependencies: + '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + /@leichtgewicht/ip-codec@2.0.4: resolution: {integrity: sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==} dev: false @@ -1096,6 +1124,10 @@ packages: ci-info: 3.9.0 dev: true + /@types/istanbul-lib-coverage@2.0.6: + resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} + dev: true + /@types/json-schema@7.0.15: resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} dev: true @@ -1957,6 +1989,24 @@ packages: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} engines: {node: '>= 0.8'} + /c8@9.1.0: + resolution: {integrity: sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==} + engines: {node: '>=14.14.0'} + hasBin: true + dependencies: + '@bcoe/v8-coverage': 0.2.3 + '@istanbuljs/schema': 0.1.3 + find-up: 5.0.0 + foreground-child: 3.1.1 + istanbul-lib-coverage: 3.2.2 + istanbul-lib-report: 3.0.1 + istanbul-reports: 3.1.6 + test-exclude: 6.0.0 + v8-to-istanbul: 9.2.0 + yargs: 17.7.2 + yargs-parser: 21.1.1 + dev: true + /call-bind@1.0.5: resolution: {integrity: sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==} dependencies: @@ -2212,6 +2262,10 @@ packages: resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} engines: {node: '>= 0.6'} + /convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + dev: true + /cookie-signature@1.0.6: resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} dev: false @@ -3444,6 +3498,10 @@ packages: lru-cache: 10.1.0 dev: true + /html-escaper@2.0.2: + resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} + dev: true + /http-errors@2.0.0: resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} engines: {node: '>= 0.8'} @@ -3751,6 +3809,28 @@ packages: engines: {node: '>=10'} dev: true + /istanbul-lib-coverage@3.2.2: + resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} + engines: {node: '>=8'} + dev: true + + /istanbul-lib-report@3.0.1: + resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} + engines: {node: '>=10'} + dependencies: + istanbul-lib-coverage: 3.2.2 + make-dir: 4.0.0 + supports-color: 7.2.0 + dev: true + + /istanbul-reports@3.1.6: + resolution: {integrity: sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==} + engines: {node: '>=8'} + dependencies: + html-escaper: 2.0.2 + istanbul-lib-report: 3.0.1 + dev: true + /jackspeak@2.3.6: resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} engines: {node: '>=14'} @@ -4108,6 +4188,13 @@ packages: resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} dev: true + /make-dir@4.0.0: + resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} + engines: {node: '>=10'} + dependencies: + semver: 7.5.4 + dev: true + /map-obj@1.0.1: resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} engines: {node: '>=0.10.0'} @@ -5697,6 +5784,15 @@ packages: engines: {node: '>=8'} dev: true + /test-exclude@6.0.0: + resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} + engines: {node: '>=8'} + dependencies: + '@istanbuljs/schema': 0.1.3 + glob: 7.2.3 + minimatch: 3.1.2 + dev: true + /text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true @@ -5995,6 +6091,15 @@ packages: hasBin: true dev: false + /v8-to-istanbul@9.2.0: + resolution: {integrity: sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==} + engines: {node: '>=10.12.0'} + dependencies: + '@jridgewell/trace-mapping': 0.3.22 + '@types/istanbul-lib-coverage': 2.0.6 + convert-source-map: 2.0.0 + dev: true + /validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} dependencies: From ad48871bc4a020875b6a46751ee94fe2ff92b912 Mon Sep 17 00:00:00 2001 From: Diane Huxley Date: Mon, 22 Jan 2024 12:25:32 -0800 Subject: [PATCH 07/16] Get test vectors directly from submodule (#143) * Get test vectors directly from submodule * Easy way out * Minimal changes * Remove rootDir * Put rootDir back in for http-client --- packages/http-client/tsconfig.json | 3 ++- packages/http-server/tsconfig.json | 2 +- packages/protocol/package.json | 9 ++++----- packages/protocol/tests/test-vectors.spec.ts | 12 ++++++------ packages/protocol/tsconfig.json | 1 - 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/packages/http-client/tsconfig.json b/packages/http-client/tsconfig.json index d6b0bdf8..c5c49c56 100644 --- a/packages/http-client/tsconfig.json +++ b/packages/http-client/tsconfig.json @@ -1,8 +1,9 @@ { "compilerOptions": { "strict": false, - "lib": ["DOM","es2023"], + "lib": ["DOM", "es2022"], "rootDir": "./", + "allowJs": true, "target": "es2022", "module": "nodenext", diff --git a/packages/http-server/tsconfig.json b/packages/http-server/tsconfig.json index 88f3ed9f..eb52ab80 100644 --- a/packages/http-server/tsconfig.json +++ b/packages/http-server/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "lib": ["es2023"], + "lib": ["es2022"], "target": "es2022", "module": "node16", "esModuleInterop": true, diff --git a/packages/protocol/package.json b/packages/protocol/package.json index 2a12ee71..3eb87077 100644 --- a/packages/protocol/package.json +++ b/packages/protocol/package.json @@ -86,14 +86,13 @@ "build:esm": "rimraf dist/esm dist/types && tsc", "build:cjs": "rimraf dist/cjs && tsc -p tsconfig.cjs.json && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json", "build:browser": "rimraf dist/browser.mjs dist/browser.js && node build/bundles.js", - "cp:test-vectors": "mkdir -p generated/test-vectors/ && cp -r ../../tbdex/hosted/test-vectors/protocol/vectors/ generated/test-vectors", - "test:node": "rimraf tests/compiled && pnpm compile-validators && pnpm cp:test-vectors && tsc -p tests/tsconfig.json && c8 mocha", - "test:browser": "pnpm compile-validators && pnpm cp:test-vectors && karma start karma.conf.cjs", + "test:node": "rimraf tests/compiled && pnpm compile-validators && tsc -p tests/tsconfig.json && c8 mocha", + "test:browser": "pnpm compile-validators && karma start karma.conf.cjs", "generate-test-vectors": "tsc -p tests/tsconfig.json && node tests/compiled/tests/generate-test-vectors.js", - "build": "pnpm clean && pnpm compile-validators && pnpm cp:test-vectors && pnpm build:esm && pnpm build:cjs && pnpm build:browser", + "build": "pnpm clean && pnpm compile-validators && pnpm build:esm && pnpm build:cjs && pnpm build:browser", "lint": "eslint . --ext .ts --max-warnings 0", "lint:fix": "eslint . --ext .ts --fix", "docs": "pnpm build:esm && typedoc --plugin typedoc-plugin-markdown --out docs src/main.ts", - "try": "pnpm compile-validators && pnpm cp:test-vectors && pnpm build:esm && node dist/esm/src/try.js" + "try": "pnpm compile-validators && pnpm build:esm && node dist/esm/src/try.js" } } \ No newline at end of file diff --git a/packages/protocol/tests/test-vectors.spec.ts b/packages/protocol/tests/test-vectors.spec.ts index e3ab6d99..3e63242a 100644 --- a/packages/protocol/tests/test-vectors.spec.ts +++ b/packages/protocol/tests/test-vectors.spec.ts @@ -1,12 +1,12 @@ import { expect } from 'chai' import { Close, Order, OrderStatus, Quote, Rfq } from '../src/message-kinds/index.js' import { Offering } from '../src/resource-kinds/index.js' -import ParseClose from '../generated/test-vectors/parse-close.json' assert { type: 'json' } -import ParseOffering from '../generated/test-vectors/parse-offering.json' assert { type: 'json' } -import ParseOrder from '../generated/test-vectors/parse-order.json' assert { type: 'json' } -import ParseOrderStatus from '../generated/test-vectors/parse-orderstatus.json' assert { type: 'json' } -import ParseQuote from '../generated/test-vectors/parse-quote.json' assert { type: 'json' } -import ParseRfq from '../generated/test-vectors/parse-rfq.json' assert { type: 'json' } +import ParseClose from '../../../tbdex/hosted/test-vectors/protocol/vectors/parse-close.json' assert { type: 'json' } +import ParseOffering from '../../../tbdex/hosted/test-vectors/protocol/vectors/parse-offering.json' assert { type: 'json' } +import ParseOrder from '../../../tbdex/hosted/test-vectors/protocol/vectors/parse-order.json' assert { type: 'json' } +import ParseOrderStatus from '../../../tbdex/hosted/test-vectors/protocol/vectors/parse-orderstatus.json' assert { type: 'json' } +import ParseQuote from '../../../tbdex/hosted/test-vectors/protocol/vectors/parse-quote.json' assert { type: 'json' } +import ParseRfq from '../../../tbdex/hosted/test-vectors/protocol/vectors/parse-rfq.json' assert { type: 'json' } describe('Test vectors: parse and serialize', () => { it('parse-close.json', async () => { diff --git a/packages/protocol/tsconfig.json b/packages/protocol/tsconfig.json index ed440e53..90c3416d 100644 --- a/packages/protocol/tsconfig.json +++ b/packages/protocol/tsconfig.json @@ -5,7 +5,6 @@ "DOM", "ES6" ], - "rootDir": "./", "allowJs": true, "target": "esnext", "module": "nodenext", From a41dec2817509ba86e244c5776336603dca3da10 Mon Sep 17 00:00:00 2001 From: Andrew Lee Rubinger Date: Mon, 22 Jan 2024 14:56:49 -0800 Subject: [PATCH 08/16] Install OSSF Scorecard (#66) * Install OSSF Scorecard Enables License and other checks * Add Scorecard Badge to README --------- Co-authored-by: Leo Ribeiro --- .github/workflows/scorecard.yml | 72 +++++++++++++++++++++++++++++++++ README.md | 1 + 2 files changed, 73 insertions(+) create mode 100644 .github/workflows/scorecard.yml diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml new file mode 100644 index 00000000..691cfb57 --- /dev/null +++ b/.github/workflows/scorecard.yml @@ -0,0 +1,72 @@ +# This workflow uses actions that are not certified by GitHub. They are provided +# by a third-party and are governed by separate terms of service, privacy +# policy, and support documentation. + +name: Scorecard supply-chain security +on: + # For Branch-Protection check. Only the default branch is supported. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection + branch_protection_rule: + # To guarantee Maintained check is occasionally updated. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained + schedule: + - cron: '36 14 * * 0' + push: + branches: [ "main" ] + +# Declare default permissions as read only. +permissions: read-all + +jobs: + analysis: + name: Scorecard analysis + runs-on: ubuntu-latest + permissions: + # Needed to upload the results to code-scanning dashboard. + security-events: write + # Needed to publish results and get a badge (see publish_results below). + id-token: write + # Uncomment the permissions below if installing in a private repository. + # contents: read + # actions: read + + steps: + - name: "Checkout code" + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + with: + persist-credentials: false + + - name: "Run analysis" + uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2 + with: + results_file: results.sarif + results_format: sarif + # (Optional) "write" PAT token. Uncomment the `repo_token` line below if: + # - you want to enable the Branch-Protection check on a *public* repository, or + # - you are installing Scorecard on a *private* repository + # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat. + # repo_token: ${{ secrets.SCORECARD_TOKEN }} + + # Public repositories: + # - Publish results to OpenSSF REST API for easy access by consumers + # - Allows the repository to include the Scorecard badge. + # - See https://github.com/ossf/scorecard-action#publishing-results. + # For private repositories: + # - `publish_results` will always be set to `false`, regardless + # of the value entered here. + publish_results: true + + # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF + # format to the repository Actions tab. + - name: "Upload artifact" + uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0 + with: + name: SARIF file + path: results.sarif + retention-days: 5 + + # Upload the results to GitHub's code scanning dashboard. + - name: "Upload to code-scanning" + uses: github/codeql-action/upload-sarif@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4 + with: + sarif_file: results.sarif diff --git a/README.md b/README.md index 6c95951a..2d6c8735 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # tbdex-js [![codecov](https://codecov.io/github/TBD54566975/tbdex-js/graph/badge.svg?token=NE0263LUKG)](https://codecov.io/github/TBD54566975/tbdex-js) +[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/TBD54566975/tbdex-js/badge)](https://securityscorecards.dev/viewer/?uri=github.com/TBD54566975/tbdex-js) This repo contains 3 npm packages: From a9880235ad799fc803074dbd85f336bff3575cdf Mon Sep 17 00:00:00 2001 From: nitro-neal <5314059+nitro-neal@users.noreply.github.com> Date: Tue, 23 Jan 2024 15:25:18 -0600 Subject: [PATCH 09/16] Update test-vectors.spec.ts (#154) * Update test-vectors.spec.ts To get the checkmarks to work and find the correct tests on the test runner, test vectors need to be in this format: TbdexTestVectors { - it('parse-close.json', async () => { +describe('TbdexTestVectorsProtocol', () => { + it('parse_close', async () => { const close = await Close.parse(ParseClose.input) expect(close.toJSON()).to.deep.eq(ParseClose.output) }) - it('parse-offering.json', async() => { + it('parse_offering', async() => { const offering = await Offering.parse(ParseOffering.input) expect(offering.toJSON()).to.deep.eq(ParseOffering.output) }) - it('parse-order.json', async () => { + it('parse_order', async () => { const order = await Order.parse(ParseOrder.input) expect(order.toJSON()).to.deep.eq(ParseOrder.output) }) - it('parse-orderstatus.json', async () => { + it('parse_orderstatus', async () => { const orderstatus = await OrderStatus.parse(ParseOrderStatus.input) expect(orderstatus.toJSON()).to.deep.eq(ParseOrderStatus.output) }) - it('parse-quote.json', async () => { + it('parse_quote', async () => { const quote = await Quote.parse(ParseQuote.input) expect(quote.toJSON()).to.deep.eq(ParseQuote.output) }) - it('parse-rfq.json', async () => { + it('parse_rfq', async () => { const rfq = await Rfq.parse(ParseRfq.input) expect(rfq.toJSON()).to.deep.eq(ParseRfq.output) }) From 738cb1fc64881f5add30f1ca8b69cdbca566f715 Mon Sep 17 00:00:00 2001 From: Jiyoon Koo Date: Tue, 23 Jan 2024 17:29:30 -0500 Subject: [PATCH 10/16] adding default typescript version to align on (#148) * adding default typescript version to align on * ran pnpm install to update lock --- .vscode/settings.json | 3 +++ CODEOWNERS | 2 +- package.json | 1 + pnpm-lock.yaml | 3 +++ 4 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..55712c19 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "typescript.tsdk": "node_modules/typescript/lib" +} \ No newline at end of file diff --git a/CODEOWNERS b/CODEOWNERS index a8e55566..507feb92 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -9,7 +9,7 @@ # The format is described: https://github.blog/2017-07-06-introducing-code-owners/ # These owners will be the default owners for everything in the repo. -* @michaelneale @mistermoe @jiyoontbd @phoebe-lew @KendallWeihe @diehuxx +* @michaelneale @mistermoe @jiyoontbd @phoebe-lew @KendallWeihe @kirahsapong @diehuxx # ----------------------------------------------- diff --git a/package.json b/package.json index e86ec205..eaf20664 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "@types/chai": "4.3.5", "@types/eslint": "8.44.2", "@types/mocha": "10.0.1", + "typescript": "5.2.2", "@typescript-eslint/eslint-plugin": "6.7.0", "@typescript-eslint/parser": "6.7.0", "c8": "^9.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eefc539e..9c849879 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,6 +51,9 @@ importers: semver: specifier: 7.5.4 version: 7.5.4 + typescript: + specifier: 5.2.2 + version: 5.2.2 packages/http-client: dependencies: From c471b3d324a17be8b73189c27e69bde8564ea7e5 Mon Sep 17 00:00:00 2001 From: Jiyoon Koo Date: Tue, 23 Jan 2024 18:12:28 -0500 Subject: [PATCH 11/16] bumping web5 versions (#149) * bumping web5 versions. removed jwt related methods and credential methods in dev-tools * adding dht method to did creation devtool method * fixing crypto by comparing with main * reverting changes to rfq spec * reverting changes to crypto.spec.ts * using didresolver from web5/dids * Use pre instantiated DidResolver * adding a changeset * removing type in get required claims method --------- Co-authored-by: Diane Huxley --- .changeset/real-schools-enjoy.md | 6 + packages/http-client/package.json | 16 +- packages/protocol/package.json | 11 +- packages/protocol/src/crypto.ts | 38 ++-- packages/protocol/src/dev-tools.ts | 98 +--------- packages/protocol/src/did-resolver.ts | 50 +---- packages/protocol/src/message-kinds/rfq.ts | 8 +- .../protocol/src/resource-kinds/offering.ts | 5 +- packages/protocol/tests/crypto.spec.ts | 2 +- packages/protocol/tests/rfq.spec.ts | 24 ++- pnpm-lock.yaml | 177 +++++++++++++----- 11 files changed, 196 insertions(+), 239 deletions(-) create mode 100644 .changeset/real-schools-enjoy.md diff --git a/.changeset/real-schools-enjoy.md b/.changeset/real-schools-enjoy.md new file mode 100644 index 00000000..d953487d --- /dev/null +++ b/.changeset/real-schools-enjoy.md @@ -0,0 +1,6 @@ +--- +"@tbdex/http-client": minor +"@tbdex/protocol": minor +--- + +Upgrading web5 versions in protocol and http-client diff --git a/packages/http-client/package.json b/packages/http-client/package.json index a50ee644..b8fb0a92 100644 --- a/packages/http-client/package.json +++ b/packages/http-client/package.json @@ -50,17 +50,21 @@ }, "dependencies": { "@tbdex/protocol": "workspace:*", - "@web5/common": "0.2.1", - "@web5/crypto": "0.2.2", - "@web5/dids": "0.2.2", - "query-string": "8.1.0" + "@web5/common": "0.2.2", + "@web5/credentials": "0.4.1", + "@web5/crypto": "0.2.4", + "@web5/dids": "0.2.4", + "ms": "2.1.3", + "query-string": "8.1.0", + "typeid-js": "0.3.0" }, "devDependencies": { "@playwright/test": "1.34.3", "@types/chai": "4.3.5", "@types/eslint": "8.37.0", "@types/mocha": "10.0.1", - "@types/sinon": "^17.0.2", + "@types/ms": "0.7.34", + "@types/sinon": "17.0.1", "@typescript-eslint/eslint-plugin": "5.59.0", "@typescript-eslint/parser": "5.59.0", "chai": "4.3.10", @@ -78,7 +82,7 @@ "mkdirp": "3.0.1", "mocha": "10.2.0", "rimraf": "4.4.0", - "sinon": "15.0.2", + "sinon": "17.0.1", "typedoc": "0.25.0", "typedoc-plugin-markdown": "3.16.0", "typescript": "5.2.2" diff --git a/packages/protocol/package.json b/packages/protocol/package.json index 3eb87077..46ce0b98 100644 --- a/packages/protocol/package.json +++ b/packages/protocol/package.json @@ -50,10 +50,10 @@ }, "dependencies": { "@noble/hashes": "1.3.2", - "@web5/common": "0.2.1", - "@web5/credentials": "0.3.2", - "@web5/crypto": "0.2.2", - "@web5/dids": "0.2.2", + "@web5/common": "0.2.2", + "@web5/credentials": "0.4.1", + "@web5/crypto": "0.2.4", + "@web5/dids": "0.2.4", "ajv": "8.12.0", "bignumber.js": "^9.1.2", "canonicalize": "2.0.0", @@ -61,6 +61,7 @@ }, "devDependencies": { "@playwright/test": "1.34.3", + "@types/sinon": "17.0.2", "chai": "4.3.10", "esbuild": "0.16.17", "karma": "6.4.1", @@ -75,7 +76,7 @@ "mocha": "10.2.0", "node-stdlib-browser": "1.2.0", "rimraf": "4.4.0", - "sinon": "15.0.2", + "sinon": "17.0.1", "typedoc": "0.25.0", "typedoc-plugin-markdown": "3.16.0", "typescript": "5.2.2" diff --git a/packages/protocol/src/crypto.ts b/packages/protocol/src/crypto.ts index c5a1e091..25582eb9 100644 --- a/packages/protocol/src/crypto.ts +++ b/packages/protocol/src/crypto.ts @@ -1,19 +1,22 @@ import type { - PrivateKeyJwk as Web5PrivateKeyJwk, CryptoAlgorithm, Web5Crypto, JwsHeaderParams, + JwkParamsEcPrivate, + JwkParamsOkpPrivate, + JwkParamsEcPublic, + JwkParamsOkpPublic, PrivateKeyJwk, PublicKeyJwk } from '@web5/crypto' import { sha256 } from '@noble/hashes/sha256' import { Convert } from '@web5/common' -import { EcdsaAlgorithm, EdDsaAlgorithm, Jose } from '@web5/crypto' -import { deferenceDidUrl, isVerificationMethod } from './did-resolver.js' +import { EcdsaAlgorithm, EdDsaAlgorithm } from '@web5/crypto' +import { DidResolver, isVerificationMethod } from './did-resolver.js' import canonicalize from 'canonicalize' -import { PortableDid } from '@web5/dids' +import { PortableDid, VerificationMethod } from '@web5/dids' /** * Options passed to {@link Crypto.sign} @@ -51,7 +54,7 @@ type SignerValue = { const secp256k1Signer: SignerValue = { signer : new EcdsaAlgorithm(), - options : { name: 'ECDSA', hash: 'SHA-256' }, + options : { name: 'ECDSA' }, alg : 'ES256K', crv : 'secp256k1' } @@ -101,7 +104,7 @@ export class Crypto { static async sign(opts: SignOptions) { const { did, payload, detached } = opts - const privateKeyJwk = did.keySet.verificationMethodKeys?.[0]?.privateKeyJwk + const privateKeyJwk = did.keySet.verificationMethodKeys?.[0]?.privateKeyJwk as JwkParamsEcPrivate | JwkParamsOkpPrivate const algorithmName = privateKeyJwk?.['alg'] || '' let namedCurve = Crypto.extractNamedCurve(privateKeyJwk) @@ -114,19 +117,17 @@ export class Crypto { let verificationMethodId = did.document.verificationMethod?.[0]?.id || '' if (verificationMethodId.startsWith('#')) { - verificationMethodId = `${did.did}#${verificationMethodId}` + verificationMethodId = `${did.did}${verificationMethodId}` } const jwsHeader: JwsHeader = { alg: algorithm.alg, kid: verificationMethodId } const base64UrlEncodedJwsHeader = Convert.object(jwsHeader).toBase64Url() const base64urlEncodedJwsPayload = Convert.uint8Array(payload).toBase64Url() - const key = await Jose.jwkToCryptoKey({ key: privateKeyJwk as Web5PrivateKeyJwk }) - const toSign = `${base64UrlEncodedJwsHeader}.${base64urlEncodedJwsPayload}` const toSignBytes = Convert.string(toSign).toUint8Array() - const signatureBytes = await algorithm.signer.sign({ key, data: toSignBytes, algorithm: algorithm.options }) + const signatureBytes = await algorithm.signer.sign({ key: privateKeyJwk, data: toSignBytes, algorithm: algorithm.options }) const base64UrlEncodedSignature = Convert.uint8Array(signatureBytes).toBase64Url() if (detached) { @@ -170,13 +171,16 @@ export class Crypto { throw new Error('Signature verification failed: Expected JWS header to contain alg and kid') } - const verificationMethod = await deferenceDidUrl(jwsHeader.kid) + const dereferenceResult = await DidResolver.dereference({ didUrl: jwsHeader.kid }) + + const verificationMethod = dereferenceResult.contentStream as VerificationMethod if (!isVerificationMethod(verificationMethod)) { // ensure that appropriate verification method was found throw new Error('Signature verification failed: Expected kid in JWS header to dereference to a DID Document Verification Method') } // will be used to verify signature - const { publicKeyJwk } = verificationMethod + const publicKeyJwk = verificationMethod.publicKeyJwk as JwkParamsEcPublic | JwkParamsOkpPublic + if (!publicKeyJwk) { // ensure that Verification Method includes public key as a JWK. throw new Error('Signature verification failed: Expected kid in JWS header to dereference to a DID Document Verification Method with publicKeyJwk') } @@ -189,15 +193,7 @@ export class Crypto { const algorithmId = `${jwsHeader['alg']}:${Crypto.extractNamedCurve(publicKeyJwk)}` const { signer, options } = Crypto.algorithms[algorithmId] - // TODO: remove this monkeypatch once 'ext' is no longer a required property within a jwk passed to `jwkToCryptoKey` - const monkeyPatchPublicKeyJwk = { - ...publicKeyJwk, - ext : 'true' as const, - key_ops : ['verify'] - } - - const key = await Jose.jwkToCryptoKey({ key: monkeyPatchPublicKeyJwk }) - const isLegit = await signer.verify({ algorithm: options, key, data: signedDataBytes, signature: signatureBytes }) + const isLegit = await signer.verify({ algorithm: options, key: publicKeyJwk, data: signedDataBytes, signature: signatureBytes }) if (!isLegit) { throw new Error('Signature verification failed: Integrity mismatch') diff --git a/packages/protocol/src/dev-tools.ts b/packages/protocol/src/dev-tools.ts index 285bba12..eb7e089a 100644 --- a/packages/protocol/src/dev-tools.ts +++ b/packages/protocol/src/dev-tools.ts @@ -1,13 +1,9 @@ import type { OfferingData, QuoteData, RfqData } from './types.js' import type { PortableDid } from '@web5/dids' - -import { DidIonMethod, DidKeyMethod } from '@web5/dids' -import { utils as vcUtils } from '@web5/credentials' +import { DidDhtMethod, DidIonMethod, DidKeyMethod } from '@web5/dids' +import { VerifiableCredential } from '@web5/credentials' import { Offering } from './resource-kinds/index.js' -import { Convert } from '@web5/common' -import { Crypto } from './crypto.js' -import { Jose } from '@web5/crypto' import { Rfq } from './message-kinds/index.js' import { Resource } from './resource.js' @@ -69,9 +65,11 @@ export class DevTools { */ static async createDid(didMethod: DidMethodOptions = 'key') { if (didMethod === 'key') { - return DidKeyMethod.create() + return await DidKeyMethod.create() } else if (didMethod === 'ion') { - return DidIonMethod.create() + return await DidIonMethod.create() + } else if (didMethod === 'dht') { + return await DidDhtMethod.create() } else { throw new Error(`${didMethod} method not implemented.`) } @@ -219,9 +217,9 @@ export class DevTools { let credential: any = '' if (opts?.sender) { - const { signedCredential } = await DevTools.createCredential({ + const signedCredential = VerifiableCredential.create({ type : 'YoloCredential', - issuer : opts.sender, + issuer : opts.sender.did, subject : opts.sender.did, data : { 'beep': 'boop' @@ -251,84 +249,4 @@ export class DevTools { claims : [credential] } } - - /** - * creates a verifiable credential using the options provided. This method is intended for testing purposes - * @param opts - options used to create the credential - * @returns - */ - static async createCredential(opts: CreateCredentialOptions) { - const credential = { - '@context' : ['https://www.w3.org/2018/credentials/v1'], - 'id' : Date.now().toString(), - 'type' : ['VerifiableCredential', opts.type], - 'issuer' : opts.issuer.did, - 'issuanceDate' : vcUtils.getCurrentXmlSchema112Timestamp(), - 'credentialSubject' : { id: opts.subject, ...opts.data } - } - - const signedCredential = await DevTools.createJwt({ - issuer : opts.issuer, - subject : credential.credentialSubject.id, - payload : { vc: credential } - }) - - return { credential, signedCredential } - } - - /** - * Creates a JWT using the options provided. - * It's signed with the issuer's first verification method private key JWK - * - * @param opts - options used to create the JWT - * @returns a compact JWT - */ - static async createJwt(opts: CreateJwtOptions) { - const { issuer, subject, payload } = opts - const privateKeyJwk = issuer.keySet.verificationMethodKeys?.[0].privateKeyJwk - if (!privateKeyJwk) { - throw Error('Could not get private key JWK from issuer') - } - - // build jwt header - const algorithmName = privateKeyJwk['alg'] || '' - let namedCurve = Crypto.extractNamedCurve(privateKeyJwk) - const algorithmId = `${algorithmName}:${namedCurve}` - const algorithm = Crypto.algorithms[algorithmId] - const jwtHeader = { alg: algorithm.alg, kid: issuer.document.verificationMethod?.[0]?.id } - const base64urlEncodedJwtHeader = Convert.object(jwtHeader).toBase64Url() - - // build jwt payload - const jwtPayload = { iss: issuer.did, sub: subject, ...payload } - const base64urlEncodedJwtPayload = Convert.object(jwtPayload).toBase64Url() - - // build what will be signed - const toSign = `${base64urlEncodedJwtHeader}.${base64urlEncodedJwtPayload}` - const bytesToSign = Convert.string(toSign).toUint8Array() - - // select signer based on the provided key's named curve - const { signer, options } = algorithm - const signingKey = await Jose.jwkToCryptoKey({ key: privateKeyJwk }) - - // generate signature - const signatureBytes = await signer.sign({ key: signingKey, data: bytesToSign, algorithm: options }) - const base64UrlEncodedSignature = Convert.uint8Array(signatureBytes).toBase64Url() - - return `${base64urlEncodedJwtHeader}.${base64urlEncodedJwtPayload}.${base64UrlEncodedSignature}` - } - - /** - * convenience method that can be used to decode a COMPACT JWT - * @param compactJwt - the JWT to decode - * @returns - */ - static decodeJwt(compactJwt: string) { - const [base64urlEncodedJwtHeader, base64urlEncodedJwtPayload, base64urlEncodedSignature] = compactJwt.split('.') - - return { - header : Convert.base64Url(base64urlEncodedJwtHeader).toObject(), - payload : Convert.base64Url(base64urlEncodedJwtPayload).toObject(), - base64urlEncodedSignature - } - } } \ No newline at end of file diff --git a/packages/protocol/src/did-resolver.ts b/packages/protocol/src/did-resolver.ts index 8ec30fd0..ddb960a7 100644 --- a/packages/protocol/src/did-resolver.ts +++ b/packages/protocol/src/did-resolver.ts @@ -1,6 +1,6 @@ import type { DidDocument, DidService, VerificationMethod } from '@web5/dids' -import { DidResolver as Web5DidResolver, DidKeyMethod, DidIonMethod, DidDhtMethod, utils as didUtils } from '@web5/dids' +import { DidResolver as Web5DidResolver, DidKeyMethod, DidIonMethod, DidDhtMethod } from '@web5/dids' /** * Can be used to resolve did:ion and did:key DIDs @@ -36,58 +36,12 @@ export async function resolveDid(did: string): Promise { */ export type DidResource = DidDocument | VerificationMethod | DidService -// TODO https://github.com/TBD54566975/tbdex-js/issues/147 Remove deferenceDidUrl with web5/dids DidResolver#dereference -/** - * Dereferences a DID URL according to [specification](https://www.w3.org/TR/did-core/#did-url-dereferencing). - * See also: [DID URL Syntax](https://www.w3.org/TR/did-core/#did-url-syntax) - * - * **Note**: Support is limited to did#fragment within [Verification Method](https://www.w3.org/TR/did-core/#verification-methods) - * and [Service](https://www.w3.org/TR/did-core/#services) only - * @param didUrl - the did url to dereference - * @returns the dereferenced resource - * @throws if DID URL cannot be parsed - * @throws if DID cannot be resolved - * @beta - */ -export async function deferenceDidUrl(didUrl: string): Promise { - const parsedDid = didUtils.parseDid({ didUrl }) - if (!parsedDid) { - throw new Error('failed to parse did') - } - - const didDocument = await resolveDid(didUrl) - - // return the entire DID Document if no fragment is present on the did url - if (!parsedDid.fragment) { - return didDocument - } - - const { service, verificationMethod } = didDocument - - // create a set of possible id matches. the DID spec allows for an id to be the entire did#fragment or just #fragment. - // See: https://www.w3.org/TR/did-core/#relative-did-urls - // using a set for fast string comparison. DIDs can be lonnng. - const idSet = new Set([didUrl, parsedDid.fragment, `#${parsedDid.fragment}`]) - - for (let vm of verificationMethod || []) { - if (idSet.has(vm.id)) { - return vm - } - } - - for (let svc of service || []) { - if (idSet.has(svc.id)) { - return svc - } - } -} - /** * type guard for {@link @web5/dids#VerificationMethod} * @param didResource - the resource to check * @returns true if the didResource is a `VerificationMethod` * @beta */ -export function isVerificationMethod(didResource: DidResource | undefined): didResource is VerificationMethod { +export function isVerificationMethod(didResource: DidResource | null): didResource is VerificationMethod { return !!didResource && 'id' in didResource && 'type' in didResource && 'controller' in didResource } \ No newline at end of file diff --git a/packages/protocol/src/message-kinds/rfq.ts b/packages/protocol/src/message-kinds/rfq.ts index 2073a9ab..47f90765 100644 --- a/packages/protocol/src/message-kinds/rfq.ts +++ b/packages/protocol/src/message-kinds/rfq.ts @@ -12,7 +12,7 @@ import Ajv from 'ajv' */ export type CreateRfqOptions = { data: MessageKindModel<'rfq'> - metadata: Omit, 'id' |'kind' | 'createdAt' | 'exchangeId'> + metadata: Omit, 'id' | 'kind' | 'createdAt' | 'exchangeId'> private?: Record } @@ -61,7 +61,7 @@ export class Rfq extends Message<'rfq'> { * @throws if {@link Rfq.payoutMethod} property `paymentDetails` cannot be validated against the provided offering's payoutMethod requiredPaymentDetails */ async verifyOfferingRequirements(offering: Offering | ResourceModel<'offering'>) { - if (offering.metadata.id !== this.offeringId) { + if (offering.metadata.id !== this.offeringId) { throw new Error(`offering id mismatch. (rfq) ${this.offeringId} !== ${offering.metadata.id} (offering)`) } @@ -146,14 +146,14 @@ export class Rfq extends Message<'rfq'> { return } - const credentials = PresentationExchange.selectCredentials(this.claims, offering.data.requiredClaims) + const credentials = PresentationExchange.selectCredentials({ vcJwts: this.claims, presentationDefinition: offering.data.requiredClaims }) if (!credentials.length) { throw new Error(`claims do not fulfill the offering's requirements`) } for (let credential of credentials) { - await VerifiableCredential.verify(credential) + await VerifiableCredential.verify({ vcJwt: credential }) } } diff --git a/packages/protocol/src/resource-kinds/offering.ts b/packages/protocol/src/resource-kinds/offering.ts index 516d53f9..199d9606 100644 --- a/packages/protocol/src/resource-kinds/offering.ts +++ b/packages/protocol/src/resource-kinds/offering.ts @@ -1,6 +1,5 @@ import type { ResourceKindModel, ResourceMetadata } from '../types.js' import { Resource } from '../resource.js' -import type { PresentationDefinitionV2 } from '@web5/credentials' /** * Options passed to {@link Offering.create} @@ -66,9 +65,7 @@ export class Offering extends Resource<'offering'> { } /** Articulates the claim(s) required when submitting an RFQ for this offering. */ - // TODO: Remove type annotation once type alias replaced with direct export in @web5/credentials - // [Link to the PR](https://github.com/TBD54566975/web5-js/pull/336) - get requiredClaims(): PresentationDefinitionV2 | undefined { + get requiredClaims() { return this.data.requiredClaims } } \ No newline at end of file diff --git a/packages/protocol/tests/crypto.spec.ts b/packages/protocol/tests/crypto.spec.ts index 47008aa5..678a1f8c 100644 --- a/packages/protocol/tests/crypto.spec.ts +++ b/packages/protocol/tests/crypto.spec.ts @@ -1,7 +1,7 @@ import { expect } from 'chai' -import { DevTools, Crypto } from '../src/main.js' import { Convert } from '@web5/common' +import { Crypto, DevTools } from '../src/main.js' describe('Crypto', () => { describe('sign / verify', () => { diff --git a/packages/protocol/tests/rfq.spec.ts b/packages/protocol/tests/rfq.spec.ts index 7e2c5a16..2ce8ab03 100644 --- a/packages/protocol/tests/rfq.spec.ts +++ b/packages/protocol/tests/rfq.spec.ts @@ -1,3 +1,4 @@ +import { VerifiableCredential } from '@web5/credentials' import type { CreateRfqOptions, Offering } from '../src/main.js' import { Rfq, DevTools } from '../src/main.js' @@ -142,9 +143,9 @@ describe('Rfq', () => { beforeEach(async () => { const did = await DevTools.createDid() - const { signedCredential } = await DevTools.createCredential({ // this credential fulfills the offering's required claims + const vc = await VerifiableCredential.create({ // this credential fulfills the offering's required claims type : 'SanctionsCredential', - issuer : did, + issuer : did.did, subject : did.did, data : { 'beep': 'boop' @@ -152,6 +153,7 @@ describe('Rfq', () => { }) offering = DevTools.createOffering() + const vcJwt = await vc.sign({ did }) rfqOptions = { metadata: { @@ -164,7 +166,7 @@ describe('Rfq', () => { } } rfqOptions.metadata.from = did.did - rfqOptions.data.claims = [signedCredential] + rfqOptions.data.claims = [vcJwt] }) it('throws an error if offeringId doesn\'t match the provided offering\'s id', async () => { @@ -287,17 +289,19 @@ describe('Rfq', () => { it(`does not throw an exception if an rfq's claims fulfill the provided offering's requirements`, async () => { const did = await DevTools.createDid() const offering = DevTools.createOffering() - const { signedCredential } = await DevTools.createCredential({ // this credential fulfills the offering's required claims + const vc = await VerifiableCredential.create({ // this credential fulfills the offering's required claims type : 'SanctionsCredential', - issuer : did, + issuer : did.did, subject : did.did, data : { 'beep': 'boop' } }) + const vcJwt = await vc.sign({ did }) + const rfqData = await DevTools.createRfqData() - rfqData.claims = [signedCredential] + rfqData.claims = [vcJwt] const rfq = Rfq.create({ metadata : { from: did.did, to: 'did:ex:pfi' }, @@ -310,17 +314,19 @@ describe('Rfq', () => { it(`throws an exception if an rfq's claims dont fulfill the provided offering's requirements`, async () => { const did = await DevTools.createDid() const offering = DevTools.createOffering() - const { signedCredential } = await DevTools.createCredential({ + const vc = await VerifiableCredential.create({ type : 'PuupuuCredential', - issuer : did, + issuer : did.did, subject : did.did, data : { 'beep': 'boop' } }) + const vcJwt = await vc.sign({ did}) + const rfqData = await DevTools.createRfqData() - rfqData.claims = [signedCredential] + rfqData.claims = [vcJwt] const rfq = Rfq.create({ metadata : { from: did.did, to: 'did:ex:pfi' }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9c849879..7473ddcd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -61,17 +61,26 @@ importers: specifier: workspace:* version: link:../protocol '@web5/common': - specifier: 0.2.1 - version: 0.2.1 - '@web5/crypto': specifier: 0.2.2 version: 0.2.2 + '@web5/credentials': + specifier: 0.4.1 + version: 0.4.1 + '@web5/crypto': + specifier: 0.2.4 + version: 0.2.4 '@web5/dids': - specifier: 0.2.2 - version: 0.2.2 + specifier: 0.2.4 + version: 0.2.4 + ms: + specifier: 2.1.3 + version: 2.1.3 query-string: specifier: 8.1.0 version: 8.1.0 + typeid-js: + specifier: 0.3.0 + version: 0.3.0 devDependencies: '@playwright/test': specifier: 1.34.3 @@ -85,9 +94,12 @@ importers: '@types/mocha': specifier: 10.0.1 version: 10.0.1 + '@types/ms': + specifier: 0.7.34 + version: 0.7.34 '@types/sinon': - specifier: ^17.0.2 - version: 17.0.2 + specifier: 17.0.1 + version: 17.0.1 '@typescript-eslint/eslint-plugin': specifier: 5.59.0 version: 5.59.0(@typescript-eslint/parser@5.59.0)(eslint@8.43.0)(typescript@5.2.2) @@ -140,8 +152,8 @@ importers: specifier: 4.4.0 version: 4.4.0 sinon: - specifier: 15.0.2 - version: 15.0.2 + specifier: 17.0.1 + version: 17.0.1 typedoc: specifier: 0.25.0 version: 0.25.0(typescript@5.2.2) @@ -204,17 +216,17 @@ importers: specifier: 1.3.2 version: 1.3.2 '@web5/common': - specifier: 0.2.1 - version: 0.2.1 - '@web5/credentials': - specifier: 0.3.2 - version: 0.3.2 - '@web5/crypto': specifier: 0.2.2 version: 0.2.2 + '@web5/credentials': + specifier: 0.4.1 + version: 0.4.1 + '@web5/crypto': + specifier: 0.2.4 + version: 0.2.4 '@web5/dids': - specifier: 0.2.2 - version: 0.2.2 + specifier: 0.2.4 + version: 0.2.4 ajv: specifier: 8.12.0 version: 8.12.0 @@ -231,6 +243,9 @@ importers: '@playwright/test': specifier: 1.34.3 version: 1.34.3 + '@types/sinon': + specifier: 17.0.2 + version: 17.0.2 chai: specifier: 4.3.10 version: 4.3.10 @@ -274,8 +289,8 @@ importers: specifier: 4.4.0 version: 4.4.0 sinon: - specifier: 15.0.2 - version: 15.0.2 + specifier: 17.0.1 + version: 17.0.1 typedoc: specifier: 0.25.0 version: 0.25.0(typescript@5.2.2) @@ -988,10 +1003,6 @@ packages: fsevents: 2.3.2 dev: true - /@scure/base@1.1.3: - resolution: {integrity: sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q==} - dev: false - /@sinonjs/commons@2.0.0: resolution: {integrity: sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==} dependencies: @@ -1010,8 +1021,14 @@ packages: '@sinonjs/commons': 3.0.0 dev: true - /@sinonjs/samsam@7.0.1: - resolution: {integrity: sha512-zsAk2Jkiq89mhZovB2LLOdTCxJF4hqqTToGP0ASWlhp4I1hqOjcfmZGafXntCN7MDC6yySH0mFHrYtHceOeLmw==} + /@sinonjs/fake-timers@11.2.2: + resolution: {integrity: sha512-G2piCSxQ7oWOxwGSAyFHfPIsyeJGXYtc6mFbnFA+kRXkiEnTl8c/8jul2S329iFBnDI9HGoeWWAZvuvOkZccgw==} + dependencies: + '@sinonjs/commons': 3.0.0 + dev: true + + /@sinonjs/samsam@8.0.0: + resolution: {integrity: sha512-Bp8KUVlLp8ibJZrnvq2foVhP0IVX2CIprMJPK0vqGqgrDa0OHVKeZyBykqskkrdxV6yKBPmGasO8LVjAKR3Gew==} dependencies: '@sinonjs/commons': 2.0.0 lodash.get: 4.4.2 @@ -1151,6 +1168,10 @@ packages: resolution: {integrity: sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==} dev: true + /@types/ms@0.7.34: + resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} + dev: true + /@types/node@12.20.55: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} dev: true @@ -1192,6 +1213,12 @@ packages: '@types/node': 20.9.4 dev: true + /@types/sinon@17.0.1: + resolution: {integrity: sha512-Q2Go6TJetYn5Za1+RJA1Aik61Oa2FS8SuJ0juIqUuJ5dZR4wvhKfmSdIqWtQ3P6gljKWjW0/R7FZkA4oXVL6OA==} + dependencies: + '@types/sinonjs__fake-timers': 8.1.5 + dev: true + /@types/sinon@17.0.2: resolution: {integrity: sha512-Zt6heIGsdqERkxctIpvN5Pv3edgBrhoeb3yHyxffd4InN0AX2SVNKSrhdDZKGQICVOxWP/q4DyhpfPNMSrpIiA==} dependencies: @@ -1471,13 +1498,26 @@ packages: multiformats: 11.0.2 dev: false - /@web5/credentials@0.3.2: - resolution: {integrity: sha512-hxLJfmOngglgHvIzVtxlKYFHn2atnxhH6RZCCruoHGCNVEVcKG5wXZl6D4FJ/BMlIr8SwUg8RW/I0ns0O31vqw==} + /@web5/common@0.2.2: + resolution: {integrity: sha512-dRn6SmALExeTLMTK/W5ozGarfaddK+Lraf5OjuIGLAaLfcX1RWx3oDMoY5Hr9LjfxHJC8mGXB8DnKflbeYJRgA==} + engines: {node: '>=18.0.0'} + dependencies: + level: 8.0.0 + multiformats: 11.0.2 + readable-stream: 4.4.2 + dev: false + + /@web5/credentials@0.4.1: + resolution: {integrity: sha512-GMbS/N9AqAURjH6+Mvo49AJJxe9uli5mU+dzXtGgFJhiwD4FfqRPxdO1C3R0Tj2aCY3OAQVcCKQgmLRm2hHZlw==} engines: {node: '>=18.0.0'} dependencies: '@sphereon/pex': 2.1.0 - did-jwt: 7.4.5 - uuid: 9.0.1 + '@web5/common': 0.2.2 + '@web5/crypto': 0.2.4 + '@web5/dids': 0.2.4 + transitivePeerDependencies: + - encoding + - supports-color dev: false /@web5/crypto@0.2.2: @@ -1490,6 +1530,16 @@ packages: '@web5/common': 0.2.1 dev: false + /@web5/crypto@0.2.4: + resolution: {integrity: sha512-heRUuV10mZ04dWp1C2mNF/EEPw8nnRe+yAXvmclJ+4XUHL6+mY7j+hjYOTKUAQzd4ouvbHrpJM0uYcUntA3AeA==} + engines: {node: '>=18.0.0'} + dependencies: + '@noble/ciphers': 0.4.0 + '@noble/curves': 1.2.0 + '@noble/hashes': 1.3.2 + '@web5/common': 0.2.2 + dev: false + /@web5/dids@0.2.2: resolution: {integrity: sha512-dARcpQIMzmayINWFemxP+shhfHLtYB+ZXoSZ1TKKnjF7qzraL30KwBSDwaNEPYaAzgo0x/1rvyv+zAgfa5MeNw==} engines: {node: '>=18.0.0'} @@ -1509,6 +1559,32 @@ packages: - supports-color dev: false + /@web5/dids@0.2.4: + resolution: {integrity: sha512-e+m+xgpiM8ydTJgWcPdwmjILLMZYdl2kwahlO22mK0azSKVrg1klpGrUODzqkrWrQ5O0tnOyqEy39FcD5Sy11w==} + engines: {node: '>=18.0.0'} + dependencies: + '@decentralized-identity/ion-pow-sdk': 1.0.17 + '@decentralized-identity/ion-sdk': 1.0.1 + '@web5/common': 0.2.2 + '@web5/crypto': 0.2.2 + did-resolver: 4.1.0 + dns-packet: 5.6.1 + level: 8.0.0 + ms: 2.1.3 + pkarr: 1.1.1 + z32: 1.0.1 + transitivePeerDependencies: + - encoding + - supports-color + dev: false + + /abort-controller@3.0.0: + resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} + engines: {node: '>=6.5'} + dependencies: + event-target-shim: 5.0.1 + dev: false + /abstract-level@1.0.3: resolution: {integrity: sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==} engines: {node: '>=12'} @@ -2515,20 +2591,6 @@ packages: resolution: {integrity: sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA==} dev: true - /did-jwt@7.4.5: - resolution: {integrity: sha512-PjUFy/yhYeivNrQI5EaqYvF+cRL0itARQlXPfAnUUcj4tm40fzCU/0yWkhAoAPfM41e8O+QVRqOXwg0cZjlVeg==} - dependencies: - '@noble/ciphers': 0.4.0 - '@noble/curves': 1.2.0 - '@noble/hashes': 1.3.2 - '@scure/base': 1.1.3 - canonicalize: 2.0.0 - did-resolver: 4.1.0 - multibase: 4.0.6 - multiformats: 9.9.0 - uint8arrays: 3.1.1 - dev: false - /did-resolver@4.1.0: resolution: {integrity: sha512-S6fWHvCXkZg2IhS4RcVHxwuyVejPR7c+a4Go0xbQ9ps5kILa8viiYQgrM4gfTyeTjJ0ekgJH9gk/BawTpmkbZA==} dev: false @@ -2952,6 +3014,11 @@ packages: engines: {node: '>= 0.6'} dev: false + /event-target-shim@5.0.1: + resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} + engines: {node: '>=6'} + dev: false + /eventemitter3@4.0.7: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} dev: true @@ -2959,7 +3026,6 @@ packages: /events@3.3.0: resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} engines: {node: '>=0.8.x'} - dev: true /evp_bytestokey@1.0.3: resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} @@ -4945,7 +5011,6 @@ packages: /process@0.11.10: resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} engines: {node: '>= 0.6.0'} - dev: true /promise-inflight@1.0.1: resolution: {integrity: sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==} @@ -5109,6 +5174,17 @@ packages: util-deprecate: 1.0.2 dev: true + /readable-stream@4.4.2: + resolution: {integrity: sha512-Lk/fICSyIhodxy1IDK2HazkeGjSmezAWX2egdtJnYhtzKEsBPJowlI6F6LPb5tqIQILrMbx22S5o3GuJavPusA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + abort-controller: 3.0.0 + buffer: 6.0.3 + events: 3.3.0 + process: 0.11.10 + string_decoder: 1.3.0 + dev: false + /readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} @@ -5436,13 +5512,12 @@ packages: engines: {node: '>=14'} dev: true - /sinon@15.0.2: - resolution: {integrity: sha512-PCVP63XZkg0/LOqQH5rEU4LILuvTFMb5tNxTHfs6VUMNnZz2XrnGSTZbAGITjzwQWbl/Bl/8hi4G3zZWjyBwHg==} - deprecated: 16.1.1 + /sinon@17.0.1: + resolution: {integrity: sha512-wmwE19Lie0MLT+ZYNpDymasPHUKTaZHUH/pKEubRXIzySv9Atnlw+BUMGCzWgV7b7wO+Hw6f1TEOr0IUnmU8/g==} dependencies: '@sinonjs/commons': 3.0.0 - '@sinonjs/fake-timers': 10.3.0 - '@sinonjs/samsam': 7.0.1 + '@sinonjs/fake-timers': 11.2.2 + '@sinonjs/samsam': 8.0.0 diff: 5.1.0 nise: 5.1.5 supports-color: 7.2.0 @@ -5689,7 +5764,6 @@ packages: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} dependencies: safe-buffer: 5.2.1 - dev: true /strip-ansi@4.0.0: resolution: {integrity: sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==} @@ -6088,6 +6162,7 @@ packages: /uuid@9.0.1: resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} hasBin: true + dev: true /uuidv7@0.4.4: resolution: {integrity: sha512-jjRGChg03uGp9f6wQYSO8qXkweJwRbA5WRuEQE8xLIiehIzIIi23qZSzsyvZPCPoFqkeLtZuz7Plt1LGukAInA==} From 673f7e40179bb71680feb02c6b4523fd9a2f6898 Mon Sep 17 00:00:00 2001 From: Leo Ribeiro Date: Wed, 24 Jan 2024 19:50:00 -0500 Subject: [PATCH 12/16] Rename sdk-development -> web5-spec (#151) * Rename sdk-development -> web5-spec * sdk-report-runner Co-authored-by: nitro-neal <5314059+nitro-neal@users.noreply.github.com> --------- Co-authored-by: nitro-neal <5314059+nitro-neal@users.noreply.github.com> --- .github/workflows/integrity-check.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integrity-check.yml b/.github/workflows/integrity-check.yml index 66159f2b..5f846fd6 100644 --- a/.github/workflows/integrity-check.yml +++ b/.github/workflows/integrity-check.yml @@ -85,9 +85,9 @@ jobs: app-id: ${{ secrets.CICD_ROBOT_GITHUB_APP_ID }} private-key: ${{ secrets.CICD_ROBOT_GITHUB_APP_PRIVATE_KEY }} owner: TBD54566975 - repositories: sdk-development + repositories: sdk-report-runner - - name: Trigger sdk-development report build + - name: Trigger sdk-report-runner report build if: github.ref == 'refs/heads/main' run: | curl -L \ @@ -96,7 +96,7 @@ jobs: -H "Content-Type: application/json" \ --fail \ --data '{"ref": "main"}' \ - https://api.github.com/repos/TBD54566975/sdk-development/actions/workflows/build-report.yaml/dispatches + https://api.github.com/repos/TBD54566975/sdk-report-runner/actions/workflows/build-report.yaml/dispatches env: APP_TOKEN: ${{ steps.generate_token.outputs.token }} From 72fa522e7a5ce5128c075f61215f3be4b49e5e34 Mon Sep 17 00:00:00 2001 From: Jiyoon Koo Date: Wed, 24 Jan 2024 21:22:31 -0500 Subject: [PATCH 13/16] test vector changes (#152) * pulling in test vector changes from pr 122 * lock yml update * using fs to writeFile to overwrite the test vectors * new commit on tbdex * using vc.sign() in devtool.createRfqData() * using devtools method for generating test vectors * changing description for each test vector generation method to fit the message being built --- packages/protocol/package.json | 5 +- packages/protocol/src/dev-tools.ts | 33 +---- .../protocol/tests/generate-test-vectors.ts | 122 +++++++++++++++--- packages/protocol/tests/test-vectors.spec.ts | 1 - pnpm-lock.yaml | 7 + tbdex | 2 +- 6 files changed, 120 insertions(+), 50 deletions(-) diff --git a/packages/protocol/package.json b/packages/protocol/package.json index 46ce0b98..0a4b2145 100644 --- a/packages/protocol/package.json +++ b/packages/protocol/package.json @@ -54,6 +54,7 @@ "@web5/credentials": "0.4.1", "@web5/crypto": "0.2.4", "@web5/dids": "0.2.4", + "@types/node": "^7.0.5", "ajv": "8.12.0", "bignumber.js": "^9.1.2", "canonicalize": "2.0.0", @@ -87,9 +88,9 @@ "build:esm": "rimraf dist/esm dist/types && tsc", "build:cjs": "rimraf dist/cjs && tsc -p tsconfig.cjs.json && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json", "build:browser": "rimraf dist/browser.mjs dist/browser.js && node build/bundles.js", - "test:node": "rimraf tests/compiled && pnpm compile-validators && tsc -p tests/tsconfig.json && c8 mocha", + "test:node": "rimraf tests/compiled && pnpm compile-validators && tsc -p tests/tsconfig.json && mocha", "test:browser": "pnpm compile-validators && karma start karma.conf.cjs", - "generate-test-vectors": "tsc -p tests/tsconfig.json && node tests/compiled/tests/generate-test-vectors.js", + "generate-test-vectors": "tsc -p tests/tsconfig.json && node tests/compiled/packages/protocol/tests/generate-test-vectors.js", "build": "pnpm clean && pnpm compile-validators && pnpm build:esm && pnpm build:cjs && pnpm build:browser", "lint": "eslint . --ext .ts --max-warnings 0", "lint:fix": "eslint . --ext .ts --fix", diff --git a/packages/protocol/src/dev-tools.ts b/packages/protocol/src/dev-tools.ts index eb7e089a..fea5125e 100644 --- a/packages/protocol/src/dev-tools.ts +++ b/packages/protocol/src/dev-tools.ts @@ -29,31 +29,6 @@ export type RfqOptions = { receiver?: PortableDid } - -/** - * Options passed to {@link DevTools.createCredential} - * @beta - */ -export type CreateCredentialOptions = Omit & { - /** the credential type (e.g. UniversityDegreeCredential) */ - type: string - /** data to include in the credential */ - data: Record -} - -/** - * Options passed to {@link DevTools.createJwt} - * @beta - */ -export type CreateJwtOptions = { - /** the thing to sign */ - payload: any, - /** the JWT's subject (e.g. Alice's DID) */ - subject: string - /** the JWT's issuer */ - issuer: PortableDid -} - /** * Utility functions for testing purposes * @beta @@ -214,10 +189,10 @@ export class DevTools { * creates an example RfqData. Useful for testing purposes */ static async createRfqData(opts?: RfqOptions): Promise { - let credential: any = '' + let vcJwt: string = '' if (opts?.sender) { - const signedCredential = VerifiableCredential.create({ + const vc = await VerifiableCredential.create({ type : 'YoloCredential', issuer : opts.sender.did, subject : opts.sender.did, @@ -225,7 +200,7 @@ export class DevTools { 'beep': 'boop' } }) - credential = signedCredential + vcJwt = await vc.sign({ did: opts.sender }) } return { @@ -246,7 +221,7 @@ export class DevTools { } }, payinAmount : '200.00', - claims : [credential] + claims : [vcJwt] } } } \ No newline at end of file diff --git a/packages/protocol/tests/generate-test-vectors.ts b/packages/protocol/tests/generate-test-vectors.ts index 71cb72bc..8e550714 100644 --- a/packages/protocol/tests/generate-test-vectors.ts +++ b/packages/protocol/tests/generate-test-vectors.ts @@ -1,10 +1,11 @@ -import { DevTools, Message, Offering, Quote, Rfq } from '../src/main.js' +import { DidKeyMethod } from '@web5/dids' +import { VerifiableCredential } from '@web5/credentials' +import { Close, DevTools, Message, Order, OrderStatus, Quote, Rfq } from '../src/main.js' +import fs from 'fs' /** * Use this util when you are modifying or adding a new test vector to `tbdex`. */ - - type TestVector = { description: string input: string @@ -13,11 +14,8 @@ type TestVector = { } const generateParseOfferingVector = async () => { - const did = await DevTools.createDid() - const offering = Offering.create({ - metadata : { from: did.did }, - data : DevTools.createOfferingData() - }) + const did = await DidKeyMethod.create() + const offering = DevTools.createOffering() await offering.sign(did) @@ -30,7 +28,7 @@ const generateParseOfferingVector = async () => { } const generateParseQuoteVector = async () => { - const did = await DevTools.createDid() + const did = await DidKeyMethod.create() const quote = Quote.create({ metadata: { exchangeId : Message.generateId('rfq'), @@ -50,10 +48,40 @@ const generateParseQuoteVector = async () => { } const generateParseRfqVector = async () => { - const did = await DevTools.createDid() + const did = await DidKeyMethod.create() + const vc = await VerifiableCredential.create({ + type : 'PuupuuCredential', + issuer : did.did, + subject : did.did, + data : { + 'beep': 'boop' + } + }) + + const vcJwt = await vc.sign({ did }) + const rfq = Rfq.create({ metadata : { from: did.did, to: 'did:ex:pfi' }, - data : await DevTools.createRfqData() + data : { + offeringId : 'abcd123', + payinMethod : { + kind : 'DEBIT_CARD', + paymentDetails : { + 'cardNumber' : '1234567890123456', + 'expiryDate' : '12/22', + 'cardHolderName' : 'Ephraim Bartholomew Winthrop', + 'cvv' : '123' + } + }, + payoutMethod: { + kind : 'BTC_ADDRESS', + paymentDetails : { + btcAddress: '1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa' + } + }, + payinAmount : '20000.00', + claims : [vcJwt] + } }) await rfq.sign(did) @@ -66,10 +94,62 @@ const generateParseRfqVector = async () => { } } +const generateParseOrderVector = async () => { + const did = await DidKeyMethod.create() + const order = Order.create({ + metadata: { from: did.did, to: 'did:ex:pfi', exchangeId: 'abcd123' } + }) + + await order.sign(did) + + return { + description : 'Order parses from string', + input : JSON.stringify(order), + output : order.toJSON(), + error : false, + } +} + +const generateParseCloseVector = async () => { + const did = await DidKeyMethod.create() + const close = Close.create({ + metadata : { from: did.did, to: 'did:ex:pfi', exchangeId: 'abcd123' }, + data : { + reason: 'The reason for closing the exchange' + } + }) + + await close.sign(did) + + return { + description : 'Close parses from string', + input : JSON.stringify(close), + output : close.toJSON(), + error : false, + } +} + +const generateParseOrderStatusVector = async () => { + const did = await DidKeyMethod.create() + const orderStatus = OrderStatus.create({ + metadata : { from: did.did, to: 'did:ex:pfi', exchangeId: 'abcd123' }, + data : { + orderStatus: 'wee' + } + }) + + await orderStatus.sign(did) + + return { + description : 'Order Status parses from string', + input : JSON.stringify(orderStatus), + output : orderStatus.toJSON(), + error : false, + } +} + /** - * Generates TestVector objects and prints em out. - * From there, you can prettify it and paste it into the corresponding test vector file by hand. - * If you think this is janky, soz bro :/ it's the level of (in)convenience that works for me right now. + * Generates TestVector objects and overwrites the corresponding test vector files in `tbdex`. */ const overWriteTestVectors = async () => { @@ -77,12 +157,20 @@ const overWriteTestVectors = async () => { const vectorFilePair: { filename: string, vector: TestVector }[] = [ { filename: 'parse-offering.json', vector: await generateParseOfferingVector() }, { filename: 'parse-quote.json', vector: await generateParseQuoteVector() }, - { filename: 'parse-rfq.json', vector: await generateParseRfqVector() } + { filename: 'parse-close.json', vector: await generateParseCloseVector() }, + { filename: 'parse-rfq.json', vector: await generateParseRfqVector() }, + { filename: 'parse-order.json', vector: await generateParseOrderVector() }, + { filename: 'parse-orderstatus.json', vector: await generateParseOrderStatusVector() }, ] for (const { filename, vector } of vectorFilePair) { - console.log(filename) - console.log(JSON.stringify(vector, null, 2)) + const fileLocation = `../../tbdex/hosted/test-vectors/protocol/vectors/${filename}` + console.log(`Overwriting ${fileLocation} with new test vector.`) + try { + fs.writeFileSync(fileLocation, JSON.stringify(vector, null, 2)) + } catch (err) { + console.error(`Error writing file ${fileLocation}:`, err) + } } } diff --git a/packages/protocol/tests/test-vectors.spec.ts b/packages/protocol/tests/test-vectors.spec.ts index 33a8e017..94808e09 100644 --- a/packages/protocol/tests/test-vectors.spec.ts +++ b/packages/protocol/tests/test-vectors.spec.ts @@ -39,4 +39,3 @@ describe('TbdexTestVectorsProtocol', () => { expect(rfq.toJSON()).to.deep.eq(ParseRfq.output) }) }) - diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7473ddcd..627dd52d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -215,6 +215,9 @@ importers: '@noble/hashes': specifier: 1.3.2 version: 1.3.2 + '@types/node': + specifier: ^7.0.5 + version: 7.10.14 '@web5/common': specifier: 0.2.2 version: 0.2.2 @@ -1182,6 +1185,10 @@ packages: undici-types: 5.26.5 dev: true + /@types/node@7.10.14: + resolution: {integrity: sha512-29GS75BE8asnTno3yB6ubOJOO0FboExEqNJy4bpz0GSmW/8wPTNL4h9h63c6s1uTrOopCmJYe/4yJLh5r92ZUA==} + dev: false + /@types/normalize-package-data@2.4.4: resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} dev: true diff --git a/tbdex b/tbdex index e3e304cc..c19cd468 160000 --- a/tbdex +++ b/tbdex @@ -1 +1 @@ -Subproject commit e3e304ccf62e26d01e85fdbcd72200cde3b94cff +Subproject commit c19cd4680209e0d817a1f9299787d3ac0dcdc25a From 550fe941c0ce1546f91f12e8eda7b6738d94fd3d Mon Sep 17 00:00:00 2001 From: kirahsapong <102400653+kirahsapong@users.noreply.github.com> Date: Thu, 25 Jan 2024 10:13:44 -0800 Subject: [PATCH 14/16] Replace karma with web-test-runner (#133) * Replace karma with wtr in http-client * Replace karma with wtr in protocol * Add changeset * rebase and update deps * Fix protocol devtool implementation after web5/credentials pkg update * Add glob to build for http-client browser tests * Add glob to build for protocol tests * update deps * Fix tests --- .changeset/famous-llamas-sit.md | 6 + packages/http-client/karma.conf.cjs | 87 - packages/http-client/package.json | 17 +- .../http-client/tests/buffer-polyfill.cjs | 4 + packages/http-client/tests/bundle-tests.mjs | 22 + .../http-client/web-test-runner.config.mjs | 28 + packages/protocol/karma.conf.cjs | 87 - packages/protocol/package.json | 14 +- packages/protocol/src/dev-tools.ts | 6 +- packages/protocol/tests/bundle-tests.mjs | 21 + .../protocol/tests/generate-test-vectors.ts | 2 +- packages/protocol/tests/test-vectors.spec.ts | 6 + packages/protocol/web-test-runner.config.mjs | 28 + pnpm-lock.yaml | 1960 ++++++++++++----- 14 files changed, 1597 insertions(+), 691 deletions(-) create mode 100644 .changeset/famous-llamas-sit.md delete mode 100644 packages/http-client/karma.conf.cjs create mode 100644 packages/http-client/tests/buffer-polyfill.cjs create mode 100644 packages/http-client/tests/bundle-tests.mjs create mode 100644 packages/http-client/web-test-runner.config.mjs delete mode 100644 packages/protocol/karma.conf.cjs create mode 100644 packages/protocol/tests/bundle-tests.mjs create mode 100644 packages/protocol/web-test-runner.config.mjs diff --git a/.changeset/famous-llamas-sit.md b/.changeset/famous-llamas-sit.md new file mode 100644 index 00000000..a0f7c1c0 --- /dev/null +++ b/.changeset/famous-llamas-sit.md @@ -0,0 +1,6 @@ +--- +"@tbdex/http-client": patch +"@tbdex/protocol": patch +--- + +Replaces karma testing library with web-test-runner diff --git a/packages/http-client/karma.conf.cjs b/packages/http-client/karma.conf.cjs deleted file mode 100644 index f133accb..00000000 --- a/packages/http-client/karma.conf.cjs +++ /dev/null @@ -1,87 +0,0 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ -// Karma is what we're using to run our tests in browser environments -// Karma does not support .mjs - -// playwright acts as a safari executable on windows and mac -const playwright = require('@playwright/test'); -const esbuildBrowserConfig = require('./build/esbuild-browser-config.cjs'); - -// use playwright chrome exec path as run target for chromium tests -process.env.CHROME_BIN = playwright.chromium.executablePath(); - -// use playwright webkit exec path as run target for safari tests -process.env.WEBKIT_HEADLESS_BIN = playwright.webkit.executablePath(); - -// use playwright firefox exec path as run target for firefox tests -process.env.FIREFOX_BIN = playwright.firefox.executablePath(); - -module.exports = function (config) { - config.set({ - plugins: [ - 'karma-chrome-launcher', - 'karma-firefox-launcher', - 'karma-webkit-launcher', - 'karma-esbuild', - 'karma-mocha', - 'karma-mocha-reporter', - ], - - // frameworks to use - // available frameworks: https://www.npmjs.com/search?q=keywords:karma-adapter - frameworks: ['mocha'], - - // Increase Mocha's default timeout of 2 seconds to prevent timeouts during GitHub CI runs. - client: { - mocha: { - timeout: 10000 // 10 seconds - } - }, - - // list of files / patterns to load in the browser - files: [ - // { pattern: 'tests/test-user-agent.ts', watched: false }, - { pattern: 'tests/**/*.spec.ts', watched: false }, - ], - - // preprocess matching files before serving them to the browser - // available preprocessors: https://www.npmjs.com/search?q=keywords:karma-preprocessor - preprocessors: { - // 'tests/test-user-agent.ts' : ['esbuild'], - 'tests/**/*.spec.ts': ['esbuild'], - }, - - esbuild: esbuildBrowserConfig, - - // list of files / patterns to exclude - exclude: [], - - // test results reporter to use - // available reporters: https://www.npmjs.com/search?q=keywords:karma-reporter - reporters: ['mocha'], - - // web server port - port: 9876, - - // enable / disable colors in the output (reporters and logs) - colors: true, - - // level of logging - // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || - // config.LOG_INFO || config.LOG_DEBUG - logLevel: config.INFO, - - concurrency: 1, - - // start these browsers - // available browser launchers: https://www.npmjs.com/search?q=keywords:karma-launcher - browsers: ['ChromeHeadless', 'FirefoxHeadless', 'WebkitHeadless'], - - // Continuous Integration mode - // if true, Karma captures browsers, runs the tests and exits - singleRun: true, - - // Increase browser timeouts to avoid DISCONNECTED messages during GitHub CI runs. - browserDisconnectTimeout : 10000, // default 2000 - browserDisconnectTolerance : 1, // default 0 - }); -}; \ No newline at end of file diff --git a/packages/http-client/package.json b/packages/http-client/package.json index b8fb0a92..6b508e28 100644 --- a/packages/http-client/package.json +++ b/packages/http-client/package.json @@ -59,7 +59,6 @@ "typeid-js": "0.3.0" }, "devDependencies": { - "@playwright/test": "1.34.3", "@types/chai": "4.3.5", "@types/eslint": "8.37.0", "@types/mocha": "10.0.1", @@ -67,25 +66,21 @@ "@types/sinon": "17.0.1", "@typescript-eslint/eslint-plugin": "5.59.0", "@typescript-eslint/parser": "5.59.0", + "@web/test-runner": "^0.18.0", + "@web/test-runner-playwright": "^0.11.0", + "buffer": "^6.0.3", "chai": "4.3.10", "esbuild": "0.16.17", "eslint": "8.43.0", "get-func-name": "2.0.1", - "karma": "6.4.1", - "karma-chai": "0.1.0", - "karma-chrome-launcher": "3.1.1", - "karma-esbuild": "2.2.5", - "karma-firefox-launcher": "2.1.2", - "karma-mocha": "2.0.1", - "karma-mocha-reporter": "2.2.5", - "karma-webkit-launcher": "2.1.0", "mkdirp": "3.0.1", "mocha": "10.2.0", "rimraf": "4.4.0", "sinon": "17.0.1", "typedoc": "0.25.0", "typedoc-plugin-markdown": "3.16.0", - "typescript": "5.2.2" + "typescript": "5.2.2", + "tiny-glob": "0.2.9" }, "scripts": { "clean": "rimraf dist tests/compiled", @@ -93,7 +88,7 @@ "build:cjs": "rimraf dist/cjs && tsc -p tsconfig.cjs.json && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json", "build:browser": "rimraf dist/browser.mjs dist/browser.js && node build/bundles.js", "test:node": "rimraf tests/compiled && tsc -p tests/tsconfig.json && c8 mocha", - "test:browser": "karma start karma.conf.cjs", + "test:browser": "rimraf tests/compiled && node tests/bundle-tests.mjs && web-test-runner", "build": "pnpm clean && pnpm build:esm && pnpm build:cjs && pnpm build:browser", "lint": "eslint . --ext .ts --max-warnings 0", "lint:fix": "eslint . --ext .ts --fix", diff --git a/packages/http-client/tests/buffer-polyfill.cjs b/packages/http-client/tests/buffer-polyfill.cjs new file mode 100644 index 00000000..1178f8c3 --- /dev/null +++ b/packages/http-client/tests/buffer-polyfill.cjs @@ -0,0 +1,4 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ +const Buffer = require('buffer/').Buffer + +globalThis.Buffer = Buffer \ No newline at end of file diff --git a/packages/http-client/tests/bundle-tests.mjs b/packages/http-client/tests/bundle-tests.mjs new file mode 100644 index 00000000..0dc15cfa --- /dev/null +++ b/packages/http-client/tests/bundle-tests.mjs @@ -0,0 +1,22 @@ +import { fileURLToPath } from 'node:url' + +import esbuild from 'esbuild' +import path from 'node:path' +import glob from 'tiny-glob' + +const __filename = fileURLToPath(import.meta.url) +const __dirname = path.dirname(__filename) + +esbuild.buildSync({ + entryPoints : await glob(`${__dirname}/*.spec.ts`), + format : 'esm', + bundle : true, + sourcemap : true, + platform : 'browser', + target : ['chrome101', 'firefox108', 'safari16'], + outdir : `${__dirname}/compiled`, + define : { + 'global': 'globalThis', + }, + inject: [`${__dirname}/buffer-polyfill.cjs`], +}) \ No newline at end of file diff --git a/packages/http-client/web-test-runner.config.mjs b/packages/http-client/web-test-runner.config.mjs new file mode 100644 index 00000000..48855040 --- /dev/null +++ b/packages/http-client/web-test-runner.config.mjs @@ -0,0 +1,28 @@ +import { playwrightLauncher } from '@web/test-runner-playwright' + +/** + * @type {import('@web/test-runner').TestRunnerConfig} + */ +export default { + files : ['tests/compiled/*.spec.js'], + playwright : true, + nodeResolve : true, + browsers : [ + playwrightLauncher({ + product: 'chromium', + }), + playwrightLauncher({ + product: 'firefox', + }), + playwrightLauncher({ + product: 'webkit', + }), + ], + testsFinishTimeout : 300000, + concurrentBrowsers : 2, + testFramework : { + config: { + timeout: '15000', + }, + }, +} \ No newline at end of file diff --git a/packages/protocol/karma.conf.cjs b/packages/protocol/karma.conf.cjs deleted file mode 100644 index f133accb..00000000 --- a/packages/protocol/karma.conf.cjs +++ /dev/null @@ -1,87 +0,0 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ -// Karma is what we're using to run our tests in browser environments -// Karma does not support .mjs - -// playwright acts as a safari executable on windows and mac -const playwright = require('@playwright/test'); -const esbuildBrowserConfig = require('./build/esbuild-browser-config.cjs'); - -// use playwright chrome exec path as run target for chromium tests -process.env.CHROME_BIN = playwright.chromium.executablePath(); - -// use playwright webkit exec path as run target for safari tests -process.env.WEBKIT_HEADLESS_BIN = playwright.webkit.executablePath(); - -// use playwright firefox exec path as run target for firefox tests -process.env.FIREFOX_BIN = playwright.firefox.executablePath(); - -module.exports = function (config) { - config.set({ - plugins: [ - 'karma-chrome-launcher', - 'karma-firefox-launcher', - 'karma-webkit-launcher', - 'karma-esbuild', - 'karma-mocha', - 'karma-mocha-reporter', - ], - - // frameworks to use - // available frameworks: https://www.npmjs.com/search?q=keywords:karma-adapter - frameworks: ['mocha'], - - // Increase Mocha's default timeout of 2 seconds to prevent timeouts during GitHub CI runs. - client: { - mocha: { - timeout: 10000 // 10 seconds - } - }, - - // list of files / patterns to load in the browser - files: [ - // { pattern: 'tests/test-user-agent.ts', watched: false }, - { pattern: 'tests/**/*.spec.ts', watched: false }, - ], - - // preprocess matching files before serving them to the browser - // available preprocessors: https://www.npmjs.com/search?q=keywords:karma-preprocessor - preprocessors: { - // 'tests/test-user-agent.ts' : ['esbuild'], - 'tests/**/*.spec.ts': ['esbuild'], - }, - - esbuild: esbuildBrowserConfig, - - // list of files / patterns to exclude - exclude: [], - - // test results reporter to use - // available reporters: https://www.npmjs.com/search?q=keywords:karma-reporter - reporters: ['mocha'], - - // web server port - port: 9876, - - // enable / disable colors in the output (reporters and logs) - colors: true, - - // level of logging - // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || - // config.LOG_INFO || config.LOG_DEBUG - logLevel: config.INFO, - - concurrency: 1, - - // start these browsers - // available browser launchers: https://www.npmjs.com/search?q=keywords:karma-launcher - browsers: ['ChromeHeadless', 'FirefoxHeadless', 'WebkitHeadless'], - - // Continuous Integration mode - // if true, Karma captures browsers, runs the tests and exits - singleRun: true, - - // Increase browser timeouts to avoid DISCONNECTED messages during GitHub CI runs. - browserDisconnectTimeout : 10000, // default 2000 - browserDisconnectTolerance : 1, // default 0 - }); -}; \ No newline at end of file diff --git a/packages/protocol/package.json b/packages/protocol/package.json index 0a4b2145..b98fc7f9 100644 --- a/packages/protocol/package.json +++ b/packages/protocol/package.json @@ -61,23 +61,17 @@ "typeid-js": "0.3.0" }, "devDependencies": { - "@playwright/test": "1.34.3", "@types/sinon": "17.0.2", + "@web/test-runner": "^0.18.0", + "@web/test-runner-playwright": "^0.11.0", "chai": "4.3.10", "esbuild": "0.16.17", - "karma": "6.4.1", - "karma-chai": "0.1.0", - "karma-chrome-launcher": "3.1.1", - "karma-esbuild": "2.2.5", - "karma-firefox-launcher": "2.1.2", - "karma-mocha": "2.0.1", - "karma-mocha-reporter": "2.2.5", - "karma-webkit-launcher": "2.1.0", "mkdirp": "3.0.1", "mocha": "10.2.0", "node-stdlib-browser": "1.2.0", "rimraf": "4.4.0", "sinon": "17.0.1", + "tiny-glob": "0.2.9", "typedoc": "0.25.0", "typedoc-plugin-markdown": "3.16.0", "typescript": "5.2.2" @@ -89,7 +83,7 @@ "build:cjs": "rimraf dist/cjs && tsc -p tsconfig.cjs.json && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json", "build:browser": "rimraf dist/browser.mjs dist/browser.js && node build/bundles.js", "test:node": "rimraf tests/compiled && pnpm compile-validators && tsc -p tests/tsconfig.json && mocha", - "test:browser": "pnpm compile-validators && karma start karma.conf.cjs", + "test:browser": "rimraf tests/compiled && pnpm compile-validators && node tests/bundle-tests.mjs && web-test-runner", "generate-test-vectors": "tsc -p tests/tsconfig.json && node tests/compiled/packages/protocol/tests/generate-test-vectors.js", "build": "pnpm clean && pnpm compile-validators && pnpm build:esm && pnpm build:cjs && pnpm build:browser", "lint": "eslint . --ext .ts --max-warnings 0", diff --git a/packages/protocol/src/dev-tools.ts b/packages/protocol/src/dev-tools.ts index fea5125e..66aef965 100644 --- a/packages/protocol/src/dev-tools.ts +++ b/packages/protocol/src/dev-tools.ts @@ -53,10 +53,10 @@ export class DevTools { /** * creates and returns an example offering. Useful for testing purposes */ - static createOffering(offeringData?: OfferingData): Offering { + static createOffering(opts?: { from?: string, offeringData?: OfferingData }): Offering { return Offering.create({ - metadata : { from: 'did:ex:pfi' }, - data : offeringData ?? DevTools.createOfferingData() + metadata : { from: opts?.from ?? 'did:ex:pfi' }, + data : opts?.offeringData ?? DevTools.createOfferingData() }) } diff --git a/packages/protocol/tests/bundle-tests.mjs b/packages/protocol/tests/bundle-tests.mjs new file mode 100644 index 00000000..40680d78 --- /dev/null +++ b/packages/protocol/tests/bundle-tests.mjs @@ -0,0 +1,21 @@ +import { fileURLToPath } from 'node:url' + +import esbuild from 'esbuild' +import path from 'node:path' +import glob from 'tiny-glob' + +const __filename = fileURLToPath(import.meta.url) +const __dirname = path.dirname(__filename) + +esbuild.buildSync({ + entryPoints : await glob(`${__dirname}/*.spec.ts`), + format : 'esm', + bundle : true, + sourcemap : true, + platform : 'browser', + target : ['chrome101', 'firefox108', 'safari16'], + outdir : `${__dirname}/compiled`, + define : { + 'global': 'globalThis', + } +}) \ No newline at end of file diff --git a/packages/protocol/tests/generate-test-vectors.ts b/packages/protocol/tests/generate-test-vectors.ts index 8e550714..81b849bc 100644 --- a/packages/protocol/tests/generate-test-vectors.ts +++ b/packages/protocol/tests/generate-test-vectors.ts @@ -15,7 +15,7 @@ type TestVector = { const generateParseOfferingVector = async () => { const did = await DidKeyMethod.create() - const offering = DevTools.createOffering() + const offering = DevTools.createOffering({ from: did.did }) await offering.sign(did) diff --git a/packages/protocol/tests/test-vectors.spec.ts b/packages/protocol/tests/test-vectors.spec.ts index 94808e09..b4e0b2c7 100644 --- a/packages/protocol/tests/test-vectors.spec.ts +++ b/packages/protocol/tests/test-vectors.spec.ts @@ -7,6 +7,12 @@ import ParseOrder from '../../../tbdex/hosted/test-vectors/protocol/vectors/pars import ParseOrderStatus from '../../../tbdex/hosted/test-vectors/protocol/vectors/parse-orderstatus.json' assert { type: 'json' } import ParseQuote from '../../../tbdex/hosted/test-vectors/protocol/vectors/parse-quote.json' assert { type: 'json' } import ParseRfq from '../../../tbdex/hosted/test-vectors/protocol/vectors/parse-rfq.json' assert { type: 'json' } +import { messageFactory, resourceFactory } from '../src/utils.js' +import { Resource } from '../src/resource.js' +import { Message } from '../src/message.js' + +Message.factory = messageFactory +Resource.factory = resourceFactory describe('TbdexTestVectorsProtocol', () => { it('parse_close', async () => { diff --git a/packages/protocol/web-test-runner.config.mjs b/packages/protocol/web-test-runner.config.mjs new file mode 100644 index 00000000..48855040 --- /dev/null +++ b/packages/protocol/web-test-runner.config.mjs @@ -0,0 +1,28 @@ +import { playwrightLauncher } from '@web/test-runner-playwright' + +/** + * @type {import('@web/test-runner').TestRunnerConfig} + */ +export default { + files : ['tests/compiled/*.spec.js'], + playwright : true, + nodeResolve : true, + browsers : [ + playwrightLauncher({ + product: 'chromium', + }), + playwrightLauncher({ + product: 'firefox', + }), + playwrightLauncher({ + product: 'webkit', + }), + ], + testsFinishTimeout : 300000, + concurrentBrowsers : 2, + testFramework : { + config: { + timeout: '15000', + }, + }, +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 627dd52d..7fadec9e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -82,9 +82,6 @@ importers: specifier: 0.3.0 version: 0.3.0 devDependencies: - '@playwright/test': - specifier: 1.34.3 - version: 1.34.3 '@types/chai': specifier: 4.3.5 version: 4.3.5 @@ -106,6 +103,15 @@ importers: '@typescript-eslint/parser': specifier: 5.59.0 version: 5.59.0(eslint@8.43.0)(typescript@5.2.2) + '@web/test-runner': + specifier: ^0.18.0 + version: 0.18.0(typescript@5.2.2) + '@web/test-runner-playwright': + specifier: ^0.11.0 + version: 0.11.0 + buffer: + specifier: ^6.0.3 + version: 6.0.3 chai: specifier: 4.3.10 version: 4.3.10 @@ -118,30 +124,6 @@ importers: get-func-name: specifier: 2.0.1 version: 2.0.1 - karma: - specifier: 6.4.1 - version: 6.4.1 - karma-chai: - specifier: 0.1.0 - version: 0.1.0(chai@4.3.10)(karma@6.4.1) - karma-chrome-launcher: - specifier: 3.1.1 - version: 3.1.1 - karma-esbuild: - specifier: 2.2.5 - version: 2.2.5(esbuild@0.16.17) - karma-firefox-launcher: - specifier: 2.1.2 - version: 2.1.2 - karma-mocha: - specifier: 2.0.1 - version: 2.0.1 - karma-mocha-reporter: - specifier: 2.2.5 - version: 2.2.5(karma@6.4.1) - karma-webkit-launcher: - specifier: 2.1.0 - version: 2.1.0 mkdirp: specifier: 3.0.1 version: 3.0.1 @@ -154,6 +136,9 @@ importers: sinon: specifier: 17.0.1 version: 17.0.1 + tiny-glob: + specifier: 0.2.9 + version: 0.2.9 typedoc: specifier: 0.25.0 version: 0.25.0(typescript@5.2.2) @@ -243,42 +228,21 @@ importers: specifier: 0.3.0 version: 0.3.0 devDependencies: - '@playwright/test': - specifier: 1.34.3 - version: 1.34.3 '@types/sinon': specifier: 17.0.2 version: 17.0.2 + '@web/test-runner': + specifier: ^0.18.0 + version: 0.18.0(typescript@5.2.2) + '@web/test-runner-playwright': + specifier: ^0.11.0 + version: 0.11.0 chai: specifier: 4.3.10 version: 4.3.10 esbuild: specifier: 0.16.17 version: 0.16.17 - karma: - specifier: 6.4.1 - version: 6.4.1 - karma-chai: - specifier: 0.1.0 - version: 0.1.0(chai@4.3.10)(karma@6.4.1) - karma-chrome-launcher: - specifier: 3.1.1 - version: 3.1.1 - karma-esbuild: - specifier: 2.2.5 - version: 2.2.5(esbuild@0.16.17) - karma-firefox-launcher: - specifier: 2.1.2 - version: 2.1.2 - karma-mocha: - specifier: 2.0.1 - version: 2.0.1 - karma-mocha-reporter: - specifier: 2.2.5 - version: 2.2.5(karma@6.4.1) - karma-webkit-launcher: - specifier: 2.1.0 - version: 2.1.0 mkdirp: specifier: 3.0.1 version: 3.0.1 @@ -294,6 +258,9 @@ importers: sinon: specifier: 17.0.1 version: 17.0.1 + tiny-glob: + specifier: 0.2.9 + version: 0.2.9 typedoc: specifier: 0.25.0 version: 0.25.0(typescript@5.2.2) @@ -306,6 +273,14 @@ importers: packages: + /@75lb/deep-merge@1.1.1: + resolution: {integrity: sha512-xvgv6pkMGBA6GwdyJbNAnDmfAIR/DfWhrj9jgWh3TY7gRm3KO46x/GPjRg6wJ0nOepwqrNxFfojebh0Df4h4Tw==} + engines: {node: '>=12.17'} + dependencies: + lodash.assignwith: 4.2.0 + typical: 7.1.1 + dev: true + /@aashutoshrathi/word-wrap@1.2.6: resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} engines: {node: '>=0.10.0'} @@ -339,11 +314,11 @@ packages: js-tokens: 4.0.0 dev: true - /@babel/runtime@7.23.5: - resolution: {integrity: sha512-NdUTHcPe4C99WxPub+K9l9tK5/lV4UXIoaHSYgzco9BCyjKAAwzdBI+wWtYqHt7LJdbo74ZjRPJgzVweq1sz0w==} + /@babel/runtime@7.23.8: + resolution: {integrity: sha512-Y7KbAP984rn1VGMbGqKmBLio9V7y5Je9GvU4rQPCPinCyNfUcToxIXl06d59URp/F3LwinvODxab5N/G6qggkw==} engines: {node: '>=6.9.0'} dependencies: - regenerator-runtime: 0.14.0 + regenerator-runtime: 0.14.1 dev: true /@bcoe/v8-coverage@0.2.3: @@ -353,7 +328,7 @@ packages: /@changesets/apply-release-plan@6.1.4: resolution: {integrity: sha512-FMpKF1fRlJyCZVYHr3CbinpZZ+6MwvOtWUuO8uo+svcATEoc1zRDcj23pAurJ2TZ/uVz1wFHH6K3NlACy0PLew==} dependencies: - '@babel/runtime': 7.23.5 + '@babel/runtime': 7.23.8 '@changesets/config': 2.3.1 '@changesets/get-version-range-type': 0.3.2 '@changesets/git': 2.0.0 @@ -371,7 +346,7 @@ packages: /@changesets/assemble-release-plan@5.2.4: resolution: {integrity: sha512-xJkWX+1/CUaOUWTguXEbCDTyWJFECEhmdtbkjhn5GVBGxdP/JwaHBIU9sW3FR6gD07UwZ7ovpiPclQZs+j+mvg==} dependencies: - '@babel/runtime': 7.23.5 + '@babel/runtime': 7.23.8 '@changesets/errors': 0.1.4 '@changesets/get-dependents-graph': 1.3.6 '@changesets/types': 5.2.1 @@ -389,7 +364,7 @@ packages: resolution: {integrity: sha512-dnWrJTmRR8bCHikJHl9b9HW3gXACCehz4OasrXpMp7sx97ECuBGGNjJhjPhdZNCvMy9mn4BWdplI323IbqsRig==} hasBin: true dependencies: - '@babel/runtime': 7.23.5 + '@babel/runtime': 7.23.8 '@changesets/apply-release-plan': 6.1.4 '@changesets/assemble-release-plan': 5.2.4 '@changesets/changelog-git': 0.1.14 @@ -455,7 +430,7 @@ packages: /@changesets/get-release-plan@3.0.17: resolution: {integrity: sha512-6IwKTubNEgoOZwDontYc2x2cWXfr6IKxP3IhKeK+WjyD6y3M4Gl/jdQvBw+m/5zWILSOCAaGLu2ZF6Q+WiPniw==} dependencies: - '@babel/runtime': 7.23.5 + '@babel/runtime': 7.23.8 '@changesets/assemble-release-plan': 5.2.4 '@changesets/config': 2.3.1 '@changesets/pre': 1.0.14 @@ -471,7 +446,7 @@ packages: /@changesets/git@2.0.0: resolution: {integrity: sha512-enUVEWbiqUTxqSnmesyJGWfzd51PY4H7mH9yUw0hPVpZBJ6tQZFMU3F3mT/t9OJ/GjyiM4770i+sehAn6ymx6A==} dependencies: - '@babel/runtime': 7.23.5 + '@babel/runtime': 7.23.8 '@changesets/errors': 0.1.4 '@changesets/types': 5.2.1 '@manypkg/get-packages': 1.1.3 @@ -496,7 +471,7 @@ packages: /@changesets/pre@1.0.14: resolution: {integrity: sha512-dTsHmxQWEQekHYHbg+M1mDVYFvegDh9j/kySNuDKdylwfMEevTeDouR7IfHNyVodxZXu17sXoJuf2D0vi55FHQ==} dependencies: - '@babel/runtime': 7.23.5 + '@babel/runtime': 7.23.8 '@changesets/errors': 0.1.4 '@changesets/types': 5.2.1 '@manypkg/get-packages': 1.1.3 @@ -506,7 +481,7 @@ packages: /@changesets/read@0.5.9: resolution: {integrity: sha512-T8BJ6JS6j1gfO1HFq50kU3qawYxa4NTbI/ASNVVCBTsKquy2HYwM9r7ZnzkiMe8IEObAJtUVGSrePCOxAK2haQ==} dependencies: - '@babel/runtime': 7.23.5 + '@babel/runtime': 7.23.8 '@changesets/git': 2.0.0 '@changesets/logger': 0.0.5 '@changesets/parse': 0.3.16 @@ -527,18 +502,13 @@ packages: /@changesets/write@0.2.3: resolution: {integrity: sha512-Dbamr7AIMvslKnNYsLFafaVORx4H0pvCA2MHqgtNCySMe1blImEyAEOzDmcgKAkgz4+uwoLz7demIrX+JBr/Xw==} dependencies: - '@babel/runtime': 7.23.5 + '@babel/runtime': 7.23.8 '@changesets/types': 5.2.1 fs-extra: 7.0.1 human-id: 1.0.2 prettier: 2.8.8 dev: true - /@colors/colors@1.5.0: - resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} - engines: {node: '>=0.1.90'} - dev: true - /@decentralized-identity/ion-pow-sdk@1.0.17: resolution: {integrity: sha512-vk7DTDM8aKDbFyu1ad/qkoRrGL4q+KvNeL/FNZXhkWPaDhVExBN/qGEoRLf1YSfFe+myto3+4RYTPut+riiqnw==} dependencies: @@ -790,7 +760,7 @@ packages: ajv: 6.12.6 debug: 4.3.4(supports-color@8.1.1) espree: 9.6.1 - globals: 13.23.0 + globals: 13.24.0 ignore: 5.3.0 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -810,11 +780,11 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@humanwhocodes/config-array@0.11.13: - resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==} + /@humanwhocodes/config-array@0.11.14: + resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} dependencies: - '@humanwhocodes/object-schema': 2.0.1 + '@humanwhocodes/object-schema': 2.0.2 debug: 4.3.4(supports-color@8.1.1) minimatch: 3.1.2 transitivePeerDependencies: @@ -826,8 +796,8 @@ packages: engines: {node: '>=12.22'} dev: true - /@humanwhocodes/object-schema@2.0.1: - resolution: {integrity: sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==} + /@humanwhocodes/object-schema@2.0.2: + resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==} dev: true /@isaacs/cliui@8.0.2: @@ -870,7 +840,7 @@ packages: /@manypkg/find-root@1.1.0: resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} dependencies: - '@babel/runtime': 7.23.5 + '@babel/runtime': 7.23.8 '@types/node': 12.20.55 find-up: 4.1.0 fs-extra: 8.1.0 @@ -879,7 +849,7 @@ packages: /@manypkg/get-packages@1.1.3: resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} dependencies: - '@babel/runtime': 7.23.5 + '@babel/runtime': 7.23.8 '@changesets/types': 4.1.0 '@manypkg/find-root': 1.1.0 fs-extra: 8.1.0 @@ -947,14 +917,14 @@ packages: engines: {node: '>= 8'} dependencies: '@nodelib/fs.scandir': 2.1.5 - fastq: 1.15.0 + fastq: 1.16.0 dev: true - /@npmcli/git@5.0.3: - resolution: {integrity: sha512-UZp9NwK+AynTrKvHn5k3KviW/hA5eENmFsu3iAPe7sWRt0lFUdsY/wXIYjpDFe7cdSNwOIzbObfwgt6eL5/2zw==} + /@npmcli/git@5.0.4: + resolution: {integrity: sha512-nr6/WezNzuYUppzXRaYu/W4aT5rLxdXqEFupbh6e/ovlYFQ8hpu1UUPV3Ir/YTl+74iXl2ZOMlGzudh9ZPUchQ==} engines: {node: ^16.14.0 || >=18.0.0} dependencies: - '@npmcli/promise-spawn': 7.0.0 + '@npmcli/promise-spawn': 7.0.1 lru-cache: 10.1.0 npm-pick-manifest: 9.0.0 proc-log: 3.0.0 @@ -970,7 +940,7 @@ packages: resolution: {integrity: sha512-OI2zdYBLhQ7kpNPaJxiflofYIpkNLi+lnGdzqUOfRmCF3r2l1nadcjtCYMJKv/Utm/ZtlffaUuTiAktPHbc17g==} engines: {node: ^16.14.0 || >=18.0.0} dependencies: - '@npmcli/git': 5.0.3 + '@npmcli/git': 5.0.4 glob: 10.3.10 hosted-git-info: 7.0.1 json-parse-even-better-errors: 3.0.1 @@ -981,8 +951,8 @@ packages: - bluebird dev: true - /@npmcli/promise-spawn@7.0.0: - resolution: {integrity: sha512-wBqcGsMELZna0jDblGd7UXgOby45TQaMWmbFwWX+SEotk4HV6zG2t6rT9siyLhPk4P6YYqgfL1UO8nMWDBVJXQ==} + /@npmcli/promise-spawn@7.0.1: + resolution: {integrity: sha512-P4KkF9jX3y+7yFUxgcUdDtLy+t4OlDGuEBLNs57AZsfSfg+uV6MLndqGpnl4831ggaEdXwR50XFoZP4VFtHolg==} engines: {node: ^16.14.0 || >=18.0.0} dependencies: which: 4.0.0 @@ -995,16 +965,164 @@ packages: dev: true optional: true - /@playwright/test@1.34.3: - resolution: {integrity: sha512-zPLef6w9P6T/iT6XDYG3mvGOqOyb6eHaV9XtkunYs0+OzxBtrPAAaHotc0X+PJ00WPPnLfFBTl7mf45Mn8DBmw==} - engines: {node: '>=14'} + /@puppeteer/browsers@1.4.6(typescript@5.2.2): + resolution: {integrity: sha512-x4BEjr2SjOPowNeiguzjozQbsc6h437ovD/wu+JpaenxVLm3jkgzHY2xOslMTp50HoTvQreMjiexiGQw1sqZlQ==} + engines: {node: '>=16.3.0'} hasBin: true + peerDependencies: + typescript: '>= 4.7.4' + peerDependenciesMeta: + typescript: + optional: true dependencies: - '@types/node': 20.9.4 - playwright-core: 1.34.3 - optionalDependencies: - fsevents: 2.3.2 + debug: 4.3.4(supports-color@8.1.1) + extract-zip: 2.0.1 + progress: 2.0.3 + proxy-agent: 6.3.0 + tar-fs: 3.0.4 + typescript: 5.2.2 + unbzip2-stream: 1.4.3 + yargs: 17.7.1 + transitivePeerDependencies: + - supports-color + dev: true + + /@rollup/plugin-node-resolve@15.2.3(rollup@4.9.4): + resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.78.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@rollup/pluginutils': 5.1.0(rollup@4.9.4) + '@types/resolve': 1.20.2 + deepmerge: 4.3.1 + is-builtin-module: 3.2.1 + is-module: 1.0.0 + resolve: 1.22.8 + rollup: 4.9.4 + dev: true + + /@rollup/pluginutils@5.1.0(rollup@4.9.4): + resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@types/estree': 1.0.5 + estree-walker: 2.0.2 + picomatch: 2.3.1 + rollup: 4.9.4 + dev: true + + /@rollup/rollup-android-arm-eabi@4.9.4: + resolution: {integrity: sha512-ub/SN3yWqIv5CWiAZPHVS1DloyZsJbtXmX4HxUTIpS0BHm9pW5iYBo2mIZi+hE3AeiTzHz33blwSnhdUo+9NpA==} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-android-arm64@4.9.4: + resolution: {integrity: sha512-ehcBrOR5XTl0W0t2WxfTyHCR/3Cq2jfb+I4W+Ch8Y9b5G+vbAecVv0Fx/J1QKktOrgUYsIKxWAKgIpvw56IFNA==} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-darwin-arm64@4.9.4: + resolution: {integrity: sha512-1fzh1lWExwSTWy8vJPnNbNM02WZDS8AW3McEOb7wW+nPChLKf3WG2aG7fhaUmfX5FKw9zhsF5+MBwArGyNM7NA==} + cpu: [arm64] + os: [darwin] + requiresBuild: true dev: true + optional: true + + /@rollup/rollup-darwin-x64@4.9.4: + resolution: {integrity: sha512-Gc6cukkF38RcYQ6uPdiXi70JB0f29CwcQ7+r4QpfNpQFVHXRd0DfWFidoGxjSx1DwOETM97JPz1RXL5ISSB0pA==} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm-gnueabihf@4.9.4: + resolution: {integrity: sha512-g21RTeFzoTl8GxosHbnQZ0/JkuFIB13C3T7Y0HtKzOXmoHhewLbVTFBQZu+z5m9STH6FZ7L/oPgU4Nm5ErN2fw==} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm64-gnu@4.9.4: + resolution: {integrity: sha512-TVYVWD/SYwWzGGnbfTkrNpdE4HON46orgMNHCivlXmlsSGQOx/OHHYiQcMIOx38/GWgwr/po2LBn7wypkWw/Mg==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm64-musl@4.9.4: + resolution: {integrity: sha512-XcKvuendwizYYhFxpvQ3xVpzje2HHImzg33wL9zvxtj77HvPStbSGI9czrdbfrf8DGMcNNReH9pVZv8qejAQ5A==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-riscv64-gnu@4.9.4: + resolution: {integrity: sha512-LFHS/8Q+I9YA0yVETyjonMJ3UA+DczeBd/MqNEzsGSTdNvSJa1OJZcSH8GiXLvcizgp9AlHs2walqRcqzjOi3A==} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-gnu@4.9.4: + resolution: {integrity: sha512-dIYgo+j1+yfy81i0YVU5KnQrIJZE8ERomx17ReU4GREjGtDW4X+nvkBak2xAUpyqLs4eleDSj3RrV72fQos7zw==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-musl@4.9.4: + resolution: {integrity: sha512-RoaYxjdHQ5TPjaPrLsfKqR3pakMr3JGqZ+jZM0zP2IkDtsGa4CqYaWSfQmZVgFUCgLrTnzX+cnHS3nfl+kB6ZQ==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-arm64-msvc@4.9.4: + resolution: {integrity: sha512-T8Q3XHV+Jjf5e49B4EAaLKV74BbX7/qYBRQ8Wop/+TyyU0k+vSjiLVSHNWdVd1goMjZcbhDmYZUYW5RFqkBNHQ==} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-ia32-msvc@4.9.4: + resolution: {integrity: sha512-z+JQ7JirDUHAsMecVydnBPWLwJjbppU+7LZjffGf+Jvrxq+dVjIE7By163Sc9DKc3ADSU50qPVw0KonBS+a+HQ==} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-x64-msvc@4.9.4: + resolution: {integrity: sha512-LfdGXCV9rdEify1oxlN9eamvDSjv9md9ZVMAbNHA87xqIfFCxImxan9qZ8+Un54iK2nnqPlbnSi4R54ONtbWBw==} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true /@sinonjs/commons@2.0.0: resolution: {integrity: sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==} @@ -1018,12 +1136,6 @@ packages: type-detect: 4.0.8 dev: true - /@sinonjs/fake-timers@10.3.0: - resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} - dependencies: - '@sinonjs/commons': 3.0.0 - dev: true - /@sinonjs/fake-timers@11.2.2: resolution: {integrity: sha512-G2piCSxQ7oWOxwGSAyFHfPIsyeJGXYtc6mFbnFA+kRXkiEnTl8c/8jul2S329iFBnDI9HGoeWWAZvuvOkZccgw==} dependencies: @@ -1042,12 +1154,8 @@ packages: resolution: {integrity: sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==} dev: true - /@socket.io/component-emitter@3.1.0: - resolution: {integrity: sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==} - dev: true - - /@sphereon/pex-models@2.0.3: - resolution: {integrity: sha512-NsPeYmJLhxRG5fJxpcHnRR3xvi7i8SK8s21kYR9oBWO8cBU9qBCpw3gdUNiyI01/h6fbYqkIZ7eBNsHBIzqk5Q==} + /@sphereon/pex-models@2.1.2: + resolution: {integrity: sha512-Ec1qZl8tuPd+s6E+ZM7v+HkGkSOjGDMLNN1kqaxAfWpITBYtTLb+d5YvwjvBZ1P2upZ7zwNER97FfW5n/30y2w==} dev: false /@sphereon/pex@2.1.0: @@ -1055,7 +1163,7 @@ packages: engines: {node: '>=16'} dependencies: '@astronautlabs/jsonpath': 1.1.2 - '@sphereon/pex-models': 2.0.3 + '@sphereon/pex-models': 2.1.2 '@sphereon/ssi-types': 0.13.0 ajv: 8.12.0 ajv-formats: 2.1.1(ajv@8.12.0) @@ -1070,6 +1178,20 @@ packages: jwt-decode: 3.1.2 dev: false + /@tootallnate/quickjs-emscripten@0.23.0: + resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==} + dev: true + + /@types/accepts@1.3.7: + resolution: {integrity: sha512-Pay9fq2lM2wXPWbteBsRAGiWH2hig4ZE2asK+mm7kUzlxRTfL961rj89I6zV/E3PcIkDqyuBEcMxFT7rccugeQ==} + dependencies: + '@types/node': 7.10.14 + dev: true + + /@types/babel__code-frame@7.0.6: + resolution: {integrity: sha512-Anitqkl3+KrzcW2k77lRlg/GfLZLWXBuNgbEcIOU6M92yw42vsd3xV/Z/yAHEj8m+KUjL6bWOVOFqX8PFPJ4LA==} + dev: true + /@types/body-parser@1.19.5: resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} dependencies: @@ -1085,20 +1207,42 @@ packages: resolution: {integrity: sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==} dev: true + /@types/co-body@6.1.3: + resolution: {integrity: sha512-UhuhrQ5hclX6UJctv5m4Rfp52AfG9o9+d9/HwjxhVB5NjXxr5t9oKgJxN8xRHgr35oo8meUEHUPFWiKg6y71aA==} + dependencies: + '@types/node': 7.10.14 + '@types/qs': 6.9.11 + dev: true + + /@types/command-line-args@5.2.3: + resolution: {integrity: sha512-uv0aG6R0Y8WHZLTamZwtfsDLVRnOa+n+n5rEvFWL5Na5gZ8V2Teab/duDPFzIIIhs9qizDpcavCusCLJZu62Kw==} + dev: true + /@types/connect@3.4.38: resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} dependencies: - '@types/node': 20.9.4 + '@types/node': 7.10.14 dev: true - /@types/cookie@0.4.1: - resolution: {integrity: sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==} + /@types/content-disposition@0.5.8: + resolution: {integrity: sha512-QVSSvno3dE0MgO76pJhmv4Qyi/j0Yk9pBp0Y7TJ2Tlj+KCgJWY6qX7nnxCOLkZ3VYRSIk1WTxCvwUSdx6CCLdg==} dev: true - /@types/cors@2.8.17: - resolution: {integrity: sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==} + /@types/convert-source-map@2.0.3: + resolution: {integrity: sha512-ag0BfJLZf6CQz8VIuRIEYQ5Ggwk/82uvTQf27RcpyDNbY0Vw49LIPqAxk5tqYfrCs9xDaIMvl4aj7ZopnYL8bA==} + dev: true + + /@types/cookies@0.7.10: + resolution: {integrity: sha512-hmUCjAk2fwZVPPkkPBcI7jGLIR5mg4OVoNMBwU6aVsMm/iNPY7z9/R+x2fSwLt/ZXoGua6C5Zy2k5xOo9jUyhQ==} dependencies: - '@types/node': 20.9.4 + '@types/connect': 3.4.38 + '@types/express': 4.17.17 + '@types/keygrip': 1.0.6 + '@types/node': 7.10.14 + dev: true + + /@types/debounce@1.2.4: + resolution: {integrity: sha512-jBqiORIzKDOToaF63Fm//haOCHuwQuLa2202RK4MozpA6lh93eCBc+/8+wZn5OzjJt3ySdc+74SXWXB55Ewtyw==} dev: true /@types/eslint@8.37.0: @@ -1123,7 +1267,7 @@ packages: resolution: {integrity: sha512-OaJ7XLaelTgrvlZD8/aa0vvvxZdUmlCn6MtWeB7TkiKW70BQLc9XEPpDLPdbo52ZhXUCrznlWdCHWxJWtdyajA==} dependencies: '@types/node': 20.9.4 - '@types/qs': 6.9.10 + '@types/qs': 6.9.11 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 dev: true @@ -1133,10 +1277,14 @@ packages: dependencies: '@types/body-parser': 1.19.5 '@types/express-serve-static-core': 4.17.41 - '@types/qs': 6.9.10 + '@types/qs': 6.9.11 '@types/serve-static': 1.15.5 dev: true + /@types/http-assert@1.5.5: + resolution: {integrity: sha512-4+tE/lwdAahgZT1g30Jkdm9PzFRde0xwxBNUyRsCitRvCQB90iuA2uJYdUnhnANRcqGXaWOGY4FEoxeElNAK2g==} + dev: true + /@types/http-errors@2.0.4: resolution: {integrity: sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==} dev: true @@ -1151,10 +1299,45 @@ packages: resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} dev: true + /@types/istanbul-lib-report@3.0.3: + resolution: {integrity: sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==} + dependencies: + '@types/istanbul-lib-coverage': 2.0.6 + dev: true + + /@types/istanbul-reports@3.0.4: + resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} + dependencies: + '@types/istanbul-lib-report': 3.0.3 + dev: true + /@types/json-schema@7.0.15: resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} dev: true + /@types/keygrip@1.0.6: + resolution: {integrity: sha512-lZuNAY9xeJt7Bx4t4dx0rYCDqGPW8RXhQZK1td7d4H6E9zYbLoOtjBvfwdTKpsyxQI/2jv+armjX/RW+ZNpXOQ==} + dev: true + + /@types/koa-compose@3.2.8: + resolution: {integrity: sha512-4Olc63RY+MKvxMwVknCUDhRQX1pFQoBZ/lXcRLP69PQkEpze/0cr8LNqJQe5NFb/b19DWi2a5bTi2VAlQzhJuA==} + dependencies: + '@types/koa': 2.14.0 + dev: true + + /@types/koa@2.14.0: + resolution: {integrity: sha512-DTDUyznHGNHAl+wd1n0z1jxNajduyTh8R53xoewuerdBzGo6Ogj6F2299BFtrexJw4NtgjsI5SMPCmV9gZwGXA==} + dependencies: + '@types/accepts': 1.3.7 + '@types/content-disposition': 0.5.8 + '@types/cookies': 0.7.10 + '@types/http-assert': 1.5.5 + '@types/http-errors': 2.0.4 + '@types/keygrip': 1.0.6 + '@types/koa-compose': 3.2.8 + '@types/node': 7.10.14 + dev: true + /@types/mime@1.3.5: resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==} dev: true @@ -1187,20 +1370,27 @@ packages: /@types/node@7.10.14: resolution: {integrity: sha512-29GS75BE8asnTno3yB6ubOJOO0FboExEqNJy4bpz0GSmW/8wPTNL4h9h63c6s1uTrOopCmJYe/4yJLh5r92ZUA==} - dev: false /@types/normalize-package-data@2.4.4: resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} dev: true - /@types/qs@6.9.10: - resolution: {integrity: sha512-3Gnx08Ns1sEoCrWssEgTSJs/rsT2vhGP+Ja9cnnk9k4ALxinORlQneLXFeFKOTJMOeZUFD1s7w+w2AphTpvzZw==} + /@types/parse5@6.0.3: + resolution: {integrity: sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==} + dev: true + + /@types/qs@6.9.11: + resolution: {integrity: sha512-oGk0gmhnEJK4Yyk+oI7EfXsLayXatCWPHary1MtcmbAifkobT9cM9yutG/hZKIseOU0MqbIwQ/u2nn/Gb+ltuQ==} dev: true /@types/range-parser@1.2.7: resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==} dev: true + /@types/resolve@1.20.2: + resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} + dev: true + /@types/semver@7.5.6: resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==} dev: true @@ -1209,7 +1399,7 @@ packages: resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==} dependencies: '@types/mime': 1.3.5 - '@types/node': 20.9.4 + '@types/node': 7.10.14 dev: true /@types/serve-static@1.15.5: @@ -1236,6 +1426,20 @@ packages: resolution: {integrity: sha512-mQkU2jY8jJEF7YHjHvsQO8+3ughTL1mcnn96igfhONmR+fUPSKIkefQYpSe8bsly2Ep7oQbn/6VG5/9/0qcArQ==} dev: true + /@types/ws@7.4.7: + resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} + dependencies: + '@types/node': 7.10.14 + dev: true + + /@types/yauzl@2.10.3: + resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} + requiresBuild: true + dependencies: + '@types/node': 7.10.14 + dev: true + optional: true + /@typescript-eslint/eslint-plugin@5.59.0(@typescript-eslint/parser@5.59.0)(eslint@8.43.0)(typescript@5.2.2): resolution: {integrity: sha512-p0QgrEyrxAWBecR56gyn3wkG15TJdI//eetInP3zYRewDh0XS+DhB3VUAd3QqvziFsfaQIoIuZMxZRB7vXYaYw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1497,6 +1701,228 @@ packages: eslint-visitor-keys: 3.4.3 dev: true + /@web/browser-logs@0.4.0: + resolution: {integrity: sha512-/EBiDAUCJ2DzZhaFxTPRIznEPeafdLbXShIL6aTu7x73x7ZoxSDv7DGuTsh2rWNMUa4+AKli4UORrpyv6QBOiA==} + engines: {node: '>=18.0.0'} + dependencies: + errorstacks: 2.4.1 + dev: true + + /@web/config-loader@0.3.1: + resolution: {integrity: sha512-IYjHXUgSGGNpO3YJQ9foLcazbJlAWDdJGRe9be7aOhon0Nd6Na5JIOJAej7jsMu76fKHr4b4w2LfIdNQ4fJ8pA==} + engines: {node: '>=18.0.0'} + dev: true + + /@web/dev-server-core@0.7.0: + resolution: {integrity: sha512-1FJe6cJ3r0x0ZmxY/FnXVduQD4lKX7QgYhyS6N+VmIpV+tBU4sGRbcrmeoYeY+nlnPa6p2oNuonk3X5ln/W95g==} + engines: {node: '>=18.0.0'} + dependencies: + '@types/koa': 2.14.0 + '@types/ws': 7.4.7 + '@web/parse5-utils': 2.1.0 + chokidar: 3.5.3 + clone: 2.1.2 + es-module-lexer: 1.4.1 + get-stream: 6.0.1 + is-stream: 2.0.1 + isbinaryfile: 5.0.0 + koa: 2.15.0 + koa-etag: 4.0.0 + koa-send: 5.0.1 + koa-static: 5.0.0 + lru-cache: 8.0.5 + mime-types: 2.1.35 + parse5: 6.0.1 + picomatch: 2.3.1 + ws: 7.5.9 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: true + + /@web/dev-server-rollup@0.6.1: + resolution: {integrity: sha512-vhtsQ8qu1pBHailOBOYJwZnYDc1Lmx6ZAd2j+y5PD2ck0R1LmVsZ7dZK8hDCpkvpvlu2ndURjL9tbzdcsBRJmg==} + engines: {node: '>=18.0.0'} + dependencies: + '@rollup/plugin-node-resolve': 15.2.3(rollup@4.9.4) + '@web/dev-server-core': 0.7.0 + nanocolors: 0.2.13 + parse5: 6.0.1 + rollup: 4.9.4 + whatwg-url: 11.0.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: true + + /@web/dev-server@0.4.1: + resolution: {integrity: sha512-GHeyH8MBZQpODFiHiXAdX4hOVbeDyD/DUermUinh/nexWAZUcXyXa200RItuAL6b25MQ3D/5hKNDypujSvXxiw==} + engines: {node: '>=18.0.0'} + hasBin: true + dependencies: + '@babel/code-frame': 7.23.5 + '@types/command-line-args': 5.2.3 + '@web/config-loader': 0.3.1 + '@web/dev-server-core': 0.7.0 + '@web/dev-server-rollup': 0.6.1 + camelcase: 6.3.0 + command-line-args: 5.2.1 + command-line-usage: 7.0.1 + debounce: 1.2.1 + deepmerge: 4.3.1 + ip: 1.1.8 + nanocolors: 0.2.13 + open: 8.4.2 + portfinder: 1.0.32 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: true + + /@web/parse5-utils@2.1.0: + resolution: {integrity: sha512-GzfK5disEJ6wEjoPwx8AVNwUe9gYIiwc+x//QYxYDAFKUp4Xb1OJAGLc2l2gVrSQmtPGLKrTRcW90Hv4pEq1qA==} + engines: {node: '>=18.0.0'} + dependencies: + '@types/parse5': 6.0.3 + parse5: 6.0.1 + dev: true + + /@web/test-runner-chrome@0.15.0(typescript@5.2.2): + resolution: {integrity: sha512-ZqkTJGQ57FDz3lWw+9CKfHuTV64S9GzBy5+0siSQulEVPfGiTzpksx9DohtA3BCLXdbEq4OHg40/XIQJomlc9w==} + engines: {node: '>=18.0.0'} + dependencies: + '@web/test-runner-core': 0.13.0 + '@web/test-runner-coverage-v8': 0.8.0 + async-mutex: 0.4.0 + chrome-launcher: 0.15.2 + puppeteer-core: 20.9.0(typescript@5.2.2) + transitivePeerDependencies: + - bufferutil + - encoding + - supports-color + - typescript + - utf-8-validate + dev: true + + /@web/test-runner-commands@0.9.0: + resolution: {integrity: sha512-zeLI6QdH0jzzJMDV5O42Pd8WLJtYqovgdt0JdytgHc0d1EpzXDsc7NTCJSImboc2NcayIsWAvvGGeRF69SMMYg==} + engines: {node: '>=18.0.0'} + dependencies: + '@web/test-runner-core': 0.13.0 + mkdirp: 1.0.4 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: true + + /@web/test-runner-core@0.13.0: + resolution: {integrity: sha512-mUrETPg9n4dHWEk+D46BU3xVhQf+ljT4cG7FSpmF7AIOsXWgWHoaXp6ReeVcEmM5fmznXec2O/apTb9hpGrP3w==} + engines: {node: '>=18.0.0'} + dependencies: + '@babel/code-frame': 7.23.5 + '@types/babel__code-frame': 7.0.6 + '@types/co-body': 6.1.3 + '@types/convert-source-map': 2.0.3 + '@types/debounce': 1.2.4 + '@types/istanbul-lib-coverage': 2.0.6 + '@types/istanbul-reports': 3.0.4 + '@web/browser-logs': 0.4.0 + '@web/dev-server-core': 0.7.0 + chokidar: 3.5.3 + cli-cursor: 3.1.0 + co-body: 6.1.0 + convert-source-map: 2.0.0 + debounce: 1.2.1 + dependency-graph: 0.11.0 + globby: 11.1.0 + ip: 1.1.8 + istanbul-lib-coverage: 3.2.2 + istanbul-lib-report: 3.0.1 + istanbul-reports: 3.1.6 + log-update: 4.0.0 + nanocolors: 0.2.13 + nanoid: 3.3.7 + open: 8.4.2 + picomatch: 2.3.1 + source-map: 0.7.4 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: true + + /@web/test-runner-coverage-v8@0.8.0: + resolution: {integrity: sha512-PskiucYpjUtgNfR2zF2AWqWwjXL7H3WW/SnCAYmzUrtob7X9o/+BjdyZ4wKbOxWWSbJO4lEdGIDLu+8X2Xw+lA==} + engines: {node: '>=18.0.0'} + dependencies: + '@web/test-runner-core': 0.13.0 + istanbul-lib-coverage: 3.2.2 + lru-cache: 8.0.5 + picomatch: 2.3.1 + v8-to-istanbul: 9.2.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: true + + /@web/test-runner-mocha@0.9.0: + resolution: {integrity: sha512-ZL9F6FXd0DBQvo/h/+mSfzFTSRVxzV9st/AHhpgABtUtV/AIpVE9to6+xdkpu6827kwjezdpuadPfg+PlrBWqQ==} + engines: {node: '>=18.0.0'} + dependencies: + '@web/test-runner-core': 0.13.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: true + + /@web/test-runner-playwright@0.11.0: + resolution: {integrity: sha512-s+f43DSAcssKYVOD9SuzueUcctJdHzq1by45gAnSCKa9FQcaTbuYe8CzmxA21g+NcL5+ayo4z+MA9PO4H+PssQ==} + engines: {node: '>=18.0.0'} + dependencies: + '@web/test-runner-core': 0.13.0 + '@web/test-runner-coverage-v8': 0.8.0 + playwright: 1.40.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: true + + /@web/test-runner@0.18.0(typescript@5.2.2): + resolution: {integrity: sha512-aAlQrdSqwCie1mxuSK5kM0RYDJZL4Q0Hd5LeXn1on3OtHLtgztL4dZzzNSuAWablR2/Vuve3ChwDDxmYSTqXRg==} + engines: {node: '>=18.0.0'} + hasBin: true + dependencies: + '@web/browser-logs': 0.4.0 + '@web/config-loader': 0.3.1 + '@web/dev-server': 0.4.1 + '@web/test-runner-chrome': 0.15.0(typescript@5.2.2) + '@web/test-runner-commands': 0.9.0 + '@web/test-runner-core': 0.13.0 + '@web/test-runner-mocha': 0.9.0 + camelcase: 6.3.0 + command-line-args: 5.2.1 + command-line-usage: 7.0.1 + convert-source-map: 2.0.0 + diff: 5.1.0 + globby: 11.1.0 + nanocolors: 0.2.13 + portfinder: 1.0.32 + source-map: 0.7.4 + transitivePeerDependencies: + - bufferutil + - encoding + - supports-color + - typescript + - utf-8-validate + dev: true + /@web5/common@0.2.1: resolution: {integrity: sha512-Tt5P17HgQCx+Epw0IHnhRKqp5UU3E4xtsE8PkdghOBnvntBB0op5P6efvR1WqmJft5+VunDHt3yZAZstuqQkNg==} engines: {node: '>=18.0.0'} @@ -1612,20 +2038,29 @@ packages: mime-types: 2.1.35 negotiator: 0.6.3 - /acorn-jsx@5.3.2(acorn@8.11.2): + /acorn-jsx@5.3.2(acorn@8.11.3): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - acorn: 8.11.2 + acorn: 8.11.3 dev: true - /acorn@8.11.2: - resolution: {integrity: sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==} + /acorn@8.11.3: + resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} engines: {node: '>=0.4.0'} hasBin: true dev: true + /agent-base@7.1.0: + resolution: {integrity: sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==} + engines: {node: '>= 14'} + dependencies: + debug: 4.3.4(supports-color@8.1.1) + transitivePeerDependencies: + - supports-color + dev: true + /ajv-formats@2.1.1(ajv@8.12.0): resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} peerDependencies: @@ -1665,6 +2100,13 @@ packages: engines: {node: '>=6'} dev: true + /ansi-escapes@4.3.2: + resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} + engines: {node: '>=8'} + dependencies: + type-fest: 0.21.3 + dev: true + /ansi-escapes@6.2.0: resolution: {integrity: sha512-kzRaCqXnpzWs+3z5ABPQiVke+iq0KXkHo8xiWV4RPTi5Yli0l97BEQuhXV1s7+aSU/fu1kUuxgS4MsQ0fRuygw==} engines: {node: '>=14.16'} @@ -1672,11 +2114,6 @@ packages: type-fest: 3.13.1 dev: true - /ansi-regex@3.0.1: - resolution: {integrity: sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==} - engines: {node: '>=4'} - dev: true - /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -1728,6 +2165,16 @@ packages: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} dev: true + /array-back@3.1.0: + resolution: {integrity: sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==} + engines: {node: '>=6'} + dev: true + + /array-back@6.2.2: + resolution: {integrity: sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==} + engines: {node: '>=12.17'} + dev: true + /array-buffer-byte-length@1.0.0: resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} dependencies: @@ -1797,6 +2244,30 @@ packages: resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} dev: true + /ast-types@0.13.4: + resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==} + engines: {node: '>=4'} + dependencies: + tslib: 2.6.2 + dev: true + + /astral-regex@2.0.0: + resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} + engines: {node: '>=8'} + dev: true + + /async-mutex@0.4.0: + resolution: {integrity: sha512-eJFZ1YhRR8UN8eBLoNzcDPcy/jqjsg6I1AP+KvWQX80BqOSW1oJPJXDylPUEeMr2ZQvHgnQ//Lp6f3RQ1zI7HA==} + dependencies: + tslib: 2.6.2 + dev: true + + /async@2.6.4: + resolution: {integrity: sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==} + dependencies: + lodash: 4.17.21 + dev: true + /asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} dev: true @@ -1807,7 +2278,6 @@ packages: /b4a@1.6.4: resolution: {integrity: sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==} - dev: false /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} @@ -1821,9 +2291,9 @@ packages: /base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - /base64id@2.0.0: - resolution: {integrity: sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==} - engines: {node: ^4.5.0 || >= 5.9} + /basic-ftp@5.0.4: + resolution: {integrity: sha512-8PzkB0arJFV4jJWSGOYR+OEic6aeKMu/osRhBULN6RY0ykby6LKhbmuQ5ublvaas5BOwboah5D87nrHyuh8PPA==} + engines: {node: '>=10.0.0'} dev: true /bencode@2.0.3: @@ -1918,26 +2388,6 @@ packages: - supports-color dev: false - /body-parser@1.20.2: - resolution: {integrity: sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==} - engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} - dependencies: - bytes: 3.1.2 - content-type: 1.0.5 - debug: 2.6.9 - depd: 2.0.0 - destroy: 1.2.0 - http-errors: 2.0.0 - iconv-lite: 0.4.24 - on-finished: 2.4.1 - qs: 6.11.0 - raw-body: 2.5.2 - type-is: 1.6.18 - unpipe: 1.0.0 - transitivePeerDependencies: - - supports-color - dev: true - /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: @@ -2043,6 +2493,10 @@ packages: pako: 1.0.11 dev: true + /buffer-crc32@0.2.13: + resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} + dev: true + /buffer-xor@1.0.3: resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} dev: true @@ -2059,7 +2513,11 @@ packages: dependencies: base64-js: 1.5.1 ieee754: 1.2.1 - dev: false + + /builtin-modules@3.3.0: + resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} + engines: {node: '>=6'} + dev: true /builtin-status-codes@3.0.0: resolution: {integrity: sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==} @@ -2093,6 +2551,14 @@ packages: yargs-parser: 21.1.1 dev: true + /cache-content-type@1.0.1: + resolution: {integrity: sha512-IKufZ1o4Ut42YUrZSo8+qnMTrFuKkvyoLXUywKz9GJ5BrhOFGhLdkx9sG4KAnVvbY6kEcSFjLQul+DVmBm2bgA==} + engines: {node: '>= 6.0.0'} + dependencies: + mime-types: 2.1.35 + ylru: 1.3.2 + dev: true + /call-bind@1.0.5: resolution: {integrity: sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==} dependencies: @@ -2152,6 +2618,13 @@ packages: type-detect: 4.0.8 dev: true + /chalk-template@0.4.0: + resolution: {integrity: sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==} + engines: {node: '>=12'} + dependencies: + chalk: 4.1.2 + dev: true + /chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -2216,12 +2689,34 @@ packages: chrome-net: 3.3.4 dev: false + /chrome-launcher@0.15.2: + resolution: {integrity: sha512-zdLEwNo3aUVzIhKhTtXfxhdvZhUghrnmkvcAq2NoDd+LeOHKf03H5jwZ8T/STsAlzyALkBVK552iaG1fGf1xVQ==} + engines: {node: '>=12.13.0'} + hasBin: true + dependencies: + '@types/node': 7.10.14 + escape-string-regexp: 4.0.0 + is-wsl: 2.2.0 + lighthouse-logger: 1.4.2 + transitivePeerDependencies: + - supports-color + dev: true + /chrome-net@3.3.4: resolution: {integrity: sha512-Jzy2EnzmE+ligqIZUsmWnck9RBXLuUy6CaKyuNMtowFG3ZvLt8d+WBJCTPEludV0DHpIKjAOlwjFmTaEdfdWCw==} dependencies: inherits: 2.0.4 dev: false + /chromium-bidi@0.4.16(devtools-protocol@0.0.1147663): + resolution: {integrity: sha512-7ZbXdWERxRxSwo3txsBjjmc/NLxqb1Bk30mRb0BMS4YIaiV6zvKZqL/UAH+DdqcDYayDWk2n/y8klkBDODrPvA==} + peerDependencies: + devtools-protocol: '*' + dependencies: + devtools-protocol: 0.0.1147663 + mitt: 3.0.0 + dev: true + /ci-info@3.9.0: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} @@ -2243,9 +2738,16 @@ packages: catering: 2.1.1 module-error: 1.0.2 napi-macros: 2.2.2 - node-gyp-build: 4.7.1 + node-gyp-build: 4.8.0 dev: false + /cli-cursor@3.1.0: + resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} + engines: {node: '>=8'} + dependencies: + restore-cursor: 3.1.0 + dev: true + /cliui@6.0.0: resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} dependencies: @@ -2276,6 +2778,25 @@ packages: engines: {node: '>=0.8'} dev: true + /clone@2.1.2: + resolution: {integrity: sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==} + engines: {node: '>=0.8'} + dev: true + + /co-body@6.1.0: + resolution: {integrity: sha512-m7pOT6CdLN7FuXUcpuz/8lfQ/L77x8SchHCF4G0RBTJO20Wzmhn5Sp4/5WsKy8OSpifBSUrmg83qEqaDHdyFuQ==} + dependencies: + inflation: 2.1.0 + qs: 6.11.2 + raw-body: 2.5.2 + type-is: 1.6.18 + dev: true + + /co@4.6.0: + resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} + engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} + dev: true + /color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: @@ -2309,6 +2830,26 @@ packages: delayed-stream: 1.0.0 dev: true + /command-line-args@5.2.1: + resolution: {integrity: sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==} + engines: {node: '>=4.0.0'} + dependencies: + array-back: 3.1.0 + find-replace: 3.0.0 + lodash.camelcase: 4.3.0 + typical: 4.0.0 + dev: true + + /command-line-usage@7.0.1: + resolution: {integrity: sha512-NCyznE//MuTjwi3y84QVUGEOT+P5oto1e1Pk/jFPVdPPfsG03qpTIl3yw6etR+v73d0lXsoojRpvbru2sqePxQ==} + engines: {node: '>=12.20.0'} + dependencies: + array-back: 6.2.2 + chalk-template: 0.4.0 + table-layout: 3.0.2 + typical: 7.1.1 + dev: true + /component-emitter@1.3.1: resolution: {integrity: sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==} dev: true @@ -2317,18 +2858,6 @@ packages: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true - /connect@3.7.0: - resolution: {integrity: sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==} - engines: {node: '>= 0.10.0'} - dependencies: - debug: 2.6.9 - finalhandler: 1.1.2 - parseurl: 1.3.3 - utils-merge: 1.0.1 - transitivePeerDependencies: - - supports-color - dev: true - /console-browserify@1.2.0: resolution: {integrity: sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==} dev: true @@ -2342,7 +2871,6 @@ packages: engines: {node: '>= 0.6'} dependencies: safe-buffer: 5.2.1 - dev: false /content-type@1.0.5: resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} @@ -2356,11 +2884,6 @@ packages: resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} dev: false - /cookie@0.4.2: - resolution: {integrity: sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==} - engines: {node: '>= 0.6'} - dev: true - /cookie@0.5.0: resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} engines: {node: '>= 0.6'} @@ -2370,12 +2893,21 @@ packages: resolution: {integrity: sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==} dev: true + /cookies@0.9.1: + resolution: {integrity: sha512-TG2hpqe4ELx54QER/S3HQ9SRVnQnGBtKUz5bLQWtYAQ+o6GpgMs6sYUvaiJjVxb+UXwhRhAEP3m7LbsIZ77Hmw==} + engines: {node: '>= 0.8'} + dependencies: + depd: 2.0.0 + keygrip: 1.1.0 + dev: true + /cors@2.8.5: resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==} engines: {node: '>= 0.10'} dependencies: object-assign: 4.1.1 vary: 1.1.2 + dev: false /create-ecdh@4.0.4: resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==} @@ -2417,6 +2949,14 @@ packages: - encoding dev: false + /cross-fetch@4.0.0: + resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==} + dependencies: + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + dev: true + /cross-spawn@5.1.0: resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} dependencies: @@ -2476,13 +3016,13 @@ packages: stream-transform: 2.1.3 dev: true - /custom-event@1.0.1: - resolution: {integrity: sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==} + /data-uri-to-buffer@6.0.1: + resolution: {integrity: sha512-MZd3VlchQkp8rdend6vrx7MmVDJzSNTBvghvKjirLkD+WTChA3KUf0jkE68Q4UyctNqI11zZO9/x2Yx+ub5Cvg==} + engines: {node: '>= 14'} dev: true - /date-format@4.0.14: - resolution: {integrity: sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==} - engines: {node: '>=4.0'} + /debounce@1.2.1: + resolution: {integrity: sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==} dev: true /debug@2.6.9: @@ -2495,6 +3035,17 @@ packages: dependencies: ms: 2.0.0 + /debug@3.2.7: + resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.3 + dev: true + /debug@4.3.4(supports-color@8.1.1): resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -2537,9 +3088,18 @@ packages: type-detect: 4.0.8 dev: true + /deep-equal@1.0.1: + resolution: {integrity: sha512-bHtC0iYvWhyaTzvV3CZgPeZQqCOBGyGsVV7v4eevpdkLHfiSrXUdBG+qAuSz4RI70sszvjQ1QSZ98An1yNwpSw==} + dev: true + /deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + /deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + dev: true + /defaults@1.0.4: resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} dependencies: @@ -2554,6 +3114,11 @@ packages: gopd: 1.0.1 has-property-descriptors: 1.0.1 + /define-lazy-prop@2.0.0: + resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} + engines: {node: '>=8'} + dev: true + /define-properties@1.2.1: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} @@ -2562,15 +3127,38 @@ packages: has-property-descriptors: 1.0.1 object-keys: 1.1.1 + /degenerator@5.0.1: + resolution: {integrity: sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==} + engines: {node: '>= 14'} + dependencies: + ast-types: 0.13.4 + escodegen: 2.1.0 + esprima: 4.0.1 + dev: true + /delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} dev: true + /delegates@1.0.0: + resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} + dev: true + + /depd@1.1.2: + resolution: {integrity: sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==} + engines: {node: '>= 0.6'} + dev: true + /depd@2.0.0: resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} engines: {node: '>= 0.8'} + /dependency-graph@0.11.0: + resolution: {integrity: sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==} + engines: {node: '>= 0.6.0'} + dev: true + /des.js@1.1.0: resolution: {integrity: sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==} dependencies: @@ -2587,6 +3175,10 @@ packages: engines: {node: '>=8'} dev: true + /devtools-protocol@0.0.1147663: + resolution: {integrity: sha512-hyWmRrexdhbZ1tcJUGpO95ivbRhWXz++F4Ko+n21AY5PNln2ovoJw+8ZMNDTtip+CNFQfrtLVh/w4009dXO/eQ==} + dev: true + /dezalgo@1.0.4: resolution: {integrity: sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==} dependencies: @@ -2594,10 +3186,6 @@ packages: wrappy: 1.0.2 dev: true - /di@0.0.1: - resolution: {integrity: sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA==} - dev: true - /did-resolver@4.1.0: resolution: {integrity: sha512-S6fWHvCXkZg2IhS4RcVHxwuyVejPR7c+a4Go0xbQ9ps5kILa8viiYQgrM4gfTyeTjJ0ekgJH9gk/BawTpmkbZA==} dev: false @@ -2641,15 +3229,6 @@ packages: esutils: 2.0.3 dev: true - /dom-serialize@2.2.1: - resolution: {integrity: sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ==} - dependencies: - custom-event: 1.0.1 - ent: 2.2.0 - extend: 3.0.2 - void-elements: 2.0.1 - dev: true - /domain-browser@4.23.0: resolution: {integrity: sha512-ArzcM/II1wCCujdCNyQjXrAFwS4mrLh4C7DZWlaI8mdh7h3BfKdNd3bKXITfl2PT9FtfQqaGvhi1vPRQPimjGA==} engines: {node: '>=10'} @@ -2686,29 +3265,10 @@ packages: resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} engines: {node: '>= 0.8'} - /engine.io-parser@5.2.1: - resolution: {integrity: sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ==} - engines: {node: '>=10.0.0'} - dev: true - - /engine.io@6.5.4: - resolution: {integrity: sha512-KdVSDKhVKyOi+r5uEabrDLZw2qXStVvCsEB/LN3mw4WFi6Gx50jTyuxYVCwAAC0U46FdnzP/ScKRBTXb/NiEOg==} - engines: {node: '>=10.2.0'} + /end-of-stream@1.4.4: + resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} dependencies: - '@types/cookie': 0.4.1 - '@types/cors': 2.8.17 - '@types/node': 20.9.4 - accepts: 1.3.8 - base64id: 2.0.0 - cookie: 0.4.2 - cors: 2.8.5 - debug: 4.3.4(supports-color@8.1.1) - engine.io-parser: 5.2.1 - ws: 8.11.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate + once: 1.4.0 dev: true /enquirer@2.4.1: @@ -2719,10 +3279,6 @@ packages: strip-ansi: 6.0.1 dev: true - /ent@2.2.0: - resolution: {integrity: sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA==} - dev: true - /err-code@2.0.3: resolution: {integrity: sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==} dev: true @@ -2733,6 +3289,10 @@ packages: is-arrayish: 0.2.1 dev: true + /errorstacks@2.4.1: + resolution: {integrity: sha512-jE4i0SMYevwu/xxAuzhly/KTwtj0xDhbzB6m1xPImxTkw8wcCbgarOQPfCVMi5JKVyW7in29pNJCCJrry3Ynnw==} + dev: true + /es-abstract@1.22.3: resolution: {integrity: sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==} engines: {node: '>= 0.4'} @@ -2766,7 +3326,7 @@ packages: object.assign: 4.1.5 regexp.prototype.flags: 1.5.1 safe-array-concat: 1.0.1 - safe-regex-test: 1.0.0 + safe-regex-test: 1.0.2 string.prototype.trim: 1.2.8 string.prototype.trimend: 1.0.7 string.prototype.trimstart: 1.0.7 @@ -2777,6 +3337,10 @@ packages: unbox-primitive: 1.0.2 which-typed-array: 1.1.13 + /es-module-lexer@1.4.1: + resolution: {integrity: sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==} + dev: true + /es-set-tostringtag@2.0.2: resolution: {integrity: sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==} engines: {node: '>= 0.4'} @@ -2860,6 +3424,18 @@ packages: source-map: 0.6.1 dev: false + /escodegen@2.1.0: + resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} + engines: {node: '>=6.0'} + hasBin: true + dependencies: + esprima: 4.0.1 + estraverse: 5.3.0 + esutils: 2.0.3 + optionalDependencies: + source-map: 0.6.1 + dev: true + /eslint-scope@5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} @@ -2890,7 +3466,7 @@ packages: '@eslint-community/regexpp': 4.10.0 '@eslint/eslintrc': 2.1.4 '@eslint/js': 8.43.0 - '@humanwhocodes/config-array': 0.11.13 + '@humanwhocodes/config-array': 0.11.14 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 ajv: 6.12.6 @@ -2908,7 +3484,7 @@ packages: file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.23.0 + globals: 13.24.0 graphemer: 1.4.0 ignore: 5.3.0 import-fresh: 3.3.0 @@ -2938,7 +3514,7 @@ packages: '@eslint-community/regexpp': 4.10.0 '@eslint/eslintrc': 2.1.4 '@eslint/js': 8.49.0 - '@humanwhocodes/config-array': 0.11.13 + '@humanwhocodes/config-array': 0.11.14 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 ajv: 6.12.6 @@ -2956,7 +3532,7 @@ packages: file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.23.0 + globals: 13.24.0 graphemer: 1.4.0 ignore: 5.3.0 imurmurhash: 0.1.4 @@ -2979,8 +3555,8 @@ packages: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - acorn: 8.11.2 - acorn-jsx: 5.3.2(acorn@8.11.2) + acorn: 8.11.3 + acorn-jsx: 5.3.2(acorn@8.11.3) eslint-visitor-keys: 3.4.3 dev: true @@ -3012,6 +3588,10 @@ packages: engines: {node: '>=4.0'} dev: true + /estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + dev: true + /esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} @@ -3019,17 +3599,12 @@ packages: /etag@1.8.1: resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} engines: {node: '>= 0.6'} - dev: false /event-target-shim@5.0.1: resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} engines: {node: '>=6'} dev: false - /eventemitter3@4.0.7: - resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} - dev: true - /events@3.3.0: resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} engines: {node: '>=0.8.x'} @@ -3080,10 +3655,6 @@ packages: - supports-color dev: false - /extend@3.0.2: - resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} - dev: true - /extendable-error@0.1.7: resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} dev: true @@ -3097,9 +3668,27 @@ packages: tmp: 0.0.33 dev: true + /extract-zip@2.0.1: + resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==} + engines: {node: '>= 10.17.0'} + hasBin: true + dependencies: + debug: 4.3.4(supports-color@8.1.1) + get-stream: 5.2.0 + yauzl: 2.10.0 + optionalDependencies: + '@types/yauzl': 2.10.3 + transitivePeerDependencies: + - supports-color + dev: true + /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + /fast-fifo@1.3.2: + resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} + dev: true + /fast-glob@3.3.2: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} @@ -3122,12 +3711,18 @@ packages: resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} dev: true - /fastq@1.15.0: - resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} + /fastq@1.16.0: + resolution: {integrity: sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==} dependencies: reusify: 1.0.4 dev: true + /fd-slicer@1.1.0: + resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} + dependencies: + pend: 1.2.0 + dev: true + /file-entry-cache@6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -3147,21 +3742,6 @@ packages: engines: {node: '>=14.16'} dev: false - /finalhandler@1.1.2: - resolution: {integrity: sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==} - engines: {node: '>= 0.8'} - dependencies: - debug: 2.6.9 - encodeurl: 1.0.2 - escape-html: 1.0.3 - on-finished: 2.3.0 - parseurl: 1.3.3 - statuses: 1.5.0 - unpipe: 1.0.0 - transitivePeerDependencies: - - supports-color - dev: true - /finalhandler@1.2.0: resolution: {integrity: sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==} engines: {node: '>= 0.8'} @@ -3177,6 +3757,13 @@ packages: - supports-color dev: false + /find-replace@3.0.0: + resolution: {integrity: sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==} + engines: {node: '>=4.0.0'} + dependencies: + array-back: 3.1.0 + dev: true + /find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} @@ -3218,16 +3805,6 @@ packages: resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} dev: true - /follow-redirects@1.15.4: - resolution: {integrity: sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==} - engines: {node: '>=4.0'} - peerDependencies: - debug: '*' - peerDependenciesMeta: - debug: - optional: true - dev: true - /for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} dependencies: @@ -3267,7 +3844,6 @@ packages: /fresh@0.5.2: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} - dev: false /fs-extra@7.0.1: resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} @@ -3357,6 +3933,18 @@ packages: has-symbols: 1.0.3 hasown: 2.0.0 + /get-stream@5.2.0: + resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} + engines: {node: '>=8'} + dependencies: + pump: 3.0.0 + dev: true + + /get-stream@6.0.1: + resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} + engines: {node: '>=10'} + dev: true + /get-symbol-description@1.0.0: resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} engines: {node: '>= 0.4'} @@ -3364,6 +3952,18 @@ packages: call-bind: 1.0.5 get-intrinsic: 1.2.2 + /get-uri@6.0.2: + resolution: {integrity: sha512-5KLucCJobh8vBY1K07EFV4+cPZH3mrV9YeAruUseCQKHB58SGjjT2l9/eA9LD082IiuMjSlFJEcdJ27TXvbZNw==} + engines: {node: '>= 14'} + dependencies: + basic-ftp: 5.0.4 + data-uri-to-buffer: 6.0.1 + debug: 4.3.4(supports-color@8.1.1) + fs-extra: 8.1.0 + transitivePeerDependencies: + - supports-color + dev: true + /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -3422,8 +4022,8 @@ packages: path-scurry: 1.10.1 dev: true - /globals@13.23.0: - resolution: {integrity: sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==} + /globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} dependencies: type-fest: 0.20.2 @@ -3435,6 +4035,10 @@ packages: dependencies: define-properties: 1.2.1 + /globalyzer@0.1.0: + resolution: {integrity: sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==} + dev: true + /globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} @@ -3447,6 +4051,10 @@ packages: slash: 3.0.0 dev: true + /globrex@0.1.2: + resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} + dev: true + /gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: @@ -3578,6 +4186,35 @@ packages: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} dev: true + /http-assert@1.5.0: + resolution: {integrity: sha512-uPpH7OKX4H25hBmU6G1jWNaqJGpTXxey+YOUizJUAgu0AjLUeC8D73hTrhvDS5D+GJN1DN1+hhc/eF/wpxtp0w==} + engines: {node: '>= 0.8'} + dependencies: + deep-equal: 1.0.1 + http-errors: 1.8.1 + dev: true + + /http-errors@1.6.3: + resolution: {integrity: sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==} + engines: {node: '>= 0.6'} + dependencies: + depd: 1.1.2 + inherits: 2.0.3 + setprototypeof: 1.1.0 + statuses: 1.5.0 + dev: true + + /http-errors@1.8.1: + resolution: {integrity: sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==} + engines: {node: '>= 0.6'} + dependencies: + depd: 1.1.2 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 1.5.0 + toidentifier: 1.0.1 + dev: true + /http-errors@2.0.0: resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} engines: {node: '>= 0.8'} @@ -3588,21 +4225,30 @@ packages: statuses: 2.0.1 toidentifier: 1.0.1 - /http-proxy@1.18.1: - resolution: {integrity: sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==} - engines: {node: '>=8.0.0'} + /http-proxy-agent@7.0.0: + resolution: {integrity: sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==} + engines: {node: '>= 14'} dependencies: - eventemitter3: 4.0.7 - follow-redirects: 1.15.4 - requires-port: 1.0.0 + agent-base: 7.1.0 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - - debug + - supports-color dev: true /https-browserify@1.0.0: resolution: {integrity: sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==} dev: true + /https-proxy-agent@7.0.2: + resolution: {integrity: sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==} + engines: {node: '>= 14'} + dependencies: + agent-base: 7.1.0 + debug: 4.3.4(supports-color@8.1.1) + transitivePeerDependencies: + - supports-color + dev: true + /human-id@1.0.2: resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} dev: true @@ -3639,6 +4285,11 @@ packages: engines: {node: '>=8'} dev: true + /inflation@2.1.0: + resolution: {integrity: sha512-t54PPJHG1Pp7VQvxyVCJ9mBbjG3Hqryges9bXoOO6GExCPa+//i/d5GSuFtpx3ALLd7lgIAur6zrIlBQyJuMlQ==} + engines: {node: '>= 0.8.0'} + dev: true + /inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} dependencies: @@ -3646,6 +4297,10 @@ packages: wrappy: 1.0.2 dev: true + /inherits@2.0.3: + resolution: {integrity: sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==} + dev: true + /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -3657,6 +4312,14 @@ packages: hasown: 2.0.0 side-channel: 1.0.4 + /ip@1.1.8: + resolution: {integrity: sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==} + dev: true + + /ip@2.0.0: + resolution: {integrity: sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==} + dev: true + /ipaddr.js@1.9.1: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} @@ -3709,6 +4372,13 @@ packages: engines: {node: '>=4'} dev: false + /is-builtin-module@3.2.1: + resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} + engines: {node: '>=6'} + dependencies: + builtin-modules: 3.3.0 + dev: true + /is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} @@ -3762,6 +4432,10 @@ packages: is-extglob: 2.1.1 dev: true + /is-module@1.0.0: + resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} + dev: true + /is-nan@1.3.2: resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==} engines: {node: '>= 0.4'} @@ -3812,6 +4486,11 @@ packages: dependencies: call-bind: 1.0.5 + /is-stream@2.0.1: + resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} + engines: {node: '>=8'} + dev: true + /is-string@1.0.7: resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} engines: {node: '>= 0.4'} @@ -3859,16 +4538,12 @@ packages: is-docker: 2.2.1 dev: true - /isarray@0.0.1: - resolution: {integrity: sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==} - dev: true - /isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} - /isbinaryfile@4.0.10: - resolution: {integrity: sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==} - engines: {node: '>= 8.0.0'} + /isbinaryfile@5.0.0: + resolution: {integrity: sha512-UDdnyGvMajJUWCkib7Cei/dvyJrrvo4FIrsvSFWdPpXSUorzXrDJ0S+X5Q4ZlasfPjca4yqCNNsjbCeiy8FFeg==} + engines: {node: '>= 14.0.0'} dev: true /isexe@2.0.0: @@ -3970,8 +4645,8 @@ packages: graceful-fs: 4.2.11 dev: true - /just-extend@4.2.1: - resolution: {integrity: sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==} + /just-extend@6.2.0: + resolution: {integrity: sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw==} dev: true /jwt-decode@3.1.2: @@ -4001,118 +4676,97 @@ packages: randombytes: 2.1.0 dev: false - /karma-chai@0.1.0(chai@4.3.10)(karma@6.4.1): - resolution: {integrity: sha512-mqKCkHwzPMhgTYca10S90aCEX9+HjVjjrBFAsw36Zj7BlQNbokXXCAe6Ji04VUMsxcY5RLP7YphpfO06XOubdg==} - peerDependencies: - chai: '*' - karma: '>=0.10.9' + /keygrip@1.1.0: + resolution: {integrity: sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==} + engines: {node: '>= 0.6'} dependencies: - chai: 4.3.10 - karma: 6.4.1 + tsscmp: 1.0.6 dev: true - /karma-chrome-launcher@3.1.1: - resolution: {integrity: sha512-hsIglcq1vtboGPAN+DGCISCFOxW+ZVnIqhDQcCMqqCp+4dmJ0Qpq5QAjkbA0X2L9Mi6OBkHi2Srrbmm7pUKkzQ==} + /keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} dependencies: - which: 1.3.1 + json-buffer: 3.0.1 dev: true - /karma-esbuild@2.2.5(esbuild@0.16.17): - resolution: {integrity: sha512-+NiRmZhUm/MqOsL1cAu8+RmiOMvIxWDaeYDLBB5upxHF9Hh3Og8YH43EAmDan40pxt2FKDcOjupgqIe4Tx2szQ==} - peerDependencies: - esbuild: '>=0.8.45' - dependencies: - chokidar: 3.5.3 - esbuild: 0.16.17 - source-map: 0.6.1 + /kind-of@6.0.3: + resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} + engines: {node: '>=0.10.0'} dev: true - /karma-firefox-launcher@2.1.2: - resolution: {integrity: sha512-VV9xDQU1QIboTrjtGVD4NCfzIH7n01ZXqy/qpBhnOeGVOkG5JYPEm8kuSd7psHE6WouZaQ9Ool92g8LFweSNMA==} - dependencies: - is-wsl: 2.2.0 - which: 2.0.2 + /kleur@4.1.5: + resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} + engines: {node: '>=6'} dev: true - /karma-mocha-reporter@2.2.5(karma@6.4.1): - resolution: {integrity: sha512-Hr6nhkIp0GIJJrvzY8JFeHpQZNseuIakGac4bpw8K1+5F0tLb6l7uvXRa8mt2Z+NVwYgCct4QAfp2R2QP6o00w==} - peerDependencies: - karma: '>=0.13' - dependencies: - chalk: 2.4.2 - karma: 6.4.1 - log-symbols: 2.2.0 - strip-ansi: 4.0.0 + /koa-compose@4.1.0: + resolution: {integrity: sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw==} dev: true - /karma-mocha@2.0.1: - resolution: {integrity: sha512-Tzd5HBjm8his2OA4bouAsATYEpZrp9vC7z5E5j4C5Of5Rrs1jY67RAwXNcVmd/Bnk1wgvQRou0zGVLey44G4tQ==} + /koa-convert@2.0.0: + resolution: {integrity: sha512-asOvN6bFlSnxewce2e/DK3p4tltyfC4VM7ZwuTuepI7dEQVcvpyFuBcEARu1+Hxg8DIwytce2n7jrZtRlPrARA==} + engines: {node: '>= 10'} dependencies: - minimist: 1.2.8 + co: 4.6.0 + koa-compose: 4.1.0 dev: true - /karma-webkit-launcher@2.1.0: - resolution: {integrity: sha512-S5eqhH0DIcuJFi27nC6eBxZ3MTrPnYybPthDU2Q8dfG0yFrXx8FqNDKSbRZsFFvAKJ55QVtYH1bbArd3ddI5Sg==} - peerDependencies: - playwright: '*' - peerDependenciesMeta: - playwright: - optional: true + /koa-etag@4.0.0: + resolution: {integrity: sha512-1cSdezCkBWlyuB9l6c/IFoe1ANCDdPBxkDkRiaIup40xpUub6U/wwRXoKBZw/O5BifX9OlqAjYnDyzM6+l+TAg==} dependencies: - is-ci: 3.0.1 - uuid: 9.0.1 + etag: 1.8.1 dev: true - /karma@6.4.1: - resolution: {integrity: sha512-Cj57NKOskK7wtFWSlMvZf459iX+kpYIPXmkNUzP2WAFcA7nhr/ALn5R7sw3w+1udFDcpMx/tuB8d5amgm3ijaA==} - engines: {node: '>= 10'} - hasBin: true + /koa-send@5.0.1: + resolution: {integrity: sha512-tmcyQ/wXXuxpDxyNXv5yNNkdAMdFRqwtegBXUaowiQzUKqJehttS0x2j0eOZDQAyloAth5w6wwBImnFzkUz3pQ==} + engines: {node: '>= 8'} dependencies: - '@colors/colors': 1.5.0 - body-parser: 1.20.2 - braces: 3.0.2 - chokidar: 3.5.3 - connect: 3.7.0 - di: 0.0.1 - dom-serialize: 2.2.1 - glob: 7.2.3 - graceful-fs: 4.2.11 - http-proxy: 1.18.1 - isbinaryfile: 4.0.10 - lodash: 4.17.21 - log4js: 6.9.1 - mime: 2.6.0 - minimatch: 3.1.2 - mkdirp: 0.5.6 - qjobs: 1.2.0 - range-parser: 1.2.1 - rimraf: 3.0.2 - socket.io: 4.7.2 - source-map: 0.6.1 - tmp: 0.2.1 - ua-parser-js: 0.7.37 - yargs: 16.2.0 + debug: 4.3.4(supports-color@8.1.1) + http-errors: 1.8.1 + resolve-path: 1.4.0 transitivePeerDependencies: - - bufferutil - - debug - supports-color - - utf-8-validate dev: true - /keyv@4.5.4: - resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + /koa-static@5.0.0: + resolution: {integrity: sha512-UqyYyH5YEXaJrf9S8E23GoJFQZXkBVJ9zYYMPGz919MSX1KuvAcycIuS0ci150HCoPf4XQVhQ84Qf8xRPWxFaQ==} + engines: {node: '>= 7.6.0'} dependencies: - json-buffer: 3.0.1 - dev: true - - /kind-of@6.0.3: - resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} - engines: {node: '>=0.10.0'} + debug: 3.2.7 + koa-send: 5.0.1 + transitivePeerDependencies: + - supports-color dev: true - /kleur@4.1.5: - resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} - engines: {node: '>=6'} + /koa@2.15.0: + resolution: {integrity: sha512-KEL/vU1knsoUvfP4MC4/GthpQrY/p6dzwaaGI6Rt4NQuFqkw3qrvsdYF5pz3wOfi7IGTvMPHC9aZIcUKYFNxsw==} + engines: {node: ^4.8.4 || ^6.10.1 || ^7.10.1 || >= 8.1.4} + dependencies: + accepts: 1.3.8 + cache-content-type: 1.0.1 + content-disposition: 0.5.4 + content-type: 1.0.5 + cookies: 0.9.1 + debug: 4.3.4(supports-color@8.1.1) + delegates: 1.0.0 + depd: 2.0.0 + destroy: 1.2.0 + encodeurl: 1.0.2 + escape-html: 1.0.3 + fresh: 0.5.2 + http-assert: 1.5.0 + http-errors: 1.8.1 + is-generator-function: 1.0.10 + koa-compose: 4.1.0 + koa-convert: 2.0.0 + on-finished: 2.4.1 + only: 0.0.2 + parseurl: 1.3.3 + statuses: 1.5.0 + type-is: 1.6.18 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color dev: true /last-one-wins@1.0.4: @@ -4156,6 +4810,15 @@ packages: type-check: 0.4.0 dev: true + /lighthouse-logger@1.4.2: + resolution: {integrity: sha512-gPWxznF6TKmUHrOQjlVo2UbaL2EJ71mb2CCeRs/2qBpi4L/g4LUVc9+3lKQ6DTUZwJswfM7ainGrLO1+fOqa2g==} + dependencies: + debug: 2.6.9 + marky: 1.2.5 + transitivePeerDependencies: + - supports-color + dev: true + /lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true @@ -4184,6 +4847,14 @@ packages: p-locate: 5.0.0 dev: true + /lodash.assignwith@4.2.0: + resolution: {integrity: sha512-ZznplvbvtjK2gMvnQ1BR/zqPFZmS6jbK4p+6Up4xcRYA7yMIwxHCfbTcrYxXKzzqLsQ05eJPVznEW3tuwV7k1g==} + dev: true + + /lodash.camelcase@4.3.0: + resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} + dev: true + /lodash.get@4.4.2: resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} dev: true @@ -4200,13 +4871,6 @@ packages: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} dev: true - /log-symbols@2.2.0: - resolution: {integrity: sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==} - engines: {node: '>=4'} - dependencies: - chalk: 2.4.2 - dev: true - /log-symbols@4.1.0: resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} engines: {node: '>=10'} @@ -4215,17 +4879,14 @@ packages: is-unicode-supported: 0.1.0 dev: true - /log4js@6.9.1: - resolution: {integrity: sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g==} - engines: {node: '>=8.0'} + /log-update@4.0.0: + resolution: {integrity: sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==} + engines: {node: '>=10'} dependencies: - date-format: 4.0.14 - debug: 4.3.4(supports-color@8.1.1) - flatted: 3.2.9 - rfdc: 1.3.0 - streamroller: 3.1.5 - transitivePeerDependencies: - - supports-color + ansi-escapes: 4.3.2 + cli-cursor: 3.1.0 + slice-ansi: 4.0.0 + wrap-ansi: 6.2.0 dev: true /loupe@2.3.7: @@ -4253,6 +4914,16 @@ packages: yallist: 4.0.0 dev: true + /lru-cache@7.18.3: + resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} + engines: {node: '>=12'} + dev: true + + /lru-cache@8.0.5: + resolution: {integrity: sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==} + engines: {node: '>=16.14'} + dev: true + /lru@3.1.0: resolution: {integrity: sha512-5OUtoiVIGU4VXBOshidmtOsvBIvcQR6FD/RzWSvaeHyxCGB+PCUCu+52lqMfdc0h/2CLvHhZS4TwUmMQrrMbBQ==} engines: {node: '>= 0.4.0'} @@ -4287,6 +4958,10 @@ packages: hasBin: true dev: true + /marky@1.2.5: + resolution: {integrity: sha512-q9JtQJKjpsVxCRVgQ+WapguSbKC3SQ5HEzFGPAJMStgh3QjCawp00UKv3MTTAArTmGmmPUvllHZoNbZ3gs0I+Q==} + dev: true + /md5.js@1.3.5: resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} dependencies: @@ -4375,6 +5050,11 @@ packages: hasBin: true dev: true + /mimic-fn@2.1.0: + resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} + engines: {node: '>=6'} + dev: true + /min-indent@1.0.1: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} @@ -4438,11 +5118,19 @@ packages: engines: {node: '>=16 || 14 >=14.17'} dev: true + /mitt@3.0.0: + resolution: {integrity: sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==} + dev: true + /mixme@0.5.10: resolution: {integrity: sha512-5H76ANWinB1H3twpJ6JY8uvAtpmFvHNArpilJAjXRKXSDDLPIMoZArw5SH0q9z+lLs8IrMw7Q2VWpWimFKFT1Q==} engines: {node: '>= 8.0.0'} dev: true + /mkdirp-classic@0.5.3: + resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} + dev: true + /mkdirp@0.5.6: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} hasBin: true @@ -4450,6 +5138,12 @@ packages: minimist: 1.2.8 dev: true + /mkdirp@1.0.4: + resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} + engines: {node: '>=10'} + hasBin: true + dev: true + /mkdirp@3.0.1: resolution: {integrity: sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==} engines: {node: '>=10'} @@ -4548,6 +5242,10 @@ packages: resolution: {integrity: sha512-7vO7n28+aYO4J+8w96AzhmU8G+Y/xpPDJz/se19ICsqj/momRbb9mh9ZUtkoJ5X3nTnPdhEJyc0qnM6yAsHBaA==} dev: false + /nanocolors@0.2.13: + resolution: {integrity: sha512-0n3mSAQLPpGLV9ORXT5+C/D4mwew7Ebws69Hx4E2sgz2ZA5+32Q80B9tL8PbL7XHnRDiAxH/pnrUJ9a4fkTNTA==} + dev: true + /nanoid@3.3.3: resolution: {integrity: sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -4558,7 +5256,6 @@ packages: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - dev: false /napi-macros@2.2.2: resolution: {integrity: sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g==} @@ -4580,14 +5277,19 @@ packages: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} dev: true - /nise@5.1.5: - resolution: {integrity: sha512-VJuPIfUFaXNRzETTQEEItTOP8Y171ijr+JLq42wHes3DiryR8vT+1TXQW/Rx8JNUhyYYWyIvjXTU6dOhJcs9Nw==} + /netmask@2.0.2: + resolution: {integrity: sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==} + engines: {node: '>= 0.4.0'} + dev: true + + /nise@5.1.7: + resolution: {integrity: sha512-wWtNUhkT7k58uvWTB/Gy26eA/EJKtPZFVAhEilN5UYVmmGRYOURbejRUyKm0Uu9XVEW7K5nBOZfR8VMB4QR2RQ==} dependencies: - '@sinonjs/commons': 2.0.0 - '@sinonjs/fake-timers': 10.3.0 + '@sinonjs/commons': 3.0.0 + '@sinonjs/fake-timers': 11.2.2 '@sinonjs/text-encoding': 0.7.2 - just-extend: 4.2.1 - path-to-regexp: 1.8.0 + just-extend: 6.2.0 + path-to-regexp: 6.2.1 dev: true /node-emoji@1.11.0: @@ -4608,8 +5310,20 @@ packages: whatwg-url: 5.0.0 dev: false - /node-gyp-build@4.7.1: - resolution: {integrity: sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg==} + /node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + dependencies: + whatwg-url: 5.0.0 + dev: true + + /node-gyp-build@4.8.0: + resolution: {integrity: sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==} hasBin: true dev: false @@ -4717,6 +5431,7 @@ packages: /object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} + dev: false /object-inspect@1.13.1: resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} @@ -4742,13 +5457,6 @@ packages: has-symbols: 1.0.3 object-keys: 1.1.1 - /on-finished@2.3.0: - resolution: {integrity: sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==} - engines: {node: '>= 0.8'} - dependencies: - ee-first: 1.1.1 - dev: true - /on-finished@2.4.1: resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} engines: {node: '>= 0.8'} @@ -4761,6 +5469,26 @@ packages: wrappy: 1.0.2 dev: true + /onetime@5.1.2: + resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} + engines: {node: '>=6'} + dependencies: + mimic-fn: 2.1.0 + dev: true + + /only@0.0.2: + resolution: {integrity: sha512-Fvw+Jemq5fjjyWz6CpKx6w9s7xxqo3+JCyM0WXWeCSOboZ8ABkyvP8ID4CZuChA/wxSx+XSJmdOm8rGVyJ1hdQ==} + dev: true + + /open@8.4.2: + resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} + engines: {node: '>=12'} + dependencies: + define-lazy-prop: 2.0.0 + is-docker: 2.2.1 + is-wsl: 2.2.0 + dev: true + /optionator@0.8.3: resolution: {integrity: sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==} engines: {node: '>= 0.8.0'} @@ -4843,6 +5571,31 @@ packages: engines: {node: '>=6'} dev: true + /pac-proxy-agent@7.0.1: + resolution: {integrity: sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A==} + engines: {node: '>= 14'} + dependencies: + '@tootallnate/quickjs-emscripten': 0.23.0 + agent-base: 7.1.0 + debug: 4.3.4(supports-color@8.1.1) + get-uri: 6.0.2 + http-proxy-agent: 7.0.0 + https-proxy-agent: 7.0.2 + pac-resolver: 7.0.0 + socks-proxy-agent: 8.0.2 + transitivePeerDependencies: + - supports-color + dev: true + + /pac-resolver@7.0.0: + resolution: {integrity: sha512-Fd9lT9vJbHYRACT8OhCbZBbxr6KRSawSovFpy8nDGshaK99S/EBhVIHp9+crhxrsZOuvLpgL1n23iyPg6Rl2hg==} + engines: {node: '>= 14'} + dependencies: + degenerator: 5.0.1 + ip: 1.1.8 + netmask: 2.0.2 + dev: true + /pako@1.0.11: resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} dev: true @@ -4874,6 +5627,10 @@ packages: lines-and-columns: 1.2.4 dev: true + /parse5@6.0.1: + resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==} + dev: true + /parseurl@1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} @@ -4913,10 +5670,8 @@ packages: resolution: {integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==} dev: false - /path-to-regexp@1.8.0: - resolution: {integrity: sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==} - dependencies: - isarray: 0.0.1 + /path-to-regexp@6.2.1: + resolution: {integrity: sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==} dev: true /path-type@4.0.0: @@ -4939,6 +5694,10 @@ packages: sha.js: 2.4.11 dev: true + /pend@1.2.0: + resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} + dev: true + /picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} @@ -4978,10 +5737,31 @@ packages: find-up: 5.0.0 dev: true - /playwright-core@1.34.3: - resolution: {integrity: sha512-2pWd6G7OHKemc5x1r1rp8aQcpvDh7goMBZlJv6Co5vCNLVcQJdhxRL09SGaY6HcyHH9aT4tiynZabMofVasBYw==} - engines: {node: '>=14'} + /playwright-core@1.40.1: + resolution: {integrity: sha512-+hkOycxPiV534c4HhpfX6yrlawqVUzITRKwHAmYfmsVreltEl6fAZJ3DPfLMOODw0H3s1Itd6MDCWmP1fl/QvQ==} + engines: {node: '>=16'} + hasBin: true + dev: true + + /playwright@1.40.1: + resolution: {integrity: sha512-2eHI7IioIpQ0bS1Ovg/HszsN/XKNwEG1kbzSDDmADpclKc7CyqkHw7Mg2JCz/bbCxg25QUPcjksoMW7JcIFQmw==} + engines: {node: '>=16'} hasBin: true + dependencies: + playwright-core: 1.40.1 + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /portfinder@1.0.32: + resolution: {integrity: sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==} + engines: {node: '>= 0.12.0'} + dependencies: + async: 2.6.4 + debug: 3.2.7 + mkdirp: 0.5.6 + transitivePeerDependencies: + - supports-color dev: true /preferred-pm@3.1.2: @@ -5019,6 +5799,11 @@ packages: resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} engines: {node: '>= 0.6.0'} + /progress@2.0.3: + resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} + engines: {node: '>=0.4.0'} + dev: true + /promise-inflight@1.0.1: resolution: {integrity: sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==} peerDependencies: @@ -5044,6 +5829,26 @@ packages: ipaddr.js: 1.9.1 dev: false + /proxy-agent@6.3.0: + resolution: {integrity: sha512-0LdR757eTj/JfuU7TL2YCuAZnxWXu3tkJbg4Oq3geW/qFNT/32T0sp2HnZ9O0lMR4q3vwAt0+xCA8SR0WAD0og==} + engines: {node: '>= 14'} + dependencies: + agent-base: 7.1.0 + debug: 4.3.4(supports-color@8.1.1) + http-proxy-agent: 7.0.0 + https-proxy-agent: 7.0.2 + lru-cache: 7.18.3 + pac-proxy-agent: 7.0.1 + proxy-from-env: 1.1.0 + socks-proxy-agent: 8.0.2 + transitivePeerDependencies: + - supports-color + dev: true + + /proxy-from-env@1.1.0: + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + dev: true + /pseudomap@1.0.2: resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} dev: true @@ -5059,6 +5864,13 @@ packages: safe-buffer: 5.2.1 dev: true + /pump@3.0.0: + resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} + dependencies: + end-of-stream: 1.4.4 + once: 1.4.0 + dev: true + /punycode@1.4.1: resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} dev: true @@ -5067,9 +5879,27 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} - /qjobs@1.2.0: - resolution: {integrity: sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==} - engines: {node: '>=0.9'} + /puppeteer-core@20.9.0(typescript@5.2.2): + resolution: {integrity: sha512-H9fYZQzMTRrkboEfPmf7m3CLDN6JvbxXA3qTtS+dFt27tR+CsFHzPsT6pzp6lYL6bJbAPaR0HaPO6uSi+F94Pg==} + engines: {node: '>=16.3.0'} + peerDependencies: + typescript: '>= 4.7.4' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@puppeteer/browsers': 1.4.6(typescript@5.2.2) + chromium-bidi: 0.4.16(devtools-protocol@0.0.1147663) + cross-fetch: 4.0.0 + debug: 4.3.4(supports-color@8.1.1) + devtools-protocol: 0.0.1147663 + typescript: 5.2.2 + ws: 8.13.0 + transitivePeerDependencies: + - bufferutil + - encoding + - supports-color + - utf-8-validate dev: true /qs@6.11.0: @@ -5077,6 +5907,7 @@ packages: engines: {node: '>=0.6'} dependencies: side-channel: 1.0.4 + dev: false /qs@6.11.2: resolution: {integrity: sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==} @@ -5102,6 +5933,10 @@ packages: /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + /queue-tick@1.0.1: + resolution: {integrity: sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==} + dev: true + /quick-lru@4.0.1: resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} engines: {node: '>=8'} @@ -5122,6 +5957,7 @@ packages: /range-parser@1.2.1: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} + dev: false /raw-body@2.5.1: resolution: {integrity: sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==} @@ -5213,8 +6049,8 @@ packages: strip-indent: 3.0.0 dev: true - /regenerator-runtime@0.14.0: - resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} + /regenerator-runtime@0.14.1: + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} dev: true /regexp.prototype.flags@1.5.1: @@ -5239,10 +6075,6 @@ packages: resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} dev: true - /requires-port@1.0.0: - resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} - dev: true - /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -5253,6 +6085,14 @@ packages: engines: {node: '>=8'} dev: true + /resolve-path@1.4.0: + resolution: {integrity: sha512-i1xevIst/Qa+nA9olDxLWnLk8YZbi8R/7JPbCMcgyWaFR6bKWaexgJgEB5oc2PKMjYdrHynyz0NY+if+H98t1w==} + engines: {node: '>= 0.8'} + dependencies: + http-errors: 1.6.3 + path-is-absolute: 1.0.1 + dev: true + /resolve@1.22.8: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true @@ -5262,6 +6102,14 @@ packages: supports-preserve-symlinks-flag: 1.0.0 dev: true + /restore-cursor@3.1.0: + resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} + engines: {node: '>=8'} + dependencies: + onetime: 5.1.2 + signal-exit: 3.0.7 + dev: true + /retry@0.12.0: resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==} engines: {node: '>= 4'} @@ -5272,10 +6120,6 @@ packages: engines: {iojs: '>=1.0.0', node: '>=0.10.0'} dev: true - /rfdc@1.3.0: - resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==} - dev: true - /rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} hasBin: true @@ -5306,6 +6150,29 @@ packages: inherits: 2.0.4 dev: true + /rollup@4.9.4: + resolution: {integrity: sha512-2ztU7pY/lrQyXSCnnoU4ICjT/tCG9cdH3/G25ERqE3Lst6vl2BCM5hL2Nw+sslAvAf+ccKsAq1SkKQALyqhR7g==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + dependencies: + '@types/estree': 1.0.5 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.9.4 + '@rollup/rollup-android-arm64': 4.9.4 + '@rollup/rollup-darwin-arm64': 4.9.4 + '@rollup/rollup-darwin-x64': 4.9.4 + '@rollup/rollup-linux-arm-gnueabihf': 4.9.4 + '@rollup/rollup-linux-arm64-gnu': 4.9.4 + '@rollup/rollup-linux-arm64-musl': 4.9.4 + '@rollup/rollup-linux-riscv64-gnu': 4.9.4 + '@rollup/rollup-linux-x64-gnu': 4.9.4 + '@rollup/rollup-linux-x64-musl': 4.9.4 + '@rollup/rollup-win32-arm64-msvc': 4.9.4 + '@rollup/rollup-win32-ia32-msvc': 4.9.4 + '@rollup/rollup-win32-x64-msvc': 4.9.4 + fsevents: 2.3.3 + dev: true + /run-parallel-limit@1.1.0: resolution: {integrity: sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw==} dependencies: @@ -5340,8 +6207,9 @@ packages: /safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - /safe-regex-test@1.0.0: - resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} + /safe-regex-test@1.0.2: + resolution: {integrity: sha512-83S9w6eFq12BBIJYvjMux6/dkirb8+4zJRA9cxNBVb7Wq5fJBW+Xze48WqR8pxua7bDuAaaAxtVVd4Idjp1dBQ==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.5 get-intrinsic: 1.2.2 @@ -5431,6 +6299,10 @@ packages: resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} dev: true + /setprototypeof@1.1.0: + resolution: {integrity: sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==} + dev: true + /setprototypeof@1.2.0: resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} @@ -5494,8 +6366,8 @@ packages: engines: {node: '>=8'} dev: true - /shiki@0.14.5: - resolution: {integrity: sha512-1gCAYOcmCFONmErGTrS1fjzJLA7MGZmKzrBNX7apqSwhyITJg2O102uFzXUeBxNnEkDA9vHIKLyeKq0V083vIw==} + /shiki@0.14.7: + resolution: {integrity: sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==} dependencies: ansi-sequence-parser: 1.1.1 jsonc-parser: 3.2.0 @@ -5526,7 +6398,7 @@ packages: '@sinonjs/fake-timers': 11.2.2 '@sinonjs/samsam': 8.0.0 diff: 5.1.0 - nise: 5.1.5 + nise: 5.1.7 supports-color: 7.2.0 dev: true @@ -5541,6 +6413,20 @@ packages: engines: {node: '>=8'} dev: true + /slice-ansi@4.0.0: + resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + astral-regex: 2.0.0 + is-fullwidth-code-point: 3.0.0 + dev: true + + /smart-buffer@4.2.0: + resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} + engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} + dev: true + /smartwrap@2.0.2: resolution: {integrity: sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==} engines: {node: '>=6'} @@ -5554,40 +6440,23 @@ packages: yargs: 15.4.1 dev: true - /socket.io-adapter@2.5.2: - resolution: {integrity: sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA==} + /socks-proxy-agent@8.0.2: + resolution: {integrity: sha512-8zuqoLv1aP/66PHF5TqwJ7Czm3Yv32urJQHrVyhD7mmA6d61Zv8cIXQYPTWwmg6qlupnPvs/QKDmfa4P/qct2g==} + engines: {node: '>= 14'} dependencies: - ws: 8.11.0 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - dev: true - - /socket.io-parser@4.2.4: - resolution: {integrity: sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==} - engines: {node: '>=10.0.0'} - dependencies: - '@socket.io/component-emitter': 3.1.0 + agent-base: 7.1.0 debug: 4.3.4(supports-color@8.1.1) + socks: 2.7.1 transitivePeerDependencies: - supports-color dev: true - /socket.io@4.7.2: - resolution: {integrity: sha512-bvKVS29/I5fl2FGLNHuXlQaUH/BlzX1IN6S+NKLNZpBsPZIDH+90eQmCs2Railn4YUiww4SzUedJ6+uzwFnKLw==} - engines: {node: '>=10.2.0'} + /socks@2.7.1: + resolution: {integrity: sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==} + engines: {node: '>= 10.13.0', npm: '>= 3.0.0'} dependencies: - accepts: 1.3.8 - base64id: 2.0.0 - cors: 2.8.5 - debug: 4.3.4(supports-color@8.1.1) - engine.io: 6.5.4 - socket.io-adapter: 2.5.2 - socket.io-parser: 4.2.4 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate + ip: 2.0.0 + smart-buffer: 4.2.0 dev: true /sodium-javascript@0.8.0: @@ -5602,11 +6471,11 @@ packages: xsalsa20: 1.2.0 dev: false - /sodium-native@4.0.4: - resolution: {integrity: sha512-faqOKw4WQKK7r/ybn6Lqo1F9+L5T6NlBJJYvpxbZPetpWylUVqz449mvlwIBKBqxEHbWakWuOlUt8J3Qpc4sWw==} + /sodium-native@4.0.5: + resolution: {integrity: sha512-YGimGhy7Ho6pTAAvuNdn3Tv9C2MD7HP89X1omReHat0Fd1mMnapGqwzb5YoHTAbIEh8tQmKP6+uLlwYCkf+EOA==} requiresBuild: true dependencies: - node-gyp-build: 4.7.1 + node-gyp-build: 4.8.0 dev: false /sodium-universal@4.0.0: @@ -5619,7 +6488,7 @@ packages: sha512-universal: 1.2.1 siphash24: 1.3.1 sodium-javascript: 0.8.0 - sodium-native: 4.0.4 + sodium-native: 4.0.5 xsalsa20: 1.2.0 dev: false @@ -5627,6 +6496,11 @@ packages: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} + /source-map@0.7.4: + resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==} + engines: {node: '>= 8'} + dev: true + /spawndamnit@2.0.0: resolution: {integrity: sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==} dependencies: @@ -5696,21 +6570,22 @@ packages: xtend: 4.0.2 dev: true + /stream-read-all@3.0.1: + resolution: {integrity: sha512-EWZT9XOceBPlVJRrYcykW8jyRSZYbkb/0ZK36uLEmoWVO5gxBOnntNTseNzfREsqxqdfEGQrD8SXQ3QWbBmq8A==} + engines: {node: '>=10'} + dev: true + /stream-transform@2.1.3: resolution: {integrity: sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==} dependencies: mixme: 0.5.10 dev: true - /streamroller@3.1.5: - resolution: {integrity: sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw==} - engines: {node: '>=8.0'} + /streamx@2.15.6: + resolution: {integrity: sha512-q+vQL4AAz+FdfT137VF69Cc/APqUbxy+MDOImRrMvchJpigHj9GksgDU2LYbO9rx7RX6osWgxJB2WxhYv4SZAw==} dependencies: - date-format: 4.0.14 - debug: 4.3.4(supports-color@8.1.1) - fs-extra: 8.1.0 - transitivePeerDependencies: - - supports-color + fast-fifo: 1.3.2 + queue-tick: 1.0.1 dev: true /string-width@4.2.3: @@ -5772,13 +6647,6 @@ packages: dependencies: safe-buffer: 5.2.1 - /strip-ansi@4.0.0: - resolution: {integrity: sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==} - engines: {node: '>=4'} - dependencies: - ansi-regex: 3.0.1 - dev: true - /strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} @@ -5863,6 +6731,36 @@ packages: engines: {node: '>= 0.4'} dev: true + /table-layout@3.0.2: + resolution: {integrity: sha512-rpyNZYRw+/C+dYkcQ3Pr+rLxW4CfHpXjPDnG7lYhdRoUcZTUt+KEsX+94RGp/aVp/MQU35JCITv2T/beY4m+hw==} + engines: {node: '>=12.17'} + hasBin: true + dependencies: + '@75lb/deep-merge': 1.1.1 + array-back: 6.2.2 + command-line-args: 5.2.1 + command-line-usage: 7.0.1 + stream-read-all: 3.0.1 + typical: 7.1.1 + wordwrapjs: 5.1.0 + dev: true + + /tar-fs@3.0.4: + resolution: {integrity: sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==} + dependencies: + mkdirp-classic: 0.5.3 + pump: 3.0.0 + tar-stream: 3.1.6 + dev: true + + /tar-stream@3.1.6: + resolution: {integrity: sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==} + dependencies: + b4a: 1.6.4 + fast-fifo: 1.3.2 + streamx: 2.15.6 + dev: true + /term-size@2.2.1: resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} engines: {node: '>=8'} @@ -5881,6 +6779,10 @@ packages: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true + /through@2.3.8: + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + dev: true + /timers-browserify@2.0.12: resolution: {integrity: sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==} engines: {node: '>=0.6.0'} @@ -5892,6 +6794,13 @@ packages: resolution: {integrity: sha512-5ROII7nElnAirvFn8g7H7MtpfV1daMcyfTGQwsn/x2VtyV+VPiO5CjReCJtWLvoKTDEDmZocf3cNPraiMnBXLA==} dev: true + /tiny-glob@0.2.9: + resolution: {integrity: sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==} + dependencies: + globalyzer: 0.1.0 + globrex: 0.1.2 + dev: true + /tmp@0.0.33: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} @@ -5899,13 +6808,6 @@ packages: os-tmpdir: 1.0.2 dev: true - /tmp@0.2.1: - resolution: {integrity: sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==} - engines: {node: '>=8.17.0'} - dependencies: - rimraf: 3.0.2 - dev: true - /to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -5919,7 +6821,13 @@ packages: /tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - dev: false + + /tr46@3.0.0: + resolution: {integrity: sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==} + engines: {node: '>=12'} + dependencies: + punycode: 2.3.1 + dev: true /trim-newlines@3.0.1: resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} @@ -5943,6 +6851,11 @@ packages: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} dev: true + /tsscmp@1.0.6: + resolution: {integrity: sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==} + engines: {node: '>=0.6.x'} + dev: true + /tsutils@3.21.0(typescript@5.2.2): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} @@ -6000,6 +6913,11 @@ packages: engines: {node: '>=10'} dev: true + /type-fest@0.21.3: + resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} + engines: {node: '>=10'} + dev: true + /type-fest@0.6.0: resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} engines: {node: '>=8'} @@ -6075,7 +6993,7 @@ packages: lunr: 2.3.9 marked: 4.3.0 minimatch: 9.0.3 - shiki: 0.14.5 + shiki: 0.14.7 typescript: 5.2.2 dev: true @@ -6091,8 +7009,14 @@ packages: hasBin: true dev: true - /ua-parser-js@0.7.37: - resolution: {integrity: sha512-xV8kqRKM+jhMvcHWUKthV9fNebIzrNy//2O9ZwWcfiBFR5f25XVZPLlEajk/sf3Ra15V92isyQqnIEXRDaZWEA==} + /typical@4.0.0: + resolution: {integrity: sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==} + engines: {node: '>=8'} + dev: true + + /typical@7.1.1: + resolution: {integrity: sha512-T+tKVNs6Wu7IWiAce5BgMd7OZfNYUndHwc5MknN+UHOudi7sGZzuHdCadllRuqJ3fPtgFtIH9+lt9qRv6lmpfA==} + engines: {node: '>=12.17'} dev: true /uglify-js@3.17.4: @@ -6123,6 +7047,13 @@ packages: has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 + /unbzip2-stream@1.4.3: + resolution: {integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==} + dependencies: + buffer: 5.7.1 + through: 2.3.8 + dev: true + /undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} dev: true @@ -6165,11 +7096,7 @@ packages: /utils-merge@1.0.1: resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} - - /uuid@9.0.1: - resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} - hasBin: true - dev: true + dev: false /uuidv7@0.4.4: resolution: {integrity: sha512-jjRGChg03uGp9f6wQYSO8qXkweJwRbA5WRuEQE8xLIiehIzIIi23qZSzsyvZPCPoFqkeLtZuz7Plt1LGukAInA==} @@ -6211,11 +7138,6 @@ packages: resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==} dev: true - /void-elements@2.0.1: - resolution: {integrity: sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==} - engines: {node: '>=0.10.0'} - dev: true - /vscode-oniguruma@1.7.0: resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==} dev: true @@ -6232,14 +7154,25 @@ packages: /webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - dev: false + + /webidl-conversions@7.0.0: + resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} + engines: {node: '>=12'} + dev: true + + /whatwg-url@11.0.0: + resolution: {integrity: sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==} + engines: {node: '>=12'} + dependencies: + tr46: 3.0.0 + webidl-conversions: 7.0.0 + dev: true /whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 - dev: false /which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} @@ -6304,6 +7237,11 @@ packages: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} dev: true + /wordwrapjs@5.1.0: + resolution: {integrity: sha512-JNjcULU2e4KJwUNv6CHgI46UvDGitb6dGryHajXTDiLgg1/RiGoPSDw4kZfYnwGtEXf2ZMeIewDQgFGzkCB2Sg==} + engines: {node: '>=12.17'} + dev: true + /workerpool@6.2.1: resolution: {integrity: sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==} dev: true @@ -6339,9 +7277,9 @@ packages: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: true - /ws@8.11.0: - resolution: {integrity: sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==} - engines: {node: '>=10.0.0'} + /ws@7.5.9: + resolution: {integrity: sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==} + engines: {node: '>=8.3.0'} peerDependencies: bufferutil: ^4.0.1 utf-8-validate: ^5.0.2 @@ -6352,6 +7290,19 @@ packages: optional: true dev: true + /ws@8.13.0: + resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + dev: true + /xml@1.0.1: resolution: {integrity: sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==} dev: true @@ -6440,6 +7391,19 @@ packages: yargs-parser: 20.2.4 dev: true + /yargs@17.7.1: + resolution: {integrity: sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==} + engines: {node: '>=12'} + dependencies: + cliui: 8.0.1 + escalade: 3.1.1 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + dev: true + /yargs@17.7.2: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} @@ -6453,6 +7417,18 @@ packages: yargs-parser: 21.1.1 dev: true + /yauzl@2.10.0: + resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} + dependencies: + buffer-crc32: 0.2.13 + fd-slicer: 1.1.0 + dev: true + + /ylru@1.3.2: + resolution: {integrity: sha512-RXRJzMiK6U2ye0BlGGZnmpwJDPgakn6aNQ0A7gHRbD4I0uvK4TW6UqkK1V0pp9jskjJBAXd3dRrbzWkqJ+6cxA==} + engines: {node: '>= 4.0.0'} + dev: true + /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} From 01fc63669499f13c775823015333a0bb91d69537 Mon Sep 17 00:00:00 2001 From: Jiyoon Koo Date: Thu, 25 Jan 2024 19:30:19 -0500 Subject: [PATCH 15/16] JWT creation / verification (#150) * porting over changes related to jwt creation/verification in pr 122 * fixing rfq creation in client.spec.ts per protocol changes * using devtools in client.spec.ts * using devtools for tests * adding changeset * removing todos waiting on a merged PR * removing some stale / irrelevant todos * removing unused error from index import. changed DevTools.getOffering() to allow passing in of offering creator did * removing an error import * removing a test that is no longer needed * updating tbdex submodule commit pointer to latest in main Co-authored-by: Moe Jangda --- .changeset/soft-ravens-march.md | 6 + packages/http-client/src/client.ts | 147 +++++++++++++---- packages/http-client/src/errors/index.ts | 3 +- .../src/errors/request-token-error.ts | 68 ++++++++ packages/http-client/tests/client.spec.ts | 148 ++++++++++++++++-- packages/http-server/src/http-server.ts | 18 ++- .../src/request-handlers/get-exchanges.ts | 9 +- .../http-server/tests/get-exchanges.spec.ts | 5 +- tbdex | 2 +- 9 files changed, 344 insertions(+), 62 deletions(-) create mode 100644 .changeset/soft-ravens-march.md create mode 100644 packages/http-client/src/errors/request-token-error.ts diff --git a/.changeset/soft-ravens-march.md b/.changeset/soft-ravens-march.md new file mode 100644 index 00000000..1618c7ed --- /dev/null +++ b/.changeset/soft-ravens-march.md @@ -0,0 +1,6 @@ +--- +"@tbdex/http-client": minor +"@tbdex/http-server": minor +--- + +JWT creation and verification diff --git a/packages/http-client/src/client.ts b/packages/http-client/src/client.ts index 609609e6..9e3f8f05 100644 --- a/packages/http-client/src/client.ts +++ b/packages/http-client/src/client.ts @@ -1,3 +1,4 @@ +import type { JwtPayload } from '@web5/crypto' import type { ErrorDetail } from './types.js' import type { PortableDid } from '@web5/dids' import type { @@ -9,11 +10,47 @@ import type { MessageKindClass, } from '@tbdex/protocol' -import { resolveDid, Offering, Resource, Message, Crypto } from '@tbdex/protocol' +import { + RequestError, + ResponseError, + InvalidDidError, + MissingServiceEndpointError, + RequestTokenMissingClaimsError, + RequestTokenAudienceMismatchError, + RequestTokenSigningError, + RequestTokenVerificationError +} from './errors/index.js' +import { resolveDid, Offering, Resource, Message } from '@tbdex/protocol' import { utils as didUtils } from '@web5/dids' -import { Convert } from '@web5/common' -import { RequestError, ResponseError, InvalidDidError, MissingServiceEndpointError } from './errors/index.js' +import { typeid } from 'typeid-js' +import { Jwt } from '@web5/credentials' + import queryString from 'query-string' +import ms from 'ms' + +/** + * Parameters for generating a request token + * @beta + */ +export type GenerateRequestTokenParams = { + requesterDid: PortableDid + pfiDid: string +} + +/** + * Parameters for verifying a request token + * @beta + */ +export type VerifyRequestTokenParams = { + requestToken: string + pfiDid: string +} + +/** + * Required jwt claims expected in a request token + * @beta + */ +export const requestTokenRequiredClaims = ['aud', 'iss', 'exp', 'iat', 'jti'] /** * HTTP client for interacting with TBDex PFIs @@ -44,7 +81,7 @@ export class TbdexHttpClient { headers : { 'content-type': 'application/json' }, body : JSON.stringify(jsonMessage) }) - } catch(e) { + } catch (e) { throw new RequestError({ message: `Failed to send message to ${pfiDid}`, recipientDid: pfiDid, url: apiRoute, cause: e }) } @@ -110,16 +147,16 @@ export class TbdexHttpClient { * @beta */ static async getOfferings(opts: GetOfferingsOptions): Promise { - const { pfiDid , filter } = opts + const { pfiDid, filter } = opts const pfiServiceEndpoint = await TbdexHttpClient.getPfiServiceEndpoint(pfiDid) - const queryParams = filter ? `?${queryString.stringify(filter)}`: '' + const queryParams = filter ? `?${queryString.stringify(filter)}` : '' const apiRoute = `${pfiServiceEndpoint}/offerings${queryParams}` let response: Response try { response = await fetch(apiRoute) - } catch(e) { + } catch (e) { throw new RequestError({ message: `Failed to get offerings from ${pfiDid}`, recipientDid: pfiDid, url: apiRoute, cause: e }) } @@ -148,7 +185,7 @@ export class TbdexHttpClient { const pfiServiceEndpoint = await TbdexHttpClient.getPfiServiceEndpoint(pfiDid) const apiRoute = `${pfiServiceEndpoint}/exchanges/${exchangeId}` - const requestToken = await TbdexHttpClient.generateRequestToken(did) + const requestToken = await TbdexHttpClient.generateRequestToken({ requesterDid: did, pfiDid }) let response: Response try { @@ -157,7 +194,7 @@ export class TbdexHttpClient { authorization: `Bearer ${requestToken}` } }) - } catch(e) { + } catch (e) { throw new RequestError({ message: `Failed to get exchange from ${pfiDid}`, recipientDid: pfiDid, url: apiRoute, cause: e }) } @@ -186,9 +223,9 @@ export class TbdexHttpClient { const { pfiDid, filter, did } = opts const pfiServiceEndpoint = await TbdexHttpClient.getPfiServiceEndpoint(pfiDid) - const queryParams = filter ? `?${queryString.stringify(filter)}`: '' + const queryParams = filter ? `?${queryString.stringify(filter)}` : '' const apiRoute = `${pfiServiceEndpoint}/exchanges${queryParams}` - const requestToken = await TbdexHttpClient.generateRequestToken(did) + const requestToken = await TbdexHttpClient.generateRequestToken({ requesterDid: did, pfiDid }) let response: Response try { @@ -197,7 +234,7 @@ export class TbdexHttpClient { authorization: `Bearer ${requestToken}` } }) - } catch(e) { + } catch (e) { throw new RequestError({ message: `Failed to get exchanges from ${pfiDid}`, recipientDid: pfiDid, url: apiRoute, cause: e }) } @@ -230,7 +267,7 @@ export class TbdexHttpClient { static async getPfiServiceEndpoint(did: string) { try { const didDocument = await resolveDid(did) - const [ didService ] = didUtils.getServices({ didDocument, type: 'PFI' }) + const [didService] = didUtils.getServices({ didDocument, type: 'PFI' }) if (!didService?.serviceEndpoint) { throw new MissingServiceEndpointError(`${did} has no PFI service entry`) @@ -246,27 +283,75 @@ export class TbdexHttpClient { } /** - * generates a jws to be used to authenticate GET requests - * @param did - the requester's did - */ - static async generateRequestToken(did: PortableDid): Promise { - // TODO: include exp property. expires 1 minute from generation time - // TODO: include aud property. should be DID of receipient - // TODO: include nbf property. not before current time - // TODO: include iss property. should be requester's did - const payload = { timestamp: new Date().toISOString() } - const payloadBytes = Convert.object(payload).toUint8Array() - - return Crypto.sign({ did: did, payload: payloadBytes, detached: false }) + * Creates and signs a request token ([JWT](https://datatracker.ietf.org/doc/html/rfc7519)) + * that's included as the value of Authorization header for requests sent to a PFI API's + * endpoints that require authentication + * + * JWT payload with the following claims: + * * `aud` + * * `iss` + * * `exp` + * * `iat` + * * `jti`The JWT is then signed and returned. + * + * @returns the request token (JWT) + * @throws {RequestTokenError} If an error occurs during the token generation. + */ + static async generateRequestToken(params: GenerateRequestTokenParams): Promise { + const now = Date.now() + const exp = (now + ms('1m')) + + const jwtPayload: JwtPayload = { + aud : params.pfiDid, + iss : params.requesterDid.did, + exp : Math.floor(exp / 1000), + iat : Math.floor(now / 1000), + jti : typeid().getSuffix() + } + + try { + return await Jwt.sign({ signerDid: params.requesterDid, payload: jwtPayload }) + } catch(e) { + throw new RequestTokenSigningError({ message: e.message, cause: e }) + } } /** - * validates the bearer token and verifies the cryptographic signature - * @throws if the token is invalid - * @throws see {@link @tbdex/protocol#Crypto.verify} - */ - static async verify(requestToken: string): Promise { - return Crypto.verify({ signature: requestToken }) + * Validates and verifies the integrity of a request token ([JWT](https://datatracker.ietf.org/doc/html/rfc7519)) + * generated by {@link generateRequestToken}. Specifically: + * * verifies integrity of the JWT + * * ensures all required claims are present and valid. + * * ensures the token has not expired + * * ensures token audience matches the expected PFI DID. + * + * @returns the requester's DID as a string if the token is valid. + * @throws {RequestTokenError} If the token is invalid, expired, or has been tampered with + */ + static async verifyRequestToken(params: VerifyRequestTokenParams): Promise { + let result + + try { + result = await Jwt.verify({ jwt: params.requestToken }) + } catch(e) { + throw new RequestTokenVerificationError({ message: e.message, cause: e }) + } + + const { payload: requestTokenPayload } = result + + // check to ensure all expected claims are present + for (let claim of requestTokenRequiredClaims) { + if (!requestTokenPayload[claim]) { + throw new RequestTokenMissingClaimsError({ message: `Request token missing ${claim} claim. Expected ${requestTokenRequiredClaims}.` }) + } + } + + // TODO: decide if we want to ensure that the expiration date is not longer than 1 minute after the issuance date + + if (requestTokenPayload.aud !== params.pfiDid) { + throw new RequestTokenAudienceMismatchError({ message: 'Request token contains invalid audience. Expected aud property to be PFI DID.' }) + } + + return requestTokenPayload.iss } } diff --git a/packages/http-client/src/errors/index.ts b/packages/http-client/src/errors/index.ts index e66158ef..e3590c00 100644 --- a/packages/http-client/src/errors/index.ts +++ b/packages/http-client/src/errors/index.ts @@ -1,3 +1,4 @@ export { RequestError } from './request-error.js' export { ResponseError } from './response-error.js' -export { ValidationError, InvalidDidError, MissingServiceEndpointError } from './validation-error.js' \ No newline at end of file +export { ValidationError, InvalidDidError, MissingServiceEndpointError } from './validation-error.js' +export { RequestTokenError, RequestTokenSigningError, RequestTokenVerificationError, RequestTokenMissingClaimsError, RequestTokenAudienceMismatchError } from './request-token-error.js' \ No newline at end of file diff --git a/packages/http-client/src/errors/request-token-error.ts b/packages/http-client/src/errors/request-token-error.ts new file mode 100644 index 00000000..aa7df6c1 --- /dev/null +++ b/packages/http-client/src/errors/request-token-error.ts @@ -0,0 +1,68 @@ +// TODO: decide whether this should be a ValidationError + +export type RequestTokenErrorParams = { + message: string + cause?: unknown + } + +/** + * Error thrown for request token related things + * @beta + */ +export class RequestTokenError extends Error { + constructor(params: RequestTokenErrorParams) { + super(params.message, { cause: params.cause }) + + this.name = this.constructor.name + + Object.setPrototypeOf(this, RequestTokenError.prototype) + } +} + +/** + * Error thrown when a request token cannot be signed + * @beta + */ +export class RequestTokenSigningError extends RequestTokenError { + constructor(params: RequestTokenErrorParams) { + super(params) + + Object.setPrototypeOf(this, RequestTokenSigningError.prototype) + } +} + +/** + * Error thrown when a request token cannot be verified + * @beta + */ +export class RequestTokenVerificationError extends RequestTokenError { + constructor(params: RequestTokenErrorParams) { + super(params) + + Object.setPrototypeOf(this, RequestTokenVerificationError.prototype) + } +} + +/** + * Error thrown when a request token is missing required claims + * @beta + */ +export class RequestTokenMissingClaimsError extends RequestTokenError { + constructor(params: RequestTokenErrorParams) { + super(params) + + Object.setPrototypeOf(this, RequestTokenMissingClaimsError.prototype) + } +} + +/** + * Error thrown when a request token aud does not match the PFI did for which its intended + * @beta + */ +export class RequestTokenAudienceMismatchError extends RequestTokenError { + constructor(params: RequestTokenErrorParams) { + super(params) + + Object.setPrototypeOf(this, RequestTokenAudienceMismatchError.prototype) + } +} \ No newline at end of file diff --git a/packages/http-client/tests/client.spec.ts b/packages/http-client/tests/client.spec.ts index b72c536d..ad816a40 100644 --- a/packages/http-client/tests/client.spec.ts +++ b/packages/http-client/tests/client.spec.ts @@ -1,9 +1,20 @@ import { expect } from 'chai' -import { DidDhtMethod, DidKeyMethod } from '@web5/dids' -import { TbdexHttpClient } from '../src/client.js' -import { RequestError,ResponseError, InvalidDidError, MissingServiceEndpointError } from '../src/errors/index.js' -import { DevTools, Message, Rfq } from '@tbdex/protocol' +import { DidDhtMethod, DidKeyMethod, PortableDid } from '@web5/dids' +import { TbdexHttpClient, requestTokenRequiredClaims } from '../src/client.js' +import { + RequestError,ResponseError, + InvalidDidError, + MissingServiceEndpointError, + RequestTokenMissingClaimsError, + RequestTokenAudienceMismatchError, + RequestTokenVerificationError, + RequestTokenSigningError +} from '../src/errors/index.js' +import { DevTools, Message } from '@tbdex/protocol' import * as sinon from 'sinon' +import { JwtHeaderParams, JwtPayload, PrivateKeyJwk, Secp256k1 } from '@web5/crypto' +import { Convert } from '@web5/common' +import { Jwt } from '@web5/credentials' const dhtDid = await DidDhtMethod.create({ publish : true, @@ -20,11 +31,15 @@ sinon.stub(Message, 'verify').resolves('123') describe('client', () => { beforeEach(() => getPfiServiceEndpointStub.resolves('https://localhost:9000')) - describe('sendMessage', async () => { - let mockMessage: Rfq + describe('sendMessage', () => { - beforeEach(async () => { - mockMessage = await DevTools.createRfq({ sender: dhtDid, receiver: dhtDid }) + let mockRfq: Message<'rfq'> + beforeEach(async () => + { + mockRfq = await DevTools.createRfq({ + sender : await DevTools.createDid(), + receiver : dhtDid + }) }) it('throws RequestError if service endpoint url is garbage', async () => { @@ -32,7 +47,7 @@ describe('client', () => { fetchStub.rejects({message: 'Failed to fetch on URL'}) try { - await TbdexHttpClient.sendMessage({message: mockMessage}) + await TbdexHttpClient.sendMessage({message: mockRfq}) expect.fail() } catch(e) { expect(e.name).to.equal('RequestError') @@ -53,7 +68,7 @@ describe('client', () => { } as Response) try { - await TbdexHttpClient.sendMessage({message: mockMessage}) + await TbdexHttpClient.sendMessage({message: mockRfq}) expect.fail() } catch(e) { expect(e.name).to.equal('ResponseError') @@ -61,7 +76,7 @@ describe('client', () => { expect(e.statusCode).to.exist expect(e.details).to.exist expect(e.recipientDid).to.equal(dhtDid.did) - expect(e.url).to.equal(`https://localhost:9000/exchanges/${mockMessage.metadata.exchangeId}/rfq`) + expect(e.url).to.equal(`https://localhost:9000/exchanges/${mockRfq.metadata.exchangeId}/rfq`) } }) it('should not throw errors if all is well', async () => { @@ -71,14 +86,14 @@ describe('client', () => { } as Response) try { - await TbdexHttpClient.sendMessage({message: mockMessage}) + await TbdexHttpClient.sendMessage({message: mockRfq}) } catch (e) { expect.fail() } }) }) - describe('getOfferings', async () => { + describe('getOfferings', () => { it('throws RequestError if service endpoint url is garbage', async () => { getPfiServiceEndpointStub.resolves('garbage') fetchStub.rejects({message: 'Failed to fetch on URL'}) @@ -128,7 +143,7 @@ describe('client', () => { }) }) - describe('getExchange', async () => { + describe('getExchange', () => { it('throws RequestError if service endpoint url is garbage', async () => { getPfiServiceEndpointStub.resolves('garbage') fetchStub.rejects({message: 'Failed to fetch on URL'}) @@ -178,7 +193,7 @@ describe('client', () => { }) }) - describe('getExchanges', async () => { + describe('getExchanges', () => { it('throws RequestError if service endpoint url is garbage', async () => { getPfiServiceEndpointStub.resolves('garbage') fetchStub.rejects({message: 'Failed to fetch on URL'}) @@ -228,7 +243,7 @@ describe('client', () => { }) }) - describe('getPfiServiceEndpoint', async () => { + describe('getPfiServiceEndpoint', () => { before(() => { getPfiServiceEndpointStub.restore() fetchStub.restore() @@ -261,5 +276,104 @@ describe('client', () => { expect(serviceEndpoint).to.equal('https://localhost:9000') }) }) -}) + describe('generateRequestToken', () => { + let requesterPortableDid: PortableDid + before(async () => { + requesterPortableDid = await DidKeyMethod.create({ keyAlgorithm: 'secp256k1' }) + }) + it('throws a RequestTokenSigningError if requesterDid is not a valid PortableDid', async () => { + try { + await TbdexHttpClient.generateRequestToken({ requesterDid: {did: '', document: { id: '' }, keySet: {}}, pfiDid: '' }) + expect.fail() + } catch (e) { + expect(e).to.be.instanceOf(RequestTokenSigningError) + } + }) + it('includes all expected claims', async () => { + const requestToken = await TbdexHttpClient.generateRequestToken({ requesterDid: requesterPortableDid, pfiDid: 'did:key:1234' }) + const decodedToken = await Jwt.verify({ jwt: requestToken }) + expect(decodedToken.payload).to.have.all.keys(requestTokenRequiredClaims) + }) + // TODO: decide if we want to ensure that the expiration date is not longer than 1 minute after the issuance date + it('sets expiration seconds to 1 minute after the time at which it was issued', async () => { + const requestToken = await TbdexHttpClient.generateRequestToken({ requesterDid: requesterPortableDid, pfiDid: 'did:key:1234' }) + const decodedToken = await Jwt.verify({ jwt: requestToken }) + expect(decodedToken.payload.exp - decodedToken.payload.iat).to.equal(60) + }) + }) + + describe('verifyRequestToken', () => { + let pfiPortableDid: PortableDid + let header: JwtHeaderParams + let payload: JwtPayload + + async function createRequestTokenFromPayload(payload) { + const privateKeyJwk = pfiPortableDid.keySet.verificationMethodKeys![0].privateKeyJwk + const base64UrlEncodedHeader = Convert.object(header).toBase64Url() + const base64UrlEncodedPayload = Convert.object(payload).toBase64Url() + + const toSign = `${base64UrlEncodedHeader}.${base64UrlEncodedPayload}` + const toSignBytes = Convert.string(toSign).toUint8Array() + const signatureBytes = await Secp256k1.sign({ key: privateKeyJwk as PrivateKeyJwk, data: toSignBytes }) + const base64UrlEncodedSignature = Convert.uint8Array(signatureBytes).toBase64Url() + + return `${toSign}.${base64UrlEncodedSignature}` + } + + before(async () => { + pfiPortableDid = await DidKeyMethod.create({ keyAlgorithm: 'secp256k1' }) + header = { typ: 'JWT', alg: 'ES256K', kid: pfiPortableDid.document.verificationMethod![0].id } + }) + + beforeEach(() => { + payload = { + iat : Math.floor(Date.now() / 1000), + aud : pfiPortableDid.did, + iss : 'did:key:1234', + exp : Math.floor(Date.now() / 1000 + 60), + jti : 'randomnonce' + } + }) + + it('throws RequestTokenVerificationError if request token is not a valid jwt', async () => { + try { + await TbdexHttpClient.verifyRequestToken({ requestToken: '', pfiDid: pfiPortableDid.did }) + expect.fail() + } catch(e) { + expect(e).to.be.instanceof(RequestTokenVerificationError) + } + }) + it('throws RequestTokenMissingClaimsError if request token is missing any of the expected claims', async () => { + for (const claim of requestTokenRequiredClaims) { + const initialClaim = payload[claim] + try { + delete payload[claim] + const requestToken = await createRequestTokenFromPayload(payload) + await TbdexHttpClient.verifyRequestToken({ requestToken, pfiDid: pfiPortableDid.did }) + expect.fail() + } catch(e) { + expect(e).to.be.instanceof(RequestTokenMissingClaimsError) + expect(e.message).to.include(`Request token missing ${claim} claim.`) + } + payload[claim] = initialClaim + } + }) + it('throws RequestTokenAudienceMismatchError if aud claim does not match pfi did', async () => { + try { + payload.aud = 'squirtle' + const requestToken = await createRequestTokenFromPayload(payload) + await TbdexHttpClient.verifyRequestToken({ requestToken, pfiDid: pfiPortableDid.did }) + expect.fail() + } catch(e) { + expect(e).to.be.instanceof(RequestTokenAudienceMismatchError) + expect(e.message).to.include('Request token contains invalid audience') + } + }) + it('returns requester\'s DID if request token is valid', async () => { + const requestToken = await createRequestTokenFromPayload(payload) + const iss = await TbdexHttpClient.verifyRequestToken({ requestToken, pfiDid: pfiPortableDid.did }) + expect(iss).to.equal('did:key:1234') + }) + }) +}) diff --git a/packages/http-server/src/http-server.ts b/packages/http-server/src/http-server.ts index 3fd60cee..b7f0e126 100644 --- a/packages/http-server/src/http-server.ts +++ b/packages/http-server/src/http-server.ts @@ -40,12 +40,14 @@ type CallbackMap = { */ type NewHttpServerOptions = { offeringsApi?: OfferingsApi - exchangesApi?: ExchangesApi + exchangesApi?: ExchangesApi, + pfiDid?: string } const defaults: NewHttpServerOptions = { offeringsApi : fakeOfferingsApi, - exchangesApi : fakeExchangesApi + exchangesApi : fakeExchangesApi, + pfiDid : 'did:ex:pfi' } /** @@ -73,13 +75,19 @@ export class TbdexHttpServer { */ offeringsApi: OfferingsApi + /** + * PFI DID + */ + pfiDid: string + constructor(opts?: NewHttpServerOptions) { this.callbacks = {} opts = { ...defaults, ...opts } - const { offeringsApi, exchangesApi } = opts + const { offeringsApi, exchangesApi, pfiDid } = opts this.exchangesApi = exchangesApi this.offeringsApi = offeringsApi + this.pfiDid = pfiDid // initialize api here so that consumers can attach custom endpoints const api = express() @@ -115,7 +123,7 @@ export class TbdexHttpServer { * @param callback - to be called when the server is ready */ listen(port: number | string, callback?: () => void) { - const { offeringsApi, exchangesApi } = this + const { offeringsApi, exchangesApi, pfiDid } = this this.api.post('/exchanges/:exchangeId/rfq', submitRfq({ callback: this.callbacks['rfq'], offeringsApi, exchangesApi, @@ -130,7 +138,7 @@ export class TbdexHttpServer { })) this.api.get('/exchanges', getExchanges({ - callback: this.callbacks['exchanges'], exchangesApi + callback: this.callbacks['exchanges'], exchangesApi, pfiDid })) this.api.get('/offerings', getOfferings({ diff --git a/packages/http-server/src/request-handlers/get-exchanges.ts b/packages/http-server/src/request-handlers/get-exchanges.ts index 71f37f54..edc22088 100644 --- a/packages/http-server/src/request-handlers/get-exchanges.ts +++ b/packages/http-server/src/request-handlers/get-exchanges.ts @@ -4,11 +4,12 @@ import { TbdexHttpClient } from '@tbdex/http-client' type GetExchangesOpts = { callback: GetCallback<'exchanges'> - exchangesApi: ExchangesApi + exchangesApi: ExchangesApi, + pfiDid: string } export function getExchanges(opts: GetExchangesOpts): RequestHandler { - const { callback, exchangesApi } = opts + const { callback, exchangesApi, pfiDid } = opts return async function (request, response) { const authzHeader = request.headers['authorization'] if (!authzHeader) { @@ -21,9 +22,9 @@ export function getExchanges(opts: GetExchangesOpts): RequestHandler { return response.status(401).json({ errors: [{ detail: 'Malformed Authorization header. Expected: Bearer TOKEN_HERE' }] }) } - let requesterDid + let requesterDid: string try { - requesterDid = await TbdexHttpClient.verify(requestToken) + requesterDid = await TbdexHttpClient.verifyRequestToken({ requestToken: requestToken, pfiDid }) } catch(e) { return response.status(401).json({ errors: [{ detail: `Malformed Authorization header: ${e}` }] }) } diff --git a/packages/http-server/tests/get-exchanges.spec.ts b/packages/http-server/tests/get-exchanges.spec.ts index c0c7b0f7..fa2e1a6f 100644 --- a/packages/http-server/tests/get-exchanges.spec.ts +++ b/packages/http-server/tests/get-exchanges.spec.ts @@ -62,10 +62,9 @@ describe('GET /exchanges', () => { } } - const testApi = new TbdexHttpServer({ exchangesApi }) + const testApi = new TbdexHttpServer({ exchangesApi, pfiDid: 'did:ex:pfi' }) const server = testApi.listen(8001) - - const requestToken = await TbdexHttpClient.generateRequestToken(alice) + const requestToken = await TbdexHttpClient.generateRequestToken({ requesterDid: alice, pfiDid: 'did:ex:pfi' }) const resp = await fetch('http://localhost:8001/exchanges', { headers: { 'Authorization': `Bearer ${requestToken}` diff --git a/tbdex b/tbdex index c19cd468..e298dc21 160000 --- a/tbdex +++ b/tbdex @@ -1 +1 @@ -Subproject commit c19cd4680209e0d817a1f9299787d3ac0dcdc25a +Subproject commit e298dc21340964d26d336128bd7c55c4079f5824 From 53a8b5d42c4aa05ad96794fc1e7bef414d63cf5b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 26 Jan 2024 15:11:54 -0500 Subject: [PATCH 16/16] Version Packages (#155) Co-authored-by: github-actions[bot] --- .changeset/famous-llamas-sit.md | 6 ------ .changeset/real-schools-enjoy.md | 6 ------ .changeset/soft-ravens-march.md | 6 ------ packages/http-client/CHANGELOG.md | 14 ++++++++++++++ packages/http-client/package.json | 2 +- packages/http-server/CHANGELOG.md | 14 ++++++++++++++ packages/http-server/package.json | 2 +- packages/protocol/CHANGELOG.md | 10 ++++++++++ packages/protocol/package.json | 2 +- 9 files changed, 41 insertions(+), 21 deletions(-) delete mode 100644 .changeset/famous-llamas-sit.md delete mode 100644 .changeset/real-schools-enjoy.md delete mode 100644 .changeset/soft-ravens-march.md diff --git a/.changeset/famous-llamas-sit.md b/.changeset/famous-llamas-sit.md deleted file mode 100644 index a0f7c1c0..00000000 --- a/.changeset/famous-llamas-sit.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@tbdex/http-client": patch -"@tbdex/protocol": patch ---- - -Replaces karma testing library with web-test-runner diff --git a/.changeset/real-schools-enjoy.md b/.changeset/real-schools-enjoy.md deleted file mode 100644 index d953487d..00000000 --- a/.changeset/real-schools-enjoy.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@tbdex/http-client": minor -"@tbdex/protocol": minor ---- - -Upgrading web5 versions in protocol and http-client diff --git a/.changeset/soft-ravens-march.md b/.changeset/soft-ravens-march.md deleted file mode 100644 index 1618c7ed..00000000 --- a/.changeset/soft-ravens-march.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@tbdex/http-client": minor -"@tbdex/http-server": minor ---- - -JWT creation and verification diff --git a/packages/http-client/CHANGELOG.md b/packages/http-client/CHANGELOG.md index 0aa9be04..daff5bda 100644 --- a/packages/http-client/CHANGELOG.md +++ b/packages/http-client/CHANGELOG.md @@ -1,5 +1,19 @@ # @tbdex/http-client +## 0.24.0 + +### Minor Changes + +- c471b3d: Upgrading web5 versions in protocol and http-client +- 01fc636: JWT creation and verification + +### Patch Changes + +- 550fe94: Replaces karma testing library with web-test-runner +- Updated dependencies [550fe94] +- Updated dependencies [c471b3d] + - @tbdex/protocol@0.24.0 + ## 0.23.0 ### Minor Changes diff --git a/packages/http-client/package.json b/packages/http-client/package.json index 6b508e28..a6489f78 100644 --- a/packages/http-client/package.json +++ b/packages/http-client/package.json @@ -1,6 +1,6 @@ { "name": "@tbdex/http-client", - "version": "0.23.0", + "version": "0.24.0", "type": "module", "description": "Http client that can be used to send tbdex messages", "license": "Apache-2.0", diff --git a/packages/http-server/CHANGELOG.md b/packages/http-server/CHANGELOG.md index 1d3d1649..5bc0435b 100644 --- a/packages/http-server/CHANGELOG.md +++ b/packages/http-server/CHANGELOG.md @@ -1,5 +1,19 @@ # @tbdex/http-server +## 0.24.0 + +### Minor Changes + +- 01fc636: JWT creation and verification + +### Patch Changes + +- Updated dependencies [550fe94] +- Updated dependencies [c471b3d] +- Updated dependencies [01fc636] + - @tbdex/http-client@0.24.0 + - @tbdex/protocol@0.24.0 + ## 0.23.0 ### Patch Changes diff --git a/packages/http-server/package.json b/packages/http-server/package.json index 608f3566..a8ce732b 100644 --- a/packages/http-server/package.json +++ b/packages/http-server/package.json @@ -9,7 +9,7 @@ }, "license": "Apache-2.0", "type": "module", - "version": "0.23.0", + "version": "0.24.0", "module": "./dist/main.js", "types": "./dist/types/main.d.ts", "files": [ diff --git a/packages/protocol/CHANGELOG.md b/packages/protocol/CHANGELOG.md index 70b09334..d39321ba 100644 --- a/packages/protocol/CHANGELOG.md +++ b/packages/protocol/CHANGELOG.md @@ -1,5 +1,15 @@ # @tbdex/protocol +## 0.24.0 + +### Minor Changes + +- c471b3d: Upgrading web5 versions in protocol and http-client + +### Patch Changes + +- 550fe94: Replaces karma testing library with web-test-runner + ## 0.23.0 ### Patch Changes diff --git a/packages/protocol/package.json b/packages/protocol/package.json index b98fc7f9..4f02acff 100644 --- a/packages/protocol/package.json +++ b/packages/protocol/package.json @@ -1,6 +1,6 @@ { "name": "@tbdex/protocol", - "version": "0.23.0", + "version": "0.24.0", "type": "module", "description": "Library that includes type definitions for tbdex messages", "license": "Apache-2.0",