@adonis-agora/durable 0.22.0 → 0.24.0

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 (56) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/assets/spa/assets/index-CV232q_B.js +67 -0
  3. package/dist/assets/spa/assets/index-CV232q_B.js.map +1 -0
  4. package/dist/assets/spa/index.html +1 -1
  5. package/dist/providers/durable_provider.d.ts.map +1 -1
  6. package/dist/providers/durable_provider.js +31 -5
  7. package/dist/providers/durable_provider.js.map +1 -1
  8. package/dist/src/admission.d.ts +1 -1
  9. package/dist/src/admissions/factory.d.ts +73 -0
  10. package/dist/src/admissions/factory.d.ts.map +1 -0
  11. package/dist/src/admissions/factory.js +41 -0
  12. package/dist/src/admissions/factory.js.map +1 -0
  13. package/dist/src/dashboard/gateway-adapter.d.ts +4 -1
  14. package/dist/src/dashboard/gateway-adapter.d.ts.map +1 -1
  15. package/dist/src/dashboard/gateway-adapter.js +5 -0
  16. package/dist/src/dashboard/gateway-adapter.js.map +1 -1
  17. package/dist/src/dashboard/handlers.d.ts +15 -2
  18. package/dist/src/dashboard/handlers.d.ts.map +1 -1
  19. package/dist/src/dashboard/handlers.js +78 -9
  20. package/dist/src/dashboard/handlers.js.map +1 -1
  21. package/dist/src/dashboard/index.d.ts +1 -1
  22. package/dist/src/dashboard/index.js +1 -1
  23. package/dist/src/define_config.d.ts +35 -2
  24. package/dist/src/define_config.d.ts.map +1 -1
  25. package/dist/src/define_config.js +2 -1
  26. package/dist/src/define_config.js.map +1 -1
  27. package/dist/src/dispatch-routing.d.ts +1 -1
  28. package/dist/src/dispatch-routing.js +1 -1
  29. package/dist/src/engine.d.ts +12 -3
  30. package/dist/src/engine.d.ts.map +1 -1
  31. package/dist/src/engine.js +11 -0
  32. package/dist/src/engine.js.map +1 -1
  33. package/dist/src/index.d.ts +6 -2
  34. package/dist/src/index.d.ts.map +1 -1
  35. package/dist/src/index.js +9 -2
  36. package/dist/src/index.js.map +1 -1
  37. package/dist/src/interfaces.d.ts +15 -0
  38. package/dist/src/interfaces.d.ts.map +1 -1
  39. package/dist/src/protocol.js +1 -1
  40. package/dist/src/queue.d.ts +2 -2
  41. package/dist/src/run-waiting.d.ts +25 -0
  42. package/dist/src/run-waiting.d.ts.map +1 -0
  43. package/dist/src/run-waiting.js +59 -0
  44. package/dist/src/run-waiting.js.map +1 -0
  45. package/dist/src/telescope/extension.d.ts.map +1 -1
  46. package/dist/src/telescope/extension.js +1 -0
  47. package/dist/src/telescope/extension.js.map +1 -1
  48. package/dist/src/testing/in-memory-transport.js +1 -1
  49. package/dist/src/transports/event-emitter.js +1 -1
  50. package/dist/src/transports/factory.d.ts +56 -2
  51. package/dist/src/transports/factory.d.ts.map +1 -1
  52. package/dist/src/transports/factory.js +14 -0
  53. package/dist/src/transports/factory.js.map +1 -1
  54. package/package.json +6 -6
  55. package/dist/assets/spa/assets/index-BpH1yTMa.js +0 -81
  56. package/dist/assets/spa/assets/index-BpH1yTMa.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,50 @@
1
1
  # @adonis-agora/durable
2
2
 
