@modern-js/plugin 0.0.0-next-1684433204144 → 0.0.0-next-1684463515400

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/CHANGELOG.md CHANGED
@@ -1,33 +1,10 @@
1
1
  # @modern-js/plugin
2
2
 
3
- ## 0.0.0-next-1684433204144
3
+ ## 0.0.0-next-1684463515400
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - @modern-js/utils@0.0.0-next-1684433204144
8
-
9
- ## 2.20.0
10
-
11
- ### Patch Changes
12
-
13
- - 6b9d90a: chore: remove @babel/runtime. add @swc/helper and enable `externalHelper` config.
14
- chore: 移除 @babel/runtime 依赖. 增加 @swc/helpers 依赖并且开启 `externalHelpers` 配置
15
- - Updated dependencies [3c4e0a5]
16
- - Updated dependencies [6b9d90a]
17
- - @modern-js/utils@2.20.0
18
-
19
- ## 2.19.1
20
-
21
- ### Patch Changes
22
-
23
- - @modern-js/utils@2.19.1
24
-
25
- ## 2.19.0
26
-
27
- ### Patch Changes
28
-
29
- - Updated dependencies [1134fe2]
30
- - @modern-js/utils@2.19.0
7
+ - @modern-js/utils@0.0.0-next-1684463515400
31
8
 
32
9
  ## 2.18.1
33
10
 
package/dist/cjs/index.js CHANGED
@@ -2,8 +2,20 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./farrow-pipeline"), exports);
7
- _export_star._(require("./waterfall"), exports);
8
- _export_star._(require("./workflow"), exports);
9
- _export_star._(require("./manager"), exports);
5
+ _export_star(require("./farrow-pipeline"), exports);
6
+ _export_star(require("./waterfall"), exports);
7
+ _export_star(require("./workflow"), exports);
8
+ _export_star(require("./manager"), exports);
9
+ function _export_star(from, to) {
10
+ Object.keys(from).forEach(function(k) {
11
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
12
+ Object.defineProperty(to, k, {
13
+ enumerable: true,
14
+ get: function() {
15
+ return from[k];
16
+ }
17
+ });
18
+ }
19
+ });
20
+ return from;
21
+ }
@@ -2,7 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./sync"), exports);
7
- _export_star._(require("./async"), exports);
8
- _export_star._(require("./types"), exports);
5
+ _export_star(require("./sync"), exports);
6
+ _export_star(require("./async"), exports);
7
+ _export_star(require("./types"), exports);
8
+ function _export_star(from, to) {
9
+ Object.keys(from).forEach(function(k) {
10
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
11
+ Object.defineProperty(to, k, {
12
+ enumerable: true,
13
+ get: function() {
14
+ return from[k];
15
+ }
16
+ });
17
+ }
18
+ });
19
+ return from;
20
+ }
@@ -2,6 +2,18 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./sync"), exports);
7
- _export_star._(require("./async"), exports);
5
+ _export_star(require("./sync"), exports);
6
+ _export_star(require("./async"), exports);
7
+ function _export_star(from, to) {
8
+ Object.keys(from).forEach(function(k) {
9
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
10
+ Object.defineProperty(to, k, {
11
+ enumerable: true,
12
+ get: function() {
13
+ return from[k];
14
+ }
15
+ });
16
+ }
17
+ });
18
+ return from;
19
+ }
@@ -2,7 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./sync"), exports);
7
- _export_star._(require("./parallel"), exports);
8
- _export_star._(require("./async"), exports);
5
+ _export_star(require("./sync"), exports);
6
+ _export_star(require("./parallel"), exports);
7
+ _export_star(require("./async"), exports);
8
+ function _export_star(from, to) {
9
+ Object.keys(from).forEach(function(k) {
10
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
11
+ Object.defineProperty(to, k, {
12
+ enumerable: true,
13
+ get: function() {
14
+ return from[k];
15
+ }
16
+ });
17
+ }
18
+ });
19
+ return from;
20
+ }
package/dist/esm/index.js CHANGED
@@ -1,8 +1,3 @@
1
- // src/farrow-pipeline/index.ts
2
- import { _ as _define_property } from "@swc/helpers/_/_define_property";
3
- import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
4
- import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
5
-
6
1
  // src/farrow-pipeline/context.ts
