From 082bffefd975b83994e02ac05a0f372af712b8c8 Mon Sep 17 00:00:00 2001 From: Igor Shadurin Date: Mon, 20 Feb 2023 18:39:42 +0300 Subject: [PATCH 1/4] fix: using improved bee-js version --- package-lock.json | 262 +++++++++++++++++++++++++++++++--------------- package.json | 4 +- 2 files changed, 179 insertions(+), 87 deletions(-) diff --git a/package-lock.json b/package-lock.json index eab1c9cf..08bbee64 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { "name": "@fairdatasociety/fdp-storage", - "version": "0.7.1", + "version": "0.7.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@fairdatasociety/fdp-storage", - "version": "0.7.1", + "version": "0.7.0", "license": "BSD-3-Clause", "dependencies": { - "@ethersphere/bee-js": "^5.1.0", - "@fairdatasociety/fdp-contracts-js": "^2.1.0", + "@ethersphere/bee-js": "github:fairDataSociety/bee-js", + "@fairdatasociety/fdp-contracts-js": "^2.0.1", "crypto-js": "^4.1.1", "ethers": "^5.5.2", "js-sha3": "^0.8.0" @@ -2270,9 +2270,9 @@ } }, "node_modules/@ethersphere/bee-js": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersphere/bee-js/-/bee-js-5.1.0.tgz", - "integrity": "sha512-DJERG2F0Qjxsu3gZ9e7w2yc83/EdvN+gRIKczkNW0arpXn6IBphK21esGURqkhasmrbgPPZ1pA178BIAIb6/hg==", + "version": "5.0.0", + "resolved": "git+ssh://git@github.com/fairDataSociety/bee-js.git#047a1b90be6b87bc94b73bbd24fb8d3de179979b", + "license": "BSD-3-Clause", "dependencies": { "@ethersphere/swarm-cid": "^0.1.0", "@types/readable-stream": "^2.3.13", @@ -2281,18 +2281,18 @@ "fetch-blob": "2.1.2", "isomorphic-ws": "^4.0.1", "js-sha3": "^0.8.0", - "ky": "^0.25.1", - "ky-universal": "^0.8.2", + "ky": "^0.31.3", + "ky-universal": "^0.10.1", "semver": "^7.3.5", "tar-js": "^0.3.0", "utf-8-validate": "^5.0.9", - "web-streams-polyfill": "^4.0.0-beta.1", + "web-streams-polyfill": "^3.2.1", "ws": "^8.7.0" }, "engines": { - "bee": "1.9.0-13a47043", - "beeApiVersion": "3.2.0", - "beeDebugApiVersion": "3.2.0", + "bee": "1.7.0-bbf13011", + "beeApiVersion": "3.0.2", + "beeDebugApiVersion": "3.0.2", "node": ">=14.0.0", "npm": ">=6.0.0" } @@ -2311,14 +2311,6 @@ "node": ">=10" } }, - "node_modules/@ethersphere/bee-js/node_modules/web-streams-polyfill": { - "version": "4.0.0-beta.3", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz", - "integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==", - "engines": { - "node": ">= 14" - } - }, "node_modules/@ethersphere/swarm-cid": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/@ethersphere/swarm-cid/-/swarm-cid-0.1.0.tgz", @@ -3021,9 +3013,9 @@ } }, "node_modules/@fairdatasociety/fdp-contracts-js": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@fairdatasociety/fdp-contracts-js/-/fdp-contracts-js-2.1.0.tgz", - "integrity": "sha512-bmsCj2IKR2feB4Gb56pX4y66pe6Yrr0gOIqQvSo8gzTkBnXzlmnUPtMZi082GwW6Bsxk+xu7eFMpUFPxcAnIgg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@fairdatasociety/fdp-contracts-js/-/fdp-contracts-js-2.0.1.tgz", + "integrity": "sha512-C76Pns4aQ8m4Q0IGQ8LQKBWZ8gmI/hXqKK1iu9FHnUUobUtDH41wDdQLlRYLu6/Unq7+Nrfjgx1OJuKCXq5WkA==", "peerDependencies": { "ethers": ">=5.6.4" } @@ -5548,9 +5540,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001465", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001465.tgz", - "integrity": "sha512-HvjgL3MYAJjceTDCcjRnQGjwUz/5qec9n7JPOzUursUoOTIsYCSDOb1l7RsnZE8mjbxG78zVRCKfrBXyvChBag==", + "version": "1.0.30001407", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001407.tgz", + "integrity": "sha512-4ydV+t4P7X3zH83fQWNDX/mQEzYomossfpViCOx9zHBSMV+rIe3LFqglHHtVyvNl1FhTNxPxs3jei82iqOW04w==", "dev": true, "funding": [ { @@ -5920,11 +5912,11 @@ } }, "node_modules/data-uri-to-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz", - "integrity": "sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", "engines": { - "node": ">= 6" + "node": ">= 12" } }, "node_modules/data-urls": { @@ -7372,6 +7364,39 @@ "node": ">= 6" } }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/formdata-polyfill/node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, "node_modules/fs-constants": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", @@ -10925,33 +10950,33 @@ } }, "node_modules/ky": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/ky/-/ky-0.25.1.tgz", - "integrity": "sha512-PjpCEWlIU7VpiMVrTwssahkYXX1by6NCT0fhTUX34F3DTinARlgMpriuroolugFPcMgpPWrOW4mTb984Qm1RXA==", + "version": "0.31.4", + "resolved": "https://registry.npmjs.org/ky/-/ky-0.31.4.tgz", + "integrity": "sha512-OFuAD3riwhAfHK3J4FrhlujFRpm0ELBEfDHZfFpw89OTozQt3NLF39lNblUO5udj5vSkyaBKnLai/rFCzBfISQ==", "engines": { - "node": ">=10" + "node": ">=14.16" }, "funding": { "url": "https://github.com/sindresorhus/ky?sponsor=1" } }, "node_modules/ky-universal": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/ky-universal/-/ky-universal-0.8.2.tgz", - "integrity": "sha512-xe0JaOH9QeYxdyGLnzUOVGK4Z6FGvDVzcXFTdrYA1f33MZdEa45sUDaMBy98xQMcsd2XIBrTXRrRYnegcSdgVQ==", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/ky-universal/-/ky-universal-0.10.1.tgz", + "integrity": "sha512-r8909k+ELKZAxhVA5c440x22hqw5XcMRwLRbgpPQk4JHy3/ddJnvzcnSo5Ww3HdKdNeS3Y8dBgcIYyVahMa46g==", "dependencies": { "abort-controller": "^3.0.0", - "node-fetch": "3.0.0-beta.9" + "node-fetch": "^3.2.2" }, "engines": { - "node": ">=10.17" + "node": ">=14" }, "funding": { "url": "https://github.com/sindresorhus/ky-universal?sponsor=1" }, "peerDependencies": { - "ky": ">=0.17.0", - "web-streams-polyfill": ">=2.0.0" + "ky": ">=0.26.0", + "web-streams-polyfill": ">=3.0.1" }, "peerDependenciesMeta": { "web-streams-polyfill": { @@ -11452,22 +11477,63 @@ "node": ">= 10.13" } }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "engines": { + "node": ">=10.5.0" + } + }, "node_modules/node-fetch": { - "version": "3.0.0-beta.9", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.0.0-beta.9.tgz", - "integrity": "sha512-RdbZCEynH2tH46+tj0ua9caUHVWrd/RHnRfvly2EVdqGmI3ndS1Vn/xjm5KuGejDt2RNDQsVRLPNd2QPwcewVg==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.0.tgz", + "integrity": "sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA==", "dependencies": { - "data-uri-to-buffer": "^3.0.1", - "fetch-blob": "^2.1.1" + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" }, "engines": { - "node": "^10.17 || >=12.3" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/node-fetch" } }, + "node_modules/node-fetch/node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, "node_modules/node-gyp-build": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.3.0.tgz", @@ -14025,8 +14091,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", - "optional": true, - "peer": true, "engines": { "node": ">= 8" } @@ -16178,9 +16242,8 @@ } }, "@ethersphere/bee-js": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersphere/bee-js/-/bee-js-5.1.0.tgz", - "integrity": "sha512-DJERG2F0Qjxsu3gZ9e7w2yc83/EdvN+gRIKczkNW0arpXn6IBphK21esGURqkhasmrbgPPZ1pA178BIAIb6/hg==", + "version": "git+ssh://git@github.com/fairDataSociety/bee-js.git#047a1b90be6b87bc94b73bbd24fb8d3de179979b", + "from": "@ethersphere/bee-js@https://github.com/fairDataSociety/bee-js.git", "requires": { "@ethersphere/swarm-cid": "^0.1.0", "@types/readable-stream": "^2.3.13", @@ -16189,12 +16252,12 @@ "fetch-blob": "2.1.2", "isomorphic-ws": "^4.0.1", "js-sha3": "^0.8.0", - "ky": "^0.25.1", - "ky-universal": "^0.8.2", + "ky": "^0.31.3", + "ky-universal": "^0.10.1", "semver": "^7.3.5", "tar-js": "^0.3.0", "utf-8-validate": "^5.0.9", - "web-streams-polyfill": "^4.0.0-beta.1", + "web-streams-polyfill": "^3.2.1", "ws": "^8.7.0" }, "dependencies": { @@ -16205,11 +16268,6 @@ "requires": { "lru-cache": "^6.0.0" } - }, - "web-streams-polyfill": { - "version": "4.0.0-beta.3", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz", - "integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==" } } }, @@ -16599,9 +16657,9 @@ } }, "@fairdatasociety/fdp-contracts-js": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@fairdatasociety/fdp-contracts-js/-/fdp-contracts-js-2.1.0.tgz", - "integrity": "sha512-bmsCj2IKR2feB4Gb56pX4y66pe6Yrr0gOIqQvSo8gzTkBnXzlmnUPtMZi082GwW6Bsxk+xu7eFMpUFPxcAnIgg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@fairdatasociety/fdp-contracts-js/-/fdp-contracts-js-2.0.1.tgz", + "integrity": "sha512-C76Pns4aQ8m4Q0IGQ8LQKBWZ8gmI/hXqKK1iu9FHnUUobUtDH41wDdQLlRYLu6/Unq7+Nrfjgx1OJuKCXq5WkA==", "requires": {} }, "@fluffy-spoon/substitute": { @@ -18602,9 +18660,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001465", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001465.tgz", - "integrity": "sha512-HvjgL3MYAJjceTDCcjRnQGjwUz/5qec9n7JPOzUursUoOTIsYCSDOb1l7RsnZE8mjbxG78zVRCKfrBXyvChBag==", + "version": "1.0.30001407", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001407.tgz", + "integrity": "sha512-4ydV+t4P7X3zH83fQWNDX/mQEzYomossfpViCOx9zHBSMV+rIe3LFqglHHtVyvNl1FhTNxPxs3jei82iqOW04w==", "dev": true }, "chalk": { @@ -18903,9 +18961,9 @@ "dev": true }, "data-uri-to-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz", - "integrity": "sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==" + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==" }, "data-urls": { "version": "2.0.0", @@ -19957,6 +20015,25 @@ "mime-types": "^2.1.12" } }, + "formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "requires": { + "fetch-blob": "^3.1.2" + }, + "dependencies": { + "fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "requires": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + } + } + } + }, "fs-constants": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", @@ -22616,17 +22693,17 @@ "dev": true }, "ky": { - "version": "0.25.1", - "resolved": "https://registry.npmjs.org/ky/-/ky-0.25.1.tgz", - "integrity": "sha512-PjpCEWlIU7VpiMVrTwssahkYXX1by6NCT0fhTUX34F3DTinARlgMpriuroolugFPcMgpPWrOW4mTb984Qm1RXA==" + "version": "0.31.4", + "resolved": "https://registry.npmjs.org/ky/-/ky-0.31.4.tgz", + "integrity": "sha512-OFuAD3riwhAfHK3J4FrhlujFRpm0ELBEfDHZfFpw89OTozQt3NLF39lNblUO5udj5vSkyaBKnLai/rFCzBfISQ==" }, "ky-universal": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/ky-universal/-/ky-universal-0.8.2.tgz", - "integrity": "sha512-xe0JaOH9QeYxdyGLnzUOVGK4Z6FGvDVzcXFTdrYA1f33MZdEa45sUDaMBy98xQMcsd2XIBrTXRrRYnegcSdgVQ==", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/ky-universal/-/ky-universal-0.10.1.tgz", + "integrity": "sha512-r8909k+ELKZAxhVA5c440x22hqw5XcMRwLRbgpPQk4JHy3/ddJnvzcnSo5Ww3HdKdNeS3Y8dBgcIYyVahMa46g==", "requires": { "abort-controller": "^3.0.0", - "node-fetch": "3.0.0-beta.9" + "node-fetch": "^3.2.2" } }, "lazy-cache": { @@ -23015,13 +23092,30 @@ "propagate": "^2.0.0" } }, + "node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" + }, "node-fetch": { - "version": "3.0.0-beta.9", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.0.0-beta.9.tgz", - "integrity": "sha512-RdbZCEynH2tH46+tj0ua9caUHVWrd/RHnRfvly2EVdqGmI3ndS1Vn/xjm5KuGejDt2RNDQsVRLPNd2QPwcewVg==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.0.tgz", + "integrity": "sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA==", "requires": { - "data-uri-to-buffer": "^3.0.1", - "fetch-blob": "^2.1.1" + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "dependencies": { + "fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "requires": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + } + } } }, "node-gyp-build": { @@ -24921,9 +25015,7 @@ "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==", - "optional": true, - "peer": true + "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==" }, "webidl-conversions": { "version": "6.1.0", diff --git a/package.json b/package.json index 9fa45e49..9a544844 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ ], "types": "dist/index.d.ts", "scripts": { - "prepublishOnly": "rimraf dist && npm run compile:types && npm run compile:browser --env mode=production && npm run compile:node --env mode=production", + "prepare": "rimraf dist && npm run compile:types && npm run compile:browser --env mode=production", "compile:node": "webpack --progress --env target=node", "compile:types": "tsc --emitDeclarationOnly --declaration", "compile:browser": "webpack --progress --env target=web", @@ -53,7 +53,7 @@ "depcheck": "depcheck ." }, "dependencies": { - "@ethersphere/bee-js": "^5.1.0", + "@ethersphere/bee-js": "github:fairDataSociety/bee-js", "@fairdatasociety/fdp-contracts-js": "^2.1.0", "crypto-js": "^4.1.1", "ethers": "^5.5.2", From 44cc5fada08fbbe90d98b2fd9c87f54a55947296 Mon Sep 17 00:00:00 2001 From: Igor Shadurin Date: Mon, 20 Mar 2023 15:46:41 +0300 Subject: [PATCH 2/4] refactor: upgraded the code for fdp-contracts 2.1.0 --- package-lock.json | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/package-lock.json b/package-lock.json index 08bbee64..93edc557 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { "name": "@fairdatasociety/fdp-storage", - "version": "0.7.0", + "version": "0.7.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@fairdatasociety/fdp-storage", - "version": "0.7.0", + "version": "0.7.1", "license": "BSD-3-Clause", "dependencies": { "@ethersphere/bee-js": "github:fairDataSociety/bee-js", - "@fairdatasociety/fdp-contracts-js": "^2.0.1", + "@fairdatasociety/fdp-contracts-js": "^2.1.0", "crypto-js": "^4.1.1", "ethers": "^5.5.2", "js-sha3": "^0.8.0" @@ -3013,9 +3013,9 @@ } }, "node_modules/@fairdatasociety/fdp-contracts-js": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@fairdatasociety/fdp-contracts-js/-/fdp-contracts-js-2.0.1.tgz", - "integrity": "sha512-C76Pns4aQ8m4Q0IGQ8LQKBWZ8gmI/hXqKK1iu9FHnUUobUtDH41wDdQLlRYLu6/Unq7+Nrfjgx1OJuKCXq5WkA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@fairdatasociety/fdp-contracts-js/-/fdp-contracts-js-2.1.0.tgz", + "integrity": "sha512-bmsCj2IKR2feB4Gb56pX4y66pe6Yrr0gOIqQvSo8gzTkBnXzlmnUPtMZi082GwW6Bsxk+xu7eFMpUFPxcAnIgg==", "peerDependencies": { "ethers": ">=5.6.4" } @@ -5540,9 +5540,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001407", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001407.tgz", - "integrity": "sha512-4ydV+t4P7X3zH83fQWNDX/mQEzYomossfpViCOx9zHBSMV+rIe3LFqglHHtVyvNl1FhTNxPxs3jei82iqOW04w==", + "version": "1.0.30001465", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001465.tgz", + "integrity": "sha512-HvjgL3MYAJjceTDCcjRnQGjwUz/5qec9n7JPOzUursUoOTIsYCSDOb1l7RsnZE8mjbxG78zVRCKfrBXyvChBag==", "dev": true, "funding": [ { @@ -11496,9 +11496,9 @@ } }, "node_modules/node-fetch": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.0.tgz", - "integrity": "sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz", + "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==", "dependencies": { "data-uri-to-buffer": "^4.0.0", "fetch-blob": "^3.1.4", @@ -16243,7 +16243,7 @@ }, "@ethersphere/bee-js": { "version": "git+ssh://git@github.com/fairDataSociety/bee-js.git#047a1b90be6b87bc94b73bbd24fb8d3de179979b", - "from": "@ethersphere/bee-js@https://github.com/fairDataSociety/bee-js.git", + "from": "@ethersphere/bee-js@github:fairDataSociety/bee-js", "requires": { "@ethersphere/swarm-cid": "^0.1.0", "@types/readable-stream": "^2.3.13", @@ -16657,9 +16657,9 @@ } }, "@fairdatasociety/fdp-contracts-js": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@fairdatasociety/fdp-contracts-js/-/fdp-contracts-js-2.0.1.tgz", - "integrity": "sha512-C76Pns4aQ8m4Q0IGQ8LQKBWZ8gmI/hXqKK1iu9FHnUUobUtDH41wDdQLlRYLu6/Unq7+Nrfjgx1OJuKCXq5WkA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@fairdatasociety/fdp-contracts-js/-/fdp-contracts-js-2.1.0.tgz", + "integrity": "sha512-bmsCj2IKR2feB4Gb56pX4y66pe6Yrr0gOIqQvSo8gzTkBnXzlmnUPtMZi082GwW6Bsxk+xu7eFMpUFPxcAnIgg==", "requires": {} }, "@fluffy-spoon/substitute": { @@ -18660,9 +18660,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001407", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001407.tgz", - "integrity": "sha512-4ydV+t4P7X3zH83fQWNDX/mQEzYomossfpViCOx9zHBSMV+rIe3LFqglHHtVyvNl1FhTNxPxs3jei82iqOW04w==", + "version": "1.0.30001465", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001465.tgz", + "integrity": "sha512-HvjgL3MYAJjceTDCcjRnQGjwUz/5qec9n7JPOzUursUoOTIsYCSDOb1l7RsnZE8mjbxG78zVRCKfrBXyvChBag==", "dev": true }, "chalk": { @@ -23098,9 +23098,9 @@ "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" }, "node-fetch": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.0.tgz", - "integrity": "sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz", + "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==", "requires": { "data-uri-to-buffer": "^4.0.0", "fetch-blob": "^3.1.4", From 80c8ce46ebc49f3f657e8f842e434b0fb6ed3e75 Mon Sep 17 00:00:00 2001 From: tomicvladan Date: Wed, 24 May 2023 10:38:22 +0200 Subject: [PATCH 3/4] chore: upgrade fdp-contracts lib (#236) * chore: upgrade fdp-contracts lib * fix: renamed Environments import * fix: renamed Environments import --------- Co-authored-by: Igor Shadurin --- package-lock.json | 14 +++++++------- package.json | 2 +- src/types.ts | 4 ++-- test/utils.ts | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 93edc557..e584e4be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "BSD-3-Clause", "dependencies": { "@ethersphere/bee-js": "github:fairDataSociety/bee-js", - "@fairdatasociety/fdp-contracts-js": "^2.1.0", + "@fairdatasociety/fdp-contracts-js": "^3.6.0", "crypto-js": "^4.1.1", "ethers": "^5.5.2", "js-sha3": "^0.8.0" @@ -3013,9 +3013,9 @@ } }, "node_modules/@fairdatasociety/fdp-contracts-js": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@fairdatasociety/fdp-contracts-js/-/fdp-contracts-js-2.1.0.tgz", - "integrity": "sha512-bmsCj2IKR2feB4Gb56pX4y66pe6Yrr0gOIqQvSo8gzTkBnXzlmnUPtMZi082GwW6Bsxk+xu7eFMpUFPxcAnIgg==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@fairdatasociety/fdp-contracts-js/-/fdp-contracts-js-3.6.0.tgz", + "integrity": "sha512-yiV4wMBJzLcDhHF/wAD5XUlVsCVkppj2KA/zESgJdUfJ9y5jyTrNcBWARe3fQaBnVhW57WDHvaT+VLutf+nk0Q==", "peerDependencies": { "ethers": ">=5.6.4" } @@ -16657,9 +16657,9 @@ } }, "@fairdatasociety/fdp-contracts-js": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@fairdatasociety/fdp-contracts-js/-/fdp-contracts-js-2.1.0.tgz", - "integrity": "sha512-bmsCj2IKR2feB4Gb56pX4y66pe6Yrr0gOIqQvSo8gzTkBnXzlmnUPtMZi082GwW6Bsxk+xu7eFMpUFPxcAnIgg==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@fairdatasociety/fdp-contracts-js/-/fdp-contracts-js-3.6.0.tgz", + "integrity": "sha512-yiV4wMBJzLcDhHF/wAD5XUlVsCVkppj2KA/zESgJdUfJ9y5jyTrNcBWARe3fQaBnVhW57WDHvaT+VLutf+nk0Q==", "requires": {} }, "@fluffy-spoon/substitute": { diff --git a/package.json b/package.json index 9a544844..f9f96ec5 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ }, "dependencies": { "@ethersphere/bee-js": "github:fairDataSociety/bee-js", - "@fairdatasociety/fdp-contracts-js": "^2.1.0", + "@fairdatasociety/fdp-contracts-js": "^3.6.0", "crypto-js": "^4.1.1", "ethers": "^5.5.2", "js-sha3": "^0.8.0" diff --git a/src/types.ts b/src/types.ts index be90776d..e9c32852 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,5 +1,5 @@ import { RequestOptions } from '@ethersphere/bee-js' -import { Environment } from '@fairdatasociety/fdp-contracts-js' +import { EnsEnvironment } from '@fairdatasociety/fdp-contracts-js' import { CacheOptions } from './cache/types' export { DirectoryItem, FileItem } from './content-items/types' @@ -15,7 +15,7 @@ export interface Options { /** * FDP-contracts options */ - ensOptions?: Environment + ensOptions?: EnsEnvironment /** * ENS domain for usernames */ diff --git a/test/utils.ts b/test/utils.ts index a8e52dab..52d4573d 100644 --- a/test/utils.ts +++ b/test/utils.ts @@ -2,7 +2,7 @@ import crypto from 'crypto' import { BATCH_ID_HEX_LENGTH, BatchId, Bee, BeeDebug, Utils } from '@ethersphere/bee-js' import { FdpStorage, Options } from '../src' import { utils, Wallet } from 'ethers' -import { Environments, getEnvironmentConfig } from '@fairdatasociety/fdp-contracts-js' +import { Environments, getEnsEnvironmentConfig } from '@fairdatasociety/fdp-contracts-js' import axios from 'axios' import { CacheOptions } from '../src/cache/types' @@ -103,7 +103,7 @@ export const fdpOptions: Options = { timeout: GET_FEED_DATA_TIMEOUT, }, ensOptions: { - ...getEnvironmentConfig(Environments.LOCALHOST), + ...getEnsEnvironmentConfig(Environments.LOCALHOST), performChecks: true, }, cacheOptions: { From 42c629b180f13225ae92a8e5dfa09407828ed6f8 Mon Sep 17 00:00:00 2001 From: Igor Shadurin Date: Fri, 25 Aug 2023 12:16:15 +0300 Subject: [PATCH 4/4] refactor: upgraded with latest fdp changes and smart contract lib --- package-lock.json | 97 +++++++++++++++++++----------------- package.json | 2 +- src/content-items/handler.ts | 6 +-- src/content-items/types.ts | 4 +- src/content-items/utils.ts | 12 ++--- src/directory/handler.ts | 6 +-- src/feed/api.ts | 4 +- src/file/handler.ts | 6 +-- src/file/utils.ts | 4 +- src/types.ts | 2 +- 10 files changed, 73 insertions(+), 70 deletions(-) diff --git a/package-lock.json b/package-lock.json index f8623d86..2aa54bd9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "BSD-3-Clause", "dependencies": { "@ethersphere/bee-js": "github:fairDataSociety/bee-js", - "@fairdatasociety/fdp-contracts-js": "^3.6.0", + "@fairdatasociety/fdp-contracts-js": "^3.7.1", "crypto-js": "^4.1.1", "ethers": "^5.5.2", "js-sha3": "^0.8.0" @@ -3080,9 +3080,9 @@ } }, "node_modules/@fairdatasociety/fdp-contracts-js": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@fairdatasociety/fdp-contracts-js/-/fdp-contracts-js-3.6.0.tgz", - "integrity": "sha512-yiV4wMBJzLcDhHF/wAD5XUlVsCVkppj2KA/zESgJdUfJ9y5jyTrNcBWARe3fQaBnVhW57WDHvaT+VLutf+nk0Q==", + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/@fairdatasociety/fdp-contracts-js/-/fdp-contracts-js-3.7.1.tgz", + "integrity": "sha512-G1TMIAJPIsfxEvubZh2qiiQb4XJx07jdmwUIvBNR2+PCdN2KnCNYQo1b4xkSFxk8BzY7hnXtricmIlNUmv3N0w==", "peerDependencies": { "ethers": ">=5.6.4" } @@ -4948,6 +4948,17 @@ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", "dev": true }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, "node_modules/acorn": { "version": "8.8.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", @@ -5644,9 +5655,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001466", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001466.tgz", - "integrity": "sha512-ewtFBSfWjEmxUgNBSZItFSmVtvk9zkwkl1OfRZlKA8slltRN+/C/tuGVrF9styXkN36Yu3+SeJ1qkXxDEyNZ5w==", + "version": "1.0.30001523", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001523.tgz", + "integrity": "sha512-I5q5cisATTPZ1mc588Z//pj/Ox80ERYDfR71YnvY7raS/NOk8xXlZcB0sF7JdqaV//kOaa6aus7lRfpdnt1eBA==", "dev": true, "funding": [ { @@ -5656,6 +5667,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ] }, @@ -5994,20 +6009,6 @@ "node": ">= 12" } }, - "node_modules/data-urls": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", - "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", - "dev": true, - "dependencies": { - "abab": "^2.0.3", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -6843,6 +6844,14 @@ "@ethersproject/wordlists": "5.7.0" } }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "engines": { + "node": ">=6" + } + }, "node_modules/events": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", @@ -10903,8 +10912,6 @@ "version": "4.5.0", "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.5.0.tgz", "integrity": "sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==", - "optional": true, - "peer": true, "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", @@ -12923,8 +12930,6 @@ "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", "hasInstallScript": true, - "optional": true, - "peer": true, "dependencies": { "node-gyp-build": "^4.3.0" }, @@ -15588,9 +15593,9 @@ } }, "@fairdatasociety/fdp-contracts-js": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@fairdatasociety/fdp-contracts-js/-/fdp-contracts-js-3.6.0.tgz", - "integrity": "sha512-yiV4wMBJzLcDhHF/wAD5XUlVsCVkppj2KA/zESgJdUfJ9y5jyTrNcBWARe3fQaBnVhW57WDHvaT+VLutf+nk0Q==", + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/@fairdatasociety/fdp-contracts-js/-/fdp-contracts-js-3.7.1.tgz", + "integrity": "sha512-G1TMIAJPIsfxEvubZh2qiiQb4XJx07jdmwUIvBNR2+PCdN2KnCNYQo1b4xkSFxk8BzY7hnXtricmIlNUmv3N0w==", "requires": {} }, "@fluffy-spoon/substitute": { @@ -17108,6 +17113,14 @@ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", "dev": true }, + "abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "requires": { + "event-target-shim": "^5.0.0" + } + }, "acorn": { "version": "8.8.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", @@ -17600,9 +17613,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001466", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001466.tgz", - "integrity": "sha512-ewtFBSfWjEmxUgNBSZItFSmVtvk9zkwkl1OfRZlKA8slltRN+/C/tuGVrF9styXkN36Yu3+SeJ1qkXxDEyNZ5w==", + "version": "1.0.30001523", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001523.tgz", + "integrity": "sha512-I5q5cisATTPZ1mc588Z//pj/Ox80ERYDfR71YnvY7raS/NOk8xXlZcB0sF7JdqaV//kOaa6aus7lRfpdnt1eBA==", "dev": true }, "chalk": { @@ -17872,17 +17885,6 @@ "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==" }, - "data-urls": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", - "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", - "dev": true, - "requires": { - "abab": "^2.0.3", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.0.0" - } - }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -18475,6 +18477,11 @@ "@ethersproject/wordlists": "5.7.0" } }, + "event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" + }, "events": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", @@ -21483,9 +21490,7 @@ "node-gyp-build": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.5.0.tgz", - "integrity": "sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==", - "optional": true, - "peer": true + "integrity": "sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==" }, "node-int64": { "version": "0.4.0", @@ -22943,8 +22948,6 @@ "version": "5.0.10", "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", - "optional": true, - "peer": true, "requires": { "node-gyp-build": "^4.3.0" } diff --git a/package.json b/package.json index dfcdbb69..b987ffc8 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ }, "dependencies": { "@ethersphere/bee-js": "github:fairDataSociety/bee-js", - "@fairdatasociety/fdp-contracts-js": "^3.6.0", + "@fairdatasociety/fdp-contracts-js": "^3.7.1", "crypto-js": "^4.1.1", "ethers": "^5.5.2", "js-sha3": "^0.8.0" diff --git a/src/content-items/handler.ts b/src/content-items/handler.ts index 62e0bffe..fdc8f647 100644 --- a/src/content-items/handler.ts +++ b/src/content-items/handler.ts @@ -1,6 +1,6 @@ import { Connection } from '../connection/connection' import { utils } from 'ethers' -import { Reference, BeeRequestOptions } from '@ethersphere/bee-js' +import { Reference, RequestOptions } from '@ethersphere/bee-js' import { getUnixTimestamp } from '../utils/time' import { writeFeedData } from '../feed/api' import { getRawDirectoryMetadataBytes } from '../directory/adapter' @@ -37,7 +37,7 @@ export async function addEntryToDirectory( parentPath: string, entryPath: string, isFile: boolean, - downloadOptions?: BeeRequestOptions, + downloadOptions?: RequestOptions, ): Promise { if (!parentPath) { throw new Error('Incorrect parent path') @@ -137,7 +137,7 @@ export async function removeEntryFromDirectory( parentPath: string, entryPath: string, isFile: boolean, - downloadOptions?: BeeRequestOptions, + downloadOptions?: RequestOptions, ): Promise { const metadataWithEpoch = await getRawMetadata( connection.bee, diff --git a/src/content-items/types.ts b/src/content-items/types.ts index 13960a01..1cac9bb2 100644 --- a/src/content-items/types.ts +++ b/src/content-items/types.ts @@ -1,6 +1,6 @@ import { Epoch } from '../feed/lookup/epoch' import { RawDirectoryMetadata, RawFileMetadata } from '../pod/types' -import { BeeRequestOptions } from '@ethersphere/bee-js' +import { RequestOptions } from '@ethersphere/bee-js' import { CacheInfo } from '../cache/types' import { LookupAnswer } from '../feed/types' @@ -18,7 +18,7 @@ export interface PathInformation { * Download data options */ export interface DownloadOptions { - requestOptions?: BeeRequestOptions + requestOptions?: RequestOptions cacheInfo?: CacheInfo } diff --git a/src/content-items/utils.ts b/src/content-items/utils.ts index 915a81f3..e7fec6ec 100644 --- a/src/content-items/utils.ts +++ b/src/content-items/utils.ts @@ -1,4 +1,4 @@ -import { Bee, Reference, BeeRequestOptions } from '@ethersphere/bee-js' +import { Bee, Reference, RequestOptions } from '@ethersphere/bee-js' import { EthAddress } from '@ethersphere/bee-js/dist/types/utils/eth' import { RawDirectoryMetadata, RawFileMetadata } from '../pod/types' import { DELETE_FEED_MAGIC_WORD, getFeedData, writeFeedData } from '../feed/api' @@ -26,7 +26,7 @@ export async function getRawMetadata( path: string, address: EthAddress, podPassword: PodPasswordBytes, - requestOptions?: BeeRequestOptions, + requestOptions?: RequestOptions, ): Promise { const feedData = await getFeedData(bee, path, address, requestOptions) const data = decryptJson(podPassword, feedData.data.chunkContent()) @@ -58,7 +58,7 @@ export async function isItemExists( bee: Bee, fullPath: string, address: EthAddress, - requestOptions: BeeRequestOptions | undefined, + requestOptions: RequestOptions | undefined, ): Promise { try { return (await getFeedData(bee, fullPath, address, requestOptions)).data.text() === DELETE_FEED_MAGIC_WORD @@ -81,7 +81,7 @@ export async function assertItemIsNotExists( bee: Bee, fullPath: string, address: EthAddress, - downloadOptions: BeeRequestOptions | undefined, + downloadOptions: RequestOptions | undefined, ): Promise { if (await isItemExists(bee, fullPath, address, downloadOptions)) { throw new Error(`${contentType} "${fullPath}" already uploaded to the network`) @@ -129,7 +129,7 @@ export async function getPathInfo( bee: Bee, path: string, address: EthAddress, - requestOptions?: BeeRequestOptions, + requestOptions?: RequestOptions, ): Promise { const lookupAnswer = await getFeedData(bee, path, address, requestOptions) @@ -160,7 +160,7 @@ export async function getCreationPathInfo( bee: Bee, fullPath: string, address: EthAddress, - requestOptions?: BeeRequestOptions, + requestOptions?: RequestOptions, ): Promise { // check that if directory uploaded - than it should be marked as deleted let pathInfo diff --git a/src/directory/handler.ts b/src/directory/handler.ts index dc9aa152..0a83d40c 100644 --- a/src/directory/handler.ts +++ b/src/directory/handler.ts @@ -1,6 +1,6 @@ import { writeFeedData } from '../feed/api' import { EthAddress } from '@ethersphere/bee-js/dist/types/utils/eth' -import { Bee, Reference, BeeRequestOptions } from '@ethersphere/bee-js' +import { Bee, Reference, RequestOptions } from '@ethersphere/bee-js' import { assertDirectoryName, assertPartsLength, @@ -69,7 +69,7 @@ export async function readDirectory( address: EthAddress, podPassword: PodPasswordBytes, isRecursive?: boolean, - downloadOptions?: BeeRequestOptions, + downloadOptions?: RequestOptions, ): Promise { const parentRawDirectoryMetadata = (await getRawMetadata(bee, path, address, podPassword, downloadOptions)).metadata assertRawDirectoryMetadata(parentRawDirectoryMetadata) @@ -160,7 +160,7 @@ export async function createDirectory( fullPath: string, podWallet: utils.HDNode, podPassword: PodPasswordBytes, - downloadOptions?: BeeRequestOptions, + downloadOptions?: RequestOptions, ): Promise { const parts = getPathParts(fullPath) assertPartsLength(parts) diff --git a/src/feed/api.ts b/src/feed/api.ts index c4b54e7d..ea113e86 100644 --- a/src/feed/api.ts +++ b/src/feed/api.ts @@ -1,4 +1,4 @@ -import { Bee, Data, Reference, BeeRequestOptions, Utils } from '@ethersphere/bee-js' +import { Bee, Data, Reference, RequestOptions, Utils } from '@ethersphere/bee-js' import { bmtHashString } from '../account/utils' import { getId } from './handler' import { lookup } from './lookup/linear' @@ -27,7 +27,7 @@ export async function getFeedData( bee: Bee, topic: string, address: Utils.EthAddress | Uint8Array, - requestOptions?: BeeRequestOptions, + requestOptions?: RequestOptions, ): Promise { const topicHash = bmtHashString(topic) diff --git a/src/file/handler.ts b/src/file/handler.ts index 415b68b6..36165f53 100644 --- a/src/file/handler.ts +++ b/src/file/handler.ts @@ -1,5 +1,5 @@ import { stringToBytes, wrapBytesWithHelpers } from '../utils/bytes' -import { Bee, Data, BeeRequestOptions } from '@ethersphere/bee-js' +import { Bee, Data, RequestOptions } from '@ethersphere/bee-js' import { EthAddress } from '@ethersphere/bee-js/dist/types/utils/eth' import { assertFullPathWithName, @@ -47,7 +47,7 @@ export async function getFileMetadata( path: string, address: EthAddress, podPassword: PodPasswordBytes, - downloadOptions?: BeeRequestOptions, + downloadOptions?: RequestOptions, ): Promise { const data = (await getRawMetadata(bee, path, address, podPassword, downloadOptions)).metadata assertRawFileMetadata(data) @@ -69,7 +69,7 @@ export async function downloadData( fullPath: string, address: EthAddress, podPassword: PodPasswordBytes, - downloadOptions?: BeeRequestOptions, + downloadOptions?: RequestOptions, ): Promise { const fileMetadata = await getFileMetadata(bee, fullPath, address, podPassword, downloadOptions) diff --git a/src/file/utils.ts b/src/file/utils.ts index 8d0c3a69..44cf9c9c 100644 --- a/src/file/utils.ts +++ b/src/file/utils.ts @@ -1,5 +1,5 @@ import { Connection } from '../connection/connection' -import { Bee, Reference, BeeRequestOptions, UploadResult } from '@ethersphere/bee-js' +import { Bee, Reference, RequestOptions, UploadResult } from '@ethersphere/bee-js' import { PathInfo } from '../pod/utils' import { Blocks, FileShareInfo, RawBlock, RawBlocks } from './types' import { rawBlocksToBlocks } from './adapter' @@ -109,7 +109,7 @@ export function getBaseName(path: string): string | undefined { export async function downloadBlocksManifest( bee: Bee, reference: Reference, - downloadOptions?: BeeRequestOptions, + downloadOptions?: RequestOptions, ): Promise { const data = (await bee.downloadData(reference, downloadOptions)).text() const rawBlocks = jsonParse(data, 'blocks manifest') diff --git a/src/types.ts b/src/types.ts index 31a2a55d..e9c32852 100644 --- a/src/types.ts +++ b/src/types.ts @@ -15,7 +15,7 @@ export interface Options { /** * FDP-contracts options */ - ensOptions?: Environment + ensOptions?: EnsEnvironment /** * ENS domain for usernames */