@sentry/bundler-plugins 11.12.0 → 11.14.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/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/assertClassBrand.js +6 -0
- package/build/cjs/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/checkPrivateRedeclaration.js +5 -0
- package/build/cjs/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateFieldGet2.js +6 -0
- package/build/cjs/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateFieldInitSpec.js +6 -0
- package/build/cjs/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateFieldSet2.js +6 -0
- package/build/cjs/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateMethodInitSpec.js +6 -0
- package/build/cjs/_virtual/_rolldown/runtime.js +22 -0
- package/build/cjs/babel-plugin/component-annotation.js +14 -32
- package/build/cjs/babel-plugin/component-annotation.js.map +1 -1
- package/build/cjs/babel-plugin/constants.js +140 -122
- package/build/cjs/babel-plugin/constants.js.map +1 -1
- package/build/cjs/babel-plugin/experimental.js +204 -307
- package/build/cjs/babel-plugin/experimental.js.map +1 -1
- package/build/cjs/babel-plugin/index.js +315 -437
- package/build/cjs/babel-plugin/index.js.map +1 -1
- package/build/cjs/bun/index.js +81 -117
- package/build/cjs/bun/index.js.map +1 -1
- package/build/cjs/core/build-plugin-manager.js +626 -702
- package/build/cjs/core/build-plugin-manager.js.map +1 -1
- package/build/cjs/core/cli.js +134 -129
- package/build/cjs/core/cli.js.map +1 -1
- package/build/cjs/core/component-annotate-hooks.js +16 -27
- package/build/cjs/core/component-annotate-hooks.js.map +1 -1
- package/build/cjs/core/component-annotation-oxc-ast.js +10 -21
- package/build/cjs/core/component-annotation-oxc-ast.js.map +1 -1
- package/build/cjs/core/component-annotation-oxc-fragments.js +45 -74
- package/build/cjs/core/component-annotation-oxc-fragments.js.map +1 -1
- package/build/cjs/core/component-annotation-oxc-jsx.js +116 -156
- package/build/cjs/core/component-annotation-oxc-jsx.js.map +1 -1
- package/build/cjs/core/component-annotation-oxc-walk.js +62 -123
- package/build/cjs/core/component-annotation-oxc-walk.js.map +1 -1
- package/build/cjs/core/component-annotation-oxc.js +68 -103
- package/build/cjs/core/component-annotation-oxc.js.map +1 -1
- package/build/cjs/core/debug-id-upload.js +223 -234
- package/build/cjs/core/debug-id-upload.js.map +1 -1
- package/build/cjs/core/get-code-injection-position.js +59 -74
- package/build/cjs/core/get-code-injection-position.js.map +1 -1
- package/build/cjs/core/glob.js +9 -7
- package/build/cjs/core/glob.js.map +1 -1
- package/build/cjs/core/index.js +77 -61
- package/build/cjs/core/index.js.map +1 -1
- package/build/cjs/core/logger.js +17 -26
- package/build/cjs/core/logger.js.map +1 -1
- package/build/cjs/core/options-mapping.js +95 -117
- package/build/cjs/core/options-mapping.js.map +1 -1
- package/build/cjs/core/sentry/telemetry.js +90 -105
- package/build/cjs/core/sentry/telemetry.js.map +1 -1
- package/build/cjs/core/sentry/transports.js +92 -99
- package/build/cjs/core/sentry/transports.js.map +1 -1
- package/build/cjs/core/sourcemap-settings.js +98 -61
- package/build/cjs/core/sourcemap-settings.js.map +1 -1
- package/build/cjs/core/upload-filter.js +41 -46
- package/build/cjs/core/upload-filter.js.map +1 -1
- package/build/cjs/core/utils.js +228 -221
- package/build/cjs/core/utils.js.map +1 -1
- package/build/cjs/core/version.js +4 -5
- package/build/cjs/core/version.js.map +1 -1
- package/build/cjs/esbuild/index.js +183 -213
- package/build/cjs/esbuild/index.js.map +1 -1
- package/build/cjs/loader-utils/index.js +5 -10
- package/build/cjs/rollup/debug-id-injection.js +22 -38
- package/build/cjs/rollup/debug-id-injection.js.map +1 -1
- package/build/cjs/rollup/debug-id-stamping.js +14 -24
- package/build/cjs/rollup/debug-id-stamping.js.map +1 -1
- package/build/cjs/rollup/index.js +192 -246
- package/build/cjs/rollup/index.js.map +1 -1
- package/build/cjs/rollup/source-map-handling.js +151 -175
- package/build/cjs/rollup/source-map-handling.js.map +1 -1
- package/build/cjs/vite/index.js +19 -21
- package/build/cjs/vite/index.js.map +1 -1
- package/build/cjs/vite/source-map-hooks.js +112 -89
- package/build/cjs/vite/source-map-hooks.js.map +1 -1
- package/build/cjs/webpack/component-annotation-transform.js +20 -26
- package/build/cjs/webpack/component-annotation-transform.js.map +1 -1
- package/build/cjs/webpack/index.js +271 -340
- package/build/cjs/webpack/index.js.map +1 -1
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/assertClassBrand.js +6 -0
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/checkPrivateRedeclaration.js +5 -0
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateFieldGet2.js +6 -0
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateFieldInitSpec.js +6 -0
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateFieldSet2.js +6 -0
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateMethodInitSpec.js +6 -0
- package/build/esm/_virtual/_rolldown/runtime.js +2 -0
- package/build/esm/babel-plugin/component-annotation.js +13 -29
- package/build/esm/babel-plugin/component-annotation.js.map +1 -1
- package/build/esm/babel-plugin/constants.js +140 -120
- package/build/esm/babel-plugin/constants.js.map +1 -1
- package/build/esm/babel-plugin/experimental.js +204 -305
- package/build/esm/babel-plugin/experimental.js.map +1 -1
- package/build/esm/babel-plugin/index.js +311 -434
- package/build/esm/babel-plugin/index.js.map +1 -1
- package/build/esm/bun/index.js +76 -101
- package/build/esm/bun/index.js.map +1 -1
- package/build/esm/core/build-plugin-manager.js +621 -683
- package/build/esm/core/build-plugin-manager.js.map +1 -1
- package/build/esm/core/cli.js +134 -127
- package/build/esm/core/cli.js.map +1 -1
- package/build/esm/core/component-annotate-hooks.js +16 -25
- package/build/esm/core/component-annotate-hooks.js.map +1 -1
- package/build/esm/core/component-annotation-oxc-ast.js +9 -19
- package/build/esm/core/component-annotation-oxc-ast.js.map +1 -1
- package/build/esm/core/component-annotation-oxc-fragments.js +44 -72
- package/build/esm/core/component-annotation-oxc-fragments.js.map +1 -1
- package/build/esm/core/component-annotation-oxc-jsx.js +115 -154
- package/build/esm/core/component-annotation-oxc-jsx.js.map +1 -1
- package/build/esm/core/component-annotation-oxc-walk.js +61 -121
- package/build/esm/core/component-annotation-oxc-walk.js.map +1 -1
- package/build/esm/core/component-annotation-oxc.js +65 -96
- package/build/esm/core/component-annotation-oxc.js.map +1 -1
- package/build/esm/core/debug-id-upload.js +218 -213
- package/build/esm/core/debug-id-upload.js.map +1 -1
- package/build/esm/core/get-code-injection-position.js +59 -72
- package/build/esm/core/get-code-injection-position.js.map +1 -1
- package/build/esm/core/glob.js +9 -5
- package/build/esm/core/glob.js.map +1 -1
- package/build/esm/core/index.js +62 -47
- package/build/esm/core/index.js.map +1 -1
- package/build/esm/core/logger.js +17 -24
- package/build/esm/core/logger.js.map +1 -1
- package/build/esm/core/options-mapping.js +95 -115
- package/build/esm/core/options-mapping.js.map +1 -1
- package/build/esm/core/sentry/telemetry.js +89 -102
- package/build/esm/core/sentry/telemetry.js.map +1 -1
- package/build/esm/core/sentry/transports.js +90 -83
- package/build/esm/core/sentry/transports.js.map +1 -1
- package/build/esm/core/sourcemap-settings.js +96 -59
- package/build/esm/core/sourcemap-settings.js.map +1 -1
- package/build/esm/core/upload-filter.js +39 -30
- package/build/esm/core/upload-filter.js.map +1 -1
- package/build/esm/core/utils.js +221 -211
- package/build/esm/core/utils.js.map +1 -1
- package/build/esm/core/version.js +4 -3
- package/build/esm/core/version.js.map +1 -1
- package/build/esm/esbuild/index.js +179 -197
- package/build/esm/esbuild/index.js.map +1 -1
- package/build/esm/loader-utils/index.js +4 -3
- package/build/esm/package.json +1 -1
- package/build/esm/rollup/debug-id-injection.js +22 -36
- package/build/esm/rollup/debug-id-injection.js.map +1 -1
- package/build/esm/rollup/debug-id-stamping.js +14 -22
- package/build/esm/rollup/debug-id-stamping.js.map +1 -1
- package/build/esm/rollup/index.js +189 -226
- package/build/esm/rollup/index.js.map +1 -1
- package/build/esm/rollup/source-map-handling.js +149 -159
- package/build/esm/rollup/source-map-handling.js.map +1 -1
- package/build/esm/vite/index.js +19 -18
- package/build/esm/vite/index.js.map +1 -1
- package/build/esm/vite/source-map-hooks.js +109 -72
- package/build/esm/vite/source-map-hooks.js.map +1 -1
- package/build/esm/webpack/component-annotation-transform.js +17 -24
- package/build/esm/webpack/component-annotation-transform.js.map +1 -1
- package/build/esm/webpack/index.js +268 -322
- package/build/esm/webpack/index.js.map +1 -1
- package/build/types/core/build-plugin-manager.d.ts +16 -5
- package/build/types/core/build-plugin-manager.d.ts.map +1 -1
- package/build/types/core/cli.d.ts +6 -1
- package/build/types/core/cli.d.ts.map +1 -1
- package/build/types/core/debug-id-upload.d.ts +7 -4
- package/build/types/core/debug-id-upload.d.ts.map +1 -1
- package/build/types/core/index.d.ts +3 -3
- package/build/types/core/index.d.ts.map +1 -1
- package/build/types/core/options-mapping.d.ts +4 -3
- package/build/types/core/options-mapping.d.ts.map +1 -1
- package/build/types/core/sentry/telemetry.d.ts.map +1 -1
- package/build/types/core/sourcemap-settings.d.ts +10 -1
- package/build/types/core/sourcemap-settings.d.ts.map +1 -1
- package/build/types/core/types.d.ts +25 -1
- package/build/types/core/types.d.ts.map +1 -1
- package/build/types/core/utils.d.ts +4 -0
- package/build/types/core/utils.d.ts.map +1 -1
- package/build/types/core/version.d.ts +1 -1
- package/build/types/esbuild/index.d.ts +2 -2
- package/build/types/esbuild/index.d.ts.map +1 -1
- package/build/types/rollup/index.d.ts +2 -2
- package/build/types/rollup/index.d.ts.map +1 -1
- package/build/types/rollup/source-map-handling.d.ts.map +1 -1
- package/build/types/vite/index.d.ts +3 -3
- package/build/types/vite/index.d.ts.map +1 -1
- package/build/types/vite/source-map-hooks.d.ts.map +1 -1
- package/build/types/webpack/index.d.ts +7 -3
- package/build/types/webpack/index.d.ts.map +1 -1
- package/package.json +8 -15
- package/build/cjs/loader-utils/index.js.map +0 -1
- package/build/esm/loader-utils/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug-id-injection.js","sources":["../../../src/rollup/debug-id-injection.ts"],"sourcesContent":["import { stringToUUID } from '../core';\n\nexport const ROLLDOWN_DEBUG_ID_PLACEHOLDER = 'SENTRY_DEBUG_ID_PLACEHOLDER_00000000';\n\ntype GeneratedChunk = {\n type: 'chunk';\n fileName: string;\n code: string;\n};\n\ntype GeneratedAsset = {\n type: 'asset';\n fileName: string;\n};\n\nexport type GeneratedBundle = Record<string, GeneratedChunk | GeneratedAsset>;\n\nconst SENTRY_DEBUG_ID_IDENTIFIER = '_sentryDebugIdIdentifier';\nconst SENTRY_DEBUG_ID_IDENTIFIER_PREFIX = 'sentry-dbid-';\n\nexport function hasExistingDebugID(code: string): boolean {\n const chunkStartSnippet = code.slice(0, 6000);\n const chunkEndSnippet = code.slice(-500);\n\n return chunkStartSnippet.includes(SENTRY_DEBUG_ID_IDENTIFIER) || chunkEndSnippet.includes('//# debugId=');\n}\n\nexport function getDebugIdForChunk(code: string, isRolldown: boolean): string {\n return isRolldown ? ROLLDOWN_DEBUG_ID_PLACEHOLDER : stringToUUID(code);\n}\n\nfunction replaceAt(code: string, start: number, search: string, replacement: string): string {\n return `${code.slice(0, start)}${replacement}${code.slice(start + search.length)}`;\n}\n\nexport function finalizeRolldownDebugIds(bundle: GeneratedBundle): void {\n for (const [fileName, output] of Object.entries(bundle)) {\n if (output.type !== 'chunk') {\n continue;\n }\n\n const identifier = `${SENTRY_DEBUG_ID_IDENTIFIER_PREFIX}${ROLLDOWN_DEBUG_ID_PLACEHOLDER}`;\n const identifierPropertyStart = output.code.indexOf(SENTRY_DEBUG_ID_IDENTIFIER);\n const identifierStart = output.code.indexOf(\n identifier,\n identifierPropertyStart + SENTRY_DEBUG_ID_IDENTIFIER.length,\n );\n if (identifierStart === -1) {\n continue;\n }\n\n const identifierPlaceholderStart = identifierStart + SENTRY_DEBUG_ID_IDENTIFIER_PREFIX.length;\n const debugIdsPlaceholderStart = output.code.lastIndexOf(ROLLDOWN_DEBUG_ID_PLACEHOLDER, identifierStart - 1);\n if (debugIdsPlaceholderStart === -1) {\n throw new Error(`Failed to locate the Sentry debug ID placeholder for chunk \\`${fileName}\\`.`);\n }\n\n // The fixed-width replacement happens after Rolldown computes [hash], so the emitted file name\n // still matches the placeholder-bearing chunk. Hashing only the code keeps byte-identical chunks\n // on one ID, as Rollup builds do.\n const debugId = stringToUUID(output.code);\n const codeWithIdentifier = replaceAt(\n output.code,\n identifierPlaceholderStart,\n ROLLDOWN_DEBUG_ID_PLACEHOLDER,\n debugId,\n );\n output.code = replaceAt(codeWithIdentifier, debugIdsPlaceholderStart, ROLLDOWN_DEBUG_ID_PLACEHOLDER, debugId);\n }\n}\n"],"
|
|
1
|
+
{"version":3,"file":"debug-id-injection.js","names":["stringToUUID"],"sources":["../../../src/rollup/debug-id-injection.ts"],"sourcesContent":["import { stringToUUID } from '../core';\n\nexport const ROLLDOWN_DEBUG_ID_PLACEHOLDER = 'SENTRY_DEBUG_ID_PLACEHOLDER_00000000';\n\ntype GeneratedChunk = {\n type: 'chunk';\n fileName: string;\n code: string;\n};\n\ntype GeneratedAsset = {\n type: 'asset';\n fileName: string;\n};\n\nexport type GeneratedBundle = Record<string, GeneratedChunk | GeneratedAsset>;\n\nconst SENTRY_DEBUG_ID_IDENTIFIER = '_sentryDebugIdIdentifier';\nconst SENTRY_DEBUG_ID_IDENTIFIER_PREFIX = 'sentry-dbid-';\n\nexport function hasExistingDebugID(code: string): boolean {\n const chunkStartSnippet = code.slice(0, 6000);\n const chunkEndSnippet = code.slice(-500);\n\n return chunkStartSnippet.includes(SENTRY_DEBUG_ID_IDENTIFIER) || chunkEndSnippet.includes('//# debugId=');\n}\n\nexport function getDebugIdForChunk(code: string, isRolldown: boolean): string {\n return isRolldown ? ROLLDOWN_DEBUG_ID_PLACEHOLDER : stringToUUID(code);\n}\n\nfunction replaceAt(code: string, start: number, search: string, replacement: string): string {\n return `${code.slice(0, start)}${replacement}${code.slice(start + search.length)}`;\n}\n\nexport function finalizeRolldownDebugIds(bundle: GeneratedBundle): void {\n for (const [fileName, output] of Object.entries(bundle)) {\n if (output.type !== 'chunk') {\n continue;\n }\n\n const identifier = `${SENTRY_DEBUG_ID_IDENTIFIER_PREFIX}${ROLLDOWN_DEBUG_ID_PLACEHOLDER}`;\n const identifierPropertyStart = output.code.indexOf(SENTRY_DEBUG_ID_IDENTIFIER);\n const identifierStart = output.code.indexOf(\n identifier,\n identifierPropertyStart + SENTRY_DEBUG_ID_IDENTIFIER.length,\n );\n if (identifierStart === -1) {\n continue;\n }\n\n const identifierPlaceholderStart = identifierStart + SENTRY_DEBUG_ID_IDENTIFIER_PREFIX.length;\n const debugIdsPlaceholderStart = output.code.lastIndexOf(ROLLDOWN_DEBUG_ID_PLACEHOLDER, identifierStart - 1);\n if (debugIdsPlaceholderStart === -1) {\n throw new Error(`Failed to locate the Sentry debug ID placeholder for chunk \\`${fileName}\\`.`);\n }\n\n // The fixed-width replacement happens after Rolldown computes [hash], so the emitted file name\n // still matches the placeholder-bearing chunk. Hashing only the code keeps byte-identical chunks\n // on one ID, as Rollup builds do.\n const debugId = stringToUUID(output.code);\n const codeWithIdentifier = replaceAt(\n output.code,\n identifierPlaceholderStart,\n ROLLDOWN_DEBUG_ID_PLACEHOLDER,\n debugId,\n );\n output.code = replaceAt(codeWithIdentifier, debugIdsPlaceholderStart, ROLLDOWN_DEBUG_ID_PLACEHOLDER, debugId);\n }\n}\n"],"mappings":";;;AAEA,MAAa,gCAAgC;AAe7C,MAAM,6BAA6B;AACnC,MAAM,oCAAoC;AAE1C,SAAgB,mBAAmB,MAAuB;CACxD,MAAM,oBAAoB,KAAK,MAAM,GAAG,GAAI;CAC5C,MAAM,kBAAkB,KAAK,MAAM,IAAI;CAEvC,OAAO,kBAAkB,SAAS,0BAA0B,KAAK,gBAAgB,SAAS,cAAc;AAC1G;AAEA,SAAgB,mBAAmB,MAAc,YAA6B;CAC5E,OAAO,aAAa,gCAAgCA,cAAAA,aAAa,IAAI;AACvE;AAEA,SAAS,UAAU,MAAc,OAAe,QAAgB,aAA6B;CAC3F,OAAO,GAAG,KAAK,MAAM,GAAG,KAAK,IAAI,cAAc,KAAK,MAAM,QAAQ,OAAO,MAAM;AACjF;AAEA,SAAgB,yBAAyB,QAA+B;CACtE,KAAK,MAAM,CAAC,UAAU,WAAW,OAAO,QAAQ,MAAM,GAAG;EACvD,IAAI,OAAO,SAAS,SAClB;EAGF,MAAM,aAAa,GAAG,oCAAoC;EAC1D,MAAM,0BAA0B,OAAO,KAAK,QAAQ,0BAA0B;EAC9E,MAAM,kBAAkB,OAAO,KAAK,QAClC,YACA,0BAA0B,EAC5B;EACA,IAAI,oBAAoB,IACtB;EAGF,MAAM,6BAA6B,kBAAkB;EACrD,MAAM,2BAA2B,OAAO,KAAK,YAAY,+BAA+B,kBAAkB,CAAC;EAC3G,IAAI,6BAA6B,IAC/B,MAAM,IAAI,MAAM,gEAAgE,SAAS,IAAI;EAM/F,MAAM,UAAUA,cAAAA,aAAa,OAAO,IAAI;EAOxC,OAAO,OAAO,UANa,UACzB,OAAO,MACP,4BACA,+BACA,OAEuC,GAAG,0BAA0B,+BAA+B,OAAO;CAC9G;AACF"}
|
|
@@ -1,27 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const debugIdUpload = require('../core/debug-id-upload.js');
|
|
5
|
-
|
|
1
|
+
const require_debug_id_upload = require("../core/debug-id-upload.js");
|
|
2
|
+
const require_index = require("../core/index.js");
|
|
3
|
+
// src/rollup/debug-id-stamping.ts
|
|
6
4
|
function stampDebugIds(bundle, updateChunkCode) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
if (updateChunkCode) {
|
|
18
|
-
output.code = stamped.bundleSource;
|
|
19
|
-
}
|
|
20
|
-
if (stamped.sourceMapSource !== void 0 && sourceMapAsset?.type === "asset") {
|
|
21
|
-
sourceMapAsset.source = stamped.sourceMapSource;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
5
|
+
for (const output of Object.values(bundle)) {
|
|
6
|
+
if (output.type !== "chunk" || !require_index.isJsFile(output.fileName)) continue;
|
|
7
|
+
const sourceMapAsset = bundle[output.sourcemapFileName ?? `${output.fileName}.map`];
|
|
8
|
+
const sourceMapSource = sourceMapAsset?.type === "asset" && typeof sourceMapAsset.source === "string" ? sourceMapAsset.source : void 0;
|
|
9
|
+
const stamped = require_debug_id_upload.stampDebugId(output.code, sourceMapSource);
|
|
10
|
+
if (!stamped) continue;
|
|
11
|
+
if (updateChunkCode) output.code = stamped.bundleSource;
|
|
12
|
+
if (stamped.sourceMapSource !== void 0 && sourceMapAsset?.type === "asset") sourceMapAsset.source = stamped.sourceMapSource;
|
|
13
|
+
}
|
|
24
14
|
}
|
|
25
|
-
|
|
26
15
|
exports.stampDebugIds = stampDebugIds;
|
|
27
|
-
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=debug-id-stamping.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug-id-stamping.js","sources":["../../../src/rollup/debug-id-stamping.ts"],"sourcesContent":["import { isJsFile, stampDebugId } from '../core';\n\n// The subset of Rollup's `OutputBundle` the stamping hooks read.\nexport type OutputBundle = Record<\n string,\n | { type: 'chunk'; fileName: string; code: string; sourcemapFileName?: string | null }\n | { type: 'asset'; fileName: string; source: string | Uint8Array }\n>;\n\nexport function stampDebugIds(bundle: OutputBundle, updateChunkCode: boolean): void {\n for (const output of Object.values(bundle)) {\n if (output.type !== 'chunk' || !isJsFile(output.fileName)) {\n continue;\n }\n\n const sourceMapAsset = bundle[output.sourcemapFileName ?? `${output.fileName}.map`];\n const sourceMapSource =\n sourceMapAsset?.type === 'asset' && typeof sourceMapAsset.source === 'string' ? sourceMapAsset.source : undefined;\n\n const stamped = stampDebugId(output.code, sourceMapSource);\n if (!stamped) {\n continue;\n }\n\n if (updateChunkCode) {\n output.code = stamped.bundleSource;\n }\n if (stamped.sourceMapSource !== undefined && sourceMapAsset?.type === 'asset') {\n sourceMapAsset.source = stamped.sourceMapSource;\n }\n }\n}\n"],"
|
|
1
|
+
{"version":3,"file":"debug-id-stamping.js","names":["isJsFile","stampDebugId"],"sources":["../../../src/rollup/debug-id-stamping.ts"],"sourcesContent":["import { isJsFile, stampDebugId } from '../core';\n\n// The subset of Rollup's `OutputBundle` the stamping hooks read.\nexport type OutputBundle = Record<\n string,\n | { type: 'chunk'; fileName: string; code: string; sourcemapFileName?: string | null }\n | { type: 'asset'; fileName: string; source: string | Uint8Array }\n>;\n\nexport function stampDebugIds(bundle: OutputBundle, updateChunkCode: boolean): void {\n for (const output of Object.values(bundle)) {\n if (output.type !== 'chunk' || !isJsFile(output.fileName)) {\n continue;\n }\n\n const sourceMapAsset = bundle[output.sourcemapFileName ?? `${output.fileName}.map`];\n const sourceMapSource =\n sourceMapAsset?.type === 'asset' && typeof sourceMapAsset.source === 'string' ? sourceMapAsset.source : undefined;\n\n const stamped = stampDebugId(output.code, sourceMapSource);\n if (!stamped) {\n continue;\n }\n\n if (updateChunkCode) {\n output.code = stamped.bundleSource;\n }\n if (stamped.sourceMapSource !== undefined && sourceMapAsset?.type === 'asset') {\n sourceMapAsset.source = stamped.sourceMapSource;\n }\n }\n}\n"],"mappings":";;;AASA,SAAgB,cAAc,QAAsB,iBAAgC;CAClF,KAAK,MAAM,UAAU,OAAO,OAAO,MAAM,GAAG;EAC1C,IAAI,OAAO,SAAS,WAAW,CAACA,cAAAA,SAAS,OAAO,QAAQ,GACtD;EAGF,MAAM,iBAAiB,OAAO,OAAO,qBAAqB,GAAG,OAAO,SAAS;EAC7E,MAAM,kBACJ,gBAAgB,SAAS,WAAW,OAAO,eAAe,WAAW,WAAW,eAAe,SAAS,KAAA;EAE1G,MAAM,UAAUC,wBAAAA,aAAa,OAAO,MAAM,eAAe;EACzD,IAAI,CAAC,SACH;EAGF,IAAI,iBACF,OAAO,OAAO,QAAQ;EAExB,IAAI,QAAQ,oBAAoB,KAAA,KAAa,gBAAgB,SAAS,SACpE,eAAe,SAAS,QAAQ;CAEpC;AACF"}
|
|
@@ -1,261 +1,207 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
function _interopNamespace(e) {
|
|
22
|
-
if (e && e.__esModule) return e;
|
|
23
|
-
const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
|
|
24
|
-
if (e) {
|
|
25
|
-
for (const k in e) {
|
|
26
|
-
n[k] = e[k];
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
n.default = e;
|
|
30
|
-
return n;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const MagicString__default = /*#__PURE__*/_interopDefault(MagicString);
|
|
34
|
-
const path__namespace = /*#__PURE__*/_interopNamespace(path);
|
|
35
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_runtime = require("../_virtual/_rolldown/runtime.js");
|
|
3
|
+
const require_utils = require("../core/utils.js");
|
|
4
|
+
const require_glob = require("../core/glob.js");
|
|
5
|
+
const require_get_code_injection_position = require("../core/get-code-injection-position.js");
|
|
6
|
+
const require_component_annotate_hooks = require("../core/component-annotate-hooks.js");
|
|
7
|
+
const require_debug_id_upload = require("../core/debug-id-upload.js");
|
|
8
|
+
const require_build_plugin_manager = require("../core/build-plugin-manager.js");
|
|
9
|
+
const require_index = require("../core/index.js");
|
|
10
|
+
const require_debug_id_injection = require("./debug-id-injection.js");
|
|
11
|
+
const require_debug_id_stamping = require("./debug-id-stamping.js");
|
|
12
|
+
const require_source_map_handling = require("./source-map-handling.js");
|
|
13
|
+
const require_source_map_hooks = require("../vite/source-map-hooks.js");
|
|
14
|
+
let magic_string = require("magic-string");
|
|
15
|
+
magic_string = require_runtime.__toESM(magic_string);
|
|
16
|
+
let node_path = require("node:path");
|
|
17
|
+
node_path = require_runtime.__toESM(node_path);
|
|
18
|
+
let node_module = require("node:module");
|
|
19
|
+
// src/rollup/index.ts
|
|
36
20
|
let viteParseAstAsyncPromise;
|
|
37
21
|
const JS_MODULE_ID_FILTER = /\.[cm]?[jt]sx?(?:[?#].*)?$/;
|
|
38
22
|
function getRollupMajorVersion() {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return rollup.VERSION?.split(".")[0];
|
|
43
|
-
} catch {
|
|
44
|
-
}
|
|
45
|
-
return void 0;
|
|
23
|
+
try {
|
|
24
|
+
return (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href)("rollup").VERSION?.split(".")[0];
|
|
25
|
+
} catch {}
|
|
46
26
|
}
|
|
47
27
|
function getViteParseAstAsync() {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
return viteModule.parseAstAsync;
|
|
60
|
-
}).catch(() => null);
|
|
61
|
-
}
|
|
62
|
-
return viteParseAstAsyncPromise;
|
|
28
|
+
if (!viteParseAstAsyncPromise) viteParseAstAsyncPromise = Promise.resolve().then(async () => {
|
|
29
|
+
const viteModule = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href)("vite");
|
|
30
|
+
if (typeof viteModule.parseAstAsync !== "function") return null;
|
|
31
|
+
try {
|
|
32
|
+
await viteModule.parseAstAsync("const x = <div />;", { lang: "tsx" });
|
|
33
|
+
} catch {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
return viteModule.parseAstAsync;
|
|
37
|
+
}).catch(() => null);
|
|
38
|
+
return viteParseAstAsyncPromise;
|
|
63
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* @ignore - internal plugin factory shared by the Rollup and Vite plugins.
|
|
42
|
+
*
|
|
43
|
+
* `main` carries injection, release creation and the upload. `post` runs last in `generateBundle`,
|
|
44
|
+
* copies chunks and their source maps into the upload staging folder and drops the map assets
|
|
45
|
+
* from the bundle, so the bundler never writes them.
|
|
46
|
+
*/
|
|
64
47
|
function _createRollupPluginInternals(userOptions = {}, buildTool, buildToolMajorVersion) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
if (!stagingHandedOver) {
|
|
210
|
-
await staging?.keep("The source map upload did not run.");
|
|
211
|
-
}
|
|
212
|
-
throw e;
|
|
213
|
-
} finally {
|
|
214
|
-
freeGlobalDependencyOnBuildArtifacts();
|
|
215
|
-
await sentryBuildPluginManager.deleteArtifacts();
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
const name = `sentry-${buildTool}-plugin`;
|
|
219
|
-
const transformHook = buildTool === "vite" ? {
|
|
220
|
-
filter: { id: JS_MODULE_ID_FILTER },
|
|
221
|
-
handler: transform
|
|
222
|
-
} : transform;
|
|
223
|
-
const viteSourceMapHooks = buildTool === "vite" ? sourceMapHooks.createViteSourceMapHooks(sentryBuildPluginManager, sourceMapHandling$1) : void 0;
|
|
224
|
-
const main = {
|
|
225
|
-
name,
|
|
226
|
-
buildStart,
|
|
227
|
-
...shouldTransform ? { transform: transformHook } : {},
|
|
228
|
-
...viteSourceMapHooks ? { configResolved: viteSourceMapHooks.configResolved } : { outputOptions: sourceMapHandling$1.outputOptions },
|
|
229
|
-
renderChunk,
|
|
230
|
-
generateBundle: { order: "pre", handler: generateBundle },
|
|
231
|
-
writeBundle
|
|
232
|
-
};
|
|
233
|
-
const post = {
|
|
234
|
-
name: buildTool === "vite" ? "sentry-vite-upload-staging" : "sentry-rollup-upload-staging",
|
|
235
|
-
// On the post plugin, so framework plugins that set `build.sourcemap`
|
|
236
|
-
// themselves run first and the decision sees the merged setting.
|
|
237
|
-
...viteSourceMapHooks ? { config: viteSourceMapHooks.config } : {},
|
|
238
|
-
generateBundle: {
|
|
239
|
-
order: "post",
|
|
240
|
-
async handler(outputOptions, bundle, isWrite) {
|
|
241
|
-
if (buildTool === "vite" && options.sourcemaps?.disable === "disable-upload") {
|
|
242
|
-
debugIdStamping.stampDebugIds(bundle, false);
|
|
243
|
-
}
|
|
244
|
-
await sourceMapHandling$1.stageSourceMaps(outputOptions, bundle, isWrite);
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
};
|
|
248
|
-
return { main, post };
|
|
48
|
+
const sentryBuildPluginManager = require_build_plugin_manager.createSentryBuildPluginManager(userOptions, {
|
|
49
|
+
loggerPrefix: userOptions._metaOptions?.loggerPrefixOverride ?? `[sentry-${buildTool}-plugin]`,
|
|
50
|
+
buildTool,
|
|
51
|
+
buildToolMajorVersion: buildToolMajorVersion || getRollupMajorVersion()
|
|
52
|
+
});
|
|
53
|
+
const { logger, normalizedOptions: options, bundleSizeOptimizationReplacementValues: replacementValues, bundleMetadata, createDependencyOnBuildArtifacts } = sentryBuildPluginManager;
|
|
54
|
+
if (options.disable) return {
|
|
55
|
+
main: { name: "sentry-noop-plugin" },
|
|
56
|
+
post: void 0
|
|
57
|
+
};
|
|
58
|
+
if (process.cwd().match(/\\node_modules\\|\/node_modules\//)) logger.warn("Running Sentry plugin from within a `node_modules` folder. Some features may not work.");
|
|
59
|
+
const freeGlobalDependencyOnBuildArtifacts = createDependencyOnBuildArtifacts();
|
|
60
|
+
const upload = require_debug_id_upload.createDebugIdUploadFunction({ sentryBuildPluginManager });
|
|
61
|
+
const sourcemapsEnabled = options.sourcemaps?.disable !== true;
|
|
62
|
+
const sourceMapHandling = require_source_map_handling.createSourceMapHandling(sentryBuildPluginManager);
|
|
63
|
+
const releaseInjectionCode = new require_utils.CodeInjection();
|
|
64
|
+
const chunkInjectionCode = new require_utils.CodeInjection();
|
|
65
|
+
if (!options.release.inject) logger.debug("Release injection disabled via `release.inject` option. Will not inject release.");
|
|
66
|
+
else if (!options.release.name) logger.debug("No release name provided. Will not inject release. Please set the `release.name` option to identify your release.");
|
|
67
|
+
else releaseInjectionCode.append(require_utils.generateReleaseInjectorCode({
|
|
68
|
+
release: options.release.name,
|
|
69
|
+
injectBuildInformation: options._experiments.injectBuildInformation || false
|
|
70
|
+
}));
|
|
71
|
+
if (Object.keys(bundleMetadata).length > 0) chunkInjectionCode.append(require_utils.generateModuleMetadataInjectorCode(bundleMetadata));
|
|
72
|
+
const transformAnnotations = options.reactComponentAnnotation?.enabled ? require_component_annotate_hooks.createComponentNameAnnotateHooks(options.reactComponentAnnotation?.ignoredComponents || [], !!options.reactComponentAnnotation?._experimentalInjectIntoHtml, {
|
|
73
|
+
getParseAstAsync: buildTool === "vite" && buildToolMajorVersion === "8" ? getViteParseAstAsync : void 0,
|
|
74
|
+
logger
|
|
75
|
+
}) : void 0;
|
|
76
|
+
const transformReplace = Object.keys(replacementValues).length > 0;
|
|
77
|
+
const shouldTransform = transformAnnotations || transformReplace;
|
|
78
|
+
function buildStart() {
|
|
79
|
+
sentryBuildPluginManager.telemetry.emitBundlerPluginExecutionSignal().catch(() => {});
|
|
80
|
+
}
|
|
81
|
+
async function transform(code, id, meta) {
|
|
82
|
+
if (transformAnnotations) {
|
|
83
|
+
const result = await transformAnnotations.transform(code, id, meta);
|
|
84
|
+
if (result) return result;
|
|
85
|
+
}
|
|
86
|
+
if (transformReplace) return require_utils.replaceBooleanFlagsInCode(code, replacementValues);
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
function renderChunk(code, chunk, _, meta) {
|
|
90
|
+
if (!require_index.isJsFile(chunk.fileName)) return null;
|
|
91
|
+
if (require_index.shouldSkipCodeInjection(code, chunk.facadeModuleId)) return null;
|
|
92
|
+
const injectCode = new require_utils.CodeInjection();
|
|
93
|
+
if (require_index.isInitialChunk(chunk, meta?.chunks)) injectCode.append(releaseInjectionCode);
|
|
94
|
+
injectCode.append(chunkInjectionCode);
|
|
95
|
+
if (sourcemapsEnabled && !require_debug_id_injection.hasExistingDebugID(code)) {
|
|
96
|
+
const debugId = require_debug_id_injection.getDebugIdForChunk(code, !!this?.meta?.rolldownVersion);
|
|
97
|
+
injectCode.append(require_index.getDebugIdSnippet(debugId));
|
|
98
|
+
}
|
|
99
|
+
if (injectCode.isEmpty()) return null;
|
|
100
|
+
const ms = meta?.magicString || new magic_string.default(code, { filename: chunk.fileName });
|
|
101
|
+
const injectionPosition = require_get_code_injection_position.getCodeInjectionPosition(code);
|
|
102
|
+
const codeToInject = injectionPosition === code.length ? `\n${injectCode.code()}` : injectCode.code();
|
|
103
|
+
ms.appendLeft(injectionPosition, codeToInject);
|
|
104
|
+
if (ms?.constructor?.name === "BindingMagicString") return { code: ms };
|
|
105
|
+
return {
|
|
106
|
+
code: ms.toString(),
|
|
107
|
+
map: ms.generateMap({
|
|
108
|
+
file: chunk.fileName,
|
|
109
|
+
hires: "boundary"
|
|
110
|
+
})
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Resolves Rolldown's placeholder debug IDs, then stamps debug IDs into the emitted chunks and
|
|
115
|
+
* source maps.
|
|
116
|
+
*
|
|
117
|
+
* `disable-upload` skips the upload routine (which stamps debug IDs into temp copies), so the emitted
|
|
118
|
+
* artifacts get stamped here instead. Not in `renderChunk`: minifiers running after it would strip the
|
|
119
|
+
* comment. Rollup computes `[hash]` file names before this hook, so only plugins that hash the final
|
|
120
|
+
* assets afterwards (e.g. subresource integrity) see the stamped content.
|
|
121
|
+
*/
|
|
122
|
+
function generateBundle(_outputOptions, bundle) {
|
|
123
|
+
if (this?.meta?.rolldownVersion) require_debug_id_injection.finalizeRolldownDebugIds(bundle);
|
|
124
|
+
if (options.sourcemaps?.disable !== "disable-upload") return;
|
|
125
|
+
require_debug_id_stamping.stampDebugIds(bundle, true);
|
|
126
|
+
}
|
|
127
|
+
async function writeBundle(outputOptions, bundle) {
|
|
128
|
+
const staging = await sourceMapHandling.takeStaging(outputOptions, bundle);
|
|
129
|
+
let stagingHandedOver = false;
|
|
130
|
+
try {
|
|
131
|
+
await sentryBuildPluginManager.createRelease();
|
|
132
|
+
if (sourcemapsEnabled && options.sourcemaps?.disable !== "disable-upload") {
|
|
133
|
+
let buildArtifacts;
|
|
134
|
+
if (outputOptions.dir) {
|
|
135
|
+
const outputDir = outputOptions.dir;
|
|
136
|
+
const JS_AND_MAP_PATTERNS = [
|
|
137
|
+
"/**/*.js",
|
|
138
|
+
"/**/*.mjs",
|
|
139
|
+
"/**/*.cjs",
|
|
140
|
+
"/**/*.js.map",
|
|
141
|
+
"/**/*.mjs.map",
|
|
142
|
+
"/**/*.cjs.map"
|
|
143
|
+
].map((q) => `${q}?(\\?*)?(#*)`);
|
|
144
|
+
buildArtifacts = await require_glob.globFiles(JS_AND_MAP_PATTERNS, { root: outputDir });
|
|
145
|
+
} else if (outputOptions.file) buildArtifacts = [outputOptions.file];
|
|
146
|
+
else buildArtifacts = Object.keys(bundle ?? {}).map((asset) => node_path.join(node_path.resolve(), asset));
|
|
147
|
+
stagingHandedOver = true;
|
|
148
|
+
await upload(buildArtifacts, { staging });
|
|
149
|
+
} else {
|
|
150
|
+
stagingHandedOver = true;
|
|
151
|
+
await staging?.discard();
|
|
152
|
+
}
|
|
153
|
+
} catch (e) {
|
|
154
|
+
if (!stagingHandedOver) await staging?.keep("The source map upload did not run.");
|
|
155
|
+
throw e;
|
|
156
|
+
} finally {
|
|
157
|
+
freeGlobalDependencyOnBuildArtifacts();
|
|
158
|
+
await sentryBuildPluginManager.deleteArtifacts();
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
const name = `sentry-${buildTool}-plugin`;
|
|
162
|
+
const transformHook = buildTool === "vite" ? {
|
|
163
|
+
filter: { id: JS_MODULE_ID_FILTER },
|
|
164
|
+
handler: transform
|
|
165
|
+
} : transform;
|
|
166
|
+
const viteSourceMapHooks = buildTool === "vite" ? require_source_map_hooks.createViteSourceMapHooks(sentryBuildPluginManager, sourceMapHandling) : void 0;
|
|
167
|
+
return {
|
|
168
|
+
main: {
|
|
169
|
+
name,
|
|
170
|
+
buildStart,
|
|
171
|
+
...shouldTransform ? { transform: transformHook } : {},
|
|
172
|
+
...viteSourceMapHooks ? { configResolved: viteSourceMapHooks.configResolved } : { outputOptions: sourceMapHandling.outputOptions },
|
|
173
|
+
renderChunk,
|
|
174
|
+
generateBundle: {
|
|
175
|
+
order: "pre",
|
|
176
|
+
handler: generateBundle
|
|
177
|
+
},
|
|
178
|
+
writeBundle
|
|
179
|
+
},
|
|
180
|
+
post: {
|
|
181
|
+
name: buildTool === "vite" ? "sentry-vite-upload-staging" : "sentry-rollup-upload-staging",
|
|
182
|
+
...viteSourceMapHooks ? { config: viteSourceMapHooks.config } : {},
|
|
183
|
+
generateBundle: {
|
|
184
|
+
order: "post",
|
|
185
|
+
async handler(outputOptions, bundle, isWrite) {
|
|
186
|
+
if (buildTool === "vite" && options.sourcemaps?.disable === "disable-upload") require_debug_id_stamping.stampDebugIds(bundle, false);
|
|
187
|
+
await sourceMapHandling.stageSourceMaps(outputOptions, bundle, isWrite);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
};
|
|
249
192
|
}
|
|
193
|
+
/**
|
|
194
|
+
* @ignore - this is the internal plugin factory function only used for the Vite plugin!
|
|
195
|
+
*/
|
|
250
196
|
function _rollupPluginInternal(userOptions = {}, buildTool, buildToolMajorVersion) {
|
|
251
|
-
|
|
197
|
+
return _createRollupPluginInternals(userOptions, buildTool, buildToolMajorVersion).main;
|
|
252
198
|
}
|
|
253
199
|
function sentryRollupPlugin(userOptions = {}) {
|
|
254
|
-
|
|
255
|
-
|
|
200
|
+
const { main, post } = _createRollupPluginInternals(userOptions, "rollup");
|
|
201
|
+
return post ? [main, post] : [main];
|
|
256
202
|
}
|
|
257
|
-
|
|
258
203
|
exports._createRollupPluginInternals = _createRollupPluginInternals;
|
|
259
204
|
exports._rollupPluginInternal = _rollupPluginInternal;
|
|
260
205
|
exports.sentryRollupPlugin = sentryRollupPlugin;
|
|
261
|
-
|
|
206
|
+
|
|
207
|
+
//# sourceMappingURL=index.js.map
|