Skip to content

Commit

Permalink
fix: remove bootstrap.clear() and bootstrap.reset()
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Jan 4, 2023
1 parent 0176418 commit 5537d46
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 169 deletions.
25 changes: 0 additions & 25 deletions src/bootstrap/clear.js

This file was deleted.

7 changes: 0 additions & 7 deletions src/bootstrap/index.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
import { createAdd } from './add.js'
import { createClear } from './clear.js'
import { createList } from './list.js'
import { createReset } from './reset.js'
import { createRm } from './rm.js'

/**
* @param {import('../types').Options} config
*/
export function createBootstrap (config) {
return {
/**
* TODO: Remove nonmatching bootstrap subcommands https://github.com/ipfs/js-kubo-rpc-client/issues/96
*/
add: createAdd(config),
clear: createClear(config),
list: createList(config),
reset: createReset(config),
rm: createRm(config)
}
}
25 changes: 0 additions & 25 deletions src/bootstrap/reset.js

This file was deleted.

3 changes: 2 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ interface KuboRpcClientConfigApi extends Omit<OldRpcClientConfigApi, 'profiles'>
profiles: Omit<OldRpcClientConfigApi['profiles'], 'list'>
}

export interface KuboRpcClientApi extends Omit<IPFS<HTTPClientExtraOptions>, 'files' | 'bitswap' | 'config'> {
export interface KuboRpcClientApi extends Omit<IPFS<HTTPClientExtraOptions>, 'files' | 'bitswap' | 'config' | 'bootstrap'> {
bitswap: Omit<IPFS<HTTPClientExtraOptions>['bitswap'], 'unwant'>
config: KuboRpcClientConfigApi
files: Omit<IPFS<HTTPClientExtraOptions>['files'], 'chmod' | 'touch'>
bootstrap: Omit<IPFS<HTTPClientExtraOptions>['bootstrap'], 'clear' | 'reset'>
}

export interface IPFSHTTPClient extends KuboRpcClientApi {
Expand Down
2 changes: 0 additions & 2 deletions test/interface-tests/src/bootstrap/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ export function testAdd (factory, options) {
})

it('should prevent duplicate inserts of bootstrap peers', async () => {
await ipfs.bootstrap.clear()

const added = await ipfs.bootstrap.add(validIp4)
expect(added).to.have.property('Peers').that.deep.equals([validIp4])

Expand Down
56 changes: 0 additions & 56 deletions test/interface-tests/src/bootstrap/clear.js

This file was deleted.

4 changes: 0 additions & 4 deletions test/interface-tests/src/bootstrap/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import { createSuite } from '../utils/suite.js'
import { testAdd } from './add.js'
import { testClear } from './clear.js'
import { testList } from './list.js'
import { testReset } from './reset.js'
import { testRm } from './rm.js'

const tests = {
add: testAdd,
clear: testClear,
list: testList,
reset: testReset,
rm: testRm
}

Expand Down
49 changes: 0 additions & 49 deletions test/interface-tests/src/bootstrap/reset.js

This file was deleted.

0 comments on commit 5537d46

Please sign in to comment.