From c61331d43d4f8244e4e2a3ae9f704256da4fc64d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 16:55:59 +0000 Subject: [PATCH 1/3] deps(dev): bump aegir from 44.1.4 to 45.0.1 Bumps [aegir](https://github.com/ipfs/aegir) from 44.1.4 to 45.0.1. - [Release notes](https://github.com/ipfs/aegir/releases) - [Changelog](https://github.com/ipfs/aegir/blob/master/CHANGELOG.md) - [Commits](https://github.com/ipfs/aegir/compare/v44.1.4...v45.0.1) --- updated-dependencies: - dependency-name: aegir dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c36992e4..4e45cd1b 100644 --- a/package.json +++ b/package.json @@ -153,7 +153,7 @@ "wherearewe": "^2.0.1" }, "devDependencies": { - "aegir": "^44.1.0", + "aegir": "^45.0.1", "kubo": "^0.32.0" }, "browser": { From 02cb6f10360facaf05e5347d4f5b281f7fc8328e Mon Sep 17 00:00:00 2001 From: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> Date: Thu, 14 Nov 2024 11:35:57 -0600 Subject: [PATCH 2/3] fix: lint works. removed ipfs-http-client in examples --- examples/electron-asar/app.js | 25 +++++++------ examples/electron-asar/package.json | 4 +-- examples/id/id.js | 35 ++++++------------- .../remote-disposable/remote-disposable.js | 1 - 4 files changed, 26 insertions(+), 39 deletions(-) diff --git a/examples/electron-asar/app.js b/examples/electron-asar/app.js index 98c781dc..c75cbe54 100644 --- a/examples/electron-asar/app.js +++ b/examples/electron-asar/app.js @@ -1,13 +1,16 @@ /* eslint no-console: 0 */ -'use strict' - +// @ts-check const electron = require('electron') +const { path } = require('kubo') +const { create } = require('kubo-rpc-client') +/** + * @type {import('../../src')} + */ +const { createNode, createServer } = require('../../src') const app = electron.app const ipcMain = electron.ipcMain const BrowserWindow = electron.BrowserWindow -const { createController, createServer } = require('ipfsd-ctl') - app.on('ready', () => { const win = new BrowserWindow({ title: 'loading', @@ -23,17 +26,17 @@ ipcMain.on('start', async ({ sender }) => { sender.send('message', 'starting disposable IPFS') try { const s = createServer({ - host: '127.0.0.1', port: 43134 }, { - type: 'go', - ipfsBin: require('go-ipfs').path(), - ipfsHttpModule: require('ipfs-http-client') + type: 'kubo', + rpc: create, + bin: path() }) await s.start() - const node = await createController({ - type: 'go', - ipfsHttpModule: require('ipfs-http-client') + const node = await createNode({ + type: 'kubo', + rpc: create, + bin: path() }) console.log('get id') sender.send('message', 'get id') diff --git a/examples/electron-asar/package.json b/examples/electron-asar/package.json index 81238cbe..684e226c 100644 --- a/examples/electron-asar/package.json +++ b/examples/electron-asar/package.json @@ -3,8 +3,8 @@ "private": true, "main": "./app.js", "dependencies": { - "go-ipfs": "^0.7.0", - "ipfs-http-client": "^47.0.1", + "kubo": "^0.32.0", + "kubo-rpc-client": "^5.0.0", "ipfsd-ctl": "file:../.." }, "devDependencies": { diff --git a/examples/id/id.js b/examples/id/id.js index a3af0ae2..93f35439 100644 --- a/examples/id/id.js +++ b/examples/id/id.js @@ -1,35 +1,20 @@ /* eslint no-console: 0 */ -'use strict' - -const { createController } = require('../../src') +const { path } = require('kubo') +const { create } = require('kubo-rpc-client') +/** + * @type {import('../../src')} + */ +const { createNode } = require('../../src') async function run () { - const node = await createController({ - type: 'go', - ipfsBin: require('go-ipfs').path(), - ipfsHttpModule: require('ipfs-http-client') + const node = await createNode({ + type: 'kubo', + rpc: create, + bin: path() }) console.log('alice') console.log(await node.api.id()) await node.stop() - - const nodeJs = await createController({ - type: 'js', - ipfsBin: ipfsModule.path(), - ipfsHttpModule - }) - console.log('alice') - console.log(await nodeJs.api.id()) - await nodeJs.stop() - - const nodeProc = await createController({ - type: 'proc', - ipfsModule: require('ipfs'), - ipfsHttpModule: require('ipfs-http-client') - }) - console.log('bob') - console.log(await nodeProc.api.id()) - await nodeProc.stop() process.exit() } diff --git a/examples/remote-disposable/remote-disposable.js b/examples/remote-disposable/remote-disposable.js index 32876232..3ffc7342 100644 --- a/examples/remote-disposable/remote-disposable.js +++ b/examples/remote-disposable/remote-disposable.js @@ -1,5 +1,4 @@ /* eslint no-console: 0 */ -'use strict' // Start a remote disposable node, and get access to the api // print the node id, and stop the temporary daemon From 1e6936af65b5e28e745ffb06851146790ad5b0fc Mon Sep 17 00:00:00 2001 From: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> Date: Thu, 14 Nov 2024 11:36:13 -0600 Subject: [PATCH 3/3] chore: removed go-ipfs mentions --- examples/remote-disposable/remote-disposable.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/examples/remote-disposable/remote-disposable.js b/examples/remote-disposable/remote-disposable.js index 3ffc7342..fdcd53e6 100644 --- a/examples/remote-disposable/remote-disposable.js +++ b/examples/remote-disposable/remote-disposable.js @@ -1,17 +1,23 @@ /* eslint no-console: 0 */ - +// @ts-check // Start a remote disposable node, and get access to the api // print the node id, and stop the temporary daemon -const { createController, createServer } = require('../../src') +const { path } = require('kubo') +const { create } = require('kubo-rpc-client') +/** + * @type {import('../../src')} + */ +const { createNode, createServer } = require('../../src') const server = createServer() async function run () { await server.start() - const node = await createController({ + const node = await createNode({ remote: true, - type: 'go', - ipfsBin: require('go-ipfs').path() + type: 'kubo', + bin: path(), + rpc: create }) console.log(await node.api.id())