@datadog/rspack-plugin 3.2.12 → 3.4.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.
@@ -9,36 +9,24 @@ declare class TrackedFilesMatcher {
9
9
  rawTrackedFilesList(): string[];
10
10
  private getFilename;
11
11
  }
12
- type AuthMethod = "apiKey" | "oauth";
13
- type AppsProtectionLevel = "direct_publish" | "approval_required";
12
+ type LongPollingOptions = {
13
+ /** Max long-poll attempts. `1` polls once and never retries. Default: `10`. */
14
+ maxRetries?: number;
15
+ /** Randomize retry delays so concurrent pollers don't sync up. Default: `true`. */
16
+ jitter?: boolean;
17
+ /** Grow the delay between retries exponentially. Default: `true`. */
18
+ exponentialBackoff?: boolean;
19
+ /**
20
+ * Deadline for one attempt, in ms. Must stay above the server's ~30s window,
21
+ * otherwise healthy polls get aborted. Default: `40000`.
22
+ */
23
+ timeoutMs?: number;
24
+ };
14
25
  type AppsOptions = {
15
26
  enable?: boolean;
16
27
  include?: string[];
17
- dryRun?: boolean;
18
- identifier?: string;
19
- name?: string;
20
- /** Human-readable description of the app. */
21
- description?: string;
22
- /** When true, the app appears in the Datadog self-service catalog. */
23
- selfService?: boolean;
24
- /** Deployment and identity settings for the app. */
25
- permissions?: {
26
- /**
27
- * Controls whether publishing the app requires a second approver.
28
- * - `direct_publish`: any user with publish rights can deploy immediately.
29
- * - `approval_required`: a second user must approve before the app goes live.
30
- */
31
- protectionLevel?: AppsProtectionLevel;
32
- /**
33
- * UUID of the service account the app's backend functions run as.
34
- * When omitted the app runs as the uploading user.
35
- * Only service accounts are accepted; arbitrary user UUIDs are rejected by the API.
36
- */
37
- runAs?: string;
38
- };
39
- authOverrides?: {
40
- method?: AuthMethod;
41
- };
28
+ /** Controls how the dev server retries the Datadog long-poll execution endpoint. */
29
+ longPolling?: LongPollingOptions;
42
30
  };
43
31
  declare const CONFIG_KEY: "apps";
44
32
  declare const PLUGIN_NAME: PluginName;
@@ -47,14 +35,24 @@ type types = {
47
35
  };
48
36
  declare const getPlugins: GetPlugins;
49
37
  type MinifiedPathPrefix = `http://${string}` | `https://${string}` | `/${string}`;
