nvent 0.4.2 → 0.4.4
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/runtime/app/composables/useAnalyzedFlows.js +1 -0
- package/dist/runtime/app/composables/useComponentRouter.js +2 -2
- package/dist/runtime/app/composables/useFlowRunTimeline.d.ts +68 -3
- package/dist/runtime/app/composables/useFlowRunTimeline.js +2 -0
- package/dist/runtime/app/composables/useFlowRuns.d.ts +10 -3
- package/dist/runtime/app/composables/useFlowRuns.js +1 -0
- package/dist/runtime/app/composables/useFlowRunsInfinite.d.ts +1 -1
- package/dist/runtime/app/composables/useFlowRunsPolling.d.ts +3 -2
- package/dist/runtime/app/composables/useFlowRunsPolling.js +17 -10
- package/dist/runtime/app/composables/useFlowState.d.ts +1 -1
- package/dist/runtime/app/composables/useFlowState.js +1 -1
- package/dist/runtime/app/composables/useFlowsNavigation.d.ts +4 -4
- package/dist/runtime/app/composables/useFlowsNavigation.js +1 -0
- package/dist/runtime/app/composables/useQueueJobs.d.ts +7 -1
- package/dist/runtime/app/composables/useQueueJobs.js +1 -1
- package/dist/runtime/app/composables/useQueues.d.ts +5 -3
- package/dist/runtime/app/composables/useQueues.js +1 -1
- package/dist/runtime/app/pages/queues/index.vue +1 -1
- package/dist/runtime/app/pages/queues/job.vue +1 -1
- package/dist/runtime/app/pages/queues/jobs.vue +1 -1
- package/dist/runtime/app/plugins/vueflow.client.js +1 -1
- package/package.json +1 -1
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
shallowRef,
|
|
6
6
|
useRoute,
|
|
7
7
|
useRouter,
|
|
8
|
-
watch
|
|
8
|
+
watch,
|
|
9
|
+
defineAsyncComponent
|
|
9
10
|
} from "#imports";
|
|
10
|
-
import { defineAsyncComponent } from "vue";
|
|
11
11
|
export function useComponentRouter(opts) {
|
|
12
12
|
const CTX_KEY = "component-router";
|
|
13
13
|
if (!opts || !("routes" in opts) || !opts.routes) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
1
2
|
/**
|
|
2
3
|
* Composable for managing a single flow run's timeline and state
|
|
3
4
|
*
|
|
@@ -7,9 +8,73 @@
|
|
|
7
8
|
* - Fresh WebSocket connection on each mount = clean, predictable behavior
|
|
8
9
|
*/
|
|
9
10
|
export declare function useFlowRunTimeline(flowId: Ref<string>, runId: Ref<string>): {
|
|
10
|
-
flowState:
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
flowState: {
|
|
12
|
+
events: Ref<import("~~/.nuxt/imports").EventRecord[], import("~~/.nuxt/imports").EventRecord[]>;
|
|
13
|
+
state: import("vue").ComputedRef<import("~~/.nuxt/imports").FlowState>;
|
|
14
|
+
addEvent: (event: import("~~/.nuxt/imports").EventRecord) => void;
|
|
15
|
+
addEvents: (newEvents: import("~~/.nuxt/imports").EventRecord[]) => void;
|
|
16
|
+
reset: (newEvents?: import("~~/.nuxt/imports").EventRecord[]) => void;
|
|
17
|
+
isRunning: import("vue").ComputedRef<boolean>;
|
|
18
|
+
isCompleted: import("vue").ComputedRef<boolean>;
|
|
19
|
+
isFailed: import("vue").ComputedRef<boolean>;
|
|
20
|
+
stepList: import("vue").ComputedRef<{
|
|
21
|
+
status: "pending" | "running" | "completed" | "failed" | "retrying" | "waiting" | "timeout";
|
|
22
|
+
attempt: number;
|
|
23
|
+
startedAt?: string;
|
|
24
|
+
completedAt?: string;
|
|
25
|
+
error?: string;
|
|
26
|
+
awaitType?: "time" | "event" | "trigger";
|
|
27
|
+
awaitData?: any;
|
|
28
|
+
result?: any;
|
|
29
|
+
key: string;
|
|
30
|
+
}[]>;
|
|
31
|
+
runningSteps: import("vue").ComputedRef<{
|
|
32
|
+
status: "pending" | "running" | "completed" | "failed" | "retrying" | "waiting" | "timeout";
|
|
33
|
+
attempt: number;
|
|
34
|
+
startedAt?: string;
|
|
35
|
+
completedAt?: string;
|
|
36
|
+
error?: string;
|
|
37
|
+
awaitType?: "time" | "event" | "trigger";
|
|
38
|
+
awaitData?: any;
|
|
39
|
+
result?: any;
|
|
40
|
+
key: string;
|
|
41
|
+
}[]>;
|
|
42
|
+
waitingSteps: import("vue").ComputedRef<{
|
|
43
|
+
status: "pending" | "running" | "completed" | "failed" | "retrying" | "waiting" | "timeout";
|
|
44
|
+
attempt: number;
|
|
45
|
+
startedAt?: string;
|
|
46
|
+
completedAt?: string;
|
|
47
|
+
error?: string;
|
|
48
|
+
awaitType?: "time" | "event" | "trigger";
|
|
49
|
+
awaitData?: any;
|
|
50
|
+
result?: any;
|
|
51
|
+
key: string;
|
|
52
|
+
}[]>;
|
|
53
|
+
failedSteps: import("vue").ComputedRef<{
|
|
54
|
+
status: "pending" | "running" | "completed" | "failed" | "retrying" | "waiting" | "timeout";
|
|
55
|
+
attempt: number;
|
|
56
|
+
startedAt?: string;
|
|
57
|
+
completedAt?: string;
|
|
58
|
+
error?: string;
|
|
59
|
+
awaitType?: "time" | "event" | "trigger";
|
|
60
|
+
awaitData?: any;
|
|
61
|
+
result?: any;
|
|
62
|
+
key: string;
|
|
63
|
+
}[]>;
|
|
64
|
+
completedSteps: import("vue").ComputedRef<{
|
|
65
|
+
status: "pending" | "running" | "completed" | "failed" | "retrying" | "waiting" | "timeout";
|
|
66
|
+
attempt: number;
|
|
67
|
+
startedAt?: string;
|
|
68
|
+
completedAt?: string;
|
|
69
|
+
error?: string;
|
|
70
|
+
awaitType?: "time" | "event" | "trigger";
|
|
71
|
+
awaitData?: any;
|
|
72
|
+
result?: any;
|
|
73
|
+
key: string;
|
|
74
|
+
}[]>;
|
|
75
|
+
};
|
|
76
|
+
isConnected: import("vue").ComputedRef<boolean>;
|
|
77
|
+
isReconnecting: import("vue").ComputedRef<boolean>;
|
|
13
78
|
loadRun: () => Promise<void>;
|
|
14
79
|
stopStream: () => void;
|
|
15
80
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { useFlowWebSocket } from "./useFlowWebSocket.js";
|
|
2
|
+
import { useFlowState } from "./useFlowState.js";
|
|
3
|
+
import { computed, nextTick, onBeforeUnmount, watch } from "vue";
|
|
2
4
|
export function useFlowRunTimeline(flowId, runId) {
|
|
3
5
|
const flowState = useFlowState();
|
|
4
6
|
const flowWs = useFlowWebSocket();
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
+
import { type Ref } from '#imports';
|
|
2
|
+
import type { FetchError } from 'ofetch';
|
|
3
|
+
interface FlowRun {
|
|
4
|
+
id: string;
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}
|
|
1
7
|
/**
|
|
2
8
|
* Composable for fetching and managing flow runs
|
|
3
9
|
* Simple approach: Fresh fetch on every refresh, no stale cache
|
|
4
10
|
* Client-only to avoid hydration mismatches
|
|
5
11
|
*/
|
|
6
12
|
export declare function useFlowRuns(flowId: Ref<string>): {
|
|
7
|
-
runs:
|
|
13
|
+
runs: Ref<FlowRun[] | null | undefined>;
|
|
8
14
|
refresh: () => Promise<void>;
|
|
9
|
-
status:
|
|
10
|
-
error:
|
|
15
|
+
status: Ref<'idle' | 'pending' | 'success' | 'error'>;
|
|
16
|
+
error: Ref<FetchError | null | undefined>;
|
|
11
17
|
};
|
|
18
|
+
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { type Ref } from '#imports';
|
|
1
2
|
/**
|
|
2
3
|
* Composable for auto-polling flow runs list
|
|
3
4
|
* Polls continuously to keep the list fresh
|
|
4
5
|
*/
|
|
5
6
|
export declare function useFlowRunsPolling(refresh: () => Promise<void>, shouldPoll: Ref<boolean>, intervalMs?: number): {
|
|
6
|
-
pause:
|
|
7
|
-
resume:
|
|
7
|
+
pause: () => void;
|
|
8
|
+
resume: () => void;
|
|
8
9
|
};
|
|
@@ -1,14 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { watch, onBeforeUnmount } from "#imports";
|
|
2
2
|
export function useFlowRunsPolling(refresh, shouldPoll, intervalMs = 3e3) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
let intervalId = null;
|
|
4
|
+
const pause = () => {
|
|
5
|
+
if (intervalId) {
|
|
6
|
+
clearInterval(intervalId);
|
|
7
|
+
intervalId = null;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
const resume = () => {
|
|
11
|
+
if (!intervalId) {
|
|
12
|
+
intervalId = setInterval(async () => {
|
|
13
|
+
if (shouldPoll.value) {
|
|
14
|
+
await refresh();
|
|
15
|
+
}
|
|
16
|
+
}, intervalMs);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
12
19
|
watch(shouldPoll, (should) => {
|
|
13
20
|
if (should) {
|
|
14
21
|
resume();
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Uses URL query params for persistence across HMR
|
|
4
4
|
*/
|
|
5
5
|
export declare function useFlowsNavigation(): {
|
|
6
|
-
selectedFlow:
|
|
7
|
-
selectedRunId:
|
|
8
|
-
timelineOpen:
|
|
9
|
-
selectedTab:
|
|
6
|
+
selectedFlow: import("vue").WritableComputedRef<string, string>;
|
|
7
|
+
selectedRunId: import("vue").WritableComputedRef<string, string>;
|
|
8
|
+
timelineOpen: import("vue").Ref<boolean, boolean>;
|
|
9
|
+
selectedTab: import("vue").WritableComputedRef<string, string>;
|
|
10
10
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type Ref } from '#imports';
|
|
2
|
+
import type { FetchError } from 'ofetch';
|
|
2
3
|
export interface Job {
|
|
3
4
|
id: string;
|
|
4
5
|
name: string;
|
|
@@ -17,4 +18,9 @@ export interface JobsResponse {
|
|
|
17
18
|
* Composable for fetching jobs for a queue
|
|
18
19
|
* Client-only to avoid hydration mismatches
|
|
19
20
|
*/
|
|
20
|
-
export declare function useQueueJobs(queueName: Ref<string>, state?: Ref<string | null>):
|
|
21
|
+
export declare function useQueueJobs(queueName: Ref<string>, state?: Ref<string | null>): {
|
|
22
|
+
data: Ref<JobsResponse | null | undefined>;
|
|
23
|
+
refresh: () => Promise<void>;
|
|
24
|
+
status: Ref<'idle' | 'pending' | 'success' | 'error'>;
|
|
25
|
+
error: Ref<FetchError | null | undefined>;
|
|
26
|
+
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type Ref } from '#imports';
|
|
2
|
+
import type { FetchError } from 'ofetch';
|
|
1
3
|
export interface QueueCounts {
|
|
2
4
|
active: number;
|
|
3
5
|
completed: number;
|
|
@@ -36,8 +38,8 @@ export interface QueueInfo {
|
|
|
36
38
|
* Client-only to avoid hydration mismatches
|
|
37
39
|
*/
|
|
38
40
|
export declare function useQueues(): {
|
|
39
|
-
queues:
|
|
41
|
+
queues: Ref<QueueInfo[] | null | undefined>;
|
|
40
42
|
refresh: () => Promise<void>;
|
|
41
|
-
status:
|
|
42
|
-
error:
|
|
43
|
+
status: Ref<'idle' | 'pending' | 'success' | 'error'>;
|
|
44
|
+
error: Ref<FetchError | null | undefined>;
|
|
43
45
|
};
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
</template>
|
|
98
98
|
|
|
99
99
|
<script setup>
|
|
100
|
-
import { ref } from "#imports";
|
|
100
|
+
import { ref, useTemplateRef, h } from "#imports";
|
|
101
101
|
import { getPaginationRowModel } from "@tanstack/table-core";
|
|
102
102
|
import { UTable, UButton, UPagination } from "#components";
|
|
103
103
|
import { useQueues } from "../../composables/useQueues";
|
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
</template>
|
|
205
205
|
|
|
206
206
|
<script setup>
|
|
207
|
-
import { computed } from "#imports";
|
|
207
|
+
import { computed, useFetch } from "#imports";
|
|
208
208
|
import { UCard, UButton, UBadge } from "#components";
|
|
209
209
|
import { useComponentRouter } from "../../composables/useComponentRouter";
|
|
210
210
|
const router = useComponentRouter();
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
</template>
|
|
154
154
|
|
|
155
155
|
<script setup>
|
|
156
|
-
import { ref, computed, watch } from "#imports";
|
|
156
|
+
import { ref, computed, watch, resolveComponent, useTemplateRef, h } from "#imports";
|
|
157
157
|
import { getPaginationRowModel } from "@tanstack/table-core";
|
|
158
158
|
import { UTable, UButton, UBadge, UPagination, USelectMenu } from "#components";
|
|
159
159
|
import { useQueueJobs } from "../../composables/useQueueJobs";
|