@commercetools-frontend/mc-scripts 22.28.0 → 22.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.dev.js +20 -5
  2. package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +20 -5
  3. package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +20 -5
  4. package/dist/{build-e34b99e8.cjs.prod.js → build-9cec9200.cjs.prod.js} +4 -5
  5. package/dist/{build-5fa51b8c.esm.js → build-da3b32c2.esm.js} +4 -5
  6. package/dist/{build-999eabc6.cjs.dev.js → build-f3afcd49.cjs.dev.js} +4 -5
  7. package/dist/{build-vite-0ec1e9cf.cjs.dev.js → build-vite-87662f4d.cjs.dev.js} +16 -11
  8. package/dist/{build-vite-5d0fa021.esm.js → build-vite-b19a39fb.esm.js} +16 -11
  9. package/dist/{build-vite-acf05a1a.cjs.prod.js → build-vite-c7ccff49.cjs.prod.js} +16 -11
  10. package/dist/commercetools-frontend-mc-scripts.cjs.dev.js +1 -1
  11. package/dist/commercetools-frontend-mc-scripts.cjs.prod.js +1 -1
  12. package/dist/commercetools-frontend-mc-scripts.esm.js +1 -1
  13. package/dist/{config-sync-3aaa3f5d.cjs.dev.js → config-sync-1382d742.cjs.dev.js} +21 -208
  14. package/dist/{config-sync-97ba72f5.cjs.prod.js → config-sync-5630eaf3.cjs.prod.js} +21 -208
  15. package/dist/{config-sync-cabd5374.esm.js → config-sync-994c65af.esm.js} +12 -198
  16. package/dist/{create-postcss-config-0323c669.esm.js → create-postcss-config-80fcacc8.esm.js} +1 -1
  17. package/dist/{create-postcss-config-5d1737f0.cjs.dev.js → create-postcss-config-a77dddc9.cjs.dev.js} +1 -1
  18. package/dist/{create-postcss-config-069ef9c3.cjs.prod.js → create-postcss-config-c9d6c97d.cjs.prod.js} +1 -1
  19. package/dist/{create-webpack-config-for-development-e7733a1b.cjs.prod.js → create-webpack-config-for-development-0afc61bd.cjs.prod.js} +1 -1
  20. package/dist/{create-webpack-config-for-development-43c88bf6.esm.js → create-webpack-config-for-development-12426c95.esm.js} +1 -1
  21. package/dist/{create-webpack-config-for-development-4690f4cf.cjs.dev.js → create-webpack-config-for-development-744f2450.cjs.dev.js} +1 -1
  22. package/dist/{create-webpack-config-for-production-778d2b5e.cjs.dev.js → create-webpack-config-for-production-a416f4e0.cjs.dev.js} +2 -2
  23. package/dist/{create-webpack-config-for-production-cbf22a83.cjs.prod.js → create-webpack-config-for-production-ec594cb8.cjs.prod.js} +2 -2
  24. package/dist/{create-webpack-config-for-production-28d51113.esm.js → create-webpack-config-for-production-fa398fe5.esm.js} +2 -2
  25. package/dist/{credentials-storage-8b9ddb0b.cjs.dev.js → credentials-storage-1552e722.cjs.dev.js} +1 -1
  26. package/dist/{credentials-storage-0fb8f4a6.cjs.prod.js → credentials-storage-44ff9622.cjs.prod.js} +1 -1
  27. package/dist/{credentials-storage-f4e08e09.esm.js → credentials-storage-cb50e964.esm.js} +1 -1
  28. package/dist/declarations/src/commands/deployment-previews-set.d.ts +3 -0
  29. package/dist/declarations/src/generated/settings.d.ts +45 -0
  30. package/dist/declarations/src/types.d.ts +5 -0
  31. package/dist/declarations/src/utils/graphql-requests.d.ts +41 -2
  32. package/dist/declarations/src/utils/i18n-message-complilation.d.ts +4 -0
  33. package/dist/deployment-previews-set-9433ec82.esm.js +197 -0
  34. package/dist/deployment-previews-set-d6e7505a.cjs.prod.js +209 -0
  35. package/dist/deployment-previews-set-f538d323.cjs.dev.js +209 -0
  36. package/dist/graphql-requests-2a72a4f1.cjs.dev.js +269 -0
  37. package/dist/graphql-requests-c92192aa.esm.js +246 -0
  38. package/dist/graphql-requests-cbebcbb8.cjs.prod.js +269 -0
  39. package/dist/i18n-message-complilation-393d344a.cjs.prod.js +23 -0
  40. package/dist/i18n-message-complilation-3f80e8d6.cjs.dev.js +23 -0
  41. package/dist/i18n-message-complilation-8aec9d1b.esm.js +15 -0
  42. package/dist/{login-bd94d195.cjs.dev.js → login-532a3a88.cjs.dev.js} +2 -2
  43. package/dist/{login-9ee301cd.cjs.prod.js → login-958fbc54.cjs.prod.js} +2 -2
  44. package/dist/{login-90029738.esm.js → login-b5ed7cfc.esm.js} +2 -2
  45. package/dist/{package-50be39f9.esm.js → package-16f29309.esm.js} +12 -12
  46. package/dist/{package-1bf866e8.cjs.dev.js → package-218d42f5.cjs.prod.js} +12 -12
  47. package/dist/{package-d977cdc9.cjs.prod.js → package-dc01b1e0.cjs.dev.js} +12 -12
  48. package/dist/{start-4671c540.esm.js → start-04208901.esm.js} +3 -3
  49. package/dist/{start-54be934f.cjs.dev.js → start-c51f7ab5.cjs.dev.js} +3 -3
  50. package/dist/{start-a0031945.cjs.prod.js → start-fb1cc1c8.cjs.prod.js} +3 -3
  51. package/package.json +12 -12
  52. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.dev.js +2 -2
  53. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.prod.js +2 -2
  54. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.esm.js +2 -2
  55. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.dev.js +4 -4
  56. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.prod.js +4 -4
  57. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.esm.js +4 -4
  58. package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.dev.js +12 -2
  59. package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.prod.js +12 -2
  60. package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.esm.js +12 -2
  61. package/dist/declarations/src/utils/get-i18n-message-format.d.ts +0 -3
  62. package/dist/get-i18n-message-format-3e59a0d7.cjs.prod.js +0 -15
  63. package/dist/get-i18n-message-format-44a20fa2.cjs.dev.js +0 -15
  64. package/dist/get-i18n-message-format-58852baf.esm.js +0 -9
