@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
@@ -2,15 +2,16 @@
2
2
 
3
3
  var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
4
4
  var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
5
+ var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
5
6
  var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
6
7
  var chalk = require('chalk');
7
8
  var applicationConfig = require('@commercetools-frontend/application-config');
8
- var configSyncHelpers = require('./config-sync-helpers-aaaa44ef.cjs.prod.js');
9
- var graphqlRequests = require('./graphql-requests-8a5d602b.cjs.prod.js');
9
+ var configSyncHelpers = require('./config-sync-helpers-79ccaaad.cjs.prod.js');
10
+ var graphqlRequests = require('./graphql-requests-98b1b779.cjs.prod.js');
10
11
  var _Date$now = require('@babel/runtime-corejs3/core-js-stable/date/now');
11
12
  var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
12
13
  var jwtDecode = require('jwt-decode');
13
- var credentialsStorage = require('./credentials-storage-ea1c16dc.cjs.prod.js');
14
+ var credentialsStorage = require('./credentials-storage-60a63c81.cjs.prod.js');
14
15
  require('@babel/runtime-corejs3/core-js-stable/json/stringify');
15
16
  require('lodash/omit');
16
17
  require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
@@ -22,7 +23,6 @@ require('@babel/runtime-corejs3/helpers/defineProperty');
22
23
  require('@babel/runtime-corejs3/core-js-stable/instance/repeat');
23
24
  require('@babel/runtime-corejs3/core-js-stable/set');
24
25
  require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
25
- require('@babel/runtime-corejs3/core-js-stable/instance/bind');
26
26
  require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
27
27
  require('@babel/runtime-corejs3/core-js-stable/instance/filter');
28
28
  require('@babel/runtime-corejs3/core-js-stable/object/keys');
@@ -31,7 +31,7 @@ require('graphql');
31
31
  require('graphql-request');
32
32
  require('@commercetools-frontend/constants');
33
33
  require('@commercetools/http-user-agent');
34
- require('./package-3539c84a.cjs.prod.js');
34
+ require('./package-90af7dfe.cjs.prod.js');
35
35
  require('@babel/runtime-corejs3/helpers/classCallCheck');
36
36
  require('@babel/runtime-corejs3/helpers/createClass');
37
37
  require('node:fs');
@@ -42,11 +42,11 @@ require('./does-file-exist-be53305d.cjs.prod.js');
42
42
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
43
43
 
44
44
  var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
45
+ var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
45
46
  var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
46
47
  var chalk__default = /*#__PURE__*/_interopDefault(chalk);
47
48
  var _Date$now__default = /*#__PURE__*/_interopDefault(_Date$now);
48
49
  var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
49
- var jwtDecode__default = /*#__PURE__*/_interopDefault(jwtDecode);
50
50
 
