@adonis-agora/durable 0.6.1 → 0.8.0
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 +64 -0
- package/README.md +1 -1
- package/dist/commands/main.d.ts +3 -2
- package/dist/commands/main.d.ts.map +1 -1
- package/dist/commands/main.js +3 -2
- package/dist/commands/main.js.map +1 -1
- package/dist/commands/make_workflow.d.ts +4 -3
- package/dist/commands/make_workflow.d.ts.map +1 -1
- package/dist/commands/make_workflow.js +4 -3
- package/dist/commands/make_workflow.js.map +1 -1
- package/dist/configure.d.ts +6 -5
- package/dist/configure.d.ts.map +1 -1
- package/dist/configure.js +9 -6
- package/dist/configure.js.map +1 -1
- package/dist/providers/dashboard_provider.d.ts +34 -3
- package/dist/providers/dashboard_provider.d.ts.map +1 -1
- package/dist/providers/dashboard_provider.js +110 -6
- package/dist/providers/dashboard_provider.js.map +1 -1
- package/dist/providers/durable_provider.d.ts.map +1 -1
- package/dist/providers/durable_provider.js +41 -4
- package/dist/providers/durable_provider.js.map +1 -1
- package/dist/src/base-workflow.d.ts +78 -0
- package/dist/src/base-workflow.d.ts.map +1 -0
- package/dist/src/base-workflow.js +106 -0
- package/dist/src/base-workflow.js.map +1 -0
- package/dist/src/codec-state-store.d.ts +13 -0
- package/dist/src/codec-state-store.d.ts.map +1 -1
- package/dist/src/codec-state-store.js +13 -0
- package/dist/src/codec-state-store.js.map +1 -1
- package/dist/src/control-flow-signal.d.ts +50 -0
- package/dist/src/control-flow-signal.d.ts.map +1 -0
- package/dist/src/control-flow-signal.js +54 -0
- package/dist/src/control-flow-signal.js.map +1 -0
- package/dist/src/control-plane-redis/redis-control-plane.d.ts +57 -5
- package/dist/src/control-plane-redis/redis-control-plane.d.ts.map +1 -1
- package/dist/src/control-plane-redis/redis-control-plane.js +100 -2
- package/dist/src/control-plane-redis/redis-control-plane.js.map +1 -1
- package/dist/src/dashboard/auth.d.ts +89 -0
- package/dist/src/dashboard/auth.d.ts.map +1 -0
- package/dist/src/dashboard/auth.js +113 -0
- package/dist/src/dashboard/auth.js.map +1 -0
- package/dist/src/dashboard/define_config.d.ts +17 -0
- package/dist/src/dashboard/define_config.d.ts.map +1 -1
- package/dist/src/dashboard/define_config.js +23 -1
- package/dist/src/dashboard/define_config.js.map +1 -1
- package/dist/src/dashboard/index.d.ts +6 -1
- package/dist/src/dashboard/index.d.ts.map +1 -1
- package/dist/src/dashboard/index.js +5 -1
- package/dist/src/dashboard/index.js.map +1 -1
- package/dist/src/dashboard/login_page.d.ts +23 -0
- package/dist/src/dashboard/login_page.d.ts.map +1 -0
- package/dist/src/dashboard/login_page.js +170 -0
- package/dist/src/dashboard/login_page.js.map +1 -0
- package/dist/src/dashboard/session_cookie.d.ts +42 -0
- package/dist/src/dashboard/session_cookie.d.ts.map +1 -0
- package/dist/src/dashboard/session_cookie.js +97 -0
- package/dist/src/dashboard/session_cookie.js.map +1 -0
- package/dist/src/define_config.d.ts +11 -2
- package/dist/src/define_config.d.ts.map +1 -1
- package/dist/src/define_config.js.map +1 -1
- package/dist/src/engine.d.ts +91 -3
- package/dist/src/engine.d.ts.map +1 -1
- package/dist/src/engine.js +331 -44
- package/dist/src/engine.js.map +1 -1
- package/dist/src/entities.js +2 -2
- package/dist/src/entities.js.map +1 -1
- package/dist/src/errors.d.ts +6 -1
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/errors.js +7 -2
- package/dist/src/errors.js.map +1 -1
- package/dist/src/event-accumulators.d.ts +1 -1
- package/dist/src/event-accumulators.d.ts.map +1 -1
- package/dist/src/events.d.ts +16 -0
- package/dist/src/events.d.ts.map +1 -1
- package/dist/src/events.js +26 -1
- package/dist/src/events.js.map +1 -1
- package/dist/src/hooks/steps.d.ts +43 -0
- package/dist/src/hooks/steps.d.ts.map +1 -0
- package/dist/src/hooks/steps.js +46 -0
- package/dist/src/hooks/steps.js.map +1 -0
- package/dist/src/hooks/workflows.d.ts +3 -2
- package/dist/src/hooks/workflows.d.ts.map +1 -1
- package/dist/src/hooks/workflows.js +3 -2
- package/dist/src/hooks/workflows.js.map +1 -1
- package/dist/src/index.d.ts +8 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +8 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/interfaces.d.ts +160 -43
- package/dist/src/interfaces.d.ts.map +1 -1
- package/dist/src/services/main.d.ts +13 -0
- package/dist/src/services/main.d.ts.map +1 -0
- package/dist/src/services/main.js +17 -0
- package/dist/src/services/main.js.map +1 -0
- package/dist/src/step-discovery.d.ts +42 -0
- package/dist/src/step-discovery.d.ts.map +1 -0
- package/dist/src/step-discovery.js +127 -0
- package/dist/src/step-discovery.js.map +1 -0
- package/dist/src/step-name-symbol.d.ts +63 -0
- package/dist/src/step-name-symbol.d.ts.map +1 -0
- package/dist/src/step-name-symbol.js +42 -0
- package/dist/src/step-name-symbol.js.map +1 -0
- package/dist/src/step-ref.d.ts +70 -0
- package/dist/src/step-ref.d.ts.map +1 -0
- package/dist/src/step-ref.js +93 -0
- package/dist/src/step-ref.js.map +1 -0
- package/dist/src/stores/lucid-schema.d.ts +1 -0
- package/dist/src/stores/lucid-schema.d.ts.map +1 -1
- package/dist/src/stores/lucid-schema.js +15 -0
- package/dist/src/stores/lucid-schema.js.map +1 -1
- package/dist/src/stores/lucid.d.ts +13 -0
- package/dist/src/stores/lucid.d.ts.map +1 -1
- package/dist/src/stores/lucid.js +43 -0
- package/dist/src/stores/lucid.js.map +1 -1
- package/dist/src/tenant-group.d.ts +18 -0
- package/dist/src/tenant-group.d.ts.map +1 -0
- package/dist/src/tenant-group.js +24 -0
- package/dist/src/tenant-group.js.map +1 -0
- package/dist/src/testing/in-memory-state-store.d.ts +16 -0
- package/dist/src/testing/in-memory-state-store.d.ts.map +1 -1
- package/dist/src/testing/in-memory-state-store.js +29 -0
- 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 +33 -2
- package/dist/src/testing-kit/state-store-conformance.js.map +1 -1
- package/dist/src/testing-kit/transport-conformance.d.ts.map +1 -1
- package/dist/src/testing-kit/transport-conformance.js +7 -12
- package/dist/src/testing-kit/transport-conformance.js.map +1 -1
- package/dist/src/transports/db.d.ts +14 -5
- package/dist/src/transports/db.d.ts.map +1 -1
- package/dist/src/transports/db.js +20 -15
- package/dist/src/transports/db.js.map +1 -1
- package/dist/src/transports/queue.d.ts +15 -5
- package/dist/src/transports/queue.d.ts.map +1 -1
- package/dist/src/transports/queue.js +19 -17
- package/dist/src/transports/queue.js.map +1 -1
- package/dist/src/workflow-als.d.ts +21 -0
- package/dist/src/workflow-als.d.ts.map +1 -0
- package/dist/src/workflow-als.js +22 -0
- package/dist/src/workflow-als.js.map +1 -0
- package/dist/src/workflow-ctx.d.ts +27 -8
- package/dist/src/workflow-ctx.d.ts.map +1 -1
- package/dist/src/workflow-ctx.js +183 -19
- package/dist/src/workflow-ctx.js.map +1 -1
- package/dist/src/workflow-discovery.d.ts +21 -15
- package/dist/src/workflow-discovery.d.ts.map +1 -1
- package/dist/src/workflow-discovery.js +17 -13
- package/dist/src/workflow-discovery.js.map +1 -1
- package/dist/src/workflow-ref.d.ts +9 -27
- package/dist/src/workflow-ref.d.ts.map +1 -1
- package/dist/src/workflow-ref.js +12 -34
- package/dist/src/workflow-ref.js.map +1 -1
- package/dist/stubs/database/migrations/create_durable_tables.stub +13 -1
- package/dist/stubs/make/workflow/main.stub +5 -4
- package/package.json +11 -1
- package/dist/src/remote-step-factory.d.ts +0 -15
- package/dist/src/remote-step-factory.d.ts.map +0 -1
- package/dist/src/remote-step-factory.js +0 -12
- package/dist/src/remote-step-factory.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-ref.d.ts","sourceRoot":"","sources":["../../src/workflow-ref.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH
|
|
1
|
+
{"version":3,"file":"workflow-ref.d.ts","sourceRoot":"","sources":["../../src/workflow-ref.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,2GAA2G;AAC3G,MAAM,WAAW,eAAe;IAC9B,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb,yFAAyF;IACzF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,kFAAkF;IAClF,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACnC,oFAAoF;IACpF,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,sGAAsG;AACtG,MAAM,WAAW,YAAa,SAAQ,eAAe;IACnD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,GAAG,YAAY,GAAG,SAAS,CAOtE;AAED,mGAAmG;AACnG,MAAM,MAAM,aAAa,CAAC,MAAM,GAAG,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,QAAQ,MACvE,GAAG,IAAI,EAAE,KAAK,EAAE,KACb;IACH,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;CAC5D,CAAC;AAEF,yGAAyG;AACzG,MAAM,MAAM,WAAW,CAAC,MAAM,GAAG,OAAO,EAAE,OAAO,GAAG,OAAO,IACvD,MAAM,GACN,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEnC,uDAAuD;AACvD,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,SAAS,QAAQ,MACjD,GAAG,IAAI,EAAE,KAAK,EAAE,KACb;IACH,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC;CAC1C,GACG,CAAC,GACD,OAAO,CAAC;AAEZ,gFAAgF;AAChF,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,CAAC,SAAS,QAAQ,MAClD,GAAG,IAAI,EAAE,KAAK,EAAE,KACb;IACH,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC,CAAC;CACxC,GACG,OAAO,CAAC,CAAC,CAAC,GACV,OAAO,CAAC;AAEZ;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,WAAW,GAAG,MAAM,CASrD"}
|
package/dist/src/workflow-ref.js
CHANGED
|
@@ -6,53 +6,31 @@
|
|
|
6
6
|
* string stays available for the cross-runtime case.
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* Read a class's {@link WorkflowMeta} — its name/version/tags/… — from its `static workflow =
|
|
10
|
+
* { name, version, … }` config (the {@link BaseWorkflow} authoring form). Any absent `version` is
|
|
11
|
+
* normalized to `'1'`. Returns `undefined` for a class carrying no valid config (a class with no
|
|
12
|
+
* `static workflow`, or one whose `name` is not a string, is not a registrable workflow).
|
|
13
13
|
*/
|
|
14
|
-
export const WORKFLOW_META_KEY = Symbol.for('@agora/durable:workflow-meta');
|
|
15
|
-
/**
|
|
16
|
-
* Class decorator marking a class as a durable workflow. Stamps the full options (name + version +
|
|
17
|
-
* tags …) so a class ref resolves via {@link workflowName} and the provider's `app/workflows`
|
|
18
|
-
* auto-discovery can register it on the engine — no manual `engine.register(...)`. The class must
|
|
19
|
-
* expose `run(ctx, input)`; that method becomes the workflow body.
|
|
20
|
-
*
|
|
21
|
-
* ```ts
|
|
22
|
-
* @Workflow({ name: 'order', version: '1' })
|
|
23
|
-
* export default class OrderWorkflow {
|
|
24
|
-
* async run(ctx: WorkflowCtx, input: { id: string }) { ... }
|
|
25
|
-
* }
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
|
-
export function Workflow(options) {
|
|
29
|
-
return (target) => {
|
|
30
|
-
const meta = { ...options, version: options.version ?? '1' };
|
|
31
|
-
Object.defineProperty(target, WORKFLOW_META_KEY, {
|
|
32
|
-
value: meta,
|
|
33
|
-
enumerable: false,
|
|
34
|
-
configurable: true,
|
|
35
|
-
});
|
|
36
|
-
return target;
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
/** Read the {@link WorkflowMeta} a `@Workflow` decorator stamped on a class, or `undefined`. */
|
|
40
14
|
export function workflowMeta(target) {
|
|
41
15
|
if (typeof target !== 'function')
|
|
42
16
|
return undefined;
|
|
43
|
-
|
|
17
|
+
const config = target.workflow;
|
|
18
|
+
if (config && typeof config === 'object' && typeof config.name === 'string') {
|
|
19
|
+
return { ...config, version: config.version ?? '1' };
|
|
20
|
+
}
|
|
21
|
+
return undefined;
|
|
44
22
|
}
|
|
45
23
|
/**
|
|
46
24
|
* Resolve a {@link WorkflowRef} to its registered workflow name: a string is returned as-is; a
|
|
47
|
-
*
|
|
48
|
-
*
|
|
25
|
+
* workflow class is resolved via the name on its `static workflow` config. Throws if a class carries
|
|
26
|
+
* no `static workflow` config (so it has no registered name).
|
|
49
27
|
*/
|
|
50
28
|
export function workflowName(ref) {
|
|
51
29
|
if (typeof ref === 'string')
|
|
52
30
|
return ref;
|
|
53
31
|
const name = workflowMeta(ref)?.name;
|
|
54
32
|
if (!name) {
|
|
55
|
-
throw new Error(`workflow class ${ref.name} has no registered name —
|
|
33
|
+
throw new Error(`workflow class ${ref.name} has no registered name — does it declare \`static workflow = { name }\`?`);
|
|
56
34
|
}
|
|
57
35
|
return name;
|
|
58
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-ref.js","sourceRoot":"","sources":["../../src/workflow-ref.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"workflow-ref.js","sourceRoot":"","sources":["../../src/workflow-ref.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAqBH;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,MAAe;IAC1C,IAAI,OAAO,MAAM,KAAK,UAAU;QAAE,OAAO,SAAS,CAAC;IACnD,MAAM,MAAM,GAAI,MAAyC,CAAC,QAAQ,CAAC;IACnE,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC5E,OAAO,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,GAAG,EAAE,CAAC;IACvD,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAgCD;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,GAAgB;IAC3C,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,GAAG,CAAC;IACxC,MAAM,IAAI,GAAG,YAAY,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC;IACrC,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CACb,kBAAkB,GAAG,CAAC,IAAI,2EAA2E,CACtG,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { BaseSchema } from '@adonisjs/lucid/schema'
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Durable workflow tables for the @adonis-agora/durable `lucid` state store: runs, step checkpoints, the
|
|
8
|
-
* search-attribute side-table, signal waiters and buffered
|
|
8
|
+
* search-attribute side-table, signal waiters, buffered signals and buffered events. JSON payloads are stored as TEXT (the store
|
|
9
9
|
* (de)serializes them) and timestamps as epoch-ms integers, so the schema is portable across
|
|
10
10
|
* SQLite / Postgres / MySQL.
|
|
11
11
|
*/
|
|
@@ -79,9 +79,21 @@ export default class extends BaseSchema {
|
|
|
79
79
|
table.text('payload')
|
|
80
80
|
table.index(['token'], 'durable_buffered_signals_token_idx')
|
|
81
81
|
})
|
|
82
|
+
|
|
83
|
+
// Reliable (buffered) events: a publish matching no live waiter keeps ONE copy here, consumed by
|
|
84
|
+
// the first future matching `waitForEvent`. Keyed by `name` (many waiters share a name with
|
|
85
|
+
// different `match`); `id` is the caller-minted PK; `published_at` is epoch-ms.
|
|
86
|
+
this.schema.createTable('durable_buffered_events', (table) => {
|
|
87
|
+
table.string('id').primary()
|
|
88
|
+
table.string('name').notNullable()
|
|
89
|
+
table.text('payload')
|
|
90
|
+
table.bigInteger('published_at').notNullable()
|
|
91
|
+
table.index(['name', 'published_at'], 'durable_buffered_events_name_idx')
|
|
92
|
+
})
|
|
82
93
|
}
|
|
83
94
|
|
|
84
95
|
async down() {
|
|
96
|
+
this.schema.dropTableIfExists('durable_buffered_events')
|
|
85
97
|
this.schema.dropTableIfExists('durable_buffered_signals')
|
|
86
98
|
this.schema.dropTableIfExists('durable_signal_waiters')
|
|
87
99
|
this.schema.dropTableIfExists('durable_run_attributes')
|
|
@@ -6,17 +6,18 @@
|
|
|
6
6
|
to: app.makePath('app/workflows', entity.path, workflowFileName + '.ts')
|
|
7
7
|
})
|
|
8
8
|
}}}
|
|
9
|
-
import {
|
|
9
|
+
import { BaseWorkflow } from '@adonis-agora/durable'
|
|
10
10
|
import type { WorkflowCtx } from '@adonis-agora/durable'
|
|
11
11
|
|
|
12
12
|
interface {{ workflowName }}Input {
|
|
13
13
|
// Define your workflow input here
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
export default class {{ workflowName }}Workflow extends BaseWorkflow {
|
|
17
|
+
static workflow = { name: '{{ registeredName }}', version: '1' }
|
|
18
|
+
|
|
18
19
|
async run(ctx: WorkflowCtx, input: {{ workflowName }}Input) {
|
|
19
|
-
// Your workflow logic here — compose ctx.step / ctx.
|
|
20
|
+
// Your workflow logic here — compose ctx.step / ctx.localStep / ctx.child / ctx.sleep …
|
|
20
21
|
return input
|
|
21
22
|
}
|
|
22
23
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adonis-agora/durable",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
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": {
|
|
@@ -18,6 +18,11 @@
|
|
|
18
18
|
"import": "./dist/src/index.js",
|
|
19
19
|
"default": "./dist/src/index.js"
|
|
20
20
|
},
|
|
21
|
+
"./services/main": {
|
|
22
|
+
"types": "./dist/src/services/main.d.ts",
|
|
23
|
+
"import": "./dist/src/services/main.js",
|
|
24
|
+
"default": "./dist/src/services/main.js"
|
|
25
|
+
},
|
|
21
26
|
"./durable_provider": {
|
|
22
27
|
"types": "./dist/providers/durable_provider.d.ts",
|
|
23
28
|
"import": "./dist/providers/durable_provider.js",
|
|
@@ -58,6 +63,11 @@
|
|
|
58
63
|
"import": "./dist/src/hooks/workflows.js",
|
|
59
64
|
"default": "./dist/src/hooks/workflows.js"
|
|
60
65
|
},
|
|
66
|
+
"./hooks/steps": {
|
|
67
|
+
"types": "./dist/src/hooks/steps.d.ts",
|
|
68
|
+
"import": "./dist/src/hooks/steps.js",
|
|
69
|
+
"default": "./dist/src/hooks/steps.js"
|
|
70
|
+
},
|
|
61
71
|
"./admission-redis": {
|
|
62
72
|
"types": "./dist/src/admission-redis/index.d.ts",
|
|
63
73
|
"import": "./dist/src/admission-redis/index.js",
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { z } from 'zod';
|
|
2
|
-
import type { RemoteStepDef, StepOptions } from './interfaces.js';
|
|
3
|
-
export interface RemoteStepConfig<TInput, TOutput> extends StepOptions {
|
|
4
|
-
name: string;
|
|
5
|
-
/** Worker group expected to handle this step. Defaults to the `name` prefix before the first dot. */
|
|
6
|
-
group?: string;
|
|
7
|
-
input: z.ZodType<TInput>;
|
|
8
|
-
output: z.ZodType<TOutput>;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Defines a typed handle to a step that runs on a remote worker. Call it from a workflow with
|
|
12
|
-
* `ctx.call(step, input)`; a worker registers a handler under the same `name`.
|
|
13
|
-
*/
|
|
14
|
-
export declare function remoteStep<TInput, TOutput>(config: RemoteStepConfig<TInput, TOutput>): RemoteStepDef<TInput, TOutput>;
|
|
15
|
-
//# sourceMappingURL=remote-step-factory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remote-step-factory.d.ts","sourceRoot":"","sources":["../../src/remote-step-factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAElE,MAAM,WAAW,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAE,SAAQ,WAAW;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,qGAAqG;IACrG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACzB,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,OAAO,EACxC,MAAM,EAAE,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,GACxC,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAMhC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Defines a typed handle to a step that runs on a remote worker. Call it from a workflow with
|
|
3
|
-
* `ctx.call(step, input)`; a worker registers a handler under the same `name`.
|
|
4
|
-
*/
|
|
5
|
-
export function remoteStep(config) {
|
|
6
|
-
return {
|
|
7
|
-
...config,
|
|
8
|
-
group: config.group ?? config.name.split('.')[0] ?? config.name,
|
|
9
|
-
__remote: true,
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=remote-step-factory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remote-step-factory.js","sourceRoot":"","sources":["../../src/remote-step-factory.ts"],"names":[],"mappings":"AAWA;;;GAGG;AACH,MAAM,UAAU,UAAU,CACxB,MAAyC;IAEzC,OAAO;QACL,GAAG,MAAM;QACT,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,IAAI;QAC/D,QAAQ,EAAE,IAAI;KACf,CAAC;AACJ,CAAC"}
|