@toa.io/extensions.realtime 1.0.0-alpha.26 → 1.0.0-alpha.263
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.
- package/CHANGELOG.md +46 -0
- package/components/{streams → realtime.streams}/manifest.toa.yaml +12 -1
- package/components/{streams → realtime.streams}/operations/create.d.ts +6 -2
- package/components/realtime.streams/operations/create.js +66 -0
- package/components/realtime.streams/operations/create.js.map +1 -0
- package/components/realtime.streams/operations/lib/Stash.d.ts +21 -0
- package/components/realtime.streams/operations/lib/Stash.js +76 -0
- package/components/realtime.streams/operations/lib/Stash.js.map +1 -0
- package/components/realtime.streams/operations/lib/Stream.d.ts +11 -0
- package/components/realtime.streams/operations/lib/Stream.js +34 -0
- package/components/realtime.streams/operations/lib/Stream.js.map +1 -0
- package/components/realtime.streams/operations/lib/index.d.ts +2 -0
- package/components/realtime.streams/operations/lib/index.js +8 -0
- package/components/realtime.streams/operations/lib/index.js.map +1 -0
- package/components/realtime.streams/operations/lib/types.d.ts +22 -0
- package/components/realtime.streams/operations/lib/types.js.map +1 -0
- package/components/{streams → realtime.streams}/operations/push.d.ts +1 -1
- package/components/realtime.streams/operations/push.js +14 -0
- package/components/realtime.streams/operations/push.js.map +1 -0
- package/components/realtime.streams/operations/tsconfig.tsbuildinfo +1 -0
- package/components/realtime.streams/source/create.ts +94 -0
- package/components/realtime.streams/source/lib/Stash.ts +112 -0
- package/components/realtime.streams/source/lib/Stream.ts +40 -0
- package/components/realtime.streams/source/lib/index.ts +2 -0
- package/components/realtime.streams/source/lib/types.ts +24 -0
- package/components/realtime.streams/source/push.ts +12 -0
- package/{components/context.toa.yaml → context.toa.yaml} +0 -1
- package/cucumber.js +1 -1
- package/features/static.feature +120 -0
- package/features/steps/Components.ts +6 -9
- package/features/steps/Realtime.ts +5 -9
- package/features/steps/Streams.ts +44 -9
- package/features/steps/components/messages/manifest.toa.yaml +2 -0
- package/features/steps/config.ts +4 -0
- package/package.json +7 -3
- package/readme.md +33 -7
- package/source/Composition.ts +18 -7
- package/source/Factory.ts +1 -1
- package/source/Realtime.ts +34 -9
- package/source/Receiver.ts +86 -0
- package/source/Routes.ts +10 -32
- package/source/extension.ts +82 -0
- package/source/index.ts +1 -0
- package/transpiled/Composition.d.ts +7 -1
- package/transpiled/Composition.js +12 -5
- package/transpiled/Composition.js.map +1 -1
- package/transpiled/Factory.js +1 -1
- package/transpiled/Factory.js.map +1 -1
- package/transpiled/Realtime.d.ts +1 -0
- package/transpiled/Realtime.js +30 -4
- package/transpiled/Realtime.js.map +1 -1
- package/transpiled/Receiver.d.ts +26 -0
- package/transpiled/Receiver.js +59 -0
- package/transpiled/Receiver.js.map +1 -0
- package/transpiled/Routes.d.ts +3 -7
- package/transpiled/Routes.js +6 -18
- package/transpiled/Routes.js.map +1 -1
- package/transpiled/extension.d.ts +19 -0
- package/transpiled/extension.js +54 -0
- package/transpiled/extension.js.map +1 -0
- package/transpiled/index.d.ts +1 -0
- package/transpiled/index.js +15 -0
- package/transpiled/index.js.map +1 -1
- package/transpiled/tsconfig.tsbuildinfo +1 -1
- package/components/streams/operations/create.js +0 -29
- package/components/streams/operations/create.js.map +0 -1
- package/components/streams/operations/lib/stream.d.ts +0 -10
- package/components/streams/operations/lib/stream.js +0 -31
- package/components/streams/operations/lib/stream.js.map +0 -1
- package/components/streams/operations/push.js +0 -8
- package/components/streams/operations/push.js.map +0 -1
- package/components/streams/operations/tsconfig.tsbuildinfo +0 -1
- package/components/streams/operations/types.d.ts +0 -11
- package/components/streams/operations/types.js.map +0 -1
- package/components/streams/source/create.ts +0 -38
- package/components/streams/source/lib/stream.ts +0 -37
- package/components/streams/source/push.ts +0 -5
- package/components/streams/source/types.ts +0 -13
- package/stage/streams.test.ts +0 -128
- /package/components/{streams/operations → realtime.streams/operations/lib}/types.js +0 -0
- /package/components/{streams → realtime.streams}/tsconfig.json +0 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { encode } from '@toa.io/generic'
|
|
2
|
+
import { components } from './Composition'
|
|
3
|
+
import type { Dependency, Instances, Resources, Service } from '@toa.io/operations'
|
|
4
|
+
|
|
5
|
+
export const standalone = true
|
|
6
|
+
export { components } from './Composition'
|
|
7
|
+
|
|
8
|
+
export function deployment (instances: Instances<Declaration>, annotation?: Declaration & Annotation): Dependency {
|
|
9
|
+
const routes = []
|
|
10
|
+
const { resources, ...annotatedRoutes } = annotation ?? {}
|
|
11
|
+
const labels = components().labels
|
|
12
|
+
|
|
13
|
+
if (annotatedRoutes !== undefined)
|
|
14
|
+
routes.push(...parse(annotatedRoutes))
|
|
15
|
+
|
|
16
|
+
for (const instance of instances) {
|
|
17
|
+
const completed: Declaration = {}
|
|
18
|
+
|
|
19
|
+
for (const [key, value] of Object.entries(instance.manifest)) {
|
|
20
|
+
const event = instance.locator.id + '.' + key
|
|
21
|
+
|
|
22
|
+
completed[event] = value
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
routes.push(...parse(completed))
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const service: Service = {
|
|
29
|
+
group: 'realtime',
|
|
30
|
+
name: 'streams',
|
|
31
|
+
|
|
32
|
+
version: require('../package.json').version,
|
|
33
|
+
components: labels,
|
|
34
|
+
resources,
|
|
35
|
+
variables: [{
|
|
36
|
+
name: 'TOA_REALTIME',
|
|
37
|
+
value: encode(routes)
|
|
38
|
+
}]
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return { services: [service] }
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function parse (declaration: Declaration): Route[] {
|
|
45
|
+
const routes: Route[] = []
|
|
46
|
+
|
|
47
|
+
for (const [event, value] of Object.entries(declaration))
|
|
48
|
+
if (isObject(value)) {
|
|
49
|
+
const properties = Array.isArray(value.key) ? value.key : [value.key]
|
|
50
|
+
|
|
51
|
+
routes.push({ event, properties, expose: value.expose })
|
|
52
|
+
} else {
|
|
53
|
+
const properties = Array.isArray(value) ? value : [value]
|
|
54
|
+
|
|
55
|
+
routes.push({ event, properties })
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return routes
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function isObject (value: Entry): value is RouteDeclaration {
|
|
62
|
+
return typeof value === 'object' && !Array.isArray(value)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export type Entry = string | string[] | RouteDeclaration
|
|
66
|
+
|
|
67
|
+
export type Declaration = Record<string, Entry>
|
|
68
|
+
|
|
69
|
+
export interface RouteDeclaration {
|
|
70
|
+
key: string | string[]
|
|
71
|
+
expose?: string[]
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface Route {
|
|
75
|
+
event: string
|
|
76
|
+
properties: string[]
|
|
77
|
+
expose?: string[]
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
interface Annotation {
|
|
81
|
+
resources?: Resources
|
|
82
|
+
}
|
package/source/index.ts
CHANGED
|
@@ -4,5 +4,11 @@ export declare class Composition extends Connector {
|
|
|
4
4
|
private readonly boot;
|
|
5
5
|
constructor(boot: Bootloader);
|
|
6
6
|
protected open(): Promise<void>;
|
|
7
|
-
protected dispose(): void;
|
|
8
7
|
}
|
|
8
|
+
export declare function find(): string[];
|
|
9
|
+
export declare function components(): Components;
|
|
10
|
+
interface Components {
|
|
11
|
+
labels: string[];
|
|
12
|
+
paths: string[];
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Composition = void 0;
|
|
3
|
+
exports.components = exports.find = exports.Composition = void 0;
|
|
4
4
|
const node_fs_1 = require("node:fs");
|
|
5
5
|
const node_path_1 = require("node:path");
|
|
6
6
|
const core_1 = require("@toa.io/core");
|
|
@@ -15,19 +15,26 @@ class Composition extends core_1.Connector {
|
|
|
15
15
|
const composition = await this.boot.composition(paths);
|
|
16
16
|
await composition.connect();
|
|
17
17
|
this.depends(composition);
|
|
18
|
-
console.info('Composition complete.');
|
|
19
|
-
}
|
|
20
|
-
dispose() {
|
|
21
|
-
console.info('Composition shutdown complete.');
|
|
22
18
|
}
|
|
23
19
|
}
|
|
24
20
|
exports.Composition = Composition;
|
|
25
21
|
function find() {
|
|
26
22
|
return entries().map((entry) => (0, node_path_1.resolve)(ROOT, entry.name));
|
|
27
23
|
}
|
|
24
|
+
exports.find = find;
|
|
28
25
|
function entries() {
|
|
29
26
|
const entries = (0, node_fs_1.readdirSync)(ROOT, { withFileTypes: true });
|
|
30
27
|
return entries.filter((entry) => entry.isDirectory());
|
|
31
28
|
}
|
|
29
|
+
function components() {
|
|
30
|
+
const labels = [];
|
|
31
|
+
const paths = [];
|
|
32
|
+
for (const entry of entries()) {
|
|
33
|
+
labels.push(entry.name.replace('.', '-'));
|
|
34
|
+
paths.push((0, node_path_1.resolve)(ROOT, entry.name));
|
|
35
|
+
}
|
|
36
|
+
return { labels, paths };
|
|
37
|
+
}
|
|
38
|
+
exports.components = components;
|
|
32
39
|
const ROOT = (0, node_path_1.resolve)(__dirname, '../components/');
|
|
33
40
|
//# sourceMappingURL=Composition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Composition.js","sourceRoot":"","sources":["../source/Composition.ts"],"names":[],"mappings":";;;AAAA,qCAAkD;AAClD,yCAAmC;AACnC,uCAAwC;AAGxC,MAAa,WAAY,SAAQ,gBAAS;IACvB,IAAI,CAAY;IAEjC,YAAoB,IAAgB;QAClC,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAEkB,KAAK,CAAC,IAAI;QAC3B,MAAM,KAAK,GAAG,IAAI,EAAE,CAAA;QACpB,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;QAEtD,MAAM,WAAW,CAAC,OAAO,EAAE,CAAA;QAE3B,IAAI,CAAC,OA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C,CAAA;QACzC,KAAK,CAAC,IAAI,CAAC,IAAA,mBAAO,EAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;IACvC,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAA;AAC1B,CAAC;AAVD,gCAUC;AAOD,MAAM,IAAI,GAAG,IAAA,mBAAO,EAAC,SAAS,EAAE,gBAAgB,CAAC,CAAA"}
|
package/transpiled/Factory.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Factory.js","sourceRoot":"","sources":["../source/Factory.ts"],"names":[],"mappings":";;;AAAA,uCAAuE;AACvE,yCAAqC;AACrC,+CAA2C;AAC3C,qCAAiC;AAEjC,MAAa,OAAO;IACD,IAAI,CAAY;IAEjC,YAAoB,IAAgB;QAClC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAEM,OAAO;QACZ,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE,CAAA;QAClC,MAAM,MAAM,GAAG,IAAI,eAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACpC,MAAM,WAAW,GAAG,IAAI,yBAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC9C,MAAM,QAAQ,GAAG,IAAI,mBAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;QAEhD,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;QACxB,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;QAE7B,OAAO,QAAQ,CAAA;IACjB,CAAC;IAEO,KAAK,CAAC,SAAS;QACrB,MAAM,OAAO,GAAG,IAAI,cAAO,CAAC,SAAS,EAAE,UAAU,CAAC,CAAA;QAElD,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"Factory.js","sourceRoot":"","sources":["../source/Factory.ts"],"names":[],"mappings":";;;AAAA,uCAAuE;AACvE,yCAAqC;AACrC,+CAA2C;AAC3C,qCAAiC;AAEjC,MAAa,OAAO;IACD,IAAI,CAAY;IAEjC,YAAoB,IAAgB;QAClC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAEM,OAAO;QACZ,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE,CAAA;QAClC,MAAM,MAAM,GAAG,IAAI,eAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACpC,MAAM,WAAW,GAAG,IAAI,yBAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC9C,MAAM,QAAQ,GAAG,IAAI,mBAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;QAEhD,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;QACxB,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;QAE7B,OAAO,QAAQ,CAAA;IACjB,CAAC;IAEO,KAAK,CAAC,SAAS;QACrB,MAAM,OAAO,GAAG,IAAI,cAAO,CAAC,SAAS,EAAE,UAAU,CAAC,CAAA;QAElD,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAA;IACjE,CAAC;CACF;AAxBD,0BAwBC"}
|
package/transpiled/Realtime.d.ts
CHANGED
package/transpiled/Realtime.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Realtime = void 0;
|
|
4
|
+
const openspan_1 = require("openspan");
|
|
4
5
|
const core_1 = require("@toa.io/core");
|
|
5
6
|
class Realtime extends core_1.Connector {
|
|
6
7
|
discovery;
|
|
@@ -14,13 +15,38 @@ class Realtime extends core_1.Connector {
|
|
|
14
15
|
this.streams = await this.discovery;
|
|
15
16
|
this.depends(this.streams);
|
|
16
17
|
await this.streams.connect();
|
|
17
|
-
console.
|
|
18
|
+
openspan_1.console.info('Realtime service started');
|
|
18
19
|
}
|
|
19
20
|
dispose() {
|
|
20
|
-
console.
|
|
21
|
+
openspan_1.console.info('Realtime service shutdown complete');
|
|
21
22
|
}
|
|
22
|
-
push(event) {
|
|
23
|
-
|
|
23
|
+
push({ telemetry, ...event }) {
|
|
24
|
+
const processing = telemetry === null
|
|
25
|
+
? this.deliver(event)
|
|
26
|
+
: (0, openspan_1.run)(telemetry, async () => await this.deliver(event));
|
|
27
|
+
void processing.catch((error) => openspan_1.console.error('Realtime push failed', error));
|
|
28
|
+
}
|
|
29
|
+
async deliver(event) {
|
|
30
|
+
/*
|
|
31
|
+
* The delivery span is created on behalf of the messaging destination
|
|
32
|
+
* (same as the core Receiver), so that service graphs display the fan-out:
|
|
33
|
+
* producer -> destination -> realtime
|
|
34
|
+
*/
|
|
35
|
+
const delivery = {
|
|
36
|
+
name: `${event.event} deliver`,
|
|
37
|
+
kind: 'producer',
|
|
38
|
+
service: event.event,
|
|
39
|
+
attributes: { 'messaging.destination.name': event.event }
|
|
40
|
+
};
|
|
41
|
+
const options = {
|
|
42
|
+
name: `${event.event} push`,
|
|
43
|
+
kind: 'consumer',
|
|
44
|
+
service: 'realtime',
|
|
45
|
+
attributes: { 'messaging.destination.name': event.event }
|
|
46
|
+
};
|
|
47
|
+
await openspan_1.console.span(delivery, async () => await openspan_1.console.span(options, async () => {
|
|
48
|
+
await this.streams?.invoke('push', { input: event });
|
|
49
|
+
}));
|
|
24
50
|
}
|
|
25
51
|
}
|
|
26
52
|
exports.Realtime = Realtime;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Realtime.js","sourceRoot":"","sources":["../source/Realtime.ts"],"names":[],"mappings":";;;AAAA,uCAAwD;
|
|
1
|
+
{"version":3,"file":"Realtime.js","sourceRoot":"","sources":["../source/Realtime.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,uCAAwD;AAIxD,MAAa,Q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KAAK,CAAC,KAAK;YACpB,UAAU,EAAE,EAAE,4BAA4B,EAAE,KAAK,CAAC,KAAK,EAAE;SAC1D,CAAA;QAED,MAAM,OAAO,GAAG;YACd,IAAI,EAAE,GAAG,KAAK,CAAC,KAAK,OAAO;YAC3B,IAAI,EAAE,UAAmB;YACzB,OAAO,EAAE,UAAU;YACnB,UAAU,EAAE,EAAE,4BAA4B,EAAE,KAAK,CAAC,KAAK,EAAE;SAC1D,CAAA;QAED,MAAM,kBAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE,CAAC,MAAM,kBAAO,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;YAC9E,MAAM,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAA;QACtD,CAAC,CAAC,CAAC,CAAA;IACL,CAAC;CACF;AAzDD,4BAyDC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Connector, type Message } from '@toa.io/core';
|
|
3
|
+
import type { SpanContext } from 'openspan';
|
|
4
|
+
import type { Readable } from 'node:stream';
|
|
5
|
+
export declare class Receiver extends Connector {
|
|
6
|
+
private readonly event;
|
|
7
|
+
private readonly properties;
|
|
8
|
+
private readonly expose?;
|
|
9
|
+
private readonly stream;
|
|
10
|
+
constructor({ event, properties, stream, expose }: {
|
|
11
|
+
event: string;
|
|
12
|
+
properties: string[];
|
|
13
|
+
stream: Readable;
|
|
14
|
+
expose?: string[];
|
|
15
|
+
});
|
|
16
|
+
receive(message: Message<Record<string, string>>): void;
|
|
17
|
+
private process;
|
|
18
|
+
private fit;
|
|
19
|
+
private push;
|
|
20
|
+
}
|
|
21
|
+
export interface Push {
|
|
22
|
+
key: string;
|
|
23
|
+
event: string;
|
|
24
|
+
data: Record<string, string>;
|
|
25
|
+
telemetry: SpanContext | null;
|
|
26
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Receiver = void 0;
|
|
4
|
+
const openspan_1 = require("openspan");
|
|
5
|
+
const core_1 = require("@toa.io/core");
|
|
6
|
+
class Receiver extends core_1.Connector {
|
|
7
|
+
event;
|
|
8
|
+
properties;
|
|
9
|
+
expose;
|
|
10
|
+
stream;
|
|
11
|
+
constructor({ event, properties, stream, expose }) {
|
|
12
|
+
super();
|
|
13
|
+
this.event = event;
|
|
14
|
+
this.properties = properties;
|
|
15
|
+
this.expose = expose;
|
|
16
|
+
this.stream = stream;
|
|
17
|
+
}
|
|
18
|
+
receive(message) {
|
|
19
|
+
// the push continues the trace from the producer
|
|
20
|
+
const telemetry = message.telemetry === undefined ? null : (0, openspan_1.decode)(message.telemetry);
|
|
21
|
+
if (telemetry === null)
|
|
22
|
+
this.process(message, telemetry);
|
|
23
|
+
else
|
|
24
|
+
(0, openspan_1.run)(telemetry, () => this.process(message, telemetry));
|
|
25
|
+
}
|
|
26
|
+
process(message, telemetry) {
|
|
27
|
+
const data = this.fit(message.payload);
|
|
28
|
+
for (const property of this.properties) {
|
|
29
|
+
const key = message.payload[property];
|
|
30
|
+
if (key === undefined) {
|
|
31
|
+
openspan_1.console.debug('Event does not contain key property', { property, event: this.event });
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
if (Array.isArray(key))
|
|
35
|
+
// eslint-disable-next-line max-depth
|
|
36
|
+
for (const k of key)
|
|
37
|
+
this.push(k, data, telemetry);
|
|
38
|
+
else
|
|
39
|
+
this.push(key, data, telemetry);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
fit(payload) {
|
|
43
|
+
if (this.expose === undefined)
|
|
44
|
+
return payload;
|
|
45
|
+
const entries = Object.entries(payload)
|
|
46
|
+
.filter(([key]) => this.expose.includes(key));
|
|
47
|
+
return Object.fromEntries(entries);
|
|
48
|
+
}
|
|
49
|
+
push(key, data, telemetry) {
|
|
50
|
+
if (key === null || typeof key === 'undefined') {
|
|
51
|
+
openspan_1.console.debug('Key is null or undefined, skipping', { key, event: this.event });
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
openspan_1.console.debug('Pushing event to stream', { key, event: this.event, data });
|
|
55
|
+
this.stream.push({ key, event: this.event, data, telemetry });
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.Receiver = Receiver;
|
|
59
|
+
//# sourceMappingURL=Receiver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Receiver.js","sourceRoot":"","sources":["../source/Receiver.ts"],"names":[],"mappings":";;;AAAA,uCAA+C;AAC/C,uCAAsD;AAItD,MAAa,QAAS,SAAQ,gBAAS;IACpB,KAAK,CAAQ;IACb,UAAU,CAAU;IACpB,MAAM,CAAW;IACjB,MAAM,CAAU;IAEjC,YAAoB,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAKtD;QACC,KAAK,EAAE,CAAA;QAEP,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAClB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEM,OAAO,CAAE,OAAwC;QACtD,iDAAiD;QACjD,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAA,iBAAM,EAAC,OAAO,CAAC,SAAS,CAAC,CAAA;QAEpF,IAAI,SAAS,KAAK,IAAI;YACpB,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;;YAEhC,IAAA,cAAG,EAAC,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAA;IAC1D,CA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,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAA;YAE/E,OAAM;QACR,CAAC;QAED,kBAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;QAE1E,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,SAAS,EAAiB,CAAC,CAAA;IAC9E,CAAC;CACF;AAzED,4BAyEC"}
|
package/transpiled/Routes.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Readable } from 'node:stream';
|
|
3
3
|
import { Connector } from '@toa.io/core';
|
|
4
|
-
import {
|
|
4
|
+
import type { Route } from './extension';
|
|
5
|
+
import type { Bootloader } from './Factory';
|
|
5
6
|
export declare class Routes extends Connector {
|
|
6
7
|
events: Events;
|
|
7
8
|
private readonly boot;
|
|
@@ -9,14 +10,9 @@ export declare class Routes extends Connector {
|
|
|
9
10
|
private static read;
|
|
10
11
|
open(): Promise<void>;
|
|
11
12
|
close(): Promise<void>;
|
|
12
|
-
private getReceiver;
|
|
13
13
|
}
|
|
14
14
|
declare class Events extends Readable {
|
|
15
15
|
constructor();
|
|
16
16
|
_read(): void;
|
|
17
17
|
}
|
|
18
|
-
export
|
|
19
|
-
event: string;
|
|
20
|
-
properties: string[];
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
18
|
+
export type { Route };
|
package/transpiled/Routes.js
CHANGED
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Routes = void 0;
|
|
4
4
|
const node_stream_1 = require("node:stream");
|
|
5
|
+
const openspan_1 = require("openspan");
|
|
5
6
|
const core_1 = require("@toa.io/core");
|
|
6
7
|
const generic_1 = require("@toa.io/generic");
|
|
8
|
+
const Receiver_1 = require("./Receiver");
|
|
7
9
|
class Routes extends core_1.Connector {
|
|
8
10
|
events = new Events();
|
|
9
11
|
boot;
|
|
@@ -19,8 +21,8 @@ class Routes extends core_1.Connector {
|
|
|
19
21
|
async open() {
|
|
20
22
|
const routes = Routes.read();
|
|
21
23
|
const creating = [];
|
|
22
|
-
for (const { event, properties } of routes) {
|
|
23
|
-
const consumer = this.boot.receive(event,
|
|
24
|
+
for (const { event, properties, expose } of routes) {
|
|
25
|
+
const consumer = this.boot.receive(event, new Receiver_1.Receiver({ event, properties, stream: this.events, expose }));
|
|
24
26
|
creating.push(consumer);
|
|
25
27
|
}
|
|
26
28
|
const consumers = await Promise.all(creating);
|
|
@@ -28,24 +30,10 @@ class Routes extends core_1.Connector {
|
|
|
28
30
|
const connecting = consumers.map((consumer) => consumer.connect());
|
|
29
31
|
await Promise.all(connecting);
|
|
30
32
|
this.depends(consumers);
|
|
31
|
-
console.
|
|
33
|
+
openspan_1.console.info('Event sources connected', { count: creating.length });
|
|
32
34
|
}
|
|
33
35
|
async close() {
|
|
34
|
-
console.
|
|
35
|
-
}
|
|
36
|
-
getReceiver(event, properties) {
|
|
37
|
-
return {
|
|
38
|
-
receive: (message) => {
|
|
39
|
-
for (const property of properties) {
|
|
40
|
-
const key = message.payload[property];
|
|
41
|
-
if (key === undefined) {
|
|
42
|
-
console.error(`Event '${event}' does not contain the '${property}' property.`);
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
this.events.push({ key, event, data: message.payload });
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
};
|
|
36
|
+
openspan_1.console.info('Event sources disconnected');
|
|
49
37
|
}
|
|
50
38
|
}
|
|
51
39
|
exports.Routes = Routes;
|
package/transpiled/Routes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Routes.js","sourceRoot":"","sources":["../source/Routes.ts"],"names":[],"mappings":";;;AAAA,6CAAsC;AACtC,
|
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O,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;QAC7B,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;QAEvB,kBAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;IACrE,CAAC;IAEe,KAAK,CAAC,KAAK;QACzB,kBAAO,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAA;IAC5C,CAAC;CACF;AA1CD,wBA0CC;AAED,MAAM,MAAO,SAAQ,sBAAQ;IAC3B;QACE,KAAK,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAA;IAC7B,CAAC;IAEe,KAAK;IACrB,CAAC;CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Dependency, Instances, Resources } from '@toa.io/operations';
|
|
2
|
+
export declare const standalone = true;
|
|
3
|
+
export { components } from './Composition';
|
|
4
|
+
export declare function deployment(instances: Instances<Declaration>, annotation?: Declaration & Annotation): Dependency;
|
|
5
|
+
export declare function parse(declaration: Declaration): Route[];
|
|
6
|
+
export type Entry = string | string[] | RouteDeclaration;
|
|
7
|
+
export type Declaration = Record<string, Entry>;
|
|
8
|
+
export interface RouteDeclaration {
|
|
9
|
+
key: string | string[];
|
|
10
|
+
expose?: string[];
|
|
11
|
+
}
|
|
12
|
+
export interface Route {
|
|
13
|
+
event: string;
|
|
14
|
+
properties: string[];
|
|
15
|
+
expose?: string[];
|
|
16
|
+
}
|
|
17
|
+
interface Annotation {
|
|
18
|
+
resources?: Resources;
|
|
19
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parse = exports.deployment = exports.components = exports.standalone = void 0;
|
|
4
|
+
const generic_1 = require("@toa.io/generic");
|
|
5
|
+
const Composition_1 = require("./Composition");
|
|
6
|
+
exports.standalone = true;
|
|
7
|
+
var Composition_2 = require("./Composition");
|
|
8
|
+
Object.defineProperty(exports, "components", { enumerable: true, get: function () { return Composition_2.components; } });
|
|
9
|
+
function deployment(instances, annotation) {
|
|
10
|
+
const routes = [];
|
|
11
|
+
const { resources, ...annotatedRoutes } = annotation ?? {};
|
|
12
|
+
const labels = (0, Composition_1.components)().labels;
|
|
13
|
+
if (annotatedRoutes !== undefined)
|
|
14
|
+
routes.push(...parse(annotatedRoutes));
|
|
15
|
+
for (const instance of instances) {
|
|
16
|
+
const completed = {};
|
|
17
|
+
for (const [key, value] of Object.entries(instance.manifest)) {
|
|
18
|
+
const event = instance.locator.id + '.' + key;
|
|
19
|
+
completed[event] = value;
|
|
20
|
+
}
|
|
21
|
+
routes.push(...parse(completed));
|
|
22
|
+
}
|
|
23
|
+
const service = {
|
|
24
|
+
group: 'realtime',
|
|
25
|
+
name: 'streams',
|
|
26
|
+
version: require('../package.json').version,
|
|
27
|
+
components: labels,
|
|
28
|
+
resources,
|
|
29
|
+
variables: [{
|
|
30
|
+
name: 'TOA_REALTIME',
|
|
31
|
+
value: (0, generic_1.encode)(routes)
|
|
32
|
+
}]
|
|
33
|
+
};
|
|
34
|
+
return { services: [service] };
|
|
35
|
+
}
|
|
36
|
+
exports.deployment = deployment;
|
|
37
|
+
function parse(declaration) {
|
|
38
|
+
const routes = [];
|
|
39
|
+
for (const [event, value] of Object.entries(declaration))
|
|
40
|
+
if (isObject(value)) {
|
|
41
|
+
const properties = Array.isArray(value.key) ? value.key : [value.key];
|
|
42
|
+
routes.push({ event, properties, expose: value.expose });
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
const properties = Array.isArray(value) ? value : [value];
|
|
46
|
+
routes.push({ event, properties });
|
|
47
|
+
}
|
|
48
|
+
return routes;
|
|
49
|
+
}
|
|
50
|
+
exports.parse = parse;
|
|
51
|
+
function isObject(value) {
|
|
52
|
+
return typeof value === 'object' && !Array.isArray(value);
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=extension.js.map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;aACtB,CAAC;KACH,CAAA;IAED,OAAO,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAA;AAChC,CAAC;AAlCD,gCAkCC;AAED,SAAgB,KAAK,CAAE,WAAwB;IAC7C,MAAM,MAAM,GAAY,EAAE,CAAA;IAE1B,KAAK,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC;QACtD,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACpB,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;YAErE,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAA;QAC1D,CAAC;aAAM,CAAC;YACN,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;YAEzD,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAA;QACpC,CAAC;IAEH,OAAO,MAAM,CAAA;AACf,CAAC;AAfD,sBAeC;AAED,SAAS,QAAQ,CAAE,KAAY;IAC7B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AAC3D,CAAC"}
|
package/transpiled/index.d.ts
CHANGED
package/transpiled/index.js
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
17
|
exports.Factory = void 0;
|
|
4
18
|
var Factory_1 = require("./Factory");
|
|
5
19
|
Object.defineProperty(exports, "Factory", { enumerable: true, get: function () { return Factory_1.Factory; } });
|
|
20
|
+
__exportStar(require("./extension"), exports);
|
|
6
21
|
//# sourceMappingURL=index.js.map
|
package/transpiled/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qCAAmC;AAA1B,kGAAA,OAAO,OAAA;AAChB,8CAA2B"}
|