@commercetools-frontend/mc-scripts 27.5.0 → 27.5.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 (52) hide show
  1. package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.dev.js +37 -10
  2. package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +37 -10
  3. package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +19 -10
  4. package/dist/{build-7a3a4b48.cjs.dev.js → build-2cbde331.cjs.dev.js} +3 -3
  5. package/dist/{build-51b09598.esm.js → build-4ab9306b.esm.js} +3 -3
  6. package/dist/{build-2dde4016.cjs.prod.js → build-7c7442bd.cjs.prod.js} +3 -3
  7. package/dist/commercetools-frontend-mc-scripts.cjs.dev.js +1 -1
  8. package/dist/commercetools-frontend-mc-scripts.cjs.prod.js +1 -1
  9. package/dist/commercetools-frontend-mc-scripts.esm.js +1 -1
  10. package/dist/{config-sync-eac5312f.cjs.dev.js → config-sync-7ae74804.cjs.dev.js} +3 -3
  11. package/dist/{config-sync-ci-f083fe23.cjs.dev.js → config-sync-ci-732e0c5d.cjs.dev.js} +3 -3
  12. package/dist/{config-sync-ci-f2adf187.esm.js → config-sync-ci-9c50ed6f.esm.js} +3 -3
  13. package/dist/{config-sync-ci-0d638a98.cjs.prod.js → config-sync-ci-d3104a62.cjs.prod.js} +3 -3
  14. package/dist/{config-sync-74ddb92a.cjs.prod.js → config-sync-d3d5d721.cjs.prod.js} +3 -3
  15. package/dist/{config-sync-38bb2049.esm.js → config-sync-d5c4aa9b.esm.js} +3 -3
  16. package/dist/{config-sync-helpers-165afb6b.cjs.dev.js → config-sync-helpers-178da465.cjs.dev.js} +1 -1
  17. package/dist/{config-sync-helpers-2bf06642.esm.js → config-sync-helpers-bea5f027.esm.js} +1 -1
  18. package/dist/{config-sync-helpers-1dad1481.cjs.prod.js → config-sync-helpers-ea628bce.cjs.prod.js} +1 -1
  19. package/dist/{create-postcss-config-434fe673.cjs.prod.js → create-postcss-config-3f3bda09.cjs.prod.js} +1 -1
  20. package/dist/{create-postcss-config-1b021fb2.cjs.dev.js → create-postcss-config-e4c767b4.cjs.dev.js} +1 -1
  21. package/dist/{create-postcss-config-505c5a4e.esm.js → create-postcss-config-f6a5f68b.esm.js} +1 -1
  22. package/dist/{create-webpack-config-for-development-1db101e2.cjs.prod.js → create-webpack-config-for-development-4a2616e9.cjs.prod.js} +1 -1
  23. package/dist/{create-webpack-config-for-development-65abeb3f.cjs.dev.js → create-webpack-config-for-development-a2df037a.cjs.dev.js} +1 -1
  24. package/dist/{create-webpack-config-for-development-fd981a20.esm.js → create-webpack-config-for-development-c6e48557.esm.js} +1 -1
  25. package/dist/{create-webpack-config-for-production-bb66207f.esm.js → create-webpack-config-for-production-04a7a9f8.esm.js} +1 -1
  26. package/dist/{create-webpack-config-for-production-010a6fb4.cjs.dev.js → create-webpack-config-for-production-12e257fc.cjs.dev.js} +1 -1
  27. package/dist/{create-webpack-config-for-production-a239ba22.cjs.prod.js → create-webpack-config-for-production-443f6fe7.cjs.prod.js} +1 -1
  28. package/dist/{deployment-previews-set-beeaeb6d.cjs.prod.js → deployment-previews-set-2b334c11.cjs.prod.js} +2 -2
  29. package/dist/{deployment-previews-set-c4f8a461.cjs.dev.js → deployment-previews-set-491442d7.cjs.dev.js} +2 -2
  30. package/dist/{deployment-previews-set-6ceff6a3.esm.js → deployment-previews-set-4b020cb4.esm.js} +2 -2
  31. package/dist/{graphql-requests-4c97fe92.cjs.prod.js → graphql-requests-6ead2029.cjs.prod.js} +1 -1
  32. package/dist/{graphql-requests-53a1f5dd.esm.js → graphql-requests-87338c52.esm.js} +1 -1
  33. package/dist/{graphql-requests-86c87041.cjs.dev.js → graphql-requests-bd7a3fe9.cjs.dev.js} +1 -1
  34. package/dist/{login-c151a059.cjs.prod.js → login-26cfe1af.cjs.prod.js} +1 -1
  35. package/dist/{login-382b51ea.cjs.dev.js → login-2d10deff.cjs.dev.js} +1 -1
  36. package/dist/{login-1e4ddcda.esm.js → login-ab249036.esm.js} +1 -1
  37. package/dist/{package-dfc9c56b.cjs.prod.js → package-62998a4b.cjs.prod.js} +8 -8
  38. package/dist/{package-02f0532d.esm.js → package-a686a0ee.esm.js} +8 -8
  39. package/dist/{package-c8f39856.cjs.dev.js → package-fe1840f3.cjs.dev.js} +8 -8
  40. package/dist/{serve-00294d34.esm.js → serve-22475fec.esm.js} +17 -14
  41. package/dist/{serve-d62433a1.cjs.prod.js → serve-3837602d.cjs.prod.js} +18 -15
  42. package/dist/{serve-81db9f2e.cjs.dev.js → serve-b1c12985.cjs.dev.js} +18 -15
  43. package/dist/{start-5eb60c74.cjs.prod.js → start-19facf6d.cjs.prod.js} +3 -3
  44. package/dist/{start-6fc3b235.esm.js → start-3c1e5902.esm.js} +3 -3
  45. package/dist/{start-32bc9eca.cjs.dev.js → start-9b1252f9.cjs.dev.js} +3 -3
  46. package/package.json +8 -8
  47. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.dev.js +2 -2
  48. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.prod.js +2 -2
  49. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.esm.js +2 -2
  50. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.dev.js +4 -4
  51. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.prod.js +4 -4
  52. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.esm.js +4 -4
