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
30 changes: 15 additions & 15 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "Ona",
"image": "mcr.microsoft.com/devcontainers/base:2.0.4-noble",
"containerEnv": {
"DO_NOT_TRACK": "1",
"NO_UPDATE_NOTIFIER": "1",
"COREPACK_ENABLE_DOWNLOAD_PROMPT": "0"
"name": "Ona",
"image": "mcr.microsoft.com/devcontainers/base:2.0.4-noble",
"containerEnv": {
"DO_NOT_TRACK": "1",
"NO_UPDATE_NOTIFIER": "1",
"COREPACK_ENABLE_DOWNLOAD_PROMPT": "0"
},
"postCreateCommand": ".devcontainer/lifecycle/post-create.sh",
"remoteUser": "vscode",
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "22",
"pnpmVersion": "none"
},
"postCreateCommand": ".devcontainer/lifecycle/post-create.sh",
"remoteUser": "vscode",
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "22",
"pnpmVersion": "none"
},
"ghcr.io/devcontainers/features/github-cli:1": {}
}
"ghcr.io/devcontainers/features/github-cli:1": {}
}
}
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
- name: Generate API client
run: pnpm generate

- name: Check formatting
run: pnpm format:check

- name: Typecheck
run: pnpm typecheck

Expand Down
5 changes: 5 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"printWidth": 80,
"ignorePatterns": ["*.md", "api-spec.json", "pnpm-lock.yaml"]
}
4 changes: 4 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ We map from the REST api path to a command structure for CLI with the following
- Use the same placeholder for common inputs: `<id>` for IDs, `<timestamp>` for date-times, `<date>` for date-only values, `<bool>` for true/false, `<query>` for search terms, `<json>` for inline JSON, `<path>` for local files, and `<text>` for other free text.
- Mark repeatable flags `(repeatable)`. Describe timestamps as “ISO 8601 timestamp”; avoid repeated format examples.

# Formatting

- Run `pnpm format` (oxfmt) before committing; CI runs `pnpm format:check`. Markdown is not formatted.

# Testing

- Test changes end to end when modifying the CLI. Build the binary and test the commands.
Expand Down
19 changes: 11 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,24 @@
"name": "@vanta/cli",
"version": "0.2.0",
"description": "Vanta CLI — manage compliance resources from the terminal",
"type": "module",
"license": "SEE LICENSE IN LICENSE",
"bin": {
"vanta": "./dist/cli.js"
},
"files": [
"dist"
],
"type": "module",
"scripts": {
"generate": "openapi-ts",
"dev": "tsx src/cli.ts",
"build": "pnpm run generate && tsup",
"typecheck": "tsc --noEmit",
"test": "node --import tsx --test 'src/**/*.test.ts'",
"build:binaries": "tsx scripts/build-binaries.ts"
},
"packageManager": "[email protected]",
"engines": {
"node": ">=22"
"build:binaries": "tsx scripts/build-binaries.ts",
"format": "oxfmt",
"format:check": "oxfmt --check"
},
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"@napi-rs/keyring": "^1.3.0",
"@toon-format/toon": "^0.8.0",
Expand All @@ -31,8 +29,13 @@
"@hey-api/openapi-ts": "^0.85.0",
"@types/node": "^22.15.0",
"bun": "^1.3.14",
"oxfmt": "0.72.0",
"tsup": "^8.5.0",
"tsx": "^4.20.0",
"typescript": "^5.8.0"
}
},
"engines": {
"node": ">=22"
},
"packageManager": "[email protected]"
}
225 changes: 225 additions & 0 deletions pnpm-lock.yaml

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

4 changes: 3 additions & 1 deletion scripts/build-binaries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ const targets = [
function run(cmd: string, args: string[]): void {
const result = spawnSync(cmd, args, { stdio: "inherit" });
if (result.status !== 0) {
throw new Error(`${cmd} ${args.join(" ")} failed with code ${result.status}`);
throw new Error(
`${cmd} ${args.join(" ")} failed with code ${result.status}`,
);
}
}

Expand Down
Loading
Loading