@zintrust/core 0.4.62 → 0.4.64
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 +1 -1
- package/src/cli/commands/DebuggerCommands.js +1 -1
- package/src/cli/commands/MigrateCommand.js +1 -1
- package/src/cli/workers/QueueWorkRunner.d.ts.map +1 -1
- package/src/cli/workers/QueueWorkRunner.js +9 -1
- package/src/config/logger.d.ts.map +1 -1
- package/src/config/logger.js +327 -10
- package/src/debugger/SystemDebuggerBridge.js +1 -1
- package/src/functions/cloudflare.d.ts +1 -1
- package/src/functions/cloudflare.js +1 -1
- package/src/http/HttpStatus.d.ts +12 -0
- package/src/http/HttpStatus.d.ts.map +1 -0
- package/src/http/HttpStatus.js +80 -0
- package/src/http/Kernel.d.ts.map +1 -1
- package/src/http/Kernel.js +0 -1
- package/src/index.d.ts +2 -1
- package/src/index.d.ts.map +1 -1
- package/src/index.js +4 -4
- package/src/middleware/LoggingMiddleware.d.ts.map +1 -1
- package/src/middleware/LoggingMiddleware.js +12 -6
- package/src/runtime/PluginAutoImports.d.ts.map +1 -1
- package/src/runtime/PluginAutoImports.js +28 -5
- package/src/runtime/WorkersModule.d.ts +2 -2
- package/src/runtime/plugins/system-debugger-runtime.js +1 -1
- package/src/templates/project/basic/app/Toolkit/Broadcast/sendBroadcast.ts.tpl +5 -1
- package/src/templates/project/basic/routes/api.ts.tpl +0 -2
- package/src/templates/project/basic/routes/broadcast.ts.tpl +3 -3
- package/src/tools/broadcast/Broadcast.d.ts +41 -2
- package/src/tools/broadcast/Broadcast.d.ts.map +1 -1
- package/src/tools/broadcast/Broadcast.js +373 -16
- package/src/tools/broadcast/index.d.ts +1 -0
- package/src/tools/broadcast/index.d.ts.map +1 -1
- package/src/zintrust.comon.d.ts +11 -0
- package/src/zintrust.comon.d.ts.map +1 -0
- package/src/zintrust.comon.js +17 -0
- package/src/zintrust.plugins.d.ts +7 -3
- package/src/zintrust.plugins.d.ts.map +1 -1
- package/src/zintrust.plugins.js +9 -3
- 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
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@ import { Database } from '../../orm/Database.js';
|
|
|
16
16
|
import { DatabaseAdapterRegistry } from '../../orm/DatabaseAdapterRegistry.js';
|
|
17
17
|
const loadDebuggerModule = async () => {
|
|
18
18
|
try {
|
|
19
|
-
return (await import('
|
|
19
|
+
return (await import('@zintrust/system-debugger'));
|
|
20
20
|
}
|
|
21
21
|
catch (error) {
|
|
22
22
|
Logger.error('Failed to load optional package "@zintrust/system-debugger"', error);
|
|
@@ -215,7 +215,7 @@ const warnIfAdapterMissing = (cmd, conn) => {
|
|
|
215
215
|
if (conn.driver === 'mysql' && DatabaseAdapterRegistry.get('mysql') === undefined) {
|
|
216
216
|
cmd.warn('MySQL adapter is not installed/registered; migrations may not hit a real MySQL DB.');
|
|
217
217
|
cmd.warn('Install via `zin plugin install adapter:mysql` (or `zin add db:mysql`).');
|
|
218
|
-
cmd.debug('[debug] Expected a side-effect import in src/zintrust.plugins.ts like: import "
|
|
218
|
+
cmd.debug('[debug] Expected a side-effect import in src/zintrust.plugins.ts like: import "../../../packages/db-mysql/src/register";');
|
|
219
219
|
}
|
|
220
220
|
if (conn.driver === 'postgresql' && DatabaseAdapterRegistry.get('postgresql') === undefined) {
|
|
221
221
|
cmd.warn('PostgreSQL adapter is not installed/registered; migrations may not hit a real PostgreSQL DB.');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueueWorkRunner.d.ts","sourceRoot":"","sources":["../../../../src/cli/workers/QueueWorkRunner.ts"],"names":[],"mappings":"AAuBA,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"QueueWorkRunner.d.ts","sourceRoot":"","sources":["../../../../src/cli/workers/QueueWorkRunner.ts"],"names":[],"mappings":"AAuBA,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,cAAc,CAAC;AAwBzD,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAkRF,eAAO,MAAM,eAAe;iBACP,sBAAsB,GAAG,OAAO,CAAC,qBAAqB,CAAC;qBAuCzD,OAAO,GAAG,aAAa;EAUxC,CAAC;AAEH,eAAe,eAAe,CAAC"}
|
|
@@ -195,7 +195,15 @@ const processMessage = async (options, msg, maxAttempts, result) => {
|
|
|
195
195
|
try {
|
|
196
196
|
if (kind === 'broadcast') {
|
|
197
197
|
const job = payloadWithoutMeta;
|
|
198
|
-
await Broadcast.
|
|
198
|
+
await Broadcast.publish({
|
|
199
|
+
channel: job.channel,
|
|
200
|
+
channels: job.channels,
|
|
201
|
+
event: job.event,
|
|
202
|
+
data: job.data,
|
|
203
|
+
delivery: job.delivery,
|
|
204
|
+
broadcaster: job.broadcaster,
|
|
205
|
+
socketId: job.socketId,
|
|
206
|
+
});
|
|
199
207
|
}
|
|
200
208
|
else {
|
|
201
209
|
const job = payloadWithoutMeta;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/config/logger.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,UAAU,OAAO;IACf,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/D,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/D,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjE,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClE;
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/config/logger.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,UAAU,OAAO;IACf,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/D,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/D,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjE,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClE;AAmyBD;;;GAGG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;AAkCpG,eAAO,MAAM,aAAa,QAAa,OAAO,CAAC,MAAM,EAAE,CAYtD,CAAC;AAEF,eAAO,MAAM,MAAM;qBA3MQ,MAAM,SAAS,OAAO,aAAa,MAAM,KAAG,IAAI;oBAuBjD,MAAM,SAAS,OAAO,aAAa,MAAM,KAAG,IAAI;oBAuBhD,MAAM,SAAS,OAAO,aAAa,MAAM,KAAG,IAAI;qBAuB/C,MAAM,UAAU,OAAO,aAAa,MAAM,KAAG,IAAI;qBA6BjD,MAAM,UAAU,OAAO,aAAa,MAAM,KAAG,IAAI;yBA2FrC,OAAO,CAAC,MAAM,EAAE,CAAC;mBA1DtB,MAAM,KAAG,OAAO;kBAiD7B,OAAO,KAAG,CAAC,MAAM,IAAI,CAAC;EAgCzC,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
package/src/config/logger.js
CHANGED
|
@@ -36,6 +36,323 @@ const getEnvBool = (key, fallback) => {
|
|
|
36
36
|
};
|
|
37
37
|
const getLogFormat = () => getEnvString('LOG_FORMAT', 'text');
|
|
38
38
|
const isJsonFormat = (value) => value === 'json';
|
|
39
|
+
const ANSI = Object.freeze({
|
|
40
|
+
reset: '\u001b[0m',
|
|
41
|
+
bold: '\u001b[1m',
|
|
42
|
+
dim: '\u001b[2m',
|
|
43
|
+
gray: '\u001b[90m',
|
|
44
|
+
red: '\u001b[31m',
|
|
45
|
+
brightRed: '\u001b[91m',
|
|
46
|
+
green: '\u001b[32m',
|
|
47
|
+
brightGreen: '\u001b[92m',
|
|
48
|
+
yellow: '\u001b[33m',
|
|
49
|
+
brightYellow: '\u001b[93m',
|
|
50
|
+
blue: '\u001b[34m',
|
|
51
|
+
brightBlue: '\u001b[94m',
|
|
52
|
+
magenta: '\u001b[35m',
|
|
53
|
+
brightMagenta: '\u001b[95m',
|
|
54
|
+
cyan: '\u001b[36m',
|
|
55
|
+
brightCyan: '\u001b[96m',
|
|
56
|
+
white: '\u001b[97m',
|
|
57
|
+
});
|
|
58
|
+
const REQUEST_LOG_COLOR_THEMES = Object.freeze({
|
|
59
|
+
arctic: Object.freeze({
|
|
60
|
+
level: Object.freeze({
|
|
61
|
+
debug: ANSI.gray,
|
|
62
|
+
info: `${ANSI.bold}${ANSI.brightCyan}`,
|
|
63
|
+
warn: `${ANSI.bold}${ANSI.brightYellow}`,
|
|
64
|
+
error: `${ANSI.bold}${ANSI.brightRed}`,
|
|
65
|
+
fatal: `${ANSI.bold}${ANSI.brightMagenta}`,
|
|
66
|
+
}),
|
|
67
|
+
method: Object.freeze({
|
|
68
|
+
GET: `${ANSI.bold}${ANSI.brightBlue}`,
|
|
69
|
+
POST: `${ANSI.bold}${ANSI.brightGreen}`,
|
|
70
|
+
PUT: `${ANSI.bold}${ANSI.brightYellow}`,
|
|
71
|
+
PATCH: `${ANSI.bold}${ANSI.brightMagenta}`,
|
|
72
|
+
DELETE: `${ANSI.bold}${ANSI.brightRed}`,
|
|
73
|
+
HEAD: `${ANSI.bold}${ANSI.cyan}`,
|
|
74
|
+
OPTIONS: `${ANSI.bold}${ANSI.brightMagenta}`,
|
|
75
|
+
}),
|
|
76
|
+
methodFallback: `${ANSI.bold}${ANSI.white}`,
|
|
77
|
+
path: ANSI.white,
|
|
78
|
+
status: Object.freeze({
|
|
79
|
+
success: `${ANSI.bold}${ANSI.brightGreen}`,
|
|
80
|
+
redirect: `${ANSI.bold}${ANSI.cyan}`,
|
|
81
|
+
warn: `${ANSI.bold}${ANSI.yellow}`,
|
|
82
|
+
special: `${ANSI.bold}${ANSI.brightMagenta}`,
|
|
83
|
+
error: `${ANSI.bold}${ANSI.brightRed}`,
|
|
84
|
+
fallback: `${ANSI.bold}${ANSI.white}`,
|
|
85
|
+
}),
|
|
86
|
+
duration: Object.freeze({
|
|
87
|
+
fast: `${ANSI.bold}${ANSI.cyan}`,
|
|
88
|
+
steady: `${ANSI.bold}${ANSI.brightBlue}`,
|
|
89
|
+
elevated: `${ANSI.bold}${ANSI.brightYellow}`,
|
|
90
|
+
slow: `${ANSI.bold}${ANSI.yellow}`,
|
|
91
|
+
critical: `${ANSI.bold}${ANSI.brightRed}`,
|
|
92
|
+
}),
|
|
93
|
+
meta: `${ANSI.dim}${ANSI.cyan}`,
|
|
94
|
+
}),
|
|
95
|
+
'sharp-ops': Object.freeze({
|
|
96
|
+
level: Object.freeze({
|
|
97
|
+
debug: ANSI.gray,
|
|
98
|
+
info: `${ANSI.bold}${ANSI.cyan}`,
|
|
99
|
+
warn: `${ANSI.bold}${ANSI.yellow}`,
|
|
100
|
+
error: `${ANSI.bold}${ANSI.red}`,
|
|
101
|
+
fatal: `${ANSI.bold}${ANSI.brightMagenta}`,
|
|
102
|
+
}),
|
|
103
|
+
method: Object.freeze({
|
|
104
|
+
GET: `${ANSI.bold}${ANSI.brightBlue}`,
|
|
105
|
+
POST: `${ANSI.bold}${ANSI.green}`,
|
|
106
|
+
PUT: `${ANSI.bold}${ANSI.yellow}`,
|
|
107
|
+
PATCH: `${ANSI.bold}${ANSI.magenta}`,
|
|
108
|
+
DELETE: `${ANSI.bold}${ANSI.red}`,
|
|
109
|
+
HEAD: `${ANSI.bold}${ANSI.blue}`,
|
|
110
|
+
OPTIONS: `${ANSI.bold}${ANSI.brightMagenta}`,
|
|
111
|
+
}),
|
|
112
|
+
methodFallback: `${ANSI.bold}${ANSI.white}`,
|
|
113
|
+
path: ANSI.white,
|
|
114
|
+
status: Object.freeze({
|
|
115
|
+
success: `${ANSI.bold}${ANSI.green}`,
|
|
116
|
+
redirect: `${ANSI.bold}${ANSI.brightBlue}`,
|
|
117
|
+
warn: `${ANSI.bold}${ANSI.yellow}`,
|
|
118
|
+
special: `${ANSI.bold}${ANSI.brightMagenta}`,
|
|
119
|
+
error: `${ANSI.bold}${ANSI.red}`,
|
|
120
|
+
fallback: `${ANSI.bold}${ANSI.white}`,
|
|
121
|
+
}),
|
|
122
|
+
duration: Object.freeze({
|
|
123
|
+
fast: `${ANSI.bold}${ANSI.green}`,
|
|
124
|
+
steady: `${ANSI.bold}${ANSI.brightGreen}`,
|
|
125
|
+
elevated: `${ANSI.bold}${ANSI.yellow}`,
|
|
126
|
+
slow: `${ANSI.bold}${ANSI.brightYellow}`,
|
|
127
|
+
critical: `${ANSI.bold}${ANSI.red}`,
|
|
128
|
+
}),
|
|
129
|
+
meta: `${ANSI.dim}${ANSI.gray}`,
|
|
130
|
+
}),
|
|
131
|
+
'soft-contrast': Object.freeze({
|
|
132
|
+
level: Object.freeze({
|
|
133
|
+
debug: ANSI.gray,
|
|
134
|
+
info: `${ANSI.bold}${ANSI.white}`,
|
|
135
|
+
warn: `${ANSI.bold}${ANSI.yellow}`,
|
|
136
|
+
error: `${ANSI.bold}${ANSI.red}`,
|
|
137
|
+
fatal: `${ANSI.bold}${ANSI.magenta}`,
|
|
138
|
+
}),
|
|
139
|
+
method: Object.freeze({
|
|
140
|
+
GET: `${ANSI.bold}${ANSI.blue}`,
|
|
141
|
+
POST: `${ANSI.bold}${ANSI.cyan}`,
|
|
142
|
+
PUT: `${ANSI.bold}${ANSI.yellow}`,
|
|
143
|
+
PATCH: `${ANSI.bold}${ANSI.magenta}`,
|
|
144
|
+
DELETE: `${ANSI.bold}${ANSI.brightRed}`,
|
|
145
|
+
HEAD: `${ANSI.bold}${ANSI.gray}`,
|
|
146
|
+
OPTIONS: `${ANSI.bold}${ANSI.brightMagenta}`,
|
|
147
|
+
}),
|
|
148
|
+
methodFallback: `${ANSI.bold}${ANSI.white}`,
|
|
149
|
+
path: `${ANSI.bold}${ANSI.white}`,
|
|
150
|
+
status: Object.freeze({
|
|
151
|
+
success: `${ANSI.bold}${ANSI.cyan}`,
|
|
152
|
+
redirect: `${ANSI.bold}${ANSI.blue}`,
|
|
153
|
+
warn: `${ANSI.bold}${ANSI.yellow}`,
|
|
154
|
+
special: `${ANSI.bold}${ANSI.brightMagenta}`,
|
|
155
|
+
error: `${ANSI.bold}${ANSI.red}`,
|
|
156
|
+
fallback: `${ANSI.bold}${ANSI.white}`,
|
|
157
|
+
}),
|
|
158
|
+
duration: Object.freeze({
|
|
159
|
+
fast: `${ANSI.bold}${ANSI.cyan}`,
|
|
160
|
+
steady: `${ANSI.bold}${ANSI.brightBlue}`,
|
|
161
|
+
elevated: `${ANSI.bold}${ANSI.yellow}`,
|
|
162
|
+
slow: `${ANSI.bold}${ANSI.brightYellow}`,
|
|
163
|
+
critical: `${ANSI.bold}${ANSI.red}`,
|
|
164
|
+
}),
|
|
165
|
+
meta: `${ANSI.dim}${ANSI.white}`,
|
|
166
|
+
}),
|
|
167
|
+
'neon-grid': Object.freeze({
|
|
168
|
+
level: Object.freeze({
|
|
169
|
+
debug: ANSI.gray,
|
|
170
|
+
info: `${ANSI.bold}${ANSI.cyan}`,
|
|
171
|
+
warn: `${ANSI.bold}${ANSI.brightYellow}`,
|
|
172
|
+
error: `${ANSI.bold}${ANSI.brightRed}`,
|
|
173
|
+
fatal: `${ANSI.bold}${ANSI.brightMagenta}`,
|
|
174
|
+
}),
|
|
175
|
+
method: Object.freeze({
|
|
176
|
+
GET: `${ANSI.bold}${ANSI.brightCyan}`,
|
|
177
|
+
POST: `${ANSI.bold}${ANSI.brightGreen}`,
|
|
178
|
+
PUT: `${ANSI.bold}${ANSI.brightYellow}`,
|
|
179
|
+
PATCH: `${ANSI.bold}${ANSI.brightMagenta}`,
|
|
180
|
+
DELETE: `${ANSI.bold}${ANSI.brightRed}`,
|
|
181
|
+
HEAD: `${ANSI.bold}${ANSI.brightBlue}`,
|
|
182
|
+
OPTIONS: `${ANSI.bold}${ANSI.magenta}`,
|
|
183
|
+
}),
|
|
184
|
+
methodFallback: `${ANSI.bold}${ANSI.white}`,
|
|
185
|
+
path: `${ANSI.bold}${ANSI.white}`,
|
|
186
|
+
status: Object.freeze({
|
|
187
|
+
success: `${ANSI.bold}${ANSI.brightGreen}`,
|
|
188
|
+
redirect: `${ANSI.bold}${ANSI.brightCyan}`,
|
|
189
|
+
warn: `${ANSI.bold}${ANSI.brightYellow}`,
|
|
190
|
+
special: `${ANSI.bold}${ANSI.brightMagenta}`,
|
|
191
|
+
error: `${ANSI.bold}${ANSI.brightRed}`,
|
|
192
|
+
fallback: `${ANSI.bold}${ANSI.white}`,
|
|
193
|
+
}),
|
|
194
|
+
duration: Object.freeze({
|
|
195
|
+
fast: `${ANSI.bold}${ANSI.brightCyan}`,
|
|
196
|
+
steady: `${ANSI.bold}${ANSI.brightGreen}`,
|
|
197
|
+
elevated: `${ANSI.bold}${ANSI.yellow}`,
|
|
198
|
+
slow: `${ANSI.bold}${ANSI.brightYellow}`,
|
|
199
|
+
critical: `${ANSI.bold}${ANSI.brightRed}`,
|
|
200
|
+
}),
|
|
201
|
+
meta: `${ANSI.dim}${ANSI.gray}`,
|
|
202
|
+
}),
|
|
203
|
+
'production-safe': Object.freeze({
|
|
204
|
+
level: Object.freeze({
|
|
205
|
+
debug: ANSI.gray,
|
|
206
|
+
info: `${ANSI.bold}${ANSI.blue}`,
|
|
207
|
+
warn: `${ANSI.bold}${ANSI.yellow}`,
|
|
208
|
+
error: `${ANSI.bold}${ANSI.red}`,
|
|
209
|
+
fatal: `${ANSI.bold}${ANSI.magenta}`,
|
|
210
|
+
}),
|
|
211
|
+
method: Object.freeze({
|
|
212
|
+
GET: `${ANSI.bold}${ANSI.blue}`,
|
|
213
|
+
POST: `${ANSI.bold}${ANSI.green}`,
|
|
214
|
+
PUT: `${ANSI.bold}${ANSI.yellow}`,
|
|
215
|
+
PATCH: `${ANSI.bold}${ANSI.magenta}`,
|
|
216
|
+
DELETE: `${ANSI.bold}${ANSI.red}`,
|
|
217
|
+
HEAD: `${ANSI.bold}${ANSI.gray}`,
|
|
218
|
+
OPTIONS: `${ANSI.bold}${ANSI.brightMagenta}`,
|
|
219
|
+
}),
|
|
220
|
+
methodFallback: `${ANSI.bold}${ANSI.white}`,
|
|
221
|
+
path: ANSI.white,
|
|
222
|
+
status: Object.freeze({
|
|
223
|
+
success: `${ANSI.bold}${ANSI.green}`,
|
|
224
|
+
redirect: `${ANSI.bold}${ANSI.blue}`,
|
|
225
|
+
warn: `${ANSI.bold}${ANSI.yellow}`,
|
|
226
|
+
special: `${ANSI.bold}${ANSI.brightMagenta}`,
|
|
227
|
+
error: `${ANSI.bold}${ANSI.red}`,
|
|
228
|
+
fallback: `${ANSI.bold}${ANSI.white}`,
|
|
229
|
+
}),
|
|
230
|
+
duration: Object.freeze({
|
|
231
|
+
fast: `${ANSI.bold}${ANSI.green}`,
|
|
232
|
+
steady: `${ANSI.bold}${ANSI.brightGreen}`,
|
|
233
|
+
elevated: `${ANSI.bold}${ANSI.yellow}`,
|
|
234
|
+
slow: `${ANSI.bold}${ANSI.brightYellow}`,
|
|
235
|
+
critical: `${ANSI.bold}${ANSI.red}`,
|
|
236
|
+
}),
|
|
237
|
+
meta: `${ANSI.dim}${ANSI.gray}`,
|
|
238
|
+
}),
|
|
239
|
+
});
|
|
240
|
+
const LOGGER_COLOR_THEME_ALIASES = Object.freeze({
|
|
241
|
+
arctic: 'arctic',
|
|
242
|
+
'arctic-terminal': 'arctic',
|
|
243
|
+
'theme-a': 'arctic',
|
|
244
|
+
'sharp-ops': 'sharp-ops',
|
|
245
|
+
sharpops: 'sharp-ops',
|
|
246
|
+
'theme-b': 'sharp-ops',
|
|
247
|
+
'soft-contrast': 'soft-contrast',
|
|
248
|
+
softcontrast: 'soft-contrast',
|
|
249
|
+
'theme-c': 'soft-contrast',
|
|
250
|
+
'neon-grid': 'neon-grid',
|
|
251
|
+
neongrid: 'neon-grid',
|
|
252
|
+
'theme-d': 'neon-grid',
|
|
253
|
+
'production-safe': 'production-safe',
|
|
254
|
+
productionsafe: 'production-safe',
|
|
255
|
+
'theme-e': 'production-safe',
|
|
256
|
+
});
|
|
257
|
+
const getLoggerColorThemeName = () => {
|
|
258
|
+
const normalized = getEnvString('LOG_COLOR_THEME', 'arctic')
|
|
259
|
+
.trim()
|
|
260
|
+
.toLowerCase()
|
|
261
|
+
.replaceAll('_', '-')
|
|
262
|
+
.replaceAll(' ', '-');
|
|
263
|
+
return LOGGER_COLOR_THEME_ALIASES[normalized] ?? 'arctic';
|
|
264
|
+
};
|
|
265
|
+
const getLoggerColorTheme = () => REQUEST_LOG_COLOR_THEMES[getLoggerColorThemeName()];
|
|
266
|
+
const REQUEST_LOG_PATTERN = /^(\[[A-Z]+\])\s(.+?)\s(\d{3}(?: [A-Za-z][A-Za-z' -]*)?)\s\((\d+)ms\)(\s\[[^\]]+\])?$/;
|
|
267
|
+
const colorize = (value, colorCode) => `${colorCode}${value}${ANSI.reset}`;
|
|
268
|
+
const shouldColorizeConsoleText = () => {
|
|
269
|
+
if (isJsonFormat(getLogFormat()))
|
|
270
|
+
return false;
|
|
271
|
+
const configured = getEnvString('LOG_COLOR', 'auto').trim().toLowerCase();
|
|
272
|
+
if (configured === 'false' ||
|
|
273
|
+
configured === '0' ||
|
|
274
|
+
configured === 'off' ||
|
|
275
|
+
configured === 'never') {
|
|
276
|
+
return false;
|
|
277
|
+
}
|
|
278
|
+
if (configured === 'true' ||
|
|
279
|
+
configured === '1' ||
|
|
280
|
+
configured === 'on' ||
|
|
281
|
+
configured === 'always') {
|
|
282
|
+
return true;
|
|
283
|
+
}
|
|
284
|
+
if (getEnvString('NO_COLOR', '').trim() !== '')
|
|
285
|
+
return false;
|
|
286
|
+
if (typeof process === 'undefined')
|
|
287
|
+
return true;
|
|
288
|
+
return process.stdout?.isTTY !== false;
|
|
289
|
+
};
|
|
290
|
+
const getLevelColor = (level) => {
|
|
291
|
+
return getLoggerColorTheme().level[level];
|
|
292
|
+
};
|
|
293
|
+
const getMethodColor = (methodToken) => {
|
|
294
|
+
const theme = getLoggerColorTheme();
|
|
295
|
+
const method = methodToken.replaceAll('[', '').replaceAll(']', '');
|
|
296
|
+
return theme.method[method] ?? theme.methodFallback;
|
|
297
|
+
};
|
|
298
|
+
const getStatusColor = (status) => {
|
|
299
|
+
const theme = getLoggerColorTheme();
|
|
300
|
+
if (status === 419)
|
|
301
|
+
return theme.status.special;
|
|
302
|
+
if (status >= 500)
|
|
303
|
+
return theme.status.error;
|
|
304
|
+
if (status >= 400)
|
|
305
|
+
return theme.status.warn;
|
|
306
|
+
if (status >= 300)
|
|
307
|
+
return theme.status.redirect;
|
|
308
|
+
if (status >= 200)
|
|
309
|
+
return theme.status.success;
|
|
310
|
+
return theme.status.fallback;
|
|
311
|
+
};
|
|
312
|
+
const getDurationColor = (durationMs) => {
|
|
313
|
+
const theme = getLoggerColorTheme();
|
|
314
|
+
if (durationMs >= 1000)
|
|
315
|
+
return theme.duration.critical;
|
|
316
|
+
if (durationMs >= 250)
|
|
317
|
+
return theme.duration.slow;
|
|
318
|
+
if (durationMs >= 100)
|
|
319
|
+
return theme.duration.elevated;
|
|
320
|
+
if (durationMs >= 50)
|
|
321
|
+
return theme.duration.steady;
|
|
322
|
+
return theme.duration.fast;
|
|
323
|
+
};
|
|
324
|
+
const colorizeRequestLogMessage = (line) => {
|
|
325
|
+
const match = REQUEST_LOG_PATTERN.exec(line);
|
|
326
|
+
if (!match)
|
|
327
|
+
return line;
|
|
328
|
+
const theme = getLoggerColorTheme();
|
|
329
|
+
const methodToken = match[1] ?? '';
|
|
330
|
+
const path = match[2] ?? '';
|
|
331
|
+
const statusSummary = match[3] ?? '';
|
|
332
|
+
const durationMs = Number.parseInt(match[4] ?? '0', 10);
|
|
333
|
+
const meta = (match[5] ?? '').trim();
|
|
334
|
+
const statusCode = Number.parseInt(statusSummary.split(' ')[0] ?? '0', 10);
|
|
335
|
+
const pieces = [
|
|
336
|
+
colorize(methodToken, getMethodColor(methodToken)),
|
|
337
|
+
colorize(path, theme.path),
|
|
338
|
+
colorize(statusSummary, getStatusColor(statusCode)),
|
|
339
|
+
colorize(`(${durationMs}ms)`, getDurationColor(durationMs)),
|
|
340
|
+
];
|
|
341
|
+
if (meta !== '') {
|
|
342
|
+
pieces.push(colorize(meta, theme.meta));
|
|
343
|
+
}
|
|
344
|
+
return pieces.join(' ');
|
|
345
|
+
};
|
|
346
|
+
const colorizeConsoleTextMessage = (level, line) => {
|
|
347
|
+
if (!shouldColorizeConsoleText())
|
|
348
|
+
return line;
|
|
349
|
+
const levelToken = `[${level.toUpperCase()}]`;
|
|
350
|
+
if (!line.startsWith(`${levelToken} `)) {
|
|
351
|
+
return colorize(line, getLevelColor(level));
|
|
352
|
+
}
|
|
353
|
+
const rest = line.slice(levelToken.length + 1);
|
|
354
|
+
return `${colorize(levelToken, getLevelColor(level))} ${colorizeRequestLogMessage(rest)}`;
|
|
355
|
+
};
|
|
39
356
|
// Log level priority: lower means more verbose
|
|
40
357
|
const levelPriority = {
|
|
41
358
|
debug: 0,
|
|
@@ -146,7 +463,7 @@ const getFileWriter = () => {
|
|
|
146
463
|
return;
|
|
147
464
|
if (fileWriterPromise !== undefined)
|
|
148
465
|
return;
|
|
149
|
-
fileWriterPromise = import('./FileLogWriter
|
|
466
|
+
fileWriterPromise = import('./FileLogWriter')
|
|
150
467
|
.then((mod) => {
|
|
151
468
|
fileWriter = mod.FileLogWriter;
|
|
152
469
|
return mod;
|
|
@@ -237,7 +554,7 @@ const emitCloudLogs = (event) => {
|
|
|
237
554
|
void (async () => {
|
|
238
555
|
try {
|
|
239
556
|
if (event.level === 'error' || event.level === 'fatal') {
|
|
240
|
-
const mod = await import('./logging/KvLogger
|
|
557
|
+
const mod = await import('./logging/KvLogger');
|
|
241
558
|
void mod.KvLogger.enqueue(event);
|
|
242
559
|
}
|
|
243
560
|
}
|
|
@@ -246,7 +563,7 @@ const emitCloudLogs = (event) => {
|
|
|
246
563
|
}
|
|
247
564
|
try {
|
|
248
565
|
if (event.level === 'warn' || event.level === 'error' || event.level === 'fatal') {
|
|
249
|
-
const mod = await import('./logging/SlackLogger
|
|
566
|
+
const mod = await import('./logging/SlackLogger');
|
|
250
567
|
void mod.SlackLogger.enqueue(event);
|
|
251
568
|
}
|
|
252
569
|
}
|
|
@@ -254,7 +571,7 @@ const emitCloudLogs = (event) => {
|
|
|
254
571
|
// best-effort
|
|
255
572
|
}
|
|
256
573
|
try {
|
|
257
|
-
const mod = await import('./logging/HttpLogger
|
|
574
|
+
const mod = await import('./logging/HttpLogger');
|
|
258
575
|
void mod.HttpLogger.enqueue(event);
|
|
259
576
|
}
|
|
260
577
|
catch {
|
|
@@ -274,7 +591,7 @@ const logDebug = (message, data, category) => {
|
|
|
274
591
|
console.debug(out); // eslint-disable-line no-console
|
|
275
592
|
}
|
|
276
593
|
else {
|
|
277
|
-
console.debug(out, data ?? ''); // eslint-disable-line no-console
|
|
594
|
+
console.debug(colorizeConsoleTextMessage('debug', out), data ?? ''); // eslint-disable-line no-console
|
|
278
595
|
}
|
|
279
596
|
emitCloudLogs({
|
|
280
597
|
timestamp,
|
|
@@ -296,7 +613,7 @@ const logInfo = (message, data, category) => {
|
|
|
296
613
|
console.log(out); // eslint-disable-line no-console
|
|
297
614
|
}
|
|
298
615
|
else {
|
|
299
|
-
console.log(out, data ?? ''); // eslint-disable-line no-console
|
|
616
|
+
console.log(colorizeConsoleTextMessage('info', out), data ?? ''); // eslint-disable-line no-console
|
|
300
617
|
}
|
|
301
618
|
emitCloudLogs({
|
|
302
619
|
timestamp,
|
|
@@ -318,7 +635,7 @@ const logWarn = (message, data, category) => {
|
|
|
318
635
|
console.warn(out); // eslint-disable-line no-console
|
|
319
636
|
}
|
|
320
637
|
else {
|
|
321
|
-
console.warn(out, data ?? ''); // eslint-disable-line no-console
|
|
638
|
+
console.warn(colorizeConsoleTextMessage('warn', out), data ?? ''); // eslint-disable-line no-console
|
|
322
639
|
}
|
|
323
640
|
emitCloudLogs({
|
|
324
641
|
timestamp,
|
|
@@ -346,7 +663,7 @@ const logError = (message, error, category) => {
|
|
|
346
663
|
console.error(out); // eslint-disable-line no-console
|
|
347
664
|
}
|
|
348
665
|
else {
|
|
349
|
-
console.error(out, errorMessage); // eslint-disable-line no-console
|
|
666
|
+
console.error(colorizeConsoleTextMessage('error', out), errorMessage); // eslint-disable-line no-console
|
|
350
667
|
}
|
|
351
668
|
emitCloudLogs({
|
|
352
669
|
timestamp,
|
|
@@ -374,7 +691,7 @@ const logFatal = (message, error, category) => {
|
|
|
374
691
|
console.error(out); // eslint-disable-line no-console
|
|
375
692
|
}
|
|
376
693
|
else {
|
|
377
|
-
console.error(out, errorMessage); // eslint-disable-line no-console
|
|
694
|
+
console.error(colorizeConsoleTextMessage('fatal', out), errorMessage); // eslint-disable-line no-console
|
|
378
695
|
}
|
|
379
696
|
emitCloudLogs({
|
|
380
697
|
timestamp,
|
|
@@ -443,7 +760,7 @@ export const cleanLogsOnce = async () => {
|
|
|
443
760
|
if (!shouldLogToFile())
|
|
444
761
|
return [];
|
|
445
762
|
try {
|
|
446
|
-
const mod = await import('./FileLogWriter
|
|
763
|
+
const mod = await import('./FileLogWriter');
|
|
447
764
|
const deleted = mod.cleanOnce();
|
|
448
765
|
logInfo('Log cleanup executed', { deletedCount: deleted.length });
|
|
449
766
|
return deleted;
|
|
@@ -2,5 +2,5 @@ declare const _default: {
|
|
|
2
2
|
fetch(request: Request, _env: unknown, _ctx: unknown): Promise<Response>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
5
|
-
export { ZintrustSocketHub } from '
|
|
5
|
+
export { ZintrustSocketHub } from '@zintrust/socket';
|
|
6
6
|
//# sourceMappingURL=cloudflare.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const formatHttpStatus: (status: number) => string;
|
|
2
|
+
type HttpRequestLogParams = {
|
|
3
|
+
method: string;
|
|
4
|
+
path: string;
|
|
5
|
+
status: number;
|
|
6
|
+
durationMs: number;
|
|
7
|
+
requestId?: string;
|
|
8
|
+
traceId?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const formatHttpRequestLog: (params: HttpRequestLogParams) => string;
|
|
11
|
+
export default formatHttpStatus;
|
|
12
|
+
//# sourceMappingURL=HttpStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HttpStatus.d.ts","sourceRoot":"","sources":["../../../src/http/HttpStatus.ts"],"names":[],"mappings":"AAiEA,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,KAAG,MAGjD,CAAC;AAEF,KAAK,oBAAoB,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,QAAQ,oBAAoB,KAAG,MAanE,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
const HTTP_STATUS_TEXT = Object.freeze({
|
|
2
|
+
100: 'Continue',
|
|
3
|
+
101: 'Switching Protocols',
|
|
4
|
+
102: 'Processing',
|
|
5
|
+
103: 'Early Hints',
|
|
6
|
+
200: 'OK',
|
|
7
|
+
201: 'Created',
|
|
8
|
+
202: 'Accepted',
|
|
9
|
+
203: 'Non-Authoritative Information',
|
|
10
|
+
204: 'No Content',
|
|
11
|
+
205: 'Reset Content',
|
|
12
|
+
206: 'Partial Content',
|
|
13
|
+
207: 'Multi-Status',
|
|
14
|
+
208: 'Already Reported',
|
|
15
|
+
226: 'IM Used',
|
|
16
|
+
300: 'Multiple Choices',
|
|
17
|
+
301: 'Moved Permanently',
|
|
18
|
+
302: 'Found',
|
|
19
|
+
303: 'See Other',
|
|
20
|
+
304: 'Not Modified',
|
|
21
|
+
305: 'Use Proxy',
|
|
22
|
+
307: 'Temporary Redirect',
|
|
23
|
+
308: 'Permanent Redirect',
|
|
24
|
+
400: 'Bad Request',
|
|
25
|
+
401: 'Unauthorized',
|
|
26
|
+
402: 'Payment Required',
|
|
27
|
+
403: 'Forbidden',
|
|
28
|
+
404: 'Not Found',
|
|
29
|
+
405: 'Method Not Allowed',
|
|
30
|
+
406: 'Not Acceptable',
|
|
31
|
+
407: 'Proxy Authentication Required',
|
|
32
|
+
408: 'Request Timeout',
|
|
33
|
+
409: 'Conflict',
|
|
34
|
+
410: 'Gone',
|
|
35
|
+
411: 'Length Required',
|
|
36
|
+
412: 'Precondition Failed',
|
|
37
|
+
413: 'Payload Too Large',
|
|
38
|
+
414: 'URI Too Long',
|
|
39
|
+
415: 'Unsupported Media Type',
|
|
40
|
+
416: 'Range Not Satisfiable',
|
|
41
|
+
417: 'Expectation Failed',
|
|
42
|
+
418: "I'm a teapot",
|
|
43
|
+
421: 'Misdirected Request',
|
|
44
|
+
422: 'Unprocessable Entity',
|
|
45
|
+
423: 'Locked',
|
|
46
|
+
424: 'Failed Dependency',
|
|
47
|
+
425: 'Too Early',
|
|
48
|
+
426: 'Upgrade Required',
|
|
49
|
+
428: 'Precondition Required',
|
|
50
|
+
429: 'Too Many Requests',
|
|
51
|
+
431: 'Request Header Fields Too Large',
|
|
52
|
+
451: 'Unavailable For Legal Reasons',
|
|
53
|
+
500: 'Internal Server Error',
|
|
54
|
+
501: 'Not Implemented',
|
|
55
|
+
502: 'Bad Gateway',
|
|
56
|
+
503: 'Service Unavailable',
|
|
57
|
+
504: 'Gateway Timeout',
|
|
58
|
+
505: 'HTTP Version Not Supported',
|
|
59
|
+
506: 'Variant Also Negotiates',
|
|
60
|
+
507: 'Insufficient Storage',
|
|
61
|
+
508: 'Loop Detected',
|
|
62
|
+
510: 'Not Extended',
|
|
63
|
+
511: 'Network Authentication Required',
|
|
64
|
+
});
|
|
65
|
+
export const formatHttpStatus = (status) => {
|
|
66
|
+
const statusText = HTTP_STATUS_TEXT[String(status)];
|
|
67
|
+
return typeof statusText === 'string' ? `${status} ${statusText}` : String(status);
|
|
68
|
+
};
|
|
69
|
+
export const formatHttpRequestLog = (params) => {
|
|
70
|
+
const base = `[${params.method}] ${params.path} ${formatHttpStatus(params.status)} (${params.durationMs}ms)`;
|
|
71
|
+
const meta = [];
|
|
72
|
+
if (typeof params.requestId === 'string' && params.requestId.trim() !== '') {
|
|
73
|
+
meta.push(`requestId=${params.requestId}`);
|
|
74
|
+
}
|
|
75
|
+
if (typeof params.traceId === 'string' && params.traceId.trim() !== '') {
|
|
76
|
+
meta.push(`trace=${params.traceId}`);
|
|
77
|
+
}
|
|
78
|
+
return meta.length > 0 ? `${base} [${meta.join(' ')}]` : base;
|
|
79
|
+
};
|
|
80
|
+
export default formatHttpStatus;
|
package/src/http/Kernel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Kernel.d.ts","sourceRoot":"","sources":["../../../src/http/Kernel.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,KAAK,EAAE,OAAO,EAAc,MAAM,qBAAqB,CAAC;AAE/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEhF,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAK7E,OAAO,KAAK,EAAE,SAAS,EAAmB,MAAM,mBAAmB,CAAC;AAQpE,MAAM,WAAW,OAAO;IACtB,MAAM,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjE,aAAa,CAAC,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,GAAG,IAAI,CAAC;IAC/C,wBAAwB,CAAC,GAAG,UAAU,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAC5D,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IACpE,SAAS,IAAI,OAAO,CAAC;IACrB,YAAY,IAAI,iBAAiB,CAAC;IAClC,kBAAkB,IAAI,gBAAgB,CAAC;IAGvC,gBAAgB,CAAC,QAAQ,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5C,cAAc,IAAI,IAAI,CAAC;IACvB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9C;
|
|
1
|
+
{"version":3,"file":"Kernel.d.ts","sourceRoot":"","sources":["../../../src/http/Kernel.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,KAAK,EAAE,OAAO,EAAc,MAAM,qBAAqB,CAAC;AAE/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEhF,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAK7E,OAAO,KAAK,EAAE,SAAS,EAAmB,MAAM,mBAAmB,CAAC;AAQpE,MAAM,WAAW,OAAO;IACtB,MAAM,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjE,aAAa,CAAC,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,GAAG,IAAI,CAAC;IAC/C,wBAAwB,CAAC,GAAG,UAAU,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAC5D,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IACpE,SAAS,IAAI,OAAO,CAAC;IACrB,YAAY,IAAI,iBAAiB,CAAC;IAClC,kBAAkB,IAAI,gBAAgB,CAAC;IAGvC,gBAAgB,CAAC,QAAQ,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5C,cAAc,IAAI,IAAI,CAAC;IACvB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9C;AAwWD,eAAO,MAAM,MAAM;qBAvEK,OAAO,aAAa,iBAAiB,KAAG,OAAO;EAyErE,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
package/src/http/Kernel.js
CHANGED
|
@@ -110,7 +110,6 @@ const maybeSetKernelTraceRoute = (traceSpan, method, routeLabel) => {
|
|
|
110
110
|
OpenTelemetry.setHttpRoute(traceSpan.span, method, routeLabel);
|
|
111
111
|
};
|
|
112
112
|
const runKernelPipeline = async (router, globalMiddleware, routeMiddleware, req, res, context, traceSpan) => {
|
|
113
|
-
Logger.info(`[${req.getMethod()}] ${req.getPath()}`);
|
|
114
113
|
const route = resolveRouteWithPreflightFallback(router, req.getMethod(), req.getPath());
|
|
115
114
|
if (route === null) {
|
|
116
115
|
const routeLabel = 'not_found';
|
package/src/index.d.ts
CHANGED
|
@@ -143,7 +143,7 @@ export type { MiddlewareKey } from './config/middleware';
|
|
|
143
143
|
export type { MiddlewareConfigType } from './config/type';
|
|
144
144
|
export { createBaseDrivers, queueConfig } from './config/queue';
|
|
145
145
|
export type { QueueConfig, QueueConfigOverrides } from './config/queue';
|
|
146
|
-
export {
|
|
146
|
+
export { default as broadcastConfig, clearBroadcastConfigCache } from './config/broadcast';
|
|
147
147
|
export type { BroadcastConfigOverrides, SocketBroadcastConfig } from './config/broadcast';
|
|
148
148
|
export { default as notificationConfig } from './config/notification';
|
|
149
149
|
export type { NotificationConfig, NotificationConfigOverrides } from './config/notification';
|
|
@@ -181,6 +181,7 @@ export { NotificationRegistry } from './tools/notification/Registry';
|
|
|
181
181
|
export { MarkdownRenderer } from './tools/templates';
|
|
182
182
|
export { RuntimeHealthProbes } from './health/RuntimeHealthProbes';
|
|
183
183
|
export { Broadcast } from './tools/broadcast/Broadcast';
|
|
184
|
+
export type { BroadcastPublishInput, BroadcastPublishResult } from './tools/broadcast/Broadcast';
|
|
184
185
|
export { BroadcastRegistry } from './tools/broadcast/BroadcastRegistry';
|
|
185
186
|
export { registerBroadcastersFromRuntimeConfig } from './tools/broadcast/BroadcastRuntimeRegistration';
|
|
186
187
|
export { Storage } from './tools/storage/index';
|