diff --git a/package-lock.json b/package-lock.json index 8edd0b08..ef8b4900 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2890,6 +2890,7 @@ }, "node_modules/@ljharb/through": { "version": "2.3.9", + "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -3002,6 +3003,14 @@ "node": ">=10" } }, + "node_modules/@opentelemetry/api": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.6.0.tgz", + "integrity": "sha512-OWlrQAnWn9577PhVgqjUvMr1pg57Bc4jv0iL4w0PRuOSRvq67rvHW9Ie/dZVMvCzhSCB+UxhcY/PmCmFj33Q+g==", + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/@perma/map": { "version": "1.0.3", "dev": true, @@ -4505,9 +4514,9 @@ } }, "node_modules/@web3-storage/upload-api": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/@web3-storage/upload-api/-/upload-api-5.9.0.tgz", - "integrity": "sha512-OpnMmGWfSzVpyO513DoSOFDvwo5Z2D26xK+KFsnU12pkyUZ5+r9YF67sIwfsgc6YyTlAHVQkIkROWKA480YJvg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@web3-storage/upload-api/-/upload-api-6.0.0.tgz", + "integrity": "sha512-+OYrP3lctgm/fkTpANdDAsErc0Uq9Pzfcj9+zXLXzR2o15j0zHAzcxzzAzih2R2ImvGmui35FzG/2g3fcAA+JA==", "dependencies": { "@ucanto/client": "^9.0.0", "@ucanto/interface": "^9.0.0", @@ -4515,8 +4524,8 @@ "@ucanto/server": "^9.0.1", "@ucanto/transport": "^9.0.0", "@ucanto/validator": "^9.0.0", - "@web3-storage/access": "^15.3.0", - "@web3-storage/capabilities": "^9.5.0", + "@web3-storage/access": "^16.0.0", + "@web3-storage/capabilities": "^10.0.0", "@web3-storage/did-mailto": "^2.0.1", "multiformats": "^12.1.2", "p-retry": "^5.1.2" @@ -4525,46 +4534,17 @@ "node": ">=16.15" } }, - "node_modules/@web3-storage/upload-api/node_modules/@web3-storage/access": { - "version": "15.3.0", - "resolved": "https://registry.npmjs.org/@web3-storage/access/-/access-15.3.0.tgz", - "integrity": "sha512-c5EPOmrX3hs5dchizddRwK3GkYdgppAVdjMYPoWtXy7+Q6PiWYqREjSWz63oYGgMbJRodQo+wDkOIyUX/v1Xvw==", + "node_modules/@web3-storage/upload-api/node_modules/@web3-storage/capabilities": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@web3-storage/capabilities/-/capabilities-10.0.0.tgz", + "integrity": "sha512-J9z0O5ACgKVbeBksyZLTL3rbhta/592ucQ6BKJ8gX9yFv5FAFpi+3vVpq22lkHs25sd/MfOo+VsAAg5qdQFvog==", "dependencies": { - "@ipld/car": "^5.1.1", - "@ipld/dag-ucan": "^3.4.0", - "@ucanto/client": "^9.0.0", "@ucanto/core": "^9.0.0", "@ucanto/interface": "^9.0.0", "@ucanto/principal": "^9.0.0", "@ucanto/transport": "^9.0.0", "@ucanto/validator": "^9.0.0", - "@web3-storage/capabilities": "^9.3.0", - "@web3-storage/did-mailto": "^2.0.1", - "bigint-mod-arith": "^3.1.2", - "conf": "10.2.0", - "inquirer": "^9.1.4", - "isomorphic-ws": "^5.0.0", - "kysely": "^0.23.4", - "multiformats": "^12.1.2", - "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.6", - "ws": "^8.12.0", - "zod": "^3.20.2" - }, - "bin": { - "w3access": "src/cli/index.js" - } - }, - "node_modules/@web3-storage/upload-api/node_modules/kysely": { - "version": "0.23.5", - "resolved": "https://registry.npmjs.org/kysely/-/kysely-0.23.5.tgz", - "integrity": "sha512-TH+b56pVXQq0tsyooYLeNfV11j6ih7D50dyN8tkM0e7ndiUH28Nziojiog3qRFlmEj9XePYdZUrNJ2079Qjdow==", - "engines": { - "node": ">=14.0.0" + "@web3-storage/data-segment": "^3.2.0" } }, "node_modules/@web3-storage/upload-api/node_modules/multiformats": { @@ -4975,6 +4955,7 @@ }, "node_modules/ansi-escapes": { "version": "4.3.2", + "dev": true, "license": "MIT", "dependencies": { "type-fest": "^0.21.3" @@ -4988,6 +4969,7 @@ }, "node_modules/ansi-escapes/node_modules/type-fest": { "version": "0.21.3", + "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" @@ -4998,6 +4980,7 @@ }, "node_modules/ansi-regex": { "version": "6.0.1", + "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -5338,6 +5321,7 @@ }, "node_modules/at-least-node": { "version": "1.0.0", + "dev": true, "license": "ISC", "engines": { "node": ">= 4.0.0" @@ -5884,6 +5868,7 @@ }, "node_modules/bl": { "version": "5.1.0", + "dev": true, "license": "MIT", "dependencies": { "buffer": "^6.0.3", @@ -5893,6 +5878,7 @@ }, "node_modules/bl/node_modules/buffer": { "version": "6.0.3", + "dev": true, "funding": [ { "type": "github", @@ -5915,6 +5901,7 @@ }, "node_modules/bl/node_modules/ieee754": { "version": "1.2.1", + "dev": true, "funding": [ { "type": "github", @@ -6279,6 +6266,7 @@ }, "node_modules/chardet": { "version": "0.7.0", + "dev": true, "license": "MIT" }, "node_modules/chokidar": { @@ -6382,6 +6370,7 @@ }, "node_modules/cli-cursor": { "version": "3.1.0", + "dev": true, "license": "MIT", "dependencies": { "restore-cursor": "^3.1.0" @@ -6392,6 +6381,7 @@ }, "node_modules/cli-spinners": { "version": "2.9.0", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -6417,6 +6407,7 @@ }, "node_modules/cli-width": { "version": "4.1.0", + "dev": true, "license": "ISC", "engines": { "node": ">= 12" @@ -6479,6 +6470,7 @@ }, "node_modules/clone": { "version": "1.0.4", + "dev": true, "license": "MIT", "engines": { "node": ">=0.8" @@ -6798,6 +6790,7 @@ }, "node_modules/defaults": { "version": "1.0.4", + "dev": true, "license": "MIT", "dependencies": { "clone": "^1.0.2" @@ -7363,6 +7356,7 @@ }, "node_modules/escape-string-regexp": { "version": "5.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -8248,6 +8242,7 @@ }, "node_modules/external-editor": { "version": "3.1.0", + "dev": true, "license": "MIT", "dependencies": { "chardet": "^0.7.0", @@ -8482,6 +8477,7 @@ }, "node_modules/fs-extra": { "version": "9.1.0", + "dev": true, "license": "MIT", "dependencies": { "at-least-node": "^1.0.0", @@ -8804,6 +8800,7 @@ }, "node_modules/graceful-fs": { "version": "4.2.11", + "dev": true, "license": "ISC" }, "node_modules/graphemer": { @@ -8845,6 +8842,7 @@ }, "node_modules/has-flag": { "version": "4.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -8995,6 +8993,7 @@ }, "node_modules/iconv-lite": { "version": "0.4.24", + "dev": true, "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" @@ -9086,6 +9085,7 @@ }, "node_modules/inquirer": { "version": "9.2.10", + "dev": true, "license": "MIT", "dependencies": { "@ljharb/through": "^2.3.9", @@ -9110,6 +9110,7 @@ }, "node_modules/inquirer/node_modules/ansi-regex": { "version": "5.0.1", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -9117,6 +9118,7 @@ }, "node_modules/inquirer/node_modules/ansi-styles": { "version": "4.3.0", + "dev": true, "license": "MIT", "dependencies": { "color-convert": "^2.0.1" @@ -9130,6 +9132,7 @@ }, "node_modules/inquirer/node_modules/bl": { "version": "4.1.0", + "dev": true, "license": "MIT", "dependencies": { "buffer": "^5.5.0", @@ -9139,6 +9142,7 @@ }, "node_modules/inquirer/node_modules/buffer": { "version": "5.7.1", + "dev": true, "funding": [ { "type": "github", @@ -9161,6 +9165,7 @@ }, "node_modules/inquirer/node_modules/chalk": { "version": "5.3.0", + "dev": true, "license": "MIT", "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" @@ -9171,6 +9176,7 @@ }, "node_modules/inquirer/node_modules/color-convert": { "version": "2.0.1", + "dev": true, "license": "MIT", "dependencies": { "color-name": "~1.1.4" @@ -9181,14 +9187,17 @@ }, "node_modules/inquirer/node_modules/color-name": { "version": "1.1.4", + "dev": true, "license": "MIT" }, "node_modules/inquirer/node_modules/emoji-regex": { "version": "8.0.0", + "dev": true, "license": "MIT" }, "node_modules/inquirer/node_modules/figures": { "version": "5.0.0", + "dev": true, "license": "MIT", "dependencies": { "escape-string-regexp": "^5.0.0", @@ -9203,6 +9212,7 @@ }, "node_modules/inquirer/node_modules/is-fullwidth-code-point": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -9210,6 +9220,7 @@ }, "node_modules/inquirer/node_modules/is-interactive": { "version": "1.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -9217,6 +9228,7 @@ }, "node_modules/inquirer/node_modules/log-symbols": { "version": "4.1.0", + "dev": true, "license": "MIT", "dependencies": { "chalk": "^4.1.0", @@ -9231,6 +9243,7 @@ }, "node_modules/inquirer/node_modules/log-symbols/node_modules/chalk": { "version": "4.1.2", + "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", @@ -9245,6 +9258,7 @@ }, "node_modules/inquirer/node_modules/log-symbols/node_modules/is-unicode-supported": { "version": "0.1.0", + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -9255,6 +9269,7 @@ }, "node_modules/inquirer/node_modules/ora": { "version": "5.4.1", + "dev": true, "license": "MIT", "dependencies": { "bl": "^4.1.0", @@ -9276,6 +9291,7 @@ }, "node_modules/inquirer/node_modules/ora/node_modules/chalk": { "version": "4.1.2", + "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", @@ -9290,6 +9306,7 @@ }, "node_modules/inquirer/node_modules/ora/node_modules/is-unicode-supported": { "version": "0.1.0", + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -9300,6 +9317,7 @@ }, "node_modules/inquirer/node_modules/string-width": { "version": "4.2.3", + "dev": true, "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", @@ -9312,6 +9330,7 @@ }, "node_modules/inquirer/node_modules/strip-ansi": { "version": "6.0.1", + "dev": true, "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" @@ -9621,6 +9640,7 @@ }, "node_modules/is-interactive": { "version": "2.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -9791,6 +9811,7 @@ }, "node_modules/is-unicode-supported": { "version": "1.3.0", + "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -9829,6 +9850,7 @@ }, "node_modules/isomorphic-ws": { "version": "5.0.0", + "dev": true, "license": "MIT", "peerDependencies": { "ws": "*" @@ -9988,6 +10010,7 @@ }, "node_modules/jsonfile": { "version": "6.1.0", + "dev": true, "license": "MIT", "dependencies": { "universalify": "^2.0.0" @@ -10385,6 +10408,7 @@ }, "node_modules/lodash": { "version": "4.17.21", + "dev": true, "license": "MIT" }, "node_modules/lodash.defaults": { @@ -10419,6 +10443,7 @@ }, "node_modules/log-symbols": { "version": "5.1.0", + "dev": true, "license": "MIT", "dependencies": { "chalk": "^5.0.0", @@ -10433,6 +10458,7 @@ }, "node_modules/log-symbols/node_modules/chalk": { "version": "5.3.0", + "dev": true, "license": "MIT", "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" @@ -10944,6 +10970,7 @@ }, "node_modules/mute-stream": { "version": "1.0.0", + "dev": true, "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" @@ -10957,6 +10984,7 @@ }, "node_modules/nanoid": { "version": "4.0.2", + "dev": true, "funding": [ { "type": "github", @@ -11338,6 +11366,7 @@ }, "node_modules/ora": { "version": "6.3.1", + "dev": true, "license": "MIT", "dependencies": { "chalk": "^5.0.0", @@ -11359,6 +11388,7 @@ }, "node_modules/ora/node_modules/chalk": { "version": "5.3.0", + "dev": true, "license": "MIT", "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" @@ -11369,6 +11399,7 @@ }, "node_modules/ora/node_modules/cli-cursor": { "version": "4.0.0", + "dev": true, "license": "MIT", "dependencies": { "restore-cursor": "^4.0.0" @@ -11382,6 +11413,7 @@ }, "node_modules/ora/node_modules/restore-cursor": { "version": "4.0.0", + "dev": true, "license": "MIT", "dependencies": { "onetime": "^5.1.0", @@ -11396,6 +11428,7 @@ }, "node_modules/os-tmpdir": { "version": "1.0.2", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -11533,6 +11566,7 @@ }, "node_modules/p-wait-for": { "version": "5.0.2", + "dev": true, "license": "MIT", "dependencies": { "p-timeout": "^6.0.0" @@ -11546,6 +11580,7 @@ }, "node_modules/p-wait-for/node_modules/p-timeout": { "version": "6.1.2", + "dev": true, "license": "MIT", "engines": { "node": ">=14.16" @@ -11858,8 +11893,9 @@ } }, "node_modules/preact-render-to-string": { - "version": "5.2.6", - "license": "MIT", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-6.2.2.tgz", + "integrity": "sha512-YDfXQiVeYZutFR8/DpxLSbW3W6b7GgjBExRBxOOqcjrGq5rA9cziitQdNPMZe4RVMSdfBnf4hYqyeLs/KvtIuA==", "dependencies": { "pretty-format": "^3.8.0" }, @@ -11913,13 +11949,15 @@ "license": "MIT" }, "node_modules/prom-client": { - "version": "14.2.0", - "license": "Apache-2.0", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/prom-client/-/prom-client-15.0.0.tgz", + "integrity": "sha512-UocpgIrKyA2TKLVZDSfm8rGkL13C19YrQBAiG3xo3aDFWcHedxRxI3z+cIcucoxpSO0h5lff5iv/SXoxyeopeA==", "dependencies": { + "@opentelemetry/api": "^1.4.0", "tdigest": "^0.1.1" }, "engines": { - "node": ">=10" + "node": "^16 || ^18 || >=20" } }, "node_modules/promise-inflight": { @@ -12216,6 +12254,7 @@ }, "node_modules/readable-stream": { "version": "3.6.2", + "dev": true, "license": "MIT", "dependencies": { "inherits": "^2.0.3", @@ -12387,6 +12426,7 @@ }, "node_modules/restore-cursor": { "version": "3.1.0", + "dev": true, "license": "MIT", "dependencies": { "onetime": "^5.1.0", @@ -12433,6 +12473,7 @@ }, "node_modules/run-async": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=0.12.0" @@ -12462,6 +12503,7 @@ }, "node_modules/rxjs": { "version": "7.8.1", + "dev": true, "license": "Apache-2.0", "dependencies": { "tslib": "^2.1.0" @@ -12694,6 +12736,7 @@ }, "node_modules/signal-exit": { "version": "3.0.7", + "dev": true, "license": "ISC" }, "node_modules/simple-git-hooks": { @@ -12892,6 +12935,7 @@ }, "node_modules/stdin-discarder": { "version": "0.1.0", + "dev": true, "license": "MIT", "dependencies": { "bl": "^5.0.0" @@ -12963,6 +13007,7 @@ }, "node_modules/string_decoder": { "version": "1.3.0", + "dev": true, "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" @@ -13054,6 +13099,7 @@ }, "node_modules/strip-ansi": { "version": "7.1.0", + "dev": true, "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" @@ -13146,6 +13192,7 @@ }, "node_modules/supports-color": { "version": "7.2.0", + "dev": true, "license": "MIT", "dependencies": { "has-flag": "^4.0.0" @@ -13315,6 +13362,7 @@ }, "node_modules/tmp": { "version": "0.0.33", + "dev": true, "license": "MIT", "dependencies": { "os-tmpdir": "~1.0.2" @@ -13720,6 +13768,7 @@ }, "node_modules/universalify": { "version": "2.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">= 10.0.0" @@ -13765,6 +13814,7 @@ }, "node_modules/util-deprecate": { "version": "1.0.2", + "dev": true, "license": "MIT" }, "node_modules/utils-merge": { @@ -13805,6 +13855,7 @@ }, "node_modules/wcwidth": { "version": "1.0.1", + "dev": true, "license": "MIT", "dependencies": { "defaults": "^1.0.3" @@ -13955,6 +14006,7 @@ }, "node_modules/wrap-ansi": { "version": "6.2.0", + "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", @@ -13967,6 +14019,7 @@ }, "node_modules/wrap-ansi/node_modules/ansi-regex": { "version": "5.0.1", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -13974,6 +14027,7 @@ }, "node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "4.3.0", + "dev": true, "license": "MIT", "dependencies": { "color-convert": "^2.0.1" @@ -13987,6 +14041,7 @@ }, "node_modules/wrap-ansi/node_modules/color-convert": { "version": "2.0.1", + "dev": true, "license": "MIT", "dependencies": { "color-name": "~1.1.4" @@ -13997,14 +14052,17 @@ }, "node_modules/wrap-ansi/node_modules/color-name": { "version": "1.1.4", + "dev": true, "license": "MIT" }, "node_modules/wrap-ansi/node_modules/emoji-regex": { "version": "8.0.0", + "dev": true, "license": "MIT" }, "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -14012,6 +14070,7 @@ }, "node_modules/wrap-ansi/node_modules/string-width": { "version": "4.2.3", + "dev": true, "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", @@ -14024,6 +14083,7 @@ }, "node_modules/wrap-ansi/node_modules/strip-ansi": { "version": "6.0.1", + "dev": true, "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" @@ -14051,6 +14111,7 @@ }, "node_modules/ws": { "version": "8.13.0", + "dev": true, "license": "MIT", "engines": { "node": ">=10.0.0" @@ -14280,6 +14341,7 @@ }, "node_modules/zod": { "version": "3.21.4", + "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" @@ -14442,14 +14504,14 @@ "@ucanto/validator": "^9.0.0", "@web-std/fetch": "^4.1.0", "@web3-storage/access": "^16.0.0", - "@web3-storage/capabilities": "^9.3.0", - "@web3-storage/upload-api": "^5.9.0", + "@web3-storage/capabilities": "^10.0.0", + "@web3-storage/upload-api": "^6.0.0", "@web3-storage/w3infra-ucan-invocation": "*", - "multiformats": "^11.0.1", - "nanoid": "^4.0.2", + "multiformats": "^12.1.2", + "nanoid": "^5.0.2", "preact": "^10.14.1", - "preact-render-to-string": "^5.2.6", - "prom-client": "^14.2.0", + "preact-render-to-string": "^6.2.2", + "prom-client": "^15.0.0", "uint8arrays": "^4.0.2" }, "devDependencies": { @@ -14465,6 +14527,45 @@ "engines": { "node": ">=16.15" } + }, + "upload-api/node_modules/@web3-storage/capabilities": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@web3-storage/capabilities/-/capabilities-10.0.0.tgz", + "integrity": "sha512-J9z0O5ACgKVbeBksyZLTL3rbhta/592ucQ6BKJ8gX9yFv5FAFpi+3vVpq22lkHs25sd/MfOo+VsAAg5qdQFvog==", + "dependencies": { + "@ucanto/core": "^9.0.0", + "@ucanto/interface": "^9.0.0", + "@ucanto/principal": "^9.0.0", + "@ucanto/transport": "^9.0.0", + "@ucanto/validator": "^9.0.0", + "@web3-storage/data-segment": "^3.2.0" + } + }, + "upload-api/node_modules/multiformats": { + "version": "12.1.2", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.2.tgz", + "integrity": "sha512-6mRIsrZXyw5xNPO31IGBMmxgDXBSgCGDsBAtazkZ02ip4hMwZNrQvfxXZtytRoBSWuzSq5f9VmMnXj76fIz5FQ==", + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, + "upload-api/node_modules/nanoid": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.0.2.tgz", + "integrity": "sha512-2ustYUX1R2rL/Br5B/FMhi8d5/QzvkJ912rBYxskcpu0myTHzSZfTr1LAS2Sm7jxRUObRrSBFoyzwAhL49aVSg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.js" + }, + "engines": { + "node": "^18 || >=20" + } } }, "dependencies": { @@ -16588,7 +16689,8 @@ } }, "@ljharb/through": { - "version": "2.3.9" + "version": "2.3.9", + "dev": true }, "@multiformats/murmur3": { "version": "2.1.6", @@ -16656,6 +16758,11 @@ "rimraf": "^3.0.2" } }, + "@opentelemetry/api": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.6.0.tgz", + "integrity": "sha512-OWlrQAnWn9577PhVgqjUvMr1pg57Bc4jv0iL4w0PRuOSRvq67rvHW9Ie/dZVMvCzhSCB+UxhcY/PmCmFj33Q+g==" + }, "@perma/map": { "version": "1.0.3", "dev": true, @@ -17765,9 +17872,9 @@ } }, "@web3-storage/upload-api": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/@web3-storage/upload-api/-/upload-api-5.9.0.tgz", - "integrity": "sha512-OpnMmGWfSzVpyO513DoSOFDvwo5Z2D26xK+KFsnU12pkyUZ5+r9YF67sIwfsgc6YyTlAHVQkIkROWKA480YJvg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@web3-storage/upload-api/-/upload-api-6.0.0.tgz", + "integrity": "sha512-+OYrP3lctgm/fkTpANdDAsErc0Uq9Pzfcj9+zXLXzR2o15j0zHAzcxzzAzih2R2ImvGmui35FzG/2g3fcAA+JA==", "requires": { "@ucanto/client": "^9.0.0", "@ucanto/interface": "^9.0.0", @@ -17775,49 +17882,26 @@ "@ucanto/server": "^9.0.1", "@ucanto/transport": "^9.0.0", "@ucanto/validator": "^9.0.0", - "@web3-storage/access": "^15.3.0", - "@web3-storage/capabilities": "^9.5.0", + "@web3-storage/access": "^16.0.0", + "@web3-storage/capabilities": "^10.0.0", "@web3-storage/did-mailto": "^2.0.1", "multiformats": "^12.1.2", "p-retry": "^5.1.2" }, "dependencies": { - "@web3-storage/access": { - "version": "15.3.0", - "resolved": "https://registry.npmjs.org/@web3-storage/access/-/access-15.3.0.tgz", - "integrity": "sha512-c5EPOmrX3hs5dchizddRwK3GkYdgppAVdjMYPoWtXy7+Q6PiWYqREjSWz63oYGgMbJRodQo+wDkOIyUX/v1Xvw==", + "@web3-storage/capabilities": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@web3-storage/capabilities/-/capabilities-10.0.0.tgz", + "integrity": "sha512-J9z0O5ACgKVbeBksyZLTL3rbhta/592ucQ6BKJ8gX9yFv5FAFpi+3vVpq22lkHs25sd/MfOo+VsAAg5qdQFvog==", "requires": { - "@ipld/car": "^5.1.1", - "@ipld/dag-ucan": "^3.4.0", - "@ucanto/client": "^9.0.0", "@ucanto/core": "^9.0.0", "@ucanto/interface": "^9.0.0", "@ucanto/principal": "^9.0.0", "@ucanto/transport": "^9.0.0", "@ucanto/validator": "^9.0.0", - "@web3-storage/capabilities": "^9.3.0", - "@web3-storage/did-mailto": "^2.0.1", - "bigint-mod-arith": "^3.1.2", - "conf": "10.2.0", - "inquirer": "^9.1.4", - "isomorphic-ws": "^5.0.0", - "kysely": "^0.23.4", - "multiformats": "^12.1.2", - "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.6", - "ws": "^8.12.0", - "zod": "^3.20.2" + "@web3-storage/data-segment": "^3.2.0" } }, - "kysely": { - "version": "0.23.5", - "resolved": "https://registry.npmjs.org/kysely/-/kysely-0.23.5.tgz", - "integrity": "sha512-TH+b56pVXQq0tsyooYLeNfV11j6ih7D50dyN8tkM0e7ndiUH28Nziojiog3qRFlmEj9XePYdZUrNJ2079Qjdow==" - }, "multiformats": { "version": "12.1.2", "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.2.tgz", @@ -18094,19 +18178,44 @@ "@web-std/blob": "3.0.4", "@web-std/fetch": "^4.1.0", "@web3-storage/access": "^16.0.0", - "@web3-storage/capabilities": "^9.3.0", + "@web3-storage/capabilities": "10.0.0", "@web3-storage/sigv4": "^1.0.2", - "@web3-storage/upload-api": "^5.9.0", + "@web3-storage/upload-api": "6.0.0", "@web3-storage/w3infra-ucan-invocation": "*", "ava": "^4.3.3", "aws-lambda-test-utils": "^1.3.0", - "multiformats": "^11.0.1", - "nanoid": "^4.0.2", + "multiformats": "12.1.2", + "nanoid": "5.0.2", "preact": "^10.14.1", - "preact-render-to-string": "^5.2.6", - "prom-client": "^14.2.0", + "preact-render-to-string": "6.2.2", + "prom-client": "15.0.0", "testcontainers": "^8.13.0", "uint8arrays": "^4.0.2" + }, + "dependencies": { + "@web3-storage/capabilities": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@web3-storage/capabilities/-/capabilities-10.0.0.tgz", + "integrity": "sha512-J9z0O5ACgKVbeBksyZLTL3rbhta/592ucQ6BKJ8gX9yFv5FAFpi+3vVpq22lkHs25sd/MfOo+VsAAg5qdQFvog==", + "requires": { + "@ucanto/core": "^9.0.0", + "@ucanto/interface": "^9.0.0", + "@ucanto/principal": "^9.0.0", + "@ucanto/transport": "^9.0.0", + "@ucanto/validator": "^9.0.0", + "@web3-storage/data-segment": "^3.2.0" + } + }, + "multiformats": { + "version": "12.1.2", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.2.tgz", + "integrity": "sha512-6mRIsrZXyw5xNPO31IGBMmxgDXBSgCGDsBAtazkZ02ip4hMwZNrQvfxXZtytRoBSWuzSq5f9VmMnXj76fIz5FQ==" + }, + "nanoid": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.0.2.tgz", + "integrity": "sha512-2ustYUX1R2rL/Br5B/FMhi8d5/QzvkJ912rBYxskcpu0myTHzSZfTr1LAS2Sm7jxRUObRrSBFoyzwAhL49aVSg==" + } } }, "@web3-storage/w3up-client": { @@ -18317,17 +18426,20 @@ }, "ansi-escapes": { "version": "4.3.2", + "dev": true, "requires": { "type-fest": "^0.21.3" }, "dependencies": { "type-fest": { - "version": "0.21.3" + "version": "0.21.3", + "dev": true } } }, "ansi-regex": { - "version": "6.0.1" + "version": "6.0.1", + "dev": true }, "ansi-styles": { "version": "6.2.1", @@ -18567,7 +18679,8 @@ } }, "at-least-node": { - "version": "1.0.0" + "version": "1.0.0", + "dev": true }, "atomically": { "version": "1.7.0" @@ -18910,6 +19023,7 @@ }, "bl": { "version": "5.1.0", + "dev": true, "requires": { "buffer": "^6.0.3", "inherits": "^2.0.4", @@ -18918,13 +19032,15 @@ "dependencies": { "buffer": { "version": "6.0.3", + "dev": true, "requires": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" } }, "ieee754": { - "version": "1.2.1" + "version": "1.2.1", + "dev": true } } }, @@ -19166,7 +19282,8 @@ } }, "chardet": { - "version": "0.7.0" + "version": "0.7.0", + "dev": true }, "chokidar": { "version": "3.5.3", @@ -19224,12 +19341,14 @@ }, "cli-cursor": { "version": "3.1.0", + "dev": true, "requires": { "restore-cursor": "^3.1.0" } }, "cli-spinners": { - "version": "2.9.0" + "version": "2.9.0", + "dev": true }, "cli-truncate": { "version": "3.1.0", @@ -19240,7 +19359,8 @@ } }, "cli-width": { - "version": "4.1.0" + "version": "4.1.0", + "dev": true }, "cliui": { "version": "6.0.0", @@ -19282,7 +19402,8 @@ } }, "clone": { - "version": "1.0.4" + "version": "1.0.4", + "dev": true }, "code-excerpt": { "version": "4.0.0", @@ -19483,6 +19604,7 @@ }, "defaults": { "version": "1.0.4", + "dev": true, "requires": { "clone": "^1.0.2" } @@ -19862,7 +19984,8 @@ "dev": true }, "escape-string-regexp": { - "version": "5.0.0" + "version": "5.0.0", + "dev": true }, "escodegen": { "version": "2.1.0", @@ -20413,6 +20536,7 @@ }, "external-editor": { "version": "3.1.0", + "dev": true, "requires": { "chardet": "^0.7.0", "iconv-lite": "^0.4.24", @@ -20574,6 +20698,7 @@ }, "fs-extra": { "version": "9.1.0", + "dev": true, "requires": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", @@ -20772,7 +20897,8 @@ } }, "graceful-fs": { - "version": "4.2.11" + "version": "4.2.11", + "dev": true }, "graphemer": { "version": "1.4.0", @@ -20796,7 +20922,8 @@ "dev": true }, "has-flag": { - "version": "4.0.0" + "version": "4.0.0", + "dev": true }, "has-property-descriptors": { "version": "1.0.0", @@ -20894,6 +21021,7 @@ }, "iconv-lite": { "version": "0.4.24", + "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" } @@ -20946,6 +21074,7 @@ }, "inquirer": { "version": "9.2.10", + "dev": true, "requires": { "@ljharb/through": "^2.3.9", "ansi-escapes": "^4.3.2", @@ -20965,16 +21094,19 @@ }, "dependencies": { "ansi-regex": { - "version": "5.0.1" + "version": "5.0.1", + "dev": true }, "ansi-styles": { "version": "4.3.0", + "dev": true, "requires": { "color-convert": "^2.0.1" } }, "bl": { "version": "4.1.0", + "dev": true, "requires": { "buffer": "^5.5.0", "inherits": "^2.0.4", @@ -20983,41 +21115,50 @@ }, "buffer": { "version": "5.7.1", + "dev": true, "requires": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, "chalk": { - "version": "5.3.0" + "version": "5.3.0", + "dev": true }, "color-convert": { "version": "2.0.1", + "dev": true, "requires": { "color-name": "~1.1.4" } }, "color-name": { - "version": "1.1.4" + "version": "1.1.4", + "dev": true }, "emoji-regex": { - "version": "8.0.0" + "version": "8.0.0", + "dev": true }, "figures": { "version": "5.0.0", + "dev": true, "requires": { "escape-string-regexp": "^5.0.0", "is-unicode-supported": "^1.2.0" } }, "is-fullwidth-code-point": { - "version": "3.0.0" + "version": "3.0.0", + "dev": true }, "is-interactive": { - "version": "1.0.0" + "version": "1.0.0", + "dev": true }, "log-symbols": { "version": "4.1.0", + "dev": true, "requires": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" @@ -21025,18 +21166,21 @@ "dependencies": { "chalk": { "version": "4.1.2", + "dev": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "is-unicode-supported": { - "version": "0.1.0" + "version": "0.1.0", + "dev": true } } }, "ora": { "version": "5.4.1", + "dev": true, "requires": { "bl": "^4.1.0", "chalk": "^4.1.0", @@ -21051,18 +21195,21 @@ "dependencies": { "chalk": { "version": "4.1.2", + "dev": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "is-unicode-supported": { - "version": "0.1.0" + "version": "0.1.0", + "dev": true } } }, "string-width": { "version": "4.2.3", + "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -21071,6 +21218,7 @@ }, "strip-ansi": { "version": "6.0.1", + "dev": true, "requires": { "ansi-regex": "^5.0.1" } @@ -21238,7 +21386,8 @@ } }, "is-interactive": { - "version": "2.0.0" + "version": "2.0.0", + "dev": true }, "is-lambda": { "version": "1.0.1", @@ -21322,7 +21471,8 @@ } }, "is-unicode-supported": { - "version": "1.3.0" + "version": "1.3.0", + "dev": true }, "is-weakref": { "version": "1.0.2", @@ -21344,6 +21494,7 @@ }, "isomorphic-ws": { "version": "5.0.0", + "dev": true, "requires": {} }, "it-all": { @@ -21436,6 +21587,7 @@ }, "jsonfile": { "version": "6.1.0", + "dev": true, "requires": { "graceful-fs": "^4.1.6", "universalify": "^2.0.0" @@ -21674,7 +21826,8 @@ } }, "lodash": { - "version": "4.17.21" + "version": "4.17.21", + "dev": true }, "lodash.defaults": { "version": "4.2.0", @@ -21702,13 +21855,15 @@ }, "log-symbols": { "version": "5.1.0", + "dev": true, "requires": { "chalk": "^5.0.0", "is-unicode-supported": "^1.1.0" }, "dependencies": { "chalk": { - "version": "5.3.0" + "version": "5.3.0", + "dev": true } } }, @@ -22027,7 +22182,8 @@ "dev": true }, "mute-stream": { - "version": "1.0.0" + "version": "1.0.0", + "dev": true }, "nan": { "version": "2.17.0", @@ -22035,7 +22191,8 @@ "optional": true }, "nanoid": { - "version": "4.0.2" + "version": "4.0.2", + "dev": true }, "native-fetch": { "version": "3.0.0", @@ -22266,6 +22423,7 @@ }, "ora": { "version": "6.3.1", + "dev": true, "requires": { "chalk": "^5.0.0", "cli-cursor": "^4.0.0", @@ -22279,16 +22437,19 @@ }, "dependencies": { "chalk": { - "version": "5.3.0" + "version": "5.3.0", + "dev": true }, "cli-cursor": { "version": "4.0.0", + "dev": true, "requires": { "restore-cursor": "^4.0.0" } }, "restore-cursor": { "version": "4.0.0", + "dev": true, "requires": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" @@ -22297,7 +22458,8 @@ } }, "os-tmpdir": { - "version": "1.0.2" + "version": "1.0.2", + "dev": true }, "p-defer": { "version": "4.0.0" @@ -22368,12 +22530,14 @@ }, "p-wait-for": { "version": "5.0.2", + "dev": true, "requires": { "p-timeout": "^6.0.0" }, "dependencies": { "p-timeout": { - "version": "6.1.2" + "version": "6.1.2", + "dev": true } } }, @@ -22542,7 +22706,9 @@ "version": "10.16.0" }, "preact-render-to-string": { - "version": "5.2.6", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-6.2.2.tgz", + "integrity": "sha512-YDfXQiVeYZutFR8/DpxLSbW3W6b7GgjBExRBxOOqcjrGq5rA9cziitQdNPMZe4RVMSdfBnf4hYqyeLs/KvtIuA==", "requires": { "pretty-format": "^3.8.0" } @@ -22570,8 +22736,11 @@ "dev": true }, "prom-client": { - "version": "14.2.0", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/prom-client/-/prom-client-15.0.0.tgz", + "integrity": "sha512-UocpgIrKyA2TKLVZDSfm8rGkL13C19YrQBAiG3xo3aDFWcHedxRxI3z+cIcucoxpSO0h5lff5iv/SXoxyeopeA==", "requires": { + "@opentelemetry/api": "^1.4.0", "tdigest": "^0.1.1" } }, @@ -22765,6 +22934,7 @@ }, "readable-stream": { "version": "3.6.2", + "dev": true, "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -22872,6 +23042,7 @@ }, "restore-cursor": { "version": "3.1.0", + "dev": true, "requires": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" @@ -22896,7 +23067,8 @@ } }, "run-async": { - "version": "3.0.0" + "version": "3.0.0", + "dev": true }, "run-parallel": { "version": "1.2.0", @@ -22907,6 +23079,7 @@ }, "rxjs": { "version": "7.8.1", + "dev": true, "requires": { "tslib": "^2.1.0" } @@ -23059,7 +23232,8 @@ } }, "signal-exit": { - "version": "3.0.7" + "version": "3.0.7", + "dev": true }, "simple-git-hooks": { "version": "2.9.0", @@ -23196,6 +23370,7 @@ }, "stdin-discarder": { "version": "0.1.0", + "dev": true, "requires": { "bl": "^5.0.0" } @@ -23245,6 +23420,7 @@ }, "string_decoder": { "version": "1.3.0", + "dev": true, "requires": { "safe-buffer": "~5.2.0" } @@ -23305,6 +23481,7 @@ }, "strip-ansi": { "version": "7.1.0", + "dev": true, "requires": { "ansi-regex": "^6.0.1" } @@ -23360,6 +23537,7 @@ }, "supports-color": { "version": "7.2.0", + "dev": true, "requires": { "has-flag": "^4.0.0" } @@ -23482,6 +23660,7 @@ }, "tmp": { "version": "0.0.33", + "dev": true, "requires": { "os-tmpdir": "~1.0.2" } @@ -23747,7 +23926,8 @@ } }, "universalify": { - "version": "2.0.0" + "version": "2.0.0", + "dev": true }, "unpipe": { "version": "1.0.0", @@ -23782,7 +23962,8 @@ } }, "util-deprecate": { - "version": "1.0.2" + "version": "1.0.2", + "dev": true }, "utils-merge": { "version": "1.0.1", @@ -23808,6 +23989,7 @@ }, "wcwidth": { "version": "1.0.1", + "dev": true, "requires": { "defaults": "^1.0.3" } @@ -23909,6 +24091,7 @@ }, "wrap-ansi": { "version": "6.2.0", + "dev": true, "requires": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -23916,31 +24099,38 @@ }, "dependencies": { "ansi-regex": { - "version": "5.0.1" + "version": "5.0.1", + "dev": true }, "ansi-styles": { "version": "4.3.0", + "dev": true, "requires": { "color-convert": "^2.0.1" } }, "color-convert": { "version": "2.0.1", + "dev": true, "requires": { "color-name": "~1.1.4" } }, "color-name": { - "version": "1.1.4" + "version": "1.1.4", + "dev": true }, "emoji-regex": { - "version": "8.0.0" + "version": "8.0.0", + "dev": true }, "is-fullwidth-code-point": { - "version": "3.0.0" + "version": "3.0.0", + "dev": true }, "string-width": { "version": "4.2.3", + "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -23949,6 +24139,7 @@ }, "strip-ansi": { "version": "6.0.1", + "dev": true, "requires": { "ansi-regex": "^5.0.1" } @@ -23969,6 +24160,7 @@ }, "ws": { "version": "8.13.0", + "dev": true, "requires": {} }, "xml2js": { @@ -24110,7 +24302,8 @@ } }, "zod": { - "version": "3.21.4" + "version": "3.21.4", + "dev": true } } } diff --git a/upload-api/package.json b/upload-api/package.json index 2a9e433c..fc5829ac 100644 --- a/upload-api/package.json +++ b/upload-api/package.json @@ -23,14 +23,14 @@ "@ucanto/validator": "^9.0.0", "@web-std/fetch": "^4.1.0", "@web3-storage/access": "^16.0.0", - "@web3-storage/capabilities": "^9.3.0", - "@web3-storage/upload-api": "^5.9.0", + "@web3-storage/capabilities": "^10.0.0", + "@web3-storage/upload-api": "^6.0.0", "@web3-storage/w3infra-ucan-invocation": "*", - "multiformats": "^11.0.1", - "nanoid": "^4.0.2", + "multiformats": "^12.1.2", + "nanoid": "^5.0.2", "preact": "^10.14.1", - "preact-render-to-string": "^5.2.6", - "prom-client": "^14.2.0", + "preact-render-to-string": "^6.2.2", + "prom-client": "^15.0.0", "uint8arrays": "^4.0.2" }, "devDependencies": { diff --git a/upload-api/tables/rate-limit.js b/upload-api/tables/rate-limit.js index e405aeda..0b2d7ea3 100644 --- a/upload-api/tables/rate-limit.js +++ b/upload-api/tables/rate-limit.js @@ -3,7 +3,7 @@ import { DynamoDBClient, PutItemCommand, QueryCommand, } from '@aws-sdk/client-dynamodb' import { marshall, unmarshall } from '@aws-sdk/util-dynamodb' -import { nanoid } from 'nanoid/async' +import { nanoid } from 'nanoid' /** * Abstraction layer to handle operations on Store Table. @@ -31,7 +31,7 @@ export function useRateLimitTable (dynamoDb, tableName) { return { add: async (subject, rate) => { const insertedAt = new Date().toISOString() - const id = await nanoid() + const id = nanoid() const row = { id, subject, diff --git a/upload-api/tables/upload.js b/upload-api/tables/upload.js index 1c14c850..f68febe9 100644 --- a/upload-api/tables/upload.js +++ b/upload-api/tables/upload.js @@ -8,7 +8,7 @@ import { import { marshall, unmarshall } from '@aws-sdk/util-dynamodb' import { CID } from 'multiformats/cid' -/** @typedef {import('@web3-storage/upload-api').UploadAddOk} UploadAddResult */ +/** @typedef {import('@web3-storage/upload-api').UploadAddSuccess} UploadAddResult */ /** @typedef {import('@web3-storage/upload-api').UploadListItem} UploadListItem */ /** @@ -161,9 +161,7 @@ export function useUploadTable(dynamoDb, tableName) { }) const response = await dynamoDb.send(cmd) - /** @type {UploadListItem[]} */ - const results = - response.Items?.map((i) => toUploadListItem(unmarshall(i))) || [] + const results = (response.Items ?? []).map((i) => toUploadListItem(unmarshall(i))) const firstRootCID = results[0] ? results[0].root.toString() : undefined // Get cursor of the item where list operation stopped (inclusive). @@ -221,7 +219,7 @@ export function useUploadTable(dynamoDb, tableName) { export function toUploadAddResult({ root, shards }) { return { root: CID.parse(root), - shards: (shards ? [...shards] : []).map((s) => CID.parse(s)), + shards: (shards ? [...shards] : []).map((s) => /** @type {import('@web3-storage/upload-api').CARLink} */ (CID.parse(s))), } } @@ -229,7 +227,7 @@ export function toUploadAddResult({ root, shards }) { * Convert from the db representation to an UploadListItem * * @param {Record} item - * @returns {UploadListItem} + * @returns {UploadListItem & { insertedAt: string; updatedAt: string }} */ export function toUploadListItem({ insertedAt, updatedAt, ...rest }) { return {