@@ -25,7 +25,7 @@ var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
25
25
  var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
26
26
  var applicationConfig = require('@commercetools-frontend/application-config');
27
27
  var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
28
- var createPostcssConfig = require('./create-postcss-config-1b021fb2.cjs.dev.js');
28
+ var createPostcssConfig = require('./create-postcss-config-e4c767b4.cjs.dev.js');
29
29
  var optimizations = require('./optimizations-56be74d6.cjs.dev.js');
30
30
  var paths = require('./paths-b76fc753.cjs.dev.js');
31
31
  var vendorsToTranspile = require('./vendors-to-transpile-6ab4ea06.cjs.dev.js');
@@ -23,7 +23,7 @@ import _createClass from '@babel/runtime-corejs3/helpers/esm/createClass';
23
23
  import _Object$assign from '@babel/runtime-corejs3/core-js-stable/object/assign';
24
24
  import { processConfig } from '@commercetools-frontend/application-config';
25
25
  import { replaceHtmlPlaceholders } from '@commercetools-frontend/mc-html-template';
26
- import { c as createPostcssConfig } from './create-postcss-config-505c5a4e.esm.js';
26
+ import { c as createPostcssConfig } from './create-postcss-config-f6a5f68b.esm.js';
27
27
  import { g as getWepbackCacheGroups, h as hasJsxRuntime } from './optimizations-54382f7b.esm.js';
28
28
  import { p as paths } from './paths-39f22b8b.esm.js';
29
29
  import { v as vendorsToTranspile } from './vendors-to-transpile-7dc84a72.esm.js';
@@ -27,7 +27,7 @@ import _reduceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/insta
27
27
  import _Object$assign from '@babel/runtime-corejs3/core-js-stable/object/assign';
28
28
  import fs from 'fs';
29
29
  import path from 'path';
30
- import { c as createPostcssConfig } from './create-postcss-config-505c5a4e.esm.js';
30
+ import { c as createPostcssConfig } from './create-postcss-config-f6a5f68b.esm.js';
31
31
  import { g as getWepbackCacheGroups, h as hasJsxRuntime } from './optimizations-54382f7b.esm.js';
32
32
  import { p as paths } from './paths-39f22b8b.esm.js';
33
33
  import { v as vendorsToTranspile } from './vendors-to-transpile-7dc84a72.esm.js';
@@ -29,7 +29,7 @@ var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/ins
29
29
  var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
30
30
  var fs = require('fs');
31
31
  var path = require('path');
32
- var createPostcssConfig = require('./create-postcss-config-1b021fb2.cjs.dev.js');
32
+ var createPostcssConfig = require('./create-postcss-config-e4c767b4.cjs.dev.js');
33
33
  var optimizations = require('./optimizations-56be74d6.cjs.dev.js');
34
34
  var paths = require('./paths-b76fc753.cjs.dev.js');
35
35
  var vendorsToTranspile = require('./vendors-to-transpile-6ab4ea06.cjs.dev.js');
@@ -29,7 +29,7 @@ var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/ins
29
29
  var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
30
30
  var fs = require('fs');
31
31
  var path = require('path');
32
- var createPostcssConfig = require('./create-postcss-config-434fe673.cjs.prod.js');
32
+ var createPostcssConfig = require('./create-postcss-config-3f3bda09.cjs.prod.js');
33
33
  var optimizations = require('./optimizations-da5a0cfa.cjs.prod.js');
34
34
  var paths = require('./paths-7768b440.cjs.prod.js');
35
35
  var vendorsToTranspile = require('./vendors-to-transpile-04a49d40.cjs.prod.js');
@@ -8,7 +8,7 @@ var chalk = require('chalk');
8
8
  var prompts = require('prompts');
9
9
  var applicationConfig = require('@commercetools-frontend/application-config');
10
10
  var credentialsStorage$1 = require('./credentials-storage-ea1c16dc.cjs.prod.js');
11
- var graphqlRequests = require('./graphql-requests-4c97fe92.cjs.prod.js');
11
+ var graphqlRequests = require('./graphql-requests-6ead2029.cjs.prod.js');
12
12
  require('@babel/runtime-corejs3/helpers/classCallCheck');
13
13
  require('@babel/runtime-corejs3/helpers/createClass');
14
14
  require('@babel/runtime-corejs3/core-js-stable/json/stringify');
@@ -30,7 +30,7 @@ require('graphql');
30
30
  require('graphql-request');
31
31
  require('@commercetools-frontend/constants');
32
32
  require('@commercetools/http-user-agent');
33
- require('./package-dfc9c56b.cjs.prod.js');
33
+ require('./package-62998a4b.cjs.prod.js');
34
34
 
35
35
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
36
36
 
@@ -8,7 +8,7 @@ var chalk = require('chalk');
8
8
  var prompts = require('prompts');
9
9
  var applicationConfig = require('@commercetools-frontend/application-config');
