mirror of
https://github.com/trycua/computer.git
synced 2026-01-01 11:00:31 -06:00
Fix some issues with the pnpm workspace, add readme & scripts
This commit is contained in:
119
libs/typescript/README.md
Normal file
119
libs/typescript/README.md
Normal 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
|
||||
```
|
||||
2335
libs/typescript/computer/pnpm-lock.yaml
generated
2335
libs/typescript/computer/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
1863
libs/typescript/core/pnpm-lock.yaml
generated
1863
libs/typescript/core/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -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"
|
||||
]
|
||||
}
|
||||
}
|
||||
1803
libs/typescript/pnpm-lock.yaml
generated
1803
libs/typescript/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,3 @@
|
||||
packages:
|
||||
- "computer/*"
|
||||
- "core/*"
|
||||
- "computer"
|
||||
- "core"
|
||||
|
||||
Reference in New Issue
Block a user