Fix some issues with the pnpm workspace, add readme & scripts

This commit is contained in:
Morgan Dean
2025-06-25 11:52:01 -07:00
parent 519ff8d4a4
commit 0f917e2966
6 changed files with 1934 additions and 4202 deletions

119
libs/typescript/README.md Normal file
View File

@@ -0,0 +1,119 @@
# C/UA TypeScript Libraries
This repository contains TypeScript implementations of the C/UA libraries:
- `@cua/core`: Core functionality including telemetry and logging
- `@cua/computer`: Computer interaction SDK for VM management and control
## Project Structure
```text
libs/typescript/
├── computer/ # Computer SDK package
├── core/ # Core functionality package
├── package.json # Root package configuration
└── pnpm-workspace.yaml # Workspace configuration
```
## Prerequisites
- [Node.js](https://nodejs.org/) (v18 or later)
- [pnpm](https://pnpm.io/) (v10 or later)
## Setup and Installation
1. Install dependencies for all packages:
```bash
pnpm install
```
1. Build all packages:
```bash
pnpm build:all
```
## Development Workflow
### Building Packages
Build all packages in the correct dependency order:
```bash
pnpm build:all
```
Build specific packages:
```bash
# Build core package
pnpm --filter @cua/core build
# Build computer package
pnpm --filter @cua/computer build
```
### Running Tests
Run tests for all packages:
```bash
pnpm test:all
```
Run tests for specific packages:
```bash
# Test core package
pnpm --filter @cua/core test
# Test computer package
pnpm --filter @cua/computer test
```
### Linting
Lint all packages:
```bash
pnpm lint:all
```
Fix linting issues:
```bash
pnpm lint:fix:all
```
## Package Details
### @cua/core
Core functionality for C/UA libraries including:
- Telemetry with PostHog integration
- Common utilities and types
### @cua/computer
Computer interaction SDK for managing and controlling virtual machines:
- VM provider system (Cloud)
- Interface system for OS-specific interactions
- Screenshot, keyboard, and mouse control
- Command execution
## Publishing
Prepare packages for publishing:
```bash
pnpm -r build
```
Publish packages:
```bash
pnpm -r publish
```

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -7,7 +7,14 @@
"license": "MIT",
"scripts": {
"lint": "biome check",
"lint:fix": "biome check --fix"
"lint:fix": "biome check --fix",
"build:core": "pnpm --filter @cua/core build",
"build:computer": "pnpm --filter @cua/computer build",
"build": "pnpm build:core && pnpm build:computer",
"test:core": "pnpm --filter @cua/core test",
"test:computer": "pnpm --filter @cua/computer test",
"test": "pnpm -r test",
"typecheck": "pnpm -r typecheck"
},
"packageManager": "pnpm@10.6.5",
"devDependencies": {
@@ -15,7 +22,8 @@
},
"pnpm": {
"onlyBuiltDependencies": [
"@biomejs/biome"
"@biomejs/biome",
"esbuild"
]
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,3 @@
packages:
- "computer/*"
- "core/*"
- "computer"
- "core"