@commercetools-frontend/mc-scripts 27.9.0 → 27.9.1

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 (85) hide show
  1. package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.dev.js +1 -1
  2. package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.prod.js +1 -1
  3. package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.esm.js +1 -1
  4. package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.dev.js +17 -17
  5. package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +17 -17
  6. package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +17 -17
  7. package/dist/{build-1d64eec3.esm.js → build-5a0c84e7.esm.js} +8 -8
  8. package/dist/{build-bfc565e1.cjs.dev.js → build-b9cbc1d1.cjs.dev.js} +8 -8
  9. package/dist/{build-ffa10fc4.cjs.prod.js → build-cdeab3a8.cjs.prod.js} +8 -8
  10. package/dist/{build-vite-e4eeb1a3.cjs.dev.js → build-vite-0e8f3463.cjs.dev.js} +16 -14
  11. package/dist/{build-vite-377f721f.cjs.prod.js → build-vite-aa0e7242.cjs.prod.js} +16 -14
  12. package/dist/{build-vite-2ea8a241.esm.js → build-vite-ce3c4fb6.esm.js} +16 -14
  13. package/dist/commercetools-frontend-mc-scripts.cjs.dev.js +1 -1
  14. package/dist/commercetools-frontend-mc-scripts.cjs.prod.js +1 -1
  15. package/dist/commercetools-frontend-mc-scripts.esm.js +1 -1
  16. package/dist/{compile-html-f4ac88cc.cjs.dev.js → compile-html-8679f721.cjs.dev.js} +5 -2
  17. package/dist/{compile-html-025cd493.esm.js → compile-html-adfef598.esm.js} +4 -2
  18. package/dist/{compile-html-50fd05ec.cjs.prod.js → compile-html-b80f9651.cjs.prod.js} +5 -2
  19. package/dist/{config-sync-5a7916dc.cjs.dev.js → config-sync-2b56a941.cjs.dev.js} +17 -17
  20. package/dist/{config-sync-df11a5bf.cjs.prod.js → config-sync-41bc7f5e.cjs.prod.js} +17 -17
  21. package/dist/{config-sync-be573249.esm.js → config-sync-7031a7de.esm.js} +17 -17
  22. package/dist/{config-sync-ci-a34b7b54.esm.js → config-sync-ci-1866c188.esm.js} +25 -20
  23. package/dist/{config-sync-ci-1d706e60.cjs.dev.js → config-sync-ci-6d12f2f3.cjs.dev.js} +27 -22
  24. package/dist/{config-sync-ci-9bb94255.cjs.prod.js → config-sync-ci-ea943de9.cjs.prod.js} +27 -22
  25. package/dist/{config-sync-helpers-5fbe31c5.cjs.dev.js → config-sync-helpers-36985f8c.cjs.dev.js} +57 -48
  26. package/dist/{config-sync-helpers-aaaa44ef.cjs.prod.js → config-sync-helpers-79ccaaad.cjs.prod.js} +55 -46
  27. package/dist/{config-sync-helpers-876b7d09.esm.js → config-sync-helpers-875ef4a4.esm.js} +56 -47
  28. package/dist/{create-postcss-config-3a80caef.cjs.dev.js → create-postcss-config-13cb1cb8.cjs.dev.js} +1 -1
  29. package/dist/{create-postcss-config-7d0b0ae1.cjs.prod.js → create-postcss-config-1eeb3d9d.cjs.prod.js} +1 -1
  30. package/dist/{create-postcss-config-a9f7c8a8.esm.js → create-postcss-config-390e8a52.esm.js} +1 -1
  31. package/dist/{create-webpack-config-for-development-ee3e94e6.cjs.prod.js → create-webpack-config-for-development-6608b4e4.cjs.prod.js} +15 -10
  32. package/dist/{create-webpack-config-for-development-a81db65f.cjs.dev.js → create-webpack-config-for-development-9a3a3a93.cjs.dev.js} +15 -10
  33. package/dist/{create-webpack-config-for-development-34ec7d5c.esm.js → create-webpack-config-for-development-dd95f3d5.esm.js} +15 -9
  34. package/dist/{create-webpack-config-for-production-585f2e76.cjs.dev.js → create-webpack-config-for-production-29b34b8c.cjs.dev.js} +8 -8
  35. package/dist/{create-webpack-config-for-production-f1317617.cjs.prod.js → create-webpack-config-for-production-2e6e5036.cjs.prod.js} +8 -8
  36. package/dist/{create-webpack-config-for-production-633d3891.esm.js → create-webpack-config-for-production-31bb3d24.esm.js} +8 -8
  37. package/dist/{credentials-storage-fd195144.cjs.dev.js → credentials-storage-1826f1a2.cjs.dev.js} +1 -1
  38. package/dist/{credentials-storage-ea1c16dc.cjs.prod.js → credentials-storage-60a63c81.cjs.prod.js} +1 -1
  39. package/dist/{credentials-storage-67deadc3.esm.js → credentials-storage-bfaa78f0.esm.js} +1 -1
  40. package/dist/{deployment-previews-set-ee6978a8.esm.js → deployment-previews-set-410cecf1.esm.js} +27 -22
  41. package/dist/{deployment-previews-set-5aeb990a.cjs.dev.js → deployment-previews-set-a04efad3.cjs.dev.js} +28 -22
  42. package/dist/{deployment-previews-set-d96668d6.cjs.prod.js → deployment-previews-set-bebd7a04.cjs.prod.js} +28 -22
  43. package/dist/{graphql-requests-d1683e27.cjs.dev.js → graphql-requests-1ea68584.cjs.dev.js} +8 -5
  44. package/dist/{graphql-requests-8a5d602b.cjs.prod.js → graphql-requests-98b1b779.cjs.prod.js} +8 -5
  45. package/dist/{graphql-requests-1bd861af.esm.js → graphql-requests-c491206a.esm.js} +8 -5
  46. package/dist/{i18n-message-complilation-7311cb29.cjs.dev.js → i18n-message-complilation-393d344a.cjs.prod.js} +1 -1
  47. package/dist/{i18n-message-complilation-7762da61.cjs.prod.js → i18n-message-complilation-3f80e8d6.cjs.dev.js} +1 -1
  48. package/dist/{i18n-message-complilation-21d3b0aa.esm.js → i18n-message-complilation-8aec9d1b.esm.js} +1 -1
  49. package/dist/{login-d51248e8.cjs.prod.js → login-a99d14e6.cjs.prod.js} +38 -60
  50. package/dist/{login-79d02906.esm.js → login-b935aede.esm.js} +37 -58
  51. package/dist/{login-62b53ebe.cjs.dev.js → login-cd99208a.cjs.dev.js} +38 -60
  52. package/dist/{optimizations-da5a0cfa.cjs.prod.js → optimizations-09a6638c.cjs.prod.js} +8 -5
  53. package/dist/{optimizations-54382f7b.esm.js → optimizations-1b3f8157.esm.js} +7 -5
  54. package/dist/{optimizations-56be74d6.cjs.dev.js → optimizations-640ffcac.cjs.dev.js} +8 -5
  55. package/dist/{package-5371f8ba.esm.js → package-15124b28.esm.js} +3 -4
  56. package/dist/{package-af294ed4.cjs.dev.js → package-90af7dfe.cjs.prod.js} +3 -4
  57. package/dist/{package-3539c84a.cjs.prod.js → package-98adb0d5.cjs.dev.js} +3 -4
  58. package/dist/{paths-39f22b8b.esm.js → paths-7bf7e88e.esm.js} +9 -4
  59. package/dist/{paths-7768b440.cjs.prod.js → paths-af1a725a.cjs.prod.js} +10 -4
  60. package/dist/{paths-b76fc753.cjs.dev.js → paths-ec3e3a7d.cjs.dev.js} +10 -4
  61. package/dist/{serve-b1c12985.cjs.dev.js → serve-760fc169.cjs.dev.js} +13 -14
  62. package/dist/{serve-3837602d.cjs.prod.js → serve-87ef7d4f.cjs.prod.js} +13 -14
  63. package/dist/{serve-22475fec.esm.js → serve-ddf30b4c.esm.js} +13 -13
  64. package/dist/{start-6fe0ccd2.esm.js → start-08895b5f.esm.js} +11 -13
  65. package/dist/{start-6e03b662.cjs.dev.js → start-a0945fde.cjs.dev.js} +11 -13
  66. package/dist/{start-bea9b61d.cjs.prod.js → start-d9bd5dfb.cjs.prod.js} +11 -13
  67. package/dist/{start-vite-dd8a1e26.cjs.prod.js → start-vite-00514c35.cjs.prod.js} +5 -4
  68. package/dist/{start-vite-698c9e82.cjs.dev.js → start-vite-10e49e5c.cjs.dev.js} +5 -4
  69. package/dist/{start-vite-4b0df191.esm.js → start-vite-745d3123.esm.js} +5 -4
  70. package/dist/{try-load-nimbus-plugins-d502a5fe.cjs.dev.js → try-load-nimbus-plugins-06ce5d83.cjs.dev.js} +1 -1
  71. package/dist/{try-load-nimbus-plugins-2f528d8f.esm.js → try-load-nimbus-plugins-526dccbd.esm.js} +1 -1
  72. package/dist/{try-load-nimbus-plugins-a713d7d3.cjs.prod.js → try-load-nimbus-plugins-59c3a594.cjs.prod.js} +1 -1
  73. package/dist/{vite-plugin-svgr-de6ee7da.esm.js → vite-plugin-svgr-22c8d518.esm.js} +4 -4
  74. package/dist/{vite-plugin-svgr-4034a834.cjs.prod.js → vite-plugin-svgr-53ef97c7.cjs.dev.js} +4 -4
  75. package/dist/{vite-plugin-svgr-7d06f400.cjs.dev.js → vite-plugin-svgr-5de1cad9.cjs.prod.js} +4 -4
  76. package/package.json +32 -31
  77. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.dev.js +2 -2
  78. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.prod.js +2 -2
  79. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.esm.js +2 -2
  80. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.dev.js +7 -8
  81. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.prod.js +7 -8
  82. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.esm.js +7 -8
  83. package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.dev.js +1 -1
  84. package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.prod.js +1 -1
  85. package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.esm.js +1 -1
