Mobile app PoC (#281)

Initial checkin of mobile "native" app
This commit is contained in:
Zef Hemel
2023-01-08 12:24:12 +01:00
committed by GitHub
parent dc7de9d8f9
commit 0365673c41
61 changed files with 5190 additions and 155 deletions
+3 -3
View File
@@ -9,7 +9,7 @@ export class Plug<HookT> {
public manifest?: Manifest<HookT>;
public assets?: AssetBundle;
private sandboxFactory: (plug: Plug<HookT>) => Sandbox;
readonly runtimeEnv: RuntimeEnvironment;
readonly runtimeEnv?: RuntimeEnvironment;
grantedPermissions: string[] = [];
name: string;
version: number;
@@ -23,7 +23,7 @@ export class Plug<HookT> {
this.name = name;
this.sandboxFactory = sandboxFactory;
// this.sandbox = sandboxFactory(this);
this.runtimeEnv = system.runtimeEnv;
this.runtimeEnv = system.env;
this.version = new Date().getTime();
}
@@ -69,7 +69,7 @@ export class Plug<HookT> {
if (!funDef) {
throw new Error(`Function ${name} not found in manifest`);
}
return !funDef.env || funDef.env === this.runtimeEnv;
return !funDef.env || !this.runtimeEnv || funDef.env === this.runtimeEnv;
}
async invoke(name: string, args: any[]): Promise<any> {