Skip to content

Commit 6540ad1

Browse files
committed
Merge pull request #1305 from ParsePlatform/flovilmart.emailAdapterConfig
Adds more options when using CLI/config
2 parents dbf64a6 + b5625bc commit 6540ad1

File tree

1 file changed

+82
-25
lines changed

1 file changed

+82
-25
lines changed

src/cli/cli-definitions.js

+82-25
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
export default {
2-
"appId": {
2+
"appId": {
33
env: "PARSE_SERVER_APPLICATION_ID",
44
help: "Your Parse Application ID",
55
required: true
66
},
7-
"masterKey": {
7+
"masterKey": {
88
env: "PARSE_SERVER_MASTER_KEY",
99
help: "Your Parse Master Key",
1010
required: true
@@ -21,53 +21,63 @@ export default {
2121
return opt;
2222
}
2323
},
24-
"databaseURI": {
24+
"databaseURI": {
2525
env: "PARSE_SERVER_DATABASE_URI",
2626
help: "The full URI to your mongodb database"
2727
},
28-
"serverURL": {
28+
"serverURL": {
2929
env: "PARSE_SERVER_URL",
3030
help: "URL to your parse server with http:// or https://.",
3131
},
32-
"clientKey": {
32+
"publicServerURL": {
33+
env: "PARSE_PUBLIC_SERVER_URL",
34+
help: "Public URL to your parse server with http:// or https://.",
35+
},
36+
"clientKey": {
3337
env: "PARSE_SERVER_CLIENT_KEY",
3438
help: "Key for iOS, MacOS, tvOS clients"
3539
},
36-
"javascriptKey": {
40+
"javascriptKey": {
3741
env: "PARSE_SERVER_JAVASCRIPT_KEY",
3842
help: "Key for the Javascript SDK"
39-
},
40-
"restAPIKey": {
43+
},
44+
"restAPIKey": {
4145
env: "PARSE_SERVER_REST_API_KEY",
4246
help: "Key for REST calls"
43-
},
44-
"dotNetKey": {
47+
},
48+
"dotNetKey": {
4549
env: "PARSE_SERVER_DOT_NET_KEY",
4650
help: "Key for Unity and .Net SDK"
47-
},
48-
"cloud": {
51+
},
52+
"cloud": {
4953
env: "PARSE_SERVER_CLOUD_CODE_MAIN",
5054
help: "Full path to your cloud code main.js"
51-
},
55+
},
5256
"push": {
5357
env: "PARSE_SERVER_PUSH",
5458
help: "Configuration for push, as stringified JSON. See https://github.com/ParsePlatform/parse-server/wiki/Push",
5559
action: function(opt) {
60+
if (typeof opt == 'object') {
61+
return opt;
62+
}
5663
return JSON.parse(opt)
5764
}
5865
},
59-
"oauth": {
66+
"oauth": {
6067
env: "PARSE_SERVER_OAUTH_PROVIDERS",
6168
help: "Configuration for your oAuth providers, as stringified JSON. See https://github.com/ParsePlatform/parse-server/wiki/Parse-Server-Guide#oauth",
6269
action: function(opt) {
70+
if (typeof opt == 'object') {
71+
return opt;
72+
}
6373
return JSON.parse(opt)
6474
}
6575
},
66-
"fileKey": {
76+
"fileKey": {
6777
env: "PARSE_SERVER_FILE_KEY",
6878
help: "Key for your files",
69-
},
70-
"facebookAppIds": {
79+
},
80+
"facebookAppIds": {
7181
env: "PARSE_SERVER_FACEBOOK_APP_IDS",
7282
help: "Comma separated list for your facebook app Ids",
7383
type: "list",
@@ -81,7 +91,7 @@ export default {
8191
action: function(opt) {
8292
if (opt == "true" || opt == "1") {
8393
return true;
84-
}
94+
}
8595
return false;
8696
}
8797
},
@@ -95,22 +105,69 @@ export default {
95105
return false;
96106
}
97107
},
98-
"mountPath": {
108+
"mountPath": {
99109
env: "PARSE_SERVER_MOUNT_PATH",
100110
help: "Mount path for the server, defaults to /parse",
101111
default: "/parse"
102112
},
103-
"databaseAdapter": {
104-
env: "PARSE_SERVER_DATABASE_ADAPTER",
105-
help: "Adapter module for the database sub-system"
106-
},
107113
"filesAdapter": {
108114
env: "PARSE_SERVER_FILES_ADAPTER",
109-
help: "Adapter module for the files sub-system"
115+
help: "Adapter module for the files sub-system",
116+
action: function action(opt) {
117+
if (typeof opt == 'object') {
118+
return opt;
119+
}
120+
try {
121+
return JSON.parse(opt);
122+
} catch(e) {}
123+
return opt;
124+
}
125+
},
126+
"emailAdapter": {
127+
env: "PARSE_SERVER_EMAIL_ADAPTER",
128+
help: "Adapter module for the email sending",
129+
action: function action(opt) {
130+
if (typeof opt == 'object') {
131+
return opt;
132+
}
133+
try {
134+
return JSON.parse(opt);
135+
} catch(e) {}
136+
return opt;
137+
}
110138
},
111139
"loggerAdapter": {
112140
env: "PARSE_SERVER_LOGGER_ADAPTER",
113-
help: "Adapter module for the logging sub-system"
141+
help: "Adapter module for the logging sub-system",
142+
action: function action(opt) {
143+
if (typeof opt == 'object') {
144+
return opt;
145+
}
146+
try {
147+
return JSON.parse(opt);
148+
} catch(e) {}
149+
return opt;
150+
}
151+
},
152+
"liveQuery": {
153+
env: "PARSE_SERVER_LIVE_QUERY_OPTIONS",
154+
help: "liveQuery options",
155+
action: function action(opt) {
156+
if (typeof opt == 'object') {
157+
return opt;
158+
}
159+
return JSON.parse(opt);
160+
}
161+
},
162+
"customPages": {
163+
env: "PARSE_SERVER_CUSTOM_PAGES",
164+
help: "custom pages for pasword validation and reset",
165+
action: function action(opt) {
166+
if (typeof opt == 'object') {
167+
return opt;
168+
}
169+
return JSON.parse(opt);
170+
}
114171
},
115172
"maxUploadSize": {
116173
env: "PARSE_SERVER_MAX_UPLOAD_SIZE",

0 commit comments

Comments
 (0)