@datadog/vite-plugin 2.3.3-dev-3 → 2.4.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,6 +1,5 @@
1
- import * as src from 'src';
2
- import vite from 'vite';
3
1
  import { UnpluginOptions } from 'unplugin';
2
+ import vite from 'vite';
4
3
 
5
4
  declare class TrackedFilesMatcher {
6
5
  private trackedFilenames;
@@ -161,7 +160,8 @@ type TelemetryOptions = {
161
160
  timestamp?: number;
162
161
  };
163
162
 
164
- declare const datadogVitePlugin: (options: src.VitePluginOptions) => vite.Plugin<any>[];
163
+ declare const datadogVitePlugin: (options: Options) => vite.Plugin<any>[];
164
+ type VitePluginOptions = Options;
165
165
 
166
166
  declare const version: string;
167
167
  declare const helpers: {
@@ -170,5 +170,5 @@ declare const helpers: {
170
170
  };
171
171
  };
172
172
 
173
- export { type types$1 as RumTypes, type types as TelemetryTypes, type Options as VitePluginOptions, datadogVitePlugin, helpers, version };
173
+ export { type types$1 as RumTypes, type types as TelemetryTypes, type VitePluginOptions, datadogVitePlugin, helpers, version };
174
174
  //# sourceMappingURL=index.d.ts.map
package/dist/src/index.js CHANGED
@@ -1448,7 +1448,9 @@ Metrics:
1448
1448
  return doRequest({
1449
1449
  method: "POST",
1450
1450
  url: `${auth.endPoint}/api/v1/series?api_key=${auth.apiKey}`,
1451
- getData: () => ({ data: JSON.stringify({ series: metrics }) })
1451
+ getData: () => ({
1452
+ data: JSON.stringify({ series: Array.from(metrics) })
1453
+ })
1452
1454
  }).then(() => {
1453
1455
  log.debug(`Sent metrics in ${formatDuration(Date.now() - startSending)}.`);
1454
1456
  }).catch((e) => {
@@ -2586,7 +2588,7 @@ const getXpackPlugin = (context, PLUGIN_NAME, log) => (compiler) => {
2586
2588
  )
2587
2589
  ).flatMap((c) => Array.from(c.files)).filter(
2588
2590
  (f) => f.includes(name) || entrypoint.name && f.includes(entrypoint.name)
2589
- )[0];
2591
+ ).find((f) => getType(f) === "js");
2590
2592
  for (const file2 of entryFiles) {
2591
2593
  const outputFound = reportOutputsIndexed.get(file2);
2592
2594
  if (!file2 || !outputFound) {
@@ -3123,7 +3125,7 @@ const buildPluginFactory = ({
3123
3125
 
3124
3126
  var name = "@datadog/vite-plugin";
3125
3127
  var packageManager = "yarn@4.0.2";
3126
- var version$1 = "2.3.3-dev-3";
3128
+ var version$1 = "2.4.1";
3127
3129
  var license = "MIT";
3128
3130
  var author = "Datadog";
3129
3131
  var description = "Datadog Vite Plugin";
@@ -3198,7 +3200,6 @@ var devDependencies = {
3198
3200
  var peerDependencies = {
3199
3201
  vite: "5.x"
3200
3202
  };
3201
- var stableVersion = "2.3.2";
3202
3203
  var pkg = {
3203
3204
  name: name,
3204
3205
  packageManager: packageManager,
@@ -3217,8 +3218,7 @@ var pkg = {
3217
3218
  scripts: scripts,
3218
3219
  dependencies: dependencies,
3219
3220
  devDependencies: devDependencies,
3220
- peerDependencies: peerDependencies,
3221
- stableVersion: stableVersion
3221
+ peerDependencies: peerDependencies
3222
3222
  };
3223
3223
 
3224
3224
  const datadogVitePlugin = buildPluginFactory({