@modern-js/plugin 2.58.1 → 2.58.3
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/dist/cjs/manager/async.js +1 -1
- package/dist/esm-node/manager/async.js +8 -2
- package/dist/esm-node/manager/sync.js +10 -4
- package/dist/types/farrow-pipeline/index.d.ts +2 -2
- package/dist/types/manager/async.d.ts +1 -1
- package/dist/types/manager/sync.d.ts +1 -1
- package/dist/types/manager/types.d.ts +3 -3
- package/dist/types/waterfall/async.d.ts +1 -1
- package/dist/types/workflow/async.d.ts +1 -1
- package/dist/types/workflow/interrupt.d.ts +1 -1
- package/package.json +4 -4
@@ -21,8 +21,8 @@ __export(async_exports, {
|
|
21
21
|
createAsyncManager: () => createAsyncManager
|
22
22
|
});
|
23
23
|
module.exports = __toCommonJS(async_exports);
|
24
|
-
var import_sync = require("./sync");
|
25
24
|
var import_shared = require("./shared");
|
25
|
+
var import_sync = require("./sync");
|
26
26
|
const ASYNC_PLUGIN_SYMBOL = "ASYNC_PLUGIN_SYMBOL";
|
27
27
|
const createAsyncManager = (hooks, api) => {
|
28
28
|
let index = 0;
|
@@ -1,5 +1,11 @@
|
|
1
|
-
import {
|
2
|
-
|
1
|
+
import {
|
2
|
+
checkPlugins,
|
3
|
+
hasOwnProperty,
|
4
|
+
includePlugin,
|
5
|
+
isObject,
|
6
|
+
sortPlugins
|
7
|
+
} from "./shared";
|
8
|
+
import { DEFAULT_OPTIONS, generateRunner } from "./sync";
|
3
9
|
const ASYNC_PLUGIN_SYMBOL = "ASYNC_PLUGIN_SYMBOL";
|
4
10
|
const createAsyncManager = (hooks, api) => {
|
5
11
|
let index = 0;
|
@@ -1,7 +1,13 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
1
|
+
import { createPipeline, isPipeline } from "../farrow-pipeline";
|
2
|
+
import { createAsyncWaterfall, createWaterfall, isAsyncWaterfall, isWaterfall } from "../waterfall";
|
3
|
+
import { createAsyncInterruptWorkflow, createAsyncWorkflow, createParallelWorkflow, createSyncParallelWorkflow, createWorkflow, isAsyncInterruptWorkflow, isAsyncWorkflow, isParallelWorkflow, isSyncParallelWorkflow, isWorkflow } from "../workflow";
|
4
|
+
import {
|
5
|
+
checkPlugins,
|
6
|
+
hasOwnProperty,
|
7
|
+
includePlugin,
|
8
|
+
isObject,
|
9
|
+
sortPlugins
|
10
|
+
} from "./shared";
|
5
11
|
const SYNC_PLUGIN_SYMBOL = "SYNC_PLUGIN_SYMBOL";
|
6
12
|
const DEFAULT_OPTIONS = {
|
7
13
|
name: "untitled",
|
@@ -2,8 +2,8 @@
|
|
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
|
-
import {
|
6
|
-
import { Next } from './counter';
|
5
|
+
import { type Context, createContext } from './context';
|
6
|
+
import { type Next } from './counter';
|
7
7
|
export type { Next };
|
8
8
|
export { createContext };
|
9
9
|
export type { Context };
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { CommonAPI, PluginOptions, ToRunners, ToThreads } from './types';
|
2
2
|
/** Setup function of async plugin. */
|
3
3
|
export type AsyncSetup<Hooks, API = Record<string, never>> = (api: API & CommonAPI<Hooks>) => Partial<ToThreads<Hooks>> | Promise<Partial<ToThreads<Hooks>> | void> | void;
|
4
4
|
declare const ASYNC_PLUGIN_SYMBOL = "ASYNC_PLUGIN_SYMBOL";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { Hook,
|
1
|
+
import type { CommonAPI, Hook, PluginOptions, ToRunners, ToThreads } from './types';
|
2
2
|
/** Setup function of sync plugin. */
|
3
3
|
export type Setup<Hooks, API = Record<string, never>> = (api: API) => Partial<ToThreads<Hooks>> | void;
|
4
4
|
declare const SYNC_PLUGIN_SYMBOL = "SYNC_PLUGIN_SYMBOL";
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import type {
|
2
|
-
import type {
|
3
|
-
import type {
|
1
|
+
import type { AsyncPipeline, MaybeAsync, Middleware, Pipeline } from '../farrow-pipeline';
|
2
|
+
import type { AsyncBrook, AsyncWaterfall, Brook, Waterfall } from '../waterfall';
|
3
|
+
import type { AsyncInterruptWorker, AsyncInterruptWorkflow, AsyncWorker, AsyncWorkflow, ParallelWorkflow, SyncParallelWorkflow, Worker, Workflow } from '../workflow';
|
4
4
|
/** All hook types. */
|
5
5
|
export type Hook = Waterfall<any> | AsyncWaterfall<any> | Workflow<any, any> | AsyncWorkflow<any, any> | ParallelWorkflow<any> | SyncParallelWorkflow<any> | Pipeline<any, any> | AsyncPipeline<any, any> | AsyncInterruptWorkflow<any, any>;
|
6
6
|
export type HooksMap = Record<string, Hook>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { MaybeAsync } from '../farrow-pipeline';
|
1
|
+
import { type MaybeAsync } from '../farrow-pipeline';
|
2
2
|
declare const ASYNC_WATERFALL_SYMBOL: unique symbol;
|
3
3
|
export type AsyncBrook<I = unknown> = (I: I) => MaybeAsync<I>;
|
4
4
|
export type AsyncBrookInput<I = unknown> = AsyncBrook<I> | {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { MaybeAsync } from '../farrow-pipeline';
|
1
|
+
import { type MaybeAsync } from '../farrow-pipeline';
|
2
2
|
declare const ASYNC_WORKFLOW_SYMBOL: unique symbol;
|
3
3
|
export type AsyncWorker<I, O> = (I: I) => MaybeAsync<O>;
|
4
4
|
export type AsyncWorkers<I, O> = AsyncWorker<I, O>[];
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { MaybeAsync } from '../farrow-pipeline';
|
1
|
+
import { type MaybeAsync } from '../farrow-pipeline';
|
2
2
|
declare const ASYNC_INTERRUPT_WORKFLOW_SYMBOL: unique symbol;
|
3
3
|
export type AsyncInterruptWorker<I, O> = (I: I, interrupt: (result: any) => void) => MaybeAsync<O>;
|
4
4
|
export type AsyncInterruptWorkers<I, O> = AsyncInterruptWorker<I, O>[];
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "2.58.
|
18
|
+
"version": "2.58.3",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"types": "./dist/types/index.d.ts",
|
21
21
|
"main": "./dist/cjs/index.js",
|
@@ -33,15 +33,15 @@
|
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
35
|
"@swc/helpers": "0.5.3",
|
36
|
-
"@modern-js/utils": "2.58.
|
36
|
+
"@modern-js/utils": "2.58.3"
|
37
37
|
},
|
38
38
|
"devDependencies": {
|
39
39
|
"@types/jest": "^29",
|
40
40
|
"@types/node": "^14",
|
41
41
|
"jest": "^29",
|
42
42
|
"typescript": "^5",
|
43
|
-
"@scripts/
|
44
|
-
"@scripts/
|
43
|
+
"@scripts/build": "2.58.3",
|
44
|
+
"@scripts/jest-config": "2.58.3"
|
45
45
|
},
|
46
46
|
"sideEffects": false,
|
47
47
|
"publishConfig": {
|