Current collected state Current
Observed since 20 Oct, 22:00 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
@021.is/spine-jobs
NATS JetStream publisher + consumer wrapper. Async fan-out + cron triggers + work queues, all going through your NATS instance.
Wrapper around NATS JetStream (your NATS instance).
Three uses:
event.published; independent consumers (audit, analytics, push) each handle it. No HTTP, no waiting, no fragile orchestration.spine.cron.daily-billing-run published by a tiny scheduler pod; the billing service consumes.import { connectJobs } from "@021.is/spine-jobs";
const jobs = await connectJobs({ servers: env.NATS_URL });
// Publish
await jobs.publish("event.published", { eventId: "e_1", organizerId: "o_1" });
// Consume (one consumer per concern; durable so it survives restarts)
await jobs.consume("event.published", "audit-consumer", async (payload) => {
await db.audit.create({ data: { action: "event.published", ...payload } });
});
JetStream-dependent — gated by a Testcontainers NATS image when added to the test suite. For now, integration tests live in the consuming repos.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
natsEnvironment{
"local_name": "nats",
"alias": false,
"peer_metadata": null
} | ^2.28.2 | runtime |
@021.is/spine-errorsEnvironment{
"local_name": "@021.is/spine-errors",
"alias": false,
"peer_metadata": null
} | ^0.4.0 | runtime |
Source distribution
{
"shasum": "1ae15cbff7037ef751891326b158d50b4cb62548",
"tarball": "https://registry.npmjs.org/@021.is/spine-jobs/-/spine-jobs-0.4.0.tgz",
"fileCount": 4,
"integrity": "sha512-FkO2CwntkgOUzVu3mNF41sJ0udEc+x7TlrUTJ2Bd7SIkJ6r73OlGvHLLxqeelOqRptBUV6hsA0/jWU33aYCEWg==",
"signatures": [
{
"sig": "MEUCIQDMr15LIu8I21azFT9AYdoz9RrPm+QXtQfiLreJbOWwRAIgENefu3CBg8itFBZlAI/6z5xaYq2s/jUZfVmwciSFL/A=",
"keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
}
],
"unpackedSize": 4995
}Observed since 20 Oct, 22:00 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:f3b1da67ba17d1bbedae90caaa4287f5491c4cc97871aba7aa31335304124d7d