@commercetools-frontend/application-config 22.4.0 → 22.6.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.
@@ -839,18 +839,21 @@ const processConfig = function () {
839
839
  // after successful login.
840
840
  const applicationId = isProd ? _concatInstanceProperty__default["default"](_context = "".concat(customApplicationData.id, ":")).call(_context, customApplicationData.entryPointUriPath) : "__local:".concat(customApplicationData.entryPointUriPath);
841
841
  const developmentConfig = isProd ? undefined : omitDevConfigIfEmpty({
842
- oidc: omitEmpty__default["default"]({
842
+ oidc: omitEmpty__default["default"](_objectSpread(_objectSpread({
843
843
  authorizeUrl: [
844
844
  // In case the MC API url points to localhost, we need to point
845
845
  // to a local running dev login page to handle the workflow properly.
846
846
  mcApiUrl.hostname === 'localhost' ? mcApiUrl.origin.replace(mcApiUrl.port, String(developmentPort)) : mcApiUrl.origin.replace('mc-api', 'mc'), '/login/authorize'].join(''),
847
847
  initialProjectKey:
848
848
  // For the `account` application, we should unset the projectKey.
849
- customApplicationData.entryPointUriPath === 'account' ? undefined : appConfig.env.development.initialProjectKey,
850
- teamId: (_appConfig$env$develo = appConfig.env.development) === null || _appConfig$env$develo === void 0 ? void 0 : _appConfig$env$develo.teamId,
849
+ customApplicationData.entryPointUriPath === 'account' ? undefined : appConfig.env.development.initialProjectKey
850
+ }, ((_appConfig$env$develo = appConfig.env.development) === null || _appConfig$env$develo === void 0 ? void 0 : _appConfig$env$develo.teamId) && {
851
+ teamId: appConfig.env.development.teamId,
852
+ applicationId: appConfig.env.production.applicationId
853
+ }), {}, {
851
854
  oAuthScopes: appConfig.oAuthScopes,
852
855
  additionalOAuthScopes: appConfig === null || appConfig === void 0 ? void 0 : appConfig.additionalOAuthScopes
853
- }),
856
+ })),
854
857
  menuLinks: _objectSpread(_objectSpread({
855
858
  icon: customApplicationData.icon
856
859
  }, customApplicationData.mainMenuLink), {}, {
@@ -839,18 +839,21 @@ const processConfig = function () {
839
839
  // after successful login.
840
840
  const applicationId = isProd ? _concatInstanceProperty__default["default"](_context = "".concat(customApplicationData.id, ":")).call(_context, customApplicationData.entryPointUriPath) : "__local:".concat(customApplicationData.entryPointUriPath);
841
841
  const developmentConfig = isProd ? undefined : omitDevConfigIfEmpty({
842
- oidc: omitEmpty__default["default"]({
842
+ oidc: omitEmpty__default["default"](_objectSpread(_objectSpread({
843
843
  authorizeUrl: [
844
844
  // In case the MC API url points to localhost, we need to point
845
845
  // to a local running dev login page to handle the workflow properly.
846
846
  mcApiUrl.hostname === 'localhost' ? mcApiUrl.origin.replace(mcApiUrl.port, String(developmentPort)) : mcApiUrl.origin.replace('mc-api', 'mc'), '/login/authorize'].join(''),
847
847
  initialProjectKey:
848
848
  // For the `account` application, we should unset the projectKey.
849
- customApplicationData.entryPointUriPath === 'account' ? undefined : appConfig.env.development.initialProjectKey,
850
- teamId: (_appConfig$env$develo = appConfig.env.development) === null || _appConfig$env$develo === void 0 ? void 0 : _appConfig$env$develo.teamId,
849
+ customApplicationData.entryPointUriPath === 'account' ? undefined : appConfig.env.development.initialProjectKey
850
+ }, ((_appConfig$env$develo = appConfig.env.development) === null || _appConfig$env$develo === void 0 ? void 0 : _appConfig$env$develo.teamId) && {
851
+ teamId: appConfig.env.development.teamId,
852
+ applicationId: appConfig.env.production.applicationId
853
+ }), {}, {
851
854
  oAuthScopes: appConfig.oAuthScopes,
852
855
  additionalOAuthScopes: appConfig === null || appConfig === void 0 ? void 0 : appConfig.additionalOAuthScopes
853
- }),
856
+ })),
854
857
  menuLinks: _objectSpread(_objectSpread({
855
858
  icon: customApplicationData.icon
856
859
  }, customApplicationData.mainMenuLink), {}, {
@@ -806,18 +806,21 @@ const processConfig = function () {
806
806
  // after successful login.
807
807
  const applicationId = isProd ? _concatInstanceProperty(_context = "".concat(customApplicationData.id, ":")).call(_context, customApplicationData.entryPointUriPath) : "__local:".concat(customApplicationData.entryPointUriPath);
808
808
  const developmentConfig = isProd ? undefined : omitDevConfigIfEmpty({
809
- oidc: omitEmpty({
809
+ oidc: omitEmpty(_objectSpread(_objectSpread({
810
810
  authorizeUrl: [
811
811
  // In case the MC API url points to localhost, we need to point
812
812
  // to a local running dev login page to handle the workflow properly.
813
813
  mcApiUrl.hostname === 'localhost' ? mcApiUrl.origin.replace(mcApiUrl.port, String(developmentPort)) : mcApiUrl.origin.replace('mc-api', 'mc'), '/login/authorize'].join(''),
814
814
  initialProjectKey:
815
815
  // For the `account` application, we should unset the projectKey.
816
- customApplicationData.entryPointUriPath === 'account' ? undefined : appConfig.env.development.initialProjectKey,
817
- teamId: (_appConfig$env$develo = appConfig.env.development) === null || _appConfig$env$develo === void 0 ? void 0 : _appConfig$env$develo.teamId,
816
+ customApplicationData.entryPointUriPath === 'account' ? undefined : appConfig.env.development.initialProjectKey
817
+ }, ((_appConfig$env$develo = appConfig.env.development) === null || _appConfig$env$develo === void 0 ? void 0 : _appConfig$env$develo.teamId) && {
818
+ teamId: appConfig.env.development.teamId,
819
+ applicationId: appConfig.env.production.applicationId
820
+ }), {}, {
818
821
  oAuthScopes: appConfig.oAuthScopes,
819
822
  additionalOAuthScopes: appConfig === null || appConfig === void 0 ? void 0 : appConfig.additionalOAuthScopes
820
- }),
823
+ })),
821
824
  menuLinks: _objectSpread(_objectSpread({
822
825
  icon: customApplicationData.icon
823
826
  }, customApplicationData.mainMenuLink), {}, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/application-config",
3
- "version": "22.4.0",
3
+ "version": "22.6.0",
4
4
  "description": "Configuration utilities for building Custom Applications",
5
5
  "bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
6
6
  "repository": {
@@ -44,7 +44,7 @@
44
44
  "@babel/register": "^7.18.9",
45
45
  "@babel/runtime": "^7.20.13",
46
46
  "@babel/runtime-corejs3": "^7.20.13",
47
- "@commercetools-frontend/babel-preset-mc-app": "22.4.0",
47
+ "@commercetools-frontend/babel-preset-mc-app": "22.6.0",
48
48
  "@types/dompurify": "^2.4.0",
49
49
  "@types/lodash": "^4.14.191",
50
50
  "@types/react": "^17.0.53",
@@ -60,7 +60,7 @@
60
60
  "@types/jsdom": "^21.1.1",
61
61
  "json-schema-to-typescript": "13.0.1",
62
62
  "shelljs": "0.8.5",
63
- "@commercetools-frontend/assets": "22.4.0"
63
+ "@commercetools-frontend/assets": "22.6.0"
64
64
  },
65
65
  "engines": {
66
66
  "node": "16.x || >=18.0.0"