@adonis-agora/durable 0.38.3 → 0.39.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 +69 -0
- package/dist/assets/spa/assets/index-Db-HnE3R.js +16 -0
- package/dist/assets/spa/assets/index-Db-HnE3R.js.map +1 -0
- package/dist/assets/spa/index.html +1 -1
- package/dist/src/commands/runs.d.ts +4 -1
- package/dist/src/commands/runs.d.ts.map +1 -1
- package/dist/src/commands/runs.js +1 -1
- package/dist/src/commands/runs.js.map +1 -1
- package/dist/src/dashboard/handlers.d.ts +14 -1
- package/dist/src/dashboard/handlers.d.ts.map +1 -1
- package/dist/src/dashboard/handlers.js +21 -7
- package/dist/src/dashboard/handlers.js.map +1 -1
- package/dist/src/dashboard/index.d.ts +1 -1
- package/dist/src/dashboard/index.js +1 -1
- package/dist/src/dashboard/openapi.d.ts.map +1 -1
- package/dist/src/dashboard/openapi.js +7 -3
- package/dist/src/dashboard/openapi.js.map +1 -1
- package/dist/src/engine.d.ts +1 -1
- package/dist/src/engine.d.ts.map +1 -1
- package/dist/src/engine.js +22 -5
- package/dist/src/engine.js.map +1 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/interfaces.d.ts +19 -3
- package/dist/src/interfaces.d.ts.map +1 -1
- package/dist/src/run-gateway/interface.d.ts +1 -1
- package/dist/src/run-pagination.d.ts +31 -0
- package/dist/src/run-pagination.d.ts.map +1 -0
- package/dist/src/run-pagination.js +24 -0
- package/dist/src/run-pagination.js.map +1 -0
- package/dist/src/run-value-facets.js +1 -1
- package/dist/src/run-value-facets.js.map +1 -1
- package/dist/src/search-attributes.d.ts +4 -4
- package/dist/src/search-attributes.d.ts.map +1 -1
- package/dist/src/search-attributes.js +7 -7
- package/dist/src/search-attributes.js.map +1 -1
- package/dist/src/stores/lucid.d.ts.map +1 -1
- package/dist/src/stores/lucid.js +8 -4
- package/dist/src/stores/lucid.js.map +1 -1
- package/dist/src/telescope/data-providers.js +4 -4
- package/dist/src/telescope/data-providers.js.map +1 -1
- package/dist/src/testing/in-memory-state-store.d.ts.map +1 -1
- package/dist/src/testing/in-memory-state-store.js +6 -3
- package/dist/src/testing/in-memory-state-store.js.map +1 -1
- package/dist/src/testing-kit/state-store-conformance.d.ts.map +1 -1
- package/dist/src/testing-kit/state-store-conformance.js +8 -7
- package/dist/src/testing-kit/state-store-conformance.js.map +1 -1
- package/package.json +11 -11
- package/dist/assets/spa/assets/index-Dx5lG7Vu.js +0 -16
- package/dist/assets/spa/assets/index-Dx5lG7Vu.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,74 @@
|
|
|
1
1
|
# @adonis-agora/durable
|
|
2
2
|
|
|
3
|
+
## 0.39.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#168](https://github.com/DavideCarvalho/adonis-agora-durable/pull/168) [`eb7e642`](https://github.com/DavideCarvalho/adonis-agora-durable/commit/eb7e642f0e956b00b0c177d34f30cb5747389f49) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - A failing lease release no longer escapes the turn's `finally`.
|
|
8
|
+
|
|
9
|
+
The `finally` that ends a turn releases the recovery lease — including on the failure path, where the thing that failed the run is frequently the same store the release has to talk to. A step that violates a DB constraint leaves Postgres refusing every further statement on that connection, so the release throws out of the `finally`, and in a turn driven as a background resume that surfaces as an unhandled rejection rather than a failed run.
|
|
10
|
+
|
|
11
|
+
Now swallowed and warned, by the same argument `releaseInflightLocks` already makes: a lease is a lease. It expires, and `recoverIncomplete` re-drives whatever is still held. A lost release costs one lease window of latency; an escaping one costs the diagnosis.
|
|
12
|
+
|
|
13
|
+
Found in an application whose test deliberately violates NOT NULL inside the persist transaction to prove the workflow ends in `error`. Every assertion passed and the suite still exited non-zero, with a lease UPDATE as the only clue.
|
|
14
|
+
|
|
15
|
+
## 0.39.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [#140](https://github.com/DavideCarvalho/adonis-agora-durable/pull/140) [`5c57004`](https://github.com/DavideCarvalho/adonis-agora-durable/commit/5c570047165530c6b7bbe4c868d747e4405da49d) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - **Breaking:** run listings are paged with `page`/`size` instead of `limit`/`offset`, and paging is now 1-BASED.
|
|
20
|
+
|
|
21
|
+
Every `@adonis-agora/*` library now exposes the same offset-pagination interface as `@adonis-agora/filter` (`FilterInput.page`/`.size`, resolved to its `ResolvedPagination { page, size }`): a **1-based** page number defaulting to `1`, and a page size. One query-string builder, one mental model, whether the listing behind it is a Lucid model or this engine's run store. Defaults and caps are unchanged — the dashboard listing still defaults to 50 rows and still caps at 200; only the spelling and the base moved.
|
|
22
|
+
|
|
23
|
+
The 0-based offset has not disappeared, it has become internal: `runPageWindow(query)` (newly exported) resolves a `RunQuery`'s `page`/`size` into the `{ limit, offset }` a store actually spends, and it is the one place that arithmetic lives. Custom `StateStore` implementations should call it rather than compute an offset by hand; the conformance kit asserts the resulting semantics (notably that **no `size` means no bound** — a store must not invent a default window).
|
|
24
|
+
|
|
25
|
+
What changed, concretely:
|
|
26
|
+
|
|
27
|
+
- `RunQuery.limit`/`.offset` → `RunQuery.page`/`.size`. This is also the cross-pod wire shape, so a `listRuns` gateway request between a proxy pod and a store pod carries `size` where it carried `limit` (the golden wire fixtures moved with it — polyglot SDKs asserting those bytes need the same rename).
|
|
28
|
+
- `GET /durable/api/runs` parses `?page=&size=` and answers `{ runs, meta: { page, size, count }, statuses }`. The pagination envelope key is **`meta`** — the name AdonisJS/Lucid's own `.paginate()` uses, and where `@adonis-agora/filter`'s offset path lands, so every `@adonis-agora/*` listing spells it the same (it also spares you `body.page.page`). It replaces the previous `limit`/`offset` echo; read the window off `body.meta`. `limit`/`offset` query params are now ignored like any other unknown flat param, so a stale client gets an unpaged first page rather than a `400`.
|
|
29
|
+
- The console's client (`durableClient.runsPage`, `RunPageOptions`, `runQueryString`) sends `page`/`size` and pages the runs list 1-based; `RunsPage` carries that window as `.meta`.
|
|
30
|
+
|
|
31
|
+
Deliberately NOT renamed: `GET /durable/api/runs/values` keeps `limit`/`offset`. That endpoint is filter's own group-by-count aggregation (`groupByCount[limit]`/`groupByCount[offset]`, `GroupByCountFromRequestOptions`), not a run listing — `limit`/`offset` IS the aligned spelling there, and respelling it would diverge from the lib rather than match it. The ace `durable:runs --limit` flag also keeps its name: it is a row cap with no page companion, and it maps to `size` internally.
|
|
32
|
+
|
|
33
|
+
Migration — the offset you were sending is `(page - 1) * size`:
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
// before
|
|
37
|
+
await engine.listRuns({ workflow: 'checkout', limit: 25, offset: 50 })
|
|
38
|
+
// after — third page of 25
|
|
39
|
+
await engine.listRuns({ workflow: 'checkout', page: 3, size: 25 })
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
# before
|
|
44
|
+
GET /durable/api/runs?status=failed&limit=25&offset=50
|
|
45
|
+
# after
|
|
46
|
+
GET /durable/api/runs?status=failed&page=3&size=25
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
// reading the window back off a /runs response
|
|
51
|
+
- const { limit, offset } = body.page
|
|
52
|
+
+ const { page, size, count } = body.meta
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
// a store adapter's listRuns
|
|
57
|
+
- if (query.limit !== undefined) q.limit(query.limit)
|
|
58
|
+
- if (query.offset !== undefined) q.offset(query.offset)
|
|
59
|
+
+ const { limit, offset } = runPageWindow(query)
|
|
60
|
+
+ if (limit !== undefined) q.limit(limit)
|
|
61
|
+
+ if (offset > 0) q.offset(offset)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Patch Changes
|
|
65
|
+
|
|
66
|
+
- [#138](https://github.com/DavideCarvalho/adonis-agora-durable/pull/138) [`4916be2`](https://github.com/DavideCarvalho/adonis-agora-durable/commit/4916be2b7129d6bceba2e7d2fc9c302b00d2c283) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Routine dependency refresh.
|
|
67
|
+
|
|
68
|
+
`@adonis-agora/durable`'s optional `vitest` peer now accepts `^5.0.0` too (`^3.0.0 || ^4.0.0 || ^5.0.0`). The testing kit is exercised against vitest 5 in CI and the range only widens, so nothing that resolved before stops resolving. The package's stale `zod` devDependency (`3.25.76`) is realigned with the `zod@4.5.4` it already declares — and pnpm already resolved — as a runtime dependency; no published dependency range changes.
|
|
69
|
+
|
|
70
|
+
`@adonis-agora/durable-eslint-plugin` picks up `@typescript-eslint/utils@8.69.0`.
|
|
71
|
+
|
|
3
72
|
## 0.38.3
|
|
4
73
|
|
|
5
74
|
### Patch Changes
|