@commercetools-frontend/application-config 22.23.3 → 22.25.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.
- package/README.md +1 -1
- package/custom-application.schema.json +33 -33
- package/custom-view.schema.json +1 -1
- package/dist/commercetools-frontend-application-config.cjs.dev.js +43 -35
- package/dist/commercetools-frontend-application-config.cjs.prod.js +43 -35
- package/dist/commercetools-frontend-application-config.esm.js +43 -35
- package/package.json +5 -5
- package/tsconfig-mc-app.json +0 -2
package/README.md
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
<a href="https://www.npmjs.com/package/@commercetools-frontend/application-config"><img src="https://badgen.net/npm/v/@commercetools-frontend/application-config" alt="Latest release (latest dist-tag)" /></a> <a href="https://www.npmjs.com/package/@commercetools-frontend/application-config"><img src="https://badgen.net/npm/v/@commercetools-frontend/application-config/next" alt="Latest release (next dist-tag)" /></a> <a href="https://bundlephobia.com/result?p=@commercetools-frontend/application-config"><img src="https://badgen.net/bundlephobia/minzip/@commercetools-frontend/application-config" alt="Minified + GZipped size" /></a> <a href="https://github.com/commercetools/merchant-center-application-kit/blob/main/LICENSE"><img src="https://badgen.net/github/license/commercetools/merchant-center-application-kit" alt="GitHub license" /></a>
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
|
-
Check out the [
|
|
7
|
+
Check out the documentation for [configuring a Custom Application](https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config) and for [configuring a Custom View](https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-view-config).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
-
"$id": "https://docs.commercetools.com/custom-
|
|
3
|
+
"$id": "https://docs.commercetools.com/merchant-center-customizations/custom-application.schema.json",
|
|
4
4
|
"title": "JSON schema for Custom Application configuration files",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"definitions": {
|
|
@@ -14,31 +14,31 @@
|
|
|
14
14
|
},
|
|
15
15
|
"properties": {
|
|
16
16
|
"name": {
|
|
17
|
-
"description": "See https://docs.commercetools.com/
|
|
17
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#name",
|
|
18
18
|
"type": "string"
|
|
19
19
|
},
|
|
20
20
|
"description": {
|
|
21
|
-
"description": "See https://docs.commercetools.com/
|
|
21
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#description",
|
|
22
22
|
"type": "string"
|
|
23
23
|
},
|
|
24
24
|
"entryPointUriPath": {
|
|
25
|
-
"description": "See https://docs.commercetools.com/
|
|
25
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#entrypointuripath",
|
|
26
26
|
"type": "string"
|
|
27
27
|
},
|
|
28
28
|
"cloudIdentifier": {
|
|
29
|
-
"description": "See https://docs.commercetools.com/
|
|
29
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#cloudidentifier",
|
|
30
30
|
"type": "string"
|
|
31
31
|
},
|
|
32
32
|
"mcApiUrl": {
|
|
33
|
-
"description": "See https://docs.commercetools.com/
|
|
33
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#mcapiurl",
|
|
34
34
|
"type": "string"
|
|
35
35
|
},
|
|
36
36
|
"oAuthScopes": {
|
|
37
|
-
"description": "See https://docs.commercetools.com/
|
|
37
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#oauthscopes",
|
|
38
38
|
"type": "object",
|
|
39
39
|
"properties": {
|
|
40
40
|
"view": {
|
|
41
|
-
"description": "See https://docs.commercetools.com/
|
|
41
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#oauthscopesview",
|
|
42
42
|
"type": "array",
|
|
43
43
|
"default": [],
|
|
44
44
|
"items": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"uniqueItems": true
|
|
49
49
|
},
|
|
50
50
|
"manage": {
|
|
51
|
-
"description": "See https://docs.commercetools.com/
|
|
51
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#oauthscopesmanage",
|
|
52
52
|
"type": "array",
|
|
53
53
|
"default": [],
|
|
54
54
|
"items": {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"required": ["view", "manage"]
|
|
63
63
|
},
|
|
64
64
|
"additionalOAuthScopes": {
|
|
65
|
-
"description": "See https://docs.commercetools.com/
|
|
65
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#additionaloauthscopes",
|
|
66
66
|
"type": "array",
|
|
67
67
|
"default": [],
|
|
68
68
|
"uniqueItems": true,
|
|
@@ -70,11 +70,11 @@
|
|
|
70
70
|
"type": "object",
|
|
71
71
|
"properties": {
|
|
72
72
|
"name": {
|
|
73
|
-
"description": "See https://docs.commercetools.com/
|
|
73
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#additionaloauthscopesname",
|
|
74
74
|
"type": "string"
|
|
75
75
|
},
|
|
76
76
|
"view": {
|
|
77
|
-
"description": "See https://docs.commercetools.com/
|
|
77
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#additionaloauthscopesview",
|
|
78
78
|
"type": "array",
|
|
79
79
|
"default": [],
|
|
80
80
|
"items": {
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"uniqueItems": true
|
|
85
85
|
},
|
|
86
86
|
"manage": {
|
|
87
|
-
"description": "See https://docs.commercetools.com/
|
|
87
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#additionaloauthscopesmanage",
|
|
88
88
|
"type": "array",
|
|
89
89
|
"default": [],
|
|
90
90
|
"items": {
|
|
@@ -99,14 +99,14 @@
|
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
101
|
"env": {
|
|
102
|
-
"description": "See https://docs.commercetools.com/
|
|
102
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#env",
|
|
103
103
|
"type": "object",
|
|
104
104
|
"properties": {
|
|
105
105
|
"development": {
|
|
106
106
|
"type": "object",
|
|
107
107
|
"properties": {
|
|
108
108
|
"initialProjectKey": {
|
|
109
|
-
"description": "See https://docs.commercetools.com/
|
|
109
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#envdevelopmentinitialprojectkey",
|
|
110
110
|
"type": "string"
|
|
111
111
|
},
|
|
112
112
|
"teamId": {
|
|
@@ -120,15 +120,15 @@
|
|
|
120
120
|
"type": "object",
|
|
121
121
|
"properties": {
|
|
122
122
|
"applicationId": {
|
|
123
|
-
"description": "See https://docs.commercetools.com/
|
|
123
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#envproductionapplicationid",
|
|
124
124
|
"type": "string"
|
|
125
125
|
},
|
|
126
126
|
"url": {
|
|
127
|
-
"description": "See https://docs.commercetools.com/
|
|
127
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#envproductionurl",
|
|
128
128
|
"type": "string"
|
|
129
129
|
},
|
|
130
130
|
"cdnUrl": {
|
|
131
|
-
"description": "See https://docs.commercetools.com/
|
|
131
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#envproductioncdnurl",
|
|
132
132
|
"type": "string"
|
|
133
133
|
}
|
|
134
134
|
},
|
|
@@ -140,15 +140,15 @@
|
|
|
140
140
|
"required": ["development", "production"]
|
|
141
141
|
},
|
|
142
142
|
"additionalEnv": {
|
|
143
|
-
"description": "See https://docs.commercetools.com/
|
|
143
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#additionalenv",
|
|
144
144
|
"type": "object"
|
|
145
145
|
},
|
|
146
146
|
"headers": {
|
|
147
|
-
"description": "See https://docs.commercetools.com/
|
|
147
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#headers",
|
|
148
148
|
"type": "object",
|
|
149
149
|
"properties": {
|
|
150
150
|
"csp": {
|
|
151
|
-
"description": "See https://docs.commercetools.com/
|
|
151
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#headerscsp",
|
|
152
152
|
"type": "object",
|
|
153
153
|
"properties": {
|
|
154
154
|
"connect-src": {
|
|
@@ -174,11 +174,11 @@
|
|
|
174
174
|
"required": ["connect-src"]
|
|
175
175
|
},
|
|
176
176
|
"permissionsPolicies": {
|
|
177
|
-
"description": "See https://docs.commercetools.com/
|
|
177
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#headerspermissionspolicies",
|
|
178
178
|
"type": "object"
|
|
179
179
|
},
|
|
180
180
|
"strictTransportSecurity": {
|
|
181
|
-
"description": "See https://docs.commercetools.com/
|
|
181
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#headersstricttransportsecurity",
|
|
182
182
|
"type": "array",
|
|
183
183
|
"items": {
|
|
184
184
|
"enum": ["includeSubDomains", "preload"]
|
|
@@ -189,19 +189,19 @@
|
|
|
189
189
|
"additionalProperties": false
|
|
190
190
|
},
|
|
191
191
|
"icon": {
|
|
192
|
-
"description": "See https://docs.commercetools.com/
|
|
192
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#icon",
|
|
193
193
|
"type": "string"
|
|
194
194
|
},
|
|
195
195
|
"mainMenuLink": {
|
|
196
|
-
"description": "See https://docs.commercetools.com/
|
|
196
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#mainmenulink",
|
|
197
197
|
"type": "object",
|
|
198
198
|
"properties": {
|
|
199
199
|
"defaultLabel": {
|
|
200
|
-
"description": "See https://docs.commercetools.com/
|
|
200
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#mainmenulinkdefaultlabel",
|
|
201
201
|
"type": "string"
|
|
202
202
|
},
|
|
203
203
|
"labelAllLocales": {
|
|
204
|
-
"description": "See https://docs.commercetools.com/
|
|
204
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#mainmenulinklabelalllocales",
|
|
205
205
|
"type": "array",
|
|
206
206
|
"default": [],
|
|
207
207
|
"items": {
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
}
|
|
221
221
|
},
|
|
222
222
|
"permissions": {
|
|
223
|
-
"description": "See https://docs.commercetools.com/
|
|
223
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#mainmenulinkpermissions",
|
|
224
224
|
"type": "array",
|
|
225
225
|
"default": [],
|
|
226
226
|
"items": {
|
|
@@ -232,22 +232,22 @@
|
|
|
232
232
|
"required": ["defaultLabel", "labelAllLocales", "permissions"]
|
|
233
233
|
},
|
|
234
234
|
"submenuLinks": {
|
|
235
|
-
"description": "See https://docs.commercetools.com/
|
|
235
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#submenulinks",
|
|
236
236
|
"default": [],
|
|
237
237
|
"type": "array",
|
|
238
238
|
"items": {
|
|
239
239
|
"type": "object",
|
|
240
240
|
"properties": {
|
|
241
241
|
"uriPath": {
|
|
242
|
-
"description": "See https://docs.commercetools.com/
|
|
242
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#submenulinksuripath",
|
|
243
243
|
"type": "string"
|
|
244
244
|
},
|
|
245
245
|
"defaultLabel": {
|
|
246
|
-
"description": "See https://docs.commercetools.com/
|
|
246
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#submenulinksdefaultlabel",
|
|
247
247
|
"type": "string"
|
|
248
248
|
},
|
|
249
249
|
"labelAllLocales": {
|
|
250
|
-
"description": "See https://docs.commercetools.com/
|
|
250
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#submenulinkslabelalllocales",
|
|
251
251
|
"type": "array",
|
|
252
252
|
"default": [],
|
|
253
253
|
"items": {
|
|
@@ -266,7 +266,7 @@
|
|
|
266
266
|
}
|
|
267
267
|
},
|
|
268
268
|
"permissions": {
|
|
269
|
-
"description": "See https://docs.commercetools.com/
|
|
269
|
+
"description": "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#submenulinkspermissions",
|
|
270
270
|
"type": "array",
|
|
271
271
|
"default": [],
|
|
272
272
|
"items": {
|
package/custom-view.schema.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
-
"$id": "https://docs.commercetools.com/
|
|
3
|
+
"$id": "https://docs.commercetools.com/merchant-center-customizations/custom-view.schema.json",
|
|
4
4
|
"title": "JSON schema for Custom View configuration files",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"definitions": {
|
|
@@ -112,11 +112,19 @@ let MissingOrInvalidConfigError = /*#__PURE__*/function (_Error) {
|
|
|
112
112
|
return _createClass(MissingOrInvalidConfigError);
|
|
113
113
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
114
114
|
|
|
115
|
+
function doesFileExist(path) {
|
|
116
|
+
try {
|
|
117
|
+
fs__default["default"].accessSync(path);
|
|
118
|
+
return true;
|
|
119
|
+
} catch (error) {
|
|
120
|
+
return false;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
115
123
|
// Helper function to find the package root path from the current location,
|
|
116
124
|
// for instance in respect to both source files and dist files.
|
|
117
125
|
const findPackageRootPath = dir => {
|
|
118
126
|
const packageJsonPath = path__default["default"].join(dir, 'package.json');
|
|
119
|
-
if (
|
|
127
|
+
if (doesFileExist(packageJsonPath)) {
|
|
120
128
|
return dir;
|
|
121
129
|
}
|
|
122
130
|
const parentDir = path__default["default"].join(dir, '..');
|
|
@@ -265,7 +273,7 @@ const substituteVariablePlaceholders = (config, loadingOptions) => JSON.parse(_J
|
|
|
265
273
|
|
|
266
274
|
var customApplicationSchemaJson = {
|
|
267
275
|
$schema: "http://json-schema.org/draft-07/schema",
|
|
268
|
-
$id: "https://docs.commercetools.com/custom-
|
|
276
|
+
$id: "https://docs.commercetools.com/merchant-center-customizations/custom-application.schema.json",
|
|
269
277
|
title: "JSON schema for Custom Application configuration files",
|
|
270
278
|
type: "object",
|
|
271
279
|
definitions: {
|
|
@@ -279,31 +287,31 @@ var customApplicationSchemaJson = {
|
|
|
279
287
|
},
|
|
280
288
|
properties: {
|
|
281
289
|
name: {
|
|
282
|
-
description: "See https://docs.commercetools.com/
|
|
290
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#name",
|
|
283
291
|
type: "string"
|
|
284
292
|
},
|
|
285
293
|
description: {
|
|
286
|
-
description: "See https://docs.commercetools.com/
|
|
294
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#description",
|
|
287
295
|
type: "string"
|
|
288
296
|
},
|
|
289
297
|
entryPointUriPath: {
|
|
290
|
-
description: "See https://docs.commercetools.com/
|
|
298
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#entrypointuripath",
|
|
291
299
|
type: "string"
|
|
292
300
|
},
|
|
293
301
|
cloudIdentifier: {
|
|
294
|
-
description: "See https://docs.commercetools.com/
|
|
302
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#cloudidentifier",
|
|
295
303
|
type: "string"
|
|
296
304
|
},
|
|
297
305
|
mcApiUrl: {
|
|
298
|
-
description: "See https://docs.commercetools.com/
|
|
306
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#mcapiurl",
|
|
299
307
|
type: "string"
|
|
300
308
|
},
|
|
301
309
|
oAuthScopes: {
|
|
302
|
-
description: "See https://docs.commercetools.com/
|
|
310
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#oauthscopes",
|
|
303
311
|
type: "object",
|
|
304
312
|
properties: {
|
|
305
313
|
view: {
|
|
306
|
-
description: "See https://docs.commercetools.com/
|
|
314
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#oauthscopesview",
|
|
307
315
|
type: "array",
|
|
308
316
|
"default": [
|
|
309
317
|
],
|
|
@@ -314,7 +322,7 @@ var customApplicationSchemaJson = {
|
|
|
314
322
|
uniqueItems: true
|
|
315
323
|
},
|
|
316
324
|
manage: {
|
|
317
|
-
description: "See https://docs.commercetools.com/
|
|
325
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#oauthscopesmanage",
|
|
318
326
|
type: "array",
|
|
319
327
|
"default": [
|
|
320
328
|
],
|
|
@@ -332,7 +340,7 @@ var customApplicationSchemaJson = {
|
|
|
332
340
|
]
|
|
333
341
|
},
|
|
334
342
|
additionalOAuthScopes: {
|
|
335
|
-
description: "See https://docs.commercetools.com/
|
|
343
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#additionaloauthscopes",
|
|
336
344
|
type: "array",
|
|
337
345
|
"default": [
|
|
338
346
|
],
|
|
@@ -341,11 +349,11 @@ var customApplicationSchemaJson = {
|
|
|
341
349
|
type: "object",
|
|
342
350
|
properties: {
|
|
343
351
|
name: {
|
|
344
|
-
description: "See https://docs.commercetools.com/
|
|
352
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#additionaloauthscopesname",
|
|
345
353
|
type: "string"
|
|
346
354
|
},
|
|
347
355
|
view: {
|
|
348
|
-
description: "See https://docs.commercetools.com/
|
|
356
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#additionaloauthscopesview",
|
|
349
357
|
type: "array",
|
|
350
358
|
"default": [
|
|
351
359
|
],
|
|
@@ -356,7 +364,7 @@ var customApplicationSchemaJson = {
|
|
|
356
364
|
uniqueItems: true
|
|
357
365
|
},
|
|
358
366
|
manage: {
|
|
359
|
-
description: "See https://docs.commercetools.com/
|
|
367
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#additionaloauthscopesmanage",
|
|
360
368
|
type: "array",
|
|
361
369
|
"default": [
|
|
362
370
|
],
|
|
@@ -376,14 +384,14 @@ var customApplicationSchemaJson = {
|
|
|
376
384
|
}
|
|
377
385
|
},
|
|
378
386
|
env: {
|
|
379
|
-
description: "See https://docs.commercetools.com/
|
|
387
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#env",
|
|
380
388
|
type: "object",
|
|
381
389
|
properties: {
|
|
382
390
|
development: {
|
|
383
391
|
type: "object",
|
|
384
392
|
properties: {
|
|
385
393
|
initialProjectKey: {
|
|
386
|
-
description: "See https://docs.commercetools.com/
|
|
394
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#envdevelopmentinitialprojectkey",
|
|
387
395
|
type: "string"
|
|
388
396
|
},
|
|
389
397
|
teamId: {
|
|
@@ -399,15 +407,15 @@ var customApplicationSchemaJson = {
|
|
|
399
407
|
type: "object",
|
|
400
408
|
properties: {
|
|
401
409
|
applicationId: {
|
|
402
|
-
description: "See https://docs.commercetools.com/
|
|
410
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#envproductionapplicationid",
|
|
403
411
|
type: "string"
|
|
404
412
|
},
|
|
405
413
|
url: {
|
|
406
|
-
description: "See https://docs.commercetools.com/
|
|
414
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#envproductionurl",
|
|
407
415
|
type: "string"
|
|
408
416
|
},
|
|
409
417
|
cdnUrl: {
|
|
410
|
-
description: "See https://docs.commercetools.com/
|
|
418
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#envproductioncdnurl",
|
|
411
419
|
type: "string"
|
|
412
420
|
}
|
|
413
421
|
},
|
|
@@ -425,15 +433,15 @@ var customApplicationSchemaJson = {
|
|
|
425
433
|
]
|
|
426
434
|
},
|
|
427
435
|
additionalEnv: {
|
|
428
|
-
description: "See https://docs.commercetools.com/
|
|
436
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#additionalenv",
|
|
429
437
|
type: "object"
|
|
430
438
|
},
|
|
431
439
|
headers: {
|
|
432
|
-
description: "See https://docs.commercetools.com/
|
|
440
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#headers",
|
|
433
441
|
type: "object",
|
|
434
442
|
properties: {
|
|
435
443
|
csp: {
|
|
436
|
-
description: "See https://docs.commercetools.com/
|
|
444
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#headerscsp",
|
|
437
445
|
type: "object",
|
|
438
446
|
properties: {
|
|
439
447
|
"connect-src": {
|
|
@@ -461,11 +469,11 @@ var customApplicationSchemaJson = {
|
|
|
461
469
|
]
|
|
462
470
|
},
|
|
463
471
|
permissionsPolicies: {
|
|
464
|
-
description: "See https://docs.commercetools.com/
|
|
472
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#headerspermissionspolicies",
|
|
465
473
|
type: "object"
|
|
466
474
|
},
|
|
467
475
|
strictTransportSecurity: {
|
|
468
|
-
description: "See https://docs.commercetools.com/
|
|
476
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#headersstricttransportsecurity",
|
|
469
477
|
type: "array",
|
|
470
478
|
items: {
|
|
471
479
|
"enum": [
|
|
@@ -479,19 +487,19 @@ var customApplicationSchemaJson = {
|
|
|
479
487
|
additionalProperties: false
|
|
480
488
|
},
|
|
481
489
|
icon: {
|
|
482
|
-
description: "See https://docs.commercetools.com/
|
|
490
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#icon",
|
|
483
491
|
type: "string"
|
|
484
492
|
},
|
|
485
493
|
mainMenuLink: {
|
|
486
|
-
description: "See https://docs.commercetools.com/
|
|
494
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#mainmenulink",
|
|
487
495
|
type: "object",
|
|
488
496
|
properties: {
|
|
489
497
|
defaultLabel: {
|
|
490
|
-
description: "See https://docs.commercetools.com/
|
|
498
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#mainmenulinkdefaultlabel",
|
|
491
499
|
type: "string"
|
|
492
500
|
},
|
|
493
501
|
labelAllLocales: {
|
|
494
|
-
description: "See https://docs.commercetools.com/
|
|
502
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#mainmenulinklabelalllocales",
|
|
495
503
|
type: "array",
|
|
496
504
|
"default": [
|
|
497
505
|
],
|
|
@@ -521,7 +529,7 @@ var customApplicationSchemaJson = {
|
|
|
521
529
|
}
|
|
522
530
|
},
|
|
523
531
|
permissions: {
|
|
524
|
-
description: "See https://docs.commercetools.com/
|
|
532
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#mainmenulinkpermissions",
|
|
525
533
|
type: "array",
|
|
526
534
|
"default": [
|
|
527
535
|
],
|
|
@@ -538,7 +546,7 @@ var customApplicationSchemaJson = {
|
|
|
538
546
|
]
|
|
539
547
|
},
|
|
540
548
|
submenuLinks: {
|
|
541
|
-
description: "See https://docs.commercetools.com/
|
|
549
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#submenulinks",
|
|
542
550
|
"default": [
|
|
543
551
|
],
|
|
544
552
|
type: "array",
|
|
@@ -546,15 +554,15 @@ var customApplicationSchemaJson = {
|
|
|
546
554
|
type: "object",
|
|
547
555
|
properties: {
|
|
548
556
|
uriPath: {
|
|
549
|
-
description: "See https://docs.commercetools.com/
|
|
557
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#submenulinksuripath",
|
|
550
558
|
type: "string"
|
|
551
559
|
},
|
|
552
560
|
defaultLabel: {
|
|
553
|
-
description: "See https://docs.commercetools.com/
|
|
561
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#submenulinksdefaultlabel",
|
|
554
562
|
type: "string"
|
|
555
563
|
},
|
|
556
564
|
labelAllLocales: {
|
|
557
|
-
description: "See https://docs.commercetools.com/
|
|
565
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#submenulinkslabelalllocales",
|
|
558
566
|
type: "array",
|
|
559
567
|
"default": [
|
|
560
568
|
],
|
|
@@ -584,7 +592,7 @@ var customApplicationSchemaJson = {
|
|
|
584
592
|
}
|
|
585
593
|
},
|
|
586
594
|
permissions: {
|
|
587
|
-
description: "See https://docs.commercetools.com/
|
|
595
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#submenulinkspermissions",
|
|
588
596
|
type: "array",
|
|
589
597
|
"default": [
|
|
590
598
|
],
|
|
@@ -618,7 +626,7 @@ var customApplicationSchemaJson = {
|
|
|
618
626
|
|
|
619
627
|
var customViewSchemaJson = {
|
|
620
628
|
$schema: "http://json-schema.org/draft-07/schema",
|
|
621
|
-
$id: "https://docs.commercetools.com/
|
|
629
|
+
$id: "https://docs.commercetools.com/merchant-center-customizations/custom-view.schema.json",
|
|
622
630
|
title: "JSON schema for Custom View configuration files",
|
|
623
631
|
type: "object",
|
|
624
632
|
definitions: {
|
|
@@ -112,11 +112,19 @@ let MissingOrInvalidConfigError = /*#__PURE__*/function (_Error) {
|
|
|
112
112
|
return _createClass(MissingOrInvalidConfigError);
|
|
113
113
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
114
114
|
|
|
115
|
+
function doesFileExist(path) {
|
|
116
|
+
try {
|
|
117
|
+
fs__default["default"].accessSync(path);
|
|
118
|
+
return true;
|
|
119
|
+
} catch (error) {
|
|
120
|
+
return false;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
115
123
|
// Helper function to find the package root path from the current location,
|
|
116
124
|
// for instance in respect to both source files and dist files.
|
|
117
125
|
const findPackageRootPath = dir => {
|
|
118
126
|
const packageJsonPath = path__default["default"].join(dir, 'package.json');
|
|
119
|
-
if (
|
|
127
|
+
if (doesFileExist(packageJsonPath)) {
|
|
120
128
|
return dir;
|
|
121
129
|
}
|
|
122
130
|
const parentDir = path__default["default"].join(dir, '..');
|
|
@@ -265,7 +273,7 @@ const substituteVariablePlaceholders = (config, loadingOptions) => JSON.parse(_J
|
|
|
265
273
|
|
|
266
274
|
var customApplicationSchemaJson = {
|
|
267
275
|
$schema: "http://json-schema.org/draft-07/schema",
|
|
268
|
-
$id: "https://docs.commercetools.com/custom-
|
|
276
|
+
$id: "https://docs.commercetools.com/merchant-center-customizations/custom-application.schema.json",
|
|
269
277
|
title: "JSON schema for Custom Application configuration files",
|
|
270
278
|
type: "object",
|
|
271
279
|
definitions: {
|
|
@@ -279,31 +287,31 @@ var customApplicationSchemaJson = {
|
|
|
279
287
|
},
|
|
280
288
|
properties: {
|
|
281
289
|
name: {
|
|
282
|
-
description: "See https://docs.commercetools.com/
|
|
290
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#name",
|
|
283
291
|
type: "string"
|
|
284
292
|
},
|
|
285
293
|
description: {
|
|
286
|
-
description: "See https://docs.commercetools.com/
|
|
294
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#description",
|
|
287
295
|
type: "string"
|
|
288
296
|
},
|
|
289
297
|
entryPointUriPath: {
|
|
290
|
-
description: "See https://docs.commercetools.com/
|
|
298
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#entrypointuripath",
|
|
291
299
|
type: "string"
|
|
292
300
|
},
|
|
293
301
|
cloudIdentifier: {
|
|
294
|
-
description: "See https://docs.commercetools.com/
|
|
302
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#cloudidentifier",
|
|
295
303
|
type: "string"
|
|
296
304
|
},
|
|
297
305
|
mcApiUrl: {
|
|
298
|
-
description: "See https://docs.commercetools.com/
|
|
306
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#mcapiurl",
|
|
299
307
|
type: "string"
|
|
300
308
|
},
|
|
301
309
|
oAuthScopes: {
|
|
302
|
-
description: "See https://docs.commercetools.com/
|
|
310
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#oauthscopes",
|
|
303
311
|
type: "object",
|
|
304
312
|
properties: {
|
|
305
313
|
view: {
|
|
306
|
-
description: "See https://docs.commercetools.com/
|
|
314
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#oauthscopesview",
|
|
307
315
|
type: "array",
|
|
308
316
|
"default": [
|
|
309
317
|
],
|
|
@@ -314,7 +322,7 @@ var customApplicationSchemaJson = {
|
|
|
314
322
|
uniqueItems: true
|
|
315
323
|
},
|
|
316
324
|
manage: {
|
|
317
|
-
description: "See https://docs.commercetools.com/
|
|
325
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#oauthscopesmanage",
|
|
318
326
|
type: "array",
|
|
319
327
|
"default": [
|
|
320
328
|
],
|
|
@@ -332,7 +340,7 @@ var customApplicationSchemaJson = {
|
|
|
332
340
|
]
|
|
333
341
|
},
|
|
334
342
|
additionalOAuthScopes: {
|
|
335
|
-
description: "See https://docs.commercetools.com/
|
|
343
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#additionaloauthscopes",
|
|
336
344
|
type: "array",
|
|
337
345
|
"default": [
|
|
338
346
|
],
|
|
@@ -341,11 +349,11 @@ var customApplicationSchemaJson = {
|
|
|
341
349
|
type: "object",
|
|
342
350
|
properties: {
|
|
343
351
|
name: {
|
|
344
|
-
description: "See https://docs.commercetools.com/
|
|
352
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#additionaloauthscopesname",
|
|
345
353
|
type: "string"
|
|
346
354
|
},
|
|
347
355
|
view: {
|
|
348
|
-
description: "See https://docs.commercetools.com/
|
|
356
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#additionaloauthscopesview",
|
|
349
357
|
type: "array",
|
|
350
358
|
"default": [
|
|
351
359
|
],
|
|
@@ -356,7 +364,7 @@ var customApplicationSchemaJson = {
|
|
|
356
364
|
uniqueItems: true
|
|
357
365
|
},
|
|
358
366
|
manage: {
|
|
359
|
-
description: "See https://docs.commercetools.com/
|
|
367
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#additionaloauthscopesmanage",
|
|
360
368
|
type: "array",
|
|
361
369
|
"default": [
|
|
362
370
|
],
|
|
@@ -376,14 +384,14 @@ var customApplicationSchemaJson = {
|
|
|
376
384
|
}
|
|
377
385
|
},
|
|
378
386
|
env: {
|
|
379
|
-
description: "See https://docs.commercetools.com/
|
|
387
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#env",
|
|
380
388
|
type: "object",
|
|
381
389
|
properties: {
|
|
382
390
|
development: {
|
|
383
391
|
type: "object",
|
|
384
392
|
properties: {
|
|
385
393
|
initialProjectKey: {
|
|
386
|
-
description: "See https://docs.commercetools.com/
|
|
394
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#envdevelopmentinitialprojectkey",
|
|
387
395
|
type: "string"
|
|
388
396
|
},
|
|
389
397
|
teamId: {
|
|
@@ -399,15 +407,15 @@ var customApplicationSchemaJson = {
|
|
|
399
407
|
type: "object",
|
|
400
408
|
properties: {
|
|
401
409
|
applicationId: {
|
|
402
|
-
description: "See https://docs.commercetools.com/
|
|
410
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#envproductionapplicationid",
|
|
403
411
|
type: "string"
|
|
404
412
|
},
|
|
405
413
|
url: {
|
|
406
|
-
description: "See https://docs.commercetools.com/
|
|
414
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#envproductionurl",
|
|
407
415
|
type: "string"
|
|
408
416
|
},
|
|
409
417
|
cdnUrl: {
|
|
410
|
-
description: "See https://docs.commercetools.com/
|
|
418
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#envproductioncdnurl",
|
|
411
419
|
type: "string"
|
|
412
420
|
}
|
|
413
421
|
},
|
|
@@ -425,15 +433,15 @@ var customApplicationSchemaJson = {
|
|
|
425
433
|
]
|
|
426
434
|
},
|
|
427
435
|
additionalEnv: {
|
|
428
|
-
description: "See https://docs.commercetools.com/
|
|
436
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#additionalenv",
|
|
429
437
|
type: "object"
|
|
430
438
|
},
|
|
431
439
|
headers: {
|
|
432
|
-
description: "See https://docs.commercetools.com/
|
|
440
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#headers",
|
|
433
441
|
type: "object",
|
|
434
442
|
properties: {
|
|
435
443
|
csp: {
|
|
436
|
-
description: "See https://docs.commercetools.com/
|
|
444
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#headerscsp",
|
|
437
445
|
type: "object",
|
|
438
446
|
properties: {
|
|
439
447
|
"connect-src": {
|
|
@@ -461,11 +469,11 @@ var customApplicationSchemaJson = {
|
|
|
461
469
|
]
|
|
462
470
|
},
|
|
463
471
|
permissionsPolicies: {
|
|
464
|
-
description: "See https://docs.commercetools.com/
|
|
472
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#headerspermissionspolicies",
|
|
465
473
|
type: "object"
|
|
466
474
|
},
|
|
467
475
|
strictTransportSecurity: {
|
|
468
|
-
description: "See https://docs.commercetools.com/
|
|
476
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#headersstricttransportsecurity",
|
|
469
477
|
type: "array",
|
|
470
478
|
items: {
|
|
471
479
|
"enum": [
|
|
@@ -479,19 +487,19 @@ var customApplicationSchemaJson = {
|
|
|
479
487
|
additionalProperties: false
|
|
480
488
|
},
|
|
481
489
|
icon: {
|
|
482
|
-
description: "See https://docs.commercetools.com/
|
|
490
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#icon",
|
|
483
491
|
type: "string"
|
|
484
492
|
},
|
|
485
493
|
mainMenuLink: {
|
|
486
|
-
description: "See https://docs.commercetools.com/
|
|
494
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#mainmenulink",
|
|
487
495
|
type: "object",
|
|
488
496
|
properties: {
|
|
489
497
|
defaultLabel: {
|
|
490
|
-
description: "See https://docs.commercetools.com/
|
|
498
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#mainmenulinkdefaultlabel",
|
|
491
499
|
type: "string"
|
|
492
500
|
},
|
|
493
501
|
labelAllLocales: {
|
|
494
|
-
description: "See https://docs.commercetools.com/
|
|
502
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#mainmenulinklabelalllocales",
|
|
495
503
|
type: "array",
|
|
496
504
|
"default": [
|
|
497
505
|
],
|
|
@@ -521,7 +529,7 @@ var customApplicationSchemaJson = {
|
|
|
521
529
|
}
|
|
522
530
|
},
|
|
523
531
|
permissions: {
|
|
524
|
-
description: "See https://docs.commercetools.com/
|
|
532
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#mainmenulinkpermissions",
|
|
525
533
|
type: "array",
|
|
526
534
|
"default": [
|
|
527
535
|
],
|
|
@@ -538,7 +546,7 @@ var customApplicationSchemaJson = {
|
|
|
538
546
|
]
|
|
539
547
|
},
|
|
540
548
|
submenuLinks: {
|
|
541
|
-
description: "See https://docs.commercetools.com/
|
|
549
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#submenulinks",
|
|
542
550
|
"default": [
|
|
543
551
|
],
|
|
544
552
|
type: "array",
|
|
@@ -546,15 +554,15 @@ var customApplicationSchemaJson = {
|
|
|
546
554
|
type: "object",
|
|
547
555
|
properties: {
|
|
548
556
|
uriPath: {
|
|
549
|
-
description: "See https://docs.commercetools.com/
|
|
557
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#submenulinksuripath",
|
|
550
558
|
type: "string"
|
|
551
559
|
},
|
|
552
560
|
defaultLabel: {
|
|
553
|
-
description: "See https://docs.commercetools.com/
|
|
561
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#submenulinksdefaultlabel",
|
|
554
562
|
type: "string"
|
|
555
563
|
},
|
|
556
564
|
labelAllLocales: {
|
|
557
|
-
description: "See https://docs.commercetools.com/
|
|
565
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#submenulinkslabelalllocales",
|
|
558
566
|
type: "array",
|
|
559
567
|
"default": [
|
|
560
568
|
],
|
|
@@ -584,7 +592,7 @@ var customApplicationSchemaJson = {
|
|
|
584
592
|
}
|
|
585
593
|
},
|
|
586
594
|
permissions: {
|
|
587
|
-
description: "See https://docs.commercetools.com/
|
|
595
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#submenulinkspermissions",
|
|
588
596
|
type: "array",
|
|
589
597
|
"default": [
|
|
590
598
|
],
|
|
@@ -618,7 +626,7 @@ var customApplicationSchemaJson = {
|
|
|
618
626
|
|
|
619
627
|
var customViewSchemaJson = {
|
|
620
628
|
$schema: "http://json-schema.org/draft-07/schema",
|
|
621
|
-
$id: "https://docs.commercetools.com/
|
|
629
|
+
$id: "https://docs.commercetools.com/merchant-center-customizations/custom-view.schema.json",
|
|
622
630
|
title: "JSON schema for Custom View configuration files",
|
|
623
631
|
type: "object",
|
|
624
632
|
definitions: {
|
|
@@ -80,11 +80,19 @@ let MissingOrInvalidConfigError = /*#__PURE__*/function (_Error) {
|
|
|
80
80
|
return _createClass(MissingOrInvalidConfigError);
|
|
81
81
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
82
82
|
|
|
83
|
+
function doesFileExist(path) {
|
|
84
|
+
try {
|
|
85
|
+
fs.accessSync(path);
|
|
86
|
+
return true;
|
|
87
|
+
} catch (error) {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
83
91
|
// Helper function to find the package root path from the current location,
|
|
84
92
|
// for instance in respect to both source files and dist files.
|
|
85
93
|
const findPackageRootPath = dir => {
|
|
86
94
|
const packageJsonPath = path.join(dir, 'package.json');
|
|
87
|
-
if (
|
|
95
|
+
if (doesFileExist(packageJsonPath)) {
|
|
88
96
|
return dir;
|
|
89
97
|
}
|
|
90
98
|
const parentDir = path.join(dir, '..');
|
|
@@ -233,7 +241,7 @@ const substituteVariablePlaceholders = (config, loadingOptions) => JSON.parse(_J
|
|
|
233
241
|
|
|
234
242
|
var customApplicationSchemaJson = {
|
|
235
243
|
$schema: "http://json-schema.org/draft-07/schema",
|
|
236
|
-
$id: "https://docs.commercetools.com/custom-
|
|
244
|
+
$id: "https://docs.commercetools.com/merchant-center-customizations/custom-application.schema.json",
|
|
237
245
|
title: "JSON schema for Custom Application configuration files",
|
|
238
246
|
type: "object",
|
|
239
247
|
definitions: {
|
|
@@ -247,31 +255,31 @@ var customApplicationSchemaJson = {
|
|
|
247
255
|
},
|
|
248
256
|
properties: {
|
|
249
257
|
name: {
|
|
250
|
-
description: "See https://docs.commercetools.com/
|
|
258
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#name",
|
|
251
259
|
type: "string"
|
|
252
260
|
},
|
|
253
261
|
description: {
|
|
254
|
-
description: "See https://docs.commercetools.com/
|
|
262
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#description",
|
|
255
263
|
type: "string"
|
|
256
264
|
},
|
|
257
265
|
entryPointUriPath: {
|
|
258
|
-
description: "See https://docs.commercetools.com/
|
|
266
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#entrypointuripath",
|
|
259
267
|
type: "string"
|
|
260
268
|
},
|
|
261
269
|
cloudIdentifier: {
|
|
262
|
-
description: "See https://docs.commercetools.com/
|
|
270
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#cloudidentifier",
|
|
263
271
|
type: "string"
|
|
264
272
|
},
|
|
265
273
|
mcApiUrl: {
|
|
266
|
-
description: "See https://docs.commercetools.com/
|
|
274
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#mcapiurl",
|
|
267
275
|
type: "string"
|
|
268
276
|
},
|
|
269
277
|
oAuthScopes: {
|
|
270
|
-
description: "See https://docs.commercetools.com/
|
|
278
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#oauthscopes",
|
|
271
279
|
type: "object",
|
|
272
280
|
properties: {
|
|
273
281
|
view: {
|
|
274
|
-
description: "See https://docs.commercetools.com/
|
|
282
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#oauthscopesview",
|
|
275
283
|
type: "array",
|
|
276
284
|
"default": [
|
|
277
285
|
],
|
|
@@ -282,7 +290,7 @@ var customApplicationSchemaJson = {
|
|
|
282
290
|
uniqueItems: true
|
|
283
291
|
},
|
|
284
292
|
manage: {
|
|
285
|
-
description: "See https://docs.commercetools.com/
|
|
293
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#oauthscopesmanage",
|
|
286
294
|
type: "array",
|
|
287
295
|
"default": [
|
|
288
296
|
],
|
|
@@ -300,7 +308,7 @@ var customApplicationSchemaJson = {
|
|
|
300
308
|
]
|
|
301
309
|
},
|
|
302
310
|
additionalOAuthScopes: {
|
|
303
|
-
description: "See https://docs.commercetools.com/
|
|
311
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#additionaloauthscopes",
|
|
304
312
|
type: "array",
|
|
305
313
|
"default": [
|
|
306
314
|
],
|
|
@@ -309,11 +317,11 @@ var customApplicationSchemaJson = {
|
|
|
309
317
|
type: "object",
|
|
310
318
|
properties: {
|
|
311
319
|
name: {
|
|
312
|
-
description: "See https://docs.commercetools.com/
|
|
320
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#additionaloauthscopesname",
|
|
313
321
|
type: "string"
|
|
314
322
|
},
|
|
315
323
|
view: {
|
|
316
|
-
description: "See https://docs.commercetools.com/
|
|
324
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#additionaloauthscopesview",
|
|
317
325
|
type: "array",
|
|
318
326
|
"default": [
|
|
319
327
|
],
|
|
@@ -324,7 +332,7 @@ var customApplicationSchemaJson = {
|
|
|
324
332
|
uniqueItems: true
|
|
325
333
|
},
|
|
326
334
|
manage: {
|
|
327
|
-
description: "See https://docs.commercetools.com/
|
|
335
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#additionaloauthscopesmanage",
|
|
328
336
|
type: "array",
|
|
329
337
|
"default": [
|
|
330
338
|
],
|
|
@@ -344,14 +352,14 @@ var customApplicationSchemaJson = {
|
|
|
344
352
|
}
|
|
345
353
|
},
|
|
346
354
|
env: {
|
|
347
|
-
description: "See https://docs.commercetools.com/
|
|
355
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#env",
|
|
348
356
|
type: "object",
|
|
349
357
|
properties: {
|
|
350
358
|
development: {
|
|
351
359
|
type: "object",
|
|
352
360
|
properties: {
|
|
353
361
|
initialProjectKey: {
|
|
354
|
-
description: "See https://docs.commercetools.com/
|
|
362
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#envdevelopmentinitialprojectkey",
|
|
355
363
|
type: "string"
|
|
356
364
|
},
|
|
357
365
|
teamId: {
|
|
@@ -367,15 +375,15 @@ var customApplicationSchemaJson = {
|
|
|
367
375
|
type: "object",
|
|
368
376
|
properties: {
|
|
369
377
|
applicationId: {
|
|
370
|
-
description: "See https://docs.commercetools.com/
|
|
378
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#envproductionapplicationid",
|
|
371
379
|
type: "string"
|
|
372
380
|
},
|
|
373
381
|
url: {
|
|
374
|
-
description: "See https://docs.commercetools.com/
|
|
382
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#envproductionurl",
|
|
375
383
|
type: "string"
|
|
376
384
|
},
|
|
377
385
|
cdnUrl: {
|
|
378
|
-
description: "See https://docs.commercetools.com/
|
|
386
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#envproductioncdnurl",
|
|
379
387
|
type: "string"
|
|
380
388
|
}
|
|
381
389
|
},
|
|
@@ -393,15 +401,15 @@ var customApplicationSchemaJson = {
|
|
|
393
401
|
]
|
|
394
402
|
},
|
|
395
403
|
additionalEnv: {
|
|
396
|
-
description: "See https://docs.commercetools.com/
|
|
404
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#additionalenv",
|
|
397
405
|
type: "object"
|
|
398
406
|
},
|
|
399
407
|
headers: {
|
|
400
|
-
description: "See https://docs.commercetools.com/
|
|
408
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#headers",
|
|
401
409
|
type: "object",
|
|
402
410
|
properties: {
|
|
403
411
|
csp: {
|
|
404
|
-
description: "See https://docs.commercetools.com/
|
|
412
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#headerscsp",
|
|
405
413
|
type: "object",
|
|
406
414
|
properties: {
|
|
407
415
|
"connect-src": {
|
|
@@ -429,11 +437,11 @@ var customApplicationSchemaJson = {
|
|
|
429
437
|
]
|
|
430
438
|
},
|
|
431
439
|
permissionsPolicies: {
|
|
432
|
-
description: "See https://docs.commercetools.com/
|
|
440
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#headerspermissionspolicies",
|
|
433
441
|
type: "object"
|
|
434
442
|
},
|
|
435
443
|
strictTransportSecurity: {
|
|
436
|
-
description: "See https://docs.commercetools.com/
|
|
444
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#headersstricttransportsecurity",
|
|
437
445
|
type: "array",
|
|
438
446
|
items: {
|
|
439
447
|
"enum": [
|
|
@@ -447,19 +455,19 @@ var customApplicationSchemaJson = {
|
|
|
447
455
|
additionalProperties: false
|
|
448
456
|
},
|
|
449
457
|
icon: {
|
|
450
|
-
description: "See https://docs.commercetools.com/
|
|
458
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#icon",
|
|
451
459
|
type: "string"
|
|
452
460
|
},
|
|
453
461
|
mainMenuLink: {
|
|
454
|
-
description: "See https://docs.commercetools.com/
|
|
462
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#mainmenulink",
|
|
455
463
|
type: "object",
|
|
456
464
|
properties: {
|
|
457
465
|
defaultLabel: {
|
|
458
|
-
description: "See https://docs.commercetools.com/
|
|
466
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#mainmenulinkdefaultlabel",
|
|
459
467
|
type: "string"
|
|
460
468
|
},
|
|
461
469
|
labelAllLocales: {
|
|
462
|
-
description: "See https://docs.commercetools.com/
|
|
470
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#mainmenulinklabelalllocales",
|
|
463
471
|
type: "array",
|
|
464
472
|
"default": [
|
|
465
473
|
],
|
|
@@ -489,7 +497,7 @@ var customApplicationSchemaJson = {
|
|
|
489
497
|
}
|
|
490
498
|
},
|
|
491
499
|
permissions: {
|
|
492
|
-
description: "See https://docs.commercetools.com/
|
|
500
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#mainmenulinkpermissions",
|
|
493
501
|
type: "array",
|
|
494
502
|
"default": [
|
|
495
503
|
],
|
|
@@ -506,7 +514,7 @@ var customApplicationSchemaJson = {
|
|
|
506
514
|
]
|
|
507
515
|
},
|
|
508
516
|
submenuLinks: {
|
|
509
|
-
description: "See https://docs.commercetools.com/
|
|
517
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#submenulinks",
|
|
510
518
|
"default": [
|
|
511
519
|
],
|
|
512
520
|
type: "array",
|
|
@@ -514,15 +522,15 @@ var customApplicationSchemaJson = {
|
|
|
514
522
|
type: "object",
|
|
515
523
|
properties: {
|
|
516
524
|
uriPath: {
|
|
517
|
-
description: "See https://docs.commercetools.com/
|
|
525
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#submenulinksuripath",
|
|
518
526
|
type: "string"
|
|
519
527
|
},
|
|
520
528
|
defaultLabel: {
|
|
521
|
-
description: "See https://docs.commercetools.com/
|
|
529
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#submenulinksdefaultlabel",
|
|
522
530
|
type: "string"
|
|
523
531
|
},
|
|
524
532
|
labelAllLocales: {
|
|
525
|
-
description: "See https://docs.commercetools.com/
|
|
533
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#submenulinkslabelalllocales",
|
|
526
534
|
type: "array",
|
|
527
535
|
"default": [
|
|
528
536
|
],
|
|
@@ -552,7 +560,7 @@ var customApplicationSchemaJson = {
|
|
|
552
560
|
}
|
|
553
561
|
},
|
|
554
562
|
permissions: {
|
|
555
|
-
description: "See https://docs.commercetools.com/
|
|
563
|
+
description: "See https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config#submenulinkspermissions",
|
|
556
564
|
type: "array",
|
|
557
565
|
"default": [
|
|
558
566
|
],
|
|
@@ -586,7 +594,7 @@ var customApplicationSchemaJson = {
|
|
|
586
594
|
|
|
587
595
|
var customViewSchemaJson = {
|
|
588
596
|
$schema: "http://json-schema.org/draft-07/schema",
|
|
589
|
-
$id: "https://docs.commercetools.com/
|
|
597
|
+
$id: "https://docs.commercetools.com/merchant-center-customizations/custom-view.schema.json",
|
|
590
598
|
title: "JSON schema for Custom View configuration files",
|
|
591
599
|
type: "object",
|
|
592
600
|
definitions: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/application-config",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.25.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": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"url": "https://github.com/commercetools/merchant-center-application-kit.git",
|
|
9
9
|
"directory": "packages/application-config"
|
|
10
10
|
},
|
|
11
|
-
"homepage": "https://docs.commercetools.com/
|
|
11
|
+
"homepage": "https://docs.commercetools.com/merchant-center-customizations/api-reference/custom-application-config",
|
|
12
12
|
"keywords": [
|
|
13
13
|
"javascript",
|
|
14
14
|
"frontend",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"@babel/register": "^7.22.15",
|
|
46
46
|
"@babel/runtime": "^7.22.15",
|
|
47
47
|
"@babel/runtime-corejs3": "^7.22.15",
|
|
48
|
-
"@commercetools-frontend/babel-preset-mc-app": "22.
|
|
49
|
-
"@commercetools-frontend/constants": "22.
|
|
48
|
+
"@commercetools-frontend/babel-preset-mc-app": "22.25.0",
|
|
49
|
+
"@commercetools-frontend/constants": "22.25.0",
|
|
50
50
|
"@types/dompurify": "^2.4.0",
|
|
51
51
|
"@types/lodash": "^4.14.198",
|
|
52
52
|
"@types/react": "^17.0.56",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@types/jsdom": "^21.1.2",
|
|
63
63
|
"json-schema-to-typescript": "13.1.2",
|
|
64
64
|
"shelljs": "0.8.5",
|
|
65
|
-
"@commercetools-frontend/assets": "22.
|
|
65
|
+
"@commercetools-frontend/assets": "22.25.0"
|
|
66
66
|
},
|
|
67
67
|
"engines": {
|
|
68
68
|
"node": "16.x || >=18.0.0"
|