@blamejs/core 0.9.16 → 0.9.18

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 (85) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/MIGRATING.md +23 -1
  3. package/lib/acme.js +2 -2
  4. package/lib/api-snapshot.js +1 -1
  5. package/lib/app-shutdown.js +2 -2
  6. package/lib/app.js +2 -2
  7. package/lib/argon2-builtin.js +1 -1
  8. package/lib/atomic-file.js +8 -8
  9. package/lib/audit-sign.js +3 -3
  10. package/lib/audit-tools.js +2 -2
  11. package/lib/auth/dpop.js +1 -1
  12. package/lib/auth/elevation-grant.js +1 -1
  13. package/lib/auth/jwt-external.js +1 -1
  14. package/lib/auth/jwt.js +1 -1
  15. package/lib/auth/oauth.js +1 -1
  16. package/lib/auth/status-list.js +1 -1
  17. package/lib/backup/bundle.js +2 -2
  18. package/lib/backup/index.js +7 -7
  19. package/lib/bundler.js +4 -4
  20. package/lib/cli.js +1 -1
  21. package/lib/cloud-events.js +1 -1
  22. package/lib/compliance-sanctions.js +1 -1
  23. package/lib/crypto-hpke.js +1 -1
  24. package/lib/crypto.js +3 -3
  25. package/lib/daemon.js +2 -2
  26. package/lib/db-file-lifecycle.js +5 -5
  27. package/lib/db-schema.js +1 -1
  28. package/lib/db.js +2 -2
  29. package/lib/dev.js +5 -5
  30. package/lib/dr-runbook.js +2 -2
  31. package/lib/external-db-migrate.js +1 -1
  32. package/lib/flag-evaluation-context.js +1 -1
  33. package/lib/flag-providers.js +1 -1
  34. package/lib/http-client.js +11 -11
  35. package/lib/http-message-signature.js +1 -1
  36. package/lib/keychain.js +2 -2
  37. package/lib/local-db-thin.js +2 -2
  38. package/lib/log-stream-local.js +3 -3
  39. package/lib/log-stream-syslog.js +4 -4
  40. package/lib/mail-arc-sign.js +1 -1
  41. package/lib/mail-dkim.js +1 -1
  42. package/lib/mail.js +5 -5
  43. package/lib/middleware/asyncapi-serve.js +1 -1
  44. package/lib/middleware/body-parser.js +4 -4
  45. package/lib/middleware/openapi-serve.js +1 -1
  46. package/lib/middleware/tus-upload.js +1 -1
  47. package/lib/migrations.js +1 -1
  48. package/lib/mtls-ca.js +4 -4
  49. package/lib/network-smtp-policy.js +1 -1
  50. package/lib/ntp-check.js +1 -1
  51. package/lib/object-store/azure-blob.js +3 -3
  52. package/lib/object-store/gcs.js +3 -3
  53. package/lib/object-store/http-put.js +1 -1
  54. package/lib/object-store/local.js +3 -3
  55. package/lib/object-store/sigv4-bucket-ops.js +1 -1
  56. package/lib/object-store/sigv4.js +3 -3
  57. package/lib/observability.js +1 -1
  58. package/lib/process-spawn.js +2 -2
  59. package/lib/restore-bundle.js +2 -2
  60. package/lib/restore-rollback.js +4 -4
  61. package/lib/restore.js +3 -3
  62. package/lib/retry.js +1 -1
  63. package/lib/router.js +4 -4
  64. package/lib/safe-url.js +2 -2
  65. package/lib/sandbox.js +1 -1
  66. package/lib/security-assert.js +1 -1
  67. package/lib/seeders.js +2 -2
  68. package/lib/self-update-standalone-verifier.js +2 -2
  69. package/lib/self-update.js +5 -5
  70. package/lib/session-device-binding.js +1 -1
  71. package/lib/storage.js +1 -1
  72. package/lib/template.js +2 -2
  73. package/lib/totp.js +1 -1
  74. package/lib/vault/index.js +2 -2
  75. package/lib/vault/passphrase-ops.js +2 -2
  76. package/lib/vault/passphrase-source.js +2 -2
  77. package/lib/vault/rotate.js +7 -7
  78. package/lib/vault/seal-pem-file.js +8 -8
  79. package/lib/vendor-data.js +1 -1
  80. package/lib/watcher.js +4 -4
  81. package/lib/webhook.js +1 -1
  82. package/lib/websocket.js +3 -3
  83. package/lib/ws-client.js +6 -6
  84. package/package.json +1 -1
  85. package/sbom.cdx.json +6 -6
@@ -19,7 +19,7 @@
19
19
  * source: "/etc/letsencrypt/live/example.com/privkey.pem",
