parse-dashboard 7.3.0-alpha.4 → 7.3.0-alpha.40

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.
@@ -1,5 +1,8 @@
1
1
  const crypto = require('crypto');
2
- const inquirer = require('inquirer');
2
+ let inquirer = require('inquirer');
3
+ if (inquirer.default) {
4
+ inquirer = inquirer.default;
5
+ }
3
6
  const OTPAuth = require('otpauth');
4
7
  const { copy } = require('./utils.js');
5
8
  const phrases = {
@@ -14,21 +14,22 @@ let newFeaturesInLatestVersion = [];
14
14
  * Gets the new features in the latest version of Parse Dashboard.
15
15
  */
16
16
  async function getNewFeaturesInLatestVersion() {
17
- // Get latest version
18
- const packageJson = (await import('package-json')).default;
19
- const latestPackage = await packageJson('parse-dashboard', { version: 'latest', fullMetadata: true });
20
-
21
17
  try {
18
+ // Get latest version
19
+ const packageJson = (await import('package-json')).default;
20
+ const latestPackage = await packageJson('parse-dashboard', { version: 'latest', fullMetadata: true });
21
+
22
22
  if (latestPackage.parseDashboardFeatures instanceof Array) {
23
23
  newFeaturesInLatestVersion = latestPackage.parseDashboardFeatures.filter(feature => {
24
24
  return currentVersionFeatures.indexOf(feature) === -1;
25
25
  });
26
26
  }
27
27
  } catch {
28
+ // Fail silently if fetching the latest package information fails
28
29
  newFeaturesInLatestVersion = [];
29
30
  }
30
31
  }
31
- getNewFeaturesInLatestVersion()
32
+ getNewFeaturesInLatestVersion().catch(() => {})
32
33
 
33
34
  function getMount(mountPath) {
34
35
  mountPath = mountPath || '';
@@ -250,6 +251,7 @@ module.exports = function(config, options) {
250
251
  <base href="${mountPath}"/>
251
252
  <script>
252
253
  PARSE_DASHBOARD_PATH = "${mountPath}";
254
+ PARSE_DASHBOARD_ENABLE_RESOURCE_CACHE = ${config.enableResourceCache ? 'true' : 'false'};
253
255
  </script>
254
256
  <title>Parse Dashboard</title>
255
257
  </head>