@milaboratories/pl-deployments 1.1.14 → 1.1.15
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/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -23
- package/dist/index.mjs.map +1 -1
- package/dist/ssh/pl.d.ts +2 -2
- package/dist/ssh/pl.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/ssh/pl.ts +7 -6
package/src/ssh/pl.ts
CHANGED
|
@@ -100,13 +100,13 @@ export class SshPl {
|
|
|
100
100
|
|
|
101
101
|
/** Stops platforma and deletes its state. */
|
|
102
102
|
public async stopAndClean(): Promise<void> {
|
|
103
|
-
const
|
|
103
|
+
const remoteHome = await this.getUserHomeDirectory();
|
|
104
104
|
|
|
105
105
|
this.logger.info(`pl.reset: Stop Platforma on the server`);
|
|
106
106
|
await this.stop();
|
|
107
107
|
|
|
108
|
-
this.logger.info(`pl.reset: Deleting Platforma workDir ${workDir} on the server`);
|
|
109
|
-
await this.sshClient.deleteFolder(plpath.workDir(
|
|
108
|
+
this.logger.info(`pl.reset: Deleting Platforma workDir ${plpath.workDir(remoteHome)} on the server`);
|
|
109
|
+
await this.sshClient.deleteFolder(plpath.workDir(remoteHome));
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
/** Downloads binaries and untar them on the server,
|
|
@@ -310,6 +310,7 @@ export class SshPl {
|
|
|
310
310
|
|
|
311
311
|
await this.sshClient.ensureRemoteDirCreated(state.remoteDir);
|
|
312
312
|
await this.sshClient.uploadFile(state.localArchivePath, state.remoteArchivePath);
|
|
313
|
+
state.uploadDone = true;
|
|
313
314
|
|
|
314
315
|
// TODO: Create a proper archive to avoid xattr warnings
|
|
315
316
|
const untarResult = await this.sshClient.exec(
|
|
@@ -319,7 +320,7 @@ export class SshPl {
|
|
|
319
320
|
if (untarResult.stderr)
|
|
320
321
|
throw Error(`downloadAndUntar: untar: stderr occurred: ${untarResult.stderr}, stdout: ${untarResult.stdout}`);
|
|
321
322
|
|
|
322
|
-
state.
|
|
323
|
+
state.untarDone = true;
|
|
323
324
|
|
|
324
325
|
return state;
|
|
325
326
|
}
|
|
@@ -469,8 +470,8 @@ type DownloadAndUntarState = {
|
|
|
469
470
|
localArchivePath?: string;
|
|
470
471
|
remoteDir?: string;
|
|
471
472
|
remoteArchivePath?: string;
|
|
472
|
-
|
|
473
|
-
|
|
473
|
+
uploadDone?: boolean;
|
|
474
|
+
untarDone?: boolean;
|
|
474
475
|
};
|
|
475
476
|
|
|
476
477
|
type PlatformaInitState = {
|