@modern-js/plugin 0.0.0-nightly-20230921160618 → 0.0.0-nightly-20230923161059

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.
@@ -1,26 +1,29 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- function _export(target, all) {
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
6
7
  for (var name in all)
7
- Object.defineProperty(target, name, {
8
- enumerable: true,
9
- get: all[name]
10
- });
11
- }
12
- _export(exports, {
13
- getAsyncBrook: function() {
14
- return getAsyncBrook;
15
- },
16
- createAsyncWaterfall: function() {
17
- return createAsyncWaterfall;
18
- },
19
- isAsyncWaterfall: function() {
20
- return isAsyncWaterfall;
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
21
15
  }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var async_exports = {};
20
+ __export(async_exports, {
21
+ createAsyncWaterfall: () => createAsyncWaterfall,
22
+ getAsyncBrook: () => getAsyncBrook,
23
+ isAsyncWaterfall: () => isAsyncWaterfall
22
24
  });
23
- const _farrowpipeline = require("../farrow-pipeline");
25
+ module.exports = __toCommonJS(async_exports);
26
+ var import_farrow_pipeline = require("../farrow-pipeline");
24
27
  const ASYNC_WATERFALL_SYMBOL = Symbol.for("MODERN_ASYNC_WATERFALL");
25
28
  const getAsyncBrook = (input) => {
26
29
  if (typeof input === "function") {
@@ -32,7 +35,7 @@ const getAsyncBrook = (input) => {
32
35
  throw new Error(`${input} is not a AsyncBrook or { brook: AsyncBrook }`);
33
36
  };
34
37
  const createAsyncWaterfall = () => {
35
- const pipeline = (0, _farrowpipeline.createAsyncPipeline)();
38
+ const pipeline = (0, import_farrow_pipeline.createAsyncPipeline)();
36
39
  const use = (...input) => {
37
40
  pipeline.use(...input.map(getAsyncBrook).map(mapAsyncBrookToAsyncMiddleware));
38
41
  return waterfall;
@@ -55,5 +58,14 @@ const createAsyncWaterfall = () => {
55
58
  };
56
59
  return waterfall;
57
60
  };
58
- const isAsyncWaterfall = (input) => Boolean(input === null || input === void 0 ? void 0 : input[ASYNC_WATERFALL_SYMBOL]);
61
+ const isAsyncWaterfall = (input) => {
62
+ var _input;
63
+ return Boolean((_input = input) === null || _input === void 0 ? void 0 : _input[ASYNC_WATERFALL_SYMBOL]);
64
+ };
59
65
  const mapAsyncBrookToAsyncMiddleware = (brook) => (input, next) => Promise.resolve(brook(input)).then((result) => next(result));
66
+ // Annotate the CommonJS export names for ESM import in node:
67
+ 0 && (module.exports = {
68
+ createAsyncWaterfall,
69
+ getAsyncBrook,
70
+ isAsyncWaterfall
71
+ });
@@ -1,7 +1,24 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+ var waterfall_exports = {};
17
+ module.exports = __toCommonJS(waterfall_exports);
18
+ __reExport(waterfall_exports, require("./sync"), module.exports);
19
+ __reExport(waterfall_exports, require("./async"), module.exports);
20
+ // Annotate the CommonJS export names for ESM import in node:
21
+ 0 && (module.exports = {
22
+ ...require("./sync"),
23
+ ...require("./async")
4
24
  });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./sync"), exports);
7
- _export_star._(require("./async"), exports);
@@ -1,26 +1,29 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- function _export(target, all) {
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
6
7
  for (var name in all)
7
- Object.defineProperty(target, name, {
8
- enumerable: true,
9
- get: all[name]
10
- });
11
- }
12
- _export(exports, {
13
- getBrook: function() {
14
- return getBrook;
15
- },
16
- createWaterfall: function() {
17
- return createWaterfall;
18
- },
19
- isWaterfall: function() {
20
- return isWaterfall;
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
21
15
  }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var sync_exports = {};
20
+ __export(sync_exports, {
21
+ createWaterfall: () => createWaterfall,
22
+ getBrook: () => getBrook,
23
+ isWaterfall: () => isWaterfall
22
24
  });
23
- const _farrowpipeline = require("../farrow-pipeline");
25
+ module.exports = __toCommonJS(sync_exports);
26
+ var import_farrow_pipeline = require("../farrow-pipeline");
24
27
  const WATERFALL_SYMBOL = Symbol.for("MODERN_WATERFALL");
25
28
  const getBrook = (input) => {
26
29
  if (typeof input === "function") {
@@ -31,7 +34,7 @@ const getBrook = (input) => {
31
34
  throw new Error(`${input} is not a Brook or { brook: Brook }`);
32
35
  };
33
36
  const createWaterfall = () => {
34
- const pipeline = (0, _farrowpipeline.createPipeline)();
37
+ const pipeline = (0, import_farrow_pipeline.createPipeline)();
35
38
  const use = (...brooks) => {
36
39
  pipeline.use(...brooks.map(getBrook).map(mapBrookToMiddleware));
37
40
  return waterfall;
@@ -54,5 +57,14 @@ const createWaterfall = () => {
54
57
  };
55
58
  return waterfall;
56
59
  };
57
- const isWaterfall = (input) => Boolean(input === null || input === void 0 ? void 0 : input[WATERFALL_SYMBOL]);
60
+ const isWaterfall = (input) => {
61
+ var _input;
62
+ return Boolean((_input = input) === null || _input === void 0 ? void 0 : _input[WATERFALL_SYMBOL]);
63
+ };
58
64
  const mapBrookToMiddleware = (brook) => (input, next) => next(brook(input));
65
+ // Annotate the CommonJS export names for ESM import in node:
66
+ 0 && (module.exports = {
67
+ createWaterfall,
68
+ getBrook,
69
+ isWaterfall
70
+ });
@@ -1,28 +1,36 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- function _export(target, all) {
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
6
7
  for (var name in all)
7
- Object.defineProperty(target, name, {
8
- enumerable: true,
9
- get: all[name]
10
- });
11
- }
12
- _export(exports, {
13
- isAsyncWorkflow: function() {
14
- return isAsyncWorkflow;
15
- },
16
- createAsyncWorkflow: function() {
17
- return createAsyncWorkflow;
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
15
  }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var async_exports = {};
20
+ __export(async_exports, {
21
+ createAsyncWorkflow: () => createAsyncWorkflow,
22
+ isAsyncWorkflow: () => isAsyncWorkflow
19
23
  });
20
- const _farrowpipeline = require("../farrow-pipeline");
24
+ module.exports = __toCommonJS(async_exports);
25
+ var import_farrow_pipeline = require("../farrow-pipeline");
21
26
  const ASYNC_WORKFLOW_SYMBOL = Symbol.for("MODERN_ASYNC_WORKFLOW");
22
27
  const isPromise = (obj) => obj && typeof obj.then === "function";
23
- const isAsyncWorkflow = (input) => Boolean(input === null || input === void 0 ? void 0 : input[ASYNC_WORKFLOW_SYMBOL]);
28
+ const isAsyncWorkflow = (input) => {
29
+ var _input;
30
+ return Boolean((_input = input) === null || _input === void 0 ? void 0 : _input[ASYNC_WORKFLOW_SYMBOL]);
31
+ };
24
32
  const createAsyncWorkflow = () => {
25
- const pipeline = (0, _farrowpipeline.createAsyncPipeline)();
33
+ const pipeline = (0, import_farrow_pipeline.createAsyncPipeline)();
26
34
  const use = (...input) => {
27
35
  pipeline.use(...input.map(mapAsyncWorkerToAsyncMiddleware));
28
36
  return workflow;
@@ -48,3 +56,8 @@ const mapAsyncWorkerToAsyncMiddleware = (worker) => (input, next) => Promise.res
48
56
  result,
49
57
  ...nextResult
50
58
  ]));
59
+ // Annotate the CommonJS export names for ESM import in node:
60
+ 0 && (module.exports = {
61
+ createAsyncWorkflow,
62
+ isAsyncWorkflow
63
+ });
@@ -1,8 +1,26 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+ var workflow_exports = {};
17
+ module.exports = __toCommonJS(workflow_exports);
18
+ __reExport(workflow_exports, require("./sync"), module.exports);
19
+ __reExport(workflow_exports, require("./parallel"), module.exports);
20
+ __reExport(workflow_exports, require("./async"), module.exports);
21
+ // Annotate the CommonJS export names for ESM import in node:
22
+ 0 && (module.exports = {
23
+ ...require("./sync"),
24
+ ...require("./parallel"),
25
+ ...require("./async")
4
26
  });
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);
@@ -1,27 +1,35 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- function _export(target, all) {
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
6
7
  for (var name in all)
7
- Object.defineProperty(target, name, {
8
- enumerable: true,
9
- get: all[name]
10
- });
11
- }
12
- _export(exports, {
13
- isParallelWorkflow: function() {
14
- return isParallelWorkflow;
15
- },
16
- createParallelWorkflow: function() {
17
- return createParallelWorkflow;
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
15
  }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var parallel_exports = {};
20
+ __export(parallel_exports, {
21
+ createParallelWorkflow: () => createParallelWorkflow,
22
+ isParallelWorkflow: () => isParallelWorkflow
19
23
  });
20
- const _farrowpipeline = require("../farrow-pipeline");
24
+ module.exports = __toCommonJS(parallel_exports);
25
+ var import_farrow_pipeline = require("../farrow-pipeline");
21
26
  const PARALLEL_WORKFLOW_SYMBOL = Symbol.for("MODERN_PARALLEL_WORKFLOW");
22
- const isParallelWorkflow = (input) => Boolean(input === null || input === void 0 ? void 0 : input[PARALLEL_WORKFLOW_SYMBOL]);
27
+ const isParallelWorkflow = (input) => {
28
+ var _input;
29
+ return Boolean((_input = input) === null || _input === void 0 ? void 0 : _input[PARALLEL_WORKFLOW_SYMBOL]);
30
+ };
23
31
  const createParallelWorkflow = () => {
24
- const pipeline = (0, _farrowpipeline.createPipeline)();
32
+ const pipeline = (0, import_farrow_pipeline.createPipeline)();
25
33
  const use = (...input) => {
26
34
  pipeline.use(...input.map(mapParallelWorkerToAsyncMiddleware));
27
35
  return workflow;
@@ -41,3 +49,8 @@ const mapParallelWorkerToAsyncMiddleware = (worker) => (input, next) => [
41
49
  worker(input),
42
50
  ...next(input)
43
51
  ];
52
+ // Annotate the CommonJS export names for ESM import in node:
53
+ 0 && (module.exports = {
54
+ createParallelWorkflow,
55
+ isParallelWorkflow
56
+ });
@@ -1,26 +1,31 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- function _export(target, all) {
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
6
7
  for (var name in all)
7
- Object.defineProperty(target, name, {
8
- enumerable: true,
9
- get: all[name]
10
- });
11
- }
12
- _export(exports, {
13
- createWorkflow: function() {
14
- return createWorkflow;
15
- },
16
- isWorkflow: function() {
17
- return isWorkflow;
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
15
  }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var sync_exports = {};
20
+ __export(sync_exports, {
21
+ createWorkflow: () => createWorkflow,
22
+ isWorkflow: () => isWorkflow
19
23
  });
20
- const _farrowpipeline = require("../farrow-pipeline");
24
+ module.exports = __toCommonJS(sync_exports);
25
+ var import_farrow_pipeline = require("../farrow-pipeline");
21
26
  const WORKFLOW_SYMBOL = Symbol.for("MODERN_WORKFLOW");
22
27
  const createWorkflow = () => {
23
- const pipeline = (0, _farrowpipeline.createPipeline)();
28
+ const pipeline = (0, import_farrow_pipeline.createPipeline)();
24
29
  const use = (...input) => {
25
30
  pipeline.use(...input.map(mapWorkerToMiddleware));
26
31
  return workflow;
@@ -39,8 +44,16 @@ const createWorkflow = () => {
39
44
  };
40
45
  return workflow;
41
46
  };
42
- const isWorkflow = (input) => Boolean(input === null || input === void 0 ? void 0 : input[WORKFLOW_SYMBOL]);
47
+ const isWorkflow = (input) => {
48
+ var _input;
49
+ return Boolean((_input = input) === null || _input === void 0 ? void 0 : _input[WORKFLOW_SYMBOL]);
50
+ };
43
51
  const mapWorkerToMiddleware = (worker) => (input, next) => [
44
52
  worker(input),
45
53
  ...next(input)
46
54
  ];
55
+ // Annotate the CommonJS export names for ESM import in node:
56
+ 0 && (module.exports = {
57
+ createWorkflow,
58
+ isWorkflow
59
+ });
package/dist/esm/index.js CHANGED
@@ -39,13 +39,14 @@ var createCounter = function(callback) {
39
39
  start: function(input) {
40
40
  return dispatch(0, input);
41
41
  },
42
- dispatch: dispatch
42
+ dispatch
43
43
  };
44
44
  };
45
45
 
46
46
  // src/farrow-pipeline/index.ts
47
47
  var isPipeline = function(input) {
48
- return Boolean(input === null || input === void 0 ? void 0 : input[PipelineSymbol]);
48
+ var _input;
49
+ return Boolean((_input = input) === null || _input === void 0 ? void 0 : _input[PipelineSymbol]);
49
50
  };
50
51
  var PipelineSymbol = Symbol.for("MODERN_PIPELINE");
51
52
  var getMiddleware = function(input) {
@@ -79,10 +80,11 @@ var createPipeline = function() {
79
80
  };
80
81
  var currentCounter = createCurrentCounter();
81
82
  var getCounter = function(options) {
83
+ var _options;
82
84
  if (!options) {
83
85
  return currentCounter;
84
86
  }
85
- return createCurrentCounter(options === null || options === void 0 ? void 0 : options.onLast);
87
+ return createCurrentCounter((_options = options) === null || _options === void 0 ? void 0 : _options.onLast);
86
88
  };
87
89
  var run = function(input, options) {
88
90
  return getCounter(options).start(input);
@@ -140,14 +142,15 @@ var createWaterfall = function() {
140
142
  });
141
143
  };
142
144
  var waterfall = _object_spread_props(_object_spread2({}, pipeline), _define_property2({
143
- use: use,
144
- run: run,
145
- middleware: middleware
145
+ use,
146
+ run,
147
+ middleware
146
148
  }, WATERFALL_SYMBOL, true));
147
149
  return waterfall;
148
150
  };
149
151
  var isWaterfall = function(input) {
150
- return Boolean(input === null || input === void 0 ? void 0 : input[WATERFALL_SYMBOL]);
152
+ var _input;
153
+ return Boolean((_input = input) === null || _input === void 0 ? void 0 : _input[WATERFALL_SYMBOL]);
151
154
  };
152
155
  var mapBrookToMiddleware = function(brook) {
153
156
  return function(input, next) {
@@ -195,14 +198,15 @@ var createAsyncWaterfall = function() {
195
198
  });
196
199
  };
197
200
  var waterfall = _object_spread_props2(_object_spread3({}, pipeline), _define_property3({
198
- use: use,
199
- run: run,
200
- middleware: middleware
201
+ use,
202
+ run,
203
+ middleware
201
204
  }, ASYNC_WATERFALL_SYMBOL, true));
202
205
  return waterfall;
203
206
  };
204
207
  var isAsyncWaterfall = function(input) {
205
- return Boolean(input === null || input === void 0 ? void 0 : input[ASYNC_WATERFALL_SYMBOL]);
208
+ var _input;
209
+ return Boolean((_input = input) === null || _input === void 0 ? void 0 : _input[ASYNC_WATERFALL_SYMBOL]);
206
210
  };
207
211
  var mapAsyncBrookToAsyncMiddleware = function(brook) {
208
212
  return function(input, next) {
@@ -237,13 +241,14 @@ var createWorkflow = function() {
237
241
  return result.filter(Boolean);
238
242
  };
239
243
  var workflow = _object_spread_props3(_object_spread4({}, pipeline), _define_property4({
240
- use: use,
241
- run: run
244
+ use,
245
+ run
242
246
  }, WORKFLOW_SYMBOL, true));
243
247
  return workflow;
244
248
  };
245
249
  var isWorkflow = function(input) {
246
- return Boolean(input === null || input === void 0 ? void 0 : input[WORKFLOW_SYMBOL]);
250
+ var _input;
251
+ return Boolean((_input = input) === null || _input === void 0 ? void 0 : _input[WORKFLOW_SYMBOL]);
247
252
  };
248
253
  var mapWorkerToMiddleware = function(worker) {
249
254
  return function(input, next) {
@@ -260,7 +265,8 @@ import { _ as _object_spread_props4 } from "@swc/helpers/_/_object_spread_props"
260
265
  import { _ as _to_consumable_array5 } from "@swc/helpers/_/_to_consumable_array";
261
266
  var PARALLEL_WORKFLOW_SYMBOL = Symbol.for("MODERN_PARALLEL_WORKFLOW");
262
267
  var isParallelWorkflow = function(input) {
263
- return Boolean(input === null || input === void 0 ? void 0 : input[PARALLEL_WORKFLOW_SYMBOL]);
268
+ var _input;
269
+ return Boolean((_input = input) === null || _input === void 0 ? void 0 : _input[PARALLEL_WORKFLOW_SYMBOL]);
264
270
  };
265
271
  var createParallelWorkflow = function() {
266
272
  var pipeline = createPipeline();
@@ -282,8 +288,8 @@ var createParallelWorkflow = function() {
282
288
  });
283
289
  };
284
290
  var workflow = _object_spread_props4(_object_spread5({}, pipeline), _define_property5({
285
- run: run,
286
- use: use
291
+ run,
292
+ use
287
293
  }, PARALLEL_WORKFLOW_SYMBOL, true));
288
294
  return workflow;
289
295
  };
@@ -305,7 +311,8 @@ var isPromise = function(obj) {
305
311
  return obj && typeof obj.then === "function";
306
312
  };
307
313
  var isAsyncWorkflow = function(input) {
308
- return Boolean(input === null || input === void 0 ? void 0 : input[ASYNC_WORKFLOW_SYMBOL]);
314
+ var _input;
315
+ return Boolean((_input = input) === null || _input === void 0 ? void 0 : _input[ASYNC_WORKFLOW_SYMBOL]);
309
316
  };
310
317
  var createAsyncWorkflow = function() {
311
318
  var pipeline = createAsyncPipeline();
@@ -331,8 +338,8 @@ var createAsyncWorkflow = function() {
331
338
  return result.filter(Boolean);
332
339
  };
333
340
  var workflow = _object_spread_props5(_object_spread6({}, pipeline), _define_property6({
334
- use: use,
335
- run: run
341
+ use,
342
+ run
336
343
  }, ASYNC_WORKFLOW_SYMBOL, true));
337
344
  return workflow;
338
345
  };
@@ -456,8 +463,8 @@ var createManager = function(hooks, api) {
456
463
  return _object_spread_props6(_object_spread7(_object_spread_props6(_object_spread7({}, DEFAULT_OPTIONS), {
457
464
  name: "No.".concat(index++, " plugin")
458
465
  }), options), {
459
- SYNC_PLUGIN_SYMBOL: SYNC_PLUGIN_SYMBOL,
460
- setup: setup
466
+ SYNC_PLUGIN_SYMBOL,
467
+ setup
461
468
  });
462
469
  };
463
470
  var clear = function() {
@@ -477,15 +484,15 @@ var createManager = function(hooks, api) {
477
484
  return cb();
478
485
  };
479
486
  var manager = {
480
- createPlugin: createPlugin,
481
- isPlugin: isPlugin,
482
- usePlugin: usePlugin,
483
- init: init,
484
- clear: clear,
485
- run: run,
486
- registerHook: registerHook,
487
- useRunner: useRunner,
488
- clone: clone
487
+ createPlugin,
488
+ isPlugin,
489
+ usePlugin,
490
+ init,
491
+ clear,
492
+ run,
493
+ registerHook,
494
+ useRunner,
495
+ clone
489
496
  };
490
497
  return manager;
491
498
  };
@@ -497,7 +504,8 @@ var generateRunner = function(hooksList, hooksMap) {
497
504
  if (hooksMap) {
498
505
  var _loop = function(key2) {
499
506
  hooksList.forEach(function(hooks) {
500
- if (hooks === null || hooks === void 0 ? void 0 : hooks[key2]) {
507
+ var _hooks;
508
+ if ((_hooks = hooks) === null || _hooks === void 0 ? void 0 : _hooks[key2]) {
501
509
  cloneShape[key2].use(hooks[key2]);
502
510
  }
503
511
  });
@@ -604,8 +612,8 @@ var createAsyncManager = function(hooks, api) {
604
612
  return _object_spread_props7(_object_spread8(_object_spread_props7(_object_spread8({}, DEFAULT_OPTIONS), {
605
613
  name: "No.".concat(index++, " plugin")
606
614
  }), options), {
607
- ASYNC_PLUGIN_SYMBOL: ASYNC_PLUGIN_SYMBOL,
608
- setup: setup
615
+ ASYNC_PLUGIN_SYMBOL,
616
+ setup
609
617
  });
610
618
  };
611
619
  var clear = function() {
@@ -698,15 +706,15 @@ var createAsyncManager = function(hooks, api) {
698
706
  return cb();
699
707
  };
700
708
  var manager = {
701
- createPlugin: createPlugin,
702
- isPlugin: isPlugin,
703
- usePlugin: usePlugin,
704
- init: init,
705
- run: run,
706
- clear: clear,
707
- clone: clone,
708
- registerHook: registerHook,
709
- useRunner: useRunner
709
+ createPlugin,
710
+ isPlugin,
711
+ usePlugin,
712
+ init,
713
+ run,
714
+ clear,
715
+ clone,
716
+ registerHook,
717
+ useRunner
710
718
  };
711
719
  return manager;
712
720
  };
@@ -1,4 +1,4 @@
1
- export const createContext = (value) => {
1
+ const createContext = (value) => {
2
2
  let currentValue = value;
3
3
  return {
4
4
  use: () => ({
@@ -15,3 +15,6 @@ export const createContext = (value) => {
15
15
  }
16
16
  };
17
17
  };
18
+ export {
19
+ createContext
20
+ };
@@ -1,4 +1,4 @@
1
- export const createCounter = (callback) => {
1
+ const createCounter = (callback) => {
2
2
  const dispatch = (index, input) => {
3
3
  const next = (nextInput = input) => dispatch(index + 1, nextInput);
4
4
  return callback(index, input, next);
@@ -8,3 +8,6 @@ export const createCounter = (callback) => {
8
8
  dispatch
9
9
  };
10
10
  };
11
+ export {
12
+ createCounter
13
+ };