MCPcopy Create free account
hub / github.com/PleasureTools/joyBox / Initialize

Method Initialize

backend/Src/StreamDispatcher.ts:10–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8 }
9
10 public Initialize() {
11 this.observables.forEach(x => {
12 const plugin = this.GetActivePlugin(x.url);
13
14 // Unknown url or no available plugin
15 if (plugin === null) {
16 return;
17 }
18
19 const linkedObservable = this.pluginStreams.get(plugin.id);
20
21 if (linkedObservable === undefined) {
22 throw new Error(`Missing linked plugin '${plugin.name}' for '${x.url}'`);
23 }
24
25 linkedObservable.add(x.url);
26 });
27 }
28
29 public AddPlugin(plugin: number, observables: Set<string>) {
30 this.pluginStreams.set(plugin, observables);

Callers 3

RunMethod · 0.45
InitializeDbMethod · 0.45
SqliteAdapter.tsFile · 0.45

Calls 1

GetActivePluginMethod · 0.95

Tested by

no test coverage detected