@aloma.io/integration-sdk 3.0.6 → 3.0.7-rc2
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/build/builder/runtime-context.mjs +1 -1
- package/build/cli.mjs +1 -1
- package/build/internal/dispatcher/{index.cjs → index.mjs} +1 -3
- package/build/internal/{index.d.cts → index.d.mts} +1 -1
- package/build/internal/{index.cjs → index.mjs} +7 -9
- package/build/internal/util/jwe/{cli.cjs → cli.mjs} +2 -3
- package/build/internal/util/jwe/{index.d.cts → index.d.mts} +1 -1
- package/build/internal/util/jwe/{index.cjs → index.mjs} +1 -3
- package/build/internal/websocket/{config.d.cts → config.d.mts} +2 -3
- package/build/internal/websocket/{config.cjs → config.mjs} +3 -5
- package/build/internal/websocket/connection/{constants.cjs → constants.mjs} +1 -2
- package/build/internal/websocket/connection/{index.cjs → index.mjs} +1 -2
- package/build/internal/websocket/connection/{registration.cjs → registration.mjs} +1 -2
- package/build/internal/websocket/{index.d.cts → index.d.mts} +2 -2
- package/build/internal/websocket/{index.cjs → index.mjs} +3 -5
- package/build/internal/websocket/transport/{durable.cjs → durable.mjs} +1 -3
- package/build/internal/websocket/transport/{index.d.cts → index.d.mts} +2 -2
- package/build/internal/websocket/transport/{index.cjs → index.mjs} +4 -6
- package/build/internal/websocket/transport/{packet.cjs → packet.mjs} +1 -3
- package/build/internal/websocket/transport/{processor.cjs → processor.mjs} +2 -4
- package/package.json +2 -2
- package/src/builder/runtime-context.mts +1 -1
- package/src/cli.mts +1 -1
- package/src/internal/dispatcher/{index.cjs → index.mjs} +1 -1
- package/src/internal/{index.cjs → index.mjs} +7 -7
- package/src/internal/util/jwe/{cli.cjs → cli.mjs} +1 -1
- package/src/internal/util/jwe/{index.cjs → index.mjs} +1 -1
- package/src/internal/websocket/{config.cjs → config.mjs} +3 -3
- package/src/internal/websocket/{index.cjs → index.mjs} +3 -3
- package/src/internal/websocket/transport/{durable.cjs → durable.mjs} +1 -1
- package/src/internal/websocket/transport/{index.cjs → index.mjs} +4 -4
- package/src/internal/websocket/transport/{packet.cjs → packet.mjs} +1 -1
- package/src/internal/websocket/transport/{processor.cjs → processor.mjs} +2 -2
- /package/build/internal/dispatcher/{index.d.cts → index.d.mts} +0 -0
- /package/build/internal/util/jwe/{cli.d.cts → cli.d.mts} +0 -0
- /package/build/internal/websocket/connection/{constants.d.cts → constants.d.mts} +0 -0
- /package/build/internal/websocket/connection/{index.d.cts → index.d.mts} +0 -0
- /package/build/internal/websocket/connection/{registration.d.cts → registration.d.mts} +0 -0
- /package/build/internal/websocket/transport/{durable.d.cts → durable.d.mts} +0 -0
- /package/build/internal/websocket/transport/{packet.d.cts → packet.d.mts} +0 -0
- /package/build/internal/websocket/transport/{processor.d.cts → processor.d.mts} +0 -0
- /package/src/internal/websocket/connection/{constants.cjs → constants.mjs} +0 -0
- /package/src/internal/websocket/connection/{index.cjs → index.mjs} +0 -0
- /package/src/internal/websocket/connection/{registration.cjs → registration.mjs} +0 -0
package/build/cli.mjs
CHANGED
@@ -3,7 +3,7 @@ import { Command } from "commander";
|
|
3
3
|
import fs from "node:fs";
|
4
4
|
import { fileURLToPath } from "node:url";
|
5
5
|
import path from "node:path";
|
6
|
-
import JWE from './internal/util/jwe/index.
|
6
|
+
import JWE from './internal/util/jwe/index.mjs';
|
7
7
|
import util from 'node:util';
|
8
8
|
import ChildProcess from 'node:child_process';
|
9
9
|
const exec = util.promisify(ChildProcess.exec);
|
@@ -1,5 +1,3 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
1
|
class Dispatcher {
|
4
2
|
constructor() {
|
5
3
|
this._config = { fields: {} };
|
@@ -158,4 +156,4 @@ class Dispatcher {
|
|
158
156
|
};
|
159
157
|
}
|
160
158
|
}
|
161
|
-
|
159
|
+
export { Dispatcher };
|
@@ -1,14 +1,12 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
1
|
// @ts-nocheck
|
4
2
|
require("dotenv").config();
|
5
3
|
const fs = require("fs");
|
6
|
-
const { Config } = require("./websocket/config.
|
7
|
-
const { Connection } = require("./websocket/connection/index.
|
8
|
-
const { Transport } = require("./websocket/transport/index.
|
9
|
-
const { Dispatcher } = require("./dispatcher/index.
|
10
|
-
const { WebsocketConnector } = require("./websocket/index.
|
11
|
-
const JWE = require("./util/jwe/index.
|
4
|
+
const { Config } = require("./websocket/config.mjs");
|
5
|
+
const { Connection } = require("./websocket/connection/index.mjs");
|
6
|
+
const { Transport } = require("./websocket/transport/index.mjs");
|
7
|
+
const { Dispatcher } = require("./dispatcher/index.mjs");
|
8
|
+
const { WebsocketConnector } = require("./websocket/index.mjs");
|
9
|
+
const JWE = require("./util/jwe/index.mjs");
|
12
10
|
const fetch = require("node-fetch");
|
13
11
|
const cuid = require("@paralleldrive/cuid2").init({ length: 32 });
|
14
12
|
// TODO fetch with retry
|
@@ -473,4 +471,4 @@ ${text}
|
|
473
471
|
await server.start();
|
474
472
|
}
|
475
473
|
}
|
476
|
-
|
474
|
+
export { Connector };
|
@@ -1,6 +1,4 @@
|
|
1
|
-
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const JWE = require("./index");
|
1
|
+
const JWE = require("./index.mjs");
|
4
2
|
const main = async () => {
|
5
3
|
const jwe = new JWE({});
|
6
4
|
await jwe.newPair();
|
@@ -11,3 +9,4 @@ const main = async () => {
|
|
11
9
|
};
|
12
10
|
setTimeout(() => null, 100);
|
13
11
|
main();
|
12
|
+
export {};
|
@@ -1,5 +1,3 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
1
|
const jose = require("jose");
|
4
2
|
class JWE {
|
5
3
|
constructor({ algorithm = "PS256" }) {
|
@@ -54,4 +52,4 @@ class JWE {
|
|
54
52
|
return payload._data;
|
55
53
|
}
|
56
54
|
}
|
57
|
-
|
55
|
+
export default JWE;
|
@@ -21,10 +21,10 @@ export class Config {
|
|
21
21
|
_data: {};
|
22
22
|
_privateKey: any;
|
23
23
|
_publicKey: any;
|
24
|
-
_jwe:
|
24
|
+
_jwe: any;
|
25
25
|
_introspect: any;
|
26
26
|
_configSchema: any;
|
27
|
-
validateKeys(algorithm: any): Promise<
|
27
|
+
validateKeys(algorithm: any): Promise<any>;
|
28
28
|
data(what: any): {};
|
29
29
|
introspect(): any;
|
30
30
|
configSchema(): any;
|
@@ -38,4 +38,3 @@ export class Config {
|
|
38
38
|
token(): any;
|
39
39
|
setToken(what: any): void;
|
40
40
|
}
|
41
|
-
import JWE = require("../util/jwe/index.cjs");
|
@@ -1,7 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
const C = require("./connection/constants.cjs");
|
4
|
-
const JWE = require("../util/jwe/index.cjs");
|
1
|
+
const C = require("./connection/constants.mjs");
|
2
|
+
const JWE = require("../util/jwe/index.mjs");
|
5
3
|
class Config {
|
6
4
|
constructor({ registrationToken, version, name, id, endpoint, wsEndpoint, privateKey, publicKey, introspect, configSchema, }) {
|
7
5
|
this._token = null;
|
@@ -76,4 +74,4 @@ class Config {
|
|
76
74
|
this._token = what;
|
77
75
|
}
|
78
76
|
}
|
79
|
-
|
77
|
+
export { Config };
|
@@ -1,5 +1,3 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
1
|
const fetch = require("node-fetch");
|
4
2
|
const { Registration } = require("./registration.cjs");
|
5
3
|
const C = require("./constants.cjs");
|
@@ -51,3 +49,4 @@ class Connection {
|
|
51
49
|
}
|
52
50
|
}
|
53
51
|
module.exports = { Connection };
|
52
|
+
export {};
|
@@ -1,5 +1,3 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
1
|
const fetch = require("node-fetch");
|
4
2
|
const C = require("./constants.cjs");
|
5
3
|
class Registration {
|
@@ -29,3 +27,4 @@ class Registration {
|
|
29
27
|
}
|
30
28
|
}
|
31
29
|
module.exports = { Registration };
|
30
|
+
export {};
|
@@ -12,5 +12,5 @@ export class WebsocketConnector {
|
|
12
12
|
close(): Promise<void>;
|
13
13
|
leaving(): Promise<void>;
|
14
14
|
}
|
15
|
-
import { Transport } from "./transport/index.
|
16
|
-
import { Connection } from "./connection/index.
|
15
|
+
import { Transport } from "./transport/index.mjs";
|
16
|
+
import { Connection } from "./connection/index.mjs";
|
@@ -1,8 +1,6 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
1
|
const WebSocket = require("ws");
|
4
|
-
const { Connection } = require("./connection/index.
|
5
|
-
const { Transport } = require("./transport/index.
|
2
|
+
const { Connection } = require("./connection/index.mjs");
|
3
|
+
const { Transport } = require("./transport/index.mjs");
|
6
4
|
class WebsocketConnector {
|
7
5
|
constructor({ config, onMessage, onConnect }) {
|
8
6
|
var local = this;
|
@@ -38,4 +36,4 @@ class WebsocketConnector {
|
|
38
36
|
await local.connection.close();
|
39
37
|
}
|
40
38
|
}
|
41
|
-
|
39
|
+
export { WebsocketConnector };
|
@@ -1,5 +1,3 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
1
|
const WebSocket = require("ws");
|
4
2
|
class DurableWebsocket {
|
5
3
|
constructor({ endpoint, secret, onConnect, onMessage }) {
|
@@ -58,4 +56,4 @@ class DurableWebsocket {
|
|
58
56
|
await this.ws?.close();
|
59
57
|
}
|
60
58
|
}
|
61
|
-
|
59
|
+
export { DurableWebsocket };
|
@@ -33,5 +33,5 @@ export class Transport {
|
|
33
33
|
close(): void;
|
34
34
|
connected: boolean | undefined;
|
35
35
|
}
|
36
|
-
import { DurableWebsocket } from "./durable.
|
37
|
-
import { Packet } from "./packet.
|
36
|
+
import { DurableWebsocket } from "./durable.mjs";
|
37
|
+
import { Packet } from "./packet.mjs";
|
@@ -1,11 +1,9 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
1
|
const fetch = require("node-fetch");
|
4
|
-
const C = require("../connection/constants.
|
2
|
+
const C = require("../connection/constants.mjs");
|
5
3
|
const cuid = require("@paralleldrive/cuid2").init({ length: 32 });
|
6
|
-
const { DurableWebsocket } = require("./durable.
|
4
|
+
const { DurableWebsocket } = require("./durable.mjs");
|
7
5
|
const WebSocket = require("ws");
|
8
|
-
const { Packet, Callback } = require("./packet.
|
6
|
+
const { Packet, Callback } = require("./packet.mjs");
|
9
7
|
const cleanInterval = 45 * 1000;
|
10
8
|
const pingInterval = 30 * 1000;
|
11
9
|
class Transport {
|
@@ -145,4 +143,4 @@ class Transport {
|
|
145
143
|
}
|
146
144
|
}
|
147
145
|
}
|
148
|
-
|
146
|
+
export { Transport };
|
@@ -1,5 +1,3 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
1
|
const fetch = require("node-fetch");
|
4
2
|
const cuid = require("@paralleldrive/cuid2").init({ length: 32 });
|
5
3
|
class Packet {
|
@@ -41,4 +39,4 @@ class Callback {
|
|
41
39
|
this.created = Date.now();
|
42
40
|
}
|
43
41
|
}
|
44
|
-
|
42
|
+
export { Callback, Packet };
|
@@ -1,6 +1,4 @@
|
|
1
|
-
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const { Packet, Callback } = require("./packet.cjs");
|
1
|
+
const { Packet, Callback } = require("./packet.mjs");
|
4
2
|
class Processor {
|
5
3
|
constructor({ transport, processPacket }) {
|
6
4
|
var local = this;
|
@@ -55,4 +53,4 @@ class Processor {
|
|
55
53
|
}
|
56
54
|
}
|
57
55
|
}
|
58
|
-
|
56
|
+
export { Processor };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aloma.io/integration-sdk",
|
3
|
-
"version": "3.0.
|
3
|
+
"version": "3.0.7-rc2",
|
4
4
|
"description": "",
|
5
5
|
"author": "aloma.io",
|
6
6
|
"license": "Apache-2.0",
|
@@ -31,7 +31,7 @@
|
|
31
31
|
"dotenv": "*",
|
32
32
|
"express": "^4",
|
33
33
|
"jose": "^4",
|
34
|
-
"node-fetch": "^
|
34
|
+
"node-fetch": "^3",
|
35
35
|
"prom-client": "^14",
|
36
36
|
"ws": "^8"
|
37
37
|
},
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { AbstractController } from "../controller/index.mjs";
|
2
|
-
import { Connector } from "../internal/index.
|
2
|
+
import { Connector } from "../internal/index.mjs";
|
3
3
|
|
4
4
|
export default class RuntimeContext {
|
5
5
|
constructor(private controller: AbstractController, private data: any) {}
|
package/src/cli.mts
CHANGED
@@ -4,7 +4,7 @@ import { Command } from "commander";
|
|
4
4
|
import fs from "node:fs";
|
5
5
|
import { fileURLToPath } from "node:url";
|
6
6
|
import path from "node:path";
|
7
|
-
import JWE from './internal/util/jwe/index.
|
7
|
+
import JWE from './internal/util/jwe/index.mjs'
|
8
8
|
import util from 'node:util';
|
9
9
|
import ChildProcess from 'node:child_process';
|
10
10
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
// @ts-nocheck
|
2
2
|
require("dotenv").config();
|
3
3
|
const fs = require("fs");
|
4
|
-
const { Config } = require("./websocket/config.
|
5
|
-
const { Connection } = require("./websocket/connection/index.
|
6
|
-
const { Transport } = require("./websocket/transport/index.
|
7
|
-
const { Dispatcher } = require("./dispatcher/index.
|
8
|
-
const { WebsocketConnector } = require("./websocket/index.
|
9
|
-
const JWE = require("./util/jwe/index.
|
4
|
+
const { Config } = require("./websocket/config.mjs");
|
5
|
+
const { Connection } = require("./websocket/connection/index.mjs");
|
6
|
+
const { Transport } = require("./websocket/transport/index.mjs");
|
7
|
+
const { Dispatcher } = require("./dispatcher/index.mjs");
|
8
|
+
const { WebsocketConnector } = require("./websocket/index.mjs");
|
9
|
+
const JWE = require("./util/jwe/index.mjs");
|
10
10
|
const fetch = require("node-fetch");
|
11
11
|
const cuid = require("@paralleldrive/cuid2").init({ length: 32 });
|
12
12
|
|
@@ -585,4 +585,4 @@ ${text}
|
|
585
585
|
}
|
586
586
|
}
|
587
587
|
|
588
|
-
|
588
|
+
export {Connector};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
const C = require("./connection/constants.
|
2
|
-
const JWE = require("../util/jwe/index.
|
1
|
+
const C = require("./connection/constants.mjs");
|
2
|
+
const JWE = require("../util/jwe/index.mjs");
|
3
3
|
|
4
4
|
class Config {
|
5
5
|
constructor({
|
@@ -104,4 +104,4 @@ class Config {
|
|
104
104
|
}
|
105
105
|
}
|
106
106
|
|
107
|
-
|
107
|
+
export { Config };
|
@@ -1,6 +1,6 @@
|
|
1
1
|
const WebSocket = require("ws");
|
2
|
-
const { Connection } = require("./connection/index.
|
3
|
-
const { Transport } = require("./transport/index.
|
2
|
+
const { Connection } = require("./connection/index.mjs");
|
3
|
+
const { Transport } = require("./transport/index.mjs");
|
4
4
|
|
5
5
|
class WebsocketConnector {
|
6
6
|
constructor({ config, onMessage, onConnect }) {
|
@@ -43,4 +43,4 @@ class WebsocketConnector {
|
|
43
43
|
}
|
44
44
|
}
|
45
45
|
|
46
|
-
|
46
|
+
export { WebsocketConnector };
|
@@ -1,9 +1,9 @@
|
|
1
1
|
const fetch = require("node-fetch");
|
2
|
-
const C = require("../connection/constants.
|
2
|
+
const C = require("../connection/constants.mjs");
|
3
3
|
const cuid = require("@paralleldrive/cuid2").init({ length: 32 });
|
4
|
-
const { DurableWebsocket } = require("./durable.
|
4
|
+
const { DurableWebsocket } = require("./durable.mjs");
|
5
5
|
const WebSocket = require("ws");
|
6
|
-
const { Packet, Callback } = require("./packet.
|
6
|
+
const { Packet, Callback } = require("./packet.mjs");
|
7
7
|
|
8
8
|
const cleanInterval = 45 * 1000;
|
9
9
|
const pingInterval = 30 * 1000;
|
@@ -184,4 +184,4 @@ class Transport {
|
|
184
184
|
}
|
185
185
|
}
|
186
186
|
|
187
|
-
|
187
|
+
export { Transport };
|
@@ -1,4 +1,4 @@
|
|
1
|
-
const { Packet, Callback } = require("./packet.
|
1
|
+
const { Packet, Callback } = require("./packet.mjs");
|
2
2
|
|
3
3
|
class Processor {
|
4
4
|
constructor({ transport, processPacket }) {
|
@@ -66,4 +66,4 @@ class Processor {
|
|
66
66
|
}
|
67
67
|
}
|
68
68
|
|
69
|
-
|
69
|
+
export { Processor };
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|