@milaboratories/pl-deployments 2.15.17 → 2.15.19
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/_virtual/_rolldown/runtime.cjs +29 -0
- package/dist/common/os_and_arch.cjs +22 -28
- package/dist/common/os_and_arch.cjs.map +1 -1
- package/dist/common/os_and_arch.js +23 -26
- package/dist/common/os_and_arch.js.map +1 -1
- package/dist/common/pl_binary.cjs +35 -33
- package/dist/common/pl_binary.cjs.map +1 -1
- package/dist/common/pl_binary.d.ts +13 -18
- package/dist/common/pl_binary.js +33 -31
- package/dist/common/pl_binary.js.map +1 -1
- package/dist/common/pl_binary_download.cjs +143 -155
- package/dist/common/pl_binary_download.cjs.map +1 -1
- package/dist/common/pl_binary_download.d.ts +15 -48
- package/dist/common/pl_binary_download.js +138 -133
- package/dist/common/pl_binary_download.js.map +1 -1
- package/dist/common/pl_version.cjs +5 -6
- package/dist/common/pl_version.cjs.map +1 -1
- package/dist/common/pl_version.d.ts +4 -1
- package/dist/common/pl_version.js +5 -4
- package/dist/common/pl_version.js.map +1 -1
- package/dist/index.cjs +21 -25
- package/dist/index.d.ts +6 -6
- package/dist/index.js +7 -6
- package/dist/local/pid.cjs +14 -13
- package/dist/local/pid.cjs.map +1 -1
- package/dist/local/pid.js +11 -11
- package/dist/local/pid.js.map +1 -1
- package/dist/local/pl.cjs +194 -223
- package/dist/local/pl.cjs.map +1 -1
- package/dist/local/pl.d.ts +65 -65
- package/dist/local/pl.js +190 -202
- package/dist/local/pl.js.map +1 -1
- package/dist/local/process.cjs +37 -59
- package/dist/local/process.cjs.map +1 -1
- package/dist/local/process.d.ts +10 -10
- package/dist/local/process.js +36 -57
- package/dist/local/process.js.map +1 -1
- package/dist/local/trace.cjs +14 -17
- package/dist/local/trace.cjs.map +1 -1
- package/dist/local/trace.d.ts +6 -7
- package/dist/local/trace.js +15 -15
- package/dist/local/trace.js.map +1 -1
- package/dist/package.cjs +12 -0
- package/dist/package.cjs.map +1 -0
- package/dist/package.js +6 -0
- package/dist/package.js.map +1 -0
- package/dist/ssh/connection_info.cjs +36 -53
- package/dist/ssh/connection_info.cjs.map +1 -1
- package/dist/ssh/connection_info.d.ts +691 -713
- package/dist/ssh/connection_info.js +35 -51
- package/dist/ssh/connection_info.js.map +1 -1
- package/dist/ssh/pl.cjs +551 -638
- package/dist/ssh/pl.cjs.map +1 -1
- package/dist/ssh/pl.d.ts +120 -117
- package/dist/ssh/pl.js +548 -636
- package/dist/ssh/pl.js.map +1 -1
- package/dist/ssh/pl_paths.cjs +22 -24
- package/dist/ssh/pl_paths.cjs.map +1 -1
- package/dist/ssh/pl_paths.js +21 -19
- package/dist/ssh/pl_paths.js.map +1 -1
- package/dist/ssh/ssh.cjs +554 -618
- package/dist/ssh/ssh.cjs.map +1 -1
- package/dist/ssh/ssh.d.ts +139 -136
- package/dist/ssh/ssh.js +548 -616
- package/dist/ssh/ssh.js.map +1 -1
- package/dist/ssh/ssh_errors.cjs +45 -60
- package/dist/ssh/ssh_errors.cjs.map +1 -1
- package/dist/ssh/ssh_errors.js +45 -58
- package/dist/ssh/ssh_errors.js.map +1 -1
- package/dist/ssh/supervisord.cjs +50 -68
- package/dist/ssh/supervisord.cjs.map +1 -1
- package/dist/ssh/supervisord.d.ts +11 -21
- package/dist/ssh/supervisord.js +50 -66
- package/dist/ssh/supervisord.js.map +1 -1
- package/package.json +10 -10
- package/dist/common/os_and_arch.d.ts +0 -9
- package/dist/common/os_and_arch.d.ts.map +0 -1
- package/dist/common/pl_binary.d.ts.map +0 -1
- package/dist/common/pl_binary_download.d.ts.map +0 -1
- package/dist/common/pl_version.d.ts.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/local/options.d.ts +0 -31
- package/dist/local/options.d.ts.map +0 -1
- package/dist/local/pid.d.ts +0 -4
- package/dist/local/pid.d.ts.map +0 -1
- package/dist/local/pl.d.ts.map +0 -1
- package/dist/local/process.d.ts.map +0 -1
- package/dist/local/trace.d.ts.map +0 -1
- package/dist/package.json.cjs +0 -8
- package/dist/package.json.cjs.map +0 -1
- package/dist/package.json.js +0 -6
- package/dist/package.json.js.map +0 -1
- package/dist/ssh/__tests__/common-utils.d.ts +0 -12
- package/dist/ssh/__tests__/common-utils.d.ts.map +0 -1
- package/dist/ssh/connection_info.d.ts.map +0 -1
- package/dist/ssh/pl.d.ts.map +0 -1
- package/dist/ssh/pl_paths.d.ts +0 -20
- package/dist/ssh/pl_paths.d.ts.map +0 -1
- package/dist/ssh/ssh.d.ts.map +0 -1
- package/dist/ssh/ssh_errors.d.ts +0 -29
- package/dist/ssh/ssh_errors.d.ts.map +0 -1
- package/dist/ssh/supervisord.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supervisord.cjs","sources":["../../src/ssh/supervisord.ts"],"sourcesContent":["/** Provides helper functions to work with supervisord */\n\nimport type { MiLogger } from \"@milaboratories/ts-helpers\";\nimport * as plpath from \"./pl_paths\";\nimport type { SshClient, SshExecResult } from \"./ssh\";\nimport { randomBytes } from \"node:crypto\";\n\nexport async function supervisorCtlStart(sshClient: SshClient, remoteHome: string, arch: string) {\n const result = await supervisorExec(sshClient, remoteHome, arch, \"--daemon\");\n\n if (result.stderr) {\n throw new Error(`Can not run ssh Platforma ${result.stderr}`);\n }\n}\n\nexport async function supervisorStop(sshClient: SshClient, remoteHome: string, arch: string) {\n const result = await supervisorExec(sshClient, remoteHome, arch, \"ctl shutdown\");\n\n if (result.stderr) {\n throw new Error(`Can not stop ssh Platforma ${result.stderr}`);\n }\n}\n\n/** Provides a simple true/false response got from supervisord status\n * along with a debug info that could be showed in error logs (raw response from the command, parsed response etc). */\nexport type SupervisorStatus = {\n platforma?: boolean;\n minio?: boolean;\n rawResult?: SshExecResult;\n execError?: string;\n};\n\nexport function isAllAlive(status: SupervisorStatus, shouldUseMinio: boolean) {\n if (shouldUseMinio) {\n return status.platforma && status.minio;\n }\n\n return status.platforma;\n}\n\nexport function isSupervisordRunning(status: SupervisorStatus) {\n return status.execError === undefined;\n}\n\nexport async function supervisorStatus(\n logger: MiLogger,\n sshClient: SshClient,\n remoteHome: string,\n arch: string,\n): Promise<SupervisorStatus> {\n let result: SshExecResult;\n try {\n result = await supervisorExec(sshClient, remoteHome, arch, \"ctl status\");\n } catch (e: unknown) {\n return { execError: String(e) };\n }\n\n if (result.stderr) {\n logger.info(\n `supervisord ctl status: stderr occurred: ${result.stderr}, stdout: ${result.stdout}`,\n );\n\n return { rawResult: result };\n }\n\n const platforma = isProgramRunning(result.stdout, \"platforma\");\n const minio = isProgramRunning(result.stdout, \"minio\");\n const status: SupervisorStatus = {\n rawResult: result,\n platforma,\n minio,\n };\n\n if (!status.minio) {\n logger.warn(\"Minio is not running on the server\");\n }\n\n if (!status.platforma) {\n logger.warn(\"Platforma is not running on the server\");\n }\n\n return status;\n}\n\n/** Generates the config for supervisord.\n * docs: https://github.com/ochinchina/supervisord?tab=readme-ov-file#supervised-program-settings\n */\nexport function generateSupervisordConfig(\n supervisorRemotePort: number,\n remoteWorkDir: string,\n platformaConfigPath: string,\n plPath: string,\n) {\n const password = randomBytes(16).toString(\"hex\");\n const freePort = supervisorRemotePort;\n\n return `\n[supervisord]\nlogfile=${remoteWorkDir}/supervisord.log\nloglevel=info\npidfile=${remoteWorkDir}/supervisord.pid\n\n[inet_http_server]\nport=127.0.0.1:${freePort}\nusername=default-user\npassword=${password}\n\n[supervisorctl]\nserverurl=http://127.0.0.1:${freePort}\nusername=default-user\npassword=${password}\n\n[program:platforma]\nautostart=true\ncommand=${plPath} --config ${platformaConfigPath}\ndirectory=${remoteWorkDir}\nautorestart=true\nstdout_logfile=${remoteWorkDir}/platforma_cli_logs.log\nstdout_logfile_maxbytes=10000\nstdout_logfile_backups=10\nredirect_stderr=true\n`;\n}\n\n/** @deprecated, we use minio only on old deployments that existed before we remove minio,\n * for new servers use generation of the config above. */\nexport function generateSupervisordConfigWithMinio(\n minioStorageDir: string,\n minioEnvs: Record<string, string>,\n supervisorRemotePort: number,\n remoteWorkDir: string,\n platformaConfigPath: string,\n\n minioPath: string,\n plPath: string,\n) {\n const minioEnvStr = Object.entries(minioEnvs)\n .map(([key, value]) => `${key}=\"${value}\"`)\n .join(\",\");\n const password = randomBytes(16).toString(\"hex\");\n const freePort = supervisorRemotePort;\n\n return `\n[supervisord]\nlogfile=${remoteWorkDir}/supervisord.log\nloglevel=info\npidfile=${remoteWorkDir}/supervisord.pid\n\n[inet_http_server]\nport=127.0.0.1:${freePort}\nusername=default-user\npassword=${password}\n\n[supervisorctl]\nserverurl=http://127.0.0.1:${freePort}\nusername=default-user\npassword=${password}\n\n[program:platforma]\nautostart=true\ndepends_on=minio\ncommand=${plPath} --config ${platformaConfigPath}\ndirectory=${remoteWorkDir}\nautorestart=true\n\n[program:minio]\nautostart=true\nenvironment=${minioEnvStr}\ncommand=${minioPath} server ${minioStorageDir}\ndirectory=${remoteWorkDir}\nautorestart=true\n`;\n}\n\nexport async function supervisorExec(\n sshClient: SshClient,\n remoteHome: string,\n arch: string,\n command: string,\n) {\n const supervisorCmd = plpath.supervisorBin(remoteHome, arch);\n const supervisorConf = plpath.supervisorConf(remoteHome);\n\n const cmd = `${supervisorCmd} --configuration ${supervisorConf} ${command}`;\n return await sshClient.exec(cmd);\n}\n\nfunction isProgramRunning(output: string, programName: string) {\n // eslint-disable-next-line no-control-regex\n const stripAnsi = (str: string) => str.replace(/\\x1B\\[[0-9;]*m/g, \"\");\n\n const cleanedOutput = stripAnsi(output);\n\n return cleanedOutput.split(\"\\n\").some((line) => {\n const [name, status] = line.trim().split(/\\s{2,}/); // Split string by 2 spaces.\n\n return name === programName && status === \"Running\";\n });\n}\n"],"
|
|
1
|
+
{"version":3,"file":"supervisord.cjs","names":[],"sources":["../../src/ssh/supervisord.ts"],"sourcesContent":["/** Provides helper functions to work with supervisord */\n\nimport type { MiLogger } from \"@milaboratories/ts-helpers\";\nimport * as plpath from \"./pl_paths\";\nimport type { SshClient, SshExecResult } from \"./ssh\";\nimport { randomBytes } from \"node:crypto\";\n\nexport async function supervisorCtlStart(sshClient: SshClient, remoteHome: string, arch: string) {\n const result = await supervisorExec(sshClient, remoteHome, arch, \"--daemon\");\n\n if (result.stderr) {\n throw new Error(`Can not run ssh Platforma ${result.stderr}`);\n }\n}\n\nexport async function supervisorStop(sshClient: SshClient, remoteHome: string, arch: string) {\n const result = await supervisorExec(sshClient, remoteHome, arch, \"ctl shutdown\");\n\n if (result.stderr) {\n throw new Error(`Can not stop ssh Platforma ${result.stderr}`);\n }\n}\n\n/** Provides a simple true/false response got from supervisord status\n * along with a debug info that could be showed in error logs (raw response from the command, parsed response etc). */\nexport type SupervisorStatus = {\n platforma?: boolean;\n minio?: boolean;\n rawResult?: SshExecResult;\n execError?: string;\n};\n\nexport function isAllAlive(status: SupervisorStatus, shouldUseMinio: boolean) {\n if (shouldUseMinio) {\n return status.platforma && status.minio;\n }\n\n return status.platforma;\n}\n\nexport function isSupervisordRunning(status: SupervisorStatus) {\n return status.execError === undefined;\n}\n\nexport async function supervisorStatus(\n logger: MiLogger,\n sshClient: SshClient,\n remoteHome: string,\n arch: string,\n): Promise<SupervisorStatus> {\n let result: SshExecResult;\n try {\n result = await supervisorExec(sshClient, remoteHome, arch, \"ctl status\");\n } catch (e: unknown) {\n return { execError: String(e) };\n }\n\n if (result.stderr) {\n logger.info(\n `supervisord ctl status: stderr occurred: ${result.stderr}, stdout: ${result.stdout}`,\n );\n\n return { rawResult: result };\n }\n\n const platforma = isProgramRunning(result.stdout, \"platforma\");\n const minio = isProgramRunning(result.stdout, \"minio\");\n const status: SupervisorStatus = {\n rawResult: result,\n platforma,\n minio,\n };\n\n if (!status.minio) {\n logger.warn(\"Minio is not running on the server\");\n }\n\n if (!status.platforma) {\n logger.warn(\"Platforma is not running on the server\");\n }\n\n return status;\n}\n\n/** Generates the config for supervisord.\n * docs: https://github.com/ochinchina/supervisord?tab=readme-ov-file#supervised-program-settings\n */\nexport function generateSupervisordConfig(\n supervisorRemotePort: number,\n remoteWorkDir: string,\n platformaConfigPath: string,\n plPath: string,\n) {\n const password = randomBytes(16).toString(\"hex\");\n const freePort = supervisorRemotePort;\n\n return `\n[supervisord]\nlogfile=${remoteWorkDir}/supervisord.log\nloglevel=info\npidfile=${remoteWorkDir}/supervisord.pid\n\n[inet_http_server]\nport=127.0.0.1:${freePort}\nusername=default-user\npassword=${password}\n\n[supervisorctl]\nserverurl=http://127.0.0.1:${freePort}\nusername=default-user\npassword=${password}\n\n[program:platforma]\nautostart=true\ncommand=${plPath} --config ${platformaConfigPath}\ndirectory=${remoteWorkDir}\nautorestart=true\nstdout_logfile=${remoteWorkDir}/platforma_cli_logs.log\nstdout_logfile_maxbytes=10000\nstdout_logfile_backups=10\nredirect_stderr=true\n`;\n}\n\n/** @deprecated, we use minio only on old deployments that existed before we remove minio,\n * for new servers use generation of the config above. */\nexport function generateSupervisordConfigWithMinio(\n minioStorageDir: string,\n minioEnvs: Record<string, string>,\n supervisorRemotePort: number,\n remoteWorkDir: string,\n platformaConfigPath: string,\n\n minioPath: string,\n plPath: string,\n) {\n const minioEnvStr = Object.entries(minioEnvs)\n .map(([key, value]) => `${key}=\"${value}\"`)\n .join(\",\");\n const password = randomBytes(16).toString(\"hex\");\n const freePort = supervisorRemotePort;\n\n return `\n[supervisord]\nlogfile=${remoteWorkDir}/supervisord.log\nloglevel=info\npidfile=${remoteWorkDir}/supervisord.pid\n\n[inet_http_server]\nport=127.0.0.1:${freePort}\nusername=default-user\npassword=${password}\n\n[supervisorctl]\nserverurl=http://127.0.0.1:${freePort}\nusername=default-user\npassword=${password}\n\n[program:platforma]\nautostart=true\ndepends_on=minio\ncommand=${plPath} --config ${platformaConfigPath}\ndirectory=${remoteWorkDir}\nautorestart=true\n\n[program:minio]\nautostart=true\nenvironment=${minioEnvStr}\ncommand=${minioPath} server ${minioStorageDir}\ndirectory=${remoteWorkDir}\nautorestart=true\n`;\n}\n\nexport async function supervisorExec(\n sshClient: SshClient,\n remoteHome: string,\n arch: string,\n command: string,\n) {\n const supervisorCmd = plpath.supervisorBin(remoteHome, arch);\n const supervisorConf = plpath.supervisorConf(remoteHome);\n\n const cmd = `${supervisorCmd} --configuration ${supervisorConf} ${command}`;\n return await sshClient.exec(cmd);\n}\n\nfunction isProgramRunning(output: string, programName: string) {\n // eslint-disable-next-line no-control-regex\n const stripAnsi = (str: string) => str.replace(/\\x1B\\[[0-9;]*m/g, \"\");\n\n const cleanedOutput = stripAnsi(output);\n\n return cleanedOutput.split(\"\\n\").some((line) => {\n const [name, status] = line.trim().split(/\\s{2,}/); // Split string by 2 spaces.\n\n return name === programName && status === \"Running\";\n });\n}\n"],"mappings":";;;;;AAOA,eAAsB,mBAAmB,WAAsB,YAAoB,MAAc;CAC/F,MAAM,SAAS,MAAM,eAAe,WAAW,YAAY,MAAM,WAAW;AAE5E,KAAI,OAAO,OACT,OAAM,IAAI,MAAM,6BAA6B,OAAO,SAAS;;AAIjE,eAAsB,eAAe,WAAsB,YAAoB,MAAc;CAC3F,MAAM,SAAS,MAAM,eAAe,WAAW,YAAY,MAAM,eAAe;AAEhF,KAAI,OAAO,OACT,OAAM,IAAI,MAAM,8BAA8B,OAAO,SAAS;;AAalE,SAAgB,WAAW,QAA0B,gBAAyB;AAC5E,KAAI,eACF,QAAO,OAAO,aAAa,OAAO;AAGpC,QAAO,OAAO;;AAGhB,SAAgB,qBAAqB,QAA0B;AAC7D,QAAO,OAAO,cAAc;;AAG9B,eAAsB,iBACpB,QACA,WACA,YACA,MAC2B;CAC3B,IAAI;AACJ,KAAI;AACF,WAAS,MAAM,eAAe,WAAW,YAAY,MAAM,aAAa;UACjE,GAAY;AACnB,SAAO,EAAE,WAAW,OAAO,EAAE,EAAE;;AAGjC,KAAI,OAAO,QAAQ;AACjB,SAAO,KACL,4CAA4C,OAAO,OAAO,YAAY,OAAO,SAC9E;AAED,SAAO,EAAE,WAAW,QAAQ;;CAG9B,MA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,KAAK,CAAC,MAAM,SAAS;EAC9C,MAAM,CAAC,MAAM,UAAU,KAAK,MAAM,CAAC,MAAM,SAAS;AAElD,SAAO,SAAS,eAAe,WAAW;GAC1C"}
|
|
@@ -1,25 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare function supervisorStop(sshClient: SshClient, remoteHome: string, arch: string): Promise<void>;
|
|
1
|
+
import { SshExecResult } from "./ssh.js";
|
|
2
|
+
import { MiLogger } from "@milaboratories/ts-helpers";
|
|
3
|
+
|
|
4
|
+
//#region src/ssh/supervisord.d.ts
|
|
6
5
|
/** Provides a simple true/false response got from supervisord status
|
|
7
6
|
* along with a debug info that could be showed in error logs (raw response from the command, parsed response etc). */
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
type SupervisorStatus = {
|
|
8
|
+
platforma?: boolean;
|
|
9
|
+
minio?: boolean;
|
|
10
|
+
rawResult?: SshExecResult;
|
|
11
|
+
execError?: string;
|
|
13
12
|
};
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
export declare function supervisorStatus(logger: MiLogger, sshClient: SshClient, remoteHome: string, arch: string): Promise<SupervisorStatus>;
|
|
17
|
-
/** Generates the config for supervisord.
|
|
18
|
-
* docs: https://github.com/ochinchina/supervisord?tab=readme-ov-file#supervised-program-settings
|
|
19
|
-
*/
|
|
20
|
-
export declare function generateSupervisordConfig(supervisorRemotePort: number, remoteWorkDir: string, platformaConfigPath: string, plPath: string): string;
|
|
21
|
-
/** @deprecated, we use minio only on old deployments that existed before we remove minio,
|
|
22
|
-
* for new servers use generation of the config above. */
|
|
23
|
-
export declare function generateSupervisordConfigWithMinio(minioStorageDir: string, minioEnvs: Record<string, string>, supervisorRemotePort: number, remoteWorkDir: string, platformaConfigPath: string, minioPath: string, plPath: string): string;
|
|
24
|
-
export declare function supervisorExec(sshClient: SshClient, remoteHome: string, arch: string, command: string): Promise<SshExecResult>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { SupervisorStatus };
|
|
25
15
|
//# sourceMappingURL=supervisord.d.ts.map
|
package/dist/ssh/supervisord.js
CHANGED
|
@@ -1,62 +1,51 @@
|
|
|
1
|
-
import { supervisorBin, supervisorConf } from
|
|
2
|
-
import { randomBytes } from
|
|
1
|
+
import { supervisorBin, supervisorConf } from "./pl_paths.js";
|
|
2
|
+
import { randomBytes } from "node:crypto";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
//#region src/ssh/supervisord.ts
|
|
5
5
|
async function supervisorCtlStart(sshClient, remoteHome, arch) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
throw new Error(`Can not run ssh Platforma ${result.stderr}`);
|
|
9
|
-
}
|
|
6
|
+
const result = await supervisorExec(sshClient, remoteHome, arch, "--daemon");
|
|
7
|
+
if (result.stderr) throw new Error(`Can not run ssh Platforma ${result.stderr}`);
|
|
10
8
|
}
|
|
11
9
|
async function supervisorStop(sshClient, remoteHome, arch) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
throw new Error(`Can not stop ssh Platforma ${result.stderr}`);
|
|
15
|
-
}
|
|
10
|
+
const result = await supervisorExec(sshClient, remoteHome, arch, "ctl shutdown");
|
|
11
|
+
if (result.stderr) throw new Error(`Can not stop ssh Platforma ${result.stderr}`);
|
|
16
12
|
}
|
|
17
13
|
function isAllAlive(status, shouldUseMinio) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
return status.platforma;
|
|
14
|
+
if (shouldUseMinio) return status.platforma && status.minio;
|
|
15
|
+
return status.platforma;
|
|
22
16
|
}
|
|
23
17
|
function isSupervisordRunning(status) {
|
|
24
|
-
|
|
18
|
+
return status.execError === void 0;
|
|
25
19
|
}
|
|
26
20
|
async function supervisorStatus(logger, sshClient, remoteHome, arch) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
if (!status.platforma) {
|
|
49
|
-
logger.warn("Platforma is not running on the server");
|
|
50
|
-
}
|
|
51
|
-
return status;
|
|
21
|
+
let result;
|
|
22
|
+
try {
|
|
23
|
+
result = await supervisorExec(sshClient, remoteHome, arch, "ctl status");
|
|
24
|
+
} catch (e) {
|
|
25
|
+
return { execError: String(e) };
|
|
26
|
+
}
|
|
27
|
+
if (result.stderr) {
|
|
28
|
+
logger.info(`supervisord ctl status: stderr occurred: ${result.stderr}, stdout: ${result.stdout}`);
|
|
29
|
+
return { rawResult: result };
|
|
30
|
+
}
|
|
31
|
+
const platforma = isProgramRunning(result.stdout, "platforma");
|
|
32
|
+
const minio = isProgramRunning(result.stdout, "minio");
|
|
33
|
+
const status = {
|
|
34
|
+
rawResult: result,
|
|
35
|
+
platforma,
|
|
36
|
+
minio
|
|
37
|
+
};
|
|
38
|
+
if (!status.minio) logger.warn("Minio is not running on the server");
|
|
39
|
+
if (!status.platforma) logger.warn("Platforma is not running on the server");
|
|
40
|
+
return status;
|
|
52
41
|
}
|
|
53
42
|
/** Generates the config for supervisord.
|
|
54
|
-
|
|
55
|
-
|
|
43
|
+
* docs: https://github.com/ochinchina/supervisord?tab=readme-ov-file#supervised-program-settings
|
|
44
|
+
*/
|
|
56
45
|
function generateSupervisordConfig(supervisorRemotePort, remoteWorkDir, platformaConfigPath, plPath) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
46
|
+
const password = randomBytes(16).toString("hex");
|
|
47
|
+
const freePort = supervisorRemotePort;
|
|
48
|
+
return `
|
|
60
49
|
[supervisord]
|
|
61
50
|
logfile=${remoteWorkDir}/supervisord.log
|
|
62
51
|
loglevel=info
|
|
@@ -84,14 +73,12 @@ redirect_stderr=true
|
|
|
84
73
|
`;
|
|
85
74
|
}
|
|
86
75
|
/** @deprecated, we use minio only on old deployments that existed before we remove minio,
|
|
87
|
-
|
|
76
|
+
* for new servers use generation of the config above. */
|
|
88
77
|
function generateSupervisordConfigWithMinio(minioStorageDir, minioEnvs, supervisorRemotePort, remoteWorkDir, platformaConfigPath, minioPath, plPath) {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
const freePort = supervisorRemotePort;
|
|
94
|
-
return `
|
|
78
|
+
const minioEnvStr = Object.entries(minioEnvs).map(([key, value]) => `${key}="${value}"`).join(",");
|
|
79
|
+
const password = randomBytes(16).toString("hex");
|
|
80
|
+
const freePort = supervisorRemotePort;
|
|
81
|
+
return `
|
|
95
82
|
[supervisord]
|
|
96
83
|
logfile=${remoteWorkDir}/supervisord.log
|
|
97
84
|
loglevel=info
|
|
@@ -123,20 +110,17 @@ autorestart=true
|
|
|
123
110
|
`;
|
|
124
111
|
}
|
|
125
112
|
async function supervisorExec(sshClient, remoteHome, arch, command) {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
const cmd = `${supervisorCmd} --configuration ${supervisorConf$1} ${command}`;
|
|
129
|
-
return await sshClient.exec(cmd);
|
|
113
|
+
const cmd = `${supervisorBin(remoteHome, arch)} --configuration ${supervisorConf(remoteHome)} ${command}`;
|
|
114
|
+
return await sshClient.exec(cmd);
|
|
130
115
|
}
|
|
131
116
|
function isProgramRunning(output, programName) {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
return name === programName && status === "Running";
|
|
138
|
-
});
|
|
117
|
+
const stripAnsi = (str) => str.replace(/\x1B\[[0-9;]*m/g, "");
|
|
118
|
+
return stripAnsi(output).split("\n").some((line) => {
|
|
119
|
+
const [name, status] = line.trim().split(/\s{2,}/);
|
|
120
|
+
return name === programName && status === "Running";
|
|
121
|
+
});
|
|
139
122
|
}
|
|
140
123
|
|
|
141
|
-
|
|
142
|
-
|
|
124
|
+
//#endregion
|
|
125
|
+
export { generateSupervisordConfig, generateSupervisordConfigWithMinio, isAllAlive, isSupervisordRunning, supervisorCtlStart, supervisorStatus, supervisorStop };
|
|
126
|
+
//# sourceMappingURL=supervisord.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supervisord.js","sources":["../../src/ssh/supervisord.ts"],"sourcesContent":["/** Provides helper functions to work with supervisord */\n\nimport type { MiLogger } from \"@milaboratories/ts-helpers\";\nimport * as plpath from \"./pl_paths\";\nimport type { SshClient, SshExecResult } from \"./ssh\";\nimport { randomBytes } from \"node:crypto\";\n\nexport async function supervisorCtlStart(sshClient: SshClient, remoteHome: string, arch: string) {\n const result = await supervisorExec(sshClient, remoteHome, arch, \"--daemon\");\n\n if (result.stderr) {\n throw new Error(`Can not run ssh Platforma ${result.stderr}`);\n }\n}\n\nexport async function supervisorStop(sshClient: SshClient, remoteHome: string, arch: string) {\n const result = await supervisorExec(sshClient, remoteHome, arch, \"ctl shutdown\");\n\n if (result.stderr) {\n throw new Error(`Can not stop ssh Platforma ${result.stderr}`);\n }\n}\n\n/** Provides a simple true/false response got from supervisord status\n * along with a debug info that could be showed in error logs (raw response from the command, parsed response etc). */\nexport type SupervisorStatus = {\n platforma?: boolean;\n minio?: boolean;\n rawResult?: SshExecResult;\n execError?: string;\n};\n\nexport function isAllAlive(status: SupervisorStatus, shouldUseMinio: boolean) {\n if (shouldUseMinio) {\n return status.platforma && status.minio;\n }\n\n return status.platforma;\n}\n\nexport function isSupervisordRunning(status: SupervisorStatus) {\n return status.execError === undefined;\n}\n\nexport async function supervisorStatus(\n logger: MiLogger,\n sshClient: SshClient,\n remoteHome: string,\n arch: string,\n): Promise<SupervisorStatus> {\n let result: SshExecResult;\n try {\n result = await supervisorExec(sshClient, remoteHome, arch, \"ctl status\");\n } catch (e: unknown) {\n return { execError: String(e) };\n }\n\n if (result.stderr) {\n logger.info(\n `supervisord ctl status: stderr occurred: ${result.stderr}, stdout: ${result.stdout}`,\n );\n\n return { rawResult: result };\n }\n\n const platforma = isProgramRunning(result.stdout, \"platforma\");\n const minio = isProgramRunning(result.stdout, \"minio\");\n const status: SupervisorStatus = {\n rawResult: result,\n platforma,\n minio,\n };\n\n if (!status.minio) {\n logger.warn(\"Minio is not running on the server\");\n }\n\n if (!status.platforma) {\n logger.warn(\"Platforma is not running on the server\");\n }\n\n return status;\n}\n\n/** Generates the config for supervisord.\n * docs: https://github.com/ochinchina/supervisord?tab=readme-ov-file#supervised-program-settings\n */\nexport function generateSupervisordConfig(\n supervisorRemotePort: number,\n remoteWorkDir: string,\n platformaConfigPath: string,\n plPath: string,\n) {\n const password = randomBytes(16).toString(\"hex\");\n const freePort = supervisorRemotePort;\n\n return `\n[supervisord]\nlogfile=${remoteWorkDir}/supervisord.log\nloglevel=info\npidfile=${remoteWorkDir}/supervisord.pid\n\n[inet_http_server]\nport=127.0.0.1:${freePort}\nusername=default-user\npassword=${password}\n\n[supervisorctl]\nserverurl=http://127.0.0.1:${freePort}\nusername=default-user\npassword=${password}\n\n[program:platforma]\nautostart=true\ncommand=${plPath} --config ${platformaConfigPath}\ndirectory=${remoteWorkDir}\nautorestart=true\nstdout_logfile=${remoteWorkDir}/platforma_cli_logs.log\nstdout_logfile_maxbytes=10000\nstdout_logfile_backups=10\nredirect_stderr=true\n`;\n}\n\n/** @deprecated, we use minio only on old deployments that existed before we remove minio,\n * for new servers use generation of the config above. */\nexport function generateSupervisordConfigWithMinio(\n minioStorageDir: string,\n minioEnvs: Record<string, string>,\n supervisorRemotePort: number,\n remoteWorkDir: string,\n platformaConfigPath: string,\n\n minioPath: string,\n plPath: string,\n) {\n const minioEnvStr = Object.entries(minioEnvs)\n .map(([key, value]) => `${key}=\"${value}\"`)\n .join(\",\");\n const password = randomBytes(16).toString(\"hex\");\n const freePort = supervisorRemotePort;\n\n return `\n[supervisord]\nlogfile=${remoteWorkDir}/supervisord.log\nloglevel=info\npidfile=${remoteWorkDir}/supervisord.pid\n\n[inet_http_server]\nport=127.0.0.1:${freePort}\nusername=default-user\npassword=${password}\n\n[supervisorctl]\nserverurl=http://127.0.0.1:${freePort}\nusername=default-user\npassword=${password}\n\n[program:platforma]\nautostart=true\ndepends_on=minio\ncommand=${plPath} --config ${platformaConfigPath}\ndirectory=${remoteWorkDir}\nautorestart=true\n\n[program:minio]\nautostart=true\nenvironment=${minioEnvStr}\ncommand=${minioPath} server ${minioStorageDir}\ndirectory=${remoteWorkDir}\nautorestart=true\n`;\n}\n\nexport async function supervisorExec(\n sshClient: SshClient,\n remoteHome: string,\n arch: string,\n command: string,\n) {\n const supervisorCmd = plpath.supervisorBin(remoteHome, arch);\n const supervisorConf = plpath.supervisorConf(remoteHome);\n\n const cmd = `${supervisorCmd} --configuration ${supervisorConf} ${command}`;\n return await sshClient.exec(cmd);\n}\n\nfunction isProgramRunning(output: string, programName: string) {\n // eslint-disable-next-line no-control-regex\n const stripAnsi = (str: string) => str.replace(/\\x1B\\[[0-9;]*m/g, \"\");\n\n const cleanedOutput = stripAnsi(output);\n\n return cleanedOutput.split(\"\\n\").some((line) => {\n const [name, status] = line.trim().split(/\\s{2,}/); // Split string by 2 spaces.\n\n return name === programName && status === \"Running\";\n });\n}\n"],"
|
|
1
|
+
{"version":3,"file":"supervisord.js","names":["plpath.supervisorBin","plpath.supervisorConf"],"sources":["../../src/ssh/supervisord.ts"],"sourcesContent":["/** Provides helper functions to work with supervisord */\n\nimport type { MiLogger } from \"@milaboratories/ts-helpers\";\nimport * as plpath from \"./pl_paths\";\nimport type { SshClient, SshExecResult } from \"./ssh\";\nimport { randomBytes } from \"node:crypto\";\n\nexport async function supervisorCtlStart(sshClient: SshClient, remoteHome: string, arch: string) {\n const result = await supervisorExec(sshClient, remoteHome, arch, \"--daemon\");\n\n if (result.stderr) {\n throw new Error(`Can not run ssh Platforma ${result.stderr}`);\n }\n}\n\nexport async function supervisorStop(sshClient: SshClient, remoteHome: string, arch: string) {\n const result = await supervisorExec(sshClient, remoteHome, arch, \"ctl shutdown\");\n\n if (result.stderr) {\n throw new Error(`Can not stop ssh Platforma ${result.stderr}`);\n }\n}\n\n/** Provides a simple true/false response got from supervisord status\n * along with a debug info that could be showed in error logs (raw response from the command, parsed response etc). */\nexport type SupervisorStatus = {\n platforma?: boolean;\n minio?: boolean;\n rawResult?: SshExecResult;\n execError?: string;\n};\n\nexport function isAllAlive(status: SupervisorStatus, shouldUseMinio: boolean) {\n if (shouldUseMinio) {\n return status.platforma && status.minio;\n }\n\n return status.platforma;\n}\n\nexport function isSupervisordRunning(status: SupervisorStatus) {\n return status.execError === undefined;\n}\n\nexport async function supervisorStatus(\n logger: MiLogger,\n sshClient: SshClient,\n remoteHome: string,\n arch: string,\n): Promise<SupervisorStatus> {\n let result: SshExecResult;\n try {\n result = await supervisorExec(sshClient, remoteHome, arch, \"ctl status\");\n } catch (e: unknown) {\n return { execError: String(e) };\n }\n\n if (result.stderr) {\n logger.info(\n `supervisord ctl status: stderr occurred: ${result.stderr}, stdout: ${result.stdout}`,\n );\n\n return { rawResult: result };\n }\n\n const platforma = isProgramRunning(result.stdout, \"platforma\");\n const minio = isProgramRunning(result.stdout, \"minio\");\n const status: SupervisorStatus = {\n rawResult: result,\n platforma,\n minio,\n };\n\n if (!status.minio) {\n logger.warn(\"Minio is not running on the server\");\n }\n\n if (!status.platforma) {\n logger.warn(\"Platforma is not running on the server\");\n }\n\n return status;\n}\n\n/** Generates the config for supervisord.\n * docs: https://github.com/ochinchina/supervisord?tab=readme-ov-file#supervised-program-settings\n */\nexport function generateSupervisordConfig(\n supervisorRemotePort: number,\n remoteWorkDir: string,\n platformaConfigPath: string,\n plPath: string,\n) {\n const password = randomBytes(16).toString(\"hex\");\n const freePort = supervisorRemotePort;\n\n return `\n[supervisord]\nlogfile=${remoteWorkDir}/supervisord.log\nloglevel=info\npidfile=${remoteWorkDir}/supervisord.pid\n\n[inet_http_server]\nport=127.0.0.1:${freePort}\nusername=default-user\npassword=${password}\n\n[supervisorctl]\nserverurl=http://127.0.0.1:${freePort}\nusername=default-user\npassword=${password}\n\n[program:platforma]\nautostart=true\ncommand=${plPath} --config ${platformaConfigPath}\ndirectory=${remoteWorkDir}\nautorestart=true\nstdout_logfile=${remoteWorkDir}/platforma_cli_logs.log\nstdout_logfile_maxbytes=10000\nstdout_logfile_backups=10\nredirect_stderr=true\n`;\n}\n\n/** @deprecated, we use minio only on old deployments that existed before we remove minio,\n * for new servers use generation of the config above. */\nexport function generateSupervisordConfigWithMinio(\n minioStorageDir: string,\n minioEnvs: Record<string, string>,\n supervisorRemotePort: number,\n remoteWorkDir: string,\n platformaConfigPath: string,\n\n minioPath: string,\n plPath: string,\n) {\n const minioEnvStr = Object.entries(minioEnvs)\n .map(([key, value]) => `${key}=\"${value}\"`)\n .join(\",\");\n const password = randomBytes(16).toString(\"hex\");\n const freePort = supervisorRemotePort;\n\n return `\n[supervisord]\nlogfile=${remoteWorkDir}/supervisord.log\nloglevel=info\npidfile=${remoteWorkDir}/supervisord.pid\n\n[inet_http_server]\nport=127.0.0.1:${freePort}\nusername=default-user\npassword=${password}\n\n[supervisorctl]\nserverurl=http://127.0.0.1:${freePort}\nusername=default-user\npassword=${password}\n\n[program:platforma]\nautostart=true\ndepends_on=minio\ncommand=${plPath} --config ${platformaConfigPath}\ndirectory=${remoteWorkDir}\nautorestart=true\n\n[program:minio]\nautostart=true\nenvironment=${minioEnvStr}\ncommand=${minioPath} server ${minioStorageDir}\ndirectory=${remoteWorkDir}\nautorestart=true\n`;\n}\n\nexport async function supervisorExec(\n sshClient: SshClient,\n remoteHome: string,\n arch: string,\n command: string,\n) {\n const supervisorCmd = plpath.supervisorBin(remoteHome, arch);\n const supervisorConf = plpath.supervisorConf(remoteHome);\n\n const cmd = `${supervisorCmd} --configuration ${supervisorConf} ${command}`;\n return await sshClient.exec(cmd);\n}\n\nfunction isProgramRunning(output: string, programName: string) {\n // eslint-disable-next-line no-control-regex\n const stripAnsi = (str: string) => str.replace(/\\x1B\\[[0-9;]*m/g, \"\");\n\n const cleanedOutput = stripAnsi(output);\n\n return cleanedOutput.split(\"\\n\").some((line) => {\n const [name, status] = line.trim().split(/\\s{2,}/); // Split string by 2 spaces.\n\n return name === programName && status === \"Running\";\n });\n}\n"],"mappings":";;;;AAOA,eAAsB,mBAAmB,WAAsB,YAAoB,MAAc;CAC/F,MAAM,SAAS,MAAM,eAAe,WAAW,YAAY,MAAM,WAAW;AAE5E,KAAI,OAAO,OACT,OAAM,IAAI,MAAM,6BAA6B,OAAO,SAAS;;AAIjE,eAAsB,eAAe,WAAsB,YAAoB,MAAc;CAC3F,MAAM,SAAS,MAAM,eAAe,WAAW,YAAY,MAAM,eAAe;AAEhF,KAAI,OAAO,OACT,OAAM,IAAI,MAAM,8BAA8B,OAAO,SAAS;;AAalE,SAAgB,WAAW,QAA0B,gBAAyB;AAC5E,KAAI,eACF,QAAO,OAAO,aAAa,OAAO;AAGpC,QAAO,OAAO;;AAGhB,SAAgB,qBAAqB,QAA0B;AAC7D,QAAO,OAAO,cAAc;;AAG9B,eAAsB,iBACpB,QACA,WACA,YACA,MAC2B;CAC3B,IAAI;AACJ,KAAI;AACF,WAAS,MAAM,eAAe,WAAW,YAAY,MAAM,aAAa;UACjE,GAAY;AACnB,SAAO,EAAE,WAAW,OAAO,EAAE,EAAE;;AAGjC,KAAI,OAAO,QAAQ;AACjB,SAAO,KACL,4CAA4C,OAAO,OAAO,YAAY,OAAO,SAC9E;AAED,SAAO,EAAE,WAAW,QAAQ;;CAG9B,MAAM,YAAY,iBAAiB,OAAO,QAAQ,YAAY;CAC9D,MAAM,QAAQ,iBAAiB,OAAO,QAAQ,QAAQ;CACtD,MAAM,SAA2B;EAC/B,WAAW;EACX;EACA;EACD;AAED,KAAI,CAAC,OAAO,MACV,QAAO,KAAK,qCAAqC;AAGnD,KAAI,CAAC,OAAO,UACV,QAAO,KAAK,yCAAyC;AAGvD,QAAO;;;;;AAMT,SAAgB,0B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
|
+
"version": "2.15.19",
|
|
4
4
|
"description": "MiLaboratories Platforma Backend code service run wrapper",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"upath": "^2.0.1",
|
|
32
32
|
"yaml": "^2.8.0",
|
|
33
33
|
"zod": "~3.23.8",
|
|
34
|
-
"@milaboratories/pl-model-common": "1.25.
|
|
35
|
-
"@milaboratories/
|
|
36
|
-
"@milaboratories/pl-
|
|
37
|
-
"@milaboratories/
|
|
34
|
+
"@milaboratories/pl-model-common": "1.25.2",
|
|
35
|
+
"@milaboratories/pl-config": "1.7.15",
|
|
36
|
+
"@milaboratories/pl-http": "1.2.4",
|
|
37
|
+
"@milaboratories/ts-helpers": "1.7.3"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/decompress": "^4.2.7",
|
|
@@ -42,17 +42,17 @@
|
|
|
42
42
|
"@types/ssh2": "^1.15.5",
|
|
43
43
|
"@vitest/coverage-istanbul": "^4.0.18",
|
|
44
44
|
"testcontainers": "^10.18.0",
|
|
45
|
-
"typescript": "~5.
|
|
45
|
+
"typescript": "~5.9.3",
|
|
46
46
|
"utility-types": "^3.11.0",
|
|
47
47
|
"vitest": "^4.0.18",
|
|
48
|
-
"@milaboratories/build-configs": "1.5.
|
|
49
|
-
"@milaboratories/ts-configs": "1.2.
|
|
50
|
-
"@milaboratories/ts-builder": "1.2.
|
|
48
|
+
"@milaboratories/build-configs": "1.5.1",
|
|
49
|
+
"@milaboratories/ts-configs": "1.2.2",
|
|
50
|
+
"@milaboratories/ts-builder": "1.2.13"
|
|
51
51
|
},
|
|
52
52
|
"engines": {
|
|
53
53
|
"node": ">=22.19.0"
|
|
54
54
|
},
|
|
55
|
-
"pl-version": "1.
|
|
55
|
+
"pl-version": "1.46.0",
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "ts-builder build --target node",
|
|
58
58
|
"watch": "ts-builder build --target node --watch",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const OSes: readonly ["linux", "macos", "windows"];
|
|
2
|
-
export type OSType = (typeof OSes)[number];
|
|
3
|
-
/** @param osName - should be the thing returned from either {@link os.platform())} or `uname -s` */
|
|
4
|
-
export declare function newOs(osName: string): OSType;
|
|
5
|
-
export declare const Arches: readonly ["amd64", "arm64"];
|
|
6
|
-
export type ArchType = (typeof Arches)[number];
|
|
7
|
-
/** @param arch - should be the thing returned from either {@link os.arch())} or `uname -m` */
|
|
8
|
-
export declare function newArch(arch: string): ArchType;
|
|
9
|
-
//# sourceMappingURL=os_and_arch.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"os_and_arch.d.ts","sourceRoot":"","sources":["../../src/common/os_and_arch.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,wCAAyC,CAAC;AAC3D,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3C,oGAAoG;AACpG,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAc5C;AAED,eAAO,MAAM,MAAM,6BAA8B,CAAC;AAClD,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/C,8FAA8F;AAC9F,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAiB9C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pl_binary.d.ts","sourceRoot":"","sources":["../../src/common/pl_binary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAM3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEzC,0CAA0C;AAC1C,MAAM,MAAM,cAAc,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U,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,GAAG,OAAO,CAAC,YAAY,CAAC,CA4CxB;AAKD,wBAAsB,cAAc,CAClC,MAAM,EAAE,QAAQ,EAChB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,MAAM,iBAoDlB;AAED,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,KAAK,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pl_version.d.ts","sourceRoot":"","sources":["../../src/common/pl_version.ts"],"names":[],"mappings":"AAEA,wBAAgB,mBAAmB,IAAI,MAAM,CAG5C"}
|
package/dist/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC"}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/dist/local/options.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { SpawnOptions } from "node:child_process";
|
|
2
|
-
import type { PlBinarySource } from "../common/pl_binary";
|
|
3
|
-
/** Options to start a local pl-core. */
|
|
4
|
-
export type LocalPlOptions = {
|
|
5
|
-
/** From what directory start a process. */
|
|
6
|
-
readonly workingDir: string;
|
|
7
|
-
/** A string representation of yaml config. */
|
|
8
|
-
readonly config: string;
|
|
9
|
-
/** How to get a binary, download it or get an existing one. */
|
|
10
|
-
readonly binary: PlBinarySource;
|
|
11
|
-
/** Additional options for a process, environments, stdout, stderr etc. */
|
|
12
|
-
readonly spawnOptions: SpawnOptions;
|
|
13
|
-
/**
|
|
14
|
-
* If the previous pl-core was started from the same directory,
|
|
15
|
-
* we can check if it's still running and then stop it before starting a new one.
|
|
16
|
-
*/
|
|
17
|
-
readonly closeOld: boolean;
|
|
18
|
-
/** What should we do on closing or if the process exit with error */
|
|
19
|
-
readonly restartMode: LocalPlRestart;
|
|
20
|
-
};
|
|
21
|
-
export type LocalPlRestart = LocalPlRestartSilent | LocalPlRestartHook;
|
|
22
|
-
/** Do nothing if the error happened or a process exited. */
|
|
23
|
-
export type LocalPlRestartSilent = {
|
|
24
|
-
type: "silent";
|
|
25
|
-
};
|
|
26
|
-
/** Run a hook if the error happened or a process exited. */
|
|
27
|
-
export type LocalPlRestartHook = {
|
|
28
|
-
type: "hook";
|
|
29
|
-
hook(pl: any): void;
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=options.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/local/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,wCAAwC;AACxC,MAAM,MAAM,cAAc,GAAG;IAC3B,2CAA2C;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,8CAA8C;IAC9C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,+DAA+D;IAC/D,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,0EAA0E;IAC1E,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,qEAAqE;IACrE,QAAQ,CAAC,WAAW,EAAE,cAAc,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,oBAAoB,GAAG,kBAAkB,CAAC;AAEvE,4DAA4D;AAC5D,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,QAAQ,CAAC;CAChB,CAAC;AAEF,4DAA4D;AAC5D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,EAAE,GAAG,GAAG,IAAI,CAAC;CACrB,CAAC"}
|
package/dist/local/pid.d.ts
DELETED
package/dist/local/pid.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pid.d.ts","sourceRoot":"","sources":["../../src/local/pid.ts"],"names":[],"mappings":"AAIA,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,UAElC;AAED,wBAAsB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAQ3E;AAED,wBAAsB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,iBAE3D"}
|
package/dist/local/pl.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pl.d.ts","sourceRoot":"","sources":["../../src/local/pl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAE3D,OAAO,KAAK,EAAgB,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAErE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAIrC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAA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B,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAC7C,cAAc,CAqBhB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"process.d.ts","sourceRoot":"","sources":["../../src/local/process.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGrE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAG3D,MAAM,MAAM,cAAc,GAAG;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,YAAY,CAAC;CACpB,CAAC;AAEF,wBAAgB,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,GAAG,YAAY,CAO/E;AAGD,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,oBAgB/C;AA6BD,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,GAAE,OAAe,QAE9D;AAED,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,iBAUlE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"trace.d.ts","sourceRoot":"","sources":["../../src/local/trace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAE3D;+DAC+D;AAC/D,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAExC,wBAAgB,QAAQ,IAAI,KAAK,CAEhC;AAED,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,OAGhD;AAED;sCACsC;AACtC,wBAAsB,SAAS,CAAC,CAAC,EAC/B,MAAM,EAAE,QAAQ,EAChB,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,KAAK,OAAO,CAAC,EAAE,CAAC,EAAE,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,GACnE,OAAO,CAAC,CAAC,CAAC,CASZ"}
|
package/dist/package.json.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"package.json.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/dist/package.json.js
DELETED
package/dist/package.json.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"package.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { StartedTestContainer } from "testcontainers";
|
|
2
|
-
import type { ConnectConfig } from "ssh2";
|
|
3
|
-
export declare const testAssetsPath: string;
|
|
4
|
-
export declare function readPrivateKey(): string;
|
|
5
|
-
export declare function initContainer(name: string): Promise<StartedTestContainer>;
|
|
6
|
-
export declare function getContainerHostAndPort(container: StartedTestContainer): {
|
|
7
|
-
port: number;
|
|
8
|
-
host: string;
|
|
9
|
-
};
|
|
10
|
-
export declare function getConnectionForSsh(container: StartedTestContainer, debug?: boolean): ConnectConfig;
|
|
11
|
-
export declare function cleanUp(container: StartedTestContainer): Promise<void>;
|
|
12
|
-
//# sourceMappingURL=common-utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common-utils.d.ts","sourceRoot":"","sources":["../../../src/ssh/__tests__/common-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAI3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AAK1C,eAAO,MAAM,cAAc,QAA2D,CAAC;AASvF,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,wBAAsB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AAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,KAAK,iBAAiB,GAClB,MAAM,GACN,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,sBAAsB,GACtB,aAAa,GACb,kBAAkB,GAClB,YAAY,GACZ,mBAAmB,GACnB,2BAA2B,GAC3B,sBAAsB,GACtB,uBAAuB,GACvB,gBAAgB,CAAC;AAErB,KAAK,kBAAkB,GAAG;IACxB,IAAI,EAAE,iBAAiB,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,sBAAsB,CAAC;IACrC,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,eAAe,CAAC,EAAE,cAAc,CAAC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kBAAkB,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAC7C,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,eAAe,CAAC,EAAE,2BAA2B,CAAC;IAC9C,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAoBF,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAOxD"}
|
package/dist/ssh/pl_paths.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/** Just a lot of hardcoded paths of our current ssh deployment. */
|
|
2
|
-
export declare const minioDirName = "minio-2024-12-18T13-15-44Z";
|
|
3
|
-
export declare const supervisordDirName = "supervisord-0.7.3";
|
|
4
|
-
export declare const supervisordSubDirName = "supervisord_0.7.3_Linux_64-bit";
|
|
5
|
-
export declare function workDir(remoteHome: string): string;
|
|
6
|
-
export declare function binariesDir(remoteHome: string): string;
|
|
7
|
-
export declare function platformaBaseDir(remoteHome: string, arch: string): string;
|
|
8
|
-
export declare function platformaDir(remoteHome: string, arch: string): string;
|
|
9
|
-
export declare function platformaBin(remoteHome: string, arch: string): string;
|
|
10
|
-
export declare function platformaConf(remoteHome: string): string;
|
|
11
|
-
export declare function platformaFreePortBin(remoteHome: string, arch: string): string;
|
|
12
|
-
export declare function minioDir(remoteHome: string, arch: string): string;
|
|
13
|
-
export declare function minioBin(remoteHome: string, arch: string): string;
|
|
14
|
-
export declare function supervisorBinDir(remoteHome: string, arch: string): string;
|
|
15
|
-
export declare function supervisorBin(remoteHome: string, arch: string): string;
|
|
16
|
-
export declare function supervisorConf(remoteHome: string): string;
|
|
17
|
-
export declare function connectionInfo(remoteHome: string): string;
|
|
18
|
-
export declare function platformaCliLogs(remoteHome: string): string;
|
|
19
|
-
export declare function platformaDbLock(remoteHome: string): string;
|
|
20
|
-
//# sourceMappingURL=pl_paths.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pl_paths.d.ts","sourceRoot":"","sources":["../../src/ssh/pl_paths.ts"],"names":[],"mappings":"AAAA,mEAAmE;AAMnE,eAAO,MAAM,YAAY,+BAA+B,CAAC;AACzD,eAAO,MAAM,kBAAkB,sBAAsB,CAAC;AACtD,eAAO,MAAM,qBAAqB,mCAAmC,CAAC;AAEtE,wBAAgB,OAAO,CAAC,UAAU,EAAE,MAAM,UAEzC;AAED,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,UAE7C;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAEhE;AAED,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAE5D;AAED,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAErE;AAED,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,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I,GAAE,MAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IA+BtF;;;;;OAKG;IACU,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAiBlF;;OAEG;IACI,KAAK,IAAI,IAAI;CAIrB;AAED,MAAM,MAAM,aAAa,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
package/dist/ssh/ssh_errors.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export declare class SSHError extends Error {
|
|
2
|
-
name: string;
|
|
3
|
-
constructor(message: string, opts?: {
|
|
4
|
-
cause: Error;
|
|
5
|
-
});
|
|
6
|
-
constructor(err: Error);
|
|
7
|
-
static from(err: unknown): SSHError | undefined;
|
|
8
|
-
}
|
|
9
|
-
export declare class SFTPError extends SSHError {
|
|
10
|
-
readonly code: string;
|
|
11
|
-
name: string;
|
|
12
|
-
constructor(code: string, // raw SFTP error code, i.e. from OpenSSH server
|
|
13
|
-
opts?: {
|
|
14
|
-
cause: Error;
|
|
15
|
-
});
|
|
16
|
-
/** Optionally wraps an error into SFTPError, if it is not already of this type */
|
|
17
|
-
static wrap(err: Error): SFTPError;
|
|
18
|
-
static wrap(err: undefined): undefined;
|
|
19
|
-
static from(err: unknown): SFTPError | undefined;
|
|
20
|
-
get isGenericFailure(): boolean;
|
|
21
|
-
}
|
|
22
|
-
export declare class SFTPUploadError extends SSHError {
|
|
23
|
-
readonly localPath: string;
|
|
24
|
-
readonly remotePath: string;
|
|
25
|
-
name: string;
|
|
26
|
-
constructor(err: Error, localPath: string, remotePath: string);
|
|
27
|
-
static from(err: unknown): SFTPUploadError | undefined;
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=ssh_errors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ssh_errors.d.ts","sourceRoot":"","sources":["../../src/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