Work on sync stuff

This commit is contained in:
Zef Hemel
2022-04-05 17:02:17 +02:00
parent 1b0048cdcf
commit 38faf50ab8
51 changed files with 704 additions and 257 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import {SysCallMapping} from "../system";
import {EventHook} from "../hooks/event";
import { SysCallMapping } from "../system";
import { EventHook } from "../hooks/event";
export function eventSyscalls(eventHook: EventHook): SysCallMapping {
return {
+2 -2
View File
@@ -1,5 +1,5 @@
import fetch, {RequestInfo, RequestInit} from "node-fetch";
import {SysCallMapping} from "../system";
import fetch, { RequestInfo, RequestInit } from "node-fetch";
import { SysCallMapping } from "../system";
export function fetchSyscalls(): SysCallMapping {
return {
+3 -3
View File
@@ -1,6 +1,6 @@
import {promisify} from "util";
import {execFile} from "child_process";
import type {SysCallMapping} from "../system";
import { promisify } from "util";
import { execFile } from "child_process";
import type { SysCallMapping } from "../system";
const execFilePromise = promisify(execFile);
+4 -4
View File
@@ -1,7 +1,7 @@
import {createSandbox} from "../environments/node_sandbox";
import {expect, test} from "@jest/globals";
import {System} from "../system";
import {storeSyscalls} from "./store.dexie_browser";
import { createSandbox } from "../environments/node_sandbox";
import { expect, test } from "@jest/globals";
import { System } from "../system";
import { storeSyscalls } from "./store.dexie_browser";
// For testing in node.js
require("fake-indexeddb/auto");
+1 -1
View File
@@ -1,5 +1,5 @@
import Dexie from "dexie";
import {SysCallMapping} from "../system";
import { SysCallMapping } from "../system";
export type KV = {
key: string;
+4 -4
View File
@@ -1,7 +1,7 @@
import {createSandbox} from "../environments/node_sandbox";
import {expect, test} from "@jest/globals";
import {System} from "../system";
import {ensureTable, storeSyscalls} from "./store.knex_node";
import { createSandbox } from "../environments/node_sandbox";
import { expect, test } from "@jest/globals";
import { System } from "../system";
import { ensureTable, storeSyscalls } from "./store.knex_node";
import knex from "knex";
import fs from "fs/promises";
+2 -2
View File
@@ -1,5 +1,5 @@
import {Knex} from "knex";
import {SysCallMapping} from "../system";
import { Knex } from "knex";
import { SysCallMapping } from "../system";
type Item = {
page: string;
+1 -1
View File
@@ -1,6 +1,6 @@
import { SyscallContext, SysCallMapping } from "../system";
export function transportSyscalls(
export function proxySyscalls(
names: string[],
transportCall: (
ctx: SyscallContext,