diff --git a/package.json b/package.json index 43cf1df4a..35e5447ac 100644 --- a/package.json +++ b/package.json @@ -16,11 +16,11 @@ "docs": "pnpm run build && typedoc --out docs" }, "devDependencies": { - "lint-staged": "^13.0.4", - "prettier": "2.8.0", + "lint-staged": "^13.1.0", + "prettier": "2.8.1", "simple-git-hooks": "^2.8.1", - "typescript": "4.9.3", - "wrangler": "^2.5.0" + "typescript": "4.9.4", + "wrangler": "^2.6.2" }, "simple-git-hooks": { "pre-commit": "npx lint-staged" diff --git a/packages/access-api/package.json b/packages/access-api/package.json index 08a3d9def..0931a38bb 100644 --- a/packages/access-api/package.json +++ b/packages/access-api/package.json @@ -41,12 +41,12 @@ "@types/assert": "^1.5.6", "@types/git-rev-sync": "^2.0.0", "@types/mocha": "^10.0.1", - "@types/node": "^18.11.9", + "@types/node": "^18.11.12", "@types/qrcode": "^1.5.0", - "better-sqlite3": "8.0.0", + "better-sqlite3": "8.0.1", "buffer": "^6.0.3", "dotenv": "^16.0.3", - "esbuild": "^0.15.16", + "esbuild": "^0.16.3", "git-rev-sync": "^3.0.2", "hd-scripts": "^3.0.2", "is-subset": "^0.1.1", @@ -56,8 +56,8 @@ "process": "^0.11.10", "readable-stream": "^4.2.0", "sade": "^1.8.1", - "typescript": "4.9.3", - "wrangler": "^2.5.0" + "typescript": "4.9.4", + "wrangler": "^2.6.2" }, "eslintConfig": { "extends": [ diff --git a/packages/access-api/src/kvs/spaces.js b/packages/access-api/src/kvs/spaces.js index e99c6c4c0..31ed3e8bf 100644 --- a/packages/access-api/src/kvs/spaces.js +++ b/packages/access-api/src/kvs/spaces.js @@ -59,9 +59,9 @@ export class Spaces { email: capability.nb.identity.replace('mailto:', ''), agent: invocation.issuer.did(), metadata: JSON.stringify(invocation.facts[0]), - invocation: await delegationToString(invocation), + invocation: delegationToString(invocation), // eslint-disable-next-line unicorn/no-null - delegation: !delegation ? null : await delegationToString(delegation), + delegation: !delegation ? null : delegationToString(delegation), }, }) return { data: result } @@ -136,7 +136,7 @@ export class Spaces { metadata: JSON.parse(r.metadata), delegation: !r.delegation ? undefined - : await stringToDelegation( + : stringToDelegation( /** @type {import('@web3-storage/access/types').EncodedDelegation<[import('@web3-storage/access/types').Top]>} */ ( r.delegation ) diff --git a/packages/access-api/src/kvs/validations.js b/packages/access-api/src/kvs/validations.js index 284255a15..8783a85cd 100644 --- a/packages/access-api/src/kvs/validations.js +++ b/packages/access-api/src/kvs/validations.js @@ -19,7 +19,7 @@ export class Validations { async put(ucan) { const delegation = /** @type {import('@ucanto/interface').Delegation} */ ( - await stringToDelegation(ucan) + stringToDelegation(ucan) ) await this.kv.put(delegation.audience.did(), ucan, { diff --git a/packages/access-api/src/service/index.js b/packages/access-api/src/service/index.js index 47d374cce..8d5642be9 100644 --- a/packages/access-api/src/service/index.js +++ b/packages/access-api/src/service/index.js @@ -58,7 +58,7 @@ export function service(ctx) { facts: [metadata], }) - results.push(await delegationToString(del)) + results.push(delegationToString(del)) } } @@ -108,7 +108,7 @@ export function service(ctx) { }) .delegate() - const encoded = await delegationToString(inv) + const encoded = delegationToString(inv) const url = `${ctx.url.protocol}//${ctx.url.host}/validate-email?ucan=${encoded}&mode=recover` // For testing diff --git a/packages/access-api/src/service/voucher-claim.js b/packages/access-api/src/service/voucher-claim.js index 1937a8971..28e499aef 100644 --- a/packages/access-api/src/service/voucher-claim.js +++ b/packages/access-api/src/service/voucher-claim.js @@ -34,7 +34,7 @@ export function voucherClaimProvider(ctx) { }) .delegate() - const encoded = await delegationToString(inv) + const encoded = delegationToString(inv) // For testing if (ctx.config.ENV === 'test') { return encoded diff --git a/packages/access-api/test/helpers/utils.js b/packages/access-api/test/helpers/utils.js index 0ec807bee..1c2f62054 100644 --- a/packages/access-api/test/helpers/utils.js +++ b/packages/access-api/test/helpers/utils.js @@ -51,7 +51,7 @@ export async function createSpace(issuer, service, conn, email) { throw new Error('failed to create space') } - const delegation = await stringToDelegation(claim) + const delegation = stringToDelegation(claim) const serviceDelegation = await Voucher.top.delegate({ issuer: space, audience: service, diff --git a/packages/access-api/test/space-recover.test.js b/packages/access-api/test/space-recover.test.js index 99b80315b..1c98bbd42 100644 --- a/packages/access-api/test/space-recover.test.js +++ b/packages/access-api/test/space-recover.test.js @@ -63,7 +63,7 @@ describe('space-recover', function () { url.searchParams.get('ucan') ) - const del = await stringToDelegation(encoded) + const del = stringToDelegation(encoded) assert.deepEqual(del.audience.did(), issuer.did()) assert.deepEqual(del.issuer.did(), service.did()) @@ -81,7 +81,7 @@ describe('space-recover', function () { ) assert.ok(recoverEncoded) - const recover = await stringToDelegation(recoverEncoded) + const recover = stringToDelegation(recoverEncoded) assert.deepEqual(recover.audience.did(), issuer.did()) assert.deepEqual(recover.issuer.did(), service.did()) assert.deepEqual(recover.capabilities[0].can, 'space/recover') @@ -105,7 +105,7 @@ describe('space-recover', function () { ) assert.ok(encoded) - const recover = await stringToDelegation(encoded) + const recover = stringToDelegation(encoded) assert.deepEqual(recover.audience.did(), issuer.did()) assert.deepEqual(recover.issuer.did(), service.did()) assert.deepEqual(recover.capabilities[0].can, 'space/recover') @@ -151,7 +151,7 @@ describe('space-recover', function () { url.searchParams.get('ucan') ) - const del = await stringToDelegation(encoded) + const del = stringToDelegation(encoded) assert.deepEqual(del.audience.did(), issuer.did()) assert.deepEqual(del.issuer.did(), service.did()) @@ -173,7 +173,7 @@ describe('space-recover', function () { return assert.fail('failed to recover') } - const spaceDelegation = await stringToDelegation(inv2[0]) + const spaceDelegation = stringToDelegation(inv2[0]) assert.deepEqual(spaceDelegation.audience.did(), issuer.did()) assert.deepEqual(spaceDelegation.capabilities[0].can, '*') assert.deepEqual(spaceDelegation.capabilities[0].with, space.did()) diff --git a/packages/access-api/test/voucher-claim.test.js b/packages/access-api/test/voucher-claim.test.js index 54687cece..ea7321d64 100644 --- a/packages/access-api/test/voucher-claim.test.js +++ b/packages/access-api/test/voucher-claim.test.js @@ -38,7 +38,7 @@ describe('ucan', function () { return t.fail(inv.message) } - const delegation = await stringToDelegation(inv) + const delegation = stringToDelegation(inv) t.deepEqual(delegation.issuer.did(), service.did()) t.deepEqual(delegation.audience.did(), issuer.did()) diff --git a/packages/access-api/test/voucher-redeem.test.js b/packages/access-api/test/voucher-redeem.test.js index 586b73f6a..bb16ecd1e 100644 --- a/packages/access-api/test/voucher-redeem.test.js +++ b/packages/access-api/test/voucher-redeem.test.js @@ -53,7 +53,7 @@ describe('ucan', function () { return t.fail(claim.message) } - const delegation = await stringToDelegation(claim) + const delegation = stringToDelegation(claim) const redeem = await Voucher.redeem .invoke({ @@ -174,7 +174,7 @@ describe('ucan', function () { return t.fail(claim.message) } - const delegation = await stringToDelegation(claim) + const delegation = stringToDelegation(claim) const redeemInv = Voucher.redeem.invoke({ issuer, diff --git a/packages/access-client/package.json b/packages/access-client/package.json index 26d76f867..93bcab1cd 100644 --- a/packages/access-client/package.json +++ b/packages/access-client/package.json @@ -59,6 +59,7 @@ ], "dependencies": { "@ipld/car": "^5.0.1", + "@ipld/dag-cbor": "^8.0.0", "@ipld/dag-ucan": "^3.0.1", "@ucanto/client": "^4.0.2", "@ucanto/core": "^4.0.2", @@ -78,6 +79,7 @@ "p-wait-for": "^5.0.0", "type-fest": "^3.3.0", "uint8arrays": "^4.0.2", + "varint": "^6.0.0", "ws": "^8.11.0", "zod": "^3.19.1" }, @@ -85,7 +87,8 @@ "@types/assert": "^1.5.6", "@types/inquirer": "^9.0.3", "@types/mocha": "^10.0.1", - "@types/node": "^18.11.10", + "@types/node": "^18.11.12", + "@types/varint": "^6.0.1", "@types/ws": "^8.5.3", "@ucanto/server": "^4.0.2", "assert": "^2.0.0", @@ -96,7 +99,7 @@ "p-queue": "^7.3.0", "playwright-test": "^8.1.1", "sade": "^1.8.1", - "typescript": "4.9.3", + "typescript": "4.9.4", "watch": "^1.0.2" }, "eslintConfig": { diff --git a/packages/access-client/src/agent.js b/packages/access-client/src/agent.js index c2b7679a1..1e3036518 100644 --- a/packages/access-client/src/agent.js +++ b/packages/access-client/src/agent.js @@ -318,7 +318,7 @@ export class Agent { const dels = [] for (const del of recoverInv) { - dels.push(await stringToDelegation(del)) + dels.push(stringToDelegation(del)) } return dels @@ -483,7 +483,7 @@ export class Agent { } if (msg.type === 'delegation') { - const delegation = await stringToDelegation(msg.delegation) + const delegation = stringToDelegation(msg.delegation) ws.close() return delegation } diff --git a/packages/access-client/src/awake/peer.js b/packages/access-client/src/awake/peer.js index fa050699f..c96ff7016 100644 --- a/packages/access-client/src/awake/peer.js +++ b/packages/access-client/src/awake/peer.js @@ -4,7 +4,7 @@ import * as Signature from '@ipld/dag-ucan/signature' import { Verifier } from '@ucanto/principal/ed25519' import { sha256 } from 'multiformats/hashes/sha2' import * as u8 from 'uint8arrays' -import { decodeDelegations, encodeDelegations } from '../encoding.js' +import { stringToDelegations, delegationsToString } from '../encoding.js' import * as Messages from './messages.js' export class Peer { @@ -139,7 +139,7 @@ export class Peer { /** @type {import('./types').LinkResponse} */ const capsRsp = await this.channel.awaitMsg(this.nextdid) - const delegations = await decodeDelegations(capsRsp.msg.delegation) + const delegations = stringToDelegations(capsRsp.msg.delegation) await this.channel.sendFin(this.nextdid) @@ -169,7 +169,7 @@ export class Peer { name: this.agent.did(), type: 'device', }, - delegation: await encodeDelegations([d]), + delegation: delegationsToString([d]), }) } diff --git a/packages/access-client/src/cli/index.js b/packages/access-client/src/cli/index.js index 0c87f5af9..8b1b5d9fc 100755 --- a/packages/access-client/src/cli/index.js +++ b/packages/access-client/src/cli/index.js @@ -114,7 +114,7 @@ prog abilities, }) - const delString = await delegationToString(delegation) + const delString = delegationToString(delegation) if (opts.file) { fs.writeFileSync(path.join(process.cwd(), opts.file), delString, { @@ -143,7 +143,7 @@ prog encoding: 'utf8', }) - await agent.importSpaceFromDelegation(await stringToDelegation(del)) + await agent.importSpaceFromDelegation(stringToDelegation(del)) } else { console.error(`Run "${NAME} setup" first`) } diff --git a/packages/access-client/src/encoding.js b/packages/access-client/src/encoding.js index eeb073ad0..0ee6592f3 100644 --- a/packages/access-client/src/encoding.js +++ b/packages/access-client/src/encoding.js @@ -13,89 +13,77 @@ * @module */ /* eslint-disable unicorn/prefer-spread */ -import { CarReader } from '@ipld/car/reader' -import { CarWriter } from '@ipld/car/writer' +import { CarReader } from './utils/car-reader-sync.js' +import * as CarBufferWriter from '@ipld/car/buffer-writer' import { Delegation } from '@ucanto/core/delegation' import * as u8 from 'uint8arrays' // eslint-disable-next-line no-unused-vars import * as Types from '@ucanto/interface' /** - * @param {AsyncIterable} iterable - */ -function collector(iterable) { - const chunks = [] - const cfn = (async () => { - for await (const chunk of iterable) { - chunks.push(chunk) - } - return u8.concat(chunks) - })() - return cfn -} - -/** + * Encode delegations as bytes + * * @param {Types.Delegation[]} delegations - * @param {import('uint8arrays/to-string').SupportedEncodings} encoding */ -export async function encodeDelegations(delegations, encoding = 'base64url') { - if (delegations.length === 0) { - return '' +export function delegationsToBytes(delegations) { + if (!Array.isArray(delegations) || delegations.length === 0) { + throw new Error('Delegations required to be an non empty array.') } - const roots = delegations.map((d) => d.root.cid) - - // @ts-ignore - const { writer, out } = CarWriter.create(roots) - const collection = collector(out) + const roots = delegations.map( + (d) => /** @type {CarBufferWriter.CID} */ (d.root.cid) + ) + const cids = new Set() + /** @type {CarBufferWriter.Block[]} */ + const blocks = [] + let byteLength = 0 for (const delegation of delegations) { for (const block of delegation.export()) { - // @ts-ignore - await writer.put(block) + const cid = block.cid.toV1().toString() + if (!cids.has(cid)) { + byteLength += CarBufferWriter.blockLength( + /** @type {CarBufferWriter.Block} */ (block) + ) + blocks.push(/** @type {CarBufferWriter.Block} */ (block)) + cids.add(cid) + } } } - await writer.close() - - const bytes = await collection - - return u8.toString(bytes, encoding) -} + const headerLength = CarBufferWriter.estimateHeaderLength(roots.length) + const writer = CarBufferWriter.createWriter( + new ArrayBuffer(headerLength + byteLength), + { roots } + ) + for (const block of blocks) { + writer.write(block) + } -/** - * Encode one {@link Types.Delegation Delegation} into a string - * - * @param {Types.Delegation} delegation - * @param {import('uint8arrays/to-string').SupportedEncodings} [encoding] - */ -export function delegationToString(delegation, encoding) { - return encodeDelegations([delegation], encoding) + return writer.close() } /** - * Decode string into {@link Types.Delegation Delegation} + * Decode bytes into Delegations * * @template {Types.Capabilities} [T=Types.Capabilities] - * @param {import('./types').EncodedDelegation} raw - * @param {import('uint8arrays/to-string').SupportedEncodings} [encoding] + * @param {import('./types').BytesDelegation} bytes */ -export async function decodeDelegations(raw, encoding = 'base64url') { - if (!raw) { - return [] +export function bytesToDelegations(bytes) { + if (!(bytes instanceof Uint8Array) || bytes.length === 0) { + throw new TypeError('Input should be a non-empty Uint8Array.') } - const bytes = u8.fromString(raw, encoding) - const reader = await CarReader.fromBytes(bytes) - const roots = await reader.getRoots() + const reader = CarReader.fromBytes(bytes) + const roots = reader.getRoots() /** @type {Types.Delegation[]} */ const delegations = [] for (const root of roots) { - const rootBlock = await reader.get(root) + const rootBlock = reader.get(root) if (rootBlock) { const blocks = new Map() - for (const block of reader._blocks) { + for (const block of reader.blocks()) { if (block.cid.toString() !== root.toString()) blocks.set(block.cid.toString(), block) } @@ -110,6 +98,39 @@ export async function decodeDelegations(raw, encoding = 'base64url') { return delegations } +/** + * @param {Types.Delegation[]} delegations + * @param {import('uint8arrays/to-string').SupportedEncodings} encoding + */ +export function delegationsToString(delegations, encoding = 'base64url') { + const bytes = delegationsToBytes(delegations) + + return u8.toString(bytes, encoding) +} + +/** + * Encode one {@link Types.Delegation Delegation} into a string + * + * @param {Types.Delegation} delegation + * @param {import('uint8arrays/to-string').SupportedEncodings} [encoding] + */ +export function delegationToString(delegation, encoding) { + return delegationsToString([delegation], encoding) +} + +/** + * Decode string into {@link Types.Delegation Delegation} + * + * @template {Types.Capabilities} [T=Types.Capabilities] + * @param {import('./types').EncodedDelegation} raw + * @param {import('uint8arrays/to-string').SupportedEncodings} [encoding] + */ +export function stringToDelegations(raw, encoding = 'base64url') { + const bytes = u8.fromString(raw, encoding) + + return bytesToDelegations(bytes) +} + /** * Decode string into a {@link Types.Delegation Delegation} * @@ -117,8 +138,8 @@ export async function decodeDelegations(raw, encoding = 'base64url') { * @param {import('./types').EncodedDelegation} raw * @param {import('uint8arrays/to-string').SupportedEncodings} [encoding] */ -export async function stringToDelegation(raw, encoding) { - const delegations = await decodeDelegations(raw, encoding) +export function stringToDelegation(raw, encoding) { + const delegations = stringToDelegations(raw, encoding) return /** @type {Types.Delegation} */ (delegations[0]) } diff --git a/packages/access-client/src/types.ts b/packages/access-client/src/types.ts index 15e77ea4b..a3169ebe5 100644 --- a/packages/access-client/src/types.ts +++ b/packages/access-client/src/types.ts @@ -263,3 +263,6 @@ export interface ClientCodec extends RequestEncoder, ResponseDecoder {} export type EncodedDelegation = string & Phantom + +export type BytesDelegation = + Uint8Array & Phantom diff --git a/packages/access-client/src/utils/car-header-validator.js b/packages/access-client/src/utils/car-header-validator.js new file mode 100644 index 000000000..8558cdd5d --- /dev/null +++ b/packages/access-client/src/utils/car-header-validator.js @@ -0,0 +1,97 @@ +/* eslint-disable jsdoc/check-alignment */ +/* eslint-disable jsdoc/check-indentation */ + +/** Auto-generated with ipld-schema-validator@0.0.0-dev at Thu Jun 17 2021 from IPLD Schema: + * + * type CarHeader struct { + * version Int + * roots optional [&Any] + * # roots is _not_ optional for CarV1 but we defer that check within code to + * # gracefully handle the >V1 case where it's just {version:X} + * } + * + */ + +const Kinds = { + Null: /** + * @param {any} obj + * @returns {boolean} + */ (/** @type {any} */ obj) => obj === null, + Int: /** + * @param {any} obj + * @returns {boolean} + */ (/** @type {any} */ obj) => Number.isInteger(obj), + Float: /** + * @param {any} obj + * @returns {boolean} + */ (/** @type {any} */ obj) => + typeof obj === 'number' && Number.isFinite(obj), + String: /** + * @param {any} obj + * @returns {boolean} + */ (/** @type {any} */ obj) => typeof obj === 'string', + Bool: /** + * @param {any} obj + * @returns {boolean} + */ (/** @type {any} */ obj) => typeof obj === 'boolean', + Bytes: /** + * @param {any} obj + * @returns {boolean} + */ (/** @type {any} */ obj) => obj instanceof Uint8Array, + Link: /** + * @param {any} obj + * @returns {boolean} + */ (/** @type {any} */ obj) => + !Kinds.Null(obj) && typeof obj === 'object' && obj.asCID === obj, + List: /** + * @param {any} obj + * @returns {boolean} + */ (/** @type {any} */ obj) => Array.isArray(obj), + Map: /** + * @param {any} obj + * @returns {boolean} + */ (/** @type {any} */ obj) => + !Kinds.Null(obj) && + typeof obj === 'object' && + obj.asCID !== obj && + !Kinds.List(obj) && + !Kinds.Bytes(obj), +} +/** @type {{ [k in string]: (obj:any)=>boolean}} */ +const Types = { + Int: Kinds.Int, + 'CarHeader > version': /** + * @param {any} obj + * @returns {boolean} + */ (/** @type {any} */ obj) => Types.Int(obj), + 'CarHeader > roots (anon) > valueType (anon)': Kinds.Link, + 'CarHeader > roots (anon)': /** + * @param {any} obj + * @returns {boolean} + */ (/** @type {any} */ obj) => + Kinds.List(obj) && + Array.prototype.every.call( + obj, + Types['CarHeader > roots (anon) > valueType (anon)'] + ), + 'CarHeader > roots': /** + * @param {any} obj + * @returns {boolean} + */ (/** @type {any} */ obj) => Types['CarHeader > roots (anon)'](obj), + CarHeader: /** + * @param {any} obj + * @returns {boolean} + */ (/** @type {any} */ obj) => { + const keys = obj && Object.keys(obj) + return ( + Kinds.Map(obj) && + ['version'].every((k) => keys.includes(k)) && + Object.entries(obj).every( + ([name, value]) => + Types['CarHeader > ' + name] && Types['CarHeader > ' + name](value) + ) + ) + }, +} + +export const CarHeader = Types.CarHeader diff --git a/packages/access-client/src/utils/car-reader-sync.js b/packages/access-client/src/utils/car-reader-sync.js new file mode 100644 index 000000000..bb28f964a --- /dev/null +++ b/packages/access-client/src/utils/car-reader-sync.js @@ -0,0 +1,503 @@ +import varint from 'varint' +import { decode as decodeDagCbor } from '@ipld/dag-cbor' +import { CID } from 'multiformats/cid' +import * as Digest from 'multiformats/hashes/digest' +import { CarHeader as headerValidator } from './car-header-validator.js' + +/** + * @typedef {import('@ipld/car/api').Block} Block + * @typedef {import('./car-types').CarReader} CarReaderIface + * @typedef {import('@ipld/car/coding').BytesReader} BytesReader + * @typedef {import('@ipld/car/coding').CarHeader} CarHeader + * @typedef {import('@ipld/car/coding').CarV2Header} CarV2Header + */ + +const CIDV0_BYTES = { + SHA2_256: 0x12, + LENGTH: 0x20, + DAG_PB: 0x70, +} + +const V2_HEADER_LENGTH = + /* characteristics */ 16 /* v1 offset */ + + 8 /* v1 size */ + + 8 /* index offset */ + + 8 + +/** + * Creates a `BytesReader` from a `Uint8Array`. + * + * @name decoder.bytesReader(bytes) + * @param {Uint8Array} bytes + * @returns {import('./car-types').BytesReader} + */ +export function bytesReader(bytes) { + let pos = 0 + + /** @type {import('./car-types').BytesReader} */ + return { + upTo(length) { + return bytes.subarray(pos, pos + Math.min(length, bytes.length - pos)) + /* c8 ignore next 2 */ + // Node.js 12 c8 bug + }, + + exactly(length) { + if (length > bytes.length - pos) { + throw new Error('Unexpected end of data') + } + return bytes.subarray(pos, pos + length) + /* c8 ignore next 2 */ + // Node.js 12 c8 bug + }, + + seek(length) { + pos += length + }, + + get pos() { + return pos + }, + } +} + +/** + * @param {import('./car-types').BytesReader} reader + * @returns {number} + */ +function readVarint(reader) { + const bytes = reader.upTo(8) + if (bytes.length === 0) { + throw new Error('Unexpected end of data') + } + const i = varint.decode(bytes) + reader.seek(/** @type {number} */ (varint.decode.bytes)) + return i + /* c8 ignore next 2 */ + // Node.js 12 c8 bug +} + +/** + * @param {import('./car-types').BytesReader} reader + * @returns {Uint8Array} + */ +function readMultihash(reader) { + // | code | length | .... | + // where both code and length are varints, so we have to decode + // them first before we can know total length + + const bytes = reader.upTo(8) + varint.decode(bytes) // code + const codeLength = /** @type {number} */ (varint.decode.bytes) + const length = varint.decode(bytes.subarray(varint.decode.bytes)) + const lengthLength = /** @type {number} */ (varint.decode.bytes) + const mhLength = codeLength + lengthLength + length + const multihash = reader.exactly(mhLength) + reader.seek(mhLength) + return multihash + /* c8 ignore next 2 */ + // Node.js 12 c8 bug +} + +/** + * @param {import('./car-types').BytesReader} reader + * @returns {import('multiformats/cid').CID} + */ +function readCid(reader) { + const first = reader.exactly(2) + if (first[0] === CIDV0_BYTES.SHA2_256 && first[1] === CIDV0_BYTES.LENGTH) { + // cidv0 32-byte sha2-256 + const bytes = reader.exactly(34) + reader.seek(34) + const multihash = Digest.decode(bytes) + return CID.create(0, CIDV0_BYTES.DAG_PB, multihash) + } + + const version = readVarint(reader) + if (version !== 1) { + throw new Error(`Unexpected CID version (${version})`) + } + const codec = readVarint(reader) + const bytes = readMultihash(reader) + const multihash = Digest.decode(bytes) + return CID.create(version, codec, multihash) + /* c8 ignore next 2 */ + // Node.js 12 c8 bug +} + +/** + * Reads the leading data of an individual block from CAR data from a + * `BytesReader`. Returns a `BlockHeader` object which contains + * `{ cid, length, blockLength }` which can be used to either index the block + * or read the block binary data. + * + * @name async decoder.readBlockHead(reader) + * @param {import('./car-types').BytesReader} reader + * @returns {import('@ipld/car/api').BlockHeader} + */ +export function readBlockHead(reader) { + // length includes a CID + Binary, where CID has a variable length + // we have to deal with + const start = reader.pos + let length = readVarint(reader) + if (length === 0) { + throw new Error('Invalid CAR section (zero length)') + } + length += reader.pos - start + const cid = readCid(reader) + const blockLength = length - Number(reader.pos - start) // subtract CID length + + return { cid, length, blockLength } + /* c8 ignore next 2 */ + // Node.js 12 c8 bug +} + +/** + * @param {import('./car-types').BytesReader} reader + * @returns {import('@ipld/car/api').Block} + */ +function readBlock(reader) { + const { cid, blockLength } = readBlockHead(reader) + const bytes = reader.exactly(blockLength) + reader.seek(blockLength) + return { bytes, cid } + /* c8 ignore next 2 */ + // Node.js 12 c8 bug +} + +/** + * @param {import('./car-types').BytesReader} reader + * @returns {import('@ipld/car/coding').CarV2FixedHeader} + */ +function readV2Header(reader) { + /** @type {Uint8Array} */ + const bytes = reader.exactly(V2_HEADER_LENGTH) + const dv = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength) + let offset = 0 + const header = { + version: 2, + /** @type {[bigint, bigint]} */ + characteristics: [ + dv.getBigUint64(offset, true), + dv.getBigUint64((offset += 8), true), + ], + dataOffset: Number(dv.getBigUint64((offset += 8), true)), + dataSize: Number(dv.getBigUint64((offset += 8), true)), + indexOffset: Number(dv.getBigUint64((offset += 8), true)), + } + reader.seek(V2_HEADER_LENGTH) + return header + /* c8 ignore next 2 */ + // Node.js 12 c8 bug +} + +/** + * Reads header data from a `BytesReader`. The header may either be in the form + * of a `CarHeader` or `CarV2Header` depending on the CAR being read. + * + * @name async decoder.readHeader(reader) + * @param {import('./car-types').BytesReader} reader + * @param {number} [strictVersion] + * @returns {import('@ipld/car/coding').CarHeader | import('@ipld/car/coding').CarV2Header} + */ +export function readHeader(reader, strictVersion) { + const length = readVarint(reader) + if (length === 0) { + throw new Error('Invalid CAR header (zero length)') + } + const header = reader.exactly(length) + reader.seek(length) + const block = decodeDagCbor(header) + if (!headerValidator(block)) { + throw new Error('Invalid CAR header format') + } + if ( + (block.version !== 1 && block.version !== 2) || + (strictVersion !== undefined && block.version !== strictVersion) + ) { + throw new Error( + `Invalid CAR version: ${block.version}${ + strictVersion !== undefined ? ` (expected ${strictVersion})` : '' + }` + ) + } + // we've made 'roots' optional in the schema so we can do the version check + // before rejecting the block as invalid if there is no version + const hasRoots = Array.isArray(block.roots) + if ((block.version === 1 && !hasRoots) || (block.version === 2 && hasRoots)) { + throw new Error('Invalid CAR header format') + } + if (block.version === 1) { + return block + } + // version 2 + const v2Header = readV2Header(reader) + reader.seek(v2Header.dataOffset - reader.pos) + const v1Header = readHeader(reader, 1) + return Object.assign(v1Header, v2Header) + /* c8 ignore next 2 */ + // Node.js 12 c8 bug +} + +/** + * Creates a `CarDecoder` from a `BytesReader`. The `CarDecoder` is as async + * interface that will consume the bytes from the `BytesReader` to yield a + * `header()` and either `blocks()` or `blocksIndex()` data. + * + * @name decoder.createDecoder(reader) + * @param {import('./car-types').BytesReader} reader + * @returns {import('./car-types').CarDecoder} + */ +export function createDecoder(reader) { + const header = readHeader(reader) + if (header.version === 2) { + const v1length = reader.pos - header.dataOffset + reader = limitReader(reader, header.dataSize - v1length) + } + + return { + header: () => header, + + *blocks() { + while (reader.upTo(8).length > 0) { + yield readBlock(reader) + } + }, + + *blocksIndex() { + while (reader.upTo(8).length > 0) { + yield readBlockIndex(reader) + } + }, + } +} + +/** + * @param {import('./car-types').BytesReader} reader + * @returns {import('@ipld/car/api').BlockIndex} + */ +function readBlockIndex(reader) { + const offset = reader.pos + const { cid, length, blockLength } = readBlockHead(reader) + const index = { cid, length, blockLength, offset, blockOffset: reader.pos } + reader.seek(index.blockLength) + return index + /* c8 ignore next 2 */ + // Node.js 12 c8 bug +} + +/** + * Wraps a `BytesReader` in a limiting `BytesReader` which limits maximum read + * to `byteLimit` bytes. It _does not_ update `pos` of the original + * `BytesReader`. + * + * @name decoder.limitReader(reader, byteLimit) + * @param {import('./car-types').BytesReader} reader + * @param {number} byteLimit + * @returns {import('./car-types').BytesReader} + */ +export function limitReader(reader, byteLimit) { + let bytesRead = 0 + + /** @type {import('./car-types').BytesReader} */ + return { + upTo(length) { + let bytes = reader.upTo(length) + if (bytes.length + bytesRead > byteLimit) { + bytes = bytes.subarray(0, byteLimit - bytesRead) + } + return bytes + /* c8 ignore next 2 */ + // Node.js 12 c8 bug + }, + + exactly(length) { + const bytes = reader.exactly(length) + if (bytes.length + bytesRead > byteLimit) { + throw new Error('Unexpected end of data') + } + return bytes + /* c8 ignore next 2 */ + // Node.js 12 c8 bug + }, + + seek(length) { + bytesRead += length + reader.seek(length) + }, + + get pos() { + return reader.pos + }, + } +} + +/** + * @private + * @param {import('./car-types').BytesReader} reader + * @returns {CarReaderIface} + */ +export function decodeReaderComplete(reader) { + const decoder = createDecoder(reader) + const header = decoder.header() + const blocks = [] + for (const block of decoder.blocks()) { + blocks.push(block) + } + + return new CarReader(header, blocks) + /* c8 ignore next 2 */ + // Node.js 12 c8 bug +} + +/** + * Provides blockstore-like access to a CAR. + * + * Implements the `RootsReader` interface: + * {@link CarReader.getRoots `getRoots()`}. And the `BlockReader` interface: + * {@link CarReader.get `get()`}, {@link CarReader.has `has()`}, + * {@link CarReader.blocks `blocks()`} (defined as a `BlockIterator`) and + * {@link CarReader.cids `cids()`} (defined as a `CIDIterator`). + * + * Load this class with either `import { CarReader } from '@ipld/car/reader'` + * (`const { CarReader } = require('@ipld/car/reader')`). Or + * `import { CarReader } from '@ipld/car'` (`const { CarReader } = require('@ipld/car')`). + * The former will likely result in smaller bundle sizes where this is + * important. + * + * @name CarReader + * @class + * @implements {CarReaderIface} + * @property {number} version The version number of the CAR referenced by this + * reader (should be `1` or `2`). + */ +export class CarReader { + /** + * @constructs CarReader + * @param {CarHeader|CarV2Header} header + * @param {Block[]} blocks + */ + constructor(header, blocks) { + this._header = header + this._blocks = blocks + this._keys = blocks.map((b) => b.cid.toString()) + } + + /** + * @property + * @memberof CarReader + * @instance + */ + get version() { + return this._header.version + } + + /** + * Get the list of roots defined by the CAR referenced by this reader. May be + * zero or more `CID`s. + * + * @function + * @memberof CarReader + * @instance + * @async + * @returns {CID[]} + */ + getRoots() { + return this._header.roots + /* c8 ignore next 2 */ + // Node.js 12 c8 bug + } + + /** + * Check whether a given `CID` exists within the CAR referenced by this + * reader. + * + * @function + * @memberof CarReader + * @instance + * @async + * @param {CID} key + * @returns {boolean} + */ + has(key) { + // eslint-disable-next-line unicorn/prefer-includes + return this._keys.indexOf(key.toString()) > -1 + /* c8 ignore next 2 */ + // Node.js 12 c8 bug + } + + /** + * Fetch a `Block` (a `{ cid:CID, bytes:Uint8Array }` pair) from the CAR + * referenced by this reader matching the provided `CID`. In the case where + * the provided `CID` doesn't exist within the CAR, `undefined` will be + * returned. + * + * @function + * @memberof CarReader + * @instance + * @async + * @param {CID} key + * @returns {Block | undefined} + */ + get(key) { + const index = this._keys.indexOf(key.toString()) + return index > -1 ? this._blocks[index] : undefined + /* c8 ignore next 2 */ + // Node.js 12 c8 bug + } + + /** + * Returns a `BlockIterator` (`AsyncIterable`) that iterates over all + * of the `Block`s (`{ cid:CID, bytes:Uint8Array }` pairs) contained within + * the CAR referenced by this reader. + * + * @function + * @memberof CarReader + * @instance + * @async + * @generator + * @returns {Generator} + */ + *blocks() { + for (const block of this._blocks) { + yield block + } + } + + /** + * Returns a `CIDIterator` (`AsyncIterable`) that iterates over all of + * the `CID`s contained within the CAR referenced by this reader. + * + * @function + * @memberof CarReader + * @instance + * @async + * @generator + * @returns {Generator} + */ + *cids() { + for (const block of this._blocks) { + yield block.cid + } + } + + /** + * Instantiate a {@link CarReader} from a `Uint8Array` blob. This performs a + * decode fully in memory and maintains the decoded state in memory for full + * access to the data via the `CarReader` API. + * + * @async + * @static + * @memberof CarReader + * @param {Uint8Array} bytes + * @returns {CarReaderIface} blip blop + */ + static fromBytes(bytes) { + if (!(bytes instanceof Uint8Array)) { + throw new TypeError('fromBytes() requires a Uint8Array') + } + return decodeReaderComplete(bytesReader(bytes)) + /* c8 ignore next 2 */ + // Node.js 12 c8 bug + } +} diff --git a/packages/access-client/src/utils/car-types.ts b/packages/access-client/src/utils/car-types.ts new file mode 100644 index 000000000..e036d3f65 --- /dev/null +++ b/packages/access-client/src/utils/car-types.ts @@ -0,0 +1,37 @@ +import { Block, BlockIndex, CID } from '@ipld/car/api' +import { CarHeader, CarV2Header } from '@ipld/car/coding' + +export interface BytesReader { + upTo: (length: number) => Uint8Array + + exactly: (length: number) => Uint8Array + + seek: (length: number) => void + + pos: number +} + +export interface CarDecoder { + header: () => CarHeader | CarV2Header + + blocks: () => Generator + + blocksIndex: () => Generator +} + +export interface BlockIterator extends Generator {} + +export interface CIDIterator extends Generator {} + +export interface BlockReader { + has: (key: CID) => boolean + get: (key: CID) => Block | undefined + blocks: () => BlockIterator + cids: () => CIDIterator +} + +export interface RootsReader { + version: number + getRoots: () => CID[] +} +export interface CarReader extends BlockReader, RootsReader {} diff --git a/packages/access-client/test/encoding.test.js b/packages/access-client/test/encoding.test.js new file mode 100644 index 000000000..7d7d48291 --- /dev/null +++ b/packages/access-client/test/encoding.test.js @@ -0,0 +1,217 @@ +import assert from 'assert' +import { alice, bob } from './helpers/fixtures.js' +import * as Delegation from '@ucanto/core/delegation' +import * as UCAN from '@ipld/dag-ucan' +import { + bytesToDelegations, + delegationsToBytes, + delegationsToString, + stringToDelegations, +} from '../src/encoding.js' + +describe('Encoding', function () { + it('delegationsToBytes should fail with empty array', async function () { + assert.throws( + () => { + delegationsToBytes([]) + }, + { + name: 'Error', + message: 'Delegations required to be an non empty array.', + } + ) + + assert.throws( + () => { + // @ts-ignore + delegationsToBytes('ss') + }, + { + name: 'Error', + message: 'Delegations required to be an non empty array.', + } + ) + + assert.throws( + () => { + // @ts-ignore + delegationsToString('ss') + }, + { + name: 'Error', + message: 'Delegations required to be an non empty array.', + } + ) + + assert.throws( + () => { + // @ts-ignore + delegationsToString([]) + }, + { + name: 'Error', + message: 'Delegations required to be an non empty array.', + } + ) + }) + + it('bytesToDelegations should fail with string', async function () { + assert.throws( + () => { + // @ts-ignore + bytesToDelegations('ss') + }, + { + name: 'TypeError', + message: 'Input should be a non-empty Uint8Array.', + } + ) + }) + + it('stringToDelegations should fail with empty string', async function () { + assert.throws( + () => { + stringToDelegations('') + }, + { + name: 'TypeError', + message: 'Input should be a non-empty Uint8Array.', + } + ) + }) + + it('encode/decode ucan -> delegation -> bytes -> delegation', async function () { + const data = await UCAN.issue({ + issuer: alice, + audience: bob, + capabilities: [ + { + can: 'store/add', + with: alice.did(), + }, + ], + }) + const { cid, bytes } = await UCAN.write(data) + const delegation = Delegation.create({ + root: { + cid, + bytes, + }, + }) + + assert.deepEqual(delegation.capabilities, [ + { + can: 'store/add', + with: alice.did(), + }, + ]) + + const encoded = delegationsToBytes([delegation]) + const delegations = bytesToDelegations(encoded) + + assert.ok(delegations.length === 1) + assert.ok(delegation.cid.equals(delegations[0].cid)) + }) + + it('encode/decode multiple delegations -> bytes -> delegations', async function () { + const delegation1 = await Delegation.delegate({ + audience: alice, + issuer: bob, + capabilities: [ + { + can: '*', + with: 'mailto:email.com', + }, + ], + }) + + const delegation2 = await Delegation.delegate({ + audience: alice, + issuer: bob, + capabilities: [ + { + can: 'send/email', + with: 'mailto:email.com', + }, + ], + }) + + const encoded = delegationsToBytes([delegation1, delegation2]) + const delegations = bytesToDelegations(encoded) + + assert.ok(delegations.length === 2) + assert.ok(delegations[0].cid.equals(delegation1.cid)) + assert.ok(delegations[1].cid.equals(delegation2.cid)) + assert.deepEqual(delegations[0].capabilities, [ + { + can: '*', + with: 'mailto:email.com', + }, + ]) + }) + + it('encode/decode nested delegations -> bytes -> delegations', async function () { + const delegation = await Delegation.delegate({ + audience: alice, + issuer: bob, + capabilities: [ + { + can: '*', + with: 'mailto:email.com', + }, + ], + proofs: [ + await Delegation.delegate({ + audience: alice, + issuer: bob, + capabilities: [ + { + can: 'send/email', + with: 'mailto:email.com', + }, + ], + }), + ], + }) + + const encoded = delegationsToBytes([delegation]) + const delegations = bytesToDelegations(encoded) + + assert.ok(delegations.length === 1) + assert.ok(delegations[0].cid.equals(delegation.cid)) + assert.deepEqual(delegations[0].capabilities, [ + { + can: '*', + with: 'mailto:email.com', + }, + ]) + + // @ts-ignore - proofs[0] could be a link but here we know its a ucan + assert.deepEqual(delegations[0].proofs[0].capabilities, [ + { + can: 'send/email', + with: 'mailto:email.com', + }, + ]) + }) + + it('encode/decode does not dedupe roots but compresses blocks', async function () { + const delegation1 = await Delegation.delegate({ + audience: alice, + issuer: bob, + capabilities: [ + { + can: '*', + with: 'mailto:email.com', + }, + ], + }) + + const encoded = delegationsToBytes([delegation1, delegation1]) + // delegation1 size is 307 bytes + assert.ok(encoded.length === 347) + const delegations = bytesToDelegations(encoded) + + assert.ok(delegations.length === 2) + }) +}) diff --git a/packages/access-ws/package.json b/packages/access-ws/package.json index c70a51b58..c95e7fa69 100644 --- a/packages/access-ws/package.json +++ b/packages/access-ws/package.json @@ -23,11 +23,11 @@ "@cloudflare/workers-types": "^3.18.0", "@sentry/cli": "2.7.0", "@types/git-rev-sync": "^2.0.0", - "@types/node": "^18.11.10", + "@types/node": "^18.11.12", "ava": "^5.1.0", "buffer": "^6.0.3", "dotenv": "^16.0.3", - "esbuild": "^0.15.16", + "esbuild": "^0.16.3", "git-rev-sync": "^3.0.2", "hd-scripts": "^3.0.2", "miniflare": "^2.11.0", @@ -35,8 +35,8 @@ "process": "^0.11.10", "readable-stream": "^4.2.0", "sade": "^1.8.1", - "typescript": "4.9.3", - "wrangler": "^2.5.0" + "typescript": "4.9.4", + "wrangler": "^2.6.2" }, "eslintConfig": { "extends": [ diff --git a/packages/capabilities/package.json b/packages/capabilities/package.json index c466d5122..5bd1e9c19 100644 --- a/packages/capabilities/package.json +++ b/packages/capabilities/package.json @@ -66,13 +66,13 @@ "devDependencies": { "@types/assert": "^1.5.6", "@types/mocha": "^10.0.0", - "@types/node": "^18.11.10", + "@types/node": "^18.11.12", "assert": "^2.0.0", "hd-scripts": "^3.0.2", "mocha": "^10.1.0", "playwright-test": "^8.1.1", "type-fest": "^3.3.0", - "typescript": "4.8.4", + "typescript": "4.9.4", "watch": "^1.0.2" }, "eslintConfig": { diff --git a/packages/upload-client/package.json b/packages/upload-client/package.json index 2cc1c5b46..e5969a532 100644 --- a/packages/upload-client/package.json +++ b/packages/upload-client/package.json @@ -88,7 +88,7 @@ "mocha": "^10.1.0", "npm-run-all": "^4.1.5", "playwright-test": "^8.1.1", - "typescript": "4.9.3" + "typescript": "4.9.4" }, "eslintConfig": { "extends": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4e21e1dad..ac594c740 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,23 +5,23 @@ importers: .: specifiers: depcheck: ^1.4.3 - lint-staged: ^13.0.4 - prettier: 2.8.0 + lint-staged: ^13.1.0 + prettier: 2.8.1 simple-git-hooks: ^2.8.1 typedoc: ^0.23.21 typedoc-plugin-missing-exports: ^1.0.0 - typescript: 4.9.3 - wrangler: ^2.5.0 + typescript: 4.9.4 + wrangler: ^2.6.2 dependencies: depcheck: 1.4.3 - typedoc: 0.23.21_typescript@4.9.3 + typedoc: 0.23.21_typescript@4.9.4 typedoc-plugin-missing-exports: 1.0.0_typedoc@0.23.21 devDependencies: - lint-staged: 13.0.4 - prettier: 2.8.0 + lint-staged: 13.1.0 + prettier: 2.8.1 simple-git-hooks: 2.8.1 - typescript: 4.9.3 - wrangler: 2.5.0 + typescript: 4.9.4 + wrangler: 2.6.2 packages/access-api: specifiers: @@ -33,7 +33,7 @@ importers: '@types/assert': ^1.5.6 '@types/git-rev-sync': ^2.0.0 '@types/mocha': ^10.0.1 - '@types/node': ^18.11.9 + '@types/node': ^18.11.12 '@types/qrcode': ^1.5.0 '@ucanto/core': ^4.0.2 '@ucanto/interface': ^4.0.2 @@ -44,10 +44,10 @@ importers: '@web3-storage/access': workspace:^ '@web3-storage/capabilities': workspace:^ '@web3-storage/worker-utils': 0.4.3-dev - better-sqlite3: 8.0.0 + better-sqlite3: 8.0.1 buffer: ^6.0.3 dotenv: ^16.0.3 - esbuild: ^0.15.16 + esbuild: ^0.16.3 git-rev-sync: ^3.0.2 hd-scripts: ^3.0.2 is-subset: ^0.1.1 @@ -62,9 +62,9 @@ importers: readable-stream: ^4.2.0 sade: ^1.8.1 toucan-js: ^2.7.0 - typescript: 4.9.3 + typescript: 4.9.4 workers-qb: ^0.1.2 - wrangler: ^2.5.0 + wrangler: ^2.6.2 dependencies: '@ipld/dag-ucan': 3.0.1 '@ucanto/core': 4.0.2 @@ -90,12 +90,12 @@ importers: '@types/assert': 1.5.6 '@types/git-rev-sync': 2.0.0 '@types/mocha': 10.0.1 - '@types/node': 18.11.10 + '@types/node': 18.11.12 '@types/qrcode': 1.5.0 - better-sqlite3: 8.0.0 + better-sqlite3: 8.0.1 buffer: 6.0.3 dotenv: 16.0.3 - esbuild: 0.15.16 + esbuild: 0.16.3 git-rev-sync: 3.0.2 hd-scripts: 3.0.2 is-subset: 0.1.1 @@ -105,17 +105,19 @@ importers: process: 0.11.10 readable-stream: 4.2.0 sade: 1.8.1 - typescript: 4.9.3 - wrangler: 2.5.0 + typescript: 4.9.4 + wrangler: 2.6.2 packages/access-client: specifiers: '@ipld/car': ^5.0.1 + '@ipld/dag-cbor': ^8.0.0 '@ipld/dag-ucan': ^3.0.1 '@types/assert': ^1.5.6 '@types/inquirer': ^9.0.3 '@types/mocha': ^10.0.1 - '@types/node': ^18.11.10 + '@types/node': ^18.11.12 + '@types/varint': ^6.0.1 '@types/ws': ^8.5.3 '@ucanto/client': ^4.0.2 '@ucanto/core': ^4.0.2 @@ -143,13 +145,15 @@ importers: playwright-test: ^8.1.1 sade: ^1.8.1 type-fest: ^3.3.0 - typescript: 4.9.3 + typescript: 4.9.4 uint8arrays: ^4.0.2 + varint: ^6.0.0 watch: ^1.0.2 ws: ^8.11.0 zod: ^3.19.1 dependencies: '@ipld/car': 5.0.1 + '@ipld/dag-cbor': 8.0.0 '@ipld/dag-ucan': 3.0.1 '@ucanto/client': 4.0.2 '@ucanto/core': 4.0.2 @@ -169,13 +173,15 @@ importers: p-wait-for: 5.0.0 type-fest: 3.3.0 uint8arrays: 4.0.2 + varint: 6.0.0 ws: 8.11.0 zod: 3.19.1 devDependencies: '@types/assert': 1.5.6 '@types/inquirer': 9.0.3 '@types/mocha': 10.0.1 - '@types/node': 18.11.10 + '@types/node': 18.11.12 + '@types/varint': 6.0.1 '@types/ws': 8.5.3 '@ucanto/server': 4.0.2 assert: 2.0.0 @@ -186,7 +192,7 @@ importers: p-queue: 7.3.0 playwright-test: 8.1.1 sade: 1.8.1 - typescript: 4.9.3 + typescript: 4.9.4 watch: 1.0.2 packages/access-ws: @@ -194,12 +200,12 @@ importers: '@cloudflare/workers-types': ^3.18.0 '@sentry/cli': 2.7.0 '@types/git-rev-sync': ^2.0.0 - '@types/node': ^18.11.10 + '@types/node': ^18.11.12 '@web3-storage/worker-utils': 0.4.3-dev ava: ^5.1.0 buffer: ^6.0.3 dotenv: ^16.0.3 - esbuild: ^0.15.16 + esbuild: ^0.16.3 git-rev-sync: ^3.0.2 hd-scripts: ^3.0.2 miniflare: ^2.11.0 @@ -208,8 +214,8 @@ importers: process: ^0.11.10 readable-stream: ^4.2.0 sade: ^1.8.1 - typescript: 4.9.3 - wrangler: ^2.5.0 + typescript: 4.9.4 + wrangler: ^2.6.2 dependencies: '@web3-storage/worker-utils': 0.4.3-dev nanoid: 4.0.0 @@ -217,11 +223,11 @@ importers: '@cloudflare/workers-types': 3.18.0 '@sentry/cli': 2.7.0 '@types/git-rev-sync': 2.0.0 - '@types/node': 18.11.10 + '@types/node': 18.11.12 ava: 5.1.0 buffer: 6.0.3 dotenv: 16.0.3 - esbuild: 0.15.16 + esbuild: 0.16.3 git-rev-sync: 3.0.2 hd-scripts: 3.0.2 miniflare: 2.11.0 @@ -229,14 +235,14 @@ importers: process: 0.11.10 readable-stream: 4.2.0 sade: 1.8.1 - typescript: 4.9.3 - wrangler: 2.5.0 + typescript: 4.9.4 + wrangler: 2.6.2 packages/capabilities: specifiers: '@types/assert': ^1.5.6 '@types/mocha': ^10.0.0 - '@types/node': ^18.11.10 + '@types/node': ^18.11.12 '@ucanto/core': ^4.0.2 '@ucanto/interface': ^4.0.2 '@ucanto/principal': ^4.0.2 @@ -247,7 +253,7 @@ importers: mocha: ^10.1.0 playwright-test: ^8.1.1 type-fest: ^3.3.0 - typescript: 4.8.4 + typescript: 4.9.4 watch: ^1.0.2 dependencies: '@ucanto/core': 4.0.2 @@ -258,13 +264,13 @@ importers: devDependencies: '@types/assert': 1.5.6 '@types/mocha': 10.0.1 - '@types/node': 18.11.10 + '@types/node': 18.11.12 assert: 2.0.0 hd-scripts: 3.0.2 mocha: 10.1.0 playwright-test: 8.1.1 type-fest: 3.3.0 - typescript: 4.8.4 + typescript: 4.9.4 watch: 1.0.2 packages/upload-client: @@ -292,7 +298,7 @@ importers: p-queue: ^7.3.0 p-retry: ^5.1.2 playwright-test: ^8.1.1 - typescript: 4.9.3 + typescript: 4.9.4 dependencies: '@ipld/car': 5.0.1 '@ipld/dag-ucan': 3.0.1 @@ -318,7 +324,7 @@ importers: mocha: 10.1.0 npm-run-all: 4.1.5 playwright-test: 8.1.1 - typescript: 4.9.3 + typescript: 4.9.4 packages: @@ -491,8 +497,8 @@ packages: rollup-plugin-node-polyfills: 0.2.1 dev: true - /@esbuild/android-arm/0.15.16: - resolution: {integrity: sha512-nyB6CH++2mSgx3GbnrJsZSxzne5K0HMyNIWafDHqYy7IwxFc4fd/CgHVZXr8Eh+Q3KbIAcAe3vGyqIPhGblvMQ==} + /@esbuild/android-arm/0.16.3: + resolution: {integrity: sha512-mueuEoh+s1eRbSJqq9KNBQwI4QhQV6sRXIfTyLXSHGMpyew61rOK4qY21uKbXl1iBoMb0AdL1deWFCQVlN2qHA==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -500,8 +506,89 @@ packages: dev: true optional: true - /@esbuild/linux-loong64/0.15.16: - resolution: {integrity: sha512-SDLfP1uoB0HZ14CdVYgagllgrG7Mdxhkt4jDJOKl/MldKrkQ6vDJMZKl2+5XsEY/Lzz37fjgLQoJBGuAw/x8kQ==} + /@esbuild/android-arm64/0.16.3: + resolution: {integrity: sha512-RolFVeinkeraDvN/OoRf1F/lP0KUfGNb5jxy/vkIMeRRChkrX/HTYN6TYZosRJs3a1+8wqpxAo5PI5hFmxyPRg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64/0.16.3: + resolution: {integrity: sha512-SFpTUcIT1bIJuCCBMCQWq1bL2gPTjWoLZdjmIhjdcQHaUfV41OQfho6Ici5uvvkMmZRXIUGpM3GxysP/EU7ifQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64/0.16.3: + resolution: {integrity: sha512-DO8WykMyB+N9mIDfI/Hug70Dk1KipavlGAecxS3jDUwAbTpDXj0Lcwzw9svkhxfpCagDmpaTMgxWK8/C/XcXvw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64/0.16.3: + resolution: {integrity: sha512-uEqZQ2omc6BvWqdCiyZ5+XmxuHEi1SPzpVxXCSSV2+Sh7sbXbpeNhHIeFrIpRjAs0lI1FmA1iIOxFozKBhKgRQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64/0.16.3: + resolution: {integrity: sha512-nJansp3sSXakNkOD5i5mIz2Is/HjzIhFs49b1tjrPrpCmwgBmH9SSzhC/Z1UqlkivqMYkhfPwMw1dGFUuwmXhw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64/0.16.3: + resolution: {integrity: sha512-TfoDzLw+QHfc4a8aKtGSQ96Wa+6eimljjkq9HKR0rHlU83vw8aldMOUSJTUDxbcUdcgnJzPaX8/vGWm7vyV7ug==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm/0.16.3: + resolution: {integrity: sha512-VwswmSYwVAAq6LysV59Fyqk3UIjbhuc6wb3vEcJ7HEJUtFuLK9uXWuFoH1lulEbE4+5GjtHi3MHX+w1gNHdOWQ==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64/0.16.3: + resolution: {integrity: sha512-7I3RlsnxEFCHVZNBLb2w7unamgZ5sVwO0/ikE2GaYvYuUQs9Qte/w7TqWcXHtCwxvZx/2+F97ndiUQAWs47ZfQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32/0.16.3: + resolution: {integrity: sha512-X8FDDxM9cqda2rJE+iblQhIMYY49LfvW4kaEjoFbTTQ4Go8G96Smj2w3BRTwA8IHGoi9dPOPGAX63dhuv19UqA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64/0.16.3: + resolution: {integrity: sha512-hIbeejCOyO0X9ujfIIOKjBjNAs9XD/YdJ9JXAy1lHA+8UXuOqbFe4ErMCqMr8dhlMGBuvcQYGF7+kO7waj2KHw==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -509,6 +596,105 @@ packages: dev: true optional: true + /@esbuild/linux-mips64el/0.16.3: + resolution: {integrity: sha512-znFRzICT/V8VZQMt6rjb21MtAVJv/3dmKRMlohlShrbVXdBuOdDrGb+C2cZGQAR8RFyRe7HS6klmHq103WpmVw==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64/0.16.3: + resolution: {integrity: sha512-EV7LuEybxhXrVTDpbqWF2yehYRNz5e5p+u3oQUS2+ZFpknyi1NXxr8URk4ykR8Efm7iu04//4sBg249yNOwy5Q==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64/0.16.3: + resolution: {integrity: sha512-uDxqFOcLzFIJ+r/pkTTSE9lsCEaV/Y6rMlQjUI9BkzASEChYL/aSQjZjchtEmdnVxDKETnUAmsaZ4pqK1eE5BQ==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x/0.16.3: + resolution: {integrity: sha512-NbeREhzSxYwFhnCAQOQZmajsPYtX71Ufej3IQ8W2Gxskfz9DK58ENEju4SbpIj48VenktRASC52N5Fhyf/aliQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64/0.16.3: + resolution: {integrity: sha512-SDiG0nCixYO9JgpehoKgScwic7vXXndfasjnD5DLbp1xltANzqZ425l7LSdHynt19UWOcDjG9wJJzSElsPvk0w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64/0.16.3: + resolution: {integrity: sha512-AzbsJqiHEq1I/tUvOfAzCY15h4/7Ivp3ff/o1GpP16n48JMNAtbW0qui2WCgoIZArEHD0SUQ95gvR0oSO7ZbdA==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64/0.16.3: + resolution: {integrity: sha512-gSABi8qHl8k3Cbi/4toAzHiykuBuWLZs43JomTcXkjMZVkp0gj3gg9mO+9HJW/8GB5H89RX/V0QP4JGL7YEEVg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64/0.16.3: + resolution: {integrity: sha512-SF9Kch5Ete4reovvRO6yNjMxrvlfT0F0Flm+NPoUw5Z4Q3r1d23LFTgaLwm3Cp0iGbrU/MoUI+ZqwCv5XJijCw==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64/0.16.3: + resolution: {integrity: sha512-u5aBonZIyGopAZyOnoPAA6fGsDeHByZ9CnEzyML9NqntK6D/xl5jteZUKm/p6nD09+v3pTM6TuUIqSPcChk5gg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32/0.16.3: + resolution: {integrity: sha512-GlgVq1WpvOEhNioh74TKelwla9KDuAaLZrdxuuUgsP2vayxeLgVc+rbpIv0IYF4+tlIzq2vRhofV+KGLD+37EQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64/0.16.3: + resolution: {integrity: sha512-5/JuTd8OWW8UzEtyf19fbrtMJENza+C9JoPIkvItgTBQ1FO2ZLvjbPO6Xs54vk0s5JB5QsfieUEshRQfu7ZHow==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@eslint/eslintrc/1.3.3: resolution: {integrity: sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -874,7 +1060,7 @@ packages: resolution: {integrity: sha512-GDSweEhJ3nNtStGm6taZGUNytM0QTQ/sjZSedAKyF1/aHRaZUcD9cuKAMgIbSpKfvgGdLMNS7Bhd8jb249TO7g==} engines: {node: '>=16.13'} dependencies: - '@types/better-sqlite3': 7.6.2 + '@types/better-sqlite3': 7.6.3 kleur: 4.1.5 npx-import: 1.1.4 picomatch: 2.3.1 @@ -1010,13 +1196,13 @@ packages: fastq: 1.13.0 dev: true - /@phenomnomnominal/tsquery/4.2.0_typescript@4.9.3: + /@phenomnomnominal/tsquery/4.2.0_typescript@4.9.4: resolution: {integrity: sha512-hR2U3uVcrrdkuG30ItQ+uFDs4ncZAybxWG0OjTE8ptPzVoU7GVeXpy+vMU8zX9EbmjGeITPw/su5HjYQyAH8bA==} peerDependencies: typescript: ^3 || ^4 dependencies: esquery: 1.4.0 - typescript: 4.9.3 + typescript: 4.9.4 dev: true /@polka/url/0.5.0: @@ -1126,7 +1312,13 @@ packages: /@types/better-sqlite3/7.6.2: resolution: {integrity: sha512-RgmaapusqTq6IMAr4McMyAsC6RshYTCjXCnzwVV59WctUxC8bNPyUfT9t5F81lKcU41lLurhjqjoMHfauzfqGg==} dependencies: - '@types/node': 18.11.10 + '@types/node': 18.11.12 + dev: true + + /@types/better-sqlite3/7.6.3: + resolution: {integrity: sha512-YS64N9SNDT/NAvou3QNdzAu3E2om/W/0dhORimtPGLef+zSK5l1vDzfsWb4xgXOgfhtOI5ZDTRxnvRPb22AIVQ==} + dependencies: + '@types/node': 18.11.12 dev: true /@types/cookie/0.5.0: @@ -1164,8 +1356,8 @@ packages: resolution: {integrity: sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==} dev: true - /@types/node/18.11.10: - resolution: {integrity: sha512-juG3RWMBOqcOuXC643OAdSA525V44cVgGV6dUDuiFtss+8Fk5x1hI93Rsld43VeJVIeqlP9I7Fn9/qaVqoEAuQ==} + /@types/node/18.11.12: + resolution: {integrity: sha512-FgD3NtTAKvyMmD44T07zz2fEf+OKwutgBCEVM8GcvMGVGaDktiLNTDvPwC/LUe3PinMW+X6CuLOF2Ui1mAlSXg==} /@types/normalize-package-data/2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} @@ -1178,7 +1370,7 @@ packages: /@types/qrcode/1.5.0: resolution: {integrity: sha512-x5ilHXRxUPIMfjtM+1vf/GPTRWZ81nqscursm5gMznJeK9M0YnZ1c3bEvRLQ0zSSgedLx1J6MGL231ObQGGhaA==} dependencies: - '@types/node': 18.11.10 + '@types/node': 18.11.12 dev: true /@types/retry/0.12.1: @@ -1196,13 +1388,19 @@ packages: /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 18.11.10 + '@types/node': 18.11.12 + dev: true + + /@types/varint/6.0.1: + resolution: {integrity: sha512-fQdOiZpDMBvaEdl12P1x7xlTPRAtd7qUUtVaWgkCy8DC//wCv19nqFFtrnR3y/ac6VFY0UUvYuQqfKzZTSE26w==} + dependencies: + '@types/node': 18.11.12 dev: true /@types/ws/8.5.3: resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} dependencies: - '@types/node': 18.11.10 + '@types/node': 18.11.12 dev: true /@types/yargs-parser/21.0.0: @@ -1215,7 +1413,7 @@ packages: '@types/yargs-parser': 21.0.0 dev: true - /@typescript-eslint/eslint-plugin/5.45.0_czs5uoqkd3podpy6vgtsxfc7au: + /@typescript-eslint/eslint-plugin/5.45.0_wke4plxjew2ogjxrdwvzd2srfq: resolution: {integrity: sha512-CXXHNlf0oL+Yg021cxgOdMHNTXD17rHkq7iW6RFHoybdFgQBjU3yIXhhcPpGwr1CjZlo6ET8C6tzX5juQoXeGA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -1226,36 +1424,36 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.45.0_hsf322ms6xhhd4b5ne6lb74y4a + '@typescript-eslint/parser': 5.45.0_wy4udjehnvkneqnogzx5kughki '@typescript-eslint/scope-manager': 5.45.0 - '@typescript-eslint/type-utils': 5.45.0_hsf322ms6xhhd4b5ne6lb74y4a - '@typescript-eslint/utils': 5.45.0_hsf322ms6xhhd4b5ne6lb74y4a + '@typescript-eslint/type-utils': 5.45.0_wy4udjehnvkneqnogzx5kughki + '@typescript-eslint/utils': 5.45.0_wy4udjehnvkneqnogzx5kughki debug: 4.3.4 eslint: 8.28.0 ignore: 5.2.1 natural-compare-lite: 1.4.0 regexpp: 3.2.0 semver: 7.3.8 - tsutils: 3.21.0_typescript@4.9.3 - typescript: 4.9.3 + tsutils: 3.21.0_typescript@4.9.4 + typescript: 4.9.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/experimental-utils/5.45.0_hsf322ms6xhhd4b5ne6lb74y4a: + /@typescript-eslint/experimental-utils/5.45.0_wy4udjehnvkneqnogzx5kughki: resolution: {integrity: sha512-DnRQg5+3uHHt/gaifTjwg9OKbg9/TWehfJzYHQIDJboPEbF897BKDE/qoqMhW7nf0jWRV1mwVXTaUvtB1/9Gwg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@typescript-eslint/utils': 5.45.0_hsf322ms6xhhd4b5ne6lb74y4a + '@typescript-eslint/utils': 5.45.0_wy4udjehnvkneqnogzx5kughki eslint: 8.28.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/parser/5.45.0_hsf322ms6xhhd4b5ne6lb74y4a: + /@typescript-eslint/parser/5.45.0_wy4udjehnvkneqnogzx5kughki: resolution: {integrity: sha512-brvs/WSM4fKUmF5Ot/gEve6qYiCMjm6w4HkHPfS6ZNmxTS0m0iNN4yOChImaCkqc1hRwFGqUyanMXuGal6oyyQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -1267,10 +1465,10 @@ packages: dependencies: '@typescript-eslint/scope-manager': 5.45.0 '@typescript-eslint/types': 5.45.0 - '@typescript-eslint/typescript-estree': 5.45.0_typescript@4.9.3 + '@typescript-eslint/typescript-estree': 5.45.0_typescript@4.9.4 debug: 4.3.4 eslint: 8.28.0 - typescript: 4.9.3 + typescript: 4.9.4 transitivePeerDependencies: - supports-color dev: true @@ -1283,7 +1481,7 @@ packages: '@typescript-eslint/visitor-keys': 5.45.0 dev: true - /@typescript-eslint/type-utils/5.45.0_hsf322ms6xhhd4b5ne6lb74y4a: + /@typescript-eslint/type-utils/5.45.0_wy4udjehnvkneqnogzx5kughki: resolution: {integrity: sha512-DY7BXVFSIGRGFZ574hTEyLPRiQIvI/9oGcN8t1A7f6zIs6ftbrU0nhyV26ZW//6f85avkwrLag424n+fkuoJ1Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -1293,12 +1491,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.45.0_typescript@4.9.3 - '@typescript-eslint/utils': 5.45.0_hsf322ms6xhhd4b5ne6lb74y4a + '@typescript-eslint/typescript-estree': 5.45.0_typescript@4.9.4 + '@typescript-eslint/utils': 5.45.0_wy4udjehnvkneqnogzx5kughki debug: 4.3.4 eslint: 8.28.0 - tsutils: 3.21.0_typescript@4.9.3 - typescript: 4.9.3 + tsutils: 3.21.0_typescript@4.9.4 + typescript: 4.9.4 transitivePeerDependencies: - supports-color dev: true @@ -1308,7 +1506,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.45.0_typescript@4.9.3: + /@typescript-eslint/typescript-estree/5.45.0_typescript@4.9.4: resolution: {integrity: sha512-maRhLGSzqUpFcZgXxg1qc/+H0bT36lHK4APhp0AEUVrpSwXiRAomm/JGjSG+kNUio5kAa3uekCYu/47cnGn5EQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -1323,13 +1521,13 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.8 - tsutils: 3.21.0_typescript@4.9.3 - typescript: 4.9.3 + tsutils: 3.21.0_typescript@4.9.4 + typescript: 4.9.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils/5.45.0_hsf322ms6xhhd4b5ne6lb74y4a: + /@typescript-eslint/utils/5.45.0_wy4udjehnvkneqnogzx5kughki: resolution: {integrity: sha512-OUg2JvsVI1oIee/SwiejTot2OxwU8a7UfTFMOdlhD2y+Hl6memUSL4s98bpUTo8EpVEr0lmwlU7JSu/p2QpSvA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -1339,7 +1537,7 @@ packages: '@types/semver': 7.3.13 '@typescript-eslint/scope-manager': 5.45.0 '@typescript-eslint/types': 5.45.0 - '@typescript-eslint/typescript-estree': 5.45.0_typescript@4.9.3 + '@typescript-eslint/typescript-estree': 5.45.0_typescript@4.9.4 eslint: 8.28.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0_eslint@8.28.0 @@ -1842,8 +2040,8 @@ packages: /base64-js/1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - /better-sqlite3/8.0.0: - resolution: {integrity: sha512-DhIPmhV+F3NBb9oGCNqNON8Cg4nP3/7NOwx412SL6JJUclYjAKmqNtbL6xBfG2RcG0uZWUS/TEHRy4AFLeq5Zg==} + /better-sqlite3/8.0.1: + resolution: {integrity: sha512-JhTZjpyapA1icCEjIZB4TSSgkGdFgpWZA2Wszg7Cf4JwJwKQmbvuNnJBeR+EYG/Z29OXvR4G//Rbg31BW/Z7Yg==} requiresBuild: true dependencies: bindings: 1.5.0 @@ -2703,15 +2901,6 @@ packages: dev: true optional: true - /esbuild-android-64/0.15.16: - resolution: {integrity: sha512-Vwkv/sT0zMSgPSVO3Jlt1pUbnZuOgtOQJkJkyyJFAlLe7BiT8e9ESzo0zQSx4c3wW4T6kGChmKDPMbWTgtliQA==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - requiresBuild: true - dev: true - optional: true - /esbuild-android-arm64/0.14.39: resolution: {integrity: sha512-+twajJqO7n3MrCz9e+2lVOnFplRsaGRwsq1KL/uOy7xK7QdRSprRQcObGDeDZUZsacD5gUkk6OiHiYp6RzU3CA==} engines: {node: '>=12'} @@ -2730,15 +2919,6 @@ packages: dev: true optional: true - /esbuild-android-arm64/0.15.16: - resolution: {integrity: sha512-lqfKuofMExL5niNV3gnhMUYacSXfsvzTa/58sDlBET/hCOG99Zmeh+lz6kvdgvGOsImeo6J9SW21rFCogNPLxg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: true - optional: true - /esbuild-darwin-64/0.14.39: resolution: {integrity: sha512-ImT6eUw3kcGcHoUxEcdBpi6LfTRWaV6+qf32iYYAfwOeV+XaQ/Xp5XQIBiijLeo+LpGci9M0FVec09nUw41a5g==} engines: {node: '>=12'} @@ -2757,15 +2937,6 @@ packages: dev: true optional: true - /esbuild-darwin-64/0.15.16: - resolution: {integrity: sha512-wo2VWk/n/9V2TmqUZ/KpzRjCEcr00n7yahEdmtzlrfQ3lfMCf3Wa+0sqHAbjk3C6CKkR3WKK/whkMq5Gj4Da9g==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - /esbuild-darwin-arm64/0.14.39: resolution: {integrity: sha512-/fcQ5UhE05OiT+bW5v7/up1bDsnvaRZPJxXwzXsMRrr7rZqPa85vayrD723oWMT64dhrgWeA3FIneF8yER0XTw==} engines: {node: '>=12'} @@ -2784,15 +2955,6 @@ packages: dev: true optional: true - /esbuild-darwin-arm64/0.15.16: - resolution: {integrity: sha512-fMXaUr5ou0M4WnewBKsspMtX++C1yIa3nJ5R2LSbLCfJT3uFdcRoU/NZjoM4kOMKyOD9Sa/2vlgN8G07K3SJnw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - /esbuild-freebsd-64/0.14.39: resolution: {integrity: sha512-oMNH8lJI4wtgN5oxuFP7BQ22vgB/e3Tl5Woehcd6i2r6F3TszpCnNl8wo2d/KvyQ4zvLvCWAlRciumhQg88+kQ==} engines: {node: '>=12'} @@ -2811,15 +2973,6 @@ packages: dev: true optional: true - /esbuild-freebsd-64/0.15.16: - resolution: {integrity: sha512-UzIc0xlRx5x9kRuMr+E3+hlSOxa/aRqfuMfiYBXu2jJ8Mzej4lGL7+o6F5hzhLqWfWm1GWHNakIdlqg1ayaTNQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - /esbuild-freebsd-arm64/0.14.39: resolution: {integrity: sha512-1GHK7kwk57ukY2yI4ILWKJXaxfr+8HcM/r/JKCGCPziIVlL+Wi7RbJ2OzMcTKZ1HpvEqCTBT/J6cO4ZEwW4Ypg==} engines: {node: '>=12'} @@ -2838,15 +2991,6 @@ packages: dev: true optional: true - /esbuild-freebsd-arm64/0.15.16: - resolution: {integrity: sha512-8xyiYuGc0DLZphFQIiYaLHlfoP+hAN9RHbE+Ibh8EUcDNHAqbQgUrQg7pE7Bo00rXmQ5Ap6KFgcR0b4ALZls1g==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - /esbuild-linux-32/0.14.39: resolution: {integrity: sha512-g97Sbb6g4zfRLIxHgW2pc393DjnkTRMeq3N1rmjDUABxpx8SjocK4jLen+/mq55G46eE2TA0MkJ4R3SpKMu7dg==} engines: {node: '>=12'} @@ -2865,15 +3009,6 @@ packages: dev: true optional: true - /esbuild-linux-32/0.15.16: - resolution: {integrity: sha512-iGijUTV+0kIMyUVoynK0v+32Oi8yyp0xwMzX69GX+5+AniNy/C/AL1MjFTsozRp/3xQPl7jVux/PLe2ds10/2w==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - requiresBuild: true - dev: true - optional: true - /esbuild-linux-64/0.14.39: resolution: {integrity: sha512-4tcgFDYWdI+UbNMGlua9u1Zhu0N5R6u9tl5WOM8aVnNX143JZoBZLpCuUr5lCKhnD0SCO+5gUyMfupGrHtfggQ==} engines: {node: '>=12'} @@ -2892,15 +3027,6 @@ packages: dev: true optional: true - /esbuild-linux-64/0.15.16: - resolution: {integrity: sha512-tuSOjXdLw7VzaUj89fIdAaQT7zFGbKBcz4YxbWrOiXkwscYgE7HtTxUavreBbnRkGxKwr9iT/gmeJWNm4djy/g==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /esbuild-linux-arm/0.14.39: resolution: {integrity: sha512-t0Hn1kWVx5UpCzAJkKRfHeYOLyFnXwYynIkK54/h3tbMweGI7dj400D1k0Vvtj2u1P+JTRT9tx3AjtLEMmfVBQ==} engines: {node: '>=12'} @@ -2919,15 +3045,6 @@ packages: dev: true optional: true - /esbuild-linux-arm/0.15.16: - resolution: {integrity: sha512-XKcrxCEXDTOuoRj5l12tJnkvuxXBMKwEC5j0JISw3ziLf0j4zIwXbKbTmUrKFWbo6ZgvNpa7Y5dnbsjVvH39bQ==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - /esbuild-linux-arm64/0.14.39: resolution: {integrity: sha512-23pc8MlD2D6Px1mV8GMglZlKgwgNKAO8gsgsLLcXWSs9lQsCYkIlMo/2Ycfo5JrDIbLdwgP8D2vpfH2KcBqrDQ==} engines: {node: '>=12'} @@ -2946,15 +3063,6 @@ packages: dev: true optional: true - /esbuild-linux-arm64/0.15.16: - resolution: {integrity: sha512-mPYksnfHnemNrvjrDhZyixL/AfbJN0Xn9S34ZOHYdh6/jJcNd8iTsv3JwJoEvTJqjMggjMhGUPJAdjnFBHoH8A==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /esbuild-linux-mips64le/0.14.39: resolution: {integrity: sha512-epwlYgVdbmkuRr5n4es3B+yDI0I2e/nxhKejT9H0OLxFAlMkeQZxSpxATpDc9m8NqRci6Kwyb/SfmD1koG2Zuw==} engines: {node: '>=12'} @@ -2973,15 +3081,6 @@ packages: dev: true optional: true - /esbuild-linux-mips64le/0.15.16: - resolution: {integrity: sha512-kSJO2PXaxfm0pWY39+YX+QtpFqyyrcp0ZeI8QPTrcFVQoWEPiPVtOfTZeS3ZKedfH+Ga38c4DSzmKMQJocQv6A==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - requiresBuild: true - dev: true - optional: true - /esbuild-linux-ppc64le/0.14.39: resolution: {integrity: sha512-W/5ezaq+rQiQBThIjLMNjsuhPHg+ApVAdTz2LvcuesZFMsJoQAW2hutoyg47XxpWi7aEjJGrkS26qCJKhRn3QQ==} engines: {node: '>=12'} @@ -3000,15 +3099,6 @@ packages: dev: true optional: true - /esbuild-linux-ppc64le/0.15.16: - resolution: {integrity: sha512-NimPikwkBY0yGABw6SlhKrtT35sU4O23xkhlrTT/O6lSxv3Pm5iSc6OYaqVAHWkLdVf31bF4UDVFO+D990WpAA==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /esbuild-linux-riscv64/0.14.39: resolution: {integrity: sha512-IS48xeokcCTKeQIOke2O0t9t14HPvwnZcy+5baG13Z1wxs9ZrC5ig5ypEQQh4QMKxURD5TpCLHw2W42CLuVZaA==} engines: {node: '>=12'} @@ -3027,15 +3117,6 @@ packages: dev: true optional: true - /esbuild-linux-riscv64/0.15.16: - resolution: {integrity: sha512-ty2YUHZlwFOwp7pR+J87M4CVrXJIf5ZZtU/umpxgVJBXvWjhziSLEQxvl30SYfUPq0nzeWKBGw5i/DieiHeKfw==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - requiresBuild: true - dev: true - optional: true - /esbuild-linux-s390x/0.14.39: resolution: {integrity: sha512-zEfunpqR8sMomqXhNTFEKDs+ik7HC01m3M60MsEjZOqaywHu5e5682fMsqOlZbesEAAaO9aAtRBsU7CHnSZWyA==} engines: {node: '>=12'} @@ -3054,15 +3135,6 @@ packages: dev: true optional: true - /esbuild-linux-s390x/0.15.16: - resolution: {integrity: sha512-VkZaGssvPDQtx4fvVdZ9czezmyWyzpQhEbSNsHZZN0BHvxRLOYAQ7sjay8nMQwYswP6O2KlZluRMNPYefFRs+w==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - requiresBuild: true - dev: true - optional: true - /esbuild-netbsd-64/0.14.39: resolution: {integrity: sha512-Uo2suJBSIlrZCe4E0k75VDIFJWfZy+bOV6ih3T4MVMRJh1lHJ2UyGoaX4bOxomYN3t+IakHPyEoln1+qJ1qYaA==} engines: {node: '>=12'} @@ -3081,15 +3153,6 @@ packages: dev: true optional: true - /esbuild-netbsd-64/0.15.16: - resolution: {integrity: sha512-ElQ9rhdY51et6MJTWrCPbqOd/YuPowD7Cxx3ee8wlmXQQVW7UvQI6nSprJ9uVFQISqSF5e5EWpwWqXZsECLvXg==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - requiresBuild: true - dev: true - optional: true - /esbuild-openbsd-64/0.14.39: resolution: {integrity: sha512-secQU+EpgUPpYjJe3OecoeGKVvRMLeKUxSMGHnK+aK5uQM3n1FPXNJzyz1LHFOo0WOyw+uoCxBYdM4O10oaCAA==} engines: {node: '>=12'} @@ -3108,15 +3171,6 @@ packages: dev: true optional: true - /esbuild-openbsd-64/0.15.16: - resolution: {integrity: sha512-KgxMHyxMCT+NdLQE1zVJEsLSt2QQBAvJfmUGDmgEq8Fvjrf6vSKB00dVHUEDKcJwMID6CdgCpvYNt999tIYhqA==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - requiresBuild: true - dev: true - optional: true - /esbuild-sunos-64/0.14.39: resolution: {integrity: sha512-qHq0t5gePEDm2nqZLb+35p/qkaXVS7oIe32R0ECh2HOdiXXkj/1uQI9IRogGqKkK+QjDG+DhwiUw7QoHur/Rwg==} engines: {node: '>=12'} @@ -3135,15 +3189,6 @@ packages: dev: true optional: true - /esbuild-sunos-64/0.15.16: - resolution: {integrity: sha512-exSAx8Phj7QylXHlMfIyEfNrmqnLxFqLxdQF6MBHPdHAjT7fsKaX6XIJn+aQEFiOcE4X8e7VvdMCJ+WDZxjSRQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - requiresBuild: true - dev: true - optional: true - /esbuild-windows-32/0.14.39: resolution: {integrity: sha512-XPjwp2OgtEX0JnOlTgT6E5txbRp6Uw54Isorm3CwOtloJazeIWXuiwK0ONJBVb/CGbiCpS7iP2UahGgd2p1x+Q==} engines: {node: '>=12'} @@ -3162,15 +3207,6 @@ packages: dev: true optional: true - /esbuild-windows-32/0.15.16: - resolution: {integrity: sha512-zQgWpY5pUCSTOwqKQ6/vOCJfRssTvxFuEkpB4f2VUGPBpdddZfdj8hbZuFRdZRPIVHvN7juGcpgCA/XCF37mAQ==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - /esbuild-windows-64/0.14.39: resolution: {integrity: sha512-E2wm+5FwCcLpKsBHRw28bSYQw0Ikxb7zIMxw3OPAkiaQhLVr3dnVO8DofmbWhhf6b97bWzg37iSZ45ZDpLw7Ow==} engines: {node: '>=12'} @@ -3189,15 +3225,6 @@ packages: dev: true optional: true - /esbuild-windows-64/0.15.16: - resolution: {integrity: sha512-HjW1hHRLSncnM3MBCP7iquatHVJq9l0S2xxsHHj4yzf4nm9TU4Z7k4NkeMlD/dHQ4jPlQQhwcMvwbJiOefSuZw==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - /esbuild-windows-arm64/0.14.39: resolution: {integrity: sha512-sBZQz5D+Gd0EQ09tZRnz/PpVdLwvp/ufMtJ1iDFYddDaPpZXKqPyaxfYBLs3ueiaksQ26GGa7sci0OqFzNs7KA==} engines: {node: '>=12'} @@ -3216,15 +3243,6 @@ packages: dev: true optional: true - /esbuild-windows-arm64/0.15.16: - resolution: {integrity: sha512-oCcUKrJaMn04Vxy9Ekd8x23O8LoU01+4NOkQ2iBToKgnGj5eo1vU9i27NQZ9qC8NFZgnQQZg5oZWAejmbsppNA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - /esbuild/0.14.39: resolution: {integrity: sha512-2kKujuzvRWYtwvNjYDY444LQIA3TyJhJIX3Yo4+qkFlDDtGlSicWgeHVJqMUP/2sSfH10PGwfsj+O2ro1m10xQ==} engines: {node: '>=12'} @@ -3281,34 +3299,34 @@ packages: esbuild-windows-arm64: 0.14.51 dev: true - /esbuild/0.15.16: - resolution: {integrity: sha512-o6iS9zxdHrrojjlj6pNGC2NAg86ECZqIETswTM5KmJitq+R1YmahhWtMumeQp9lHqJaROGnsBi2RLawGnfo5ZQ==} + /esbuild/0.16.3: + resolution: {integrity: sha512-71f7EjPWTiSguen8X/kxEpkAS7BFHwtQKisCDDV3Y4GLGWBaoSCyD5uXkaUew6JDzA9FEN1W23mdnSwW9kqCeg==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': 0.15.16 - '@esbuild/linux-loong64': 0.15.16 - esbuild-android-64: 0.15.16 - esbuild-android-arm64: 0.15.16 - esbuild-darwin-64: 0.15.16 - esbuild-darwin-arm64: 0.15.16 - esbuild-freebsd-64: 0.15.16 - esbuild-freebsd-arm64: 0.15.16 - esbuild-linux-32: 0.15.16 - esbuild-linux-64: 0.15.16 - esbuild-linux-arm: 0.15.16 - esbuild-linux-arm64: 0.15.16 - esbuild-linux-mips64le: 0.15.16 - esbuild-linux-ppc64le: 0.15.16 - esbuild-linux-riscv64: 0.15.16 - esbuild-linux-s390x: 0.15.16 - esbuild-netbsd-64: 0.15.16 - esbuild-openbsd-64: 0.15.16 - esbuild-sunos-64: 0.15.16 - esbuild-windows-32: 0.15.16 - esbuild-windows-64: 0.15.16 - esbuild-windows-arm64: 0.15.16 + '@esbuild/android-arm': 0.16.3 + '@esbuild/android-arm64': 0.16.3 + '@esbuild/android-x64': 0.16.3 + '@esbuild/darwin-arm64': 0.16.3 + '@esbuild/darwin-x64': 0.16.3 + '@esbuild/freebsd-arm64': 0.16.3 + '@esbuild/freebsd-x64': 0.16.3 + '@esbuild/linux-arm': 0.16.3 + '@esbuild/linux-arm64': 0.16.3 + '@esbuild/linux-ia32': 0.16.3 + '@esbuild/linux-loong64': 0.16.3 + '@esbuild/linux-mips64el': 0.16.3 + '@esbuild/linux-ppc64': 0.16.3 + '@esbuild/linux-riscv64': 0.16.3 + '@esbuild/linux-s390x': 0.16.3 + '@esbuild/linux-x64': 0.16.3 + '@esbuild/netbsd-x64': 0.16.3 + '@esbuild/openbsd-x64': 0.16.3 + '@esbuild/sunos-x64': 0.16.3 + '@esbuild/win32-arm64': 0.16.3 + '@esbuild/win32-ia32': 0.16.3 + '@esbuild/win32-x64': 0.16.3 dev: true /escalade/3.1.1: @@ -3342,7 +3360,7 @@ packages: eslint: 8.28.0 dev: true - /eslint-config-standard-with-typescript/23.0.0_lwp7uu2ndga6sqsuliw5ylzib4: + /eslint-config-standard-with-typescript/23.0.0_za3thqml7owxv5cykgkehccevm: resolution: {integrity: sha512-iaaWifImn37Z1OXbNW1es7KI+S7D408F9ys0bpaQf2temeBWlvb0Nc5qHkOgYaRb5QxTZT32GGeN1gtswASOXA==} peerDependencies: '@typescript-eslint/eslint-plugin': ^5.0.0 @@ -3352,14 +3370,14 @@ packages: eslint-plugin-promise: ^6.0.0 typescript: '*' dependencies: - '@typescript-eslint/eslint-plugin': 5.45.0_czs5uoqkd3podpy6vgtsxfc7au - '@typescript-eslint/parser': 5.45.0_hsf322ms6xhhd4b5ne6lb74y4a + '@typescript-eslint/eslint-plugin': 5.45.0_wke4plxjew2ogjxrdwvzd2srfq + '@typescript-eslint/parser': 5.45.0_wy4udjehnvkneqnogzx5kughki eslint: 8.28.0 eslint-config-standard: 17.0.0_5dakk4wnrkkieagghiqvu5yn4y eslint-plugin-import: 2.26.0_vbnhqcxlbs7ynbxw44hu2vq7eq eslint-plugin-n: 15.5.1_eslint@8.28.0 eslint-plugin-promise: 6.1.1_eslint@8.28.0 - typescript: 4.9.3 + typescript: 4.9.4 transitivePeerDependencies: - supports-color dev: true @@ -3378,17 +3396,17 @@ packages: eslint-plugin-promise: 6.1.1_eslint@8.28.0 dev: true - /eslint-etc/5.2.0_hsf322ms6xhhd4b5ne6lb74y4a: + /eslint-etc/5.2.0_wy4udjehnvkneqnogzx5kughki: resolution: {integrity: sha512-Gcm/NMa349FOXb1PEEfNMMyIANuorIc2/mI5Vfu1zENNsz+FBVhF62uY6gPUCigm/xDOc8JOnl+71WGnlzlDag==} peerDependencies: eslint: ^8.0.0 typescript: ^4.0.0 dependencies: - '@typescript-eslint/experimental-utils': 5.45.0_hsf322ms6xhhd4b5ne6lb74y4a + '@typescript-eslint/experimental-utils': 5.45.0_wy4udjehnvkneqnogzx5kughki eslint: 8.28.0 - tsutils: 3.21.0_typescript@4.9.3 - tsutils-etc: 1.4.1_6srv2tajnzf4k7zj2br63blj3e - typescript: 4.9.3 + tsutils: 3.21.0_typescript@4.9.4 + tsutils-etc: 1.4.1_cls2tekvgzl55omjuqfocrchqe + typescript: 4.9.4 transitivePeerDependencies: - supports-color dev: true @@ -3423,7 +3441,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.45.0_hsf322ms6xhhd4b5ne6lb74y4a + '@typescript-eslint/parser': 5.45.0_wy4udjehnvkneqnogzx5kughki debug: 3.2.7 eslint: 8.28.0 eslint-import-resolver-node: 0.3.6 @@ -3442,20 +3460,20 @@ packages: regexpp: 3.2.0 dev: true - /eslint-plugin-etc/2.0.2_hsf322ms6xhhd4b5ne6lb74y4a: + /eslint-plugin-etc/2.0.2_wy4udjehnvkneqnogzx5kughki: resolution: {integrity: sha512-g3b95LCdTCwZA8On9EICYL8m1NMWaiGfmNUd/ftZTeGZDXrwujKXUr+unYzqKjKFo1EbqJ31vt+Dqzrdm/sUcw==} peerDependencies: eslint: ^8.0.0 typescript: ^4.0.0 dependencies: - '@phenomnomnominal/tsquery': 4.2.0_typescript@4.9.3 - '@typescript-eslint/experimental-utils': 5.45.0_hsf322ms6xhhd4b5ne6lb74y4a + '@phenomnomnominal/tsquery': 4.2.0_typescript@4.9.4 + '@typescript-eslint/experimental-utils': 5.45.0_wy4udjehnvkneqnogzx5kughki eslint: 8.28.0 - eslint-etc: 5.2.0_hsf322ms6xhhd4b5ne6lb74y4a + eslint-etc: 5.2.0_wy4udjehnvkneqnogzx5kughki requireindex: 1.2.0 tslib: 2.4.1 - tsutils: 3.21.0_typescript@4.9.3 - typescript: 4.9.3 + tsutils: 3.21.0_typescript@4.9.4 + typescript: 4.9.4 transitivePeerDependencies: - supports-color dev: true @@ -3470,7 +3488,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.45.0_hsf322ms6xhhd4b5ne6lb74y4a + '@typescript-eslint/parser': 5.45.0_wy4udjehnvkneqnogzx5kughki array-includes: 3.1.6 array.prototype.flat: 1.3.1 debug: 2.6.9 @@ -4143,13 +4161,13 @@ packages: resolution: {integrity: sha512-Pg7yAvasl8QRsymK/m0S184fDPiz03/VOAdbRbHdsaFcp41drGh9NdzG2jLJHpRuNoWxL/bH0R4kSULT6DvpSw==} engines: {node: '>=14'} dependencies: - '@typescript-eslint/eslint-plugin': 5.45.0_czs5uoqkd3podpy6vgtsxfc7au - '@typescript-eslint/parser': 5.45.0_hsf322ms6xhhd4b5ne6lb74y4a + '@typescript-eslint/eslint-plugin': 5.45.0_wke4plxjew2ogjxrdwvzd2srfq + '@typescript-eslint/parser': 5.45.0_wy4udjehnvkneqnogzx5kughki eslint: 8.28.0 eslint-config-prettier: 8.5.0_eslint@8.28.0 eslint-config-standard: 17.0.0_5dakk4wnrkkieagghiqvu5yn4y - eslint-config-standard-with-typescript: 23.0.0_lwp7uu2ndga6sqsuliw5ylzib4 - eslint-plugin-etc: 2.0.2_hsf322ms6xhhd4b5ne6lb74y4a + eslint-config-standard-with-typescript: 23.0.0_za3thqml7owxv5cykgkehccevm + eslint-plugin-etc: 2.0.2_wy4udjehnvkneqnogzx5kughki eslint-plugin-import: 2.26.0_vbnhqcxlbs7ynbxw44hu2vq7eq eslint-plugin-jsdoc: 39.6.4_eslint@8.28.0 eslint-plugin-n: 15.5.1_eslint@8.28.0 @@ -4158,10 +4176,10 @@ packages: eslint-plugin-react: 7.31.11_eslint@8.28.0 eslint-plugin-react-hooks: 4.6.0_eslint@8.28.0 eslint-plugin-unicorn: 44.0.2_eslint@8.28.0 - lint-staged: 13.0.4 - prettier: 2.8.0 + lint-staged: 13.1.0 + prettier: 2.8.1 simple-git-hooks: 2.8.1 - typescript: 4.9.3 + typescript: 4.9.4 transitivePeerDependencies: - enquirer - eslint-import-resolver-typescript @@ -4795,8 +4813,8 @@ packages: /lines-and-columns/1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - /lint-staged/13.0.4: - resolution: {integrity: sha512-HxlHCXoYRsq9QCby5wFozmZW00hMs/9e3l+/dz6Qr8Kle4UH0kJTdABAbqhzG+3pcG6QjL9kz7NgGBfph+a5dw==} + /lint-staged/13.1.0: + resolution: {integrity: sha512-pn/sR8IrcF/T0vpWLilih8jmVouMlxqXxKuAojmbiGX5n/gDnz+abdPptlj0vYnbfE0SQNl3CY/HwtM0+yfOVQ==} engines: {node: ^14.13.1 || >=16.0.0} hasBin: true dependencies: @@ -4832,7 +4850,7 @@ packages: log-update: 4.0.0 p-map: 4.0.0 rfdc: 1.3.0 - rxjs: 7.5.7 + rxjs: 7.6.0 through: 2.3.8 wrap-ansi: 7.0.0 dev: true @@ -5874,8 +5892,8 @@ packages: hasBin: true dev: true - /prettier/2.8.0: - resolution: {integrity: sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==} + /prettier/2.8.1: + resolution: {integrity: sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg==} engines: {node: '>=10.13.0'} hasBin: true dev: true @@ -5924,7 +5942,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 18.11.10 + '@types/node': 18.11.12 long: 5.2.1 /proxy-from-env/1.1.0: @@ -6200,6 +6218,12 @@ packages: dependencies: tslib: 2.4.1 + /rxjs/7.6.0: + resolution: {integrity: sha512-DDa7d8TFNUalGC9VqXvQ1euWNN7sc63TrUCuM9J998+ViviahMIjKSOU7rfcgFOF+FCD71BhDRv4hrFz+ImDLQ==} + dependencies: + tslib: 2.4.1 + dev: true + /sade/1.8.1: resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} engines: {node: '>=6'} @@ -6820,7 +6844,7 @@ packages: /tslib/2.4.1: resolution: {integrity: sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==} - /tsutils-etc/1.4.1_6srv2tajnzf4k7zj2br63blj3e: + /tsutils-etc/1.4.1_cls2tekvgzl55omjuqfocrchqe: resolution: {integrity: sha512-6UPYgc7OXcIW5tFxlsZF3OVSBvDInl/BkS3Xsu64YITXk7WrnWTVByKWPCThFDBp5gl5IGHOzGMdQuDCE7OL4g==} hasBin: true peerDependencies: @@ -6828,19 +6852,19 @@ packages: typescript: ^4.0.0 dependencies: '@types/yargs': 17.0.15 - tsutils: 3.21.0_typescript@4.9.3 - typescript: 4.9.3 + tsutils: 3.21.0_typescript@4.9.4 + typescript: 4.9.4 yargs: 17.6.2 dev: true - /tsutils/3.21.0_typescript@4.9.3: + /tsutils/3.21.0_typescript@4.9.4: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 4.9.3 + typescript: 4.9.4 dev: true /tunnel-agent/0.6.0: @@ -6900,10 +6924,10 @@ packages: peerDependencies: typedoc: 0.22.x || 0.23.x dependencies: - typedoc: 0.23.21_typescript@4.9.3 + typedoc: 0.23.21_typescript@4.9.4 dev: false - /typedoc/0.23.21_typescript@4.9.3: + /typedoc/0.23.21_typescript@4.9.4: resolution: {integrity: sha512-VNE9Jv7BgclvyH9moi2mluneSviD43dCE9pY8RWkO88/DrEgJZk9KpUk7WO468c9WWs/+aG6dOnoH7ccjnErhg==} engines: {node: '>= 14.14'} hasBin: true @@ -6914,17 +6938,11 @@ packages: marked: 4.2.3 minimatch: 5.1.1 shiki: 0.11.1 - typescript: 4.9.3 + typescript: 4.9.4 dev: false - /typescript/4.8.4: - resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==} - engines: {node: '>=4.2.0'} - hasBin: true - dev: true - - /typescript/4.9.3: - resolution: {integrity: sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==} + /typescript/4.9.4: + resolution: {integrity: sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==} engines: {node: '>=4.2.0'} hasBin: true @@ -7121,8 +7139,8 @@ packages: resolution: {integrity: sha512-y38RiVOEJPmqSSQniVPKQrWE8XocqeRWO9TwgfXTMARzQa3aGwsaBwUdOBn5MJukZwIkGOYsljK76kMGLu5aOA==} dev: false - /wrangler/2.5.0: - resolution: {integrity: sha512-7Y7Vh4yi1Vpa/o2o48VgWMv6G/3u8SPR3CJEWgntL4zPZog7iIxl0R2QjthWpsPHI7+PK6cFtnpSaSrcdEk+vw==} + /wrangler/2.6.2: + resolution: {integrity: sha512-+in4oEQXDs6+vE+1c6niBd3IrW1DMRTbauR6G0u3TpD6UaXOLwLdBxRLEbN3m82dN+WNm7l1MbFZrKc/TnWjhw==} engines: {node: '>=16.13.0'} hasBin: true dependencies: