/
opt
/
canhelp
/
node_modules
/
next
/
dist
/
build
/
webpack
/
plugins
/
/opt/canhelp/node_modules/next/dist/build/webpack/plugins
mkdir
upload
Name
Size
Mode
Actions
minify-webpack-plugin/
-
0755
rm
next-types-plugin/
-
0755
rm
telemetry-plugin/
-
0755
rm
wellknown-errors-plugin/
-
0755
rm
app-build-manifest-plugin.d.ts
288
0644
edit
dl
rm
app-build-manifest-plugin.js
2285
0644
edit
dl
rm
app-build-manifest-plugin.js.map
3649
0644
edit
dl
rm
build-manifest-plugin.d.ts
1880
0644
edit
dl
rm
build-manifest-plugin.js
12769
0644
edit
dl
rm
build-manifest-plugin.js.map
20566
0644
edit
dl
rm
copy-file-plugin.d.ts
415
0644
edit
dl
rm
copy-file-plugin.js
2390
0644
edit
dl
rm
copy-file-plugin.js.map
3855
0644
edit
dl
rm
css-chunking-plugin.d.ts
175
0644
edit
dl
rm
css-chunking-plugin.js
14178
0644
edit
dl
rm
css-chunking-plugin.js.map
20162
0644
edit
dl
rm
css-minimizer-plugin.d.ts
574
0644
edit
dl
rm
css-minimizer-plugin.js
4170
0644
edit
dl
rm
css-minimizer-plugin.js.map
6642
0644
edit
dl
rm
devtools-ignore-list-plugin.d.ts
775
0644
edit
dl
rm
devtools-ignore-list-plugin.js
3367
0644
edit
dl
rm
devtools-ignore-list-plugin.js.map
5702
0644
edit
dl
rm
eval-source-map-dev-tool-plugin.d.ts
869
0644
edit
dl
rm
eval-source-map-dev-tool-plugin.js
10144
0644
edit
dl
rm
eval-source-map-dev-tool-plugin.js.map
17802
0644
edit
dl
rm
flight-client-entry-plugin.d.ts
3040
0644
edit
dl
rm
flight-client-entry-plugin.js
40923
0644
edit
dl
rm
flight-client-entry-plugin.js.map
65905
0644
edit
dl
rm
flight-manifest-plugin.d.ts
2144
0644
edit
dl
rm
flight-manifest-plugin.js
23049
0644
edit
dl
rm
flight-manifest-plugin.js.map
33545
0644
edit
dl
rm
jsconfig-paths-plugin.d.ts
2248
0644
edit
dl
rm
jsconfig-paths-plugin.js
8254
0644
edit
dl
rm
jsconfig-paths-plugin.js.map
14283
0644
edit
dl
rm
memory-with-gc-cache-plugin.d.ts
517
0644
edit
dl
rm
memory-with-gc-cache-plugin.js
4695
0644
edit
dl
rm
memory-with-gc-cache-plugin.js.map
6989
0644
edit
dl
rm
middleware-plugin.d.ts
1783
0644
edit
dl
rm
middleware-plugin.js
29617
0644
edit
dl
rm
middleware-plugin.js.map
49521
0644
edit
dl
rm
mini-css-extract-plugin.d.ts
190
0644
edit
dl
rm
mini-css-extract-plugin.js
724
0644
edit
dl
rm
mini-css-extract-plugin.js.map
568
0644
edit
dl
rm
next-drop-client-page-plugin.d.ts
305
0644
edit
dl
rm
next-drop-client-page-plugin.js
3561
0644
edit
dl
rm
next-drop-client-page-plugin.js.map
5232
0644
edit
dl
rm
next-font-manifest-plugin.d.ts
1373
0644
edit
dl
rm
next-font-manifest-plugin.js
6814
0644
edit
dl
rm
next-font-manifest-plugin.js.map
10868
0644
edit
dl
rm
next-trace-entrypoints-plugin.d.ts
2418
0644
edit
dl
rm
next-trace-entrypoints-plugin.js
29635
0644
edit
dl
rm
next-trace-entrypoints-plugin.js.map
45878
0644
edit
dl
rm
nextjs-require-cache-hot-reloader.d.ts
416
0644
edit
dl
rm
nextjs-require-cache-hot-reloader.js
2194
0644
edit
dl
rm
nextjs-require-cache-hot-reloader.js.map
3451
0644
edit
dl
rm
optional-peer-dependency-resolve-plugin.d.ts
140
0644
edit
dl
rm
optional-peer-dependency-resolve-plugin.js
2115
0644
edit
dl
rm
optional-peer-dependency-resolve-plugin.js.map
3039
0644
edit
dl
rm
pages-manifest-plugin.d.ts
754
0644
edit
dl
rm
pages-manifest-plugin.js
5889
0644
edit
dl
rm
pages-manifest-plugin.js.map
9206
0644
edit
dl
rm
profiling-plugin.d.ts
926
0644
edit
dl
rm
profiling-plugin.js
13484
0644
edit
dl
rm
profiling-plugin.js.map
22355
0644
edit
dl
rm
react-loadable-plugin.d.ts
1591
0644
edit
dl
rm
react-loadable-plugin.js
8322
0644
edit
dl
rm
react-loadable-plugin.js.map
13547
0644
edit
dl
rm
rspack-flight-client-entry-plugin.d.ts
789
0644
edit
dl
rm
rspack-flight-client-entry-plugin.js
4422
0644
edit
dl
rm
rspack-flight-client-entry-plugin.js.map
7965
0644
edit
dl
rm
rspack-profiling-plugin.d.ts
284
0644
edit
dl
rm
rspack-profiling-plugin.js
2949
0644
edit
dl
rm
rspack-profiling-plugin.js.map
3862
0644
edit
dl
rm
slow-module-detection-plugin.d.ts
413
0644
edit
dl
rm
slow-module-detection-plugin.js
8580
0644
edit
dl
rm
slow-module-detection-plugin.js.map
13744
0644
edit
dl
rm
subresource-integrity-plugin.d.ts
326
0644
edit
dl
rm
subresource-integrity-plugin.js
2653
0644
edit
dl
rm
subresource-integrity-plugin.js.map
4355
0644
edit
dl
rm
Edit:
/opt/canhelp/node_modules/next/dist/build/webpack/plugins/profiling-plugin.js
(13484B)
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { ProfilingPlugin: null, spans: null, webpackInvalidSpans: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { ProfilingPlugin: function() { return ProfilingPlugin; }, spans: function() { return spans; }, webpackInvalidSpans: function() { return webpackInvalidSpans; } }); const _webpack = require("next/dist/compiled/webpack/webpack"); const _path = /*#__PURE__*/ _interop_require_default(require("path")); function _interop_require_default(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const pluginName = 'ProfilingPlugin'; const spans = new WeakMap(); const moduleSpansByCompilation = new WeakMap(); const makeSpanByCompilation = new WeakMap(); const sealSpanByCompilation = new WeakMap(); const webpackInvalidSpans = new WeakMap(); const TRACE_LABELS_SEAL = [ 'module assets', 'create chunk assets', 'asset render', 'asset emit', 'store asset' ]; function inTraceLabelsSeal(label) { return TRACE_LABELS_SEAL.some((l)=>label.startsWith(l)); } class ProfilingPlugin { constructor({ runWebpackSpan, rootDir }){ this.runWebpackSpan = runWebpackSpan; this.rootDir = rootDir; } apply(compiler) { this.traceTopLevelHooks(compiler); this.traceCompilationHooks(compiler); this.compiler = compiler; } traceHookPair(spanName, startHook, stopHook, { parentSpan, attrs, onStart, onStop } = {}) { let span; startHook.tap({ name: pluginName, stage: -Infinity }, (...params)=>{ const name = typeof spanName === 'function' ? spanName() : spanName; const attributes = attrs ? attrs(...params) : attrs; span = parentSpan ? parentSpan(...params).traceChild(name, attributes) : this.runWebpackSpan.traceChild(name, attributes); if (onStart) onStart(span, ...params); }); stopHook.tap({ name: pluginName, stage: Infinity }, (...params)=>{ // `stopHook` may be triggered when `startHook` has not in cases // where `stopHook` is used as the terminating event for more // than one pair of hooks. if (!span) { return; } if (onStop) onStop(span, ...params); span.stop(); }); } traceTopLevelHooks(compiler) { this.traceHookPair('webpack-compilation', compiler.hooks.compilation, compiler.hooks.afterCompile, { parentSpan: ()=>webpackInvalidSpans.get(compiler) || this.runWebpackSpan, attrs: ()=>({ name: compiler.name }), onStart: (span, compilation)=>{ spans.set(compilation, span); spans.set(compiler, span); moduleSpansByCompilation.set(compilation, new WeakMap()); } }); if (compiler.options.mode === 'development') { this.traceHookPair(()=>`webpack-invalidated-${compiler.name}`, compiler.hooks.invalid, compiler.hooks.done, { onStart: (span)=>webpackInvalidSpans.set(compiler, span), onStop: ()=>webpackInvalidSpans.delete(compiler), attrs: (fileName)=>({ trigger: fileName ? _path.default.relative(this.rootDir, fileName).replaceAll(_path.default.sep, '/') : 'manual' }) }); } } traceCompilationHooks(compiler) { this.traceHookPair('emit', compiler.hooks.emit, compiler.hooks.afterEmit, { parentSpan: ()=>webpackInvalidSpans.get(compiler) || this.runWebpackSpan }); this.traceHookPair('make', compiler.hooks.make, compiler.hooks.finishMake, { parentSpan: (compilation)=>{ const compilationSpan = spans.get(compilation); if (!compilationSpan) { return webpackInvalidSpans.get(compiler) || this.runWebpackSpan; } return compilationSpan; }, onStart: (span, compilation)=>{ makeSpanByCompilation.set(compilation, span); }, onStop: (_span, compilation)=>{ makeSpanByCompilation.delete(compilation); } }); compiler.hooks.compilation.tap({ name: pluginName, stage: -Infinity }, (compilation)=>{ compilation.hooks.buildModule.tap(pluginName, (module1)=>{ var _compilation_moduleGraph; const moduleType = (()=>{ const r = module1.userRequest; if (!r || r.endsWith('!')) { return ''; } else { const resource = r.split('!').pop(); const match = /^[^?]+\.([^?]+)$/.exec(resource); return match ? match[1] : ''; } })(); const issuerModule = compilation == null ? void 0 : (_compilation_moduleGraph = compilation.moduleGraph) == null ? void 0 : _compilation_moduleGraph.getIssuer(module1); let span; const moduleSpans = moduleSpansByCompilation.get(compilation); const spanName = `build-module${moduleType ? `-${moduleType}` : ''}`; const issuerSpan = issuerModule && (moduleSpans == null ? void 0 : moduleSpans.get(issuerModule)); if (issuerSpan) { span = issuerSpan.traceChild(spanName); } else { let parentSpan; for (const incomingConnection of compilation.moduleGraph.getIncomingConnections(module1)){ const entrySpan = spans.get(incomingConnection.dependency); if (entrySpan) { parentSpan = entrySpan; break; } } if (!parentSpan) { const compilationSpan = spans.get(compilation); if (!compilationSpan) { return; } parentSpan = compilationSpan; } span = parentSpan.traceChild(spanName); } span.setAttribute('name', module1.userRequest); span.setAttribute('layer', module1.layer); moduleSpans.set(module1, span); }); const moduleHooks = _webpack.NormalModule.getCompilationHooks(compilation); moduleHooks.readResource.for(undefined).intercept({ register (tapInfo) { const fn = tapInfo.fn; tapInfo.fn = (loaderContext, callback)=>{ fn(loaderContext, (err, result)=>{ callback(err, result); }); }; return tapInfo; } }); moduleHooks.loader.tap(pluginName, (loaderContext, module1)=>{ var _moduleSpansByCompilation_get; const moduleSpan = (_moduleSpansByCompilation_get = moduleSpansByCompilation.get(compilation)) == null ? void 0 : _moduleSpansByCompilation_get.get(module1); loaderContext.currentTraceSpan = moduleSpan; }); compilation.hooks.succeedModule.tap(pluginName, (module1)=>{ var _moduleSpansByCompilation_get_get, _moduleSpansByCompilation_get; moduleSpansByCompilation == null ? void 0 : (_moduleSpansByCompilation_get = moduleSpansByCompilation.get(compilation)) == null ? void 0 : (_moduleSpansByCompilation_get_get = _moduleSpansByCompilation_get.get(module1)) == null ? void 0 : _moduleSpansByCompilation_get_get.stop(); }); compilation.hooks.failedModule.tap(pluginName, (module1)=>{ var _moduleSpansByCompilation_get_get, _moduleSpansByCompilation_get; moduleSpansByCompilation == null ? void 0 : (_moduleSpansByCompilation_get = moduleSpansByCompilation.get(compilation)) == null ? void 0 : (_moduleSpansByCompilation_get_get = _moduleSpansByCompilation_get.get(module1)) == null ? void 0 : _moduleSpansByCompilation_get_get.stop(); }); this.traceHookPair('seal', compilation.hooks.seal, compilation.hooks.afterSeal, { parentSpan: ()=>spans.get(compilation), onStart (span) { sealSpanByCompilation.set(compilation, span); }, onStop () { sealSpanByCompilation.delete(compilation); } }); compilation.hooks.addEntry.tap(pluginName, (entry)=>{ const parentSpan = makeSpanByCompilation.get(compilation) || spans.get(compilation); if (!parentSpan) { return; } const addEntrySpan = parentSpan.traceChild('add-entry'); addEntrySpan.setAttribute('request', entry.request); spans.set(entry, addEntrySpan); }); compilation.hooks.succeedEntry.tap(pluginName, (entry)=>{ var _spans_get; (_spans_get = spans.get(entry)) == null ? void 0 : _spans_get.stop(); spans.delete(entry); }); compilation.hooks.failedEntry.tap(pluginName, (entry)=>{ var _spans_get; (_spans_get = spans.get(entry)) == null ? void 0 : _spans_get.stop(); spans.delete(entry); }); this.traceHookPair('chunk-graph', compilation.hooks.beforeChunks, compilation.hooks.afterChunks, { parentSpan: ()=>sealSpanByCompilation.get(compilation) || spans.get(compilation) }); this.traceHookPair('optimize', compilation.hooks.optimize, compilation.hooks.reviveModules, { parentSpan: ()=>sealSpanByCompilation.get(compilation) || spans.get(compilation) }); this.traceHookPair('optimize-modules', compilation.hooks.optimizeModules, compilation.hooks.afterOptimizeModules, { parentSpan: ()=>sealSpanByCompilation.get(compilation) || spans.get(compilation) }); this.traceHookPair('optimize-chunks', compilation.hooks.optimizeChunks, compilation.hooks.afterOptimizeChunks, { parentSpan: ()=>sealSpanByCompilation.get(compilation) || spans.get(compilation) }); this.traceHookPair('optimize-tree', compilation.hooks.optimizeTree, compilation.hooks.afterOptimizeTree, { parentSpan: ()=>sealSpanByCompilation.get(compilation) || spans.get(compilation) }); this.traceHookPair('optimize-chunk-modules', compilation.hooks.optimizeChunkModules, compilation.hooks.afterOptimizeChunkModules, { parentSpan: ()=>sealSpanByCompilation.get(compilation) || spans.get(compilation) }); this.traceHookPair('module-hash', compilation.hooks.beforeModuleHash, compilation.hooks.afterModuleHash, { parentSpan: ()=>sealSpanByCompilation.get(compilation) || spans.get(compilation) }); this.traceHookPair('code-generation', compilation.hooks.beforeCodeGeneration, compilation.hooks.afterCodeGeneration, { parentSpan: ()=>sealSpanByCompilation.get(compilation) || spans.get(compilation) }); this.traceHookPair('hash', compilation.hooks.beforeHash, compilation.hooks.afterHash, { parentSpan: ()=>sealSpanByCompilation.get(compilation) || spans.get(compilation) }); this.traceHookPair('code-generation-jobs', compilation.hooks.afterHash, compilation.hooks.beforeModuleAssets, { parentSpan: ()=>sealSpanByCompilation.get(compilation) || spans.get(compilation) }); const logs = new Map(); const originalTime = compilation.logger.time; const originalTimeEnd = compilation.logger.timeEnd; compilation.logger.time = (label)=>{ if (!inTraceLabelsSeal(label)) { return originalTime.call(compilation.logger, label); } const span = sealSpanByCompilation.get(compilation); if (span) { logs.set(label, span.traceChild(label.replace(/ /g, '-'))); } return originalTime.call(compilation.logger, label); }; compilation.logger.timeEnd = (label)=>{ if (!inTraceLabelsSeal(label)) { return originalTimeEnd.call(compilation.logger, label); } const span = logs.get(label); if (span) { span.stop(); logs.delete(label); } return originalTimeEnd.call(compilation.logger, label); }; }); } } //# sourceMappingURL=profiling-plugin.js.map
Save
cmd:
run