@sentry/bundler-plugins 10.70.0 → 11.0.0-alpha.1

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.
Files changed (63) hide show
  1. package/build/cjs/core/build-plugin-manager.js +8 -2
  2. package/build/cjs/core/build-plugin-manager.js.map +1 -1
  3. package/build/cjs/core/debug-id-upload.js +20 -16
  4. package/build/cjs/core/debug-id-upload.js.map +1 -1
  5. package/build/cjs/core/options-mapping.js +1 -0
  6. package/build/cjs/core/options-mapping.js.map +1 -1
  7. package/build/cjs/core/sentry/telemetry.js +3 -0
  8. package/build/cjs/core/sentry/telemetry.js.map +1 -1
  9. package/build/cjs/core/version.js +1 -1
  10. package/build/cjs/core/version.js.map +1 -1
  11. package/build/esm/core/build-plugin-manager.js +8 -2
  12. package/build/esm/core/build-plugin-manager.js.map +1 -1
  13. package/build/esm/core/debug-id-upload.js +20 -16
  14. package/build/esm/core/debug-id-upload.js.map +1 -1
  15. package/build/esm/core/options-mapping.js +1 -0
  16. package/build/esm/core/options-mapping.js.map +1 -1
  17. package/build/esm/core/sentry/telemetry.js +3 -0
  18. package/build/esm/core/sentry/telemetry.js.map +1 -1
  19. package/build/esm/core/version.js +1 -1
  20. package/build/esm/core/version.js.map +1 -1
  21. package/build/esm/package.json +1 -1
  22. package/build/types/core/build-plugin-manager.d.ts.map +1 -1
  23. package/build/types/core/debug-id-upload.d.ts.map +1 -1
  24. package/build/types/core/index.d.ts +1 -1
  25. package/build/types/core/index.d.ts.map +1 -1
  26. package/build/types/core/options-mapping.d.ts.map +1 -1
  27. package/build/types/core/sentry/telemetry.d.ts.map +1 -1
  28. package/build/types/core/utils.d.ts.map +1 -1
  29. package/build/types/core/version.d.ts +1 -1
  30. package/build/types/core/version.d.ts.map +1 -1
  31. package/build/types/esbuild/index.d.ts.map +1 -1
  32. package/build/types/rollup/index.d.ts +2 -2
  33. package/build/types/rollup/index.d.ts.map +1 -1
  34. package/build/types/vite/index.d.ts.map +1 -1
  35. package/build/types/webpack/webpack4and5.d.ts.map +1 -1
  36. package/package.json +9 -10
  37. package/build/types-ts3.8/babel-plugin/component-annotation.d.ts +0 -27
  38. package/build/types-ts3.8/babel-plugin/constants.d.ts +0 -27
  39. package/build/types-ts3.8/babel-plugin/experimental.d.ts +0 -51
  40. package/build/types-ts3.8/babel-plugin/index.d.ts +0 -56
  41. package/build/types-ts3.8/core/build-plugin-manager.d.ts +0 -82
  42. package/build/types-ts3.8/core/component-annotation-vite-ast.d.ts +0 -57
  43. package/build/types-ts3.8/core/component-annotation-vite-fragments.d.ts +0 -3
  44. package/build/types-ts3.8/core/component-annotation-vite-jsx.d.ts +0 -16
  45. package/build/types-ts3.8/core/component-annotation-vite-walk.d.ts +0 -3
  46. package/build/types-ts3.8/core/component-annotation-vite.d.ts +0 -6
  47. package/build/types-ts3.8/core/debug-id-upload.d.ts +0 -17
  48. package/build/types-ts3.8/core/glob.d.ts +0 -5
  49. package/build/types-ts3.8/core/index.d.ts +0 -53
  50. package/build/types-ts3.8/core/logger.d.ts +0 -14
  51. package/build/types-ts3.8/core/options-mapping.d.ts +0 -82
  52. package/build/types-ts3.8/core/sentry/telemetry.d.ts +0 -14
  53. package/build/types-ts3.8/core/sentry/transports.d.ts +0 -5
  54. package/build/types-ts3.8/core/types.d.ts +0 -570
  55. package/build/types-ts3.8/core/utils.d.ts +0 -87
  56. package/build/types-ts3.8/core/version.d.ts +0 -2
  57. package/build/types-ts3.8/esbuild/index.d.ts +0 -6
  58. package/build/types-ts3.8/rollup/index.d.ts +0 -67
  59. package/build/types-ts3.8/vite/index.d.ts +0 -9
  60. package/build/types-ts3.8/webpack/component-annotation-transform.d.ts +0 -11
  61. package/build/types-ts3.8/webpack/index.d.ts +0 -5
  62. package/build/types-ts3.8/webpack/webpack4and5.d.ts +0 -99
  63. package/build/types-ts3.8/webpack/webpack5.d.ts +0 -5
