solid-objects 0.13.3 → 0.14.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/CHANGELOG.md +114 -0
- package/README.md +212 -67
- package/dist/actor.d.ts +1 -0
- package/dist/actor.d.ts.map +1 -1
- package/dist/actor.js +9 -0
- package/dist/actor.js.map +1 -1
- package/dist/broadcast-worker.d.ts +1 -1
- package/dist/broadcast-worker.d.ts.map +1 -1
- package/dist/broadcast-worker.js +1 -1
- package/dist/broadcast-worker.js.map +1 -1
- package/dist/broken-pipe.d.ts +5 -0
- package/dist/broken-pipe.d.ts.map +1 -0
- package/dist/broken-pipe.js +8 -0
- package/dist/broken-pipe.js.map +1 -0
- package/dist/browser/host.d.ts +8 -0
- package/dist/browser/host.d.ts.map +1 -0
- package/dist/browser/host.js +22 -0
- package/dist/browser/host.js.map +1 -0
- package/dist/browser/tab-host.d.ts +43 -0
- package/dist/browser/tab-host.d.ts.map +1 -0
- package/dist/browser/tab-host.js +196 -0
- package/dist/browser/tab-host.js.map +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +6 -3
- package/dist/cli.js.map +1 -1
- package/dist/context.js +2 -2
- package/dist/context.js.map +1 -1
- package/dist/database/deadline.js +2 -2
- package/dist/database/deadline.js.map +1 -1
- package/dist/database/mysql.d.ts +1 -0
- package/dist/database/mysql.d.ts.map +1 -1
- package/dist/database/mysql.js +1 -0
- package/dist/database/mysql.js.map +1 -1
- package/dist/database/postgresql.d.ts +1 -0
- package/dist/database/postgresql.d.ts.map +1 -1
- package/dist/database/postgresql.js +1 -0
- package/dist/database/postgresql.js.map +1 -1
- package/dist/database/shared-sqlite-wasm.d.ts +74 -0
- package/dist/database/shared-sqlite-wasm.d.ts.map +1 -0
- package/dist/database/shared-sqlite-wasm.js +542 -0
- package/dist/database/shared-sqlite-wasm.js.map +1 -0
- package/dist/database/sqlite-wasm.d.ts +30 -0
- package/dist/database/sqlite-wasm.d.ts.map +1 -0
- package/dist/database/sqlite-wasm.js +185 -0
- package/dist/database/sqlite-wasm.js.map +1 -0
- package/dist/database/sqlite.d.ts +1 -0
- package/dist/database/sqlite.d.ts.map +1 -1
- package/dist/database/sqlite.js +1 -0
- package/dist/database/sqlite.js.map +1 -1
- package/dist/database/transaction-context.js +2 -2
- package/dist/database/transaction-context.js.map +1 -1
- package/dist/doctor.js +1 -1
- package/dist/doctor.js.map +1 -1
- package/dist/effect-worker.d.ts +1 -1
- package/dist/effect-worker.d.ts.map +1 -1
- package/dist/effect-worker.js +1 -1
- package/dist/effect-worker.js.map +1 -1
- package/dist/examples/quickstart-report.js +127 -0
- package/dist/examples/quickstart-report.js.map +1 -0
- package/dist/examples/sqlite-quickstart.js +59 -7
- package/dist/examples/sqlite-quickstart.js.map +1 -1
- package/dist/executable.js +4 -0
- package/dist/executable.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/platform/context-store.d.ts +11 -0
- package/dist/platform/context-store.d.ts.map +1 -0
- package/dist/platform/context-store.js +28 -0
- package/dist/platform/context-store.js.map +1 -0
- package/dist/platform/host-identity.d.ts +11 -0
- package/dist/platform/host-identity.d.ts.map +1 -0
- package/dist/platform/host-identity.js +17 -0
- package/dist/platform/host-identity.js.map +1 -0
- package/dist/platform/node.d.ts +2 -0
- package/dist/platform/node.d.ts.map +1 -0
- package/dist/platform/node.js +11 -0
- package/dist/platform/node.js.map +1 -0
- package/dist/platform/turn-context-store.d.ts +7 -0
- package/dist/platform/turn-context-store.d.ts.map +1 -0
- package/dist/platform/turn-context-store.js +17 -0
- package/dist/platform/turn-context-store.js.map +1 -0
- package/dist/platform/uuid.d.ts +2 -0
- package/dist/platform/uuid.d.ts.map +1 -0
- package/dist/platform/uuid.js +4 -0
- package/dist/platform/uuid.js.map +1 -0
- package/dist/platform/web-locks.d.ts +2 -0
- package/dist/platform/web-locks.d.ts.map +1 -0
- package/dist/platform/web-locks.js +8 -0
- package/dist/platform/web-locks.js.map +1 -0
- package/dist/reference.d.ts +16 -1
- package/dist/reference.d.ts.map +1 -1
- package/dist/reference.js +12 -0
- package/dist/reference.js.map +1 -1
- package/dist/reminder-scheduler.d.ts +1 -1
- package/dist/reminder-scheduler.d.ts.map +1 -1
- package/dist/reminder-scheduler.js +1 -1
- package/dist/reminder-scheduler.js.map +1 -1
- package/dist/repository.d.ts.map +1 -1
- package/dist/repository.js +13 -6
- package/dist/repository.js.map +1 -1
- package/dist/runtime.d.ts +25 -1
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +62 -1
- package/dist/runtime.js.map +1 -1
- package/dist/serialization.d.ts.map +1 -1
- package/dist/serialization.js +2 -1
- package/dist/serialization.js.map +1 -1
- package/dist/signals.d.ts +9 -0
- package/dist/signals.d.ts.map +1 -0
- package/dist/signals.js +299 -0
- package/dist/signals.js.map +1 -0
- package/dist/transmit-effect.d.ts +2 -0
- package/dist/transmit-effect.d.ts.map +1 -0
- package/dist/transmit-effect.js +2 -0
- package/dist/transmit-effect.js.map +1 -0
- package/dist/transmit.d.ts +27 -0
- package/dist/transmit.d.ts.map +1 -0
- package/dist/transmit.js +105 -0
- package/dist/transmit.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/web/index.d.ts +1 -0
- package/dist/web/index.d.ts.map +1 -1
- package/dist/web/index.js +1 -0
- package/dist/web/index.js.map +1 -1
- package/dist/worker.d.ts +1 -1
- package/dist/worker.d.ts.map +1 -1
- package/dist/worker.js +1 -1
- package/dist/worker.js.map +1 -1
- package/docs/api.md +262 -20
- package/docs/architecture.md +50 -23
- package/docs/authorization.md +6 -5
- package/docs/benchmarks.md +87 -65
- package/docs/browser-protocol.md +62 -3
- package/docs/comparisons.md +14 -9
- package/docs/configuration.md +2 -2
- package/docs/correctness.md +30 -17
- package/docs/dashboard.md +6 -6
- package/docs/errors-and-recovery.md +12 -12
- package/docs/fit.md +5 -0
- package/docs/operations.md +33 -19
- package/docs/parity.md +137 -47
- package/docs/releasing.md +6 -6
- package/docs/state-and-lifecycle.md +12 -8
- package/docs/support.md +60 -20
- package/examples/quickstart-report.ts +151 -0
- package/examples/sqlite-quickstart.ts +76 -16
- package/package.json +37 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,119 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.14.1 - 2026-08-23
|
|
4
|
+
|
|
5
|
+
- Add `solid-objects/signals`, live signals on actor references
|
|
6
|
+
([#24](https://github.com/cardmagic/solid-objects-js/issues/24)). One
|
|
7
|
+
side-effect import enables `reference.live`: read-only signals on the
|
|
8
|
+
proposed standard JavaScript signals API (`signal-polyfill`, a new
|
|
9
|
+
optional peer dependency) that subscribe through an in-process
|
|
10
|
+
`runtime.realtime` session when first watched and unsubscribe after a
|
|
11
|
+
linger when the last watcher leaves. Value-broadcast observables feed
|
|
12
|
+
named signals; `live.snapshot` re-fetches the authorized snapshot on
|
|
13
|
+
each accepted envelope; `live.payloads.<name>` carries personalized
|
|
14
|
+
payload projections under their independent revision fences; stale
|
|
15
|
+
revisions are fenced. Works in Node and
|
|
16
|
+
in the browser runtime.
|
|
17
|
+
|
|
18
|
+
## 0.14.0 - 2026-08-23
|
|
19
|
+
|
|
20
|
+
- Add `solid-objects/database/shared-sqlite-wasm`, the transparent
|
|
21
|
+
multi-tab database. Every tab runs an ordinary
|
|
22
|
+
`configure -> install -> ref` flow against the same shared database; the
|
|
23
|
+
adapter elects one holder per origin with the Web Locks API, sends every
|
|
24
|
+
other tab's SQL over a `BroadcastChannel` session to the holder, and
|
|
25
|
+
fails over onto the same OPFS state when the holder's tab dies. The
|
|
26
|
+
runtime's leases and fencing arbitrate the tabs' workers exactly as they
|
|
27
|
+
arbitrate Node processes. A Playwright test proves plain actor references
|
|
28
|
+
incrementing one durable counter from two tabs with failover.
|
|
29
|
+
- Add `solid-objects/browser/tab-host`, the multi-tab host that completes
|
|
30
|
+
milestone M3 of the in-browser runtime plan
|
|
31
|
+
([#17](https://github.com/cardmagic/solid-objects-js/issues/17)). Every
|
|
32
|
+
tab starts a candidate host; the Web Locks API elects one leader per
|
|
33
|
+
origin, and only the leader opens the database and runs the runtime.
|
|
34
|
+
Tabs invoke actors through a `BroadcastChannel` client that retries with
|
|
35
|
+
idempotent request ids. When the leader's tab dies, the lock releases,
|
|
36
|
+
the next host promotes, and the runtime continues from the same OPFS
|
|
37
|
+
state. A Playwright test proves shared state across two tabs and
|
|
38
|
+
failover after the leader closes.
|
|
39
|
+
- Share the transmit wire contract with the Ruby gem. The golden fixture
|
|
40
|
+
file `compatibility/transmit-envelopes.json` is committed to both
|
|
41
|
+
repositories with a consuming test on each side; `receiveTransmitEnvelope`
|
|
42
|
+
now defaults a missing `arguments` to an empty object, matching the Ruby
|
|
43
|
+
ingest and the staging side.
|
|
44
|
+
- Add `solid-objects/transmit`, milestone M4 of the plan. An actor
|
|
45
|
+
stages a transmit intent with `this.transmit().operation(arguments)` (or with
|
|
46
|
+
`emit(TRANSMIT_EFFECT, ...)` for a different target) in the same
|
|
47
|
+
transaction as its state change. `registerTransmit` drains the outbox
|
|
48
|
+
with at-least-once delivery and per-actor order (an ordered drain up to
|
|
49
|
+
the claimed effect's mailbox sequence), and `receiveTransmitEnvelope` gives
|
|
50
|
+
the server an idempotent ingest keyed on the effect id. Vitest covers
|
|
51
|
+
order under transmit failures, replay deduplication, and recovery after
|
|
52
|
+
an offline period; a Playwright test drains a browser outbox into the
|
|
53
|
+
Node server runtime.
|
|
54
|
+
- Change `TurnContextStore` to synchronous scoping. The store no longer
|
|
55
|
+
stays set across `await` boundaries, so an open transaction scope cannot
|
|
56
|
+
leak into interleaved tasks and trip the inside-transaction guards. In
|
|
57
|
+
the browser those guards are best-effort; Node keeps full
|
|
58
|
+
`AsyncLocalStorage` semantics.
|
|
59
|
+
- Retry OPFS SAH pool acquisition. The upstream module caches a failed
|
|
60
|
+
initialization; the adapter now passes `forceReinitIfPreviouslyFailed`,
|
|
61
|
+
so a new leader can claim the pool after the old tab dies.
|
|
62
|
+
|
|
63
|
+
- Add a platform seam for async context propagation
|
|
64
|
+
(`src/platform/context-store.ts`). Shared modules no longer import
|
|
65
|
+
`node:async_hooks` directly. Node entry points register an
|
|
66
|
+
`AsyncLocalStorage` factory. A `TurnContextStore` gives a browser host a
|
|
67
|
+
turn-scoped store for serialized actor turns. This is milestone M1 of the
|
|
68
|
+
in-browser runtime plan
|
|
69
|
+
([#17](https://github.com/cardmagic/solid-objects-js/issues/17)).
|
|
70
|
+
- Route UUID generation through `src/platform/uuid.ts`, which uses the
|
|
71
|
+
standard `crypto.randomUUID()`. Shared modules no longer import
|
|
72
|
+
`node:crypto`.
|
|
73
|
+
- Add `check:browser-imports` to `pnpm run check`. The script walks the
|
|
74
|
+
import graph of the browser-safe modules and fails when a `node:` module
|
|
75
|
+
or a server-only driver reaches that graph.
|
|
76
|
+
- Add `solid-objects/browser/host`, the entry point for a runtime host
|
|
77
|
+
inside a browser worker. An import registers the browser platform: a
|
|
78
|
+
turn-scoped context store and a browser host identity. The module
|
|
79
|
+
re-exports the core runtime API and the WASM adapter. A Playwright test
|
|
80
|
+
runs the full runtime in a Chromium module worker and proves durable
|
|
81
|
+
actor state across a page reload. This is the first stage of milestone M3
|
|
82
|
+
([#17](https://github.com/cardmagic/solid-objects-js/issues/17)).
|
|
83
|
+
- Replace the `Buffer.byteLength` payload size check with `TextEncoder`, so
|
|
84
|
+
serialization works without the Node `Buffer` global.
|
|
85
|
+
- Route the process identity (hostname, process id, runtime version)
|
|
86
|
+
through `src/platform/host-identity.ts`. The repository no longer imports
|
|
87
|
+
`node:os` or reads `process.pid` directly.
|
|
88
|
+
- Add `solid-objects/database/sqlite-wasm`, a browser-safe `Database`
|
|
89
|
+
adapter on `@sqlite.org/sqlite-wasm` (an optional peer dependency). The
|
|
90
|
+
full runtime passes its round-trip test against this adapter in Node, and
|
|
91
|
+
a Playwright test proves transactions, rollback, and OPFS persistence
|
|
92
|
+
across a page reload in Chromium. This is milestone M2 of the in-browser
|
|
93
|
+
runtime plan
|
|
94
|
+
([#17](https://github.com/cardmagic/solid-objects-js/issues/17)).
|
|
95
|
+
|
|
96
|
+
- Add `runtime.enqueueInternalMessage()` and
|
|
97
|
+
`runtime.enqueueInternalMessageInTransaction(connection, options)`, public
|
|
98
|
+
entry points for a host package to enqueue an `internal`-delivery-mode
|
|
99
|
+
actor message without going through user authorization. The
|
|
100
|
+
transaction-scoped variant accepts a caller-supplied `DatabaseConnection`
|
|
101
|
+
so the enqueue can commit atomically alongside other writes in the same
|
|
102
|
+
transaction; call the new `runtime.announceInternalMessage(message)` after
|
|
103
|
+
that transaction commits to wake worker roles the same way a normal
|
|
104
|
+
enqueue does.
|
|
105
|
+
- Add `runtime.snapshotWithIncarnation(reference)`, returning the same
|
|
106
|
+
authorized fields as `snapshot()` alongside the read instance's
|
|
107
|
+
`instanceId`, `revision`, and `createdAtMs`, computed from one shared read.
|
|
108
|
+
`instanceId` is a random UUID, not a monotonically increasing value, so a
|
|
109
|
+
caller that needs to detect actor recreation (a new incarnation
|
|
110
|
+
superseding an old one, regardless of revision) should fence on
|
|
111
|
+
`createdAtMs` rather than comparing `instanceId` values directly.
|
|
112
|
+
`createdAtMs` orders incarnations at millisecond granularity; destroying
|
|
113
|
+
and recreating the same actor identity within the same millisecond
|
|
114
|
+
produces two incarnations a caller cannot order by `createdAtMs` alone —
|
|
115
|
+
see `docs/correctness.md`.
|
|
116
|
+
|
|
3
117
|
## 0.13.3 - 2026-08-18
|
|
4
118
|
|
|
5
119
|
- Lower the supported Node.js floor from 24.15.0 to 24.4.0. Node.js 24.4.0 is
|
package/README.md
CHANGED
|
@@ -3,23 +3,38 @@
|
|
|
3
3
|
[](https://github.com/cardmagic/solid-objects-js/actions/workflows/ci.yml)
|
|
4
4
|
[](https://www.npmjs.com/package/solid-objects)
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
Open Source Durable Objects for JavaScript, in the SQL database you already run.
|
|
7
|
+
No daemon, no broker, and no new datastore.
|
|
8
8
|
|
|
9
|
-
Build addressable TypeScript objects with serialized calls and durable state
|
|
10
|
-
|
|
9
|
+
Build addressable TypeScript objects with serialized calls and durable state on
|
|
10
|
+
SQLite, PostgreSQL, or MySQL. You don't need Cloudflare for this.
|
|
11
11
|
|
|
12
12
|
Concurrent calls for one identity cannot overwrite each other. Calls for
|
|
13
13
|
different identities can run at the same time.
|
|
14
14
|
|
|
15
15
|
Define ordinary TypeScript classes and run them in ordinary Node.js processes.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
Solid Objects keeps the state, the queued operations, the retries, the
|
|
17
|
+
reminders, the effects, and the realtime invalidations in the database the
|
|
18
|
+
application already operates.
|
|
19
|
+
|
|
20
|
+
The same runtime also runs inside a browser worker on SQLite WASM, with
|
|
21
|
+
durable actor state in the origin's private file system, and its offline
|
|
22
|
+
writes can replay onto a Node **or Rails** backend over one shared wire
|
|
23
|
+
contract. See [Solid Objects in the browser](#solid-objects-in-the-browser).
|
|
24
|
+
|
|
25
|
+
> **Early release:** the correctness core has automated coverage. That coverage
|
|
26
|
+
> includes the supported databases, the Chromium browser client, the browser
|
|
27
|
+
> runtime, process recovery, and the packaged artifacts. The TypeScript
|
|
28
|
+
> implementation is still new. There is one deployed first-party reference
|
|
29
|
+
> application. There is no measured scale and no third-party production use
|
|
30
|
+
> yet. Read the
|
|
31
|
+
> [delivery boundaries](#delivery-boundaries) before you use it for important
|
|
32
|
+
> data.
|
|
33
|
+
|
|
34
|
+
> **Not a replacement for SQL transactions:** when one row update inside one
|
|
35
|
+
> transaction solves the problem, use that. Solid Objects earns its cost when an
|
|
36
|
+
> entity needs ordered calls across requests, retries, reminders, effects, and
|
|
37
|
+
> realtime state. See [Good and poor fits](#good-and-poor-fits).
|
|
23
38
|
|
|
24
39
|
## The programming model
|
|
25
40
|
|
|
@@ -61,29 +76,31 @@ processes submit them concurrently.
|
|
|
61
76
|
## Run it now with SQLite
|
|
62
77
|
|
|
63
78
|
Node.js 24.4.0 or newer is required. Node.js 24.15 or newer is preferred,
|
|
64
|
-
because `node:sqlite` prints an experimental warning before it. The
|
|
65
|
-
|
|
79
|
+
because `node:sqlite` prints an experimental warning before it. The published
|
|
80
|
+
package includes a quickstart:
|
|
66
81
|
|
|
67
82
|
```bash
|
|
68
|
-
npm exec --yes --package=solid-objects@
|
|
83
|
+
npm exec --yes --package=solid-objects@latest -- solid-objects quickstart
|
|
69
84
|
```
|
|
70
85
|
|
|
71
86
|
The command needs no repository checkout, database server, Redis, container, or
|
|
72
87
|
application configuration. It uses Node's built-in SQLite module and removes
|
|
73
88
|
its scoped temporary database before exiting.
|
|
74
89
|
|
|
75
|
-
|
|
76
|
-
|
|
90
|
+
It states its plan first, prints the `Counter` class it runs, and asks for
|
|
91
|
+
permission. It executes the work only after you answer, and then it explains
|
|
92
|
+
what each result proves. It asks nothing when stdin is not a terminal, so CI
|
|
93
|
+
never waits. Add `--yes` to skip the question in a terminal, or `--json` for a
|
|
94
|
+
machine-readable summary.
|
|
77
95
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
- operations for two different identities overlap in time; and
|
|
81
|
-
- the runtime closes and temporary state is removed.
|
|
96
|
+
The executable asserts rather than merely printing a plausible result. It exits
|
|
97
|
+
with a non-zero code when one of those checks fails.
|
|
82
98
|
|
|
83
99
|
## What Solid Objects is for
|
|
84
100
|
|
|
85
101
|
Use Solid Objects when more than one request, job, or process can act on the
|
|
86
|
-
same logical thing
|
|
102
|
+
same logical thing. The next action must then use the latest committed state of
|
|
103
|
+
that thing.
|
|
87
104
|
These are the stateful coordination patterns for which people often reach for
|
|
88
105
|
Durable Objects:
|
|
89
106
|
|
|
@@ -102,11 +119,46 @@ limiter or another very hot identity is a poor fit because it becomes an
|
|
|
102
119
|
intentional bottleneck. If one ordinary row transaction solves the problem,
|
|
103
120
|
prefer that. See [Choosing Solid Objects](docs/fit.md) for the longer guide.
|
|
104
121
|
|
|
122
|
+
## Measured behavior
|
|
123
|
+
|
|
124
|
+
One developer machine, not a capacity promise. Apple M5, Node.js 24.18.0, 250
|
|
125
|
+
measured operations at client concurrency 16, on August 22, 2026. PostgreSQL
|
|
126
|
+
17.11 and MySQL 9.7.1 run natively, not in a container.
|
|
127
|
+
|
|
128
|
+
| Measurement | Result |
|
|
129
|
+
| ------------------------------------------------------------- | ---------------: |
|
|
130
|
+
| Committed operations per second, one hot identity, SQLite | 286 to 323 ops/s |
|
|
131
|
+
| The same identity across four processes, SQLite | 507 to 519 ops/s |
|
|
132
|
+
| The same identity across four processes, PostgreSQL | 266 to 331 ops/s |
|
|
133
|
+
| The same identity across four processes, MySQL | 214 to 228 ops/s |
|
|
134
|
+
| Idle wake-up to committed result, one process | 2.66 ms p50 |
|
|
135
|
+
| Idle wake-up to committed result, two processes, polling only | 1,006 ms p50 |
|
|
136
|
+
| Idle CPU per process, 100 ms fast interval | 0.121% |
|
|
137
|
+
| Idle database passes per second, after backoff | 4.0 |
|
|
138
|
+
|
|
139
|
+
The four idle rows come from a separate harness on August 16, 2026.
|
|
140
|
+
|
|
141
|
+
Each range spans the synchronous and the asynchronous handler shape. Calls to
|
|
142
|
+
one identity are serialized on purpose, so the per-call latency in these runs
|
|
143
|
+
includes the wait behind the other fifteen concurrent callers. Throughput is
|
|
144
|
+
the honest number for that case.
|
|
145
|
+
|
|
146
|
+
The same PostgreSQL and MySQL versions in Docker Desktop reached 1.8x to 4.9x
|
|
147
|
+
less throughput on those rows. Measure your own deployment shape before you
|
|
148
|
+
plan capacity.
|
|
149
|
+
|
|
150
|
+
The polling-only row is the tradeoff to know before you deploy: use PostgreSQL
|
|
151
|
+
notifications or the optional Redis Pub/Sub when separate processes need
|
|
152
|
+
low-latency delivery.
|
|
153
|
+
|
|
154
|
+
Conditions, sources of bias, and the complete matrix for all three databases
|
|
155
|
+
are in [Benchmarks](docs/benchmarks.md).
|
|
156
|
+
|
|
105
157
|
## Running in a deployed application
|
|
106
158
|
|
|
107
159
|
[Shuffle Up and Play](https://shuffleupandplay.com/) is a deployed reference
|
|
108
|
-
application
|
|
109
|
-
|
|
160
|
+
application. Two players create a table, load decks, and move cards. Realtime
|
|
161
|
+
updates reach both browsers. Its
|
|
110
162
|
[source](https://github.com/cardmagic/shuffleupandplay) uses Node 24,
|
|
111
163
|
TypeScript, SQLite, `node:http`, and `ws`. Each table code addresses one
|
|
112
164
|
`GameRoom` actor that owns both seats, so mutations share one durable mailbox
|
|
@@ -125,23 +177,23 @@ The application and its tests exercise more than a counter-shaped happy path:
|
|
|
125
177
|
| Time and schema changes | The actor defines [versioned state migrations](https://github.com/cardmagic/shuffleupandplay/blob/519a343e8db0bb6eed961a2ffd374dba80d67cd6/src/actors/game-room.ts#L47-L91) and a [durable reminder](https://github.com/cardmagic/shuffleupandplay/blob/519a343e8db0bb6eed961a2ffd374dba80d67cd6/src/actors/game-room.ts#L276-L310). Tests load [stored version-one state](https://github.com/cardmagic/shuffleupandplay/blob/519a343e8db0bb6eed961a2ffd374dba80d67cd6/test/operations.test.ts#L135-L201) and [run the reminder scheduler](https://github.com/cardmagic/shuffleupandplay/blob/519a343e8db0bb6eed961a2ffd374dba80d67cd6/test/durability.test.ts#L236-L257). |
|
|
126
178
|
| Operations and CI | The [operations tests](https://github.com/cardmagic/shuffleupandplay/blob/519a343e8db0bb6eed961a2ffd374dba80d67cd6/test/operations.test.ts#L39-L202) exercise doctor, process, retention, and reconciliation APIs; server suites cover the [dashboard](https://github.com/cardmagic/shuffleupandplay/blob/519a343e8db0bb6eed961a2ffd374dba80d67cd6/test/server.test.ts#L297-L326), [rate limits](https://github.com/cardmagic/shuffleupandplay/blob/519a343e8db0bb6eed961a2ffd374dba80d67cd6/test/rate-limit.test.ts), and [shutdown](https://github.com/cardmagic/shuffleupandplay/blob/519a343e8db0bb6eed961a2ffd374dba80d67cd6/test/shutdown.test.ts). The [current main CI run](https://github.com/cardmagic/shuffleupandplay/actions/runs/31963000789) passed typechecking, 171 tests, the build, the doctor, and a Docker image build. |
|
|
127
179
|
|
|
128
|
-
**Scope:** the checked-in deployment configuration runs one Node process
|
|
129
|
-
SQLite on one Docker host. It
|
|
130
|
-
measured traffic level or every supported topology. Its deck-import effect
|
|
131
|
-
|
|
132
|
-
stable idempotency key because delivery is at least once. The
|
|
133
|
-
|
|
134
|
-
and multi-process lease fencing
|
|
180
|
+
**Scope:** the checked-in deployment configuration runs one Node process with
|
|
181
|
+
SQLite on one Docker host. It shows a real deployed workload. It does not show a
|
|
182
|
+
measured traffic level or every supported topology. Its deck-import effect reads
|
|
183
|
+
an external API. An effect that writes to an external system still needs a
|
|
184
|
+
stable idempotency key, because delivery is at least once. The restart tests
|
|
185
|
+
close the runtime cleanly. The library verifies abrupt termination, PostgreSQL,
|
|
186
|
+
MySQL, and multi-process lease fencing separately in its
|
|
135
187
|
[test matrix](docs/support.md),
|
|
136
188
|
[failure-recovery demonstration](examples/failure-recovery/demo.ts), and
|
|
137
|
-
[correctness contract](docs/correctness.md).
|
|
138
|
-
|
|
189
|
+
[correctness contract](docs/correctness.md). Compare those guarantees and limits
|
|
190
|
+
with your own workload.
|
|
139
191
|
|
|
140
192
|
## How it works
|
|
141
193
|
|
|
142
|
-
|
|
143
|
-
Public fields are JSON state, public methods are durable
|
|
144
|
-
getters are ordered queries.
|
|
194
|
+
Solid Objects addresses an object by its TypeScript class and its
|
|
195
|
+
application-defined ID. Public fields are JSON state, public methods are durable
|
|
196
|
+
operations, and public getters are ordered queries.
|
|
145
197
|
|
|
146
198
|
For each identity, Solid Objects:
|
|
147
199
|
|
|
@@ -157,9 +209,9 @@ claimed message. A worker that finishes JavaScript after losing its lease
|
|
|
157
209
|
cannot commit. See the executable [failure-recovery demonstration](examples/failure-recovery/demo.ts)
|
|
158
210
|
and the full [architecture](docs/architecture.md).
|
|
159
211
|
|
|
160
|
-
Redis is optional wake-up infrastructure. It can reduce notification latency
|
|
161
|
-
|
|
162
|
-
|
|
212
|
+
Redis is optional wake-up infrastructure. It can reduce notification latency in
|
|
213
|
+
a multi-process MySQL deployment. The relational database stays the durable
|
|
214
|
+
source of truth, and polling stays the recovery path.
|
|
163
215
|
|
|
164
216
|
Idle roles back off from the configured 100 ms fast polling interval to one
|
|
165
217
|
second. Processed work and wake-up notifications reset that interval
|
|
@@ -230,7 +282,7 @@ class Room extends Actor {
|
|
|
230
282
|
```
|
|
231
283
|
|
|
232
284
|
`version` crosses the shared invalidation channel. `hands` contributes only its
|
|
233
|
-
name when its real value changes
|
|
285
|
+
name when its real value changes. A reauthorized component endpoint can then
|
|
234
286
|
render subscriber-specific state without a manual revision counter.
|
|
235
287
|
|
|
236
288
|
The browser package handles replay, reconnection, incarnation/revision fences,
|
|
@@ -238,24 +290,115 @@ personalized payloads, and framework-neutral component refresh. Applications
|
|
|
238
290
|
provide authentication, WebSocket transport, and rendering. See the
|
|
239
291
|
[browser protocol](docs/browser-protocol.md) and [authorization guide](docs/authorization.md).
|
|
240
292
|
|
|
293
|
+
## Solid Objects in the browser
|
|
294
|
+
|
|
295
|
+
The full runtime runs inside a browser module worker. Actors look exactly
|
|
296
|
+
like they do in Node; the database is SQLite WASM, and persistent storage
|
|
297
|
+
lives in the origin's private file system (OPFS), so actor state survives
|
|
298
|
+
page reloads.
|
|
299
|
+
|
|
300
|
+
```javascript
|
|
301
|
+
import { Actor, configure, sharedSqliteWasm } from "solid-objects/browser/host"
|
|
302
|
+
|
|
303
|
+
class Counter extends Actor {
|
|
304
|
+
static actorType = "Counter"
|
|
305
|
+
|
|
306
|
+
count = 0
|
|
307
|
+
|
|
308
|
+
increment({ amount = 1 } = {}) {
|
|
309
|
+
this.count += amount
|
|
310
|
+
return this.count
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
const runtime = configure({
|
|
315
|
+
database: sharedSqliteWasm({ path: "app.db" }),
|
|
316
|
+
authorizeMessage: () => true,
|
|
317
|
+
authorizeQuery: () => true,
|
|
318
|
+
})
|
|
319
|
+
await runtime.install()
|
|
320
|
+
|
|
321
|
+
await Counter.ref("page-hits").increment()
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
That code runs identically in every tab. `sharedSqliteWasm` elects one
|
|
325
|
+
database holder per origin through the Web Locks API, carries the other
|
|
326
|
+
tabs' SQL to it over a `BroadcastChannel`, and fails over onto the same
|
|
327
|
+
durable state when the holder's tab dies. Use `sqliteWasm` directly for a
|
|
328
|
+
single dedicated worker.
|
|
329
|
+
|
|
330
|
+
Two companions complete the local-first story:
|
|
331
|
+
|
|
332
|
+
- `solid-objects/browser/tab-host` runs one runtime for all tabs when the
|
|
333
|
+
application prefers request-level routing: the leader's worker executes
|
|
334
|
+
every operation, and other tabs invoke through a `BroadcastChannel` client
|
|
335
|
+
by name.
|
|
336
|
+
- `solid-objects/transmit` drains the transactional effects outbox to a
|
|
337
|
+
server with at-least-once delivery, per-actor order, and an idempotent
|
|
338
|
+
server ingest, so offline writes reconcile when the network returns.
|
|
339
|
+
|
|
340
|
+
### The backend can be Rails, not only Node
|
|
341
|
+
|
|
342
|
+
The browser runtime does not require a Node server behind it. The transmit
|
|
343
|
+
wire contract is shared with the Ruby gem
|
|
344
|
+
([solid-objects-ruby](https://github.com/cardmagic/solid-objects-ruby)):
|
|
345
|
+
`SolidObjects::Transmission.receive` accepts the same envelopes as the Node
|
|
346
|
+
ingest `receiveTransmitEnvelope`, dedups on the same `transmit:<effectId>`
|
|
347
|
+
key, and both repositories pin the contract with one shared fixture file.
|
|
348
|
+
A browser front end on `solid-objects/browser/host` inside a Rails
|
|
349
|
+
application therefore replays its offline writes directly onto Ruby server
|
|
350
|
+
actors — no Node service in between:
|
|
351
|
+
|
|
352
|
+
```ruby
|
|
353
|
+
class TransmitController < ApplicationController
|
|
354
|
+
def create
|
|
355
|
+
head :forbidden and return unless authenticated_device?
|
|
356
|
+
|
|
357
|
+
SolidObjects::Transmission.receive(JSON.parse(request.body.read))
|
|
358
|
+
head :ok
|
|
359
|
+
end
|
|
360
|
+
end
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
The Ruby side of the family shipped in `solid_objects` 0.14.0, released the
|
|
364
|
+
same day as this package's 0.14.0
|
|
365
|
+
([solid-objects-ruby#49](https://github.com/cardmagic/solid-objects-ruby/pull/49)).
|
|
366
|
+
|
|
367
|
+
The wire shapes are documented in the
|
|
368
|
+
[browser protocol](docs/browser-protocol.md), the API in the
|
|
369
|
+
[public API reference](docs/api.md), and the platform boundaries in
|
|
370
|
+
[supported versions](docs/support.md).
|
|
371
|
+
|
|
241
372
|
## Comparison
|
|
242
373
|
|
|
243
374
|
These systems solve different coordination problems. The table describes their
|
|
244
375
|
default unit and deployment model, not a quality ranking.
|
|
245
376
|
|
|
246
|
-
| Approach | Serialization and state unit | Durable substrate
|
|
247
|
-
| --------------------------- | ----------------------------------------------------- |
|
|
248
|
-
| SQL transaction or row lock | Selected rows in one transaction | Application database
|
|
249
|
-
| Traditional job queue | Job or queue; ordering depends on queue configuration | Broker or queue database
|
|
250
|
-
| Solid Objects | TypeScript class plus object ID | Existing SQLite, PostgreSQL, or MySQL
|
|
251
|
-
| Cloudflare Durable Objects | Object class plus globally unique ID | Per-object managed storage
|
|
252
|
-
|
|
|
253
|
-
|
|
|
254
|
-
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
377
|
+
| Approach | Serialization and state unit | Durable substrate | Additional runtime | Recovery model | Placement |
|
|
378
|
+
| --------------------------- | ----------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------- | -------------------------------------------------------- | --------------------------------------------------------- |
|
|
379
|
+
| SQL transaction or row lock | Selected rows in one transaction | Application database | None | Application retries the transaction | Application deployment |
|
|
380
|
+
| Traditional job queue | Job or queue; ordering depends on queue configuration | Broker or queue database | Queue workers and usually a broker | Retry the job | Application deployment |
|
|
381
|
+
| Solid Objects | TypeScript class plus object ID | Existing SQLite, PostgreSQL, or MySQL | Library in application processes | Retry the per-ID operation from durable state | Application deployment |
|
|
382
|
+
| Cloudflare Durable Objects | Object class plus globally unique ID | Per-object managed storage | Cloudflare Workers platform | Managed object activation | Cloudflare-selected location |
|
|
383
|
+
| celld | Object class plus object name | Per-object SQLite replicated to a bucket you own | celld daemon that embeds V8 and runs Wrangler bundles | A new owner restores the object database from the bucket | Any node in your fleet, chosen by bucket compare-and-swap |
|
|
384
|
+
| Rivet Actors | Addressable actor | Actor state, KV, or per-actor SQLite | Rivet Engine or managed compute | Actor sleep, wake, and persistence | Configured Rivet deployment |
|
|
385
|
+
| DBOS | Workflow ID and checkpointed steps | PostgreSQL system database | Library; Conductor recommended for distributed recovery | Deterministic workflow replay from checkpoints | Application deployment |
|
|
386
|
+
| Restate | Service handler or keyed virtual object | Restate log and state store | Restate server or cloud service | Durable handler execution and journal replay | Restate deployment |
|
|
387
|
+
|
|
388
|
+
celld and Solid Objects both self-host the Durable Objects model. The difference
|
|
389
|
+
is where the state lives and what you run. celld runs a daemon that embeds V8
|
|
390
|
+
and executes Wrangler bundles. It gives each object its own SQLite database,
|
|
391
|
+
and it replicates that database to an object-storage bucket you own. Object
|
|
392
|
+
ownership moves between nodes through compare-and-swap on that bucket. Solid
|
|
393
|
+
Objects runs plain TypeScript classes inside your Node processes, adds no
|
|
394
|
+
daemon, and keeps object state in the SQL database the application already
|
|
395
|
+
operates. Choose celld to run Workers-format code across a fleet with
|
|
396
|
+
bucket-based placement. Choose Solid Objects to keep one database, no extra
|
|
397
|
+
process, and an ordinary Node deployment.
|
|
398
|
+
|
|
399
|
+
[docs/comparisons.md](docs/comparisons.md) holds the sourced comparison for each
|
|
400
|
+
dimension: realtime projections, edge placement, cross-identity transactions,
|
|
401
|
+
and operational data access.
|
|
259
402
|
|
|
260
403
|
## Requirements and supported systems
|
|
261
404
|
|
|
@@ -264,11 +407,13 @@ edge placement, cross-identity transactions, and operational data access—is in
|
|
|
264
407
|
- TypeScript 5.9 or newer for TypeScript applications
|
|
265
408
|
- SQLite through `node:sqlite`, PostgreSQL 14 or newer, or MySQL 8.0 or newer
|
|
266
409
|
with InnoDB
|
|
267
|
-
- optional `pg`, `mysql2`, or `
|
|
268
|
-
adapter
|
|
410
|
+
- optional `pg`, `mysql2`, `redis`, or `@sqlite.org/sqlite-wasm` peer
|
|
411
|
+
dependency only for the selected adapter
|
|
412
|
+
- for the browser runtime: a browser with OPFS for persistent storage and the
|
|
413
|
+
Web Locks API for the multi-tab host
|
|
269
414
|
|
|
270
|
-
|
|
271
|
-
|
|
415
|
+
[Supported versions](docs/support.md) records the exact CI matrix and the
|
|
416
|
+
boundaries.
|
|
272
417
|
|
|
273
418
|
## Operations
|
|
274
419
|
|
|
@@ -277,10 +422,10 @@ and stale-process recovery roles. The database-backed operator dashboard is an
|
|
|
277
422
|
optional `solid-objects/web` export with deny-by-default administration policy,
|
|
278
423
|
session-backed CSRF protection, and Fetch or Node/Connect mounting.
|
|
279
424
|
|
|
280
|
-
The dashboard defaults to authorized read/write access. An authorized
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
425
|
+
The dashboard defaults to authorized read/write access. An authorized read-only
|
|
426
|
+
mode removes the mutations. Use the explicitly public read-only mode only for
|
|
427
|
+
synthetic demo data, because it exposes stored arguments, results, errors,
|
|
428
|
+
identifiers, and operational metadata.
|
|
284
429
|
|
|
285
430
|
Administration remains available through the JSON CLI and typed runtime
|
|
286
431
|
managers. See [Operations](docs/operations.md), the [dashboard guide](docs/dashboard.md),
|
|
@@ -288,11 +433,11 @@ and [Configuration](docs/configuration.md).
|
|
|
288
433
|
|
|
289
434
|
## Design provenance
|
|
290
435
|
|
|
291
|
-
Solid Objects JS is a Node.js and TypeScript implementation
|
|
292
|
-
|
|
293
|
-
began at the `0.12` capability generation because the
|
|
294
|
-
targeted the Ruby `0.12` contract
|
|
295
|
-
JavaScript release generations.
|
|
436
|
+
Solid Objects JS is a Node.js and TypeScript implementation. The Ruby
|
|
437
|
+
[`solid_objects`](https://github.com/cardmagic/solid-objects-ruby) design informed
|
|
438
|
+
it. It began at the `0.12` capability generation, because the first
|
|
439
|
+
implementation targeted the Ruby `0.12` contract. That number does not represent
|
|
440
|
+
twelve earlier JavaScript release generations.
|
|
296
441
|
|
|
297
442
|
The TypeScript implementation is not a source translation. It redesigned the
|
|
298
443
|
API around inferred TypeScript references, Node runtime supervision,
|
|
@@ -304,9 +449,9 @@ runtime differences.
|
|
|
304
449
|
The Ruby project first appeared publicly on August 6, 2026, and this TypeScript
|
|
305
450
|
repository on August 13, 2026. Both remain early releases. The
|
|
306
451
|
[`mtg-playmat`](https://github.com/cardmagic/mtg-playmat) application uses the
|
|
307
|
-
Ruby actor and realtime design
|
|
452
|
+
Ruby actor and realtime design.
|
|
308
453
|
[Shuffle Up and Play](https://github.com/cardmagic/shuffleupandplay) uses the
|
|
309
|
-
TypeScript package in the deployed Node and SQLite topology
|
|
454
|
+
TypeScript package in the deployed Node and SQLite topology above.
|
|
310
455
|
|
|
311
456
|
## Documentation
|
|
312
457
|
|
package/dist/actor.d.ts
CHANGED
|
@@ -89,6 +89,7 @@ export declare abstract class Actor {
|
|
|
89
89
|
onSuccess?: string;
|
|
90
90
|
onFailure?: string;
|
|
91
91
|
}): void;
|
|
92
|
+
transmit(): ScheduledOperations;
|
|
92
93
|
commitAction(name: string, argumentsValue?: Record<string, unknown>): void;
|
|
93
94
|
/** See docs/api.md for when to give a reminder a key. */
|
|
94
95
|
schedule(options: ReminderOptions): ScheduledOperations;
|
package/dist/actor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actor.d.ts","sourceRoot":"","sources":["../src/actor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"actor.d.ts","sourceRoot":"","sources":["../src/actor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,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F,IAAI,CACF,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;QACnC,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,SAAS,CAAC,EAAE,MAAM,CAAA;KACd,GACL,IAAI;IAcP,QAAQ,IAAI,mBAAmB;IAS/B,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,IAAI;IAI9E,yDAAyD;IACzD,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,mBAAmB;IAsBvD,MAAM,CAAC,WAAW,SAAS,KAAK,EAC9B,SAAS,EAAE,cAAc,CAAC,WAAW,CAAC,EACtC,OAAO,GAAE,sBAA2B,GACnC,gBAAgB,CAAC,WAAW,CAAC;CA2EjC"}
|
package/dist/actor.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { currentMessage, currentRuntime } from "./context.js";
|
|
2
2
|
import { getDefaultRuntime } from "./default-runtime.js";
|
|
3
3
|
import { InvalidRejectionCode, Rejected, UnknownOperation } from "./errors.js";
|
|
4
|
+
import { TRANSMIT_EFFECT } from "./transmit-effect.js";
|
|
4
5
|
import { createStagedOperationMap, createStagedOperations, } from "./reference.js";
|
|
5
6
|
import { jsonObject, normalizeJson } from "./serialization.js";
|
|
6
7
|
const observableBroadcastMode = Symbol("solid-objects.observable-broadcast-mode");
|
|
@@ -98,6 +99,14 @@ export class Actor {
|
|
|
98
99
|
...(options.onFailure === undefined ? {} : { failureOperation: String(options.onFailure) }),
|
|
99
100
|
});
|
|
100
101
|
}
|
|
102
|
+
transmit() {
|
|
103
|
+
return createStagedOperationMap(this.#operations, (operation, argumentsValue) => {
|
|
104
|
+
this.#intents.effects.push({
|
|
105
|
+
name: TRANSMIT_EFFECT,
|
|
106
|
+
arguments: jsonObject({ operation, arguments: argumentsValue }),
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
}
|
|
101
110
|
commitAction(name, argumentsValue = {}) {
|
|
102
111
|
this.#intents.commitActions.push({ name, arguments: jsonObject(argumentsValue) });
|
|
103
112
|
}
|
package/dist/actor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actor.js","sourceRoot":"","sources":["../src/actor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAExD,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9E,OAAO,EACL,wBAAwB,EACxB,sBAAsB,GAIvB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAG9D,MAAM,uBAAuB,GAAG,MAAM,CAAC,yCAAyC,CAAC,CAAA;AAYjF,MAAM,UAAU,qBAAqB,CAAQ,KAAY;IACvD,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,uBAAuB,CAAC,EAAE,cAAc,EAAE,CAAC,CAAA;AAC5E,CAAC;AAED,MAAM,UAAU,cAAc,CAAQ,KAAY;IAChD,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,uBAAuB,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;AACrE,CAAC;AAoED,qFAAqF;AACrF,MAAM,mBAAmB,GAAG,GAAG,CAAA;AAC/B,MAAM,sBAAsB,GAAG,GAAG,CAAA;AAElC,SAAS,oBAAoB,CAAC,GAAgC;IAC5D,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,SAAS,CAAA;IAEvC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;IAC/B,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,I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MAAM,EAAE,CAAC,CAAC,CAAA;IAC3F,CAAC;;AAGH,SAAS,qBAAqB,CAAC,KAAa;IAC1C,OAAO,uBAAuB,IAAI,KAAK,CAAA;AACzC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SolidObjectsRuntime } from "./runtime.js";
|
|
2
2
|
export declare class BroadcastWorker {
|
|
3
3
|
private readonly runtime;
|
|
4
|
-
readonly processId:
|
|
4
|
+
readonly processId: string;
|
|
5
5
|
private registered;
|
|
6
6
|
private stopping;
|
|
7
7
|
private readonly pollingBackoff;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"broadcast-worker.d.ts","sourceRoot":"","sources":["../src/broadcast-worker.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAIvD,qBAAa,eAAe;IAMd,OAAO,CAAC,QAAQ,CAAC,OAAO;IALpC,QAAQ,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"broadcast-worker.d.ts","sourceRoot":"","sources":["../src/broadcast-worker.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAIvD,qBAAa,eAAe;IAMd,OAAO,CAAC,QAAQ,CAAC,OAAO;IALpC,QAAQ,CAAC,SAAS,SAAe;IACjC,OAAO,CAAC,UAAU,CAAQ;IAC1B,OAAO,CAAC,QAAQ,CAAQ;IACxB,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAgB;gBAElB,OAAO,EAAE,mBAAmB;IAYzD,IAAI,kCAAkC,IAAI,MAAM,CAE/C;IAEK,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;IAc1B,YAAY,CAAC,OAAO,GAAE;QAAE,aAAa,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAWvE,GAAG,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAoB7C,eAAe,IAAI,IAAI;IAIvB,OAAO,IAAI,OAAO;IAIZ,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;YASb,gBAAgB;CAK/B"}
|
package/dist/broadcast-worker.js
CHANGED