@@ -6,6 +6,7 @@ var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/ins
6
6
  var _Object$entries = require('@babel/runtime-corejs3/core-js-stable/object/entries');
7
7
  var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
8
8
  var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
9
+ var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
9
10
  var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
10
11
  var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
11
12
  var _Object$getOwnPropertyDescriptor = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
@@ -21,6 +22,7 @@ var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInsta
21
22
  var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
22
23
  var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
23
24
  var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
25
+ var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
24
26
  var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
25
27
  var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
26
28
  var _Object$getOwnPropertyDescriptor__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptor);
@@ -43,7 +45,7 @@ function hasJsxRuntime() {
43
45
  }
44
46
 
45
47
  function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
46
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
48
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys(Object(t))).call(_context5, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
47
49
 
48
50
  // Dependencies to be split/grouped into separate chunks for the Webpack build.
49
51
  // This is useful to reduce the main bundle size and have more dedicated
@@ -71,7 +73,8 @@ const removeNonExistantDependencies = (manualChunks, appDependencies) => {
71
73
  if (existingVendors.length > 0) {
72
74
  chunkGroups[chunkName] = existingVendors;
73
75
  } else {
74
- console.log(chalk__default["default"].yellow(`\nFiltering out chunk "${chunkName}" because its configured dependencies does not exist in the application: ${vendors}\n`));
76
+ var _context2;
77
+ console.log(chalk__default["default"].yellow(_concatInstanceProperty__default["default"](_context2 = "\nFiltering out chunk \"".concat(chunkName, "\" because its configured dependencies does not exist in the application: ")).call(_context2, vendors, "\n")));
75
78
  }
76
79
  return chunkGroups;
77
80
  }, {});