@@ -1,87 +0,0 @@
1
- import { SourceMap } from 'magic-string';
2
- /**
3
- * Checks whether the given input is already an array, and if it isn't, wraps it in one.
4
- *
5
- * @param maybeArray Input to turn into an array, if necessary
6
- * @returns The input, if already an array, or an array with the input as the only element, if not
7
- */
8
- export declare function arrayify<T = unknown>(maybeArray: T | T[]): T[];
9
- type PackageJson = Record<string, unknown>;
10
- /**
11
- * Get the closes package.json from a given starting point upwards.
12
- * This handles a few edge cases:
13
- * * Check if a given file package.json appears to be an actual NPM package.json file
14
- * * Stop at the home dir, to avoid looking too deeply
15
- */
16
- export declare function getPackageJson({ cwd, stopAt }?: {
17
- cwd?: string;
18
- stopAt?: string;
19
- }): PackageJson | undefined;
20
- export declare function parseMajorVersion(ver: string): number | undefined;
21
- export declare function getDependencies(packageJson: PackageJson): {
22
- deps: string[];
23
- depsVersions: Record<string, number>;
24
- };
25
- /**
26
- * Deterministically hashes a string and turns the hash into a uuid.
27
- */
28
- export declare function stringToUUID(str: string): string;
29
- /**
30
- * Tries to guess a release name based on environmental data.
31
- */
32
- export declare function determineReleaseName(): string | undefined;
33
- /**
34
- * Generates code for the global injector which is responsible for setting the global
35
- * `SENTRY_RELEASE` & `SENTRY_BUILD_INFO` variables.
36
- */
37
- export declare function generateReleaseInjectorCode({ release, injectBuildInformation, }: {
38
- release: string;
39
- injectBuildInformation: boolean;
40
- }): CodeInjection;
41
- export declare function generateModuleMetadataInjectorCode(metadata: any): CodeInjection;
42
- export declare function getBuildInformation(): {
43
- deps: string[];
44
- depsVersions: Record<string, number>;
45
- nodeVersion: number | undefined;
46
- };
47
- export declare function stripQueryAndHashFromPath(path: string): string;
48
- export declare function replaceBooleanFlagsInCode(code: string, replacementValues: Record<string, boolean | undefined>): {
49
- code: string;
50
- map: SourceMap;
51
- } | null;
52
- export declare function getTurborepoEnvPassthroughWarning(envVarName: string): string;
53
- /**
54
- * Gets the projects from the project option. This might be a single project or an array of projects.
55
- */
56
- export declare function getProjects(project: string | string[] | undefined): string[] | undefined;
57
- /**
58
- * Inlined functionality from @sentry/cli helper code to add `--ignore` options.
59
- *
60
- * Temporary workaround until we expose a function for injecting debug IDs. Currently, we directly call `execute` with CLI args to inject them.
61
- */
62
- export declare function serializeIgnoreOptions(ignoreValue: string | string[] | undefined): string[];
63
- /**
64
- * Checks if a chunk contains only import/export statements and no substantial code.
65
- *
66
- * In Vite MPA (multi-page application) mode, HTML entry points create "facade" chunks
67
- * that only contain import statements to load shared modules. These should not have
68
- * Sentry code injected. However, in SPA mode, the main bundle also has an HTML facade
69
- * but contains substantial application code that SHOULD have debug IDs injected.
70
- *
71
- * @ref https://github.com/getsentry/sentry-javascript-bundler-plugins/issues/829
72
- * @ref https://github.com/getsentry/sentry-javascript-bundler-plugins/issues/839
73
- */
74
- export declare function containsOnlyImports(code: string): boolean;
75
- export declare class CodeInjection {
76
- private body;
77
- private readonly header;
78
- private readonly footer;
79
- constructor(body?: string);
80
- code(): string;
81
- isEmpty(): boolean;
82
- append(code: CodeInjection | string): void;
83
- clear(): void;
84
- clone(): CodeInjection;
85
- }
86
- export {};
87
- //# sourceMappingURL=utils.d.ts.map
@@ -1,2 +0,0 @@
1
- export declare const LIB_VERSION = "10.70.0";
2
- //# sourceMappingURL=version.d.ts.map
@@ -1,6 +0,0 @@
1
- import { Options } from '../core';
2
- export declare function sentryEsbuildPlugin(userOptions?: Options): any;
3
- export default sentryEsbuildPlugin;
4
- export { Options as SentryEsbuildPluginOptions } from '../core';
5
- export { sentryCliBinaryExists } from '../core';
6
- //# sourceMappingURL=index.d.ts.map
@@ -1,67 +0,0 @@
1
- import { Options } from '../core';
2
- import { ComponentAnnotationTransformMeta } from '../core/component-annotation-vite';
3
- import { SourceMap } from 'magic-string';
4
- import MagicString from 'magic-string';
5
- type TransformResult = {
6
- code: string;
7
- map?: SourceMap | string | {
8
- mappings: string;
9
- } | null;
10
- } | null | undefined;
11
- /**
12
- * @ignore - this is the internal plugin factory function only used for the Vite plugin!
13
- */
14
- export declare function _rollupPluginInternal(userOptions: Options | undefined, buildTool: 'rollup' | 'vite', buildToolMajorVersion?: string): {
15
- name: string;
16
- buildStart?: undefined;
17
- transform?: undefined;
18
- renderChunk?: undefined;
19
- writeBundle?: undefined;
20
- } | {
21
- name: string;
22
- buildStart: () => void;
23
- transform: ((code: string, id: string, meta?: ComponentAnnotationTransformMeta) => Promise<TransformResult>) | {
24
- filter: {
25
- id: RegExp;
26
- };
27
- handler: (code: string, id: string, meta?: ComponentAnnotationTransformMeta) => Promise<TransformResult>;
28
- };
29
- renderChunk: (code: string, chunk: {
30
- fileName: string;
31
- facadeModuleId?: string | null;
32
- }, _?: unknown, meta?: {
33
- magicString?: MagicString;
34
- }) => {
35
- code: string;
36
- map?: SourceMap;
37
- } | null;
38
- writeBundle: (outputOptions: {
39
- dir?: string;
40
- file?: string;
41
- }, bundle: {
42
- [fileName: string]: unknown;
43
- }) => Promise<void>;
44
- } | {
45
- name: string;
46
- buildStart: () => void;
47
- renderChunk: (code: string, chunk: {
48
- fileName: string;
49
- facadeModuleId?: string | null;
50
- }, _?: unknown, meta?: {
51
- magicString?: MagicString;
52
- }) => {
53
- code: string;
54
- map?: SourceMap;
55
- } | null;
56
- writeBundle: (outputOptions: {
57
- dir?: string;
58
- file?: string;
59
- }, bundle: {
60
- [fileName: string]: unknown;
61
- }) => Promise<void>;
62
- transform?: undefined;
63
- };
64
- export declare function sentryRollupPlugin(userOptions?: Options): any;
65
- export { Options as SentryRollupPluginOptions } from '../core';
66
- export { sentryCliBinaryExists } from '../core';
67
- //# sourceMappingURL=index.d.ts.map
@@ -1,9 +0,0 @@
1
- import { SentryRollupPluginOptions } from '../rollup';
2
- interface SentryVitePlugin {
3
- name: string;
4
- enforce: 'pre';
5
- }
6
- export declare const sentryVitePlugin: (options?: SentryRollupPluginOptions) => SentryVitePlugin[];
7
- export { Options as SentryVitePluginOptions } from '../core';
8
- export { sentryCliBinaryExists } from '../core';
9
- //# sourceMappingURL=index.d.ts.map
@@ -1,11 +0,0 @@
1
- export default function transform(this: {
2
- async: () => (err: Error | null, content?: string, sourceMap?: unknown) => void;
3
- resourcePath: string;
4
- query: {
5
- transform?: (code: string, id: string) => Promise<{
6
- code: string;
7
- map?: unknown;
8
- } | null | undefined | string>;
9
- };
10
- }, source: string, map: unknown): Promise<void>;
11
- //# sourceMappingURL=component-annotation-transform.d.ts.map
@@ -1,5 +0,0 @@
1
- import { SentryWebpackPluginOptions } from './webpack4and5';
2
- export declare const sentryWebpackPlugin: (options?: SentryWebpackPluginOptions) => any;
3
- export { sentryCliBinaryExists } from '../core';
4
- export { SentryWebpackPluginOptions };
5
- //# sourceMappingURL=index.d.ts.map
@@ -1,99 +0,0 @@
1
- import { Options } from '../core/index';
2
- type UnsafeBannerPlugin = {
3
- new (options: any): unknown;
4
- };
5
- type UnsafeDefinePlugin = {
6
- new (options: any): unknown;
7
- };
8
- type WebpackModule = {
9
- resource?: string;
10
- };
11
- type WebpackLoaderCallback = (err: Error | null, content?: string, sourceMap?: unknown) => void;
12
- type WebpackLoaderContext = {
13
- callback: WebpackLoaderCallback;
14
- };
15
- type WebpackCompilationContext = {
16
- compiler: {
17
- webpack?: {
18
- NormalModule?: {
19
- getCompilationHooks: (compilation: WebpackCompilationContext) => {
20
- loader: {
21
- tap: (name: string, callback: (loaderContext: WebpackLoaderContext, module: WebpackModule) => void) => void;
22
- };
23
- };
24
- };
25
- };
26
- };
27
- hooks: {
28
- normalModuleLoader?: {
29
- tap: (name: string, callback: (loaderContext: WebpackLoaderContext, module: WebpackModule) => void) => void;
30
- };
31
- };
32
- };
33
- type WebpackCompiler = {
34
- options: {
35
- plugins?: unknown[];
36
- mode?: string;
37
- module?: {
38
- rules?: unknown[];
39
- };
40
- };
41
- hooks: {
42
- thisCompilation: {
43
- tap: (name: string, callback: (compilation: WebpackCompilationContext) => void) => void;
44
- };
45
- afterEmit: {
46
- tapAsync: (name: string, callback: (compilation: WebpackCompilation, cb: () => void) => void) => void;
47
- };
48
- done: {
49
- tap: (name: string, callback: () => void) => void;
50
- };
51
- };
52
- webpack?: {
53
- BannerPlugin?: UnsafeBannerPlugin;
54
- DefinePlugin?: UnsafeDefinePlugin;
55
- };
56
- };
57
- type WebpackCompilation = {
58
- outputOptions: {
59
- path?: string;
60
- };
61
- assets: Record<string, unknown>;
62
- hooks: {
63
- processAssets: {
64
- tap: (options: {
65
- name: string;
66
- stage: number;
67
- }, callback: () => void) => void;
68
- };
69
- };
70
- };
71
- /**
72
- * The factory function accepts BannerPlugin and DefinePlugin classes in
73
- * order to avoid direct dependencies on webpack.
74
- *
75
- * This allow us to export version of the plugin for webpack 5.1+ and compatible environments.
76
- *
77
- * Since webpack 5.1 compiler contains webpack module so plugins always use correct webpack version.
78
- */
79
- export declare function sentryWebpackPluginFactory({ BannerPlugin: UnsafeBannerPlugin, DefinePlugin: UnsafeDefinePlugin, }?: {
80
- BannerPlugin?: UnsafeBannerPlugin;
81
- DefinePlugin?: UnsafeDefinePlugin;
82
- }): (userOptions?: SentryWebpackPluginOptions) => {
83
- apply(compiler: WebpackCompiler): void;
84
- };
85
- export type SentryWebpackPluginOptions = Options & {
86
- _experiments?: Options['_experiments'] & {
87
- /**
88
- * If enabled, the webpack plugin will exit the build process after the build completes.
89
- * Use this with caution, as it will terminate the process.
90
- *
91
- * More information: https://github.com/getsentry/sentry-javascript-bundler-plugins/issues/345
92
- *
93
- * @default false
94
- */
95
- forceExitOnBuildCompletion?: boolean;
96
- };
97
- };
98
- export {};
99
- //# sourceMappingURL=webpack4and5.d.ts.map
@@ -1,5 +0,0 @@
1
- import { SentryWebpackPluginOptions } from './webpack4and5';
2
- export declare const sentryWebpackPlugin: (options?: SentryWebpackPluginOptions) => any;
3
- export { sentryCliBinaryExists } from '../core';
4
- export { SentryWebpackPluginOptions };
5
- //# sourceMappingURL=webpack5.d.ts.map