@blamejs/core 0.7.23 → 0.7.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/lib/network.js CHANGED
@@ -6,6 +6,7 @@ var dns = require("./network-dns");
6
6
  var proxy = require("./network-proxy");
7
7
  var trust = require("./network-tls");
8
8
  var heartbeat = require("./network-heartbeat");
9
+ var smtpPolicy = require("./network-smtp-policy");
9
10
 
10
11
  var validateOpts = require("./validate-opts");
11
12
  var lazyRequire = require("./lazy-require");
@@ -219,6 +220,12 @@ module.exports = {
219
220
  proxy: proxy,
220
221
  tls: trust,
221
222
  heartbeat: heartbeat,
223
+ smtp: {
224
+ policy: smtpPolicy,
225
+ mtaSts: smtpPolicy.mtaSts,
226
+ dane: smtpPolicy.dane,
227
+ tlsRpt: smtpPolicy.tlsRpt,
228
+ },
222
229
  socket: {
223
230
  setDefaultNoDelay: _setSocketNoDelay,
224
231
  setDefaultKeepAlive: _setSocketKeepAlive,
package/lib/retention.js CHANGED
@@ -55,6 +55,7 @@
55
55
  * write. This is the escape hatch; the table+ageField+ttlMs shape
56
56
  * covers the common case.
57
57
  */
58
+ var C = require("./constants");
58
59
  var lazyRequire = require("./lazy-require");
59
60
  var validateOpts = require("./validate-opts");
60
61
  var { defineClass } = require("./framework-error");
@@ -433,7 +434,47 @@ function create(opts) {
433
434
  return { declare: declare, run: run, runAll: runAll, preview: preview, list: list };
434
435
  }
435
436
 
437
+ // Audit-log retention floors per regulatory posture. These are the
438
+ // MINIMUMS — operators may declare longer windows but cannot declare
439
+ // shorter ones. Operator-facing helper for compliance audit.
440
+ //
441
+ // PCI-DSS Requirement 10.7.1 — 12 months online (active accessible)
442
+ // HIPAA 45 CFR §164.316(b)(2) — 6 years from creation
443
+ // SOX (Sarbanes-Oxley) §802 — 7 years for audit-relevant records
444
+ // GDPR Art. 5(1)(e) — no fixed minimum; operator declares
445
+ // SOC 2 (CC1–CC9) — 1 year typical; auditor-driven
446
+ // DORA Art. 17 (incident logs) — 5 years
447
+ var COMPLIANCE_RETENTION_FLOOR_MS = Object.freeze({
448
+ "pci-dss": C.TIME.days(365), // 12 months
449
+ "hipaa": C.TIME.days(365 * 6), // 6 years
450
+ "sox": C.TIME.days(365 * 7), // 7 years
451
+ "soc2": C.TIME.days(365), // 1 year
452
+ "dora": C.TIME.days(365 * 5), // 5 years (Article 17 incident logs)
453
+ });
454
+
455
+ // Operator passes a posture name + a candidate ttlMs; returns the
456
+ // effective ttl that meets-or-exceeds the floor. Throws if posture is
457
+ // unknown so typos surface at config time.
458
+ function complianceFloor(posture, candidateTtlMs) {
459
+ if (typeof posture !== "string") {
460
+ throw new RetentionError("retention/bad-posture",
461
+ "complianceFloor: posture must be a string, got " + JSON.stringify(posture));
462
+ }
463
+ var floor = COMPLIANCE_RETENTION_FLOOR_MS[posture];
464
+ if (floor === undefined) {
465
+ throw new RetentionError("retention/unknown-posture",
466
+ "complianceFloor: unknown posture '" + posture + "'; expected one of " +
467
+ Object.keys(COMPLIANCE_RETENTION_FLOOR_MS).join(", "));
468
+ }
469
+ if (typeof candidateTtlMs !== "number" || !isFinite(candidateTtlMs) || candidateTtlMs <= 0) {
470
+ return floor;
471
+ }
472
+ return candidateTtlMs > floor ? candidateTtlMs : floor;
473
+ }
474
+
436
475
  module.exports = {
437
- create: create,
438
- RetentionError: RetentionError,
476
+ create: create,
477
+ complianceFloor: complianceFloor,
478
+ COMPLIANCE_RETENTION_FLOOR_MS: COMPLIANCE_RETENTION_FLOOR_MS,
479
+ RetentionError: RetentionError,
439
480
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blamejs/core",
3
- "version": "0.7.23",
3
+ "version": "0.7.38",
4
4
  "description": "The Node framework that owns its stack.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "blamejs contributors",
@@ -2,10 +2,10 @@
2
2
  "$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json",
3
3
  "bomFormat": "CycloneDX",
4
4
  "specVersion": "1.5",
5
- "serialNumber": "urn:uuid:2ed35351-9ec7-4e19-9471-f35604ba988a",
5
+ "serialNumber": "urn:uuid:3adb7877-ed69-4d8b-8275-eccb0ef99166",
6
6
  "version": 1,
7
7
  "metadata": {
8
- "timestamp": "2026-05-05T06:39:17.238Z",
8
+ "timestamp": "2026-05-05T19:15:46.191Z",
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.7.23",
22
+ "bom-ref": "@blamejs/core@0.7.38",
23
23
  "type": "library",
24
24
  "name": "blamejs",
25
- "version": "0.7.23",
25
+ "version": "0.7.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.7.23",
29
+ "purl": "pkg:npm/%40blamejs/core@0.7.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.7.23",
57
+ "ref": "@blamejs/core@0.7.38",
58
58
  "dependsOn": []
59
59
  }
60
60
  ]