From 4f47c4d6e919aefd303617ac459cea41a1761385 Mon Sep 17 00:00:00 2001 From: azivner Date: Wed, 6 Dec 2017 21:15:46 -0500 Subject: [PATCH] better fix for migration in electron + electron upgrade to 1.8.2 beta 3 --- package-lock.json | 33 +++++++++++++++++++++++++-------- package.json | 2 +- services/build.js | 2 +- services/migration.js | 7 ++----- 4 files changed, 29 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5ec4549df..df1b5b6e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2419,19 +2419,19 @@ "integrity": "sha1-zIcsFoiArjxxiXYv1f/ACJbJUYo=" }, "electron": { - "version": "1.8.2-beta.2", - "resolved": "https://registry.npmjs.org/electron/-/electron-1.8.2-beta.2.tgz", - "integrity": "sha1-tTLHEFDd0tSwDi4NNV3k51vB5f0=", + "version": "1.8.2-beta.3", + "resolved": "https://registry.npmjs.org/electron/-/electron-1.8.2-beta.3.tgz", + "integrity": "sha1-Ljkcy9YnaKOzsmC48uPxZHNWeuw=", "requires": { - "@types/node": "8.0.49", + "@types/node": "8.0.56", "electron-download": "3.3.0", "extract-zip": "1.6.5" }, "dependencies": { "@types/node": { - "version": "8.0.49", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.0.49.tgz", - "integrity": "sha512-Oq3cV/mrMKy6Tv42llfS8YIH30ooDdhbJ40h1zoWl+goOJw8Kjy8j8RfjGZtZIUDO0gLwCfcbYM7+LModnbeMw==" + "version": "8.0.56", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.0.56.tgz", + "integrity": "sha512-JAlQv3hUWbrnruuTiLDf1scd4F/TBT0LgGEe+BBeF3p/Rc3yL6RV57WJN2nK5i+BshEz1sDllwH0Fzbuo7G4QA==" } } }, @@ -2590,7 +2590,7 @@ }, "fs-extra": { "version": "0.30.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "resolved": "http://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", "requires": { "graceful-fs": "4.1.11", @@ -2807,6 +2807,23 @@ "yargs": "6.6.0" }, "dependencies": { + "@types/node": { + "version": "8.0.56", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.0.56.tgz", + "integrity": "sha512-JAlQv3hUWbrnruuTiLDf1scd4F/TBT0LgGEe+BBeF3p/Rc3yL6RV57WJN2nK5i+BshEz1sDllwH0Fzbuo7G4QA==", + "dev": true + }, + "electron": { + "version": "1.8.2-beta.2", + "resolved": "https://registry.npmjs.org/electron/-/electron-1.8.2-beta.2.tgz", + "integrity": "sha1-tTLHEFDd0tSwDi4NNV3k51vB5f0=", + "dev": true, + "requires": { + "@types/node": "8.0.56", + "electron-download": "3.3.0", + "extract-zip": "1.6.5" + } + }, "yargs": { "version": "6.6.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", diff --git a/package.json b/package.json index 2476f4942..cd7c317df 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "debug": "~3.1.0", "devtron": "^1.4.0", "ejs": "~2.5.7", - "electron": "^1.8.2-beta.2", + "electron": "^1.8.2-beta.3", "electron-debug": "^1.0.0", "express": "~4.16.2", "express-session": "^1.15.6", diff --git a/services/build.js b/services/build.js index 49fc86a7f..350843868 100644 --- a/services/build.js +++ b/services/build.js @@ -1 +1 @@ -module.exports = { build_date:"2017-12-04T23:02:48-05:00", build_revision: "23e8e20d44ef029e6891dec6d2d855d282996823" }; +module.exports = { build_date:"2017-12-06T21:05:03-05:00", build_revision: "bbd177481523bf6d7c9388b0ddf65af7f5c61e6b" }; diff --git a/services/migration.js b/services/migration.js index 437c8aac1..f331c2341 100644 --- a/services/migration.js +++ b/services/migration.js @@ -4,12 +4,9 @@ const options = require('./options'); const fs = require('fs-extra'); const log = require('./log'); const app_info = require('./app_info'); +const path = require('path'); -let MIGRATIONS_DIR = "migrations"; - -if (!fs.existsSync(MIGRATIONS_DIR) && isElectron()) { - MIGRATIONS_DIR = "resources/app/migrations"; -} +const MIGRATIONS_DIR = path.resolve(__dirname, "..", "migrations"); if (!fs.existsSync(MIGRATIONS_DIR)) { log.error("Could not find migration directory: " + MIGRATIONS_DIR);