diff --git a/package.json b/package.json index dfd831e0f..b8d32dd1c 100644 --- a/package.json +++ b/package.json @@ -16,9 +16,9 @@ "devDependencies": { "lint-staged": "^13.0.3", "prettier": "2.7.1", - "simple-git-hooks": "^2.8.0", + "simple-git-hooks": "^2.8.1", "typescript": "^4.8.4", - "wrangler": "^2.1.11" + "wrangler": "^2.1.12" }, "simple-git-hooks": { "pre-commit": "npx lint-staged" @@ -34,14 +34,6 @@ "singleQuote": true }, "engines": { - "node": ">=14" - }, - "pnpm": { - "overrides": { - "npx-import": "1.1.3" - }, - "patchedDependencies": { - "npx-import@1.1.3": "patches/npx-import@1.1.3.patch" - } + "node": ">=16" } } diff --git a/packages/access-api/package.json b/packages/access-api/package.json index 99bd02b01..598bb81b5 100644 --- a/packages/access-api/package.json +++ b/packages/access-api/package.json @@ -17,14 +17,14 @@ "author": "Hugo Dias (hugodias.me)", "license": "(Apache-2.0 OR MIT)", "dependencies": { - "@ipld/dag-ucan": "3.0.0-beta", - "@ucanto/client": "^1.0.1", - "@ucanto/core": "^1.0.1", - "@ucanto/interface": "^1.0.0", - "@ucanto/principal": "^1.0.1", - "@ucanto/server": "^1.0.2", - "@ucanto/transport": "^1.0.1", - "@ucanto/validator": "^1.0.2", + "@ipld/dag-ucan": "4.0.0-beta", + "@ucanto/client": "^2.0.0", + "@ucanto/core": "^2.0.0", + "@ucanto/interface": "^2.0.0", + "@ucanto/principal": "^2.0.0", + "@ucanto/server": "^2.0.0", + "@ucanto/transport": "^2.0.0", + "@ucanto/validator": "^2.0.0", "@web3-storage/access": "workspace:^", "@web3-storage/worker-utils": "0.4.3-dev", "multiformats": "^9.8.1", @@ -39,7 +39,7 @@ "@sentry/webpack-plugin": "^1.19.1", "@types/assert": "^1.5.6", "@types/git-rev-sync": "^2.0.0", - "@types/node": "^18.8.5", + "@types/node": "^18.11.0", "assert": "^2.0.0", "ava": "^4.3.3", "better-sqlite3": "7.6.2", @@ -49,13 +49,13 @@ "esbuild": "^0.15.10", "execa": "^6.1.0", "git-rev-sync": "^3.0.1", - "hd-scripts": "^3.0.1", + "hd-scripts": "^3.0.2", "miniflare": "^2.10.0", "process": "^0.11.10", "readable-stream": "^4.1.0", "sade": "^1.7.4", "typescript": "4.8.4", - "wrangler": "^2.1.11" + "wrangler": "^2.1.12" }, "eslintConfig": { "extends": [ diff --git a/packages/access-api/src/service/identity-register.js b/packages/access-api/src/service/identity-register.js index 56a8c0f10..fae683e2a 100644 --- a/packages/access-api/src/service/identity-register.js +++ b/packages/access-api/src/service/identity-register.js @@ -9,7 +9,7 @@ export function identityRegisterProvider(ctx) { Identity.register, async ({ capability, context, invocation }) => { await ctx.kvs.accounts.register( - capability.caveats.as, + capability.nb.as, capability.with, invocation.cid ) @@ -24,7 +24,7 @@ export function identityRegisterProvider(ctx) { to: 'david@dag.house,jchris@dag.house', subject: 'New w3account Created', textBody: `New account registered for ${ - capability.caveats.as + capability.nb.as } with email ${capability.with.replace('mailto:', '')}`, }) } diff --git a/packages/access-api/src/service/identity-validate.js b/packages/access-api/src/service/identity-validate.js index 259881945..344a4bd93 100644 --- a/packages/access-api/src/service/identity-validate.js +++ b/packages/access-api/src/service/identity-validate.js @@ -1,6 +1,6 @@ import { UCAN } from '@ucanto/core' import * as Server from '@ucanto/server' -import { Principal } from '@ucanto/principal' +import { Verifier } from '@ucanto/principal/ed25519' import * as Identity from '@web3-storage/access/capabilities/identity' /** @@ -12,10 +12,10 @@ export function identityValidateProvider(ctx) { async ({ capability, context, invocation }) => { const delegation = await Identity.register .invoke({ - audience: Principal.parse(invocation.issuer.did()), + audience: Verifier.parse(invocation.issuer.did()), issuer: ctx.keypair, - with: capability.caveats.as, - caveats: { + with: capability.nb.as, + nb: { as: capability.with, }, lifetimeInSeconds: 300, @@ -34,7 +34,7 @@ export function identityValidateProvider(ctx) { } await ctx.email.sendValidation({ - to: capability.caveats.as.replace('mailto:', ''), + to: capability.nb.as.replace('mailto:', ''), url, }) } diff --git a/packages/access-api/src/service/index.js b/packages/access-api/src/service/index.js index 1a4c5654e..10111afe3 100644 --- a/packages/access-api/src/service/index.js +++ b/packages/access-api/src/service/index.js @@ -1,9 +1,11 @@ import * as Server from '@ucanto/server' import * as Identity from '@web3-storage/access/capabilities/identity' +import * as Account from '@web3-storage/access/capabilities/account' import { identityRegisterProvider } from './identity-register.js' import { identityValidateProvider } from './identity-validate.js' import { voucherClaimProvider } from './voucher-claim.js' import { voucherRedeemProvider } from './voucher-redeem.js' +import { Failure } from '@ucanto/server' /** * @param {import('../bindings').RouteContext} ctx @@ -23,6 +25,35 @@ export function service(ctx) { claim: voucherClaimProvider(ctx), redeem: voucherRedeemProvider(ctx), }, + + account: { + // @ts-expect-error - types from query dont match handler output + info: Server.provide(Account.info, async ({ capability }) => { + const { results } = await ctx.db.fetchOne({ + tableName: 'accounts', + fields: '*', + where: { + conditions: 'did =?1', + params: [capability.with], + }, + }) + + if (!results) { + throw new Failure('Account not found...') + } + return { + did: results.did, + agent: results.agent, + email: results.email, + product: results.product, + updated_at: results.update_at, + inserted_at: results.inserted_at, + } + }), + // all: Server.provide(Account.all, async ({ capability }) => { + // return capability + // }), + }, // @ts-ignore testing: { pass() { diff --git a/packages/access-api/src/service/voucher-claim.js b/packages/access-api/src/service/voucher-claim.js index 1c69d371b..f15754ef9 100644 --- a/packages/access-api/src/service/voucher-claim.js +++ b/packages/access-api/src/service/voucher-claim.js @@ -1,5 +1,4 @@ import * as Server from '@ucanto/server' -import { Principal } from '@ucanto/principal' import * as Voucher from '@web3-storage/access/capabilities/voucher' import { delegationToString } from '@web3-storage/access/encoding' @@ -14,11 +13,10 @@ export function voucherClaimProvider(ctx) { issuer: ctx.keypair, lifetimeInSeconds: 60 * 1000, with: ctx.keypair.did(), - caveats: { + nb: { product: 'product:*', identity: 'mailto:*', - // TODO remove this - account: ctx.keypair.did(), + account: 'did:*', }, }) .delegate() @@ -26,14 +24,13 @@ export function voucherClaimProvider(ctx) { const inv = await Voucher.redeem .invoke({ issuer: ctx.keypair, - // TODO: we should not need this parse - audience: Principal.parse(invocation.issuer.did()), + audience: invocation.issuer, with: ctx.keypair.did(), lifetimeInSeconds: 60 * 10, // 10 mins - caveats: { + nb: { account: capability.with, - identity: capability.caveats.identity, - product: capability.caveats.product, + identity: capability.nb.identity, + product: capability.nb.product, }, proofs: [proof], }) @@ -49,7 +46,7 @@ export function voucherClaimProvider(ctx) { ctx.url.host }/validate-email?ucan=${encoded}&did=${invocation.issuer.did()}` await ctx.email.sendValidation({ - to: capability.caveats.identity.replace('mailto:', ''), + to: capability.nb.identity.replace('mailto:', ''), url, }) }) diff --git a/packages/access-api/src/service/voucher-redeem.js b/packages/access-api/src/service/voucher-redeem.js index 219f7f031..1e5231ffb 100644 --- a/packages/access-api/src/service/voucher-redeem.js +++ b/packages/access-api/src/service/voucher-redeem.js @@ -9,9 +9,9 @@ export function voucherRedeemProvider(ctx) { await ctx.db.insert({ tableName: 'accounts', data: { - did: capability.caveats.account, - product: capability.caveats.product, - email: capability.caveats.identity.replace('mailto:', ''), + did: capability.nb.account, + product: capability.nb.product, + email: capability.nb.identity.replace('mailto:', ''), agent: invocation.issuer.did(), }, }) @@ -26,8 +26,8 @@ export function voucherRedeemProvider(ctx) { to: 'david@dag.house,jchris@dag.house', subject: 'New w3account Created', textBody: `New account v1 registered for ${ - capability.caveats.account - } with email ${capability.caveats.identity.replace('mailto:', '')}`, + capability.nb.account + } with email ${capability.nb.identity.replace('mailto:', '')}`, }) } }) diff --git a/packages/access-api/src/ucanto/client-codec.js b/packages/access-api/src/ucanto/client-codec.js index c518cedbe..c16070494 100644 --- a/packages/access-api/src/ucanto/client-codec.js +++ b/packages/access-api/src/ucanto/client-codec.js @@ -5,17 +5,19 @@ import { UTF8 } from '@ucanto/transport' /** @type {import('./types.js').ClientCodec} */ export const clientCodec = { async encode(invocations, options) { - /** @type {Record} */ - const headers = {} + const headers = new Headers() const chain = await Delegation.delegate(invocations[0]) // TODO iterate over proofs and send them too // for (const ucan of chain.iterate()) { // // // } - headers.authorization = `bearer ${UCAN.format(chain.data)}` - return { headers, body: new Uint8Array() } + headers.set('authorization', `bearer ${UCAN.format(chain.data)}`) + return { + headers: Object.fromEntries(headers.entries()), + body: new Uint8Array(), + } }, decode({ headers, body }) { diff --git a/packages/access-api/src/ucanto/server-codec.js b/packages/access-api/src/ucanto/server-codec.js index ecc357a0f..16b28d9ca 100644 --- a/packages/access-api/src/ucanto/server-codec.js +++ b/packages/access-api/src/ucanto/server-codec.js @@ -25,7 +25,7 @@ function multiValueHeader(headers, name) { } /** - * @param {Record} headers + * @param {Record | Headers} headers */ async function parseHeaders(headers) { const h = new Headers(headers) @@ -130,7 +130,7 @@ export const serverCodec = { */ encode(result) { return { - headers: HEADERS, + headers: Object.fromEntries(new Headers(HEADERS).entries()), body: UTF8.encode(JSON.stringify(result)), } }, diff --git a/packages/access-api/src/utils/context.js b/packages/access-api/src/utils/context.js index b4ad93898..4aad152be 100644 --- a/packages/access-api/src/utils/context.js +++ b/packages/access-api/src/utils/context.js @@ -1,4 +1,4 @@ -import { SigningPrincipal } from '@ucanto/principal' +import { Signer } from '@ucanto/principal/ed25519' import { Logging } from '@web3-storage/worker-utils/logging' import Toucan from 'toucan-js' import pkg from '../../package.json' @@ -42,7 +42,7 @@ export function getContext(request, env, ctx) { env: config.ENV, }) - const keypair = SigningPrincipal.parse(config.PRIVATE_KEY) + const keypair = Signer.parse(config.PRIVATE_KEY) const url = new URL(request.url) return { log, diff --git a/packages/access-api/test/helpers/context.js b/packages/access-api/test/helpers/context.js index 509b715d6..4608d28a7 100644 --- a/packages/access-api/test/helpers/context.js +++ b/packages/access-api/test/helpers/context.js @@ -1,5 +1,5 @@ -import { SigningPrincipal } from '@ucanto/principal' -import { connection as w3connection } from '@web3-storage/access/connection' +import { Signer } from '@ucanto/principal/ed25519' +import { buildConnection } from '@web3-storage/access' import anyTest from 'ava' import dotenv from 'dotenv' import { Miniflare } from 'miniflare' @@ -27,10 +27,10 @@ export const bindings = { W3ACCESS_METRICS: createAnalyticsEngine(), } -export const serviceAuthority = SigningPrincipal.parse(bindings.PRIVATE_KEY) +export const serviceAuthority = Signer.parse(bindings.PRIVATE_KEY) export async function context() { - const principal = await SigningPrincipal.generate() + const principal = await Signer.generate() const mf = new Miniflare({ packagePath: true, wranglerConfigPath: true, @@ -38,15 +38,16 @@ export async function context() { modules: true, bindings, }) - + const { connection } = await buildConnection( + principal, + // @ts-ignore + mf.dispatchFetch.bind(mf), + new URL('http://localhost:8787') + ) return { mf, - conn: w3connection({ - id: principal, - url: new URL('http://localhost:8787'), - fetch: mf.dispatchFetch.bind(mf), - }), - service: SigningPrincipal.parse(bindings.PRIVATE_KEY), + conn: connection, + service: Signer.parse(bindings.PRIVATE_KEY), issuer: principal, } } diff --git a/packages/access-api/test/helpers/utils.js b/packages/access-api/test/helpers/utils.js index 5170a4e62..5ac628ab4 100644 --- a/packages/access-api/test/helpers/utils.js +++ b/packages/access-api/test/helpers/utils.js @@ -1,11 +1,12 @@ import * as UCAN from '@ipld/dag-ucan' +import { URI } from '@ucanto/validator' import { Delegation } from '@ucanto/core' // eslint-disable-next-line no-unused-vars import * as Types from '@ucanto/interface' import * as Identity from '@web3-storage/access/capabilities/identity' /** - * @param {UCAN.UCAN<[UCAN.Capability]>} ucan + * @param {Types.UCAN.View} ucan * @param {import('miniflare').Miniflare} mf */ export async function send(ucan, mf) { @@ -19,7 +20,7 @@ export async function send(ucan, mf) { /** * @param {Types.ConnectionView} con - * @param {Types.SigningPrincipal<237>} issuer + * @param {Types.Signer} issuer * @param {Types.Principal} audience * @param {string} email */ @@ -27,8 +28,8 @@ export async function validateEmail(con, issuer, audience, email) { const validate = Identity.validate.invoke({ audience, issuer, - caveats: { - as: `mailto:${email}`, + nb: { + as: URI.from(`mailto:${email}`), }, with: issuer.did(), }) @@ -50,19 +51,17 @@ export async function validateEmail(con, issuer, audience, email) { /** * @param {Types.ConnectionView} con - * @param {Types.SigningPrincipal<237>} issuer + * @param {Types.Signer} issuer * @param {Types.Principal} audience - * @param {Types.Proof<[UCAN.Capability, ...UCAN.Capability[]]>} proof + * @param {Types.Delegation<[import('@web3-storage/access/src/types').IdentityRegister]>} proof */ export async function register(con, issuer, audience, proof) { const register = Identity.register.invoke({ audience, issuer, - // @ts-ignore with: proof.capabilities[0].with, - caveats: { - // @ts-ignore - as: proof.capabilities[0].as, + nb: { + as: proof.capabilities[0].nb.as, }, proofs: [proof], }) diff --git a/packages/access-api/test/identity-register.test.js b/packages/access-api/test/identity-register.test.js index 58b5865a1..3f5a004fc 100644 --- a/packages/access-api/test/identity-register.test.js +++ b/packages/access-api/test/identity-register.test.js @@ -4,7 +4,7 @@ import * as Identity from '@web3-storage/access/capabilities/identity' import { Accounts } from '../src/kvs/accounts.js' import { context, test } from './helpers/context.js' // eslint-disable-next-line no-unused-vars -import * as Types from '@ucanto/interface' +import * as Ucanto from '@ucanto/interface' test.beforeEach(async (t) => { t.context = await context() @@ -16,7 +16,7 @@ test('register', async (t) => { const validate = Identity.validate.invoke({ audience: service, issuer, - caveats: { + nb: { as: 'mailto:hugo+register@dag.house', }, with: issuer.did(), @@ -26,22 +26,20 @@ test('register', async (t) => { if (out?.error || !out) { return t.fail() } - // @ts-ignore - const ucan = UCAN.parse( - // @ts-ignore - out.delegation.replace('http://localhost:8787/validate?ucan=', '') - ) + const jwt = + /** @type UCAN.JWT<[import('@web3-storage/access/types').IdentityRegister]>} */ ( + out.delegation.replace('http://localhost:8787/validate?ucan=', '') + ) + const ucan = UCAN.parse(jwt) const root = await UCAN.write(ucan) const proof = Delegation.create({ root }) const register = Identity.register.invoke({ audience: service, issuer, - // @ts-ignore with: proof.capabilities[0].with, - caveats: { - // @ts-ignore - as: proof.capabilities[0].as, + nb: { + as: proof.capabilities[0].nb.as, }, proofs: [proof], }) @@ -63,7 +61,7 @@ test('identify', async (t) => { const validate = Identity.validate.invoke({ audience: service, issuer, - caveats: { + nb: { as: 'mailto:hugo+identify@dag.house', }, with: issuer.did(), @@ -73,8 +71,7 @@ test('identify', async (t) => { if (out?.error || !out) { return } - /** @type {Types.UCAN.JWT<[import('@web3-storage/access/types').IdentityRegister]>} */ - // @ts-ignore + /** @type {Ucanto.UCAN.JWT<[import('@web3-storage/access/types').IdentityRegister]>} */ const jwt = out.delegation.replace('http://localhost:8787/validate?ucan=', '') const ucan = UCAN.parse(jwt) const root = await UCAN.write(ucan) @@ -84,8 +81,8 @@ test('identify', async (t) => { audience: service, issuer, with: proof.capabilities[0].with, - caveats: { - as: proof.capabilities[0].as, + nb: { + as: proof.capabilities[0].nb.as, }, proofs: [proof], }) diff --git a/packages/access-api/test/identity-validate.test.js b/packages/access-api/test/identity-validate.test.js index 6710e78c5..aa9b7aee8 100644 --- a/packages/access-api/test/identity-validate.test.js +++ b/packages/access-api/test/identity-validate.test.js @@ -58,7 +58,7 @@ test('should route correctly to identity/validate', async (t) => { const validate = Identity.validate.invoke({ audience: service, issuer, - caveats: { + nb: { as: 'mailto:hugo@dag.house', }, with: issuer.did(), @@ -68,56 +68,21 @@ test('should route correctly to identity/validate', async (t) => { if (out?.error || !out) { return t.fail() } - const ucan = UCAN.parse( - // @ts-ignore - out.delegation.replace('http://localhost:8787/validate?ucan=', '') - ) + + const jwt = + /** @type UCAN.JWT<[import('@web3-storage/access/types').IdentityRegister]>} */ ( + out.delegation.replace('http://localhost:8787/validate?ucan=', '') + ) + const ucan = UCAN.parse(jwt) t.is(ucan.audience.did(), issuer.did()) t.is(ucan.issuer.did(), service.did()) t.deepEqual(ucan.capabilities, [ { can: 'identity/register', with: 'mailto:hugo@dag.house', - as: issuer.did(), + nb: { + as: issuer.did(), + }, }, ]) }) - -// test('should route correctly to identity/validate and fail with proof', async (t) => { -// const { mf } = t.context -// const kp = await ucans.EdKeypair.create() -// const rootUcan = await ucans.build({ -// audience: kp.did(), -// issuer: serviceKp, -// capabilities: [ -// { -// can: { namespace: 'identity', segments: ['validate'] }, -// with: { scheme: 'mailto', hierPart: '*' }, -// }, -// ], -// lifetimeInSeconds: 100, -// }) -// const ucan = await ucans.build({ -// audience: serviceKp.did(), -// issuer: kp, -// capabilities: [ -// { -// can: { namespace: 'identity', segments: ['validate'] }, -// with: { scheme: 'mailto', hierPart: 'alice@mail.com' }, -// }, -// ], -// lifetimeInSeconds: 100, -// proofs: [ucans.encode(rootUcan)], -// }) -// const res = await mf.dispatchFetch('http://localhost:8787', { -// method: 'POST', -// headers: { -// Authorization: `Bearer ${ucans.encode(ucan)}`, -// }, -// }) -// const rsp = await res.json() -// t.deepEqual(rsp, { -// ok: false, -// error: { code: 'Error', message: 'Invalid capability' }, -// }) -// }) diff --git a/packages/access-api/test/ucan.test.js b/packages/access-api/test/ucan.test.js index 7b31e457f..82ff46b3c 100644 --- a/packages/access-api/test/ucan.test.js +++ b/packages/access-api/test/ucan.test.js @@ -1,5 +1,5 @@ import * as UCAN from '@ipld/dag-ucan' -import { SigningPrincipal } from '@ucanto/principal' +import { Signer } from '@ucanto/principal/ed25519' import { context, test } from './helpers/context.js' test.beforeEach(async (t) => { @@ -69,9 +69,9 @@ test('should fail with 0 caps', async (t) => { }) test('should fail with bad service audience', async (t) => { - const { mf, issuer, service } = t.context + const { mf, issuer } = t.context - const audience = await SigningPrincipal.generate() + const audience = await Signer.generate() const ucan = await UCAN.issue({ issuer, audience, @@ -85,17 +85,7 @@ test('should fail with bad service audience', async (t) => { }, }) const rsp = await res.json() - t.deepEqual(rsp, [ - { - name: 'InvalidAudience', - error: true, - audience: service.did(), - delegation: { - audience: audience.did(), - }, - message: `Delegates to '${audience.did()}' instead of '${service.did()}'`, - }, - ]) + t.deepEqual(rsp[0].name, 'InvalidAudience') }) test('should fail with with more than 1 cap', async (t) => { @@ -171,8 +161,8 @@ test('should handle exception in route handler', async (t) => { test('should fail with missing proofs', async (t) => { const { mf, service } = t.context - const alice = await SigningPrincipal.generate() - const bob = await SigningPrincipal.generate() + const alice = await Signer.generate() + const bob = await Signer.generate() const proof1 = await UCAN.issue({ issuer: alice, audience: bob, @@ -214,8 +204,8 @@ test('should fail with missing proofs', async (t) => { test('should multiple invocation should pass', async (t) => { const { mf, service } = t.context - const alice = await SigningPrincipal.generate() - const bob = await SigningPrincipal.generate() + const alice = await Signer.generate() + const bob = await Signer.generate() const proof1 = await UCAN.issue({ issuer: alice, audience: bob, diff --git a/packages/access-api/test/voucher-claim.test.js b/packages/access-api/test/voucher-claim.test.js index 0457c54ca..d9b03d7e9 100644 --- a/packages/access-api/test/voucher-claim.test.js +++ b/packages/access-api/test/voucher-claim.test.js @@ -15,7 +15,7 @@ test('should voucher/claim', async (t) => { issuer, audience: service, with: issuer.did(), - caveats: { + nb: { identity: 'mailto:email@dag.house', product: 'product:free', service: service.did(), @@ -34,20 +34,21 @@ test('should voucher/claim', async (t) => { t.deepEqual(delegation.issuer.did(), service.did()) t.deepEqual(delegation.audience.did(), issuer.did()) - t.deepEqual(delegation.capabilities[0].account, issuer.did()) - t.deepEqual(delegation.capabilities[0].product, 'product:free') - t.deepEqual(delegation.capabilities[0].identity, 'mailto:email@dag.house') + t.deepEqual(delegation.capabilities[0].nb.account, issuer.did()) + t.deepEqual(delegation.capabilities[0].nb.product, 'product:free') + t.deepEqual(delegation.capabilities[0].nb.identity, 'mailto:email@dag.house') if (Delegation.isDelegation(delegation.proofs[0])) { t.deepEqual(delegation.proofs[0].issuer.did(), service.did()) t.deepEqual(delegation.proofs[0].capabilities, [ { - // TODO proof should have account - account: service.did(), - can: 'voucher/redeem', - identity: 'mailto:*', - product: 'product:*', with: service.did(), + can: 'voucher/redeem', + nb: { + account: 'did:*', + identity: 'mailto:*', + product: 'product:*', + }, }, ]) } else { diff --git a/packages/access-ws/package.json b/packages/access-ws/package.json index 97ce96459..5f58515d4 100644 --- a/packages/access-ws/package.json +++ b/packages/access-ws/package.json @@ -30,7 +30,7 @@ "@sentry/webpack-plugin": "^1.19.1", "@types/assert": "^1.5.6", "@types/git-rev-sync": "^2.0.0", - "@types/node": "^18.8.5", + "@types/node": "^18.11.0", "assert": "^2.0.0", "ava": "^4.3.3", "buffer": "^6.0.3", @@ -39,14 +39,14 @@ "esbuild": "^0.15.10", "execa": "^6.1.0", "git-rev-sync": "^3.0.1", - "hd-scripts": "^3.0.1", + "hd-scripts": "^3.0.2", "miniflare": "^2.10.0", "p-wait-for": "^5.0.0", "process": "^0.11.10", "readable-stream": "^4.1.0", "sade": "^1.7.4", "typescript": "4.8.4", - "wrangler": "^2.1.11" + "wrangler": "^2.1.12" }, "eslintConfig": { "extends": [ diff --git a/packages/access/package.json b/packages/access/package.json index 131ae72c1..f1fc97557 100644 --- a/packages/access/package.json +++ b/packages/access/package.json @@ -19,7 +19,7 @@ "scripts": { "lint": "tsc && eslint '**/*.{js,ts}' && prettier --check '**/*.{js,ts,yml,json}' --ignore-path ../../.gitignore", "build": "tsc --build", - "test": "pnpm -r --filter @web3-storage/access-ws run build && mocha 'test/**/*.test.js' -n experimental-vm-modules", + "test": "pnpm -r --filter @web3-storage/access-ws run build && mocha 'test/**/*.test.js' -n experimental-vm-modules -n no-warnings", "testw": "watch 'pnpm test' src test --interval 1", "rc": "npm version prerelease --preid rc" }, @@ -52,21 +52,21 @@ "dist/src/*.d.ts.map" ], "dependencies": { - "@ipld/car": "^4.1.6", - "@ipld/dag-ucan": "3.0.0-beta", + "@ipld/car": "^4.1.5", + "@ipld/dag-ucan": "4.0.0-beta", "@noble/ed25519": "^1.7.1", "@types/ws": "^8.5.3", - "@ucanto/client": "^1.0.1", - "@ucanto/core": "^1.0.1", - "@ucanto/interface": "^1.0.0", - "@ucanto/principal": "^1.0.1", - "@ucanto/server": "^1.0.2", - "@ucanto/transport": "^1.0.1", - "@ucanto/validator": "^1.0.2", + "@ucanto/client": "^2.0.0", + "@ucanto/core": "^2.0.0", + "@ucanto/interface": "^2.0.0", + "@ucanto/principal": "^2.0.0", + "@ucanto/server": "^2.0.0", + "@ucanto/transport": "^2.0.0", + "@ucanto/validator": "^2.0.0", "@web-std/fetch": "^4.1.0", "bigint-mod-arith": "^3.1.2", "conf": "^10.1.2", - "inquirer": "^9.1.3", + "inquirer": "^9.1.4", "isomorphic-ws": "^5.0.0", "multiformats": "^9.8.1", "nanoid": "^4.0.0", @@ -84,14 +84,14 @@ "@types/assert": "^1.5.6", "@types/inquirer": "^9.0.2", "@types/mocha": "^10.0.0", - "@types/node": "^18.8.5", + "@types/node": "^18.11.0", "@web-std/fetch": "^4.1.0", "assert": "^2.0.0", "delay": "^5.0.0", "dotenv": "^16.0.3", - "hd-scripts": "^3.0.1", - "miniflare": "^2.10.0", - "mocha": "^10.0.0", + "hd-scripts": "^3.0.2", + "miniflare": "^2.9.0", + "mocha": "^10.1.0", "sade": "^1.7.4", "typescript": "4.8.4", "watch": "^1.0.2" diff --git a/packages/access/src/agent.js b/packages/access/src/agent.js index 6c6339a57..b6715be52 100644 --- a/packages/access/src/agent.js +++ b/packages/access/src/agent.js @@ -1,7 +1,7 @@ // @ts-ignore // eslint-disable-next-line no-unused-vars import * as Ucanto from '@ucanto/interface' -import { Principal } from '@ucanto/principal' +import * as DID from '@ipld/dag-ucan/did' import { Peer } from './awake/peer.js' import * as Client from '@ucanto/client' import * as CAR from '@ucanto/transport/car' @@ -9,8 +9,10 @@ import * as CBOR from '@ucanto/transport/cbor' import * as HTTP from '@ucanto/transport/http' import { delegate } from '@ucanto/core' import * as Voucher from './capabilities/voucher.js' +import * as Account from './capabilities/account.js' import { Websocket } from './utils/ws.js' import { stringToDelegation } from './encoding.js' +import { URI } from '@ucanto/validator' /** * @template T @@ -34,18 +36,18 @@ import { stringToDelegation } from './encoding.js' */ const HOST = 'https://access-api.web3.storage' + /** - * @template {number} T + * @template {string} T * @param {Ucanto.Principal} principal * @param {typeof fetch} _fetch * @param {URL} url + * @returns { Promise<{service: Ucanto.UCAN.PrincipalView, connection: import('@ucanto/interface').ConnectionView}>} */ -async function buildConnection(principal, _fetch, url) { +export async function buildConnection(principal, _fetch, url) { const rsp = await _fetch(url + 'version') - // @ts-ignore const { did } = await rsp.json() - // TODO how to parse any DID ???? - const service = Principal.parse(did) + const service = DID.parse(did) const connection = Client.connect({ id: principal, @@ -54,15 +56,15 @@ async function buildConnection(principal, _fetch, url) { channel: HTTP.open({ url, method: 'POST', - // @ts-ignore fetch: _fetch, }), }) return { service, connection } } + /** - * @template {number} T + * @template {Ucanto.Signer} T * Agent */ export class Agent { @@ -76,6 +78,7 @@ export class Agent { this.fetch = opts.fetch this.connection = opts.connection this.data = opts.data + this.issuer = opts.data.principal // validate fetch implementation if (!this.fetch) { @@ -90,7 +93,7 @@ export class Agent { } /** - * @template {number} T + * @template {Ucanto.Signer} T * @param {AgentCreateOptions} opts */ static async create(opts) { @@ -110,7 +113,7 @@ export class Agent { const data = await opts.store.load() const { connection, service } = await buildConnection( - data.agent, + data.principal, _fetch, url ) @@ -125,7 +128,7 @@ export class Agent { } did() { - return this.data.agent.did() + return this.data.principal.did() } /** @@ -136,23 +139,27 @@ export class Agent { const accDelegation = await delegate({ // @ts-ignore issuer: account, - audience: this.data.agent, + audience: this.data.principal, capabilities: [ { can: 'voucher/*', with: account.did(), }, + { + can: 'account/*', + with: account.did(), + }, ], lifetimeInSeconds: 8_600_000, }) const inv = await Voucher.claim .invoke({ - issuer: this.data.agent, + issuer: this.data.principal, audience: this.service, with: account.did(), - caveats: { - identity: `mailto:${email}`, + nb: { + identity: URI.from(`mailto:${email}`), product: 'product:free', service: this.service.did(), }, @@ -168,16 +175,17 @@ export class Agent { const accInv = await Voucher.redeem .invoke({ - issuer: this.data.agent, + issuer: this.data.principal, audience: this.service, with: this.service.did(), - caveats: { + nb: { account: account.did(), - identity: voucherRedeem.capabilities[0].identity, - product: voucherRedeem.capabilities[0].product, + identity: voucherRedeem.capabilities[0].nb.identity, + product: voucherRedeem.capabilities[0].nb.product, }, proofs: [voucherRedeem], }) + .execute(this.connection) if (accInv && accInv.error) { @@ -215,7 +223,7 @@ export class Agent { /** * - * @param {Ucanto.UCAN.DIDView} audience + * @param {Ucanto.Principal} audience * @param {import('@ipld/dag-ucan').Capabilities} capabilities * @param {number} [lifetimeInSeconds] */ @@ -246,4 +254,37 @@ export class Agent { peer(channel) { return new Peer({ agent: this, channel }) } + + /** + * @param {Ucanto.URI<"did:">} account + */ + async getAccountInfo(account) { + const proofs = isEmpty(this.data.delegations.getByResource(account)) + if (!proofs) { + throw new TypeError('No proofs for "account/info".') + } + + const inv = await Account.info + .invoke({ + issuer: this.issuer, + audience: this.service, + with: account, + proofs, + }) + .execute(this.connection) + + return inv + } +} + +/** + * @template T + * @param { Array | undefined} arr + */ +function isEmpty(arr) { + if (!Array.isArray(arr) || arr.length === 0) { + return + } + + return /** @type {T[]} */ (arr) } diff --git a/packages/access/src/awake/channel.js b/packages/access/src/awake/channel.js index 7ead335d5..677f5aeb7 100644 --- a/packages/access/src/awake/channel.js +++ b/packages/access/src/awake/channel.js @@ -310,7 +310,10 @@ export class Channel { */ async sendMsg(did, msg) { console.log('send awake/msg') - const id = await concatEncode([await this.keypair.pubkey(), did]) + const id = await concatEncode([ + await this.keypair.pubkey(), + DID.encode(did), + ]) this.send({ awv: AWAKE_VERSION, diff --git a/packages/access/src/awake/peer.js b/packages/access/src/awake/peer.js index 197530124..020576016 100644 --- a/packages/access/src/awake/peer.js +++ b/packages/access/src/awake/peer.js @@ -1,13 +1,14 @@ import * as UCAN from '@ipld/dag-ucan' import * as DID from '@ipld/dag-ucan/did' -import { Principal } from '@ucanto/principal' +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 * as Messages from './messages.js' /** - * @template {number} T + * @template {UCAN.Signer} T */ export class Peer { /** @@ -59,7 +60,7 @@ export class Peer { // step3 - awake/res send const ucan = await UCAN.issue({ - issuer: this.agent.data.agent, + issuer: this.agent.data.principal, audience: this.nextdid, capabilities: [{ with: 'awake:', can: '*' }], facts: [ @@ -91,12 +92,12 @@ export class Peer { // step 5 - awake/ack challenge confirmation and send const sig = u8.fromString(this.challenge, 'base64') - const verifier = Principal.parse(this.audience.did()) + const verifier = Verifier.parse(this.audience.did()) const payload = u8.fromString(this.channel.keypair.did + pin) const payloadHash = await sha256.encode(payload) // @ts-ignore - if (!(await verifier.verify(payloadHash, sig))) { + if (!(await verifier.verify(payloadHash, Signature.decode(sig)))) { throw new Error( `Challenge failed: ${pin} is not valid for the current challenge.` ) @@ -187,7 +188,9 @@ export class Peer { // Pin signature const bytes = u8.fromString(this.nextdid.did() + this.pin.toString()) - const signed = await this.agent.data.agent.sign(await sha256.encode(bytes)) + const signed = await this.agent.data.principal.sign( + await sha256.encode(bytes) + ) this.channel.sendMsg(this.nextdid, { did: this.did, sig: u8.toString(signed, 'base64'), diff --git a/packages/access/src/awake/types.ts b/packages/access/src/awake/types.ts index 8117f6061..0c6f4ab6e 100644 --- a/packages/access/src/awake/types.ts +++ b/packages/access/src/awake/types.ts @@ -35,7 +35,7 @@ export interface Channel { * @param aud - The ECDH P-256 DID signalled by the Requestor in previous awake/init * @param ucan - Validation UCAN to be AES-GCM-encrypted */ - sendRes: (aud: UCAN.DIDView, msg: UCAN.View) => Promise + sendRes: (aud: UCAN.Principal, msg: UCAN.View) => Promise /** * Awaits for awake/res msg and decrypts ucan payload from send DID @@ -48,14 +48,16 @@ export interface Channel { * @param did - DID to encrypt for * @param msg - Message to be encrypted and sent */ - sendMsg: (did: UCAN.DIDView, msg: unknown) => Promise + sendMsg: (did: UCAN.Principal, msg: unknown) => Promise /** * Awaits for a awake/msg and decrypts payload from sender DID */ - awaitMsg: (did: UCAN.DIDView) => Promise + awaitMsg: ( + did: UCAN.Principal + ) => Promise - sendFin: (did: UCAN.DIDView) => Promise + sendFin: (did: UCAN.Principal) => Promise } export type MessageType = z.infer @@ -63,13 +65,13 @@ export type MessageType = z.infer export type AwakeMessage = z.infer export interface AwakeInit extends AwakeMessage { - did: UCAN.DIDView + did: UCAN.Principal caps: UCAN.Capabilities } export interface AwakeRes extends AwakeMessage { - iss: UCAN.DIDView - aud: UCAN.DIDView + iss: UCAN.Principal + aud: UCAN.Principal ucan: UCAN.View } diff --git a/packages/access/src/capabilities/account.js b/packages/access/src/capabilities/account.js index 0ffdecce3..1ab322789 100644 --- a/packages/access/src/capabilities/account.js +++ b/packages/access/src/capabilities/account.js @@ -1,13 +1,25 @@ import { capability, URI } from '@ucanto/server' +import { any } from './any.js' import { store } from './store.js' import { equalWith } from './utils.js' +export const account = any.derive({ + to: capability({ + can: 'account/*', + with: URI.match({ protocol: 'did:' }), + derives: equalWith, + }), + derives: equalWith, +}) + +const base = any.or(account) + /** * `account/info` can be derived from any of the `store/*` - * capability that has matichng `with`. This allows store service + * capability that has matching `with`. This allows store service * to identify account based on any user request. */ -export const info = store.derive({ +export const info = base.or(store).derive({ to: capability({ can: 'account/info', with: URI.match({ protocol: 'did:' }), @@ -15,4 +27,3 @@ export const info = store.derive({ }), derives: equalWith, }) -export const account = info diff --git a/packages/access/src/capabilities/any.js b/packages/access/src/capabilities/any.js index 80f2ac51f..3be16db3c 100644 --- a/packages/access/src/capabilities/any.js +++ b/packages/access/src/capabilities/any.js @@ -1,10 +1,8 @@ -import { capability, URI } from '@ucanto/server' -// @ts-ignore -// eslint-disable-next-line no-unused-vars -import { canDelegateURI, derives, equalWith } from './utils.js' +import { capability, URI } from '@ucanto/validator' +import { equalWith } from './utils.js' /** - * Represets `{ can: '*', with: 'did:key:zAlice' }` capability, which we often + * Represents `{ can: '*', with: 'did:key:zAlice' }` capability, which we often * also call account linking. */ export const any = capability({ diff --git a/packages/access/src/capabilities/identity.js b/packages/access/src/capabilities/identity.js index e226f1346..521fdb1da 100644 --- a/packages/access/src/capabilities/identity.js +++ b/packages/access/src/capabilities/identity.js @@ -1,31 +1,26 @@ -import { capability, URI } from '@ucanto/server' -// @ts-ignore -// eslint-disable-next-line no-unused-vars +import { capability, URI } from '@ucanto/validator' import * as Store from './store.js' import { canDelegateURI, equalWith } from './utils.js' export const validate = capability({ can: 'identity/validate', with: URI.match({ protocol: 'did:' }), - caveats: { - as: URI.string({ protocol: 'mailto:' }), + nb: { + as: URI.match({ protocol: 'mailto:' }), }, derives: (child, parent) => { - return ( - canDelegateURI(child.caveats.as, parent.caveats.as) && - equalWith(child, parent) - ) + return canDelegateURI(child.nb.as, parent.nb.as) && equalWith(child, parent) }, }) export const register = capability({ can: 'identity/register', with: URI.match({ protocol: 'mailto:' }), - caveats: { - as: URI.string({ protocol: 'did:' }), + nb: { + as: URI.match({ protocol: 'did:' }), }, derives: (child, parent) => - canDelegateURI(child.caveats.as, parent.caveats.as) && + canDelegateURI(child.nb.as, parent.nb.as) && canDelegateURI(child.with, parent.with), }) diff --git a/packages/access/src/capabilities/store.js b/packages/access/src/capabilities/store.js index 686e05985..0375072d8 100644 --- a/packages/access/src/capabilities/store.js +++ b/packages/access/src/capabilities/store.js @@ -1,8 +1,5 @@ -/* eslint-disable unicorn/no-null */ -import { capability, Failure, Link, URI } from '@ucanto/server' -// @ts-ignore -// eslint-disable-next-line no-unused-vars -import { canDelegateURI, derives, equalWith, Integer } from './utils.js' +import { capability, Failure, Link, URI, Schema } from '@ucanto/validator' +import { equalLink, equalWith } from './utils.js' import { any } from './any.js' /** @@ -33,19 +30,19 @@ export const add = base.derive({ to: capability({ can: 'store/add', with: URI.match({ protocol: 'did:' }), - caveats: { + nb: { link: Link.optional(), origin: Link.optional(), - size: Integer.optional(), + size: Schema.integer().optional(), }, derives: (claim, from) => { - const result = derives(claim, from) + const result = equalLink(claim, from) if (result.error) { return result - } else if (claim.caveats.size != null && from.caveats.size != null) { - return claim.caveats.size > from.caveats.size + } else if (claim.nb.size !== undefined && from.nb.size !== undefined) { + return claim.nb.size > from.nb.size ? new Failure( - `Size constraint violation: ${claim.caveats.size} > ${from.caveats.size}` + `Size constraint violation: ${claim.nb.size} > ${from.nb.size}` ) : true } else { @@ -60,10 +57,10 @@ export const remove = base.derive({ to: capability({ can: 'store/remove', with: URI.match({ protocol: 'did:' }), - caveats: { + nb: { link: Link.optional(), }, - derives, + derives: equalLink, }), derives: equalWith, }) @@ -73,9 +70,9 @@ export const list = base.derive({ can: 'store/list', with: URI.match({ protocol: 'did:' }), derives: (claimed, delegated) => { - if (claimed.uri.href !== delegated.uri.href) { + if (claimed.with !== delegated.with) { return new Failure( - `Expected 'with: "${delegated.uri.href}"' instead got '${claimed.uri.href}'` + `Expected 'with: "${delegated.with}"' instead got '${claimed.with}'` ) } return true diff --git a/packages/access/src/capabilities/types.ts b/packages/access/src/capabilities/types.ts index b2405e866..f7183bc69 100644 --- a/packages/access/src/capabilities/types.ts +++ b/packages/access/src/capabilities/types.ts @@ -1,115 +1,26 @@ -import type { - Capability, - IPLDLink, - DID, - ToString, - Phantom, -} from '@ipld/dag-ucan' -import type { Block as IPLDBlock } from '@ucanto/interface' -import { codec as CARCodec } from '@ucanto/transport/car' - -type AccountDID = DID -type AgentDID = DID -type ServiceDID = DID - +import { InferInvokedCapability } from '@ucanto/interface' +import { account, info } from './account.js' +import { identify, register, validate } from './identity.js' +import { add, list, remove } from './store.js' +import * as UploadCaps from './upload.js' +import { claim, redeem } from './voucher.js' + +// Account +export type Account = InferInvokedCapability +export type AccountInfo = InferInvokedCapability // Voucher Protocol -export interface VoucherClaim - extends Capability<'voucher/claim', AccountDID | AgentDID> { - /** - * Product ID/CID - */ - product: `${string}:${string}` - - /** - * URI for an identity to be validated - */ - identity: `${string}:${string}` - - /** - * DID of the service they wish to redeem voucher with - */ - service: DID -} - -/** - * Can be invoked to redeem voucher. These are always issued by the service - */ -export interface VoucherRedeem - extends Capability<'voucher/redeem', ServiceDID> { - product: `${string}:${string}` - identity: `${string}:${string}` - account: AccountDID -} - +export type VoucherRedeem = InferInvokedCapability +export type VoucherClaim = InferInvokedCapability // Identity -export interface IdentityValidate extends Capability<'identity/validate', DID> { - as: `mailto:${string}` -} - -export interface IdentityRegister - extends Capability<'identity/register', `mailto:${string}`> { - as: DID -} - -export interface IdentityIdentify - extends Capability<'identity/identify', DID> {} - -export type integer = number & Phantom<{ kind: 'integer' }> - +export type IdentityValidate = InferInvokedCapability +export type IdentityRegister = InferInvokedCapability +export type IdentityIdentify = InferInvokedCapability +// Upload +export type Upload = InferInvokedCapability +export type UploadAdd = InferInvokedCapability +export type UploadRemove = InferInvokedCapability +export type UploadList = InferInvokedCapability // Store -export interface StoreAdd extends Capability<'store/add', DID> { - link?: IPLDLink - origin?: IPLDLink - size?: integer -} - -export interface StoreRemove extends Capability<'store/remove', DID> { - link?: IPLDLink -} - -export interface StoreList extends Capability<'store/list', DID> {} - -/** - * Logical represenatation of the CAR. - */ -export interface CAR { - roots: IPLDLink[] - blocks: Map, IPLDBlock> -} - -export type CARLink = IPLDLink - -/** - * Capability to add arbitrary CID into an account's upload listing. - */ -export interface UploadAdd extends Capability<'upload/add', AccountDID> { - /** - * CID of the file / directory / DAG root that is uploaded. - */ - root: IPLDLink - /** - * List of CAR links which MAY contain contents of this upload. Please - * note that there is no guarantee that linked CARs actually contain - * content related to this upload, it is whatever user deemed semantically - * relevant. - */ - shards: CARLink[] -} - -/** - * Capability to list CIDs in the account's upload list. - */ -export interface UploadList extends Capability<'upload/list', AccountDID> { - // ⚠️ We will likely add more fields here to support paging etc... but that - // will come in the future. -} - -/** - * Capability to remove arbitrary CID from the account's upload list. - */ -export interface UploadRemove extends Capability<'upload/remove', AccountDID> { - /** - * CID of the file / directory / DAG root to be removed from the upload list. - */ - root: IPLDLink -} +export type StoreAdd = InferInvokedCapability +export type StoreRemove = InferInvokedCapability +export type StoreList = InferInvokedCapability diff --git a/packages/access/src/capabilities/upload.js b/packages/access/src/capabilities/upload.js index 4649d29d5..e0e8eb294 100644 --- a/packages/access/src/capabilities/upload.js +++ b/packages/access/src/capabilities/upload.js @@ -1,6 +1,6 @@ -import { capability, Link, URI } from '@ucanto/server' +import { capability, Link, URI } from '@ucanto/validator' import { codec } from '@ucanto/transport/car' -import { equalWith, List, fail, equal } from './utils.js' +import { equalWith, fail, equal } from './utils.js' import { any } from './any.js' /** @@ -33,15 +33,15 @@ export const add = base.derive({ to: capability({ can: 'upload/add', with: URI.match({ protocol: 'did:' }), - caveats: { - root: Link.optional(), - shards: List.of(CARLink).optional(), + nb: { + root: CARLink.optional(), + shards: CARLink.array().optional(), }, derives: (self, from) => { return ( fail(equalWith(self, from)) || - fail(equal(self.caveats.root, from.caveats.root, 'root')) || - fail(equal(self.caveats.shards, from.caveats.shards, 'shards')) || + fail(equal(self.nb.root, from.nb.root, 'root')) || + fail(equal(self.nb.shards, from.nb.shards, 'shards')) || true ) }, @@ -53,13 +53,13 @@ export const remove = base.derive({ to: capability({ can: 'upload/remove', with: URI.match({ protocol: 'did:' }), - caveats: { + nb: { root: Link.optional(), }, derives: (self, from) => { return ( fail(equalWith(self, from)) || - fail(equal(self.caveats.root, from.caveats.root, 'root')) || + fail(equal(self.nb.root, from.nb.root, 'root')) || true ) }, diff --git a/packages/access/src/capabilities/utils.js b/packages/access/src/capabilities/utils.js index 306adf5c2..08fc34c1c 100644 --- a/packages/access/src/capabilities/utils.js +++ b/packages/access/src/capabilities/utils.js @@ -47,7 +47,7 @@ export function equal(child, parent, constraint) { return true } else if (String(child) !== String(parent)) { return new Failure( - `Contastraint vilation: ${child} violates imposed ${constraint} constraint ${parent}` + `Constrain violation: ${child} violates imposed ${constraint} constraint ${parent}` ) } else { return true @@ -60,20 +60,19 @@ export function equal(child, parent, constraint) { * @param {T} delegated * @returns {Types.Result} */ -export const derives = (claimed, delegated) => { - if (claimed.uri.href !== delegated.uri.href) { +export const equalLink = (claimed, delegated) => { + if (claimed.with !== delegated.with) { return new Failure( - `Expected 'with: "${delegated.uri.href}"' instead got '${claimed.uri.href}'` + `Expected 'with: "${delegated.with}"' instead got '${claimed.with}'` ) } else if ( - delegated.caveats.link && - `${delegated.caveats.link}` !== `${claimed.caveats.link}` + delegated.nb.link && + `${delegated.nb.link}` !== `${claimed.nb.link}` ) { return new Failure( - `Link ${ - // eslint-disable-next-line unicorn/no-null - claimed.caveats.link == null ? '' : `${claimed.caveats.link} ` - }violates imposed ${delegated.caveats.link} constraint` + `Link ${!claimed.nb.link ? '' : `${claimed.nb.link}`} violates imposed ${ + delegated.nb.link + } constraint.` ) } else { return true @@ -86,165 +85,3 @@ export const derives = (claimed, delegated) => { export function fail(value) { return value === true ? undefined : value } - -/** - * @template T - * @param {Types.Decoder} decoder - * @returns {Types.Decoder} - */ -export const optional = (decoder) => ({ - decode: (input) => (input === undefined ? input : decoder.decode(input)), -}) - -/** - * @template T - * @implements {Types.Decoder} - */ -class Never { - /** - * @param {unknown} input - * @returns {Types.Result} - */ - decode(input) { - return new Failure(`Given input is not valid`) - } - - /** - * @returns {Types.Decoder} - */ - optional() { - return new Optional(this) - } -} - -/** - * @template T - * @implements {Types.Decoder} - */ -class Optional { - /** - * @param {Types.Decoder} decoder - */ - constructor(decoder) { - this.decoder = decoder - } - - optional() { - return this - } - - /** - * @param {unknown} input - */ - decode(input) { - return input === undefined ? undefined : this.decoder.decode(input) - } -} - -/** - * @template T - * @extends {Never} - * @implements {Types.Decoder} - */ -export class List extends Never { - /** - * @template T - * @param {Types.Decoder} decoder - */ - static of(decoder) { - return new this(decoder) - } - - /** - * @param {Types.Decoder} decoder - * @private - */ - constructor(decoder) { - super() - this.decoder = decoder - } - - /** - * @param {unknown} input - */ - decode(input) { - if (!Array.isArray(input)) { - return new Failure(`Expected to be an array instead got ${input} `) - } - /** @type {T[]} */ - const results = [] - for (const item of input) { - const result = this.decoder.decode(item) - if (result?.error) { - return new Failure(`Array containts invalid element: ${result.message}`) - } else { - results.push(result) - } - } - return results - } -} - -/** - * @typedef {Types.Phantom<{kind:"Int"}> & number} integer - * @extends {Never} - * @implements {Types.Decoder} - */ -export class IntegerDecoder extends Never { - /** - * @param {{min?: number, max?: number}} options - */ - // eslint-disable-next-line unicorn/prefer-number-properties - constructor({ min = -Infinity, max = Infinity } = {}) { - super() - this.min = min - this.max = max - } - - /** - * @param {unknown} value - * @returns {value is integer} - */ - static isInteger(value) { - return Number.isInteger(value) - } - - /** - * @param {unknown} input - * @returns {Types.Result} - */ - decode(input) { - const { min, max } = this - if (!IntegerDecoder.isInteger(input)) { - return new Failure( - `Expecting an Integer but instead got: ${typeof input} ${input}` - ) - } else if (min > input) { - return new Failure( - `Expecting an Integer > ${min} but instead got ${input}` - ) - } else if (max < input) { - return new Failure( - `Expecting an Integer < ${max} but instead got ${input}` - ) - } else { - return input - } - } - - /** - * @param {number} min - */ - greater(min) { - return new IntegerDecoder({ min, max: this.max }) - } - - /** - * @param {number} max - */ - less(max) { - return new IntegerDecoder({ min: this.min, max }) - } -} - -export const Integer = new IntegerDecoder() diff --git a/packages/access/src/capabilities/voucher.js b/packages/access/src/capabilities/voucher.js index 62bfa46a2..50e172c7f 100644 --- a/packages/access/src/capabilities/voucher.js +++ b/packages/access/src/capabilities/voucher.js @@ -1,30 +1,36 @@ -import { capability, URI } from '@ucanto/server' +import { capability, URI } from '@ucanto/validator' // @ts-ignore // eslint-disable-next-line no-unused-vars import * as Types from '@ucanto/interface' import { canDelegateURI, equalWith, fail } from './utils.js' +import { any } from './any.js' -export const voucher = capability({ - can: 'voucher/*', - with: URI.match({ protocol: 'did:' }), +export const voucher = any.derive({ + to: capability({ + can: 'voucher/*', + with: URI.match({ protocol: 'did:' }), + derives: equalWith, + }), derives: equalWith, }) -export const claim = voucher.derive({ +const base = any.or(voucher) + +export const claim = base.derive({ to: capability({ can: 'voucher/claim', with: URI.match({ protocol: 'did:' }), - caveats: { - product: URI.string(), - identity: URI.string(), - service: URI.string({ protocol: 'did:' }), + nb: { + product: URI.match({ protocol: 'product:' }), + identity: URI.match({ protocol: 'mailto:' }), + service: URI.match({ protocol: 'did:' }), }, derives: (child, parent) => { return ( fail(equalWith(child, parent)) || - fail(canDelegateURI(child.caveats.identity, parent.caveats.identity)) || - fail(canDelegateURI(child.caveats.product, parent.caveats.product)) || - fail(canDelegateURI(child.caveats.service, parent.caveats.service)) || + fail(canDelegateURI(child.nb.identity, parent.nb.identity)) || + fail(canDelegateURI(child.nb.product, parent.nb.product)) || + fail(canDelegateURI(child.nb.service, parent.nb.service)) || true ) }, @@ -32,13 +38,24 @@ export const claim = voucher.derive({ derives: equalWith, }) -export const redeem = capability({ - can: 'voucher/redeem', - with: URI.match({ protocol: 'did:' }), - caveats: { - product: URI.string(), - identity: URI.string(), - // TODO need optional URI from ucanto - account: URI.string({ protocol: 'did:' }), - }, +export const redeem = voucher.derive({ + to: capability({ + can: 'voucher/redeem', + with: URI.match({ protocol: 'did:' }), + nb: { + product: URI.match({ protocol: 'product:' }), + identity: URI.match({ protocol: 'mailto:' }), + account: URI.match({ protocol: 'did:' }), + }, + derives: (child, parent) => { + return ( + fail(equalWith(child, parent)) || + fail(canDelegateURI(child.nb.identity, parent.nb.identity)) || + fail(canDelegateURI(child.nb.product, parent.nb.product)) || + fail(canDelegateURI(child.nb.account, parent.nb.account)) || + true + ) + }, + }), + derives: equalWith, }) diff --git a/packages/access/src/cli/cmd-create-account.js b/packages/access/src/cli/cmd-create-account.js new file mode 100644 index 000000000..0fa30d63a --- /dev/null +++ b/packages/access/src/cli/cmd-create-account.js @@ -0,0 +1,44 @@ +/* eslint-disable unicorn/no-process-exit */ +/* eslint-disable no-console */ +import inquirer from 'inquirer' +import ora from 'ora' +import { Agent } from '../agent.js' +import { StoreConf } from '../stores/store-conf.js' +import { getService } from './utils.js' + +/** + * @param {{ profile: any; env: string }} opts + */ +export async function cmdCreateAccount(opts) { + const { url } = await getService(opts.env) + const store = new StoreConf({ profile: opts.profile }) + + if (await store.exists()) { + const spinner = ora('Registering with the service').start() + const agent = await Agent.create({ + store, + url, + }) + + spinner.stopAndPersist() + const { email } = await inquirer.prompt({ + type: 'input', + name: 'email', + default: 'hugomrdias@gmail.com', + message: 'Input your email to validate:', + }) + spinner.start('Waiting for email validation...') + try { + await agent.createAccount(email) + spinner.succeed('Account has been created and register with the service.') + } catch (error) { + console.error(error) + // @ts-ignore + spinner.fail(error.message) + process.exit(1) + } + } else { + console.error('run setup command first.') + process.exit(1) + } +} diff --git a/packages/access/src/cli/cmd-link.js b/packages/access/src/cli/cmd-link.js index f16d865ce..f329ac1a7 100644 --- a/packages/access/src/cli/cmd-link.js +++ b/packages/access/src/cli/cmd-link.js @@ -14,7 +14,7 @@ import { getService } from './utils.js' * @param {string} channel * @param {{ profile: string; env: string }} opts */ -export async function linkCmd(channel, opts) { +export async function cmdLink(channel, opts) { const { url } = await getService(opts.env) const store = new StoreConf({ profile: opts.profile }) diff --git a/packages/access/src/cli/cmd-setup.js b/packages/access/src/cli/cmd-setup.js new file mode 100644 index 000000000..846ce6fbc --- /dev/null +++ b/packages/access/src/cli/cmd-setup.js @@ -0,0 +1,39 @@ +/* eslint-disable no-console */ +import inquirer from 'inquirer' +import { StoreConf } from '../stores/store-conf.js' + +/** + * @param {{ profile: any; }} opts + */ +export async function cmdSetup(opts) { + const store = new StoreConf({ profile: opts.profile }) + console.log('Path:', store.path) + + if (await store.exists()) { + console.log('Agent is already setup.') + } else { + const { name, type } = await inquirer.prompt([ + { + type: 'input', + name: 'name', + default: 'cli', + message: 'Input the name for this device:', + }, + { + type: 'list', + name: 'type', + default: 'device', + choices: [{ name: 'device' }, { name: 'app' }, { name: 'service' }], + message: 'Select this agent type:', + }, + ]) + await store.init({ + meta: { + name, + type, + }, + }) + + console.log('Agent is ready to use.') + } +} diff --git a/packages/access/src/cli/cmd-whoami.js b/packages/access/src/cli/cmd-whoami.js new file mode 100644 index 000000000..2526a34c4 --- /dev/null +++ b/packages/access/src/cli/cmd-whoami.js @@ -0,0 +1,33 @@ +/* eslint-disable no-console */ +import { StoreConf } from '../stores/store-conf.js' +import { NAME } from './config.js' + +/** + * @param {{ profile: any; env : string }} opts + */ +export async function cmdWhoami(opts) { + const store = new StoreConf({ profile: opts.profile }) + if (await store.exists()) { + const { delegations, meta, accounts, principal } = await store.load() + + console.log('Agent', principal.did(), meta) + console.log('Accounts:') + for (const acc of accounts) { + console.log(acc.did()) + } + + console.log('Delegations created:') + for (const created of delegations.created) { + console.log(created) + } + console.log('Delegations received:') + for (const [key, value] of delegations.receivedByResource) { + console.log( + `Resource: ${key}`, + value.map((cap) => cap.cap.can) + ) + } + } else { + console.error(`Run "${NAME} setup" first`) + } +} diff --git a/packages/access/src/cli/index.js b/packages/access/src/cli/index.js index a7b7bf84f..6c154a0a9 100755 --- a/packages/access/src/cli/index.js +++ b/packages/access/src/cli/index.js @@ -6,15 +6,19 @@ import path from 'path' import sade from 'sade' import { Transform } from 'stream' import undici from 'undici' -import { linkCmd } from './cmd-link.js' import { getConfig, NAME, pkg } from './config.js' import { getService } from './utils.js' -import inquirer from 'inquirer' // @ts-ignore // eslint-disable-next-line no-unused-vars -import * as Types from '@ucanto/interface' -import { Agent } from '../agent.js' +import { cmdCreateAccount } from './cmd-create-account.js' +import { cmdLink } from './cmd-link.js' +import { cmdSetup } from './cmd-setup.js' +import { cmdWhoami } from './cmd-whoami.js' import { StoreConf } from '../stores/store-conf.js' +import { Agent } from '../agent.js' +import inquirer from 'inquirer' +import { Verifier } from '@ucanto/principal/ed25519' +import { delegationToString, stringToDelegation } from '../encoding.js' const prog = sade(NAME) prog @@ -61,109 +65,142 @@ prog } }) -prog.command('link [channel]').describe('Link.').action(linkCmd) +prog.command('link [channel]').describe('Link.').action(cmdLink) +prog.command('setup').describe('Print config file content.').action(cmdSetup) +prog.command('whoami').describe('Print config file content.').action(cmdWhoami) +prog + .command('create-account') + .describe('Create new account.') + .action(cmdCreateAccount) prog - .command('setup') - .describe('Print config file content.') + .command('account') + .describe('Account info.') .action(async (opts) => { const store = new StoreConf({ profile: opts.profile }) - console.log('Path:', store.path) - + const { url } = await getService(opts.env) if (await store.exists()) { - console.log('Agent is already setup.') - } else { - const { name, type } = await inquirer.prompt([ - { - type: 'input', - name: 'name', - default: 'cli', - message: 'Input the name for this device:', - }, + const agent = await Agent.create({ + store, + url, + }) + + const choices = [] + for (const [key, value] of agent.data.delegations.receivedByResource) { + for (const d of value) { + if (d.cap.can === 'account/info' || d.cap.can === 'account/*') { + choices.push({ name: key }) + } + } + } + + const { account } = await inquirer.prompt([ { type: 'list', - name: 'type', + name: 'account', default: 'device', - choices: [{ name: 'device' }, { name: 'app' }, { name: 'service' }], - message: 'Select this agent type:', + choices, + message: 'Select account:', }, ]) - await store.init({ - meta: { - name, - type, - }, - }) - - console.log('Agent is ready to use.') + const result = await agent.getAccountInfo(account) + if (result.error) { + console.error(result.message) + } else { + console.log(result) + } + } else { + console.error(`Run "${NAME} setup" first`) } }) prog - .command('whoami') - .describe('Print config file content.') + .command('delegate') + .describe('Delegation capabilities.') .action(async (opts) => { const store = new StoreConf({ profile: opts.profile }) + const { url } = await getService(opts.env) if (await store.exists()) { - const { delegations, meta, accounts, agent } = await store.load() + const agent = await Agent.create({ + store, + url, + }) - console.log('Agent', agent.did(), meta) - console.log('Accounts:') - for (const acc of accounts) { - console.log(acc.did()) - } + const accountDids = agent.data.accounts.map((acc) => { + return { name: acc.did() } + }) + const { account } = await inquirer.prompt([ + { + type: 'list', + name: 'account', + choices: accountDids, + message: 'Select account:', + }, + ]) - console.log('Delegations created:') - for (const created of delegations.created) { - console.log(created) - } - console.log('Delegations received:') - for (const received of delegations.received) { - console.log(`${received.issuer.did()} -> ${received.audience.did()}`) - console.log(received.capabilities) + const abilities = [] + for (const [key, values] of agent.data.delegations.receivedByResource) { + if (key === account) { + for (const cap of values) { + abilities.push({ name: cap.cap.can }) + } + } } + const { ability } = await inquirer.prompt([ + { + type: 'list', + name: 'ability', + choices: abilities, + message: 'Select ability:', + }, + ]) + + const { audience } = await inquirer.prompt([ + { + type: 'input', + name: 'audience', + choices: abilities, + message: 'Input audience:', + }, + ]) + + console.log(account, ability) + + const delegation = await agent.delegate( + Verifier.parse(audience), + [ + { + can: ability, + with: account, + }, + ], + 800_000 + ) + + console.log(await delegationToString(delegation)) } else { console.error(`Run "${NAME} setup" first`) } }) prog - .command('create-account') - .describe('Create new account.') + .command('import') + .describe('Import delegation.') + .option('--delegation') .action(async (opts) => { - const { url } = await getService(opts.env) const store = new StoreConf({ profile: opts.profile }) - + const { url } = await getService(opts.env) if (await store.exists()) { - const spinner = ora('Registering with the service').start() const agent = await Agent.create({ store, url, }) - spinner.stopAndPersist() - const { email } = await inquirer.prompt({ - type: 'input', - name: 'email', - default: 'hugomrdias@gmail.com', - message: 'Input your email to validate:', - }) - spinner.start('Waiting for email validation...') - try { - await agent.createAccount(email) - spinner.succeed( - 'Account has been created and register with the service.' - ) - } catch (error) { - console.error(error) - // @ts-ignore - spinner.fail(error.message) - process.exit(1) - } + const del = fs.readFileSync('./delegation', { encoding: 'utf8' }) + + await agent.addDelegation(await stringToDelegation(del)) } else { - console.error('run setup command first.') - process.exit(1) + console.error(`Run "${NAME} setup" first`) } }) - prog.parse(process.argv) diff --git a/packages/access/src/cli/utils.js b/packages/access/src/cli/utils.js index 8d925105a..387f6d20a 100644 --- a/packages/access/src/cli/utils.js +++ b/packages/access/src/cli/utils.js @@ -1,5 +1,5 @@ import undici from 'undici' -import { Principal } from '@ucanto/principal' +import { Verifier } from '@ucanto/principal/ed25519' /** @type {Record} */ const envs = { @@ -26,7 +26,7 @@ export async function getService(env) { // @ts-ignore const { did } = await rsp.json() - audience = Principal.parse(did) + audience = Verifier.parse(did) return { url, audience } } } diff --git a/packages/access/src/connection.js b/packages/access/src/connection.js deleted file mode 100644 index 273eeb976..000000000 --- a/packages/access/src/connection.js +++ /dev/null @@ -1,22 +0,0 @@ -import * as Client from '@ucanto/client' -import * as CAR from '@ucanto/transport/car' -import * as CBOR from '@ucanto/transport/cbor' -import * as HTTP from '@ucanto/transport/http' -import * as Service from './service.js' - -/** - * @param {{id : import('@ucanto/interface').Principal; url?: URL, fetch?: import('@ucanto/transport').HTTP.Fetcher}} opts - * @returns {import('@ucanto/interface').ConnectionView} - */ -export function connection({ id, url = Service.url, fetch }) { - return Client.connect({ - id, - encoder: CAR, - decoder: CBOR, - channel: HTTP.open({ - url, - method: 'POST', - fetch, - }), - }) -} diff --git a/packages/access/src/crypto/p256-ecdh.js b/packages/access/src/crypto/p256-ecdh.js index f047f949c..f4f826c82 100644 --- a/packages/access/src/crypto/p256-ecdh.js +++ b/packages/access/src/crypto/p256-ecdh.js @@ -15,8 +15,10 @@ async function didFromPubkey(pubkey) { const buf = await webcrypto.subtle.exportKey('raw', pubkey) const bytes = new Uint8Array(buf) return DID.format( - // eslint-disable-next-line unicorn/prefer-spread - uint8arrays.concat([P256_DID_PREFIX, compressP256Pubkey(bytes)]) + DID.decode( + // eslint-disable-next-line unicorn/prefer-spread + uint8arrays.concat([P256_DID_PREFIX, compressP256Pubkey(bytes)]) + ) ) } @@ -57,7 +59,7 @@ export class EcdhKeypair { /** * @param {CryptoKeyPair} keypair - * @param {`did:${string}`} did + * @param {import('@ipld/dag-ucan').DID} did */ constructor(keypair, did) { this.#keypair = keypair diff --git a/packages/access/src/delegations.js b/packages/access/src/delegations.js index 8daf512d8..f893b87dc 100644 --- a/packages/access/src/delegations.js +++ b/packages/access/src/delegations.js @@ -1,7 +1,7 @@ import { delegate } from '@ucanto/core' // @ts-ignore // eslint-disable-next-line no-unused-vars -import * as API from '@ucanto/interface' +import * as Ucanto from '@ucanto/interface' /** * TODO: clear expired delegations @@ -9,40 +9,74 @@ import * as API from '@ucanto/interface' export class Delegations { /** * @param {{ - * principal: API.SigningPrincipal; - * received?: import('@ucanto/interface').Delegation[] - * created?: import('@ucanto/interface').Delegation[] + * principal: Ucanto.Signer; + * received?: Ucanto.Delegation[] + * created?: Ucanto.Delegation[] * meta?: import('./awake/types').MetaMap * }} opts */ constructor(opts) { this.principal = opts.principal - /** @type {import('@ucanto/interface').Delegation[]} */ + /** @type {Ucanto.Delegation[]} */ this.received = opts.received || [] - /** @type {import('@ucanto/interface').Delegation[]} */ + /** @type {Ucanto.Delegation[]} */ this.created = opts.created || [] /** @type {import('./awake/types').MetaMap} */ this.meta = new Map() + + /** + * @type {Map} + */ + this.receivedByResource = new Map() + /** + * @type {Map} + */ + this.receivedMap = new Map() } /** * - * @param {import('@ucanto/interface').Delegation} delegation + * @param {Ucanto.Delegation} delegation */ async add(delegation) { + const cid = delegation.cid.toString() + + for (const cap of delegation.capabilities) { + const byResource = this.receivedByResource.get(cap.with) ?? [] + + byResource.push({ cid: delegation.cid.toString(), cap }) + this.receivedByResource.set(cap.with, byResource) + } this.received.push(delegation) + + this.receivedMap.set(cid, delegation) + } + + /** + * @param {string} resource + */ + getByResource(resource) { + const byResource = this.receivedByResource.get(resource) + if (!byResource) { + return + } + + return byResource.map((r) => { + return this.receivedMap.get(r.cid) + }) } /** + * Add multiple received delegations * - * @param {import('@ucanto/interface').Delegation[]} delegations + * @param {Ucanto.Delegation[]} delegations */ async addMany(delegations) { for (const d of delegations) { - this.received.push(d) + this.add(d) } } @@ -66,7 +100,7 @@ export class Delegations { /** * - * @param {import('@ucanto/interface').UCAN.DIDView} audience + * @param {import('@ucanto/interface').Principal} audience * @param {import('@ipld/dag-ucan').Capabilities} capabilities * @param {number} [lifetimeInSeconds] */ @@ -77,7 +111,8 @@ export class Delegations { audience, capabilities, lifetimeInSeconds, - proofs: this.received, + // be smarter about picking only the needs delegations + proofs: [...this.receivedMap.values()], }) this.created.push(delegation) diff --git a/packages/access/src/index.js b/packages/access/src/index.js index 03a161b68..a858dcaa6 100644 --- a/packages/access/src/index.js +++ b/packages/access/src/index.js @@ -1,120 +1 @@ -import * as UCAN from '@ipld/dag-ucan' -import fetch from '@web-std/fetch' -import pRetry from 'p-retry' -import * as Identity from './capabilities/identity.js' -import { connection } from './connection.js' -import * as Service from './service.js' -// eslint-disable-next-line no-unused-vars -import * as Types from '@ucanto/interface' -import { Delegation } from '@ucanto/server' - -/** - * - * @param {import("./types").ValidateOptions} opts - */ -export async function validate(opts) { - const conn = connection({ - id: opts.issuer, - url: opts.url || Service.url, - }) - - const validate = Identity.validate.invoke({ - audience: opts.audience || Service.identity, - issuer: opts.issuer, - with: opts.issuer.did(), - caveats: { - ...opts.caveats, - }, - }) - const out = await validate.execute(conn) - - if (out?.error) { - throw out - } -} - -/** - * - * @param {import("./types").RegisterOptions} opts - */ -export async function register(opts) { - const conn = connection({ - id: opts.issuer, - url: opts.url || Service.url, - }) - - const validate = Identity.register.invoke({ - audience: opts.audience || Service.identity, - issuer: opts.issuer, - with: opts.proof.capabilities[0].with, - caveats: { - as: opts.proof.capabilities[0].as, - }, - proofs: [opts.proof], - }) - const out = await validate.execute(conn) - - if (out?.error) { - throw out - } -} - -/** - * @param {string} did - * @param {string} host - * @param {AbortSignal} [signal] - */ -const run = (did, host, signal) => async () => { - const response = await fetch(`${host}validate?did=${did}`, { signal }) - - if (!response.ok) { - throw new Error(response.statusText) - } - - return response.text() -} - -/** - * @param {import('./types').PullRegisterOptions} opts - */ -export async function pullRegisterDelegation(opts) { - const url = opts.url || Service.url - /** @type {Types.UCAN.JWT<[import('./capabilities/types').IdentityRegister]>} */ - const registerProof = await pRetry( - run(opts.issuer.did(), url.toString(), opts.signal), - { - retries: 100, - signal: opts.signal, - } - ) - - const ucan = UCAN.parse(registerProof) - const root = await UCAN.write(ucan) - const proof = Delegation.create({ root }) - - return proof -} - -/** - * - * @param {import("./types").IdentifyOptions} opts - */ -export async function identify(opts) { - const conn = connection({ - id: opts.issuer, - url: opts.url || Service.url, - }) - const validate = Identity.identify.invoke({ - audience: opts.audience || Service.identity, - issuer: opts.issuer, - with: opts.proof?.capabilities[0].with || opts.issuer.did(), - proofs: opts.proof && [opts.proof], - }) - const out = await validate.execute(conn) - - if (out?.error) { - throw out - } - - return out -} +export * from './agent.js' diff --git a/packages/access/src/principal/signer-ed25519.js b/packages/access/src/principal/signer-ed25519.js deleted file mode 100644 index 869443cd0..000000000 --- a/packages/access/src/principal/signer-ed25519.js +++ /dev/null @@ -1,163 +0,0 @@ -import * as ED25519 from '@noble/ed25519' -import { varint } from 'multiformats' -// eslint-disable-next-line no-unused-vars -import * as API from '@ucanto/interface' -import * as Authority from './verifier-ed25519.js' -import { base64pad } from 'multiformats/bases/base64' -// eslint-disable-next-line no-unused-vars -import * as Types from './types.js' - -export const code = 0x13_00 -export const name = Authority.name - -const PRIVATE_TAG_SIZE = varint.encodingLength(code) -const PUBLIC_TAG_SIZE = varint.encodingLength(Authority.code) -const KEY_SIZE = 32 -const SIZE = PRIVATE_TAG_SIZE + KEY_SIZE + PUBLIC_TAG_SIZE + KEY_SIZE - -/** - * Generates new issuer by generating underlying ED25519 keypair. - * - * @returns {Promise>} - */ -export const generate = () => derive(ED25519.utils.randomPrivateKey()) - -/** - * Derives issuer from 32 byte long secret key. - * - * @param {Uint8Array} secret - * @returns {Promise>} - */ -export const derive = async (secret) => { - if (secret.byteLength !== KEY_SIZE) { - throw new Error( - `Expected Uint8Array with byteLength of ${KEY_SIZE} instead not ${secret.byteLength}` - ) - } - - const publicKey = await ED25519.getPublicKey(secret) - const bytes = new Uint8Array(SIZE) - - varint.encodeTo(code, bytes, 0) - bytes.set(secret, PRIVATE_TAG_SIZE) - - varint.encodeTo(Authority.code, bytes, PRIVATE_TAG_SIZE + KEY_SIZE) - bytes.set(publicKey, PRIVATE_TAG_SIZE + KEY_SIZE + PUBLIC_TAG_SIZE) - - return new Ed25519Signer(bytes) -} - -/** - * - * @param {Uint8Array} bytes - */ -export const decode = (bytes) => { - if (bytes.byteLength !== SIZE) { - throw new Error( - `Expected Uint8Array with byteLength of ${SIZE} instead not ${bytes.byteLength}` - ) - } - - { - const [keyCode] = varint.decode(bytes) - if (keyCode !== code) { - throw new Error(`Given bytes must be a multiformat with ${code} tag`) - } - } - - { - const [code] = varint.decode(bytes.subarray(PRIVATE_TAG_SIZE + KEY_SIZE)) - if (code !== Authority.code) { - throw new Error( - `Given bytes must contain public key in multiformats with ${Authority.code} tag` - ) - } - } - - return new Ed25519Signer(bytes) -} - -/** - * @template {string} Prefix - * @param {string} signingAuthority - * @param {API.MultibaseDecoder} [decoder] - */ -export const parse = (signingAuthority, decoder) => - decode((decoder || base64pad).decode(signingAuthority)) - -/** - * @implements {Types.SigningPrincipal} - */ -class Ed25519Signer { - /** - * @param {Uint8Array} bytes - */ - constructor(bytes) { - this.buffer = bytes.buffer - this.byteOffset = bytes.byteOffset - this.byteLength = SIZE - this.bytes = bytes - } - - get principal() { - const bytes = new Uint8Array(this.buffer, PRIVATE_TAG_SIZE + KEY_SIZE) - const principal = Authority.decode(bytes) - - Object.defineProperties(this, { - principal: { - value: principal, - }, - }) - - return principal - } - - /** - * Raw public key without multiformat code. - */ - get secret() { - const secret = new Uint8Array(this.buffer, PRIVATE_TAG_SIZE, KEY_SIZE) - Object.defineProperties(this, { - secret: { - value: secret, - }, - }) - - return secret - } - - /** - * DID of the authority in `did:key` format. - * - * @returns {API.DID} - */ - did() { - return this.principal.did() - } - - /** - * @template T - * @param {API.ByteView} payload - * @returns {Promise>} - */ - sign(payload) { - return ED25519.sign(payload, this.secret) - } - - /** - * @template T - * @param {API.ByteView} payload - * @param {API.Signature} signature - */ - verify(payload, signature) { - return this.principal.verify(payload, signature) - } - - /** - * @template {string} Prefix - * @param {API.MultibaseEncoder} [encoder] - */ - format(encoder) { - return (encoder || base64pad).encode(this.bytes) - } -} diff --git a/packages/access/src/principal/types.js b/packages/access/src/principal/types.js deleted file mode 100644 index 4f36ee138..000000000 --- a/packages/access/src/principal/types.js +++ /dev/null @@ -1 +0,0 @@ -/* eslint-disable unicorn/no-empty-file */ diff --git a/packages/access/src/principal/types.ts b/packages/access/src/principal/types.ts deleted file mode 100644 index 85d36c4b5..000000000 --- a/packages/access/src/principal/types.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type * as UCAN from '@ipld/dag-ucan' -export * as UCAN from '@ipld/dag-ucan' - -export interface PrincipalParser { - parse: (did: UCAN.DID) => Principal -} - -export interface Principal - extends ArrayBufferView, - UCAN.Verifier { - bytes: Uint8Array -} - -export interface SigningPrincipal< - A extends number = number, - Base extends string = string -> extends Principal, - UCAN.Signer { - principal: Principal - bytes: Uint8Array - // secret: Uint8Array - format: (encoder?: UCAN.MultibaseEncoder) => string -} diff --git a/packages/access/src/principal/verifier-ed25519.js b/packages/access/src/principal/verifier-ed25519.js deleted file mode 100644 index 6f8623372..000000000 --- a/packages/access/src/principal/verifier-ed25519.js +++ /dev/null @@ -1,113 +0,0 @@ -import * as DID from '@ipld/dag-ucan/did' -import * as ED25519 from '@noble/ed25519' -import { varint } from 'multiformats' -// eslint-disable-next-line no-unused-vars -import * as API from '@ucanto/interface' -export const code = 0xed - -export const name = 'Ed25519' -const PUBLIC_TAG_SIZE = varint.encodingLength(code) -const SIZE = 32 + PUBLIC_TAG_SIZE - -/** - * Parses `did:key:` string as an Audience. - * - * @param {API.DID} did - * @returns {API.Principal} - */ -export const parse = (did) => decode(DID.parse(did)) - -/** - * Takes ed25519 public key tagged with `0xed` multiformat code and creates a - * corresponding `Authority` that can be used to verify signatures. - * - * @param {Uint8Array} bytes - * @returns {API.Principal} - */ -export const decode = (bytes) => { - const [algorithm] = varint.decode(bytes) - if (algorithm !== code) { - throw new RangeError( - `Unsupported key algorithm with multicode 0x${code.toString(16)}` - ) - } else if (bytes.byteLength !== SIZE) { - throw new RangeError( - `Expected Uint8Array with byteLength ${SIZE}, instead got Uint8Array with byteLength ${bytes.byteLength}` - ) - } else { - return new Authority(bytes.buffer, bytes.byteOffset) - } -} - -/** - * Formats given authority into `did:key:` format. - * - * @param {API.Principal} authority - */ -export const format = (authority) => DID.format(authority.bytes) - -/** - * Encodes given authority by tagging it's ed25519 public key with `0xed` - * multiformat code. - * - * @param {API.Principal} authority - */ -export const encode = (authority) => authority.bytes - -/** - * @implements {API.Principal} - */ -class Authority { - /** - * @param {ArrayBuffer} buffer - * @param {number} [byteOffset] - */ - constructor(buffer, byteOffset = 0) { - /** @readonly */ - this.buffer = buffer - /** @readonly */ - this.byteOffset = byteOffset - /** @readonly */ - this.byteLength = SIZE - } - - get bytes() { - const bytes = new Uint8Array(this.buffer, this.byteOffset, this.byteLength) - Object.defineProperties(this, { bytes: { value: bytes } }) - return bytes - } - - /** - * Raw public key without a multiformat code. - * - * @readonly - */ - get publicKey() { - const key = new Uint8Array(this.buffer, this.byteOffset + PUBLIC_TAG_SIZE) - Object.defineProperties(this, { - publicKey: { - value: key, - }, - }) - return key - } - - /** - * DID of the authority in `did:key` format. - * - * @returns {API.DID} - */ - did() { - return format(this) - } - - /** - * @template T - * @param {API.ByteView} payload - * @param {API.Signature} signature - * @returns {Promise} - */ - verify(payload, signature) { - return ED25519.verify(signature, payload, this.publicKey) - } -} diff --git a/packages/access/src/service.js b/packages/access/src/service.js deleted file mode 100644 index 5b6d10aab..000000000 --- a/packages/access/src/service.js +++ /dev/null @@ -1,8 +0,0 @@ -import { Principal } from '@ucanto/principal' - -export const url = new URL('https://access-api.web3.storage') - -// TODO: get production did -export const identity = Principal.parse( - 'did:key:z6MkkHafoFWxxWVNpNXocFdU6PL2RVLyTEgS1qTnD3bRP7V9' -) diff --git a/packages/access/src/stores/store-conf.js b/packages/access/src/stores/store-conf.js index 80cf734b0..fec3d2452 100644 --- a/packages/access/src/stores/store-conf.js +++ b/packages/access/src/stores/store-conf.js @@ -1,28 +1,18 @@ import Conf from 'conf' -import { SigningPrincipal } from '@ucanto/principal' -// eslint-disable-next-line no-unused-vars -import * as Types from '@ucanto/interface' +import { Signer } from '@ucanto/principal/ed25519' import { Delegations } from '../delegations.js' import { decodeDelegations, encodeDelegations } from '../encoding.js' /** * @typedef {import('./types').DelegationsAsJSON} DelegationsAsJSON - */ - -/** - * @template T - * @typedef {import('./types').StoreData<237>} StoreData - */ - -/** - * @template T - * @typedef {import('./types').Store<237>} Store + * @typedef {import('./types').StoreDataKeyEd} StoreData + * @typedef {import('./types').StoreKeyEd} Store */ /** * Store implementation with "conf" * - * @implements {Store<237>} + * @implements {Store} */ export class StoreConf { #config @@ -51,19 +41,19 @@ export class StoreConf { return this.#config.has('meta') && this.#config.has('principal') } - /** @type {Store<237>['init']} */ + /** @type {Store['init']} */ async init(data) { - const principal = data.agent || (await SigningPrincipal.generate()) + const principal = data.principal || (await Signer.generate()) const delegations = data.delegations || new Delegations({ principal, }) - /** @type {StoreData<237>} */ + /** @type {StoreData} */ const storeData = { accounts: data.accounts || [], meta: data.meta || { name: 'agent', type: 'device' }, - agent: principal, + principal, delegations, } @@ -73,29 +63,29 @@ export class StoreConf { /** * - * @param {StoreData<237>} data + * @param {StoreData} data */ async save(data) { this.setAccounts(data.accounts) this.setDelegations(data.delegations) this.setMeta(data.meta) - this.setPrincipal(data.agent) + this.setPrincipal(data.principal) return this } - /** @type {Store<237>['load']} */ + /** @type {Store['load']} */ async load() { - /** @type {StoreData<237>} */ + /** @type {StoreData} */ return { accounts: await this.getAccounts(), meta: await this.getMeta(), - agent: await this.getPrincipal(), + principal: await this.getPrincipal(), delegations: await this.getDelegations(), } } async createAccount() { - return await SigningPrincipal.generate() + return await Signer.generate() } /** @@ -108,26 +98,26 @@ export class StoreConf { } /** - * @param {Types.SigningPrincipal<237>} [principal] + * @param {Signer.EdSigner} [principal] */ async setPrincipal(principal) { let signer = principal if (!signer) { - signer = await SigningPrincipal.generate() + signer = await Signer.generate() } - this.#config.set('principal', SigningPrincipal.format(signer)) + this.#config.set('principal', Signer.format(signer)) return signer } async getPrincipal() { const raw = this.#config.get('principal') - return SigningPrincipal.parse(/** @type {string} */ (raw)) + return Signer.parse(/** @type {string} */ (raw)) } async getMeta() { const raw = this.#config.get('meta') - return /** @type {import('../awake/types').PeerMeta} */ (raw) + return /** @type {import('../types').AgentMeta} */ (raw) } /** @@ -149,22 +139,25 @@ export class StoreConf { const data = /** @type {DelegationsAsJSON} */ ( this.#config.get('delegations') ) - return new Delegations({ + const delegations = new Delegations({ principal: await this.getPrincipal(), created: await decodeDelegations(data.created || ''), - received: await decodeDelegations(data.received || ''), meta: new Map(data.meta), }) + + await delegations.addMany(await decodeDelegations(data.received || '')) + + return delegations } /** * - * @param {Types.SigningPrincipal<237>[]} accounts + * @param {Signer.EdSigner[]} accounts */ async setAccounts(accounts) { const encoded = [] for (const acc of accounts) { - encoded.push(SigningPrincipal.format(acc)) + encoded.push(Signer.format(acc)) } this.#config.set('accounts', encoded) @@ -174,14 +167,14 @@ export class StoreConf { async getAccounts() { const encoded = /** @type {string[]} */ (this.#config.get('accounts')) - /** @type {Types.SigningPrincipal<237>[]} */ + /** @type {Signer.EdSigner[]} */ const accounts = [] if (!Array.isArray(encoded)) { return accounts } for (const acc of encoded) { - accounts.push(SigningPrincipal.parse(acc)) + accounts.push(Signer.parse(acc)) } return accounts diff --git a/packages/access/src/stores/store-memory.js b/packages/access/src/stores/store-memory.js index 56c8b4584..02293746e 100644 --- a/packages/access/src/stores/store-memory.js +++ b/packages/access/src/stores/store-memory.js @@ -1,4 +1,4 @@ -import { SigningPrincipal } from '@ucanto/principal' +import { Signer } from '@ucanto/principal/ed25519' // @ts-ignore // eslint-disable-next-line no-unused-vars import * as Types from '@ucanto/interface' @@ -6,26 +6,18 @@ import { Delegations } from '../delegations.js' /** * @typedef {import('./types').DelegationsAsJSON} DelegationsAsJSON - */ - -/** - * @template T - * @typedef {import('./types').StoreData<237>} StoreData - */ - -/** - * @template T - * @typedef {import('./types').Store<237>} Store + * @typedef {import('./types').StoreDataKeyEd} StoreData + * @typedef {import('./types').StoreKeyEd} Store */ /** * Store implementation with "conf" * - * @implements {Store<237>} + * @implements {Store} */ export class StoreMemory { constructor() { - /** @type {StoreData<237>} */ + /** @type {StoreData} */ // @ts-ignore this.data = {} } @@ -37,7 +29,7 @@ export class StoreMemory { async close() {} async exists() { - return this.data.meta !== undefined && this.data.agent !== undefined + return this.data.meta !== undefined && this.data.principal !== undefined } static async create() { @@ -47,19 +39,19 @@ export class StoreMemory { return store } - /** @type {Store<237>['init']} */ + /** @type {Store['init']} */ async init(data) { - const principal = data.agent || (await SigningPrincipal.generate()) + const principal = data.principal || (await Signer.generate()) const delegations = data.delegations || new Delegations({ principal, }) - /** @type {StoreData<237>} */ + /** @type {StoreData} */ const storeData = { accounts: data.accounts || [], meta: data.meta || { name: 'agent', type: 'device' }, - agent: principal, + principal, delegations, } @@ -69,7 +61,7 @@ export class StoreMemory { /** * - * @param {StoreData<237>} data + * @param {StoreData} data */ async save(data) { this.data = { @@ -78,13 +70,13 @@ export class StoreMemory { return this } - /** @type {Store<237>['load']} */ + /** @type {Store['load']} */ async load() { - /** @type {StoreData<237>} */ + /** @type {StoreData} */ return this.data } async createAccount() { - return await SigningPrincipal.generate() + return await Signer.generate() } } diff --git a/packages/access/src/stores/types.ts b/packages/access/src/stores/types.ts index 314693460..1f1c7fb86 100644 --- a/packages/access/src/stores/types.ts +++ b/packages/access/src/stores/types.ts @@ -1,6 +1,6 @@ import { AgentMeta } from '../types.js' -import * as Ucanto from '@ucanto/interface' import { Delegations } from '../delegations.js' +import ed25519 from '@ucanto/principal/ed25519' export interface DelegationsAsJSON { created: string @@ -8,19 +8,22 @@ export interface DelegationsAsJSON { meta: Array<[string, AgentMeta]> } -export interface StoreData { - accounts: Array> +export interface StoreData { + accounts: T[] meta: AgentMeta - agent: Ucanto.SigningPrincipal + principal: T delegations: Delegations } -export interface Store { +export interface Store { open: () => Promise> close: () => Promise exists: () => Promise init: (data: Partial>) => Promise> save: (data: StoreData) => Promise> load: () => Promise> - createAccount: () => Promise> + createAccount: () => Promise } + +export interface StoreKeyEd extends Store {} +export interface StoreDataKeyEd extends StoreData {} diff --git a/packages/access/src/types.ts b/packages/access/src/types.ts index 6cb528352..0f73871ca 100644 --- a/packages/access/src/types.ts +++ b/packages/access/src/types.ts @@ -1,27 +1,20 @@ /* eslint-disable @typescript-eslint/indent */ import type { - Delegation, - Fact, - Proof, + Capabilities, + Failure, + Phantom, RequestEncoder, ResponseDecoder, ServiceMethod, - SigningPrincipal, - Principal, - Failure, - Phantom, - Capabilities, - Link as IPLDLink, + UCAN, + URI, } from '@ucanto/interface' -import * as UCAN from '@ipld/dag-ucan' import type { + AccountInfo, IdentityIdentify, IdentityRegister, IdentityValidate, - UploadAdd, - UploadList, - UploadRemove, } from './capabilities/types' import { VoucherClaim, VoucherRedeem } from './capabilities/types.js' @@ -51,20 +44,19 @@ export interface Service { > redeem: ServiceMethod } - upload: { - add: ServiceMethod - /** - * Upload list has no defined failure conditions (apart from usual ucanto - * errors) which is why it's error is of type `never`. For unknown accounts - * list MUST be considered empty. - */ - list: ServiceMethod - /** - * Upload remove has no defined failure condition (apart from usual ucanto - * errors) which is why it's error is of type `never`. Removing an upload - * not in the list MUST be considered succesful NOOP. - */ - remove: ServiceMethod + account: { + info: ServiceMethod< + AccountInfo, + { + did: UCAN.DID + agent: UCAN.DID + email: URI<'mailto:'> + product: URI<'product:'> + updated_at: string + inserted_at: string + }, + Failure + > } } @@ -75,99 +67,3 @@ export interface AgentMeta { image?: URL type: 'device' | 'app' | 'service' } - -export interface ValidateOptions { - url?: URL - audience?: Principal - issuer: SigningPrincipal - with?: UCAN.DID - caveats: { - as: `mailto:${string}` - } - lifetimeInSeconds?: number - expiration?: number - notBefore?: number - - nonce?: string - - facts?: Fact[] - proofs?: Proof[] -} - -export interface RegisterOptions { - url?: URL - audience?: Principal - issuer: SigningPrincipal - with?: `mailto:${string}` - caveats?: { - as: UCAN.DID - } - lifetimeInSeconds?: number - expiration?: number - notBefore?: number - - nonce?: string - - facts?: Fact[] - proof: Delegation<[IdentityRegister]> -} - -export interface IdentifyOptions { - url?: URL - audience?: Principal - issuer: SigningPrincipal - with?: `mailto:${string}` - caveats?: { - as: UCAN.DID - } - lifetimeInSeconds?: number - expiration?: number - notBefore?: number - - nonce?: string - - facts?: Fact[] - proof?: Delegation<[IdentityIdentify]> -} - -export interface PullRegisterOptions { - url?: URL - issuer: SigningPrincipal - signal?: AbortSignal -} - -/** - * Error MAY occur on `upload/add` if provided `shards` contain invalid CIDs e.g - * non CAR cids. - */ - -export interface InvalidUpload extends Failure { - name: 'InvalidUpload' -} - -/** - * On succeful upload/add provider will respond back with a `root` CID that - * was added. - */ -export interface UploadAddOk { - root: IPLDLink -} - -/** - * On succesful upload/list provider returns `uploads` list of `{root}` elements. - * Please note that by wrapping list in an object we create an opportunity to - * extend type in backwards compatible way to accomodate for paging information - * in the future. Likewise list contains `{root}` objects which also would allow - * us to add more fields in a future like size, date etc... - */ -export interface UploadListOk { - uploads: Array<{ root: IPLDLink }> -} - -/** - * On succesful upload/remove provider returns empty object. Please not that - * will allow us to extend result type with more things in the future in a - * backwards compatible way. - */ -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface UploadRemoveOk {} diff --git a/packages/access/test/awake-channel.test.js b/packages/access/test/awake-channel.test.js index 3fddac6ac..3f1889d34 100644 --- a/packages/access/test/awake-channel.test.js +++ b/packages/access/test/awake-channel.test.js @@ -5,7 +5,7 @@ import { getWebsocketServer } from './helpers/miniflare.js' import pWaitFor from 'p-wait-for' import * as UCAN from '@ipld/dag-ucan' import * as DID from '@ipld/dag-ucan/did' -import { SigningPrincipal } from '@ucanto/principal' +import { Signer } from '@ucanto/principal/ed25519' describe('awake channel', function () { const host = new URL('ws://127.0.0.1:8788/connect') @@ -55,7 +55,7 @@ describe('awake channel', function () { assert.deepEqual(data, { type: 'awake/init' }) done = true }) - await ws1.send({ + ws1.send({ type: 'awake/init', }) @@ -67,10 +67,10 @@ describe('awake channel', function () { ws2.subscribe('awake/init', (data) => { done++ }) - await ws1.send({ + ws1.send({ type: 'awake/init', }) - await ws1.send({ + ws1.send({ type: 'awake/init', }) @@ -90,10 +90,10 @@ describe('awake channel', function () { ws2.subscribe('awake/init', () => { done++ }) - await ws1.send({ + ws1.send({ type: 'awake/init', }) - await ws1.send({ + ws1.send({ type: 'awake/init', }) @@ -105,7 +105,7 @@ describe('awake channel', function () { describe('awake/res', function () { it('should send awake/res', async function () { const ucan = await UCAN.issue({ - issuer: await SigningPrincipal.generate(), + issuer: await Signer.generate(), audience: DID.parse(ws2.keypair.did), capabilities: [{ with: 'awake:', can: '*' }], }) @@ -120,7 +120,7 @@ describe('awake channel', function () { it('should fail with wrong aud awake/res', async function () { const ucan = await UCAN.issue({ - issuer: await SigningPrincipal.generate(), + issuer: await Signer.generate(), audience: DID.parse(ws2.keypair.did), capabilities: [{ with: 'awake:', can: '*' }], }) diff --git a/packages/access/test/awake.test.js b/packages/access/test/awake.test.js index 495cbab01..fad942615 100644 --- a/packages/access/test/awake.test.js +++ b/packages/access/test/awake.test.js @@ -70,6 +70,7 @@ describe('awake', function () { pin = await requestor.bootstrap([ { with: responder.did, can: 'identity/*' }, ]) + console.log(pin) }, { priority: 2 } ) diff --git a/packages/access/test/capabilities/store.test.js b/packages/access/test/capabilities/store.test.js index 0a6d7266d..cc2c95fe2 100644 --- a/packages/access/test/capabilities/store.test.js +++ b/packages/access/test/capabilities/store.test.js @@ -1,7 +1,7 @@ /* eslint-disable unicorn/no-null */ import assert from 'assert' import { access } from '@ucanto/validator' -import { Principal } from '@ucanto/principal' +import { Verifier } from '@ucanto/principal' import { delegate, parseLink } from '@ucanto/core' import * as Store from '../../src/capabilities/store.js' import { @@ -10,6 +10,7 @@ import { mallory as account, bob, } from '../helpers/fixtures.js' +import { createCarCid } from '../helpers/utils.js' describe('store capabilities', function () { const any = delegate({ @@ -39,7 +40,7 @@ describe('store capabilities', function () { issuer: alice, audience: w3, with: account.did(), - caveats: { + nb: { link: parseLink('bafkqaaa'), }, proofs: [await any], @@ -47,7 +48,7 @@ describe('store capabilities', function () { const result = await access(await add.delegate(), { capability: Store.add, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -59,7 +60,7 @@ describe('store capabilities', function () { assert.deepEqual(result.audience.did(), w3.did()) assert.equal(result.capability.can, 'store/add') - assert.deepEqual(result.capability.caveats, { + assert.deepEqual(result.capability.nb, { link: parseLink('bafkqaaa'), }) }) @@ -69,7 +70,7 @@ describe('store capabilities', function () { issuer: alice, audience: w3, with: account.did(), - caveats: { + nb: { link: parseLink('bafkqaaa'), }, proofs: [await store], @@ -77,7 +78,7 @@ describe('store capabilities', function () { const result = await access(await add.delegate(), { capability: Store.add, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -89,7 +90,7 @@ describe('store capabilities', function () { assert.deepEqual(result.audience.did(), w3.did()) assert.equal(result.capability.can, 'store/add') - assert.deepEqual(result.capability.caveats, { + assert.deepEqual(result.capability.nb, { link: parseLink('bafkqaaa'), }) }) @@ -122,15 +123,15 @@ describe('store capabilities', function () { issuer: bob, audience: w3, with: account.did(), - caveats: { + nb: { link: parseLink('bafkqaaa'), }, - proofs: [await store], + proofs: [store], }) const result = await access(await add.delegate(), { capability: Store.add, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -142,7 +143,7 @@ describe('store capabilities', function () { assert.deepEqual(result.audience.did(), w3.did()) assert.equal(result.capability.can, 'store/add') - assert.deepEqual(result.capability.caveats, { + assert.deepEqual(result.capability.nb, { link: parseLink('bafkqaaa'), }) }) @@ -153,7 +154,7 @@ describe('store capabilities', function () { issuer: alice, audience: bob, with: account.did(), - caveats: { + nb: { size: 1024, }, proofs: [await any], @@ -165,16 +166,16 @@ describe('store capabilities', function () { issuer: bob, audience: w3, with: account.did(), - caveats: { + nb: { size: 1000, link: parseLink('bafkqaaa'), }, - proofs: [await delegation], + proofs: [delegation], }) const result = await access(await add.delegate(), { capability: Store.add, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -186,7 +187,7 @@ describe('store capabilities', function () { assert.deepEqual(result.audience.did(), w3.did()) assert.equal(result.capability.can, 'store/add') - assert.deepEqual(result.capability.caveats, { + assert.deepEqual(result.capability.nb, { link: parseLink('bafkqaaa'), size: 1000, }) @@ -197,7 +198,7 @@ describe('store capabilities', function () { issuer: bob, audience: w3, with: account.did(), - caveats: { + nb: { size: 2048, link: parseLink('bafkqaaa'), }, @@ -206,7 +207,7 @@ describe('store capabilities', function () { const result = await access(await add.delegate(), { capability: Store.add, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -227,13 +228,13 @@ describe('store capabilities', function () { issuer: alice, audience: w3, with: account.did(), - caveats: { + nb: { // @ts-expect-error size, }, proofs, }) - }, /Expecting an Integer but instead got/) + }, /Expected value of type/) }) it(`store/add validation fails when size is ${json}`, async () => { @@ -244,23 +245,26 @@ describe('store capabilities', function () { { can: 'store/add', with: account.did(), - root: parseLink('bafkqaaa'), - size, + nb: { + link: await createCarCid('bafkqaaa'), + size, + }, }, ], proofs: [await any], }) + // @ts-expect-error - size type doesnt not match because we are testing fails const result = await access(add, { capability: Store.add, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, }) assert.equal(result.error, true) - assert.match(String(result), /Expecting an Integer but instead got/) + assert.match(String(result), /Expected value of type/) }) } @@ -271,11 +275,11 @@ describe('store capabilities', function () { issuer: alice, audience: w3, with: account.did(), - caveats: { + nb: { size: 1024.2, }, proofs, }) - }, /Expecting an Integer but instead got: number 1024\.2/) + }, /Expected value of type integer instead got 1024\.2/) }) }) diff --git a/packages/access/test/capabilities/upload.test.js b/packages/access/test/capabilities/upload.test.js index 95818761d..d52b66fb1 100644 --- a/packages/access/test/capabilities/upload.test.js +++ b/packages/access/test/capabilities/upload.test.js @@ -1,16 +1,15 @@ import assert from 'assert' import { access } from '@ucanto/validator' -import { Principal } from '@ucanto/principal' +import { Verifier } from '@ucanto/principal' import { delegate, parseLink } from '@ucanto/core' import * as Upload from '../../src/capabilities/upload.js' -import { codec as CARCodec } from '@ucanto/transport/car' -import { codec as CBOR } from '@ucanto/transport/cbor' import { alice, bob, service as w3, mallory as account, } from '../helpers/fixtures.js' +import { createCarCid, parseCarLink } from '../helpers/utils.js' describe('upload capabilities', function () { // delegation from account to agent @@ -34,20 +33,21 @@ describe('upload capabilities', function () { proofs: [await any], }) .delegate() + const root = await createCarCid('root') const add = Upload.add.invoke({ issuer: bob, audience: w3, with: account.did(), - caveats: { - root: parseLink('bafkqaaa'), + nb: { + root, }, proofs: [upload], }) const result = await access(await add.delegate(), { capability: Upload.add, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -59,8 +59,8 @@ describe('upload capabilities', function () { assert.deepEqual(result.audience.did(), w3.did()) assert.equal(result.capability.can, 'upload/add') - assert.deepEqual(result.capability.caveats, { - root: parseLink('bafkqaaa'), + assert.deepEqual(result.capability.nb, { + root, }) }) @@ -72,19 +72,20 @@ describe('upload capabilities', function () { proofs: [await any], }) + const root = await createCarCid('root') const add = Upload.add.invoke({ audience: w3, issuer: bob, with: account.did(), - caveats: { - root: parseLink('bafkqaaa'), + nb: { + root, }, proofs: [await upload.delegate()], }) const result = await access(await add.delegate(), { capability: Upload.add, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -96,8 +97,8 @@ describe('upload capabilities', function () { assert.deepEqual(result.audience.did(), w3.did()) assert.equal(result.capability.can, 'upload/add') - assert.deepEqual(result.capability.caveats, { - root: parseLink('bafkqaaa'), + assert.deepEqual(result.capability.nb, { + root, }) }) @@ -108,12 +109,9 @@ describe('upload capabilities', function () { issuer: alice, audience: w3, with: account.did(), - caveats: { - root: parseLink('bafkqaaa'), - shards: [ - // @ts-expect-error - not a CAR cid - parseLink('bafkqaaa'), - ], + nb: { + root: parseCarLink('bafkqaaa'), + shards: [parseCarLink('bafkqaaa')], }, proofs, }) @@ -128,8 +126,10 @@ describe('upload capabilities', function () { { can: 'upload/add', with: account.did(), - root: parseLink('bafkqaaa'), - shards: [parseLink('bafkqaaa')], + nb: { + root: parseCarLink('bafkqaaa'), + shards: [parseCarLink('bafkqaaa')], + }, }, ], proofs: [await any], @@ -137,7 +137,7 @@ describe('upload capabilities', function () { const result = await access(add, { capability: Upload.add, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -147,22 +147,22 @@ describe('upload capabilities', function () { }) it('upload/add works with shards that are CAR cids', async () => { - const cbor = await CBOR.write({ hello: 'world' }) - const shard = await CARCodec.write({ roots: [cbor] }) + const shard = await createCarCid('shard') + const root = await createCarCid('root') const add = Upload.add.invoke({ issuer: alice, audience: w3, with: account.did(), - caveats: { - root: parseLink('bafkqaaa'), - shards: [shard.cid], + nb: { + root, + shards: [shard], }, proofs: [await any], }) const result = await access(await add.delegate(), { capability: Upload.add, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -174,9 +174,9 @@ describe('upload capabilities', function () { assert.deepEqual(result.audience.did(), w3.did()) assert.equal(result.capability.can, 'upload/add') - assert.deepEqual(result.capability.caveats, { - root: parseLink('bafkqaaa'), - shards: [shard.cid], + assert.deepEqual(result.capability.nb, { + root, + shards: [shard], }) }) @@ -187,8 +187,8 @@ describe('upload capabilities', function () { audience: w3, // @ts-expect-error - not a CAR cid with: 'mailto:alice@web.mail', - caveats: { - root: parseLink('bafkqaaa'), + nb: { + root: parseCarLink('bafkqaaa'), }, }) }, /Expected did: URI instead got mailto:alice@web.mail/) @@ -208,9 +208,10 @@ describe('upload capabilities', function () { proofs: [await any], }) + // @ts-expect-error testing error const result = await access(add, { capability: Upload.add, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -229,26 +230,26 @@ describe('upload capabilities', function () { issuer: alice, audience: bob, with: account.did(), - caveats: {}, + nb: {}, proofs: [await any], }) .delegate() - const cbor = await CBOR.write({ hello: 'world' }) + const root = await createCarCid('hello') const add = Upload.add.invoke({ issuer: bob, audience: w3, with: account.did(), - caveats: { - root: cbor.cid, + nb: { + root, }, proofs: [await delegation], }) const result = await access(await add.delegate(), { capability: Upload.add, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -258,8 +259,8 @@ describe('upload capabilities', function () { assert.fail(result.message) } - assert.deepEqual(result.capability.caveats, { - root: cbor.cid, + assert.deepEqual(result.capability.nb, { + root, }) }) @@ -269,28 +270,28 @@ describe('upload capabilities', function () { issuer: alice, audience: bob, with: account.did(), - caveats: { - root: parseLink('bafkqaaa'), + nb: { + root: await createCarCid('hello'), }, proofs: [await any], }) .delegate() - const cbor = await CBOR.write({ hello: 'world' }) + const root = await createCarCid('hello2') - const add = await Upload.add.invoke({ + const add = Upload.add.invoke({ issuer: bob, audience: w3, with: account.did(), - caveats: { - root: cbor.cid, + nb: { + root, }, proofs: [await delegation], }) const result = await access(await add.delegate(), { capability: Upload.add, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -299,38 +300,37 @@ describe('upload capabilities', function () { assert.equal(result.error, true) assert.match( String(result), - /bafyreidykglsfhoixmivffc5uwhcgshx4j465xwqntbmu43nb2dzqwfvae violates imposed root constraint bafkqaaa/ + /bagbaieraubcexvgwca3dj3xzd7qfheu6wuuiqikqoaoya7bwfj24ta4eqwca violates imposed root constraint bagbaieratxbhji7b2gtwb7gojwmb5rxngrf66flidrobs3ijglyjmtyu4juq/ ) }) it('upload/add should fail when escalating shards', async () => { - const cbor = await CBOR.write({ hello: 'world' }) - const shard = await CARCodec.write({ roots: [cbor] }) + const shard = await createCarCid('shard') const delegation = Upload.add .invoke({ issuer: alice, audience: bob, with: account.did(), - caveats: { - shards: [shard.cid], + nb: { + shards: [shard], }, proofs: [await any], }) .delegate() - const add = await Upload.add.invoke({ + const add = Upload.add.invoke({ issuer: bob, audience: w3, with: account.did(), - caveats: { - root: parseLink('bafkqaaa'), + nb: { + root: await createCarCid('world2'), }, proofs: [await delegation], }) const result = await access(await add.delegate(), { capability: Upload.add, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -339,7 +339,7 @@ describe('upload capabilities', function () { assert.equal(result.error, true) assert.match( String(result), - /imposed shards constraint bagbaieraha2ehrhh5ycdp76hijjo3eablsaikm5jlrbt4vmcn32p7reg3uiq/ + /imposed shards constraint bagbaierar5jtiax76ossjdhyqshypwkkrztwp3zch7voido4pmuxrcoyq7za/ ) }) @@ -353,7 +353,7 @@ describe('upload capabilities', function () { const result = await access(await list.delegate(), { capability: Upload.list, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -365,7 +365,7 @@ describe('upload capabilities', function () { assert.deepEqual(result.audience.did(), w3.did()) assert.equal(result.capability.can, 'upload/list') - assert.deepEqual(result.capability.caveats, {}) + assert.deepEqual(result.capability.nb, {}) }) it('upload/list can be derived from *', async () => { @@ -385,7 +385,7 @@ describe('upload capabilities', function () { const result = await access(await list.delegate(), { capability: Upload.list, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -397,7 +397,7 @@ describe('upload capabilities', function () { assert.deepEqual(result.audience.did(), w3.did()) assert.equal(result.capability.can, 'upload/list') - assert.deepEqual(result.capability.caveats, {}) + assert.deepEqual(result.capability.nb, {}) }) it('upload/list can be derived from upload/list', async () => { @@ -417,7 +417,7 @@ describe('upload capabilities', function () { const result = await access(await list.delegate(), { capability: Upload.list, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -429,7 +429,7 @@ describe('upload capabilities', function () { assert.deepEqual(result.audience.did(), w3.did()) assert.equal(result.capability.can, 'upload/list') - assert.deepEqual(result.capability.caveats, {}) + assert.deepEqual(result.capability.nb, {}) }) it('upload/list capability requires with to be a did', () => { @@ -457,9 +457,10 @@ describe('upload capabilities', function () { proofs: [await any], }) + // @ts-ignore const result = await access(list, { capability: Upload.list, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -477,14 +478,14 @@ describe('upload capabilities', function () { audience: w3, with: account.did(), proofs: [await any], - caveats: { + nb: { root: parseLink('bafkqaaa'), }, }) const result = await access(await remove.delegate(), { capability: Upload.remove, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -496,7 +497,7 @@ describe('upload capabilities', function () { assert.deepEqual(result.audience.did(), w3.did()) assert.equal(result.capability.can, 'upload/remove') - assert.deepEqual(result.capability.caveats, { + assert.deepEqual(result.capability.nb, { root: parseLink('bafkqaaa'), }) }) @@ -514,14 +515,14 @@ describe('upload capabilities', function () { issuer: bob, with: account.did(), proofs: [await upload.delegate()], - caveats: { + nb: { root: parseLink('bafkqaaa'), }, }) const result = await access(await remove.delegate(), { capability: Upload.remove, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -533,7 +534,7 @@ describe('upload capabilities', function () { assert.deepEqual(result.audience.did(), w3.did()) assert.equal(result.capability.can, 'upload/remove') - assert.deepEqual(result.capability.caveats, { + assert.deepEqual(result.capability.nb, { root: parseLink('bafkqaaa'), }) }) @@ -544,7 +545,7 @@ describe('upload capabilities', function () { audience: bob, with: account.did(), proofs: [await any], - caveats: { + nb: { root: parseLink('bafkqaaa'), }, }) @@ -554,14 +555,14 @@ describe('upload capabilities', function () { issuer: bob, with: account.did(), proofs: [await delegation.delegate()], - caveats: { + nb: { root: parseLink('bafkqaaa'), }, }) const result = await access(await remove.delegate(), { capability: Upload.remove, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -573,7 +574,8 @@ describe('upload capabilities', function () { assert.deepEqual(result.audience.did(), w3.did()) assert.equal(result.capability.can, 'upload/remove') - assert.deepEqual(result.capability.caveats, { + // @ts-ignore + assert.deepEqual(result.capability.nb, { root: parseLink('bafkqaaa'), }) }) @@ -604,9 +606,10 @@ describe('upload capabilities', function () { proofs: [await any], }) + // @ts-ignore const result = await access(remove, { capability: Upload.remove, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -624,28 +627,28 @@ describe('upload capabilities', function () { issuer: alice, audience: bob, with: account.did(), - caveats: { + nb: { root: parseLink('bafkqaaa'), }, proofs: [await any], }) .delegate() - const cbor = await CBOR.write({ hello: 'world' }) + const root = await createCarCid('root') - const remove = await Upload.remove.invoke({ + const remove = Upload.remove.invoke({ issuer: bob, audience: w3, with: account.did(), - caveats: { - root: cbor.cid, + nb: { + root, }, proofs: [await delegation], }) const result = await access(await remove.delegate(), { capability: Upload.remove, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -654,7 +657,7 @@ describe('upload capabilities', function () { assert.equal(result.error, true) assert.match( String(result), - /bafyreidykglsfhoixmivffc5uwhcgshx4j465xwqntbmu43nb2dzqwfvae violates imposed root constraint bafkqaaa/ + /bagbaieral6qo2fk7dph2ltggtw2qc6hda23hawvpc4duykdsh4soobxfe55a violates imposed root constraint bafkqaaa/ ) }) }) diff --git a/packages/access/test/capabilities/voucher.test.js b/packages/access/test/capabilities/voucher.test.js index dce1c65f1..056b4b1dc 100644 --- a/packages/access/test/capabilities/voucher.test.js +++ b/packages/access/test/capabilities/voucher.test.js @@ -1,6 +1,6 @@ import assert from 'assert' import { access } from '@ucanto/validator' -import { Principal } from '@ucanto/principal' +import { Verifier } from '@ucanto/principal/ed25519' import { delegate } from '@ucanto/core' import * as Voucher from '../../src/capabilities/voucher.js' import { alice, bob, service, mallory } from '../helpers/fixtures.js' @@ -10,9 +10,9 @@ describe('voucher capabilities', function () { const account = mallory const claim = Voucher.claim.invoke({ issuer: alice, - audience: service.principal, + audience: service, with: account.did(), - caveats: { + nb: { identity: 'mailto:alice@email.com', product: 'product:free', service: service.did(), @@ -20,7 +20,7 @@ describe('voucher capabilities', function () { proofs: [ await delegate({ issuer: account, - audience: alice.principal, + audience: alice, capabilities: [ { can: 'voucher/*', @@ -33,7 +33,7 @@ describe('voucher capabilities', function () { const result = await access(await claim.delegate(), { capability: Voucher.claim, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -41,7 +41,7 @@ describe('voucher capabilities', function () { if (!result.error) { assert.deepEqual(result.audience.did(), service.did()) assert.equal(result.capability.can, 'voucher/claim') - assert.deepEqual(result.capability.caveats, { + assert.deepEqual(result.capability.nb, { identity: 'mailto:alice@email.com', product: 'product:free', service: service.did(), @@ -52,9 +52,9 @@ describe('voucher capabilities', function () { it('should delegate from claim to claim', async function () { const claim = Voucher.claim.invoke({ issuer: bob, - audience: service.principal, + audience: service, with: alice.did(), - caveats: { + nb: { identity: 'mailto:alice@email.com', product: 'product:free', service: service.did(), @@ -63,9 +63,9 @@ describe('voucher capabilities', function () { await Voucher.claim .invoke({ issuer: alice, - audience: bob.principal, + audience: bob, with: alice.did(), - caveats: { + nb: { identity: 'mailto:alice@email.com', product: 'product:free', service: service.did(), @@ -77,7 +77,7 @@ describe('voucher capabilities', function () { const result = await access(await claim.delegate(), { capability: Voucher.claim, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, @@ -86,7 +86,7 @@ describe('voucher capabilities', function () { if (!result.error) { assert.deepEqual(result.audience.did(), service.did()) assert.equal(result.capability.can, 'voucher/claim') - assert.deepEqual(result.capability.caveats, { + assert.deepEqual(result.capability.nb, { identity: 'mailto:alice@email.com', product: 'product:free', service: service.did(), @@ -99,9 +99,9 @@ describe('voucher capabilities', function () { it('should error claim to claim when caveats are different', async function () { const claim = Voucher.claim.invoke({ issuer: bob, - audience: service.principal, + audience: service, with: alice.did(), - caveats: { + nb: { identity: 'mailto:alice@email.com', product: 'product:freess', service: service.did(), @@ -110,9 +110,9 @@ describe('voucher capabilities', function () { await Voucher.claim .invoke({ issuer: alice, - audience: bob.principal, + audience: bob, with: alice.did(), - caveats: { + nb: { identity: 'mailto:alice@email.com', product: 'product:free', service: service.did(), @@ -124,7 +124,7 @@ describe('voucher capabilities', function () { const result = await access(await claim.delegate(), { capability: Voucher.claim, - principal: Principal, + principal: Verifier, canIssue: (claim, issuer) => { return claim.with === issuer }, diff --git a/packages/access/test/helpers/fixtures.js b/packages/access/test/helpers/fixtures.js index 197b8d98a..5f03c4314 100644 --- a/packages/access/test/helpers/fixtures.js +++ b/packages/access/test/helpers/fixtures.js @@ -1,18 +1,18 @@ -import { SigningPrincipal } from '@ucanto/principal' +import { Signer } from '@ucanto/principal/ed25519' /** did:key:z6Mkqa4oY9Z5Pf5tUcjLHLUsDjKwMC95HGXdE1j22jkbhz6r */ -export const alice = SigningPrincipal.parse( +export const alice = Signer.parse( 'MgCZT5vOnYZoVAeyjnzuJIVY9J4LNtJ+f8Js0cTPuKUpFne0BVEDJjEu6quFIU8yp91/TY/+MYK8GvlKoTDnqOCovCVM=' ) /** did:key:z6MkffDZCkCTWreg8868fG1FGFogcJj5X6PY93pPcWDn9bob */ -export const bob = SigningPrincipal.parse( +export const bob = Signer.parse( 'MgCYbj5AJfVvdrjkjNCxB3iAUwx7RQHVQ7H1sKyHy46Iose0BEevXgL1V73PD9snOCIoONgb+yQ9sycYchQC8kygR4qY=' ) /** did:key:z6MktafZTREjJkvV5mfJxcLpNBoVPwDLhTuMg9ng7dY4zMAL */ -export const mallory = SigningPrincipal.parse( +export const mallory = Signer.parse( 'MgCYtH0AvYxiQwBG6+ZXcwlXywq9tI50G2mCAUJbwrrahkO0B0elFYkl3Ulf3Q3A/EvcVY0utb4etiSE8e6pi4H0FEmU=' ) -export const service = SigningPrincipal.parse( +export const service = Signer.parse( 'MgCYKXoHVy7Vk4/QjcEGi+MCqjntUiasxXJ8uJKY0qh11e+0Bs8WsdqGK7xothgrDzzWD0ME7ynPjz2okXDh8537lId8=' ) diff --git a/packages/access/test/helpers/utils.js b/packages/access/test/helpers/utils.js new file mode 100644 index 000000000..7bbbabb33 --- /dev/null +++ b/packages/access/test/helpers/utils.js @@ -0,0 +1,21 @@ +// eslint-disable-next-line no-unused-vars +import * as Ucanto from '@ucanto/interface' +import { parseLink } from '@ucanto/core' +import { codec as CARCodec } from '@ucanto/transport/car' +import { codec as CBOR } from '@ucanto/transport/cbor' + +/** + * @param {string} source + */ +export function parseCarLink(source) { + return /** @type {Ucanto.Link} */ (parseLink(source)) +} + +/** + * @param {string} source + */ +export async function createCarCid(source) { + const cbor = await CBOR.write({ hello: source }) + const shard = await CARCodec.write({ roots: [cbor] }) + return shard.cid +} diff --git a/packages/store/package.json b/packages/store/package.json index d1b4566c5..9f75e0bca 100644 --- a/packages/store/package.json +++ b/packages/store/package.json @@ -19,19 +19,20 @@ "homepage": "https://github.com/web3-storage/w3-protocol/tree/main/packages/store", "scripts": { "check": "tsc --build", - "test": "npm run test:node", + "testsss": "npm run test:node", "test:node": "mocha test", "test:browser": "pw-test test", "testw": "watch 'pnpm test' src test --interval 1", - "lint": "tsc --build && eslint '**/*.{js,ts}' && prettier --check '**/*.{js,ts,yml,json}' --ignore-path ../../.gitignore" + "lintss": "tsc --build && eslint '**/*.{js,ts}' && prettier --check '**/*.{js,ts,yml,json}' --ignore-path ../../.gitignore" }, "dependencies": { - "@ucanto/client": "^1.0.1", - "@ucanto/core": "^1.0.1", - "@ucanto/interface": "^1.0.0", - "@ucanto/principal": "^1.0.1", - "@ucanto/server": "^1.0.2", - "@ucanto/transport": "^1.0.1", + "@ucanto/client": "^2.0.0", + "@ucanto/core": "^2.0.0", + "@ucanto/interface": "^2.0.0", + "@ucanto/principal": "^2.0.0", + "@ucanto/server": "^2.0.0", + "@ucanto/transport": "^2.0.0", + "@ucanto/validator": "^2.0.0", "@web-std/fetch": "^4.1.0", "@web3-storage/sigv4": "^1.0.0", "multiformats": "^9.7.0" @@ -42,8 +43,8 @@ "@types/mocha": "^10.0.0", "chai": "^4.3.6", "chai-subset": "^1.6.0", - "hd-scripts": "^3.0.1", - "mocha": "^10.0.0", + "hd-scripts": "^3.0.2", + "mocha": "^10.1.0", "playwright-test": "^8.1.1", "typescript": "^4.8.4" }, diff --git a/packages/wallet/package.json b/packages/wallet/package.json index e72217980..c9d400c44 100644 --- a/packages/wallet/package.json +++ b/packages/wallet/package.json @@ -16,13 +16,13 @@ "react-dom": "18.2.0" }, "devDependencies": { - "@types/node": "^18.8.5", + "@types/node": "^18.11.0", "@types/react": "^18.0.20", "eslint": "^8.25.0", "eslint-config-next": "12.3.1", - "hd-scripts": "^3.0.1", + "hd-scripts": "^3.0.2", "typescript": "4.8.4", - "wrangler": "^2.1.11" + "wrangler": "^2.1.12" }, "eslintConfig": { "extends": [ diff --git a/patches/npx-import@1.1.3.patch b/patches/npx-import@1.1.3.patch deleted file mode 100644 index 63f711254..000000000 --- a/patches/npx-import@1.1.3.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/lib/utils.js b/lib/utils.js -index 4a6734f78af172f4d96c41f5cb6be80623d9f466..d283e09c904fc79112f076a7da1c098b724ea334 100644 ---- a/lib/utils.js -+++ b/lib/utils.js -@@ -8,6 +8,7 @@ export async function _importRelative(installDir, packageWithPath) { - return await import(pathToFileURL(_resolveRelative(installDir, packageWithPath)).href); - } - export function _resolve(packageWithPath) { -+ const require = createRequire(import.meta.url) - return require.resolve(packageWithPath); - } - export function _resolveRelative(installDir, packageWithPath) { \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8158e042b..8c9f02ec7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,57 +1,49 @@ lockfileVersion: 5.4 -overrides: - npx-import: 1.1.3 - -patchedDependencies: - npx-import@1.1.3: - hash: ibhtsmyg5e2r3aa7xebxvn6xhm - path: patches/npx-import@1.1.3.patch - importers: .: specifiers: lint-staged: ^13.0.3 prettier: 2.7.1 - simple-git-hooks: ^2.8.0 + simple-git-hooks: ^2.8.1 typescript: ^4.8.4 - wrangler: ^2.1.11 + wrangler: ^2.1.12 devDependencies: lint-staged: 13.0.3 prettier: 2.7.1 - simple-git-hooks: 2.8.0 + simple-git-hooks: 2.8.1 typescript: 4.8.4 - wrangler: 2.1.11 + wrangler: 2.1.12 packages/access: specifiers: - '@ipld/car': ^4.1.6 - '@ipld/dag-ucan': 3.0.0-beta + '@ipld/car': ^4.1.5 + '@ipld/dag-ucan': 4.0.0-beta '@noble/ed25519': ^1.7.1 '@types/assert': ^1.5.6 '@types/inquirer': ^9.0.2 '@types/mocha': ^10.0.0 - '@types/node': ^18.8.5 + '@types/node': ^18.11.0 '@types/ws': ^8.5.3 - '@ucanto/client': ^1.0.1 - '@ucanto/core': ^1.0.1 - '@ucanto/interface': ^1.0.0 - '@ucanto/principal': ^1.0.1 - '@ucanto/server': ^1.0.2 - '@ucanto/transport': ^1.0.1 - '@ucanto/validator': ^1.0.2 + '@ucanto/client': ^2.0.0 + '@ucanto/core': ^2.0.0 + '@ucanto/interface': ^2.0.0 + '@ucanto/principal': ^2.0.0 + '@ucanto/server': ^2.0.0 + '@ucanto/transport': ^2.0.0 + '@ucanto/validator': ^2.0.0 '@web-std/fetch': ^4.1.0 assert: ^2.0.0 bigint-mod-arith: ^3.1.2 conf: ^10.1.2 delay: ^5.0.0 dotenv: ^16.0.3 - hd-scripts: ^3.0.1 - inquirer: ^9.1.3 + hd-scripts: ^3.0.2 + inquirer: ^9.1.4 isomorphic-ws: ^5.0.0 - miniflare: ^2.10.0 - mocha: ^10.0.0 + miniflare: ^2.9.0 + mocha: ^10.1.0 multiformats: ^9.8.1 nanoid: ^4.0.0 one-webcrypto: ^1.0.3 @@ -68,20 +60,20 @@ importers: zod: ^3.19.1 dependencies: '@ipld/car': 4.1.6 - '@ipld/dag-ucan': 3.0.0-beta + '@ipld/dag-ucan': 4.0.0-beta '@noble/ed25519': 1.7.1 '@types/ws': 8.5.3 - '@ucanto/client': 1.0.1 - '@ucanto/core': 1.0.1 - '@ucanto/interface': 1.0.0 - '@ucanto/principal': 1.0.1 - '@ucanto/server': 1.0.2 - '@ucanto/transport': 1.0.1 - '@ucanto/validator': 1.0.2 + '@ucanto/client': 2.0.0 + '@ucanto/core': 2.0.0 + '@ucanto/interface': 2.0.0 + '@ucanto/principal': 2.0.0 + '@ucanto/server': 2.0.0 + '@ucanto/transport': 2.0.0 + '@ucanto/validator': 2.0.0 '@web-std/fetch': 4.1.0 bigint-mod-arith: 3.1.2 conf: 10.2.0 - inquirer: 9.1.3 + inquirer: 9.1.4 isomorphic-ws: 5.0.0_ws@8.9.0 multiformats: 9.9.0 nanoid: 4.0.0 @@ -98,13 +90,13 @@ importers: '@types/assert': 1.5.6 '@types/inquirer': 9.0.2 '@types/mocha': 10.0.0 - '@types/node': 18.8.5 + '@types/node': 18.11.0 assert: 2.0.0 delay: 5.0.0 dotenv: 16.0.3 - hd-scripts: 3.0.1 + hd-scripts: 3.0.2 miniflare: 2.10.0 - mocha: 10.0.0 + mocha: 10.1.0 sade: 1.8.1 typescript: 4.8.4 watch: 1.0.2 @@ -112,19 +104,19 @@ importers: packages/access-api: specifiers: '@cloudflare/workers-types': ^3.16.0 - '@ipld/dag-ucan': 3.0.0-beta + '@ipld/dag-ucan': 4.0.0-beta '@sentry/cli': ^2.7.0 '@sentry/webpack-plugin': ^1.19.1 '@types/assert': ^1.5.6 '@types/git-rev-sync': ^2.0.0 - '@types/node': ^18.8.5 - '@ucanto/client': ^1.0.1 - '@ucanto/core': ^1.0.1 - '@ucanto/interface': ^1.0.0 - '@ucanto/principal': ^1.0.1 - '@ucanto/server': ^1.0.2 - '@ucanto/transport': ^1.0.1 - '@ucanto/validator': ^1.0.2 + '@types/node': ^18.11.0 + '@ucanto/client': ^2.0.0 + '@ucanto/core': ^2.0.0 + '@ucanto/interface': ^2.0.0 + '@ucanto/principal': ^2.0.0 + '@ucanto/server': ^2.0.0 + '@ucanto/transport': ^2.0.0 + '@ucanto/validator': ^2.0.0 '@web3-storage/access': workspace:^ '@web3-storage/worker-utils': 0.4.3-dev assert: ^2.0.0 @@ -136,7 +128,7 @@ importers: esbuild: ^0.15.10 execa: ^6.1.0 git-rev-sync: ^3.0.1 - hd-scripts: ^3.0.1 + hd-scripts: ^3.0.2 miniflare: ^2.10.0 multiformats: ^9.8.1 nanoid: ^4.0.0 @@ -147,16 +139,16 @@ importers: toucan-js: ^2.7.0 typescript: 4.8.4 workers-qb: ^0.1.2 - wrangler: ^2.1.11 - dependencies: - '@ipld/dag-ucan': 3.0.0-beta - '@ucanto/client': 1.0.1 - '@ucanto/core': 1.0.1 - '@ucanto/interface': 1.0.0 - '@ucanto/principal': 1.0.1 - '@ucanto/server': 1.0.2 - '@ucanto/transport': 1.0.1 - '@ucanto/validator': 1.0.2 + wrangler: ^2.1.12 + dependencies: + '@ipld/dag-ucan': 4.0.0-beta + '@ucanto/client': 2.0.0 + '@ucanto/core': 2.0.0 + '@ucanto/interface': 2.0.0 + '@ucanto/principal': 2.0.0 + '@ucanto/server': 2.0.0 + '@ucanto/transport': 2.0.0 + '@ucanto/validator': 2.0.0 '@web3-storage/access': link:../access '@web3-storage/worker-utils': 0.4.3-dev multiformats: 9.9.0 @@ -165,28 +157,28 @@ importers: toucan-js: 2.7.0 workers-qb: 0.1.2 devDependencies: - '@cloudflare/workers-types': 3.16.0 + '@cloudflare/workers-types': 3.17.0 '@sentry/cli': 2.7.0 '@sentry/webpack-plugin': 1.19.1 '@types/assert': 1.5.6 '@types/git-rev-sync': 2.0.0 - '@types/node': 18.8.5 + '@types/node': 18.11.0 assert: 2.0.0 ava: 4.3.3 better-sqlite3: 7.6.2 buffer: 6.0.3 delay: 5.0.0 dotenv: 16.0.3 - esbuild: 0.15.10 + esbuild: 0.15.11 execa: 6.1.0 git-rev-sync: 3.0.2 - hd-scripts: 3.0.1 + hd-scripts: 3.0.2 miniflare: 2.10.0 process: 0.11.10 readable-stream: 4.2.0 sade: 1.8.1 typescript: 4.8.4 - wrangler: 2.1.11 + wrangler: 2.1.12 packages/access-ws: specifiers: @@ -195,7 +187,7 @@ importers: '@sentry/webpack-plugin': ^1.19.1 '@types/assert': ^1.5.6 '@types/git-rev-sync': ^2.0.0 - '@types/node': ^18.8.5 + '@types/node': ^18.11.0 '@types/ws': ^8.5.3 '@web3-storage/worker-utils': 0.4.3-dev assert: ^2.0.0 @@ -206,7 +198,7 @@ importers: esbuild: ^0.15.10 execa: ^6.1.0 git-rev-sync: ^3.0.1 - hd-scripts: ^3.0.1 + hd-scripts: ^3.0.2 isomorphic-ws: ^5.0.0 miniflare: ^2.10.0 multiformats: ^9.8.1 @@ -217,7 +209,7 @@ importers: sade: ^1.7.4 toucan-js: ^2.7.0 typescript: 4.8.4 - wrangler: ^2.1.11 + wrangler: ^2.1.12 ws: ^8.8.1 dependencies: '@types/ws': 8.5.3 @@ -228,56 +220,58 @@ importers: toucan-js: 2.7.0 ws: 8.9.0 devDependencies: - '@cloudflare/workers-types': 3.16.0 + '@cloudflare/workers-types': 3.17.0 '@sentry/cli': 2.7.0 '@sentry/webpack-plugin': 1.19.1 '@types/assert': 1.5.6 '@types/git-rev-sync': 2.0.0 - '@types/node': 18.8.5 + '@types/node': 18.11.0 assert: 2.0.0 ava: 4.3.3 buffer: 6.0.3 delay: 5.0.0 dotenv: 16.0.3 - esbuild: 0.15.10 + esbuild: 0.15.11 execa: 6.1.0 git-rev-sync: 3.0.2 - hd-scripts: 3.0.1 + hd-scripts: 3.0.2 miniflare: 2.10.0 p-wait-for: 5.0.0 process: 0.11.10 readable-stream: 4.2.0 sade: 1.8.1 typescript: 4.8.4 - wrangler: 2.1.11 + wrangler: 2.1.12 packages/store: specifiers: '@types/chai': ^4.3.0 '@types/chai-subset': ^1.3.3 '@types/mocha': ^10.0.0 - '@ucanto/client': ^1.0.1 - '@ucanto/core': ^1.0.1 - '@ucanto/interface': ^1.0.0 - '@ucanto/principal': ^1.0.1 - '@ucanto/server': ^1.0.2 - '@ucanto/transport': ^1.0.1 + '@ucanto/client': ^2.0.0 + '@ucanto/core': ^2.0.0 + '@ucanto/interface': ^2.0.0 + '@ucanto/principal': ^2.0.0 + '@ucanto/server': ^2.0.0 + '@ucanto/transport': ^2.0.0 + '@ucanto/validator': ^2.0.0 '@web-std/fetch': ^4.1.0 '@web3-storage/sigv4': ^1.0.0 chai: ^4.3.6 chai-subset: ^1.6.0 - hd-scripts: ^3.0.1 - mocha: ^10.0.0 + hd-scripts: ^3.0.2 + mocha: ^10.1.0 multiformats: ^9.7.0 playwright-test: ^8.1.1 typescript: ^4.8.4 dependencies: - '@ucanto/client': 1.0.1 - '@ucanto/core': 1.0.1 - '@ucanto/interface': 1.0.0 - '@ucanto/principal': 1.0.1 - '@ucanto/server': 1.0.2 - '@ucanto/transport': 1.0.1 + '@ucanto/client': 2.0.0 + '@ucanto/core': 2.0.0 + '@ucanto/interface': 2.0.0 + '@ucanto/principal': 2.0.0 + '@ucanto/server': 2.0.0 + '@ucanto/transport': 2.0.0 + '@ucanto/validator': 2.0.0 '@web-std/fetch': 4.1.0 '@web3-storage/sigv4': 1.0.2 multiformats: 9.9.0 @@ -287,35 +281,35 @@ importers: '@types/mocha': 10.0.0 chai: 4.3.6 chai-subset: 1.6.0 - hd-scripts: 3.0.1 - mocha: 10.0.0 + hd-scripts: 3.0.2 + mocha: 10.1.0 playwright-test: 8.1.1 typescript: 4.8.4 packages/wallet: specifiers: - '@types/node': ^18.8.5 + '@types/node': ^18.11.0 '@types/react': ^18.0.20 eslint: ^8.25.0 eslint-config-next: 12.3.1 - hd-scripts: ^3.0.1 + hd-scripts: ^3.0.2 next: 12.3.1 react: 18.2.0 react-dom: 18.2.0 typescript: 4.8.4 - wrangler: ^2.1.11 + wrangler: ^2.1.12 dependencies: next: 12.3.1_biqbaboplfbrettd7655fr4n2y react: 18.2.0 react-dom: 18.2.0_react@18.2.0 devDependencies: - '@types/node': 18.8.5 + '@types/node': 18.11.0 '@types/react': 18.0.21 eslint: 8.25.0 eslint-config-next: 12.3.1_z4bbprzjrhnsfa24uvmcbu7f5q - hd-scripts: 3.0.1 + hd-scripts: 3.0.2 typescript: 4.8.4 - wrangler: 2.1.11 + wrangler: 2.1.12 packages: @@ -345,19 +339,19 @@ packages: js-tokens: 4.0.0 dev: true - /@babel/runtime-corejs3/7.19.1: - resolution: {integrity: sha512-j2vJGnkopRzH+ykJ8h68wrHnEUmtK//E723jjixiAl/PPf6FhqY/vYRcMVlNydRKQjQsTsYEjpx+DZMIvnGk/g==} + /@babel/runtime-corejs3/7.19.4: + resolution: {integrity: sha512-HzjQ8+dzdx7dmZy4DQ8KV8aHi/74AjEbBGTFutBmg/pd3dY5/q1sfuOGPTFGEytlQhWoeVXqcK5BwMgIkRkNDQ==} engines: {node: '>=6.9.0'} dependencies: - core-js-pure: 3.25.3 - regenerator-runtime: 0.13.9 + core-js-pure: 3.25.5 + regenerator-runtime: 0.13.10 dev: true - /@babel/runtime/7.19.0: - resolution: {integrity: sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA==} + /@babel/runtime/7.19.4: + resolution: {integrity: sha512-EXpLCrk55f+cYqmHsSR+yD/0gAIMxxA9QK9lnQWzhMCvt+YmoBN7Zx94s++Kv0+unHk39vxNO8t+CMA2WSS3wA==} engines: {node: '>=6.9.0'} dependencies: - regenerator-runtime: 0.13.9 + regenerator-runtime: 0.13.10 dev: true /@cloudflare/kv-asset-handler/0.2.0: @@ -366,12 +360,12 @@ packages: mime: 3.0.0 dev: true - /@cloudflare/workers-types/3.16.0: - resolution: {integrity: sha512-gaBUSaKS65mN3iKZEgichbXYEmAa/pXkc5Gbt+1BptYphdGkj09ggdsiE4w8g0F/uI1g36QaTKrzVnBAWMipvQ==} + /@cloudflare/workers-types/3.17.0: + resolution: {integrity: sha512-u0cUQ4ntWFFwn5jx0ETa2ItvwvfOMjyaKF2fX2vFVujrSgNES/PnvRzPAhdt9CMYAMidInm0MGkIjxHRsFBaeg==} dev: true - /@es-joy/jsdoccomment/0.31.0: - resolution: {integrity: sha512-tc1/iuQcnaiSIUVad72PBierDFpsxdUHtEF/OrfqvM1CBAsIoMP51j52jTMb3dXriwhieTo289InzZj72jL3EQ==} + /@es-joy/jsdoccomment/0.32.0: + resolution: {integrity: sha512-sbA+4b9VZSf9DJqGrTRS6jxclyA5WpWiKXWxVqEN5HP4LOECJGfZlTS82l9w/byp4pXGPYsf5WQrW2iDG7+cKw==} engines: {node: ^14 || ^16 || ^17 || ^18} dependencies: comment-parser: 1.3.1 @@ -397,8 +391,8 @@ packages: rollup-plugin-node-polyfills: 0.2.1 dev: true - /@esbuild/android-arm/0.15.10: - resolution: {integrity: sha512-FNONeQPy/ox+5NBkcSbYJxoXj9GWu8gVGJTVmUyoOCKQFDTrHVKgNSzChdNt0I8Aj/iKcsDf2r9BFwv+FSNUXg==} + /@esbuild/android-arm/0.15.11: + resolution: {integrity: sha512-PzMcQLazLBkwDEkrNPi9AbjFt6+3I7HKbiYF2XtWQ7wItrHvEOeO3T8Am434zAozWtVP7lrTue1bEfc2nYWeCA==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -406,8 +400,8 @@ packages: dev: true optional: true - /@esbuild/linux-loong64/0.15.10: - resolution: {integrity: sha512-w0Ou3Z83LOYEkwaui2M8VwIp+nLi/NA60lBLMvaJ+vXVMcsARYdEzLNE7RSm4+lSg4zq4d7fAVuzk7PNQ5JFgg==} + /@esbuild/linux-loong64/0.15.11: + resolution: {integrity: sha512-geWp637tUhNmhL3Xgy4Bj703yXB9dqiLJe05lCUfjSFDrQf9C/8pArusyPUbUbPwlC/EAUjBw32sxuIl/11dZw==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -479,8 +473,8 @@ packages: multiformats: 9.9.0 dev: false - /@ipld/dag-ucan/3.0.0-beta: - resolution: {integrity: sha512-WzKh4mDiUElslfI/cg9VjLNHsT+9r3XjwbDY/gck+1289sCU1Hywj1/9PMx0DMJoEEwd2OFy/bq5PX2IyQ20Cw==} + /@ipld/dag-ucan/4.0.0-beta: + resolution: {integrity: sha512-LNlTYutHn8fwJpempDFVKHpTG52hpz3QkHQJUkdh1yP79+cfpjGHP31R0lhUmYLouZb0d0r4wXKKJCrPnq7oVQ==} dependencies: '@ipld/dag-cbor': 7.0.3 '@ipld/dag-json': 8.0.11 @@ -501,8 +495,8 @@ packages: resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} dev: true - /@jridgewell/trace-mapping/0.3.15: - resolution: {integrity: sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==} + /@jridgewell/trace-mapping/0.3.17: + resolution: {integrity: sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==} dependencies: '@jridgewell/resolve-uri': 3.1.0 '@jridgewell/sourcemap-codec': 1.4.14 @@ -518,16 +512,6 @@ packages: undici: 5.9.1 dev: true - /@miniflare/cache/2.9.0: - resolution: {integrity: sha512-lriPxUEva9TJ01vU9P7pI60s3SsFnb4apWkNwZ+D7CRqyXPipSbapY8BWI2FUIwkEG7xap6UhzeTS76NettCXQ==} - engines: {node: '>=16.13'} - dependencies: - '@miniflare/core': 2.9.0 - '@miniflare/shared': 2.9.0 - http-cache-semantics: 4.1.0 - undici: 5.9.1 - dev: true - /@miniflare/cli-parser/2.10.0: resolution: {integrity: sha512-NAiCtqlHTUKCmV+Jl9af+ixGmMhiGhIyIfr/vCdbismNEBxEsrQGg3sQYTNfvCkdHtODurQqayQreFq21OuEow==} engines: {node: '>=16.13'} @@ -536,14 +520,6 @@ packages: kleur: 4.1.5 dev: true - /@miniflare/cli-parser/2.9.0: - resolution: {integrity: sha512-gu8Z7NWNcYw6514/yOvajaj3GmebRucx+EEt3p1vKirO+gvFgKAt/puyUN3p7u8ZZmLuLF/B+wVnH3lj8BWKlg==} - engines: {node: '>=16.13'} - dependencies: - '@miniflare/shared': 2.9.0 - kleur: 4.1.5 - dev: true - /@miniflare/core/2.10.0: resolution: {integrity: sha512-Jx1M5oXQua0jzsJVdZSq07baVRmGC/6JkglrPQGAlZ7gQ1sunVZzq9fjxFqj0bqfEuYS0Wy6+lvK4rOAHISIjw==} engines: {node: '>=16.13'} @@ -560,22 +536,6 @@ packages: urlpattern-polyfill: 4.0.3 dev: true - /@miniflare/core/2.9.0: - resolution: {integrity: sha512-QqSwF6oHvgrFvN5lnrLc6EEagFlZWW+UMU8QdrE8305cNGHrIOxKCA2nte4PVFZUVw/Ts13a0tVhUk3a2fAyxQ==} - engines: {node: '>=16.13'} - dependencies: - '@iarna/toml': 2.2.5 - '@miniflare/queues': 2.9.0 - '@miniflare/shared': 2.9.0 - '@miniflare/watcher': 2.9.0 - busboy: 1.6.0 - dotenv: 10.0.0 - kleur: 4.1.5 - set-cookie-parser: 2.5.1 - undici: 5.9.1 - urlpattern-polyfill: 4.0.3 - dev: true - /@miniflare/d1/2.10.0: resolution: {integrity: sha512-mOYZSmpTthH0tmFTQ+O9G0Q+iDAd7oiUtoIBianlKa9QiqYAoO7EBUPy6kUgDHXapOcN5Ri1u3J5UTpxXvw3qg==} engines: {node: '>=16.7'} @@ -584,14 +544,6 @@ packages: '@miniflare/shared': 2.10.0 dev: true - /@miniflare/d1/2.9.0: - resolution: {integrity: sha512-swK9nzxw1SvVh/4cH3bRR1SBuHQU/YsB8WvuHojxufmgviAD1xhms3XO3rkpAzfKoGM5Oy6DovMe0xUXV/GS0w==} - engines: {node: '>=16.7'} - dependencies: - '@miniflare/core': 2.9.0 - '@miniflare/shared': 2.9.0 - dev: true - /@miniflare/durable-objects/2.10.0: resolution: {integrity: sha512-gU45f52gveFtCasm0ixYnt0mHI1lHrPomtmF+89oZGKBzOqUfO5diDs6wmoRSnovOWZCwtmwQGRoorAQN7AmoA==} engines: {node: '>=16.13'} @@ -602,16 +554,6 @@ packages: undici: 5.9.1 dev: true - /@miniflare/durable-objects/2.9.0: - resolution: {integrity: sha512-7uTvfEUXS7xqwrsWOwWrFUuKc4EiMpVkAWPeYGLB/0TJaJ6N+sZMpYYymdW79TQwPIDfgtpfkIy93MRydqpnrw==} - engines: {node: '>=16.13'} - dependencies: - '@miniflare/core': 2.9.0 - '@miniflare/shared': 2.9.0 - '@miniflare/storage-memory': 2.9.0 - undici: 5.9.1 - dev: true - /@miniflare/html-rewriter/2.10.0: resolution: {integrity: sha512-hCdG99L8+Ros4dn3B5H37PlQPBH0859EoRslzNTd4jzGIkwdiawpJvrvesL8056GjbUjeJN1zh7OPBRuMgyGLw==} engines: {node: '>=16.13'} @@ -622,16 +564,6 @@ packages: undici: 5.9.1 dev: true - /@miniflare/html-rewriter/2.9.0: - resolution: {integrity: sha512-K5OB70PtkMo7M+tU46s/cX/j/qtjD9AlJ0hecYswrxVsfrT/YWyrCQJevmShFfJ92h7jPNigbeC3Od3JiVb6QA==} - engines: {node: '>=16.13'} - dependencies: - '@miniflare/core': 2.9.0 - '@miniflare/shared': 2.9.0 - html-rewriter-wasm: 0.4.1 - undici: 5.9.1 - dev: true - /@miniflare/http-server/2.10.0: resolution: {integrity: sha512-cm6hwkONucll93yoY8dteMp//Knvmb7n6zAgeHrtuNYKn//lAL6bRY//VLTttrMmfWxZFi1C7WpOeCv8Mn6/ug==} engines: {node: '>=16.13'} @@ -649,23 +581,6 @@ packages: - utf-8-validate dev: true - /@miniflare/http-server/2.9.0: - resolution: {integrity: sha512-IVJMkFfMpecq9WiCTvATEKhMuKPK9fMs2E6zmgexaefr3u1VlNtj2QxBxoPUXkT9xMJQlT5sSKstlRR1XKDz9Q==} - engines: {node: '>=16.13'} - dependencies: - '@miniflare/core': 2.9.0 - '@miniflare/shared': 2.9.0 - '@miniflare/web-sockets': 2.9.0 - kleur: 4.1.5 - selfsigned: 2.1.1 - undici: 5.9.1 - ws: 8.9.0 - youch: 2.2.2 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - dev: true - /@miniflare/kv/2.10.0: resolution: {integrity: sha512-3+u1lO77FnlS0lQ6b1VgM1E/ZgQ/zy/FU+SdBG5LUOIiv3x522VYHOApeJLnSEo0KtZUB22Ni0fWQM6DgpaREg==} engines: {node: '>=16.13'} @@ -673,13 +588,6 @@ packages: '@miniflare/shared': 2.10.0 dev: true - /@miniflare/kv/2.9.0: - resolution: {integrity: sha512-EqG51okY5rDtgjYs2Ny6j6IUVdTlJzDjwBKBIuW+wOV9NsAAzEchKVdYAXc8CyxvkggpYX481HydTD2OzK3INQ==} - engines: {node: '>=16.13'} - dependencies: - '@miniflare/shared': 2.9.0 - dev: true - /@miniflare/queues/2.10.0: resolution: {integrity: sha512-WKdO6qI9rfS96KlCjazzPFf+qj6DPov4vONyf18+jzbRjRJh/xwWSk1/1h5A+gDPwVNG8TsNRPh9DW5OKBGNjw==} engines: {node: '>=16.7'} @@ -687,13 +595,6 @@ packages: '@miniflare/shared': 2.10.0 dev: true - /@miniflare/queues/2.9.0: - resolution: {integrity: sha512-cAHWIlLF57rxQaJl19AzXw1k0SOM/uLTlx8r2PylHajZ/RRSs7CkCox3oKA6E5zKyfyxk2M64bmsAFZ9RCA0gw==} - engines: {node: '>=16.7'} - dependencies: - '@miniflare/shared': 2.9.0 - dev: true - /@miniflare/r2/2.10.0: resolution: {integrity: sha512-uC1CCWbwM1t8DdpZgrveg6+CkZLfTq+wUMqs20BC5rCT8u8UyRv6ZVRQ7pTPiswLyt1oYDTXsZJK7tjV0U0zew==} engines: {node: '>=16.13'} @@ -702,14 +603,6 @@ packages: undici: 5.9.1 dev: true - /@miniflare/r2/2.9.0: - resolution: {integrity: sha512-aMFWxxciAE3YsVok2OLy3A7hP5+2j/NaK7txmadgoe1CA8HYZyNuvv7v6bn8HKM5gWnJdT8sk4yEbMbBQ7Jv/A==} - engines: {node: '>=16.13'} - dependencies: - '@miniflare/shared': 2.9.0 - undici: 5.9.1 - dev: true - /@miniflare/runner-vm/2.10.0: resolution: {integrity: sha512-oTsHitQdQ1B1kT3G/6n9AEXsMd/sT1D8tLGzc7Xr79ZrxYxwRO0ATF3cdkxk4dUjUqg/RUqvOJV4YjJGyqvctg==} engines: {node: '>=16.13'} @@ -717,13 +610,6 @@ packages: '@miniflare/shared': 2.10.0 dev: true - /@miniflare/runner-vm/2.9.0: - resolution: {integrity: sha512-vewP+Fy7Czb261GmB9x/YtQkoDs/QP9B5LbP0YfJ35bI2C2j940eJLm8JP72IHV7ILtWNOqMc3Ure8uAbpf9NQ==} - engines: {node: '>=16.13'} - dependencies: - '@miniflare/shared': 2.9.0 - dev: true - /@miniflare/scheduler/2.10.0: resolution: {integrity: sha512-eGt2cZFE/yo585nT8xINQwdbTotZfeRIh6FUWmZkbva1i5SW0zTiOojr5a95vAGBF3TzwWGsUuzJpLhBB69a/g==} engines: {node: '>=16.13'} @@ -733,32 +619,13 @@ packages: cron-schedule: 3.0.6 dev: true - /@miniflare/scheduler/2.9.0: - resolution: {integrity: sha512-eodSCGkJYi4Z+Imbx/bNScDfDSt5HOypVSYjbFHj+hA2aNOdkGw6a1b6mzwx49jJD3GadIkonZAKD0S114yWMA==} - engines: {node: '>=16.13'} - dependencies: - '@miniflare/core': 2.9.0 - '@miniflare/shared': 2.9.0 - cron-schedule: 3.0.6 - dev: true - /@miniflare/shared/2.10.0: resolution: {integrity: sha512-GDSweEhJ3nNtStGm6taZGUNytM0QTQ/sjZSedAKyF1/aHRaZUcD9cuKAMgIbSpKfvgGdLMNS7Bhd8jb249TO7g==} engines: {node: '>=16.13'} dependencies: '@types/better-sqlite3': 7.6.2 kleur: 4.1.5 - npx-import: 1.1.3_ibhtsmyg5e2r3aa7xebxvn6xhm - picomatch: 2.3.1 - dev: true - - /@miniflare/shared/2.9.0: - resolution: {integrity: sha512-5Ew/Ph0cHDQqKvOlmN70kz+qZW0hdgE9fQBStKLY3vDYhnBEhopbCUChSS+FCcL7WtxVJJVE7iB6J09NQTnQ/A==} - engines: {node: '>=16.13'} - dependencies: - '@types/better-sqlite3': 7.6.2 - kleur: 4.1.5 - npx-import: 1.1.3_ibhtsmyg5e2r3aa7xebxvn6xhm + npx-import: 1.1.4 picomatch: 2.3.1 dev: true @@ -771,15 +638,6 @@ packages: '@miniflare/storage-file': 2.10.0 dev: true - /@miniflare/sites/2.9.0: - resolution: {integrity: sha512-+tWf7znxSQqXWGzPup8Xqkl8EmLmx+HaLC+UBtWPNnaJZrsjbbVxKwHpmGIdm+wZasEGfQk/82R21gUs9wdZnw==} - engines: {node: '>=16.13'} - dependencies: - '@miniflare/kv': 2.9.0 - '@miniflare/shared': 2.9.0 - '@miniflare/storage-file': 2.9.0 - dev: true - /@miniflare/storage-file/2.10.0: resolution: {integrity: sha512-K/cRIWiTl4+Z+VO6tl4VfuYXA3NLJgvGPV+BCRYD7uTKuPYHqDMErtD1BI1I7nc3WJhwIXfzJrAR3XXhSKKWQQ==} engines: {node: '>=16.13'} @@ -788,14 +646,6 @@ packages: '@miniflare/storage-memory': 2.10.0 dev: true - /@miniflare/storage-file/2.9.0: - resolution: {integrity: sha512-HZHtHfJaLoDzQFddoIMcDGgAJ3/Nee98gwUYusQam7rj9pbEXnWmk54dzjzsDlkQpB/3MBFQNbtN5Bj1NIt0pg==} - engines: {node: '>=16.13'} - dependencies: - '@miniflare/shared': 2.9.0 - '@miniflare/storage-memory': 2.9.0 - dev: true - /@miniflare/storage-memory/2.10.0: resolution: {integrity: sha512-ZATU+qZtJ9yG0umgTrOEUi9SU//YyDb8nYXMgqT4JHODYA3RTz1SyyiQSOOz589upJPdu1LN+0j8W24WGRwwxQ==} engines: {node: '>=16.13'} @@ -803,13 +653,6 @@ packages: '@miniflare/shared': 2.10.0 dev: true - /@miniflare/storage-memory/2.9.0: - resolution: {integrity: sha512-p2yrr0omQhv6teDbdzhdBKzoQAFmUBMLEx+PtrO7CJHX15ICD08/pFAFAp96IcljNwZZDchU20Z3AcbldMj6Tw==} - engines: {node: '>=16.13'} - dependencies: - '@miniflare/shared': 2.9.0 - dev: true - /@miniflare/watcher/2.10.0: resolution: {integrity: sha512-X9CFYYyszfSYDzs07KhbWC2i08Dpyh3D60fPonYZcoZAfa5h9eATHUdRGvNCdax7awYp4b8bvU8upAI//OPlMg==} engines: {node: '>=16.13'} @@ -817,13 +660,6 @@ packages: '@miniflare/shared': 2.10.0 dev: true - /@miniflare/watcher/2.9.0: - resolution: {integrity: sha512-Yqz8Q1He/2chebXvmCft8sMamuUiDQ4FIn0bwiF0+GBP2vvGCmy6SejXZY4ZD4REluPqQSis3CLKcIOWlHnIsw==} - engines: {node: '>=16.13'} - dependencies: - '@miniflare/shared': 2.9.0 - dev: true - /@miniflare/web-sockets/2.10.0: resolution: {integrity: sha512-W+PrapdQqNEEFeD+amENgPQWcETGDp7OEh6JAoSzCRhHA0OoMe8DG0xb5a5+2FjGW/J7FFKsv84wkURpmFT4dQ==} engines: {node: '>=16.13'} @@ -837,19 +673,6 @@ packages: - utf-8-validate dev: true - /@miniflare/web-sockets/2.9.0: - resolution: {integrity: sha512-Nob9e84m78qeQCka6OQf/JdNOmMkKCkX+i3rg+TYKSSITiMVuyzWp3vz3Ma184lAZiLg44lxBF4ZzENEdi99Kg==} - engines: {node: '>=16.13'} - dependencies: - '@miniflare/core': 2.9.0 - '@miniflare/shared': 2.9.0 - undici: 5.9.1 - ws: 8.9.0 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - dev: true - /@next/env/12.3.1: resolution: {integrity: sha512-9P9THmRFVKGKt9DYqeC2aKIxm8rlvkK38V1P1sRE7qyoPBIs8l9oo79QoSdPtOWfzkbDAVUqvbQGgTMsb8BtJg==} dev: false @@ -981,8 +804,8 @@ packages: resolution: {integrity: sha512-Rk4SkJFaXZiznFyC/t77Q0NKS4FL7TLJJsVG2V2oiEq3kJVeTdxysEe/yRWSpnWMe808XRDJ+VFh5pt/FN5plw==} dev: false - /@noble/hashes/1.1.2: - resolution: {integrity: sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA==} + /@noble/hashes/1.1.3: + resolution: {integrity: sha512-CE0FCR57H2acVI5UOzIGSSIYxZ6v/HOhDR0Ro9VLyhnzLwx0o8W1mmgaqlEUx4049qJDlIBRztv5k+MM8vbO3A==} dev: false /@nodelib/fs.scandir/2.1.5: @@ -1128,7 +951,7 @@ packages: /@types/better-sqlite3/7.6.2: resolution: {integrity: sha512-RgmaapusqTq6IMAr4McMyAsC6RshYTCjXCnzwVV59WctUxC8bNPyUfT9t5F81lKcU41lLurhjqjoMHfauzfqGg==} dependencies: - '@types/node': 18.8.5 + '@types/node': 18.11.0 dev: true /@types/chai-subset/1.3.3: @@ -1172,8 +995,8 @@ packages: resolution: {integrity: sha512-rADY+HtTOA52l9VZWtgQfn4p+UDVM2eDVkMZT1I6syp0YKxW2F9v+0pbRZLsvskhQv/vMb6ZfCay81GHbz5SHg==} dev: true - /@types/node/18.8.5: - resolution: {integrity: sha512-Bq7G3AErwe5A/Zki5fdD3O6+0zDChhg671NfPjtIcbtzDNZTv4NPKMRFr7gtYPG7y+B8uTiNK4Ngd9T0FTar6Q==} + /@types/node/18.11.0: + resolution: {integrity: sha512-IOXCvVRToe7e0ny7HpT/X9Rb2RYtElG1a+VshjwT00HxrM2dWBApHQoqsI6WiY7Q03vdf2bCrIGzVrkF/5t10w==} /@types/normalize-package-data/2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} @@ -1199,6 +1022,10 @@ packages: resolution: {integrity: sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==} dev: true + /@types/semver/7.3.12: + resolution: {integrity: sha512-WwA1MW0++RfXmCr12xeYOOC5baSC9mSb0ZqCquFzKhcoF4TvHu5MKOuXsncgZcpVFhB1pXd5hZmM0ryAoCp12A==} + dev: true + /@types/stack-trace/0.0.29: resolution: {integrity: sha512-TgfOX+mGY/NyNxJLIbDWrO9DjGoVSW9+aB8H2yy1fy32jsvxijhmyJI9fDFgvz3YP4lvJaq9DzdR/M1bOgVc9g==} dev: true @@ -1206,13 +1033,13 @@ packages: /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 18.8.5 + '@types/node': 18.11.0 dev: true /@types/ws/8.5.3: resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} dependencies: - '@types/node': 18.8.5 + '@types/node': 18.11.0 dev: false /@types/yargs-parser/21.0.0: @@ -1225,8 +1052,8 @@ packages: '@types/yargs-parser': 21.0.0 dev: true - /@typescript-eslint/eslint-plugin/5.40.0_25sstg4uu2sk4pm7xcyzuov7xq: - resolution: {integrity: sha512-FIBZgS3DVJgqPwJzvZTuH4HNsZhHMa9SjxTKAZTlMsPw/UzpEjcf9f4dfgDJEHjK+HboUJo123Eshl6niwEm/Q==} + /@typescript-eslint/eslint-plugin/5.40.1_ukgdydjtebaxmxfqp5v5ulh64y: + resolution: {integrity: sha512-FsWboKkWdytGiXT5O1/R9j37YgcjO8MKHSUmWnIEjVaz0krHkplPnYi7mwdb+5+cs0toFNQb0HIrN7zONdIEWg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -1236,10 +1063,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.40.0_z4bbprzjrhnsfa24uvmcbu7f5q - '@typescript-eslint/scope-manager': 5.40.0 - '@typescript-eslint/type-utils': 5.40.0_z4bbprzjrhnsfa24uvmcbu7f5q - '@typescript-eslint/utils': 5.40.0_z4bbprzjrhnsfa24uvmcbu7f5q + '@typescript-eslint/parser': 5.40.1_z4bbprzjrhnsfa24uvmcbu7f5q + '@typescript-eslint/scope-manager': 5.40.1 + '@typescript-eslint/type-utils': 5.40.1_z4bbprzjrhnsfa24uvmcbu7f5q + '@typescript-eslint/utils': 5.40.1_z4bbprzjrhnsfa24uvmcbu7f5q debug: 4.3.4 eslint: 8.25.0 ignore: 5.2.0 @@ -1251,41 +1078,21 @@ packages: - supports-color dev: true - /@typescript-eslint/experimental-utils/5.40.0_z4bbprzjrhnsfa24uvmcbu7f5q: - resolution: {integrity: sha512-wDYn3NYqVOmJI4iSkyWxXUu8Xoa4+OCh97YOXZecMCuXFIgCuxOCOlkR4kZyeXWNrulFyXPcXSbs4USb5IwI8g==} + /@typescript-eslint/experimental-utils/5.40.1_z4bbprzjrhnsfa24uvmcbu7f5q: + resolution: {integrity: sha512-lynjgnQuoCgxtYgYWjoQqijk0kYQNiztnVhoqha3N0kMYFVPURidzCq2vn9XvUUu2XxP130ZRKVDKyeGa2bhbw==} 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.40.0_z4bbprzjrhnsfa24uvmcbu7f5q + '@typescript-eslint/utils': 5.40.1_z4bbprzjrhnsfa24uvmcbu7f5q eslint: 8.25.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/parser/5.38.1_z4bbprzjrhnsfa24uvmcbu7f5q: - resolution: {integrity: sha512-LDqxZBVFFQnQRz9rUZJhLmox+Ep5kdUmLatLQnCRR6523YV+XhRjfYzStQ4MheFA8kMAfUlclHSbu+RKdRwQKw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/scope-manager': 5.38.1 - '@typescript-eslint/types': 5.38.1 - '@typescript-eslint/typescript-estree': 5.38.1_typescript@4.8.4 - debug: 4.3.4 - eslint: 8.25.0 - typescript: 4.8.4 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/parser/5.40.0_z4bbprzjrhnsfa24uvmcbu7f5q: - resolution: {integrity: sha512-Ah5gqyX2ySkiuYeOIDg7ap51/b63QgWZA7w6AHtFrag7aH0lRQPbLzUjk0c9o5/KZ6JRkTTDKShL4AUrQa6/hw==} + /@typescript-eslint/parser/5.40.1_z4bbprzjrhnsfa24uvmcbu7f5q: + resolution: {integrity: sha512-IK6x55va5w4YvXd4b3VrXQPldV9vQTxi5ov+g4pMANsXPTXOcfjx08CRR1Dfrcc51syPtXHF5bgLlMHYFrvQtg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -1294,9 +1101,9 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.40.0 - '@typescript-eslint/types': 5.40.0 - '@typescript-eslint/typescript-estree': 5.40.0_typescript@4.8.4 + '@typescript-eslint/scope-manager': 5.40.1 + '@typescript-eslint/types': 5.40.1 + '@typescript-eslint/typescript-estree': 5.40.1_typescript@4.8.4 debug: 4.3.4 eslint: 8.25.0 typescript: 4.8.4 @@ -1304,24 +1111,16 @@ packages: - supports-color dev: true - /@typescript-eslint/scope-manager/5.38.1: - resolution: {integrity: sha512-BfRDq5RidVU3RbqApKmS7RFMtkyWMM50qWnDAkKgQiezRtLKsoyRKIvz1Ok5ilRWeD9IuHvaidaLxvGx/2eqTQ==} + /@typescript-eslint/scope-manager/5.40.1: + resolution: {integrity: sha512-jkn4xsJiUQucI16OLCXrLRXDZ3afKhOIqXs4R3O+M00hdQLKR58WuyXPZZjhKLFCEP2g+TXdBRtLQ33UfAdRUg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.38.1 - '@typescript-eslint/visitor-keys': 5.38.1 + '@typescript-eslint/types': 5.40.1 + '@typescript-eslint/visitor-keys': 5.40.1 dev: true - /@typescript-eslint/scope-manager/5.40.0: - resolution: {integrity: sha512-d3nPmjUeZtEWRvyReMI4I1MwPGC63E8pDoHy0BnrYjnJgilBD3hv7XOiETKLY/zTwI7kCnBDf2vWTRUVpYw0Uw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.40.0 - '@typescript-eslint/visitor-keys': 5.40.0 - dev: true - - /@typescript-eslint/type-utils/5.40.0_z4bbprzjrhnsfa24uvmcbu7f5q: - resolution: {integrity: sha512-nfuSdKEZY2TpnPz5covjJqav+g5qeBqwSHKBvz7Vm1SAfy93SwKk/JeSTymruDGItTwNijSsno5LhOHRS1pcfw==} + /@typescript-eslint/type-utils/5.40.1_z4bbprzjrhnsfa24uvmcbu7f5q: + resolution: {integrity: sha512-DLAs+AHQOe6n5LRraXiv27IYPhleF0ldEmx6yBqBgBLaNRKTkffhV1RPsjoJBhVup2zHxfaRtan8/YRBgYhU9Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -1330,8 +1129,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.40.0_typescript@4.8.4 - '@typescript-eslint/utils': 5.40.0_z4bbprzjrhnsfa24uvmcbu7f5q + '@typescript-eslint/typescript-estree': 5.40.1_typescript@4.8.4 + '@typescript-eslint/utils': 5.40.1_z4bbprzjrhnsfa24uvmcbu7f5q debug: 4.3.4 eslint: 8.25.0 tsutils: 3.21.0_typescript@4.8.4 @@ -1340,18 +1139,13 @@ packages: - supports-color dev: true - /@typescript-eslint/types/5.38.1: - resolution: {integrity: sha512-QTW1iHq1Tffp9lNfbfPm4WJabbvpyaehQ0SrvVK2yfV79SytD9XDVxqiPvdrv2LK7DGSFo91TB2FgWanbJAZXg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - - /@typescript-eslint/types/5.40.0: - resolution: {integrity: sha512-V1KdQRTXsYpf1Y1fXCeZ+uhjW48Niiw0VGt4V8yzuaDTU8Z1Xl7yQDyQNqyAFcVhpYXIVCEuxSIWTsLDpHgTbw==} + /@typescript-eslint/types/5.40.1: + resolution: {integrity: sha512-Icg9kiuVJSwdzSQvtdGspOlWNjVDnF3qVIKXdJ103o36yRprdl3Ge5cABQx+csx960nuMF21v8qvO31v9t3OHw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.38.1_typescript@4.8.4: - resolution: {integrity: sha512-99b5e/Enoe8fKMLdSuwrfH/C0EIbpUWmeEKHmQlGZb8msY33qn1KlkFww0z26o5Omx7EVjzVDCWEfrfCDHfE7g==} + /@typescript-eslint/typescript-estree/5.40.1_typescript@4.8.4: + resolution: {integrity: sha512-5QTP/nW5+60jBcEPfXy/EZL01qrl9GZtbgDZtDPlfW5zj/zjNrdI2B5zMUHmOsfvOr2cWqwVdWjobCiHcedmQA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -1359,29 +1153,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.38.1 - '@typescript-eslint/visitor-keys': 5.38.1 - debug: 4.3.4 - globby: 11.1.0 - is-glob: 4.0.3 - semver: 7.3.7 - tsutils: 3.21.0_typescript@4.8.4 - typescript: 4.8.4 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/typescript-estree/5.40.0_typescript@4.8.4: - resolution: {integrity: sha512-b0GYlDj8TLTOqwX7EGbw2gL5EXS2CPEWhF9nGJiGmEcmlpNBjyHsTwbqpyIEPVpl6br4UcBOYlcI2FJVtJkYhg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 5.40.0 - '@typescript-eslint/visitor-keys': 5.40.0 + '@typescript-eslint/types': 5.40.1 + '@typescript-eslint/visitor-keys': 5.40.1 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -1392,16 +1165,17 @@ packages: - supports-color dev: true - /@typescript-eslint/utils/5.40.0_z4bbprzjrhnsfa24uvmcbu7f5q: - resolution: {integrity: sha512-MO0y3T5BQ5+tkkuYZJBjePewsY+cQnfkYeRqS6tPh28niiIwPnQ1t59CSRcs1ZwJJNOdWw7rv9pF8aP58IMihA==} + /@typescript-eslint/utils/5.40.1_z4bbprzjrhnsfa24uvmcbu7f5q: + resolution: {integrity: sha512-a2TAVScoX9fjryNrW6BZRnreDUszxqm9eQ9Esv8n5nXApMW0zeANUYlwh/DED04SC/ifuBvXgZpIK5xeJHQ3aw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@types/json-schema': 7.0.11 - '@typescript-eslint/scope-manager': 5.40.0 - '@typescript-eslint/types': 5.40.0 - '@typescript-eslint/typescript-estree': 5.40.0_typescript@4.8.4 + '@types/semver': 7.3.12 + '@typescript-eslint/scope-manager': 5.40.1 + '@typescript-eslint/types': 5.40.1 + '@typescript-eslint/typescript-estree': 5.40.1_typescript@4.8.4 eslint: 8.25.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0_eslint@8.25.0 @@ -1411,87 +1185,76 @@ packages: - typescript dev: true - /@typescript-eslint/visitor-keys/5.38.1: - resolution: {integrity: sha512-bSHr1rRxXt54+j2n4k54p4fj8AHJ49VDWtjpImOpzQj4qjAiOpPni+V1Tyajh19Api1i844F757cur8wH3YvOA==} + /@typescript-eslint/visitor-keys/5.40.1: + resolution: {integrity: sha512-A2DGmeZ+FMja0geX5rww+DpvILpwo1OsiQs0M+joPWJYsiEFBLsH0y1oFymPNul6Z5okSmHpP4ivkc2N0Cgfkw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.38.1 + '@typescript-eslint/types': 5.40.1 eslint-visitor-keys: 3.3.0 dev: true - /@typescript-eslint/visitor-keys/5.40.0: - resolution: {integrity: sha512-ijJ+6yig+x9XplEpG2K6FUdJeQGGj/15U3S56W9IqXKJqleuD7zJ2AX/miLezwxpd7ZxDAqO87zWufKg+RPZyQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@ucanto/client/2.0.0: + resolution: {integrity: sha512-rTgzV80eLRdkhAIqlvdy07mt2w1y/zDCvARsFMrNHlxjE/Bi1TznSV5r8iwjvHyP/lc3pD/IxgUmpOXktIhFig==} dependencies: - '@typescript-eslint/types': 5.40.0 - eslint-visitor-keys: 3.3.0 - dev: true - - /@ucanto/client/1.0.1: - resolution: {integrity: sha512-ZWOCVDXdKhq0r5ZRUN5ubqpfjsQ2Nra2WFv2AyHZWSHA+maI4FA/btJBOWUPHW3BtWNDSt4waEfYXXh4iqkN0g==} - dependencies: - '@ucanto/interface': 1.0.0 + '@ucanto/interface': 2.0.0 multiformats: 9.9.0 dev: false - /@ucanto/core/1.0.1: - resolution: {integrity: sha512-ugGyxbVwe1W7yYiVf281uZqZ5RgZ9f89JK29zQmmU3fv83wO3xIt5cWAr2ctXUAaRKmY0s3kZcMlEYemDDYm+A==} + /@ucanto/core/2.0.0: + resolution: {integrity: sha512-RIe70PTm1XxycMrop2/vcpCkyOy0uXyEfBx29Eihr9H0i7+nt91/r/GiwevgLPdNt68KnU1Y6ixnjR1NdtBqeQ==} dependencies: '@ipld/car': 4.1.6 '@ipld/dag-cbor': 7.0.3 - '@ipld/dag-ucan': 3.0.0-beta - '@ucanto/interface': 1.0.0 + '@ipld/dag-ucan': 4.0.0-beta + '@ucanto/interface': 2.0.0 multiformats: 9.9.0 dev: false - /@ucanto/interface/1.0.0: - resolution: {integrity: sha512-qVsFx7YsPnc5QaGfDGyFaj/M3wog+E/A0dX1LJn+K5GQ6DWd3nKvv+rxfZ888ZU+36gDdji8/R1qfT8GngNTMQ==} + /@ucanto/interface/2.0.0: + resolution: {integrity: sha512-Eo6biNPmjybukD2TPmB/KFZ62wsL14miJRnsDRlCoGzQ1YhMrRoe9/F+el1LZs/HpFZ53kZh30YknIkKB2S+VQ==} dependencies: - '@ipld/dag-ucan': 3.0.0-beta + '@ipld/dag-ucan': 4.0.0-beta multiformats: 9.9.0 dev: false - /@ucanto/principal/1.0.1: - resolution: {integrity: sha512-tuIhJRCj8Plk/XraHlPkOc9WsMsFOyQ9jcYRquD3/ybah4Nh843+eSPfDcOUnB1Y4FJg2wT4R8OEnTZejE7+dA==} + /@ucanto/principal/2.0.0: + resolution: {integrity: sha512-j6I/GugjxRokZp5m9TrpEkPjmn9aRQ04IswM/V06Zqlcvs+6TLk99bXaW9VDdNO6MWeL+y53uv4GsFovdSMDlQ==} dependencies: - '@ipld/dag-ucan': 3.0.0-beta + '@ipld/dag-ucan': 4.0.0-beta '@noble/ed25519': 1.7.1 - '@ucanto/interface': 1.0.0 + '@ucanto/interface': 2.0.0 multiformats: 9.9.0 + one-webcrypto: 1.0.3 dev: false - /@ucanto/server/1.0.2: - resolution: {integrity: sha512-ECXv8y8WM/Do9MSb8DLYbRY7yRvL6VdQL2v1YfU5USjAyNPyjP73M+zpXf7tEhdXcZbqn/JIws3H21J56i7oog==} + /@ucanto/server/2.0.0: + resolution: {integrity: sha512-soZGEdPBI7Md6gjWdCj8IsYVug1ZSoO52iGSv6r0LAIdbMJUMG2eiYby+sZ0GhA5HZctY/QljXqgogdRp2pEkw==} dependencies: - '@ucanto/core': 1.0.1 - '@ucanto/interface': 1.0.0 - '@ucanto/validator': 1.0.2 + '@ucanto/core': 2.0.0 + '@ucanto/interface': 2.0.0 + '@ucanto/validator': 2.0.0 dev: false - /@ucanto/transport/1.0.1: - resolution: {integrity: sha512-zC7ty7l5F47C8uWiZajs8MwplR8KoAGIz72psSrB6R+Zx9Le+SoN2/gyPD0a4cDtpMLEyHOPodOlBTnQEIlEcQ==} + /@ucanto/transport/2.0.0: + resolution: {integrity: sha512-VLGLeaBXtJ+9A3kLESxdoAv5MxBLiEdRcqfGUZOerq8gy/gfwFehuj1TqG8itG1/wDioMPUVkwPgi4hz6yBP8w==} dependencies: '@ipld/car': 4.1.6 '@ipld/dag-cbor': 7.0.3 - '@ucanto/core': 1.0.1 - '@ucanto/interface': 1.0.0 + '@ucanto/core': 2.0.0 + '@ucanto/interface': 2.0.0 multiformats: 9.9.0 dev: false - /@ucanto/validator/1.0.2: - resolution: {integrity: sha512-SFjS/8FDOwzPNM29brT6wgbE+HXD8iQnHR3aeqEgzIUL7j56kluZykfVWD0xR8oLn8vYzNqJqf60YeFAbIBsqg==} + /@ucanto/validator/2.0.0: + resolution: {integrity: sha512-Qd1HsZ7p+hyXO/Z0e6itVhPNLrznc1Njav0R1myaZ3F3nRZx+b/r+6a4DsGLt15NoqWh2JksWgGFmBrVrFoWbA==} dependencies: '@ipld/car': 4.1.6 '@ipld/dag-cbor': 7.0.3 - '@ucanto/core': 1.0.1 - '@ucanto/interface': 1.0.0 + '@ucanto/core': 2.0.0 + '@ucanto/interface': 2.0.0 multiformats: 9.9.0 dev: false - /@ungap/promise-all-settled/1.1.2: - resolution: {integrity: sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==} - dev: true - /@web-std/blob/3.0.4: resolution: {integrity: sha512-+dibyiw+uHYK4dX5cJ7HA+gtDAaUUe6JsOryp2ZpAC7h4ICsh49E34JwHoEKPlPvP0llCrNzz45vvD+xX5QDBg==} dependencies: @@ -1536,7 +1299,7 @@ packages: /@web3-storage/sigv4/1.0.2: resolution: {integrity: sha512-ZUXKK10NmuQgPkqByhb1H3OQxkIM0CIn2BMPhGQw7vQw8WIzrBkk9IJiAVfJ/UVBFrf6uzPbx2lEBLt4diCMnQ==} dependencies: - '@noble/hashes': 1.1.2 + '@noble/hashes': 1.1.3 dev: false /@web3-storage/worker-utils/0.4.3-dev: @@ -1643,11 +1406,11 @@ packages: type-fest: 0.21.3 dev: true - /ansi-escapes/5.0.0: - resolution: {integrity: sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA==} - engines: {node: '>=12'} + /ansi-escapes/6.0.0: + resolution: {integrity: sha512-IG23inYII3dWlU2EyiAiGj6Bwal5GzsgPMwjYGvc1HPE2dgbj4ZB5ToWBKSquKw74nB3TIuOwaI6/jSULzfgrw==} + engines: {node: '>=14.16'} dependencies: - type-fest: 1.4.0 + type-fest: 3.1.0 dev: false /ansi-regex/2.1.1: @@ -1678,15 +1441,9 @@ packages: color-convert: 2.0.1 dev: true - /ansi-styles/6.1.1: - resolution: {integrity: sha512-qDOv24WjnYuL+wbwHdlsYZFy+cgPtrYw0Tn7GLORicQp9BkQLzrgI3Pm4VyR9ERZ41YTn7KlMPuL1n05WdZvmg==} + /ansi-styles/6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} engines: {node: '>=12'} - dev: true - - /ansi-styles/6.2.0: - resolution: {integrity: sha512-3MWBO/XxbkDtc/qpECaUwDM0DQ++ujBjdjs0ElZvChUoPv/P7GOnl3x+R2RF2My5UJHEW5R87q556MiR8U3PLw==} - engines: {node: '>=12'} - dev: false /anymatch/3.1.2: resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==} @@ -1733,8 +1490,8 @@ packages: resolution: {integrity: sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==} engines: {node: '>=6.0'} dependencies: - '@babel/runtime': 7.19.0 - '@babel/runtime-corejs3': 7.19.1 + '@babel/runtime': 7.19.4 + '@babel/runtime-corejs3': 7.19.4 dev: true /array-find-index/1.0.2: @@ -1748,7 +1505,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.3 + es-abstract: 1.20.4 get-intrinsic: 1.1.3 is-string: 1.0.7 dev: true @@ -1764,7 +1521,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.3 + es-abstract: 1.20.4 is-string: 1.0.7 dev: true @@ -1784,7 +1541,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.3 + es-abstract: 1.20.4 es-shim-unscopables: 1.0.0 dev: true @@ -1804,7 +1561,7 @@ packages: es6-object-assign: 1.1.0 is-nan: 1.3.2 object-is: 1.1.5 - util: 0.12.4 + util: 0.12.5 dev: true /assertion-error/1.1.0: @@ -1837,15 +1594,15 @@ packages: dependencies: acorn: 8.8.0 acorn-walk: 8.2.0 - ansi-styles: 6.1.1 + ansi-styles: 6.2.1 arrgv: 1.0.2 arrify: 3.0.0 callsites: 4.0.0 cbor: 8.1.0 - chalk: 5.0.1 + chalk: 5.1.2 chokidar: 3.5.3 chunkd: 2.0.1 - ci-info: 3.4.0 + ci-info: 3.5.0 ci-parallel-vars: 1.0.1 clean-yaml-object: 0.1.0 cli-truncate: 3.1.0 @@ -1879,7 +1636,7 @@ packages: supertap: 3.0.1 temp-dir: 2.0.0 write-file-atomic: 4.0.2 - yargs: 17.5.1 + yargs: 17.6.0 transitivePeerDependencies: - supports-color dev: true @@ -1936,8 +1693,8 @@ packages: readable-stream: 3.6.0 dev: true - /bl/5.0.0: - resolution: {integrity: sha512-8vxFNZ0pflFfi0WXA3WQXlj6CaMEwsmh63I1CNp0q+wWv8sD0ARx1KovSQd0l2GkwrMIOyedq0EF1FxI+RCZLQ==} + /bl/5.1.0: + resolution: {integrity: sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==} dependencies: buffer: 6.0.3 inherits: 2.0.4 @@ -2030,8 +1787,8 @@ packages: engines: {node: '>=10'} dev: true - /caniuse-lite/1.0.30001412: - resolution: {integrity: sha512-+TeEIee1gS5bYOiuf+PS/kp2mrXic37Hl66VY6EAfxasIk5fELTktK2oOezYed12H8w7jt3s512PpulQidPjwA==} + /caniuse-lite/1.0.30001421: + resolution: {integrity: sha512-Sw4eLbgUJAEhjLs1Fa+mk45sidp1wRn5y6GtDpHGBaNJ9OCDJaVh2tIaWWUnGfuXfKf1JCBaIarak3FkVAvEeA==} dev: false /cbor/8.1.0: @@ -2081,15 +1838,10 @@ packages: supports-color: 7.2.0 dev: true - /chalk/5.0.1: - resolution: {integrity: sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==} + /chalk/5.1.2: + resolution: {integrity: sha512-E5CkT4jWURs1Vy5qGJye+XwCkNj7Od3Af7CP6SujMetSMkLs8Do2RWJK5yx1wamHV/op8Rz+9rltjaTQWDnEFQ==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} - /chalk/5.1.1: - resolution: {integrity: sha512-OItMegkSDU3P7OJRWBbNRsQsL8SzgwlIGXSZRVfHCLBYrDgzYDuozwDMwvEDpiZdjr50tdOTbTzuubirtEozsg==} - engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} - dev: false - /chardet/0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} dev: false @@ -2121,10 +1873,6 @@ packages: resolution: {integrity: sha512-7d58XsFmOq0j6el67Ug9mHf9ELUXsQXYJBkyxhH/k+6Ke0qXRnv0kbemx+Twc6fRJ07C49lcbdgm9FL1Ei/6SQ==} dev: true - /ci-info/3.4.0: - resolution: {integrity: sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug==} - dev: true - /ci-info/3.5.0: resolution: {integrity: sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==} dev: true @@ -2258,8 +2006,8 @@ packages: resolution: {integrity: sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==} dev: true - /commander/9.4.0: - resolution: {integrity: sha512-sRPT+umqkz90UA8M1yqYfnHlZA7fF6nSphDtxeywPZ49ysjxDQybzk13CL+mXekDRG92skbcqCLVovuCusNmFw==} + /commander/9.4.1: + resolution: {integrity: sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==} engines: {node: ^12.20.0 || >=14} dev: true @@ -2286,7 +2034,7 @@ packages: js-string-escape: 1.0.1 lodash: 4.17.21 md5-hex: 3.0.1 - semver: 7.3.7 + semver: 7.3.8 well-known-symbols: 2.0.0 dev: true @@ -2303,17 +2051,15 @@ packages: json-schema-typed: 7.0.3 onetime: 5.1.2 pkg-up: 3.1.0 - semver: 7.3.7 + semver: 7.3.8 dev: false /console-control-strings/1.1.0: resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} dev: true - /convert-source-map/1.8.0: - resolution: {integrity: sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==} - dependencies: - safe-buffer: 5.1.2 + /convert-source-map/1.9.0: + resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} dev: true /convert-to-spaces/2.0.1: @@ -2331,8 +2077,8 @@ packages: engines: {node: '>= 0.6'} dev: false - /core-js-pure/3.25.3: - resolution: {integrity: sha512-T/7qvgv70MEvRkZ8p6BasLZmOVYKzOaWNBEHAU8FmveCJkl4nko2quqPQOmy6AJIp5MBanhz9no3A94NoRb0XA==} + /core-js-pure/3.25.5: + resolution: {integrity: sha512-oml3M22pHM+igfWHDfdLVq2ShWmjM2V4L+dQEBs0DWVIqEm9WHCwGAlZ6BmyBQGy5sFrJmcx+856D9lVKyGWYg==} requiresBuild: true dev: true @@ -2513,8 +2259,8 @@ packages: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true - /defaults/1.0.3: - resolution: {integrity: sha512-s82itHOnYrN0Ib8r+z7laQz3sdE+4FP3d9Q7VLO7U+KRT+CR0GsWuyHxzdAY82I7cXv0G/twrqomTJLOssO5HA==} + /defaults/1.0.4: + resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} dependencies: clone: 1.0.4 @@ -2525,8 +2271,8 @@ packages: has-property-descriptors: 1.0.0 object-keys: 1.1.1 - /defined/1.0.0: - resolution: {integrity: sha512-Y2caI5+ZwS5c3RiNDJ6u53VhQHv+hHKwhkI1iHvceKUHw9Df6EK2zRLfjejRgMuCuxK7PfSWIMwWecceVvThjQ==} + /defined/1.0.1: + resolution: {integrity: sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==} dev: true /del/6.1.1: @@ -2645,35 +2391,6 @@ packages: stackframe: 1.3.4 dev: false - /es-abstract/1.20.3: - resolution: {integrity: sha512-AyrnaKVpMzljIdwjzrj+LxGmj8ik2LckwXacHqrJJ/jxz6dDDBcZ7I7nlHM0FvEW8MfbWJwOd+yT2XzYW49Frw==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - es-to-primitive: 1.2.1 - function-bind: 1.1.1 - function.prototype.name: 1.1.5 - get-intrinsic: 1.1.3 - get-symbol-description: 1.0.0 - has: 1.0.3 - has-property-descriptors: 1.0.0 - has-symbols: 1.0.3 - internal-slot: 1.0.3 - is-callable: 1.2.7 - is-negative-zero: 2.0.2 - is-regex: 1.1.4 - is-shared-array-buffer: 1.0.2 - is-string: 1.0.7 - is-weakref: 1.0.2 - object-inspect: 1.12.2 - object-keys: 1.1.1 - object.assign: 4.1.4 - regexp.prototype.flags: 1.4.3 - safe-regex-test: 1.0.0 - string.prototype.trimend: 1.0.5 - string.prototype.trimstart: 1.0.5 - unbox-primitive: 1.0.2 - /es-abstract/1.20.4: resolution: {integrity: sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA==} engines: {node: '>= 0.4'} @@ -2702,7 +2419,6 @@ packages: string.prototype.trimend: 1.0.5 string.prototype.trimstart: 1.0.5 unbox-primitive: 1.0.2 - dev: true /es-get-iterator/1.1.2: resolution: {integrity: sha512-+DTO8GYwbMCwbywjimwZMHp8AuYXOS2JZFWoi2AlPOS3ebnII9w/NLpNZtA7A0YLaVDw+O7KFCeoIV7OPvM7hQ==} @@ -2753,8 +2469,8 @@ packages: dev: true optional: true - /esbuild-android-64/0.15.10: - resolution: {integrity: sha512-UI7krF8OYO1N7JYTgLT9ML5j4+45ra3amLZKx7LO3lmLt1Ibn8t3aZbX5Pu4BjWiqDuJ3m/hsvhPhK/5Y/YpnA==} + /esbuild-android-64/0.15.11: + resolution: {integrity: sha512-rrwoXEiuI1kaw4k475NJpexs8GfJqQUKcD08VR8sKHmuW9RUuTR2VxcupVvHdiGh9ihxL9m3lpqB1kju92Ialw==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -2780,8 +2496,8 @@ packages: dev: true optional: true - /esbuild-android-arm64/0.15.10: - resolution: {integrity: sha512-EOt55D6xBk5O05AK8brXUbZmoFj4chM8u3riGflLa6ziEoVvNjRdD7Cnp82NHQGfSHgYR06XsPI8/sMuA/cUwg==} + /esbuild-android-arm64/0.15.11: + resolution: {integrity: sha512-/hDubOg7BHOhUUsT8KUIU7GfZm5bihqssvqK5PfO4apag7YuObZRZSzViyEKcFn2tPeHx7RKbSBXvAopSHDZJQ==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -2807,8 +2523,8 @@ packages: dev: true optional: true - /esbuild-darwin-64/0.15.10: - resolution: {integrity: sha512-hbDJugTicqIm+WKZgp208d7FcXcaK8j2c0l+fqSJ3d2AzQAfjEYDRM3Z2oMeqSJ9uFxyj/muSACLdix7oTstRA==} + /esbuild-darwin-64/0.15.11: + resolution: {integrity: sha512-1DqHD0ms3AhiwkKnjRUzmiW7JnaJJr5FKrPiR7xuyMwnjDqvNWDdMq4rKSD9OC0piFNK6n0LghsglNMe2MwJtA==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -2834,8 +2550,8 @@ packages: dev: true optional: true - /esbuild-darwin-arm64/0.15.10: - resolution: {integrity: sha512-M1t5+Kj4IgSbYmunf2BB6EKLkWUq+XlqaFRiGOk8bmBapu9bCDrxjf4kUnWn59Dka3I27EiuHBKd1rSO4osLFQ==} + /esbuild-darwin-arm64/0.15.11: + resolution: {integrity: sha512-OMzhxSbS0lwwrW40HHjRCeVIJTURdXFA8c3GU30MlHKuPCcvWNUIKVucVBtNpJySXmbkQMDJdJNrXzNDyvoqvQ==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -2861,8 +2577,8 @@ packages: dev: true optional: true - /esbuild-freebsd-64/0.15.10: - resolution: {integrity: sha512-KMBFMa7C8oc97nqDdoZwtDBX7gfpolkk6Bcmj6YFMrtCMVgoU/x2DI1p74DmYl7CSS6Ppa3xgemrLrr5IjIn0w==} + /esbuild-freebsd-64/0.15.11: + resolution: {integrity: sha512-8dKP26r0/Qyez8nTCwpq60QbuYKOeBygdgOAWGCRalunyeqWRoSZj9TQjPDnTTI9joxd3QYw3UhVZTKxO9QdRg==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -2888,8 +2604,8 @@ packages: dev: true optional: true - /esbuild-freebsd-arm64/0.15.10: - resolution: {integrity: sha512-m2KNbuCX13yQqLlbSojFMHpewbn8wW5uDS6DxRpmaZKzyq8Dbsku6hHvh2U+BcLwWY4mpgXzFUoENEf7IcioGg==} + /esbuild-freebsd-arm64/0.15.11: + resolution: {integrity: sha512-aSGiODiukLGGnSg/O9+cGO2QxEacrdCtCawehkWYTt5VX1ni2b9KoxpHCT9h9Y6wGqNHmXFnB47RRJ8BIqZgmQ==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -2915,8 +2631,8 @@ packages: dev: true optional: true - /esbuild-linux-32/0.15.10: - resolution: {integrity: sha512-guXrwSYFAvNkuQ39FNeV4sNkNms1bLlA5vF1H0cazZBOLdLFIny6BhT+TUbK/hdByMQhtWQ5jI9VAmPKbVPu1w==} + /esbuild-linux-32/0.15.11: + resolution: {integrity: sha512-lsrAfdyJBGx+6aHIQmgqUonEzKYeBnyfJPkT6N2dOf1RoXYYV1BkWB6G02tjsrz1d5wZzaTc3cF+TKmuTo/ZwA==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -2942,8 +2658,8 @@ packages: dev: true optional: true - /esbuild-linux-64/0.15.10: - resolution: {integrity: sha512-jd8XfaSJeucMpD63YNMO1JCrdJhckHWcMv6O233bL4l6ogQKQOxBYSRP/XLWP+6kVTu0obXovuckJDcA0DKtQA==} + /esbuild-linux-64/0.15.11: + resolution: {integrity: sha512-Y2Rh+PcyVhQqXKBTacPCltINN3uIw2xC+dsvLANJ1SpK5NJUtxv8+rqWpjmBgaNWKQT1/uGpMmA9olALy9PLVA==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -2969,8 +2685,8 @@ packages: dev: true optional: true - /esbuild-linux-arm/0.15.10: - resolution: {integrity: sha512-6N8vThLL/Lysy9y4Ex8XoLQAlbZKUyExCWyayGi2KgTBelKpPgj6RZnUaKri0dHNPGgReJriKVU6+KDGQwn10A==} + /esbuild-linux-arm/0.15.11: + resolution: {integrity: sha512-TJllTVk5aSyqPFvvcHTvf6Wu1ZKhWpJ/qNmZO8LL/XeB+LXCclm7HQHNEIz6MT7IX8PmlC1BZYrOiw2sXSB95A==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -2996,8 +2712,8 @@ packages: dev: true optional: true - /esbuild-linux-arm64/0.15.10: - resolution: {integrity: sha512-GByBi4fgkvZFTHFDYNftu1DQ1GzR23jws0oWyCfhnI7eMOe+wgwWrc78dbNk709Ivdr/evefm2PJiUBMiusS1A==} + /esbuild-linux-arm64/0.15.11: + resolution: {integrity: sha512-uhcXiTwTmD4OpxJu3xC5TzAAw6Wzf9O1XGWL448EE9bqGjgV1j+oK3lIHAfsHnuIn8K4nDW8yjX0Sv5S++oRuw==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -3023,8 +2739,8 @@ packages: dev: true optional: true - /esbuild-linux-mips64le/0.15.10: - resolution: {integrity: sha512-BxP+LbaGVGIdQNJUNF7qpYjEGWb0YyHVSKqYKrn+pTwH/SiHUxFyJYSP3pqkku61olQiSBnSmWZ+YUpj78Tw7Q==} + /esbuild-linux-mips64le/0.15.11: + resolution: {integrity: sha512-WD61y/R1M4BLe4gxXRypoQ0Ci+Vjf714QYzcPNkiYv5I8K8WDz2ZR8Bm6cqKxd6rD+e/rZgPDbhQ9PCf7TMHmA==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -3050,8 +2766,8 @@ packages: dev: true optional: true - /esbuild-linux-ppc64le/0.15.10: - resolution: {integrity: sha512-LoSQCd6498PmninNgqd/BR7z3Bsk/mabImBWuQ4wQgmQEeanzWd5BQU2aNi9mBURCLgyheuZS6Xhrw5luw3OkQ==} + /esbuild-linux-ppc64le/0.15.11: + resolution: {integrity: sha512-JVleZS9oPVLTlBhPTWgOwxFWU/wMUdlBwTbGA4GF8c38sLbS13cupj+C8bLq929jU7EMWry4SaL+tKGIaTlqKg==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -3077,8 +2793,8 @@ packages: dev: true optional: true - /esbuild-linux-riscv64/0.15.10: - resolution: {integrity: sha512-Lrl9Cr2YROvPV4wmZ1/g48httE8z/5SCiXIyebiB5N8VT7pX3t6meI7TQVHw/wQpqP/AF4SksDuFImPTM7Z32Q==} + /esbuild-linux-riscv64/0.15.11: + resolution: {integrity: sha512-9aLIalZ2HFHIOZpmVU11sEAS9F8TnHw49daEjcgMpBXHFF57VuT9f9/9LKJhw781Gda0P9jDkuCWJ0tFbErvJw==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -3104,8 +2820,8 @@ packages: dev: true optional: true - /esbuild-linux-s390x/0.15.10: - resolution: {integrity: sha512-ReP+6q3eLVVP2lpRrvl5EodKX7EZ1bS1/z5j6hsluAlZP5aHhk6ghT6Cq3IANvvDdscMMCB4QEbI+AjtvoOFpA==} + /esbuild-linux-s390x/0.15.11: + resolution: {integrity: sha512-sZHtiXXOKsLI3XGBGoYO4qKBzJlb8xNsWmvFiwFMHFzA4AXgDP1KDp7Dawe9C2pavTRBDvl+Ok4n/DHQ59oaTg==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -3131,8 +2847,8 @@ packages: dev: true optional: true - /esbuild-netbsd-64/0.15.10: - resolution: {integrity: sha512-iGDYtJCMCqldMskQ4eIV+QSS/CuT7xyy9i2/FjpKvxAuCzrESZXiA1L64YNj6/afuzfBe9i8m/uDkFHy257hTw==} + /esbuild-netbsd-64/0.15.11: + resolution: {integrity: sha512-hUC9yN06K9sg7ju4Vgu9ChAPdsEgtcrcLfyNT5IKwKyfpLvKUwCMZSdF+gRD3WpyZelgTQfJ+pDx5XFbXTlB0A==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -3158,8 +2874,8 @@ packages: dev: true optional: true - /esbuild-openbsd-64/0.15.10: - resolution: {integrity: sha512-ftMMIwHWrnrYnvuJQRJs/Smlcb28F9ICGde/P3FUTCgDDM0N7WA0o9uOR38f5Xe2/OhNCgkjNeb7QeaE3cyWkQ==} + /esbuild-openbsd-64/0.15.11: + resolution: {integrity: sha512-0bBo9SQR4t66Wd91LGMAqmWorzO0TTzVjYiifwoFtel8luFeXuPThQnEm5ztN4g0fnvcp7AnUPPzS/Depf17wQ==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -3185,8 +2901,8 @@ packages: dev: true optional: true - /esbuild-sunos-64/0.15.10: - resolution: {integrity: sha512-mf7hBL9Uo2gcy2r3rUFMjVpTaGpFJJE5QTDDqUFf1632FxteYANffDZmKbqX0PfeQ2XjUDE604IcE7OJeoHiyg==} + /esbuild-sunos-64/0.15.11: + resolution: {integrity: sha512-EuBdTGlsMTjEl1sQnBX2jfygy7iR6CKfvOzi+gEOfhDqbHXsmY1dcpbVtcwHAg9/2yUZSfMJHMAgf1z8M4yyyw==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -3212,8 +2928,8 @@ packages: dev: true optional: true - /esbuild-windows-32/0.15.10: - resolution: {integrity: sha512-ttFVo+Cg8b5+qHmZHbEc8Vl17kCleHhLzgT8X04y8zudEApo0PxPg9Mz8Z2cKH1bCYlve1XL8LkyXGFjtUYeGg==} + /esbuild-windows-32/0.15.11: + resolution: {integrity: sha512-O0/Wo1Wk6dc0rZSxkvGpmTNIycEznHmkObTFz2VHBhjPsO4ZpCgfGxNkCpz4AdAIeMczpTXt/8d5vdJNKEGC+Q==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -3239,8 +2955,8 @@ packages: dev: true optional: true - /esbuild-windows-64/0.15.10: - resolution: {integrity: sha512-2H0gdsyHi5x+8lbng3hLbxDWR7mKHWh5BXZGKVG830KUmXOOWFE2YKJ4tHRkejRduOGDrBvHBriYsGtmTv3ntA==} + /esbuild-windows-64/0.15.11: + resolution: {integrity: sha512-x977Q4HhNjnHx00b4XLAnTtj5vfbdEvkxaQwC1Zh5AN8g5EX+izgZ6e5QgqJgpzyRNJqh4hkgIJF1pyy1be0mQ==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -3266,8 +2982,8 @@ packages: dev: true optional: true - /esbuild-windows-arm64/0.15.10: - resolution: {integrity: sha512-S+th4F+F8VLsHLR0zrUcG+Et4hx0RKgK1eyHc08kztmLOES8BWwMiaGdoW9hiXuzznXQ0I/Fg904MNbr11Nktw==} + /esbuild-windows-arm64/0.15.11: + resolution: {integrity: sha512-VwUHFACuBahrvntdcMKZteUZ9HaYrBRODoKe4tIWxguQRvvYoYb7iu5LrcRS/FQx8KPZNaa72zuqwVtHeXsITw==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -3331,34 +3047,34 @@ packages: esbuild-windows-arm64: 0.14.51 dev: true - /esbuild/0.15.10: - resolution: {integrity: sha512-N7wBhfJ/E5fzn/SpNgX+oW2RLRjwaL8Y0ezqNqhjD6w0H2p0rDuEz2FKZqpqLnO8DCaWumKe8dsC/ljvVSSxng==} + /esbuild/0.15.11: + resolution: {integrity: sha512-OgHGuhlfZ//mToxjte1D5iiiQgWfJ2GByVMwEC/IuoXsBGkuyK1+KrjYu0laSpnN/L1UmLUCv0s25vObdc1bVg==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': 0.15.10 - '@esbuild/linux-loong64': 0.15.10 - esbuild-android-64: 0.15.10 - esbuild-android-arm64: 0.15.10 - esbuild-darwin-64: 0.15.10 - esbuild-darwin-arm64: 0.15.10 - esbuild-freebsd-64: 0.15.10 - esbuild-freebsd-arm64: 0.15.10 - esbuild-linux-32: 0.15.10 - esbuild-linux-64: 0.15.10 - esbuild-linux-arm: 0.15.10 - esbuild-linux-arm64: 0.15.10 - esbuild-linux-mips64le: 0.15.10 - esbuild-linux-ppc64le: 0.15.10 - esbuild-linux-riscv64: 0.15.10 - esbuild-linux-s390x: 0.15.10 - esbuild-netbsd-64: 0.15.10 - esbuild-openbsd-64: 0.15.10 - esbuild-sunos-64: 0.15.10 - esbuild-windows-32: 0.15.10 - esbuild-windows-64: 0.15.10 - esbuild-windows-arm64: 0.15.10 + '@esbuild/android-arm': 0.15.11 + '@esbuild/linux-loong64': 0.15.11 + esbuild-android-64: 0.15.11 + esbuild-android-arm64: 0.15.11 + esbuild-darwin-64: 0.15.11 + esbuild-darwin-arm64: 0.15.11 + esbuild-freebsd-64: 0.15.11 + esbuild-freebsd-arm64: 0.15.11 + esbuild-linux-32: 0.15.11 + esbuild-linux-64: 0.15.11 + esbuild-linux-arm: 0.15.11 + esbuild-linux-arm64: 0.15.11 + esbuild-linux-mips64le: 0.15.11 + esbuild-linux-ppc64le: 0.15.11 + esbuild-linux-riscv64: 0.15.11 + esbuild-linux-s390x: 0.15.11 + esbuild-netbsd-64: 0.15.11 + esbuild-openbsd-64: 0.15.11 + esbuild-sunos-64: 0.15.11 + esbuild-windows-32: 0.15.11 + esbuild-windows-64: 0.15.11 + esbuild-windows-arm64: 0.15.11 dev: true /escalade/3.1.1: @@ -3396,13 +3112,13 @@ packages: dependencies: '@next/eslint-plugin-next': 12.3.1 '@rushstack/eslint-patch': 1.2.0 - '@typescript-eslint/parser': 5.38.1_z4bbprzjrhnsfa24uvmcbu7f5q + '@typescript-eslint/parser': 5.40.1_z4bbprzjrhnsfa24uvmcbu7f5q eslint: 8.25.0 eslint-import-resolver-node: 0.3.6 eslint-import-resolver-typescript: 2.7.1_fyln4uq2tv75svthy6prqvt6lm - eslint-plugin-import: 2.26.0_b5atb575ilt3twd7smg3ruoniq + eslint-plugin-import: 2.26.0_5vut3wpz4wsceb35kpfwryopom eslint-plugin-jsx-a11y: 6.6.1_eslint@8.25.0 - eslint-plugin-react: 7.31.8_eslint@8.25.0 + eslint-plugin-react: 7.31.10_eslint@8.25.0 eslint-plugin-react-hooks: 4.6.0_eslint@8.25.0 typescript: 4.8.4 transitivePeerDependencies: @@ -3419,7 +3135,7 @@ packages: eslint: 8.25.0 dev: true - /eslint-config-standard-with-typescript/23.0.0_grgs52od2vk4yxva56cfk5ozva: + /eslint-config-standard-with-typescript/23.0.0_rjacwz3fq4zv3euadsy2vxkwfa: resolution: {integrity: sha512-iaaWifImn37Z1OXbNW1es7KI+S7D408F9ys0bpaQf2temeBWlvb0Nc5qHkOgYaRb5QxTZT32GGeN1gtswASOXA==} peerDependencies: '@typescript-eslint/eslint-plugin': ^5.0.0 @@ -3429,19 +3145,19 @@ packages: eslint-plugin-promise: ^6.0.0 typescript: '*' dependencies: - '@typescript-eslint/eslint-plugin': 5.40.0_25sstg4uu2sk4pm7xcyzuov7xq - '@typescript-eslint/parser': 5.40.0_z4bbprzjrhnsfa24uvmcbu7f5q + '@typescript-eslint/eslint-plugin': 5.40.1_ukgdydjtebaxmxfqp5v5ulh64y + '@typescript-eslint/parser': 5.40.1_z4bbprzjrhnsfa24uvmcbu7f5q eslint: 8.25.0 - eslint-config-standard: 17.0.0_a432y4gghichzqs5hexeiieuzm - eslint-plugin-import: 2.26.0_zb5prbqp7qzcgafjm73dfpyyvm + eslint-config-standard: 17.0.0_qjhcey4ofknbrbveepk4bditci + eslint-plugin-import: 2.26.0_vcunoyu347gmi72pwsm7mdvjca eslint-plugin-n: 15.3.0_eslint@8.25.0 - eslint-plugin-promise: 6.0.1_eslint@8.25.0 + eslint-plugin-promise: 6.1.0_eslint@8.25.0 typescript: 4.8.4 transitivePeerDependencies: - supports-color dev: true - /eslint-config-standard/17.0.0_a432y4gghichzqs5hexeiieuzm: + /eslint-config-standard/17.0.0_qjhcey4ofknbrbveepk4bditci: resolution: {integrity: sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg==} peerDependencies: eslint: ^8.0.1 @@ -3450,9 +3166,9 @@ packages: eslint-plugin-promise: ^6.0.0 dependencies: eslint: 8.25.0 - eslint-plugin-import: 2.26.0_zb5prbqp7qzcgafjm73dfpyyvm + eslint-plugin-import: 2.26.0_vcunoyu347gmi72pwsm7mdvjca eslint-plugin-n: 15.3.0_eslint@8.25.0 - eslint-plugin-promise: 6.0.1_eslint@8.25.0 + eslint-plugin-promise: 6.1.0_eslint@8.25.0 dev: true /eslint-etc/5.2.0_z4bbprzjrhnsfa24uvmcbu7f5q: @@ -3461,7 +3177,7 @@ packages: eslint: ^8.0.0 typescript: ^4.0.0 dependencies: - '@typescript-eslint/experimental-utils': 5.40.0_z4bbprzjrhnsfa24uvmcbu7f5q + '@typescript-eslint/experimental-utils': 5.40.1_z4bbprzjrhnsfa24uvmcbu7f5q eslint: 8.25.0 tsutils: 3.21.0_typescript@4.8.4 tsutils-etc: 1.4.1_mhfzdf4crgayux52p57kxjyixi @@ -3488,7 +3204,7 @@ packages: dependencies: debug: 4.3.4 eslint: 8.25.0 - eslint-plugin-import: 2.26.0_b5atb575ilt3twd7smg3ruoniq + eslint-plugin-import: 2.26.0_5vut3wpz4wsceb35kpfwryopom glob: 7.2.3 is-glob: 4.0.3 resolve: 1.22.1 @@ -3497,7 +3213,7 @@ packages: - supports-color dev: true - /eslint-module-utils/2.7.4_c3hlus4v72tewog5wytziddckm: + /eslint-module-utils/2.7.4_h5tegsfcqrqox63x72ptubo4ii: resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} engines: {node: '>=4'} peerDependencies: @@ -3518,15 +3234,16 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.40.0_z4bbprzjrhnsfa24uvmcbu7f5q + '@typescript-eslint/parser': 5.40.1_z4bbprzjrhnsfa24uvmcbu7f5q debug: 3.2.7 eslint: 8.25.0 eslint-import-resolver-node: 0.3.6 + eslint-import-resolver-typescript: 2.7.1_fyln4uq2tv75svthy6prqvt6lm transitivePeerDependencies: - supports-color dev: true - /eslint-module-utils/2.7.4_ll2y4syclauhygtdsfm7defqrm: + /eslint-module-utils/2.7.4_kok4ds6cswjqjqxmx3ykaoipha: resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} engines: {node: '>=4'} peerDependencies: @@ -3547,11 +3264,10 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.38.1_z4bbprzjrhnsfa24uvmcbu7f5q + '@typescript-eslint/parser': 5.40.1_z4bbprzjrhnsfa24uvmcbu7f5q debug: 3.2.7 eslint: 8.25.0 eslint-import-resolver-node: 0.3.6 - eslint-import-resolver-typescript: 2.7.1_fyln4uq2tv75svthy6prqvt6lm transitivePeerDependencies: - supports-color dev: true @@ -3574,7 +3290,7 @@ packages: typescript: ^4.0.0 dependencies: '@phenomnomnominal/tsquery': 4.2.0_typescript@4.8.4 - '@typescript-eslint/experimental-utils': 5.40.0_z4bbprzjrhnsfa24uvmcbu7f5q + '@typescript-eslint/experimental-utils': 5.40.1_z4bbprzjrhnsfa24uvmcbu7f5q eslint: 8.25.0 eslint-etc: 5.2.0_z4bbprzjrhnsfa24uvmcbu7f5q requireindex: 1.2.0 @@ -3585,7 +3301,7 @@ packages: - supports-color dev: true - /eslint-plugin-import/2.26.0_b5atb575ilt3twd7smg3ruoniq: + /eslint-plugin-import/2.26.0_5vut3wpz4wsceb35kpfwryopom: resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} engines: {node: '>=4'} peerDependencies: @@ -3595,14 +3311,14 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.38.1_z4bbprzjrhnsfa24uvmcbu7f5q + '@typescript-eslint/parser': 5.40.1_z4bbprzjrhnsfa24uvmcbu7f5q array-includes: 3.1.5 array.prototype.flat: 1.3.0 debug: 2.6.9 doctrine: 2.1.0 eslint: 8.25.0 eslint-import-resolver-node: 0.3.6 - eslint-module-utils: 2.7.4_ll2y4syclauhygtdsfm7defqrm + eslint-module-utils: 2.7.4_h5tegsfcqrqox63x72ptubo4ii has: 1.0.3 is-core-module: 2.10.0 is-glob: 4.0.3 @@ -3616,7 +3332,7 @@ packages: - supports-color dev: true - /eslint-plugin-import/2.26.0_zb5prbqp7qzcgafjm73dfpyyvm: + /eslint-plugin-import/2.26.0_vcunoyu347gmi72pwsm7mdvjca: resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} engines: {node: '>=4'} peerDependencies: @@ -3626,14 +3342,14 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.40.0_z4bbprzjrhnsfa24uvmcbu7f5q + '@typescript-eslint/parser': 5.40.1_z4bbprzjrhnsfa24uvmcbu7f5q array-includes: 3.1.5 array.prototype.flat: 1.3.0 debug: 2.6.9 doctrine: 2.1.0 eslint: 8.25.0 eslint-import-resolver-node: 0.3.6 - eslint-module-utils: 2.7.4_c3hlus4v72tewog5wytziddckm + eslint-module-utils: 2.7.4_kok4ds6cswjqjqxmx3ykaoipha has: 1.0.3 is-core-module: 2.10.0 is-glob: 4.0.3 @@ -3647,13 +3363,13 @@ packages: - supports-color dev: true - /eslint-plugin-jsdoc/39.3.6_eslint@8.25.0: - resolution: {integrity: sha512-R6dZ4t83qPdMhIOGr7g2QII2pwCjYyKP+z0tPOfO1bbAbQyKC20Y2Rd6z1te86Lq3T7uM8bNo+VD9YFpE8HU/g==} + /eslint-plugin-jsdoc/39.3.13_eslint@8.25.0: + resolution: {integrity: sha512-yF16kYmoz8pcEZXxX2kdaBwWFvXrUpxuF+ZgG/0PKLKcT9lGKFi4Mn0Mk/KqJeMgUprFDCzNTjnzYGf8tdNrAA==} engines: {node: ^14 || ^16 || ^17 || ^18} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - '@es-joy/jsdoccomment': 0.31.0 + '@es-joy/jsdoccomment': 0.32.0 comment-parser: 1.3.1 debug: 4.3.4 escape-string-regexp: 4.0.0 @@ -3671,7 +3387,7 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: - '@babel/runtime': 7.19.0 + '@babel/runtime': 7.19.4 aria-query: 4.2.2 array-includes: 3.1.5 ast-types-flow: 0.0.7 @@ -3709,8 +3425,8 @@ packages: engines: {node: '>=5.0.0'} dev: true - /eslint-plugin-promise/6.0.1_eslint@8.25.0: - resolution: {integrity: sha512-uM4Tgo5u3UWQiroOyDEsYcVMOo7re3zmno0IZmB5auxoaQNIceAbXEkSt8RNrKtaYehARHG06pYK6K1JhtP0Zw==} + /eslint-plugin-promise/6.1.0_eslint@8.25.0: + resolution: {integrity: sha512-NYCfDZF/KHt27p06nFAttgWuFyIDSUMnNaJBIY1FY9GpBFhdT2vMG64HlFguSgcJeyM5by6Yr5csSOuJm60eXQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -3750,29 +3466,6 @@ packages: string.prototype.matchall: 4.0.7 dev: true - /eslint-plugin-react/7.31.8_eslint@8.25.0: - resolution: {integrity: sha512-5lBTZmgQmARLLSYiwI71tiGVTLUuqXantZM6vlSY39OaDSV0M7+32K5DnLkmFrwTe+Ksz0ffuLUC91RUviVZfw==} - engines: {node: '>=4'} - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - dependencies: - array-includes: 3.1.5 - array.prototype.flatmap: 1.3.0 - doctrine: 2.1.0 - eslint: 8.25.0 - estraverse: 5.3.0 - jsx-ast-utils: 3.3.3 - minimatch: 3.1.2 - object.entries: 1.1.5 - object.fromentries: 2.0.5 - object.hasown: 1.1.1 - object.values: 1.1.5 - prop-types: 15.8.1 - resolve: 2.0.0-next.4 - semver: 6.3.0 - string.prototype.matchall: 4.0.7 - dev: true - /eslint-plugin-unicorn/44.0.2_eslint@8.25.0: resolution: {integrity: sha512-GLIDX1wmeEqpGaKcnMcqRvMVsoabeF0Ton0EX4Th5u6Kmf7RM9WBl705AXFEsns56ESkEs0uyelLuUTvz9Tr0w==} engines: {node: '>=14.18'} @@ -4132,7 +3825,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.3 + es-abstract: 1.20.4 functions-have-names: 1.2.3 /functions-have-names/1.2.3: @@ -4344,28 +4037,28 @@ packages: dependencies: function-bind: 1.1.1 - /hd-scripts/3.0.1: - resolution: {integrity: sha512-ahCn6H+JcUF0UgNMx1e/L+mS4kqv9L7tYzl5dBFxgTD1NyivEsA7rXw7BOVSV6uHLdnr7SCXvazBrl9PXZMYRg==} + /hd-scripts/3.0.2: + resolution: {integrity: sha512-Pg7yAvasl8QRsymK/m0S184fDPiz03/VOAdbRbHdsaFcp41drGh9NdzG2jLJHpRuNoWxL/bH0R4kSULT6DvpSw==} engines: {node: '>=14'} dependencies: - '@typescript-eslint/eslint-plugin': 5.40.0_25sstg4uu2sk4pm7xcyzuov7xq - '@typescript-eslint/parser': 5.40.0_z4bbprzjrhnsfa24uvmcbu7f5q + '@typescript-eslint/eslint-plugin': 5.40.1_ukgdydjtebaxmxfqp5v5ulh64y + '@typescript-eslint/parser': 5.40.1_z4bbprzjrhnsfa24uvmcbu7f5q eslint: 8.25.0 eslint-config-prettier: 8.5.0_eslint@8.25.0 - eslint-config-standard: 17.0.0_a432y4gghichzqs5hexeiieuzm - eslint-config-standard-with-typescript: 23.0.0_grgs52od2vk4yxva56cfk5ozva + eslint-config-standard: 17.0.0_qjhcey4ofknbrbveepk4bditci + eslint-config-standard-with-typescript: 23.0.0_rjacwz3fq4zv3euadsy2vxkwfa eslint-plugin-etc: 2.0.2_z4bbprzjrhnsfa24uvmcbu7f5q - eslint-plugin-import: 2.26.0_zb5prbqp7qzcgafjm73dfpyyvm - eslint-plugin-jsdoc: 39.3.6_eslint@8.25.0 + eslint-plugin-import: 2.26.0_vcunoyu347gmi72pwsm7mdvjca + eslint-plugin-jsdoc: 39.3.13_eslint@8.25.0 eslint-plugin-n: 15.3.0_eslint@8.25.0 eslint-plugin-no-only-tests: 3.0.0 - eslint-plugin-promise: 6.0.1_eslint@8.25.0 + eslint-plugin-promise: 6.1.0_eslint@8.25.0 eslint-plugin-react: 7.31.10_eslint@8.25.0 eslint-plugin-react-hooks: 4.6.0_eslint@8.25.0 eslint-plugin-unicorn: 44.0.2_eslint@8.25.0 lint-staged: 13.0.3 prettier: 2.7.1 - simple-git-hooks: 2.8.0 + simple-git-hooks: 2.8.1 typescript: 4.8.4 transitivePeerDependencies: - enquirer @@ -4463,12 +4156,12 @@ packages: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} dev: true - /inquirer/9.1.3: - resolution: {integrity: sha512-3OoUzit8tEebW4tpIZUXPRvcGNm4xhGeQp+GpdupDiz2OdWAqjO50EoeVOXx1Z91M0GLe6d16jJUArIhI/cNPQ==} + /inquirer/9.1.4: + resolution: {integrity: sha512-9hiJxE5gkK/cM2d1mTEnuurGTAoHebbkX0BYl3h7iEg7FYfuNIom+nDfBCSWtvSnoSrWCeBxqqBZu26xdlJlXA==} engines: {node: '>=12.0.0'} dependencies: - ansi-escapes: 5.0.0 - chalk: 5.1.1 + ansi-escapes: 6.0.0 + chalk: 5.1.2 cli-cursor: 4.0.0 cli-width: 4.0.0 external-editor: 3.1.0 @@ -4693,7 +4386,7 @@ packages: dependencies: available-typed-arrays: 1.0.5 call-bind: 1.0.2 - es-abstract: 1.20.3 + es-abstract: 1.20.4 for-each: 0.3.3 has-tostringtag: 1.0.0 @@ -4798,7 +4491,7 @@ packages: resolution: {integrity: sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==} hasBin: true dependencies: - minimist: 1.2.6 + minimist: 1.2.7 dev: true /jsx-ast-utils/3.3.3: @@ -4858,7 +4551,7 @@ packages: dependencies: cli-truncate: 3.1.0 colorette: 2.0.19 - commander: 9.4.0 + commander: 9.4.1 debug: 4.3.4 execa: 6.1.0 lilconfig: 2.0.5 @@ -4868,7 +4561,7 @@ packages: object-inspect: 1.12.2 pidtree: 0.6.0 string-argv: 0.3.1 - yaml: 2.1.1 + yaml: 2.1.3 transitivePeerDependencies: - enquirer - supports-color @@ -4946,7 +4639,7 @@ packages: resolution: {integrity: sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==} engines: {node: '>=12'} dependencies: - chalk: 5.0.1 + chalk: 5.1.2 is-unicode-supported: 1.3.0 /log-update/4.0.0: @@ -5126,48 +4819,6 @@ packages: - utf-8-validate dev: true - /miniflare/2.9.0: - resolution: {integrity: sha512-HBGQ5Jj6sMU1B1hX6G3ML46ThtUvu1nvxgXjDDmhp2RhWKYj0XvcohW/nPPL/MTP1gpvfT880De9EHmobVsDsw==} - engines: {node: '>=16.13'} - hasBin: true - peerDependencies: - '@miniflare/storage-redis': 2.9.0 - cron-schedule: ^3.0.4 - ioredis: ^4.27.9 - peerDependenciesMeta: - '@miniflare/storage-redis': - optional: true - cron-schedule: - optional: true - ioredis: - optional: true - dependencies: - '@miniflare/cache': 2.9.0 - '@miniflare/cli-parser': 2.9.0 - '@miniflare/core': 2.9.0 - '@miniflare/d1': 2.9.0 - '@miniflare/durable-objects': 2.9.0 - '@miniflare/html-rewriter': 2.9.0 - '@miniflare/http-server': 2.9.0 - '@miniflare/kv': 2.9.0 - '@miniflare/queues': 2.9.0 - '@miniflare/r2': 2.9.0 - '@miniflare/runner-vm': 2.9.0 - '@miniflare/scheduler': 2.9.0 - '@miniflare/shared': 2.9.0 - '@miniflare/sites': 2.9.0 - '@miniflare/storage-file': 2.9.0 - '@miniflare/storage-memory': 2.9.0 - '@miniflare/web-sockets': 2.9.0 - kleur: 4.1.5 - semiver: 1.1.0 - source-map-support: 0.5.21 - undici: 5.9.1 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - dev: true - /minimatch/3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: @@ -5181,10 +4832,6 @@ packages: brace-expansion: 2.0.1 dev: true - /minimist/1.2.6: - resolution: {integrity: sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==} - dev: true - /minimist/1.2.7: resolution: {integrity: sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==} dev: true @@ -5200,12 +4847,11 @@ packages: minimist: 1.2.7 dev: true - /mocha/10.0.0: - resolution: {integrity: sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==} + /mocha/10.1.0: + resolution: {integrity: sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg==} engines: {node: '>= 14.0.0'} hasBin: true dependencies: - '@ungap/promise-all-settled': 1.1.2 ansi-colors: 4.1.1 browser-stdout: 1.3.1 chokidar: 3.5.3 @@ -5250,8 +4896,8 @@ packages: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} dev: true - /multiformats/10.0.0: - resolution: {integrity: sha512-qEj/ansAK86ufzupmp8B/JbiNSLJhNFcqW2Aa1dWxQc0OfoorpknwKkJeXAbtZ62AJlA6qKsGrCY3OjdFWZOrQ==} + /multiformats/10.0.1: + resolution: {integrity: sha512-J207iVLyqtKU/hdHUsqhmZ9K1CEArfcezpjohR7rAZaJL9HNnicWNATLcCZ3LTLupet2ca9+AP9OaZ2JK6pXpw==} engines: {node: '>=16.0.0', npm: '>=7.0.0'} dev: false @@ -5317,7 +4963,7 @@ packages: dependencies: '@next/env': 12.3.1 '@swc/helpers': 0.4.11 - caniuse-lite: 1.0.30001412 + caniuse-lite: 1.0.30001421 postcss: 8.4.14 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 @@ -5342,11 +4988,11 @@ packages: - babel-plugin-macros dev: false - /node-abi/3.25.0: - resolution: {integrity: sha512-p+0xx5ruIQ+8X57CRIMxbTZRT7tU0Tjn2C/aAK68AEMrbGsCo6IjnDdPNhEyyjWCT4bRtzomXchYd3sSgk3BJQ==} + /node-abi/3.26.0: + resolution: {integrity: sha512-jRVtMFTChbi2i/jqo/i2iP9634KMe+7K1v35mIdj3Mn59i5q27ZYhn+sW6npISM/PQg7HrP2kwtRBMmh5Uvzdg==} engines: {node: '>=10'} dependencies: - semver: 7.3.7 + semver: 7.3.8 dev: true /node-fetch/2.6.7: @@ -5411,15 +5057,14 @@ packages: set-blocking: 2.0.0 dev: true - /npx-import/1.1.3_ibhtsmyg5e2r3aa7xebxvn6xhm: - resolution: {integrity: sha512-zy6249FJ81OtPsvz2y0+rgis31EN5wbdwBG2umtEh65W/4onYArHuoUSZ+W+T7BQYK7YF+h9G4CuGPusMCcLOw==} + /npx-import/1.1.4: + resolution: {integrity: sha512-3ShymTWOgqGyNlh5lMJAejLuIv3W1K3fbI5Ewc6YErZU3Sp0PqsNs8UIU1O8z5+KVl/Du5ag56Gza9vdorGEoA==} dependencies: execa: 6.1.0 parse-package-name: 1.0.0 semver: 7.3.8 validate-npm-package-name: 4.0.0 dev: true - patched: true /number-is-nan/1.0.1: resolution: {integrity: sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==} @@ -5461,7 +5106,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.3 + es-abstract: 1.20.4 dev: true /object.fromentries/2.0.5: @@ -5470,14 +5115,14 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.3 + es-abstract: 1.20.4 dev: true /object.hasown/1.1.1: resolution: {integrity: sha512-LYLe4tivNQzq4JdaWW6WO3HMZZJWzkkH8fnI6EebWl0VZth2wL2Lovm74ep2/gZzlaTdV62JZHEqHQ2yVn8Q/A==} dependencies: define-properties: 1.1.4 - es-abstract: 1.20.3 + es-abstract: 1.20.4 dev: true /object.values/1.1.5: @@ -5486,7 +5131,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.3 + es-abstract: 1.20.4 dev: true /once/1.4.0: @@ -5528,8 +5173,8 @@ packages: resolution: {integrity: sha512-EJQ3NiP5Xo94wJXIzAyOtSb0QEIAUu7m8t6UZ9krbz0vAJqr92JpcK/lEXg91q6B9pEGqrykkd2EQplnifDSBw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: - bl: 5.0.0 - chalk: 5.0.1 + bl: 5.1.0 + chalk: 5.1.2 cli-cursor: 4.0.0 cli-spinners: 2.7.0 is-interactive: 2.0.0 @@ -5868,10 +5513,10 @@ packages: detect-libc: 2.0.1 expand-template: 2.0.3 github-from-package: 0.0.0 - minimist: 1.2.6 + minimist: 1.2.7 mkdirp-classic: 0.5.3 napi-build-utils: 1.0.2 - node-abi: 3.25.0 + node-abi: 3.26.0 pump: 3.0.0 rc: 1.2.8 simple-get: 4.0.1 @@ -5956,7 +5601,7 @@ packages: dependencies: deep-extend: 0.6.0 ini: 1.3.8 - minimist: 1.2.6 + minimist: 1.2.7 strip-json-comments: 2.0.1 dev: true @@ -6044,8 +5689,8 @@ packages: resolve: 1.22.1 dev: true - /regenerator-runtime/0.13.9: - resolution: {integrity: sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==} + /regenerator-runtime/0.13.10: + resolution: {integrity: sha512-KepLsg4dU12hryUO7bp/axHAKvwGOCV0sGloQtpagJ12ai+ojVDqkeGSiRX1zlq+kjIMZ1t7gpze+26QqtdGqw==} dev: true /regexp-tree/0.1.24: @@ -6254,20 +5899,12 @@ packages: hasBin: true dev: true - /semver/7.3.7: - resolution: {integrity: sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==} - engines: {node: '>=10'} - hasBin: true - dependencies: - lru-cache: 6.0.0 - /semver/7.3.8: resolution: {integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==} engines: {node: '>=10'} hasBin: true dependencies: lru-cache: 6.0.0 - dev: true /serialize-error/7.0.1: resolution: {integrity: sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==} @@ -6334,8 +5971,8 @@ packages: simple-concat: 1.0.1 dev: true - /simple-git-hooks/2.8.0: - resolution: {integrity: sha512-ocmZQORwa6x9mxg+gVIAp5o4wXiWOHGXyrDBA0+UxGKIEKOyFtL4LWNKkP/2ornQPdlnlDGDteVeYP5FjhIoWA==} + /simple-git-hooks/2.8.1: + resolution: {integrity: sha512-DYpcVR1AGtSfFUNzlBdHrQGPsOhuuEJ/FkmPOOlFysP60AHd3nsEpkGq/QEOdtUyT1Qhk7w9oLmFoMG+75BDog==} hasBin: true requiresBuild: true dev: true @@ -6381,7 +6018,7 @@ packages: resolution: {integrity: sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==} engines: {node: '>=12'} dependencies: - ansi-styles: 6.1.1 + ansi-styles: 6.2.1 is-fullwidth-code-point: 4.0.0 dev: true @@ -6525,7 +6162,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.3 + es-abstract: 1.20.4 get-intrinsic: 1.1.3 has-symbols: 1.0.3 internal-slot: 1.0.3 @@ -6539,7 +6176,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.3 + es-abstract: 1.20.4 dev: true /string.prototype.trimend/1.0.5: @@ -6547,14 +6184,14 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.3 + es-abstract: 1.20.4 /string.prototype.trimstart/1.0.5: resolution: {integrity: sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==} dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.3 + es-abstract: 1.20.4 /string_decoder/1.1.1: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} @@ -6673,7 +6310,7 @@ packages: array.prototype.every: 1.1.3 call-bind: 1.0.2 deep-equal: 2.0.5 - defined: 1.0.0 + defined: 1.0.1 dotignore: 0.1.2 for-each: 0.3.3 get-package-type: 0.1.0 @@ -6682,7 +6319,7 @@ packages: has-dynamic-import: 2.0.1 inherits: 2.0.4 is-regex: 1.1.4 - minimist: 1.2.6 + minimist: 1.2.7 object-inspect: 1.12.2 object-is: 1.1.5 object-keys: 1.1.1 @@ -6796,7 +6433,7 @@ packages: dependencies: '@types/json5': 0.0.29 json5: 1.0.1 - minimist: 1.2.6 + minimist: 1.2.7 strip-bom: 3.0.0 dev: true @@ -6875,12 +6512,18 @@ packages: /type-fest/1.4.0: resolution: {integrity: sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==} engines: {node: '>=10'} + dev: true /type-fest/2.19.0: resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} engines: {node: '>=12.20'} dev: true + /type-fest/3.1.0: + resolution: {integrity: sha512-StmrZmK3eD9mDF9Vt7UhqthrDSk66O9iYl5t5a0TSoVkHjl0XZx/xuc/BRz4urAXXGHOY5OLsE0RdJFIApSFmw==} + engines: {node: '>=14.16'} + dev: false + /typescript/4.8.4: resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==} engines: {node: '>=4.2.0'} @@ -6891,7 +6534,7 @@ packages: resolution: {integrity: sha512-8CWXXZdOvVrIL4SeY/Gnp+idxxiGK4XFkP4FY26Sx/fpTz/b6vv4BVWELMDzQweSyyhdcuAcU14H6izzB6k1Cw==} engines: {node: '>=16.0.0', npm: '>=7.0.0'} dependencies: - multiformats: 10.0.0 + multiformats: 10.0.1 dev: false /unbox-primitive/1.0.2: @@ -6941,23 +6584,22 @@ packages: /util-deprecate/1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} - /util/0.12.4: - resolution: {integrity: sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==} + /util/0.12.5: + resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} dependencies: inherits: 2.0.4 is-arguments: 1.1.1 is-generator-function: 1.0.10 is-typed-array: 1.1.9 - safe-buffer: 5.2.1 which-typed-array: 1.1.8 /v8-to-istanbul/9.0.1: resolution: {integrity: sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==} engines: {node: '>=10.12.0'} dependencies: - '@jridgewell/trace-mapping': 0.3.15 + '@jridgewell/trace-mapping': 0.3.17 '@types/istanbul-lib-coverage': 2.0.4 - convert-source-map: 1.8.0 + convert-source-map: 1.9.0 dev: true /validate-npm-package-license/3.0.4: @@ -6984,18 +6626,18 @@ packages: hasBin: true dependencies: exec-sh: 0.2.2 - minimist: 1.2.6 + minimist: 1.2.7 dev: true /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: - defaults: 1.0.3 + defaults: 1.0.4 /web-encoding/1.1.5: resolution: {integrity: sha512-HYLeVCdJ0+lBYV2FvNZmv3HJ2Nt0QYXqZojk3d9FJOLkwnuhzM9tmamh8d7HPM8QqjKH8DeHkFTx+CFlWpZZDA==} dependencies: - util: 0.12.4 + util: 0.12.5 optionalDependencies: '@zxing/text-encoding': 0.9.0 dev: false @@ -7050,7 +6692,7 @@ packages: dependencies: available-typed-arrays: 1.0.5 call-bind: 1.0.2 - es-abstract: 1.20.3 + es-abstract: 1.20.4 for-each: 0.3.3 has-tostringtag: 1.0.0 is-typed-array: 1.1.9 @@ -7082,21 +6724,21 @@ packages: resolution: {integrity: sha512-y38RiVOEJPmqSSQniVPKQrWE8XocqeRWO9TwgfXTMARzQa3aGwsaBwUdOBn5MJukZwIkGOYsljK76kMGLu5aOA==} dev: false - /wrangler/2.1.11: - resolution: {integrity: sha512-zXydDzU+KKOwYDD9IX+XdSZMFEPWTghzTN/CiZc+pxHGIjTuQBtbk97trY3i9YKeih/QOSlo+H7Clfoq+6rZLw==} + /wrangler/2.1.12: + resolution: {integrity: sha512-Oe3lBVR4b2o44A90S+3Bi6gOVw7pGA1qnkhSDkAFdxv1Ttsktb2B7yINRevCPm5wpPkwwpZXS8Dq3Gk0f3Ns8w==} engines: {node: '>=16.13.0'} hasBin: true dependencies: '@cloudflare/kv-asset-handler': 0.2.0 '@esbuild-plugins/node-globals-polyfill': 0.1.1_esbuild@0.14.51 '@esbuild-plugins/node-modules-polyfill': 0.1.4_esbuild@0.14.51 - '@miniflare/core': 2.9.0 - '@miniflare/d1': 2.9.0 - '@miniflare/durable-objects': 2.9.0 + '@miniflare/core': 2.10.0 + '@miniflare/d1': 2.10.0 + '@miniflare/durable-objects': 2.10.0 blake3-wasm: 2.1.5 chokidar: 3.5.3 esbuild: 0.14.51 - miniflare: 2.9.0 + miniflare: 2.10.0 nanoid: 3.3.4 path-to-regexp: 6.2.1 selfsigned: 2.1.1 @@ -7134,7 +6776,7 @@ packages: resolution: {integrity: sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g==} engines: {node: '>=12'} dependencies: - ansi-styles: 6.2.0 + ansi-styles: 6.2.1 string-width: 5.1.2 strip-ansi: 7.0.1 dev: false @@ -7175,8 +6817,8 @@ packages: /yallist/4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - /yaml/2.1.1: - resolution: {integrity: sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw==} + /yaml/2.1.3: + resolution: {integrity: sha512-AacA8nRULjKMX2DvWvOAdBZMOfQlypSFkjcOcu9FalllIDJ1kvlREzcdIZmidQUqqeMv7jorHjq2HlLv/+c2lg==} engines: {node: '>= 14'} dev: true @@ -7213,19 +6855,6 @@ packages: yargs-parser: 20.2.4 dev: true - /yargs/17.5.1: - resolution: {integrity: sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==} - engines: {node: '>=12'} - dependencies: - cliui: 7.0.4 - 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.6.0: resolution: {integrity: sha512-8H/wTDqlSwoSnScvV2N/JHfLWOKuh5MVla9hqLjK3nsfyy6Y4kDSYSvkU5YCUEPOSnRXfIyx3Sq+B/IWudTo4g==} engines: {node: '>=12'}