From 72efd00117409344b2efcb65669ad407a64a3f41 Mon Sep 17 00:00:00 2001 From: Irakli Gozalishvili Date: Fri, 4 Dec 2020 10:22:14 -0800 Subject: [PATCH] chore: make IPFS API static (remove api-manager) (#3365) - api-manager is gone. - There is now Storage component that is glorified `{keychain, repo, peerId}` tuple, that one can `async start` and it takes care of repo bootstrapping (which `init` used to do). As per discussion with @achingbrain `init` was mostly there for historical reasons. - There is now `Network` service component that is glorified `{peerId, libp2p, bitswap}` tuple. - All components that depended upon `libp2p` or `peerId` depend on `network` service now. - They can do `await network.use(options)` and get tuple when node is started (if it is starting or started) or an exception if start has not been initiated. - This way IPFS node is no longer mutated and APIs that depend on node been started throw if called before start. - lot of TS typings were added to be able to make this changes with more confidence. - Set of interfaces were added for things like datastore, repo, bitswap - create can be passed implementations and it's useful to decouple interface from a concrete implementation. - We had no types for those and it helped having interfaces to increase coverage and enable making these changes. > I would like to migrate those to other repos, but doing it as would be more effective than having to coordinate changes across many repos. - circular dependencies between pinmanager and dag APIs are resolved. Co-authored-by: Alex Potsides Co-authored-by: Hugo Dias --- browser-ipns-publish/package.json | 2 +- explore-ethereum-blockchain/package.json | 2 +- http-client-browser-pubsub/package.json | 2 +- http-client-bundle-webpack/package.json | 2 +- http-client-name-api/package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/browser-ipns-publish/package.json b/browser-ipns-publish/package.json index 988c6d21..fbdc1f00 100644 --- a/browser-ipns-publish/package.json +++ b/browser-ipns-publish/package.json @@ -27,7 +27,7 @@ "devDependencies": { "delay": "^4.4.0", "execa": "^4.0.3", - "ipfsd-ctl": "^7.0.2", + "ipfsd-ctl": "^7.1.1", "go-ipfs": "^0.7.0", "parcel-bundler": "^1.12.4", "path": "^0.12.7", diff --git a/explore-ethereum-blockchain/package.json b/explore-ethereum-blockchain/package.json index 28ae6c4a..097783c2 100644 --- a/explore-ethereum-blockchain/package.json +++ b/explore-ethereum-blockchain/package.json @@ -12,7 +12,7 @@ "devDependencies": { "ipfs": "^0.52.1", "ipfs-http-client": "^48.1.1", - "ipfsd-ctl": "^7.0.2", + "ipfsd-ctl": "^7.1.1", "ipld-ethereum": "^5.0.1", "test-ipfs-example": "^2.0.3" } diff --git a/http-client-browser-pubsub/package.json b/http-client-browser-pubsub/package.json index 0b04ed1f..36b9c8b1 100644 --- a/http-client-browser-pubsub/package.json +++ b/http-client-browser-pubsub/package.json @@ -21,7 +21,7 @@ "execa": "^4.0.3", "go-ipfs": "^0.7.0", "ipfs": "^0.52.1", - "ipfsd-ctl": "^7.0.2", + "ipfsd-ctl": "^7.1.1", "parcel-bundler": "^1.12.4", "test-ipfs-example": "^2.0.3" } diff --git a/http-client-bundle-webpack/package.json b/http-client-bundle-webpack/package.json index 5401879b..6d9b00b9 100644 --- a/http-client-bundle-webpack/package.json +++ b/http-client-bundle-webpack/package.json @@ -25,7 +25,7 @@ "copy-webpack-plugin": "^5.0.4", "execa": "^4.0.3", "ipfs": "^0.52.1", - "ipfsd-ctl": "^7.0.2", + "ipfsd-ctl": "^7.1.1", "react-hot-loader": "^4.12.21", "rimraf": "^3.0.2", "test-ipfs-example": "^2.0.3", diff --git a/http-client-name-api/package.json b/http-client-name-api/package.json index 28587a19..90e0c1ab 100644 --- a/http-client-name-api/package.json +++ b/http-client-name-api/package.json @@ -18,7 +18,7 @@ "devDependencies": { "execa": "^4.0.3", "go-ipfs": "^0.7.0", - "ipfsd-ctl": "^7.0.2", + "ipfsd-ctl": "^7.1.1", "parcel-bundler": "^1.12.4", "rimraf": "^3.0.2", "test-ipfs-example": "^2.0.3"