Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove bootstrap.clear() and bootstrap.reset() #114

Merged
merged 1 commit into from
Jan 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.