@blamejs/core 0.9.28 → 0.9.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +885 -875
- package/index.js +18 -1
- package/lib/agent-snapshot.js +346 -0
- package/lib/agent-trace.js +218 -0
- package/lib/guard-all.js +1 -0
- package/lib/guard-dsn.js +379 -0
- package/lib/guard-envelope.js +294 -0
- package/lib/guard-smtp-command.js +484 -0
- package/lib/guard-snapshot-envelope.js +168 -0
- package/lib/guard-trace-context.js +172 -0
- package/lib/ip-utils.js +102 -0
- package/lib/mail-auth.js +4 -35
- package/lib/mail-greylist.js +448 -0
- package/lib/mail-helo.js +473 -0
- package/lib/mail-rbl.js +392 -0
- package/lib/mail.js +2 -1
- package/lib/network-dns-resolver.js +500 -0
- package/lib/network.js +1 -0
- package/lib/redis-client.js +2 -1
- package/lib/safe-dns.js +665 -0
- package/lib/tracing.js +36 -0
- package/package.json +1 -1
- package/sbom.cdx.json +6 -6
package/lib/tracing.js
CHANGED
|
@@ -304,6 +304,41 @@ function create(opts) {
|
|
|
304
304
|
return span(name, fn, sopts);
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
+
// Start a span with manual end() lifecycle. Used by b.agent.trace
|
|
308
|
+
// when the caller needs to hold the span across an async boundary
|
|
309
|
+
// (queue publish → consumer pickup) that span(name, fn) can't model.
|
|
310
|
+
// Real OTel path uses tracer.startSpan + setSpan context; passthrough
|
|
311
|
+
// uses the same underlying tracer.startSpan + manual stack push/pop.
|
|
312
|
+
function manualSpan(name, sopts) {
|
|
313
|
+
if (typeof name !== "string" || name.length === 0) {
|
|
314
|
+
throw new TracingError("tracing/bad-name",
|
|
315
|
+
"span name must be a non-empty string");
|
|
316
|
+
}
|
|
317
|
+
sopts = sopts || {};
|
|
318
|
+
var tracer = _tracer();
|
|
319
|
+
var otel = _getOtel();
|
|
320
|
+
var spanInst = tracer.startSpan(name, otel ? {
|
|
321
|
+
kind: _kindFromString(otel, sopts.kind),
|
|
322
|
+
attributes: sopts.attributes,
|
|
323
|
+
} : sopts);
|
|
324
|
+
if (sopts.attributes && typeof spanInst.setAttributes === "function") {
|
|
325
|
+
try { spanInst.setAttributes(sopts.attributes); }
|
|
326
|
+
catch (_e) { /* best-effort */ }
|
|
327
|
+
}
|
|
328
|
+
var ended = false;
|
|
329
|
+
var origEnd = spanInst.end ? spanInst.end.bind(spanInst) : function () {};
|
|
330
|
+
spanInst.end = function () {
|
|
331
|
+
if (ended) return;
|
|
332
|
+
ended = true;
|
|
333
|
+
try { tracer._pop && tracer._pop(); } // allow:try-catch-non-error — passthrough tracer lifecycle
|
|
334
|
+
catch (_e) { /* best-effort */ }
|
|
335
|
+
try { origEnd(); }
|
|
336
|
+
catch (_e) { /* best-effort */ }
|
|
337
|
+
};
|
|
338
|
+
if (tracer._push) tracer._push(spanInst);
|
|
339
|
+
return spanInst;
|
|
340
|
+
}
|
|
341
|
+
|
|
307
342
|
function currentSpan() {
|
|
308
343
|
var otel = _getOtel();
|
|
309
344
|
if (otel) {
|
|
@@ -428,6 +463,7 @@ function create(opts) {
|
|
|
428
463
|
var registry = {
|
|
429
464
|
span: span,
|
|
430
465
|
spanSync: spanSync,
|
|
466
|
+
manualSpan: manualSpan,
|
|
431
467
|
currentSpan: currentSpan,
|
|
432
468
|
setAttributes: setAttributes,
|
|
433
469
|
recordException: recordException,
|
package/package.json
CHANGED
package/sbom.cdx.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json",
|
|
3
3
|
"bomFormat": "CycloneDX",
|
|
4
4
|
"specVersion": "1.6",
|
|
5
|
-
"serialNumber": "urn:uuid:
|
|
5
|
+
"serialNumber": "urn:uuid:6b9a6fd7-b1f8-4d51-9ad8-b6edd98b31e5",
|
|
6
6
|
"version": 1,
|
|
7
7
|
"metadata": {
|
|
8
|
-
"timestamp": "2026-05-
|
|
8
|
+
"timestamp": "2026-05-15T09:16:43.370Z",
|
|
9
9
|
"lifecycles": [
|
|
10
10
|
{
|
|
11
11
|
"phase": "build"
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"component": {
|
|
22
|
-
"bom-ref": "@blamejs/core@0.9.
|
|
22
|
+
"bom-ref": "@blamejs/core@0.9.38",
|
|
23
23
|
"type": "library",
|
|
24
24
|
"name": "blamejs",
|
|
25
|
-
"version": "0.9.
|
|
25
|
+
"version": "0.9.38",
|
|
26
26
|
"scope": "required",
|
|
27
27
|
"author": "blamejs contributors",
|
|
28
28
|
"description": "The Node framework that owns its stack.",
|
|
29
|
-
"purl": "pkg:npm/%40blamejs/core@0.9.
|
|
29
|
+
"purl": "pkg:npm/%40blamejs/core@0.9.38",
|
|
30
30
|
"properties": [],
|
|
31
31
|
"externalReferences": [
|
|
32
32
|
{
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"components": [],
|
|
55
55
|
"dependencies": [
|
|
56
56
|
{
|
|
57
|
-
"ref": "@blamejs/core@0.9.
|
|
57
|
+
"ref": "@blamejs/core@0.9.38",
|
|
58
58
|
"dependsOn": []
|
|
59
59
|
}
|
|
60
60
|
]
|