7
2
  var createContext = function(value) {
8
3
  var currentValue = value;
@@ -44,6 +39,68 @@ var createCounter = function(callback) {
44
39
  };
45
40
 
46
41
  // src/farrow-pipeline/index.ts
42
+ function _array_like_to_array(arr, len) {
43
+ if (len == null || len > arr.length)
44
+ len = arr.length;
45
+ for (var i = 0, arr2 = new Array(len); i < len; i++)
46
+ arr2[i] = arr[i];
47
+ return arr2;
48
+ }
49
+ function _array_without_holes(arr) {
50
+ if (Array.isArray(arr))
51
+ return _array_like_to_array(arr);
52
+ }
53
+ function _define_property(obj, key, value) {
54
+ if (key in obj) {
55
+ Object.defineProperty(obj, key, {
56
+ value: value,
57
+ enumerable: true,
58
+ configurable: true,
59
+ writable: true
60
+ });
61
+ } else {
62
+ obj[key] = value;
63
+ }
64
+ return obj;
65
+ }
66
+ function _iterable_to_array(iter) {
67
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
68
+ return Array.from(iter);
69
+ }
70
+ function _non_iterable_spread() {
71
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
72
+ }
73
+ function _object_spread(target) {
74
+ for (var i = 1; i < arguments.length; i++) {
75
+ var source = arguments[i] != null ? arguments[i] : {};
76
+ var ownKeys8 = Object.keys(source);
77
+ if (typeof Object.getOwnPropertySymbols === "function") {
78
+ ownKeys8 = ownKeys8.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
79
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
80
+ }));
81
+ }
82
+ ownKeys8.forEach(function(key) {
83
+ _define_property(target, key, source[key]);
84
+ });
85
+ }
86
+ return target;
87
+ }
88
+ function _to_consumable_array(arr) {
89
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
90
+ }
91
+ function _unsupported_iterable_to_array(o, minLen) {
92
+ if (!o)
93
+ return;
94
+ if (typeof o === "string")
95
+ return _array_like_to_array(o, minLen);
96
+ var n = Object.prototype.toString.call(o).slice(8, -1);
97
+ if (n === "Object" && o.constructor)
98
+ n = o.constructor.name;
99
+ if (n === "Map" || n === "Set")
100
+ return Array.from(n);
101
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
102
+ return _array_like_to_array(o, minLen);
103
+ }
47
104
  var isPipeline = function(input) {
48
105
  return Boolean(input === null || input === void 0 ? void 0 : input[PipelineSymbol]);
49
106
  };
@@ -102,10 +159,92 @@ var createAsyncPipeline = function() {
102
159
  };
103
160
 
104
161
  // src/waterfall/sync.ts
