@jr200-labs/xstate-nats 0.9.17 → 0.9.19
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/README.md +1 -3
- package/dist/actions/connection.d.ts.map +1 -1
- package/dist/actions/subject.d.ts.map +1 -1
- package/dist/machines/kv.d.ts +17 -17
- package/dist/machines/root.d.ts +157 -157
- package/dist/machines/subject.d.ts +13 -13
- package/dist/utils.d.ts.map +1 -1
- package/package.json +14 -16
package/README.md
CHANGED
|
@@ -277,9 +277,7 @@ import { W3CTraceContextPropagator } from '@opentelemetry/core'
|
|
|
277
277
|
import { BasicTracerProvider, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base'
|
|
278
278
|
|
|
279
279
|
const provider = new BasicTracerProvider({
|
|
280
|
-
spanProcessors: [
|
|
281
|
-
/* your exporter */
|
|
282
|
-
],
|
|
280
|
+
spanProcessors: [/* your exporter */],
|
|
283
281
|
})
|
|
284
282
|
trace.setGlobalTracerProvider(provider)
|
|
285
283
|
propagation.setGlobalPropagator(new W3CTraceContextPropagator())
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../src/actions/connection.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EAEjB,GAAG,EACH,cAAc,EACd,MAAM,EAEP,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AA8BzC,MAAM,MAAM,oBAAoB,GAC5B;IAAE,IAAI,EAAE,8BAA8B,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACxD;IAAE,IAAI,EAAE,2BAA2B,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,uBAAuB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACjD;IAAE,IAAI,EAAE,uBAAuB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACjD;IAAE,IAAI,EAAE,8BAA8B,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAE5D,eAAO,MAAM,aAAa;UAIP,iBAAiB;WAAS,UAAU;gCAoFtD,CAAA;AAED,eAAO,MAAM,cAAc;gBACgB,cAAc,GAAG,IAAI;gCAM/D,CAAA;AAED,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../src/actions/connection.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EAEjB,GAAG,EACH,cAAc,EACd,MAAM,EAEP,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AA8BzC,MAAM,MAAM,oBAAoB,GAC5B;IAAE,IAAI,EAAE,8BAA8B,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACxD;IAAE,IAAI,EAAE,2BAA2B,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,uBAAuB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACjD;IAAE,IAAI,EAAE,uBAAuB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACjD;IAAE,IAAI,EAAE,8BAA8B,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAE5D,eAAO,MAAM,aAAa;UAIP,iBAAiB;WAAS,UAAU;gCAoFtD,CAAA;AAED,eAAO,MAAM,cAAc;gBACgB,cAAc,GAAG,IAAI;gCAM/D,CAAA;AAED,eAAO,MAAM,eAAe,QAAS,GAAG,GAAG,OAAO,GAAG,IAAI,GAAG,KAAK,YAiBhE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subject.d.ts","sourceRoot":"","sources":["../../src/actions/subject.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,EACZ,mBAAmB,EACpB,MAAM,oBAAoB,CAAA;AAU3B,MAAM,MAAM,yBAAyB,GAAG;IACtC,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAA;IAC7B,IAAI,CAAC,EAAE,mBAAmB,CAAA;IAC1B,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAC1C,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAAA;AAEtE,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"subject.d.ts","sourceRoot":"","sources":["../../src/actions/subject.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,EACZ,mBAAmB,EACpB,MAAM,oBAAoB,CAAA;AAU3B,MAAM,MAAM,yBAAyB,GAAG;IACtC,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAA;IAC7B,IAAI,CAAC,EAAE,mBAAmB,CAAA;IAC1B,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAC1C,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAAA;AAEtE,eAAO,MAAM,uBAAuB,eAEjC;IACD,KAAK,EAAE;QACL,UAAU,EAAE,cAAc,GAAG,IAAI,CAAA;QACjC,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;QAC/C,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAA;KAC5D,CAAA;CACF;IA2EG,aAAa;CAEhB,CAAA;AAED,eAAO,MAAM,cAAc,eAExB;IACD,KAAK,EAAE;QACL,UAAU,EAAE,cAAc,GAAG,IAAI,CAAA;QACjC,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,EAAE,GAAG,CAAA;QACZ,IAAI,CAAC,EAAE,cAAc,CAAA;QACrB,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAA;QAC7B,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAA;QACjD,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;KAC1C,CAAA;CACF,SA6CA,CAAA;AAED,eAAO,MAAM,cAAc,eAExB;IACD,KAAK,EAAE;QACL,UAAU,EAAE,cAAc,GAAG,IAAI,CAAA;QACjC,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,EAAE,GAAG,CAAA;QACZ,OAAO,CAAC,EAAE,cAAc,CAAA;QACxB,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE;YAAE,EAAE,EAAE,IAAI,CAAA;SAAE,GAAG;YAAE,EAAE,EAAE,KAAK,CAAC;YAAC,KAAK,EAAE,KAAK,CAAA;SAAE,KAAK,IAAI,CAAA;KAC/E,CAAA;CACF,SA0BA,CAAA"}
|
package/dist/machines/kv.d.ts
CHANGED
|
@@ -88,32 +88,32 @@ export interface Context {
|
|
|
88
88
|
error?: Error;
|
|
89
89
|
}
|
|
90
90
|
export declare const kvManagerLogic: import("xstate").StateMachine<Context, NatsTrafficRecordEvent | {
|
|
91
|
-
type:
|
|
91
|
+
type: 'METRICS.RESET_UPLOAD';
|
|
92
92
|
source?: import("..").NatsTrafficMetricSource;
|
|
93
93
|
} | {
|
|
94
|
-
type:
|
|
94
|
+
type: 'METRICS.RESET_DOWNLOAD';
|
|
95
95
|
source?: import("..").NatsTrafficMetricSource;
|
|
96
96
|
} | {
|
|
97
|
-
type:
|
|
97
|
+
type: 'METRICS.RESET_ALL';
|
|
98
98
|
source?: import("..").NatsTrafficMetricSource;
|
|
99
99
|
} | {
|
|
100
|
-
type:
|
|
100
|
+
type: 'ERROR';
|
|
101
101
|
error: Error;
|
|
102
102
|
} | {
|
|
103
|
-
type:
|
|
103
|
+
type: 'KV.CONNECT';
|
|
104
104
|
connection: NatsConnection;
|
|
105
105
|
} | {
|
|
106
|
-
type:
|
|
106
|
+
type: 'KV.CONNECTED';
|
|
107
107
|
} | {
|
|
108
|
-
type:
|
|
108
|
+
type: 'KV.DISCONNECTED';
|
|
109
109
|
} | {
|
|
110
|
-
type:
|
|
110
|
+
type: 'KV.BUCKET_LIST';
|
|
111
111
|
bucket?: string;
|
|
112
112
|
onResult: (result: KvStatus[] | string[] | {
|
|
113
113
|
error: Error;
|
|
114
114
|
}) => void;
|
|
115
115
|
} | {
|
|
116
|
-
type:
|
|
116
|
+
type: 'KV.BUCKET_CREATE';
|
|
117
117
|
bucket: string;
|
|
118
118
|
onResult: (result: {
|
|
119
119
|
ok: true;
|
|
@@ -123,7 +123,7 @@ export declare const kvManagerLogic: import("xstate").StateMachine<Context, Nats
|
|
|
123
123
|
error: Error;
|
|
124
124
|
}) => void;
|
|
125
125
|
} | {
|
|
126
|
-
type:
|
|
126
|
+
type: 'KV.BUCKET_DELETE';
|
|
127
127
|
bucket: string;
|
|
128
128
|
onResult: (result: {
|
|
129
129
|
ok: true;
|
|
@@ -133,14 +133,14 @@ export declare const kvManagerLogic: import("xstate").StateMachine<Context, Nats
|
|
|
133
133
|
error: Error;
|
|
134
134
|
}) => void;
|
|
135
135
|
} | {
|
|
136
|
-
type:
|
|
136
|
+
type: 'KV.GET';
|
|
137
137
|
bucket: string;
|
|
138
138
|
key: string;
|
|
139
139
|
onResult: (result: KvEntry | null | {
|
|
140
140
|
error: Error;
|
|
141
141
|
}) => void;
|
|
142
142
|
} | {
|
|
143
|
-
type:
|
|
143
|
+
type: 'KV.PUT';
|
|
144
144
|
bucket: string;
|
|
145
145
|
key: string;
|
|
146
146
|
value: any;
|
|
@@ -150,7 +150,7 @@ export declare const kvManagerLogic: import("xstate").StateMachine<Context, Nats
|
|
|
150
150
|
error: Error;
|
|
151
151
|
}) => void;
|
|
152
152
|
} | {
|
|
153
|
-
type:
|
|
153
|
+
type: 'KV.DELETE';
|
|
154
154
|
bucket: string;
|
|
155
155
|
key: string;
|
|
156
156
|
onResult: (result: {
|
|
@@ -159,14 +159,14 @@ export declare const kvManagerLogic: import("xstate").StateMachine<Context, Nats
|
|
|
159
159
|
error: Error;
|
|
160
160
|
}) => void;
|
|
161
161
|
} | {
|
|
162
|
-
type:
|
|
162
|
+
type: 'KV.SUBSCRIBE';
|
|
163
163
|
config: KvSubscriptionConfig;
|
|
164
164
|
} | {
|
|
165
|
-
type:
|
|
165
|
+
type: 'KV.UNSUBSCRIBE';
|
|
166
166
|
bucket: string;
|
|
167
167
|
key: string;
|
|
168
168
|
} | {
|
|
169
|
-
type:
|
|
169
|
+
type: 'KV.UNSUBSCRIBE_ALL';
|
|
170
170
|
}, {
|
|
171
171
|
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
|
|
172
172
|
subscriptions: Map<string, QueuedIterator<KvWatchEntry>>;
|
|
@@ -190,7 +190,7 @@ export declare const kvManagerLogic: import("xstate").StateMachine<Context, Nats
|
|
|
190
190
|
}, never, {
|
|
191
191
|
type: "hasPendingSync";
|
|
192
192
|
params: unknown;
|
|
193
|
-
}, never, "
|
|
193
|
+
}, never, "kv_check_sync" | "kv_connected" | "kv_disconnecting" | "kv_error" | "kv_idle" | "kv_syncing", string, import("xstate").NonReducibleUnknown, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
194
194
|
states: {
|
|
195
195
|
readonly kv_idle: {};
|
|
196
196
|
readonly kv_disconnecting: {};
|
package/dist/machines/root.d.ts
CHANGED
|
@@ -33,29 +33,29 @@ export type ExternalEvents = {
|
|
|
33
33
|
type: 'RESET';
|
|
34
34
|
} | NatsTrafficResetEvent | SubjectExternalEvents | KvExternalEvents;
|
|
35
35
|
export declare const natsMachine: import("xstate").StateMachine<Context, {
|
|
36
|
-
type:
|
|
36
|
+
type: 'METRICS.RESET_UPLOAD';
|
|
37
37
|
source?: import("..").NatsTrafficMetricSource;
|
|
38
38
|
} | {
|
|
39
|
-
type:
|
|
39
|
+
type: 'METRICS.RESET_DOWNLOAD';
|
|
40
40
|
source?: import("..").NatsTrafficMetricSource;
|
|
41
41
|
} | {
|
|
42
|
-
type:
|
|
42
|
+
type: 'METRICS.RESET_ALL';
|
|
43
43
|
source?: import("..").NatsTrafficMetricSource;
|
|
44
44
|
} | {
|
|
45
|
-
type:
|
|
45
|
+
type: 'KV.CONNECT';
|
|
46
46
|
connection: NatsConnection;
|
|
47
47
|
} | {
|
|
48
|
-
type:
|
|
48
|
+
type: 'KV.CONNECTED';
|
|
49
49
|
} | {
|
|
50
|
-
type:
|
|
50
|
+
type: 'KV.DISCONNECTED';
|
|
51
51
|
} | {
|
|
52
|
-
type:
|
|
52
|
+
type: 'KV.BUCKET_LIST';
|
|
53
53
|
bucket?: string;
|
|
54
54
|
onResult: (result: import("@nats-io/kv").KvStatus[] | string[] | {
|
|
55
55
|
error: Error;
|
|
56
56
|
}) => void;
|
|
57
57
|
} | {
|
|
58
|
-
type:
|
|
58
|
+
type: 'KV.BUCKET_CREATE';
|
|
59
59
|
bucket: string;
|
|
60
60
|
onResult: (result: {
|
|
61
61
|
ok: true;
|
|
@@ -65,7 +65,7 @@ export declare const natsMachine: import("xstate").StateMachine<Context, {
|
|
|
65
65
|
error: Error;
|
|
66
66
|
}) => void;
|
|
67
67
|
} | {
|
|
68
|
-
type:
|
|
68
|
+
type: 'KV.BUCKET_DELETE';
|
|
69
69
|
bucket: string;
|
|
70
70
|
onResult: (result: {
|
|
71
71
|
ok: true;
|
|
@@ -75,14 +75,14 @@ export declare const natsMachine: import("xstate").StateMachine<Context, {
|
|
|
75
75
|
error: Error;
|
|
76
76
|
}) => void;
|
|
77
77
|
} | {
|
|
78
|
-
type:
|
|
78
|
+
type: 'KV.GET';
|
|
79
79
|
bucket: string;
|
|
80
80
|
key: string;
|
|
81
81
|
onResult: (result: import("@nats-io/kv").KvEntry | null | {
|
|
82
82
|
error: Error;
|
|
83
83
|
}) => void;
|
|
84
84
|
} | {
|
|
85
|
-
type:
|
|
85
|
+
type: 'KV.PUT';
|
|
86
86
|
bucket: string;
|
|
87
87
|
key: string;
|
|
88
88
|
value: any;
|
|
@@ -92,7 +92,7 @@ export declare const natsMachine: import("xstate").StateMachine<Context, {
|
|
|
92
92
|
error: Error;
|
|
93
93
|
}) => void;
|
|
94
94
|
} | {
|
|
95
|
-
type:
|
|
95
|
+
type: 'KV.DELETE';
|
|
96
96
|
bucket: string;
|
|
97
97
|
key: string;
|
|
98
98
|
onResult: (result: {
|
|
@@ -101,38 +101,38 @@ export declare const natsMachine: import("xstate").StateMachine<Context, {
|
|
|
101
101
|
error: Error;
|
|
102
102
|
}) => void;
|
|
103
103
|
} | {
|
|
104
|
-
type:
|
|
104
|
+
type: 'KV.SUBSCRIBE';
|
|
105
105
|
config: import("..").KvSubscriptionConfig;
|
|
106
106
|
} | {
|
|
107
|
-
type:
|
|
107
|
+
type: 'KV.UNSUBSCRIBE';
|
|
108
108
|
bucket: string;
|
|
109
109
|
key: string;
|
|
110
110
|
} | {
|
|
111
|
-
type:
|
|
111
|
+
type: 'KV.UNSUBSCRIBE_ALL';
|
|
112
112
|
} | {
|
|
113
|
-
type:
|
|
113
|
+
type: 'NATS_CONNECTION.DISCONNECTED';
|
|
114
114
|
status: import("@nats-io/nats-core").Status;
|
|
115
115
|
} | {
|
|
116
|
-
type:
|
|
116
|
+
type: 'NATS_CONNECTION.RECONNECT';
|
|
117
117
|
status: import("@nats-io/nats-core").Status;
|
|
118
118
|
} | {
|
|
119
|
-
type:
|
|
119
|
+
type: 'NATS_CONNECTION.ERROR';
|
|
120
120
|
status: import("@nats-io/nats-core").Status;
|
|
121
121
|
} | {
|
|
122
|
-
type:
|
|
122
|
+
type: 'NATS_CONNECTION.CLOSE';
|
|
123
123
|
status: import("@nats-io/nats-core").Status;
|
|
124
124
|
} | {
|
|
125
|
-
type:
|
|
125
|
+
type: 'NATS_CONNECTION.RECONNECTING';
|
|
126
126
|
status: import("@nats-io/nats-core").Status;
|
|
127
127
|
} | {
|
|
128
|
-
type:
|
|
128
|
+
type: 'SUBJECT.CONNECT';
|
|
129
129
|
connection: NatsConnection;
|
|
130
130
|
} | {
|
|
131
|
-
type:
|
|
131
|
+
type: 'SUBJECT.CONNECTED';
|
|
132
132
|
} | {
|
|
133
|
-
type:
|
|
133
|
+
type: 'SUBJECT.DISCONNECTED';
|
|
134
134
|
} | {
|
|
135
|
-
type:
|
|
135
|
+
type: 'SUBJECT.PUBLISH';
|
|
136
136
|
subject: string;
|
|
137
137
|
payload: any;
|
|
138
138
|
opts?: import("@nats-io/nats-core").PublishOptions;
|
|
@@ -143,133 +143,75 @@ export declare const natsMachine: import("xstate").StateMachine<Context, {
|
|
|
143
143
|
error: Error;
|
|
144
144
|
}) => void;
|
|
145
145
|
} | {
|
|
146
|
-
type:
|
|
146
|
+
type: 'SUBJECT.REQUEST';
|
|
147
147
|
subject: string;
|
|
148
148
|
payload: any;
|
|
149
149
|
opts?: import("@nats-io/nats-core").RequestOptions;
|
|
150
150
|
callback: (data: any) => void;
|
|
151
151
|
onRequestResult?: (result: import("../actions/subject").RequestResult) => void;
|
|
152
152
|
} | {
|
|
153
|
-
type:
|
|
153
|
+
type: 'SUBJECT.SUBSCRIBE';
|
|
154
154
|
config: import("../actions/subject").SubjectSubscriptionConfig;
|
|
155
155
|
} | {
|
|
156
|
-
type:
|
|
156
|
+
type: 'SUBJECT.UNSUBSCRIBE';
|
|
157
157
|
subject: string;
|
|
158
158
|
} | {
|
|
159
|
-
type:
|
|
159
|
+
type: 'SUBJECT.UNSUBSCRIBE_ALL';
|
|
160
160
|
} | {
|
|
161
|
-
type:
|
|
161
|
+
type: 'CONNECTED';
|
|
162
162
|
connection: NatsConnection;
|
|
163
163
|
} | {
|
|
164
|
-
type:
|
|
164
|
+
type: 'DISCONNECTED';
|
|
165
165
|
} | {
|
|
166
|
-
type:
|
|
166
|
+
type: 'FAIL';
|
|
167
167
|
error: Error;
|
|
168
168
|
} | {
|
|
169
|
-
type:
|
|
169
|
+
type: 'RECONNECT';
|
|
170
170
|
} | {
|
|
171
|
-
type:
|
|
171
|
+
type: 'CLOSE';
|
|
172
172
|
} | {
|
|
173
|
-
type:
|
|
173
|
+
type: 'CONFIGURE';
|
|
174
174
|
config: NatsConnectionConfig;
|
|
175
175
|
} | {
|
|
176
|
-
type:
|
|
176
|
+
type: 'CONNECT';
|
|
177
177
|
} | {
|
|
178
|
-
type:
|
|
178
|
+
type: 'DISCONNECT';
|
|
179
179
|
} | {
|
|
180
|
-
type:
|
|
180
|
+
type: 'RESET';
|
|
181
181
|
}, {
|
|
182
|
-
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<
|
|
182
|
+
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void, {
|
|
183
|
+
connection: NatsConnection | null;
|
|
184
|
+
}, import("xstate").EventObject> | import("xstate").PromiseActorLogic<NatsConnection, {
|
|
183
185
|
opts: ConnectionOptions;
|
|
184
186
|
auth?: AuthConfig;
|
|
185
|
-
}, import("xstate").EventObject> | import("xstate").PromiseActorLogic<void, {
|
|
186
|
-
connection: NatsConnection | null;
|
|
187
187
|
}, import("xstate").EventObject>> | undefined;
|
|
188
|
-
subject?: import("xstate").ActorRefFromLogic<import("xstate").StateMachine<import("./subject").Context, import("..").NatsTrafficRecordEvent | {
|
|
189
|
-
type: "METRICS.RESET_UPLOAD";
|
|
190
|
-
source?: import("..").NatsTrafficMetricSource;
|
|
191
|
-
} | {
|
|
192
|
-
type: "METRICS.RESET_DOWNLOAD";
|
|
193
|
-
source?: import("..").NatsTrafficMetricSource;
|
|
194
|
-
} | {
|
|
195
|
-
type: "METRICS.RESET_ALL";
|
|
196
|
-
source?: import("..").NatsTrafficMetricSource;
|
|
197
|
-
} | {
|
|
198
|
-
type: "ERROR";
|
|
199
|
-
error: Error;
|
|
200
|
-
} | {
|
|
201
|
-
type: "SUBJECT.CONNECT";
|
|
202
|
-
connection: NatsConnection;
|
|
203
|
-
} | {
|
|
204
|
-
type: "SUBJECT.CONNECTED";
|
|
205
|
-
} | {
|
|
206
|
-
type: "SUBJECT.DISCONNECTED";
|
|
207
|
-
} | {
|
|
208
|
-
type: "SUBJECT.PUBLISH";
|
|
209
|
-
subject: string;
|
|
210
|
-
payload: any;
|
|
211
|
-
opts?: import("@nats-io/nats-core").PublishOptions;
|
|
212
|
-
onPublishResult?: (result: {
|
|
213
|
-
ok: true;
|
|
214
|
-
} | {
|
|
215
|
-
ok: false;
|
|
216
|
-
error: Error;
|
|
217
|
-
}) => void;
|
|
218
|
-
} | {
|
|
219
|
-
type: "SUBJECT.REQUEST";
|
|
220
|
-
subject: string;
|
|
221
|
-
payload: any;
|
|
222
|
-
opts?: import("@nats-io/nats-core").RequestOptions;
|
|
223
|
-
callback: (data: any) => void;
|
|
224
|
-
onRequestResult?: (result: import("../actions/subject").RequestResult) => void;
|
|
225
|
-
} | {
|
|
226
|
-
type: "SUBJECT.SUBSCRIBE";
|
|
227
|
-
config: import("../actions/subject").SubjectSubscriptionConfig;
|
|
228
|
-
} | {
|
|
229
|
-
type: "SUBJECT.UNSUBSCRIBE";
|
|
230
|
-
subject: string;
|
|
231
|
-
} | {
|
|
232
|
-
type: "SUBJECT.UNSUBSCRIBE_ALL";
|
|
233
|
-
}, {}, never, never, {
|
|
234
|
-
type: "hasPendingSync";
|
|
235
|
-
params: unknown;
|
|
236
|
-
}, never, "subject_idle" | "subject_check_sync" | "subject_disconnecting" | "subject_connected" | "subject_syncing" | "subject_error", string, import("xstate").NonReducibleUnknown, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
237
|
-
states: {
|
|
238
|
-
readonly subject_idle: {};
|
|
239
|
-
readonly subject_disconnecting: {};
|
|
240
|
-
readonly subject_connected: {};
|
|
241
|
-
readonly subject_check_sync: {};
|
|
242
|
-
readonly subject_syncing: {};
|
|
243
|
-
readonly subject_error: {};
|
|
244
|
-
};
|
|
245
|
-
}>> | undefined;
|
|
246
188
|
kv?: import("xstate").ActorRefFromLogic<import("xstate").StateMachine<import("./kv").Context, import("..").NatsTrafficRecordEvent | {
|
|
247
|
-
type:
|
|
189
|
+
type: 'METRICS.RESET_UPLOAD';
|
|
248
190
|
source?: import("..").NatsTrafficMetricSource;
|
|
249
191
|
} | {
|
|
250
|
-
type:
|
|
192
|
+
type: 'METRICS.RESET_DOWNLOAD';
|
|
251
193
|
source?: import("..").NatsTrafficMetricSource;
|
|
252
194
|
} | {
|
|
253
|
-
type:
|
|
195
|
+
type: 'METRICS.RESET_ALL';
|
|
254
196
|
source?: import("..").NatsTrafficMetricSource;
|
|
255
197
|
} | {
|
|
256
|
-
type:
|
|
198
|
+
type: 'ERROR';
|
|
257
199
|
error: Error;
|
|
258
200
|
} | {
|
|
259
|
-
type:
|
|
201
|
+
type: 'KV.CONNECT';
|
|
260
202
|
connection: NatsConnection;
|
|
261
203
|
} | {
|
|
262
|
-
type:
|
|
204
|
+
type: 'KV.CONNECTED';
|
|
263
205
|
} | {
|
|
264
|
-
type:
|
|
206
|
+
type: 'KV.DISCONNECTED';
|
|
265
207
|
} | {
|
|
266
|
-
type:
|
|
208
|
+
type: 'KV.BUCKET_LIST';
|
|
267
209
|
bucket?: string;
|
|
268
210
|
onResult: (result: import("@nats-io/kv").KvStatus[] | string[] | {
|
|
269
211
|
error: Error;
|
|
270
212
|
}) => void;
|
|
271
213
|
} | {
|
|
272
|
-
type:
|
|
214
|
+
type: 'KV.BUCKET_CREATE';
|
|
273
215
|
bucket: string;
|
|
274
216
|
onResult: (result: {
|
|
275
217
|
ok: true;
|
|
@@ -279,7 +221,7 @@ export declare const natsMachine: import("xstate").StateMachine<Context, {
|
|
|
279
221
|
error: Error;
|
|
280
222
|
}) => void;
|
|
281
223
|
} | {
|
|
282
|
-
type:
|
|
224
|
+
type: 'KV.BUCKET_DELETE';
|
|
283
225
|
bucket: string;
|
|
284
226
|
onResult: (result: {
|
|
285
227
|
ok: true;
|
|
@@ -289,14 +231,14 @@ export declare const natsMachine: import("xstate").StateMachine<Context, {
|
|
|
289
231
|
error: Error;
|
|
290
232
|
}) => void;
|
|
291
233
|
} | {
|
|
292
|
-
type:
|
|
234
|
+
type: 'KV.GET';
|
|
293
235
|
bucket: string;
|
|
294
236
|
key: string;
|
|
295
237
|
onResult: (result: import("@nats-io/kv").KvEntry | null | {
|
|
296
238
|
error: Error;
|
|
297
239
|
}) => void;
|
|
298
240
|
} | {
|
|
299
|
-
type:
|
|
241
|
+
type: 'KV.PUT';
|
|
300
242
|
bucket: string;
|
|
301
243
|
key: string;
|
|
302
244
|
value: any;
|
|
@@ -306,7 +248,7 @@ export declare const natsMachine: import("xstate").StateMachine<Context, {
|
|
|
306
248
|
error: Error;
|
|
307
249
|
}) => void;
|
|
308
250
|
} | {
|
|
309
|
-
type:
|
|
251
|
+
type: 'KV.DELETE';
|
|
310
252
|
bucket: string;
|
|
311
253
|
key: string;
|
|
312
254
|
onResult: (result: {
|
|
@@ -315,14 +257,14 @@ export declare const natsMachine: import("xstate").StateMachine<Context, {
|
|
|
315
257
|
error: Error;
|
|
316
258
|
}) => void;
|
|
317
259
|
} | {
|
|
318
|
-
type:
|
|
260
|
+
type: 'KV.SUBSCRIBE';
|
|
319
261
|
config: import("..").KvSubscriptionConfig;
|
|
320
262
|
} | {
|
|
321
|
-
type:
|
|
263
|
+
type: 'KV.UNSUBSCRIBE';
|
|
322
264
|
bucket: string;
|
|
323
265
|
key: string;
|
|
324
266
|
} | {
|
|
325
|
-
type:
|
|
267
|
+
type: 'KV.UNSUBSCRIBE_ALL';
|
|
326
268
|
}, {
|
|
327
269
|
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
|
|
328
270
|
subscriptions: Map<string, import("@nats-io/nats-core").QueuedIterator<import("@nats-io/kv").KvWatchEntry>>;
|
|
@@ -346,7 +288,7 @@ export declare const natsMachine: import("xstate").StateMachine<Context, {
|
|
|
346
288
|
}, never, {
|
|
347
289
|
type: "hasPendingSync";
|
|
348
290
|
params: unknown;
|
|
349
|
-
}, never, "
|
|
291
|
+
}, never, "kv_check_sync" | "kv_connected" | "kv_disconnecting" | "kv_error" | "kv_idle" | "kv_syncing", string, import("xstate").NonReducibleUnknown, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
350
292
|
states: {
|
|
351
293
|
readonly kv_idle: {};
|
|
352
294
|
readonly kv_disconnecting: {};
|
|
@@ -356,29 +298,27 @@ export declare const natsMachine: import("xstate").StateMachine<Context, {
|
|
|
356
298
|
readonly kv_error: {};
|
|
357
299
|
};
|
|
358
300
|
}>> | undefined;
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
logic: import("xstate").StateMachine<import("./subject").Context, import("..").NatsTrafficRecordEvent | {
|
|
362
|
-
type: "METRICS.RESET_UPLOAD";
|
|
301
|
+
subject?: import("xstate").ActorRefFromLogic<import("xstate").StateMachine<import("./subject").Context, import("..").NatsTrafficRecordEvent | {
|
|
302
|
+
type: 'METRICS.RESET_UPLOAD';
|
|
363
303
|
source?: import("..").NatsTrafficMetricSource;
|
|
364
304
|
} | {
|
|
365
|
-
type:
|
|
305
|
+
type: 'METRICS.RESET_DOWNLOAD';
|
|
366
306
|
source?: import("..").NatsTrafficMetricSource;
|
|
367
307
|
} | {
|
|
368
|
-
type:
|
|
308
|
+
type: 'METRICS.RESET_ALL';
|
|
369
309
|
source?: import("..").NatsTrafficMetricSource;
|
|
370
310
|
} | {
|
|
371
|
-
type:
|
|
311
|
+
type: 'ERROR';
|
|
372
312
|
error: Error;
|
|
373
313
|
} | {
|
|
374
|
-
type:
|
|
314
|
+
type: 'SUBJECT.CONNECT';
|
|
375
315
|
connection: NatsConnection;
|
|
376
316
|
} | {
|
|
377
|
-
type:
|
|
317
|
+
type: 'SUBJECT.CONNECTED';
|
|
378
318
|
} | {
|
|
379
|
-
type:
|
|
319
|
+
type: 'SUBJECT.DISCONNECTED';
|
|
380
320
|
} | {
|
|
381
|
-
type:
|
|
321
|
+
type: 'SUBJECT.PUBLISH';
|
|
382
322
|
subject: string;
|
|
383
323
|
payload: any;
|
|
384
324
|
opts?: import("@nats-io/nats-core").PublishOptions;
|
|
@@ -389,24 +329,24 @@ export declare const natsMachine: import("xstate").StateMachine<Context, {
|
|
|
389
329
|
error: Error;
|
|
390
330
|
}) => void;
|
|
391
331
|
} | {
|
|
392
|
-
type:
|
|
332
|
+
type: 'SUBJECT.REQUEST';
|
|
393
333
|
subject: string;
|
|
394
334
|
payload: any;
|
|
395
335
|
opts?: import("@nats-io/nats-core").RequestOptions;
|
|
396
336
|
callback: (data: any) => void;
|
|
397
337
|
onRequestResult?: (result: import("../actions/subject").RequestResult) => void;
|
|
398
338
|
} | {
|
|
399
|
-
type:
|
|
339
|
+
type: 'SUBJECT.SUBSCRIBE';
|
|
400
340
|
config: import("../actions/subject").SubjectSubscriptionConfig;
|
|
401
341
|
} | {
|
|
402
|
-
type:
|
|
342
|
+
type: 'SUBJECT.UNSUBSCRIBE';
|
|
403
343
|
subject: string;
|
|
404
344
|
} | {
|
|
405
|
-
type:
|
|
345
|
+
type: 'SUBJECT.UNSUBSCRIBE_ALL';
|
|
406
346
|
}, {}, never, never, {
|
|
407
347
|
type: "hasPendingSync";
|
|
408
348
|
params: unknown;
|
|
409
|
-
}, never, "
|
|
349
|
+
}, never, "subject_check_sync" | "subject_connected" | "subject_disconnecting" | "subject_error" | "subject_idle" | "subject_syncing", string, import("xstate").NonReducibleUnknown, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
410
350
|
states: {
|
|
411
351
|
readonly subject_idle: {};
|
|
412
352
|
readonly subject_disconnecting: {};
|
|
@@ -415,9 +355,8 @@ export declare const natsMachine: import("xstate").StateMachine<Context, {
|
|
|
415
355
|
readonly subject_syncing: {};
|
|
416
356
|
readonly subject_error: {};
|
|
417
357
|
};
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
} | {
|
|
358
|
+
}>> | undefined;
|
|
359
|
+
}, {
|
|
421
360
|
src: "connectToNats";
|
|
422
361
|
logic: import("xstate").PromiseActorLogic<NatsConnection, {
|
|
423
362
|
opts: ConnectionOptions;
|
|
@@ -433,32 +372,32 @@ export declare const natsMachine: import("xstate").StateMachine<Context, {
|
|
|
433
372
|
} | {
|
|
434
373
|
src: "kv";
|
|
435
374
|
logic: import("xstate").StateMachine<import("./kv").Context, import("..").NatsTrafficRecordEvent | {
|
|
436
|
-
type:
|
|
375
|
+
type: 'METRICS.RESET_UPLOAD';
|
|
437
376
|
source?: import("..").NatsTrafficMetricSource;
|
|
438
377
|
} | {
|
|
439
|
-
type:
|
|
378
|
+
type: 'METRICS.RESET_DOWNLOAD';
|
|
440
379
|
source?: import("..").NatsTrafficMetricSource;
|
|
441
380
|
} | {
|
|
442
|
-
type:
|
|
381
|
+
type: 'METRICS.RESET_ALL';
|
|
443
382
|
source?: import("..").NatsTrafficMetricSource;
|
|
444
383
|
} | {
|
|
445
|
-
type:
|
|
384
|
+
type: 'ERROR';
|
|
446
385
|
error: Error;
|
|
447
386
|
} | {
|
|
448
|
-
type:
|
|
387
|
+
type: 'KV.CONNECT';
|
|
449
388
|
connection: NatsConnection;
|
|
450
389
|
} | {
|
|
451
|
-
type:
|
|
390
|
+
type: 'KV.CONNECTED';
|
|
452
391
|
} | {
|
|
453
|
-
type:
|
|
392
|
+
type: 'KV.DISCONNECTED';
|
|
454
393
|
} | {
|
|
455
|
-
type:
|
|
394
|
+
type: 'KV.BUCKET_LIST';
|
|
456
395
|
bucket?: string;
|
|
457
396
|
onResult: (result: import("@nats-io/kv").KvStatus[] | string[] | {
|
|
458
397
|
error: Error;
|
|
459
398
|
}) => void;
|
|
460
399
|
} | {
|
|
461
|
-
type:
|
|
400
|
+
type: 'KV.BUCKET_CREATE';
|
|
462
401
|
bucket: string;
|
|
463
402
|
onResult: (result: {
|
|
464
403
|
ok: true;
|
|
@@ -468,7 +407,7 @@ export declare const natsMachine: import("xstate").StateMachine<Context, {
|
|
|
468
407
|
error: Error;
|
|
469
408
|
}) => void;
|
|
470
409
|
} | {
|
|
471
|
-
type:
|
|
410
|
+
type: 'KV.BUCKET_DELETE';
|
|
472
411
|
bucket: string;
|
|
473
412
|
onResult: (result: {
|
|
474
413
|
ok: true;
|
|
@@ -478,14 +417,14 @@ export declare const natsMachine: import("xstate").StateMachine<Context, {
|
|
|
478
417
|
error: Error;
|
|
479
418
|
}) => void;
|
|
480
419
|
} | {
|
|
481
|
-
type:
|
|
420
|
+
type: 'KV.GET';
|
|
482
421
|
bucket: string;
|
|
483
422
|
key: string;
|
|
484
423
|
onResult: (result: import("@nats-io/kv").KvEntry | null | {
|
|
485
424
|
error: Error;
|
|
486
425
|
}) => void;
|
|
487
426
|
} | {
|
|
488
|
-
type:
|
|
427
|
+
type: 'KV.PUT';
|
|
489
428
|
bucket: string;
|
|
490
429
|
key: string;
|
|
491
430
|
value: any;
|
|
@@ -495,7 +434,7 @@ export declare const natsMachine: import("xstate").StateMachine<Context, {
|
|
|
495
434
|
error: Error;
|
|
496
435
|
}) => void;
|
|
497
436
|
} | {
|
|
498
|
-
type:
|
|
437
|
+
type: 'KV.DELETE';
|
|
499
438
|
bucket: string;
|
|
500
439
|
key: string;
|
|
501
440
|
onResult: (result: {
|
|
@@ -504,14 +443,14 @@ export declare const natsMachine: import("xstate").StateMachine<Context, {
|
|
|
504
443
|
error: Error;
|
|
505
444
|
}) => void;
|
|
506
445
|
} | {
|
|
507
|
-
type:
|
|
446
|
+
type: 'KV.SUBSCRIBE';
|
|
508
447
|
config: import("..").KvSubscriptionConfig;
|
|
509
448
|
} | {
|
|
510
|
-
type:
|
|
449
|
+
type: 'KV.UNSUBSCRIBE';
|
|
511
450
|
bucket: string;
|
|
512
451
|
key: string;
|
|
513
452
|
} | {
|
|
514
|
-
type:
|
|
453
|
+
type: 'KV.UNSUBSCRIBE_ALL';
|
|
515
454
|
}, {
|
|
516
455
|
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
|
|
517
456
|
subscriptions: Map<string, import("@nats-io/nats-core").QueuedIterator<import("@nats-io/kv").KvWatchEntry>>;
|
|
@@ -535,7 +474,7 @@ export declare const natsMachine: import("xstate").StateMachine<Context, {
|
|
|
535
474
|
}, never, {
|
|
536
475
|
type: "hasPendingSync";
|
|
537
476
|
params: unknown;
|
|
538
|
-
}, never, "
|
|
477
|
+
}, never, "kv_check_sync" | "kv_connected" | "kv_disconnecting" | "kv_error" | "kv_idle" | "kv_syncing", string, import("xstate").NonReducibleUnknown, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
539
478
|
states: {
|
|
540
479
|
readonly kv_idle: {};
|
|
541
480
|
readonly kv_disconnecting: {};
|
|
@@ -546,8 +485,69 @@ export declare const natsMachine: import("xstate").StateMachine<Context, {
|
|
|
546
485
|
};
|
|
547
486
|
}>;
|
|
548
487
|
id: "kv";
|
|
488
|
+
} | {
|
|
489
|
+
src: "subject";
|
|
490
|
+
logic: import("xstate").StateMachine<import("./subject").Context, import("..").NatsTrafficRecordEvent | {
|
|
491
|
+
type: 'METRICS.RESET_UPLOAD';
|
|
492
|
+
source?: import("..").NatsTrafficMetricSource;
|
|
493
|
+
} | {
|
|
494
|
+
type: 'METRICS.RESET_DOWNLOAD';
|
|
495
|
+
source?: import("..").NatsTrafficMetricSource;
|
|
496
|
+
} | {
|
|
497
|
+
type: 'METRICS.RESET_ALL';
|
|
498
|
+
source?: import("..").NatsTrafficMetricSource;
|
|
499
|
+
} | {
|
|
500
|
+
type: 'ERROR';
|
|
501
|
+
error: Error;
|
|
502
|
+
} | {
|
|
503
|
+
type: 'SUBJECT.CONNECT';
|
|
504
|
+
connection: NatsConnection;
|
|
505
|
+
} | {
|
|
506
|
+
type: 'SUBJECT.CONNECTED';
|
|
507
|
+
} | {
|
|
508
|
+
type: 'SUBJECT.DISCONNECTED';
|
|
509
|
+
} | {
|
|
510
|
+
type: 'SUBJECT.PUBLISH';
|
|
511
|
+
subject: string;
|
|
512
|
+
payload: any;
|
|
513
|
+
opts?: import("@nats-io/nats-core").PublishOptions;
|
|
514
|
+
onPublishResult?: (result: {
|
|
515
|
+
ok: true;
|
|
516
|
+
} | {
|
|
517
|
+
ok: false;
|
|
518
|
+
error: Error;
|
|
519
|
+
}) => void;
|
|
520
|
+
} | {
|
|
521
|
+
type: 'SUBJECT.REQUEST';
|
|
522
|
+
subject: string;
|
|
523
|
+
payload: any;
|
|
524
|
+
opts?: import("@nats-io/nats-core").RequestOptions;
|
|
525
|
+
callback: (data: any) => void;
|
|
526
|
+
onRequestResult?: (result: import("../actions/subject").RequestResult) => void;
|
|
527
|
+
} | {
|
|
528
|
+
type: 'SUBJECT.SUBSCRIBE';
|
|
529
|
+
config: import("../actions/subject").SubjectSubscriptionConfig;
|
|
530
|
+
} | {
|
|
531
|
+
type: 'SUBJECT.UNSUBSCRIBE';
|
|
532
|
+
subject: string;
|
|
533
|
+
} | {
|
|
534
|
+
type: 'SUBJECT.UNSUBSCRIBE_ALL';
|
|
535
|
+
}, {}, never, never, {
|
|
536
|
+
type: "hasPendingSync";
|
|
537
|
+
params: unknown;
|
|
538
|
+
}, never, "subject_check_sync" | "subject_connected" | "subject_disconnecting" | "subject_error" | "subject_idle" | "subject_syncing", string, import("xstate").NonReducibleUnknown, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
539
|
+
states: {
|
|
540
|
+
readonly subject_idle: {};
|
|
541
|
+
readonly subject_disconnecting: {};
|
|
542
|
+
readonly subject_connected: {};
|
|
543
|
+
readonly subject_check_sync: {};
|
|
544
|
+
readonly subject_syncing: {};
|
|
545
|
+
readonly subject_error: {};
|
|
546
|
+
};
|
|
547
|
+
}>;
|
|
548
|
+
id: "subject";
|
|
549
549
|
}, {
|
|
550
|
-
type: "
|
|
550
|
+
type: "clearDeferredCloseActions";
|
|
551
551
|
params: import("xstate").NonReducibleUnknown;
|
|
552
552
|
} | {
|
|
553
553
|
type: "configureNats";
|
|
@@ -556,21 +556,21 @@ export declare const natsMachine: import("xstate").StateMachine<Context, {
|
|
|
556
556
|
type: "configureNatsAfterClose";
|
|
557
557
|
params: import("xstate").NonReducibleUnknown;
|
|
558
558
|
} | {
|
|
559
|
-
type: "
|
|
559
|
+
type: "doReset";
|
|
560
560
|
params: import("xstate").NonReducibleUnknown;
|
|
561
561
|
} | {
|
|
562
|
-
type: "
|
|
562
|
+
type: "reconnectAfterClose";
|
|
563
563
|
params: import("xstate").NonReducibleUnknown;
|
|
564
564
|
}, {
|
|
565
565
|
type: "allManagersReady";
|
|
566
566
|
params: unknown;
|
|
567
567
|
} | {
|
|
568
|
-
type: "
|
|
568
|
+
type: "shouldConfigureAfterClose";
|
|
569
569
|
params: unknown;
|
|
570
570
|
} | {
|
|
571
|
-
type: "
|
|
571
|
+
type: "shouldConnectAfterClose";
|
|
572
572
|
params: unknown;
|
|
573
|
-
}, never, "
|
|
573
|
+
}, never, "closed" | "closing" | "configured" | "connected" | "connecting" | "error" | "initialise_managers" | "not_configured", string, import("xstate").NonReducibleUnknown, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
574
574
|
states: {
|
|
575
575
|
readonly not_configured: {};
|
|
576
576
|
readonly configured: {};
|
|
@@ -50,26 +50,26 @@ export interface Context {
|
|
|
50
50
|
error?: Error;
|
|
51
51
|
}
|
|
52
52
|
export declare const subjectManagerLogic: import("xstate").StateMachine<Context, NatsTrafficRecordEvent | {
|
|
53
|
-
type:
|
|
53
|
+
type: 'METRICS.RESET_UPLOAD';
|
|
54
54
|
source?: import("..").NatsTrafficMetricSource;
|
|
55
55
|
} | {
|
|
56
|
-
type:
|
|
56
|
+
type: 'METRICS.RESET_DOWNLOAD';
|
|
57
57
|
source?: import("..").NatsTrafficMetricSource;
|
|
58
58
|
} | {
|
|
59
|
-
type:
|
|
59
|
+
type: 'METRICS.RESET_ALL';
|
|
60
60
|
source?: import("..").NatsTrafficMetricSource;
|
|
61
61
|
} | {
|
|
62
|
-
type:
|
|
62
|
+
type: 'ERROR';
|
|
63
63
|
error: Error;
|
|
64
64
|
} | {
|
|
65
|
-
type:
|
|
65
|
+
type: 'SUBJECT.CONNECT';
|
|
66
66
|
connection: NatsConnection;
|
|
67
67
|
} | {
|
|
68
|
-
type:
|
|
68
|
+
type: 'SUBJECT.CONNECTED';
|
|
69
69
|
} | {
|
|
70
|
-
type:
|
|
70
|
+
type: 'SUBJECT.DISCONNECTED';
|
|
71
71
|
} | {
|
|
72
|
-
type:
|
|
72
|
+
type: 'SUBJECT.PUBLISH';
|
|
73
73
|
subject: string;
|
|
74
74
|
payload: any;
|
|
75
75
|
opts?: PublishOptions;
|
|
@@ -80,24 +80,24 @@ export declare const subjectManagerLogic: import("xstate").StateMachine<Context,
|
|
|
80
80
|
error: Error;
|
|
81
81
|
}) => void;
|
|
82
82
|
} | {
|
|
83
|
-
type:
|
|
83
|
+
type: 'SUBJECT.REQUEST';
|
|
84
84
|
subject: string;
|
|
85
85
|
payload: any;
|
|
86
86
|
opts?: RequestOptions;
|
|
87
87
|
callback: (data: any) => void;
|
|
88
88
|
onRequestResult?: (result: RequestResult) => void;
|
|
89
89
|
} | {
|
|
90
|
-
type:
|
|
90
|
+
type: 'SUBJECT.SUBSCRIBE';
|
|
91
91
|
config: SubjectSubscriptionConfig;
|
|
92
92
|
} | {
|
|
93
|
-
type:
|
|
93
|
+
type: 'SUBJECT.UNSUBSCRIBE';
|
|
94
94
|
subject: string;
|
|
95
95
|
} | {
|
|
96
|
-
type:
|
|
96
|
+
type: 'SUBJECT.UNSUBSCRIBE_ALL';
|
|
97
97
|
}, {}, never, never, {
|
|
98
98
|
type: "hasPendingSync";
|
|
99
99
|
params: unknown;
|
|
100
|
-
}, never, "
|
|
100
|
+
}, never, "subject_check_sync" | "subject_connected" | "subject_disconnecting" | "subject_error" | "subject_idle" | "subject_syncing", string, import("xstate").NonReducibleUnknown, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
101
101
|
states: {
|
|
102
102
|
readonly subject_idle: {};
|
|
103
103
|
readonly subject_disconnecting: {};
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,qBAAa,IAAI,CAAC,CAAC,EAAE,CAAC;IACpB,CAAC,EAAE,CAAC,CAAA;IACJ,CAAC,EAAE,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,qBAAa,IAAI,CAAC,CAAC,EAAE,CAAC;IACpB,CAAC,EAAE,CAAC,CAAA;IACJ,CAAC,EAAE,CAAC,CAAA;IAEJ,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAGrB;IACD,KAAK,WAEJ;IAED,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,WAEvB;IAED,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,cAQ/B;IAED,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,UAE1B;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jr200-labs/xstate-nats",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.19",
|
|
4
4
|
"description": "XState machine for NATS",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Jayshan Raghunandan",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"url": "git+https://github.com/jr200-labs/xstate-nats.git"
|
|
10
10
|
},
|
|
11
11
|
"type": "module",
|
|
12
|
-
"packageManager": "pnpm@11.
|
|
12
|
+
"packageManager": "pnpm@11.11.0",
|
|
13
13
|
"main": "./dist/index.js",
|
|
14
14
|
"module": "./dist/index.js",
|
|
15
15
|
"types": "./dist/index.d.ts",
|
|
@@ -31,8 +31,7 @@
|
|
|
31
31
|
"test:run": "vitest run",
|
|
32
32
|
"test:watch": "vitest",
|
|
33
33
|
"prettier": "prettier --write \"**/*.{ts,mjs,js,json,md,yml,yaml}\"",
|
|
34
|
-
"lint": "tsc --noEmit
|
|
35
|
-
"prepare": "husky",
|
|
34
|
+
"lint": "tsc --noEmit",
|
|
36
35
|
"prepublishOnly": "pnpm build && pnpm test"
|
|
37
36
|
},
|
|
38
37
|
"keywords": [
|
|
@@ -46,7 +45,7 @@
|
|
|
46
45
|
"@nats-io/kv": "^3.4.0",
|
|
47
46
|
"@nats-io/nats-core": "^3.4.0",
|
|
48
47
|
"@nats-io/obj": "^3.4.0",
|
|
49
|
-
"xstate": "^5.32.
|
|
48
|
+
"xstate": "^5.32.4"
|
|
50
49
|
},
|
|
51
50
|
"peerDependencies": {
|
|
52
51
|
"@opentelemetry/api": "^1.9.1"
|
|
@@ -54,17 +53,16 @@
|
|
|
54
53
|
"devDependencies": {
|
|
55
54
|
"@eslint/js": "^10.0.1",
|
|
56
55
|
"@opentelemetry/api": "^1.9.1",
|
|
57
|
-
"@opentelemetry/context-async-hooks": "^2.
|
|
58
|
-
"@opentelemetry/core": "^2.
|
|
59
|
-
"@opentelemetry/sdk-trace-base": "^2.
|
|
60
|
-
"@vitest/coverage-v8": "^4.1.
|
|
61
|
-
"eslint": "^10.
|
|
62
|
-
"globals": "^17.
|
|
63
|
-
"
|
|
64
|
-
"prettier": "^3.8.4",
|
|
56
|
+
"@opentelemetry/context-async-hooks": "^2.9.0",
|
|
57
|
+
"@opentelemetry/core": "^2.9.0",
|
|
58
|
+
"@opentelemetry/sdk-trace-base": "^2.9.0",
|
|
59
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
60
|
+
"eslint": "^10.7.0",
|
|
61
|
+
"globals": "^17.7.0",
|
|
62
|
+
"prettier": "^3.9.5",
|
|
65
63
|
"syncpack": "^15.3.2",
|
|
66
|
-
"typescript": "^
|
|
67
|
-
"typescript-eslint": "^8.
|
|
68
|
-
"vitest": "^4.1.
|
|
64
|
+
"typescript": "^7.0.2",
|
|
65
|
+
"typescript-eslint": "^8.63.0",
|
|
66
|
+
"vitest": "^4.1.10"
|
|
69
67
|
}
|
|
70
68
|
}
|