@datadog/rollup-plugin 2.2.0-dev-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/README.md +40 -0
- package/dist/src/index.d.ts +85 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +27053 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/index.mjs +27030 -0
- package/dist/src/index.mjs.map +1 -0
- package/package.json +76 -0
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Datadog Rollup Plugin
|
|
2
|
+
|
|
3
|
+
A Rollup plugin to interact with Datadog from your builds.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
- Yarn
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
yarn add -D @datadog/rollup-plugin
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
- NPM
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install --save-dev @datadog/rollup-plugin
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
Inside your `rollup.config.js`.
|
|
22
|
+
|
|
23
|
+
```js
|
|
24
|
+
import { datadogRollupPlugin } from '@datadog/rollup-plugin';
|
|
25
|
+
|
|
26
|
+
export default {
|
|
27
|
+
plugins: [
|
|
28
|
+
datadogRollupPlugin({
|
|
29
|
+
// Configuration
|
|
30
|
+
}),
|
|
31
|
+
],
|
|
32
|
+
};
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
> [!TIP]
|
|
36
|
+
> It is important to have the plugin in the first position in order to report every other plugins.
|
|
37
|
+
|
|
38
|
+
## Configuration
|
|
39
|
+
|
|
40
|
+
Check the main [README](../../README.md#configuration) for the common configuration options.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import * as rollup from 'rollup';
|
|
2
|
+
import * as src from 'src';
|
|
3
|
+
|
|
4
|
+
declare const CONFIG_KEY$1: "rum";
|
|
5
|
+
|
|
6
|
+
type MinifiedPathPrefix = `http://${string}` | `https://${string}` | `/${string}`;
|
|
7
|
+
type RumSourcemapsOptions = {
|
|
8
|
+
bailOnError?: boolean;
|
|
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
|
+
};
|
|
36
|
+
|
|
37
|
+
type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'none';
|
|
38
|
+
type AuthOptions = {
|
|
39
|
+
apiKey?: string;
|
|
40
|
+
endPoint?: string;
|
|
41
|
+
};
|
|
42
|
+
interface GetPluginsOptions {
|
|
43
|
+
auth?: AuthOptions;
|
|
44
|
+
disableGit?: boolean;
|
|
45
|
+
logLevel?: LogLevel;
|
|
46
|
+
}
|
|
47
|
+
interface Options extends GetPluginsOptions {
|
|
48
|
+
[CONFIG_KEY$1]?: RumOptions;
|
|
49
|
+
[CONFIG_KEY]?: TelemetryOptions;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
interface Metric {
|
|
53
|
+
metric: string;
|
|
54
|
+
type: 'count' | 'size' | 'duration';
|
|
55
|
+
value: number;
|
|
56
|
+
tags: string[];
|
|
57
|
+
}
|
|
58
|
+
type Filter = (metric: Metric) => Metric | null;
|
|
59
|
+
type OutputOptions = boolean | string | {
|
|
60
|
+
destination: string;
|
|
61
|
+
timings?: boolean;
|
|
62
|
+
dependencies?: boolean;
|
|
63
|
+
bundler?: boolean;
|
|
64
|
+
metrics?: boolean;
|
|
65
|
+
logs?: boolean;
|
|
66
|
+
};
|
|
67
|
+
type TelemetryOptions = {
|
|
68
|
+
disabled?: boolean;
|
|
69
|
+
output?: OutputOptions;
|
|
70
|
+
prefix?: string;
|
|
71
|
+
tags?: string[];
|
|
72
|
+
timestamp?: number;
|
|
73
|
+
filters?: Filter[];
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
declare const helpers: {
|
|
77
|
+
telemetry: {
|
|
78
|
+
filters: ((metric: Metric) => Metric | null)[];
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
declare const datadogRollupPlugin: (options: src.RollupPluginOptions) => rollup.Plugin<any>[];
|
|
83
|
+
|
|
84
|
+
export { type Options as RollupPluginOptions, type types$1 as RumTypes, type types as TelemetryTypes, datadogRollupPlugin, helpers };
|
|
85
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|