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

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/README.md CHANGED
@@ -37,4 +37,4 @@ export default {
37
37
 
38
38
  ## Configuration
39
39
 
40
- Check the main [README](../../README.md#configuration) for the common configuration options.
40
+ Check the main [README](/README.md#configuration) for the common configuration options.
@@ -2,6 +2,16 @@ import * as src from 'src';
2
2
  import rollup from 'rollup';
3
3
  import { UnpluginOptions } from 'unplugin';
4
4
 
5
+ declare class TrackedFilesMatcher {
6
+ private trackedFilenames;
7
+ constructor(trackedFiles: string[]);
8
+ private displaySource;
9
+ matchSourcemap(srcmapPath: string, onSourcesNotFound: (reason: string) => void): string[] | undefined;
10
+ matchSources(sources: string[]): string[];
11
+ rawTrackedFilesList(): string[];
12
+ private getFilename;
13
+ }
14
+
5
15
  declare const CONFIG_KEY$1: "rum";
6
16
 
7
17
  type MinifiedPathPrefix = `http://${string}` | `https://${string}` | `/${string}`;
@@ -35,16 +45,6 @@ type types = {
35
45
  TelemetryOptions: TelemetryOptions;
36
46
  };
37
47
 
38
- declare class TrackedFilesMatcher {
39
- private trackedFilenames;
40
- constructor(trackedFiles: string[]);
41
- private displaySource;
42
- matchSourcemap(srcmapPath: string, onSourcesNotFound: (reason: string) => void): string[] | undefined;
43
- matchSources(sources: string[]): string[];
44
- rawTrackedFilesList(): string[];
45
- private getFilename;
46
- }
47
-
48
48
  interface RepositoryData {
49
49
  hash: string;
50
50
  remote: string;
@@ -69,6 +69,12 @@ type Entry = Output & {
69
69
  type BuildReport = {
70
70
  errors: string[];
71
71
  warnings: string[];
72
+ logs: {
73
+ pluginName: string;
74
+ type: LogLevel;
75
+ message: string;
76
+ time: number;
77
+ }[];
72
78
  entries?: Entry[];
73
79
  inputs?: Input[];
74
80
  outputs?: Output[];
@@ -92,12 +98,21 @@ type ToInjectItem = {
92
98
  value: string;
93
99
  fallback?: ToInjectItem;
94
100
  };
101
+ type Logger = {
102
+ (text: any, type?: LogLevel): void;
103
+ error: (text: any) => void;
104
+ warn: (text: any) => void;
105
+ info: (text: any) => void;
106
+ debug: (text: any) => void;
107
+ };
108
+ type GetLogger = (name: string) => Logger;
95
109
  type GlobalContext = {
96
110
  auth?: AuthOptions;
97
111
  inject: (item: ToInjectItem) => void;
98
112
  bundler: BundlerReport;
99
113
  build: BuildReport;
100
114
  cwd: string;
115
+ getLogger: GetLogger;
101
116
  git?: RepositoryData;
102
117
  pluginNames: string[];
103
118
  start: number;
@@ -108,16 +123,17 @@ type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'none';
108
123
  type AuthOptions = {
109
124
  apiKey?: string;
110
125
  };
111
- interface GetPluginsOptions {
126
+ interface BaseOptions {
112
127
  auth?: AuthOptions;
113
128
  disableGit?: boolean;
114
129
  logLevel?: LogLevel;
115
130
  }
116
- interface Options extends GetPluginsOptions {
131
+ interface Options extends BaseOptions {
117
132
  [CONFIG_KEY$1]?: RumOptions;
118
133
  [CONFIG_KEY]?: TelemetryOptions;
119
134
  customPlugins?: GetCustomPlugins;
120
135
  }
136
+ type GetPluginsOptions = Required<BaseOptions>;
121
137
 
122
138
  interface Metric {
123
139
  metric: string;