@datadog/esbuild-plugin 2.0.1 → 2.0.2-dev-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.
@@ -1,19 +1,54 @@
1
1
  import * as esbuild from 'esbuild';
2
+ import * as src from 'src';
3
+
4
+ declare const CONFIG_KEY$1: "rum";
5
+
6
+ type MinifiedPathPrefix = `http://${string}` | `/${string}`;
7
+ type RumSourcemapsOptions = {
8
+ basePath: string;
9
+ dryRun?: boolean;
10
+ intakeUrl?: string;
11
+ maxConcurrency?: number;
12
+ minifiedPathPrefix: MinifiedPathPrefix;
13
+ releaseVersion: string;
14
+ service: string;
15
+ };
16
+ type RumOptions = {
17
+ disabled?: boolean;
18
+ sourcemaps?: RumSourcemapsOptions;
19
+ };
20
+ interface OptionsWithRum extends GetPluginsOptions {
21
+ [CONFIG_KEY$1]: RumOptions;
22
+ }
23
+
24
+ type types$1 = {
25
+ RumOptions: RumOptions;
26
+ OptionsWithRum: OptionsWithRum;
27
+ };
28
+
29
+ declare const CONFIG_KEY: "telemetry";
30
+
31
+ type types = {
32
+ Filter: Filter;
33
+ Metric: Metric;
34
+ TelemetryOptions: TelemetryOptions;
35
+ };
2
36
 
3
37
  type LogLevel = 'debug' | 'warn' | 'error' | 'none';
38
+ type AuthOptions = {
39
+ apiKey?: string;
40
+ endPoint?: string;
41
+ };
4
42
  interface GetPluginsOptions {
5
- auth?: {
6
- apiKey?: string;
7
- endPoint?: string;
8
- };
43
+ auth?: AuthOptions;
44
+ disableGit?: boolean;
9
45
  logLevel?: LogLevel;
10
46
  }
11
- interface GetPluginsOptionsWithCWD extends GetPluginsOptions {
12
- cwd: string;
47
+ interface Options extends GetPluginsOptions {
48
+ [CONFIG_KEY$1]?: RumOptions;
49
+ [CONFIG_KEY]?: TelemetryOptions;
13
50
  }
14
51
 
15
- declare const CONFIG_KEY: "telemetry";
16
-
17
52
  interface Metric {
18
53
  metric: string;
19
54
  type: 'count' | 'size' | 'duration';
@@ -37,29 +72,15 @@ type TelemetryOptions = {
37
72
  timestamp?: number;
38
73
  filters?: Filter[];
39
74
  };
40
- interface TelemetryOptionsEnabled extends TelemetryOptions {
41
- disabled?: false;
42
- }
43
- interface OptionsWithTelemetryEnabled extends GetPluginsOptionsWithCWD {
44
- [CONFIG_KEY]: TelemetryOptionsEnabled;
45
- }
46
75
 
47
- type types = {
48
- Metric: Metric;
49
- TelemetryOptions: TelemetryOptions;
50
- OptionsWithTelemetryEnabled: OptionsWithTelemetryEnabled;
51
- };
52
-
53
- interface Options extends GetPluginsOptions {
54
- [CONFIG_KEY]?: TelemetryOptions;
55
- }
56
76
  declare const helpers: {
77
+ rum: {};
57
78
  telemetry: {
58
79
  filters: ((metric: Metric) => Metric | null)[];
59
80
  };
60
81
  };
61
82
 
62
- declare const datadogEsbuildPlugin: (options: Options) => esbuild.Plugin;
83
+ declare const datadogEsbuildPlugin: (options: src.EsbuildPluginOptions) => esbuild.Plugin;
63
84
 
64
- export { type Options as EsbuildPluginOptions, type types as TelemetryTypes, datadogEsbuildPlugin, helpers };
85
+ export { type Options as EsbuildPluginOptions, type types$1 as RumTypes, type types as TelemetryTypes, datadogEsbuildPlugin, helpers };
65
86
  //# sourceMappingURL=index.d.ts.map