nvent 0.4.2 → 0.4.3
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/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/useQueues.d.ts +4 -3
- package/dist/runtime/app/composables/useQueues.js +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,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: globalThis.Ref<FlowRun[] | null | undefined>;
|
|
8
14
|
refresh: () => Promise<void>;
|
|
9
|
-
status:
|
|
10
|
-
error:
|
|
15
|
+
status: globalThis.Ref<'idle' | 'pending' | 'success' | 'error'>;
|
|
16
|
+
error: globalThis.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,3 +1,4 @@
|
|
|
1
|
+
import type { FetchError } from 'ofetch';
|
|
1
2
|
export interface QueueCounts {
|
|
2
3
|
active: number;
|
|
3
4
|
completed: number;
|
|
@@ -36,8 +37,8 @@ export interface QueueInfo {
|
|
|
36
37
|
* Client-only to avoid hydration mismatches
|
|
37
38
|
*/
|
|
38
39
|
export declare function useQueues(): {
|
|
39
|
-
queues:
|
|
40
|
+
queues: globalThis.Ref<QueueInfo[] | null | undefined>;
|
|
40
41
|
refresh: () => Promise<void>;
|
|
41
|
-
status:
|
|
42
|
-
error:
|
|
42
|
+
status: globalThis.Ref<'idle' | 'pending' | 'success' | 'error'>;
|
|
43
|
+
error: globalThis.Ref<FetchError | null | undefined>;
|
|
43
44
|
};
|