@commercetools-backend/express 22.35.1 → 22.36.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.
@@ -52,34 +52,22 @@ const CLOUD_IDENTIFIERS = {
52
52
  /**
53
53
  * @deprecated: use `AWS_US` instead
54
54
  */
55
- AWS_OHIO: 'aws-ohio',
56
- /**
57
- * @deprecated: not supported anymore
58
- */
59
- AWS_CN: 'aws-cn',
60
- AZURE_US: 'azure-us',
61
- AZURE_EU: 'azure-eu'
55
+ AWS_OHIO: 'aws-ohio'
62
56
  };
63
57
  const MC_API_URLS = {
64
- GCP_AU: 'https://mc-api.australia-southeast1.gcp.commercetools.com',
65
- GCP_EU: 'https://mc-api.europe-west1.gcp.commercetools.com',
66
- GCP_US: 'https://mc-api.us-central1.gcp.commercetools.com',
67
- AWS_EU: 'https://mc-api.eu-central-1.aws.commercetools.com',
68
- AWS_US: 'https://mc-api.us-east-2.aws.commercetools.com',
58
+ [CLOUD_IDENTIFIERS.GCP_AU]: 'https://mc-api.australia-southeast1.gcp.commercetools.com',
59
+ [CLOUD_IDENTIFIERS.GCP_EU]: 'https://mc-api.europe-west1.gcp.commercetools.com',
60
+ [CLOUD_IDENTIFIERS.GCP_US]: 'https://mc-api.us-central1.gcp.commercetools.com',
61
+ [CLOUD_IDENTIFIERS.AWS_EU]: 'https://mc-api.eu-central-1.aws.commercetools.com',
62
+ [CLOUD_IDENTIFIERS.AWS_US]: 'https://mc-api.us-east-2.aws.commercetools.com',
69
63
  /**
70
64
  * @deprecated: use `AWS_EU` instead
71
65
  */
72
- AWS_FRA: 'https://mc-api.eu-central-1.aws.commercetools.com',
66
+ [CLOUD_IDENTIFIERS.AWS_FRA]: 'https://mc-api.eu-central-1.aws.commercetools.com',
73
67
  /**
74
68
  * @deprecated: use `AWS_US` instead
75
69
  */
76
- AWS_OHIO: 'https://mc-api.us-east-2.aws.commercetools.com',
77
- /**
78
- * @deprecated: not supported anymore
79
- */
80
- AWS_CN: 'https://mc-api.cn-northwest-1.aws.commercetools.cn',
81
- AZURE_US: 'https://mc-api.eastus.azure.commercetools.com',
82
- AZURE_EU: 'https://mc-api.germanywestcentral.azure.commercetools.com'
70
+ [CLOUD_IDENTIFIERS.AWS_OHIO]: 'https://mc-api.us-east-2.aws.commercetools.com'
83
71
  };
