-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathcustom-application-config.mjs
93 lines (89 loc) · 2.28 KB
/
custom-application-config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import { PERMISSIONS, entryPointUriPath } from './src/constants';
const name = 'AppKit Playground Application';
const productionUrl = process.env.VERCEL_ENV !== 'production' && Boolean(process.env.VERCEL_URL) ?
`https://${process.env.VERCEL_URL}` :
process.env.APP_URL;
/**
* @type {import('@commercetools-frontend/application-config').ConfigOptionsForCustomApplication}
*/
const config = {
name,
entryPointUriPath,
cloudIdentifier: '${env:CLOUD_IDENTIFIER}',
mcApiUrl: '${env:MC_API_URL}',
oAuthScopes: {
view: ['view_orders', 'view_states', 'view_products'],
manage: [],
},
env: {
development: {
initialProjectKey: '${env:CTP_INITIAL_PROJECT_KEY}',
},
production: {
applicationId: '${env:APP_ID}',
url: productionUrl,
},
},
additionalEnv: {
trackingSentry:
'https://327619347ab84c8e9702a1dc16460198@o32365.ingest.sentry.io/1549825',
echoServerApiUrl: '${env:ECHO_SERVER_URL}',
ldClientSideId: '${env:LD_CLIENT_ID_STAGING}',
},
headers: {
csp: {
'connect-src': ['${env:HOST_GCP_STAGING}'],
},
},
icon: '${path:@commercetools-frontend/assets/application-icons/rocket.svg}',
mainMenuLink: {
defaultLabel: '${intl:en:Menu.StateMachines}',
labelAllLocales: [
{
locale: 'en',
value: '${intl:en:Menu.StateMachines}',
},
{
locale: 'de',
value: '${intl:de:Menu.StateMachines}',
},
],
permissions: [PERMISSIONS.View],
},
submenuLinks: [
{
uriPath: 'notifications',
permissions: [PERMISSIONS.View],
defaultLabel: 'Notifications',
labelAllLocales: [],
},
{
uriPath: 'echo-server',
permissions: [PERMISSIONS.View],
defaultLabel: '${intl:en:Menu.EchoServer}',
labelAllLocales: [
{
locale: 'en',
value: '${intl:en:Menu.EchoServer}',
},
{
locale: 'de',
value: '${intl:de:Menu.EchoServer}',
},
],
},
{
uriPath: 'formatters',
permissions: [PERMISSIONS.View],
defaultLabel: 'Formatters',
labelAllLocales: [],
},
{
uriPath: 'custom-panel',
permissions: [PERMISSIONS.View],
defaultLabel: 'Custom Panel',
labelAllLocales: [],
},
],
};
export default config;