105
- import { _ as _define_property2 } from "@swc/helpers/_/_define_property";
106
- import { _ as _object_spread2 } from "@swc/helpers/_/_object_spread";
107
- import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
108
- import { _ as _to_consumable_array2 } from "@swc/helpers/_/_to_consumable_array";
162
+ function _array_like_to_array2(arr, len) {
163
+ if (len == null || len > arr.length)
164
+ len = arr.length;
165
+ for (var i = 0, arr2 = new Array(len); i < len; i++)
166
+ arr2[i] = arr[i];
167
+ return arr2;
168
+ }
169
+ function _array_without_holes2(arr) {
170
+ if (Array.isArray(arr))
171
+ return _array_like_to_array2(arr);
172
+ }
173
+ function _define_property2(obj, key, value) {
174
+ if (key in obj) {
175
+ Object.defineProperty(obj, key, {
176
+ value: value,
177
+ enumerable: true,
178
+ configurable: true,
179
+ writable: true
180
+ });
181
+ } else {
182
+ obj[key] = value;
183
+ }
184
+ return obj;
185
+ }
186
+ function _iterable_to_array2(iter) {
187
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
188
+ return Array.from(iter);
189
+ }
190
+ function _non_iterable_spread2() {
191
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
192
+ }
193
+ function _object_spread2(target) {
194
+ for (var i = 1; i < arguments.length; i++) {
195
+ var source = arguments[i] != null ? arguments[i] : {};
196
+ var ownKeys8 = Object.keys(source);
197
+ if (typeof Object.getOwnPropertySymbols === "function") {
198
+ ownKeys8 = ownKeys8.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
199
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
200
+ }));
201
+ }
202
+ ownKeys8.forEach(function(key) {
203
+ _define_property2(target, key, source[key]);
204
+ });
205
+ }
206
+ return target;
207
+ }
208
+ function ownKeys(object, enumerableOnly) {
209
+ var keys = Object.keys(object);
210
+ if (Object.getOwnPropertySymbols) {
211
+ var symbols = Object.getOwnPropertySymbols(object);
212
+ if (enumerableOnly) {
213
+ symbols = symbols.filter(function(sym) {
214
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
215
+ });
216
+ }
217
+ keys.push.apply(keys, symbols);
218
+ }
219
+ return keys;
220
+ }
221
+ function _object_spread_props(target, source) {
222
+ source = source != null ? source : {};
223
+ if (Object.getOwnPropertyDescriptors) {
224
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
225
+ } else {
226
+ ownKeys(Object(source)).forEach(function(key) {
227
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
228
+ });
229
+ }
230
+ return target;
231
+ }
232
+ function _to_consumable_array2(arr) {
233
+ return _array_without_holes2(arr) || _iterable_to_array2(arr) || _unsupported_iterable_to_array2(arr) || _non_iterable_spread2();
234
+ }
235
+ function _unsupported_iterable_to_array2(o, minLen) {
236
+ if (!o)
237
+ return;
238
+ if (typeof o === "string")
239
+ return _array_like_to_array2(o, minLen);
240
+ var n = Object.prototype.toString.call(o).slice(8, -1);
241
+ if (n === "Object" && o.constructor)
242
+ n = o.constructor.name;
243
+ if (n === "Map" || n === "Set")
244
+ return Array.from(n);
245
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
246
+ return _array_like_to_array2(o, minLen);
247
+ }
109
248
  var WATERFALL_SYMBOL = Symbol.for("MODERN_WATERFALL");
