@commercetools-frontend/mc-scripts 21.8.0 → 21.10.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 (60) hide show
  1. package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.dev.js +34 -21
  2. package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +34 -21
  3. package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +34 -21
  4. package/dist/{build-8582b673.esm.js → build-4b9ac48f.esm.js} +3 -3
  5. package/dist/{build-97278377.cjs.dev.js → build-83e7cede.cjs.dev.js} +3 -3
  6. package/dist/{build-9395925a.cjs.prod.js → build-f523f508.cjs.prod.js} +3 -3
  7. package/dist/{build-vite-6c987a60.cjs.dev.js → build-vite-3b82522e.cjs.dev.js} +44 -2
  8. package/dist/{build-vite-a9602b19.esm.js → build-vite-93abdc95.esm.js} +44 -2
  9. package/dist/{build-vite-76d44332.cjs.prod.js → build-vite-b7cd993a.cjs.prod.js} +44 -2
  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/{compile-html-4832f8c5.esm.js → compile-html-4361a0b3.esm.js} +18 -24
  14. package/dist/{compile-html-7654b5e6.cjs.prod.js → compile-html-d6331c35.cjs.prod.js} +18 -24
  15. package/dist/{compile-html-0c588a89.cjs.dev.js → compile-html-d9e731aa.cjs.dev.js} +18 -24
  16. package/dist/{config-sync-62824317.cjs.prod.js → config-sync-a3170b54.cjs.prod.js} +46 -74
  17. package/dist/{config-sync-d52e73f6.cjs.dev.js → config-sync-ec048923.cjs.dev.js} +46 -74
  18. package/dist/{config-sync-20bc05e8.esm.js → config-sync-f97789c5.esm.js} +46 -74
  19. package/dist/{create-postcss-config-8ea16440.cjs.prod.js → create-postcss-config-0c0236bf.cjs.prod.js} +1 -1
  20. package/dist/{create-postcss-config-4cbe10ab.cjs.dev.js → create-postcss-config-2a0d05b2.cjs.dev.js} +1 -1
  21. package/dist/{create-postcss-config-c1aa3525.esm.js → create-postcss-config-d2bf4c66.esm.js} +1 -1
  22. package/dist/{create-webpack-config-for-development-a5e73092.cjs.prod.js → create-webpack-config-for-development-1da79732.cjs.prod.js} +5 -4
  23. package/dist/{create-webpack-config-for-development-e2735e02.cjs.dev.js → create-webpack-config-for-development-47d59cb3.cjs.dev.js} +5 -4
  24. package/dist/{create-webpack-config-for-development-8a8b84d6.esm.js → create-webpack-config-for-development-a546d54f.esm.js} +5 -4
  25. package/dist/{create-webpack-config-for-production-4e7b56c0.cjs.prod.js → create-webpack-config-for-production-3fd4683d.cjs.prod.js} +5 -4
  26. package/dist/{create-webpack-config-for-production-7dc669e5.esm.js → create-webpack-config-for-production-8d1ce439.esm.js} +5 -4
  27. package/dist/{create-webpack-config-for-production-d9bf281c.cjs.dev.js → create-webpack-config-for-production-db313b50.cjs.dev.js} +5 -4
  28. package/dist/declarations/src/commands/compile-html.d.ts +1 -1
  29. package/dist/declarations/src/commands/config-sync.d.ts +1 -1
  30. package/dist/declarations/src/config/moment-locales.d.ts +2 -0
  31. package/dist/declarations/src/generated/settings.d.ts +110 -8
  32. package/dist/declarations/src/types.d.ts +3 -3
  33. package/dist/declarations/src/vite-plugins/vite-plugin-custom-application.d.ts +4 -0
  34. package/dist/declarations/src/vite-plugins/vite-plugin-dynamic-base-assets-globals.d.ts +3 -0
  35. package/dist/declarations/src/vite-plugins/vite-plugin-svgr.d.ts +3 -0
  36. package/dist/{login-7d94659e.esm.js → login-0f875277.esm.js} +2 -2
  37. package/dist/{login-779552b7.cjs.dev.js → login-47ddbfc2.cjs.dev.js} +2 -2
  38. package/dist/{login-706ccc9a.cjs.prod.js → login-a99bba7b.cjs.prod.js} +2 -2
  39. package/dist/{package-aaf61bf0.cjs.dev.js → package-430e0951.cjs.prod.js} +25 -21
  40. package/dist/{package-b5c040f3.cjs.prod.js → package-7d0afacb.cjs.dev.js} +25 -21
  41. package/dist/{package-a98de907.esm.js → package-b2f3ad5a.esm.js} +25 -21
  42. package/dist/{start-e3ccd672.cjs.prod.js → start-5ba2b72f.cjs.prod.js} +3 -3
  43. package/dist/{start-2b953ab0.cjs.dev.js → start-bfb77660.cjs.dev.js} +3 -3
  44. package/dist/{start-e924bd5d.esm.js → start-f401e82c.esm.js} +3 -3
  45. package/dist/{start-vite-737bacca.cjs.dev.js → start-vite-22de08dc.cjs.dev.js} +7 -5
  46. package/dist/{start-vite-ec5d40b5.esm.js → start-vite-dc046cba.esm.js} +7 -5
  47. package/dist/{start-vite-b0f58ae4.cjs.prod.js → start-vite-fe13330b.cjs.prod.js} +7 -5
  48. package/dist/{user-agent-d18809af.cjs.prod.js → user-agent-837f1c7f.cjs.prod.js} +1 -1
  49. package/dist/{user-agent-8044acd6.esm.js → user-agent-b737c3ac.esm.js} +1 -1
  50. package/dist/{user-agent-5da1830b.cjs.dev.js → user-agent-f4549ad1.cjs.dev.js} +1 -1
  51. package/dist/vite-plugin-svgr-4205f2b5.cjs.dev.js +110 -0
  52. package/dist/vite-plugin-svgr-eb8524fa.esm.js +85 -0
  53. package/dist/vite-plugin-svgr-f3bbedbe.cjs.prod.js +110 -0
  54. package/package.json +25 -21
  55. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.dev.js +2 -2
  56. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.prod.js +2 -2
  57. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.esm.js +2 -2
  58. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.dev.js +4 -4
  59. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.prod.js +4 -4
  60. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.esm.js +4 -4
