Skip to content

Commit d6543a6

Browse files
authoredApr 19, 2024
fix: enable pubsub (#828)
Adds option for pubsub
1 parent 12399c3 commit d6543a6

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed
 

‎src/kubo/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export type KuboInitOptions = KuboEd25519Init | KuboRSAInit
3030
export interface KuboStartOptions {
3131
offline?: boolean
3232
ipnsPubsub?: boolean
33+
pubsub?: boolean
3334
repoAutoMigrate?: boolean
3435

3536
/**

‎src/kubo/utils.ts

+4
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ export function buildStartArgs (options: KuboStartOptions): string[] {
6666
args.push('--offline')
6767
}
6868

69+
if (options.pubsub === true) {
70+
args.push('---enable-pubsub-experiment')
71+
}
72+
6973
if (options.ipnsPubsub === true) {
7074
args.push('--enable-namesys-pubsub')
7175
}

‎test/kubo/utils.node.ts

+6
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ describe('utils', function () {
101101
}).join(' ')).to.include('--offline')
102102
})
103103

104+
it('ipns pubsub', () => {
105+
expect(buildStartArgs({
106+
pubsub: true
107+
}).join(' ')).to.include('--enable-pubsub-experiment')
108+
})
109+
104110
it('ipns pubsub', () => {
105111
expect(buildStartArgs({
106112
ipnsPubsub: true

0 commit comments

Comments
 (0)