@commercetools-frontend/mc-scripts 27.11.4 → 27.13.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.
Files changed (55) hide show
  1. package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.dev.js +7 -7
  2. package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +7 -7
  3. package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +7 -7
  4. package/dist/{build-d427cc55.cjs.dev.js → build-57cc074d.cjs.dev.js} +3 -3
  5. package/dist/{build-738937b8.esm.js → build-5e7d1303.esm.js} +3 -3
  6. package/dist/{build-dcf8a811.cjs.prod.js → build-7508f568.cjs.prod.js} +3 -3
  7. package/dist/{build-vite-782c1634.esm.js → build-vite-01e2aaf0.esm.js} +190 -8
  8. package/dist/{build-vite-0b37a521.cjs.prod.js → build-vite-600ec6bd.cjs.prod.js} +194 -10
  9. package/dist/{build-vite-dfe4ce01.cjs.dev.js → build-vite-fb6643b3.cjs.dev.js} +194 -10
  10. package/dist/commercetools-frontend-mc-scripts.cjs.dev.js +1 -1
  11. package/dist/commercetools-frontend-mc-scripts.cjs.prod.js +1 -1
  12. package/dist/commercetools-frontend-mc-scripts.esm.js +1 -1
  13. package/dist/{config-sync-da00aa73.cjs.prod.js → config-sync-4d2d7d71.cjs.prod.js} +3 -3
  14. package/dist/{config-sync-306de4b3.esm.js → config-sync-593781fd.esm.js} +3 -3
  15. package/dist/{config-sync-ci-1f379117.esm.js → config-sync-ci-1f59bf79.esm.js} +3 -3
  16. package/dist/{config-sync-ci-204935d0.cjs.dev.js → config-sync-ci-7b95c32a.cjs.dev.js} +3 -3
  17. package/dist/{config-sync-ci-fb0e16c7.cjs.prod.js → config-sync-ci-f33b765c.cjs.prod.js} +3 -3
  18. package/dist/{config-sync-e6e54b64.cjs.dev.js → config-sync-f8267173.cjs.dev.js} +3 -3
  19. package/dist/{config-sync-helpers-a2f1ee30.cjs.dev.js → config-sync-helpers-45798902.cjs.dev.js} +1 -1
  20. package/dist/{config-sync-helpers-8822bfdb.esm.js → config-sync-helpers-649b6c87.esm.js} +1 -1
  21. package/dist/{config-sync-helpers-2fafbdf1.cjs.prod.js → config-sync-helpers-ab74b949.cjs.prod.js} +1 -1
  22. package/dist/{create-postcss-config-56f928a7.esm.js → create-postcss-config-08564589.esm.js} +1 -1
  23. package/dist/{create-postcss-config-3d020253.cjs.prod.js → create-postcss-config-2b9affd5.cjs.prod.js} +1 -1
  24. package/dist/{create-postcss-config-ccd9b415.cjs.dev.js → create-postcss-config-5253f51d.cjs.dev.js} +1 -1
  25. package/dist/{create-webpack-config-for-development-d99a614c.cjs.prod.js → create-webpack-config-for-development-6e3e2752.cjs.prod.js} +1 -1
  26. package/dist/{create-webpack-config-for-development-c0021b0c.esm.js → create-webpack-config-for-development-83207381.esm.js} +1 -1
  27. package/dist/{create-webpack-config-for-development-c5c898e1.cjs.dev.js → create-webpack-config-for-development-febf2163.cjs.dev.js} +1 -1
  28. package/dist/{create-webpack-config-for-production-31127d3d.cjs.dev.js → create-webpack-config-for-production-351be45d.cjs.dev.js} +1 -1
  29. package/dist/{create-webpack-config-for-production-fa226ea4.cjs.prod.js → create-webpack-config-for-production-35502c64.cjs.prod.js} +1 -1
  30. package/dist/{create-webpack-config-for-production-035a881e.esm.js → create-webpack-config-for-production-d619b595.esm.js} +1 -1
  31. package/dist/{deployment-previews-set-26590354.cjs.prod.js → deployment-previews-set-33a3a023.cjs.prod.js} +2 -2
  32. package/dist/{deployment-previews-set-02e66e29.esm.js → deployment-previews-set-697801d9.esm.js} +2 -2
  33. package/dist/{deployment-previews-set-d5e2ff46.cjs.dev.js → deployment-previews-set-760532e0.cjs.dev.js} +2 -2
  34. package/dist/{graphql-requests-ff542936.cjs.dev.js → graphql-requests-3cc7deec.cjs.dev.js} +1 -1
  35. package/dist/{graphql-requests-df1c7e04.cjs.prod.js → graphql-requests-7ca459c8.cjs.prod.js} +1 -1
  36. package/dist/{graphql-requests-7c547b5e.esm.js → graphql-requests-e034376f.esm.js} +1 -1
  37. package/dist/{login-c0ae342d.cjs.prod.js → login-60fd6d4a.cjs.prod.js} +1 -1
  38. package/dist/{login-2ea29ce1.esm.js → login-d077a257.esm.js} +1 -1
  39. package/dist/{login-4f158db5.cjs.dev.js → login-f32f3623.cjs.dev.js} +1 -1
  40. package/dist/{package-29b56e71.cjs.prod.js → package-84973c56.cjs.dev.js} +1 -1
  41. package/dist/{package-7cca4865.esm.js → package-b717bf0d.esm.js} +1 -1
  42. package/dist/{package-784f191e.cjs.dev.js → package-d1a1140f.cjs.prod.js} +1 -1
  43. package/dist/{start-56f8d4d0.esm.js → start-59484653.esm.js} +3 -3
  44. package/dist/{start-e4cb978c.cjs.prod.js → start-9d09aeb0.cjs.prod.js} +3 -3
  45. package/dist/{start-0a01e27b.cjs.dev.js → start-a1034a4d.cjs.dev.js} +3 -3
  46. package/dist/{start-vite-dd8a1e26.cjs.prod.js → start-vite-69dc28cf.cjs.prod.js} +31 -1
  47. package/dist/{start-vite-698c9e82.cjs.dev.js → start-vite-a2daee6e.cjs.dev.js} +31 -1
  48. package/dist/{start-vite-4b0df191.esm.js → start-vite-f0085975.esm.js} +23 -1
  49. package/package.json +8 -8
  50. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.dev.js +2 -2
  51. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.prod.js +2 -2
  52. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.esm.js +2 -2
  53. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.dev.js +4 -4
  54. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.prod.js +4 -4
  55. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.esm.js +4 -4
