@biffo/cli 0.314.3 → 0.315.1

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.
@@ -1,8 +1,13 @@
1
1
  name: CI
2
2
 
3
3
  # Scaled down from biffo-template's own root .github/workflows/ci.yml for a
4
- # single Python package: a plugin repo (per ADR-0003) extends the SDK and
5
- # has no JS/TS of its own.
4
+ # single Python package extending the SDK (per ADR-0003), plus the founder-
5
+ # facing frontend bundle a `user_frontend` plugin ships in `web/` (ADR-0021
6
+ # §2). It is deliberately NOT scaled down to zero JS/TS: this skeleton's own
7
+ # `web/` is exactly that bundle, and the `frontend` job below is what proves a
8
+ # freshly scaffolded plugin builds it with no edits — see A2:
9
+ # biffo-template#2009. `web-admin/` (the separate `admin_ingress` surface) is
10
+ # untouched here; its own CI wiring is tracked separately.
6
11
  #
7
12
  # It DOES have Terraform. This comment used to claim the opposite — "no
8
13
  # Terraform of its own; Terraform, if a plugin ships any, is provisioned by the
@@ -24,6 +29,9 @@ concurrency:
24
29
 
25
30
  env:
26
31
  PYTHON_VERSION: '3.13'
32
+ # Matches biffo-template's own root ci.yml NODE_VERSION (#2009) — the
33
+ # `frontend` job below is the only consumer of this in the skeleton today.
34
+ NODE_VERSION: '22'
27
35
 
28
36
  jobs:
29
37
  lint:
@@ -160,6 +168,58 @@ jobs:
160
168
  with:
161
169
  files: coverage.xml
162
170
 
171
+ frontend:
172
+ name: Frontend (web/)
173
+ runs-on: ${{ vars.RUNNER_LABEL || 'ubuntu-latest' }}
174
+ timeout-minutes: 20
175
+ # Proves the `user_frontend` bundle (ADR-0021 §2, biffo.plugin.json's
176
+ # "dir": "web/dist") actually builds. Before this job existed, the
177
+ # manifest declared it and nothing in this skeleton's own CI checked it —
178
+ # the exact drift docs/guides/development-practices.md records for
179
+ # web-admin/ ("nothing checked the frontend's lint, types, tests or
180
+ # whether it built"), here fixed at the source rather than patched
181
+ # downstream in every scaffolded plugin (biffo-template#2009).
182
+ #
183
+ # `web/` is its own package (its own package.json + lockfile), not a
184
+ # pnpm workspace member of this repo — `--ignore-workspace` matches
185
+ # deploy-app.yml's own build of this same directory (grep
186
+ # `plugin_dir/web` there), for the same reason: without it pnpm silently
187
+ # installs this repo's root deps instead and skips `web/` entirely.
188
+ steps:
189
+ - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
190
+ - uses: pnpm/action-setup@v4
191
+ - uses: actions/setup-node@v5
192
+ with:
193
+ node-version: ${{ env.NODE_VERSION }}
194
+ cache: pnpm
195
+ cache-dependency-path: web/pnpm-lock.yaml
196
+ - id: install
197
+ working-directory: web
198
+ run: pnpm install --ignore-workspace --frozen-lockfile
199
+ - name: Lint
200
+ if: ${{ !cancelled() && steps.install.outcome == 'success' }}
201
+ working-directory: web
202
+ run: pnpm run lint
203
+ - name: Type check
204
+ if: ${{ !cancelled() && steps.install.outcome == 'success' }}
205
+ working-directory: web
206
+ run: pnpm run typecheck
207
+ # Build BEFORE test, deliberately — web/src/base-path.test.ts's second
208
+ # assertion reads dist/index.html and skips itself (with a visible
209
+ # warning, not a silent pass) when dist/ is absent. Running the real
210
+ # build first is what turns that assertion from a permanent no-op into
211
+ # an actual check of the built asset paths, catching the exact class of
212
+ # bug (a `base` pasted from a sibling) that no other local gate caught
213
+ # for web-admin/'s equivalent (see the `frontend` job's header comment).
214
+ - name: Build
215
+ if: ${{ !cancelled() && steps.install.outcome == 'success' }}
216
+ working-directory: web
217
+ run: pnpm run build
218
+ - name: Test
219
+ if: ${{ !cancelled() && steps.install.outcome == 'success' }}
220
+ working-directory: web
221
+ run: pnpm run test
222
+
163
223
  validate-manifest:
164
224
  name: Validate biffo.plugin.json
165
225
  runs-on: ${{ vars.RUNNER_LABEL || 'ubuntu-latest' }}
@@ -0,0 +1,5 @@
1
+ # Dependencies
2
+ node_modules
3
+
4
+ # Build output
5
+ dist
@@ -0,0 +1,8 @@
1
+ import js from '@eslint/js'
2
+ import tseslint from 'typescript-eslint'
3
+
4
+ export default tseslint.config(
5
+ { ignores: ['dist'] },
6
+ js.configs.recommended,
7
+ ...tseslint.configs.recommended,
8
+ )
@@ -0,0 +1,12 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>example-plugin</title>
7
+ </head>
8
+ <body>
9
+ <div id="root"></div>
10
+ <script type="module" src="/src/main.tsx"></script>
11
+ </body>
12
+ </html>
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "example-plugin-web",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "tsc -b && vite build",
9
+ "typecheck": "tsc --noEmit",
10
+ "lint": "eslint .",
11
+ "test": "vitest run"
12
+ },
13
+ "dependencies": {
14
+ "@biffo/design-tokens": "^0.152.0",
15
+ "react": "^19.0.0",
16
+ "react-dom": "^19.0.0"
17
+ },
18
+ "devDependencies": {
19
+ "@testing-library/dom": "^10.4.1",
20
+ "@testing-library/jest-dom": "^6.9.1",
21
+ "@testing-library/react": "^16.3.2",
22
+ "@types/node": "^26.1.2",
23
+ "@types/react": "^19.0.7",
24
+ "@types/react-dom": "^19.0.3",
25
+ "@vitejs/plugin-react": "^4.7.0",
26
+ "eslint": "^9.18.0",
27
+ "jsdom": "^30.0.1",
28
+ "typescript": "^5.7.3",
29
+ "typescript-eslint": "^8.20.0",
30
+ "vite": "^6.4.3",
31
+ "vitest": "^4.1.0"
32
+ },
33
+ "pnpm": {
34
+ "overrides": {
35
+ "brace-expansion@<5.0.9": ">=5.0.9",
36
+ "js-yaml@<4.3.1": ">=4.3.1 <5",
37
+ "nanoid@<3.3.17": ">=3.3.17 <4"
38
+ }
39
+ }
40
+ }