@adonis-agora/durable 1.0.0-rc.20 → 1.0.0-rc.22
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 +14 -0
- package/dist/assets/spa/index.html +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/console_shell.d.ts +8 -4
- package/dist/src/dashboard/console_shell.d.ts.map +1 -1
- package/dist/src/dashboard/console_shell.js +89 -31
- package/dist/src/dashboard/console_shell.js.map +1 -1
- 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 +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @adonis-agora/durable
|
|
2
2
|
|
|
3
|
+
## 1.0.0-rc.22
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#524](https://github.com/DavideCarvalho/adonis-agora-durable/pull/524) [`051e698`](https://github.com/DavideCarvalho/adonis-agora-durable/commit/051e6981c22d11350e4353c581acbd65178233ab) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Console footer: the signed-in user's role now shows when no `viewer` hook is set. The structural read of `ctx.auth.user` takes `role`, `roles` (strings, `{ name }` or authz `{ role }` rows) and `globalRoles`, plus the global roles of authkit's per-request identity on `ctx.authkit` (read structurally, 250 ms cap). One role is shown: an admin-like one first, else the first.
|
|
8
|
+
|
|
9
|
+
Console: inline SVG favicon in the console accent, so the browser no longer probes `/favicon.ico` and logs a 404 in the host app.
|
|
10
|
+
|
|
11
|
+
## 1.0.0-rc.21
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#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`.
|
|
16
|
+
|
|
3
17
|
## 1.0.0-rc.20
|
|
4
18
|
|
|
5
19
|
### Major Changes
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<!-- Inline, so the browser's automatic /favicon.ico probe is not a 404 in the host app's log:
|
|
7
|
+
the provider serves only `<path>` and `<path>/assets/:file`, nothing at the site root. -->
|
|
8
|
+
<link
|
|
9
|
+
rel="icon"
|
|
10
|
+
href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect width='24' height='24' rx='5' fill='%2309090b'/%3E%3Cpath d='M17.5 9A6 6 0 1 0 18 13' fill='none' stroke='%23a3e635' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M18 5.5V9h-3.5' fill='none' stroke='%23a3e635' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"
|
|
11
|
+
/>
|
|
6
12
|
<title>durable · control plane</title>
|
|
7
13
|
<script type="module" crossorigin src="/__DURABLE_DASHBOARD__/assets/index-DzXygyDm.js"></script>
|
|
8
14
|
<link rel="stylesheet" crossorigin href="/__DURABLE_DASHBOARD__/assets/index-BgoNV3TR.css">
|
|
@@ -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,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"runs_bulk.js","sourceRoot":"","sources":["../../commands/runs_bulk.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGpE,mFAAmF;AACnF,MAAM,QAAQ,GAAG,GAAG,CAAC;AAErB;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,gBAAgB;IAC3D,MAAM,CAAU,WAAW,GAAG,mBAAmB,CAAC;IAClD,MAAM,CAAU,WAAW,GAAG,2DAA2D,CAAC;IAchF,KAAK,CAAC,OAAO;QACrB,IAAI,IAAI,CAAC,MAAM,KAAK,OAAO,IAAI,IAAI,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;YACxD,MAAM,IAAI,UAAU,CAAC,iCAAiC,CAAC,CAAC;QAC1D,CAAC;QACD,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;YAChD,MAAM,IAAI,UAAU,CAAC,gCAAgC,CAAC,CAAC;QACzD,CAAC;QACD,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,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,CAAC;QACnE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAC1B,UAAU,EACV;YACE,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;YAC/B,KAAK;YACL,GAAG,CAAC,IAAI,CAAC,UAAU,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
|
|
@@ -22,15 +22,19 @@ export type SignOutOption = string | {
|
|
|
22
22
|
} | false;
|
|
23
23
|
/** The `viewer` config hook: return the viewer, or `null`/`undefined` for no user row. */
|
|
24
24
|
export type ViewerHook = (ctx: HttpContext) => ConsoleViewer | null | undefined | Promise<ConsoleViewer | null | undefined>;
|
|
25
|
+
/** The one role the footer shows: the first admin-like one (`ADMIN`, `org_admin`), else the first. */
|
|
26
|
+
export declare function pickRole(names: readonly string[]): string | undefined;
|
|
25
27
|
/**
|
|
26
|
-
* A viewer from any user-ish object: `fullName` / `name` / `email` for the label, `email`, and
|
|
27
|
-
*
|
|
28
|
+
* A viewer from any user-ish object: `fullName` / `name` / `email` for the label, `email`, and one
|
|
29
|
+
* role from `role` / `roles` / `globalRoles` plus `extraRoles` (an admin-like one first, else the
|
|
30
|
+
* first). `undefined` when nothing usable is there.
|
|
28
31
|
*/
|
|
29
|
-
export declare function viewerFromUser(user: unknown): ConsoleViewer | undefined;
|
|
32
|
+
export declare function viewerFromUser(user: unknown, extraRoles?: readonly string[]): ConsoleViewer | undefined;
|
|
30
33
|
/**
|
|
31
34
|
* The viewer for this request: the host's `viewer(ctx)` hook when configured (a throw or an empty
|
|
32
35
|
* answer means no user row), else a structural read of `ctx.auth?.user` — only when the request is
|
|
33
|
-
* already authenticated; it never triggers an authentication.
|
|
36
|
+
* already authenticated; it never triggers an authentication. The fallback's role also looks at
|
|
37
|
+
* authkit's per-request identity (`ctx.authkit`, its `globalRoles`) once a user is there.
|
|
34
38
|
*/
|
|
35
39
|
export declare function resolveViewer(ctx: HttpContext, hook: ViewerHook | null | undefined): Promise<ConsoleViewer | undefined>;
|
|
36
40
|
/** The request's CSRF token when `@adonisjs/shield` (or anything like it) put one on the request. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console_shell.d.ts","sourceRoot":"","sources":["../../../src/dashboard/console_shell.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAevD,wDAAwD;AACxD,MAAM,WAAW,aAAa;IAC5B,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,mFAAmF;AACnF,MAAM,MAAM,cAAc,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvF,sGAAsG;AACtG,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,KAAK,CAAC;AAEnF,0FAA0F;AAC1F,MAAM,MAAM,UAAU,GAAG,CACvB,GAAG,EAAE,WAAW,KACb,aAAa,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":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G,MAAM,GAAG,SAAS,CAGhE;AAiBD;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,WAAW,EAChB,UAAU,EAAE,aAAa,GAAG,IAAI,GAAG,SAAS,EAC5C,QAAQ,EAAE,OAAO,GAChB,cAAc,GAAG,SAAS,CAW5B"}
|
|
@@ -9,39 +9,99 @@ function text(value) {
|
|
|
9
9
|
return value.trim();
|
|
10
10
|
return undefined;
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
12
|
+
/** A role's name: a string, or an object's `name` / `role` (an authz role row has `role`). */
|
|
13
|
+
function roleName(value) {
|
|
14
|
+
if (typeof value === 'string')
|
|
15
|
+
return text(value);
|
|
16
|
+
if (typeof value !== 'object' || value === null)
|
|
17
|
+
return undefined;
|
|
18
|
+
const r = value;
|
|
19
|
+
return text(r.name) ?? text(r.role);
|
|
20
|
+
}
|
|
21
|
+
/** Every role name in a field that is one role or a list of them. */
|
|
22
|
+
function roleNames(value) {
|
|
23
|
+
const list = Array.isArray(value) ? value : [value];
|
|
24
|
+
const names = [];
|
|
25
|
+
for (const item of list) {
|
|
26
|
+
const name = roleName(item);
|
|
27
|
+
if (name)
|
|
28
|
+
names.push(name);
|
|
29
|
+
}
|
|
30
|
+
return names;
|
|
31
|
+
}
|
|
32
|
+
/** The one role the footer shows: the first admin-like one (`ADMIN`, `org_admin`), else the first. */
|
|
33
|
+
export function pickRole(names) {
|
|
34
|
+
return names.find((name) => /admin/i.test(name)) ?? names[0];
|
|
35
|
+
}
|
|
36
|
+
/** Read a property without letting a throwing getter escape. */
|
|
37
|
+
function read(source, key) {
|
|
38
|
+
if (typeof source !== 'object' || source === null)
|
|
39
|
+
return undefined;
|
|
40
|
+
try {
|
|
41
|
+
return source[key];
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
return undefined;
|
|
27
45
|
}
|
|
28
|
-
return undefined;
|
|
29
46
|
}
|
|
30
47
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
48
|
+
* The roles a user object carries: `role`, `roles` (strings, `{ name }` or `{ role }` rows) and
|
|
49
|
+
* `globalRoles`, in that order.
|
|
33
50
|
*/
|
|
34
|
-
|
|
51
|
+
function rolesOf(user) {
|
|
52
|
+
return [
|
|
53
|
+
...roleNames(read(user, 'role')),
|
|
54
|
+
...roleNames(read(user, 'roles')),
|
|
55
|
+
...roleNames(read(user, 'globalRoles')),
|
|
56
|
+
];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* A viewer from any user-ish object: `fullName` / `name` / `email` for the label, `email`, and one
|
|
60
|
+
* role from `role` / `roles` / `globalRoles` plus `extraRoles` (an admin-like one first, else the
|
|
61
|
+
* first). `undefined` when nothing usable is there.
|
|
62
|
+
*/
|
|
63
|
+
export function viewerFromUser(user, extraRoles = []) {
|
|
35
64
|
if (typeof user !== 'object' || user === null)
|
|
36
65
|
return undefined;
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
const label = text(u.fullName) ?? text(u.name) ?? email;
|
|
66
|
+
const email = text(read(user, 'email'));
|
|
67
|
+
const label = text(read(user, 'fullName')) ?? text(read(user, 'name')) ?? email;
|
|
40
68
|
if (!label)
|
|
41
69
|
return undefined;
|
|
42
|
-
const role =
|
|
70
|
+
const role = pickRole([...rolesOf(user), ...extraRoles]);
|
|
43
71
|
return { label, ...(email ? { email } : {}), ...(role ? { role } : {}) };
|
|
44
72
|
}
|
|
73
|
+
/** How long the footer waits for authkit's per-request identity before giving up on the role. */
|
|
74
|
+
const IDENTITY_TIMEOUT_MS = 250;
|
|
75
|
+
/**
|
|
76
|
+
* The global roles of authkit's per-request identity (`ctx.authkit`), read structurally: the
|
|
77
|
+
* already-resolved `identity` when there is one, else `getIdentity()` (memoized per request) under
|
|
78
|
+
* a short timeout. Any failure means no roles.
|
|
79
|
+
*/
|
|
80
|
+
async function authkitRoles(ctx) {
|
|
81
|
+
const authkit = read(ctx, 'authkit');
|
|
82
|
+
if (typeof authkit !== 'object' || authkit === null)
|
|
83
|
+
return [];
|
|
84
|
+
let identity = read(authkit, 'identity');
|
|
85
|
+
const getIdentity = read(authkit, 'getIdentity');
|
|
86
|
+
if ((identity === null || identity === undefined) && typeof getIdentity === 'function') {
|
|
87
|
+
let timer;
|
|
88
|
+
try {
|
|
89
|
+
identity = await Promise.race([
|
|
90
|
+
Promise.resolve(getIdentity.call(authkit)),
|
|
91
|
+
new Promise((resolve) => {
|
|
92
|
+
timer = setTimeout(() => resolve(undefined), IDENTITY_TIMEOUT_MS);
|
|
93
|
+
}),
|
|
94
|
+
]);
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
identity = undefined;
|
|
98
|
+
}
|
|
99
|
+
finally {
|
|
100
|
+
clearTimeout(timer);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return roleNames(read(identity, 'globalRoles'));
|
|
104
|
+
}
|
|
45
105
|
/** Keep only the fields the SPA renders, as trimmed non-empty strings. */
|
|
46
106
|
function cleanViewer(value) {
|
|
47
107
|
if (typeof value !== 'object' || value === null)
|
|
@@ -57,7 +117,8 @@ function cleanViewer(value) {
|
|
|
57
117
|
/**
|
|
58
118
|
* The viewer for this request: the host's `viewer(ctx)` hook when configured (a throw or an empty
|
|
59
119
|
* answer means no user row), else a structural read of `ctx.auth?.user` — only when the request is
|
|
60
|
-
* already authenticated; it never triggers an authentication.
|
|
120
|
+
* already authenticated; it never triggers an authentication. The fallback's role also looks at
|
|
121
|
+
* authkit's per-request identity (`ctx.authkit`, its `globalRoles`) once a user is there.
|
|
61
122
|
*/
|
|
62
123
|
export async function resolveViewer(ctx, hook) {
|
|
63
124
|
if (hook) {
|
|
@@ -68,14 +129,11 @@ export async function resolveViewer(ctx, hook) {
|
|
|
68
129
|
return undefined;
|
|
69
130
|
}
|
|
70
131
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
catch {
|
|
76
|
-
// Some guards throw on `.user` before authentication; that just means "no viewer".
|
|
132
|
+
// `read` swallows guards that throw on `.user` before authentication: that just means "no viewer".
|
|
133
|
+
const user = read(read(ctx, 'auth'), 'user');
|
|
134
|
+
if (!viewerFromUser(user))
|
|
77
135
|
return undefined;
|
|
78
|
-
|
|
136
|
+
return viewerFromUser(user, await authkitRoles(ctx));
|
|
79
137
|
}
|
|
80
138
|
/** The request's CSRF token when `@adonisjs/shield` (or anything like it) put one on the request. */
|
|
81
139
|
export function csrfTokenOf(ctx) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console_shell.js","sourceRoot":"","sources":["../../../src/dashboard/console_shell.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,4FAA4F;AAC5F,SAAS,QAAQ,CAAC,IAAa;IAC7B,qGAAqG;IACrG,OAAO,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC/F,CAAC;AA4BD,SAAS,IAAI,CAAC,KAAc;IAC1B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC;IAC1E,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,
|
|
1
|
+
{"version":3,"file":"console_shell.js","sourceRoot":"","sources":["../../../src/dashboard/console_shell.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,4FAA4F;AAC5F,SAAS,QAAQ,CAAC,IAAa;IAC7B,qGAAq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,CAAC;IACxD,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,KAAK;QAAE,OAAO,SAAS,CAAC;IAC/D,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC;QACnD,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IACnE,CAAC;IACD,MAAM,MAAM,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IACnE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,SAAS,CAAC;IACxC,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;IACnC,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AACzD,CAAC"}
|
|
@@ -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.22";
|
|
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.22';
|
|
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.22";
|
|
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.22';
|
|
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.22",
|
|
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": {
|
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
},
|
|
185
185
|
"devDependencies": {
|
|
186
186
|
"@adonis-agora/diagnostics": "1.0.0-rc.1",
|
|
187
|
-
"@adonis-agora/durable-dashboard": "1.0.0-rc.
|
|
187
|
+
"@adonis-agora/durable-dashboard": "1.0.0-rc.9",
|
|
188
188
|
"@adonisjs/assembler": "8.6.0",
|
|
189
189
|
"@adonisjs/auth": "10.1.0",
|
|
190
190
|
"@adonisjs/core": "7.6.0",
|