@@ -10,7 +10,7 @@ var path = require('path');
10
10
  var commander = require('commander');
11
11
  var dotenv = require('dotenv');
12
12
  var dotenvExpand = require('dotenv-expand');
13
- var _package = require('../../dist/package-784f191e.cjs.dev.js');
13
+ var _package = require('../../dist/package-84973c56.cjs.dev.js');
14
14
  var doesFileExist = require('../../dist/does-file-exist-eb86baca.cjs.dev.js');
15
15
  require('node:fs');
16
16
 
@@ -72,7 +72,7 @@ async function run() {
72
72
  console.log('Experimental Vite bundler enabled! 🚀');
73
73
  console.log('');
74
74
  }
75
- const startCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/start-vite-698c9e82.cjs.dev.js'); }) : await Promise.resolve().then(function () { return require('../../dist/start-0a01e27b.cjs.dev.js'); });
75
+ const startCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/start-vite-a2daee6e.cjs.dev.js'); }) : await Promise.resolve().then(function () { return require('../../dist/start-a1034a4d.cjs.dev.js'); });
76
76
  await startCommand.default();
77
77
  });
78
78
 
@@ -91,7 +91,7 @@ async function run() {
91
91
  console.log('Experimental Vite bundler enabled! 🚀');
92
92
  console.log('');
93
93
  }
94
- const buildCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/build-vite-dfe4ce01.cjs.dev.js'); }) : await Promise.resolve().then(function () { return require('../../dist/build-d427cc55.cjs.dev.js'); });
94
+ const buildCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/build-vite-fb6643b3.cjs.dev.js'); }) : await Promise.resolve().then(function () { return require('../../dist/build-57cc074d.cjs.dev.js'); });
95
95
  await buildCommand.default();
96
96
  const shouldAlsoCompile = !options.buildOnly;
97
97
  if (shouldAlsoCompile) {
@@ -157,7 +157,7 @@ async function run() {
157
157
 
158
158
  // Do this as the first thing so that any code reading it knows the right env.
159
159
  process.env.NODE_ENV = 'production';
160
- const loginCommand = await Promise.resolve().then(function () { return require('../../dist/login-4f158db5.cjs.dev.js'); });
160
+ const loginCommand = await Promise.resolve().then(function () { return require('../../dist/login-f32f3623.cjs.dev.js'); });
161
161
  await loginCommand.default(options);
162
162
  });
163
163
 
@@ -171,7 +171,7 @@ async function run() {
171
171
 
172
172
  // Do this as the first thing so that any code reading it knows the right env.
173
173
  process.env.NODE_ENV = 'production';
174
- const configSyncCommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-e6e54b64.cjs.dev.js'); });
174
+ const configSyncCommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-f8267173.cjs.dev.js'); });
175
175
  await configSyncCommand.default(options);
176
176
  });
177
177
 
