gingersnap 0.22.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.
Files changed (251) hide show
  1. package/_virtual/_tslib.cjs +102 -0
  2. package/_virtual/_tslib.mjs +93 -0
  3. package/data/AtomicValue.d.ts +15 -0
  4. package/data/bus.cjs +179 -0
  5. package/data/bus.d.ts +72 -0
  6. package/data/bus.mjs +177 -0
  7. package/data/decoders/index.d.ts +4 -0
  8. package/data/decoders/json.cjs +12 -0
  9. package/data/decoders/json.d.ts +7 -0
  10. package/data/decoders/json.mjs +10 -0
  11. package/data/decoders/msgpack.cjs +14 -0
  12. package/data/decoders/msgpack.d.ts +7 -0
  13. package/data/decoders/msgpack.mjs +12 -0
  14. package/data/decoders/protobuf.d.ts +13 -0
  15. package/data/decoders/string.cjs +12 -0
  16. package/data/decoders/string.d.ts +7 -0
  17. package/data/decoders/string.mjs +10 -0
  18. package/data/decoders/type.d.ts +7 -0
  19. package/data/decoders.cjs +11 -0
  20. package/data/decoders.mjs +3 -0
  21. package/data/model/credentials.cjs +114 -0
  22. package/data/model/credentials.d.ts +61 -0
  23. package/data/model/credentials.mjs +109 -0
  24. package/data/model/extra.cjs +88 -0
  25. package/data/model/extra.d.ts +5 -0
  26. package/data/model/extra.mjs +66 -0
  27. package/data/model/index.d.ts +6 -0
  28. package/data/model/model.cjs +541 -0
  29. package/data/model/model.d.ts +207 -0
  30. package/data/model/model.mjs +518 -0
  31. package/data/model/plugin.cjs +96 -0
  32. package/data/model/plugin.d.ts +38 -0
  33. package/data/model/plugin.mjs +72 -0
  34. package/data/model/property.cjs +310 -0
  35. package/data/model/property.d.ts +83 -0
  36. package/data/model/property.mjs +278 -0
  37. package/data/model/types.cjs +32 -0
  38. package/data/model/types.d.ts +28 -0
  39. package/data/model/types.mjs +32 -0
  40. package/data/model.cjs +43 -0
  41. package/data/model.mjs +6 -0
  42. package/data/signal.cjs +47 -0
  43. package/data/signal.d.ts +17 -0
  44. package/data/signal.mjs +45 -0
  45. package/data/store/index.d.ts +4 -0
  46. package/data/store/json.cjs +58 -0
  47. package/data/store/json.d.ts +18 -0
  48. package/data/store/json.mjs +56 -0
  49. package/data/store/manager.cjs +206 -0
  50. package/data/store/manager.d.ts +44 -0
  51. package/data/store/manager.mjs +203 -0
  52. package/data/store/web.cjs +92 -0
  53. package/data/store/web.d.ts +25 -0
  54. package/data/store/web.mjs +89 -0
  55. package/data/value.cjs +66 -0
  56. package/data/value.mjs +64 -0
  57. package/data-structures/array/CyclicalList.cjs +57 -0
  58. package/data-structures/array/CyclicalList.d.ts +12 -0
  59. package/data-structures/array/CyclicalList.mjs +55 -0
  60. package/data-structures/array/Pair.cjs +30 -0
  61. package/data-structures/array/Pair.d.ts +17 -0
  62. package/data-structures/array/Pair.mjs +27 -0
  63. package/data-structures/array/Stack.cjs +96 -0
  64. package/data-structures/array/Stack.d.ts +41 -0
  65. package/data-structures/array/Stack.mjs +94 -0
  66. package/data-structures/array/Triple.cjs +34 -0
  67. package/data-structures/array/Triple.d.ts +19 -0
  68. package/data-structures/array/Triple.mjs +31 -0
  69. package/data-structures/array/Tuple.d.ts +8 -0
  70. package/data-structures/array/index.d.ts +5 -0
  71. package/data-structures/array.cjs +15 -0
  72. package/data-structures/array.mjs +4 -0
  73. package/data-structures/object/BufferQueue.cjs +98 -0
  74. package/data-structures/object/BufferQueue.d.ts +21 -0
  75. package/data-structures/object/BufferQueue.mjs +77 -0
  76. package/data-structures/object/CyclicalObject.cjs +155 -0
  77. package/data-structures/object/CyclicalObject.d.ts +74 -0
  78. package/data-structures/object/CyclicalObject.mjs +134 -0
  79. package/data-structures/object/Queue.cjs +178 -0
  80. package/data-structures/object/Queue.d.ts +31 -0
  81. package/data-structures/object/Queue.mjs +176 -0
  82. package/data-structures/object/SimpleQueue.cjs +53 -0
  83. package/data-structures/object/SimpleQueue.d.ts +13 -0
  84. package/data-structures/object/SimpleQueue.mjs +51 -0
  85. package/data-structures/object/TimeableObject.cjs +73 -0
  86. package/data-structures/object/TimeableObject.d.ts +30 -0
  87. package/data-structures/object/TimeableObject.mjs +71 -0
  88. package/data-structures/object/WaitableObject.cjs +61 -0
  89. package/data-structures/object/WaitableObject.d.ts +29 -0
  90. package/data-structures/object/WaitableObject.mjs +59 -0
  91. package/data-structures/object/WatchableObject.cjs +251 -0
  92. package/data-structures/object/WatchableObject.d.ts +88 -0
  93. package/data-structures/object/WatchableObject.mjs +230 -0
  94. package/data-structures/object/index.d.ts +7 -0
  95. package/data-structures/object.cjs +23 -0
  96. package/data-structures/object.mjs +7 -0
  97. package/errors/AbortError.cjs +9 -0
  98. package/errors/AbortError.d.ts +5 -0
  99. package/errors/AbortError.mjs +7 -0
  100. package/errors/CallExecutionError.cjs +13 -0
  101. package/errors/CallExecutionError.d.ts +7 -0
  102. package/errors/CallExecutionError.mjs +11 -0
  103. package/errors/FutureCancelled.cjs +11 -0
  104. package/errors/FutureCancelled.d.ts +6 -0
  105. package/errors/FutureCancelled.mjs +9 -0
  106. package/errors/FutureError.cjs +11 -0
  107. package/errors/FutureError.d.ts +6 -0
  108. package/errors/FutureError.mjs +9 -0
  109. package/errors/IllegalArgumentsError.cjs +13 -0
  110. package/errors/IllegalArgumentsError.d.ts +7 -0
  111. package/errors/IllegalArgumentsError.mjs +11 -0
  112. package/errors/IllegalOperationError.cjs +6 -0
  113. package/errors/IllegalOperationError.d.ts +2 -0
  114. package/errors/IllegalOperationError.mjs +4 -0
  115. package/errors/InvalidType.cjs +6 -0
  116. package/errors/InvalidType.d.ts +2 -0
  117. package/errors/InvalidType.mjs +4 -0
  118. package/errors/InvalidValue.cjs +11 -0
  119. package/errors/InvalidValue.d.ts +4 -0
  120. package/errors/InvalidValue.mjs +9 -0
  121. package/errors/MissingArgumentsError.cjs +13 -0
  122. package/errors/MissingArgumentsError.d.ts +7 -0
  123. package/errors/MissingArgumentsError.mjs +11 -0
  124. package/errors/NetworkError.cjs +13 -0
  125. package/errors/NetworkError.d.ts +8 -0
  126. package/errors/NetworkError.mjs +11 -0
  127. package/errors/NoSuchElement.cjs +6 -0
  128. package/errors/NoSuchElement.d.ts +2 -0
  129. package/errors/NoSuchElement.mjs +4 -0
  130. package/errors/NotImplemented.cjs +9 -0
  131. package/errors/NotImplemented.d.ts +5 -0
  132. package/errors/NotImplemented.mjs +7 -0
  133. package/errors/ParsingError.cjs +10 -0
  134. package/errors/ParsingError.d.ts +5 -0
  135. package/errors/ParsingError.mjs +8 -0
  136. package/errors/QueueEmptyError.cjs +6 -0
  137. package/errors/QueueEmptyError.d.ts +2 -0
  138. package/errors/QueueEmptyError.mjs +4 -0
  139. package/errors/QueueFullError.cjs +6 -0
  140. package/errors/QueueFullError.d.ts +2 -0
  141. package/errors/QueueFullError.mjs +4 -0
  142. package/errors/StackEmptyError.cjs +6 -0
  143. package/errors/StackEmptyError.d.ts +2 -0
  144. package/errors/StackEmptyError.mjs +4 -0
  145. package/errors/StackFullError.cjs +6 -0
  146. package/errors/StackFullError.d.ts +2 -0
  147. package/errors/StackFullError.mjs +4 -0
  148. package/errors/StreamEnded.cjs +6 -0
  149. package/errors/StreamEnded.d.ts +2 -0
  150. package/errors/StreamEnded.mjs +4 -0
  151. package/errors/TimeoutError.cjs +11 -0
  152. package/errors/TimeoutError.d.ts +6 -0
  153. package/errors/TimeoutError.mjs +9 -0
  154. package/errors/ValueDestroyedError.cjs +6 -0
  155. package/errors/ValueDestroyedError.d.ts +2 -0
  156. package/errors/ValueDestroyedError.mjs +4 -0
  157. package/errors/VerificationError.cjs +9 -0
  158. package/errors/VerificationError.d.ts +5 -0
  159. package/errors/VerificationError.mjs +7 -0
  160. package/errors/index.d.ts +18 -0
  161. package/errors.cjs +41 -0
  162. package/errors.mjs +18 -0
  163. package/files.cjs +201 -0
  164. package/files.d.ts +31 -0
  165. package/files.mjs +180 -0
  166. package/functools/index.d.ts +31 -0
  167. package/functools.cjs +371 -0
  168. package/functools.mjs +334 -0
  169. package/future/future.cjs +570 -0
  170. package/future/future.d.ts +208 -0
  171. package/future/future.mjs +548 -0
  172. package/future/group.cjs +180 -0
  173. package/future/group.d.ts +82 -0
  174. package/future/group.mjs +159 -0
  175. package/future/index.d.ts +3 -0
  176. package/future/result.cjs +19 -0
  177. package/future/result.d.ts +18 -0
  178. package/future/result.mjs +17 -0
  179. package/future.cjs +11 -0
  180. package/future.mjs +3 -0
  181. package/managers/context.d.ts +8 -0
  182. package/managers/index.d.ts +1 -0
  183. package/managers.cjs +2 -0
  184. package/managers.mjs +1 -0
  185. package/mocks.cjs +301 -0
  186. package/mocks.d.ts +125 -0
  187. package/mocks.mjs +293 -0
  188. package/networking/EventSourceService.cjs +104 -0
  189. package/networking/EventSourceService.d.ts +11 -0
  190. package/networking/EventSourceService.mjs +83 -0
  191. package/networking/NetworkService.cjs +394 -0
  192. package/networking/NetworkService.d.ts +97 -0
  193. package/networking/NetworkService.mjs +373 -0
  194. package/networking/SocketService.cjs +218 -0
  195. package/networking/SocketService.d.ts +23 -0
  196. package/networking/SocketService.mjs +197 -0
  197. package/networking/decorators/index.d.ts +4 -0
  198. package/networking/decorators/options.cjs +289 -0
  199. package/networking/decorators/options.d.ts +148 -0
  200. package/networking/decorators/options.mjs +242 -0
  201. package/networking/decorators/requests.cjs +80 -0
  202. package/networking/decorators/requests.d.ts +34 -0
  203. package/networking/decorators/requests.mjs +52 -0
  204. package/networking/decorators/socket.cjs +81 -0
  205. package/networking/decorators/socket.d.ts +13 -0
  206. package/networking/decorators/socket.mjs +51 -0
  207. package/networking/http.cjs +69 -0
  208. package/networking/http.d.ts +66 -0
  209. package/networking/http.mjs +69 -0
  210. package/networking/index.d.ts +39 -0
  211. package/networking/request.cjs +18 -0
  212. package/networking/request.d.ts +9 -0
  213. package/networking/request.mjs +16 -0
  214. package/networking/types.cjs +37 -0
  215. package/networking/types.d.ts +132 -0
  216. package/networking/types.mjs +35 -0
  217. package/networking.cjs +91 -0
  218. package/networking.mjs +33 -0
  219. package/package.json +1 -0
  220. package/reflection/injector.cjs +43 -0
  221. package/reflection/injector.d.ts +3 -0
  222. package/reflection/injector.mjs +40 -0
  223. package/socket.cjs +239 -0
  224. package/socket.d.ts +65 -0
  225. package/socket.mjs +237 -0
  226. package/store.cjs +12 -0
  227. package/store.mjs +3 -0
  228. package/stream/call.cjs +157 -0
  229. package/stream/call.d.ts +66 -0
  230. package/stream/call.mjs +154 -0
  231. package/stream/collector.cjs +217 -0
  232. package/stream/collector.d.ts +14 -0
  233. package/stream/collector.mjs +215 -0
  234. package/stream/index.d.ts +257 -0
  235. package/stream/observable.cjs +110 -0
  236. package/stream/observable.d.ts +65 -0
  237. package/stream/observable.mjs +106 -0
  238. package/stream/state.cjs +10 -0
  239. package/stream/state.d.ts +5 -0
  240. package/stream/state.mjs +8 -0
  241. package/stream.cjs +1153 -0
  242. package/stream.mjs +1132 -0
  243. package/synchronize.cjs +106 -0
  244. package/synchronize.d.ts +54 -0
  245. package/synchronize.mjs +103 -0
  246. package/typing/types.d.ts +24 -0
  247. package/typing.cjs +2 -0
  248. package/typing.mjs +1 -0
  249. package/utils/parser.cjs +37 -0
  250. package/utils/parser.d.ts +7 -0
  251. package/utils/parser.mjs +16 -0
