Skip to content

Commit

Permalink
Automation
Browse files Browse the repository at this point in the history
  • Loading branch information
yoannmoinet committed Jun 24, 2024
1 parent 30871ce commit fb56bc8
Show file tree
Hide file tree
Showing 17 changed files with 133 additions and 1 deletion.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions LICENSES-3rdparty.csv
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ Component,Origin,Licence,Copyright
@tsconfig/node12,npm,MIT,(https://www.npmjs.com/package/@tsconfig/node12)
@tsconfig/node14,npm,MIT,(https://www.npmjs.com/package/@tsconfig/node14)
@tsconfig/node16,npm,MIT,(https://www.npmjs.com/package/@tsconfig/node16)
@types/async-retry,npm,MIT,(https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/async-retry)
@types/babel__core,npm,MIT,(https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__core)
@types/babel__generator,npm,MIT,(https://www.npmjs.com/package/@types/babel__generator)
@types/babel__preset-env,npm,MIT,(https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__preset-env)
Expand All @@ -200,6 +201,7 @@ Component,Origin,Licence,Copyright
@types/node,npm,MIT,(https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node)
@types/parse-json,npm,MIT,(https://www.npmjs.com/package/@types/parse-json)
@types/resolve,npm,MIT,(https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/resolve)
@types/retry,npm,MIT,(https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/retry)
@types/semver,npm,MIT,(https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/semver)
@types/stack-utils,npm,MIT,(https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stack-utils)
@types/wrap-ansi,npm,MIT,(https://www.npmjs.com/package/@types/wrap-ansi)
Expand Down Expand Up @@ -275,6 +277,7 @@ assert-plus,npm,MIT,Mark Cavage (https://www.npmjs.com/package/assert-plus)
assign-symbols,npm,MIT,Jon Schlinkert (https://github.com/jonschlinkert/assign-symbols)
astral-regex,npm,MIT,Kevin Mårtensson (github.com/kevva)
async-each,npm,MIT,Paul Miller (https://github.com/paulmillr/async-each/)
async-retry,npm,MIT,(https://www.npmjs.com/package/async-retry)
asynckit,npm,MIT,Alex Indigo (https://github.com/alexindigo/asynckit#readme)
atob,npm,(MIT OR Apache-2.0),AJ ONeal (https://git.coolaj86.com/coolaj86/atob.js.git)
available-typed-arrays,npm,MIT,Jordan Harband (https://github.com/inspect-js/available-typed-arrays#readme)
Expand Down Expand Up @@ -437,6 +440,7 @@ esrecurse,npm,BSD-2-Clause,(https://github.com/estools/esrecurse)
estraverse,npm,BSD-2-Clause,(https://github.com/estools/estraverse)
estree-walker,npm,MIT,Rich Harris (https://www.npmjs.com/package/estree-walker)
esutils,npm,BSD-2-Clause,(https://github.com/estools/esutils)
eventemitter3,npm,MIT,Arnout Kazemier (https://www.npmjs.com/package/eventemitter3)
events,npm,MIT,Irakli Gozalishvili (http://jeditoolkit.com)
evp_bytestokey,npm,MIT,Calvin Metcalf (https://github.com/crypto-browserify/EVP_BytesToKey)
execa,npm,MIT,Sindre Sorhus (sindresorhus.com)
Expand Down Expand Up @@ -697,9 +701,12 @@ os-homedir,npm,MIT,Sindre Sorhus (sindresorhus.com)
os-tmpdir,npm,MIT,Sindre Sorhus (sindresorhus.com)
osenv,npm,ISC,Isaac Z. Schlueter (http://blog.izs.me/)
outdent,npm,MIT,Andrew Bradley (https://github.com/cspotcode/outdent#readme)
p-finally,npm,MIT,Sindre Sorhus (sindresorhus.com)
p-limit,npm,MIT,Sindre Sorhus (sindresorhus.com)
p-locate,npm,MIT,Sindre Sorhus (sindresorhus.com)
p-map,npm,MIT,Sindre Sorhus (https://sindresorhus.com)
p-queue,npm,MIT,(https://www.npmjs.com/package/p-queue)
p-timeout,npm,MIT,Sindre Sorhus (sindresorhus.com)
p-try,npm,MIT,Sindre Sorhus (sindresorhus.com)
pad,npm,BSD-3-Clause,David Worms (https://github.com/adaltas/node-pad)
pako,npm,(MIT AND Zlib),(https://github.com/nodeca/pako)
Expand Down Expand Up @@ -771,6 +778,7 @@ resolve-url,npm,MIT,Simon Lydell (https://www.npmjs.com/package/resolve-url)
resolve.exports,npm,MIT,Luke Edwards (https://lukeed.com)
restore-cursor,npm,MIT,Sindre Sorhus (sindresorhus.com)
ret,npm,MIT,Roly Fentanes (https://github.com/fent)
retry,npm,MIT,Tim Koschützki (https://github.com/tim-kos/node-retry)
reusify,npm,MIT,Matteo Collina (https://github.com/mcollina/reusify#readme)
rimraf,npm,ISC,Isaac Z. Schlueter (http://blog.izs.me/)
ripemd160,npm,MIT,(https://www.npmjs.com/package/ripemd160)
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ A set of plugins to interact with Datadog directly from your builds.

<!-- #toc -->
- [Plugins](#plugins)
- [`rum` RUM Plugin](#rum-rum-plugin)
- [`telemetry` Telemetry Plugin](#telemetry-telemetry-plugin)
- [Configuration](#configuration)
- [`auth.apiKey`](#authapikey)
Expand All @@ -32,6 +33,12 @@ A set of plugins to interact with Datadog directly from your builds.
## Plugins

<!-- #list-of-packages -->
### `rum` RUM Plugin

> Interact with our Real User Monitoring product (RUM) in Datadog directly from your build system.
<kbd>[📝 Full documentation ➡️](./packages/plugins/rum#readme)</kbd>

### `telemetry` Telemetry Plugin

> Display and send telemetry data as metrics to Datadog.
Expand All @@ -52,6 +59,17 @@ A set of plugins to interact with Datadog directly from your builds.
endPoint?: string;
};
logLevel?: 'debug' | 'warn' | 'error' | 'none';
rum?: {
disabled?: boolean;
sourcemaps?: {
basePath: string;
dryRun?: boolean;
maxConcurrency?: number;
minifiedPathPrefix?: string;
releaseVersion: string;
service: string;
};
};
telemetry?: {
disabled?: boolean;
output?: boolean
Expand Down
3 changes: 3 additions & 0 deletions packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// Copyright 2019-Present Datadog, Inc.

// #imports-injection-marker
import type { RumOptions } from '@dd/rum-plugins/types';
import type * as rum from '@dd/rum-plugins';
import type { TelemetryOptions } from '@dd/telemetry-plugins/types';
import type * as telemetry from '@dd/telemetry-plugins';
// #imports-injection-marker
Expand Down Expand Up @@ -50,6 +52,7 @@ export interface GetPluginsOptions {
export interface Options extends GetPluginsOptions {
// Each product should have a unique entry.
// #types-injection-marker
[rum.CONFIG_KEY]?: RumOptions;
[telemetry.CONFIG_KEY]?: TelemetryOptions;
// #types-injection-marker
}
Expand Down
1 change: 1 addition & 0 deletions packages/esbuild-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export type { Options as EsbuildPluginOptions } from '@dd/core/types';

export type {
// #types-export-injection-marker
RumTypes,
TelemetryTypes,
// #types-export-injection-marker
} from '@dd/factory';
1 change: 1 addition & 0 deletions packages/factory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
},
"dependencies": {
"@dd/core": "workspace:*",
"@dd/rum-plugins": "workspace:*",
"@dd/telemetry-plugins": "workspace:*",
"unplugin": "1.10.1"
}
Expand Down
7 changes: 7 additions & 0 deletions packages/factory/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { getInternalPlugins } from '@dd/core/plugins/index';
import type { Options } from '@dd/core/types';

// #imports-injection-marker
import type { OptionsWithRum } from '@dd/rum-plugins/types';
import * as rum from '@dd/rum-plugins';
import type { OptionsWithTelemetry } from '@dd/telemetry-plugins/types';
import * as telemetry from '@dd/telemetry-plugins';
// #imports-injection-marker
Expand All @@ -20,12 +22,14 @@ import type { UnpluginContextMeta, UnpluginInstance, UnpluginOptions } from 'unp
import { createUnplugin } from 'unplugin';

// #types-export-injection-marker
export type { types as RumTypes } from '@dd/rum-plugins';
export type { types as TelemetryTypes } from '@dd/telemetry-plugins';
// #types-export-injection-marker

export const helpers = {
// Each product should have a unique entry.
// #helpers-injection-marker
[rum.CONFIG_KEY]: rum.helpers,
[telemetry.CONFIG_KEY]: telemetry.helpers,
// #helpers-injection-marker
};
Expand All @@ -51,6 +55,9 @@ export const buildPluginFactory = ({

// Based on configuration add corresponding plugin.
// #configs-injection-marker
if (options[rum.CONFIG_KEY] && options[rum.CONFIG_KEY].disabled !== true) {
plugins.push(...rum.getPlugins(options as OptionsWithRum, globalContext));
}
if (options[telemetry.CONFIG_KEY] && options[telemetry.CONFIG_KEY].disabled !== true) {
plugins.push(...telemetry.getPlugins(options as OptionsWithTelemetry, globalContext));
}
Expand Down
1 change: 1 addition & 0 deletions packages/webpack-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export type { Options as EsbuildPluginOptions } from '@dd/core/types';

export type {
// #types-export-injection-marker
RumTypes,
TelemetryTypes,
// #types-export-injection-marker
} from '@dd/factory';
95 changes: 94 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1750,11 +1750,28 @@ __metadata:
resolution: "@dd/factory@workspace:packages/factory"
dependencies:
"@dd/core": "workspace:*"
"@dd/rum-plugins": "workspace:*"
"@dd/telemetry-plugins": "workspace:*"
unplugin: "npm:1.10.1"
languageName: unknown
linkType: soft

"@dd/rum-plugins@workspace:*, @dd/rum-plugins@workspace:packages/plugins/rum":
version: 0.0.0-use.local
resolution: "@dd/rum-plugins@workspace:packages/plugins/rum"
dependencies:
"@dd/core": "workspace:*"
"@types/async-retry": "npm:1.4.8"
async-retry: "npm:1.3.3"
chalk: "npm:2.3.1"
form-data: "npm:4.0.0"
glob: "npm:7.1.6"
outdent: "npm:0.8.0"
p-queue: "npm:6.6.2"
unplugin: "npm:1.10.1"
languageName: unknown
linkType: soft

"@dd/telemetry-plugins@workspace:*, @dd/telemetry-plugins@workspace:packages/plugins/telemetry":
version: 0.0.0-use.local
resolution: "@dd/telemetry-plugins@workspace:packages/plugins/telemetry"
Expand Down Expand Up @@ -2777,6 +2794,15 @@ __metadata:
languageName: node
linkType: hard

"@types/async-retry@npm:1.4.8":
version: 1.4.8
resolution: "@types/async-retry@npm:1.4.8"
dependencies:
"@types/retry": "npm:*"
checksum: 10/5d4b0b786e2506ab690c311d55a8000c3675cf1036290ad3b83af11ad791c62c9e16e7ff5a6dac3fae557404127451e72c297d711701015b027227586368eaf5
languageName: node
linkType: hard

"@types/babel__core@npm:^7, @types/babel__core@npm:^7.1.14":
version: 7.20.5
resolution: "@types/babel__core@npm:7.20.5"
Expand Down Expand Up @@ -3014,6 +3040,13 @@ __metadata:
languageName: node
linkType: hard

"@types/retry@npm:*":
version: 0.12.5
resolution: "@types/retry@npm:0.12.5"
checksum: 10/3fb6bf91835ca0eb2987567d6977585235a7567f8aeb38b34a8bb7bbee57ac050ed6f04b9998cda29701b8c893f5dfe315869bc54ac17e536c9235637fe351a2
languageName: node
linkType: hard

"@types/semver@npm:^7.5.0":
version: 7.5.8
resolution: "@types/semver@npm:7.5.8"
Expand Down Expand Up @@ -3941,6 +3974,15 @@ __metadata:
languageName: node
linkType: hard

"async-retry@npm:1.3.3":
version: 1.3.3
resolution: "async-retry@npm:1.3.3"
dependencies:
retry: "npm:0.13.1"
checksum: 10/38a7152ff7265a9321ea214b9c69e8224ab1febbdec98efbbde6e562f17ff68405569b796b1c5271f354aef8783665d29953f051f68c1fc45306e61aec82fdc4
languageName: node
linkType: hard

"asynckit@npm:^0.4.0":
version: 0.4.0
resolution: "asynckit@npm:0.4.0"
Expand Down Expand Up @@ -4763,7 +4805,7 @@ __metadata:
languageName: node
linkType: hard

"combined-stream@npm:^1.0.6, combined-stream@npm:~1.0.6":
"combined-stream@npm:^1.0.6, combined-stream@npm:^1.0.8, combined-stream@npm:~1.0.6":
version: 1.0.8
resolution: "combined-stream@npm:1.0.8"
dependencies:
Expand Down Expand Up @@ -5958,6 +6000,13 @@ __metadata:
languageName: node
linkType: hard

"eventemitter3@npm:^4.0.4":
version: 4.0.7
resolution: "eventemitter3@npm:4.0.7"
checksum: 10/8030029382404942c01d0037079f1b1bc8fed524b5849c237b80549b01e2fc49709e1d0c557fa65ca4498fc9e24cff1475ef7b855121fcc15f9d61f93e282346
languageName: node
linkType: hard

"events@npm:^3.0.0, events@npm:^3.2.0":
version: 3.3.0
resolution: "events@npm:3.3.0"
Expand Down Expand Up @@ -6313,6 +6362,17 @@ __metadata:
languageName: node
linkType: hard

"form-data@npm:4.0.0":
version: 4.0.0
resolution: "form-data@npm:4.0.0"
dependencies:
asynckit: "npm:^0.4.0"
combined-stream: "npm:^1.0.8"
mime-types: "npm:^2.1.12"
checksum: 10/7264aa760a8cf09482816d8300f1b6e2423de1b02bba612a136857413fdc96d7178298ced106817655facc6b89036c6e12ae31c9eb5bdc16aabf502ae8a5d805
languageName: node
linkType: hard

"form-data@npm:~2.3.2":
version: 2.3.3
resolution: "form-data@npm:2.3.3"
Expand Down Expand Up @@ -9096,6 +9156,13 @@ __metadata:
languageName: node
linkType: hard

"p-finally@npm:^1.0.0":
version: 1.0.0
resolution: "p-finally@npm:1.0.0"
checksum: 10/93a654c53dc805dd5b5891bab16eb0ea46db8f66c4bfd99336ae929323b1af2b70a8b0654f8f1eae924b2b73d037031366d645f1fd18b3d30cbd15950cc4b1d4
languageName: node
linkType: hard

"p-limit@npm:^2.0.0, p-limit@npm:^2.2.0":
version: 2.3.0
resolution: "p-limit@npm:2.3.0"
Expand Down Expand Up @@ -9150,6 +9217,25 @@ __metadata:
languageName: node
linkType: hard

"p-queue@npm:6.6.2":
version: 6.6.2
resolution: "p-queue@npm:6.6.2"
dependencies:
eventemitter3: "npm:^4.0.4"
p-timeout: "npm:^3.2.0"
checksum: 10/60fe227ffce59fbc5b1b081305b61a2f283ff145005853702b7d4d3f99a0176bd21bb126c99a962e51fe1e01cb8aa10f0488b7bbe73b5dc2e84b5cc650b8ffd2
languageName: node
linkType: hard

"p-timeout@npm:^3.2.0":
version: 3.2.0
resolution: "p-timeout@npm:3.2.0"
dependencies:
p-finally: "npm:^1.0.0"
checksum: 10/3dd0eaa048780a6f23e5855df3dd45c7beacff1f820476c1d0d1bcd6648e3298752ba2c877aa1c92f6453c7dd23faaf13d9f5149fc14c0598a142e2c5e8d649c
languageName: node
linkType: hard

"p-try@npm:^2.0.0":
version: 2.2.0
resolution: "p-try@npm:2.2.0"
Expand Down Expand Up @@ -9912,6 +9998,13 @@ __metadata:
languageName: node
linkType: hard

"retry@npm:0.13.1":
version: 0.13.1
resolution: "retry@npm:0.13.1"
checksum: 10/6125ec2e06d6e47e9201539c887defba4e47f63471db304c59e4b82fc63c8e89ca06a77e9d34939a9a42a76f00774b2f46c0d4a4cbb3e287268bd018ed69426d
languageName: node
linkType: hard

"reusify@npm:^1.0.4":
version: 1.0.4
resolution: "reusify@npm:1.0.4"
Expand Down

0 comments on commit fb56bc8

Please sign in to comment.