@blamejs/core 0.9.14 → 0.9.15

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.
Files changed (112) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/lib/a2a.js +11 -11
  3. package/lib/acme.js +5 -5
  4. package/lib/ai-input.js +2 -2
  5. package/lib/api-key.js +4 -4
  6. package/lib/api-snapshot.js +6 -6
  7. package/lib/app-shutdown.js +2 -2
  8. package/lib/app.js +5 -5
  9. package/lib/archive.js +8 -8
  10. package/lib/argon2-builtin.js +2 -2
  11. package/lib/atomic-file.js +53 -53
  12. package/lib/audit-sign.js +8 -8
  13. package/lib/audit-tools.js +22 -22
  14. package/lib/auth/dpop.js +3 -3
  15. package/lib/auth/sd-jwt-vc.js +2 -2
  16. package/lib/backup/bundle.js +17 -17
  17. package/lib/backup/index.js +36 -36
  18. package/lib/budr.js +3 -3
  19. package/lib/bundler.js +20 -20
  20. package/lib/circuit-breaker.js +4 -4
  21. package/lib/cli.js +25 -26
  22. package/lib/cluster.js +2 -2
  23. package/lib/compliance-sanctions.js +2 -2
  24. package/lib/config-drift.js +15 -15
  25. package/lib/content-credentials.js +4 -4
  26. package/lib/credential-hash.js +3 -3
  27. package/lib/daemon.js +19 -19
  28. package/lib/db-file-lifecycle.js +24 -24
  29. package/lib/db-schema.js +2 -2
  30. package/lib/db.js +35 -35
  31. package/lib/dev.js +10 -10
  32. package/lib/dr-runbook.js +5 -5
  33. package/lib/dual-control.js +2 -2
  34. package/lib/external-db-migrate.js +2 -2
  35. package/lib/external-db.js +2 -2
  36. package/lib/fdx.js +2 -2
  37. package/lib/file-upload.js +30 -30
  38. package/lib/flag-providers.js +4 -4
  39. package/lib/gate-contract.js +5 -5
  40. package/lib/graphql-federation.js +4 -7
  41. package/lib/honeytoken.js +6 -6
  42. package/lib/http-client-cookie-jar.js +6 -6
  43. package/lib/http-client.js +18 -18
  44. package/lib/i18n.js +5 -5
  45. package/lib/keychain.js +9 -9
  46. package/lib/legal-hold.js +2 -2
  47. package/lib/local-db-thin.js +9 -9
  48. package/lib/log-stream-local.js +17 -17
  49. package/lib/log-stream-syslog.js +2 -2
  50. package/lib/log-stream.js +3 -3
  51. package/lib/mail-bounce.js +2 -2
  52. package/lib/mail-mdn.js +2 -2
  53. package/lib/mail-srs.js +2 -2
  54. package/lib/mail.js +4 -4
  55. package/lib/mcp.js +2 -2
  56. package/lib/metrics.js +2 -2
  57. package/lib/middleware/api-encrypt.js +16 -16
  58. package/lib/middleware/body-parser.js +16 -16
  59. package/lib/middleware/compression.js +3 -3
  60. package/lib/middleware/csp-nonce.js +4 -4
  61. package/lib/middleware/health.js +7 -7
  62. package/lib/middleware/idempotency-key.js +163 -63
  63. package/lib/migrations.js +3 -3
  64. package/lib/mtls-ca.js +26 -26
  65. package/lib/mtls-engine-default.js +5 -5
  66. package/lib/network-dns.js +2 -2
  67. package/lib/network-nts.js +2 -2
  68. package/lib/network-proxy.js +3 -3
  69. package/lib/network-smtp-policy.js +2 -2
  70. package/lib/network-tls.js +17 -17
  71. package/lib/network.js +13 -13
  72. package/lib/notify.js +3 -3
  73. package/lib/object-store/gcs-bucket-ops.js +2 -2
  74. package/lib/object-store/gcs.js +5 -5
  75. package/lib/object-store/index.js +6 -6
  76. package/lib/object-store/local.js +19 -19
  77. package/lib/object-store/sigv4.js +3 -3
  78. package/lib/observability-tracer.js +4 -4
  79. package/lib/otel-export.js +3 -3
  80. package/lib/pagination.js +5 -5
  81. package/lib/parsers/safe-xml.js +3 -3
  82. package/lib/pqc-gate.js +5 -5
  83. package/lib/pubsub-redis.js +2 -2
  84. package/lib/queue-local.js +3 -3
  85. package/lib/queue.js +2 -2
  86. package/lib/redis-client.js +4 -4
  87. package/lib/restore-bundle.js +18 -18
  88. package/lib/restore-rollback.js +34 -34
  89. package/lib/restore.js +16 -16
  90. package/lib/router.js +13 -13
  91. package/lib/sandbox.js +8 -8
  92. package/lib/sec-cyber.js +3 -3
  93. package/lib/security-assert.js +2 -2
  94. package/lib/seeders.js +4 -4
  95. package/lib/self-update.js +18 -18
  96. package/lib/session-device-binding.js +2 -2
  97. package/lib/static.js +22 -22
  98. package/lib/template.js +19 -19
  99. package/lib/testing.js +7 -7
  100. package/lib/tls-exporter.js +5 -5
  101. package/lib/tracing.js +3 -3
  102. package/lib/vault/index.js +11 -11
  103. package/lib/vault/passphrase-ops.js +37 -37
  104. package/lib/vault/passphrase-source.js +2 -2
  105. package/lib/vault/rotate.js +64 -64
  106. package/lib/vault/seal-pem-file.js +26 -26
  107. package/lib/watcher.js +23 -23
  108. package/lib/webhook.js +10 -10
  109. package/lib/worker-pool.js +6 -6
  110. package/lib/ws-client.js +4 -4
  111. package/package.json +1 -1
  112. package/sbom.cdx.json +6 -6
