@sentry/webpack-plugin 2.8.0 → 2.10.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/dist/cjs/index.js +76 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.mjs +76 -5
- package/dist/esm/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/cjs/index.js
CHANGED
|
@@ -28,6 +28,56 @@ function _interopNamespace(e) {
|
|
|
28
28
|
var path__namespace = /*#__PURE__*/_interopNamespace(path);
|
|
29
29
|
var webback4or5__namespace = /*#__PURE__*/_interopNamespace(webback4or5);
|
|
30
30
|
|
|
31
|
+
function ownKeys(object, enumerableOnly) {
|
|
32
|
+
var keys = Object.keys(object);
|
|
33
|
+
if (Object.getOwnPropertySymbols) {
|
|
34
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
35
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
36
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
37
|
+
})), keys.push.apply(keys, symbols);
|
|
38
|
+
}
|
|
39
|
+
return keys;
|
|
40
|
+
}
|
|
41
|
+
function _objectSpread2(target) {
|
|
42
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
43
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
44
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
45
|
+
_defineProperty(target, key, source[key]);
|
|
46
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
47
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return target;
|
|
51
|
+
}
|
|
52
|
+
function _defineProperty(obj, key, value) {
|
|
53
|
+
key = _toPropertyKey(key);
|
|
54
|
+
if (key in obj) {
|
|
55
|
+
Object.defineProperty(obj, key, {
|
|
56
|
+
value: value,
|
|
57
|
+
enumerable: true,
|
|
58
|
+
configurable: true,
|
|
59
|
+
writable: true
|
|
60
|
+
});
|
|
61
|
+
} else {
|
|
62
|
+
obj[key] = value;
|
|
63
|
+
}
|
|
64
|
+
return obj;
|
|
65
|
+
}
|
|
66
|
+
function _toPrimitive(input, hint) {
|
|
67
|
+
if (typeof input !== "object" || input === null) return input;
|
|
68
|
+
var prim = input[Symbol.toPrimitive];
|
|
69
|
+
if (prim !== undefined) {
|
|
70
|
+
var res = prim.call(input, hint || "default");
|
|
71
|
+
if (typeof res !== "object") return res;
|
|
72
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
73
|
+
}
|
|
74
|
+
return (hint === "string" ? String : Number)(input);
|
|
75
|
+
}
|
|
76
|
+
function _toPropertyKey(arg) {
|
|
77
|
+
var key = _toPrimitive(arg, "string");
|
|
78
|
+
return typeof key === "symbol" ? key : String(key);
|
|
79
|
+
}
|
|
80
|
+
|
|
31
81
|
function webpackReleaseInjectionPlugin(injectionCode) {
|
|
32
82
|
return {
|
|
33
83
|
name: "sentry-webpack-release-injection-plugin",
|
|
@@ -52,11 +102,31 @@ function webpackReleaseInjectionPlugin(injectionCode) {
|
|
|
52
102
|
}
|
|
53
103
|
};
|
|
54
104
|
}
|
|
105
|
+
function webpackBundleSizeOptimizationsPlugin(replacementValues) {
|
|
106
|
+
return {
|
|
107
|
+
name: "sentry-webpack-bundle-size-optimizations-plugin",
|
|
108
|
+
webpack: function webpack(compiler) {
|
|
109
|
+
var _compiler$webpack2, _webback4or5$default2;
|
|
110
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
111
|
+
// @ts-ignore webpack version compatibility shenanigans
|
|
112
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
113
|
+
var DefinePlugin =
|
|
114
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
115
|
+
// @ts-ignore webpack version compatibility shenanigans
|
|
116
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
117
|
+
(compiler === null || compiler === void 0 ? void 0 : (_compiler$webpack2 = compiler.webpack) === null || _compiler$webpack2 === void 0 ? void 0 : _compiler$webpack2.DefinePlugin) || (webback4or5__namespace === null || webback4or5__namespace === void 0 ? void 0 : webback4or5__namespace.DefinePlugin) || (webback4or5__namespace === null || webback4or5__namespace === void 0 ? void 0 : (_webback4or5$default2 = webback4or5__namespace["default"]) === null || _webback4or5$default2 === void 0 ? void 0 : _webback4or5$default2.DefinePlugin);
|
|
118
|
+
compiler.options.plugins = compiler.options.plugins || [];
|
|
119
|
+
compiler.options.plugins.push(
|
|
120
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call
|
|
121
|
+
new DefinePlugin(_objectSpread2({}, replacementValues)));
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
}
|
|
55
125
|
function webpackDebugIdInjectionPlugin() {
|
|
56
126
|
return {
|
|
57
127
|
name: "sentry-webpack-debug-id-injection-plugin",
|
|
58
128
|
webpack: function webpack(compiler) {
|
|
59
|
-
var _compiler$
|
|
129
|
+
var _compiler$webpack3, _webback4or5$default3;
|
|
60
130
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
61
131
|
// @ts-ignore webpack version compatibility shenanigans
|
|
62
132
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
@@ -64,7 +134,7 @@ function webpackDebugIdInjectionPlugin() {
|
|
|
64
134
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
65
135
|
// @ts-ignore webpack version compatibility shenanigans
|
|
66
136
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
67
|
-
(compiler === null || compiler === void 0 ? void 0 : (_compiler$
|
|
137
|
+
(compiler === null || compiler === void 0 ? void 0 : (_compiler$webpack3 = compiler.webpack) === null || _compiler$webpack3 === void 0 ? void 0 : _compiler$webpack3.BannerPlugin) || (webback4or5__namespace === null || webback4or5__namespace === void 0 ? void 0 : webback4or5__namespace.BannerPlugin) || (webback4or5__namespace === null || webback4or5__namespace === void 0 ? void 0 : (_webback4or5$default3 = webback4or5__namespace["default"]) === null || _webback4or5$default3 === void 0 ? void 0 : _webback4or5$default3.BannerPlugin);
|
|
68
138
|
compiler.options.plugins = compiler.options.plugins || [];
|
|
69
139
|
compiler.options.plugins.push(
|
|
70
140
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call
|
|
@@ -103,7 +173,7 @@ function webpackModuleMetadataInjectionPlugin(injectionCode) {
|
|
|
103
173
|
return {
|
|
104
174
|
name: "sentry-webpack-module-metadata-injection-plugin",
|
|
105
175
|
webpack: function webpack(compiler) {
|
|
106
|
-
var _compiler$
|
|
176
|
+
var _compiler$webpack4, _webback4or5$default4;
|
|
107
177
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
108
178
|
// @ts-ignore webpack version compatibility shenanigans
|
|
109
179
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
@@ -111,7 +181,7 @@ function webpackModuleMetadataInjectionPlugin(injectionCode) {
|
|
|
111
181
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
112
182
|
// @ts-ignore webpack version compatibility shenanigans
|
|
113
183
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
114
|
-
(compiler === null || compiler === void 0 ? void 0 : (_compiler$
|
|
184
|
+
(compiler === null || compiler === void 0 ? void 0 : (_compiler$webpack4 = compiler.webpack) === null || _compiler$webpack4 === void 0 ? void 0 : _compiler$webpack4.BannerPlugin) || (webback4or5__namespace === null || webback4or5__namespace === void 0 ? void 0 : webback4or5__namespace.BannerPlugin) || (webback4or5__namespace === null || webback4or5__namespace === void 0 ? void 0 : (_webback4or5$default4 = webback4or5__namespace["default"]) === null || _webback4or5$default4 === void 0 ? void 0 : _webback4or5$default4.BannerPlugin);
|
|
115
185
|
compiler.options.plugins = compiler.options.plugins || [];
|
|
116
186
|
compiler.options.plugins.push(
|
|
117
187
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call
|
|
@@ -127,7 +197,8 @@ var sentryUnplugin = bundlerPluginCore.sentryUnpluginFactory({
|
|
|
127
197
|
releaseInjectionPlugin: webpackReleaseInjectionPlugin,
|
|
128
198
|
moduleMetadataInjectionPlugin: webpackModuleMetadataInjectionPlugin,
|
|
129
199
|
debugIdInjectionPlugin: webpackDebugIdInjectionPlugin,
|
|
130
|
-
debugIdUploadPlugin: webpackDebugIdUploadPlugin
|
|
200
|
+
debugIdUploadPlugin: webpackDebugIdUploadPlugin,
|
|
201
|
+
bundleSizeOptimizationsPlugin: webpackBundleSizeOptimizationsPlugin
|
|
131
202
|
});
|
|
132
203
|
|
|
133
204
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["import {\n getDebugIdSnippet,\n Options,\n sentryUnpluginFactory,\n stringToUUID,\n} from \"@sentry/bundler-plugin-core\";\nimport * as path from \"path\";\nimport { UnpluginOptions } from \"unplugin\";\nimport { v4 as uuidv4 } from \"uuid\";\n\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore webpack is a peer dep\nimport * as webback4or5 from \"webpack\";\n\ninterface BannerPluginCallbackArg {\n chunk?: {\n hash?: string;\n };\n}\n\nfunction webpackReleaseInjectionPlugin(injectionCode: string): UnpluginOptions {\n return {\n name: \"sentry-webpack-release-injection-plugin\",\n webpack(compiler) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n const BannerPlugin =\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n compiler?.webpack?.BannerPlugin ||\n webback4or5?.BannerPlugin ||\n webback4or5?.default?.BannerPlugin;\n compiler.options.plugins = compiler.options.plugins || [];\n compiler.options.plugins.push(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call\n new BannerPlugin({\n raw: true,\n include: /\\.(js|ts|jsx|tsx|mjs|cjs)$/,\n banner: injectionCode,\n })\n );\n },\n };\n}\n\nfunction webpackDebugIdInjectionPlugin(): UnpluginOptions {\n return {\n name: \"sentry-webpack-debug-id-injection-plugin\",\n webpack(compiler) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n const BannerPlugin =\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n compiler?.webpack?.BannerPlugin ||\n webback4or5?.BannerPlugin ||\n webback4or5?.default?.BannerPlugin;\n compiler.options.plugins = compiler.options.plugins || [];\n compiler.options.plugins.push(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call\n new BannerPlugin({\n raw: true,\n include: /\\.(js|ts|jsx|tsx|mjs|cjs)$/,\n banner: (arg?: BannerPluginCallbackArg) => {\n const debugId = arg?.chunk?.hash ? stringToUUID(arg.chunk.hash) : uuidv4();\n return getDebugIdSnippet(debugId);\n },\n })\n );\n },\n };\n}\n\nfunction webpackDebugIdUploadPlugin(\n upload: (buildArtifacts: string[]) => Promise<void>\n): UnpluginOptions {\n const pluginName = \"sentry-webpack-debug-id-upload-plugin\";\n return {\n name: pluginName,\n webpack(compiler) {\n compiler.hooks.afterEmit.tapAsync(pluginName, (compilation, callback: () => void) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const outputPath = (compilation.outputOptions.path as string | undefined) ?? path.resolve();\n const buildArtifacts = Object.keys(compilation.assets as Record<string, unknown>).map(\n (asset) => path.join(outputPath, asset)\n );\n void upload(buildArtifacts).then(() => {\n callback();\n });\n });\n },\n };\n}\n\nfunction webpackModuleMetadataInjectionPlugin(injectionCode: string): UnpluginOptions {\n return {\n name: \"sentry-webpack-module-metadata-injection-plugin\",\n webpack(compiler) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n const BannerPlugin =\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n compiler?.webpack?.BannerPlugin ||\n webback4or5?.BannerPlugin ||\n webback4or5?.default?.BannerPlugin;\n compiler.options.plugins = compiler.options.plugins || [];\n compiler.options.plugins.push(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call\n new BannerPlugin({\n raw: true,\n include: /\\.(js|ts|jsx|tsx|mjs|cjs)$/,\n banner: injectionCode,\n })\n );\n },\n };\n}\n\nconst sentryUnplugin = sentryUnpluginFactory({\n releaseInjectionPlugin: webpackReleaseInjectionPlugin,\n moduleMetadataInjectionPlugin: webpackModuleMetadataInjectionPlugin,\n debugIdInjectionPlugin: webpackDebugIdInjectionPlugin,\n debugIdUploadPlugin: webpackDebugIdUploadPlugin,\n});\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const sentryWebpackPlugin: (options: Options) => any = sentryUnplugin.webpack;\n\nexport { sentryCliBinaryExists } from \"@sentry/bundler-plugin-core\";\nexport type { Options as SentryWebpackPluginOptions } from \"@sentry/bundler-plugin-core\";\n"],"names":["webpackReleaseInjectionPlugin","injectionCode","name","webpack","compiler","_compiler$webpack","_webback4or5$default","BannerPlugin","webback4or5","options","plugins","push","raw","include","banner","webpackDebugIdInjectionPlugin","_compiler$webpack2","_webback4or5$default2","arg","_arg$chunk","debugId","chunk","hash","stringToUUID","uuidv4","getDebugIdSnippet","webpackDebugIdUploadPlugin","upload","pluginName","hooks","afterEmit","tapAsync","compilation","callback","_ref","outputPath","outputOptions","path","resolve","buildArtifacts","Object","keys","assets","map","asset","join","then","webpackModuleMetadataInjectionPlugin","_compiler$webpack3","_webback4or5$default3","sentryUnplugin","sentryUnpluginFactory","releaseInjectionPlugin","moduleMetadataInjectionPlugin","debugIdInjectionPlugin","debugIdUploadPlugin","sentryWebpackPlugin"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,SAASA,6BAA6BA,CAACC,aAAqB,EAAmB;EAC7E,OAAO;AACLC,IAAAA,IAAI,EAAE,yCAAyC;IAC/CC,OAAO,EAAA,SAAAA,OAACC,CAAAA,QAAQ,EAAE;MAAA,IAAAC,iBAAA,EAAAC,oBAAA,CAAA;AAChB;AACA;AACA;AACA,MAAA,IAAMC,YAAY;AAChB;AACA;AACA;AACA,MAAA,CAAAH,QAAQ,KAARA,IAAAA,IAAAA,QAAQ,KAAAC,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,CAAAA,iBAAA,GAARD,QAAQ,CAAED,OAAO,MAAA,IAAA,IAAAE,iBAAA,KAAjBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,iBAAA,CAAmBE,YAAY,MAC/BC,sBAAW,KAAA,IAAA,IAAXA,sBAAW,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAXA,sBAAW,CAAED,YAAY,CACzBC,KAAAA,sBAAW,aAAXA,sBAAW,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,CAAAF,oBAAA,GAAXE,sBAAW,CAAS,SAAA,CAAA,MAAA,IAAA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AAA,qBAAA,CAAsB1C,YAAY,CAAA,CAAA;MACpCH,QAAQ,CAACK,OAAO,CAACC,OAAO,GAAGN,QAAQ,CAACK,OAAO,CAACC,OAAO,IAAI,EAAE,CAAA;AACzDN,MAAAA,QAAQ,CAACK,OAAO,CAACC,OAAO,CAACC,IAAI;AAC3B;AACA,MAAA,IAAIJ,YAAY,CAAC;AACfK,QAAAA,GAAG,EAAE,IAAI;AACTC,QAAAA,OAAO,EAAE,4BAA4B;AACrCC,QAAAA,MAAM,EAAEb,aAAAA;AACV,OAAC,CACH,CAAC,CAAA;AACH,KAAA;GACD,CAAA;AACH,CAAA;AAEA,IAAMiD,cAAc,GAAGC,uCAAqB,CAAC;AAC3CC,EAAAA,sBAAsB,EAAEpD,6BAA6B;AACrDqD,EAAAA,6BAA6B,EAAEN,oCAAoC;AACnEO,EAAAA,sBAAsB,EAAEvC,6BAA6B;AACrDwC,EAAAA,mBAAmB,EAAE7B,0BAAAA;AACvB,CAAC,CAAC,CAAA;;AAEF;AACa8B,IAAAA,mBAA8C,GAAGN,cAAc,CAAC/C;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["import {\n getDebugIdSnippet,\n Options,\n sentryUnpluginFactory,\n stringToUUID,\n SentrySDKBuildFlags,\n} from \"@sentry/bundler-plugin-core\";\nimport * as path from \"path\";\nimport { UnpluginOptions } from \"unplugin\";\nimport { v4 as uuidv4 } from \"uuid\";\n\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore webpack is a peer dep\nimport * as webback4or5 from \"webpack\";\n\ninterface BannerPluginCallbackArg {\n chunk?: {\n hash?: string;\n };\n}\n\nfunction webpackReleaseInjectionPlugin(injectionCode: string): UnpluginOptions {\n return {\n name: \"sentry-webpack-release-injection-plugin\",\n webpack(compiler) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n const BannerPlugin =\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n compiler?.webpack?.BannerPlugin ||\n webback4or5?.BannerPlugin ||\n webback4or5?.default?.BannerPlugin;\n compiler.options.plugins = compiler.options.plugins || [];\n compiler.options.plugins.push(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call\n new BannerPlugin({\n raw: true,\n include: /\\.(js|ts|jsx|tsx|mjs|cjs)$/,\n banner: injectionCode,\n })\n );\n },\n };\n}\n\nfunction webpackBundleSizeOptimizationsPlugin(\n replacementValues: SentrySDKBuildFlags\n): UnpluginOptions {\n return {\n name: \"sentry-webpack-bundle-size-optimizations-plugin\",\n webpack(compiler) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n const DefinePlugin =\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n compiler?.webpack?.DefinePlugin ||\n webback4or5?.DefinePlugin ||\n webback4or5?.default?.DefinePlugin;\n compiler.options.plugins = compiler.options.plugins || [];\n compiler.options.plugins.push(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call\n new DefinePlugin({\n ...replacementValues,\n })\n );\n },\n };\n}\n\nfunction webpackDebugIdInjectionPlugin(): UnpluginOptions {\n return {\n name: \"sentry-webpack-debug-id-injection-plugin\",\n webpack(compiler) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n const BannerPlugin =\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n compiler?.webpack?.BannerPlugin ||\n webback4or5?.BannerPlugin ||\n webback4or5?.default?.BannerPlugin;\n compiler.options.plugins = compiler.options.plugins || [];\n compiler.options.plugins.push(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call\n new BannerPlugin({\n raw: true,\n include: /\\.(js|ts|jsx|tsx|mjs|cjs)$/,\n banner: (arg?: BannerPluginCallbackArg) => {\n const debugId = arg?.chunk?.hash ? stringToUUID(arg.chunk.hash) : uuidv4();\n return getDebugIdSnippet(debugId);\n },\n })\n );\n },\n };\n}\n\nfunction webpackDebugIdUploadPlugin(\n upload: (buildArtifacts: string[]) => Promise<void>\n): UnpluginOptions {\n const pluginName = \"sentry-webpack-debug-id-upload-plugin\";\n return {\n name: pluginName,\n webpack(compiler) {\n compiler.hooks.afterEmit.tapAsync(pluginName, (compilation, callback: () => void) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const outputPath = (compilation.outputOptions.path as string | undefined) ?? path.resolve();\n const buildArtifacts = Object.keys(compilation.assets as Record<string, unknown>).map(\n (asset) => path.join(outputPath, asset)\n );\n void upload(buildArtifacts).then(() => {\n callback();\n });\n });\n },\n };\n}\n\nfunction webpackModuleMetadataInjectionPlugin(injectionCode: string): UnpluginOptions {\n return {\n name: \"sentry-webpack-module-metadata-injection-plugin\",\n webpack(compiler) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n const BannerPlugin =\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n compiler?.webpack?.BannerPlugin ||\n webback4or5?.BannerPlugin ||\n webback4or5?.default?.BannerPlugin;\n compiler.options.plugins = compiler.options.plugins || [];\n compiler.options.plugins.push(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call\n new BannerPlugin({\n raw: true,\n include: /\\.(js|ts|jsx|tsx|mjs|cjs)$/,\n banner: injectionCode,\n })\n );\n },\n };\n}\n\nconst sentryUnplugin = sentryUnpluginFactory({\n releaseInjectionPlugin: webpackReleaseInjectionPlugin,\n moduleMetadataInjectionPlugin: webpackModuleMetadataInjectionPlugin,\n debugIdInjectionPlugin: webpackDebugIdInjectionPlugin,\n debugIdUploadPlugin: webpackDebugIdUploadPlugin,\n bundleSizeOptimizationsPlugin: webpackBundleSizeOptimizationsPlugin,\n});\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const sentryWebpackPlugin: (options: Options) => any = sentryUnplugin.webpack;\n\nexport { sentryCliBinaryExists } from \"@sentry/bundler-plugin-core\";\nexport type { Options as SentryWebpackPluginOptions } from \"@sentry/bundler-plugin-core\";\n"],"names":["webpackReleaseInjectionPlugin","injectionCode","name","webpack","compiler","_compiler$webpack","_webback4or5$default","BannerPlugin","webback4or5","options","plugins","push","raw","include","banner","webpackBundleSizeOptimizationsPlugin","replacementValues","_compiler$webpack2","_webback4or5$default2","DefinePlugin","_objectSpread","webpackDebugIdInjectionPlugin","_compiler$webpack3","_webback4or5$default3","arg","_arg$chunk","debugId","chunk","hash","stringToUUID","uuidv4","getDebugIdSnippet","webpackDebugIdUploadPlugin","upload","pluginName","hooks","afterEmit","tapAsync","compilation","callback","_ref","outputPath","outputOptions","path","resolve","buildArtifacts","Object","keys","assets","map","asset","join","then","webpackModuleMetadataInjectionPlugin","_compiler$webpack4","_webback4or5$default4","sentryUnplugin","sentryUnpluginFactory","releaseInjectionPlugin","moduleMetadataInjectionPlugin","debugIdInjectionPlugin","debugIdUploadPlugin","bundleSizeOptimizationsPlugin","sentryWebpackPlugin"],"mappings":";;;;;;;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;AACrDwC,EAAAA,mBAAmB,EAAE7B,0BAA0B;AAC/C8B,EAAAA,6BAA6B,EAAE/C,oCAAAA;AACjC,CAAC,CAAC,CAAA;;AAEF;AACagD,IAAAA,mBAA8C,GAAGP,cAAc,CAACrD;;;;;;;;"}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -4,6 +4,56 @@ import * as path from 'path';
|
|
|
4
4
|
import { v4 } from 'uuid';
|
|
5
5
|
import * as webback4or5 from 'webpack';
|
|
6
6
|
|
|
7
|
+
function ownKeys(object, enumerableOnly) {
|
|
8
|
+
var keys = Object.keys(object);
|
|
9
|
+
if (Object.getOwnPropertySymbols) {
|
|
10
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
11
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
12
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
13
|
+
})), keys.push.apply(keys, symbols);
|
|
14
|
+
}
|
|
15
|
+
return keys;
|
|
16
|
+
}
|
|
17
|
+
function _objectSpread2(target) {
|
|
18
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
19
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
20
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
21
|
+
_defineProperty(target, key, source[key]);
|
|
22
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
23
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return target;
|
|
27
|
+
}
|
|
28
|
+
function _defineProperty(obj, key, value) {
|
|
29
|
+
key = _toPropertyKey(key);
|
|
30
|
+
if (key in obj) {
|
|
31
|
+
Object.defineProperty(obj, key, {
|
|
32
|
+
value: value,
|
|
33
|
+
enumerable: true,
|
|
34
|
+
configurable: true,
|
|
35
|
+
writable: true
|
|
36
|
+
});
|
|
37
|
+
} else {
|
|
38
|
+
obj[key] = value;
|
|
39
|
+
}
|
|
40
|
+
return obj;
|
|
41
|
+
}
|
|
42
|
+
function _toPrimitive(input, hint) {
|
|
43
|
+
if (typeof input !== "object" || input === null) return input;
|
|
44
|
+
var prim = input[Symbol.toPrimitive];
|
|
45
|
+
if (prim !== undefined) {
|
|
46
|
+
var res = prim.call(input, hint || "default");
|
|
47
|
+
if (typeof res !== "object") return res;
|
|
48
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
49
|
+
}
|
|
50
|
+
return (hint === "string" ? String : Number)(input);
|
|
51
|
+
}
|
|
52
|
+
function _toPropertyKey(arg) {
|
|
53
|
+
var key = _toPrimitive(arg, "string");
|
|
54
|
+
return typeof key === "symbol" ? key : String(key);
|
|
55
|
+
}
|
|
56
|
+
|
|
7
57
|
function webpackReleaseInjectionPlugin(injectionCode) {
|
|
8
58
|
return {
|
|
9
59
|
name: "sentry-webpack-release-injection-plugin",
|
|
@@ -28,11 +78,31 @@ function webpackReleaseInjectionPlugin(injectionCode) {
|
|
|
28
78
|
}
|
|
29
79
|
};
|
|
30
80
|
}
|
|
81
|
+
function webpackBundleSizeOptimizationsPlugin(replacementValues) {
|
|
82
|
+
return {
|
|
83
|
+
name: "sentry-webpack-bundle-size-optimizations-plugin",
|
|
84
|
+
webpack: function webpack(compiler) {
|
|
85
|
+
var _compiler$webpack2, _webback4or5$default2;
|
|
86
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
87
|
+
// @ts-ignore webpack version compatibility shenanigans
|
|
88
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
89
|
+
var DefinePlugin =
|
|
90
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
91
|
+
// @ts-ignore webpack version compatibility shenanigans
|
|
92
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
93
|
+
(compiler === null || compiler === void 0 ? void 0 : (_compiler$webpack2 = compiler.webpack) === null || _compiler$webpack2 === void 0 ? void 0 : _compiler$webpack2.DefinePlugin) || (webback4or5 === null || webback4or5 === void 0 ? void 0 : webback4or5.DefinePlugin) || (webback4or5 === null || webback4or5 === void 0 ? void 0 : (_webback4or5$default2 = webback4or5["default"]) === null || _webback4or5$default2 === void 0 ? void 0 : _webback4or5$default2.DefinePlugin);
|
|
94
|
+
compiler.options.plugins = compiler.options.plugins || [];
|
|
95
|
+
compiler.options.plugins.push(
|
|
96
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call
|
|
97
|
+
new DefinePlugin(_objectSpread2({}, replacementValues)));
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
}
|
|
31
101
|
function webpackDebugIdInjectionPlugin() {
|
|
32
102
|
return {
|
|
33
103
|
name: "sentry-webpack-debug-id-injection-plugin",
|
|
34
104
|
webpack: function webpack(compiler) {
|
|
35
|
-
var _compiler$
|
|
105
|
+
var _compiler$webpack3, _webback4or5$default3;
|
|
36
106
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
37
107
|
// @ts-ignore webpack version compatibility shenanigans
|
|
38
108
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
@@ -40,7 +110,7 @@ function webpackDebugIdInjectionPlugin() {
|
|
|
40
110
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
41
111
|
// @ts-ignore webpack version compatibility shenanigans
|
|
42
112
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
43
|
-
(compiler === null || compiler === void 0 ? void 0 : (_compiler$
|
|
113
|
+
(compiler === null || compiler === void 0 ? void 0 : (_compiler$webpack3 = compiler.webpack) === null || _compiler$webpack3 === void 0 ? void 0 : _compiler$webpack3.BannerPlugin) || (webback4or5 === null || webback4or5 === void 0 ? void 0 : webback4or5.BannerPlugin) || (webback4or5 === null || webback4or5 === void 0 ? void 0 : (_webback4or5$default3 = webback4or5["default"]) === null || _webback4or5$default3 === void 0 ? void 0 : _webback4or5$default3.BannerPlugin);
|
|
44
114
|
compiler.options.plugins = compiler.options.plugins || [];
|
|
45
115
|
compiler.options.plugins.push(
|
|
46
116
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call
|
|
@@ -79,7 +149,7 @@ function webpackModuleMetadataInjectionPlugin(injectionCode) {
|
|
|
79
149
|
return {
|
|
80
150
|
name: "sentry-webpack-module-metadata-injection-plugin",
|
|
81
151
|
webpack: function webpack(compiler) {
|
|
82
|
-
var _compiler$
|
|
152
|
+
var _compiler$webpack4, _webback4or5$default4;
|
|
83
153
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
84
154
|
// @ts-ignore webpack version compatibility shenanigans
|
|
85
155
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
@@ -87,7 +157,7 @@ function webpackModuleMetadataInjectionPlugin(injectionCode) {
|
|
|
87
157
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
88
158
|
// @ts-ignore webpack version compatibility shenanigans
|
|
89
159
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
90
|
-
(compiler === null || compiler === void 0 ? void 0 : (_compiler$
|
|
160
|
+
(compiler === null || compiler === void 0 ? void 0 : (_compiler$webpack4 = compiler.webpack) === null || _compiler$webpack4 === void 0 ? void 0 : _compiler$webpack4.BannerPlugin) || (webback4or5 === null || webback4or5 === void 0 ? void 0 : webback4or5.BannerPlugin) || (webback4or5 === null || webback4or5 === void 0 ? void 0 : (_webback4or5$default4 = webback4or5["default"]) === null || _webback4or5$default4 === void 0 ? void 0 : _webback4or5$default4.BannerPlugin);
|
|
91
161
|
compiler.options.plugins = compiler.options.plugins || [];
|
|
92
162
|
compiler.options.plugins.push(
|
|
93
163
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call
|
|
@@ -103,7 +173,8 @@ var sentryUnplugin = sentryUnpluginFactory({
|
|
|
103
173
|
releaseInjectionPlugin: webpackReleaseInjectionPlugin,
|
|
104
174
|
moduleMetadataInjectionPlugin: webpackModuleMetadataInjectionPlugin,
|
|
105
175
|
debugIdInjectionPlugin: webpackDebugIdInjectionPlugin,
|
|
106
|
-
debugIdUploadPlugin: webpackDebugIdUploadPlugin
|
|
176
|
+
debugIdUploadPlugin: webpackDebugIdUploadPlugin,
|
|
177
|
+
bundleSizeOptimizationsPlugin: webpackBundleSizeOptimizationsPlugin
|
|
107
178
|
});
|
|
108
179
|
|
|
109
180
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/index.ts"],"sourcesContent":["import {\n getDebugIdSnippet,\n Options,\n sentryUnpluginFactory,\n stringToUUID,\n} from \"@sentry/bundler-plugin-core\";\nimport * as path from \"path\";\nimport { UnpluginOptions } from \"unplugin\";\nimport { v4 as uuidv4 } from \"uuid\";\n\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore webpack is a peer dep\nimport * as webback4or5 from \"webpack\";\n\ninterface BannerPluginCallbackArg {\n chunk?: {\n hash?: string;\n };\n}\n\nfunction webpackReleaseInjectionPlugin(injectionCode: string): UnpluginOptions {\n return {\n name: \"sentry-webpack-release-injection-plugin\",\n webpack(compiler) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n const BannerPlugin =\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n compiler?.webpack?.BannerPlugin ||\n webback4or5?.BannerPlugin ||\n webback4or5?.default?.BannerPlugin;\n compiler.options.plugins = compiler.options.plugins || [];\n compiler.options.plugins.push(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call\n new BannerPlugin({\n raw: true,\n include: /\\.(js|ts|jsx|tsx|mjs|cjs)$/,\n banner: injectionCode,\n })\n );\n },\n };\n}\n\nfunction webpackDebugIdInjectionPlugin(): UnpluginOptions {\n return {\n name: \"sentry-webpack-debug-id-injection-plugin\",\n webpack(compiler) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n const BannerPlugin =\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n compiler?.webpack?.BannerPlugin ||\n webback4or5?.BannerPlugin ||\n webback4or5?.default?.BannerPlugin;\n compiler.options.plugins = compiler.options.plugins || [];\n compiler.options.plugins.push(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call\n new BannerPlugin({\n raw: true,\n include: /\\.(js|ts|jsx|tsx|mjs|cjs)$/,\n banner: (arg?: BannerPluginCallbackArg) => {\n const debugId = arg?.chunk?.hash ? stringToUUID(arg.chunk.hash) : uuidv4();\n return getDebugIdSnippet(debugId);\n },\n })\n );\n },\n };\n}\n\nfunction webpackDebugIdUploadPlugin(\n upload: (buildArtifacts: string[]) => Promise<void>\n): UnpluginOptions {\n const pluginName = \"sentry-webpack-debug-id-upload-plugin\";\n return {\n name: pluginName,\n webpack(compiler) {\n compiler.hooks.afterEmit.tapAsync(pluginName, (compilation, callback: () => void) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const outputPath = (compilation.outputOptions.path as string | undefined) ?? path.resolve();\n const buildArtifacts = Object.keys(compilation.assets as Record<string, unknown>).map(\n (asset) => path.join(outputPath, asset)\n );\n void upload(buildArtifacts).then(() => {\n callback();\n });\n });\n },\n };\n}\n\nfunction webpackModuleMetadataInjectionPlugin(injectionCode: string): UnpluginOptions {\n return {\n name: \"sentry-webpack-module-metadata-injection-plugin\",\n webpack(compiler) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n const BannerPlugin =\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n compiler?.webpack?.BannerPlugin ||\n webback4or5?.BannerPlugin ||\n webback4or5?.default?.BannerPlugin;\n compiler.options.plugins = compiler.options.plugins || [];\n compiler.options.plugins.push(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call\n new BannerPlugin({\n raw: true,\n include: /\\.(js|ts|jsx|tsx|mjs|cjs)$/,\n banner: injectionCode,\n })\n );\n },\n };\n}\n\nconst sentryUnplugin = sentryUnpluginFactory({\n releaseInjectionPlugin: webpackReleaseInjectionPlugin,\n moduleMetadataInjectionPlugin: webpackModuleMetadataInjectionPlugin,\n debugIdInjectionPlugin: webpackDebugIdInjectionPlugin,\n debugIdUploadPlugin: webpackDebugIdUploadPlugin,\n});\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const sentryWebpackPlugin: (options: Options) => any = sentryUnplugin.webpack;\n\nexport { sentryCliBinaryExists } from \"@sentry/bundler-plugin-core\";\nexport type { Options as SentryWebpackPluginOptions } from \"@sentry/bundler-plugin-core\";\n"],"names":["webpackReleaseInjectionPlugin","injectionCode","name","webpack","compiler","_compiler$webpack","_webback4or5$default","BannerPlugin","webback4or5","options","plugins","push","raw","include","banner","webpackDebugIdInjectionPlugin","_compiler$webpack2","_webback4or5$default2","arg","_arg$chunk","debugId","chunk","hash","stringToUUID","uuidv4","getDebugIdSnippet","webpackDebugIdUploadPlugin","upload","pluginName","hooks","afterEmit","tapAsync","compilation","callback","_ref","outputPath","outputOptions","path","resolve","buildArtifacts","Object","keys","assets","map","asset","join","then","webpackModuleMetadataInjectionPlugin","_compiler$webpack3","_webback4or5$default3","sentryUnplugin","sentryUnpluginFactory","releaseInjectionPlugin","moduleMetadataInjectionPlugin","debugIdInjectionPlugin","debugIdUploadPlugin","sentryWebpackPlugin"],"mappings":";;;;;;AAoBA,SAASA,6BAA6BA,CAACC,aAAqB,EAAmB;EAC7E,OAAO;AACLC,IAAAA,IAAI,EAAE,yCAAyC;IAC/CC,OAAO,EAAA,SAAAA,OAACC,CAAAA,QAAQ,EAAE;MAAA,IAAAC,iBAAA,EAAAC,oBAAA,CAAA;AAChB;AACA;AACA;AACA,MAAA,IAAMC,YAAY;AAChB;AACA;AACA;AACA,MAAA,CAAAH,QAAQ,KAARA,IAAAA,IAAAA,QAAQ,KAAAC,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,CAAAA,iBAAA,GAARD,QAAQ,CAAED,OAAO,MAAA,IAAA,IAAAE,iBAAA,KAAjBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,iBAAA,CAAmBE,YAAY,MAC/BC,WAAW,KAAA,IAAA,IAAXA,WAAW,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAXA,WAAW,CAAED,YAAY,CACzBC,KAAAA,WAAW,aAAXA,WAAW,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,CAAAF,oBAAA,GAAXE,WAAW,CAAS,SAAA,CAAA,MAAA,IAAA,IAAAF,oBAAA,KAApBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,oBAAA,CAAsBC,YAAY,CAAA,CAAA;MACpCH,QAAQ,CAACK,OAAO,CAACC,OAAO,GAAGN,QAAQ,CAACK,OAAO,CAACC,OAAO,IAAI,EAAE,CAAA;AACzDN,MAAAA,QAAQ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AACfK,QAAAA,GAAG,EAAE,IAAI;AACTC,QAAAA,OAAO,EAAE,4BAA4B;AACrCC,QAAAA,MAAM,EAAEb,aAAAA;AACV,OAAC,CACH,CAAC,CAAA;AACH,KAAA;GACD,CAAA;AACH,CAAA;AAEA,IAAMiD,cAAc,GAAGC,qBAAqB,CAAC;AAC3CC,EAAAA,sBAAsB,EAAEpD,6BAA6B;AACrDqD,EAAAA,6BAA6B,EAAEN,oCAAoC;AACnEO,EAAAA,sBAAsB,EAAEvC,6BAA6B;AACrDwC,EAAAA,mBAAmB,EAAE7B,0BAAAA;AACvB,CAAC,CAAC,CAAA;;AAEF;AACa8B,IAAAA,mBAA8C,GAAGN,cAAc,CAAC/C;;;;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/index.ts"],"sourcesContent":["import {\n getDebugIdSnippet,\n Options,\n sentryUnpluginFactory,\n stringToUUID,\n SentrySDKBuildFlags,\n} from \"@sentry/bundler-plugin-core\";\nimport * as path from \"path\";\nimport { UnpluginOptions } from \"unplugin\";\nimport { v4 as uuidv4 } from \"uuid\";\n\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore webpack is a peer dep\nimport * as webback4or5 from \"webpack\";\n\ninterface BannerPluginCallbackArg {\n chunk?: {\n hash?: string;\n };\n}\n\nfunction webpackReleaseInjectionPlugin(injectionCode: string): UnpluginOptions {\n return {\n name: \"sentry-webpack-release-injection-plugin\",\n webpack(compiler) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n const BannerPlugin =\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n compiler?.webpack?.BannerPlugin ||\n webback4or5?.BannerPlugin ||\n webback4or5?.default?.BannerPlugin;\n compiler.options.plugins = compiler.options.plugins || [];\n compiler.options.plugins.push(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call\n new BannerPlugin({\n raw: true,\n include: /\\.(js|ts|jsx|tsx|mjs|cjs)$/,\n banner: injectionCode,\n })\n );\n },\n };\n}\n\nfunction webpackBundleSizeOptimizationsPlugin(\n replacementValues: SentrySDKBuildFlags\n): UnpluginOptions {\n return {\n name: \"sentry-webpack-bundle-size-optimizations-plugin\",\n webpack(compiler) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n const DefinePlugin =\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n compiler?.webpack?.DefinePlugin ||\n webback4or5?.DefinePlugin ||\n webback4or5?.default?.DefinePlugin;\n compiler.options.plugins = compiler.options.plugins || [];\n compiler.options.plugins.push(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call\n new DefinePlugin({\n ...replacementValues,\n })\n );\n },\n };\n}\n\nfunction webpackDebugIdInjectionPlugin(): UnpluginOptions {\n return {\n name: \"sentry-webpack-debug-id-injection-plugin\",\n webpack(compiler) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n const BannerPlugin =\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n compiler?.webpack?.BannerPlugin ||\n webback4or5?.BannerPlugin ||\n webback4or5?.default?.BannerPlugin;\n compiler.options.plugins = compiler.options.plugins || [];\n compiler.options.plugins.push(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call\n new BannerPlugin({\n raw: true,\n include: /\\.(js|ts|jsx|tsx|mjs|cjs)$/,\n banner: (arg?: BannerPluginCallbackArg) => {\n const debugId = arg?.chunk?.hash ? stringToUUID(arg.chunk.hash) : uuidv4();\n return getDebugIdSnippet(debugId);\n },\n })\n );\n },\n };\n}\n\nfunction webpackDebugIdUploadPlugin(\n upload: (buildArtifacts: string[]) => Promise<void>\n): UnpluginOptions {\n const pluginName = \"sentry-webpack-debug-id-upload-plugin\";\n return {\n name: pluginName,\n webpack(compiler) {\n compiler.hooks.afterEmit.tapAsync(pluginName, (compilation, callback: () => void) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const outputPath = (compilation.outputOptions.path as string | undefined) ?? path.resolve();\n const buildArtifacts = Object.keys(compilation.assets as Record<string, unknown>).map(\n (asset) => path.join(outputPath, asset)\n );\n void upload(buildArtifacts).then(() => {\n callback();\n });\n });\n },\n };\n}\n\nfunction webpackModuleMetadataInjectionPlugin(injectionCode: string): UnpluginOptions {\n return {\n name: \"sentry-webpack-module-metadata-injection-plugin\",\n webpack(compiler) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n const BannerPlugin =\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore webpack version compatibility shenanigans\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n compiler?.webpack?.BannerPlugin ||\n webback4or5?.BannerPlugin ||\n webback4or5?.default?.BannerPlugin;\n compiler.options.plugins = compiler.options.plugins || [];\n compiler.options.plugins.push(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call\n new BannerPlugin({\n raw: true,\n include: /\\.(js|ts|jsx|tsx|mjs|cjs)$/,\n banner: injectionCode,\n })\n );\n },\n };\n}\n\nconst sentryUnplugin = sentryUnpluginFactory({\n releaseInjectionPlugin: webpackReleaseInjectionPlugin,\n moduleMetadataInjectionPlugin: webpackModuleMetadataInjectionPlugin,\n debugIdInjectionPlugin: webpackDebugIdInjectionPlugin,\n debugIdUploadPlugin: webpackDebugIdUploadPlugin,\n bundleSizeOptimizationsPlugin: webpackBundleSizeOptimizationsPlugin,\n});\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const sentryWebpackPlugin: (options: Options) => any = sentryUnplugin.webpack;\n\nexport { sentryCliBinaryExists } from \"@sentry/bundler-plugin-core\";\nexport type { Options as SentryWebpackPluginOptions } from \"@sentry/bundler-plugin-core\";\n"],"names":["webpackReleaseInjectionPlugin","injectionCode","name","webpack","compiler","_compiler$webpack","_webback4or5$default","BannerPlugin","webback4or5","options","plugins","push","raw","include","banner","webpackBundleSizeOptimizationsPlugin","replacementValues","_compiler$webpack2","_webback4or5$default2","DefinePlugin","_objectSpread","webpackDebugIdInjectionPlugin","_compiler$webpack3","_webback4or5$default3","arg","_arg$chunk","debugId","chunk","hash","stringToUUID","uuidv4","getDebugIdSnippet","webpackDebugIdUploadPlugin","upload","pluginName","hooks","afterEmit","tapAsync","compilation","callback","_ref","outputPath","outputOptions","path","resolve","buildArtifacts","Object","keys","assets","map","asset","join","then","webpackModuleMetadataInjectionPlugin","_compiler$webpack4","_webback4or5$default4","sentryUnplugin","sentryUnpluginFactory","releaseInjectionPlugin","moduleMetadataInjectionPlugin","debugIdInjectionPlugin","debugIdUploadPlugin","bundleSizeOptimizationsPlugin","sentryWebpackPlugin"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,SAASA,6BAA6BA,CAACC,aAAqB,EAAmB;EAC7E,OAAO;AACLC,IAAAA,IAAI,EAAE,yCAAyC;IAC/CC,OAAO,EAAA,SAAAA,OAACC,CAAAA,QAAQ,EAAE;MAAA,IAAAC,iBAAA,EAAAC,oB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.10.0",
|
|
4
4
|
"description": "Official Sentry Webpack plugin",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript-bundler-plugins.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript-bundler-plugins/tree/main/packages/webpack-plugin",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"prepack": "ts-node ./src/prepack.ts"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@sentry/bundler-plugin-core": "2.
|
|
51
|
+
"@sentry/bundler-plugin-core": "2.10.0",
|
|
52
52
|
"unplugin": "1.0.1",
|
|
53
53
|
"uuid": "^9.0.0"
|
|
54
54
|
},
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"@babel/preset-typescript": "7.17.12",
|
|
59
59
|
"@rollup/plugin-babel": "5.3.1",
|
|
60
60
|
"@rollup/plugin-commonjs": "22.0.1",
|
|
61
|
-
"@sentry-internal/eslint-config": "2.
|
|
62
|
-
"@sentry-internal/sentry-bundler-plugin-tsconfig": "2.
|
|
61
|
+
"@sentry-internal/eslint-config": "2.10.0",
|
|
62
|
+
"@sentry-internal/sentry-bundler-plugin-tsconfig": "2.10.0",
|
|
63
63
|
"@swc/core": "^1.2.205",
|
|
64
64
|
"@swc/jest": "^0.2.21",
|
|
65
65
|
"@types/jest": "^28.1.3",
|