@@ -8,7 +8,7 @@ import chalk from 'chalk';
8
8
  import omit from 'lodash/omit';
9
9
  import prompts from 'prompts';
10
10
  import { sanitizeSvg, processConfig } from '@commercetools-frontend/application-config';
11
- import { C as CredentialsStorage, u as userAgent } from './credentials-storage-f4e08e09.esm.js';
11
+ import { C as CredentialsStorage } from './credentials-storage-cb50e964.esm.js';
12
12
  import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
13
13
  import _Object$getOwnPropertyDescriptor from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor';
14
14
  import _Object$getOwnPropertyDescriptors from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors';
@@ -20,12 +20,9 @@ import _Set from '@babel/runtime-corejs3/core-js-stable/set';
20
20
  import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/for-each';
21
21
  import _reduceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/reduce';
22
22
  import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
23
- import _someInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/some';
24
- import { print } from 'graphql';
25
- import { GraphQLClient, ClientError } from 'graphql-request';
26
- import { GRAPHQL_TARGETS } from '@commercetools-frontend/constants';
23
+ import { f as fetchCustomApplication, a as fetchUserOrganizations, c as createCustomApplication, u as updateCustomApplication, b as fetchCustomView, d as createCustomView, e as updateCustomView } from './graphql-requests-c92192aa.esm.js';
27
24
  import '@commercetools/http-user-agent';
28
- import './package-50be39f9.esm.js';
25
+ import './package-16f29309.esm.js';
29
26
  import '@babel/runtime-corejs3/helpers/classCallCheck';
30
27
  import '@babel/runtime-corejs3/helpers/createClass';
31
28
  import '@babel/runtime-corejs3/core-js-stable/date/now';
@@ -34,9 +31,13 @@ import 'os';
34
31
  import 'path';
35
32
  import './does-file-exist-32618334.esm.js';
36
33
  import 'node:fs';
34
+ import '@babel/runtime-corejs3/core-js-stable/instance/some';
35
+ import 'graphql';
36
+ import 'graphql-request';
37
+ import '@commercetools-frontend/constants';
37
38
 