10
10
  var credentialsStorage$1 = require('./credentials-storage-fd195144.cjs.dev.js');
11
- var graphqlRequests = require('./graphql-requests-86c87041.cjs.dev.js');
11
+ var graphqlRequests = require('./graphql-requests-bd7a3fe9.cjs.dev.js');
12
12
  require('@babel/runtime-corejs3/helpers/classCallCheck');
13
13
  require('@babel/runtime-corejs3/helpers/createClass');
14
14
  require('@babel/runtime-corejs3/core-js-stable/json/stringify');
@@ -30,7 +30,7 @@ require('graphql');
30
30
  require('graphql-request');
31
31
  require('@commercetools-frontend/constants');
32
32
  require('@commercetools/http-user-agent');
33
- require('./package-c8f39856.cjs.dev.js');
33
+ require('./package-fe1840f3.cjs.dev.js');
34
34
 
35
35
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
36
36
 
@@ -6,7 +6,7 @@ import chalk from 'chalk';
6
6
  import prompts from 'prompts';
7
7
  import { processConfig } from '@commercetools-frontend/application-config';
8
8
  import { C as CredentialsStorage } from './credentials-storage-67deadc3.esm.js';
9
- import { d as fetchCustomApplication, g as updateCustomApplicationDeploymentPreview, h as createCustomApplicationDeploymentPreview } from './graphql-requests-53a1f5dd.esm.js';
9
+ import { d as fetchCustomApplication, g as updateCustomApplicationDeploymentPreview, h as createCustomApplicationDeploymentPreview } from './graphql-requests-87338c52.esm.js';
10
10
  import '@babel/runtime-corejs3/helpers/classCallCheck';
11
11
  import '@babel/runtime-corejs3/helpers/createClass';
12
12
  import '@babel/runtime-corejs3/core-js-stable/json/stringify';
@@ -28,7 +28,7 @@ import 'graphql';
28
28
  import 'graphql-request';
29
29
  import '@commercetools-frontend/constants';
30
30
  import '@commercetools/http-user-agent';
31
- import './package-02f0532d.esm.js';
31
+ import './package-a686a0ee.esm.js';
32
32
 
33
33
  const credentialsStorage = new CredentialsStorage();
