noflo 1.4.3 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/.ecrc +3 -0
  2. package/.eslintignore +2 -0
  3. package/{CHANGES.md → CHANGELOG.md} +520 -527
  4. package/README.md +1 -1
  5. package/bin/noflo-cache-preheat +4 -4
  6. package/components/Graph.d.ts +50 -15
  7. package/components/Graph.js +94 -68
  8. package/examples/http/HelloController.js +9 -6
  9. package/examples/spreadsheet/parse.fbp +3 -3
  10. package/lib/AsCallback.d.ts +22 -9
  11. package/lib/AsCallback.js +69 -18
  12. package/lib/AsComponent.d.ts +1 -1
  13. package/lib/AsComponent.js +5 -3
  14. package/lib/BaseNetwork.d.ts +16 -6
  15. package/lib/BaseNetwork.js +65 -31
  16. package/lib/BasePort.d.ts +39 -12
  17. package/lib/BasePort.js +34 -6
  18. package/lib/Component.d.ts +8 -8
  19. package/lib/Component.js +23 -20
  20. package/lib/ComponentLoader.d.ts +3 -4
  21. package/lib/ComponentLoader.js +9 -10
  22. package/lib/IP.d.ts +12 -8
  23. package/lib/IP.js +6 -4
  24. package/lib/InPort.d.ts +64 -9
  25. package/lib/InPort.js +72 -13
  26. package/lib/InternalSocket.d.ts +53 -7
  27. package/lib/InternalSocket.js +51 -14
  28. package/lib/LegacyNetwork.d.ts +12 -2
  29. package/lib/LegacyNetwork.js +5 -5
  30. package/lib/Network.d.ts +13 -2
  31. package/lib/Network.js +10 -10
  32. package/lib/NoFlo.d.ts +13 -13
  33. package/lib/NoFlo.js +29 -27
  34. package/lib/OutPort.d.ts +64 -13
  35. package/lib/OutPort.js +73 -15
  36. package/lib/Platform.d.ts +1 -1
  37. package/lib/Platform.js +9 -4
  38. package/lib/Ports.d.ts +11 -12
  39. package/lib/Ports.js +8 -4
  40. package/lib/ProcessInput.d.ts +5 -9
  41. package/lib/ProcessInput.js +8 -9
  42. package/lib/ProcessOutput.d.ts +2 -2
  43. package/lib/ProcessOutput.js +5 -5
  44. package/lib/loader/NodeJs.d.ts +0 -1
  45. package/lib/loader/NodeJs.js +104 -105
  46. package/lib/loader/register.d.ts +1 -1
  47. package/lib/loader/register.js +8 -4
  48. package/package.json +16 -11
  49. package/spec/.eslintrc +5 -2
  50. package/spec/AsCallback.js +9 -13
  51. package/spec/AsComponent.js +10 -4
  52. package/spec/AsPromise.js +38 -0
  53. package/spec/CommonJS.cjs +10 -0
  54. package/spec/ComponentLoader.js +2 -2
  55. package/spec/ESModule.mjs +11 -0
  56. package/spec/Network.js +32 -11
  57. package/spec/NetworkSync.js +892 -0
  58. package/spec/Scoping.js +27 -42
  59. package/spec/Subgraph.js +6 -11
  60. package/spec/fixtures/componentloader/components/Output.js +1 -1
  61. package/spec/fixtures/componentloader/components/Repeat.ts +1 -1
  62. package/spec/fixtures/componentloader/components/RepeatAsync.coffee +1 -1
  63. package/spec/fixtures/componentloader/node_modules/example/components/Forward.js +1 -1
  64. package/spec/fixtures/componentloader/node_modules/example/package.json +1 -1
  65. package/spec/fixtures/componentloader/package.json +1 -1
  66. package/spec/fixtures/componentloader/spec/Repeat.yaml +1 -1
  67. package/src/.eslintrc +9 -2
  68. package/src/components/Graph.js +105 -71
  69. package/src/lib/AsCallback.js +71 -16
  70. package/src/lib/AsComponent.js +4 -3
  71. package/src/lib/BaseNetwork.js +48 -15
  72. package/src/lib/BasePort.js +43 -9
  73. package/src/lib/Component.js +8 -8
  74. package/src/lib/ComponentLoader.js +3 -4
  75. package/src/lib/IP.js +7 -4
  76. package/src/lib/InPort.js +74 -13
  77. package/src/lib/InternalSocket.js +49 -9
  78. package/src/lib/LegacyNetwork.js +2 -2
  79. package/src/lib/Network.js +2 -2
  80. package/src/lib/NoFlo.js +15 -13
  81. package/src/lib/OutPort.js +77 -14
  82. package/src/lib/Platform.js +9 -4
  83. package/src/lib/Ports.js +6 -2
  84. package/src/lib/ProcessInput.js +7 -9
  85. package/src/lib/ProcessOutput.js +1 -1
  86. package/src/lib/loader/NodeJs.js +122 -116
  87. package/src/lib/loader/register.js +2 -2
  88. /package/{karma.config.js → karma.config.cjs} +0 -0
  89. /package/{webpack.config.js → webpack.config.cjs} +0 -0