110
249
  var getBrook = function(input) {
111
250
  if (typeof input === "function") {
@@ -156,10 +295,92 @@ var mapBrookToMiddleware = function(brook) {
156
295
  };
157
296
 
158
297
  // src/waterfall/async.ts
159
- import { _ as _define_property3 } from "@swc/helpers/_/_define_property";
160
- import { _ as _object_spread3 } from "@swc/helpers/_/_object_spread";
161
- import { _ as _object_spread_props2 } from "@swc/helpers/_/_object_spread_props";
162
- import { _ as _to_consumable_array3 } from "@swc/helpers/_/_to_consumable_array";
298
+ function _array_like_to_array3(arr, len) {
299
+ if (len == null || len > arr.length)
300
+ len = arr.length;
301
+ for (var i = 0, arr2 = new Array(len); i < len; i++)
302
+ arr2[i] = arr[i];
303
+ return arr2;
304
+ }
305
+ function _array_without_holes3(arr) {
306
+ if (Array.isArray(arr))
307
+ return _array_like_to_array3(arr);
308
+ }
309
+ function _define_property3(obj, key, value) {
310
+ if (key in obj) {
311
+ Object.defineProperty(obj, key, {
312
+ value: value,
313
+ enumerable: true,
314
+ configurable: true,
315
+ writable: true
316
+ });
317
+ } else {
318
+ obj[key] = value;
319
+ }
320
+ return obj;
321
+ }
322
+ function _iterable_to_array3(iter) {
323
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
324
+ return Array.from(iter);
325
+ }
326
+ function _non_iterable_spread3() {
327
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
328
+ }
329
+ function _object_spread3(target) {
330
+ for (var i = 1; i < arguments.length; i++) {
331
+ var source = arguments[i] != null ? arguments[i] : {};
332
+ var ownKeys8 = Object.keys(source);
333
+ if (typeof Object.getOwnPropertySymbols === "function") {
334
+ ownKeys8 = ownKeys8.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
335
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
336
+ }));
337
+ }
338
+ ownKeys8.forEach(function(key) {
339
+ _define_property3(target, key, source[key]);
340
+ });
341
+ }
342
+ return target;
343
+ }
344
+ function ownKeys2(object, enumerableOnly) {
345
+ var keys = Object.keys(object);
346
+ if (Object.getOwnPropertySymbols) {
347
+ var symbols = Object.getOwnPropertySymbols(object);
348
+ if (enumerableOnly) {
349
+ symbols = symbols.filter(function(sym) {
350
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
351
+ });
352
+ }
353
+ keys.push.apply(keys, symbols);
354
+ }
355
+ return keys;
356
+ }
357
+ function _object_spread_props2(target, source) {
358
+ source = source != null ? source : {};
359
+ if (Object.getOwnPropertyDescriptors) {
360
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
361
+ } else {
362
+ ownKeys2(Object(source)).forEach(function(key) {
363
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
364
+ });
365
+ }
366
+ return target;
367
+ }
368
+ function _to_consumable_array3(arr) {
369
+ return _array_without_holes3(arr) || _iterable_to_array3(arr) || _unsupported_iterable_to_array3(arr) || _non_iterable_spread3();
370
+ }
371
+ function _unsupported_iterable_to_array3(o, minLen) {
372
+ if (!o)
373
+ return;
374
+ if (typeof o === "string")
375
+ return _array_like_to_array3(o, minLen);
376
+ var n = Object.prototype.toString.call(o).slice(8, -1);
377
+ if (n === "Object" && o.constructor)
378
+ n = o.constructor.name;
379
+ if (n === "Map" || n === "Set")
380
+ return Array.from(n);
381
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
382
+ return _array_like_to_array3(o, minLen);
383
+ }
163
384
  var ASYNC_WATERFALL_SYMBOL = Symbol.for("MODERN_ASYNC_WATERFALL");
