@datadog/webpack-plugin 2.0.2-dev-3 → 2.0.2-dev-5
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 +1 -1
- package/dist/src/index.js +14 -4
- package/dist/src/index.js.map +1 -1
- package/dist/src/index.mjs +14 -4
- package/dist/src/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/src/index.mjs
CHANGED
|
@@ -8861,6 +8861,9 @@ const log = (text, level, type = "debug", name) => {
|
|
|
8861
8861
|
} else if (type === "warn") {
|
|
8862
8862
|
color = chalk.yellow;
|
|
8863
8863
|
logFn = console.warn;
|
|
8864
|
+
} else if (type === "info") {
|
|
8865
|
+
color = chalk.cyan;
|
|
8866
|
+
logFn = console.log;
|
|
8864
8867
|
}
|
|
8865
8868
|
const prefix = name ? `[${chalk.bold(name)}] ` : "";
|
|
8866
8869
|
if (level === "debug" || level === "warn" && ["error", "warn"].includes(type) || level === "error" && type === "error") {
|
|
@@ -13597,6 +13600,7 @@ const getPayload = async (sourcemap, metadata, prefix, git) => {
|
|
|
13597
13600
|
|
|
13598
13601
|
const errorCodesNoRetry = [400, 403, 413];
|
|
13599
13602
|
const nbRetries = 5;
|
|
13603
|
+
const green = chalk.green.bold;
|
|
13600
13604
|
const doRequest = async (url, getData2, onRetry) => {
|
|
13601
13605
|
return retry$2(
|
|
13602
13606
|
async (bail, attempt) => {
|
|
@@ -13683,6 +13687,11 @@ const upload = async (payloads, options, context, log) => {
|
|
|
13683
13687
|
"DD-EVP-ORIGIN-VERSION": context.version
|
|
13684
13688
|
};
|
|
13685
13689
|
for (const payload of payloads) {
|
|
13690
|
+
const metadata = {
|
|
13691
|
+
sourcemap: payload.content.get("source_map")?.path,
|
|
13692
|
+
file: payload.content.get("minified_file")?.path
|
|
13693
|
+
};
|
|
13694
|
+
log(`Queuing ${green(metadata.sourcemap)} | ${green(metadata.file)}`);
|
|
13686
13695
|
queue.add(async () => {
|
|
13687
13696
|
await doRequest(
|
|
13688
13697
|
options.intakeUrl,
|
|
@@ -13695,6 +13704,7 @@ Retrying ${attempt}/${nbRetries}`,
|
|
|
13695
13704
|
);
|
|
13696
13705
|
}
|
|
13697
13706
|
);
|
|
13707
|
+
log(`Sent ${green(metadata.sourcemap)} | ${green(metadata.file)}`);
|
|
13698
13708
|
});
|
|
13699
13709
|
}
|
|
13700
13710
|
return queue.onIdle();
|
|
@@ -13736,12 +13746,12 @@ const sendSourcemaps = async (sourcemaps, options, context, log) => {
|
|
|
13736
13746
|
const uploadSourcemaps = async (options, context, log) => {
|
|
13737
13747
|
const green = chalk.green.bold;
|
|
13738
13748
|
const configurationString = Object.entries(options.sourcemaps).map(([key, value]) => ` - ${key}: ${green(value.toString())}`).join("\n");
|
|
13749
|
+
const sourcemaps = getSourcemapsFiles(options.sourcemaps);
|
|
13739
13750
|
const summary = defaultOutdent`
|
|
13740
|
-
Uploading
|
|
13751
|
+
Uploading ${green(sourcemaps.length.toString())} sourcemaps with configuration:
|
|
13741
13752
|
${configurationString}
|
|
13742
13753
|
`;
|
|
13743
|
-
log(summary);
|
|
13744
|
-
const sourcemaps = getSourcemapsFiles(options.sourcemaps);
|
|
13754
|
+
log(summary, "info");
|
|
13745
13755
|
await sendSourcemaps(sourcemaps, options.sourcemaps, context, log);
|
|
13746
13756
|
};
|
|
13747
13757
|
|
|
@@ -30120,7 +30130,7 @@ const buildPluginFactory = ({
|
|
|
30120
30130
|
|
|
30121
30131
|
var name = "@datadog/webpack-plugin";
|
|
30122
30132
|
var packageManager = "yarn@4.0.2";
|
|
30123
|
-
var version = "2.0.2-dev-
|
|
30133
|
+
var version = "2.0.2-dev-5";
|
|
30124
30134
|
var license = "MIT";
|
|
30125
30135
|
var author = "Datadog";
|
|
30126
30136
|
var description = "Datadog Webpack Plugin";
|