Skip to content
Merged
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
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,20 @@ jobs:
env:
PTYWRIGHT_REQUIRED: "1"
run: npm test --workspace @onkernel/cua-cli
- name: Build cua-cli
run: npm run build --workspace @onkernel/cua-cli
- name: Pack tarball
run: npm pack --workspace @onkernel/cua-cli --pack-destination "$RUNNER_TEMP"
- name: CLI bin smoke test
run: |
SMOKE_DIR=$(mktemp -d)
cd "$SMOKE_DIR"
npm init -y > /dev/null
npm install "$RUNNER_TEMP"/onkernel-cua-cli-*.tgz
OUTPUT=$(./node_modules/.bin/cua --help)
echo "$OUTPUT"
echo "$OUTPUT" | grep -q "Usage:"
echo "$OUTPUT" | grep -q "cua \[options\] \[prompt\.\.\.\]"

integration:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"packages/cli"
],
"scripts": {
"build": "npm run build --workspace @onkernel/cua-ai && npm run build --workspace @onkernel/cua-agent && tsc -b && npm run build:native --workspace @onkernel/ptywright --if-present",
"build": "npm run build --workspace @onkernel/cua-ai && npm run build --workspace @onkernel/cua-agent && tsc -b && npm run build --workspace @onkernel/cua-cli && npm run build:native --workspace @onkernel/ptywright --if-present",
"build:cli": "npm run build --workspace @onkernel/cua-cli",
"dev": "tsc -b --watch",
"typecheck": "npm run build --workspace @onkernel/cua-ai && npm run build --workspace @onkernel/cua-agent && tsc -b",
Expand Down
9 changes: 5 additions & 4 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"license": "MIT",
"type": "module",
"main": "./dist/cli.js",
"types": "./dist/cli.d.ts",
"repository": {
"type": "git",
"url": "git+https://github.com/kernel/cua.git",
Expand All @@ -29,9 +28,10 @@
"node": ">=22.19.0"
},
"scripts": {
"build": "tsc -b && chmod +x dist/cli.js",
"clean": "tsc -b --clean",
"test": "vitest --run"
"build": "tsdown && chmod +x dist/cli.js",
"clean": "tsc -b --clean && rm -rf dist dist-tsc",
"test": "vitest --run",
"typecheck": "tsc -b"
},
"dependencies": {
"@earendil-works/pi-coding-agent": "0.79.1",
Expand All @@ -42,6 +42,7 @@
},
"devDependencies": {
"@onkernel/ptywright": "0.1.0",
"tsdown": "^0.22.2",
"vitest": "^3.2.4"
}
}
15 changes: 15 additions & 0 deletions packages/cli/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./dist-tsc",
"rootDir": "./src",
"emitDeclarationOnly": true,
"sourceMap": false,
"declarationMap": false
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "**/*.d.ts"],
"references": [
{ "path": "../ptywright" }
]
}
10 changes: 1 addition & 9 deletions packages/cli/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src"
},
"include": ["src/**/*"],
"references": [
{ "path": "../ptywright" }
]
"extends": "./tsconfig.build.json"
}
11 changes: 11 additions & 0 deletions packages/cli/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineConfig } from "tsdown";

export default defineConfig({
entry: ["src/cli.ts"],
format: ["esm"],
platform: "node",
dts: false,
sourcemap: false,
clean: true,
outExtensions: () => ({ js: ".js" }),
});
Loading