@dudousxd/nestjs-durable-dashboard 0.46.1 → 0.48.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/dist/client/durable-client.d.ts +26 -1
- package/dist/client/durable-client.d.ts.map +1 -1
- package/dist/client/durable-client.js +28 -1
- package/dist/client/durable-client.js.map +1 -1
- package/dist/client/run-query-string.d.ts +2 -0
- package/dist/client/run-query-string.d.ts.map +1 -1
- package/dist/client/run-query-string.js.map +1 -1
- package/dist/react/open-console-button.d.ts +1 -1
- package/dist/react/open-console-button.d.ts.map +1 -1
- package/dist/server/index.cjs +238 -39
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +25 -2
- package/dist/server/index.d.ts +25 -2
- package/dist/server/index.js +238 -39
- package/dist/server/index.js.map +1 -1
- package/dist/spa/assets/{bench-C9Wy_W9u.js → bench-DBT4MTjB.js} +1 -1
- package/dist/spa/assets/index-BYg_w0aX.js +66 -0
- package/dist/spa/assets/{index-DTjzfX2h.js → index-D9HzYedm.js} +1 -1
- package/dist/spa/assets/index-LBQc7d3p.css +1 -0
- package/dist/spa/assets/{preview-CepUq-I_.js → preview-BDJd2aOJ.js} +1 -1
- package/dist/spa/bench.html +3 -3
- package/dist/spa/index.html +3 -3
- package/dist/spa/preview.html +3 -3
- package/package.json +27 -18
- package/dist/spa/assets/index-DyuI-y-B.js +0 -80
- package/dist/spa/assets/index-DzTL9Sp_.css +0 -1
package/dist/server/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _dudousxd_nestjs_durable_core from '@dudousxd/nestjs-durable-core';
|
|
2
|
-
import { RunGateway, StateStore, WorkflowEngine, RunQuery, RunListItem, RunFacetQuery, RunFacetRow, RunValueAxis, RunValueFacetOptions, RunValueFacetRow, DurableTopology, GroupHealth, RunDetail,
|
|
2
|
+
import { RunGateway, StateStore, WorkflowEngine, ScheduleListQuery, ScheduleDescription, RunResult, RunQuery, RunListItem, RunFacetQuery, RunFacetRow, RunValueAxis, RunValueFacetOptions, RunValueFacetRow, DurableTopology, GroupHealth, RunDetail, UpdateResult, EngineEvent, AttributeFilter } from '@dudousxd/nestjs-durable-core';
|
|
3
3
|
export { RunDetail } from '@dudousxd/nestjs-durable-core';
|
|
4
4
|
import * as rxjs from 'rxjs';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
@@ -128,6 +128,18 @@ declare class DashboardService {
|
|
|
128
128
|
* on engine presence, which is truthy on a tenant too).
|
|
129
129
|
*/
|
|
130
130
|
private controlPlane;
|
|
131
|
+
/**
|
|
132
|
+
* The persisted schedules (`engine.schedules`), soonest-due first. Empty — not an error — on a
|
|
133
|
+
* tenant deployment or a store that doesn't persist schedules, so the console can simply hide the
|
|
134
|
+
* panel instead of special-casing either.
|
|
135
|
+
*/
|
|
136
|
+
listSchedules(query: ScheduleListQuery): Promise<ScheduleDescription[]>;
|
|
137
|
+
/** Pause a persisted schedule (control plane only). */
|
|
138
|
+
pauseSchedule(id: string): Promise<ScheduleDescription>;
|
|
139
|
+
/** Resume a persisted schedule from its next window (control plane only). */
|
|
140
|
+
resumeSchedule(id: string): Promise<ScheduleDescription>;
|
|
141
|
+
/** Start one run of a persisted schedule now, outside its cadence (control plane only). */
|
|
142
|
+
triggerSchedule(id: string): Promise<RunResult>;
|
|
131
143
|
/**
|
|
132
144
|
* Prometheus-text metrics for a `/metrics` scrape: the event-counters (runs/steps by outcome,
|
|
133
145
|
* per-workflow counts) plus live **backlog gauges** queried at scrape time — `durable_pending_runs`
|
|
@@ -282,13 +294,24 @@ declare class DurableApiController {
|
|
|
282
294
|
* so a picker never offers a value whose result set is empty.
|
|
283
295
|
*
|
|
284
296
|
* `limit` matters rather than being a nicety — tag and attribute cardinality grows with the data
|
|
285
|
-
* (a `singleton:<key>` tag is minted per key), so the unbounded answer is a listing.
|
|
297
|
+
* (a `singleton:<key>` tag is minted per key), so the unbounded answer is a listing. `offset` and
|
|
298
|
+
* `search` are what make that bound livable: a picker pages as it scrolls and narrows as the
|
|
299
|
+
* operator types, both server-side, so a value outside the first page is still reachable.
|
|
286
300
|
*/
|
|
287
301
|
values(query: Record<string, unknown>): Promise<_dudousxd_nestjs_filter.GroupByCountResult>;
|
|
288
302
|
/** Prometheus-text metrics (runs/steps by outcome, per-workflow counts) for a scrape. */
|
|
289
303
|
metrics(): Promise<string>;
|
|
290
304
|
/** Per-group worker health (queue backlog + live worker heartbeats) for the Workers panel. */
|
|
291
305
|
workers(): Promise<_dudousxd_nestjs_durable_core.GroupHealth[]>;
|
|
306
|
+
/**
|
|
307
|
+
* The persisted schedules (`engine.schedules`), soonest-due first, optionally narrowed by
|
|
308
|
+
* `namespace`/`workflow`/`tag`/`paused`. Empty on a tenant or a store without schedules.
|
|
309
|
+
*/
|
|
310
|
+
schedules(namespace?: string, workflow?: string, tag?: string, paused?: string, limit?: string): Promise<_dudousxd_nestjs_durable_core.ScheduleDescription[]>;
|
|
311
|
+
pauseSchedule(id: string): Promise<_dudousxd_nestjs_durable_core.ScheduleDescription>;
|
|
312
|
+
resumeSchedule(id: string): Promise<_dudousxd_nestjs_durable_core.ScheduleDescription>;
|
|
313
|
+
/** Start one run of the schedule now, outside its cadence. */
|
|
314
|
+
triggerSchedule(id: string): Promise<_dudousxd_nestjs_durable_core.RunResult>;
|
|
292
315
|
/** This deployment's durable role (control plane vs tenant) + tenant name — for the header badge. */
|
|
293
316
|
topology(): _dudousxd_nestjs_durable_core.DurableTopology;
|
|
294
317
|
run(id: string): Promise<_dudousxd_nestjs_durable_core.RunDetail>;
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _dudousxd_nestjs_durable_core from '@dudousxd/nestjs-durable-core';
|
|
2
|
-
import { RunGateway, StateStore, WorkflowEngine, RunQuery, RunListItem, RunFacetQuery, RunFacetRow, RunValueAxis, RunValueFacetOptions, RunValueFacetRow, DurableTopology, GroupHealth, RunDetail,
|
|
2
|
+
import { RunGateway, StateStore, WorkflowEngine, ScheduleListQuery, ScheduleDescription, RunResult, RunQuery, RunListItem, RunFacetQuery, RunFacetRow, RunValueAxis, RunValueFacetOptions, RunValueFacetRow, DurableTopology, GroupHealth, RunDetail, UpdateResult, EngineEvent, AttributeFilter } from '@dudousxd/nestjs-durable-core';
|
|
3
3
|
export { RunDetail } from '@dudousxd/nestjs-durable-core';
|
|
4
4
|
import * as rxjs from 'rxjs';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
@@ -128,6 +128,18 @@ declare class DashboardService {
|
|
|
128
128
|
* on engine presence, which is truthy on a tenant too).
|
|
129
129
|
*/
|
|
130
130
|
private controlPlane;
|
|
131
|
+
/**
|
|
132
|
+
* The persisted schedules (`engine.schedules`), soonest-due first. Empty — not an error — on a
|
|
133
|
+
* tenant deployment or a store that doesn't persist schedules, so the console can simply hide the
|
|
134
|
+
* panel instead of special-casing either.
|
|
135
|
+
*/
|
|
136
|
+
listSchedules(query: ScheduleListQuery): Promise<ScheduleDescription[]>;
|
|
137
|
+
/** Pause a persisted schedule (control plane only). */
|
|
138
|
+
pauseSchedule(id: string): Promise<ScheduleDescription>;
|
|
139
|
+
/** Resume a persisted schedule from its next window (control plane only). */
|
|
140
|
+
resumeSchedule(id: string): Promise<ScheduleDescription>;
|
|
141
|
+
/** Start one run of a persisted schedule now, outside its cadence (control plane only). */
|
|
142
|
+
triggerSchedule(id: string): Promise<RunResult>;
|
|
131
143
|
/**
|
|
132
144
|
* Prometheus-text metrics for a `/metrics` scrape: the event-counters (runs/steps by outcome,
|
|
133
145
|
* per-workflow counts) plus live **backlog gauges** queried at scrape time — `durable_pending_runs`
|
|
@@ -282,13 +294,24 @@ declare class DurableApiController {
|
|
|
282
294
|
* so a picker never offers a value whose result set is empty.
|
|
283
295
|
*
|
|
284
296
|
* `limit` matters rather than being a nicety — tag and attribute cardinality grows with the data
|
|
285
|
-
* (a `singleton:<key>` tag is minted per key), so the unbounded answer is a listing.
|
|
297
|
+
* (a `singleton:<key>` tag is minted per key), so the unbounded answer is a listing. `offset` and
|
|
298
|
+
* `search` are what make that bound livable: a picker pages as it scrolls and narrows as the
|
|
299
|
+
* operator types, both server-side, so a value outside the first page is still reachable.
|
|
286
300
|
*/
|
|
287
301
|
values(query: Record<string, unknown>): Promise<_dudousxd_nestjs_filter.GroupByCountResult>;
|
|
288
302
|
/** Prometheus-text metrics (runs/steps by outcome, per-workflow counts) for a scrape. */
|
|
289
303
|
metrics(): Promise<string>;
|
|
290
304
|
/** Per-group worker health (queue backlog + live worker heartbeats) for the Workers panel. */
|
|
291
305
|
workers(): Promise<_dudousxd_nestjs_durable_core.GroupHealth[]>;
|
|
306
|
+
/**
|
|
307
|
+
* The persisted schedules (`engine.schedules`), soonest-due first, optionally narrowed by
|
|
308
|
+
* `namespace`/`workflow`/`tag`/`paused`. Empty on a tenant or a store without schedules.
|
|
309
|
+
*/
|
|
310
|
+
schedules(namespace?: string, workflow?: string, tag?: string, paused?: string, limit?: string): Promise<_dudousxd_nestjs_durable_core.ScheduleDescription[]>;
|
|
311
|
+
pauseSchedule(id: string): Promise<_dudousxd_nestjs_durable_core.ScheduleDescription>;
|
|
312
|
+
resumeSchedule(id: string): Promise<_dudousxd_nestjs_durable_core.ScheduleDescription>;
|
|
313
|
+
/** Start one run of the schedule now, outside its cadence. */
|
|
314
|
+
triggerSchedule(id: string): Promise<_dudousxd_nestjs_durable_core.RunResult>;
|
|
292
315
|
/** This deployment's durable role (control plane vs tenant) + tenant name — for the header badge. */
|
|
293
316
|
topology(): _dudousxd_nestjs_durable_core.DurableTopology;
|
|
294
317
|
run(id: string): Promise<_dudousxd_nestjs_durable_core.RunDetail>;
|
package/dist/server/index.js
CHANGED
|
@@ -7,13 +7,22 @@ import { Inject, Injectable, Optional } from "@nestjs/common";
|
|
|
7
7
|
import { Observable } from "rxjs";
|
|
8
8
|
function _ts_decorate(decorators, target, key, desc) {
|
|
9
9
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
10
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
11
|
-
|
|
10
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
11
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
12
|
+
} else {
|
|
13
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
14
|
+
if (d = decorators[i]) {
|
|
15
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
12
19
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
13
20
|
}
|
|
14
21
|
__name(_ts_decorate, "_ts_decorate");
|
|
15
|
-
function _ts_metadata(
|
|
16
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
22
|
+
function _ts_metadata(metadataKey, metadataValue) {
|
|
23
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
24
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
25
|
+
}
|
|
17
26
|
}
|
|
18
27
|
__name(_ts_metadata, "_ts_metadata");
|
|
19
28
|
function _ts_param(paramIndex, decorator) {
|
|
@@ -54,6 +63,27 @@ var DashboardService = class {
|
|
|
54
63
|
};
|
|
55
64
|
}
|
|
56
65
|
/**
|
|
66
|
+
* The persisted schedules (`engine.schedules`), soonest-due first. Empty — not an error — on a
|
|
67
|
+
* tenant deployment or a store that doesn't persist schedules, so the console can simply hide the
|
|
68
|
+
* panel instead of special-casing either.
|
|
69
|
+
*/
|
|
70
|
+
async listSchedules(query) {
|
|
71
|
+
if (!this.store || !this.engine?.schedules?.supported) return [];
|
|
72
|
+
return this.engine.schedules.list(query);
|
|
73
|
+
}
|
|
74
|
+
/** Pause a persisted schedule (control plane only). */
|
|
75
|
+
pauseSchedule(id) {
|
|
76
|
+
return this.controlPlane().engine.schedules.pause(id);
|
|
77
|
+
}
|
|
78
|
+
/** Resume a persisted schedule from its next window (control plane only). */
|
|
79
|
+
resumeSchedule(id) {
|
|
80
|
+
return this.controlPlane().engine.schedules.resume(id);
|
|
81
|
+
}
|
|
82
|
+
/** Start one run of a persisted schedule now, outside its cadence (control plane only). */
|
|
83
|
+
triggerSchedule(id) {
|
|
84
|
+
return this.controlPlane().engine.schedules.trigger(id);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
57
87
|
* Prometheus-text metrics for a `/metrics` scrape: the event-counters (runs/steps by outcome,
|
|
58
88
|
* per-workflow counts) plus live **backlog gauges** queried at scrape time — `durable_pending_runs`
|
|
59
89
|
* (the dispatch backlog: the key health signal of the dispatch model) and `durable_dead_runs` (DLQ
|
|
@@ -388,13 +418,22 @@ var RunQueryDraft2 = class {
|
|
|
388
418
|
// src/server/run-query.adapter.ts
|
|
389
419
|
function _ts_decorate2(decorators, target, key, desc) {
|
|
390
420
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
391
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
392
|
-
|
|
421
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
422
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
423
|
+
} else {
|
|
424
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
425
|
+
if (d = decorators[i]) {
|
|
426
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
393
430
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
394
431
|
}
|
|
395
432
|
__name(_ts_decorate2, "_ts_decorate");
|
|
396
|
-
function _ts_metadata2(
|
|
397
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
433
|
+
function _ts_metadata2(metadataKey, metadataValue) {
|
|
434
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
435
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
436
|
+
}
|
|
398
437
|
}
|
|
399
438
|
__name(_ts_metadata2, "_ts_metadata");
|
|
400
439
|
var RUN_QUERY_ADAPTER = Symbol("DURABLE_RUN_QUERY_ADAPTER");
|
|
@@ -625,7 +664,9 @@ var RunQueryAdapter = class {
|
|
|
625
664
|
/**
|
|
626
665
|
* The distinct values of one field over the runs the active predicates select — the console's
|
|
627
666
|
* pickers. `limit` is honoured because it has to be: tag and search-attribute cardinality grows
|
|
628
|
-
* with the data, so the unbounded answer is a listing rather than an aggregate.
|
|
667
|
+
* with the data, so the unbounded answer is a listing rather than an aggregate. `offset` and
|
|
668
|
+
* `search` are what keep that bound from becoming a ceiling — the picker pages as it scrolls and
|
|
669
|
+
* narrows as the operator types, both against the whole matching set rather than the fetched page.
|
|
629
670
|
*/
|
|
630
671
|
async groupByCount(qb, field, entity, opts) {
|
|
631
672
|
this.assertDurableRun(entity);
|
|
@@ -640,7 +681,13 @@ var RunQueryAdapter = class {
|
|
|
640
681
|
throw new BadRequestException(`The durable run list cannot enumerate values of \`${field}\`.`);
|
|
641
682
|
}
|
|
642
683
|
const rows = await this.gateway.runValueFacets(axis, this.draft(qb).facetQuery(), {
|
|
643
|
-
limit: opts?.limit ?? RUN_VALUE_FACET_LIMIT
|
|
684
|
+
limit: opts?.limit ?? RUN_VALUE_FACET_LIMIT,
|
|
685
|
+
...opts?.offset !== void 0 && {
|
|
686
|
+
offset: opts.offset
|
|
687
|
+
},
|
|
688
|
+
...opts?.search !== void 0 && {
|
|
689
|
+
search: opts.search
|
|
690
|
+
}
|
|
644
691
|
});
|
|
645
692
|
return rows.map((row) => ({
|
|
646
693
|
value: row.value,
|
|
@@ -673,13 +720,22 @@ RunQueryAdapter = _ts_decorate2([
|
|
|
673
720
|
// src/server/run.filter.ts
|
|
674
721
|
function _ts_decorate3(decorators, target, key, desc) {
|
|
675
722
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
676
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
677
|
-
|
|
723
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
724
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
725
|
+
} else {
|
|
726
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
727
|
+
if (d = decorators[i]) {
|
|
728
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
}
|
|
678
732
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
679
733
|
}
|
|
680
734
|
__name(_ts_decorate3, "_ts_decorate");
|
|
681
|
-
function _ts_metadata3(
|
|
682
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
735
|
+
function _ts_metadata3(metadataKey, metadataValue) {
|
|
736
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
737
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
738
|
+
}
|
|
683
739
|
}
|
|
684
740
|
__name(_ts_metadata3, "_ts_metadata");
|
|
685
741
|
function list(value) {
|
|
@@ -881,13 +937,22 @@ RunFilter = _ts_decorate3([
|
|
|
881
937
|
// src/server/durable-api.controller.ts
|
|
882
938
|
function _ts_decorate4(decorators, target, key, desc) {
|
|
883
939
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
884
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
885
|
-
|
|
940
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
941
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
942
|
+
} else {
|
|
943
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
944
|
+
if (d = decorators[i]) {
|
|
945
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
}
|
|
886
949
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
887
950
|
}
|
|
888
951
|
__name(_ts_decorate4, "_ts_decorate");
|
|
889
|
-
function _ts_metadata4(
|
|
890
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
952
|
+
function _ts_metadata4(metadataKey, metadataValue) {
|
|
953
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
954
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
955
|
+
}
|
|
891
956
|
}
|
|
892
957
|
__name(_ts_metadata4, "_ts_metadata");
|
|
893
958
|
function _ts_param2(paramIndex, decorator) {
|
|
@@ -942,7 +1007,9 @@ var DurableApiController = class {
|
|
|
942
1007
|
* so a picker never offers a value whose result set is empty.
|
|
943
1008
|
*
|
|
944
1009
|
* `limit` matters rather than being a nicety — tag and attribute cardinality grows with the data
|
|
945
|
-
* (a `singleton:<key>` tag is minted per key), so the unbounded answer is a listing.
|
|
1010
|
+
* (a `singleton:<key>` tag is minted per key), so the unbounded answer is a listing. `offset` and
|
|
1011
|
+
* `search` are what make that bound livable: a picker pages as it scrolls and narrows as the
|
|
1012
|
+
* operator types, both server-side, so a value outside the first page is still reachable.
|
|
946
1013
|
*/
|
|
947
1014
|
values(query) {
|
|
948
1015
|
return this.runner.groupByCount(DurableRun, query, {
|
|
@@ -957,6 +1024,37 @@ var DurableApiController = class {
|
|
|
957
1024
|
workers() {
|
|
958
1025
|
return this.dashboard.workerHealth();
|
|
959
1026
|
}
|
|
1027
|
+
/**
|
|
1028
|
+
* The persisted schedules (`engine.schedules`), soonest-due first, optionally narrowed by
|
|
1029
|
+
* `namespace`/`workflow`/`tag`/`paused`. Empty on a tenant or a store without schedules.
|
|
1030
|
+
*/
|
|
1031
|
+
schedules(namespace, workflow, tag, paused, limit) {
|
|
1032
|
+
return this.dashboard.listSchedules({
|
|
1033
|
+
...namespace ? {
|
|
1034
|
+
namespace
|
|
1035
|
+
} : {},
|
|
1036
|
+
...workflow ? {
|
|
1037
|
+
workflow
|
|
1038
|
+
} : {},
|
|
1039
|
+
...tag ? {
|
|
1040
|
+
tag
|
|
1041
|
+
} : {},
|
|
1042
|
+
...paused === "true" || paused === "false" ? {
|
|
1043
|
+
paused: paused === "true"
|
|
1044
|
+
} : {},
|
|
1045
|
+
limit: Math.min(Number(limit) || 200, 1e3)
|
|
1046
|
+
});
|
|
1047
|
+
}
|
|
1048
|
+
pauseSchedule(id) {
|
|
1049
|
+
return this.dashboard.pauseSchedule(id).catch(notFound);
|
|
1050
|
+
}
|
|
1051
|
+
resumeSchedule(id) {
|
|
1052
|
+
return this.dashboard.resumeSchedule(id).catch(notFound);
|
|
1053
|
+
}
|
|
1054
|
+
/** Start one run of the schedule now, outside its cadence. */
|
|
1055
|
+
triggerSchedule(id) {
|
|
1056
|
+
return this.dashboard.triggerSchedule(id).catch(notFound);
|
|
1057
|
+
}
|
|
960
1058
|
/** This deployment's durable role (control plane vs tenant) + tenant name — for the header badge. */
|
|
961
1059
|
topology() {
|
|
962
1060
|
return this.dashboard.topology();
|
|
@@ -1067,6 +1165,50 @@ _ts_decorate4([
|
|
|
1067
1165
|
_ts_metadata4("design:paramtypes", []),
|
|
1068
1166
|
_ts_metadata4("design:returntype", void 0)
|
|
1069
1167
|
], DurableApiController.prototype, "workers", null);
|
|
1168
|
+
_ts_decorate4([
|
|
1169
|
+
Get("schedules"),
|
|
1170
|
+
_ts_param2(0, Query("namespace")),
|
|
1171
|
+
_ts_param2(1, Query("workflow")),
|
|
1172
|
+
_ts_param2(2, Query("tag")),
|
|
1173
|
+
_ts_param2(3, Query("paused")),
|
|
1174
|
+
_ts_param2(4, Query("limit")),
|
|
1175
|
+
_ts_metadata4("design:type", Function),
|
|
1176
|
+
_ts_metadata4("design:paramtypes", [
|
|
1177
|
+
String,
|
|
1178
|
+
String,
|
|
1179
|
+
String,
|
|
1180
|
+
String,
|
|
1181
|
+
String
|
|
1182
|
+
]),
|
|
1183
|
+
_ts_metadata4("design:returntype", void 0)
|
|
1184
|
+
], DurableApiController.prototype, "schedules", null);
|
|
1185
|
+
_ts_decorate4([
|
|
1186
|
+
Post("schedules/:id/pause"),
|
|
1187
|
+
_ts_param2(0, Param("id")),
|
|
1188
|
+
_ts_metadata4("design:type", Function),
|
|
1189
|
+
_ts_metadata4("design:paramtypes", [
|
|
1190
|
+
String
|
|
1191
|
+
]),
|
|
1192
|
+
_ts_metadata4("design:returntype", void 0)
|
|
1193
|
+
], DurableApiController.prototype, "pauseSchedule", null);
|
|
1194
|
+
_ts_decorate4([
|
|
1195
|
+
Post("schedules/:id/resume"),
|
|
1196
|
+
_ts_param2(0, Param("id")),
|
|
1197
|
+
_ts_metadata4("design:type", Function),
|
|
1198
|
+
_ts_metadata4("design:paramtypes", [
|
|
1199
|
+
String
|
|
1200
|
+
]),
|
|
1201
|
+
_ts_metadata4("design:returntype", void 0)
|
|
1202
|
+
], DurableApiController.prototype, "resumeSchedule", null);
|
|
1203
|
+
_ts_decorate4([
|
|
1204
|
+
Post("schedules/:id/trigger"),
|
|
1205
|
+
_ts_param2(0, Param("id")),
|
|
1206
|
+
_ts_metadata4("design:type", Function),
|
|
1207
|
+
_ts_metadata4("design:paramtypes", [
|
|
1208
|
+
String
|
|
1209
|
+
]),
|
|
1210
|
+
_ts_metadata4("design:returntype", void 0)
|
|
1211
|
+
], DurableApiController.prototype, "triggerSchedule", null);
|
|
1070
1212
|
_ts_decorate4([
|
|
1071
1213
|
Get("topology"),
|
|
1072
1214
|
_ts_metadata4("design:type", Function),
|
|
@@ -1197,6 +1339,13 @@ DurableApiController = _ts_decorate4([
|
|
|
1197
1339
|
typeof FilterRunner === "undefined" ? Object : FilterRunner
|
|
1198
1340
|
])
|
|
1199
1341
|
], DurableApiController);
|
|
1342
|
+
function notFound(error) {
|
|
1343
|
+
if (error instanceof Error && error.name === "ScheduleNotFoundError") {
|
|
1344
|
+
throw new NotFoundException(error.message);
|
|
1345
|
+
}
|
|
1346
|
+
throw error;
|
|
1347
|
+
}
|
|
1348
|
+
__name(notFound, "notFound");
|
|
1200
1349
|
|
|
1201
1350
|
// src/server/durable-auth.controller.ts
|
|
1202
1351
|
import { BadRequestException as BadRequestException2, Body as Body2, Controller as Controller3, Get as Get3, Header as Header3, HttpCode, Inject as Inject4, Logger as Logger2, NotFoundException as NotFoundException3, Optional as Optional3, Post as Post2, Req, Res, UnauthorizedException } from "@nestjs/common";
|
|
@@ -1757,8 +1906,15 @@ import { Controller as Controller2, Get as Get2, Header as Header2, Inject as In
|
|
|
1757
1906
|
import { Catch, HttpException, HttpStatus } from "@nestjs/common";
|
|
1758
1907
|
function _ts_decorate5(decorators, target, key, desc) {
|
|
1759
1908
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1760
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1761
|
-
|
|
1909
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
1910
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
1911
|
+
} else {
|
|
1912
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
1913
|
+
if (d = decorators[i]) {
|
|
1914
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
}
|
|
1762
1918
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1763
1919
|
}
|
|
1764
1920
|
__name(_ts_decorate5, "_ts_decorate");
|
|
@@ -1790,13 +1946,22 @@ DashboardLoginRedirectFilter = _ts_decorate5([
|
|
|
1790
1946
|
import { Catch as Catch2, HttpException as HttpException2, HttpStatus as HttpStatus2, Inject as Inject2, Logger, Optional as Optional2 } from "@nestjs/common";
|
|
1791
1947
|
function _ts_decorate6(decorators, target, key, desc) {
|
|
1792
1948
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1793
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1794
|
-
|
|
1949
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
1950
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
1951
|
+
} else {
|
|
1952
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
1953
|
+
if (d = decorators[i]) {
|
|
1954
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1795
1958
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1796
1959
|
}
|
|
1797
1960
|
__name(_ts_decorate6, "_ts_decorate");
|
|
1798
|
-
function _ts_metadata5(
|
|
1799
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
1961
|
+
function _ts_metadata5(metadataKey, metadataValue) {
|
|
1962
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
1963
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
1964
|
+
}
|
|
1800
1965
|
}
|
|
1801
1966
|
__name(_ts_metadata5, "_ts_metadata");
|
|
1802
1967
|
function _ts_param3(paramIndex, decorator) {
|
|
@@ -1866,13 +2031,22 @@ DashboardSessionRequiredFilter = _ts_decorate6([
|
|
|
1866
2031
|
// src/server/durable-ui.controller.ts
|
|
1867
2032
|
function _ts_decorate7(decorators, target, key, desc) {
|
|
1868
2033
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1869
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1870
|
-
|
|
2034
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
2035
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
2036
|
+
} else {
|
|
2037
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
2038
|
+
if (d = decorators[i]) {
|
|
2039
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
1871
2043
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1872
2044
|
}
|
|
1873
2045
|
__name(_ts_decorate7, "_ts_decorate");
|
|
1874
|
-
function _ts_metadata6(
|
|
1875
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
2046
|
+
function _ts_metadata6(metadataKey, metadataValue) {
|
|
2047
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
2048
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
2049
|
+
}
|
|
1876
2050
|
}
|
|
1877
2051
|
__name(_ts_metadata6, "_ts_metadata");
|
|
1878
2052
|
function _ts_param4(paramIndex, decorator) {
|
|
@@ -1966,13 +2140,22 @@ DurableUiController = _ts_decorate7([
|
|
|
1966
2140
|
// src/server/durable-auth.controller.ts
|
|
1967
2141
|
function _ts_decorate8(decorators, target, key, desc) {
|
|
1968
2142
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1969
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
1970
|
-
|
|
2143
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
2144
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
2145
|
+
} else {
|
|
2146
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
2147
|
+
if (d = decorators[i]) {
|
|
2148
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2149
|
+
}
|
|
2150
|
+
}
|
|
2151
|
+
}
|
|
1971
2152
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1972
2153
|
}
|
|
1973
2154
|
__name(_ts_decorate8, "_ts_decorate");
|
|
1974
|
-
function _ts_metadata7(
|
|
1975
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
2155
|
+
function _ts_metadata7(metadataKey, metadataValue) {
|
|
2156
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
2157
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
2158
|
+
}
|
|
1976
2159
|
}
|
|
1977
2160
|
__name(_ts_metadata7, "_ts_metadata");
|
|
1978
2161
|
function _ts_param5(paramIndex, decorator) {
|
|
@@ -2147,13 +2330,22 @@ import { ModuleRef, RouterModule } from "@nestjs/core";
|
|
|
2147
2330
|
import { Inject as Inject5, Injectable as Injectable4, UnauthorizedException as UnauthorizedException2 } from "@nestjs/common";
|
|
2148
2331
|
function _ts_decorate9(decorators, target, key, desc) {
|
|
2149
2332
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2150
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2151
|
-
|
|
2333
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
2334
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
2335
|
+
} else {
|
|
2336
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
2337
|
+
if (d = decorators[i]) {
|
|
2338
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2339
|
+
}
|
|
2340
|
+
}
|
|
2341
|
+
}
|
|
2152
2342
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2153
2343
|
}
|
|
2154
2344
|
__name(_ts_decorate9, "_ts_decorate");
|
|
2155
|
-
function _ts_metadata8(
|
|
2156
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
2345
|
+
function _ts_metadata8(metadataKey, metadataValue) {
|
|
2346
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
2347
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
2348
|
+
}
|
|
2157
2349
|
}
|
|
2158
2350
|
__name(_ts_metadata8, "_ts_metadata");
|
|
2159
2351
|
function _ts_param6(paramIndex, decorator) {
|
|
@@ -2258,8 +2450,15 @@ DurableApiSessionGuard = _ts_decorate9([
|
|
|
2258
2450
|
// src/server/durable-dashboard.module.ts
|
|
2259
2451
|
function _ts_decorate10(decorators, target, key, desc) {
|
|
2260
2452
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2261
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
2262
|
-
|
|
2453
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
2454
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
2455
|
+
} else {
|
|
2456
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
2457
|
+
if (d = decorators[i]) {
|
|
2458
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2459
|
+
}
|
|
2460
|
+
}
|
|
2461
|
+
}
|
|
2263
2462
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2264
2463
|
}
|
|
2265
2464
|
__name(_ts_decorate10, "_ts_decorate");
|