my-frontend-observer 0.1.0 → 0.3.0
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/CHANGELOG.md +82 -1
- package/README.md +30 -7
- package/dist/application/observationPersistence.js +1 -0
- package/dist/application/observationPersistence.js.map +1 -1
- package/dist/browser/chromiumAdapter.js +58 -4
- package/dist/browser/chromiumAdapter.js.map +1 -1
- package/dist/browser/evidenceCapture.d.ts +46 -3
- package/dist/browser/evidenceCapture.js +393 -94
- package/dist/browser/evidenceCapture.js.map +1 -1
- package/dist/browser/scrollCapture.d.ts +32 -0
- package/dist/browser/scrollCapture.js +163 -0
- package/dist/browser/scrollCapture.js.map +1 -0
- package/dist/browser/types.d.ts +3 -1
- package/dist/cli.js +165 -7
- package/dist/cli.js.map +1 -1
- package/dist/domain/diagnostics.d.ts +1 -1
- package/dist/domain/diagnostics.js +2 -0
- package/dist/domain/diagnostics.js.map +1 -1
- package/dist/domain/identity.d.ts +8 -3
- package/dist/domain/identity.js +10 -4
- package/dist/domain/identity.js.map +1 -1
- package/dist/domain/schema.d.ts +164 -6
- package/dist/domain/schema.js +314 -4
- package/dist/domain/schema.js.map +1 -1
- package/dist/domain/scrollEvidence.d.ts +51 -0
- package/dist/domain/scrollEvidence.js +134 -0
- package/dist/domain/scrollEvidence.js.map +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/request/request.d.ts +57 -1
- package/dist/request/request.js +292 -14
- package/dist/request/request.js.map +1 -1
- package/docs/ARCHITECTURE.md +62 -1
- package/docs/CI_CD.md +49 -8
- package/docs/COMMANDS.md +184 -9
- package/docs/CONTRACTS.md +135 -6
- package/docs/CURRENT_STATE.md +128 -6
- package/docs/DEVELOPMENT.md +41 -3
- package/docs/PROJECT_OVERVIEW.md +12 -6
- package/docs/QUICKSTART.md +3 -1
- package/docs/RELEASE.md +12 -5
- package/docs/ROADMAP.md +9 -0
- package/docs/SECURITY.md +6 -2
- package/docs/WORKFLOWS.md +41 -14
- package/package.json +1 -1
package/docs/SECURITY.md
CHANGED
|
@@ -29,5 +29,9 @@ tests:
|
|
|
29
29
|
Certificate-failure-specific handling, permission-prompt-specific handling
|
|
30
30
|
(Chromium's default deny-all applies; no permission is ever explicitly
|
|
31
31
|
granted), and any non-loopback/remote browsing mode remain unimplemented and
|
|
32
|
-
out of
|
|
33
|
-
|
|
32
|
+
out of scope. `my-frontend-observer@0.3.0` is published to npm, and a
|
|
33
|
+
pre-release readiness CI workflow (Windows/Linux/macOS packed-candidate
|
|
34
|
+
validation) already exists (see `docs/CI_CD.md`); these are no longer future
|
|
35
|
+
decisions. Those facts do not expand the security scope above: remote
|
|
36
|
+
browsing, certificate handling, and permission-prompt handling remain
|
|
37
|
+
separate, unimplemented concerns.
|
package/docs/WORKFLOWS.md
CHANGED
|
@@ -11,29 +11,56 @@ install dependencies (npm install; npx playwright install chromium)
|
|
|
11
11
|
→ validate documentation (npm run check:docs)
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
## Current
|
|
14
|
+
## Current observation workflow (published as 0.3.0)
|
|
15
15
|
|
|
16
|
-
The real
|
|
16
|
+
The real `observe` workflow, part of the published `my-frontend-observer@0.3.0`
|
|
17
|
+
package, accepts target configuration through either of two input paths,
|
|
18
|
+
plus one optional runtime scroll scenario:
|
|
17
19
|
|
|
18
20
|
```text
|
|
19
|
-
CLI arguments (--url, --viewport, --
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
CLI arguments (--url, --viewport, --output, --timeout, exactly one of:
|
|
22
|
+
one-or-more --target <id=css-selector>
|
|
23
|
+
or --targets-file <json-file>,
|
|
24
|
+
plus optionally --scroll-scenario-file <json-file>)
|
|
25
|
+
→ (--targets-file only: read + validate the local JSON root wrapper)
|
|
26
|
+
→ (--scroll-scenario-file only: read + validate the local JSON root shape -
|
|
27
|
+
a non-array object; the file supplies RawObservationRequest.scrollScenario
|
|
28
|
+
directly, with no wrapper field)
|
|
29
|
+
→ request construction (same RawObservationRequest either way)
|
|
30
|
+
→ normalizeRequest() - producing canonical {name, locators} targets and
|
|
31
|
+
validating the optional scrollScenario (supported action kind, delta
|
|
32
|
+
bounds/both-zero rule, stable target-name reference)
|
|
22
33
|
→ application observation use case (src/application/observationPersistence.ts#observe)
|
|
23
|
-
→
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
34
|
+
→ Chromium capture: launch, safe navigation, readiness, then - only if a
|
|
35
|
+
scenario was configured - resolve configured targets once, capture an
|
|
36
|
+
initial ScrollRuntimeSnapshot, perform the one immediate scroll
|
|
37
|
+
(window.scrollBy/element.scrollBy, behavior: "instant"), wait exactly two
|
|
38
|
+
requestAnimationFrame cycles, capture a final ScrollRuntimeSnapshot and
|
|
39
|
+
derive transition/scroll-owner evidence; then screenshot and page/target
|
|
40
|
+
evidence (resolving all six locator kinds through the single canonical
|
|
41
|
+
resolver, plus semantic state/landmark/containment evidence), from the
|
|
42
|
+
same live page - exactly once, always describing the final state
|
|
43
|
+
→ atomic artifact persistence (manifest.json + screenshot.png), schema
|
|
44
|
+
1.2.0 - exactly once, only on a successful capture; scrollScenarioEvidence
|
|
45
|
+
is simply one more optional manifest field, never a separate file
|
|
27
46
|
→ concise CLI result (Observation/State/Artifact/Targets/Diagnostics)
|
|
28
47
|
→ process exit status (0 for a persisted observation, including one whose
|
|
29
48
|
state honestly reports "partial"; nonzero otherwise)
|
|
30
49
|
```
|
|
31
50
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
51
|
+
A request with no scroll scenario is unaffected: no extra snapshots, no
|
|
52
|
+
scroll, no extra animation-frame wait, unchanged request identity.
|
|
53
|
+
|
|
54
|
+
This is exercised by `runCli()`-level tests, real-Chromium end-to-end tests
|
|
55
|
+
(`tests/browser/cliObserve.test.ts`, `tests/browser/windowScrollScenario.test.ts`,
|
|
56
|
+
`tests/browser/targetScrollScenario.test.ts`), built `node dist/cli.js
|
|
57
|
+
observe ...` runs against the deterministic local fixture
|
|
58
|
+
(`scripts/dev/builtCliTargetsFileSmoke.mjs` for the semantic `--targets-file`
|
|
59
|
+
path, `scripts/dev/builtCliScrollScenarioSmoke.mjs` for the scroll-scenario
|
|
60
|
+
path), and the real `npm pack` tarball installed and run from a clean
|
|
61
|
+
temporary consumer directory outside the repository, on Windows, Linux, and
|
|
62
|
+
macOS (`scripts/ci/runPackedObservationSmoke.mjs`) - the same workflow,
|
|
63
|
+
independent of the source checkout.
|
|
37
64
|
|
|
38
65
|
The future dependency order after observation is:
|
|
39
66
|
|