Replace remaining usage of phin (#862)

Replace the remaining places in the codebase using phin with fetch.
With the exception of HttpCloser which uses the http/https request
method instead.
This commit is contained in:
Hornwitser authored and GitHub committed 2026-03-06 15:27:12 +01:00
1 parent ef0baaa30f
commit 05b6bf8c04
13 files changed
+91 -102

No files matched your search

+2 -6
View File
@@ -1,7 +1,6 @@
import fs from "fs-extra";
import asTableModule from "as-table";
import events from "events";
import phin from "phin";
import os from "os";
import child_process from "child_process";
@@ -166,11 +165,8 @@ controllerPluginCommands.add(new lib.Command({
handler: async function(args: object, control: Control) {
let url = new URL(control.config.get("control.controller_url")!);
url.pathname += "api/plugins";
let response = await phin<[]>({
url,
parse: "json",
});
print(asTable(response.body));
let response = await fetch(url);
print(asTable(await response.json() as []));
},
}));
controllerPluginCommands.add(new lib.Command({