@adonis-agora/durable 0.31.0 → 0.31.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 +14 -0
- package/dist/src/dashboard/index.d.ts +1 -1
- package/dist/src/dashboard/index.js +1 -1
- package/dist/src/hooks/steps.d.ts +4 -8
- package/dist/src/hooks/steps.d.ts.map +1 -1
- package/dist/src/hooks/steps.js +19 -15
- package/dist/src/hooks/steps.js.map +1 -1
- package/dist/src/hooks/workflows.d.ts +4 -8
- package/dist/src/hooks/workflows.d.ts.map +1 -1
- package/dist/src/hooks/workflows.js +21 -17
- package/dist/src/hooks/workflows.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @adonis-agora/durable
|
|
2
2
|
|
|
3
|
+
## 0.31.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#98](https://github.com/DavideCarvalho/adonis-agora-durable/pull/98) [`4d61da2`](https://github.com/DavideCarvalho/adonis-agora-durable/commit/4d61da2cb0bf977706bdd62382cdd8f49bf7ee0f) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Fix the assembler codegen hooks, which broke the build of every app that ran `node ace configure @adonis-agora/durable`. The configure step writes both hooks into `adonisrc.ts` by itself, and the build then died with:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
TypeError: handler.handle is not a function
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
`@poppinss/hooks` — the runner the assembler drives its `init` hooks with — invokes a handler as `typeof handler === 'function' ? handler(...data) : handler.handle(action, ...data)`, so a non-function handler must expose `handle`. Both hooks exported `{ run }`. The same shape also mismatched the assembler's own `DefineHook` type, so a consumer's typecheck failed too.
|
|
14
|
+
|
|
15
|
+
`workflowsHook()` / `stepsHook()` and the default exports of `@adonis-agora/durable/hooks/workflows` and `/hooks/steps` are now plain functions. If you called `workflowsHook().run(...)` directly, call the returned value itself; the wiring in `adonisrc.ts` is unchanged, and it now works instead of throwing.
|
|
16
|
+
|
|
3
17
|
## 0.31.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -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.1";
|
|
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.1';
|
|
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`).
|
|
@@ -31,13 +31,9 @@ export interface StepsHookOptions {
|
|
|
31
31
|
* })
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
|
-
export declare function stepsHook(options?: StepsHookOptions):
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
* in `adonisrc.ts` resolves to a ready hook (the assembler calls its `run`). */
|
|
39
|
-
declare const _default: {
|
|
40
|
-
run(_parent: unknown, _hooks: unknown, indexGenerator: IndexGenerator): void;
|
|
41
|
-
};
|
|
34
|
+
export declare function stepsHook(options?: StepsHookOptions): (_parent: unknown, _hooks: unknown, indexGenerator: IndexGenerator) => void;
|
|
35
|
+
/** The default export is the hook function itself, so `() => import('@adonis-agora/durable/hooks/steps')`
|
|
36
|
+
* in `adonisrc.ts` resolves to a handler the assembler can call directly. */
|
|
37
|
+
declare const _default: (_parent: unknown, _hooks: unknown, indexGenerator: IndexGenerator) => void;
|
|
42
38
|
export default _default;
|
|
43
39
|
//# sourceMappingURL=steps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../../src/hooks/steps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAE1E;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,+BAA+B,CAAC;AAEnE,sFAAsF;AACtF,MAAM,WAAW,gBAAgB;IAC/B,qGAAqG;IACrG,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qFAAqF;IACrF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4GAA4G;IAC5G,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,SAAS,CAAC,OAAO,GAAE,gBAAqB
|
|
1
|
+
{"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../../src/hooks/steps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAE1E;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,+BAA+B,CAAC;AAEnE,sFAAsF;AACtF,MAAM,WAAW,gBAAgB;IAC/B,qGAAqG;IACrG,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qFAAqF;IACrF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4GAA4G;IAC5G,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,SAAS,CAAC,OAAO,GAAE,gBAAqB,aAY3C,OAAO,UACR,OAAO,kBACC,cAAc,KAC7B,IAAI,CAYR;AAED;8EAC8E;kCAlBjE,OAAO,UACR,OAAO,kBACC,cAAc,KAC7B,IAAI"}
|
package/dist/src/hooks/steps.js
CHANGED
|
@@ -25,22 +25,26 @@ export function stepsHook(options = {}) {
|
|
|
25
25
|
const source = options.source ?? 'app/steps';
|
|
26
26
|
const importAlias = options.importAlias ?? '#steps';
|
|
27
27
|
const output = options.output ?? GENERATED_STEPS_OUTPUT;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
28
|
+
// A FUNCTION, not an object with a `run` method. `@poppinss/hooks` — the runner the
|
|
29
|
+
// assembler drives its `init` hooks with — invokes a handler as
|
|
30
|
+
// `typeof handler === 'function' ? handler(...data) : handler.handle(action, ...data)`
|
|
31
|
+
// so a non-function handler must expose `handle`. Exporting `{ run }` made every app that
|
|
32
|
+
// ran `node ace configure` fail its build with `handler.handle is not a function`, and it
|
|
33
|
+
// also mismatched the assembler's own `DefineHook` type, which is a plain function.
|
|
34
|
+
return function generateStepsBarrel(_parent, _hooks, indexGenerator) {
|
|
35
|
+
indexGenerator.add('steps', {
|
|
36
|
+
source,
|
|
37
|
+
as: 'barrelFile',
|
|
38
|
+
exportName: 'steps',
|
|
39
|
+
importAlias,
|
|
40
|
+
removeSuffix: 'step',
|
|
41
|
+
skipSegments: ['steps'],
|
|
42
|
+
output,
|
|
43
|
+
comment: true,
|
|
44
|
+
});
|
|
41
45
|
};
|
|
42
46
|
}
|
|
43
|
-
/** The default export is the hook
|
|
44
|
-
* in `adonisrc.ts` resolves to a
|
|
47
|
+
/** The default export is the hook function itself, so `() => import('@adonis-agora/durable/hooks/steps')`
|
|
48
|
+
* in `adonisrc.ts` resolves to a handler the assembler can call directly. */
|
|
45
49
|
export default stepsHook();
|
|
46
50
|
//# sourceMappingURL=steps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steps.js","sourceRoot":"","sources":["../../../src/hooks/steps.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,4BAA4B,CAAC;AAYnE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,SAAS,CAAC,OAAO,GAAqB,EAAE;IACtD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,WAAW,CAAC;IAC7C,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,QAAQ,CAAC;IACpD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,sBAAsB,CAAC;IAExD,
|
|
1
|
+
{"version":3,"file":"steps.js","sourceRoot":"","sources":["../../../src/hooks/steps.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,4BAA4B,CAAC;AAYnE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,SAAS,CAAC,OAAO,GAAqB,EAAE;IACtD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,WAAW,CAAC;IAC7C,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,QAAQ,CAAC;IACpD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,sBAAsB,CAAC;IAExD,oFAAoF;IACpF,gEAAgE;IAChE,yFAAyF;IACzF,0FAA0F;IAC1F,0FAA0F;IAC1F,oFAAoF;IACpF,OAAO,SAAS,mBAAmB,CACjC,OAAgB,EAChB,MAAe,EACf,cAA8B;QAE9B,cAAc,CAAC,GAAG,CAAC,OAAO,EAAE;YAC1B,MAAM;YACN,EAAE,EAAE,YAAY;YAChB,UAAU,EAAE,OAAO;YACnB,WAAW;YACX,YAAY,EAAE,MAAM;YACpB,YAAY,EAAE,CAAC,OAAO,CAAC;YACvB,MAAM;YACN,OAAO,EAAE,IAAI;SACd,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAED;8EAC8E;AAC9E,eAAe,SAAS,EAAE,CAAC"}
|
|
@@ -42,13 +42,9 @@ export interface WorkflowsHookOptions {
|
|
|
42
42
|
*
|
|
43
43
|
* The default export is the hook object the assembler expects (`{ run(parent, hooks, indexGenerator) }`).
|
|
44
44
|
*/
|
|
45
|
-
export declare function workflowsHook(options?: WorkflowsHookOptions):
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
* in `adonisrc.ts` resolves to a ready hook (the assembler calls its `run`). */
|
|
50
|
-
declare const _default: {
|
|
51
|
-
run(_parent: unknown, _hooks: unknown, indexGenerator: IndexGenerator): void;
|
|
52
|
-
};
|
|
45
|
+
export declare function workflowsHook(options?: WorkflowsHookOptions): (_parent: unknown, _hooks: unknown, indexGenerator: IndexGenerator) => void;
|
|
46
|
+
/** The default export is the hook function itself, so `() => import('@adonis-agora/durable/hooks/workflows')`
|
|
47
|
+
* in `adonisrc.ts` resolves to a handler the assembler can call directly. */
|
|
48
|
+
declare const _default: (_parent: unknown, _hooks: unknown, indexGenerator: IndexGenerator) => void;
|
|
53
49
|
export default _default;
|
|
54
50
|
//# sourceMappingURL=workflows.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../../src/hooks/workflows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAE1E;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,mCAAmC,CAAC;AAE3E;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,6GAA6G;IAC7G,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6FAA6F;IAC7F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gHAAgH;IAChH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB
|
|
1
|
+
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../../src/hooks/workflows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAE1E;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,mCAAmC,CAAC;AAE3E;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,6GAA6G;IAC7G,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6FAA6F;IAC7F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gHAAgH;IAChH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB,aAYnD,OAAO,UACR,OAAO,kBACC,cAAc,KAC7B,IAAI,CAcR;AAED;8EAC8E;kCApBjE,OAAO,UACR,OAAO,kBACC,cAAc,KAC7B,IAAI"}
|
|
@@ -33,24 +33,28 @@ export function workflowsHook(options = {}) {
|
|
|
33
33
|
const source = options.source ?? 'app/workflows';
|
|
34
34
|
const importAlias = options.importAlias ?? '#workflows';
|
|
35
35
|
const output = options.output ?? GENERATED_WORKFLOWS_OUTPUT;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
36
|
+
// A FUNCTION, not an object with a `run` method. `@poppinss/hooks` — the runner the
|
|
37
|
+
// assembler drives its `init` hooks with — invokes a handler as
|
|
38
|
+
// `typeof handler === 'function' ? handler(...data) : handler.handle(action, ...data)`
|
|
39
|
+
// so a non-function handler must expose `handle`. Exporting `{ run }` made every app that
|
|
40
|
+
// ran `node ace configure` fail its build with `handler.handle is not a function`, and it
|
|
41
|
+
// also mismatched the assembler's own `DefineHook` type, which is a plain function.
|
|
42
|
+
return function generateWorkflowsBarrel(_parent, _hooks, indexGenerator) {
|
|
43
|
+
indexGenerator.add('workflows', {
|
|
44
|
+
source,
|
|
45
|
+
as: 'barrelFile',
|
|
46
|
+
exportName: 'workflows',
|
|
47
|
+
importAlias,
|
|
48
|
+
// `app/workflows/billing/charge_workflow.ts` → key `Billing/Charge`; the `Workflow` suffix is
|
|
49
|
+
// dropped so a barrel key reads as the class, mirroring controllers' `removeSuffix: 'controller'`.
|
|
50
|
+
removeSuffix: 'workflow',
|
|
51
|
+
skipSegments: ['workflows'],
|
|
52
|
+
output,
|
|
53
|
+
comment: true,
|
|
54
|
+
});
|
|
51
55
|
};
|
|
52
56
|
}
|
|
53
|
-
/** The default export is the hook
|
|
54
|
-
* in `adonisrc.ts` resolves to a
|
|
57
|
+
/** The default export is the hook function itself, so `() => import('@adonis-agora/durable/hooks/workflows')`
|
|
58
|
+
* in `adonisrc.ts` resolves to a handler the assembler can call directly. */
|
|
55
59
|
export default workflowsHook();
|
|
56
60
|
//# sourceMappingURL=workflows.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows.js","sourceRoot":"","sources":["../../../src/hooks/workflows.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,gCAAgC,CAAC;AAe3E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,aAAa,CAAC,OAAO,GAAyB,EAAE;IAC9D,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,eAAe,CAAC;IACjD,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,YAAY,CAAC;IACxD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,0BAA0B,CAAC;IAE5D,
|
|
1
|
+
{"version":3,"file":"workflows.js","sourceRoot":"","sources":["../../../src/hooks/workflows.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,gCAAgC,CAAC;AAe3E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,aAAa,CAAC,OAAO,GAAyB,EAAE;IAC9D,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,eAAe,CAAC;IACjD,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,YAAY,CAAC;IACxD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,0BAA0B,CAAC;IAE5D,oFAAoF;IACpF,gEAAgE;IAChE,yFAAyF;IACzF,0FAA0F;IAC1F,0FAA0F;IAC1F,oFAAoF;IACpF,OAAO,SAAS,uBAAuB,CACrC,OAAgB,EAChB,MAAe,EACf,cAA8B;QAE9B,cAAc,CAAC,GAAG,CAAC,WAAW,EAAE;YAC9B,MAAM;YACN,EAAE,EAAE,YAAY;YAChB,UAAU,EAAE,WAAW;YACvB,WAAW;YACX,8FAA8F;YAC9F,mGAAmG;YACnG,YAAY,EAAE,UAAU;YACxB,YAAY,EAAE,CAAC,WAAW,CAAC;YAC3B,MAAM;YACN,OAAO,EAAE,IAAI;SACd,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAED;8EAC8E;AAC9E,eAAe,aAAa,EAAE,CAAC"}
|
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.1";
|
|
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.1';
|
|
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": "0.31.
|
|
3
|
+
"version": "0.31.1",
|
|
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": {
|
|
@@ -160,6 +160,7 @@
|
|
|
160
160
|
"@opentelemetry/api": "1.9.1",
|
|
161
161
|
"@opentelemetry/context-async-hooks": "2.10.0",
|
|
162
162
|
"@opentelemetry/sdk-trace-base": "2.10.0",
|
|
163
|
+
"@poppinss/hooks": "7.3.1",
|
|
163
164
|
"@tanstack/intent": "^0.3.7",
|
|
164
165
|
"@types/better-sqlite3": "9.6.0",
|
|
165
166
|
"@types/node": "26.4.0",
|