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

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))