diff --git a/src/kubo/index.ts b/src/kubo/index.ts index 4930ff10..7f26ab97 100644 --- a/src/kubo/index.ts +++ b/src/kubo/index.ts @@ -30,6 +30,7 @@ export type KuboInitOptions = KuboEd25519Init | KuboRSAInit export interface KuboStartOptions { offline?: boolean ipnsPubsub?: boolean + pubsub?: boolean repoAutoMigrate?: boolean /** diff --git a/src/kubo/utils.ts b/src/kubo/utils.ts index 1b9610a3..2a7c44e9 100644 --- a/src/kubo/utils.ts +++ b/src/kubo/utils.ts @@ -66,6 +66,10 @@ export function buildStartArgs (options: KuboStartOptions): string[] { args.push('--offline') } + if (options.pubsub === true) { + args.push('---enable-pubsub-experiment') + } + if (options.ipnsPubsub === true) { args.push('--enable-namesys-pubsub') } diff --git a/test/kubo/utils.node.ts b/test/kubo/utils.node.ts index 5e509296..803a8634 100644 --- a/test/kubo/utils.node.ts +++ b/test/kubo/utils.node.ts @@ -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