20
20
  * destination: "/var/lib/blamejs/server.key.sealed",
21
21
  * audit: true, // default
22
- * pollInterval: b.constants.TIME.seconds(2), // nodeFs.watchFile cadence
22
+ * pollInterval: b.constants.TIME.seconds(2), // fs.watchFile cadence
23
23
  * onResealed: function (info) { ... }, // { srcPath, destPath, bytes,
24
24
  * resealedAt, generation }
25
25
  * onError: function (err) { ... }, // sealing failed
@@ -42,10 +42,10 @@
42
42
  * (rename did not happen). The recovery routine re-runs the seal from
43
43
  * source — idempotent because the source PEM is the source of truth.
44
44
  *
45
- * nodeFs.watchFile semantics:
45
+ * fs.watchFile semantics:
46
46
  *
47
- * Node's nodeFs.watchFile is a polling stat() loop with the configured
48
- * pollInterval. It fires on mtime / size change. nodeFs.watch (the
47
+ * Node's fs.watchFile is a polling stat() loop with the configured
48
+ * pollInterval. It fires on mtime / size change. fs.watch (the
49
49
  * inotify / kqueue backend) is more efficient but inconsistent across
50
50
  * platforms — single rename events surface as multiple change events
51
51
  * on Linux (events fire on the directory entry, the file, and the
@@ -54,8 +54,8 @@
54
54
  * pollInterval) is acceptable for renewal cadences measured in days.
55
55
  */
56
56
 
57
- var nodeFs = require("fs");
58
- var nodePath = require("path");
57
+ var nodeFs = require("node:fs");
58
+ var nodePath = require("node:path");
59
59
  var atomicFile = require("../atomic-file");
60
60
  var C = require("../constants");
61
61
  var lazyRequire = require("../lazy-require");
@@ -76,7 +76,7 @@ var SealPemFileError = defineClass("SealPemFileError", { alwaysPermanent: true }
76
76
  // 2-second worst-case re-seal latency — negligible against the
77
77
  // renewal cadence. Operators with sub-second-sensitive use cases
78
78
  // override via opts.pollInterval.
79
- // H6 #6 — nodeFs.watchFile default cadence reduced from 2s to 500ms so a
79
+ // H6 #6 — fs.watchFile default cadence reduced from 2s to 500ms so a
80
80
  // fast renewal-then-revert (mtime bump then second bump within ~2s)
81
81
  // doesn't sneak past the watcher. Operators with extremely-quiet
82
82
  // renewal cycles can override via opts.pollInterval; the cost of
@@ -126,7 +126,7 @@ var DEFAULT_MAX_SOURCE_BYTES = C.BYTES.mib(1);
126
126
  * source: string, // plaintext PEM path (required)
127
127
  * destination: string, // sealed-output path (required, must differ from source)
128
128
  * audit: boolean, // emit b.audit events on every reseal (default true)
129
- * pollInterval: number, // nodeFs.watchFile cadence in ms (default 500)
129
+ * pollInterval: number, // fs.watchFile cadence in ms (default 500)
130
130
  * onResealed: function, // (info) => void — { srcPath, destPath, bytes, resealedAt, generation }
131
131
  * onError: function, // (err) => void — sealing failed
132
132
  * maxSourceBytes: number, // refuse source larger than this (default 1 MiB)
@@ -36,7 +36,7 @@
36
36
  * not `fs.readFileSync`-loaded.
37
37
  */
38
38
 
39
- var nodeCrypto = require("crypto");
39
+ var nodeCrypto = require("node:crypto");
40
40
  var safeEnv = require("./parsers/safe-env");
41
41
  var { defineClass } = require("./framework-error");
42
42
  var pqcSoftware = require("./pqc-software");
package/lib/watcher.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * b.watcher — recursive filesystem-watch primitive with cross-platform
4
4
  * event normalization.
5
5
  *
6
- * Wraps `nodeFs.watch(root, { recursive: true })` and turns the per-platform
6
+ * Wraps `fs.watch(root, { recursive: true })` and turns the per-platform
7
7
  * event soup (Linux inotify "rename" + "change", macOS FSEvents
8
8
  * coalesced "rename", Windows ReadDirectoryChangesW pure "rename" /
9
9
  * "change") into a single shape:
@@ -15,7 +15,7 @@
15
15
  * `type` is one of "file" or "dir". The watcher is build-tool-shaped:
16
16
  * use it to drive incremental rebuilds, hot-reload-on-change,
17
17
  * config-file watching, or content-store cache busts. It is NOT a
18
- * security primitive — nodeFs.watch is best-effort across kernels and the
18
+ * security primitive — fs.watch is best-effort across kernels and the
19
19
  * caller must not rely on it for audit-grade change detection.
20
20
  *
21
21
  * Cross-platform notes baked in:
@@ -45,8 +45,8 @@
45
45
  * watcher.WatcherError
46
46
  */
47
47
 
48
- var nodeFs = require("fs");
49
- var nodePath = require("path");
48
+ var nodeFs = require("node:fs");
49
+ var nodePath = require("node:path");
50
50
  var lazyRequire = require("./lazy-require");
51
51
  var validateOpts = require("./validate-opts");
52
52
  var { WatcherError } = require("./framework-error");
package/lib/webhook.js CHANGED
@@ -47,7 +47,7 @@
47
47
  * Outbound webhook delivery with cryptographic signing in a single `Webhook-Signature` header, retry + dead-letter via `b.retry`, and idempotency keys baked into the signed string so a captured signature cannot be replayed with a fresh id.
48
48
  */
49
49
 
50
- var nodeCrypto = require("crypto");
50
+ var nodeCrypto = require("node:crypto");
51
51
  var bCrypto = require("./crypto");
52
52
  var httpClient = require("./http-client");
53
53
  var safeBuffer = require("./safe-buffer");
package/lib/websocket.js CHANGED
@@ -74,9 +74,9 @@
74
74
  * RFC 6455 WebSocket server on top of Node's `'upgrade'` event, plus RFC 8441 Extended CONNECT for HTTP/2.
75
75
  */
76
76
 
77
- var nodeCrypto = require("crypto");
78
- var zlib = require("zlib");
79
- var { EventEmitter } = require("events");
77
+ var nodeCrypto = require("node:crypto");
78
+ var zlib = require("node:zlib");
79
+ var { EventEmitter } = require("node:events");
80
80
  var C = require("./constants");
81
81
  var requestHelpers = require("./request-helpers");
82
82
  var safeAsync = require("./safe-async");
package/lib/ws-client.js CHANGED
@@ -45,10 +45,10 @@
45
45
  * (operator opts in to mTLS via tlsOpts). HSTS-style, no soft-fail.
46
46
  */
47
47
 
48
- var net = require("net");
49
- var nodeUrl = require("url");
50
- var nodeCrypto = require("crypto");
51
- var EventEmitter = require("events");
48
+ var net = require("node:net");
49
+ var nodeUrl = require("node:url");
50
+ var nodeCrypto = require("node:crypto");
51
+ var { EventEmitter } = require("node:events");
52
52
 
53
53
  var lazyRequire = require("./lazy-require");
54
54
  var validateOpts = require("./validate-opts");
@@ -389,7 +389,7 @@ class WsClient extends EventEmitter {
389
389
 
390
390
  var socket;
391
391
  if (parsed.protocol === "wss:") {
392
- var tls = require("tls"); // allow:inline-require — node:tls only on TLS path
392
+ var tls = require("node:tls"); // allow:inline-require — node:tls only on TLS path
393
393
  var tlsOpts = Object.assign({
394
394
  host: host,
395
395
  port: port,
@@ -710,7 +710,7 @@ class WsClient extends EventEmitter {
710
710
  this._fragmentRsv1 = false;
711
711
  if (this._negotiatedDeflate && firstFrameRsv1) {
712
712
  try {
713
- var zlib = require("zlib"); // allow:inline-require — zlib only on deflate-negotiated path
713
+ var zlib = require("node:zlib"); // allow:inline-require — zlib only on deflate-negotiated path
714
714
  var compressed = Buffer.concat([fullPayload, Buffer.from([0x00, 0x00, 0xff, 0xff])]); // allow:raw-byte-literal — RFC 7692 §7.2.2 deflate trailer
715
715
  // Decompression-bomb defense: zlib.inflateRawSync's
716
716
  // `maxOutputLength` aborts the inflate the moment the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blamejs/core",
3
- "version": "0.9.16",
3
+ "version": "0.9.18",
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:8e662af8-d254-46ec-8625-aa19174598d2",
5
+ "serialNumber": "urn:uuid:d20f1496-b984-415b-977d-5f669aa8e4da",
6
6
  "version": 1,
7
7
  "metadata": {
8
- "timestamp": "2026-05-14T04:47:34.904Z",
8
+ "timestamp": "2026-05-14T15:36:22.065Z",
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.16",
22
+ "bom-ref": "@blamejs/core@0.9.18",
23
23
  "type": "library",
24
24
  "name": "blamejs",
25
- "version": "0.9.16",
25
+ "version": "0.9.18",
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.16",
29
+ "purl": "pkg:npm/%40blamejs/core@0.9.18",
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.16",
57
+ "ref": "@blamejs/core@0.9.18",
58
58
  "dependsOn": []
59
59
  }
60
60
  ]