@amqp-contract/client-nestjs 0.0.6 → 0.1.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/index.cjs +750 -3
- package/dist/index.d.cts +5 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +5 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +751 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -3
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,753 @@
|
|
|
1
1
|
import { ConfigurableModuleBuilder, Inject, Injectable, Module } from "@nestjs/common";
|
|
2
|
-
import { TypedAmqpClient } from "@amqp-contract/client";
|
|
2
|
+
import { TechnicalError, TypedAmqpClient } from "@amqp-contract/client";
|
|
3
3
|
|
|
4
|
+
//#region rolldown:runtime
|
|
5
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region ../../node_modules/.pnpm/@swan-io+boxed@3.2.1_typescript@5.9.3/node_modules/@swan-io/boxed/dist/Boxed.js
|
|
9
|
+
var require_Boxed = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
10
|
+
var t = function(t) {
|
|
11
|
+
return Object.keys(t);
|
|
12
|
+
}, n = function(t) {
|
|
13
|
+
return Object.values(t);
|
|
14
|
+
}, r = Object.prototype.hasOwnProperty, e = {
|
|
15
|
+
__proto__: null,
|
|
16
|
+
fromEntries: Object.fromEntries,
|
|
17
|
+
entries: function(t) {
|
|
18
|
+
return Object.entries(t);
|
|
19
|
+
},
|
|
20
|
+
keys: t,
|
|
21
|
+
values: n,
|
|
22
|
+
fromOptional: function(t) {
|
|
23
|
+
var n = {};
|
|
24
|
+
for (var e in t) if (r.call(t, e)) {
|
|
25
|
+
var u = t[e];
|
|
26
|
+
if (void 0 === u) continue;
|
|
27
|
+
u.isSome() && (n[e] = u.get());
|
|
28
|
+
}
|
|
29
|
+
return n;
|
|
30
|
+
}
|
|
31
|
+
}, u = /* @__PURE__ */ new WeakMap(), o = "function" == typeof WeakRef ? WeakRef : /* @__PURE__ */ function() {
|
|
32
|
+
function t(t$1) {
|
|
33
|
+
u.set(this, t$1);
|
|
34
|
+
}
|
|
35
|
+
return t.prototype.deref = function() {
|
|
36
|
+
return u.get(this);
|
|
37
|
+
}, t;
|
|
38
|
+
}(), i = function() {
|
|
39
|
+
var t = /* @__PURE__ */ new Map(), n = "function" == typeof FinalizationRegistry ? new FinalizationRegistry(function(n$1) {
|
|
40
|
+
t.delete(n$1);
|
|
41
|
+
}) : void 0;
|
|
42
|
+
return {
|
|
43
|
+
set: function(r, e) {
|
|
44
|
+
t.set(r, new o(e)), void 0 !== n && n.register(e, r);
|
|
45
|
+
},
|
|
46
|
+
get: function(n$1) {
|
|
47
|
+
var r = t.get(n$1);
|
|
48
|
+
if (void 0 !== r) return r.deref();
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}, a = Symbol.for("__boxed_type__"), c = function(t, n) {
|
|
52
|
+
for (var r = Math.min(t.length, n.length), e = Array(r), u = -1; ++u < r;) e[u] = [t[u], n[u]];
|
|
53
|
+
return e;
|
|
54
|
+
}, f = i(), s = /* @__PURE__ */ function() {
|
|
55
|
+
function t() {}
|
|
56
|
+
t.fromPredicate = function(t$1, n$1) {
|
|
57
|
+
return n$1(t$1) ? p.Some(t$1) : v;
|
|
58
|
+
};
|
|
59
|
+
var n = t.prototype;
|
|
60
|
+
return n.map = function(t$1) {
|
|
61
|
+
return this === v ? this : p.Some(t$1(this.value));
|
|
62
|
+
}, n.flatMap = function(t$1) {
|
|
63
|
+
return this === v ? this : t$1(this.value);
|
|
64
|
+
}, n.filter = function(t$1) {
|
|
65
|
+
return this === v || t$1(this.value) ? this : v;
|
|
66
|
+
}, n.get = function() {
|
|
67
|
+
return this.value;
|
|
68
|
+
}, n.getWithDefault = function(t$1) {
|
|
69
|
+
return this === v ? t$1 : this.value;
|
|
70
|
+
}, n.getOr = function(t$1) {
|
|
71
|
+
return this === v ? t$1 : this.value;
|
|
72
|
+
}, n.orElse = function(t$1) {
|
|
73
|
+
return this === v ? t$1 : this;
|
|
74
|
+
}, n.mapOr = function(t$1, n$1) {
|
|
75
|
+
return this === v ? t$1 : n$1(this.value);
|
|
76
|
+
}, n.match = function(t$1) {
|
|
77
|
+
return this === v ? t$1.None() : t$1.Some(this.value);
|
|
78
|
+
}, n.tap = function(t$1) {
|
|
79
|
+
return t$1(this), this;
|
|
80
|
+
}, n.tapSome = function(t$1) {
|
|
81
|
+
return this === v || t$1(this.value), this;
|
|
82
|
+
}, n.toUndefined = function() {
|
|
83
|
+
if (this !== v) return this.value;
|
|
84
|
+
}, n.toNull = function() {
|
|
85
|
+
return this === v ? null : this.value;
|
|
86
|
+
}, n.toResult = function(t$1) {
|
|
87
|
+
return this.match({
|
|
88
|
+
Some: function(t$2) {
|
|
89
|
+
return k.Ok(t$2);
|
|
90
|
+
},
|
|
91
|
+
None: function() {
|
|
92
|
+
return k.Error(t$1);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}, n.isSome = function() {
|
|
96
|
+
return this !== v;
|
|
97
|
+
}, n.isNone = function() {
|
|
98
|
+
return this === v;
|
|
99
|
+
}, n.toJSON = function() {
|
|
100
|
+
return this.match({
|
|
101
|
+
None: function() {
|
|
102
|
+
var t$1;
|
|
103
|
+
return (t$1 = {})[a] = "Option", t$1.tag = "None", t$1;
|
|
104
|
+
},
|
|
105
|
+
Some: function(t$1) {
|
|
106
|
+
var n$1;
|
|
107
|
+
return (n$1 = {})[a] = "Option", n$1.tag = "Some", n$1.value = t$1, n$1;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}, t;
|
|
111
|
+
}();
|
|
112
|
+
s.P = {
|
|
113
|
+
Some: function(t) {
|
|
114
|
+
return {
|
|
115
|
+
tag: "Some",
|
|
116
|
+
value: t
|
|
117
|
+
};
|
|
118
|
+
},
|
|
119
|
+
None: { tag: "None" }
|
|
120
|
+
}, s.Some = function(t) {
|
|
121
|
+
var n = f.get(t);
|
|
122
|
+
if (null == n) {
|
|
123
|
+
var r = Object.create(h);
|
|
124
|
+
return r.tag = "Some", r.value = t, Object.freeze(r), f.set(t, r), r;
|
|
125
|
+
}
|
|
126
|
+
return n;
|
|
127
|
+
}, s.None = function() {
|
|
128
|
+
return v;
|
|
129
|
+
}, s.isOption = function(t) {
|
|
130
|
+
return null != t && "Option" === t.__boxed_type__;
|
|
131
|
+
}, s.fromNullable = function(t) {
|
|
132
|
+
return null == t ? v : p.Some(t);
|
|
133
|
+
}, s.fromNull = function(t) {
|
|
134
|
+
return null === t ? v : p.Some(t);
|
|
135
|
+
}, s.fromUndefined = function(t) {
|
|
136
|
+
return void 0 === t ? v : p.Some(t);
|
|
137
|
+
}, s.all = function(t) {
|
|
138
|
+
for (var n, r = t.length, e = p.Some([]), u = 0, o = function() {
|
|
139
|
+
if (u >= r) return { v: e };
|
|
140
|
+
var n$1 = t[u];
|
|
141
|
+
null != n$1 && (e = e.flatMap(function(t$1) {
|
|
142
|
+
return n$1.map(function(n$2) {
|
|
143
|
+
return t$1.push(n$2), t$1;
|
|
144
|
+
});
|
|
145
|
+
})), u++;
|
|
146
|
+
};;) if (n = o()) return n.v;
|
|
147
|
+
}, s.allFromDict = function(r) {
|
|
148
|
+
var e = t(r);
|
|
149
|
+
return p.all(n(r)).map(function(t) {
|
|
150
|
+
return Object.fromEntries(c(e, t));
|
|
151
|
+
});
|
|
152
|
+
}, s.equals = function(t, n, r) {
|
|
153
|
+
return t.isSome() && n.isSome() ? r(t.get(), n.get()) : t.tag === n.tag;
|
|
154
|
+
}, s.fromJSON = function(t) {
|
|
155
|
+
return "None" === t.tag ? p.None() : p.Some(t.value);
|
|
156
|
+
}, s.prototype.__boxed_type__ = "Option";
|
|
157
|
+
var l, h = s.prototype, v = ((l = Object.create(h)).tag = "None", Object.freeze(l), l), p = s, m = i(), g = i(), O = /* @__PURE__ */ function() {
|
|
158
|
+
function t() {}
|
|
159
|
+
var n = t.prototype;
|
|
160
|
+
return n.map = function(t$1) {
|
|
161
|
+
return "Ok" === this.tag ? k.Ok(t$1(this.value)) : this;
|
|
162
|
+
}, n.mapError = function(t$1) {
|
|
163
|
+
return "Ok" === this.tag ? this : k.Error(t$1(this.error));
|
|
164
|
+
}, n.flatMap = function(t$1) {
|
|
165
|
+
return "Ok" === this.tag ? t$1(this.value) : this;
|
|
166
|
+
}, n.flatMapError = function(t$1) {
|
|
167
|
+
return "Ok" === this.tag ? this : t$1(this.error);
|
|
168
|
+
}, n.get = function() {
|
|
169
|
+
return this.value;
|
|
170
|
+
}, n.getError = function() {
|
|
171
|
+
return this.error;
|
|
172
|
+
}, n.getWithDefault = function(t$1) {
|
|
173
|
+
return "Ok" === this.tag ? this.value : t$1;
|
|
174
|
+
}, n.getOr = function(t$1) {
|
|
175
|
+
return "Ok" === this.tag ? this.value : t$1;
|
|
176
|
+
}, n.mapOr = function(t$1, n$1) {
|
|
177
|
+
return "Error" === this.tag ? t$1 : n$1(this.value);
|
|
178
|
+
}, n.match = function(t$1) {
|
|
179
|
+
return "Ok" === this.tag ? t$1.Ok(this.value) : t$1.Error(this.error);
|
|
180
|
+
}, n.tap = function(t$1) {
|
|
181
|
+
return t$1(this), this;
|
|
182
|
+
}, n.tapOk = function(t$1) {
|
|
183
|
+
return "Ok" === this.tag && t$1(this.value), this;
|
|
184
|
+
}, n.tapError = function(t$1) {
|
|
185
|
+
return "Error" === this.tag && t$1(this.error), this;
|
|
186
|
+
}, n.toOption = function() {
|
|
187
|
+
return "Ok" === this.tag ? p.Some(this.value) : v;
|
|
188
|
+
}, n.isOk = function() {
|
|
189
|
+
return "Ok" === this.tag;
|
|
190
|
+
}, n.isError = function() {
|
|
191
|
+
return "Error" === this.tag;
|
|
192
|
+
}, n.toJSON = function() {
|
|
193
|
+
return this.match({
|
|
194
|
+
Ok: function(t$1) {
|
|
195
|
+
var n$1;
|
|
196
|
+
return (n$1 = {})[a] = "Result", n$1.tag = "Ok", n$1.value = t$1, n$1;
|
|
197
|
+
},
|
|
198
|
+
Error: function(t$1) {
|
|
199
|
+
var n$1;
|
|
200
|
+
return (n$1 = {})[a] = "Result", n$1.tag = "Error", n$1.error = t$1, n$1;
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
}, t;
|
|
204
|
+
}();
|
|
205
|
+
O.P = {
|
|
206
|
+
Ok: function(t) {
|
|
207
|
+
return {
|
|
208
|
+
tag: "Ok",
|
|
209
|
+
value: t
|
|
210
|
+
};
|
|
211
|
+
},
|
|
212
|
+
Error: function(t) {
|
|
213
|
+
return {
|
|
214
|
+
tag: "Error",
|
|
215
|
+
error: t
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
}, O.Ok = function(t) {
|
|
219
|
+
var n = m.get(t);
|
|
220
|
+
if (null == n) {
|
|
221
|
+
var r = Object.create(_);
|
|
222
|
+
return r.tag = "Ok", r.value = t, Object.freeze(r), m.set(t, r), r;
|
|
223
|
+
}
|
|
224
|
+
return n;
|
|
225
|
+
}, O.Error = function(t) {
|
|
226
|
+
var n = g.get(t);
|
|
227
|
+
if (null == n) {
|
|
228
|
+
var r = Object.create(_);
|
|
229
|
+
return r.tag = "Error", r.error = t, Object.freeze(r), g.set(t, r), r;
|
|
230
|
+
}
|
|
231
|
+
return n;
|
|
232
|
+
}, O.isResult = function(t) {
|
|
233
|
+
return null != t && "Result" === t.__boxed_type__;
|
|
234
|
+
}, O.fromExecution = function(t) {
|
|
235
|
+
try {
|
|
236
|
+
return k.Ok(t());
|
|
237
|
+
} catch (t$1) {
|
|
238
|
+
return k.Error(t$1);
|
|
239
|
+
}
|
|
240
|
+
}, O.fromPromise = function(t) {
|
|
241
|
+
try {
|
|
242
|
+
return Promise.resolve(function(n, r) {
|
|
243
|
+
try {
|
|
244
|
+
var e = Promise.resolve(t).then(function(t$1) {
|
|
245
|
+
return k.Ok(t$1);
|
|
246
|
+
});
|
|
247
|
+
} catch (t$1) {
|
|
248
|
+
return r(t$1);
|
|
249
|
+
}
|
|
250
|
+
return e && e.then ? e.then(void 0, r) : e;
|
|
251
|
+
}(0, function(t$1) {
|
|
252
|
+
return k.Error(t$1);
|
|
253
|
+
}));
|
|
254
|
+
} catch (t$1) {
|
|
255
|
+
return Promise.reject(t$1);
|
|
256
|
+
}
|
|
257
|
+
}, O.fromOption = function(t, n) {
|
|
258
|
+
return t.toResult(n);
|
|
259
|
+
}, O.all = function(t) {
|
|
260
|
+
for (var n, r = t.length, e = k.Ok([]), u = 0, o = function() {
|
|
261
|
+
if (u >= r) return { v: e };
|
|
262
|
+
var n$1 = t[u];
|
|
263
|
+
null != n$1 && (e = e.flatMap(function(t$1) {
|
|
264
|
+
return n$1.map(function(n$2) {
|
|
265
|
+
return t$1.push(n$2), t$1;
|
|
266
|
+
});
|
|
267
|
+
})), u++;
|
|
268
|
+
};;) if (n = o()) return n.v;
|
|
269
|
+
}, O.allFromDict = function(r) {
|
|
270
|
+
var e = t(r);
|
|
271
|
+
return k.all(n(r)).map(function(t) {
|
|
272
|
+
return Object.fromEntries(c(e, t));
|
|
273
|
+
});
|
|
274
|
+
}, O.equals = function(t, n, r) {
|
|
275
|
+
return t.tag === n.tag && (!(!t.isError() || !n.isError()) || !(!t.isOk() || !n.isOk()) && r(t.get(), n.get()));
|
|
276
|
+
}, O.fromJSON = function(t) {
|
|
277
|
+
return "Ok" === t.tag ? k.Ok(t.value) : k.Error(t.error);
|
|
278
|
+
}, O.prototype.__boxed_type__ = "Result";
|
|
279
|
+
var _ = O.prototype, k = O, d = function(t, n) {
|
|
280
|
+
return t === n ? 0 : t > n ? 1 : -1;
|
|
281
|
+
}, y = {
|
|
282
|
+
__proto__: null,
|
|
283
|
+
from: Array.from,
|
|
284
|
+
of: Array.of,
|
|
285
|
+
isArray: Array.isArray,
|
|
286
|
+
findMap: function(t, n) {
|
|
287
|
+
for (var r = -1; ++r < t.length;) {
|
|
288
|
+
var e = n(t[r]);
|
|
289
|
+
if (e.isSome()) return e;
|
|
290
|
+
}
|
|
291
|
+
return p.None();
|
|
292
|
+
},
|
|
293
|
+
filterMap: function(t, n) {
|
|
294
|
+
var r = [];
|
|
295
|
+
return t.forEach(function(t$1) {
|
|
296
|
+
var e = n(t$1);
|
|
297
|
+
e.isSome() && r.push(e.get());
|
|
298
|
+
}), r;
|
|
299
|
+
},
|
|
300
|
+
find: function(t, n) {
|
|
301
|
+
for (var r = -1; ++r < t.length;) {
|
|
302
|
+
var e = t[r];
|
|
303
|
+
if (n(e)) return p.Some(e);
|
|
304
|
+
}
|
|
305
|
+
return p.None();
|
|
306
|
+
},
|
|
307
|
+
findIndex: function(t, n) {
|
|
308
|
+
for (var r = -1; ++r < t.length;) if (n(t[r])) return p.Some(r);
|
|
309
|
+
return p.None();
|
|
310
|
+
},
|
|
311
|
+
binarySearchBy: function(t, n, r) {
|
|
312
|
+
if (void 0 === r && (r = d), 0 === t.length) return -1;
|
|
313
|
+
for (var e = 0, u = t.length - 1;;) {
|
|
314
|
+
var o = e + (u - e) / 2 | 0;
|
|
315
|
+
if (o === e || o === u) return u;
|
|
316
|
+
var i = r(n, t[o]);
|
|
317
|
+
if (0 === i) return o;
|
|
318
|
+
i > 0 ? e = o : i < 0 && (u = o);
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
unzip: function(t) {
|
|
322
|
+
for (var n = t.length, r = Array(n), e = Array(n), u = -1; ++u < n;) {
|
|
323
|
+
var o = t[u];
|
|
324
|
+
void 0 !== o && (r[u] = o[0], e[u] = o[1]);
|
|
325
|
+
}
|
|
326
|
+
return [r, e];
|
|
327
|
+
},
|
|
328
|
+
zip: c
|
|
329
|
+
}, E = i(), b = /* @__PURE__ */ function() {
|
|
330
|
+
function t() {}
|
|
331
|
+
var n = t.prototype;
|
|
332
|
+
return n.map = function(t$1) {
|
|
333
|
+
return this === j || this === D ? this : R.Done(t$1(this.value));
|
|
334
|
+
}, n.flatMap = function(t$1) {
|
|
335
|
+
return this === j || this === D ? this : t$1(this.value);
|
|
336
|
+
}, n.mapOkToResult = function(t$1) {
|
|
337
|
+
return this.map(function(n$1) {
|
|
338
|
+
return n$1.match({
|
|
339
|
+
Ok: function(n$2) {
|
|
340
|
+
return t$1(n$2);
|
|
341
|
+
},
|
|
342
|
+
Error: function() {
|
|
343
|
+
return n$1;
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
});
|
|
347
|
+
}, n.mapErrorToResult = function(t$1) {
|
|
348
|
+
return this.map(function(n$1) {
|
|
349
|
+
return n$1.match({
|
|
350
|
+
Error: function(n$2) {
|
|
351
|
+
return t$1(n$2);
|
|
352
|
+
},
|
|
353
|
+
Ok: function() {
|
|
354
|
+
return n$1;
|
|
355
|
+
}
|
|
356
|
+
});
|
|
357
|
+
});
|
|
358
|
+
}, n.mapOk = function(t$1) {
|
|
359
|
+
return this.map(function(n$1) {
|
|
360
|
+
return n$1.match({
|
|
361
|
+
Ok: function(n$2) {
|
|
362
|
+
return k.Ok(t$1(n$2));
|
|
363
|
+
},
|
|
364
|
+
Error: function() {
|
|
365
|
+
return n$1;
|
|
366
|
+
}
|
|
367
|
+
});
|
|
368
|
+
});
|
|
369
|
+
}, n.mapError = function(t$1) {
|
|
370
|
+
return this.map(function(n$1) {
|
|
371
|
+
return n$1.match({
|
|
372
|
+
Ok: function() {
|
|
373
|
+
return n$1;
|
|
374
|
+
},
|
|
375
|
+
Error: function(n$2) {
|
|
376
|
+
return k.Error(t$1(n$2));
|
|
377
|
+
}
|
|
378
|
+
});
|
|
379
|
+
});
|
|
380
|
+
}, n.flatMapOk = function(t$1) {
|
|
381
|
+
return this.flatMap(function(n$1) {
|
|
382
|
+
return n$1.match({
|
|
383
|
+
Ok: function(n$2) {
|
|
384
|
+
return t$1(n$2);
|
|
385
|
+
},
|
|
386
|
+
Error: function() {
|
|
387
|
+
return R.Done(n$1);
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
});
|
|
391
|
+
}, n.flatMapError = function(t$1) {
|
|
392
|
+
return this.flatMap(function(n$1) {
|
|
393
|
+
return n$1.match({
|
|
394
|
+
Ok: function() {
|
|
395
|
+
return R.Done(n$1);
|
|
396
|
+
},
|
|
397
|
+
Error: function(n$2) {
|
|
398
|
+
return t$1(n$2);
|
|
399
|
+
}
|
|
400
|
+
});
|
|
401
|
+
});
|
|
402
|
+
}, n.get = function() {
|
|
403
|
+
return this.value;
|
|
404
|
+
}, n.getWithDefault = function(t$1) {
|
|
405
|
+
return this === j || this === D ? t$1 : this.value;
|
|
406
|
+
}, n.getOr = function(t$1) {
|
|
407
|
+
return this === j || this === D ? t$1 : this.value;
|
|
408
|
+
}, n.mapOr = function(t$1, n$1) {
|
|
409
|
+
return this === j || this === D ? t$1 : n$1(this.value);
|
|
410
|
+
}, n.match = function(t$1) {
|
|
411
|
+
return this === j ? t$1.NotAsked() : this === D ? t$1.Loading() : t$1.Done(this.value);
|
|
412
|
+
}, n.tap = function(t$1) {
|
|
413
|
+
return t$1(this), this;
|
|
414
|
+
}, n.toOption = function() {
|
|
415
|
+
return this === j || this === D ? p.None() : p.Some(this.value);
|
|
416
|
+
}, n.isDone = function() {
|
|
417
|
+
return this !== j && this !== D;
|
|
418
|
+
}, n.isLoading = function() {
|
|
419
|
+
return this === D;
|
|
420
|
+
}, n.isNotAsked = function() {
|
|
421
|
+
return this === j;
|
|
422
|
+
}, n.toJSON = function() {
|
|
423
|
+
return this.match({
|
|
424
|
+
NotAsked: function() {
|
|
425
|
+
var t$1;
|
|
426
|
+
return (t$1 = {})[a] = "AsyncData", t$1.tag = "NotAsked", t$1;
|
|
427
|
+
},
|
|
428
|
+
Loading: function() {
|
|
429
|
+
var t$1;
|
|
430
|
+
return (t$1 = {})[a] = "AsyncData", t$1.tag = "Loading", t$1;
|
|
431
|
+
},
|
|
432
|
+
Done: function(t$1) {
|
|
433
|
+
var n$1;
|
|
434
|
+
return (n$1 = {})[a] = "AsyncData", n$1.tag = "Done", n$1.value = t$1, n$1;
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
}, t;
|
|
438
|
+
}();
|
|
439
|
+
b.P = {
|
|
440
|
+
Done: function(t) {
|
|
441
|
+
return {
|
|
442
|
+
tag: "Done",
|
|
443
|
+
value: t
|
|
444
|
+
};
|
|
445
|
+
},
|
|
446
|
+
NotAsked: { tag: "NotAsked" },
|
|
447
|
+
Loading: { tag: "Loading" }
|
|
448
|
+
}, b.Done = function(t) {
|
|
449
|
+
var n = E.get(t);
|
|
450
|
+
if (null == n) {
|
|
451
|
+
var r = Object.create(N);
|
|
452
|
+
return r.tag = "Done", r.value = t, Object.freeze(r), E.set(t, r), r;
|
|
453
|
+
}
|
|
454
|
+
return n;
|
|
455
|
+
}, b.Loading = function() {
|
|
456
|
+
return D;
|
|
457
|
+
}, b.NotAsked = function() {
|
|
458
|
+
return j;
|
|
459
|
+
}, b.all = function(t) {
|
|
460
|
+
for (var n, r = t.length, e = R.Done([]), u = 0, o = function() {
|
|
461
|
+
if (u >= r) return { v: e };
|
|
462
|
+
var n$1 = t[u];
|
|
463
|
+
null != n$1 && (e = e.flatMap(function(t$1) {
|
|
464
|
+
return n$1.map(function(n$2) {
|
|
465
|
+
return t$1.push(n$2), t$1;
|
|
466
|
+
});
|
|
467
|
+
})), u++;
|
|
468
|
+
};;) if (n = o()) return n.v;
|
|
469
|
+
}, b.allFromDict = function(r) {
|
|
470
|
+
var e = t(r);
|
|
471
|
+
return R.all(n(r)).map(function(t) {
|
|
472
|
+
return Object.fromEntries(c(e, t));
|
|
473
|
+
});
|
|
474
|
+
}, b.equals = function(t, n, r) {
|
|
475
|
+
return "Done" === t.tag && "Done" === n.tag ? r(t.value, n.value) : t.tag === n.tag;
|
|
476
|
+
}, b.isAsyncData = function(t) {
|
|
477
|
+
return null != t && "AsyncData" === t.__boxed_type__;
|
|
478
|
+
}, b.fromJSON = function(t) {
|
|
479
|
+
return "NotAsked" === t.tag ? R.NotAsked() : "Loading" === t.tag ? R.Loading() : R.Done(t.value);
|
|
480
|
+
}, b.prototype.__boxed_type__ = "AsyncData";
|
|
481
|
+
var S, N = b.prototype, D = ((S = Object.create(N)).tag = "Loading", Object.freeze(S), S), j = function() {
|
|
482
|
+
var t = Object.create(N);
|
|
483
|
+
return t.tag = "NotAsked", Object.freeze(t), t;
|
|
484
|
+
}(), R = b, A = /* @__PURE__ */ function() {
|
|
485
|
+
function t() {
|
|
486
|
+
this._state = void 0, this._state = { tag: "Pending" };
|
|
487
|
+
}
|
|
488
|
+
t.fromPromise = function(t$1) {
|
|
489
|
+
return P.make(function(n$1) {
|
|
490
|
+
t$1.then(function(t$2) {
|
|
491
|
+
return n$1(k.Ok(t$2));
|
|
492
|
+
}, function(t$2) {
|
|
493
|
+
return n$1(k.Error(t$2));
|
|
494
|
+
});
|
|
495
|
+
});
|
|
496
|
+
};
|
|
497
|
+
var n = t.prototype;
|
|
498
|
+
return n.onResolve = function(t$1) {
|
|
499
|
+
var n$1;
|
|
500
|
+
"Pending" === this._state.tag ? (this._state.resolveCallbacks = null != (n$1 = this._state.resolveCallbacks) ? n$1 : [], this._state.resolveCallbacks.push(t$1)) : "Resolved" === this._state.tag && t$1(this._state.value);
|
|
501
|
+
}, n.onCancel = function(t$1) {
|
|
502
|
+
var n$1;
|
|
503
|
+
"Pending" === this._state.tag ? (this._state.cancelCallbacks = null != (n$1 = this._state.cancelCallbacks) ? n$1 : [], this._state.cancelCallbacks.push(t$1)) : "Cancelled" === this._state.tag && t$1();
|
|
504
|
+
}, n.cancel = function() {
|
|
505
|
+
if ("Pending" === this._state.tag) {
|
|
506
|
+
var t$1 = this._state, n$1 = t$1.cancel, r = t$1.cancelCallbacks;
|
|
507
|
+
this._state = { tag: "Cancelled" }, n$1?.(), r?.forEach(function(t$2) {
|
|
508
|
+
return t$2();
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
}, n.map = function(t$1, n$1) {
|
|
512
|
+
var r = this;
|
|
513
|
+
void 0 === n$1 && (n$1 = !1);
|
|
514
|
+
var e = P.make(function(e$1) {
|
|
515
|
+
if (r.onResolve(function(n$2) {
|
|
516
|
+
e$1(t$1(n$2));
|
|
517
|
+
}), n$1) return function() {
|
|
518
|
+
r.cancel();
|
|
519
|
+
};
|
|
520
|
+
});
|
|
521
|
+
return this.onCancel(function() {
|
|
522
|
+
e.cancel();
|
|
523
|
+
}), e;
|
|
524
|
+
}, n.then = function(t$1) {
|
|
525
|
+
return this.onResolve(t$1), this;
|
|
526
|
+
}, n.flatMap = function(t$1, n$1) {
|
|
527
|
+
var r = this;
|
|
528
|
+
void 0 === n$1 && (n$1 = !1);
|
|
529
|
+
var e = P.make(function(u) {
|
|
530
|
+
if (r.onResolve(function(n$2) {
|
|
531
|
+
var r$1 = t$1(n$2);
|
|
532
|
+
r$1.onResolve(u), r$1.onCancel(function() {
|
|
533
|
+
return e.cancel();
|
|
534
|
+
});
|
|
535
|
+
}), n$1) return function() {
|
|
536
|
+
r.cancel();
|
|
537
|
+
};
|
|
538
|
+
});
|
|
539
|
+
return this.onCancel(function() {
|
|
540
|
+
e.cancel();
|
|
541
|
+
}), e;
|
|
542
|
+
}, n.tap = function(t$1) {
|
|
543
|
+
return this.onResolve(t$1), this;
|
|
544
|
+
}, n.tapOk = function(t$1) {
|
|
545
|
+
return this.onResolve(function(n$1) {
|
|
546
|
+
n$1.match({
|
|
547
|
+
Ok: function(n$2) {
|
|
548
|
+
return t$1(n$2);
|
|
549
|
+
},
|
|
550
|
+
Error: function() {}
|
|
551
|
+
});
|
|
552
|
+
}), this;
|
|
553
|
+
}, n.tapError = function(t$1) {
|
|
554
|
+
return this.onResolve(function(n$1) {
|
|
555
|
+
n$1.match({
|
|
556
|
+
Ok: function() {},
|
|
557
|
+
Error: function(n$2) {
|
|
558
|
+
return t$1(n$2);
|
|
559
|
+
}
|
|
560
|
+
});
|
|
561
|
+
}), this;
|
|
562
|
+
}, n.mapOkToResult = function(t$1, n$1) {
|
|
563
|
+
return void 0 === n$1 && (n$1 = !1), this.map(function(n$2) {
|
|
564
|
+
return n$2.match({
|
|
565
|
+
Ok: function(n$3) {
|
|
566
|
+
return t$1(n$3);
|
|
567
|
+
},
|
|
568
|
+
Error: function() {
|
|
569
|
+
return n$2;
|
|
570
|
+
}
|
|
571
|
+
});
|
|
572
|
+
}, n$1);
|
|
573
|
+
}, n.mapErrorToResult = function(t$1, n$1) {
|
|
574
|
+
return void 0 === n$1 && (n$1 = !1), this.map(function(n$2) {
|
|
575
|
+
return n$2.match({
|
|
576
|
+
Error: function(n$3) {
|
|
577
|
+
return t$1(n$3);
|
|
578
|
+
},
|
|
579
|
+
Ok: function() {
|
|
580
|
+
return n$2;
|
|
581
|
+
}
|
|
582
|
+
});
|
|
583
|
+
}, n$1);
|
|
584
|
+
}, n.mapOk = function(t$1, n$1) {
|
|
585
|
+
return void 0 === n$1 && (n$1 = !1), this.map(function(n$2) {
|
|
586
|
+
return n$2.match({
|
|
587
|
+
Ok: function(n$3) {
|
|
588
|
+
return k.Ok(t$1(n$3));
|
|
589
|
+
},
|
|
590
|
+
Error: function() {
|
|
591
|
+
return n$2;
|
|
592
|
+
}
|
|
593
|
+
});
|
|
594
|
+
}, n$1);
|
|
595
|
+
}, n.mapError = function(t$1, n$1) {
|
|
596
|
+
return void 0 === n$1 && (n$1 = !1), this.map(function(n$2) {
|
|
597
|
+
return n$2.match({
|
|
598
|
+
Ok: function() {
|
|
599
|
+
return n$2;
|
|
600
|
+
},
|
|
601
|
+
Error: function(n$3) {
|
|
602
|
+
return k.Error(t$1(n$3));
|
|
603
|
+
}
|
|
604
|
+
});
|
|
605
|
+
}, n$1);
|
|
606
|
+
}, n.flatMapOk = function(t$1, n$1) {
|
|
607
|
+
return void 0 === n$1 && (n$1 = !1), this.flatMap(function(n$2) {
|
|
608
|
+
return n$2.match({
|
|
609
|
+
Ok: function(n$3) {
|
|
610
|
+
return t$1(n$3);
|
|
611
|
+
},
|
|
612
|
+
Error: function() {
|
|
613
|
+
return P.value(n$2);
|
|
614
|
+
}
|
|
615
|
+
});
|
|
616
|
+
}, n$1);
|
|
617
|
+
}, n.flatMapError = function(t$1, n$1) {
|
|
618
|
+
return void 0 === n$1 && (n$1 = !1), this.flatMap(function(n$2) {
|
|
619
|
+
return n$2.match({
|
|
620
|
+
Ok: function() {
|
|
621
|
+
return P.value(n$2);
|
|
622
|
+
},
|
|
623
|
+
Error: function(n$3) {
|
|
624
|
+
return t$1(n$3);
|
|
625
|
+
}
|
|
626
|
+
});
|
|
627
|
+
}, n$1);
|
|
628
|
+
}, n.toPromise = function() {
|
|
629
|
+
var t$1 = this;
|
|
630
|
+
return new Promise(function(n$1) {
|
|
631
|
+
t$1.onResolve(n$1);
|
|
632
|
+
});
|
|
633
|
+
}, n.resultToPromise = function() {
|
|
634
|
+
var t$1 = this;
|
|
635
|
+
return new Promise(function(n$1, r) {
|
|
636
|
+
t$1.onResolve(function(t$2) {
|
|
637
|
+
t$2.match({
|
|
638
|
+
Ok: n$1,
|
|
639
|
+
Error: r
|
|
640
|
+
});
|
|
641
|
+
});
|
|
642
|
+
});
|
|
643
|
+
}, t;
|
|
644
|
+
}();
|
|
645
|
+
A.make = function(t) {
|
|
646
|
+
var n = Object.create(M);
|
|
647
|
+
return n._state = { tag: "Pending" }, n._state.cancel = t(function(t$1) {
|
|
648
|
+
if ("Pending" === n._state.tag) {
|
|
649
|
+
var r = n._state.resolveCallbacks;
|
|
650
|
+
n._state = {
|
|
651
|
+
tag: "Resolved",
|
|
652
|
+
value: t$1
|
|
653
|
+
}, r?.forEach(function(n$1) {
|
|
654
|
+
return n$1(t$1);
|
|
655
|
+
});
|
|
656
|
+
}
|
|
657
|
+
}), n;
|
|
658
|
+
}, A.isFuture = function(t) {
|
|
659
|
+
return null != t && Object.prototype.isPrototypeOf.call(M, t);
|
|
660
|
+
}, A.value = function(t) {
|
|
661
|
+
var n = Object.create(M);
|
|
662
|
+
return n._state = {
|
|
663
|
+
tag: "Resolved",
|
|
664
|
+
value: t
|
|
665
|
+
}, n;
|
|
666
|
+
}, A.all = function(t, n) {
|
|
667
|
+
void 0 === n && (n = !1);
|
|
668
|
+
for (var r, e = t.length, u = P.value([]), o = 0, i = function() {
|
|
669
|
+
if (o >= e) return { v: u };
|
|
670
|
+
var r$1 = t[o];
|
|
671
|
+
null != r$1 && (u = u.flatMap(function(t$1) {
|
|
672
|
+
return r$1.map(function(n$1) {
|
|
673
|
+
return t$1.push(n$1), t$1;
|
|
674
|
+
}, n);
|
|
675
|
+
}, n)), o++;
|
|
676
|
+
};;) if (r = i()) return r.v;
|
|
677
|
+
}, A.allFromDict = function(r) {
|
|
678
|
+
var e = t(r);
|
|
679
|
+
return P.all(n(r)).map(function(t) {
|
|
680
|
+
return Object.fromEntries(c(e, t));
|
|
681
|
+
});
|
|
682
|
+
}, A.wait = function(t) {
|
|
683
|
+
return P.make(function(n) {
|
|
684
|
+
var r = setTimeout(function() {
|
|
685
|
+
return n();
|
|
686
|
+
}, t);
|
|
687
|
+
return function() {
|
|
688
|
+
return clearTimeout(r);
|
|
689
|
+
};
|
|
690
|
+
});
|
|
691
|
+
}, A.retry = function(t, n) {
|
|
692
|
+
var r = n.max;
|
|
693
|
+
return function n$1(e) {
|
|
694
|
+
return t(e).flatMapError(function(t$1) {
|
|
695
|
+
return e + 1 < r ? n$1(e + 1) : P.value(k.Error(t$1));
|
|
696
|
+
});
|
|
697
|
+
}(0);
|
|
698
|
+
}, A.concurrent = function(t, n) {
|
|
699
|
+
var r = n.concurrency;
|
|
700
|
+
return P.make(function(n$1) {
|
|
701
|
+
var e = Array(t.length), u = r - 1, o = 0;
|
|
702
|
+
0 !== t.length ? t.slice(0, r).forEach(function r$1(i, a) {
|
|
703
|
+
return i().tap(function(i$1) {
|
|
704
|
+
if (e[a] = i$1, ++o < t.length) {
|
|
705
|
+
var c = t[++u];
|
|
706
|
+
null != c && r$1(c, u);
|
|
707
|
+
} else n$1(e);
|
|
708
|
+
});
|
|
709
|
+
}) : n$1([]);
|
|
710
|
+
});
|
|
711
|
+
};
|
|
712
|
+
var M = Object.create(null, Object.getOwnPropertyDescriptors(A.prototype)), P = A, x = { make: function() {
|
|
713
|
+
var t;
|
|
714
|
+
return [P.make(function(n) {
|
|
715
|
+
t = n;
|
|
716
|
+
}), t];
|
|
717
|
+
} }, C = Symbol("NOT_COMPUTED");
|
|
718
|
+
function z() {
|
|
719
|
+
return z = Object.assign ? Object.assign.bind() : function(t) {
|
|
720
|
+
for (var n = 1; n < arguments.length; n++) {
|
|
721
|
+
var r = arguments[n];
|
|
722
|
+
for (var e in r) Object.prototype.hasOwnProperty.call(r, e) && (t[e] = r[e]);
|
|
723
|
+
}
|
|
724
|
+
return t;
|
|
725
|
+
}, z.apply(this, arguments);
|
|
726
|
+
}
|
|
727
|
+
var J = {
|
|
728
|
+
__proto__: null,
|
|
729
|
+
encode: function(t, n) {
|
|
730
|
+
return JSON.stringify(t, function(t$1, n$1) {
|
|
731
|
+
return null == n$1 ? n$1 : "string" == typeof n$1[a] ? z({}, n$1, { __boxed_type__: n$1[a] }) : n$1;
|
|
732
|
+
}, n);
|
|
733
|
+
},
|
|
734
|
+
decode: function(t) {
|
|
735
|
+
return JSON.parse(t, function(t$1, n) {
|
|
736
|
+
return null == n ? n : "Option" === n.__boxed_type__ ? p.fromJSON(n) : "Result" === n.__boxed_type__ ? k.fromJSON(n) : "AsyncData" === n.__boxed_type__ ? R.fromJSON(n) : n;
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
};
|
|
740
|
+
exports.Array = y, exports.AsyncData = R, exports.Deferred = x, exports.Dict = e, exports.Future = P, exports.Lazy = function(t) {
|
|
741
|
+
var n = { contents: C };
|
|
742
|
+
return { get: function() {
|
|
743
|
+
return n.contents === C && (n.contents = t()), n.contents;
|
|
744
|
+
} };
|
|
745
|
+
}, exports.Option = p, exports.Result = k, exports.Serializer = J;
|
|
746
|
+
}));
|
|
747
|
+
|
|
748
|
+
//#endregion
|
|
4
749
|
//#region \0@oxc-project+runtime@0.103.0/helpers/decorateMetadata.js
|
|
750
|
+
var import_Boxed = require_Boxed();
|
|
5
751
|
function __decorateMetadata(k, v) {
|
|
6
752
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
7
753
|
}
|
|
@@ -50,10 +796,11 @@ let AmqpClientService = class AmqpClientService$1 {
|
|
|
50
796
|
}
|
|
51
797
|
/**
|
|
52
798
|
* Publish a message using a defined publisher
|
|
53
|
-
* This method provides type-safe message publishing
|
|
799
|
+
* This method provides type-safe message publishing with explicit error handling
|
|
800
|
+
* Returns Result<boolean, ClientError> for runtime errors
|
|
54
801
|
*/
|
|
55
|
-
|
|
56
|
-
if (!this.client)
|
|
802
|
+
publish(publisherName, message, options) {
|
|
803
|
+
if (!this.client) return import_Boxed.Result.Error(new TechnicalError("Client not initialized. Ensure the module has been initialized before publishing."));
|
|
57
804
|
return this.client.publish(publisherName, message, options);
|
|
58
805
|
}
|
|
59
806
|
};
|