@datadog/webpack-plugin 2.0.2-dev-3 → 2.0.2-dev-4

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.
@@ -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,13 @@ 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:
13695
+ sourcemap: ${green(metadata.sourcemap)}
13696
+ file: ${green(metadata.file)}`);
13686
13697
  queue.add(async () => {
13687
13698
  await doRequest(
13688
13699
  options.intakeUrl,
@@ -13736,12 +13747,12 @@ const sendSourcemaps = async (sourcemaps, options, context, log) => {
13736
13747
  const uploadSourcemaps = async (options, context, log) => {
13737
13748
  const green = chalk.green.bold;
13738
13749
  const configurationString = Object.entries(options.sourcemaps).map(([key, value]) => ` - ${key}: ${green(value.toString())}`).join("\n");
13750
+ const sourcemaps = getSourcemapsFiles(options.sourcemaps);
13739
13751
  const summary = defaultOutdent`
13740
- Uploading sourcemap with this configuration:
13752
+ Uploading ${green(sourcemaps.length.toString())} sourcemaps with configuration:
13741
13753
  ${configurationString}
13742
13754
  `;
13743
- log(summary);
13744
- const sourcemaps = getSourcemapsFiles(options.sourcemaps);
13755
+ log(summary, "info");
13745
13756
  await sendSourcemaps(sourcemaps, options.sourcemaps, context, log);
13746
13757
  };
13747
13758
 
@@ -30120,7 +30131,7 @@ const buildPluginFactory = ({
30120
30131
 
30121
30132
  var name = "@datadog/webpack-plugin";
30122
30133
  var packageManager = "yarn@4.0.2";
30123
- var version = "2.0.2-dev-3";
30134
+ var version = "2.0.2-dev-4";
30124
30135
  var license = "MIT";
30125
30136
  var author = "Datadog";
30126
30137
  var description = "Datadog Webpack Plugin";