nvent 0.4.3 → 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.
@@ -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: any;
11
- isConnected: any;
12
- isReconnecting: any;
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();
@@ -10,9 +10,9 @@ interface FlowRun {
10
10
  * Client-only to avoid hydration mismatches
11
11
  */
12
12
  export declare function useFlowRuns(flowId: Ref<string>): {
13
- runs: globalThis.Ref<FlowRun[] | null | undefined>;
13
+ runs: Ref<FlowRun[] | null | undefined>;
14
14
  refresh: () => Promise<void>;
15
- status: globalThis.Ref<'idle' | 'pending' | 'success' | 'error'>;
16
- error: globalThis.Ref<FetchError | null | undefined>;
15
+ status: Ref<'idle' | 'pending' | 'success' | 'error'>;
16
+ error: Ref<FetchError | null | undefined>;
17
17
  };
18
18
  export {};
@@ -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>): any;
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,4 +1,4 @@
1
- import { ref } from "#imports";
1
+ import { ref, useFetch } from "#imports";
2
2
  export function useQueueJobs(queueName, state = ref(null)) {
3
3
  return useFetch(
4
4
  () => {
@@ -1,3 +1,4 @@
1
+ import { type Ref } from '#imports';
1
2
  import type { FetchError } from 'ofetch';
2
3
  export interface QueueCounts {
3
4
  active: number;
@@ -37,8 +38,8 @@ export interface QueueInfo {
37
38
  * Client-only to avoid hydration mismatches
38
39
  */
39
40
  export declare function useQueues(): {
40
- queues: globalThis.Ref<QueueInfo[] | null | undefined>;
41
+ queues: Ref<QueueInfo[] | null | undefined>;
41
42
  refresh: () => Promise<void>;
42
- status: globalThis.Ref<'idle' | 'pending' | 'success' | 'error'>;
43
- error: globalThis.Ref<FetchError | null | undefined>;
43
+ status: Ref<'idle' | 'pending' | 'success' | 'error'>;
44
+ error: Ref<FetchError | null | undefined>;
44
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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nvent",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "Nuxt queue service based on Bullmq",
5
5
  "repository": "DevJoghurt/nuxt-queue",
6
6
  "license": "MIT",