package/README.md CHANGED
@@ -62,7 +62,7 @@ NoFlo is available from [GitHub](https://github.com/noflo/noflo) under the MIT l
62
62
 
63
63
  ## Changes
64
64
 
65
- Please refer to the [Release Notes](https://github.com/noflo/noflo/releases) and the [CHANGES.md document](https://github.com/noflo/noflo/blob/master/CHANGES.md).
65
+ Please refer to the [CHANGELOG.md](CHANGELOG.md)
66
66
 
67
67
  ## Usage
68
68
 
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  // vim: set filetype=javascript:
3
- const path = require('path');
4
- const fs = require('fs');
5
- const { ComponentLoader } = require('../lib/NoFlo');
3
+ import path from 'node:path';
4
+ import fs from 'node:fs';
5
+ import * as noflo from '../lib/NoFlo.js';
6
6
 
7
7
  // Base setup
8
8
  const baseDir = process.cwd();
@@ -10,7 +10,7 @@ const cacheFile = path.resolve(baseDir, 'fbp.json');
10
10
 
11
11
  function preheat() {
12
12
  console.log(`Pre-heating NoFlo cache with manifest for ${baseDir}`);
13
- const loader = new ComponentLoader(baseDir, {
13
+ const loader = new noflo.ComponentLoader(baseDir, {
14
14
  cache: true,
15
15
  discover: true,
16
16
  });
@@ -1,25 +1,60 @@
1
1
  /**
2
- * @params {Object} metadata
2
+ * @param {import("fbp-graph/lib/Types").GraphNodeMetadata} [metadata]
3
3
  */
4
- export function getComponent(metadata: any): Graph;
5
- export class Graph extends noflo.Component {
4
+ export function getComponent(metadata?: import("fbp-graph/lib/Types").GraphNodeMetadata): Graph;
5
+ export class Graph extends Component {
6
6
  /**
7
- * @param {Object} metadata
7
+ * @param {import("fbp-graph/lib/Types").GraphNodeMetadata} [metadata]
8
8
  */
9
- constructor(metadata: any);
10
- metadata: any;
9
+ constructor(metadata?: import("fbp-graph/lib/Types").GraphNodeMetadata);
10
+ metadata: import("fbp-graph/lib/Types").PropertyMap;
11
11
  /** @type {import("../lib/Network").Network|null} */
12
12
  network: import("../lib/Network").Network | null;
13
13
  ready: boolean;
14
14
  starting: boolean;
15
- /** @type {noflo.ComponentLoader|null} */
16
- loader: noflo.ComponentLoader | null;
17
- setGraph(graph: any, callback: any): Promise<void>;
18
- createNetwork(graph: any, callback: any): Promise<void>;
19
- subscribeNetwork(network: any): void;
20
- isExportedInport(port: any, nodeName: any, portName: any): string | false;
21
- isExportedOutport(port: any, nodeName: any, portName: any): string | false;
15
+ /** @type {import("../lib/ComponentLoader").ComponentLoader|null} */
16
+ loader: import("../lib/ComponentLoader").ComponentLoader | null;
17
+ /**
18
+ * @param {import("fbp-graph").Graph|string} graph
19
+ * @returns {Promise<void>}
20
+ */
21
+ setGraph(graph: import("fbp-graph").Graph | string): Promise<void>;
22
+ /**
23
+ * @param {import("fbp-graph").Graph} graph
24
+ * @returns {Promise<void>}
25
+ */
26
+ createNetwork(graph: import("fbp-graph").Graph): Promise<void>;
27
+ /**
28
+ * @typedef SubgraphContext
29
+ * @property {boolean} activated
30
+ * @property {boolean} deactivated
31
+ */
32
+ /**
33
+ * @param {import("../lib/Network").Network} network
34
+ */
35
+ subscribeNetwork(network: import("../lib/Network").Network): void;
36
+ /**
37
+ * @param {import("../lib/InPort").default} port
38
+ * @param {string} nodeName
39
+ * @param {string} portName
40
+ * @returns {boolean|string}
41
+ */
42
+ isExportedInport(port: import("../lib/InPort").default, nodeName: string, portName: string): boolean | string;
43
+ /**
44
+ * @param {import("../lib/OutPort").default} port
45
+ * @param {string} nodeName
46
+ * @param {string} portName
47
+ * @returns {boolean|string}
48
+ */
49
+ isExportedOutport(port: import("../lib/OutPort").default, nodeName: string, portName: string): boolean | string;
22
50
  setToReady(): void;
23
- findEdgePorts(name: any, process: any): boolean;
51
+ /**
52
+ * @param {string} name
53
+ * @param {import("../lib/BaseNetwork").NetworkProcess} process
54
+ * @returns {boolean}
55
+ */
56
+ findEdgePorts(name: string, process: import("../lib/BaseNetwork").NetworkProcess): boolean;
57
+ setUp(): Promise<any>;
58
+ tearDown(): Promise<void>;
24
59
  }
25
- import * as noflo from "../lib/NoFlo";
60
+ import { Component } from "../lib/Component.js";
@@ -10,13 +10,15 @@ exports.getComponent = exports.Graph = void 0;
10
10
  import/no-unresolved,
11
11
  import/prefer-default-export,
12
12
  */
13
- const noflo = require("../lib/NoFlo");
14
- const Platform_1 = require("../lib/Platform");
13
+ const fbp_graph_1 = require("fbp-graph");
14
+ const Component_js_1 = require("../lib/Component.js");
15
+ const Ports_js_1 = require("../lib/Ports.js");
16
+ const Network_js_1 = require("../lib/Network.js");
15
17
  // The Graph component is used to wrap NoFlo Networks into components inside
16
18
  // another network.
17
- class Graph extends noflo.Component {
19
+ class Graph extends Component_js_1.Component {
18
20
  /**
19
- * @param {Object} metadata
21
+ * @param {import("fbp-graph/lib/Types").GraphNodeMetadata} [metadata]
20
22
  */
21
23
  constructor(metadata) {
22
24
  super();
@@ -28,17 +30,17 @@ class Graph extends noflo.Component {
28
30
  this.starting = false;
29
31
  /** @type {string|null} */
30
32
  this.baseDir = null;
31
- /** @type {noflo.ComponentLoader|null} */
33
+ /** @type {import("../lib/ComponentLoader").ComponentLoader|null} */
32
34
  this.loader = null;
33
35
  this.load = 0;
34
- this.inPorts = new noflo.InPorts({
36
+ this.inPorts = new Ports_js_1.InPorts({
35
37
  graph: {
36
38
  datatype: 'all',
37
39
  description: 'NoFlo graph definition to be used with the subgraph component',
38
40
  required: true,
39
41
  },
40
42
  });
41
- this.outPorts = new noflo.OutPorts();
43
+ this.outPorts = new Ports_js_1.OutPorts();
42
44
  this.inPorts.ports.graph.on('ip', (packet) => {
43
45
  if (packet.type !== 'data') {
44
46
  return;
@@ -47,75 +49,75 @@ class Graph extends noflo.Component {
47
49
  this.setGraph(packet.data).catch(this.error);
48
50
  });
49
51
  }
50
- setGraph(graph, callback) {
52
+ /**
53
+ * @param {import("fbp-graph").Graph|string} graph
54
+ * @returns {Promise<void>}
55
+ */
56
+ setGraph(graph) {
51
57
  this.ready = false;
52
- let promise;
53
58
  if (typeof graph === 'object') {
54
59
  if (typeof graph.addNode === 'function') {
55
60
  // Existing Graph object
56
- promise = this.createNetwork(graph);
61
+ return this.createNetwork(graph);
57
62
  }
58
- else {
59
- // JSON definition of a graph
60
- promise = noflo.graph.loadJSON(graph)
61
- .then((instance) => this.createNetwork(instance));
62
- }
63
- }
64
- else {
65
- let graphName = graph;
66
- if ((graphName.substr(0, 1) !== '/') && (graphName.substr(1, 1) !== ':') && process && process.cwd) {
67
- graphName = `${process.cwd()}/${graphName}`;
68
- }
69
- promise = noflo.graph.loadFile(graphName)
63
+ // JSON definition of a graph
64
+ return fbp_graph_1.graph.loadJSON(graph)
70
65
  .then((instance) => this.createNetwork(instance));
71
66
  }
72
- if (callback) {
73
- Platform_1.deprecated('Providing a callback to Graph.setGraph is deprecated, use Promises');
74
- promise.then(() => {
75
- callback(null);
76
- }, callback);
67
+ let graphName = graph;
68
+ if ((graphName.substr(0, 1) !== '/') && (graphName.substr(1, 1) !== ':') && process && process.cwd) {
69
+ graphName = `${process.cwd()}/${graphName}`;
77
70
  }
78
- return promise;
71
+ return fbp_graph_1.graph.loadFile(graphName)
72
+ .then((instance) => this.createNetwork(instance));
79
73
  }
80
- createNetwork(graph, callback) {
74
+ /**
75
+ * @param {import("fbp-graph").Graph} graph
76
+ * @returns {Promise<void>}
77
+ */
78
+ createNetwork(graph) {
81
79
  this.description = graph.properties.description || '';
82
80
  this.icon = graph.properties.icon || this.icon;
83
81
  const graphObj = graph;
84
- if (!graphObj.name) {
82
+ if (!graphObj.name && this.nodeId) {
85
83
  graphObj.name = this.nodeId;
86
84
  }
87
- const promise = noflo.createNetwork(graphObj, {
88
- delay: true,
89
- subscribeGraph: false,
90
- componentLoader: this.loader,
91
- baseDir: this.baseDir,
92
- })
93
- .then((network) => {
85
+ const network = new Network_js_1.Network(graphObj, {
86
+ componentLoader: this.loader || undefined,
87
+ baseDir: this.baseDir || undefined,
88
+ });
89
+ return network
90
+ .loader.listComponents()
91
+ .then(() => {
94
92
  this.network = network;
95
- this.emit('network', this.network);
93
+ this.emit('network', network);
96
94
  // Subscribe to network lifecycle
97
- this.subscribeNetwork(this.network);
95
+ this.subscribeNetwork(network);
98
96
  // Wire the network up
99
97
  return network.connect();
100
98
  })
101
99
  .then(() => {
102
- Object.keys(this.network.processes).forEach((name) => {
100
+ Object.keys(network.processes).forEach((name) => {
103
101
  // Map exported ports to local component
104
- const node = this.network.processes[name];
102
+ const node = network.processes[name];
105
103
  this.findEdgePorts(name, node);
106
104
  });
107
105
  // Finally set ourselves as "ready"
108
106
  this.setToReady();
109
107
  });
110
- if (callback) {
111
- Platform_1.deprecated('Providing a callback to Graph.createNetwork is deprecated, use Promises');
112
- promise.then(() => {
113
- callback(null);
114
- }, callback);
115
- }
116
- return promise;
117
108
  }
109
+ /**
110
+ * @typedef SubgraphContext
111
+ * @property {boolean} activated
112
+ * @property {boolean} deactivated
113
+ */
114
+ /**
115
+ * @param {import("../lib/Network").Network} network
116
+ */
118
117
  subscribeNetwork(network) {
118
+ /**
119
+ * @type {Array<SubgraphContext>}
120
+ */
119
121
  const contexts = [];
120
122
  network.on('start', () => {
121
123
  const ctx = {
@@ -134,7 +136,16 @@ class Graph extends noflo.Component {
134
136
  this.deactivate(ctx);
135
137
  });
136
138
  }
139
+ /**
140
+ * @param {import("../lib/InPort").default} port
141
+ * @param {string} nodeName
142
+ * @param {string} portName
143
+ * @returns {boolean|string}
144
+ */
137
145
  isExportedInport(port, nodeName, portName) {
146
+ if (!this.network) {
147
+ return false;
148
+ }
138
149
  // First we check disambiguated exported ports
139
150
  const keys = Object.keys(this.network.graph.inports);
140
151
  for (let i = 0; i < keys.length; i += 1) {
@@ -147,7 +158,16 @@ class Graph extends noflo.Component {
147
158
  // Component has exported ports and this isn't one of them
148
159
  return false;
149
160
  }
161
+ /**
162
+ * @param {import("../lib/OutPort").default} port
163
+ * @param {string} nodeName
164
+ * @param {string} portName
165
+ * @returns {boolean|string}
166
+ */
150
167
  isExportedOutport(port, nodeName, portName) {
168
+ if (!this.network) {
169
+ return false;
170
+ }
151
171
  // First we check disambiguated exported ports
152
172
  const keys = Object.keys(this.network.graph.outports);
153
173
  for (let i = 0; i < keys.length; i += 1) {
@@ -174,19 +194,27 @@ class Graph extends noflo.Component {
174
194
  }, 0);
175
195
  }
176
196
  }
197
+ /**
198
+ * @param {string} name
199
+ * @param {import("../lib/BaseNetwork").NetworkProcess} process
200
+ * @returns {boolean}
201
+ */
177
202
  findEdgePorts(name, process) {
203
+ if (!process.component) {
204
+ return false;
205
+ }
178
206
  const inPorts = process.component.inPorts.ports;
179
207
  const outPorts = process.component.outPorts.ports;
180
208
  Object.keys(inPorts).forEach((portName) => {
181
209
  const port = inPorts[portName];
182
210
  const targetPortName = this.isExportedInport(port, name, portName);
183
- if (targetPortName === false) {
211
+ if (typeof targetPortName !== 'string') {
184
212
  return;
185
213
  }
186
214
  this.inPorts.add(targetPortName, port);
187
- this.inPorts[targetPortName].on('connect', () => {
215
+ this.inPorts.ports[targetPortName].on('connect', () => {
188
216
  // Start the network implicitly if we're starting to get data
189
- if (this.starting) {
217
+ if (this.starting || !this.network) {
190
218
  return;
191
219
  }
192
220
  if (this.network.isStarted()) {
@@ -198,13 +226,13 @@ class Graph extends noflo.Component {
198
226
  return;
199
227
  }
200
228
  // Network was never started, start properly
201
- this.setUp(() => { });
229
+ this.setUp();
202
230
  });
203
231
  });
204
232
  Object.keys(outPorts).forEach((portName) => {
205
233
  const port = outPorts[portName];
206
234
  const targetPortName = this.isExportedOutport(port, name, portName);
207
- if (targetPortName === false) {
235
+ if (typeof targetPortName !== 'string') {
208
236
  return;
209
237
  }
210
238
  this.outPorts.add(targetPortName, port);
@@ -220,37 +248,35 @@ class Graph extends noflo.Component {
220
248
  isLegacy() {
221
249
  return false;
222
250
  }
223
- setUp(callback) {
251
+ setUp() {
224
252
  this.starting = true;
225
253
  if (!this.isReady()) {
226
- this.once('ready', () => {
227
- this.setUp(callback);
254
+ return new Promise((resolve, reject) => {
255
+ this.once('ready', () => {
256
+ this.setUp().then(resolve, reject);
257
+ });
228
258
  });
229
- return;
230
259
  }
231
260
  if (!this.network) {
232
- callback(null);
233
- return;
261
+ return Promise.resolve();
234
262
  }
235
- this.network.start()
263
+ return this.network.start()
236
264
  .then(() => {
237
265
  this.starting = false;
238
- callback(null);
239
- }, callback);
266
+ });
240
267
  }
241
- tearDown(callback) {
268
+ tearDown() {
242
269
  this.starting = false;
243
270
  if (!this.network) {
244
- callback(null);
245
- return;
271
+ return Promise.resolve();
246
272
  }
247
- this.network.stop()
248
- .then(() => callback(), callback);
273
+ return this.network.stop()
274
+ .then(() => { });
249
275
  }
250
276
  }
251
277
  exports.Graph = Graph;
252
278
  /**
253
- * @params {Object} metadata
279
+ * @param {import("fbp-graph/lib/Types").GraphNodeMetadata} [metadata]
254
280
  */
255
281
  function getComponent(metadata) {
256
282
  return new Graph(metadata);
@@ -4,12 +4,15 @@ const noflo = require('noflo');
4
4
  exports.getComponent = () => {
5
5
  const c = new noflo.Component();
6
6
  c.description = 'Simple controller that says hello, user';
7
- c.inPorts.add('in',
8
- { datatype: 'object' });
9
- c.outPorts.add('out',
10
- { datatype: 'object' });
11
- c.outPorts.add('data',
12
- { datatype: 'object' });
7
+ c.inPorts.add('in', {
8
+ datatype: 'object',
9
+ });
10
+ c.outPorts.add('out', {
11
+ datatype: 'object',
12
+ });
13
+ c.outPorts.add('data', {
14
+ datatype: 'object',
15
+ });
13
16
  c.process((input, output) => {
14
17
  if (!input.hasData('in')) { return; }
15
18
  const request = input.getData('in');
@@ -13,7 +13,7 @@
13
13
  #
14
14
  # In the end the output will be provided through the ENTITIZE.OUT port.
15
15
  #
16
- # This network uses Apache Tika for parsing the spreadsheet into
16
+ # This network uses Apache Tika for parsing the spreadsheet into
17
17
  # XHTML. Ensure that Tika can be found in the location set below:
18
18
  'tika-app-0.9.jar' -> TIKA Read(ReadDocument)
19
19
 
@@ -21,7 +21,7 @@
21
21
  Read() ERROR -> IN Display(Output)
22
22
 
23
23
  # Parse the file to JSON, get all spreadsheets from it
24
- Read() OUT -> IN Parse(ParseXml)
24
+ Read() OUT -> IN Parse(ParseXml)
25
25
 
26
26
  # We're only interested in DIVs inside the BODY
27
27
  'body' -> KEY GetBody(GetObjectKey)
@@ -39,7 +39,7 @@ GetDiv() OUT -> IN GetSheet(GetObjectKey) OUT -> IN GroupByTableId()
39
39
  'table' -> KEY GetTable(GetObjectKey)
40
40
  'tbody' -> KEY GetTBody(GetObjectKey)
41
41
  'tr' -> KEY GetTR(GetObjectKey)
42
- GroupByTableId() OUT -> IN GetTable() OUT -> IN GetTBody() OUT -> IN GetTR()
42
+ GroupByTableId() OUT -> IN GetTable() OUT -> IN GetTBody() OUT -> IN GetTR()
43
43
 
44
44
  # Process each row individually and get the cells
45
45
  'td' -> KEY GetTD(GetObjectKey)
@@ -32,12 +32,12 @@
32
32
  * @returns {NetworkAsPromise}
33
33
  */
34
34
  export function asPromise(component: Graph | string, options: {
35
- name: string;
36
- loader: ComponentLoader;
37
- baseDir: string;
38
- flowtrace: any;
39
- networkCallback: NetworkCallback;
40
- raw: boolean;
35
+ name?: string;
36
+ loader?: ComponentLoader;
37
+ baseDir?: string;
38
+ flowtrace?: any;
39
+ networkCallback?: NetworkCallback;
40
+ raw?: boolean;
41
41
  }): NetworkAsPromise;
42
42
  /**
43
43
  * @param {AsCallbackComponent} component - Graph or component to load
@@ -45,7 +45,7 @@ export function asPromise(component: Graph | string, options: {
45
45
  * @returns {NetworkAsCallback}
46
46
  */
47
47
  export function asCallback(component: AsCallbackComponent, options: AsCallbackOptions): NetworkAsCallback;
48
- export type AsCallbackComponent = string | Graph;
48
+ export type AsCallbackComponent = Graph | string;
49
49
  export type AsCallbackOptions = {
50
50
  /**
51
51
  * - Name for the wrapped network
@@ -71,11 +71,24 @@ export type AsCallbackOptions = {
71
71
  * - Whether the callback should operate on raw noflo.IP objects
72
72
  */
73
73
  raw?: boolean;
74
+ /**
75
+ * - Make Information Packet delivery asynchronous
76
+ */
77
+ asyncDelivery?: boolean;
74
78
  };
79
+ export type OutputMap = Array<{
80
+ [x: string]: IP;
81
+ }>;
82
+ export type InputMap = {
83
+ [x: string]: Array<IP | any>;
84
+ } | Array<{
85
+ [x: string]: IP | any;
86
+ }>;
75
87
  export type ResultCallback = (err: Error | null, output?: any) => void;
76
88
  export type NetworkAsCallback = (input: any, callback: ResultCallback) => any;
77
89
  export type NetworkAsPromise = (input: any) => Promise<any>;
78
90
  export type NetworkCallback = (network: Network) => any;
79
91
  import { Graph } from "fbp-graph";
80
- import { ComponentLoader } from "./ComponentLoader";
81
- import { Network } from "./Network";
92
+ import { ComponentLoader } from "./ComponentLoader.js";
93
+ import IP from "./IP.js";
94
+ import { Network } from "./Network.js";