@zintrust/core 0.4.41 → 0.4.42
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/package.json +3 -2
- package/src/boot/registry/runtime.d.ts.map +1 -1
- package/src/boot/registry/runtime.js +120 -0
- package/src/cache/Cache.d.ts.map +1 -1
- package/src/cache/Cache.js +25 -2
- package/src/cli/BaseCommand.d.ts.map +1 -1
- package/src/cli/BaseCommand.js +8 -0
- package/src/cli/CLI.d.ts.map +1 -1
- package/src/cli/CLI.js +2 -0
- package/src/cli/OptionalCliExtensions.d.ts.map +1 -1
- package/src/cli/OptionalCliExtensions.js +12 -0
- package/src/cli/cloudflare/CloudflareWranglerDevEnv.d.ts +24 -0
- package/src/cli/cloudflare/CloudflareWranglerDevEnv.d.ts.map +1 -0
- package/src/cli/cloudflare/CloudflareWranglerDevEnv.js +174 -0
- package/src/cli/commands/DebuggerCommand.d.ts +18 -0
- package/src/cli/commands/DebuggerCommand.d.ts.map +1 -0
- package/src/cli/commands/DebuggerCommand.js +6 -0
- package/src/cli/commands/DebuggerCommands.d.ts +25 -0
- package/src/cli/commands/DebuggerCommands.d.ts.map +1 -0
- package/src/cli/commands/DebuggerCommands.js +454 -0
- package/src/cli/commands/PrepareCommand.d.ts.map +1 -1
- package/src/cli/commands/PrepareCommand.js +56 -20
- package/src/cli/commands/StartCommand.d.ts.map +1 -1
- package/src/cli/commands/StartCommand.js +12 -94
- package/src/cli/commands/WranglerDevVarsCommand.d.ts +6 -0
- package/src/cli/commands/WranglerDevVarsCommand.d.ts.map +1 -0
- package/src/cli/commands/WranglerDevVarsCommand.js +52 -0
- package/src/cli/commands/index.d.ts +2 -0
- package/src/cli/commands/index.d.ts.map +1 -1
- package/src/cli/commands/index.js +2 -0
- package/src/cli/index.d.ts +1 -0
- package/src/cli/index.d.ts.map +1 -1
- package/src/cli/index.js +1 -0
- package/src/cli.d.ts +1 -0
- package/src/cli.d.ts.map +1 -1
- package/src/cli.js +1 -0
- package/src/config/logger.d.ts +7 -0
- package/src/config/logger.d.ts.map +1 -1
- package/src/config/logger.js +37 -0
- package/src/debugger/SystemDebuggerBridge.d.ts +15 -0
- package/src/debugger/SystemDebuggerBridge.d.ts.map +1 -0
- package/src/debugger/SystemDebuggerBridge.js +109 -0
- package/src/events/EventDispatcher.d.ts.map +1 -1
- package/src/events/EventDispatcher.js +3 -0
- package/src/functions/cloudflare.d.ts.map +1 -1
- package/src/functions/cloudflare.js +27 -8
- package/src/http/Kernel.d.ts.map +1 -1
- package/src/http/Kernel.js +8 -0
- package/src/http/RequestContext.d.ts +1 -0
- package/src/http/RequestContext.d.ts.map +1 -1
- package/src/http/RequestContext.js +9 -1
- package/src/index.d.ts +4 -0
- package/src/index.d.ts.map +1 -1
- package/src/index.js +5 -3
- package/src/migrations/schema/SchemaCompiler.d.ts.map +1 -1
- package/src/migrations/schema/SchemaCompiler.js +2 -2
- package/src/orm/Database.d.ts.map +1 -1
- package/src/orm/Database.js +0 -14
- package/src/orm/Model.d.ts +8 -2
- package/src/orm/Model.d.ts.map +1 -1
- package/src/orm/Model.js +193 -109
- package/src/orm/QueryBuilder.d.ts.map +1 -1
- package/src/orm/QueryBuilder.js +85 -1
- package/src/runtime/WorkerAdapterImports.d.ts.map +1 -1
- package/src/runtime/WorkerAdapterImports.js +1 -6
- package/src/runtime/WorkerProjectPlugins.d.ts +6 -0
- package/src/runtime/WorkerProjectPlugins.d.ts.map +1 -0
- package/src/runtime/WorkerProjectPlugins.js +5 -0
- package/src/runtime/plugins/system-debugger-runtime.d.ts +19 -0
- package/src/runtime/plugins/system-debugger-runtime.d.ts.map +1 -0
- package/src/runtime/plugins/system-debugger-runtime.js +19 -0
- package/src/runtime/plugins/system-debugger.d.ts +2 -0
- package/src/runtime/plugins/system-debugger.d.ts.map +1 -0
- package/src/runtime/plugins/system-debugger.js +14 -0
- package/src/security/JwtManager.d.ts.map +1 -1
- package/src/security/JwtManager.js +29 -0
- package/src/tools/http/Http.d.ts.map +1 -1
- package/src/tools/http/Http.js +2 -0
- package/src/tools/mail/index.d.ts.map +1 -1
- package/src/tools/mail/index.js +7 -1
- package/src/tools/notification/Service.d.ts.map +1 -1
- package/src/tools/notification/Service.js +18 -6
- package/src/tools/queue/Queue.d.ts.map +1 -1
- package/src/tools/queue/Queue.js +2 -0
- package/src/zintrust.plugins.d.ts +1 -0
- package/src/zintrust.plugins.d.ts.map +1 -1
- package/src/zintrust.plugins.js +3 -21
- package/src/zintrust.plugins.wg.d.ts +1 -0
- package/src/zintrust.plugins.wg.d.ts.map +1 -1
- package/src/zintrust.plugins.wg.js +3 -0
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* JSON Web Token generation, verification, and claims management
|
|
4
4
|
* Uses native Node.js crypto module (zero external dependencies)
|
|
5
5
|
*/
|
|
6
|
+
import { SystemDebuggerBridge } from '../debugger/SystemDebuggerBridge.js';
|
|
6
7
|
import { securityConfig } from '../config/security.js';
|
|
7
8
|
import { ErrorFactory } from '../exceptions/ZintrustError.js';
|
|
8
9
|
import { createHmac, createSign, createVerify, randomBytes } from '../node-singletons/crypto.js';
|
|
@@ -16,11 +17,38 @@ const createJwt = () => {
|
|
|
16
17
|
}
|
|
17
18
|
return jwt;
|
|
18
19
|
};
|
|
20
|
+
const getAuthHeaderValue = (authHeader) => {
|
|
21
|
+
if (typeof authHeader === 'string')
|
|
22
|
+
return authHeader;
|
|
23
|
+
if (Array.isArray(authHeader))
|
|
24
|
+
return authHeader[0];
|
|
25
|
+
return undefined;
|
|
26
|
+
};
|
|
27
|
+
const getLogoutSubject = (authHeader) => {
|
|
28
|
+
const rawHeader = getAuthHeaderValue(authHeader)?.trim() ?? '';
|
|
29
|
+
if (rawHeader === '')
|
|
30
|
+
return undefined;
|
|
31
|
+
const bearerToken = rawHeader.toLowerCase().startsWith('bearer ')
|
|
32
|
+
? rawHeader.slice(7).trim()
|
|
33
|
+
: rawHeader;
|
|
34
|
+
if (bearerToken === '')
|
|
35
|
+
return undefined;
|
|
36
|
+
try {
|
|
37
|
+
const payload = JwtManager.create().decode(bearerToken);
|
|
38
|
+
return typeof payload.sub === 'string' && payload.sub.trim() !== '' ? payload.sub : undefined;
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
19
44
|
const logout = async (authHeader) => {
|
|
45
|
+
const subject = getLogoutSubject(authHeader);
|
|
20
46
|
await JwtSessions.logout(authHeader);
|
|
47
|
+
SystemDebuggerBridge.emitAuth('logout', subject);
|
|
21
48
|
};
|
|
22
49
|
const logoutAll = async (sub) => {
|
|
23
50
|
await JwtSessions.logoutAll(sub);
|
|
51
|
+
SystemDebuggerBridge.emitAuth('logout', sub);
|
|
24
52
|
};
|
|
25
53
|
const signAccessToken = async (payload, expiresIn) => {
|
|
26
54
|
const algorithm = securityConfig.jwt.algorithm;
|
|
@@ -47,6 +75,7 @@ const signAccessToken = async (payload, expiresIn) => {
|
|
|
47
75
|
});
|
|
48
76
|
}
|
|
49
77
|
await JwtSessions.register(token);
|
|
78
|
+
SystemDebuggerBridge.emitAuth('login', typeof payload.sub === 'string' ? payload.sub : undefined);
|
|
50
79
|
return token;
|
|
51
80
|
};
|
|
52
81
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Http.d.ts","sourceRoot":"","sources":["../../../../src/tools/http/Http.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"Http.d.ts","sourceRoot":"","sources":["../../../../src/tools/http/Http.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,EAAsB,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAElF,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY,CAAC;IACtD,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,YAAY,CAAC;IAC3D,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,YAAY,CAAC;IACnE,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,YAAY,CAAC;IAChE,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY,CAAC;IACtC,MAAM,IAAI,YAAY,CAAC;IACvB,MAAM,IAAI,YAAY,CAAC;IACvB,IAAI,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC;IAC/B,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7B,UAAU,IAAI,OAAO,CAAC;QAAE,QAAQ,EAAE,QAAQ,CAAC;QAAC,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;CAC1F;AAoLD;;GAEG;AACH,eAAO,MAAM,UAAU;IACrB;;OAEG;aACM,MAAM,GAAG,YAAY;IAI9B;;OAEG;cACO,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY;IAQ/D;;OAEG;aACM,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY;IAQ9D;;OAEG;eACQ,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY;IAQhE;;OAEG;gBACS,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY;EAOjE,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
package/src/tools/http/Http.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* await HttpClient.post('https://api.example.com/users', data).withTimeout(5000).send();
|
|
7
7
|
*/
|
|
8
8
|
import { OpenTelemetry } from '../../observability/OpenTelemetry.js';
|
|
9
|
+
import { SystemDebuggerBridge } from '../../debugger/SystemDebuggerBridge.js';
|
|
9
10
|
import { Env } from '../../config/env.js';
|
|
10
11
|
import { Logger } from '../../config/logger.js';
|
|
11
12
|
import { ErrorFactory } from '../../exceptions/ZintrustError.js';
|
|
@@ -55,6 +56,7 @@ async function performFetch(state) {
|
|
|
55
56
|
const startTime = Date.now();
|
|
56
57
|
const response = await globalThis.fetch(state.url, init);
|
|
57
58
|
const duration = Date.now() - startTime;
|
|
59
|
+
SystemDebuggerBridge.emitHttpClient(state.method, state.url, { ...state.headers }, response.status, duration);
|
|
58
60
|
return { response, durationMs: duration };
|
|
59
61
|
}
|
|
60
62
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tools/mail/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tools/mail/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAsB,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAI7E,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE;QACL,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,YAAY,CAAC;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAuJF,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAsBD,eAAO,MAAM,IAAI;IACf;;OAEG;kBACiB,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC;IAIrD,sBAAsB;gBACJ,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC;IAGnD;;;;OAIG;iBACU,MAAM;cAtEb,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC,cAAc,CAAC;;gBA0ErC,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;EAGzD,CAAC;AAEH,eAAe,IAAI,CAAC"}
|
package/src/tools/mail/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { mailConfig } from '../../config/mail.js';
|
|
2
|
+
import { SystemDebuggerBridge } from '../../debugger/SystemDebuggerBridge.js';
|
|
2
3
|
import { ErrorFactory } from '../../exceptions/ZintrustError.js';
|
|
3
4
|
import { SesDriver } from './drivers/Ses.js';
|
|
4
5
|
import { resolveAttachments } from './attachments.js';
|
|
@@ -51,6 +52,9 @@ const createStorageWrapper = () => ({
|
|
|
51
52
|
return Boolean(result);
|
|
52
53
|
},
|
|
53
54
|
});
|
|
55
|
+
const normalizeMailRecipients = (to) => {
|
|
56
|
+
return Array.isArray(to) ? to.join(', ') : to;
|
|
57
|
+
};
|
|
54
58
|
const sendWithDriver = async (driver, message) => {
|
|
55
59
|
if (driver.driver === 'ses') {
|
|
56
60
|
const result = await SesDriver.send({ region: driver.region }, message);
|
|
@@ -82,7 +86,7 @@ const createMailer = (name) => Object.freeze({
|
|
|
82
86
|
const from = resolveFrom(input.from);
|
|
83
87
|
const storage = createStorageWrapper();
|
|
84
88
|
const attachments = await resolveAttachments(input.attachments, { storage });
|
|
85
|
-
|
|
89
|
+
const result = await sendWithDriver(driver, {
|
|
86
90
|
to: input.to,
|
|
87
91
|
from,
|
|
88
92
|
subject: input.subject,
|
|
@@ -90,6 +94,8 @@ const createMailer = (name) => Object.freeze({
|
|
|
90
94
|
html: input.html,
|
|
91
95
|
attachments,
|
|
92
96
|
});
|
|
97
|
+
SystemDebuggerBridge.emitMail(normalizeMailRecipients(input.to), input.subject);
|
|
98
|
+
return result;
|
|
93
99
|
},
|
|
94
100
|
});
|
|
95
101
|
const looksLikeHtml = (value) => /<\s*html\b|<!doctype\b|<\s*body\b/i.test(value);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Service.d.ts","sourceRoot":"","sources":["../../../../src/tools/notification/Service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Service.d.ts","sourceRoot":"","sources":["../../../../src/tools/notification/Service.ts"],"names":[],"mappings":"AAqEA,eAAO,MAAM,mBAAmB;oBACR,MAAM,WAAW,MAAM,YAAW,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;yBAWhE,MAAM,aACR,MAAM,WACR,MAAM,YACN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;mBAyDnB,MAAM,EAAE;EAGvB,CAAC;AAEH,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import notificationConfig from '../../config/notification.js';
|
|
2
|
+
import { SystemDebuggerBridge } from '../../debugger/SystemDebuggerBridge.js';
|
|
2
3
|
import { ErrorFactory } from '../../exceptions/ZintrustError.js';
|
|
3
4
|
import { NotificationConfig } from './config.js';
|
|
4
5
|
import { ConsoleDriver } from './drivers/Console.js';
|
|
@@ -56,29 +57,40 @@ export const NotificationService = Object.freeze({
|
|
|
56
57
|
assertValidRecipientAndMessage(recipient, message);
|
|
57
58
|
const driverName = NotificationConfig.getDriver();
|
|
58
59
|
const driver = NotificationRegistry.get(driverName);
|
|
59
|
-
|
|
60
|
+
const result = await driver.send(recipient, message, options);
|
|
61
|
+
SystemDebuggerBridge.emitNotification(driverName, [driverName], recipient);
|
|
62
|
+
return result;
|
|
60
63
|
},
|
|
61
64
|
async sendVia(channelName, recipient, message, options = {}) {
|
|
62
65
|
assertValidRecipientAndMessage(recipient, message);
|
|
63
66
|
const cfg = resolveChannelConfig(channelName);
|
|
64
67
|
switch (cfg.driver) {
|
|
65
|
-
case 'console':
|
|
66
|
-
|
|
68
|
+
case 'console': {
|
|
69
|
+
const result = await ConsoleDriver.send(recipient, message, options);
|
|
70
|
+
SystemDebuggerBridge.emitNotification(channelName, ['console'], recipient);
|
|
71
|
+
return result;
|
|
72
|
+
}
|
|
67
73
|
case 'slack': {
|
|
68
74
|
const slackCfg = cfg;
|
|
69
75
|
const payload = { text: message, ...options };
|
|
70
|
-
|
|
76
|
+
const result = await SlackDriver.send({ webhookUrl: slackCfg.webhookUrl }, payload);
|
|
77
|
+
SystemDebuggerBridge.emitNotification(channelName, ['slack'], recipient);
|
|
78
|
+
return result;
|
|
71
79
|
}
|
|
72
80
|
case 'twilio': {
|
|
73
81
|
const twilioCfg = cfg;
|
|
74
|
-
|
|
82
|
+
const result = await TwilioDriver.send({
|
|
75
83
|
accountSid: twilioCfg.accountSid,
|
|
76
84
|
authToken: twilioCfg.authToken,
|
|
77
85
|
from: twilioCfg.fromNumber,
|
|
78
86
|
}, { to: recipient, body: message });
|
|
87
|
+
SystemDebuggerBridge.emitNotification(channelName, ['twilio'], recipient);
|
|
88
|
+
return result;
|
|
79
89
|
}
|
|
80
90
|
case 'termii': {
|
|
81
|
-
|
|
91
|
+
const result = await sendTermii(cfg, recipient, message, options);
|
|
92
|
+
SystemDebuggerBridge.emitNotification(channelName, ['termii'], recipient);
|
|
93
|
+
return result;
|
|
82
94
|
}
|
|
83
95
|
default:
|
|
84
96
|
throw ErrorFactory.createConfigError(`Notification: unsupported driver: ${String(cfg?.driver)}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Queue.d.ts","sourceRoot":"","sources":["../../../../src/tools/queue/Queue.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Queue.d.ts","sourceRoot":"","sources":["../../../../src/tools/queue/Queue.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,YAAY,CAAC,CAAC,GAAG,OAAO,IAAI;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,CAAC,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAErF,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACjE,OAAO,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IAC1E,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACvC,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAE5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,OAAO,CAAC,EAAE;QACR,IAAI,EAAE,OAAO,GAAG,aAAa,CAAC;QAC9B,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,CAAC,EAAE;QACP,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,IAAI,CAAC,EAAE,OAAO,CAAC;IAGf,aAAa,CAAC,EAAE;QACd,EAAE,EAAE,MAAM,CAAC;QACX,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG;YAAE,SAAS,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;KACvE,CAAC;IAGF,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAID;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAO,MAOpC,CAAC;AA+EF,eAAO,MAAM,KAAK;mBACD,MAAM,UAAU,YAAY;aAIlC,IAAI;eAIF,MAAM,GAAG,YAAY;mBASX,MAAM,WAAW,aAAa,eAAe,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;YAoE5E,CAAC,mBACN,MAAM,eACA,MAAM,GAClB,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;eActB,MAAM,MAAM,MAAM,eAAe,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;kBAcpD,MAAM,eAAe,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;iBAc9C,MAAM,eAAe,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;EAa9D,CAAC;AAEH,eAAe,KAAK,CAAC"}
|
package/src/tools/queue/Queue.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { generateUuid } from '../../common/utility.js';
|
|
2
|
+
import { SystemDebuggerBridge } from '../../debugger/SystemDebuggerBridge.js';
|
|
2
3
|
import { ZintrustLang } from '../../lang/lang.js';
|
|
3
4
|
import { Env } from '../../config/env.js';
|
|
4
5
|
import { Logger } from '../../config/logger.js';
|
|
@@ -126,6 +127,7 @@ export const Queue = Object.freeze({
|
|
|
126
127
|
payload,
|
|
127
128
|
requestedUniqueId,
|
|
128
129
|
});
|
|
130
|
+
SystemDebuggerBridge.emitJobDispatch(queue, queue, resolvedDriver, payload);
|
|
129
131
|
return jobId;
|
|
130
132
|
}
|
|
131
133
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zintrust.plugins.d.ts","sourceRoot":"","sources":["../../src/zintrust.plugins.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"zintrust.plugins.d.ts","sourceRoot":"","sources":["../../src/zintrust.plugins.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,YAAY,EAAE,CAAC;AAgBf,eAAO,MAAM,6BAA6B,wBAAwB,CAAC;;AACnE,wBAAkB"}
|
package/src/zintrust.plugins.js
CHANGED
|
@@ -6,26 +6,8 @@
|
|
|
6
6
|
* optional adapters/drivers into core registries.
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// import { ZinTrustProcessor } from '../app/Workers/AdvancEmailWorker';
|
|
13
|
-
// import { WorkerFactory, type WorkerFactoryConfig } from '../packages/workers/src/index.js';
|
|
14
|
-
//
|
|
15
|
-
// type PreRegisteredProcessorSpec = {
|
|
16
|
-
// processorSpec: string;
|
|
17
|
-
// processor: WorkerFactoryConfig['processor'];
|
|
18
|
-
// };
|
|
19
|
-
//
|
|
20
|
-
// export const preRegisteredWorkerProcessorSpecs: ReadonlyArray<PreRegisteredProcessorSpec> = [
|
|
21
|
-
// {
|
|
22
|
-
// processorSpec: 'https://wk.zintrust.com/AdvancEmailWorker.js',
|
|
23
|
-
// processor: ZinTrustProcessor,
|
|
24
|
-
// },
|
|
25
|
-
// ];
|
|
26
|
-
//
|
|
27
|
-
// for (const entry of preRegisteredWorkerProcessorSpecs) {
|
|
28
|
-
// WorkerFactory.registerProcessorSpec(entry.processorSpec, entry.processor);
|
|
29
|
-
// }
|
|
9
|
+
import * as SystemDebuggerRuntime from './runtime/plugins/system-debugger-runtime.js';
|
|
10
|
+
globalThis.__zintrust_system_debugger_plugin_requested__ = true;
|
|
11
|
+
globalThis.__zintrust_system_debugger_runtime__ = SystemDebuggerRuntime;
|
|
30
12
|
export const __zintrustGeneratedPluginStub = 'zintrust.plugins.ts';
|
|
31
13
|
export default {};
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* This file is created by scripts/ensure-worker-plugins.mjs when missing.
|
|
4
4
|
* It allows optional runtime plugin imports to resolve in CI/scaffolded setups.
|
|
5
5
|
*/
|
|
6
|
+
export type {};
|
|
6
7
|
export declare const __zintrustGeneratedPluginStub = "zintrust.plugins.wg.ts";
|
|
7
8
|
declare const _default: {};
|
|
8
9
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zintrust.plugins.wg.d.ts","sourceRoot":"","sources":["../../src/zintrust.plugins.wg.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"zintrust.plugins.wg.d.ts","sourceRoot":"","sources":["../../src/zintrust.plugins.wg.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,YAAY,EAAE,CAAC;AAgBf,eAAO,MAAM,6BAA6B,2BAA2B,CAAC;;AACtE,wBAAkB"}
|
|
@@ -3,5 +3,8 @@
|
|
|
3
3
|
* This file is created by scripts/ensure-worker-plugins.mjs when missing.
|
|
4
4
|
* It allows optional runtime plugin imports to resolve in CI/scaffolded setups.
|
|
5
5
|
*/
|
|
6
|
+
import * as SystemDebuggerRuntime from './runtime/plugins/system-debugger-runtime.js';
|
|
7
|
+
globalThis.__zintrust_system_debugger_plugin_requested__ = true;
|
|
8
|
+
globalThis.__zintrust_system_debugger_runtime__ = SystemDebuggerRuntime;
|
|
6
9
|
export const __zintrustGeneratedPluginStub = 'zintrust.plugins.wg.ts';
|
|
7
10
|
export default {};
|