@@ -184,7 +184,7 @@ async function run() {
184
184
 
185
185
  // Do this as the first thing so that any code reading it knows the right env.
186
186
  process.env.NODE_ENV = 'production';
187
- const configSyncCICommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-ci-204935d0.cjs.dev.js'); });
187
+ const configSyncCICommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-ci-7b95c32a.cjs.dev.js'); });
188
188
  await configSyncCICommand.default(options);
189
189
  });
190
190
 
@@ -198,7 +198,7 @@ async function run() {
198
198
 
199
199
  // Do this as the first thing so that any code reading it knows the right env.
200
200
  process.env.NODE_ENV = 'production';
201
- const deploymentsSetCommand = await Promise.resolve().then(function () { return require('../../dist/deployment-previews-set-d5e2ff46.cjs.dev.js'); });
201
+ const deploymentsSetCommand = await Promise.resolve().then(function () { return require('../../dist/deployment-previews-set-760532e0.cjs.dev.js'); });
202
202
  await deploymentsSetCommand.default(options);
203
203
  });
204
204
  commander.program.parse();
@@ -10,7 +10,7 @@ var path = require('path');
10
10
  var commander = require('commander');
11
11
  var dotenv = require('dotenv');
12
12
  var dotenvExpand = require('dotenv-expand');
13
- var _package = require('../../dist/package-29b56e71.cjs.prod.js');
13
+ var _package = require('../../dist/package-d1a1140f.cjs.prod.js');
14
14
  var doesFileExist = require('../../dist/does-file-exist-be53305d.cjs.prod.js');
15
15
  require('node:fs');
16
16
 
@@ -72,7 +72,7 @@ async function run() {
72
72
  console.log('Experimental Vite bundler enabled! 🚀');
73
73
  console.log('');
74
74
  }
75
- const startCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/start-vite-dd8a1e26.cjs.prod.js'); }) : await Promise.resolve().then(function () { return require('../../dist/start-e4cb978c.cjs.prod.js'); });
75
+ const startCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/start-vite-69dc28cf.cjs.prod.js'); }) : await Promise.resolve().then(function () { return require('../../dist/start-9d09aeb0.cjs.prod.js'); });
76
76
  await startCommand.default();
77
77
  });
78
78
 
@@ -91,7 +91,7 @@ async function run() {
91
91
  console.log('Experimental Vite bundler enabled! 🚀');
92
92
  console.log('');
93
93
  }
94
- const buildCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/build-vite-0b37a521.cjs.prod.js'); }) : await Promise.resolve().then(function () { return require('../../dist/build-dcf8a811.cjs.prod.js'); });
94
+ const buildCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/build-vite-600ec6bd.cjs.prod.js'); }) : await Promise.resolve().then(function () { return require('../../dist/build-7508f568.cjs.prod.js'); });
95
95
  await buildCommand.default();
96
96
  const shouldAlsoCompile = !options.buildOnly;
97
97
  if (shouldAlsoCompile) {
@@ -157,7 +157,7 @@ async function run() {
157
157
 
158
158
  // Do this as the first thing so that any code reading it knows the right env.
159
159
  process.env.NODE_ENV = 'production';
160
- const loginCommand = await Promise.resolve().then(function () { return require('../../dist/login-c0ae342d.cjs.prod.js'); });
160
+ const loginCommand = await Promise.resolve().then(function () { return require('../../dist/login-60fd6d4a.cjs.prod.js'); });
161
161
  await loginCommand.default(options);
162
162
  });
163
163
 
@@ -171,7 +171,7 @@ async function run() {
171
171
 
172
172
  // Do this as the first thing so that any code reading it knows the right env.
173
173
  process.env.NODE_ENV = 'production';
174
- const configSyncCommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-da00aa73.cjs.prod.js'); });
174
+ const configSyncCommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-4d2d7d71.cjs.prod.js'); });
175
175
  await configSyncCommand.default(options);
176
176
  });
177
177
 
@@ -184,7 +184,7 @@ async function run() {
184
184
 
185
185
  // Do this as the first thing so that any code reading it knows the right env.
186
186
  process.env.NODE_ENV = 'production';
187
- const configSyncCICommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-ci-fb0e16c7.cjs.prod.js'); });
187
+ const configSyncCICommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-ci-f33b765c.cjs.prod.js'); });
188
188
  await configSyncCICommand.default(options);
189
189
  });
190
190
 
@@ -198,7 +198,7 @@ async function run() {
198
198
 
199
199
  // Do this as the first thing so that any code reading it knows the right env.
200
200
  process.env.NODE_ENV = 'production';
201
- const deploymentsSetCommand = await Promise.resolve().then(function () { return require('../../dist/deployment-previews-set-26590354.cjs.prod.js'); });
201
+ const deploymentsSetCommand = await Promise.resolve().then(function () { return require('../../dist/deployment-previews-set-33a3a023.cjs.prod.js'); });
202
202
  await deploymentsSetCommand.default(options);
203
203
  });