34
34
  const validateUrl = function () {
@@ -16,7 +16,7 @@ var graphqlRequest = require('graphql-request');
16
16
  var constants = require('@commercetools-frontend/constants');
17
17
  var credentialsStorage$1 = require('./credentials-storage-ea1c16dc.cjs.prod.js');
18
18
  var createHttpUserAgent = require('@commercetools/http-user-agent');
19
- var _package = require('./package-dfc9c56b.cjs.prod.js');
19
+ var _package = require('./package-62998a4b.cjs.prod.js');
20
20
 
21
21
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
22
22
 
@@ -14,7 +14,7 @@ import { GraphQLClient, ClientError } from 'graphql-request';
14
14
  import { GRAPHQL_TARGETS, SUPPORTED_HEADERS } from '@commercetools-frontend/constants';
15
15
  import { C as CredentialsStorage } from './credentials-storage-67deadc3.esm.js';
16
16
  import createHttpUserAgent from '@commercetools/http-user-agent';
17
- import { p as pkgJson } from './package-02f0532d.esm.js';
17
+ import { p as pkgJson } from './package-a686a0ee.esm.js';
18
18
 
19
19
  const userAgent = createHttpUserAgent({
20
20
  name: 'graphql-request',
@@ -16,7 +16,7 @@ var graphqlRequest = require('graphql-request');
16
16
  var constants = require('@commercetools-frontend/constants');
17
17
  var credentialsStorage$1 = require('./credentials-storage-fd195144.cjs.dev.js');
18
18
  var createHttpUserAgent = require('@commercetools/http-user-agent');
19
- var _package = require('./package-c8f39856.cjs.dev.js');
19
+ var _package = require('./package-fe1840f3.cjs.dev.js');
20
20
 
21
21
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
22
22
 
@@ -15,7 +15,7 @@ var crypto = require('node:crypto');
15
15
  var process = require('node:process');
16
16
  var chalk = require('chalk');
17
17
  var applicationConfig = require('@commercetools-frontend/application-config');
18
- var _package = require('./package-dfc9c56b.cjs.prod.js');
18
+ var _package = require('./package-62998a4b.cjs.prod.js');
19
19
  var http = require('node:http');
20
20
  var jwtDecode = require('jwt-decode');
21
21
  var credentialsStorage$1 = require('./credentials-storage-ea1c16dc.cjs.prod.js');
@@ -15,7 +15,7 @@ var crypto = require('node:crypto');
15
15
  var process = require('node:process');
16
16
  var chalk = require('chalk');
17
17
  var applicationConfig = require('@commercetools-frontend/application-config');
18
- var _package = require('./package-c8f39856.cjs.dev.js');
18
+ var _package = require('./package-fe1840f3.cjs.dev.js');
19
19
  var http = require('node:http');
20
20
  var jwtDecode = require('jwt-decode');
21
21
  var credentialsStorage$1 = require('./credentials-storage-fd195144.cjs.dev.js');
@@ -13,7 +13,7 @@ import crypto from 'node:crypto';
13
13
  import process, { exit } from 'node:process';
14
14
  import chalk from 'chalk';
15
15
  import { processConfig } from '@commercetools-frontend/application-config';
16
- import { p as pkgJson } from './package-02f0532d.esm.js';
16
+ import { p as pkgJson } from './package-a686a0ee.esm.js';
17
17
  import http from 'node:http';
18
18
  import jwtDecode from 'jwt-decode';
19
19
  import { C as CredentialsStorage } from './credentials-storage-67deadc3.esm.js';
@@ -2,7 +2,7 @@
2
2
 
3
3
  var pkgJson = {
4
4
  name: "@commercetools-frontend/mc-scripts",
5
- version: "27.5.0",
5
+ version: "27.5.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: {
@@ -63,13 +63,13 @@ var pkgJson = {
63
63
  "@babel/plugin-proposal-do-expressions": "^7.22.5",
64
64
  "@babel/runtime": "^7.22.15",
65
65
  "@babel/runtime-corejs3": "^7.22.15",
66
- "@commercetools-frontend/application-components": "27.5.0",
67
- "@commercetools-frontend/application-config": "27.5.0",
68
- "@commercetools-frontend/assets": "27.5.0",
69
- "@commercetools-frontend/babel-preset-mc-app": "27.5.0",
70
- "@commercetools-frontend/constants": "27.5.0",
71
- "@commercetools-frontend/mc-dev-authentication": "27.5.0",
72
- "@commercetools-frontend/mc-html-template": "27.5.0",
66
+ "@commercetools-frontend/application-components": "27.5.1",
67
+ "@commercetools-frontend/application-config": "27.5.1",
68
+ "@commercetools-frontend/assets": "27.5.1",
69
+ "@commercetools-frontend/babel-preset-mc-app": "27.5.1",
70
+ "@commercetools-frontend/constants": "27.5.1",
71
+ "@commercetools-frontend/mc-dev-authentication": "27.5.1",
72
+ "@commercetools-frontend/mc-html-template": "27.5.1",
73
73
  "@commercetools/http-user-agent": "3.0.0",
74
74
  "@emotion/babel-plugin": "^11.13.5",
75
75
  "@formatjs/cli-lib": "^6.3.8",
@@ -1,6 +1,6 @@
1
1
  var pkgJson = {
2
2
  name: "@commercetools-frontend/mc-scripts",
3
- version: "27.5.0",
3
+ version: "27.5.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: {
@@ -61,13 +61,13 @@ var pkgJson = {
61
61
  "@babel/plugin-proposal-do-expressions": "^7.22.5",
62
62
  "@babel/runtime": "^7.22.15",
63
63
  "@babel/runtime-corejs3": "^7.22.15",
64
- "@commercetools-frontend/application-components": "27.5.0",
65
- "@commercetools-frontend/application-config": "27.5.0",
66
- "@commercetools-frontend/assets": "27.5.0",
67
- "@commercetools-frontend/babel-preset-mc-app": "27.5.0",
68
- "@commercetools-frontend/constants": "27.5.0",
69
- "@commercetools-frontend/mc-dev-authentication": "27.5.0",
70
- "@commercetools-frontend/mc-html-template": "27.5.0",
64
+ "@commercetools-frontend/application-components": "27.5.1",
65
+ "@commercetools-frontend/application-config": "27.5.1",
66
+ "@commercetools-frontend/assets": "27.5.1",
67
+ "@commercetools-frontend/babel-preset-mc-app": "27.5.1",
68
+ "@commercetools-frontend/constants": "27.5.1",
69
+ "@commercetools-frontend/mc-dev-authentication": "27.5.1",
70
+ "@commercetools-frontend/mc-html-template": "27.5.1",
71
71
  "@commercetools/http-user-agent": "3.0.0",
72
72
  "@emotion/babel-plugin": "^11.13.5",
73
73
  "@formatjs/cli-lib": "^6.3.8",
@@ -2,7 +2,7 @@
2
2
 
3
3
  var pkgJson = {
4
4
  name: "@commercetools-frontend/mc-scripts",
5
- version: "27.5.0",
5
+ version: "27.5.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: {
@@ -63,13 +63,13 @@ var pkgJson = {
63
63
  "@babel/plugin-proposal-do-expressions": "^7.22.5",
64
64
  "@babel/runtime": "^7.22.15",
65
65
  "@babel/runtime-corejs3": "^7.22.15",
66
- "@commercetools-frontend/application-components": "27.5.0",
67
- "@commercetools-frontend/application-config": "27.5.0",
68
- "@commercetools-frontend/assets": "27.5.0",
69
- "@commercetools-frontend/babel-preset-mc-app": "27.5.0",
70
- "@commercetools-frontend/constants": "27.5.0",
71
- "@commercetools-frontend/mc-dev-authentication": "27.5.0",
72
- "@commercetools-frontend/mc-html-template": "27.5.0",
66
+ "@commercetools-frontend/application-components": "27.5.1",
67
+ "@commercetools-frontend/application-config": "27.5.1",
68
+ "@commercetools-frontend/assets": "27.5.1",
69
+ "@commercetools-frontend/babel-preset-mc-app": "27.5.1",
70
+ "@commercetools-frontend/constants": "27.5.1",
71
+ "@commercetools-frontend/mc-dev-authentication": "27.5.1",
72
+ "@commercetools-frontend/mc-html-template": "27.5.1",
73
73
  "@commercetools/http-user-agent": "3.0.0",
74
74
  "@emotion/babel-plugin": "^11.13.5",
75
75
  "@formatjs/cli-lib": "^6.3.8",
@@ -4,7 +4,6 @@ import _URL from '@babel/runtime-corejs3/core-js-stable/url';
4
4
  import _Promise from '@babel/runtime-corejs3/core-js-stable/promise';
5
5
  import http from 'http';
6
6
  import sirv from 'sirv';
7
- import { processConfig } from '@commercetools-frontend/application-config';
8
7
  import { p as paths } from './paths-39f22b8b.esm.js';
9
8
  import '@babel/runtime-corejs3/core-js-stable/instance/find';
10
9
  import 'fs';
@@ -14,13 +13,13 @@ import 'node:fs';
14
13
 
15
14
  const DEFAULT_PORT = 3001;
16
15
  async function run() {
17
- var _context;
16
+ var _context, _context2, _context3;
18
17
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
19
18
  const port = options.port ?? DEFAULT_PORT;
20
19
  const publicPath = options.publicPath ?? paths.appBuild;
21
- const applicationConfig = options.applicationConfig ?? (await processConfig());
22
20
  const handleAuthRoutes = options.handleAuthRoutes ?? true;
23
- const isLocalMcApi = _startsWithInstanceProperty(_context = applicationConfig.env.mcApiUrl).call(_context, 'http://localhost');
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;
24
23
 
25
24
  // `single: true` gives us the SPA fallback — any unmatched path is served as
26
25
  // the root `index.html`. This replaces the complex glob workaround that
@@ -30,22 +29,26 @@ async function run() {
30
29
  etag: true
31
30
  });
32
31
  const server = http.createServer((request, response) => {
33
- var _context0, _context1;
34
- // Apps that own the `/login*` / `/logout*` routes themselves (e.g.
35
- // `application-authentication`) opt out via `handleAuthRoutes: false` so
36
- // those paths flow through to the SPA fallback like any other route.
37
- if (handleAuthRoutes) {
38
- var _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9;
32
+ var _context10, _context11;
33
+ // The auth-route handlers are the only consumer of `applicationConfig`,
34
+ // so the branch is entered only when both the flag is on AND the caller
35
+ // supplied a config. The CLI pairs the two see `serve` action in
36
+ // `cli.ts`. Apps that own the `/login*` / `/logout*` routes themselves
37
+ // (e.g. `application-authentication`) opt out via
38
+ // `--handle-auth-routes=false` so those paths flow through to the SPA
39
+ // fallback like any other route.
40
+ if (handleAuthRoutes && applicationConfig) {
41
+ var _context4, _context5, _context6, _context7, _context8, _context9, _context0, _context1;
39
42
  // Localhost-only: inline replacement for the login/logout UI that
40
43
  // `mc-dev-authentication` used to ship as static HTML (#3734).
41
- if (isLocalMcApi && ((_context2 = request.url) == null ? void 0 : _bindInstanceProperty(_context3 = Function.call).call(_context3, _startsWithInstanceProperty(_context2), _context2))?.('/login/authorize')) {
44
+ if (isLocalMcApi && ((_context4 = request.url) == null ? void 0 : _bindInstanceProperty(_context5 = Function.call).call(_context5, _startsWithInstanceProperty(_context4), _context4))?.('/login/authorize')) {
42
45
  const redirectTo = new _URL(request.url, applicationConfig.env.mcApiUrl);
43
46
  response.writeHead(301, {
44
47
  Location: redirectTo.toString()
45
48
  }).end();
46
49
  return;
47
50
  }
48
- if (isLocalMcApi && ((_context4 = request.url) == null ? void 0 : _bindInstanceProperty(_context5 = Function.call).call(_context5, _startsWithInstanceProperty(_context4), _context4))?.('/logout')) {
51
+ if (isLocalMcApi && ((_context6 = request.url) == null ? void 0 : _bindInstanceProperty(_context7 = Function.call).call(_context7, _startsWithInstanceProperty(_context6), _context6))?.('/logout')) {
49
52
  response.end('Please clear your session storage.');
50
53
  return;
51
54
  }
@@ -54,7 +57,7 @@ async function run() {
54
57
  // request (bare `/login`, non-localhost auth callbacks, etc.) must NOT
55
58
  // fall back to the SPA — that would mask OAuth callback
56
59
  // misconfigurations by rendering the app on a URL the backend owns.
57
- if (((_context6 = request.url) == null ? void 0 : _bindInstanceProperty(_context7 = Function.call).call(_context7, _startsWithInstanceProperty(_context6), _context6))?.('/login') || ((_context8 = request.url) == null ? void 0 : _bindInstanceProperty(_context9 = Function.call).call(_context9, _startsWithInstanceProperty(_context8), _context8))?.('/logout')) {
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')) {
58
61
  response.writeHead(404).end();
59
62
  return;
60
63
  }
@@ -62,7 +65,7 @@ async function run() {
62
65
 
63
66
  // Absorb `/favicon*` variants (e.g. `/favicon.ico`, `/favicon-32x32.png`)
64
67
  // into the single PNG the app ships.
65
- if (((_context0 = request.url) == null ? void 0 : _bindInstanceProperty(_context1 = Function.call).call(_context1, _startsWithInstanceProperty(_context0), _context0))?.('/favicon')) {
68
+ if (((_context10 = request.url) == null ? void 0 : _bindInstanceProperty(_context11 = Function.call).call(_context11, _startsWithInstanceProperty(_context10), _context10))?.('/favicon')) {
66
69
  request.url = '/favicon.png';
67
70
  }
68
71
  staticHandler(request, response, () => {
@@ -6,7 +6,6 @@ var _URL = require('@babel/runtime-corejs3/core-js-stable/url');
6
6
  var _Promise = require('@babel/runtime-corejs3/core-js-stable/promise');
7
7
  var http = require('http');
8
8
  var sirv = require('sirv');
9
- var applicationConfig = require('@commercetools-frontend/application-config');
10
9
  var paths = require('./paths-7768b440.cjs.prod.js');
11
10
  require('@babel/runtime-corejs3/core-js-stable/instance/find');
12
11
  require('fs');
@@ -25,13 +24,13 @@ var sirv__default = /*#__PURE__*/_interopDefault(sirv);
25
24
 
26
25
  const DEFAULT_PORT = 3001;
27
26
  async function run() {
28
- var _context;
27
+ var _context, _context2, _context3;
29
28
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
30
29
  const port = options.port ?? DEFAULT_PORT;
31
30
  const publicPath = options.publicPath ?? paths.paths.appBuild;
32
- const applicationConfig$1 = options.applicationConfig ?? (await applicationConfig.processConfig());
33
31
  const handleAuthRoutes = options.handleAuthRoutes ?? true;
34
- const isLocalMcApi = _startsWithInstanceProperty__default["default"](_context = applicationConfig$1.env.mcApiUrl).call(_context, 'http://localhost');
32
+ 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;
35
34
 
36
35
  // `single: true` gives us the SPA fallback — any unmatched path is served as
37
36
  // the root `index.html`. This replaces the complex glob workaround that
@@ -41,22 +40,26 @@ async function run() {
41
40
  etag: true
42
41
  });
43
42
  const server = http__default["default"].createServer((request, response) => {
44
- var _context0, _context1;
45
- // Apps that own the `/login*` / `/logout*` routes themselves (e.g.
46
- // `application-authentication`) opt out via `handleAuthRoutes: false` so
47
- // those paths flow through to the SPA fallback like any other route.
48
- if (handleAuthRoutes) {
49
- var _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9;
43
+ var _context10, _context11;
44
+ // The auth-route handlers are the only consumer of `applicationConfig`,
45
+ // so the branch is entered only when both the flag is on AND the caller
46
+ // supplied a config. The CLI pairs the two see `serve` action in
47
+ // `cli.ts`. Apps that own the `/login*` / `/logout*` routes themselves
48
+ // (e.g. `application-authentication`) opt out via
49
+ // `--handle-auth-routes=false` so those paths flow through to the SPA
50
+ // fallback like any other route.
51
+ if (handleAuthRoutes && applicationConfig) {
52
+ var _context4, _context5, _context6, _context7, _context8, _context9, _context0, _context1;
50
53
  // Localhost-only: inline replacement for the login/logout UI that
51
54
  // `mc-dev-authentication` used to ship as static HTML (#3734).
52
- if (isLocalMcApi && ((_context2 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context3 = Function.call).call(_context3, _startsWithInstanceProperty__default["default"](_context2), _context2))?.('/login/authorize')) {
53
- const redirectTo = new _URL__default["default"](request.url, applicationConfig$1.env.mcApiUrl);
55
+ if (isLocalMcApi && ((_context4 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context5 = Function.call).call(_context5, _startsWithInstanceProperty__default["default"](_context4), _context4))?.('/login/authorize')) {
56
+ const redirectTo = new _URL__default["default"](request.url, applicationConfig.env.mcApiUrl);
54
57
  response.writeHead(301, {
55
58
  Location: redirectTo.toString()
56
59
  }).end();
57
60
  return;
58
61
  }
59
- if (isLocalMcApi && ((_context4 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context5 = Function.call).call(_context5, _startsWithInstanceProperty__default["default"](_context4), _context4))?.('/logout')) {
62
+ if (isLocalMcApi && ((_context6 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context7 = Function.call).call(_context7, _startsWithInstanceProperty__default["default"](_context6), _context6))?.('/logout')) {
60
63
  response.end('Please clear your session storage.');
61
64
  return;
62
65
  }
@@ -65,7 +68,7 @@ async function run() {
65
68
  // request (bare `/login`, non-localhost auth callbacks, etc.) must NOT
66
69
  // fall back to the SPA — that would mask OAuth callback
67
70
  // misconfigurations by rendering the app on a URL the backend owns.
68
- if (((_context6 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context7 = Function.call).call(_context7, _startsWithInstanceProperty__default["default"](_context6), _context6))?.('/login') || ((_context8 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context9 = Function.call).call(_context9, _startsWithInstanceProperty__default["default"](_context8), _context8))?.('/logout')) {
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')) {
69
72
  response.writeHead(404).end();
70
73
  return;
71
74
  }
@@ -73,7 +76,7 @@ async function run() {
73
76
 
74
77
  // Absorb `/favicon*` variants (e.g. `/favicon.ico`, `/favicon-32x32.png`)
75
78
  // into the single PNG the app ships.
76
- if (((_context0 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context1 = Function.call).call(_context1, _startsWithInstanceProperty__default["default"](_context0), _context0))?.('/favicon')) {
79
+ if (((_context10 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context11 = Function.call).call(_context11, _startsWithInstanceProperty__default["default"](_context10), _context10))?.('/favicon')) {
77
80
  request.url = '/favicon.png';
78
81
  }
79
82
  staticHandler(request, response, () => {
@@ -6,7 +6,6 @@ var _URL = require('@babel/runtime-corejs3/core-js-stable/url');
6
6
  var _Promise = require('@babel/runtime-corejs3/core-js-stable/promise');
7
7
  var http = require('http');
8
8
  var sirv = require('sirv');
9
- var applicationConfig = require('@commercetools-frontend/application-config');
10
9
  var paths = require('./paths-b76fc753.cjs.dev.js');
11
10
  require('@babel/runtime-corejs3/core-js-stable/instance/find');
12
11
  require('fs');
@@ -25,13 +24,13 @@ var sirv__default = /*#__PURE__*/_interopDefault(sirv);
25
24
 
26
25
  const DEFAULT_PORT = 3001;
27
26
  async function run() {
28
- var _context;
27
+ var _context, _context2, _context3;
29
28
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
30
29
  const port = options.port ?? DEFAULT_PORT;
31
30
  const publicPath = options.publicPath ?? paths.paths.appBuild;
32
- const applicationConfig$1 = options.applicationConfig ?? (await applicationConfig.processConfig());
33
31
  const handleAuthRoutes = options.handleAuthRoutes ?? true;
34
- const isLocalMcApi = _startsWithInstanceProperty__default["default"](_context = applicationConfig$1.env.mcApiUrl).call(_context, 'http://localhost');
32
+ 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;
35
34
 
36
35
  // `single: true` gives us the SPA fallback — any unmatched path is served as
37
36
  // the root `index.html`. This replaces the complex glob workaround that
@@ -41,22 +40,26 @@ async function run() {
41
40
  etag: true
42
41
  });
43
42
  const server = http__default["default"].createServer((request, response) => {
44
- var _context0, _context1;
45
- // Apps that own the `/login*` / `/logout*` routes themselves (e.g.
46
- // `application-authentication`) opt out via `handleAuthRoutes: false` so
47
- // those paths flow through to the SPA fallback like any other route.
48
- if (handleAuthRoutes) {
49
- var _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9;
43
+ var _context10, _context11;
44
+ // The auth-route handlers are the only consumer of `applicationConfig`,
45
+ // so the branch is entered only when both the flag is on AND the caller
46
+ // supplied a config. The CLI pairs the two see `serve` action in
47
+ // `cli.ts`. Apps that own the `/login*` / `/logout*` routes themselves
48
+ // (e.g. `application-authentication`) opt out via
49
+ // `--handle-auth-routes=false` so those paths flow through to the SPA
50
+ // fallback like any other route.
51
+ if (handleAuthRoutes && applicationConfig) {
52
+ var _context4, _context5, _context6, _context7, _context8, _context9, _context0, _context1;
50
53
  // Localhost-only: inline replacement for the login/logout UI that
51
54
  // `mc-dev-authentication` used to ship as static HTML (#3734).
52
- if (isLocalMcApi && ((_context2 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context3 = Function.call).call(_context3, _startsWithInstanceProperty__default["default"](_context2), _context2))?.('/login/authorize')) {
53
- const redirectTo = new _URL__default["default"](request.url, applicationConfig$1.env.mcApiUrl);
55
+ if (isLocalMcApi && ((_context4 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context5 = Function.call).call(_context5, _startsWithInstanceProperty__default["default"](_context4), _context4))?.('/login/authorize')) {
56
+ const redirectTo = new _URL__default["default"](request.url, applicationConfig.env.mcApiUrl);
54
57
  response.writeHead(301, {
55
58
  Location: redirectTo.toString()
56
59
  }).end();
57
60
  return;
58
61
  }
59
- if (isLocalMcApi && ((_context4 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context5 = Function.call).call(_context5, _startsWithInstanceProperty__default["default"](_context4), _context4))?.('/logout')) {
62
+ if (isLocalMcApi && ((_context6 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context7 = Function.call).call(_context7, _startsWithInstanceProperty__default["default"](_context6), _context6))?.('/logout')) {
60
63
  response.end('Please clear your session storage.');
61
64
  return;
62
65
  }
@@ -65,7 +68,7 @@ async function run() {
65
68
  // request (bare `/login`, non-localhost auth callbacks, etc.) must NOT
66
69
  // fall back to the SPA — that would mask OAuth callback
67
70
  // misconfigurations by rendering the app on a URL the backend owns.
68
- if (((_context6 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context7 = Function.call).call(_context7, _startsWithInstanceProperty__default["default"](_context6), _context6))?.('/login') || ((_context8 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context9 = Function.call).call(_context9, _startsWithInstanceProperty__default["default"](_context8), _context8))?.('/logout')) {
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')) {
69
72
  response.writeHead(404).end();
70
73
  return;
71
74
  }
@@ -73,7 +76,7 @@ async function run() {
73
76
 
74
77
  // Absorb `/favicon*` variants (e.g. `/favicon.ico`, `/favicon-32x32.png`)
75
78
  // into the single PNG the app ships.
76
- if (((_context0 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context1 = Function.call).call(_context1, _startsWithInstanceProperty__default["default"](_context0), _context0))?.('/favicon')) {
79
+ if (((_context10 = request.url) == null ? void 0 : _bindInstanceProperty__default["default"](_context11 = Function.call).call(_context11, _startsWithInstanceProperty__default["default"](_context10), _context10))?.('/favicon')) {
77
80
  request.url = '/favicon.png';
78
81
  }
79
82
  staticHandler(request, response, () => {
@@ -9,7 +9,7 @@ var openBrowser = require('react-dev-utils/openBrowser');
9
9
  var WebpackDevServerUtils = require('react-dev-utils/WebpackDevServerUtils');
10
10
  var webpack = require('webpack');
11
11
  var WebpackDevServer = require('webpack-dev-server');
12
- var createWebpackConfigForDevelopment = require('./create-webpack-config-for-development-1db101e2.cjs.prod.js');
12
+ var createWebpackConfigForDevelopment = require('./create-webpack-config-for-development-4a2616e9.cjs.prod.js');
13
13
  var paths = require('./paths-7768b440.cjs.prod.js');
14
14
  var applicationConfig = require('@commercetools-frontend/application-config');
15
15
  var mcDevAuthentication = require('@commercetools-frontend/mc-dev-authentication');
@@ -36,9 +36,9 @@ require('webpackbar');
36
36
  require('@babel/runtime-corejs3/helpers/classCallCheck');
37
37
  require('@babel/runtime-corejs3/helpers/createClass');
38
38
  require('@babel/runtime-corejs3/core-js-stable/object/assign');
39
- require('./create-postcss-config-434fe673.cjs.prod.js');
39
+ require('./create-postcss-config-3f3bda09.cjs.prod.js');
40
40
  require('@babel/runtime-corejs3/helpers/slicedToArray');
41
- require('./package-dfc9c56b.cjs.prod.js');
41
+ require('./package-62998a4b.cjs.prod.js');
42
42
  require('./optimizations-da5a0cfa.cjs.prod.js');
43
43
  require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
44
44
  require('@babel/runtime-corejs3/core-js-stable/object/entries');
@@ -7,7 +7,7 @@ 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-fd981a20.esm.js';
10
+ import { c as createWebpackConfigForDevelopment } from './create-webpack-config-for-development-c6e48557.esm.js';
11
11
  import { p as paths } from './paths-39f22b8b.esm.js';
12
12
  import { processConfig } from '@commercetools-frontend/application-config';
13
13
  import { createMcDevAuthenticationMiddleware } from '@commercetools-frontend/mc-dev-authentication';
@@ -34,9 +34,9 @@ import 'webpackbar';
34
34
  import '@babel/runtime-corejs3/helpers/classCallCheck';
35
35
  import '@babel/runtime-corejs3/helpers/createClass';
36
36
  import '@babel/runtime-corejs3/core-js-stable/object/assign';
37
- import './create-postcss-config-505c5a4e.esm.js';
37
+ import './create-postcss-config-f6a5f68b.esm.js';
38
38
  import '@babel/runtime-corejs3/helpers/slicedToArray';
39
- import './package-02f0532d.esm.js';
39
+ import './package-a686a0ee.esm.js';
40
40
  import './optimizations-54382f7b.esm.js';
41
41
  import '@babel/runtime-corejs3/core-js-stable/instance/reduce';
42
42
  import '@babel/runtime-corejs3/core-js-stable/object/entries';
@@ -9,7 +9,7 @@ var openBrowser = require('react-dev-utils/openBrowser');
9
9
  var WebpackDevServerUtils = require('react-dev-utils/WebpackDevServerUtils');
10
10
  var webpack = require('webpack');
11
11
  var WebpackDevServer = require('webpack-dev-server');
12
- var createWebpackConfigForDevelopment = require('./create-webpack-config-for-development-65abeb3f.cjs.dev.js');
12
+ var createWebpackConfigForDevelopment = require('./create-webpack-config-for-development-a2df037a.cjs.dev.js');
13
13
  var paths = require('./paths-b76fc753.cjs.dev.js');
14
14
  var applicationConfig = require('@commercetools-frontend/application-config');
15
15
  var mcDevAuthentication = require('@commercetools-frontend/mc-dev-authentication');
@@ -36,9 +36,9 @@ require('webpackbar');
36
36
  require('@babel/runtime-corejs3/helpers/classCallCheck');
37
37
  require('@babel/runtime-corejs3/helpers/createClass');
38
38
  require('@babel/runtime-corejs3/core-js-stable/object/assign');
39
- require('./create-postcss-config-1b021fb2.cjs.dev.js');
39
+ require('./create-postcss-config-e4c767b4.cjs.dev.js');
40
40
  require('@babel/runtime-corejs3/helpers/slicedToArray');
41
- require('./package-c8f39856.cjs.dev.js');
41
+ require('./package-fe1840f3.cjs.dev.js');
42
42
  require('./optimizations-56be74d6.cjs.dev.js');
43
43
  require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
44
44
  require('@babel/runtime-corejs3/core-js-stable/object/entries');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/mc-scripts",
3
- "version": "27.5.0",
3
+ "version": "27.5.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": {
@@ -61,13 +61,13 @@
61
61
  "@babel/plugin-proposal-do-expressions": "^7.22.5",
62
62
  "@babel/runtime": "^7.22.15",
63
63
  "@babel/runtime-corejs3": "^7.22.15",
64
- "@commercetools-frontend/application-components": "27.5.0",
65
- "@commercetools-frontend/application-config": "27.5.0",
66
- "@commercetools-frontend/assets": "27.5.0",
67
- "@commercetools-frontend/babel-preset-mc-app": "27.5.0",
68
- "@commercetools-frontend/constants": "27.5.0",
69
- "@commercetools-frontend/mc-dev-authentication": "27.5.0",
70
- "@commercetools-frontend/mc-html-template": "27.5.0",
64
+ "@commercetools-frontend/application-components": "27.5.1",
65
+ "@commercetools-frontend/application-config": "27.5.1",
66
+ "@commercetools-frontend/assets": "27.5.1",
67
+ "@commercetools-frontend/babel-preset-mc-app": "27.5.1",
68
+ "@commercetools-frontend/constants": "27.5.1",
69
+ "@commercetools-frontend/mc-dev-authentication": "27.5.1",
70
+ "@commercetools-frontend/mc-html-template": "27.5.1",
71
71
  "@commercetools/http-user-agent": "3.0.0",
72
72
  "@emotion/babel-plugin": "^11.13.5",
73
73
  "@formatjs/cli-lib": "^6.3.8",