@dudousxd/nestjs-durable-telescope 0.2.0 → 0.4.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/durable-dashboard.spec-data.d.ts +4 -1
- package/dist/durable-dashboard.spec-data.d.ts.map +1 -1
- package/dist/durable-dashboard.spec-data.js +68 -10
- package/dist/durable-dashboard.spec-data.js.map +1 -1
- package/dist/durable-data-providers.d.ts +14 -1
- package/dist/durable-data-providers.d.ts.map +1 -1
- package/dist/durable-data-providers.js +50 -3
- package/dist/durable-data-providers.js.map +1 -1
- package/dist/durable-telescope.extension.d.ts +1 -0
- package/dist/durable-telescope.extension.d.ts.map +1 -1
- package/dist/durable-telescope.extension.js +3 -2
- package/dist/durable-telescope.extension.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { DashboardSpec } from '@dudousxd/nestjs-telescope';
|
|
2
2
|
/**
|
|
3
3
|
* The "Workflows" health dashboard. `runHref` is a URL template for deep-linking a run
|
|
4
|
-
* out to the durable dashboard (e.g. '/durable/runs/{runId}').
|
|
4
|
+
* out to the durable dashboard (e.g. '/durable/runs/{runId}'). `recentFailuresWindowMs`
|
|
5
|
+
* bounds the "Recent failed runs" table (default 24h) so a healthy system shows an empty
|
|
6
|
+
* table instead of days-old failures; pass `0` to show all.
|
|
5
7
|
*/
|
|
6
8
|
export declare function durableDashboard(opts?: {
|
|
7
9
|
runHref?: string;
|
|
10
|
+
recentFailuresWindowMs?: number;
|
|
8
11
|
}): DashboardSpec;
|
|
9
12
|
//# sourceMappingURL=durable-dashboard.spec-data.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"durable-dashboard.spec-data.d.ts","sourceRoot":"","sources":["../src/durable-dashboard.spec-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEhE
|
|
1
|
+
{"version":3,"file":"durable-dashboard.spec-data.d.ts","sourceRoot":"","sources":["../src/durable-dashboard.spec-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEhE;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,sBAAsB,CAAC,EAAE,MAAM,CAAA;CAAO,GAC/D,aAAa,CA6Ef"}
|
|
@@ -3,27 +3,85 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.durableDashboard = durableDashboard;
|
|
4
4
|
/**
|
|
5
5
|
* The "Workflows" health dashboard. `runHref` is a URL template for deep-linking a run
|
|
6
|
-
* out to the durable dashboard (e.g. '/durable/runs/{runId}').
|
|
6
|
+
* out to the durable dashboard (e.g. '/durable/runs/{runId}'). `recentFailuresWindowMs`
|
|
7
|
+
* bounds the "Recent failed runs" table (default 24h) so a healthy system shows an empty
|
|
8
|
+
* table instead of days-old failures; pass `0` to show all.
|
|
7
9
|
*/
|
|
8
10
|
function durableDashboard(opts = {}) {
|
|
9
11
|
const runHref = opts.runHref ?? '/durable/runs/{runId}';
|
|
12
|
+
const windowMs = opts.recentFailuresWindowMs ?? 24 * 60 * 60 * 1000;
|
|
10
13
|
return {
|
|
11
14
|
id: 'durable.workflows',
|
|
12
15
|
label: 'Workflows',
|
|
13
16
|
panels: [
|
|
14
|
-
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
{
|
|
17
|
+
{
|
|
18
|
+
kind: 'stat',
|
|
19
|
+
title: 'Success rate',
|
|
20
|
+
data: { provider: 'durable.timeseries', query: { metric: 'successRate' } },
|
|
21
|
+
format: 'percent',
|
|
22
|
+
accent: 'text-emerald-400',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
kind: 'stat',
|
|
26
|
+
title: 'Failed (window)',
|
|
27
|
+
data: { provider: 'durable.timeseries', query: { metric: 'failed' } },
|
|
28
|
+
accent: 'text-red-400',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
kind: 'stat',
|
|
32
|
+
title: 'Dead now',
|
|
33
|
+
data: { provider: 'durable.state', query: { status: 'dead' } },
|
|
34
|
+
accent: 'text-red-400',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
kind: 'stat',
|
|
38
|
+
title: 'Suspended now',
|
|
39
|
+
data: { provider: 'durable.state', query: { status: 'suspended' } },
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
kind: 'stat',
|
|
43
|
+
title: 'Running now',
|
|
44
|
+
data: { provider: 'durable.state', query: { status: 'running' } },
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
kind: 'stat',
|
|
48
|
+
title: 'Pending now',
|
|
49
|
+
data: { provider: 'durable.state', query: { status: 'pending' } },
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
kind: 'stat',
|
|
53
|
+
title: 'Starved groups',
|
|
54
|
+
data: { provider: 'durable.workerHealth', query: { metric: 'starvedCount' } },
|
|
55
|
+
accent: 'text-red-400',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
kind: 'topN',
|
|
59
|
+
title: 'Top failing workflows',
|
|
60
|
+
data: { provider: 'durable.timeseries', query: { metric: 'topFailures' } },
|
|
61
|
+
limit: 10,
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
kind: 'table',
|
|
65
|
+
title: 'Worker groups (backlog vs. live workers)',
|
|
66
|
+
data: { provider: 'durable.workerHealth', query: {} },
|
|
22
67
|
columns: [
|
|
68
|
+
{ key: 'group', label: 'Group' },
|
|
69
|
+
{ key: 'queued', label: 'Queued' },
|
|
70
|
+
{ key: 'liveWorkers', label: 'Live workers' },
|
|
71
|
+
{ key: 'status', label: 'Status' },
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
kind: 'table',
|
|
76
|
+
title: 'Recent failed runs (last 24h)',
|
|
77
|
+
data: { provider: 'durable.recentFailures', query: { windowMs } },
|
|
78
|
+
columns: [
|
|
79
|
+
{ key: 'updatedAt', label: 'Updated' },
|
|
23
80
|
{ key: 'workflow', label: 'Workflow' },
|
|
24
81
|
{ key: 'runId', label: 'Run', link: { href: runHref } },
|
|
25
82
|
{ key: 'error', label: 'Error' },
|
|
26
|
-
]
|
|
83
|
+
],
|
|
84
|
+
},
|
|
27
85
|
],
|
|
28
86
|
};
|
|
29
87
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"durable-dashboard.spec-data.js","sourceRoot":"","sources":["../src/durable-dashboard.spec-data.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"durable-dashboard.spec-data.js","sourceRoot":"","sources":["../src/durable-dashboard.spec-data.ts"],"names":[],"mappings":";;AAQA,4CA+EC;AArFD;;;;;GAKG;AACH,SAAgB,gBAAgB,CAC9B,OAA8D,EAAE;IAEhE,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;YACN;gBACE,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,cAAc;gBACrB,IAAI,EAAE,EAAE,QAAQ,EAAE,oBAAoB,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,EAAE;gBAC1E,MAAM,EAAE,SAAS;gBACjB,MAAM,EAAE,kBAAkB;aAC3B;YACD;gBACE,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,iBAAiB;gBACxB,IAAI,EAAE,EAAE,QAAQ,EAAE,oBAAoB,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ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EAAE;oBACP,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;oBAChC,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;oBAClC,EAAE,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,cAAc,EAAE;oBAC7C,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;iBACnC;aACF;YACD;gBACE,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,+BAA+B;gBACtC,IAAI,EAAE,EAAE,QAAQ,EAAE,wBAAwB,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE;gBACjE,OAAO,EAAE;oBACP,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE;oBACtC,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;oBACtC,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;oBACvD,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;iBACjC;aACF;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -7,6 +7,19 @@ export declare function durableStateProvider(): DataProvider;
|
|
|
7
7
|
* window (by design — this is the "history" series, not the source of truth).
|
|
8
8
|
*/
|
|
9
9
|
export declare function durableTimeseriesProvider(): DataProvider;
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Source C: recent failed + dead runs as table rows (newest first), time-bounded.
|
|
12
|
+
* Only failures updated within `query.windowMs` (default 24h) are returned, so a
|
|
13
|
+
* healthy system shows an EMPTY table instead of surfacing days-old failures as if
|
|
14
|
+
* they were a live incident. `windowMs: 0` disables the window (return all). Each
|
|
15
|
+
* row carries a compact `updatedAt` stamp so recency is visible in the table.
|
|
16
|
+
*/
|
|
11
17
|
export declare function durableRecentFailuresProvider(): DataProvider;
|
|
18
|
+
/**
|
|
19
|
+
* Source D: per-group worker health from the engine (`WorkflowEngine.workerHealth()` — queue depth
|
|
20
|
+
* vs. live worker heartbeats). `query.metric: 'starvedCount'` returns the number of groups with work
|
|
21
|
+
* queued and zero live workers (the "alive but not consuming" alert state) as a stat; otherwise a
|
|
22
|
+
* table, starved groups sorted first. Empty when the transport can't report health (in-process).
|
|
23
|
+
*/
|
|
24
|
+
export declare function durableWorkerHealthProvider(): DataProvider;
|
|
12
25
|
//# sourceMappingURL=durable-data-providers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"durable-data-providers.d.ts","sourceRoot":"","sources":["../src/durable-data-providers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"durable-data-providers.d.ts","sourceRoot":"","sources":["../src/durable-data-providers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,4BAA4B,CAAC;AAKjF,yGAAyG;AACzG,wBAAgB,oBAAoB,IAAI,YAAY,CAUnD;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,IAAI,YAAY,CAuCxD;AAED;;;;;;GAMG;AACH,wBAAgB,6BAA6B,IAAI,YAAY,CA2B5D;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,IAAI,YAAY,CAwB1D"}
|
|
@@ -3,8 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.durableStateProvider = durableStateProvider;
|
|
4
4
|
exports.durableTimeseriesProvider = durableTimeseriesProvider;
|
|
5
5
|
exports.durableRecentFailuresProvider = durableRecentFailuresProvider;
|
|
6
|
-
|
|
6
|
+
exports.durableWorkerHealthProvider = durableWorkerHealthProvider;
|
|
7
7
|
const nestjs_durable_core_1 = require("@dudousxd/nestjs-durable-core");
|
|
8
|
+
const nestjs_telescope_1 = require("@dudousxd/nestjs-telescope");
|
|
8
9
|
const STATE_CAP = 10_000;
|
|
9
10
|
/** Source C: current-state gauge from the durable store. query.status selects which (default 'dead'). */
|
|
10
11
|
function durableStateProvider() {
|
|
@@ -62,21 +63,67 @@ function durableTimeseriesProvider() {
|
|
|
62
63
|
},
|
|
63
64
|
};
|
|
64
65
|
}
|
|
65
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* Source C: recent failed + dead runs as table rows (newest first), time-bounded.
|
|
68
|
+
* Only failures updated within `query.windowMs` (default 24h) are returned, so a
|
|
69
|
+
* healthy system shows an EMPTY table instead of surfacing days-old failures as if
|
|
70
|
+
* they were a live incident. `windowMs: 0` disables the window (return all). Each
|
|
71
|
+
* row carries a compact `updatedAt` stamp so recency is visible in the table.
|
|
72
|
+
*/
|
|
66
73
|
function durableRecentFailuresProvider() {
|
|
67
74
|
return {
|
|
68
75
|
name: 'durable.recentFailures',
|
|
69
76
|
async resolve(query, ctx) {
|
|
70
77
|
const store = ctx.moduleRef.get(nestjs_durable_core_1.STATE_STORE, { strict: false });
|
|
71
78
|
const limit = Math.min(200, Math.max(10, Number(query?.limit ?? 50)));
|
|
79
|
+
const windowMs = query?.windowMs === undefined ? 24 * 60 * 60 * 1000 : Number(query.windowMs);
|
|
80
|
+
const cutoff = windowMs > 0 ? Date.now() - windowMs : 0;
|
|
72
81
|
const [failed, dead] = await Promise.all([
|
|
73
82
|
store.listRuns({ status: 'failed', limit }),
|
|
74
83
|
store.listRuns({ status: 'dead', limit }),
|
|
75
84
|
]);
|
|
76
85
|
const rows = [...failed, ...dead]
|
|
86
|
+
.filter((r) => +new Date(r.updatedAt) >= cutoff)
|
|
77
87
|
.sort((a, b) => +new Date(b.updatedAt) - +new Date(a.updatedAt))
|
|
78
88
|
.slice(0, limit)
|
|
79
|
-
.map((r) => ({
|
|
89
|
+
.map((r) => ({
|
|
90
|
+
// Compact UTC stamp ("YYYY-MM-DD HH:mm Z"); the generic table renderer
|
|
91
|
+
// prints column values as-is, so we format here.
|
|
92
|
+
updatedAt: `${new Date(r.updatedAt).toISOString().replace('T', ' ').slice(0, 16)}Z`,
|
|
93
|
+
workflow: r.workflow,
|
|
94
|
+
runId: r.id,
|
|
95
|
+
error: r.error?.message ?? '',
|
|
96
|
+
}));
|
|
97
|
+
return { rows };
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Source D: per-group worker health from the engine (`WorkflowEngine.workerHealth()` — queue depth
|
|
103
|
+
* vs. live worker heartbeats). `query.metric: 'starvedCount'` returns the number of groups with work
|
|
104
|
+
* queued and zero live workers (the "alive but not consuming" alert state) as a stat; otherwise a
|
|
105
|
+
* table, starved groups sorted first. Empty when the transport can't report health (in-process).
|
|
106
|
+
*/
|
|
107
|
+
function durableWorkerHealthProvider() {
|
|
108
|
+
return {
|
|
109
|
+
name: 'durable.workerHealth',
|
|
110
|
+
async resolve(query, ctx) {
|
|
111
|
+
const engine = ctx.moduleRef.get(nestjs_durable_core_1.WorkflowEngine, { strict: false });
|
|
112
|
+
const health = await engine.workerHealth();
|
|
113
|
+
const isStarved = (g) => g.depth > 0 && g.liveWorkers.length === 0;
|
|
114
|
+
if (query?.metric === 'starvedCount') {
|
|
115
|
+
return { value: health.filter(isStarved).length };
|
|
116
|
+
}
|
|
117
|
+
const rows = health
|
|
118
|
+
.slice()
|
|
119
|
+
// Starved groups first, then deepest backlog — the rows that need attention rise to the top.
|
|
120
|
+
.sort((a, b) => Number(isStarved(b)) - Number(isStarved(a)) || b.depth - a.depth)
|
|
121
|
+
.map((g) => ({
|
|
122
|
+
group: g.group,
|
|
123
|
+
queued: g.depth,
|
|
124
|
+
liveWorkers: g.liveWorkers.length,
|
|
125
|
+
status: isStarved(g) ? 'STARVED' : 'ok',
|
|
126
|
+
}));
|
|
80
127
|
return { rows };
|
|
81
128
|
},
|
|
82
129
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"durable-data-providers.js","sourceRoot":"","sources":["../src/durable-data-providers.ts"],"names":[],"mappings":";;AAQA,oDAUC;AAOD,
|
|
1
|
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YAC3C,MAAM,SAAS,GAAG,CAAC,CAA4C,EAAE,EAAE,CACjE,CAAC,CAAC,KAAK,GAAG,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC;YAC5C,IAAK,KAAK,EAAE,MAAiB,KAAK,cAAc,EAAE,CAAC;gBACjD,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,CAAC;YACpD,CAAC;YACD,MAAM,IAAI,GAAG,MAAM;iBAChB,KAAK,EAAE;gBACR,6FAA6F;iBAC5F,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;iBAChF,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBACX,KAAK,EAAE,CAAC,CAAC,KAAK;gBACd,MAAM,EAAE,CAAC,CAAC,KAAK;gBACf,WAAW,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM;gBACjC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI;aACxC,CAAC,CAAC,CAAC;YACN,OAAO,EAAE,IAAI,EAAE,CAAC;QAClB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** The first-class Telescope extension for nestjs-durable: watcher + Workflows dashboard. */
|
|
2
2
|
export declare function durableTelescopeExtension(opts?: {
|
|
3
3
|
runHref?: string;
|
|
4
|
+
recentFailuresWindowMs?: number;
|
|
4
5
|
}): import("@dudousxd/nestjs-telescope").TelescopeExtension;
|
|
5
6
|
//# sourceMappingURL=durable-telescope.extension.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"durable-telescope.extension.d.ts","sourceRoot":"","sources":["../src/durable-telescope.extension.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"durable-telescope.extension.d.ts","sourceRoot":"","sources":["../src/durable-telescope.extension.ts"],"names":[],"mappings":"AAUA,6FAA6F;AAC7F,wBAAgB,yBAAyB,CACvC,IAAI,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,sBAAsB,CAAC,EAAE,MAAM,CAAA;CAAO,2DAcjE"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.durableTelescopeExtension = durableTelescopeExtension;
|
|
4
4
|
const nestjs_telescope_1 = require("@dudousxd/nestjs-telescope");
|
|
5
|
-
const durable_telescope_watcher_1 = require("./durable-telescope.watcher");
|
|
6
|
-
const durable_data_providers_1 = require("./durable-data-providers");
|
|
7
5
|
const durable_dashboard_spec_data_1 = require("./durable-dashboard.spec-data");
|
|
6
|
+
const durable_data_providers_1 = require("./durable-data-providers");
|
|
7
|
+
const durable_telescope_watcher_1 = require("./durable-telescope.watcher");
|
|
8
8
|
/** The first-class Telescope extension for nestjs-durable: watcher + Workflows dashboard. */
|
|
9
9
|
function durableTelescopeExtension(opts = {}) {
|
|
10
10
|
return (0, nestjs_telescope_1.defineTelescopeExtension)({
|
|
@@ -16,6 +16,7 @@ function durableTelescopeExtension(opts = {}) {
|
|
|
16
16
|
(0, durable_data_providers_1.durableStateProvider)(),
|
|
17
17
|
(0, durable_data_providers_1.durableTimeseriesProvider)(),
|
|
18
18
|
(0, durable_data_providers_1.durableRecentFailuresProvider)(),
|
|
19
|
+
(0, durable_data_providers_1.durableWorkerHealthProvider)(),
|
|
19
20
|
],
|
|
20
21
|
});
|
|
21
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"durable-telescope.extension.js","sourceRoot":"","sources":["../src/durable-telescope.extension.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"durable-telescope.extension.js","sourceRoot":"","sources":["../src/durable-telescope.extension.ts"],"names":[],"mappings":";;AAWA,8DAeC;AA1BD,iEAAsE;AACtE,+EAAiE;AACjE,qEAKkC;AAClC,2EAAsE;AAEtE,6FAA6F;AAC7F,SAAgB,yBAAyB,CACvC,OAA8D,EAAE;IAEhE,OAAO,IAAA,2CAAwB,EAAC;QAC9B,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,mDAAuB,EAAE,CAAC;QAC/C,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,cAAc,EAAE,CAAC;QAC9E,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC,IAAA,8CAAgB,EAAC,IAAI,CAAC,CAAC;QAC1C,aAAa,EAAE,GAAG,EAAE,CAAC;YACnB,IAAA,6CAAoB,GAAE;YACtB,IAAA,kDAAyB,GAAE;YAC3B,IAAA,sDAA6B,GAAE;YAC/B,IAAA,oDAA2B,GAAE;SAC9B;KACF,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dudousxd/nestjs-durable-telescope",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Telescope watcher for nestjs-durable — workflow runs and steps as Telescope entries",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Davide Carvalho",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@nestjs/core": "11.1.26",
|
|
27
27
|
"@opentelemetry/api": "1.9.0",
|
|
28
28
|
"typescript": "5.9.3",
|
|
29
|
-
"@dudousxd/nestjs-durable-core": "^0.
|
|
29
|
+
"@dudousxd/nestjs-durable-core": "^0.23.0"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build": "tsc -p tsconfig.json",
|