diff --git a/can.js b/can.js index 9cab2ff..cf9723e 100644 --- a/can.js +++ b/can.js @@ -50,7 +50,7 @@ export async function storeList (opts = {}) { } const spinner = ora('Listing CARs').start() - const res = await client.capability.store.list() + const res = await client.capability.store.list(listOptions) spinner.stop() console.log(storeListResponseToString(res, opts)) } diff --git a/lib.js b/lib.js index 92c3f7b..9f46b6a 100644 --- a/lib.js +++ b/lib.js @@ -14,6 +14,9 @@ import { CarReader } from '@ipld/car' /** * @typedef {import('@web3-storage/w3up-client/types').FileLike & { size: number }} FileLike + * @typedef {import('@web3-storage/w3up-client/src/types').ListResponse} ListResponse + * @typedef {import('@web3-storage/w3up-client/src/types').StoreListResult} StoreListResult + * @typedef {import('@web3-storage/w3up-client/src/types').UploadListResult} UploadListResult */ export function getPkg () { @@ -195,6 +198,13 @@ async function * filesFromDir (dir, filter) { } } +/** + * @param {ListResponse} res + * @param {boolean} [opts.raw] + * @param {boolean} [opts.json] + * @param {boolean} [opts.shards] + * @returns {string} + */ export function uploadListResponseToString (res, opts = {}) { if (opts.raw) { return JSON.stringify(res) @@ -216,6 +226,12 @@ export function uploadListResponseToString (res, opts = {}) { } } +/** + * @param {ListResponse} res + * @param {boolean} [opts.raw] + * @param {boolean} [opts.json] + * @returns {string} + */ export function storeListResponseToString (res, opts = {}) { if (opts.raw) { return JSON.stringify(res) diff --git a/package-lock.json b/package-lock.json index 45258a8..5862626 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,11 +31,43 @@ "@web3-storage/capabilities": "^2.1.0", "ava": "^5.1.0", "execa": "^6.1.0", - "multiformats": "^10.0.2", + "multiformats": "^11.0.0", "npm-run-all": "^4.1.5", "standard": "^17.0.0" } }, + "../w3up-client": { + "name": "@web3-storage/w3up-client", + "version": "4.1.0", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "@ipld/dag-ucan": "^3.0.1", + "@ucanto/client": "^4.0.2", + "@ucanto/core": "^4.0.2", + "@ucanto/interface": "^4.0.2", + "@ucanto/principal": "^4.0.2", + "@ucanto/transport": "^4.0.2", + "@web3-storage/access": "^9.1.1", + "@web3-storage/capabilities": "^2.0.0", + "@web3-storage/upload-client": "^5.3.0" + }, + "devDependencies": { + "@docusaurus/core": "^2.2.0", + "@ucanto/server": "^4.0.2", + "assert": "^2.0.0", + "docusaurus-plugin-typedoc": "^0.18.0", + "hundreds": "^0.0.9", + "mocha": "^10.1.0", + "multiformats": "^11.0.0", + "npm-run-all": "^4.1.5", + "playwright-test": "^8.1.1", + "standard": "^17.0.0", + "typedoc": "^0.23.24", + "typedoc-plugin-markdown": "^3.14.0", + "typedoc-plugin-missing-exports": "^1.0.0", + "typescript": "^4.8.3" + } + }, "node_modules/@eslint/eslintrc": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz", @@ -129,15 +161,6 @@ "npm": ">=7.0.0" } }, - "node_modules/@ipld/car/node_modules/multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==", - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, "node_modules/@ipld/dag-cbor": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/@ipld/dag-cbor/-/dag-cbor-9.0.0.tgz", @@ -151,15 +174,6 @@ "npm": ">=7.0.0" } }, - "node_modules/@ipld/dag-cbor/node_modules/multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==", - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, "node_modules/@ipld/dag-json": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/@ipld/dag-json/-/dag-json-10.0.0.tgz", @@ -173,36 +187,6 @@ "npm": ">=7.0.0" } }, - "node_modules/@ipld/dag-json/node_modules/multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==", - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/@ipld/dag-pb": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@ipld/dag-pb/-/dag-pb-4.0.0.tgz", - "integrity": "sha512-8FB/qTlNowCiszL9Sek8xH6xIQxIioXuzZ5B1jVPknQMVkd08nZUHzDjrn1Y6MqJ5PrXWLrBwNghGMWPPpvNVw==", - "dependencies": { - "multiformats": "^11.0.0" - }, - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/@ipld/dag-pb/node_modules/multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==", - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, "node_modules/@ipld/dag-ucan": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/@ipld/dag-ucan/-/dag-ucan-3.2.0.tgz", @@ -213,37 +197,6 @@ "multiformats": "^11.0.0" } }, - "node_modules/@ipld/dag-ucan/node_modules/multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==", - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/@ipld/unixfs": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@ipld/unixfs/-/unixfs-2.0.1.tgz", - "integrity": "sha512-W3LD67tLrIGpCVYFN6N/x6bL3o03zmsfd7jPAD1aXfGXaQWWa95qXPwc6PMVRTttxha/bHMKQiG2ZeFCqp83Ew==", - "dependencies": { - "@ipld/dag-pb": "^4.0.0", - "@web-std/stream": "1.0.1", - "actor": "^2.3.1", - "multiformats": "^11.0.1", - "protobufjs": "^7.1.2", - "rabin-rs": "^2.1.0" - } - }, - "node_modules/@ipld/unixfs/node_modules/multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==", - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, "node_modules/@noble/ed25519": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/@noble/ed25519/-/ed25519-1.7.1.tgz", @@ -290,150 +243,46 @@ "node": ">= 8" } }, - "node_modules/@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" - }, - "node_modules/@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" - }, - "node_modules/@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" - }, - "node_modules/@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" - }, - "node_modules/@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", - "dependencies": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "node_modules/@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" - }, - "node_modules/@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" - }, - "node_modules/@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" - }, - "node_modules/@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" - }, - "node_modules/@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" - }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, - "node_modules/@types/node": { - "version": "18.11.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", - "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==" - }, - "node_modules/@types/retry": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.1.tgz", - "integrity": "sha512-xoDlM2S4ortawSWORYqsdU+2rxdh4LRW9ytc3zmT37RIKQh6IHyKwwtKhKis9ah8ol07DCkZxPt8BBvPjC6v4g==" - }, "node_modules/@ucanto/client": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@ucanto/client/-/client-4.1.0.tgz", - "integrity": "sha512-Sn24Z5+g+MbuopGEXaBXqrrite8TwSUVHvuXHPfnSco7PtZ0Zu7siTXKrHp15dTbVN2tkvdZTSxB0UZsMmOGPA==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@ucanto/client/-/client-4.2.3.tgz", + "integrity": "sha512-vIa0drEAeolQpSePpHtsW1bx8lzDdxtXi2fEdQ4f34xbI2VSOQuAgUURJTtRVmRXa5MweQoEGI9CHPKL4CMyFQ==", "dependencies": { "@ucanto/interface": "^4.1.0", "multiformats": "^11.0.0" } }, - "node_modules/@ucanto/client/node_modules/multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==", - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, "node_modules/@ucanto/core": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@ucanto/core/-/core-4.1.0.tgz", - "integrity": "sha512-uH3ViPWB1/K2eeQyTS7nOpupcQ0VC0qzPMYpMD1e0WSTrwVYGwMs0ttG4J77fqXExul46rLCPTY/2R7Tstn7xQ==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@ucanto/core/-/core-4.2.3.tgz", + "integrity": "sha512-udvp7IMRCE3XFhPYiKISt52r8QjbrqG7d1papdtWwF6RAzTbIWhgXSwAjEbroYCr/gQst7U8aYsgr4xvG2miUQ==", "dependencies": { - "@ipld/car": "^5.0.0", - "@ipld/dag-cbor": "^8.0.0", + "@ipld/car": "^5.0.3", + "@ipld/dag-cbor": "^9.0.0", "@ipld/dag-ucan": "^3.2.0", "@ucanto/interface": "^4.1.0", "multiformats": "^11.0.0" } }, - "node_modules/@ucanto/core/node_modules/@ipld/dag-cbor": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@ipld/dag-cbor/-/dag-cbor-8.0.1.tgz", - "integrity": "sha512-mHRuzgGXNk0Y5W7nNQdN37qJiig1Kdgf92icBVFRUNtBc9Ezl5DIdWfiGWBucHBrhqPBncxoH3As9cHPIRozxA==", - "dependencies": { - "cborg": "^1.6.0", - "multiformats": "^11.0.0" - }, - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/@ucanto/core/node_modules/multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==", - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, "node_modules/@ucanto/interface": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@ucanto/interface/-/interface-4.1.0.tgz", - "integrity": "sha512-vqHUcMPk1tPIJbCT2X5dBRrUUSz5CUKiMJv6GOP24JournjqcwHTr4GqhXZEYgA2yAv/H+CcfVR5mWfnmLd+MQ==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@ucanto/interface/-/interface-4.2.3.tgz", + "integrity": "sha512-IoccqMc2/vqaPT6U061ylC138mQ3pLp6coqjXTDmlL9OHmskLcEeQh5Mxe0AYHWMhO1ZuB0LRIysBXk7xoK25Q==", "dependencies": { "@ipld/dag-ucan": "^3.2.0", "multiformats": "^11.0.0" } }, - "node_modules/@ucanto/interface/node_modules/multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==", - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, "node_modules/@ucanto/principal": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@ucanto/principal/-/principal-4.1.0.tgz", - "integrity": "sha512-R4YdxXkBr4cbmUj7bZKDtdxkfqlT60jYSS2JCtzzxYsSmxRKIjKR/a4Nmo7pqX40vSfqrvp4WlZAzl9Lczuw2A==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@ucanto/principal/-/principal-4.2.3.tgz", + "integrity": "sha512-S02cKaMcIQhxk9uJfUCUb+f98zEEFsC+5BZC6aBoYVCEpXwVZD6+hc9xI0yIQl8zJyQVA3nnUUpLfLynsSox2A==", "dependencies": { "@ipld/dag-ucan": "^3.2.0", "@noble/ed25519": "^1.7.1", @@ -442,19 +291,10 @@ "one-webcrypto": "^1.0.3" } }, - "node_modules/@ucanto/principal/node_modules/multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==", - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, "node_modules/@ucanto/server": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@ucanto/server/-/server-4.1.0.tgz", - "integrity": "sha512-JljZI9rbM82ho3E2AGyPZ7O8EZlrMgBkSmTM4lUYWostAxJdPz8EQvBqK7mBZcPRWE/CmjMRPS7Tu/L9Yw7eQw==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@ucanto/server/-/server-4.2.3.tgz", + "integrity": "sha512-lmDC0d9mVGYfiqwzpiTG6CFZpGVw1GnFx9EOtozKPa+v2nzwqDAkwYAQwNrJ2nbJWQQeFi7/Jiaec9EmdPEpsg==", "dev": true, "dependencies": { "@ucanto/core": "^4.1.0", @@ -463,45 +303,23 @@ } }, "node_modules/@ucanto/transport": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@ucanto/transport/-/transport-4.1.0.tgz", - "integrity": "sha512-Bd/Ma5K0rv+OOBjnisOxfhq1iFWvCn1VtFwtuzqjZGUNt7HdefJazBfpA1wILd+lLw8Krx2gr+7RHbLfQmLXtQ==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@ucanto/transport/-/transport-4.2.3.tgz", + "integrity": "sha512-ZtHB5ybSB/1dBLhzJqjxGDEE+TTTNzc9HMrVA1AP5KHvaHPu2UtAmS2IMr+HrhSjcwWwdavK0qMQbXSfLWM+kg==", "dependencies": { - "@ipld/car": "^5.0.0", - "@ipld/dag-cbor": "^8.0.0", + "@ipld/car": "^5.0.3", + "@ipld/dag-cbor": "^9.0.0", "@ucanto/core": "^4.1.0", "@ucanto/interface": "^4.1.0", "multiformats": "^11.0.0" } }, - "node_modules/@ucanto/transport/node_modules/@ipld/dag-cbor": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@ipld/dag-cbor/-/dag-cbor-8.0.1.tgz", - "integrity": "sha512-mHRuzgGXNk0Y5W7nNQdN37qJiig1Kdgf92icBVFRUNtBc9Ezl5DIdWfiGWBucHBrhqPBncxoH3As9cHPIRozxA==", - "dependencies": { - "cborg": "^1.6.0", - "multiformats": "^11.0.0" - }, - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/@ucanto/transport/node_modules/multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==", - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, "node_modules/@ucanto/validator": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@ucanto/validator/-/validator-4.1.0.tgz", - "integrity": "sha512-YARh2hR4YafJpeKp1UmLzQUjjdpYE5cO9aVfmJVRbQMqyYz50VvkICm1dhp/7VyO4/H8oJM8WVhxiuo5eJv+ZA==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@ucanto/validator/-/validator-4.2.3.tgz", + "integrity": "sha512-7lA9PK+c0Hu857eHuZIVX3ZBooqvOT25/CXUxGjqs5YFCY7dUhrNCxJYnWsPZnEdriq6x6VSj8pZPwN8I7CyQw==", "dependencies": { - "@ipld/car": "^5.0.0", + "@ipld/car": "^5.0.3", "@ipld/dag-cbor": "^8.0.0", "@ucanto/core": "^4.1.0", "@ucanto/interface": "^4.1.0", @@ -521,124 +339,56 @@ "npm": ">=7.0.0" } }, - "node_modules/@ucanto/validator/node_modules/multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==", - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/@web-std/stream": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@web-std/stream/-/stream-1.0.1.tgz", - "integrity": "sha512-tsz4Y0WNDgFA5jwLSeV7/UV5rfMIlj0cPsSLVfTihjaVW0OJPd5NxJ3le1B3yLyqqzRpeG5OAfJAADLc4VoGTA==", - "dependencies": { - "web-streams-polyfill": "^3.1.1" - } - }, "node_modules/@web3-storage/access": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/@web3-storage/access/-/access-9.2.0.tgz", - "integrity": "sha512-6H/MtlTcEsDB7Ek+mTPg3tA5AhvzeMJt68gbcYzl71IooMrTKK46ZCMa//wxt0+fgOFGo0YX0jyE7fcRj4Vmnw==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/@web3-storage/access/-/access-9.3.0.tgz", + "integrity": "sha512-j1HUqREA6etXP0/Rcg2+e3Ug6Vi9zgJBxenFSC4U+AyulGtfkKgJrZG8Qabj6L4+UjNxjrEjSmxUn8V8lq/ULw==", "dependencies": { - "@ipld/car": "^5.0.1", - "@ipld/dag-cbor": "^8.0.0", - "@ipld/dag-ucan": "^3.0.1", - "@ucanto/client": "^4.0.3", - "@ucanto/core": "^4.0.3", - "@ucanto/interface": "^4.0.3", - "@ucanto/principal": "^4.0.3", - "@ucanto/transport": "^4.0.3", - "@ucanto/validator": "^4.0.3", - "@web3-storage/capabilities": "^2.1.0", + "@ipld/car": "^5.0.3", + "@ipld/dag-cbor": "^9.0.0", + "@ipld/dag-ucan": "^3.2.0", + "@ucanto/client": "^4.2.3", + "@ucanto/core": "^4.2.3", + "@ucanto/interface": "^4.2.3", + "@ucanto/principal": "^4.2.3", + "@ucanto/transport": "^4.2.3", + "@ucanto/validator": "^4.2.3", + "@web3-storage/capabilities": "^2.2.0", "bigint-mod-arith": "^3.1.2", - "conf": "^10.2.0", + "conf": "10.2.0", "inquirer": "^9.1.4", "isomorphic-ws": "^5.0.0", - "kysely": "^0.22.0", - "multiformats": "^10.0.2", + "kysely": "^0.23.4", + "multiformats": "^11.0.1", "one-webcrypto": "^1.0.3", "ora": "^6.1.2", "p-defer": "^4.0.0", "p-wait-for": "^5.0.0", "type-fest": "^3.3.0", - "uint8arrays": "^4.0.2", + "uint8arrays": "^4.0.3", "varint": "^6.0.0", - "ws": "^8.11.0", + "ws": "^8.12.0", "zod": "^3.20.2" }, "bin": { "w3access": "src/cli/index.js" } }, - "node_modules/@web3-storage/access/node_modules/@ipld/dag-cbor": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@ipld/dag-cbor/-/dag-cbor-8.0.1.tgz", - "integrity": "sha512-mHRuzgGXNk0Y5W7nNQdN37qJiig1Kdgf92icBVFRUNtBc9Ezl5DIdWfiGWBucHBrhqPBncxoH3As9cHPIRozxA==", - "dependencies": { - "cborg": "^1.6.0", - "multiformats": "^11.0.0" - }, - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/@web3-storage/access/node_modules/@ipld/dag-cbor/node_modules/multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==", - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, "node_modules/@web3-storage/capabilities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@web3-storage/capabilities/-/capabilities-2.1.0.tgz", - "integrity": "sha512-6rbcushGhbaeHC38iTEW8t6QapJutfDxLoKPEVMHTJYUGfKE/bL7M7VYXws6Vdp1XCFaLbLv88OSIR/nq9M9lg==", - "dependencies": { - "@ucanto/core": "^4.0.2", - "@ucanto/interface": "^4.0.2", - "@ucanto/principal": "^4.0.2", - "@ucanto/transport": "^4.0.2", - "@ucanto/validator": "^4.0.2" - } - }, - "node_modules/@web3-storage/upload-client": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@web3-storage/upload-client/-/upload-client-5.3.0.tgz", - "integrity": "sha512-3vLErJTiigQ/cSlg8mCrOz3ZV1AZeGgeKDvmDhOBSaIY5rBvKzW2Bjcu4Vqv1cLdWOz2qkg6Tp6X+0qRV0cfPA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@web3-storage/capabilities/-/capabilities-2.3.0.tgz", + "integrity": "sha512-+vg61eqK1eqQ+QD1hvChDDx6CXLGFnUsEA+W+g9yagCpq+H9yAqROncEEt+oluIGvAqNbFMrUb+bWRWxk0Tmuw==", "dependencies": { - "@ipld/car": "^5.0.0", - "@ipld/dag-ucan": "^3.0.1", - "@ipld/unixfs": "^2.0.0", - "@ucanto/client": "^4.0.3", - "@ucanto/interface": "^4.0.3", - "@ucanto/transport": "^4.0.3", - "@web3-storage/capabilities": "^2.1.0", - "multiformats": "^10.0.2", - "p-queue": "^7.3.0", - "p-retry": "^5.1.2" + "@ucanto/core": "^4.2.3", + "@ucanto/interface": "^4.2.3", + "@ucanto/principal": "^4.2.3", + "@ucanto/transport": "^4.2.3", + "@ucanto/validator": "^4.2.3" } }, "node_modules/@web3-storage/w3up-client": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@web3-storage/w3up-client/-/w3up-client-4.1.0.tgz", - "integrity": "sha512-ekLo576uFJHYpWG3QXJETydV/Xq+GniouVDN1S6ND5QSBmb/TBRbEnzplohqwLztvlPSrkd1/VL+t+IDuosubQ==", - "dependencies": { - "@ipld/dag-ucan": "^3.0.1", - "@ucanto/client": "^4.0.2", - "@ucanto/core": "^4.0.2", - "@ucanto/interface": "^4.0.2", - "@ucanto/principal": "^4.0.2", - "@ucanto/transport": "^4.0.2", - "@web3-storage/access": "^9.1.1", - "@web3-storage/capabilities": "^2.0.0", - "@web3-storage/upload-client": "^5.3.0" - } + "resolved": "../w3up-client", + "link": true }, "node_modules/acorn": { "version": "8.8.2", @@ -670,11 +420,6 @@ "node": ">=0.4.0" } }, - "node_modules/actor": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/actor/-/actor-2.3.1.tgz", - "integrity": "sha512-ST/3wnvcP2tKDXnum7nLCLXm+/rsf8vPocXH2Fre6D8FQwNkGDd4JEitBlXj007VQJfiGYRQvXqwOBZVi+JtRg==" - }, "node_modules/aggregate-error": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-4.0.1.tgz", @@ -2469,11 +2214,6 @@ "node": ">=0.10.0" } }, - "node_modules/eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" - }, "node_modules/execa": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz", @@ -3665,9 +3405,9 @@ } }, "node_modules/kysely": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/kysely/-/kysely-0.22.0.tgz", - "integrity": "sha512-ZE3qWtnqLOalodzfK5QUEcm7AEulhxsPNuKaGFsC3XiqO92vMLm+mAHk/NnbSIOtC4RmGm0nsv700i8KDp1gfQ==", + "version": "0.23.4", + "resolved": "https://registry.npmjs.org/kysely/-/kysely-0.23.4.tgz", + "integrity": "sha512-3icLnj1fahUtZsP9zzOvF4DcdhekGsLX4ZaoBaIz0ZeHegyRDdbwpJD7zezAJ+KwQZNDeKchel6MikFNLsSZIA==", "engines": { "node": ">=14.0.0" } @@ -3738,11 +3478,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/long": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.1.tgz", - "integrity": "sha512-GKSNGeNAtw8IryjjkhZxuKB3JzlcLTwjtiQCHKvqQet81I93kXslhDQruGI/QsddO83mcDToBVy7GqGS/zYf/A==" - }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -3923,9 +3658,9 @@ "dev": true }, "node_modules/multiformats": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-10.0.3.tgz", - "integrity": "sha512-K2yGSmstS/oEmYiEIieHb53jJCaqp4ERPDQAYrm5sV3UUrVDZeshJQCK6GHAKyIGufU1vAcbS0PdAAZmC7Tzcw==", + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", + "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==", "engines": { "node": ">=16.0.0", "npm": ">=7.0.0" @@ -4453,40 +4188,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-queue": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-7.3.0.tgz", - "integrity": "sha512-5fP+yVQ0qp0rEfZoDTlP2c3RYBgxvRsw30qO+VtPPc95lyvSG+x6USSh1TuLB4n96IO6I8/oXQGsTgtna4q2nQ==", - "dependencies": { - "eventemitter3": "^4.0.7", - "p-timeout": "^5.0.2" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-retry": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-5.1.2.tgz", - "integrity": "sha512-couX95waDu98NfNZV+i/iLt+fdVxmI7CbrrdC2uDWfPdUAApyxT4wmDlyOtR5KtTDmkDO0zDScDjDou9YHhd9g==", - "dependencies": { - "@types/retry": "0.12.1", - "retry": "^0.13.1" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/p-timeout": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz", "integrity": "sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==", + "dev": true, "engines": { "node": ">=12" }, @@ -4854,29 +4560,6 @@ "react-is": "^16.13.1" } }, - "node_modules/protobufjs": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.0.tgz", - "integrity": "sha512-hYCqTDuII4iJ4stZqiuGCSU8xxWl5JeXYpwARGtn/tWcKCAro6h3WQz+xpsNbXW0UYqpmTQFEyFWO0G0Kjt64g==", - "hasInstallScript": true, - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/node": ">=13.7.0", - "long": "^5.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, "node_modules/punycode": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", @@ -4905,11 +4588,6 @@ } ] }, - "node_modules/rabin-rs": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/rabin-rs/-/rabin-rs-2.1.0.tgz", - "integrity": "sha512-5y72gAXPzIBsAMHcpxZP8eMDuDT98qMP1BqSDHRbHkJJXEgWIN1lA47LxUqzsK6jknOJtgfkQr9v+7qMlFDm6g==" - }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -5081,14 +4759,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/retry": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", - "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", - "engines": { - "node": ">= 4" - } - }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -5863,15 +5533,6 @@ "npm": ">=7.0.0" } }, - "node_modules/uint8arrays/node_modules/multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==", - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, "node_modules/unbox-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", @@ -5923,14 +5584,6 @@ "defaults": "^1.0.3" } }, - "node_modules/web-streams-polyfill": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", - "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", - "engines": { - "node": ">= 8" - } - }, "node_modules/well-known-symbols": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-2.0.0.tgz", @@ -6246,13 +5899,6 @@ "cborg": "^1.9.0", "multiformats": "^11.0.0", "varint": "^6.0.0" - }, - "dependencies": { - "multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==" - } } }, "@ipld/dag-cbor": { @@ -6262,13 +5908,6 @@ "requires": { "cborg": "^1.10.0", "multiformats": "^11.0.0" - }, - "dependencies": { - "multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==" - } } }, "@ipld/dag-json": { @@ -6278,28 +5917,6 @@ "requires": { "cborg": "^1.10.0", "multiformats": "^11.0.0" - }, - "dependencies": { - "multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==" - } - } - }, - "@ipld/dag-pb": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@ipld/dag-pb/-/dag-pb-4.0.0.tgz", - "integrity": "sha512-8FB/qTlNowCiszL9Sek8xH6xIQxIioXuzZ5B1jVPknQMVkd08nZUHzDjrn1Y6MqJ5PrXWLrBwNghGMWPPpvNVw==", - "requires": { - "multiformats": "^11.0.0" - }, - "dependencies": { - "multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==" - } } }, "@ipld/dag-ucan": { @@ -6310,33 +5927,6 @@ "@ipld/dag-cbor": "^9.0.0", "@ipld/dag-json": "^10.0.0", "multiformats": "^11.0.0" - }, - "dependencies": { - "multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==" - } - } - }, - "@ipld/unixfs": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@ipld/unixfs/-/unixfs-2.0.1.tgz", - "integrity": "sha512-W3LD67tLrIGpCVYFN6N/x6bL3o03zmsfd7jPAD1aXfGXaQWWa95qXPwc6PMVRTttxha/bHMKQiG2ZeFCqp83Ew==", - "requires": { - "@ipld/dag-pb": "^4.0.0", - "@web-std/stream": "1.0.1", - "actor": "^2.3.1", - "multiformats": "^11.0.1", - "protobufjs": "^7.1.2", - "rabin-rs": "^2.1.0" - }, - "dependencies": { - "multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==" - } } }, "@noble/ed25519": { @@ -6370,159 +5960,58 @@ "fastq": "^1.6.0" } }, - "@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" - }, - "@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" - }, - "@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" - }, - "@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" - }, - "@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", - "requires": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" - }, - "@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" - }, - "@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" - }, - "@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" - }, - "@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" - }, "@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, - "@types/node": { - "version": "18.11.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", - "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==" - }, - "@types/retry": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.1.tgz", - "integrity": "sha512-xoDlM2S4ortawSWORYqsdU+2rxdh4LRW9ytc3zmT37RIKQh6IHyKwwtKhKis9ah8ol07DCkZxPt8BBvPjC6v4g==" - }, "@ucanto/client": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@ucanto/client/-/client-4.1.0.tgz", - "integrity": "sha512-Sn24Z5+g+MbuopGEXaBXqrrite8TwSUVHvuXHPfnSco7PtZ0Zu7siTXKrHp15dTbVN2tkvdZTSxB0UZsMmOGPA==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@ucanto/client/-/client-4.2.3.tgz", + "integrity": "sha512-vIa0drEAeolQpSePpHtsW1bx8lzDdxtXi2fEdQ4f34xbI2VSOQuAgUURJTtRVmRXa5MweQoEGI9CHPKL4CMyFQ==", "requires": { "@ucanto/interface": "^4.1.0", "multiformats": "^11.0.0" - }, - "dependencies": { - "multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==" - } } }, "@ucanto/core": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@ucanto/core/-/core-4.1.0.tgz", - "integrity": "sha512-uH3ViPWB1/K2eeQyTS7nOpupcQ0VC0qzPMYpMD1e0WSTrwVYGwMs0ttG4J77fqXExul46rLCPTY/2R7Tstn7xQ==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@ucanto/core/-/core-4.2.3.tgz", + "integrity": "sha512-udvp7IMRCE3XFhPYiKISt52r8QjbrqG7d1papdtWwF6RAzTbIWhgXSwAjEbroYCr/gQst7U8aYsgr4xvG2miUQ==", "requires": { - "@ipld/car": "^5.0.0", - "@ipld/dag-cbor": "^8.0.0", + "@ipld/car": "^5.0.3", + "@ipld/dag-cbor": "^9.0.0", "@ipld/dag-ucan": "^3.2.0", "@ucanto/interface": "^4.1.0", "multiformats": "^11.0.0" - }, - "dependencies": { - "@ipld/dag-cbor": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@ipld/dag-cbor/-/dag-cbor-8.0.1.tgz", - "integrity": "sha512-mHRuzgGXNk0Y5W7nNQdN37qJiig1Kdgf92icBVFRUNtBc9Ezl5DIdWfiGWBucHBrhqPBncxoH3As9cHPIRozxA==", - "requires": { - "cborg": "^1.6.0", - "multiformats": "^11.0.0" - } - }, - "multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==" - } } }, "@ucanto/interface": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@ucanto/interface/-/interface-4.1.0.tgz", - "integrity": "sha512-vqHUcMPk1tPIJbCT2X5dBRrUUSz5CUKiMJv6GOP24JournjqcwHTr4GqhXZEYgA2yAv/H+CcfVR5mWfnmLd+MQ==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@ucanto/interface/-/interface-4.2.3.tgz", + "integrity": "sha512-IoccqMc2/vqaPT6U061ylC138mQ3pLp6coqjXTDmlL9OHmskLcEeQh5Mxe0AYHWMhO1ZuB0LRIysBXk7xoK25Q==", "requires": { "@ipld/dag-ucan": "^3.2.0", "multiformats": "^11.0.0" - }, - "dependencies": { - "multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==" - } } }, "@ucanto/principal": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@ucanto/principal/-/principal-4.1.0.tgz", - "integrity": "sha512-R4YdxXkBr4cbmUj7bZKDtdxkfqlT60jYSS2JCtzzxYsSmxRKIjKR/a4Nmo7pqX40vSfqrvp4WlZAzl9Lczuw2A==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@ucanto/principal/-/principal-4.2.3.tgz", + "integrity": "sha512-S02cKaMcIQhxk9uJfUCUb+f98zEEFsC+5BZC6aBoYVCEpXwVZD6+hc9xI0yIQl8zJyQVA3nnUUpLfLynsSox2A==", "requires": { "@ipld/dag-ucan": "^3.2.0", "@noble/ed25519": "^1.7.1", "@ucanto/interface": "^4.1.0", "multiformats": "^11.0.0", "one-webcrypto": "^1.0.3" - }, - "dependencies": { - "multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==" - } } }, "@ucanto/server": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@ucanto/server/-/server-4.1.0.tgz", - "integrity": "sha512-JljZI9rbM82ho3E2AGyPZ7O8EZlrMgBkSmTM4lUYWostAxJdPz8EQvBqK7mBZcPRWE/CmjMRPS7Tu/L9Yw7eQw==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@ucanto/server/-/server-4.2.3.tgz", + "integrity": "sha512-lmDC0d9mVGYfiqwzpiTG6CFZpGVw1GnFx9EOtozKPa+v2nzwqDAkwYAQwNrJ2nbJWQQeFi7/Jiaec9EmdPEpsg==", "dev": true, "requires": { "@ucanto/core": "^4.1.0", @@ -6531,39 +6020,23 @@ } }, "@ucanto/transport": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@ucanto/transport/-/transport-4.1.0.tgz", - "integrity": "sha512-Bd/Ma5K0rv+OOBjnisOxfhq1iFWvCn1VtFwtuzqjZGUNt7HdefJazBfpA1wILd+lLw8Krx2gr+7RHbLfQmLXtQ==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@ucanto/transport/-/transport-4.2.3.tgz", + "integrity": "sha512-ZtHB5ybSB/1dBLhzJqjxGDEE+TTTNzc9HMrVA1AP5KHvaHPu2UtAmS2IMr+HrhSjcwWwdavK0qMQbXSfLWM+kg==", "requires": { - "@ipld/car": "^5.0.0", - "@ipld/dag-cbor": "^8.0.0", + "@ipld/car": "^5.0.3", + "@ipld/dag-cbor": "^9.0.0", "@ucanto/core": "^4.1.0", "@ucanto/interface": "^4.1.0", "multiformats": "^11.0.0" - }, - "dependencies": { - "@ipld/dag-cbor": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@ipld/dag-cbor/-/dag-cbor-8.0.1.tgz", - "integrity": "sha512-mHRuzgGXNk0Y5W7nNQdN37qJiig1Kdgf92icBVFRUNtBc9Ezl5DIdWfiGWBucHBrhqPBncxoH3As9cHPIRozxA==", - "requires": { - "cborg": "^1.6.0", - "multiformats": "^11.0.0" - } - }, - "multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==" - } } }, "@ucanto/validator": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@ucanto/validator/-/validator-4.1.0.tgz", - "integrity": "sha512-YARh2hR4YafJpeKp1UmLzQUjjdpYE5cO9aVfmJVRbQMqyYz50VvkICm1dhp/7VyO4/H8oJM8WVhxiuo5eJv+ZA==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@ucanto/validator/-/validator-4.2.3.tgz", + "integrity": "sha512-7lA9PK+c0Hu857eHuZIVX3ZBooqvOT25/CXUxGjqs5YFCY7dUhrNCxJYnWsPZnEdriq6x6VSj8pZPwN8I7CyQw==", "requires": { - "@ipld/car": "^5.0.0", + "@ipld/car": "^5.0.3", "@ipld/dag-cbor": "^8.0.0", "@ucanto/core": "^4.1.0", "@ucanto/interface": "^4.1.0", @@ -6578,115 +6051,79 @@ "cborg": "^1.6.0", "multiformats": "^11.0.0" } - }, - "multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==" } } }, - "@web-std/stream": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@web-std/stream/-/stream-1.0.1.tgz", - "integrity": "sha512-tsz4Y0WNDgFA5jwLSeV7/UV5rfMIlj0cPsSLVfTihjaVW0OJPd5NxJ3le1B3yLyqqzRpeG5OAfJAADLc4VoGTA==", - "requires": { - "web-streams-polyfill": "^3.1.1" - } - }, "@web3-storage/access": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/@web3-storage/access/-/access-9.2.0.tgz", - "integrity": "sha512-6H/MtlTcEsDB7Ek+mTPg3tA5AhvzeMJt68gbcYzl71IooMrTKK46ZCMa//wxt0+fgOFGo0YX0jyE7fcRj4Vmnw==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/@web3-storage/access/-/access-9.3.0.tgz", + "integrity": "sha512-j1HUqREA6etXP0/Rcg2+e3Ug6Vi9zgJBxenFSC4U+AyulGtfkKgJrZG8Qabj6L4+UjNxjrEjSmxUn8V8lq/ULw==", "requires": { - "@ipld/car": "^5.0.1", - "@ipld/dag-cbor": "^8.0.0", - "@ipld/dag-ucan": "^3.0.1", - "@ucanto/client": "^4.0.3", - "@ucanto/core": "^4.0.3", - "@ucanto/interface": "^4.0.3", - "@ucanto/principal": "^4.0.3", - "@ucanto/transport": "^4.0.3", - "@ucanto/validator": "^4.0.3", - "@web3-storage/capabilities": "^2.1.0", + "@ipld/car": "^5.0.3", + "@ipld/dag-cbor": "^9.0.0", + "@ipld/dag-ucan": "^3.2.0", + "@ucanto/client": "^4.2.3", + "@ucanto/core": "^4.2.3", + "@ucanto/interface": "^4.2.3", + "@ucanto/principal": "^4.2.3", + "@ucanto/transport": "^4.2.3", + "@ucanto/validator": "^4.2.3", + "@web3-storage/capabilities": "^2.2.0", "bigint-mod-arith": "^3.1.2", - "conf": "^10.2.0", + "conf": "10.2.0", "inquirer": "^9.1.4", "isomorphic-ws": "^5.0.0", - "kysely": "^0.22.0", - "multiformats": "^10.0.2", + "kysely": "^0.23.4", + "multiformats": "^11.0.1", "one-webcrypto": "^1.0.3", "ora": "^6.1.2", "p-defer": "^4.0.0", "p-wait-for": "^5.0.0", "type-fest": "^3.3.0", - "uint8arrays": "^4.0.2", + "uint8arrays": "^4.0.3", "varint": "^6.0.0", - "ws": "^8.11.0", + "ws": "^8.12.0", "zod": "^3.20.2" - }, - "dependencies": { - "@ipld/dag-cbor": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@ipld/dag-cbor/-/dag-cbor-8.0.1.tgz", - "integrity": "sha512-mHRuzgGXNk0Y5W7nNQdN37qJiig1Kdgf92icBVFRUNtBc9Ezl5DIdWfiGWBucHBrhqPBncxoH3As9cHPIRozxA==", - "requires": { - "cborg": "^1.6.0", - "multiformats": "^11.0.0" - }, - "dependencies": { - "multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==" - } - } - } } }, "@web3-storage/capabilities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@web3-storage/capabilities/-/capabilities-2.1.0.tgz", - "integrity": "sha512-6rbcushGhbaeHC38iTEW8t6QapJutfDxLoKPEVMHTJYUGfKE/bL7M7VYXws6Vdp1XCFaLbLv88OSIR/nq9M9lg==", - "requires": { - "@ucanto/core": "^4.0.2", - "@ucanto/interface": "^4.0.2", - "@ucanto/principal": "^4.0.2", - "@ucanto/transport": "^4.0.2", - "@ucanto/validator": "^4.0.2" - } - }, - "@web3-storage/upload-client": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@web3-storage/upload-client/-/upload-client-5.3.0.tgz", - "integrity": "sha512-3vLErJTiigQ/cSlg8mCrOz3ZV1AZeGgeKDvmDhOBSaIY5rBvKzW2Bjcu4Vqv1cLdWOz2qkg6Tp6X+0qRV0cfPA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@web3-storage/capabilities/-/capabilities-2.3.0.tgz", + "integrity": "sha512-+vg61eqK1eqQ+QD1hvChDDx6CXLGFnUsEA+W+g9yagCpq+H9yAqROncEEt+oluIGvAqNbFMrUb+bWRWxk0Tmuw==", "requires": { - "@ipld/car": "^5.0.0", - "@ipld/dag-ucan": "^3.0.1", - "@ipld/unixfs": "^2.0.0", - "@ucanto/client": "^4.0.3", - "@ucanto/interface": "^4.0.3", - "@ucanto/transport": "^4.0.3", - "@web3-storage/capabilities": "^2.1.0", - "multiformats": "^10.0.2", - "p-queue": "^7.3.0", - "p-retry": "^5.1.2" + "@ucanto/core": "^4.2.3", + "@ucanto/interface": "^4.2.3", + "@ucanto/principal": "^4.2.3", + "@ucanto/transport": "^4.2.3", + "@ucanto/validator": "^4.2.3" } }, "@web3-storage/w3up-client": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@web3-storage/w3up-client/-/w3up-client-4.1.0.tgz", - "integrity": "sha512-ekLo576uFJHYpWG3QXJETydV/Xq+GniouVDN1S6ND5QSBmb/TBRbEnzplohqwLztvlPSrkd1/VL+t+IDuosubQ==", + "version": "file:../w3up-client", "requires": { + "@docusaurus/core": "^2.2.0", "@ipld/dag-ucan": "^3.0.1", "@ucanto/client": "^4.0.2", "@ucanto/core": "^4.0.2", "@ucanto/interface": "^4.0.2", "@ucanto/principal": "^4.0.2", + "@ucanto/server": "^4.0.2", "@ucanto/transport": "^4.0.2", "@web3-storage/access": "^9.1.1", "@web3-storage/capabilities": "^2.0.0", - "@web3-storage/upload-client": "^5.3.0" + "@web3-storage/upload-client": "^5.3.0", + "assert": "^2.0.0", + "docusaurus-plugin-typedoc": "^0.18.0", + "hundreds": "^0.0.9", + "mocha": "^10.1.0", + "multiformats": "^11.0.0", + "npm-run-all": "^4.1.5", + "playwright-test": "^8.1.1", + "standard": "^17.0.0", + "typedoc": "^0.23.24", + "typedoc-plugin-markdown": "^3.14.0", + "typedoc-plugin-missing-exports": "^1.0.0", + "typescript": "^4.8.3" } }, "acorn": { @@ -6708,11 +6145,6 @@ "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", "dev": true }, - "actor": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/actor/-/actor-2.3.1.tgz", - "integrity": "sha512-ST/3wnvcP2tKDXnum7nLCLXm+/rsf8vPocXH2Fre6D8FQwNkGDd4JEitBlXj007VQJfiGYRQvXqwOBZVi+JtRg==" - }, "aggregate-error": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-4.0.1.tgz", @@ -7959,11 +7391,6 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, - "eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" - }, "execa": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz", @@ -8790,9 +8217,9 @@ } }, "kysely": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/kysely/-/kysely-0.22.0.tgz", - "integrity": "sha512-ZE3qWtnqLOalodzfK5QUEcm7AEulhxsPNuKaGFsC3XiqO92vMLm+mAHk/NnbSIOtC4RmGm0nsv700i8KDp1gfQ==" + "version": "0.23.4", + "resolved": "https://registry.npmjs.org/kysely/-/kysely-0.23.4.tgz", + "integrity": "sha512-3icLnj1fahUtZsP9zzOvF4DcdhekGsLX4ZaoBaIz0ZeHegyRDdbwpJD7zezAJ+KwQZNDeKchel6MikFNLsSZIA==" }, "levn": { "version": "0.4.1", @@ -8839,11 +8266,6 @@ "is-unicode-supported": "^1.1.0" } }, - "long": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.1.tgz", - "integrity": "sha512-GKSNGeNAtw8IryjjkhZxuKB3JzlcLTwjtiQCHKvqQet81I93kXslhDQruGI/QsddO83mcDToBVy7GqGS/zYf/A==" - }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -8974,9 +8396,9 @@ "dev": true }, "multiformats": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-10.0.3.tgz", - "integrity": "sha512-K2yGSmstS/oEmYiEIieHb53jJCaqp4ERPDQAYrm5sV3UUrVDZeshJQCK6GHAKyIGufU1vAcbS0PdAAZmC7Tzcw==" + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", + "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==" }, "mute-stream": { "version": "0.0.8", @@ -9356,28 +8778,11 @@ "aggregate-error": "^4.0.0" } }, - "p-queue": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-7.3.0.tgz", - "integrity": "sha512-5fP+yVQ0qp0rEfZoDTlP2c3RYBgxvRsw30qO+VtPPc95lyvSG+x6USSh1TuLB4n96IO6I8/oXQGsTgtna4q2nQ==", - "requires": { - "eventemitter3": "^4.0.7", - "p-timeout": "^5.0.2" - } - }, - "p-retry": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-5.1.2.tgz", - "integrity": "sha512-couX95waDu98NfNZV+i/iLt+fdVxmI7CbrrdC2uDWfPdUAApyxT4wmDlyOtR5KtTDmkDO0zDScDjDou9YHhd9g==", - "requires": { - "@types/retry": "0.12.1", - "retry": "^0.13.1" - } - }, "p-timeout": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz", - "integrity": "sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==" + "integrity": "sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==", + "dev": true }, "p-try": { "version": "2.2.0", @@ -9624,25 +9029,6 @@ "react-is": "^16.13.1" } }, - "protobufjs": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.0.tgz", - "integrity": "sha512-hYCqTDuII4iJ4stZqiuGCSU8xxWl5JeXYpwARGtn/tWcKCAro6h3WQz+xpsNbXW0UYqpmTQFEyFWO0G0Kjt64g==", - "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/node": ">=13.7.0", - "long": "^5.0.0" - } - }, "punycode": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", @@ -9654,11 +9040,6 @@ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, - "rabin-rs": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/rabin-rs/-/rabin-rs-2.1.0.tgz", - "integrity": "sha512-5y72gAXPzIBsAMHcpxZP8eMDuDT98qMP1BqSDHRbHkJJXEgWIN1lA47LxUqzsK6jknOJtgfkQr9v+7qMlFDm6g==" - }, "react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -9781,11 +9162,6 @@ "signal-exit": "^3.0.2" } }, - "retry": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", - "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==" - }, "reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -10322,13 +9698,6 @@ "integrity": "sha512-b+aKlI2oTnxnfeSQWV1sMacqSNxqhtXySaH6bflvONGxF8V/fT3ZlYH7z2qgGfydsvpVo4JUgM/Ylyfl2YouCg==", "requires": { "multiformats": "^11.0.0" - }, - "dependencies": { - "multiformats": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.1.tgz", - "integrity": "sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==" - } } }, "unbox-primitive": { @@ -10379,11 +9748,6 @@ "defaults": "^1.0.3" } }, - "web-streams-polyfill": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", - "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==" - }, "well-known-symbols": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-2.0.0.tgz", diff --git a/package.json b/package.json index aaf7653..403ba19 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "lint": "standard", "test": "npm-run-all -p -r mock test:ava", "test:ava": "ava --verbose", + "test:watch": "ava --watch", "mock": "run-p mock:*", "mock:bucket-200": "PORT=9200 STATUS=200 node test/helpers/bucket-server.js" }, @@ -36,7 +37,7 @@ "@web3-storage/capabilities": "^2.1.0", "ava": "^5.1.0", "execa": "^6.1.0", - "multiformats": "^10.0.2", + "multiformats": "^11.0.0", "npm-run-all": "^4.1.5", "standard": "^17.0.0" }, diff --git a/test/bin.spec.js b/test/bin.spec.js index a11d1dd..84d9037 100644 --- a/test/bin.spec.js +++ b/test/bin.spec.js @@ -234,7 +234,7 @@ test('w3 remove - no such upload', async t => { const service = mockService({ upload: { - remove: provide(UploadCapabilities.remove, () => {}) + remove: provide(UploadCapabilities.remove, () => { }) } }) t.context.setService(service) @@ -251,7 +251,7 @@ test('w3 remove --shards', async t => { const service = mockService({ store: { - remove: provide(StoreCapabilities.remove, () => {}) + remove: provide(StoreCapabilities.remove, () => { }) }, upload: { remove: provide(UploadCapabilities.remove, ({ invocation }) => { @@ -281,7 +281,7 @@ test('w3 remove --shards - no shards to remove', async t => { const service = mockService({ store: { - remove: provide(StoreCapabilities.remove, () => {}) + remove: provide(StoreCapabilities.remove, () => { }) }, upload: { remove: provide(UploadCapabilities.remove, ({ invocation }) => { @@ -592,3 +592,83 @@ test('w3 can upload add', async (t) => { t.regex(out1.stderr, /Upload added/) }) + +test('w3 can upload ls', async (t) => { + const env = t.context.env.alice + + await execa('./bin.js', ['space', 'create'], { env }) + + const uploads = [] + + const service = mockService({ + store: { + add: provide(StoreCapabilities.add, () => ({ + status: 'upload', + headers: { 'x-test': 'true' }, + url: 'http://localhost:9200' + })) + }, + upload: { + add: provide(UploadCapabilities.add, ({ invocation }) => { + const { nb } = invocation.capabilities[0] + if (!nb) throw new Error('missing nb') + uploads.push(nb) + return nb + }), + list: provide(UploadCapabilities.list, () => { + return { results: uploads, size: uploads.length } + }) + } + }) + + t.context.setService(service) + + const list0 = await execa('./bin.js', ['can', 'upload', 'ls', '--raw'], { env }) + t.regex(list0.stdout, /\{"size":0,"results":\[\]\}/) + + await execa('./bin.js', ['up', 'test/fixtures/pinpie.jpg'], { env }) + + const list1 = await execa('./bin.js', ['can', 'upload', 'ls', '--json'], { env }) + t.notThrows(() => CID.parse(JSON.parse(list1.stdout).root)) +}) + +test('w3 can store ls', async (t) => { + const env = t.context.env.alice + + await execa('./bin.js', ['space', 'create'], { env }) + + const cars = [] + + const service = mockService({ + store: { + add: provide(StoreCapabilities.add, ({ invocation }) => { + cars.push({ link: invocation.root.cid }) + return ({ + status: 'upload', + headers: { 'x-test': 'true' }, + url: 'http://localhost:9200' + }) + }), + list: provide(StoreCapabilities.list, () => { + return { results: cars, size: cars.length } + }) + }, + upload: { + add: provide(UploadCapabilities.add, ({ invocation }) => { + const { nb } = invocation.capabilities[0] + if (!nb) throw new Error('missing nb') + return nb + }) + } + }) + + t.context.setService(service) + + const list0 = await execa('./bin.js', ['can', 'store', 'ls', '--raw'], { env }) + t.regex(list0.stdout, /\{"size":0,"results":\[\]\}/) + + await execa('./bin.js', ['up', 'test/fixtures/pinpie.jpg'], { env }) + + const list1 = await execa('./bin.js', ['can', 'store', 'ls', '--json'], { env }) + t.notThrows(() => CID.parse(JSON.parse(list1.stdout).link)) +}) diff --git a/test/lib.spec.js b/test/lib.spec.js index 85766bf..8891e1c 100644 --- a/test/lib.spec.js +++ b/test/lib.spec.js @@ -1,5 +1,11 @@ import test from 'ava' -import { filesFromPaths, filesize } from '../lib.js' +import * as CID from 'multiformats/cid' +import { + filesFromPaths, + filesize, + uploadListResponseToString, + storeListResponseToString +} from '../lib.js' test('filesFromPaths', async (t) => { const files = await filesFromPaths(['node_modules']) @@ -41,3 +47,95 @@ test('filesize', t => { [5_000_000_000, '5.0GB'] ].forEach(([size, str]) => t.is(filesize(size), str)) }) + +const uploadListResponse = { + size: 2, + cursor: 'bafybeibvbxjeodaa6hdqlgbwmv4qzdp3bxnwdoukay4dpl7aemkiwc2eje', + results: [ + { + root: CID.fromJSON({ '/': 'bafybeia7tr4dgyln7zeyyyzmkppkcts6azdssykuluwzmmswysieyadcbm' }), + shards: [CID.fromJSON({ '/': 'bagbaierantza4rfjnhqksp2stcnd2tdjrn3f2kgi2wrvaxmayeuolryi66fq' })], + updatedAt: '2023-02-13T16:29:48.520Z', + insertedAt: '2023-02-13T16:27:36.451Z' + }, + { + root: CID.fromJSON({ '/': 'bafybeibvbxjeodaa6hdqlgbwmv4qzdp3bxnwdoukay4dpl7aemkiwc2eje' }), + shards: [CID.fromJSON({ '/': 'bagbaieraxqbkzwvx5on6an4br5hagfgesdfc6adchy3hf5qt34pupfjd3rbq' })], + updatedAt: '2023-02-13T16:30:22.086Z', + insertedAt: '2023-02-13T16:30:22.086Z' + } + ], + endCursor: 'bafybeibvbxjeodaa6hdqlgbwmv4qzdp3bxnwdoukay4dpl7aemkiwc2eje', + startCursor: 'bafybeia7tr4dgyln7zeyyyzmkppkcts6azdssykuluwzmmswysieyadcbm' +} + +test('uploadListResponseToString can return the upload roots CIDs as strings', (t) => { + t.is( + uploadListResponseToString(uploadListResponse, {}), + `bafybeia7tr4dgyln7zeyyyzmkppkcts6azdssykuluwzmmswysieyadcbm +bafybeibvbxjeodaa6hdqlgbwmv4qzdp3bxnwdoukay4dpl7aemkiwc2eje` + ) +}) + +test('uploadListResponseToString can return the upload roots as newline delimited JSON', (t) => { + t.is( + uploadListResponseToString(uploadListResponse, { shards: true }), + `bafybeia7tr4dgyln7zeyyyzmkppkcts6azdssykuluwzmmswysieyadcbm +└─┬ shards + └── bagbaierantza4rfjnhqksp2stcnd2tdjrn3f2kgi2wrvaxmayeuolryi66fq + +bafybeibvbxjeodaa6hdqlgbwmv4qzdp3bxnwdoukay4dpl7aemkiwc2eje +└─┬ shards + └── bagbaieraxqbkzwvx5on6an4br5hagfgesdfc6adchy3hf5qt34pupfjd3rbq +` + ) +}) + +test('uploadListResponseToString can return the upload roots and shards as a tree', (t) => { + t.is( + uploadListResponseToString(uploadListResponse, { json: true }), + `{"root":"bafybeia7tr4dgyln7zeyyyzmkppkcts6azdssykuluwzmmswysieyadcbm","shards":["bagbaierantza4rfjnhqksp2stcnd2tdjrn3f2kgi2wrvaxmayeuolryi66fq"]} +{"root":"bafybeibvbxjeodaa6hdqlgbwmv4qzdp3bxnwdoukay4dpl7aemkiwc2eje","shards":["bagbaieraxqbkzwvx5on6an4br5hagfgesdfc6adchy3hf5qt34pupfjd3rbq"]}` + ) +}) + +test('uploadListResponseToString can return the response as raw JSON', (t) => { + t.is( + uploadListResponseToString(uploadListResponse, { raw: true }), + '{"size":2,"cursor":"bafybeibvbxjeodaa6hdqlgbwmv4qzdp3bxnwdoukay4dpl7aemkiwc2eje","results":[{"root":{"/":"bafybeia7tr4dgyln7zeyyyzmkppkcts6azdssykuluwzmmswysieyadcbm"},"shards":[{"/":"bagbaierantza4rfjnhqksp2stcnd2tdjrn3f2kgi2wrvaxmayeuolryi66fq"}],"updatedAt":"2023-02-13T16:29:48.520Z","insertedAt":"2023-02-13T16:27:36.451Z"},{"root":{"/":"bafybeibvbxjeodaa6hdqlgbwmv4qzdp3bxnwdoukay4dpl7aemkiwc2eje"},"shards":[{"/":"bagbaieraxqbkzwvx5on6an4br5hagfgesdfc6adchy3hf5qt34pupfjd3rbq"}],"updatedAt":"2023-02-13T16:30:22.086Z","insertedAt":"2023-02-13T16:30:22.086Z"}],"endCursor":"bafybeibvbxjeodaa6hdqlgbwmv4qzdp3bxnwdoukay4dpl7aemkiwc2eje","startCursor":"bafybeia7tr4dgyln7zeyyyzmkppkcts6azdssykuluwzmmswysieyadcbm"}' + ) +}) + +const storeListResponse = { + size: 2, + cursor: 'bagbaieracmkgwrw6rowsk5jse5eihyhszyrq5w23aqosajyckn2tfbotdcqq', + results: [ + { link: CID.fromJSON({ '/': 'bagbaierablvu5d2q5uoimuy2tlc3tcntahnw2j7s7jjaznawc23zgdgcisma' }), size: 5336, insertedAt: '2023-02-13T10:57:23.274Z' }, + { link: CID.fromJSON({ '/': 'bagbaieracmkgwrw6rowsk5jse5eihyhszyrq5w23aqosajyckn2tfbotdcqq' }), size: 3297, insertedAt: '2023-02-13T16:30:02.077Z' } + ], + endCursor: 'bagbaieracmkgwrw6rowsk5jse5eihyhszyrq5w23aqosajyckn2tfbotdcqq', + startCursor: 'bagbaierablvu5d2q5uoimuy2tlc3tcntahnw2j7s7jjaznawc23zgdgcisma' +} + +test('storeListResponseToString can return the CAR CIDs as strings', (t) => { + t.is( + storeListResponseToString(storeListResponse, {}), + `bagbaierablvu5d2q5uoimuy2tlc3tcntahnw2j7s7jjaznawc23zgdgcisma +bagbaieracmkgwrw6rowsk5jse5eihyhszyrq5w23aqosajyckn2tfbotdcqq` + ) +}) + +test('storeListResponseToString can return the CAR CIDs as newline delimited JSON', (t) => { + t.is( + storeListResponseToString(storeListResponse, { json: true }), + `{"link":"bagbaierablvu5d2q5uoimuy2tlc3tcntahnw2j7s7jjaznawc23zgdgcisma","size":5336,"insertedAt":"2023-02-13T10:57:23.274Z"} +{"link":"bagbaieracmkgwrw6rowsk5jse5eihyhszyrq5w23aqosajyckn2tfbotdcqq","size":3297,"insertedAt":"2023-02-13T16:30:02.077Z"}` + ) +}) + +test('storeListResponseToString can return the response as raw JSON', (t) => { + t.is( + storeListResponseToString(storeListResponse, { raw: true }), + '{"size":2,"cursor":"bagbaieracmkgwrw6rowsk5jse5eihyhszyrq5w23aqosajyckn2tfbotdcqq","results":[{"link":{"/":"bagbaierablvu5d2q5uoimuy2tlc3tcntahnw2j7s7jjaznawc23zgdgcisma"},"size":5336,"insertedAt":"2023-02-13T10:57:23.274Z"},{"link":{"/":"bagbaieracmkgwrw6rowsk5jse5eihyhszyrq5w23aqosajyckn2tfbotdcqq"},"size":3297,"insertedAt":"2023-02-13T16:30:02.077Z"}],"endCursor":"bagbaieracmkgwrw6rowsk5jse5eihyhszyrq5w23aqosajyckn2tfbotdcqq","startCursor":"bagbaierablvu5d2q5uoimuy2tlc3tcntahnw2j7s7jjaznawc23zgdgcisma"}' + ) +})