Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request #8279 from smelukov/support-entry-progress
ProgressPlugin: support progress by entry points
- Loading branch information
Showing
5 changed files
with
218 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* This file was automatically generated. | ||
* DO NOT MODIFY BY HAND. | ||
* Run `yarn special-lint-fix` to update | ||
*/ | ||
|
||
export type ProgressPluginArgument = ProgressPluginOptions | HandlerFunction; | ||
/** | ||
* Function that executes for every progress step | ||
*/ | ||
export type HandlerFunction = (( | ||
percentage: number, | ||
msg: string, | ||
...args: string[] | ||
) => void); | ||
|
||
export interface ProgressPluginOptions { | ||
/** | ||
* Show active modules count and one active module in progress message | ||
*/ | ||
activeModules?: boolean; | ||
/** | ||
* Show entries count in progress message | ||
*/ | ||
entries?: boolean; | ||
/** | ||
* Function that executes for every progress step | ||
*/ | ||
handler?: HandlerFunction; | ||
/** | ||
* Show modules count in progress message | ||
*/ | ||
modules?: boolean; | ||
/** | ||
* Minimum modules count to start with. Only for mode=modules. Default: 500 | ||
*/ | ||
modulesCount?: number; | ||
/** | ||
* Collect profile data for progress steps. Default: false | ||
*/ | ||
profile?: true | false | null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"definitions": { | ||
"HandlerFunction": { | ||
"description": "Function that executes for every progress step", | ||
"instanceof": "Function", | ||
"tsType": "((percentage: number, msg: string, ...args: string[]) => void)" | ||
}, | ||
"ProgressPluginOptions": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"activeModules": { | ||
"description": "Show active modules count and one active module in progress message", | ||
"type": "boolean" | ||
}, | ||
"entries": { | ||
"description": "Show entries count in progress message", | ||
"type": "boolean" | ||
}, | ||
"handler": { | ||
"description": "Function that executes for every progress step", | ||
"anyOf": [ | ||
{ | ||
"$ref": "#/definitions/HandlerFunction" | ||
} | ||
] | ||
}, | ||
"modules": { | ||
"description": "Show modules count in progress message", | ||
"type": "boolean" | ||
}, | ||
"modulesCount": { | ||
"description": "Minimum modules count to start with. Only for mode=modules. Default: 500", | ||
"type": "number" | ||
}, | ||
"profile": { | ||
"description": "Collect profile data for progress steps. Default: false", | ||
"enum": [true, false, null] | ||
} | ||
} | ||
} | ||
}, | ||
"title": "ProgressPluginArgument", | ||
"oneOf": [ | ||
{ | ||
"$ref": "#/definitions/ProgressPluginOptions" | ||
}, | ||
{ | ||
"$ref": "#/definitions/HandlerFunction" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters