@metasession.co/devaudit-cli 0.1.15 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metasession.co/devaudit-cli",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "description": "DevAudit CLI — installs, syncs, and operates the Metasession SDLC across consumer projects.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@clack/prompts": "^0.8.2",
36
- "@metasession.co/devaudit-plugin-sdk": "^0.1.15",
36
+ "@metasession.co/devaudit-plugin-sdk": "^0.1.16",
37
37
  "commander": "^12.1.0",
38
38
  "consola": "^3.2.3",
39
39
  "env-paths": "^3.0.0",
@@ -85,7 +85,7 @@ The bootstrap workflow:
85
85
 
86
86
  9. **Wire up runner scripts** — at minimum `test:e2e` (headless), `test:e2e:ui` or `:headed` (interactive), `test:e2e:debug`, and `test:e2e:update-snapshots` if visual regression is in.
87
87
 
88
- 10. **Offer a CI job** — write the YAML (or equivalent) for the project's CI system, but **do not commit it without confirmation**. Show it inline first.
88
+ 10. **Offer a CI job** — write the YAML (or equivalent) for the project's CI system, but **do not commit it without confirmation**. Show it inline first. On a **DevAudit** project, `.github/workflows/ci.yml` is generated and marked do-not-edit-manually — don't hand-edit it; instead drive the E2E gate from `sdlc-config.json`. If the suite must run against a **disposable local database** (the rule on any project with no separate test instance — never test against prod), set `e2e_setup_command` (e.g. `supabase start` + load schema + seed) and `e2e_env` (e.g. `E2E_LOCAL=1`, local coords, a dummy email key) so the gate severs production. See [Local-database E2E in CI](https://github.com/metasession-dev/DevAudit-Installer/blob/main/docs/e2e-local-db-ci.md), then `devaudit update` to regenerate.
89
89
 
90
90
  11. **Write a short README** in the test directory explaining structure, how to run, how to add new tests, and how to update visual baselines. Future contributors (and the skill itself, on next invocation) will thank you.
91
91
 
@@ -130,26 +130,16 @@ jobs:
130
130
  # ── Gate 4: E2E Tests (Playwright) ──
131
131
 
132
132
  {{DATABASE_URI_STEP}}
133
-
133
+ {{E2E_SETUP_STEP}}
134
134
  - name: Kill stale dev server
135
135
  run: lsof -ti:3000 | xargs kill -9 2>/dev/null || true
136
136
 
137
- - name: Start dev server
138
- run: {{E2E_START_COMMAND}} &
137
+ {{E2E_DEV_SERVER_STEP}}
139
138
 
140
139
  - name: Wait for dev server
141
140
  run: npx wait-on http://localhost:3000 --timeout 120000
142
141
 
143
- - name: E2E Tests
144
- env:
145
- # PLAYWRIGHT_JSON_OUTPUT_NAME makes the json reporter write straight
146
- # to the file. Capturing stdout (`> e2e-results.json`) instead mixed
147
- # the html reporter's "To open report" line in after the JSON blob
148
- # and produced an unparseable file (DevAudit #48). html report still
149
- # lands in playwright-report/.
150
- PLAYWRIGHT_HTML_REPORTER_OPEN: never
151
- PLAYWRIGHT_JSON_OUTPUT_NAME: e2e-results.json
152
- run: npx playwright test --project={{E2E_PROJECT}} --reporter=json,html
142
+ {{E2E_TEST_STEP}}
153
143
  {{E2E_AUTHENTICATED_STEP}}
154
144
  # ── Gate 5: Build ──
155
145
 
@@ -32,9 +32,14 @@
32
32
  "e2e_project": "chromium",
33
33
  "e2e_start_command": "npm run dev",
34
34
 
35
- "_comment_e2e_authenticated": "Optional report-only authenticated e2e gate (continue-on-error, never blocks the merge). e2e_projects = Playwright project names that need a logged-in session (auth-setup runs automatically as their dependency); e2e_seed_command seeds admins/fixtures before the run; e2e_env maps repo secrets onto the seed + e2e steps. Author these specs with the e2e-test-engineer skill (evidenceShot per AC). Leave empty to run only the blocking smoke project above.",
35
+ "_comment_e2e_setup": "Optional foreground command run before the dev server starts use it to stand up a DISPOSABLE LOCAL database so the E2E gate never touches production. The consumer owns the command (the framework stays stack-agnostic). For a Supabase project: install the CLI, `supabase start`, load the local schema + seed, e.g. \"supabase start && psql \\\"$DATABASE_URL\\\" -f supabase/schema-local.sql\". Pair with e2e_env below to point the dev server + tests at the local stack. Leave empty for projects whose dev server already targets a safe test DB.",
36
+ "e2e_setup_command": "",
37
+
38
+ "_comment_e2e_authenticated": "Optional report-only authenticated e2e gate (continue-on-error, never blocks the merge). e2e_projects = Playwright project names that need a logged-in session (auth-setup runs automatically as their dependency); e2e_seed_command seeds admins/fixtures before the run. Author these specs with the e2e-test-engineer skill (evidenceShot per AC). Leave empty to run only the blocking smoke project above.",
36
39
  "e2e_seed_command": "",
37
40
  "e2e_projects": [],
41
+
42
+ "_comment_e2e_env": "Env applied to the E2E setup, (blocking) dev-server, and E2E test steps. To run E2E against a local stack, override EVERY remote/prod key here so production is fully severed — e.g. { \"E2E_LOCAL\": \"1\", \"NEXT_PUBLIC_SUPABASE_URL\": \"http://127.0.0.1:54321\", \"SUPABASE_SERVICE_ROLE_KEY\": \"<local-service-key>\", \"RESEND_API_KEY\": \"re_e2e_local_dummy_key\" }. Step-level env wins over the job-level secrets. Values may reference repo secrets, e.g. \"${{ secrets.E2E_ADMIN_USERNAME }}\".",
38
43
  "e2e_env": {},
39
44
 
40
45
  "paths_ignore": [