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
10 changes: 10 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ jobs:
- name: Build package
run: npm run build

- name: Verify CLI via npm exec
run: |
package_archive=$(npm pack | tail -n 1)
temp_dir=$(mktemp -d)
cd "$temp_dir"
output=$(npm exec --yes --package "${GITHUB_WORKSPACE}/${package_archive}" code-ollama -- --help)
printf '%s\n' "$output"
grep -F "code-ollama" <<< "$output"
grep -F "run <model> <prompt>" <<< "$output"

- name: Setup Ollama
uses: ai-action/setup-ollama@v2

Expand Down
12 changes: 4 additions & 8 deletions vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,19 @@ import { defineConfig } from 'vitest/config';
export default defineConfig({
build: {
target: 'node24',
lib: {
entry: 'src/cli.ts',
formats: ['es'],
fileName: 'cli',
},
ssr: 'src/cli.ts',
rolldownOptions: {
output: {
entryFileNames: 'cli.js',
},
external: [
'@inkjs/ui',
'cac',
'ink',
'node:child_process',
'node:fs',
'node:os',
'node:path',
'node:util',
'ollama',
'react',
],
},
},
Expand Down
Loading