@naisys/hub 3.0.0-beta.43 → 3.0.0-beta.45
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.
|
@@ -52,6 +52,7 @@ export function createHubMailService(naisysServer, { hubDb }, logService, heartb
|
|
|
52
52
|
const parsed = MailSendRequestSchema.parse(data);
|
|
53
53
|
await sendMailService.sendMail({
|
|
54
54
|
fromUserId: parsed.fromUserId,
|
|
55
|
+
fromRunId: parsed.fromRunId,
|
|
55
56
|
recipientUserIds: parsed.toUserIds,
|
|
56
57
|
subject: parsed.subject,
|
|
57
58
|
body: parsed.body,
|
|
@@ -226,7 +227,7 @@ export function createHubMailService(naisysServer, { hubDb }, logService, heartb
|
|
|
226
227
|
user_id: parsed.userId,
|
|
227
228
|
read_at: null,
|
|
228
229
|
},
|
|
229
|
-
data: { read_at: new Date() },
|
|
230
|
+
data: { read_at: new Date(), read_run_id: parsed.runId ?? null },
|
|
230
231
|
});
|
|
231
232
|
ack({ success: true });
|
|
232
233
|
// Push read receipts to supervisor connections
|
|
@@ -2,7 +2,9 @@ import { HubEvents } from "@naisys/hub-protocol";
|
|
|
2
2
|
const MIN_SECRET_LENGTH = 6;
|
|
3
3
|
const PATTERN_REPLACEMENTS = [
|
|
4
4
|
{
|
|
5
|
-
|
|
5
|
+
// Stop at whitespace or quote chars so the closing quote survives, and
|
|
6
|
+
// skip unexpanded shell-var refs ($FOO, ${FOO}) which aren't real secrets.
|
|
7
|
+
pattern: /Authorization:\s*(Bearer|Basic)\s+(?!\$)[^\s"']+/gi,
|
|
6
8
|
replacement: "Authorization: $1 [REDACTED]",
|
|
7
9
|
},
|
|
8
10
|
{
|
|
@@ -91,6 +91,9 @@ describe("hubRedactionService", () => {
|
|
|
91
91
|
const { hubDb } = createHubDb([]);
|
|
92
92
|
const svc = await createHubRedactionService(server, { hubDb }, createLogger());
|
|
93
93
|
expect(svc.redact("Authorization: Bearer xyz.token.here")).toBe("Authorization: Bearer [REDACTED]");
|
|
94
|
+
expect(svc.redact('curl -H "Authorization: Bearer xyz.token.here" url')).toBe('curl -H "Authorization: Bearer [REDACTED]" url');
|
|
95
|
+
expect(svc.redact('curl -H "Authorization: Bearer $NAISYS_API_KEY" url')).toBe('curl -H "Authorization: Bearer $NAISYS_API_KEY" url');
|
|
96
|
+
expect(svc.redact('curl -H "Authorization: Bearer ${NAISYS_API_KEY}" url')).toBe('curl -H "Authorization: Bearer ${NAISYS_API_KEY}" url');
|
|
94
97
|
expect(svc.redact("AKIAIOSFODNN7EXAMPLE")).toBe("[REDACTED:AWS_KEY]");
|
|
95
98
|
expect(svc.redact("header eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c trail")).toBe("header [REDACTED:JWT] trail");
|
|
96
99
|
});
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naisys/hub",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.45",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@naisys/hub",
|
|
9
|
-
"version": "3.0.0-beta.
|
|
9
|
+
"version": "3.0.0-beta.45",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@naisys/common": "3.0.0-beta.
|
|
12
|
-
"@naisys/common-node": "3.0.0-beta.
|
|
13
|
-
"@naisys/hub-database": "3.0.0-beta.
|
|
14
|
-
"@naisys/hub-protocol": "3.0.0-beta.
|
|
11
|
+
"@naisys/common": "3.0.0-beta.45",
|
|
12
|
+
"@naisys/common-node": "3.0.0-beta.45",
|
|
13
|
+
"@naisys/hub-database": "3.0.0-beta.45",
|
|
14
|
+
"@naisys/hub-protocol": "3.0.0-beta.45",
|
|
15
15
|
"commander": "^14.0.3",
|
|
16
16
|
"dotenv": "^17.3.1",
|
|
17
17
|
"fastify": "^5.8.2",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"node": ">=22.0.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@naisys/supervisor": "3.0.0-beta.
|
|
27
|
+
"@naisys/supervisor": "3.0.0-beta.45"
|
|
28
28
|
},
|
|
29
29
|
"peerDependenciesMeta": {
|
|
30
30
|
"@naisys/supervisor": {
|
|
@@ -189,32 +189,32 @@
|
|
|
189
189
|
"license": "MIT"
|
|
190
190
|
},
|
|
191
191
|
"node_modules/@naisys/common": {
|
|
192
|
-
"version": "3.0.0-beta.
|
|
193
|
-
"resolved": "https://registry.npmjs.org/@naisys/common/-/common-3.0.0-beta.
|
|
194
|
-
"integrity": "sha512-
|
|
192
|
+
"version": "3.0.0-beta.45",
|
|
193
|
+
"resolved": "https://registry.npmjs.org/@naisys/common/-/common-3.0.0-beta.45.tgz",
|
|
194
|
+
"integrity": "sha512-n4UXc1hbmnBOfrsyQmilCh1tFnqEh+X3L0qnoP2OGewUd/AMEk5cMFQPgUi4xZIeDe0MnFuoR/HPJpo0W5S4Xw==",
|
|
195
195
|
"dependencies": {
|
|
196
196
|
"semver": "^7.7.4",
|
|
197
197
|
"zod": "^4.3.6"
|
|
198
198
|
}
|
|
199
199
|
},
|
|
200
200
|
"node_modules/@naisys/common-node": {
|
|
201
|
-
"version": "3.0.0-beta.
|
|
202
|
-
"resolved": "https://registry.npmjs.org/@naisys/common-node/-/common-node-3.0.0-beta.
|
|
203
|
-
"integrity": "sha512-
|
|
201
|
+
"version": "3.0.0-beta.45",
|
|
202
|
+
"resolved": "https://registry.npmjs.org/@naisys/common-node/-/common-node-3.0.0-beta.45.tgz",
|
|
203
|
+
"integrity": "sha512-7xSlPv+3LyIE1bvjXNCFPrK0R3Fw2uLDtbAq1HNtjzvjuH0YErwKYlSGgH1wVK6oTvjljmemSRSkA3K0DfIb6A==",
|
|
204
204
|
"dependencies": {
|
|
205
|
-
"@naisys/common": "3.0.0-beta.
|
|
205
|
+
"@naisys/common": "3.0.0-beta.45",
|
|
206
206
|
"better-sqlite3": "^12.6.2",
|
|
207
207
|
"js-yaml": "^4.1.1",
|
|
208
208
|
"pino": "^10.3.1"
|
|
209
209
|
}
|
|
210
210
|
},
|
|
211
211
|
"node_modules/@naisys/hub-database": {
|
|
212
|
-
"version": "3.0.0-beta.
|
|
213
|
-
"resolved": "https://registry.npmjs.org/@naisys/hub-database/-/hub-database-3.0.0-beta.
|
|
214
|
-
"integrity": "sha512-
|
|
212
|
+
"version": "3.0.0-beta.45",
|
|
213
|
+
"resolved": "https://registry.npmjs.org/@naisys/hub-database/-/hub-database-3.0.0-beta.45.tgz",
|
|
214
|
+
"integrity": "sha512-jEY0Z0yjy2pUTsNgJ9Gq0pppjR64SuOLHnZfqPvK+5FB73MLkcYyR77qlSD11mHBWtlx4w8EjWAYQfCj+GZ37Q==",
|
|
215
215
|
"dependencies": {
|
|
216
|
-
"@naisys/common": "3.0.0-beta.
|
|
217
|
-
"@naisys/common-node": "3.0.0-beta.
|
|
216
|
+
"@naisys/common": "3.0.0-beta.45",
|
|
217
|
+
"@naisys/common-node": "3.0.0-beta.45",
|
|
218
218
|
"@prisma/adapter-better-sqlite3": "^7.5.0",
|
|
219
219
|
"@prisma/client": "^7.5.0",
|
|
220
220
|
"better-sqlite3": "^12.6.2",
|
|
@@ -222,11 +222,11 @@
|
|
|
222
222
|
}
|
|
223
223
|
},
|
|
224
224
|
"node_modules/@naisys/hub-protocol": {
|
|
225
|
-
"version": "3.0.0-beta.
|
|
226
|
-
"resolved": "https://registry.npmjs.org/@naisys/hub-protocol/-/hub-protocol-3.0.0-beta.
|
|
227
|
-
"integrity": "sha512-
|
|
225
|
+
"version": "3.0.0-beta.45",
|
|
226
|
+
"resolved": "https://registry.npmjs.org/@naisys/hub-protocol/-/hub-protocol-3.0.0-beta.45.tgz",
|
|
227
|
+
"integrity": "sha512-JgRPu0U8f2m8XIkUCbCzoWVrqRv/u8kvsWIdSb+QFzuGHcwNCE7KHRjuWrVBZlScUKD+fg0TU4MDD7BRpmkSlw==",
|
|
228
228
|
"dependencies": {
|
|
229
|
-
"@naisys/common": "3.0.0-beta.
|
|
229
|
+
"@naisys/common": "3.0.0-beta.45",
|
|
230
230
|
"zod": "^4.3.6"
|
|
231
231
|
}
|
|
232
232
|
},
|
|
@@ -2521,9 +2521,9 @@
|
|
|
2521
2521
|
}
|
|
2522
2522
|
},
|
|
2523
2523
|
"node_modules/zod": {
|
|
2524
|
-
"version": "4.3
|
|
2525
|
-
"resolved": "https://registry.npmjs.org/zod/-/zod-4.3.
|
|
2526
|
-
"integrity": "sha512-
|
|
2524
|
+
"version": "4.4.3",
|
|
2525
|
+
"resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz",
|
|
2526
|
+
"integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==",
|
|
2527
2527
|
"license": "MIT",
|
|
2528
2528
|
"funding": {
|
|
2529
2529
|
"url": "https://github.com/sponsors/colinhacks"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naisys/hub",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.45",
|
|
4
4
|
"description": "NAISYS Hub - Adds persistence and multi-instance coordination to NAISYS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/naisysHub.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"!dist/**/*.d.ts.map"
|
|
33
33
|
],
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@naisys/supervisor": "3.0.0-beta.
|
|
35
|
+
"@naisys/supervisor": "3.0.0-beta.45"
|
|
36
36
|
},
|
|
37
37
|
"peerDependenciesMeta": {
|
|
38
38
|
"@naisys/supervisor": {
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@naisys/common": "3.0.0-beta.
|
|
44
|
-
"@naisys/common-node": "3.0.0-beta.
|
|
45
|
-
"@naisys/hub-database": "3.0.0-beta.
|
|
46
|
-
"@naisys/hub-protocol": "3.0.0-beta.
|
|
43
|
+
"@naisys/common": "3.0.0-beta.45",
|
|
44
|
+
"@naisys/common-node": "3.0.0-beta.45",
|
|
45
|
+
"@naisys/hub-database": "3.0.0-beta.45",
|
|
46
|
+
"@naisys/hub-protocol": "3.0.0-beta.45",
|
|
47
47
|
"commander": "^14.0.3",
|
|
48
48
|
"dotenv": "^17.3.1",
|
|
49
49
|
"fastify": "^5.8.2",
|