@@ -0,0 +1,230 @@
1
+ import { __awaiter, __asyncValues } from '../../_virtual/_tslib.mjs';
2
+ import { WaitableObject } from './WaitableObject.mjs';
3
+ import { Future } from '../../future/future.mjs';
4
+ import * as R from 'ramda';
5
+ import { FutureEvent } from '../../synchronize.mjs';
6
+ import { Stream } from '../../stream.mjs';
7
+ import { ExecutorState } from '../../stream/state.mjs';
8
+ import { SimpleQueue } from './SimpleQueue.mjs';
9
+
10
+ var WatchableObjectOperations;
11
+ (function (WatchableObjectOperations) {
12
+ WatchableObjectOperations[WatchableObjectOperations["DELETE"] = 0] = "DELETE";
13
+ WatchableObjectOperations[WatchableObjectOperations["GET"] = 1] = "GET";
14
+ WatchableObjectOperations[WatchableObjectOperations["SET"] = 2] = "SET";
15
+ WatchableObjectOperations[WatchableObjectOperations["CLEAR"] = 3] = "CLEAR";
16
+ WatchableObjectOperations[WatchableObjectOperations["VALUES"] = 4] = "VALUES";
17
+ })(WatchableObjectOperations || (WatchableObjectOperations = {}));
18
+ class WatchableObject extends WaitableObject {
19
+ constructor(objectMaxSize, expiryPeriod) {
20
+ super(objectMaxSize, expiryPeriod);
21
+ this.getListeners = [];
22
+ this.setListeners = [];
23
+ this.deleteListeners = [];
24
+ this.clearListeners = [];
25
+ this.valuesListeners = [];
26
+ }
27
+ /**
28
+ * Ingest data from the given stream into the queue. The future returned is
29
+ * already scheduled to execute in the background. However, you can cancel
30
+ * ingestion at anytime by cancelling the returned future
31
+ *
32
+ * Important Note:
33
+ * - Cancelling the ingestion does not kill the stream, only stops
34
+ * monitoring the stream for incoming data
35
+ * - If ingestion is cancelled and data had been retrieved at that period, the
36
+ * data will discarded
37
+ * @param stream input data stream
38
+ * @param keyExtractor used to get the key for storing the incoming data
39
+ */
40
+ ingest(stream, keyExtractor) {
41
+ return this.ingestStream(stream, (data) => this.set(keyExtractor(data), data));
42
+ }
43
+ clone() {
44
+ return super.clone();
45
+ }
46
+ /**
47
+ * Stream of changes made to the object via SET, DELETE or CLEAR commands
48
+ */
49
+ changeStream() {
50
+ const evt = new FutureEvent();
51
+ const queue = new SimpleQueue();
52
+ const cancelSet = this.onSet((key, oldValue, newValue) => {
53
+ queue.enqueue({
54
+ type: WatchableObjectOperations.SET,
55
+ key,
56
+ oldValue,
57
+ newValue,
58
+ });
59
+ evt.set();
60
+ });
61
+ const cancelDelete = this.onDelete((key, oldValue) => {
62
+ queue.enqueue({
63
+ type: WatchableObjectOperations.DELETE,
64
+ key,
65
+ oldValue,
66
+ });
67
+ evt.set();
68
+ });
69
+ const cancelClear = this.onClear(() => {
70
+ queue.enqueue({
71
+ type: WatchableObjectOperations.CLEAR,
72
+ key: "*",
73
+ });
74
+ evt.set();
75
+ });
76
+ const cleanup = R.once(() => {
77
+ cancelClear();
78
+ cancelSet();
79
+ cancelDelete();
80
+ });
81
+ return new Stream((signal) => __awaiter(this, void 0, void 0, function* () {
82
+ signal.onabort = cleanup;
83
+ while (queue.empty && !signal.aborted) {
84
+ yield evt.wait();
85
+ evt.clear();
86
+ }
87
+ if (signal.aborted) {
88
+ return new ExecutorState(true);
89
+ }
90
+ return queue.dequeue();
91
+ }));
92
+ }
93
+ /**
94
+ * Listens whenever a value is retrieved from this object
95
+ * @param listener
96
+ * @returns unsubscribe function
97
+ */
98
+ onGet(listener) {
99
+ this.getListeners.push(listener);
100
+ return () => {
101
+ this.getListeners = this.getListeners.filter((v) => v !== listener);
102
+ };
103
+ }
104
+ /**
105
+ * Listens whenever a property is added or updated on this object
106
+ * @param listener
107
+ * @returns unsubscribe function
108
+ */
109
+ onSet(listener) {
110
+ this.setListeners.push(listener);
111
+ return () => {
112
+ this.setListeners = this.setListeners.filter((v) => v !== listener);
113
+ };
114
+ }
115
+ /**
116
+ * Listens whenever a property is deleted from this object
117
+ * @param listener
118
+ * @returns unsubscribe function
119
+ */
120
+ onDelete(listener) {
121
+ this.deleteListeners.push(listener);
122
+ return () => {
123
+ this.deleteListeners = this.deleteListeners.filter((v) => v !== listener);
124
+ };
125
+ }
126
+ /**
127
+ * Listens whenever this object is wiped clean
128
+ * @param listener
129
+ * @returns unsubscribe function
130
+ */
131
+ onClear(listener) {
132
+ this.clearListeners.push(listener);
133
+ return () => {
134
+ this.clearListeners = this.clearListeners.filter((v) => v !== listener);
135
+ };
136
+ }
137
+ /**
138
+ * Listens whenever the values() method is invoked on this object
139
+ * @param listener
140
+ * @returns unsubscribe function
141
+ */
142
+ onValues(listener) {
143
+ this.valuesListeners.push(listener);
144
+ return () => {
145
+ this.valuesListeners = this.valuesListeners.filter((v) => v !== listener);
146
+ };
147
+ }
148
+ get(key, defaultValue) {
149
+ Future.sleep(1)
150
+ .thenApply(() => this.getListeners.forEach((listener) => listener(key)))
151
+ .run();
152
+ return super.get(key, defaultValue);
153
+ }
154
+ set(key, value, expiryPeriod) {
155
+ const oldValue = this.get(key);
156
+ super.set(key, value, expiryPeriod);
157
+ this.setListeners.forEach((listener) => listener(key, oldValue, value));
158
+ }
159
+ delete(key) {
160
+ const oldValue = this.get(key);
161
+ super.delete(key);
162
+ if (oldValue !== undefined)
163
+ this.deleteListeners.forEach((listener) => listener(key, oldValue));
164
+ }
165
+ clear() {
166
+ super.clear();
167
+ this.clearListeners.forEach((listener) => listener());
168
+ }
169
+ await(key, abort) {
170
+ return super.await(key, abort).thenApply((value) => {
171
+ Future.sleep(1)
172
+ .thenApply(() => this.getListeners.forEach((listener) => listener(key)))
173
+ .run();
174
+ return value.value;
175
+ });
176
+ }
177
+ on(key, callback, multiCall = true) {
178
+ return super.on(key, (v) => {
179
+ Future.sleep(1)
180
+ .thenApply(() => this.getListeners.forEach((listener) => listener(key)))
181
+ .run();
182
+ callback(v);
183
+ }, multiCall);
184
+ }
185
+ values(copy) {
186
+ Future.sleep(1)
187
+ .thenApply(() => this.valuesListeners.forEach((listener) => listener()))
188
+ .run();
189
+ return super.values(copy);
190
+ }
191
+ ingestStream(stream, handler) {
192
+ return Future.of((_, __, signal) => __awaiter(this, void 0, void 0, function* () {
193
+ var _a, e_1, _b, _c;
194
+ try {
195
+ for (var _d = true, stream_1 = __asyncValues(stream), stream_1_1; stream_1_1 = yield stream_1.next(), _a = stream_1_1.done, !_a;) {
196
+ _c = stream_1_1.value;
197
+ _d = false;
198
+ try {
199
+ const data = _c;
200
+ while (!signal.aborted && this.objectMaxSize && this.size() === this.objectMaxSize) {
201
+ yield Future.of((resolve, _, signal) => {
202
+ const cancel = this.onDelete(() => {
203
+ cancel();
204
+ resolve(null);
205
+ });
206
+ signal.onabort = cancel;
207
+ }).registerSignal(signal);
208
+ }
209
+ if (signal.aborted) {
210
+ break;
211
+ }
212
+ handler(data);
213
+ }
214
+ finally {
215
+ _d = true;
216
+ }
217
+ }
218
+ }
219
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
220
+ finally {
221
+ try {
222
+ if (!_d && !_a && (_b = stream_1.return)) yield _b.call(stream_1);
223
+ }
224
+ finally { if (e_1) throw e_1.error; }
225
+ }
226
+ })).schedule();
227
+ }
228
+ }
229
+
230
+ export { WatchableObject, WatchableObjectOperations };
@@ -0,0 +1,7 @@
1
+ export { WatchableObject, WatchableChange, WatchableObjectOperations, Configuration } from "./WatchableObject";
2
+ export { WaitableObject } from "./WaitableObject";
3
+ export { CyclicalObject } from "./CyclicalObject";
4
+ export { TimeableObject } from "./TimeableObject";
5
+ export { Queue } from "./Queue";
6
+ export { BufferQueue } from "./BufferQueue";
7
+ export { SimpleQueue } from "./SimpleQueue";
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ var WatchableObject = require('./object/WatchableObject.cjs');
4
+ var WaitableObject = require('./object/WaitableObject.cjs');
5
+ var CyclicalObject = require('./object/CyclicalObject.cjs');
6
+ var TimeableObject = require('./object/TimeableObject.cjs');
7
+ var Queue = require('./object/Queue.cjs');
8
+ var BufferQueue = require('./object/BufferQueue.cjs');
9
+ var SimpleQueue = require('./object/SimpleQueue.cjs');
10
+
11
+
12
+
13
+ exports.WatchableObject = WatchableObject.WatchableObject;
14
+ Object.defineProperty(exports, 'WatchableObjectOperations', {
15
+ enumerable: true,
16
+ get: function () { return WatchableObject.WatchableObjectOperations; }
17
+ });
18
+ exports.WaitableObject = WaitableObject.WaitableObject;
19
+ exports.CyclicalObject = CyclicalObject.CyclicalObject;
20
+ exports.TimeableObject = TimeableObject.TimeableObject;
21
+ exports.Queue = Queue.Queue;
22
+ exports.BufferQueue = BufferQueue.BufferQueue;
23
+ exports.SimpleQueue = SimpleQueue.SimpleQueue;
@@ -0,0 +1,7 @@
1
+ export { WatchableObject, WatchableObjectOperations } from './object/WatchableObject.mjs';
2
+ export { WaitableObject } from './object/WaitableObject.mjs';
3
+ export { CyclicalObject } from './object/CyclicalObject.mjs';
4
+ export { TimeableObject } from './object/TimeableObject.mjs';
5
+ export { Queue } from './object/Queue.mjs';
6
+ export { BufferQueue } from './object/BufferQueue.mjs';
7
+ export { SimpleQueue } from './object/SimpleQueue.mjs';
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Thrown to indicate some async operation was aborted
5
+ */
6
+ class AbortError extends Error {
7
+ }
8
+
9
+ exports.AbortError = AbortError;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Thrown to indicate some async operation was aborted
3
+ */
4
+ export declare class AbortError extends Error {
5
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Thrown to indicate some async operation was aborted
3
+ */
4
+ class AbortError extends Error {
5
+ }
6
+
7
+ export { AbortError };
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Thrown when a network call fails to be executed successfully
5
+ */
6
+ class CallExecutionError extends Error {
7
+ constructor(message, response) {
8
+ super(message);
9
+ this.response = response;
10
+ }
11
+ }
12
+
13
+ exports.CallExecutionError = CallExecutionError;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Thrown when a network call fails to be executed successfully
3
+ */
4
+ export declare class CallExecutionError extends Error {
5
+ readonly response?: Response;
6
+ constructor(message: string, response?: Response);
7
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Thrown when a network call fails to be executed successfully
3
+ */
4
+ class CallExecutionError extends Error {
5
+ constructor(message, response) {
6
+ super(message);
7
+ this.response = response;
8
+ }
9
+ }
10
+
11
+ export { CallExecutionError };
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ var FutureError = require('./FutureError.cjs');
4
+
5
+ /**
6
+ * Error thrown when a future is cancelled
7
+ */
8
+ class FutureCancelled extends FutureError.FutureError {
9
+ }
10
+
11
+ exports.FutureCancelled = FutureCancelled;
@@ -0,0 +1,6 @@
1
+ import { FutureError } from "./FutureError";
2
+ /**
3
+ * Error thrown when a future is cancelled
4
+ */
5
+ export declare class FutureCancelled extends FutureError {
6
+ }
@@ -0,0 +1,9 @@
1
+ import { FutureError } from './FutureError.mjs';
2
+
3
+ /**
4
+ * Error thrown when a future is cancelled
5
+ */
6
+ class FutureCancelled extends FutureError {
7
+ }
8
+
9
+ export { FutureCancelled };
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ var AbortError = require('./AbortError.cjs');
4
+
5
+ /**
6
+ * Any type of error raised from a future
7
+ */
8
+ class FutureError extends AbortError.AbortError {
9
+ }
10
+
11
+ exports.FutureError = FutureError;
@@ -0,0 +1,6 @@
1
+ import { AbortError } from "./AbortError";
2
+ /**
3
+ * Any type of error raised from a future
4
+ */
5
+ export declare class FutureError extends AbortError {
6
+ }
@@ -0,0 +1,9 @@
1
+ import { AbortError } from './AbortError.mjs';
2
+
3
+ /**
4
+ * Any type of error raised from a future
5
+ */
6
+ class FutureError extends AbortError {
7
+ }
8
+
9
+ export { FutureError };
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Thrown to indicate that a method/function has been passed an illegal or inappropriate argument
5
+ */
6
+ class IllegalArgumentsError extends Error {
7
+ constructor(args) {
8
+ super(`Received invalid arguments of type ${args.map((arg) => typeof arg).join(",")}`);
9
+ this.arguments = args;
10
+ }
11
+ }
12
+
13
+ exports.IllegalArgumentsError = IllegalArgumentsError;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Thrown to indicate that a method/function has been passed an illegal or inappropriate argument
3
+ */
4
+ export declare class IllegalArgumentsError extends Error {
5
+ readonly arguments: any[];
6
+ constructor(args: any[]);
7
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Thrown to indicate that a method/function has been passed an illegal or inappropriate argument
3
+ */
4
+ class IllegalArgumentsError extends Error {
5
+ constructor(args) {
6
+ super(`Received invalid arguments of type ${args.map((arg) => typeof arg).join(",")}`);
7
+ this.arguments = args;
8
+ }
9
+ }
10
+
11
+ export { IllegalArgumentsError };
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ class IllegalOperationError extends Error {
4
+ }
5
+
6
+ exports.IllegalOperationError = IllegalOperationError;
@@ -0,0 +1,2 @@
1
+ export declare class IllegalOperationError extends Error {
2
+ }
@@ -0,0 +1,4 @@
1
+ class IllegalOperationError extends Error {
2
+ }
3
+
4
+ export { IllegalOperationError };
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ class InvalidType extends Error {
4
+ }
5
+
6
+ exports.InvalidType = InvalidType;
@@ -0,0 +1,2 @@
1
+ export declare class InvalidType extends Error {
2
+ }
@@ -0,0 +1,4 @@
1
+ class InvalidType extends Error {
2
+ }
3
+
4
+ export { InvalidType };
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ var ParsingError = require('./ParsingError.cjs');
4
+
5
+ class InvalidValue extends ParsingError.ParsingError {
6
+ constructor(message) {
7
+ super([], message);
8
+ }
9
+ }
10
+
11
+ exports.InvalidValue = InvalidValue;
@@ -0,0 +1,4 @@
1
+ import { ParsingError } from "./ParsingError";
2
+ export declare class InvalidValue extends ParsingError {
3
+ constructor(message?: string);
4
+ }
@@ -0,0 +1,9 @@
1
+ import { ParsingError } from './ParsingError.mjs';
2
+
3
+ class InvalidValue extends ParsingError {
4
+ constructor(message) {
5
+ super([], message);
6
+ }
7
+ }
8
+
9
+ export { InvalidValue };
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Thrown to indicate that one or more required arguments of a method/function is missing
5
+ */
6
+ class MissingArgumentsError extends Error {
7
+ constructor(args) {
8
+ super(`Missing the following arguments: ${args.join(",")}`);
9
+ this.arguments = args;
10
+ }
11
+ }
12
+
13
+ exports.MissingArgumentsError = MissingArgumentsError;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Thrown to indicate that one or more required arguments of a method/function is missing
3
+ */
4
+ export declare class MissingArgumentsError extends Error {
5
+ readonly arguments: any[];
6
+ constructor(args: string[]);
7
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Thrown to indicate that one or more required arguments of a method/function is missing
3
+ */
4
+ class MissingArgumentsError extends Error {
5
+ constructor(args) {
6
+ super(`Missing the following arguments: ${args.join(",")}`);
7
+ this.arguments = args;
8
+ }
9
+ }
10
+
11
+ export { MissingArgumentsError };
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ *Thrown to indicate some networking issue
5
+ */
6
+ class NetworkError extends Error {
7
+ constructor(status, body) {
8
+ super(body !== null && body !== void 0 ? body : "");
9
+ this.status = status;
10
+ }
11
+ }
12
+
13
+ exports.NetworkError = NetworkError;
@@ -0,0 +1,8 @@
1
+ import { HTTPStatus } from "../networking/decorators";
2
+ /**
3
+ *Thrown to indicate some networking issue
4
+ */
5
+ export declare class NetworkError extends Error {
6
+ status: HTTPStatus;
7
+ constructor(status: HTTPStatus, body?: string);
8
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ *Thrown to indicate some networking issue
3
+ */
4
+ class NetworkError extends Error {
5
+ constructor(status, body) {
6
+ super(body !== null && body !== void 0 ? body : "");
7
+ this.status = status;
8
+ }
9
+ }
10
+
11
+ export { NetworkError };
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ class NoSuchElement extends Error {
4
+ }
5
+
6
+ exports.NoSuchElement = NoSuchElement;
@@ -0,0 +1,2 @@
1
+ export declare class NoSuchElement extends Error {
2
+ }
@@ -0,0 +1,4 @@
1
+ class NoSuchElement extends Error {
2
+ }
3
+
4
+ export { NoSuchElement };
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Thrown to indicate that the method is not accessible
5
+ */
6
+ class NotImplemented extends Error {
7
+ }
8
+
9
+ exports.NotImplemented = NotImplemented;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Thrown to indicate that the method is not accessible
3
+ */
4
+ export declare class NotImplemented extends Error {
5
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Thrown to indicate that the method is not accessible
3
+ */
4
+ class NotImplemented extends Error {
5
+ }
6
+
7
+ export { NotImplemented };
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ class ParsingError extends Error {
4
+ constructor(records = [], message) {
5
+ super(message);
6
+ this.details = records;
7
+ }
8
+ }
9
+
10
+ exports.ParsingError = ParsingError;
@@ -0,0 +1,5 @@
1
+ import { ParseError } from "papaparse";
2
+ export declare class ParsingError extends Error {
3
+ readonly details: ParseError[];
4
+ constructor(records?: ParseError[], message?: string);
5
+ }
@@ -0,0 +1,8 @@
1
+ class ParsingError extends Error {
2
+ constructor(records = [], message) {
3
+ super(message);
4
+ this.details = records;
5
+ }
6
+ }
7
+
8
+ export { ParsingError };
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ class QueueEmptyError extends Error {
4
+ }
5
+
6
+ exports.QueueEmptyError = QueueEmptyError;
@@ -0,0 +1,2 @@
1
+ export declare class QueueEmptyError extends Error {
2
+ }
@@ -0,0 +1,4 @@
1
+ class QueueEmptyError extends Error {
2
+ }
3
+
4
+ export { QueueEmptyError };