50
- type SourcemapsOptions = {
38
+ type SourcemapsUploadOptions = {
51
39
  bailOnError?: boolean;
52
40
  dryRun?: boolean;
53
41
  maxConcurrency?: number;
42
+ };
43
+ type DebugIdSourcemapsOptions = SourcemapsUploadOptions & {
44
+ debugId: true;
45
+ minifiedPathPrefix?: never;
46
+ releaseVersion?: never;
47
+ service?: never;
48
+ };
49
+ type ServiceVersionSourcemapsOptions = SourcemapsUploadOptions & {
50
+ debugId?: false;
54
51
  minifiedPathPrefix: MinifiedPathPrefix;
55
52
  releaseVersion?: string;
56
53
  service: string;
57
54
  };
55
+ type SourcemapsOptions = DebugIdSourcemapsOptions | ServiceVersionSourcemapsOptions;
58
56
  type ErrorTrackingOptions = {
59
57
  enable?: boolean;
60
58
  sourcemaps?: SourcemapsOptions;
@@ -74,21 +72,31 @@ declare const VALID_FUNCTION_KINDS: readonly [
74
72
  "classPrivateMethod"
75
73
  ];
76
74
  type FunctionKind = (typeof VALID_FUNCTION_KINDS)[number];
75
+ type FileExtensions = string[] | "all";
76
+ declare const VALID_DECORATOR_SYNTAXES: readonly [
77
+ "legacy",
78
+ "modern"
79
+ ];
80
+ type DecoratorSyntax = (typeof VALID_DECORATOR_SYNTAXES)[number];
77
81
  type LiveDebuggerOptions = {
78
82
  enable?: boolean;
79
83
  include?: (string | RegExp)[];
80
84
  exclude?: (string | RegExp)[];
85
+ fileExtensions?: FileExtensions;
81
86
  honorSkipComments?: boolean;
82
87
  functionTypes?: FunctionKind[];
83
88
  namedOnly?: boolean;
89
+ decorators?: DecoratorSyntax;
84
90
  };
85
91
  type LiveDebuggerOptionsWithDefaults = {
86
92
  version: string | undefined;
87
93
  include: (string | RegExp)[];
88
94
  exclude: (string | RegExp)[];
95
+ fileExtensions: FileExtensions;
89
96
  honorSkipComments: boolean;
90
97
  functionTypes: FunctionKind[] | undefined;
91
98
  namedOnly: boolean;
99
+ decorators: DecoratorSyntax;
92
100
  };
93
101
  declare const CONFIG_KEY$2: "liveDebugger";
94
102
  declare const PLUGIN_NAME$2: PluginName;
@@ -5097,11 +5105,17 @@ interface PrivacyOptions {
5097
5105
  addToDictionaryFunctionName?: string;
5098
5106
  helperCodeExpression?: string;
5099
5107
  }
5100
- type SourceCodeContextOptions = {
5108
+ type DebugIdSourceCodeContextOptions = {
5109
+ debugId: true;
5101
5110
  service?: string;
5102
5111
  version?: string;
5103
- debugId?: boolean;
5104
5112
  };
5113
+ type ServiceVersionSourceCodeContextOptions = {
5114
+ debugId?: false;
5115
+ service: string;
5116
+ version?: string;
5117
+ };
5118
+ type SourceCodeContextOptions = DebugIdSourceCodeContextOptions | ServiceVersionSourceCodeContextOptions;
5105
5119
  type RumOptions = {
5106
5120
  enable?: boolean;
5107
5121
  sdk?: SDKOptions;
@@ -5293,6 +5307,8 @@ type Env = (typeof ALL_ENVS)[number];
5293
5307
  type TriggerHook<R> = <K extends keyof CustomHooks>(name: K, ...args: Parameters<NonNullable<CustomHooks[K]>>) => R;
5294
5308
  type GlobalContext = {
5295
5309
  addMetric: (metric: Metric) => void;
5310
+ artifactsPending: boolean;
5311
+ artifactsReady: Promise<void>;
5296
5312
  asyncHook: TriggerHook<Promise<void[]>>;
5297
5313
  auth: AuthOptionsWithDefaults;
5298
5314
  build: BuildReport;
@@ -5303,6 +5319,8 @@ type GlobalContext = {
5303
5319
  git?: RepositoryData;
5304
5320
  hook: TriggerHook<void>;
5305
5321
  inject: (item: ToInjectItem) => void;
5322
+ markArtifactsPending: () => void;
5323
+ markArtifactsReady: (error?: unknown) => void;
5306
5324
  pluginNames: string[];
5307
5325
  plugins: (PluginOptions | CustomPluginOptions)[];
5308
5326
  queue: (promise: Promise<any>) => void;
@@ -5362,7 +5380,6 @@ type AuthOptions = {
5362
5380
  };
5363
5381
  type AuthOptionsWithDefaults = Omit<AuthOptions, "site"> & {
5364
5382
  site: Site$1;
5365
- siteSubdomain?: string;
5366
5383
  };
5367
5384
  interface BaseOptions {
5368
5385
  auth?: AuthOptions;
@@ -5370,6 +5387,21 @@ interface BaseOptions {
5370
5387
  enableGit?: boolean;
5371
5388
  logLevel?: LogLevel;
5372
5389
  }
5390
+ type SourcemapsUploadEnabledOptions = {
5391
+ upload: true;
5392
+ bailOnError?: boolean;
5393
+ dryRun?: boolean;
5394
+ maxConcurrency?: number;
5395
+ };
5396
+ type SourcemapsInjectionOnlyOptions = {
5397
+ upload?: false;
5398
+ bailOnError?: never;
5399
+ dryRun?: never;
5400
+ maxConcurrency?: never;
5401
+ };
5402
+ type SourcemapsOptions$1 = {
5403
+ debugId: true;
5404
+ } & (SourcemapsUploadEnabledOptions | SourcemapsInjectionOnlyOptions);
5373
5405
  interface Options extends BaseOptions {
5374
5406
  [CONFIG_KEY]?: AppsOptions;
5375
5407
  [CONFIG_KEY$1]?: ErrorTrackingOptions;
@@ -5377,6 +5409,7 @@ interface Options extends BaseOptions {
5377
5409
  [CONFIG_KEY$3]?: MetricsOptions;
5378
5410
  [CONFIG_KEY$4]?: OutputOptions;
5379
5411
  [rum.CONFIG_KEY]?: RumOptions;
5412
+ sourcemaps?: SourcemapsOptions$1;
5380
5413
  customPlugins?: GetCustomPlugins;
5381
5414
  }
5382
5415
  type OptionsWithDefaults = Assign<Assign<Options, Required<BaseOptions>>, {