@sentry/bundler-plugins 11.11.0 → 11.12.0
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/build/cjs/core/build-plugin-manager.js +27 -8
- package/build/cjs/core/build-plugin-manager.js.map +1 -1
- package/build/cjs/core/index.js.map +1 -1
- package/build/cjs/core/upload-filter.js +57 -0
- package/build/cjs/core/upload-filter.js.map +1 -0
- package/build/cjs/core/version.js +1 -1
- package/build/cjs/core/version.js.map +1 -1
- package/build/cjs/esbuild/index.js +1 -0
- package/build/cjs/esbuild/index.js.map +1 -1
- package/build/cjs/rollup/index.js +49 -9
- package/build/cjs/rollup/index.js.map +1 -1
- package/build/cjs/rollup/source-map-handling.js +202 -0
- package/build/cjs/rollup/source-map-handling.js.map +1 -0
- package/build/cjs/vite/index.js +4 -18
- package/build/cjs/vite/index.js.map +1 -1
- package/build/cjs/vite/source-map-hooks.js +93 -0
- package/build/cjs/vite/source-map-hooks.js.map +1 -0
- package/build/cjs/webpack/index.js +113 -1
- package/build/cjs/webpack/index.js.map +1 -1
- package/build/esm/core/build-plugin-manager.js +27 -8
- package/build/esm/core/build-plugin-manager.js.map +1 -1
- package/build/esm/core/index.js.map +1 -1
- package/build/esm/core/upload-filter.js +41 -0
- package/build/esm/core/upload-filter.js.map +1 -0
- package/build/esm/core/version.js +1 -1
- package/build/esm/core/version.js.map +1 -1
- package/build/esm/esbuild/index.js +1 -0
- package/build/esm/esbuild/index.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/rollup/index.js +49 -10
- package/build/esm/rollup/index.js.map +1 -1
- package/build/esm/rollup/source-map-handling.js +183 -0
- package/build/esm/rollup/source-map-handling.js.map +1 -0
- package/build/esm/vite/index.js +5 -19
- package/build/esm/vite/index.js.map +1 -1
- package/build/esm/vite/source-map-hooks.js +77 -0
- package/build/esm/vite/source-map-hooks.js.map +1 -0
- package/build/esm/webpack/index.js +114 -2
- package/build/esm/webpack/index.js.map +1 -1
- package/build/types/core/build-plugin-manager.d.ts +17 -5
- package/build/types/core/build-plugin-manager.d.ts.map +1 -1
- package/build/types/core/index.d.ts +1 -0
- package/build/types/core/index.d.ts.map +1 -1
- package/build/types/core/types.d.ts +7 -0
- package/build/types/core/types.d.ts.map +1 -1
- package/build/types/core/upload-filter.d.ts +9 -0
- package/build/types/core/upload-filter.d.ts.map +1 -0
- package/build/types/core/version.d.ts +1 -1
- package/build/types/esbuild/index.d.ts.map +1 -1
- package/build/types/rollup/index.d.ts +106 -6
- package/build/types/rollup/index.d.ts.map +1 -1
- package/build/types/rollup/source-map-handling.d.ts +59 -0
- package/build/types/rollup/source-map-handling.d.ts.map +1 -0
- package/build/types/vite/index.d.ts +1 -5
- package/build/types/vite/index.d.ts.map +1 -1
- package/build/types/vite/source-map-hooks.d.ts +45 -0
- package/build/types/vite/source-map-hooks.d.ts.map +1 -0
- package/build/types/webpack/index.d.ts.map +1 -1
- package/package.json +40 -38
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isJsFile, getDebugIdSnippet } from '../core/index.js';
|
|
2
2
|
import * as path from 'node:path';
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
4
|
import { createRequire } from 'node:module';
|
|
@@ -18,6 +18,28 @@ try {
|
|
|
18
18
|
COMPONENT_ANNOTATION_LOADER = path.resolve(dirname, "component-annotation-transform.js");
|
|
19
19
|
}
|
|
20
20
|
const WEBPACK_JAVASCRIPT_ASSET_REGEX = /\.(?:js|ts|jsx|tsx|mjs|cjs|mts|cts)(?:\?[^?]*)?(?:#[^#]*)?$/;
|
|
21
|
+
function sourceMapKindFromDevtool(compiler) {
|
|
22
|
+
const devtool = compiler.options.devtool;
|
|
23
|
+
if (devtool === void 0) {
|
|
24
|
+
return "unset";
|
|
25
|
+
}
|
|
26
|
+
if (devtool === false) {
|
|
27
|
+
const hasSourceMapPlugin = compiler.options.plugins?.some(
|
|
28
|
+
(plugin) => plugin?.constructor?.name === "SourceMapDevToolPlugin"
|
|
29
|
+
);
|
|
30
|
+
return hasSourceMapPlugin ? void 0 : "off";
|
|
31
|
+
}
|
|
32
|
+
if (!devtool.includes("source-map")) {
|
|
33
|
+
return "off";
|
|
34
|
+
}
|
|
35
|
+
if (devtool.includes("inline") || devtool.includes("eval")) {
|
|
36
|
+
return "inline";
|
|
37
|
+
}
|
|
38
|
+
if (devtool.includes("hidden")) {
|
|
39
|
+
return "hidden";
|
|
40
|
+
}
|
|
41
|
+
return "visible";
|
|
42
|
+
}
|
|
21
43
|
function getWebpackMajorVersion() {
|
|
22
44
|
try {
|
|
23
45
|
const webpack = _req("webpack");
|
|
@@ -46,6 +68,44 @@ function addDebugIdsToAssets(compilation, RawSource) {
|
|
|
46
68
|
}
|
|
47
69
|
}
|
|
48
70
|
}
|
|
71
|
+
function deleteSourceMapAssets(compilation, sourceMapName) {
|
|
72
|
+
for (const candidate of compilation.getAssets()) {
|
|
73
|
+
if (candidate.name === sourceMapName || candidate.name.startsWith(`${sourceMapName}.`)) {
|
|
74
|
+
compilation.deleteAsset(candidate.name);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
async function stageSourceMaps(compilation, staging, logger, pluginEnabledMaps) {
|
|
79
|
+
const outputPath = compilation.outputOptions.path ?? path.resolve();
|
|
80
|
+
for (const asset of compilation.getAssets()) {
|
|
81
|
+
const relatedSourceMap = asset.info.related?.sourceMap;
|
|
82
|
+
const sourceMapName = typeof relatedSourceMap === "string" ? relatedSourceMap : `${asset.name}.map`;
|
|
83
|
+
const sourceMapAsset = compilation.getAsset(sourceMapName);
|
|
84
|
+
if (!sourceMapAsset) {
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
if (!isJsFile(asset.name)) {
|
|
88
|
+
if (pluginEnabledMaps) {
|
|
89
|
+
deleteSourceMapAssets(compilation, sourceMapName);
|
|
90
|
+
}
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
const result = await staging.stage({
|
|
94
|
+
code: asset.source.source().toString(),
|
|
95
|
+
mapSource: sourceMapAsset.source.source().toString(),
|
|
96
|
+
mapDir: path.join(outputPath, path.dirname(sourceMapName)),
|
|
97
|
+
chunkPath: path.join(outputPath, asset.name)
|
|
98
|
+
});
|
|
99
|
+
if (result === "skipped" || result === "failed") {
|
|
100
|
+
logger.warn(
|
|
101
|
+
pluginEnabledMaps ? `Could not prepare ${asset.name} for upload, so it is not uploaded and its source map ${sourceMapName} was removed from the build output.` : `Could not prepare ${asset.name} for upload, so its source map ${sourceMapName} stays in the build output.`
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
if (result === "staged" || pluginEnabledMaps) {
|
|
105
|
+
deleteSourceMapAssets(compilation, sourceMapName);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
49
109
|
function createSentryWebpackPlugin(userOptions = {}) {
|
|
50
110
|
const sentryBuildPluginManager = createSentryBuildPluginManager(userOptions, {
|
|
51
111
|
loggerPrefix: userOptions._metaOptions?.loggerPrefixOverride ?? "[sentry-webpack-plugin]",
|
|
@@ -94,6 +154,17 @@ function createSentryWebpackPlugin(userOptions = {}) {
|
|
|
94
154
|
{ logger }
|
|
95
155
|
) : void 0;
|
|
96
156
|
const transformReplace = Object.keys(replacementValues).length > 0;
|
|
157
|
+
function decideSourceMaps(compiler) {
|
|
158
|
+
const kind = compiler.options.mode === "development" ? void 0 : sourceMapKindFromDevtool(compiler);
|
|
159
|
+
if (kind === void 0) {
|
|
160
|
+
return { decision: { enableHidden: false, deleteAfterUpload: false } };
|
|
161
|
+
}
|
|
162
|
+
const decision = sentryBuildPluginManager.sourceMaps.decide(kind);
|
|
163
|
+
if (decision.enableHidden) {
|
|
164
|
+
compiler.options.devtool = kind === "visible" ? `hidden-${compiler.options.devtool}` : "hidden-source-map";
|
|
165
|
+
}
|
|
166
|
+
return { kind, decision };
|
|
167
|
+
}
|
|
97
168
|
function addCodeInjection(compiler) {
|
|
98
169
|
if (releaseInjectionCode.isEmpty() && chunkInjectionCode.isEmpty() && !sourcemapsEnabled) {
|
|
99
170
|
return;
|
|
@@ -152,6 +223,35 @@ ${codeToInject.code()}` : codeToInject.code();
|
|
|
152
223
|
void sentryBuildPluginManager.telemetry.emitBundlerPluginExecutionSignal().catch(() => {
|
|
153
224
|
});
|
|
154
225
|
const { DefinePlugin } = compiler.webpack ?? {};
|
|
226
|
+
const { kind: sourceMapKind, decision: sourceMapDecision } = decideSourceMaps(compiler);
|
|
227
|
+
const pendingStagings = /* @__PURE__ */ new Map();
|
|
228
|
+
if (sourceMapDecision.deleteAfterUpload) {
|
|
229
|
+
const stage = (compiler.webpack?.Compilation?.PROCESS_ASSETS_STAGE_REPORT ?? 5e3) + 1;
|
|
230
|
+
compiler.hooks.thisCompilation.tap("sentry-webpack-plugin", (compilation) => {
|
|
231
|
+
compilation.hooks.processAssets.tapPromise({ name: "sentry-webpack-plugin", stage }, async () => {
|
|
232
|
+
const staging = await sentryBuildPluginManager.createUploadStaging();
|
|
233
|
+
pendingStagings.set(compilation, staging);
|
|
234
|
+
await stageSourceMaps(compilation, staging, logger, sourceMapKind === "unset");
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
const emittedCompilations = /* @__PURE__ */ new Set();
|
|
238
|
+
compiler.hooks.emit.tap("sentry-webpack-plugin", (compilation) => {
|
|
239
|
+
emittedCompilations.add(compilation);
|
|
240
|
+
});
|
|
241
|
+
const settlePendingStagings = () => {
|
|
242
|
+
for (const [compilation, staging] of pendingStagings) {
|
|
243
|
+
if (emittedCompilations.has(compilation)) {
|
|
244
|
+
void staging.keep("The source map upload did not run.");
|
|
245
|
+
} else {
|
|
246
|
+
void staging.discard();
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
pendingStagings.clear();
|
|
250
|
+
emittedCompilations.clear();
|
|
251
|
+
};
|
|
252
|
+
compiler.hooks.done.tap("sentry-webpack-plugin", settlePendingStagings);
|
|
253
|
+
compiler.hooks.failed?.tap("sentry-webpack-plugin", settlePendingStagings);
|
|
254
|
+
}
|
|
155
255
|
addCodeInjection(compiler);
|
|
156
256
|
if (sourcemapsEnabled && options.sourcemaps?.disable === "disable-upload") {
|
|
157
257
|
const RawSource = compiler.webpack?.sources?.RawSource;
|
|
@@ -194,14 +294,26 @@ ${codeToInject.code()}` : codeToInject.code();
|
|
|
194
294
|
(compilation, callback) => {
|
|
195
295
|
const freeGlobalDependencyOnBuildArtifacts = createDependencyOnBuildArtifacts();
|
|
196
296
|
const upload = createDebugIdUploadFunction({ sentryBuildPluginManager });
|
|
297
|
+
const staging = pendingStagings.get(compilation);
|
|
298
|
+
pendingStagings.delete(compilation);
|
|
299
|
+
let stagingHandedOver = false;
|
|
197
300
|
const run = async () => {
|
|
198
301
|
try {
|
|
199
302
|
await sentryBuildPluginManager.createRelease();
|
|
200
303
|
if (sourcemapsEnabled && options.sourcemaps?.disable !== "disable-upload") {
|
|
201
304
|
const outputPath = compilation.outputOptions.path ?? path.resolve();
|
|
202
305
|
const buildArtifacts = Object.keys(compilation.assets).map((asset) => path.join(outputPath, asset));
|
|
203
|
-
|
|
306
|
+
stagingHandedOver = true;
|
|
307
|
+
await upload(buildArtifacts, { staging });
|
|
308
|
+
} else {
|
|
309
|
+
stagingHandedOver = true;
|
|
310
|
+
await staging?.discard();
|
|
311
|
+
}
|
|
312
|
+
} catch (e) {
|
|
313
|
+
if (!stagingHandedOver) {
|
|
314
|
+
await staging?.keep("The source map upload did not run.");
|
|
204
315
|
}
|
|
316
|
+
throw e;
|
|
205
317
|
} finally {
|
|
206
318
|
freeGlobalDependencyOnBuildArtifacts();
|
|
207
319
|
await sentryBuildPluginManager.deleteArtifacts();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/webpack/index.ts"],"sourcesContent":["/* oxlint-disable max-lines */\n\nimport type { Options } from '../core/index';\nimport {\n createSentryBuildPluginManager,\n generateReleaseInjectorCode,\n generateModuleMetadataInjectorCode,\n stringToUUID,\n createComponentNameAnnotateHooks,\n CodeInjection,\n getDebugIdSnippet,\n createDebugIdUploadFunction,\n getCodeInjectionPosition,\n isJsFile,\n stampDebugId,\n} from '../core/index';\nimport * as path from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { createRequire } from 'node:module';\nimport { randomUUID } from 'node:crypto';\n\nconst _req = createRequire(import.meta.url);\n\n// Resolve the loader path via the package's own exports.\n// This module may end up in a shared chunk (_chunks/) whose import.meta.url\n// does not point to the webpack/ directory where the transform file lives, so\n// a path-relative lookup would fail. Using require.resolve on the package export\n// always finds the correct installed file regardless of chunk placement.\nlet COMPONENT_ANNOTATION_LOADER: string;\ntry {\n COMPONENT_ANNOTATION_LOADER = _req.resolve('@sentry/bundler-plugins/webpack-loader');\n} catch {\n // Fallback for non-packaged environments (e.g., monorepo source runs without dist)\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore Rollup transpiles import.meta for us for CJS\n const dirname = path.dirname(fileURLToPath(import.meta.url));\n // The Rollup build emits `.js` for both CJS and ESM, so the extension is the same in both.\n COMPONENT_ANNOTATION_LOADER = path.resolve(dirname, 'component-annotation-transform.js');\n}\n\ntype PluginClass = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (options: any): unknown;\n};\n\ntype WebpackSource = {\n source: () => string | Buffer;\n};\n\ntype WebpackRawSource = {\n new (source: string): WebpackSource;\n};\n\ntype WebpackReplaceSource = WebpackSource & {\n insert: (position: number, value: string) => void;\n};\n\nconst WEBPACK_JAVASCRIPT_ASSET_REGEX = /\\.(?:js|ts|jsx|tsx|mjs|cjs|mts|cts)(?:\\?[^?]*)?(?:#[^#]*)?$/;\n\ntype WebpackAsset = {\n name: string;\n source: WebpackSource;\n info: {\n related?: {\n sourceMap?: string | string[];\n };\n };\n};\n\ntype WebpackCompiler = {\n options: {\n plugins?: unknown[];\n mode?: string;\n module?: {\n rules?: unknown[];\n };\n };\n hooks: {\n compilation: {\n tap: (name: string, callback: (compilation: WebpackCompilation) => void) => void;\n };\n thisCompilation: {\n tap: (name: string, callback: (compilation: WebpackCompilation) => void) => void;\n };\n afterEmit: {\n tapAsync: (name: string, callback: (compilation: WebpackCompilation, cb: () => void) => void) => void;\n };\n done: {\n tap: (name: string, callback: () => void) => void;\n };\n };\n webpack?: {\n DefinePlugin?: PluginClass;\n Compilation?: {\n PROCESS_ASSETS_STAGE_ADDITIONS?: number;\n PROCESS_ASSETS_STAGE_DEV_TOOLING?: number;\n };\n sources?: {\n RawSource?: WebpackRawSource;\n ReplaceSource?: new (source: WebpackSource) => WebpackReplaceSource;\n };\n };\n};\n\ntype WebpackCompilation = {\n chunks: Iterable<{\n files: Iterable<string>;\n hash?: string;\n contentHash?: { javascript?: string };\n canBeInitial?: () => boolean;\n }>;\n outputOptions: {\n path?: string;\n };\n assets: Record<string, unknown>;\n getAssets: () => WebpackAsset[];\n getAsset: (name: string) => WebpackAsset | undefined;\n updateAsset: (name: string, source: WebpackSource) => void;\n hooks: {\n processAssets: {\n tap: (\n options: { name: string; stage: number },\n callback: (assets: Record<string, WebpackSource>) => void,\n ) => void;\n };\n };\n};\n\ntype WebpackModule = {\n version?: string;\n default?: { version?: string };\n};\n\n// Only used for telemetry; `webpack` is an optional peer dependency and may be absent (e.g. rspack).\nfunction getWebpackMajorVersion(): string | undefined {\n try {\n const webpack = _req('webpack') as WebpackModule;\n const version = webpack.version ?? webpack.default?.version;\n return version?.split('.')[0];\n } catch {\n return undefined;\n }\n}\n\n/**\n * Stamps each JS asset's debug ID into the asset itself and its source map asset.\n *\n * Runs after source maps have been generated, so the JS asset no longer needs to carry\n * source map information and can be replaced with a plain `RawSource`.\n */\nfunction addDebugIdsToAssets(compilation: WebpackCompilation, RawSource: WebpackRawSource): void {\n for (const asset of compilation.getAssets()) {\n if (!isJsFile(asset.name)) {\n continue;\n }\n\n const bundleSource = asset.source.source().toString();\n const relatedSourceMap = asset.info.related?.sourceMap;\n const sourceMapName = typeof relatedSourceMap === 'string' ? relatedSourceMap : `${asset.name}.map`;\n const sourceMapAsset = compilation.getAsset(sourceMapName);\n\n const stamped = stampDebugId(bundleSource, sourceMapAsset?.source.source().toString());\n if (!stamped) {\n continue;\n }\n\n compilation.updateAsset(asset.name, new RawSource(stamped.bundleSource));\n if (stamped.sourceMapSource !== undefined) {\n compilation.updateAsset(sourceMapName, new RawSource(stamped.sourceMapSource));\n }\n }\n}\n\nfunction createSentryWebpackPlugin(userOptions: SentryWebpackPluginOptions = {}) {\n const sentryBuildPluginManager = createSentryBuildPluginManager(userOptions, {\n loggerPrefix: userOptions._metaOptions?.loggerPrefixOverride ?? '[sentry-webpack-plugin]',\n buildTool: 'webpack',\n buildToolMajorVersion: getWebpackMajorVersion(),\n });\n\n const {\n logger,\n normalizedOptions: options,\n bundleSizeOptimizationReplacementValues: replacementValues,\n bundleMetadata,\n createDependencyOnBuildArtifacts,\n } = sentryBuildPluginManager;\n\n if (options.disable) {\n return {\n apply() {\n // noop plugin\n },\n };\n }\n\n if (process.cwd().match(/\\\\node_modules\\\\|\\/node_modules\\//)) {\n logger.warn('Running Sentry plugin from within a `node_modules` folder. Some features may not work.');\n }\n\n const sourcemapsEnabled = options.sourcemaps?.disable !== true;\n const releaseInjectionCode = new CodeInjection();\n const chunkInjectionCode = new CodeInjection();\n\n if (!options.release.inject) {\n logger.debug('Release injection disabled via `release.inject` option. Will not inject release.');\n } else if (!options.release.name) {\n logger.debug(\n 'No release name provided. Will not inject release. Please set the `release.name` option to identify your release.',\n );\n } else {\n releaseInjectionCode.append(\n generateReleaseInjectorCode({\n release: options.release.name,\n injectBuildInformation: options._experiments.injectBuildInformation || false,\n }),\n );\n }\n\n if (Object.keys(bundleMetadata).length > 0) {\n chunkInjectionCode.append(generateModuleMetadataInjectorCode(bundleMetadata));\n }\n\n const transformAnnotations = options.reactComponentAnnotation?.enabled\n ? createComponentNameAnnotateHooks(\n options.reactComponentAnnotation?.ignoredComponents || [],\n !!options.reactComponentAnnotation?._experimentalInjectIntoHtml,\n { logger },\n )\n : undefined;\n\n const transformReplace = Object.keys(replacementValues).length > 0;\n\n function addCodeInjection(compiler: WebpackCompiler): void {\n if (releaseInjectionCode.isEmpty() && chunkInjectionCode.isEmpty() && !sourcemapsEnabled) {\n return;\n }\n\n const ReplaceSource = compiler.webpack?.sources?.ReplaceSource;\n const processAssetsStage = compiler.webpack?.Compilation?.PROCESS_ASSETS_STAGE_ADDITIONS;\n\n if (!ReplaceSource || processAssetsStage === undefined) {\n logger.warn(\n 'Webpack sources are not available. Skipping code injection. This usually means webpack is not properly configured.',\n );\n return;\n }\n\n compiler.hooks.compilation.tap('sentry-webpack-plugin-injection', compilation => {\n compilation.hooks.processAssets.tap(\n {\n name: 'sentry-webpack-plugin-injection',\n stage: processAssetsStage,\n },\n assets => {\n const injectedAssets = new Set<string>();\n\n for (const chunk of compilation.chunks) {\n for (const assetName of chunk.files) {\n if (injectedAssets.has(assetName) || !WEBPACK_JAVASCRIPT_ASSET_REGEX.test(assetName)) {\n continue;\n }\n\n const source = assets[assetName];\n if (!source) {\n continue;\n }\n injectedAssets.add(assetName);\n\n const sourceContents = source.source();\n const code = typeof sourceContents === 'string' ? sourceContents : Buffer.from(sourceContents).toString();\n const codeToInject = new CodeInjection();\n if (chunk.canBeInitial?.() ?? true) {\n codeToInject.append(releaseInjectionCode);\n }\n codeToInject.append(chunkInjectionCode);\n if (sourcemapsEnabled) {\n const hash = chunk.contentHash?.javascript ?? chunk.hash;\n codeToInject.append(getDebugIdSnippet(hash ? stringToUUID(hash) : randomUUID()));\n }\n\n const injectionPosition = getCodeInjectionPosition(code);\n const injection = injectionPosition === code.length ? `\\n${codeToInject.code()}` : codeToInject.code();\n const updatedSource = new ReplaceSource(source);\n updatedSource.insert(injectionPosition, injection);\n compilation.updateAsset(assetName, updatedSource);\n }\n }\n },\n );\n });\n }\n\n return {\n apply(compiler: WebpackCompiler) {\n void sentryBuildPluginManager.telemetry.emitBundlerPluginExecutionSignal().catch(() => {\n // Telemetry failures are acceptable\n });\n\n const { DefinePlugin } = compiler.webpack ?? {};\n\n // BannerPlugin prepends executable code before directive prologues.\n addCodeInjection(compiler);\n\n // The upload routine (which stamps debug IDs into temp copies of the artifacts) is skipped\n // with `disable-upload`, so the emitted artifacts get stamped in the asset pipeline instead.\n if (sourcemapsEnabled && options.sourcemaps?.disable === 'disable-upload') {\n const RawSource = compiler.webpack?.sources?.RawSource;\n // Right after source map generation (and thus after minification, which would strip the comment),\n // so later stages (real content hashing, subresource integrity) see the final assets.\n const stage = (compiler.webpack?.Compilation?.PROCESS_ASSETS_STAGE_DEV_TOOLING ?? 500) + 1;\n\n if (!RawSource) {\n logger.warn(\n 'Webpack sources are not available. Skipping debug ID injection into emitted source maps. This usually means webpack is not properly configured.',\n );\n } else {\n compiler.hooks.thisCompilation.tap('sentry-webpack-plugin', compilation => {\n compilation.hooks.processAssets.tap({ name: 'sentry-webpack-plugin', stage }, () => {\n addDebugIdsToAssets(compilation, RawSource);\n });\n });\n }\n }\n\n // Add DefinePlugin for bundle size optimizations\n if (transformReplace && DefinePlugin) {\n compiler.options.plugins = compiler.options.plugins || [];\n compiler.options.plugins.push(new DefinePlugin(replacementValues));\n }\n\n // Add component name annotation transform\n if (transformAnnotations?.transform) {\n compiler.options.module = compiler.options.module || {};\n compiler.options.module.rules = compiler.options.module.rules || [];\n compiler.options.module.rules.unshift({\n test: /\\.[jt]sx$/,\n exclude: /node_modules/,\n enforce: 'pre',\n use: [\n {\n loader: COMPONENT_ANNOTATION_LOADER,\n options: {\n transform: transformAnnotations.transform,\n },\n },\n ],\n });\n }\n\n compiler.hooks.afterEmit.tapAsync(\n 'sentry-webpack-plugin',\n (compilation: WebpackCompilation, callback: (err?: Error) => void) => {\n const freeGlobalDependencyOnBuildArtifacts = createDependencyOnBuildArtifacts();\n const upload = createDebugIdUploadFunction({ sentryBuildPluginManager });\n\n const run = async (): Promise<void> => {\n try {\n await sentryBuildPluginManager.createRelease();\n if (sourcemapsEnabled && options.sourcemaps?.disable !== 'disable-upload') {\n const outputPath = compilation.outputOptions.path ?? path.resolve();\n const buildArtifacts = Object.keys(compilation.assets).map(asset => path.join(outputPath, asset));\n await upload(buildArtifacts);\n }\n } finally {\n freeGlobalDependencyOnBuildArtifacts();\n await sentryBuildPluginManager.deleteArtifacts();\n }\n };\n\n run().then(\n () => callback(),\n (err: Error) => callback(err),\n );\n },\n );\n\n if (userOptions._experiments?.forceExitOnBuildCompletion && compiler.options.mode === 'production') {\n compiler.hooks.done.tap('sentry-webpack-plugin', () => {\n setTimeout(() => {\n logger.debug('Exiting process after debug file upload');\n process.exit(0);\n });\n });\n }\n },\n };\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const sentryWebpackPlugin: (options?: SentryWebpackPluginOptions) => any = createSentryWebpackPlugin;\n\nexport type SentryWebpackPluginOptions = Options & {\n _experiments?: Options['_experiments'] & {\n /**\n * If enabled, the webpack plugin will exit the build process after the build completes.\n * Use this with caution, as it will terminate the process.\n *\n * More information: https://github.com/getsentry/sentry-javascript-bundler-plugins/issues/345\n *\n * @default false\n */\n forceExitOnBuildCompletion?: boolean;\n };\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAqBA,MAAM,IAAA,GAAO,aAAA,CAAc,MAAA,CAAA,IAAA,CAAY,GAAG,CAAA;AAO1C,IAAI,2BAAA;AACJ,IAAI;AACF,EAAA,2BAAA,GAA8B,IAAA,CAAK,QAAQ,wCAAwC,CAAA;AACrF,CAAA,CAAA,MAAQ;AAIN,EAAA,MAAM,UAAU,IAAA,CAAK,OAAA,CAAQ,aAAA,CAAc,MAAA,CAAA,IAAA,CAAY,GAAG,CAAC,CAAA;AAE3D,EAAA,2BAAA,GAA8B,IAAA,CAAK,OAAA,CAAQ,OAAA,EAAS,mCAAmC,CAAA;AACzF;AAmBA,MAAM,8BAAA,GAAiC,6DAAA;AA6EvC,SAAS,sBAAA,GAA6C;AACpD,EAAA,IAAI;AACF,IAAA,MAAM,OAAA,GAAU,KAAK,SAAS,CAAA;AA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Q;AAClE,gBAAA,MAAM,cAAA,GAAiB,MAAA,CAAO,IAAA,CAAK,WAAA,CAAY,MAAM,CAAA,CAAE,GAAA,CAAI,CAAA,KAAA,KAAS,IAAA,CAAK,IAAA,CAAK,UAAA,EAAY,KAAK,CAAC,CAAA;AAChG,gBAAA,MAAM,OAAO,cAAc,CAAA;AAAA,cAC7B;AAAA,YACF,CAAA,SAAE;AACA,cAAA,oCAAA,EAAqC;AACrC,cAAA,MAAM,yBAAyB,eAAA,EAAgB;AAAA,YACjD;AAAA,UACF,CAAA;AAEA,UAAA,GAAA,EAAI,CAAE,IAAA;AAAA,YACJ,MAAM,QAAA,EAAS;AAAA,YACf,CAAC,GAAA,KAAe,QAAA,CAAS,GAAG;AAAA,WAC9B;AAAA,QACF;AAAA,OACF;AAEA,MAAA,IAAI,YAAY,YAAA,EAAc,0BAAA,IAA8B,QAAA,CAAS,OAAA,CAAQ,SAAS,YAAA,EAAc;AAClG,QAAA,QAAA,CAAS,KAAA,CAAM,IAAA,CAAK,GAAA,CAAI,uBAAA,EAAyB,MAAM;AACrD,UAAA,UAAA,CAAW,MAAM;AACf,YAAA,MAAA,CAAO,MAAM,yCAAyC,CAAA;AACtD,YAAA,OAAA,CAAQ,KAAK,CAAC,CAAA;AAAA,UAChB,CAAC,CAAA;AAAA,QACH,CAAC,CAAA;AAAA,MACH;AAAA,IACF;AAAA,GACF;AACF;AAGO,MAAM,mBAAA,GAAqE;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/webpack/index.ts"],"sourcesContent":["/* oxlint-disable max-lines */\n\nimport type { Options, SourceMapDecision, SourceMapKind, UploadStaging } from '../core/index';\nimport {\n createSentryBuildPluginManager,\n generateReleaseInjectorCode,\n generateModuleMetadataInjectorCode,\n stringToUUID,\n createComponentNameAnnotateHooks,\n CodeInjection,\n getDebugIdSnippet,\n createDebugIdUploadFunction,\n getCodeInjectionPosition,\n isJsFile,\n stampDebugId,\n} from '../core/index';\nimport * as path from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { createRequire } from 'node:module';\nimport { randomUUID } from 'node:crypto';\n\nconst _req = createRequire(import.meta.url);\n\n// Resolve the loader path via the package's own exports.\n// This module may end up in a shared chunk (_chunks/) whose import.meta.url\n// does not point to the webpack/ directory where the transform file lives, so\n// a path-relative lookup would fail. Using require.resolve on the package export\n// always finds the correct installed file regardless of chunk placement.\nlet COMPONENT_ANNOTATION_LOADER: string;\ntry {\n COMPONENT_ANNOTATION_LOADER = _req.resolve('@sentry/bundler-plugins/webpack-loader');\n} catch {\n // Fallback for non-packaged environments (e.g., monorepo source runs without dist)\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore Rollup transpiles import.meta for us for CJS\n const dirname = path.dirname(fileURLToPath(import.meta.url));\n // The Rollup build emits `.js` for both CJS and ESM, so the extension is the same in both.\n COMPONENT_ANNOTATION_LOADER = path.resolve(dirname, 'component-annotation-transform.js');\n}\n\ntype PluginClass = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (options: any): unknown;\n};\n\ntype WebpackSource = {\n source: () => string | Buffer;\n};\n\ntype WebpackRawSource = {\n new (source: string): WebpackSource;\n};\n\ntype WebpackReplaceSource = WebpackSource & {\n insert: (position: number, value: string) => void;\n};\n\nconst WEBPACK_JAVASCRIPT_ASSET_REGEX = /\\.(?:js|ts|jsx|tsx|mjs|cjs|mts|cts)(?:\\?[^?]*)?(?:#[^#]*)?$/;\n\ntype WebpackAsset = {\n name: string;\n source: WebpackSource;\n info: {\n related?: {\n sourceMap?: string | string[];\n };\n };\n};\n\ntype WebpackCompiler = {\n options: {\n plugins?: unknown[];\n mode?: string;\n devtool?: string | false;\n module?: {\n rules?: unknown[];\n };\n };\n hooks: {\n compilation: {\n tap: (name: string, callback: (compilation: WebpackCompilation) => void) => void;\n };\n thisCompilation: {\n tap: (name: string, callback: (compilation: WebpackCompilation) => void) => void;\n };\n emit: {\n tap: (name: string, callback: (compilation: WebpackCompilation) => void) => void;\n };\n afterEmit: {\n tapAsync: (name: string, callback: (compilation: WebpackCompilation, cb: () => void) => void) => void;\n };\n done: {\n tap: (name: string, callback: () => void) => void;\n };\n failed?: {\n tap: (name: string, callback: () => void) => void;\n };\n };\n webpack?: {\n DefinePlugin?: PluginClass;\n Compilation?: {\n PROCESS_ASSETS_STAGE_ADDITIONS?: number;\n PROCESS_ASSETS_STAGE_DEV_TOOLING?: number;\n PROCESS_ASSETS_STAGE_REPORT?: number;\n };\n sources?: {\n RawSource?: WebpackRawSource;\n ReplaceSource?: new (source: WebpackSource) => WebpackReplaceSource;\n };\n };\n};\n\ntype WebpackCompilation = {\n chunks: Iterable<{\n files: Iterable<string>;\n hash?: string;\n contentHash?: { javascript?: string };\n canBeInitial?: () => boolean;\n }>;\n outputOptions: {\n path?: string;\n };\n assets: Record<string, unknown>;\n getAssets: () => WebpackAsset[];\n getAsset: (name: string) => WebpackAsset | undefined;\n updateAsset: (name: string, source: WebpackSource) => void;\n deleteAsset: (name: string) => void;\n hooks: {\n processAssets: {\n tap: (\n options: { name: string; stage: number },\n callback: (assets: Record<string, WebpackSource>) => void,\n ) => void;\n tapPromise: (options: { name: string; stage: number }, callback: () => Promise<void>) => void;\n };\n };\n};\n\n/**\n * Maps webpack's `devtool` onto the plugin's source map kinds. A user who sets `devtool: false`\n * and adds a `SourceMapDevToolPlugin` manages source maps themselves.\n */\nfunction sourceMapKindFromDevtool(compiler: WebpackCompiler): SourceMapKind | undefined {\n const devtool = compiler.options.devtool;\n\n if (devtool === undefined) {\n return 'unset';\n }\n if (devtool === false) {\n const hasSourceMapPlugin = compiler.options.plugins?.some(\n plugin =>\n (plugin as { constructor?: { name?: string } } | undefined)?.constructor?.name === 'SourceMapDevToolPlugin',\n );\n return hasSourceMapPlugin ? undefined : 'off';\n }\n // Plain `eval` has no source maps at all.\n if (!devtool.includes('source-map')) {\n return 'off';\n }\n if (devtool.includes('inline') || devtool.includes('eval')) {\n return 'inline';\n }\n if (devtool.includes('hidden')) {\n return 'hidden';\n }\n return 'visible';\n}\n\ntype WebpackModule = {\n version?: string;\n default?: { version?: string };\n};\n\n// Only used for telemetry; `webpack` is an optional peer dependency and may be absent (e.g. rspack).\nfunction getWebpackMajorVersion(): string | undefined {\n try {\n const webpack = _req('webpack') as WebpackModule;\n const version = webpack.version ?? webpack.default?.version;\n return version?.split('.')[0];\n } catch {\n return undefined;\n }\n}\n\n/**\n * Stamps each JS asset's debug ID into the asset itself and its source map asset.\n *\n * Runs after source maps have been generated, so the JS asset no longer needs to carry\n * source map information and can be replaced with a plain `RawSource`.\n */\nfunction addDebugIdsToAssets(compilation: WebpackCompilation, RawSource: WebpackRawSource): void {\n for (const asset of compilation.getAssets()) {\n if (!isJsFile(asset.name)) {\n continue;\n }\n\n const bundleSource = asset.source.source().toString();\n const relatedSourceMap = asset.info.related?.sourceMap;\n const sourceMapName = typeof relatedSourceMap === 'string' ? relatedSourceMap : `${asset.name}.map`;\n const sourceMapAsset = compilation.getAsset(sourceMapName);\n\n const stamped = stampDebugId(bundleSource, sourceMapAsset?.source.source().toString());\n if (!stamped) {\n continue;\n }\n\n compilation.updateAsset(asset.name, new RawSource(stamped.bundleSource));\n if (stamped.sourceMapSource !== undefined) {\n compilation.updateAsset(sourceMapName, new RawSource(stamped.sourceMapSource));\n }\n }\n}\n\n/** Drops a source map asset and its compressed variants from the compilation. */\nfunction deleteSourceMapAssets(compilation: WebpackCompilation, sourceMapName: string): void {\n for (const candidate of compilation.getAssets()) {\n if (candidate.name === sourceMapName || candidate.name.startsWith(`${sourceMapName}.`)) {\n compilation.deleteAsset(candidate.name);\n }\n }\n}\n\n/**\n * Copies each JS asset and its source map into the upload staging folder and drops the source map\n * assets (and their compressed variants) from the compilation, so webpack never emits them.\n *\n * A map the plugin turned on (`pluginEnabledMaps`) never reaches the output, whether or not its\n * asset is uploaded. That covers CSS maps, which `devtool` turns on along with the JS ones. A map\n * the user enabled stays unless it was staged.\n */\nasync function stageSourceMaps(\n compilation: WebpackCompilation,\n staging: UploadStaging,\n logger: { warn: (message: string) => void },\n pluginEnabledMaps: boolean,\n): Promise<void> {\n const outputPath = compilation.outputOptions.path ?? path.resolve();\n\n for (const asset of compilation.getAssets()) {\n const relatedSourceMap = asset.info.related?.sourceMap;\n const sourceMapName = typeof relatedSourceMap === 'string' ? relatedSourceMap : `${asset.name}.map`;\n const sourceMapAsset = compilation.getAsset(sourceMapName);\n if (!sourceMapAsset) {\n continue;\n }\n\n if (!isJsFile(asset.name)) {\n if (pluginEnabledMaps) {\n deleteSourceMapAssets(compilation, sourceMapName);\n }\n continue;\n }\n\n const result = await staging.stage({\n code: asset.source.source().toString(),\n mapSource: sourceMapAsset.source.source().toString(),\n mapDir: path.join(outputPath, path.dirname(sourceMapName)),\n chunkPath: path.join(outputPath, asset.name),\n });\n\n if (result === 'skipped' || result === 'failed') {\n logger.warn(\n pluginEnabledMaps\n ? `Could not prepare ${asset.name} for upload, so it is not uploaded and its source map ${sourceMapName} was removed from the build output.`\n : `Could not prepare ${asset.name} for upload, so its source map ${sourceMapName} stays in the build output.`,\n );\n }\n if (result === 'staged' || pluginEnabledMaps) {\n deleteSourceMapAssets(compilation, sourceMapName);\n }\n }\n}\n\nfunction createSentryWebpackPlugin(userOptions: SentryWebpackPluginOptions = {}) {\n const sentryBuildPluginManager = createSentryBuildPluginManager(userOptions, {\n loggerPrefix: userOptions._metaOptions?.loggerPrefixOverride ?? '[sentry-webpack-plugin]',\n buildTool: 'webpack',\n buildToolMajorVersion: getWebpackMajorVersion(),\n });\n\n const {\n logger,\n normalizedOptions: options,\n bundleSizeOptimizationReplacementValues: replacementValues,\n bundleMetadata,\n createDependencyOnBuildArtifacts,\n } = sentryBuildPluginManager;\n\n if (options.disable) {\n return {\n apply() {\n // noop plugin\n },\n };\n }\n\n if (process.cwd().match(/\\\\node_modules\\\\|\\/node_modules\\//)) {\n logger.warn('Running Sentry plugin from within a `node_modules` folder. Some features may not work.');\n }\n\n const sourcemapsEnabled = options.sourcemaps?.disable !== true;\n const releaseInjectionCode = new CodeInjection();\n const chunkInjectionCode = new CodeInjection();\n\n if (!options.release.inject) {\n logger.debug('Release injection disabled via `release.inject` option. Will not inject release.');\n } else if (!options.release.name) {\n logger.debug(\n 'No release name provided. Will not inject release. Please set the `release.name` option to identify your release.',\n );\n } else {\n releaseInjectionCode.append(\n generateReleaseInjectorCode({\n release: options.release.name,\n injectBuildInformation: options._experiments.injectBuildInformation || false,\n }),\n );\n }\n\n if (Object.keys(bundleMetadata).length > 0) {\n chunkInjectionCode.append(generateModuleMetadataInjectorCode(bundleMetadata));\n }\n\n const transformAnnotations = options.reactComponentAnnotation?.enabled\n ? createComponentNameAnnotateHooks(\n options.reactComponentAnnotation?.ignoredComponents || [],\n !!options.reactComponentAnnotation?._experimentalInjectIntoHtml,\n { logger },\n )\n : undefined;\n\n const transformReplace = Object.keys(replacementValues).length > 0;\n\n function decideSourceMaps(compiler: WebpackCompiler): { kind?: SourceMapKind; decision: SourceMapDecision } {\n const kind = compiler.options.mode === 'development' ? undefined : sourceMapKindFromDevtool(compiler);\n if (kind === undefined) {\n return { decision: { enableHidden: false, deleteAfterUpload: false } };\n }\n\n const decision = sentryBuildPluginManager.sourceMaps.decide(kind);\n\n if (decision.enableHidden) {\n compiler.options.devtool = kind === 'visible' ? `hidden-${compiler.options.devtool}` : 'hidden-source-map';\n }\n\n return { kind, decision };\n }\n\n function addCodeInjection(compiler: WebpackCompiler): void {\n if (releaseInjectionCode.isEmpty() && chunkInjectionCode.isEmpty() && !sourcemapsEnabled) {\n return;\n }\n\n const ReplaceSource = compiler.webpack?.sources?.ReplaceSource;\n const processAssetsStage = compiler.webpack?.Compilation?.PROCESS_ASSETS_STAGE_ADDITIONS;\n\n if (!ReplaceSource || processAssetsStage === undefined) {\n logger.warn(\n 'Webpack sources are not available. Skipping code injection. This usually means webpack is not properly configured.',\n );\n return;\n }\n\n compiler.hooks.compilation.tap('sentry-webpack-plugin-injection', compilation => {\n compilation.hooks.processAssets.tap(\n {\n name: 'sentry-webpack-plugin-injection',\n stage: processAssetsStage,\n },\n assets => {\n const injectedAssets = new Set<string>();\n\n for (const chunk of compilation.chunks) {\n for (const assetName of chunk.files) {\n if (injectedAssets.has(assetName) || !WEBPACK_JAVASCRIPT_ASSET_REGEX.test(assetName)) {\n continue;\n }\n\n const source = assets[assetName];\n if (!source) {\n continue;\n }\n injectedAssets.add(assetName);\n\n const sourceContents = source.source();\n const code = typeof sourceContents === 'string' ? sourceContents : Buffer.from(sourceContents).toString();\n const codeToInject = new CodeInjection();\n if (chunk.canBeInitial?.() ?? true) {\n codeToInject.append(releaseInjectionCode);\n }\n codeToInject.append(chunkInjectionCode);\n if (sourcemapsEnabled) {\n const hash = chunk.contentHash?.javascript ?? chunk.hash;\n codeToInject.append(getDebugIdSnippet(hash ? stringToUUID(hash) : randomUUID()));\n }\n\n const injectionPosition = getCodeInjectionPosition(code);\n const injection = injectionPosition === code.length ? `\\n${codeToInject.code()}` : codeToInject.code();\n const updatedSource = new ReplaceSource(source);\n updatedSource.insert(injectionPosition, injection);\n compilation.updateAsset(assetName, updatedSource);\n }\n }\n },\n );\n });\n }\n\n return {\n apply(compiler: WebpackCompiler) {\n void sentryBuildPluginManager.telemetry.emitBundlerPluginExecutionSignal().catch(() => {\n // Telemetry failures are acceptable\n });\n\n const { DefinePlugin } = compiler.webpack ?? {};\n\n // One plugin instance can serve several compilers (`MultiCompiler`) and\n // a compiler several compilations (watch mode), so nothing is shared.\n const { kind: sourceMapKind, decision: sourceMapDecision } = decideSourceMaps(compiler);\n const pendingStagings = new Map<WebpackCompilation, UploadStaging>();\n\n if (sourceMapDecision.deleteAfterUpload) {\n // After `RealContentHashPlugin` rewrote the hash placeholders, so the staged\n // JS equals the emitted file and `[contenthash]` names are final.\n const stage = (compiler.webpack?.Compilation?.PROCESS_ASSETS_STAGE_REPORT ?? 5000) + 1;\n\n compiler.hooks.thisCompilation.tap('sentry-webpack-plugin', compilation => {\n compilation.hooks.processAssets.tapPromise({ name: 'sentry-webpack-plugin', stage }, async () => {\n const staging = await sentryBuildPluginManager.createUploadStaging();\n pendingStagings.set(compilation, staging);\n await stageSourceMaps(compilation, staging, logger, sourceMapKind === 'unset');\n });\n });\n\n // A staging that `afterEmit` never took belongs to a compilation that\n // failed before emitting, or to one whose assets were emitted without\n // their maps because an earlier `afterEmit` tap failed. Only the\n // second kind has no other copy of the maps.\n const emittedCompilations = new Set<WebpackCompilation>();\n compiler.hooks.emit.tap('sentry-webpack-plugin', compilation => {\n emittedCompilations.add(compilation);\n });\n const settlePendingStagings = (): void => {\n for (const [compilation, staging] of pendingStagings) {\n if (emittedCompilations.has(compilation)) {\n void staging.keep('The source map upload did not run.');\n } else {\n void staging.discard();\n }\n }\n pendingStagings.clear();\n emittedCompilations.clear();\n };\n compiler.hooks.done.tap('sentry-webpack-plugin', settlePendingStagings);\n compiler.hooks.failed?.tap('sentry-webpack-plugin', settlePendingStagings);\n }\n\n // BannerPlugin prepends executable code before directive prologues.\n addCodeInjection(compiler);\n\n // The upload routine (which stamps debug IDs into temp copies of the artifacts) is skipped\n // with `disable-upload`, so the emitted artifacts get stamped in the asset pipeline instead.\n if (sourcemapsEnabled && options.sourcemaps?.disable === 'disable-upload') {\n const RawSource = compiler.webpack?.sources?.RawSource;\n // Right after source map generation (and thus after minification, which would strip the comment),\n // so later stages (real content hashing, subresource integrity) see the final assets.\n const stage = (compiler.webpack?.Compilation?.PROCESS_ASSETS_STAGE_DEV_TOOLING ?? 500) + 1;\n\n if (!RawSource) {\n logger.warn(\n 'Webpack sources are not available. Skipping debug ID injection into emitted source maps. This usually means webpack is not properly configured.',\n );\n } else {\n compiler.hooks.thisCompilation.tap('sentry-webpack-plugin', compilation => {\n compilation.hooks.processAssets.tap({ name: 'sentry-webpack-plugin', stage }, () => {\n addDebugIdsToAssets(compilation, RawSource);\n });\n });\n }\n }\n\n // Add DefinePlugin for bundle size optimizations\n if (transformReplace && DefinePlugin) {\n compiler.options.plugins = compiler.options.plugins || [];\n compiler.options.plugins.push(new DefinePlugin(replacementValues));\n }\n\n // Add component name annotation transform\n if (transformAnnotations?.transform) {\n compiler.options.module = compiler.options.module || {};\n compiler.options.module.rules = compiler.options.module.rules || [];\n compiler.options.module.rules.unshift({\n test: /\\.[jt]sx$/,\n exclude: /node_modules/,\n enforce: 'pre',\n use: [\n {\n loader: COMPONENT_ANNOTATION_LOADER,\n options: {\n transform: transformAnnotations.transform,\n },\n },\n ],\n });\n }\n\n compiler.hooks.afterEmit.tapAsync(\n 'sentry-webpack-plugin',\n (compilation: WebpackCompilation, callback: (err?: Error) => void) => {\n const freeGlobalDependencyOnBuildArtifacts = createDependencyOnBuildArtifacts();\n const upload = createDebugIdUploadFunction({ sentryBuildPluginManager });\n\n const staging = pendingStagings.get(compilation);\n pendingStagings.delete(compilation);\n let stagingHandedOver = false;\n\n const run = async (): Promise<void> => {\n try {\n await sentryBuildPluginManager.createRelease();\n if (sourcemapsEnabled && options.sourcemaps?.disable !== 'disable-upload') {\n const outputPath = compilation.outputOptions.path ?? path.resolve();\n const buildArtifacts = Object.keys(compilation.assets).map(asset => path.join(outputPath, asset));\n stagingHandedOver = true;\n await upload(buildArtifacts, { staging });\n } else {\n stagingHandedOver = true;\n await staging?.discard();\n }\n } catch (e) {\n if (!stagingHandedOver) {\n await staging?.keep('The source map upload did not run.');\n }\n throw e;\n } finally {\n freeGlobalDependencyOnBuildArtifacts();\n await sentryBuildPluginManager.deleteArtifacts();\n }\n };\n\n run().then(\n () => callback(),\n (err: Error) => callback(err),\n );\n },\n );\n\n if (userOptions._experiments?.forceExitOnBuildCompletion && compiler.options.mode === 'production') {\n compiler.hooks.done.tap('sentry-webpack-plugin', () => {\n setTimeout(() => {\n logger.debug('Exiting process after debug file upload');\n process.exit(0);\n });\n });\n }\n },\n };\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const sentryWebpackPlugin: (options?: SentryWebpackPluginOptions) => any = createSentryWebpackPlugin;\n\nexport type SentryWebpackPluginOptions = Options & {\n _experiments?: Options['_experiments'] & {\n /**\n * If enabled, the webpack plugin will exit the build process after the build completes.\n * Use this with caution, as it will terminate the process.\n *\n * More information: https://github.com/getsentry/sentry-javascript-bundler-plugins/issues/345\n *\n * @default false\n */\n forceExitOnBuildCompletion?: boolean;\n };\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAqBA,MAAM,IAAA,GAAO,aAAA,CAAc,MAAA,CAAA,IAAA,CAAY,GAAG,CAAA;AAO1C,IAAI,2BAAA;AACJ,IAAI;AACF,EAAA,2BAAA,GAA8B,IAAA,CAAK,QAAQ,wCAAwC,CAAA;AACrF,CAAA,CAAA,MAAQ;AAIN,EAAA,MAAM,UAAU,IAAA,CAAK,OAAA,CAAQ,aAAA,CAAc,MAAA,CAAA,IAAA,CAAY,GAAG,CAAC,CAAA;AAE3D,EAAA,2BAAA,GAA8B,IAAA,CAAK,OAAA,CAAQ,OAAA,EAAS,mCAAmC,CAAA;AACzF;AAmBA,MAAM,8BAAA,GAAiC,6DAAA;AAqFvC,SAAS,yBAAyB,QAAA,EAAsD;AACtF,EAAA,MAAM,OAAA,GAAU,SAAS,OAAA,CAAQ,OAAA;AAEjC,EAAA,IAAI,YAAY,MAAA,EAAW;AACzB,IAAA,OAAO,OAAA;AAAA,EACT;AACA,EAAA,IAAI,YAAY,KAAA,EAAO;AACrB,IAAA,MAAM,kBAAA,GAAqB,QAAA,CAAS,OAAA,CAAQ,OAAA,EAAS,IAAA;AAAA,MACnD,CAAA,MAAA,KACG,MAAA,EAA4D,WAAA,EAAa,IAAA,KAAS;AAAA,KACvF;AACA,IAAA,OAAO,qBAAqB,MAAA,GAAY,KAAA;AAAA,EAC1C;AAEA,EAAA,IAAI,CAAC,OAAA,CAAQ,QAAA,CAAS,YAAY,CAAA,EAAG;AACnC,IAAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,IAAI,QAAQ,QAAA,CAAS,QAAQ,KAAK,OAAA,CAAQ,QAAA,CAAS,MAAM,CAAA,EAAG;AAC1D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A,YACR,CAAA,SAAE;AACA,cAAA,oCAAA,EAAqC;AACrC,cAAA,MAAM,yBAAyB,eAAA,EAAgB;AAAA,YACjD;AAAA,UACF,CAAA;AAEA,UAAA,GAAA,EAAI,CAAE,IAAA;AAAA,YACJ,MAAM,QAAA,EAAS;AAAA,YACf,CAAC,GAAA,KAAe,QAAA,CAAS,GAAG;AAAA,WAC9B;AAAA,QACF;AAAA,OACF;AAEA,MAAA,IAAI,YAAY,YAAA,EAAc,0BAAA,IAA8B,QAAA,CAAS,OAAA,CAAQ,SAAS,YAAA,EAAc;AAClG,QAAA,QAAA,CAAS,KAAA,CAAM,IAAA,CAAK,GAAA,CAAI,uBAAA,EAAyB,MAAM;AACrD,UAAA,UAAA,CAAW,MAAM;AACf,YAAA,MAAA,CAAO,MAAM,yCAAyC,CAAA;AACtD,YAAA,OAAA,CAAQ,KAAK,CAAC,CAAA;AAAA,UAChB,CAAC,CAAA;AAAA,QACH,CAAC,CAAA;AAAA,MACH;AAAA,IACF;AAAA,GACF;AACF;AAGO,MAAM,mBAAA,GAAqE;;;;"}
|
|
@@ -2,6 +2,7 @@ import type { NormalizedOptions } from './options-mapping';
|
|
|
2
2
|
import type { Logger } from './logger';
|
|
3
3
|
import type { Options, SentrySDKBuildFlags } from './types';
|
|
4
4
|
import type { SourceMapDecision, SourceMapKind } from './sourcemap-settings';
|
|
5
|
+
import type { UploadFilter } from './upload-filter';
|
|
5
6
|
/** @internal Exported for testing only. */
|
|
6
7
|
export declare function _resetDeployedReleasesForTesting(): void;
|
|
7
8
|
/**
|
|
@@ -23,14 +24,15 @@ export type UploadStaging = {
|
|
|
23
24
|
* Stamps the debug ID into the chunk and its source map and writes both into the folder.
|
|
24
25
|
*
|
|
25
26
|
* `mapSource` is `undefined` when the chunk has no separate source map. `mapDir` is the directory
|
|
26
|
-
* the map would be written to and is passed to the `rewriteSources` hook.
|
|
27
|
+
* the map would be written to and is passed to the `rewriteSources` hook. `chunkPath` is where
|
|
28
|
+
* the chunk is written; `sourcemaps.assets` and `sourcemaps.ignore` are matched against it.
|
|
27
29
|
*/
|
|
28
30
|
stage(input: {
|
|
29
31
|
code: string;
|
|
30
32
|
mapSource: string | undefined;
|
|
31
33
|
mapDir: string;
|
|
32
|
-
|
|
33
|
-
}): Promise<'staged' | 'skipped' | 'failed'>;
|
|
34
|
+
chunkPath: string;
|
|
35
|
+
}): Promise<'staged' | 'skipped' | 'excluded' | 'failed'>;
|
|
34
36
|
/** Removes the folder. Call this when no upload will consume it. */
|
|
35
37
|
discard(): Promise<void>;
|
|
36
38
|
/**
|
|
@@ -106,9 +108,19 @@ export type SentryBuildPluginManager = {
|
|
|
106
108
|
uploadPossible: boolean;
|
|
107
109
|
/**
|
|
108
110
|
* Decides how the plugin treats the user's source map setting (see `decideSourceMapHandling`).
|
|
109
|
-
* Logs the decision's message once per message
|
|
111
|
+
* Logs the decision's message once per message, unless `log` is `false`.
|
|
110
112
|
*/
|
|
111
|
-
decide(kind: SourceMapKind
|
|
113
|
+
decide(kind: SourceMapKind, options?: {
|
|
114
|
+
log?: boolean;
|
|
115
|
+
}): SourceMapDecision;
|
|
116
|
+
/** Logs the decision's message, once per message. */
|
|
117
|
+
logDecision(decision: SourceMapDecision): void;
|
|
118
|
+
/**
|
|
119
|
+
* Whether a file of the build output is uploaded, for files that are not on disk yet. Mirrors
|
|
120
|
+
* the glob of the upload from disk: it must match `sourcemaps.assets` (all files when unset)
|
|
121
|
+
* and none of `sourcemaps.ignore`.
|
|
122
|
+
*/
|
|
123
|
+
shouldUpload: UploadFilter;
|
|
112
124
|
};
|
|
113
125
|
/**
|
|
114
126
|
* Will delete artifacts based on the passed `sourcemaps.filesToDeleteAfterUpload` option.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-plugin-manager.d.ts","sourceRoot":"","sources":["../../../src/core/build-plugin-manager.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,O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,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjC,gCAAgC,EAAE,MAAM,MAAM,IAAI,CAAC;CACpD,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,WAAW,EAAE,OAAO,EACpB,wBAAwB,EAAE;IACxB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB,GACA,wBAAwB,CAyyB1B"}
|
|
@@ -44,4 +44,5 @@ export type { SentryBuildPluginManager, UploadStaging } from './build-plugin-man
|
|
|
44
44
|
export { createDebugIdUploadFunction, addDebugIdToEmittedArtifacts, stampDebugId } from './debug-id-upload';
|
|
45
45
|
export { decideSourceMapHandling } from './sourcemap-settings';
|
|
46
46
|
export type { SourceMapDecision, SourceMapKind } from './sourcemap-settings';
|
|
47
|
+
export type { UploadFilter } from './upload-filter';
|
|
47
48
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAkD,MAAM,SAAS,CAAC;AAExF;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAGlD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAYxG;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AA8BD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE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IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AA8BD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,SAAS,CAAC,EACnD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,GAAG,SAAS,GACjD,OAAO,CAMT;AAED,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,OAAO,EAAE,gCAAgC,EAAE,MAAM,4BAA4B,CAAC;AAE9E,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,CAIhE;AAED,YAAY,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,YAAY,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,EACL,aAAa,EACb,yBAAyB,EACzB,YAAY,EACZ,2BAA2B,EAC3B,kCAAkC,GACnC,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AACxE,YAAY,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,EAAE,2BAA2B,EAAE,4BAA4B,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC5G,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC7E,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -177,6 +177,13 @@ export interface Options {
|
|
|
177
177
|
* setting was not set. `true` also removes source maps you enabled yourself. `false` never removes them; the plugin
|
|
178
178
|
* still turns on hidden source maps when the setting is not set, so they can be uploaded.
|
|
179
179
|
*
|
|
180
|
+
* When the plugin turned source maps on, none of them reach the build output, not even those of chunks that
|
|
181
|
+
* `sourcemaps.assets` or `sourcemaps.ignore` keep out of the upload. Source maps you enabled yourself are only
|
|
182
|
+
* removed for the JavaScript chunks that were uploaded; excluded chunks keep theirs.
|
|
183
|
+
*
|
|
184
|
+
* With webpack's array form of `devtool`, `true` replaces the array with one hidden source map setting for
|
|
185
|
+
* all asset types, because webpack hides the array from plugins.
|
|
186
|
+
*
|
|
180
187
|
* With Rollup, Vite and webpack the removed source maps are never written to the output directory. With esbuild
|
|
181
188
|
* they are deleted after the upload.
|
|
182
189
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEjG,YAAY,EACV,cAAc,EACd,sBAAsB,EACtB,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,OAAO;IACtB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE5B;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE/B;;;;;;;OAOG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;;;;;;;;;;;OAcG;IACH,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,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,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NormalizedOptions } from './options-mapping';
|
|
2
|
+
export type UploadFilter = (filePath: string) => boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Mirrors the glob of the upload from disk for files that are not on disk yet: a file is
|
|
5
|
+
* uploaded when it matches one of `sourcemaps.assets` (all files when unset) and none of
|
|
6
|
+
* `sourcemaps.ignore`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function createUploadFilter(options: NormalizedOptions): UploadFilter;
|
|
9
|
+
//# sourceMappingURL=upload-filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-filter.d.ts","sourceRoot":"","sources":["../../../src/core/upload-filter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;AAEzD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,iBAAiB,GAAG,YAAY,CAoB3E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "11.
|
|
1
|
+
export declare const LIB_VERSION = "11.12.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/esbuild/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/esbuild/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AA4FvC,wBAAgB,mBAAmB,CAAC,WAAW,GAAE,OAAY,GAAG,GAAG,CA8OlE;eAGc,mBAAmB;AAClC,YAAY,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -3,6 +3,7 @@ import type { ComponentAnnotationTransformMeta } from '../core/component-annotat
|
|
|
3
3
|
import type { SourceMap } from 'magic-string';
|
|
4
4
|
import MagicString from 'magic-string';
|
|
5
5
|
import { type OutputBundle } from './debug-id-stamping';
|
|
6
|
+
import { type OutputDestinationOptions } from './source-map-handling';
|
|
6
7
|
type TransformResult = {
|
|
7
8
|
code: string;
|
|
8
9
|
map?: SourceMap | string | {
|
|
@@ -14,6 +15,83 @@ type PluginContext = {
|
|
|
14
15
|
rolldownVersion?: string;
|
|
15
16
|
};
|
|
16
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* @ignore - internal plugin factory shared by the Rollup and Vite plugins.
|
|
20
|
+
*
|
|
21
|
+
* `main` carries injection, release creation and the upload. `post` runs last in `generateBundle`,
|
|
22
|
+
* copies chunks and their source maps into the upload staging folder and drops the map assets
|
|
23
|
+
* from the bundle, so the bundler never writes them.
|
|
24
|
+
*/
|
|
25
|
+
export declare function _createRollupPluginInternals(userOptions: Options | undefined, buildTool: 'rollup' | 'vite', buildToolMajorVersion?: string): {
|
|
26
|
+
main: {
|
|
27
|
+
name: string;
|
|
28
|
+
};
|
|
29
|
+
post: undefined;
|
|
30
|
+
} | {
|
|
31
|
+
main: {
|
|
32
|
+
name: string;
|
|
33
|
+
buildStart: () => void;
|
|
34
|
+
transform?: ((code: string, id: string, meta?: ComponentAnnotationTransformMeta) => Promise<TransformResult>) | {
|
|
35
|
+
filter: {
|
|
36
|
+
id: RegExp;
|
|
37
|
+
};
|
|
38
|
+
handler: (code: string, id: string, meta?: ComponentAnnotationTransformMeta) => Promise<TransformResult>;
|
|
39
|
+
} | undefined;
|
|
40
|
+
configResolved: (config: import("../vite/source-map-hooks").ViteResolvedConfig) => void;
|
|
41
|
+
renderChunk: (this: PluginContext | undefined, code: string, chunk: {
|
|
42
|
+
fileName: string;
|
|
43
|
+
facadeModuleId?: string | null;
|
|
44
|
+
isEntry?: boolean;
|
|
45
|
+
}, _?: unknown, meta?: {
|
|
46
|
+
magicString?: MagicString;
|
|
47
|
+
chunks?: Record<string, ChunkGraphNode>;
|
|
48
|
+
}) => {
|
|
49
|
+
code: string;
|
|
50
|
+
map?: SourceMap;
|
|
51
|
+
} | null;
|
|
52
|
+
generateBundle: {
|
|
53
|
+
order: 'pre';
|
|
54
|
+
handler: (this: PluginContext | undefined, _outputOptions: unknown, bundle: OutputBundle) => void;
|
|
55
|
+
};
|
|
56
|
+
writeBundle: (outputOptions: OutputDestinationOptions, bundle: OutputBundle | undefined) => Promise<void>;
|
|
57
|
+
} | {
|
|
58
|
+
name: string;
|
|
59
|
+
buildStart: () => void;
|
|
60
|
+
transform?: ((code: string, id: string, meta?: ComponentAnnotationTransformMeta) => Promise<TransformResult>) | {
|
|
61
|
+
filter: {
|
|
62
|
+
id: RegExp;
|
|
63
|
+
};
|
|
64
|
+
handler: (code: string, id: string, meta?: ComponentAnnotationTransformMeta) => Promise<TransformResult>;
|
|
65
|
+
} | undefined;
|
|
66
|
+
outputOptions: (rawOutputOptions: import("./source-map-handling").OutputOptions) => import("./source-map-handling").OutputOptions | null;
|
|
67
|
+
renderChunk: (this: PluginContext | undefined, code: string, chunk: {
|
|
68
|
+
fileName: string;
|
|
69
|
+
facadeModuleId?: string | null;
|
|
70
|
+
isEntry?: boolean;
|
|
71
|
+
}, _?: unknown, meta?: {
|
|
72
|
+
magicString?: MagicString;
|
|
73
|
+
chunks?: Record<string, ChunkGraphNode>;
|
|
74
|
+
}) => {
|
|
75
|
+
code: string;
|
|
76
|
+
map?: SourceMap;
|
|
77
|
+
} | null;
|
|
78
|
+
generateBundle: {
|
|
79
|
+
order: 'pre';
|
|
80
|
+
handler: (this: PluginContext | undefined, _outputOptions: unknown, bundle: OutputBundle) => void;
|
|
81
|
+
};
|
|
82
|
+
writeBundle: (outputOptions: OutputDestinationOptions, bundle: OutputBundle | undefined) => Promise<void>;
|
|
83
|
+
};
|
|
84
|
+
post: {
|
|
85
|
+
name: string;
|
|
86
|
+
config?: ((userConfig: import("../vite/source-map-hooks").ViteUserConfig, env: {
|
|
87
|
+
command: string;
|
|
88
|
+
}) => import("../vite/source-map-hooks").ViteUserConfig | null) | undefined;
|
|
89
|
+
generateBundle: {
|
|
90
|
+
order: 'post';
|
|
91
|
+
handler(outputOptions: OutputDestinationOptions, bundle: OutputBundle, isWrite?: boolean): Promise<void>;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
};
|
|
17
95
|
/**
|
|
18
96
|
* @ignore - this is the internal plugin factory function only used for the Vite plugin!
|
|
19
97
|
*/
|
|
@@ -28,6 +106,33 @@ export declare function _rollupPluginInternal(userOptions: Options | undefined,
|
|
|
28
106
|
};
|
|
29
107
|
handler: (code: string, id: string, meta?: ComponentAnnotationTransformMeta) => Promise<TransformResult>;
|
|
30
108
|
} | undefined;
|
|
109
|
+
configResolved: (config: import("../vite/source-map-hooks").ViteResolvedConfig) => void;
|
|
110
|
+
renderChunk: (this: PluginContext | undefined, code: string, chunk: {
|
|
111
|
+
fileName: string;
|
|
112
|
+
facadeModuleId?: string | null;
|
|
113
|
+
isEntry?: boolean;
|
|
114
|
+
}, _?: unknown, meta?: {
|
|
115
|
+
magicString?: MagicString;
|
|
116
|
+
chunks?: Record<string, ChunkGraphNode>;
|
|
117
|
+
}) => {
|
|
118
|
+
code: string;
|
|
119
|
+
map?: SourceMap;
|
|
120
|
+
} | null;
|
|
121
|
+
generateBundle: {
|
|
122
|
+
order: 'pre';
|
|
123
|
+
handler: (this: PluginContext | undefined, _outputOptions: unknown, bundle: OutputBundle) => void;
|
|
124
|
+
};
|
|
125
|
+
writeBundle: (outputOptions: OutputDestinationOptions, bundle: OutputBundle | undefined) => Promise<void>;
|
|
126
|
+
} | {
|
|
127
|
+
name: string;
|
|
128
|
+
buildStart: () => void;
|
|
129
|
+
transform?: ((code: string, id: string, meta?: ComponentAnnotationTransformMeta) => Promise<TransformResult>) | {
|
|
130
|
+
filter: {
|
|
131
|
+
id: RegExp;
|
|
132
|
+
};
|
|
133
|
+
handler: (code: string, id: string, meta?: ComponentAnnotationTransformMeta) => Promise<TransformResult>;
|
|
134
|
+
} | undefined;
|
|
135
|
+
outputOptions: (rawOutputOptions: import("./source-map-handling").OutputOptions) => import("./source-map-handling").OutputOptions | null;
|
|
31
136
|
renderChunk: (this: PluginContext | undefined, code: string, chunk: {
|
|
32
137
|
fileName: string;
|
|
33
138
|
facadeModuleId?: string | null;
|
|
@@ -43,12 +148,7 @@ export declare function _rollupPluginInternal(userOptions: Options | undefined,
|
|
|
43
148
|
order: 'pre';
|
|
44
149
|
handler: (this: PluginContext | undefined, _outputOptions: unknown, bundle: OutputBundle) => void;
|
|
45
150
|
};
|
|
46
|
-
writeBundle: (outputOptions:
|
|
47
|
-
dir?: string;
|
|
48
|
-
file?: string;
|
|
49
|
-
}, bundle: {
|
|
50
|
-
[fileName: string]: unknown;
|
|
51
|
-
}) => Promise<void>;
|
|
151
|
+
writeBundle: (outputOptions: OutputDestinationOptions, bundle: OutputBundle | undefined) => Promise<void>;
|
|
52
152
|
};
|
|
53
153
|
export declare function sentryRollupPlugin(userOptions?: Options): any;
|
|
54
154
|
export type { Options as SentryRollupPluginOptions } from '../core';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rollup/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAgBvD,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAC;AACzF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,WAAW,MAAM,cAAc,CAAC;AAIvC,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources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