204
204
  commander.program.parse();
@@ -6,7 +6,7 @@ import path from 'path';
6
6
  import { program } from 'commander';
7
7
  import dotenv from 'dotenv';
8
8
  import dotenvExpand from 'dotenv-expand';
9
- import { p as pkgJson } from '../../dist/package-7cca4865.esm.js';
9
+ import { p as pkgJson } from '../../dist/package-b717bf0d.esm.js';
10
10
  import { d as doesFileExist } from '../../dist/does-file-exist-32618334.esm.js';
11
11
  import 'node:fs';
12
12
 
@@ -40,7 +40,7 @@ async function run() {
40
40
  console.log('Experimental Vite bundler enabled! 🚀');
41
41
  console.log('');
42
42
  }
43
- const startCommand = shouldUseExperimentalBundler ? await import('../../dist/start-vite-4b0df191.esm.js') : await import('../../dist/start-56f8d4d0.esm.js');
43
+ const startCommand = shouldUseExperimentalBundler ? await import('../../dist/start-vite-f0085975.esm.js') : await import('../../dist/start-59484653.esm.js');
44
44
  await startCommand.default();
45
45
  });
46
46
 
@@ -59,7 +59,7 @@ async function run() {
59
59
  console.log('Experimental Vite bundler enabled! 🚀');
60
60
  console.log('');
61
61
  }
62
- const buildCommand = shouldUseExperimentalBundler ? await import('../../dist/build-vite-782c1634.esm.js') : await import('../../dist/build-738937b8.esm.js');
62
+ const buildCommand = shouldUseExperimentalBundler ? await import('../../dist/build-vite-01e2aaf0.esm.js') : await import('../../dist/build-5e7d1303.esm.js');
63
63
  await buildCommand.default();
64
64
  const shouldAlsoCompile = !options.buildOnly;
65
65
  if (shouldAlsoCompile) {
@@ -125,7 +125,7 @@ async function run() {
125
125
 
126
126
  // Do this as the first thing so that any code reading it knows the right env.
127
127
  process.env.NODE_ENV = 'production';
128
- const loginCommand = await import('../../dist/login-2ea29ce1.esm.js');
128
+ const loginCommand = await import('../../dist/login-d077a257.esm.js');
129
129
  await loginCommand.default(options);
130
130
  });
131
131
 
@@ -139,7 +139,7 @@ async function run() {
139
139
 
140
140
  // Do this as the first thing so that any code reading it knows the right env.
141
141
  process.env.NODE_ENV = 'production';
142
- const configSyncCommand = await import('../../dist/config-sync-306de4b3.esm.js');
142
+ const configSyncCommand = await import('../../dist/config-sync-593781fd.esm.js');
143
143
  await configSyncCommand.default(options);
144
144
  });
145
145
 
@@ -152,7 +152,7 @@ async function run() {
152
152
 
153
153
  // Do this as the first thing so that any code reading it knows the right env.
154
154
  process.env.NODE_ENV = 'production';
155
- const configSyncCICommand = await import('../../dist/config-sync-ci-1f379117.esm.js');
155
+ const configSyncCICommand = await import('../../dist/config-sync-ci-1f59bf79.esm.js');
156
156
  await configSyncCICommand.default(options);
157
157
  });
158
158
 
@@ -166,7 +166,7 @@ async function run() {
166
166
 
167
167
  // Do this as the first thing so that any code reading it knows the right env.
168
168
  process.env.NODE_ENV = 'production';
169
- const deploymentsSetCommand = await import('../../dist/deployment-previews-set-02e66e29.esm.js');
169
+ const deploymentsSetCommand = await import('../../dist/deployment-previews-set-697801d9.esm.js');
170
170
  await deploymentsSetCommand.default(options);
171
171
  });
172
172
  program.parse();
@@ -10,7 +10,7 @@ var formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
10
10
  var printBuildError = require('react-dev-utils/printBuildError');
11
11
  var webpack = require('webpack');
12
12
  var assets = require('@commercetools-frontend/assets');
13
- var createWebpackConfigForProduction = require('./create-webpack-config-for-production-31127d3d.cjs.dev.js');
13
+ var createWebpackConfigForProduction = require('./create-webpack-config-for-production-351be45d.cjs.dev.js');
14
14
  var paths = require('./paths-b76fc753.cjs.dev.js');
15
15
  var doesFileExist = require('./does-file-exist-eb86baca.cjs.dev.js');
16
16
  require('@babel/runtime-corejs3/core-js-stable/object/keys');