51
51
  /**
52
52
  * Environment variable names for CI authentication
@@ -68,7 +68,7 @@ async function authenticateForCI(_ref) {
68
68
  const envToken = process.env[ENV_VARS$1.TOKEN];
69
69
  if (envToken) {
70
70
  try {
71
- const decodedToken = jwtDecode__default["default"](envToken);
71
+ const decodedToken = jwtDecode.jwtDecode(envToken);
72
72
  const now = Math.floor(_Date$now__default["default"]() / 1000);
73
73
  if (decodedToken.exp <= now) {
74
74
  throw new Error('The provided MC_ACCESS_TOKEN has expired');
@@ -95,14 +95,14 @@ async function authenticateForCI(_ref) {
95
95
  if (credentialsStorage$1.isSessionValid(mcApiUrl)) {
96
96
  const token = credentialsStorage$1.getToken(mcApiUrl);
97
97
  if (token) {
98
- const decodedToken = jwtDecode__default["default"](token);
98
+ const decodedToken = jwtDecode.jwtDecode(token);
99
99
  return {
100
100
  token,
101
101
  expiresAt: decodedToken.exp
102
102
  };
103
103
  }
104
104
  }
105
- throw new Error(`No valid authentication found for CI mode. Please provide one of:\n` + ` - ${ENV_VARS$1.TOKEN}: A valid MC session token\n` + ` - Run "mc-scripts login --headless" with IDENTITY_EMAIL and IDENTITY_PASSWORD\n` + ` - Run "mc-scripts login" interactively to create a session`);
105
+ throw new Error("No valid authentication found for CI mode. Please provide one of:\n" + " - ".concat(ENV_VARS$1.TOKEN, ": A valid MC session token\n") + " - Run \"mc-scripts login --headless\" with IDENTITY_EMAIL and IDENTITY_PASSWORD\n" + " - Run \"mc-scripts login\" interactively to create a session");
106
106
  }
107
107
 
108
108
  /**
@@ -113,7 +113,7 @@ const ENV_VARS = {
113
113
  ORGANIZATION_NAME: 'CT_ORGANIZATION_NAME'
114
114
  };
115
115
  async function resolveOrganization(_ref) {
116
- var _context3;
116
+ var _context5, _context7, _context8;
117
117
  let mcApiUrl = _ref.mcApiUrl,
118
118
  applicationIdentifier = _ref.applicationIdentifier,
119
119
  customViewId = _ref.customViewId;
@@ -123,7 +123,7 @@ async function resolveOrganization(_ref) {
123
123
  customViewId
124
124
  });
125
125
  if (userOrganizations.total === 0) {
126
- throw new Error(`No organizations found. Please ensure you are an admin of at least one Organization.`);
126
+ throw new Error("No organizations found. Please ensure you are an admin of at least one Organization.");
127
127
  }
128
128
 
129
129
  // Check if organization was provided via environment variables
@@ -133,7 +133,8 @@ async function resolveOrganization(_ref) {
133
133
  var _context;
134
134
  const matchingOrg = _findInstanceProperty__default["default"](_context = userOrganizations.results).call(_context, org => org.id === organizationId);
135
135
  if (!matchingOrg) {
136
- throw new Error(`Organization with ID "${organizationId}" (from ${ENV_VARS.ORGANIZATION_ID}) not found or you don't have admin access to it.`);
136
+ var _context2;
137
+ throw new Error(_concatInstanceProperty__default["default"](_context2 = "Organization with ID \"".concat(organizationId, "\" (from ")).call(_context2, ENV_VARS.ORGANIZATION_ID, ") not found or you don't have admin access to it."));
137
138
  }
138
139
  return {
139
140
  id: matchingOrg.id,
@@ -141,10 +142,11 @@ async function resolveOrganization(_ref) {
141
142
  };
142
143
  }
143
144
  if (organizationName) {
144
- var _context2;
145
- const matchingOrg = _findInstanceProperty__default["default"](_context2 = userOrganizations.results).call(_context2, org => org.name === organizationName);
145
+ var _context3;
146
+ const matchingOrg = _findInstanceProperty__default["default"](_context3 = userOrganizations.results).call(_context3, org => org.name === organizationName);
146
147
  if (!matchingOrg) {
147
- throw new Error(`Organization with name "${organizationName}" (from ${ENV_VARS.ORGANIZATION_NAME}) not found or you don't have admin access to it.`);
148
+ var _context4;
149
+ throw new Error(_concatInstanceProperty__default["default"](_context4 = "Organization with name \"".concat(organizationName, "\" (from ")).call(_context4, ENV_VARS.ORGANIZATION_NAME, ") not found or you don't have admin access to it."));
148
150
  }
149
151
  return {
150
152
  id: matchingOrg.id,
@@ -156,7 +158,7 @@ async function resolveOrganization(_ref) {
156
158
  if (userOrganizations.total === 1) {
157
159
  const _userOrganizations$re = _slicedToArray(userOrganizations.results, 1),
158
160
  organization = _userOrganizations$re[0];
159
- console.log(`Using organization "${chalk__default["default"].green(organization.name)}" (only one available).`);
161
+ console.log("Using organization \"".concat(chalk__default["default"].green(organization.name), "\" (only one available)."));
160
162
  return {
161
163
  id: organization.id,
162
164
  name: organization.name
@@ -164,8 +166,11 @@ async function resolveOrganization(_ref) {
164
166
  }
165
167
 
166
168
  // Multiple organizations and none specified - error in CI mode
167
- const orgNames = _mapInstanceProperty__default["default"](_context3 = userOrganizations.results).call(_context3, org => ` - "${org.name}" (ID: ${org.id})`).join('\n');
168
- throw new Error(`Multiple organizations found. Please specify one using ${ENV_VARS.ORGANIZATION_ID} or ${ENV_VARS.ORGANIZATION_NAME} environment variable:\n${orgNames}`);
169
+ const orgNames = _mapInstanceProperty__default["default"](_context5 = userOrganizations.results).call(_context5, org => {
170
+ var _context6;
171
+ return _concatInstanceProperty__default["default"](_context6 = " - \"".concat(org.name, "\" (ID: ")).call(_context6, org.id, ")");
172
+ }).join('\n');
173
+ throw new Error(_concatInstanceProperty__default["default"](_context7 = _concatInstanceProperty__default["default"](_context8 = "Multiple organizations found. Please specify one using ".concat(ENV_VARS.ORGANIZATION_ID, " or ")).call(_context8, ENV_VARS.ORGANIZATION_NAME, " environment variable:\n")).call(_context7, orgNames));
169
174
  }
170
175
  async function handleCustomApplication(_ref2) {
171
176
  let mcApiUrl = _ref2.mcApiUrl,
@@ -198,7 +203,7 @@ async function handleCustomApplication(_ref2) {
198
203
  // Check for changes
199
204
  if (!status.configDiff) {
200
205
  console.log(chalk__default["default"].green('Custom Application is up-to-date.'));
201
- console.log(`URL: ${chalk__default["default"].gray(status.link)}`);
206
+ console.log("URL: ".concat(chalk__default["default"].gray(status.link)));
202
207
  return;
203
208
  }
204
209
  console.log('Changes detected:');
@@ -246,7 +251,7 @@ async function handleCustomView(_ref3) {
246
251
  // Check for changes
247
252
  if (!status.configDiff) {
248
253
  console.log(chalk__default["default"].green('Custom View is up-to-date.'));
249
- console.log(`URL: ${chalk__default["default"].gray(status.link)}`);
254
+ console.log("URL: ".concat(chalk__default["default"].gray(status.link)));
250
255
  return;
251
256
  }
252
257
  console.log('Changes detected:');
@@ -268,7 +273,7 @@ async function run(options) {
268
273
  mcApiUrl = _applicationConfig$en.mcApiUrl,
269
274
  applicationIdentifier = _applicationConfig$en.applicationIdentifier,
270
275
  customViewId = _applicationConfig$en.customViewId;
271
- console.log(`Environment: ${chalk__default["default"].green(mcApiUrl)}`);
276
+ console.log("Environment: ".concat(chalk__default["default"].green(mcApiUrl)));
272
277
 
273
278
  // Authenticate for CI
274
279
  console.log('Authenticating...');
@@ -279,7 +284,7 @@ async function run(options) {
279
284
  console.log(chalk__default["default"].green('Authentication successful.'));
280
285
  } catch (error) {
281
286
  if (error instanceof Error) {
282
- throw new Error(`Authentication failed: ${error.message}`);
287
+ throw new Error("Authentication failed: ".concat(error.message));
283
288
  }
284
289
  throw error;
285
290
  }
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
3
4
  var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
4
5
  var chalk = require('chalk');
5
6
  var omit = require('lodash/omit');
@@ -12,16 +13,16 @@ var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
12
13
  var _repeatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/repeat');
13
14
  var _Set = require('@babel/runtime-corejs3/core-js-stable/set');
14
15
  var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
15
- var _bindInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/bind');
16
16
  var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
17
17
  var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
18
18
  var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
19
19
  var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
20
20
  var applicationConfig = require('@commercetools-frontend/application-config');
21
- var graphqlRequests = require('./graphql-requests-d1683e27.cjs.dev.js');
21
+ var graphqlRequests = require('./graphql-requests-1ea68584.cjs.dev.js');
22
22
 
23
23
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
24
24
 
25
+ var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
25
26
  var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
26
27
  var chalk__default = /*#__PURE__*/_interopDefault(chalk);