164
385
  var getAsyncBrook = function(input) {
165
386
  if (typeof input === "function") {
@@ -213,10 +434,92 @@ var mapAsyncBrookToAsyncMiddleware = function(brook) {
213
434
  };
214
435
 
215
436
  // src/workflow/sync.ts
216
- import { _ as _define_property4 } from "@swc/helpers/_/_define_property";
217
- import { _ as _object_spread4 } from "@swc/helpers/_/_object_spread";
218
- import { _ as _object_spread_props3 } from "@swc/helpers/_/_object_spread_props";
219
- import { _ as _to_consumable_array4 } from "@swc/helpers/_/_to_consumable_array";
437
+ function _array_like_to_array4(arr, len) {
438
+ if (len == null || len > arr.length)
439
+ len = arr.length;
440
+ for (var i = 0, arr2 = new Array(len); i < len; i++)
441
+ arr2[i] = arr[i];
442
+ return arr2;
443
+ }
444
+ function _array_without_holes4(arr) {
445
+ if (Array.isArray(arr))
446
+ return _array_like_to_array4(arr);
447
+ }
448
+ function _define_property4(obj, key, value) {
449
+ if (key in obj) {
450
+ Object.defineProperty(obj, key, {
451
+ value: value,
452
+ enumerable: true,
453
+ configurable: true,
454
+ writable: true
455
+ });
456
+ } else {
457
+ obj[key] = value;
458
+ }
459
+ return obj;
460
+ }
461
+ function _iterable_to_array4(iter) {
462
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
463
+ return Array.from(iter);
464
+ }
465
+ function _non_iterable_spread4() {
466
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
467
+ }
468
+ function _object_spread4(target) {
469
+ for (var i = 1; i < arguments.length; i++) {
470
+ var source = arguments[i] != null ? arguments[i] : {};
471
+ var ownKeys8 = Object.keys(source);
472
+ if (typeof Object.getOwnPropertySymbols === "function") {
473
+ ownKeys8 = ownKeys8.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
474
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
475
+ }));
476
+ }
477
+ ownKeys8.forEach(function(key) {
478
+ _define_property4(target, key, source[key]);
479
+ });
480
+ }
481
+ return target;
482
+ }
483
+ function ownKeys3(object, enumerableOnly) {
484
+ var keys = Object.keys(object);
485
+ if (Object.getOwnPropertySymbols) {
486
+ var symbols = Object.getOwnPropertySymbols(object);
487
+ if (enumerableOnly) {
488
+ symbols = symbols.filter(function(sym) {
489
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
490
+ });
491
+ }
492
+ keys.push.apply(keys, symbols);
493
+ }
494
+ return keys;
495
+ }
496
+ function _object_spread_props3(target, source) {
497
+ source = source != null ? source : {};
498
+ if (Object.getOwnPropertyDescriptors) {
499
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
500
+ } else {
501
+ ownKeys3(Object(source)).forEach(function(key) {
502
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
503
+ });
504
+ }
505
+ return target;
506
+ }
507
+ function _to_consumable_array4(arr) {
508
+ return _array_without_holes4(arr) || _iterable_to_array4(arr) || _unsupported_iterable_to_array4(arr) || _non_iterable_spread4();
509
+ }
510
+ function _unsupported_iterable_to_array4(o, minLen) {
511
+ if (!o)
512
+ return;
513
+ if (typeof o === "string")
514
+ return _array_like_to_array4(o, minLen);
515
+ var n = Object.prototype.toString.call(o).slice(8, -1);
516
+ if (n === "Object" && o.constructor)
517
+ n = o.constructor.name;
518
+ if (n === "Map" || n === "Set")
519
+ return Array.from(n);
520
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
521
+ return _array_like_to_array4(o, minLen);
522
+ }
220
523
  var WORKFLOW_SYMBOL = Symbol.for("MODERN_WORKFLOW");
221
524
  var createWorkflow = function() {
222
525
  var pipeline = createPipeline();
@@ -254,10 +557,92 @@ var mapWorkerToMiddleware = function(worker) {
254
557
  };
255
558
 
256
559
  // src/workflow/parallel.ts
257
- import { _ as _define_property5 } from "@swc/helpers/_/_define_property";
258
- import { _ as _object_spread5 } from "@swc/helpers/_/_object_spread";
259
- import { _ as _object_spread_props4 } from "@swc/helpers/_/_object_spread_props";
260
- import { _ as _to_consumable_array5 } from "@swc/helpers/_/_to_consumable_array";
560
+ function _array_like_to_array5(arr, len) {
561
+ if (len == null || len > arr.length)
562
+ len = arr.length;
563
+ for (var i = 0, arr2 = new Array(len); i < len; i++)
564
+ arr2[i] = arr[i];
565
+ return arr2;
566
+ }
567
+ function _array_without_holes5(arr) {
568
+ if (Array.isArray(arr))
569
+ return _array_like_to_array5(arr);
570
+ }
571
+ function _define_property5(obj, key, value) {
572
+ if (key in obj) {
573
+ Object.defineProperty(obj, key, {
574
+ value: value,
575
+ enumerable: true,
576
+ configurable: true,
577
+ writable: true
578
+ });
579
+ } else {
580
+ obj[key] = value;
581
+ }
582
+ return obj;
583
+ }
584
+ function _iterable_to_array5(iter) {
585
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
586
+ return Array.from(iter);
587
+ }
588
+ function _non_iterable_spread5() {
589
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
590
+ }
591
+ function _object_spread5(target) {
592
+ for (var i = 1; i < arguments.length; i++) {
593
+ var source = arguments[i] != null ? arguments[i] : {};
594
+ var ownKeys8 = Object.keys(source);
595
+ if (typeof Object.getOwnPropertySymbols === "function") {
596
+ ownKeys8 = ownKeys8.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
597
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
598
+ }));
599
+ }
600
+ ownKeys8.forEach(function(key) {
601
+ _define_property5(target, key, source[key]);
602
+ });
603
+ }
604
+ return target;
605
+ }
606
+ function ownKeys4(object, enumerableOnly) {
607
+ var keys = Object.keys(object);
608
+ if (Object.getOwnPropertySymbols) {
609
+ var symbols = Object.getOwnPropertySymbols(object);
610
+ if (enumerableOnly) {
611
+ symbols = symbols.filter(function(sym) {
612
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
613
+ });
614
+ }
615
+ keys.push.apply(keys, symbols);
616
+ }
617
+ return keys;
618
+ }
619
+ function _object_spread_props4(target, source) {
620
+ source = source != null ? source : {};
621
+ if (Object.getOwnPropertyDescriptors) {
622
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
623
+ } else {
624
+ ownKeys4(Object(source)).forEach(function(key) {
625
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
626
+ });
627
+ }
628
+ return target;
629
+ }
630
+ function _to_consumable_array5(arr) {
631
+ return _array_without_holes5(arr) || _iterable_to_array5(arr) || _unsupported_iterable_to_array5(arr) || _non_iterable_spread5();
632
+ }
633
+ function _unsupported_iterable_to_array5(o, minLen) {
634
+ if (!o)
635
+ return;
636
+ if (typeof o === "string")
637
+ return _array_like_to_array5(o, minLen);
638
+ var n = Object.prototype.toString.call(o).slice(8, -1);
639
+ if (n === "Object" && o.constructor)
640
+ n = o.constructor.name;
641
+ if (n === "Map" || n === "Set")
642
+ return Array.from(n);
643
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
644
+ return _array_like_to_array5(o, minLen);
645
+ }
261
646
  var PARALLEL_WORKFLOW_SYMBOL = Symbol.for("MODERN_PARALLEL_WORKFLOW");
