From 29e6d51cefe9948efa3479d437d499eca61b1722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Schottst=C3=A4dt?= Date: Mon, 28 Sep 2026 03:15:20 +0200 Subject: [PATCH 01/11] feat(publish): add shared lifecycle publisher Use dedicated account auth and private project robots for staging. Import immutable releases and publish through the customer lifecycle; keep private PR previews in separate repositories. Leave workflows unchanged pending release-environment and credential approval. Verify real local gateway/Core/Harbor retries with deterministic CLI builds and clean up only identity-verified disposable fixtures. --- docs/shared-lifecycle-publication.md | 92 ++++++ .../local_integration_test.go | 206 ++++++++++++++ scripts/publish-lifecycle/main.go | 266 ++++++++++++++++++ scripts/publish-lifecycle/main_test.go | 218 ++++++++++++++ scripts/push.sh | 22 +- scripts/stage-scroll-ui/main.go | 16 ++ scripts/stage-scroll-ui/main_test.go | 10 + scripts/tests/push-parallel.test.sh | 3 + 8 files changed, 831 insertions(+), 2 deletions(-) create mode 100644 docs/shared-lifecycle-publication.md create mode 100644 scripts/publish-lifecycle/local_integration_test.go create mode 100644 scripts/publish-lifecycle/main.go create mode 100644 scripts/publish-lifecycle/main_test.go diff --git a/docs/shared-lifecycle-publication.md b/docs/shared-lifecycle-publication.md new file mode 100644 index 00000000..836a4083 --- /dev/null +++ b/docs/shared-lifecycle-publication.md @@ -0,0 +1,92 @@ +# Shared authored-release publication + +Implementation is opt-in and locally tested. The production/PR workflows have +**not** been switched: authorization for that ongoing CI change and dedicated +Team credential provisioning remain outstanding. Do not treat this as deployed. + +## Contract + +`scripts/push.sh` remains the single explicit catalog and retains its category +barrier, serial default and bounded concurrency. `SCROLL_PUBLISH_MODE=lifecycle` +adds the shared Core policy after each rendered artifact push: + +1. Verify the authenticated publisher's private project against the configured + owner and registry. Reject admin/public-project registry credentials. +2. Render/stage the existing Scroll and private UI. Include inherited family + `.meta` in the revision, not just a mutable category artifact. +3. Push into that private project with a cryptographically unique staging tag. +4. Resolve that tag once, then import its immutable digest through Core. +5. Core applies canonical identity before hashing, verifies final bytes, handles + immutable-tag conflicts and refreshes the catalog under its repository lock. +6. When explicitly reviewed, publish through the same repository-wide operation + used by customers. No public-registry credentials or Team bypass are involved. + +The source staging artifact is retained. Backup snapshots are rejected by the +authored-release endpoint; they must use backup promotion with provenance. + +## Configuration contract (not provisioned) + +- `SCROLL_LIFECYCLE_URL`: trusted Core base URL, including `/core` at the gateway. +- `SCROLL_LIFECYCLE_OWNER`: identity ID of the dedicated publisher account. +- `SCROLL_REGISTRY_HOST`: scheme-less configured Harbor host. +- `SCROLL_REGISTRY_NAMESPACE`: must equal that identity ID (private staging). +- `SCROLL_REGISTRY_USER` / `SCROLL_REGISTRY_PASSWORD`: robot credential belonging + to that private project, issued by the normal account registry-credential flow. +- `SCROLL_AUTH_URL`, `SCROLL_TEAM_EMAIL`, `SCROLL_TEAM_PASSWORD`: normal dedicated + account sign-in. Auth must have the same trusted origin as Core. Session cookies + stay in memory, owner JWTs refresh before lifecycle calls, and sign-out is + attempted at exit. Auth credentials are not passed to the renderer subprocess. +- Alternatively `SCROLL_LIFECYCLE_TOKEN`: a fresh externally supplied owner JWT; + expiration fails closed. Never commit or print credentials. +- `SCROLL_REGISTRY_RUNTIME_NAMESPACE=druid-team`: keeps runtime images separate + from the private staging project. +- `SCROLL_TAG_SUFFIX=-`: immutable revision names for repeatable CI. + Reusing a tag with changed content is a conflict, not an overwrite. +- Lifecycle mode sets `SOURCE_DATE_EPOCH` from the checked-out commit unless + explicitly supplied. The matching CLI must support it and deterministic root + layer ordering: otherwise identical rebuilds correctly conflict as different + manifest bytes. +- `SCROLL_LIFECYCLE_PUBLISH=1` plus `SCROLL_LIFECYCLE_REVIEWED=1`: explicitly + reviewed public publication. Without publish, imports remain private unless + the destination was already public, in which case unreviewed import fails. +- `SCROLL_LIFECYCLE_REPOSITORY_SUFFIX=-pr`: **separate private preview + repositories**. A PR tag in an already-public release repository is not private. + +Keep secrets restricted to trusted publication jobs and require a release review +gate. No production account, robot, GitHub secret, or environment has been created +by this implementation. Both Core import support and the matching runtime/server +lifecycle PRs must be deployed before enabling the workflows. + +## Verification + +- Go publisher tests cover shared private/public operations, immutable staging, + expected-owner rejection before push, failed-push isolation, separate private + preview identity, explicit review, fresh JWTs and redirect credential isolation. +- Metadata staging tests check inherited presentation and the existing private UI. +- `SCROLL_PUSH_UI=0 bash scripts/tests/push-parallel.test.sh`: passed. +- Full staging-enabled concurrency run: passed, 18 categories / 127 artifacts. + One earlier run during concurrent edits stopped early (47 artifacts); its + original staging error was not retained. The rerun passed without a pool fix; + do not misreport that earlier result as a diagnosed production defect. +- Core shared policy/adapter/schema tests and real local Harbor/Postgres tests + cover authored imports, immutable conflicts, public review guards, byte + preservation and private staging. See the monorepo verification document. +- Authenticated helper → local gateway/auth → live Core → Harbor acceptance + passed in 7.10s, including private import, an identical digest on rebuild, + shared publication and anonymous visibility. The fixture's robot, projects, + catalog row, auth account/session and development credit were cleaned up. + Four retained fixtures from earlier diagnosis attempts were also removed with + exact identity/name/email guards. CI credential provisioning and rollout are + still outstanding; no production account or registry was touched. +- Earlier live failures identified fixture username/schema mistakes and a real + ORAS creation-timestamp reproducibility gap. The timestamp fix preserves + immutable-tag conflicts rather than weakening them. +- Subsequent retry failures exposed nondeterministic root-layer ordering in the + CLI. A focused real OCI push regression reproduced it in 0.08s; sorting the + discovered paths fixed the byte difference without weakening conflict checks. + The final live test explicitly signs out after signup and signs back in with + the dedicated fixture account. Three consecutive runs passed (8.53s, 6.25s, + 6.16s), including exact retry, publication, anonymous visibility and cleanup. + +On interruption, inspect final registry state before retrying. A disconnected +HTTP request does not prove that an import or publication was rolled back. diff --git a/scripts/publish-lifecycle/local_integration_test.go b/scripts/publish-lifecycle/local_integration_test.go new file mode 100644 index 00000000..1d7a4d67 --- /dev/null +++ b/scripts/publish-lifecycle/local_integration_test.go @@ -0,0 +1,206 @@ +package main + +import ( + "crypto/rand" + "crypto/sha256" + "encoding/hex" + "encoding/json" + "fmt" + "net/http" + "net/http/cookiejar" + "os" + "os/exec" + "path/filepath" + "regexp" + "strings" + "testing" + "time" +) + +// Opt-in localhost only. Creates an isolated publisher account/project and one +// tiny Scroll. It neither deploys a workload nor consumes shared game ports. +func TestLocalAuthenticatedPublisher(t *testing.T) { + if os.Getenv("SCROLL_LOCAL_LIFECYCLE_TEST") != "1" { + t.Skip("local live stack opt-in") + } + bin := os.Getenv("DRUID_BIN") + if bin == "" { + t.Fatal("DRUID_BIN is required") + } + jar, _ := cookiejar.New(nil) + p := &publisher{base: "http://localhost:3000/api/core", authURL: "http://localhost:3000/api/auth/v2", host: "druid-gs:8088", client: &http.Client{Jar: jar, Timeout: 2 * time.Minute, CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}} + nonce := make([]byte, 16) + if _, err := rand.Read(nonce); err != nil { + t.Fatal(err) + } + suffix := hex.EncodeToString(nonce) + var account struct { + User struct { + ID string `json:"id"` + } `json:"user"` + } + if err := p.authRequest(http.MethodPost, "/sign-up/email", map[string]any{"email": "lifecycle-" + suffix + "@example.invalid", "password": suffix + "-Fixture!", "name": "Local lifecycle acceptance", "username": "lifecycle" + suffix[:12]}, &account); err != nil { + t.Fatal(err) + } + p.owner = account.User.ID + if p.owner == "" { + t.Fatal("signup returned no fixture identity") + } + t.Logf("local fixture identity: %s", p.owner) + t.Cleanup(func() { cleanupLocalPublisher(t, p.owner) }) + t.Cleanup(func() { _ = p.authRequest(http.MethodPost, "/sign-out", map[string]any{}, nil) }) + // Exercise the same normal dedicated-account sign-in used by CI, not just + // the initial signup session returned by fixture setup. + if err := p.authRequest(http.MethodPost, "/sign-out", map[string]any{}, nil); err != nil { + t.Fatal(err) + } + if err := p.authRequest(http.MethodPost, "/sign-in/email", map[string]string{"email": "lifecycle-" + suffix + "@example.invalid", "password": suffix + "-Fixture!"}, nil); err != nil { + t.Fatal(err) + } + if err := p.preflight(); err != nil { + t.Fatal(err) + } + var robot struct { + ID int `json:"id"` + Username string `json:"username"` + Password string `json:"password"` + } + if err := p.request(http.MethodPost, "/v1/registry/credentials", map[string]string{"name": "lifecycle-fixture"}, &robot); err != nil { + t.Fatal(err) + } + t.Cleanup(func() { + if err := p.request(http.MethodDelete, fmt.Sprintf("/v1/registry/credentials/%d", robot.ID), nil, nil); err != nil { + t.Error("fixture credential revocation failed") + } + }) + cliHome := t.TempDir() + run := func(args []string) error { + cmd := exec.Command(args[0], args[1:]...) + for _, value := range os.Environ() { + if !strings.HasPrefix(value, "HOME=") { + cmd.Env = append(cmd.Env, value) + } + } + cmd.Env = append(cmd.Env, "HOME="+cliHome, "DRUID_REGISTRY_PLAIN_HTTP=true", "SOURCE_DATE_EPOCH=0") + output, err := cmd.CombinedOutput() + if err != nil && len(args) > 1 && args[1] != "login" { + // Fixture-only diagnostics: never print auth/login output or full logs. + for _, line := range strings.Split(string(output), "\n") { + if strings.HasPrefix(line, "Error:") { + t.Log(strings.ReplaceAll(strings.ReplaceAll(line, robot.Password, ""), p.token, "")) + } + } + } + return err + } + if err := run([]string{bin, "login", "--host", p.host, "--user", robot.Username, "--password", robot.Password}); err != nil { + t.Fatal("fixture registry login failed") + } + source := t.TempDir() + if err := os.Mkdir(filepath.Join(source, ".meta"), 0755); err != nil { + t.Fatal(err) + } + if err := os.WriteFile(filepath.Join(source, ".meta", "en-US.md"), []byte("---\nname: Local authored fixture\n---\nNo customer content.\n"), 0644); err != nil { + t.Fatal(err) + } + if err := os.WriteFile(filepath.Join(source, "scroll.yaml"), []byte("name: fixture\ndesc: Local authored fixture\nversion: 1.0.0\napp_version: '1.0.0'\ncommands:\n start:\n run: persistent\n procedures:\n - id: fixture\n command: [sleep, '600']\n image: busybox:1.36\n"), 0644); err != nil { + t.Fatal(err) + } + command := []string{bin, "push", p.host + "/" + p.owner + "/example:accepted-fixture", source, "--category", "fixture"} + if err := p.publish(command, run); err != nil { + t.Fatal(err) + } + // Repeat exactly through the real authenticated public operation. It must + // verify the existing finalized bytes, not overwrite the revision tag. + p.public = true + if err := p.publish(command, run); err != nil { + t.Fatal(err) + } + t.Log("authenticated private staging, exact retry and shared publication passed") + // Assert publication through Harbor's public metadata without owner cookies. + projectName := fmt.Sprintf("scroll-%x-example", sha256.Sum256([]byte(p.owner))) + response, err := http.Get("http://druid-gs:8088/api/v2.0/projects?page_size=100&name=" + projectName) + if err != nil { + t.Fatal(err) + } + defer response.Body.Close() + if response.StatusCode != http.StatusOK { + t.Fatal("anonymous public project listing failed") + } + var projects []struct { + Name string `json:"name"` + Metadata struct { + Public string `json:"public"` + } `json:"metadata"` + } + if err := json.NewDecoder(response.Body).Decode(&projects); err != nil { + t.Fatal(err) + } + found := false + for _, project := range projects { + if project.Name == projectName && project.Metadata.Public == "true" { + found = true + } + } + if !found { + t.Fatal("public fixture was not listed") + } +} + +func cleanupLocalPublisher(t *testing.T, owner string) { + t.Helper() + if !regexp.MustCompile(`^[a-f0-9-]{36}$`).MatchString(owner) { + t.Error("invalid fixture owner; cleanup refused") + return + } + fixture := fmt.Sprintf(`SELECT id::text FROM auth."user" WHERE id='%s' AND name='Local lifecycle acceptance' AND email ~ '^lifecycle-[a-f0-9]{32}@example[.]invalid$'`, owner) + verified, err := exec.Command("docker", "exec", "druid-postgres", "psql", "-U", "druid", "-d", "druid", "-At", "-c", fixture).Output() + if err != nil || strings.TrimSpace(string(verified)) != owner { + t.Error("exact local fixture identity could not be verified; cleanup refused") + return + } + canonicalProject := fmt.Sprintf("scroll-%x-example", sha256.Sum256([]byte(owner))) + for _, project := range []string{owner, canonicalProject} { + for _, path := range []string{"/api/v2.0/projects/" + project + "/repositories/example", "/api/v2.0/projects/" + project} { + req, _ := http.NewRequest(http.MethodDelete, "http://druid-gs:8088"+path, nil) + password := os.Getenv("LOCAL_HARBOR_TEST_PASSWORD") + if password == "" { + password = "admin" + } + req.SetBasicAuth("admin", password) + req.Header.Set("X-Is-Resource-Name", "true") + resp, err := http.DefaultClient.Do(req) + if err != nil { + t.Error("local Harbor fixture cleanup failed") + return + } + resp.Body.Close() + if resp.StatusCode != 404 && (resp.StatusCode < 200 || resp.StatusCode >= 300) { + t.Errorf("local Harbor fixture cleanup HTTP %d", resp.StatusCode) + return + } + } + } + // Only this generated fixture identity is eligible. FK failures roll back + // the entire database cleanup; unrelated/user-owned rows are never targeted. + sql := fmt.Sprintf(`BEGIN; +DELETE FROM scroll.repository WHERE user_id::text IN (%s); +DELETE FROM core.ledger_entry WHERE user_id::text IN (%s); +DELETE FROM core."user" WHERE identity_id::text IN (%s); +DELETE FROM auth."user" WHERE id::text IN (%s); +COMMIT;`, fixture, fixture, fixture, fixture) + cmd := exec.Command("docker", "exec", "druid-postgres", "psql", "-U", "druid", "-d", "druid", "-v", "ON_ERROR_STOP=1", "-c", sql) + if err := cmd.Run(); err != nil { + t.Error("fixture database cleanup failed; exact identity retained:", owner) + } +} + +func TestCleanupRetainedLocalPublisherFixtures(t *testing.T) { + ids := os.Getenv("SCROLL_LOCAL_FIXTURE_CLEANUP") + if ids == "" { + t.Skip("explicit retained-fixture IDs required") + } + for _, id := range strings.Split(ids, ",") { + cleanupLocalPublisher(t, id) + } +} diff --git a/scripts/publish-lifecycle/main.go b/scripts/publish-lifecycle/main.go new file mode 100644 index 00000000..264e6303 --- /dev/null +++ b/scripts/publish-lifecycle/main.go @@ -0,0 +1,266 @@ +// Publishes the existing explicit catalog through the shared Core lifecycle. +// Registry credentials can write private staging only; Core owns finalization. +package main + +import ( + "bytes" + "context" + "crypto/rand" + "crypto/sha256" + "encoding/hex" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/http/cookiejar" + "net/url" + "os" + "os/exec" + "regexp" + "strings" + "time" +) + +type publisher struct { + base, token, owner, host, repositorySuffix string + public bool + client *http.Client + authURL string +} + +var exact = regexp.MustCompile(`^[^@\s]+@sha256:[a-f0-9]{64}$`) + +func configured() (*publisher, error) { + base := strings.TrimRight(os.Getenv("SCROLL_LIFECYCLE_URL"), "/") + u, err := url.Parse(base) + if err != nil || u.Host == "" || u.User != nil || u.RawQuery != "" || u.Fragment != "" || (u.Scheme != "https" && !(u.Scheme == "http" && (u.Hostname() == "localhost" || u.Hostname() == "127.0.0.1" || u.Hostname() == "druid-gs"))) { + return nil, errors.New("SCROLL_LIFECYCLE_URL must be HTTPS (HTTP allowed only for local development)") + } + p := &publisher{base: base, token: os.Getenv("SCROLL_LIFECYCLE_TOKEN"), owner: os.Getenv("SCROLL_LIFECYCLE_OWNER"), host: os.Getenv("SCROLL_REGISTRY_HOST"), repositorySuffix: os.Getenv("SCROLL_LIFECYCLE_REPOSITORY_SUFFIX"), public: os.Getenv("SCROLL_LIFECYCLE_PUBLISH") == "1", + client: &http.Client{Timeout: 70 * time.Minute, CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}} + if p.owner == "" || p.host == "" || os.Getenv("SCROLL_REGISTRY_NAMESPACE") != p.owner { + return nil, errors.New("expected owner, registry host and matching private staging namespace are required") + } + if p.public && os.Getenv("SCROLL_LIFECYCLE_REVIEWED") != "1" { + return nil, errors.New("public publication requires SCROLL_LIFECYCLE_REVIEWED=1 after content review") + } + // Never reuse production admin/public-project credentials for staging. + if !strings.HasPrefix(os.Getenv("SCROLL_REGISTRY_USER"), "robot$"+p.owner+"+") { + return nil, errors.New("registry credentials must belong to the expected owner's private project") + } + if p.token == "" { + auth, err := url.Parse(strings.TrimRight(os.Getenv("SCROLL_AUTH_URL"), "/")) + if err != nil || auth.Host != u.Host || auth.Scheme != u.Scheme || auth.User != nil || auth.RawQuery != "" || auth.Fragment != "" { + return nil, errors.New("SCROLL_AUTH_URL must use the same trusted origin as Core") + } + email, password := os.Getenv("SCROLL_TEAM_EMAIL"), os.Getenv("SCROLL_TEAM_PASSWORD") + if email == "" || password == "" { + return nil, errors.New("provide a fresh lifecycle token or dedicated Team sign-in credentials") + } + p.authURL = auth.String() + p.client.Jar, _ = cookiejar.New(nil) + if err := p.authRequest(http.MethodPost, "/sign-in/email", map[string]string{"email": email, "password": password}, nil); err != nil { + return nil, err + } + } + return p, nil +} + +// Use normal account sign-in and refreshed JWTs, not a Team-specific auth bypass. +// Session cookies stay in memory and are revoked on exit. +func (p *publisher) authRequest(method, path string, body, out any) error { + data, err := json.Marshal(body) + if err != nil { + return err + } + ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) + defer cancel() + req, err := http.NewRequestWithContext(ctx, method, p.authURL+path, bytes.NewReader(data)) + if err != nil { + return errors.New("invalid auth request") + } + req.Header.Set("Content-Type", "application/json") + if origin, err := url.Parse(p.authURL); err == nil { + req.Header.Set("Origin", origin.Scheme+"://"+origin.Host) + } + resp, err := p.client.Do(req) + if err != nil { + return errors.New("publisher authentication failed") + } + defer resp.Body.Close() + if resp.StatusCode < 200 || resp.StatusCode >= 300 { + var failure struct { + Code string `json:"code"` + } + _ = json.NewDecoder(io.LimitReader(resp.Body, 1024)).Decode(&failure) + if !regexp.MustCompile(`^[A-Z_]{1,64}$`).MatchString(failure.Code) { + failure.Code = "AUTH_FAILED" + } + return fmt.Errorf("publisher authentication rejected: HTTP %d (%s)", resp.StatusCode, failure.Code) + } + if out != nil { + return json.NewDecoder(io.LimitReader(resp.Body, 1024*1024)).Decode(out) + } + return nil +} + +func (p *publisher) request(method, path string, body, out any) error { + if p.authURL != "" { + var jwt struct { + Token string `json:"token"` + } + if err := p.authRequest(http.MethodGet, "/token", nil, &jwt); err != nil { + return err + } + if jwt.Token == "" { + return errors.New("authentication returned no owner JWT") + } + p.token = jwt.Token + } + var data []byte + var err error + if body != nil { + data, err = json.Marshal(body) + if err != nil { + return err + } + } + req, err := http.NewRequest(method, p.base+path, bytes.NewReader(data)) + if err != nil { + return errors.New("invalid lifecycle request") + } + req.Header.Set("Authorization", "Bearer "+p.token) + req.Header.Set("Content-Type", "application/json") + resp, err := p.client.Do(req) + if err != nil { + return errors.New("lifecycle request failed; inspect installed/published state before retrying") + } + defer resp.Body.Close() + if resp.StatusCode < 200 || resp.StatusCode >= 300 { + return fmt.Errorf("lifecycle request rejected: HTTP %d", resp.StatusCode) + } + if out != nil { + return json.NewDecoder(io.LimitReader(resp.Body, 1024*1024)).Decode(out) + } + return nil +} + +func (p *publisher) preflight() error { + var project struct { + Registry string `json:"registry"` + Project string `json:"project"` + } + // The shared operation ensures this is the authenticated actor's PRIVATE + // project. A supplied owner name alone is never treated as authorization. + if err := p.request(http.MethodGet, "/v1/registry/project", nil, &project); err != nil { + return err + } + if project.Registry != p.host || project.Project != p.host+"/"+p.owner { + return errors.New("authenticated identity or registry differs from the expected publisher") + } + return nil +} + +func (p *publisher) publish(command []string, run func([]string) error) error { + if len(command) < 4 || command[1] != "push" || command[2] == "category" { + return errors.New("expected a rendered artifact push command") + } + ref := command[2] + prefix := p.host + "/" + p.owner + "/" + if !strings.HasPrefix(ref, prefix) { + return errors.New("artifact must target the verified private staging project") + } + nameTag := strings.TrimPrefix(ref, prefix) + parts := strings.Split(nameTag, ":") + if len(parts) != 2 || strings.Contains(parts[0], "/") || !regexp.MustCompile(`^[a-z0-9][a-z0-9_-]{0,62}$`).MatchString(parts[0]) || !regexp.MustCompile(`^[\w][\w.-]{0,127}$`).MatchString(parts[1]) { + return errors.New("invalid repository or explicit revision tag") + } + name := parts[0] + p.repositorySuffix + if !regexp.MustCompile(`^[a-z0-9][a-z0-9_-]{0,62}$`).MatchString(name) { + return errors.New("invalid final repository name") + } + if err := p.preflight(); err != nil { + return err + } + nonce := make([]byte, 16) + if _, err := rand.Read(nonce); err != nil { + return err + } + // Each invocation owns its staging tag, so another job cannot replace the + // mutable selection between our push and the single digest resolution. + stagedRef := prefix + parts[0] + ":build-" + hex.EncodeToString(nonce) + stagedCommand := append([]string(nil), command...) + stagedCommand[2] = stagedRef + // Final reusable revisions embed presentation instead of depending on a + // separately mutable category artifact. Staging supplies inherited .meta. + stagedCommand = append(stagedCommand, "--pack-meta") + if err := run(stagedCommand); err != nil { + return err + } + var staged struct { + Artifact string `json:"artifact"` + } + if err := p.request(http.MethodGet, "/v1/registry/scrolls/revision?artifact="+url.QueryEscape(stagedRef), nil, &staged); err != nil { + return err + } + if !exact.MatchString(staged.Artifact) || !strings.HasPrefix(staged.Artifact, prefix+parts[0]+"@") { + return errors.New("resolved staging revision differs from selected repository") + } + var imported struct { + Artifact string `json:"artifact"` + } + input := map[string]any{"repository": name, "tag": parts[1], "releaseArtifact": staged.Artifact, "reviewedPublicContent": p.public} + if err := p.request(http.MethodPost, "/v1/registry/scrolls/releases/import", input, &imported); err != nil { + return err + } + ownerHash := sha256.Sum256([]byte(p.owner)) + canonical := fmt.Sprintf("%s/scroll-%x-%s/%s", p.host, ownerHash, name, name) + if !exact.MatchString(imported.Artifact) || !strings.HasPrefix(imported.Artifact, canonical+"@") { + return errors.New("Core did not return an exact finalized revision") + } + if p.public { + digest := strings.SplitN(imported.Artifact, "@", 2)[1] + if err := p.request(http.MethodPost, "/v1/registry/scrolls/publish", map[string]any{"repository": name, "revision": digest, "reviewedPublicContent": true}, nil); err != nil { + return err + } + } + fmt.Println(imported.Artifact) + return nil +} + +func runPublisher() error { + p, err := configured() + if err == nil && p.authURL != "" { + defer p.authRequest(http.MethodPost, "/sign-out", map[string]any{}, nil) + } + if err == nil { + if len(os.Args) == 2 && os.Args[1] == "preflight" { + err = p.preflight() + } else { + args := os.Args[1:] + if len(args) > 0 && args[0] == "--" { + args = args[1:] + } + err = p.publish(args, func(command []string) error { + cmd := exec.Command(command[0], command[1:]...) + for _, entry := range os.Environ() { + if strings.HasPrefix(entry, "SCROLL_TEAM_PASSWORD=") || strings.HasPrefix(entry, "SCROLL_TEAM_EMAIL=") || strings.HasPrefix(entry, "SCROLL_LIFECYCLE_TOKEN=") { + continue + } + cmd.Env = append(cmd.Env, entry) + } + cmd.Stdout, cmd.Stderr = os.Stdout, os.Stderr + return cmd.Run() + }) + } + } + return err +} + +func main() { + if err := runPublisher(); err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } +} diff --git a/scripts/publish-lifecycle/main_test.go b/scripts/publish-lifecycle/main_test.go new file mode 100644 index 00000000..23f69a68 --- /dev/null +++ b/scripts/publish-lifecycle/main_test.go @@ -0,0 +1,218 @@ +package main + +import ( + "crypto/sha256" + "encoding/json" + "errors" + "fmt" + "net/http" + "net/http/httptest" + "strings" + "testing" +) + +func TestSharedLifecyclePrivateStagingAndExplicitPublication(t *testing.T) { + for _, public := range []bool{false, true} { + t.Run(fmt.Sprint(public), func(t *testing.T) { + var staged string + var imported, published int + name := "scroll-example" + suffix := "" + if !public { + suffix = "-pr12" + } + name += suffix + canonical := fmt.Sprintf("registry.test/scroll-%x-%s/%s", sha256.Sum256([]byte("team-owner")), name, name) + digest := "sha256:" + strings.Repeat("a", 64) + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Header.Get("Authorization") != "Bearer fixture" { + t.Error("owner authorization missing") + } + w.Header().Set("Content-Type", "application/json") + switch r.URL.Path { + case "/v1/registry/project": + fmt.Fprint(w, `{"registry":"registry.test","project":"registry.test/team-owner"}`) + case "/v1/registry/scrolls/revision": + if staged == "" || r.URL.Query().Get("artifact") != staged { + t.Error("did not freeze own staging tag") + } + json.NewEncoder(w).Encode(map[string]string{"artifact": "registry.test/team-owner/scroll-example@" + digest}) + case "/v1/registry/scrolls/releases/import": + imported++ + var input struct { + Repository, Tag, ReleaseArtifact string + ReviewedPublicContent bool + } + json.NewDecoder(r.Body).Decode(&input) + if input.Repository != name || input.Tag != "v1-commit" || input.ReleaseArtifact != "registry.test/team-owner/scroll-example@"+digest || input.ReviewedPublicContent != public { + t.Errorf("wrong import contract: %+v", input) + } + json.NewEncoder(w).Encode(map[string]string{"artifact": canonical + "@" + digest}) + case "/v1/registry/scrolls/publish": + published++ + var input struct { + Repository, Revision string + ReviewedPublicContent bool + } + json.NewDecoder(r.Body).Decode(&input) + if input.Repository != name || input.Revision != digest || !input.ReviewedPublicContent { + t.Error("publication lost exact revision/review") + } + fmt.Fprint(w, `{}`) + default: + t.Error("unexpected request") + w.WriteHeader(404) + } + })) + defer server.Close() + p := &publisher{base: server.URL, client: server.Client(), token: "fixture", owner: "team-owner", host: "registry.test", public: public, repositorySuffix: suffix} + command := []string{"druid", "push", "registry.test/team-owner/scroll-example:v1-commit", "./scroll"} + err := p.publish(command, func(args []string) error { + staged = args[2] + if !strings.HasPrefix(staged, "registry.test/team-owner/scroll-example:build-") { + t.Fatal("push not isolated in private staging") + } + return nil + }) + if err != nil { + t.Fatal(err) + } + if imported != 1 || (public && published != 1) || (!public && published != 0) { + t.Fatal("wrong lifecycle calls") + } + if command[2] != "registry.test/team-owner/scroll-example:v1-commit" { + t.Fatal("caller catalog mutated") + } + }) + } +} + +func TestWrongIdentityStopsBeforeRegistryPush(t *testing.T) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + fmt.Fprint(w, `{"registry":"registry.test","project":"registry.test/other"}`) + })) + defer server.Close() + p := &publisher{base: server.URL, client: server.Client(), owner: "team-owner", host: "registry.test"} + called := false + err := p.publish([]string{"druid", "push", "registry.test/team-owner/example:v1", "./scroll"}, func([]string) error { called = true; return nil }) + if err == nil || called { + t.Fatal("wrong identity was allowed to push") + } +} + +func TestFailedPushNeverImports(t *testing.T) { + calls := 0 + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + calls++ + fmt.Fprint(w, `{"registry":"registry.test","project":"registry.test/team-owner"}`) + })) + defer server.Close() + p := &publisher{base: server.URL, client: server.Client(), owner: "team-owner", host: "registry.test"} + err := p.publish([]string{"druid", "push", "registry.test/team-owner/example:v1", "./scroll"}, func([]string) error { return errors.New("push failed") }) + if err == nil || calls != 1 { + t.Fatal("failed push reached lifecycle import") + } +} + +func TestConfigurationRejectsAdminCredentialsAndUnreviewedPublication(t *testing.T) { + t.Setenv("SCROLL_LIFECYCLE_URL", "https://api.druid.gg/core") + t.Setenv("SCROLL_LIFECYCLE_TOKEN", "fixture") + t.Setenv("SCROLL_LIFECYCLE_OWNER", "team-owner") + t.Setenv("SCROLL_REGISTRY_HOST", "registry.test") + t.Setenv("SCROLL_REGISTRY_NAMESPACE", "team-owner") + t.Setenv("SCROLL_REGISTRY_USER", "admin") + if _, err := configured(); err == nil { + t.Fatal("admin credentials accepted") + } + t.Setenv("SCROLL_REGISTRY_USER", "robot$team-owner+ci") + t.Setenv("SCROLL_LIFECYCLE_PUBLISH", "1") + t.Setenv("SCROLL_LIFECYCLE_REVIEWED", "0") + if _, err := configured(); err == nil { + t.Fatal("unreviewed public import accepted") + } + t.Setenv("SCROLL_LIFECYCLE_REVIEWED", "1") + if _, err := configured(); err != nil { + t.Fatal(err) + } +} + +func TestDedicatedAccountRefreshesJWTUsingInMemorySession(t *testing.T) { + tokens := 0 + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case "/auth/v2/sign-in/email": + var input map[string]string + json.NewDecoder(r.Body).Decode(&input) + if input["email"] != "team@example.test" || input["password"] != "fixture-password" { + t.Error("wrong dedicated sign-in credentials") + } + http.SetCookie(w, &http.Cookie{Name: "session", Value: "fixture-session", Path: "/"}) + fmt.Fprint(w, `{}`) + case "/auth/v2/token": + if cookie, err := r.Cookie("session"); err != nil || cookie.Value != "fixture-session" { + t.Error("session cookie missing") + } + tokens++ + fmt.Fprintf(w, `{"token":"refreshed-%d"}`, tokens) + case "/core/v1/registry/project": + if r.Header.Get("Authorization") != fmt.Sprintf("Bearer refreshed-%d", tokens) { + t.Error("fresh owner JWT missing") + } + fmt.Fprint(w, `{"registry":"registry.test","project":"registry.test/team-owner"}`) + default: + t.Error("unexpected request") + w.WriteHeader(404) + } + })) + defer server.Close() + t.Setenv("SCROLL_LIFECYCLE_URL", server.URL+"/core") + t.Setenv("SCROLL_AUTH_URL", server.URL+"/auth/v2") + t.Setenv("SCROLL_LIFECYCLE_TOKEN", "") + t.Setenv("SCROLL_TEAM_EMAIL", "team@example.test") + t.Setenv("SCROLL_TEAM_PASSWORD", "fixture-password") + t.Setenv("SCROLL_LIFECYCLE_OWNER", "team-owner") + t.Setenv("SCROLL_REGISTRY_NAMESPACE", "team-owner") + t.Setenv("SCROLL_REGISTRY_HOST", "registry.test") + t.Setenv("SCROLL_REGISTRY_USER", "robot$team-owner+ci") + t.Setenv("SCROLL_LIFECYCLE_PUBLISH", "0") + p, err := configured() + if err != nil { + t.Fatal(err) + } + if err := p.preflight(); err != nil { + t.Fatal(err) + } + if err := p.preflight(); err != nil { + t.Fatal(err) + } + if tokens != 2 { + t.Fatal("owner JWT was not refreshed before each lifecycle request") + } +} + +func TestPublisherNeverFollowsCredentialedRedirects(t *testing.T) { + forwarded := false + other := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { forwarded = true })) + defer other.Close() + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + http.Redirect(w, r, other.URL, http.StatusTemporaryRedirect) + })) + defer server.Close() + t.Setenv("SCROLL_LIFECYCLE_URL", server.URL) + t.Setenv("SCROLL_LIFECYCLE_TOKEN", "fixture") + t.Setenv("SCROLL_LIFECYCLE_OWNER", "team-owner") + t.Setenv("SCROLL_REGISTRY_NAMESPACE", "team-owner") + t.Setenv("SCROLL_REGISTRY_HOST", "registry.test") + t.Setenv("SCROLL_REGISTRY_USER", "robot$team-owner+ci") + t.Setenv("SCROLL_LIFECYCLE_PUBLISH", "0") + p, err := configured() + if err != nil { + t.Fatal(err) + } + if err := p.preflight(); err == nil { + t.Fatal("redirect accepted") + } + if forwarded { + t.Fatal("credentials reached redirect target") + } +} diff --git a/scripts/push.sh b/scripts/push.sh index ef5a9e1f..d3690ea9 100755 --- a/scripts/push.sh +++ b/scripts/push.sh @@ -18,6 +18,11 @@ SCROLL_PUSH_CATEGORIES="${SCROLL_PUSH_CATEGORIES:-1}" SCROLL_PUSH_ARTIFACTS="${SCROLL_PUSH_ARTIFACTS:-1}" SCROLL_PUSH_JOBS="${SCROLL_PUSH_JOBS:-1}" SCROLL_PUSH_UI="${SCROLL_PUSH_UI:-1}" +SCROLL_PUBLISH_MODE="${SCROLL_PUBLISH_MODE:-direct}" +if [[ "$SCROLL_PUBLISH_MODE" != "direct" && "$SCROLL_PUBLISH_MODE" != "lifecycle" ]]; then + echo "SCROLL_PUBLISH_MODE must be direct or lifecycle" >&2 + exit 2 +fi if [[ ! "$SCROLL_PUSH_JOBS" =~ ^[1-9][0-9]*$ ]]; then echo "SCROLL_PUSH_JOBS must be a positive integer (got: $SCROLL_PUSH_JOBS)" >&2 @@ -122,17 +127,25 @@ run() { fi if ((SCROLL_PUSH_JOBS == 1)); then - "${command[@]}" + execute_push "${command[@]}" return fi - "${command[@]}" & + execute_push "${command[@]}" & push_pids+=("$!") if ((${#push_pids[@]} >= SCROLL_PUSH_JOBS)); then wait_for_oldest_push fi } +execute_push() { + if [[ "$SCROLL_PUBLISH_MODE" == "lifecycle" && "${2:-}" == "push" && "${3:-}" != "category" ]]; then + go run ./scripts/publish-lifecycle -- "$@" + else + "$@" + fi +} + push_release_categories() { run druid push category artifacts.druid.gg/druid-team/scroll-minecraft-spigot minecraft ./scrolls/minecraft/minecraft-spigot/.meta run druid push category artifacts.druid.gg/druid-team/scroll-minecraft-vanilla minecraft ./scrolls/minecraft/minecraft-vanilla/.meta @@ -284,6 +297,11 @@ push_release_artifacts() { run druid push artifacts.druid.gg/druid-team/scroll-hytale:latest ./scrolls/hytale/hytale-druid-gg -p main=5520/udp -i artifacts.druid.gg/druid-team/druid:v0.1.257 --min-disk 10Gi --min-ram 4Gi --min-cpu 1 -m --smart --category hytale } +if [[ "$SCROLL_PUBLISH_MODE" == "lifecycle" && "$SCROLL_PUSH_DRY_RUN" != "1" ]]; then + # Freeze build metadata across retries of one reviewed commit. + export SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(git show -s --format=%ct HEAD)}" + go run ./scripts/publish-lifecycle preflight +fi login_if_configured if [[ "$SCROLL_PUSH_CATEGORIES" = "1" ]]; then diff --git a/scripts/stage-scroll-ui/main.go b/scripts/stage-scroll-ui/main.go index d59b6d58..8fff78c5 100644 --- a/scripts/stage-scroll-ui/main.go +++ b/scripts/stage-scroll-ui/main.go @@ -339,6 +339,22 @@ func stage(source, destination, bundle string) error { if err := cp.Copy(source, destination); err != nil { return fmt.Errorf("copy Scroll: %w", err) } + // Version directories inherit family presentation. Keep it inside the staged + // release so the lifecycle never depends on mutable category tags afterward. + if _, err := os.Stat(filepath.Join(destination, ".meta")); os.IsNotExist(err) { + for parent := filepath.Dir(source); parent != "." && parent != filepath.Dir(parent); parent = filepath.Dir(parent) { + metadata := filepath.Join(parent, ".meta") + if info, err := os.Stat(metadata); err == nil && info.IsDir() { + if err := cp.Copy(metadata, filepath.Join(destination, ".meta")); err != nil { + return fmt.Errorf("copy presentation: %w", err) + } + break + } + if filepath.Base(parent) == "scrolls" { + break + } + } + } scrollPath := filepath.Join(destination, "scroll.yaml") scrollBytes, err := os.ReadFile(scrollPath) diff --git a/scripts/stage-scroll-ui/main_test.go b/scripts/stage-scroll-ui/main_test.go index 90704054..dd0a02f3 100644 --- a/scripts/stage-scroll-ui/main_test.go +++ b/scripts/stage-scroll-ui/main_test.go @@ -16,6 +16,13 @@ func TestStageAddsPrivateUIAndMinecraftManifest(t *testing.T) { if err := os.MkdirAll(source, 0755); err != nil { t.Fatal(err) } + metadata := filepath.Join(filepath.Dir(source), ".meta") + if err := os.MkdirAll(metadata, 0755); err != nil { + t.Fatal(err) + } + if err := os.WriteFile(filepath.Join(metadata, "en-US.md"), []byte("---\nname: Paper\n---\nPresentation\n"), 0644); err != nil { + t.Fatal(err) + } if err := os.WriteFile(filepath.Join(source, "scroll.yaml"), []byte("name: test\ndesc: test\nversion: 0.0.1\napp_version: 1.21.7\ncommands: {}\n"), 0644); err != nil { t.Fatal(err) } @@ -40,6 +47,9 @@ func TestStageAddsPrivateUIAndMinecraftManifest(t *testing.T) { if err := stage(source, destination, bundle); err != nil { t.Fatal(err) } + if _, err := os.Stat(filepath.Join(destination, ".meta", "en-US.md")); err != nil { + t.Fatal("family presentation missing from release", err) + } stagedYAML, err := os.ReadFile(filepath.Join(destination, "scroll.yaml")) if err != nil { diff --git a/scripts/tests/push-parallel.test.sh b/scripts/tests/push-parallel.test.sh index cf856e91..a47bbf50 100644 --- a/scripts/tests/push-parallel.test.sh +++ b/scripts/tests/push-parallel.test.sh @@ -110,6 +110,9 @@ fi failure_starts="$(grep -c '^start artifact ' "$tmp_dir/state/events.log")" failure_ends="$(grep -c '^end artifact ' "$tmp_dir/state/events.log")" +if [[ "$failure_starts" != "$expected_artifacts" ]]; then + sed -n '1,12p' "$tmp_dir/failure.err" >&2 +fi assert_equals "$expected_artifacts" "$failure_starts" \ "a job failure must not abandon the remaining queued artifact pushes" assert_equals "$failure_starts" "$failure_ends" \ From ce15065a75e9ac0fcda8f857b7403a4a9b8cf5a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Schottst=C3=A4dt?= Date: Sat, 3 Oct 2026 19:14:35 +0200 Subject: [PATCH 02/11] ci(scrolls): recover shared lifecycle cutover Route releases and private previews through verified lifecycle publication with immutable revisions and fail-closed provisioning guards. Dedicated credentials and protected environments remain rollout prerequisites. Recover the September 29 local draft and its offline regression coverage into the durable workspace. No remote publication performed. --- .github/workflows/pr.yml | 81 +------- .github/workflows/release.yml | 49 +---- .github/workflows/scroll-lifecycle.yml | 130 +++++++++++++ docs/shared-lifecycle-publication.md | 75 +++++++- scripts/publish-lifecycle/push_script_test.go | 174 ++++++++++++++++++ scripts/tests/push-parallel.test.sh | 3 - .../lifecycle_workflow.go | 124 +++++++++++++ .../lifecycle_workflow_test.go | 95 ++++++++++ scripts/validate-release-workflow/main.go | 4 + 9 files changed, 611 insertions(+), 124 deletions(-) create mode 100644 .github/workflows/scroll-lifecycle.yml create mode 100644 scripts/publish-lifecycle/push_script_test.go create mode 100644 scripts/validate-release-workflow/lifecycle_workflow.go create mode 100644 scripts/validate-release-workflow/lifecycle_workflow_test.go diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 2844312b..94287ebd 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -2,81 +2,10 @@ name: PR Pipeline on: pull_request: branches: [master] +permissions: + contents: read jobs: build-deploy: - runs-on: self-hosted - env: - SCROLL_REGISTRY_PR_NAMESPACE: druid-team-experimental - SCROLL_REGISTRY_ENDPOINT: ${{ secrets.SCROLL_REGISTRY_ENDPOINT }} - SCROLL_REGISTRY_API_KEY: ${{ secrets.SCROLL_REGISTRY_API_KEY }} - SCROLL_REGISTRY_API_SECRET: ${{ secrets.SCROLL_REGISTRY_API_SECRET }} - SCROLL_REGISTRY_BUCKET: ${{ secrets.SCROLL_REGISTRY_BUCKET_STAGING }} - DRUID_CLI_VERSION: v0.1.257 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version: ">=1.19.3" - - uses: actions/setup-node@v4 - with: - node-version: "22" - cache: npm - cache-dependency-path: ui/package-lock.json - - name: Build and test Scroll UI - working-directory: ui - run: npm ci && npm test && npm run type-check && npm run build - - run: apt update && apt install -y make - - name: Build scroll tree - env: - SCROLL_REGISTRY_HOST: ${{ secrets.SCROLL_REGISTRY_HOST }} - run: | - if [ "${{ github.event.pull_request.head.repo.full_name }}" = "${{ github.repository }}" ]; then - registry_host="${SCROLL_REGISTRY_HOST#http://}" - registry_host="${registry_host#https://}" - registry_host="${registry_host%%/*}" - export DRUID_COLDSTARTER_IMAGE="${registry_host}/${SCROLL_REGISTRY_PR_NAMESPACE}/druid:stable-pr${{ github.event.pull_request.number }}" - fi - make build-tree - - name: Get registry binary - if: github.event.pull_request.head.repo.full_name == github.repository - uses: robinraju/release-downloader@v1.7 - with: - repository: "highcard-dev/druid-cli" - tag: ${{ env.DRUID_CLI_VERSION }} - fileName: "druid" - token: ${{ secrets.GO_REPO_TOKEN }} - - name: Install druid - if: github.event.pull_request.head.repo.full_name == github.repository - run: | - chmod +x druid - mv druid /usr/local/bin/druid - - name: Validate all scrolls - run: ./scripts/validate_all_scrolls.sh && bash ./scripts/validate_ui_coverage.sh - - name: Test bounded push parallelism - run: bash ./scripts/tests/push-parallel.test.sh - - name: Login to registry - id: registry_login - continue-on-error: true - if: github.event.pull_request.head.repo.full_name == github.repository - run: druid login --host ${{ secrets.SCROLL_REGISTRY_HOST }} --user '${{ secrets.SCROLL_REGISTRY_USER }}' --password ${{ secrets.SCROLL_REGISTRY_PASSWORD }} - - name: Check scroll changes - id: scroll-changes - run: | - set -euo pipefail - git fetch origin "${{ github.base_ref }}" --depth=1 - if git diff --quiet "origin/${{ github.base_ref }}"..HEAD -- scrolls; then - echo "changed=false" >> "$GITHUB_OUTPUT" - echo "No scroll source changes; skipping preview push." - else - echo "changed=true" >> "$GITHUB_OUTPUT" - echo "Scroll source changed; publishing preview tags." - fi - - name: Push experimental PR tags - if: github.event.pull_request.head.repo.full_name == github.repository && steps.scroll-changes.outputs.changed == 'true' && steps.registry_login.outcome == 'success' - env: - SCROLL_REGISTRY_HOST: ${{ secrets.SCROLL_REGISTRY_HOST }} - SCROLL_REGISTRY_NAMESPACE: druid-team-experimental - SCROLL_REGISTRY_RUNTIME_NAMESPACE: druid-team - SCROLL_TAG_SUFFIX: -pr${{ github.event.pull_request.number }} - SCROLL_PUSH_CATEGORIES: "0" - run: bash ./scripts/push.sh + uses: ./.github/workflows/scroll-lifecycle.yml + with: + public: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ea52735d..237951e9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,47 +2,12 @@ name: Release Changed Pipeline on: workflow_dispatch: push: - branches: - - master - tags: - - v* + branches: [master] + tags: [v*] +permissions: + contents: read jobs: build-deploy: - runs-on: self-hosted - env: - SCROLL_REGISTRY_ENDPOINT: ${{ secrets.SCROLL_REGISTRY_ENDPOINT }} - SCROLL_REGISTRY_API_KEY: ${{ secrets.SCROLL_REGISTRY_API_KEY }} - SCROLL_REGISTRY_API_SECRET: ${{ secrets.SCROLL_REGISTRY_API_SECRET }} - SCROLL_REGISTRY_BUCKET: ${{ secrets.SCROLL_REGISTRY_BUCKET_STAGING }} - SCROLL_REGISTRY_HOST: ${{ secrets.SCROLL_REGISTRY_HOST }} - SCROLL_REGISTRY_USER: ${{ secrets.SCROLL_REGISTRY_USER }} - SCROLL_REGISTRY_PASSWORD: ${{ secrets.SCROLL_REGISTRY_PASSWORD }} - DRUID_CLI_VERSION: v0.1.257 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version: ">=1.19.3" - - uses: actions/setup-node@v4 - with: - node-version: "22" - cache: npm - cache-dependency-path: ui/package-lock.json - - name: Build and test Scroll UI - working-directory: ui - run: npm ci && npm test && npm run type-check && npm run build - - name: Get registry binary - uses: robinraju/release-downloader@v1.7 - with: - repository: "highcard-dev/druid-cli" - tag: ${{ env.DRUID_CLI_VERSION }} - fileName: "druid" - token: ${{ secrets.GO_REPO_TOKEN }} - - run: chmod +x druid - - name: Install druid - run: mv druid /usr/local/bin/druid - - name: druid version - run: druid version - - run: ./scripts/validate_all_scrolls.sh && bash ./scripts/validate_ui_coverage.sh - - name: Push release scrolls - run: bash ./scripts/push.sh + uses: ./.github/workflows/scroll-lifecycle.yml + with: + public: true diff --git a/.github/workflows/scroll-lifecycle.yml b/.github/workflows/scroll-lifecycle.yml new file mode 100644 index 00000000..592812a9 --- /dev/null +++ b/.github/workflows/scroll-lifecycle.yml @@ -0,0 +1,130 @@ +name: Shared Scroll lifecycle +on: + workflow_call: + inputs: + public: + description: Publish reviewed releases publicly; PR previews remain private. + required: true + type: boolean +permissions: + contents: read + +jobs: + verify: + runs-on: self-hosted + outputs: + changed: ${{ steps.changes.outputs.changed }} + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + persist-credentials: false + fetch-depth: 0 + - uses: actions/setup-go@v5 + with: + go-version: "1.24.7" + - uses: actions/setup-node@v4 + with: + node-version: "22" + cache: npm + cache-dependency-path: ui/package-lock.json + - name: Build and test Scroll UI + working-directory: ui + run: npm ci && npm test && npm run type-check && npm run build + - name: Build scroll tree + if: github.event_name == 'pull_request' + run: make build-tree + - name: Validate catalog and UI + run: go run ./scripts/validate-release-workflow && go run ./scripts/validate-scrolls.go && bash ./scripts/validate_ui_coverage.sh + - name: Test lifecycle publication + run: go test ./scripts/publish-lifecycle ./scripts/stage-scroll-ui ./scripts/validate-release-workflow -count=1 + - name: Test bounded catalog publication + run: bash ./scripts/tests/push-parallel.test.sh + - name: Check release inputs + id: changes + env: + EVENT_NAME: ${{ github.event_name }} + BASE_SHA: ${{ github.event.pull_request.base.sha }} + run: | + set -euo pipefail + if [[ "$EVENT_NAME" == "pull_request" ]] && git diff --quiet "$BASE_SHA"...HEAD -- scrolls ui scripts .github/workflows go.mod go.sum Makefile; then + echo "changed=false" >> "$GITHUB_OUTPUT" + else + echo "changed=true" >> "$GITHUB_OUTPUT" + fi + + publish: + needs: verify + if: >- + needs.verify.outputs.changed == 'true' && + ((inputs.public && github.event_name != 'pull_request') || + (!inputs.public && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) + # A fresh runner keeps Team credentials out of the untrusted validation job. + runs-on: ubuntu-latest + timeout-minutes: 360 + environment: ${{ inputs.public && 'scroll-release' || 'scroll-preview' }} + concurrency: + group: scroll-lifecycle-${{ inputs.public && 'release' || format('pr-{0}', github.event.pull_request.number) }} + cancel-in-progress: false + steps: + - name: Require provisioned lifecycle environment + env: + LIFECYCLE_READY: ${{ vars.SCROLL_LIFECYCLE_READY }} + run: | + if [[ "$LIFECYCLE_READY" != "true" ]]; then + echo "Configure the protected Team lifecycle environment before publication." >&2 + exit 1 + fi + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + persist-credentials: false + - name: Checkout lifecycle-capable CLI + uses: actions/checkout@v4 + with: + repository: highcard-dev/druid-cli + # Includes SOURCE_DATE_EPOCH and stable root-layer ordering. + ref: a9f5dd9ec361ee5b268dfa5b5c2a56ef60f350fd + path: .druid-cli + token: ${{ secrets.GO_REPO_TOKEN }} + persist-credentials: false + - uses: actions/setup-go@v5 + with: + go-version-file: .druid-cli/go.mod + - name: Build pinned CLI + working-directory: .druid-cli + run: | + mkdir -p "$RUNNER_TEMP/scroll-cli" + go build -o "$RUNNER_TEMP/scroll-cli/druid" ./apps/druid + echo "$RUNNER_TEMP/scroll-cli" >> "$GITHUB_PATH" + - uses: actions/setup-node@v4 + with: + node-version: "22" + cache: npm + cache-dependency-path: ui/package-lock.json + - name: Build Scroll UI + working-directory: ui + run: npm ci && npm run build + - name: Build scroll tree + if: github.event_name == 'pull_request' + run: make build-tree + - name: Validate with pinned CLI + run: ./scripts/validate_all_scrolls.sh && bash ./scripts/validate_ui_coverage.sh + - name: Publish through shared lifecycle + env: + SCROLL_PUBLISH_MODE: lifecycle + SCROLL_LIFECYCLE_URL: ${{ vars.SCROLL_LIFECYCLE_URL }} + SCROLL_AUTH_URL: ${{ vars.SCROLL_AUTH_URL }} + SCROLL_LIFECYCLE_OWNER: ${{ vars.SCROLL_LIFECYCLE_OWNER }} + SCROLL_REGISTRY_HOST: ${{ vars.SCROLL_REGISTRY_HOST }} + SCROLL_REGISTRY_NAMESPACE: ${{ vars.SCROLL_LIFECYCLE_OWNER }} + SCROLL_REGISTRY_RUNTIME_NAMESPACE: druid-team + SCROLL_REGISTRY_USER: ${{ secrets.SCROLL_TEAM_REGISTRY_USER }} + SCROLL_REGISTRY_PASSWORD: ${{ secrets.SCROLL_TEAM_REGISTRY_PASSWORD }} + SCROLL_TEAM_EMAIL: ${{ secrets.SCROLL_TEAM_EMAIL }} + SCROLL_TEAM_PASSWORD: ${{ secrets.SCROLL_TEAM_PASSWORD }} + SCROLL_TAG_SUFFIX: -${{ github.event.pull_request.head.sha || github.sha }} + SCROLL_LIFECYCLE_REPOSITORY_SUFFIX: ${{ github.event_name == 'pull_request' && format('-pr{0}', github.event.pull_request.number) || '' }} + SCROLL_LIFECYCLE_PUBLISH: ${{ inputs.public && '1' || '0' }} + SCROLL_LIFECYCLE_REVIEWED: ${{ inputs.public && '1' || '0' }} + run: bash ./scripts/push.sh diff --git a/docs/shared-lifecycle-publication.md b/docs/shared-lifecycle-publication.md index 836a4083..fd52626f 100644 --- a/docs/shared-lifecycle-publication.md +++ b/docs/shared-lifecycle-publication.md @@ -1,8 +1,58 @@ # Shared authored-release publication -Implementation is opt-in and locally tested. The production/PR workflows have -**not** been switched: authorization for that ongoing CI change and dedicated -Team credential provisioning remain outstanding. Do not treat this as deployed. +The local workflow draft routes release and PR publication through the shared +lifecycle. This is a local-only recovery; it has not been pushed or run on GitHub. +Dedicated Team +identity/credentials and protected GitHub environments are not provisioned. +Do not treat this as deployed or as complete product acceptance. + +## Local CI cutover draft + +`release.yml` and `pr.yml` call `scroll-lifecycle.yml`; neither retains a direct +registry publication fallback. The shared workflow validates/builds UI, checks +the catalog and runs publisher/staging/workflow tests without Team secrets. +Publication then uses a fresh runner and the protected `scroll-release` or +`scroll-preview` environment. Fork PRs validate but never enter publication. + +The publication job builds CLI commit +`a9f5dd9ec361ee5b268dfa5b5c2a56ef60f350fd`, which includes fixed-source timestamps +and deterministic layer order, rather than assuming the old released binary has +those behaviors. It checks out the exact release/PR-head SHA, suffixes revisions +with that SHA, and uses separate `-pr` private repositories for previews. +Runtime-image references remain separate from the private staging project. +In-flight publication is not cancelled when a newer run arrives. + +The existing direct script mode remains available for local Harbor bootstrap; +neither CI caller selects it. CI still uses the one explicit catalog and its +category barrier. Categories go into the publisher's private staging project; +final revisions embed their own presentation metadata. + +## Rollout prerequisites (no remote changes performed) + +Before enabling the draft: + +1. Deploy matching Core/runtime lifecycle changes through their normal CI. +2. Create a normal dedicated Team account and issue a private-project robot + through the normal registry-credentials flow. Do not reuse the old admin or + public-project robot. +3. Create `scroll-release` and `scroll-preview` GitHub environments. Require + approval of the exact source commit and disable self-approval. Restrict release + deployment branches/tags to the reviewed release sources. Preview approval + must cover source code that will receive the dedicated preview credentials. +4. Put `GO_REPO_TOKEN` (read-only CLI source access), `SCROLL_TEAM_EMAIL`, + `SCROLL_TEAM_PASSWORD`, `SCROLL_TEAM_REGISTRY_USER` and + `SCROLL_TEAM_REGISTRY_PASSWORD` in those environments, not validation jobs. + Set environment variables `SCROLL_LIFECYCLE_URL`, `SCROLL_AUTH_URL`, + `SCROLL_LIFECYCLE_OWNER` and scheme-less `SCROLL_REGISTRY_HOST`. +5. Only after checking protections and deployed dependencies, set the environment + variable `SCROLL_LIFECYCLE_READY=true`. A missing/false value fails the job; + it does not skip publication successfully or fall back to direct pushes. +6. Review branch-protection required-check names after the shared-workflow change, + and run the first approved preview/release with fresh credentials. + +Workflow YAML names an environment but does not create its required-reviewer +policy. Environment secrets belong to the called job, as described in +[GitHub's reusable-workflow documentation](https://docs.github.com/en/actions/how-tos/reuse-automations/reuse-workflows#using-inputs-and-secrets-in-a-reusable-workflow). ## Contract @@ -59,6 +109,25 @@ lifecycle PRs must be deployed before enabling the workflows. ## Verification +- Recovery on 2026-10-03 reconstructed the latest retained changes from session + history in `druid-local/.worktrees/scroll-lifecycle/scrolls`, on the local + branch `recovery/scroll-lifecycle-20261003`. Publisher, UI-staging and workflow + suites pass freshly, as do workflow validation and actionlint. The earlier + live acceptance results below are historical, not rerun during recovery. +- Local workflow syntax checks pass with actionlint v1.7.7 (ShellCheck disabled). + Publisher, UI-staging and workflow-validator Go suites pass together. + Twelve workflow mutation cases reject missing cutover guards; executing the + actual provisioning guard proves unset/false/uppercase values fail and only + `true` passes. The guard must precede every other publication-job step. + Independent spec/standards review found no blocking defects; the standards + review prompted the executable provisioning-guard regression test. + This verifies the local draft, not GitHub environment protection or live CI. +- `go test ./scripts/publish-lifecycle -run '^TestPushScript' -count=3`: + passes (37.753s). The real `push.sh` runs against offline boundaries, covering + all category/artifact calls, immutable timestamp/tag inputs, separate runtime + image namespace, lifecycle artifact concurrency, category barrier, preflight + rejection before mutation and complete job reaping after a publisher failure. + This does not exercise live Core or prove that CI selects lifecycle mode. - Go publisher tests cover shared private/public operations, immutable staging, expected-owner rejection before push, failed-push isolation, separate private preview identity, explicit review, fresh JWTs and redirect credential isolation. diff --git a/scripts/publish-lifecycle/push_script_test.go b/scripts/publish-lifecycle/push_script_test.go new file mode 100644 index 00000000..e4cd4638 --- /dev/null +++ b/scripts/publish-lifecycle/push_script_test.go @@ -0,0 +1,174 @@ +package main + +import ( + "os" + "os/exec" + "path/filepath" + "strconv" + "strings" + "testing" +) + +// Exercise the real catalog/pool with an offline publisher boundary. Publisher +// HTTP/auth behavior is covered separately in main_test.go; no registry is used. +func TestPushScriptUsesLifecycleForEveryArtifact(t *testing.T) { + for _, jobs := range []string{"1", "3"} { + t.Run("jobs-"+jobs, func(t *testing.T) { + state, run := lifecycleScriptFixture(t, jobs) + if output, err := run(); err != nil { + t.Fatalf("push script: %v\n%s", err, output) + } + calls := readFixture(t, filepath.Join(state, "publisher.log")) + events := readFixture(t, filepath.Join(state, "events.log")) + starts, active, peak := 0, 0, 0 + for _, line := range strings.Split(events, "\n") { + if strings.HasPrefix(line, "start artifact ") { + starts++ + active++ + if active > peak { + peak = active + } + } + if strings.HasPrefix(line, "end artifact ") { + active-- + } + } + expected, categories := catalogCounts(t) + if starts == 0 || starts != expected || len(strings.Split(strings.TrimSpace(calls), "\n")) != starts { + t.Fatalf("not every catalog artifact used the lifecycle publisher: %d starts\n%s", starts, calls) + } + for _, line := range strings.Split(strings.TrimSpace(calls), "\n") { + fields := strings.Fields(line) + if len(fields) < 2 || fields[0] != "1700000000" || !strings.HasPrefix(fields[1], "registry.invalid/fixture-owner/") || !strings.HasSuffix(fields[1], "-commit") { + t.Fatalf("unstable timestamp or wrong staging reference: %s", line) + } + if strings.Contains(line, " -i ") && !strings.Contains(line, " -i registry.invalid/druid-team/druid:") { + t.Fatalf("runtime image was redirected into private staging: %s", line) + } + } + if strings.Count(events, "start category ") != categories || strings.Count(events, "end category ") != categories || + strings.LastIndex(events, "end category ") < 0 || strings.LastIndex(events, "end category ") > strings.Index(events, "start artifact ") { + t.Fatal("lifecycle artifacts started before category completion") + } + if readFixture(t, filepath.Join(state, "active")) != "0\n" { + t.Fatal("publisher children remain active") + } + limit, _ := strconv.Atoi(jobs) + if active != 0 || peak < 1 || peak > limit || (limit > 1 && peak < 2) { + t.Fatalf("lifecycle artifact concurrency = %d, configured = %d, active = %d", peak, limit, active) + } + }) + } +} + +func TestPushScriptFailsBeforeMutationWhenLifecyclePreflightFails(t *testing.T) { + state, run := lifecycleScriptFixture(t, "3", "FAKE_PREFLIGHT_FAIL=1") + if output, err := run(); err == nil { + t.Fatalf("failed preflight accepted: %s", output) + } + for _, name := range []string{"events.log", "publisher.log", "login"} { + if _, err := os.Stat(filepath.Join(state, name)); !os.IsNotExist(err) { + t.Fatalf("failed preflight reached %s: %v", name, err) + } + } +} + +func TestPushScriptReapsLifecycleFailures(t *testing.T) { + state, run := lifecycleScriptFixture(t, "3", "FAKE_DRUID_FAIL_REF=registry.invalid/fixture-owner/scroll-minecraft-spigot:1.17-commit") + if output, err := run(); err == nil { + t.Fatalf("failed lifecycle artifact accepted: %s", output) + } + events := readFixture(t, filepath.Join(state, "events.log")) + expected, _ := catalogCounts(t) + if strings.Count(events, "start artifact ") != expected { + t.Fatal("lifecycle failure abandoned unstarted catalog artifacts") + } + if strings.Count(events, "start artifact ") != strings.Count(events, "end artifact ") || readFixture(t, filepath.Join(state, "active")) != "0\n" { + t.Fatal("lifecycle failure abandoned active publisher jobs") + } + if !strings.Contains(events, "status=23") { + t.Fatal("fixture did not exercise the publisher failure") + } +} + +func lifecycleScriptFixture(t *testing.T, jobs string, extra ...string) (string, func() ([]byte, error)) { + t.Helper() + root, err := filepath.Abs("../..") + if err != nil { + t.Fatal(err) + } + state := t.TempDir() + bin := filepath.Join(state, "bin") + if err := os.Mkdir(bin, 0700); err != nil { + t.Fatal(err) + } + stubs := map[string]string{ + "go": `#!/usr/bin/env bash +set -euo pipefail +[[ "$1" == run && "$2" == ./scripts/publish-lifecycle ]] || exit 91 +if [[ "$3" == preflight ]]; then + [[ "${FAKE_PREFLIGHT_FAIL:-0}" != 1 ]] || exit 92 + touch "$FAKE_DRUID_STATE_DIR/preflight" + exit 0 +fi +[[ -f "$FAKE_DRUID_STATE_DIR/preflight" && "$3" == -- && "$4" == "$DRUID_BIN" && "$5" == push && "$6" != category ]] || exit 93 +printf '%s %s %s\n' "$SOURCE_DATE_EPOCH" "$6" "$*" >> "$FAKE_DRUID_STATE_DIR/publisher.log" +shift 4 +exec bash "$FAKE_DRUID_SOURCE" "$@" +`, + "druid": `#!/usr/bin/env bash +set -euo pipefail +[[ -f "$FAKE_DRUID_STATE_DIR/preflight" ]] || exit 94 +if [[ "$1" == login ]]; then + touch "$FAKE_DRUID_STATE_DIR/login" + exit 0 +fi +[[ "$1" == push && "$2" == category ]] || exit 95 +exec bash "$FAKE_DRUID_SOURCE" "$@" +`, + } + for name, script := range stubs { + if err := os.WriteFile(filepath.Join(bin, name), []byte(script), 0700); err != nil { + t.Fatal(err) + } + } + return state, func() ([]byte, error) { + cmd := exec.Command("bash", filepath.Join(root, "scripts/push.sh")) + cmd.Dir = root + cmd.Env = append(os.Environ(), "PATH="+bin+":"+os.Getenv("PATH"), "DRUID_BIN="+filepath.Join(bin, "druid"), + "FAKE_DRUID_SOURCE="+filepath.Join(root, "scripts/tests/fixtures/fake-druid.sh"), "FAKE_DRUID_STATE_DIR="+state, + "FAKE_DRUID_SLEEP=0.001", "FAKE_DRUID_FAIL_REF=", "FAKE_PREFLIGHT_FAIL=0", "SCROLL_PUBLISH_MODE=lifecycle", + "SCROLL_PUSH_DRY_RUN=0", "SCROLL_PUSH_UI=0", "SCROLL_PUSH_CATEGORIES=1", "SCROLL_PUSH_ARTIFACTS=1", + "SCROLL_PUSH_JOBS="+jobs, "SCROLL_REGISTRY_HOST=registry.invalid", "SCROLL_REGISTRY_NAMESPACE=fixture-owner", + "SCROLL_REGISTRY_RUNTIME_NAMESPACE=druid-team", "SCROLL_TAG_SUFFIX=-commit", "SOURCE_DATE_EPOCH=1700000000", + "SCROLL_REGISTRY_USER=fixture", "SCROLL_REGISTRY_PASSWORD=fixture", "DRUID_SCROLL_RUNTIME_IMAGE=", "DRUID_SCROLL_STEAMCMD_IMAGE=") + cmd.Env = append(cmd.Env, extra...) + return cmd.CombinedOutput() + } +} + +func readFixture(t *testing.T, path string) string { + t.Helper() + data, err := os.ReadFile(path) + if err != nil { + t.Fatal(err) + } + return string(data) +} + +func catalogCounts(t *testing.T) (artifacts, categories int) { + t.Helper() + for _, line := range strings.Split(readFixture(t, "../push.sh"), "\n") { + if strings.HasPrefix(strings.TrimSpace(line), "run druid push ") { + if strings.Contains(line, "push category ") { + categories++ + } else { + artifacts++ + } + } + } + if artifacts == 0 || categories == 0 { + t.Fatal("fixture could not read the explicit catalog") + } + return +} diff --git a/scripts/tests/push-parallel.test.sh b/scripts/tests/push-parallel.test.sh index a47bbf50..cf856e91 100644 --- a/scripts/tests/push-parallel.test.sh +++ b/scripts/tests/push-parallel.test.sh @@ -110,9 +110,6 @@ fi failure_starts="$(grep -c '^start artifact ' "$tmp_dir/state/events.log")" failure_ends="$(grep -c '^end artifact ' "$tmp_dir/state/events.log")" -if [[ "$failure_starts" != "$expected_artifacts" ]]; then - sed -n '1,12p' "$tmp_dir/failure.err" >&2 -fi assert_equals "$expected_artifacts" "$failure_starts" \ "a job failure must not abandon the remaining queued artifact pushes" assert_equals "$failure_starts" "$failure_ends" \ diff --git a/scripts/validate-release-workflow/lifecycle_workflow.go b/scripts/validate-release-workflow/lifecycle_workflow.go new file mode 100644 index 00000000..b5bb5ae3 --- /dev/null +++ b/scripts/validate-release-workflow/lifecycle_workflow.go @@ -0,0 +1,124 @@ +package main + +import ( + "fmt" + "os" + "path/filepath" + "regexp" + "strings" + + "gopkg.in/yaml.v3" +) + +type lifecycleWorkflow struct { + Jobs map[string]lifecycleJob `yaml:"jobs"` +} + +type lifecycleJob struct { + Uses string `yaml:"uses"` + With map[string]any `yaml:"with"` + Secrets any `yaml:"secrets"` + Env map[string]string `yaml:"env"` + Needs string `yaml:"needs"` + If string `yaml:"if"` + RunsOn string `yaml:"runs-on"` + Environment string `yaml:"environment"` + Concurrency struct { + Cancel bool `yaml:"cancel-in-progress"` + } `yaml:"concurrency"` + Steps []lifecycleStep `yaml:"steps"` +} + +type lifecycleStep struct { + Name string `yaml:"name"` + Uses string `yaml:"uses"` + Run string `yaml:"run"` + Env map[string]string `yaml:"env"` + With map[string]any `yaml:"with"` +} + +// Check the actual CI callers, not only the opt-in helper. Missing credentials +// must never silently select the legacy direct-publication path. +func validateLifecycleWorkflows(directory string) error { + read := func(name string) (lifecycleWorkflow, error) { + var workflow lifecycleWorkflow + data, err := os.ReadFile(filepath.Join(directory, name)) + if err == nil { + err = yaml.Unmarshal(data, &workflow) + } + return workflow, err + } + for file, public := range map[string]bool{"release.yml": true, "pr.yml": false} { + workflow, err := read(file) + if err != nil { + return err + } + job := workflow.Jobs["build-deploy"] + if len(workflow.Jobs) != 1 || job.Uses != "./.github/workflows/scroll-lifecycle.yml" || job.With["public"] != public || job.Secrets != nil { + return fmt.Errorf("%s must call the shared lifecycle with public=%t and no inherited secrets", file, public) + } + } + workflow, err := read("scroll-lifecycle.yml") + if err != nil { + return err + } + verify, publish := workflow.Jobs["verify"], workflow.Jobs["publish"] + if publish.Needs != "verify" || publish.Environment != "${{ inputs.public && 'scroll-release' || 'scroll-preview' }}" || publish.RunsOn != "ubuntu-latest" || publish.Concurrency.Cancel { + return fmt.Errorf("publication requires verification, protected environments, a fresh runner and non-cancelling concurrency") + } + wantCondition := "needs.verify.outputs.changed == 'true' && ((inputs.public && github.event_name != 'pull_request') || (!inputs.public && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository))" + if strings.Join(strings.Fields(publish.If), " ") != wantCondition { + return fmt.Errorf("publication must reject fork PRs and public PR publication") + } + if len(verify.Env) != 0 || len(publish.Env) != 0 { + return fmt.Errorf("lifecycle credentials/configuration must be scoped to steps, not whole jobs") + } + tests, gate, cli, publishCount := false, false, false, 0 + for _, step := range verify.Steps { + if strings.Contains(step.Run, "go test ./scripts/publish-lifecycle ./scripts/stage-scroll-ui ./scripts/validate-release-workflow") { + tests = true + } + for _, value := range step.Env { + if strings.Contains(value, "secrets.") { + return fmt.Errorf("validation must not receive publication secrets") + } + } + } + for index, step := range publish.Steps { + if step.Name == "Require provisioned lifecycle environment" && step.Env["LIFECYCLE_READY"] == "${{ vars.SCROLL_LIFECYCLE_READY }}" && strings.Contains(step.Run, "exit 1") { + if index != 0 { + return fmt.Errorf("provisioning gate must precede every publication job step") + } + gate = true + } + if step.With["repository"] == "highcard-dev/druid-cli" { + ref, _ := step.With["ref"].(string) + cli = regexp.MustCompile(`^[a-f0-9]{40}$`).MatchString(ref) && step.With["persist-credentials"] == false + } + if step.Run != "bash ./scripts/push.sh" { + continue + } + publishCount++ + for name, want := range map[string]string{ + "SCROLL_PUBLISH_MODE": "lifecycle", + "SCROLL_REGISTRY_NAMESPACE": "${{ vars.SCROLL_LIFECYCLE_OWNER }}", + "SCROLL_REGISTRY_RUNTIME_NAMESPACE": "druid-team", + "SCROLL_REGISTRY_USER": "${{ secrets.SCROLL_TEAM_REGISTRY_USER }}", + "SCROLL_REGISTRY_PASSWORD": "${{ secrets.SCROLL_TEAM_REGISTRY_PASSWORD }}", + "SCROLL_TEAM_EMAIL": "${{ secrets.SCROLL_TEAM_EMAIL }}", + "SCROLL_TEAM_PASSWORD": "${{ secrets.SCROLL_TEAM_PASSWORD }}", + "SCROLL_TAG_SUFFIX": "-${{ github.event.pull_request.head.sha || github.sha }}", + "SCROLL_LIFECYCLE_REPOSITORY_SUFFIX": "${{ github.event_name == 'pull_request' && format('-pr{0}', github.event.pull_request.number) || '' }}", + "SCROLL_LIFECYCLE_PUBLISH": "${{ inputs.public && '1' || '0' }}", + "SCROLL_LIFECYCLE_REVIEWED": "${{ inputs.public && '1' || '0' }}", + } { + if step.Env[name] != want { + return fmt.Errorf("lifecycle publication has incorrect %s", name) + } + } + } + if !tests || !gate || !cli || publishCount != 1 { + return fmt.Errorf("shared workflow needs publisher tests, provisioning gate, pinned CLI and one lifecycle catalog call") + } + return nil +} diff --git a/scripts/validate-release-workflow/lifecycle_workflow_test.go b/scripts/validate-release-workflow/lifecycle_workflow_test.go new file mode 100644 index 00000000..1505a330 --- /dev/null +++ b/scripts/validate-release-workflow/lifecycle_workflow_test.go @@ -0,0 +1,95 @@ +package main + +import ( + "context" + "os" + "os/exec" + "path/filepath" + "strings" + "testing" + "time" + + "gopkg.in/yaml.v3" +) + +func TestLifecycleWorkflows(t *testing.T) { + if err := validateLifecycleWorkflows("../../.github/workflows"); err != nil { + t.Fatal(err) + } +} + +func TestLifecycleProvisioningGate(t *testing.T) { + data, err := os.ReadFile("../../.github/workflows/scroll-lifecycle.yml") + if err != nil { + t.Fatal(err) + } + var workflow lifecycleWorkflow + if err := yaml.Unmarshal(data, &workflow); err != nil { + t.Fatal(err) + } + steps := workflow.Jobs["publish"].Steps + if len(steps) == 0 || steps[0].Name != "Require provisioned lifecycle environment" { + t.Fatal("provisioning gate must run before checkout or any credential-bearing step") + } + for _, value := range []string{"", "false", "TRUE", "true"} { + t.Run("ready="+value, func(t *testing.T) { + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + command := exec.CommandContext(ctx, "bash", "-eo", "pipefail", "-c", steps[0].Run) + command.Env = []string{"PATH=" + os.Getenv("PATH")} + if value != "" { + command.Env = append(command.Env, "LIFECYCLE_READY="+value) + } + output, err := command.CombinedOutput() + if ctx.Err() != nil { + t.Fatal(ctx.Err()) + } + if value == "true" { + if err != nil { + t.Fatalf("provisioned environment rejected: %v: %s", err, output) + } + } else if exit, ok := err.(*exec.ExitError); !ok || exit.ExitCode() != 1 { + t.Fatalf("unprovisioned environment must exit 1: %v: %s", err, output) + } + }) + } +} + +func TestLifecycleWorkflowRejectsMissingCutoverGuards(t *testing.T) { + for name, change := range map[string][3]string{ + "legacy caller": {"release.yml", "./.github/workflows/scroll-lifecycle.yml", "./.github/workflows/legacy.yml"}, + "public preview": {"pr.yml", "public: false", "public: true"}, + "direct fallback": {"scroll-lifecycle.yml", "SCROLL_PUBLISH_MODE: lifecycle", "SCROLL_PUBLISH_MODE: direct"}, + "mutable revision": {"scroll-lifecycle.yml", "SCROLL_TAG_SUFFIX: -${{ github.event.pull_request.head.sha || github.sha }}", "SCROLL_TAG_SUFFIX: -latest"}, + "public preview repository": {"scroll-lifecycle.yml", "format('-pr{0}', github.event.pull_request.number) || ''", "''"}, + "admin credential fallback": {"scroll-lifecycle.yml", "secrets.SCROLL_TEAM_REGISTRY_USER", "secrets.SCROLL_REGISTRY_USER"}, + "fork publication": {"scroll-lifecycle.yml", "github.event.pull_request.head.repo.full_name == github.repository", "true"}, + "no review environment": {"scroll-lifecycle.yml", "environment: ${{ inputs.public && 'scroll-release' || 'scroll-preview' }}", "environment: production"}, + "mutable CLI": {"scroll-lifecycle.yml", "a9f5dd9ec361ee5b268dfa5b5c2a56ef60f350fd", "master"}, + "cancel mutation": {"scroll-lifecycle.yml", "cancel-in-progress: false", "cancel-in-progress: true"}, + "skip publisher tests": {"scroll-lifecycle.yml", "go test ./scripts/publish-lifecycle", "go test ./scripts/prebuild"}, + "late provisioning gate": {"scroll-lifecycle.yml", " - name: Require provisioned lifecycle environment", " - run: echo premature-step\n - name: Require provisioned lifecycle environment"}, + } { + t.Run(name, func(t *testing.T) { + dir := t.TempDir() + for _, file := range []string{"release.yml", "pr.yml", "scroll-lifecycle.yml"} { + data, err := os.ReadFile(filepath.Join("../../.github/workflows", file)) + if err != nil { + t.Fatal(err) + } + if file == change[0] { + if !strings.Contains(string(data), change[1]) { + t.Fatal("mutation did not match workflow") + } + data = []byte(strings.Replace(string(data), change[1], change[2], 1)) + } + if err := os.WriteFile(filepath.Join(dir, file), data, 0600); err != nil { + t.Fatal(err) + } + } + if err := validateLifecycleWorkflows(dir); err == nil { + t.Fatal("unsafe workflow contract accepted") + } + }) + } +} diff --git a/scripts/validate-release-workflow/main.go b/scripts/validate-release-workflow/main.go index d0796d05..92c5fd0a 100644 --- a/scripts/validate-release-workflow/main.go +++ b/scripts/validate-release-workflow/main.go @@ -33,6 +33,10 @@ func main() { fmt.Fprintln(os.Stderr, "Error:", err) os.Exit(1) } + if err := validateLifecycleWorkflows(".github/workflows"); err != nil { + fmt.Fprintln(os.Stderr, "Error:", err) + os.Exit(1) + } } func validateReleaseWorkflow(path string) error { From bf621d5987fce2fd108a269a7a08231329ee7cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Schottst=C3=A4dt?= Date: Thu, 22 Oct 2026 19:08:54 +0200 Subject: [PATCH 03/11] fix(publish): use current owner publication API --- .github/workflows/scroll-lifecycle.yml | 54 ++-- docs/shared-lifecycle-publication.md | 231 +++++--------- .../local_integration_test.go | 206 ------------- scripts/publish-lifecycle/main.go | 266 ----------------- scripts/publish-lifecycle/main_test.go | 218 -------------- scripts/publish-lifecycle/push_script_test.go | 174 ----------- scripts/publish-owned/main.go | 281 ++++++++++++++++++ scripts/publish-owned/main_test.go | 170 +++++++++++ scripts/push.sh | 56 +++- scripts/tests/push-parallel.test.sh | 15 + .../lifecycle_workflow.go | 42 ++- .../lifecycle_workflow_test.go | 12 +- 12 files changed, 648 insertions(+), 1077 deletions(-) delete mode 100644 scripts/publish-lifecycle/local_integration_test.go delete mode 100644 scripts/publish-lifecycle/main.go delete mode 100644 scripts/publish-lifecycle/main_test.go delete mode 100644 scripts/publish-lifecycle/push_script_test.go create mode 100644 scripts/publish-owned/main.go create mode 100644 scripts/publish-owned/main_test.go diff --git a/.github/workflows/scroll-lifecycle.yml b/.github/workflows/scroll-lifecycle.yml index 592812a9..115794b8 100644 --- a/.github/workflows/scroll-lifecycle.yml +++ b/.github/workflows/scroll-lifecycle.yml @@ -36,8 +36,8 @@ jobs: run: make build-tree - name: Validate catalog and UI run: go run ./scripts/validate-release-workflow && go run ./scripts/validate-scrolls.go && bash ./scripts/validate_ui_coverage.sh - - name: Test lifecycle publication - run: go test ./scripts/publish-lifecycle ./scripts/stage-scroll-ui ./scripts/validate-release-workflow -count=1 + - name: Test direct publication support + run: go test ./scripts/stage-scroll-ui ./scripts/validate-release-workflow ./scripts/publish-owned -count=1 - name: Test bounded catalog publication run: bash ./scripts/tests/push-parallel.test.sh - name: Check release inputs @@ -59,7 +59,7 @@ jobs: needs.verify.outputs.changed == 'true' && ((inputs.public && github.event_name != 'pull_request') || (!inputs.public && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) - # A fresh runner keeps Team credentials out of the untrusted validation job. + # A fresh runner keeps publisher credentials out of the untrusted validation job. runs-on: ubuntu-latest timeout-minutes: 360 environment: ${{ inputs.public && 'scroll-release' || 'scroll-preview' }} @@ -72,7 +72,7 @@ jobs: LIFECYCLE_READY: ${{ vars.SCROLL_LIFECYCLE_READY }} run: | if [[ "$LIFECYCLE_READY" != "true" ]]; then - echo "Configure the protected Team lifecycle environment before publication." >&2 + echo "Configure the protected lifecycle environment before publication." >&2 exit 1 fi - uses: actions/checkout@v4 @@ -110,21 +110,39 @@ jobs: run: make build-tree - name: Validate with pinned CLI run: ./scripts/validate_all_scrolls.sh && bash ./scripts/validate_ui_coverage.sh - - name: Publish through shared lifecycle + - name: Push to publisher-owned registry repositories env: - SCROLL_PUBLISH_MODE: lifecycle + SCROLL_REGISTRY_HOST: ${{ vars.SCROLL_REGISTRY_HOST }} + SCROLL_OWNER_ID: ${{ vars.SCROLL_OWNER_ID }} + SCROLL_REGISTRY_RUNTIME_NAMESPACE: ${{ vars.SCROLL_REGISTRY_RUNTIME_NAMESPACE || 'druid-team' }} + # Owner revisions embed presentation; category-only OCI artifacts are + # not Scroll revisions and must not enter a publication snapshot. + SCROLL_PUSH_CATEGORIES: '0' + DRUID_SCROLL_RUNTIME_IMAGE: ${{ vars.DRUID_SCROLL_RUNTIME_IMAGE }} + DRUID_SCROLL_STEAMCMD_IMAGE: ${{ vars.DRUID_SCROLL_STEAMCMD_IMAGE }} + SCROLL_REGISTRY_USER: ${{ secrets.SCROLL_REGISTRY_USER }} + SCROLL_REGISTRY_PASSWORD: ${{ secrets.SCROLL_REGISTRY_PASSWORD }} + SCROLL_PUSH_MANIFEST: ${{ runner.temp }}/scroll-artifacts.txt SCROLL_LIFECYCLE_URL: ${{ vars.SCROLL_LIFECYCLE_URL }} SCROLL_AUTH_URL: ${{ vars.SCROLL_AUTH_URL }} - SCROLL_LIFECYCLE_OWNER: ${{ vars.SCROLL_LIFECYCLE_OWNER }} - SCROLL_REGISTRY_HOST: ${{ vars.SCROLL_REGISTRY_HOST }} - SCROLL_REGISTRY_NAMESPACE: ${{ vars.SCROLL_LIFECYCLE_OWNER }} - SCROLL_REGISTRY_RUNTIME_NAMESPACE: druid-team - SCROLL_REGISTRY_USER: ${{ secrets.SCROLL_TEAM_REGISTRY_USER }} - SCROLL_REGISTRY_PASSWORD: ${{ secrets.SCROLL_TEAM_REGISTRY_PASSWORD }} - SCROLL_TEAM_EMAIL: ${{ secrets.SCROLL_TEAM_EMAIL }} - SCROLL_TEAM_PASSWORD: ${{ secrets.SCROLL_TEAM_PASSWORD }} + SCROLL_PUBLISH_EMAIL: ${{ secrets.SCROLL_PUBLISH_EMAIL }} + SCROLL_PUBLISH_PASSWORD: ${{ secrets.SCROLL_PUBLISH_PASSWORD }} + SCROLL_LIFECYCLE_REVIEWED: ${{ vars.SCROLL_LIFECYCLE_REVIEWED }} + SCROLL_PUBLIC: ${{ inputs.public && '1' || '0' }} SCROLL_TAG_SUFFIX: -${{ github.event.pull_request.head.sha || github.sha }} - SCROLL_LIFECYCLE_REPOSITORY_SUFFIX: ${{ github.event_name == 'pull_request' && format('-pr{0}', github.event.pull_request.number) || '' }} - SCROLL_LIFECYCLE_PUBLISH: ${{ inputs.public && '1' || '0' }} - SCROLL_LIFECYCLE_REVIEWED: ${{ inputs.public && '1' || '0' }} - run: bash ./scripts/push.sh + run: | + set -euo pipefail + for name in SCROLL_REGISTRY_HOST SCROLL_OWNER_ID SCROLL_REGISTRY_USER SCROLL_REGISTRY_PASSWORD; do + if [[ -z "${!name}" ]]; then + echo "Missing required publisher setting: $name" >&2 + exit 1 + fi + done + if [[ "$SCROLL_PUBLIC" == "1" ]]; then + go run ./scripts/publish-owned preflight + fi + : > "$SCROLL_PUSH_MANIFEST" + bash ./scripts/push.sh + if [[ "$SCROLL_PUBLIC" == "1" ]]; then + go run ./scripts/publish-owned publish + fi diff --git a/docs/shared-lifecycle-publication.md b/docs/shared-lifecycle-publication.md index fd52626f..afe201da 100644 --- a/docs/shared-lifecycle-publication.md +++ b/docs/shared-lifecycle-publication.md @@ -1,161 +1,74 @@ # Shared authored-release publication -The local workflow draft routes release and PR publication through the shared -lifecycle. This is a local-only recovery; it has not been pushed or run on GitHub. -Dedicated Team -identity/credentials and protected GitHub environments are not provisioned. -Do not treat this as deployed or as complete product acceptance. - -## Local CI cutover draft - -`release.yml` and `pr.yml` call `scroll-lifecycle.yml`; neither retains a direct -registry publication fallback. The shared workflow validates/builds UI, checks -the catalog and runs publisher/staging/workflow tests without Team secrets. -Publication then uses a fresh runner and the protected `scroll-release` or -`scroll-preview` environment. Fork PRs validate but never enter publication. - -The publication job builds CLI commit -`a9f5dd9ec361ee5b268dfa5b5c2a56ef60f350fd`, which includes fixed-source timestamps -and deterministic layer order, rather than assuming the old released binary has -those behaviors. It checks out the exact release/PR-head SHA, suffixes revisions -with that SHA, and uses separate `-pr` private repositories for previews. -Runtime-image references remain separate from the private staging project. -In-flight publication is not cancelled when a newer run arrives. - -The existing direct script mode remains available for local Harbor bootstrap; -neither CI caller selects it. CI still uses the one explicit catalog and its -category barrier. Categories go into the publisher's private staging project; -final revisions embed their own presentation metadata. - -## Rollout prerequisites (no remote changes performed) - -Before enabling the draft: - -1. Deploy matching Core/runtime lifecycle changes through their normal CI. -2. Create a normal dedicated Team account and issue a private-project robot - through the normal registry-credentials flow. Do not reuse the old admin or - public-project robot. -3. Create `scroll-release` and `scroll-preview` GitHub environments. Require - approval of the exact source commit and disable self-approval. Restrict release - deployment branches/tags to the reviewed release sources. Preview approval - must cover source code that will receive the dedicated preview credentials. -4. Put `GO_REPO_TOKEN` (read-only CLI source access), `SCROLL_TEAM_EMAIL`, - `SCROLL_TEAM_PASSWORD`, `SCROLL_TEAM_REGISTRY_USER` and - `SCROLL_TEAM_REGISTRY_PASSWORD` in those environments, not validation jobs. - Set environment variables `SCROLL_LIFECYCLE_URL`, `SCROLL_AUTH_URL`, - `SCROLL_LIFECYCLE_OWNER` and scheme-less `SCROLL_REGISTRY_HOST`. -5. Only after checking protections and deployed dependencies, set the environment - variable `SCROLL_LIFECYCLE_READY=true`. A missing/false value fails the job; - it does not skip publication successfully or fall back to direct pushes. -6. Review branch-protection required-check names after the shared-workflow change, - and run the first approved preview/release with fresh credentials. - -Workflow YAML names an environment but does not create its required-reviewer -policy. Environment secrets belong to the called job, as described in -[GitHub's reusable-workflow documentation](https://docs.github.com/en/actions/how-tos/reuse-automations/reuse-workflows#using-inputs-and-secrets-in-a-reusable-workflow). - -## Contract - -`scripts/push.sh` remains the single explicit catalog and retains its category -barrier, serial default and bounded concurrency. `SCROLL_PUBLISH_MODE=lifecycle` -adds the shared Core policy after each rendered artifact push: - -1. Verify the authenticated publisher's private project against the configured - owner and registry. Reject admin/public-project registry credentials. -2. Render/stage the existing Scroll and private UI. Include inherited family - `.meta` in the revision, not just a mutable category artifact. -3. Push into that private project with a cryptographically unique staging tag. -4. Resolve that tag once, then import its immutable digest through Core. -5. Core applies canonical identity before hashing, verifies final bytes, handles - immutable-tag conflicts and refreshes the catalog under its repository lock. -6. When explicitly reviewed, publish through the same repository-wide operation - used by customers. No public-registry credentials or Team bypass are involved. - -The source staging artifact is retained. Backup snapshots are rejected by the -authored-release endpoint; they must use backup promotion with provenance. - -## Configuration contract (not provisioned) - -- `SCROLL_LIFECYCLE_URL`: trusted Core base URL, including `/core` at the gateway. -- `SCROLL_LIFECYCLE_OWNER`: identity ID of the dedicated publisher account. -- `SCROLL_REGISTRY_HOST`: scheme-less configured Harbor host. -- `SCROLL_REGISTRY_NAMESPACE`: must equal that identity ID (private staging). -- `SCROLL_REGISTRY_USER` / `SCROLL_REGISTRY_PASSWORD`: robot credential belonging - to that private project, issued by the normal account registry-credential flow. -- `SCROLL_AUTH_URL`, `SCROLL_TEAM_EMAIL`, `SCROLL_TEAM_PASSWORD`: normal dedicated - account sign-in. Auth must have the same trusted origin as Core. Session cookies - stay in memory, owner JWTs refresh before lifecycle calls, and sign-out is - attempted at exit. Auth credentials are not passed to the renderer subprocess. -- Alternatively `SCROLL_LIFECYCLE_TOKEN`: a fresh externally supplied owner JWT; - expiration fails closed. Never commit or print credentials. -- `SCROLL_REGISTRY_RUNTIME_NAMESPACE=druid-team`: keeps runtime images separate - from the private staging project. -- `SCROLL_TAG_SUFFIX=-`: immutable revision names for repeatable CI. - Reusing a tag with changed content is a conflict, not an overwrite. -- Lifecycle mode sets `SOURCE_DATE_EPOCH` from the checked-out commit unless - explicitly supplied. The matching CLI must support it and deterministic root - layer ordering: otherwise identical rebuilds correctly conflict as different - manifest bytes. -- `SCROLL_LIFECYCLE_PUBLISH=1` plus `SCROLL_LIFECYCLE_REVIEWED=1`: explicitly - reviewed public publication. Without publish, imports remain private unless - the destination was already public, in which case unreviewed import fails. -- `SCROLL_LIFECYCLE_REPOSITORY_SUFFIX=-pr`: **separate private preview - repositories**. A PR tag in an already-public release repository is not private. - -Keep secrets restricted to trusted publication jobs and require a release review -gate. No production account, robot, GitHub secret, or environment has been created -by this implementation. Both Core import support and the matching runtime/server -lifecycle PRs must be deployed before enabling the workflows. - -## Verification - -- Recovery on 2026-10-03 reconstructed the latest retained changes from session - history in `druid-local/.worktrees/scroll-lifecycle/scrolls`, on the local - branch `recovery/scroll-lifecycle-20261003`. Publisher, UI-staging and workflow - suites pass freshly, as do workflow validation and actionlint. The earlier - live acceptance results below are historical, not rerun during recovery. -- Local workflow syntax checks pass with actionlint v1.7.7 (ShellCheck disabled). - Publisher, UI-staging and workflow-validator Go suites pass together. - Twelve workflow mutation cases reject missing cutover guards; executing the - actual provisioning guard proves unset/false/uppercase values fail and only - `true` passes. The guard must precede every other publication-job step. - Independent spec/standards review found no blocking defects; the standards - review prompted the executable provisioning-guard regression test. - This verifies the local draft, not GitHub environment protection or live CI. -- `go test ./scripts/publish-lifecycle -run '^TestPushScript' -count=3`: - passes (37.753s). The real `push.sh` runs against offline boundaries, covering - all category/artifact calls, immutable timestamp/tag inputs, separate runtime - image namespace, lifecycle artifact concurrency, category barrier, preflight - rejection before mutation and complete job reaping after a publisher failure. - This does not exercise live Core or prove that CI selects lifecycle mode. -- Go publisher tests cover shared private/public operations, immutable staging, - expected-owner rejection before push, failed-push isolation, separate private - preview identity, explicit review, fresh JWTs and redirect credential isolation. -- Metadata staging tests check inherited presentation and the existing private UI. -- `SCROLL_PUSH_UI=0 bash scripts/tests/push-parallel.test.sh`: passed. -- Full staging-enabled concurrency run: passed, 18 categories / 127 artifacts. - One earlier run during concurrent edits stopped early (47 artifacts); its - original staging error was not retained. The rerun passed without a pool fix; - do not misreport that earlier result as a diagnosed production defect. -- Core shared policy/adapter/schema tests and real local Harbor/Postgres tests - cover authored imports, immutable conflicts, public review guards, byte - preservation and private staging. See the monorepo verification document. -- Authenticated helper → local gateway/auth → live Core → Harbor acceptance - passed in 7.10s, including private import, an identical digest on rebuild, - shared publication and anonymous visibility. The fixture's robot, projects, - catalog row, auth account/session and development credit were cleaned up. - Four retained fixtures from earlier diagnosis attempts were also removed with - exact identity/name/email guards. CI credential provisioning and rollout are - still outstanding; no production account or registry was touched. -- Earlier live failures identified fixture username/schema mistakes and a real - ORAS creation-timestamp reproducibility gap. The timestamp fix preserves - immutable-tag conflicts rather than weakening them. -- Subsequent retry failures exposed nondeterministic root-layer ordering in the - CLI. A focused real OCI push regression reproduced it in 0.08s; sorting the - discovered paths fixed the byte difference without weakening conflict checks. - The final live test explicitly signs out after signup and signs back in with - the dedicated fixture account. Three consecutive runs passed (8.53s, 6.25s, - 6.16s), including exact retry, publication, anonymous visibility and cleanup. - -On interruption, inspect final registry state before retrying. A disconnected -HTTP request does not prove that an import or publication was rolled back. +## Current contract + +Release and PR workflows use the same explicit catalog in `scripts/push.sh`. +They push directly to `//:`; there is +no staging/import API. Core publishes reviewed revisions by copying an exact +snapshot into the owner's public username project. The private source remains. +See the monorepo's `docs/scroll-lifecycle-api-cutover.md` for the Core contract. + +1. Validate and build without publication credentials. +2. Enter a fresh runner and protected `scroll-release` or `scroll-preview` + environment. Fork PRs never publish; a missing readiness gate fails closed. +3. Build the pinned lifecycle-capable CLI and the Scroll UI. +4. Push owner-scoped revisions tagged with the source commit. Runtime images + stay in a separate namespace. Revisions embed presentation; category-only + artifacts are excluded from owner publication. +5. For public releases, `publish-owned` authenticates as the owner, fetches + each repository's publication preview, verifies every pushed tag against + that preview, and submits it unchanged as `expectedSnapshot`. +6. Core rejects changed content. The helper does not automatically retry + conflicts or replace pending operation intent; inspect and use the current + manual recovery flow before retrying. + +Public publication approves the complete repository, not only the latest CI +tag. Use separate release and preview identities/projects. Preview pushes stay +private. Publication does not cancel an in-flight run when another run starts. + +## Configuration + +Provision these through the protected environments, never source control: + +| Setting | Purpose | +| --- | --- | +| `SCROLL_LIFECYCLE_READY=true` | Explicit provisioning gate | +| `SCROLL_OWNER_ID` | Authenticated identity ID naming the private project | +| `SCROLL_REGISTRY_HOST` | Scheme-less Harbor host | +| `SCROLL_REGISTRY_USER`, `SCROLL_REGISTRY_PASSWORD` | Ordinary owner-scoped registry credentials | +| `SCROLL_REGISTRY_RUNTIME_NAMESPACE` | Runtime-image namespace; workflow defaults to `druid-team` | +| `SCROLL_LIFECYCLE_URL`, `SCROLL_AUTH_URL` | Core and Auth URLs sharing the trusted origin | +| `SCROLL_PUBLISH_EMAIL`, `SCROLL_PUBLISH_PASSWORD` | Ordinary publisher sign-in for public publication | +| `SCROLL_LIFECYCLE_REVIEWED=1` | Confirms content review before public publication | +| `GO_REPO_TOKEN` | Read-only access to the pinned CLI source | + +Optional `DRUID_SCROLL_RUNTIME_IMAGE` and `DRUID_SCROLL_STEAMCMD_IMAGE` +override runtime image references. Owner builds use the commit timestamp unless +`SOURCE_DATE_EPOCH` is explicitly set. The workflow sets `SCROLL_PUSH_MANIFEST` +and commit-based `SCROLL_TAG_SUFFIX`; successful pushes populate the manifest. + +`SCROLL_REGISTRY_NAMESPACE` is not a workflow requirement: `SCROLL_OWNER_ID` +determines artifact destinations, and runtime images have their own setting. +The shared push script still supports namespaces and category publication for +local bootstrap. It retains its serial default, bounded parallel option, +category barrier, and failure handling. + +## Rollout and verification + +- Deploy matching Core/runtime contracts through their normal CI. +- Configure protected environments, required reviewers and separate identities + before enabling the readiness gate. Workflow YAML does not provision those + policies. +- Publish a Druid UI package containing `ensureFileService`, + `addAndRunCommand` and `stopCommand` before releasing a consumer that uses + these imports. Local `1000.*` versions and localhost registry URLs are not + release dependencies. +- Run `go test ./scripts/publish-owned ./scripts/stage-scroll-ui ./scripts/validate-release-workflow` + and `bash ./scripts/tests/push-parallel.test.sh`. These test the publisher + contract and catalog; they do not constitute a production publication. +- Verify the first approved preview/release with the provisioned credentials. + Do not weaken approval or readiness gates to make a run green. + +The former staging/import publisher and its tests were replaced. Historical +acceptance results remain in Git history and the monorepo lifecycle audit; +they do not certify this direct-owner publisher or a production rollout. diff --git a/scripts/publish-lifecycle/local_integration_test.go b/scripts/publish-lifecycle/local_integration_test.go deleted file mode 100644 index 1d7a4d67..00000000 --- a/scripts/publish-lifecycle/local_integration_test.go +++ /dev/null @@ -1,206 +0,0 @@ -package main - -import ( - "crypto/rand" - "crypto/sha256" - "encoding/hex" - "encoding/json" - "fmt" - "net/http" - "net/http/cookiejar" - "os" - "os/exec" - "path/filepath" - "regexp" - "strings" - "testing" - "time" -) - -// Opt-in localhost only. Creates an isolated publisher account/project and one -// tiny Scroll. It neither deploys a workload nor consumes shared game ports. -func TestLocalAuthenticatedPublisher(t *testing.T) { - if os.Getenv("SCROLL_LOCAL_LIFECYCLE_TEST") != "1" { - t.Skip("local live stack opt-in") - } - bin := os.Getenv("DRUID_BIN") - if bin == "" { - t.Fatal("DRUID_BIN is required") - } - jar, _ := cookiejar.New(nil) - p := &publisher{base: "http://localhost:3000/api/core", authURL: "http://localhost:3000/api/auth/v2", host: "druid-gs:8088", client: &http.Client{Jar: jar, Timeout: 2 * time.Minute, CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}} - nonce := make([]byte, 16) - if _, err := rand.Read(nonce); err != nil { - t.Fatal(err) - } - suffix := hex.EncodeToString(nonce) - var account struct { - User struct { - ID string `json:"id"` - } `json:"user"` - } - if err := p.authRequest(http.MethodPost, "/sign-up/email", map[string]any{"email": "lifecycle-" + suffix + "@example.invalid", "password": suffix + "-Fixture!", "name": "Local lifecycle acceptance", "username": "lifecycle" + suffix[:12]}, &account); err != nil { - t.Fatal(err) - } - p.owner = account.User.ID - if p.owner == "" { - t.Fatal("signup returned no fixture identity") - } - t.Logf("local fixture identity: %s", p.owner) - t.Cleanup(func() { cleanupLocalPublisher(t, p.owner) }) - t.Cleanup(func() { _ = p.authRequest(http.MethodPost, "/sign-out", map[string]any{}, nil) }) - // Exercise the same normal dedicated-account sign-in used by CI, not just - // the initial signup session returned by fixture setup. - if err := p.authRequest(http.MethodPost, "/sign-out", map[string]any{}, nil); err != nil { - t.Fatal(err) - } - if err := p.authRequest(http.MethodPost, "/sign-in/email", map[string]string{"email": "lifecycle-" + suffix + "@example.invalid", "password": suffix + "-Fixture!"}, nil); err != nil { - t.Fatal(err) - } - if err := p.preflight(); err != nil { - t.Fatal(err) - } - var robot struct { - ID int `json:"id"` - Username string `json:"username"` - Password string `json:"password"` - } - if err := p.request(http.MethodPost, "/v1/registry/credentials", map[string]string{"name": "lifecycle-fixture"}, &robot); err != nil { - t.Fatal(err) - } - t.Cleanup(func() { - if err := p.request(http.MethodDelete, fmt.Sprintf("/v1/registry/credentials/%d", robot.ID), nil, nil); err != nil { - t.Error("fixture credential revocation failed") - } - }) - cliHome := t.TempDir() - run := func(args []string) error { - cmd := exec.Command(args[0], args[1:]...) - for _, value := range os.Environ() { - if !strings.HasPrefix(value, "HOME=") { - cmd.Env = append(cmd.Env, value) - } - } - cmd.Env = append(cmd.Env, "HOME="+cliHome, "DRUID_REGISTRY_PLAIN_HTTP=true", "SOURCE_DATE_EPOCH=0") - output, err := cmd.CombinedOutput() - if err != nil && len(args) > 1 && args[1] != "login" { - // Fixture-only diagnostics: never print auth/login output or full logs. - for _, line := range strings.Split(string(output), "\n") { - if strings.HasPrefix(line, "Error:") { - t.Log(strings.ReplaceAll(strings.ReplaceAll(line, robot.Password, ""), p.token, "")) - } - } - } - return err - } - if err := run([]string{bin, "login", "--host", p.host, "--user", robot.Username, "--password", robot.Password}); err != nil { - t.Fatal("fixture registry login failed") - } - source := t.TempDir() - if err := os.Mkdir(filepath.Join(source, ".meta"), 0755); err != nil { - t.Fatal(err) - } - if err := os.WriteFile(filepath.Join(source, ".meta", "en-US.md"), []byte("---\nname: Local authored fixture\n---\nNo customer content.\n"), 0644); err != nil { - t.Fatal(err) - } - if err := os.WriteFile(filepath.Join(source, "scroll.yaml"), []byte("name: fixture\ndesc: Local authored fixture\nversion: 1.0.0\napp_version: '1.0.0'\ncommands:\n start:\n run: persistent\n procedures:\n - id: fixture\n command: [sleep, '600']\n image: busybox:1.36\n"), 0644); err != nil { - t.Fatal(err) - } - command := []string{bin, "push", p.host + "/" + p.owner + "/example:accepted-fixture", source, "--category", "fixture"} - if err := p.publish(command, run); err != nil { - t.Fatal(err) - } - // Repeat exactly through the real authenticated public operation. It must - // verify the existing finalized bytes, not overwrite the revision tag. - p.public = true - if err := p.publish(command, run); err != nil { - t.Fatal(err) - } - t.Log("authenticated private staging, exact retry and shared publication passed") - // Assert publication through Harbor's public metadata without owner cookies. - projectName := fmt.Sprintf("scroll-%x-example", sha256.Sum256([]byte(p.owner))) - response, err := http.Get("http://druid-gs:8088/api/v2.0/projects?page_size=100&name=" + projectName) - if err != nil { - t.Fatal(err) - } - defer response.Body.Close() - if response.StatusCode != http.StatusOK { - t.Fatal("anonymous public project listing failed") - } - var projects []struct { - Name string `json:"name"` - Metadata struct { - Public string `json:"public"` - } `json:"metadata"` - } - if err := json.NewDecoder(response.Body).Decode(&projects); err != nil { - t.Fatal(err) - } - found := false - for _, project := range projects { - if project.Name == projectName && project.Metadata.Public == "true" { - found = true - } - } - if !found { - t.Fatal("public fixture was not listed") - } -} - -func cleanupLocalPublisher(t *testing.T, owner string) { - t.Helper() - if !regexp.MustCompile(`^[a-f0-9-]{36}$`).MatchString(owner) { - t.Error("invalid fixture owner; cleanup refused") - return - } - fixture := fmt.Sprintf(`SELECT id::text FROM auth."user" WHERE id='%s' AND name='Local lifecycle acceptance' AND email ~ '^lifecycle-[a-f0-9]{32}@example[.]invalid$'`, owner) - verified, err := exec.Command("docker", "exec", "druid-postgres", "psql", "-U", "druid", "-d", "druid", "-At", "-c", fixture).Output() - if err != nil || strings.TrimSpace(string(verified)) != owner { - t.Error("exact local fixture identity could not be verified; cleanup refused") - return - } - canonicalProject := fmt.Sprintf("scroll-%x-example", sha256.Sum256([]byte(owner))) - for _, project := range []string{owner, canonicalProject} { - for _, path := range []string{"/api/v2.0/projects/" + project + "/repositories/example", "/api/v2.0/projects/" + project} { - req, _ := http.NewRequest(http.MethodDelete, "http://druid-gs:8088"+path, nil) - password := os.Getenv("LOCAL_HARBOR_TEST_PASSWORD") - if password == "" { - password = "admin" - } - req.SetBasicAuth("admin", password) - req.Header.Set("X-Is-Resource-Name", "true") - resp, err := http.DefaultClient.Do(req) - if err != nil { - t.Error("local Harbor fixture cleanup failed") - return - } - resp.Body.Close() - if resp.StatusCode != 404 && (resp.StatusCode < 200 || resp.StatusCode >= 300) { - t.Errorf("local Harbor fixture cleanup HTTP %d", resp.StatusCode) - return - } - } - } - // Only this generated fixture identity is eligible. FK failures roll back - // the entire database cleanup; unrelated/user-owned rows are never targeted. - sql := fmt.Sprintf(`BEGIN; -DELETE FROM scroll.repository WHERE user_id::text IN (%s); -DELETE FROM core.ledger_entry WHERE user_id::text IN (%s); -DELETE FROM core."user" WHERE identity_id::text IN (%s); -DELETE FROM auth."user" WHERE id::text IN (%s); -COMMIT;`, fixture, fixture, fixture, fixture) - cmd := exec.Command("docker", "exec", "druid-postgres", "psql", "-U", "druid", "-d", "druid", "-v", "ON_ERROR_STOP=1", "-c", sql) - if err := cmd.Run(); err != nil { - t.Error("fixture database cleanup failed; exact identity retained:", owner) - } -} - -func TestCleanupRetainedLocalPublisherFixtures(t *testing.T) { - ids := os.Getenv("SCROLL_LOCAL_FIXTURE_CLEANUP") - if ids == "" { - t.Skip("explicit retained-fixture IDs required") - } - for _, id := range strings.Split(ids, ",") { - cleanupLocalPublisher(t, id) - } -} diff --git a/scripts/publish-lifecycle/main.go b/scripts/publish-lifecycle/main.go deleted file mode 100644 index 264e6303..00000000 --- a/scripts/publish-lifecycle/main.go +++ /dev/null @@ -1,266 +0,0 @@ -// Publishes the existing explicit catalog through the shared Core lifecycle. -// Registry credentials can write private staging only; Core owns finalization. -package main - -import ( - "bytes" - "context" - "crypto/rand" - "crypto/sha256" - "encoding/hex" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/http/cookiejar" - "net/url" - "os" - "os/exec" - "regexp" - "strings" - "time" -) - -type publisher struct { - base, token, owner, host, repositorySuffix string - public bool - client *http.Client - authURL string -} - -var exact = regexp.MustCompile(`^[^@\s]+@sha256:[a-f0-9]{64}$`) - -func configured() (*publisher, error) { - base := strings.TrimRight(os.Getenv("SCROLL_LIFECYCLE_URL"), "/") - u, err := url.Parse(base) - if err != nil || u.Host == "" || u.User != nil || u.RawQuery != "" || u.Fragment != "" || (u.Scheme != "https" && !(u.Scheme == "http" && (u.Hostname() == "localhost" || u.Hostname() == "127.0.0.1" || u.Hostname() == "druid-gs"))) { - return nil, errors.New("SCROLL_LIFECYCLE_URL must be HTTPS (HTTP allowed only for local development)") - } - p := &publisher{base: base, token: os.Getenv("SCROLL_LIFECYCLE_TOKEN"), owner: os.Getenv("SCROLL_LIFECYCLE_OWNER"), host: os.Getenv("SCROLL_REGISTRY_HOST"), repositorySuffix: os.Getenv("SCROLL_LIFECYCLE_REPOSITORY_SUFFIX"), public: os.Getenv("SCROLL_LIFECYCLE_PUBLISH") == "1", - client: &http.Client{Timeout: 70 * time.Minute, CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}} - if p.owner == "" || p.host == "" || os.Getenv("SCROLL_REGISTRY_NAMESPACE") != p.owner { - return nil, errors.New("expected owner, registry host and matching private staging namespace are required") - } - if p.public && os.Getenv("SCROLL_LIFECYCLE_REVIEWED") != "1" { - return nil, errors.New("public publication requires SCROLL_LIFECYCLE_REVIEWED=1 after content review") - } - // Never reuse production admin/public-project credentials for staging. - if !strings.HasPrefix(os.Getenv("SCROLL_REGISTRY_USER"), "robot$"+p.owner+"+") { - return nil, errors.New("registry credentials must belong to the expected owner's private project") - } - if p.token == "" { - auth, err := url.Parse(strings.TrimRight(os.Getenv("SCROLL_AUTH_URL"), "/")) - if err != nil || auth.Host != u.Host || auth.Scheme != u.Scheme || auth.User != nil || auth.RawQuery != "" || auth.Fragment != "" { - return nil, errors.New("SCROLL_AUTH_URL must use the same trusted origin as Core") - } - email, password := os.Getenv("SCROLL_TEAM_EMAIL"), os.Getenv("SCROLL_TEAM_PASSWORD") - if email == "" || password == "" { - return nil, errors.New("provide a fresh lifecycle token or dedicated Team sign-in credentials") - } - p.authURL = auth.String() - p.client.Jar, _ = cookiejar.New(nil) - if err := p.authRequest(http.MethodPost, "/sign-in/email", map[string]string{"email": email, "password": password}, nil); err != nil { - return nil, err - } - } - return p, nil -} - -// Use normal account sign-in and refreshed JWTs, not a Team-specific auth bypass. -// Session cookies stay in memory and are revoked on exit. -func (p *publisher) authRequest(method, path string, body, out any) error { - data, err := json.Marshal(body) - if err != nil { - return err - } - ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) - defer cancel() - req, err := http.NewRequestWithContext(ctx, method, p.authURL+path, bytes.NewReader(data)) - if err != nil { - return errors.New("invalid auth request") - } - req.Header.Set("Content-Type", "application/json") - if origin, err := url.Parse(p.authURL); err == nil { - req.Header.Set("Origin", origin.Scheme+"://"+origin.Host) - } - resp, err := p.client.Do(req) - if err != nil { - return errors.New("publisher authentication failed") - } - defer resp.Body.Close() - if resp.StatusCode < 200 || resp.StatusCode >= 300 { - var failure struct { - Code string `json:"code"` - } - _ = json.NewDecoder(io.LimitReader(resp.Body, 1024)).Decode(&failure) - if !regexp.MustCompile(`^[A-Z_]{1,64}$`).MatchString(failure.Code) { - failure.Code = "AUTH_FAILED" - } - return fmt.Errorf("publisher authentication rejected: HTTP %d (%s)", resp.StatusCode, failure.Code) - } - if out != nil { - return json.NewDecoder(io.LimitReader(resp.Body, 1024*1024)).Decode(out) - } - return nil -} - -func (p *publisher) request(method, path string, body, out any) error { - if p.authURL != "" { - var jwt struct { - Token string `json:"token"` - } - if err := p.authRequest(http.MethodGet, "/token", nil, &jwt); err != nil { - return err - } - if jwt.Token == "" { - return errors.New("authentication returned no owner JWT") - } - p.token = jwt.Token - } - var data []byte - var err error - if body != nil { - data, err = json.Marshal(body) - if err != nil { - return err - } - } - req, err := http.NewRequest(method, p.base+path, bytes.NewReader(data)) - if err != nil { - return errors.New("invalid lifecycle request") - } - req.Header.Set("Authorization", "Bearer "+p.token) - req.Header.Set("Content-Type", "application/json") - resp, err := p.client.Do(req) - if err != nil { - return errors.New("lifecycle request failed; inspect installed/published state before retrying") - } - defer resp.Body.Close() - if resp.StatusCode < 200 || resp.StatusCode >= 300 { - return fmt.Errorf("lifecycle request rejected: HTTP %d", resp.StatusCode) - } - if out != nil { - return json.NewDecoder(io.LimitReader(resp.Body, 1024*1024)).Decode(out) - } - return nil -} - -func (p *publisher) preflight() error { - var project struct { - Registry string `json:"registry"` - Project string `json:"project"` - } - // The shared operation ensures this is the authenticated actor's PRIVATE - // project. A supplied owner name alone is never treated as authorization. - if err := p.request(http.MethodGet, "/v1/registry/project", nil, &project); err != nil { - return err - } - if project.Registry != p.host || project.Project != p.host+"/"+p.owner { - return errors.New("authenticated identity or registry differs from the expected publisher") - } - return nil -} - -func (p *publisher) publish(command []string, run func([]string) error) error { - if len(command) < 4 || command[1] != "push" || command[2] == "category" { - return errors.New("expected a rendered artifact push command") - } - ref := command[2] - prefix := p.host + "/" + p.owner + "/" - if !strings.HasPrefix(ref, prefix) { - return errors.New("artifact must target the verified private staging project") - } - nameTag := strings.TrimPrefix(ref, prefix) - parts := strings.Split(nameTag, ":") - if len(parts) != 2 || strings.Contains(parts[0], "/") || !regexp.MustCompile(`^[a-z0-9][a-z0-9_-]{0,62}$`).MatchString(parts[0]) || !regexp.MustCompile(`^[\w][\w.-]{0,127}$`).MatchString(parts[1]) { - return errors.New("invalid repository or explicit revision tag") - } - name := parts[0] + p.repositorySuffix - if !regexp.MustCompile(`^[a-z0-9][a-z0-9_-]{0,62}$`).MatchString(name) { - return errors.New("invalid final repository name") - } - if err := p.preflight(); err != nil { - return err - } - nonce := make([]byte, 16) - if _, err := rand.Read(nonce); err != nil { - return err - } - // Each invocation owns its staging tag, so another job cannot replace the - // mutable selection between our push and the single digest resolution. - stagedRef := prefix + parts[0] + ":build-" + hex.EncodeToString(nonce) - stagedCommand := append([]string(nil), command...) - stagedCommand[2] = stagedRef - // Final reusable revisions embed presentation instead of depending on a - // separately mutable category artifact. Staging supplies inherited .meta. - stagedCommand = append(stagedCommand, "--pack-meta") - if err := run(stagedCommand); err != nil { - return err - } - var staged struct { - Artifact string `json:"artifact"` - } - if err := p.request(http.MethodGet, "/v1/registry/scrolls/revision?artifact="+url.QueryEscape(stagedRef), nil, &staged); err != nil { - return err - } - if !exact.MatchString(staged.Artifact) || !strings.HasPrefix(staged.Artifact, prefix+parts[0]+"@") { - return errors.New("resolved staging revision differs from selected repository") - } - var imported struct { - Artifact string `json:"artifact"` - } - input := map[string]any{"repository": name, "tag": parts[1], "releaseArtifact": staged.Artifact, "reviewedPublicContent": p.public} - if err := p.request(http.MethodPost, "/v1/registry/scrolls/releases/import", input, &imported); err != nil { - return err - } - ownerHash := sha256.Sum256([]byte(p.owner)) - canonical := fmt.Sprintf("%s/scroll-%x-%s/%s", p.host, ownerHash, name, name) - if !exact.MatchString(imported.Artifact) || !strings.HasPrefix(imported.Artifact, canonical+"@") { - return errors.New("Core did not return an exact finalized revision") - } - if p.public { - digest := strings.SplitN(imported.Artifact, "@", 2)[1] - if err := p.request(http.MethodPost, "/v1/registry/scrolls/publish", map[string]any{"repository": name, "revision": digest, "reviewedPublicContent": true}, nil); err != nil { - return err - } - } - fmt.Println(imported.Artifact) - return nil -} - -func runPublisher() error { - p, err := configured() - if err == nil && p.authURL != "" { - defer p.authRequest(http.MethodPost, "/sign-out", map[string]any{}, nil) - } - if err == nil { - if len(os.Args) == 2 && os.Args[1] == "preflight" { - err = p.preflight() - } else { - args := os.Args[1:] - if len(args) > 0 && args[0] == "--" { - args = args[1:] - } - err = p.publish(args, func(command []string) error { - cmd := exec.Command(command[0], command[1:]...) - for _, entry := range os.Environ() { - if strings.HasPrefix(entry, "SCROLL_TEAM_PASSWORD=") || strings.HasPrefix(entry, "SCROLL_TEAM_EMAIL=") || strings.HasPrefix(entry, "SCROLL_LIFECYCLE_TOKEN=") { - continue - } - cmd.Env = append(cmd.Env, entry) - } - cmd.Stdout, cmd.Stderr = os.Stdout, os.Stderr - return cmd.Run() - }) - } - } - return err -} - -func main() { - if err := runPublisher(); err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } -} diff --git a/scripts/publish-lifecycle/main_test.go b/scripts/publish-lifecycle/main_test.go deleted file mode 100644 index 23f69a68..00000000 --- a/scripts/publish-lifecycle/main_test.go +++ /dev/null @@ -1,218 +0,0 @@ -package main - -import ( - "crypto/sha256" - "encoding/json" - "errors" - "fmt" - "net/http" - "net/http/httptest" - "strings" - "testing" -) - -func TestSharedLifecyclePrivateStagingAndExplicitPublication(t *testing.T) { - for _, public := range []bool{false, true} { - t.Run(fmt.Sprint(public), func(t *testing.T) { - var staged string - var imported, published int - name := "scroll-example" - suffix := "" - if !public { - suffix = "-pr12" - } - name += suffix - canonical := fmt.Sprintf("registry.test/scroll-%x-%s/%s", sha256.Sum256([]byte("team-owner")), name, name) - digest := "sha256:" + strings.Repeat("a", 64) - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Header.Get("Authorization") != "Bearer fixture" { - t.Error("owner authorization missing") - } - w.Header().Set("Content-Type", "application/json") - switch r.URL.Path { - case "/v1/registry/project": - fmt.Fprint(w, `{"registry":"registry.test","project":"registry.test/team-owner"}`) - case "/v1/registry/scrolls/revision": - if staged == "" || r.URL.Query().Get("artifact") != staged { - t.Error("did not freeze own staging tag") - } - json.NewEncoder(w).Encode(map[string]string{"artifact": "registry.test/team-owner/scroll-example@" + digest}) - case "/v1/registry/scrolls/releases/import": - imported++ - var input struct { - Repository, Tag, ReleaseArtifact string - ReviewedPublicContent bool - } - json.NewDecoder(r.Body).Decode(&input) - if input.Repository != name || input.Tag != "v1-commit" || input.ReleaseArtifact != "registry.test/team-owner/scroll-example@"+digest || input.ReviewedPublicContent != public { - t.Errorf("wrong import contract: %+v", input) - } - json.NewEncoder(w).Encode(map[string]string{"artifact": canonical + "@" + digest}) - case "/v1/registry/scrolls/publish": - published++ - var input struct { - Repository, Revision string - ReviewedPublicContent bool - } - json.NewDecoder(r.Body).Decode(&input) - if input.Repository != name || input.Revision != digest || !input.ReviewedPublicContent { - t.Error("publication lost exact revision/review") - } - fmt.Fprint(w, `{}`) - default: - t.Error("unexpected request") - w.WriteHeader(404) - } - })) - defer server.Close() - p := &publisher{base: server.URL, client: server.Client(), token: "fixture", owner: "team-owner", host: "registry.test", public: public, repositorySuffix: suffix} - command := []string{"druid", "push", "registry.test/team-owner/scroll-example:v1-commit", "./scroll"} - err := p.publish(command, func(args []string) error { - staged = args[2] - if !strings.HasPrefix(staged, "registry.test/team-owner/scroll-example:build-") { - t.Fatal("push not isolated in private staging") - } - return nil - }) - if err != nil { - t.Fatal(err) - } - if imported != 1 || (public && published != 1) || (!public && published != 0) { - t.Fatal("wrong lifecycle calls") - } - if command[2] != "registry.test/team-owner/scroll-example:v1-commit" { - t.Fatal("caller catalog mutated") - } - }) - } -} - -func TestWrongIdentityStopsBeforeRegistryPush(t *testing.T) { - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - fmt.Fprint(w, `{"registry":"registry.test","project":"registry.test/other"}`) - })) - defer server.Close() - p := &publisher{base: server.URL, client: server.Client(), owner: "team-owner", host: "registry.test"} - called := false - err := p.publish([]string{"druid", "push", "registry.test/team-owner/example:v1", "./scroll"}, func([]string) error { called = true; return nil }) - if err == nil || called { - t.Fatal("wrong identity was allowed to push") - } -} - -func TestFailedPushNeverImports(t *testing.T) { - calls := 0 - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - calls++ - fmt.Fprint(w, `{"registry":"registry.test","project":"registry.test/team-owner"}`) - })) - defer server.Close() - p := &publisher{base: server.URL, client: server.Client(), owner: "team-owner", host: "registry.test"} - err := p.publish([]string{"druid", "push", "registry.test/team-owner/example:v1", "./scroll"}, func([]string) error { return errors.New("push failed") }) - if err == nil || calls != 1 { - t.Fatal("failed push reached lifecycle import") - } -} - -func TestConfigurationRejectsAdminCredentialsAndUnreviewedPublication(t *testing.T) { - t.Setenv("SCROLL_LIFECYCLE_URL", "https://api.druid.gg/core") - t.Setenv("SCROLL_LIFECYCLE_TOKEN", "fixture") - t.Setenv("SCROLL_LIFECYCLE_OWNER", "team-owner") - t.Setenv("SCROLL_REGISTRY_HOST", "registry.test") - t.Setenv("SCROLL_REGISTRY_NAMESPACE", "team-owner") - t.Setenv("SCROLL_REGISTRY_USER", "admin") - if _, err := configured(); err == nil { - t.Fatal("admin credentials accepted") - } - t.Setenv("SCROLL_REGISTRY_USER", "robot$team-owner+ci") - t.Setenv("SCROLL_LIFECYCLE_PUBLISH", "1") - t.Setenv("SCROLL_LIFECYCLE_REVIEWED", "0") - if _, err := configured(); err == nil { - t.Fatal("unreviewed public import accepted") - } - t.Setenv("SCROLL_LIFECYCLE_REVIEWED", "1") - if _, err := configured(); err != nil { - t.Fatal(err) - } -} - -func TestDedicatedAccountRefreshesJWTUsingInMemorySession(t *testing.T) { - tokens := 0 - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - switch r.URL.Path { - case "/auth/v2/sign-in/email": - var input map[string]string - json.NewDecoder(r.Body).Decode(&input) - if input["email"] != "team@example.test" || input["password"] != "fixture-password" { - t.Error("wrong dedicated sign-in credentials") - } - http.SetCookie(w, &http.Cookie{Name: "session", Value: "fixture-session", Path: "/"}) - fmt.Fprint(w, `{}`) - case "/auth/v2/token": - if cookie, err := r.Cookie("session"); err != nil || cookie.Value != "fixture-session" { - t.Error("session cookie missing") - } - tokens++ - fmt.Fprintf(w, `{"token":"refreshed-%d"}`, tokens) - case "/core/v1/registry/project": - if r.Header.Get("Authorization") != fmt.Sprintf("Bearer refreshed-%d", tokens) { - t.Error("fresh owner JWT missing") - } - fmt.Fprint(w, `{"registry":"registry.test","project":"registry.test/team-owner"}`) - default: - t.Error("unexpected request") - w.WriteHeader(404) - } - })) - defer server.Close() - t.Setenv("SCROLL_LIFECYCLE_URL", server.URL+"/core") - t.Setenv("SCROLL_AUTH_URL", server.URL+"/auth/v2") - t.Setenv("SCROLL_LIFECYCLE_TOKEN", "") - t.Setenv("SCROLL_TEAM_EMAIL", "team@example.test") - t.Setenv("SCROLL_TEAM_PASSWORD", "fixture-password") - t.Setenv("SCROLL_LIFECYCLE_OWNER", "team-owner") - t.Setenv("SCROLL_REGISTRY_NAMESPACE", "team-owner") - t.Setenv("SCROLL_REGISTRY_HOST", "registry.test") - t.Setenv("SCROLL_REGISTRY_USER", "robot$team-owner+ci") - t.Setenv("SCROLL_LIFECYCLE_PUBLISH", "0") - p, err := configured() - if err != nil { - t.Fatal(err) - } - if err := p.preflight(); err != nil { - t.Fatal(err) - } - if err := p.preflight(); err != nil { - t.Fatal(err) - } - if tokens != 2 { - t.Fatal("owner JWT was not refreshed before each lifecycle request") - } -} - -func TestPublisherNeverFollowsCredentialedRedirects(t *testing.T) { - forwarded := false - other := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { forwarded = true })) - defer other.Close() - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - http.Redirect(w, r, other.URL, http.StatusTemporaryRedirect) - })) - defer server.Close() - t.Setenv("SCROLL_LIFECYCLE_URL", server.URL) - t.Setenv("SCROLL_LIFECYCLE_TOKEN", "fixture") - t.Setenv("SCROLL_LIFECYCLE_OWNER", "team-owner") - t.Setenv("SCROLL_REGISTRY_NAMESPACE", "team-owner") - t.Setenv("SCROLL_REGISTRY_HOST", "registry.test") - t.Setenv("SCROLL_REGISTRY_USER", "robot$team-owner+ci") - t.Setenv("SCROLL_LIFECYCLE_PUBLISH", "0") - p, err := configured() - if err != nil { - t.Fatal(err) - } - if err := p.preflight(); err == nil { - t.Fatal("redirect accepted") - } - if forwarded { - t.Fatal("credentials reached redirect target") - } -} diff --git a/scripts/publish-lifecycle/push_script_test.go b/scripts/publish-lifecycle/push_script_test.go deleted file mode 100644 index e4cd4638..00000000 --- a/scripts/publish-lifecycle/push_script_test.go +++ /dev/null @@ -1,174 +0,0 @@ -package main - -import ( - "os" - "os/exec" - "path/filepath" - "strconv" - "strings" - "testing" -) - -// Exercise the real catalog/pool with an offline publisher boundary. Publisher -// HTTP/auth behavior is covered separately in main_test.go; no registry is used. -func TestPushScriptUsesLifecycleForEveryArtifact(t *testing.T) { - for _, jobs := range []string{"1", "3"} { - t.Run("jobs-"+jobs, func(t *testing.T) { - state, run := lifecycleScriptFixture(t, jobs) - if output, err := run(); err != nil { - t.Fatalf("push script: %v\n%s", err, output) - } - calls := readFixture(t, filepath.Join(state, "publisher.log")) - events := readFixture(t, filepath.Join(state, "events.log")) - starts, active, peak := 0, 0, 0 - for _, line := range strings.Split(events, "\n") { - if strings.HasPrefix(line, "start artifact ") { - starts++ - active++ - if active > peak { - peak = active - } - } - if strings.HasPrefix(line, "end artifact ") { - active-- - } - } - expected, categories := catalogCounts(t) - if starts == 0 || starts != expected || len(strings.Split(strings.TrimSpace(calls), "\n")) != starts { - t.Fatalf("not every catalog artifact used the lifecycle publisher: %d starts\n%s", starts, calls) - } - for _, line := range strings.Split(strings.TrimSpace(calls), "\n") { - fields := strings.Fields(line) - if len(fields) < 2 || fields[0] != "1700000000" || !strings.HasPrefix(fields[1], "registry.invalid/fixture-owner/") || !strings.HasSuffix(fields[1], "-commit") { - t.Fatalf("unstable timestamp or wrong staging reference: %s", line) - } - if strings.Contains(line, " -i ") && !strings.Contains(line, " -i registry.invalid/druid-team/druid:") { - t.Fatalf("runtime image was redirected into private staging: %s", line) - } - } - if strings.Count(events, "start category ") != categories || strings.Count(events, "end category ") != categories || - strings.LastIndex(events, "end category ") < 0 || strings.LastIndex(events, "end category ") > strings.Index(events, "start artifact ") { - t.Fatal("lifecycle artifacts started before category completion") - } - if readFixture(t, filepath.Join(state, "active")) != "0\n" { - t.Fatal("publisher children remain active") - } - limit, _ := strconv.Atoi(jobs) - if active != 0 || peak < 1 || peak > limit || (limit > 1 && peak < 2) { - t.Fatalf("lifecycle artifact concurrency = %d, configured = %d, active = %d", peak, limit, active) - } - }) - } -} - -func TestPushScriptFailsBeforeMutationWhenLifecyclePreflightFails(t *testing.T) { - state, run := lifecycleScriptFixture(t, "3", "FAKE_PREFLIGHT_FAIL=1") - if output, err := run(); err == nil { - t.Fatalf("failed preflight accepted: %s", output) - } - for _, name := range []string{"events.log", "publisher.log", "login"} { - if _, err := os.Stat(filepath.Join(state, name)); !os.IsNotExist(err) { - t.Fatalf("failed preflight reached %s: %v", name, err) - } - } -} - -func TestPushScriptReapsLifecycleFailures(t *testing.T) { - state, run := lifecycleScriptFixture(t, "3", "FAKE_DRUID_FAIL_REF=registry.invalid/fixture-owner/scroll-minecraft-spigot:1.17-commit") - if output, err := run(); err == nil { - t.Fatalf("failed lifecycle artifact accepted: %s", output) - } - events := readFixture(t, filepath.Join(state, "events.log")) - expected, _ := catalogCounts(t) - if strings.Count(events, "start artifact ") != expected { - t.Fatal("lifecycle failure abandoned unstarted catalog artifacts") - } - if strings.Count(events, "start artifact ") != strings.Count(events, "end artifact ") || readFixture(t, filepath.Join(state, "active")) != "0\n" { - t.Fatal("lifecycle failure abandoned active publisher jobs") - } - if !strings.Contains(events, "status=23") { - t.Fatal("fixture did not exercise the publisher failure") - } -} - -func lifecycleScriptFixture(t *testing.T, jobs string, extra ...string) (string, func() ([]byte, error)) { - t.Helper() - root, err := filepath.Abs("../..") - if err != nil { - t.Fatal(err) - } - state := t.TempDir() - bin := filepath.Join(state, "bin") - if err := os.Mkdir(bin, 0700); err != nil { - t.Fatal(err) - } - stubs := map[string]string{ - "go": `#!/usr/bin/env bash -set -euo pipefail -[[ "$1" == run && "$2" == ./scripts/publish-lifecycle ]] || exit 91 -if [[ "$3" == preflight ]]; then - [[ "${FAKE_PREFLIGHT_FAIL:-0}" != 1 ]] || exit 92 - touch "$FAKE_DRUID_STATE_DIR/preflight" - exit 0 -fi -[[ -f "$FAKE_DRUID_STATE_DIR/preflight" && "$3" == -- && "$4" == "$DRUID_BIN" && "$5" == push && "$6" != category ]] || exit 93 -printf '%s %s %s\n' "$SOURCE_DATE_EPOCH" "$6" "$*" >> "$FAKE_DRUID_STATE_DIR/publisher.log" -shift 4 -exec bash "$FAKE_DRUID_SOURCE" "$@" -`, - "druid": `#!/usr/bin/env bash -set -euo pipefail -[[ -f "$FAKE_DRUID_STATE_DIR/preflight" ]] || exit 94 -if [[ "$1" == login ]]; then - touch "$FAKE_DRUID_STATE_DIR/login" - exit 0 -fi -[[ "$1" == push && "$2" == category ]] || exit 95 -exec bash "$FAKE_DRUID_SOURCE" "$@" -`, - } - for name, script := range stubs { - if err := os.WriteFile(filepath.Join(bin, name), []byte(script), 0700); err != nil { - t.Fatal(err) - } - } - return state, func() ([]byte, error) { - cmd := exec.Command("bash", filepath.Join(root, "scripts/push.sh")) - cmd.Dir = root - cmd.Env = append(os.Environ(), "PATH="+bin+":"+os.Getenv("PATH"), "DRUID_BIN="+filepath.Join(bin, "druid"), - "FAKE_DRUID_SOURCE="+filepath.Join(root, "scripts/tests/fixtures/fake-druid.sh"), "FAKE_DRUID_STATE_DIR="+state, - "FAKE_DRUID_SLEEP=0.001", "FAKE_DRUID_FAIL_REF=", "FAKE_PREFLIGHT_FAIL=0", "SCROLL_PUBLISH_MODE=lifecycle", - "SCROLL_PUSH_DRY_RUN=0", "SCROLL_PUSH_UI=0", "SCROLL_PUSH_CATEGORIES=1", "SCROLL_PUSH_ARTIFACTS=1", - "SCROLL_PUSH_JOBS="+jobs, "SCROLL_REGISTRY_HOST=registry.invalid", "SCROLL_REGISTRY_NAMESPACE=fixture-owner", - "SCROLL_REGISTRY_RUNTIME_NAMESPACE=druid-team", "SCROLL_TAG_SUFFIX=-commit", "SOURCE_DATE_EPOCH=1700000000", - "SCROLL_REGISTRY_USER=fixture", "SCROLL_REGISTRY_PASSWORD=fixture", "DRUID_SCROLL_RUNTIME_IMAGE=", "DRUID_SCROLL_STEAMCMD_IMAGE=") - cmd.Env = append(cmd.Env, extra...) - return cmd.CombinedOutput() - } -} - -func readFixture(t *testing.T, path string) string { - t.Helper() - data, err := os.ReadFile(path) - if err != nil { - t.Fatal(err) - } - return string(data) -} - -func catalogCounts(t *testing.T) (artifacts, categories int) { - t.Helper() - for _, line := range strings.Split(readFixture(t, "../push.sh"), "\n") { - if strings.HasPrefix(strings.TrimSpace(line), "run druid push ") { - if strings.Contains(line, "push category ") { - categories++ - } else { - artifacts++ - } - } - } - if artifacts == 0 || categories == 0 { - t.Fatal("fixture could not read the explicit catalog") - } - return -} diff --git a/scripts/publish-owned/main.go b/scripts/publish-owned/main.go new file mode 100644 index 00000000..b6231e8a --- /dev/null +++ b/scripts/publish-owned/main.go @@ -0,0 +1,281 @@ +// Publishes direct owner pushes through Core's generic repository operation. +// It never copies, imports, or mutates a selected Scroll artifact. +package main + +import ( + "bufio" + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/http/cookiejar" + "net/url" + "os" + "regexp" + "sort" + "strings" + "time" +) + +type publisher struct { + base, auth, owner, host, email, password, manifest string + client *http.Client +} + +type publicationArtifact struct { + Digest string `json:"digest"` + Tags []string `json:"tags"` +} + +var namePattern = regexp.MustCompile(`^[a-z0-9][a-z0-9_-]{0,62}$`) +var tagPattern = regexp.MustCompile(`^[\w][\w.-]{0,127}$`) +var digestPattern = regexp.MustCompile(`^sha256:[a-f0-9]{64}$`) + +func configured() (*publisher, error) { + base := strings.TrimRight(os.Getenv("SCROLL_LIFECYCLE_URL"), "/") + auth := strings.TrimRight(os.Getenv("SCROLL_AUTH_URL"), "/") + coreURL, err := trustedURL(base) + if err != nil { + return nil, fmt.Errorf("SCROLL_LIFECYCLE_URL: %w", err) + } + authURL, err := trustedURL(auth) + if err != nil || authURL.Scheme != coreURL.Scheme || authURL.Host != coreURL.Host { + return nil, errors.New("SCROLL_AUTH_URL must share Core's trusted origin") + } + host := strings.TrimSuffix(strings.TrimPrefix(strings.TrimPrefix(os.Getenv("SCROLL_REGISTRY_HOST"), "https://"), "http://"), "/") + p := &publisher{base: base, auth: auth, owner: os.Getenv("SCROLL_OWNER_ID"), host: host, + email: os.Getenv("SCROLL_PUBLISH_EMAIL"), password: os.Getenv("SCROLL_PUBLISH_PASSWORD"), manifest: os.Getenv("SCROLL_PUSH_MANIFEST")} + if p.owner == "" || p.host == "" || strings.ContainsAny(p.host, "/\\") || p.email == "" || p.password == "" { + return nil, errors.New("owner, registry host and ordinary publisher sign-in credentials are required") + } + jar, _ := cookiejar.New(nil) + p.client = &http.Client{Timeout: 70 * time.Minute, Jar: jar, CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }} + return p, nil +} + +func trustedURL(raw string) (*url.URL, error) { + u, err := url.Parse(raw) + if err != nil || u.Host == "" || u.User != nil || u.RawQuery != "" || u.Fragment != "" || + (u.Scheme != "https" && !(u.Scheme == "http" && (u.Hostname() == "localhost" || u.Hostname() == "127.0.0.1" || u.Hostname() == "druid-gs"))) { + return nil, errors.New("expected HTTPS URL (HTTP only for local development)") + } + return u, nil +} + +func (p *publisher) authRequest(method, path string, body, out any) error { + data, err := json.Marshal(body) + if err != nil { + return err + } + ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) + defer cancel() + req, err := http.NewRequestWithContext(ctx, method, p.auth+path, bytes.NewReader(data)) + if err != nil { + return errors.New("invalid authentication request") + } + req.Header.Set("Content-Type", "application/json") + parsed, _ := url.Parse(p.auth) + req.Header.Set("Origin", parsed.Scheme+"://"+parsed.Host) + resp, err := p.client.Do(req) + if err != nil { + return errors.New("publisher authentication failed") + } + defer resp.Body.Close() + if resp.StatusCode < 200 || resp.StatusCode >= 300 { + return fmt.Errorf("publisher authentication rejected: HTTP %d", resp.StatusCode) + } + if out != nil { + return json.NewDecoder(io.LimitReader(resp.Body, 1<<20)).Decode(out) + } + return nil +} + +func (p *publisher) request(method, path string, body, out any) error { + var jwt struct { + Token string `json:"token"` + } + if err := p.authRequest(http.MethodGet, "/token", nil, &jwt); err != nil { + return err + } + if jwt.Token == "" { + return errors.New("authentication returned no owner token") + } + data, err := json.Marshal(body) + if err != nil { + return err + } + req, err := http.NewRequest(method, p.base+path, bytes.NewReader(data)) + if err != nil { + return errors.New("invalid lifecycle request") + } + req.Header.Set("Authorization", "Bearer "+jwt.Token) + req.Header.Set("Content-Type", "application/json") + resp, err := p.client.Do(req) + if err != nil { + return errors.New("lifecycle request failed; inspect published state before retrying") + } + defer resp.Body.Close() + if resp.StatusCode < 200 || resp.StatusCode >= 300 { + return fmt.Errorf("lifecycle request rejected: HTTP %d", resp.StatusCode) + } + if out != nil { + return json.NewDecoder(io.LimitReader(resp.Body, 1<<20)).Decode(out) + } + return nil +} + +func (p *publisher) preflight() error { + var project struct { + Registry string `json:"registry"` + Project string `json:"project"` + } + if err := p.request(http.MethodGet, "/v1/registry/project", nil, &project); err != nil { + return err + } + if project.Registry != p.host || project.Project != p.host+"/"+p.owner { + return errors.New("authenticated owner or registry differs from publisher configuration") + } + return nil +} + +func (p *publisher) parseRef(ref string) (string, string, error) { + prefix := p.host + "/" + if !strings.HasPrefix(ref, prefix) { + return "", "", errors.New("push manifest contains another registry") + } + project, remainder, ok := strings.Cut(strings.TrimPrefix(ref, prefix), "/") + if !ok { + return "", "", errors.New("push manifest contains no repository") + } + name, tag, ok := strings.Cut(remainder, ":") + if !ok || !namePattern.MatchString(name) || !tagPattern.MatchString(tag) { + return "", "", errors.New("push manifest contains an invalid tagged Scroll") + } + if project != p.owner { + return "", "", errors.New("push manifest contains a repository outside the owner project") + } + return name, ref, nil +} + +func (p *publisher) publishManifest() error { + if os.Getenv("SCROLL_LIFECYCLE_REVIEWED") != "1" { + return errors.New("public publication requires SCROLL_LIFECYCLE_REVIEWED=1") + } + if p.manifest == "" { + return errors.New("SCROLL_PUSH_MANIFEST is required") + } + file, err := os.Open(p.manifest) + if err != nil { + return err + } + defer file.Close() + selected := map[string]map[string]bool{} + scanner := bufio.NewScanner(file) + scanner.Buffer(make([]byte, 4096), 1<<20) + for scanner.Scan() { + name, ref, err := p.parseRef(scanner.Text()) + if err != nil { + return err + } + if selected[name] == nil { + selected[name] = map[string]bool{} + } + selected[name][ref] = true + } + if err := scanner.Err(); err != nil { + return err + } + if len(selected) == 0 { + return errors.New("no pushed Scroll artifacts to publish") + } + names := make([]string, 0, len(selected)) + for name := range selected { + names = append(names, name) + } + sort.Strings(names) + for _, name := range names { + var snapshot []publicationArtifact + if err := p.request(http.MethodGet, "/v1/registry/repositories/"+url.PathEscape(name)+"/publication-preview", nil, &snapshot); err != nil { + return fmt.Errorf("preview %s: %w", name, err) + } + if len(snapshot) == 0 { + return fmt.Errorf("empty publication preview for %s", name) + } + previewTags := map[string]string{} + for _, artifact := range snapshot { + if !digestPattern.MatchString(artifact.Digest) || artifact.Tags == nil { + return fmt.Errorf("invalid publication preview for %s", name) + } + for _, tag := range artifact.Tags { + if !tagPattern.MatchString(tag) || previewTags[tag] != "" { + return fmt.Errorf("invalid publication tag for %s", name) + } + previewTags[tag] = artifact.Digest + } + } + refs := make([]string, 0, len(selected[name])) + for ref := range selected[name] { + refs = append(refs, ref) + } + sort.Strings(refs) + for _, ref := range refs { + var resolved struct { + Repository string `json:"repository"` + Digest string `json:"digest"` + Artifact string `json:"artifact"` + } + if err := p.request(http.MethodGet, "/v1/registry/scrolls/revision?artifact="+url.QueryEscape(ref), nil, &resolved); err != nil { + return fmt.Errorf("resolve %s: %w", ref, err) + } + repository := ref[:strings.LastIndex(ref, ":")] + if resolved.Repository != repository || !digestPattern.MatchString(resolved.Digest) || resolved.Artifact != repository+"@"+resolved.Digest { + return fmt.Errorf("resolved revision differs from pushed repository %s", repository) + } + if previewTags[ref[strings.LastIndex(ref, ":")+1:]] != resolved.Digest { + return fmt.Errorf("pushed revision changed since publication preview: %s", ref) + } + } + input := map[string]any{"repository": name, "expectedSnapshot": snapshot, "reviewedPublicContent": true} + if err := p.request(http.MethodPost, "/v1/registry/scrolls/publish", input, nil); err != nil { + return fmt.Errorf("publish %s: %w", name, err) + } + for _, ref := range refs { + fmt.Println(ref) + } + } + return nil +} + +func run() error { + if len(os.Args) != 2 || (os.Args[1] != "preflight" && os.Args[1] != "publish") { + return errors.New("usage: publish-owned preflight|publish") + } + p, err := configured() + if err != nil { + return err + } + if os.Getenv("SCROLL_LIFECYCLE_REVIEWED") != "1" { + return errors.New("public publication requires reviewed content") + } + if err := p.authRequest(http.MethodPost, "/sign-in/email", map[string]string{"email": p.email, "password": p.password}, nil); err != nil { + return err + } + defer p.authRequest(http.MethodPost, "/sign-out", map[string]any{}, nil) + if err := p.preflight(); err != nil { + return err + } + if os.Args[1] == "publish" { + return p.publishManifest() + } + return nil +} + +func main() { + if err := run(); err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } +} diff --git a/scripts/publish-owned/main_test.go b/scripts/publish-owned/main_test.go new file mode 100644 index 00000000..875dcb9c --- /dev/null +++ b/scripts/publish-owned/main_test.go @@ -0,0 +1,170 @@ +package main + +import ( + "encoding/json" + "fmt" + "net/http" + "net/http/cookiejar" + "net/http/httptest" + "os" + "path/filepath" + "strings" + "testing" +) + +func testRef(owner, host, name, tag string) string { + return fmt.Sprintf("%s/%s/%s:%s", host, owner, name, tag) +} + +func TestParseRefRequiresOwnerPrivateProject(t *testing.T) { + p := &publisher{owner: "owner-1", host: "registry.example:5000"} + ref := testRef(p.owner, p.host, "example", "v1") + name, got, err := p.parseRef(ref) + if err != nil || name != "example" || got != ref { + t.Fatalf("owned direct push rejected: %q %q %v", name, got, err) + } + for _, invalid := range []string{ + testRef("another-owner", p.host, "example", "v1"), + "other.example/project/example:v1", + strings.Replace(ref, "/example:v1", "/nested/example:v1", 1), + strings.TrimSuffix(ref, ":v1") + ":invalid:tag", + } { + if _, _, err := p.parseRef(invalid); err == nil { + t.Errorf("accepted unsafe push manifest reference: %s", invalid) + } + } +} + +func TestPublishManifestUsesReviewedSnapshotAndOneOperationPerRepository(t *testing.T) { + t.Setenv("SCROLL_LIFECYCLE_REVIEWED", "1") + owner, host, name := "owner-1", "registry.example:5000", "example" + first := testRef(owner, host, name, "v1") + second := testRef(owner, host, name, "v2") + repository := first[:strings.LastIndex(first, ":")] + digest := "sha256:" + strings.Repeat("a", 64) + snapshot := []map[string]any{{"digest": digest, "tags": []string{"v1", "v2"}}} + manifest := filepath.Join(t.TempDir(), "pushed.txt") + if err := os.WriteFile(manifest, []byte(first+"\n"+second+"\n"), 0600); err != nil { + t.Fatal(err) + } + resolved, previewed, published := 0, 0, 0 + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case "/sign-in/email": + http.SetCookie(w, &http.Cookie{Name: "session", Value: "fixture", Path: "/"}) + case "/token": + if _, err := r.Cookie("session"); err != nil { + t.Error("missing owner session") + } + _ = json.NewEncoder(w).Encode(map[string]string{"token": "owner-jwt"}) + case "/v1/registry/project": + if r.Header.Get("Authorization") != "Bearer owner-jwt" { + t.Error("missing owner token") + } + _ = json.NewEncoder(w).Encode(map[string]string{"registry": host, "project": host + "/" + owner}) + case "/v1/registry/scrolls/revision": + resolved++ + if r.URL.Query().Get("artifact") != first && r.URL.Query().Get("artifact") != second { + t.Error("resolved wrong pushed ref") + } + _ = json.NewEncoder(w).Encode(map[string]string{"repository": repository, "digest": digest, "artifact": repository + "@" + digest}) + case "/v1/registry/repositories/example/publication-preview": + previewed++ + _ = json.NewEncoder(w).Encode(snapshot) + case "/v1/registry/scrolls/publish": + published++ + var input struct { + Repository string `json:"repository"` + Snapshot []map[string]any `json:"expectedSnapshot"` + Reviewed bool `json:"reviewedPublicContent"` + } + if err := json.NewDecoder(r.Body).Decode(&input); err != nil { + t.Error(err) + } + got, _ := json.Marshal(input.Snapshot) + want, _ := json.Marshal(snapshot) + if input.Repository != name || string(got) != string(want) || !input.Reviewed { + t.Errorf("unexpected publication input: %+v", input) + } + default: + t.Errorf("unexpected request: %s", r.URL.Path) + http.NotFound(w, r) + } + })) + defer server.Close() + jar, _ := cookiejar.New(nil) + p := &publisher{base: server.URL, auth: server.URL, owner: owner, host: host, manifest: manifest, client: &http.Client{Jar: jar}} + if err := p.authRequest(http.MethodPost, "/sign-in/email", map[string]string{"email": "owner@example.com", "password": "fixture"}, nil); err != nil { + t.Fatal(err) + } + if err := p.preflight(); err != nil { + t.Fatal(err) + } + if err := p.publishManifest(); err != nil { + t.Fatal(err) + } + if resolved != 2 || previewed != 1 || published != 1 { + t.Fatalf("expected two resolves, one preview and one publish, got %d, %d and %d", resolved, previewed, published) + } +} + +func TestPublishManifestRequiresReview(t *testing.T) { + t.Setenv("SCROLL_LIFECYCLE_REVIEWED", "") + if err := (&publisher{}).publishManifest(); err == nil { + t.Fatal("publication without content review accepted") + } +} + +func TestPublishManifestRejectsUnsafePreview(t *testing.T) { + for _, scenario := range []string{"empty", "invalid digest", "missing tag", "moved tag", "conflict"} { + t.Run(scenario, func(t *testing.T) { + t.Setenv("SCROLL_LIFECYCLE_REVIEWED", "1") + digest := "sha256:" + strings.Repeat("a", 64) + ref := testRef("owner", "registry.example", "example", "v1") + manifest := filepath.Join(t.TempDir(), "pushed.txt") + if err := os.WriteFile(manifest, []byte(ref+"\n"), 0600); err != nil { + t.Fatal(err) + } + published := 0 + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case "/token": + _ = json.NewEncoder(w).Encode(map[string]string{"token": "fixture"}) + case "/v1/registry/repositories/example/publication-preview": + snapshot := []publicationArtifact{{Digest: digest, Tags: []string{"v1"}}} + switch scenario { + case "empty": + snapshot = nil + case "invalid digest": + snapshot[0].Digest = "latest" + case "missing tag": + snapshot[0].Tags = []string{"v2"} + case "moved tag": + snapshot[0].Digest = "sha256:" + strings.Repeat("b", 64) + } + _ = json.NewEncoder(w).Encode(snapshot) + case "/v1/registry/scrolls/revision": + _ = json.NewEncoder(w).Encode(map[string]string{"repository": "registry.example/owner/example", "digest": digest, "artifact": "registry.example/owner/example@" + digest}) + case "/v1/registry/scrolls/publish": + published++ + http.Error(w, "changed since review", http.StatusConflict) + default: + t.Errorf("unexpected request: %s", r.URL.Path) + http.NotFound(w, r) + } + })) + defer server.Close() + p := &publisher{base: server.URL, auth: server.URL, owner: "owner", host: "registry.example", manifest: manifest, client: server.Client()} + if err := p.publishManifest(); err == nil { + t.Fatal("unsafe publication accepted") + } + want := 0 + if scenario == "conflict" { + want = 1 + } + if published != want { + t.Fatalf("publication requests: got %d, want %d; conflicts must not auto-retry", published, want) + } + }) + } +} diff --git a/scripts/push.sh b/scripts/push.sh index d3690ea9..a406be99 100755 --- a/scripts/push.sh +++ b/scripts/push.sh @@ -11,6 +11,7 @@ DRUID_BIN="${DRUID_BIN:-druid}" SCROLL_PUSH_DRY_RUN="${SCROLL_PUSH_DRY_RUN:-0}" SCROLL_REGISTRY_HOST="${SCROLL_REGISTRY_HOST:-artifacts.druid.gg}" SCROLL_REGISTRY_NAMESPACE="${SCROLL_REGISTRY_NAMESPACE:-druid-team}" +SCROLL_OWNER_ID="${SCROLL_OWNER_ID:-}" SCROLL_REGISTRY_USER="${SCROLL_REGISTRY_USER:-}" SCROLL_REGISTRY_PASSWORD="${SCROLL_REGISTRY_PASSWORD:-}" DRUID_CLI_VERSION="${DRUID_CLI_VERSION:-v0.1.257}" @@ -18,12 +19,6 @@ SCROLL_PUSH_CATEGORIES="${SCROLL_PUSH_CATEGORIES:-1}" SCROLL_PUSH_ARTIFACTS="${SCROLL_PUSH_ARTIFACTS:-1}" SCROLL_PUSH_JOBS="${SCROLL_PUSH_JOBS:-1}" SCROLL_PUSH_UI="${SCROLL_PUSH_UI:-1}" -SCROLL_PUBLISH_MODE="${SCROLL_PUBLISH_MODE:-direct}" -if [[ "$SCROLL_PUBLISH_MODE" != "direct" && "$SCROLL_PUBLISH_MODE" != "lifecycle" ]]; then - echo "SCROLL_PUBLISH_MODE must be direct or lifecycle" >&2 - exit 2 -fi - if [[ ! "$SCROLL_PUSH_JOBS" =~ ^[1-9][0-9]*$ ]]; then echo "SCROLL_PUSH_JOBS must be a positive integer (got: $SCROLL_PUSH_JOBS)" >&2 exit 2 @@ -37,6 +32,11 @@ registry_host="${SCROLL_REGISTRY_HOST#http://}" registry_host="${registry_host#https://}" registry_host="${registry_host%%/*}" registry_prefix="${registry_host}/${SCROLL_REGISTRY_NAMESPACE}" +if [[ -n "$SCROLL_OWNER_ID" ]]; then + [[ "$SCROLL_OWNER_ID" =~ ^[a-z0-9][a-z0-9_-]{0,62}$ ]] || { echo "Invalid owner project" >&2; exit 2; } + registry_prefix="${registry_host}/${SCROLL_OWNER_ID}" + export SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(git show -s --format=%ct HEAD)}" +fi runtime_namespace="${SCROLL_REGISTRY_RUNTIME_NAMESPACE:-${SCROLL_REGISTRY_NAMESPACE}}" runtime_prefix="${registry_host}/${runtime_namespace}" runtime_image="${DRUID_SCROLL_RUNTIME_IMAGE:-${runtime_prefix}/druid:${DRUID_CLI_VERSION}}" @@ -83,6 +83,26 @@ login_if_configured() { fi } +rewrite_registry_reference() { + local value="$1" + local source_prefix="artifacts.druid.gg/druid-team/" + if [[ "$value" == "$runtime_image" || "$value" == "$steamcmd_image" ]]; then + printf '%s' "$value" + return + fi + if [[ -n "$SCROLL_OWNER_ID" && "$value" == "$source_prefix"* ]]; then + local path="${value#"$source_prefix"}" + local name="${path%%[:@]*}" + if [[ ! "$name" =~ ^[a-z0-9][a-z0-9_-]{0,62}$ ]]; then + echo "Invalid owner Scroll repository: $name" >&2 + return 2 + fi + printf '%s' "${registry_prefix}/${path}" + else + printf '%s' "${value//artifacts.druid.gg\/druid-team/$registry_prefix}" + fi +} + run() { local -a command=("$@") local index @@ -101,12 +121,22 @@ run() { command[2]="$ref" fi + # Direct owner repositories carry their own presentation metadata. The + # generic publication preflight cannot depend on separate category artifacts. + if [[ -n "$SCROLL_OWNER_ID" && "${command[1]:-}" == "push" && "${command[2]:-}" != "category" ]]; then + command+=(--pack-meta) + fi + # The catalog intentionally uses production refs. Retarget them here for # local Harbor, staging, or PR namespaces without changing every push line. for index in "${!command[@]}"; do command[$index]="${command[$index]//artifacts.druid.gg\/druid-team\/druid:v0.1.257-steamcmd/$steamcmd_image}" command[$index]="${command[$index]//artifacts.druid.gg\/druid-team\/druid:v0.1.257/$runtime_image}" - command[$index]="${command[$index]//artifacts.druid.gg\/druid-team/$registry_prefix}" + if [[ "${command[2]:-}" == "category" ]]; then + command[$index]="${command[$index]//artifacts.druid.gg\/druid-team/$registry_prefix}" + else + command[$index]="$(rewrite_registry_reference "${command[$index]}")" + fi done if [[ "${command[0]:-}" == "druid" ]]; then command[0]="$DRUID_BIN" @@ -139,10 +169,9 @@ run() { } execute_push() { - if [[ "$SCROLL_PUBLISH_MODE" == "lifecycle" && "${2:-}" == "push" && "${3:-}" != "category" ]]; then - go run ./scripts/publish-lifecycle -- "$@" - else - "$@" + "$@" || return + if [[ -n "${SCROLL_PUSH_MANIFEST:-}" && "$2" == "push" && "$3" != "category" ]]; then + printf '%s\n' "$3" >> "$SCROLL_PUSH_MANIFEST" fi } @@ -297,11 +326,6 @@ push_release_artifacts() { run druid push artifacts.druid.gg/druid-team/scroll-hytale:latest ./scrolls/hytale/hytale-druid-gg -p main=5520/udp -i artifacts.druid.gg/druid-team/druid:v0.1.257 --min-disk 10Gi --min-ram 4Gi --min-cpu 1 -m --smart --category hytale } -if [[ "$SCROLL_PUBLISH_MODE" == "lifecycle" && "$SCROLL_PUSH_DRY_RUN" != "1" ]]; then - # Freeze build metadata across retries of one reviewed commit. - export SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(git show -s --format=%ct HEAD)}" - go run ./scripts/publish-lifecycle preflight -fi login_if_configured if [[ "$SCROLL_PUSH_CATEGORIES" = "1" ]]; then diff --git a/scripts/tests/push-parallel.test.sh b/scripts/tests/push-parallel.test.sh index cf856e91..57a6543b 100644 --- a/scripts/tests/push-parallel.test.sh +++ b/scripts/tests/push-parallel.test.sh @@ -38,8 +38,17 @@ artifact_dry_run="$( SCROLL_PUSH_DRY_RUN=1 \ SCROLL_PUSH_CATEGORIES=0 \ SCROLL_PUSH_ARTIFACTS=1 \ + SCROLL_OWNER_ID=test-owner \ bash "$push_script" )" +[[ "$artifact_dry_run" == *"artifacts.druid.gg/test-owner/scroll-minecraft-spigot:1.17"* ]] || \ + fail "direct pushes must target the owner's private project" +[[ "$artifact_dry_run" == *"-i artifacts.druid.gg/druid-team/druid:v0.1.257"* ]] || \ + fail "owner mapping must leave runtime image references unchanged" +[[ "$artifact_dry_run" == *"--pack-meta"* ]] || \ + fail "direct owner pushes must carry presentation metadata" +[[ "$category_dry_run" == *"artifacts.druid.gg/druid-team/scroll-minecraft-spigot"* ]] || \ + fail "category metadata must retain the configured registry namespace" expected_categories="$(printf '%s\n' "$category_dry_run" | grep -Ec '^"?druid"? push category ')" expected_artifacts="$(printf '%s\n' "$artifact_dry_run" | grep -Ec '^"?druid"? push ')" @@ -78,6 +87,7 @@ DRUID_BIN="$fake_druid" \ FAKE_DRUID_STATE_DIR="$tmp_dir/state" \ FAKE_DRUID_SLEEP=0.02 \ SCROLL_PUSH_JOBS=3 \ +SCROLL_PUSH_MANIFEST="$tmp_dir/pushed.txt" \ bash "$push_script" >"$tmp_dir/parallel.out" maximum="$(<"$tmp_dir/state/max")" @@ -90,6 +100,11 @@ assert_equals "$expected_categories" "$actual_categories" \ "parallel mode must invoke every category push exactly once" assert_equals "$expected_artifacts" "$actual_artifacts" \ "parallel mode must invoke every artifact push exactly once" +assert_equals "$expected_artifacts" "$(wc -l < "$tmp_dir/pushed.txt" | tr -d ' ')" \ + "the publication manifest must record each successful artifact push" +if grep -q 'category' "$tmp_dir/pushed.txt"; then + fail "category metadata must not enter the publication manifest" +fi last_category_end="$(grep -n '^end category ' "$tmp_dir/state/events.log" | tail -n 1 | cut -d: -f1)" first_artifact_start="$(grep -m 1 -n '^start artifact ' "$tmp_dir/state/events.log" | cut -d: -f1)" diff --git a/scripts/validate-release-workflow/lifecycle_workflow.go b/scripts/validate-release-workflow/lifecycle_workflow.go index b5bb5ae3..9dd57fb5 100644 --- a/scripts/validate-release-workflow/lifecycle_workflow.go +++ b/scripts/validate-release-workflow/lifecycle_workflow.go @@ -37,8 +37,7 @@ type lifecycleStep struct { With map[string]any `yaml:"with"` } -// Check the actual CI callers, not only the opt-in helper. Missing credentials -// must never silently select the legacy direct-publication path. +// Check the actual CI callers and keep publication in protected environments. func validateLifecycleWorkflows(directory string) error { read := func(name string) (lifecycleWorkflow, error) { var workflow lifecycleWorkflow @@ -75,7 +74,7 @@ func validateLifecycleWorkflows(directory string) error { } tests, gate, cli, publishCount := false, false, false, 0 for _, step := range verify.Steps { - if strings.Contains(step.Run, "go test ./scripts/publish-lifecycle ./scripts/stage-scroll-ui ./scripts/validate-release-workflow") { + if strings.Contains(step.Run, "go test ./scripts/stage-scroll-ui ./scripts/validate-release-workflow ./scripts/publish-owned") { tests = true } for _, value := range step.Env { @@ -95,30 +94,41 @@ func validateLifecycleWorkflows(directory string) error { ref, _ := step.With["ref"].(string) cli = regexp.MustCompile(`^[a-f0-9]{40}$`).MatchString(ref) && step.With["persist-credentials"] == false } - if step.Run != "bash ./scripts/push.sh" { + if !strings.Contains(step.Run, "bash ./scripts/push.sh") { continue } publishCount++ + if !strings.Contains(step.Run, "for name in SCROLL_REGISTRY_HOST SCROLL_OWNER_ID SCROLL_REGISTRY_USER SCROLL_REGISTRY_PASSWORD; do") || + !strings.Contains(step.Run, "if [[ -z \"${!name}\" ]]; then") || !strings.Contains(step.Run, "exit 1") || + !strings.Contains(step.Run, "go run ./scripts/publish-owned preflight") || !strings.Contains(step.Run, "go run ./scripts/publish-owned publish") || + !strings.Contains(step.Run, ": > \"$SCROLL_PUSH_MANIFEST\"") { + return fmt.Errorf("lifecycle publication must reject missing publisher settings") + } for name, want := range map[string]string{ - "SCROLL_PUBLISH_MODE": "lifecycle", - "SCROLL_REGISTRY_NAMESPACE": "${{ vars.SCROLL_LIFECYCLE_OWNER }}", - "SCROLL_REGISTRY_RUNTIME_NAMESPACE": "druid-team", - "SCROLL_REGISTRY_USER": "${{ secrets.SCROLL_TEAM_REGISTRY_USER }}", - "SCROLL_REGISTRY_PASSWORD": "${{ secrets.SCROLL_TEAM_REGISTRY_PASSWORD }}", - "SCROLL_TEAM_EMAIL": "${{ secrets.SCROLL_TEAM_EMAIL }}", - "SCROLL_TEAM_PASSWORD": "${{ secrets.SCROLL_TEAM_PASSWORD }}", - "SCROLL_TAG_SUFFIX": "-${{ github.event.pull_request.head.sha || github.sha }}", - "SCROLL_LIFECYCLE_REPOSITORY_SUFFIX": "${{ github.event_name == 'pull_request' && format('-pr{0}', github.event.pull_request.number) || '' }}", - "SCROLL_LIFECYCLE_PUBLISH": "${{ inputs.public && '1' || '0' }}", - "SCROLL_LIFECYCLE_REVIEWED": "${{ inputs.public && '1' || '0' }}", + "SCROLL_LIFECYCLE_URL": "${{ vars.SCROLL_LIFECYCLE_URL }}", + "SCROLL_AUTH_URL": "${{ vars.SCROLL_AUTH_URL }}", + "SCROLL_PUBLISH_EMAIL": "${{ secrets.SCROLL_PUBLISH_EMAIL }}", + "SCROLL_PUBLISH_PASSWORD": "${{ secrets.SCROLL_PUBLISH_PASSWORD }}", + "SCROLL_LIFECYCLE_REVIEWED": "${{ vars.SCROLL_LIFECYCLE_REVIEWED }}", + "SCROLL_PUBLIC": "${{ inputs.public && '1' || '0' }}", + "SCROLL_PUSH_MANIFEST": "${{ runner.temp }}/scroll-artifacts.txt", + "SCROLL_OWNER_ID": "${{ vars.SCROLL_OWNER_ID }}", + "SCROLL_REGISTRY_RUNTIME_NAMESPACE": "${{ vars.SCROLL_REGISTRY_RUNTIME_NAMESPACE || 'druid-team' }}", + "SCROLL_PUSH_CATEGORIES": "0", + "SCROLL_REGISTRY_USER": "${{ secrets.SCROLL_REGISTRY_USER }}", + "SCROLL_REGISTRY_PASSWORD": "${{ secrets.SCROLL_REGISTRY_PASSWORD }}", + "SCROLL_TAG_SUFFIX": "-${{ github.event.pull_request.head.sha || github.sha }}", } { if step.Env[name] != want { return fmt.Errorf("lifecycle publication has incorrect %s", name) } } + if _, legacyMode := step.Env["SCROLL_PUBLISH_MODE"]; legacyMode { + return fmt.Errorf("publisher workflow must use direct push without a lifecycle mode") + } } if !tests || !gate || !cli || publishCount != 1 { - return fmt.Errorf("shared workflow needs publisher tests, provisioning gate, pinned CLI and one lifecycle catalog call") + return fmt.Errorf("shared workflow needs publication tests, provisioning gate, pinned CLI and one catalog push") } return nil } diff --git a/scripts/validate-release-workflow/lifecycle_workflow_test.go b/scripts/validate-release-workflow/lifecycle_workflow_test.go index 1505a330..82fdac8b 100644 --- a/scripts/validate-release-workflow/lifecycle_workflow_test.go +++ b/scripts/validate-release-workflow/lifecycle_workflow_test.go @@ -57,17 +57,21 @@ func TestLifecycleProvisioningGate(t *testing.T) { func TestLifecycleWorkflowRejectsMissingCutoverGuards(t *testing.T) { for name, change := range map[string][3]string{ + "category artifacts in owner repositories": {"scroll-lifecycle.yml", "SCROLL_PUSH_CATEGORIES: '0'", "SCROLL_PUSH_CATEGORIES: '1'"}, "legacy caller": {"release.yml", "./.github/workflows/scroll-lifecycle.yml", "./.github/workflows/legacy.yml"}, "public preview": {"pr.yml", "public: false", "public: true"}, - "direct fallback": {"scroll-lifecycle.yml", "SCROLL_PUBLISH_MODE: lifecycle", "SCROLL_PUBLISH_MODE: direct"}, + "staging fallback": {"scroll-lifecycle.yml", "SCROLL_OWNER_ID: ${{ vars.SCROLL_OWNER_ID }}", "SCROLL_OWNER_ID: ${{ vars.SCROLL_OWNER_ID }}\n SCROLL_PUBLISH_MODE: lifecycle"}, "mutable revision": {"scroll-lifecycle.yml", "SCROLL_TAG_SUFFIX: -${{ github.event.pull_request.head.sha || github.sha }}", "SCROLL_TAG_SUFFIX: -latest"}, - "public preview repository": {"scroll-lifecycle.yml", "format('-pr{0}', github.event.pull_request.number) || ''", "''"}, - "admin credential fallback": {"scroll-lifecycle.yml", "secrets.SCROLL_TEAM_REGISTRY_USER", "secrets.SCROLL_REGISTRY_USER"}, + "hard-coded owner": {"scroll-lifecycle.yml", "vars.SCROLL_OWNER_ID", "'druid-team'"}, + "admin credential fallback": {"scroll-lifecycle.yml", "secrets.SCROLL_REGISTRY_USER", "secrets.HARBOR_ADMIN_USER"}, "fork publication": {"scroll-lifecycle.yml", "github.event.pull_request.head.repo.full_name == github.repository", "true"}, "no review environment": {"scroll-lifecycle.yml", "environment: ${{ inputs.public && 'scroll-release' || 'scroll-preview' }}", "environment: production"}, "mutable CLI": {"scroll-lifecycle.yml", "a9f5dd9ec361ee5b268dfa5b5c2a56ef60f350fd", "master"}, "cancel mutation": {"scroll-lifecycle.yml", "cancel-in-progress: false", "cancel-in-progress: true"}, - "skip publisher tests": {"scroll-lifecycle.yml", "go test ./scripts/publish-lifecycle", "go test ./scripts/prebuild"}, + "skip publication tests": {"scroll-lifecycle.yml", "go test ./scripts/stage-scroll-ui", "go test ./scripts/prebuild"}, + "missing credential guard": {"scroll-lifecycle.yml", "if [[ -z \"${!name}\" ]]; then", "if [[ -n \"${!name}\" ]]; then"}, + "skip generic publish": {"scroll-lifecycle.yml", "go run ./scripts/publish-owned publish", "echo skipped-publication"}, + "admin owner sign-in": {"scroll-lifecycle.yml", "secrets.SCROLL_PUBLISH_EMAIL", "secrets.HARBOR_ADMIN_EMAIL"}, "late provisioning gate": {"scroll-lifecycle.yml", " - name: Require provisioned lifecycle environment", " - run: echo premature-step\n - name: Require provisioned lifecycle environment"}, } { t.Run(name, func(t *testing.T) { From 7ae16771240b14d9bc244d51ee2561a716a8e28b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Schottst=C3=A4dt?= Date: Thu, 22 Oct 2026 19:08:54 +0200 Subject: [PATCH 04/11] fix(ui): start file service before config access Requires the platform command-controls package release before merge. Keep local registry versions out of the public lockfile. --- ui/package-lock.json | 530 +----------------- ui/src/app.tsx | 16 +- .../file-service-gateway.test.ts | 58 ++ ui/src/config-editor/file-service-gateway.ts | 42 ++ 4 files changed, 119 insertions(+), 527 deletions(-) create mode 100644 ui/src/config-editor/file-service-gateway.test.ts create mode 100644 ui/src/config-editor/file-service-gateway.ts diff --git a/ui/package-lock.json b/ui/package-lock.json index f2cb3d65..21247bc2 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -587,9 +587,9 @@ } }, "node_modules/@druid-ui/build": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@druid-ui/build/-/build-3.0.0.tgz", - "integrity": "sha512-Tr7ctnLNpjny+btPAFbVdsDjH90GWLgsfswk8iJyBRsvW09ZV26DY8uHx1oD+yyzxuuVLqMkbhz2btMWrBdVAg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@druid-ui/build/-/build-3.0.1.tgz", + "integrity": "sha512-ZNwEE7hPmotzf/BRoOGdsF580GV8i1FuY1NbgTIaTxcLnEVbm+hMdAh8GeOTfBG3aR+NUS2j56xgDyfDLTL5mw==", "dev": true, "dependencies": { "@bytecodealliance/componentize-js": "^0.19.3", @@ -603,9 +603,9 @@ } }, "node_modules/@druid-ui/component": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@druid-ui/component/-/component-3.0.0.tgz", - "integrity": "sha512-4Hz/6M0ssAnNXHepKnMZLrjBFrXjMsZclvsBlNIacAk1ta23zOpgr/AJpWGPzDCZhqhiUM5WULRMnxNQXkZzLA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@druid-ui/component/-/component-3.0.1.tgz", + "integrity": "sha512-c6mWsenI+TKhFxN3WEDJLVyFx5GeO7xVIt7S+cAtVgzmT5eFr2AqBArbkOro4zlIBDetoO/5z1A+SX0LUSArOg==", "dev": true, "dependencies": { "@druid-ui/build": "*", @@ -624,9 +624,9 @@ } }, "node_modules/@druid-ui/plattform": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@druid-ui/plattform/-/plattform-3.0.0.tgz", - "integrity": "sha512-PJtjiuAxYJYHZAkDOooTr1PrGMLz0Ucd1W2LBY+PdCQSf3IXkLF1Lu8unRzgJLE0AQhHSe2+JlnQllWk1hcoDg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@druid-ui/plattform/-/plattform-3.0.1.tgz", + "integrity": "sha512-A3hs60cYgmF+/VVYTQPr8o1V5xLVwls8XqXe6pzuepw5W4iUulva9m+K0tCLkR5zozC7VLxAScIlx0QIvaTbFw==", "dev": true, "dependencies": { "@druid-ui/component": "*" @@ -5194,474 +5194,6 @@ } } }, - "node_modules/vitest/node_modules/@esbuild/aix-ppc64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", - "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/android-arm": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz", - "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/android-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz", - "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/android-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz", - "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/darwin-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz", - "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/darwin-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz", - "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/freebsd-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz", - "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/freebsd-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz", - "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/linux-arm": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz", - "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/linux-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz", - "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/linux-ia32": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz", - "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/linux-loong64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz", - "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/linux-mips64el": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz", - "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/linux-ppc64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz", - "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/linux-riscv64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz", - "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/linux-s390x": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz", - "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/linux-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz", - "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/netbsd-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz", - "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/netbsd-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz", - "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/openbsd-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz", - "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/openbsd-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz", - "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/openharmony-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz", - "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/sunos-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz", - "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/win32-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz", - "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/win32-ia32": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz", - "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/win32-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz", - "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, "node_modules/vitest/node_modules/@vitest/mocker": { "version": "4.1.11", "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.11.tgz", @@ -5696,50 +5228,6 @@ "dev": true, "license": "MIT" }, - "node_modules/vitest/node_modules/esbuild": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", - "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "peer": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.28.2", - "@esbuild/android-arm": "0.28.2", - "@esbuild/android-arm64": "0.28.2", - "@esbuild/android-x64": "0.28.2", - "@esbuild/darwin-arm64": "0.28.2", - "@esbuild/darwin-x64": "0.28.2", - "@esbuild/freebsd-arm64": "0.28.2", - "@esbuild/freebsd-x64": "0.28.2", - "@esbuild/linux-arm": "0.28.2", - "@esbuild/linux-arm64": "0.28.2", - "@esbuild/linux-ia32": "0.28.2", - "@esbuild/linux-loong64": "0.28.2", - "@esbuild/linux-mips64el": "0.28.2", - "@esbuild/linux-ppc64": "0.28.2", - "@esbuild/linux-riscv64": "0.28.2", - "@esbuild/linux-s390x": "0.28.2", - "@esbuild/linux-x64": "0.28.2", - "@esbuild/netbsd-arm64": "0.28.2", - "@esbuild/netbsd-x64": "0.28.2", - "@esbuild/openbsd-arm64": "0.28.2", - "@esbuild/openbsd-x64": "0.28.2", - "@esbuild/openharmony-arm64": "0.28.2", - "@esbuild/sunos-x64": "0.28.2", - "@esbuild/win32-arm64": "0.28.2", - "@esbuild/win32-ia32": "0.28.2", - "@esbuild/win32-x64": "0.28.2" - } - }, "node_modules/vitest/node_modules/vite": { "version": "8.2.2", "resolved": "https://registry.npmjs.org/vite/-/vite-8.2.2.tgz", diff --git a/ui/src/app.tsx b/ui/src/app.tsx index 00a2c6e0..4c486d95 100644 --- a/ui/src/app.tsx +++ b/ui/src/app.tsx @@ -2,12 +2,13 @@ import { createConfigEditorComponent, fingerprint, withMissingFileFallback, - type FileGateway, } from "./config-editor/index.js"; import { + ensureFileService, loadFileFromDeployment, saveFileToDeployment, } from "@druid-ui/plattform"; +import { createFileServiceGateway } from "./config-editor/file-service-gateway.js"; const requireString = (value: unknown, operation: string): string => { if (typeof value !== "string") { @@ -16,15 +17,18 @@ const requireString = (value: unknown, operation: string): string => { return value; }; -const gateway = withMissingFileFallback({ - async load(path) { +const gateway = withMissingFileFallback(createFileServiceGateway({ + ensureFileService, + async loadFile(path) { return requireString(await loadFileFromDeployment(path), "loadFileFromDeployment"); }, - async save(path, content) { + async saveFile(path, content) { await saveFileToDeployment(path, content); - return { status: "saved", fingerprint: await fingerprint(content) }; }, -} satisfies FileGateway); + async fingerprint(content) { + return fingerprint(content); + }, +})); export const component = createConfigEditorComponent({ manifestPath: ".druid/config-editor.manifest.json", diff --git a/ui/src/config-editor/file-service-gateway.test.ts b/ui/src/config-editor/file-service-gateway.test.ts new file mode 100644 index 00000000..9b02a705 --- /dev/null +++ b/ui/src/config-editor/file-service-gateway.test.ts @@ -0,0 +1,58 @@ +import { describe, expect, it, vi } from "vitest"; +import { createFileServiceGateway } from "./file-service-gateway.js"; + +const createService = () => ({ + ensureFileService: vi.fn<() => Promise>().mockResolvedValue(undefined), + loadFile: vi.fn<(path: string) => Promise>().mockResolvedValue("content"), + saveFile: vi.fn<(path: string, content: string) => Promise>().mockResolvedValue(undefined), + fingerprint: vi.fn<(content: string) => Promise>().mockResolvedValue("fingerprint"), +}); + +describe("createFileServiceGateway", () => { + it("ensures the file service before loading and saving files", async () => { + const service = createService(); + const gateway = createFileServiceGateway(service); + + await expect(gateway.load("server.properties")).resolves.toBe("content"); + await expect(gateway.save("server.properties", "content", "ignored")).resolves.toEqual({ + status: "saved", + fingerprint: "fingerprint", + }); + + expect(service.ensureFileService).toHaveBeenCalledOnce(); + expect(service.ensureFileService).toHaveBeenCalledWith(false); + expect(service.loadFile).toHaveBeenCalledWith("server.properties"); + expect(service.saveFile).toHaveBeenCalledWith("server.properties", "content"); + }); + + it("shares startup between concurrent file operations", async () => { + let resolveStartup: (() => void) | undefined; + const service = createService(); + service.ensureFileService.mockImplementation( + () => + new Promise((resolve) => { + resolveStartup = resolve; + }) + ); + const gateway = createFileServiceGateway(service); + + const load = gateway.load("server.properties"); + const save = gateway.save("server.properties", "content", "ignored"); + await vi.waitFor(() => expect(service.ensureFileService).toHaveBeenCalledOnce()); + resolveStartup?.(); + + await Promise.all([load, save]); + expect(service.ensureFileService).toHaveBeenCalledWith(false); + }); + + it("retries startup after a failure", async () => { + const service = createService(); + service.ensureFileService.mockRejectedValueOnce(new Error("unavailable")); + const gateway = createFileServiceGateway(service); + + await expect(gateway.load("server.properties")).rejects.toThrow("unavailable"); + await expect(gateway.load("server.properties")).resolves.toBe("content"); + + expect(service.ensureFileService).toHaveBeenCalledTimes(2); + }); +}); diff --git a/ui/src/config-editor/file-service-gateway.ts b/ui/src/config-editor/file-service-gateway.ts new file mode 100644 index 00000000..04dc2b89 --- /dev/null +++ b/ui/src/config-editor/file-service-gateway.ts @@ -0,0 +1,42 @@ +import type { FileGateway, SaveResult } from "./gateway.js"; + +export interface DeploymentFileService { + ensureFileService(watch?: boolean): Promise; + loadFile(path: string): Promise; + saveFile(path: string, content: string): Promise; + fingerprint(content: string): Promise; +} + +/** + * Ensures WebDAV once before using deployment files. A failed startup is not + * cached, allowing the next user action to retry it. + */ +export const createFileServiceGateway = (service: DeploymentFileService): FileGateway => { + let ready: Promise | undefined; + + const ensureReady = (): Promise => { + if (ready) return ready; + + let startup: Promise; + startup = Promise.resolve() + .then(() => service.ensureFileService(false)) + .catch((error: unknown) => { + if (ready === startup) ready = undefined; + throw error; + }); + ready = startup; + return startup; + }; + + return { + async load(path) { + await ensureReady(); + return service.loadFile(path); + }, + async save(path, content): Promise { + await ensureReady(); + await service.saveFile(path, content); + return { status: "saved", fingerprint: await service.fingerprint(content) }; + }, + }; +}; From 07c12ac0197ab43e493c53dddd607a6a46e3b6aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Schottst=C3=A4dt?= Date: Thu, 22 Oct 2026 19:12:37 +0200 Subject: [PATCH 05/11] fix(ci): retain npm peer dependency lock entries Regenerate with the npm 10 resolver used by CI. The newer local npm resolver omitted optional esbuild peer entries required by npm ci. --- ui/package-lock.json | 512 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 512 insertions(+) diff --git a/ui/package-lock.json b/ui/package-lock.json index 21247bc2..bad0eddc 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -5194,6 +5194,474 @@ } } }, + "node_modules/vitest/node_modules/@esbuild/aix-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", + "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/android-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz", + "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/android-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz", + "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/android-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz", + "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/darwin-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz", + "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/darwin-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz", + "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/freebsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz", + "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/freebsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz", + "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/linux-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz", + "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/linux-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz", + "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/linux-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz", + "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/linux-loong64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz", + "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/linux-mips64el": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz", + "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/linux-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz", + "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/linux-riscv64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz", + "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/linux-s390x": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz", + "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/linux-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz", + "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/netbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz", + "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/netbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz", + "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/openbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz", + "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/openbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz", + "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/openharmony-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz", + "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/sunos-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz", + "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/win32-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz", + "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/win32-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz", + "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/vitest/node_modules/@esbuild/win32-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz", + "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, "node_modules/vitest/node_modules/@vitest/mocker": { "version": "4.1.11", "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.11.tgz", @@ -5228,6 +5696,50 @@ "dev": true, "license": "MIT" }, + "node_modules/vitest/node_modules/esbuild": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", + "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "peer": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.2", + "@esbuild/android-arm": "0.28.2", + "@esbuild/android-arm64": "0.28.2", + "@esbuild/android-x64": "0.28.2", + "@esbuild/darwin-arm64": "0.28.2", + "@esbuild/darwin-x64": "0.28.2", + "@esbuild/freebsd-arm64": "0.28.2", + "@esbuild/freebsd-x64": "0.28.2", + "@esbuild/linux-arm": "0.28.2", + "@esbuild/linux-arm64": "0.28.2", + "@esbuild/linux-ia32": "0.28.2", + "@esbuild/linux-loong64": "0.28.2", + "@esbuild/linux-mips64el": "0.28.2", + "@esbuild/linux-ppc64": "0.28.2", + "@esbuild/linux-riscv64": "0.28.2", + "@esbuild/linux-s390x": "0.28.2", + "@esbuild/linux-x64": "0.28.2", + "@esbuild/netbsd-arm64": "0.28.2", + "@esbuild/netbsd-x64": "0.28.2", + "@esbuild/openbsd-arm64": "0.28.2", + "@esbuild/openbsd-x64": "0.28.2", + "@esbuild/openharmony-arm64": "0.28.2", + "@esbuild/sunos-x64": "0.28.2", + "@esbuild/win32-arm64": "0.28.2", + "@esbuild/win32-ia32": "0.28.2", + "@esbuild/win32-x64": "0.28.2" + } + }, "node_modules/vitest/node_modules/vite": { "version": "8.2.2", "resolved": "https://registry.npmjs.org/vite/-/vite-8.2.2.tgz", From 00c8092a9ce73076805d75a6e4d4a551329b5d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Schottst=C3=A4dt?= Date: Tue, 27 Oct 2026 02:54:58 +0100 Subject: [PATCH 06/11] ci(scrolls): push registry updates directly --- .github/workflows/pr.yml | 5 +- .github/workflows/release.yml | 5 +- .github/workflows/scroll-lifecycle.yml | 148 --------- .github/workflows/scrolls.yml | 78 +++++ docs/registry-publication.md | 54 ++++ docs/shared-lifecycle-publication.md | 74 ----- scripts/publish-owned/main.go | 281 ------------------ scripts/publish-owned/main_test.go | 170 ----------- scripts/push.sh | 36 +-- scripts/tests/push-parallel.test.sh | 59 +++- .../lifecycle_workflow.go | 134 --------- .../lifecycle_workflow_test.go | 99 ------ scripts/validate-release-workflow/main.go | 159 ---------- .../validate-release-workflow/main_test.go | 59 ---- scripts/validate_all_scrolls.sh | 2 - 15 files changed, 187 insertions(+), 1176 deletions(-) delete mode 100644 .github/workflows/scroll-lifecycle.yml create mode 100644 .github/workflows/scrolls.yml create mode 100644 docs/registry-publication.md delete mode 100644 docs/shared-lifecycle-publication.md delete mode 100644 scripts/publish-owned/main.go delete mode 100644 scripts/publish-owned/main_test.go delete mode 100644 scripts/validate-release-workflow/lifecycle_workflow.go delete mode 100644 scripts/validate-release-workflow/lifecycle_workflow_test.go delete mode 100644 scripts/validate-release-workflow/main.go delete mode 100644 scripts/validate-release-workflow/main_test.go diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 94287ebd..aed032d1 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -6,6 +6,7 @@ permissions: contents: read jobs: build-deploy: - uses: ./.github/workflows/scroll-lifecycle.yml + uses: ./.github/workflows/scrolls.yml + secrets: inherit with: - public: false + release: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 237951e9..56032a76 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,6 +8,7 @@ permissions: contents: read jobs: build-deploy: - uses: ./.github/workflows/scroll-lifecycle.yml + uses: ./.github/workflows/scrolls.yml + secrets: inherit with: - public: true + release: true diff --git a/.github/workflows/scroll-lifecycle.yml b/.github/workflows/scroll-lifecycle.yml deleted file mode 100644 index 115794b8..00000000 --- a/.github/workflows/scroll-lifecycle.yml +++ /dev/null @@ -1,148 +0,0 @@ -name: Shared Scroll lifecycle -on: - workflow_call: - inputs: - public: - description: Publish reviewed releases publicly; PR previews remain private. - required: true - type: boolean -permissions: - contents: read - -jobs: - verify: - runs-on: self-hosted - outputs: - changed: ${{ steps.changes.outputs.changed }} - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha || github.sha }} - persist-credentials: false - fetch-depth: 0 - - uses: actions/setup-go@v5 - with: - go-version: "1.24.7" - - uses: actions/setup-node@v4 - with: - node-version: "22" - cache: npm - cache-dependency-path: ui/package-lock.json - - name: Build and test Scroll UI - working-directory: ui - run: npm ci && npm test && npm run type-check && npm run build - - name: Build scroll tree - if: github.event_name == 'pull_request' - run: make build-tree - - name: Validate catalog and UI - run: go run ./scripts/validate-release-workflow && go run ./scripts/validate-scrolls.go && bash ./scripts/validate_ui_coverage.sh - - name: Test direct publication support - run: go test ./scripts/stage-scroll-ui ./scripts/validate-release-workflow ./scripts/publish-owned -count=1 - - name: Test bounded catalog publication - run: bash ./scripts/tests/push-parallel.test.sh - - name: Check release inputs - id: changes - env: - EVENT_NAME: ${{ github.event_name }} - BASE_SHA: ${{ github.event.pull_request.base.sha }} - run: | - set -euo pipefail - if [[ "$EVENT_NAME" == "pull_request" ]] && git diff --quiet "$BASE_SHA"...HEAD -- scrolls ui scripts .github/workflows go.mod go.sum Makefile; then - echo "changed=false" >> "$GITHUB_OUTPUT" - else - echo "changed=true" >> "$GITHUB_OUTPUT" - fi - - publish: - needs: verify - if: >- - needs.verify.outputs.changed == 'true' && - ((inputs.public && github.event_name != 'pull_request') || - (!inputs.public && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) - # A fresh runner keeps publisher credentials out of the untrusted validation job. - runs-on: ubuntu-latest - timeout-minutes: 360 - environment: ${{ inputs.public && 'scroll-release' || 'scroll-preview' }} - concurrency: - group: scroll-lifecycle-${{ inputs.public && 'release' || format('pr-{0}', github.event.pull_request.number) }} - cancel-in-progress: false - steps: - - name: Require provisioned lifecycle environment - env: - LIFECYCLE_READY: ${{ vars.SCROLL_LIFECYCLE_READY }} - run: | - if [[ "$LIFECYCLE_READY" != "true" ]]; then - echo "Configure the protected lifecycle environment before publication." >&2 - exit 1 - fi - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha || github.sha }} - persist-credentials: false - - name: Checkout lifecycle-capable CLI - uses: actions/checkout@v4 - with: - repository: highcard-dev/druid-cli - # Includes SOURCE_DATE_EPOCH and stable root-layer ordering. - ref: a9f5dd9ec361ee5b268dfa5b5c2a56ef60f350fd - path: .druid-cli - token: ${{ secrets.GO_REPO_TOKEN }} - persist-credentials: false - - uses: actions/setup-go@v5 - with: - go-version-file: .druid-cli/go.mod - - name: Build pinned CLI - working-directory: .druid-cli - run: | - mkdir -p "$RUNNER_TEMP/scroll-cli" - go build -o "$RUNNER_TEMP/scroll-cli/druid" ./apps/druid - echo "$RUNNER_TEMP/scroll-cli" >> "$GITHUB_PATH" - - uses: actions/setup-node@v4 - with: - node-version: "22" - cache: npm - cache-dependency-path: ui/package-lock.json - - name: Build Scroll UI - working-directory: ui - run: npm ci && npm run build - - name: Build scroll tree - if: github.event_name == 'pull_request' - run: make build-tree - - name: Validate with pinned CLI - run: ./scripts/validate_all_scrolls.sh && bash ./scripts/validate_ui_coverage.sh - - name: Push to publisher-owned registry repositories - env: - SCROLL_REGISTRY_HOST: ${{ vars.SCROLL_REGISTRY_HOST }} - SCROLL_OWNER_ID: ${{ vars.SCROLL_OWNER_ID }} - SCROLL_REGISTRY_RUNTIME_NAMESPACE: ${{ vars.SCROLL_REGISTRY_RUNTIME_NAMESPACE || 'druid-team' }} - # Owner revisions embed presentation; category-only OCI artifacts are - # not Scroll revisions and must not enter a publication snapshot. - SCROLL_PUSH_CATEGORIES: '0' - DRUID_SCROLL_RUNTIME_IMAGE: ${{ vars.DRUID_SCROLL_RUNTIME_IMAGE }} - DRUID_SCROLL_STEAMCMD_IMAGE: ${{ vars.DRUID_SCROLL_STEAMCMD_IMAGE }} - SCROLL_REGISTRY_USER: ${{ secrets.SCROLL_REGISTRY_USER }} - SCROLL_REGISTRY_PASSWORD: ${{ secrets.SCROLL_REGISTRY_PASSWORD }} - SCROLL_PUSH_MANIFEST: ${{ runner.temp }}/scroll-artifacts.txt - SCROLL_LIFECYCLE_URL: ${{ vars.SCROLL_LIFECYCLE_URL }} - SCROLL_AUTH_URL: ${{ vars.SCROLL_AUTH_URL }} - SCROLL_PUBLISH_EMAIL: ${{ secrets.SCROLL_PUBLISH_EMAIL }} - SCROLL_PUBLISH_PASSWORD: ${{ secrets.SCROLL_PUBLISH_PASSWORD }} - SCROLL_LIFECYCLE_REVIEWED: ${{ vars.SCROLL_LIFECYCLE_REVIEWED }} - SCROLL_PUBLIC: ${{ inputs.public && '1' || '0' }} - SCROLL_TAG_SUFFIX: -${{ github.event.pull_request.head.sha || github.sha }} - run: | - set -euo pipefail - for name in SCROLL_REGISTRY_HOST SCROLL_OWNER_ID SCROLL_REGISTRY_USER SCROLL_REGISTRY_PASSWORD; do - if [[ -z "${!name}" ]]; then - echo "Missing required publisher setting: $name" >&2 - exit 1 - fi - done - if [[ "$SCROLL_PUBLIC" == "1" ]]; then - go run ./scripts/publish-owned preflight - fi - : > "$SCROLL_PUSH_MANIFEST" - bash ./scripts/push.sh - if [[ "$SCROLL_PUBLIC" == "1" ]]; then - go run ./scripts/publish-owned publish - fi diff --git a/.github/workflows/scrolls.yml b/.github/workflows/scrolls.yml new file mode 100644 index 00000000..400d9340 --- /dev/null +++ b/.github/workflows/scrolls.yml @@ -0,0 +1,78 @@ +name: Build and push Scrolls +on: + workflow_call: + inputs: + release: + description: Update release tags instead of PR preview tags. + required: true + type: boolean +permissions: + contents: read + +jobs: + build-and-push: + runs-on: ubuntu-latest + timeout-minutes: 360 + concurrency: + group: scrolls-${{ inputs.release && 'release' || format('pr-{0}', github.event.pull_request.number) }} + cancel-in-progress: false + env: + DRUID_CLI_VERSION: ${{ vars.DRUID_CLI_VERSION || 'v0.1.257' }} + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + persist-credentials: false + - uses: actions/setup-go@v5 + with: + go-version: "1.24.7" + - uses: actions/setup-node@v4 + with: + node-version: "22" + cache: npm + cache-dependency-path: ui/package-lock.json + - name: Build and test Scroll UI + working-directory: ui + run: npm ci && npm test && npm run type-check && npm run build + - name: Build scroll tree + if: github.event_name == 'pull_request' + run: make build-tree + - name: Download released CLI + uses: robinraju/release-downloader@v1.7 + with: + repository: highcard-dev/druid-cli + tag: ${{ env.DRUID_CLI_VERSION }} + fileName: druid + token: ${{ github.token }} + - name: Install CLI + run: | + mkdir -p "$RUNNER_TEMP/scroll-cli" + chmod +x druid + mv druid "$RUNNER_TEMP/scroll-cli/druid" + echo "$RUNNER_TEMP/scroll-cli" >> "$GITHUB_PATH" + - name: Validate catalog and UI + run: ./scripts/validate_all_scrolls.sh && bash ./scripts/validate_ui_coverage.sh + - name: Test catalog publication + run: bash ./scripts/tests/push-parallel.test.sh + - name: Push registry updates + # Fork PRs validate without receiving registry credentials. + if: >- + (inputs.release && github.event_name != 'pull_request') || + (!inputs.release && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) + env: + SCROLL_REGISTRY_HOST: ${{ vars.SCROLL_REGISTRY_HOST || 'artifacts.druid.gg' }} + SCROLL_REGISTRY_NAMESPACE: ${{ inputs.release && (vars.SCROLL_REGISTRY_NAMESPACE || 'druid-team') || (vars.SCROLL_PREVIEW_NAMESPACE || 'druid-team-experimental') }} + SCROLL_REGISTRY_RUNTIME_NAMESPACE: ${{ vars.SCROLL_REGISTRY_RUNTIME_NAMESPACE || vars.SCROLL_REGISTRY_NAMESPACE || 'druid-team' }} + SCROLL_REGISTRY_USER: ${{ secrets.SCROLL_REGISTRY_USER }} + SCROLL_REGISTRY_PASSWORD: ${{ secrets.SCROLL_REGISTRY_PASSWORD }} + SCROLL_PUSH_CATEGORIES: ${{ inputs.release && '1' || '0' }} + DRUID_SCROLL_RUNTIME_IMAGE: ${{ vars.DRUID_SCROLL_RUNTIME_IMAGE }} + DRUID_SCROLL_STEAMCMD_IMAGE: ${{ vars.DRUID_SCROLL_STEAMCMD_IMAGE }} + run: | + set -euo pipefail + : "${SCROLL_REGISTRY_USER:?Set the SCROLL_REGISTRY_USER secret}" + : "${SCROLL_REGISTRY_PASSWORD:?Set the SCROLL_REGISTRY_PASSWORD secret}" + if [[ "${{ inputs.release }}" != "true" ]]; then + export SCROLL_TAG_SUFFIX="-pr${{ github.event.pull_request.number }}" + fi + bash ./scripts/push.sh diff --git a/docs/registry-publication.md b/docs/registry-publication.md new file mode 100644 index 00000000..a73feddf --- /dev/null +++ b/docs/registry-publication.md @@ -0,0 +1,54 @@ +# Registry updates + +CI builds the Scroll UI, validates the catalog, logs into the registry and runs +`scripts/push.sh`. That shared script is the explicit catalog used by both CI +and local seeding. Release runs update the existing repositories and tags, +with category metadata pushed before Scroll artifacts. + +There are no Druid account credentials, Core/Auth API calls, publication +snapshots, catalog registration calls or visibility changes. These repositories +are already public and registered; CI only updates their OCI artifacts. + +## Configuration + +Only two GitHub Actions secrets are required: + +- `SCROLL_REGISTRY_USER` +- `SCROLL_REGISTRY_PASSWORD` + +Optional repository variables override the existing defaults: + +| Variable | Default | +| --- | --- | +| `SCROLL_REGISTRY_HOST` | `artifacts.druid.gg` | +| `SCROLL_REGISTRY_NAMESPACE` | `druid-team` | +| `SCROLL_PREVIEW_NAMESPACE` | `druid-team-experimental` | +| `SCROLL_REGISTRY_RUNTIME_NAMESPACE` | Release namespace | +| `DRUID_CLI_VERSION` | `v0.1.257` | + +`DRUID_CLI_VERSION` selects the released CLI and default runtime image tag. +`DRUID_SCROLL_RUNTIME_IMAGE` and `DRUID_SCROLL_STEAMCMD_IMAGE` can override the +runtime image references independently. CI downloads the CLI release binary; +it does not check out or build CLI source. + +Same-repository PRs push preview tags suffixed with `-pr` into the +preview namespace without changing release tags or category metadata. Fork +PRs only build and validate. Runtime image references stay in the release +namespace. Both reusable-workflow callers inherit the repository secrets. + +## Verification and dependencies + +Run `bash scripts/tests/push-parallel.test.sh` and +`bash scripts/validate_all_scrolls.sh` locally. Use `SCROLL_PUSH_DRY_RUN=1 bash +scripts/push.sh` to inspect the catalog without registry writes. The push script +retains its serial default, bounded parallel option and category barrier. + +The existing Go tree generator, Scroll validator and UI staging helper remain: +they generate or validate actual artifact content. The CI-only Go API publisher +and workflow parser are removed. + +The Scroll UI still needs published Druid UI packages exporting +`ensureFileService`, `addAndRunCommand` and `stopCommand`, and a matching lockfile. +Local unpublished packages do not prove that a clean CI build will pass. +Registry updates themselves do not depend on Core publication APIs or a Druid +account. diff --git a/docs/shared-lifecycle-publication.md b/docs/shared-lifecycle-publication.md deleted file mode 100644 index afe201da..00000000 --- a/docs/shared-lifecycle-publication.md +++ /dev/null @@ -1,74 +0,0 @@ -# Shared authored-release publication - -## Current contract - -Release and PR workflows use the same explicit catalog in `scripts/push.sh`. -They push directly to `//:`; there is -no staging/import API. Core publishes reviewed revisions by copying an exact -snapshot into the owner's public username project. The private source remains. -See the monorepo's `docs/scroll-lifecycle-api-cutover.md` for the Core contract. - -1. Validate and build without publication credentials. -2. Enter a fresh runner and protected `scroll-release` or `scroll-preview` - environment. Fork PRs never publish; a missing readiness gate fails closed. -3. Build the pinned lifecycle-capable CLI and the Scroll UI. -4. Push owner-scoped revisions tagged with the source commit. Runtime images - stay in a separate namespace. Revisions embed presentation; category-only - artifacts are excluded from owner publication. -5. For public releases, `publish-owned` authenticates as the owner, fetches - each repository's publication preview, verifies every pushed tag against - that preview, and submits it unchanged as `expectedSnapshot`. -6. Core rejects changed content. The helper does not automatically retry - conflicts or replace pending operation intent; inspect and use the current - manual recovery flow before retrying. - -Public publication approves the complete repository, not only the latest CI -tag. Use separate release and preview identities/projects. Preview pushes stay -private. Publication does not cancel an in-flight run when another run starts. - -## Configuration - -Provision these through the protected environments, never source control: - -| Setting | Purpose | -| --- | --- | -| `SCROLL_LIFECYCLE_READY=true` | Explicit provisioning gate | -| `SCROLL_OWNER_ID` | Authenticated identity ID naming the private project | -| `SCROLL_REGISTRY_HOST` | Scheme-less Harbor host | -| `SCROLL_REGISTRY_USER`, `SCROLL_REGISTRY_PASSWORD` | Ordinary owner-scoped registry credentials | -| `SCROLL_REGISTRY_RUNTIME_NAMESPACE` | Runtime-image namespace; workflow defaults to `druid-team` | -| `SCROLL_LIFECYCLE_URL`, `SCROLL_AUTH_URL` | Core and Auth URLs sharing the trusted origin | -| `SCROLL_PUBLISH_EMAIL`, `SCROLL_PUBLISH_PASSWORD` | Ordinary publisher sign-in for public publication | -| `SCROLL_LIFECYCLE_REVIEWED=1` | Confirms content review before public publication | -| `GO_REPO_TOKEN` | Read-only access to the pinned CLI source | - -Optional `DRUID_SCROLL_RUNTIME_IMAGE` and `DRUID_SCROLL_STEAMCMD_IMAGE` -override runtime image references. Owner builds use the commit timestamp unless -`SOURCE_DATE_EPOCH` is explicitly set. The workflow sets `SCROLL_PUSH_MANIFEST` -and commit-based `SCROLL_TAG_SUFFIX`; successful pushes populate the manifest. - -`SCROLL_REGISTRY_NAMESPACE` is not a workflow requirement: `SCROLL_OWNER_ID` -determines artifact destinations, and runtime images have their own setting. -The shared push script still supports namespaces and category publication for -local bootstrap. It retains its serial default, bounded parallel option, -category barrier, and failure handling. - -## Rollout and verification - -- Deploy matching Core/runtime contracts through their normal CI. -- Configure protected environments, required reviewers and separate identities - before enabling the readiness gate. Workflow YAML does not provision those - policies. -- Publish a Druid UI package containing `ensureFileService`, - `addAndRunCommand` and `stopCommand` before releasing a consumer that uses - these imports. Local `1000.*` versions and localhost registry URLs are not - release dependencies. -- Run `go test ./scripts/publish-owned ./scripts/stage-scroll-ui ./scripts/validate-release-workflow` - and `bash ./scripts/tests/push-parallel.test.sh`. These test the publisher - contract and catalog; they do not constitute a production publication. -- Verify the first approved preview/release with the provisioned credentials. - Do not weaken approval or readiness gates to make a run green. - -The former staging/import publisher and its tests were replaced. Historical -acceptance results remain in Git history and the monorepo lifecycle audit; -they do not certify this direct-owner publisher or a production rollout. diff --git a/scripts/publish-owned/main.go b/scripts/publish-owned/main.go deleted file mode 100644 index b6231e8a..00000000 --- a/scripts/publish-owned/main.go +++ /dev/null @@ -1,281 +0,0 @@ -// Publishes direct owner pushes through Core's generic repository operation. -// It never copies, imports, or mutates a selected Scroll artifact. -package main - -import ( - "bufio" - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/http/cookiejar" - "net/url" - "os" - "regexp" - "sort" - "strings" - "time" -) - -type publisher struct { - base, auth, owner, host, email, password, manifest string - client *http.Client -} - -type publicationArtifact struct { - Digest string `json:"digest"` - Tags []string `json:"tags"` -} - -var namePattern = regexp.MustCompile(`^[a-z0-9][a-z0-9_-]{0,62}$`) -var tagPattern = regexp.MustCompile(`^[\w][\w.-]{0,127}$`) -var digestPattern = regexp.MustCompile(`^sha256:[a-f0-9]{64}$`) - -func configured() (*publisher, error) { - base := strings.TrimRight(os.Getenv("SCROLL_LIFECYCLE_URL"), "/") - auth := strings.TrimRight(os.Getenv("SCROLL_AUTH_URL"), "/") - coreURL, err := trustedURL(base) - if err != nil { - return nil, fmt.Errorf("SCROLL_LIFECYCLE_URL: %w", err) - } - authURL, err := trustedURL(auth) - if err != nil || authURL.Scheme != coreURL.Scheme || authURL.Host != coreURL.Host { - return nil, errors.New("SCROLL_AUTH_URL must share Core's trusted origin") - } - host := strings.TrimSuffix(strings.TrimPrefix(strings.TrimPrefix(os.Getenv("SCROLL_REGISTRY_HOST"), "https://"), "http://"), "/") - p := &publisher{base: base, auth: auth, owner: os.Getenv("SCROLL_OWNER_ID"), host: host, - email: os.Getenv("SCROLL_PUBLISH_EMAIL"), password: os.Getenv("SCROLL_PUBLISH_PASSWORD"), manifest: os.Getenv("SCROLL_PUSH_MANIFEST")} - if p.owner == "" || p.host == "" || strings.ContainsAny(p.host, "/\\") || p.email == "" || p.password == "" { - return nil, errors.New("owner, registry host and ordinary publisher sign-in credentials are required") - } - jar, _ := cookiejar.New(nil) - p.client = &http.Client{Timeout: 70 * time.Minute, Jar: jar, CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }} - return p, nil -} - -func trustedURL(raw string) (*url.URL, error) { - u, err := url.Parse(raw) - if err != nil || u.Host == "" || u.User != nil || u.RawQuery != "" || u.Fragment != "" || - (u.Scheme != "https" && !(u.Scheme == "http" && (u.Hostname() == "localhost" || u.Hostname() == "127.0.0.1" || u.Hostname() == "druid-gs"))) { - return nil, errors.New("expected HTTPS URL (HTTP only for local development)") - } - return u, nil -} - -func (p *publisher) authRequest(method, path string, body, out any) error { - data, err := json.Marshal(body) - if err != nil { - return err - } - ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) - defer cancel() - req, err := http.NewRequestWithContext(ctx, method, p.auth+path, bytes.NewReader(data)) - if err != nil { - return errors.New("invalid authentication request") - } - req.Header.Set("Content-Type", "application/json") - parsed, _ := url.Parse(p.auth) - req.Header.Set("Origin", parsed.Scheme+"://"+parsed.Host) - resp, err := p.client.Do(req) - if err != nil { - return errors.New("publisher authentication failed") - } - defer resp.Body.Close() - if resp.StatusCode < 200 || resp.StatusCode >= 300 { - return fmt.Errorf("publisher authentication rejected: HTTP %d", resp.StatusCode) - } - if out != nil { - return json.NewDecoder(io.LimitReader(resp.Body, 1<<20)).Decode(out) - } - return nil -} - -func (p *publisher) request(method, path string, body, out any) error { - var jwt struct { - Token string `json:"token"` - } - if err := p.authRequest(http.MethodGet, "/token", nil, &jwt); err != nil { - return err - } - if jwt.Token == "" { - return errors.New("authentication returned no owner token") - } - data, err := json.Marshal(body) - if err != nil { - return err - } - req, err := http.NewRequest(method, p.base+path, bytes.NewReader(data)) - if err != nil { - return errors.New("invalid lifecycle request") - } - req.Header.Set("Authorization", "Bearer "+jwt.Token) - req.Header.Set("Content-Type", "application/json") - resp, err := p.client.Do(req) - if err != nil { - return errors.New("lifecycle request failed; inspect published state before retrying") - } - defer resp.Body.Close() - if resp.StatusCode < 200 || resp.StatusCode >= 300 { - return fmt.Errorf("lifecycle request rejected: HTTP %d", resp.StatusCode) - } - if out != nil { - return json.NewDecoder(io.LimitReader(resp.Body, 1<<20)).Decode(out) - } - return nil -} - -func (p *publisher) preflight() error { - var project struct { - Registry string `json:"registry"` - Project string `json:"project"` - } - if err := p.request(http.MethodGet, "/v1/registry/project", nil, &project); err != nil { - return err - } - if project.Registry != p.host || project.Project != p.host+"/"+p.owner { - return errors.New("authenticated owner or registry differs from publisher configuration") - } - return nil -} - -func (p *publisher) parseRef(ref string) (string, string, error) { - prefix := p.host + "/" - if !strings.HasPrefix(ref, prefix) { - return "", "", errors.New("push manifest contains another registry") - } - project, remainder, ok := strings.Cut(strings.TrimPrefix(ref, prefix), "/") - if !ok { - return "", "", errors.New("push manifest contains no repository") - } - name, tag, ok := strings.Cut(remainder, ":") - if !ok || !namePattern.MatchString(name) || !tagPattern.MatchString(tag) { - return "", "", errors.New("push manifest contains an invalid tagged Scroll") - } - if project != p.owner { - return "", "", errors.New("push manifest contains a repository outside the owner project") - } - return name, ref, nil -} - -func (p *publisher) publishManifest() error { - if os.Getenv("SCROLL_LIFECYCLE_REVIEWED") != "1" { - return errors.New("public publication requires SCROLL_LIFECYCLE_REVIEWED=1") - } - if p.manifest == "" { - return errors.New("SCROLL_PUSH_MANIFEST is required") - } - file, err := os.Open(p.manifest) - if err != nil { - return err - } - defer file.Close() - selected := map[string]map[string]bool{} - scanner := bufio.NewScanner(file) - scanner.Buffer(make([]byte, 4096), 1<<20) - for scanner.Scan() { - name, ref, err := p.parseRef(scanner.Text()) - if err != nil { - return err - } - if selected[name] == nil { - selected[name] = map[string]bool{} - } - selected[name][ref] = true - } - if err := scanner.Err(); err != nil { - return err - } - if len(selected) == 0 { - return errors.New("no pushed Scroll artifacts to publish") - } - names := make([]string, 0, len(selected)) - for name := range selected { - names = append(names, name) - } - sort.Strings(names) - for _, name := range names { - var snapshot []publicationArtifact - if err := p.request(http.MethodGet, "/v1/registry/repositories/"+url.PathEscape(name)+"/publication-preview", nil, &snapshot); err != nil { - return fmt.Errorf("preview %s: %w", name, err) - } - if len(snapshot) == 0 { - return fmt.Errorf("empty publication preview for %s", name) - } - previewTags := map[string]string{} - for _, artifact := range snapshot { - if !digestPattern.MatchString(artifact.Digest) || artifact.Tags == nil { - return fmt.Errorf("invalid publication preview for %s", name) - } - for _, tag := range artifact.Tags { - if !tagPattern.MatchString(tag) || previewTags[tag] != "" { - return fmt.Errorf("invalid publication tag for %s", name) - } - previewTags[tag] = artifact.Digest - } - } - refs := make([]string, 0, len(selected[name])) - for ref := range selected[name] { - refs = append(refs, ref) - } - sort.Strings(refs) - for _, ref := range refs { - var resolved struct { - Repository string `json:"repository"` - Digest string `json:"digest"` - Artifact string `json:"artifact"` - } - if err := p.request(http.MethodGet, "/v1/registry/scrolls/revision?artifact="+url.QueryEscape(ref), nil, &resolved); err != nil { - return fmt.Errorf("resolve %s: %w", ref, err) - } - repository := ref[:strings.LastIndex(ref, ":")] - if resolved.Repository != repository || !digestPattern.MatchString(resolved.Digest) || resolved.Artifact != repository+"@"+resolved.Digest { - return fmt.Errorf("resolved revision differs from pushed repository %s", repository) - } - if previewTags[ref[strings.LastIndex(ref, ":")+1:]] != resolved.Digest { - return fmt.Errorf("pushed revision changed since publication preview: %s", ref) - } - } - input := map[string]any{"repository": name, "expectedSnapshot": snapshot, "reviewedPublicContent": true} - if err := p.request(http.MethodPost, "/v1/registry/scrolls/publish", input, nil); err != nil { - return fmt.Errorf("publish %s: %w", name, err) - } - for _, ref := range refs { - fmt.Println(ref) - } - } - return nil -} - -func run() error { - if len(os.Args) != 2 || (os.Args[1] != "preflight" && os.Args[1] != "publish") { - return errors.New("usage: publish-owned preflight|publish") - } - p, err := configured() - if err != nil { - return err - } - if os.Getenv("SCROLL_LIFECYCLE_REVIEWED") != "1" { - return errors.New("public publication requires reviewed content") - } - if err := p.authRequest(http.MethodPost, "/sign-in/email", map[string]string{"email": p.email, "password": p.password}, nil); err != nil { - return err - } - defer p.authRequest(http.MethodPost, "/sign-out", map[string]any{}, nil) - if err := p.preflight(); err != nil { - return err - } - if os.Args[1] == "publish" { - return p.publishManifest() - } - return nil -} - -func main() { - if err := run(); err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } -} diff --git a/scripts/publish-owned/main_test.go b/scripts/publish-owned/main_test.go deleted file mode 100644 index 875dcb9c..00000000 --- a/scripts/publish-owned/main_test.go +++ /dev/null @@ -1,170 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "net/http" - "net/http/cookiejar" - "net/http/httptest" - "os" - "path/filepath" - "strings" - "testing" -) - -func testRef(owner, host, name, tag string) string { - return fmt.Sprintf("%s/%s/%s:%s", host, owner, name, tag) -} - -func TestParseRefRequiresOwnerPrivateProject(t *testing.T) { - p := &publisher{owner: "owner-1", host: "registry.example:5000"} - ref := testRef(p.owner, p.host, "example", "v1") - name, got, err := p.parseRef(ref) - if err != nil || name != "example" || got != ref { - t.Fatalf("owned direct push rejected: %q %q %v", name, got, err) - } - for _, invalid := range []string{ - testRef("another-owner", p.host, "example", "v1"), - "other.example/project/example:v1", - strings.Replace(ref, "/example:v1", "/nested/example:v1", 1), - strings.TrimSuffix(ref, ":v1") + ":invalid:tag", - } { - if _, _, err := p.parseRef(invalid); err == nil { - t.Errorf("accepted unsafe push manifest reference: %s", invalid) - } - } -} - -func TestPublishManifestUsesReviewedSnapshotAndOneOperationPerRepository(t *testing.T) { - t.Setenv("SCROLL_LIFECYCLE_REVIEWED", "1") - owner, host, name := "owner-1", "registry.example:5000", "example" - first := testRef(owner, host, name, "v1") - second := testRef(owner, host, name, "v2") - repository := first[:strings.LastIndex(first, ":")] - digest := "sha256:" + strings.Repeat("a", 64) - snapshot := []map[string]any{{"digest": digest, "tags": []string{"v1", "v2"}}} - manifest := filepath.Join(t.TempDir(), "pushed.txt") - if err := os.WriteFile(manifest, []byte(first+"\n"+second+"\n"), 0600); err != nil { - t.Fatal(err) - } - resolved, previewed, published := 0, 0, 0 - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - switch r.URL.Path { - case "/sign-in/email": - http.SetCookie(w, &http.Cookie{Name: "session", Value: "fixture", Path: "/"}) - case "/token": - if _, err := r.Cookie("session"); err != nil { - t.Error("missing owner session") - } - _ = json.NewEncoder(w).Encode(map[string]string{"token": "owner-jwt"}) - case "/v1/registry/project": - if r.Header.Get("Authorization") != "Bearer owner-jwt" { - t.Error("missing owner token") - } - _ = json.NewEncoder(w).Encode(map[string]string{"registry": host, "project": host + "/" + owner}) - case "/v1/registry/scrolls/revision": - resolved++ - if r.URL.Query().Get("artifact") != first && r.URL.Query().Get("artifact") != second { - t.Error("resolved wrong pushed ref") - } - _ = json.NewEncoder(w).Encode(map[string]string{"repository": repository, "digest": digest, "artifact": repository + "@" + digest}) - case "/v1/registry/repositories/example/publication-preview": - previewed++ - _ = json.NewEncoder(w).Encode(snapshot) - case "/v1/registry/scrolls/publish": - published++ - var input struct { - Repository string `json:"repository"` - Snapshot []map[string]any `json:"expectedSnapshot"` - Reviewed bool `json:"reviewedPublicContent"` - } - if err := json.NewDecoder(r.Body).Decode(&input); err != nil { - t.Error(err) - } - got, _ := json.Marshal(input.Snapshot) - want, _ := json.Marshal(snapshot) - if input.Repository != name || string(got) != string(want) || !input.Reviewed { - t.Errorf("unexpected publication input: %+v", input) - } - default: - t.Errorf("unexpected request: %s", r.URL.Path) - http.NotFound(w, r) - } - })) - defer server.Close() - jar, _ := cookiejar.New(nil) - p := &publisher{base: server.URL, auth: server.URL, owner: owner, host: host, manifest: manifest, client: &http.Client{Jar: jar}} - if err := p.authRequest(http.MethodPost, "/sign-in/email", map[string]string{"email": "owner@example.com", "password": "fixture"}, nil); err != nil { - t.Fatal(err) - } - if err := p.preflight(); err != nil { - t.Fatal(err) - } - if err := p.publishManifest(); err != nil { - t.Fatal(err) - } - if resolved != 2 || previewed != 1 || published != 1 { - t.Fatalf("expected two resolves, one preview and one publish, got %d, %d and %d", resolved, previewed, published) - } -} - -func TestPublishManifestRequiresReview(t *testing.T) { - t.Setenv("SCROLL_LIFECYCLE_REVIEWED", "") - if err := (&publisher{}).publishManifest(); err == nil { - t.Fatal("publication without content review accepted") - } -} - -func TestPublishManifestRejectsUnsafePreview(t *testing.T) { - for _, scenario := range []string{"empty", "invalid digest", "missing tag", "moved tag", "conflict"} { - t.Run(scenario, func(t *testing.T) { - t.Setenv("SCROLL_LIFECYCLE_REVIEWED", "1") - digest := "sha256:" + strings.Repeat("a", 64) - ref := testRef("owner", "registry.example", "example", "v1") - manifest := filepath.Join(t.TempDir(), "pushed.txt") - if err := os.WriteFile(manifest, []byte(ref+"\n"), 0600); err != nil { - t.Fatal(err) - } - published := 0 - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - switch r.URL.Path { - case "/token": - _ = json.NewEncoder(w).Encode(map[string]string{"token": "fixture"}) - case "/v1/registry/repositories/example/publication-preview": - snapshot := []publicationArtifact{{Digest: digest, Tags: []string{"v1"}}} - switch scenario { - case "empty": - snapshot = nil - case "invalid digest": - snapshot[0].Digest = "latest" - case "missing tag": - snapshot[0].Tags = []string{"v2"} - case "moved tag": - snapshot[0].Digest = "sha256:" + strings.Repeat("b", 64) - } - _ = json.NewEncoder(w).Encode(snapshot) - case "/v1/registry/scrolls/revision": - _ = json.NewEncoder(w).Encode(map[string]string{"repository": "registry.example/owner/example", "digest": digest, "artifact": "registry.example/owner/example@" + digest}) - case "/v1/registry/scrolls/publish": - published++ - http.Error(w, "changed since review", http.StatusConflict) - default: - t.Errorf("unexpected request: %s", r.URL.Path) - http.NotFound(w, r) - } - })) - defer server.Close() - p := &publisher{base: server.URL, auth: server.URL, owner: "owner", host: "registry.example", manifest: manifest, client: server.Client()} - if err := p.publishManifest(); err == nil { - t.Fatal("unsafe publication accepted") - } - want := 0 - if scenario == "conflict" { - want = 1 - } - if published != want { - t.Fatalf("publication requests: got %d, want %d; conflicts must not auto-retry", published, want) - } - }) - } -} diff --git a/scripts/push.sh b/scripts/push.sh index a406be99..6ea02b6b 100755 --- a/scripts/push.sh +++ b/scripts/push.sh @@ -11,7 +11,6 @@ DRUID_BIN="${DRUID_BIN:-druid}" SCROLL_PUSH_DRY_RUN="${SCROLL_PUSH_DRY_RUN:-0}" SCROLL_REGISTRY_HOST="${SCROLL_REGISTRY_HOST:-artifacts.druid.gg}" SCROLL_REGISTRY_NAMESPACE="${SCROLL_REGISTRY_NAMESPACE:-druid-team}" -SCROLL_OWNER_ID="${SCROLL_OWNER_ID:-}" SCROLL_REGISTRY_USER="${SCROLL_REGISTRY_USER:-}" SCROLL_REGISTRY_PASSWORD="${SCROLL_REGISTRY_PASSWORD:-}" DRUID_CLI_VERSION="${DRUID_CLI_VERSION:-v0.1.257}" @@ -32,11 +31,6 @@ registry_host="${SCROLL_REGISTRY_HOST#http://}" registry_host="${registry_host#https://}" registry_host="${registry_host%%/*}" registry_prefix="${registry_host}/${SCROLL_REGISTRY_NAMESPACE}" -if [[ -n "$SCROLL_OWNER_ID" ]]; then - [[ "$SCROLL_OWNER_ID" =~ ^[a-z0-9][a-z0-9_-]{0,62}$ ]] || { echo "Invalid owner project" >&2; exit 2; } - registry_prefix="${registry_host}/${SCROLL_OWNER_ID}" - export SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(git show -s --format=%ct HEAD)}" -fi runtime_namespace="${SCROLL_REGISTRY_RUNTIME_NAMESPACE:-${SCROLL_REGISTRY_NAMESPACE}}" runtime_prefix="${registry_host}/${runtime_namespace}" runtime_image="${DRUID_SCROLL_RUNTIME_IMAGE:-${runtime_prefix}/druid:${DRUID_CLI_VERSION}}" @@ -85,22 +79,11 @@ login_if_configured() { rewrite_registry_reference() { local value="$1" - local source_prefix="artifacts.druid.gg/druid-team/" if [[ "$value" == "$runtime_image" || "$value" == "$steamcmd_image" ]]; then printf '%s' "$value" return fi - if [[ -n "$SCROLL_OWNER_ID" && "$value" == "$source_prefix"* ]]; then - local path="${value#"$source_prefix"}" - local name="${path%%[:@]*}" - if [[ ! "$name" =~ ^[a-z0-9][a-z0-9_-]{0,62}$ ]]; then - echo "Invalid owner Scroll repository: $name" >&2 - return 2 - fi - printf '%s' "${registry_prefix}/${path}" - else - printf '%s' "${value//artifacts.druid.gg\/druid-team/$registry_prefix}" - fi + printf '%s' "${value//artifacts.druid.gg\/druid-team/$registry_prefix}" } run() { @@ -121,12 +104,6 @@ run() { command[2]="$ref" fi - # Direct owner repositories carry their own presentation metadata. The - # generic publication preflight cannot depend on separate category artifacts. - if [[ -n "$SCROLL_OWNER_ID" && "${command[1]:-}" == "push" && "${command[2]:-}" != "category" ]]; then - command+=(--pack-meta) - fi - # The catalog intentionally uses production refs. Retarget them here for # local Harbor, staging, or PR namespaces without changing every push line. for index in "${!command[@]}"; do @@ -157,24 +134,17 @@ run() { fi if ((SCROLL_PUSH_JOBS == 1)); then - execute_push "${command[@]}" + "${command[@]}" return fi - execute_push "${command[@]}" & + "${command[@]}" & push_pids+=("$!") if ((${#push_pids[@]} >= SCROLL_PUSH_JOBS)); then wait_for_oldest_push fi } -execute_push() { - "$@" || return - if [[ -n "${SCROLL_PUSH_MANIFEST:-}" && "$2" == "push" && "$3" != "category" ]]; then - printf '%s\n' "$3" >> "$SCROLL_PUSH_MANIFEST" - fi -} - push_release_categories() { run druid push category artifacts.druid.gg/druid-team/scroll-minecraft-spigot minecraft ./scrolls/minecraft/minecraft-spigot/.meta run druid push category artifacts.druid.gg/druid-team/scroll-minecraft-vanilla minecraft ./scrolls/minecraft/minecraft-vanilla/.meta diff --git a/scripts/tests/push-parallel.test.sh b/scripts/tests/push-parallel.test.sh index 57a6543b..d8713b79 100644 --- a/scripts/tests/push-parallel.test.sh +++ b/scripts/tests/push-parallel.test.sh @@ -38,20 +38,32 @@ artifact_dry_run="$( SCROLL_PUSH_DRY_RUN=1 \ SCROLL_PUSH_CATEGORIES=0 \ SCROLL_PUSH_ARTIFACTS=1 \ - SCROLL_OWNER_ID=test-owner \ bash "$push_script" )" -[[ "$artifact_dry_run" == *"artifacts.druid.gg/test-owner/scroll-minecraft-spigot:1.17"* ]] || \ - fail "direct pushes must target the owner's private project" +[[ "$artifact_dry_run" == *"artifacts.druid.gg/druid-team/scroll-minecraft-spigot:1.17"* ]] || \ + fail "release pushes must update the existing repositories and tags" [[ "$artifact_dry_run" == *"-i artifacts.druid.gg/druid-team/druid:v0.1.257"* ]] || \ - fail "owner mapping must leave runtime image references unchanged" -[[ "$artifact_dry_run" == *"--pack-meta"* ]] || \ - fail "direct owner pushes must carry presentation metadata" + fail "release pushes must preserve runtime image references" [[ "$category_dry_run" == *"artifacts.druid.gg/druid-team/scroll-minecraft-spigot"* ]] || \ fail "category metadata must retain the configured registry namespace" expected_categories="$(printf '%s\n' "$category_dry_run" | grep -Ec '^"?druid"? push category ')" expected_artifacts="$(printf '%s\n' "$artifact_dry_run" | grep -Ec '^"?druid"? push ')" +preview_dry_run="$( + SCROLL_PUSH_DRY_RUN=1 \ + SCROLL_PUSH_CATEGORIES=0 \ + SCROLL_REGISTRY_NAMESPACE=druid-team-experimental \ + SCROLL_REGISTRY_RUNTIME_NAMESPACE=druid-team \ + SCROLL_TAG_SUFFIX=-pr123 \ + bash "$push_script" +)" +[[ "$preview_dry_run" == *"artifacts.druid.gg/druid-team-experimental/scroll-minecraft-spigot:1.17-pr123"* ]] || \ + fail "preview pushes must use the preview namespace and tag suffix" +[[ "$preview_dry_run" == *"-i artifacts.druid.gg/druid-team/druid:v0.1.257"* ]] || \ + fail "preview pushes must leave runtime images in the release namespace" +[[ "$preview_dry_run" == *"-i artifacts.druid.gg/druid-team/druid:v0.1.257-steamcmd"* ]] || \ + fail "preview pushes must preserve the SteamCMD runtime image" + serial_dry_run="$(SCROLL_PUSH_DRY_RUN=1 SCROLL_PUSH_JOBS=1 bash "$push_script")" parallel_dry_run="$(SCROLL_PUSH_DRY_RUN=1 SCROLL_PUSH_JOBS=4 bash "$push_script")" assert_equals "$serial_dry_run" "$parallel_dry_run" \ @@ -82,12 +94,39 @@ reset_state assert_equals "1" "$(<"$tmp_dir/state/max")" \ "the default must preserve serial push behavior" +reset_state +DRUID_BIN="$fake_druid" \ +FAKE_DRUID_STATE_DIR="$tmp_dir/state" \ +FAKE_DRUID_SLEEP=0 \ +SCROLL_REGISTRY_USER=test-publisher \ +SCROLL_REGISTRY_PASSWORD=test-password \ +SCROLL_PUSH_ARTIFACTS=0 \ + bash "$push_script" >"$tmp_dir/login.out" +grep -q '^start artifact login --host artifacts.druid.gg --user test-publisher --password test-password$' "$tmp_dir/state/events.log" || \ + fail "configured registry credentials must be passed to druid login" +assert_equals "start artifact login" "$(head -n 1 "$tmp_dir/state/events.log" | cut -d ' ' -f1-3)" \ + "registry login must happen before any push" + +reset_state +if DRUID_BIN="$fake_druid" \ + FAKE_DRUID_STATE_DIR="$tmp_dir/state" \ + FAKE_DRUID_SLEEP=0 \ + FAKE_DRUID_FAIL_REF=--host \ + SCROLL_REGISTRY_USER=test-publisher \ + SCROLL_REGISTRY_PASSWORD=test-password \ + SCROLL_PUSH_ARTIFACTS=0 \ + bash "$push_script" >"$tmp_dir/login-failure.out" 2>"$tmp_dir/login-failure.err"; then + fail "a failed registry login must make push.sh fail" +fi +if grep -q '^start .* push ' "$tmp_dir/state/events.log"; then + fail "no artifacts or categories may be pushed after a failed login" +fi + reset_state DRUID_BIN="$fake_druid" \ FAKE_DRUID_STATE_DIR="$tmp_dir/state" \ FAKE_DRUID_SLEEP=0.02 \ SCROLL_PUSH_JOBS=3 \ -SCROLL_PUSH_MANIFEST="$tmp_dir/pushed.txt" \ bash "$push_script" >"$tmp_dir/parallel.out" maximum="$(<"$tmp_dir/state/max")" @@ -100,12 +139,6 @@ assert_equals "$expected_categories" "$actual_categories" \ "parallel mode must invoke every category push exactly once" assert_equals "$expected_artifacts" "$actual_artifacts" \ "parallel mode must invoke every artifact push exactly once" -assert_equals "$expected_artifacts" "$(wc -l < "$tmp_dir/pushed.txt" | tr -d ' ')" \ - "the publication manifest must record each successful artifact push" -if grep -q 'category' "$tmp_dir/pushed.txt"; then - fail "category metadata must not enter the publication manifest" -fi - last_category_end="$(grep -n '^end category ' "$tmp_dir/state/events.log" | tail -n 1 | cut -d: -f1)" first_artifact_start="$(grep -m 1 -n '^start artifact ' "$tmp_dir/state/events.log" | cut -d: -f1)" ((last_category_end < first_artifact_start)) || \ diff --git a/scripts/validate-release-workflow/lifecycle_workflow.go b/scripts/validate-release-workflow/lifecycle_workflow.go deleted file mode 100644 index 9dd57fb5..00000000 --- a/scripts/validate-release-workflow/lifecycle_workflow.go +++ /dev/null @@ -1,134 +0,0 @@ -package main - -import ( - "fmt" - "os" - "path/filepath" - "regexp" - "strings" - - "gopkg.in/yaml.v3" -) - -type lifecycleWorkflow struct { - Jobs map[string]lifecycleJob `yaml:"jobs"` -} - -type lifecycleJob struct { - Uses string `yaml:"uses"` - With map[string]any `yaml:"with"` - Secrets any `yaml:"secrets"` - Env map[string]string `yaml:"env"` - Needs string `yaml:"needs"` - If string `yaml:"if"` - RunsOn string `yaml:"runs-on"` - Environment string `yaml:"environment"` - Concurrency struct { - Cancel bool `yaml:"cancel-in-progress"` - } `yaml:"concurrency"` - Steps []lifecycleStep `yaml:"steps"` -} - -type lifecycleStep struct { - Name string `yaml:"name"` - Uses string `yaml:"uses"` - Run string `yaml:"run"` - Env map[string]string `yaml:"env"` - With map[string]any `yaml:"with"` -} - -// Check the actual CI callers and keep publication in protected environments. -func validateLifecycleWorkflows(directory string) error { - read := func(name string) (lifecycleWorkflow, error) { - var workflow lifecycleWorkflow - data, err := os.ReadFile(filepath.Join(directory, name)) - if err == nil { - err = yaml.Unmarshal(data, &workflow) - } - return workflow, err - } - for file, public := range map[string]bool{"release.yml": true, "pr.yml": false} { - workflow, err := read(file) - if err != nil { - return err - } - job := workflow.Jobs["build-deploy"] - if len(workflow.Jobs) != 1 || job.Uses != "./.github/workflows/scroll-lifecycle.yml" || job.With["public"] != public || job.Secrets != nil { - return fmt.Errorf("%s must call the shared lifecycle with public=%t and no inherited secrets", file, public) - } - } - workflow, err := read("scroll-lifecycle.yml") - if err != nil { - return err - } - verify, publish := workflow.Jobs["verify"], workflow.Jobs["publish"] - if publish.Needs != "verify" || publish.Environment != "${{ inputs.public && 'scroll-release' || 'scroll-preview' }}" || publish.RunsOn != "ubuntu-latest" || publish.Concurrency.Cancel { - return fmt.Errorf("publication requires verification, protected environments, a fresh runner and non-cancelling concurrency") - } - wantCondition := "needs.verify.outputs.changed == 'true' && ((inputs.public && github.event_name != 'pull_request') || (!inputs.public && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository))" - if strings.Join(strings.Fields(publish.If), " ") != wantCondition { - return fmt.Errorf("publication must reject fork PRs and public PR publication") - } - if len(verify.Env) != 0 || len(publish.Env) != 0 { - return fmt.Errorf("lifecycle credentials/configuration must be scoped to steps, not whole jobs") - } - tests, gate, cli, publishCount := false, false, false, 0 - for _, step := range verify.Steps { - if strings.Contains(step.Run, "go test ./scripts/stage-scroll-ui ./scripts/validate-release-workflow ./scripts/publish-owned") { - tests = true - } - for _, value := range step.Env { - if strings.Contains(value, "secrets.") { - return fmt.Errorf("validation must not receive publication secrets") - } - } - } - for index, step := range publish.Steps { - if step.Name == "Require provisioned lifecycle environment" && step.Env["LIFECYCLE_READY"] == "${{ vars.SCROLL_LIFECYCLE_READY }}" && strings.Contains(step.Run, "exit 1") { - if index != 0 { - return fmt.Errorf("provisioning gate must precede every publication job step") - } - gate = true - } - if step.With["repository"] == "highcard-dev/druid-cli" { - ref, _ := step.With["ref"].(string) - cli = regexp.MustCompile(`^[a-f0-9]{40}$`).MatchString(ref) && step.With["persist-credentials"] == false - } - if !strings.Contains(step.Run, "bash ./scripts/push.sh") { - continue - } - publishCount++ - if !strings.Contains(step.Run, "for name in SCROLL_REGISTRY_HOST SCROLL_OWNER_ID SCROLL_REGISTRY_USER SCROLL_REGISTRY_PASSWORD; do") || - !strings.Contains(step.Run, "if [[ -z \"${!name}\" ]]; then") || !strings.Contains(step.Run, "exit 1") || - !strings.Contains(step.Run, "go run ./scripts/publish-owned preflight") || !strings.Contains(step.Run, "go run ./scripts/publish-owned publish") || - !strings.Contains(step.Run, ": > \"$SCROLL_PUSH_MANIFEST\"") { - return fmt.Errorf("lifecycle publication must reject missing publisher settings") - } - for name, want := range map[string]string{ - "SCROLL_LIFECYCLE_URL": "${{ vars.SCROLL_LIFECYCLE_URL }}", - "SCROLL_AUTH_URL": "${{ vars.SCROLL_AUTH_URL }}", - "SCROLL_PUBLISH_EMAIL": "${{ secrets.SCROLL_PUBLISH_EMAIL }}", - "SCROLL_PUBLISH_PASSWORD": "${{ secrets.SCROLL_PUBLISH_PASSWORD }}", - "SCROLL_LIFECYCLE_REVIEWED": "${{ vars.SCROLL_LIFECYCLE_REVIEWED }}", - "SCROLL_PUBLIC": "${{ inputs.public && '1' || '0' }}", - "SCROLL_PUSH_MANIFEST": "${{ runner.temp }}/scroll-artifacts.txt", - "SCROLL_OWNER_ID": "${{ vars.SCROLL_OWNER_ID }}", - "SCROLL_REGISTRY_RUNTIME_NAMESPACE": "${{ vars.SCROLL_REGISTRY_RUNTIME_NAMESPACE || 'druid-team' }}", - "SCROLL_PUSH_CATEGORIES": "0", - "SCROLL_REGISTRY_USER": "${{ secrets.SCROLL_REGISTRY_USER }}", - "SCROLL_REGISTRY_PASSWORD": "${{ secrets.SCROLL_REGISTRY_PASSWORD }}", - "SCROLL_TAG_SUFFIX": "-${{ github.event.pull_request.head.sha || github.sha }}", - } { - if step.Env[name] != want { - return fmt.Errorf("lifecycle publication has incorrect %s", name) - } - } - if _, legacyMode := step.Env["SCROLL_PUBLISH_MODE"]; legacyMode { - return fmt.Errorf("publisher workflow must use direct push without a lifecycle mode") - } - } - if !tests || !gate || !cli || publishCount != 1 { - return fmt.Errorf("shared workflow needs publication tests, provisioning gate, pinned CLI and one catalog push") - } - return nil -} diff --git a/scripts/validate-release-workflow/lifecycle_workflow_test.go b/scripts/validate-release-workflow/lifecycle_workflow_test.go deleted file mode 100644 index 82fdac8b..00000000 --- a/scripts/validate-release-workflow/lifecycle_workflow_test.go +++ /dev/null @@ -1,99 +0,0 @@ -package main - -import ( - "context" - "os" - "os/exec" - "path/filepath" - "strings" - "testing" - "time" - - "gopkg.in/yaml.v3" -) - -func TestLifecycleWorkflows(t *testing.T) { - if err := validateLifecycleWorkflows("../../.github/workflows"); err != nil { - t.Fatal(err) - } -} - -func TestLifecycleProvisioningGate(t *testing.T) { - data, err := os.ReadFile("../../.github/workflows/scroll-lifecycle.yml") - if err != nil { - t.Fatal(err) - } - var workflow lifecycleWorkflow - if err := yaml.Unmarshal(data, &workflow); err != nil { - t.Fatal(err) - } - steps := workflow.Jobs["publish"].Steps - if len(steps) == 0 || steps[0].Name != "Require provisioned lifecycle environment" { - t.Fatal("provisioning gate must run before checkout or any credential-bearing step") - } - for _, value := range []string{"", "false", "TRUE", "true"} { - t.Run("ready="+value, func(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) - defer cancel() - command := exec.CommandContext(ctx, "bash", "-eo", "pipefail", "-c", steps[0].Run) - command.Env = []string{"PATH=" + os.Getenv("PATH")} - if value != "" { - command.Env = append(command.Env, "LIFECYCLE_READY="+value) - } - output, err := command.CombinedOutput() - if ctx.Err() != nil { - t.Fatal(ctx.Err()) - } - if value == "true" { - if err != nil { - t.Fatalf("provisioned environment rejected: %v: %s", err, output) - } - } else if exit, ok := err.(*exec.ExitError); !ok || exit.ExitCode() != 1 { - t.Fatalf("unprovisioned environment must exit 1: %v: %s", err, output) - } - }) - } -} - -func TestLifecycleWorkflowRejectsMissingCutoverGuards(t *testing.T) { - for name, change := range map[string][3]string{ - "category artifacts in owner repositories": {"scroll-lifecycle.yml", "SCROLL_PUSH_CATEGORIES: '0'", "SCROLL_PUSH_CATEGORIES: '1'"}, - "legacy caller": {"release.yml", "./.github/workflows/scroll-lifecycle.yml", "./.github/workflows/legacy.yml"}, - "public preview": {"pr.yml", "public: false", "public: true"}, - "staging fallback": {"scroll-lifecycle.yml", "SCROLL_OWNER_ID: ${{ vars.SCROLL_OWNER_ID }}", "SCROLL_OWNER_ID: ${{ vars.SCROLL_OWNER_ID }}\n SCROLL_PUBLISH_MODE: lifecycle"}, - "mutable revision": {"scroll-lifecycle.yml", "SCROLL_TAG_SUFFIX: -${{ github.event.pull_request.head.sha || github.sha }}", "SCROLL_TAG_SUFFIX: -latest"}, - "hard-coded owner": {"scroll-lifecycle.yml", "vars.SCROLL_OWNER_ID", "'druid-team'"}, - "admin credential fallback": {"scroll-lifecycle.yml", "secrets.SCROLL_REGISTRY_USER", "secrets.HARBOR_ADMIN_USER"}, - "fork publication": {"scroll-lifecycle.yml", "github.event.pull_request.head.repo.full_name == github.repository", "true"}, - "no review environment": {"scroll-lifecycle.yml", "environment: ${{ inputs.public && 'scroll-release' || 'scroll-preview' }}", "environment: production"}, - "mutable CLI": {"scroll-lifecycle.yml", "a9f5dd9ec361ee5b268dfa5b5c2a56ef60f350fd", "master"}, - "cancel mutation": {"scroll-lifecycle.yml", "cancel-in-progress: false", "cancel-in-progress: true"}, - "skip publication tests": {"scroll-lifecycle.yml", "go test ./scripts/stage-scroll-ui", "go test ./scripts/prebuild"}, - "missing credential guard": {"scroll-lifecycle.yml", "if [[ -z \"${!name}\" ]]; then", "if [[ -n \"${!name}\" ]]; then"}, - "skip generic publish": {"scroll-lifecycle.yml", "go run ./scripts/publish-owned publish", "echo skipped-publication"}, - "admin owner sign-in": {"scroll-lifecycle.yml", "secrets.SCROLL_PUBLISH_EMAIL", "secrets.HARBOR_ADMIN_EMAIL"}, - "late provisioning gate": {"scroll-lifecycle.yml", " - name: Require provisioned lifecycle environment", " - run: echo premature-step\n - name: Require provisioned lifecycle environment"}, - } { - t.Run(name, func(t *testing.T) { - dir := t.TempDir() - for _, file := range []string{"release.yml", "pr.yml", "scroll-lifecycle.yml"} { - data, err := os.ReadFile(filepath.Join("../../.github/workflows", file)) - if err != nil { - t.Fatal(err) - } - if file == change[0] { - if !strings.Contains(string(data), change[1]) { - t.Fatal("mutation did not match workflow") - } - data = []byte(strings.Replace(string(data), change[1], change[2], 1)) - } - if err := os.WriteFile(filepath.Join(dir, file), data, 0600); err != nil { - t.Fatal(err) - } - } - if err := validateLifecycleWorkflows(dir); err == nil { - t.Fatal("unsafe workflow contract accepted") - } - }) - } -} diff --git a/scripts/validate-release-workflow/main.go b/scripts/validate-release-workflow/main.go deleted file mode 100644 index 92c5fd0a..00000000 --- a/scripts/validate-release-workflow/main.go +++ /dev/null @@ -1,159 +0,0 @@ -package main - -import ( - "errors" - "fmt" - "os" - "regexp" - "strconv" - "strings" -) - -var ( - forbiddenReleaseValues = []string{ - "v0.1.248", - "highcard/druid", - "stable-nix", - "latest-nix", - "-nix-steamcmd", - } - portOverrideNamePattern = regexp.MustCompile(`^[A-Za-z][A-Za-z0-9_-]*$`) - pzserverRequiredPorts = map[string]string{ - "main": "/udp", - "main2": "/udp", - } -) - -func main() { - path := "scripts/push.sh" - if len(os.Args) > 1 { - path = os.Args[1] - } - if err := validateReleaseWorkflow(path); err != nil { - fmt.Fprintln(os.Stderr, "Error:", err) - os.Exit(1) - } - if err := validateLifecycleWorkflows(".github/workflows"); err != nil { - fmt.Fprintln(os.Stderr, "Error:", err) - os.Exit(1) - } -} - -func validateReleaseWorkflow(path string) error { - data, err := os.ReadFile(path) - if err != nil { - return err - } - lines := strings.Split(string(data), "\n") - var failures []string - foundPZServer := false - - for index, line := range lines { - lineNumber := index + 1 - for _, forbidden := range forbiddenReleaseValues { - if strings.Contains(line, forbidden) { - failures = append(failures, fmt.Sprintf("%s:%d contains forbidden value %q", path, lineNumber, forbidden)) - } - } - if !isArtifactPushLine(line) { - continue - } - fields := strings.Fields(line) - ports, err := validatePortOverrides(fields) - if err != nil { - failures = append(failures, fmt.Sprintf("%s:%d %v", path, lineNumber, err)) - } - if strings.Contains(line, "scroll-lgsm:pzserver") { - foundPZServer = true - for name, expected := range pzserverRequiredPorts { - if actual := ports[name]; actual != expected { - failures = append(failures, fmt.Sprintf("%s:%d pzserver requires -p %s=%s, got %q", path, lineNumber, name, expected, actual)) - } - } - } - } - - if !foundPZServer { - failures = append(failures, fmt.Sprintf("%s: missing pzserver release push", path)) - } - if len(failures) > 0 { - return errors.New(strings.Join(failures, "\n")) - } - return nil -} - -func isArtifactPushLine(line string) bool { - fields := strings.Fields(line) - for i := 0; i+2 < len(fields); i++ { - if fields[i] == "druid" && fields[i+1] == "push" && fields[i+2] != "category" { - return true - } - } - return false -} - -func validatePortOverrides(fields []string) (map[string]string, error) { - ports := make(map[string]string) - var failures []string - - for i, field := range fields { - if field != "-p" && field != "--port" { - continue - } - if i+1 >= len(fields) { - failures = append(failures, fmt.Sprintf("%s is missing an override", field)) - continue - } - override := fields[i+1] - name, value, hasValue := strings.Cut(override, "=") - if !portOverrideNamePattern.MatchString(name) { - failures = append(failures, fmt.Sprintf("invalid %s override %q; invalid port name", field, override)) - continue - } - if !hasValue { - value = "" - } - portText := value - protocol := "" - if strings.Contains(value, "/") { - parts := strings.Split(value, "/") - if len(parts) != 2 || parts[1] == "" { - failures = append(failures, fmt.Sprintf("invalid %s override %q; expected name=port or name=port/protocol", field, override)) - continue - } - portText = parts[0] - protocol = parts[1] - switch protocol { - case "tcp", "udp", "http", "https": - default: - failures = append(failures, fmt.Sprintf("invalid %s override %q; unsupported protocol", field, override)) - continue - } - } - if portText == "" || portText == "0" { - if protocol == "http" || protocol == "https" { - failures = append(failures, fmt.Sprintf("invalid %s override %q; dynamic HTTP ports are not supported", field, override)) - continue - } - ports[name] = "0" - if protocol != "" { - ports[name] = "/" + protocol - } - continue - } - port, err := strconv.Atoi(portText) - if err != nil || port < 1 || port > 65535 { - failures = append(failures, fmt.Sprintf("invalid %s override %q; port must be omitted or 1-65535", field, override)) - continue - } - ports[name] = portText - if protocol != "" { - ports[name] += "/" + protocol - } - } - - if len(failures) > 0 { - return ports, errors.New(strings.Join(failures, "; ")) - } - return ports, nil -} diff --git a/scripts/validate-release-workflow/main_test.go b/scripts/validate-release-workflow/main_test.go deleted file mode 100644 index b183a246..00000000 --- a/scripts/validate-release-workflow/main_test.go +++ /dev/null @@ -1,59 +0,0 @@ -package main - -import ( - "strings" - "testing" -) - -func TestValidatePortOverridesAcceptsConcretePorts(t *testing.T) { - fields := strings.Fields("druid push repo:tag ./scroll -p main=25565 -p query=27015/udp -p battle-eye=2304/udp -p webpanel=8080") - - ports, err := validatePortOverrides(fields) - if err != nil { - t.Fatal(err) - } - if ports["main"] != "25565" || ports["query"] != "27015/udp" || ports["battle-eye"] != "2304/udp" || ports["webpanel"] != "8080" { - t.Fatalf("ports = %#v", ports) - } -} - -func TestValidatePortOverridesAcceptsDynamicPorts(t *testing.T) { - for _, value := range []string{ - "main", - "main=", - "main=/udp", - "main=0", - "main=0/udp", - } { - fields := []string{"druid", "push", "repo:tag", "./scroll", "-p", value} - if _, err := validatePortOverrides(fields); err != nil { - t.Fatalf("%s failed validation: %v", value, err) - } - } -} - -func TestValidatePortOverridesRejectsInvalidPorts(t *testing.T) { - for _, value := range []string{ - "main=65536", - "main=/", - "main=/sctp", - "web=/http", - "web=0/https", - "main=123/udp/extra", - "1main=123", - } { - fields := []string{"druid", "push", "repo:tag", "./scroll", "-p", value} - if _, err := validatePortOverrides(fields); err == nil { - t.Fatalf("%s passed validation, want failure", value) - } - } -} - -func TestIsArtifactPushLineSkipsCategories(t *testing.T) { - if isArtifactPushLine("druid push category artifacts.druid.gg/foo bar ./meta") { - t.Fatal("category push should not be treated as artifact push") - } - if !isArtifactPushLine("druid push artifacts.druid.gg/foo:tag ./scroll -p main=1") { - t.Fatal("artifact push was not detected") - } -} diff --git a/scripts/validate_all_scrolls.sh b/scripts/validate_all_scrolls.sh index 4e5f6693..d7bc73da 100755 --- a/scripts/validate_all_scrolls.sh +++ b/scripts/validate_all_scrolls.sh @@ -2,8 +2,6 @@ set -euo pipefail -go run ./scripts/validate-release-workflow - if command -v druid >/dev/null 2>&1 && druid validate --help >/dev/null 2>&1; then while IFS= read -r file; do dir="${file%/scroll.yaml}" From c7e3056425f95883e345f958aabc4b01583346f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Schottst=C3=A4dt?= Date: Tue, 27 Oct 2026 23:22:04 +0100 Subject: [PATCH 07/11] feat(ui)!: migrate config editor to OpenUI BREAKING CHANGE: build and stage a WASM guest plus an OpenUI document with SDK 4. The SPA renders the trusted editor; the guest retains configuration behavior and save verification. --- .github/workflows/scrolls.yml | 2 +- scripts/stage-scroll-ui/main.go | 3 + scripts/stage-scroll-ui/main_test.go | 10 +- scripts/validate_ui_coverage.sh | 1 + ui/README.md | 8 +- ui/package-lock.json | 6003 ++++------------- ui/package.json | 10 +- ui/src/app.ts | 4 + ui/src/app.tsx | 36 - ui/src/config-editor/behavior.test.ts | 82 + ui/src/config-editor/behavior.ts | 102 + ui/src/config-editor/components/ActionBar.tsx | 36 - ui/src/config-editor/components/EditorApp.tsx | 228 - .../config-editor/components/FieldControl.tsx | 74 - ui/src/config-editor/components/FileRail.tsx | 27 - .../config-editor/components/FormEditor.tsx | 28 - ui/src/config-editor/components/RawEditor.tsx | 21 - ui/src/config-editor/index.ts | 14 +- ui/src/config-editor/styles.test.ts | 65 - ui/src/config-editor/styles.ts | 126 - ui/src/view.openui | 2 + ui/tsconfig.json | 5 +- 22 files changed, 1464 insertions(+), 5423 deletions(-) create mode 100644 ui/src/app.ts delete mode 100644 ui/src/app.tsx create mode 100644 ui/src/config-editor/behavior.test.ts create mode 100644 ui/src/config-editor/behavior.ts delete mode 100644 ui/src/config-editor/components/ActionBar.tsx delete mode 100644 ui/src/config-editor/components/EditorApp.tsx delete mode 100644 ui/src/config-editor/components/FieldControl.tsx delete mode 100644 ui/src/config-editor/components/FileRail.tsx delete mode 100644 ui/src/config-editor/components/FormEditor.tsx delete mode 100644 ui/src/config-editor/components/RawEditor.tsx delete mode 100644 ui/src/config-editor/styles.test.ts delete mode 100644 ui/src/config-editor/styles.ts create mode 100644 ui/src/view.openui diff --git a/.github/workflows/scrolls.yml b/.github/workflows/scrolls.yml index 400d9340..8881ad88 100644 --- a/.github/workflows/scrolls.yml +++ b/.github/workflows/scrolls.yml @@ -28,7 +28,7 @@ jobs: go-version: "1.24.7" - uses: actions/setup-node@v4 with: - node-version: "22" + node-version: "24" cache: npm cache-dependency-path: ui/package-lock.json - name: Build and test Scroll UI diff --git a/scripts/stage-scroll-ui/main.go b/scripts/stage-scroll-ui/main.go index 8fff78c5..39be9165 100644 --- a/scripts/stage-scroll-ui/main.go +++ b/scripts/stage-scroll-ui/main.go @@ -407,6 +407,9 @@ func stage(source, destination, bundle string) error { if err := copyFile(bundle, filepath.Join(privateDir, "dist", "app.wasm")); err != nil { return err } + if err := copyFile(strings.TrimSuffix(bundle, ".wasm")+".openui", filepath.Join(privateDir, "dist", "app.openui")); err != nil { + return err + } manifestBytes, err := json.MarshalIndent(runtimeManifest, "", " ") if err != nil { return err diff --git a/scripts/stage-scroll-ui/main_test.go b/scripts/stage-scroll-ui/main_test.go index dd0a02f3..d7a0a41d 100644 --- a/scripts/stage-scroll-ui/main_test.go +++ b/scripts/stage-scroll-ui/main_test.go @@ -85,7 +85,10 @@ func TestStageAddsPrivateUIAndMinecraftManifest(t *testing.T) { if _, err := os.Stat(filepath.Join(destination, "private", "dist", "app.wasm")); err != nil { t.Fatal(err) } - if _, err := os.Stat(filepath.Join(destination, "private", "src", "app.tsx")); err != nil { + if _, err := os.Stat(filepath.Join(destination, "private", "dist", "app.openui")); err != nil { + t.Fatal(err) + } + if _, err := os.Stat(filepath.Join(destination, "private", "src", "app.ts")); err != nil { t.Fatal(err) } if _, err := os.Stat(filepath.Join(destination, "private", "package.json")); err != nil { @@ -410,13 +413,16 @@ func writeTestUISource(t *testing.T) (string, string) { if err := os.WriteFile(filepath.Join(uiSource, "package.json"), []byte("{}\n"), 0644); err != nil { t.Fatal(err) } - if err := os.WriteFile(filepath.Join(uiSource, "src", "app.tsx"), []byte("export const source = true;\n"), 0644); err != nil { + if err := os.WriteFile(filepath.Join(uiSource, "src", "app.ts"), []byte("export const source = true;\n"), 0644); err != nil { t.Fatal(err) } if err := os.MkdirAll(filepath.Join(uiSource, "dist"), 0755); err != nil { t.Fatal(err) } bundle := filepath.Join(uiSource, "dist", "app.wasm") + if err := os.WriteFile(filepath.Join(uiSource, "dist", "app.openui"), []byte("root = Text(\"Test\")\n"), 0644); err != nil { + t.Fatal(err) + } if err := os.WriteFile(bundle, []byte("wasm"), 0644); err != nil { t.Fatal(err) } diff --git a/scripts/validate_ui_coverage.sh b/scripts/validate_ui_coverage.sh index e2086022..e08ab070 100644 --- a/scripts/validate_ui_coverage.sh +++ b/scripts/validate_ui_coverage.sh @@ -5,6 +5,7 @@ repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" cd "$repo_root" test -s ui/dist/app.wasm +test -s ui/dist/app.openui go test ./scripts/stage-scroll-ui echo "Scroll UI bundle and all released family mappings are valid." diff --git a/ui/README.md b/ui/README.md index 549b1ded..a1c4b35a 100644 --- a/ui/README.md +++ b/ui/README.md @@ -1,10 +1,12 @@ # Scroll configuration admin UI -Every released game-server Scroll receives the same sandboxed configuration-editor component during publication. The staging command generates a family manifest, copies `dist/app.wasm` to `private/dist/app.wasm`, and adds the declarative private UI entry to the staged `scroll.yaml`. +Every released game-server Scroll receives the same sandboxed configuration editor during publication. Staging generates a family manifest, copies `dist/app.wasm` and its companion `dist/app.openui` into `private/dist/`, and adds the private UI entry to the staged `scroll.yaml`. Minecraft variants share one typed `server.properties` schema. Other families expose their native configuration files and always retain a lossless Raw view, so newly introduced or uncommon options remain editable even before a typed control is added. -The editor implementation and its tests live in `src/config-editor`. The committed WASM package is built from `src/app.tsx` with Druid UI 2.x and is rebuilt by the PR and release workflows before staging. +The editor behavior and its tests live in `src/config-editor`. Druid UI 4 builds `src/app.ts` into a WASM guest; `src/view.openui` declares the document. The SPA owns the trusted React configuration-editor component and scoped file-service tools. Parsing, validation, secret masking, lossless edits and save verification remain in the guest. + +Use Node.js 24 or newer. The current SDK pin is `4.0.0-rc.1`; until that RC is publicly published, local development obtains it from Verdaccio through `druid-ui-dev.sh setup`. Rebuild the UI after changing its source: @@ -16,4 +18,4 @@ npm run type-check npm run build ``` -Then run `go test ./scripts` and `./scripts/validate_ui_coverage.sh` before publishing. +Then run `go test ./scripts/stage-scroll-ui` and `./scripts/validate_ui_coverage.sh` before publishing. diff --git a/ui/package-lock.json b/ui/package-lock.json index bad0eddc..5e8e51d3 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -8,371 +8,207 @@ "name": "@druid-scrolls/config-admin-ui", "version": "1.0.0", "devDependencies": { - "@druid-ui/build": "^3.0.0", - "@druid-ui/component": "^3.0.0", - "@druid-ui/plattform": "^3.0.0", + "@druid-ui/build": "4.0.0-rc.1", + "@druid-ui/client": "4.0.0-rc.1", "typescript": "~5.8.3", "vitest": "^4.1.10" } }, - "node_modules/@andreiltd/componentize-qjs-binding-darwin-arm64": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@andreiltd/componentize-qjs-binding-darwin-arm64/-/componentize-qjs-binding-darwin-arm64-0.4.3.tgz", - "integrity": "sha512-bCqUlC2gkOSHEn/qaFMzwRegwv7zTgSxH1kbFJ1riHArhXEQjOdMPb3sAGd4euH81CnnDbug6Bqh4SBNBXXrXg==", + "node_modules/@bytecodealliance/jco-node-fs": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@bytecodealliance/jco-node-fs/-/jco-node-fs-0.3.2.tgz", + "integrity": "sha512-yxvqQreNcOQdMsEKZomkSqThtkxrAz3f1Cmy8BsV0UHi9saa2/D1KDB14IAXPYwDq/maS6lCzS+MuMQx6QkUgA==", + "dev": true, + "license": "(Apache-2.0 WITH LLVM-exception)", + "engines": { + "node": ">=20" + }, + "optionalDependencies": { + "@bytecodealliance/jco-node-fs-darwin-arm64": "0.3.2", + "@bytecodealliance/jco-node-fs-darwin-x64": "0.3.2", + "@bytecodealliance/jco-node-fs-linux-arm64-gnu": "0.3.2", + "@bytecodealliance/jco-node-fs-linux-arm64-musl": "0.3.2", + "@bytecodealliance/jco-node-fs-linux-x64-gnu": "0.3.2", + "@bytecodealliance/jco-node-fs-linux-x64-musl": "0.3.2", + "@bytecodealliance/jco-node-fs-win32-arm64-msvc": "0.3.2", + "@bytecodealliance/jco-node-fs-win32-x64-msvc": "0.3.2" + } + }, + "node_modules/@bytecodealliance/jco-node-fs-darwin-arm64": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@bytecodealliance/jco-node-fs-darwin-arm64/-/jco-node-fs-darwin-arm64-0.3.2.tgz", + "integrity": "sha512-WXQq1tRVUWhbK+ImH0G8Kni2AR0sdokLf/KyXRw5P6n4A9ZbgMHOuPfN/PEsYgw4eosuTAonutK0xILk/hA81A==", "cpu": [ "arm64" ], "dev": true, - "license": "Apache-2.0", + "license": "(Apache-2.0 WITH LLVM-exception)", "optional": true, "os": [ "darwin" ], "engines": { - "node": ">=18.0.0" + "node": ">=20" } }, - "node_modules/@andreiltd/componentize-qjs-binding-darwin-x64": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@andreiltd/componentize-qjs-binding-darwin-x64/-/componentize-qjs-binding-darwin-x64-0.4.3.tgz", - "integrity": "sha512-fP4Ekzn7pR8KqRIoH41zbOTl1i3nEYCog8r/gy2nDzg86EYl51kdrCP+jN4B9tPmYOH8erae7i88Mb50EshyLA==", + "node_modules/@bytecodealliance/jco-node-fs-darwin-x64": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@bytecodealliance/jco-node-fs-darwin-x64/-/jco-node-fs-darwin-x64-0.3.2.tgz", + "integrity": "sha512-Fy/OjHnto7hNE5ksewVkmAMXG/uXyj+RAKFZWQFTzFkp73UyT5vuPjKq3nvx9KolUGWBG37BudEMb4ZAoD9TbQ==", "cpu": [ "x64" ], "dev": true, - "license": "Apache-2.0", + "license": "(Apache-2.0 WITH LLVM-exception)", "optional": true, "os": [ "darwin" ], "engines": { - "node": ">=18.0.0" + "node": ">=20" } }, - "node_modules/@andreiltd/componentize-qjs-binding-linux-arm64-gnu": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@andreiltd/componentize-qjs-binding-linux-arm64-gnu/-/componentize-qjs-binding-linux-arm64-gnu-0.4.3.tgz", - "integrity": "sha512-3+Oz1cQRq2KklYdGjhNiI8kNXjCO3ZxBVxf/ZjeGg8MC6Z9A/fO2Hx3T65xSnA5voc2RlWAs0eSL9veoH3CqWQ==", + "node_modules/@bytecodealliance/jco-node-fs-linux-arm64-gnu": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@bytecodealliance/jco-node-fs-linux-arm64-gnu/-/jco-node-fs-linux-arm64-gnu-0.3.2.tgz", + "integrity": "sha512-OafRtRu3tfOFQARfkia/LDEqSo2R3yAL1xPwzf4RcRW6JqkOY7qKWsUS5+LPVo/aFaSkMX7F7bdFGpFPmcoZJg==", "cpu": [ "arm64" ], "dev": true, - "license": "Apache-2.0", + "license": "(Apache-2.0 WITH LLVM-exception)", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=18.0.0" + "node": ">=20" } }, - "node_modules/@andreiltd/componentize-qjs-binding-linux-arm64-musl": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@andreiltd/componentize-qjs-binding-linux-arm64-musl/-/componentize-qjs-binding-linux-arm64-musl-0.4.3.tgz", - "integrity": "sha512-quZj5Z81UC5ufUXDAS3knfpO3x4KQCADqjH42FgeliBEZWN6imgjDF8DZKTwtzMH8vH6I2pxB9vu/D3ufVA+xA==", + "node_modules/@bytecodealliance/jco-node-fs-linux-arm64-musl": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@bytecodealliance/jco-node-fs-linux-arm64-musl/-/jco-node-fs-linux-arm64-musl-0.3.2.tgz", + "integrity": "sha512-JblDiwD7+Y+w0d/tjaNDX4QdGvh5lyuDc+S/jDeT7sYA1caA9yiwIjLa8PC/lm2xudqSxD+Cuy4AosXvl+qI0g==", "cpu": [ "arm64" ], "dev": true, - "license": "Apache-2.0", + "license": "(Apache-2.0 WITH LLVM-exception)", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=18.0.0" + "node": ">=20" } }, - "node_modules/@andreiltd/componentize-qjs-binding-linux-x64-gnu": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@andreiltd/componentize-qjs-binding-linux-x64-gnu/-/componentize-qjs-binding-linux-x64-gnu-0.4.3.tgz", - "integrity": "sha512-JqknHtOQF5ah6eN7t82f9fPDkbwVhHC5JMS+7UE0iPaJcDss6BqFYMiFBQ8v/iFxZdtrum3PF2xViTBAEdS2EQ==", + "node_modules/@bytecodealliance/jco-node-fs-linux-x64-gnu": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@bytecodealliance/jco-node-fs-linux-x64-gnu/-/jco-node-fs-linux-x64-gnu-0.3.2.tgz", + "integrity": "sha512-6FzmHoLOsa6b4X9AuFLsvlpNF66Dt4sRRftZHaT1I1pYzCWrJkkpgNJhRXxf67ZPmOwBZJT4dan/g752Rx4xRw==", "cpu": [ "x64" ], "dev": true, - "license": "Apache-2.0", + "license": "(Apache-2.0 WITH LLVM-exception)", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=18.0.0" + "node": ">=20" } }, - "node_modules/@andreiltd/componentize-qjs-binding-linux-x64-musl": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@andreiltd/componentize-qjs-binding-linux-x64-musl/-/componentize-qjs-binding-linux-x64-musl-0.4.3.tgz", - "integrity": "sha512-5J/HSTeWKz49PTkRPS+856L6un8ONGPhs1JvNTAyDXW4zgcCOGQ5x7CBmWStLdIthiIUPKgW53wIAVp2aU5HAQ==", + "node_modules/@bytecodealliance/jco-node-fs-linux-x64-musl": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@bytecodealliance/jco-node-fs-linux-x64-musl/-/jco-node-fs-linux-x64-musl-0.3.2.tgz", + "integrity": "sha512-SbAJG2PDV8YAHBESHU9sVSckOitJyvlezdF4CGP5/mOp01JnijVkLVXzGK62yVSfa5TpAybbSd1rk+v36NAW/Q==", "cpu": [ "x64" ], "dev": true, - "license": "Apache-2.0", + "license": "(Apache-2.0 WITH LLVM-exception)", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=18.0.0" + "node": ">=20" } }, - "node_modules/@andreiltd/componentize-qjs-binding-win32-arm64-msvc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@andreiltd/componentize-qjs-binding-win32-arm64-msvc/-/componentize-qjs-binding-win32-arm64-msvc-0.4.3.tgz", - "integrity": "sha512-lZ7XQzbXsIRpCKqMnof0YSPiV01JFpcw3LOpR4q6kbR8+J8qqCwxD5hrJM0kCeml1YkxP9VxDpLSBRN40c+GVQ==", + "node_modules/@bytecodealliance/jco-node-fs-win32-arm64-msvc": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@bytecodealliance/jco-node-fs-win32-arm64-msvc/-/jco-node-fs-win32-arm64-msvc-0.3.2.tgz", + "integrity": "sha512-nUWYdFysRQJGsIOCk0KAYN2smkNYiHG7rZ7m+0ZXqP+5wqWxKEjkDsORwXiBjdaWFLVww0anZ3SBxrju6P7hXQ==", "cpu": [ "arm64" ], "dev": true, - "license": "Apache-2.0", + "license": "(Apache-2.0 WITH LLVM-exception)", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=18.0.0" + "node": ">=20" } }, - "node_modules/@andreiltd/componentize-qjs-binding-win32-x64-msvc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@andreiltd/componentize-qjs-binding-win32-x64-msvc/-/componentize-qjs-binding-win32-x64-msvc-0.4.3.tgz", - "integrity": "sha512-0kaaM7C9MALnOGKrsJOL2uUJJV6njrfgqJNz7e5aT4LDQbBxjPK0XUVimr3QSyfNBwIySgcZIzufgc+5BVcBMg==", + "node_modules/@bytecodealliance/jco-node-fs-win32-x64-msvc": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@bytecodealliance/jco-node-fs-win32-x64-msvc/-/jco-node-fs-win32-x64-msvc-0.3.2.tgz", + "integrity": "sha512-RsPj2t8TvltsMWK7/Z7JcVC/IWPMi07/AJkNLiNTCuGTdT/sseqTThJJwhuz3sjFw7dJdxA+bSGT+23y/KT0fw==", "cpu": [ "x64" ], "dev": true, - "license": "Apache-2.0", + "license": "(Apache-2.0 WITH LLVM-exception)", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@asamuzakjp/css-color": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-3.2.0.tgz", - "integrity": "sha512-K1A6z8tS3XsmCMM86xoWdn7Fkdn9m6RSVtocUrJYIwZnFVkng/PvkEoWtOWmP+Scc6saYWHWZYbndEEXxl24jw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@csstools/css-calc": "^2.1.3", - "@csstools/css-color-parser": "^3.0.9", - "@csstools/css-parser-algorithms": "^3.0.4", - "@csstools/css-tokenizer": "^3.0.3", - "lru-cache": "^10.4.3" - } - }, - "node_modules/@bytecodealliance/componentize-js": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.19.3.tgz", - "integrity": "sha512-ju7Y4WeF0B9uMkSPHJgmT6ouEfSwbe9M1uR/YOnYZjBpxJjH9qzxIkJg/kf8NycVDyFJ2/lscmJ1E1uPiDQVRQ==", - "dev": true, - "workspaces": [ - "." - ], - "dependencies": { - "@bytecodealliance/jco": "^1.15.1", - "@bytecodealliance/wizer": "^10.0.0", - "es-module-lexer": "^1.6.0", - "oxc-parser": "^0.76.0" - }, - "bin": { - "componentize-js": "src/cli.js" - } - }, - "node_modules/@bytecodealliance/componentize-js-0-19-3": { - "name": "@bytecodealliance/componentize-js", - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.19.3.tgz", - "integrity": "sha512-ju7Y4WeF0B9uMkSPHJgmT6ouEfSwbe9M1uR/YOnYZjBpxJjH9qzxIkJg/kf8NycVDyFJ2/lscmJ1E1uPiDQVRQ==", - "dev": true, - "workspaces": [ - "." - ], - "dependencies": { - "@bytecodealliance/jco": "^1.15.1", - "@bytecodealliance/wizer": "^10.0.0", - "es-module-lexer": "^1.6.0", - "oxc-parser": "^0.76.0" - }, - "bin": { - "componentize-js": "src/cli.js" - } - }, - "node_modules/@bytecodealliance/jco": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.30.0.tgz", - "integrity": "sha512-eUb7NCI5Un7edpRqP0iHDhl8TXu4v5/tj0ku4CaKKMVWS7tvHuldH/XIPcSCkgZ9+AleIOMNS2CeM5quONUvxg==", - "dev": true, - "license": "(Apache-2.0 WITH LLVM-exception)", - "dependencies": { - "@bytecodealliance/componentize-js": "^0.22.0", - "@bytecodealliance/componentize-js-0-19-3": "npm:@bytecodealliance/componentize-js@^0.19.3", - "@bytecodealliance/jco-transpile": "^0.10.0", - "@bytecodealliance/preview2-shim": "^0.20.2", - "@bytecodealliance/preview3-shim": "^0.3.2", - "binaryen": "^130.0.0", - "commander": "^14", - "componentize-qjs": "^0.4.2", - "mkdirp": "^3", - "ora": "^8", - "rolldown": "^1.2.4", - "typescript": "7.0.2", - "typescript-compiler-api": "npm:typescript@6.0.3" - }, - "bin": { - "jco": "dist/jco.js" + "node": ">=20" } }, - "node_modules/@bytecodealliance/jco-transpile": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/jco-transpile/-/jco-transpile-0.10.0.tgz", - "integrity": "sha512-G2mYqDz1rQiDJ+re4avajauks9uZWPqarivAVrvpCQZvak9uhz6sqZxLBHa2wZPv0GvB7x9dP9ooMMednFfSYw==", + "node_modules/@bytecodealliance/preview2-shim": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/@bytecodealliance/preview2-shim/-/preview2-shim-0.30.0.tgz", + "integrity": "sha512-Op+uxOJPCnW4jp5Jg3kJvFpB5GZGJGxBMX5PvMffksyonpTciILDDSSJQr1ficHAhm1H6X5+Qwx3q21p7Hjr1Q==", "dev": true, "license": "(Apache-2.0 WITH LLVM-exception)", "dependencies": { - "@bytecodealliance/preview2-shim": "^0.20.2", - "@bytecodealliance/preview3-shim": "^0.3.1", - "binaryen": "^130.0.0", - "oxc-minify": "^0.136.0" + "@bytecodealliance/jco-node-fs": "0.3.2" } }, - "node_modules/@bytecodealliance/jco-transpile/node_modules/@bytecodealliance/preview2-shim": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@bytecodealliance/preview2-shim/-/preview2-shim-0.20.2.tgz", - "integrity": "sha512-Bp1cer1jztaQamLv1YKdc4MimI9LNAAKM2lNxOtGTLs7/At5KlA0fW1HWTi3ZJ5McaWNwJUDWSe5Lr0EgUpsnA==", - "dev": true, - "license": "(Apache-2.0 WITH LLVM-exception)" - }, - "node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.22.0.tgz", - "integrity": "sha512-sscwKDazGgMWZkS6azvY66tY3X09nzl58jn9j6X0E9/V4B5hCXTI+v7PFUyLowKYgu8MG4FJsSvCpq64lSXsIA==", + "node_modules/@druid-ui/build": { + "version": "4.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@druid-ui/build/-/build-4.0.0-rc.1.tgz", + "integrity": "sha512-DIVAIWUkcK7GYb71A/cyE2t+NfxTJqLWNGDRuCBYx3B2y2YUuJJOA9HRsbGnP/UUlTtWdlGAJqRYv4p9zPEGkg==", "dev": true, - "workspaces": [ - "." - ], "dependencies": { - "@bytecodealliance/jco": "^1.15.1", - "@bytecodealliance/weval": "^0.4.1", - "@bytecodealliance/wizer": "^10.0.0", - "es-module-lexer": "^1.6.0", - "oxc-parser": "^0.76.0" + "@bytecodealliance/jco-transpile": "0.20.0", + "@druid-ui/client": "4.0.0-rc.1", + "chokidar": "^4.0.3", + "componentize-qjs": "0.5.0", + "esbuild": "^0.25.11" }, "bin": { - "componentize-js": "src/cli.js" - } - }, - "node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/preview2-shim": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@bytecodealliance/preview2-shim/-/preview2-shim-0.20.2.tgz", - "integrity": "sha512-Bp1cer1jztaQamLv1YKdc4MimI9LNAAKM2lNxOtGTLs7/At5KlA0fW1HWTi3ZJ5McaWNwJUDWSe5Lr0EgUpsnA==", - "dev": true, - "license": "(Apache-2.0 WITH LLVM-exception)" - }, - "node_modules/@bytecodealliance/jco/node_modules/typescript": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz", - "integrity": "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc" - }, - "engines": { - "node": ">=16.20.0" + "druid-ui-build": "bin/build.js", + "druid-ui-gen-types": "bin/gen-types.js" }, - "optionalDependencies": { - "@typescript/typescript-aix-ppc64": "7.0.2", - "@typescript/typescript-darwin-arm64": "7.0.2", - "@typescript/typescript-darwin-x64": "7.0.2", - "@typescript/typescript-freebsd-arm64": "7.0.2", - "@typescript/typescript-freebsd-x64": "7.0.2", - "@typescript/typescript-linux-arm": "7.0.2", - "@typescript/typescript-linux-arm64": "7.0.2", - "@typescript/typescript-linux-loong64": "7.0.2", - "@typescript/typescript-linux-mips64el": "7.0.2", - "@typescript/typescript-linux-ppc64": "7.0.2", - "@typescript/typescript-linux-riscv64": "7.0.2", - "@typescript/typescript-linux-s390x": "7.0.2", - "@typescript/typescript-linux-x64": "7.0.2", - "@typescript/typescript-netbsd-arm64": "7.0.2", - "@typescript/typescript-netbsd-x64": "7.0.2", - "@typescript/typescript-openbsd-arm64": "7.0.2", - "@typescript/typescript-openbsd-x64": "7.0.2", - "@typescript/typescript-sunos-x64": "7.0.2", - "@typescript/typescript-win32-arm64": "7.0.2", - "@typescript/typescript-win32-x64": "7.0.2" - } - }, - "node_modules/@bytecodealliance/preview2-shim": { - "version": "0.17.9", - "resolved": "https://registry.npmjs.org/@bytecodealliance/preview2-shim/-/preview2-shim-0.17.9.tgz", - "integrity": "sha512-i0R3eQBe6PA/o/1EFE3Owe4In2rcccb6QxnjpntM/lPe3/duJ0bRQTVZM2Ufpo99X4eofGeltQUkape1C91FFA==", - "dev": true, - "license": "(Apache-2.0 WITH LLVM-exception)" - }, - "node_modules/@bytecodealliance/preview3-shim": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@bytecodealliance/preview3-shim/-/preview3-shim-0.3.2.tgz", - "integrity": "sha512-hA2l46B6ivwL+6jKBH3lsm8oRuxPJrwRDfaVyTf6NnBA9VqR8gzDZxSwE472s/Mn9vKvqRJmBmRNJA8pPX8Rhg==", - "dev": true, - "license": "(Apache-2.0 WITH LLVM-exception)", - "dependencies": { - "@bytecodealliance/preview2-shim": "^0.19.0" - } - }, - "node_modules/@bytecodealliance/preview3-shim/node_modules/@bytecodealliance/preview2-shim": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/preview2-shim/-/preview2-shim-0.19.0.tgz", - "integrity": "sha512-OSUlcM62fXLuzYP0DjBn/SwjKMZ/y/2PMXZ8v5cRiiFcroauntlPRl/oCnx0xYjYiqdYvE0PY50VCNutll0xOw==", - "dev": true, - "license": "(Apache-2.0 WITH LLVM-exception)" - }, - "node_modules/@bytecodealliance/weval": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@bytecodealliance/weval/-/weval-0.4.1.tgz", - "integrity": "sha512-vJegSAkNjENhJcMUod76KUGAgQLdACDDCwB3JwyR14zDhyHVPAvArvtDDYEEi+c+ELzls62H6wxTvzRmaYTaqg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@napi-rs/lzma": "^1.1.2", - "decompress": "^4.2.1", - "decompress-tar": "^4.1.1", - "decompress-unzip": "^4.0.1" + "peerDependencies": { + "vite": "^7.0.0" }, - "engines": { - "node": ">=16" + "peerDependenciesMeta": { + "vite": { + "optional": true + } } }, - "node_modules/@bytecodealliance/wizer": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/wizer/-/wizer-10.0.0.tgz", - "integrity": "sha512-ziWmovyu1jQl9TsKlfC2bwuUZwxVPFHlX4fOqTzxhgS76jITIo45nzODEwPgU+jjmOr8F3YX2V2wAChC5NKujg==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "wizer": "wizer.js" - }, - "engines": { - "node": ">=16" - }, - "optionalDependencies": { - "@bytecodealliance/wizer-darwin-arm64": "10.0.0", - "@bytecodealliance/wizer-darwin-x64": "10.0.0", - "@bytecodealliance/wizer-linux-arm64": "10.0.0", - "@bytecodealliance/wizer-linux-s390x": "10.0.0", - "@bytecodealliance/wizer-linux-x64": "10.0.0", - "@bytecodealliance/wizer-win32-x64": "10.0.0" - } - }, - "node_modules/@bytecodealliance/wizer-darwin-arm64": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/wizer-darwin-arm64/-/wizer-darwin-arm64-10.0.0.tgz", - "integrity": "sha512-dhZTWel+xccGTKSJtI9A7oM4yyP20FWflsT+AoqkOqkCY7kCNrj4tmMtZ6GXZFRDkrPY5+EnOh62sfShEibAMA==", + "node_modules/@druid-ui/build/node_modules/@andreiltd/componentize-qjs-binding-darwin-arm64": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@andreiltd/componentize-qjs-binding-darwin-arm64/-/componentize-qjs-binding-darwin-arm64-0.5.0.tgz", + "integrity": "sha512-JuFOac1TF2uo8IVD49EiChvOgUiKjN9euXFcQPcPnqW12Yqp2dWmyW1GQSFVoxtHJEh6AnvkJbpq1yaR/pW9RA==", "cpu": [ "arm64" ], @@ -382,14 +218,14 @@ "os": [ "darwin" ], - "bin": { - "wizer-darwin-arm64": "wizer" + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@bytecodealliance/wizer-darwin-x64": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/wizer-darwin-x64/-/wizer-darwin-x64-10.0.0.tgz", - "integrity": "sha512-r/LUIZw6Q3Hf4htd46mD+EBxfwjBkxVIrTM1r+B2pTCddoBYQnKVdVsI4UFyy7NoBxzEg8F8BwmTNoSLmFRjpw==", + "node_modules/@druid-ui/build/node_modules/@andreiltd/componentize-qjs-binding-darwin-x64": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@andreiltd/componentize-qjs-binding-darwin-x64/-/componentize-qjs-binding-darwin-x64-0.5.0.tgz", + "integrity": "sha512-kvF5qv8WXsH0z3N7FkI8BiaPA52+/e6Mz6mDSMgOm0JDO7mNtvcuRZkENrTol38R+4R7fr2TOq06GOq1gLhIQA==", "cpu": [ "x64" ], @@ -399,14 +235,14 @@ "os": [ "darwin" ], - "bin": { - "wizer-darwin-x64": "wizer" + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@bytecodealliance/wizer-linux-arm64": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/wizer-linux-arm64/-/wizer-linux-arm64-10.0.0.tgz", - "integrity": "sha512-pGSfFWXzeTqHm6z1PtVaEn+7Fm3QGC8YnHrzBV4sQDVS3N1NwmuHZAc8kslmlFPNdu61ycEvdOsSgCny8JPQvg==", + "node_modules/@druid-ui/build/node_modules/@andreiltd/componentize-qjs-binding-linux-arm64-gnu": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@andreiltd/componentize-qjs-binding-linux-arm64-gnu/-/componentize-qjs-binding-linux-arm64-gnu-0.5.0.tgz", + "integrity": "sha512-7m4aCaM4eaPHO0/uI1nwSYcP9OwTiJBjw3IO6vle3ov3lipl+Jlqpu2nckxMM0tx5Q+RUnStIWWQhDsdJ35kmg==", "cpu": [ "arm64" ], @@ -416,16 +252,16 @@ "os": [ "linux" ], - "bin": { - "wizer-linux-arm64": "wizer" + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@bytecodealliance/wizer-linux-s390x": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/wizer-linux-s390x/-/wizer-linux-s390x-10.0.0.tgz", - "integrity": "sha512-O8vHxRTAdb1lUnVXMIMTcp/9q4pq1D4iIKigJCipg2JN15taV9uFAWh0fO88wylXwuSlO7dOE1AwQl54fMKXQg==", + "node_modules/@druid-ui/build/node_modules/@andreiltd/componentize-qjs-binding-linux-arm64-musl": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@andreiltd/componentize-qjs-binding-linux-arm64-musl/-/componentize-qjs-binding-linux-arm64-musl-0.5.0.tgz", + "integrity": "sha512-+nWPAPfmjM4BPEt0axyEwQbG26BhkmnxdvEjkvUa+7kVeVjyWlw7B3By+N+257WYDhwaIhp2mFnWYaSR8deyDg==", "cpu": [ - "s390x" + "arm64" ], "dev": true, "license": "Apache-2.0", @@ -433,14 +269,14 @@ "os": [ "linux" ], - "bin": { - "wizer-linux-s390x": "wizer" + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@bytecodealliance/wizer-linux-x64": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/wizer-linux-x64/-/wizer-linux-x64-10.0.0.tgz", - "integrity": "sha512-fJtM1sy43FBMnp+xpapFX6U1YdTBKA/1T4CYfG/qeE8jn0SXk2EuiYoY/EnC2uyNy9hjTrvfdYO5n4MXW0EIdQ==", + "node_modules/@druid-ui/build/node_modules/@andreiltd/componentize-qjs-binding-linux-x64-gnu": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@andreiltd/componentize-qjs-binding-linux-x64-gnu/-/componentize-qjs-binding-linux-x64-gnu-0.5.0.tgz", + "integrity": "sha512-eX+34TYDMRgKA1huyqax91PjG6HutJXcLqA+Dxa4hZEqL1xglHYUhhfVnVwgWrfMPejRTX8XiFKyvBqYP0DtqA==", "cpu": [ "x64" ], @@ -450,14 +286,14 @@ "os": [ "linux" ], - "bin": { - "wizer-linux-x64": "wizer" + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@bytecodealliance/wizer-win32-x64": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/wizer-win32-x64/-/wizer-win32-x64-10.0.0.tgz", - "integrity": "sha512-55BPLfGT7iT7gH5M69NpTM16QknJZ7OxJ0z73VOEoeGA9CT8QPKMRzFKsPIvLs+W8G28fdudFA94nElrdkp3Kg==", + "node_modules/@druid-ui/build/node_modules/@andreiltd/componentize-qjs-binding-linux-x64-musl": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@andreiltd/componentize-qjs-binding-linux-x64-musl/-/componentize-qjs-binding-linux-x64-musl-0.5.0.tgz", + "integrity": "sha512-5lRm08zbY6Bu78yTTSRnvYs1m4yXKISmNxXEPQO262Chp4JPMqnb2bYIrSwEmTVZWAEbqZuEEhHkX9p8kBpAMA==", "cpu": [ "x64" ], @@ -465,207 +301,484 @@ "license": "Apache-2.0", "optional": true, "os": [ - "win32" - ], - "bin": { - "wizer-win32-x64": "wizer" - } - }, - "node_modules/@csstools/color-helpers": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.1.0.tgz", - "integrity": "sha512-S11EXWJyy0Mz5SYvRmY8nJYTFFd1LCNV+7cXyAgQtOOuzb4EsgfqDufL+9esx72/eLhsRdGZwaldu/h+E4t4BA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } + "linux" ], - "license": "MIT-0", "engines": { - "node": ">=18" + "node": ">=18.0.0" } }, - "node_modules/@csstools/css-calc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-2.1.4.tgz", - "integrity": "sha512-3N8oaj+0juUw/1H3YwmDDJXCgTB1gKU6Hc/bB502u9zR0q2vd786XJH9QfrKIEgFlZmhZiq6epXl4rHqhzsIgQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } + "node_modules/@druid-ui/build/node_modules/@andreiltd/componentize-qjs-binding-win32-arm64-msvc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@andreiltd/componentize-qjs-binding-win32-arm64-msvc/-/componentize-qjs-binding-win32-arm64-msvc-0.5.0.tgz", + "integrity": "sha512-c8fXs5sc5dOUp+cCLzYFRNcae7v/nXll3+FEGD7alIBoHkboTcwGumAnEoZY325ko1y3wyV4d6FVSNkU6a8W8w==", + "cpu": [ + "arm64" ], - "license": "MIT", - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4" - } - }, - "node_modules/@csstools/css-color-parser": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.1.0.tgz", - "integrity": "sha512-nbtKwh3a6xNVIp/VRuXV64yTKnb1IjTAEEh3irzS+HkKjAOYLTGNb9pmVNntZ8iVBHcWDA2Dof0QtPgFI1BaTA==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" ], - "license": "MIT", - "dependencies": { - "@csstools/color-helpers": "^5.1.0", - "@csstools/css-calc": "^2.1.4" - }, "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@csstools/css-parser-algorithms": "^3.0.5", - "@csstools/css-tokenizer": "^3.0.4" + "node": ">=18.0.0" } }, - "node_modules/@csstools/css-parser-algorithms": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.5.tgz", - "integrity": "sha512-DaDeUkXZKjdGhgYaHNJTV9pV7Y9B3b644jCLs9Upc3VeNGg6LWARAT6O+Q+/COo+2gg/bM5rhpMAtf70WqfBdQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } + "node_modules/@druid-ui/build/node_modules/@andreiltd/componentize-qjs-binding-win32-x64-msvc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@andreiltd/componentize-qjs-binding-win32-x64-msvc/-/componentize-qjs-binding-win32-x64-msvc-0.5.0.tgz", + "integrity": "sha512-xKxyDjKKpopKoEwY5lFjODqICv/LiPXtLsrSFB3TuXnF7XjcnzD2xhDCa2DnhjqNl7FOhOji19k6EO8H5nDB9A==", + "cpu": [ + "x64" ], - "license": "MIT", - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@csstools/css-tokenizer": "^3.0.4" - } - }, - "node_modules/@csstools/css-tokenizer": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.4.tgz", - "integrity": "sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" ], - "license": "MIT", "engines": { - "node": ">=18" - } - }, - "node_modules/@druid-ui/build": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@druid-ui/build/-/build-3.0.1.tgz", - "integrity": "sha512-ZNwEE7hPmotzf/BRoOGdsF580GV8i1FuY1NbgTIaTxcLnEVbm+hMdAh8GeOTfBG3aR+NUS2j56xgDyfDLTL5mw==", - "dev": true, - "dependencies": { - "@bytecodealliance/componentize-js": "^0.19.3", - "@bytecodealliance/jco": "^1.17.5", - "@bytecodealliance/preview2-shim": "^0.17.7", - "esbuild": "^0.25.11" - }, - "bin": { - "druid-ui-build": "bin/index.js", - "druid-ui-gen-types": "bin/gen-types.js" + "node": ">=18.0.0" } }, - "node_modules/@druid-ui/component": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@druid-ui/component/-/component-3.0.1.tgz", - "integrity": "sha512-c6mWsenI+TKhFxN3WEDJLVyFx5GeO7xVIt7S+cAtVgzmT5eFr2AqBArbkOro4zlIBDetoO/5z1A+SX0LUSArOg==", + "node_modules/@druid-ui/build/node_modules/@bytecodealliance/jco-transpile": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@bytecodealliance/jco-transpile/-/jco-transpile-0.20.0.tgz", + "integrity": "sha512-FJ8Ue1vsqY8loI6TgYe50Dvt5HVFu0DoiJ7r1NLN/UEa+kbLlO2cbl4vwsLmJrMff8yBRkzb5P7rIN1PCvVGgg==", "dev": true, + "license": "(Apache-2.0 WITH LLVM-exception)", "dependencies": { - "@druid-ui/build": "*", - "@druid-ui/host": "*" + "@bytecodealliance/preview2-shim": "^0.30.0", + "@bytecodealliance/preview3-shim": "^0.10.0", + "binaryen": "^132.0.0", + "oxc-minify": "^0.151.0" } }, - "node_modules/@druid-ui/host": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@druid-ui/host/-/host-2.2.0.tgz", - "integrity": "sha512-KTGpDT3nejQBLTmZ7YEDGBgns2CoaCgYaih7a0AWGVLwTdUSx+GoVR3lSWQ/BN/WGZ8piZl2w0vF6uA0XcsFjw==", + "node_modules/@druid-ui/build/node_modules/@bytecodealliance/preview3-shim": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@bytecodealliance/preview3-shim/-/preview3-shim-0.10.0.tgz", + "integrity": "sha512-GTG5GbLcazKEtQIIKEbCh2+bxWA7xOgjMDfA8MML6Z+V8nnwMhPHDa0ts6Z1yd7G1d82g79UKiwIDjOMAs0G3Q==", "dev": true, + "license": "(Apache-2.0 WITH LLVM-exception)", "dependencies": { - "@bytecodealliance/jco": "^1.17.5", - "jsdom": "^26.1.0", - "snabbdom": "^3.6.2" + "@bytecodealliance/jco-node-fs": "0.3.2", + "@bytecodealliance/preview2-shim": "^0.29.0" } }, - "node_modules/@druid-ui/plattform": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@druid-ui/plattform/-/plattform-3.0.1.tgz", - "integrity": "sha512-A3hs60cYgmF+/VVYTQPr8o1V5xLVwls8XqXe6pzuepw5W4iUulva9m+K0tCLkR5zozC7VLxAScIlx0QIvaTbFw==", + "node_modules/@druid-ui/build/node_modules/@bytecodealliance/preview3-shim/node_modules/@bytecodealliance/preview2-shim": { + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@bytecodealliance/preview2-shim/-/preview2-shim-0.29.0.tgz", + "integrity": "sha512-Lhr/LNOx3sxWIo0jimsk64LwmkbbAkmrFbXBUjfu9+A0U4vuZZMm88UoZApLrGKiG8exkTCUXP9ndM4WmDQn6A==", "dev": true, + "license": "(Apache-2.0 WITH LLVM-exception)", "dependencies": { - "@druid-ui/component": "*" + "@bytecodealliance/jco-node-fs": "0.3.2" } }, - "node_modules/@emnapi/core": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.1.tgz", - "integrity": "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==", + "node_modules/@druid-ui/build/node_modules/@oxc-minify/binding-android-arm-eabi": { + "version": "0.151.0", + "resolved": "https://registry.npmjs.org/@oxc-minify/binding-android-arm-eabi/-/binding-android-arm-eabi-0.151.0.tgz", + "integrity": "sha512-Y1kwFf+GCq62PWojA4u5ME99T1quxdM+VPB67kIC1x0wLmfGAWAhS9cwKIxe/bW95loAxGIruvkYDVMCrvOBvw==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", "optional": true, - "dependencies": { - "@emnapi/wasi-threads": "1.2.2", - "tslib": "^2.4.0" + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@emnapi/runtime": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.1.tgz", - "integrity": "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==", + "node_modules/@druid-ui/build/node_modules/@oxc-minify/binding-android-arm64": { + "version": "0.151.0", + "resolved": "https://registry.npmjs.org/@oxc-minify/binding-android-arm64/-/binding-android-arm64-0.151.0.tgz", + "integrity": "sha512-IuRgG5pZ5Axv88yMK5nIeQHOQqrWkGd2Wcu4yUlGhV9NMr2C6N/HpJ7crLWwpflZSHgWXW5s/5AsmEN2CBJw0w==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", "optional": true, - "dependencies": { - "tslib": "^2.4.0" + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@emnapi/wasi-threads": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz", - "integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==", + "node_modules/@druid-ui/build/node_modules/@oxc-minify/binding-darwin-arm64": { + "version": "0.151.0", + "resolved": "https://registry.npmjs.org/@oxc-minify/binding-darwin-arm64/-/binding-darwin-arm64-0.151.0.tgz", + "integrity": "sha512-Uuo84npyREYIOJ8ohYdc7eA+QKVcZnX4524U81+6nhdmxkMp19AZHaBGmd/tN6c7KDfsF3ATXQUOxKkCOGGxUQ==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", "optional": true, - "dependencies": { - "tslib": "^2.4.0" + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@druid-ui/build/node_modules/@oxc-minify/binding-darwin-x64": { + "version": "0.151.0", + "resolved": "https://registry.npmjs.org/@oxc-minify/binding-darwin-x64/-/binding-darwin-x64-0.151.0.tgz", + "integrity": "sha512-XiWlF2PpwoiX6RcqWmFTvcxW5hH+C96l9km164vbM9wisSBoapo95dvZjEzG7lEmffHOGzb4BOAlAeeZ/WlRWw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@druid-ui/build/node_modules/@oxc-minify/binding-freebsd-x64": { + "version": "0.151.0", + "resolved": "https://registry.npmjs.org/@oxc-minify/binding-freebsd-x64/-/binding-freebsd-x64-0.151.0.tgz", + "integrity": "sha512-fM6/wcqfGp1R+zxYxHXs+P+wBpTlhU1Nr7iiZyBoCg+mphrgyYS7drUiHWoWzAvUSpicnmFm6rag9bSSWTDUMA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@druid-ui/build/node_modules/@oxc-minify/binding-linux-arm-gnueabihf": { + "version": "0.151.0", + "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-0.151.0.tgz", + "integrity": "sha512-s/aBPTyIMW9uAD0mP+xSz7UbuxXfEIi/1rEpqTd1gGjVCz2Sl58sbc65FauI4K26S9nDpk7fGc7y9C9rjK9L+A==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@druid-ui/build/node_modules/@oxc-minify/binding-linux-arm-musleabihf": { + "version": "0.151.0", + "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-0.151.0.tgz", + "integrity": "sha512-9t44xCPN7E93Pmxsov9qwEGcTc0UJa+z0ZJzvjCk0LqXdLNOQhd15k8KgVuzVbWitI19TvOX/fEC3ZVF6LB/kw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@druid-ui/build/node_modules/@oxc-minify/binding-linux-arm64-gnu": { + "version": "0.151.0", + "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.151.0.tgz", + "integrity": "sha512-a77EK4y+3fyD1GZiMnOUSr8x52Hx6eKjPnfIzeh4C9UgnUZBRYMsdHBbBDHLLOX1adjyluxtn4Tze7yTVByCeA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@druid-ui/build/node_modules/@oxc-minify/binding-linux-arm64-musl": { + "version": "0.151.0", + "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.151.0.tgz", + "integrity": "sha512-2AjX1jJsj/guky9OuM1jKmuwRVvy+8UUChK3uvrRWV89I/FyrQj9wKPj8TkuL0Ay5yL2xvZj/Ti1Qg0qiRsP+w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@druid-ui/build/node_modules/@oxc-minify/binding-linux-ppc64-gnu": { + "version": "0.151.0", + "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-0.151.0.tgz", + "integrity": "sha512-l3iUa60pK2WenCy9jhO4UTK/yz9RjVIXPXqfzMdz7DA0QQZ9dxAk/p2p3ERf4KZq/MEIfvs9e4LuFVYg5PFYdQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@druid-ui/build/node_modules/@oxc-minify/binding-linux-riscv64-gnu": { + "version": "0.151.0", + "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-0.151.0.tgz", + "integrity": "sha512-v+sdB36Rp8BxmQoP5Jt6ixz7G0aN9Nayh/LvdNBW/0nkKoLHFyEAcV/Uy+79R3oB0uBC1J6DM9XlDxCC1uMkbA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@druid-ui/build/node_modules/@oxc-minify/binding-linux-riscv64-musl": { + "version": "0.151.0", + "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-0.151.0.tgz", + "integrity": "sha512-QER/ajZukltjbfFi4rGx6/jC5XEnImAma5P606Xnej0D3fyMC8rXPmae5Z3HyUJMt1Hd5POOkC3S5yQBNPppwQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@druid-ui/build/node_modules/@oxc-minify/binding-linux-s390x-gnu": { + "version": "0.151.0", + "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-0.151.0.tgz", + "integrity": "sha512-+r7s5IPrWPtdz/x5LiNSk0ySmzvdP0/VLwt23ULFvcU6jsMrw8DseylMfp4HxvGlJcYyKAUj7JSGxwEmEACUvw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@druid-ui/build/node_modules/@oxc-minify/binding-linux-x64-gnu": { + "version": "0.151.0", + "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.151.0.tgz", + "integrity": "sha512-O1Rs0HbgKvEhTiq1bVcZnsOY6q8f4LoPE6pgOieB19Coyz1XP/ugq7XILUD6evlszBGRKliRAwycRScbl2kjqg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@druid-ui/build/node_modules/@oxc-minify/binding-linux-x64-musl": { + "version": "0.151.0", + "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-x64-musl/-/binding-linux-x64-musl-0.151.0.tgz", + "integrity": "sha512-RSbyV8xzLsvypVTo871IYAfL5We9/8JNyAQLMXiCRnQGD/daFm/bp+iLhtoy2jelgOa6kp4H3bkdl+ci5SSwDQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@druid-ui/build/node_modules/@oxc-minify/binding-openharmony-arm64": { + "version": "0.151.0", + "resolved": "https://registry.npmjs.org/@oxc-minify/binding-openharmony-arm64/-/binding-openharmony-arm64-0.151.0.tgz", + "integrity": "sha512-WHwdIt3Kj0TQSVey3RiWXgyeZpXUz3Hapq/mdCXyxVCBkvRk/KHIxmHE32EGE/PRx+EQFHVo1+gm627XOde/qg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@druid-ui/build/node_modules/@oxc-minify/binding-win32-arm64-msvc": { + "version": "0.151.0", + "resolved": "https://registry.npmjs.org/@oxc-minify/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-0.151.0.tgz", + "integrity": "sha512-mFL0B3HByMlBxspR+SeqyBR8b96QkoI2D8quQOwBXEUExR4Ozu3Ya0uyYR9MBdwvQHZZWQ2EWgum8bdHdTfl/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@druid-ui/build/node_modules/@oxc-minify/binding-win32-ia32-msvc": { + "version": "0.151.0", + "resolved": "https://registry.npmjs.org/@oxc-minify/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-0.151.0.tgz", + "integrity": "sha512-p6QBBxYsg0A0jUQu5NRqW/UuPtoLtmA72SE8N7Rkhn43m/gSLNTE/nFjsLSsX6T9yM8d8k5PfnYvFnSUf+IlRw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@druid-ui/build/node_modules/@oxc-minify/binding-win32-x64-msvc": { + "version": "0.151.0", + "resolved": "https://registry.npmjs.org/@oxc-minify/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.151.0.tgz", + "integrity": "sha512-lkP3SsNXm3JUrNX9c9Ijhl3Iipw0fWuCAOOxju+YjH2AolPUbTLE664KeEDdxt8kaLCh+wCBNyqnV67OLVHZWA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@druid-ui/build/node_modules/binaryen": { + "version": "132.0.0", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-132.0.0.tgz", + "integrity": "sha512-4Usg7yEvwO3FMso3Oov6qkOOHSod1IEv+boKkh77kTljM+eNBouqCTbqWswGzbG+vDNO/b/v2C4gfEh1WgB9Lg==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "wasm-as": "bin/wasm-as", + "wasm-ctor-eval": "bin/wasm-ctor-eval", + "wasm-dis": "bin/wasm-dis", + "wasm-merge": "bin/wasm-merge", + "wasm-metadce": "bin/wasm-metadce", + "wasm-opt": "bin/wasm-opt", + "wasm-reduce": "bin/wasm-reduce", + "wasm-shell": "bin/wasm-shell", + "wasm2js": "bin/wasm2js" + } + }, + "node_modules/@druid-ui/build/node_modules/componentize-qjs": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/componentize-qjs/-/componentize-qjs-0.5.0.tgz", + "integrity": "sha512-vsuvlO1XZ+BwpaBXmwBBkrqY3eCXONG57cMn8EVJJ3o5R8yjnfMfbgtEMq8RaA4EO0BHVVXtb3ts+1UYaI/qdw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "componentize-qjs": "bin/componentize-qjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "@andreiltd/componentize-qjs-binding-darwin-arm64": "0.5.0", + "@andreiltd/componentize-qjs-binding-darwin-x64": "0.5.0", + "@andreiltd/componentize-qjs-binding-linux-arm64-gnu": "0.5.0", + "@andreiltd/componentize-qjs-binding-linux-arm64-musl": "0.5.0", + "@andreiltd/componentize-qjs-binding-linux-x64-gnu": "0.5.0", + "@andreiltd/componentize-qjs-binding-linux-x64-musl": "0.5.0", + "@andreiltd/componentize-qjs-binding-win32-arm64-msvc": "0.5.0", + "@andreiltd/componentize-qjs-binding-win32-x64-msvc": "0.5.0" } }, + "node_modules/@druid-ui/build/node_modules/oxc-minify": { + "version": "0.151.0", + "resolved": "https://registry.npmjs.org/oxc-minify/-/oxc-minify-0.151.0.tgz", + "integrity": "sha512-fYdJw3+WYswBWedCl3G0ReJPlHIR1msz3uf5cGAgpHOlQOxfrVu5nOp2gLnccA91Vs7Yw2nH00lj8pc0rjZvYg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/oxc-project" + }, + "optionalDependencies": { + "@oxc-minify/binding-android-arm-eabi": "0.151.0", + "@oxc-minify/binding-android-arm64": "0.151.0", + "@oxc-minify/binding-darwin-arm64": "0.151.0", + "@oxc-minify/binding-darwin-x64": "0.151.0", + "@oxc-minify/binding-freebsd-x64": "0.151.0", + "@oxc-minify/binding-linux-arm-gnueabihf": "0.151.0", + "@oxc-minify/binding-linux-arm-musleabihf": "0.151.0", + "@oxc-minify/binding-linux-arm64-gnu": "0.151.0", + "@oxc-minify/binding-linux-arm64-musl": "0.151.0", + "@oxc-minify/binding-linux-ppc64-gnu": "0.151.0", + "@oxc-minify/binding-linux-riscv64-gnu": "0.151.0", + "@oxc-minify/binding-linux-riscv64-musl": "0.151.0", + "@oxc-minify/binding-linux-s390x-gnu": "0.151.0", + "@oxc-minify/binding-linux-x64-gnu": "0.151.0", + "@oxc-minify/binding-linux-x64-musl": "0.151.0", + "@oxc-minify/binding-openharmony-arm64": "0.151.0", + "@oxc-minify/binding-win32-arm64-msvc": "0.151.0", + "@oxc-minify/binding-win32-ia32-msvc": "0.151.0", + "@oxc-minify/binding-win32-x64-msvc": "0.151.0" + } + }, + "node_modules/@druid-ui/client": { + "version": "4.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@druid-ui/client/-/client-4.0.0-rc.1.tgz", + "integrity": "sha512-DcosGCngeEE84LDf1Ru0tw+yZGSjB9EOZYVqGVqiaNTV+J0m/8oeP7MIM2zDgRiwc4JdVT8DVLcNU6dnrz1p+A==", + "dev": true + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.25.12", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", @@ -1115,46 +1228,13 @@ "dev": true, "license": "MIT" }, - "node_modules/@napi-rs/lzma": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma/-/lzma-1.5.1.tgz", - "integrity": "sha512-sgOZ89+y8cDbY+3WbzR8CtIhCuFRWotZ9/2PjPVDJHz6np5KFTAev0DrwiyTJTgFsCRDhfGlbmhMgyhHbWdZ6g==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^22.20 || ^24.12 || >=25" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Brooooooklyn" - }, - "optionalDependencies": { - "@napi-rs/lzma-android-arm-eabi": "1.5.1", - "@napi-rs/lzma-android-arm64": "1.5.1", - "@napi-rs/lzma-darwin-arm64": "1.5.1", - "@napi-rs/lzma-darwin-x64": "1.5.1", - "@napi-rs/lzma-freebsd-x64": "1.5.1", - "@napi-rs/lzma-linux-arm-gnueabihf": "1.5.1", - "@napi-rs/lzma-linux-arm64-gnu": "1.5.1", - "@napi-rs/lzma-linux-arm64-musl": "1.5.1", - "@napi-rs/lzma-linux-ppc64-gnu": "1.5.1", - "@napi-rs/lzma-linux-riscv64-gnu": "1.5.1", - "@napi-rs/lzma-linux-s390x-gnu": "1.5.1", - "@napi-rs/lzma-linux-x64-gnu": "1.5.1", - "@napi-rs/lzma-linux-x64-musl": "1.5.1", - "@napi-rs/lzma-wasm32-wasi": "1.5.1", - "@napi-rs/lzma-win32-arm64-msvc": "1.5.1", - "@napi-rs/lzma-win32-ia32-msvc": "1.5.1", - "@napi-rs/lzma-win32-x64-msvc": "1.5.1" - } - }, - "node_modules/@napi-rs/lzma-android-arm-eabi": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-android-arm-eabi/-/lzma-android-arm-eabi-1.5.1.tgz", - "integrity": "sha512-sahBe4ko2Z69NPTddaX6ZgbQZu9SDoITxw1S3dWl1gAGynZG34qHHCT8UaUMFxf3h3zMhCJjEzz4basaBxiTuQ==", - "cpu": [ - "arm" - ], + "node_modules/@rolldown/binding-android-arm-eabi": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.5.tgz", + "integrity": "sha512-DLe/i+l8ynIBY7XEQ191TeZvCoowIGa18R+dIV30GW7DiOtp74i/xX8hs8GUjW5ARV7VZuie3d6AumSmCwbeRA==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", "optional": true, @@ -1162,13 +1242,13 @@ "android" ], "engines": { - "node": "^22.20 || ^24.12 || >=25" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@napi-rs/lzma-android-arm64": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-android-arm64/-/lzma-android-arm64-1.5.1.tgz", - "integrity": "sha512-7tkQAJJuBHxAxiEBNFgSTpvrtGpbwZYYJUSOmGEK3OfbdbNeoT2rdBxpM/gY1s+itEVbtOSlpaRPPG19MnwOzA==", + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.5.tgz", + "integrity": "sha512-zXcwKlQApYAOELHd8PwKDFkagYF9Wy4e0RJ+0qnzl9Pjnpj75TEG8ufv40p2J7kCEfwZAsNiuzRIyNNMWT38ig==", "cpu": [ "arm64" ], @@ -1179,13 +1259,13 @@ "android" ], "engines": { - "node": "^22.20 || ^24.12 || >=25" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@napi-rs/lzma-darwin-arm64": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-darwin-arm64/-/lzma-darwin-arm64-1.5.1.tgz", - "integrity": "sha512-XWX8gtF+GHGk3nH3Wm3QUZNcxw9QHsFVZz3MzVLhWWHhceede1J4/vD+3dj3E1iKB9G6mualaZxOoD08R3E+7g==", + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.5.tgz", + "integrity": "sha512-dK4QakI42nzWgJT5sm4y4y/O//D4OxM75/cH28RLV+nzIN9AY+YsbuUVrUTjlLjXR6vpyxFbSsbmNuJ6BP9sww==", "cpu": [ "arm64" ], @@ -1196,13 +1276,13 @@ "darwin" ], "engines": { - "node": "^22.20 || ^24.12 || >=25" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@napi-rs/lzma-darwin-x64": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-darwin-x64/-/lzma-darwin-x64-1.5.1.tgz", - "integrity": "sha512-CfsqUpMTI1z8enrA/b+GcHM6YDI8D0kqCiqPYEnst4rbOABQ9KZ92ybTTNnlnZ7A017WoMZKUEWc36KXDwi0xg==", + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.5.tgz", + "integrity": "sha512-fqSALaUu1Wjd1nK2uW2kJDWdLCc8lx1IcY+MTY26Aurfdx19anlzhqXOgCFbBFQnlFDTn4TC1/7Nz4Bl2mLP3A==", "cpu": [ "x64" ], @@ -1213,13 +1293,13 @@ "darwin" ], "engines": { - "node": "^22.20 || ^24.12 || >=25" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@napi-rs/lzma-freebsd-x64": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-freebsd-x64/-/lzma-freebsd-x64-1.5.1.tgz", - "integrity": "sha512-bTyNfg90FXIgE61U7l14aMmVOqRQ6AyP5JMT3jmCStaZI18apLNPdzZ8i7yqxZfKvRMVfPjE2brXIw27c+RRgA==", + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.5.tgz", + "integrity": "sha512-/vCnNxlkxs9tKxNDcyWUePpJ/PgTzxIaVhoM5SmG8UV+GR/IcPam4VYxi7GIMo7PSDuNqlJqvprqii9NqqVCMw==", "cpu": [ "x64" ], @@ -1230,13 +1310,13 @@ "freebsd" ], "engines": { - "node": "^22.20 || ^24.12 || >=25" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@napi-rs/lzma-linux-arm-gnueabihf": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-arm-gnueabihf/-/lzma-linux-arm-gnueabihf-1.5.1.tgz", - "integrity": "sha512-vNE+D8nrw+eOkBsdKCsmDhowDV3pIMKXEhedvXfbgrWbrO7GlZJH+RXL+X+RYLxGwi8Ym61ZMt15sIOnNmh9Sw==", + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.5.tgz", + "integrity": "sha512-abk0NLA519LxRCszmbE0jYKuQ9YPocOXTiOXOo6Yr+YAT95VH+PtqYAjOJvGKt3viEd/x4qzabAlwd5bHOOARg==", "cpu": [ "arm" ], @@ -1247,13 +1327,13 @@ "linux" ], "engines": { - "node": "^22.20 || ^24.12 || >=25" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@napi-rs/lzma-linux-arm64-gnu": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-arm64-gnu/-/lzma-linux-arm64-gnu-1.5.1.tgz", - "integrity": "sha512-csUem4WgoKGTprv/pOPm9UIWbb+hrfUwYXefpTHPAEGVFLl5behEFabisJ7FtihCa3yG2Efcl+yw25rlhhrIYw==", + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.5.tgz", + "integrity": "sha512-Y7eALiJ8lr0M2HH103Js+g7V34wf6snlpZLAsHI90uLhr3PVlNsbFVAXJC9d/V6BnPyKtpSwI+NcB/RLxsQxuA==", "cpu": [ "arm64" ], @@ -1264,13 +1344,13 @@ "linux" ], "engines": { - "node": "^22.20 || ^24.12 || >=25" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@napi-rs/lzma-linux-arm64-musl": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-arm64-musl/-/lzma-linux-arm64-musl-1.5.1.tgz", - "integrity": "sha512-kB/xhlVN1eLvVmDJSKZEjp5Gg2xDYexNrB5jwpSMbOkeGS6N9AasByPBg5VqCpMYC+zZi7DM458DRhtWYhqXTQ==", + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.5.tgz", + "integrity": "sha512-xMvZgnbZg4YVnR/AX2b3oOPDTFYJvUVaJg5FedA/LuvexAtXibZQej4cnTkw3rjsJ/ggUROB64TdtETiim+FYA==", "cpu": [ "arm64" ], @@ -1281,13 +1361,13 @@ "linux" ], "engines": { - "node": "^22.20 || ^24.12 || >=25" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@napi-rs/lzma-linux-ppc64-gnu": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-ppc64-gnu/-/lzma-linux-ppc64-gnu-1.5.1.tgz", - "integrity": "sha512-s28RW0W1yBWQc1nbPdF7tp14koqslY3ZWLVI8uaanX292Dc6ezd4NPVwxEoCNBVON/oD7BmUbWGtyFvmm7dQ5A==", + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.5.tgz", + "integrity": "sha512-GRjeqTUDHTo5GwntsLaAMcBahG3nlpjftXWZLN73HiYQlhwEowvarFgQnRnQZtIp4keXX7quXFbG38uPZBa2EA==", "cpu": [ "ppc64" ], @@ -1298,30 +1378,13 @@ "linux" ], "engines": { - "node": "^22.20 || ^24.12 || >=25" - } - }, - "node_modules/@napi-rs/lzma-linux-riscv64-gnu": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-riscv64-gnu/-/lzma-linux-riscv64-gnu-1.5.1.tgz", - "integrity": "sha512-+lGNwYlIN14YPMTNvYtIJJqHFevDTd6Juw/1NmXbWx/iRd/LLrjhlM/yluMX6pxs6NkOGsuuEXJJrbbEUS59OQ==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^22.20 || ^24.12 || >=25" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@napi-rs/lzma-linux-s390x-gnu": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-s390x-gnu/-/lzma-linux-s390x-gnu-1.5.1.tgz", - "integrity": "sha512-PB44FFWWFrLeQowhcep1hPD1YcLqKlnnY60RMU74qrxTlr4YGEyzeMItJqh2uivBfv9kQScOF/B0J9+Vab/oyw==", + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.5.tgz", + "integrity": "sha512-vLNTR45F2Uwc8AufkNXPmB4VliaXs+FvcheEogIzOXzO4l+LzieXF5A/TWxLy5HtqpsRCHUfd0lPVrrdgXdLHQ==", "cpu": [ "s390x" ], @@ -1332,13 +1395,13 @@ "linux" ], "engines": { - "node": "^22.20 || ^24.12 || >=25" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@napi-rs/lzma-linux-x64-gnu": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", - "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.5.tgz", + "integrity": "sha512-Mgj59/HTuYeK9Gz2MA+mBWKnHsAgkBSec15ZMb1st3oIfFbX7gCjOae7GydHhzcyQi9Z/7M1QuN9bR3oFqF0jQ==", "cpu": [ "x64" ], @@ -1349,13 +1412,13 @@ "linux" ], "engines": { - "node": "^22.20 || ^24.12 || >=25" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@napi-rs/lzma-linux-x64-musl": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-musl/-/lzma-linux-x64-musl-1.5.1.tgz", - "integrity": "sha512-I3nsYrWtrW9JpeCr+mkJIVDt0HY3m6qVUBs5vTtoIvJQxwqf1PBXSy5IS7T53ksQFH2kd2UX8rLxJ7B4WISpZg==", + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.5.tgz", + "integrity": "sha512-mY8AP0/ichsbhAxGnLa3d3+MwV0EfgrPND2bplI3Ym8T6R2pJ0N87bvrKVwNXmdy3jnr6eQBecdqx/HMknBmpA==", "cpu": [ "x64" ], @@ -1366,55 +1429,30 @@ "linux" ], "engines": { - "node": "^22.20 || ^24.12 || >=25" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@napi-rs/lzma-wasm32-wasi": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-wasm32-wasi/-/lzma-wasm32-wasi-1.5.1.tgz", - "integrity": "sha512-gy3wwPBa6+XEyA4fUzq6CClrXA1ajXjuVf5zbnHytJRgoHznj+mvpU3+co2fxXwqTCmIpn6KrzqH5bRDztBPhA==", + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.5.tgz", + "integrity": "sha512-8SLssA2oweAxyRgDp789ACfRb/3P+zNRJpzZxSizxF9m8NUDQ4+3xjo8ttjhVGGw6Qxb70oZiEtIjaKikCO7Yw==", "cpu": [ - "wasm32" + "arm64" ], "dev": true, "license": "MIT", "optional": true, - "dependencies": { - "@emnapi/core": "1.11.2", - "@emnapi/runtime": "1.11.2", - "@napi-rs/wasm-runtime": "^1.1.6" - }, + "os": [ + "openharmony" + ], "engines": { - "node": "^22.20 || ^24.12 || >=25" - } - }, - "node_modules/@napi-rs/lzma-wasm32-wasi/node_modules/@emnapi/core": { - "version": "1.11.2", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.2.tgz", - "integrity": "sha512-TC8MkTuZUtcTSiFeuC0ksCh9QIJ5+F21MvZ4Wn4ORfYaFJ/0dsiudv5tVkejgwZlwQ39jL9WWDe2lz8x0WglOA==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/wasi-threads": "1.2.2", - "tslib": "^2.4.0" - } - }, - "node_modules/@napi-rs/lzma-wasm32-wasi/node_modules/@emnapi/runtime": { - "version": "1.11.2", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.2.tgz", - "integrity": "sha512-kyOl3X0DuTiT1h2ft8r2fYO8JYtU9a9Xis/zBSiGArNaagCOWx90N1k2wxp18czFDH+OgcWGb5ZP/XMt3dcyPA==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@napi-rs/lzma-win32-arm64-msvc": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-win32-arm64-msvc/-/lzma-win32-arm64-msvc-1.5.1.tgz", - "integrity": "sha512-dK+huOsHiyH6oJjij+cnjqFCakk2HgWmpI12Xm4pLUyPphe4ebYoJBgehaNAxprmjFqBQ7nL95YPVz9BHyqmPg==", + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.5.tgz", + "integrity": "sha512-vGbruD5zquhoc8D9SViXgN2FBJtNdTyQ4DtG+SWiEGlJiAzoKcZ2xp+xuXCffhubVdt0NJlTZqkeRuERy7g8Cw==", "cpu": [ "arm64" ], @@ -1425,15 +1463,15 @@ "win32" ], "engines": { - "node": "^22.20 || ^24.12 || >=25" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@napi-rs/lzma-win32-ia32-msvc": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-win32-ia32-msvc/-/lzma-win32-ia32-msvc-1.5.1.tgz", - "integrity": "sha512-dGE8L+0EQ+GyU9ap9InqB/t/PmPG/bLj918q7OsJ29FuTdn8fK4OX3U4IQZhylHIA+/dQ/SXJk5n4yfah2XVvA==", + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.5.tgz", + "integrity": "sha512-e/SXpgISz+IoqVcSSI0rx/d/he8zqLex+/rCWpnHpmVfmPIUjag9H6P7zotf0gJHwPUhQxZ/mF8tr6acebT9yw==", "cpu": [ - "ia32" + "x64" ], "dev": true, "license": "MIT", @@ -1442,4224 +1480,877 @@ "win32" ], "engines": { - "node": "^22.20 || ^24.12 || >=25" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@napi-rs/lzma-win32-x64-msvc": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@napi-rs/lzma-win32-x64-msvc/-/lzma-win32-x64-msvc-1.5.1.tgz", - "integrity": "sha512-EKW4t/iqdCT/xnd5t9oXLvVER/PMNAWXKqUAl3fgvUcOILeZIIht77/dVnfFcc9htA/DCBXC/6YQWdW+LusjFA==", - "cpu": [ - "x64" - ], + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/chai": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^22.20 || ^24.12 || >=25" + "dependencies": { + "@types/deep-eql": "*", + "assertion-error": "^2.0.1" } }, - "node_modules/@napi-rs/wasm-runtime": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.3.tgz", - "integrity": "sha512-UMduMbqO5s5zF2NkNacMT/yK5Y5QiKvWr2+50bzIIxFDwVJ2h49b+oyjaCGPhJxd2/gC2x39EHv/gHVuu36x2Q==", + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@vitest/expect": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.11.tgz", + "integrity": "sha512-VX2x5vNJXET47KAFzwERI+KRMtTTCSWTfSMKsW7JsUsXV4psq++e3DvZpuTDOpHcxytiDs6p2nhVb2tVDiiUYw==", "dev": true, "license": "MIT", - "optional": true, "dependencies": { - "@tybys/wasm-util": "^0.10.3" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + "@standard-schema/spec": "^1.1.0", + "@types/chai": "^5.2.2", + "@vitest/spy": "4.1.11", + "@vitest/utils": "4.1.11", + "chai": "^6.2.2", + "tinyrainbow": "^3.1.0" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/Brooooooklyn" - }, - "peerDependencies": { - "@emnapi/core": "^1.7.1 || ^2.0.0-alpha.4", - "@emnapi/runtime": "^1.7.1 || ^2.0.0-alpha.4" + "url": "https://opencollective.com/vitest" } }, - "node_modules/@oxc-minify/binding-android-arm-eabi": { - "version": "0.136.0", - "resolved": "https://registry.npmjs.org/@oxc-minify/binding-android-arm-eabi/-/binding-android-arm-eabi-0.136.0.tgz", - "integrity": "sha512-gk1jzky1vLeOcK7w9Ib2RT/UooZ7O21s8YSeXCsy4tzsmguKb3Cbsv/Ra2fKhMp4mKeKCzvC1Xa41OfSBWfWdQ==", - "cpu": [ - "arm" - ], + "node_modules/@vitest/pretty-format": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.11.tgz", + "integrity": "sha512-yiZzPbGTS9Sr/JpFl8zHrcIkAofNbFV6k21vIgQN/cY/oxZeXhJv5sc/MBJ5jFKWmWs+oJHw0UXLZjmf931+Vw==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" + "dependencies": { + "tinyrainbow": "^3.1.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@oxc-minify/binding-android-arm64": { - "version": "0.136.0", - "resolved": "https://registry.npmjs.org/@oxc-minify/binding-android-arm64/-/binding-android-arm64-0.136.0.tgz", - "integrity": "sha512-5GIYanqud/ohXEcg2dsdn0+eSKXqclw5qlRUkvSM1sKEa4ZQ7hqOk8XPJBNPh3LXXw+Qw85B6jkmOFLKsCHp5w==", - "cpu": [ - "arm64" - ], + "node_modules/@vitest/runner": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.11.tgz", + "integrity": "sha512-LztvUgdwMNJMIkj3hQnnxiC2Xy1zNxq928W/xhjCLaNCzqTZOudjwbQf6v9IntZGPw132i2Lq2rgTRZHD3JHNw==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" + "dependencies": { + "@vitest/utils": "4.1.11", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@oxc-minify/binding-darwin-arm64": { - "version": "0.136.0", - "resolved": "https://registry.npmjs.org/@oxc-minify/binding-darwin-arm64/-/binding-darwin-arm64-0.136.0.tgz", - "integrity": "sha512-QAMpHKXWOoMCTenSZjQjVT5YmMooujlCKAf1T3PHFl2LuaA6ukQFXba0bgSLgAxRrAeX/itkwi4lzVQXtYmnRg==", - "cpu": [ - "arm64" - ], + "node_modules/@vitest/snapshot": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.11.tgz", + "integrity": "sha512-pN7ikn1ON7h8ee4gIAp4AzyK+zBtJPzVbqOgu5LCEh4VaJVbPQcgYQYJIMGQPXVeJJq1fnfazis7a5pFNPahog==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" + "dependencies": { + "@vitest/pretty-format": "4.1.11", + "@vitest/utils": "4.1.11", + "magic-string": "^0.30.21", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@oxc-minify/binding-darwin-x64": { - "version": "0.136.0", - "resolved": "https://registry.npmjs.org/@oxc-minify/binding-darwin-x64/-/binding-darwin-x64-0.136.0.tgz", - "integrity": "sha512-rDnoPj8hztiU8C1VNKuzujh7SgTJlgiUvUCiWQjTnVSLsABsLW9ZWd1l1Ji0VN3UW39wGpptgvahIWTrHnGH/A==", - "cpu": [ - "x64" - ], + "node_modules/@vitest/spy": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.11.tgz", + "integrity": "sha512-apNa/prQy2qCeywhnixOHPRCgGNhvg7T4Dapfl1GahLp/R+uhBm5cPyFoNVyqsNd2h1nJxL6BqqdIjiABL60YA==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@oxc-minify/binding-freebsd-x64": { - "version": "0.136.0", - "resolved": "https://registry.npmjs.org/@oxc-minify/binding-freebsd-x64/-/binding-freebsd-x64-0.136.0.tgz", - "integrity": "sha512-9fGSgP7uyPLCTjMx9z3AUV4UjnfOVoGTH5JzamLegPwGLJ97Gr1jht1437CRk8ZNabGmxQR6qNn3e+Tox2lswg==", - "cpu": [ - "x64" - ], + "node_modules/@vitest/utils": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.11.tgz", + "integrity": "sha512-zTCVGpyFsGWBhllOyKlTw/vnr6D9qxsfSDyfbyZmTyjHw5N/VuvzHpHoQjm2ZJzn4RJgx5w4r7V0er69CmLgPQ==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" + "dependencies": { + "@vitest/pretty-format": "4.1.11", + "convert-source-map": "^2.0.0", + "tinyrainbow": "^3.1.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@oxc-minify/binding-linux-arm-gnueabihf": { - "version": "0.136.0", - "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-0.136.0.tgz", - "integrity": "sha512-k0QvZS+x6ROI4O5Ikqn9dDU2dmkEJ46Yh6baZJI/eUk/a1k1GOs9/vyXItLZrKlwYrSgdEx2BFXbKgyd1NyRPw==", - "cpu": [ - "arm" - ], + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=12" } }, - "node_modules/@oxc-minify/binding-linux-arm-musleabihf": { - "version": "0.136.0", - "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-0.136.0.tgz", - "integrity": "sha512-iRFxUc8ubotVfuyq3e4LPGbHrjvWd1/B3499a55GueMLc1EDJ0fHzNXJiCx2eMQGfzHtHodjmvrJ2BSvSXBNhQ==", - "cpu": [ - "arm" - ], + "node_modules/chai": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", + "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=18" } }, - "node_modules/@oxc-minify/binding-linux-arm64-gnu": { - "version": "0.136.0", - "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.136.0.tgz", - "integrity": "sha512-hbKxNCXJsULrb6EyG5SumzJKuPfP8Y0UQ/TElRgXVUhyyPf6cBPlF8HMq+MAylF98ACBzV8jBp2Mm62lJyTo+w==", - "cpu": [ - "arm64" - ], + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], + "dependencies": { + "readdirp": "^4.0.1" + }, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "node_modules/@oxc-minify/binding-linux-arm64-musl": { - "version": "0.136.0", - "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.136.0.tgz", - "integrity": "sha512-T+u/CGKW0UXemJeVux4ix6rK+ug3bQCUEbu5hFlX9K61KQNd44rOcrM15mDK99L7USaXwmiwHeIkEDvmmyDMSA==", - "cpu": [ - "arm64" - ], + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], + "license": "MIT" + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=8" } }, - "node_modules/@oxc-minify/binding-linux-ppc64-gnu": { - "version": "0.136.0", - "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-0.136.0.tgz", - "integrity": "sha512-WNPTN2F448tb49BoqjV9IMRzZWa0WB8GHzrB+bnxKQPOyzz07T6rmDKrr4Hjl81ADGjDYSsr1fgXcjyLQFdMdw==", - "cpu": [ - "ppc64" - ], + "node_modules/esbuild": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", "dev": true, + "hasInstallScript": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], + "bin": { + "esbuild": "bin/esbuild" + }, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" } }, - "node_modules/@oxc-minify/binding-linux-riscv64-gnu": { - "version": "0.136.0", - "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-0.136.0.tgz", - "integrity": "sha512-MvcCfu8OeabrmNN9wqhh8Gqizg68RQ3iOvXBJmlLMy5p1PC6az9bAwqOk98lsCmKI4I5LpULekOlfxRYh3o5Kw==", - "cpu": [ - "riscv64" - ], + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" + "dependencies": { + "@types/estree": "^1.0.0" } }, - "node_modules/@oxc-minify/binding-linux-riscv64-musl": { - "version": "0.136.0", - "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-0.136.0.tgz", - "integrity": "sha512-rwJXFUFFA0egAULtOOgfW8YhhLhtWrr2qFxftvZ7/U6Xtxiev8i+eCwSNW1RpHiX74QMsJVpRE3ykoefqb1MtQ==", - "cpu": [ - "riscv64" - ], + "node_modules/expect-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz", + "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==", "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], + "license": "Apache-2.0", "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=12.0.0" } }, - "node_modules/@oxc-minify/binding-linux-s390x-gnu": { - "version": "0.136.0", - "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-0.136.0.tgz", - "integrity": "sha512-qizAxHmj7VHm5/D5qiIlvzxAS2tlmadDOJ5XFI7zx/wfnk/+fdk5iVaHOv+C4tDE/4wLQyMoBYVIs6R1LeN91w==", - "cpu": [ - "s390x" - ], + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } } }, - "node_modules/@oxc-minify/binding-linux-x64-gnu": { - "version": "0.136.0", - "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.136.0.tgz", - "integrity": "sha512-gcyLAad0UblkEhGjVfx5Mwq63OSx8r04IbcfwzpZYpHisO/vioMsrs4GkDsQZ2Ejc8cdUk6YMIrf9FwNBzh+Dw==", - "cpu": [ - "x64" - ], + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, + "hasInstallScript": true, "license": "MIT", "optional": true, "os": [ - "linux" + "darwin" ], "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/@oxc-minify/binding-linux-x64-musl": { - "version": "0.136.0", - "resolved": "https://registry.npmjs.org/@oxc-minify/binding-linux-x64-musl/-/binding-linux-x64-musl-0.136.0.tgz", - "integrity": "sha512-QAK6kwBjljX6luYzeppVdRP3gTaFNFfp9iS/V0cCvU43wUZay5xFXBgmzBHYrzZV2MhzURNnXfEZRo9poAxyvA==", - "cpu": [ - "x64" - ], + "node_modules/lightningcss": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" } }, - "node_modules/@oxc-minify/binding-openharmony-arm64": { - "version": "0.136.0", - "resolved": "https://registry.npmjs.org/@oxc-minify/binding-openharmony-arm64/-/binding-openharmony-arm64-0.136.0.tgz", - "integrity": "sha512-nIGxkTOnN9GwslmooxbZ3Ti2RgbX9QLHy0X9uO0pslOT+4dsNVUawBU/6r4M5cWM+ZdRD2tOF4V+n0l8tS59nQ==", + "node_modules/lightningcss-android-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", + "license": "MPL-2.0", "optional": true, "os": [ - "openharmony" + "android" ], "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@oxc-minify/binding-wasm32-wasi": { - "version": "0.136.0", - "resolved": "https://registry.npmjs.org/@oxc-minify/binding-wasm32-wasi/-/binding-wasm32-wasi-0.136.0.tgz", - "integrity": "sha512-YB3G8AHT6PpDS8/DfjlJrQjywj+/6gCkNBcAJdYzcYbQRIZE6SaTNowiGuZPR1m1jOl1WjcjefniKSmVxzhvRA==", - "cpu": [ - "wasm32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/core": "1.11.1", - "@emnapi/runtime": "1.11.1", - "@napi-rs/wasm-runtime": "^1.1.5" + "node": ">= 12.0.0" }, - "engines": { - "node": "^20.19.0 || >=22.12.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@oxc-minify/binding-win32-arm64-msvc": { - "version": "0.136.0", - "resolved": "https://registry.npmjs.org/@oxc-minify/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-0.136.0.tgz", - "integrity": "sha512-UVRH3BlNc2rmla+sbSd5xTF/u+esCqZS6VSWPolZybcBh3TlVe1Sf5MOuHQWUaFoyv5uFOvee4hOfS/14nPvZw==", + "node_modules/lightningcss-darwin-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", + "license": "MPL-2.0", "optional": true, "os": [ - "win32" + "darwin" ], "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@oxc-minify/binding-win32-ia32-msvc": { - "version": "0.136.0", - "resolved": "https://registry.npmjs.org/@oxc-minify/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-0.136.0.tgz", - "integrity": "sha512-zFGkUd82jci0E+isc2O36lVmmXVUDXyEMN2RYIyez+MBNqhdjPLIGx62FCsrJtLKeuiPf/8XkFv977aUtndUng==", + "node_modules/lightningcss-darwin-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", "cpu": [ - "ia32" + "x64" ], "dev": true, - "license": "MIT", + "license": "MPL-2.0", "optional": true, "os": [ - "win32" + "darwin" ], "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@oxc-minify/binding-win32-x64-msvc": { - "version": "0.136.0", - "resolved": "https://registry.npmjs.org/@oxc-minify/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.136.0.tgz", - "integrity": "sha512-VHgPwd5xibC9UYxBeq7nURTjY+wxhdumllij6JaCIUVfD9IRcrA66SVlJ5fPNoUXcRp8ZXhJfoIZwVz9wAEGJw==", + "node_modules/lightningcss-freebsd-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", + "license": "MPL-2.0", "optional": true, "os": [ - "win32" + "freebsd" ], "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@oxc-parser/binding-android-arm64": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-android-arm64/-/binding-android-arm64-0.76.0.tgz", - "integrity": "sha512-1XJW/16CDmF5bHE7LAyPPmEEVnxSadDgdJz+xiLqBrmC4lfAeuAfRw3HlOygcPGr+AJsbD4Z5sFJMkwjbSZlQg==", + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", "cpu": [ - "arm64" + "arm" ], "dev": true, - "license": "MIT", + "license": "MPL-2.0", "optional": true, "os": [ - "android" + "linux" ], "engines": { - "node": ">=20.0.0" + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@oxc-parser/binding-darwin-arm64": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-darwin-arm64/-/binding-darwin-arm64-0.76.0.tgz", - "integrity": "sha512-yoQwSom8xsB+JdGsPUU0xxmxLKiF2kdlrK7I56WtGKZilixuBf/TmOwNYJYLRWkBoW5l2/pDZOhBm2luwmLiLw==", + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", + "license": "MPL-2.0", "optional": true, "os": [ - "darwin" + "linux" ], "engines": { - "node": ">=20.0.0" + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@oxc-parser/binding-darwin-x64": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-darwin-x64/-/binding-darwin-x64-0.76.0.tgz", - "integrity": "sha512-uRIopPLvr3pf2Xj7f5LKyCuqzIU6zOS+zEIR8UDYhcgJyZHnvBkfrYnfcztyIcrGdQehrFUi3uplmI09E7RdiQ==", + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", "cpu": [ - "x64" + "arm64" ], "dev": true, - "license": "MIT", + "license": "MPL-2.0", "optional": true, "os": [ - "darwin" + "linux" ], "engines": { - "node": ">=20.0.0" + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@oxc-parser/binding-freebsd-x64": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-freebsd-x64/-/binding-freebsd-x64-0.76.0.tgz", - "integrity": "sha512-a0EOFvnOd2FqmDSvH6uWLROSlU6KV/JDKbsYDA/zRLyKcG6HCsmFnPsp8iV7/xr9WMbNgyJi6R5IMpePQlUq7Q==", + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@oxc-parser/binding-linux-arm-gnueabihf": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-0.76.0.tgz", - "integrity": "sha512-ikRYDHL3fOdZwfJKmcdqjlLgkeNZ3Ez0qM8wAev5zlHZ+lY/Ig7qG5SCqPlvuTu+nNQ6zrFFaKvvt69EBKXU/g==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", + "license": "MPL-2.0", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=20.0.0" + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@oxc-parser/binding-linux-arm-musleabihf": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-0.76.0.tgz", - "integrity": "sha512-dtRv5J5MRCLR7x39K8ufIIW4svIc7gYFUaI0YFXmmeOBhK/K2t/CkguPnDroKtsmXIPHDRtmJ1JJYzNcgJl6Wg==", + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", "cpu": [ - "arm" + "x64" ], "dev": true, - "license": "MIT", + "license": "MPL-2.0", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=20.0.0" + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@oxc-parser/binding-linux-arm64-gnu": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.76.0.tgz", - "integrity": "sha512-IE4iiiggFH2snagQxHrY5bv6dDpRMMat+vdlMN/ibonA65eOmRLp8VLTXnDiNrcla/itJ1L9qGABHNKU+SnE8g==", + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", + "license": "MPL-2.0", "optional": true, "os": [ - "linux" + "win32" ], "engines": { - "node": ">=20.0.0" + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@oxc-parser/binding-linux-arm64-musl": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.76.0.tgz", - "integrity": "sha512-wi9zQPMDHrBuRuT7Iurfidc9qlZh7cKa5vfYzOWNBCaqJdgxmNOFzvYen02wVUxSWGKhpiPHxrPX0jdRyJ8Npg==", + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", "cpu": [ - "arm64" + "x64" ], "dev": true, - "license": "MIT", + "license": "MPL-2.0", "optional": true, "os": [ - "linux" + "win32" ], "engines": { - "node": ">=20.0.0" + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" } }, - "node_modules/@oxc-parser/binding-linux-riscv64-gnu": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-0.76.0.tgz", - "integrity": "sha512-0tqqu1pqPee2lLGY8vtYlX1L415fFn89e0a3yp4q5N9f03j1rRs0R31qesTm3bt/UK8HYjECZ+56FCVPs2MEMQ==", - "cpu": [ - "riscv64" - ], + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=20.0.0" + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" } }, - "node_modules/@oxc-parser/binding-linux-s390x-gnu": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-0.76.0.tgz", - "integrity": "sha512-y36Hh1a5TA+oIGtlc8lT7N9vdHXBlhBetQJW0p457KbiVQ7jF7AZkaPWhESkjHWAsTVKD2OjCa9ZqfaqhSI0FQ==", - "cpu": [ - "s390x" - ], + "node_modules/nanoid": { + "version": "3.3.18", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", + "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==", "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, "engines": { - "node": ">=20.0.0" + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/@oxc-parser/binding-linux-x64-gnu": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.76.0.tgz", - "integrity": "sha512-7/acaG9htovp3gp/J0kHgbItQTuHctl+rbqPPqZ9DRBYTz8iV8kv3QN8t8Or8i/hOmOjfZp9McDoSU1duoR4/A==", - "cpu": [ - "x64" - ], + "node_modules/obug": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.4.tgz", + "integrity": "sha512-4a+OsYv9UktOJKE+l1A4OufDgdRF9PifWj+tJnHURo/P+WOxpG4GzUFL9qCalmWauao6ogiG+QvnCovwPoyAWA==", "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" + "funding": [ + "https://github.com/sponsors/sxzz", + "https://opencollective.com/debug" ], + "license": "MIT", "engines": { - "node": ">=20.0.0" + "node": ">=12.20.0" } }, - "node_modules/@oxc-parser/binding-linux-x64-musl": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-x64-musl/-/binding-linux-x64-musl-0.76.0.tgz", - "integrity": "sha512-AxFt0reY6Q2rfudABmMTFGR8tFFr58NlH2rRBQgcj+F+iEwgJ+jMwAPhXd2y1I2zaI8GspuahedUYQinqxWqjA==", - "cpu": [ - "x64" - ], + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], "engines": { - "node": ">=20.0.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/@oxc-parser/binding-wasm32-wasi": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-wasm32-wasi/-/binding-wasm32-wasi-0.76.0.tgz", - "integrity": "sha512-wHdkHdhf6AWBoO8vs5cpoR6zEFY1rB+fXWtq6j/xb9j/lu1evlujRVMkh8IM/M/pOUIrNkna3nzST/mRImiveQ==", - "cpu": [ - "wasm32" - ], + "node_modules/postcss": { + "version": "8.5.26", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.26.tgz", + "integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "license": "MIT", - "optional": true, "dependencies": { - "@napi-rs/wasm-runtime": "^0.2.11" + "nanoid": "^3.3.17", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" }, "engines": { - "node": ">=14.0.0" + "node": "^10 || ^12 || >=14" } }, - "node_modules/@oxc-parser/binding-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": { - "version": "0.2.12", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz", - "integrity": "sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==", + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", "dev": true, "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/core": "^1.4.3", - "@emnapi/runtime": "^1.4.3", - "@tybys/wasm-util": "^0.10.0" + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" } }, - "node_modules/@oxc-parser/binding-win32-arm64-msvc": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-0.76.0.tgz", - "integrity": "sha512-G7ZlEWcb2hNwCK3qalzqJoyB6HaTigQ/GEa7CU8sAJ/WwMdG/NnPqiC9IqpEAEy1ARSo4XMALfKbKNuqbSs5mg==", - "cpu": [ - "arm64" - ], + "node_modules/rolldown": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.5.tgz", + "integrity": "sha512-VD2IE5PUG4Oj8zz2VGykiYd5wbnjdIiSsNQb8Qu5B+noEp+A78mu2iVvpp27g8es14Tk9rofNs5Tku9iQCS4fA==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/@oxc-parser/binding-win32-x64-msvc": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/@oxc-parser/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.76.0.tgz", - "integrity": "sha512-0jLzzmnu8/mqNhKBnNS2lFUbPEzRdj5ReiZwHGHpjma0+ullmmwP2AqSEqx3ssHDK9CpcEMdKOK2LsbCfhHKIA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], + "dependencies": { + "@oxc-project/types": "=0.146.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, "engines": { - "node": ">=20.0.0" + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm-eabi": "1.2.5", + "@rolldown/binding-android-arm64": "1.2.5", + "@rolldown/binding-darwin-arm64": "1.2.5", + "@rolldown/binding-darwin-x64": "1.2.5", + "@rolldown/binding-freebsd-x64": "1.2.5", + "@rolldown/binding-linux-arm-gnueabihf": "1.2.5", + "@rolldown/binding-linux-arm64-gnu": "1.2.5", + "@rolldown/binding-linux-arm64-musl": "1.2.5", + "@rolldown/binding-linux-ppc64-gnu": "1.2.5", + "@rolldown/binding-linux-s390x-gnu": "1.2.5", + "@rolldown/binding-linux-x64-gnu": "1.2.5", + "@rolldown/binding-linux-x64-musl": "1.2.5", + "@rolldown/binding-openharmony-arm64": "1.2.5", + "@rolldown/binding-win32-arm64-msvc": "1.2.5", + "@rolldown/binding-win32-x64-msvc": "1.2.5" } }, - "node_modules/@oxc-project/types": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.76.0.tgz", - "integrity": "sha512-CH3THIrSViKal8yV/Wh3FK0pFhp40nzW1MUDCik9fNuid2D/7JJXKJnfFOAvMxInGXDlvmgT6ACAzrl47TqzkQ==", + "node_modules/rolldown/node_modules/@oxc-project/types": { + "version": "0.146.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.146.0.tgz", + "integrity": "sha512-XC0QsnnhVe7sLIWmYmdPw7x5P0h4W8vUU3Nv1ySgWXtvCz8NizoAEpGXA0sOYoJQV2Rl13LgURAHQ5cI5ILCSA==", "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/Boshen" } }, - "node_modules/@rolldown/binding-android-arm-eabi": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.5.tgz", - "integrity": "sha512-DLe/i+l8ynIBY7XEQ191TeZvCoowIGa18R+dIV30GW7DiOtp74i/xX8hs8GUjW5ARV7VZuie3d6AumSmCwbeRA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-android-arm64": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.5.tgz", - "integrity": "sha512-zXcwKlQApYAOELHd8PwKDFkagYF9Wy4e0RJ+0qnzl9Pjnpj75TEG8ufv40p2J7kCEfwZAsNiuzRIyNNMWT38ig==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-darwin-arm64": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.5.tgz", - "integrity": "sha512-dK4QakI42nzWgJT5sm4y4y/O//D4OxM75/cH28RLV+nzIN9AY+YsbuUVrUTjlLjXR6vpyxFbSsbmNuJ6BP9sww==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-darwin-x64": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.5.tgz", - "integrity": "sha512-fqSALaUu1Wjd1nK2uW2kJDWdLCc8lx1IcY+MTY26Aurfdx19anlzhqXOgCFbBFQnlFDTn4TC1/7Nz4Bl2mLP3A==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-freebsd-x64": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.5.tgz", - "integrity": "sha512-/vCnNxlkxs9tKxNDcyWUePpJ/PgTzxIaVhoM5SmG8UV+GR/IcPam4VYxi7GIMo7PSDuNqlJqvprqii9NqqVCMw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-arm-gnueabihf": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.5.tgz", - "integrity": "sha512-abk0NLA519LxRCszmbE0jYKuQ9YPocOXTiOXOo6Yr+YAT95VH+PtqYAjOJvGKt3viEd/x4qzabAlwd5bHOOARg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-arm64-gnu": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.5.tgz", - "integrity": "sha512-Y7eALiJ8lr0M2HH103Js+g7V34wf6snlpZLAsHI90uLhr3PVlNsbFVAXJC9d/V6BnPyKtpSwI+NcB/RLxsQxuA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-arm64-musl": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.5.tgz", - "integrity": "sha512-xMvZgnbZg4YVnR/AX2b3oOPDTFYJvUVaJg5FedA/LuvexAtXibZQej4cnTkw3rjsJ/ggUROB64TdtETiim+FYA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-ppc64-gnu": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.5.tgz", - "integrity": "sha512-GRjeqTUDHTo5GwntsLaAMcBahG3nlpjftXWZLN73HiYQlhwEowvarFgQnRnQZtIp4keXX7quXFbG38uPZBa2EA==", - "cpu": [ - "ppc64" - ], + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } + "license": "ISC" }, - "node_modules/@rolldown/binding-linux-s390x-gnu": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.5.tgz", - "integrity": "sha512-vLNTR45F2Uwc8AufkNXPmB4VliaXs+FvcheEogIzOXzO4l+LzieXF5A/TWxLy5HtqpsRCHUfd0lPVrrdgXdLHQ==", - "cpu": [ - "s390x" - ], + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], + "license": "BSD-3-Clause", "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=0.10.0" } }, - "node_modules/@rolldown/binding-linux-x64-gnu": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.5.tgz", - "integrity": "sha512-Mgj59/HTuYeK9Gz2MA+mBWKnHsAgkBSec15ZMb1st3oIfFbX7gCjOae7GydHhzcyQi9Z/7M1QuN9bR3oFqF0jQ==", - "cpu": [ - "x64" - ], + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } + "license": "MIT" }, - "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.5.tgz", - "integrity": "sha512-mY8AP0/ichsbhAxGnLa3d3+MwV0EfgrPND2bplI3Ym8T6R2pJ0N87bvrKVwNXmdy3jnr6eQBecdqx/HMknBmpA==", - "cpu": [ - "x64" - ], + "node_modules/std-env": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.2.0.tgz", + "integrity": "sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==", "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } + "license": "MIT" }, - "node_modules/@rolldown/binding-openharmony-arm64": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.5.tgz", - "integrity": "sha512-8SLssA2oweAxyRgDp789ACfRb/3P+zNRJpzZxSizxF9m8NUDQ4+3xjo8ttjhVGGw6Qxb70oZiEtIjaKikCO7Yw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-win32-arm64-msvc": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.5.tgz", - "integrity": "sha512-vGbruD5zquhoc8D9SViXgN2FBJtNdTyQ4DtG+SWiEGlJiAzoKcZ2xp+xuXCffhubVdt0NJlTZqkeRuERy7g8Cw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.5.tgz", - "integrity": "sha512-e/SXpgISz+IoqVcSSI0rx/d/he8zqLex+/rCWpnHpmVfmPIUjag9H6P7zotf0gJHwPUhQxZ/mF8tr6acebT9yw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/pluginutils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", - "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@standard-schema/spec": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", - "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tybys/wasm-util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz", - "integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@types/chai": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", - "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/deep-eql": "*", - "assertion-error": "^2.0.1" - } - }, - "node_modules/@types/deep-eql": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", - "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/estree": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", - "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@typescript/typescript-aix-ppc64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-aix-ppc64/-/typescript-aix-ppc64-7.0.2.tgz", - "integrity": "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-darwin-arm64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-arm64/-/typescript-darwin-arm64-7.0.2.tgz", - "integrity": "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-darwin-x64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-x64/-/typescript-darwin-x64-7.0.2.tgz", - "integrity": "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-freebsd-arm64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-arm64/-/typescript-freebsd-arm64-7.0.2.tgz", - "integrity": "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-freebsd-x64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-x64/-/typescript-freebsd-x64-7.0.2.tgz", - "integrity": "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-linux-arm": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm/-/typescript-linux-arm-7.0.2.tgz", - "integrity": "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-linux-arm64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm64/-/typescript-linux-arm64-7.0.2.tgz", - "integrity": "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-linux-loong64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-loong64/-/typescript-linux-loong64-7.0.2.tgz", - "integrity": "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-linux-mips64el": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-mips64el/-/typescript-linux-mips64el-7.0.2.tgz", - "integrity": "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-linux-ppc64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-ppc64/-/typescript-linux-ppc64-7.0.2.tgz", - "integrity": "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-linux-riscv64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-riscv64/-/typescript-linux-riscv64-7.0.2.tgz", - "integrity": "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-linux-s390x": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-s390x/-/typescript-linux-s390x-7.0.2.tgz", - "integrity": "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-linux-x64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-x64/-/typescript-linux-x64-7.0.2.tgz", - "integrity": "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-netbsd-arm64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-arm64/-/typescript-netbsd-arm64-7.0.2.tgz", - "integrity": "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-netbsd-x64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-x64/-/typescript-netbsd-x64-7.0.2.tgz", - "integrity": "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-openbsd-arm64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-arm64/-/typescript-openbsd-arm64-7.0.2.tgz", - "integrity": "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-openbsd-x64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-x64/-/typescript-openbsd-x64-7.0.2.tgz", - "integrity": "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-sunos-x64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-sunos-x64/-/typescript-sunos-x64-7.0.2.tgz", - "integrity": "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-win32-arm64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-arm64/-/typescript-win32-arm64-7.0.2.tgz", - "integrity": "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-win32-x64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-x64/-/typescript-win32-x64-7.0.2.tgz", - "integrity": "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@vitest/expect": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.11.tgz", - "integrity": "sha512-VX2x5vNJXET47KAFzwERI+KRMtTTCSWTfSMKsW7JsUsXV4psq++e3DvZpuTDOpHcxytiDs6p2nhVb2tVDiiUYw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@standard-schema/spec": "^1.1.0", - "@types/chai": "^5.2.2", - "@vitest/spy": "4.1.11", - "@vitest/utils": "4.1.11", - "chai": "^6.2.2", - "tinyrainbow": "^3.1.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/pretty-format": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.11.tgz", - "integrity": "sha512-yiZzPbGTS9Sr/JpFl8zHrcIkAofNbFV6k21vIgQN/cY/oxZeXhJv5sc/MBJ5jFKWmWs+oJHw0UXLZjmf931+Vw==", - "dev": true, - "license": "MIT", - "dependencies": { - "tinyrainbow": "^3.1.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/runner": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.11.tgz", - "integrity": "sha512-LztvUgdwMNJMIkj3hQnnxiC2Xy1zNxq928W/xhjCLaNCzqTZOudjwbQf6v9IntZGPw132i2Lq2rgTRZHD3JHNw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/utils": "4.1.11", - "pathe": "^2.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/snapshot": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.11.tgz", - "integrity": "sha512-pN7ikn1ON7h8ee4gIAp4AzyK+zBtJPzVbqOgu5LCEh4VaJVbPQcgYQYJIMGQPXVeJJq1fnfazis7a5pFNPahog==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/pretty-format": "4.1.11", - "@vitest/utils": "4.1.11", - "magic-string": "^0.30.21", - "pathe": "^2.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/spy": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.11.tgz", - "integrity": "sha512-apNa/prQy2qCeywhnixOHPRCgGNhvg7T4Dapfl1GahLp/R+uhBm5cPyFoNVyqsNd2h1nJxL6BqqdIjiABL60YA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/utils": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.11.tgz", - "integrity": "sha512-zTCVGpyFsGWBhllOyKlTw/vnr6D9qxsfSDyfbyZmTyjHw5N/VuvzHpHoQjm2ZJzn4RJgx5w4r7V0er69CmLgPQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/pretty-format": "4.1.11", - "convert-source-map": "^2.0.0", - "tinyrainbow": "^3.1.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/agent-base": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", - "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14" - } - }, - "node_modules/ansi-regex": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.3.0.tgz", - "integrity": "sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/assertion-error": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", - "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - } - }, - "node_modules/available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/binaryen": { - "version": "130.0.0", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-130.0.0.tgz", - "integrity": "sha512-XDrb+zql0RbFPKgj7MuH9zOc78R3Fa/P/VSGnnpdwYsvNZPWjcMYMdAkKCOQEL2A7yqgjSMTDRFp6gfSDW+/QQ==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "wasm-as": "bin/wasm-as", - "wasm-ctor-eval": "bin/wasm-ctor-eval", - "wasm-dis": "bin/wasm-dis", - "wasm-merge": "bin/wasm-merge", - "wasm-metadce": "bin/wasm-metadce", - "wasm-opt": "bin/wasm-opt", - "wasm-reduce": "bin/wasm-reduce", - "wasm-shell": "bin/wasm-shell", - "wasm2js": "bin/wasm2js" - } - }, - "node_modules/bl": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", - "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", - "dev": true, - "license": "MIT", - "dependencies": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - } - }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" - } - }, - "node_modules/buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", - "dev": true, - "license": "MIT" - }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/buffer-fill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/call-bind": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.9.tgz", - "integrity": "sha512-a/hy+pNsFUTR+Iz8TCJvXudKVLAnz/DyeSUo10I5yvFDQJBFU2s9uqQpoSrJlroHUKoKqzg+epxyP9lqFdzfBQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "get-intrinsic": "^1.3.0", - "set-function-length": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/call-bound": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", - "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "get-intrinsic": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/chai": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", - "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/chalk": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", - "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/cli-cursor": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", - "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", - "dev": true, - "license": "MIT", - "dependencies": { - "restore-cursor": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-spinners": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", - "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/commander": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.3.tgz", - "integrity": "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=20" - } - }, - "node_modules/componentize-qjs": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/componentize-qjs/-/componentize-qjs-0.4.3.tgz", - "integrity": "sha512-fiOm2Yu33XIDxY9zkzpTfR+gx3kXsmH9UPWPxuR484bVZGMfq12/Yh5HDHkEvpqZwZt2FDgo/Cj7VUIDX0LJEw==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "componentize-qjs": "bin/componentize-qjs" - }, - "engines": { - "node": ">=18.0.0" - }, - "optionalDependencies": { - "@andreiltd/componentize-qjs-binding-darwin-arm64": "0.4.3", - "@andreiltd/componentize-qjs-binding-darwin-x64": "0.4.3", - "@andreiltd/componentize-qjs-binding-linux-arm64-gnu": "0.4.3", - "@andreiltd/componentize-qjs-binding-linux-arm64-musl": "0.4.3", - "@andreiltd/componentize-qjs-binding-linux-x64-gnu": "0.4.3", - "@andreiltd/componentize-qjs-binding-linux-x64-musl": "0.4.3", - "@andreiltd/componentize-qjs-binding-win32-arm64-msvc": "0.4.3", - "@andreiltd/componentize-qjs-binding-win32-x64-msvc": "0.4.3" - } - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true, - "license": "MIT" - }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/cssstyle": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.6.0.tgz", - "integrity": "sha512-2z+rWdzbbSZv6/rhtvzvqeZQHrBaqgogqt85sqFNbabZOuFbCVFb8kPeEtZjiKkbrm395irpNKiYeFeLiQnFPg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@asamuzakjp/css-color": "^3.2.0", - "rrweb-cssom": "^0.8.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/data-urls": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz", - "integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-mimetype": "^4.0.0", - "whatwg-url": "^14.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/debug": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decimal.js": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", - "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==", - "dev": true, - "license": "MIT" - }, - "node_modules/decompress": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", - "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "decompress-tar": "^4.0.0", - "decompress-tarbz2": "^4.0.0", - "decompress-targz": "^4.0.0", - "decompress-unzip": "^4.0.1", - "graceful-fs": "^4.1.10", - "make-dir": "^1.0.0", - "pify": "^2.3.0", - "strip-dirs": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/decompress-tar": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", - "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "file-type": "^5.2.0", - "is-stream": "^1.1.0", - "tar-stream": "^1.5.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/decompress-tarbz2": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", - "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", - "dev": true, - "license": "MIT", - "dependencies": { - "decompress-tar": "^4.1.0", - "file-type": "^6.1.0", - "is-stream": "^1.1.0", - "seek-bzip": "^1.0.5", - "unbzip2-stream": "^1.0.9" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/decompress-tarbz2/node_modules/file-type": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", - "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/decompress-targz": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", - "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", - "dev": true, - "license": "MIT", - "dependencies": { - "decompress-tar": "^4.1.1", - "file-type": "^5.2.0", - "is-stream": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/decompress-unzip": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", - "integrity": "sha512-1fqeluvxgnn86MOh66u8FjbtJpAFv5wgCT9Iw8rcBqQcCo5tO8eiJw7NNTrvt9n4CRBVq7CstiS922oPgyGLrw==", - "dev": true, - "license": "MIT", - "dependencies": { - "file-type": "^3.8.0", - "get-stream": "^2.2.0", - "pify": "^2.3.0", - "yauzl": "^2.4.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/decompress-unzip/node_modules/file-type": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", - "integrity": "sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/detect-libc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", - "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/emoji-regex": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", - "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", - "dev": true, - "license": "MIT" - }, - "node_modules/end-of-stream": { - "version": "1.4.5", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", - "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/entities": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", - "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-module-lexer": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", - "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", - "dev": true, - "license": "MIT" - }, - "node_modules/es-object-atoms": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", - "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/esbuild": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", - "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.12", - "@esbuild/android-arm": "0.25.12", - "@esbuild/android-arm64": "0.25.12", - "@esbuild/android-x64": "0.25.12", - "@esbuild/darwin-arm64": "0.25.12", - "@esbuild/darwin-x64": "0.25.12", - "@esbuild/freebsd-arm64": "0.25.12", - "@esbuild/freebsd-x64": "0.25.12", - "@esbuild/linux-arm": "0.25.12", - "@esbuild/linux-arm64": "0.25.12", - "@esbuild/linux-ia32": "0.25.12", - "@esbuild/linux-loong64": "0.25.12", - "@esbuild/linux-mips64el": "0.25.12", - "@esbuild/linux-ppc64": "0.25.12", - "@esbuild/linux-riscv64": "0.25.12", - "@esbuild/linux-s390x": "0.25.12", - "@esbuild/linux-x64": "0.25.12", - "@esbuild/netbsd-arm64": "0.25.12", - "@esbuild/netbsd-x64": "0.25.12", - "@esbuild/openbsd-arm64": "0.25.12", - "@esbuild/openbsd-x64": "0.25.12", - "@esbuild/openharmony-arm64": "0.25.12", - "@esbuild/sunos-x64": "0.25.12", - "@esbuild/win32-arm64": "0.25.12", - "@esbuild/win32-ia32": "0.25.12", - "@esbuild/win32-x64": "0.25.12" - } - }, - "node_modules/estree-walker": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0" - } - }, - "node_modules/expect-type": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz", - "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "pend": "~1.2.0" - } - }, - "node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/file-type": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", - "integrity": "sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/for-each": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", - "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.2.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true, - "license": "MIT" - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-east-asian-width": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.6.0.tgz", - "integrity": "sha512-QRbvDIbx6YklUe6RxeTeleMR0yv3cYH6PsPZHcnVn7xv7zO1BHN8r0XETu8n6Ye3Q+ahtSarc3WgtNWmehIBfA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-intrinsic": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/get-stream": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", - "integrity": "sha512-AUGhbbemXxrZJRD5cDvKtQxLuYaIbNtDTK8YqupCI393Q2KSTreEsLUN3ZxAWFGiKTzL6nKuzfcIvieflUX9qA==", - "dev": true, - "license": "MIT", - "dependencies": { - "object-assign": "^4.0.1", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", - "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/html-encoding-sniffer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz", - "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-encoding": "^3.1.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/http-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", - "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/https-proxy-agent": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", - "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-interactive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", - "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-natural-number": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", - "integrity": "sha512-Y4LTamMe0DDQIIAlaer9eKebAlDSV6huy+TWhJVPlzZh2o4tRP5SQWFlLn5N0To4mDD22/qdOq+veo1cSISLgQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/is-potential-custom-element-name": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", - "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-unicode-supported": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", - "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/jsdom": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-26.1.0.tgz", - "integrity": "sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cssstyle": "^4.2.1", - "data-urls": "^5.0.0", - "decimal.js": "^10.5.0", - "html-encoding-sniffer": "^4.0.0", - "http-proxy-agent": "^7.0.2", - "https-proxy-agent": "^7.0.6", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.16", - "parse5": "^7.2.1", - "rrweb-cssom": "^0.8.0", - "saxes": "^6.0.0", - "symbol-tree": "^3.2.4", - "tough-cookie": "^5.1.1", - "w3c-xmlserializer": "^5.0.0", - "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^3.1.1", - "whatwg-mimetype": "^4.0.0", - "whatwg-url": "^14.1.1", - "ws": "^8.18.0", - "xml-name-validator": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "canvas": "^3.0.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, - "node_modules/lightningcss": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", - "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "detect-libc": "^2.0.3" - }, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "lightningcss-android-arm64": "1.33.0", - "lightningcss-darwin-arm64": "1.33.0", - "lightningcss-darwin-x64": "1.33.0", - "lightningcss-freebsd-x64": "1.33.0", - "lightningcss-linux-arm-gnueabihf": "1.33.0", - "lightningcss-linux-arm64-gnu": "1.33.0", - "lightningcss-linux-arm64-musl": "1.33.0", - "lightningcss-linux-x64-gnu": "1.33.0", - "lightningcss-linux-x64-musl": "1.33.0", - "lightningcss-win32-arm64-msvc": "1.33.0", - "lightningcss-win32-x64-msvc": "1.33.0" - } - }, - "node_modules/lightningcss-android-arm64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", - "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-arm64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", - "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-x64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", - "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-freebsd-x64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", - "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", - "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", - "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", - "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", - "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-musl": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", - "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", - "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", - "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/log-symbols": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-6.0.0.tgz", - "integrity": "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^5.3.0", - "is-unicode-supported": "^1.3.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-symbols/node_modules/is-unicode-supported": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", - "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/magic-string": { - "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" - } - }, - "node_modules/make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "pify": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/make-dir/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/mimic-function": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", - "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/mkdirp": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", - "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", - "dev": true, - "license": "MIT", - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/nanoid": { - "version": "3.3.18", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", - "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/nwsapi": { - "version": "2.2.24", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.24.tgz", - "integrity": "sha512-7YRhZ3jS45LwmSCT4b2sVFHt/WuovaktDU07QrtOBY2PXskss5a9jfmR9jptyumwXST+rFjrmppMY1KT/yn35A==", - "dev": true, - "license": "MIT" - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/obug": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.4.tgz", - "integrity": "sha512-4a+OsYv9UktOJKE+l1A4OufDgdRF9PifWj+tJnHURo/P+WOxpG4GzUFL9qCalmWauao6ogiG+QvnCovwPoyAWA==", - "dev": true, - "funding": [ - "https://github.com/sponsors/sxzz", - "https://opencollective.com/debug" - ], - "license": "MIT", - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", - "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-function": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ora": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/ora/-/ora-8.2.0.tgz", - "integrity": "sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^5.3.0", - "cli-cursor": "^5.0.0", - "cli-spinners": "^2.9.2", - "is-interactive": "^2.0.0", - "is-unicode-supported": "^2.0.0", - "log-symbols": "^6.0.0", - "stdin-discarder": "^0.2.2", - "string-width": "^7.2.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/oxc-minify": { - "version": "0.136.0", - "resolved": "https://registry.npmjs.org/oxc-minify/-/oxc-minify-0.136.0.tgz", - "integrity": "sha512-u9UvPFTYVwQ/i1kpp/c20S/SbvLaLV0Ngzyhgi0YV4B1SlxM7RgnnePl4vY9N3Z9sTRcozL1MRStI3PlUN9RFA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "funding": { - "url": "https://github.com/sponsors/Boshen" - }, - "optionalDependencies": { - "@oxc-minify/binding-android-arm-eabi": "0.136.0", - "@oxc-minify/binding-android-arm64": "0.136.0", - "@oxc-minify/binding-darwin-arm64": "0.136.0", - "@oxc-minify/binding-darwin-x64": "0.136.0", - "@oxc-minify/binding-freebsd-x64": "0.136.0", - "@oxc-minify/binding-linux-arm-gnueabihf": "0.136.0", - "@oxc-minify/binding-linux-arm-musleabihf": "0.136.0", - "@oxc-minify/binding-linux-arm64-gnu": "0.136.0", - "@oxc-minify/binding-linux-arm64-musl": "0.136.0", - "@oxc-minify/binding-linux-ppc64-gnu": "0.136.0", - "@oxc-minify/binding-linux-riscv64-gnu": "0.136.0", - "@oxc-minify/binding-linux-riscv64-musl": "0.136.0", - "@oxc-minify/binding-linux-s390x-gnu": "0.136.0", - "@oxc-minify/binding-linux-x64-gnu": "0.136.0", - "@oxc-minify/binding-linux-x64-musl": "0.136.0", - "@oxc-minify/binding-openharmony-arm64": "0.136.0", - "@oxc-minify/binding-wasm32-wasi": "0.136.0", - "@oxc-minify/binding-win32-arm64-msvc": "0.136.0", - "@oxc-minify/binding-win32-ia32-msvc": "0.136.0", - "@oxc-minify/binding-win32-x64-msvc": "0.136.0" - } - }, - "node_modules/oxc-parser": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/oxc-parser/-/oxc-parser-0.76.0.tgz", - "integrity": "sha512-l98B2e9evuhES7zN99rb1QGhbzx25829TJFaKi2j0ib3/K/G5z1FdGYz6HZkrU3U8jdH7v2FC8mX1j2l9JrOUg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@oxc-project/types": "^0.76.0" - }, - "engines": { - "node": ">=20.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/Boshen" - }, - "optionalDependencies": { - "@oxc-parser/binding-android-arm64": "0.76.0", - "@oxc-parser/binding-darwin-arm64": "0.76.0", - "@oxc-parser/binding-darwin-x64": "0.76.0", - "@oxc-parser/binding-freebsd-x64": "0.76.0", - "@oxc-parser/binding-linux-arm-gnueabihf": "0.76.0", - "@oxc-parser/binding-linux-arm-musleabihf": "0.76.0", - "@oxc-parser/binding-linux-arm64-gnu": "0.76.0", - "@oxc-parser/binding-linux-arm64-musl": "0.76.0", - "@oxc-parser/binding-linux-riscv64-gnu": "0.76.0", - "@oxc-parser/binding-linux-s390x-gnu": "0.76.0", - "@oxc-parser/binding-linux-x64-gnu": "0.76.0", - "@oxc-parser/binding-linux-x64-musl": "0.76.0", - "@oxc-parser/binding-wasm32-wasi": "0.76.0", - "@oxc-parser/binding-win32-arm64-msvc": "0.76.0", - "@oxc-parser/binding-win32-x64-msvc": "0.76.0" - } - }, - "node_modules/parse5": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", - "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", - "dev": true, - "license": "MIT", - "dependencies": { - "entities": "^6.0.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/pathe": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", - "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", - "dev": true, - "license": "MIT" - }, - "node_modules/pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "dev": true, - "license": "MIT" - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", - "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "pinkie": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/possible-typed-array-names": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", - "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/postcss": { - "version": "8.5.26", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.26.tgz", - "integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.17", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true, - "license": "MIT" - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/readable-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true, - "license": "MIT" - }, - "node_modules/restore-cursor": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", - "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", - "dev": true, - "license": "MIT", - "dependencies": { - "onetime": "^7.0.0", - "signal-exit": "^4.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/rolldown": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.5.tgz", - "integrity": "sha512-VD2IE5PUG4Oj8zz2VGykiYd5wbnjdIiSsNQb8Qu5B+noEp+A78mu2iVvpp27g8es14Tk9rofNs5Tku9iQCS4fA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@oxc-project/types": "=0.146.0", - "@rolldown/pluginutils": "^1.0.0" - }, - "bin": { - "rolldown": "bin/cli.mjs" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "optionalDependencies": { - "@rolldown/binding-android-arm-eabi": "1.2.5", - "@rolldown/binding-android-arm64": "1.2.5", - "@rolldown/binding-darwin-arm64": "1.2.5", - "@rolldown/binding-darwin-x64": "1.2.5", - "@rolldown/binding-freebsd-x64": "1.2.5", - "@rolldown/binding-linux-arm-gnueabihf": "1.2.5", - "@rolldown/binding-linux-arm64-gnu": "1.2.5", - "@rolldown/binding-linux-arm64-musl": "1.2.5", - "@rolldown/binding-linux-ppc64-gnu": "1.2.5", - "@rolldown/binding-linux-s390x-gnu": "1.2.5", - "@rolldown/binding-linux-x64-gnu": "1.2.5", - "@rolldown/binding-linux-x64-musl": "1.2.5", - "@rolldown/binding-openharmony-arm64": "1.2.5", - "@rolldown/binding-win32-arm64-msvc": "1.2.5", - "@rolldown/binding-win32-x64-msvc": "1.2.5" - } - }, - "node_modules/rolldown/node_modules/@oxc-project/types": { - "version": "0.146.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.146.0.tgz", - "integrity": "sha512-XC0QsnnhVe7sLIWmYmdPw7x5P0h4W8vUU3Nv1ySgWXtvCz8NizoAEpGXA0sOYoJQV2Rl13LgURAHQ5cI5ILCSA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/Boshen" - } - }, - "node_modules/rrweb-cssom": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.8.0.tgz", - "integrity": "sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==", - "dev": true, - "license": "MIT" - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true, - "license": "MIT" - }, - "node_modules/saxes": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", - "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", - "dev": true, - "license": "ISC", - "dependencies": { - "xmlchars": "^2.2.0" - }, - "engines": { - "node": ">=v12.22.7" - } - }, - "node_modules/seek-bzip": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz", - "integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "commander": "^2.8.1" - }, - "bin": { - "seek-bunzip": "bin/seek-bunzip", - "seek-table": "bin/seek-bzip-table" - } - }, - "node_modules/seek-bzip/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/siginfo": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", - "dev": true, - "license": "ISC" - }, - "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/snabbdom": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/snabbdom/-/snabbdom-3.6.4.tgz", - "integrity": "sha512-VmxEfuw1/Y/eFj5VtMhYnukExpYiPkNzoo3+N3qwAOUDMl8wXgbli5ebR+j0knE3lZ/0eYskLxNcX64uy10N9w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.17.0" - } - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/stackback": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", - "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", - "dev": true, - "license": "MIT" - }, - "node_modules/std-env": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.2.0.tgz", - "integrity": "sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==", - "dev": true, - "license": "MIT" - }, - "node_modules/stdin-discarder": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.2.tgz", - "integrity": "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/string_decoder/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true, - "license": "MIT" - }, - "node_modules/string-width": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/strip-ansi": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", - "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.2.2" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/strip-dirs": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", - "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-natural-number": "^4.0.1" - } - }, - "node_modules/symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true, - "license": "MIT" - }, - "node_modules/tar-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", - "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", - "dev": true, - "license": "MIT", - "dependencies": { - "bl": "^1.0.0", - "buffer-alloc": "^1.2.0", - "end-of-stream": "^1.0.0", - "fs-constants": "^1.0.0", - "readable-stream": "^2.3.0", - "to-buffer": "^1.1.1", - "xtend": "^4.0.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "dev": true, - "license": "MIT" - }, - "node_modules/tinybench": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", - "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", - "dev": true, - "license": "MIT" - }, - "node_modules/tinyexec": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.0.tgz", - "integrity": "sha512-QKAl9m8gWWGHV8jZcPeym6j+XULi6tOf1mT83WYJ4Lk2ytW/uwAWkrP0uFsdoYMdueVJ0qs26wZ+23xeB4ibNQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/tinyglobby": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", - "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fdir": "^6.5.0", - "picomatch": "^4.0.4" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" - } - }, - "node_modules/tinyrainbow": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.1.tgz", - "integrity": "sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/tldts": { - "version": "6.1.86", - "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.86.tgz", - "integrity": "sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "tldts-core": "^6.1.86" - }, - "bin": { - "tldts": "bin/cli.js" - } - }, - "node_modules/tldts-core": { - "version": "6.1.86", - "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.86.tgz", - "integrity": "sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==", - "dev": true, - "license": "MIT" - }, - "node_modules/to-buffer": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.2.tgz", - "integrity": "sha512-db0E3UJjcFhpDhAF4tLo03oli3pwl3dbnzXOUIlRKrp+ldk/VUxzpWYZENsw2SZiuBjHAk7DfB0VU7NKdpb6sw==", - "dev": true, - "license": "MIT", - "dependencies": { - "isarray": "^2.0.5", - "safe-buffer": "^5.2.1", - "typed-array-buffer": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/to-buffer/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "license": "MIT" - }, - "node_modules/tough-cookie": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.1.2.tgz", - "integrity": "sha512-FVDYdxtnj0G6Qm/DhNPSb8Ju59ULcup3tuJxkFb5K8Bv2pUXILbf0xZWU8PX8Ov19OXljbUyveOFwRMwkXzO+A==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "tldts": "^6.1.32" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/tr46": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.1.1.tgz", - "integrity": "sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw==", - "dev": true, - "license": "MIT", - "dependencies": { - "punycode": "^2.3.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, - "license": "0BSD", - "optional": true - }, - "node_modules/typed-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", - "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/typescript": { - "version": "5.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", - "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/typescript-compiler-api": { - "name": "typescript", - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", - "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/unbzip2-stream": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", - "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer": "^5.2.1", - "through": "^2.3.8" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true, - "license": "MIT" - }, - "node_modules/vitest": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.11.tgz", - "integrity": "sha512-fhACrNXUidIbGSBr5FlbuBkO7VWC1ZyLl0DO4CU2DrQoAPxX84Ysxs+HeGQpii5lZWV1Q4gBZTTu49mF+A6Edw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/expect": "4.1.11", - "@vitest/mocker": "4.1.11", - "@vitest/pretty-format": "4.1.11", - "@vitest/runner": "4.1.11", - "@vitest/snapshot": "4.1.11", - "@vitest/spy": "4.1.11", - "@vitest/utils": "4.1.11", - "es-module-lexer": "^2.0.0", - "expect-type": "^1.3.0", - "magic-string": "^0.30.21", - "obug": "^2.1.1", - "pathe": "^2.0.3", - "picomatch": "^4.0.3", - "std-env": "^4.0.0-rc.1", - "tinybench": "^2.9.0", - "tinyexec": "^1.0.2", - "tinyglobby": "^0.2.15", - "tinyrainbow": "^3.1.0", - "vite": "^6.0.0 || ^7.0.0 || ^8.0.0", - "why-is-node-running": "^2.3.0" - }, - "bin": { - "vitest": "vitest.mjs" - }, - "engines": { - "node": "^20.0.0 || ^22.0.0 || >=24.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "@edge-runtime/vm": "*", - "@opentelemetry/api": "^1.9.0", - "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", - "@vitest/browser-playwright": "4.1.11", - "@vitest/browser-preview": "4.1.11", - "@vitest/browser-webdriverio": "4.1.11", - "@vitest/coverage-istanbul": "4.1.11", - "@vitest/coverage-v8": "4.1.11", - "@vitest/ui": "4.1.11", - "happy-dom": "*", - "jsdom": "*", - "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "@edge-runtime/vm": { - "optional": true - }, - "@opentelemetry/api": { - "optional": true - }, - "@types/node": { - "optional": true - }, - "@vitest/browser-playwright": { - "optional": true - }, - "@vitest/browser-preview": { - "optional": true - }, - "@vitest/browser-webdriverio": { - "optional": true - }, - "@vitest/coverage-istanbul": { - "optional": true - }, - "@vitest/coverage-v8": { - "optional": true - }, - "@vitest/ui": { - "optional": true - }, - "happy-dom": { - "optional": true - }, - "jsdom": { - "optional": true - }, - "vite": { - "optional": false - } - } - }, - "node_modules/vitest/node_modules/@esbuild/aix-ppc64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", - "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/android-arm": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz", - "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/android-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz", - "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/android-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz", - "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/darwin-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz", - "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/darwin-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz", - "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/freebsd-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz", - "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/freebsd-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz", - "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/linux-arm": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz", - "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/linux-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz", - "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/linux-ia32": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz", - "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/linux-loong64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz", - "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/linux-mips64el": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz", - "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/linux-ppc64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz", - "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/linux-riscv64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz", - "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/linux-s390x": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz", - "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/linux-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz", - "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/netbsd-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz", - "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/netbsd-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz", - "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/openbsd-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz", - "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/vitest/node_modules/@esbuild/openbsd-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz", - "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "peer": true, - "engines": { - "node": ">=18" - } + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" }, - "node_modules/vitest/node_modules/@esbuild/openharmony-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz", - "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==", - "cpu": [ - "arm64" - ], + "node_modules/tinyexec": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.0.tgz", + "integrity": "sha512-QKAl9m8gWWGHV8jZcPeym6j+XULi6tOf1mT83WYJ4Lk2ytW/uwAWkrP0uFsdoYMdueVJ0qs26wZ+23xeB4ibNQ==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ], - "peer": true, "engines": { "node": ">=18" } }, - "node_modules/vitest/node_modules/@esbuild/sunos-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz", - "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==", - "cpu": [ - "x64" - ], + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "peer": true, + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, "engines": { - "node": ">=18" + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" } }, - "node_modules/vitest/node_modules/@esbuild/win32-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz", - "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==", - "cpu": [ - "arm64" - ], + "node_modules/tinyrainbow": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.1.tgz", + "integrity": "sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "peer": true, "engines": { - "node": ">=18" + "node": ">=14.0.0" } }, - "node_modules/vitest/node_modules/@esbuild/win32-ia32": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz", - "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==", - "cpu": [ - "ia32" - ], + "node_modules/typescript": { + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "peer": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, "engines": { - "node": ">=18" + "node": ">=14.17" } }, - "node_modules/vitest/node_modules/@esbuild/win32-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz", - "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==", - "cpu": [ - "x64" - ], + "node_modules/vitest": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.11.tgz", + "integrity": "sha512-fhACrNXUidIbGSBr5FlbuBkO7VWC1ZyLl0DO4CU2DrQoAPxX84Ysxs+HeGQpii5lZWV1Q4gBZTTu49mF+A6Edw==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "peer": true, + "dependencies": { + "@vitest/expect": "4.1.11", + "@vitest/mocker": "4.1.11", + "@vitest/pretty-format": "4.1.11", + "@vitest/runner": "4.1.11", + "@vitest/snapshot": "4.1.11", + "@vitest/spy": "4.1.11", + "@vitest/utils": "4.1.11", + "es-module-lexer": "^2.0.0", + "expect-type": "^1.3.0", + "magic-string": "^0.30.21", + "obug": "^2.1.1", + "pathe": "^2.0.3", + "picomatch": "^4.0.3", + "std-env": "^4.0.0-rc.1", + "tinybench": "^2.9.0", + "tinyexec": "^1.0.2", + "tinyglobby": "^0.2.15", + "tinyrainbow": "^3.1.0", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, "engines": { - "node": ">=18" + "node": "^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@opentelemetry/api": "^1.9.0", + "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", + "@vitest/browser-playwright": "4.1.11", + "@vitest/browser-preview": "4.1.11", + "@vitest/browser-webdriverio": "4.1.11", + "@vitest/coverage-istanbul": "4.1.11", + "@vitest/coverage-v8": "4.1.11", + "@vitest/ui": "4.1.11", + "happy-dom": "*", + "jsdom": "*", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@opentelemetry/api": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser-playwright": { + "optional": true + }, + "@vitest/browser-preview": { + "optional": true + }, + "@vitest/browser-webdriverio": { + "optional": true + }, + "@vitest/coverage-istanbul": { + "optional": true + }, + "@vitest/coverage-v8": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + }, + "vite": { + "optional": false + } } }, "node_modules/vitest/node_modules/@vitest/mocker": { @@ -5696,50 +2387,6 @@ "dev": true, "license": "MIT" }, - "node_modules/vitest/node_modules/esbuild": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", - "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "peer": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.28.2", - "@esbuild/android-arm": "0.28.2", - "@esbuild/android-arm64": "0.28.2", - "@esbuild/android-x64": "0.28.2", - "@esbuild/darwin-arm64": "0.28.2", - "@esbuild/darwin-x64": "0.28.2", - "@esbuild/freebsd-arm64": "0.28.2", - "@esbuild/freebsd-x64": "0.28.2", - "@esbuild/linux-arm": "0.28.2", - "@esbuild/linux-arm64": "0.28.2", - "@esbuild/linux-ia32": "0.28.2", - "@esbuild/linux-loong64": "0.28.2", - "@esbuild/linux-mips64el": "0.28.2", - "@esbuild/linux-ppc64": "0.28.2", - "@esbuild/linux-riscv64": "0.28.2", - "@esbuild/linux-s390x": "0.28.2", - "@esbuild/linux-x64": "0.28.2", - "@esbuild/netbsd-arm64": "0.28.2", - "@esbuild/netbsd-x64": "0.28.2", - "@esbuild/openbsd-arm64": "0.28.2", - "@esbuild/openbsd-x64": "0.28.2", - "@esbuild/openharmony-arm64": "0.28.2", - "@esbuild/sunos-x64": "0.28.2", - "@esbuild/win32-arm64": "0.28.2", - "@esbuild/win32-ia32": "0.28.2", - "@esbuild/win32-x64": "0.28.2" - } - }, "node_modules/vitest/node_modules/vite": { "version": "8.2.2", "resolved": "https://registry.npmjs.org/vite/-/vite-8.2.2.tgz", @@ -5818,89 +2465,6 @@ } } }, - "node_modules/w3c-xmlserializer": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", - "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", - "dev": true, - "license": "MIT", - "dependencies": { - "xml-name-validator": "^5.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - } - }, - "node_modules/whatwg-encoding": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", - "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", - "deprecated": "Use @exodus/bytes instead for a more spec-conformant and faster implementation", - "dev": true, - "license": "MIT", - "dependencies": { - "iconv-lite": "0.6.3" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/whatwg-mimetype": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", - "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/whatwg-url": { - "version": "14.2.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.2.0.tgz", - "integrity": "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==", - "dev": true, - "license": "MIT", - "dependencies": { - "tr46": "^5.1.0", - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/which-typed-array": { - "version": "1.1.22", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.22.tgz", - "integrity": "sha512-fvO4ExWMFsqyhG3AiPAObMuY1lxaqgYcxbc49CNdWDDECOJNgQyvsOWVwbZc+qf3rzRtxojBK+CMEv0Ld5CYpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.9", - "call-bound": "^1.0.4", - "for-each": "^0.3.5", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/why-is-node-running": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", @@ -5917,73 +2481,6 @@ "engines": { "node": ">=8" } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/ws": { - "version": "8.21.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.3.tgz", - "integrity": "sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/xml-name-validator": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", - "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18" - } - }, - "node_modules/xmlchars": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", - "dev": true, - "license": "MIT" - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4" - } - }, - "node_modules/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } } } } diff --git a/ui/package.json b/ui/package.json index 0690d22d..b5a4184f 100644 --- a/ui/package.json +++ b/ui/package.json @@ -4,16 +4,14 @@ "version": "1.0.0", "type": "module", "scripts": { - "build": "druid-ui-build --wit=node_modules/@druid-ui/plattform/wit/druid-plattform.wit --world-name=druid-plattform src/app.tsx dist", - "build:raw": "druid-ui-build --wit=node_modules/@druid-ui/plattform/wit/druid-plattform.wit --world-name=druid-plattform src/app.tsx --raw dist", - "dev": "druid-ui-build --wit=node_modules/@druid-ui/plattform/wit/druid-plattform.wit --world-name=druid-plattform src/app.tsx --watch --raw dist", + "build": "druid-ui-build src/app.ts dist --name=app --document=src/view.openui", + "dev": "npm run build -- --watch", "test": "vitest run src/config-editor", "type-check": "tsc --noEmit" }, "devDependencies": { - "@druid-ui/build": "^3.0.0", - "@druid-ui/component": "^3.0.0", - "@druid-ui/plattform": "^3.0.0", + "@druid-ui/build": "4.0.0-rc.1", + "@druid-ui/client": "4.0.0-rc.1", "typescript": "~5.8.3", "vitest": "^4.1.10" } diff --git a/ui/src/app.ts b/ui/src/app.ts new file mode 100644 index 00000000..759de369 --- /dev/null +++ b/ui/src/app.ts @@ -0,0 +1,4 @@ +import { createClient } from '@druid-ui/client'; +import { createEditorBehavior } from './config-editor/behavior.js'; + +export const client = createClient(createEditorBehavior); diff --git a/ui/src/app.tsx b/ui/src/app.tsx deleted file mode 100644 index 4c486d95..00000000 --- a/ui/src/app.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { - createConfigEditorComponent, - fingerprint, - withMissingFileFallback, -} from "./config-editor/index.js"; -import { - ensureFileService, - loadFileFromDeployment, - saveFileToDeployment, -} from "@druid-ui/plattform"; -import { createFileServiceGateway } from "./config-editor/file-service-gateway.js"; - -const requireString = (value: unknown, operation: string): string => { - if (typeof value !== "string") { - throw new TypeError(`${operation} returned a non-string response.`); - } - return value; -}; - -const gateway = withMissingFileFallback(createFileServiceGateway({ - ensureFileService, - async loadFile(path) { - return requireString(await loadFileFromDeployment(path), "loadFileFromDeployment"); - }, - async saveFile(path, content) { - await saveFileToDeployment(path, content); - }, - async fingerprint(content) { - return fingerprint(content); - }, -})); - -export const component = createConfigEditorComponent({ - manifestPath: ".druid/config-editor.manifest.json", - gateway, -}); diff --git a/ui/src/config-editor/behavior.test.ts b/ui/src/config-editor/behavior.test.ts new file mode 100644 index 00000000..30f69ac3 --- /dev/null +++ b/ui/src/config-editor/behavior.test.ts @@ -0,0 +1,82 @@ +import { describe, expect, it } from 'vitest'; +import type { ClientContext, JsonValue } from '@druid-ui/client'; +import { createEditorBehavior } from './behavior.js'; +import { validManifest } from './test-fixtures.js'; + +function fixture() { + const files: Record = { + '.druid/config-editor.manifest.json': JSON.stringify(validManifest()), + 'server.properties': '# keep comment\nmax-players=20\ncustom=true\n', + }; + let view: any; + let failSave = false; + const calls: string[] = []; + const context: ClientContext = { + async callTool(name: string, params: Record): Promise { + calls.push(name); + if (name === 'ensure_file_service') return 'ready' as T; + if (name === 'load_file') { + const value = files[String(params.path)]; + if (value === undefined) throw new Error('404 Not found'); + return value as T; + } + if (name === 'save_file') { + const path = String(params.path); + if (failSave) throw new Error('File write failed'); + files[path] = String(params.content); + return 'saved' as T; + } + throw new Error(`Unexpected tool ${name}`); + }, + getValue: () => undefined, + setValue: (_name, value) => { view = value; }, + log: () => {}, + }; + return { behavior: createEditorBehavior(context), files, calls, state: () => view, fail: () => { failSave = true; } }; +} + +describe('OpenUI configuration behavior', () => { + it('loads through the scoped host tools and edits and verifies the selected file', async () => { + const test = fixture(); + await test.behavior.init?.(); + expect(test.calls[0]).toBe('ensure_file_service'); + expect(test.state().snapshot.dirty).toBe(false); + await test.behavior.handleAction('SetField', { key: 'max-players', value: '30' }); + expect(test.state().snapshot.dirty).toBe(true); + await test.behavior.handleAction('Save', {}); + expect(test.files['server.properties']).toBe('# keep comment\nmax-players=30\ncustom=true\n'); + expect(test.state().status).toBe('Saved and verified'); + expect(test.state().snapshot.dirty).toBe(false); + }); + it('retains local edits and remote bytes when a write fails', async () => { + const test = fixture(); + await test.behavior.init?.(); + await test.behavior.handleAction('SetField', { key: 'max-players', value: '30' }); + const original = test.files['server.properties']; + test.fail(); + await test.behavior.handleAction('Save', {}); + expect(test.files['server.properties']).toBe(original); + expect(test.state().snapshot.dirty).toBe(true); + expect(test.state().status).toContain('File write failed'); + expect(test.state().saving).toBe(false); + }); + it('retains raw editing, validation, and selected-file state on a load failure', async () => { + const test = fixture(); + await test.behavior.init?.(); + await test.behavior.handleAction('SetMode', { mode: 'raw' }); + await test.behavior.handleAction('SetRaw', { source: '# raw edit\nmax-players=42\ncustom=true\n' }); + expect(test.state().source).toContain('# raw edit'); + await test.behavior.handleAction('SelectFile', { path: 'unknown.properties' }); + expect(test.state().schema.path).toBe('server.properties'); + await test.behavior.handleAction('SetField', { key: 'max-players', value: '-1' }); + await test.behavior.handleAction('Save', {}); + expect(test.state().status).toContain('validation errors'); + expect(test.calls.filter((call) => call === 'save_file')).toHaveLength(0); + }); + it('surfaces startup failures instead of silently rendering an empty editor', async () => { + const test = fixture(); + delete test.files['.druid/config-editor.manifest.json']; + await test.behavior.init?.(); + expect(test.state().error).toContain('Missing configuration file'); + }); +}); diff --git a/ui/src/config-editor/behavior.ts b/ui/src/config-editor/behavior.ts new file mode 100644 index 00000000..b3395ae6 --- /dev/null +++ b/ui/src/config-editor/behavior.ts @@ -0,0 +1,102 @@ +import type { ClientContext, ClientHandlers, JsonValue } from '@druid-ui/client'; +import { loadEditor, saveSelectedFile, withMissingFileFallback } from './gateway.js'; +import { createFileServiceGateway } from './file-service-gateway.js'; +import { fingerprint } from './fingerprint.js'; +import { validateManifest } from './manifest.js'; +import type { ConfigEditorManifest } from './model.js'; +import type { ConfigEditorStore } from './store.js'; +import { copy } from './copy.js'; + +/** WASM owns editor behavior; the trusted host only renders JSON state and runs scoped tools. */ +export function createEditorBehavior(context: ClientContext): ClientHandlers { + let manifest: ConfigEditorManifest | undefined; + const stores = new Map(); + let selectedPath = ''; + let mode: 'form' | 'raw' = 'form'; + let saving = false; + let status: string = copy.loading; + let error: string | undefined; + const gateway = withMissingFileFallback(createFileServiceGateway({ + async ensureFileService() { await context.callTool('ensure_file_service', { watch: false }); }, + async loadFile(path) { + const value = await context.callTool('load_file', { path }); + if (typeof value !== 'string') throw new TypeError('File service returned non-text content.'); + return value; + }, + async saveFile(path, content) { + await context.callTool('save_file', { path, content }); + }, + fingerprint, + })); + const update = () => { + const store = stores.get(selectedPath); + context.setValue('$editor', JSON.parse(JSON.stringify({ + manifest, schema: store?.schema, snapshot: store?.snapshot(), + source: store?.serializeForDisplay(), mode, saving, status, error, + })) as JsonValue); + }; + const select = async (path: string) => { + if (!manifest) return; + status = copy.loading; + update(); + let store = stores.get(path); + if (!store) { + store = await loadEditor(gateway, manifest, path); + stores.set(path, store); + } + selectedPath = path; + mode = store.schema.sections.length ? 'form' : 'raw'; + status = ''; + }; + const text = (params: Record, key: string) => { + if (typeof params[key] !== 'string') throw new TypeError(`Missing string parameter: ${key}`); + return params[key]; + }; + return { + async init() { + try { + update(); + manifest = validateManifest(JSON.parse(await gateway.load('.druid/config-editor.manifest.json'))); + await select(manifest.files[0]!.path); + } catch (cause) { + error = cause instanceof Error ? cause.message : String(cause); + } + update(); + }, + async handleAction(action, params) { + const store = stores.get(selectedPath); + if (!store || saving) return; + try { + status = ''; + switch (action) { + case 'SelectFile': await select(text(params, 'path')); break; + case 'SetMode': { + const next = text(params, 'mode'); + if (next !== 'raw' && next !== 'form') throw new TypeError('Invalid editor mode.'); + mode = next; + break; + } + case 'SetField': store.setDisplayValue(text(params, 'key'), text(params, 'value')); break; + case 'SetRaw': store.replaceWorkingSource(text(params, 'source')); break; + case 'Save': { + saving = true; + status = copy.saving; + update(); + const result = await saveSelectedFile(store, gateway); + status = result.status === 'saved' ? copy.saved : copy.conflict; + break; + } + } + } catch (cause) { + status = cause instanceof Error ? cause.message : String(cause); + } finally { + saving = false; + update(); + } + }, + onError(cause) { + error = cause instanceof Error ? cause.message : String(cause); + update(); + }, + }; +} diff --git a/ui/src/config-editor/components/ActionBar.tsx b/ui/src/config-editor/components/ActionBar.tsx deleted file mode 100644 index eb6bcb2c..00000000 --- a/ui/src/config-editor/components/ActionBar.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { copy } from "../copy.js"; - -export interface ActionBarProps { - dirty: boolean; - invalid: boolean; - restartRequired: boolean; - saving: boolean; - status: string; - onSave(): Promise | void; -} - -export const ActionBar = ({ - dirty, - invalid, - restartRequired, - saving, - status, - onSave, -}: ActionBarProps) => ( -
- - {status} - {restartRequired ? ( - {copy.restartAfterSave} - ) : false} - - -
-); diff --git a/ui/src/config-editor/components/EditorApp.tsx b/ui/src/config-editor/components/EditorApp.tsx deleted file mode 100644 index b3d987a3..00000000 --- a/ui/src/config-editor/components/EditorApp.tsx +++ /dev/null @@ -1,228 +0,0 @@ -import { createComponent, rerender } from "@druid-ui/component"; -import type { Context, Event } from "@druid-ui/component"; -import { copy } from "../copy.js"; -import type { FileGateway } from "../gateway.js"; -import { loadEditor, saveSelectedFile } from "../gateway.js"; -import { validateManifest } from "../manifest.js"; -import type { ConfigEditorManifest } from "../model.js"; -import type { ConfigEditorStore, EditorSnapshot } from "../store.js"; -import { EDITOR_STYLES } from "../styles.js"; -import { ActionBar } from "./ActionBar.js"; -import { FileRail } from "./FileRail.js"; -import { FormEditor } from "./FormEditor.js"; -import { RawEditor } from "./RawEditor.js"; - -export type EditorMode = "form" | "raw"; - -export interface EditorAppProps { - manifest: ConfigEditorManifest; - store: ConfigEditorStore; - snapshot: EditorSnapshot; - mode: EditorMode; - saving: boolean; - status: string; - onMode(mode: EditorMode): void; - onSelect(path: string): Promise | void; - onField(key: string, value: string): void; - onRaw(source: string): void; - onSave(): Promise | void; -} - -export const EditorApp = ({ - manifest, - store, - snapshot, - mode, - saving, - status, - onMode, - onSelect, - onField, - onRaw, - onSave, -}: EditorAppProps) => ( -
- -
-
-
Druid Admin UI
-

{manifest.server.displayName}

-
-
-
- {manifest.server.appVersion ? `Version ${manifest.server.appVersion}` : copy.appTitle} -
- issue.severity === "error")} - restartRequired={snapshot.restartRequired} - saving={saving} - status={status} - onSave={onSave} - /> -
-
-
- -
-
- - -
- {mode === "form" ? ( - - ) : ( - - )} -
-
-
-); - -export interface ConfigEditorComponentOptions { - manifestPath: string; - gateway: FileGateway; -} - -export interface ConfigEditorComponent { - init(context: Context): unknown; - emit(nodeId: string, event: string, value: Event): void; - asyncComplete( - id: string, - result: { tag: "ok" | "err"; val: unknown }, - ): void; -} - -export const createConfigEditorComponent = ({ - manifestPath, - gateway, -}: ConfigEditorComponentOptions): ConfigEditorComponent => { - let manifest: ConfigEditorManifest | undefined; - const stores = new Map(); - let selectedPath = ""; - let mode: EditorMode = "form"; - let loading = false; - let saving = false; - let status = ""; - let errorMessage = ""; - - const selectFile = async (path: string): Promise => { - if (!manifest) return; - const previousPath = selectedPath; - status = copy.loading; - rerender(); - try { - let store = stores.get(path); - if (!store) { - store = await loadEditor(gateway, manifest, path); - stores.set(path, store); - } - selectedPath = path; - mode = store.schema.sections.length === 0 ? "raw" : "form"; - status = ""; - } catch (error) { - selectedPath = previousPath; - status = error instanceof Error ? error.message : String(error); - if (!stores.has(previousPath)) throw error; - } finally { - rerender(); - } - }; - - const initialise = async (): Promise => { - loading = true; - try { - manifest = validateManifest(JSON.parse(await gateway.load(manifestPath))); - selectedPath = manifest.files[0]!.path; - await selectFile(selectedPath); - } catch (error) { - errorMessage = error instanceof Error ? error.message : String(error); - } finally { - loading = false; - rerender(); - } - }; - - const save = async (): Promise => { - const store = stores.get(selectedPath); - if (!store) return; - saving = true; - status = copy.saving; - try { - const result = await saveSelectedFile(store, gateway); - status = result.status === "saved" ? copy.saved : copy.conflict; - } catch (error) { - status = error instanceof Error ? error.message : String(error); - } finally { - saving = false; - rerender(); - } - }; - - return createComponent(() => { - if (!loading && !manifest && !errorMessage) void initialise(); - if (errorMessage) { - return ( -
- - -
- ); - } - const store = stores.get(selectedPath); - if (!manifest || !store) { - return ( -
- -
{copy.loading}
-
- ); - } - const snapshot = store.snapshot(); - return ( - { - mode = nextMode; - }} - onSelect={selectFile} - onField={(key, value) => { - store.setDisplayValue(key, value); - status = ""; - }} - onRaw={(source) => { - store.replaceWorkingSource(source); - status = ""; - }} - onSave={save} - /> - ); - }); -}; diff --git a/ui/src/config-editor/components/FieldControl.tsx b/ui/src/config-editor/components/FieldControl.tsx deleted file mode 100644 index 627ccbe4..00000000 --- a/ui/src/config-editor/components/FieldControl.tsx +++ /dev/null @@ -1,74 +0,0 @@ -import type { Event } from "@druid-ui/component"; -import type { FieldSchema } from "../model.js"; -import type { FieldSnapshot } from "../store.js"; -import { copy } from "../copy.js"; - -export interface FieldControlProps { - field: FieldSchema; - state: FieldSnapshot; - onChange(key: string, value: string): void; -} - -export const FieldControl = ({ field, state, onChange }: FieldControlProps) => { - const inputId = `config-field-${field.key.replace(/[^a-zA-Z0-9_-]/g, "-")}`; - const descriptionId = `${inputId}-description`; - const input = field.type === "enum" ? ( - - ) : field.type === "boolean" ? ( - - - onChange(field.key, event.checked() ? "true" : "false") - } - /> - {state.displayValue === "true" ? "Enabled" : "Disabled"} - - ) : ( - 0 ? "true" : "false"} - autocomplete={field.type === "secret" || field.sensitive ? "new-password" : "off"} - onInput={(event: Event) => onChange(field.key, event.value())} - /> - ); - - return ( -
- -

{field.description}

- {input} -
- {field.restartRequired ? {copy.restartRequired} : false} - {field.key} -
- {state.issues.map((issue) => ( - - ))} -
- ); -}; diff --git a/ui/src/config-editor/components/FileRail.tsx b/ui/src/config-editor/components/FileRail.tsx deleted file mode 100644 index fa858288..00000000 --- a/ui/src/config-editor/components/FileRail.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import type { ConfigEditorManifest } from "../model.js"; -import { copy } from "../copy.js"; - -export interface FileRailProps { - manifest: ConfigEditorManifest; - selectedPath: string; - onSelect(path: string): Promise | void; -} - -export const FileRail = ({ manifest, selectedPath, onSelect }: FileRailProps) => ( - -); diff --git a/ui/src/config-editor/components/FormEditor.tsx b/ui/src/config-editor/components/FormEditor.tsx deleted file mode 100644 index eda4153d..00000000 --- a/ui/src/config-editor/components/FormEditor.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import type { FileSchema } from "../model.js"; -import type { EditorSnapshot } from "../store.js"; -import { FieldControl } from "./FieldControl.js"; - -export interface FormEditorProps { - schema: FileSchema; - snapshot: EditorSnapshot; - onChange(key: string, value: string): void; -} - -export const FormEditor = ({ schema, snapshot, onChange }: FormEditorProps) => ( -
- {schema.sections.map((section) => ( -
- {section.label} - {section.description ?

{section.description}

: false} -
- {section.fields.map((field) => { - const state = snapshot.fields[field.key]; - return state ? ( - - ) : false; - })} -
-
- ))} -
-); diff --git a/ui/src/config-editor/components/RawEditor.tsx b/ui/src/config-editor/components/RawEditor.tsx deleted file mode 100644 index 17f9d739..00000000 --- a/ui/src/config-editor/components/RawEditor.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import type { Event } from "@druid-ui/component"; -import { copy } from "../copy.js"; - -export interface RawEditorProps { - source: string; - onChange(source: string): void; -} - -export const RawEditor = ({ source, onChange }: RawEditorProps) => ( -
- -