package/lib/webhook.js CHANGED
@@ -48,11 +48,11 @@
48
48
  */
49
49
 
50
50
  var nodeCrypto = require("crypto");
51
- var crypto = require("./crypto");
51
+ var bCrypto = require("./crypto");
52
52
  var httpClient = require("./http-client");
53
53
  var safeBuffer = require("./safe-buffer");
54
54
  var safeUrl = require("./safe-url");
55
- var retry = require("./retry");
55
+ var retryHelper = require("./retry");
56
56
  var C = require("./constants");
57
57
  var lazyRequire = require("./lazy-require");
58
58
  var numericChecks = require("./numeric-checks");
@@ -220,13 +220,13 @@ function _composeSignedString(algo, kid, timestamp, id, body) {
220
220
  // ---- Sign / verify primitives ----
221
221
 
222
222
  function _hmacSign(key, data) {
223
- return crypto.hmacSha3(key, data); // hex string
223
+ return bCrypto.hmacSha3(key, data); // hex string
224
224
  }
225
225
 
226
226
  function _hmacVerify(key, data, expectedHex) {
227
227
  if (!safeBuffer.isHex(expectedHex)) return false;
228
- var actualHex = crypto.hmacSha3(key, data);
229
- return crypto.timingSafeEqual(actualHex, expectedHex);
228
+ var actualHex = bCrypto.hmacSha3(key, data);
229
+ return bCrypto.timingSafeEqual(actualHex, expectedHex);
230
230
  }
231
231
 
232
232
  // PQC signatures encode as base64url. SLH-DSA-SHAKE-256f signatures
@@ -242,7 +242,7 @@ function _hmacVerify(key, data, expectedHex) {
242
242
  // shaped value is decoded as hex. New signatures are emitted as
243
243
  // base64url; old hex-encoded signatures still verify.
244
244
  function _pqcSign(privateKeyPem, data) {
245
- return crypto.sign(data, privateKeyPem).toString("base64url");
245
+ return bCrypto.sign(data, privateKeyPem).toString("base64url");
246
246
  }
247
247
 
248
248
  var _BASE64URL_RE = safeBuffer.BASE64URL_RE;
@@ -260,7 +260,7 @@ function _pqcVerify(publicKeyPem, data, expectedSig) {
260
260
  return false;
261
261
  }
262
262
  } catch (_e) { return false; }
263
- try { return crypto.verify(data, sigBuf, publicKeyPem); }
263
+ try { return bCrypto.verify(data, sigBuf, publicKeyPem); }
264
264
  catch (_e) { return false; }
265
265
  }
