Monorepo with yarn workspaces requires yarn 3.2

This commit is contained in:
Zef Hemel
2022-04-21 13:57:45 +02:00
parent 32f3501773
commit 1f842ec1d6
167 changed files with 10424 additions and 8263 deletions
+40
View File
@@ -0,0 +1,40 @@
import { syscall } from "./syscall";
export type KV = {
key: string;
value: any;
};
export async function set(key: string, value: any): Promise<void> {
return syscall("store.set", key, value);
}
export async function batchSet(kvs: KV[]): Promise<void> {
return syscall("store.batchSet", kvs);
}
export async function get(key: string): Promise<any> {
return syscall("store.get", key);
}
export async function del(key: string): Promise<void> {
return syscall("store.delete", key);
}
export async function batchDel(keys: string[]): Promise<void> {
return syscall("store.batchDelete", keys);
}
export async function queryPrefix(
prefix: string
): Promise<{ key: string; value: any }[]> {
return syscall("store.scanPrefix", prefix);
}
export async function deletePrefix(prefix: string): Promise<void> {
return syscall("store.deletePrefix", prefix);
}
export async function deleteAll(): Promise<void> {
return syscall("store.deleteAll");
}