From b79993603aa056f7684fa70338e4e10272e1131d Mon Sep 17 00:00:00 2001 From: tannevaled Date: Tue, 10 Nov 2026 17:07:57 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20driver=20package=20=E2=80=94=20execute?= =?UTF-8?q?=20a=20scenario=20against=20a=20real=20LiveDocument?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit driver.Run(ctx, live, scenario, doSubmit) executes each step in order: - click: resolves the selector (QuerySelector), calls LiveDocument.Click (already a real mousedown/mouseup/click, bubbling). - fill: clears the field's CURRENT value via Backspace (one real keydown/input/keyup per character, same as a user deleting it) before Type-ing the new value — never a bulk assignment, so a controlled React/Vue input sees exactly the sequence a real user retyping the field would produce. - assert: resolves the selector (failing the run if nothing matches); with a text attribute, compares against the element's own value (input/textarea) or text content (anything else). - submit: always computes LiveDocument.PreviewSubmit's own dry-run (method/target/body) first; performs the real LiveDocument.Submit only when doSubmit is true, swapping in the resulting LiveDocument on a real navigation (Submit's own contract already closes the superseded one). A scenario's pin block, if present, is checked FIRST — URL and every selector must already match, or Run refuses with a single error naming every mismatch found, before any step runs. No new engine-level capability: every step is a thin call into LiveDocument's already-existing, already-tested primitives (confirmed directly before writing this package). One real finding while writing the end-to-end test: an inline onclick="..." HTML attribute string is not wired to anything in go-webengine/engine (only addEventListener/the onclick IDL property are) — not a driver bug, just this engine's own documented scope; the test uses addEventListener, matching the engine's own test conventions. Co-Authored-By: Claude Sonnet 5 --- README.md | 12 ++- driver/driver.go | 228 +++++++++++++++++++++++++++++++++++++++ driver/driver_test.go | 245 ++++++++++++++++++++++++++++++++++++++++++ go.mod | 39 ++++++- go.sum | 90 +++++++++++++++- 5 files changed, 606 insertions(+), 8 deletions(-) create mode 100644 driver/driver.go create mode 100644 driver/driver_test.go diff --git a/README.md b/README.md index d185e8d..979e585 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,14 @@ HCL-driven browser-automation CLI for [go-webengine/engine](https://github.com/go-webengine/engine): click/fill-form/assert test scenarios, for driving a rendered page's own `LiveDocument` (`Focus`/`Type`/`Click`/`Submit`) from a declarative scenario file instead of hand-written Go. -Status: in progress. This repository currently holds only the scenario -format (`hclscenario`) — parsing, validation, and the function allowlist. -The driver/CLI wiring and the dry-run/session/pin/audit-log/anti-bot -guardrails are tracked separately and not implemented yet. +Status: in progress. This repository currently holds the scenario format +(`hclscenario`), a `driver` package that executes a parsed scenario +against a real `engine.LiveDocument` (click/fill/assert/submit, plus the +pinned-page identity check), and a `webtest validate ` CLI command +(parse-only). The `run` CLI subcommand and the session/dry-run-by-default/ +audit-log/bounds/anti-bot guardrails are tracked separately and not +implemented yet — `driver.Run`'s own `doSubmit` parameter is the one +escape hatch those guardrails will gate. ## Scenario format diff --git a/driver/driver.go b/driver/driver.go new file mode 100644 index 0000000..ef3d877 --- /dev/null +++ b/driver/driver.go @@ -0,0 +1,228 @@ +// Copyright (c) the go-webengine/webtest authors. +// SPDX-License-Identifier: BSD-3-Clause + +// Package driver executes a parsed hclscenario.Scenario against a real +// go-webengine/engine LiveDocument. It adds NO new engine-level +// capability of its own — every step is a thin call into LiveDocument's +// already-existing, already-tested primitives (Click/Type/Backspace/ +// Submit/PreviewSubmit/QuerySelector), confirmed directly before writing +// this package (see FIDELITY.md round 34 / PR #420 in go-webengine/engine). +// +// Cookie persistence, the CLI's own dry-run-by-default gating, the +// append-only audit log, resource bounds, and anti-bot detection are +// NOT this package's job — they are the `run` subcommand's own +// guardrails, layered on top of Run's result, not inside it. +package driver + +import ( + "context" + "fmt" + "strings" + + "github.com/go-webengine/engine" + "github.com/go-webengine/engine/dom" + "github.com/go-webengine/webtest/hclscenario" +) + +// StepResult is one executed step's outcome. +type StepResult struct { + Step hclscenario.Step + + // DefaultPrevented is set for a click or submit step: whether a page + // script's own listener called preventDefault() on the synthetic + // event — the same signal LiveDocument.Click/Submit already report. + DefaultPrevented bool + + // AssertGot is the text/value assertStep actually found, for a failed + // assert step's own error message and for a caller that wants to log + // what was seen even on success. + AssertGot string + + // SubmitMethod/SubmitTarget/SubmitBody are a submit step's own + // PreviewSubmit computation — always populated for a submit step, + // Submit or not (see Run's own doSubmit parameter). + SubmitMethod, SubmitTarget, SubmitBody string + // Navigated is set once Run actually called LiveDocument.Submit (only + // when doSubmit is true) and it performed a real navigation. + Navigated bool +} + +// Result is a scenario run's own full record, in step order. A failed +// step stops the run (Run itself returns the error); Result still holds +// every step that DID complete, including the one that failed, so a +// caller can report partial progress. +type Result struct { + Steps []StepResult +} + +// Run executes sc's steps in order against live, in-place: fill clears +// and retypes a field's existing value (LiveDocument's own Backspace/Type, +// not a bulk assignment, so a page's own keystroke-driven listeners see +// it exactly as they would a real user's), click dispatches a real +// mousedown/mouseup/click, assert resolves a selector and optionally +// compares its text/value, and submit always computes a dry-run preview +// (PreviewSubmit) and additionally performs the real request only when +// doSubmit is true. +// +// If sc has a Pin, it is checked FIRST, before any step runs: the +// rendered page's own URL (when Pin.URL is set) and every Pin.Selector +// must already be present, or Run refuses with a named diff rather than +// acting against a page the scenario did not expect. +// +// Run returns the LiveDocument the caller should keep using afterward — +// a submit step that navigates replaces it (Submit's own contract: the +// previous one is Closed, matching a real browser navigation), so the +// ORIGINAL live argument must not be used again once Run returns; use +// the returned one instead, even on error (whichever document was +// current when the error occurred). +func Run(ctx context.Context, live *engine.LiveDocument, sc *hclscenario.Scenario, doSubmit bool) (*engine.LiveDocument, *Result, error) { + if sc.Pin != nil { + if err := checkPin(live, sc.Pin); err != nil { + return live, &Result{}, err + } + } + + res := &Result{} + for i, step := range sc.Steps { + sr := StepResult{Step: step} + var err error + live, err = runStep(ctx, live, step, doSubmit, &sr) + res.Steps = append(res.Steps, sr) + if err != nil { + return live, res, fmt.Errorf("step %d (%s %q): %w", i, step.Kind, step.Selector, err) + } + } + return live, res, nil +} + +// checkPin verifies pin against live's CURRENT state, returning a single +// error naming every mismatch found (not just the first) — a scenario +// author fixing a stale pin wants the whole diff, not one round trip per +// missing selector. +func checkPin(live *engine.LiveDocument, pin *hclscenario.Pin) error { + var problems []string + if pin.URL != "" { + if got := live.Document().URL; got != pin.URL { + problems = append(problems, fmt.Sprintf("page URL = %q, want %q", got, pin.URL)) + } + } + var missing []string + for _, sel := range pin.Selectors { + if _, ok := live.QuerySelector(sel); !ok { + missing = append(missing, sel) + } + } + if len(missing) > 0 { + problems = append(problems, fmt.Sprintf("selector(s) not found: %s", strings.Join(missing, ", "))) + } + if len(problems) == 0 { + return nil + } + return fmt.Errorf("pin mismatch: %s", strings.Join(problems, "; ")) +} + +func runStep(ctx context.Context, live *engine.LiveDocument, step hclscenario.Step, doSubmit bool, sr *StepResult) (*engine.LiveDocument, error) { + switch step.Kind { + case hclscenario.StepClick: + return clickStep(ctx, live, step, sr) + case hclscenario.StepFill: + return live, fillStep(ctx, live, step) + case hclscenario.StepAssert: + return live, assertStep(live, step, sr) + case hclscenario.StepSubmit: + return submitStep(ctx, live, step, doSubmit, sr) + default: + return live, fmt.Errorf("internal: unhandled step kind %q (hclscenario.Parse should have rejected this)", step.Kind) + } +} + +func resolveOne(live *engine.LiveDocument, selector string) (*dom.Node, error) { + n, ok := live.QuerySelector(selector) + if !ok { + return nil, fmt.Errorf("selector %q: no matching element", selector) + } + return n, nil +} + +func clickStep(ctx context.Context, live *engine.LiveDocument, step hclscenario.Step, sr *StepResult) (*engine.LiveDocument, error) { + n, err := resolveOne(live, step.Selector) + if err != nil { + return live, err + } + prevented, _, _, err := live.Click(ctx, n) + sr.DefaultPrevented = prevented + return live, err +} + +// fillStep clears n's CURRENT value via Backspace (one real keydown/ +// input/keyup per character, same as a user deleting it) before Type-ing +// the new value — never a bulk value assignment, so a controlled +// React/Vue input sees exactly the sequence a real user clearing and +// retyping the field would produce. +func fillStep(ctx context.Context, live *engine.LiveDocument, step hclscenario.Step) error { + n, err := resolveOne(live, step.Selector) + if err != nil { + return err + } + current := []rune(n.Attr["value"]) + for range current { + if _, _, err := live.Backspace(ctx, n); err != nil { + return err + } + } + _, _, err = live.Type(ctx, n, step.Value) + return err +} + +// assertStep resolves step.Selector, failing if nothing matches. With no +// Text attribute (step.HasText false) that's the whole check — element +// presence. With Text set, compares against the element's own value (an +// input/textarea's reflected value, matching what a real user would see +// typed into it) or its text content for anything else (a message/label +// element's own displayed text). +func assertStep(live *engine.LiveDocument, step hclscenario.Step, sr *StepResult) error { + n, err := resolveOne(live, step.Selector) + if err != nil { + return err + } + if !step.HasText { + return nil + } + var got string + switch n.Tag { + case "input", "textarea": + got = n.Attr["value"] + default: + got = dom.TextContent(n) + } + sr.AssertGot = got + if got != step.Text { + return fmt.Errorf("text = %q, want %q", got, step.Text) + } + return nil +} + +// submitStep always computes PreviewSubmit's own method/target/body +// first — a submit step's dry-run record, logged regardless of doSubmit +// — and performs the real request (LiveDocument.Submit) only when +// doSubmit is true, swapping in the resulting LiveDocument on a real +// navigation. +func submitStep(ctx context.Context, live *engine.LiveDocument, step hclscenario.Step, doSubmit bool, sr *StepResult) (*engine.LiveDocument, error) { + n, err := resolveOne(live, step.Selector) + if err != nil { + return live, err + } + sr.SubmitMethod, sr.SubmitTarget, sr.SubmitBody = live.PreviewSubmit(n) + if !doSubmit { + return live, nil + } + next, navigated, err := live.Submit(ctx, n) + if err != nil { + return live, err + } + sr.Navigated = navigated + if navigated { + return next, nil + } + return live, nil +} diff --git a/driver/driver_test.go b/driver/driver_test.go new file mode 100644 index 0000000..e3250da --- /dev/null +++ b/driver/driver_test.go @@ -0,0 +1,245 @@ +// Copyright (c) the go-webengine/webtest authors. +// SPDX-License-Identifier: BSD-3-Clause + +package driver + +import ( + "context" + "image" + "net/http" + "net/http/httptest" + "testing" + + "github.com/go-webengine/engine" + "github.com/go-webengine/webtest/hclscenario" +) + +func openFixture(t *testing.T, e *engine.Engine, url string) *engine.LiveDocument { + t.Helper() + live, err := e.Open(context.Background(), url, image.Rect(0, 0, 400, 400)) + if err != nil { + t.Fatalf("Open: %v", err) + } + t.Cleanup(live.Close) + return live +} + +func parseScenario(t *testing.T, src string) *hclscenario.Scenario { + t.Helper() + sc, diags := hclscenario.Parse([]byte(src), "test.hcl") + if diags.HasErrors() { + t.Fatalf("Parse: %v", diags) + } + return sc +} + +func TestRunClickFillAssert(t *testing.T) { + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Write([]byte(` + + +
+ + `)) + })) + defer srv.Close() + + src := ` +scenario "s" { + url = "` + srv.URL + `/" + step "fill" { + selector = "#name" + value = "alice" + } + step "click" { + selector = "#go" + } + step "assert" { + selector = "#welcome" + text = "Hello, alice" + } +} +` + live := openFixture(t, engine.New(), srv.URL+"/") + _, res, err := Run(context.Background(), live, parseScenario(t, src), false) + if err != nil { + t.Fatalf("Run: %v (steps=%+v)", err, res.Steps) + } + if len(res.Steps) != 3 { + t.Fatalf("len(Steps) = %d, want 3", len(res.Steps)) + } + if res.Steps[2].AssertGot != "Hello, alice" { + t.Fatalf("assert step AssertGot = %q", res.Steps[2].AssertGot) + } +} + +func TestRunFillReplacesExistingValue(t *testing.T) { + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Write([]byte(``)) + })) + defer srv.Close() + + src := ` +scenario "s" { + url = "` + srv.URL + `/" + step "fill" { + selector = "#name" + value = "fresh" + } + step "assert" { + selector = "#name" + text = "fresh" + } +} +` + live := openFixture(t, engine.New(), srv.URL+"/") + _, res, err := Run(context.Background(), live, parseScenario(t, src), false) + if err != nil { + t.Fatalf("Run: %v (steps=%+v)", err, res.Steps) + } + if res.Steps[1].AssertGot != "fresh" { + t.Fatalf("fill did not replace the stale value: got %q", res.Steps[1].AssertGot) + } +} + +func TestRunAssertSelectorNotFoundFailsTheRun(t *testing.T) { + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Write([]byte(``)) + })) + defer srv.Close() + + src := ` +scenario "s" { + url = "` + srv.URL + `/" + step "assert" { + selector = "#nope" + } +} +` + live := openFixture(t, engine.New(), srv.URL+"/") + _, res, err := Run(context.Background(), live, parseScenario(t, src), false) + if err == nil { + t.Fatal("Run with an assert on a missing selector: want an error") + } + if len(res.Steps) != 1 { + t.Fatalf("len(Steps) = %d, want the one failed step recorded", len(res.Steps)) + } +} + +func TestRunPinMismatchStopsBeforeAnyStep(t *testing.T) { + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Write([]byte(`
`)) + })) + defer srv.Close() + + src := ` +scenario "s" { + url = "` + srv.URL + `/" + pin { + selectors = ["#does-not-exist"] + } + step "assert" { + selector = "#marker-attr" + } +} +` + live := openFixture(t, engine.New(), srv.URL+"/") + _, res, err := Run(context.Background(), live, parseScenario(t, src), false) + if err == nil { + t.Fatal("Run with a pin selector that doesn't match: want an error") + } + if len(res.Steps) != 0 { + t.Fatalf("len(Steps) = %d, want 0 (pin must be checked before any step runs)", len(res.Steps)) + } +} + +func TestRunPinURLMismatch(t *testing.T) { + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Write([]byte(``)) + })) + defer srv.Close() + + src := ` +scenario "s" { + url = "` + srv.URL + `/" + pin { + url = "https://not-the-real-url.test/" + selectors = ["body"] + } +} +` + live := openFixture(t, engine.New(), srv.URL+"/") + _, _, err := Run(context.Background(), live, parseScenario(t, src), false) + if err == nil { + t.Fatal("Run with a pin url that doesn't match the real page: want an error") + } +} + +func TestRunSubmitDryRunDoesNotTouchNetwork(t *testing.T) { + var posted bool + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method == http.MethodPost { + posted = true + } + w.Write([]byte(`
`)) + })) + defer srv.Close() + + src := ` +scenario "s" { + url = "` + srv.URL + `/" + step "submit" { + selector = "#f" + } +} +` + live := openFixture(t, engine.New(), srv.URL+"/") + _, res, err := Run(context.Background(), live, parseScenario(t, src), false) // doSubmit = false + if err != nil { + t.Fatalf("Run: %v", err) + } + if posted { + t.Fatal("submit step with doSubmit=false must never touch the network") + } + sr := res.Steps[0] + if sr.SubmitMethod != http.MethodPost || sr.SubmitTarget != srv.URL+"/login" || sr.SubmitBody != "x=1" { + t.Fatalf("preview = %+v", sr) + } +} + +func TestRunSubmitRealRequestNavigates(t *testing.T) { + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method == http.MethodPost { + w.Header().Set("Content-Type", "text/html") + w.Write([]byte(`Doneok`)) + return + } + w.Write([]byte(`
`)) + })) + defer srv.Close() + + src := ` +scenario "s" { + url = "` + srv.URL + `/" + step "submit" { + selector = "#f" + } +} +` + live := openFixture(t, engine.New(), srv.URL+"/") + final, res, err := Run(context.Background(), live, parseScenario(t, src), true) // doSubmit = true + if err != nil { + t.Fatalf("Run: %v", err) + } + t.Cleanup(final.Close) + if !res.Steps[0].Navigated { + t.Fatal("submit step with doSubmit=true: want Navigated=true") + } + if final.Document().Title != "Done" { + t.Fatalf("final document title = %q, want Done (the real navigation's own response)", final.Document().Title) + } +} diff --git a/go.mod b/go.mod index 9145cea..77c44a0 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module github.com/go-webengine/webtest go 1.27.3 require ( + github.com/go-webengine/engine v0.47.0 github.com/hashicorp/hcl/v2 v2.25.0 github.com/spf13/cobra v1.10.2 github.com/zclconf/go-cty v1.19.0 @@ -10,15 +11,47 @@ require ( require ( github.com/agext/levenshtein v1.2.1 // indirect + github.com/andybalholm/brotli v1.2.8 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/apparentlymart/go-textseg/v17 v17.0.1 // indirect - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/google/go-cmp v0.7.0 // indirect + github.com/breml/rootcerts v0.3.7 // indirect + github.com/dlclark/regexp2/v2 v2.5.2 // indirect + github.com/dop251/goja v0.0.0-20260926152631-39ec2650adc9 // indirect + github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707 // indirect + github.com/ebitengine/purego v0.11.3 // indirect + github.com/evanw/esbuild v0.28.2 // indirect + github.com/go-browserhttp/browserhttp v0.2.0 // indirect + github.com/go-gfx/gfx v0.37.0 // indirect + github.com/go-gfx/oksvg v0.4.0 // indirect + github.com/go-gfx/wgsl v0.4.0 // indirect + github.com/go-images/gif v0.2.0 // indirect + github.com/go-images/images v0.1.1-0.20261026203936-4ac989d310a1 // indirect + github.com/go-images/jpeg v0.3.0 // indirect + github.com/go-images/jpeg2000 v0.14.0 // indirect + github.com/go-images/png v0.2.0 // indirect + github.com/go-macos/metal v0.7.0 // indirect + github.com/go-macos/objc v0.12.0 // indirect + github.com/go-opentype/fonts v0.14.0 // indirect + github.com/go-opentype/opentype v0.21.1 // indirect + github.com/go-simd/highway v0.0.14 // indirect + github.com/go-sourcemap/sourcemap v2.1.4+incompatible // indirect + github.com/go-webengine/esbuildsandbox v0.1.0 // indirect + github.com/go-widgets/painter v0.16.0 // indirect + github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/klauspost/compress v1.20.2 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect - github.com/spf13/pflag v1.0.9 // indirect + github.com/refraction-networking/utls v1.8.2 // indirect + github.com/spf13/pflag v1.0.10 // indirect + github.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef // indirect + github.com/tannevaled/gobig2 v0.2.0 // indirect + github.com/tetratelabs/wazero v1.12.0 // indirect + golang.org/x/crypto v0.58.0 // indirect + golang.org/x/image v0.47.0 // indirect golang.org/x/mod v0.41.0 // indirect + golang.org/x/net v0.62.0 // indirect golang.org/x/sync v0.24.0 // indirect + golang.org/x/sys v0.49.0 // indirect golang.org/x/text v0.43.0 // indirect golang.org/x/tools v0.51.0 // indirect ) diff --git a/go.sum b/go.sum index 84b8f2f..de9407b 100644 --- a/go.sum +++ b/go.sum @@ -1,38 +1,126 @@ +github.com/Masterminds/semver/v3 v3.5.0 h1:kQceYJfbupGfZOKZQg0kou0DgAKhzDg2NZPAwZ/2OOE= +github.com/Masterminds/semver/v3 v3.5.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/agext/levenshtein v1.2.1 h1:QmvMAjj2aEICytGiWzmxoE0x2KZvE0fvmqMOfy2tjT8= github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= +github.com/andybalholm/brotli v1.2.8 h1:H9F6r7RNwzSRsx/lytpIYkbjNFMt2yNBwsJ2+0gpx78= +github.com/andybalholm/brotli v1.2.8/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY= github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= github.com/apparentlymart/go-textseg/v17 v17.0.1 h1:bpMXRgQ5cEoRNuQke1a80/Nl6w3G5eoIbWo9f3gXkAs= github.com/apparentlymart/go-textseg/v17 v17.0.1/go.mod h1:fa8X4jgGeevslICIY6LcdjkSecWnXmYd9Lk34z/VxZs= +github.com/breml/rootcerts v0.3.7 h1:KZZkmd591bmq//te85L0u33zgtI3phyGlfD8u7/pzUg= +github.com/breml/rootcerts v0.3.7/go.mod h1:S/PKh+4d1HUn4HQovEB8hPJZO6pUZYrIhmXBhsegfXw= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dlclark/regexp2/v2 v2.5.2 h1:HAsucWRhsqcDzl6Ua9aR8JwYOTzrZyPrF0/FNxJVAI0= +github.com/dlclark/regexp2/v2 v2.5.2/go.mod h1:avUrQvPaLz2DrFNHJF0taWAFFX2C1GMSSoeiqFjcBmU= +github.com/dop251/goja v0.0.0-20260926152631-39ec2650adc9 h1:Ksd3Vil12b/ykT5NjGzd3qNc688cJB9OUXJZZChEktI= +github.com/dop251/goja v0.0.0-20260926152631-39ec2650adc9/go.mod h1:u8yZRUavu+N4EnFFy6J5fVtjE7lEcZ2YyV2GcBXY9c8= +github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707 h1:2tV76y6Q9BB+NEBasnqvs7e49aEBFI8ejC89PSnWH+4= +github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707/go.mod h1:qssHWj60/X5sZFNxpG4HBPDHVqxNm4DfnCKgrbZOT+s= +github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= +github.com/ebitengine/purego v0.11.3 h1:OB+JLpdm7ioymhyA+6s5kbb/uOuYycAgL8NNTFc5MLg= +github.com/ebitengine/purego v0.11.3/go.mod h1:DCHPP08djqhNSoTfImcnHYQRZmd0qhakvrozqaEYhGQ= +github.com/evanw/esbuild v0.28.2 h1:A2uETn4jrQTcXaT/shwTDTYBxDjl7fV7nXmUrJxfA2w= +github.com/evanw/esbuild v0.28.2/go.mod h1:D2vIQZqV/vIf/VRHtViaUtViZmG7o+kKmlBfVQuRi48= +github.com/go-browserhttp/browserhttp v0.2.0 h1:3RcjOQVHgqhSOmI5cfsURpexw/vetoDUoLXKzgTCSac= +github.com/go-browserhttp/browserhttp v0.2.0/go.mod h1:VJiwBxLetXdc8eDadOcNbiO0EelNQPny0cLZhg1hTKU= +github.com/go-gfx/gfx v0.37.0 h1:nQH23BtuJ1pqXqvg0s7FHSI1c/ewg9nnBl3Nc3cYCik= +github.com/go-gfx/gfx v0.37.0/go.mod h1:4OenoKrgdht6UXYf5SV8w2tb41hfAdy4QoxJRPsRDz4= +github.com/go-gfx/oksvg v0.4.0 h1:FqZldnC3TlHEZ8TwglqWyVO6y+C4eeWfAhL1SDoD628= +github.com/go-gfx/oksvg v0.4.0/go.mod h1:b6zcMuvekE/5oApVUsTUW3IDSDWX6bKV/r42N79gbJQ= +github.com/go-gfx/wgsl v0.4.0 h1:SJOaSkvTcPvK9wdp3vM8ruXFvtxeFLvYEBLV3ZPm4zA= +github.com/go-gfx/wgsl v0.4.0/go.mod h1:Fzzw0jXvB+zxCqmTDwvcu3B7PkIVJBcygl2dyDyDAgQ= +github.com/go-images/gif v0.2.0 h1:8Xl4Nan+PvyqH4wPre7wJUH61T2eJKOKonFKOdMdpkU= +github.com/go-images/gif v0.2.0/go.mod h1:rjpP1X62GLs6pmdMxuvwBjpV4LYE4Ue6rPbeqANWHrQ= +github.com/go-images/images v0.1.1-0.20261026203936-4ac989d310a1 h1:R7Phx1lhFniaqF+k7yE72HcadFeViKYXXb9w2puZJRI= +github.com/go-images/images v0.1.1-0.20261026203936-4ac989d310a1/go.mod h1:TXN7V9gKgEe8L4GVYeTO01sQI6n5JUL5Q1xIl09qOio= +github.com/go-images/jpeg v0.3.0 h1:i6CGNbN2YNEz8stBI0hXjN6UwVGwQ9zCh8LvFeD8fHg= +github.com/go-images/jpeg v0.3.0/go.mod h1:3eUjtNscxUULLUH88DvMN8OKTq2C0/0AjubOjAHoHHk= +github.com/go-images/jpeg2000 v0.14.0 h1:/nH3l5r95E7OkNZCfq7gmoDQvJzVAhmSw6rd2Ifk7jo= +github.com/go-images/jpeg2000 v0.14.0/go.mod h1:4/Pp3Jp2es5lA8/Ema8F7dFwl0vZprCj9MyznIz9Gdc= +github.com/go-images/png v0.2.0 h1:RFPkHPuRYRvrDJol/Mmn9P1DSaLV8VPmEQ8BkZoCpL0= +github.com/go-images/png v0.2.0/go.mod h1:g1qayDmWLClHo9R5KQ+RrcUNTBcaA4c1thaIfEoS3vg= +github.com/go-macos/metal v0.7.0 h1:c/ymPqCzoLcDxcZ3i6cNSgOScsOlIz4yVbik5asVp+w= +github.com/go-macos/metal v0.7.0/go.mod h1:BiclSGJgONDekug12CQtlINic9zMmXF7m/iA7bQn4hM= +github.com/go-macos/objc v0.12.0 h1:/WmB4C1CQd5RkqBRvnHNljEFtOTvytPA9fkD87xuJVQ= +github.com/go-macos/objc v0.12.0/go.mod h1:ao+SmTFBrkZdP+488hFTrSFvCtJ36McKKhNNOlcFXrQ= +github.com/go-opentype/fonts v0.14.0 h1:WHw7k9gkHT1pu9B2yyvd0FWyQqn/4NKFQoKhvMYt3Mo= +github.com/go-opentype/fonts v0.14.0/go.mod h1:od2QcmdpKo7QCqo6Jb16y4GULk+h2Hhfq6x3xfvn62Q= +github.com/go-opentype/opentype v0.21.1 h1:axfaZjo6acnY9OcFHC/q5gaSqyc/KjuaNJ6Z7UBOJPI= +github.com/go-opentype/opentype v0.21.1/go.mod h1:cyTZyPcwVFR4MTHnCj7a6tk2tGIB6deakpefu/apDjg= +github.com/go-simd/highway v0.0.14 h1:O3HPG00qgLGlrQyYBlMGyLYsuzZrqHA4+XNptPjV5gs= +github.com/go-simd/highway v0.0.14/go.mod h1:t5XBPxqa10Lnj0frQS7Ur0JaN+/CckEmm5HXrqBDxXA= +github.com/go-sourcemap/sourcemap v2.1.4+incompatible h1:a+iTbH5auLKxaNwQFg0B+TCYl6lbukKPc7b5x0n1s6Q= +github.com/go-sourcemap/sourcemap v2.1.4+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/go-webengine/engine v0.47.0 h1:M+3DUhskbSnCkiJ5myKMmesl2lts7CITNx102d5untw= +github.com/go-webengine/engine v0.47.0/go.mod h1:AjW5eeNMQxfGDlPSQAWT8aZ1xyURHyNihvBx8tCigEg= +github.com/go-webengine/esbuildsandbox v0.1.0 h1:1LdmX+0/yJarQlxZgJ7JIMu+Qy6P7Yzu4NFcX9+jFl8= +github.com/go-webengine/esbuildsandbox v0.1.0/go.mod h1:za8oj1vbDfVkTpHLeRk7JfEQjmJfj+GHNq4R47681vQ= +github.com/go-widgets/painter v0.16.0 h1:j8FFObisySQChY2JiXS7Di2Mo4cqufIc0PDUnoDPMiA= +github.com/go-widgets/painter v0.16.0/go.mod h1:3wKWjaM8ZgEhir2HX0UDt8GemePKJ7l/yIjQb/vVSWk= +github.com/goccy/go-yaml v1.19.2 h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM= +github.com/goccy/go-yaml v1.19.2/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k= +github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/hashicorp/hcl/v2 v2.25.0 h1:HmmQVYRny4MaBo4b20TjmL46wyuUxpnMWkPZ4+NTbWk= github.com/hashicorp/hcl/v2 v2.25.0/go.mod h1:vR+FKETxoZAmRlHgFfKmuqivj+C4Izm/c66XkmZ3r7M= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.20.2 h1:v5tiZvm1KGLyg5d5oXdXe3lsSPrbEUiKoXGia//I7Qo= +github.com/klauspost/compress v1.20.2/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI= +github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= +github.com/refraction-networking/utls v1.8.2 h1:j4Q1gJj0xngdeH+Ox/qND11aEfhpgoEvV+S9iJ2IdQo= +github.com/refraction-networking/utls v1.8.2/go.mod h1:jkSOEkLqn+S/jtpEHPOsVv/4V4EVnelwbMQl4vCWXAM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sergeymakinen/go-bmp v1.0.0 h1:SdGTzp9WvCV0A1V0mBeaS7kQAwNLdVJbmHlqNWq0R+M= +github.com/sergeymakinen/go-bmp v1.0.0/go.mod h1:/mxlAQZRLxSvJFNIEGGLBE/m40f3ZnUifpgVDlcUIEY= +github.com/sergeymakinen/go-ico v1.0.0 h1:uL3khgvKkY6WfAetA+RqsguClBuu7HpvBB/nq/Jvr80= +github.com/sergeymakinen/go-ico v1.0.0/go.mod h1:wQ47mTczswBO5F0NoDt7O0IXgnV4Xy3ojrroMQzyhUk= github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= -github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY= github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= +github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef h1:Ch6Q+AZUxDBCVqdkI8FSpFyZDtCVBc2VmejdNrm5rRQ= +github.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef/go.mod h1:nXTWP6+gD5+LUJ8krVhhoeHjvHTutPxMYl5SvkcnJNE= +github.com/tannevaled/gobig2 v0.2.0 h1:yx97/ltljALrIWDFVqHjPUIjAp3bfUUhH8Z8UROvNLc= +github.com/tannevaled/gobig2 v0.2.0/go.mod h1:X0S1H+N35kg6zYgVYRqGMsGj3C35zs+iA2r1MXyPcV4= +github.com/tetratelabs/wazero v1.12.0 h1:DuWcpNu/FzgEXgGBDp8J1Spc+CWOvvtvVyjKlaZopYU= +github.com/tetratelabs/wazero v1.12.0/go.mod h1:LvKtzl2RqO4gyF27BiXU+nKAjcV8f38U+kP/q2vgxh0= +github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU= +github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E= github.com/zclconf/go-cty v1.19.0 h1:IV8WdqYZc2c5rLX9bEoLNXKojBAp0MZPBHMIrCoa/s4= github.com/zclconf/go-cty v1.19.0/go.mod h1:12W89jGn3JCOIQi7infWr9m80rOkb5RNYJqXMZcN4c8= github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940 h1:4r45xpDWB6ZMSMNJFMOjqrGHynW3DIBuR2H9j0ug+Mo= github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940/go.mod h1:CmBdvvj3nqzfzJ6nTCIwDTPZ56aVGvDrmztiO5g3qrM= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/crypto v0.58.0 h1:COkYLr4k7nDI4r6QtMML2AfzeIswWHAJthLS6K/M/54= +golang.org/x/crypto v0.58.0/go.mod h1:Xh+kl5A+M0gMiWDytH2Hhr5Z7WbNCpv/eB/EFgfSk+w= +golang.org/x/image v0.47.0 h1:za/8gVz++PPZqmZJBNSISICN5Rrj5zixP/8K++fgmqo= +golang.org/x/image v0.47.0/go.mod h1:IkN5o4A7vq55vXN8FWjjnhg9Rs2GOtffqsSi9mWAKYE= golang.org/x/mod v0.41.0 h1:qJmnOUb4YB+FsEuM3HcWucdZASCPGhsX6uljO6pog0c= golang.org/x/mod v0.41.0/go.mod h1:Ek9pY8RKWXwsWvd3rQiHYtMqkjSUV+s1Rj7j4H5Ur6o= +golang.org/x/net v0.62.0 h1:18ELalfM5+XNRwzM2nYqXsZQ9ByS1uhj2O/U7+5jqRY= +golang.org/x/net v0.62.0/go.mod h1:WgDCOTH8iwtB66T4/GfI94AHo/hhdb7Hah9NDseQfiI= golang.org/x/sync v0.24.0 h1:iqiDrGoDgyuvAKrhLQthUEzU/R378N78gXbBjxed7oA= golang.org/x/sync v0.24.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.49.0 h1:XbzkgYJHdqh/8m2Uu0W/dQv8nktxx4BFHp1M0gROTXA= +golang.org/x/sys v0.49.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og= golang.org/x/text v0.43.0 h1:1QivrlhwAsnMOcqgOdl9my7s9OyZl8O5/UGUTJVXoWc= golang.org/x/text v0.43.0/go.mod h1:hbSIYA/amXcRXTFSZqh8tWHEoqRvvbKPJ2uz/KU+a+s= golang.org/x/tools v0.51.0 h1:k4Xc/1Om9jwkBJBo4NVLMSARBoWtK10mx+W5BnXCeAI= golang.org/x/tools v0.51.0/go.mod h1:9eEncMayCV6zRMGhR5eZEC2iBx98qWcF1HZ9Z7wJOoA= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=