/
opt
/
canhelp
/
node_modules
/
next
/
dist
/
esm
/
build
/
webpack
/
plugins
/
/opt/canhelp/node_modules/next/dist/esm/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.js
1851
0644
edit
dl
rm
app-build-manifest-plugin.js.map
3696
0644
edit
dl
rm
build-manifest-plugin.js
11784
0644
edit
dl
rm
build-manifest-plugin.js.map
20620
0644
edit
dl
rm
copy-file-plugin.js
1998
0644
edit
dl
rm
copy-file-plugin.js.map
3910
0644
edit
dl
rm
css-chunking-plugin.js
13962
0644
edit
dl
rm
css-chunking-plugin.js.map
20144
0644
edit
dl
rm
css-minimizer-plugin.js
3621
0644
edit
dl
rm
css-minimizer-plugin.js.map
6668
0644
edit
dl
rm
devtools-ignore-list-plugin.js
3155
0644
edit
dl
rm
devtools-ignore-list-plugin.js.map
5703
0644
edit
dl
rm
eval-source-map-dev-tool-plugin.js
9951
0644
edit
dl
rm
eval-source-map-dev-tool-plugin.js.map
17814
0644
edit
dl
rm
flight-client-entry-plugin.js
39879
0644
edit
dl
rm
flight-client-entry-plugin.js.map
65962
0644
edit
dl
rm
flight-manifest-plugin.js
21393
0644
edit
dl
rm
flight-manifest-plugin.js.map
33656
0644
edit
dl
rm
jsconfig-paths-plugin.js
7520
0644
edit
dl
rm
jsconfig-paths-plugin.js.map
14188
0644
edit
dl
rm
memory-with-gc-cache-plugin.js
4467
0644
edit
dl
rm
memory-with-gc-cache-plugin.js.map
6975
0644
edit
dl
rm
middleware-plugin.js
28463
0644
edit
dl
rm
middleware-plugin.js.map
49657
0644
edit
dl
rm
mini-css-extract-plugin.js
350
0644
edit
dl
rm
mini-css-extract-plugin.js.map
559
0644
edit
dl
rm
next-drop-client-page-plugin.js
3135
0644
edit
dl
rm
next-drop-client-page-plugin.js.map
5226
0644
edit
dl
rm
next-font-manifest-plugin.js
7218
0644
edit
dl
rm
next-font-manifest-plugin.js.map
10922
0644
edit
dl
rm
next-trace-entrypoints-plugin.js
28571
0644
edit
dl
rm
next-trace-entrypoints-plugin.js.map
45925
0644
edit
dl
rm
nextjs-require-cache-hot-reloader.js
1817
0644
edit
dl
rm
nextjs-require-cache-hot-reloader.js.map
3460
0644
edit
dl
rm
optional-peer-dependency-resolve-plugin.js
1861
0644
edit
dl
rm
optional-peer-dependency-resolve-plugin.js.map
3023
0644
edit
dl
rm
pages-manifest-plugin.js
4720
0644
edit
dl
rm
pages-manifest-plugin.js.map
9182
0644
edit
dl
rm
profiling-plugin.js
12742
0644
edit
dl
rm
profiling-plugin.js.map
22329
0644
edit
dl
rm
react-loadable-plugin.js
7873
0644
edit
dl
rm
react-loadable-plugin.js.map
13557
0644
edit
dl
rm
rspack-flight-client-entry-plugin.js
4029
0644
edit
dl
rm
rspack-flight-client-entry-plugin.js.map
8008
0644
edit
dl
rm
rspack-profiling-plugin.js
2436
0644
edit
dl
rm
rspack-profiling-plugin.js.map
3828
0644
edit
dl
rm
slow-module-detection-plugin.js
8330
0644
edit
dl
rm
slow-module-detection-plugin.js.map
13734
0644
edit
dl
rm
subresource-integrity-plugin.js
2238
0644
edit
dl
rm
subresource-integrity-plugin.js.map
4380
0644
edit
dl
rm
Edit:
/opt/canhelp/node_modules/next/dist/esm/build/webpack/plugins/subresource-integrity-plugin.js.map
(4380B)
{"version":3,"sources":["../../../../src/build/webpack/plugins/subresource-integrity-plugin.ts"],"sourcesContent":["import { webpack, sources } from 'next/dist/compiled/webpack/webpack'\nimport crypto from 'crypto'\nimport { SUBRESOURCE_INTEGRITY_MANIFEST } from '../../../shared/lib/constants'\n\nconst PLUGIN_NAME = 'SubresourceIntegrityPlugin'\n\nexport type SubresourceIntegrityAlgorithm = 'sha256' | 'sha384' | 'sha512'\n\nexport class SubresourceIntegrityPlugin {\n constructor(private readonly algorithm: SubresourceIntegrityAlgorithm) {}\n\n public apply(compiler: webpack.Compiler) {\n compiler.hooks.make.tap(PLUGIN_NAME, (compilation) => {\n compilation.hooks.afterProcessAssets.tap(\n {\n name: PLUGIN_NAME,\n stage: webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS,\n },\n () => {\n // Collect all the assets.\n let files = new Set<string>()\n for (const asset of compilation.getAssets()) {\n files.add(asset.name)\n }\n\n // For each file, deduped, calculate the file hash.\n const hashes: Record<string, string> = {}\n for (const file of files.values()) {\n // Get the buffer for the asset.\n const asset = compilation.getAsset(file)\n if (!asset) {\n throw new Error(`could not get asset: ${file}`)\n }\n\n // Get the buffer for the asset.\n const buffer = asset.source.buffer()\n\n // Create the hash for the content.\n const hash = crypto\n .createHash(this.algorithm)\n .update(buffer)\n .digest()\n .toString('base64')\n\n hashes[file] = `${this.algorithm}-${hash}`\n }\n\n const json = JSON.stringify(hashes, null, 2)\n const file = 'server/' + SUBRESOURCE_INTEGRITY_MANIFEST\n compilation.emitAsset(\n file + '.js',\n new sources.RawSource(\n `self.__SUBRESOURCE_INTEGRITY_MANIFEST=${JSON.stringify(json)}`\n // Work around webpack 4 type of RawSource being used\n // TODO: use webpack 5 type by default\n ) as unknown as webpack.sources.RawSource\n )\n compilation.emitAsset(\n file + '.json',\n new sources.RawSource(\n json\n // Work around webpack 4 type of RawSource being used\n // TODO: use webpack 5 type by default\n ) as unknown as webpack.sources.RawSource\n )\n }\n )\n })\n }\n}\n"],"names":["webpack","sources","crypto","SUBRESOURCE_INTEGRITY_MANIFEST","PLUGIN_NAME","SubresourceIntegrityPlugin","constructor","algorithm","apply","compiler","hooks","make","tap","compilation","afterProcessAssets","name","stage","Compilation","PROCESS_ASSETS_STAGE_ADDITIONS","files","Set","asset","getAssets","add","hashes","file","values","getAsset","Error","buffer","source","hash","createHash","update","digest","toString","json","JSON","stringify","emitAsset","RawSource"],"mappings":"AAAA,SAASA,OAAO,EAAEC,OAAO,QAAQ,qCAAoC;AACrE,OAAOC,YAAY,SAAQ;AAC3B,SAASC,8BAA8B,Q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