84
72
  const MC_API_PROXY_HEADERS = {
85
73
  FORWARD_TO_VERSION: 'x-mc-api-forward-to-version',
@@ -138,24 +126,17 @@ const writeSessionContext = request => {
138
126
  const mapCloudIdentifierToIssuer = issuer => {
139
127
  switch (issuer) {
140
128
  case CLOUD_IDENTIFIERS.GCP_AU:
141
- return MC_API_URLS.GCP_AU;
129
+ return MC_API_URLS[CLOUD_IDENTIFIERS.GCP_AU];
142
130
  case CLOUD_IDENTIFIERS.GCP_EU:
143
- return MC_API_URLS.GCP_EU;
131
+ return MC_API_URLS[CLOUD_IDENTIFIERS.GCP_EU];
144
132
  case CLOUD_IDENTIFIERS.GCP_US:
145
- return MC_API_URLS.GCP_US;
133
+ return MC_API_URLS[CLOUD_IDENTIFIERS.GCP_US];
146
134
  case CLOUD_IDENTIFIERS.AWS_EU:
147
135
  case CLOUD_IDENTIFIERS.AWS_FRA:
148
- return MC_API_URLS.AWS_EU;
136
+ return MC_API_URLS[CLOUD_IDENTIFIERS.AWS_EU];
149
137
  case CLOUD_IDENTIFIERS.AWS_US:
150
138
  case CLOUD_IDENTIFIERS.AWS_OHIO:
151
- return MC_API_URLS.AWS_US;
152
- // TODO: remove it
153
- case CLOUD_IDENTIFIERS.AWS_CN:
154
- return MC_API_URLS.AWS_CN;
155
- case CLOUD_IDENTIFIERS.AZURE_US:
156
- return MC_API_URLS.AZURE_US;
157
- case CLOUD_IDENTIFIERS.AZURE_EU:
158
- return MC_API_URLS.AZURE_EU;
139
+ return MC_API_URLS[CLOUD_IDENTIFIERS.AWS_US];
159
140
  default:
160
141
  return undefined;
161
142
  }
@@ -52,34 +52,22 @@ const CLOUD_IDENTIFIERS = {
52
52
  /**
53
53
  * @deprecated: use `AWS_US` instead
54
54
  */
55
- AWS_OHIO: 'aws-ohio',
56
- /**
57
- * @deprecated: not supported anymore
58
- */
59
- AWS_CN: 'aws-cn',
60
- AZURE_US: 'azure-us',
61
- AZURE_EU: 'azure-eu'
55
+ AWS_OHIO: 'aws-ohio'
62
56
  };
63
57
  const MC_API_URLS = {
64
- GCP_AU: 'https://mc-api.australia-southeast1.gcp.commercetools.com',
65
- GCP_EU: 'https://mc-api.europe-west1.gcp.commercetools.com',
66
- GCP_US: 'https://mc-api.us-central1.gcp.commercetools.com',
67
- AWS_EU: 'https://mc-api.eu-central-1.aws.commercetools.com',
68
- AWS_US: 'https://mc-api.us-east-2.aws.commercetools.com',
58
+ [CLOUD_IDENTIFIERS.GCP_AU]: 'https://mc-api.australia-southeast1.gcp.commercetools.com',
59
+ [CLOUD_IDENTIFIERS.GCP_EU]: 'https://mc-api.europe-west1.gcp.commercetools.com',
60
+ [CLOUD_IDENTIFIERS.GCP_US]: 'https://mc-api.us-central1.gcp.commercetools.com',
61
+ [CLOUD_IDENTIFIERS.AWS_EU]: 'https://mc-api.eu-central-1.aws.commercetools.com',
62
+ [CLOUD_IDENTIFIERS.AWS_US]: 'https://mc-api.us-east-2.aws.commercetools.com',
69
63
  /**
70
64
  * @deprecated: use `AWS_EU` instead
71
65
  */
72
- AWS_FRA: 'https://mc-api.eu-central-1.aws.commercetools.com',
66
+ [CLOUD_IDENTIFIERS.AWS_FRA]: 'https://mc-api.eu-central-1.aws.commercetools.com',
73
67
  /**
74
68
  * @deprecated: use `AWS_US` instead
75
69
  */
76
- AWS_OHIO: 'https://mc-api.us-east-2.aws.commercetools.com',
77
- /**
78
- * @deprecated: not supported anymore
79
- */
80
- AWS_CN: 'https://mc-api.cn-northwest-1.aws.commercetools.cn',
81
- AZURE_US: 'https://mc-api.eastus.azure.commercetools.com',
82
- AZURE_EU: 'https://mc-api.germanywestcentral.azure.commercetools.com'
70
+ [CLOUD_IDENTIFIERS.AWS_OHIO]: 'https://mc-api.us-east-2.aws.commercetools.com'
83
71
  };
84
72
  const MC_API_PROXY_HEADERS = {
85
73
  FORWARD_TO_VERSION: 'x-mc-api-forward-to-version',
@@ -138,24 +126,17 @@ const writeSessionContext = request => {
138
126
  const mapCloudIdentifierToIssuer = issuer => {
139
127
  switch (issuer) {
140
128
  case CLOUD_IDENTIFIERS.GCP_AU:
141
- return MC_API_URLS.GCP_AU;
129
+ return MC_API_URLS[CLOUD_IDENTIFIERS.GCP_AU];
142
130
  case CLOUD_IDENTIFIERS.GCP_EU:
143
- return MC_API_URLS.GCP_EU;
131
+ return MC_API_URLS[CLOUD_IDENTIFIERS.GCP_EU];
144
132
  case CLOUD_IDENTIFIERS.GCP_US:
145
- return MC_API_URLS.GCP_US;
133
+ return MC_API_URLS[CLOUD_IDENTIFIERS.GCP_US];
146
134
  case CLOUD_IDENTIFIERS.AWS_EU:
147
135
  case CLOUD_IDENTIFIERS.AWS_FRA:
148
- return MC_API_URLS.AWS_EU;
136
+ return MC_API_URLS[CLOUD_IDENTIFIERS.AWS_EU];
149
137
  case CLOUD_IDENTIFIERS.AWS_US:
150
138
  case CLOUD_IDENTIFIERS.AWS_OHIO:
151
- return MC_API_URLS.AWS_US;
152
- // TODO: remove it
153
- case CLOUD_IDENTIFIERS.AWS_CN:
154
- return MC_API_URLS.AWS_CN;
155
- case CLOUD_IDENTIFIERS.AZURE_US:
156
- return MC_API_URLS.AZURE_US;
157
- case CLOUD_IDENTIFIERS.AZURE_EU:
158
- return MC_API_URLS.AZURE_EU;
139
+ return MC_API_URLS[CLOUD_IDENTIFIERS.AWS_US];
159
140
  default:
160
141
  return undefined;
161
142
  }
@@ -30,34 +30,22 @@ const CLOUD_IDENTIFIERS = {
30
30
  /**
31
31
  * @deprecated: use `AWS_US` instead
32
32
  */
33
- AWS_OHIO: 'aws-ohio',
34
- /**
35
- * @deprecated: not supported anymore
36
- */
37
- AWS_CN: 'aws-cn',
38
- AZURE_US: 'azure-us',
39
- AZURE_EU: 'azure-eu'
33
+ AWS_OHIO: 'aws-ohio'
40
34
  };
41
35
  const MC_API_URLS = {
42
- GCP_AU: 'https://mc-api.australia-southeast1.gcp.commercetools.com',
43
- GCP_EU: 'https://mc-api.europe-west1.gcp.commercetools.com',
44
- GCP_US: 'https://mc-api.us-central1.gcp.commercetools.com',
45
- AWS_EU: 'https://mc-api.eu-central-1.aws.commercetools.com',
46
- AWS_US: 'https://mc-api.us-east-2.aws.commercetools.com',
36
+ [CLOUD_IDENTIFIERS.GCP_AU]: 'https://mc-api.australia-southeast1.gcp.commercetools.com',
37
+ [CLOUD_IDENTIFIERS.GCP_EU]: 'https://mc-api.europe-west1.gcp.commercetools.com',
38
+ [CLOUD_IDENTIFIERS.GCP_US]: 'https://mc-api.us-central1.gcp.commercetools.com',
39
+ [CLOUD_IDENTIFIERS.AWS_EU]: 'https://mc-api.eu-central-1.aws.commercetools.com',
40
+ [CLOUD_IDENTIFIERS.AWS_US]: 'https://mc-api.us-east-2.aws.commercetools.com',
47
41
  /**
48
42
  * @deprecated: use `AWS_EU` instead
49
43
  */
50
- AWS_FRA: 'https://mc-api.eu-central-1.aws.commercetools.com',
44
+ [CLOUD_IDENTIFIERS.AWS_FRA]: 'https://mc-api.eu-central-1.aws.commercetools.com',
51
45
  /**
52
46
  * @deprecated: use `AWS_US` instead
53
47
  */
54
- AWS_OHIO: 'https://mc-api.us-east-2.aws.commercetools.com',
55
- /**
56
- * @deprecated: not supported anymore
57
- */
58
- AWS_CN: 'https://mc-api.cn-northwest-1.aws.commercetools.cn',
59
- AZURE_US: 'https://mc-api.eastus.azure.commercetools.com',
60
- AZURE_EU: 'https://mc-api.germanywestcentral.azure.commercetools.com'
48
+ [CLOUD_IDENTIFIERS.AWS_OHIO]: 'https://mc-api.us-east-2.aws.commercetools.com'
61
49
  };
62
50
  const MC_API_PROXY_HEADERS = {
63
51
  FORWARD_TO_VERSION: 'x-mc-api-forward-to-version',
@@ -116,24 +104,17 @@ const writeSessionContext = request => {
116
104
  const mapCloudIdentifierToIssuer = issuer => {
117
105
  switch (issuer) {
118
106
  case CLOUD_IDENTIFIERS.GCP_AU:
119
- return MC_API_URLS.GCP_AU;
107
+ return MC_API_URLS[CLOUD_IDENTIFIERS.GCP_AU];
120
108
  case CLOUD_IDENTIFIERS.GCP_EU:
121
- return MC_API_URLS.GCP_EU;
109
+ return MC_API_URLS[CLOUD_IDENTIFIERS.GCP_EU];
122
110
  case CLOUD_IDENTIFIERS.GCP_US:
123
- return MC_API_URLS.GCP_US;
111
+ return MC_API_URLS[CLOUD_IDENTIFIERS.GCP_US];
124
112
  case CLOUD_IDENTIFIERS.AWS_EU:
125
113
  case CLOUD_IDENTIFIERS.AWS_FRA:
126
- return MC_API_URLS.AWS_EU;
114
+ return MC_API_URLS[CLOUD_IDENTIFIERS.AWS_EU];
127
115
  case CLOUD_IDENTIFIERS.AWS_US:
128
116
  case CLOUD_IDENTIFIERS.AWS_OHIO:
129
- return MC_API_URLS.AWS_US;
130
- // TODO: remove it
131
- case CLOUD_IDENTIFIERS.AWS_CN:
132
- return MC_API_URLS.AWS_CN;
133
- case CLOUD_IDENTIFIERS.AZURE_US:
134
- return MC_API_URLS.AZURE_US;
135
- case CLOUD_IDENTIFIERS.AZURE_EU:
136
- return MC_API_URLS.AZURE_EU;
117
+ return MC_API_URLS[CLOUD_IDENTIFIERS.AWS_US];
137
118
  default:
138
119
  return undefined;
139
120
  }
@@ -12,33 +12,21 @@ export declare const CLOUD_IDENTIFIERS: {
12
12
  * @deprecated: use `AWS_US` instead
13
13
  */
14
14
  readonly AWS_OHIO: "aws-ohio";
15
- /**
16
- * @deprecated: not supported anymore
17
- */
18
- readonly AWS_CN: "aws-cn";
19
- readonly AZURE_US: "azure-us";
20
- readonly AZURE_EU: "azure-eu";
21
15
  };
22
16
  export declare const MC_API_URLS: {
23
- readonly GCP_AU: "https://mc-api.australia-southeast1.gcp.commercetools.com";
24
- readonly GCP_EU: "https://mc-api.europe-west1.gcp.commercetools.com";
25
- readonly GCP_US: "https://mc-api.us-central1.gcp.commercetools.com";
26
- readonly AWS_EU: "https://mc-api.eu-central-1.aws.commercetools.com";
27
- readonly AWS_US: "https://mc-api.us-east-2.aws.commercetools.com";
17
+ readonly "gcp-au": "https://mc-api.australia-southeast1.gcp.commercetools.com";
18
+ readonly "gcp-eu": "https://mc-api.europe-west1.gcp.commercetools.com";
19
+ readonly "gcp-us": "https://mc-api.us-central1.gcp.commercetools.com";
20
+ readonly "aws-eu": "https://mc-api.eu-central-1.aws.commercetools.com";
21
+ readonly "aws-us": "https://mc-api.us-east-2.aws.commercetools.com";
28
22
  /**
29
23
  * @deprecated: use `AWS_EU` instead
30
24
  */
31
- readonly AWS_FRA: "https://mc-api.eu-central-1.aws.commercetools.com";
25
+ readonly "aws-fra": "https://mc-api.eu-central-1.aws.commercetools.com";
32
26
  /**
33
27
  * @deprecated: use `AWS_US` instead
34
28
  */
35
- readonly AWS_OHIO: "https://mc-api.us-east-2.aws.commercetools.com";
36
- /**
37
- * @deprecated: not supported anymore
38
- */
39
- readonly AWS_CN: "https://mc-api.cn-northwest-1.aws.commercetools.cn";
40
- readonly AZURE_US: "https://mc-api.eastus.azure.commercetools.com";
41
- readonly AZURE_EU: "https://mc-api.germanywestcentral.azure.commercetools.com";
29
+ readonly "aws-ohio": "https://mc-api.us-east-2.aws.commercetools.com";
42
30
  };
43
31
  export declare const MC_API_PROXY_HEADERS: {
44
32
  readonly FORWARD_TO_VERSION: "x-mc-api-forward-to-version";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-backend/express",
3
- "version": "22.35.1",
3
+ "version": "22.36.0",
4
4
  "description": "Zero-config HTTP server as Express.js to facilitate development",
5
5
  "bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
6
6
  "repository": {