@@ -41,9 +41,9 @@ require('@babel/runtime-corejs3/core-js-stable/instance/bind');
41
41
  require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
42
42
  require('@babel/runtime-corejs3/core-js-stable/object/assign');
43
43
  require('fs');
44
- require('./create-postcss-config-ccd9b415.cjs.dev.js');
44
+ require('./create-postcss-config-5253f51d.cjs.dev.js');
45
45
  require('@babel/runtime-corejs3/helpers/slicedToArray');
46
- require('./package-784f191e.cjs.dev.js');
46
+ require('./package-84973c56.cjs.dev.js');
47
47
  require('./optimizations-56be74d6.cjs.dev.js');
48
48
  require('@babel/runtime-corejs3/core-js-stable/object/entries');
49
49
  require('@babel/runtime-corejs3/core-js-stable/instance/includes');
@@ -8,7 +8,7 @@ import formatWebpackMessages from 'react-dev-utils/formatWebpackMessages';
8
8
  import printBuildError from 'react-dev-utils/printBuildError';
9
9
  import webpack from 'webpack';
10
10
  import { packageLocation } from '@commercetools-frontend/assets';
11
- import { c as createWebpackConfigForProduction } from './create-webpack-config-for-production-035a881e.esm.js';
11
+ import { c as createWebpackConfigForProduction } from './create-webpack-config-for-production-d619b595.esm.js';
12
12
  import { p as paths } from './paths-39f22b8b.esm.js';
13
13
  import { d as doesFileExist } from './does-file-exist-32618334.esm.js';
14
14
  import '@babel/runtime-corejs3/core-js-stable/object/keys';
@@ -39,9 +39,9 @@ import '@babel/runtime-corejs3/core-js-stable/instance/bind';
39
39
  import '@babel/runtime-corejs3/core-js-stable/instance/reduce';
40
40
  import '@babel/runtime-corejs3/core-js-stable/object/assign';
41
41
  import 'fs';
42
- import './create-postcss-config-56f928a7.esm.js';
42
+ import './create-postcss-config-08564589.esm.js';
43
43
  import '@babel/runtime-corejs3/helpers/slicedToArray';
44
- import './package-7cca4865.esm.js';
44
+ import './package-b717bf0d.esm.js';
45
45
  import './optimizations-54382f7b.esm.js';
46
46
  import '@babel/runtime-corejs3/core-js-stable/object/entries';
47
47
  import '@babel/runtime-corejs3/core-js-stable/instance/includes';
@@ -10,7 +10,7 @@ var formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
10
10
  var printBuildError = require('react-dev-utils/printBuildError');
11
11
  var webpack = require('webpack');
12
12
  var assets = require('@commercetools-frontend/assets');
13
- var createWebpackConfigForProduction = require('./create-webpack-config-for-production-fa226ea4.cjs.prod.js');
13
+ var createWebpackConfigForProduction = require('./create-webpack-config-for-production-35502c64.cjs.prod.js');
14
14
  var paths = require('./paths-7768b440.cjs.prod.js');
15
15
  var doesFileExist = require('./does-file-exist-be53305d.cjs.prod.js');
16
16
  require('@babel/runtime-corejs3/core-js-stable/object/keys');
@@ -41,9 +41,9 @@ require('@babel/runtime-corejs3/core-js-stable/instance/bind');
41
41
  require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
42
42
  require('@babel/runtime-corejs3/core-js-stable/object/assign');
43
43
  require('fs');
44
- require('./create-postcss-config-3d020253.cjs.prod.js');
44
+ require('./create-postcss-config-2b9affd5.cjs.prod.js');
45
45
  require('@babel/runtime-corejs3/helpers/slicedToArray');
46
- require('./package-29b56e71.cjs.prod.js');
46
+ require('./package-d1a1140f.cjs.prod.js');
47
47
  require('./optimizations-da5a0cfa.cjs.prod.js');
48
48
  require('@babel/runtime-corejs3/core-js-stable/object/entries');
49
49
  require('@babel/runtime-corejs3/core-js-stable/instance/includes');
@@ -1,7 +1,7 @@
1
1
  import _parseInt from '@babel/runtime-corejs3/core-js-stable/parse-int';
2
2
  import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
3
3
  import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
4
- import path$1 from 'path';
4
+ import path from 'path';
5
5
  import pluginGraphql from '@rollup/plugin-graphql';
6
6
  import pluginReact from '@vitejs/plugin-react';
7
7
  import fs$1 from 'fs-extra';
@@ -11,6 +11,8 @@ import { analyzer } from 'vite-bundle-analyzer';
11
11
  import { packageLocation } from '@commercetools-frontend/assets';
