diff --git a/packages/api/package.json b/packages/api/package.json index ba60289e81..68cfb89ffe 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -21,7 +21,7 @@ "@aws-sdk/client-s3": "^3.37.0", "@cfworker/json-schema": "^1.8.3", "@ipld/car": "^3.1.20", - "@ipld/dag-cbor": "^9.2.0", + "@ipld/dag-cbor": "^6.0.13", "@ipld/dag-pb": "^2.1.16", "@magic-sdk/admin": "1.4.0", "@nftstorage/ipfs-cluster": "^5.0.1", diff --git a/packages/api/src/utils/context.js b/packages/api/src/utils/context.js index c15c390efc..4b43242e54 100644 --- a/packages/api/src/utils/context.js +++ b/packages/api/src/utils/context.js @@ -76,7 +76,6 @@ export async function getContext(event, params) { config.W3_NFTSTORAGE_ENABLE_W3UP_FOR_EMAILS, } let w3up - console.log('SETTING UP W3UP') if ( config.W3UP_URL && config.W3UP_DID && @@ -90,13 +89,11 @@ export async function getContext(event, params) { principal: config.W3_NFTSTORAGE_PRINCIPAL, proof: config.W3_NFTSTORAGE_PROOF, }) - console.log('CLIENT CREATED') // @ts-expect-error todo add DID check w3upWIP.setCurrentSpace(config.W3_NFTSTORAGE_SPACE) w3up = w3upWIP } catch (error) { console.error(`error creating w3up-client from config`, error) - console.error(`proof: "${config.W3_NFTSTORAGE_PROOF}"`) } } return { diff --git a/packages/api/src/utils/w3up.js b/packages/api/src/utils/w3up.js index 9e113cc6c5..8aff4a3758 100644 --- a/packages/api/src/utils/w3up.js +++ b/packages/api/src/utils/w3up.js @@ -9,7 +9,6 @@ import { importDAG } from '@ucanto/core/delegation' import * as W3upClient from '@web3-storage/w3up-client' import { connect } from '@ucanto/client' import { CAR, HTTP } from '@ucanto/transport' -import * as DAGUCANCBOR from '@ipld/dag-ucan/codec/cbor' /** * @param {object} env @@ -66,9 +65,6 @@ export async function readProofFromBytes(bytes) { console.error(`Error: failed to parse proof: ${err.message}`) throw err } - const proof = blocks[blocks.length - 1] - console.log('DECODING PROOF', proof) - console.log('DECODED', DAGUCANCBOR.decode(proof.bytes)) try { // @ts-expect-error Block types are slightly different but it works return importDAG(blocks) diff --git a/packages/api/wrangler.toml b/packages/api/wrangler.toml index fef427df8c..18f43dd497 100644 --- a/packages/api/wrangler.toml +++ b/packages/api/wrangler.toml @@ -11,7 +11,6 @@ compatibility_flags = [ "formdata_parser_supports_files", "streams_enable_constructors", "transformstream_enable_standard_constructor", - "url_standard" ] no_bundle = true r2_buckets = [ diff --git a/yarn.lock b/yarn.lock index e50bf5e966..40cef0ff73 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2442,7 +2442,7 @@ cborg "^1.6.0" multiformats "^9.5.4" -"@ipld/dag-cbor@^9.0.0", "@ipld/dag-cbor@^9.0.5", "@ipld/dag-cbor@^9.0.6", "@ipld/dag-cbor@^9.0.7", "@ipld/dag-cbor@^9.2.0": +"@ipld/dag-cbor@^9.0.0", "@ipld/dag-cbor@^9.0.5", "@ipld/dag-cbor@^9.0.6", "@ipld/dag-cbor@^9.0.7": version "9.2.0" resolved "https://registry.yarnpkg.com/@ipld/dag-cbor/-/dag-cbor-9.2.0.tgz#3a3f0bee02d7e1c2f15582e896843d5b00fbba9f" integrity sha512-N14oMy0q4gM6OuZkIpisKe0JBSjf1Jb39VI+7jMLiWX9124u1Z3Fdj/Tag1NA0cVxxqWDh0CqsjcVfOKtelPDA== @@ -18041,11 +18041,16 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@2.5.1, "prettier@>=2.2.1 <=2.3.0", prettier@^2.5.1: +prettier@2.5.1, prettier@^2.5.1: version "2.5.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.5.1.tgz#fff75fa9d519c54cf0fce328c1017d94546bc56a" integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg== +"prettier@>=2.2.1 <=2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.0.tgz#b6a5bf1284026ae640f17f7ff5658a7567fc0d18" + integrity sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w== + pretty-error@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.2.tgz#be89f82d81b1c86ec8fdfbc385045882727f93b6" @@ -20374,7 +20379,7 @@ string-argv@^0.3.1: resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== -"string-width-cjs@npm:string-width@^4.2.0": +"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -20392,15 +20397,6 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - string-width@^5.0.0, string-width@^5.0.1, string-width@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" @@ -20542,7 +20538,7 @@ stringify-entities@^4.0.0: character-entities-html4 "^2.0.0" character-entities-legacy "^3.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -20556,13 +20552,6 @@ strip-ansi@^3.0.0, strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - strip-ansi@^7.0.0, strip-ansi@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.0.1.tgz#61740a08ce36b61e50e65653f07060d000975fb2" @@ -22618,7 +22607,7 @@ wrangler@^2.0.23: optionalDependencies: fsevents "~2.3.2" -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -22636,15 +22625,6 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"