Support slashes in file names

This commit is contained in:
Zef Hemel
2022-02-27 10:17:43 +01:00
parent 158e1cb2ef
commit 89f93963f5
12 changed files with 142 additions and 71 deletions
-5
View File
@@ -1,5 +0,0 @@
import {syscall} from "./syscall.ts";
export async function publish(event: string, data?: object) {
return await syscall("event.publish", event, data);
}
+15 -15
View File
@@ -1,16 +1,16 @@
export function syscall(name: string, ...args: Array<any>): any {
let reqId = Math.floor(Math.random() * 1000000);
// console.log("Syscall", name, reqId);
return new Promise((resolve, reject) => {
self.dispatchEvent(
new CustomEvent("syscall", {
detail: {
id: reqId,
name: name,
args: args,
callback: resolve,
},
}),
);
});
export function syscall(name: string, ...args: any[]): any {
let reqId = Math.floor(Math.random() * 1000000);
// console.log("Syscall", name, reqId);
return new Promise((resolve, reject) => {
self.dispatchEvent(
new CustomEvent("syscall", {
detail: {
id: reqId,
name: name,
args: args,
callback: resolve,
},
})
);
});
}