3
+ ## 0.24.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#63](https://github.com/DavideCarvalho/adonis-agora-durable/pull/63) [`62a44a4`](https://github.com/DavideCarvalho/adonis-agora-durable/commit/62a44a44b99c58d60fdb6d24767478e0c3cf19e5) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Export the ace-command building blocks and the schema-logger types from the package root.
8
+
9
+ `runWorkerLoop`, `runTick`, `listRuns`, `retryRun`, `renderRunsTable`, `attachLiveness`, `filterStale`, `staleHint`, `parseDurationMs` and `DEFAULT_STALE_MS` back `durable:work` / `durable:runs` / `durable:retry` and were documented as composable, but lived in an internal barrel with no `exports` entry — importing any of them failed. `CreateDurableTablesOptions` and `DurableSchemaLogger` are exported too, so the third argument of `createDurableTables(db, connection, { logger })` is nameable in a migration.
10
+
11
+ - [#63](https://github.com/DavideCarvalho/adonis-agora-durable/pull/63) [`62a44a4`](https://github.com/DavideCarvalho/adonis-agora-durable/commit/62a44a44b99c58d60fdb6d24767478e0c3cf19e5) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - `config/durable.ts` now accepts `webhookUrl`, `admission`, `traceparent` and `trackStepStart`.
12
+
13
+ All four existed only as `WorkflowEngineDeps`, reachable solely by constructing a `WorkflowEngine` by hand — so there was no supported way to configure a webhook callback URL or a fleet-wide flow-control backend from an AdonisJS app, and passing them in `defineConfig({ ... })` was an excess-property error (or, once cast away, a silent no-op). The provider now reads and forwards each one:
14
+
15
+ - `webhookUrl: (token) => string` — populates the `url` on the object `ctx.webhook()` returns.
16
+ - `admission: AdmissionBackend | AdmissionFactory` — a ready backend, or a lazy thunk built with the new `admissions` factory namespace. `admissions.redis({ connection })` resolves an `@adonisjs/redis` connection by name and makes every `{ queue }` concurrency/rate cap fleet-wide instead of per-pod, importing the peer dependency only when selected.
17
+ - `traceparent: () => string | undefined` — an explicit builder wins over the `@adonis-agora/diagnostics-otel` global slot the provider already consumed, so a tracer durable does not know about can be bridged.
18
+ - `trackStepStart: boolean` — turn off the extra in-flight `running` checkpoint on hot paths with many short local steps.
19
+
20
+ - [#63](https://github.com/DavideCarvalho/adonis-agora-durable/pull/63) [`62a44a4`](https://github.com/DavideCarvalho/adonis-agora-durable/commit/62a44a44b99c58d60fdb6d24767478e0c3cf19e5) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - `transports.queue(...)` and `transports.db(...)` now forward the isolation and reclaim options their transports already supported.
21
+
22
+ Both factories silently dropped everything the underlying `QueueTransport` / `DbTransport` accepted beyond a handful of fields, so documented knobs were unreachable from `config/durable.ts`: there was no way to run two worker pools on one backend (`partition`), to segment a namespace explicitly, to tune the stalled-job reclaim sweep (`stalledCheckIntervalMs`, `stalledThresholdMs`, `maxStalledCount`), or to route poll-loop failures into the app logger (`onError`). All of them now pass through, and `group` is marked deprecated on both configs to match the transports, which route by handler name.
23
+
24
+ ### Patch Changes
25
+
26
+ - [#64](https://github.com/DavideCarvalho/adonis-agora-durable/pull/64) [`81bc949`](https://github.com/DavideCarvalho/adonis-agora-durable/commit/81bc949c007dd691aec1a361615e629ec6925841) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Fix "Cancel + Undo" in the dashboard silently performing a plain cancel.
27
+
28
+ The console sends `POST /api/runs/:id/cancel?compensate=true` on the query string with no request body, but the handler read `compensate` from the JSON body only. The flag was therefore dropped on every cancel issued from the console: the request answered `200`, the UI reported success, and **the saga compensations never ran**. An operator who clicked a button labelled "Cancel and run saga compensations (undo completed steps in reverse)" was told it worked while completed steps were left in place — a wrong answer delivered silently, which is worse than a failed request.
29
+
30
+ `cancelRun` and `bulkAction` now read the flag from either channel. An explicit body value still wins, so every existing body-based caller behaves exactly as before and the query string is purely additive.
31
+
32
+ The coercion is an allowlist rather than a truthiness test — `?compensate=false` and `?compensate=0` mean **no**, where `Boolean(raw)` would have read both as yes and run an undo nobody asked for. Accepted: `true`/`1`/`yes`/`on` (and a bare `?compensate`) for yes, `false`/`0`/`no`/`off` for no, case- and whitespace-insensitive. An unrecognised value is now a `400` instead of falling back to a default the caller did not choose; previously `bulk` read any non-`'true'` value as no.
33
+
34
+ Also on the client: `durableClient.bulk(...)` accepts `compensate`, so the bulk endpoint's documented `?compensate=true` is reachable from the SPA client at all — it previously had no way to send it.
35
+
36
+ - [#63](https://github.com/DavideCarvalho/adonis-agora-durable/pull/63) [`62a44a4`](https://github.com/DavideCarvalho/adonis-agora-durable/commit/62a44a44b99c58d60fdb6d24767478e0c3cf19e5) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Declare `engines.node` as a supported RANGE again, and stop Renovate from re-pinning it.
37
+
38
+ All three packages shipped an exact runtime string (`"node": "v22.23.2"` / `"node": "v26.7.0"`) instead of a range. `engines.node` states which runtimes a package supports, so an exact value warns on every consumer install on any other Node and fails hard under `engine-strict`. The values were rewritten by Renovate's global `rangeStrategy: "pin"`, so `renovate.json` now disables updates for the `engines` dep type — otherwise the fix is undone on the next cycle.
39
+
40
+ ## 0.23.0
41
+
42
+ ### Minor Changes
43
+
44
+ - [`7742d2f`](https://github.com/DavideCarvalho/adonis-agora-durable/commit/7742d2fada29de36f083be95394b3c9a805838fa) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - `GET /runs` (the dashboard's runs list) now stamps `waiting` on a `suspended` run parked on a signal/webhook/child-await/breakpoint, resolved from one bulk `listSignalWaiters` scan — matching `@dudousxd/nestjs-durable-dashboard`'s list rows. Verified by running both dashboards side by side with live data: a run suspended on `ctx.waitForSignal` previously showed a generic "RUNNING" badge in the runs list (the underlying `listSignalWaiters` primitive existed on the store, but nothing wired it into the dashboard's list endpoint); it now shows "AWAITING / signal `<name>`" the same as the NestJS console. The single-run detail view was unaffected (it already derives this from the run's timeline).
45
+
46
+ - [`7cbd668`](https://github.com/DavideCarvalho/adonis-agora-durable/commit/7cbd668a3462f801fd0ef9fd516a54b88d19e8c4) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - The `durableTelescopeExtension()` now contributes `entryTypes` (`{ id: 'durable', label: 'Workflows', dot: 'bg-amber-400' }`), matching `nestjs-durable`'s extension — the "Workflows" nav badge now shows up in the Telescope dashboard's entry-type navigation.
47
+
3
48
  ## 0.22.0
4
49
 
5
50
  ### Minor Changes