262
647
  var isParallelWorkflow = function(input) {
263
648
  return Boolean(input === null || input === void 0 ? void 0 : input[PARALLEL_WORKFLOW_SYMBOL]);
@@ -296,10 +681,92 @@ var mapParallelWorkerToAsyncMiddleware = function(worker) {
296
681
  };
297
682
 
298
683
  // src/workflow/async.ts
299
- import { _ as _define_property6 } from "@swc/helpers/_/_define_property";
300
- import { _ as _object_spread6 } from "@swc/helpers/_/_object_spread";
301
- import { _ as _object_spread_props5 } from "@swc/helpers/_/_object_spread_props";
302
- import { _ as _to_consumable_array6 } from "@swc/helpers/_/_to_consumable_array";
684
+ function _array_like_to_array6(arr, len) {
685
+ if (len == null || len > arr.length)
686
+ len = arr.length;
687
+ for (var i = 0, arr2 = new Array(len); i < len; i++)
688
+ arr2[i] = arr[i];
689
+ return arr2;
690
+ }
691
+ function _array_without_holes6(arr) {
692
+ if (Array.isArray(arr))
693
+ return _array_like_to_array6(arr);
694
+ }
695
+ function _define_property6(obj, key, value) {
696
+ if (key in obj) {
697
+ Object.defineProperty(obj, key, {
698
+ value: value,
699
+ enumerable: true,
700
+ configurable: true,
701
+ writable: true
702
+ });
703
+ } else {
704
+ obj[key] = value;
705
+ }
706
+ return obj;
707
+ }
708
+ function _iterable_to_array6(iter) {
709
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
710
+ return Array.from(iter);
711
+ }
712
+ function _non_iterable_spread6() {
713
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
714
+ }
715
+ function _object_spread6(target) {
716
+ for (var i = 1; i < arguments.length; i++) {
717
+ var source = arguments[i] != null ? arguments[i] : {};
718
+ var ownKeys8 = Object.keys(source);
719
+ if (typeof Object.getOwnPropertySymbols === "function") {
720
+ ownKeys8 = ownKeys8.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
721
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
722
+ }));
723
+ }
724
+ ownKeys8.forEach(function(key) {
725
+ _define_property6(target, key, source[key]);
726
+ });
727
+ }
728
+ return target;
729
+ }
730
+ function ownKeys5(object, enumerableOnly) {
731
+ var keys = Object.keys(object);
732
+ if (Object.getOwnPropertySymbols) {
733
+ var symbols = Object.getOwnPropertySymbols(object);
734
+ if (enumerableOnly) {
735
+ symbols = symbols.filter(function(sym) {
736
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
737
+ });
738
+ }
739
+ keys.push.apply(keys, symbols);
740
+ }
741
+ return keys;
742
+ }
743
+ function _object_spread_props5(target, source) {
744
+ source = source != null ? source : {};
745
+ if (Object.getOwnPropertyDescriptors) {
746
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
747
+ } else {
748
+ ownKeys5(Object(source)).forEach(function(key) {
749
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
750
+ });
751
+ }
752
+ return target;
753
+ }
754
+ function _to_consumable_array6(arr) {
755
+ return _array_without_holes6(arr) || _iterable_to_array6(arr) || _unsupported_iterable_to_array6(arr) || _non_iterable_spread6();
756
+ }
757
+ function _unsupported_iterable_to_array6(o, minLen) {
758
+ if (!o)
759
+ return;
760
+ if (typeof o === "string")
761
+ return _array_like_to_array6(o, minLen);
762
+ var n = Object.prototype.toString.call(o).slice(8, -1);
763
+ if (n === "Object" && o.constructor)
764
+ n = o.constructor.name;
765
+ if (n === "Map" || n === "Set")
766
+ return Array.from(n);
767
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
768
+ return _array_like_to_array6(o, minLen);
769
+ }
303
770
  var ASYNC_WORKFLOW_SYMBOL = Symbol.for("MODERN_ASYNC_WORKFLOW");
