Feat: js action

wip: Getting async js

feat: Have execute get action config

feat: Read + Write

chore: Add typing for globals

chore: Change the default path, include error on missing function, and add json File Read Write

chore: Change the default path, include error on missing function, and add json File Read Write

wip: Fix the unit test

wip: Fix the unit test

feat: module loading
This commit is contained in:
J M
2022-05-16 17:30:08 -06:00
committed by Keagan McClelland
parent e7d0a81bfe
commit 52de5426ad
3 changed files with 1397 additions and 2107 deletions

3495
backend/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -65,8 +65,8 @@ color-eyre = "0.5"
cookie_store = "0.15.0"
digest = "0.9.0"
divrem = "1.0.0"
deno_core = "0.135.0"
deno_ast = {version="0.14.1", features = ["transpiling"]}
deno_core = "0.135.0"
deno_ast = { version = "0.14.1", features = ["transpiling"] }
ed25519-dalek = { version = "1.0.1", features = ["serde"] }
emver = { version = "0.1.6", features = ["serde"] }
fd-lock-rs = "0.1.3"

View File

@@ -647,7 +647,10 @@ mod js_runtime {
}
/// We need to make sure that during the file accessing, we don't reach beyond our scope of control
async fn is_subset(parent: impl AsRef<Path>, child: impl AsRef<Path>) -> Result<bool, AnyError> {
async fn is_subset(
parent: impl AsRef<Path>,
child: impl AsRef<Path>,
) -> Result<bool, AnyError> {
let child = tokio::fs::canonicalize(child).await?;
let parent = tokio::fs::canonicalize(parent).await?;
Ok(child.starts_with(parent))