38
- function ownKeys$1(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
39
- function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context21, _context22; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context21 = ownKeys$1(Object(t), !0)).call(_context21, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context22 = ownKeys$1(Object(t))).call(_context22, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
39
+ function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
40
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context21, _context22; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context21 = ownKeys(Object(t), !0)).call(_context21, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context22 = ownKeys(Object(t))).call(_context22, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
40
41
 
41
42
  // Since not all terminal supports colors, to make things more consistent for testing purposes,
42
43
  // during tests the color used is appended before the string instead of coloring it.
@@ -112,7 +113,7 @@ const getPermissionsDiff = _ref3 => {
112
113
  const mappedOldPermissions = _reduceInstanceProperty(previousValue).call(previousValue, (previousPermission, _ref4) => {
113
114
  let name = _ref4.name,
114
115
  oAuthScopes = _ref4.oAuthScopes;
115
- return _objectSpread$1(_objectSpread$1({}, previousPermission), {}, {
116
+ return _objectSpread(_objectSpread({}, previousPermission), {}, {
116
117
  [name]: oAuthScopes
117
118
  });
118
119
  }, {});
@@ -159,7 +160,7 @@ const getLabelAllLocalesDiff = _ref5 => {
159
160
  const mappedOldLabelAllLocales = _reduceInstanceProperty(previousValue).call(previousValue, (previousLabelAllLocale, _ref6) => {
160
161
  let locale = _ref6.locale,
161
162
  value = _ref6.value;
162
- return _objectSpread$1(_objectSpread$1({}, previousLabelAllLocale), {}, {
163
+ return _objectSpread(_objectSpread({}, previousLabelAllLocale), {}, {
163
164
  [locale]: value
164
165
  });
165
166
  }, {});
@@ -273,7 +274,7 @@ const getSubmenuLinksDiff = _ref10 => {
273
274
  let previousValue = _ref10.previousValue,
274
275
  nextValue = _ref10.nextValue;
275
276
  const submenuLinksDiff = ['submenuLink changed'];
276
- const mappedSubmenuLinks = _reduceInstanceProperty(previousValue).call(previousValue, (previousSubmenuLink, currentSubmenuLink) => _objectSpread$1(_objectSpread$1({}, previousSubmenuLink), {}, {
277
+ const mappedSubmenuLinks = _reduceInstanceProperty(previousValue).call(previousValue, (previousSubmenuLink, currentSubmenuLink) => _objectSpread(_objectSpread({}, previousSubmenuLink), {}, {
277
278
  [currentSubmenuLink.uriPath]: currentSubmenuLink
278
279
  }), {});
279
280
  _forEachInstanceProperty(nextValue).call(nextValue, newSubmenuLink => {
@@ -513,193 +514,6 @@ const getCustomViewConfigDiff = (oldConfig, newConfig) => {
513
514
  return diff.join('\n');
514
515
  };
515
516
 
516
- function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
517
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
518
- var CreateCustomApplicationFromCli = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "CreateCustomApplicationFromCli" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "organizationId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CustomApplicationDraftDataInput" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "createCustomApplication" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "organizationId" }, value: { kind: "Variable", name: { kind: "Name", value: "organizationId" } } }, { kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 201, source: { body: "mutation CreateCustomApplicationFromCli(\n $organizationId: String!\n $data: CustomApplicationDraftDataInput!\n) {\n createCustomApplication(organizationId: $organizationId, data: $data) {\n id\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
519
- var CreateCustomViewFromCli = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "CreateCustomViewFromCli" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "organizationId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CustomViewDraftDataInput" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "createCustomView" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "organizationId" }, value: { kind: "Variable", name: { kind: "Name", value: "organizationId" } } }, { kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 180, source: { body: "mutation CreateCustomViewFromCli(\n $organizationId: String!\n $data: CustomViewDraftDataInput!\n) {\n createCustomView(organizationId: $organizationId, data: $data) {\n id\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
520
- var FetchCustomApplicationFromCli = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchCustomApplicationFromCli" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "entryPointUriPath" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "organizationExtensionForCustomApplication" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "entryPointUriPath" }, value: { kind: "Variable", name: { kind: "Name", value: "entryPointUriPath" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "organizationId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "application" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "entryPointUriPath" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "description" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "url" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "icon" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "permissions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "oAuthScopes" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "mainMenuLink" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "defaultLabel" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "permissions" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "submenuLinks" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "uriPath" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "defaultLabel" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "permissions" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }], loc: { start: 0, end: 647, source: { body: "query FetchCustomApplicationFromCli($entryPointUriPath: String!) {\n organizationExtensionForCustomApplication(\n entryPointUriPath: $entryPointUriPath\n ) {\n organizationId\n application {\n id\n entryPointUriPath\n name\n description\n url\n icon\n permissions {\n name\n oAuthScopes\n }\n mainMenuLink {\n defaultLabel\n permissions\n labelAllLocales {\n locale\n value\n }\n }\n submenuLinks {\n uriPath\n defaultLabel\n permissions\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
521
- var FetchCustomViewFromCli = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchCustomViewFromCli" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "customViewId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "organizationExtensionForCustomView" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "customViewId" }, value: { kind: "Variable", name: { kind: "Name", value: "customViewId" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "organizationId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "customView" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "defaultLabel" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "url" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "typeSettings" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "size" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "locators" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "permissions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "oAuthScopes" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 399, source: { body: "query FetchCustomViewFromCli($customViewId: String!) {\n organizationExtensionForCustomView(customViewId: $customViewId) {\n organizationId\n customView {\n id\n defaultLabel\n labelAllLocales {\n locale\n value\n }\n url\n type\n typeSettings {\n size\n }\n locators\n permissions {\n name\n oAuthScopes\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
522
- var FetchMyOrganizationsFromCli = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchMyOrganizationsFromCli" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "myOrganizations" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 112, source: { body: "query FetchMyOrganizationsFromCli {\n myOrganizations {\n total\n results {\n id\n name\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
523
- var UpdateCustomApplicationFromCli = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "UpdateCustomApplicationFromCli" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "organizationId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CustomApplicationDraftDataInput" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "applicationId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "ID" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updateCustomApplication" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "organizationId" }, value: { kind: "Variable", name: { kind: "Name", value: "organizationId" } } }, { kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }, { kind: "Argument", name: { kind: "Name", value: "applicationId" }, value: { kind: "Variable", name: { kind: "Name", value: "applicationId" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 268, source: { body: "mutation UpdateCustomApplicationFromCli(\n $organizationId: String!\n $data: CustomApplicationDraftDataInput!\n $applicationId: ID!\n) {\n updateCustomApplication(\n organizationId: $organizationId\n data: $data\n applicationId: $applicationId\n ) {\n id\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
524
- var UpdateCustomViewFromCli = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "UpdateCustomViewFromCli" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "organizationId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CustomViewDraftDataInput" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "customViewId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updateCustomView" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "organizationId" }, value: { kind: "Variable", name: { kind: "Name", value: "organizationId" } } }, { kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }, { kind: "Argument", name: { kind: "Name", value: "customViewId" }, value: { kind: "Variable", name: { kind: "Name", value: "customViewId" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 248, source: { body: "mutation UpdateCustomViewFromCli(\n $organizationId: String!\n $data: CustomViewDraftDataInput!\n $customViewId: String!\n) {\n updateCustomView(\n organizationId: $organizationId\n data: $data\n customViewId: $customViewId\n ) {\n id\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
525
- const credentialsStorage$1 = new CredentialsStorage();
526
- async function requestWithTokenRetry(document, requestOptions) {
527
- let retryCount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
528
- const token = credentialsStorage$1.getToken(requestOptions.mcApiUrl);
529
- const client = new GraphQLClient("".concat(requestOptions.mcApiUrl, "/graphql"), {
530
- headers: _objectSpread(_objectSpread({
531
- Accept: 'application/json',
532
- 'Content-Type': 'application/json',
533
- 'x-user-agent': userAgent
534
- }, token ? {
535
- 'x-mc-cli-access-token': token
536
- } : {}), requestOptions.headers)
537
- });
538
- try {
539
- const result = await client.rawRequest(print(document), requestOptions.variables);
540
-
541
- // In case a new session token is returned from the server, save it.
542
- const refreshedSessionToken = result.headers.get('x-refreshed-session-token');
543
- if (refreshedSessionToken) {
544
- console.log(chalk.green('Session token refreshed.'));
545
- console.log();
546
- const refreshedSessionTokenExpiresAt = result.headers.get('x-refreshed-session-token-expires-at');
547
- // Store the updated access token.
548
- credentialsStorage$1.setToken(requestOptions.mcApiUrl, {
549
- token: refreshedSessionToken,
550
- expiresAt: Number(refreshedSessionTokenExpiresAt)
551
- });
552
- }
553
- return result.data;
554
- } catch (error) {
555
- if (error instanceof ClientError) {
556
- // If it's an unauthorized error, retry the request to force the token to be refreshed.
557
- if (retryCount === 0 && error.response.errors && error.response.errors.length > 0) {
558
- var _context;
559
- const isUnauthorizedError = _someInstanceProperty(_context = error.response.errors).call(_context, graphqlError => {
560
- var _graphqlError$extensi;
561
- return ((_graphqlError$extensi = graphqlError.extensions) === null || _graphqlError$extensi === void 0 ? void 0 : _graphqlError$extensi.code) === 'UNAUTHENTICATED';
562
- });
563
- if (isUnauthorizedError) {
564
- console.log(chalk.yellow('Expired or invalid session token, attempting to retry the request with a refreshed token...'));
565
- return requestWithTokenRetry(document, _objectSpread(_objectSpread({}, requestOptions), {}, {
566
- headers: _objectSpread(_objectSpread({}, requestOptions.headers), {}, {
567
- 'X-Force-Token': 'true'
568
- })
569
- }), retryCount + 1);
570
- }
571
- }
572
- }
573
- throw error;
574
- }
575
- }
576
- const fetchCustomApplication = async _ref => {
577
- let mcApiUrl = _ref.mcApiUrl,
578
- entryPointUriPath = _ref.entryPointUriPath,
579
- applicationIdentifier = _ref.applicationIdentifier;
580
- const customAppData = await requestWithTokenRetry(FetchCustomApplicationFromCli, {
581
- variables: {
582
- entryPointUriPath
583
- },
584
- mcApiUrl,
585
- headers: {
586
- 'x-application-id': applicationIdentifier,
587
- 'x-graphql-target': GRAPHQL_TARGETS.SETTINGS_SERVICE
588
- }
589
- });
590
- return customAppData.organizationExtensionForCustomApplication;
591
- };
592
- const fetchCustomView = async _ref2 => {
593
- let mcApiUrl = _ref2.mcApiUrl,
594
- customViewId = _ref2.customViewId,
595
- applicationIdentifier = _ref2.applicationIdentifier;
596
- const customViewData = await requestWithTokenRetry(FetchCustomViewFromCli, {
597
- variables: {
598
- customViewId
599
- },
600
- mcApiUrl,
601
- headers: {
602
- 'x-custom-view-id': customViewId,
603
- 'x-application-id': applicationIdentifier,
604
- 'x-graphql-target': GRAPHQL_TARGETS.SETTINGS_SERVICE
605
- }
606
- });
607
- return customViewData.organizationExtensionForCustomView;
608
- };
609
- const updateCustomApplication = async _ref3 => {
610
- let mcApiUrl = _ref3.mcApiUrl,
611
- applicationId = _ref3.applicationId,
612
- organizationId = _ref3.organizationId,
613
- data = _ref3.data,
614
- applicationIdentifier = _ref3.applicationIdentifier;
615
- const updatedCustomAppsData = await requestWithTokenRetry(UpdateCustomApplicationFromCli, {
616
- variables: {
617
- organizationId,
618
- applicationId,
619
- data
620
- },
621
- mcApiUrl,
622
- headers: {
623
- 'x-application-id': applicationIdentifier,
624
- 'x-graphql-target': GRAPHQL_TARGETS.SETTINGS_SERVICE
625
- }
626
- });
627
- return updatedCustomAppsData.updateCustomApplication;
628
- };
629
- const updateCustomView = async _ref4 => {
630
- let mcApiUrl = _ref4.mcApiUrl,
631
- organizationId = _ref4.organizationId,
632
- data = _ref4.data,
633
- customViewId = _ref4.customViewId,
634
- applicationIdentifier = _ref4.applicationIdentifier;
635
- const updatedCustomViewData = await requestWithTokenRetry(UpdateCustomViewFromCli, {
636
- variables: {
637
- organizationId,
638
- customViewId,
639
- data
640
- },
641
- mcApiUrl,
642
- headers: {
643
- 'x-custom-view-id': customViewId,
644
- 'x-application-id': applicationIdentifier,
645
- 'x-graphql-target': GRAPHQL_TARGETS.SETTINGS_SERVICE
646
- }
647
- });
648
- return updatedCustomViewData.updateCustomView;
649
- };
650
- const createCustomApplication = async _ref5 => {
651
- let mcApiUrl = _ref5.mcApiUrl,
652
- organizationId = _ref5.organizationId,
653
- data = _ref5.data,
654
- applicationIdentifier = _ref5.applicationIdentifier;
655
- const createdCustomAppData = await requestWithTokenRetry(CreateCustomApplicationFromCli, {
656
- variables: {
657
- organizationId,
658
- data
659
- },
660
- mcApiUrl,
661
- headers: {
662
- 'x-application-id': applicationIdentifier,
663
- 'x-graphql-target': GRAPHQL_TARGETS.SETTINGS_SERVICE
664
- }
665
- });
666
- return createdCustomAppData.createCustomApplication;
667
- };
668
- const createCustomView = async _ref6 => {
669
- let mcApiUrl = _ref6.mcApiUrl,
670
- organizationId = _ref6.organizationId,
671
- data = _ref6.data,
672
- applicationIdentifier = _ref6.applicationIdentifier;
673
- const createdCustomViewData = await requestWithTokenRetry(CreateCustomViewFromCli, {
674
- variables: {
675
- organizationId,
676
- data
677
- },
678
- mcApiUrl,
679
- headers: {
680
- 'x-application-id': applicationIdentifier,
681
- 'x-graphql-target': GRAPHQL_TARGETS.SETTINGS_SERVICE
682
- }
683
- });
684
- return createdCustomViewData.createCustomView;
685
- };
686
- const fetchUserOrganizations = async _ref7 => {
687
- let mcApiUrl = _ref7.mcApiUrl,
688
- applicationIdentifier = _ref7.applicationIdentifier,
689
- customViewId = _ref7.customViewId;
690
- const userOrganizations = await requestWithTokenRetry(FetchMyOrganizationsFromCli, {
691
- mcApiUrl,
692
- headers: _objectSpread(_objectSpread({
693
- 'x-application-id': applicationIdentifier
694
- }, customViewId && {
695
- 'x-custom-view-id': customViewId
696
- }), {}, {
697
- 'x-graphql-target': GRAPHQL_TARGETS.ADMINISTRATION_SERVICE
698
- })
699
- });
700
- return userOrganizations.myOrganizations;
701
- };
702
-
703
517
  const credentialsStorage = new CredentialsStorage();
704
518
  const getMcUrlLink = _ref => {
705
519
  var _context, _context2, _context3;
@@ -1,6 +1,6 @@
1
1
  import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
2
2
  import path from 'path';
3
- import { p as pkgJson } from './package-50be39f9.esm.js';
3
+ import { p as pkgJson } from './package-16f29309.esm.js';
4
4
 
5
5
  // This function aims to return the same result as `require.resolve`.
6
6
  // However, resolving a path to a `.css` file does not return the real
@@ -2,7 +2,7 @@
2
2
 
3
3
  var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
4
4
  var path = require('path');
5
- var _package = require('./package-1bf866e8.cjs.dev.js');
5
+ var _package = require('./package-dc01b1e0.cjs.dev.js');
6
6
 
7
7
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
4
4
  var path = require('path');
5
- var _package = require('./package-d977cdc9.cjs.prod.js');
5
+ var _package = require('./package-218d42f5.cjs.prod.js');
6
6
 
7
7
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
8
8
 
@@ -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-069ef9c3.cjs.prod.js');
28
+ var createPostcssConfig = require('./create-postcss-config-c9d6c97d.cjs.prod.js');
29
29
  var hasJsxRuntime = require('./has-jsx-runtime-c3202df5.cjs.prod.js');
30
30
  var paths = require('./paths-af1a725a.cjs.prod.js');
31
31
  var vendorsToTranspile = require('./vendors-to-transpile-04a49d40.cjs.prod.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-0323c669.esm.js';
26
+ import { c as createPostcssConfig } from './create-postcss-config-80fcacc8.esm.js';
27
27
  import { h as hasJsxRuntime } from './has-jsx-runtime-e3ecb09b.esm.js';
28
28
  import { p as paths } from './paths-7bf7e88e.esm.js';
29
29
  import { v as vendorsToTranspile } from './vendors-to-transpile-7dc84a72.esm.js';
@@ -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-5d1737f0.cjs.dev.js');
28
+ var createPostcssConfig = require('./create-postcss-config-a77dddc9.cjs.dev.js');
29
29
  var hasJsxRuntime = require('./has-jsx-runtime-aa5d21ee.cjs.dev.js');
30
30
  var paths = require('./paths-ec3e3a7d.cjs.dev.js');
31
31
  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-5d1737f0.cjs.dev.js');
32
+ var createPostcssConfig = require('./create-postcss-config-a77dddc9.cjs.dev.js');
33
33
  var hasJsxRuntime = require('./has-jsx-runtime-aa5d21ee.cjs.dev.js');
34
34
  var paths = require('./paths-ec3e3a7d.cjs.dev.js');
35
35
  var vendorsToTranspile = require('./vendors-to-transpile-6ab4ea06.cjs.dev.js');
@@ -499,7 +499,7 @@ function createWebpackConfigForProduction() {
499
499
  include: mergedOptions.sourceFolders,
500
500
  exclude: /node_modules/,
501
501
  use: [require.resolve('graphql-tag/loader')]
502
- }, process.env.ENABLE_I18N_MESSAGE_COMPILATION === 'true' && {
502
+ }, !(process.env.DISABLE_I18N_MESSAGE_COMPILATION === 'true') && {
503
503
  test: /i18n\/data\/.*\.json$/,
504
504
  use: [require.resolve('@commercetools-frontend/mc-scripts/webpack-loaders/i18n-message-compilation-loader')]
505
505
  }]).call(_context5, Boolean)
@@ -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-069ef9c3.cjs.prod.js');
32
+ var createPostcssConfig = require('./create-postcss-config-c9d6c97d.cjs.prod.js');
33
33
  var hasJsxRuntime = require('./has-jsx-runtime-c3202df5.cjs.prod.js');
34
34
  var paths = require('./paths-af1a725a.cjs.prod.js');
35
35
  var vendorsToTranspile = require('./vendors-to-transpile-04a49d40.cjs.prod.js');
@@ -499,7 +499,7 @@ function createWebpackConfigForProduction() {
499
499
  include: mergedOptions.sourceFolders,
500
500
  exclude: /node_modules/,
501
501
  use: [require.resolve('graphql-tag/loader')]
502
- }, process.env.ENABLE_I18N_MESSAGE_COMPILATION === 'true' && {
502
+ }, !(process.env.DISABLE_I18N_MESSAGE_COMPILATION === 'true') && {
503
503
  test: /i18n\/data\/.*\.json$/,
504
504
  use: [require.resolve('@commercetools-frontend/mc-scripts/webpack-loaders/i18n-message-compilation-loader')]
505
505
  }]).call(_context5, Boolean)
@@ -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-0323c669.esm.js';
30
+ import { c as createPostcssConfig } from './create-postcss-config-80fcacc8.esm.js';
31
31
  import { h as hasJsxRuntime } from './has-jsx-runtime-e3ecb09b.esm.js';
32
32
  import { p as paths } from './paths-7bf7e88e.esm.js';
33
33
  import { v as vendorsToTranspile } from './vendors-to-transpile-7dc84a72.esm.js';
@@ -469,7 +469,7 @@ function createWebpackConfigForProduction() {
469
469
  include: mergedOptions.sourceFolders,
470
470
  exclude: /node_modules/,
471
471
  use: [require.resolve('graphql-tag/loader')]
472
- }, process.env.ENABLE_I18N_MESSAGE_COMPILATION === 'true' && {
472
+ }, !(process.env.DISABLE_I18N_MESSAGE_COMPILATION === 'true') && {
473
473
  test: /i18n\/data\/.*\.json$/,
474
474
  use: [require.resolve('@commercetools-frontend/mc-scripts/webpack-loaders/i18n-message-compilation-loader')]
475
475
  }]).call(_context5, Boolean)
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var createHttpUserAgent = require('@commercetools/http-user-agent');
4
- var _package = require('./package-1bf866e8.cjs.dev.js');
4
+ var _package = require('./package-dc01b1e0.cjs.dev.js');
5
5
  var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
6
6
  var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
7
7
  var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var createHttpUserAgent = require('@commercetools/http-user-agent');
4
- var _package = require('./package-d977cdc9.cjs.prod.js');
4
+ var _package = require('./package-218d42f5.cjs.prod.js');
5
5
  var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
6
6
  var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
7
7
  var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
@@ -1,5 +1,5 @@
1
1
  import createHttpUserAgent from '@commercetools/http-user-agent';
2
- import { p as pkgJson } from './package-50be39f9.esm.js';
2
+ import { p as pkgJson } from './package-16f29309.esm.js';
3
3
  import _classCallCheck from '@babel/runtime-corejs3/helpers/esm/classCallCheck';
4
4
  import _createClass from '@babel/runtime-corejs3/helpers/esm/createClass';
5
5
  import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
@@ -0,0 +1,3 @@
1
+ import type { TCliCommandSetDeploymentPreviewOptions } from '../types';
2
+ declare function run(options: TCliCommandSetDeploymentPreviewOptions): Promise<void>;
3
+ export default run;
@@ -1946,6 +1946,20 @@ export type TFetchProjectExtensionsNavbarQuery = {
1946
1946
  }>;
1947
1947
  } | null;
1948
1948
  };
1949
+ export type TCreateCustomApplicationDeploymentPreviewMutationVariables = Exact<{
1950
+ organizationId: Scalars['String'];
1951
+ applicationId: Scalars['ID'];
1952
+ data: TCustomApplicationDeploymentPreviewCreateInput;
1953
+ }>;
1954
+ export type TCreateCustomApplicationDeploymentPreviewMutation = {
1955
+ __typename?: 'Mutation';
1956
+ createCustomApplicationDeploymentPreview: {
1957
+ __typename?: 'CustomApplicationDeploymentPreview';
1958
+ id: string;
1959
+ alias?: string | null;
1960
+ url: string;
1961
+ };
1962
+ };
1949
1963
  export type TCreateCustomApplicationFromCliMutationVariables = Exact<{
1950
1964
  organizationId: Scalars['String'];
1951
1965
  data: TCustomApplicationDraftDataInput;
@@ -1968,6 +1982,17 @@ export type TCreateCustomViewFromCliMutation = {
1968
1982
  id: string;
1969
1983
  } | null;
1970
1984
  };
1985
+ export type TDeleteCustomApplicationDeploymentPreviewMutationVariables = Exact<{
1986
+ organizationId: Scalars['String'];
1987
+ deploymentId: Scalars['ID'];
1988
+ }>;
1989
+ export type TDeleteCustomApplicationDeploymentPreviewMutation = {
1990
+ __typename?: 'Mutation';
1991
+ deleteCustomApplicationDeploymentPreview: {
1992
+ __typename?: 'CustomApplicationDeploymentPreview';
1993
+ id: string;
1994
+ };
1995
+ };
1971
1996
  export type TFetchCustomApplicationFromCliQueryVariables = Exact<{
1972
1997
  entryPointUriPath: Scalars['String'];
1973
1998
  }>;
@@ -2010,6 +2035,12 @@ export type TFetchCustomApplicationFromCliQuery = {
2010
2035
  value: string;
2011
2036
  }>;
2012
2037
  }>;
2038
+ deployments: Array<{
2039
+ __typename?: 'CustomApplicationDeploymentPreview';
2040
+ id: string;
2041
+ url: string;
2042
+ alias?: string | null;
2043
+ }>;
2013
2044
  };
2014
2045
  } | null;
2015
2046
  };
@@ -2045,6 +2076,20 @@ export type TFetchCustomViewFromCliQuery = {
2045
2076
  } | null;
2046
2077
  } | null;
2047
2078
  };
2079
+ export type TUpdateCustomApplicationDeploymentPreviewMutationVariables = Exact<{
2080
+ organizationId: Scalars['String'];
2081
+ deploymentId: Scalars['ID'];
2082
+ data: TCustomApplicationDeploymentPreviewUpdateInput;
2083
+ }>;
2084
+ export type TUpdateCustomApplicationDeploymentPreviewMutation = {
2085
+ __typename?: 'Mutation';
2086
+ updateCustomApplicationDeploymentPreview: {
2087
+ __typename?: 'CustomApplicationDeploymentPreview';
2088
+ id: string;
2089
+ alias?: string | null;
2090
+ url: string;
2091
+ };
2092
+ };
2048
2093
  export type TUpdateCustomApplicationFromCliMutationVariables = Exact<{
2049
2094
  organizationId: Scalars['String'];
2050
2095
  data: TCustomApplicationDraftDataInput;
@@ -12,6 +12,11 @@ export type TCliCommandCompileHtmlOptions = {
12
12
  export type TCliCommandConfigSyncOptions = {
13
13
  dryRun: boolean;
14
14
  };
15
+ export type TCliCommandSetDeploymentPreviewOptions = {
16
+ alias?: string;
17
+ url?: string;
18
+ dryRun?: boolean;
19
+ };
15
20
  export type TMcCliAuthToken = {
16
21
  token: string;
17
22
  expiresAt: number;
@@ -1,4 +1,4 @@
1
- import type { TCustomApplicationDraftDataInput, TCustomViewDraftDataInput } from '../generated/settings';
1
+ import type { TCustomApplicationDeploymentPreviewCreateInput, TCustomApplicationDeploymentPreviewUpdateInput, TCustomApplicationDraftDataInput, TCustomViewDraftDataInput } from '../generated/settings';
2
2
  type TFetchCustomApplicationOptions = {
3
3
  mcApiUrl: string;
4
4
  entryPointUriPath: string;
@@ -40,6 +40,26 @@ type TFetchUserOrganizationsOptions = {
40
40
  applicationIdentifier: string;
41
41
  customViewId?: string;
42
42
  };
43
+ type TCreateCustomApplicationDeploymentPreviewOptions = {
44
+ mcApiUrl: string;
45
+ organizationId: string;
46
+ applicationId: string;
47
+ applicationIdentifier: string;
48
+ data: TCustomApplicationDeploymentPreviewCreateInput;
49
+ };
50
+ type TUpdateCustomApplicationDeploymentPreviewOptions = {
51
+ mcApiUrl: string;
52
+ deploymentId: string;
53
+ organizationId: string;
54
+ data: TCustomApplicationDeploymentPreviewUpdateInput;
55
+ applicationIdentifier: string;
56
+ };
57
+ type TDeleteCustomApplicationDeploymentPreviewOptions = {
58
+ mcApiUrl: string;
59
+ organizationId: string;
60
+ applicationIdentifier: string;
61
+ deploymentId: string;
62
+ };
43
63
  declare const fetchCustomApplication: ({ mcApiUrl, entryPointUriPath, applicationIdentifier, }: TFetchCustomApplicationOptions) => Promise<{
44
64
  __typename?: "OrganizationExtensionForCustomApplication" | undefined;
45
65
  organizationId: string;
@@ -77,6 +97,12 @@ declare const fetchCustomApplication: ({ mcApiUrl, entryPointUriPath, applicatio
77
97
  value: string;
78
98
  }[];
79
99
  }[];
100
+ deployments: {
101
+ __typename?: "CustomApplicationDeploymentPreview" | undefined;
102
+ id: string;
103
+ url: string;
104
+ alias?: string | null | undefined;
105
+ }[];
80
106
  };
81
107
  } | null | undefined>;
82
108
  declare const fetchCustomView: ({ mcApiUrl, customViewId, applicationIdentifier, }: TFetchCustomViewOptions) => Promise<{
@@ -130,4 +156,17 @@ declare const fetchUserOrganizations: ({ mcApiUrl, applicationIdentifier, custom
130
156
  name: string;
131
157
  }[];
132
158
  }>;
133
- export { fetchCustomApplication, fetchCustomView, updateCustomApplication, createCustomApplication, fetchUserOrganizations, createCustomView, updateCustomView, };
159
+ declare const createCustomApplicationDeploymentPreview: ({ mcApiUrl, organizationId, applicationId, applicationIdentifier, data, }: TCreateCustomApplicationDeploymentPreviewOptions) => Promise<{
160
+ __typename?: "CustomApplicationDeploymentPreview" | undefined;
161
+ id: string;
162
+ alias?: string | null | undefined;
163
+ url: string;
164
+ }>;
165
+ declare const updateCustomApplicationDeploymentPreview: ({ mcApiUrl, organizationId, deploymentId, data, applicationIdentifier, }: TUpdateCustomApplicationDeploymentPreviewOptions) => Promise<{
166
+ __typename?: "CustomApplicationDeploymentPreview" | undefined;
167
+ id: string;
168
+ alias?: string | null | undefined;
169
+ url: string;
170
+ }>;
171
+ declare const deleteCustomApplicationDeploymentPreview: ({ mcApiUrl, organizationId, applicationIdentifier, deploymentId, }: TDeleteCustomApplicationDeploymentPreviewOptions) => Promise<void>;
172
+ export { fetchCustomApplication, fetchCustomView, updateCustomApplication, createCustomApplication, fetchUserOrganizations, createCustomView, updateCustomView, createCustomApplicationDeploymentPreview, updateCustomApplicationDeploymentPreview, deleteCustomApplicationDeploymentPreview, };
@@ -0,0 +1,4 @@
1
+ type TMessageFormat = 'simple' | 'transifex';
2
+ declare function getI18nMessageFormat(source: string): TMessageFormat;
3
+ declare function handleMessageCompilationError(fileIdentifier: string, error: unknown, warnFunction: (e: Error) => void): void;
4
+ export { getI18nMessageFormat, handleMessageCompilationError };