@adonis-agora/durable 1.0.0-rc.20 → 1.0.0-rc.21
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 +6 -0
- package/dist/commands/runs_bulk.d.ts.map +1 -1
- package/dist/commands/runs_bulk.js +14 -12
- package/dist/commands/runs_bulk.js.map +1 -1
- package/dist/configure.d.ts +2 -2
- package/dist/configure.js +2 -2
- package/dist/src/dashboard/index.d.ts +1 -1
- package/dist/src/dashboard/index.js +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @adonis-agora/durable
|
|
2
2
|
|
|
3
|
+
## 1.0.0-rc.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#523](https://github.com/DavideCarvalho/adonis-agora-durable/pull/523) [`f20e28d`](https://github.com/DavideCarvalho/adonis-agora-durable/commit/f20e28d28e674d5d5a4f63b8223aae52a2b9dc5f) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - `durable:runs:bulk --dry-run` lists every run the action would touch (up to 500, paging the listing) instead of the first 200, and its table shows the same liveness columns as `durable:runs`.
|
|
8
|
+
|
|
3
9
|
## 1.0.0-rc.20
|
|
4
10
|
|
|
5
11
|
### Major Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runs_bulk.d.ts","sourceRoot":"","sources":["../../commands/runs_bulk.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAQlF;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,gBAAgB;IAC3D,OAAgB,WAAW,SAAuB;IAClD,OAAgB,WAAW,SAA+D;IAGlF,MAAM,EAAE,MAAM,CAAC;IAGf,UAAU,EAAE,OAAO,CAAC;IAGpB,MAAM,EAAE,OAAO,CAAC;IAGhB,KAAK,EAAE,OAAO,CAAC;IAEvB,UAAgB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"runs_bulk.d.ts","sourceRoot":"","sources":["../../commands/runs_bulk.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAQlF;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,gBAAgB;IAC3D,OAAgB,WAAW,SAAuB;IAClD,OAAgB,WAAW,SAA+D;IAGlF,MAAM,EAAE,MAAM,CAAC;IAGf,UAAU,EAAE,OAAO,CAAC;IAGpB,MAAM,EAAE,OAAO,CAAC;IAGhB,KAAK,EAAE,OAAO,CAAC;IAEvB,UAAgB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAmEvC;CACF"}
|
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { args, flags } from '@adonisjs/core/ace';
|
|
8
8
|
import { CliRefusal, RunFilterCommand } from '../src/commands/console_command.js';
|
|
9
|
-
import { renderRunsTable } from '../src/commands/runs.js';
|
|
9
|
+
import { attachLiveness, renderRunsTable } from '../src/commands/runs.js';
|
|
10
10
|
import { bulkAction, listRuns } from '../src/dashboard/handlers.js';
|
|
11
11
|
/** The bulk action acts on at most this many matching runs (the console's cap). */
|
|
12
12
|
const BULK_CAP = 500;
|
|
@@ -28,23 +28,25 @@ export default class DurableRunsBulk extends RunFilterCommand {
|
|
|
28
28
|
}
|
|
29
29
|
const query = this.runFilter();
|
|
30
30
|
const deps = await this.deps();
|
|
31
|
-
const
|
|
32
|
-
const matched =
|
|
31
|
+
const first = await this.call(listRuns, { query: { ...query, size: '200' } }, deps);
|
|
32
|
+
const matched = first.meta.total;
|
|
33
33
|
const acting = Math.min(matched, BULK_CAP);
|
|
34
34
|
const scope = Object.keys(query).length > 0 ? 'matching the filter' : 'of every run (no filter)';
|
|
35
35
|
if (this.dryRun) {
|
|
36
|
+
const rows = [...first.data];
|
|
37
|
+
for (let page = 2; rows.length < acting && page <= first.meta.lastPage; page += 1) {
|
|
38
|
+
const next = await this.call(listRuns, { query: { ...query, size: '200', page: String(page) } }, deps);
|
|
39
|
+
rows.push(...next.data);
|
|
40
|
+
}
|
|
41
|
+
const affected = rows.slice(0, acting);
|
|
36
42
|
if (this.json) {
|
|
37
|
-
this.printJson({ action: this.action, matched, wouldApply: acting, data:
|
|
43
|
+
this.printJson({ action: this.action, matched, wouldApply: acting, data: affected });
|
|
38
44
|
return;
|
|
39
45
|
}
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
stalePending: null,
|
|
45
|
-
}));
|
|
46
|
-
this.logger.log(renderRunsTable(rows));
|
|
47
|
-
this.logger.info(`Dry run: ${this.action} would act on ${acting} run(s) ${scope} (${matched} matched${matched > BULK_CAP ? `, capped at ${BULK_CAP}` : ''}).`);
|
|
46
|
+
const runs = affected.map((row) => ({ ...row, updatedAt: new Date(row.updatedAt) }));
|
|
47
|
+
const live = await attachLiveness({ listRuns: async () => runs, listCheckpoints: (id) => deps.engine.listCheckpoints(id) }, runs);
|
|
48
|
+
this.logger.log(renderRunsTable(live));
|
|
49
|
+
this.logger.info(`Dry run: ${this.action} would act on these ${acting} run(s) ${scope} (${matched} matched${matched > BULK_CAP ? `, capped at the newest ${BULK_CAP}` : ''}).`);
|
|
48
50
|
return;
|
|
49
51
|
}
|
|
50
52
|
await this.confirm(this.force, `${this.action === 'retry' ? 'Retry' : 'Cancel'} up to ${acting} run(s) ${scope}${this.compensate ? ' and run their compensations' : ''}?`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runs_bulk.js","sourceRoot":"","sources":["../../commands/runs_bulk.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,o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,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC3D,EACD,IAAI,CACL,CAAC;QACF,IAAI,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,OAAO,CACjB,GAAG,IAAI,CAAC,MAAM,gBAAgB,IAAI,CAAC,OAAO,OAAO,IAAI,CAAC,OAAO,mBAAmB,CACjF,CAAC;IACJ,CAAC;CACF;AA/ES;IADP,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC;+CACxB;AAGf;IADP,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,4DAA4D,EAAE,CAAC;mDACjE;AAGpB;IADP,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;+CAC1C;AAGhB;IADP,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;8CACvC"}
|
package/dist/configure.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import type Configure from '@adonisjs/core/commands/configure';
|
|
|
3
3
|
* `node ace configure @adonis-agora/durable` — auto-wires the package:
|
|
4
4
|
*
|
|
5
5
|
* 1. registers the core service provider in `adonisrc.ts`;
|
|
6
|
-
* 2. registers the ace commands barrel (
|
|
7
|
-
*
|
|
6
|
+
* 2. registers the ace commands barrel (`DURABLE_COMMANDS`: the workers, one command per
|
|
7
|
+
* console action, `durable:export`, `make:workflow` and the doctors);
|
|
8
8
|
* 3. registers the optional dashboard provider;
|
|
9
9
|
* 4. registers the Assembler `init` hooks that generate the typed `app/workflows`
|
|
10
10
|
* and `app/steps` barrels at build/dev time (the provider imports them instead
|
package/dist/configure.js
CHANGED
|
@@ -5,8 +5,8 @@ import { stubsRoot } from './stubs/main.js';
|
|
|
5
5
|
* `node ace configure @adonis-agora/durable` — auto-wires the package:
|
|
6
6
|
*
|
|
7
7
|
* 1. registers the core service provider in `adonisrc.ts`;
|
|
8
|
-
* 2. registers the ace commands barrel (
|
|
9
|
-
*
|
|
8
|
+
* 2. registers the ace commands barrel (`DURABLE_COMMANDS`: the workers, one command per
|
|
9
|
+
* console action, `durable:export`, `make:workflow` and the doctors);
|
|
10
10
|
* 3. registers the optional dashboard provider;
|
|
11
11
|
* 4. registers the Assembler `init` hooks that generate the typed `app/workflows`
|
|
12
12
|
* and `app/steps` barrels at build/dev time (the provider imports them instead
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export declare const VERSION = "1.0.0-rc.
|
|
2
|
+
export declare const VERSION = "1.0.0-rc.21";
|
|
3
3
|
export type { AccessDeniedInfo, AccessDeniedPageOptions, AccessDeniedReason, } from './access_denied_page.js';
|
|
4
4
|
export { CONSOLE as ACCESS_DENIED_CONSOLE, escapeHtml, renderAccessDeniedPage, resolveAccessDeniedPage, } from './access_denied_page.js';
|
|
5
5
|
export type { CompatSource, FleetGroup, FleetTransport } from './compat.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export const VERSION = '1.0.0-rc.
|
|
2
|
+
export const VERSION = '1.0.0-rc.21';
|
|
3
3
|
// The built-in "access denied" page (what a browser sees on a refused page navigation).
|
|
4
4
|
export { CONSOLE as ACCESS_DENIED_CONSOLE, escapeHtml, renderAccessDeniedPage, resolveAccessDeniedPage, } from './access_denied_page.js';
|
|
5
5
|
// Fleet health / protocol-compatibility panel (design §7.6, §10).
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export declare const VERSION = "1.0.0-rc.
|
|
2
|
+
export declare const VERSION = "1.0.0-rc.21";
|
|
3
3
|
export { configure } from '../configure.js';
|
|
4
4
|
export * from './admission.js';
|
|
5
5
|
export type { AdmissionContext, AdmissionFactory, RedisAdmissionConfig, } from './admissions/factory.js';
|
package/dist/src/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export const VERSION = '1.0.0-rc.
|
|
2
|
+
export const VERSION = '1.0.0-rc.21';
|
|
3
3
|
// Re-export the configure hook from the package root so `node ace configure` finds it.
|
|
4
4
|
// AdonisJS imports the package MAIN and reads `configure` off the module namespace —
|
|
5
5
|
// the `./configure` subpath alone is never consulted.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adonis-agora/durable",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.21",
|
|
4
4
|
"description": "Durable cross-app workflows for AdonisJS — deterministic replay engine, AdonisJS binding, ace commands, dashboard, OpenTelemetry, Telescope, testing harness and Redis admission, all in one package. Part of the Agora ecosystem.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|