27
28
  var omit__default = /*#__PURE__*/_interopDefault(omit);
@@ -33,24 +34,23 @@ var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defin
33
34
  var _repeatInstanceProperty__default = /*#__PURE__*/_interopDefault(_repeatInstanceProperty);
34
35
  var _Set__default = /*#__PURE__*/_interopDefault(_Set);
35
36
  var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty);
36
- var _bindInstanceProperty__default = /*#__PURE__*/_interopDefault(_bindInstanceProperty);
37
37
  var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInstanceProperty);
38
38
  var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
39
39
  var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
40
40
  var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
41
41
 
42
42
  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; }
43
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context9, _context0; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context9 = ownKeys(Object(t), !0)).call(_context9, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context0 = ownKeys(Object(t))).call(_context0, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
43
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context21, _context22; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context21 = ownKeys(Object(t), !0)).call(_context21, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context22 = ownKeys(Object(t))).call(_context22, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
44
44
 
45
45
  // Since not all terminal supports colors, to make things more consistent for testing purposes,
46
46
  // during tests the color used is appended before the string instead of coloring it.
47
47
  const isTest = process.env.NODE_ENV === 'test';
48
48
  const red = str => {
49
- if (isTest) return `<color-red>${str}</color-red>`;
49
+ if (isTest) return "<color-red>".concat(str, "</color-red>");
50
50
  return chalk__default["default"].red(str);
51
51
  };
52
52
  const green = str => {
53
- if (isTest) return `<color-green>${str}</color-green>`;
53
+ if (isTest) return "<color-green>".concat(str, "</color-green>");
54
54
  return chalk__default["default"].green(str);
55
55
  };
56
56
 
@@ -66,19 +66,21 @@ const getStringDiff = _ref => {
66
66
  _ref$indentLevel = _ref.indentLevel,
67
67
  indentLevel = _ref$indentLevel === void 0 ? 0 : _ref$indentLevel;
68
68
  if (!previousValue && nextValue) {
69
- return `${indent(indentLevel)}${label} added: ${green(nextValue)}`;
69
+ var _context2, _context3;
70
+ return _concatInstanceProperty__default["default"](_context2 = _concatInstanceProperty__default["default"](_context3 = "".concat(indent(indentLevel))).call(_context3, label, " added: ")).call(_context2, green(nextValue));
70
71
  }
71
72
  if (previousValue && !nextValue) {
72
- return `${indent(indentLevel)}${label} removed: ${red(previousValue)}`;
73
+ var _context4, _context5;
74
+ return _concatInstanceProperty__default["default"](_context4 = _concatInstanceProperty__default["default"](_context5 = "".concat(indent(indentLevel))).call(_context5, label, " removed: ")).call(_context4, red(previousValue));
73
75
  }
74
76
  if (previousValue && nextValue && previousValue !== nextValue) {
75
- return `${indent(indentLevel)}${label} changed: ${red(previousValue)} => ${green(nextValue)}`;
77
+ var _context6, _context7, _context8;
78
+ return _concatInstanceProperty__default["default"](_context6 = _concatInstanceProperty__default["default"](_context7 = _concatInstanceProperty__default["default"](_context8 = "".concat(indent(indentLevel))).call(_context8, label, " changed: ")).call(_context7, red(previousValue), " => ")).call(_context6, green(nextValue));
76
79
  }
77
80
  return null;
78
81
  };
79
82
  // NOTE: this assumes that the array values are scalar values (not objects).
80
83
  const getArrayDiff = _ref2 => {
81
- var _context2, _context3;
82
84
  let previousValue = _ref2.previousValue,
83
85
  nextValue = _ref2.nextValue,
84
86
  label = _ref2.label,
@@ -86,7 +88,7 @@ const getArrayDiff = _ref2 => {
86
88
  indentLevel = _ref2$indentLevel === void 0 ? 0 : _ref2$indentLevel;
87
89
  const oldArraySet = new _Set__default["default"](previousValue);
88
90
  const arrayDiff = [];
89
- ((_context2 = nextValue) == null ? void 0 : _bindInstanceProperty__default["default"](_context3 = Function.call).call(_context3, _forEachInstanceProperty__default["default"](_context2), _context2))?.(item => {
91
+ nextValue === null || nextValue === void 0 || _forEachInstanceProperty__default["default"](nextValue).call(nextValue, item => {
90
92
  if (oldArraySet.has(item)) {
91
93
  oldArraySet.delete(item);
92
94
  } else {
@@ -107,7 +109,7 @@ const getArrayDiff = _ref2 => {
107
109
  return arrayDiff.join('\n');
108
110
  };
109
111
  const getPermissionsDiff = _ref3 => {
110
- var _context4;
112
+ var _context1;
111
113
  let previousValue = _ref3.previousValue,
112
114
  nextValue = _ref3.nextValue;
113
115
  const permissionDiff = ['permissions changed'];
@@ -120,10 +122,12 @@ const getPermissionsDiff = _ref3 => {
120
122
  }, {});
121
123
  const indentLevel = 1;
122
124
  _forEachInstanceProperty__default["default"](nextValue).call(nextValue, newPermission => {
123
- const currentDiff = [`${indent(indentLevel)}"${newPermission.name}" changed`];
125
+ var _context9;
126
+ const currentDiff = [_concatInstanceProperty__default["default"](_context9 = "".concat(indent(indentLevel), "\"")).call(_context9, newPermission.name, "\" changed")];
124
127
  // if the permission name is not in the old config, it means it is a new addition.
125
128
  if (!mappedOldPermissions[newPermission.name]) {
126
- permissionDiff.push(`${indent(indentLevel)}"${green(newPermission.name)}" was added`);
129
+ var _context0;
130
+ permissionDiff.push(_concatInstanceProperty__default["default"](_context0 = "".concat(indent(indentLevel), "\"")).call(_context0, green(newPermission.name), "\" was added"));
127
131
  }
128
132
 
129
133
  // if permission name is in the old config, now we check if there was a change
@@ -140,21 +144,22 @@ const getPermissionsDiff = _ref3 => {
140
144
  });
141
145
 
142
146
  // if there are old permissions left, it means they were deleted in the new Permissions.
143
- _forEachInstanceProperty__default["default"](_context4 = _Object$keys__default["default"](mappedOldPermissions)).call(_context4, oldPermissionName => {
144
- permissionDiff.push(`${indent(indentLevel)}"${red(oldPermissionName)}" was removed`);
147
+ _forEachInstanceProperty__default["default"](_context1 = _Object$keys__default["default"](mappedOldPermissions)).call(_context1, oldPermissionName => {
148
+ var _context10;
149
+ permissionDiff.push(_concatInstanceProperty__default["default"](_context10 = "".concat(indent(indentLevel), "\"")).call(_context10, red(oldPermissionName), "\" was removed"));
145
150
  });
146
151
  if (permissionDiff.length > 1) return permissionDiff.join('\n');
147
152
  return null;
148
153
  };
149
154
  const getLabelAllLocalesDiff = _ref5 => {
150
- var _context5;
155
+ var _context14;
151
156
  let _ref5$previousValue = _ref5.previousValue,
152
157
  previousValue = _ref5$previousValue === void 0 ? [] : _ref5$previousValue,
153
158
  _ref5$nextValue = _ref5.nextValue,
154
159
  nextValue = _ref5$nextValue === void 0 ? [] : _ref5$nextValue,
155
160
  _ref5$indentLevel = _ref5.indentLevel,
156
161
  indentLevel = _ref5$indentLevel === void 0 ? 0 : _ref5$indentLevel;
157
- const labelAllLocalesDiff = [`${indent(indentLevel - 1)}labelAllLocales changed`];
162
+ const labelAllLocalesDiff = ["".concat(indent(indentLevel - 1), "labelAllLocales changed")];
158
163
  const mappedOldLabelAllLocales = _reduceInstanceProperty__default["default"](previousValue).call(previousValue, (previousLabelAllLocale, _ref6) => {
159
164
  let locale = _ref6.locale,
160
165
  value = _ref6.value;
@@ -166,7 +171,8 @@ const getLabelAllLocalesDiff = _ref5 => {
166
171
  if (newLabelAllLocale.locale in mappedOldLabelAllLocales) {
167
172
  const oldLocaleValue = mappedOldLabelAllLocales[newLabelAllLocale.locale];
168
173
  if (oldLocaleValue !== newLabelAllLocale.value) {
169
- labelAllLocalesDiff.push(`${indent(indentLevel)}locale "${newLabelAllLocale.locale}" changed: ${red(oldLocaleValue)} => ${green(newLabelAllLocale.value)}`);
174
+ var _context11, _context12, _context13;
175
+ labelAllLocalesDiff.push(_concatInstanceProperty__default["default"](_context11 = _concatInstanceProperty__default["default"](_context12 = _concatInstanceProperty__default["default"](_context13 = "".concat(indent(indentLevel), "locale \"")).call(_context13, newLabelAllLocale.locale, "\" changed: ")).call(_context12, red(oldLocaleValue), " => ")).call(_context11, green(newLabelAllLocale.value)));
170
176
  }
171
177
  delete mappedOldLabelAllLocales[newLabelAllLocale.locale];
172
178
  } else {
@@ -180,7 +186,7 @@ const getLabelAllLocalesDiff = _ref5 => {
180
186
  }
181
187
  }
182
188
  });
183
- _forEachInstanceProperty__default["default"](_context5 = _Object$keys__default["default"](mappedOldLabelAllLocales)).call(_context5, key => {
189
+ _forEachInstanceProperty__default["default"](_context14 = _Object$keys__default["default"](mappedOldLabelAllLocales)).call(_context14, key => {
184
190
  const localeDiff = getStringDiff({
185
191
  previousValue: key,
186
192
  label: 'locale',
@@ -194,14 +200,14 @@ const getLabelAllLocalesDiff = _ref5 => {
194
200
  return null;
195
201
  };
196
202
  const getTypeSettingsDiff = _ref7 => {
197
- var _context6;
203
+ var _context15;
198
204
  let previousValue = _ref7.previousValue,
199
205
  nextValue = _ref7.nextValue;
200
206
  const nonNullablePreviousValue = previousValue || {};
201
207
  const nonNullableNextValue = nextValue || {};
202
208
  const indentLevel = 1;
203
- const typeSettingsDiff = [`${indent(indentLevel - 1)}type settings changed`];
204
- _forEachInstanceProperty__default["default"](_context6 = _Object$keys__default["default"](nonNullablePreviousValue)).call(_context6, key => {
209
+ const typeSettingsDiff = ["".concat(indent(indentLevel - 1), "type settings changed")];
210
+ _forEachInstanceProperty__default["default"](_context15 = _Object$keys__default["default"](nonNullablePreviousValue)).call(_context15, key => {
205
211
  const typeSettingDiff = getStringDiff({
206
212
  previousValue: nonNullablePreviousValue[key],
207
213
  nextValue: nonNullableNextValue[key],
@@ -251,7 +257,7 @@ const getMainMenuLinkDiff = _ref9 => {
251
257
  indentLevel: 2
252
258
  });
253
259
  if (mainMenuLinkPermissionsDiff.length > 0) {
254
- mainMenuLinkDiff.push(`${indent(1)}permissions changed`);
260
+ mainMenuLinkDiff.push("".concat(indent(1), "permissions changed"));
255
261
  mainMenuLinkDiff.push(mainMenuLinkPermissionsDiff);
256
262
  }
257
263
  const menuLabelsDiff = getLabelAllLocalesDiff({
@@ -267,7 +273,7 @@ const getMainMenuLinkDiff = _ref9 => {
267
273
  return null;
268
274
  };
269
275
  const getSubmenuLinksDiff = _ref0 => {
270
- var _context8;
276
+ var _context20;
271
277
  let previousValue = _ref0.previousValue,
272
278
  nextValue = _ref0.nextValue;
273
279
  const submenuLinksDiff = ['submenuLink changed'];
@@ -278,16 +284,17 @@ const getSubmenuLinksDiff = _ref0 => {
278
284
  const previousOrder = getOrder(previousValue);
279
285
  const newOrder = getOrder(nextValue);
280
286
  if (previousOrder !== newOrder) {
281
- submenuLinksDiff.push(`${indent(1)}submenu order changed`);
282
- submenuLinksDiff.push(`${indent(2)}previous order: [${previousOrder}]`);
283
- submenuLinksDiff.push(`${indent(2)}new order: [${newOrder}]`);
287
+ var _context16, _context17;
288
+ submenuLinksDiff.push("".concat(indent(1), "submenu order changed"));
289
+ submenuLinksDiff.push(_concatInstanceProperty__default["default"](_context16 = "".concat(indent(2), "previous order: [")).call(_context16, previousOrder, "]"));
290
+ submenuLinksDiff.push(_concatInstanceProperty__default["default"](_context17 = "".concat(indent(2), "new order: [")).call(_context17, newOrder, "]"));
284
291
  }
285
292
  _forEachInstanceProperty__default["default"](nextValue).call(nextValue, newSubmenuLink => {
286
293
  const oldSubMenuLink = mappedSubmenuLinks[newSubmenuLink.uriPath];
287
294
  if (newSubmenuLink.uriPath in mappedSubmenuLinks) {
288
- var _context7;
289
- const submenuLinkDiff = [`${indent(1)}menu link "${newSubmenuLink.uriPath}" changed`];
290
- _forEachInstanceProperty__default["default"](_context7 = _Object$keys__default["default"](mappedSubmenuLinks[newSubmenuLink.uriPath])).call(_context7, key => {
295
+ var _context18, _context19;
296
+ const submenuLinkDiff = [_concatInstanceProperty__default["default"](_context18 = "".concat(indent(1), "menu link \"")).call(_context18, newSubmenuLink.uriPath, "\" changed")];
297
+ _forEachInstanceProperty__default["default"](_context19 = _Object$keys__default["default"](mappedSubmenuLinks[newSubmenuLink.uriPath])).call(_context19, key => {
291
298
  switch (key) {
292
299
  case 'defaultLabel':
293
300
  {
@@ -311,7 +318,7 @@ const getSubmenuLinksDiff = _ref0 => {
311
318
  indentLevel: 3
312
319
  });
313
320
  if (submenuLinkPermissionsDiff.length > 0) {
314
- submenuLinkDiff.push(`${indent(2)}permissions changed`);
321
+ submenuLinkDiff.push("".concat(indent(2), "permissions changed"));
315
322
  submenuLinkDiff.push(submenuLinkPermissionsDiff);
316
323
  }
317
324
  break;
@@ -346,7 +353,7 @@ const getSubmenuLinksDiff = _ref0 => {
346
353
  }
347
354
  }
348
355
  });
349
- _forEachInstanceProperty__default["default"](_context8 = _Object$keys__default["default"](mappedSubmenuLinks)).call(_context8, key => {
356
+ _forEachInstanceProperty__default["default"](_context20 = _Object$keys__default["default"](mappedSubmenuLinks)).call(_context20, key => {
350
357
  const linksDiff = getStringDiff({
351
358
  previousValue: key,
352
359
  label: 'menu link',
@@ -520,12 +527,13 @@ const getCustomViewConfigDiff = (oldConfig, newConfig) => {
520
527
  };
521
528
 
522
529
  const getMcUrlLink = _ref => {
530
+ var _context, _context2, _context3;
523
531
  let mcApiUrl = _ref.mcApiUrl,
524
532
  organizationId = _ref.organizationId,
525
533
  customEntityId = _ref.customEntityId,
526
534
  isCustomView = _ref.isCustomView;
527
535
  const mcUrl = mcApiUrl.replace('mc-api', 'mc');
528
- const customEntityLink = `${mcUrl}/account/organizations/${organizationId}/custom-${isCustomView ? 'views' : 'applications'}/owned/${customEntityId}`;
536
+ const customEntityLink = _concatInstanceProperty__default["default"](_context = _concatInstanceProperty__default["default"](_context2 = _concatInstanceProperty__default["default"](_context3 = "".concat(mcUrl, "/account/organizations/")).call(_context3, organizationId, "/custom-")).call(_context2, isCustomView ? 'views' : 'applications', "/owned/")).call(_context, customEntityId);
529
537
  return customEntityLink;
530
538
  };
531
539
  const isCustomViewData = data => data.entryPointUriPath === undefined;
@@ -536,7 +544,7 @@ async function performCreateCustomApplication(_ref2) {
536
544
  localCustomEntityData = _ref2.localCustomEntityData,
537
545
  applicationIdentifier = _ref2.applicationIdentifier,
538
546
  dryRun = _ref2.dryRun;
539
- console.log(`Creating Custom Application in organization "${chalk__default["default"].green(organizationName)}"...`);
547
+ console.log("Creating Custom Application in organization \"".concat(chalk__default["default"].green(organizationName), "\"..."));
540
548
  const data = omit__default["default"](localCustomEntityData, ['id']);
541
549
  if (dryRun) {
542
550
  console.log();
@@ -559,9 +567,9 @@ async function performCreateCustomApplication(_ref2) {
559
567
  customEntityId: createdCustomApplication.id
560
568
  });
561
569
  console.log(chalk__default["default"].green('Custom Application created successfully.'));
562
- console.log(`ID: ${chalk__default["default"].cyan(createdCustomApplication.id)}`);
563
- console.log(`Please update the "env.production.applicationId" field in your local Custom Application config file with the ID above.`);
564
- console.log(`URL: ${chalk__default["default"].gray(customAppLink)}`);
570
+ console.log("ID: ".concat(chalk__default["default"].cyan(createdCustomApplication.id)));
571
+ console.log("Please update the \"env.production.applicationId\" field in your local Custom Application config file with the ID above.");
572
+ console.log("URL: ".concat(chalk__default["default"].gray(customAppLink)));
565
573
  return createdCustomApplication.id;
566
574
  }
567
575
  async function performUpdateCustomApplication(_ref3) {
@@ -574,7 +582,7 @@ async function performUpdateCustomApplication(_ref3) {
574
582
  const data = omit__default["default"](localCustomEntityData, ['id']);
575
583
  if (dryRun) {
576
584
  console.log();
577
- console.log(`Dry run - would update Custom Application "${chalk__default["default"].green(data.entryPointUriPath)}" with:`);
585
+ console.log("Dry run - would update Custom Application \"".concat(chalk__default["default"].green(data.entryPointUriPath), "\" with:"));
578
586
  console.log(chalk__default["default"].gray(_JSON$stringify__default["default"](data, null, 2)));
579
587
  return;
580
588
  }
@@ -592,7 +600,7 @@ async function performUpdateCustomApplication(_ref3) {
592
600
  customEntityId: applicationId
593
601
  });
594
602
  console.log(chalk__default["default"].green('Custom Application updated successfully.'));
595
- console.log(`URL: ${chalk__default["default"].gray(customAppLink)}`);
603
+ console.log("URL: ".concat(chalk__default["default"].gray(customAppLink)));
596
604
  }
597
605
  async function performCreateCustomView(_ref4) {
598
606
  let mcApiUrl = _ref4.mcApiUrl,
@@ -601,7 +609,7 @@ async function performCreateCustomView(_ref4) {
601
609
  localCustomEntityData = _ref4.localCustomEntityData,
602
610
  applicationIdentifier = _ref4.applicationIdentifier,
603
611
  dryRun = _ref4.dryRun;
604
- console.log(`Creating Custom View in organization "${chalk__default["default"].green(organizationName)}"...`);
612
+ console.log("Creating Custom View in organization \"".concat(chalk__default["default"].green(organizationName), "\"..."));
605
613
  const data = omit__default["default"](localCustomEntityData, ['id']);
606
614
  if (dryRun) {
607
615
  console.log();
@@ -625,9 +633,9 @@ async function performCreateCustomView(_ref4) {
625
633
  isCustomView: true
626
634
  });
627
635
  console.log(chalk__default["default"].green('Custom View created successfully.'));
628
- console.log(`ID: ${chalk__default["default"].cyan(createdCustomView.id)}`);
629
- console.log(`Please update the "env.production.customViewId" field in your local Custom View config file with the ID above.`);
630
- console.log(`URL: ${chalk__default["default"].gray(customViewLink)}`);
636
+ console.log("ID: ".concat(chalk__default["default"].cyan(createdCustomView.id)));
637
+ console.log("Please update the \"env.production.customViewId\" field in your local Custom View config file with the ID above.");
638
+ console.log("URL: ".concat(chalk__default["default"].gray(customViewLink)));
631
639
  return createdCustomView.id;
632
640
  }
633
641
  async function performUpdateCustomView(_ref5) {
@@ -640,7 +648,7 @@ async function performUpdateCustomView(_ref5) {
640
648
  const data = omit__default["default"](localCustomEntityData, ['id']);
641
649
  if (dryRun) {
642
650
  console.log();
643
- console.log(`Dry run - would update Custom View "${chalk__default["default"].green(data.defaultLabel)}" with:`);
651
+ console.log("Dry run - would update Custom View \"".concat(chalk__default["default"].green(data.defaultLabel), "\" with:"));
644
652
  console.log(chalk__default["default"].gray(_JSON$stringify__default["default"](data, null, 2)));
645
653
  return;
646
654
  }
@@ -659,7 +667,7 @@ async function performUpdateCustomView(_ref5) {
659
667
  isCustomView: true
660
668
  });
661
669
  console.log(chalk__default["default"].green('Custom View updated successfully.'));
662
- console.log(`URL: ${chalk__default["default"].gray(customViewLink)}`);
670
+ console.log("URL: ".concat(chalk__default["default"].gray(customViewLink)));
663
671
  }
664
672
  async function checkCustomApplicationStatus(_ref6) {
665
673
  let mcApiUrl = _ref6.mcApiUrl,
@@ -691,6 +699,7 @@ async function checkCustomApplicationStatus(_ref6) {
691
699
  };
692
700
  }
693
701
  async function checkCustomViewStatus(_ref7) {
702
+ var _fetchedCustomView$cu, _fetchedCustomView$cu2;
694
703
  let mcApiUrl = _ref7.mcApiUrl,
695
704
  customViewId = _ref7.customViewId,
696
705
  applicationIdentifier = _ref7.applicationIdentifier,
@@ -709,13 +718,13 @@ async function checkCustomViewStatus(_ref7) {
709
718
  const customViewLink = getMcUrlLink({
710
719
  mcApiUrl,
711
720
  organizationId: fetchedCustomView.organizationId,
712
- customEntityId: fetchedCustomView?.customView?.id || '',
721
+ customEntityId: (fetchedCustomView === null || fetchedCustomView === void 0 || (_fetchedCustomView$cu = fetchedCustomView.customView) === null || _fetchedCustomView$cu === void 0 ? void 0 : _fetchedCustomView$cu.id) || '',
713
722
  isCustomView: true
714
723
  });
715
724
  return {
716
725
  exists: true,
717
726
  organizationId: fetchedCustomView.organizationId,
718
- customViewId: fetchedCustomView?.customView?.id || '',
727
+ customViewId: (fetchedCustomView === null || fetchedCustomView === void 0 || (_fetchedCustomView$cu2 = fetchedCustomView.customView) === null || _fetchedCustomView$cu2 === void 0 ? void 0 : _fetchedCustomView$cu2.id) || '',
719
728
  configDiff,
720
729
  link: customViewLink
721
730
  };