parse-dashboard 5.2.0-alpha.26 → 5.2.0-alpha.28
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.
|
@@ -27,18 +27,18 @@ module.exports = (options) => {
|
|
|
27
27
|
process.exit(-1);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
const explicitConfigFileProvided = !!options.config;
|
|
31
31
|
let configFile = null;
|
|
32
32
|
let configFromCLI = null;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
const configServerURL = options.serverURL || process.env.PARSE_DASHBOARD_SERVER_URL;
|
|
34
|
+
const configGraphQLServerURL = options.graphQLServerURL || process.env.PARSE_DASHBOARD_GRAPHQL_SERVER_URL;
|
|
35
|
+
const configMasterKey = options.masterKey || process.env.PARSE_DASHBOARD_MASTER_KEY;
|
|
36
|
+
const configAppId = options.appId || process.env.PARSE_DASHBOARD_APP_ID;
|
|
37
|
+
const configAppName = options.appName || process.env.PARSE_DASHBOARD_APP_NAME;
|
|
38
|
+
const configUserId = options.userId || process.env.PARSE_DASHBOARD_USER_ID;
|
|
39
|
+
const configUserPassword = options.userPassword || process.env.PARSE_DASHBOARD_USER_PASSWORD;
|
|
40
|
+
const configSSLKey = options.sslKey || process.env.PARSE_DASHBOARD_SSL_KEY;
|
|
41
|
+
const configSSLCert = options.sslCert || process.env.PARSE_DASHBOARD_SSL_CERT;
|
|
42
42
|
|
|
43
43
|
function handleSIGs(server) {
|
|
44
44
|
const signals = {
|
|
@@ -143,10 +143,10 @@ module.exports = (options) => {
|
|
|
143
143
|
|
|
144
144
|
const app = express();
|
|
145
145
|
|
|
146
|
-
if (allowInsecureHTTP || trustProxy || dev) app.enable('trust proxy');
|
|
146
|
+
if (allowInsecureHTTP || trustProxy || dev) {app.enable('trust proxy');}
|
|
147
147
|
|
|
148
148
|
config.data.trustProxy = trustProxy;
|
|
149
|
-
|
|
149
|
+
const dashboardOptions = { allowInsecureHTTP, cookieSessionSecret, dev, cookieSessionMaxAge };
|
|
150
150
|
app.use(mountPath, parseDashboard(config.data, dashboardOptions));
|
|
151
151
|
let server;
|
|
152
152
|
if(!configSSLKey || !configSSLCert){
|
|
@@ -156,8 +156,8 @@ module.exports = (options) => {
|
|
|
156
156
|
});
|
|
157
157
|
} else {
|
|
158
158
|
// Start the server using SSL.
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
const privateKey = fs.readFileSync(configSSLKey);
|
|
160
|
+
const certificate = fs.readFileSync(configSSLCert);
|
|
161
161
|
|
|
162
162
|
server = require('https').createServer({
|
|
163
163
|
key: privateKey,
|
package/README.md
CHANGED
|
@@ -540,6 +540,24 @@ var dashboard = new ParseDashboard({
|
|
|
540
540
|
});
|
|
541
541
|
```
|
|
542
542
|
|
|
543
|
+
## Security Checks
|
|
544
|
+
|
|
545
|
+
You can view the security status of your Parse Server by enabling the dashboard option `enableSecurityChecks`, and visiting App Settings > Security.
|
|
546
|
+
|
|
547
|
+
```javascript
|
|
548
|
+
const dashboard = new ParseDashboard({
|
|
549
|
+
"apps": [
|
|
550
|
+
{
|
|
551
|
+
"serverURL": "http://localhost:1337/parse",
|
|
552
|
+
"appId": "myAppId",
|
|
553
|
+
"masterKey": "myMasterKey",
|
|
554
|
+
"appName": "MyApp"
|
|
555
|
+
"enableSecurityChecks": true
|
|
556
|
+
}
|
|
557
|
+
],
|
|
558
|
+
});
|
|
559
|
+
```
|
|
560
|
+
|
|
543
561
|
|
|
544
562
|
|
|
545
563
|
### Configuring Basic Authentication
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "parse-dashboard",
|
|
3
|
-
"version": "5.2.0-alpha.
|
|
3
|
+
"version": "5.2.0-alpha.28",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/ParsePlatform/parse-dashboard"
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"react-popper-tooltip": "4.4.2",
|
|
71
71
|
"react-router-dom": "6.4.1",
|
|
72
72
|
"regenerator-runtime": "0.13.11",
|
|
73
|
-
"semver": "7.
|
|
73
|
+
"semver": "7.5.2",
|
|
74
74
|
"typescript": "4.8.3"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
@@ -96,11 +96,13 @@
|
|
|
96
96
|
"eslint-plugin-jest": "27.0.4",
|
|
97
97
|
"eslint-plugin-react": "7.31.8",
|
|
98
98
|
"http-server": "14.0.0",
|
|
99
|
+
"husky": "8.0.3",
|
|
99
100
|
"jest": "29.1.2",
|
|
100
101
|
"jest-environment-jsdom": "29.1.2",
|
|
101
102
|
"madge": "5.0.1",
|
|
102
103
|
"marked": "4.0.10",
|
|
103
104
|
"null-loader": "4.0.1",
|
|
105
|
+
"prettier": "2.8.8",
|
|
104
106
|
"puppeteer": "18.0.5",
|
|
105
107
|
"react-test-renderer": "16.13.1",
|
|
106
108
|
"request": "2.88.2",
|
|
@@ -122,7 +124,9 @@
|
|
|
122
124
|
"pig": "http-server ./PIG -p 4041 -s & webpack --config webpack/PIG.config.js --progress --watch",
|
|
123
125
|
"build": "webpack --node-env=production --config webpack/production.config.js && webpack --config webpack/PIG.config.js",
|
|
124
126
|
"test": "jest",
|
|
125
|
-
"lint": "eslint
|
|
127
|
+
"lint": "eslint --ignore-path .gitignore --cache ./",
|
|
128
|
+
"lint:fix": "DEBUG=eslint:cli-engine eslint --ignore-path .gitignore --fix --cache ./",
|
|
129
|
+
"prettier": "prettier --write '{src,webpack}/**/*.js'",
|
|
126
130
|
"generate": "node scripts/generate.js",
|
|
127
131
|
"prepare": "webpack --config webpack/publish.config.js --progress",
|
|
128
132
|
"start": "node ./Parse-Dashboard/index.js",
|
|
@@ -152,5 +156,17 @@
|
|
|
152
156
|
"react-addons-test-utils",
|
|
153
157
|
"fbjs"
|
|
154
158
|
]
|
|
159
|
+
},
|
|
160
|
+
"husky": {
|
|
161
|
+
"hooks": {
|
|
162
|
+
"pre-commit": "lint-staged"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"lint-staged": {
|
|
166
|
+
"{src,webpack}/{**/*,*}.js": [
|
|
167
|
+
"prettier --write",
|
|
168
|
+
"eslint --fix --cache",
|
|
169
|
+
"git add"
|
|
170
|
+
]
|
|
155
171
|
}
|
|
156
172
|
}
|