diff --git a/package.json b/package.json index 048905529..29f5283b7 100644 --- a/package.json +++ b/package.json @@ -17,8 +17,8 @@ "lint-staged": "^13.0.3", "prettier": "2.7.1", "simple-git-hooks": "^2.8.0", - "wrangler": "^2.0.28", - "typescript": "^4.8.3" + "typescript": "^4.8.3", + "wrangler": "^2.1.6" }, "simple-git-hooks": { "pre-commit": "npx lint-staged" diff --git a/packages/access-api/package.json b/packages/access-api/package.json index d9b51b1a2..51ceef095 100644 --- a/packages/access-api/package.json +++ b/packages/access-api/package.json @@ -16,17 +16,17 @@ "author": "Hugo Dias (hugodias.me)", "license": "(Apache-2.0 OR MIT)", "dependencies": { - "@ipld/dag-ucan": "1.7.0-beta", - "@ucanto/authority": "^0.5.0", - "@ucanto/client": "^0.6.0", - "@ucanto/core": "^0.6.0", - "@ucanto/interface": "^0.7.0", - "@ucanto/server": "^0.7.0", - "@ucanto/transport": "^0.7.0", - "@ucanto/validator": "^0.6.0", + "@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.1", "@web3-storage/access": "workspace:^", "@web3-storage/worker-utils": "0.4.3-dev", - "multiformats": "^9.6.5", + "multiformats": "^9.8.1", "nanoid": "^4.0.0", "toucan-js": "^2.6.0" }, @@ -36,22 +36,22 @@ "@sentry/webpack-plugin": "^1.16.0", "@types/assert": "^1.5.6", "@types/git-rev-sync": "^2.0.0", - "@types/node": "^18.7.14", + "@types/node": "^18.7.18", "assert": "^2.0.0", "ava": "^4.3.3", "buffer": "^6.0.3", "delay": "^5.0.0", "dotenv": "^16.0.2", - "esbuild": "^0.15.6", + "esbuild": "^0.15.8", "execa": "^6.1.0", "git-rev-sync": "^3.0.1", "hd-scripts": "^2.1.0", - "miniflare": "^2.7.1", + "miniflare": "^2.9.0", "process": "^0.11.10", "readable-stream": "^4.1.0", "sade": "^1.7.4", - "typescript": "4.8.2", - "wrangler": "^2.0.28" + "typescript": "4.8.3", + "wrangler": "^2.1.6" }, "eslintConfig": { "extends": [ diff --git a/packages/access-api/src/kvs/accounts.js b/packages/access-api/src/kvs/accounts.js index 572358bf3..f43b4608a 100644 --- a/packages/access-api/src/kvs/accounts.js +++ b/packages/access-api/src/kvs/accounts.js @@ -18,7 +18,7 @@ export class Accounts { * * @param {string} issuerDID * @param {string} resourceDID - * @param {import('@ucanto/interface').LinkedProof} proof + * @param {import('@ucanto/interface').Link} proof */ async register(issuerDID, resourceDID, proof) { const did = await this.get(issuerDID) diff --git a/packages/access-api/src/service/identity-validate.js b/packages/access-api/src/service/identity-validate.js index cda4de632..19998ec7f 100644 --- a/packages/access-api/src/service/identity-validate.js +++ b/packages/access-api/src/service/identity-validate.js @@ -1,5 +1,6 @@ import { UCAN } from '@ucanto/core' import * as Server from '@ucanto/server' +import { Principal } from '@ucanto/principal' import { identityRegister, identityValidate, @@ -14,7 +15,7 @@ export function identityValidateProvider(ctx) { async ({ capability, context, invocation }) => { const delegation = await identityRegister .invoke({ - audience: invocation.issuer, + audience: Principal.parse(invocation.issuer.did()), issuer: ctx.keypair, with: capability.caveats.as, caveats: { diff --git a/packages/access-api/src/ucanto/server-codec.js b/packages/access-api/src/ucanto/server-codec.js index c19a5fe3a..ecc357a0f 100644 --- a/packages/access-api/src/ucanto/server-codec.js +++ b/packages/access-api/src/ucanto/server-codec.js @@ -108,7 +108,7 @@ export const serverCodec = { if (missing.length > 0) { throw new HTTPError('Missing Proofs', { status: 510, - // @ts-ignore - cause type is a mess + // @ts-ignore - Error.cause type is a mess cause: { prf: missing }, }) } diff --git a/packages/access-api/src/utils/context.js b/packages/access-api/src/utils/context.js index 341c57841..36ef2002a 100644 --- a/packages/access-api/src/utils/context.js +++ b/packages/access-api/src/utils/context.js @@ -1,4 +1,4 @@ -import { SigningAuthority } from '@ucanto/authority' +import { SigningPrincipal } from '@ucanto/principal' import { Logging } from '@web3-storage/worker-utils/logging' import Toucan from 'toucan-js' import pkg from '../../package.json' @@ -49,7 +49,7 @@ export function getContext(event, params) { } ) - const keypair = SigningAuthority.parse(config.PRIVATE_KEY) + const keypair = SigningPrincipal.parse(config.PRIVATE_KEY) const url = new URL(event.request.url) return { params, diff --git a/packages/access-api/test/helpers/setup.js b/packages/access-api/test/helpers/setup.js index d64a5fbe6..4e37fec94 100644 --- a/packages/access-api/test/helpers/setup.js +++ b/packages/access-api/test/helpers/setup.js @@ -1,5 +1,5 @@ import * as UCAN from '@ipld/dag-ucan' -import { SigningAuthority } from '@ucanto/authority' +import { SigningPrincipal } from '@ucanto/principal' import anyTest from 'ava' import { Delegation } from '@ucanto/core' import { connection as w3connection } from '@web3-storage/access/connection' @@ -54,10 +54,10 @@ export function createAnalyticsEngine() { } } -export const serviceAuthority = SigningAuthority.parse(bindings.PRIVATE_KEY) +export const serviceAuthority = SigningPrincipal.parse(bindings.PRIVATE_KEY) /** - * @param {UCAN.UCAN>} ucan + * @param {UCAN.UCAN<[UCAN.Capability]>} ucan */ export async function send(ucan) { return mf.dispatchFetch('http://localhost:8787', { @@ -69,7 +69,7 @@ export async function send(ucan) { } /** - * @param {import("@ucanto/interface").SigningAuthority<237> } id + * @param {import("@ucanto/interface").SigningPrincipal<237> } id */ export function connection(id) { return w3connection({ @@ -81,7 +81,7 @@ export function connection(id) { /** * @param {import("@ucanto/interface").ConnectionView} con - * @param {import("@ucanto/interface").SigningAuthority<237>} kp + * @param {import("@ucanto/interface").SigningPrincipal<237>} kp * @param {string} email */ export async function validateEmail(con, kp, email) { @@ -111,7 +111,7 @@ export async function validateEmail(con, kp, email) { /** * @param {import("@ucanto/interface").ConnectionView} con - * @param {import("@ucanto/interface").SigningAuthority<237>} kp + * @param {import("@ucanto/interface").SigningPrincipal<237>} kp * @param {import("@ucanto/interface").Proof<[UCAN.Capability, ...UCAN.Capability[]]>} proof */ export async function register(con, kp, proof) { diff --git a/packages/access-api/test/identity-register.test.js b/packages/access-api/test/identity-register.test.js index c8d587090..0dc7b7708 100644 --- a/packages/access-api/test/identity-register.test.js +++ b/packages/access-api/test/identity-register.test.js @@ -1,5 +1,5 @@ import * as UCAN from '@ipld/dag-ucan' -import { SigningAuthority } from '@ucanto/authority' +import { SigningPrincipal } from '@ucanto/principal' import { Delegation } from '@ucanto/core' import { Accounts } from '../src/kvs/accounts.js' import * as caps from '@web3-storage/access/capabilities' @@ -12,7 +12,7 @@ test.before((t) => { }) test('register', async (t) => { - const kp = await SigningAuthority.generate() + const kp = await SigningPrincipal.generate() const con = connection(kp) const validate = caps.identityValidate.invoke({ @@ -61,7 +61,7 @@ test('register', async (t) => { }) test('identify', async (t) => { - const kp = await SigningAuthority.generate() + const kp = await SigningPrincipal.generate() const con = connection(kp) const validate = caps.identityValidate.invoke({ @@ -77,12 +77,11 @@ test('identify', async (t) => { if (out?.error || !out) { return } - /** @type {Types.UCAN.JWT} */ + /** @type {Types.UCAN.JWT<[import('@web3-storage/access/types').IdentityRegister]>} */ // @ts-ignore const jwt = out.delegation.replace('http://localhost:8787/validate?ucan=', '') const ucan = UCAN.parse(jwt) const root = await UCAN.write(ucan) - /** @type {Types.Delegation<[import('@web3-storage/access/types').IdentityRegister]>} */ const proof = Delegation.create({ root }) const register = caps.identityRegister.invoke({ diff --git a/packages/access-api/test/identity-validate.test.js b/packages/access-api/test/identity-validate.test.js index 9ecb9c327..324213a9d 100644 --- a/packages/access-api/test/identity-validate.test.js +++ b/packages/access-api/test/identity-validate.test.js @@ -6,7 +6,7 @@ import { connection, } from './helpers/setup.js' import * as UCAN from '@ipld/dag-ucan' -import { SigningAuthority } from '@ucanto/authority' +import { SigningPrincipal } from '@ucanto/principal' import * as caps from '@web3-storage/access/capabilities' test.before((t) => { @@ -14,7 +14,7 @@ test.before((t) => { }) test.skip('should route to validate without ucanto client', async (t) => { - const kp = await SigningAuthority.generate() + const kp = await SigningPrincipal.generate() const ucan = await UCAN.issue({ issuer: kp, @@ -32,7 +32,7 @@ test.skip('should route to validate without ucanto client', async (t) => { }) test.skip('should fail with bad scheme', async (t) => { - const kp = await SigningAuthority.generate() + const kp = await SigningPrincipal.generate() const ucan = await UCAN.issue({ issuer: kp, audience: serviceAuthority, @@ -59,7 +59,7 @@ test.skip('should fail with bad scheme', async (t) => { }) test('should route correctly to identity/validate', async (t) => { - const kp = await SigningAuthority.generate() + const kp = await SigningPrincipal.generate() const con = connection(kp) const validate = caps.identityValidate.invoke({ diff --git a/packages/access-api/test/ucan.test.js b/packages/access-api/test/ucan.test.js index 474c08c37..e9d583c55 100644 --- a/packages/access-api/test/ucan.test.js +++ b/packages/access-api/test/ucan.test.js @@ -1,6 +1,6 @@ import { mf, serviceAuthority, test } from './helpers/setup.js' import * as UCAN from '@ipld/dag-ucan' -import { SigningAuthority } from '@ucanto/authority' +import { SigningPrincipal } from '@ucanto/principal' test.before((t) => { t.context = { mf } @@ -45,11 +45,12 @@ test('should fail with bad ucan', async (t) => { test('should fail with 0 caps', async (t) => { const { mf } = t.context - const kp = await SigningAuthority.generate() + const kp = await SigningPrincipal.generate() const ucan = await UCAN.issue({ issuer: kp, audience: serviceAuthority, + // @ts-ignore capabilities: [], }) const res = await mf.dispatchFetch('http://localhost:8787/raw', { @@ -72,11 +73,12 @@ test('should fail with 0 caps', async (t) => { test('should fail with bad service audience', async (t) => { const { mf } = t.context - const kp = await SigningAuthority.generate() - const audience = await SigningAuthority.generate() + const kp = await SigningPrincipal.generate() + const audience = await SigningPrincipal.generate() const ucan = await UCAN.issue({ issuer: kp, audience, + // @ts-ignore capabilities: [], }) const res = await mf.dispatchFetch('http://localhost:8787/raw', { @@ -102,7 +104,7 @@ test('should fail with bad service audience', async (t) => { test('should fail with with more than 1 cap', async (t) => { const { mf } = t.context - const kp = await SigningAuthority.generate() + const kp = await SigningPrincipal.generate() const ucan = await UCAN.issue({ issuer: kp, audience: serviceAuthority, @@ -134,7 +136,7 @@ test('should fail with with more than 1 cap', async (t) => { test('should route to handler', async (t) => { const { mf } = t.context - const kp = await SigningAuthority.generate() + const kp = await SigningPrincipal.generate() const ucan = await UCAN.issue({ issuer: kp, audience: serviceAuthority, @@ -153,7 +155,7 @@ test('should route to handler', async (t) => { test('should handle exception in route handler', async (t) => { const { mf } = t.context - const kp = await SigningAuthority.generate() + const kp = await SigningPrincipal.generate() const ucan = await UCAN.issue({ issuer: kp, audience: serviceAuthority, @@ -175,8 +177,8 @@ test('should handle exception in route handler', async (t) => { test('should fail with missing proofs', async (t) => { const { mf } = t.context - const alice = await SigningAuthority.generate() - const bob = await SigningAuthority.generate() + const alice = await SigningPrincipal.generate() + const bob = await SigningPrincipal.generate() const proof1 = await UCAN.issue({ issuer: alice, audience: bob, @@ -218,8 +220,8 @@ test('should fail with missing proofs', async (t) => { test('should multiple invocation should pass', async (t) => { const { mf } = t.context - const alice = await SigningAuthority.generate() - const bob = await SigningAuthority.generate() + const alice = await SigningPrincipal.generate() + const bob = await SigningPrincipal.generate() const proof1 = await UCAN.issue({ issuer: alice, audience: bob, diff --git a/packages/access-ws/CHANGELOG.md b/packages/access-ws/CHANGELOG.md new file mode 100644 index 000000000..3cb6586ea --- /dev/null +++ b/packages/access-ws/CHANGELOG.md @@ -0,0 +1,81 @@ +# Changelog + +## [0.3.0](https://github.com/web3-storage/ucan-protocol/compare/access-api-v0.2.0...access-api-v0.3.0) (2022-08-30) + + +### Features + +* fail validate for register email and add metrics ([0916ba6](https://github.com/web3-storage/ucan-protocol/commit/0916ba6bda8ad46ccc4f6bb0c6f4a48dd99db0c8)) +* update deps ([d276375](https://github.com/web3-storage/ucan-protocol/commit/d2763750159ad56132f0b002ff5f50cc36fce20c)) + + +### Bug Fixes + +* add analytics to staging and prod ([14941d9](https://github.com/web3-storage/ucan-protocol/commit/14941d901e48e92896cc962b3e93488731afa381)) +* revert fail email validation ([389784b](https://github.com/web3-storage/ucan-protocol/commit/389784bb995b18683ca71af63816db123880d3eb)) + +## [0.2.0](https://github.com/web3-storage/ucan-protocol/compare/access-api-v0.1.4...access-api-v0.2.0) (2022-08-26) + + +### Features + +* **access-api:** add logtail ([1246ab0](https://github.com/web3-storage/ucan-protocol/commit/1246ab0846f49f9adce734cf4f651d22f7ac7536)) +* **access-api:** new email template ([cc19320](https://github.com/web3-storage/ucan-protocol/commit/cc193202e385d8079144aa90e989af07cf743b0b)) + + +### Bug Fixes + +* **access-api:** add logtail to tests ([546152a](https://github.com/web3-storage/ucan-protocol/commit/546152aea75aff393935d866cbd9c1a818e81725)) +* **access-api:** use different email for tests ([1a01504](https://github.com/web3-storage/ucan-protocol/commit/1a0150429253afc572c9689f0a09a4c26499bd03)) + +## [0.1.4](https://github.com/web3-storage/ucan-protocol/compare/access-api-v0.1.3...access-api-v0.1.4) (2022-08-25) + + +### Bug Fixes + +* api ([4e70483](https://github.com/web3-storage/ucan-protocol/commit/4e7048316d3ed95f5b7606830d75420c5020bf53)) +* route for staging ([8d5866f](https://github.com/web3-storage/ucan-protocol/commit/8d5866f2bf870eaf2bb26bddef02ee8a0b6d1386)) +* staging ([29db547](https://github.com/web3-storage/ucan-protocol/commit/29db547848e8a5cab4d5c91a72010ed4aec5d09c)) +* staging ([53f62b0](https://github.com/web3-storage/ucan-protocol/commit/53f62b0269a7c3def5c22afb2b888d5886683f05)) + +## [0.1.3](https://github.com/web3-storage/ucan-protocol/compare/access-api-v0.1.2...access-api-v0.1.3) (2022-08-25) + + +### Bug Fixes + +* test api ([9597c44](https://github.com/web3-storage/ucan-protocol/commit/9597c4486abb1c21a0d8a504d4bb8632581e4800)) + +## [0.1.2](https://github.com/web3-storage/ucan-protocol/compare/access-api-v0.1.1...access-api-v0.1.2) (2022-08-25) + + +### Bug Fixes + +* **access-api:** add kvs ([e241d62](https://github.com/web3-storage/ucan-protocol/commit/e241d6290d93bfc20986591398ab20af6173ef78)) +* **access-api:** test error in staging ([1a97a57](https://github.com/web3-storage/ucan-protocol/commit/1a97a5797678d242db5849d9f10b8bc1907873d6)) +* change sentry name ([ad69e47](https://github.com/web3-storage/ucan-protocol/commit/ad69e47cb01ad1acedccf95798eacd9a649659bd)) +* proper envs and update deps ([d5dccb6](https://github.com/web3-storage/ucan-protocol/commit/d5dccb6e9c23b5ddbdffa4c67c04d195524b38f2)) +* remove error ([1ba180b](https://github.com/web3-storage/ucan-protocol/commit/1ba180b2c8a2da5dd9d3a69f23bcd93022500d6e)) + +## [0.1.1](https://github.com/web3-storage/ucan-protocol/compare/access-api-v0.1.0...access-api-v0.1.1) (2022-08-24) + + +### Bug Fixes + +* add readme ([25a01f5](https://github.com/web3-storage/ucan-protocol/commit/25a01f54c4db8f5af75e23c924d86a7a67823beb)) +* add readme text ([088273e](https://github.com/web3-storage/ucan-protocol/commit/088273e97a72f7ec85c60a5cb5dd6a8754603064)) + +## [0.1.0](https://github.com/web3-storage/ucan-protocol/compare/access-api-v0.0.1...access-api-v0.1.0) (2022-08-24) + + +### Features + +* **access-api:** add prod config ([60707ec](https://github.com/web3-storage/ucan-protocol/commit/60707ecef6ed1af8d8fe38f9ee0deb9761cb80a6)) +* resync ([5cae9cd](https://github.com/web3-storage/ucan-protocol/commit/5cae9cd55cfcc06046eb23a2f33931299dd07ff5)) +* sdk ([305b2d3](https://github.com/web3-storage/ucan-protocol/commit/305b2d317ba4b8743a1594e9dbe0d22bac90c229)) +* sdk and cli ([2373447](https://github.com/web3-storage/ucan-protocol/commit/2373447db93ee16276f45fbfe40e4b98c28b6ab7)) + + +### Bug Fixes + +* **access-api:** changes names, update deps ([3f9e1f8](https://github.com/web3-storage/ucan-protocol/commit/3f9e1f800728f57a9b194154c1b2e0133aa5bca4)) +* **access-api:** ci tests ([314cf63](https://github.com/web3-storage/ucan-protocol/commit/314cf635aa632e05a79822c5f7ec012559ff4427)) diff --git a/packages/access-ws/package.json b/packages/access-ws/package.json new file mode 100644 index 000000000..078663fa8 --- /dev/null +++ b/packages/access-ws/package.json @@ -0,0 +1,90 @@ +{ + "name": "@web3-storage/access-ws", + "version": "0.3.0", + "description": "Access Websocket API", + "type": "module", + "main": "dist/worker.js", + "module": "dist/worker.js", + "private": true, + "scripts": { + "lint": "tsc --build && eslint '**/*.{js,ts}' && prettier --check '**/*.{js,ts,yml,json}' --ignore-path ../../.gitignore", + "deploy": "wrangler publish", + "dev": "miniflare --watch --debug --env ../../.env --wrangler-env dev -m --port 8788", + "build": "scripts/cli.js build", + "test": "tsc --build && ava --serial" + }, + "author": "Hugo Dias (hugodias.me)", + "license": "(Apache-2.0 OR MIT)", + "dependencies": { + "@types/ws": "^8.5.3", + "@web3-storage/worker-utils": "0.4.3-dev", + "isomorphic-ws": "^5.0.0", + "multiformats": "^9.8.1", + "nanoid": "^4.0.0", + "toucan-js": "^2.6.0", + "ws": "^8.8.1" + }, + "devDependencies": { + "@cloudflare/workers-types": "^3.16.0", + "@sentry/cli": "^2.5.2", + "@sentry/webpack-plugin": "^1.16.0", + "@types/assert": "^1.5.6", + "@types/git-rev-sync": "^2.0.0", + "@types/node": "^18.7.18", + "assert": "^2.0.0", + "ava": "^4.3.3", + "buffer": "^6.0.3", + "delay": "^5.0.0", + "dotenv": "^16.0.2", + "esbuild": "^0.15.8", + "execa": "^6.1.0", + "git-rev-sync": "^3.0.1", + "hd-scripts": "^2.1.0", + "miniflare": "^2.9.0", + "p-wait-for": "^5.0.0", + "process": "^0.11.10", + "readable-stream": "^4.1.0", + "sade": "^1.7.4", + "typescript": "4.8.3", + "wrangler": "^2.1.6" + }, + "eslintConfig": { + "extends": [ + "./node_modules/hd-scripts/eslint/index.js" + ], + "parserOptions": { + "project": "./tsconfig.json" + }, + "globals": { + "VERSION": "readonly", + "COMMITHASH": "readonly", + "BRANCH": "readonly", + "DEBUG": "readonly", + "ACCOUNTS": "writable", + "VALIDATIONS": "writable", + "BUCKET": "writable", + "W3ACCESS_METRICS": "writable", + "WebSocketPair": "readonly" + } + }, + "eslintIgnore": [ + "node_modules", + "coverage", + "dist", + "docs" + ], + "ava": { + "concurrency": 1, + "failFast": true, + "workerThreads": false, + "nodeArguments": [ + "--experimental-vm-modules" + ], + "files": [ + "test/**/*.test.js" + ], + "ignoredByWatcher": [ + "./dist/*" + ] + } +} diff --git a/packages/access-ws/readme.md b/packages/access-ws/readme.md new file mode 100644 index 000000000..75db81dff --- /dev/null +++ b/packages/access-ws/readme.md @@ -0,0 +1,14 @@ +# w3access API + +## Contributing + +We use `pnpm` in this project and commit the `pnpm-lock.yaml` file. + +### Install dependencies. + +```bash +# install all dependencies in the mono-repo +pnpm install +# setup git hooks +npx simple-git-hooks +``` diff --git a/packages/access-ws/scripts/cli.js b/packages/access-ws/scripts/cli.js new file mode 100755 index 000000000..80ac643b7 --- /dev/null +++ b/packages/access-ws/scripts/cli.js @@ -0,0 +1,101 @@ +#!/usr/bin/env node +/* eslint-disable no-console */ +import path from 'path' +import dotenv from 'dotenv' +import fs from 'fs' +import sade from 'sade' +import { fileURLToPath } from 'url' +import { build } from 'esbuild' +import Sentry from '@sentry/cli' +import { createRequire } from 'module' +// @ts-ignore +import git from 'git-rev-sync' + +const __dirname = path.dirname(fileURLToPath(import.meta.url)) +const require = createRequire(__dirname) +const prog = sade('api') + +dotenv.config({ + path: path.join(__dirname, '..', '..', '..', '.env'), +}) + +const pkg = JSON.parse( + // eslint-disable-next-line unicorn/prefer-json-parse-buffer + fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8') +) + +/** @type {import('esbuild').Plugin} */ +const PluginAlias = { + name: 'alias', + setup(build) { + build.onResolve({ filter: /^stream$/ }, () => { + return { path: require.resolve('readable-stream') } + }) + + build.onResolve({ filter: /^node-fetch$/ }, () => { + return { path: path.resolve(__dirname, 'fetch.js') } + }) + build.onResolve({ filter: /^cross-fetch$/ }, () => { + return { path: path.resolve(__dirname, 'fetch.js') } + }) + }, +} +prog + .command('build') + .describe('Build the worker.') + .option('--env', 'Environment', 'dev') + .action(async (opts) => { + try { + const version = `${pkg.name}@${pkg.version}-${opts.env}+${git.short( + __dirname + )}`.replace('/', '__') + await build({ + entryPoints: [path.join(__dirname, '../src/index.js')], + bundle: true, + format: 'esm', + outfile: 'dist/worker.js', + legalComments: 'external', + inject: [path.join(__dirname, 'node-globals.js')], + plugins: [PluginAlias], + define: { + ACCOUNT_VERSION: JSON.stringify(version), + ACCOUNT_COMMITHASH: JSON.stringify(git.long(__dirname)), + ACCOUNT_BRANCH: JSON.stringify(git.branch(__dirname)), + global: 'globalThis', + }, + minify: opts.env !== 'dev', + sourcemap: true, + }) + + // Sentry release and sourcemap upload + if (process.env.SENTRY_UPLOAD === 'true') { + const cli = new Sentry(undefined, { + authToken: process.env.SENTRY_TOKEN, + org: 'protocol-labs-it', + project: 'w3access-api', + // @ts-ignore + dist: git.short(__dirname), + }) + + await cli.releases.new(version) + await cli.releases.setCommits(version, { + auto: true, + ignoreEmpty: true, + ignoreMissing: true, + }) + await cli.releases.uploadSourceMaps(version, { + include: ['./dist'], + urlPrefix: '/', + }) + await cli.releases.finalize(version) + await cli.releases.newDeploy(version, { + env: opts.env, + }) + } + } catch (error) { + console.error(error) + process.exit(1) + } + }) + +prog.parse(process.argv) diff --git a/packages/access-ws/scripts/fetch.js b/packages/access-ws/scripts/fetch.js new file mode 100644 index 000000000..c3ee50e22 --- /dev/null +++ b/packages/access-ws/scripts/fetch.js @@ -0,0 +1 @@ +export default globalThis.fetch.bind(globalThis) diff --git a/packages/access-ws/scripts/node-globals.js b/packages/access-ws/scripts/node-globals.js new file mode 100644 index 000000000..f9c6a6960 --- /dev/null +++ b/packages/access-ws/scripts/node-globals.js @@ -0,0 +1,4 @@ +/* eslint-disable unicorn/prefer-module */ +// @ts-nocheck +export const { Buffer } = require('buffer') +export const process = require('process/browser') diff --git a/packages/access-ws/src/bindings.d.ts b/packages/access-ws/src/bindings.d.ts new file mode 100644 index 000000000..3bccd751c --- /dev/null +++ b/packages/access-ws/src/bindings.d.ts @@ -0,0 +1,38 @@ +import type { Logging } from '@web3-storage/worker-utils/logging' +import type { config } from './config' + +export {} + +declare global {} + +export interface RouteContext { + rooms: DurableObjectNamespace + log: Logging + config: typeof config +} + +declare namespace ModuleWorker { + type Bindings = Record< + string, + KVNamespace | DurableObjectNamespace | CryptoKey | string + > + + type FetchHandler = ( + request: Request, + env: Environment, + ctx: Pick + ) => Promise | Response + + type CronHandler = ( + event: Omit, + env: Environment, + ctx: Pick + ) => Promise | void +} + +export interface ModuleWorker< + Environment extends ModuleWorker.Bindings = ModuleWorker.Bindings +> { + fetch?: ModuleWorker.FetchHandler + scheduled?: ModuleWorker.CronHandler +} diff --git a/packages/access-ws/src/config.js b/packages/access-ws/src/config.js new file mode 100644 index 000000000..a91808ebd --- /dev/null +++ b/packages/access-ws/src/config.js @@ -0,0 +1,69 @@ +/** + * Loads configuration variables from the global environment and returns a JS object + * keyed by variable names. + * + * @param {any} env + */ +export function loadConfig(env) { + /** @type Record */ + const vars = {} + + /** @type Record */ + const globals = env + + const required = ['ENV', 'DEBUG'] + + for (const name of required) { + const val = globals[name] + if (typeof val === 'string' && val.length > 0) { + vars[name] = val + } else { + throw new Error( + `Missing required config variables: ${name}. Check your .env, testing globals or cloudflare vars.` + ) + } + } + + return { + DEBUG: boolValue(vars.DEBUG), + ENV: parseRuntimeEnv(vars.ENV), + + // These are injected in esbuild + // @ts-ignore + // eslint-disable-next-line no-undef + BRANCH: ACCOUNT_BRANCH, + // @ts-ignore + // eslint-disable-next-line no-undef + VERSION: ACCOUNT_VERSION, + // @ts-ignore + // eslint-disable-next-line no-undef + COMMITHASH: ACCOUNT_COMMITHASH, + } +} + +/** + * Returns `true` if the string `s` is equal to `"true"` (case-insensitive) or `"1", and false for `"false"`, `"0"` or an empty value. + * + * @param {string} s + * @returns {boolean} + */ +function boolValue(s) { + return Boolean(s && JSON.parse(String(s).toLowerCase())) +} + +/** + * Validates that `s` is a defined runtime environment name and returns it. + * + * @param {unknown} s + */ +function parseRuntimeEnv(s) { + switch (s) { + case 'test': + case 'dev': + case 'staging': + case 'production': + return s + default: + throw new Error('invalid runtime environment name: ' + s) + } +} diff --git a/packages/access-ws/src/index.js b/packages/access-ws/src/index.js new file mode 100644 index 000000000..74e8ab38e --- /dev/null +++ b/packages/access-ws/src/index.js @@ -0,0 +1,147 @@ +import { corsHeaders, preflight } from '@web3-storage/worker-utils/cors' +import { errorHandler } from '@web3-storage/worker-utils/error' +import { notFound } from '@web3-storage/worker-utils/response' +import { Router } from '@web3-storage/worker-utils/router' +import { nanoid } from 'nanoid' +import { loadConfig } from './config.js' + +/** + * @typedef {{webSocket: WebSocket; quit?: boolean; id: string}} Session + */ + +/** @type Router */ +const r = new Router({ onNotFound: notFound }) + +r.add('options', '*', preflight) + +r.add('get', '/connect/:id', (request, env, ctx) => { + const id = env.rooms.idFromName(request.params.id) + + const room = env.rooms.get(id) + const url = new URL(request.url) + return room.fetch(url.origin + '/connect', request) +}) + +/** @type {import('./bindings.js').ModuleWorker} */ +const worker = { + fetch: async (request, env, ctx) => { + try { + env.config = loadConfig(env) + const rsp = await r.fetch(request, env, ctx) + return env.config.ENV ? rsp : corsHeaders(request, rsp) + } catch (error) { + return errorHandler(/** @type {Error} */ (error)) + } + }, +} + +export default worker + +/** + * @param {Request} request + * @param {Error} error + */ +function sendError(request, error) { + if (request.headers.get('Upgrade') === 'websocket') { + const [client, server] = Object.values(new WebSocketPair()) + server.accept() + setTimeout(() => { + server.send(JSON.stringify({ error: error.toString() })) + server.close(1011, error.message) + }, 100) + return new Response(undefined, { status: 101, webSocket: client }) + } else { + return new Response(error.stack, { status: 500 }) + } +} + +/** + * @implements {DurableObject} + */ +export class ChatRoom { + /** + * @param {DurableObjectState} state + * @param {import('./bindings.js').RouteContext} env + */ + constructor(state, env) { + this.state = state + this.env = env + /** + * @type {Session[]} + */ + this.sessions = [] + } + + /** + * @param {Request} request + */ + async fetch(request) { + const url = new URL(request.url) + switch (url.pathname) { + case '/connect': { + if ( + request.headers.get('Upgrade') !== 'websocket' && + this.env.config.ENV !== 'test' + ) { + return new Response('expected websocket', { status: 400 }) + } + + if (this.sessions.length > 1) { + return sendError(request, new Error('too many connections')) + } + + const [client, server] = Object.values(new WebSocketPair()) + await this.handleSession(server) + return new Response(undefined, { status: 101, webSocket: client }) + } + + default: + return new Response('Not found', { status: 404 }) + } + } + + /** + * @param {WebSocket} webSocket + */ + async handleSession(webSocket) { + webSocket.accept() + /** @type {Session} */ + const session = { + webSocket, + id: nanoid(), + } + this.sessions.push(session) + + webSocket.addEventListener('message', async (msg) => { + this.broadcast(msg.data, session) + }) + + webSocket.addEventListener('close', () => this.remove(session)) + webSocket.addEventListener('error', () => this.remove(session)) + } + + /** + * @param {any} message + * @param {Session} sender + */ + broadcast(message, sender) { + for (const session of this.sessions) { + if (session.id !== sender.id) { + try { + session.webSocket.send(message) + } catch (error) { + this.remove(session) + // eslint-disable-next-line no-console + console.error(error) + } + } + } + } + + /** + * @param {Session} session + */ + remove(session) { + this.sessions = this.sessions.filter((member) => member !== session) + } +} diff --git a/packages/access-ws/test/api.test.js b/packages/access-ws/test/api.test.js new file mode 100644 index 000000000..704ebedc3 --- /dev/null +++ b/packages/access-ws/test/api.test.js @@ -0,0 +1,116 @@ +import { mf, test } from './helpers/setup.js' +import pWaitFor from 'p-wait-for' + +test.before((t) => { + t.context = { mf } +}) + +test('should create room', async (t) => { + const { mf } = t.context + const res = await mf.dispatchFetch('http://localhost:8787/room', { + method: 'POST', + }) + const rsp = await res.text() + t.truthy(rsp) +}) + +test('should create named room', async (t) => { + const { mf } = t.context + const res = await mf.dispatchFetch('http://localhost:8787/room?name=hugo', { + method: 'POST', + }) + const rsp = await res.json() + + const room = await mf.dispatchFetch(`http://localhost:8787/room/${rsp.id}`, { + method: 'POST', + }) + const roomRsp = await room.json() + + t.deepEqual(rsp.id, roomRsp.id) +}) + +test('should connect named room', async (t) => { + const { mf } = t.context + let done = 0 + const res = await mf.dispatchFetch('http://localhost:8787/room?name=hugo', { + method: 'POST', + }) + const rsp = await res.json() + + const connect = await mf.dispatchFetch( + 'http://127.0.0.1:8787/connect/' + rsp.id + ) + const ws = connect.webSocket + if (!ws) { + throw new Error('no ws') + } + ws.accept() + const msg1 = { type: 'message', message: 'one' } + const msg2 = { type: 'message', message: 'two' } + ws.addEventListener('message', (event) => { + // @ts-ignore + const data = JSON.parse(event.data) + t.like(data, msg2) + ws.close() + done++ + }) + + const connect2 = await mf.dispatchFetch( + 'http://127.0.0.1:8787/connect/' + rsp.id + ) + const ws2 = connect2.webSocket + if (!ws2) { + throw new Error('no ws') + } + ws2.accept() + ws2.addEventListener('message', (event) => { + // @ts-ignore + const data = JSON.parse(event.data) + t.like(data, msg1) + ws2.close() + done++ + }) + + ws2.send(JSON.stringify(msg2)) + ws.send(JSON.stringify(msg1)) + + await pWaitFor(() => done === 2) +}) + +test('should connect without preflight', async (t) => { + const { mf } = t.context + let done = 0 + // const res = await mf.dispatchFetch('http://localhost:8787/room?name=hugo', { + // method: 'POST', + // }) + // const rsp = await res.json() + + const msg1 = { type: 'message', message: 'one' } + const msg2 = { type: 'message', message: 'two' } + const connect = await mf.dispatchFetch('http://127.0.0.1:8787/connect/hugo2') + const ws = connect.webSocket + ws?.accept() + ws?.addEventListener('message', (event) => { + // @ts-ignore + const data = JSON.parse(event.data) + t.like(data, msg2) + ws.close() + done++ + }) + + const connect2 = await mf.dispatchFetch('http://127.0.0.1:8787/connect/hugo2') + const ws2 = connect2.webSocket + ws2?.accept() + ws2?.addEventListener('message', (event) => { + // @ts-ignore + const data = JSON.parse(event.data) + t.like(data, msg1) + ws2.close() + done++ + }) + + ws2?.send(JSON.stringify(msg2)) + ws?.send(JSON.stringify(msg1)) + + await pWaitFor(() => done === 2) +}) diff --git a/packages/access-ws/test/helpers/setup.js b/packages/access-ws/test/helpers/setup.js new file mode 100644 index 000000000..636acb04a --- /dev/null +++ b/packages/access-ws/test/helpers/setup.js @@ -0,0 +1,29 @@ +import anyTest from 'ava' +import dotenv from 'dotenv' +import { Miniflare } from 'miniflare' +import path from 'path' +import { fileURLToPath } from 'url' +const __dirname = path.dirname(fileURLToPath(import.meta.url)) + +dotenv.config({ + path: path.join(__dirname, '..', '..', '..', '..', '.env.tpl'), +}) +/** + * @typedef {import("ava").TestFn<{mf: mf}>} TestFn + */ + +// eslint-disable-next-line unicorn/prefer-export-from +export const test = /** @type {TestFn} */ (anyTest) + +export const bindings = { + ENV: 'test', + DEBUG: 'false', +} + +export const mf = new Miniflare({ + packagePath: true, + wranglerConfigPath: true, + sourceMap: true, + bindings, + modules: true, +}) diff --git a/packages/access-ws/tsconfig.json b/packages/access-ws/tsconfig.json new file mode 100644 index 000000000..cedc9dcc8 --- /dev/null +++ b/packages/access-ws/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "dist", + "lib": ["ESNext"], + "types": ["@cloudflare/workers-types"] + }, + "include": ["src", "scripts", "test", "package.json"], + "exclude": ["**/node_modules/**"], + "references": [{ "path": "../access" }] +} diff --git a/packages/access-ws/wrangler.toml b/packages/access-ws/wrangler.toml new file mode 100644 index 000000000..6162f4992 --- /dev/null +++ b/packages/access-ws/wrangler.toml @@ -0,0 +1,25 @@ +# Development + +name = "w3access-ws" +account_id = "fffa4b4363a7e5250af8357087263b3a" +main = "./dist/worker.js" + +# Compatibility flags https://github.com/cloudflare/wrangler/pull/2009 +compatibility_date = "2022-06-26" +compatibility_flags = ["url_standard"] +no_bundle = true + + +[vars] +ENV = "dev" +DEBUG = "true" + +[build] +command = "scripts/cli.js build" +watch_dir = "src" + +[durable_objects] +bindings = [ + { name = "rooms", class_name = "ChatRoom" }, + # { name = "limiters", class_name = "RateLimiter" }, +] diff --git a/packages/access/package.json b/packages/access/package.json index 5440bca1e..df5b31f7f 100644 --- a/packages/access/package.json +++ b/packages/access/package.json @@ -8,13 +8,12 @@ "types": "dist/src/index.d.ts", "main": "src/index.js", "bin": { - "w3access": "./src/cli.js" + "w3access": "./src/cli/index.js" }, "scripts": { "lint": "tsc && eslint '**/*.{js,ts}' && prettier --check '**/*.{js,ts,yml,json}' --ignore-path ../../.gitignore", "build": "tsc --build", - "check": "tsc --build", - "test": "mocha", + "test": "pnpm -r --filter @web3-storage/access-ws run build && mocha -n experimental-vm-modules", "testw": "watch 'pnpm test' src test --interval 1", "rc": "npm version prerelease --preid rc" }, @@ -43,29 +42,47 @@ "dist/src/*.d.ts.map" ], "dependencies": { - "@ipld/dag-ucan": "1.7.0-beta", - "@ucanto/authority": "^0.5.0", - "@ucanto/client": "^0.6.0", - "@ucanto/core": "^0.6.0", - "@ucanto/interface": "^0.7.0", - "@ucanto/server": "^0.7.0", - "@ucanto/transport": "^0.7.0", - "@ucanto/validator": "^0.6.0", + "@ipld/car": "^4.1.5", + "@ipld/dag-ucan": "3.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.1", "@web-std/fetch": "^4.1.0", + "bigint-mod-arith": "^3.1.1", "conf": "^10.1.2", + "inquirer": "^9.1.2", + "isomorphic-ws": "^5.0.0", + "multiformats": "^9.8.1", + "nanoid": "^4.0.0", + "one-webcrypto": "^1.0.3", "ora": "^6.1.2", + "p-queue": "^7.3.0", "p-retry": "^5.1.1", - "undici": "^5.10.0" + "p-wait-for": "^5.0.0", + "uint8arrays": "^3.1.0", + "undici": "^5.10.0", + "ws": "^8.8.1", + "zod": "^3.19.1" }, "devDependencies": { "@types/assert": "^1.5.6", + "@types/inquirer": "^9.0.1", "@types/mocha": "^9.1.1", - "@types/node": "^18.7.14", + "@types/node": "^18.7.18", "assert": "^2.0.0", + "delay": "^5.0.0", + "dotenv": "^16.0.2", "hd-scripts": "^2.1.0", + "miniflare": "^2.9.0", "mocha": "^10.0.0", "sade": "^1.7.4", - "typescript": "4.8.2", + "typescript": "4.8.3", "watch": "^1.0.2" }, "eslintConfig": { diff --git a/packages/access/src/agent.js b/packages/access/src/agent.js new file mode 100644 index 000000000..119a74ad1 --- /dev/null +++ b/packages/access/src/agent.js @@ -0,0 +1,74 @@ +import { Delegations } from './delegations.js' +// @ts-ignore +// eslint-disable-next-line no-unused-vars +import * as API from '@ucanto/interface' +import { Peer } from './awake/peer.js' + +export class Agent { + /** + * @param {{ + * principal: API.SigningPrincipal; + * delegations: Delegations + * }} opts + */ + constructor(opts) { + this.principal = opts.principal + this.delegations = opts.delegations + } + + /** + * @param {API.SigningPrincipal} principal + */ + static async generate(principal) { + const d = new Delegations({ principal }) + + return new Agent({ principal, delegations: await d.full() }) + } + + did() { + return this.principal.did() + } + + /** + * + * @param {API.UCAN.DIDView} audience + * @param {import('@ipld/dag-ucan').Capabilities} capabilities + * @param {number} [lifetimeInSeconds] + */ + delegate(audience, capabilities, lifetimeInSeconds) { + return this.delegations.delegate(audience, capabilities, lifetimeInSeconds) + } + + async export() { + const data = { + privateKey: this.principal, + delegations: await this.delegations.export(), + } + + return data + } + + /** + * @param { typeof import('@ucanto/principal')['SigningPrincipal']} parser + * @param {{ + * privateKey: string; + * created: string; + * received: string; + * meta: [string, import('./awake/types').PeerMeta] [] + * }} data + */ + static async import(parser, data) { + const principal = parser.parse(data.privateKey) + const delegations = await Delegations.import(principal, data) + + return new Agent({ principal, delegations }) + } + + /** + * + * @param {import('../src/awake/types').Channel} channel + */ + peer(channel) { + return new Peer({ agent: this, channel }) + } +} diff --git a/packages/access/src/awake/channel.js b/packages/access/src/awake/channel.js new file mode 100644 index 000000000..7ead335d5 --- /dev/null +++ b/packages/access/src/awake/channel.js @@ -0,0 +1,333 @@ +/* eslint-disable no-console */ +import * as UCAN from '@ipld/dag-ucan' +import * as DID from '@ipld/dag-ucan/did' +import WS from 'isomorphic-ws' +import pWaitFor from 'p-wait-for' +import { concatEncode } from './encoding.js' +import * as Messages from './messages.js' + +const AWAKE_VERSION = '0.1.0' + +/** + * @template [T=unknown] + * @typedef {(event: T) => void} Handler + */ + +/** + * @template [T=unknown] + * @typedef {Array> } EventHandlerList + */ + +/** + * @template {Record} [Events=Record] + * @typedef {Map>} EventHandlerMap + */ + +/** + * @typedef {import('./types').Channel} ChannelType + * @implements {ChannelType} + */ +export class Channel { + /** @type {EventHandlerMap} */ + #subs + + /** + * @param {string | URL} host + * @param {string} topic + * @param {import('../crypto/types').KeyExchangeKeypair} keypair + */ + constructor(host, topic, keypair) { + this.url = new URL('connect/' + topic, host) + this.ws = undefined + this.keypair = keypair + this.#subs = new Map() + this.onMessage = undefined + this.attemps = 0 + /** + * @type {string | number | NodeJS.Timeout | undefined} + */ + this.timeout = undefined + this.forceClose = false + } + + async open() { + this.ws = this.connect() + await pWaitFor(() => this.ws?.readyState === 1) + return this + } + + connect() { + if (this.attemps > 10) { + return + } + + const ws = new WS(this.url) + this.ws = ws + + ws.addEventListener('close', (event) => { + if (!this.forceClose && !this.timeout) { + this.timeout = setTimeout(() => { + this.attemps++ + this.connect() + }, 1000) + console.log('WebSocket closed, reconnecting:', event.code, event.reason) + } else { + clearTimeout(this.timeout) + this.timeout = undefined + // console.log('WebSocket closed:', event.code, event.reason) + } + }) + ws.addEventListener('error', (event) => { + // console.log('WebSocket error', event) + }) + ws.addEventListener('open', (event) => { + // console.log('WebSocket open') + clearTimeout(this.timeout) + this.timeout = undefined + }) + ws.addEventListener('message', (event) => { + // @ts-ignore + const data = JSON.parse(event.data) + if (data.error) { + console.error(data.error) + } + + if (data.type) { + this.publish(data) + } + + if (this.onMessage !== undefined && data.type) { + this.onMessage(data) + } + }) + + return ws + } + + /** + * @param {number} [code] + * @param {string | Buffer } [reason] + */ + async close(code, reason) { + if (this.ws) { + this.forceClose = true + this.ws.close(code, reason) + await pWaitFor(() => this.ws?.readyState === 3) + } + return this + } + + /** + * @param {any} data + */ + send(data) { + if (this.ws?.readyState !== 1) { + throw new Error('Websocket is not active.') + } + + this.ws.send(JSON.stringify(data)) + } + + /** + * @param {import('./types').MessageType} type + * @param { Handler } fn + * @param {boolean} [once] + */ + subscribe(type, fn, once) { + let handlers = this.#subs.get(type) + let handler = fn + + if (once) { + handler = (data) => { + handlers?.splice(handlers.indexOf(handler) >>> 0, 1) + Reflect.apply(fn, this, [data]) + } + } + + if (handlers) { + handlers.push(handler) + } else { + handlers = [handler] + this.#subs.set(type, handlers) + } + + return () => { + handlers?.splice(handlers.indexOf(handler) >>> 0, 1) + } + } + + /** + * @param {import('./types').MessageType} type + * @param { Handler } fn + */ + unsubscribe(type, fn) { + const handlers = this.#subs.get(type) + if (handlers) { + if (fn) { + handlers.splice(handlers.indexOf(fn) >>> 0, 1) + } else { + this.#subs.set(type, []) + } + } + } + + /** + * @private + * @param {import('./types').AwakeMessage} data + */ + publish(data) { + const { type } = data + + const handlers = this.#subs.get(type)?.slice() + if (handlers) { + for (const h of handlers) { + h(data) + } + } + } + + /** + * @type {ChannelType['awaitInit']} + */ + awaitInit() { + return new Promise((resolve, reject) => { + this.onMessage = (/** @type {import('./types').AwakeMessage} */ msg) => { + try { + if (msg.type === 'awake/init') { + this.onMessage = undefined + console.log('receive', msg.type) + + const data = Messages.InitResponse.parse(msg) + resolve({ + awv: data.awv, + type: data.type, + did: DID.parse(data.did), + caps: /** @type {UCAN.Capabilities} */ (data.caps), + }) + } + } catch (error) { + reject(error) + } + } + }) + } + + /** + * @type {ChannelType['awaitRes']} + */ + awaitRes() { + return new Promise((resolve, reject) => { + this.onMessage = async ( + /** @type {import('./types').AwakeMessage} */ msg + ) => { + try { + if (msg.type === 'awake/res') { + this.onMessage = undefined + console.log('receive', msg.type) + + const data = Messages.ResResponse.parse(msg) + const iss = DID.parse(data.iss) + const decryptedMsg = await this.keypair.decryptFromDid( + data.msg, + iss.did() + ) + resolve({ + awv: data.awv, + type: data.type, + iss, + aud: DID.parse(data.aud), + ucan: UCAN.parse(decryptedMsg), + }) + } + } catch (error) { + reject(error) + } + } + }) + } + + /** + * + * @type {ChannelType['awaitMsg']} + */ + awaitMsg(did) { + return new Promise((resolve, reject) => { + this.onMessage = async ( + /** @type {import('./types').AwakeMsg} */ msg + ) => { + try { + if ( + msg.type === 'awake/msg' && + msg.msg && + typeof msg.msg === 'string' + ) { + this.onMessage = undefined + + msg.msg = JSON.parse( + await this.keypair.decryptFromDid(msg.msg, did.did()) + ) + console.log('receive', msg.type) + resolve(msg) + } + } catch (error) { + reject(error) + } + } + }) + } + + /** + * @type {ChannelType['sendInit']} + */ + async sendInit(caps) { + console.log('send awake/init') + this.send({ + awv: AWAKE_VERSION, + type: 'awake/init', + did: this.keypair.did, + caps, + }) + } + + /** + * @type {ChannelType['sendRes']} + */ + async sendRes(aud, ucan) { + console.log('send awake/res') + + const msg = await this.keypair.encryptForDid(UCAN.format(ucan), aud.did()) + this.send({ + awv: AWAKE_VERSION, + type: 'awake/res', + iss: this.keypair.did, + aud: aud.did(), + msg, + }) + } + + /** + * @type {ChannelType['sendMsg']} + */ + async sendMsg(did, msg) { + console.log('send awake/msg') + const id = await concatEncode([await this.keypair.pubkey(), did]) + + this.send({ + awv: AWAKE_VERSION, + type: 'awake/msg', + id, + msg: await this.keypair.encryptForDid(JSON.stringify(msg), did.did()), + }) + } + + /** + * @type {ChannelType['sendMsg']} + */ + async sendFin(did) { + await this.sendMsg(did, { + 'awake/fin': 'disconnect', + }) + + await this.close() + } +} diff --git a/packages/access/src/awake/encoding.js b/packages/access/src/awake/encoding.js new file mode 100644 index 000000000..284bca966 --- /dev/null +++ b/packages/access/src/awake/encoding.js @@ -0,0 +1,14 @@ +/* eslint-disable unicorn/prefer-spread */ +import * as u8 from 'uint8arrays' +import { sha256 } from 'multiformats/hashes/sha2' + +/** + * + * @param {ArrayLike[]} buffers + * @param {import('uint8arrays/to-string').SupportedEncodings} [encoding] + */ +export async function concatEncode(buffers, encoding = 'base64') { + const out = await sha256.encode(u8.concat(buffers)) + + return u8.toString(out, encoding) +} diff --git a/packages/access/src/awake/messages.js b/packages/access/src/awake/messages.js new file mode 100644 index 000000000..a45c9d41d --- /dev/null +++ b/packages/access/src/awake/messages.js @@ -0,0 +1,51 @@ +import { z } from 'zod' + +export const MessageType = z.enum(['awake/init', 'awake/res', 'awake/msg']) + +export const AwakeMessage = z.object({ + awv: z.literal('0.1.0'), + type: MessageType, +}) + +export const PinChallengeMessage = z + .object({ + did: z + .string() + .startsWith('did:', { message: 'should be a DID `did:key:z...`' }), + sig: z.string(), + }) + .strict() + +export const AckMessage = z + .object({ + 'awake/ack': z + .string() + .startsWith('did:', { message: 'should be a DID `did:key:z...`' }), + }) + .strict() + +export const InitResponse = AwakeMessage.extend({ + type: z.literal('awake/init'), + did: z + .string() + .startsWith('did:', { message: 'should be a DID `did:key:z...`' }), + caps: z + .array( + z.object({ + with: z.string(), + can: z.string(), + }) + ) + .nonempty(), +}).strict() + +export const DID = z + .string() + .startsWith('did:', { message: 'should be a DID `did:key:z...`' }) + +export const ResResponse = AwakeMessage.extend({ + type: z.literal('awake/res'), + iss: DID, + aud: DID, + msg: z.string().min(1), +}).strict() diff --git a/packages/access/src/awake/peer.js b/packages/access/src/awake/peer.js new file mode 100644 index 000000000..191021e46 --- /dev/null +++ b/packages/access/src/awake/peer.js @@ -0,0 +1,203 @@ +import * as UCAN from '@ipld/dag-ucan' +import * as DID from '@ipld/dag-ucan/did' +import { Principal } from '@ucanto/principal' +import { sha256 } from 'multiformats/hashes/sha2' +import * as u8 from 'uint8arrays' +import { decodeDelegations, encodeDelegations } from '../encoding.js' +import * as Messages from './messages.js' + +export class Peer { + /** + * @param {{ + * channel: import('./types').Channel; + * agent: import('../agent').Agent; + * }} opts + */ + constructor(opts) { + this.channel = opts.channel + this.agent = opts.agent + this.did = opts.agent.did() + this.challenge = undefined + this.nextdid = undefined + this.audience = undefined + this.pin = Math.floor(Math.random() * 1_000_000) + } + + /** + * Bootstrap `awake/init`, receive `awake/res` and send challenge to Responder + * + * @param {import('@ipld/dag-ucan').Capabilities} caps + */ + async bootstrap(caps) { + // step 2 - awake/init send + this.channel.sendInit(caps) + + // step 3 - awake/res receive + const { ucan } = await this.channel.awaitRes() + + // step 4 - awake/msg send + // TODO: verify ucan, and check if proof includes caps sent previously + + const challenge = findKey(ucan.facts, 'awake/challenge') + this.nextdid = DID.parse(findKey(ucan.facts, 'awake/nextdid')) + + if (challenge === 'oob-pin') { + await this.sendPinSignature() + return this.pin.toString() + } + + // TODO: fail on unknown challenge with unknown-challenge message https://github.com/ucan-wg/awake#62-unknown-challenge-error + } + + async awaitBootstrap() { + // step 2 - awake/init receive + const msg = await this.channel.awaitInit() + this.nextdid = msg.did + + // step3 - awake/res send + const ucan = await UCAN.issue({ + issuer: this.agent.principal, + audience: this.nextdid, + capabilities: [{ with: 'awake:', can: '*' }], + facts: [ + { 'awake/challenge': 'oob-pin' }, + // TODO: this should be rotated for the next step + { 'awake/nextdid': this.channel.keypair.did }, + ], + // TODO: proof for caps requested + }) + + await this.channel.sendRes(this.nextdid, ucan) + + // step 4 - awake/msg receive + const challengeMsg = await this.channel.awaitMsg(this.nextdid) + const { did, sig } = Messages.PinChallengeMessage.parse(challengeMsg.msg) + this.audience = DID.parse(did) + this.challenge = sig + } + + /** + * Acknowledgment for the PIN challenge + * + * @param {string} pin + */ + async ack(pin) { + if (!this.challenge || !this.nextdid || !this.audience) { + throw new Error('No challenge active.') + } + + // step 5 - awake/ack challenge confirmation and send + const sig = u8.fromString(this.challenge, 'base64') + const verifier = Principal.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))) { + throw new Error( + `Challenge failed: ${pin} is not valid for the current challenge.` + ) + } + + // challenge response + await this.channel.sendMsg(this.nextdid, { + 'awake/ack': this.did, + }) + } + + async awaitAck() { + if (!this.nextdid) { + throw new Error('No session is active. await ack') + } + + const awakeMsgAck = await this.channel.awaitMsg(this.nextdid) + + const ack = Messages.AckMessage.parse(awakeMsgAck.msg) + + this.audience = DID.parse(ack['awake/ack']) + } + + /** + * + * @param {{ + * caps: import('./types').LinkRequest['msg']['caps'] + * meta: import('./types').PeerMeta + * }} opts + */ + async link(opts) { + if (!this.nextdid || !this.audience) { + throw new Error('No session is active. request link') + } + + const msg = { + type: 'link', + meta: opts.meta, + caps: opts.caps, + } + this.channel.sendMsg(this.nextdid, msg) + + /** @type {import('./types').LinkResponse} */ + const capsRsp = await this.channel.awaitMsg(this.nextdid) + const delegations = await decodeDelegations(capsRsp.msg.delegation) + + await this.channel.sendFin(this.nextdid) + + return { delegation: delegations[0], meta: capsRsp.msg.meta } + } + + async awaitLink() { + if (!this.nextdid || !this.audience) { + throw new Error('No challenge active.') + } + // request caps + /** @type {import('./types').LinkRequest} */ + const reqCap = await this.channel.awaitMsg(this.nextdid) + const d = await this.agent.delegate( + this.audience, + [{ with: this.agent.did(), can: reqCap.msg.caps[0].can }], + 8_600_000 + ) + + this.channel.subscribe('awake/msg', (msg) => { + this.channel.close() + }) + this.channel.sendMsg(this.nextdid, { + meta: { + name: this.agent.did(), + type: 'device', + }, + delegation: await encodeDelegations([d]), + }) + } + + /** + * Build pin signature and send it + * + * @private + */ + async sendPinSignature() { + if (!this.nextdid) { + throw new Error('No session is active.') + } + + // Pin signature + const bytes = u8.fromString(this.nextdid.did() + this.pin.toString()) + const signed = await this.agent.principal.sign(await sha256.encode(bytes)) + this.channel.sendMsg(this.nextdid, { + did: this.did, + sig: u8.toString(signed, 'base64'), + }) + } +} + +/** + * @param {any} arr + * @param {string} key + */ +function findKey(arr, key) { + for (const i of arr) { + if (i[key]) { + return i[key] + } + } +} diff --git a/packages/access/src/awake/readme.md b/packages/access/src/awake/readme.md new file mode 100644 index 000000000..98156f8dc --- /dev/null +++ b/packages/access/src/awake/readme.md @@ -0,0 +1,22 @@ +# Awake + +## TODO + +- [ ] concurrent sessions +- [ ] ucan store class +- [ ] validate ucan https://github.com/ucan-wg/awake#331-validation-ucan in awake/res +- [ ] timeout on messages sent +- [ ] rotate chain keys - Double Ratchet +- [ ] error over channel and disconnect during bad handshake +- [ ] update according to latest spec + +## Notes + +- HKDF: HMAC-based Extract-and-Expand Key Derivation Function +- KDF: Key Derivation Function +- OKM: Output Key Material +- Double Ratchet Algorithm: https://signal.org/docs/specifications/doubleratchet/ + +### Session setup + +The Requestor SHOULD accept multiple concurrent connection attempts on this request DID, at least until the handshake is complete. diff --git a/packages/access/src/awake/types.ts b/packages/access/src/awake/types.ts new file mode 100644 index 000000000..8117f6061 --- /dev/null +++ b/packages/access/src/awake/types.ts @@ -0,0 +1,131 @@ +import * as UCAN from '@ipld/dag-ucan' +import { Ability, Resource } from '@ipld/dag-ucan' +import WS from 'isomorphic-ws' +import { z } from 'zod' +import { KeyExchangeKeypair } from '../crypto/types.js' +import { Handler } from './channel.js' +import * as Messages from './messages.js' + +export interface Channel { + keypair: KeyExchangeKeypair + + ws?: WebSocket | WS + /** + * Sends a data as a message + * Data should run through JSON.stringify + */ + send: (data: unknown) => void + open: () => Promise + close: (code?: number, reason?: string) => Promise + subscribe: (type: MessageType, fn: Handler, once?: boolean) => () => void + + /** + * Send awake init message to responder + * did - The Requestor's initial (temp) ECDH P-256 + * + * @param caps - Capabilities that the Responder MUST provide + */ + sendInit: (caps: AwakeInit['caps']) => Promise + + awaitInit: () => Promise + + /** + * Send awake res message to requestor + * + * @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 + + /** + * Awaits for awake/res msg and decrypts ucan payload from send DID + */ + awaitRes: () => Promise + + /** + * Send generic awake/msg with encrypted payload and message id + * + * @param did - DID to encrypt for + * @param msg - Message to be encrypted and sent + */ + sendMsg: (did: UCAN.DIDView, msg: unknown) => Promise + + /** + * Awaits for a awake/msg and decrypts payload from sender DID + */ + awaitMsg: (did: UCAN.DIDView) => Promise + + sendFin: (did: UCAN.DIDView) => Promise +} + +export type MessageType = z.infer + +export type AwakeMessage = z.infer + +export interface AwakeInit extends AwakeMessage { + did: UCAN.DIDView + caps: UCAN.Capabilities +} + +export interface AwakeRes extends AwakeMessage { + iss: UCAN.DIDView + aud: UCAN.DIDView + ucan: UCAN.View +} + +/** + * Awake message with encrypted payload + */ +export interface AwakeMsg extends AwakeMessage { + id: string + msg: string +} + +/** + * Awake message with decrypted payload + */ +export interface AwakeMsgDecrypted extends AwakeMessage { + id: string + msg: any +} + +export type PinChallengeMessage = z.infer< + typeof Messages['PinChallengeMessage'] +> & { + did: `did:${string}` +} + +declare const Marker: unique symbol +export interface Phantom { + [Marker]?: T +} + +export type Encrypted = Out & Phantom + +export interface PeerMeta { + name: string + description?: string + url?: URL + image?: URL + type: 'device' | 'app' | 'service' +} + +export interface LinkRequest extends AwakeMsgDecrypted { + msg: { + type: 'link' + meta: PeerMeta + caps: Array<{ + can: Ability + with?: Resource + }> + } +} + +export interface LinkResponse extends AwakeMsgDecrypted { + msg: { + meta: PeerMeta + delegation: string + } +} + +export type MetaMap = Map diff --git a/packages/access/src/capabilities-types.ts b/packages/access/src/capabilities-types.ts index 36f9bbdc7..30729baab 100644 --- a/packages/access/src/capabilities-types.ts +++ b/packages/access/src/capabilities-types.ts @@ -1,11 +1,11 @@ -import type { Capability, DID, Link } from '@ucanto/interface' +import type { Capability, IPLDLink, DID } from '@ipld/dag-ucan' export interface StoreAdd extends Capability<'store/add', DID> { - link?: Link + link?: IPLDLink } export interface StoreRemove extends Capability<'store/remove', DID> { - link?: Link + link?: IPLDLink } export interface StoreList extends Capability<'store/list', DID> {} diff --git a/packages/access/src/capabilities.js b/packages/access/src/capabilities.js index 91c05f818..8e892417e 100644 --- a/packages/access/src/capabilities.js +++ b/packages/access/src/capabilities.js @@ -75,7 +75,6 @@ export const identityIdentify = store.derive({ }), derives: equalWith, }) - export const identity = identityRegister .or(identityValidate) .or(identityIdentify) diff --git a/packages/access/src/cli/cmd-link.js b/packages/access/src/cli/cmd-link.js new file mode 100644 index 000000000..27878b955 --- /dev/null +++ b/packages/access/src/cli/cmd-link.js @@ -0,0 +1,82 @@ +/* eslint-disable no-console */ +// @ts-ignore +// eslint-disable-next-line no-unused-vars +import * as Keypair from '@ucanto/authority' +import inquirer from 'inquirer' +import pWaitFor from 'p-wait-for' +import { Agent } from '../agent.js' +import { Channel } from '../awake/channel.js' +import { Peer } from '../awake/peer.js' +import { EcdhKeypair } from '../crypto/p256-ecdh.js' +import { getConfig } from './config.js' +import * as Ed25519Signer from '../principal/signer-ed25519.js' + +/** + * @param {string} channel + * @param {{ profile: string; }} opts + */ +export async function linkCmd(channel, opts) { + const config = getConfig(opts.profile) + const issuer = Ed25519Signer.parse( + /** @type {string} */ (config.get('private-key')) + ) + + console.log('DID:', issuer.did()) + let done = false + const host = new URL('ws://127.0.0.1:8788/connect') + if (!channel) { + const ws = await new Channel( + host, + issuer.did(), + await EcdhKeypair.create() + ).open() + + const agent = await Agent.generate(issuer) + const responder = new Peer({ agent, channel: ws }) + await responder.awaitBootstrap() + const { pin } = await inquirer.prompt({ + type: 'input', + name: 'pin', + message: 'Input your pin:', + }) + + await responder.ack(pin) + await responder.awaitLink() + + config.set('agent', agent.export()) + done = true + } else { + const ws = await new Channel( + host, + channel, + await EcdhKeypair.create() + ).open() + const agent = await Agent.generate(issuer) + const requestor = new Peer({ agent, channel: ws }) + const pin = await requestor.bootstrap([ + // @ts-ignore + { with: channel, can: 'identity/*' }, + ]) + + console.log(pin) + await requestor.awaitAck() + const link = await requestor.link({ + caps: [{ can: 'identity/*' }], + meta: { + name: agent.did(), + type: 'device', + }, + }) + console.log('🚀 ~ file: cmd-link.js ~ line 70 ~ linkCmd ~ delegation', link) + + console.log(link) + + await agent.delegations.add(link.delegation) + + config.set('agent', agent.export()) + + done = true + } + + await pWaitFor(() => done) +} diff --git a/packages/access/src/cli/config.js b/packages/access/src/cli/config.js new file mode 100644 index 000000000..c399f5615 --- /dev/null +++ b/packages/access/src/cli/config.js @@ -0,0 +1,22 @@ +import fs from 'fs' +import Conf from 'conf' + +export const NAME = 'w3access' +export const pkg = JSON.parse( + // eslint-disable-next-line unicorn/prefer-json-parse-buffer + fs.readFileSync(new URL('../../package.json', import.meta.url), { + encoding: 'utf8', + }) +) + +/** + * @param {string} profile + */ +export function getConfig(profile = 'main') { + const config = new Conf({ + projectName: NAME, + projectSuffix: '', + configName: profile, + }) + return config +} diff --git a/packages/access/src/cli.js b/packages/access/src/cli/index.js similarity index 54% rename from packages/access/src/cli.js rename to packages/access/src/cli/index.js index 81a25e1a8..b50dfa423 100755 --- a/packages/access/src/cli.js +++ b/packages/access/src/cli/index.js @@ -1,37 +1,27 @@ #!/usr/bin/env node /* eslint-disable no-console */ -import sade from 'sade' import fs from 'fs' -import Conf from 'conf' import ora from 'ora' -import * as Keypair from '@ucanto/authority' -import * as Access from './index.js' import path from 'path' -import undici from 'undici' +import sade from 'sade' import { Transform } from 'stream' +import undici from 'undici' +import * as Access from '../index.js' +import { linkCmd } from './cmd-link.js' +import { getConfig, NAME, pkg } from './config.js' +import { getService } from './utils.js' +import inquirer from 'inquirer' // @ts-ignore -import * as DID from '@ipld/dag-ucan/did' - -const NAME = 'w3access' -const pkg = JSON.parse( - // eslint-disable-next-line unicorn/prefer-json-parse-buffer - fs.readFileSync(new URL('../package.json', import.meta.url), { - encoding: 'utf8', - }) -) -const config = new Conf({ - projectName: NAME, - projectSuffix: '', -}) +// eslint-disable-next-line no-unused-vars +import * as Types from '@ucanto/interface' +import { Agent } from '../agent.js' +import { SigningPrincipal } from '@ucanto/principal' const prog = sade(NAME) -const url = process.env.URL || 'http://127.0.0.1:8787' -const did = DID.parse( - // @ts-ignore - https://github.com/ipld/js-dag-ucan/issues/49 - process.env.DID || 'did:key:z6MksafxoiEHyRF6RsorjrLrEyFQPFDdN6psxtAfEsRcvDqx' -) - -prog.version(pkg.version) +prog + .version(pkg.version) + .option('-p, --profile', 'Select the config profile to use.', 'main') + .option('--env', 'Env', 'production') prog .command('init') @@ -39,6 +29,7 @@ prog .option('--force', 'Override config with new keypair.', false) .option('--private-key', 'Create new keypair with private key.') .action(async (opts) => { + const config = getConfig(opts.profile) const spinner = ora('Creating new keypair').start() try { const privateKey = /** @type {string | undefined} */ ( @@ -47,7 +38,7 @@ prog // Save or override keypair if (opts['private-key']) { - const kp = Keypair.parse(opts['private-key']) + const kp = SigningPrincipal.parse(opts['private-key']) config.set('private-key', opts['private-key']) config.set('did', kp.did()) spinner.succeed(`Keypair created and saved to ${config.path}`) @@ -56,8 +47,8 @@ prog // Create or override keypair if (opts.force || !privateKey) { - const kp = await Keypair.SigningAuthority.generate() - config.set('private-key', Keypair.format(kp)) + const kp = await SigningPrincipal.generate() + config.set('private-key', SigningPrincipal.format(kp)) config.set('did', kp.did()) spinner.succeed(`Keypair created and saved to ${config.path}`) return @@ -80,8 +71,9 @@ prog prog .command('register') .describe("Register with the service using config's keypair.") - .option('--url', 'Service URL.', url) .action(async (opts) => { + const config = getConfig(opts.profile) + const { audience, url } = await getService(opts.env) const spinner = ora('Registering with the service').start() try { if (!config.get('private-key')) { @@ -91,15 +83,23 @@ prog process.exit(1) } + spinner.stopAndPersist() + const { email } = await inquirer.prompt({ + type: 'input', + name: 'email', + message: 'Input your email to validate:', + }) + + spinner.start() + // @ts-ignore - const issuer = Keypair.parse(config.get('private-key')) - const url = new URL(opts.url) + const issuer = SigningPrincipal.parse(config.get('private-key')) await Access.validate({ - audience: did, + audience, url, issuer, caveats: { - as: 'mailto:hugo@dag.house', + as: `mailto:${email}`, }, }) @@ -110,7 +110,7 @@ prog }) await Access.register({ - audience: did, + audience, url, issuer, proof, @@ -128,8 +128,9 @@ prog prog .command('upload ') .describe("Register with the service using config's keypair.") - .option('--url', 'Service URL.', url) .action(async (file, opts) => { + const config = getConfig(opts.profile) + const { url } = await getService(opts.env) const spinner = ora('Registering with the service').start() try { if (!config.get('private-key')) { @@ -139,9 +140,6 @@ prog process.exit(1) } - // @ts-ignore - const url = new URL(opts.url) - const stream = fs.createReadStream(path.resolve(file)) const checkStream = new Transform({ transform(chunk, encoding, callback) { @@ -169,16 +167,57 @@ prog prog .command('config') .describe('Print config file content.') - .action(async () => { - console.log(config.path) - try { - for (const [key, value] of config) { - console.log(`${key}: ${value}`) + .action(async (opts) => { + const config = getConfig(opts.profile) + console.log('Path:', config.path) + // console.log(JSON.stringify(config.store, undefined, 2)) + // const { audience, url } = await getService(opts.env) + + const data = config.get('agent') + if (data) { + // @ts-ignore + const agent = await Agent.import(SigningPrincipal, config.get('agent')) + console.log('did:', agent.did()) + + // Delegations received + console.log('Delegations received') + for (const del of agent.delegations.received) { + console.log('From:', del.issuer.did()) + for (const cap of del.capabilities) { + console.log(cap) + } + } + + // Delegations created + console.log('Delegations created') + for (const c of agent.delegations.created) { + console.log('To:', c.audience.did()) + for (const cap of c.capabilities) { + console.log(cap) + } } - } catch (error) { - console.error(error) - process.exit(1) } + + // const jwt = /** @type {string} */ (config.get('delegation')) + // let proof + // if (jwt) { + // const ucan = UCAN.parse(jwt) + // const root = await UCAN.write(ucan) + // /** @type {Types.Delegation<[import('../capabilities-types').IdentityIdentify]>} */ + // proof = Delegation.create({ root }) + // } + + // // @ts-ignore + // const issuer = Keypair.parse(config.get('private-key')) + // const out = await Access.identify({ + // audience, + // url, + // issuer, + // proof, + // }) + // console.log('Account:', out) }) +prog.command('link [channel]').describe('Link.').action(linkCmd) + prog.parse(process.argv) diff --git a/packages/access/src/cli/utils.js b/packages/access/src/cli/utils.js new file mode 100644 index 000000000..8d925105a --- /dev/null +++ b/packages/access/src/cli/utils.js @@ -0,0 +1,32 @@ +import undici from 'undici' +import { Principal } from '@ucanto/principal' + +/** @type {Record} */ +const envs = { + production: 'https://access-api-staging.web3.storage', + staging: 'https://access-api.web3.storage', + dev: 'https://w3access-dev.protocol-labs.workers.dev', + local: 'http://127.0.0.1:8787', +} + +/** + * @type {import("@ucanto/interface").Principal} + */ +let audience + +/** + * @param {string} env + */ +export async function getService(env) { + const url = new URL(envs[env]) + if (audience) { + return { url, did: audience } + } else { + const rsp = await undici.fetch(url + 'version') + + // @ts-ignore + const { did } = await rsp.json() + audience = Principal.parse(did) + return { url, audience } + } +} diff --git a/packages/access/src/connection.js b/packages/access/src/connection.js index 6715fd0f5..273eeb976 100644 --- a/packages/access/src/connection.js +++ b/packages/access/src/connection.js @@ -2,18 +2,13 @@ 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 _fetch from '@web-std/fetch' import * as Service from './service.js' /** - * @param {{id : import('@ipld/dag-ucan').Identity; url?: URL, fetch?: import('@ucanto/transport').HTTP.Fetcher}} opts + * @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 }) { - if (!fetch) { - fetch = _fetch.bind(globalThis) - } - return Client.connect({ id, encoder: CAR, diff --git a/packages/access/src/crypto/aes-key.js b/packages/access/src/crypto/aes-key.js new file mode 100644 index 000000000..4d7252bfa --- /dev/null +++ b/packages/access/src/crypto/aes-key.js @@ -0,0 +1,79 @@ +import { webcrypto } from 'one-webcrypto' +import * as uint8arrays from 'uint8arrays' +import { randomIV } from './encoding.js' + +/** + * @typedef {import('./types').EncryptionKeypair} EncryptionKeypair + * @implements {EncryptionKeypair} + */ +export class AesKey { + #key + /** + * + * @param {CryptoKey} key + */ + constructor(key) { + this.#key = key + } + + static async create() { + const key = await webcrypto.subtle.generateKey( + { + name: 'AES-GCM', + length: 256, + }, + true, + ['encrypt', 'decrypt'] + ) + return new AesKey(key) + } + + /** + * utf8 data -> base64pad cipher + * returns base64 encrypted data with iv prepended + * + * @param {string} data + */ + async encrypt(data) { + const iv = randomIV() + const dataBytes = uint8arrays.fromString(data, 'utf8') + const buf = await webcrypto.subtle.encrypt( + { + name: 'AES-GCM', + iv, + }, + this.#key, + dataBytes + ) + const encryptedBytes = new Uint8Array(buf) + const encrypted = uint8arrays.toString( + // eslint-disable-next-line unicorn/prefer-spread + uint8arrays.concat([iv, encryptedBytes]), + 'base64pad' + ) + return encrypted + } + + /** + * base64pad cipher -> utf8 data + * expects base64 encrypted data with iv prepended + * + * @param {string} data + */ + async decrypt(data) { + const dataBytes = uint8arrays.fromString(data, 'base64pad') + const iv = dataBytes.slice(0, 12) + const encrypted = dataBytes.slice(12) + + const buf = await webcrypto.subtle.decrypt( + { + name: 'AES-GCM', + iv, + }, + this.#key, + encrypted + ) + const decryptedBytes = new Uint8Array(buf) + return uint8arrays.toString(decryptedBytes, 'utf8') + } +} diff --git a/packages/access/src/crypto/encoding.js b/packages/access/src/crypto/encoding.js new file mode 100644 index 000000000..44b9bd102 --- /dev/null +++ b/packages/access/src/crypto/encoding.js @@ -0,0 +1,97 @@ +import { webcrypto } from 'one-webcrypto' +import * as uint8arrays from 'uint8arrays' +import * as bigintModArith from 'bigint-mod-arith' + +export const P256_DID_PREFIX = new Uint8Array([0x80, 0x24]) +export const BASE58_DID_PREFIX = 'did:key:z' // z is the multibase prefix for base58btc byte encoding + +/** + * Unique 12-byte initialization vector + */ +export function randomIV() { + return webcrypto.getRandomValues(new Uint8Array(12)) +} + +/** + * Elliptic-curve-point-compression for p256 65 byte pubkey + * + * @param { Uint8Array} pubkeyBytes + */ +export function compressP256Pubkey(pubkeyBytes) { + if (pubkeyBytes.length !== 65) { + throw new Error('Expected 65 byte pubkey') + } else if (pubkeyBytes[0] !== 0x04) { + throw new Error('Expected first byte to be 0x04') + } + // first byte is a prefix + const x = pubkeyBytes.slice(1, 33) + const y = pubkeyBytes.slice(33, 65) + const out = new Uint8Array(x.length + 1) + + out[0] = 2 + (y[y.length - 1] & 1) + out.set(x, 1) + + return out +} + +/** + * Test to see if the argument is the Uint8Array + * + * @param {Uint8Array} [param] + */ +export function testUint8Array(param) { + if (param === undefined) { + return false + } + return param.constructor === Uint8Array +} + +/** + * Decompress a compressed public key in SEC format. + * See section 2.3.3 in SEC 1 v2 : https://www.secg.org/sec1-v2.pdf. + * + * Code based on: https://stackoverflow.com/questions/17171542/algorithm-for-elliptic-curve-point-compression/30431547#30431547 + * + * https://github.com/w3c-ccg/did-method-key/issues/32 + * + * @param {Uint8Array} comp - 33 byte compressed public key. 1st byte: 0x02 for even or 0x03 for odd. Following 32 bytes: x coordinate expressed as big-endian. + */ +export function decompressP256(comp) { + if (comp.length !== 33) { + throw new TypeError('Expected 33 byte compress pubkey') + } else if (comp[0] !== 0x02 && comp[0] !== 0x03) { + throw new TypeError('Expected first byte to be 0x02 or 0x03') + } + + // two, prime, b, and pIdent are constants for the P-256 curve + const two = BigInt(2) + const prime = two ** 256n - two ** 224n + two ** 192n + two ** 96n - 1n + const b = + 41_058_363_725_152_142_129_326_129_780_047_268_409_114_441_015_993_725_554_835_256_314_039_467_401_291n + const pIdent = (prime + 1n) / 4n + + const signY = BigInt(comp[0] - 2) + const x = comp.subarray(1) + const xBig = BigInt(uint8arrays.toString(x, 'base10')) + + const a = xBig ** 3n - xBig * 3n + b + let yBig = bigintModArith.modPow(a, pIdent, prime) + + // If the parity doesn't match it's the *other* root" + if (yBig % 2n !== signY) { + // y = prime - y + yBig = prime - yBig + } + + const y = uint8arrays.fromString(yBig.toString(10), 'base10') + + // left-pad for smaller than 32 byte y + const offset = 32 - y.length + const yPadded = new Uint8Array(32) + yPadded.set(y, offset) + + // concat coords & prepend P-256 prefix + // eslint-disable-next-line unicorn/prefer-spread + const publicKey = uint8arrays.concat([[0x04], x, yPadded]) + return publicKey +} diff --git a/packages/access/src/crypto/p256-ecdh.js b/packages/access/src/crypto/p256-ecdh.js new file mode 100644 index 000000000..f047f949c --- /dev/null +++ b/packages/access/src/crypto/p256-ecdh.js @@ -0,0 +1,157 @@ +import { webcrypto } from 'one-webcrypto' +import * as uint8arrays from 'uint8arrays' +import * as DID from '@ipld/dag-ucan/did' +import { AesKey } from './aes-key.js' +import { + compressP256Pubkey, + P256_DID_PREFIX, + decompressP256, +} from './encoding.js' + +/** + * @param {CryptoKey} pubkey + */ +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)]) + ) +} + +/** + * @param {import('@ipld/dag-ucan').DID} did + */ +function ecdhKeyFromDid(did) { + // Parse did string and slice algorithm varint + const view = DID.parse(did).slice(2) + + return webcrypto.subtle.importKey( + 'raw', + decompressP256(view), + { name: 'ECDH', namedCurve: 'P-256' }, + true, + [] + ) +} + +/** + * @param {import('@ipld/dag-ucan').DID} did + */ +export async function pubkeyBytesFromDID(did) { + const cryptoKey = await ecdhKeyFromDid(did) + const buf = await webcrypto.subtle.exportKey('raw', cryptoKey) + return new Uint8Array(buf) +} + +/** + * @typedef {import('./types').KeyExchangeKeypair} SharedKey + * @implements {SharedKey} + */ +export class EcdhKeypair { + /** + * @param {CryptoKeyPair} keypair + */ + #keypair + + /** + * @param {CryptoKeyPair} keypair + * @param {`did:${string}`} did + */ + constructor(keypair, did) { + this.#keypair = keypair + this.did = did + } + + static async ecdhKey() { + const keypair = await webcrypto.subtle.generateKey( + { name: 'ECDH', namedCurve: 'P-256' }, + false, + ['deriveKey', 'deriveBits'] + ) + const did = await didFromPubkey(keypair.publicKey) + return { keypair, did } + } + + static async create() { + const { keypair, did } = await EcdhKeypair.ecdhKey() + return new EcdhKeypair(keypair, did) + } + + async pubkey() { + const buf = await webcrypto.subtle.exportKey('raw', this.#keypair.publicKey) + return new Uint8Array(buf) + } + + /** + * @param {import('@ipld/dag-ucan').DID} otherDid + */ + async deriveSharedKey(otherDid) { + const publicKey = await ecdhKeyFromDid(otherDid) + + // probably need to derive another key with HKDF for the next step ? + + // const bits = await webcrypto.subtle.deriveBits( + // { name: 'ECDH', public: publicKey }, + // this.#keypair.privateKey, + // 256 + // ) + + // const khdf = await webcrypto.subtle.deriveBits( + // { + // name: 'HKDF', + // hash: 'SHA-512', + // info: '0x4157414B452D5543414E', + // salt: bits, + // }, + // this.#keypair.privateKey, + // 608 // 512 + // ) + + // first 256 is the secret to the next hkdf + // import key with the second 256 as aes key + // 512-603 to the next aes IV + + // this.#keypair = await webcrypto.subtle.generateKey( + // { name: 'ECDH', namedCurve: 'P-256' }, + // false, + // ['deriveKey', 'deriveBits'] + // ) + + // message key encrytion - this should be just import key from bits + const key = await webcrypto.subtle.deriveKey( + { name: 'ECDH', public: publicKey }, + this.#keypair.privateKey, + { + name: 'AES-GCM', + length: 256, + }, + false, + ['encrypt', 'decrypt'] + ) + + return new AesKey(key) + } + + /** + * returns base64 encrypted data with iv prepended + * + * @param {string} data + * @param {import('@ipld/dag-ucan').DID} otherDid + */ + async encryptForDid(data, otherDid) { + const sharedKey = await this.deriveSharedKey(otherDid) + return sharedKey.encrypt(data) + } + + /** + * expects base64 encrypted data with iv prepended + * + * @type {SharedKey['decryptFromDid']} + */ + async decryptFromDid(data, otherDid) { + const sharedKey = await this.deriveSharedKey(otherDid) + return sharedKey.decrypt(data) + } +} diff --git a/packages/access/src/crypto/types.ts b/packages/access/src/crypto/types.ts new file mode 100644 index 000000000..1e4ab3538 --- /dev/null +++ b/packages/access/src/crypto/types.ts @@ -0,0 +1,13 @@ +import * as UCAN from '@ipld/dag-ucan' +export interface KeyExchangeKeypair { + deriveSharedKey: (otherDID: UCAN.DID) => Promise + encryptForDid: (data: string, otherDID: UCAN.DID) => Promise + decryptFromDid: (data: string, otherDID: UCAN.DID) => Promise + did: UCAN.DID + pubkey: () => Promise +} + +export interface EncryptionKeypair { + encrypt: (data: string) => Promise + decrypt: (data: string) => Promise +} diff --git a/packages/access/src/delegations.js b/packages/access/src/delegations.js new file mode 100644 index 000000000..3e1da975f --- /dev/null +++ b/packages/access/src/delegations.js @@ -0,0 +1,102 @@ +import { delegate } from '@ucanto/core' +// @ts-ignore +// eslint-disable-next-line no-unused-vars +import * as API from '@ucanto/interface' +import { decodeDelegations, encodeDelegations } from './encoding.js' + +export class Delegations { + /** + * @param {{ + * principal: API.SigningPrincipal; + * received?: import('@ucanto/interface').Delegation[] + * created?: import('@ucanto/interface').Delegation[] + * meta?: import('./awake/types').MetaMap + * }} opts + */ + constructor(opts) { + this.principal = opts.principal + + /** @type {import('@ucanto/interface').Delegation[]} */ + this.received = opts.received || [] + + /** @type {import('@ucanto/interface').Delegation[]} */ + this.created = opts.created || [] + + /** @type {import('./awake/types').MetaMap} */ + this.meta = new Map() + } + + /** + * + * @param {import('@ucanto/interface').Delegation} delegation + */ + async add(delegation) { + this.received.push(delegation) + } + + async full() { + const delegation = await delegate({ + // @ts-ignore + issuer: this.principal, + audience: this.principal, + capabilities: [ + { + can: 'identify/*', + with: this.principal.did(), + }, + ], + lifetimeInSeconds: 8_600_000, + }) + + this.received.push(delegation) + return this + } + + /** + * + * @param {import('@ucanto/interface').UCAN.DIDView} audience + * @param {import('@ipld/dag-ucan').Capabilities} capabilities + * @param {number} [lifetimeInSeconds] + */ + async delegate(audience, capabilities, lifetimeInSeconds) { + const delegation = await delegate({ + issuer: this.principal, + // @ts-ignore + audience, + capabilities, + lifetimeInSeconds, + proofs: this.received, + }) + + this.created.push(delegation) + return delegation + } + + async export() { + const data = { + created: await encodeDelegations(this.created), + received: await encodeDelegations(this.received), + meta: [...this.meta.entries()], + } + + return data + } + + /** + * @param {API.SigningPrincipal} principal + * @param {{ + * privateKey: string; + * created: string; + * received: string + * meta: [string, import('./awake/types').PeerMeta] [] + * }} data + */ + static async import(principal, data) { + return new Delegations({ + principal, + created: await decodeDelegations(data.created), + received: await decodeDelegations(data.received), + meta: new Map(data.meta), + }) + } +} diff --git a/packages/access/src/encoding.js b/packages/access/src/encoding.js new file mode 100644 index 000000000..554ac43fe --- /dev/null +++ b/packages/access/src/encoding.js @@ -0,0 +1,72 @@ +/* eslint-disable unicorn/prefer-spread */ +import { CarReader } from '@ipld/car/reader' +import { CarWriter } from '@ipld/car/writer' +import { Delegation } from '@ucanto/core/delegation' +import * as u8 from 'uint8arrays' + +/** + * @param {AsyncIterable} iterable + */ +function collector(iterable) { + const chunks = [] + const cfn = (async () => { + for await (const chunk of iterable) { + chunks.push(chunk) + } + return u8.concat(chunks) + })() + return cfn +} + +/** + * @param {import("@ucanto/interface").Delegation[]} delegations + */ +export async function encodeDelegations(delegations) { + const roots = delegations.map((d) => d.root.cid) + + // @ts-ignore + const { writer, out } = CarWriter.create(roots) + const collection = collector(out) + + for (const delegation of delegations) { + for (const block of delegation.export()) { + // @ts-ignore + await writer.put(block) + } + } + await writer.close() + + const bytes = await collection + + return u8.toString(bytes, 'base64') +} + +/** + * @param {string} raw + */ +export async function decodeDelegations(raw) { + const bytes = u8.fromString(raw, 'base64') + const reader = await CarReader.fromBytes(bytes) + const roots = await reader.getRoots() + + const delegations = [] + + for (const root of roots) { + const rootBlock = await reader.get(root) + + if (rootBlock) { + const blocks = new Map() + for (const block of reader._blocks) { + if (block.cid.toString() !== root.toString()) + blocks.set(block.cid.toString(), block) + } + + // @ts-ignore + delegations.push(new Delegation(rootBlock, blocks)) + } else { + throw new Error('Failed to find root from raw delegation.') + } + } + + return delegations +} diff --git a/packages/access/src/index.js b/packages/access/src/index.js index 3553a779d..3b53b4118 100644 --- a/packages/access/src/index.js +++ b/packages/access/src/index.js @@ -1,7 +1,11 @@ import * as UCAN from '@ipld/dag-ucan' import fetch from '@web-std/fetch' import pRetry from 'p-retry' -import { identityRegister, identityValidate } from './capabilities.js' +import { + identityIdentify, + identityRegister, + identityValidate, +} from './capabilities.js' import { connection } from './connection.js' import * as Service from './service.js' // eslint-disable-next-line no-unused-vars @@ -79,7 +83,7 @@ const run = (did, host, signal) => async () => { */ export async function pullRegisterDelegation(opts) { const url = opts.url || Service.url - /** @type {Types.UCAN.JWT} */ + /** @type {Types.UCAN.JWT<[import('./capabilities-types').IdentityRegister]>} */ const registerProof = await pRetry( run(opts.issuer.did(), url.toString(), opts.signal), { @@ -90,8 +94,31 @@ export async function pullRegisterDelegation(opts) { const ucan = UCAN.parse(registerProof) const root = await UCAN.write(ucan) - /** @type {Types.Delegation<[import('./capabilities-types').IdentityRegister]>} */ 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 = identityIdentify.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 +} diff --git a/packages/access/src/principal/signer-ed25519.js b/packages/access/src/principal/signer-ed25519.js new file mode 100644 index 000000000..869443cd0 --- /dev/null +++ b/packages/access/src/principal/signer-ed25519.js @@ -0,0 +1,163 @@ +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 new file mode 100644 index 000000000..4f36ee138 --- /dev/null +++ b/packages/access/src/principal/types.js @@ -0,0 +1 @@ +/* eslint-disable unicorn/no-empty-file */ diff --git a/packages/access/src/principal/types.ts b/packages/access/src/principal/types.ts new file mode 100644 index 000000000..85d36c4b5 --- /dev/null +++ b/packages/access/src/principal/types.ts @@ -0,0 +1,23 @@ +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 new file mode 100644 index 000000000..6f8623372 --- /dev/null +++ b/packages/access/src/principal/verifier-ed25519.js @@ -0,0 +1,113 @@ +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 index d958a8489..5b6d10aab 100644 --- a/packages/access/src/service.js +++ b/packages/access/src/service.js @@ -1,8 +1,8 @@ -import { Authority } from '@ucanto/server' +import { Principal } from '@ucanto/principal' export const url = new URL('https://access-api.web3.storage') // TODO: get production did -export const identity = Authority.parse( +export const identity = Principal.parse( 'did:key:z6MkkHafoFWxxWVNpNXocFdU6PL2RVLyTEgS1qTnD3bRP7V9' ) diff --git a/packages/access/src/types.ts b/packages/access/src/types.ts index 32385a5e4..7878d6d78 100644 --- a/packages/access/src/types.ts +++ b/packages/access/src/types.ts @@ -6,9 +6,11 @@ import type { RequestEncoder, ResponseDecoder, ServiceMethod, - SigningAuthority, - UCAN, + SigningPrincipal, + Principal, } from '@ucanto/interface' + +import * as UCAN from '@ipld/dag-ucan' import type { IdentityIdentify, IdentityRegister, @@ -34,8 +36,8 @@ export interface Service { export interface ValidateOptions { url?: URL - audience?: UCAN.Identity - issuer: SigningAuthority + audience?: Principal + issuer: SigningPrincipal with?: UCAN.DID caveats: { as: `mailto:${string}` @@ -52,8 +54,8 @@ export interface ValidateOptions { export interface RegisterOptions { url?: URL - audience?: UCAN.Identity - issuer: SigningAuthority + audience?: Principal + issuer: SigningPrincipal with?: `mailto:${string}` caveats?: { as: UCAN.DID @@ -68,8 +70,26 @@ export interface RegisterOptions { 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: SigningAuthority + issuer: SigningPrincipal signal?: AbortSignal } diff --git a/packages/access/test/awake-channel.test.js b/packages/access/test/awake-channel.test.js new file mode 100644 index 000000000..09db1a276 --- /dev/null +++ b/packages/access/test/awake-channel.test.js @@ -0,0 +1,177 @@ +import assert from 'assert/strict' +import { Channel } from '../src/awake/channel.js' +import { EcdhKeypair } from '../src/crypto/p256-ecdh.js' +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' + +describe('awake channel', function () { + const host = new URL('ws://127.0.0.1:8788/connect') + /** @type {import('http').Server} */ + let server + + /** @type {Channel} */ + let ws1 + /** @type {Channel} */ + let ws2 + + this.beforeAll(async () => { + server = await getWebsocketServer() + }) + + this.afterAll(() => { + server.close() + }) + + this.beforeEach(async () => { + ws1 = await new Channel(host, 'test', await EcdhKeypair.create()).open() + ws2 = await new Channel(host, 'test', await EcdhKeypair.create()).open() + }) + this.afterEach(async () => { + await ws1.close() + await ws2.close() + }) + + it('should fail send with ws not open', async function () { + await ws1.close() + + try { + ws1.send({ + type: 'awake/init', + }) + assert.fail('should not send msg ws is closed') + } catch (error) { + // @ts-ignore + assert.deepEqual(error.message, 'Websocket is not active.') + } + }) + + describe('pubsub', function () { + it('should send msg receive with sub', async function () { + let done = false + ws2.subscribe('awake/init', (data) => { + assert.deepEqual(data, { type: 'awake/init' }) + done = true + }) + await ws1.send({ + type: 'awake/init', + }) + + await pWaitFor(() => done) + }) + + it('should send two msgs receive with sub', async function () { + let done = 0 + ws2.subscribe('awake/init', (data) => { + done++ + }) + await ws1.send({ + type: 'awake/init', + }) + await ws1.send({ + type: 'awake/init', + }) + + await pWaitFor(() => done === 2) + }) + + it('should send two msgs receive once with sub', async function () { + let done = 0 + let once = 0 + ws2.subscribe( + 'awake/init', + () => { + once++ + }, + true + ) + ws2.subscribe('awake/init', () => { + done++ + }) + await ws1.send({ + type: 'awake/init', + }) + await ws1.send({ + type: 'awake/init', + }) + + await pWaitFor(() => done === 2) + assert.equal(once, 1) + }) + }) + + describe('awake/res', function () { + it('should send awake/res', async function () { + const ucan = await UCAN.issue({ + issuer: await SigningPrincipal.generate(), + audience: DID.parse(ws2.keypair.did), + capabilities: [{ with: 'awake:', can: '*' }], + }) + const did1 = DID.parse(ws1.keypair.did) + const did2 = DID.parse(ws2.keypair.did) + await ws1.sendRes(did2, ucan) + const msg = await ws2.awaitRes() + + assert.deepEqual(msg.aud, did2) + assert.deepEqual(msg.iss, did1) + }) + + it('should fail with wrong aud awake/res', async function () { + const ucan = await UCAN.issue({ + issuer: await SigningPrincipal.generate(), + audience: DID.parse(ws2.keypair.did), + capabilities: [{ with: 'awake:', can: '*' }], + }) + const did1 = DID.parse(ws1.keypair.did) + // const did2 = DID.parse(ws2.keypair.did) + await ws1.sendRes(did1, ucan) + + return assert.rejects(ws2.awaitRes(), { + name: 'OperationError', + message: 'The operation failed for an operation-specific reason', + }) + }) + }) + + describe('awake/init', function () { + it('should send init', async function () { + await ws1.sendInit([{ can: '*', with: 'did:' }]) + + const msg = await ws2.awaitInit() + assert.deepEqual(msg.type, 'awake/init') + }) + + it('should send awake/init', async function () { + ws1.sendInit([{ with: 'did:key:zdd', can: '*' }]) + + const msg = await ws2.awaitInit() + assert.deepEqual(msg, { + awv: '0.1.0', + type: 'awake/init', + did: DID.parse(ws1.keypair.did), + caps: [{ with: 'did:key:zdd', can: '*' }], + }) + }) + + it('should fail to parse awake/init', async function () { + // @ts-expect-error + ws1.sendInit([{ with: 'did:key:zdd', WRONG: '*' }]) + + return assert.rejects(ws2.awaitInit(), (err) => { + const msg = JSON.parse(/** @type {Error} */ (err).message) + assert.deepEqual(msg, [ + { + code: 'invalid_type', + expected: 'string', + message: 'Required', + path: ['caps', 0, 'can'], + received: 'undefined', + }, + ]) + return true + }) + }) + }) +}) diff --git a/packages/access/test/awake.test.js b/packages/access/test/awake.test.js new file mode 100644 index 000000000..4c03fe8f8 --- /dev/null +++ b/packages/access/test/awake.test.js @@ -0,0 +1,106 @@ +/* eslint-disable no-console */ +import assert from 'assert' +import { Channel } from '../src/awake/channel.js' +import { EcdhKeypair } from '../src/crypto/p256-ecdh.js' +import { getWebsocketServer } from './helpers/miniflare.js' +import PQueue from 'p-queue' +import delay from 'delay' +import pWaitFor from 'p-wait-for' +import { Agent } from '../src/agent.js' +import * as Ed25519Signer from '../src/principal/signer-ed25519.js' + +describe('awake', function () { + const host = new URL('ws://127.0.0.1:8788/connect') + /** @type {import('http').Server} */ + let server + + /** @type {Channel} */ + let ws1 + /** @type {Channel} */ + let ws2 + + this.beforeAll(async () => { + server = await getWebsocketServer() + }) + + this.afterAll(() => { + server.close() + }) + + this.beforeEach(async () => { + ws1 = await new Channel(host, 'test', await EcdhKeypair.create()).open() + ws2 = await new Channel(host, 'test', await EcdhKeypair.create()).open() + }) + + this.afterEach(async () => { + await ws1.close() + await ws2.close() + }) + + it('should send msgs', async function () { + const agent1 = await Agent.generate(await Ed25519Signer.generate()) + const agent2 = await Agent.generate(await Ed25519Signer.generate()) + const responder = agent1.peer(ws1) + const requestor = agent2.peer(ws2) + + const queue = new PQueue({ concurrency: 2 }) + queue.on('error', (error) => { + console.error(error) + }) + + /** + * @type {string | undefined} + */ + let pin + /** + * @type {{delegation: import('@ucanto/interface').Delegation, meta: import('../src/awake/types.js').PeerMeta}} + */ + let link + queue.add(async () => responder.awaitBootstrap(), { priority: 0 }) + queue.add(() => delay(300), { priority: 1 }) + await queue.add( + async () => { + pin = await requestor.bootstrap([ + { with: responder.did, can: 'identity/*' }, + ]) + }, + { priority: 2 } + ) + assert.ok(pin) + queue.add(async () => { + await requestor.awaitAck() + }) + + // wait ack + await queue.add(async () => { + // @ts-ignore + await responder.ack(pin) + }) + + queue.add(async () => { + await responder.awaitLink() + }) + + queue.add(async () => { + link = await requestor.link({ + caps: [{ can: 'identity/*' }], + meta: { + name: requestor.did, + type: 'device', + }, + }) + }) + + await queue.onIdle() + // @ts-ignore + if (link) { + assert.deepEqual(requestor.did, link.delegation.audience.did()) + assert.deepEqual(responder.did, link.delegation.capabilities[0].with) + assert.deepEqual('identity/*', link.delegation.capabilities[0].can) + } + + // they should close channel after link + await pWaitFor(() => responder.channel.ws?.readyState === 3) + await pWaitFor(() => responder.channel.ws?.readyState === 3) + }) +}) diff --git a/packages/access/test/helpers/miniflare.js b/packages/access/test/helpers/miniflare.js new file mode 100644 index 000000000..840a80580 --- /dev/null +++ b/packages/access/test/helpers/miniflare.js @@ -0,0 +1,24 @@ +import { Miniflare } from 'miniflare' +import path from 'path' +import { fileURLToPath } from 'url' +const __dirname = path.dirname(fileURLToPath(import.meta.url)) + +export function getWebsocketServer() { + const mf = new Miniflare({ + packagePath: path.join(__dirname, '../../../access-ws/package.json'), + wranglerConfigPath: path.join( + __dirname, + '../../../access-ws/wrangler.toml' + ), + sourceMap: true, + modules: true, + // log: new Log(LogLevel.DEBUG), + buildCommand: undefined, + port: 8788, + bindings: { + ENV: 'test', + }, + }) + + return mf.startServer() +} diff --git a/packages/access/tsconfig.json b/packages/access/tsconfig.json index 599c71cc5..180297270 100644 --- a/packages/access/tsconfig.json +++ b/packages/access/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "dist", - "lib": ["ESNext"], + "lib": ["ESNext", "DOM"], "emitDeclarationOnly": true }, "include": ["src", "scripts", "test", "package.json"], diff --git a/packages/sigv4/package.json b/packages/sigv4/package.json index b57c67404..6cb98649f 100644 --- a/packages/sigv4/package.json +++ b/packages/sigv4/package.json @@ -15,7 +15,7 @@ }, "scripts": { "check": "tsc --build", - "lint": "tsc && eslint '**/*.{js,ts}' && prettier --check '**/*.{js,ts,md,yml,json}' --ignore-path ../../.gitignore", + "lint": "tsc && eslint '**/*.{js,ts}' && prettier --check '**/*.{js,ts,yml,json}' --ignore-path ../../.gitignore", "test:node": "DOTENV_CONFIG_PATH=../../.env mocha -r dotenv/config", "test:web": "pw-test test", "testw": "watch 'pnpm test' src test --interval 1" @@ -29,15 +29,16 @@ "@noble/hashes": "^1.0.0" }, "devDependencies": { - "@types/mocha": "^9.1.1", "@types/chai": "^4.3.3", + "@types/mocha": "^9.1.1", "@types/node": "^18.7.18", "@web-std/fetch": "^4.1.0", "assert": "^2.0.0", + "chai": "^4.3.6", + "hd-scripts": "^2.1.0", "delay": "^5.0.0", "dotenv": "^16.0.0", - "mocha": "^9.2.2", - "chai": "^4.3.6", + "mocha": "^10.0.0", "playwright-test": "^8.1.1", "watch": "^1.0.2" }, diff --git a/packages/sigv4/tsconfig.json b/packages/sigv4/tsconfig.json index da34a0e50..599c71cc5 100644 --- a/packages/sigv4/tsconfig.json +++ b/packages/sigv4/tsconfig.json @@ -1,100 +1,10 @@ { + "extends": "../../tsconfig.json", "compilerOptions": { - /* Visit https://aka.ms/tsconfig.json to read more about this file */ - /* Projects */ - "incremental": true, /* Enable incremental compilation */ - "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ - // "tsBuildInfoFile": "./dist", /* Specify the folder for .tsbuildinfo incremental compilation files. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */ - // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ - // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ - /* Language and Environment */ - "target": "ES2020", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ - // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ - // "jsx": "preserve", /* Specify what JSX code is generated. */ - // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ - // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ - // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */ - // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ - // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */ - // "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */ - // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ - // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ - /* Modules */ - "module": "ES2020", /* Specify what module code is generated. */ - // "rootDir": "./", /* Specify the root folder within your source files. */ - "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ - "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ - // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ - // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */ - // "types": [], /* Specify type package names to be included without being referenced in a source file. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - // "resolveJsonModule": true, /* Enable importing .json files */ - // "noResolve": true, /* Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project. */ - /* JavaScript Support */ - "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ - "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ - // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ - /* Emit */ - // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ - "declarationMap": true, /* Create sourcemaps for d.ts files. */ - "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ - // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ - // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */ - "outDir": "./dist/", /* Specify an output folder for all emitted files. */ - // "removeComments": true, /* Disable emitting comments. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ - // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ - // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */ - // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ - // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ - // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Set the newline character for emitting files. */ - // "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */ - // "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */ - // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ - // "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */ - // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ - // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ - /* Interop Constraints */ - // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ - // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ - // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ - "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ - /* Type Checking */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */ - // "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */ - // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ - // "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */ - // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ - // "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */ - // "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */ - // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ - // "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */ - // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */ - // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ - // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ - // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ - // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ - // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ - // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */ - // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ - // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ - /* Completeness */ - // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ + "outDir": "dist", + "lib": ["ESNext"], + "emitDeclarationOnly": true }, - "include": [ - "src", - "test" - ], - "references": [ - - ] + "include": ["src", "scripts", "test", "package.json"], + "exclude": ["**/node_modules/**"] } diff --git a/packages/store/package.json b/packages/store/package.json index 4f81ccc41..7d21b5bb7 100644 --- a/packages/store/package.json +++ b/packages/store/package.json @@ -21,29 +21,30 @@ "test": "npm run test:node", "test:node": "mocha test", "test:browser": "pw-test test", - "testw": "watch 'pnpm test' src test --interval 1" + "testw": "watch 'pnpm test' src test --interval 1", + "lint": "tsc --build && eslint '**/*.{js,ts}' && prettier --check '**/*.{js,ts,yml,json}' --ignore-path ../../.gitignore" }, "dependencies": { - "@ucanto/server": "^0.7.0", - "@ucanto/client": "^0.6.0", - "@ucanto/interface": "^0.7.0", - "multiformats": "^9.7.0", - "@web3-storage/sigv4": "^1.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", "@web-std/fetch": "^4.1.0", - "@ucanto/transport": "^0.7.0", - "@ucanto/authority": "^0.5.0", - "@ucanto/core": "^0.6.0" + "@web3-storage/sigv4": "^1.0.0", + "multiformats": "^9.7.0" }, "devDependencies": { - "typescript": "^4.8.3", - "@types/mocha": "^9.1.0", "@types/chai": "^4.3.0", "@types/chai-subset": "^1.3.3", - "mocha": "^9.2.2", + "@types/mocha": "^9.1.0", "chai": "^4.3.6", "chai-subset": "^1.6.0", + "hd-scripts": "^2.1.0", + "mocha": "^10.0.0", "playwright-test": "^8.1.1", - "hd-scripts": "^2.1.0" + "typescript": "^4.8.3" }, "exports": { ".": { @@ -67,8 +68,10 @@ "project": "./tsconfig.json" }, "rules": { - "unicorn/no-null": 0, - "no-unused-vars": 0 + "unicorn/no-null": "off", + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": "off", + "unicorn/no-empty-file": "off" }, "env": { "mocha": true diff --git a/packages/store/src/accounting/lib.js b/packages/store/src/accounting/lib.js index fc87f9720..bb03f32de 100644 --- a/packages/store/src/accounting/lib.js +++ b/packages/store/src/accounting/lib.js @@ -14,7 +14,7 @@ export const create = ({ db = new Map(), cars = new Map() } = {}) => ({ /** * @param {API.DID} group * @param {API.Accounting.Link} link - * @param {API.LinkedProof} proof + * @param {API.UCANLink} proof */ async add(group, link, proof) { const [members, have] = await Promise.all([ @@ -34,7 +34,7 @@ export const create = ({ db = new Map(), cars = new Map() } = {}) => ({ /** * @param {API.DID} group * @param {API.Accounting.Link} link - * @param {API.LinkedProof} proof + * @param {API.UCANLink} proof */ async remove(group, link, proof) { const members = await db.get(group) @@ -45,7 +45,7 @@ export const create = ({ db = new Map(), cars = new Map() } = {}) => ({ }, /** * @param {API.DID} group - * @param {API.LinkedProof} proof + * @param {API.UCANLink} proof */ async list(group, proof) { const members = await db.get(group) diff --git a/packages/store/src/identity/capability.js b/packages/store/src/identity/capability.js index 260aa4a23..69ec16468 100644 --- a/packages/store/src/identity/capability.js +++ b/packages/store/src/identity/capability.js @@ -24,18 +24,14 @@ const equalWith = (claimed, delegated) => */ const derivesURIPattern = (claimed, delegated) => { if (delegated.endsWith('*')) { - if (claimed.startsWith(delegated.slice(0, -1))) { - return true - } else { - return new Failure(`${claimed} does not match ${delegated}`) - } + return claimed.startsWith(delegated.slice(0, -1)) + ? true + : new Failure(`${claimed} does not match ${delegated}`) } - if (claimed === delegated) { - return true - } else { - return new Failure(`${claimed} is differnt from ${delegated}`) - } + return claimed === delegated + ? true + : new Failure(`${claimed} is differnt from ${delegated}`) } export const Validate = capability({ diff --git a/packages/store/src/identity/lib.js b/packages/store/src/identity/lib.js index 2b67033d0..b8dcfc071 100644 --- a/packages/store/src/identity/lib.js +++ b/packages/store/src/identity/lib.js @@ -1,13 +1,13 @@ -export * from './capability.js' import * as Provider from './provider.js' import * as API from '../type.js' -import { SigningAuthority, Authority } from '@ucanto/authority' +import { SigningPrincipal, Principal } from '@ucanto/principal' 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 '@ucanto/server' import * as Client from '@ucanto/client' import webfetch from '@web-std/fetch' +export * from './capability.js' /** * @param {object} options @@ -16,7 +16,7 @@ import webfetch from '@web-std/fetch' * @param {Provider.Email} [options.email] */ export const create = ({ keypair, db = new Map(), email = mail }) => { - const id = SigningAuthority.parse(keypair) + const id = SigningPrincipal.parse(keypair) const provider = Provider.create({ id, db, @@ -34,7 +34,7 @@ export const create = ({ keypair, db = new Map(), email = mail }) => { handleRequest: service.request.bind(service), connect: () => Client.connect({ - id: id.authority, + id: id.principal, encoder: CAR, decoder: CBOR, channel: service, @@ -59,7 +59,7 @@ export const connect = ({ method, }) => Client.connect({ - id: Authority.parse(id), + id: Principal.parse(id), ...transport, channel: HTTP.open({ url, @@ -71,6 +71,7 @@ export const connect = ({ /** @type {Provider.Email} */ const mail = { send(to, token) { + // eslint-disable-next-line no-console console.log( `Emailing registration token to mailto:${to}?subject=Verification&body=${token}\n` ) diff --git a/packages/store/src/identity/provider.js b/packages/store/src/identity/provider.js index 55d83aff6..9505fadc0 100644 --- a/packages/store/src/identity/provider.js +++ b/packages/store/src/identity/provider.js @@ -2,32 +2,32 @@ import * as Capability from './capability.js' import * as Server from '@ucanto/server' import { delegate } from '@ucanto/client' import * as API from '../type.js' -import { Authority } from '@ucanto/server' +import { Principal } from '@ucanto/server' /** - * @typedef {{account:API.DID, proof:Server.LinkedProof}} AccountLink + * @typedef {{account:API.DID, proof:Server.UCANLink}} AccountLink * @typedef {{ - * set: (key:string, value:AccountLink) => API.Await - * get: (key:string) => API.Await + * set: (key:string, value:AccountLink) => API.Await + * get: (key:string) => API.Await * }} DB * @typedef {{ - * send: (to:string, token:string) => API.Await + * send: (to:string, token:string) => API.Await * }} Email * @typedef {{ - * id: API.SigningAuthority + * id: API.SigningPrincipal * db: DB * email: Email * }} Context * * @param {Context} context - * @return {{identity: API.Identity.Identity}} + * @returns {{identity: API.Identity.Identity}} */ export const create = ({ id, db, email }) => ({ identity: { validate: Server.provide(Capability.Validate, async ({ capability }) => { const delegation = await delegate({ issuer: id, - audience: Authority.parse(capability.with), + audience: Principal.parse(capability.with), capabilities: [ { can: 'identity/register', @@ -65,13 +65,15 @@ export const create = ({ id, db, email }) => ({ Capability.Link, async ({ capability, invocation }) => { const id = /** @type {API.Identity.ID} */ (capability.uri.href) - if ( - await associate(db, capability.caveats.as, id, invocation.cid, false) - ) { - return null - } else { - return new NotRegistered([invocation.issuer.did(), id]) - } + return (await associate( + db, + capability.caveats.as, + id, + invocation.cid, + false + )) + ? null + : new NotRegistered([invocation.issuer.did(), id]) } ), identify: Server.provide(Capability.Identify, async ({ capability }) => { @@ -86,7 +88,7 @@ export const create = ({ id, db, email }) => ({ * @param {DB} db * @param {API.Identity.ID} from * @param {API.Identity.ID} to - * @param {API.LinkedProof} proof + * @param {API.UCANLink} proof * @param {boolean} create * @returns {Promise} */ @@ -159,22 +161,24 @@ export class NotRegistered { constructor(ids) { this.ids = ids } + get message() { - if (this.ids.length > 1) { - return `No account is registered with such identifiers:\n - ${this.ids.join( - '\n - ' - )}` - } else { - return `No account is registered for ${this.ids[0]}` - } + return this.ids.length > 1 + ? `No account is registered with such identifiers:\n - ${this.ids.join( + '\n - ' + )}` + : `No account is registered for ${this.ids[0]}` } + get error() { return /** @type {true} */ (true) } + /** @type {"NotRegistered"} */ get name() { return 'NotRegistered' } + toJSON() { const { name, message, ids, error } = this diff --git a/packages/store/src/signer/lib.js b/packages/store/src/signer/lib.js index 04e4eb567..a066d9f42 100644 --- a/packages/store/src/signer/lib.js +++ b/packages/store/src/signer/lib.js @@ -5,7 +5,7 @@ import * as API from './type.js' /** * @param {API.Link} link * @param {API.SignOptions} options - * @return {{url:URL, headers:Record}} + * @returns {{url:URL, headers:Record}} */ export const sign = (link, { bucket, expires = 1000, ...options }) => { // sigv4 @@ -19,7 +19,7 @@ export const sign = (link, { bucket, expires = 1000, ...options }) => { const checksum = base64pad.baseEncode(link.multihash.digest) const url = sig.sign({ key: `${link}/${link}.car`, - checksum: checksum, + checksum, bucket, expires, }) diff --git a/packages/store/src/store/lib.js b/packages/store/src/store/lib.js index d85aff88b..2aa6be6b8 100644 --- a/packages/store/src/store/lib.js +++ b/packages/store/src/store/lib.js @@ -1,13 +1,13 @@ -import * as Provider from './provider.js' -import { SigningAuthority, Authority } from '@ucanto/authority' -export * from './capability.js' -import * as API from '../type.js' +import { Principal, SigningPrincipal } from '@ucanto/principal' +import * as Client from '@ucanto/client' import * as Service from '@ucanto/server' import * as CAR from '@ucanto/transport/car' import * as CBOR from '@ucanto/transport/cbor' import * as HTTP from '@ucanto/transport/http' import webfetch from '@web-std/fetch' -import * as Client from '@ucanto/client' +import * as API from '../type.js' +import * as Provider from './provider.js' +export * from './capability.js' /** * @param {object} options @@ -26,7 +26,7 @@ export const create = ({ transport = { decoder: CAR, encoder: CBOR }, validator = {}, }) => { - const id = SigningAuthority.parse(keypair) + const id = SigningPrincipal.parse(keypair) const provider = Provider.create({ id, identity, @@ -37,7 +37,7 @@ export const create = ({ const service = Service.create({ ...transport, ...validator, - id: id.authority, + id: id.principal, service: provider, }) @@ -45,7 +45,7 @@ export const create = ({ handleRequest: service.request.bind(service), connect: () => { Client.connect({ - id: id.authority, + id: id.principal, encoder: CAR, decoder: CBOR, channel: service, @@ -71,7 +71,7 @@ export const connect = ({ method, }) => Client.connect({ - id: Authority.parse(id), + id: Principal.parse(id), ...transport, channel: HTTP.open({ url, diff --git a/packages/store/src/type.ts b/packages/store/src/type.ts index 28e48a992..9ddd20975 100644 --- a/packages/store/src/type.ts +++ b/packages/store/src/type.ts @@ -1,6 +1,6 @@ export * from '@ucanto/interface' -export * as Identity from './type/identity' -export * as Accounting from './type/accounting' -export * as Store from './type/store' -export * as Error from './type/error' -export * from './signer/type' +export * as Identity from './type/identity.js' +export * as Accounting from './type/accounting.js' +export * as Store from './type/store.js' +export * as Error from './type/error.js' +export * from './signer/type.js' diff --git a/packages/store/src/type/accounting.ts b/packages/store/src/type/accounting.ts index c6f66cbb9..967e687c2 100644 --- a/packages/store/src/type/accounting.ts +++ b/packages/store/src/type/accounting.ts @@ -1,10 +1,10 @@ -import { DID, LinkedProof, Result, Await } from "@ucanto/interface" -import * as API from "@ucanto/interface" -import { ServiceError } from "./error" +import { DID, UCANLink, Result, Await } from '@ucanto/interface' +import * as API from '@ucanto/interface' +import { ServiceError } from './error.js' export type Error = QuotaViolationError export interface QuotaViolationError - extends ServiceError<"QuotaViolationError", QuotaViolationError> {} + extends ServiceError<'QuotaViolationError', QuotaViolationError> {} export interface Link< T extends unknown = unknown, @@ -23,17 +23,21 @@ export interface Provider { * @param link * @param proof */ - add( + add: ( group: DID, link: Link, - proof: LinkedProof - ): Await> + proof: UCANLink + ) => Await> - remove(group: DID, link: Link, proof: LinkedProof): Await> + remove: ( + group: DID, + link: Link, + proof: UCANLink + ) => Await> - list(group: DID, proof: LinkedProof): Await> + list: (group: DID, proof: UCANLink) => Await> } interface LinkState { - status: "in-s3" | "not-in-s3" + status: 'in-s3' | 'not-in-s3' } diff --git a/packages/store/src/type/error.ts b/packages/store/src/type/error.ts index b0145811a..8df00c4de 100644 --- a/packages/store/src/type/error.ts +++ b/packages/store/src/type/error.ts @@ -5,14 +5,14 @@ export interface ServiceError< readonly name: Name readonly message: string readonly error: true - toJSON(): JSONObject + toJSON: () => JSONObject } export type ToJSON = T extends undefined ? never : T extends number | null | string | boolean ? T - : T extends { toJSON(): infer U } + : T extends { toJSON: () => infer U } ? ToJSON : T extends Array ? Array> diff --git a/packages/store/src/type/sketch.ts b/packages/store/src/type/sketch.ts index 92eeb805b..a21199599 100644 --- a/packages/store/src/type/sketch.ts +++ b/packages/store/src/type/sketch.ts @@ -1,27 +1,16 @@ import type { - Link, - Block, - ServerView, - ConnectionView, - SigningAuthority, - Audience, - MalformedCapability, - InvocationError, - ServiceMethod, - Capability, Ability, - Caveats, - Result, - Resource, + Await, + Capability, CapabilityMatch, + Caveats, + Invocation, + InvocationError, Match, + ParsedCapability, + ServiceMethod, TheCapabilityParser, - Await, URI, - API, - ParsedCapability, - InferCaveats, - Invocation, } from '@ucanto/interface' import { ProviderContext } from '@ucanto/server' @@ -45,32 +34,30 @@ interface Route< handler: CapabilityHandler } -interface CapabilityHandler< +type CapabilityHandler< T extends ParsedCapability, O extends unknown = unknown, CTX extends {} = {} -> { - ( - input: { - capability: T - invocation: Invocation & T['caveats']> - }, - context: CTX - ): Await -} +> = ( + input: { + capability: T + invocation: Invocation & T['caveats']> + }, + context: CTX +) => Await interface Service { routes: T - provide( + provide: ( capability: TheCapabilityParser>, handler: CapabilityHandler - ): Service }> + ) => Service }> - invoke>( + invoke: >( capability: C, context: ServiceContext - ): ReturnType + ) => ReturnType capability: ServiceCapability context: ServiceContext @@ -118,7 +105,9 @@ interface Server { capability: InferCapability - invoke>(capbility: C): ReturnType + invoke: >( + capbility: C + ) => ReturnType } type InferCapability = { diff --git a/packages/store/src/type/store.ts b/packages/store/src/type/store.ts index 974d321c2..ba41ebf35 100644 --- a/packages/store/src/type/store.ts +++ b/packages/store/src/type/store.ts @@ -1,19 +1,16 @@ -import * as Server from '@ucanto/server' import type { - ServerView, ConnectionView, - SigningAuthority, - Audience, - MalformedCapability, InvocationError, - UCAN, + MalformedCapability, + SigningPrincipal, } from '@ucanto/interface' -import type { Capability, ServiceMethod, DID, Failure } from '@ucanto/server' -import * as Accounting from './accounting' -import * as Identity from './identity' -import * as Signer from '../signer/type' import * as API from '@ucanto/interface' +import type { Capability, DID, ServiceMethod } from '@ucanto/server' +import * as Server from '@ucanto/server' import * as CAR from '@ucanto/transport/car' +import * as Signer from '../signer/type.js' +import * as Accounting from './accounting.js' +import * as Identity from './identity.js' export interface Link< T extends unknown = unknown, @@ -23,10 +20,10 @@ export interface Link< > extends API.Link {} export interface StoreService { - start(options: ServiceOptions): Server.ServerView + start: (options: ServiceOptions) => Server.ServerView } export interface ServiceOptions { - id: SigningAuthority + id: SigningPrincipal identity: ConnectionView<{ identity: Identity.Identity }> accounting: Accounting.Provider diff --git a/packages/store/test/fixtures.js b/packages/store/test/fixtures.js index e014dedab..197b8d98a 100644 --- a/packages/store/test/fixtures.js +++ b/packages/store/test/fixtures.js @@ -1,18 +1,18 @@ -import { SigningAuthority } from "@ucanto/authority" +import { SigningPrincipal } from '@ucanto/principal' /** did:key:z6Mkqa4oY9Z5Pf5tUcjLHLUsDjKwMC95HGXdE1j22jkbhz6r */ -export const alice = SigningAuthority.parse( - "MgCZT5vOnYZoVAeyjnzuJIVY9J4LNtJ+f8Js0cTPuKUpFne0BVEDJjEu6quFIU8yp91/TY/+MYK8GvlKoTDnqOCovCVM=" +export const alice = SigningPrincipal.parse( + 'MgCZT5vOnYZoVAeyjnzuJIVY9J4LNtJ+f8Js0cTPuKUpFne0BVEDJjEu6quFIU8yp91/TY/+MYK8GvlKoTDnqOCovCVM=' ) /** did:key:z6MkffDZCkCTWreg8868fG1FGFogcJj5X6PY93pPcWDn9bob */ -export const bob = SigningAuthority.parse( - "MgCYbj5AJfVvdrjkjNCxB3iAUwx7RQHVQ7H1sKyHy46Iose0BEevXgL1V73PD9snOCIoONgb+yQ9sycYchQC8kygR4qY=" +export const bob = SigningPrincipal.parse( + 'MgCYbj5AJfVvdrjkjNCxB3iAUwx7RQHVQ7H1sKyHy46Iose0BEevXgL1V73PD9snOCIoONgb+yQ9sycYchQC8kygR4qY=' ) /** did:key:z6MktafZTREjJkvV5mfJxcLpNBoVPwDLhTuMg9ng7dY4zMAL */ -export const mallory = SigningAuthority.parse( - "MgCYtH0AvYxiQwBG6+ZXcwlXywq9tI50G2mCAUJbwrrahkO0B0elFYkl3Ulf3Q3A/EvcVY0utb4etiSE8e6pi4H0FEmU=" +export const mallory = SigningPrincipal.parse( + 'MgCYtH0AvYxiQwBG6+ZXcwlXywq9tI50G2mCAUJbwrrahkO0B0elFYkl3Ulf3Q3A/EvcVY0utb4etiSE8e6pi4H0FEmU=' ) -export const service = SigningAuthority.parse( - "MgCYKXoHVy7Vk4/QjcEGi+MCqjntUiasxXJ8uJKY0qh11e+0Bs8WsdqGK7xothgrDzzWD0ME7ynPjz2okXDh8537lId8=" +export const service = SigningPrincipal.parse( + 'MgCYKXoHVy7Vk4/QjcEGi+MCqjntUiasxXJ8uJKY0qh11e+0Bs8WsdqGK7xothgrDzzWD0ME7ynPjz2okXDh8537lId8=' ) diff --git a/packages/store/test/lib.spec.js b/packages/store/test/lib.spec.js index f0b57fec0..a25800100 100644 --- a/packages/store/test/lib.spec.js +++ b/packages/store/test/lib.spec.js @@ -2,24 +2,24 @@ import { test, assert } from './test.js' import * as Client from '@ucanto/client' import * as CAR from '@ucanto/transport/car' import * as CBOR from '@ucanto/transport/cbor' -import { SigningAuthority } from '@ucanto/authority' +import { SigningPrincipal } from '@ucanto/principal' import { Store, Identity, Accounting } from '../src/lib.js' import { alice, bob, service as validator } from './fixtures.js' import HTTP from 'node:http' test('main', async () => { const s3 = new Map() - const w3 = await SigningAuthority.generate() + const w3 = await SigningPrincipal.generate() // start w3-identity service const identityService = Identity.create({ - keypair: SigningAuthority.format(w3), + keypair: SigningPrincipal.format(w3), }) const identityServer = await listen(identityService) // start w3-store service const storeService = Store.create({ - keypair: SigningAuthority.format(await SigningAuthority.generate()), + keypair: SigningPrincipal.format(await SigningPrincipal.generate()), identity: Identity.connect({ id: w3.did(), url: identityServer.url, @@ -130,6 +130,7 @@ test('main', async () => { link: car.cid, }) + // eslint-disable-next-line unicorn/new-for-builtins assert.match(Object(result).url, /https:.*s3.*amazon/) } diff --git a/packages/store/test/test.js b/packages/store/test/test.js index 1ef8ebd69..54dc0ff24 100644 --- a/packages/store/test/test.js +++ b/packages/store/test/test.js @@ -1,6 +1,7 @@ -import { assert, use } from "chai" -import subset from "chai-subset" +import { use } from 'chai' +import subset from 'chai-subset' use(subset) export const test = it -export { assert } + +export { assert } from 'chai' diff --git a/packages/wallet/package.json b/packages/wallet/package.json index 24b3db342..c49ebaca0 100644 --- a/packages/wallet/package.json +++ b/packages/wallet/package.json @@ -11,18 +11,18 @@ "check": "tsc" }, "dependencies": { - "next": "12.2.5", + "next": "12.3.1", "react": "18.2.0", "react-dom": "18.2.0" }, "devDependencies": { - "@types/node": "^18.7.14", - "@types/react": "^18.0.18", - "eslint": "^8.23.0", - "eslint-config-next": "12.2.5", + "@types/node": "^18.7.18", + "@types/react": "^18.0.20", + "eslint": "^8.23.1", + "eslint-config-next": "12.3.1", "hd-scripts": "^2.1.0", - "typescript": "4.8.2", - "wrangler": "^2.0.28" + "typescript": "4.8.3", + "wrangler": "^2.1.6" }, "eslintConfig": { "extends": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3187ef597..9be4e6c45 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,79 +8,115 @@ importers: prettier: 2.7.1 simple-git-hooks: ^2.8.0 typescript: ^4.8.3 - wrangler: ^2.0.28 + wrangler: ^2.1.6 devDependencies: lint-staged: 13.0.3 prettier: 2.7.1 simple-git-hooks: 2.8.0 typescript: 4.8.3 - wrangler: 2.0.28 + wrangler: 2.1.6 packages/access: specifiers: - '@ipld/dag-ucan': 1.7.0-beta + '@ipld/car': ^4.1.5 + '@ipld/dag-ucan': 3.0.0-beta + '@noble/ed25519': ^1.7.1 '@types/assert': ^1.5.6 + '@types/inquirer': ^9.0.1 '@types/mocha': ^9.1.1 - '@types/node': ^18.7.14 - '@ucanto/authority': ^0.5.0 - '@ucanto/client': ^0.6.0 - '@ucanto/core': ^0.6.0 - '@ucanto/interface': ^0.7.0 - '@ucanto/server': ^0.7.0 - '@ucanto/transport': ^0.7.0 - '@ucanto/validator': ^0.6.0 + '@types/node': ^18.7.18 + '@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.1 '@web-std/fetch': ^4.1.0 assert: ^2.0.0 + bigint-mod-arith: ^3.1.1 conf: ^10.1.2 + delay: ^5.0.0 + dotenv: ^16.0.2 hd-scripts: ^2.1.0 + inquirer: ^9.1.2 + isomorphic-ws: ^5.0.0 + miniflare: ^2.9.0 mocha: ^10.0.0 + multiformats: ^9.8.1 + nanoid: ^4.0.0 + one-webcrypto: ^1.0.3 ora: ^6.1.2 + p-queue: ^7.3.0 p-retry: ^5.1.1 + p-wait-for: ^5.0.0 sade: ^1.7.4 - typescript: 4.8.2 + typescript: 4.8.3 + uint8arrays: ^3.1.0 undici: ^5.10.0 watch: ^1.0.2 - dependencies: - '@ipld/dag-ucan': 1.7.0-beta - '@ucanto/authority': 0.5.0 - '@ucanto/client': 0.6.0 - '@ucanto/core': 0.6.0 - '@ucanto/interface': 0.7.0 - '@ucanto/server': 0.7.0 - '@ucanto/transport': 0.7.0 - '@ucanto/validator': 0.6.0 + ws: ^8.8.1 + zod: ^3.19.1 + dependencies: + '@ipld/car': 4.1.5 + '@ipld/dag-ucan': 3.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.1 '@web-std/fetch': 4.1.0 + bigint-mod-arith: 3.1.1 conf: 10.2.0 + inquirer: 9.1.2 + isomorphic-ws: 5.0.0_ws@8.8.1 + multiformats: 9.9.0 + nanoid: 4.0.0 + one-webcrypto: 1.0.3 ora: 6.1.2 + p-queue: 7.3.0 p-retry: 5.1.1 + p-wait-for: 5.0.0 + uint8arrays: 3.1.0 undici: 5.10.0 + ws: 8.8.1 + zod: 3.19.1 devDependencies: '@types/assert': 1.5.6 + '@types/inquirer': 9.0.1 '@types/mocha': 9.1.1 - '@types/node': 18.7.14 + '@types/node': 18.7.18 assert: 2.0.0 + delay: 5.0.0 + dotenv: 16.0.2 hd-scripts: 2.1.0 + miniflare: 2.9.0 mocha: 10.0.0 sade: 1.8.1 - typescript: 4.8.2 + typescript: 4.8.3 watch: 1.0.2 packages/access-api: specifiers: '@cloudflare/workers-types': ^3.16.0 - '@ipld/dag-ucan': 1.7.0-beta + '@ipld/dag-ucan': 3.0.0-beta '@sentry/cli': ^2.5.2 '@sentry/webpack-plugin': ^1.16.0 '@types/assert': ^1.5.6 '@types/git-rev-sync': ^2.0.0 - '@types/node': ^18.7.14 - '@ucanto/authority': ^0.5.0 - '@ucanto/client': ^0.6.0 - '@ucanto/core': ^0.6.0 - '@ucanto/interface': ^0.7.0 - '@ucanto/server': ^0.7.0 - '@ucanto/transport': ^0.7.0 - '@ucanto/validator': ^0.6.0 + '@types/node': ^18.7.18 + '@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.1 '@web3-storage/access': workspace:^ '@web3-storage/worker-utils': 0.4.3-dev assert: ^2.0.0 @@ -88,31 +124,31 @@ importers: buffer: ^6.0.3 delay: ^5.0.0 dotenv: ^16.0.2 - esbuild: ^0.15.6 + esbuild: ^0.15.8 execa: ^6.1.0 git-rev-sync: ^3.0.1 hd-scripts: ^2.1.0 - miniflare: ^2.7.1 - multiformats: ^9.6.5 + miniflare: ^2.9.0 + multiformats: ^9.8.1 nanoid: ^4.0.0 process: ^0.11.10 readable-stream: ^4.1.0 sade: ^1.7.4 toucan-js: ^2.6.0 - typescript: 4.8.2 - wrangler: ^2.0.28 - dependencies: - '@ipld/dag-ucan': 1.7.0-beta - '@ucanto/authority': 0.5.0 - '@ucanto/client': 0.6.0 - '@ucanto/core': 0.6.0 - '@ucanto/interface': 0.7.0 - '@ucanto/server': 0.7.0 - '@ucanto/transport': 0.7.0 - '@ucanto/validator': 0.6.0 + typescript: 4.8.3 + wrangler: ^2.1.6 + 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.1 '@web3-storage/access': link:../access '@web3-storage/worker-utils': 0.4.3-dev - multiformats: 9.7.1 + multiformats: 9.9.0 nanoid: 4.0.0 toucan-js: 2.6.1 devDependencies: @@ -121,22 +157,85 @@ importers: '@sentry/webpack-plugin': 1.19.0 '@types/assert': 1.5.6 '@types/git-rev-sync': 2.0.0 - '@types/node': 18.7.14 + '@types/node': 18.7.18 assert: 2.0.0 ava: 4.3.3 buffer: 6.0.3 delay: 5.0.0 dotenv: 16.0.2 - esbuild: 0.15.6 + esbuild: 0.15.8 execa: 6.1.0 git-rev-sync: 3.0.2 hd-scripts: 2.1.0 - miniflare: 2.7.1 + miniflare: 2.9.0 process: 0.11.10 readable-stream: 4.1.0 sade: 1.8.1 - typescript: 4.8.2 - wrangler: 2.0.28 + typescript: 4.8.3 + wrangler: 2.1.6 + + packages/access-ws: + specifiers: + '@cloudflare/workers-types': ^3.16.0 + '@sentry/cli': ^2.5.2 + '@sentry/webpack-plugin': ^1.16.0 + '@types/assert': ^1.5.6 + '@types/git-rev-sync': ^2.0.0 + '@types/node': ^18.7.18 + '@types/ws': ^8.5.3 + '@web3-storage/worker-utils': 0.4.3-dev + assert: ^2.0.0 + ava: ^4.3.3 + buffer: ^6.0.3 + delay: ^5.0.0 + dotenv: ^16.0.2 + esbuild: ^0.15.8 + execa: ^6.1.0 + git-rev-sync: ^3.0.1 + hd-scripts: ^2.1.0 + isomorphic-ws: ^5.0.0 + miniflare: ^2.9.0 + multiformats: ^9.8.1 + nanoid: ^4.0.0 + p-wait-for: ^5.0.0 + process: ^0.11.10 + readable-stream: ^4.1.0 + sade: ^1.7.4 + toucan-js: ^2.6.0 + typescript: 4.8.3 + wrangler: ^2.1.6 + ws: ^8.8.1 + dependencies: + '@types/ws': 8.5.3 + '@web3-storage/worker-utils': 0.4.3-dev + isomorphic-ws: 5.0.0_ws@8.8.1 + multiformats: 9.9.0 + nanoid: 4.0.0 + toucan-js: 2.6.1 + ws: 8.8.1 + devDependencies: + '@cloudflare/workers-types': 3.16.0 + '@sentry/cli': 2.5.2 + '@sentry/webpack-plugin': 1.19.0 + '@types/assert': 1.5.6 + '@types/git-rev-sync': 2.0.0 + '@types/node': 18.7.18 + assert: 2.0.0 + ava: 4.3.3 + buffer: 6.0.3 + delay: 5.0.0 + dotenv: 16.0.2 + esbuild: 0.15.8 + execa: 6.1.0 + git-rev-sync: 3.0.2 + hd-scripts: 2.1.0 + miniflare: 2.9.0 + p-wait-for: 5.0.0 + process: 0.11.10 + readable-stream: 4.1.0 + sade: 1.8.1 + typescript: 4.8.3 + wrangler: 2.1.6 packages/sigv4: specifiers: @@ -149,7 +248,8 @@ importers: chai: ^4.3.6 delay: ^5.0.0 dotenv: ^16.0.0 - mocha: ^9.2.2 + hd-scripts: ^2.1.0 + mocha: ^10.0.0 playwright-test: ^8.1.1 watch: ^1.0.2 dependencies: @@ -163,7 +263,8 @@ importers: chai: 4.3.6 delay: 5.0.0 dotenv: 16.0.2 - mocha: 9.2.2 + hd-scripts: 2.1.0 + mocha: 10.0.0 playwright-test: 8.1.1 watch: 1.0.2 @@ -172,31 +273,31 @@ importers: '@types/chai': ^4.3.0 '@types/chai-subset': ^1.3.3 '@types/mocha': ^9.1.0 - '@ucanto/authority': ^0.5.0 - '@ucanto/client': ^0.6.0 - '@ucanto/core': ^0.6.0 - '@ucanto/interface': ^0.7.0 - '@ucanto/server': ^0.7.0 - '@ucanto/transport': ^0.7.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 '@web-std/fetch': ^4.1.0 '@web3-storage/sigv4': ^1.0.0 chai: ^4.3.6 chai-subset: ^1.6.0 hd-scripts: ^2.1.0 - mocha: ^9.2.2 + mocha: ^10.0.0 multiformats: ^9.7.0 playwright-test: ^8.1.1 typescript: ^4.8.3 dependencies: - '@ucanto/authority': 0.5.0 - '@ucanto/client': 0.6.0 - '@ucanto/core': 0.6.0 - '@ucanto/interface': 0.7.0 - '@ucanto/server': 0.7.0 - '@ucanto/transport': 0.7.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 '@web-std/fetch': 4.1.0 '@web3-storage/sigv4': link:../sigv4 - multiformats: 9.7.1 + multiformats: 9.9.0 devDependencies: '@types/chai': 4.3.3 '@types/chai-subset': 1.3.3 @@ -204,34 +305,34 @@ importers: chai: 4.3.6 chai-subset: 1.6.0 hd-scripts: 2.1.0 - mocha: 9.2.2 + mocha: 10.0.0 playwright-test: 8.1.1 typescript: 4.8.3 packages/wallet: specifiers: - '@types/node': ^18.7.14 - '@types/react': ^18.0.18 - eslint: ^8.23.0 - eslint-config-next: 12.2.5 + '@types/node': ^18.7.18 + '@types/react': ^18.0.20 + eslint: ^8.23.1 + eslint-config-next: 12.3.1 hd-scripts: ^2.1.0 - next: 12.2.5 + next: 12.3.1 react: 18.2.0 react-dom: 18.2.0 - typescript: 4.8.2 - wrangler: ^2.0.28 + typescript: 4.8.3 + wrangler: ^2.1.6 dependencies: - next: 12.2.5_biqbaboplfbrettd7655fr4n2y + next: 12.3.1_biqbaboplfbrettd7655fr4n2y react: 18.2.0 react-dom: 18.2.0_react@18.2.0 devDependencies: - '@types/node': 18.7.14 - '@types/react': 18.0.18 - eslint: 8.23.0 - eslint-config-next: 12.2.5_yqf6kl63nyoq5megxukfnom5rm + '@types/node': 18.7.18 + '@types/react': 18.0.20 + eslint: 8.23.1 + eslint-config-next: 12.3.1_irgkl5vooow2ydyo6aokmferha hd-scripts: 2.1.0 - typescript: 4.8.2 - wrangler: 2.0.28 + typescript: 4.8.3 + wrangler: 2.1.6 packages: @@ -247,8 +348,8 @@ packages: '@babel/highlight': 7.18.6 dev: true - /@babel/helper-validator-identifier/7.18.6: - resolution: {integrity: sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==} + /@babel/helper-validator-identifier/7.19.1: + resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==} engines: {node: '>=6.9.0'} dev: true @@ -256,21 +357,21 @@ packages: resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.18.6 + '@babel/helper-validator-identifier': 7.19.1 chalk: 2.4.2 js-tokens: 4.0.0 dev: true - /@babel/runtime-corejs3/7.18.9: - resolution: {integrity: sha512-qZEWeccZCrHA2Au4/X05QW5CMdm4VjUDCrGq5gf1ZDcM4hRqreKrtwAn7yci9zfgAS9apvnsFXiGBHBAxZdK9A==} + /@babel/runtime-corejs3/7.19.1: + resolution: {integrity: sha512-j2vJGnkopRzH+ykJ8h68wrHnEUmtK//E723jjixiAl/PPf6FhqY/vYRcMVlNydRKQjQsTsYEjpx+DZMIvnGk/g==} engines: {node: '>=6.9.0'} dependencies: - core-js-pure: 3.24.1 + core-js-pure: 3.25.2 regenerator-runtime: 0.13.9 dev: true - /@babel/runtime/7.18.9: - resolution: {integrity: sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==} + /@babel/runtime/7.19.0: + resolution: {integrity: sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA==} engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.13.9 @@ -313,8 +414,19 @@ packages: rollup-plugin-node-polyfills: 0.2.1 dev: true - /@esbuild/linux-loong64/0.15.6: - resolution: {integrity: sha512-hqmVU2mUjH6J2ZivHphJ/Pdse2ZD+uGCHK0uvsiLDk/JnSedEVj77CiVUnbMKuU4tih1TZZL8tG9DExQg/GZsw==} + /@esbuild/android-arm/0.15.8: + resolution: {integrity: sha512-CyEWALmn+no/lbgbAJsbuuhT8s2J19EJGHkeyAwjbFJMrj80KJ9zuYsoAvidPTU7BgBf87r/sgae8Tw0dbOc4Q==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dependencies: + esbuild-wasm: 0.15.8 + dev: true + optional: true + + /@esbuild/linux-loong64/0.15.8: + resolution: {integrity: sha512-pE5RQsOTSERCtfZdfCT25wzo7dfhOSlhAXcsZmuvRYhendOv7djcdvtINdnDp2DAjP17WXlBB4nBO6sHLczmsg==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -322,8 +434,8 @@ packages: dev: true optional: true - /@eslint/eslintrc/1.3.1: - resolution: {integrity: sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==} + /@eslint/eslintrc/1.3.2: + resolution: {integrity: sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 @@ -339,8 +451,8 @@ packages: - supports-color dev: true - /@humanwhocodes/config-array/0.10.4: - resolution: {integrity: sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==} + /@humanwhocodes/config-array/0.10.5: + resolution: {integrity: sha512-XVVDtp+dVvRxMoxSiSfasYaG02VEe1qH5cKgMQJWhol6HwzbcqoCMJi8dAGoYAO57jhUyhI6cWuRiTcRaDaYug==} engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 1.2.1 @@ -367,35 +479,35 @@ packages: resolution: {integrity: sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==} dev: true - /@ipld/car/4.1.4: - resolution: {integrity: sha512-qJs1DoHklninRmwVfyQrp9+wDLIo4JAhkXBx6XSA9fsvAELA0WJOc2bNL6G2zg0MQQPrr5XEJd72ft1apWwMng==} + /@ipld/car/4.1.5: + resolution: {integrity: sha512-PFj4XsKOsxu5h12JUoBJ+mrAVqeA8YYq2bZbcE2sAIopJTwJIB5sBVTmc8ylkUsFXEysZQ4xQD+rZb3Ct0lbjQ==} dependencies: - '@ipld/dag-cbor': 7.0.2 - cborg: 1.9.4 - multiformats: 9.7.1 + '@ipld/dag-cbor': 7.0.3 + cborg: 1.9.5 + multiformats: 9.9.0 varint: 6.0.0 dev: false - /@ipld/dag-cbor/7.0.2: - resolution: {integrity: sha512-V9EhJVWXqzjjRs0kiZfUXOaq8y6R2C4AAmfGoMeszqGOBgfACr5tFAgAwZY0e8z/OpmJWpCrZhzPRTZV0c/gjA==} + /@ipld/dag-cbor/7.0.3: + resolution: {integrity: sha512-1VVh2huHsuohdXC1bGJNE8WR72slZ9XE2T3wbBBq31dm7ZBatmKLLxrB+XAqafxfRFjv08RZmj/W/ZqaM13AuA==} dependencies: - cborg: 1.9.4 - multiformats: 9.7.1 + cborg: 1.9.5 + multiformats: 9.9.0 dev: false - /@ipld/dag-json/8.0.10: - resolution: {integrity: sha512-fny24vxVtgAv7aKmAikZq86kikp56knZL/77eyXUsrgGRGtkx9D1awemKbhIVw/7S5nBbP43m/AZwxNPVpP5eg==} + /@ipld/dag-json/8.0.11: + resolution: {integrity: sha512-Pea7JXeYHTWXRTIhBqBlhw7G53PJ7yta3G/sizGEZyzdeEwhZRr0od5IQ0r2ZxOt1Do+2czddjeEPp+YTxDwCA==} dependencies: - cborg: 1.9.4 - multiformats: 9.7.1 + cborg: 1.9.5 + multiformats: 9.9.0 dev: false - /@ipld/dag-ucan/1.7.0-beta: - resolution: {integrity: sha512-QLGz2IyAiNlT09pwvC2RnZJ2dyUqil5aRN2KLvGpShaTWGlCpCFGJzkn9M1kA04M96S3pJaIV2uxPBSVnjgvcg==} + /@ipld/dag-ucan/3.0.0-beta: + resolution: {integrity: sha512-WzKh4mDiUElslfI/cg9VjLNHsT+9r3XjwbDY/gck+1289sCU1Hywj1/9PMx0DMJoEEwd2OFy/bq5PX2IyQ20Cw==} dependencies: - '@ipld/dag-cbor': 7.0.2 - '@ipld/dag-json': 8.0.10 - multiformats: 9.7.1 + '@ipld/dag-cbor': 7.0.3 + '@ipld/dag-json': 8.0.11 + multiformats: 9.9.0 dev: false /@istanbuljs/schema/0.1.3: @@ -419,31 +531,32 @@ packages: '@jridgewell/sourcemap-codec': 1.4.14 dev: true - /@miniflare/cache/2.7.1: - resolution: {integrity: sha512-QxN4yp8+cIlggbjIVP17xbSOjjJMco4coW5mXNPcTXazvqnbslwie9GDWmt4BkRvP77uwomf2CDUqEgxZC0frw==} + /@miniflare/cache/2.9.0: + resolution: {integrity: sha512-lriPxUEva9TJ01vU9P7pI60s3SsFnb4apWkNwZ+D7CRqyXPipSbapY8BWI2FUIwkEG7xap6UhzeTS76NettCXQ==} engines: {node: '>=16.13'} dependencies: - '@miniflare/core': 2.7.1 - '@miniflare/shared': 2.7.1 + '@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.7.1: - resolution: {integrity: sha512-kuY6sWClFBQoc22g7P7gR3fv5dXDI8ezvPvNX6tHXPLiPxiYCoz8XTRUqG5CW12zTxrI3yPjEaTQoFlHzdnQkg==} + /@miniflare/cli-parser/2.9.0: + resolution: {integrity: sha512-gu8Z7NWNcYw6514/yOvajaj3GmebRucx+EEt3p1vKirO+gvFgKAt/puyUN3p7u8ZZmLuLF/B+wVnH3lj8BWKlg==} engines: {node: '>=16.13'} dependencies: - '@miniflare/shared': 2.7.1 + '@miniflare/shared': 2.9.0 kleur: 4.1.5 dev: true - /@miniflare/core/2.7.1: - resolution: {integrity: sha512-Pdq5+FPSg0L0/eUOKrEfGFowcmbcEXKCIJa8iYz1iA35koSytgTN+6zeuuGPGVXQbGGEPhNugWlOz4u70FJ1GA==} + /@miniflare/core/2.9.0: + resolution: {integrity: sha512-QqSwF6oHvgrFvN5lnrLc6EEagFlZWW+UMU8QdrE8305cNGHrIOxKCA2nte4PVFZUVw/Ts13a0tVhUk3a2fAyxQ==} engines: {node: '>=16.13'} dependencies: '@iarna/toml': 2.2.5 - '@miniflare/shared': 2.7.1 - '@miniflare/watcher': 2.7.1 + '@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 @@ -452,35 +565,43 @@ packages: urlpattern-polyfill: 4.0.3 dev: true - /@miniflare/durable-objects/2.7.1: - resolution: {integrity: sha512-bzTzhu9KgtBZ3itR/u/izBHBzQnxhfOt1IQcJNCM/TBwSf8wr6ztDdsTDFE0j9/oQYj4umbGynzZvYYUm/SniQ==} + /@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.9.0: + resolution: {integrity: sha512-7uTvfEUXS7xqwrsWOwWrFUuKc4EiMpVkAWPeYGLB/0TJaJ6N+sZMpYYymdW79TQwPIDfgtpfkIy93MRydqpnrw==} engines: {node: '>=16.13'} dependencies: - '@miniflare/core': 2.7.1 - '@miniflare/shared': 2.7.1 - '@miniflare/storage-memory': 2.7.1 + '@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.7.1: - resolution: {integrity: sha512-7088TlpQBXdKX1OPOL+34xKSF5IjiHyjggM7HizJG14IIw1kSiJYojqaOi5f/DxstTUJJCOIxHn3zKf6QSpukA==} + /@miniflare/html-rewriter/2.9.0: + resolution: {integrity: sha512-K5OB70PtkMo7M+tU46s/cX/j/qtjD9AlJ0hecYswrxVsfrT/YWyrCQJevmShFfJ92h7jPNigbeC3Od3JiVb6QA==} engines: {node: '>=16.13'} dependencies: - '@miniflare/core': 2.7.1 - '@miniflare/shared': 2.7.1 + '@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.7.1: - resolution: {integrity: sha512-fcLrEVxtwMhj3qO5Wg5844s6WNTiixRjGEV/Top2TjP3CM6DtIc5l6zca4vozaTba39So627NDalLZQaCAcSBQ==} + /@miniflare/http-server/2.9.0: + resolution: {integrity: sha512-IVJMkFfMpecq9WiCTvATEKhMuKPK9fMs2E6zmgexaefr3u1VlNtj2QxBxoPUXkT9xMJQlT5sSKstlRR1XKDz9Q==} engines: {node: '>=16.13'} dependencies: - '@miniflare/core': 2.7.1 - '@miniflare/shared': 2.7.1 - '@miniflare/web-sockets': 2.7.1 + '@miniflare/core': 2.9.0 + '@miniflare/shared': 2.9.0 + '@miniflare/web-sockets': 2.9.0 kleur: 4.1.5 - selfsigned: 2.0.1 + selfsigned: 2.1.1 undici: 5.9.1 ws: 8.8.1 youch: 2.2.2 @@ -489,82 +610,91 @@ packages: - utf-8-validate dev: true - /@miniflare/kv/2.7.1: - resolution: {integrity: sha512-p3BUSgp2BK2l7GxM9wVnaXTM8/thzCzAITDbeyZLevtd8r3Vl1rE8W9Q+qrUbX454+zvHfG71O+BdtfFchgWkA==} + /@miniflare/kv/2.9.0: + resolution: {integrity: sha512-EqG51okY5rDtgjYs2Ny6j6IUVdTlJzDjwBKBIuW+wOV9NsAAzEchKVdYAXc8CyxvkggpYX481HydTD2OzK3INQ==} engines: {node: '>=16.13'} dependencies: - '@miniflare/shared': 2.7.1 + '@miniflare/shared': 2.9.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.7.1: - resolution: {integrity: sha512-UFqU2y4Qccto4PilHEn8JpTKi+lPZ61eV0G50Nnfnwa19yDKf0Wu6rYXecLTPetln10v6pCLvRvk4O93d99A6Q==} + /@miniflare/r2/2.9.0: + resolution: {integrity: sha512-aMFWxxciAE3YsVok2OLy3A7hP5+2j/NaK7txmadgoe1CA8HYZyNuvv7v6bn8HKM5gWnJdT8sk4yEbMbBQ7Jv/A==} engines: {node: '>=16.13'} dependencies: - '@miniflare/shared': 2.7.1 + '@miniflare/shared': 2.9.0 undici: 5.9.1 dev: true - /@miniflare/runner-vm/2.7.1: - resolution: {integrity: sha512-kcntTSq38Jk81EQbEYs1wSrcziz/KO1JD1DyyDSw1C9pDSFmhusgObDW0VxaGgEVyh92No8l5CNlTjY7kjiMHw==} + /@miniflare/runner-vm/2.9.0: + resolution: {integrity: sha512-vewP+Fy7Czb261GmB9x/YtQkoDs/QP9B5LbP0YfJ35bI2C2j940eJLm8JP72IHV7ILtWNOqMc3Ure8uAbpf9NQ==} engines: {node: '>=16.13'} dependencies: - '@miniflare/shared': 2.7.1 + '@miniflare/shared': 2.9.0 dev: true - /@miniflare/scheduler/2.7.1: - resolution: {integrity: sha512-00DCtvSi0/Kamo1OLtvfG+zxAS9VqrFO8Q1Wg7yEJpJBUlnUn+oOXKT//aCpZuVBJLSf7tXxzRXJYNPpu09fwg==} + /@miniflare/scheduler/2.9.0: + resolution: {integrity: sha512-eodSCGkJYi4Z+Imbx/bNScDfDSt5HOypVSYjbFHj+hA2aNOdkGw6a1b6mzwx49jJD3GadIkonZAKD0S114yWMA==} engines: {node: '>=16.13'} dependencies: - '@miniflare/core': 2.7.1 - '@miniflare/shared': 2.7.1 + '@miniflare/core': 2.9.0 + '@miniflare/shared': 2.9.0 cron-schedule: 3.0.6 dev: true - /@miniflare/shared/2.7.1: - resolution: {integrity: sha512-hQsx/mt5N/zBxJ3DyAJyGMtdT07WeuU+nYiWjkIwQOkPgH/p72Xu0tdi2kO/KQogtxeT2B+eTMVXlE0JqZOyhA==} + /@miniflare/shared/2.9.0: + resolution: {integrity: sha512-5Ew/Ph0cHDQqKvOlmN70kz+qZW0hdgE9fQBStKLY3vDYhnBEhopbCUChSS+FCcL7WtxVJJVE7iB6J09NQTnQ/A==} engines: {node: '>=16.13'} dependencies: + '@types/better-sqlite3': 7.6.0 kleur: 4.1.5 + npx-import: 1.1.3 picomatch: 2.3.1 dev: true - /@miniflare/sites/2.7.1: - resolution: {integrity: sha512-b5pgVx5qifb9YejBfWjh5lnphc7wTX41CvBxssmCdQCxvQ+C5LgNelccNUvIBIMC+N5Ids+Fbd+Hx8MNGjp3iw==} + /@miniflare/sites/2.9.0: + resolution: {integrity: sha512-+tWf7znxSQqXWGzPup8Xqkl8EmLmx+HaLC+UBtWPNnaJZrsjbbVxKwHpmGIdm+wZasEGfQk/82R21gUs9wdZnw==} engines: {node: '>=16.13'} dependencies: - '@miniflare/kv': 2.7.1 - '@miniflare/shared': 2.7.1 - '@miniflare/storage-file': 2.7.1 + '@miniflare/kv': 2.9.0 + '@miniflare/shared': 2.9.0 + '@miniflare/storage-file': 2.9.0 dev: true - /@miniflare/storage-file/2.7.1: - resolution: {integrity: sha512-6WiLGCeE1jIDJ3pp2ff1vFWCH1uf9BNWRkF3FpK7LyINzdDUlV56RtchPTBgk61oE8NYjlTqoYd4+KUvBul3/w==} + /@miniflare/storage-file/2.9.0: + resolution: {integrity: sha512-HZHtHfJaLoDzQFddoIMcDGgAJ3/Nee98gwUYusQam7rj9pbEXnWmk54dzjzsDlkQpB/3MBFQNbtN5Bj1NIt0pg==} engines: {node: '>=16.13'} dependencies: - '@miniflare/shared': 2.7.1 - '@miniflare/storage-memory': 2.7.1 + '@miniflare/shared': 2.9.0 + '@miniflare/storage-memory': 2.9.0 dev: true - /@miniflare/storage-memory/2.7.1: - resolution: {integrity: sha512-/YD6PshGEQneLmPC/FO+TnhN2STXT4oTuPxVo81fZ+q/XKglTA8iULtcgmF025lZ8S871ZANfmBtUzlxZJmW8Q==} + /@miniflare/storage-memory/2.9.0: + resolution: {integrity: sha512-p2yrr0omQhv6teDbdzhdBKzoQAFmUBMLEx+PtrO7CJHX15ICD08/pFAFAp96IcljNwZZDchU20Z3AcbldMj6Tw==} engines: {node: '>=16.13'} dependencies: - '@miniflare/shared': 2.7.1 + '@miniflare/shared': 2.9.0 dev: true - /@miniflare/watcher/2.7.1: - resolution: {integrity: sha512-0P0jG2IoMIQtX2JHTABY13Yq3Fs2w5gs6f/LG/X0O9pBCN3SxeQXt0bp3ELkEHjNANQWLMUs6aohb7yZ6ZTfHg==} + /@miniflare/watcher/2.9.0: + resolution: {integrity: sha512-Yqz8Q1He/2chebXvmCft8sMamuUiDQ4FIn0bwiF0+GBP2vvGCmy6SejXZY4ZD4REluPqQSis3CLKcIOWlHnIsw==} engines: {node: '>=16.13'} dependencies: - '@miniflare/shared': 2.7.1 + '@miniflare/shared': 2.9.0 dev: true - /@miniflare/web-sockets/2.7.1: - resolution: {integrity: sha512-VO0BhkYDn82LTRhvK1vJA1/PA9GXMJGlkt2wYomdQFOz4Rmybau4sgVyAdKWTTYV7XexEVAVRl8BDUM97Pdxvw==} + /@miniflare/web-sockets/2.9.0: + resolution: {integrity: sha512-Nob9e84m78qeQCka6OQf/JdNOmMkKCkX+i3rg+TYKSSITiMVuyzWp3vz3Ma184lAZiLg44lxBF4ZzENEdi99Kg==} engines: {node: '>=16.13'} dependencies: - '@miniflare/core': 2.7.1 - '@miniflare/shared': 2.7.1 + '@miniflare/core': 2.9.0 + '@miniflare/shared': 2.9.0 undici: 5.9.1 ws: 8.8.1 transitivePeerDependencies: @@ -572,18 +702,18 @@ packages: - utf-8-validate dev: true - /@next/env/12.2.5: - resolution: {integrity: sha512-vLPLV3cpPGjUPT3PjgRj7e3nio9t6USkuew3JE/jMeon/9Mvp1WyR18v3iwnCuX7eUAm1HmAbJHHLAbcu/EJcw==} + /@next/env/12.3.1: + resolution: {integrity: sha512-9P9THmRFVKGKt9DYqeC2aKIxm8rlvkK38V1P1sRE7qyoPBIs8l9oo79QoSdPtOWfzkbDAVUqvbQGgTMsb8BtJg==} dev: false - /@next/eslint-plugin-next/12.2.5: - resolution: {integrity: sha512-VBjVbmqEzGiOTBq4+wpeVXt/KgknnGB6ahvC/AxiIGnN93/RCSyXhFRI4uSfftM2Ba3w7ZO7076bfKasZsA0fw==} + /@next/eslint-plugin-next/12.3.1: + resolution: {integrity: sha512-sw+lTf6r6P0j+g/n9y4qdWWI2syPqZx+uc0+B/fRENqfR3KpSid6MIKqc9gNwGhJASazEQ5b3w8h4cAET213jw==} dependencies: glob: 7.1.7 dev: true - /@next/swc-android-arm-eabi/12.2.5: - resolution: {integrity: sha512-cPWClKxGhgn2dLWnspW+7psl3MoLQUcNqJqOHk2BhNcou9ARDtC0IjQkKe5qcn9qg7I7U83Gp1yh2aesZfZJMA==} + /@next/swc-android-arm-eabi/12.3.1: + resolution: {integrity: sha512-i+BvKA8tB//srVPPQxIQN5lvfROcfv4OB23/L1nXznP+N/TyKL8lql3l7oo2LNhnH66zWhfoemg3Q4VJZSruzQ==} engines: {node: '>= 10'} cpu: [arm] os: [android] @@ -591,8 +721,8 @@ packages: dev: false optional: true - /@next/swc-android-arm64/12.2.5: - resolution: {integrity: sha512-vMj0efliXmC5b7p+wfcQCX0AfU8IypjkzT64GiKJD9PgiA3IILNiGJr1fw2lyUDHkjeWx/5HMlMEpLnTsQslwg==} + /@next/swc-android-arm64/12.3.1: + resolution: {integrity: sha512-CmgU2ZNyBP0rkugOOqLnjl3+eRpXBzB/I2sjwcGZ7/Z6RcUJXK5Evz+N0ucOxqE4cZ3gkTeXtSzRrMK2mGYV8Q==} engines: {node: '>= 10'} cpu: [arm64] os: [android] @@ -600,8 +730,8 @@ packages: dev: false optional: true - /@next/swc-darwin-arm64/12.2.5: - resolution: {integrity: sha512-VOPWbO5EFr6snla/WcxUKtvzGVShfs302TEMOtzYyWni6f9zuOetijJvVh9CCTzInnXAZMtHyNhefijA4HMYLg==} + /@next/swc-darwin-arm64/12.3.1: + resolution: {integrity: sha512-hT/EBGNcu0ITiuWDYU9ur57Oa4LybD5DOQp4f22T6zLfpoBMfBibPtR8XktXmOyFHrL/6FC2p9ojdLZhWhvBHg==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -609,8 +739,8 @@ packages: dev: false optional: true - /@next/swc-darwin-x64/12.2.5: - resolution: {integrity: sha512-5o8bTCgAmtYOgauO/Xd27vW52G2/m3i5PX7MUYePquxXAnX73AAtqA3WgPXBRitEB60plSKZgOTkcpqrsh546A==} + /@next/swc-darwin-x64/12.3.1: + resolution: {integrity: sha512-9S6EVueCVCyGf2vuiLiGEHZCJcPAxglyckTZcEwLdJwozLqN0gtS0Eq0bQlGS3dH49Py/rQYpZ3KVWZ9BUf/WA==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -618,8 +748,8 @@ packages: dev: false optional: true - /@next/swc-freebsd-x64/12.2.5: - resolution: {integrity: sha512-yYUbyup1JnznMtEBRkK4LT56N0lfK5qNTzr6/DEyDw5TbFVwnuy2hhLBzwCBkScFVjpFdfiC6SQAX3FrAZzuuw==} + /@next/swc-freebsd-x64/12.3.1: + resolution: {integrity: sha512-qcuUQkaBZWqzM0F1N4AkAh88lLzzpfE6ImOcI1P6YeyJSsBmpBIV8o70zV+Wxpc26yV9vpzb+e5gCyxNjKJg5Q==} engines: {node: '>= 10'} cpu: [x64] os: [freebsd] @@ -627,8 +757,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm-gnueabihf/12.2.5: - resolution: {integrity: sha512-2ZE2/G921Acks7UopJZVMgKLdm4vN4U0yuzvAMJ6KBavPzqESA2yHJlm85TV/K9gIjKhSk5BVtauIUntFRP8cg==} + /@next/swc-linux-arm-gnueabihf/12.3.1: + resolution: {integrity: sha512-diL9MSYrEI5nY2wc/h/DBewEDUzr/DqBjIgHJ3RUNtETAOB3spMNHvJk2XKUDjnQuluLmFMloet9tpEqU2TT9w==} engines: {node: '>= 10'} cpu: [arm] os: [linux] @@ -636,8 +766,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-gnu/12.2.5: - resolution: {integrity: sha512-/I6+PWVlz2wkTdWqhlSYYJ1pWWgUVva6SgX353oqTh8njNQp1SdFQuWDqk8LnM6ulheVfSsgkDzxrDaAQZnzjQ==} + /@next/swc-linux-arm64-gnu/12.3.1: + resolution: {integrity: sha512-o/xB2nztoaC7jnXU3Q36vGgOolJpsGG8ETNjxM1VAPxRwM7FyGCPHOMk1XavG88QZSQf+1r+POBW0tLxQOJ9DQ==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -645,8 +775,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-musl/12.2.5: - resolution: {integrity: sha512-LPQRelfX6asXyVr59p5sTpx5l+0yh2Vjp/R8Wi4X9pnqcayqT4CUJLiHqCvZuLin3IsFdisJL0rKHMoaZLRfmg==} + /@next/swc-linux-arm64-musl/12.3.1: + resolution: {integrity: sha512-2WEasRxJzgAmP43glFNhADpe8zB7kJofhEAVNbDJZANp+H4+wq+/cW1CdDi8DqjkShPEA6/ejJw+xnEyDID2jg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -654,8 +784,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-gnu/12.2.5: - resolution: {integrity: sha512-0szyAo8jMCClkjNK0hknjhmAngUppoRekW6OAezbEYwHXN/VNtsXbfzgYOqjKWxEx3OoAzrT3jLwAF0HdX2MEw==} + /@next/swc-linux-x64-gnu/12.3.1: + resolution: {integrity: sha512-JWEaMyvNrXuM3dyy9Pp5cFPuSSvG82+yABqsWugjWlvfmnlnx9HOQZY23bFq3cNghy5V/t0iPb6cffzRWylgsA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -663,8 +793,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-musl/12.2.5: - resolution: {integrity: sha512-zg/Y6oBar1yVnW6Il1I/08/2ukWtOG6s3acdJdEyIdsCzyQi4RLxbbhkD/EGQyhqBvd3QrC6ZXQEXighQUAZ0g==} + /@next/swc-linux-x64-musl/12.3.1: + resolution: {integrity: sha512-xoEWQQ71waWc4BZcOjmatuvPUXKTv6MbIFzpm4LFeCHsg2iwai0ILmNXf81rJR+L1Wb9ifEke2sQpZSPNz1Iyg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -672,8 +802,8 @@ packages: dev: false optional: true - /@next/swc-win32-arm64-msvc/12.2.5: - resolution: {integrity: sha512-3/90DRNSqeeSRMMEhj4gHHQlLhhKg5SCCoYfE3kBjGpE63EfnblYUqsszGGZ9ekpKL/R4/SGB40iCQr8tR5Jiw==} + /@next/swc-win32-arm64-msvc/12.3.1: + resolution: {integrity: sha512-hswVFYQYIeGHE2JYaBVtvqmBQ1CppplQbZJS/JgrVI3x2CurNhEkmds/yqvDONfwfbttTtH4+q9Dzf/WVl3Opw==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -681,8 +811,8 @@ packages: dev: false optional: true - /@next/swc-win32-ia32-msvc/12.2.5: - resolution: {integrity: sha512-hGLc0ZRAwnaPL4ulwpp4D2RxmkHQLuI8CFOEEHdzZpS63/hMVzv81g8jzYA0UXbb9pus/iTc3VRbVbAM03SRrw==} + /@next/swc-win32-ia32-msvc/12.3.1: + resolution: {integrity: sha512-Kny5JBehkTbKPmqulr5i+iKntO5YMP+bVM8Hf8UAmjSMVo3wehyLVc9IZkNmcbxi+vwETnQvJaT5ynYBkJ9dWA==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -690,8 +820,8 @@ packages: dev: false optional: true - /@next/swc-win32-x64-msvc/12.2.5: - resolution: {integrity: sha512-7h5/ahY7NeaO2xygqVrSG/Y8Vs4cdjxIjowTZ5W6CKoTKn7tmnuxlUc2h74x06FKmbhAd9agOjr/AOKyxYYm9Q==} + /@next/swc-win32-x64-msvc/12.3.1: + resolution: {integrity: sha512-W1ijvzzg+kPEX6LAc+50EYYSEo0FVu7dmTE+t+DM4iOLqgGHoW9uYSz9wCVdkXOEEMP9xhXfGpcSxsfDucyPkA==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -699,8 +829,8 @@ packages: dev: false optional: true - /@noble/ed25519/1.6.1: - resolution: {integrity: sha512-Gptpue6qPmg7p1E5LBO5GDtXw5WMc2DVtUmu4EQequOcoCvum1dT9sY6s9M8aSJWq9YopCN4jmTOAvqMdw3q7w==} + /@noble/ed25519/1.7.1: + resolution: {integrity: sha512-Rk4SkJFaXZiznFyC/t77Q0NKS4FL7TLJJsVG2V2oiEq3kJVeTdxysEe/yRWSpnWMe808XRDJ+VFh5pt/FN5plw==} dev: false /@noble/hashes/1.1.2: @@ -728,13 +858,13 @@ packages: fastq: 1.13.0 dev: true - /@phenomnomnominal/tsquery/4.2.0_typescript@4.8.2: + /@phenomnomnominal/tsquery/4.2.0_typescript@4.8.3: resolution: {integrity: sha512-hR2U3uVcrrdkuG30ItQ+uFDs4ncZAybxWG0OjTE8ptPzVoU7GVeXpy+vMU8zX9EbmjGeITPw/su5HjYQyAH8bA==} peerDependencies: typescript: ^3 || ^4 dependencies: esquery: 1.4.0 - typescript: 4.8.2 + typescript: 4.8.3 dev: true /@polka/url/0.5.0: @@ -745,8 +875,8 @@ packages: resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==} dev: true - /@rushstack/eslint-patch/1.1.4: - resolution: {integrity: sha512-LwzQKA4vzIct1zNZzBmRKI9QuNpLgTQMEjsQLf3BXuGYb3QPTP4Yjf6mkdX+X1mYttZ808QpOwAzZjv28kq7DA==} + /@rushstack/eslint-patch/1.2.0: + resolution: {integrity: sha512-sXo/qW2/pAcmT43VoRKOJbDOfV3cYpq3szSVfIThQXNt+E4DfKj361vaAt3c88U5tPUxzEswam7GW48PJqtKAg==} dev: true /@sentry/cli/1.74.5: @@ -836,8 +966,8 @@ packages: - supports-color dev: true - /@swc/helpers/0.4.3: - resolution: {integrity: sha512-6JrF+fdUK2zbGpJIlN7G3v966PQjyx/dPt1T9km2wj+EUBqgrxCk3uX4Kct16MIm9gGxfKRcfax2hVf5jvlTzA==} + /@swc/helpers/0.4.11: + resolution: {integrity: sha512-rEUrBSGIoSFuYxwBYtlUFMlE2CwGhmW+w9355/5oduSw8e5h2+Tj4UrAGNNgP9915++wj5vkQo0UuOBqOAq4nw==} dependencies: tslib: 2.4.0 dev: false @@ -846,6 +976,12 @@ packages: resolution: {integrity: sha512-Y7gDJiIqb9qKUHfBQYOWGngUpLORtirAVPuj/CWJrU2C6ZM4/y3XLwuwfGMF8s7QzW746LQZx23m0+1FSgjfug==} dev: true + /@types/better-sqlite3/7.6.0: + resolution: {integrity: sha512-rnSP9vY+fVsF3iJja5yRGBJV63PNBiezJlYrCkqUmQWFoB16cxAHwOkjsAYEu317miOfKaJpa65cbp0P4XJ/jw==} + dependencies: + '@types/node': 18.7.18 + dev: true + /@types/chai-subset/1.3.3: resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} dependencies: @@ -864,6 +1000,13 @@ packages: resolution: {integrity: sha512-qGYApbb0m8Ofy3pwYks+kYVIZQAN/cqNucJGbl5O5GpLw9JSzp74rkTWDhPv3brrJfJb5/ixtimLJpo4tfh2QA==} dev: true + /@types/inquirer/9.0.1: + resolution: {integrity: sha512-I4eZdYXpFHj0pAzMndJFQMu/4hCc6Z340au9lvxHofGJnFmVgckxR/t9jRzsOVviajsOmEL+OABx+e0e28IbNw==} + dependencies: + '@types/through': 0.0.30 + rxjs: 7.5.6 + dev: true + /@types/istanbul-lib-coverage/2.0.4: resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} dev: true @@ -880,13 +1023,8 @@ packages: resolution: {integrity: sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==} dev: true - /@types/node/18.7.14: - resolution: {integrity: sha512-6bbDaETVi8oyIARulOE9qF1/Qdi/23z6emrUh0fNJRUmjznqrixD4MpGDdgOFk5Xb0m2H6Xu42JGdvAxaJR/wA==} - dev: true - /@types/node/18.7.18: resolution: {integrity: sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg==} - dev: true /@types/normalize-package-data/2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} @@ -896,12 +1034,12 @@ packages: resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==} dev: true - /@types/react/18.0.18: - resolution: {integrity: sha512-6hI08umYs6NaiHFEEGioXnxJ+oEhY3eRz8VCUaudZmGdtvPviCJB8mgaMxaDWAdPSYd4eFavrPk2QIolwbLYrg==} + /@types/react/18.0.20: + resolution: {integrity: sha512-MWul1teSPxujEHVwZl4a5HxQ9vVNsjTchVA+xRqv/VYGCuKGAU6UhfrTdF5aBefwD1BHUD8i/zq+O/vyCm/FrA==} dependencies: '@types/prop-types': 15.7.5 '@types/scheduler': 0.16.2 - csstype: 3.1.0 + csstype: 3.1.1 dev: true /@types/retry/0.12.1: @@ -916,6 +1054,18 @@ packages: resolution: {integrity: sha512-TgfOX+mGY/NyNxJLIbDWrO9DjGoVSW9+aB8H2yy1fy32jsvxijhmyJI9fDFgvz3YP4lvJaq9DzdR/M1bOgVc9g==} dev: true + /@types/through/0.0.30: + resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} + dependencies: + '@types/node': 18.7.18 + dev: true + + /@types/ws/8.5.3: + resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} + dependencies: + '@types/node': 18.7.18 + dev: false + /@types/yargs-parser/21.0.0: resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} dev: true @@ -926,8 +1076,8 @@ packages: '@types/yargs-parser': 21.0.0 dev: true - /@typescript-eslint/eslint-plugin/5.36.1_lbwfnm54o3pmr3ypeqp3btnera: - resolution: {integrity: sha512-iC40UK8q1tMepSDwiLbTbMXKDxzNy+4TfPWgIL661Ym0sD42vRcQU93IsZIrmi+x292DBr60UI/gSwfdVYexCA==} + /@typescript-eslint/eslint-plugin/5.38.0_wsb62dxj2oqwgas4kadjymcmry: + resolution: {integrity: sha512-GgHi/GNuUbTOeoJiEANi0oI6fF3gBQc3bGFYj40nnAPCbhrtEDf2rjBmefFadweBmO1Du1YovHeDP2h5JLhtTQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -937,37 +1087,36 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.36.1_yqf6kl63nyoq5megxukfnom5rm - '@typescript-eslint/scope-manager': 5.36.1 - '@typescript-eslint/type-utils': 5.36.1_yqf6kl63nyoq5megxukfnom5rm - '@typescript-eslint/utils': 5.36.1_yqf6kl63nyoq5megxukfnom5rm + '@typescript-eslint/parser': 5.38.0_irgkl5vooow2ydyo6aokmferha + '@typescript-eslint/scope-manager': 5.38.0 + '@typescript-eslint/type-utils': 5.38.0_irgkl5vooow2ydyo6aokmferha + '@typescript-eslint/utils': 5.38.0_irgkl5vooow2ydyo6aokmferha debug: 4.3.4 - eslint: 8.23.0 - functional-red-black-tree: 1.0.1 + eslint: 8.23.1 ignore: 5.2.0 regexpp: 3.2.0 semver: 7.3.7 - tsutils: 3.21.0_typescript@4.8.2 - typescript: 4.8.2 + tsutils: 3.21.0_typescript@4.8.3 + typescript: 4.8.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/experimental-utils/5.36.1_yqf6kl63nyoq5megxukfnom5rm: - resolution: {integrity: sha512-zLbD16KK1P0tjYXHRKWUcEjJIGDMhbrvjTJyWTfKRLB9NXW45S1zWw4+GZfxEdGzIPyaw22DUgUtyGgr3d7jAg==} + /@typescript-eslint/experimental-utils/5.38.0_irgkl5vooow2ydyo6aokmferha: + resolution: {integrity: sha512-kzXBRfvGlicgGk4CYuRUqKvwc2s3wHXNssUWWJU18bhMRxriFm3BZWyQ6vEHBRpEIMKB6b7MIQHO+9lYlts19w==} 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.36.1_yqf6kl63nyoq5megxukfnom5rm - eslint: 8.23.0 + '@typescript-eslint/utils': 5.38.0_irgkl5vooow2ydyo6aokmferha + eslint: 8.23.1 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/parser/5.33.1_yqf6kl63nyoq5megxukfnom5rm: - resolution: {integrity: sha512-IgLLtW7FOzoDlmaMoXdxG8HOCByTBXrB1V2ZQYSEV1ggMmJfAkMWTwUjjzagS6OkfpySyhKFkBw7A9jYmcHpZA==} + /@typescript-eslint/parser/5.38.0_irgkl5vooow2ydyo6aokmferha: + resolution: {integrity: sha512-/F63giJGLDr0ms1Cr8utDAxP2SPiglaD6V+pCOcG35P2jCqdfR7uuEhz1GIC3oy4hkUF8xA1XSXmd9hOh/a5EA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -976,54 +1125,26 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.33.1 - '@typescript-eslint/types': 5.33.1 - '@typescript-eslint/typescript-estree': 5.33.1_typescript@4.8.2 + '@typescript-eslint/scope-manager': 5.38.0 + '@typescript-eslint/types': 5.38.0 + '@typescript-eslint/typescript-estree': 5.38.0_typescript@4.8.3 debug: 4.3.4 - eslint: 8.23.0 - typescript: 4.8.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/parser/5.36.1_yqf6kl63nyoq5megxukfnom5rm: - resolution: {integrity: sha512-/IsgNGOkBi7CuDfUbwt1eOqUXF9WGVBW9dwEe1pi+L32XrTsZIgmDFIi2RxjzsvB/8i+MIf5JIoTEH8LOZ368A==} - 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.36.1 - '@typescript-eslint/types': 5.36.1 - '@typescript-eslint/typescript-estree': 5.36.1_typescript@4.8.2 - debug: 4.3.4 - eslint: 8.23.0 - typescript: 4.8.2 + eslint: 8.23.1 + typescript: 4.8.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager/5.33.1: - resolution: {integrity: sha512-8ibcZSqy4c5m69QpzJn8XQq9NnqAToC8OdH/W6IXPXv83vRyEDPYLdjAlUx8h/rbusq6MkW4YdQzURGOqsn3CA==} + /@typescript-eslint/scope-manager/5.38.0: + resolution: {integrity: sha512-ByhHIuNyKD9giwkkLqzezZ9y5bALW8VNY6xXcP+VxoH4JBDKjU5WNnsiD4HJdglHECdV+lyaxhvQjTUbRboiTA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.33.1 - '@typescript-eslint/visitor-keys': 5.33.1 + '@typescript-eslint/types': 5.38.0 + '@typescript-eslint/visitor-keys': 5.38.0 dev: true - /@typescript-eslint/scope-manager/5.36.1: - resolution: {integrity: sha512-pGC2SH3/tXdu9IH3ItoqciD3f3RRGCh7hb9zPdN2Drsr341zgd6VbhP5OHQO/reUqihNltfPpMpTNihFMarP2w==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.36.1 - '@typescript-eslint/visitor-keys': 5.36.1 - dev: true - - /@typescript-eslint/type-utils/5.36.1_yqf6kl63nyoq5megxukfnom5rm: - resolution: {integrity: sha512-xfZhfmoQT6m3lmlqDvDzv9TiCYdw22cdj06xY0obSznBsT///GK5IEZQdGliXpAOaRL34o8phEvXzEo/VJx13Q==} + /@typescript-eslint/type-utils/5.38.0_irgkl5vooow2ydyo6aokmferha: + resolution: {integrity: sha512-iZq5USgybUcj/lfnbuelJ0j3K9dbs1I3RICAJY9NZZpDgBYXmuUlYQGzftpQA9wC8cKgtS6DASTvF3HrXwwozA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -1032,28 +1153,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.36.1_typescript@4.8.2 - '@typescript-eslint/utils': 5.36.1_yqf6kl63nyoq5megxukfnom5rm + '@typescript-eslint/typescript-estree': 5.38.0_typescript@4.8.3 + '@typescript-eslint/utils': 5.38.0_irgkl5vooow2ydyo6aokmferha debug: 4.3.4 - eslint: 8.23.0 - tsutils: 3.21.0_typescript@4.8.2 - typescript: 4.8.2 + eslint: 8.23.1 + tsutils: 3.21.0_typescript@4.8.3 + typescript: 4.8.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types/5.33.1: - resolution: {integrity: sha512-7K6MoQPQh6WVEkMrMW5QOA5FO+BOwzHSNd0j3+BlBwd6vtzfZceJ8xJ7Um2XDi/O3umS8/qDX6jdy2i7CijkwQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - - /@typescript-eslint/types/5.36.1: - resolution: {integrity: sha512-jd93ShpsIk1KgBTx9E+hCSEuLCUFwi9V/urhjOWnOaksGZFbTOxAT47OH2d4NLJnLhkVD+wDbB48BuaycZPLBg==} + /@typescript-eslint/types/5.38.0: + resolution: {integrity: sha512-HHu4yMjJ7i3Cb+8NUuRCdOGu2VMkfmKyIJsOr9PfkBVYLYrtMCK/Ap50Rpov+iKpxDTfnqvDbuPLgBE5FwUNfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.33.1_typescript@4.8.2: - resolution: {integrity: sha512-JOAzJ4pJ+tHzA2pgsWQi4804XisPHOtbvwUyqsuuq8+y5B5GMZs7lI1xDWs6V2d7gE/Ez5bTGojSK12+IIPtXA==} + /@typescript-eslint/typescript-estree/5.38.0_typescript@4.8.3: + resolution: {integrity: sha512-6P0RuphkR+UuV7Avv7MU3hFoWaGcrgOdi8eTe1NwhMp2/GjUJoODBTRWzlHpZh6lFOaPmSvgxGlROa0Sg5Zbyg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -1061,132 +1177,103 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.33.1 - '@typescript-eslint/visitor-keys': 5.33.1 + '@typescript-eslint/types': 5.38.0 + '@typescript-eslint/visitor-keys': 5.38.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.7 - tsutils: 3.21.0_typescript@4.8.2 - typescript: 4.8.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/typescript-estree/5.36.1_typescript@4.8.2: - resolution: {integrity: sha512-ih7V52zvHdiX6WcPjsOdmADhYMDN15SylWRZrT2OMy80wzKbc79n8wFW0xpWpU0x3VpBz/oDgTm2xwDAnFTl+g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 5.36.1 - '@typescript-eslint/visitor-keys': 5.36.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.2 - typescript: 4.8.2 + tsutils: 3.21.0_typescript@4.8.3 + typescript: 4.8.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils/5.36.1_yqf6kl63nyoq5megxukfnom5rm: - resolution: {integrity: sha512-lNj4FtTiXm5c+u0pUehozaUWhh7UYKnwryku0nxJlYUEWetyG92uw2pr+2Iy4M/u0ONMKzfrx7AsGBTCzORmIg==} + /@typescript-eslint/utils/5.38.0_irgkl5vooow2ydyo6aokmferha: + resolution: {integrity: sha512-6sdeYaBgk9Fh7N2unEXGz+D+som2QCQGPAf1SxrkEr+Z32gMreQ0rparXTNGRRfYUWk/JzbGdcM8NSSd6oqnTA==} 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.36.1 - '@typescript-eslint/types': 5.36.1 - '@typescript-eslint/typescript-estree': 5.36.1_typescript@4.8.2 - eslint: 8.23.0 + '@typescript-eslint/scope-manager': 5.38.0 + '@typescript-eslint/types': 5.38.0 + '@typescript-eslint/typescript-estree': 5.38.0_typescript@4.8.3 + eslint: 8.23.1 eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.23.0 + eslint-utils: 3.0.0_eslint@8.23.1 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys/5.33.1: - resolution: {integrity: sha512-nwIxOK8Z2MPWltLKMLOEZwmfBZReqUdbEoHQXeCpa+sRVARe5twpJGHCB4dk9903Yaf0nMAlGbQfaAH92F60eg==} + /@typescript-eslint/visitor-keys/5.38.0: + resolution: {integrity: sha512-MxnrdIyArnTi+XyFLR+kt/uNAcdOnmT+879os7qDRI+EYySR4crXJq9BXPfRzzLGq0wgxkwidrCJ9WCAoacm1w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.33.1 + '@typescript-eslint/types': 5.38.0 eslint-visitor-keys: 3.3.0 dev: true - /@typescript-eslint/visitor-keys/5.36.1: - resolution: {integrity: sha512-ojB9aRyRFzVMN3b5joSYni6FAS10BBSCAfKJhjJAV08t/a95aM6tAhz+O1jF+EtgxktuSO3wJysp2R+Def/IWQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.36.1 - eslint-visitor-keys: 3.3.0 - dev: true - - /@ucanto/authority/0.5.0: - resolution: {integrity: sha512-TML+6Xqu8H3+Nti0ko3Sqi15uh6dXCUZQ4W+GFuGXyZ8yss6VxarK6uB7cG0KQlt3Nejok6cYHuzq5Hou5IsCA==} + /@ucanto/client/1.0.1: + resolution: {integrity: sha512-ZWOCVDXdKhq0r5ZRUN5ubqpfjsQ2Nra2WFv2AyHZWSHA+maI4FA/btJBOWUPHW3BtWNDSt4waEfYXXh4iqkN0g==} dependencies: - '@ipld/dag-ucan': 1.7.0-beta - '@noble/ed25519': 1.6.1 - '@ucanto/interface': 0.7.0 - multiformats: 9.7.1 + '@ucanto/interface': 1.0.0 + multiformats: 9.9.0 dev: false - /@ucanto/client/0.6.0: - resolution: {integrity: sha512-TUYfclxZEMAqz9oKt0MWN06flSuUOEPG6AOAVirs1w1FelKap/fpeDzhVh36Gce9EQHrcucyv7NbpMpBaWVG1w==} + /@ucanto/core/1.0.1: + resolution: {integrity: sha512-ugGyxbVwe1W7yYiVf281uZqZ5RgZ9f89JK29zQmmU3fv83wO3xIt5cWAr2ctXUAaRKmY0s3kZcMlEYemDDYm+A==} dependencies: - '@ucanto/interface': 0.7.0 - multiformats: 9.7.1 + '@ipld/car': 4.1.5 + '@ipld/dag-cbor': 7.0.3 + '@ipld/dag-ucan': 3.0.0-beta + '@ucanto/interface': 1.0.0 + multiformats: 9.9.0 dev: false - /@ucanto/core/0.6.0: - resolution: {integrity: sha512-j1TIHAei56OiukA3YsE6mk4IX0KUSD/HINv50aUQu4w7XIrtmXk4RgUbDIVRxdat6QugKfjHZoXbjGehlTjPzA==} + /@ucanto/interface/1.0.0: + resolution: {integrity: sha512-qVsFx7YsPnc5QaGfDGyFaj/M3wog+E/A0dX1LJn+K5GQ6DWd3nKvv+rxfZ888ZU+36gDdji8/R1qfT8GngNTMQ==} dependencies: - '@ipld/car': 4.1.4 - '@ipld/dag-cbor': 7.0.2 - '@ipld/dag-ucan': 1.7.0-beta - '@ucanto/interface': 0.7.0 - multiformats: 9.7.1 + '@ipld/dag-ucan': 3.0.0-beta + multiformats: 9.9.0 dev: false - /@ucanto/interface/0.7.0: - resolution: {integrity: sha512-H6zxnq06ZUuyVfuDpoUTvlfN4YBt6DGa55yo9/MTn4W9YkUzsathfc8jXl3wLzpUnA17hejEZZbmymaDQm03uA==} + /@ucanto/principal/1.0.1: + resolution: {integrity: sha512-tuIhJRCj8Plk/XraHlPkOc9WsMsFOyQ9jcYRquD3/ybah4Nh843+eSPfDcOUnB1Y4FJg2wT4R8OEnTZejE7+dA==} dependencies: - '@ipld/dag-ucan': 1.7.0-beta - multiformats: 9.7.1 + '@ipld/dag-ucan': 3.0.0-beta + '@noble/ed25519': 1.7.1 + '@ucanto/interface': 1.0.0 + multiformats: 9.9.0 dev: false - /@ucanto/server/0.7.0: - resolution: {integrity: sha512-tvBL3cavB6/SbaZ+lxlrDgcDc/OgYv2Mdc/MB4/vGRm+Gc4U04bEky30YIHJ6SakpfzPrNalmkaODW89QExzzw==} + /@ucanto/server/1.0.2: + resolution: {integrity: sha512-ECXv8y8WM/Do9MSb8DLYbRY7yRvL6VdQL2v1YfU5USjAyNPyjP73M+zpXf7tEhdXcZbqn/JIws3H21J56i7oog==} dependencies: - '@ucanto/core': 0.6.0 - '@ucanto/interface': 0.7.0 - '@ucanto/validator': 0.6.0 + '@ucanto/core': 1.0.1 + '@ucanto/interface': 1.0.0 + '@ucanto/validator': 1.0.1 dev: false - /@ucanto/transport/0.7.0: - resolution: {integrity: sha512-ORj80wMpjIwbd2xXx4qoTUS5Vm5KLFQcHAg6jGwX2FFTUm+pNo+adooZ3sU8AkvKk8qCzHxOYgD8cIY1Sk+FmA==} + /@ucanto/transport/1.0.1: + resolution: {integrity: sha512-zC7ty7l5F47C8uWiZajs8MwplR8KoAGIz72psSrB6R+Zx9Le+SoN2/gyPD0a4cDtpMLEyHOPodOlBTnQEIlEcQ==} dependencies: - '@ipld/car': 4.1.4 - '@ipld/dag-cbor': 7.0.2 - '@ucanto/core': 0.6.0 - '@ucanto/interface': 0.7.0 - multiformats: 9.7.1 + '@ipld/car': 4.1.5 + '@ipld/dag-cbor': 7.0.3 + '@ucanto/core': 1.0.1 + '@ucanto/interface': 1.0.0 + multiformats: 9.9.0 dev: false - /@ucanto/validator/0.6.0: - resolution: {integrity: sha512-mUhdaWFN/amf/M2xOLzRSP9JjWgMK5G4/iDcfN0szMBkd6kgDk91i4d1pf38rMz2xof/69yqSLF1up1ZBv7p4Q==} + /@ucanto/validator/1.0.1: + resolution: {integrity: sha512-w8NTSPKkEhQRWDmnt8KjMg65/U7SZfVaiKyDlP46Ph0zRAAr16VfBFYVArucKu4V4kgh6gHT4qRBEaAUJ4U0zQ==} dependencies: - '@ipld/car': 4.1.4 - '@ipld/dag-cbor': 7.0.2 - '@ucanto/core': 0.6.0 - '@ucanto/interface': 0.7.0 - multiformats: 9.7.1 + '@ipld/car': 4.1.5 + '@ipld/dag-cbor': 7.0.3 + '@ucanto/core': 1.0.1 + '@ucanto/interface': 1.0.0 + multiformats: 9.9.0 dev: false /@ungap/promise-all-settled/1.1.2: @@ -1331,6 +1418,13 @@ packages: type-fest: 0.21.3 dev: true + /ansi-escapes/5.0.0: + resolution: {integrity: sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA==} + engines: {node: '>=12'} + dependencies: + type-fest: 1.4.0 + dev: false + /ansi-regex/2.1.1: resolution: {integrity: sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==} engines: {node: '>=0.10.0'} @@ -1359,10 +1453,9 @@ packages: color-convert: 2.0.1 dev: true - /ansi-styles/6.1.0: - resolution: {integrity: sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==} + /ansi-styles/6.1.1: + resolution: {integrity: sha512-qDOv24WjnYuL+wbwHdlsYZFy+cgPtrYw0Tn7GLORicQp9BkQLzrgI3Pm4VyR9ERZ41YTn7KlMPuL1n05WdZvmg==} engines: {node: '>=12'} - dev: true /anymatch/3.1.2: resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==} @@ -1409,8 +1502,8 @@ packages: resolution: {integrity: sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==} engines: {node: '>=6.0'} dependencies: - '@babel/runtime': 7.18.9 - '@babel/runtime-corejs3': 7.18.9 + '@babel/runtime': 7.19.0 + '@babel/runtime-corejs3': 7.19.1 dev: true /array-find-index/1.0.2: @@ -1424,8 +1517,8 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.1 - get-intrinsic: 1.1.2 + es-abstract: 1.20.2 + get-intrinsic: 1.1.3 is-string: 1.0.7 dev: true @@ -1440,7 +1533,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.1 + es-abstract: 1.20.2 is-string: 1.0.7 dev: true @@ -1450,7 +1543,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.1 + es-abstract: 1.20.2 es-shim-unscopables: 1.0.0 dev: true @@ -1460,7 +1553,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.1 + es-abstract: 1.20.2 es-shim-unscopables: 1.0.0 dev: true @@ -1513,7 +1606,7 @@ packages: dependencies: acorn: 8.8.0 acorn-walk: 8.2.0 - ansi-styles: 6.1.0 + ansi-styles: 6.1.1 arrgv: 1.0.2 arrify: 3.0.0 callsites: 4.0.0 @@ -1521,7 +1614,7 @@ packages: chalk: 5.0.1 chokidar: 3.5.3 chunkd: 2.0.1 - ci-info: 3.3.2 + ci-info: 3.4.0 ci-parallel-vars: 1.0.1 clean-yaml-object: 0.1.0 cli-truncate: 3.1.0 @@ -1580,6 +1673,11 @@ packages: /base64-js/1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + /bigint-mod-arith/3.1.1: + resolution: {integrity: sha512-SzFqdncZKXq5uh3oLFZXmzaZEMDsA7ml9l53xKaVGO6/+y26xNwAaTQEg2R+D+d07YduLbKi0dni3YPsR51UDQ==} + engines: {node: '>=10.4.0'} + dev: false + /binary-extensions/2.2.0: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} @@ -1656,7 +1754,7 @@ packages: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: function-bind: 1.1.1 - get-intrinsic: 1.1.2 + get-intrinsic: 1.1.3 /callsites/3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} @@ -1673,8 +1771,8 @@ packages: engines: {node: '>=10'} dev: true - /caniuse-lite/1.0.30001378: - resolution: {integrity: sha512-JVQnfoO7FK7WvU4ZkBRbPjaot4+YqxogSDosHv0Hv5mWpUESmN+UubMU6L/hGz8QlQ2aY5U0vR6MOs6j/CXpNA==} + /caniuse-lite/1.0.30001409: + resolution: {integrity: sha512-V0mnJ5dwarmhYv8/MzhJ//aW68UpvnQBXv8lJ2QUsvn2pHcmAuNtu8hQEDz37XnA1iE+lRR9CIfGWWpgJ5QedQ==} dev: false /cbor/8.1.0: @@ -1684,8 +1782,8 @@ packages: nofilter: 3.1.0 dev: true - /cborg/1.9.4: - resolution: {integrity: sha512-ltobKo17xKYJolhg8UxQhvzcqXhjtUnovwe9Xx59Izo32gLwozGoJs/efp+8dZ5+zu9pNJYnHtmp6iJnDUapww==} + /cborg/1.9.5: + resolution: {integrity: sha512-fLBv8wmqtlXqy1Yu+pHzevAIkW6k2K0ZtMujNzWphLsA34vzzg9BHn+5GmZqOJkSA9V7EMKsWrf6K976c1QMjQ==} hasBin: true dev: false @@ -1728,6 +1826,10 @@ packages: resolution: {integrity: sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + /chardet/0.7.0: + resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + dev: false + /check-error/1.0.2: resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} dev: true @@ -1751,8 +1853,8 @@ packages: resolution: {integrity: sha512-7d58XsFmOq0j6el67Ug9mHf9ELUXsQXYJBkyxhH/k+6Ke0qXRnv0kbemx+Twc6fRJ07C49lcbdgm9FL1Ei/6SQ==} dev: true - /ci-info/3.3.2: - resolution: {integrity: sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==} + /ci-info/3.4.0: + resolution: {integrity: sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug==} dev: true /ci-parallel-vars/1.0.1: @@ -1816,6 +1918,11 @@ packages: string-width: 5.1.2 dev: true + /cli-width/4.0.0: + resolution: {integrity: sha512-ZksGS2xpa/bYkNzN3BAw1wEjsLV/ZKOf/CCrJ/QOBsxx6fOARIkwTutxp1XIOIohi6HKmOFjMoK/XaqDVUpEEw==} + engines: {node: '>= 12'} + dev: false + /cliui/7.0.4: resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} dependencies: @@ -1885,7 +1992,7 @@ packages: dev: true /concat-map/0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} dev: true /concordance/5.0.4: @@ -1943,8 +2050,8 @@ packages: engines: {node: '>= 0.6'} dev: false - /core-js-pure/3.24.1: - resolution: {integrity: sha512-r1nJk41QLLPyozHUUPmILCEMtMw24NG4oWK6RbsDdjzQgg9ZvrUsPBj1MnG0wXXp1DCDU6j+wUvEmBSrtRbLXg==} + /core-js-pure/3.25.2: + resolution: {integrity: sha512-ItD7YpW1cUB4jaqFLZXe1AXkyqIxz6GqPnsDV4uF4hVcWh/WAGIqSqw5p0/WdsILM0Xht9s3Koyw05R3K6RtiA==} requiresBuild: true dev: true @@ -1996,8 +2103,8 @@ packages: type-fest: 1.4.0 dev: true - /csstype/3.1.0: - resolution: {integrity: sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==} + /csstype/3.1.1: + resolution: {integrity: sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==} dev: true /currently-unhandled/0.4.1: @@ -2051,19 +2158,6 @@ packages: ms: 2.1.3 dev: true - /debug/4.3.3_supports-color@8.1.1: - resolution: {integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - supports-color: 8.1.1 - dev: true - /debug/4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -2089,7 +2183,7 @@ packages: supports-color: 8.1.1 dev: true - /debug/4.3.4_supports-color@9.2.2: + /debug/4.3.4_supports-color@9.2.3: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} peerDependencies: @@ -2099,7 +2193,7 @@ packages: optional: true dependencies: ms: 2.1.2 - supports-color: 9.2.2 + supports-color: 9.2.3 dev: true /decamelize/4.0.0: @@ -2119,7 +2213,7 @@ packages: dependencies: call-bind: 1.0.2 es-get-iterator: 1.1.2 - get-intrinsic: 1.1.2 + get-intrinsic: 1.1.3 is-arguments: 1.1.1 is-date-object: 1.0.5 is-regex: 1.1.4 @@ -2229,7 +2323,6 @@ packages: /eastasianwidth/0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - dev: true /emittery/0.11.0: resolution: {integrity: sha512-S/7tzL6v5i+4iJd627Nhv9cLFIo5weAIlGccqJFpnBoDB8U1TF2k5tez4J/QNuxyyhWuFqHg1L84Kd3m7iXg6g==} @@ -2242,7 +2335,6 @@ packages: /emoji-regex/9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - dev: true /env-paths/2.2.1: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} @@ -2261,21 +2353,21 @@ packages: stackframe: 1.3.4 dev: false - /es-abstract/1.20.1: - resolution: {integrity: sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==} + /es-abstract/1.20.2: + resolution: {integrity: sha512-XxXQuVNrySBNlEkTYJoDNFe5+s2yIOpzq80sUHEdPdQr0S5nTLz4ZPPPswNIpKseDDUS5yghX1gfLIHQZ1iNuQ==} 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.2 + 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.4 + is-callable: 1.2.6 is-negative-zero: 2.0.2 is-regex: 1.1.4 is-shared-array-buffer: 1.0.2 @@ -2293,7 +2385,7 @@ packages: resolution: {integrity: sha512-+DTO8GYwbMCwbywjimwZMHp8AuYXOS2JZFWoi2AlPOS3ebnII9w/NLpNZtA7A0YLaVDw+O7KFCeoIV7OPvM7hQ==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.1.2 + get-intrinsic: 1.1.3 has-symbols: 1.0.3 is-arguments: 1.1.1 is-map: 2.0.2 @@ -2312,7 +2404,7 @@ packages: resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} engines: {node: '>= 0.4'} dependencies: - is-callable: 1.2.4 + is-callable: 1.2.6 is-date-object: 1.0.5 is-symbol: 1.0.4 @@ -2338,12 +2430,14 @@ packages: dev: true optional: true - /esbuild-android-64/0.15.6: - resolution: {integrity: sha512-Z1CHSgB1crVQi2LKSBwSkpaGtaloVz0ZIYcRMsvHc3uSXcR/x5/bv9wcZspvH/25lIGTaViosciS/NS09ERmVA==} + /esbuild-android-64/0.15.8: + resolution: {integrity: sha512-bVh8FIKOolF7/d4AMzt7xHlL0Ljr+mYKSHI39TJWDkybVWHdn6+4ODL3xZGHOxPpdRpitemXA1WwMKYBsw8dGw==} engines: {node: '>=12'} cpu: [x64] os: [android] requiresBuild: true + dependencies: + esbuild-wasm: 0.15.8 dev: true optional: true @@ -2365,8 +2459,8 @@ packages: dev: true optional: true - /esbuild-android-arm64/0.15.6: - resolution: {integrity: sha512-mvM+gqNxqKm2pCa3dnjdRzl7gIowuc4ga7P7c3yHzs58Im8v/Lfk1ixSgQ2USgIywT48QWaACRa3F4MG7djpSw==} + /esbuild-android-arm64/0.15.8: + resolution: {integrity: sha512-ReAMDAHuo0H1h9LxRabI6gwYPn8k6WiUeyxuMvx17yTrJO+SCnIfNc/TSPFvDwtK9MiyiKG/2dBYHouT/M0BXQ==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -2392,8 +2486,8 @@ packages: dev: true optional: true - /esbuild-darwin-64/0.15.6: - resolution: {integrity: sha512-BsfVt3usScAfGlXJiGtGamwVEOTM8AiYiw1zqDWhGv6BncLXCnTg1As+90mxWewdTZKq3iIy8s9g8CKkrrAXVw==} + /esbuild-darwin-64/0.15.8: + resolution: {integrity: sha512-KaKcGfJ+yto7Fo5gAj3xwxHMd1fBIKatpCHK8znTJLVv+9+NN2/tIPBqA4w5rBwjX0UqXDeIE2v1xJP+nGEXgA==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -2419,8 +2513,8 @@ packages: dev: true optional: true - /esbuild-darwin-arm64/0.15.6: - resolution: {integrity: sha512-CnrAeJaEpPakUobhqO4wVSA4Zm6TPaI5UY4EsI62j9mTrjIyQPXA1n4Ju6Iu5TVZRnEqV6q8blodgYJ6CJuwCA==} + /esbuild-darwin-arm64/0.15.8: + resolution: {integrity: sha512-8tjEaBgAKnXCkP7bhEJmEqdG9HEV6oLkF36BrMzpfW2rgaw0c48Zrxe+9RlfeGvs6gDF4w+agXyTjikzsS3izw==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -2446,8 +2540,8 @@ packages: dev: true optional: true - /esbuild-freebsd-64/0.15.6: - resolution: {integrity: sha512-+qFdmqi+jkAsxsNJkaWVrnxEUUI50nu6c3MBVarv3RCDCbz7ZS1a4ZrdkwEYFnKcVWu6UUE0Kkb1SQ1yGEG6sg==} + /esbuild-freebsd-64/0.15.8: + resolution: {integrity: sha512-jaxcsGHYzn2L0/lffON2WfH4Nc+d/EwozVTP5K2v016zxMb5UQMhLoJzvLgBqHT1SG0B/mO+a+THnJCMVg15zw==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -2473,8 +2567,8 @@ packages: dev: true optional: true - /esbuild-freebsd-arm64/0.15.6: - resolution: {integrity: sha512-KtQkQOhnNciXm2yrTYZMD3MOm2zBiiwFSU+dkwNbcfDumzzUprr1x70ClTdGuZwieBS1BM/k0KajRQX7r504Xw==} + /esbuild-freebsd-arm64/0.15.8: + resolution: {integrity: sha512-2xp2UlljMvX8HExtcg7VHaeQk8OBU0CSl1j18B5CcZmSDkLF9p3utuMXIopG3a08fr9Hv+Dz6+seSXUow/G51w==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -2500,8 +2594,8 @@ packages: dev: true optional: true - /esbuild-linux-32/0.15.6: - resolution: {integrity: sha512-IAkDNz3TpxwISTGVdQijwyHBZrbFgLlRi5YXcvaEHtgbmayLSDcJmH5nV1MFgo/x2QdKcHBkOYHdjhKxUAcPwg==} + /esbuild-linux-32/0.15.8: + resolution: {integrity: sha512-9u1E54BRz1FQMl86iaHK146+4ID2KYNxL3trLZT4QLLx3M7Q9n4lGG3lrzqUatGR2cKy8c33b0iaCzsItZWkFg==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -2527,8 +2621,8 @@ packages: dev: true optional: true - /esbuild-linux-64/0.15.6: - resolution: {integrity: sha512-gQPksyrEYfA4LJwyfTQWAZaVZCx4wpaLrSzo2+Xc9QLC+i/sMWmX31jBjrn4nLJCd79KvwCinto36QC7BEIU/A==} + /esbuild-linux-64/0.15.8: + resolution: {integrity: sha512-4HxrsN9eUzJXdVGMTYA5Xler82FuZUu21bXKN42zcLHHNKCAMPUzD62I+GwDhsdgUBAUj0tRXDdsQHgaP6v0HA==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -2554,8 +2648,8 @@ packages: dev: true optional: true - /esbuild-linux-arm/0.15.6: - resolution: {integrity: sha512-xZ0Bq2aivsthDjA/ytQZzxrxIZbG0ATJYMJxNeOIBc1zUjpbVpzBKgllOZMsTSXMHFHGrow6TnCcgwqY0+oEoQ==} + /esbuild-linux-arm/0.15.8: + resolution: {integrity: sha512-7DVBU9SFjX4+vBwt8tHsUCbE6Vvl6y6FQWHAgyw1lybC5gULqn/WnjHYHN2/LJaZRsDBvxWT4msEgwLGq1Wd3Q==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -2581,8 +2675,8 @@ packages: dev: true optional: true - /esbuild-linux-arm64/0.15.6: - resolution: {integrity: sha512-aovDkclFa6C9EdZVBuOXxqZx83fuoq8097xZKhEPSygwuy4Lxs8J4anHG7kojAsR+31lfUuxzOo2tHxv7EiNHA==} + /esbuild-linux-arm64/0.15.8: + resolution: {integrity: sha512-1OCm7Aq0tEJT70PbxmHSGYDLYP8DKH8r4Nk7/XbVzWaduo9beCjGBB+tGZIHK6DdTQ3h00/4Tb/70YMH/bOtKg==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -2608,8 +2702,8 @@ packages: dev: true optional: true - /esbuild-linux-mips64le/0.15.6: - resolution: {integrity: sha512-wVpW8wkWOGizsCqCwOR/G3SHwhaecpGy3fic9BF1r7vq4djLjUcA8KunDaBCjJ6TgLQFhJ98RjDuyEf8AGjAvw==} + /esbuild-linux-mips64le/0.15.8: + resolution: {integrity: sha512-yeFoNPVFPEzZvFYBfUQNG2TjGRaCyV1E27OcOg4LOtnGrxb2wA+mkW3luckyv1CEyd00mpAg7UdHx8nlx3ghgA==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -2635,8 +2729,8 @@ packages: dev: true optional: true - /esbuild-linux-ppc64le/0.15.6: - resolution: {integrity: sha512-z6w6gsPH/Y77uchocluDC8tkCg9rfkcPTePzZKNr879bF4tu7j9t255wuNOCE396IYEGxY7y8u2HJ9i7kjCLVw==} + /esbuild-linux-ppc64le/0.15.8: + resolution: {integrity: sha512-CEyMMUUNabXibw8OSNmBXhOIGhnjNVl5Lpseiuf00iKN0V47oqDrbo4dsHz1wH62m49AR8iG8wpDlTqfYgKbtg==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -2662,8 +2756,8 @@ packages: dev: true optional: true - /esbuild-linux-riscv64/0.15.6: - resolution: {integrity: sha512-pfK/3MJcmbfU399TnXW5RTPS1S+ID6ra+CVj9TFZ2s0q9Ja1F5A1VirUUvViPkjiw+Kq3zveyn6U09Wg1zJXrw==} + /esbuild-linux-riscv64/0.15.8: + resolution: {integrity: sha512-OCGSOaspMUjexSCU8ZiA0UnV/NiRU+s2vIfEcAQWQ6u32R+2luyfh/4ZaY6jFbylJE07Esc/yRvb9Q5fXuClXA==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -2689,8 +2783,8 @@ packages: dev: true optional: true - /esbuild-linux-s390x/0.15.6: - resolution: {integrity: sha512-OZeeDu32liefcwAE63FhVqM4heWTC8E3MglOC7SK0KYocDdY/6jyApw0UDkDHlcEK9mW6alX/SH9r3PDjcCo/Q==} + /esbuild-linux-s390x/0.15.8: + resolution: {integrity: sha512-RHdpdfxRTSrZXZJlFSLazFU4YwXLB5Rgf6Zr5rffqSsO4y9JybgtKO38bFwxZNlDXliYISXN/YROKrG9s7mZQA==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -2716,8 +2810,8 @@ packages: dev: true optional: true - /esbuild-netbsd-64/0.15.6: - resolution: {integrity: sha512-kaxw61wcHMyiEsSsi5ut1YYs/hvTC2QkxJwyRvC2Cnsz3lfMLEu8zAjpBKWh9aU/N0O/gsRap4wTur5GRuSvBA==} + /esbuild-netbsd-64/0.15.8: + resolution: {integrity: sha512-VolFFRatBH09T5QMWhiohAWCOien1R1Uz9K0BRVVTBgBaVBt7eArsXTKxVhUgRf2vwu2c2SXkuP0r7HLG0eozw==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -2743,8 +2837,8 @@ packages: dev: true optional: true - /esbuild-openbsd-64/0.15.6: - resolution: {integrity: sha512-CuoY60alzYfIZapUHqFXqXbj88bbRJu8Fp9okCSHRX2zWIcGz4BXAHXiG7dlCye5nFVrY72psesLuWdusyf2qw==} + /esbuild-openbsd-64/0.15.8: + resolution: {integrity: sha512-HTAPlg+n4kUeE/isQxlCfsOz0xJGNoT5LJ9oYZWFKABfVf4Ycu7Zlf5ITgOnrdheTkz8JeL/gISIOCFAoOXrSA==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -2770,8 +2864,8 @@ packages: dev: true optional: true - /esbuild-sunos-64/0.15.6: - resolution: {integrity: sha512-1ceefLdPWcd1nW/ZLruPEYxeUEAVX0YHbG7w+BB4aYgfknaLGotI/ZvPWUZpzhC8l1EybrVlz++lm3E6ODIJOg==} + /esbuild-sunos-64/0.15.8: + resolution: {integrity: sha512-qMP/jR/FzcIOwKj+W+Lb+8Cfr8GZHbHUJxAPi7DUhNZMQ/6y7sOgRzlOSpRrbbUntrRZh0MqOyDhJ3Gpo6L1QA==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -2779,6 +2873,14 @@ packages: dev: true optional: true + /esbuild-wasm/0.15.8: + resolution: {integrity: sha512-Y7uCl5RNO4URjlemjdx++ukVHEMt5s5AfMWYUnMiK4Sry+pPCvQIctzXq6r6FKCyGKjX6/NGMCqR2OX6aLxj0w==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + dev: true + optional: true + /esbuild-windows-32/0.14.39: resolution: {integrity: sha512-XPjwp2OgtEX0JnOlTgT6E5txbRp6Uw54Isorm3CwOtloJazeIWXuiwK0ONJBVb/CGbiCpS7iP2UahGgd2p1x+Q==} engines: {node: '>=12'} @@ -2797,8 +2899,8 @@ packages: dev: true optional: true - /esbuild-windows-32/0.15.6: - resolution: {integrity: sha512-pBqdOsKqCD5LRYiwF29PJRDJZi7/Wgkz46u3d17MRFmrLFcAZDke3nbdDa1c8YgY78RiemudfCeAemN8EBlIpA==} + /esbuild-windows-32/0.15.8: + resolution: {integrity: sha512-RKR1QHh4iWzjUhkP8Yqi75PPz/KS+b8zw3wUrzw6oAkj+iU5Qtyj61ZDaSG3Qf2vc6hTIUiPqVTqBH0NpXFNwg==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -2824,8 +2926,8 @@ packages: dev: true optional: true - /esbuild-windows-64/0.15.6: - resolution: {integrity: sha512-KpPOh4aTOo//g9Pk2oVAzXMpc9Sz9n5A9sZTmWqDSXCiiachfFhbuFlsKBGATYCVitXfmBIJ4nNYYWSOdz4hQg==} + /esbuild-windows-64/0.15.8: + resolution: {integrity: sha512-ag9ptYrsizgsR+PQE8QKeMqnosLvAMonQREpLw4evA4FFgOBMLEat/dY/9txbpozTw9eEOYyD3a4cE9yTu20FA==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -2851,8 +2953,8 @@ packages: dev: true optional: true - /esbuild-windows-arm64/0.15.6: - resolution: {integrity: sha512-DB3G2x9OvFEa00jV+OkDBYpufq5x/K7a6VW6E2iM896DG4ZnAvJKQksOsCPiM1DUaa+DrijXAQ/ZOcKAqf/3Hg==} + /esbuild-windows-arm64/0.15.8: + resolution: {integrity: sha512-dbpAb0VyPaUs9mgw65KRfQ9rqiWCHpNzrJusoPu+LpEoswosjt/tFxN7cd2l68AT4qWdBkzAjDLRon7uqMeWcg==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -2916,33 +3018,34 @@ packages: esbuild-windows-arm64: 0.14.51 dev: true - /esbuild/0.15.6: - resolution: {integrity: sha512-sgLOv3l4xklvXzzczhRwKRotyrfyZ2i1fCS6PTOLPd9wevDPArGU8HFtHrHCOcsMwTjLjzGm15gvC8uxVzQf+w==} + /esbuild/0.15.8: + resolution: {integrity: sha512-Remsk2dmr1Ia65sU+QasE6svJbsHe62lzR+CnjpUvbZ+uSYo1SitiOWPRfZQkCu82YWZBBKXiD/j0i//XWMZ+Q==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/linux-loong64': 0.15.6 - esbuild-android-64: 0.15.6 - esbuild-android-arm64: 0.15.6 - esbuild-darwin-64: 0.15.6 - esbuild-darwin-arm64: 0.15.6 - esbuild-freebsd-64: 0.15.6 - esbuild-freebsd-arm64: 0.15.6 - esbuild-linux-32: 0.15.6 - esbuild-linux-64: 0.15.6 - esbuild-linux-arm: 0.15.6 - esbuild-linux-arm64: 0.15.6 - esbuild-linux-mips64le: 0.15.6 - esbuild-linux-ppc64le: 0.15.6 - esbuild-linux-riscv64: 0.15.6 - esbuild-linux-s390x: 0.15.6 - esbuild-netbsd-64: 0.15.6 - esbuild-openbsd-64: 0.15.6 - esbuild-sunos-64: 0.15.6 - esbuild-windows-32: 0.15.6 - esbuild-windows-64: 0.15.6 - esbuild-windows-arm64: 0.15.6 + '@esbuild/android-arm': 0.15.8 + '@esbuild/linux-loong64': 0.15.8 + esbuild-android-64: 0.15.8 + esbuild-android-arm64: 0.15.8 + esbuild-darwin-64: 0.15.8 + esbuild-darwin-arm64: 0.15.8 + esbuild-freebsd-64: 0.15.8 + esbuild-freebsd-arm64: 0.15.8 + esbuild-linux-32: 0.15.8 + esbuild-linux-64: 0.15.8 + esbuild-linux-arm: 0.15.8 + esbuild-linux-arm64: 0.15.8 + esbuild-linux-mips64le: 0.15.8 + esbuild-linux-ppc64le: 0.15.8 + esbuild-linux-riscv64: 0.15.8 + esbuild-linux-s390x: 0.15.8 + esbuild-netbsd-64: 0.15.8 + esbuild-openbsd-64: 0.15.8 + esbuild-sunos-64: 0.15.8 + esbuild-windows-32: 0.15.8 + esbuild-windows-64: 0.15.8 + esbuild-windows-arm64: 0.15.8 dev: true /escalade/3.1.1: @@ -2968,10 +3071,9 @@ packages: /escape-string-regexp/5.0.0: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} engines: {node: '>=12'} - dev: true - /eslint-config-next/12.2.5_yqf6kl63nyoq5megxukfnom5rm: - resolution: {integrity: sha512-SOowilkqPzW6DxKp3a3SYlrfPi5Ajs9MIzp9gVfUDxxH9QFM5ElkR1hX5m/iICJuvCbWgQqFBiA3mCMozluniw==} + /eslint-config-next/12.3.1_irgkl5vooow2ydyo6aokmferha: + resolution: {integrity: sha512-EN/xwKPU6jz1G0Qi6Bd/BqMnHLyRAL0VsaQaWA7F3KkjAgZHi4f1uL1JKGWNxdQpHTW/sdGONBd0bzxUka/DJg==} peerDependencies: eslint: ^7.23.0 || ^8.0.0 typescript: '>=3.3.1' @@ -2979,32 +3081,32 @@ packages: typescript: optional: true dependencies: - '@next/eslint-plugin-next': 12.2.5 - '@rushstack/eslint-patch': 1.1.4 - '@typescript-eslint/parser': 5.33.1_yqf6kl63nyoq5megxukfnom5rm - eslint: 8.23.0 + '@next/eslint-plugin-next': 12.3.1 + '@rushstack/eslint-patch': 1.2.0 + '@typescript-eslint/parser': 5.38.0_irgkl5vooow2ydyo6aokmferha + eslint: 8.23.1 eslint-import-resolver-node: 0.3.6 - eslint-import-resolver-typescript: 2.7.1_faomjyrlgqmwswvqymymzkxcqi - eslint-plugin-import: 2.26.0_cr4p5kceqkifwvxd7gucq3rq4y - eslint-plugin-jsx-a11y: 6.6.1_eslint@8.23.0 - eslint-plugin-react: 7.30.1_eslint@8.23.0 - eslint-plugin-react-hooks: 4.6.0_eslint@8.23.0 - typescript: 4.8.2 + eslint-import-resolver-typescript: 2.7.1_hdzsmr7kawaomymueo2tso6fjq + eslint-plugin-import: 2.26.0_ar2mambzda7ptwcepuhox2isnu + eslint-plugin-jsx-a11y: 6.6.1_eslint@8.23.1 + eslint-plugin-react: 7.31.8_eslint@8.23.1 + eslint-plugin-react-hooks: 4.6.0_eslint@8.23.1 + typescript: 4.8.3 transitivePeerDependencies: - eslint-import-resolver-webpack - supports-color dev: true - /eslint-config-prettier/8.5.0_eslint@8.23.0: + /eslint-config-prettier/8.5.0_eslint@8.23.1: resolution: {integrity: sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.23.0 + eslint: 8.23.1 dev: true - /eslint-config-standard-with-typescript/22.0.0_iwibbfggshu5hux4tfpeicpepi: + /eslint-config-standard-with-typescript/22.0.0_fsqc7gnfr7ufpr4slszrtm5abq: resolution: {integrity: sha512-VA36U7UlFpwULvkdnh6MQj5GAV2Q+tT68ALLAwJP0ZuNXU2m0wX07uxX4qyLRdHgSzH4QJ73CveKBuSOYvh7vQ==} peerDependencies: '@typescript-eslint/eslint-plugin': ^5.0.0 @@ -3014,19 +3116,19 @@ packages: eslint-plugin-promise: ^6.0.0 typescript: '*' dependencies: - '@typescript-eslint/eslint-plugin': 5.36.1_lbwfnm54o3pmr3ypeqp3btnera - '@typescript-eslint/parser': 5.36.1_yqf6kl63nyoq5megxukfnom5rm - eslint: 8.23.0 - eslint-config-standard: 17.0.0_ci7jzfiysajw25w4iodapaa2cq - eslint-plugin-import: 2.26.0_wyxuyzvlfep3lsyoibc4fosfq4 - eslint-plugin-n: 15.2.5_eslint@8.23.0 - eslint-plugin-promise: 6.0.1_eslint@8.23.0 - typescript: 4.8.2 + '@typescript-eslint/eslint-plugin': 5.38.0_wsb62dxj2oqwgas4kadjymcmry + '@typescript-eslint/parser': 5.38.0_irgkl5vooow2ydyo6aokmferha + eslint: 8.23.1 + eslint-config-standard: 17.0.0_4nulviyjkaspo7v2xlghuwxbf4 + eslint-plugin-import: 2.26.0_cxqatnnjiq7ozd2bkspxnuicdq + eslint-plugin-n: 15.2.5_eslint@8.23.1 + eslint-plugin-promise: 6.0.1_eslint@8.23.1 + typescript: 4.8.3 transitivePeerDependencies: - supports-color dev: true - /eslint-config-standard/17.0.0_ci7jzfiysajw25w4iodapaa2cq: + /eslint-config-standard/17.0.0_4nulviyjkaspo7v2xlghuwxbf4: resolution: {integrity: sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg==} peerDependencies: eslint: ^8.0.1 @@ -3034,23 +3136,23 @@ packages: eslint-plugin-n: ^15.0.0 eslint-plugin-promise: ^6.0.0 dependencies: - eslint: 8.23.0 - eslint-plugin-import: 2.26.0_wyxuyzvlfep3lsyoibc4fosfq4 - eslint-plugin-n: 15.2.5_eslint@8.23.0 - eslint-plugin-promise: 6.0.1_eslint@8.23.0 + eslint: 8.23.1 + eslint-plugin-import: 2.26.0_cxqatnnjiq7ozd2bkspxnuicdq + eslint-plugin-n: 15.2.5_eslint@8.23.1 + eslint-plugin-promise: 6.0.1_eslint@8.23.1 dev: true - /eslint-etc/5.2.0_yqf6kl63nyoq5megxukfnom5rm: + /eslint-etc/5.2.0_irgkl5vooow2ydyo6aokmferha: resolution: {integrity: sha512-Gcm/NMa349FOXb1PEEfNMMyIANuorIc2/mI5Vfu1zENNsz+FBVhF62uY6gPUCigm/xDOc8JOnl+71WGnlzlDag==} peerDependencies: eslint: ^8.0.0 typescript: ^4.0.0 dependencies: - '@typescript-eslint/experimental-utils': 5.36.1_yqf6kl63nyoq5megxukfnom5rm - eslint: 8.23.0 - tsutils: 3.21.0_typescript@4.8.2 - tsutils-etc: 1.4.1_wiuexm5qkwqjb26ybzotkyfryy - typescript: 4.8.2 + '@typescript-eslint/experimental-utils': 5.38.0_irgkl5vooow2ydyo6aokmferha + eslint: 8.23.1 + tsutils: 3.21.0_typescript@4.8.3 + tsutils-etc: 1.4.1_z6vm2kq7mgolbbt5ogblrgsy5u + typescript: 4.8.3 transitivePeerDependencies: - supports-color dev: true @@ -3064,7 +3166,7 @@ packages: - supports-color dev: true - /eslint-import-resolver-typescript/2.7.1_faomjyrlgqmwswvqymymzkxcqi: + /eslint-import-resolver-typescript/2.7.1_hdzsmr7kawaomymueo2tso6fjq: resolution: {integrity: sha512-00UbgGwV8bSgUv34igBDbTOtKhqoRMy9bFjNehT40bXg6585PNIct8HhXZ0SybqB9rWtXj9crcku8ndDn/gIqQ==} engines: {node: '>=4'} peerDependencies: @@ -3072,8 +3174,8 @@ packages: eslint-plugin-import: '*' dependencies: debug: 4.3.4 - eslint: 8.23.0 - eslint-plugin-import: 2.26.0_cr4p5kceqkifwvxd7gucq3rq4y + eslint: 8.23.1 + eslint-plugin-import: 2.26.0_ar2mambzda7ptwcepuhox2isnu glob: 7.2.3 is-glob: 4.0.3 resolve: 1.22.1 @@ -3082,7 +3184,7 @@ packages: - supports-color dev: true - /eslint-module-utils/2.7.4_3iihsc2sc4cynzoez5mxaj4avq: + /eslint-module-utils/2.7.4_p4kveujfv4nmzmj4mix5hvnxlm: resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} engines: {node: '>=4'} peerDependencies: @@ -3103,16 +3205,15 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.33.1_yqf6kl63nyoq5megxukfnom5rm + '@typescript-eslint/parser': 5.38.0_irgkl5vooow2ydyo6aokmferha debug: 3.2.7 - eslint: 8.23.0 + eslint: 8.23.1 eslint-import-resolver-node: 0.3.6 - eslint-import-resolver-typescript: 2.7.1_faomjyrlgqmwswvqymymzkxcqi transitivePeerDependencies: - supports-color dev: true - /eslint-module-utils/2.7.4_ykymimdrk6u2mbikrjd7umy4sm: + /eslint-module-utils/2.7.4_ynomfj5kz5mbj5hbqjqvvursdy: resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} engines: {node: '>=4'} peerDependencies: @@ -3133,44 +3234,45 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.36.1_yqf6kl63nyoq5megxukfnom5rm + '@typescript-eslint/parser': 5.38.0_irgkl5vooow2ydyo6aokmferha debug: 3.2.7 - eslint: 8.23.0 + eslint: 8.23.1 eslint-import-resolver-node: 0.3.6 + eslint-import-resolver-typescript: 2.7.1_hdzsmr7kawaomymueo2tso6fjq transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-es/4.1.0_eslint@8.23.0: + /eslint-plugin-es/4.1.0_eslint@8.23.1: resolution: {integrity: sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=4.19.1' dependencies: - eslint: 8.23.0 + eslint: 8.23.1 eslint-utils: 2.1.0 regexpp: 3.2.0 dev: true - /eslint-plugin-etc/2.0.2_yqf6kl63nyoq5megxukfnom5rm: + /eslint-plugin-etc/2.0.2_irgkl5vooow2ydyo6aokmferha: resolution: {integrity: sha512-g3b95LCdTCwZA8On9EICYL8m1NMWaiGfmNUd/ftZTeGZDXrwujKXUr+unYzqKjKFo1EbqJ31vt+Dqzrdm/sUcw==} peerDependencies: eslint: ^8.0.0 typescript: ^4.0.0 dependencies: - '@phenomnomnominal/tsquery': 4.2.0_typescript@4.8.2 - '@typescript-eslint/experimental-utils': 5.36.1_yqf6kl63nyoq5megxukfnom5rm - eslint: 8.23.0 - eslint-etc: 5.2.0_yqf6kl63nyoq5megxukfnom5rm + '@phenomnomnominal/tsquery': 4.2.0_typescript@4.8.3 + '@typescript-eslint/experimental-utils': 5.38.0_irgkl5vooow2ydyo6aokmferha + eslint: 8.23.1 + eslint-etc: 5.2.0_irgkl5vooow2ydyo6aokmferha requireindex: 1.2.0 tslib: 2.4.0 - tsutils: 3.21.0_typescript@4.8.2 - typescript: 4.8.2 + tsutils: 3.21.0_typescript@4.8.3 + typescript: 4.8.3 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-import/2.26.0_cr4p5kceqkifwvxd7gucq3rq4y: + /eslint-plugin-import/2.26.0_ar2mambzda7ptwcepuhox2isnu: resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} engines: {node: '>=4'} peerDependencies: @@ -3180,14 +3282,14 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.33.1_yqf6kl63nyoq5megxukfnom5rm + '@typescript-eslint/parser': 5.38.0_irgkl5vooow2ydyo6aokmferha array-includes: 3.1.5 array.prototype.flat: 1.3.0 debug: 2.6.9 doctrine: 2.1.0 - eslint: 8.23.0 + eslint: 8.23.1 eslint-import-resolver-node: 0.3.6 - eslint-module-utils: 2.7.4_3iihsc2sc4cynzoez5mxaj4avq + eslint-module-utils: 2.7.4_ynomfj5kz5mbj5hbqjqvvursdy has: 1.0.3 is-core-module: 2.10.0 is-glob: 4.0.3 @@ -3201,7 +3303,7 @@ packages: - supports-color dev: true - /eslint-plugin-import/2.26.0_wyxuyzvlfep3lsyoibc4fosfq4: + /eslint-plugin-import/2.26.0_cxqatnnjiq7ozd2bkspxnuicdq: resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} engines: {node: '>=4'} peerDependencies: @@ -3211,14 +3313,14 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.36.1_yqf6kl63nyoq5megxukfnom5rm + '@typescript-eslint/parser': 5.38.0_irgkl5vooow2ydyo6aokmferha array-includes: 3.1.5 array.prototype.flat: 1.3.0 debug: 2.6.9 doctrine: 2.1.0 - eslint: 8.23.0 + eslint: 8.23.1 eslint-import-resolver-node: 0.3.6 - eslint-module-utils: 2.7.4_ykymimdrk6u2mbikrjd7umy4sm + eslint-module-utils: 2.7.4_p4kveujfv4nmzmj4mix5hvnxlm has: 1.0.3 is-core-module: 2.10.0 is-glob: 4.0.3 @@ -3232,7 +3334,7 @@ packages: - supports-color dev: true - /eslint-plugin-jsdoc/39.3.6_eslint@8.23.0: + /eslint-plugin-jsdoc/39.3.6_eslint@8.23.1: resolution: {integrity: sha512-R6dZ4t83qPdMhIOGr7g2QII2pwCjYyKP+z0tPOfO1bbAbQyKC20Y2Rd6z1te86Lq3T7uM8bNo+VD9YFpE8HU/g==} engines: {node: ^14 || ^16 || ^17 || ^18} peerDependencies: @@ -3242,7 +3344,7 @@ packages: comment-parser: 1.3.1 debug: 4.3.4 escape-string-regexp: 4.0.0 - eslint: 8.23.0 + eslint: 8.23.1 esquery: 1.4.0 semver: 7.3.7 spdx-expression-parse: 3.0.1 @@ -3250,13 +3352,13 @@ packages: - supports-color dev: true - /eslint-plugin-jsx-a11y/6.6.1_eslint@8.23.0: + /eslint-plugin-jsx-a11y/6.6.1_eslint@8.23.1: resolution: {integrity: sha512-sXgFVNHiWffBq23uiS/JaP6eVR622DqwB4yTzKvGZGcPq6/yZ3WmOZfuBks/vHWo9GaFOqC2ZK4i6+C35knx7Q==} engines: {node: '>=4.0'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: - '@babel/runtime': 7.18.9 + '@babel/runtime': 7.19.0 aria-query: 4.2.2 array-includes: 3.1.5 ast-types-flow: 0.0.7 @@ -3264,7 +3366,7 @@ packages: axobject-query: 2.2.0 damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 - eslint: 8.23.0 + eslint: 8.23.1 has: 1.0.3 jsx-ast-utils: 3.3.3 language-tags: 1.0.5 @@ -3272,16 +3374,16 @@ packages: semver: 6.3.0 dev: true - /eslint-plugin-n/15.2.5_eslint@8.23.0: + /eslint-plugin-n/15.2.5_eslint@8.23.1: resolution: {integrity: sha512-8+BYsqiyZfpu6NXmdLOXVUfk8IocpCjpd8nMRRH0A9ulrcemhb2VI9RSJMEy5udx++A/YcVPD11zT8hpFq368g==} engines: {node: '>=12.22.0'} peerDependencies: eslint: '>=7.0.0' dependencies: builtins: 5.0.1 - eslint: 8.23.0 - eslint-plugin-es: 4.1.0_eslint@8.23.0 - eslint-utils: 3.0.0_eslint@8.23.0 + eslint: 8.23.1 + eslint-plugin-es: 4.1.0_eslint@8.23.1 + eslint-utils: 3.0.0_eslint@8.23.1 ignore: 5.2.0 is-core-module: 2.10.0 minimatch: 3.1.2 @@ -3294,26 +3396,26 @@ packages: engines: {node: '>=4.0.0'} dev: true - /eslint-plugin-promise/6.0.1_eslint@8.23.0: + /eslint-plugin-promise/6.0.1_eslint@8.23.1: resolution: {integrity: sha512-uM4Tgo5u3UWQiroOyDEsYcVMOo7re3zmno0IZmB5auxoaQNIceAbXEkSt8RNrKtaYehARHG06pYK6K1JhtP0Zw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.23.0 + eslint: 8.23.1 dev: true - /eslint-plugin-react-hooks/4.6.0_eslint@8.23.0: + /eslint-plugin-react-hooks/4.6.0_eslint@8.23.1: resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 dependencies: - eslint: 8.23.0 + eslint: 8.23.1 dev: true - /eslint-plugin-react/7.30.1_eslint@8.23.0: - resolution: {integrity: sha512-NbEvI9jtqO46yJA3wcRF9Mo0lF9T/jhdHqhCHXiXtD+Zcb98812wvokjWpU7Q4QH5edo6dmqrukxVvWWXHlsUg==} + /eslint-plugin-react/7.31.8_eslint@8.23.1: + resolution: {integrity: sha512-5lBTZmgQmARLLSYiwI71tiGVTLUuqXantZM6vlSY39OaDSV0M7+32K5DnLkmFrwTe+Ksz0ffuLUC91RUviVZfw==} engines: {node: '>=4'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 @@ -3321,7 +3423,7 @@ packages: array-includes: 3.1.5 array.prototype.flatmap: 1.3.0 doctrine: 2.1.0 - eslint: 8.23.0 + eslint: 8.23.1 estraverse: 5.3.0 jsx-ast-utils: 3.3.3 minimatch: 3.1.2 @@ -3335,17 +3437,17 @@ packages: string.prototype.matchall: 4.0.7 dev: true - /eslint-plugin-unicorn/42.0.0_eslint@8.23.0: + /eslint-plugin-unicorn/42.0.0_eslint@8.23.1: resolution: {integrity: sha512-ixBsbhgWuxVaNlPTT8AyfJMlhyC5flCJFjyK3oKE8TRrwBnaHvUbuIkCM1lqg8ryYrFStL/T557zfKzX4GKSlg==} engines: {node: '>=12'} peerDependencies: eslint: '>=8.8.0' dependencies: - '@babel/helper-validator-identifier': 7.18.6 - ci-info: 3.3.2 + '@babel/helper-validator-identifier': 7.19.1 + ci-info: 3.4.0 clean-regexp: 1.0.0 - eslint: 8.23.0 - eslint-utils: 3.0.0_eslint@8.23.0 + eslint: 8.23.1 + eslint-utils: 3.0.0_eslint@8.23.1 esquery: 1.4.0 indent-string: 4.0.0 is-builtin-module: 3.2.0 @@ -3381,13 +3483,13 @@ packages: eslint-visitor-keys: 1.3.0 dev: true - /eslint-utils/3.0.0_eslint@8.23.0: + /eslint-utils/3.0.0_eslint@8.23.1: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.23.0 + eslint: 8.23.1 eslint-visitor-keys: 2.1.0 dev: true @@ -3406,13 +3508,13 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint/8.23.0: - resolution: {integrity: sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==} + /eslint/8.23.1: + resolution: {integrity: sha512-w7C1IXCc6fNqjpuYd0yPlcTKKmHlHHktRkzmBPZ+7cvNBQuiNjx0xaMTjAJGCafJhQkrFJooREv0CtrVzmHwqg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint/eslintrc': 1.3.1 - '@humanwhocodes/config-array': 0.10.4 + '@eslint/eslintrc': 1.3.2 + '@humanwhocodes/config-array': 0.10.5 '@humanwhocodes/gitignore-to-minimatch': 1.0.2 '@humanwhocodes/module-importer': 1.0.1 ajv: 6.12.6 @@ -3422,7 +3524,7 @@ packages: doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.1.1 - eslint-utils: 3.0.0_eslint@8.23.0 + eslint-utils: 3.0.0_eslint@8.23.1 eslint-visitor-keys: 3.3.0 espree: 9.4.0 esquery: 1.4.0 @@ -3430,7 +3532,6 @@ packages: fast-deep-equal: 3.1.3 file-entry-cache: 6.0.1 find-up: 5.0.0 - functional-red-black-tree: 1.0.1 glob-parent: 6.0.2 globals: 13.17.0 globby: 11.1.0 @@ -3439,6 +3540,7 @@ packages: import-fresh: 3.3.0 imurmurhash: 0.1.4 is-glob: 4.0.3 + js-sdsl: 4.1.4 js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 @@ -3507,6 +3609,10 @@ packages: engines: {node: '>=6'} dev: true + /eventemitter3/4.0.7: + resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} + dev: false + /events/3.3.0: resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} engines: {node: '>=0.8.x'} @@ -3548,6 +3654,15 @@ packages: strip-final-newline: 3.0.0 dev: true + /external-editor/3.1.0: + resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} + engines: {node: '>=4'} + dependencies: + chardet: 0.7.0 + iconv-lite: 0.4.24 + tmp: 0.0.33 + dev: false + /fast-deep-equal/3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -3555,8 +3670,8 @@ packages: resolution: {integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==} dev: true - /fast-glob/3.2.11: - resolution: {integrity: sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==} + /fast-glob/3.2.12: + resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==} engines: {node: '>=8.6.0'} dependencies: '@nodelib/fs.stat': 2.0.5 @@ -3585,9 +3700,17 @@ packages: engines: {node: '>=12'} dependencies: escape-string-regexp: 5.0.0 - is-unicode-supported: 1.2.0 + is-unicode-supported: 1.3.0 dev: true + /figures/5.0.0: + resolution: {integrity: sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==} + engines: {node: '>=14'} + dependencies: + escape-string-regexp: 5.0.0 + is-unicode-supported: 1.3.0 + dev: false + /file-entry-cache/6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -3653,7 +3776,7 @@ packages: /for-each/0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} dependencies: - is-callable: 1.2.4 + is-callable: 1.2.6 /fs.realpath/1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} @@ -3676,13 +3799,9 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.1 + es-abstract: 1.20.2 functions-have-names: 1.2.3 - /functional-red-black-tree/1.0.1: - resolution: {integrity: sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==} - dev: true - /functions-have-names/1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} @@ -3722,8 +3841,8 @@ packages: resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} dev: true - /get-intrinsic/1.1.2: - resolution: {integrity: sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==} + /get-intrinsic/1.1.3: + resolution: {integrity: sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==} dependencies: function-bind: 1.1.1 has: 1.0.3 @@ -3744,7 +3863,7 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.1.2 + get-intrinsic: 1.1.3 /git-rev-sync/3.0.2: resolution: {integrity: sha512-Nd5RiYpyncjLv0j6IONy0lGzAqdRXUaBctuGBbrEA2m6Bn4iDrN/9MeQTXuiquw8AEKL9D2BW0nw5m/lQvxqnQ==} @@ -3814,7 +3933,7 @@ packages: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.2.11 + fast-glob: 3.2.12 ignore: 5.2.0 merge2: 1.4.1 slash: 3.0.0 @@ -3825,7 +3944,7 @@ packages: engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: dir-glob: 3.0.1 - fast-glob: 3.2.11 + fast-glob: 3.2.12 ignore: 5.2.0 merge2: 1.4.1 slash: 4.0.0 @@ -3843,11 +3962,6 @@ packages: resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} dev: true - /growl/1.10.5: - resolution: {integrity: sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==} - engines: {node: '>=4.x'} - dev: true - /has-bigints/1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} @@ -3855,7 +3969,7 @@ packages: resolution: {integrity: sha512-X3fbtsZmwb6W7fJGR9o7x65fZoodygCrZ3TVycvghP62yYQfS0t4RS0Qcz+j5tQYUKeSWS09tHkWW6WhFV3XhQ==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.1.2 + get-intrinsic: 1.1.3 dev: true /has-flag/3.0.0: @@ -3871,7 +3985,7 @@ packages: /has-property-descriptors/1.0.0: resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} dependencies: - get-intrinsic: 1.1.2 + get-intrinsic: 1.1.3 /has-symbols/1.0.3: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} @@ -3897,23 +4011,23 @@ packages: resolution: {integrity: sha512-zVEtGhFUivNAUAU4J0PDP7lLspmB1a82yHkuEv4qXbiUmBkWP7y0tqb4p6QxiVM+1tPETGR0RhKT/UggD6CWtA==} engines: {node: '>=14'} dependencies: - '@typescript-eslint/eslint-plugin': 5.36.1_lbwfnm54o3pmr3ypeqp3btnera - '@typescript-eslint/parser': 5.36.1_yqf6kl63nyoq5megxukfnom5rm - eslint: 8.23.0 - eslint-config-prettier: 8.5.0_eslint@8.23.0 - eslint-config-standard: 17.0.0_ci7jzfiysajw25w4iodapaa2cq - eslint-config-standard-with-typescript: 22.0.0_iwibbfggshu5hux4tfpeicpepi - eslint-plugin-etc: 2.0.2_yqf6kl63nyoq5megxukfnom5rm - eslint-plugin-import: 2.26.0_wyxuyzvlfep3lsyoibc4fosfq4 - eslint-plugin-jsdoc: 39.3.6_eslint@8.23.0 - eslint-plugin-n: 15.2.5_eslint@8.23.0 + '@typescript-eslint/eslint-plugin': 5.38.0_wsb62dxj2oqwgas4kadjymcmry + '@typescript-eslint/parser': 5.38.0_irgkl5vooow2ydyo6aokmferha + eslint: 8.23.1 + eslint-config-prettier: 8.5.0_eslint@8.23.1 + eslint-config-standard: 17.0.0_4nulviyjkaspo7v2xlghuwxbf4 + eslint-config-standard-with-typescript: 22.0.0_fsqc7gnfr7ufpr4slszrtm5abq + eslint-plugin-etc: 2.0.2_irgkl5vooow2ydyo6aokmferha + eslint-plugin-import: 2.26.0_cxqatnnjiq7ozd2bkspxnuicdq + eslint-plugin-jsdoc: 39.3.6_eslint@8.23.1 + eslint-plugin-n: 15.2.5_eslint@8.23.1 eslint-plugin-no-only-tests: 2.6.0 - eslint-plugin-promise: 6.0.1_eslint@8.23.0 - eslint-plugin-unicorn: 42.0.0_eslint@8.23.0 + eslint-plugin-promise: 6.0.1_eslint@8.23.1 + eslint-plugin-unicorn: 42.0.0_eslint@8.23.1 lint-staged: 12.5.0 prettier: 2.7.1 simple-git-hooks: 2.8.0 - typescript: 4.8.2 + typescript: 4.8.3 transitivePeerDependencies: - enquirer - eslint-import-resolver-typescript @@ -3958,6 +4072,13 @@ packages: engines: {node: '>=12.20.0'} dev: true + /iconv-lite/0.4.24: + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} + dependencies: + safer-buffer: 2.1.2 + dev: false + /ieee754/1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -4004,11 +4125,32 @@ packages: /inherits/2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + /inquirer/9.1.2: + resolution: {integrity: sha512-Hj2Ml1WpxKJU2npP2Rj0OURGkHV+GtNW2CwFdHDiXlqUBAUrWTcZHxCkFywX/XHzOS7wrG/kExgJFbUkVgyHzg==} + engines: {node: '>=12.0.0'} + dependencies: + ansi-escapes: 5.0.0 + chalk: 5.0.1 + cli-cursor: 4.0.0 + cli-width: 4.0.0 + external-editor: 3.1.0 + figures: 5.0.0 + lodash: 4.17.21 + mute-stream: 0.0.8 + ora: 6.1.2 + run-async: 2.4.1 + rxjs: 7.5.6 + string-width: 5.1.2 + strip-ansi: 7.0.1 + through: 2.3.8 + wrap-ansi: 8.0.1 + dev: false + /internal-slot/1.0.3: resolution: {integrity: sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.1.2 + get-intrinsic: 1.1.3 has: 1.0.3 side-channel: 1.0.4 @@ -4059,8 +4201,8 @@ packages: builtin-modules: 3.3.0 dev: true - /is-callable/1.2.4: - resolution: {integrity: sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==} + /is-callable/1.2.6: + resolution: {integrity: sha512-krO72EO2NptOGAX2KYyqbP9vYMlNAXdB53rq6f8LXY6RY7JdSR/3BD6wLUlPHSAesmY9vstNrjvqGaCiRK/91Q==} engines: {node: '>= 0.4'} /is-core-module/2.10.0: @@ -4069,12 +4211,6 @@ packages: has: 1.0.3 dev: true - /is-core-module/2.9.0: - resolution: {integrity: sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==} - dependencies: - has: 1.0.3 - dev: true - /is-date-object/1.0.5: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} engines: {node: '>= 0.4'} @@ -4224,7 +4360,7 @@ packages: dependencies: available-typed-arrays: 1.0.5 call-bind: 1.0.2 - es-abstract: 1.20.1 + es-abstract: 1.20.2 for-each: 0.3.3 has-tostringtag: 1.0.0 @@ -4233,8 +4369,8 @@ packages: engines: {node: '>=10'} dev: true - /is-unicode-supported/1.2.0: - resolution: {integrity: sha512-wH+U77omcRzevfIG8dDhTS0V9zZyweakfD01FULl97+0EHiJTTZtJqxPSkIIo/SDPv/i07k/C9jAPY+jwLLeUQ==} + /is-unicode-supported/1.3.0: + resolution: {integrity: sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==} engines: {node: '>=12'} /is-weakmap/2.0.1: @@ -4250,7 +4386,7 @@ packages: resolution: {integrity: sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.1.2 + get-intrinsic: 1.1.3 dev: true /isarray/1.0.0: @@ -4265,6 +4401,18 @@ packages: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: true + /isomorphic-ws/5.0.0_ws@8.8.1: + resolution: {integrity: sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==} + peerDependencies: + ws: '*' + dependencies: + ws: 8.8.1 + dev: false + + /js-sdsl/4.1.4: + resolution: {integrity: sha512-Y2/yD55y5jteOAmY50JbUZYwk3CP3wnLPEZnlR1w9oKhITrBEtAxwuWKebFf8hMrPMgbYwFoWK/lH2sBkErELw==} + dev: true + /js-string-escape/1.0.1: resolution: {integrity: sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==} engines: {node: '>= 0.8'} @@ -4361,6 +4509,11 @@ packages: engines: {node: '>=10'} dev: true + /lilconfig/2.0.6: + resolution: {integrity: sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==} + engines: {node: '>=10'} + dev: true + /lines-and-columns/1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true @@ -4373,7 +4526,7 @@ packages: cli-truncate: 3.1.0 colorette: 2.0.19 commander: 9.4.0 - debug: 4.3.4_supports-color@9.2.2 + debug: 4.3.4_supports-color@9.2.3 execa: 5.1.1 lilconfig: 2.0.5 listr2: 4.0.5 @@ -4382,7 +4535,7 @@ packages: object-inspect: 1.12.2 pidtree: 0.5.0 string-argv: 0.3.1 - supports-color: 9.2.2 + supports-color: 9.2.3 yaml: 1.10.2 transitivePeerDependencies: - enquirer @@ -4470,7 +4623,6 @@ packages: /lodash/4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - dev: true /log-symbols/4.1.0: resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} @@ -4485,7 +4637,7 @@ packages: engines: {node: '>=12'} dependencies: chalk: 5.0.1 - is-unicode-supported: 1.2.0 + is-unicode-supported: 1.3.0 /log-update/4.0.0: resolution: {integrity: sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==} @@ -4617,12 +4769,12 @@ packages: engines: {node: '>=4'} dev: true - /miniflare/2.7.1: - resolution: {integrity: sha512-O9kjSORazNCAGVkS0bRHhKGH1LcFOJZyBD0TchB02TalnQ3W21+QWO5PAXDGz/IATO8C8iXrPnN2XKDdDav2CA==} + /miniflare/2.9.0: + resolution: {integrity: sha512-HBGQ5Jj6sMU1B1hX6G3ML46ThtUvu1nvxgXjDDmhp2RhWKYj0XvcohW/nPPL/MTP1gpvfT880De9EHmobVsDsw==} engines: {node: '>=16.13'} hasBin: true peerDependencies: - '@miniflare/storage-redis': 2.7.1 + '@miniflare/storage-redis': 2.9.0 cron-schedule: ^3.0.4 ioredis: ^4.27.9 peerDependenciesMeta: @@ -4633,21 +4785,23 @@ packages: ioredis: optional: true dependencies: - '@miniflare/cache': 2.7.1 - '@miniflare/cli-parser': 2.7.1 - '@miniflare/core': 2.7.1 - '@miniflare/durable-objects': 2.7.1 - '@miniflare/html-rewriter': 2.7.1 - '@miniflare/http-server': 2.7.1 - '@miniflare/kv': 2.7.1 - '@miniflare/r2': 2.7.1 - '@miniflare/runner-vm': 2.7.1 - '@miniflare/scheduler': 2.7.1 - '@miniflare/shared': 2.7.1 - '@miniflare/sites': 2.7.1 - '@miniflare/storage-file': 2.7.1 - '@miniflare/storage-memory': 2.7.1 - '@miniflare/web-sockets': 2.7.1 + '@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 @@ -4663,13 +4817,6 @@ packages: brace-expansion: 1.1.11 dev: true - /minimatch/4.2.1: - resolution: {integrity: sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==} - engines: {node: '>=10'} - dependencies: - brace-expansion: 1.1.11 - dev: true - /minimatch/5.0.1: resolution: {integrity: sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==} engines: {node: '>=10'} @@ -4717,37 +4864,6 @@ packages: yargs-unparser: 2.0.0 dev: true - /mocha/9.2.2: - resolution: {integrity: sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==} - engines: {node: '>= 12.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 - debug: 4.3.3_supports-color@8.1.1 - diff: 5.0.0 - escape-string-regexp: 4.0.0 - find-up: 5.0.0 - glob: 7.2.0 - growl: 1.10.5 - he: 1.2.0 - js-yaml: 4.1.0 - log-symbols: 4.1.0 - minimatch: 4.2.1 - ms: 2.1.3 - nanoid: 3.3.1 - serialize-javascript: 6.0.0 - strip-json-comments: 3.1.1 - supports-color: 8.1.1 - which: 2.0.2 - workerpool: 6.2.0 - yargs: 16.2.0 - yargs-parser: 20.2.4 - yargs-unparser: 2.0.0 - dev: true - /mri/1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -4769,8 +4885,8 @@ packages: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} dev: true - /multiformats/9.7.1: - resolution: {integrity: sha512-TaVmGEBt0fhxiNJMGphBfB+oGvUxFs8KgGvgl8d3C+GWtrFcvXdJ2196eg+dYhmSFClmgFfSfJEklo+SZzdNuw==} + /multiformats/9.9.0: + resolution: {integrity: sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==} dev: false /mustache/4.2.0: @@ -4778,11 +4894,9 @@ packages: hasBin: true dev: true - /nanoid/3.3.1: - resolution: {integrity: sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - dev: true + /mute-stream/0.0.8: + resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} + dev: false /nanoid/3.3.3: resolution: {integrity: sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==} @@ -4809,8 +4923,8 @@ packages: resolution: {integrity: sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw==} dev: true - /next/12.2.5_biqbaboplfbrettd7655fr4n2y: - resolution: {integrity: sha512-tBdjqX5XC/oFs/6gxrZhjmiq90YWizUYU6qOWAfat7zJwrwapJ+BYgX2PmiacunXMaRpeVT4vz5MSPSLgNkrpA==} + /next/12.3.1_biqbaboplfbrettd7655fr4n2y: + resolution: {integrity: sha512-l7bvmSeIwX5lp07WtIiP9u2ytZMv7jIeB8iacR28PuUEFG5j0HGAPnMqyG5kbZNBG2H7tRsrQ4HCjuMOPnANZw==} engines: {node: '>=12.22.0'} hasBin: true peerDependencies: @@ -4827,28 +4941,28 @@ packages: sass: optional: true dependencies: - '@next/env': 12.2.5 - '@swc/helpers': 0.4.3 - caniuse-lite: 1.0.30001378 + '@next/env': 12.3.1 + '@swc/helpers': 0.4.11 + caniuse-lite: 1.0.30001409 postcss: 8.4.14 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 - styled-jsx: 5.0.4_react@18.2.0 + styled-jsx: 5.0.7_react@18.2.0 use-sync-external-store: 1.2.0_react@18.2.0 optionalDependencies: - '@next/swc-android-arm-eabi': 12.2.5 - '@next/swc-android-arm64': 12.2.5 - '@next/swc-darwin-arm64': 12.2.5 - '@next/swc-darwin-x64': 12.2.5 - '@next/swc-freebsd-x64': 12.2.5 - '@next/swc-linux-arm-gnueabihf': 12.2.5 - '@next/swc-linux-arm64-gnu': 12.2.5 - '@next/swc-linux-arm64-musl': 12.2.5 - '@next/swc-linux-x64-gnu': 12.2.5 - '@next/swc-linux-x64-musl': 12.2.5 - '@next/swc-win32-arm64-msvc': 12.2.5 - '@next/swc-win32-ia32-msvc': 12.2.5 - '@next/swc-win32-x64-msvc': 12.2.5 + '@next/swc-android-arm-eabi': 12.3.1 + '@next/swc-android-arm64': 12.3.1 + '@next/swc-darwin-arm64': 12.3.1 + '@next/swc-darwin-x64': 12.3.1 + '@next/swc-freebsd-x64': 12.3.1 + '@next/swc-linux-arm-gnueabihf': 12.3.1 + '@next/swc-linux-arm64-gnu': 12.3.1 + '@next/swc-linux-arm64-musl': 12.3.1 + '@next/swc-linux-x64-gnu': 12.3.1 + '@next/swc-linux-x64-musl': 12.3.1 + '@next/swc-win32-arm64-msvc': 12.3.1 + '@next/swc-win32-ia32-msvc': 12.3.1 + '@next/swc-win32-x64-msvc': 12.3.1 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros @@ -4923,6 +5037,15 @@ packages: set-blocking: 2.0.0 dev: true + /npx-import/1.1.3: + resolution: {integrity: sha512-zy6249FJ81OtPsvz2y0+rgis31EN5wbdwBG2umtEh65W/4onYArHuoUSZ+W+T7BQYK7YF+h9G4CuGPusMCcLOw==} + dependencies: + execa: 6.1.0 + parse-package-name: 1.0.0 + semver: 7.3.7 + validate-npm-package-name: 4.0.0 + dev: true + /number-is-nan/1.0.1: resolution: {integrity: sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==} engines: {node: '>=0.10.0'} @@ -4963,7 +5086,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.1 + es-abstract: 1.20.2 dev: true /object.fromentries/2.0.5: @@ -4972,14 +5095,14 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.1 + es-abstract: 1.20.2 dev: true /object.hasown/1.1.1: resolution: {integrity: sha512-LYLe4tivNQzq4JdaWW6WO3HMZZJWzkkH8fnI6EebWl0VZth2wL2Lovm74ep2/gZzlaTdV62JZHEqHQ2yVn8Q/A==} dependencies: define-properties: 1.1.4 - es-abstract: 1.20.1 + es-abstract: 1.20.2 dev: true /object.values/1.1.5: @@ -4988,7 +5111,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.1 + es-abstract: 1.20.2 dev: true /once/1.4.0: @@ -4997,6 +5120,10 @@ packages: wrappy: 1.0.2 dev: true + /one-webcrypto/1.0.3: + resolution: {integrity: sha512-fu9ywBVBPx0gS9K0etIROTiCkvI5S1TDjFsYFb3rC1ewFxeOqsbzq7aIMBHsYfrTHBcGXJaONXXjTl8B01cW1Q==} + dev: false + /onetime/5.1.2: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} @@ -5031,11 +5158,16 @@ packages: cli-cursor: 4.0.0 cli-spinners: 2.7.0 is-interactive: 2.0.0 - is-unicode-supported: 1.2.0 + is-unicode-supported: 1.3.0 log-symbols: 5.1.0 strip-ansi: 7.0.1 wcwidth: 1.0.1 + /os-tmpdir/1.0.2: + resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} + engines: {node: '>=0.10.0'} + dev: false + /p-defer/1.0.0: resolution: {integrity: sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==} engines: {node: '>=4'} @@ -5129,6 +5261,14 @@ packages: aggregate-error: 4.0.1 dev: true + /p-queue/7.3.0: + resolution: {integrity: sha512-5fP+yVQ0qp0rEfZoDTlP2c3RYBgxvRsw30qO+VtPPc95lyvSG+x6USSh1TuLB4n96IO6I8/oXQGsTgtna4q2nQ==} + engines: {node: '>=12'} + dependencies: + eventemitter3: 4.0.7 + p-timeout: 5.1.0 + dev: false + /p-retry/5.1.1: resolution: {integrity: sha512-i69WkEU5ZAL8mrmdmVviWwU+DN+IUF8f4sSJThoJ3z5A7Nn5iuO5ROX3Boye0u+uYQLOSfgFl7SuFZCjlAVbQA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -5147,7 +5287,10 @@ packages: /p-timeout/5.1.0: resolution: {integrity: sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==} engines: {node: '>=12'} - dev: true + + /p-timeout/6.0.0: + resolution: {integrity: sha512-5iS61MOdUMemWH9CORQRxVXTp9g5K8rPnI9uQpo97aWgsH3vVXKjkIhDi+OgIDmN3Ly9+AZ2fZV01Wut1yzfKA==} + engines: {node: '>=14.16'} /p-try/2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} @@ -5160,6 +5303,12 @@ packages: p-timeout: 5.1.0 dev: true + /p-wait-for/5.0.0: + resolution: {integrity: sha512-nkxeZInKET8e78NTtqBgxpnxDLbiCiQnGdoTnkLkluovfTyI5UTCrGwPNOr6ewJ90NpWyxEFt1ToZ96LmIXXHQ==} + engines: {node: '>=12'} + dependencies: + p-timeout: 6.0.0 + /parent-module/1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} @@ -5182,6 +5331,10 @@ packages: engines: {node: '>=6'} dev: true + /parse-package-name/1.0.0: + resolution: {integrity: sha512-kBeTUtcj+SkyfaW4+KBe0HtsloBJ/mKTPoxpVdA57GZiPerREsUWJOhVj9anXweFiJkm5y8FG1sxFZkZ0SN6wg==} + dev: true + /path-browserify/1.0.1: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} dev: true @@ -5288,7 +5441,7 @@ packages: events: 3.3.0 globby: 13.1.2 kleur: 4.1.5 - lilconfig: 2.0.5 + lilconfig: 2.0.6 lodash: 4.17.21 merge-options: 3.0.4 nanoid: 3.3.4 @@ -5304,7 +5457,7 @@ packages: source-map: 0.6.1 stream-browserify: 3.0.0 strip-ansi: 7.0.1 - tape: 5.6.0 + tape: 5.6.1 tempy: 3.0.0 test-exclude: 6.0.0 v8-to-istanbul: 9.0.1 @@ -5541,7 +5694,7 @@ packages: resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} hasBin: true dependencies: - is-core-module: 2.9.0 + is-core-module: 2.10.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 dev: true @@ -5618,6 +5771,11 @@ packages: estree-walker: 0.6.1 dev: true + /run-async/2.4.1: + resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} + engines: {node: '>=0.12.0'} + dev: false + /run-parallel/1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: @@ -5628,7 +5786,6 @@ packages: resolution: {integrity: sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw==} dependencies: tslib: 2.4.0 - dev: true /sade/1.8.1: resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} @@ -5650,14 +5807,18 @@ packages: regexp-tree: 0.1.24 dev: true + /safer-buffer/2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + dev: false + /scheduler/0.23.0: resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==} dependencies: loose-envify: 1.4.0 dev: false - /selfsigned/2.0.1: - resolution: {integrity: sha512-LmME957M1zOsUhG+67rAjKfiWFox3SBxE/yymatMZsAx+oMrJ0YQ8AToOnyCm7xbeg2ep37IHLxdu0o2MavQOQ==} + /selfsigned/2.1.1: + resolution: {integrity: sha512-GSL3aowiF7wa/WtSFwnUrludWFoNhftq8bUkH9pkzjpN2XSPOAYEgg6e0sS9s0rZwgJzJiQRPU18A6clnoW5wQ==} engines: {node: '>=10'} dependencies: node-forge: 1.3.1 @@ -5732,7 +5893,7 @@ packages: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.1.2 + get-intrinsic: 1.1.3 object-inspect: 1.12.2 /signal-exit/3.0.7: @@ -5785,7 +5946,7 @@ packages: resolution: {integrity: sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==} engines: {node: '>=12'} dependencies: - ansi-styles: 6.1.0 + ansi-styles: 6.1.1 is-fullwidth-code-point: 4.0.0 dev: true @@ -5924,15 +6085,14 @@ packages: eastasianwidth: 0.2.0 emoji-regex: 9.2.2 strip-ansi: 7.0.1 - dev: true /string.prototype.matchall/4.0.7: resolution: {integrity: sha512-f48okCX7JiwVi1NXCVWcFnZgADDC/n2vePlQ/KUCNqCikLLilQvwjMO8+BHVKvgzH0JB0J9LEPgxOGT02RoETg==} dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.1 - get-intrinsic: 1.1.2 + es-abstract: 1.20.2 + get-intrinsic: 1.1.3 has-symbols: 1.0.3 internal-slot: 1.0.3 regexp.prototype.flags: 1.4.3 @@ -5945,7 +6105,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.1 + es-abstract: 1.20.2 dev: true /string.prototype.trimend/1.0.5: @@ -5953,14 +6113,14 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.1 + es-abstract: 1.20.2 /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.1 + es-abstract: 1.20.2 /string_decoder/1.1.1: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} @@ -6020,8 +6180,8 @@ packages: engines: {node: '>=8'} dev: true - /styled-jsx/5.0.4_react@18.2.0: - resolution: {integrity: sha512-sDFWLbg4zR+UkNzfk5lPilyIgtpddfxXEULxhujorr5jtePTUqiPDc5BC0v1NRqTr/WaFBGQQUoYToGlF4B2KQ==} + /styled-jsx/5.0.7_react@18.2.0: + resolution: {integrity: sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==} engines: {node: '>= 12.0.0'} peerDependencies: '@babel/core': '*' @@ -6067,8 +6227,8 @@ packages: has-flag: 4.0.0 dev: true - /supports-color/9.2.2: - resolution: {integrity: sha512-XC6g/Kgux+rJXmwokjm9ECpD6k/smUoS5LKlUCcsYr4IY3rW0XyAympon2RmxGrlnZURMpg5T18gWDP9CsHXFA==} + /supports-color/9.2.3: + resolution: {integrity: sha512-aszYUX/DVK/ed5rFLb/dDinVJrQjG/vmU433wtqVSD800rYsJNWxh2R3USV90aLSU+UsyQkbNeffVLzc6B6foA==} engines: {node: '>=12'} dev: true @@ -6077,8 +6237,8 @@ packages: engines: {node: '>= 0.4'} dev: true - /tape/5.6.0: - resolution: {integrity: sha512-LyM4uqbiTAqDgsHTY0r1LH66yE24P3SZaz5TL3mPUds0XCTFl/0AMUBrjgBjUclvbPTFB4IalXg0wFfbTuuu/Q==} + /tape/5.6.1: + resolution: {integrity: sha512-reNzS3rzsJtKk0f+zJx2XlzIsjJXlIcOIrIxk5shHAG/DzW3BKyMg8UfN79oluYlcWo4lIt56ahLqwgpRT4idg==} hasBin: true dependencies: array.prototype.every: 1.1.3 @@ -6134,13 +6294,19 @@ packages: /through/2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - dev: true /time-zone/1.0.0: resolution: {integrity: sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==} engines: {node: '>=4'} dev: true + /tmp/0.0.33: + resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} + engines: {node: '>=0.6.0'} + dependencies: + os-tmpdir: 1.0.2 + dev: false + /to-regex-range/5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -6191,7 +6357,7 @@ packages: /tslib/2.4.0: resolution: {integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==} - /tsutils-etc/1.4.1_wiuexm5qkwqjb26ybzotkyfryy: + /tsutils-etc/1.4.1_z6vm2kq7mgolbbt5ogblrgsy5u: resolution: {integrity: sha512-6UPYgc7OXcIW5tFxlsZF3OVSBvDInl/BkS3Xsu64YITXk7WrnWTVByKWPCThFDBp5gl5IGHOzGMdQuDCE7OL4g==} hasBin: true peerDependencies: @@ -6199,19 +6365,19 @@ packages: typescript: ^4.0.0 dependencies: '@types/yargs': 17.0.12 - tsutils: 3.21.0_typescript@4.8.2 - typescript: 4.8.2 + tsutils: 3.21.0_typescript@4.8.3 + typescript: 4.8.3 yargs: 17.5.1 dev: true - /tsutils/3.21.0_typescript@4.8.2: + /tsutils/3.21.0_typescript@4.8.3: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 4.8.2 + typescript: 4.8.3 dev: true /type-check/0.4.0: @@ -6254,25 +6420,24 @@ 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 - /typescript/4.8.2: - resolution: {integrity: sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==} - engines: {node: '>=4.2.0'} - hasBin: true - dev: true - /typescript/4.8.3: resolution: {integrity: sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==} engines: {node: '>=4.2.0'} hasBin: true dev: true + /uint8arrays/3.1.0: + resolution: {integrity: sha512-ei5rfKtoRO8OyOIor2Rz5fhzjThwIHJZ3uyDPnDHTXbP0aMQ1RN/6AI5B5d9dBxJOU+BvOAk7ZQ1xphsX8Lrog==} + dependencies: + multiformats: 9.9.0 + dev: false + /unbox-primitive/1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} dependencies: @@ -6344,6 +6509,13 @@ packages: spdx-expression-parse: 3.0.1 dev: true + /validate-npm-package-name/4.0.0: + resolution: {integrity: sha512-mzR0L8ZDktZjpX4OB46KT+56MAhl4EIazWP/+G/HPGuvfdaqg4YsCdtOm6U9+LOFyYDoh4dpnpxZRB9MQQns5Q==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + builtins: 5.0.1 + dev: true + /varint/6.0.0: resolution: {integrity: sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==} dev: false @@ -6413,7 +6585,7 @@ packages: dependencies: available-typed-arrays: 1.0.5 call-bind: 1.0.2 - es-abstract: 1.20.1 + es-abstract: 1.20.2 for-each: 0.3.3 has-tostringtag: 1.0.0 is-typed-array: 1.1.9 @@ -6437,16 +6609,12 @@ packages: engines: {node: '>=0.10.0'} dev: true - /workerpool/6.2.0: - resolution: {integrity: sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==} - dev: true - /workerpool/6.2.1: resolution: {integrity: sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==} dev: true - /wrangler/2.0.28: - resolution: {integrity: sha512-BNN+xebKF8CnZGagirNXzPbU9GU1deawiH/ASDN4h5Bi1Kgm/HpUMZpkP1LoMjtveiiS7Pa53A6x00bm2JEFlQ==} + /wrangler/2.1.6: + resolution: {integrity: sha512-gwIdA5UPNA/u6U2vCVit3t75ldWmBiN11OQOK48G0u1xN/gdH/ktHWR/C8blDXTAM4c53mLJJw5u5X55ZR1LLw==} engines: {node: '>=16.13.0'} hasBin: true dependencies: @@ -6456,10 +6624,10 @@ packages: blake3-wasm: 2.1.5 chokidar: 3.5.3 esbuild: 0.14.51 - miniflare: 2.7.1 + miniflare: 2.9.0 nanoid: 3.3.4 path-to-regexp: 6.2.1 - selfsigned: 2.0.1 + selfsigned: 2.1.1 source-map: 0.7.4 xxhash-wasm: 1.0.1 optionalDependencies: @@ -6490,6 +6658,15 @@ packages: strip-ansi: 6.0.1 dev: true + /wrap-ansi/8.0.1: + resolution: {integrity: sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g==} + engines: {node: '>=12'} + dependencies: + ansi-styles: 6.1.1 + string-width: 5.1.2 + strip-ansi: 7.0.1 + dev: false + /wrappy/1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: true @@ -6513,7 +6690,6 @@ packages: optional: true utf-8-validate: optional: true - dev: true /xxhash-wasm/1.0.1: resolution: {integrity: sha512-Lc9CTvDrH2vRoiaUzz25q7lRaviMhz90pkx6YxR9EPYtF99yOJnv2cB+CQ0hp/TLoqrUsk8z/W2EN31T568Azw==} @@ -6542,8 +6718,8 @@ packages: engines: {node: '>=10'} dev: true - /yargs-parser/21.0.1: - resolution: {integrity: sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==} + /yargs-parser/21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} dev: true @@ -6580,7 +6756,7 @@ packages: require-directory: 2.1.1 string-width: 4.2.3 y18n: 5.0.8 - yargs-parser: 21.0.1 + yargs-parser: 21.1.1 dev: true /yocto-queue/0.1.0: @@ -6601,3 +6777,7 @@ packages: mustache: 4.2.0 stack-trace: 0.0.10 dev: true + + /zod/3.19.1: + resolution: {integrity: sha512-LYjZsEDhCdYET9ikFu6dVPGp2YH9DegXjdJToSzD9rO6fy4qiRYFoyEYwps88OseJlPyl2NOe2iJuhEhL7IpEA==} + dev: false