Work on plug:run

This commit is contained in:
Zef Hemel
2023-08-11 20:37:13 +02:00
parent d4f7833f0d
commit 4dbbc31cb9
24 changed files with 174 additions and 104 deletions
+8 -1
View File
@@ -8,11 +8,15 @@ import { AssetBundle } from "../plugos/asset_bundle/bundle.ts";
export async function plugRunCommand(
{
noIndex,
hostname,
port,
}: {
noIndex: boolean;
hostname?: string;
port?: number;
},
spacePath: string,
functionName: string,
functionName: string | undefined,
...args: string[]
) {
spacePath = path.resolve(spacePath);
@@ -25,8 +29,11 @@ export async function plugRunCommand(
args,
new AssetBundle(assets),
!noIndex,
port,
hostname,
);
console.log("Output", result);
Deno.exit(0);
} catch (e: any) {
console.error(e.message);
Deno.exit(1);