304
771
  var isAsyncWorkflow = function(input) {
305
772
  return Boolean(input === null || input === void 0 ? void 0 : input[ASYNC_WORKFLOW_SYMBOL]);
@@ -348,10 +815,6 @@ function isPromise(obj) {
348
815
  return obj && typeof obj.then === "function";
349
816
  }
350
817
 
351
- // src/manager/sync.ts
352
- import { _ as _object_spread7 } from "@swc/helpers/_/_object_spread";
353
- import { _ as _object_spread_props6 } from "@swc/helpers/_/_object_spread_props";
354
-
355
818
  // src/manager/shared.ts
356
819
  import { pluginDagSort } from "@modern-js/utils/universal/plugin-dag-sort";
357
820
  var checkPlugins = function(plugins) {
@@ -390,6 +853,58 @@ var hasOwnProperty = function(obj, prop) {
390
853
  };
391
854
 
392
855
  // src/manager/sync.ts
856
+ function _define_property7(obj, key, value) {
857
+ if (key in obj) {
858
+ Object.defineProperty(obj, key, {
859
+ value: value,
860
+ enumerable: true,
861
+ configurable: true,
862
+ writable: true
863
+ });
864
+ } else {
865
+ obj[key] = value;
866
+ }
867
+ return obj;
868
+ }
869
+ function _object_spread7(target) {
870
+ for (var i = 1; i < arguments.length; i++) {
871
+ var source = arguments[i] != null ? arguments[i] : {};
872
+ var ownKeys8 = Object.keys(source);
873
+ if (typeof Object.getOwnPropertySymbols === "function") {
874
+ ownKeys8 = ownKeys8.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
875
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
876
+ }));
877
+ }
878
+ ownKeys8.forEach(function(key) {
879
+ _define_property7(target, key, source[key]);
880
+ });
881
+ }
882
+ return target;
883
+ }
884
+ function ownKeys6(object, enumerableOnly) {
885
+ var keys = Object.keys(object);
886
+ if (Object.getOwnPropertySymbols) {
887
+ var symbols = Object.getOwnPropertySymbols(object);
888
+ if (enumerableOnly) {
889
+ symbols = symbols.filter(function(sym) {
890
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
891
+ });
892
+ }
893
+ keys.push.apply(keys, symbols);
894
+ }
895
+ return keys;
896
+ }
897
+ function _object_spread_props6(target, source) {
898
+ source = source != null ? source : {};
899
+ if (Object.getOwnPropertyDescriptors) {
900
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
901
+ } else {
902
+ ownKeys6(Object(source)).forEach(function(key) {
903
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
904
+ });
905
+ }
906
+ return target;
907
+ }
393
908
  var SYNC_PLUGIN_SYMBOL = "SYNC_PLUGIN_SYMBOL";
