@bsb/tests 0.0.1
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/README.md +7 -0
- package/bin/bsb-tests.cjs +376 -0
- package/docs/index.md +101 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.js +24 -0
- package/lib/index.js.map +1 -0
- package/lib/mocks.d.ts +39 -0
- package/lib/mocks.js +191 -0
- package/lib/mocks.js.map +1 -0
- package/lib/plugins/config-default/index.d.ts +27 -0
- package/lib/plugins/config-default/index.js +172 -0
- package/lib/plugins/config-default/index.js.map +1 -0
- package/lib/plugins/events-default/index.d.ts +27 -0
- package/lib/plugins/events-default/index.js +143 -0
- package/lib/plugins/events-default/index.js.map +1 -0
- package/lib/plugins/logging-default/index.d.ts +27 -0
- package/lib/plugins/logging-default/index.js +390 -0
- package/lib/plugins/logging-default/index.js.map +1 -0
- package/lib/plugins/observable-default/index.d.ts +27 -0
- package/lib/plugins/observable-default/index.js +166 -0
- package/lib/plugins/observable-default/index.js.map +1 -0
- package/lib/runner/plugin-custom.d.ts +1 -0
- package/lib/runner/plugin-custom.js +119 -0
- package/lib/runner/plugin-custom.js.map +1 -0
- package/lib/runner/plugin-events.d.ts +1 -0
- package/lib/runner/plugin-events.js +37 -0
- package/lib/runner/plugin-events.js.map +1 -0
- package/lib/runner/plugin-observable.d.ts +1 -0
- package/lib/runner/plugin-observable.js +22 -0
- package/lib/runner/plugin-observable.js.map +1 -0
- package/lib/runner/setup.d.ts +1 -0
- package/lib/runner/setup.js +19 -0
- package/lib/runner/setup.js.map +1 -0
- package/lib/sb/plugins/events/broadcast.d.ts +30 -0
- package/lib/sb/plugins/events/broadcast.js +390 -0
- package/lib/sb/plugins/events/broadcast.js.map +1 -0
- package/lib/sb/plugins/events/emit.d.ts +30 -0
- package/lib/sb/plugins/events/emit.js +386 -0
- package/lib/sb/plugins/events/emit.js.map +1 -0
- package/lib/sb/plugins/events/emitAndReturn.d.ts +30 -0
- package/lib/sb/plugins/events/emitAndReturn.js +415 -0
- package/lib/sb/plugins/events/emitAndReturn.js.map +1 -0
- package/lib/sb/plugins/events/emitStreamAndReceiveStream.d.ts +30 -0
- package/lib/sb/plugins/events/emitStreamAndReceiveStream.js +331 -0
- package/lib/sb/plugins/events/emitStreamAndReceiveStream.js.map +1 -0
- package/lib/sb/plugins/events/index.d.ts +28 -0
- package/lib/sb/plugins/events/index.js +69 -0
- package/lib/sb/plugins/events/index.js.map +1 -0
- package/lib/sb/plugins/events/plugin.d.ts +0 -0
- package/lib/sb/plugins/events/plugin.js +2 -0
- package/lib/sb/plugins/events/plugin.js.map +1 -0
- package/lib/sb/plugins/observable/index.d.ts +28 -0
- package/lib/sb/plugins/observable/index.js +141 -0
- package/lib/sb/plugins/observable/index.js.map +1 -0
- package/lib/trace.d.ts +40 -0
- package/lib/trace.js +85 -0
- package/lib/trace.js.map +1 -0
- package/package.json +51 -0
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* BSB (Better-Service-Base) is an event-bus based microservice framework.
|
|
4
|
+
* Copyright (C) 2016 - 2025 BetterCorp (PTY) Ltd
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License as published
|
|
8
|
+
* by the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* Alternatively, you may obtain a commercial license for this program.
|
|
12
|
+
* The commercial license allows you to use the Program in a closed-source manner,
|
|
13
|
+
* including the right to create derivative works that are not subject to the terms
|
|
14
|
+
* of the AGPL.
|
|
15
|
+
*
|
|
16
|
+
* To obtain a commercial license, please contact the copyright holders at
|
|
17
|
+
* https://www.bettercorp.dev. The terms and conditions of the commercial license
|
|
18
|
+
* will be provided upon request.
|
|
19
|
+
*
|
|
20
|
+
* This program is distributed in the hope that it will be useful,
|
|
21
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
22
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
23
|
+
* GNU Affero General Public License for more details.
|
|
24
|
+
*
|
|
25
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
26
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
27
|
+
*/
|
|
28
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
29
|
+
if (k2 === undefined) k2 = k;
|
|
30
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
31
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
32
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
33
|
+
}
|
|
34
|
+
Object.defineProperty(o, k2, desc);
|
|
35
|
+
}) : (function(o, m, k, k2) {
|
|
36
|
+
if (k2 === undefined) k2 = k;
|
|
37
|
+
o[k2] = m[k];
|
|
38
|
+
}));
|
|
39
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
40
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
41
|
+
}) : function(o, v) {
|
|
42
|
+
o["default"] = v;
|
|
43
|
+
});
|
|
44
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
45
|
+
var ownKeys = function(o) {
|
|
46
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
47
|
+
var ar = [];
|
|
48
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
49
|
+
return ar;
|
|
50
|
+
};
|
|
51
|
+
return ownKeys(o);
|
|
52
|
+
};
|
|
53
|
+
return function (mod) {
|
|
54
|
+
if (mod && mod.__esModule) return mod;
|
|
55
|
+
var result = {};
|
|
56
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
57
|
+
__setModuleDefault(result, mod);
|
|
58
|
+
return result;
|
|
59
|
+
};
|
|
60
|
+
})();
|
|
61
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
62
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
63
|
+
};
|
|
64
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
|
+
const assert = __importStar(require("assert"));
|
|
66
|
+
const path_1 = __importDefault(require("path"));
|
|
67
|
+
const trace_1 = require("../../trace");
|
|
68
|
+
const mocks_1 = require("../../mocks");
|
|
69
|
+
const pluginModule = process.env.BSB_TEST_PLUGIN_MODULE;
|
|
70
|
+
if (!pluginModule) {
|
|
71
|
+
throw new Error("BSB_TEST_PLUGIN_MODULE is required for logging-default tests");
|
|
72
|
+
}
|
|
73
|
+
const resolvedModule = path_1.default.resolve(pluginModule);
|
|
74
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
75
|
+
const mod = require(resolvedModule);
|
|
76
|
+
const Plugin = mod.Plugin || mod.default || mod;
|
|
77
|
+
const LOG_LEVELS = mod.LOG_LEVELS;
|
|
78
|
+
describe("plugins/logging-default", () => {
|
|
79
|
+
const obs = (0, trace_1.createTestObservable)();
|
|
80
|
+
const dummyTrace = obs.trace; // logging-default plugin still uses DTrace internally
|
|
81
|
+
describe("console.x", () => {
|
|
82
|
+
const tempCCStore = {
|
|
83
|
+
log: null,
|
|
84
|
+
error: null,
|
|
85
|
+
warn: null,
|
|
86
|
+
debug: null,
|
|
87
|
+
};
|
|
88
|
+
const listOfConsoles = Object.keys(tempCCStore);
|
|
89
|
+
let consoleEventCalled = -1;
|
|
90
|
+
let consoleExpectMessageContent = null;
|
|
91
|
+
const storeConsole = (expect, expectMessage, expectMessageContent) => {
|
|
92
|
+
consoleEventCalled = 0;
|
|
93
|
+
for (const consol of listOfConsoles) {
|
|
94
|
+
tempCCStore[consol] = console[consol];
|
|
95
|
+
}
|
|
96
|
+
if (expectMessageContent !== undefined) {
|
|
97
|
+
consoleExpectMessageContent = {
|
|
98
|
+
expectMessageContent,
|
|
99
|
+
logs: [],
|
|
100
|
+
};
|
|
101
|
+
for (const consol of listOfConsoles.filter((x) => x !== expect)) {
|
|
102
|
+
console[consol] = () => {
|
|
103
|
+
consoleEventCalled = 1;
|
|
104
|
+
assert.fail("Invalid console called!: " + consol);
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
for (const consol of listOfConsoles.filter((x) => x === expect)) {
|
|
108
|
+
console[consol] = (...data) => {
|
|
109
|
+
consoleEventCalled = 1;
|
|
110
|
+
consoleExpectMessageContent.logs.push(data);
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
else if (expectMessage === undefined) {
|
|
115
|
+
consoleEventCalled = 1;
|
|
116
|
+
for (const consol of listOfConsoles) {
|
|
117
|
+
console[consol] = () => {
|
|
118
|
+
consoleEventCalled = 0;
|
|
119
|
+
assert.fail("Invalid console called!: " + consol);
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
for (const consol of listOfConsoles.filter((x) => x !== expect)) {
|
|
125
|
+
console[consol] = () => {
|
|
126
|
+
consoleEventCalled = 1;
|
|
127
|
+
assert.fail("Invalid console called!: " + consol);
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
for (const consol of listOfConsoles.filter((x) => x === expect)) {
|
|
131
|
+
console[consol] = (...data) => {
|
|
132
|
+
consoleEventCalled = 1;
|
|
133
|
+
assert.equal(data.length, expectMessage.length);
|
|
134
|
+
for (let xx = 0; xx < expectMessage.length; xx++) {
|
|
135
|
+
if (expectMessage[xx] === null) {
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
// Handle timestamped log format: split on | and compare only the message part
|
|
139
|
+
const actualMessage = typeof data[xx] === 'string' && data[xx].includes(' | ')
|
|
140
|
+
? data[xx].split(' | ')[1]
|
|
141
|
+
: data[xx];
|
|
142
|
+
assert.equal(actualMessage, expectMessage[xx]);
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
const restoreConsole = () => {
|
|
149
|
+
for (const consol of listOfConsoles) {
|
|
150
|
+
console[consol] = tempCCStore[consol];
|
|
151
|
+
}
|
|
152
|
+
if (consoleEventCalled === -1) {
|
|
153
|
+
assert.fail("Console not setup!");
|
|
154
|
+
}
|
|
155
|
+
if (consoleEventCalled === 0) {
|
|
156
|
+
assert.fail("No console called!");
|
|
157
|
+
}
|
|
158
|
+
if (consoleEventCalled === 1 && consoleExpectMessageContent !== null) {
|
|
159
|
+
for (let xx = 0; xx < consoleExpectMessageContent.expectMessageContent.length; xx++) {
|
|
160
|
+
let has = false;
|
|
161
|
+
for (const item of consoleExpectMessageContent.logs) {
|
|
162
|
+
const itemStr = item.toString();
|
|
163
|
+
// Handle timestamped log format: split on | and check only the message part
|
|
164
|
+
const messagePart = itemStr.includes(' | ') ? itemStr.split(' | ')[1] : itemStr;
|
|
165
|
+
if (messagePart.indexOf(consoleExpectMessageContent.expectMessageContent[xx]) >= 0) {
|
|
166
|
+
has = true;
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
assert.ok(has, `Does not contain '${consoleExpectMessageContent.expectMessageContent[xx]}': ${consoleExpectMessageContent.logs.join(",")}`);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
consoleEventCalled = -1;
|
|
174
|
+
consoleExpectMessageContent = null;
|
|
175
|
+
};
|
|
176
|
+
it("should console a debug event", async () => {
|
|
177
|
+
const plugin = new Plugin((0, mocks_1.getLoggingConstructorConfig)());
|
|
178
|
+
storeConsole("debug", [
|
|
179
|
+
null,
|
|
180
|
+
"[DEBUG] [DEFAULT-DBG] [TRACE ID ERROR:SPAN ID ERROR] My Msg",
|
|
181
|
+
]);
|
|
182
|
+
await plugin.debug("default-DbG", dummyTrace, "My Msg", {});
|
|
183
|
+
restoreConsole();
|
|
184
|
+
});
|
|
185
|
+
it("should console a debug event (meta)", async () => {
|
|
186
|
+
const plugin = new Plugin((0, mocks_1.getLoggingConstructorConfig)());
|
|
187
|
+
storeConsole("debug", [
|
|
188
|
+
null,
|
|
189
|
+
"[DEBUG] [DEFAULT-DBG] [TRACE ID ERROR:SPAN ID ERROR] My Msg cHEESE and a,b (5)",
|
|
190
|
+
]);
|
|
191
|
+
await plugin.debug("default-DbG", dummyTrace, "My Msg {che} and {chi} ({te})", {
|
|
192
|
+
che: "cHEESE",
|
|
193
|
+
chi: ["a", "b"],
|
|
194
|
+
te: 5,
|
|
195
|
+
});
|
|
196
|
+
restoreConsole();
|
|
197
|
+
});
|
|
198
|
+
it("should console a info event", async () => {
|
|
199
|
+
const plugin = new Plugin((0, mocks_1.getLoggingConstructorConfig)());
|
|
200
|
+
storeConsole("log", [
|
|
201
|
+
null,
|
|
202
|
+
"[INFO] [INFO-DBG] [TRACE ID ERROR:SPAN ID ERROR] My Msg",
|
|
203
|
+
]);
|
|
204
|
+
await plugin.info("info-DbG", dummyTrace, "My Msg", {});
|
|
205
|
+
restoreConsole();
|
|
206
|
+
});
|
|
207
|
+
it("should console a info event (meta)", async () => {
|
|
208
|
+
const plugin = new Plugin((0, mocks_1.getLoggingConstructorConfig)());
|
|
209
|
+
storeConsole("log", [
|
|
210
|
+
null,
|
|
211
|
+
"[INFO] [INFO-DBG] [TRACE ID ERROR:SPAN ID ERROR] My Msg cHEESE and a,b (5)",
|
|
212
|
+
]);
|
|
213
|
+
await plugin.info("info-DbG", dummyTrace, "My Msg {che} and {chi} ({te})", {
|
|
214
|
+
che: "cHEESE",
|
|
215
|
+
chi: ["a", "b"],
|
|
216
|
+
te: 5,
|
|
217
|
+
});
|
|
218
|
+
restoreConsole();
|
|
219
|
+
});
|
|
220
|
+
it("should console a error event", async () => {
|
|
221
|
+
const plugin = new Plugin((0, mocks_1.getLoggingConstructorConfig)());
|
|
222
|
+
storeConsole("error", [
|
|
223
|
+
null,
|
|
224
|
+
"[ERROR] [INFEE-DBG] [TRACE ID ERROR:SPAN ID ERROR] My Msg",
|
|
225
|
+
]);
|
|
226
|
+
await plugin.error("infee-DbG", dummyTrace, "My Msg", {});
|
|
227
|
+
restoreConsole();
|
|
228
|
+
});
|
|
229
|
+
it("should console a error event (meta)", async () => {
|
|
230
|
+
const plugin = new Plugin((0, mocks_1.getLoggingConstructorConfig)());
|
|
231
|
+
storeConsole("error", [
|
|
232
|
+
null,
|
|
233
|
+
"[ERROR] [INFE-DBG] [TRACE ID ERROR:SPAN ID ERROR] My Msg cHEESE and a,b (5)",
|
|
234
|
+
]);
|
|
235
|
+
await plugin.error("infe-DbG", dummyTrace, "My Msg {che} and {chi} ({te})", {
|
|
236
|
+
che: "cHEESE",
|
|
237
|
+
chi: ["a", "b"],
|
|
238
|
+
te: 5,
|
|
239
|
+
});
|
|
240
|
+
restoreConsole();
|
|
241
|
+
});
|
|
242
|
+
it("should console a warn event", async () => {
|
|
243
|
+
const plugin = new Plugin((0, mocks_1.getLoggingConstructorConfig)());
|
|
244
|
+
storeConsole("warn", [
|
|
245
|
+
null,
|
|
246
|
+
"[WARN] [INFOW-DBG] [TRACE ID ERROR:SPAN ID ERROR] My Msg",
|
|
247
|
+
]);
|
|
248
|
+
await plugin.warn("infoW-DbG", dummyTrace, "My Msg", {});
|
|
249
|
+
restoreConsole();
|
|
250
|
+
});
|
|
251
|
+
it("should console a warn event (meta)", async () => {
|
|
252
|
+
const plugin = new Plugin((0, mocks_1.getLoggingConstructorConfig)());
|
|
253
|
+
storeConsole("warn", [
|
|
254
|
+
null,
|
|
255
|
+
"[WARN] [INFW-DBG] [TRACE ID ERROR:SPAN ID ERROR] My Msg cHEESE and a,b (5)",
|
|
256
|
+
]);
|
|
257
|
+
await plugin.warn("infW-DbG", dummyTrace, "My Msg {che} and {chi} ({te})", {
|
|
258
|
+
che: "cHEESE",
|
|
259
|
+
chi: ["a", "b"],
|
|
260
|
+
te: 5,
|
|
261
|
+
});
|
|
262
|
+
restoreConsole();
|
|
263
|
+
});
|
|
264
|
+
it("running debug, should debug everything", async () => {
|
|
265
|
+
const plugin = new Plugin((0, mocks_1.getLoggingConstructorConfig)("development"));
|
|
266
|
+
storeConsole("debug", [
|
|
267
|
+
null,
|
|
268
|
+
"[DEBUG] [DEFAULT-DBG] [TRACE ID ERROR:SPAN ID ERROR] My Msg cHEESE and a,b (5)",
|
|
269
|
+
]);
|
|
270
|
+
await plugin.debug("default-DbG", dummyTrace, "My Msg {che} and {chi} ({te})", {
|
|
271
|
+
che: "cHEESE",
|
|
272
|
+
chi: ["a", "b"],
|
|
273
|
+
te: 5,
|
|
274
|
+
});
|
|
275
|
+
restoreConsole();
|
|
276
|
+
});
|
|
277
|
+
it("running non-debug, should not debug anything", async () => {
|
|
278
|
+
const plugin = new Plugin((0, mocks_1.getLoggingConstructorConfig)("production"));
|
|
279
|
+
storeConsole("debug");
|
|
280
|
+
await plugin.debug("infW-DbG", dummyTrace, "My Msg {che} and {chi} ({te})", {
|
|
281
|
+
che: "cHEESE",
|
|
282
|
+
chi: ["a", "b"],
|
|
283
|
+
te: 5,
|
|
284
|
+
});
|
|
285
|
+
restoreConsole();
|
|
286
|
+
});
|
|
287
|
+
it("running live-debug, should debug", async () => {
|
|
288
|
+
const plugin = new Plugin((0, mocks_1.getLoggingConstructorConfig)("development"));
|
|
289
|
+
storeConsole("debug", [
|
|
290
|
+
null,
|
|
291
|
+
"[DEBUG] [INFW-DBG] [TRACE ID ERROR:SPAN ID ERROR] My Msg cHEESE and a,b (5)",
|
|
292
|
+
]);
|
|
293
|
+
await plugin.debug("infW-DbG", dummyTrace, "My Msg {che} and {chi} ({te})", {
|
|
294
|
+
che: "cHEESE",
|
|
295
|
+
chi: ["a", "b"],
|
|
296
|
+
te: 5,
|
|
297
|
+
});
|
|
298
|
+
restoreConsole();
|
|
299
|
+
});
|
|
300
|
+
it("Stack report", async () => {
|
|
301
|
+
const plugin = new Plugin((0, mocks_1.getLoggingConstructorConfig)());
|
|
302
|
+
storeConsole("error", undefined, ["Stack trace for: Error: My Error\n at Context.<anonymous>"]);
|
|
303
|
+
await plugin.error("infW-DbG", dummyTrace, "My Msg", new Error("My Error"));
|
|
304
|
+
restoreConsole();
|
|
305
|
+
});
|
|
306
|
+
});
|
|
307
|
+
describe("console mocked/overriden", () => {
|
|
308
|
+
it("should mocked a debug event", async () => {
|
|
309
|
+
const fakeLogFunc = (level, message) => {
|
|
310
|
+
assert.equal(level, LOG_LEVELS.DEBUG);
|
|
311
|
+
assert.equal(message, "[DEBUG] [DEFAULT-DBG] [TRACE ID ERROR:SPAN ID ERROR] My Msg");
|
|
312
|
+
};
|
|
313
|
+
const plugin = new Plugin((0, mocks_1.getLoggingConstructorConfig)(), fakeLogFunc);
|
|
314
|
+
await plugin.debug("default-DbG", dummyTrace, "My Msg", {});
|
|
315
|
+
});
|
|
316
|
+
it("should mocked a debug event (meta)", async () => {
|
|
317
|
+
const fakeLogFunc = (level, message) => {
|
|
318
|
+
assert.equal(level, LOG_LEVELS.DEBUG);
|
|
319
|
+
assert.equal(message, "[DEBUG] [DEFAULT-DBG] [TRACE ID ERROR:SPAN ID ERROR] My Msg cHEESE and a,b (5)");
|
|
320
|
+
};
|
|
321
|
+
const plugin = new Plugin((0, mocks_1.getLoggingConstructorConfig)(), fakeLogFunc);
|
|
322
|
+
await plugin.debug("default-DbG", dummyTrace, "My Msg {che} and {chi} ({te})", {
|
|
323
|
+
che: "cHEESE",
|
|
324
|
+
chi: ["a", "b"],
|
|
325
|
+
te: 5,
|
|
326
|
+
});
|
|
327
|
+
});
|
|
328
|
+
it("should mocked a info event", async () => {
|
|
329
|
+
const fakeLogFunc = (level, message) => {
|
|
330
|
+
assert.equal(level, LOG_LEVELS.INFO);
|
|
331
|
+
assert.equal(message, "[INFO] [INFO-DBG] [TRACE ID ERROR:SPAN ID ERROR] My Msg");
|
|
332
|
+
};
|
|
333
|
+
const plugin = new Plugin((0, mocks_1.getLoggingConstructorConfig)(), fakeLogFunc);
|
|
334
|
+
await plugin.info("info-DbG", dummyTrace, "My Msg", {});
|
|
335
|
+
});
|
|
336
|
+
it("should mocked a info event (meta)", async () => {
|
|
337
|
+
const fakeLogFunc = (level, message) => {
|
|
338
|
+
assert.equal(level, LOG_LEVELS.INFO);
|
|
339
|
+
assert.equal(message, "[INFO] [INFO-DBG] [TRACE ID ERROR:SPAN ID ERROR] My Msg cHEESE and a,b (5)");
|
|
340
|
+
};
|
|
341
|
+
const plugin = new Plugin((0, mocks_1.getLoggingConstructorConfig)(), fakeLogFunc);
|
|
342
|
+
await plugin.info("info-DbG", dummyTrace, "My Msg {che} and {chi} ({te})", {
|
|
343
|
+
che: "cHEESE",
|
|
344
|
+
chi: ["a", "b"],
|
|
345
|
+
te: 5,
|
|
346
|
+
});
|
|
347
|
+
});
|
|
348
|
+
it("should mocked a error event", async () => {
|
|
349
|
+
const fakeLogFunc = (level, message) => {
|
|
350
|
+
assert.equal(level, LOG_LEVELS.ERROR);
|
|
351
|
+
assert.equal(message, "[ERROR] [INFEE-DBG] [TRACE ID ERROR:SPAN ID ERROR] My Msg");
|
|
352
|
+
};
|
|
353
|
+
const plugin = new Plugin((0, mocks_1.getLoggingConstructorConfig)(), fakeLogFunc);
|
|
354
|
+
await plugin.error("infee-DbG", dummyTrace, "My Msg", {});
|
|
355
|
+
});
|
|
356
|
+
it("should mocked a error event (meta)", async () => {
|
|
357
|
+
const fakeLogFunc = (level, message) => {
|
|
358
|
+
assert.equal(level, LOG_LEVELS.ERROR);
|
|
359
|
+
assert.equal(message, "[ERROR] [INFE-DBG] [TRACE ID ERROR:SPAN ID ERROR] My Msg cHEESE and a,b (5)");
|
|
360
|
+
};
|
|
361
|
+
const plugin = new Plugin((0, mocks_1.getLoggingConstructorConfig)(), fakeLogFunc);
|
|
362
|
+
await plugin.error("infe-DbG", dummyTrace, "My Msg {che} and {chi} ({te})", {
|
|
363
|
+
che: "cHEESE",
|
|
364
|
+
chi: ["a", "b"],
|
|
365
|
+
te: 5,
|
|
366
|
+
});
|
|
367
|
+
});
|
|
368
|
+
it("should mocked a warn event", async () => {
|
|
369
|
+
const fakeLogFunc = (level, message) => {
|
|
370
|
+
assert.equal(level, LOG_LEVELS.WARN);
|
|
371
|
+
assert.equal(message, "[WARN] [INFOW-DBG] [TRACE ID ERROR:SPAN ID ERROR] My Msg");
|
|
372
|
+
};
|
|
373
|
+
const plugin = new Plugin((0, mocks_1.getLoggingConstructorConfig)(), fakeLogFunc);
|
|
374
|
+
await plugin.warn("infoW-DbG", dummyTrace, "My Msg", {});
|
|
375
|
+
});
|
|
376
|
+
it("should mocked a warn event (meta)", async () => {
|
|
377
|
+
const fakeLogFunc = (level, message) => {
|
|
378
|
+
assert.equal(level, LOG_LEVELS.WARN);
|
|
379
|
+
assert.equal(message, "[WARN] [INFW-DBG] [TRACE ID ERROR:SPAN ID ERROR] My Msg cHEESE and a,b (5)");
|
|
380
|
+
};
|
|
381
|
+
const plugin = new Plugin((0, mocks_1.getLoggingConstructorConfig)(), fakeLogFunc);
|
|
382
|
+
await plugin.warn("infW-DbG", dummyTrace, "My Msg {che} and {chi} ({te})", {
|
|
383
|
+
che: "cHEESE",
|
|
384
|
+
chi: ["a", "b"],
|
|
385
|
+
te: 5,
|
|
386
|
+
});
|
|
387
|
+
});
|
|
388
|
+
});
|
|
389
|
+
});
|
|
390
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/logging-default/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,+CAAiC;AACjC,gDAAwB;AACxB,uCAAmD;AACnD,uCAA0D;AAE1D,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;AAExD,IAAI,CAAC,YAAY,EAAE,CAAC;IAClB,MAAM,IAAI,KAAK,CAAC,8DAA8D,CA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A+B,EAAE;gBACzE,GAAG,EAAE,QAAQ;gBACb,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;gBACf,EAAE,EAAE,CAAC;aACN,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BSB (Better-Service-Base) is an event-bus based microservice framework.
|
|
3
|
+
* Copyright (C) 2016 - 2025 BetterCorp (PTY) Ltd
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU Affero General Public License as published
|
|
7
|
+
* by the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* Alternatively, you may obtain a commercial license for this program.
|
|
11
|
+
* The commercial license allows you to use the Program in a closed-source manner,
|
|
12
|
+
* including the right to create derivative works that are not subject to the terms
|
|
13
|
+
* of the AGPL.
|
|
14
|
+
*
|
|
15
|
+
* To obtain a commercial license, please contact the copyright holders at
|
|
16
|
+
* https://www.bettercorp.dev. The terms and conditions of the commercial license
|
|
17
|
+
* will be provided upon request.
|
|
18
|
+
*
|
|
19
|
+
* This program is distributed in the hope that it will be useful,
|
|
20
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
21
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
22
|
+
* GNU Affero General Public License for more details.
|
|
23
|
+
*
|
|
24
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
25
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
26
|
+
*/
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* BSB (Better-Service-Base) is an event-bus based microservice framework.
|
|
4
|
+
* Copyright (C) 2016 - 2025 BetterCorp (PTY) Ltd
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License as published
|
|
8
|
+
* by the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* Alternatively, you may obtain a commercial license for this program.
|
|
12
|
+
* The commercial license allows you to use the Program in a closed-source manner,
|
|
13
|
+
* including the right to create derivative works that are not subject to the terms
|
|
14
|
+
* of the AGPL.
|
|
15
|
+
*
|
|
16
|
+
* To obtain a commercial license, please contact the copyright holders at
|
|
17
|
+
* https://www.bettercorp.dev. The terms and conditions of the commercial license
|
|
18
|
+
* will be provided upon request.
|
|
19
|
+
*
|
|
20
|
+
* This program is distributed in the hope that it will be useful,
|
|
21
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
22
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
23
|
+
* GNU Affero General Public License for more details.
|
|
24
|
+
*
|
|
25
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
26
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
27
|
+
*/
|
|
28
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
29
|
+
if (k2 === undefined) k2 = k;
|
|
30
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
31
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
32
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
33
|
+
}
|
|
34
|
+
Object.defineProperty(o, k2, desc);
|
|
35
|
+
}) : (function(o, m, k, k2) {
|
|
36
|
+
if (k2 === undefined) k2 = k;
|
|
37
|
+
o[k2] = m[k];
|
|
38
|
+
}));
|
|
39
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
40
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
41
|
+
}) : function(o, v) {
|
|
42
|
+
o["default"] = v;
|
|
43
|
+
});
|
|
44
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
45
|
+
var ownKeys = function(o) {
|
|
46
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
47
|
+
var ar = [];
|
|
48
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
49
|
+
return ar;
|
|
50
|
+
};
|
|
51
|
+
return ownKeys(o);
|
|
52
|
+
};
|
|
53
|
+
return function (mod) {
|
|
54
|
+
if (mod && mod.__esModule) return mod;
|
|
55
|
+
var result = {};
|
|
56
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
57
|
+
__setModuleDefault(result, mod);
|
|
58
|
+
return result;
|
|
59
|
+
};
|
|
60
|
+
})();
|
|
61
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
62
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
63
|
+
};
|
|
64
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
|
+
const assert = __importStar(require("assert"));
|
|
66
|
+
const path_1 = __importDefault(require("path"));
|
|
67
|
+
const base_1 = require("@bsb/base");
|
|
68
|
+
const trace_1 = require("../../trace");
|
|
69
|
+
const mocks_1 = require("../../mocks");
|
|
70
|
+
const pluginModule = process.env.BSB_TEST_PLUGIN_MODULE;
|
|
71
|
+
if (!pluginModule) {
|
|
72
|
+
throw new Error("BSB_TEST_PLUGIN_MODULE is required for observable-default tests");
|
|
73
|
+
}
|
|
74
|
+
const resolvedModule = path_1.default.resolve(pluginModule);
|
|
75
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
76
|
+
const mod = require(resolvedModule);
|
|
77
|
+
const Plugin = mod.Plugin || mod.default || mod;
|
|
78
|
+
describe("plugins/observable-default", () => {
|
|
79
|
+
const obs = (0, trace_1.createTestObservable)();
|
|
80
|
+
const dummyTrace = obs.trace;
|
|
81
|
+
const tempConsole = {
|
|
82
|
+
log: null,
|
|
83
|
+
error: null,
|
|
84
|
+
warn: null,
|
|
85
|
+
debug: null,
|
|
86
|
+
};
|
|
87
|
+
const list = Object.keys(tempConsole);
|
|
88
|
+
let consoleCalled = -1;
|
|
89
|
+
const storeConsole = (expect, expectContains) => {
|
|
90
|
+
consoleCalled = 0;
|
|
91
|
+
for (const key of list) {
|
|
92
|
+
tempConsole[key] = console[key];
|
|
93
|
+
}
|
|
94
|
+
for (const key of list) {
|
|
95
|
+
console[key] = () => {
|
|
96
|
+
consoleCalled = 1;
|
|
97
|
+
if (expect && key !== expect) {
|
|
98
|
+
assert.fail("Invalid console called: " + key);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
if (expectContains) {
|
|
103
|
+
console[expect] = (...data) => {
|
|
104
|
+
consoleCalled = 1;
|
|
105
|
+
const text = data.map((item) => String(item)).join(" ");
|
|
106
|
+
const messagePart = text.includes(" | ") ? text.split(" | ")[1] : text;
|
|
107
|
+
assert.ok(messagePart.includes(expectContains));
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
const restoreConsole = () => {
|
|
112
|
+
for (const key of list) {
|
|
113
|
+
console[key] = tempConsole[key];
|
|
114
|
+
}
|
|
115
|
+
if (consoleCalled === -1) {
|
|
116
|
+
assert.fail("Console not setup!");
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
it("should log debug when not production", async () => {
|
|
120
|
+
const plugin = new Plugin((0, mocks_1.getObservableConstructorConfig)("development"));
|
|
121
|
+
storeConsole("debug", "[DEBUG]");
|
|
122
|
+
plugin.debug(dummyTrace, "test-plugin", "My Msg", {});
|
|
123
|
+
restoreConsole();
|
|
124
|
+
});
|
|
125
|
+
it("should not log debug in production", async () => {
|
|
126
|
+
const plugin = new Plugin((0, mocks_1.getObservableConstructorConfig)("production"));
|
|
127
|
+
storeConsole(null);
|
|
128
|
+
plugin.debug(dummyTrace, "test-plugin", "My Msg", {});
|
|
129
|
+
restoreConsole();
|
|
130
|
+
assert.ok(consoleCalled === 0);
|
|
131
|
+
});
|
|
132
|
+
it("should log info", async () => {
|
|
133
|
+
const plugin = new Plugin((0, mocks_1.getObservableConstructorConfig)());
|
|
134
|
+
storeConsole("log", "[INFO]");
|
|
135
|
+
plugin.info(dummyTrace, "info-plugin", "My Msg", {});
|
|
136
|
+
restoreConsole();
|
|
137
|
+
});
|
|
138
|
+
it("should log warn", async () => {
|
|
139
|
+
const plugin = new Plugin((0, mocks_1.getObservableConstructorConfig)());
|
|
140
|
+
storeConsole("warn", "[WARN]");
|
|
141
|
+
plugin.warn(dummyTrace, "warn-plugin", "My Msg", {});
|
|
142
|
+
restoreConsole();
|
|
143
|
+
});
|
|
144
|
+
it("should log error with string", async () => {
|
|
145
|
+
const plugin = new Plugin((0, mocks_1.getObservableConstructorConfig)());
|
|
146
|
+
storeConsole("error", "[ERROR]");
|
|
147
|
+
plugin.error(dummyTrace, "err-plugin", "My Msg", {});
|
|
148
|
+
restoreConsole();
|
|
149
|
+
});
|
|
150
|
+
it("should log error with BSBError raw", async () => {
|
|
151
|
+
const plugin = new Plugin((0, mocks_1.getObservableConstructorConfig)());
|
|
152
|
+
const err = new base_1.BSBError(dummyTrace, "My Msg");
|
|
153
|
+
storeConsole("error", "[ERROR]");
|
|
154
|
+
plugin.error(dummyTrace, "err-plugin", err, {});
|
|
155
|
+
restoreConsole();
|
|
156
|
+
});
|
|
157
|
+
it("should log error with BSBError without raw", async () => {
|
|
158
|
+
const plugin = new Plugin((0, mocks_1.getObservableConstructorConfig)());
|
|
159
|
+
const err = new base_1.BSBError(dummyTrace, "My Msg");
|
|
160
|
+
err.raw = null;
|
|
161
|
+
storeConsole("error", "[ERROR]");
|
|
162
|
+
plugin.error(dummyTrace, "err-plugin", err, {});
|
|
163
|
+
restoreConsole();
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/observable-default/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,+CAAiC;AACjC,gDAAwB;AACxB,oCAAqC;AACrC,uCAAmD;AACnD,uCAA6D;AAE7D,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;AAExD,IAAI,CAAC,YAAY,EAAE,CAAC;IAClB,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;AACrF,CAAC;AAED,MAAM,cAAc,GAAG,cAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;AAClD,8DAA8D;AAC9D,MAAM,GAAG,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AACpC,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC;AAEhD,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IAC1C,MAAM,GAAG,GAAG,IAAA,4BAAoB,GAAE,CAAC;IACnC,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC;IAE7B,MAAM,WAAW,GAAwB;QACvC,GAAG,EAAE,IAAI;QACT,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,IAAI;KACZ,CAAC;IAEF,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACtC,IAAI,aAAa,GAAG,CAAC,CAAC,CAAC;IAEvB,MAAM,YAAY,GAAG,CAAC,MAAqB,EAAE,cAAuB,EAAE,EAAE;QACtE,aAAa,GAAG,CAAC,CAAC;QAClB,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,WAAW,CAAC,GAAG,CAAC,GA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