12
12
  import { generateTemplate } from '@commercetools-frontend/mc-html-template';
13
13
  import { p as paths } from './paths-39f22b8b.esm.js';
14
+ import _startsWithInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/starts-with';
15
+ import { getConfigPath } from '@commercetools-frontend/application-config';
14
16
  import { a as loadNimbusVitePlugin } from './try-load-nimbus-plugins-2f528d8f.esm.js';
15
17
  import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
16
18
  import _Object$values from '@babel/runtime-corejs3/core-js-stable/object/values';
@@ -24,11 +26,12 @@ import _sortInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instanc
24
26
  import { compile } from '@formatjs/cli-lib';
25
27
  import { createFilter } from '@rollup/pluginutils';
26
28
  import { g as getI18nMessageFormat, h as handleMessageCompilationError } from './i18n-message-complilation-21d3b0aa.esm.js';
29
+ import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/for-each';
27
30
  import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
28
31
  import _endsWithInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/ends-with';
29
32
  import _someInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/some';
30
33
  import fs from 'node:fs';
31
- import path from 'node:path';
34
+ import path$1 from 'node:path';
32
35
  import { globSync } from 'glob';
33
36
  import { v as vitePluginSvgr } from './vite-plugin-svgr-de6ee7da.esm.js';
34
37
  import '@babel/runtime-corejs3/core-js-stable/instance/find';
@@ -40,6 +43,35 @@ import 'chalk';
40
43
  import 'crypto';
41
44
  import '@babel/runtime-corejs3/core-js/instance/match-all';
42
45
 
46
+ /**
47
+ * Whether the app being built is a Custom View rather than a Custom
48
+ * Application.
49
+ *
50
+ * Decided from which configuration file is present, which is the same signal
51
+ * `processConfig` itself branches on. `getConfigPath` only resolves the file's
52
+ * path — it does not read env vars or process the config — so this stays cheap
53
+ * enough for a build-time decision. `loadConfig` rejects a project carrying
54
+ * both files, so the two cases cannot overlap.
55
+ *
56
+ * Matched on the file name only. Against the whole path, a Custom Application
57
+ * living anywhere under a directory like `custom-view-config-demo/` would read
58
+ * as a Custom View and silently lose the optimisation.
59
+ *
60
+ * Fails open: anything unexpected (no config found, a resolution error)
61
+ * answers `false`, so a detection gap leaves Custom Application behaviour
62
+ * intact rather than silently dropping an optimisation from a real app.
63
+ */
64
+ const isCustomView = async () => {
65
+ try {
66
+ var _context;
67
+ const configPath = await getConfigPath();
68
+ if (!configPath) return false;
69
+ return _startsWithInstanceProperty(_context = path.basename(configPath)).call(_context, 'custom-view-config');
70
+ } catch {
71
+ return false;
72
+ }
73
+ };
74
+
43
75
  // Type guard to help with filtering arrays for nullish elements.
44
76
  function nonNullable(value) {
45
77
  return value !== null && value !== undefined;
@@ -182,6 +214,145 @@ function vitePluginI18nMessageCompilation() {
182
214
  };
183
215
  }
184
216
 
