Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 3.140.201.179
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
wb /
node_modules /
webpack /
lib /
Delete
Unzip
Name
Size
Permission
Date
Action
asset
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
async-modules
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
cache
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
config
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
container
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
css
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
debug
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
dependencies
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
electron
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
errors
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
esm
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
hmr
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
ids
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
javascript
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
json
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
library
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
logging
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
node
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
optimize
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
performance
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
prefetch
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
rules
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
runtime
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
schemes
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
serialization
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
sharing
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
stats
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
util
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
wasm
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
wasm-async
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
wasm-sync
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
web
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
webworker
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
APIPlugin.js
6.72
KB
-rw-rw-r--
2022-08-30 11:49
AbstractMethodError.js
1.11
KB
-rw-rw-r--
2022-08-30 11:49
AsyncDependenciesBlock.js
2.86
KB
-rw-rw-r--
2022-08-30 11:49
AsyncDependencyToInitialChunkError.js
913
B
-rw-rw-r--
2022-08-30 11:49
AutomaticPrefetchPlugin.js
1.46
KB
-rw-rw-r--
2022-08-30 11:49
BannerPlugin.js
2.93
KB
-rw-rw-r--
2022-08-30 11:49
Cache.js
3.88
KB
-rw-rw-r--
2022-08-30 11:49
CacheFacade.js
8.38
KB
-rw-rw-r--
2022-08-30 11:49
CaseSensitiveModulesWarning.js
2.06
KB
-rw-rw-r--
2022-08-30 11:49
Chunk.js
21.1
KB
-rw-rw-r--
2022-08-30 11:49
ChunkGraph.js
49.33
KB
-rw-rw-r--
2022-08-30 11:49
ChunkGroup.js
14.77
KB
-rw-rw-r--
2022-08-30 11:49
ChunkRenderError.js
657
B
-rw-rw-r--
2022-08-30 11:49
ChunkTemplate.js
3.9
KB
-rw-rw-r--
2022-08-30 11:49
CleanPlugin.js
11.24
KB
-rw-rw-r--
2022-08-30 11:49
CodeGenerationError.js
619
B
-rw-rw-r--
2022-08-30 11:49
CodeGenerationResults.js
4.36
KB
-rw-rw-r--
2022-08-30 11:49
CommentCompilationWarning.js
729
B
-rw-rw-r--
2022-08-30 11:49
CompatibilityPlugin.js
4.54
KB
-rw-rw-r--
2022-08-30 11:49
Compilation.js
157.69
KB
-rw-rw-r--
2022-08-30 11:49
Compiler.js
35.03
KB
-rw-rw-r--
2022-08-30 11:49
ConcatenationScope.js
4.53
KB
-rw-rw-r--
2022-08-30 11:49
ConcurrentCompilationError.js
441
B
-rw-rw-r--
2022-08-30 11:49
ConditionalInitFragment.js
3.36
KB
-rw-rw-r--
2022-08-30 11:49
ConstPlugin.js
14.42
KB
-rw-rw-r--
2022-08-30 11:49
ContextExclusionPlugin.js
797
B
-rw-rw-r--
2022-08-30 11:49
ContextModule.js
33.63
KB
-rw-rw-r--
2022-08-30 11:49
ContextModuleFactory.js
12.3
KB
-rw-rw-r--
2022-08-30 11:49
ContextReplacementPlugin.js
4.61
KB
-rw-rw-r--
2022-08-30 11:49
DefinePlugin.js
16.28
KB
-rw-rw-r--
2022-08-30 11:49
DelegatedModule.js
7.08
KB
-rw-rw-r--
2022-08-30 11:49
DelegatedModuleFactoryPlugin.js
2.28
KB
-rw-rw-r--
2022-08-30 11:49
DelegatedPlugin.js
1015
B
-rw-rw-r--
2022-08-30 11:49
DependenciesBlock.js
2.53
KB
-rw-rw-r--
2022-08-30 11:49
Dependency.js
9.36
KB
-rw-rw-r--
2022-08-30 11:49
DependencyTemplate.js
2.43
KB
-rw-rw-r--
2022-08-30 11:49
DependencyTemplates.js
1.69
KB
-rw-rw-r--
2022-08-30 11:49
DllEntryPlugin.js
1.25
KB
-rw-rw-r--
2022-08-30 11:49
DllModule.js
4.4
KB
-rw-rw-r--
2022-08-30 11:49
DllModuleFactory.js
1008
B
-rw-rw-r--
2022-08-30 11:49
DllPlugin.js
1.66
KB
-rw-rw-r--
2022-08-30 11:49
DllReferencePlugin.js
5.01
KB
-rw-rw-r--
2022-08-30 11:49
DynamicEntryPlugin.js
1.99
KB
-rw-rw-r--
2022-08-30 11:49
EntryOptionPlugin.js
2.77
KB
-rw-rw-r--
2022-08-30 11:49
EntryPlugin.js
1.7
KB
-rw-rw-r--
2022-08-30 11:49
Entrypoint.js
2.95
KB
-rw-rw-r--
2022-08-30 11:49
EnvironmentPlugin.js
1.7
KB
-rw-rw-r--
2022-08-30 11:49
ErrorHelpers.js
1.42
KB
-rw-rw-r--
2022-08-30 11:49
EvalDevToolModulePlugin.js
3.67
KB
-rw-rw-r--
2022-08-30 11:49
EvalSourceMapDevToolPlugin.js
6.67
KB
-rw-rw-r--
2022-08-30 11:49
ExportsInfo.js
42.96
KB
-rw-rw-r--
2022-08-30 11:49
ExportsInfoApiPlugin.js
2.02
KB
-rw-rw-r--
2022-08-30 11:49
ExternalModule.js
21.94
KB
-rw-rw-r--
2022-08-30 11:49
ExternalModuleFactoryPlugin.js
7.06
KB
-rw-rw-r--
2022-08-30 11:49
ExternalsPlugin.js
899
B
-rw-rw-r--
2022-08-30 11:49
FileSystemInfo.js
102.03
KB
-rw-rw-r--
2022-08-30 11:49
FlagAllModulesAsUsedPlugin.js
1.42
KB
-rw-rw-r--
2022-08-30 11:49
FlagDependencyExportsPlugin.js
12.91
KB
-rw-rw-r--
2022-08-30 11:49
FlagDependencyUsagePlugin.js
10.74
KB
-rw-rw-r--
2022-08-30 11:49
FlagEntryExportAsUsedPlugin.js
1.34
KB
-rw-rw-r--
2022-08-30 11:49
Generator.js
4.73
KB
-rw-rw-r--
2022-08-30 11:49
GraphHelpers.js
1.05
KB
-rw-rw-r--
2022-08-30 11:49
HarmonyLinkingError.js
357
B
-rw-rw-r--
2022-08-30 11:49
HookWebpackError.js
2.03
KB
-rw-rw-r--
2022-08-30 11:49
HotModuleReplacementPlugin.js
25.72
KB
-rw-rw-r--
2022-08-30 11:49
HotUpdateChunk.js
353
B
-rw-rw-r--
2022-08-30 11:49
IgnoreErrorModuleFactory.js
1.02
KB
-rw-rw-r--
2022-08-30 11:49
IgnorePlugin.js
2.2
KB
-rw-rw-r--
2022-08-30 11:49
IgnoreWarningsPlugin.js
964
B
-rw-rw-r--
2022-08-30 11:49
InitFragment.js
4.54
KB
-rw-rw-r--
2022-08-30 11:49
InvalidDependenciesModuleWarning.js
1.83
KB
-rw-rw-r--
2022-08-30 11:49
JavascriptMetaInfoPlugin.js
2.03
KB
-rw-rw-r--
2022-08-30 11:49
LibManifestPlugin.js
3.04
KB
-rw-rw-r--
2022-08-30 11:49
LibraryTemplatePlugin.js
1.55
KB
-rw-rw-r--
2022-08-30 11:49
LoaderOptionsPlugin.js
1.81
KB
-rw-rw-r--
2022-08-30 11:49
LoaderTargetPlugin.js
747
B
-rw-rw-r--
2022-08-30 11:49
MainTemplate.js
10.15
KB
-rw-rw-r--
2022-08-30 11:49
Module.js
29.96
KB
-rw-rw-r--
2022-08-30 11:49
ModuleBuildError.js
1.59
KB
-rw-rw-r--
2022-08-30 11:49
ModuleDependencyError.js
1.08
KB
-rw-rw-r--
2022-08-30 11:49
ModuleDependencyWarning.js
1.19
KB
-rw-rw-r--
2022-08-30 11:49
ModuleError.js
1.17
KB
-rw-rw-r--
2022-08-30 11:49
ModuleFactory.js
1.39
KB
-rw-rw-r--
2022-08-30 11:49
ModuleFilenameHelpers.js
7.98
KB
-rw-rw-r--
2022-08-30 11:49
ModuleGraph.js
23.99
KB
-rw-rw-r--
2022-08-30 11:49
ModuleGraphConnection.js
5.09
KB
-rw-rw-r--
2022-08-30 11:49
ModuleHashingError.js
615
B
-rw-rw-r--
2022-08-30 11:49
ModuleInfoHeaderPlugin.js
7.01
KB
-rw-rw-r--
2022-08-30 11:49
ModuleNotFoundError.js
2.55
KB
-rw-rw-r--
2022-08-30 11:49
ModuleParseError.js
3.25
KB
-rw-rw-r--
2022-08-30 11:49
ModuleProfile.js
2.38
KB
-rw-rw-r--
2022-08-30 11:49
ModuleRestoreError.js
957
B
-rw-rw-r--
2022-08-30 11:49
ModuleStoreError.js
951
B
-rw-rw-r--
2022-08-30 11:49
ModuleTemplate.js
3.91
KB
-rw-rw-r--
2022-08-30 11:49
ModuleWarning.js
1.25
KB
-rw-rw-r--
2022-08-30 11:49
MultiCompiler.js
15.67
KB
-rw-rw-r--
2022-08-30 11:49
MultiStats.js
4.12
KB
-rw-rw-r--
2022-08-30 11:49
MultiWatching.js
1.44
KB
-rw-rw-r--
2022-08-30 11:49
NoEmitOnErrorsPlugin.js
713
B
-rw-rw-r--
2022-08-30 11:49
NoModeWarning.js
663
B
-rw-rw-r--
2022-08-30 11:49
NodeStuffInWebError.js
843
B
-rw-rw-r--
2022-08-30 11:49
NodeStuffPlugin.js
5.27
KB
-rw-rw-r--
2022-08-30 11:49
NormalModule.js
41.09
KB
-rw-rw-r--
2022-08-30 11:49
NormalModuleFactory.js
31.6
KB
-rw-rw-r--
2022-08-30 11:49
NormalModuleReplacementPlugin.js
1.84
KB
-rw-rw-r--
2022-08-30 11:49
NullFactory.js
628
B
-rw-rw-r--
2022-08-30 11:49
OptimizationStages.js
204
B
-rw-rw-r--
2022-08-30 11:49
OptionsApply.js
201
B
-rw-rw-r--
2022-08-30 11:49
Parser.js
968
B
-rw-rw-r--
2022-08-30 11:49
PrefetchPlugin.js
1.02
KB
-rw-rw-r--
2022-08-30 11:49
ProgressPlugin.js
16.78
KB
-rw-rw-r--
2022-08-30 11:49
ProvidePlugin.js
2.82
KB
-rw-rw-r--
2022-08-30 11:49
RawModule.js
4.53
KB
-rw-rw-r--
2022-08-30 11:49
RecordIdsPlugin.js
6.66
KB
-rw-rw-r--
2022-08-30 11:49
RequestShortener.js
755
B
-rw-rw-r--
2022-08-30 11:49
RequireJsStuffPlugin.js
1.86
KB
-rw-rw-r--
2022-08-30 11:49
ResolverFactory.js
4.83
KB
-rw-rw-r--
2022-08-30 11:49
RuntimeGlobals.js
9.01
KB
-rw-rw-r--
2022-08-30 11:49
RuntimeModule.js
5.63
KB
-rw-rw-r--
2022-08-30 11:49
RuntimePlugin.js
14.68
KB
-rw-rw-r--
2022-08-30 11:49
RuntimeTemplate.js
31.11
KB
-rw-rw-r--
2022-08-30 11:49
SelfModuleFactory.js
384
B
-rw-rw-r--
2022-08-30 11:49
SingleEntryPlugin.js
161
B
-rw-rw-r--
2022-08-30 11:49
SizeFormatHelpers.js
583
B
-rw-rw-r--
2022-08-30 11:49
SourceMapDevToolModuleOptionsPlugin.js
1.29
KB
-rw-rw-r--
2022-08-30 11:49
SourceMapDevToolPlugin.js
16.61
KB
-rw-rw-r--
2022-08-30 11:49
Stats.js
1.96
KB
-rw-rw-r--
2022-08-30 11:49
Template.js
12.52
KB
-rw-rw-r--
2022-08-30 11:49
TemplatedPathPlugin.js
8.58
KB
-rw-rw-r--
2022-08-30 11:49
UnhandledSchemeError.js
833
B
-rw-rw-r--
2022-08-30 11:49
UnsupportedFeatureWarning.js
780
B
-rw-rw-r--
2022-08-30 11:49
UseStrictPlugin.js
1.61
KB
-rw-rw-r--
2022-08-30 11:49
WarnCaseSensitiveModulesPlugin.js
1.38
KB
-rw-rw-r--
2022-08-30 11:49
WarnDeprecatedOptionPlugin.js
1.25
KB
-rw-rw-r--
2022-08-30 11:49
WarnNoModeSetPlugin.js
545
B
-rw-rw-r--
2022-08-30 11:49
WatchIgnorePlugin.js
3.27
KB
-rw-rw-r--
2022-08-30 11:49
Watching.js
12.62
KB
-rw-rw-r--
2022-08-30 11:49
WebpackError.js
1.34
KB
-rw-rw-r--
2022-08-30 11:49
WebpackIsIncludedPlugin.js
2.36
KB
-rw-rw-r--
2022-08-30 11:49
WebpackOptionsApply.js
25.69
KB
-rw-rw-r--
2022-08-30 11:49
WebpackOptionsDefaulter.js
470
B
-rw-rw-r--
2022-08-30 11:49
buildChunkGraph.js
44.55
KB
-rw-rw-r--
2022-08-30 11:49
cli.js
16.2
KB
-rw-rw-r--
2022-08-30 11:49
formatLocation.js
1.74
KB
-rw-rw-r--
2022-08-30 11:49
index.js
16.21
KB
-rw-rw-r--
2022-08-30 11:49
validateSchema.js
6.25
KB
-rw-rw-r--
2022-08-30 11:49
webpack.js
5.27
KB
-rw-rw-r--
2022-08-30 11:49
Save
Rename
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const Compiler = require("./Compiler"); const MultiCompiler = require("./MultiCompiler"); const NormalModule = require("./NormalModule"); const createSchemaValidation = require("./util/create-schema-validation"); const { contextify } = require("./util/identifier"); /** @typedef {import("../declarations/plugins/ProgressPlugin").HandlerFunction} HandlerFunction */ /** @typedef {import("../declarations/plugins/ProgressPlugin").ProgressPluginArgument} ProgressPluginArgument */ /** @typedef {import("../declarations/plugins/ProgressPlugin").ProgressPluginOptions} ProgressPluginOptions */ const validate = createSchemaValidation( require("../schemas/plugins/ProgressPlugin.check.js"), () => require("../schemas/plugins/ProgressPlugin.json"), { name: "Progress Plugin", baseDataPath: "options" } ); const median3 = (a, b, c) => { return a + b + c - Math.max(a, b, c) - Math.min(a, b, c); }; const createDefaultHandler = (profile, logger) => { /** @type {{ value: string, time: number }[]} */ const lastStateInfo = []; const defaultHandler = (percentage, msg, ...args) => { if (profile) { if (percentage === 0) { lastStateInfo.length = 0; } const fullState = [msg, ...args]; const state = fullState.map(s => s.replace(/\d+\/\d+ /g, "")); const now = Date.now(); const len = Math.max(state.length, lastStateInfo.length); for (let i = len; i >= 0; i--) { const stateItem = i < state.length ? state[i] : undefined; const lastStateItem = i < lastStateInfo.length ? lastStateInfo[i] : undefined; if (lastStateItem) { if (stateItem !== lastStateItem.value) { const diff = now - lastStateItem.time; if (lastStateItem.value) { let reportState = lastStateItem.value; if (i > 0) { reportState = lastStateInfo[i - 1].value + " > " + reportState; } const stateMsg = `${" | ".repeat(i)}${diff} ms ${reportState}`; const d = diff; // This depends on timing so we ignore it for coverage /* istanbul ignore next */ { if (d > 10000) { logger.error(stateMsg); } else if (d > 1000) { logger.warn(stateMsg); } else if (d > 10) { logger.info(stateMsg); } else if (d > 5) { logger.log(stateMsg); } else { logger.debug(stateMsg); } } } if (stateItem === undefined) { lastStateInfo.length = i; } else { lastStateItem.value = stateItem; lastStateItem.time = now; lastStateInfo.length = i + 1; } } } else { lastStateInfo[i] = { value: stateItem, time: now }; } } } logger.status(`${Math.floor(percentage * 100)}%`, msg, ...args); if (percentage === 1 || (!msg && args.length === 0)) logger.status(); }; return defaultHandler; }; /** * @callback ReportProgress * @param {number} p * @param {...string} [args] * @returns {void} */ /** @type {WeakMap<Compiler,ReportProgress>} */ const progressReporters = new WeakMap(); class ProgressPlugin { /** * @param {Compiler} compiler the current compiler * @returns {ReportProgress} a progress reporter, if any */ static getReporter(compiler) { return progressReporters.get(compiler); } /** * @param {ProgressPluginArgument} options options */ constructor(options = {}) { if (typeof options === "function") { options = { handler: options }; } validate(options); options = { ...ProgressPlugin.defaultOptions, ...options }; this.profile = options.profile; this.handler = options.handler; this.modulesCount = options.modulesCount; this.dependenciesCount = options.dependenciesCount; this.showEntries = options.entries; this.showModules = options.modules; this.showDependencies = options.dependencies; this.showActiveModules = options.activeModules; this.percentBy = options.percentBy; } /** * @param {Compiler | MultiCompiler} compiler webpack compiler * @returns {void} */ apply(compiler) { const handler = this.handler || createDefaultHandler( this.profile, compiler.getInfrastructureLogger("webpack.Progress") ); if (compiler instanceof MultiCompiler) { this._applyOnMultiCompiler(compiler, handler); } else if (compiler instanceof Compiler) { this._applyOnCompiler(compiler, handler); } } /** * @param {MultiCompiler} compiler webpack multi-compiler * @param {HandlerFunction} handler function that executes for every progress step * @returns {void} */ _applyOnMultiCompiler(compiler, handler) { const states = compiler.compilers.map( () => /** @type {[number, ...string[]]} */ ([0]) ); compiler.compilers.forEach((compiler, idx) => { new ProgressPlugin((p, msg, ...args) => { states[idx] = [p, msg, ...args]; let sum = 0; for (const [p] of states) sum += p; handler(sum / states.length, `[${idx}] ${msg}`, ...args); }).apply(compiler); }); } /** * @param {Compiler} compiler webpack compiler * @param {HandlerFunction} handler function that executes for every progress step * @returns {void} */ _applyOnCompiler(compiler, handler) { const showEntries = this.showEntries; const showModules = this.showModules; const showDependencies = this.showDependencies; const showActiveModules = this.showActiveModules; let lastActiveModule = ""; let currentLoader = ""; let lastModulesCount = 0; let lastDependenciesCount = 0; let lastEntriesCount = 0; let modulesCount = 0; let dependenciesCount = 0; let entriesCount = 1; let doneModules = 0; let doneDependencies = 0; let doneEntries = 0; const activeModules = new Set(); let lastUpdate = 0; const updateThrottled = () => { if (lastUpdate + 500 < Date.now()) update(); }; const update = () => { /** @type {string[]} */ const items = []; const percentByModules = doneModules / Math.max(lastModulesCount || this.modulesCount || 1, modulesCount); const percentByEntries = doneEntries / Math.max(lastEntriesCount || this.dependenciesCount || 1, entriesCount); const percentByDependencies = doneDependencies / Math.max(lastDependenciesCount || 1, dependenciesCount); let percentageFactor; switch (this.percentBy) { case "entries": percentageFactor = percentByEntries; break; case "dependencies": percentageFactor = percentByDependencies; break; case "modules": percentageFactor = percentByModules; break; default: percentageFactor = median3( percentByModules, percentByEntries, percentByDependencies ); } const percentage = 0.1 + percentageFactor * 0.55; if (currentLoader) { items.push( `import loader ${contextify( compiler.context, currentLoader, compiler.root )}` ); } else { const statItems = []; if (showEntries) { statItems.push(`${doneEntries}/${entriesCount} entries`); } if (showDependencies) { statItems.push( `${doneDependencies}/${dependenciesCount} dependencies` ); } if (showModules) { statItems.push(`${doneModules}/${modulesCount} modules`); } if (showActiveModules) { statItems.push(`${activeModules.size} active`); } if (statItems.length > 0) { items.push(statItems.join(" ")); } if (showActiveModules) { items.push(lastActiveModule); } } handler(percentage, "building", ...items); lastUpdate = Date.now(); }; const factorizeAdd = () => { dependenciesCount++; if (dependenciesCount < 50 || dependenciesCount % 100 === 0) updateThrottled(); }; const factorizeDone = () => { doneDependencies++; if (doneDependencies < 50 || doneDependencies % 100 === 0) updateThrottled(); }; const moduleAdd = () => { modulesCount++; if (modulesCount < 50 || modulesCount % 100 === 0) updateThrottled(); }; // only used when showActiveModules is set const moduleBuild = module => { const ident = module.identifier(); if (ident) { activeModules.add(ident); lastActiveModule = ident; update(); } }; const entryAdd = (entry, options) => { entriesCount++; if (entriesCount < 5 || entriesCount % 10 === 0) updateThrottled(); }; const moduleDone = module => { doneModules++; if (showActiveModules) { const ident = module.identifier(); if (ident) { activeModules.delete(ident); if (lastActiveModule === ident) { lastActiveModule = ""; for (const m of activeModules) { lastActiveModule = m; } update(); return; } } } if (doneModules < 50 || doneModules % 100 === 0) updateThrottled(); }; const entryDone = (entry, options) => { doneEntries++; update(); }; const cache = compiler .getCache("ProgressPlugin") .getItemCache("counts", null); let cacheGetPromise; compiler.hooks.beforeCompile.tap("ProgressPlugin", () => { if (!cacheGetPromise) { cacheGetPromise = cache.getPromise().then( data => { if (data) { lastModulesCount = lastModulesCount || data.modulesCount; lastDependenciesCount = lastDependenciesCount || data.dependenciesCount; } return data; }, err => { // Ignore error } ); } }); compiler.hooks.afterCompile.tapPromise("ProgressPlugin", compilation => { if (compilation.compiler.isChild()) return Promise.resolve(); return cacheGetPromise.then(async oldData => { if ( !oldData || oldData.modulesCount !== modulesCount || oldData.dependenciesCount !== dependenciesCount ) { await cache.storePromise({ modulesCount, dependenciesCount }); } }); }); compiler.hooks.compilation.tap("ProgressPlugin", compilation => { if (compilation.compiler.isChild()) return; lastModulesCount = modulesCount; lastEntriesCount = entriesCount; lastDependenciesCount = dependenciesCount; modulesCount = dependenciesCount = entriesCount = 0; doneModules = doneDependencies = doneEntries = 0; compilation.factorizeQueue.hooks.added.tap( "ProgressPlugin", factorizeAdd ); compilation.factorizeQueue.hooks.result.tap( "ProgressPlugin", factorizeDone ); compilation.addModuleQueue.hooks.added.tap("ProgressPlugin", moduleAdd); compilation.processDependenciesQueue.hooks.result.tap( "ProgressPlugin", moduleDone ); if (showActiveModules) { compilation.hooks.buildModule.tap("ProgressPlugin", moduleBuild); } compilation.hooks.addEntry.tap("ProgressPlugin", entryAdd); compilation.hooks.failedEntry.tap("ProgressPlugin", entryDone); compilation.hooks.succeedEntry.tap("ProgressPlugin", entryDone); // avoid dynamic require if bundled with webpack // @ts-expect-error if (typeof __webpack_require__ !== "function") { const requiredLoaders = new Set(); NormalModule.getCompilationHooks(compilation).beforeLoaders.tap( "ProgressPlugin", loaders => { for (const loader of loaders) { if ( loader.type !== "module" && !requiredLoaders.has(loader.loader) ) { requiredLoaders.add(loader.loader); currentLoader = loader.loader; update(); require(loader.loader); } } if (currentLoader) { currentLoader = ""; update(); } } ); } const hooks = { finishModules: "finish module graph", seal: "plugins", optimizeDependencies: "dependencies optimization", afterOptimizeDependencies: "after dependencies optimization", beforeChunks: "chunk graph", afterChunks: "after chunk graph", optimize: "optimizing", optimizeModules: "module optimization", afterOptimizeModules: "after module optimization", optimizeChunks: "chunk optimization", afterOptimizeChunks: "after chunk optimization", optimizeTree: "module and chunk tree optimization", afterOptimizeTree: "after module and chunk tree optimization", optimizeChunkModules: "chunk modules optimization", afterOptimizeChunkModules: "after chunk modules optimization", reviveModules: "module reviving", beforeModuleIds: "before module ids", moduleIds: "module ids", optimizeModuleIds: "module id optimization", afterOptimizeModuleIds: "module id optimization", reviveChunks: "chunk reviving", beforeChunkIds: "before chunk ids", chunkIds: "chunk ids", optimizeChunkIds: "chunk id optimization", afterOptimizeChunkIds: "after chunk id optimization", recordModules: "record modules", recordChunks: "record chunks", beforeModuleHash: "module hashing", beforeCodeGeneration: "code generation", beforeRuntimeRequirements: "runtime requirements", beforeHash: "hashing", afterHash: "after hashing", recordHash: "record hash", beforeModuleAssets: "module assets processing", beforeChunkAssets: "chunk assets processing", processAssets: "asset processing", afterProcessAssets: "after asset optimization", record: "recording", afterSeal: "after seal" }; const numberOfHooks = Object.keys(hooks).length; Object.keys(hooks).forEach((name, idx) => { const title = hooks[name]; const percentage = (idx / numberOfHooks) * 0.25 + 0.7; compilation.hooks[name].intercept({ name: "ProgressPlugin", call() { handler(percentage, "sealing", title); }, done() { progressReporters.set(compiler, undefined); handler(percentage, "sealing", title); }, result() { handler(percentage, "sealing", title); }, error() { handler(percentage, "sealing", title); }, tap(tap) { // p is percentage from 0 to 1 // args is any number of messages in a hierarchical matter progressReporters.set(compilation.compiler, (p, ...args) => { handler(percentage, "sealing", title, tap.name, ...args); }); handler(percentage, "sealing", title, tap.name); } }); }); }); compiler.hooks.make.intercept({ name: "ProgressPlugin", call() { handler(0.1, "building"); }, done() { handler(0.65, "building"); } }); const interceptHook = (hook, progress, category, name) => { hook.intercept({ name: "ProgressPlugin", call() { handler(progress, category, name); }, done() { progressReporters.set(compiler, undefined); handler(progress, category, name); }, result() { handler(progress, category, name); }, error() { handler(progress, category, name); }, tap(tap) { progressReporters.set(compiler, (p, ...args) => { handler(progress, category, name, tap.name, ...args); }); handler(progress, category, name, tap.name); } }); }; compiler.cache.hooks.endIdle.intercept({ name: "ProgressPlugin", call() { handler(0, ""); } }); interceptHook(compiler.cache.hooks.endIdle, 0.01, "cache", "end idle"); compiler.hooks.beforeRun.intercept({ name: "ProgressPlugin", call() { handler(0, ""); } }); interceptHook(compiler.hooks.beforeRun, 0.01, "setup", "before run"); interceptHook(compiler.hooks.run, 0.02, "setup", "run"); interceptHook(compiler.hooks.watchRun, 0.03, "setup", "watch run"); interceptHook( compiler.hooks.normalModuleFactory, 0.04, "setup", "normal module factory" ); interceptHook( compiler.hooks.contextModuleFactory, 0.05, "setup", "context module factory" ); interceptHook( compiler.hooks.beforeCompile, 0.06, "setup", "before compile" ); interceptHook(compiler.hooks.compile, 0.07, "setup", "compile"); interceptHook(compiler.hooks.thisCompilation, 0.08, "setup", "compilation"); interceptHook(compiler.hooks.compilation, 0.09, "setup", "compilation"); interceptHook(compiler.hooks.finishMake, 0.69, "building", "finish"); interceptHook(compiler.hooks.emit, 0.95, "emitting", "emit"); interceptHook(compiler.hooks.afterEmit, 0.98, "emitting", "after emit"); interceptHook(compiler.hooks.done, 0.99, "done", "plugins"); compiler.hooks.done.intercept({ name: "ProgressPlugin", done() { handler(0.99, ""); } }); interceptHook( compiler.cache.hooks.storeBuildDependencies, 0.99, "cache", "store build dependencies" ); interceptHook(compiler.cache.hooks.shutdown, 0.99, "cache", "shutdown"); interceptHook(compiler.cache.hooks.beginIdle, 0.99, "cache", "begin idle"); interceptHook( compiler.hooks.watchClose, 0.99, "end", "closing watch compilation" ); compiler.cache.hooks.beginIdle.intercept({ name: "ProgressPlugin", done() { handler(1, ""); } }); compiler.cache.hooks.shutdown.intercept({ name: "ProgressPlugin", done() { handler(1, ""); } }); } } ProgressPlugin.defaultOptions = { profile: false, modulesCount: 5000, dependenciesCount: 10000, modules: true, dependencies: true, activeModules: false, entries: true }; module.exports = ProgressPlugin;