sporades 0.8.3 โ†’ 0.8.6

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 (43) hide show
  1. package/CHANGES.md +107 -1
  2. package/bin/sporades-host-helper.js +5 -1
  3. package/bin/sporades.js +2539 -528
  4. package/dist/acl-runtime.js +1 -1
  5. package/dist/acl-runtime.js.map +1 -1
  6. package/dist/cli/cli-version.d.ts +1 -1
  7. package/dist/cli/cli-version.js +1 -1
  8. package/dist/cli/sporades.js +16 -14
  9. package/dist/cli/sporades.js.map +1 -1
  10. package/dist/database-runtime.d.ts +5 -8
  11. package/dist/database-runtime.d.ts.map +1 -1
  12. package/dist/database-runtime.js +410 -160
  13. package/dist/database-runtime.js.map +1 -1
  14. package/dist/generated-source-manifest.json +316 -0
  15. package/dist/jobs-runtime.d.ts +43 -2
  16. package/dist/jobs-runtime.d.ts.map +1 -1
  17. package/dist/jobs-runtime.js +348 -49
  18. package/dist/jobs-runtime.js.map +1 -1
  19. package/dist/mail-runtime.d.ts +1 -1
  20. package/dist/mail-runtime.d.ts.map +1 -1
  21. package/dist/mail-runtime.js +9 -3
  22. package/dist/mail-runtime.js.map +1 -1
  23. package/dist/server-runtime-source.d.ts +6 -1
  24. package/dist/server-runtime-source.d.ts.map +1 -1
  25. package/dist/server-runtime-source.js +1717 -276
  26. package/dist/server-runtime-source.js.map +1 -1
  27. package/dist/server.d.ts +24 -6
  28. package/dist/server.d.ts.map +1 -1
  29. package/dist/server.js +16 -6
  30. package/dist/server.js.map +1 -1
  31. package/dist/teams-runtime.d.ts +29 -24
  32. package/dist/teams-runtime.d.ts.map +1 -1
  33. package/dist/teams-runtime.js +187 -19
  34. package/dist/teams-runtime.js.map +1 -1
  35. package/dist/templates/client-runtime-template.d.ts.map +1 -1
  36. package/dist/templates/client-runtime-template.js +95 -20
  37. package/dist/templates/client-runtime-template.js.map +1 -1
  38. package/dist/templates/server-bundle-entry.d.ts.map +1 -1
  39. package/dist/templates/server-bundle-entry.js +11 -6
  40. package/dist/templates/server-bundle-entry.js.map +1 -1
  41. package/package.json +2 -2
  42. package/src/types/client.d.ts +11 -7
  43. package/src/types/server.d.ts +58 -9
package/CHANGES.md CHANGED
@@ -1,17 +1,123 @@
1
1
  # Changes
2
2
 
3
- ## Unreleased - 2026-08-15
3
+ ## Unreleased - 2026-08-17
4
+
5
+ Changes since v0.8.5.
6
+
7
+ ### ๐Ÿš€ Features
8
+
9
+ - Migrate additive unique constraints atomically (2cf8381).
10
+ - Add conflict-targeted idempotent table inserts (bd2aeaa).
11
+ - Expose privileged Team inspections (16d784a).
12
+ - Declare unique Capsule table constraints (f638b36).
13
+ - Expose exact Team membership counts (6893db7).
14
+
15
+ ### ๐Ÿ› Bug Fixes
16
+
17
+ - Shut down rejected runtime candidates (5ec8198).
18
+ - Preserve candidate on activation degradation (302268c).
19
+ - Activate replacement jobs after teardown (ee4db9f).
20
+ - Serialize job lease recovery (09dca55).
21
+ - Refresh job leases after dev handoff (5961f77).
22
+ - Recover jobs across runtime handoff (6d2b344).
23
+ - Gate jobs on successful runtime initialization (3082aad).
24
+ - Validate all schedule cursors (bf3dea0).
25
+ - Arm schedule recovery after commit (da43e54).
26
+ - Persist schedule upgrade lineage (54d664e).
27
+ - Close schedule handoff and root reentry races (281029a).
28
+ - Serialize legacy schedule upgrades (9e87fb1).
29
+ - Publish schedule incarnations atomically (78da563).
30
+ - Make schedule generations authoritative (9005b1e).
31
+ - Bind schedules to declaration generations (b478ae7).
32
+ - Make schedule claims transactional (960f2c6).
33
+ - Seal retained job and libsql lifecycle (c5dc235).
34
+ - Recover future leases and schedules safely (fa08688).
35
+ - Bound job lifecycle time domains (89149c7).
36
+ - Close pre-handler job shutdown races (ffdca81).
37
+ - Make runtime shutdown failure atomic (1958f3b).
38
+ - Harden transactional lifecycle cleanup (e408f2d).
39
+ - Defer transactional job cancellation (2d3cf3e).
40
+ - Linearize team reads and job claims (1aa5391).
41
+ - Wake retained jobs on startup (0a66d61).
42
+ - Settle transactional log writes (43e1b2b).
43
+ - Revoke settled transaction adapters (bef9821).
44
+ - Abort jobs through the root runtime (5a43040).
45
+ - Settle jobs before lifecycle shutdown (51d1d9d).
46
+ - Settle job shutdown safely (9d38300).
47
+ - Await runtime closure during shutdown (ff688f1).
48
+ - Settle scheduled Jobs before runtime shutdown (7e7204e).
49
+ - Scope unique migration error translation (9af3b24).
50
+ - Preserve non-unique migration errors (2cfb207).
51
+ - Fix chained transaction release and async insert type (386ea84).
52
+ - Fix async insertOrIgnore documentation (a41f2ac).
53
+ - Guard privileged join-link reads (dea4ebc).
54
+ - Close privileged Team inspection races (d53136c).
55
+ - Redact privileged Team join metadata (ad77482).
56
+ - Defer existing table unique changes (e49477d).
57
+
58
+ ### ๐Ÿ”ง Improvements
59
+
60
+ - Ignore Macos fluff files (d4ae934).
61
+
62
+ ### ๐Ÿ“ Documentation
63
+
64
+ - Pin final platform contract evidence (65250af).
65
+ - Align platform contracts after swarm amendments (8f64c4f).
66
+ - Record swarm cleanup (7233572).
67
+ - Close combined platform contract swarm (a1862c8).
68
+ - Record final combined contract package proof (4c44bf8).
69
+ - Record combined contract proof evidence (ac1c48c).
70
+ - Record accepted unique migration contract (6c5e484).
71
+ - Record accepted idempotent insert contract (19e7b63).
72
+ - Align shipped Job lifecycle reference (9b7820f).
73
+ - Document atomic Job enqueue lifecycle (9dbeb8a).
74
+ - Reject nested database transaction scopes (3cc98b6).
75
+ - Record accepted platform contract tickets (6ef6d1c).
76
+ - Close unique constraint contract gaps (20baabb).
77
+ - Prove unique constraint boundaries across adapters (f6d3517).
78
+ - Cover immutable unique schema boundary (4fb81d9).
79
+ - Initialize platform contracts swarm ledger (61816a1).
80
+ - Add Team subscription platform tickets (494a086).
81
+
82
+ ### ๐Ÿงช Tests
83
+
84
+ - Reset native schedule clock before init (1153643).
85
+ - Prove atomic Team Job enqueue failures (09265ab).
86
+ - Preserve PostgreSQL quoting recorder transactions (85d2266).
87
+ - Cover unrelated rebuild constraint failures (4605ec5).
88
+ - Isolate Node 24 SQLite server tests (8542eb9).
89
+ - Harden failed mutation cleanup (d43a5ab).
90
+ - Bound transaction handler context lifetime (67dccb4).
91
+ - Defer runtime Job dispatch until commit (0a04afb).
92
+ - Persist Jobs inside handler transactions (b59004f).
93
+ - Reject captured transaction reentry and drop rolled-back jobs (952309e).
94
+ - Replace async-local transaction ownership (95cbb85).
95
+ - Gate transaction connections and track mutation writes (20cda07).
96
+ - Serialize shared database connection transactions (425e4f0).
97
+ - Isolate composite unique conformance (75ace57).
98
+ - Cover Team count membership lifecycle (80d6cd7).
99
+ - Accept cross-realm query arrays (55b87a6).
100
+ - Reject query argument array subclasses (2171b61).
101
+
102
+ ## 0.8.5 - 2026-08-15
4
103
 
5
104
  Changes since v0.8.1.
6
105
 
7
106
  ### ๐Ÿš€ Features
8
107
 
108
+ - Add JSON-safe positional arguments to reactive Custom queries across the
109
+ client transport and framework adapters (5b882f5).
9
110
  - Add exact pagination and join admission (63f68a0).
10
111
 
11
112
  ### ๐Ÿ› Bug Fixes
12
113
 
13
114
  - Resolve npm audit vulnerabilities (a6a4b51).
14
115
 
116
+ ### ๐Ÿ“ Documentation
117
+
118
+ - Describe parameterized queries (287ef63).
119
+ - Plan reactive query arguments (4876db8).
120
+
15
121
  ## 0.8.1 - 2026-08-14
16
122
 
17
123
  Corrects the incomplete `0.8.0` package release with the merged `main` runtime,
@@ -165,6 +165,8 @@ import { createHash, randomBytes, randomUUID } from "node:crypto";
165
165
 
166
166
  // src/jobs-runtime.ts
167
167
  var nodeCryptoModule = process.getBuiltinModule("node:crypto");
168
+ var MAX_JOB_TIMESTAMP_MS = Date.parse("9999-12-31T23:59:59.999Z");
169
+ var MIN_JOB_TIMESTAMP_MS = Date.parse("0000-01-01T00:00:00.000Z");
168
170
 
169
171
  // src/runtime-log-policy.ts
170
172
  function isSensitiveLogKey(key) {
@@ -262,6 +264,7 @@ var PASSWORD_RESET_MAX_TTL_MS = 24 * 60 * 60 * 1e3;
262
264
  // src/database-runtime.ts
263
265
  var nodeCryptoModule4 = process.getBuiltinModule("node:crypto");
264
266
  var nodeFsModule = process.getBuiltinModule("node:fs");
267
+ var transactionOperations = Symbol.for("sporades.database.transactionOperations");
265
268
 
266
269
  // src/server-runtime-source.ts
267
270
  function logPayloadMaxBytes(config = {}) {
@@ -271,6 +274,7 @@ function logPayloadMaxBytes(config = {}) {
271
274
  function logRedactedValue() {
272
275
  return "[REDACTED]";
273
276
  }
277
+ var transactionPendingLogWrites = Symbol("sporades.transactionPendingLogWrites");
274
278
  function createLogEnvelope(input) {
275
279
  const now = (/* @__PURE__ */ new Date()).toISOString();
276
280
  const config = input.config ?? {};
@@ -418,7 +422,7 @@ function writeEnvelope(result, failed = false) {
418
422
  }
419
423
 
420
424
  // src/cli/cli-version.ts
421
- var CLI_VERSION = "0.8.3";
425
+ var CLI_VERSION = "0.8.6";
422
426
 
423
427
  // src/cli/schedule-inspection-envelope.ts
424
428
  function sanitizeScheduleInspectionEnvelope(envelope, invalid) {