@privateaim/messenger-kit 0.7.22 → 0.7.24

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 CHANGED
@@ -1,5 +1,80 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.7.24](https://github.com/PrivateAIM/hub/compare/v0.7.23...v0.7.24) (2026-02-02)
4
+
5
+
6
+ ### Features
7
+
8
+ * initial server-telmetry package with http api & db ([31dbfdc](https://github.com/PrivateAIM/hub/commit/31dbfdcd7c5a0d833aa5021c44da00fb8685e55e))
9
+ * migrate to esm & replace jest with vitest ([#1368](https://github.com/PrivateAIM/hub/issues/1368)) ([5a4d9d1](https://github.com/PrivateAIM/hub/commit/5a4d9d1ce118f65740aa49caf948208eac299032))
10
+ * validate client-to-server messaging message ([a37cbc4](https://github.com/PrivateAIM/hub/commit/a37cbc4582ac66190aa4aad9a78aca58d34526f4))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **deps:** bump the minorandpatch group across 1 directory with 10 updates ([#1204](https://github.com/PrivateAIM/hub/issues/1204)) ([72923d8](https://github.com/PrivateAIM/hub/commit/72923d81911880e176907e893c62241fe7f849f3))
16
+ * **deps:** bump the minorandpatch group across 1 directory with 11 updates ([#1114](https://github.com/PrivateAIM/hub/issues/1114)) ([1b644a8](https://github.com/PrivateAIM/hub/commit/1b644a8df5200356bc91c624379917c8dd409fdc))
17
+ * **deps:** bump the minorandpatch group across 1 directory with 11 updates ([#1162](https://github.com/PrivateAIM/hub/issues/1162)) ([2aa8123](https://github.com/PrivateAIM/hub/commit/2aa8123394aafdd3dbc1eb5284a2bdc5fcc659a9))
18
+ * **deps:** bump the minorandpatch group across 1 directory with 12 updates ([#1343](https://github.com/PrivateAIM/hub/issues/1343)) ([015daa8](https://github.com/PrivateAIM/hub/commit/015daa8d7403b906eeb175d7ab83dd9df665dc6a))
19
+ * **deps:** bump the minorandpatch group across 1 directory with 13 updates ([#1246](https://github.com/PrivateAIM/hub/issues/1246)) ([bc898f9](https://github.com/PrivateAIM/hub/commit/bc898f9e40b52d6a93b815f9a07fb517219d051f))
20
+ * **deps:** bump the minorandpatch group across 1 directory with 16 updates ([#1194](https://github.com/PrivateAIM/hub/issues/1194)) ([46336b8](https://github.com/PrivateAIM/hub/commit/46336b8d8f320705bf216bab81ed61d940ff2895))
21
+ * **deps:** bump the minorandpatch group across 1 directory with 16 updates ([#1329](https://github.com/PrivateAIM/hub/issues/1329)) ([7b394da](https://github.com/PrivateAIM/hub/commit/7b394da159d8e52cc37fe489832307a234f3ddb0))
22
+ * **deps:** bump the minorandpatch group across 1 directory with 19 updates ([#1392](https://github.com/PrivateAIM/hub/issues/1392)) ([23060bf](https://github.com/PrivateAIM/hub/commit/23060bfce24100d17d4d83c7ee45ed6d85073c6b))
23
+ * **deps:** bump the minorandpatch group across 1 directory with 20 updates ([#1231](https://github.com/PrivateAIM/hub/issues/1231)) ([dddccd3](https://github.com/PrivateAIM/hub/commit/dddccd358e8caa9512bd8945dd8f1efc7155b20e))
24
+ * **deps:** bump the minorandpatch group across 1 directory with 24 updates ([#1084](https://github.com/PrivateAIM/hub/issues/1084)) ([92a3f43](https://github.com/PrivateAIM/hub/commit/92a3f43eb47795a7fff756939a036f2e771bd3cd))
25
+ * **deps:** bump the minorandpatch group across 1 directory with 4 updates ([#1036](https://github.com/PrivateAIM/hub/issues/1036)) ([e52ea50](https://github.com/PrivateAIM/hub/commit/e52ea50288486db487ce0c5f4d2cd0b027c18861))
26
+ * **deps:** bump the minorandpatch group across 1 directory with 5 updates ([#1149](https://github.com/PrivateAIM/hub/issues/1149)) ([6ad2f9a](https://github.com/PrivateAIM/hub/commit/6ad2f9aa8f9a9e93e3624ec8d6bf2517c122822a))
27
+ * **deps:** bump the minorandpatch group across 1 directory with 5 updates ([#1167](https://github.com/PrivateAIM/hub/issues/1167)) ([9f12a16](https://github.com/PrivateAIM/hub/commit/9f12a16ccb268989579e0a6464c3e9c189bf042f))
28
+ * **deps:** bump the minorandpatch group across 1 directory with 6 updates ([#1173](https://github.com/PrivateAIM/hub/issues/1173)) ([47fa968](https://github.com/PrivateAIM/hub/commit/47fa968c35135638d3c55a6e58cd94ca8a0079b9))
29
+ * **deps:** bump the minorandpatch group across 1 directory with 8 updates ([#1091](https://github.com/PrivateAIM/hub/issues/1091)) ([5da2ab0](https://github.com/PrivateAIM/hub/commit/5da2ab0af1133b1c8408317486fb6394cdb2452e))
30
+ * **deps:** bump the minorandpatch group across 1 directory with 9 updates ([#1331](https://github.com/PrivateAIM/hub/issues/1331)) ([2802bc3](https://github.com/PrivateAIM/hub/commit/2802bc319b84453f8bb351ba1723d9a58bba9830))
31
+
32
+
33
+ ### Dependencies
34
+
35
+ * The following workspace dependencies were updated
36
+ * devDependencies
37
+ * @privateaim/core-kit bumped from ^0.8.22 to ^0.8.23
38
+ * peerDependencies
39
+ * @privateaim/core-kit bumped from ^0.8.22 to ^0.8.23
40
+
41
+ ## [0.7.23](https://github.com/PrivateAIM/hub/compare/v0.7.22...v0.7.23) (2026-01-27)
42
+
43
+
44
+ ### Features
45
+
46
+ * initial server-telmetry package with http api & db ([31dbfdc](https://github.com/PrivateAIM/hub/commit/31dbfdcd7c5a0d833aa5021c44da00fb8685e55e))
47
+ * migrate to esm & replace jest with vitest ([#1368](https://github.com/PrivateAIM/hub/issues/1368)) ([5a4d9d1](https://github.com/PrivateAIM/hub/commit/5a4d9d1ce118f65740aa49caf948208eac299032))
48
+ * validate client-to-server messaging message ([a37cbc4](https://github.com/PrivateAIM/hub/commit/a37cbc4582ac66190aa4aad9a78aca58d34526f4))
49
+
50
+
51
+ ### Bug Fixes
52
+
53
+ * **deps:** bump the minorandpatch group across 1 directory with 10 updates ([#1204](https://github.com/PrivateAIM/hub/issues/1204)) ([72923d8](https://github.com/PrivateAIM/hub/commit/72923d81911880e176907e893c62241fe7f849f3))
54
+ * **deps:** bump the minorandpatch group across 1 directory with 11 updates ([#1114](https://github.com/PrivateAIM/hub/issues/1114)) ([1b644a8](https://github.com/PrivateAIM/hub/commit/1b644a8df5200356bc91c624379917c8dd409fdc))
55
+ * **deps:** bump the minorandpatch group across 1 directory with 11 updates ([#1162](https://github.com/PrivateAIM/hub/issues/1162)) ([2aa8123](https://github.com/PrivateAIM/hub/commit/2aa8123394aafdd3dbc1eb5284a2bdc5fcc659a9))
56
+ * **deps:** bump the minorandpatch group across 1 directory with 12 updates ([#1343](https://github.com/PrivateAIM/hub/issues/1343)) ([015daa8](https://github.com/PrivateAIM/hub/commit/015daa8d7403b906eeb175d7ab83dd9df665dc6a))
57
+ * **deps:** bump the minorandpatch group across 1 directory with 13 updates ([#1246](https://github.com/PrivateAIM/hub/issues/1246)) ([bc898f9](https://github.com/PrivateAIM/hub/commit/bc898f9e40b52d6a93b815f9a07fb517219d051f))
58
+ * **deps:** bump the minorandpatch group across 1 directory with 16 updates ([#1194](https://github.com/PrivateAIM/hub/issues/1194)) ([46336b8](https://github.com/PrivateAIM/hub/commit/46336b8d8f320705bf216bab81ed61d940ff2895))
59
+ * **deps:** bump the minorandpatch group across 1 directory with 16 updates ([#1329](https://github.com/PrivateAIM/hub/issues/1329)) ([7b394da](https://github.com/PrivateAIM/hub/commit/7b394da159d8e52cc37fe489832307a234f3ddb0))
60
+ * **deps:** bump the minorandpatch group across 1 directory with 20 updates ([#1231](https://github.com/PrivateAIM/hub/issues/1231)) ([dddccd3](https://github.com/PrivateAIM/hub/commit/dddccd358e8caa9512bd8945dd8f1efc7155b20e))
61
+ * **deps:** bump the minorandpatch group across 1 directory with 24 updates ([#1084](https://github.com/PrivateAIM/hub/issues/1084)) ([92a3f43](https://github.com/PrivateAIM/hub/commit/92a3f43eb47795a7fff756939a036f2e771bd3cd))
62
+ * **deps:** bump the minorandpatch group across 1 directory with 4 updates ([#1036](https://github.com/PrivateAIM/hub/issues/1036)) ([e52ea50](https://github.com/PrivateAIM/hub/commit/e52ea50288486db487ce0c5f4d2cd0b027c18861))
63
+ * **deps:** bump the minorandpatch group across 1 directory with 5 updates ([#1149](https://github.com/PrivateAIM/hub/issues/1149)) ([6ad2f9a](https://github.com/PrivateAIM/hub/commit/6ad2f9aa8f9a9e93e3624ec8d6bf2517c122822a))
64
+ * **deps:** bump the minorandpatch group across 1 directory with 5 updates ([#1167](https://github.com/PrivateAIM/hub/issues/1167)) ([9f12a16](https://github.com/PrivateAIM/hub/commit/9f12a16ccb268989579e0a6464c3e9c189bf042f))
65
+ * **deps:** bump the minorandpatch group across 1 directory with 6 updates ([#1173](https://github.com/PrivateAIM/hub/issues/1173)) ([47fa968](https://github.com/PrivateAIM/hub/commit/47fa968c35135638d3c55a6e58cd94ca8a0079b9))
66
+ * **deps:** bump the minorandpatch group across 1 directory with 8 updates ([#1091](https://github.com/PrivateAIM/hub/issues/1091)) ([5da2ab0](https://github.com/PrivateAIM/hub/commit/5da2ab0af1133b1c8408317486fb6394cdb2452e))
67
+ * **deps:** bump the minorandpatch group across 1 directory with 9 updates ([#1331](https://github.com/PrivateAIM/hub/issues/1331)) ([2802bc3](https://github.com/PrivateAIM/hub/commit/2802bc319b84453f8bb351ba1723d9a58bba9830))
68
+
69
+
70
+ ### Dependencies
71
+
72
+ * The following workspace dependencies were updated
73
+ * devDependencies
74
+ * @privateaim/core-kit bumped from ^0.8.21 to ^0.8.22
75
+ * peerDependencies
76
+ * @privateaim/core-kit bumped from ^0.8.21 to ^0.8.22
77
+
3
78
  ## [0.7.22](https://github.com/PrivateAIM/hub/compare/v0.7.21...v0.7.22) (2025-11-04)
4
79
 
5
80
 
package/dist/index.mjs CHANGED
@@ -50,54 +50,20 @@ class CTSMessagingPartyValidator extends Container {
50
50
  }
51
51
  }
52
52
 
53
- /*
54
- * Copyright (c) 2025.
55
- * Author Peter Placzek (tada5hi)
56
- * For the full copyright and license information,
57
- * view the LICENSE file that was distributed with this source code.
58
- */ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
59
- try {
60
- var info = gen[key](arg);
61
- var value = info.value;
62
- } catch (error) {
63
- reject(error);
64
- return;
65
- }
66
- if (info.done) {
67
- resolve(value);
68
- } else {
69
- Promise.resolve(value).then(_next, _throw);
70
- }
71
- }
72
- function _async_to_generator(fn) {
73
- return function() {
74
- var self = this, args = arguments;
75
- return new Promise(function(resolve, reject) {
76
- var gen = fn.apply(self, args);
77
- function _next(value) {
78
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
79
- }
80
- function _throw(err) {
81
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
82
- }
83
- _next(undefined);
84
- });
85
- };
86
- }
87
53
  class CTSMessagingMessageValidator extends Container {
88
54
  initialize() {
89
55
  super.initialize();
90
56
  this.mount('data', createValidator(z.object({}).passthrough().or(z.string()).or(z.null()).or(z.undefined()).optional()));
91
57
  this.mount('metadata', createValidator(z.object({}).passthrough().or(z.null()).or(z.undefined()).optional()));
92
58
  const partyValidator = new CTSMessagingPartyValidator();
93
- this.mount('to', (ctx)=>_async_to_generator(function*() {
94
- const validator = createValidator(z.array(z.object({}).passthrough()));
95
- const output = yield validator(ctx);
96
- return Promise.all(output.map((el)=>partyValidator.run(el, {
97
- path: ctx.pathAbsolute,
98
- group: ctx.group
99
- })));
100
- })());
59
+ this.mount('to', async (ctx)=>{
60
+ const validator = createValidator(z.array(z.object({}).passthrough()));
61
+ const output = await validator(ctx);
62
+ return Promise.all(output.map((el)=>partyValidator.run(el, {
63
+ path: ctx.pathAbsolute,
64
+ group: ctx.group
65
+ })));
66
+ });
101
67
  }
102
68
  }
103
69
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../src/connection/constants.ts","../src/messaging/constants.ts","../src/messaging/validators/to.ts","../src/messaging/validators/message.ts","../src/utils.ts"],"sourcesContent":["/*\n * Copyright (c) 2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nexport enum STCConnectionEventName {\n USER_CONNECTED = 'userConnected',\n USER_DISCONNECTED = 'userDisconnected',\n\n ROBOT_CONNECTED = 'robotConnected',\n ROBOT_DISCONNECTED = 'robotDisconnected',\n}\n\nexport enum CTSConnectionEventName {\n USER_CONNECTIONS = 'userConnections',\n USER_CONNECTION_SUBSCRIBE = 'userConnectionSubscribe',\n USER_CONNECTION_UNSUBSCRIBE = 'userConnectionUnsubscribe',\n\n ROBOT_CONNECTIONS = 'robotConnections',\n ROBOT_CONNECTION_SUBSCRIBE = 'robotConnectionSubscribe',\n ROBOT_CONNECTION_UNSUBSCRIBE = 'robotConnectionUnsubscribe',\n}\n","/*\n * Copyright (c) 2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nexport enum STCMessagingEventName {\n SEND = 'send',\n}\n\nexport enum CTSMessagingEventName {\n SEND = 'send',\n}\n","/*\n * Copyright (c) 2025.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { z } from 'zod';\nimport { createValidator } from '@validup/adapter-zod';\nimport { Container } from 'validup';\nimport type { CTSMessagingParty } from '../types';\n\nexport class CTSMessagingPartyValidator extends Container<CTSMessagingParty> {\n protected initialize() {\n super.initialize();\n\n this.mount(\n 'id',\n createValidator(\n z.string().uuid(),\n ),\n );\n\n this.mount(\n 'type',\n createValidator(\n z.enum(['user', 'robot', 'client']),\n ),\n );\n }\n}\n","/*\n * Copyright (c) 2025.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { z } from 'zod';\nimport { createValidator } from '@validup/adapter-zod';\nimport { Container } from 'validup';\nimport type { CTSMessagingMessage } from '../types';\nimport { CTSMessagingPartyValidator } from './to';\n\nexport class CTSMessagingMessageValidator extends Container<CTSMessagingMessage> {\n protected initialize() {\n super.initialize();\n\n this.mount(\n 'data',\n createValidator(\n z.object({})\n .passthrough()\n .or(z.string())\n .or(z.null())\n .or(z.undefined())\n .optional(),\n ),\n );\n\n this.mount(\n 'metadata',\n createValidator(\n z.object({}).passthrough()\n .or(z.null())\n .or(z.undefined())\n .optional(),\n ),\n );\n\n const partyValidator = new CTSMessagingPartyValidator();\n\n this.mount('to', async (ctx) => {\n const validator = createValidator(\n z.array(z.object({}).passthrough()),\n );\n\n const output = (await validator(ctx)) as unknown[];\n return Promise.all(output.map((el) => partyValidator.run(el, {\n path: ctx.pathAbsolute,\n group: ctx.group,\n })));\n });\n }\n}\n","/*\n * Copyright (c) 2021-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type { EventCallback } from './types';\n\nexport function isEventCallback(\n input: unknown,\n fnArgs?: number,\n) : input is EventCallback {\n if (typeof fnArgs === 'undefined') {\n return typeof input === 'function';\n }\n\n return typeof input === 'function' &&\n input.length >= fnArgs;\n}\n\nexport function isEventTarget(\n input: unknown,\n) : input is EventTarget {\n return typeof input === 'number' ||\n typeof input === 'string' ||\n typeof input === 'undefined';\n}\n"],"names":["STCConnectionEventName","CTSConnectionEventName","STCMessagingEventName","CTSMessagingEventName","CTSMessagingPartyValidator","Container","initialize","mount","createValidator","z","string","uuid","enum","CTSMessagingMessageValidator","object","passthrough","or","null","undefined","optional","partyValidator","ctx","validator","array","output","Promise","all","map","el","run","path","pathAbsolute","group","isEventCallback","input","fnArgs","length","isEventTarget"],"mappings":";;;;AAAA;;;;;IAOO,IAAKA,sBAAAA,iBAAAA,SAAAA,sBAAAA,EAAAA;;;;;AAAAA,IAAAA,OAAAA,sBAAAA;AAMX,CAAA,CAAA,EAAA;AAEM,IAAA,sBAAKC,iBAAAA,SAAAA,sBAAAA,EAAAA;;;;;;;AAAAA,IAAAA,OAAAA,sBAAAA;AAQX,CAAA,CAAA,EAAA;;ACvBD;;;;;IAOO,IAAKC,qBAAAA,iBAAAA,SAAAA,qBAAAA,EAAAA;;AAAAA,IAAAA,OAAAA,qBAAAA;AAEX,CAAA,CAAA,EAAA;AAEM,IAAA,qBAA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,CACdC,QAAQ,EAAA,CAAA,CAAA;AAIrB,QAAA,MAAMC,iBAAiB,IAAIhB,0BAAAA,EAAAA;AAE3B,QAAA,IAAI,CAACG,KAAK,CAAC,IAAA,EAAM,CAAOc,GAAAA,GAAAA,mBAAAA,CAAAA,YAAAA;gBACpB,MAAMC,SAAAA,GAAYd,eAAAA,CACdC,CAAAA,CAAEc,KAAK,CAACd,EAAEK,MAAM,CAAC,EAAC,CAAA,CAAGC,WAAW,EAAA,CAAA,CAAA;gBAGpC,MAAMS,MAAAA,GAAU,MAAMF,SAAAA,CAAUD,GAAAA,CAAAA;gBAChC,OAAOI,OAAAA,CAAQC,GAAG,CAACF,MAAAA,CAAOG,GAAG,CAAC,CAACC,EAAAA,GAAOR,cAAAA,CAAeS,GAAG,CAACD,EAAAA,EAAI;AACzDE,wBAAAA,IAAAA,EAAMT,IAAIU,YAAY;AACtBC,wBAAAA,KAAAA,EAAOX,IAAIW;AACf,qBAAA,CAAA,CAAA,CAAA;AACJ,YAAA,CAAA,CAAA,EAAA,CAAA;AACJ,IAAA;AACJ;;ACrDA;;;;;AAKC,IAIM,SAASC,eAAAA,CACZC,KAAc,EACdC,MAAe,EAAA;IAEf,IAAI,OAAOA,WAAW,WAAA,EAAa;AAC/B,QAAA,OAAO,OAAOD,KAAAA,KAAU,UAAA;AAC5B,IAAA;AAEA,IAAA,OAAO,OAAOA,KAAAA,KAAU,UAAA,IACpBA,KAAAA,CAAME,MAAM,IAAID,MAAAA;AACxB;AAEO,SAASE,cACZH,KAAc,EAAA;AAEd,IAAA,OAAO,OAAOA,KAAAA,KAAU,QAAA,IACpB,OAAOA,KAAAA,KAAU,QAAA,IACjB,OAAOA,KAAAA,KAAU,WAAA;AACzB;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../src/connection/constants.ts","../src/messaging/constants.ts","../src/messaging/validators/to.ts","../src/messaging/validators/message.ts","../src/utils.ts"],"sourcesContent":["/*\n * Copyright (c) 2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nexport enum STCConnectionEventName {\n USER_CONNECTED = 'userConnected',\n USER_DISCONNECTED = 'userDisconnected',\n\n ROBOT_CONNECTED = 'robotConnected',\n ROBOT_DISCONNECTED = 'robotDisconnected',\n}\n\nexport enum CTSConnectionEventName {\n USER_CONNECTIONS = 'userConnections',\n USER_CONNECTION_SUBSCRIBE = 'userConnectionSubscribe',\n USER_CONNECTION_UNSUBSCRIBE = 'userConnectionUnsubscribe',\n\n ROBOT_CONNECTIONS = 'robotConnections',\n ROBOT_CONNECTION_SUBSCRIBE = 'robotConnectionSubscribe',\n ROBOT_CONNECTION_UNSUBSCRIBE = 'robotConnectionUnsubscribe',\n}\n","/*\n * Copyright (c) 2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nexport enum STCMessagingEventName {\n SEND = 'send',\n}\n\nexport enum CTSMessagingEventName {\n SEND = 'send',\n}\n","/*\n * Copyright (c) 2025.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { z } from 'zod';\nimport { createValidator } from '@validup/adapter-zod';\nimport { Container } from 'validup';\nimport type { CTSMessagingParty } from '../types';\n\nexport class CTSMessagingPartyValidator extends Container<CTSMessagingParty> {\n protected initialize() {\n super.initialize();\n\n this.mount(\n 'id',\n createValidator(\n z.string().uuid(),\n ),\n );\n\n this.mount(\n 'type',\n createValidator(\n z.enum(['user', 'robot', 'client']),\n ),\n );\n }\n}\n","/*\n * Copyright (c) 2025.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { z } from 'zod';\nimport { createValidator } from '@validup/adapter-zod';\nimport { Container } from 'validup';\nimport type { CTSMessagingMessage } from '../types';\nimport { CTSMessagingPartyValidator } from './to';\n\nexport class CTSMessagingMessageValidator extends Container<CTSMessagingMessage> {\n protected initialize() {\n super.initialize();\n\n this.mount(\n 'data',\n createValidator(\n z.object({})\n .passthrough()\n .or(z.string())\n .or(z.null())\n .or(z.undefined())\n .optional(),\n ),\n );\n\n this.mount(\n 'metadata',\n createValidator(\n z.object({}).passthrough()\n .or(z.null())\n .or(z.undefined())\n .optional(),\n ),\n );\n\n const partyValidator = new CTSMessagingPartyValidator();\n\n this.mount('to', async (ctx) => {\n const validator = createValidator(\n z.array(z.object({}).passthrough()),\n );\n\n const output = (await validator(ctx)) as unknown[];\n return Promise.all(output.map((el) => partyValidator.run(el, {\n path: ctx.pathAbsolute,\n group: ctx.group,\n })));\n });\n }\n}\n","/*\n * Copyright (c) 2021-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type { EventCallback } from './types';\n\nexport function isEventCallback(\n input: unknown,\n fnArgs?: number,\n) : input is EventCallback {\n if (typeof fnArgs === 'undefined') {\n return typeof input === 'function';\n }\n\n return typeof input === 'function' &&\n input.length >= fnArgs;\n}\n\nexport function isEventTarget(\n input: unknown,\n) : input is EventTarget {\n return typeof input === 'number' ||\n typeof input === 'string' ||\n typeof input === 'undefined';\n}\n"],"names":["STCConnectionEventName","CTSConnectionEventName","STCMessagingEventName","CTSMessagingEventName","CTSMessagingPartyValidator","Container","initialize","mount","createValidator","z","string","uuid","enum","CTSMessagingMessageValidator","object","passthrough","or","null","undefined","optional","partyValidator","ctx","validator","array","output","Promise","all","map","el","run","path","pathAbsolute","group","isEventCallback","input","fnArgs","length","isEventTarget"],"mappings":";;;;AAAA;;;;;IAOO,IAAKA,sBAAAA,iBAAAA,SAAAA,sBAAAA,EAAAA;;;;;AAAAA,IAAAA,OAAAA,sBAAAA;AAMX,CAAA,CAAA,EAAA;AAEM,IAAA,sBAAKC,iBAAAA,SAAAA,sBAAAA,EAAAA;;;;;;;AAAAA,IAAAA,OAAAA,sBAAAA;AAQX,CAAA,CAAA,EAAA;;ACvBD;;;;;I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rB,QAAA,MAAMC,iBAAiB,IAAIhB,0BAAAA,EAAAA;AAE3B,QAAA,IAAI,CAACG,KAAK,CAAC,IAAA,EAAM,OAAOc,GAAAA,GAAAA;YACpB,MAAMC,SAAAA,GAAYd,eAAAA,CACdC,CAAAA,CAAEc,KAAK,CAACd,EAAEK,MAAM,CAAC,EAAC,CAAA,CAAGC,WAAW,EAAA,CAAA,CAAA;YAGpC,MAAMS,MAAAA,GAAU,MAAMF,SAAAA,CAAUD,GAAAA,CAAAA;YAChC,OAAOI,OAAAA,CAAQC,GAAG,CAACF,MAAAA,CAAOG,GAAG,CAAC,CAACC,EAAAA,GAAOR,cAAAA,CAAeS,GAAG,CAACD,EAAAA,EAAI;AACzDE,oBAAAA,IAAAA,EAAMT,IAAIU,YAAY;AACtBC,oBAAAA,KAAAA,EAAOX,IAAIW;AACf,iBAAA,CAAA,CAAA,CAAA;AACJ,QAAA,CAAA,CAAA;AACJ,IAAA;AACJ;;ACrDA;;;;;AAKC,IAIM,SAASC,eAAAA,CACZC,KAAc,EACdC,MAAe,EAAA;IAEf,IAAI,OAAOA,WAAW,WAAA,EAAa;AAC/B,QAAA,OAAO,OAAOD,KAAAA,KAAU,UAAA;AAC5B,IAAA;AAEA,IAAA,OAAO,OAAOA,KAAAA,KAAU,UAAA,IACpBA,KAAAA,CAAME,MAAM,IAAID,MAAAA;AACxB;AAEO,SAASE,cACZH,KAAc,EAAA;AAEd,IAAA,OAAO,OAAOA,KAAAA,KAAU,QAAA,IACpB,OAAOA,KAAAA,KAAU,QAAA,IACjB,OAAOA,KAAAA,KAAU,WAAA;AACzB;;;;"}
package/package.json CHANGED
@@ -1,19 +1,18 @@
1
1
  {
2
2
  "name": "@privateaim/messenger-kit",
3
- "version": "0.7.22",
3
+ "type": "module",
4
+ "version": "0.7.24",
4
5
  "license": "Apache-2.0",
5
6
  "description": "",
7
+ "module": "./dist/index.mjs",
8
+ "types": "./dist/index.d.ts",
6
9
  "exports": {
7
10
  "./package.json": "./package.json",
8
11
  ".": {
9
12
  "types": "./dist/index.d.ts",
10
- "import": "./dist/index.mjs",
11
- "require": "./dist/index.cjs"
13
+ "import": "./dist/index.mjs"
12
14
  }
13
15
  },
14
- "main": "./dist/index.cjs",
15
- "module": "./dist/index.mjs",
16
- "types": "./dist/index.d.ts",
17
16
  "author": {
18
17
  "name": "Peter Placzek",
19
18
  "email": "admin@tada5hi.net",
@@ -24,19 +23,20 @@
24
23
  "build:js": "rollup -c",
25
24
  "build": "rimraf ./dist && cross-env NODE_ENV=production npm run build:js && npm run build:types",
26
25
  "build-watch": "rimraf ./dist && tsc -p tsconfig.build.json --watch",
27
- "test": "cross-env NODE_ENV=test jest --config ./test/jest.config.js",
28
- "test:coverage": "npm run test -- --coverage"
26
+ "test": "cross-env NODE_ENV=test vitest run --config test/vitest.config.ts",
27
+ "test:coverage": "cross-env NODE_ENV=test vitest run --config test/vitest.config.ts --coverage"
29
28
  },
30
29
  "dependencies": {
31
- "@validup/adapter-zod": "^0.1.11",
30
+ "@validup/adapter-zod": "^0.1.12",
32
31
  "validup": "^0.1.9",
33
- "zod": "^4.1.12"
32
+ "zod": "^4.3.6"
34
33
  },
35
34
  "devDependencies": {
36
- "@privateaim/core-kit": "^0.8.21"
35
+ "@privateaim/core-kit": "^0.8.23",
36
+ "vitest": "^4.0.18"
37
37
  },
38
38
  "peerDependencies": {
39
- "@privateaim/core-kit": "^0.8.21"
39
+ "@privateaim/core-kit": "^0.8.23"
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public"
package/rollup.config.mjs CHANGED
@@ -10,10 +10,5 @@ import fs from 'node:fs';
10
10
  import { createConfig } from '../../rollup.config.mjs';
11
11
 
12
12
  export default createConfig({
13
- pkg: JSON.parse(fs.readFileSync(new URL('./package.json', import.meta.url), {encoding: 'utf-8'})),
14
- swc: {
15
- jsc: {
16
- target: 'es2016'
17
- }
18
- }
13
+ pkg: JSON.parse(fs.readFileSync(new URL('./package.json', import.meta.url), { encoding: 'utf-8' })),
19
14
  });
@@ -5,6 +5,7 @@
5
5
  * view the LICENSE file that was distributed with this source code.
6
6
  */
7
7
 
8
+ import { describe, expect, it } from 'vitest';
8
9
  import { buildErrorMessageForAttribute } from 'validup';
9
10
  import type { CTSMessagingMessage } from '../../src';
10
11
  import { CTSMessagingMessageValidator } from '../../src';
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Copyright (c) 2025.
3
+ * Author Peter Placzek (tada5hi)
4
+ * For the full copyright and license information,
5
+ * view the LICENSE file that was distributed with this source code.
6
+ */
7
+
8
+ // eslint-disable-next-line import/no-extraneous-dependencies
9
+ import swc from 'unplugin-swc';
10
+ import { defineConfig } from 'vitest/config';
11
+
12
+ export default defineConfig({
13
+ test: {
14
+ include: ['test/unit/**/*.spec.ts'],
15
+ },
16
+ plugins: [swc.vite()],
17
+ });
package/dist/index.cjs DELETED
@@ -1,129 +0,0 @@
1
- 'use strict';
2
-
3
- var zod = require('zod');
4
- var adapterZod = require('@validup/adapter-zod');
5
- var validup = require('validup');
6
-
7
- /*
8
- * Copyright (c) 2024.
9
- * Author Peter Placzek (tada5hi)
10
- * For the full copyright and license information,
11
- * view the LICENSE file that was distributed with this source code.
12
- */ var STCConnectionEventName = /*#__PURE__*/ function(STCConnectionEventName) {
13
- STCConnectionEventName["USER_CONNECTED"] = "userConnected";
14
- STCConnectionEventName["USER_DISCONNECTED"] = "userDisconnected";
15
- STCConnectionEventName["ROBOT_CONNECTED"] = "robotConnected";
16
- STCConnectionEventName["ROBOT_DISCONNECTED"] = "robotDisconnected";
17
- return STCConnectionEventName;
18
- }({});
19
- var CTSConnectionEventName = /*#__PURE__*/ function(CTSConnectionEventName) {
20
- CTSConnectionEventName["USER_CONNECTIONS"] = "userConnections";
21
- CTSConnectionEventName["USER_CONNECTION_SUBSCRIBE"] = "userConnectionSubscribe";
22
- CTSConnectionEventName["USER_CONNECTION_UNSUBSCRIBE"] = "userConnectionUnsubscribe";
23
- CTSConnectionEventName["ROBOT_CONNECTIONS"] = "robotConnections";
24
- CTSConnectionEventName["ROBOT_CONNECTION_SUBSCRIBE"] = "robotConnectionSubscribe";
25
- CTSConnectionEventName["ROBOT_CONNECTION_UNSUBSCRIBE"] = "robotConnectionUnsubscribe";
26
- return CTSConnectionEventName;
27
- }({});
28
-
29
- /*
30
- * Copyright (c) 2024.
31
- * Author Peter Placzek (tada5hi)
32
- * For the full copyright and license information,
33
- * view the LICENSE file that was distributed with this source code.
34
- */ var STCMessagingEventName = /*#__PURE__*/ function(STCMessagingEventName) {
35
- STCMessagingEventName["SEND"] = "send";
36
- return STCMessagingEventName;
37
- }({});
38
- var CTSMessagingEventName = /*#__PURE__*/ function(CTSMessagingEventName) {
39
- CTSMessagingEventName["SEND"] = "send";
40
- return CTSMessagingEventName;
41
- }({});
42
-
43
- class CTSMessagingPartyValidator extends validup.Container {
44
- initialize() {
45
- super.initialize();
46
- this.mount('id', adapterZod.createValidator(zod.z.string().uuid()));
47
- this.mount('type', adapterZod.createValidator(zod.z.enum([
48
- 'user',
49
- 'robot',
50
- 'client'
51
- ])));
52
- }
53
- }
54
-
55
- /*
56
- * Copyright (c) 2025.
57
- * Author Peter Placzek (tada5hi)
58
- * For the full copyright and license information,
59
- * view the LICENSE file that was distributed with this source code.
60
- */ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
61
- try {
62
- var info = gen[key](arg);
63
- var value = info.value;
64
- } catch (error) {
65
- reject(error);
66
- return;
67
- }
68
- if (info.done) {
69
- resolve(value);
70
- } else {
71
- Promise.resolve(value).then(_next, _throw);
72
- }
73
- }
74
- function _async_to_generator(fn) {
75
- return function() {
76
- var self = this, args = arguments;
77
- return new Promise(function(resolve, reject) {
78
- var gen = fn.apply(self, args);
79
- function _next(value) {
80
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
81
- }
82
- function _throw(err) {
83
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
84
- }
85
- _next(undefined);
86
- });
87
- };
88
- }
89
- class CTSMessagingMessageValidator extends validup.Container {
90
- initialize() {
91
- super.initialize();
92
- this.mount('data', adapterZod.createValidator(zod.z.object({}).passthrough().or(zod.z.string()).or(zod.z.null()).or(zod.z.undefined()).optional()));
93
- this.mount('metadata', adapterZod.createValidator(zod.z.object({}).passthrough().or(zod.z.null()).or(zod.z.undefined()).optional()));
94
- const partyValidator = new CTSMessagingPartyValidator();
95
- this.mount('to', (ctx)=>_async_to_generator(function*() {
96
- const validator = adapterZod.createValidator(zod.z.array(zod.z.object({}).passthrough()));
97
- const output = yield validator(ctx);
98
- return Promise.all(output.map((el)=>partyValidator.run(el, {
99
- path: ctx.pathAbsolute,
100
- group: ctx.group
101
- })));
102
- })());
103
- }
104
- }
105
-
106
- /*
107
- * Copyright (c) 2021-2024.
108
- * Author Peter Placzek (tada5hi)
109
- * For the full copyright and license information,
110
- * view the LICENSE file that was distributed with this source code.
111
- */ function isEventCallback(input, fnArgs) {
112
- if (typeof fnArgs === 'undefined') {
113
- return typeof input === 'function';
114
- }
115
- return typeof input === 'function' && input.length >= fnArgs;
116
- }
117
- function isEventTarget(input) {
118
- return typeof input === 'number' || typeof input === 'string' || typeof input === 'undefined';
119
- }
120
-
121
- exports.CTSConnectionEventName = CTSConnectionEventName;
122
- exports.CTSMessagingEventName = CTSMessagingEventName;
123
- exports.CTSMessagingMessageValidator = CTSMessagingMessageValidator;
124
- exports.CTSMessagingPartyValidator = CTSMessagingPartyValidator;
125
- exports.STCConnectionEventName = STCConnectionEventName;
126
- exports.STCMessagingEventName = STCMessagingEventName;
127
- exports.isEventCallback = isEventCallback;
128
- exports.isEventTarget = isEventTarget;
129
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sources":["../src/connection/constants.ts","../src/messaging/constants.ts","../src/messaging/validators/to.ts","../src/messaging/validators/message.ts","../src/utils.ts"],"sourcesContent":["/*\n * Copyright (c) 2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nexport enum STCConnectionEventName {\n USER_CONNECTED = 'userConnected',\n USER_DISCONNECTED = 'userDisconnected',\n\n ROBOT_CONNECTED = 'robotConnected',\n ROBOT_DISCONNECTED = 'robotDisconnected',\n}\n\nexport enum CTSConnectionEventName {\n USER_CONNECTIONS = 'userConnections',\n USER_CONNECTION_SUBSCRIBE = 'userConnectionSubscribe',\n USER_CONNECTION_UNSUBSCRIBE = 'userConnectionUnsubscribe',\n\n ROBOT_CONNECTIONS = 'robotConnections',\n ROBOT_CONNECTION_SUBSCRIBE = 'robotConnectionSubscribe',\n ROBOT_CONNECTION_UNSUBSCRIBE = 'robotConnectionUnsubscribe',\n}\n","/*\n * Copyright (c) 2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nexport enum STCMessagingEventName {\n SEND = 'send',\n}\n\nexport enum CTSMessagingEventName {\n SEND = 'send',\n}\n","/*\n * Copyright (c) 2025.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { z } from 'zod';\nimport { createValidator } from '@validup/adapter-zod';\nimport { Container } from 'validup';\nimport type { CTSMessagingParty } from '../types';\n\nexport class CTSMessagingPartyValidator extends Container<CTSMessagingParty> {\n protected initialize() {\n super.initialize();\n\n this.mount(\n 'id',\n createValidator(\n z.string().uuid(),\n ),\n );\n\n this.mount(\n 'type',\n createValidator(\n z.enum(['user', 'robot', 'client']),\n ),\n );\n }\n}\n","/*\n * Copyright (c) 2025.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { z } from 'zod';\nimport { createValidator } from '@validup/adapter-zod';\nimport { Container } from 'validup';\nimport type { CTSMessagingMessage } from '../types';\nimport { CTSMessagingPartyValidator } from './to';\n\nexport class CTSMessagingMessageValidator extends Container<CTSMessagingMessage> {\n protected initialize() {\n super.initialize();\n\n this.mount(\n 'data',\n createValidator(\n z.object({})\n .passthrough()\n .or(z.string())\n .or(z.null())\n .or(z.undefined())\n .optional(),\n ),\n );\n\n this.mount(\n 'metadata',\n createValidator(\n z.object({}).passthrough()\n .or(z.null())\n .or(z.undefined())\n .optional(),\n ),\n );\n\n const partyValidator = new CTSMessagingPartyValidator();\n\n this.mount('to', async (ctx) => {\n const validator = createValidator(\n z.array(z.object({}).passthrough()),\n );\n\n const output = (await validator(ctx)) as unknown[];\n return Promise.all(output.map((el) => partyValidator.run(el, {\n path: ctx.pathAbsolute,\n group: ctx.group,\n })));\n });\n }\n}\n","/*\n * Copyright (c) 2021-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type { EventCallback } from './types';\n\nexport function isEventCallback(\n input: unknown,\n fnArgs?: number,\n) : input is EventCallback {\n if (typeof fnArgs === 'undefined') {\n return typeof input === 'function';\n }\n\n return typeof input === 'function' &&\n input.length >= fnArgs;\n}\n\nexport function isEventTarget(\n input: unknown,\n) : input is EventTarget {\n return typeof input === 'number' ||\n typeof input === 'string' ||\n typeof input === 'undefined';\n}\n"],"names":["STCConnectionEventName","CTSConnectionEventName","STCMessagingEventName","CTSMessagingEventName","CTSMessagingPartyValidator","Container","initialize","mount","createValidator","z","string","uuid","enum","CTSMessagingMessageValidator","object","passthrough","or","null","undefined","optional","partyValidator","ctx","validator","array","output","Promise","all","map","el","run","path","pathAbsolute","group","isEventCallback","input","fnArgs","length","isEventTarget"],"mappings":";;;;;;AAAA;;;;;IAOO,IAAKA,sBAAAA,iBAAAA,SAAAA,sBAAAA,EAAAA;;;;;AAAAA,IAAAA,OAAAA,sBAAAA;AAMX,CAAA,CAAA,EAAA;AAEM,IAAA,sBAAKC,iBAAAA,SAAAA,sBAAAA,EAAAA;;;;;;;AAAAA,IAAAA,OAAAA,sBAAAA;AAQX,CAAA,CAAA,EAAA;;ACvBD;;;;;IAOO,IAAKC,qBAAAA,iBAAAA,SA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3
- * Author Peter Placzek (tada5hi)
4
- * For the full copyright and license information,
5
- * view the LICENSE file that was distributed with this source code.
6
- */
7
-
8
- module.exports = {
9
- testEnvironment: 'node',
10
- transform: {
11
- '^.+\\.tsx?$': 'ts-jest',
12
- },
13
- moduleFileExtensions: [
14
- 'ts',
15
- 'tsx',
16
- 'js',
17
- 'jsx',
18
- 'json',
19
- 'node',
20
- ],
21
- testRegex: '(/unit/.*|(\\.|/)(test|spec))\\.(ts|js)x?$',
22
- testPathIgnorePatterns: [
23
- 'writable',
24
- 'dist',
25
- '/unit/mock-util.ts',
26
- ],
27
- coverageDirectory: 'writable/coverage',
28
- collectCoverageFrom: [
29
- 'src/**/*.{ts,tsx,js,jsx}',
30
- ],
31
- rootDir: '../',
32
- verbose: true,
33
- };