Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 13 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
- main

jobs:
javascript-sandbox-tests:
name: JavaScript Sandbox Tests
bash-core-tests:
name: Bash Core Tests
runs-on: ubuntu-latest

steps:
Expand All @@ -29,11 +29,11 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Run tests
working-directory: wasm-sandboxes/js
working-directory: packages/bash
run: pnpm vitest run

python-sandbox-tests:
name: Python Sandbox Tests
bash-wasm-tests:
name: Bash WASM Tests
runs-on: ubuntu-latest

steps:
Expand All @@ -57,33 +57,18 @@ jobs:
python-version: '3.x'

- name: Install Python dependencies
working-directory: wasm-sandboxes/python
working-directory: packages/bash-wasm/sandboxes/python
run: pip install -r requirements.txt -q

- name: Run tests
working-directory: wasm-sandboxes/python
- name: Run Bash WASM core tests
working-directory: packages/bash-wasm
run: pnpm vitest run

bash-core-tests:
name: Bash Core Tests
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run JavaScript Sandbox tests
working-directory: packages/bash-wasm/sandboxes/js
run: pnpm vitest run

- name: Run tests
working-directory: packages/bash
- name: Run Python Sandbox tests
working-directory: packages/bash-wasm/sandboxes/python
run: pnpm vitest run

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"@capsule-run/cli": "^0.8.6",
"@capsule-run/sdk": "^0.8.6"
"@capsule-run/cli": "^0.8.7",
"@capsule-run/sdk": "^0.8.7"
},
"devDependencies": {
"esbuild": "^0.28.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/bash-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@capsule-run/bash-types",
"version": "0.1.0",
"description": "",
"type": "module",
"main": "./src/index.ts",
"types": "./src/index.ts",
"exports": {
Expand All @@ -12,7 +13,7 @@
},
"keywords": [],
"author": "",
"license": "ISC",
"license": "Apache-2.0",
"packageManager": "pnpm@10.21.0",
"devDependencies": {
"tsup": "^8.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/bash-types/src/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface CommandOptions {
raw: string[];
flags: Set<string>;
options: Map<string, string>;
positionals: string[];
args: string[];
hasFlag: (...names: string[]) => boolean;
};

Expand Down
2 changes: 1 addition & 1 deletion packages/bash-types/src/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface BaseRuntime {
/**
* Resolve a path in the sandbox
*/
resolvePath(state: State, path: string): Promise<string>;
resolvePath(state: State, path: string): Promise<string | undefined>;
}

export interface RuntimeResult {
Expand Down
15 changes: 11 additions & 4 deletions packages/bash-wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,25 @@
"name": "@capsule-run/bash-wasm",
"version": "0.1.0",
"description": "Sandboxed bash for agents",
"main": "index.js",
"type": "module",
"main": "./src/index.ts",
"types": "./src/index.ts",
"exports": {
".": "./src/index.ts"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"pretest": "pip install -r src/python/requirements.txt -q",
"test": "vitest run"
},
"license": "Apache-2.0",
"packageManager": "pnpm@10.21.0",
"devDependencies": {
"vitest": "*",
"tsup": "^8.0.0"
},
"dependencies": {
"@capsule-run/cli": "^0.8.6",
"@capsule-run/sdk": "^0.8.6",
"@capsule-run/cli": "^0.8.7",
"@capsule-run/sdk": "^0.8.7",
"@capsule-run/bash-types": "workspace:*"
}
}
Loading
Loading