Skip to content

Commit

Permalink
Release 1.3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
jellesiderius committed Aug 8, 2024
1 parent 4a97265 commit 6e1fc6e
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 9 deletions.
6 changes: 4 additions & 2 deletions config/databases/production.json.sample
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"localProjectUrl": "example1.development",
"wordpress": false,
"commandsFolder": "commands/example-project",
"stagingUsername": "staging-username-1-placeholder"
"stagingUsername": "staging-username-1-placeholder",
"sshKeyName": "id_ed25519, will search in ~/ssh/"
},
"production-username-2-placeholder": {
"username": "example2",
Expand All @@ -26,7 +27,8 @@
"localProjectUrl": "example2.development",
"wordpress": false,
"commandsFolder": "commands/example-project",
"stagingUsername": "staging-username-2-placeholder"
"stagingUsername": "staging-username-2-placeholder",
"sshKeyName": "id_ed25519, will search in ~/ssh/"
}
}
}
6 changes: 4 additions & 2 deletions config/databases/staging.json.sample
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"externalPhpPath": "",
"localProjectUrl": "example1.development",
"wordpress": false,
"commandsFolder": "commands/example-project"
"commandsFolder": "commands/example-project",
"sshKeyName": "id_ed25519, will search in ~/ssh/"
},
"staging-username-2-placeholder": {
"username": "example2",
Expand All @@ -24,7 +25,8 @@
"externalPhpPath": "",
"localProjectUrl": "example2.development",
"wordpress": false,
"commandsFolder": "commands/example-project"
"commandsFolder": "commands/example-project",
"sshKeyName": "id_ed25519, will search in ~/ssh/"
}
}
}
9 changes: 8 additions & 1 deletion dist/models/databasesModel.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/models/databasesModel.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mage-db-sync",
"version": "1.3.6",
"version": "1.3.7",
"description": "Database synchronizer for Magento, based on Magerun",
"author": {
"name": "Jelle Siderius"
Expand Down
9 changes: 8 additions & 1 deletion src/models/databasesModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import stagingDatabases from "../../config/databases/staging.json";
import productionDatabases from "../../config/databases/production.json";
import path from "path";
import fs from "fs";
import os from "os";

class DatabasesModel {
public databasesList: { [k: string]: any } = [];
Expand All @@ -20,7 +21,8 @@ class DatabasesModel {
'localProjectUrl': '',
'commandsFolder': '',
'stagingUsername': '',
'externalElasticsearchPort': ''
'externalElasticsearchPort': '',
'sshKeyLocation': ''
};

public databaseDataSecond = {
Expand Down Expand Up @@ -78,6 +80,11 @@ class DatabasesModel {
// @ts-ignore
databaseDataType.externalElasticsearchPort = database.externalElasticsearchPort;
}
// @ts-ignore
if (database.sshKeyName) {
// @ts-ignore
config.customConfig.sshKeyLocation = os.userInfo().homedir + '/.ssh/' + database.sshKeyName;
}

// @ts-ignore
if (database.commandsFolder) {
Expand Down

0 comments on commit 6e1fc6e

Please sign in to comment.