@autonomys/asynchronous 1.4.0 → 1.4.1

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/LICENSE ADDED
@@ -0,0 +1,18 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Autonomys Network (autonomys.xyz)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ 1. **Attribution**: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
13
+
14
+ 2. **No Warranty**: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
15
+
16
+ 3. **Limitation of Liability**: IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17
+
18
+ ---
@@ -0,0 +1,13 @@
1
+ import { Readable } from 'stream';
2
+ export type AwaitIterable<T> = AsyncIterable<T> | Iterable<T>;
3
+ export declare const asyncIterableMap: <T, R>(iterable: AwaitIterable<T>, fn: (value: T) => Promise<R>) => Promise<R[]>;
4
+ export declare const asyncIterableForEach: <T>(iterable: AwaitIterable<T>, fn: (value: T[]) => Promise<void>, concurrency: number) => Promise<void>;
5
+ export declare const asyncIterableToPromiseOfArray: <T>(iterable: AwaitIterable<T>) => Promise<T[]>;
6
+ export declare const bufferToAsyncIterable: (buffer: Buffer) => AsyncIterable<Buffer>;
7
+ export declare const asyncIterableToBuffer: (iterable: AwaitIterable<Buffer>) => Promise<Buffer>;
8
+ export declare const asyncByChunk: (iterable: AwaitIterable<Buffer>, chunkSize: number, ignoreLastChunk?: boolean) => AsyncIterable<Buffer>;
9
+ export declare function forkAsyncIterable(asyncIterable: AwaitIterable<Uint8Array>): Promise<[Readable, Readable]>;
10
+ export declare const asyncFromStream: (stream: ReadableStream<Uint8Array>) => AsyncIterable<Buffer>;
11
+ export declare const bufferToIterable: (buffer: Buffer) => AsyncIterable<Buffer>;
12
+ export declare const fileToIterable: (file: File | Blob, chunkSize?: number) => AsyncIterable<Buffer>;
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/asyncGenerators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAE9C,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;AAE7D,eAAO,MAAM,gBAAgB,GAAU,CAAC,EAAE,CAAC,EACzC,UAAU,aAAa,CAAC,CAAC,CAAC,EAC1B,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,KAC3B,OAAO,CAAC,CAAC,EAAE,CAMb,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAU,CAAC,EAC1C,UAAU,aAAa,CAAC,CAAC,CAAC,EAC1B,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,EACjC,aAAa,MAAM,KAClB,OAAO,CAAC,IAAI,CAad,CAAA;AAED,eAAO,MAAM,6BAA6B,GAAU,CAAC,EACnD,UAAU,aAAa,CAAC,CAAC,CAAC,KACzB,OAAO,CAAC,CAAC,EAAE,CAMb,CAAA;AAED,eAAO,MAAM,qBAAqB,GAAI,QAAQ,MAAM,KAAG,aAAa,CAAC,MAAM,CAI1E,CAAA;AAED,eAAO,MAAM,qBAAqB,GAAU,UAAU,aAAa,CAAC,MAAM,CAAC,KAAG,OAAO,CAAC,MAAM,CAM3F,CAAA;AAED,eAAO,MAAM,YAAY,GACvB,UAAU,aAAa,CAAC,MAAM,CAAC,EAC/B,WAAW,MAAM,EACjB,kBAAiB,OAAe,KAC/B,aAAa,CAAC,MAAM,CAatB,CAAA;AAED,wBAAsB,iBAAiB,CACrC,aAAa,EAAE,aAAa,CAAC,UAAU,CAAC,GACvC,OAAO,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAY/B;AAED,eAAO,MAAM,eAAe,GAC1B,QAAQ,cAAc,CAAC,UAAU,CAAC,KACjC,aAAa,CAAC,MAAM,CAOtB,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAoB,QAAQ,MAAM,KAAG,aAAa,CAAC,MAAM,CAErF,CAAA;AAED,eAAO,MAAM,cAAc,GACzB,MAAM,IAAI,GAAG,IAAI,EACjB,YAAW,MAAoB,KAC9B,aAAa,CAAC,MAAM,CAItB,CAAA"}
@@ -0,0 +1,217 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __asyncValues = (this && this.__asyncValues) || function (o) {
12
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
13
+ var m = o[Symbol.asyncIterator], i;
14
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
15
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
16
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
17
+ };
18
+ var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
19
+ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
20
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
21
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
22
+ return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
23
+ function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
24
+ function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
25
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
26
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
27
+ function fulfill(value) { resume("next", value); }
28
+ function reject(value) { resume("throw", value); }
29
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
30
+ };
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ exports.fileToIterable = exports.bufferToIterable = exports.asyncFromStream = exports.asyncByChunk = exports.asyncIterableToBuffer = exports.bufferToAsyncIterable = exports.asyncIterableToPromiseOfArray = exports.asyncIterableForEach = exports.asyncIterableMap = void 0;
33
+ exports.forkAsyncIterable = forkAsyncIterable;
34
+ const stream_1 = require("stream");
35
+ const asyncIterableMap = (iterable, fn) => __awaiter(void 0, void 0, void 0, function* () {
36
+ var _a, iterable_1, iterable_1_1;
37
+ var _b, e_1, _c, _d;
38
+ const result = [];
39
+ try {
40
+ for (_a = true, iterable_1 = __asyncValues(iterable); iterable_1_1 = yield iterable_1.next(), _b = iterable_1_1.done, !_b; _a = true) {
41
+ _d = iterable_1_1.value;
42
+ _a = false;
43
+ const value = _d;
44
+ result.push(yield fn(value));
45
+ }
46
+ }
47
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
48
+ finally {
49
+ try {
50
+ if (!_a && !_b && (_c = iterable_1.return)) yield _c.call(iterable_1);
51
+ }
52
+ finally { if (e_1) throw e_1.error; }
53
+ }
54
+ return result;
55
+ });
56
+ exports.asyncIterableMap = asyncIterableMap;
57
+ const asyncIterableForEach = (iterable, fn, concurrency) => __awaiter(void 0, void 0, void 0, function* () {
58
+ var _a, iterable_2, iterable_2_1;
59
+ var _b, e_2, _c, _d;
60
+ let batch = [];
61
+ try {
62
+ for (_a = true, iterable_2 = __asyncValues(iterable); iterable_2_1 = yield iterable_2.next(), _b = iterable_2_1.done, !_b; _a = true) {
63
+ _d = iterable_2_1.value;
64
+ _a = false;
65
+ const value = _d;
66
+ batch.push(value);
67
+ if (batch.length === concurrency) {
68
+ yield fn(batch);
69
+ batch = [];
70
+ }
71
+ }
72
+ }
73
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
74
+ finally {
75
+ try {
76
+ if (!_a && !_b && (_c = iterable_2.return)) yield _c.call(iterable_2);
77
+ }
78
+ finally { if (e_2) throw e_2.error; }
79
+ }
80
+ if (batch.length > 0) {
81
+ yield fn(batch);
82
+ }
83
+ });
84
+ exports.asyncIterableForEach = asyncIterableForEach;
85
+ const asyncIterableToPromiseOfArray = (iterable) => __awaiter(void 0, void 0, void 0, function* () {
86
+ var _a, iterable_3, iterable_3_1;
87
+ var _b, e_3, _c, _d;
88
+ const result = [];
89
+ try {
90
+ for (_a = true, iterable_3 = __asyncValues(iterable); iterable_3_1 = yield iterable_3.next(), _b = iterable_3_1.done, !_b; _a = true) {
91
+ _d = iterable_3_1.value;
92
+ _a = false;
93
+ const value = _d;
94
+ result.push(value);
95
+ }
96
+ }
97
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
98
+ finally {
99
+ try {
100
+ if (!_a && !_b && (_c = iterable_3.return)) yield _c.call(iterable_3);
101
+ }
102
+ finally { if (e_3) throw e_3.error; }
103
+ }
104
+ return result;
105
+ });
106
+ exports.asyncIterableToPromiseOfArray = asyncIterableToPromiseOfArray;
107
+ const bufferToAsyncIterable = (buffer) => {
108
+ return (function () {
109
+ return __asyncGenerator(this, arguments, function* () {
110
+ yield yield __await(buffer);
111
+ });
112
+ })();
113
+ };
114
+ exports.bufferToAsyncIterable = bufferToAsyncIterable;
115
+ const asyncIterableToBuffer = (iterable) => __awaiter(void 0, void 0, void 0, function* () {
116
+ var _a, iterable_4, iterable_4_1;
117
+ var _b, e_4, _c, _d;
118
+ let buffer = Buffer.alloc(0);
119
+ try {
120
+ for (_a = true, iterable_4 = __asyncValues(iterable); iterable_4_1 = yield iterable_4.next(), _b = iterable_4_1.done, !_b; _a = true) {
121
+ _d = iterable_4_1.value;
122
+ _a = false;
123
+ const chunk = _d;
124
+ buffer = Buffer.concat([buffer, chunk]);
125
+ }
126
+ }
127
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
128
+ finally {
129
+ try {
130
+ if (!_a && !_b && (_c = iterable_4.return)) yield _c.call(iterable_4);
131
+ }
132
+ finally { if (e_4) throw e_4.error; }
133
+ }
134
+ return buffer;
135
+ });
136
+ exports.asyncIterableToBuffer = asyncIterableToBuffer;
137
+ const asyncByChunk = function (iterable_5, chunkSize_1) {
138
+ return __asyncGenerator(this, arguments, function* (iterable, chunkSize, ignoreLastChunk = false) {
139
+ var _a, e_5, _b, _c;
140
+ let accumulated = Buffer.alloc(0);
141
+ try {
142
+ for (var _d = true, iterable_6 = __asyncValues(iterable), iterable_6_1; iterable_6_1 = yield __await(iterable_6.next()), _a = iterable_6_1.done, !_a; _d = true) {
143
+ _c = iterable_6_1.value;
144
+ _d = false;
145
+ const chunk = _c;
146
+ accumulated = Buffer.concat([accumulated, chunk]);
147
+ while (accumulated.length >= chunkSize) {
148
+ yield yield __await(accumulated.subarray(0, chunkSize));
149
+ accumulated = accumulated.subarray(chunkSize);
150
+ }
151
+ }
152
+ }
153
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
154
+ finally {
155
+ try {
156
+ if (!_d && !_a && (_b = iterable_6.return)) yield __await(_b.call(iterable_6));
157
+ }
158
+ finally { if (e_5) throw e_5.error; }
159
+ }
160
+ if (accumulated.length > 0 && !ignoreLastChunk) {
161
+ yield yield __await(accumulated);
162
+ }
163
+ });
164
+ };
165
+ exports.asyncByChunk = asyncByChunk;
166
+ function forkAsyncIterable(asyncIterable) {
167
+ return __awaiter(this, void 0, void 0, function* () {
168
+ var _a, asyncIterable_1, asyncIterable_1_1;
169
+ var _b, e_6, _c, _d;
170
+ const passThrough1 = new stream_1.PassThrough();
171
+ const passThrough2 = new stream_1.PassThrough();
172
+ try {
173
+ for (_a = true, asyncIterable_1 = __asyncValues(asyncIterable); asyncIterable_1_1 = yield asyncIterable_1.next(), _b = asyncIterable_1_1.done, !_b; _a = true) {
174
+ _d = asyncIterable_1_1.value;
175
+ _a = false;
176
+ const chunk = _d;
177
+ passThrough1.write(chunk);
178
+ passThrough2.write(chunk);
179
+ }
180
+ }
181
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
182
+ finally {
183
+ try {
184
+ if (!_a && !_b && (_c = asyncIterable_1.return)) yield _c.call(asyncIterable_1);
185
+ }
186
+ finally { if (e_6) throw e_6.error; }
187
+ }
188
+ passThrough1.end();
189
+ passThrough2.end();
190
+ return [passThrough1, passThrough2];
191
+ });
192
+ }
193
+ const asyncFromStream = function (stream) {
194
+ return __asyncGenerator(this, arguments, function* () {
195
+ const reader = stream.getReader();
196
+ let result = yield __await(reader.read());
197
+ while (!result.done) {
198
+ yield yield __await(Buffer.from(result.value));
199
+ result = yield __await(reader.read());
200
+ }
201
+ });
202
+ };
203
+ exports.asyncFromStream = asyncFromStream;
204
+ const bufferToIterable = function (buffer) {
205
+ return __asyncGenerator(this, arguments, function* () {
206
+ yield yield __await(buffer);
207
+ });
208
+ };
209
+ exports.bufferToIterable = bufferToIterable;
210
+ const fileToIterable = function (file_1) {
211
+ return __asyncGenerator(this, arguments, function* (file, chunkSize = 1024 * 1024) {
212
+ for (let i = 0; i < file.size; i += chunkSize) {
213
+ yield yield __await(Buffer.from(yield __await(file.slice(i, i + chunkSize).arrayBuffer())));
214
+ }
215
+ });
216
+ };
217
+ exports.fileToIterable = fileToIterable;
@@ -0,0 +1,2 @@
1
+ export * from './weightedRequestsConcurrencyController.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/concurrency/index.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAA"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./weightedRequestsConcurrencyController.js"), exports);
@@ -0,0 +1,5 @@
1
+ export type Job<T> = () => Promise<T>;
2
+ type ConcurrencyController = <T>(job: Job<T>, concurrency: number) => Promise<T>;
3
+ export declare const weightedRequestConcurrencyController: (maxConcurrency: number, ensureOrder?: boolean) => ConcurrencyController;
4
+ export {};
5
+ //# sourceMappingURL=weightedRequestsConcurrencyController.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"weightedRequestsConcurrencyController.d.ts","sourceRoot":"","sources":["../../src/concurrency/weightedRequestsConcurrencyController.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,MAAM,OAAO,CAAC,CAAC,CAAC,CAAA;AAErC,KAAK,qBAAqB,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,CAAA;AAOhF,eAAO,MAAM,oCAAoC,GAC/C,gBAAgB,MAAM,EACtB,cAAa,OAAe,KAC3B,qBAqDF,CAAA"}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.weightedRequestConcurrencyController = void 0;
13
+ const weightedRequestConcurrencyController = (maxConcurrency, ensureOrder = false) => {
14
+ if (maxConcurrency <= 0) {
15
+ throw new Error('Max concurrency must be greater than 0');
16
+ }
17
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
18
+ const queue = [];
19
+ let active = 0;
20
+ const enqueue = (task, concurrency) => {
21
+ return new Promise((resolve, reject) => {
22
+ queue.push({
23
+ job: () => task().then(resolve).catch(reject),
24
+ concurrency,
25
+ });
26
+ });
27
+ };
28
+ const findExecutableTask = () => {
29
+ const index = queue.findIndex((e) => active + e.concurrency <= maxConcurrency);
30
+ const notMatched = index === -1;
31
+ const notFirst = ensureOrder && index !== 0;
32
+ if (notMatched || notFirst) {
33
+ return null;
34
+ }
35
+ return queue.splice(index, 1).at(0);
36
+ };
37
+ const manageJobFinalization = (concurrency) => __awaiter(void 0, void 0, void 0, function* () {
38
+ active -= concurrency;
39
+ const executableTask = findExecutableTask();
40
+ if (executableTask) {
41
+ setImmediate(() => internalRunJob(executableTask.job, executableTask.concurrency));
42
+ }
43
+ });
44
+ const internalRunJob = (job, concurrency) => __awaiter(void 0, void 0, void 0, function* () {
45
+ active += concurrency;
46
+ return job().finally(() => manageJobFinalization(concurrency));
47
+ });
48
+ const runJob = (job, concurrency) => __awaiter(void 0, void 0, void 0, function* () {
49
+ const exceededMaxConcurrency = active + concurrency > maxConcurrency;
50
+ const shouldRespectOrder = ensureOrder && queue.length > 0;
51
+ if (exceededMaxConcurrency || shouldRespectOrder) {
52
+ return enqueue(job, concurrency);
53
+ }
54
+ return internalRunJob(job, concurrency);
55
+ });
56
+ return runJob;
57
+ };
58
+ exports.weightedRequestConcurrencyController = weightedRequestConcurrencyController;
@@ -0,0 +1,3 @@
1
+ export * from './asyncGenerators';
2
+ export * from './concurrency';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./asyncGenerators"), exports);
18
+ __exportStar(require("./concurrency"), exports);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@autonomys/asynchronous",
3
3
  "packageManager": "yarn@4.7.0",
4
- "version": "1.4.0",
4
+ "version": "1.4.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -29,5 +29,5 @@
29
29
  "ts-jest": "^29.1.4",
30
30
  "typescript": "^5.4.5"
31
31
  },
32
- "gitHead": "53cf74430ba08ed3b8f38ccc2fcee7b373a7934c"
32
+ "gitHead": "115cb6ba785c73fa7c536381d5b04d8b3fcd68b9"
33
33
  }