@spfx-fast/spfx-workbench 0.1.2 → 0.1.4
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/README.md +16 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
# SPFx Workbench
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Build and debug SharePoint Framework (SPFx) components with a local preview, focused diagnostics, and tools for working with real SharePoint behavior. Workbench can replay captured API responses, reuse an existing browser storage state, and coordinate the project's Heft workflow.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Start with the [IDE router](packages/ide/README.md) for the agent workflow, or install Workbench directly in an SPFx project:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install --save-dev @spfx-fast/spfx-workbench
|
|
9
|
+
npx spfx-workbench --component src/components/HelloWorld.tsx
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
The local canvas is a fast development aid, not a full SharePoint host. It renders compatible React components and a documented subset of SPFx lifecycle/context behavior; use the real SharePoint page when validating host integration. Workbench is a developer tool, not a security or credential scanner.
|
|
6
13
|
|
|
7
14
|
## Run locally
|
|
8
15
|
|
|
@@ -31,14 +38,14 @@ The portable `spfx-ide` skill ships in [`packages/ide/skills/spfx-ide/SKILL.md`]
|
|
|
31
38
|
|
|
32
39
|
## Preview a consumer component
|
|
33
40
|
|
|
34
|
-
The npm package name is `@spfx-fast/spfx-workbench`.
|
|
41
|
+
The npm package name is `@spfx-fast/spfx-workbench`. Install it in an SPFx project and run the CLI from that project's root:
|
|
35
42
|
|
|
36
43
|
```sh
|
|
37
44
|
npm install --save-dev @spfx-fast/spfx-workbench
|
|
38
45
|
npx spfx-workbench --component src/components/HelloWorld.tsx
|
|
39
46
|
```
|
|
40
47
|
|
|
41
|
-
|
|
48
|
+
To test changes from this repository, install the local repository path instead.
|
|
42
49
|
|
|
43
50
|
The registry install command is:
|
|
44
51
|
|
|
@@ -74,7 +81,7 @@ This is an early consumer-loader slice. It supports explicit JSON props and the
|
|
|
74
81
|
|
|
75
82
|
## How this fits with the SPFx Fast tools
|
|
76
83
|
|
|
77
|
-
Use [`@spfx-fast/ide`](packages/ide/README.md) as the thin developer and agent entry point. The
|
|
84
|
+
Use [`@spfx-fast/ide`](packages/ide/README.md) as the thin developer and agent entry point. The `spfx-ide` CLI routes to focused tools; installation as a project devDependency or globally places Agent Skills guidance in supported skill directories unless lifecycle scripts are disabled. This confirms file placement, not discovery by every agent; check the agent's own skills list where available. Global CLI use also needs npm's global bin directory on `PATH`. Workbench owns component preview, synthetic context/API replay, diagnostics, capture, and Heft launch. The focused companion packages have separate jobs:
|
|
78
85
|
|
|
79
86
|
- [`@spfx-fast/playwright`](https://www.npmjs.com/package/%40spfx-fast/playwright) runs authenticated browser tests against a real SharePoint page.
|
|
80
87
|
- [`@spfx-fast/knowledge`](https://www.npmjs.com/package/%40spfx-fast/knowledge) provides the SPFx agent skill and debugging references; use it to guide the tools, not as a runtime dependency.
|
|
@@ -192,7 +199,7 @@ Verify React Fast Refresh in a real browser with:
|
|
|
192
199
|
npm run check:browser-hmr
|
|
193
200
|
```
|
|
194
201
|
|
|
195
|
-
The check uses Playwright-managed Chromium, installed on first use, and does not require a system Chrome path. It edits a synthetic consumer component 20 times at a 1023 px viewport and confirms each React update applies, component state survives every edit, and the page does not navigate. It then adds an incompatible named export and confirms Vite reports the boundary reason, the browser reloads once, and the updated component appears. It reports min, median, p95, and max for compatible browser updates; it does not measure the full developer workflow or SharePoint. Set `--samples` to an integer from 1 to 100. `npm run check:responsive` additionally checks the five local section-width options with a synthetic web part at nine viewport widths and verifies the insertion control on touch input. `npm run check:release` runs the local gates, browser HMR check, and responsive layout check. It still does not start real Heft
|
|
202
|
+
The check uses Playwright-managed Chromium, installed on first use, and does not require a system Chrome path. It edits a synthetic consumer component 20 times at a 1023 px viewport and confirms each React update applies, component state survives every edit, and the page does not navigate. It then adds an incompatible named export and confirms Vite reports the boundary reason, the browser reloads once, and the updated component appears. It reports min, median, p95, and max for compatible browser updates; it does not measure the full developer workflow or SharePoint. Set `--samples` to an integer from 1 to 100. `npm run check:responsive` additionally checks the five local section-width options with a synthetic web part at nine viewport widths and verifies the insertion control on touch input. `npm run check:release` runs the local gates, browser HMR check, and responsive layout check. It still does not start real Heft or establish tenant parity.
|
|
196
203
|
|
|
197
204
|
Measure that endpoint while the dev server is running:
|
|
198
205
|
|
|
@@ -228,7 +235,7 @@ When the page is in edit mode during an SPFx debug session, the [SharePoint Fram
|
|
|
228
235
|
|
|
229
236
|
## Project status
|
|
230
237
|
|
|
231
|
-
See [the engineering report](reports/sharepoint-simulator-engineering-report.html) for
|
|
238
|
+
See [the engineering report](reports/sharepoint-simulator-engineering-report.html) for implementation evidence, unmeasured baselines, and known gaps. [Local section measurements](reports/section-layout-sizes.html) list the synthetic editor's section/web-part dimensions; [tenant page measurements](reports/tenant-page-layout-sizes.html) list read-only live view-mode section/ControlZone boxes at nine viewport widths.
|
|
232
239
|
|
|
233
240
|
Run the automated local release checks together with:
|
|
234
241
|
|
|
@@ -238,12 +245,12 @@ npm run check:local
|
|
|
238
245
|
|
|
239
246
|
This builds the workbench, runs `npm test` (temporary-consumer regressions and a synthetic local-CDP auth capture check), measures 20 consumer Vite HMR events, and installs the clean npm tarball into a disposable consumer. It does not verify browser React apply/state retention; use `npm run check:release` for the additional Chrome gate. Neither command proves a real Heft session, live-page parity, or every release criterion below.
|
|
240
247
|
|
|
241
|
-
|
|
248
|
+
Inspect the packed package in a clean temporary consumer:
|
|
242
249
|
|
|
243
250
|
```sh
|
|
244
251
|
npm run check:tarball
|
|
245
252
|
```
|
|
246
253
|
|
|
247
|
-
This packs the
|
|
254
|
+
This packs the source manifest, checks every packed path against `package.json` `files`, requires consumer docs/fixtures/source and all declared binaries, verifies the MIT license matches the installed tarball and manifest, and checks that the Node.js engine range survives packing. It installs the package as a devDependency, checks each npm command shim, launches the packaged preview with a synthetic consumer component and props file, verifies the context wrapper, captured HAR response replay, and synthetic fallback, runs compact HAR diff through the installed capture command, and confirms tests, reports, captures, and specs are absent. Its JSON result includes package contents/license checks, packaged diff results, and install/time-to-first-usable-preview timings. The engineering report records setup timings against artifact hashes; these local warm-cache samples do not establish a general setup success rate or baseline comparison.
|
|
248
255
|
|
|
249
256
|
Original simulator code is MIT licensed; see [LICENSE](LICENSE).
|
package/package.json
CHANGED