diff --git a/Parse-Dashboard/app.js b/Parse-Dashboard/app.js index 7af0fb2db5..7b1810f2a8 100644 --- a/Parse-Dashboard/app.js +++ b/Parse-Dashboard/app.js @@ -87,21 +87,29 @@ module.exports = function(config, options) { newFeaturesInLatestVersion: newFeaturesInLatestVersion, }; - //Based on advice from Doug Wilson here: - //https://github.com/expressjs/express/issues/2518 - const requestIsLocal = - req.connection.remoteAddress === '127.0.0.1' || - req.connection.remoteAddress === '::ffff:127.0.0.1' || - req.connection.remoteAddress === '::1'; - if (!options.dev && !requestIsLocal) { - if (!req.secure && !options.allowInsecureHTTP) { + for (const key in options) { + if (options[key] != null && config[key] == null) { + config[key] = options[key]; + } + } + if (!config.dev) { + if (!req.secure && !config.allowInsecureHTTP) { //Disallow HTTP requests except on localhost, to prevent the master key from being transmitted in cleartext - return res.send({ success: false, error: 'Parse Dashboard can only be remotely accessed via HTTPS' }); + return res.send({ + success: false, + error: + 'Parse Dashboard can only be remotely accessed via HTTPS.', + log: 'Parse Dashboard can only be remotely accessed via HTTPS. If you are running locally, use the --dev parameter which will set allowInsecureHTTP to true.', + }); } - if (!users) { - //Accessing the dashboard over the internet can only be done with username and password - return res.send({ success: false, error: 'Configure a user to access Parse Dashboard remotely' }); + if (!users && config.allowAnonymousUser) { + //Accessing the dashboard requires users unless allowAnonymousUser is set to `true` + return res.send({ + success: false, + error: 'Configure a user to access Parse Dashboard.', + log: 'Configure a user to access Parse Dashboard. If you are running locally, use the --dev parameter which will set allowAnonymousUser to true.', + }); } } const authentication = req.user; @@ -145,7 +153,7 @@ module.exports = function(config, options) { //They didn't provide auth, and have configured the dashboard to not need auth //(ie. didn't supply usernames and passwords) - if (requestIsLocal || options.dev) { + if (config.dev) { //Allow no-auth access on localhost only, if they have configured the dashboard to not need auth return res.json(response); } diff --git a/Parse-Dashboard/index.js b/Parse-Dashboard/index.js index 2363f685b9..aea9320368 100644 --- a/Parse-Dashboard/index.js +++ b/Parse-Dashboard/index.js @@ -25,6 +25,7 @@ program.option('--host [host]', 'the host to run parse-dashboard'); program.option('--port [port]', 'the port to run parse-dashboard'); program.option('--mountPath [mountPath]', 'the mount path to run parse-dashboard'); program.option('--allowInsecureHTTP [allowInsecureHTTP]', 'set this flag when you are running the dashboard behind an HTTPS load balancer or proxy with early SSL termination.'); +program.option('--allowAnonymousUser [allowAnonymousUser]', 'set this to true if you do not require defined users to login. DO NOT ENABLE IN PRODUCTION SERVERS.'); program.option('--sslKey [sslKey]', 'the path to the SSL private key.'); program.option('--sslCert [sslCert]', 'the path to the SSL certificate.'); program.option('--trustProxy [trustProxy]', 'set this flag when you are behind a front-facing proxy, such as when hosting on Heroku. Uses X-Forwarded-* headers to determine the client\'s connection and IP address.'); @@ -67,6 +68,7 @@ let configUserId = program.userId || process.env.PARSE_DASHBOARD_USER_ID; let configUserPassword = program.userPassword || process.env.PARSE_DASHBOARD_USER_PASSWORD; let configSSLKey = program.sslKey || process.env.PARSE_DASHBOARD_SSL_KEY; let configSSLCert = program.sslCert || process.env.PARSE_DASHBOARD_SSL_CERT; +const allowAnonymousUser = program.allowAnonymousUser || process.env.PARSE_DASHBOARD_ALLOW_ANONYMOUS_USER function handleSIGs(server) { const signals = { @@ -174,7 +176,7 @@ const app = express(); if (allowInsecureHTTP || trustProxy || dev) app.enable('trust proxy'); config.data.trustProxy = trustProxy; -let dashboardOptions = { allowInsecureHTTP, cookieSessionSecret, dev }; +let dashboardOptions = { allowInsecureHTTP, cookieSessionSecret, dev, allowAnonymousUser}; app.use(mountPath, parseDashboard(config.data, dashboardOptions)); let server; if(!configSSLKey || !configSSLCert){ diff --git a/Parse-Dashboard/parse-dashboard-config.json b/Parse-Dashboard/parse-dashboard-config.json index 84d5d15396..3581b11624 100644 --- a/Parse-Dashboard/parse-dashboard-config.json +++ b/Parse-Dashboard/parse-dashboard-config.json @@ -10,5 +10,6 @@ "secondaryBackgroundColor": "" } ], - "iconsFolder": "icons" + "iconsFolder": "icons", + "dev": true } diff --git a/README.md b/README.md index acbd9cc383..5d3f554645 100644 --- a/README.md +++ b/README.md @@ -78,9 +78,9 @@ You may set the host, port and mount path by supplying the `--host`, `--port` an The `--dev` parameter disables production-ready security features. This parameter is useful when running Parse Dashboard on Docker. Using this parameter will: -- allow insecure http connections from anywhere, bypassing the option `allowInsecureHTTP` +- allow insecure http connections from anywhere, setting the option `allowInsecureHTTP` to true - allow the Parse Server `masterKey` to be transmitted in cleartext without encryption -- allow dashboard access without user authentication +- allow dashboard access without user authentication, setting the option `allowAnonymousUser` to true > ⚠️ Do not use this parameter when deploying Parse Dashboard in a production environment. @@ -328,7 +328,7 @@ If you have classes with a lot of columns and you filter them often with the sam { "name": "email", "filterSortToTop": true - } + } ] } } @@ -451,7 +451,7 @@ With MFA enabled, a user must provide a one-time password that is typically boun The user requires an authenticator app to generate the one-time password. These apps are provided by many 3rd parties and mostly for free. -If you create a new user by running `parse-dashboard --createUser`, you will be asked whether you want to enable MFA for the new user. To enable MFA for an existing user, +If you create a new user by running `parse-dashboard --createUser`, you will be asked whether you want to enable MFA for the new user. To enable MFA for an existing user, run `parse-dashboard --createMFA` to generate a `mfa` secret that you then add to the existing user configuration, for example: ```json diff --git a/changelogs/CHANGELOG_alpha.md b/changelogs/CHANGELOG_alpha.md index 243a0fda67..1605322018 100644 --- a/changelogs/CHANGELOG_alpha.md +++ b/changelogs/CHANGELOG_alpha.md @@ -1,3 +1,11 @@ +## [4.1.1-alpha.1](https://github.com/ParsePlatform/parse-dashboard/compare/4.1.0...4.1.1-alpha.1) (2022-04-04) + + +### Bug Fixes + +* security upgrade js-beautify from 1.14.0 to 1.14.1 ([#2077](https://github.com/ParsePlatform/parse-dashboard/issues/2077)) ([e4ea787](https://github.com/ParsePlatform/parse-dashboard/commit/e4ea7879d88173b02d66b1339ba98805255ba82c)) +* security vulnerability bump minimist from 1.2.5 to 1.2.6 ([#2070](https://github.com/ParsePlatform/parse-dashboard/issues/2070)) ([3d0407e](https://github.com/ParsePlatform/parse-dashboard/commit/3d0407ebd75051bbbe6f0a2aba87b26475e901b9)) + # [4.1.0-alpha.3](https://github.com/ParsePlatform/parse-dashboard/compare/4.1.0-alpha.2...4.1.0-alpha.3) (2022-03-30) diff --git a/package-lock.json b/package-lock.json index c3789b2f50..7b0832d0b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "parse-dashboard", - "version": "4.1.1-beta.1", + "version": "4.1.1-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2146,9 +2146,9 @@ } }, "@babel/runtime": { - "version": "7.17.2", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.2.tgz", - "integrity": "sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==", + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.8.tgz", + "integrity": "sha512-dQpEpK0O9o6lj6oPu0gRDbbnk+4LeHlNcBpspf6Olzt3GIX4P1lWF1gS+pHLDFlaJvbR6q7jCfQ08zA4QJBnmA==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -2212,22 +2212,22 @@ } }, "@codemirror/highlight": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@codemirror/highlight/-/highlight-0.19.7.tgz", - "integrity": "sha512-3W32hBCY0pbbv/xidismw+RDMKuIag+fo4kZIbD7WoRj+Ttcaxjf+vP6RttRHXLaaqbWh031lTeON8kMlDhMYw==", + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/@codemirror/highlight/-/highlight-0.19.8.tgz", + "integrity": "sha512-v/lzuHjrYR8MN2mEJcUD6fHSTXXli9C1XGYpr+ElV6fLBIUhMTNKR3qThp611xuWfXfwDxeL7ppcbkM/MzPV3A==", "requires": { "@codemirror/language": "^0.19.0", "@codemirror/rangeset": "^0.19.0", "@codemirror/state": "^0.19.3", - "@codemirror/view": "^0.19.0", + "@codemirror/view": "^0.19.39", "@lezer/common": "^0.15.0", "style-mod": "^4.0.0" } }, "@codemirror/language": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-0.19.8.tgz", - "integrity": "sha512-KhRne8qmzSKkaw+qhkwgNsPKxmThlyeJ3umfc33B9kJzVP7xhTkwX2MEPl0almM3brxMi+lPYx7gCPOy1gHsWw==", + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-0.19.10.tgz", + "integrity": "sha512-yA0DZ3RYn2CqAAGW62VrU8c4YxscMQn45y/I9sjBlqB1e2OTQLg4CCkMBuMSLXk4xaqjlsgazeOQWaJQOKfV8Q==", "requires": { "@codemirror/state": "^0.19.0", "@codemirror/text": "^0.19.0", @@ -2253,9 +2253,9 @@ } }, "@codemirror/stream-parser": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/@codemirror/stream-parser/-/stream-parser-0.19.7.tgz", - "integrity": "sha512-4ExcbKksmU4PIT8s11/dPESgMNLQqlMlbQzRQ1CyMcmygcuQk+58zQ84nv/X17OCUd2ephZ1DKEaHHACifzCiA==", + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@codemirror/stream-parser/-/stream-parser-0.19.9.tgz", + "integrity": "sha512-WTmkEFSRCetpk8xIOvV2yyXdZs3DgYckM0IP7eFi4ewlxWnJO/H4BeJZLs4wQaydWsAqTQoDyIwNH1BCzK5LUQ==", "requires": { "@codemirror/highlight": "^0.19.0", "@codemirror/language": "^0.19.0", @@ -2271,9 +2271,9 @@ "integrity": "sha512-T9jnREMIygx+TPC1bOuepz18maGq/92q2a+n4qTqObKwvNMg+8cMTslb8yxeEDEq7S3kpgGWxgO1UWbQRij0dA==" }, "@codemirror/view": { - "version": "0.19.47", - "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-0.19.47.tgz", - "integrity": "sha512-SfbagKvJQl5dtt+9wYpo9sa3ZkMgUxTq+/hXDf0KVwIx+zu3cJIqfEm9xSx6yXkq7it7RsPGHaPasApNffF/8g==", + "version": "0.19.48", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-0.19.48.tgz", + "integrity": "sha512-0eg7D2Nz4S8/caetCTz61rK0tkHI17V/d15Jy0kLOT8dTLGGNJUponDnW28h2B6bERmPlVHKh8MJIr5OCp1nGw==", "requires": { "@codemirror/rangeset": "^0.19.5", "@codemirror/state": "^0.19.3", @@ -2334,12 +2334,12 @@ } }, "@graphql-tools/delegate": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/delegate/-/delegate-8.7.0.tgz", - "integrity": "sha512-tsmNFV8nVvPY2nApCj69ck32/Jdj44rYbUZx+cpyUWOzfbUT1iu0d1mUwn5UeHuGnB+Bzgn3fuTypg97mDEyEw==", + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/delegate/-/delegate-8.7.1.tgz", + "integrity": "sha512-e98/NRaOH5wQy624bRd5i5qUKz5tCs8u4xBmxW89d7t6V6CveXj7pvAgmnR9DbwOkO6IA3P799p/aa/YG/pWTA==", "requires": { "@graphql-tools/batch-execute": "8.4.1", - "@graphql-tools/schema": "8.3.5", + "@graphql-tools/schema": "8.3.6", "@graphql-tools/utils": "8.6.5", "dataloader": "2.0.0", "graphql-executor": "0.0.22", @@ -2409,11 +2409,11 @@ } }, "@graphql-tools/load": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@graphql-tools/load/-/load-7.5.5.tgz", - "integrity": "sha512-qPasit140nwTbMQbFCfZcgaS7q/0+xMQGdkMGU11rtHt6/jMgJIKDUU8/fJGKltNY3EeHlEdVtZmggZD7Rr6bA==", + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/@graphql-tools/load/-/load-7.5.6.tgz", + "integrity": "sha512-IocEP4METGdbDzV44VaeiXO387NOYSW4cTuBP8qybHZX0XlIp8bEv7c8GKS3m8DeRop/9SnOL7HyiAfNMA4Chg==", "requires": { - "@graphql-tools/schema": "8.3.5", + "@graphql-tools/schema": "8.3.6", "@graphql-tools/utils": "8.6.5", "p-limit": "3.1.0", "tslib": "~2.3.0" @@ -2451,9 +2451,9 @@ } }, "@graphql-tools/schema": { - "version": "8.3.5", - "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-8.3.5.tgz", - "integrity": "sha512-3mJ/K7TdL+fnEUtCUqF4qkh1fcNMzaxgwKgO9fSYSTS7zyT16hbi5XSulSTshygHgaD2u+MO588iR4ZJcbZcIg==", + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-8.3.6.tgz", + "integrity": "sha512-7tWYRQ8hB/rv2zAtv2LtnQl4UybyJPtRz/VLKRmgi7+F5t8iYBahmmsxMDAYMWMmWMqEDiKk54TvAes+J069rQ==", "requires": { "@graphql-tools/merge": "8.2.6", "@graphql-tools/utils": "8.6.5", @@ -2469,13 +2469,13 @@ } }, "@graphql-tools/url-loader": { - "version": "7.9.7", - "resolved": "https://registry.npmjs.org/@graphql-tools/url-loader/-/url-loader-7.9.7.tgz", - "integrity": "sha512-cJoZcv6oJrhArRPmSnw8wcqnz7F8p+HzwvjoJyHbs0ne2jTXazD+LOHaXMAa1L7lKK2YmH2Txy8pOI76JnvUiQ==", + "version": "7.9.8", + "resolved": "https://registry.npmjs.org/@graphql-tools/url-loader/-/url-loader-7.9.8.tgz", + "integrity": "sha512-nRMXwwoIDLt7ohBWvKKjEEH61YS1nnWs6BVgGStePfmRGrhxECpLWmfAmKLNXPqDJN7Nu6ykFJYjt65j5l6qsw==", "requires": { - "@graphql-tools/delegate": "8.7.0", + "@graphql-tools/delegate": "8.7.1", "@graphql-tools/utils": "8.6.5", - "@graphql-tools/wrap": "8.4.9", + "@graphql-tools/wrap": "8.4.10", "@n1ru4l/graphql-live-query": "^0.9.0", "@types/websocket": "^1.0.4", "@types/ws": "^8.0.0", @@ -2521,12 +2521,12 @@ } }, "@graphql-tools/wrap": { - "version": "8.4.9", - "resolved": "https://registry.npmjs.org/@graphql-tools/wrap/-/wrap-8.4.9.tgz", - "integrity": "sha512-YFb34itVWyE3sMifvPRqvYjXYpjJle2hkq9nIELQOumc1yqxT7jf/+YnNZalS1DoOdWn4GbDmqO/uljf6AuuDA==", + "version": "8.4.10", + "resolved": "https://registry.npmjs.org/@graphql-tools/wrap/-/wrap-8.4.10.tgz", + "integrity": "sha512-1/pcKRDTGIUspUl6uhlfQ0u1l4j15TVGkOkijI+gX25Q9sfAJclT0bovKBksP39G6v4hZnolpOU2txJ47MxxEg==", "requires": { - "@graphql-tools/delegate": "8.7.0", - "@graphql-tools/schema": "8.3.5", + "@graphql-tools/delegate": "8.7.1", + "@graphql-tools/schema": "8.3.6", "@graphql-tools/utils": "8.6.5", "tslib": "~2.3.0", "value-or-promise": "1.0.11" @@ -3843,7 +3843,8 @@ "@types/json-schema": { "version": "7.0.9", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", - "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==" + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true }, "@types/keyv": { "version": "3.1.3", @@ -5542,24 +5543,12 @@ "integrity": "sha512-SZM4Zq7XEC8Fhroqe3LxbEEX1zUPWH1wMr5zxiBuiUF64iYOUH/JI88v4tBag8MiBS8B8gRv8O1pPXGYXQ4ErA==" }, "codemirror-graphql": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/codemirror-graphql/-/codemirror-graphql-1.2.14.tgz", - "integrity": "sha512-zt2N0sZgaZZUOp8eTNIy2d364gGKjtAu0PKHMjQqogB2S4KrD/z/wICCjRf0JXskPM8jN/kNqufhHt59UKf6gQ==", + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/codemirror-graphql/-/codemirror-graphql-1.2.15.tgz", + "integrity": "sha512-srON9VHCaVt6VoZm2m7Qgy0EUNCUgD50Lc3HRtHpyoi1HRjN9dAens6KlQPjv5uJrpuYLGkhwiYjh92zLfSyiA==", "requires": { "@codemirror/stream-parser": "^0.19.2", "graphql-language-service": "^5.0.1" - }, - "dependencies": { - "graphql-language-service": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/graphql-language-service/-/graphql-language-service-5.0.1.tgz", - "integrity": "sha512-DGaGtCyU5ugCJIkTWqFxNESFCqjNEHJGWDhcu2jXY28GcPnTSqfKAk4ryCK4E514AKNFrvX9WwZEB6Csi+xbdQ==", - "requires": { - "graphql-config": "^4.1.0", - "nullthrows": "^1.0.0", - "vscode-languageserver-types": "^3.15.1" - } - } } }, "collection-visit": { @@ -5620,9 +5609,9 @@ } }, "commander": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.0.0.tgz", - "integrity": "sha512-JJfP2saEKbQqvW+FI93OYUB4ByV5cizMpFMiiJI8xDbBvQvSkIk0VvQdn1CZ8mqAO8Loq2h0gYTYtDFUZUeERw==" + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.1.0.tgz", + "integrity": "sha512-i0/MaqBtdbnJ4XQs4Pmyb+oFQl+q0lsAmokVUH92SlSw4fkeAcG3bVon+Qt7hmtF+u3Het6o4VgrcY3qAoEB6w==" }, "commondir": { "version": "1.0.1", @@ -5959,15 +5948,15 @@ } }, "cross-undici-fetch": { - "version": "0.1.27", - "resolved": "https://registry.npmjs.org/cross-undici-fetch/-/cross-undici-fetch-0.1.27.tgz", - "integrity": "sha512-Oz/zXdh2HCq55xARCwFAYtKlyGp3VFAIfOEexN6nVm06rD6O5g47fKp7fggf/kBtc7iG09asNoGW+CUwIi4Efg==", + "version": "0.1.28", + "resolved": "https://registry.npmjs.org/cross-undici-fetch/-/cross-undici-fetch-0.1.28.tgz", + "integrity": "sha512-/nLMyVE5IC9PQdBtmgjpGZfK0wo8UupomAPx+7HlbEgVDkZOa9xCiZP9goo5aLYofP0gHXgovjXdXrE2obANag==", "requires": { "abort-controller": "^3.0.0", "form-data-encoder": "^1.7.1", "formdata-node": "^4.3.1", "node-fetch": "^2.6.7", - "undici": "^4.9.3", + "undici": "^5.0.0", "web-streams-polyfill": "^3.2.0" }, "dependencies": { @@ -7465,7 +7454,6 @@ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.2.tgz", "integrity": "sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ==", "requires": { - "bytes": "3.1.1", "http-errors": "1.8.1", "iconv-lite": "0.4.24", "unpipe": "1.0.0" @@ -8073,9 +8061,9 @@ } }, "form-data-encoder": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.1.tgz", - "integrity": "sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg==" + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.2.tgz", + "integrity": "sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==" }, "formdata-node": { "version": "4.3.2", @@ -8507,18 +8495,18 @@ "dev": true }, "graphiql": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/graphiql/-/graphiql-1.6.0.tgz", - "integrity": "sha512-VUxnzehiv5BiJzoHQOL7CVFfVjMidate93wSRvFotW7gZluF6PQE45B+LeVWLMRoC59KIUcL+6gtgLHJ5FssvA==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/graphiql/-/graphiql-1.7.1.tgz", + "integrity": "sha512-diEftHKsFtONUy90v1bZYgjCsJmRRVlnS72kYdv2lTETr1jgWN8V1nLepGl47xoQg8j0Bw9Er3v0wHnOdB5JxA==", "requires": { "@graphiql/toolkit": "^0.4.2", "codemirror": "^5.58.2", - "codemirror-graphql": "^1.2.12", + "codemirror-graphql": "^1.2.13", "copy-to-clipboard": "^3.2.0", "dset": "^3.1.0", "entities": "^2.0.0", "escape-html": "^1.0.3", - "graphql-language-service": "^4.1.5", + "graphql-language-service": "^5.0.0", "markdown-it": "^12.2.0" } }, @@ -8528,21 +8516,31 @@ "integrity": "sha512-xm+ANmA16BzCT5pLjuXySbQVFwH3oJctUVdy81w1sV0vBU0KgDdBGtxQOUd5zqOBk/JayAFeG8Dlmeq74rjm/A==" }, "graphql-config": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/graphql-config/-/graphql-config-4.1.0.tgz", - "integrity": "sha512-Myqay6pmdcmX3KqoH+bMbeKZ1cTODpHS2CxF1ZzNnfTE+YUpGTcp01bOw6LpzamRb0T/WTYtGFbZeXGo9Hab2Q==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/graphql-config/-/graphql-config-4.2.0.tgz", + "integrity": "sha512-Qyf02bOfz2jvKc15VQllDS1MQVuywPPYkZ4ChR9ffzNBQk0JX+7ZmfuPwnCkJQQMms56yywU5w1fu9BZVcuUkA==", "requires": { "@endemolshinegroup/cosmiconfig-typescript-loader": "3.0.2", - "@graphql-tools/graphql-file-loader": "^7.3.2", - "@graphql-tools/json-file-loader": "^7.3.2", - "@graphql-tools/load": "^7.4.1", - "@graphql-tools/merge": "^8.2.1", - "@graphql-tools/url-loader": "^7.4.2", - "@graphql-tools/utils": "^8.5.1", + "@graphql-tools/graphql-file-loader": "^7.3.7", + "@graphql-tools/json-file-loader": "^7.3.7", + "@graphql-tools/load": "^7.5.5", + "@graphql-tools/merge": "^8.2.6", + "@graphql-tools/url-loader": "^7.9.7", + "@graphql-tools/utils": "^8.6.5", "cosmiconfig": "7.0.1", "cosmiconfig-toml-loader": "1.0.0", - "minimatch": "3.0.4", + "minimatch": "4.2.1", "string-env-interpolation": "1.0.1" + }, + "dependencies": { + "minimatch": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", + "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", + "requires": { + "brace-expansion": "^1.1.7" + } + } } }, "graphql-executor": { @@ -8551,55 +8549,15 @@ "integrity": "sha512-WbKSnSHFn6REKKH4T6UAwDM3mLUnYMQlQLNG0Fw+Lkb3ilCnL3m5lkJ7411LAI9sF7BvPbthovVZhsEUh9Xfag==" }, "graphql-language-service": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/graphql-language-service/-/graphql-language-service-4.1.5.tgz", - "integrity": "sha512-6vvZ+4L1xMNpQdlt6a9BaEzZD3ZIiaTmFdjKu81UTIVRh02QKfbW6tcz4UJNTY+4LsTWjR1rNtG3H4pVNrKJ2Q==", - "requires": { - "graphql-language-service-interface": "^2.10.2", - "graphql-language-service-parser": "^1.10.4", - "graphql-language-service-types": "^1.8.7", - "graphql-language-service-utils": "^2.7.1" - } - }, - "graphql-language-service-interface": { - "version": "2.10.2", - "resolved": "https://registry.npmjs.org/graphql-language-service-interface/-/graphql-language-service-interface-2.10.2.tgz", - "integrity": "sha512-RKIEBPhRMWdXY3fxRs99XysTDnEgAvNbu8ov/5iOlnkZsWQNzitjtd0O0l1CutQOQt3iXoHde7w8uhCnKL4tcg==", - "requires": { - "graphql-config": "^4.1.0", - "graphql-language-service-parser": "^1.10.4", - "graphql-language-service-types": "^1.8.7", - "graphql-language-service-utils": "^2.7.1", - "vscode-languageserver-types": "^3.15.1" - } - }, - "graphql-language-service-parser": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/graphql-language-service-parser/-/graphql-language-service-parser-1.10.4.tgz", - "integrity": "sha512-duDE+0aeKLFVrb9Kf28U84ZEHhHcvTjWIT6dJbIAQJWBaDoht0D4BK9EIhd94I3DtKRc1JCJb2+70y1lvP/hiA==", - "requires": { - "graphql-language-service-types": "^1.8.7" - } - }, - "graphql-language-service-types": { - "version": "1.8.7", - "resolved": "https://registry.npmjs.org/graphql-language-service-types/-/graphql-language-service-types-1.8.7.tgz", - "integrity": "sha512-LP/Mx0nFBshYEyD0Ny6EVGfacJAGVx+qXtlJP4hLzUdBNOGimfDNtMVIdZANBXHXcM41MDgMHTnyEx2g6/Ttbw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/graphql-language-service/-/graphql-language-service-5.0.1.tgz", + "integrity": "sha512-DGaGtCyU5ugCJIkTWqFxNESFCqjNEHJGWDhcu2jXY28GcPnTSqfKAk4ryCK4E514AKNFrvX9WwZEB6Csi+xbdQ==", "requires": { "graphql-config": "^4.1.0", + "nullthrows": "^1.0.0", "vscode-languageserver-types": "^3.15.1" } }, - "graphql-language-service-utils": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/graphql-language-service-utils/-/graphql-language-service-utils-2.7.1.tgz", - "integrity": "sha512-Wci5MbrQj+6d7rfvbORrA9uDlfMysBWYaG49ST5TKylNaXYFf3ixFOa74iM1KtM9eidosUbI3E1JlWi0JaidJA==", - "requires": { - "@types/json-schema": "7.0.9", - "graphql-language-service-types": "^1.8.7", - "nullthrows": "^1.0.0" - } - }, "graphql-sse": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/graphql-sse/-/graphql-sse-1.1.0.tgz", @@ -9077,9 +9035,9 @@ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, "inquirer": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.0.tgz", - "integrity": "sha512-0crLweprevJ02tTuA6ThpoAERAGyVILC4sS74uib58Xf/zSr1/ZWtmm7D5CI+bSQEaA04f0K7idaHpQbSWgiVQ==", + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.1.tgz", + "integrity": "sha512-pxhBaw9cyTFMjwKtkjePWDhvwzvrNGAw7En4hottzlPvz80GZaMZthdDU35aA6/f5FRZf3uhE057q8w1DE3V2g==", "requires": { "ansi-escapes": "^4.2.1", "chalk": "^4.1.1", @@ -9091,7 +9049,7 @@ "mute-stream": "0.0.8", "ora": "^5.4.1", "run-async": "^2.4.0", - "rxjs": "^7.2.0", + "rxjs": "^7.5.5", "string-width": "^4.1.0", "strip-ansi": "^6.0.0", "through": "^2.3.6" @@ -17940,17 +17898,17 @@ } }, "rxjs": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.4.0.tgz", - "integrity": "sha512-7SQDi7xeTMCJpqViXh8gL/lebcwlp3d831F05+9B44A4B0WfsEwUQHR64gsH1kvJ+Ep/J9K2+n1hVl1CsGN23w==", + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.5.tgz", + "integrity": "sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw==", "requires": { - "tslib": "~2.1.0" + "tslib": "^2.1.0" }, "dependencies": { "tslib": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", - "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" } } }, @@ -19856,9 +19814,9 @@ } }, "undici": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-4.16.0.tgz", - "integrity": "sha512-tkZSECUYi+/T1i4u+4+lwZmQgLXd4BLGlrc7KZPcLIW7Jpq99+Xpc30ONv7nS6F5UNOxp/HBZSSL9MafUrvJbw==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.0.0.tgz", + "integrity": "sha512-VhUpiZ3No1DOPPQVQnsDZyfcbTTcHdcgWej1PdFnSvOeJmOVDgiOHkunJmBLfmjt4CqgPQddPVjSWW0dsTs5Yg==" }, "unicode-canonical-property-names-ecmascript": { "version": "2.0.0", diff --git a/package.json b/package.json index 881e7f9aeb..f730dc0a3c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "parse-dashboard", - "version": "4.1.1-beta.1", + "version": "4.1.1-alpha.1", "repository": { "type": "git", "url": "https://github.com/ParsePlatform/parse-dashboard" @@ -35,21 +35,21 @@ "LICENSE" ], "dependencies": { - "@babel/runtime": "7.17.2", + "@babel/runtime": "7.17.8", "bcryptjs": "2.3.0", "body-parser": "1.19.2", - "commander": "9.0.0", + "commander": "9.1.0", "connect-flash": "0.1.1", "cookie-session": "2.0.0", "copy-to-clipboard": "3.3.1", "csurf": "1.11.0", "express": "4.17.3", - "graphiql": "1.6.0", + "graphiql": "1.7.1", "graphql": "16.3.0", "history": "4.10.1", "immutable": "4.0.0", "immutable-devtools": "0.1.5", - "inquirer": "8.2.0", + "inquirer": "8.2.1", "js-beautify": "1.14.1", "otpauth": "7.0.11", "package-json": "7.0.0", diff --git a/src/dashboard/Dashboard.js b/src/dashboard/Dashboard.js index ebde1004f4..14a4a5268b 100644 --- a/src/dashboard/Dashboard.js +++ b/src/dashboard/Dashboard.js @@ -171,9 +171,14 @@ export default class Dashboard extends React.Component { AppsManager.addApp(app); }); this.setState({ configLoadingState: AsyncStatus.SUCCESS }); - }.bind(this)).catch(({ error }) => { + }.bind(this)).catch((error) => { + if (error.log) { + setTimeout(() => { + console.error(error.log); + }, 500); + } this.setState({ - configLoadingError: error, + configLoadingError: error.error, configLoadingState: AsyncStatus.FAILED }); }); diff --git a/src/lib/tests/e2e/dashboard.e2e.test.js b/src/lib/tests/e2e/dashboard.e2e.test.js index b7580f13a0..7bf4b99a68 100644 --- a/src/lib/tests/e2e/dashboard.e2e.test.js +++ b/src/lib/tests/e2e/dashboard.e2e.test.js @@ -18,7 +18,8 @@ const dashboardSettings = { appId: 'appId', masterKey: 'masterKey', appName: 'MyApp' - }] + }], + dev: true }; // TODO: Mount parse-server