@datadog/esbuild-plugin 2.3.0-dev → 2.3.0-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.
- package/dist/src/index.d.ts +61 -0
- package/dist/src/index.js +388 -186
- package/dist/src/index.js.map +1 -1
- package/dist/src/index.mjs +388 -186
- package/dist/src/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/src/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as esbuild from 'esbuild';
|
|
2
2
|
import * as src from 'src';
|
|
3
|
+
import { UnpluginOptions } from 'unplugin';
|
|
3
4
|
|
|
4
5
|
declare const CONFIG_KEY$1: "rum";
|
|
5
6
|
|
|
@@ -34,6 +35,65 @@ type types = {
|
|
|
34
35
|
TelemetryOptions: TelemetryOptions;
|
|
35
36
|
};
|
|
36
37
|
|
|
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
|
+
interface RepositoryData {
|
|
49
|
+
hash: string;
|
|
50
|
+
remote: string;
|
|
51
|
+
trackedFilesMatcher: TrackedFilesMatcher;
|
|
52
|
+
}
|
|
53
|
+
type File = {
|
|
54
|
+
filepath: string;
|
|
55
|
+
name: string;
|
|
56
|
+
size: number;
|
|
57
|
+
type: string;
|
|
58
|
+
};
|
|
59
|
+
type Input = File & {
|
|
60
|
+
dependencies: Set<Input>;
|
|
61
|
+
dependents: Set<Input>;
|
|
62
|
+
};
|
|
63
|
+
type Output = File & {
|
|
64
|
+
inputs: (Input | Output)[];
|
|
65
|
+
};
|
|
66
|
+
type Entry = Output & {
|
|
67
|
+
outputs: Output[];
|
|
68
|
+
};
|
|
69
|
+
type BuildReport = {
|
|
70
|
+
errors: string[];
|
|
71
|
+
warnings: string[];
|
|
72
|
+
entries?: Entry[];
|
|
73
|
+
inputs?: Input[];
|
|
74
|
+
outputs?: Output[];
|
|
75
|
+
start?: number;
|
|
76
|
+
end?: number;
|
|
77
|
+
duration?: number;
|
|
78
|
+
writeDuration?: number;
|
|
79
|
+
};
|
|
80
|
+
type BundlerReport = {
|
|
81
|
+
name: string;
|
|
82
|
+
fullName: string;
|
|
83
|
+
outDir: string;
|
|
84
|
+
rawConfig?: any;
|
|
85
|
+
variant?: string;
|
|
86
|
+
};
|
|
87
|
+
type GlobalContext = {
|
|
88
|
+
auth?: AuthOptions;
|
|
89
|
+
bundler: BundlerReport;
|
|
90
|
+
build: BuildReport;
|
|
91
|
+
cwd: string;
|
|
92
|
+
git?: RepositoryData;
|
|
93
|
+
start: number;
|
|
94
|
+
version: string;
|
|
95
|
+
};
|
|
96
|
+
type GetCustomPlugins<T> = (options: T, context: GlobalContext) => UnpluginOptions[];
|
|
37
97
|
type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'none';
|
|
38
98
|
type AuthOptions = {
|
|
39
99
|
apiKey?: string;
|
|
@@ -46,6 +106,7 @@ interface GetPluginsOptions {
|
|
|
46
106
|
interface Options extends GetPluginsOptions {
|
|
47
107
|
[CONFIG_KEY$1]?: RumOptions;
|
|
48
108
|
[CONFIG_KEY]?: TelemetryOptions;
|
|
109
|
+
customPlugins?: GetCustomPlugins<Options>;
|
|
49
110
|
}
|
|
50
111
|
|
|
51
112
|
interface Metric {
|