Skip to content

Commit 4f6bd52

Browse files
authored
Merge pull request #180 from mi-examples/pp-3449
feat: add Request Inspector and full CI coverage (PP-3449)
2 parents 4d0bb4e + e02c79d commit 4f6bd52

75 files changed

Lines changed: 6513 additions & 2093 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,21 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v6
15+
with:
16+
persist-credentials: false
1517

1618
- name: Setup Node.js
17-
uses: actions/setup-node@v4
19+
uses: actions/setup-node@v6
1820
with:
19-
node-version: 22
21+
node-version: 24
2022
cache: 'npm'
2123

2224
- name: Install dependencies
23-
run: npm ci
25+
run: npm ci --no-audit
26+
27+
- name: Audit dependencies
28+
run: npm run audit:all
2429

2530
- name: Build
2631
run: npm run build
@@ -36,25 +41,44 @@ jobs:
3641
test:
3742
runs-on: ubuntu-latest
3843
needs: build
44+
timeout-minutes: 30
3945
steps:
4046
- name: Checkout
41-
uses: actions/checkout@v4
47+
uses: actions/checkout@v6
48+
with:
49+
persist-credentials: false
4250

4351
- name: Setup Node.js
44-
uses: actions/setup-node@v4
52+
uses: actions/setup-node@v6
4553
with:
46-
node-version: 22
54+
node-version: 24
4755
cache: 'npm'
4856

4957
- name: Install dependencies
50-
run: npm ci
58+
run: npm ci --no-audit
59+
60+
- name: Free disk space
61+
run: |
62+
df -h
63+
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
64+
df -h
5165
5266
- name: Build
5367
run: npm run build
5468

55-
- name: Install Playwright browsers
56-
run: npx playwright install --with-deps chromium
69+
- name: Install E2E fixture dependencies
70+
run: |
71+
npm install --prefix tests/test-nextjs --no-audit --package-lock=false
72+
npm install --prefix tests/test-commonjs --no-audit --package-lock=false
73+
npm install --prefix tests/test-nextjs-cjs --no-audit --package-lock=false
74+
75+
- name: Run unit and integration tests
76+
run: npm run test
5777

5878
- name: Run E2E tests
59-
run: npx playwright test
60-
continue-on-error: true
79+
run: npm run test:e2e
80+
81+
- name: Run browser E2E tests
82+
env:
83+
PLAYWRIGHT_USE_SYSTEM_CHROME: '1'
84+
run: npm run test:e2e:browser

.github/workflows/release-beta.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v4
17+
uses: actions/checkout@v6
1818
with:
1919
fetch-depth: 0
2020
persist-credentials: false
2121

2222
- name: Setup Node.js
23-
uses: actions/setup-node@v4
23+
uses: actions/setup-node@v6
2424
with:
25-
node-version: 22
25+
node-version: 24
2626
cache: 'npm'
2727

2828
- name: Install dependencies
29-
run: npm ci
29+
run: npm ci --no-audit
3030

3131
- name: Build
3232
run: npm run build

.github/workflows/release.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,21 @@ on:
77

88
permissions:
99
contents: write
10+
id-token: write
1011

1112
jobs:
1213
release:
1314
runs-on: ubuntu-latest
1415
steps:
1516
- name: Checkout
16-
uses: actions/checkout@v4
17+
uses: actions/checkout@v6
1718
with:
1819
fetch-depth: 0
1920

2021
- name: Setup Node.js
21-
uses: actions/setup-node@v4
22+
uses: actions/setup-node@v6
2223
with:
23-
node-version: 22
24+
node-version: 24
2425
registry-url: https://registry.npmjs.org/
2526
cache: 'npm'
2627

@@ -32,7 +33,7 @@ jobs:
3233
echo "Releasing version: $VERSION"
3334
3435
- name: Install dependencies
35-
run: npm ci
36+
run: npm ci --no-audit
3637

3738
- name: Build
3839
run: npm run build
@@ -48,13 +49,14 @@ jobs:
4849
- name: Update package version
4950
run: npm version ${{ steps.version.outputs.version }} --no-git-tag-version
5051

52+
- name: Upgrade npm for OIDC trusted publishing
53+
run: npm install -g npm@latest --no-audit
54+
5155
- name: Publish to npm
52-
env:
53-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5456
run: npm publish --access public
5557

5658
- name: Create GitHub Release
57-
uses: softprops/action-gh-release@v1
59+
uses: softprops/action-gh-release@v3
5860
with:
5961
tag_name: ${{ github.ref_name }}
6062
name: Release ${{ github.ref_name }}

.mcp.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"mcpServers": {
3+
"Framelink MCP for Figma": {
4+
"command": "npx",
5+
"args": ["-y", "figma-developer-mcp@0.13.2", "--stdio"],
6+
"env": {
7+
"FIGMA_API_KEY": "${FIGMA_API_KEY}"
8+
}
9+
}
10+
}
11+
}