217
+ // `application-shell-splitter` is deliberately absent. It is a root of the
218
+ // same wave, but it alone is ~1.2MB (Nimbus/chakra bindings) and pulls a
219
+ // further ~172KB `runtime` chunk, which would put ~1.5MB of high-priority
220
+ // preload in parallel with the 2.3MB entry that is the real critical path.
221
+ // Preloading it is a separate decision that needs a throttled measurement.
222
+ //
223
+ // When adding, renaming or removing a root here, update the assertion step in
224
+ // `.github/workflows/main.yml` to match — it checks these names by hand, so a
225
+ // drift makes CI pass or fail for the wrong reason.
226
+ const DEFAULT_ROOTS = ['navbar', 'project-container', 'user-settings-menu', 'use-applications-menu', 'requests-in-flight-loader'];
227
+ /**
228
+ * Resolves each root to its emitted chunk, then follows static `imports`
229
+ * transitively. The transitive walk is load-bearing rather than an
230
+ * optimisation: a browser is only guaranteed to preload dependencies that are
231
+ * listed individually, so preloading a root without its imports leaves them
232
+ * one round trip behind.
233
+ */
234
+ function resolveShellChunks(bundle, roots) {
235
+ var _context, _context4;
236
+ const chunks = _filterInstanceProperty(_context = _Object$values(bundle)).call(_context, entry => entry.type === 'chunk');
237
+ const byFileName = new _Map(_mapInstanceProperty(chunks).call(chunks, chunk => [chunk.fileName, chunk]));
238
+ const fileNames = new _Set();
239
+ const matchedRoots = [];
240
+ const missingRoots = [];
241
+ const visit = chunk => {
242
+ var _context2;
243
+ if (fileNames.has(chunk.fileName)) return;
244
+ fileNames.add(chunk.fileName);
245
+ _forEachInstanceProperty(_context2 = chunk.imports).call(_context2, imported => {
246
+ const next = byFileName.get(imported);
247
+ if (next) visit(next);
248
+ });
249
+ };
250
+ _forEachInstanceProperty(roots).call(roots, root => {
251
+ // Prefix, not exact: Rollup suffixes chunk names it has to disambiguate,
252
+ // so `navbar` has to match `navbar2`. The cost is that an app's own chunk
253
+ // named `navbar-…` would be preloaded too — a few KB of wasted hint on a
254
+ // page that is about to load the real navbar anyway.
255
+ const hits = _filterInstanceProperty(chunks).call(chunks, chunk => {
256
+ var _context3;
257
+ return _startsWithInstanceProperty(_context3 = chunk.name).call(_context3, root);
258
+ });
259
+ if (hits.length === 0) {
260
+ missingRoots.push(root);
261
+ return;
262
+ }
263
+ matchedRoots.push(root);
264
+ _forEachInstanceProperty(hits).call(hits, visit);
265
+ });
266
+ return {
267
+ fileNames: _sortInstanceProperty(_context4 = [...fileNames]).call(_context4),
268
+ matchedRoots,
269
+ missingRoots
270
+ };
271
+ }
272
+
273
+ /**
274
+ * Emits `<link rel="modulepreload">` for the authenticated shell chunk graph,
275
+ * so those chunks are fetched alongside the entry instead of waiting for it to
276
+ * execute and discover them.
277
+ *
278
+ * Works through `build.modulePreload.resolveDependencies` rather than by
279
+ * injecting tags directly. That hook renders its return value through
280
+ * `renderBuiltUrl`, which is what applies the `__CDN_URL__` prefix; tags a
281
+ * `transformIndexHtml` hook creates are emitted verbatim and would ship
282
+ * without it.
283
+ */
284
+ function pluginModulePreloadShellChunks() {
285
+ let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
286
+ const roots = options.roots ?? DEFAULT_ROOTS;
287
+ const onMissing = options.onMissing ?? 'warn';
288
+ let resolved = null;
289
+ let hasWarnedAboutOrdering = false;
290
+ return {
291
+ name: 'vite-plugin-modulepreload-shell-chunks',
292
+ apply: 'build',
293
+ config(config) {
294
+ // Vite's config merge would turn an explicit `false` back into an
295
+ // object, silently re-enabling preloading the consumer switched off.
296
+ if (config.build?.modulePreload === false) return;
297
+ return {
298
+ build: {
299
+ modulePreload: {
300
+ resolveDependencies: (url, deps, _ref) => {
301
+ let hostType = _ref.hostType;
302
+ // Vite calls this once for the entry HTML and once per dynamic
303
+ // import. Appending for `js` too would bake the shell graph into
304
+ // every `__vitePreload` dependency array in the bundle.
305
+ if (hostType !== 'html') return deps;
306
+
307
+ // Reaching the HTML host with nothing resolved means
308
+ // `generateBundle` has not run yet, i.e. the plugin ordering
309
+ // below inverted. Every hint would silently disappear, so say
310
+ // so. `console.warn` rather than `this.warn`: this is a plain
311
+ // callback in the returned config, not a Rollup plugin hook,
312
+ // so there is no plugin context here.
313
+ if (!resolved) {
314
+ if (!hasWarnedAboutOrdering) {
315
+ hasWarnedAboutOrdering = true;
316
+ // eslint-disable-next-line no-console
317
+ console.warn(`vite-plugin-modulepreload-shell-chunks: the entry HTML ` + `asked for its preload dependencies before the bundle ` + `was analysed, so no shell chunks were preloaded. This ` + `plugin relies on its \`generateBundle\` running before ` + `\`vite:build-html\`'s, which is Vite-internal ordering ` + `— a Vite upgrade may have changed it.`);
318
+ }
319
+ return deps;
320
+ }
321
+ const merged = new _Set([...deps, ...resolved.fileNames]);
322
+ // Every shell chunk statically imports the entry, because
323
+ // Rollup co-locates all shared static code there. Preloading it
324
+ // would duplicate the entry's own `<script type="module">`.
325
+ merged.delete(url);
326
+ return [...merged];
327
+ }
328
+ }
329
+ }
330
+ };
331
+ },
332
+ // Expected to run before `vite:build-html`'s own `generateBundle`, which
333
+ // is where `resolveDependencies` is invoked. That ordering is internal to
334
+ // Vite rather than a contract, so the hook above warns instead of
335
+ // assuming it held.
336
+ generateBundle(_options, bundle) {
337
+ resolved = resolveShellChunks(bundle, roots);
338
+
339
+ // A partial match is the signal that a chunk moved: the shell is present
340
+ // but one name no longer resolves. Resolving nothing at all is not that
341
+ // signal, so it stays silent rather than failing a build whose entry
342
+ // never reaches these modules.
343
+ if (resolved.missingRoots.length === 0 || resolved.matchedRoots.length === 0) {
344
+ return;
345
+ }
346
+ const message = `vite-plugin-modulepreload-shell-chunks: expected shell chunks were ` + `not emitted: ${resolved.missingRoots.join(', ')}.\n` + `Other shell chunks resolved (${resolved.matchedRoots.join(', ')}), so these were likely renamed or re-split rather than ` + `legitimately absent. Those modules are no longer preloaded, so the ` + `page still works but loads them a round trip later.`;
347
+ if (onMissing === 'error') {
348
+ this.error(message);
349
+ } else {
350
+ this.warn(message);
351
+ }
352
+ }
353
+ };
354
+ }
355
+
185
356
  /**
186
357
  * Only a candidate filter: which links are actually rewritten is decided by
187
358
  * matching `href` against the CSS assets Vite really emitted (see
@@ -251,7 +422,7 @@ function pluginPostCleanup(options) {
251
422
  cwd: outputDir
252
423
  });
253
424
  for (const file of files) {
254
- const filePath = path.join(outputDir, file);
425
+ const filePath = path$1.join(outputDir, file);
255
426
  try {
256
427
  fs.unlinkSync(filePath);
257
428
  totalFilesDeleted++;
@@ -282,7 +453,7 @@ async function run() {
282
453
  });
283
454
 
284
455
  // Generate `index.html` (template).
285
- const appEntryPoint = path$1.relative(paths.appRoot, paths.entryPoint);
456
+ const appEntryPoint = path.relative(paths.appRoot, paths.entryPoint);
286
457
  const html = generateTemplate({
287
458
  // Define the module entry point (path relative from the `/public` folder).
288
459
  // NOTE: that this is different from the development configuration.
@@ -292,6 +463,10 @@ async function run() {
292
463
  fs$1.writeFileSync(paths.appIndexHtml, html, {
293
464
  encoding: 'utf8'
294
465
  });
466
+
467
+ // Resolved once here rather than inside the plugin list, which is built
468
+ // synchronously. Only reads which config file is present.
469
+ const isCustomViewBuild = await isCustomView();
295
470
  await build({
296
471
  root: paths.appRoot,
297
472
  base: './',
@@ -381,7 +556,14 @@ async function run() {
381
556
  // Fail the build if the emitted chunk graph contains circular imports.
382
557
  // Chunk cycles are silent at build time but crash at runtime with TDZ
383
558
  // errors (historical "aM is undefined" from the icons/app-shell split).
384
- pluginChunkCycleCheck(), shouldAnalyze && analyzer(analyzeOutput ? {
559
+ pluginChunkCycleCheck(),
560
+ // Custom Views import from the same package, so their builds emit these
561
+ // chunks and would carry ~128KB of preload hints for a navbar and
562
+ // project container `CustomViewShell` never renders. Decided from which
563
+ // config file is present: `getConfigPath` only resolves a path, and
564
+ // `loadConfig` rejects a project carrying both, so the two cases cannot
565
+ // overlap and this stays cheap enough for a build-time decision.
566
+ !isCustomViewBuild && pluginModulePreloadShellChunks(), shouldAnalyze && analyzer(analyzeOutput ? {
385
567
  analyzerMode: 'json',
386
568
  defaultSizes: 'stat',
387
569
  fileName: analyzeOutput
@@ -400,12 +582,12 @@ async function run() {
400
582
  // Vite will write the `index.html` to `/public/public/index.html`.
401
583
  // We need to move this file to the `/public` folder and rename it
402
584
  // to `index.html.template` (as expected by the `compile-html` command).
403
- path$1.join(paths.appBuild, 'public/index.html'), paths.appIndexHtmlTemplate);
585
+ path.join(paths.appBuild, 'public/index.html'), paths.appIndexHtmlTemplate);
404
586
  // Clean up nested folder
405
- fs$1.rmdirSync(path$1.join(paths.appBuild, 'public'));
587
+ fs$1.rmdirSync(path.join(paths.appBuild, 'public'));
406
588
 
407
589
  // Copy public assets
408
- fs$1.copySync(path$1.join(packageLocation, 'html-page'), paths.appBuild, {
590
+ fs$1.copySync(path.join(packageLocation, 'html-page'), paths.appBuild, {
409
591
  dereference: true
410
592
  });
411
593
  }