@@ -9,7 +9,7 @@ import omit from 'lodash/omit';
9
9
  import prompts from 'prompts';
10
10
  import chalk from 'chalk';
11
11
  import { processConfig } from '@commercetools-frontend/application-config';
12
- import { u as userAgent, C as CredentialsStorage } from './user-agent-8044acd6.esm.js';
12
+ import { u as userAgent, C as CredentialsStorage } from './user-agent-b737c3ac.esm.js';
13
13
  import { GraphQLClient } from 'graphql-request';
14
14
  import { GRAPHQL_TARGETS } from '@commercetools-frontend/constants';
15
15
  import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
@@ -31,7 +31,7 @@ import 'fs';
31
31
  import 'path';
32
32
  import 'os';
33
33
  import '@commercetools/http-user-agent';
34
- import './package-a98de907.esm.js';
34
+ import './package-b2f3ad5a.esm.js';
35
35
 
36
36
  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 } } } };
37
37
  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 } } } };
@@ -605,112 +605,84 @@ var getMcUrlLink = function getMcUrlLink(mcApiUrl, organizationId, applicationId
605
605
  return customAppLink;
606
606
  };
607
607
 
608
- function run() {
608
+ function run(_x) {
609
609
  return _run.apply(this, arguments);
610
610
  }
611
611
 
612
612
  function _run() {
613
- _run = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
613
+ _run = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(options) {
614
614
  var _context6;
615
615
 
616
- var options,
617
- applicationConfig,
618
- localCustomAppData,
619
- mcApiUrl,
620
- token,
621
- fetchedCustomApplication,
622
- _context4,
623
- _context5,
624
- userOrganizations,
625
- organizationId,
626
- organizationName,
627
- _userOrganizations$re,
628
- organization,
629
- _context3,
630
- organizationChoices,
631
- _yield$prompts,
632
- selectedOrganizationId,
633
- _yield$prompts2,
634
- _confirmation,
635
- _data,
636
- createdCustomApplication,
637
- _customAppLink,
638
- customAppLink,
639
- configDiff,
640
- _yield$prompts3,
641
- confirmation,
642
- data,
643
- _args = arguments;
616
+ var applicationConfig, localCustomAppData, mcApiUrl, token, fetchedCustomApplication, _context4, _context5, userOrganizations, organizationId, organizationName, _userOrganizations$re, organization, _context3, organizationChoices, _yield$prompts, selectedOrganizationId, _yield$prompts2, _confirmation, _data, createdCustomApplication, _customAppLink, customAppLink, configDiff, _yield$prompts3, confirmation, data;
644
617
 
645
618
  return _regeneratorRuntime.wrap(function _callee$(_context7) {
646
619
  while (1) {
647
620
  switch (_context7.prev = _context7.next) {
648
621
  case 0:
649
- options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
650
622
  applicationConfig = processConfig();
651
623
  localCustomAppData = applicationConfig.data;
652
624
  mcApiUrl = applicationConfig.env.mcApiUrl;
653
625
  token = credentialsStorage.getToken(mcApiUrl);
654
626
 
655
627
  if (token) {
656
- _context7.next = 7;
628
+ _context7.next = 6;
657
629
  break;
658
630
  }
659
631
 
660
632
  throw new Error("You don't have a valid session for the ".concat(mcApiUrl, " environment. Please, run the \"mc-scripts login\" command to authenticate yourself."));
661
633
 
662
- case 7:
663
- _context7.next = 9;
634
+ case 6:
635
+ _context7.next = 8;
664
636
  return fetchCustomApplication({
665
637
  mcApiUrl: mcApiUrl,
666
638
  token: token,
667
639
  entryPointUriPath: localCustomAppData.entryPointUriPath
668
640
  });
669
641
 
670
- case 9:
642
+ case 8:
671
643
  fetchedCustomApplication = _context7.sent;
672
644
 
673
645
  if (fetchedCustomApplication) {
674
- _context7.next = 52;
646
+ _context7.next = 51;
675
647
  break;
676
648
  }
677
649
 
678
- _context7.next = 13;
650
+ _context7.next = 12;
679
651
  return fetchUserOrganizations({
680
652
  mcApiUrl: mcApiUrl,
681
653
  token: token
682
654
  });
683
655
 
684
- case 13:
656
+ case 12:
685
657
  userOrganizations = _context7.sent;
686
658
 
687
659
  if (!(userOrganizations.total === 0)) {
688
- _context7.next = 16;
660
+ _context7.next = 15;
689
661
  break;
690
662
  }
691
663
 
692
664
  throw new Error("It seems you are not an admin of any Organization. Please make sure to be part of the Administrators team of the Organization you want the Custom Application to be configured to.");
693
665
 
694
- case 16:
666
+ case 15:
695
667
  if (!(userOrganizations.total === 1)) {
696
- _context7.next = 22;
668
+ _context7.next = 21;
697
669
  break;
698
670
  }
699
671
 
700
672
  _userOrganizations$re = _slicedToArray(userOrganizations.results, 1), organization = _userOrganizations$re[0];
701
673
  organizationId = organization.id;
702
674
  organizationName = organization.name;
703
- _context7.next = 31;
675
+ _context7.next = 30;
704
676
  break;
705
677
 
706
- case 22:
678
+ case 21:
707
679
  organizationChoices = _mapInstanceProperty(_context3 = userOrganizations.results).call(_context3, function (organization) {
708
680
  return {
709
681
  title: organization.name,
710
682
  value: organization.id
711
683
  };
712
684
  });
713
- _context7.next = 25;
685
+ _context7.next = 24;
714
686
  return prompts({
715
687
  type: 'select',
716
688
  name: 'organizationId',
@@ -719,26 +691,26 @@ function _run() {
719
691
  initial: 0
720
692
  });
721
693
 
722
- case 25:
694
+ case 24:
723
695
  _yield$prompts = _context7.sent;
724
696
  selectedOrganizationId = _yield$prompts.organizationId;
725
697
 
726
698
  if (selectedOrganizationId) {
727
- _context7.next = 29;
699
+ _context7.next = 28;
728
700
  break;
729
701
  }
730
702
 
731
703
  throw new Error("No Organization selected, aborting.");
732
704
 
733
- case 29:
705
+ case 28:
734
706
  organizationId = selectedOrganizationId;
735
707
  organizationName = _findInstanceProperty(organizationChoices).call(organizationChoices, function (_ref) {
736
708
  var value = _ref.value;
737
709
  return value === organizationId;
738
710
  }).title;
739
711
 
740
- case 31:
741
- _context7.next = 33;
712
+ case 30:
713
+ _context7.next = 32;
742
714
  return prompts({
743
715
  type: 'text',
744
716
  name: 'confirmation',
@@ -746,23 +718,23 @@ function _run() {
746
718
  initial: 'yes'
747
719
  });
748
720
 
749
- case 33:
721
+ case 32:
750
722
  _yield$prompts2 = _context7.sent;
751
723
  _confirmation = _yield$prompts2.confirmation;
752
724
 
753
725
  if (!(!_confirmation || _confirmation.toLowerCase().charAt(0) !== 'y')) {
754
- _context7.next = 38;
726
+ _context7.next = 37;
755
727
  break;
756
728
  }
757
729
 
758
730
  console.log(chalk.red('Aborted.'));
759
731
  return _context7.abrupt("return");
760
732
 
761
- case 38:
733
+ case 37:
762
734
  _data = omit(localCustomAppData, ['id']);
763
735
 
764
- if (!options['dry-run']) {
765
- _context7.next = 44;
736
+ if (!options.dryRun) {
737
+ _context7.next = 43;
766
738
  break;
767
739
  }
768
740
 
@@ -771,8 +743,8 @@ function _run() {
771
743
  console.log(_JSON$stringify(_data));
772
744
  return _context7.abrupt("return");
773
745
 
774
- case 44:
775
- _context7.next = 46;
746
+ case 43:
747
+ _context7.next = 45;
776
748
  return createCustomApplication({
777
749
  mcApiUrl: mcApiUrl,
778
750
  token: token,
@@ -780,36 +752,36 @@ function _run() {
780
752
  data: _data
781
753
  });
782
754
 
783
- case 46:
755
+ case 45:
784
756
  createdCustomApplication = _context7.sent;
785
757
 
786
758
  if (createdCustomApplication) {
787
- _context7.next = 49;
759
+ _context7.next = 48;
788
760
  break;
789
761
  }
790
762
 
791
763
  throw new Error('Failed to create the Custom Application.');
792
764
 
793
- case 49:
765
+ case 48:
794
766
  _customAppLink = getMcUrlLink(mcApiUrl, organizationId, createdCustomApplication.id);
795
767
  console.log(chalk.green(_concatInstanceProperty(_context5 = "Custom Application created.\nThe \"applicationId\" in your local Custom Application config file should be updated with the application ID: ".concat(createdCustomApplication.id, ".\nYou can see the Custom Application data in the Merchant Center at ")).call(_context5, _customAppLink, ".")));
796
768
  return _context7.abrupt("return");
797
769
 
798
- case 52:
770
+ case 51:
799
771
  customAppLink = getMcUrlLink(mcApiUrl, fetchedCustomApplication.organizationId, fetchedCustomApplication.application.id);
800
772
  configDiff = getConfigDiff(fetchedCustomApplication.application, localCustomAppData);
801
773
 
802
774
  if (configDiff) {
803
- _context7.next = 57;
775
+ _context7.next = 56;
804
776
  break;
805
777
  }
806
778
 
807
779
  console.log(chalk.green("Custom Application is already up to date.\nYou can see the Custom Application data in the Merchant Center at ".concat(customAppLink, ".")));
808
780
  return _context7.abrupt("return");
809
781
 
810
- case 57:
782
+ case 56:
811
783
  console.log(configDiff);
812
- _context7.next = 60;
784
+ _context7.next = 59;
813
785
  return prompts({
814
786
  type: 'text',
815
787
  name: 'confirmation',
@@ -817,23 +789,23 @@ function _run() {
817
789
  initial: 'yes'
818
790
  });
819
791
 
820
- case 60:
792
+ case 59:
821
793
  _yield$prompts3 = _context7.sent;
822
794
  confirmation = _yield$prompts3.confirmation;
823
795
 
824
796
  if (!(!confirmation || confirmation.toLowerCase().charAt(0) !== 'y')) {
825
- _context7.next = 65;
797
+ _context7.next = 64;
826
798
  break;
827
799
  }
828
800
 
829
801
  console.log(chalk.red('Aborted.'));
830
802
  return _context7.abrupt("return");
831
803
 
832
- case 65:
804
+ case 64:
833
805
  data = omit(localCustomAppData, ['id']);
834
806
 
835
- if (!options['dry-run']) {
836
- _context7.next = 71;
807
+ if (!options.dryRun) {
808
+ _context7.next = 70;
837
809
  break;
838
810
  }
839
811
 
@@ -842,8 +814,8 @@ function _run() {
842
814
  console.log(_JSON$stringify(data));
843
815
  return _context7.abrupt("return");
844
816
 
845
- case 71:
846
- _context7.next = 73;
817
+ case 70:
818
+ _context7.next = 72;
847
819
  return updateCustomApplication({
848
820
  mcApiUrl: mcApiUrl,
849
821
  token: token,
@@ -852,10 +824,10 @@ function _run() {
852
824
  applicationId: fetchedCustomApplication.application.id
853
825
  });
854
826
 
855
- case 73:
827
+ case 72:
856
828
  console.log(chalk.green("Custom Application updated.\nYou can see the Custom Application data in the Merchant Center at ".concat(customAppLink, ".")));
857
829
 
858
- case 74:
830
+ case 73:
859
831
  case "end":
860
832
  return _context7.stop();
861
833
  }
@@ -4,7 +4,7 @@ var _toConsumableArray = require('@babel/runtime-corejs3/helpers/toConsumableArr
4
4
  var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
5
5
  var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
6
6
  var path = require('path');
7
- var _package = require('./package-b5c040f3.cjs.prod.js');
7
+ var _package = require('./package-430e0951.cjs.prod.js');
8
8
 
9
9
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
10
10
 
@@ -4,7 +4,7 @@ var _toConsumableArray = require('@babel/runtime-corejs3/helpers/toConsumableArr
4
4
  var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
5
5
  var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
6
6
  var path = require('path');
7
- var _package = require('./package-aaf61bf0.cjs.dev.js');
7
+ var _package = require('./package-7d0afacb.cjs.dev.js');
8
8
 
9
9
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
10
10
 
@@ -2,7 +2,7 @@ import _toConsumableArray from '@babel/runtime-corejs3/helpers/esm/toConsumableA
2
2
  import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
3
3
  import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
4
4
  import path from 'path';
5
- import { p as pkgJson } from './package-a98de907.esm.js';
5
+ import { p as pkgJson } from './package-b2f3ad5a.esm.js';
6
6
 
7
7
  // This function aims to return the same result as `require.resolve`.
8
8
  // However, resolving a path to a `.css` file does not return the real
@@ -26,7 +26,7 @@ var applicationConfig = require('@commercetools-frontend/application-config');
26
26
  var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
27
27
  var paths = require('./paths-76b66e74.cjs.prod.js');
28
28
  var vendorsToTranspile = require('./vendors-to-transpile-367e0ba8.cjs.prod.js');
29
- var createPostcssConfig = require('./create-postcss-config-8ea16440.cjs.prod.js');
29
+ var createPostcssConfig = require('./create-postcss-config-0c0236bf.cjs.prod.js');
30
30
  var hasJsxRuntime = require('./has-jsx-runtime-0b03b72e.cjs.prod.js');
31
31
 
32
32
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
@@ -88,6 +88,8 @@ var LocalHtmlWebpackPlugin = /*#__PURE__*/function () {
88
88
  function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
89
89
 
90
90
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context6, _context7; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys(Object(source), !0)).call(_context6, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys(Object(source))).call(_context7, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
91
+
92
+ var momentLocalesToKeep = ["de", "de-at", "de-ch", "en-au", "en-ca", "en-gb", "en-ie", "en-in", "en-nz", "en-sg", "es", "es-do", "es-mx", "fr", "zh-cn"];
91
93
  var defaultToggleFlags = {
92
94
  generateIndexHtml: true,
93
95
  disableCoreJs: false
@@ -223,10 +225,9 @@ function createWebpackConfigForDevelopment() {
223
225
  inject: false,
224
226
  filename: paths.paths.appIndexHtml,
225
227
  template: require.resolve('@commercetools-frontend/mc-html-template/webpack')
226
- }), mergedOptions.toggleFlags.generateIndexHtml && new LocalHtmlWebpackPlugin(), // Strip all locales except `en`, `de`
227
- // (`en` is built into Moment and can't be removed).
228
+ }), mergedOptions.toggleFlags.generateIndexHtml && new LocalHtmlWebpackPlugin(), // Only keep locales that are available in the Merchant Center.
228
229
  new MomentLocalesPlugin__default["default"]({
229
- localesToKeep: ['de', 'es', 'fr', 'zh-cn', 'ja']
230
+ localesToKeep: momentLocalesToKeep
230
231
  }), // This is necessary to emit hot updates (CSS and Fast Refresh):
231
232
  new webpack__default["default"].HotModuleReplacementPlugin(), // Experimental hot reloading for React .
232
233
  // https://github.com/facebook/react/tree/master/packages/react-refresh
@@ -26,7 +26,7 @@ var applicationConfig = require('@commercetools-frontend/application-config');
26
26
  var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
27
27
  var paths = require('./paths-16823f56.cjs.dev.js');
28
28
  var vendorsToTranspile = require('./vendors-to-transpile-b51af5d3.cjs.dev.js');
29
- var createPostcssConfig = require('./create-postcss-config-4cbe10ab.cjs.dev.js');
29
+ var createPostcssConfig = require('./create-postcss-config-2a0d05b2.cjs.dev.js');
30
30
  var hasJsxRuntime = require('./has-jsx-runtime-3d4bb633.cjs.dev.js');
31
31
 
32
32
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
@@ -88,6 +88,8 @@ var LocalHtmlWebpackPlugin = /*#__PURE__*/function () {
88
88
  function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
89
89
 
90
90
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context6, _context7; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys(Object(source), !0)).call(_context6, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys(Object(source))).call(_context7, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
91
+
92
+ var momentLocalesToKeep = ["de", "de-at", "de-ch", "en-au", "en-ca", "en-gb", "en-ie", "en-in", "en-nz", "en-sg", "es", "es-do", "es-mx", "fr", "zh-cn"];
91
93
  var defaultToggleFlags = {
92
94
  generateIndexHtml: true,
93
95
  disableCoreJs: false
@@ -223,10 +225,9 @@ function createWebpackConfigForDevelopment() {
223
225
  inject: false,
224
226
  filename: paths.paths.appIndexHtml,
225
227
  template: require.resolve('@commercetools-frontend/mc-html-template/webpack')
226
- }), mergedOptions.toggleFlags.generateIndexHtml && new LocalHtmlWebpackPlugin(), // Strip all locales except `en`, `de`
227
- // (`en` is built into Moment and can't be removed).
228
+ }), mergedOptions.toggleFlags.generateIndexHtml && new LocalHtmlWebpackPlugin(), // Only keep locales that are available in the Merchant Center.
228
229
  new MomentLocalesPlugin__default["default"]({
229
- localesToKeep: ['de', 'es', 'fr', 'zh-cn', 'ja']
230
+ localesToKeep: momentLocalesToKeep
230
231
  }), // This is necessary to emit hot updates (CSS and Fast Refresh):
231
232
  new webpack__default["default"].HotModuleReplacementPlugin(), // Experimental hot reloading for React .
232
233
  // https://github.com/facebook/react/tree/master/packages/react-refresh
@@ -24,7 +24,7 @@ import { processConfig } from '@commercetools-frontend/application-config';
24
24
  import { replaceHtmlPlaceholders } from '@commercetools-frontend/mc-html-template';
25
25
  import { p as paths } from './paths-ed23d5a1.esm.js';
26
26
  import { v as vendorsToTranspile } from './vendors-to-transpile-68e03526.esm.js';
27
- import { c as createPostcssConfig } from './create-postcss-config-c1aa3525.esm.js';
27
+ import { c as createPostcssConfig } from './create-postcss-config-d2bf4c66.esm.js';
28
28
  import { h as hasJsxRuntime } from './has-jsx-runtime-8314226e.esm.js';
29
29
 
30
30
  var LocalHtmlWebpackPlugin = /*#__PURE__*/function () {
@@ -64,6 +64,8 @@ var LocalHtmlWebpackPlugin = /*#__PURE__*/function () {
64
64
  function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
65
65
 
66
66
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context6, _context7; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context6 = ownKeys(Object(source), !0)).call(_context6, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context7 = ownKeys(Object(source))).call(_context7, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
67
+
68
+ var momentLocalesToKeep = ["de", "de-at", "de-ch", "en-au", "en-ca", "en-gb", "en-ie", "en-in", "en-nz", "en-sg", "es", "es-do", "es-mx", "fr", "zh-cn"];
67
69
  var defaultToggleFlags = {
68
70
  generateIndexHtml: true,
69
71
  disableCoreJs: false
@@ -199,10 +201,9 @@ function createWebpackConfigForDevelopment() {
199
201
  inject: false,
200
202
  filename: paths.appIndexHtml,
201
203
  template: require.resolve('@commercetools-frontend/mc-html-template/webpack')
202
- }), mergedOptions.toggleFlags.generateIndexHtml && new LocalHtmlWebpackPlugin(), // Strip all locales except `en`, `de`
203
- // (`en` is built into Moment and can't be removed).
204
+ }), mergedOptions.toggleFlags.generateIndexHtml && new LocalHtmlWebpackPlugin(), // Only keep locales that are available in the Merchant Center.
204
205
  new MomentLocalesPlugin({
205
- localesToKeep: ['de', 'es', 'fr', 'zh-cn', 'ja']
206
+ localesToKeep: momentLocalesToKeep
206
207
  }), // This is necessary to emit hot updates (CSS and Fast Refresh):
207
208
  new webpack.HotModuleReplacementPlugin(), // Experimental hot reloading for React .
208
209
  // https://github.com/facebook/react/tree/master/packages/react-refresh
@@ -30,7 +30,7 @@ var fs = require('fs');
30
30
  var path = require('path');
31
31
  var paths = require('./paths-76b66e74.cjs.prod.js');
32
32
  var vendorsToTranspile = require('./vendors-to-transpile-367e0ba8.cjs.prod.js');
33
- var createPostcssConfig = require('./create-postcss-config-8ea16440.cjs.prod.js');
33
+ var createPostcssConfig = require('./create-postcss-config-0c0236bf.cjs.prod.js');
34
34
  var hasJsxRuntime = require('./has-jsx-runtime-0b03b72e.cjs.prod.js');
35
35
 
36
36
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
@@ -122,6 +122,8 @@ var FinalStatsWriterPlugin = /*#__PURE__*/function () {
122
122
  function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
123
123
 
124
124
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context7, _context8; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context7 = ownKeys(Object(source), !0)).call(_context7, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context8 = ownKeys(Object(source))).call(_context8, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
125
+
126
+ var momentLocalesToKeep = ["de", "de-at", "de-ch", "en-au", "en-ca", "en-gb", "en-ie", "en-in", "en-nz", "en-sg", "es", "es-do", "es-mx", "fr", "zh-cn"];
125
127
  var defaultToggleFlags = {
126
128
  // Allow to disable CSS extraction in case it's not necessary (e.g. for Storybook)
127
129
  enableExtractCss: true,
@@ -269,10 +271,9 @@ function createWebpackConfigForProduction() {
269
271
  'process.env': {
270
272
  NODE_ENV: _JSON$stringify__default["default"]('production')
271
273
  }
272
- }), // Strip all locales except `en`, `de`
273
- // (`en` is built into Moment and can't be removed)
274
+ }), // Only keep locales that are available in the Merchant Center.
274
275
  new MomentLocalesPlugin__default["default"]({
275
- localesToKeep: ['de', 'es', 'fr', 'zh-cn', 'ja']
276
+ localesToKeep: momentLocalesToKeep
276
277
  }), // Generate a `stats.json` file containing information and paths to
277
278
  // the assets that webpack created.
278
279
  // This is necessary to programmatically refer to the correct bundle path
@@ -28,7 +28,7 @@ import fs from 'fs';
28
28
  import path from 'path';
29
29
  import { p as paths } from './paths-ed23d5a1.esm.js';
30
30
  import { v as vendorsToTranspile } from './vendors-to-transpile-68e03526.esm.js';
31
- import { c as createPostcssConfig } from './create-postcss-config-c1aa3525.esm.js';
31
+ import { c as createPostcssConfig } from './create-postcss-config-d2bf4c66.esm.js';
32
32
  import { h as hasJsxRuntime } from './has-jsx-runtime-8314226e.esm.js';
33
33
 
34
34
  var FinalStatsWriterPlugin = /*#__PURE__*/function () {
@@ -93,6 +93,8 @@ var FinalStatsWriterPlugin = /*#__PURE__*/function () {
93
93
  function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
94
94
 
95
95
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context7, _context8; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context7 = ownKeys(Object(source), !0)).call(_context7, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context8 = ownKeys(Object(source))).call(_context8, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
96
+
97
+ var momentLocalesToKeep = ["de", "de-at", "de-ch", "en-au", "en-ca", "en-gb", "en-ie", "en-in", "en-nz", "en-sg", "es", "es-do", "es-mx", "fr", "zh-cn"];
96
98
  var defaultToggleFlags = {
97
99
  // Allow to disable CSS extraction in case it's not necessary (e.g. for Storybook)
98
100
  enableExtractCss: true,
@@ -240,10 +242,9 @@ function createWebpackConfigForProduction() {
240
242
  'process.env': {
241
243
  NODE_ENV: _JSON$stringify('production')
242
244
  }
243
- }), // Strip all locales except `en`, `de`
244
- // (`en` is built into Moment and can't be removed)
245
+ }), // Only keep locales that are available in the Merchant Center.
245
246
  new MomentLocalesPlugin({
246
- localesToKeep: ['de', 'es', 'fr', 'zh-cn', 'ja']
247
+ localesToKeep: momentLocalesToKeep
247
248
  }), // Generate a `stats.json` file containing information and paths to
248
249
  // the assets that webpack created.
249
250
  // This is necessary to programmatically refer to the correct bundle path
@@ -30,7 +30,7 @@ var fs = require('fs');
30
30
  var path = require('path');
31
31
  var paths = require('./paths-16823f56.cjs.dev.js');
32
32
  var vendorsToTranspile = require('./vendors-to-transpile-b51af5d3.cjs.dev.js');
33
- var createPostcssConfig = require('./create-postcss-config-4cbe10ab.cjs.dev.js');
33
+ var createPostcssConfig = require('./create-postcss-config-2a0d05b2.cjs.dev.js');
34
34
  var hasJsxRuntime = require('./has-jsx-runtime-3d4bb633.cjs.dev.js');
35
35
 
36
36
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
@@ -122,6 +122,8 @@ var FinalStatsWriterPlugin = /*#__PURE__*/function () {
122
122
  function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
123
123
 
124
124
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context7, _context8; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context7 = ownKeys(Object(source), !0)).call(_context7, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context8 = ownKeys(Object(source))).call(_context8, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
125
+
126
+ var momentLocalesToKeep = ["de", "de-at", "de-ch", "en-au", "en-ca", "en-gb", "en-ie", "en-in", "en-nz", "en-sg", "es", "es-do", "es-mx", "fr", "zh-cn"];
125
127
  var defaultToggleFlags = {
126
128
  // Allow to disable CSS extraction in case it's not necessary (e.g. for Storybook)
127
129
  enableExtractCss: true,
@@ -269,10 +271,9 @@ function createWebpackConfigForProduction() {
269
271
  'process.env': {
270
272
  NODE_ENV: _JSON$stringify__default["default"]('production')
271
273
  }
272
- }), // Strip all locales except `en`, `de`
273
- // (`en` is built into Moment and can't be removed)
274
+ }), // Only keep locales that are available in the Merchant Center.
274
275
  new MomentLocalesPlugin__default["default"]({
275
- localesToKeep: ['de', 'es', 'fr', 'zh-cn', 'ja']
276
+ localesToKeep: momentLocalesToKeep
276
277
  }), // Generate a `stats.json` file containing information and paths to
277
278
  // the assets that webpack created.
278
279
  // This is necessary to programmatically refer to the correct bundle path
@@ -1,3 +1,3 @@
1
1
  import type { TCliCommandCompileHtmlOptions } from '../types';
2
- declare function run(options?: TCliCommandCompileHtmlOptions): Promise<void>;
2
+ declare function run(options: TCliCommandCompileHtmlOptions): Promise<void>;
3
3
  export default run;
@@ -1,3 +1,3 @@
1
1
  import type { TCliCommandConfigSyncOptions } from '../types';
2
- declare function run(options?: TCliCommandConfigSyncOptions): Promise<void>;
2
+ declare function run(options: TCliCommandConfigSyncOptions): Promise<void>;
3
3
  export default run;
@@ -0,0 +1,2 @@
1
+ declare const momentLocalesToKeep: string[];
2
+ export default momentLocalesToKeep;