@metricinsights/pp-dev 0.18.3 → 1.0.0-beta.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +178 -0
  2. package/README.md +222 -250
  3. package/dist/CHANGELOG.md +178 -0
  4. package/dist/README.md +222 -250
  5. package/dist/cjs/cli.js +1 -1
  6. package/dist/cjs/cli.js.map +1 -1
  7. package/dist/cjs/helpers.js +1 -1
  8. package/dist/cjs/helpers.js.map +1 -1
  9. package/dist/cjs/index-MzGAxNTB.js +2 -0
  10. package/dist/cjs/index-MzGAxNTB.js.map +1 -0
  11. package/dist/cjs/index.js +1 -1
  12. package/dist/cjs/migrate-r2mXdGLZ.js +2 -0
  13. package/dist/cjs/migrate-r2mXdGLZ.js.map +1 -0
  14. package/dist/cjs/package.json +18 -16
  15. package/dist/cjs/plugin-34c8_AjI.js +2 -0
  16. package/dist/cjs/plugin-34c8_AjI.js.map +1 -0
  17. package/dist/cjs/plugin.js +1 -1
  18. package/dist/cjs/version-plugin-BOFuJ-Rp.js +2 -0
  19. package/dist/cjs/version-plugin-BOFuJ-Rp.js.map +1 -0
  20. package/dist/client/client.css +1 -1
  21. package/dist/client/client.css.map +1 -1
  22. package/dist/client/client.js +168 -25
  23. package/dist/client/client.js.map +1 -1
  24. package/dist/client/index.html +33 -16
  25. package/dist/esm/cli.js +1 -1
  26. package/dist/esm/cli.js.map +1 -1
  27. package/dist/esm/helpers.js +1 -1
  28. package/dist/esm/helpers.js.map +1 -1
  29. package/dist/esm/index-C7dYPskY.js +2 -0
  30. package/dist/esm/index-C7dYPskY.js.map +1 -0
  31. package/dist/esm/index.js +1 -1
  32. package/dist/esm/migrate-BYuCtRbI.js +2 -0
  33. package/dist/esm/migrate-BYuCtRbI.js.map +1 -0
  34. package/dist/esm/package.json +18 -16
  35. package/dist/esm/plugin-Dvva-sxE.js +2 -0
  36. package/dist/esm/plugin-Dvva-sxE.js.map +1 -0
  37. package/dist/esm/plugin.js +1 -1
  38. package/dist/esm/version-plugin-vu8VWkws.js +2 -0
  39. package/dist/esm/version-plugin-vu8VWkws.js.map +1 -0
  40. package/dist/types/index.d.ts +103 -139
  41. package/package.json +37 -28
  42. package/dist/cjs/index-B1GblhLQ.js +0 -2
  43. package/dist/cjs/index-B1GblhLQ.js.map +0 -1
  44. package/dist/cjs/plugin-DY9gjLm8.js +0 -2
  45. package/dist/cjs/plugin-DY9gjLm8.js.map +0 -1
  46. package/dist/cjs/version-plugin-DSLhm6Q1.js +0 -2
  47. package/dist/cjs/version-plugin-DSLhm6Q1.js.map +0 -1
  48. package/dist/esm/index-basLGB1P.js +0 -2
  49. package/dist/esm/index-basLGB1P.js.map +0 -1
  50. package/dist/esm/plugin-B6DaUVqp.js +0 -2
  51. package/dist/esm/plugin-B6DaUVqp.js.map +0 -1
  52. package/dist/esm/version-plugin-DekxT1OJ.js +0 -2
  53. package/dist/esm/version-plugin-DekxT1OJ.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,181 @@
