@bprotsyk/aso-core 2.0.20 → 2.0.21
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.
package/lib/utils/server-util.js
CHANGED
|
@@ -9,7 +9,6 @@ const child_process_1 = __importDefault(require("child_process"));
|
|
|
9
9
|
const ssh2_sftp_client_1 = __importDefault(require("ssh2-sftp-client"));
|
|
10
10
|
const fs_1 = __importDefault(require("fs"));
|
|
11
11
|
const mustache_1 = __importDefault(require("mustache"));
|
|
12
|
-
const path_1 = __importDefault(require("path"));
|
|
13
12
|
const { promisify } = require("util");
|
|
14
13
|
const execPromise = promisify(child_process_1.default.exec);
|
|
15
14
|
exports.IP = "185.123.53.227";
|
|
@@ -181,8 +180,7 @@ class ServerUtil {
|
|
|
181
180
|
}
|
|
182
181
|
}
|
|
183
182
|
async generateNginxConfig(domain, rootPath) {
|
|
184
|
-
const
|
|
185
|
-
const template = fs_1.default.readFileSync(templatePath, "utf8");
|
|
183
|
+
const template = fs_1.default.readFileSync("templates/nginx-template.conf", "utf8");
|
|
186
184
|
const config = mustache_1.default.render(template, { domain, rootPath });
|
|
187
185
|
return config;
|
|
188
186
|
}
|
package/package.json
CHANGED
package/src/utils/server-util.ts
CHANGED
|
@@ -3,7 +3,6 @@ import ChildProcess from "child_process";
|
|
|
3
3
|
import Client from "ssh2-sftp-client";
|
|
4
4
|
import fs from "fs";
|
|
5
5
|
import mustache from "mustache";
|
|
6
|
-
import path from "path";
|
|
7
6
|
const { promisify } = require("util");
|
|
8
7
|
const execPromise = promisify(ChildProcess.exec);
|
|
9
8
|
|
|
@@ -220,8 +219,7 @@ export class ServerUtil {
|
|
|
220
219
|
}
|
|
221
220
|
|
|
222
221
|
async generateNginxConfig(domain: string, rootPath: string): Promise<string> {
|
|
223
|
-
const
|
|
224
|
-
const template = fs.readFileSync(templatePath, "utf8");
|
|
222
|
+
const template = fs.readFileSync("templates/nginx-template.conf", "utf8");
|
|
225
223
|
const config = mustache.render(template, { domain, rootPath });
|
|
226
224
|
return config;
|
|
227
225
|
}
|