mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 14:45:24 +00:00
feat: finish the host-metrics plugin, move host status into core (B16)
This commit is contained in:
1 parent
14eb558b85
commit
0a3f05d99d
308 files changed
+53073
-8985
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { getErrorMessage } from "../../../../src/backend/utils/error-message.js";
|
||||
import express, { type Router } from "express";
|
||||
import type { Client as SSHClient } from "ssh2";
|
||||
import { execElevated } from "../../../../src/backend/hosts/metrics-shared/exec-elevated.js";
|
||||
import { execElevated } from "@termix/plugin-sdk/host-commands";
|
||||
import type {
|
||||
PluginHostCreateInput,
|
||||
PluginHostRecord,
|
||||
|
||||
@@ -2,12 +2,10 @@ import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { Client } from "ssh2";
|
||||
|
||||
const execElevated = vi.fn();
|
||||
vi.mock(
|
||||
"../../../../src/backend/hosts/metrics-shared/exec-elevated.js",
|
||||
() => ({
|
||||
execElevated: (...args: unknown[]) => execElevated(...args),
|
||||
}),
|
||||
);
|
||||
vi.mock("@termix/plugin-sdk/host-commands", async (importOriginal) => ({
|
||||
...(await importOriginal<object>()),
|
||||
execElevated: (...args: unknown[]) => execElevated(...args),
|
||||
}));
|
||||
|
||||
const { execPveshCommand } = await import("../../src/backend/routes.js");
|
||||
|
||||
|
||||
Reference in new issue
Block a user