Add Node/TS automation twin sharing the extension core.
CI / automation-js (vitest + real Chromium) (pull_request) Successful in 43s
CI / Lint + tests (pull_request) Successful in 9m52s

Expose ExtractorSession for Playwright/camoufox-js so Node automations can
import context dumps instead of shelling out to the Python package. Same
fixture as the Python tests; wired into Makefile and Gitea CI.
This commit is contained in:
2026-07-15 18:17:14 -04:00
parent f79552249e
commit 55018a6e3e
15 changed files with 2811 additions and 6 deletions
+8 -2
View File
@@ -1,4 +1,4 @@
.PHONY: help test lint package ci install
.PHONY: help test test-js lint package ci install install-js
help: ## Show targets
@grep -E '^[a-zA-Z_-]+:.*?## ' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " %-12s %s\n", $$1, $$2}'
@@ -8,9 +8,15 @@ install: ## Create venv and install automation package + Playwright Chromium
cd automation && .venv/bin/pip install -U pip && .venv/bin/pip install -e ".[dev]"
cd automation && .venv/bin/playwright install chromium
install-js: ## npm install automation-js (uses the Chromium cache npx playwright already has)
cd automation-js && npm install
test: ## Run pytest
cd automation && .venv/bin/pytest -q
test-js: ## Run automation-js vitest suite (real headless Chromium)
cd automation-js && npm test
lint: ## Syntax-check extension JS + validate manifest JSON
@node --check extension/core/dom.js
@node --check extension/core/prompt.js
@@ -24,4 +30,4 @@ lint: ## Syntax-check extension JS + validate manifest JSON
package: ## Zip extension/ into dist/
python3 scripts/package_extension.py
ci: lint test package ## Local stand-in for GitHub Actions
ci: lint test test-js package ## Local stand-in for GitHub Actions