394
909
  var DEFAULT_OPTIONS = {
395
910
  name: "untitled",
@@ -543,8 +1058,58 @@ var cloneHooksMap = function(record) {
543
1058
  };
544
1059
 
545
1060
  // src/manager/async.ts
546
- import { _ as _object_spread8 } from "@swc/helpers/_/_object_spread";
547
- import { _ as _object_spread_props7 } from "@swc/helpers/_/_object_spread_props";
1061
+ function _define_property8(obj, key, value) {
1062
+ if (key in obj) {
1063
+ Object.defineProperty(obj, key, {
1064
+ value: value,
1065
+ enumerable: true,
1066
+ configurable: true,
1067
+ writable: true
1068
+ });
1069
+ } else {
1070
+ obj[key] = value;
1071
+ }
1072
+ return obj;
1073
+ }
1074
+ function _object_spread8(target) {
1075
+ for (var i = 1; i < arguments.length; i++) {
1076
+ var source = arguments[i] != null ? arguments[i] : {};
1077
+ var ownKeys8 = Object.keys(source);
1078
+ if (typeof Object.getOwnPropertySymbols === "function") {
1079
+ ownKeys8 = ownKeys8.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1080
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1081
+ }));
1082
+ }
1083
+ ownKeys8.forEach(function(key) {
1084
+ _define_property8(target, key, source[key]);
1085
+ });
1086
+ }
1087
+ return target;
1088
+ }
1089
+ function ownKeys7(object, enumerableOnly) {
1090
+ var keys = Object.keys(object);
1091
+ if (Object.getOwnPropertySymbols) {
1092
+ var symbols = Object.getOwnPropertySymbols(object);
1093
+ if (enumerableOnly) {
1094
+ symbols = symbols.filter(function(sym) {
1095
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
1096
+ });
1097
+ }
1098
+ keys.push.apply(keys, symbols);
1099
+ }
1100
+ return keys;
1101
+ }
1102
+ function _object_spread_props7(target, source) {
1103
+ source = source != null ? source : {};
1104
+ if (Object.getOwnPropertyDescriptors) {
1105
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1106
+ } else {
1107
+ ownKeys7(Object(source)).forEach(function(key) {
1108
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1109
+ });
1110
+ }
1111
+ return target;
1112
+ }
548
1113
  var ASYNC_PLUGIN_SYMBOL = "ASYNC_PLUGIN_SYMBOL";
549
1114
  var createAsyncManager = function(hooks, api) {
550
1115
  var index = 0;
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "0.0.0-next-1684433204144",
18
+ "version": "0.0.0-next-1684463515400",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -32,16 +32,16 @@
32
32
  }
33
33
  },
34
34
  "dependencies": {
35
- "@swc/helpers": "0.5.1",
36
- "@modern-js/utils": "0.0.0-next-1684433204144"
35
+ "@babel/runtime": "^7.18.0",
36
+ "@modern-js/utils": "0.0.0-next-1684463515400"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/jest": "^29",
40
40
  "@types/node": "^14",
41
41
  "typescript": "^4",
42
42
  "jest": "^29",
43
- "@scripts/build": "0.0.0-next-1684433204144",
44
- "@scripts/jest-config": "0.0.0-next-1684433204144"
43
+ "@scripts/build": "0.0.0-next-1684463515400",
44
+ "@scripts/jest-config": "0.0.0-next-1684463515400"
45
45
  },
46
46
  "sideEffects": false,
47
47
  "publishConfig": {