diff --git a/.gitignore b/.gitignore index 8c13539..d207939 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ as-tral .npm-cache/ .codex # Include essential as-test artifacts +.wago/ diff --git a/as-test.config.json b/as-test.config.json index 1720ed3..8a47d6f 100644 --- a/as-test.config.json +++ b/as-test.config.json @@ -123,6 +123,22 @@ } } }, + "wago": { + "default": false, + "input": [ + "assembly/__tests__/**/*.spec.ts", + "!**/__tmp_*", + "!**/unmock.spec.ts" + ], + "buildOptions": { + "target": "wasi" + }, + "runOptions": { + "runtime": { + "cmd": "wago run --no-reg-abi " + } + } + }, "firefox": { "default": false, "buildOptions": { diff --git a/package.json b/package.json index 2eed856..52753f1 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "build:transform": "rm -rf ./transform/lib && tsc -p ./transform && prettier -w ./transform/", "test": "node ./bin/index.js test --parallel", "test:integration": "node --test tests/*.test.mjs", - "test:modes": "npm run test -- --mode node:bindings,node:bindings:raw,node:bindings:esm,node:wasi,wasmtime,wasmer,wazero,firefox,chromium,webkit,firefox:headless,chromium:headless,webkit:headless", + "test:modes": "npm run test -- --mode node:bindings,node:bindings:raw,node:bindings:esm,node:wasi,wasmtime,wasmer,wazero,wago,firefox,chromium,webkit,firefox:headless,chromium:headless,webkit:headless", "test:examples": "npm --prefix ./examples run test", "test:all": "npm run build && npm run test:modes && npm run test:integration && npm run test:examples", "test:ci": "npm run test -- --mode node:bindings,node:wasi,wasmtime", diff --git a/wago-lock.json b/wago-lock.json new file mode 100644 index 0000000..74fce5b --- /dev/null +++ b/wago-lock.json @@ -0,0 +1,8 @@ +{ + "plugins": { + "wago-org/wasi": { + "requiredCapabilities": ["host.environment", "host.imports"], + "grantedCapabilities": ["host.environment", "host.imports"] + } + } +} diff --git a/wago.json b/wago.json new file mode 100644 index 0000000..1cbd62a --- /dev/null +++ b/wago.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://wago.sh/schema.json", + "dependencies": ["github.com/wago-org/wasi"], + "plugins": { + "wago-org/wasi": { + "capabilities": ["host.environment", "host.imports"] + } + }, + "schema": "wago/v1" +}