mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 06:35:24 +00:00
fix: finish 2.9.0 plugin moves and get every check green
This commit is contained in:
1 parent
8c1e02af89
commit
6489b62ece
335 files changed
+29878
-17749
No files matched your search
@@ -6,7 +6,7 @@
|
||||
"scripts": {
|
||||
"build": "termix-plugin build",
|
||||
"test": "termix-plugin test",
|
||||
"typecheck": "tsc -p tsconfig.json",
|
||||
"typecheck": "tsc -b ../../tsconfig.plugins.json ../../tsconfig.plugins.frontend.json",
|
||||
"validate": "termix-plugin validate"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -82,10 +82,14 @@ async function openTunnel(
|
||||
endpoint: WebEndpoint,
|
||||
): Promise<{ bindHost: string; bindPort: number }> {
|
||||
const userId = ctx.currentActor();
|
||||
let tunnels: TunnelsAccess;
|
||||
let tunnels: TunnelsAccess | undefined;
|
||||
try {
|
||||
tunnels = ctx.services.get<TunnelsAccess>("tunnels.access", { userId });
|
||||
} catch {
|
||||
tunnels = undefined;
|
||||
}
|
||||
// A missing provider hands back an empty handle rather than throwing.
|
||||
if (typeof tunnels?.forward !== "function") {
|
||||
throw Object.assign(new Error("The tunnels plugin is not available"), {
|
||||
status: 503,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user