From 9830b475eb6e06ec11d7259edf829422b26bfe91 Mon Sep 17 00:00:00 2001 From: Jelle Siderius Date: Tue, 30 Jan 2024 17:11:22 +0100 Subject: [PATCH] Release 1.2.9 --- dist/tasks/checksTask.js | 11 +++++++++++ dist/tasks/checksTask.js.map | 2 +- package-lock.json | 2 +- package.json | 2 +- src/tasks/checksTask.ts | 15 +++++++++++++++ 5 files changed, 29 insertions(+), 3 deletions(-) diff --git a/dist/tasks/checksTask.js b/dist/tasks/checksTask.js index 565e524..8afa1c2 100644 --- a/dist/tasks/checksTask.js +++ b/dist/tasks/checksTask.js @@ -70,6 +70,17 @@ class ChecksTask { throw new Error(`env.php is missing, make sure ${envFileLocation} exists.`); }) }); + // Check if vendor folder exists before downloading + this.checkTasks.push({ + title: 'Checking if vendor/autoload.php file exists', + task: () => tslib_1.__awaiter(this, void 0, void 0, function* () { + let vendorFileLocation = config.settings.currentFolder + '/vendor/autoload.php'; + if (fs.existsSync(vendorFileLocation)) { + return true; + } + throw new Error(`vendor/autoload.php is missing, make sure ${vendorFileLocation} exists.`); + }) + }); this.checkTasks.push({ title: 'Checking if database host is set to localhost', task: () => tslib_1.__awaiter(this, void 0, void 0, function* () { diff --git a/dist/tasks/checksTask.js.map b/dist/tasks/checksTask.js.map index 38b2ca3..c53e336 100644 --- a/dist/tasks/checksTask.js.map +++ b/dist/tasks/checksTask.js.map @@ -1 +1 @@ -{"version":3,"file":"checksTask.js","sourceRoot":"","sources":["../../src/tasks/checksTask.ts"],"names":[],"mappings":";;;AAAA,+CAAwB;AAExB,8CAA0E;AAC1E,uFAAmD;AAEnD,MAAM,UAAU;IAAhB;QACY,eAAU,GAAG,EAAE,CAAC;QAExB,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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E;gCACrE,OAAO,IAAI,CAAC;6BACf;4BAED,MAAM,IAAI,KAAK,CAAC,0EAA0E,OAAO,sBAAsB,CAAC,CAAC;wBAC7H,CAAC,CAAA;qBACJ,CACJ,CAAC;iBACL;aACJ;YAED,mDAAmD;YACnD,IAAI,CAAC,UAAU,CAAC,IAAI,CAChB;gBACI,KAAK,EAAE,oCAAoC;gBAC3C,IAAI,EAAE,GAA2B,EAAE;oBAC/B,IAAI,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,2BAA2B,CAAC,EAAE;wBAChE,OAAO,IAAI,CAAC;qBACf;oBAED,MAAM,IAAI,KAAK,CAAC,mBAAmB,MAAM,CAAC,YAAY,CAAC,2BAA2B,iEAAiE,CAAC,CAAC;gBACzJ,CAAC,CAAA;aACJ,CACJ,CAAC;YAEF,0BAA0B;YAC1B,IAAI,CAAC,UAAU,CAAC,IAAI,CAChB;gBACI,KAAK,EAAE,4BAA4B;gBACnC,IAAI,EAAE,GAA2B,EAAE;oBAC/B,IAAI,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,cAAc,CAAC,EAAE;wBACnD,OAAO,IAAI,CAAC;qBACf;oBAED,MAAM,IAAI,KAAK,CAAC,WAAW,MAAM,CAAC,YAAY,CAAC,cAAc,iEAAiE,CAAC,CAAC;gBACpI,CAAC,CAAA;aACJ,CACJ,CAAC;QACN,CAAC,CAAA,CAAA;IACL,CAAC;CAAA;AAED,kBAAe,UAAU,CAAA"} \ No newline at end of file +{"version":3,"file":"checksTask.js","sourceRoot":"","sources":["../../src/tasks/checksTask.ts"],"names":[],"mappings":";;;AAAA,+CAAwB;AAExB,8CAA0E;AAC1E,uFAAmD;AAEnD,MAAM,UAAU;IAAhB;QACY,eAAU,GAAG,EAAE,CAAC;QAExB,cAAS,GAAG,CAAO,IAAS,EAAE,MAAW,EAAE,GAAQ,EAAE,EAAE;YACnD,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,MAA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C,WAAW,MAAM,CAAC,YAAY,CAAC,cAAc,iEAAiE,CAAC,CAAC;gBACpI,CAAC,CAAA;aACJ,CACJ,CAAC;QACN,CAAC,CAAA,CAAA;IACL,CAAC;CAAA;AAED,kBAAe,UAAU,CAAA"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 9bfb574..f4cd8d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "mage-db-sync", - "version": "1.2.8", + "version": "1.2.9", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 050cb25..fb9997d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mage-db-sync", - "version": "1.2.8", + "version": "1.2.9", "description": "Database synchronizer for Magento, based on Magerun", "author": { "name": "Jelle Siderius" diff --git a/src/tasks/checksTask.ts b/src/tasks/checksTask.ts index b1e9fb0..a51ba4d 100644 --- a/src/tasks/checksTask.ts +++ b/src/tasks/checksTask.ts @@ -93,6 +93,21 @@ class ChecksTask { } ); + // Check if vendor folder exists before downloading + this.checkTasks.push( + { + title: 'Checking if vendor/autoload.php file exists', + task: async (): Promise => { + let vendorFileLocation = config.settings.currentFolder + '/vendor/autoload.php'; + if (fs.existsSync(vendorFileLocation)) { + return true; + } + + throw new Error(`vendor/autoload.php is missing, make sure ${vendorFileLocation} exists.`); + } + } + ); + this.checkTasks.push( { title: 'Checking if database host is set to localhost',