CHANGELOG.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,103 @@
1+
# [1.0.0](https://github.com/mi-examples/pp-dev/compare/v0.19.0-beta.2...v1.0.0) (2026-06-19)
2+
3+
## ⚠ BREAKING CHANGES
4+
5+
This release replaces the flat configuration API with a grouped schema. All existing `pp-dev.config.*` files must be updated — use `pp-dev migrate` to do it automatically.
6+
7+
### Configuration schema
8+
9+
The flat `VitePPDevOptions` object is replaced by `PPDevConfig` with five grouped sections:
10+
11+
```ts
12+
// BEFORE (0.x)
13+
export default {
14+
backendBaseURL: 'https://mi.company.com',
15+
personalAccessToken: 'YOUR_TOKEN',
16+
miHudLess: true,
17+
v7Features: true,
18+
appId: 937,
19+
templateLess: false,
20+
};
21+
22+
// AFTER (1.0)
23+
import { defineConfig } from '@metricinsights/pp-dev';
24+
25+
export default defineConfig({
26+
mi: { url: 'https://mi.company.com', token: 'YOUR_TOKEN', mode: 'standalone', apiVersion: 7 },
27+
app: { id: 937, type: 'template' },
28+
});
29+
```
30+
31+
| 0.x field | 1.0 field |
32+
|---|---|
33+
| `backendBaseURL` | `mi.url` |
34+
| `personalAccessToken` | `mi.token` |
35+
| `miHudLess: true` | `mi.mode: 'standalone'` |
36+
| `miHudLess: false` | `mi.mode: 'embedding'` |
37+
| `integrateMiTopBar: true` | `mi.mode: 'standalone'`, `mi.include: 'top-bar'` |
38+
| `integrateMiTopBar: { addSharedComponentsScripts: true }` | `mi.include: 'shared-components'` |
39+
| `v7Features: true` | `mi.apiVersion: 7` |
40+
| `v7Features: false` | `mi.apiVersion: 6` |
41+
| `appId` / `portalPageId` | `app.id` |
42+
| `templateName` | `app.name` (auto-resolved from `package.json#name` — usually omit) |
43+
| `templateLess: true` | `app.type: 'page'` |
44+
| `templateLess: false` | `app.type: 'template'` |
45+
| `enableProxyCache` | `proxy.cache` |
46+
| `proxyCacheTTL` | `proxy.cacheTtl` |
47+
| `disableSSLValidation: true` | `proxy.tls.allowSelfSigned: true` |
48+
| `distZip` | `build.zip` |
49+
| `versionPlugin` | `build.versionFile` |
50+
| `imageOptimizer` | `build.imageOptimisations` |
51+
| `outDir` | `build.outDir` |
52+
| `syncBackupsDir` | `sync.backupsDir` |
53+
54+
### Removed
55+
56+
- `pp-watch.config.*` / `.pp-watch.config.*` config files — use `pp-dev.config.*` instead
57+
- `PPWatchConfig` type
58+
- `VitePPDevOptions` type — use `PPDevConfig`
59+
- `normalizeVitePPDevConfig()` — internal, use `normalizePPDevConfig()`
60+
61+
### Defaults
62+
63+
| Field | Default |
64+
|---|---|
65+
| `mi.mode` | `'standalone'` |
66+
| `mi.apiVersion` | `7` |
67+
| `app.type` | `'template'` |
68+
| `app.name` | resolved from `package.json#name` |
69+
70+
### Validation
71+
72+
Startup validation now throws meaningful errors instead of silently ignoring bad config. Key rules:
73+
74+
- `mi.include` requires `mi.mode: 'standalone'`
75+
- `mi.url` is required when `mi.mode: 'embedding'` or `app.type: 'template'`
76+
- `app.id` is required for templates and standalone pages
77+
78+
### Migration
79+
80+
Run the built-in codemod to upgrade your config automatically:
81+
82+
```bash
83+
npx @metricinsights/pp-dev migrate
84+
# Preview changes first:
85+
npx @metricinsights/pp-dev migrate --dry-run
86+
# Force output format:
87+
npx @metricinsights/pp-dev migrate --format ts
88+
```
89+
90+
The command detects flat 0.x configs and `pp-watch.config.*` files, migrates them to the new grouped format, and writes a `.bak` backup before overwriting.
91+
92+
## Features
93+
94+
* **config:** grouped `PPDevConfig` schema with `mi`, `app`, `proxy`, `build`, `sync` sections
95+
* **config:** `defineConfig()` helper for full TypeScript intellisense
96+
* **cli:** `pp-dev migrate` codemod — auto-migrates 0.x flat and `pp-watch` configs to 1.0 format, supports `--dry-run`, `--format ts|js|json`, `--output`, `--no-backup`
97+
* **ui:** redesigned dev panel — MI brand colors (`#075B7E`), Inter font, bordered buttons, updated toast and confirm modal styles
98+
99+
---
100+
1101
# [0.19.0-beta.2](https://github.com/mi-examples/pp-dev/compare/v0.19.0-beta.1...v0.19.0-beta.2) (2026-06-18)
2102

3103

0 commit comments

Comments
 (0)