@datadog/rollup-plugin 2.3.3-dev-2 → 2.3.3-dev-3

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.
@@ -45,6 +45,9 @@ type types = {
45
45
  TelemetryOptions: TelemetryOptions;
46
46
  };
47
47
 
48
+ declare const SUPPORTED_BUNDLERS: readonly ["webpack", "vite", "esbuild", "rollup", "rspack"];
49
+ declare const FULL_NAME_BUNDLERS: readonly ["webpack4", "webpack5", "vite", "esbuild", "rollup", "rspack"];
50
+
48
51
  interface RepositoryData {
49
52
  hash: string;
50
53
  remote: string;
@@ -83,8 +86,8 @@ type BuildReport = {
83
86
  duration?: number;
84
87
  writeDuration?: number;
85
88
  };
86
- type BundlerFullName = 'webpack5' | 'webpack4' | 'esbuild' | 'vite' | 'rollup';
87
- type BundlerName = 'webpack' | 'esbuild' | 'vite' | 'rollup';
89
+ type BundlerFullName = (typeof FULL_NAME_BUNDLERS)[number];
90
+ type BundlerName = (typeof SUPPORTED_BUNDLERS)[number];
88
91
  type BundlerReport = {
89
92
  name: BundlerName;
90
93
  fullName: BundlerFullName;
@@ -98,27 +101,26 @@ type ToInjectItem = {
98
101
  value: string;
99
102
  fallback?: ToInjectItem;
100
103
  };
104
+ type GetLogger = (name: string) => Logger;
101
105
  type Logger = {
102
- (text: any, type?: LogLevel): void;
106
+ getLogger: GetLogger;
103
107
  error: (text: any) => void;
104
108
  warn: (text: any) => void;
105
109
  info: (text: any) => void;
106
110
  debug: (text: any) => void;
107
111
  };
108
- type GetLogger = (name: string) => Logger;
109
112
  type GlobalContext = {
110
113
  auth?: AuthOptions;
111
114
  inject: (item: ToInjectItem) => void;
112
115
  bundler: BundlerReport;
113
116
  build: BuildReport;
114
117
  cwd: string;
115
- getLogger: GetLogger;
116
118
  git?: RepositoryData;
117
119
  pluginNames: string[];
118
120
  start: number;
119
121
  version: string;
120
122
  };
121
- type GetCustomPlugins = (options: Options, context: GlobalContext) => UnpluginOptions[];
123
+ type GetCustomPlugins = (options: Options, context: GlobalContext, log: Logger) => UnpluginOptions[];
122
124
  type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'none';
123
125
  type AuthOptions = {
124
126
  apiKey?: string;