@modern-js/plugin 2.0.0-beta.4 → 2.0.0-beta.7

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,5 +1,25 @@
1
1
  # @modern-js/plugin
2
2
 
3
+ ## 2.0.0-beta.7
4
+
5
+ ### Major Changes
6
+
7
+ - dda38c9c3e: chore: v2
8
+
9
+ ## 2.0.0-beta.6
10
+
11
+ ### Major Changes
12
+
13
+ - dda38c9c3e: chore: v2
14
+
15
+ ### Patch Changes
16
+
17
+ - b8bbe036c7: feat: change type logic
18
+ feat: 修改类型相关的逻辑
19
+ - f179749375: fix: the sortPlugins api not work
20
+
21
+ fix: sortPlugins 没有真实生效
22
+
3
23
  ## 2.0.0-beta.4
4
24
 
5
25
  ### Major Changes
@@ -15,11 +15,11 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var stdin_exports = {};
19
- __export(stdin_exports, {
18
+ var context_exports = {};
19
+ __export(context_exports, {
20
20
  createContext: () => createContext
21
21
  });
22
- module.exports = __toCommonJS(stdin_exports);
22
+ module.exports = __toCommonJS(context_exports);
23
23
  const createContext = (value) => {
24
24
  let currentValue;
25
25
  const create = (value2) => {
@@ -46,3 +46,7 @@ const createContext = (value) => {
46
46
  };
47
47
  return create(value);
48
48
  };
49
+ // Annotate the CommonJS export names for ESM import in node:
50
+ 0 && (module.exports = {
51
+ createContext
52
+ });
@@ -15,11 +15,11 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var stdin_exports = {};
19
- __export(stdin_exports, {
18
+ var counter_exports = {};
19
+ __export(counter_exports, {
20
20
  createCounter: () => createCounter
21
21
  });
22
- module.exports = __toCommonJS(stdin_exports);
22
+ module.exports = __toCommonJS(counter_exports);
23
23
  const createCounter = (callback) => {
24
24
  const dispatch = (index, input) => {
25
25
  const next = (nextInput = input) => dispatch(index + 1, nextInput);
@@ -31,3 +31,7 @@ const createCounter = (callback) => {
31
31
  dispatch
32
32
  };
33
33
  };
34
+ // Annotate the CommonJS export names for ESM import in node:
35
+ 0 && (module.exports = {
36
+ createCounter
37
+ });
@@ -12,6 +12,6 @@ var __copyProps = (to, from, except, desc) => {
12
12
  };
13
13
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
14
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
- var stdin_exports = {};
16
- module.exports = __toCommonJS(stdin_exports);
17
- __reExport(stdin_exports, require("./pipeline"), module.exports);
15
+ var farrow_pipeline_exports = {};
16
+ module.exports = __toCommonJS(farrow_pipeline_exports);
17
+ __reExport(farrow_pipeline_exports, require("./pipeline"), module.exports);
@@ -1,7 +1,21 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
5
19
  var __export = (target, all) => {
6
20
  for (var name in all)
7
21
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -15,32 +29,16 @@ var __copyProps = (to, from, except, desc) => {
15
29
  return to;
16
30
  };
17
31
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var stdin_exports = {};
19
- __export(stdin_exports, {
32
+ var pipeline_exports = {};
33
+ __export(pipeline_exports, {
20
34
  createAsyncPipeline: () => createAsyncPipeline,
21
35
  createContext: () => import_context.createContext,
22
36
  createPipeline: () => createPipeline,
23
37
  isPipeline: () => isPipeline
24
38
  });
25
- module.exports = __toCommonJS(stdin_exports);
39
+ module.exports = __toCommonJS(pipeline_exports);
26
40
  var import_context = require("./context");
27
41
  var import_counter = require("./counter");
28
- var __defProp2 = Object.defineProperty;
29
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
30
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
31
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
32
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
33
- var __spreadValues = (a, b) => {
34
- for (var prop in b || (b = {}))
35
- if (__hasOwnProp2.call(b, prop))
36
- __defNormalProp(a, prop, b[prop]);
37
- if (__getOwnPropSymbols)
38
- for (var prop of __getOwnPropSymbols(b)) {
39
- if (__propIsEnum.call(b, prop))
40
- __defNormalProp(a, prop, b[prop]);
41
- }
42
- return a;
43
- };
44
42
  const isPipeline = (input) => Boolean(input == null ? void 0 : input[PipelineSymbol]);
45
43
  const PipelineSymbol = Symbol.for("MODERN_PIPELINE");
46
44
  const getMiddleware = (input) => {
@@ -93,3 +91,10 @@ const createAsyncPipeline = () => {
93
91
  const pipeline = createPipeline();
94
92
  return __spreadValues({}, pipeline);
95
93
  };
94
+ // Annotate the CommonJS export names for ESM import in node:
95
+ 0 && (module.exports = {
96
+ createAsyncPipeline,
97
+ createContext,
98
+ createPipeline,
99
+ isPipeline
100
+ });
@@ -12,9 +12,9 @@ var __copyProps = (to, from, except, desc) => {
12
12
  };
13
13
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
14
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
- var stdin_exports = {};
16
- module.exports = __toCommonJS(stdin_exports);
17
- __reExport(stdin_exports, require("./farrow-pipeline"), module.exports);
18
- __reExport(stdin_exports, require("./waterfall"), module.exports);
19
- __reExport(stdin_exports, require("./workflow"), module.exports);
20
- __reExport(stdin_exports, require("./manager"), module.exports);
15
+ var src_exports = {};
16
+ module.exports = __toCommonJS(src_exports);
17
+ __reExport(src_exports, require("./farrow-pipeline"), module.exports);
18
+ __reExport(src_exports, require("./waterfall"), module.exports);
19
+ __reExport(src_exports, require("./workflow"), module.exports);
20
+ __reExport(src_exports, require("./manager"), module.exports);
@@ -1,7 +1,24 @@
1
1
  var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
3
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
+ var __spreadValues = (a, b) => {
11
+ for (var prop in b || (b = {}))
12
+ if (__hasOwnProp.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ if (__getOwnPropSymbols)
15
+ for (var prop of __getOwnPropSymbols(b)) {
16
+ if (__propIsEnum.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ }
19
+ return a;
20
+ };
21
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
5
22
  var __export = (target, all) => {
6
23
  for (var name in all)
7
24
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -15,32 +32,6 @@ var __copyProps = (to, from, except, desc) => {
15
32
  return to;
16
33
  };
17
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var stdin_exports = {};
19
- __export(stdin_exports, {
20
- createAsyncManager: () => createAsyncManager
21
- });
22
- module.exports = __toCommonJS(stdin_exports);
23
- var import_sync = require("./sync");
24
- var import_shared = require("./shared");
25
- var __defProp2 = Object.defineProperty;
26
- var __defProps = Object.defineProperties;
27
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
28
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
29
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
30
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
31
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
32
- var __spreadValues = (a, b) => {
33
- for (var prop in b || (b = {}))
34
- if (__hasOwnProp2.call(b, prop))
35
- __defNormalProp(a, prop, b[prop]);
36
- if (__getOwnPropSymbols)
37
- for (var prop of __getOwnPropSymbols(b)) {
38
- if (__propIsEnum.call(b, prop))
39
- __defNormalProp(a, prop, b[prop]);
40
- }
41
- return a;
42
- };
43
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
44
35
  var __async = (__this, __arguments, generator) => {
45
36
  return new Promise((resolve, reject) => {
46
37
  var fulfilled = (value) => {
@@ -61,6 +52,13 @@ var __async = (__this, __arguments, generator) => {
61
52
  step((generator = generator.apply(__this, __arguments)).next());
62
53
  });
63
54
  };
55
+ var async_exports = {};
56
+ __export(async_exports, {
57
+ createAsyncManager: () => createAsyncManager
58
+ });
59
+ module.exports = __toCommonJS(async_exports);
60
+ var import_sync = require("./sync");
61
+ var import_shared = require("./shared");
64
62
  const ASYNC_PLUGIN_SYMBOL = "ASYNC_PLUGIN_SYMBOL";
65
63
  const createAsyncManager = (hooks, api) => {
66
64
  let index = 0;
@@ -143,3 +141,7 @@ const createAsyncManager = (hooks, api) => {
143
141
  };
144
142
  return clone();
145
143
  };
144
+ // Annotate the CommonJS export names for ESM import in node:
145
+ 0 && (module.exports = {
146
+ createAsyncManager
147
+ });
@@ -12,8 +12,8 @@ var __copyProps = (to, from, except, desc) => {
12
12
  };
13
13
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
14
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
- var stdin_exports = {};
16
- module.exports = __toCommonJS(stdin_exports);
17
- __reExport(stdin_exports, require("./sync"), module.exports);
18
- __reExport(stdin_exports, require("./async"), module.exports);
19
- __reExport(stdin_exports, require("./types"), module.exports);
15
+ var manager_exports = {};
16
+ module.exports = __toCommonJS(manager_exports);
17
+ __reExport(manager_exports, require("./sync"), module.exports);
18
+ __reExport(manager_exports, require("./async"), module.exports);
19
+ __reExport(manager_exports, require("./types"), module.exports);
@@ -15,15 +15,15 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var stdin_exports = {};
19
- __export(stdin_exports, {
18
+ var shared_exports = {};
19
+ __export(shared_exports, {
20
20
  checkPlugins: () => checkPlugins,
21
21
  hasOwnProperty: () => hasOwnProperty,
22
22
  includePlugin: () => includePlugin,
23
23
  isObject: () => isObject,
24
24
  sortPlugins: () => sortPlugins
25
25
  });
26
- module.exports = __toCommonJS(stdin_exports);
26
+ module.exports = __toCommonJS(shared_exports);
27
27
  var import_pluginDagSort = require("../utils/pluginDagSort");
28
28
  const checkPlugins = (plugins) => {
29
29
  plugins.forEach((origin) => {
@@ -50,3 +50,11 @@ function sortPlugins(input) {
50
50
  const includePlugin = (plugins, input) => plugins.some((plugin) => plugin.name === input.name);
51
51
  const isObject = (obj) => obj !== null && typeof obj === "object";
52
52
  const hasOwnProperty = (obj, prop) => obj.hasOwnProperty(prop);
53
+ // Annotate the CommonJS export names for ESM import in node:
54
+ 0 && (module.exports = {
55
+ checkPlugins,
56
+ hasOwnProperty,
57
+ includePlugin,
58
+ isObject,
59
+ sortPlugins
60
+ });
@@ -1,7 +1,24 @@
1
1
  var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
3
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
+ var __spreadValues = (a, b) => {
11
+ for (var prop in b || (b = {}))
12
+ if (__hasOwnProp.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ if (__getOwnPropSymbols)
15
+ for (var prop of __getOwnPropSymbols(b)) {
16
+ if (__propIsEnum.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ }
19
+ return a;
20
+ };
21
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
5
22
  var __export = (target, all) => {
6
23
  for (var name in all)
7
24
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -15,38 +32,19 @@ var __copyProps = (to, from, except, desc) => {
15
32
  return to;
16
33
  };
17
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var stdin_exports = {};
19
- __export(stdin_exports, {
35
+ var sync_exports = {};
36
+ __export(sync_exports, {
20
37
  DEFAULT_OPTIONS: () => DEFAULT_OPTIONS,
21
38
  cloneHook: () => cloneHook,
22
39
  cloneHooksMap: () => cloneHooksMap,
23
40
  createManager: () => createManager,
24
41
  generateRunner: () => generateRunner
25
42
  });
26
- module.exports = __toCommonJS(stdin_exports);
43
+ module.exports = __toCommonJS(sync_exports);
27
44
  var import_farrow_pipeline = require("../farrow-pipeline");
28
45
  var import_waterfall = require("../waterfall");
29
46
  var import_workflow = require("../workflow");
30
47
  var import_shared = require("./shared");
31
- var __defProp2 = Object.defineProperty;
32
- var __defProps = Object.defineProperties;
33
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
34
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
35
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
36
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
37
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
38
- var __spreadValues = (a, b) => {
39
- for (var prop in b || (b = {}))
40
- if (__hasOwnProp2.call(b, prop))
41
- __defNormalProp(a, prop, b[prop]);
42
- if (__getOwnPropSymbols)
43
- for (var prop of __getOwnPropSymbols(b)) {
44
- if (__propIsEnum.call(b, prop))
45
- __defNormalProp(a, prop, b[prop]);
46
- }
47
- return a;
48
- };
49
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
50
48
  const SYNC_PLUGIN_SYMBOL = "SYNC_PLUGIN_SYMBOL";
51
49
  const DEFAULT_OPTIONS = {
52
50
  name: "untitled",
@@ -187,3 +185,11 @@ const cloneHooksMap = (record) => {
187
185
  }
188
186
  return result;
189
187
  };
188
+ // Annotate the CommonJS export names for ESM import in node:
189
+ 0 && (module.exports = {
190
+ DEFAULT_OPTIONS,
191
+ cloneHook,
192
+ cloneHooksMap,
193
+ createManager,
194
+ generateRunner
195
+ });
@@ -0,0 +1,15 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var types_exports = {};
15
+ module.exports = __toCommonJS(types_exports);
@@ -15,11 +15,11 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var stdin_exports = {};
19
- __export(stdin_exports, {
18
+ var pluginDagSort_exports = {};
19
+ __export(pluginDagSort_exports, {
20
20
  dagSort: () => dagSort
21
21
  });
22
- module.exports = __toCommonJS(stdin_exports);
22
+ module.exports = __toCommonJS(pluginDagSort_exports);
23
23
  const dagSort = (plugins, key = "name", preKey = "pre", postKey = "post") => {
24
24
  let allLines = [];
25
25
  function getPluginByAny(q) {
@@ -72,3 +72,7 @@ const dagSort = (plugins, key = "name", preKey = "pre", postKey = "post") => {
72
72
  }
73
73
  return sortedPoint;
74
74
  };
75
+ // Annotate the CommonJS export names for ESM import in node:
76
+ 0 && (module.exports = {
77
+ dagSort
78
+ });
@@ -1,7 +1,24 @@
1
1
  var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
3
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
+ var __spreadValues = (a, b) => {
11
+ for (var prop in b || (b = {}))
12
+ if (__hasOwnProp.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ if (__getOwnPropSymbols)
15
+ for (var prop of __getOwnPropSymbols(b)) {
16
+ if (__propIsEnum.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ }
19
+ return a;
20
+ };
21
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
5
22
  var __export = (target, all) => {
6
23
  for (var name in all)
7
24
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -15,33 +32,6 @@ var __copyProps = (to, from, except, desc) => {
15
32
  return to;
16
33
  };
17
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var stdin_exports = {};
19
- __export(stdin_exports, {
20
- createAsyncWaterfall: () => createAsyncWaterfall,
21
- getAsyncBrook: () => getAsyncBrook,
22
- isAsyncWaterfall: () => isAsyncWaterfall
23
- });
24
- module.exports = __toCommonJS(stdin_exports);
25
- var import_farrow_pipeline = require("../farrow-pipeline");
26
- var __defProp2 = Object.defineProperty;
27
- var __defProps = Object.defineProperties;
28
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
29
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
30
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
31
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
32
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
33
- var __spreadValues = (a, b) => {
34
- for (var prop in b || (b = {}))
35
- if (__hasOwnProp2.call(b, prop))
36
- __defNormalProp(a, prop, b[prop]);
37
- if (__getOwnPropSymbols)
38
- for (var prop of __getOwnPropSymbols(b)) {
39
- if (__propIsEnum.call(b, prop))
40
- __defNormalProp(a, prop, b[prop]);
41
- }
42
- return a;
43
- };
44
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
45
35
  var __async = (__this, __arguments, generator) => {
46
36
  return new Promise((resolve, reject) => {
47
37
  var fulfilled = (value) => {
@@ -62,6 +52,14 @@ var __async = (__this, __arguments, generator) => {
62
52
  step((generator = generator.apply(__this, __arguments)).next());
63
53
  });
64
54
  };
55
+ var async_exports = {};
56
+ __export(async_exports, {
57
+ createAsyncWaterfall: () => createAsyncWaterfall,
58
+ getAsyncBrook: () => getAsyncBrook,
59
+ isAsyncWaterfall: () => isAsyncWaterfall
60
+ });
61
+ module.exports = __toCommonJS(async_exports);
62
+ var import_farrow_pipeline = require("../farrow-pipeline");
65
63
  const ASYNC_WATERFALL_SYMBOL = Symbol.for("MODERN_ASYNC_WATERFALL");
66
64
  const getAsyncBrook = (input) => {
67
65
  if (typeof input === "function") {
@@ -95,3 +93,9 @@ const isAsyncWaterfall = (input) => Boolean(input == null ? void 0 : input[ASYNC
95
93
  const mapAsyncBrookToAsyncMiddleware = (brook) => (input, next) => __async(void 0, null, function* () {
96
94
  return next(yield brook(input));
97
95
  });
96
+ // Annotate the CommonJS export names for ESM import in node:
97
+ 0 && (module.exports = {
98
+ createAsyncWaterfall,
99
+ getAsyncBrook,
100
+ isAsyncWaterfall
101
+ });
@@ -12,7 +12,7 @@ var __copyProps = (to, from, except, desc) => {
12
12
  };
13
13
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
14
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
- var stdin_exports = {};
16
- module.exports = __toCommonJS(stdin_exports);
17
- __reExport(stdin_exports, require("./sync"), module.exports);
18
- __reExport(stdin_exports, require("./async"), module.exports);
15
+ var waterfall_exports = {};
16
+ module.exports = __toCommonJS(waterfall_exports);
17
+ __reExport(waterfall_exports, require("./sync"), module.exports);
18
+ __reExport(waterfall_exports, require("./async"), module.exports);
@@ -1,7 +1,24 @@
1
1
  var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
3
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
+ var __spreadValues = (a, b) => {
11
+ for (var prop in b || (b = {}))
12
+ if (__hasOwnProp.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ if (__getOwnPropSymbols)
15
+ for (var prop of __getOwnPropSymbols(b)) {
16
+ if (__propIsEnum.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ }
19
+ return a;
20
+ };
21
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
5
22
  var __export = (target, all) => {
6
23
  for (var name in all)
7
24
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -15,33 +32,14 @@ var __copyProps = (to, from, except, desc) => {
15
32
  return to;
16
33
  };
17
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var stdin_exports = {};
19
- __export(stdin_exports, {
35
+ var sync_exports = {};
36
+ __export(sync_exports, {
20
37
  createWaterfall: () => createWaterfall,
21
38
  getBrook: () => getBrook,
22
39
  isWaterfall: () => isWaterfall
23
40
  });
24
- module.exports = __toCommonJS(stdin_exports);
41
+ module.exports = __toCommonJS(sync_exports);
25
42
  var import_farrow_pipeline = require("../farrow-pipeline");
26
- var __defProp2 = Object.defineProperty;
27
- var __defProps = Object.defineProperties;
28
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
29
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
30
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
31
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
32
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
33
- var __spreadValues = (a, b) => {
34
- for (var prop in b || (b = {}))
35
- if (__hasOwnProp2.call(b, prop))
36
- __defNormalProp(a, prop, b[prop]);
37
- if (__getOwnPropSymbols)
38
- for (var prop of __getOwnPropSymbols(b)) {
39
- if (__propIsEnum.call(b, prop))
40
- __defNormalProp(a, prop, b[prop]);
41
- }
42
- return a;
43
- };
44
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
45
43
  const WATERFALL_SYMBOL = Symbol.for("MODERN_WATERFALL");
46
44
  const getBrook = (input) => {
47
45
  if (typeof input === "function") {
@@ -71,3 +69,9 @@ const createWaterfall = () => {
71
69
  };
72
70
  const isWaterfall = (input) => Boolean(input == null ? void 0 : input[WATERFALL_SYMBOL]);
73
71
  const mapBrookToMiddleware = (brook) => (input, next) => next(brook(input));
72
+ // Annotate the CommonJS export names for ESM import in node:
73
+ 0 && (module.exports = {
74
+ createWaterfall,
75
+ getBrook,
76
+ isWaterfall
77
+ });
@@ -1,7 +1,24 @@
1
1
  var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
3
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
+ var __spreadValues = (a, b) => {
11
+ for (var prop in b || (b = {}))
12
+ if (__hasOwnProp.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ if (__getOwnPropSymbols)
15
+ for (var prop of __getOwnPropSymbols(b)) {
16
+ if (__propIsEnum.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ }
19
+ return a;
20
+ };
21
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
5
22
  var __export = (target, all) => {
6
23
  for (var name in all)
7
24
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -15,32 +32,6 @@ var __copyProps = (to, from, except, desc) => {
15
32
  return to;
16
33
  };
17
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var stdin_exports = {};
19
- __export(stdin_exports, {
20
- createAsyncWorkflow: () => createAsyncWorkflow,
21
- isAsyncWorkflow: () => isAsyncWorkflow
22
- });
23
- module.exports = __toCommonJS(stdin_exports);
24
- var import_farrow_pipeline = require("../farrow-pipeline");
25
- var __defProp2 = Object.defineProperty;
26
- var __defProps = Object.defineProperties;
27
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
28
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
29
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
30
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
31
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
32
- var __spreadValues = (a, b) => {
33
- for (var prop in b || (b = {}))
34
- if (__hasOwnProp2.call(b, prop))
35
- __defNormalProp(a, prop, b[prop]);
36
- if (__getOwnPropSymbols)
37
- for (var prop of __getOwnPropSymbols(b)) {
38
- if (__propIsEnum.call(b, prop))
39
- __defNormalProp(a, prop, b[prop]);
40
- }
41
- return a;
42
- };
43
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
44
35
  var __async = (__this, __arguments, generator) => {
45
36
  return new Promise((resolve, reject) => {
46
37
  var fulfilled = (value) => {
@@ -61,6 +52,13 @@ var __async = (__this, __arguments, generator) => {
61
52
  step((generator = generator.apply(__this, __arguments)).next());
62
53
  });
63
54
  };
55
+ var async_exports = {};
56
+ __export(async_exports, {
57
+ createAsyncWorkflow: () => createAsyncWorkflow,
58
+ isAsyncWorkflow: () => isAsyncWorkflow
59
+ });
60
+ module.exports = __toCommonJS(async_exports);
61
+ var import_farrow_pipeline = require("../farrow-pipeline");
64
62
  const ASYNC_WORKFLOW_SYMBOL = Symbol.for("MODERN_ASYNC_WORKFLOW");
65
63
  const isAsyncWorkflow = (input) => Boolean(input == null ? void 0 : input[ASYNC_WORKFLOW_SYMBOL]);
66
64
  const createAsyncWorkflow = () => {
@@ -90,3 +88,8 @@ const mapAsyncWorkerToAsyncMiddleware = (worker) => (input, next) => __async(voi
90
88
  function isPromise(obj) {
91
89
  return Boolean(obj) && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function";
92
90
  }
91
+ // Annotate the CommonJS export names for ESM import in node:
92
+ 0 && (module.exports = {
93
+ createAsyncWorkflow,
94
+ isAsyncWorkflow
95
+ });
@@ -12,8 +12,8 @@ var __copyProps = (to, from, except, desc) => {
12
12
  };
13
13
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
14
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
- var stdin_exports = {};
16
- module.exports = __toCommonJS(stdin_exports);
17
- __reExport(stdin_exports, require("./sync"), module.exports);
18
- __reExport(stdin_exports, require("./parallel"), module.exports);
19
- __reExport(stdin_exports, require("./async"), module.exports);
15
+ var workflow_exports = {};
16
+ module.exports = __toCommonJS(workflow_exports);
17
+ __reExport(workflow_exports, require("./sync"), module.exports);
18
+ __reExport(workflow_exports, require("./parallel"), module.exports);
19
+ __reExport(workflow_exports, require("./async"), module.exports);
@@ -1,7 +1,24 @@
1
1
  var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
3
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
+ var __spreadValues = (a, b) => {
11
+ for (var prop in b || (b = {}))
12
+ if (__hasOwnProp.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ if (__getOwnPropSymbols)
15
+ for (var prop of __getOwnPropSymbols(b)) {
16
+ if (__propIsEnum.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ }
19
+ return a;
20
+ };
21
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
5
22
  var __export = (target, all) => {
6
23
  for (var name in all)
7
24
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -15,32 +32,6 @@ var __copyProps = (to, from, except, desc) => {
15
32
  return to;
16
33
  };
17
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var stdin_exports = {};
19
- __export(stdin_exports, {
20
- createParallelWorkflow: () => createParallelWorkflow,
21
- isParallelWorkflow: () => isParallelWorkflow
22
- });
23
- module.exports = __toCommonJS(stdin_exports);
24
- var import_farrow_pipeline = require("../farrow-pipeline");
25
- var __defProp2 = Object.defineProperty;
26
- var __defProps = Object.defineProperties;
27
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
28
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
29
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
30
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
31
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
32
- var __spreadValues = (a, b) => {
33
- for (var prop in b || (b = {}))
34
- if (__hasOwnProp2.call(b, prop))
35
- __defNormalProp(a, prop, b[prop]);
36
- if (__getOwnPropSymbols)
37
- for (var prop of __getOwnPropSymbols(b)) {
38
- if (__propIsEnum.call(b, prop))
39
- __defNormalProp(a, prop, b[prop]);
40
- }
41
- return a;
42
- };
43
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
44
35
  var __async = (__this, __arguments, generator) => {
45
36
  return new Promise((resolve, reject) => {
46
37
  var fulfilled = (value) => {
@@ -61,6 +52,13 @@ var __async = (__this, __arguments, generator) => {
61
52
  step((generator = generator.apply(__this, __arguments)).next());
62
53
  });
63
54
  };
55
+ var parallel_exports = {};
56
+ __export(parallel_exports, {
57
+ createParallelWorkflow: () => createParallelWorkflow,
58
+ isParallelWorkflow: () => isParallelWorkflow
59
+ });
60
+ module.exports = __toCommonJS(parallel_exports);
61
+ var import_farrow_pipeline = require("../farrow-pipeline");
64
62
  const PARALLEL_WORKFLOW_SYMBOL = Symbol.for("MODERN_PARALLEL_WORKFLOW");
65
63
  const isParallelWorkflow = (input) => Boolean(input == null ? void 0 : input[PARALLEL_WORKFLOW_SYMBOL]);
66
64
  const createParallelWorkflow = () => {
@@ -82,3 +80,8 @@ const createParallelWorkflow = () => {
82
80
  return workflow;
83
81
  };
84
82
  const mapParallelWorkerToAsyncMiddleware = (worker) => (input, next) => [worker(input), ...next(input)];
83
+ // Annotate the CommonJS export names for ESM import in node:
84
+ 0 && (module.exports = {
85
+ createParallelWorkflow,
86
+ isParallelWorkflow
87
+ });
@@ -1,7 +1,24 @@
1
1
  var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
3
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
+ var __spreadValues = (a, b) => {
11
+ for (var prop in b || (b = {}))
12
+ if (__hasOwnProp.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ if (__getOwnPropSymbols)
15
+ for (var prop of __getOwnPropSymbols(b)) {
16
+ if (__propIsEnum.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ }
19
+ return a;
20
+ };
21
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
5
22
  var __export = (target, all) => {
6
23
  for (var name in all)
7
24
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -15,32 +32,13 @@ var __copyProps = (to, from, except, desc) => {
15
32
  return to;
16
33
  };
17
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var stdin_exports = {};
19
- __export(stdin_exports, {
35
+ var sync_exports = {};
36
+ __export(sync_exports, {
20
37
  createWorkflow: () => createWorkflow,
21
38
  isWorkflow: () => isWorkflow
22
39
  });
23
- module.exports = __toCommonJS(stdin_exports);
40
+ module.exports = __toCommonJS(sync_exports);
24
41
  var import_farrow_pipeline = require("../farrow-pipeline");
25
- var __defProp2 = Object.defineProperty;
26
- var __defProps = Object.defineProperties;
27
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
28
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
29
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
30
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
31
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
32
- var __spreadValues = (a, b) => {
33
- for (var prop in b || (b = {}))
34
- if (__hasOwnProp2.call(b, prop))
35
- __defNormalProp(a, prop, b[prop]);
36
- if (__getOwnPropSymbols)
37
- for (var prop of __getOwnPropSymbols(b)) {
38
- if (__propIsEnum.call(b, prop))
39
- __defNormalProp(a, prop, b[prop]);
40
- }
41
- return a;
42
- };
43
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
44
42
  const WORKFLOW_SYMBOL = Symbol.for("MODERN_WORKFLOW");
45
43
  const createWorkflow = () => {
46
44
  const pipeline = (0, import_farrow_pipeline.createPipeline)();
@@ -61,3 +59,8 @@ const createWorkflow = () => {
61
59
  };
62
60
  const isWorkflow = (input) => Boolean(input == null ? void 0 : input[WORKFLOW_SYMBOL]);
63
61
  const mapWorkerToMiddleware = (worker) => (input, next) => [worker(input), ...next(input)];
62
+ // Annotate the CommonJS export names for ESM import in node:
63
+ 0 && (module.exports = {
64
+ createWorkflow,
65
+ isWorkflow
66
+ });
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.0.0-beta.4",
14
+ "version": "2.0.0-beta.7",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -36,8 +36,8 @@
36
36
  "@types/node": "^14",
37
37
  "typescript": "^4",
38
38
  "jest": "^27",
39
- "@scripts/build": "2.0.0-beta.4",
40
- "@scripts/jest-config": "2.0.0-beta.4"
39
+ "@scripts/build": "2.0.0-beta.7",
40
+ "@scripts/jest-config": "2.0.0-beta.7"
41
41
  },
42
42
  "sideEffects": false,
43
43
  "publishConfig": {