@plasius/analytics 1.2.0 → 1.2.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 CHANGED
@@ -139,6 +139,11 @@ Backends produce bounded, catalogue-validated consequence receipts with `seriali
139
139
 
140
140
  Catalogue names, sources, targets, effects, and enum values must be reviewed developer-owned semantic classes, never application/entity identifiers or user-provided content. Sources are admitted by the catalogue-wide allowlist; targets and backend effects are admitted by per-event allowlists. The privacy policy version is the package-owned `strict.v1` constant and is not caller-configurable. Unknown or unregistered fields reject the whole event without echoing rejected values. Aggregate Fetch transport omits credentials and referrers and rejects redirects. Uploaded individual journeys are intentionally not supported by this local-private client; any future controlled-server replay mode must be separately gated and governed as pseudonymous Personal Data.
141
141
 
142
+ Aggregate transport accepts RFC 9110 `Retry-After` integer delay-seconds and
143
+ HTTP dates, capped at five minutes; malformed numeric forms are ignored.
144
+ Runtime rollout inherits `governance.rfc-compliance-remediation.enabled`, with
145
+ the disabled state retaining the prior transport only during migration.
146
+
142
147
  ## Crash Reporting
143
148
 
144
149
  ```ts
package/dist/index.cjs CHANGED
@@ -2053,15 +2053,19 @@ function isSecureSemanticJourneyEndpoint(endpoint, baseUrl) {
2053
2053
  return false;
2054
2054
  }
2055
2055
  }
2056
+ var HTTP_DATE_PATTERN = /^(?:[A-Za-z]{3}, \d{2} [A-Za-z]{3} \d{4} \d{2}:\d{2}:\d{2} GMT|[A-Za-z]+, \d{2}-[A-Za-z]{3}-\d{2} \d{2}:\d{2}:\d{2} GMT|[A-Za-z]{3} [A-Za-z]{3} [ \d]\d \d{2}:\d{2}:\d{2} \d{4})$/u;
2056
2057
  function parseRetryAfter(value, nowEpochMs) {
2057
2058
  if (!value) {
2058
2059
  return void 0;
2059
2060
  }
2060
- const seconds = Number(value.trim());
2061
- if (Number.isFinite(seconds) && seconds >= 0) {
2062
- return Math.min(MAX_RETRY_AFTER_MS, Math.round(seconds * 1e3));
2061
+ const trimmed = value.trim();
2062
+ if (/^(0|[1-9]\d*)$/u.test(trimmed)) {
2063
+ return Math.min(MAX_RETRY_AFTER_MS, Number(trimmed) * 1e3);
2063
2064
  }
2064
- const dateEpochMs = Date.parse(value);
2065
+ if (!HTTP_DATE_PATTERN.test(trimmed)) {
2066
+ return void 0;
2067
+ }
2068
+ const dateEpochMs = Date.parse(trimmed);
2065
2069
  if (!Number.isFinite(dateEpochMs)) {
2066
2070
  return void 0;
2067
2071
  }