feat(cli): add initial CLI implementation with argument parsing and prompt handling
- Created package.json and package-lock.json for CLI package. - Implemented argument parsing in args.ts to handle various flags and commands. - Developed main CLI logic in cli.ts to execute commands and handle errors. - Added configuration loading from a JSON file in config.ts, with environment variable support. - Implemented prompt resolution and provider interaction in prompt.ts. - Added usage documentation for the CLI. - Configured TypeScript settings in tsconfig.json for the CLI package. - Updated README in vscode package to reflect the new CLI functionality. - Refactored root tsconfig.json to streamline project structure.
This commit is contained in:
@@ -29,32 +29,30 @@ jobs:
|
||||
git checkout ${{ gitea.sha }}
|
||||
fi
|
||||
|
||||
- name: Install dependencies
|
||||
- name: Install Chrome package dependencies
|
||||
run: npm ci --prefer-offline --no-audit --no-fund
|
||||
working-directory: /tmp/lexai
|
||||
working-directory: /tmp/lexai/packages/chrome
|
||||
|
||||
# Generates .wxt/types (ImportMeta.env etc.) required by typecheck.
|
||||
# Also runs via the postinstall hook — kept explicit so a future
|
||||
# --ignore-scripts install can't silently break the typecheck step.
|
||||
- name: Prepare WXT types
|
||||
run: npx wxt prepare
|
||||
working-directory: /tmp/lexai
|
||||
working-directory: /tmp/lexai/packages/chrome
|
||||
|
||||
- name: Type check
|
||||
run: npm run typecheck
|
||||
working-directory: /tmp/lexai
|
||||
working-directory: /tmp/lexai/packages/chrome
|
||||
|
||||
- name: Run unit tests
|
||||
run: npm test -- --run
|
||||
working-directory: /tmp/lexai
|
||||
working-directory: /tmp/lexai/packages/chrome
|
||||
|
||||
- name: Build extension
|
||||
run: npm run build
|
||||
working-directory: /tmp/lexai
|
||||
working-directory: /tmp/lexai/packages/chrome
|
||||
|
||||
- name: Verify build output
|
||||
run: ls -la .output/chrome-mv3/
|
||||
working-directory: /tmp/lexai
|
||||
working-directory: /tmp/lexai/packages/chrome
|
||||
|
||||
- name: Package as ZIP
|
||||
run: |
|
||||
@@ -64,7 +62,7 @@ jobs:
|
||||
zip -r /tmp/lexai-chrome-mv3-${VERSION}.zip .output/chrome-mv3/
|
||||
echo "PACKAGE_VERSION=${VERSION}" >> $GITHUB_ENV
|
||||
echo "✅ Packaged: lexai-chrome-mv3-${VERSION}.zip"
|
||||
working-directory: /tmp/lexai
|
||||
working-directory: /tmp/lexai/packages/chrome
|
||||
|
||||
- name: Publish to Gitea Package Registry
|
||||
if: gitea.event_name == 'push'
|
||||
|
||||
Reference in New Issue
Block a user