From e2a9ed36a534df0dc7bd2014d7b11aede3d62bec Mon Sep 17 00:00:00 2001 From: Jelle Siderius Date: Mon, 19 Jul 2021 01:10:27 +0200 Subject: [PATCH] Release 0.2.6 --- dist/controllers/mainController.js | 8 ++++---- dist/controllers/mainController.js.map | 2 +- dist/tasks/downloadTask.js | 4 ++-- dist/tasks/downloadTask.js.map | 2 +- dist/tasks/wordpressConfigureTask.js | 3 +++ dist/tasks/wordpressConfigureTask.js.map | 2 +- package-lock.json | 2 +- package.json | 2 +- src/controllers/mainController.ts | 8 ++++---- src/tasks/downloadTask.ts | 4 ++-- src/tasks/wordpressConfigureTask.ts | 3 +++ tsconfig.json | 2 +- 12 files changed, 24 insertions(+), 18 deletions(-) diff --git a/dist/controllers/mainController.js b/dist/controllers/mainController.js index 4a69c2e..0248a92 100644 --- a/dist/controllers/mainController.js +++ b/dist/controllers/mainController.js @@ -64,13 +64,13 @@ class MainController { this.list = new listr2_1.Listr([], { concurrent: false }); this.ssh = new node_ssh_1.NodeSSH(); this.databases = new databasesModel_1.default(); - this.configureConfig = () => { + this.configureConfig = () => tslib_1.__awaiter(this, void 0, void 0, function* () { // Fetch SSH key location if (!this.config.customConfig.sshKeyLocation) { this.config.customConfig.sshKeyLocation = os.userInfo().homedir + '/.ssh/id_rsa'; } // Check if rsync is installed locally - let rsyncCheck = console_1.consoleCommand('which rsync'); + let rsyncCheck = yield console_1.consoleCommand('which rsync'); // @ts-ignore if (rsyncCheck.length > 0) { this.config.settings.rsyncInstalled = true; @@ -83,8 +83,8 @@ class MainController { if (fs.existsSync(this.config.settings.currentFolder + '/vendor/magento') || fs.existsSync(this.config.settings.currentFolder + '/app/Mage.php')) { this.config.settings.currentFolderIsMagento = true; } - }; - this.configureConfig(); + }); + this.configureConfig().then(); } } exports.default = MainController; diff --git a/dist/controllers/mainController.js.map b/dist/controllers/mainController.js.map index 82ec646..4dfbb16 100644 --- a/dist/controllers/mainController.js.map +++ b/dist/controllers/mainController.js.map @@ -1 +1 @@ -{"version":3,"file":"mainController.js","sourceRoot":"","sources":["../../src/controllers/mainController.ts"],"names":[],"mappings":";;;AAAA,aAAa;AACb,uFAAmD;AACnD,uCAAgC;AAChC,sFAAsD;AACtD,+CAAwB;AACxB,mDAA4B;AAC5B,+CAAwB;AACxB,8CAAkD;AAClD,mCAA+B;AAC/B,gEAA+B;AAC/B,kBAAQ,CAAC,cAAc,CAAC,aAAa,EAAE,OAAO,CAAC,yCAAyC,CAAC,CAAC,CAAC;AAG3F,MAAM,cAAc;IAuDhB;QAtDO,WAAM,GAAG;YACZ,cAAc,EAAE;gBACZ,gBAAgB,EAAE,uBAAU,CAAC,GAAG,CAAC,WAAW;gBAC5C,eAAe,EAAE,uBAAU,CAAC,GAAG,CAAC,UAAU;gBAC1C,6BAA6B,EAAE,uBAAU,CAAC,OAAO,CAAC,gBAAgB;gBAClE,sBAAsB,EAAE,uBAAU,CAAC,OAAO,CAAC,oBAAoB;aAClE;YACD,cAAc,EAAE;gBACZ,iBAAiB,EAAE,OAAO;aAC7B;YACD,iBAAiB,EAAE;gBACf,gBAAgB,EAAE,CAAC;gBACnB,iBAAiB,EAAE,EAAE;gBACrB,aAAa,EAAE,EAAE;gBACjB,aAAa,EAAE,EAAE;gBACjB,cAAc,EAAE,EAAE;aACrB;YACD,UAAU,EAAE;gBACR,eAAe,EAAE,EAAE;gBACnB,mBAAmB,EAAE,EAAE;gBACvB,OAAO,EAAE,EAAE;gBACX,YAAY,EAAE,KAAK;gBACnB,4BAA4B,EAAE,EAAE;gBAChC,gBAAgB,EAAE,KAAK;gBACvB,mBAAmB,EAAE,KAAK;gBAC1B,QAAQ,EAAE,IAAI;gBACd,iBAAiB,EAAE,IAAI;gBACvB,wBAAwB,EAAE,KAAK;aAClC;YACD,eAAe,EAAE;gBACb,yBAAyB,EAAE,EAAE;gBAC7B,2BAA2B,EAAE,EAAE;gBAC/B,cAAc,EAAE,EAAE;aACrB;YACD,WAAW,EAAE;gBACT,eAAe,EAAE,IAAI;gBACr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,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,GAAG,eAAe,CAAC,EAAE;gBAC9I,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,GAAG,IAAI,CAAC;aACtD;QACL,CAAC,CAAA;QA1BG,IAAI,CAAC,eAAe,EAAE,CAAC;IAC3B,CAAC;CA0BJ;AAED,kBAAe,cAAc,CAAA"} \ No newline at end of file +{"version":3,"file":"mainController.js","sourceRoot":"","sources":["../../src/controllers/mainController.ts"],"names":[],"mappings":";;;AAAA,aAAa;AACb,uFAAmD;AACnD,uCAAgC;AAChC,sFAAsD;AACtD,+CAAwB;AACxB,mDAA4B;AAC5B,+CAAwB;AACxB,8CAAkD;AAClD,mCAA+B;AAC/B,gEAA+B;AAC/B,kBAAQ,CAAC,cAAc,CAAC,aAAa,EAAE,OAAO,CAAC,yCAAyC,CAAC,CAAC,CAAC;AAG3F,MAAM,cAAc;IAuDhB;QAtDO,WAAM,GAAG;YACZ,cAAc,EAAE;gBACZ,gBAAgB,EAAE,uBAAU,CAAC,GAAG,CAAC,WAAW;gBAC5C,eAAe,EAAE,uBAAU,CAAC,GAAG,CAAC,UAAU;gBAC1C,6BAA6B,EAAE,uBAAU,CAAC,OAAO,CAAC,gBAAgB;gBAClE,sBAAsB,EAAE,uBAAU,CAAC,OAAO,CAAC,oBAAoB;aAClE;YACD,cAAc,EAAE;gBACZ,iBAAiB,EAAE,OAAO;aAC7B;YACD,iBAAiB,EAAE;gBACf,gBAAgB,EAAE,CAAC;gBACnB,iBAAiB,EAAE,EAAE;gBACrB,aAAa,EAAE,EAAE;gBACjB,aAAa,EAAE,EAAE;gBACjB,cAAc,EAAE,EAAE;aACrB;YACD,UAAU,EAAE;gBACR,eAAe,EAAE,EAAE;gBACnB,mBAAmB,EAAE,EAAE;gBACvB,OAAO,EAAE,EAAE;gBACX,YAAY,EAAE,KAAK;gBACnB,4BAA4B,EAAE,EAAE;gBAChC,gBAAgB,E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AC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;YAEzG,qCAAqC;YACrC,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,GAAG,iBAAiB,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,GAAG,eAAe,CAAC,EAAE;gBAC9I,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,GAAG,IAAI,CAAC;aACtD;QACL,CAAC,CAAA,CAAA;QA1BG,IAAI,CAAC,eAAe,EAAE,CAAC,IAAI,EAAE,CAAC;IAClC,CAAC;CA0BJ;AAED,kBAAe,cAAc,CAAA"} \ No newline at end of file diff --git a/dist/tasks/downloadTask.js b/dist/tasks/downloadTask.js index 0895393..a0fd2e5 100644 --- a/dist/tasks/downloadTask.js +++ b/dist/tasks/downloadTask.js @@ -130,7 +130,7 @@ class DownloadTask { // Download file and place it on localhost let localDatabaseLocation = config.customConfig.localDatabaseFolderLocation + '/' + config.serverVariables.databaseName + '.sql'; if (config.settings.rsyncInstalled) { - yield console_1.localhostRsyncDownloadCommand(`~/${config.serverVariables.databaseName}.sql`, `${config.localDatabaseFolderLocation}`, config); + yield console_1.localhostRsyncDownloadCommand(`~/${config.serverVariables.databaseName}.sql`, `${config.customConfig.localDatabaseFolderLocation}`, config); } else { yield ssh.getFile(localDatabaseLocation, config.serverVariables.databaseName + '.sql').then(function (Contents) { @@ -143,7 +143,7 @@ class DownloadTask { if (config.databases.databaseData.wordpress && config.databases.databaseData.wordpress == true) { let wordpresslocalDatabaseLocation = config.customConfig.localDatabaseFolderLocation + '/' + config.wordpressConfig.database + '.sql'; if (config.settings.rsyncInstalled) { - yield console_1.localhostRsyncDownloadCommand(`~/${config.wordpressConfig.database}.sql`, `${config.localDatabaseFolderLocation}`, config); + yield console_1.localhostRsyncDownloadCommand(`~/${config.wordpressConfig.database}.sql`, `${config.customConfig.localDatabaseFolderLocation}`, config); } else { yield ssh.getFile(wordpresslocalDatabaseLocation, `${config.wordpressConfig.database}.sql`).then(function (Contents) { diff --git a/dist/tasks/downloadTask.js.map b/dist/tasks/downloadTask.js.map index 1abfc68..5c78041 100644 --- a/dist/tasks/downloadTask.js.map +++ b/dist/tasks/downloadTask.js.map @@ -1 +1 @@ -{"version":3,"file":"downloadTask.js","sourceRoot":"","sources":["../../src/tasks/downloadTask.ts"],"names":[],"mappings":";;;AAAA,8CAAyK;AAEzK,qGAAgE;AAEhE,MAAM,YAAY;IAAlB;QACY,kBAAa,GAAG,EAAE,CAAC;QAE3B,cAAS,GAAG,CAAO,IAAS,EAAE,MAAW,EAAE,GAAQ,EAAE,EAAE;YACnD,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;YACvC,OAAO,IAAI,CAAC;QAChB,CAAC,CAAA,CAAA;QAED,YAAY;QACZ,aAAQ,GAAG,CAAO,IAAS,EAAE,MAAW,EAAE,GAAQ,EAAE,EAAE;YAClD,IAAI,CAAC,GAAG,CACJ;gBACI,KAAK,EAAE,gCAAgC,GAAG,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,QAAQ,GAAG,GAAG;gBAC5F,IAAI,EAAE,CAAC,GAAQ,EAAE,IAAS,EAAS,EAAE,CACrC,IAAI,CAAC,QAAQ,CACT,IAAI,CAAC,aAAa,CACrB;aACJ,CACJ,CAAA;YAED,IAAI,CAAC,aAAa,CAAC,IAAI,CACnB;gBACI,KAAK,EAAE,kCAAkC;gBACzC,IAAI,EAAE,GAAwB,EAAE;oBAC5B,gCAAgC;oBAChC,MAAM,GAAG,CAAC,OAAO,CAAC;wBACd,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,YAAY,CAA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,GAAG,MAAM,CAAC,eAAe,CAAC,YAAY,GAAG,MAAM,CAAC,CAAC;oBAE5E,6CAA6C;oBAC7C,MAAM,GAAG,CAAC,WAAW,CAAC,yCAA+B,CAAC,KAAK,GAAG,MAAM,CAAC,eAAe,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;oBAE3G,mDAAmD;oBACnD,IAAI,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,SAAS,IAAI,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,SAAS,IAAI,IAAI,EAAE;wBAC5F,MAAM,GAAG,CAAC,WAAW,CAAC,MAAM,MAAM,CAAC,eAAe,CAAC,QAAQ,MAAM,CAAC,CAAC;qBACtE;oBAED,2BAA2B;oBAC3B,MAAM,GAAG,CAAC,OAAO,EAAE,CAAC;gBACxB,CAAC,CAAA;aACJ,CACJ,CAAC;QACN,CAAC,CAAA,CAAA;IACL,CAAC;CAAA;AAED,kBAAe,YAAY,CAAA"} \ No newline at end of file diff --git a/dist/tasks/wordpressConfigureTask.js b/dist/tasks/wordpressConfigureTask.js index 43f1013..8223181 100644 --- a/dist/tasks/wordpressConfigureTask.js +++ b/dist/tasks/wordpressConfigureTask.js @@ -35,6 +35,9 @@ class WordpressConfigureTask { // Replace blogs for localhost yield console_1.localhostMagentoRootExec(`cd wp; wp db query "UPDATE ${config.wordpressConfig.prefix}blogs SET domain = REPLACE(domain,'${wordpressUrl}', '${config.settings.magentoLocalhostDomainName}');"`, config); yield console_1.localhostMagentoRootExec(`cd wp; wp db query "UPDATE ${config.wordpressConfig.prefix}blogs SET domain = REPLACE(domain,'https://', 'http://');"`, config); + // Replace site for localhost + yield console_1.localhostMagentoRootExec(`cd wp; wp db query "UPDATE ${config.wordpressConfig.prefix}site SET domain = REPLACE(domain,'${wordpressUrl}', '${config.settings.magentoLocalhostDomainName}');"`, config); + yield console_1.localhostMagentoRootExec(`cd wp; wp db query "UPDATE ${config.wordpressConfig.prefix}site SET domain = REPLACE(domain,'https://', 'http://');"`, config); }) }); this.configureTasks.push({ diff --git a/dist/tasks/wordpressConfigureTask.js.map b/dist/tasks/wordpressConfigureTask.js.map index 2a8fb32..04709be 100644 --- a/dist/tasks/wordpressConfigureTask.js.map +++ b/dist/tasks/wordpressConfigureTask.js.map @@ -1 +1 @@ -{"version":3,"file":"wordpressConfigureTask.js","sourceRoot":"","sources":["../../src/tasks/wordpressConfigureTask.ts"],"names":[],"mappings":";;;AAAA,8CAAmM;AAInM,MAAM,sBAAsB;IAA5B;QACY,mBAAc,GAAG,EAAE,CAAC;QAE5B,cAAS,GAAG,CAAO,IAAS,EAAE,MAAW,EAAE,EAAE;YACzC,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YAClC,OAAO,IAAI,CAAC;QAChB,CAAC,CAAA,CAAA;QAED,YAAY;QACZ,aAAQ,GAAG,CAAO,IAAS,EAAE,MAAW,EAAE,EAAE;YACxC,IAAI,CAAC,GAAG,CACJ;gBACI,KAAK,EAAE,wCAAwC;gBAC/C,IAAI,EAAE,CAAC,GAAQ,EAAE,IAAS,EAAS,EAAE,CACrC,IAAI,CAAC,QAAQ,CACT,IAAI,CAAC,cAAc,CACtB;aACJ,CACJ,CAAA;YAED,IAAI,CAAC,cAAc,CAAC,IAAI,CACpB;gBACI,KAAK,EAAE,oBAAoB;gBAC3B,IAAI,EAAE,GAAwB,EAAE;oBAC5B,8BAA8B;oBAC9B,MAAM,kCAAwB,CAAC,MAAM,MAAM,CAAC,eAAe,CAAC,QAAQ,gCAAgC,MAAM,CAAC,eAAe,CAAC,QAAQ,MAAM,EAAE,MAAM,CAAC,CAAC;gBACvJ,CAAC,CAAA;aACJ,CACJ,CAAC;YAEF,IAAI,CAAC,cAAc,CAAC,IAAI,CACpB;gBACI,KAAK,EAAE,6BAA6B;gBACpC,IAAI,EAAE,GAAwB,EAAE;oBAC5B,0CAA0C;oBAC1C,IAAI,YAAY,GAAG,MAAM,kCAAwB,CAAC,gDAA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1,6 @@ { "name": "mage-db-sync", - "version": "0.2.5", + "version": "0.2.6", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a1e222e..85414c1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mage-db-sync", - "version": "0.2.5", + "version": "0.2.6", "description": "Database synchronizer for Magento, based on Magerun", "author": { "name": "Jelle Siderius" diff --git a/src/controllers/mainController.ts b/src/controllers/mainController.ts index 88a650d..e27f2f1 100644 --- a/src/controllers/mainController.ts +++ b/src/controllers/mainController.ts @@ -67,17 +67,17 @@ class MainController { public databases = new DatabasesModel(); constructor() { - this.configureConfig(); + this.configureConfig().then(); } - configureConfig = () => { + configureConfig = async () => { // Fetch SSH key location if (!this.config.customConfig.sshKeyLocation) { this.config.customConfig.sshKeyLocation = os.userInfo().homedir + '/.ssh/id_rsa'; - } + } // Check if rsync is installed locally - let rsyncCheck = consoleCommand('which rsync'); + let rsyncCheck = await consoleCommand('which rsync'); // @ts-ignore if (rsyncCheck.length > 0) { this.config.settings.rsyncInstalled = true; diff --git a/src/tasks/downloadTask.ts b/src/tasks/downloadTask.ts index 79b8c29..5979a1d 100644 --- a/src/tasks/downloadTask.ts +++ b/src/tasks/downloadTask.ts @@ -162,7 +162,7 @@ class DownloadTask { let localDatabaseLocation = config.customConfig.localDatabaseFolderLocation + '/' + config.serverVariables.databaseName + '.sql'; if (config.settings.rsyncInstalled) { - await localhostRsyncDownloadCommand(`~/${config.serverVariables.databaseName}.sql`, `${config.localDatabaseFolderLocation}`, config); + await localhostRsyncDownloadCommand(`~/${config.serverVariables.databaseName}.sql`, `${config.customConfig.localDatabaseFolderLocation}`, config); } else { await ssh.getFile(localDatabaseLocation, config.serverVariables.databaseName + '.sql').then(function (Contents: any) { }, function (error: any) { @@ -177,7 +177,7 @@ class DownloadTask { let wordpresslocalDatabaseLocation = config.customConfig.localDatabaseFolderLocation + '/' + config.wordpressConfig.database + '.sql'; if (config.settings.rsyncInstalled) { - await localhostRsyncDownloadCommand(`~/${config.wordpressConfig.database}.sql`, `${config.localDatabaseFolderLocation}`, config); + await localhostRsyncDownloadCommand(`~/${config.wordpressConfig.database}.sql`, `${config.customConfig.localDatabaseFolderLocation}`, config); } else { await ssh.getFile(wordpresslocalDatabaseLocation, `${config.wordpressConfig.database}.sql`).then(function (Contents: any) { }, function (error: any) { diff --git a/src/tasks/wordpressConfigureTask.ts b/src/tasks/wordpressConfigureTask.ts index 382a725..2f2e03e 100644 --- a/src/tasks/wordpressConfigureTask.ts +++ b/src/tasks/wordpressConfigureTask.ts @@ -46,6 +46,9 @@ class WordpressConfigureTask { // Replace blogs for localhost await localhostMagentoRootExec(`cd wp; wp db query "UPDATE ${config.wordpressConfig.prefix}blogs SET domain = REPLACE(domain,'${wordpressUrl}', '${config.settings.magentoLocalhostDomainName}');"`, config); await localhostMagentoRootExec(`cd wp; wp db query "UPDATE ${config.wordpressConfig.prefix}blogs SET domain = REPLACE(domain,'https://', 'http://');"`, config); + // Replace site for localhost + await localhostMagentoRootExec(`cd wp; wp db query "UPDATE ${config.wordpressConfig.prefix}site SET domain = REPLACE(domain,'${wordpressUrl}', '${config.settings.magentoLocalhostDomainName}');"`, config); + await localhostMagentoRootExec(`cd wp; wp db query "UPDATE ${config.wordpressConfig.prefix}site SET domain = REPLACE(domain,'https://', 'http://');"`, config); } } ); diff --git a/tsconfig.json b/tsconfig.json index 53e0bda..c799f20 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,7 +24,7 @@ "sourceMap": true, "allowJs": true, "noEmit": false, - "watch": false + "watch": true }, "include": [ "./src/**/*"