266
266
 
@@ -364,9 +364,9 @@ function signer(opts) {
364
364
  var kids = _objectKeys(keys);
365
365
  var defaultKid = opts.defaultKid || kids[0];
366
366
  var sigHeader = cfg.signatureHeader;
367
- var idGen = opts.idGenerator || function () { return crypto.generateToken(C.BYTES.bytes(16)); };
367
+ var idGen = opts.idGenerator || function () { return bCrypto.generateToken(C.BYTES.bytes(16)); };
368
368
  var nowFn = opts.now || function () { return Date.now(); };
369
- var retryOpts = opts.retry || retry.DEFAULT_RETRY;
369
+ var retryOpts = opts.retry || retryHelper.DEFAULT_RETRY;
370
370
  var httpOpts = opts.http || {};
371
371
  var audit = opts.audit || null;
372
372
  var auditFailures = cfg.auditFailures;
@@ -452,7 +452,7 @@ function signer(opts) {
452
452
  }).host;
453
453
  } catch (_e) { hostLabel = ""; }
454
454
  try {
455
- var res = await retry.withRetry(function () {
455
+ var res = await retryHelper.withRetry(function () {
456
456
  return httpClient.request(requestOpts);
457
457
  }, retryOpts);
458
458
  var statusCode = (res && (res.statusCode || res.status)) || 0;
@@ -24,7 +24,7 @@
24
24
  * var pool = b.workerPool.create("/abs/path/to/worker.js", {
25
25
  * size: 4,
26
26
  * maxQueueDepth: C.BYTES.kib(1), // 1024 max queued tasks
27
- * taskTimeoutMs: b.constants.TIME.minutes(2),
27
+ * taskTimeoutMs: b.C.TIME.minutes(2),
28
28
  * onExit: function (code, workerId) { ... },
29
29
  * });
30
30
  * var result = await pool.run({ kind: "hash", payload: buf },
@@ -67,11 +67,11 @@
67
67
  */
68
68
 
69
69
  var os = require("node:os");
70
- var path = require("node:path");
70
+ var nodePath = require("node:path");
71
71
  var lazyRequire = require("./lazy-require");
72
72
  var validateOpts = require("./validate-opts");
73
73
  var numericBounds = require("./numeric-bounds");
74
- var constants = require("./constants");
74
+ var C = require("./constants");
75
75
  var { WorkerPoolError } = require("./framework-error");
76
76
 
77
77
  var audit = lazyRequire(function () { return require("./audit"); });
@@ -80,8 +80,8 @@ var MIN_SIZE = 1;
80
80
  var MAX_SIZE = 256; // allow:raw-byte-literal — sanity ceiling on worker count, not bytes
81
81
  var DEFAULT_MAX_QUEUE_DEPTH = 1024; // allow:raw-byte-literal — task-queue depth, not bytes
82
82
  var MAX_QUEUE_DEPTH_CAP = 1048576; // allow:raw-byte-literal — task-queue depth ceiling, not bytes
83
- var DEFAULT_TASK_TIMEOUT_MS = constants.TIME.minutes(5);
84
- var MAX_TASK_TIMEOUT_MS = constants.TIME.hours(1);
83
+ var DEFAULT_TASK_TIMEOUT_MS = C.TIME.minutes(5);
84
+ var MAX_TASK_TIMEOUT_MS = C.TIME.hours(1);
85
85
 
86
86
  // Refuse operator-supplied `eval`-style script paths. Worker_threads
87
87
  // supports `{ eval: true }` to spawn from a string; this primitive
@@ -90,7 +90,7 @@ var MAX_TASK_TIMEOUT_MS = constants.TIME.hours(1);
90
90
  function _validateScriptPath(scriptPath) {
91
91
  validateOpts.requireNonEmptyString(scriptPath,
92
92
  "workerPool.create: scriptPath", WorkerPoolError, "workerpool/bad-script-path");
93
- if (!path.isAbsolute(scriptPath)) {
93
+ if (!nodePath.isAbsolute(scriptPath)) {
94
94
  throw new WorkerPoolError("workerpool/bad-script-path",
95
95
  "workerPool.create: scriptPath must be an absolute path; got " +
96
96
  JSON.stringify(scriptPath));
package/lib/ws-client.js CHANGED
@@ -46,7 +46,7 @@
46
46
  */
47
47
 
48
48
  var net = require("net");
49
- var url = require("url");
49
+ var nodeUrl = require("url");
50
50
  var nodeCrypto = require("crypto");
51
51
  var EventEmitter = require("events");
52
52
 
@@ -146,7 +146,7 @@ function _expectedAccept(secKey, handshakeGuid) {
146
146
 
147
147
  function _parseUrl(target) {
148
148
  var parsed;
149
- try { parsed = new url.URL(target); }
149
+ try { parsed = new nodeUrl.URL(target); }
150
150
  catch (e) {
151
151
  throw new WsClientError("ws-client/bad-url",
152
152
  "wsClient.connect: url is malformed - " + e.message);
@@ -252,7 +252,7 @@ function connect(target, opts) {
252
252
  // rebinding TOCTOU window). Cloud-metadata IPs are unconditional
253
253
  // hard-deny — `allowInternal: true` does not bypass them.
254
254
  var hostnameForUrl = parsed.protocol === "wss:" ? "https:" : "http:";
255
- var probeUrl = new url.URL(hostnameForUrl + "//" + parsed.host + parsed.pathname + parsed.search);
255
+ var probeUrl = new nodeUrl.URL(hostnameForUrl + "//" + parsed.host + parsed.pathname + parsed.search);
256
256
  ssrfGuard.checkUrl(probeUrl, {
257
257
  allowInternal: opts.allowInternal,
258
258
  errorClass: WsClientError,
@@ -334,7 +334,7 @@ class WsClient extends EventEmitter {
334
334
  dialParsed = _parseUrl(nextTarget);
335
335
  dialTarget = nextTarget;
336
336
  var probeProto = dialParsed.protocol === "wss:" ? "https:" : "http:";
337
- var probeUrl = new url.URL(probeProto + "//" + dialParsed.host + dialParsed.pathname + dialParsed.search);
337
+ var probeUrl = new nodeUrl.URL(probeProto + "//" + dialParsed.host + dialParsed.pathname + dialParsed.search);
338
338
  var probe = ssrfGuard.checkUrl(probeUrl, {
339
339
  allowInternal: opts.allowInternal,
340
340
  errorClass: WsClientError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blamejs/core",
3
- "version": "0.9.14",
3
+ "version": "0.9.15",
4
4
  "description": "The Node framework that owns its stack.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "blamejs contributors",
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:cc380387-6002-4e34-863f-7bb3090533eb",
5
+ "serialNumber": "urn:uuid:40df0b28-c547-4f48-9bbf-f005b59cbd1b",
6
6
  "version": 1,
7
7
  "metadata": {
8
- "timestamp": "2026-05-13T20:27:26.640Z",
8
+ "timestamp": "2026-05-14T00:04:25.956Z",
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.14",
22
+ "bom-ref": "@blamejs/core@0.9.15",
23
23
  "type": "library",
24
24
  "name": "blamejs",
25
- "version": "0.9.14",
25
+ "version": "0.9.15",
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.14",
29
+ "purl": "pkg:npm/%40blamejs/core@0.9.15",
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.14",
57
+ "ref": "@blamejs/core@0.9.15",
58
58
  "dependsOn": []
59
59
  }
60
60
  ]