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: enable pubsub #828

Merged
merged 2 commits into from
Apr 19, 2024
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
1 change: 1 addition & 0 deletions src/kubo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export type KuboInitOptions = KuboEd25519Init | KuboRSAInit
export interface KuboStartOptions {
offline?: boolean
ipnsPubsub?: boolean
pubsub?: boolean
repoAutoMigrate?: boolean

/**
Expand Down
4 changes: 4 additions & 0 deletions src/kubo/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ export function buildStartArgs (options: KuboStartOptions): string[] {
args.push('--offline')
}

if (options.pubsub === true) {
args.push('---enable-pubsub-experiment')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 dashes rather than 2 @achingbrain

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a test for this, but, well:

tests

Fixed in bb5f1a1 released in https://github.com/ipfs/js-ipfsd-ctl/releases/tag/v14.0.5

}

if (options.ipnsPubsub === true) {
args.push('--enable-namesys-pubsub')
}
Expand Down
6 changes: 6 additions & 0 deletions test/kubo/utils.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ describe('utils', function () {
}).join(' ')).to.include('--offline')
})

it('ipns pubsub', () => {
expect(buildStartArgs({
pubsub: true
}).join(' ')).to.include('--enable-pubsub-experiment')
})

it('ipns pubsub', () => {
expect(buildStartArgs({
ipnsPubsub: true
Expand Down
Loading