1
+ # [0.20.0-beta.4](https://github.com/mi-examples/pp-dev/compare/v0.20.0-beta.3...v0.20.0-beta.4) (2026-07-02)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **PP-3449:** guard release.yml against non-tag workflow_dispatch runs ([a7f463f](https://github.com/mi-examples/pp-dev/commit/a7f463f7c0e75f3305b2dfab560ee9a6c315343d))
7
+
8
+ # [0.20.0-beta.3](https://github.com/mi-examples/pp-dev/compare/v0.20.0-beta.2...v0.20.0-beta.3) (2026-07-01)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **PP-3449:** address PR [#182](https://github.com/mi-examples/pp-dev/issues/182) code review comments ([010a182](https://github.com/mi-examples/pp-dev/commit/010a182136cf72eac0782e38750ea30f9f89f8f8))
14
+
15
+ # [0.20.0-beta.2](https://github.com/mi-examples/pp-dev/compare/v0.20.0-beta.1...v0.20.0-beta.2) (2026-07-01)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **ui:** align dev panel with design ([0d020e3](https://github.com/mi-examples/pp-dev/commit/0d020e32c3e1608cafdcc0c7a5b368524867a785))
21
+
22
+ # [0.20.0-beta.1](https://github.com/mi-examples/pp-dev/compare/v0.19.0...v0.20.0-beta.1) (2026-06-30)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * address code review defects ([c734183](https://github.com/mi-examples/pp-dev/commit/c734183f2b4e7cd901e27502acff42d671d4dff4))
28
+ * address review feedback defects ([85e2b80](https://github.com/mi-examples/pp-dev/commit/85e2b80ddc4cdeca9d97682315c4a0417cb34e5a))
29
+ * **build:** run rollup-plugin-dts in child process to prevent Windows hang ([d9466b0](https://github.com/mi-examples/pp-dev/commit/d9466b0884f3e0eb5d01ef864e18ba32c6ff7899))
30
+ * **ci:** restore fixture package install ([d0ea762](https://github.com/mi-examples/pp-dev/commit/d0ea762c6f9e6802cb3bca22d29f7193a0dcdf9c))
31
+ * **e2e:** use taskkill /T /F on Windows to kill pp-dev process tree ([79ca61e](https://github.com/mi-examples/pp-dev/commit/79ca61e2f73144d9584bce762424853c154281e7))
32
+ * **mock-mi:** fix broken regex and Windows-incompatible spawn in record.ts ([ad0b033](https://github.com/mi-examples/pp-dev/commit/ad0b0333976b38b362b74a47c8bad239d9b0e75a))
33
+ * **mock-mi:** fix remaining TS errors in server.ts ([b538640](https://github.com/mi-examples/pp-dev/commit/b5386404e0fb16f8d5ba03073da507c8f679cb48))
34
+ * **mock-mi:** fix TypeScript errors in mock-mi server and record scripts ([f64f835](https://github.com/mi-examples/pp-dev/commit/f64f8350e4353ac90f963feee99ff945c15572bf))
35
+ * **mock-mi:** store binary responses as base64 in cassettes ([c6ee828](https://github.com/mi-examples/pp-dev/commit/c6ee82800dc4c621326f4032ea2f2ec606b0545b))
36
+ * **security:** patch npm/node-gyp undici <=6.26.0 high-severity CVEs ([d4c8a10](https://github.com/mi-examples/pp-dev/commit/d4c8a10e704c75b6d1c1b7bcd8166d007b5270a2)), closes [hi#severity](https://github.com/hi/issues/severity) [hi#severity](https://github.com/hi/issues/severity)
37
+ * **security:** pin undici to ^7.28.0 to fix CVEs without breaking jsdom ([d03bd5e](https://github.com/mi-examples/pp-dev/commit/d03bd5e744e18695a7c05c3e3e6b545e2a00b219))
38
+ * **ui:** align panel bar with Figma spec (PP-3449) ([9ed1320](https://github.com/mi-examples/pp-dev/commit/9ed13200bb154753534a29b7f606b3fc663d3076))
39
+
40
+
41
+ ### Features
42
+
43
+ * **inspector:** add Request Inspector with web UI and REST API ([e53fa90](https://github.com/mi-examples/pp-dev/commit/e53fa90639bdb6ed917772169ea2cb4f36de28a8))
44
+ * **inspector:** print inspector URL banner to browser DevTools console ([9222397](https://github.com/mi-examples/pp-dev/commit/92223972ec5f649085a76afd22b2328aeafb0e97))
45
+ * **mock-mi:** add PAT support and template API fetch to record-auto ([74c3142](https://github.com/mi-examples/pp-dev/commit/74c3142941456d9a8fdaad62fdb1ff956e6b147e))
46
+ * **ui:** PP-3440 MI brand redesign — colors, Inter font, SVG type icons ([a0a30a5](https://github.com/mi-examples/pp-dev/commit/a0a30a5aafe07255cc74bb614d36f86a4ee64925)), closes [#075B7E](https://github.com/mi-examples/pp-dev/issues/075B7E) [#077E45](https://github.com/mi-examples/pp-dev/issues/077E45) [#AC2B2B](https://github.com/mi-examples/pp-dev/issues/AC2B2B) [#FFB000](https://github.com/mi-examples/pp-dev/issues/FFB000)
47
+ * v1.0 grouped PPDevConfig schema, defineConfig helper, pp-dev migrate codemod ([222b4e5](https://github.com/mi-examples/pp-dev/commit/222b4e5949144295f07dd9fed87e131692323560))
48
+
49
+ # [1.0.0](https://github.com/mi-examples/pp-dev/compare/v0.19.0-beta.2...v1.0.0) (2026-06-19)
50
+
51
+ ## ⚠ BREAKING CHANGES
52
+
53
+ 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.
54
+
55
+ ### Configuration schema
56
+
57
+ The flat `VitePPDevOptions` object is replaced by `PPDevConfig` with five grouped sections:
58
+
59
+ ```ts
60
+ // BEFORE (0.x)
61
+ export default {
62
+ backendBaseURL: 'https://mi.company.com',
63
+ personalAccessToken: 'YOUR_TOKEN',
64
+ miHudLess: true,
65
+ v7Features: true,
66
+ appId: 937,
67
+ templateLess: false,
68
+ };
69
+
70
+ // AFTER (1.0)
71
+ import { defineConfig } from '@metricinsights/pp-dev';
72
+
73
+ export default defineConfig({
74
+ mi: { url: 'https://mi.company.com', token: 'YOUR_TOKEN', mode: 'standalone', apiVersion: 7 },
75
+ app: { id: 937, type: 'template' },
76
+ });
77
+ ```
78
+
79
+ | 0.x field | 1.0 field |
80
+ |---|---|
81
+ | `backendBaseURL` | `mi.url` |
82
+ | `personalAccessToken` | `mi.token` |
83
+ | `miHudLess: true` | `mi.mode: 'standalone'` |
84
+ | `miHudLess: false` | `mi.mode: 'embedding'` |
85
+ | `integrateMiTopBar: true` | `mi.mode: 'standalone'`, `mi.include: 'top-bar'` |
86
+ | `integrateMiTopBar: { addSharedComponentsScripts: true }` | `mi.include: 'shared-components'` |
87
+ | `v7Features: true` | `mi.apiVersion: 7` |
88
+ | `v7Features: false` | `mi.apiVersion: 6` |
89
+ | `appId` / `portalPageId` | `app.id` |
90
+ | `templateName` | `app.name` (auto-resolved from `package.json#name` — usually omit) |
91
+ | `templateLess: true` | `app.type: 'page'` |
92
+ | `templateLess: false` | `app.type: 'template'` |
93
+ | `enableProxyCache` | `proxy.cache` |
94
+ | `proxyCacheTTL` | `proxy.cacheTtl` |
95
+ | `disableSSLValidation: true` | `proxy.tls.allowSelfSigned: true` |
96
+ | `distZip` | `build.zip` |
97
+ | `versionPlugin` | `build.versionFile` |
98
+ | `imageOptimizer` | `build.imageOptimisations` |
99
+ | `outDir` | `build.outDir` |
100
+ | `syncBackupsDir` | `sync.backupsDir` |
101
+
102
+ ### Removed
103
+
104
+ - `pp-watch.config.*` / `.pp-watch.config.*` config files — use `pp-dev.config.*` instead
105
+ - `PPWatchConfig` type
106
+ - `VitePPDevOptions` type — use `PPDevConfig`
107
+ - `normalizeVitePPDevConfig()` — internal, use `normalizePPDevConfig()`
108
+
109
+ ### Defaults
110
+
111
+ | Field | Default |
112
+ |---|---|
113
+ | `mi.mode` | `'standalone'` |
114
+ | `mi.apiVersion` | `7` |
115
+ | `app.type` | `'template'` |
116
+ | `app.name` | resolved from `package.json#name` |
117
+
118
+ ### Validation
119
+
120
+ Startup validation now throws meaningful errors instead of silently ignoring bad config. Key rules:
121
+
122
+ - `mi.include` requires `mi.mode: 'standalone'`
123
+ - `mi.url` is required when `mi.mode: 'embedding'` or `app.type: 'template'`
124
+ - `app.id` is required for templates and standalone pages
125
+
126
+ ### Migration
127
+
128
+ Run the built-in codemod to upgrade your config automatically:
129
+
130
+ ```bash
131
+ npx @metricinsights/pp-dev migrate
132
+ # Preview changes first:
133
+ npx @metricinsights/pp-dev migrate --dry-run
134
+ # Force output format:
135
+ npx @metricinsights/pp-dev migrate --format ts
136
+ ```
137
+
138
+ 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.
139
+
140
+ ## Features
141
+
142
+ * **config:** grouped `PPDevConfig` schema with `mi`, `app`, `proxy`, `build`, `sync` sections
143
+ * **config:** `defineConfig()` helper for full TypeScript intellisense
144
+ * **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`
145
+ * **ui:** redesigned dev panel — MI brand colors (`#075B7E`), Inter font, bordered buttons, updated toast and confirm modal styles
146
+
147
+ ---
148
+
149
+ # [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)
150
+
151
+
152
+ ### Bug Fixes
153
+
154
+ * address CodeRabbit review findings ([7d50da6](https://github.com/mi-examples/pp-dev/commit/7d50da601627006c06253d7acf3ca06a4974c103))
155
+
156
+ # [0.19.0-beta.1](https://github.com/mi-examples/pp-dev/compare/v0.18.3-beta.2...v0.19.0-beta.1) (2026-06-17)
157
+
158
+
159
+ ### Bug Fixes
160
+
161
+ * **client:** keep the sync spinner running while confirmation modals are open ([da86bcb](https://github.com/mi-examples/pp-dev/commit/da86bcbe4c4fcfae6df4f99d081da43e8a6a958f))
162
+ * **next:** resolve sync export dir from the production config ([8b8275a](https://github.com/mi-examples/pp-dev/commit/8b8275aea0b501d8f3b1aabc6107865eefcac58e))
163
+ * **test-nextjs:** exclude build output from type-check to stop duplicate route types ([1ec5e50](https://github.com/mi-examples/pp-dev/commit/1ec5e501f97bf8de8c0634bf628b15e97305b508))
164
+
165
+
166
+ ### Features
167
+
168
+ * **next:** add dev panel for the Next.js dev server ([95dfd8e](https://github.com/mi-examples/pp-dev/commit/95dfd8e8be9e6fc1c63243a62c103eb597893ba9))
169
+ * **next:** build template sync assets with `next build` ([f19c42e](https://github.com/mi-examples/pp-dev/commit/f19c42ec2b775706621470ba60185d1324d0b1ec))
170
+
171
+ ## [0.18.3-beta.2](https://github.com/mi-examples/pp-dev/compare/v0.18.3-beta.1...v0.18.3-beta.2) (2026-06-11)
172
+
173
+
174
+ ### Bug Fixes
175
+
176
+ * **client:** send dev-panel WebSocket responses to the requesting client only ([d73700f](https://github.com/mi-examples/pp-dev/commit/d73700f7ab439422651e0fb38e48cbb4e37556e2))
177
+ * **middleware:** load template variables on deep-linked sub-path navigation ([a21c032](https://github.com/mi-examples/pp-dev/commit/a21c0323999300f326bdf5845f668a180cb7d121))
178
+
1
179
  ## [0.18.3-beta.1](https://github.com/mi-examples/pp-dev/compare/v0.18.2...v0.18.3-beta.1) (2026-06-08)
2
180
 
3
181