@modern-js/plugin 0.0.0-next-20221214100720 → 0.0.0-next-20221214140550
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 +4 -4
- package/dist/js/node/farrow-pipeline/context.js +7 -3
- package/dist/js/node/farrow-pipeline/counter.js +7 -3
- package/dist/js/node/farrow-pipeline/index.js +3 -3
- package/dist/js/node/farrow-pipeline/pipeline.js +24 -19
- package/dist/js/node/index.js +6 -6
- package/dist/js/node/manager/async.js +28 -26
- package/dist/js/node/manager/index.js +5 -5
- package/dist/js/node/manager/shared.js +11 -3
- package/dist/js/node/manager/sync.js +28 -22
- package/dist/js/node/manager/types.js +15 -0
- package/dist/js/node/utils/pluginDagSort.js +7 -3
- package/dist/js/node/waterfall/async.js +31 -27
- package/dist/js/node/waterfall/index.js +4 -4
- package/dist/js/node/waterfall/sync.js +26 -22
- package/dist/js/node/workflow/async.js +29 -26
- package/dist/js/node/workflow/index.js +5 -5
- package/dist/js/node/workflow/parallel.js +29 -26
- package/dist/js/node/workflow/sync.js +25 -22
- package/dist/types/farrow-pipeline/context.d.ts +1 -1
- package/dist/types/farrow-pipeline/counter.d.ts +3 -3
- package/dist/types/farrow-pipeline/pipeline.d.ts +7 -7
- package/dist/types/manager/async.d.ts +3 -3
- package/dist/types/manager/sync.d.ts +3 -3
- package/dist/types/manager/types.d.ts +8 -8
- package/dist/types/waterfall/async.d.ts +6 -6
- package/dist/types/waterfall/sync.d.ts +6 -6
- package/dist/types/workflow/async.d.ts +3 -3
- package/dist/types/workflow/parallel.d.ts +1 -1
- package/dist/types/workflow/sync.d.ts +3 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
# @modern-js/plugin
|
2
2
|
|
3
|
-
## 0.0.0-next-
|
3
|
+
## 0.0.0-next-20221214140550
|
4
4
|
|
5
5
|
### Major Changes
|
6
6
|
|
7
|
-
-
|
7
|
+
- dda38c9c3: chore: v2
|
8
8
|
|
9
9
|
### Patch Changes
|
10
10
|
|
11
|
-
-
|
11
|
+
- b8bbe036c: feat: change type logic
|
12
12
|
feat: 修改类型相关的逻辑
|
13
|
-
-
|
13
|
+
- f17974937: fix: the sortPlugins api not work
|
14
14
|
|
15
15
|
fix: sortPlugins 没有真实生效
|
16
16
|
|
@@ -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
|
19
|
-
__export(
|
18
|
+
var context_exports = {};
|
19
|
+
__export(context_exports, {
|
20
20
|
createContext: () => createContext
|
21
21
|
});
|
22
|
-
module.exports = __toCommonJS(
|
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
|
19
|
-
__export(
|
18
|
+
var counter_exports = {};
|
19
|
+
__export(counter_exports, {
|
20
20
|
createCounter: () => createCounter
|
21
21
|
});
|
22
|
-
module.exports = __toCommonJS(
|
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
|
16
|
-
module.exports = __toCommonJS(
|
17
|
-
__reExport(
|
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
|
19
|
-
__export(
|
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(
|
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
|
+
});
|
package/dist/js/node/index.js
CHANGED
@@ -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
|
16
|
-
module.exports = __toCommonJS(
|
17
|
-
__reExport(
|
18
|
-
__reExport(
|
19
|
-
__reExport(
|
20
|
-
__reExport(
|
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
|
16
|
-
module.exports = __toCommonJS(
|
17
|
-
__reExport(
|
18
|
-
__reExport(
|
19
|
-
__reExport(
|
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
|
19
|
-
__export(
|
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(
|
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
|
19
|
-
__export(
|
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(
|
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
|
19
|
-
__export(
|
18
|
+
var pluginDagSort_exports = {};
|
19
|
+
__export(pluginDagSort_exports, {
|
20
20
|
dagSort: () => dagSort
|
21
21
|
});
|
22
|
-
module.exports = __toCommonJS(
|
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
|
16
|
-
module.exports = __toCommonJS(
|
17
|
-
__reExport(
|
18
|
-
__reExport(
|
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
|
19
|
-
__export(
|
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(
|
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
|
16
|
-
module.exports = __toCommonJS(
|
17
|
-
__reExport(
|
18
|
-
__reExport(
|
19
|
-
__reExport(
|
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
|
19
|
-
__export(
|
35
|
+
var sync_exports = {};
|
36
|
+
__export(sync_exports, {
|
20
37
|
createWorkflow: () => createWorkflow,
|
21
38
|
isWorkflow: () => isWorkflow
|
22
39
|
});
|
23
|
-
module.exports = __toCommonJS(
|
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
|
+
});
|
@@ -2,7 +2,7 @@
|
|
2
2
|
* modified from https://github.com/farrow-js/farrow/tree/master/packages/farrow-pipeline
|
3
3
|
* license at https://github.com/farrow-js/farrow/blob/master/LICENSE
|
4
4
|
*/
|
5
|
-
export
|
5
|
+
export type Context<T = any> = {
|
6
6
|
create: (value: T) => Context<T>;
|
7
7
|
use: () => {
|
8
8
|
value: T;
|
@@ -2,9 +2,9 @@
|
|
2
2
|
* modified from https://github.com/farrow-js/farrow/tree/master/packages/farrow-pipeline
|
3
3
|
* license at https://github.com/farrow-js/farrow/blob/master/LICENSE
|
4
4
|
*/
|
5
|
-
export
|
6
|
-
export
|
7
|
-
export
|
5
|
+
export type Next<I = unknown, O = unknown> = (input?: I) => O;
|
6
|
+
export type CounterCallback<I = unknown, O = unknown> = (index: number, input: I, next: Next<I, O>) => O;
|
7
|
+
export type Counter<I = unknown, O = unknown> = {
|
8
8
|
start: (input: I) => O;
|
9
9
|
dispatch: (index: number, input: I) => O;
|
10
10
|
};
|
@@ -7,23 +7,23 @@ import { Next } from './counter';
|
|
7
7
|
export type { Next };
|
8
8
|
export { createContext };
|
9
9
|
export type { Context };
|
10
|
-
export
|
11
|
-
export
|
10
|
+
export type Middleware<I = unknown, O = unknown> = (input: I, next: Next<I, O>) => O;
|
11
|
+
export type Middlewares<I = unknown, O = unknown> = Middleware<I, O>[];
|
12
12
|
export declare const isPipeline: (input: any) => input is Pipeline<unknown, unknown>;
|
13
13
|
declare const PipelineSymbol: unique symbol;
|
14
|
-
export
|
14
|
+
export type RunPipelineOptions<I = unknown, O = unknown> = {
|
15
15
|
onLast?: (input: I) => O;
|
16
16
|
};
|
17
|
-
export
|
17
|
+
export type MiddlewareInput<I = unknown, O = unknown> = Middleware<I, O> | {
|
18
18
|
middleware: Middleware<I, O>;
|
19
19
|
};
|
20
|
-
export
|
20
|
+
export type Pipeline<I = unknown, O = unknown> = {
|
21
21
|
[PipelineSymbol]: true;
|
22
22
|
use: (...inputs: MiddlewareInput<I, O>[]) => Pipeline<I, O>;
|
23
23
|
run: (input: I, options?: RunPipelineOptions<I, O>) => O;
|
24
24
|
middleware: Middleware<I, O>;
|
25
25
|
};
|
26
26
|
export declare const createPipeline: <I, O>() => Pipeline<I, O>;
|
27
|
-
export
|
28
|
-
export
|
27
|
+
export type MaybeAsync<T> = T | Promise<T>;
|
28
|
+
export type AsyncPipeline<I = unknown, O = unknown> = Pipeline<I, MaybeAsync<O>>;
|
29
29
|
export declare const createAsyncPipeline: <I, O>() => AsyncPipeline<I, O>;
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import type { ToRunners, ToThreads, CommonAPI, PluginOptions } from './types';
|
2
2
|
/** Setup function of async plugin. */
|
3
3
|
|
4
|
-
export
|
4
|
+
export type AsyncSetup<Hooks, API = Record<string, never>> = (api: API & CommonAPI<Hooks>) => Partial<ToThreads<Hooks>> | Promise<Partial<ToThreads<Hooks>> | void> | void;
|
5
5
|
declare const ASYNC_PLUGIN_SYMBOL = "ASYNC_PLUGIN_SYMBOL";
|
6
|
-
export
|
6
|
+
export type AsyncPlugin<Hooks, API> = {
|
7
7
|
ASYNC_PLUGIN_SYMBOL: typeof ASYNC_PLUGIN_SYMBOL;
|
8
8
|
} & Required<PluginOptions<Hooks, AsyncSetup<Hooks, API>>>;
|
9
|
-
export
|
9
|
+
export type AsyncManager<Hooks, API> = {
|
10
10
|
/**
|
11
11
|
* Create a sync plugin.
|
12
12
|
* @param setup the setup function.
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import type { Hook, CommonAPI, ToRunners, ToThreads, PluginOptions } from './types';
|
2
2
|
/** Setup function of sync plugin. */
|
3
3
|
|
4
|
-
export
|
4
|
+
export type Setup<Hooks, API = Record<string, never>> = (api: API) => Partial<ToThreads<Hooks>> | void;
|
5
5
|
declare const SYNC_PLUGIN_SYMBOL = "SYNC_PLUGIN_SYMBOL";
|
6
|
-
export
|
6
|
+
export type Plugin<Hooks, API> = {
|
7
7
|
SYNC_PLUGIN_SYMBOL: typeof SYNC_PLUGIN_SYMBOL;
|
8
8
|
} & Required<PluginOptions<Hooks, Setup<Hooks, API>>>;
|
9
|
-
export
|
9
|
+
export type Manager<Hooks, API> = {
|
10
10
|
/**
|
11
11
|
* Create a sync plugin.
|
12
12
|
* @param setup the setup function.
|
@@ -3,23 +3,23 @@ import type { Brook, Waterfall, AsyncBrook, AsyncWaterfall } from '../waterfall'
|
|
3
3
|
import type { Worker, Workflow, AsyncWorker, AsyncWorkflow, ParallelWorkflow } from '../workflow';
|
4
4
|
/** All hook types. */
|
5
5
|
|
6
|
-
export
|
7
|
-
export
|
6
|
+
export type Hook = Waterfall<any> | AsyncWaterfall<any> | Workflow<any, any> | AsyncWorkflow<any, any> | ParallelWorkflow<any> | Pipeline<any, any> | AsyncPipeline<any, any>;
|
7
|
+
export type HooksMap = Record<string, Hook>;
|
8
8
|
/** Extract the type of callback function from a hook. */
|
9
9
|
|
10
|
-
export
|
10
|
+
export type ToThread<P extends Hook> = P extends Workflow<infer I, infer O> ? Worker<I, O> : P extends AsyncWorkflow<infer I, infer O> ? AsyncWorker<I, O> : P extends ParallelWorkflow<infer I, infer O> ? AsyncWorker<I, O> : P extends Waterfall<infer I> ? Brook<I> : P extends AsyncWaterfall<infer I> ? AsyncBrook<I> : P extends Pipeline<infer I, infer O> ? Middleware<I, O> : P extends AsyncPipeline<infer I, infer O> ? Middleware<I, MaybeAsync<O>> : never;
|
11
11
|
/** Extract types of callback function from hooks. */
|
12
12
|
|
13
|
-
export
|
13
|
+
export type ToThreads<PS> = { [K in keyof PS]: PS[K] extends Hook ? ToThread<PS[K]> : PS[K] extends void ? void : never };
|
14
14
|
/** Extract run method from a hook. */
|
15
15
|
|
16
|
-
export
|
16
|
+
export type RunnerFromHook<P extends Hook> = P extends Waterfall<infer I> ? Waterfall<I>['run'] : P extends AsyncWaterfall<infer I> ? AsyncWaterfall<I>['run'] : P extends Workflow<infer I, infer O> ? Workflow<I, O>['run'] : P extends AsyncWorkflow<infer I, infer O> ? AsyncWorkflow<I, O>['run'] : P extends ParallelWorkflow<infer I, infer O> ? ParallelWorkflow<I, O>['run'] : P extends Pipeline<infer I, infer O> ? Pipeline<I, O>['run'] : P extends AsyncPipeline<infer I, infer O> ? AsyncPipeline<I, O>['run'] : never;
|
17
17
|
/** Extract all run methods from hooks. */
|
18
18
|
|
19
|
-
export
|
19
|
+
export type ToRunners<PS> = { [K in keyof PS]: PS[K] extends Hook ? RunnerFromHook<PS[K]> : PS[K] extends void ? void : never };
|
20
20
|
/** All options to define a plugin. */
|
21
21
|
|
22
|
-
export
|
22
|
+
export type PluginOptions<Hooks, Setup = undefined, ExtendHooks = Record<string, unknown>> = {
|
23
23
|
name?: string;
|
24
24
|
pre?: string[];
|
25
25
|
post?: string[];
|
@@ -31,6 +31,6 @@ export declare type PluginOptions<Hooks, Setup = undefined, ExtendHooks = Record
|
|
31
31
|
};
|
32
32
|
/** Common api of setup function. */
|
33
33
|
|
34
|
-
export
|
34
|
+
export type CommonAPI<Hooks> = {
|
35
35
|
useHookRunners: () => ToRunners<Hooks>;
|
36
36
|
};
|
@@ -1,16 +1,16 @@
|
|
1
1
|
import { MaybeAsync } from '../farrow-pipeline';
|
2
2
|
declare const ASYNC_WATERFALL_SYMBOL: unique symbol;
|
3
|
-
export
|
4
|
-
export
|
3
|
+
export type AsyncBrook<I = unknown> = (I: I) => MaybeAsync<I>;
|
4
|
+
export type AsyncBrookInput<I = unknown> = AsyncBrook<I> | {
|
5
5
|
middleware: AsyncBrook<I>;
|
6
6
|
};
|
7
|
-
export
|
8
|
-
export
|
7
|
+
export type AsyncBrooks<I = unknown> = AsyncBrook<I>[];
|
8
|
+
export type AsyncBrookInputs<I = unknown> = AsyncBrookInput<I>[];
|
9
9
|
export declare const getAsyncBrook: <I>(input: AsyncBrookInput<I>) => AsyncBrook<I>;
|
10
|
-
export
|
10
|
+
export type RunAsyncWaterfallOptions<I = unknown> = {
|
11
11
|
onLast?: AsyncBrook<I>;
|
12
12
|
};
|
13
|
-
export
|
13
|
+
export type AsyncWaterfall<I> = {
|
14
14
|
run: (input: I, options?: RunAsyncWaterfallOptions<I>) => MaybeAsync<I>;
|
15
15
|
use: (...I: AsyncBrookInputs<I>) => AsyncWaterfall<I>;
|
16
16
|
middleware: AsyncBrook<I>;
|
@@ -1,15 +1,15 @@
|
|
1
1
|
declare const WATERFALL_SYMBOL: unique symbol;
|
2
|
-
export
|
3
|
-
export
|
2
|
+
export type Brook<I = unknown> = (I: I) => I;
|
3
|
+
export type BrookInput<I = unknown> = Brook<I> | {
|
4
4
|
middleware: Brook<I>;
|
5
5
|
};
|
6
|
-
export
|
7
|
-
export
|
6
|
+
export type Brooks<I = unknown> = Brook<I>[];
|
7
|
+
export type BrookInputs<I = unknown> = BrookInput<I>[];
|
8
8
|
export declare const getBrook: <I>(input: BrookInput<I>) => Brook<I>;
|
9
|
-
export
|
9
|
+
export type RunWaterfallOptions<I = unknown> = {
|
10
10
|
onLast?: Brook<I>;
|
11
11
|
};
|
12
|
-
export
|
12
|
+
export type Waterfall<I = void> = {
|
13
13
|
run: (input: I, options?: RunWaterfallOptions<I>) => I;
|
14
14
|
use: (...I: BrookInputs<I>) => Waterfall<I>;
|
15
15
|
middleware: Brook<I>;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { MaybeAsync } from '../farrow-pipeline';
|
2
2
|
declare const ASYNC_WORKFLOW_SYMBOL: unique symbol;
|
3
|
-
export
|
4
|
-
export
|
5
|
-
export
|
3
|
+
export type AsyncWorker<I, O> = (I: I) => MaybeAsync<O>;
|
4
|
+
export type AsyncWorkers<I, O> = AsyncWorker<I, O>[];
|
5
|
+
export type AsyncWorkflow<I, O> = {
|
6
6
|
run: (input: I) => MaybeAsync<O[]>;
|
7
7
|
use: (...I: AsyncWorkers<I, O>) => AsyncWorkflow<I, O>;
|
8
8
|
[ASYNC_WORKFLOW_SYMBOL]: true;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { AsyncWorkers } from './async';
|
2
2
|
declare const PARALLEL_WORKFLOW_SYMBOL: unique symbol;
|
3
|
-
export
|
3
|
+
export type ParallelWorkflow<I, O = any> = {
|
4
4
|
run: (input: I) => Promise<O[]>;
|
5
5
|
use: (...I: AsyncWorkers<I, O>) => ParallelWorkflow<I, O>;
|
6
6
|
[PARALLEL_WORKFLOW_SYMBOL]: true;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
declare const WORKFLOW_SYMBOL: unique symbol;
|
2
|
-
export
|
3
|
-
export
|
4
|
-
export
|
2
|
+
export type Worker<I, O> = (I: I) => O;
|
3
|
+
export type Workers<I, O> = Worker<I, O>[];
|
4
|
+
export type Workflow<I, O> = {
|
5
5
|
run: (input: I) => O[];
|
6
6
|
use: (...I: Workers<I, O>) => Workflow<I, O>;
|
7
7
|
[WORKFLOW_SYMBOL]: true;
|
package/package.json
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
"modern",
|
12
12
|
"modern.js"
|
13
13
|
],
|
14
|
-
"version": "0.0.0-next-
|
14
|
+
"version": "0.0.0-next-20221214140550",
|
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": "0.0.0-next-
|
40
|
-
"@scripts/jest-config": "0.0.0-next-
|
39
|
+
"@scripts/build": "0.0.0-next-20221214140550",
|
40
|
+
"@scripts/jest-config": "0.0.0-next-20221214140550"
|
41
41
|
},
|
42
42
|
"sideEffects": false,
|
43
43
|
"publishConfig": {
|