@adonis-agora/durable 0.31.1 → 0.31.3
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 +30 -0
- package/dist/configure.d.ts +5 -2
- package/dist/configure.d.ts.map +1 -1
- package/dist/configure.js +33 -2
- package/dist/configure.js.map +1 -1
- package/dist/src/configure-imports.d.ts +27 -0
- package/dist/src/configure-imports.d.ts.map +1 -0
- package/dist/src/configure-imports.js +37 -0
- package/dist/src/configure-imports.js.map +1 -0
- 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/dist/src/telescope/dashboard.d.ts +11 -1
- package/dist/src/telescope/dashboard.d.ts.map +1 -1
- package/dist/src/telescope/dashboard.js +7 -1
- package/dist/src/telescope/dashboard.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @adonis-agora/durable
|
|
2
2
|
|
|
3
|
+
## 0.31.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#97](https://github.com/DavideCarvalho/adonis-agora-durable/pull/97) [`3a84725`](https://github.com/DavideCarvalho/adonis-agora-durable/commit/3a847258404174446ff2e553ad230ac934246c1f) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - O link "abrir este run" do dashboard do telescope levava a um 404.
|
|
8
|
+
|
|
9
|
+
O default era `/durable/runs/{runId}`, errado em duas coisas: o console é um SPA roteado
|
|
10
|
+
por **hash** (`App.tsx` casa `window.location.hash` contra `#/run/<id>`), então um caminho
|
|
11
|
+
comum nunca chega nele — quem responde é o router do app, com 404 — e o segmento estava no
|
|
12
|
+
**plural** contra o singular que o SPA espera.
|
|
13
|
+
|
|
14
|
+
Agora o default é `/durable#/run/{runId}`. Quem monta o console em outro path continua
|
|
15
|
+
passando o seu via `runHref`, porque o template precisa carregar o mount path e este
|
|
16
|
+
módulo não tem como sabê-lo.
|
|
17
|
+
|
|
18
|
+
## 0.31.2
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- [#100](https://github.com/DavideCarvalho/adonis-agora-durable/pull/100) [`b2297e2`](https://github.com/DavideCarvalho/adonis-agora-durable/commit/b2297e2d5f567ab5b0b3d707457c68d6c596a668) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - `node ace configure` now writes the `#workflows/*` and `#steps/*` subpath imports into the app's `package.json`.
|
|
23
|
+
|
|
24
|
+
The barrels the assembler hooks generate import each module by alias (`#workflows/foo_workflow`), the way `@adonisjs/core`'s controllers barrel uses `#controllers/*`. The difference is that `#controllers/*` ships in the app skeleton and `#workflows/*` does not — so `configure` wired up barrels that named a specifier Node cannot resolve, and the app died at boot with `ERR_PACKAGE_IMPORT_NOT_DEFINED`, after a build that reported success.
|
|
25
|
+
|
|
26
|
+
Existing apps: add these to `package.json` → `imports` (or re-run `configure`, which is now a no-op when they are already present and never overwrites an alias you point elsewhere):
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
"#workflows/*": "./app/workflows/*.js",
|
|
30
|
+
"#steps/*": "./app/steps/*.js"
|
|
31
|
+
```
|
|
32
|
+
|
|
3
33
|
## 0.31.1
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
package/dist/configure.d.ts
CHANGED
|
@@ -10,8 +10,11 @@ import type Configure from '@adonisjs/core/commands/configure';
|
|
|
10
10
|
* and `app/steps` barrels at build/dev time (the provider imports them instead
|
|
11
11
|
* of scanning at runtime; each falls back to the runtime scan when its barrel
|
|
12
12
|
* is absent);
|
|
13
|
-
* 5.
|
|
14
|
-
*
|
|
13
|
+
* 5. adds the `#workflows/*` and `#steps/*` subpath imports to the app's `package.json`,
|
|
14
|
+
* which the generated barrels import through (without them the app boots into
|
|
15
|
+
* `ERR_PACKAGE_IMPORT_NOT_DEFINED`);
|
|
16
|
+
* 6. publishes `config/durable.ts` + `config/durable_dashboard.ts`;
|
|
17
|
+
* 7. publishes the Lucid migrations for the optional `lucid` store and `db`
|
|
15
18
|
* transport drivers (run `node ace migration:run`, and delete the transport
|
|
16
19
|
* migration if you don't use the `db` transport).
|
|
17
20
|
*/
|
package/dist/configure.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../configure.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../configure.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,SAAS,MAAM,mCAAmC,CAAC;AAI/D;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,SAAS,CAAC,OAAO,EAAE,SAAS,iBAuBjD"}
|
package/dist/configure.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { readFile, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { mergeSubpathImports } from './src/configure-imports.js';
|
|
1
3
|
import { stubsRoot } from './stubs/main.js';
|
|
2
4
|
/**
|
|
3
5
|
* `node ace configure @adonis-agora/durable` — auto-wires the package:
|
|
@@ -10,8 +12,11 @@ import { stubsRoot } from './stubs/main.js';
|
|
|
10
12
|
* and `app/steps` barrels at build/dev time (the provider imports them instead
|
|
11
13
|
* of scanning at runtime; each falls back to the runtime scan when its barrel
|
|
12
14
|
* is absent);
|
|
13
|
-
* 5.
|
|
14
|
-
*
|
|
15
|
+
* 5. adds the `#workflows/*` and `#steps/*` subpath imports to the app's `package.json`,
|
|
16
|
+
* which the generated barrels import through (without them the app boots into
|
|
17
|
+
* `ERR_PACKAGE_IMPORT_NOT_DEFINED`);
|
|
18
|
+
* 6. publishes `config/durable.ts` + `config/durable_dashboard.ts`;
|
|
19
|
+
* 7. publishes the Lucid migrations for the optional `lucid` store and `db`
|
|
15
20
|
* transport drivers (run `node ace migration:run`, and delete the transport
|
|
16
21
|
* migration if you don't use the `db` transport).
|
|
17
22
|
*/
|
|
@@ -26,9 +31,35 @@ export async function configure(command) {
|
|
|
26
31
|
rcFile.addAssemblerHook('init', '@adonis-agora/durable/hooks/workflows');
|
|
27
32
|
rcFile.addAssemblerHook('init', '@adonis-agora/durable/hooks/steps');
|
|
28
33
|
});
|
|
34
|
+
await addSubpathImports(command);
|
|
29
35
|
await codemods.makeUsingStub(stubsRoot, 'config/durable.stub', {});
|
|
30
36
|
await codemods.makeUsingStub(stubsRoot, 'config/durable_dashboard.stub', {});
|
|
31
37
|
await codemods.makeUsingStub(stubsRoot, 'database/migrations/create_durable_tables.stub', {});
|
|
32
38
|
await codemods.makeUsingStub(stubsRoot, 'database/migrations/create_durable_transport_tables.stub', {});
|
|
33
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Add the subpath imports the generated barrels resolve through. There is no codemod for the
|
|
42
|
+
* `imports` map, so this edits `package.json` directly — and only when something is missing, so a
|
|
43
|
+
* second `configure` run neither rewrites the file nor logs a change it did not make.
|
|
44
|
+
*/
|
|
45
|
+
async function addSubpathImports(command) {
|
|
46
|
+
const path = command.app.makePath('package.json');
|
|
47
|
+
let raw;
|
|
48
|
+
try {
|
|
49
|
+
raw = await readFile(path, 'utf-8');
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
command.logger.warning('could not read package.json — add "#workflows/*": "./app/workflows/*.js" and "#steps/*": "./app/steps/*.js" to its "imports" by hand');
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const pkg = JSON.parse(raw);
|
|
56
|
+
const { imports, added } = mergeSubpathImports(pkg.imports);
|
|
57
|
+
if (added.length === 0)
|
|
58
|
+
return;
|
|
59
|
+
pkg.imports = imports;
|
|
60
|
+
// Two-space JSON with a trailing newline: what `create-adonisjs` writes, so the diff stays to
|
|
61
|
+
// the added lines instead of reformatting the whole file.
|
|
62
|
+
await writeFile(path, `${JSON.stringify(pkg, null, 2)}\n`);
|
|
63
|
+
command.logger.action(`update package.json (imports: ${added.join(', ')})`).succeeded();
|
|
64
|
+
}
|
|
34
65
|
//# sourceMappingURL=configure.js.map
|
package/dist/configure.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configure.js","sourceRoot":"","sources":["../configure.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"configure.js","sourceRoot":"","sources":["../configure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,OAAkB;IAChD,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,cAAc,EAAE,CAAC;IAEhD,MAAM,QAAQ,CAAC,YAAY,CAAC,CAAC,MAAM,EAAE,EAAE;QACrC,MAAM,CAAC,WAAW,CAAC,wCAAwC,CAAC,CAAC;QAC7D,MAAM,CAAC,WAAW,CAAC,0CAA0C,CAAC,CAAC;QAC/D,MAAM,CAAC,UAAU,CAAC,gCAAgC,CAAC,CAAC;QACpD,4FAA4F;QAC5F,sFAAsF;QACtF,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,uCAAuC,CAAC,CAAC;QACzE,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,mCAAmC,CAAC,CAAC;IACvE,CAAC,CAAC,CAAC;IAEH,MAAM,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAEjC,MAAM,QAAQ,CAAC,aAAa,CAAC,SAAS,EAAE,qBAAqB,EAAE,EAAE,CAAC,CAAC;IACnE,MAAM,QAAQ,CAAC,aAAa,CAAC,SAAS,EAAE,+BAA+B,EAAE,EAAE,CAAC,CAAC;IAC7E,MAAM,QAAQ,CAAC,aAAa,CAAC,SAAS,EAAE,gDAAgD,EAAE,EAAE,CAAC,CAAC;IAC9F,MAAM,QAAQ,CAAC,aAAa,CAC1B,SAAS,EACT,0DAA0D,EAC1D,EAAE,CACH,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,KAAK,UAAU,iBAAiB,CAAC,OAAkB;IACjD,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IAElD,IAAI,GAAW,CAAC;IAChB,IAAI,CAAC;QACH,GAAG,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,MAAM,CAAC,OAAO,CACpB,sIAAsI,CACvI,CAAC;QACF,OAAO;IACT,CAAC;IAED,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAyC,CAAC;IACpE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,mBAAmB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC5D,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAE/B,GAAG,CAAC,OAAO,GAAG,OAAO,CAAC;IACtB,8FAA8F;IAC9F,0DAA0D;IAC1D,MAAM,SAAS,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;IAC3D,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,iCAAiC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,CAAC;AAC1F,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Node subpath imports the generated barrels resolve through.
|
|
3
|
+
*
|
|
4
|
+
* The barrels the assembler hooks emit import each module by alias — `#workflows/foo_workflow` —
|
|
5
|
+
* exactly like `@adonisjs/core`'s controllers barrel uses `#controllers/*`. The difference is that
|
|
6
|
+
* `#controllers/*` ships in the app skeleton and `#workflows/*` does not, so without `configure`
|
|
7
|
+
* writing them the generated barrel names a specifier Node cannot resolve and the app dies at boot
|
|
8
|
+
* with `ERR_PACKAGE_IMPORT_NOT_DEFINED` — after a build that reported success.
|
|
9
|
+
*
|
|
10
|
+
* Keys and targets are kept in lockstep with the hooks' `importAlias` / `source` defaults; the spec
|
|
11
|
+
* asserts that pairing so changing one without the other fails loudly instead of at a consumer's
|
|
12
|
+
* boot.
|
|
13
|
+
*/
|
|
14
|
+
export declare const DURABLE_SUBPATH_IMPORTS: Readonly<Record<string, string>>;
|
|
15
|
+
/**
|
|
16
|
+
* Merge {@link DURABLE_SUBPATH_IMPORTS} into an app's `package.json` `imports` map.
|
|
17
|
+
*
|
|
18
|
+
* Never overwrites an entry the app already defines — an app that points `#workflows/*` somewhere
|
|
19
|
+
* else made that choice deliberately, and `configure` is not the place to overrule it. Returns the
|
|
20
|
+
* merged map plus the keys actually added, so the caller can skip the write (and the log line) when
|
|
21
|
+
* there is nothing to do, making a re-run of `configure` a no-op.
|
|
22
|
+
*/
|
|
23
|
+
export declare function mergeSubpathImports(existing: Record<string, string> | undefined): {
|
|
24
|
+
imports: Record<string, string>;
|
|
25
|
+
added: string[];
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=configure-imports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configure-imports.d.ts","sourceRoot":"","sources":["../../src/configure-imports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAGpE,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GAAG;IACjF,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAWA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Node subpath imports the generated barrels resolve through.
|
|
3
|
+
*
|
|
4
|
+
* The barrels the assembler hooks emit import each module by alias — `#workflows/foo_workflow` —
|
|
5
|
+
* exactly like `@adonisjs/core`'s controllers barrel uses `#controllers/*`. The difference is that
|
|
6
|
+
* `#controllers/*` ships in the app skeleton and `#workflows/*` does not, so without `configure`
|
|
7
|
+
* writing them the generated barrel names a specifier Node cannot resolve and the app dies at boot
|
|
8
|
+
* with `ERR_PACKAGE_IMPORT_NOT_DEFINED` — after a build that reported success.
|
|
9
|
+
*
|
|
10
|
+
* Keys and targets are kept in lockstep with the hooks' `importAlias` / `source` defaults; the spec
|
|
11
|
+
* asserts that pairing so changing one without the other fails loudly instead of at a consumer's
|
|
12
|
+
* boot.
|
|
13
|
+
*/
|
|
14
|
+
export const DURABLE_SUBPATH_IMPORTS = {
|
|
15
|
+
'#workflows/*': './app/workflows/*.js',
|
|
16
|
+
'#steps/*': './app/steps/*.js',
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Merge {@link DURABLE_SUBPATH_IMPORTS} into an app's `package.json` `imports` map.
|
|
20
|
+
*
|
|
21
|
+
* Never overwrites an entry the app already defines — an app that points `#workflows/*` somewhere
|
|
22
|
+
* else made that choice deliberately, and `configure` is not the place to overrule it. Returns the
|
|
23
|
+
* merged map plus the keys actually added, so the caller can skip the write (and the log line) when
|
|
24
|
+
* there is nothing to do, making a re-run of `configure` a no-op.
|
|
25
|
+
*/
|
|
26
|
+
export function mergeSubpathImports(existing) {
|
|
27
|
+
const imports = { ...(existing ?? {}) };
|
|
28
|
+
const added = [];
|
|
29
|
+
for (const [key, target] of Object.entries(DURABLE_SUBPATH_IMPORTS)) {
|
|
30
|
+
if (key in imports)
|
|
31
|
+
continue;
|
|
32
|
+
imports[key] = target;
|
|
33
|
+
added.push(key);
|
|
34
|
+
}
|
|
35
|
+
return { imports, added };
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=configure-imports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configure-imports.js","sourceRoot":"","sources":["../../src/configure-imports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAqC;IACvE,cAAc,EAAE,sBAAsB;IACtC,UAAU,EAAE,kBAAkB;CAC/B,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,QAA4C;IAI9E,MAAM,OAAO,GAAG,EAAE,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC,EAAE,CAAC;IACxC,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,KAAK,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,uBAAuB,CAAC,EAAE,CAAC;QACpE,IAAI,GAAG,IAAI,OAAO;YAAE,SAAS;QAC7B,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;QACtB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClB,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AAC5B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export declare const VERSION = "0.31.
|
|
2
|
+
export declare const VERSION = "0.31.3";
|
|
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 { AuthMode, DashboardAuthOptions, LoginHook, LoginOutcome, ResolvedDashboardAuth, SessionHook, SessionOutcome, } from './auth.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export const VERSION = '0.31.
|
|
2
|
+
export const VERSION = '0.31.3';
|
|
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
|
// Built-in `dashboardAuth` login screen (optional; opt-in via `config/durable_dashboard.ts`).
|
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 = "0.31.
|
|
2
|
+
export declare const VERSION = "0.31.3";
|
|
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 = '0.31.
|
|
2
|
+
export const VERSION = '0.31.3';
|
|
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.
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import type { DashboardSpec } from './telescope-sdk.js';
|
|
2
2
|
/** Options for the durable "Workflows" dashboard. */
|
|
3
3
|
export interface DurableDashboardOptions {
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* URL template for deep-linking a run into the durable console.
|
|
6
|
+
* Default `/durable#/run/{runId}`.
|
|
7
|
+
*
|
|
8
|
+
* Pass this when the console is mounted somewhere other than `/durable` (the
|
|
9
|
+
* `path` in `config/durable_dashboard.ts`) — the template has to carry the mount
|
|
10
|
+
* path, and this module cannot know it.
|
|
11
|
+
*
|
|
12
|
+
* The `#/run/...` shape is not cosmetic: the console is a hash-routed SPA, so a
|
|
13
|
+
* plain path is served by the app's router, not the console, and 404s.
|
|
14
|
+
*/
|
|
5
15
|
runHref?: string;
|
|
6
16
|
/** Window (ms) bounding the "Stuck runs" table. Default 24h; pass `0` to show all. */
|
|
7
17
|
recentFailuresWindowMs?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../../src/telescope/dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,qDAAqD;AACrD,MAAM,WAAW,uBAAuB;IACtC
|
|
1
|
+
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../../src/telescope/dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,qDAAqD;AACrD,MAAM,WAAW,uBAAuB;IACtC;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sFAAsF;IACtF,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,GAAE,uBAA4B,GAAG,aAAa,CAgHlF"}
|
|
@@ -4,7 +4,13 @@
|
|
|
4
4
|
* `durable.*` data providers by name.
|
|
5
5
|
*/
|
|
6
6
|
export function durableDashboard(opts = {}) {
|
|
7
|
-
|
|
7
|
+
// `/durable#/run/{runId}` — hash, and SINGULAR "run".
|
|
8
|
+
//
|
|
9
|
+
// The old default was `/durable/runs/{runId}`, wrong in both: the console routes on
|
|
10
|
+
// `window.location.hash` matching `#/run/<id>`, so a path never reaches it and the
|
|
11
|
+
// app's own router answers 404. Every "open this run" link from the telescope
|
|
12
|
+
// dashboard was dead.
|
|
13
|
+
const runHref = opts.runHref ?? '/durable#/run/{runId}';
|
|
8
14
|
const windowMs = opts.recentFailuresWindowMs ?? 24 * 60 * 60 * 1000;
|
|
9
15
|
return {
|
|
10
16
|
id: 'durable.workflows',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../../src/telescope/dashboard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../../src/telescope/dashboard.ts"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAI,GAA4B,EAAE;IACjE,sDAAsD;IACtD,EAAE;IACF,oFAAoF;IACpF,mFAAmF;IACnF,8EAA8E;IAC9E,sBAAsB;IACtB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,uBAAuB,CAAC;IACxD,MAAM,QAAQ,GAAG,IAAI,CAAC,sBAAsB,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IACpE,OAAO;QACL,EAAE,EAAE,mBAAmB;QACvB,KAAK,EAAE,WAAW;QAClB,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE;YACR;gBACE,KAAK,EAAE,QAAQ;gBACf,IAAI,EAAE,CAAC;gBACP,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE,cAAc;wBACrB,IAAI,EAAE,EAAE,QAAQ,EAAE,qBAAqB,EAAE;wBACzC,GAAG,EAAE,CAAC;wBACN,MAAM,EAAE,SAAS;wBACjB,UAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE;qBAC7D;oBACD;wBACE,IAAI,EAAE,MAAM;wBACZ,KAAK,EAAE,cAAc;wBACrB,IAAI,EAAE,EAAE,QAAQ,EAAE,kBAAkB,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE;wBAChE,MAAM,EAAE,UAAU;wBAClB,KAAK,EAAE,KAAK;wBACZ,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31.
|
|
3
|
+
"version": "0.31.3",
|
|
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": {
|