@milaboratories/pl-deployments 2.15.17 → 2.15.18
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 +9 -9
- 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
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
|
|
29
|
+
exports.__toESM = __toESM;
|
|
@@ -1,39 +1,33 @@
|
|
|
1
|
-
'use strict';
|
|
2
1
|
|
|
3
|
-
|
|
2
|
+
//#region src/common/os_and_arch.ts
|
|
3
|
+
const OSes = [
|
|
4
|
+
"linux",
|
|
5
|
+
"macos",
|
|
6
|
+
"windows"
|
|
7
|
+
];
|
|
4
8
|
/** @param osName - should be the thing returned from either {@link os.platform())} or `uname -s` */
|
|
5
9
|
function newOs(osName) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return "windows";
|
|
13
|
-
default:
|
|
14
|
-
throw new Error(`operating system '${osName}' is not currently supported by Platforma ecosystem. The list of OSes supported: ` +
|
|
15
|
-
JSON.stringify(OSes));
|
|
16
|
-
}
|
|
10
|
+
switch (osName.toLowerCase()) {
|
|
11
|
+
case "darwin": return "macos";
|
|
12
|
+
case "linux": return "linux";
|
|
13
|
+
case "win32": return "windows";
|
|
14
|
+
default: throw new Error(`operating system '${osName}' is not currently supported by Platforma ecosystem. The list of OSes supported: ` + JSON.stringify(OSes));
|
|
15
|
+
}
|
|
17
16
|
}
|
|
18
17
|
const Arches = ["amd64", "arm64"];
|
|
19
18
|
/** @param arch - should be the thing returned from either {@link os.arch())} or `uname -m` */
|
|
20
19
|
function newArch(arch) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
default:
|
|
30
|
-
throw new Error(`processor architecture '${arch}' is not currently supported by Platforma ecosystem. The list of architectures supported: ` +
|
|
31
|
-
JSON.stringify(Arches));
|
|
32
|
-
}
|
|
20
|
+
switch (arch) {
|
|
21
|
+
case "aarch64":
|
|
22
|
+
case "aarch64_be":
|
|
23
|
+
case "arm64": return "arm64";
|
|
24
|
+
case "x86_64":
|
|
25
|
+
case "x64": return "amd64";
|
|
26
|
+
default: throw new Error(`processor architecture '${arch}' is not currently supported by Platforma ecosystem. The list of architectures supported: ` + JSON.stringify(Arches));
|
|
27
|
+
}
|
|
33
28
|
}
|
|
34
29
|
|
|
35
|
-
|
|
36
|
-
exports.OSes = OSes;
|
|
30
|
+
//#endregion
|
|
37
31
|
exports.newArch = newArch;
|
|
38
32
|
exports.newOs = newOs;
|
|
39
|
-
//# sourceMappingURL=os_and_arch.cjs.map
|
|
33
|
+
//# sourceMappingURL=os_and_arch.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"os_and_arch.cjs","sources":["../../src/common/os_and_arch.ts"],"sourcesContent":["export const OSes = [\"linux\", \"macos\", \"windows\"] as const;\nexport type OSType = (typeof OSes)[number];\n\n/** @param osName - should be the thing returned from either {@link os.platform())} or `uname -s` */\nexport function newOs(osName: string): OSType {\n switch (osName.toLowerCase()) {\n case \"darwin\":\n return \"macos\";\n case \"linux\":\n return \"linux\";\n case \"win32\":\n return \"windows\";\n default:\n throw new Error(\n `operating system '${osName}' is not currently supported by Platforma ecosystem. The list of OSes supported: ` +\n JSON.stringify(OSes),\n );\n }\n}\n\nexport const Arches = [\"amd64\", \"arm64\"] as const;\nexport type ArchType = (typeof Arches)[number];\n\n/** @param arch - should be the thing returned from either {@link os.arch())} or `uname -m` */\nexport function newArch(arch: string): ArchType {\n switch (arch) {\n case \"aarch64\":\n case \"aarch64_be\":\n case \"arm64\":\n return \"arm64\";\n\n case \"x86_64\":\n case \"x64\":\n return \"amd64\";\n\n default:\n throw new Error(\n `processor architecture '${arch}' is not currently supported by Platforma ecosystem. The list of architectures supported: ` +\n JSON.stringify(Arches),\n );\n }\n}\n"],"
|
|
1
|
+
{"version":3,"file":"os_and_arch.cjs","names":[],"sources":["../../src/common/os_and_arch.ts"],"sourcesContent":["export const OSes = [\"linux\", \"macos\", \"windows\"] as const;\nexport type OSType = (typeof OSes)[number];\n\n/** @param osName - should be the thing returned from either {@link os.platform())} or `uname -s` */\nexport function newOs(osName: string): OSType {\n switch (osName.toLowerCase()) {\n case \"darwin\":\n return \"macos\";\n case \"linux\":\n return \"linux\";\n case \"win32\":\n return \"windows\";\n default:\n throw new Error(\n `operating system '${osName}' is not currently supported by Platforma ecosystem. The list of OSes supported: ` +\n JSON.stringify(OSes),\n );\n }\n}\n\nexport const Arches = [\"amd64\", \"arm64\"] as const;\nexport type ArchType = (typeof Arches)[number];\n\n/** @param arch - should be the thing returned from either {@link os.arch())} or `uname -m` */\nexport function newArch(arch: string): ArchType {\n switch (arch) {\n case \"aarch64\":\n case \"aarch64_be\":\n case \"arm64\":\n return \"arm64\";\n\n case \"x86_64\":\n case \"x64\":\n return \"amd64\";\n\n default:\n throw new Error(\n `processor architecture '${arch}' is not currently supported by Platforma ecosystem. The list of architectures supported: ` +\n JSON.stringify(Arches),\n );\n }\n}\n"],"mappings":";;AAAA,MAAa,OAAO;CAAC;CAAS;CAAS;CAAU;;AAIjD,SAAgB,MAAM,QAAwB;AAC5C,SAAQ,OAAO,aAAa,EAA5B;EACE,KAAK,SACH,QAAO;EACT,KAAK,QACH,QAAO;EACT,KAAK,QACH,QAAO;EACT,QACE,OAAM,IAAI,MACR,qBAAqB,OAAO,qFAC1B,KAAK,UAAU,KAAK,CACvB;;;AAIP,MAAa,SAAS,CAAC,SAAS,QAAQ;;AAIxC,SAAgB,QAAQ,MAAwB;AAC9C,SAAQ,MAAR;EACE,KAAK;EACL,KAAK;EACL,KAAK,QACH,QAAO;EAET,KAAK;EACL,KAAK,MACH,QAAO;EAET,QACE,OAAM,IAAI,MACR,2BAA2B,KAAK,8FAC9B,KAAK,UAAU,OAAO,CACzB"}
|
|
@@ -1,34 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/common/os_and_arch.ts
|
|
2
|
+
const OSes = [
|
|
3
|
+
"linux",
|
|
4
|
+
"macos",
|
|
5
|
+
"windows"
|
|
6
|
+
];
|
|
2
7
|
/** @param osName - should be the thing returned from either {@link os.platform())} or `uname -s` */
|
|
3
8
|
function newOs(osName) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return "windows";
|
|
11
|
-
default:
|
|
12
|
-
throw new Error(`operating system '${osName}' is not currently supported by Platforma ecosystem. The list of OSes supported: ` +
|
|
13
|
-
JSON.stringify(OSes));
|
|
14
|
-
}
|
|
9
|
+
switch (osName.toLowerCase()) {
|
|
10
|
+
case "darwin": return "macos";
|
|
11
|
+
case "linux": return "linux";
|
|
12
|
+
case "win32": return "windows";
|
|
13
|
+
default: throw new Error(`operating system '${osName}' is not currently supported by Platforma ecosystem. The list of OSes supported: ` + JSON.stringify(OSes));
|
|
14
|
+
}
|
|
15
15
|
}
|
|
16
16
|
const Arches = ["amd64", "arm64"];
|
|
17
17
|
/** @param arch - should be the thing returned from either {@link os.arch())} or `uname -m` */
|
|
18
18
|
function newArch(arch) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
default:
|
|
28
|
-
throw new Error(`processor architecture '${arch}' is not currently supported by Platforma ecosystem. The list of architectures supported: ` +
|
|
29
|
-
JSON.stringify(Arches));
|
|
30
|
-
}
|
|
19
|
+
switch (arch) {
|
|
20
|
+
case "aarch64":
|
|
21
|
+
case "aarch64_be":
|
|
22
|
+
case "arm64": return "arm64";
|
|
23
|
+
case "x86_64":
|
|
24
|
+
case "x64": return "amd64";
|
|
25
|
+
default: throw new Error(`processor architecture '${arch}' is not currently supported by Platforma ecosystem. The list of architectures supported: ` + JSON.stringify(Arches));
|
|
26
|
+
}
|
|
31
27
|
}
|
|
32
28
|
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
//#endregion
|
|
30
|
+
export { newArch, newOs };
|
|
31
|
+
//# sourceMappingURL=os_and_arch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"os_and_arch.js","sources":["../../src/common/os_and_arch.ts"],"sourcesContent":["export const OSes = [\"linux\", \"macos\", \"windows\"] as const;\nexport type OSType = (typeof OSes)[number];\n\n/** @param osName - should be the thing returned from either {@link os.platform())} or `uname -s` */\nexport function newOs(osName: string): OSType {\n switch (osName.toLowerCase()) {\n case \"darwin\":\n return \"macos\";\n case \"linux\":\n return \"linux\";\n case \"win32\":\n return \"windows\";\n default:\n throw new Error(\n `operating system '${osName}' is not currently supported by Platforma ecosystem. The list of OSes supported: ` +\n JSON.stringify(OSes),\n );\n }\n}\n\nexport const Arches = [\"amd64\", \"arm64\"] as const;\nexport type ArchType = (typeof Arches)[number];\n\n/** @param arch - should be the thing returned from either {@link os.arch())} or `uname -m` */\nexport function newArch(arch: string): ArchType {\n switch (arch) {\n case \"aarch64\":\n case \"aarch64_be\":\n case \"arm64\":\n return \"arm64\";\n\n case \"x86_64\":\n case \"x64\":\n return \"amd64\";\n\n default:\n throw new Error(\n `processor architecture '${arch}' is not currently supported by Platforma ecosystem. The list of architectures supported: ` +\n JSON.stringify(Arches),\n );\n }\n}\n"],"
|
|
1
|
+
{"version":3,"file":"os_and_arch.js","names":[],"sources":["../../src/common/os_and_arch.ts"],"sourcesContent":["export const OSes = [\"linux\", \"macos\", \"windows\"] as const;\nexport type OSType = (typeof OSes)[number];\n\n/** @param osName - should be the thing returned from either {@link os.platform())} or `uname -s` */\nexport function newOs(osName: string): OSType {\n switch (osName.toLowerCase()) {\n case \"darwin\":\n return \"macos\";\n case \"linux\":\n return \"linux\";\n case \"win32\":\n return \"windows\";\n default:\n throw new Error(\n `operating system '${osName}' is not currently supported by Platforma ecosystem. The list of OSes supported: ` +\n JSON.stringify(OSes),\n );\n }\n}\n\nexport const Arches = [\"amd64\", \"arm64\"] as const;\nexport type ArchType = (typeof Arches)[number];\n\n/** @param arch - should be the thing returned from either {@link os.arch())} or `uname -m` */\nexport function newArch(arch: string): ArchType {\n switch (arch) {\n case \"aarch64\":\n case \"aarch64_be\":\n case \"arm64\":\n return \"arm64\";\n\n case \"x86_64\":\n case \"x64\":\n return \"amd64\";\n\n default:\n throw new Error(\n `processor architecture '${arch}' is not currently supported by Platforma ecosystem. The list of architectures supported: ` +\n JSON.stringify(Arches),\n );\n }\n}\n"],"mappings":";AAAA,MAAa,OAAO;CAAC;CAAS;CAAS;CAAU;;AAIjD,SAAgB,MAAM,QAAwB;AAC5C,SAAQ,OAAO,aAAa,EAA5B;EACE,KAAK,SACH,QAAO;EACT,KAAK,QACH,QAAO;EACT,KAAK,QACH,QAAO;EACT,QACE,OAAM,IAAI,MACR,qBAAqB,OAAO,qFAC1B,KAAK,UAAU,KAAK,CACvB;;;AAIP,MAAa,SAAS,CAAC,SAAS,QAAQ;;AAIxC,SAAgB,QAAQ,MAAwB;AAC9C,SAAQ,MAAR;EACE,KAAK;EACL,KAAK;EACL,KAAK,QACH,QAAO;EAET,KAAK;EACL,KAAK,MACH,QAAO;EAET,QACE,OAAM,IAAI,MACR,2BAA2B,KAAK,8FAC9B,KAAK,UAAU,OAAO,CACzB"}
|
|
@@ -1,42 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
const require_os_and_arch = require('./os_and_arch.cjs');
|
|
3
|
+
const require_pl_binary_download = require('./pl_binary_download.cjs');
|
|
4
|
+
const require_pl_version = require('./pl_version.cjs');
|
|
5
|
+
let _milaboratories_ts_helpers = require("@milaboratories/ts-helpers");
|
|
6
|
+
let upath = require("upath");
|
|
7
|
+
upath = require_runtime.__toESM(upath);
|
|
8
|
+
let node_os = require("node:os");
|
|
9
|
+
node_os = require_runtime.__toESM(node_os);
|
|
9
10
|
|
|
11
|
+
//#region src/common/pl_binary.ts
|
|
10
12
|
function newDefaultPlBinarySource() {
|
|
11
|
-
|
|
13
|
+
return {
|
|
14
|
+
type: "Download",
|
|
15
|
+
version: require_pl_version.getDefaultPlVersion()
|
|
16
|
+
};
|
|
12
17
|
}
|
|
13
|
-
async function resolveLocalPlBinaryPath({ logger, downloadDir, src, dispatcher
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
default:
|
|
30
|
-
tsHelpers.assertNever(src);
|
|
31
|
-
}
|
|
18
|
+
async function resolveLocalPlBinaryPath({ logger, downloadDir, src, dispatcher }) {
|
|
19
|
+
switch (src.type) {
|
|
20
|
+
case "Download":
|
|
21
|
+
const ops = await require_pl_binary_download.downloadBinary({
|
|
22
|
+
logger,
|
|
23
|
+
baseDir: downloadDir,
|
|
24
|
+
softwareName: "pl",
|
|
25
|
+
archiveName: `pl-${src.version}`,
|
|
26
|
+
arch: node_os.default.arch(),
|
|
27
|
+
platform: node_os.default.platform(),
|
|
28
|
+
dispatcher
|
|
29
|
+
});
|
|
30
|
+
return upath.default.join(ops.baseName, "binaries", osToBinaryName[require_os_and_arch.newOs(node_os.default.platform())]);
|
|
31
|
+
case "Local": return src.path;
|
|
32
|
+
default: (0, _milaboratories_ts_helpers.assertNever)(src);
|
|
33
|
+
}
|
|
32
34
|
}
|
|
33
35
|
const osToBinaryName = {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
linux: "platforma",
|
|
37
|
+
macos: "platforma",
|
|
38
|
+
windows: "platforma.exe"
|
|
37
39
|
};
|
|
38
40
|
|
|
41
|
+
//#endregion
|
|
39
42
|
exports.newDefaultPlBinarySource = newDefaultPlBinarySource;
|
|
40
|
-
exports.osToBinaryName = osToBinaryName;
|
|
41
43
|
exports.resolveLocalPlBinaryPath = resolveLocalPlBinaryPath;
|
|
42
|
-
//# sourceMappingURL=pl_binary.cjs.map
|
|
44
|
+
//# sourceMappingURL=pl_binary.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pl_binary.cjs","sources":["../../src/common/pl_binary.ts"],"sourcesContent":["import type { MiLogger } from \"@milaboratories/ts-helpers\";\nimport { assertNever } from \"@milaboratories/ts-helpers\";\nimport { downloadBinary } from \"./pl_binary_download\";\nimport { getDefaultPlVersion } from \"./pl_version\";\nimport os from \"node:os\";\nimport upath from \"upath\";\nimport type { OSType } from \"./os_and_arch\";\nimport { newOs } from \"./os_and_arch\";\nimport type { Dispatcher } from \"undici\";\n\n/** Shows how the binary should be got. */\nexport type PlBinarySource = PlBinarySourceDownload | PlBinarySourceLocal;\n\nexport type PlBinarySourceDownload = {\n readonly type: \"Download\";\n readonly version: string;\n};\n\nexport type PlBinarySourceLocal = {\n readonly type: \"Local\";\n readonly path: string;\n};\n\nexport function newDefaultPlBinarySource(): PlBinarySourceDownload {\n return { type: \"Download\", version: getDefaultPlVersion() };\n}\n\nexport async function resolveLocalPlBinaryPath({\n logger,\n downloadDir,\n src,\n dispatcher,\n}: {\n logger: MiLogger;\n downloadDir: string;\n src: PlBinarySource;\n dispatcher?: Dispatcher;\n}): Promise<string> {\n switch (src.type) {\n case \"Download\":\n // eslint-disable-next-line no-case-declarations\n const ops = await downloadBinary({\n logger,\n baseDir: downloadDir,\n softwareName: \"pl\",\n archiveName: `pl-${src.version}`,\n arch: os.arch(),\n platform: os.platform(),\n dispatcher,\n });\n return upath.join(ops.baseName, \"binaries\", osToBinaryName[newOs(os.platform())]);\n\n case \"Local\":\n return src.path;\n\n default:\n assertNever(src);\n }\n}\n\nexport const osToBinaryName: Record<OSType, string> = {\n linux: \"platforma\",\n macos: \"platforma\",\n windows: \"platforma.exe\",\n};\n"],"
|
|
1
|
+
{"version":3,"file":"pl_binary.cjs","names":["getDefaultPlVersion","downloadBinary","os","newOs"],"sources":["../../src/common/pl_binary.ts"],"sourcesContent":["import type { MiLogger } from \"@milaboratories/ts-helpers\";\nimport { assertNever } from \"@milaboratories/ts-helpers\";\nimport { downloadBinary } from \"./pl_binary_download\";\nimport { getDefaultPlVersion } from \"./pl_version\";\nimport os from \"node:os\";\nimport upath from \"upath\";\nimport type { OSType } from \"./os_and_arch\";\nimport { newOs } from \"./os_and_arch\";\nimport type { Dispatcher } from \"undici\";\n\n/** Shows how the binary should be got. */\nexport type PlBinarySource = PlBinarySourceDownload | PlBinarySourceLocal;\n\nexport type PlBinarySourceDownload = {\n readonly type: \"Download\";\n readonly version: string;\n};\n\nexport type PlBinarySourceLocal = {\n readonly type: \"Local\";\n readonly path: string;\n};\n\nexport function newDefaultPlBinarySource(): PlBinarySourceDownload {\n return { type: \"Download\", version: getDefaultPlVersion() };\n}\n\nexport async function resolveLocalPlBinaryPath({\n logger,\n downloadDir,\n src,\n dispatcher,\n}: {\n logger: MiLogger;\n downloadDir: string;\n src: PlBinarySource;\n dispatcher?: Dispatcher;\n}): Promise<string> {\n switch (src.type) {\n case \"Download\":\n // eslint-disable-next-line no-case-declarations\n const ops = await downloadBinary({\n logger,\n baseDir: downloadDir,\n softwareName: \"pl\",\n archiveName: `pl-${src.version}`,\n arch: os.arch(),\n platform: os.platform(),\n dispatcher,\n });\n return upath.join(ops.baseName, \"binaries\", osToBinaryName[newOs(os.platform())]);\n\n case \"Local\":\n return src.path;\n\n default:\n assertNever(src);\n }\n}\n\nexport const osToBinaryName: Record<OSType, string> = {\n linux: \"platforma\",\n macos: \"platforma\",\n windows: \"platforma.exe\",\n};\n"],"mappings":";;;;;;;;;;;AAuBA,SAAgB,2BAAmD;AACjE,QAAO;EAAE,MAAM;EAAY,SAASA,wCAAqB;EAAE;;AAG7D,eAAsB,yBAAyB,EAC7C,QACA,aACA,KACA,cAMkB;AAClB,SAAQ,IAAI,MAAZ;EACE,KAAK;GAEH,MAAM,MAAM,MAAMC,0CAAe;IAC/B;IACA,SAAS;IACT,cAAc;IACd,aAAa,MAAM,IAAI;IACvB,MAAMC,gBAAG,MAAM;IACf,UAAUA,gBAAG,UAAU;IACvB;IACD,CAAC;AACF,UAAO,cAAM,KAAK,IAAI,UAAU,YAAY,eAAeC,0BAAMD,gBAAG,UAAU,CAAC,EAAE;EAEnF,KAAK,QACH,QAAO,IAAI;EAEb,QACE,6CAAY,IAAI;;;AAItB,MAAa,iBAAyC;CACpD,OAAO;CACP,OAAO;CACP,SAAS;CACV"}
|
|
@@ -1,22 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { MiLogger } from "@milaboratories/ts-helpers";
|
|
2
|
+
import { Dispatcher } from "undici";
|
|
3
|
+
|
|
4
|
+
//#region src/common/pl_binary.d.ts
|
|
4
5
|
/** Shows how the binary should be got. */
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
type PlBinarySource = PlBinarySourceDownload | PlBinarySourceLocal;
|
|
7
|
+
type PlBinarySourceDownload = {
|
|
8
|
+
readonly type: "Download";
|
|
9
|
+
readonly version: string;
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
type PlBinarySourceLocal = {
|
|
12
|
+
readonly type: "Local";
|
|
13
|
+
readonly path: string;
|
|
13
14
|
};
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
logger: MiLogger;
|
|
17
|
-
downloadDir: string;
|
|
18
|
-
src: PlBinarySource;
|
|
19
|
-
dispatcher?: Dispatcher;
|
|
20
|
-
}): Promise<string>;
|
|
21
|
-
export declare const osToBinaryName: Record<OSType, string>;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { PlBinarySource, PlBinarySourceDownload };
|
|
22
17
|
//# sourceMappingURL=pl_binary.d.ts.map
|
package/dist/common/pl_binary.js
CHANGED
|
@@ -1,38 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { downloadBinary } from
|
|
3
|
-
import { getDefaultPlVersion } from
|
|
4
|
-
import
|
|
5
|
-
import upath from
|
|
6
|
-
import
|
|
1
|
+
import { newOs } from "./os_and_arch.js";
|
|
2
|
+
import { downloadBinary } from "./pl_binary_download.js";
|
|
3
|
+
import { getDefaultPlVersion } from "./pl_version.js";
|
|
4
|
+
import { assertNever } from "@milaboratories/ts-helpers";
|
|
5
|
+
import upath from "upath";
|
|
6
|
+
import os from "node:os";
|
|
7
7
|
|
|
8
|
+
//#region src/common/pl_binary.ts
|
|
8
9
|
function newDefaultPlBinarySource() {
|
|
9
|
-
|
|
10
|
+
return {
|
|
11
|
+
type: "Download",
|
|
12
|
+
version: getDefaultPlVersion()
|
|
13
|
+
};
|
|
10
14
|
}
|
|
11
|
-
async function resolveLocalPlBinaryPath({ logger, downloadDir, src, dispatcher
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
default:
|
|
28
|
-
assertNever(src);
|
|
29
|
-
}
|
|
15
|
+
async function resolveLocalPlBinaryPath({ logger, downloadDir, src, dispatcher }) {
|
|
16
|
+
switch (src.type) {
|
|
17
|
+
case "Download":
|
|
18
|
+
const ops = await downloadBinary({
|
|
19
|
+
logger,
|
|
20
|
+
baseDir: downloadDir,
|
|
21
|
+
softwareName: "pl",
|
|
22
|
+
archiveName: `pl-${src.version}`,
|
|
23
|
+
arch: os.arch(),
|
|
24
|
+
platform: os.platform(),
|
|
25
|
+
dispatcher
|
|
26
|
+
});
|
|
27
|
+
return upath.join(ops.baseName, "binaries", osToBinaryName[newOs(os.platform())]);
|
|
28
|
+
case "Local": return src.path;
|
|
29
|
+
default: assertNever(src);
|
|
30
|
+
}
|
|
30
31
|
}
|
|
31
32
|
const osToBinaryName = {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
linux: "platforma",
|
|
34
|
+
macos: "platforma",
|
|
35
|
+
windows: "platforma.exe"
|
|
35
36
|
};
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
//#endregion
|
|
39
|
+
export { newDefaultPlBinarySource, resolveLocalPlBinaryPath };
|
|
40
|
+
//# sourceMappingURL=pl_binary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pl_binary.js","sources":["../../src/common/pl_binary.ts"],"sourcesContent":["import type { MiLogger } from \"@milaboratories/ts-helpers\";\nimport { assertNever } from \"@milaboratories/ts-helpers\";\nimport { downloadBinary } from \"./pl_binary_download\";\nimport { getDefaultPlVersion } from \"./pl_version\";\nimport os from \"node:os\";\nimport upath from \"upath\";\nimport type { OSType } from \"./os_and_arch\";\nimport { newOs } from \"./os_and_arch\";\nimport type { Dispatcher } from \"undici\";\n\n/** Shows how the binary should be got. */\nexport type PlBinarySource = PlBinarySourceDownload | PlBinarySourceLocal;\n\nexport type PlBinarySourceDownload = {\n readonly type: \"Download\";\n readonly version: string;\n};\n\nexport type PlBinarySourceLocal = {\n readonly type: \"Local\";\n readonly path: string;\n};\n\nexport function newDefaultPlBinarySource(): PlBinarySourceDownload {\n return { type: \"Download\", version: getDefaultPlVersion() };\n}\n\nexport async function resolveLocalPlBinaryPath({\n logger,\n downloadDir,\n src,\n dispatcher,\n}: {\n logger: MiLogger;\n downloadDir: string;\n src: PlBinarySource;\n dispatcher?: Dispatcher;\n}): Promise<string> {\n switch (src.type) {\n case \"Download\":\n // eslint-disable-next-line no-case-declarations\n const ops = await downloadBinary({\n logger,\n baseDir: downloadDir,\n softwareName: \"pl\",\n archiveName: `pl-${src.version}`,\n arch: os.arch(),\n platform: os.platform(),\n dispatcher,\n });\n return upath.join(ops.baseName, \"binaries\", osToBinaryName[newOs(os.platform())]);\n\n case \"Local\":\n return src.path;\n\n default:\n assertNever(src);\n }\n}\n\nexport const osToBinaryName: Record<OSType, string> = {\n linux: \"platforma\",\n macos: \"platforma\",\n windows: \"platforma.exe\",\n};\n"],"
|
|
1
|
+
{"version":3,"file":"pl_binary.js","names":[],"sources":["../../src/common/pl_binary.ts"],"sourcesContent":["import type { MiLogger } from \"@milaboratories/ts-helpers\";\nimport { assertNever } from \"@milaboratories/ts-helpers\";\nimport { downloadBinary } from \"./pl_binary_download\";\nimport { getDefaultPlVersion } from \"./pl_version\";\nimport os from \"node:os\";\nimport upath from \"upath\";\nimport type { OSType } from \"./os_and_arch\";\nimport { newOs } from \"./os_and_arch\";\nimport type { Dispatcher } from \"undici\";\n\n/** Shows how the binary should be got. */\nexport type PlBinarySource = PlBinarySourceDownload | PlBinarySourceLocal;\n\nexport type PlBinarySourceDownload = {\n readonly type: \"Download\";\n readonly version: string;\n};\n\nexport type PlBinarySourceLocal = {\n readonly type: \"Local\";\n readonly path: string;\n};\n\nexport function newDefaultPlBinarySource(): PlBinarySourceDownload {\n return { type: \"Download\", version: getDefaultPlVersion() };\n}\n\nexport async function resolveLocalPlBinaryPath({\n logger,\n downloadDir,\n src,\n dispatcher,\n}: {\n logger: MiLogger;\n downloadDir: string;\n src: PlBinarySource;\n dispatcher?: Dispatcher;\n}): Promise<string> {\n switch (src.type) {\n case \"Download\":\n // eslint-disable-next-line no-case-declarations\n const ops = await downloadBinary({\n logger,\n baseDir: downloadDir,\n softwareName: \"pl\",\n archiveName: `pl-${src.version}`,\n arch: os.arch(),\n platform: os.platform(),\n dispatcher,\n });\n return upath.join(ops.baseName, \"binaries\", osToBinaryName[newOs(os.platform())]);\n\n case \"Local\":\n return src.path;\n\n default:\n assertNever(src);\n }\n}\n\nexport const osToBinaryName: Record<OSType, string> = {\n linux: \"platforma\",\n macos: \"platforma\",\n windows: \"platforma.exe\",\n};\n"],"mappings":";;;;;;;;AAuBA,SAAgB,2BAAmD;AACjE,QAAO;EAAE,MAAM;EAAY,SAAS,qBAAqB;EAAE;;AAG7D,eAAsB,yBAAyB,EAC7C,QACA,aACA,KACA,cAMkB;AAClB,SAAQ,IAAI,MAAZ;EACE,KAAK;GAEH,MAAM,MAAM,MAAM,eAAe;IAC/B;IACA,SAAS;IACT,cAAc;IACd,aAAa,MAAM,IAAI;IACvB,MAAM,GAAG,MAAM;IACf,UAAU,GAAG,UAAU;IACvB;IACD,CAAC;AACF,UAAO,MAAM,KAAK,IAAI,UAAU,YAAY,eAAe,MAAM,GAAG,UAAU,CAAC,EAAE;EAEnF,KAAK,QACH,QAAO,IAAI;EAEb,QACE,aAAY,IAAI;;;AAItB,MAAa,iBAAyC;CACpD,OAAO;CACP,OAAO;CACP,SAAS;CACV"}
|