Add SSH console and log reader workspaces

This commit is contained in:
SantaSpeen committed 2026-12-01 00:58:23 +03:00
1 parent 0561fb1596
commit cd821abb51
68 files changed
+3227 -5

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
import { readFile, writeFile, mkdir } from "node:fs/promises";
const root = new URL("../", import.meta.url),
out = new URL("vendor/xterm/", root);
await mkdir(out, { recursive: true });
const packages = [
["@xterm/xterm", "xterm"],
["@xterm/addon-fit", "addon-fit"],
["@xterm/addon-search", "addon-search"],
];
const manifest = [];
for (const [pkg, name] of packages) {
const dir = new URL(`node_modules/${pkg}/`, root),
meta = JSON.parse(await readFile(new URL("package.json", dir), "utf8"));
const source = await readFile(new URL(meta.module, dir), "utf8");
await writeFile(
new URL(name + ".js", out),
source.replace(/^\/\/# sourceMappingURL=.*$/gm, ""),
);
await writeFile(
new URL(name + ".LICENSE", out),
await readFile(new URL("LICENSE", dir)),
);
manifest.push({ package: pkg, version: meta.version, license: meta.license });
}
await writeFile(
new URL("xterm.css", out),
await readFile(new URL("node_modules/@xterm/xterm/css/xterm.css", root)),
);
await writeFile(
new URL("manifest.json", out),
JSON.stringify(manifest, null, 2) + "\n",
);
console.log(
"Vendored terminal runtime:",
manifest.map((p) => `${p.package}@${p.version}`).join(", "),
);