@bprotsyk/aso-core 2.0.35 → 2.0.36
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.
|
@@ -32,7 +32,7 @@ export declare class ServerUtil {
|
|
|
32
32
|
uploadDirectoryToSftp(localDir: string, remoteDir: string, sftpConfig: any): Promise<void>;
|
|
33
33
|
ensureDirectoryExistence(dirPath: string): void;
|
|
34
34
|
generateNginxConfig(domain: string, rootPath: string): Promise<string>;
|
|
35
|
-
extractUploadedZip(name: string, file: any): Promise<void>;
|
|
35
|
+
extractUploadedZip(name: string, file: any, extractToPath: string): Promise<void>;
|
|
36
36
|
ensureDirectoryExistsViaSSH(sshConfig: ISFTP, remoteDir: string): Promise<void>;
|
|
37
37
|
}
|
|
38
38
|
export {};
|
package/lib/utils/server-util.js
CHANGED
|
@@ -212,9 +212,9 @@ class ServerUtil {
|
|
|
212
212
|
const config = mustache_1.default.render(template, { domain, rootPath });
|
|
213
213
|
return config;
|
|
214
214
|
}
|
|
215
|
-
async extractUploadedZip(name, file) {
|
|
215
|
+
async extractUploadedZip(name, file, extractToPath) {
|
|
216
216
|
const zipFilePath = file.path;
|
|
217
|
-
const outputDir = path_1.default.join(
|
|
217
|
+
const outputDir = path_1.default.join(extractToPath, name);
|
|
218
218
|
console.log('Looking for ZIP file at:', zipFilePath);
|
|
219
219
|
console.log('Extracting to:', outputDir);
|
|
220
220
|
this.ensureDirectoryExistence(outputDir);
|
package/package.json
CHANGED
package/src/utils/server-util.ts
CHANGED
|
@@ -267,9 +267,9 @@ export class ServerUtil {
|
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
|
|
270
|
-
async extractUploadedZip(name:string, file:any) {
|
|
270
|
+
async extractUploadedZip(name:string, file:any, extractToPath:string ) {
|
|
271
271
|
const zipFilePath = file.path;
|
|
272
|
-
const outputDir = path.join(
|
|
272
|
+
const outputDir = path.join(extractToPath, name);
|
|
273
273
|
|
|
274
274
|
console.log('Looking for ZIP file at:', zipFilePath);
|
|
275
275
|
console.log('Extracting to:', outputDir);
|