@@ -79,15 +82,15 @@ const removeNonExistantDependencies = (manualChunks, appDependencies) => {
79
82
 
80
83
  // Reference: https://webpack.js.org/plugins/split-chunks-plugin/
81
84
  function getWepbackCacheGroups(appDependencies) {
82
- var _context2;
85
+ var _context3;
83
86
  const filteredDependencies = removeNonExistantDependencies(manualChunks, _Object$keys__default["default"](appDependencies));
84
- const result = _reduceInstanceProperty__default["default"](_context2 = _Object$entries__default["default"](filteredDependencies)).call(_context2, (previousChunks, _ref3) => {
87
+ const result = _reduceInstanceProperty__default["default"](_context3 = _Object$entries__default["default"](filteredDependencies)).call(_context3, (previousChunks, _ref3) => {
85
88
  let _ref4 = _slicedToArray(_ref3, 2),
86
89
  chunkName = _ref4[0],
87
90
  vendors = _ref4[1];
88
91
  return _objectSpread(_objectSpread({}, previousChunks), {}, {
89
92
  [chunkName]: {
90
- test: new RegExp(`[\\/]node_modules[\\/](${vendors.join('|')})[\\/]`),
93
+ test: new RegExp("[\\/]node_modules[\\/](".concat(vendors.join('|'), ")[\\/]")),
91
94
  name: chunkName,
92
95
  chunks: 'all'
93
96
  }
@@ -1,6 +1,6 @@
1
1
  var pkgJson = {
2
2
  name: "@commercetools-frontend/mc-scripts",
3
- version: "27.9.0",
3
+ version: "27.9.1",
4
4
  description: "Configuration and scripts for developing a MC application",
5
5
  bugs: "https://github.com/commercetools/merchant-center-application-kit/issues",
6
6
  repository: {
@@ -133,13 +133,12 @@ var pkgJson = {
133
133
  "vite-bundle-analyzer": "catalog:build",
134
134
  webpack: "catalog:build",
135
135
  "webpack-bundle-analyzer": "catalog:build",
136
- "webpack-dev-server": "catalog:build",
137
- webpackbar: "catalog:build"
136
+ "webpack-dev-server": "catalog:build"
138
137
  },
139
138
  devDependencies: {
140
139
  "@commercetools/composable-commerce-test-data": "catalog:",
141
140
  "@commercetools/nimbus": "catalog:nimbus",
142
- "@tsconfig/node22": "catalog:",
141
+ "@tsconfig/node24": "catalog:",
143
142
  "@types/fs-extra": "catalog:",
144
143
  "@types/lodash": "catalog:",
145
144
  "@types/moment-locales-webpack-plugin": "catalog:",
@@ -2,7 +2,7 @@
2
2
 
3
3
  var pkgJson = {
4
4
  name: "@commercetools-frontend/mc-scripts",
5
- version: "27.9.0",
5
+ version: "27.9.1",
6
6
  description: "Configuration and scripts for developing a MC application",
7
7
  bugs: "https://github.com/commercetools/merchant-center-application-kit/issues",
8
8
  repository: {
@@ -135,13 +135,12 @@ var pkgJson = {
135
135
  "vite-bundle-analyzer": "catalog:build",
136
136
  webpack: "catalog:build",
137
137
  "webpack-bundle-analyzer": "catalog:build",
138
- "webpack-dev-server": "catalog:build",
139
- webpackbar: "catalog:build"
138
+ "webpack-dev-server": "catalog:build"
140
139
  },
141
140
  devDependencies: {
142
141
  "@commercetools/composable-commerce-test-data": "catalog:",
143
142
  "@commercetools/nimbus": "catalog:nimbus",
144
- "@tsconfig/node22": "catalog:",
143
+ "@tsconfig/node24": "catalog:",
145
144
  "@types/fs-extra": "catalog:",
146
145
  "@types/lodash": "catalog:",
147
146
  "@types/moment-locales-webpack-plugin": "catalog:",
@@ -2,7 +2,7 @@
2
2
 
3
3
  var pkgJson = {
4
4
  name: "@commercetools-frontend/mc-scripts",
5
- version: "27.9.0",
5
+ version: "27.9.1",
6
6
  description: "Configuration and scripts for developing a MC application",
7
7
  bugs: "https://github.com/commercetools/merchant-center-application-kit/issues",
8
8
  repository: {
@@ -135,13 +135,12 @@ var pkgJson = {
135
135
  "vite-bundle-analyzer": "catalog:build",
136
136
  webpack: "catalog:build",
137
137
  "webpack-bundle-analyzer": "catalog:build",
138
- "webpack-dev-server": "catalog:build",
139
- webpackbar: "catalog:build"
138
+ "webpack-dev-server": "catalog:build"
140
139
  },
141
140
  devDependencies: {
142
141
  "@commercetools/composable-commerce-test-data": "catalog:",
143
142
  "@commercetools/nimbus": "catalog:nimbus",
144
- "@tsconfig/node22": "catalog:",
143
+ "@tsconfig/node24": "catalog:",
145
144
  "@types/fs-extra": "catalog:",
146
145
  "@types/lodash": "catalog:",
147
146
  "@types/moment-locales-webpack-plugin": "catalog:",
@@ -1,4 +1,5 @@
1
1
  import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/find';
2
+ import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
2
3
  import fs from 'fs';
3
4
  import path from 'path';
4
5
  import { d as doesFileExist } from './does-file-exist-32618334.esm.js';
@@ -12,11 +13,15 @@ const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
12
13
 
13
14
  // Resolve file paths in the order given
14
15
  const resolveModule = (resolveFn, filePath) => {
15
- const extension = _findInstanceProperty(moduleFileExtensions).call(moduleFileExtensions, extension => doesFileExist(resolveFn(`${filePath}.${extension}`)));
16
+ const extension = _findInstanceProperty(moduleFileExtensions).call(moduleFileExtensions, extension => {
17
+ var _context;
18
+ return doesFileExist(resolveFn(_concatInstanceProperty(_context = "".concat(filePath, ".")).call(_context, extension)));
19
+ });
16
20
  if (extension) {
17
- return resolveFn(`${filePath}.${extension}`);
21
+ var _context2;
22
+ return resolveFn(_concatInstanceProperty(_context2 = "".concat(filePath, ".")).call(_context2, extension));
18
23
  }
19
- return resolveFn(`${filePath}.js`);
24
+ return resolveFn("".concat(filePath, ".js"));
20
25
  };
21
26
 
22
27
  // Resolve the absolute path of the caller location. This is necessary
@@ -26,7 +31,7 @@ const paths = {
26
31
  appBuild: resolveApp('public'),
27
32
  appIndexHtmlTemplate: resolveApp('public/index.html.template'),
28
33
  appIndexHtml: resolveApp('public/index.html'),
29
- appWebpackConfig: resolveModule(resolveApp, `webpack.config.${process.env.NODE_ENV === 'production' ? 'prod' : 'dev'}`),
34
+ appWebpackConfig: resolveModule(resolveApp, "webpack.config.".concat(process.env.NODE_ENV === 'production' ? 'prod' : 'dev')),
30
35
  yarnLockFile: resolveApp('yarn.lock'),
31
36
  appRoot: resolveApp('.'),
32
37
  entryPoint: resolveModule(resolveApp, 'src/index'),
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
4
+ var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
4
5
  var fs = require('fs');
5
6
  var path = require('path');
6
7
  var doesFileExist = require('./does-file-exist-be53305d.cjs.prod.js');
@@ -8,6 +9,7 @@ var doesFileExist = require('./does-file-exist-be53305d.cjs.prod.js');
8
9
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
9
10
 
10
11
  var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
12
+ var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
11
13
  var fs__default = /*#__PURE__*/_interopDefault(fs);
12
14
  var path__default = /*#__PURE__*/_interopDefault(path);
13
15
 
@@ -20,11 +22,15 @@ const resolveApp = relativePath => path__default["default"].resolve(appDirectory
20
22
 
21
23
  // Resolve file paths in the order given
22
24
  const resolveModule = (resolveFn, filePath) => {
23
- const extension = _findInstanceProperty__default["default"](moduleFileExtensions).call(moduleFileExtensions, extension => doesFileExist.doesFileExist(resolveFn(`${filePath}.${extension}`)));
25
+ const extension = _findInstanceProperty__default["default"](moduleFileExtensions).call(moduleFileExtensions, extension => {
26
+ var _context;
27
+ return doesFileExist.doesFileExist(resolveFn(_concatInstanceProperty__default["default"](_context = "".concat(filePath, ".")).call(_context, extension)));
28
+ });
24
29
  if (extension) {
25
- return resolveFn(`${filePath}.${extension}`);
30
+ var _context2;
31
+ return resolveFn(_concatInstanceProperty__default["default"](_context2 = "".concat(filePath, ".")).call(_context2, extension));
26
32
  }
27
- return resolveFn(`${filePath}.js`);
33
+ return resolveFn("".concat(filePath, ".js"));
28
34
  };
29
35
 
30
36
  // Resolve the absolute path of the caller location. This is necessary
@@ -34,7 +40,7 @@ const paths = {
34
40
  appBuild: resolveApp('public'),
35
41
  appIndexHtmlTemplate: resolveApp('public/index.html.template'),
36
42
  appIndexHtml: resolveApp('public/index.html'),
37
- appWebpackConfig: resolveModule(resolveApp, `webpack.config.${'prod' }`),
43
+ appWebpackConfig: resolveModule(resolveApp, "webpack.config.".concat('prod' )),
38
44
  yarnLockFile: resolveApp('yarn.lock'),
39
45
  appRoot: resolveApp('.'),
40
46
  entryPoint: resolveModule(resolveApp, 'src/index'),
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
4
+ var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
4
5
  var fs = require('fs');
5
6
  var path = require('path');
6
7
  var doesFileExist = require('./does-file-exist-eb86baca.cjs.dev.js');
@@ -8,6 +9,7 @@ var doesFileExist = require('./does-file-exist-eb86baca.cjs.dev.js');
8
9
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
9
10
 
10
11
  var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
12
+ var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
11
13
  var fs__default = /*#__PURE__*/_interopDefault(fs);
12
14
  var path__default = /*#__PURE__*/_interopDefault(path);
13
15
 
@@ -20,11 +22,15 @@ const resolveApp = relativePath => path__default["default"].resolve(appDirectory
20
22
 
21
23
  // Resolve file paths in the order given
22
24
  const resolveModule = (resolveFn, filePath) => {
23
- const extension = _findInstanceProperty__default["default"](moduleFileExtensions).call(moduleFileExtensions, extension => doesFileExist.doesFileExist(resolveFn(`${filePath}.${extension}`)));
25
+ const extension = _findInstanceProperty__default["default"](moduleFileExtensions).call(moduleFileExtensions, extension => {
26
+ var _context;
27
+ return doesFileExist.doesFileExist(resolveFn(_concatInstanceProperty__default["default"](_context = "".concat(filePath, ".")).call(_context, extension)));
28
+ });
24
29
  if (extension) {
25
- return resolveFn(`${filePath}.${extension}`);
30
+ var _context2;
31
+ return resolveFn(_concatInstanceProperty__default["default"](_context2 = "".concat(filePath, ".")).call(_context2, extension));
26
32
  }
27
- return resolveFn(`${filePath}.js`);
33
+ return resolveFn("".concat(filePath, ".js"));
28
34
  };
29
35
 
30
36
  // Resolve the absolute path of the caller location. This is necessary
@@ -34,7 +40,7 @@ const paths = {
34
40
  appBuild: resolveApp('public'),
35
41
  appIndexHtmlTemplate: resolveApp('public/index.html.template'),
36
42
  appIndexHtml: resolveApp('public/index.html'),
37
- appWebpackConfig: resolveModule(resolveApp, `webpack.config.${process.env.NODE_ENV === 'production' ? 'prod' : 'dev'}`),
43
+ appWebpackConfig: resolveModule(resolveApp, "webpack.config.".concat(process.env.NODE_ENV === 'production' ? 'prod' : 'dev')),
38
44
  yarnLockFile: resolveApp('yarn.lock'),
39
45
  appRoot: resolveApp('.'),
40
46
  entryPoint: resolveModule(resolveApp, 'src/index'),
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
3
  var _startsWithInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
4
- var _bindInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/bind');
5
4
  var _URL = require('@babel/runtime-corejs3/core-js-stable/url');
6
5
  var _Promise = require('@babel/runtime-corejs3/core-js-stable/promise');
7
6
  var http = require('http');
8
7
  var sirv = require('sirv');
9
- var paths = require('./paths-b76fc753.cjs.dev.js');
8
+ var paths = require('./paths-ec3e3a7d.cjs.dev.js');
10
9
  require('@babel/runtime-corejs3/core-js-stable/instance/find');
10
+ require('@babel/runtime-corejs3/core-js-stable/instance/concat');
11
11
  require('fs');
12
12
  require('path');
13
13
  require('./does-file-exist-eb86baca.cjs.dev.js');
@@ -16,7 +16,6 @@ require('node:fs');
16
16
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
17
17
 
18
18
  var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
19
- var _bindInstanceProperty__default = /*#__PURE__*/_interopDefault(_bindInstanceProperty);
20
19
  var _URL__default = /*#__PURE__*/_interopDefault(_URL);
21
20
  var _Promise__default = /*#__PURE__*/_interopDefault(_Promise);
22
21
  var http__default = /*#__PURE__*/_interopDefault(http);
@@ -24,13 +23,13 @@ var sirv__default = /*#__PURE__*/_interopDefault(sirv);
24
23
 
25
24
  const DEFAULT_PORT = 3001;
26
25
  async function run() {
27
- var _context, _context2, _context3;
26
+ var _options$port, _options$publicPath, _options$handleAuthRo, _applicationConfig$en, _context;
28
27
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
29
- const port = options.port ?? DEFAULT_PORT;
30
- const publicPath = options.publicPath ?? paths.paths.appBuild;
31
- const handleAuthRoutes = options.handleAuthRoutes ?? true;
28
+ const port = (_options$port = options.port) !== null && _options$port !== void 0 ? _options$port : DEFAULT_PORT;
29
+ const publicPath = (_options$publicPath = options.publicPath) !== null && _options$publicPath !== void 0 ? _options$publicPath : paths.paths.appBuild;
30
+ const handleAuthRoutes = (_options$handleAuthRo = options.handleAuthRoutes) !== null && _options$handleAuthRo !== void 0 ? _options$handleAuthRo : true;
32
31
  const applicationConfig = options.applicationConfig;
33
- const isLocalMcApi = ((_context = applicationConfig) == null ? void 0 : _bindInstanceProperty__default["default"](_context3 = Function.call).call(_context3, _startsWithInstanceProperty__default["default"](_context2 = _context.env.mcApiUrl), _context2))?.('http://localhost') ?? false;
32
+ const isLocalMcApi = (_applicationConfig$en = applicationConfig === null || applicationConfig === void 0 ? void 0 : _startsWithInstanceProperty__default["default"](_context = applicationConfig.env.mcApiUrl).call(_context, 'http://localhost')) !== null && _applicationConfig$en !== void 0 ? _applicationConfig$en : false;
34
33
 
35
34
  // `single: true` gives us the SPA fallback — any unmatched path is served as
36
35
  // the root `index.html`. This replaces the complex glob workaround that
@@ -40,7 +39,7 @@ async function run() {
40
39
  etag: true
41
40
  });
42
41
  const server = http__default["default"].createServer((request, response) => {
43
- var _context10, _context11;
42
+ var _request$url5;
44
43
  // The auth-route handlers are the only consumer of `applicationConfig`,
45
44
  // so the branch is entered only when both the flag is on AND the caller
46
45
  // supplied a config. The CLI pairs the two — see `serve` action in
@@ -49,17 +48,17 @@ async function run() {
49
48
  // `--handle-auth-routes=false` so those paths flow through to the SPA
50
49
  // fallback like any other route.
51
50
  if (handleAuthRoutes && applicationConfig) {
52
- var _context4, _context5, _context6, _context7, _context8, _context9, _context0, _context1;
51
+ var _request$url, _request$url2, _request$url3, _request$url4;
53
52
  // Localhost-only: inline replacement for the login/logout UI that
54
53
  // `mc-dev-authentication` used to ship as static HTML (#3734).
55
- if (isLocalMcApi && ((_context4 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context5 = Function.call).call(_context5, _startsWithInstanceProperty__default["default"](_context4), _context4))?.('/login/authorize')) {
54
+ if (isLocalMcApi && (_request$url = request.url) !== null && _request$url !== void 0 && _startsWithInstanceProperty__default["default"](_request$url).call(_request$url, '/login/authorize')) {
56
55
  const redirectTo = new _URL__default["default"](request.url, applicationConfig.env.mcApiUrl);
57
56
  response.writeHead(301, {
58
57
  Location: redirectTo.toString()
59
58
  }).end();
60
59
  return;
61
60
  }
62
- if (isLocalMcApi && ((_context6 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context7 = Function.call).call(_context7, _startsWithInstanceProperty__default["default"](_context6), _context6))?.('/logout')) {
61
+ if (isLocalMcApi && (_request$url2 = request.url) !== null && _request$url2 !== void 0 && _startsWithInstanceProperty__default["default"](_request$url2).call(_request$url2, '/logout')) {
63
62
  response.end('Please clear your session storage.');
64
63
  return;
65
64
  }
@@ -68,7 +67,7 @@ async function run() {
68
67
  // request (bare `/login`, non-localhost auth callbacks, etc.) must NOT
69
68
  // fall back to the SPA — that would mask OAuth callback
70
69
  // misconfigurations by rendering the app on a URL the backend owns.
71
- if (((_context8 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context9 = Function.call).call(_context9, _startsWithInstanceProperty__default["default"](_context8), _context8))?.('/login') || ((_context0 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context1 = Function.call).call(_context1, _startsWithInstanceProperty__default["default"](_context0), _context0))?.('/logout')) {
70
+ if ((_request$url3 = request.url) !== null && _request$url3 !== void 0 && _startsWithInstanceProperty__default["default"](_request$url3).call(_request$url3, '/login') || (_request$url4 = request.url) !== null && _request$url4 !== void 0 && _startsWithInstanceProperty__default["default"](_request$url4).call(_request$url4, '/logout')) {
72
71
  response.writeHead(404).end();
73
72
  return;
74
73
  }
@@ -76,7 +75,7 @@ async function run() {
76
75
 
77
76
  // Absorb `/favicon*` variants (e.g. `/favicon.ico`, `/favicon-32x32.png`)
78
77
  // into the single PNG the app ships.
79
- if (((_context10 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context11 = Function.call).call(_context11, _startsWithInstanceProperty__default["default"](_context10), _context10))?.('/favicon')) {
78
+ if ((_request$url5 = request.url) !== null && _request$url5 !== void 0 && _startsWithInstanceProperty__default["default"](_request$url5).call(_request$url5, '/favicon')) {
80
79
  request.url = '/favicon.png';
81
80
  }
82
81
  staticHandler(request, response, () => {
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
3
  var _startsWithInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
4
- var _bindInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/bind');
5
4
  var _URL = require('@babel/runtime-corejs3/core-js-stable/url');
6
5
  var _Promise = require('@babel/runtime-corejs3/core-js-stable/promise');
7
6
  var http = require('http');
8
7
  var sirv = require('sirv');
9
- var paths = require('./paths-7768b440.cjs.prod.js');
8
+ var paths = require('./paths-af1a725a.cjs.prod.js');
10
9
  require('@babel/runtime-corejs3/core-js-stable/instance/find');
10
+ require('@babel/runtime-corejs3/core-js-stable/instance/concat');
11
11
  require('fs');
12
12
  require('path');
13
13
  require('./does-file-exist-be53305d.cjs.prod.js');
@@ -16,7 +16,6 @@ require('node:fs');
16
16
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
17
17
 
18
18
  var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
19
- var _bindInstanceProperty__default = /*#__PURE__*/_interopDefault(_bindInstanceProperty);
20
19
  var _URL__default = /*#__PURE__*/_interopDefault(_URL);
21
20
  var _Promise__default = /*#__PURE__*/_interopDefault(_Promise);
22
21
  var http__default = /*#__PURE__*/_interopDefault(http);
@@ -24,13 +23,13 @@ var sirv__default = /*#__PURE__*/_interopDefault(sirv);
24
23
 
25
24
  const DEFAULT_PORT = 3001;
26
25
  async function run() {
27
- var _context, _context2, _context3;
26
+ var _options$port, _options$publicPath, _options$handleAuthRo, _applicationConfig$en, _context;
28
27
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
29
- const port = options.port ?? DEFAULT_PORT;
30
- const publicPath = options.publicPath ?? paths.paths.appBuild;
31
- const handleAuthRoutes = options.handleAuthRoutes ?? true;
28
+ const port = (_options$port = options.port) !== null && _options$port !== void 0 ? _options$port : DEFAULT_PORT;
29
+ const publicPath = (_options$publicPath = options.publicPath) !== null && _options$publicPath !== void 0 ? _options$publicPath : paths.paths.appBuild;
30
+ const handleAuthRoutes = (_options$handleAuthRo = options.handleAuthRoutes) !== null && _options$handleAuthRo !== void 0 ? _options$handleAuthRo : true;
32
31
  const applicationConfig = options.applicationConfig;
33
- const isLocalMcApi = ((_context = applicationConfig) == null ? void 0 : _bindInstanceProperty__default["default"](_context3 = Function.call).call(_context3, _startsWithInstanceProperty__default["default"](_context2 = _context.env.mcApiUrl), _context2))?.('http://localhost') ?? false;
32
+ const isLocalMcApi = (_applicationConfig$en = applicationConfig === null || applicationConfig === void 0 ? void 0 : _startsWithInstanceProperty__default["default"](_context = applicationConfig.env.mcApiUrl).call(_context, 'http://localhost')) !== null && _applicationConfig$en !== void 0 ? _applicationConfig$en : false;
34
33
 
35
34
  // `single: true` gives us the SPA fallback — any unmatched path is served as
36
35
  // the root `index.html`. This replaces the complex glob workaround that
@@ -40,7 +39,7 @@ async function run() {
40
39
  etag: true
41
40
  });
42
41
  const server = http__default["default"].createServer((request, response) => {
43
- var _context10, _context11;
42
+ var _request$url5;
44
43
  // The auth-route handlers are the only consumer of `applicationConfig`,
45
44
  // so the branch is entered only when both the flag is on AND the caller
46
45
  // supplied a config. The CLI pairs the two — see `serve` action in
@@ -49,17 +48,17 @@ async function run() {
49
48
  // `--handle-auth-routes=false` so those paths flow through to the SPA
50
49
  // fallback like any other route.
51
50
  if (handleAuthRoutes && applicationConfig) {
52
- var _context4, _context5, _context6, _context7, _context8, _context9, _context0, _context1;
51
+ var _request$url, _request$url2, _request$url3, _request$url4;
53
52
  // Localhost-only: inline replacement for the login/logout UI that
54
53
  // `mc-dev-authentication` used to ship as static HTML (#3734).
55
- if (isLocalMcApi && ((_context4 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context5 = Function.call).call(_context5, _startsWithInstanceProperty__default["default"](_context4), _context4))?.('/login/authorize')) {
54
+ if (isLocalMcApi && (_request$url = request.url) !== null && _request$url !== void 0 && _startsWithInstanceProperty__default["default"](_request$url).call(_request$url, '/login/authorize')) {
56
55
  const redirectTo = new _URL__default["default"](request.url, applicationConfig.env.mcApiUrl);
57
56
  response.writeHead(301, {
58
57
  Location: redirectTo.toString()
59
58
  }).end();
60
59
  return;
61
60
  }
62
- if (isLocalMcApi && ((_context6 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context7 = Function.call).call(_context7, _startsWithInstanceProperty__default["default"](_context6), _context6))?.('/logout')) {
61
+ if (isLocalMcApi && (_request$url2 = request.url) !== null && _request$url2 !== void 0 && _startsWithInstanceProperty__default["default"](_request$url2).call(_request$url2, '/logout')) {
63
62
  response.end('Please clear your session storage.');
64
63
  return;
65
64
  }
@@ -68,7 +67,7 @@ async function run() {
68
67
  // request (bare `/login`, non-localhost auth callbacks, etc.) must NOT
69
68
  // fall back to the SPA — that would mask OAuth callback
70
69
  // misconfigurations by rendering the app on a URL the backend owns.
71
- if (((_context8 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context9 = Function.call).call(_context9, _startsWithInstanceProperty__default["default"](_context8), _context8))?.('/login') || ((_context0 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context1 = Function.call).call(_context1, _startsWithInstanceProperty__default["default"](_context0), _context0))?.('/logout')) {
70
+ if ((_request$url3 = request.url) !== null && _request$url3 !== void 0 && _startsWithInstanceProperty__default["default"](_request$url3).call(_request$url3, '/login') || (_request$url4 = request.url) !== null && _request$url4 !== void 0 && _startsWithInstanceProperty__default["default"](_request$url4).call(_request$url4, '/logout')) {
72
71
  response.writeHead(404).end();
73
72
  return;
74
73
  }
@@ -76,7 +75,7 @@ async function run() {
76
75
 
77
76
  // Absorb `/favicon*` variants (e.g. `/favicon.ico`, `/favicon-32x32.png`)
78
77
  // into the single PNG the app ships.
79
- if (((_context10 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context11 = Function.call).call(_context11, _startsWithInstanceProperty__default["default"](_context10), _context10))?.('/favicon')) {
78
+ if ((_request$url5 = request.url) !== null && _request$url5 !== void 0 && _startsWithInstanceProperty__default["default"](_request$url5).call(_request$url5, '/favicon')) {
80
79
  request.url = '/favicon.png';
81
80
  }
82
81
  staticHandler(request, response, () => {
@@ -1,11 +1,11 @@
1
1
  import _startsWithInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/starts-with';
2
- import _bindInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/bind';
3
2
  import _URL from '@babel/runtime-corejs3/core-js-stable/url';
4
3
  import _Promise from '@babel/runtime-corejs3/core-js-stable/promise';
5
4
  import http from 'http';
6
5
  import sirv from 'sirv';
7
- import { p as paths } from './paths-39f22b8b.esm.js';
6
+ import { p as paths } from './paths-7bf7e88e.esm.js';
8
7
  import '@babel/runtime-corejs3/core-js-stable/instance/find';
8
+ import '@babel/runtime-corejs3/core-js-stable/instance/concat';
9
9
  import 'fs';
10
10
  import 'path';
11
11
  import './does-file-exist-32618334.esm.js';
@@ -13,13 +13,13 @@ import 'node:fs';
13
13
 
14
14
  const DEFAULT_PORT = 3001;
15
15
  async function run() {
16
- var _context, _context2, _context3;
16
+ var _options$port, _options$publicPath, _options$handleAuthRo, _applicationConfig$en, _context;
17
17
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
18
- const port = options.port ?? DEFAULT_PORT;
19
- const publicPath = options.publicPath ?? paths.appBuild;
20
- const handleAuthRoutes = options.handleAuthRoutes ?? true;
18
+ const port = (_options$port = options.port) !== null && _options$port !== void 0 ? _options$port : DEFAULT_PORT;
19
+ const publicPath = (_options$publicPath = options.publicPath) !== null && _options$publicPath !== void 0 ? _options$publicPath : paths.appBuild;
20
+ const handleAuthRoutes = (_options$handleAuthRo = options.handleAuthRoutes) !== null && _options$handleAuthRo !== void 0 ? _options$handleAuthRo : true;
21
21
  const applicationConfig = options.applicationConfig;
22
- const isLocalMcApi = ((_context = applicationConfig) == null ? void 0 : _bindInstanceProperty(_context3 = Function.call).call(_context3, _startsWithInstanceProperty(_context2 = _context.env.mcApiUrl), _context2))?.('http://localhost') ?? false;
22
+ const isLocalMcApi = (_applicationConfig$en = applicationConfig === null || applicationConfig === void 0 ? void 0 : _startsWithInstanceProperty(_context = applicationConfig.env.mcApiUrl).call(_context, 'http://localhost')) !== null && _applicationConfig$en !== void 0 ? _applicationConfig$en : false;
23
23
 
24
24
  // `single: true` gives us the SPA fallback — any unmatched path is served as
25
25
  // the root `index.html`. This replaces the complex glob workaround that
@@ -29,7 +29,7 @@ async function run() {
29
29
  etag: true
30
30
  });
31
31
  const server = http.createServer((request, response) => {
32
- var _context10, _context11;
32
+ var _request$url5;
33
33
  // The auth-route handlers are the only consumer of `applicationConfig`,
34
34
  // so the branch is entered only when both the flag is on AND the caller
35
35
  // supplied a config. The CLI pairs the two — see `serve` action in
@@ -38,17 +38,17 @@ async function run() {
38
38
  // `--handle-auth-routes=false` so those paths flow through to the SPA
39
39
  // fallback like any other route.
40
40
  if (handleAuthRoutes && applicationConfig) {
41
- var _context4, _context5, _context6, _context7, _context8, _context9, _context0, _context1;
41
+ var _request$url, _request$url2, _request$url3, _request$url4;
42
42
  // Localhost-only: inline replacement for the login/logout UI that
43
43
  // `mc-dev-authentication` used to ship as static HTML (#3734).
44
- if (isLocalMcApi && ((_context4 = request.url) == null ? void 0 : _bindInstanceProperty(_context5 = Function.call).call(_context5, _startsWithInstanceProperty(_context4), _context4))?.('/login/authorize')) {
44
+ if (isLocalMcApi && (_request$url = request.url) !== null && _request$url !== void 0 && _startsWithInstanceProperty(_request$url).call(_request$url, '/login/authorize')) {
45
45
  const redirectTo = new _URL(request.url, applicationConfig.env.mcApiUrl);
46
46
  response.writeHead(301, {
47
47
  Location: redirectTo.toString()
48
48
  }).end();
49
49
  return;
50
50
  }
51
- if (isLocalMcApi && ((_context6 = request.url) == null ? void 0 : _bindInstanceProperty(_context7 = Function.call).call(_context7, _startsWithInstanceProperty(_context6), _context6))?.('/logout')) {
51
+ if (isLocalMcApi && (_request$url2 = request.url) !== null && _request$url2 !== void 0 && _startsWithInstanceProperty(_request$url2).call(_request$url2, '/logout')) {
52
52
  response.end('Please clear your session storage.');
53
53
  return;
54
54
  }
@@ -57,7 +57,7 @@ async function run() {
57
57
  // request (bare `/login`, non-localhost auth callbacks, etc.) must NOT
58
58
  // fall back to the SPA — that would mask OAuth callback
59
59
  // misconfigurations by rendering the app on a URL the backend owns.
60
- if (((_context8 = request.url) == null ? void 0 : _bindInstanceProperty(_context9 = Function.call).call(_context9, _startsWithInstanceProperty(_context8), _context8))?.('/login') || ((_context0 = request.url) == null ? void 0 : _bindInstanceProperty(_context1 = Function.call).call(_context1, _startsWithInstanceProperty(_context0), _context0))?.('/logout')) {
60
+ if ((_request$url3 = request.url) !== null && _request$url3 !== void 0 && _startsWithInstanceProperty(_request$url3).call(_request$url3, '/login') || (_request$url4 = request.url) !== null && _request$url4 !== void 0 && _startsWithInstanceProperty(_request$url4).call(_request$url4, '/logout')) {
61
61
  response.writeHead(404).end();
62
62
  return;
63
63
  }
@@ -65,7 +65,7 @@ async function run() {
65
65
 
66
66
  // Absorb `/favicon*` variants (e.g. `/favicon.ico`, `/favicon-32x32.png`)
67
67
  // into the single PNG the app ships.
68
- if (((_context10 = request.url) == null ? void 0 : _bindInstanceProperty(_context11 = Function.call).call(_context11, _startsWithInstanceProperty(_context10), _context10))?.('/favicon')) {
68
+ if ((_request$url5 = request.url) !== null && _request$url5 !== void 0 && _startsWithInstanceProperty(_request$url5).call(_request$url5, '/favicon')) {
69
69
  request.url = '/favicon.png';
70
70
  }
71
71
  staticHandler(request, response, () => {
@@ -7,8 +7,8 @@ import openBrowser from 'react-dev-utils/openBrowser';
7
7
  import { choosePort, prepareUrls, createCompiler } from 'react-dev-utils/WebpackDevServerUtils';
8
8
  import webpack from 'webpack';
9
9
  import WebpackDevServer from 'webpack-dev-server';
10
- import { c as createWebpackConfigForDevelopment } from './create-webpack-config-for-development-34ec7d5c.esm.js';
11
- import { p as paths } from './paths-39f22b8b.esm.js';
10
+ import { c as createWebpackConfigForDevelopment } from './create-webpack-config-for-development-dd95f3d5.esm.js';
11
+ import { p as paths } from './paths-7bf7e88e.esm.js';
12
12
  import { processConfig } from '@commercetools-frontend/application-config';
13
13
  import { createMcDevAuthenticationMiddleware } from '@commercetools-frontend/mc-dev-authentication';
14
14
  import { processHeaders } from '@commercetools-frontend/mc-html-template';
@@ -30,15 +30,14 @@ import 'path';
30
30
  import '@pmmmwh/react-refresh-webpack-plugin';
31
31
  import 'html-webpack-plugin';
32
32
  import 'moment-locales-webpack-plugin';
33
- import 'webpackbar';
34
- import './try-load-nimbus-plugins-2f528d8f.esm.js';
33
+ import './try-load-nimbus-plugins-526dccbd.esm.js';
35
34
  import '@babel/runtime-corejs3/helpers/classCallCheck';
36
35
  import '@babel/runtime-corejs3/helpers/createClass';
37
36
  import '@babel/runtime-corejs3/core-js-stable/object/assign';
38
- import './create-postcss-config-a9f7c8a8.esm.js';
37
+ import './create-postcss-config-390e8a52.esm.js';
39
38
  import '@babel/runtime-corejs3/helpers/slicedToArray';
40
- import './package-5371f8ba.esm.js';
41
- import './optimizations-54382f7b.esm.js';
39
+ import './package-15124b28.esm.js';
40
+ import './optimizations-1b3f8157.esm.js';
42
41
  import '@babel/runtime-corejs3/core-js-stable/instance/reduce';
43
42
  import '@babel/runtime-corejs3/core-js-stable/object/entries';
44
43
  import '@babel/runtime-corejs3/core-js-stable/instance/includes';
@@ -87,20 +86,20 @@ const createWebpackDevServerConfig = async _ref => {
87
86
  },
88
87
  host,
89
88
  hot: true,
90
- https: false,
91
89
  port,
92
90
  setupMiddlewares(middlewares, devServer) {
91
+ var _devServer$app;
93
92
  if (!devServer) {
94
93
  throw new Error('webpack-dev-server is not defined');
95
94
  }
96
- devServer.app?.use(createMcDevAuthenticationMiddleware(applicationConfig));
95
+ (_devServer$app = devServer.app) === null || _devServer$app === void 0 || _devServer$app.use(createMcDevAuthenticationMiddleware(applicationConfig));
97
96
  return middlewares;
98
97
  }
99
98
  };
100
99
  };
101
100
 
102
101
  async function run() {
103
- var _context;
102
+ var _config$output, _context;
104
103
  const useYarn = doesFileExist(paths.yarnLockFile);
105
104
  const isInteractive = process.stdout.isTTY;
106
105
 
@@ -144,7 +143,7 @@ async function run() {
144
143
  // Serve webpack assets generated by the compiler over a web sever.
145
144
  const serverConfig = await createWebpackDevServerConfig({
146
145
  port,
147
- publicPath: config.output?.publicPath
146
+ publicPath: (_config$output = config.output) === null || _config$output === void 0 ? void 0 : _config$output.publicPath
148
147
  });
149
148
  const devServer = new WebpackDevServer(serverConfig, compiler);
150
149
  await devServer.start();
@@ -155,8 +154,7 @@ async function run() {
155
154
  openBrowser(urls.localUrlForBrowser);
156
155
  _forEachInstanceProperty(_context = ['SIGINT', 'SIGTERM']).call(_context, sig => {
157
156
  process.on(sig, () => {
158
- devServer.close();
159
- process.exit();
157
+ devServer.stop().finally(() => process.exit());
160
158
  });
161
159
  });
162
160
  }