commit 838a97d344b434f0df05bdd1428a8e691562fcf1 Author: Gabriel20xx Date: Tue Aug 4 15:17:15 2026 +0200 Add initial shared code packages diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 0000000..375b62b --- /dev/null +++ b/.changeset/README.md @@ -0,0 +1,13 @@ +# Release notes + +Run `npm run changeset` to create a release note for the npm packages. Commit +the generated markdown file, then run: + +```bash +npm run version-packages +npm install +npm run release +``` + +The Go and Python packages are released separately using their native module +and wheel workflows. diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 0000000..2ac3983 --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json", + "changelog": "@changesets/cli/changelog", + "commit": false, + "fixed": [], + "linked": [], + "access": "public", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": [ + "@gabriel20xx/shared-workspace" + ] +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f975a61 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +node_modules/ +packages/*/dist/ +packages/*/.svelte-kit/ +*.tgz +.npm/ +__pycache__/ +*.py[cod] +*.egg-info/ +.venv/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..532ea88 --- /dev/null +++ b/README.md @@ -0,0 +1,229 @@ +# SharedCode packages + +This folder is the single source of truth for reusable web UI across the projects in this workspace. + +The first packages are: + +- `@gabriel20xx/design-tokens` — colors, typography, spacing, radii, shadows, and light/dark theme variables. +- `@gabriel20xx/web-ui` — Svelte components for the application shell, header/navigation, authentication, dialogs, profile/settings/about windows, buttons, cards, badges, and page headers. +- `repos.gfranz.ch/Gabriel20xx/SharedCode/backend` — Go helpers for environment configuration, `pgx` PostgreSQL pools, transactions, common auth persistence/passwords/tokens, and embedded Goose migrations. +- `@gabriel20xx/node-backend` — Node.js `pg` pool/configuration, transactions, migrations, and auth/session persistence. +- `gabriel20xx-shared-backend` — Python `asyncpg` pool/configuration and auth/session persistence. + +The components do not import `$app/state`, `$lib` stores, or a project-specific API. Applications provide those things through props and callbacks. + +## Build and check the packages + +Run these commands from this directory: + +```bash +npm install +npm run check +npm run build +npm run test:node-backend +``` + +`npm run build` creates the distributable package in `packages/web-ui/dist`. The generated `dist` directory is intentionally ignored by the package configuration and should not be committed. + +Validate the Go backend package from `SharedCode/backend`: + +```bash +cd backend +go test ./... +go vet ./... +``` + +## Publish the packages + +The package names use the `@gabriel20xx` npm scope. That scope must belong to the npm account used to publish. If a different scope is preferred, replace the scope consistently in both package manifests and imports before publishing. + +Publish the tokens first because `web-ui` depends on them: + +```bash +npm login +npm publish --workspace=@gabriel20xx/design-tokens --access public +npm publish --workspace=@gabriel20xx/web-ui --access public +npm publish --workspace=@gabriel20xx/node-backend --access public +``` + +For a private registry, configure that registry and omit `--access public` if the registry does not use npm's public scoped-package rules. + +## Install in a project + +From a project's frontend directory, install the published UI package: + +```bash +npm install @gabriel20xx/web-ui@^0.1.0 +``` + +The design-token package is installed transitively. Install it directly only when an application needs to reference its theme file itself: + +```bash +npm install @gabriel20xx/design-tokens@^0.1.0 +``` + +Import the shared stylesheet once from the application's global stylesheet, before project-specific overrides: + +```css +@import '@gabriel20xx/web-ui/styles.css'; +``` + +The stylesheet imports the design tokens and uses an `sc-` prefix, so it does not require Tailwind and does not collide with existing project class names. Set `data-theme="light"` or `data-theme="dark"` on the application root to select a theme. Dark is the default. + +## Use the shared Go backend package + +From a Go backend directory, add the module (the module is a subdirectory of the SharedCode repository): + +```bash +go get repos.gfranz.ch/Gabriel20xx/SharedCode/backend@backend/v0.1.0 +``` + +Then initialize the pool and shared auth store at startup: + +```go +import ( + "context" + "log" + + "repos.gfranz.ch/Gabriel20xx/SharedCode/backend/auth" + "repos.gfranz.ch/Gabriel20xx/SharedCode/backend/postgres" +) + +cfg, err := postgres.FromEnv() +if err != nil { + log.Fatal(err) +} +pool, err := postgres.Open(context.Background(), cfg) +if err != nil { + log.Fatal(err) +} +defer pool.Close() + +if err := auth.EnsureSchema(context.Background(), pool, auth.DefaultSchemaOptions()); err != nil { + log.Fatal(err) +} +authStore := auth.NewStore(pool) +``` + +Use `auth.SchemaOptions{SingleUser: false, APITokens: true}` for a multi-user service that needs API tokens. The shared package owns persistence primitives and password/token utilities; each application still owns authorization rules, cookies, HTTP handlers, roles, and domain tables. + +For embedded SQL migrations, use `migrate.Up(ctx, databaseURL, embeddedMigrations, "migrations")`. The package does not contain application tables, so migrations remain versioned with the service that owns those tables. + +The Go module lives under `backend`, so its release tag must use the submodule prefix (`backend/v0.1.0`). If the SharedCode code is moved into its own repository, update the module path and use ordinary `v0.1.0` tags instead. + +For Node services, install the shared package after publishing it: + +```bash +npm install @gabriel20xx/node-backend@^0.1.0 +``` + +For Python services, build and publish the wheel to the Python package index used by the projects, then install it normally: + +```bash +python -m pip install build +python -m build packages/python-backend +python -m pip install gabriel20xx-shared-backend==0.1.0 +``` + +The Node and Python packages intentionally expose the same infrastructure concepts but use their native database drivers. This is the safe way to share behavior across the polyglot services; a Go package cannot be imported by the Python or Node applications. + +## Existing MediaCollection shared package + +`Original/MediaCollection/MediaShared` is an existing, larger Express/media-specific package. It remains in place while consumers are migrated so the MediaCollection repo does not break. Its generic PostgreSQL, auth/session, and startup responsibilities are represented in the new runtime-specific packages above; migrate one service at a time, then remove the old workspace dependency in a separate MediaCollection change. + +## Typical application wiring + +```svelte + + + auth.logout()} + onProfile={() => (profileOpen = true)} + onSettings={() => (settingsOpen = true)} + username={auth.user?.username ?? ''} +> + {#snippet children()} + + {/snippet} + + + + + + {#snippet children()} + + {/snippet} + + + auth.updateProfile(profile)} +/> +``` + +For authentication, use the same shell with `AuthPage` and connect the callbacks to the application's existing auth service: + +```svelte + auth.login(credentials.identifier, credentials.password)} + onSetup={(credentials) => auth.setup(credentials)} + setupRequired={setupRequired} + tagline="Your project tagline" +/> +``` + +The package handles form state, validation attributes, loading state, and error presentation. The application remains responsible for deciding where to navigate after a successful action and how errors are returned. + +## Local package development + +Before publishing, build the packages and install them from the local workspace in a frontend project: + +```bash +# From Web/SharedCode +npm run build + +# From a project frontend directory; do not commit this file dependency for CI +npm install ../../../SharedCode/packages/design-tokens ../../../SharedCode/packages/web-ui +``` + +For CI and normal development, use the published version instead of a `file:` dependency. A local file dependency only works when the checkout also contains the sibling `SharedCode` directory. + +## Updating the design system + +When a component or token changes: + +1. Run `npm run changeset` and describe the change. +2. Run `npm run version-packages` and commit the generated version/changelog files. +3. Run `npm install`, `npm run check`, `npm run build`, and `npm run test:node-backend`. +4. Run `npm run release`; Changesets publishes the npm packages in dependency order. +5. Update each project with `npm install @gabriel20xx/web-ui@` and commit its lockfile. + +The package boundary is intentional: application-specific screens stay in their project, while repeated visual language and account/layout infrastructure stays here. diff --git a/backend/README.md b/backend/README.md new file mode 100644 index 0000000..7065c5a --- /dev/null +++ b/backend/README.md @@ -0,0 +1,17 @@ +# Shared Go backend packages + +The Go packages under this directory hold infrastructure shared by the +services, not application-specific SQL or HTTP handlers. + +- `config` — environment string, required value, boolean, integer, and duration helpers. +- `postgres` — validated `DATABASE_URL` configuration, `pgxpool` creation/ping, transaction wrapper, and PostgreSQL error classification. +- `auth` — shared bcrypt policy, secure token generation/hashing, account/session schema, and account/session persistence. +- `migrate` — embedded filesystem adapter for Goose migrations. + +Run `go test ./...` and `go vet ./...` from this directory. The module path is +`repos.gfranz.ch/Gabriel20xx/SharedCode/backend`; change it if the SharedCode folder is +hosted under a different repository path. + +Application-specific table definitions and HTTP behavior stay in the service. +That lets a service reuse reliable connection/auth plumbing without coupling +its domain model to another project. diff --git a/backend/auth/password.go b/backend/auth/password.go new file mode 100644 index 0000000..b2b5351 --- /dev/null +++ b/backend/auth/password.go @@ -0,0 +1,21 @@ +package auth + +import "golang.org/x/crypto/bcrypt" + +// BcryptCost is kept in one place so all services use the same password +// storage policy. Existing hashes remain valid when this value is raised. +const BcryptCost = 12 + +// HashPassword returns a bcrypt password hash suitable for storage. +func HashPassword(password string) (string, error) { + hash, err := bcrypt.GenerateFromPassword([]byte(password), BcryptCost) + if err != nil { + return "", err + } + return string(hash), nil +} + +// VerifyPassword checks a plaintext password against a stored bcrypt hash. +func VerifyPassword(hash, password string) bool { + return bcrypt.CompareHashAndPassword([]byte(hash), []byte(password)) == nil +} diff --git a/backend/auth/store.go b/backend/auth/store.go new file mode 100644 index 0000000..76891d4 --- /dev/null +++ b/backend/auth/store.go @@ -0,0 +1,270 @@ +// Package auth contains the shared single-account/session persistence used by +// the self-hosted web services. HTTP handlers, cookies, authorization policy, +// and application-specific roles remain in each service. +package auth + +import ( + "context" + "errors" + "fmt" + "time" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" + "github.com/jackc/pgx/v5/pgxpool" +) + +// User is the shared account record. PasswordHash should never be serialized +// into an API response. +type User struct { + ID int64 + Username string + Email string + PasswordHash string + CreatedAt time.Time + UpdatedAt time.Time +} + +// Store performs common auth persistence against a caller-owned pool. +type Store struct { + pool *pgxpool.Pool +} + +// NewStore creates an auth store. The pool remains owned by the caller. +func NewStore(pool *pgxpool.Pool) *Store { + return &Store{pool: pool} +} + +// SchemaOptions controls optional auth schema features. +type SchemaOptions struct { + // SingleUser adds a constraint that allows exactly one account. This is the + // default model for GameStream, SimpleCollection, and home-server tools. + SingleUser bool + // APITokens creates the optional per-user API token table. + APITokens bool +} + +// DefaultSchemaOptions returns the single-account schema used by most small +// self-hosted services. +func DefaultSchemaOptions() SchemaOptions { + return SchemaOptions{SingleUser: true} +} + +// EnsureSchema creates the shared auth tables and indexes idempotently. +func EnsureSchema(ctx context.Context, pool *pgxpool.Pool, options SchemaOptions) error { + if pool == nil { + return errors.New("auth postgres pool is nil") + } + + _, err := pool.Exec(ctx, ` + CREATE TABLE IF NOT EXISTS auth_users ( + id BIGSERIAL PRIMARY KEY, + username TEXT NOT NULL UNIQUE, + email TEXT NOT NULL DEFAULT '', + password_hash TEXT NOT NULL, + created_at TIMESTAMPTZ NOT NULL DEFAULT now(), + updated_at TIMESTAMPTZ NOT NULL DEFAULT now() + ); + ALTER TABLE auth_users ADD COLUMN IF NOT EXISTS email TEXT NOT NULL DEFAULT ''; + ALTER TABLE auth_users ADD COLUMN IF NOT EXISTS created_at TIMESTAMPTZ NOT NULL DEFAULT now(); + ALTER TABLE auth_users ADD COLUMN IF NOT EXISTS updated_at TIMESTAMPTZ NOT NULL DEFAULT now(); + CREATE UNIQUE INDEX IF NOT EXISTS auth_users_email_idx + ON auth_users (lower(email)) WHERE email <> ''; + + CREATE TABLE IF NOT EXISTS auth_sessions ( + id BIGSERIAL PRIMARY KEY, + user_id BIGINT NOT NULL REFERENCES auth_users(id) ON DELETE CASCADE, + token_hash TEXT NOT NULL UNIQUE, + expires_at TIMESTAMPTZ NOT NULL, + created_at TIMESTAMPTZ NOT NULL DEFAULT now() + ); + CREATE INDEX IF NOT EXISTS auth_sessions_expiry_idx ON auth_sessions (expires_at); + CREATE INDEX IF NOT EXISTS auth_sessions_user_idx ON auth_sessions (user_id); + `) + if err != nil { + return fmt.Errorf("ensure auth schema: %w", err) + } + + if options.SingleUser { + if _, err := pool.Exec(ctx, ` + CREATE UNIQUE INDEX IF NOT EXISTS auth_users_singleton_idx ON auth_users ((true)); + `); err != nil { + return fmt.Errorf("ensure single-user auth constraint: %w", err) + } + } + + if options.APITokens { + if _, err := pool.Exec(ctx, ` + CREATE TABLE IF NOT EXISTS auth_api_tokens ( + id BIGSERIAL PRIMARY KEY, + user_id BIGINT NOT NULL REFERENCES auth_users(id) ON DELETE CASCADE, + token_hash TEXT NOT NULL UNIQUE, + created_at TIMESTAMPTZ NOT NULL DEFAULT now() + ); + CREATE INDEX IF NOT EXISTS auth_api_tokens_user_idx ON auth_api_tokens (user_id); + `); err != nil { + return fmt.Errorf("ensure auth API-token schema: %w", err) + } + } + return nil +} + +// CountUsers returns the number of configured accounts. +func (s *Store) CountUsers(ctx context.Context) (int, error) { + if err := s.validate(); err != nil { + return 0, err + } + var count int + if err := s.pool.QueryRow(ctx, `SELECT count(*) FROM auth_users`).Scan(&count); err != nil { + return 0, fmt.Errorf("count auth users: %w", err) + } + return count, nil +} + +// CreateUser inserts an account and returns ErrUserExists for a uniqueness +// conflict, including the single-user constraint. +func (s *Store) CreateUser(ctx context.Context, username, email, passwordHash string) (*User, error) { + if err := s.validate(); err != nil { + return nil, err + } + var user User + err := s.pool.QueryRow(ctx, ` + INSERT INTO auth_users (username, email, password_hash, updated_at) + VALUES ($1, $2, $3, now()) + RETURNING id, username, email, password_hash, created_at, updated_at + `, username, email, passwordHash).Scan( + &user.ID, &user.Username, &user.Email, &user.PasswordHash, &user.CreatedAt, &user.UpdatedAt, + ) + if err != nil { + var pgErr *pgconn.PgError + if errors.As(err, &pgErr) && pgErr.Code == "23505" { + return nil, ErrUserExists + } + return nil, fmt.Errorf("create auth user: %w", err) + } + return &user, nil +} + +// FindByIdentifier looks up a user by exact username or case-insensitive email. +func (s *Store) FindByIdentifier(ctx context.Context, identifier string) (*User, error) { + if err := s.validate(); err != nil { + return nil, err + } + return s.find(ctx, ` + SELECT id, username, email, password_hash, created_at, updated_at + FROM auth_users + WHERE username = $1 OR lower(email) = lower($1) + `, identifier) +} + +// FindByID looks up a user by primary key. +func (s *Store) FindByID(ctx context.Context, id int64) (*User, error) { + if err := s.validate(); err != nil { + return nil, err + } + return s.find(ctx, ` + SELECT id, username, email, password_hash, created_at, updated_at + FROM auth_users WHERE id = $1 + `, id) +} + +// UpdateCredentials updates the normalized account fields and password hash. +func (s *Store) UpdateCredentials(ctx context.Context, id int64, username, email, passwordHash string) error { + if err := s.validate(); err != nil { + return err + } + _, err := s.pool.Exec(ctx, ` + UPDATE auth_users + SET username = $1, email = $2, password_hash = $3, updated_at = now() + WHERE id = $4 + `, username, email, passwordHash, id) + if err != nil { + return fmt.Errorf("update auth credentials: %w", err) + } + return nil +} + +// CreateSession stores a hash of a session token until expiresAt. +func (s *Store) CreateSession(ctx context.Context, userID int64, tokenHash string, expiresAt time.Time) error { + if err := s.validate(); err != nil { + return err + } + _, err := s.pool.Exec(ctx, ` + INSERT INTO auth_sessions (user_id, token_hash, expires_at) + VALUES ($1, $2, $3) + `, userID, tokenHash, expiresAt) + if err != nil { + return fmt.Errorf("create auth session: %w", err) + } + return nil +} + +// FindSessionUser resolves an unexpired session to its user. +func (s *Store) FindSessionUser(ctx context.Context, tokenHash string) (*User, error) { + if err := s.validate(); err != nil { + return nil, err + } + return s.find(ctx, ` + SELECT u.id, u.username, u.email, u.password_hash, u.created_at, u.updated_at + FROM auth_sessions s + JOIN auth_users u ON u.id = s.user_id + WHERE s.token_hash = $1 AND s.expires_at > now() + `, tokenHash) +} + +// DeleteSession removes one session, typically during logout. +func (s *Store) DeleteSession(ctx context.Context, tokenHash string) error { + if err := s.validate(); err != nil { + return err + } + if _, err := s.pool.Exec(ctx, `DELETE FROM auth_sessions WHERE token_hash = $1`, tokenHash); err != nil { + return fmt.Errorf("delete auth session: %w", err) + } + return nil +} + +// DeleteSessionsForUser invalidates all sessions after credential changes. +func (s *Store) DeleteSessionsForUser(ctx context.Context, userID int64) error { + if err := s.validate(); err != nil { + return err + } + if _, err := s.pool.Exec(ctx, `DELETE FROM auth_sessions WHERE user_id = $1`, userID); err != nil { + return fmt.Errorf("delete auth sessions for user: %w", err) + } + return nil +} + +// DeleteExpiredSessions performs the periodic session cleanup shared by the +// services. A caller can run it from its own scheduler. +func (s *Store) DeleteExpiredSessions(ctx context.Context) error { + if err := s.validate(); err != nil { + return err + } + if _, err := s.pool.Exec(ctx, `DELETE FROM auth_sessions WHERE expires_at < now()`); err != nil { + return fmt.Errorf("delete expired auth sessions: %w", err) + } + return nil +} + +var ErrUserExists = errors.New("auth user already exists") + +func (s *Store) validate() error { + if s == nil || s.pool == nil { + return errors.New("auth store has no postgres pool") + } + return nil +} + +func (s *Store) find(ctx context.Context, query string, arg any) (*User, error) { + var user User + err := s.pool.QueryRow(ctx, query, arg).Scan( + &user.ID, &user.Username, &user.Email, &user.PasswordHash, &user.CreatedAt, &user.UpdatedAt, + ) + if errors.Is(err, pgx.ErrNoRows) { + return nil, nil + } + if err != nil { + return nil, fmt.Errorf("find auth user: %w", err) + } + return &user, nil +} diff --git a/backend/auth/store_test.go b/backend/auth/store_test.go new file mode 100644 index 0000000..0a31243 --- /dev/null +++ b/backend/auth/store_test.go @@ -0,0 +1,37 @@ +package auth + +import ( + "testing" + + "golang.org/x/crypto/bcrypt" +) + +func TestPasswordRoundTrip(t *testing.T) { + hash, err := HashPassword("correct horse battery staple") + if err != nil { + t.Fatalf("HashPassword() error = %v", err) + } + if !VerifyPassword(hash, "correct horse battery staple") { + t.Fatal("VerifyPassword() rejected the original password") + } + if VerifyPassword(hash, "wrong password") { + t.Fatal("VerifyPassword() accepted the wrong password") + } + if cost, err := bcrypt.Cost([]byte(hash)); err != nil || cost != BcryptCost { + t.Fatalf("bcrypt cost = %d, error = %v; want %d", cost, err, BcryptCost) + } +} + +func TestNewSessionToken(t *testing.T) { + raw, hash, err := NewSessionToken() + if err != nil { + t.Fatalf("NewSessionToken() error = %v", err) + } + if raw == "" || hash == "" { + t.Fatal("NewSessionToken() returned an empty token or hash") + } + if got := HashToken(raw); got != hash { + diff := got + t.Fatalf("HashToken(raw) = %q, want %q", diff, hash) + } +} diff --git a/backend/auth/token.go b/backend/auth/token.go new file mode 100644 index 0000000..0e85e3c --- /dev/null +++ b/backend/auth/token.go @@ -0,0 +1,25 @@ +package auth + +import ( + "crypto/rand" + "crypto/sha256" + "encoding/base64" +) + +// NewSessionToken creates a random bearer token and its SHA-256 storage hash. +// Store only the hash; return the raw token to the caller that sets the cookie +// or authorization header. +func NewSessionToken() (raw string, hash string, err error) { + bytes := make([]byte, 32) + if _, err := rand.Read(bytes); err != nil { + return "", "", err + } + raw = base64.RawURLEncoding.EncodeToString(bytes) + return raw, HashToken(raw), nil +} + +// HashToken creates the stable database key for a raw session/API token. +func HashToken(raw string) string { + sum := sha256.Sum256([]byte(raw)) + return base64.RawURLEncoding.EncodeToString(sum[:]) +} diff --git a/backend/config/config.go b/backend/config/config.go new file mode 100644 index 0000000..d8c5fea --- /dev/null +++ b/backend/config/config.go @@ -0,0 +1,71 @@ +// Package config contains small, dependency-free environment helpers shared +// by the Go services. It intentionally does not define an application's full +// configuration struct. +package config + +import ( + "fmt" + "os" + "strconv" + "strings" + "time" +) + +// String returns the environment value or fallback when the variable is empty. +func String(key, fallback string) string { + if value := strings.TrimSpace(os.Getenv(key)); value != "" { + return value + } + return fallback +} + +// Required returns a trimmed environment value or an actionable error. +func Required(key string) (string, error) { + value := strings.TrimSpace(os.Getenv(key)) + if value == "" { + return "", fmt.Errorf("%s is required", key) + } + return value, nil +} + +// Bool returns a parsed boolean environment value or fallback for an unset or +// invalid value. Invalid values are deliberately non-fatal for optional flags. +func Bool(key string, fallback bool) bool { + value := strings.TrimSpace(os.Getenv(key)) + if value == "" { + return fallback + } + parsed, err := strconv.ParseBool(value) + if err != nil { + return fallback + } + return parsed +} + +// Int returns a parsed integer environment value or fallback for an unset or +// invalid value. Callers should validate application-specific ranges. +func Int(key string, fallback int) int { + value := strings.TrimSpace(os.Getenv(key)) + if value == "" { + return fallback + } + parsed, err := strconv.Atoi(value) + if err != nil { + return fallback + } + return parsed +} + +// Duration returns a parsed duration environment value or fallback for an +// unset or invalid value. +func Duration(key string, fallback time.Duration) time.Duration { + value := strings.TrimSpace(os.Getenv(key)) + if value == "" { + return fallback + } + parsed, err := time.ParseDuration(value) + if err != nil { + return fallback + } + return parsed +} diff --git a/backend/go.mod b/backend/go.mod new file mode 100644 index 0000000..17ac281 --- /dev/null +++ b/backend/go.mod @@ -0,0 +1,20 @@ +module repos.gfranz.ch/Gabriel20xx/SharedCode/backend + +go 1.25.7 + +require ( + github.com/jackc/pgx/v5 v5.10.0 + github.com/pressly/goose/v3 v3.27.3 + golang.org/x/crypto v0.54.0 +) + +require ( + github.com/jackc/pgpassfile v1.0.0 // indirect + github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect + github.com/jackc/puddle/v2 v2.2.2 // indirect + github.com/mfridman/interpolate v0.0.2 // indirect + github.com/sethvargo/go-retry v0.4.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/sync v0.22.0 // indirect + golang.org/x/text v0.40.0 // indirect +) diff --git a/backend/go.sum b/backend/go.sum new file mode 100644 index 0000000..24db709 --- /dev/null +++ b/backend/go.sum @@ -0,0 +1,56 @@ +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= +github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= +github.com/jackc/pgx/v5 v5.10.0 h1:VhSvgU2jSli8o3AqIEOTJr7rZwAEUVo4E4XhR94Zfr0= +github.com/jackc/pgx/v5 v5.10.0/go.mod h1:mal1tBGAFfLHvZzaYh77YS/eC6IX9OWbRV1QIIM0Jn4= +github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= +github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= +github.com/mattn/go-isatty v0.0.23 h1:cYwCQTQf3HB6xUC+BtyCLZNr7IzbOmoZbmssVNzSyiQ= +github.com/mattn/go-isatty v0.0.23/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A= +github.com/mfridman/interpolate v0.0.2 h1:pnuTK7MQIxxFz1Gr+rjSIx9u7qVjf5VOoM/u6BbAxPY= +github.com/mfridman/interpolate v0.0.2/go.mod h1:p+7uk6oE07mpE/Ik1b8EckO0O4ZXiGAfshKBWLUM9Xg= +github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w= +github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pressly/goose/v3 v3.27.3 h1:pIglVHjw99r4e/hDHHwbl9vfOsDMqUokfkXo6+n/RxA= +github.com/pressly/goose/v3 v3.27.3/go.mod h1:Dag+xpV6o20HR2LFY1j0q6MDwc3f7vPUFDA77R+0yGY= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/sethvargo/go-retry v0.4.0 h1:9qy1OoIAxBL+gBYnkTnTnWle5wlfsXQlwRzIbbpdqPw= +github.com/sethvargo/go-retry v0.4.0/go.mod h1:tvsjdKG6xfiCx4LSiUZ06kcv38xvdVQwv8R6/VnnVWg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +golang.org/x/crypto v0.54.0 h1:YLIA59K4fiNzHzjnZt2tUJQjQtUWfWbeHBqKtk3eScw= +golang.org/x/crypto v0.54.0/go.mod h1:KWL8ny2AZdGR2cWmzeHrp2azQPGogOv+HeQaVEXC2dk= +golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= +golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs= +golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/text v0.40.0 h1:Ub2Z6/xjgF1WrYQz2nuITOEegKFtiIy+rieRJ5lHZKs= +golang.org/x/text v0.40.0/go.mod h1:hpnzDAfGV753zIKo+wk3u1bVKCGPbrnF7+7LBF/UHVY= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +modernc.org/libc v1.74.3 h1:a4J+Z8aVaxPyjyxRAdJzw246PqpcFGvVPnfT/AuM5Ws= +modernc.org/libc v1.74.3/go.mod h1:4H7h/MJ8wnjL8RAbp9v3OXgnk22X7MouHIhDbvP3gj4= +modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU= +modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg= +modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI= +modernc.org/memory v1.11.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw= +modernc.org/sqlite v1.54.0 h1:JCxR4qwkJvOaqAoYcgDoO25Nc+ROg6EJ2LfBVzdrgog= +modernc.org/sqlite v1.54.0/go.mod h1:4ntCLuNmnH8+GNqjka1wNg7KJd5/Hi5FYp8K+XQ7GZw= diff --git a/backend/migrate/migrate.go b/backend/migrate/migrate.go new file mode 100644 index 0000000..eb06d0e --- /dev/null +++ b/backend/migrate/migrate.go @@ -0,0 +1,42 @@ +// Package migrate provides a small embedded-filesystem wrapper around Goose. +// Applications still own their SQL files and migration policy. +package migrate + +import ( + "context" + "database/sql" + "fmt" + "io/fs" + + _ "github.com/jackc/pgx/v5/stdlib" + "github.com/pressly/goose/v3" +) + +// Up applies all pending PostgreSQL migrations in migrationsFS/dir. The +// filesystem is normally an embed.FS supplied by the consuming application. +func Up(ctx context.Context, databaseURL string, migrationsFS fs.FS, dir string) error { + if databaseURL == "" { + return fmt.Errorf("database URL is required") + } + if migrationsFS == nil { + return fmt.Errorf("migration filesystem is required") + } + + db, err := sql.Open("pgx", databaseURL) + if err != nil { + return fmt.Errorf("open migration database: %w", err) + } + defer db.Close() + if err := db.PingContext(ctx); err != nil { + return fmt.Errorf("ping migration database: %w", err) + } + + goose.SetBaseFS(migrationsFS) + if err := goose.SetDialect("postgres"); err != nil { + return fmt.Errorf("set migration dialect: %w", err) + } + if err := goose.UpContext(ctx, db, dir); err != nil { + return fmt.Errorf("run migrations: %w", err) + } + return nil +} diff --git a/backend/postgres/postgres.go b/backend/postgres/postgres.go new file mode 100644 index 0000000..f1bc0ee --- /dev/null +++ b/backend/postgres/postgres.go @@ -0,0 +1,153 @@ +// Package postgres centralizes PostgreSQL pool creation and the small pieces +// of error/transaction handling that are repeated by the Go services. +package postgres + +import ( + "context" + "errors" + "fmt" + "strings" + "time" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" + "github.com/jackc/pgx/v5/pgxpool" + + "repos.gfranz.ch/Gabriel20xx/SharedCode/backend/config" +) + +// Config controls a shared pgx connection pool. URL is normally read from +// DATABASE_URL with FromEnv. +type Config struct { + URL string + MaxConns int32 + MinConns int32 + MaxConnLifetime time.Duration + MaxConnIdleTime time.Duration + HealthCheckPeriod time.Duration + ConnectTimeout time.Duration +} + +// DefaultConfig returns sensible defaults for a small self-hosted service. +func DefaultConfig(url string) Config { + return Config{ + URL: strings.TrimSpace(url), + MaxConns: 20, + MinConns: 0, + MaxConnLifetime: time.Hour, + MaxConnIdleTime: 30 * time.Minute, + HealthCheckPeriod: 30 * time.Second, + ConnectTimeout: 10 * time.Second, + } +} + +// FromEnv loads DATABASE_URL and optional pool settings. Duration values use +// Go duration syntax, for example 30s or 1h. Invalid optional values fall back +// to defaults; the URL is the only required setting. +func FromEnv() (Config, error) { + url, err := config.Required("DATABASE_URL") + if err != nil { + return Config{}, err + } + + cfg := DefaultConfig(url) + cfg.MaxConns = int32(config.Int("DATABASE_MAX_CONNS", int(cfg.MaxConns))) + cfg.MinConns = int32(config.Int("DATABASE_MIN_CONNS", int(cfg.MinConns))) + cfg.MaxConnLifetime = config.Duration("DATABASE_MAX_CONN_LIFETIME", cfg.MaxConnLifetime) + cfg.MaxConnIdleTime = config.Duration("DATABASE_MAX_CONN_IDLE_TIME", cfg.MaxConnIdleTime) + cfg.HealthCheckPeriod = config.Duration("DATABASE_HEALTH_CHECK_PERIOD", cfg.HealthCheckPeriod) + cfg.ConnectTimeout = config.Duration("DATABASE_CONNECT_TIMEOUT", cfg.ConnectTimeout) + + if cfg.MaxConns < 1 { + return Config{}, fmt.Errorf("DATABASE_MAX_CONNS must be at least 1") + } + if cfg.MinConns < 0 || cfg.MinConns > cfg.MaxConns { + return Config{}, fmt.Errorf("DATABASE_MIN_CONNS must be between 0 and DATABASE_MAX_CONNS") + } + if cfg.ConnectTimeout <= 0 { + return Config{}, fmt.Errorf("DATABASE_CONNECT_TIMEOUT must be greater than 0") + } + return cfg, nil +} + +// Open creates and verifies a PostgreSQL pool. A failed ping closes the pool +// before returning so callers do not leak connections during startup errors. +func Open(ctx context.Context, cfg Config) (*pgxpool.Pool, error) { + if strings.TrimSpace(cfg.URL) == "" { + return nil, errors.New("postgres URL is required") + } + + poolConfig, err := pgxpool.ParseConfig(cfg.URL) + if err != nil { + return nil, fmt.Errorf("parse postgres URL: %w", err) + } + if cfg.MaxConns > 0 { + poolConfig.MaxConns = cfg.MaxConns + } + if cfg.MinConns >= 0 { + poolConfig.MinConns = cfg.MinConns + } + if cfg.MaxConnLifetime > 0 { + poolConfig.MaxConnLifetime = cfg.MaxConnLifetime + } + if cfg.MaxConnIdleTime > 0 { + poolConfig.MaxConnIdleTime = cfg.MaxConnIdleTime + } + if cfg.HealthCheckPeriod > 0 { + poolConfig.HealthCheckPeriod = cfg.HealthCheckPeriod + } + if cfg.ConnectTimeout > 0 { + poolConfig.ConnConfig.ConnectTimeout = cfg.ConnectTimeout + } + + pool, err := pgxpool.NewWithConfig(ctx, poolConfig) + if err != nil { + return nil, fmt.Errorf("create postgres pool: %w", err) + } + if err := pool.Ping(ctx); err != nil { + pool.Close() + return nil, fmt.Errorf("ping postgres: %w", err) + } + return pool, nil +} + +// WithTx runs fn in a transaction and rolls back on all error paths. +func WithTx(ctx context.Context, pool *pgxpool.Pool, fn func(pgx.Tx) error) error { + if pool == nil { + return errors.New("postgres pool is nil") + } + if fn == nil { + return errors.New("postgres transaction callback is nil") + } + + tx, err := pool.Begin(ctx) + if err != nil { + return fmt.Errorf("begin postgres transaction: %w", err) + } + defer func() { _ = tx.Rollback(ctx) }() + + if err := fn(tx); err != nil { + return err + } + if err := tx.Commit(ctx); err != nil { + return fmt.Errorf("commit postgres transaction: %w", err) + } + return nil +} + +// IsNoRows reports whether err is pgx's not-found sentinel. +func IsNoRows(err error) bool { + return errors.Is(err, pgx.ErrNoRows) +} + +// IsUniqueViolation reports a PostgreSQL unique/exclusion constraint error. +func IsUniqueViolation(err error) bool { + var pgErr *pgconn.PgError + return errors.As(err, &pgErr) && (pgErr.Code == "23505" || pgErr.Code == "23P01") +} + +// IsForeignKeyViolation reports a PostgreSQL foreign-key constraint error. +func IsForeignKeyViolation(err error) bool { + var pgErr *pgconn.PgError + return errors.As(err, &pgErr) && pgErr.Code == "23503" +} diff --git a/backend/postgres/postgres_test.go b/backend/postgres/postgres_test.go new file mode 100644 index 0000000..0622d7b --- /dev/null +++ b/backend/postgres/postgres_test.go @@ -0,0 +1,31 @@ +package postgres + +import ( + "os" + "testing" +) + +func TestFromEnvRequiresDatabaseURL(t *testing.T) { + t.Setenv("DATABASE_URL", "") + if _, err := FromEnv(); err == nil { + t.Fatal("FromEnv() returned nil error without DATABASE_URL") + } +} + +func TestFromEnvLoadsPoolSettings(t *testing.T) { + t.Setenv("DATABASE_URL", "postgres://user:password@localhost:5432/app") + t.Setenv("DATABASE_MAX_CONNS", "7") + t.Setenv("DATABASE_MIN_CONNS", "2") + defer func() { + _ = os.Unsetenv("DATABASE_MAX_CONNS") + _ = os.Unsetenv("DATABASE_MIN_CONNS") + }() + + cfg, err := FromEnv() + if err != nil { + t.Fatalf("FromEnv() error = %v", err) + } + if cfg.MaxConns != 7 || cfg.MinConns != 2 { + t.Fatalf("pool limits = (%d, %d), want (7, 2)", cfg.MaxConns, cfg.MinConns) + } +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..38bf164 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,3143 @@ +{ + "name": "@gabriel20xx/shared-workspace", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@gabriel20xx/shared-workspace", + "workspaces": [ + "packages/*" + ], + "devDependencies": { + "@changesets/cli": "^2.29.8" + } + }, + "node_modules/@babel/runtime": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.7.tgz", + "integrity": "sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@changesets/apply-release-plan": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@changesets/apply-release-plan/-/apply-release-plan-7.1.1.tgz", + "integrity": "sha512-9qPCm/rLx/xoOFXIHGB229+4GOL76S4MC+7tyOuTsR6+1jYlfFDQORdvwR5hDA6y4FL2BPt3qpbcQIS+dW85LA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/config": "^3.1.4", + "@changesets/get-version-range-type": "^0.4.0", + "@changesets/git": "^3.0.4", + "@changesets/should-skip-package": "^0.1.2", + "@changesets/types": "^6.1.0", + "@manypkg/get-packages": "^1.1.3", + "detect-indent": "^6.0.0", + "fs-extra": "^7.0.1", + "lodash.startcase": "^4.4.0", + "outdent": "^0.5.0", + "prettier": "^2.7.1", + "resolve-from": "^5.0.0", + "semver": "^7.5.3" + } + }, + "node_modules/@changesets/assemble-release-plan": { + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/@changesets/assemble-release-plan/-/assemble-release-plan-6.0.10.tgz", + "integrity": "sha512-rSDcqdJ9KbVyjpBIuCidhvZNIiVt1XaIYp73ycVQRIA5n/j6wQaEk0ChRLMUQ1vkxZe51PTQ9OIhbg6HQMW45A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/errors": "^0.2.0", + "@changesets/get-dependents-graph": "^2.1.4", + "@changesets/should-skip-package": "^0.1.2", + "@changesets/types": "^6.1.0", + "@manypkg/get-packages": "^1.1.3", + "semver": "^7.5.3" + } + }, + "node_modules/@changesets/changelog-git": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@changesets/changelog-git/-/changelog-git-0.2.1.tgz", + "integrity": "sha512-x/xEleCFLH28c3bQeQIyeZf8lFXyDFVn1SgcBiR2Tw/r4IAWlk1fzxCEZ6NxQAjF2Nwtczoen3OA2qR+UawQ8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.1.0" + } + }, + "node_modules/@changesets/cli": { + "version": "2.31.1", + "resolved": "https://registry.npmjs.org/@changesets/cli/-/cli-2.31.1.tgz", + "integrity": "sha512-uO05WTcRBwuVOJVSW8Cmpqw6q0WDL53ajGCMyszutvOe5toOnunbpM4jZzf+qxBOz7i0AzopZ8diBuewjmF40w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/apply-release-plan": "^7.1.1", + "@changesets/assemble-release-plan": "^6.0.10", + "@changesets/changelog-git": "^0.2.1", + "@changesets/config": "^3.1.4", + "@changesets/errors": "^0.2.0", + "@changesets/get-dependents-graph": "^2.1.4", + "@changesets/get-release-plan": "^4.0.16", + "@changesets/git": "^3.0.4", + "@changesets/logger": "^0.1.1", + "@changesets/pre": "^2.0.2", + "@changesets/read": "^0.6.7", + "@changesets/should-skip-package": "^0.1.2", + "@changesets/types": "^6.1.0", + "@changesets/write": "^0.4.0", + "@inquirer/external-editor": "^1.0.2", + "@manypkg/get-packages": "^1.1.3", + "ansi-colors": "^4.1.3", + "enquirer": "^2.4.1", + "fs-extra": "^7.0.1", + "mri": "^1.2.0", + "package-manager-detector": "^0.2.0", + "picocolors": "^1.1.0", + "resolve-from": "^5.0.0", + "semver": "^7.5.3", + "spawndamnit": "^3.0.1", + "term-size": "^2.1.0" + }, + "bin": { + "changeset": "bin.js" + } + }, + "node_modules/@changesets/config": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@changesets/config/-/config-3.1.4.tgz", + "integrity": "sha512-pf0bvD/v6WI2cRlZ6hzpjtZdSlXDXMAJ+Iz7xfFzV4ZxJ8OGGAON+1qYc99ZPrijnt4xp3VGG7eNvAOGS24V1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/errors": "^0.2.0", + "@changesets/get-dependents-graph": "^2.1.4", + "@changesets/logger": "^0.1.1", + "@changesets/should-skip-package": "^0.1.2", + "@changesets/types": "^6.1.0", + "@manypkg/get-packages": "^1.1.3", + "fs-extra": "^7.0.1", + "micromatch": "^4.0.8" + } + }, + "node_modules/@changesets/errors": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@changesets/errors/-/errors-0.2.0.tgz", + "integrity": "sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==", + "dev": true, + "license": "MIT", + "dependencies": { + "extendable-error": "^0.1.5" + } + }, + "node_modules/@changesets/get-dependents-graph": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@changesets/get-dependents-graph/-/get-dependents-graph-2.1.4.tgz", + "integrity": "sha512-ZsS00x6WvmHq3sQv8oCMwL0f/z3wbXCVuSVTJwCnnmbC/iBdNJGFx1EcbMG4PC6sXRyH69liM4A2WKXzn/kRPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.1.0", + "@manypkg/get-packages": "^1.1.3", + "picocolors": "^1.1.0", + "semver": "^7.5.3" + } + }, + "node_modules/@changesets/get-release-plan": { + "version": "4.0.16", + "resolved": "https://registry.npmjs.org/@changesets/get-release-plan/-/get-release-plan-4.0.16.tgz", + "integrity": "sha512-2K5Om6CrMPm45rtvckfzWo7e9jOVCKLCnXia5eUPaURH7/LWzri7pK1TycdzAuAtehLkW7VPbWLCSExTHmiI6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/assemble-release-plan": "^6.0.10", + "@changesets/config": "^3.1.4", + "@changesets/pre": "^2.0.2", + "@changesets/read": "^0.6.7", + "@changesets/types": "^6.1.0", + "@manypkg/get-packages": "^1.1.3" + } + }, + "node_modules/@changesets/get-version-range-type": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@changesets/get-version-range-type/-/get-version-range-type-0.4.0.tgz", + "integrity": "sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@changesets/git": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@changesets/git/-/git-3.0.4.tgz", + "integrity": "sha512-BXANzRFkX+XcC1q/d27NKvlJ1yf7PSAgi8JG6dt8EfbHFHi4neau7mufcSca5zRhwOL8j9s6EqsxmT+s+/E6Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/errors": "^0.2.0", + "@manypkg/get-packages": "^1.1.3", + "is-subdir": "^1.1.1", + "micromatch": "^4.0.8", + "spawndamnit": "^3.0.1" + } + }, + "node_modules/@changesets/logger": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@changesets/logger/-/logger-0.1.1.tgz", + "integrity": "sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "picocolors": "^1.1.0" + } + }, + "node_modules/@changesets/parse": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@changesets/parse/-/parse-0.4.3.tgz", + "integrity": "sha512-ZDmNc53+dXdWEv7fqIUSgRQOLYoUom5Z40gmLgmATmYR9NbL6FJJHwakcCpzaeCy+1D0m0n7mT4jj2B/MQPl7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.1.0", + "js-yaml": "^4.1.1" + } + }, + "node_modules/@changesets/pre": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@changesets/pre/-/pre-2.0.2.tgz", + "integrity": "sha512-HaL/gEyFVvkf9KFg6484wR9s0qjAXlZ8qWPDkTyKF6+zqjBe/I2mygg3MbpZ++hdi0ToqNUF8cjj7fBy0dg8Ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/errors": "^0.2.0", + "@changesets/types": "^6.1.0", + "@manypkg/get-packages": "^1.1.3", + "fs-extra": "^7.0.1" + } + }, + "node_modules/@changesets/read": { + "version": "0.6.7", + "resolved": "https://registry.npmjs.org/@changesets/read/-/read-0.6.7.tgz", + "integrity": "sha512-D1G4AUYGrBEk8vj8MGwf75k9GpN6XL3wg8i42P2jZZwFLXnlr2Pn7r9yuQNbaMCarP7ZQWNJbV6XLeysAIMhTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/git": "^3.0.4", + "@changesets/logger": "^0.1.1", + "@changesets/parse": "^0.4.3", + "@changesets/types": "^6.1.0", + "fs-extra": "^7.0.1", + "p-filter": "^2.1.0", + "picocolors": "^1.1.0" + } + }, + "node_modules/@changesets/should-skip-package": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@changesets/should-skip-package/-/should-skip-package-0.1.2.tgz", + "integrity": "sha512-qAK/WrqWLNCP22UDdBTMPH5f41elVDlsNyat180A33dWxuUDyNpg6fPi/FyTZwRriVjg0L8gnjJn2F9XAoF0qw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.1.0", + "@manypkg/get-packages": "^1.1.3" + } + }, + "node_modules/@changesets/types": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@changesets/types/-/types-6.1.0.tgz", + "integrity": "sha512-rKQcJ+o1nKNgeoYRHKOS07tAMNd3YSN0uHaJOZYjBAgxfV7TUE7JE+z4BzZdQwb5hKaYbayKN5KrYV7ODb2rAA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@changesets/write": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@changesets/write/-/write-0.4.0.tgz", + "integrity": "sha512-CdTLvIOPiCNuH71pyDu3rA+Q0n65cmAbXnwWH84rKGiFumFzkmHNT8KHTMEchcxN+Kl8I54xGUhJ7l3E7X396Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.1.0", + "fs-extra": "^7.0.1", + "human-id": "^4.1.1", + "prettier": "^2.7.1" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.1.tgz", + "integrity": "sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.1.tgz", + "integrity": "sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.1.tgz", + "integrity": "sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.1.tgz", + "integrity": "sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.1.tgz", + "integrity": "sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.1.tgz", + "integrity": "sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.1.tgz", + "integrity": "sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.1.tgz", + "integrity": "sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.1.tgz", + "integrity": "sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.1.tgz", + "integrity": "sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.1.tgz", + "integrity": "sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.1.tgz", + "integrity": "sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.1.tgz", + "integrity": "sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.1.tgz", + "integrity": "sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.1.tgz", + "integrity": "sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.1.tgz", + "integrity": "sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.1.tgz", + "integrity": "sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.1.tgz", + "integrity": "sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.1.tgz", + "integrity": "sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.1.tgz", + "integrity": "sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.1.tgz", + "integrity": "sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.1.tgz", + "integrity": "sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.1.tgz", + "integrity": "sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.1.tgz", + "integrity": "sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.1.tgz", + "integrity": "sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.1.tgz", + "integrity": "sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@gabriel20xx/design-tokens": { + "resolved": "packages/design-tokens", + "link": true + }, + "node_modules/@gabriel20xx/node-backend": { + "resolved": "packages/node-backend", + "link": true + }, + "node_modules/@gabriel20xx/web-ui": { + "resolved": "packages/web-ui", + "link": true + }, + "node_modules/@inquirer/external-editor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.3.tgz", + "integrity": "sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^2.1.1", + "iconv-lite": "^0.7.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@manypkg/find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@manypkg/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.5.5", + "@types/node": "^12.7.1", + "find-up": "^4.1.0", + "fs-extra": "^8.1.0" + } + }, + "node_modules/@manypkg/find-root/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@manypkg/find-root/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@manypkg/get-packages": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@manypkg/get-packages/-/get-packages-1.1.3.tgz", + "integrity": "sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.5.5", + "@changesets/types": "^4.0.1", + "@manypkg/find-root": "^1.1.0", + "fs-extra": "^8.1.0", + "globby": "^11.0.0", + "read-yaml-file": "^1.1.0" + } + }, + "node_modules/@manypkg/get-packages/node_modules/@changesets/types": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@changesets/types/-/types-4.1.0.tgz", + "integrity": "sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@manypkg/get-packages/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "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==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": "^22.20 || ^24.12 || >=25" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.62.4.tgz", + "integrity": "sha512-RrPokAb7dmbxFoeO3TloqHyOjgye8RkBhSqmp4aJMIex4c9r46ZstPnleDQOq1t46VOVjwIuwNogIqbodV1Vvg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "peer": true + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.62.4.tgz", + "integrity": "sha512-JKuJc+pnpks2pjy7L/N3v/cAkZxYlnmuZoD840ldbMI5KDbC4iO9NKwPKYdjYFCMAIIlBzYSFHxIJVYzRo2/8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "peer": true + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.62.4.tgz", + "integrity": "sha512-krw5uS2STmvJ02x0uTXHbqQNuz+9eZ1iw+qXk9dmW2gvV4jV7O2hEoOnuhFrpOPiel1mBFtqbxYZZtC46hXLOw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.62.4.tgz", + "integrity": "sha512-wsTxtgApb4PrOsNJIm0FZ1h3WvCC+k9uxLJ4ad75hgoS4NiRes2SoJFlDAyMwiUY8IssDqGcHbXuN0sx1tfF1A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.62.4.tgz", + "integrity": "sha512-GUOnQlyZe3yAXhWOtOMsn5Qkrv5E5mZXa0thbARWi5Ei2szlVXJFQhddZ4HbAzh8q92w5twp+CQvs/eFanz9YQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "peer": true + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.62.4.tgz", + "integrity": "sha512-/Y7f3QuxjzPKsjA/rfEDa3+0vXqyjmJ50Ln8dPpCmWkKTrUoWHG1cWhTqaAMLob2m2nESWuC7yGrREz019Ztqg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "peer": true + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.62.4.tgz", + "integrity": "sha512-81wiiX3v7aqy+T+bT61TJ78yJjRquqFFTTbAPt08imfQQzkPIW8t6aJbkTagtCCrXMNc9D66+geqlK7ydLPNqA==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.62.4.tgz", + "integrity": "sha512-9kmDIvNZqdoHOBZgNtpTBeLWYO/LVipM3H/j62P8848/l/VPEQL6N3uxU9pvP1oZAsXyC2MEnFP3ovRjo7WYNQ==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.62.4.tgz", + "integrity": "sha512-CcnXHWnXg69g+DX5VWL3FHts3qMRN2uVEHX+BZvGLdd07/gXkn3ePjYtO1LDJvxkGKVHMclKBRa1QUTH+6toYQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.62.4.tgz", + "integrity": "sha512-iFOibiHnTRuhrWLlRsOQFdZJJIa7S8OwkneJr4ocALP16u5yk6lWLINFwhHaEqBFMsKDUZofLkGos7+CPzGB3g==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.62.4.tgz", + "integrity": "sha512-XnWYMI7euHlb5a871xPja+Gm7DRCFU+FGRrtS2sMq9N8FvqtpagUy6gD4YOemC5MRk9xbh8+jYMEJbigFQwsgA==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.62.4.tgz", + "integrity": "sha512-qGDAlO0U8xedCcsdRm9oaoQY8DAx/QT7uIxJWhCdx0ceIWX783UC9QSYkdpzAe29wNiVfp24+bZdQmn49o45SQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.62.4.tgz", + "integrity": "sha512-ru4H6ezD7ysA5EiEK6qkkaEb4modH8CTej6kUy/gQi20u3kB3G7Zn8snXXkeJSCOFKG/rbPPtM/+9Wgas1961w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.62.4.tgz", + "integrity": "sha512-2W4MO5WQVJnbJaZdvDb9rhBDuFU1nKIepPFpJUBsTh2k1YY2g+ODViaWuyOAjQ5cOP7NvrvLzt3wvHOoiAvc7w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.62.4.tgz", + "integrity": "sha512-+fxjfuoAmVMCYV5QyjoIpu0cp5DOiOTeqYFk1AVaxGr+/ravWLX89XfQmptsoWcaVy/TGf2hexzbUOrCQIL1CQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.62.4.tgz", + "integrity": "sha512-jTn8JfHGL4djjFxPuM06LmNUJDsst2jeVlsd9OmIH6zc5sC9K6rIuO4YajXatLUpBmBKl6b35ro1QZocLi+tcA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.62.4.tgz", + "integrity": "sha512-oCJCJL4pXsoDcP2QZ+JVlPTIRc6266zsIaeJJsWImmF7HO0W8nb6HuSgZlMWxJwaPf8ehbSw8yo0EUw925hKsA==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.62.4.tgz", + "integrity": "sha512-W69hukhZ3KKNRCaMIEzKvcFye42hh0FE1+YoYaf5+Ikacuftoco6yO/xouz0hc5d5W/s3yBro5jRiuEE/Q5vUw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.62.4.tgz", + "integrity": "sha512-qiXbGG2jkjXhzXpsFZSR2Xpb8DN/UaxYsbb/STbuR/6fpaDgRmmaq1B/LmtF2wQFOFOSsK2jdE0RZ3a0zHn4QA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.62.4.tgz", + "integrity": "sha512-nWeM//hxv8mIo6jD7Hu4o48DVmV9pbV6gsKaWU+4NFyqHoPKwrkRiZGLKUhOBk8qNmDmpwFtPKg80Bo/Tn4xiQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "peer": true + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.62.4.tgz", + "integrity": "sha512-s62SQ/vgsRSvMwDkOEfTqfgASF0f26ZNaQuTA6Aok5lrikf89yI2W0gFHvZb2Jpgc6N8JnOKZgCK2iciO3CsxQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "peer": true + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.62.4.tgz", + "integrity": "sha512-J6wGf8TVGbXJq+HH+ttTvrcfNKPbuZecV6KT1B8I18BC5IURUh5kl4Yl5OEP5eFIUoI5BWxCsyYMhFsDx8kekw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.62.4.tgz", + "integrity": "sha512-zmfrQd/0wu6oJs8Vq8KwY/YtsKSsLtKe/HwAP4Wqy8LhWjeT55fHRAkOhYQ12wI3ayS4Tt12d5CDRD7N96SAYQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.62.4.tgz", + "integrity": "sha512-qPzHqdj9rfUD+w79dtE07zi/kFwKyCJqplp5K5ygeLTp7jLpAoc16OAH39HSmRC9UpozaecsleI8uAdEj6v2yw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.62.4.tgz", + "integrity": "sha512-zD6NdeWEByGE9QF9vCrlJ5YQB4oq9q91kPZS37Jwj5hOkvR1lTBSpsKhKDw4IJtbQ35LsTS1HD9DZYGKIshU1Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true + }, + "node_modules/@sveltejs/acorn-typescript": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@sveltejs/acorn-typescript/-/acorn-typescript-1.0.11.tgz", + "integrity": "sha512-LFuZUkjJ9iF7JZye/aG5XM0SFcQ5VyL0oVX4WJ9dc0Va3R3s0OauX1BESVCb+YN/ol8TAfqGDDAQsTG627Y5kw==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^8.9.0" + } + }, + "node_modules/@sveltejs/load-config": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@sveltejs/load-config/-/load-config-0.2.1.tgz", + "integrity": "sha512-5m3B2cbqQ4TbwW6Xkh66Ntw6dD7gNc77cCxABTTesWcq9jxIzMgTk97pZx5vEtvQx8iokgi7GIphqZe+PGwcZA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18.0.0" + } + }, + "node_modules/@sveltejs/package": { + "version": "2.5.8", + "resolved": "https://registry.npmjs.org/@sveltejs/package/-/package-2.5.8.tgz", + "integrity": "sha512-zeBbsXYvHiBu56v4gJaGQoEHzg96w0E1j3dOMX8vo56s6vI5eQ57ZEZhudjwjnegnVitRRu5MrmhO0eNvaonIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^5.0.0", + "kleur": "^4.1.5", + "sade": "^1.8.1", + "semver": "^7.5.4", + "svelte2tsx": "~0.7.55" + }, + "bin": { + "svelte-package": "svelte-package.js" + }, + "engines": { + "node": "^16.14 || >=18" + }, + "peerDependencies": { + "svelte": "^3.44.0 || ^4.0.0 || ^5.0.0-next.1" + } + }, + "node_modules/@sveltejs/vite-plugin-svelte": { + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-6.2.4.tgz", + "integrity": "sha512-ou/d51QSdTyN26D7h6dSpusAKaZkAiGM55/AKYi+9AGZw7q85hElbjK3kEyzXHhLSnRISHOYzVge6x0jRZ7DXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sveltejs/vite-plugin-svelte-inspector": "^5.0.0", + "deepmerge": "^4.3.1", + "magic-string": "^0.30.21", + "obug": "^2.1.0", + "vitefu": "^1.1.1" + }, + "engines": { + "node": "^20.19 || ^22.12 || >=24" + }, + "peerDependencies": { + "svelte": "^5.0.0", + "vite": "^6.3.0 || ^7.0.0" + } + }, + "node_modules/@sveltejs/vite-plugin-svelte-inspector": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-5.0.2.tgz", + "integrity": "sha512-TZzRTcEtZffICSAoZGkPSl6Etsj2torOVrx6Uw0KpXxrec9Gg6jFWQ60Q3+LmNGfZSxHRCZL7vXVZIWmuV50Ig==", + "dev": true, + "license": "MIT", + "dependencies": { + "obug": "^2.1.0" + }, + "engines": { + "node": "^20.19 || ^22.12 || >=24" + }, + "peerDependencies": { + "@sveltejs/vite-plugin-svelte": "^6.0.0-next.0", + "svelte": "^5.0.0", + "vite": "^6.3.0 || ^7.0.0" + } + }, + "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/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "dev": true, + "license": "MIT" + }, + "node_modules/acorn": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", + "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/aria-query": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.1.tgz", + "integrity": "sha512-Z/ZeOgVl7bcSYZ/u/rh0fOpvEpq//LZmdbkXyc7syVzjPAhfOa9ebsdTSjEBDU4vs5nC98Kfduj1uFo0qyET3g==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/axobject-query": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", + "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/better-path-resolve": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/better-path-resolve/-/better-path-resolve-1.0.0.tgz", + "integrity": "sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-windows": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chardet": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.2.0.tgz", + "integrity": "sha512-rddelWYNPRrXq6PtNEN2S3f6t9ILzvqaN5pVgi4kqt9jHQaXIial9PznB5iSPVlQSLNaaH22ItWz3EJtQ10+OA==", + "dev": true, + "license": "MIT" + }, + "node_modules/chokidar": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz", + "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^5.0.0" + }, + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/dedent-js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dedent-js/-/dedent-js-1.0.1.tgz", + "integrity": "sha512-OUepMozQULMLUmhxS95Vudo0jb0UchLimi3+pQ2plj61Fcy8axbP9hbiD4Sz6DPqn6XG3kfmziVfQ1rSys5AJQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/detect-indent": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", + "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/devalue": { + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.9.0.tgz", + "integrity": "sha512-RWrqdArjvPbsATEhOPUo6Wndc/iWnkWKlhIrdlF3zMMYo/c3CVtoaVAyLtWxz5h8nSlkHzxnzV2uLydPXmtF+A==", + "dev": true, + "license": "MIT" + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/esbuild": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.1.tgz", + "integrity": "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "peer": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.1", + "@esbuild/android-arm": "0.28.1", + "@esbuild/android-arm64": "0.28.1", + "@esbuild/android-x64": "0.28.1", + "@esbuild/darwin-arm64": "0.28.1", + "@esbuild/darwin-x64": "0.28.1", + "@esbuild/freebsd-arm64": "0.28.1", + "@esbuild/freebsd-x64": "0.28.1", + "@esbuild/linux-arm": "0.28.1", + "@esbuild/linux-arm64": "0.28.1", + "@esbuild/linux-ia32": "0.28.1", + "@esbuild/linux-loong64": "0.28.1", + "@esbuild/linux-mips64el": "0.28.1", + "@esbuild/linux-ppc64": "0.28.1", + "@esbuild/linux-riscv64": "0.28.1", + "@esbuild/linux-s390x": "0.28.1", + "@esbuild/linux-x64": "0.28.1", + "@esbuild/netbsd-arm64": "0.28.1", + "@esbuild/netbsd-x64": "0.28.1", + "@esbuild/openbsd-arm64": "0.28.1", + "@esbuild/openbsd-x64": "0.28.1", + "@esbuild/openharmony-arm64": "0.28.1", + "@esbuild/sunos-x64": "0.28.1", + "@esbuild/win32-arm64": "0.28.1", + "@esbuild/win32-ia32": "0.28.1", + "@esbuild/win32-x64": "0.28.1" + } + }, + "node_modules/esm-env": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.2.2.tgz", + "integrity": "sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esrap": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/esrap/-/esrap-2.3.0.tgz", + "integrity": "sha512-GQ/7RN8uOtEfNpzZzBMTzW9JBcX42oaSVtPzdF+6cEL8pqIL094iUpr9jzYGn4O4P/1S60dJ6izyT8F4LYARng==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "peerDependencies": { + "@typescript-eslint/types": "^8.2.0" + }, + "peerDependenciesMeta": { + "@typescript-eslint/types": { + "optional": true + } + } + }, + "node_modules/extendable-error": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/extendable-error/-/extendable-error-0.1.7.tgz", + "integrity": "sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fastq": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", + "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "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/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "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" + ], + "peer": true, + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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/human-id": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/human-id/-/human-id-4.2.0.tgz", + "integrity": "sha512-K3GbkIWqyvvlpfhBPlbEvD97TtqBpAYA4kt+cn2lD2x2HuohzZCibcA2nOlnJT6exqvJLggoB5nv2dNf192nEA==", + "dev": true, + "license": "MIT", + "bin": { + "human-id": "dist/cli.js" + } + }, + "node_modules/iconv-lite": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.3.tgz", + "integrity": "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-reference": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.3.tgz", + "integrity": "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.6" + } + }, + "node_modules/is-subdir": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-subdir/-/is-subdir-1.2.0.tgz", + "integrity": "sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==", + "dev": true, + "license": "MIT", + "dependencies": { + "better-path-resolve": "1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/js-yaml": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz", + "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/locate-character": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz", + "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==", + "dev": true, + "license": "MIT" + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash.startcase": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", + "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==", + "dev": true, + "license": "MIT" + }, + "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/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/nanoid": { + "version": "3.3.17", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.17.tgz", + "integrity": "sha512-xQLf0A3HOMlgHq0n247/LRuAOYmB7dXJ/DvAxGvsSBij45XtBSmQycu+F8ODbHwns/XyFZagyL1+J0Offw1E0g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "peer": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "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/outdent": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/outdent/-/outdent-0.5.0.tgz", + "integrity": "sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/p-filter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-2.1.0.tgz", + "integrity": "sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-map": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/package-manager-detector": { + "version": "0.2.11", + "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-0.2.11.tgz", + "integrity": "sha512-BEnLolu+yuz22S56CU1SUKq3XC3PkwD5wv4ikR4MfGvnRVcmzXR9DwSlW2fEamyTPyXHomBJRzgapeuBvRNzJQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "quansync": "^0.2.7" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/pg": { + "version": "8.22.0", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.22.0.tgz", + "integrity": "sha512-8wih1vVIBMxoUM2oB4soJsD9tDnDpLv4OXBJ+EJzFsvycD+lfyIreC2gGHq78f8jbLLt+bvlPTFdFZfJkOuzAA==", + "license": "MIT", + "dependencies": { + "pg-connection-string": "^2.14.0", + "pg-pool": "^3.14.0", + "pg-protocol": "^1.15.0", + "pg-types": "2.2.0", + "pgpass": "1.0.5" + }, + "engines": { + "node": ">= 16.0.0" + }, + "optionalDependencies": { + "pg-cloudflare": "^1.4.0" + }, + "peerDependencies": { + "pg-native": ">=3.0.1" + }, + "peerDependenciesMeta": { + "pg-native": { + "optional": true + } + } + }, + "node_modules/pg-cloudflare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.4.0.tgz", + "integrity": "sha512-Vo7z/6rrQYxpNRylp4Tlob2elzbh+N/MOQbxFVWCxS7oEx6jF53GTJFxK2WWpKuBRkmiin4Mt+xofFDjx09R0A==", + "license": "MIT", + "optional": true + }, + "node_modules/pg-connection-string": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.14.0.tgz", + "integrity": "sha512-XwWDGcLRGCXAR8F/AM5bG7Q+A3Wm2s6QeEjlOKZLlH3UYcguiqCWKyWXVag5TLTIjR7oOJUY8kcADaZgWPyLeg==", + "license": "MIT" + }, + "node_modules/pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", + "license": "ISC", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/pg-pool": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.14.0.tgz", + "integrity": "sha512-gKtPkFdQPU3DksooVLi9LsjZxrsBUZIpa+7aVx+LV5pNh0KzP4Zleud2po+ConrxbuXGBJ6Hfer6hdgpIBpBaw==", + "license": "MIT", + "peerDependencies": { + "pg": ">=8.0" + } + }, + "node_modules/pg-protocol": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.15.0.tgz", + "integrity": "sha512-cq9sECI5s0+uPUXjbz8ioyPJni6RzsRib0US67i5IoTZKw8fNeYlVE7u8F4dG7vEJJtc5wdD1K189lCCUwqWTQ==", + "license": "MIT" + }, + "node_modules/pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "license": "MIT", + "dependencies": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pgpass": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", + "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", + "license": "MIT", + "dependencies": { + "split2": "^4.1.0" + } + }, + "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", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/postcss": { + "version": "8.5.25", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.25.tgz", + "integrity": "sha512-DTPx3RWSSnWyzLxQnlH0rJP+EW5ekl16ZU4/psbIhA0e53kJfdgaN5vKM+xP7yJtXVu+nfdVFmlgFDEKAe4Pyw==", + "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", + "peer": true, + "dependencies": { + "nanoid": "^3.3.16", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/postgres-bytea": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.1.tgz", + "integrity": "sha512-5+5HqXnsZPE65IJZSMkZtURARZelel2oXUEO8rH83VS/hxH5vv1uHquPg5wZs8yMAfdv971IU+kcPUczi7NVBQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "license": "MIT", + "dependencies": { + "xtend": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/quansync": { + "version": "0.2.11", + "resolved": "https://registry.npmjs.org/quansync/-/quansync-0.2.11.tgz", + "integrity": "sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/antfu" + }, + { + "type": "individual", + "url": "https://github.com/sponsors/sxzz" + } + ], + "license": "MIT" + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "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/read-yaml-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-yaml-file/-/read-yaml-file-1.1.0.tgz", + "integrity": "sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.5", + "js-yaml": "^3.6.1", + "pify": "^4.0.1", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/read-yaml-file/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/read-yaml-file/node_modules/js-yaml": { + "version": "3.15.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.1.tgz", + "integrity": "sha512-S99WuO3HlhO3XN41EtYUNl9zzXjoJx7QvmipxsJVxtCBT0YHEFy+iOJhjSvrmV12nYhWpZaM8lPHkJm0yUMbag==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/readdirp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.0.0.tgz", + "integrity": "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "4.62.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.62.4.tgz", + "integrity": "sha512-RXOqwaPsBGjMNMa4sQjDjHieHEZDFoj/Rdr46l2MU5DfEs16wHJPC2RPTPHWhNl+M3aI472LLqFkFKut4SblOg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/estree": "1.0.9" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@napi-rs/lzma-linux-x64-gnu": "1.5.1", + "@rollup/rollup-android-arm-eabi": "4.62.4", + "@rollup/rollup-android-arm64": "4.62.4", + "@rollup/rollup-darwin-arm64": "4.62.4", + "@rollup/rollup-darwin-x64": "4.62.4", + "@rollup/rollup-freebsd-arm64": "4.62.4", + "@rollup/rollup-freebsd-x64": "4.62.4", + "@rollup/rollup-linux-arm-gnueabihf": "4.62.4", + "@rollup/rollup-linux-arm-musleabihf": "4.62.4", + "@rollup/rollup-linux-arm64-gnu": "4.62.4", + "@rollup/rollup-linux-arm64-musl": "4.62.4", + "@rollup/rollup-linux-loong64-gnu": "4.62.4", + "@rollup/rollup-linux-loong64-musl": "4.62.4", + "@rollup/rollup-linux-ppc64-gnu": "4.62.4", + "@rollup/rollup-linux-ppc64-musl": "4.62.4", + "@rollup/rollup-linux-riscv64-gnu": "4.62.4", + "@rollup/rollup-linux-riscv64-musl": "4.62.4", + "@rollup/rollup-linux-s390x-gnu": "4.62.4", + "@rollup/rollup-linux-x64-gnu": "4.62.4", + "@rollup/rollup-linux-x64-musl": "4.62.4", + "@rollup/rollup-openbsd-x64": "4.62.4", + "@rollup/rollup-openharmony-arm64": "4.62.4", + "@rollup/rollup-win32-arm64-msvc": "4.62.4", + "@rollup/rollup-win32-ia32-msvc": "4.62.4", + "@rollup/rollup-win32-x64-gnu": "4.62.4", + "@rollup/rollup-win32-x64-msvc": "4.62.4", + "fsevents": "~2.3.2" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "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": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/sade": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", + "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "mri": "^1.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "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/scule": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/scule/-/scule-1.3.0.tgz", + "integrity": "sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==", + "dev": true, + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "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", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/spawndamnit": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spawndamnit/-/spawndamnit-3.0.1.tgz", + "integrity": "sha512-MmnduQUuHCoFckZoWnXsTg7JaiLBJrKFj9UI2MbRPGaJeVpsLcVBu6P/IGZovziM/YBsellCmsprgNA+w0CzVg==", + "dev": true, + "license": "SEE LICENSE IN LICENSE", + "dependencies": { + "cross-spawn": "^7.0.5", + "signal-exit": "^4.0.1" + } + }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "license": "ISC", + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/svelte": { + "version": "5.56.8", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.56.8.tgz", + "integrity": "sha512-PY8LOw7xP6c8IOiVqdo0sbbZVYhXRSfklOQLAUyGBKqjTX0wx/z4l/9J+PmBpmlLnxzEb1NqltxQ5/wZme/Cmg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.4", + "@jridgewell/sourcemap-codec": "^1.5.0", + "@sveltejs/acorn-typescript": "^1.0.10", + "@types/estree": "^1.0.5", + "@types/trusted-types": "^2.0.7", + "acorn": "^8.12.1", + "aria-query": "5.3.1", + "axobject-query": "^4.1.0", + "clsx": "^2.1.1", + "devalue": "^5.8.1", + "esm-env": "^1.2.1", + "esrap": "^2.2.12", + "is-reference": "^3.0.3", + "locate-character": "^3.0.0", + "magic-string": "^0.30.11", + "zimmerframe": "^1.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/svelte-check": { + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.7.4.tgz", + "integrity": "sha512-IW9ot9YqAoyv8FvyN+eb4ZTe8zgcKZrJLNYU6dzSKkGwEBsSPc4K7lmQ8bKn8W2YMXM6WDfZSSVOaGtekyUfOQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.25", + "@sveltejs/load-config": "^0.2.1", + "chokidar": "^4.0.1", + "fdir": "^6.2.0", + "picocolors": "^1.0.0", + "sade": "^1.7.4" + }, + "bin": { + "svelte-check": "bin/svelte-check" + }, + "engines": { + "node": ">= 18.0.0" + }, + "peerDependencies": { + "svelte": "^4.0.0 || ^5.0.0-next.0", + "typescript": "^5.0.0 || ^6.0.0" + } + }, + "node_modules/svelte-check/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", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/svelte-check/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", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/svelte2tsx": { + "version": "0.7.59", + "resolved": "https://registry.npmjs.org/svelte2tsx/-/svelte2tsx-0.7.59.tgz", + "integrity": "sha512-Itj7Wz9WIiGFl/uJa58+rf43ajezaljKK/KTOHq5abUjto56xe+o5SOzLwSoeJ5hma9NZEstpZiazFW2q1nZPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "dedent-js": "^1.0.1", + "scule": "^1.3.0" + }, + "peerDependencies": { + "svelte": "^3.55 || ^4.0.0-next.0 || ^4.0 || ^5.0.0-next.0", + "typescript": "^4.9.4 || ^5.0.0 || ^6.0.0" + } + }, + "node_modules/term-size": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", + "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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", + "peer": true, + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/vite": { + "version": "7.3.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.6.tgz", + "integrity": "sha512-4XP60spRGjSZFf1qYH+dJIkK2znL3zQfl9KkOV9MkkRR/3Dls0dxaBsQPTloEc5BLXWPL9vsOxopxyKoMmDueg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "esbuild": "^0.27.0 || ^0.28.0", + "fdir": "^6.5.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.43.0", + "tinyglobby": "^0.2.15" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "lightningcss": "^1.21.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vitefu": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.1.3.tgz", + "integrity": "sha512-ub4okH7Z5KLjb6hDyjqrGXqWtWvoYdU3IGm/NorpgHncKoLTCfRIbvlhBm7r0YstIaQRYlp4yEbFqDcKSzXSSg==", + "dev": true, + "license": "MIT", + "workspaces": [ + "tests/deps/*", + "tests/projects/*", + "tests/projects/workspace/packages/*" + ], + "peerDependencies": { + "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "vite": { + "optional": true + } + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/zimmerframe": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/zimmerframe/-/zimmerframe-1.1.4.tgz", + "integrity": "sha512-B58NGBEoc8Y9MWWCQGl/gq9xBCe4IiKM0a2x7GZdQKOW5Exr8S1W24J6OgM1njK8xCRGvAJIL/MxXHf6SkmQKQ==", + "dev": true, + "license": "MIT" + }, + "packages/design-tokens": { + "name": "@gabriel20xx/design-tokens", + "version": "0.1.0", + "license": "MIT" + }, + "packages/node-backend": { + "name": "@gabriel20xx/node-backend", + "version": "0.1.0", + "license": "MIT", + "dependencies": { + "pg": "^8.17.2" + }, + "engines": { + "node": ">=20" + } + }, + "packages/web-ui": { + "name": "@gabriel20xx/web-ui", + "version": "0.1.0", + "license": "MIT", + "dependencies": { + "@gabriel20xx/design-tokens": "0.1.0" + }, + "devDependencies": { + "@sveltejs/package": "^2.5.0", + "@sveltejs/vite-plugin-svelte": "^6.0.0", + "svelte": "^5.0.0", + "svelte-check": "^4.0.0", + "typescript": "^5.0.0" + }, + "peerDependencies": { + "svelte": "^5.0.0" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..7a56557 --- /dev/null +++ b/package.json @@ -0,0 +1,20 @@ +{ + "name": "@gabriel20xx/shared-workspace", + "private": true, + "type": "module", + "workspaces": [ + "packages/*" + ], + "scripts": { + "check": "npm run check --workspace=@gabriel20xx/web-ui", + "build": "npm run package --workspace=@gabriel20xx/web-ui", + "package": "npm run package --workspace=@gabriel20xx/web-ui", + "test:node-backend": "npm test --workspace=@gabriel20xx/node-backend", + "changeset": "changeset", + "version-packages": "changeset version", + "release": "npm run build && npm run test:node-backend && changeset publish" + }, + "devDependencies": { + "@changesets/cli": "^2.29.8" + } +} diff --git a/packages/design-tokens/README.md b/packages/design-tokens/README.md new file mode 100644 index 0000000..b6acf74 --- /dev/null +++ b/packages/design-tokens/README.md @@ -0,0 +1,3 @@ +# `@gabriel20xx/design-tokens` + +The package exports `theme.css`. Import it directly when an application needs only the shared tokens, or use `@gabriel20xx/web-ui/styles.css`, which imports it automatically. diff --git a/packages/design-tokens/package.json b/packages/design-tokens/package.json new file mode 100644 index 0000000..0e94e16 --- /dev/null +++ b/packages/design-tokens/package.json @@ -0,0 +1,17 @@ +{ + "name": "@gabriel20xx/design-tokens", + "version": "0.1.0", + "description": "Shared visual tokens for Gabriel20xx web projects.", + "license": "MIT", + "files": [ + "theme.css", + "README.md" + ], + "exports": { + ".": { + "default": "./theme.css" + }, + "./theme.css": "./theme.css", + "./package.json": "./package.json" + } +} diff --git a/packages/design-tokens/theme.css b/packages/design-tokens/theme.css new file mode 100644 index 0000000..752decc --- /dev/null +++ b/packages/design-tokens/theme.css @@ -0,0 +1,68 @@ +:root, +[data-theme='dark'] { + color-scheme: dark; + --sc-bg: #0b1020; + --sc-surface: #121a2d; + --sc-surface-raised: #18233b; + --sc-surface-hover: #202d49; + --sc-border: #2d3b59; + --sc-border-strong: #405273; + --sc-fg: #f4f7fb; + --sc-muted-fg: #a8b4c7; + --sc-subtle-fg: #74839d; + --sc-primary: #7c9cff; + --sc-primary-hover: #94adff; + --sc-primary-fg: #081127; + --sc-secondary: #253452; + --sc-secondary-hover: #304363; + --sc-secondary-fg: #e8eefb; + --sc-accent: #61d5c7; + --sc-accent-fg: #06201d; + --sc-danger: #ef767a; + --sc-danger-hover: #f58d90; + --sc-danger-fg: #2d0809; + --sc-success: #70d69d; + --sc-success-fg: #062012; + --sc-warning: #f3c969; + --sc-warning-fg: #241a02; + --sc-ring: #9fb4ff; + --sc-backdrop: rgb(2 6 23 / 72%); + --sc-radius-sm: 0.375rem; + --sc-radius-md: 0.625rem; + --sc-radius-lg: 0.875rem; + --sc-radius-xl: 1.125rem; + --sc-font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; + --sc-font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace; + --sc-shadow-sm: 0 2px 8px rgb(0 0 0 / 14%); + --sc-shadow-lg: 0 20px 60px rgb(0 0 0 / 32%); +} + +[data-theme='light'] { + color-scheme: light; + --sc-bg: #f5f7fb; + --sc-surface: #ffffff; + --sc-surface-raised: #ffffff; + --sc-surface-hover: #eef2f8; + --sc-border: #d7deea; + --sc-border-strong: #b7c2d4; + --sc-fg: #172033; + --sc-muted-fg: #53627a; + --sc-subtle-fg: #74839d; + --sc-primary: #466ee8; + --sc-primary-hover: #345bd4; + --sc-primary-fg: #ffffff; + --sc-secondary: #e7edf8; + --sc-secondary-hover: #dbe4f3; + --sc-secondary-fg: #1d2b44; + --sc-accent: #168f83; + --sc-accent-fg: #ffffff; + --sc-danger: #cf3d45; + --sc-danger-hover: #b93139; + --sc-danger-fg: #ffffff; + --sc-success: #208751; + --sc-success-fg: #ffffff; + --sc-warning: #a66e00; + --sc-warning-fg: #ffffff; + --sc-ring: #466ee8; + --sc-backdrop: rgb(15 23 42 / 42%); +} diff --git a/packages/node-backend/README.md b/packages/node-backend/README.md new file mode 100644 index 0000000..4af088f --- /dev/null +++ b/packages/node-backend/README.md @@ -0,0 +1,19 @@ +# `@gabriel20xx/node-backend` + +Shared Node.js backend infrastructure for services that use PostgreSQL: + +- validated `DATABASE_URL` and pool settings; +- one pool owner with startup retry, transient query retry, transactions, and shutdown; +- PBKDF2 password hashing and secure session-token helpers; +- common account/session persistence; +- transaction-locked ordered migrations. + +The package does not depend on Express. Each service keeps its own routes, +cookies, roles, validation policy, and domain repositories. Existing +`MediaShared` code can be migrated into this package incrementally; keep the +legacy package as a compatibility layer until every consumer has moved. + +Pass a service-specific `tableName` to `runMigrations` when multiple services +share one PostgreSQL database, so their migration histories cannot collide. + +Run `npm test` from this package or `npm run test --workspace=@gabriel20xx/node-backend` from `SharedCode`. diff --git a/packages/node-backend/package.json b/packages/node-backend/package.json new file mode 100644 index 0000000..02c7a59 --- /dev/null +++ b/packages/node-backend/package.json @@ -0,0 +1,29 @@ +{ + "name": "@gabriel20xx/node-backend", + "version": "0.1.0", + "description": "Shared PostgreSQL, configuration, migration, and authentication primitives for Node.js services.", + "license": "MIT", + "type": "module", + "files": [ + "src", + "test", + "README.md" + ], + "exports": { + ".": "./src/index.js", + "./config": "./src/config.js", + "./db": "./src/db.js", + "./auth": "./src/auth.js", + "./migrate": "./src/migrate.js", + "./package.json": "./package.json" + }, + "dependencies": { + "pg": "^8.17.2" + }, + "scripts": { + "test": "node --test" + }, + "engines": { + "node": ">=20" + } +} diff --git a/packages/node-backend/src/auth.js b/packages/node-backend/src/auth.js new file mode 100644 index 0000000..9b5ac70 --- /dev/null +++ b/packages/node-backend/src/auth.js @@ -0,0 +1,153 @@ +import crypto from 'node:crypto'; + +const PASSWORD_ITERATIONS = 100000; +const PASSWORD_KEY_LENGTH = 32; +const PASSWORD_DIGEST = 'sha256'; + +export const AUTH_SCHEMA = ` +CREATE TABLE IF NOT EXISTS auth_users ( + id BIGSERIAL PRIMARY KEY, + username TEXT NOT NULL UNIQUE, + email TEXT NOT NULL DEFAULT '', + password_hash TEXT NOT NULL, + created_at TIMESTAMPTZ NOT NULL DEFAULT now(), + updated_at TIMESTAMPTZ NOT NULL DEFAULT now() +); +ALTER TABLE auth_users ADD COLUMN IF NOT EXISTS email TEXT NOT NULL DEFAULT ''; +ALTER TABLE auth_users ADD COLUMN IF NOT EXISTS created_at TIMESTAMPTZ NOT NULL DEFAULT now(); +ALTER TABLE auth_users ADD COLUMN IF NOT EXISTS updated_at TIMESTAMPTZ NOT NULL DEFAULT now(); +CREATE UNIQUE INDEX IF NOT EXISTS auth_users_email_idx ON auth_users (lower(email)) WHERE email <> ''; +CREATE TABLE IF NOT EXISTS auth_sessions ( + id BIGSERIAL PRIMARY KEY, + user_id BIGINT NOT NULL REFERENCES auth_users(id) ON DELETE CASCADE, + token_hash TEXT NOT NULL UNIQUE, + expires_at TIMESTAMPTZ NOT NULL, + created_at TIMESTAMPTZ NOT NULL DEFAULT now() +); +CREATE INDEX IF NOT EXISTS auth_sessions_expiry_idx ON auth_sessions (expires_at); +CREATE INDEX IF NOT EXISTS auth_sessions_user_idx ON auth_sessions (user_id); +`; + +export function hashPassword(password, { iterations = PASSWORD_ITERATIONS } = {}) { + if (typeof password !== 'string' || password.length < 8) { + throw new Error('Password must be at least 8 characters'); + } + const salt = crypto.randomBytes(16).toString('hex'); + const hash = crypto.pbkdf2Sync(password, salt, iterations, PASSWORD_KEY_LENGTH, PASSWORD_DIGEST); + return `${salt}:${hash.toString('hex')}`; +} + +export function verifyPassword(password, stored) { + try { + const [salt, expected] = String(stored).split(':'); + if (!salt || !expected) return false; + const actual = crypto.pbkdf2Sync( + String(password), + salt, + PASSWORD_ITERATIONS, + PASSWORD_KEY_LENGTH, + PASSWORD_DIGEST + ); + const expectedBytes = Buffer.from(expected, 'hex'); + return expectedBytes.length === actual.length && crypto.timingSafeEqual(expectedBytes, actual); + } catch { + return false; + } +} + +export function createSessionToken() { + const token = crypto.randomBytes(32).toString('base64url'); + return { token, tokenHash: hashToken(token) }; +} + +export function hashToken(token) { + return crypto.createHash('sha256').update(String(token)).digest('hex'); +} + +/** Persistence-only auth store; cookies, roles, and HTTP policy stay in the app. */ +export class AuthStore { + constructor(database, { singleUser = true } = {}) { + if (!database || typeof database.query !== 'function') { + throw new TypeError('AuthStore requires a Database-like query object'); + } + this.database = database; + this.singleUser = singleUser; + } + + async ensureSchema() { + await this.database.query(AUTH_SCHEMA); + if (this.singleUser) { + await this.database.query('CREATE UNIQUE INDEX IF NOT EXISTS auth_users_singleton_idx ON auth_users ((true))'); + } + } + + async countUsers() { + const result = await this.database.query('SELECT count(*)::int AS count FROM auth_users'); + return result.rows[0].count; + } + + async createUser(username, email, passwordHash) { + try { + const result = await this.database.query( + `INSERT INTO auth_users (username, email, password_hash, updated_at) + VALUES ($1, $2, $3, now()) + RETURNING id, username, email, password_hash, created_at, updated_at`, + [username, email, passwordHash] + ); + return result.rows[0]; + } catch (error) { + if (error?.code === '23505') { + const duplicate = new Error('auth user already exists'); + duplicate.code = 'AUTH_USER_EXISTS'; + throw duplicate; + } + throw error; + } + } + + async findByIdentifier(identifier) { + const result = await this.database.query( + `SELECT id, username, email, password_hash, created_at, updated_at + FROM auth_users WHERE username = $1 OR lower(email) = lower($1)`, + [identifier] + ); + return result.rows[0] || null; + } + + async updateCredentials(id, username, email, passwordHash) { + await this.database.query( + `UPDATE auth_users SET username = $1, email = $2, password_hash = $3, updated_at = now() + WHERE id = $4`, + [username, email, passwordHash, id] + ); + } + + async createSession(userId, tokenHash, expiresAt) { + await this.database.query( + 'INSERT INTO auth_sessions (user_id, token_hash, expires_at) VALUES ($1, $2, $3)', + [userId, tokenHash, expiresAt] + ); + } + + async findSessionUser(tokenHash) { + const result = await this.database.query( + `SELECT u.id, u.username, u.email, u.password_hash, u.created_at, u.updated_at + FROM auth_sessions s JOIN auth_users u ON u.id = s.user_id + WHERE s.token_hash = $1 AND s.expires_at > now()`, + [tokenHash] + ); + return result.rows[0] || null; + } + + async deleteSession(tokenHash) { + await this.database.query('DELETE FROM auth_sessions WHERE token_hash = $1', [tokenHash]); + } + + async deleteSessionsForUser(userId) { + await this.database.query('DELETE FROM auth_sessions WHERE user_id = $1', [userId]); + } + + async pruneExpiredSessions() { + await this.database.query('DELETE FROM auth_sessions WHERE expires_at < now()'); + } +} diff --git a/packages/node-backend/src/config.js b/packages/node-backend/src/config.js new file mode 100644 index 0000000..804d120 --- /dev/null +++ b/packages/node-backend/src/config.js @@ -0,0 +1,55 @@ +const DEFAULTS = Object.freeze({ + max: 20, + min: 0, + connectionTimeoutMillis: 5000, + idleTimeoutMillis: 30000, + queryTimeout: 15000, +}); + +function positiveInt(value, fallback, minimum = 0) { + const parsed = Number.parseInt(String(value ?? ''), 10); + return Number.isInteger(parsed) && parsed >= minimum ? parsed : fallback; +} + +/** Return DATABASE_URL or throw an actionable startup error. */ +export function databaseUrlFromEnv(env = process.env) { + const url = String(env.DATABASE_URL || '').trim(); + if (!url) { + const error = new Error('DATABASE_URL is required'); + error.code = 'DB_NOT_CONFIGURED'; + throw error; + } + return url; +} + +/** Build a pg.Pool-compatible configuration from environment variables. */ +export function databaseConfigFromEnv(env = process.env) { + const max = positiveInt(env.DATABASE_MAX_CONNS, DEFAULTS.max, 1); + const min = positiveInt(env.DATABASE_MIN_CONNS, DEFAULTS.min, 0); + if (min > max) { + throw new Error('DATABASE_MIN_CONNS must not exceed DATABASE_MAX_CONNS'); + } + + return { + connectionString: databaseUrlFromEnv(env), + max, + min, + connectionTimeoutMillis: positiveInt( + env.DATABASE_CONNECT_TIMEOUT_MS, + DEFAULTS.connectionTimeoutMillis, + 1 + ), + idleTimeoutMillis: positiveInt( + env.DATABASE_IDLE_TIMEOUT_MS, + DEFAULTS.idleTimeoutMillis, + 0 + ), + query_timeout: positiveInt(env.DATABASE_QUERY_TIMEOUT_MS, DEFAULTS.queryTimeout, 1), + ssl: + /^(true|require|1)$/i.test(String(env.DATABASE_SSL || '')) + ? { rejectUnauthorized: !/^(true|1)$/i.test(String(env.DATABASE_SSL_ALLOW_INVALID || '')) } + : undefined, + }; +} + +export { DEFAULTS as DATABASE_DEFAULTS }; diff --git a/packages/node-backend/src/db.js b/packages/node-backend/src/db.js new file mode 100644 index 0000000..405dc4c --- /dev/null +++ b/packages/node-backend/src/db.js @@ -0,0 +1,92 @@ +import pg from 'pg'; +import { databaseConfigFromEnv } from './config.js'; + +const { Pool } = pg; + +const TRANSIENT_CODES = new Set(['ECONNRESET', 'EPIPE', '57P01', '08006', '08003']); +const TRANSIENT_MESSAGE = /connection terminated|connection reset|econnreset|epipe|server closed the connection/i; + +export function isTransientConnectionError(error) { + return Boolean( + error && + (TRANSIENT_CODES.has(error.code) || TRANSIENT_MESSAGE.test(String(error.message || ''))) + ); +} + +/** + * Owns one pg pool and exposes bounded startup, retry, transaction, and + * shutdown behavior. Domain repositories should depend on this abstraction + * instead of creating independent pools. + */ +export class Database { + constructor(options = {}) { + const { pool, ...poolOptions } = options; + this.pool = pool || new Pool(poolOptions); + this.ownsPool = !pool; + this.ready = false; + } + + static fromEnv(env = process.env) { + return new Database(databaseConfigFromEnv(env)); + } + + async connect({ retries = 10, retryDelayMs = 2000 } = {}) { + if (this.ready) return this; + + let lastError; + for (let attempt = 1; attempt <= Math.max(1, retries); attempt += 1) { + try { + await this.pool.query('SELECT 1'); + this.ready = true; + return this; + } catch (error) { + lastError = error; + if (attempt >= retries || !isTransientConnectionError(error)) throw error; + const delay = Math.min(Math.max(100, retryDelayMs) * 2 ** (attempt - 1), 30000); + await new Promise(resolve => setTimeout(resolve, delay)); + } + } + throw lastError; + } + + async query(text, values = []) { + await this.connect(); + try { + return await this.pool.query(text, values); + } catch (error) { + if (!isTransientConnectionError(error)) throw error; + return this.pool.query(text, values); + } + } + + async transaction(callback) { + if (typeof callback !== 'function') throw new TypeError('transaction callback is required'); + await this.connect(); + const client = await this.pool.connect(); + try { + await client.query('BEGIN'); + const result = await callback(client); + await client.query('COMMIT'); + return result; + } catch (error) { + try { + await client.query('ROLLBACK'); + } catch { + // Preserve the original application error. + } + throw error; + } finally { + client.release(); + } + } + + async close() { + if (!this.pool || !this.ownsPool) return; + await this.pool.end(); + this.ready = false; + } +} + +export function createDatabaseFromEnv(env = process.env) { + return Database.fromEnv(env); +} diff --git a/packages/node-backend/src/index.js b/packages/node-backend/src/index.js new file mode 100644 index 0000000..8516455 --- /dev/null +++ b/packages/node-backend/src/index.js @@ -0,0 +1,19 @@ +export { + databaseConfigFromEnv, + databaseUrlFromEnv, + DATABASE_DEFAULTS, +} from './config.js'; +export { + Database, + createDatabaseFromEnv, + isTransientConnectionError, +} from './db.js'; +export { + AUTH_SCHEMA, + AuthStore, + createSessionToken, + hashPassword, + hashToken, + verifyPassword, +} from './auth.js'; +export { runMigrations } from './migrate.js'; diff --git a/packages/node-backend/src/migrate.js b/packages/node-backend/src/migrate.js new file mode 100644 index 0000000..cb2d14f --- /dev/null +++ b/packages/node-backend/src/migrate.js @@ -0,0 +1,42 @@ +/** + * Apply ordered SQL migrations using the shared Database transaction wrapper. + * Each migration is { id: string, up: async (client) => void }. + */ +export async function runMigrations( + database, + migrations, + { lockKey = 70420320, tableName = 'schema_migrations' } = {} +) { + if (!database || typeof database.transaction !== 'function') { + throw new TypeError('runMigrations requires a Database-like transaction object'); + } + if (!Array.isArray(migrations)) throw new TypeError('migrations must be an array'); + if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(tableName)) { + throw new TypeError('migration tableName must be a simple SQL identifier'); + } + const table = `"${tableName}"`; + + const ordered = [...migrations].sort((left, right) => String(left.id).localeCompare(String(right.id))); + await database.transaction(async client => { + await client.query('SELECT pg_advisory_xact_lock($1)', [lockKey]); + await client.query(` + CREATE TABLE IF NOT EXISTS ${table} ( + id TEXT PRIMARY KEY, + applied_at TIMESTAMPTZ NOT NULL DEFAULT now() + ) + `); + + for (const migration of ordered) { + if (!migration?.id || typeof migration.up !== 'function') { + throw new TypeError('each migration requires an id and up(client) function'); + } + const existing = await client.query( + `SELECT 1 FROM ${table} WHERE id = $1`, + [migration.id] + ); + if (existing.rowCount > 0) continue; + await migration.up(client); + await client.query(`INSERT INTO ${table} (id) VALUES ($1)`, [migration.id]); + } + }); +} diff --git a/packages/node-backend/test/auth.test.js b/packages/node-backend/test/auth.test.js new file mode 100644 index 0000000..f0d3ce6 --- /dev/null +++ b/packages/node-backend/test/auth.test.js @@ -0,0 +1,20 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import { + createSessionToken, + hashPassword, + hashToken, + verifyPassword, +} from '../src/auth.js'; + +test('password hashes verify and reject a different password', () => { + const hash = hashPassword('correct horse battery staple'); + assert.equal(verifyPassword('correct horse battery staple', hash), true); + assert.equal(verifyPassword('wrong password', hash), false); +}); + +test('session token hashes are not the raw token', () => { + const { token, tokenHash } = createSessionToken(); + assert.notEqual(token, tokenHash); + assert.equal(hashToken(token), tokenHash); +}); diff --git a/packages/python-backend/README.md b/packages/python-backend/README.md new file mode 100644 index 0000000..41cb900 --- /dev/null +++ b/packages/python-backend/README.md @@ -0,0 +1,16 @@ +# `gabriel20xx-shared-backend` + +Shared Python backend infrastructure for services using `asyncpg`: + +- validated `DATABASE_URL` and pool settings; +- one async pool owner with ping and graceful shutdown; +- bcrypt password and secure session-token helpers; +- common account/session persistence for the single-admin or optional multi-user model. + +HTTP framework adapters stay in each service. Install this package from the +published index or directly from the SharedCode repository with a subdirectory +install during development: + +```bash +pip install "git+https://repos.gfranz.ch/Gabriel20xx/SharedCode.git@v0.1.0#subdirectory=packages/python-backend" +``` diff --git a/packages/python-backend/pyproject.toml b/packages/python-backend/pyproject.toml new file mode 100644 index 0000000..1679a2e --- /dev/null +++ b/packages/python-backend/pyproject.toml @@ -0,0 +1,18 @@ +[build-system] +requires = ["setuptools>=68"] +build-backend = "setuptools.build_meta" + +[project] +name = "gabriel20xx-shared-backend" +version = "0.1.0" +description = "Shared PostgreSQL and authentication primitives for Python services." +readme = "README.md" +requires-python = ">=3.10" +license = { text = "MIT" } +dependencies = [ + "asyncpg>=0.30", + "bcrypt>=4.2", +] + +[tool.setuptools.packages.find] +where = ["src"] diff --git a/packages/python-backend/src/shared_backend/__init__.py b/packages/python-backend/src/shared_backend/__init__.py new file mode 100644 index 0000000..ae56a19 --- /dev/null +++ b/packages/python-backend/src/shared_backend/__init__.py @@ -0,0 +1,18 @@ +"""Shared PostgreSQL and authentication primitives for Python services.""" + +from .auth import AuthStore, AuthUser, hash_password, verify_password +from .config import DatabaseConfig, database_url_from_env +from .postgres import Database +from .tokens import hash_token, new_session_token + +__all__ = [ + "AuthStore", + "AuthUser", + "Database", + "DatabaseConfig", + "database_url_from_env", + "hash_password", + "hash_token", + "new_session_token", + "verify_password", +] diff --git a/packages/python-backend/src/shared_backend/auth.py b/packages/python-backend/src/shared_backend/auth.py new file mode 100644 index 0000000..88cadec --- /dev/null +++ b/packages/python-backend/src/shared_backend/auth.py @@ -0,0 +1,150 @@ +"""Shared account/session persistence and password helpers.""" + +from __future__ import annotations + +from dataclasses import dataclass +from datetime import datetime + +import asyncpg +import bcrypt + +from .postgres import Database + +_SCHEMA = """ +CREATE TABLE IF NOT EXISTS auth_users ( + id BIGSERIAL PRIMARY KEY, + username TEXT NOT NULL UNIQUE, + email TEXT NOT NULL DEFAULT '', + password_hash TEXT NOT NULL, + created_at TIMESTAMPTZ NOT NULL DEFAULT now(), + updated_at TIMESTAMPTZ NOT NULL DEFAULT now() +); +ALTER TABLE auth_users ADD COLUMN IF NOT EXISTS email TEXT NOT NULL DEFAULT ''; +ALTER TABLE auth_users ADD COLUMN IF NOT EXISTS created_at TIMESTAMPTZ NOT NULL DEFAULT now(); +ALTER TABLE auth_users ADD COLUMN IF NOT EXISTS updated_at TIMESTAMPTZ NOT NULL DEFAULT now(); +CREATE UNIQUE INDEX IF NOT EXISTS auth_users_email_idx ON auth_users (lower(email)) WHERE email <> ''; +CREATE TABLE IF NOT EXISTS auth_sessions ( + id BIGSERIAL PRIMARY KEY, + user_id BIGINT NOT NULL REFERENCES auth_users(id) ON DELETE CASCADE, + token_hash TEXT NOT NULL UNIQUE, + expires_at TIMESTAMPTZ NOT NULL, + created_at TIMESTAMPTZ NOT NULL DEFAULT now() +); +CREATE INDEX IF NOT EXISTS auth_sessions_expiry_idx ON auth_sessions (expires_at); +CREATE INDEX IF NOT EXISTS auth_sessions_user_idx ON auth_sessions (user_id); +""" + + +@dataclass(frozen=True, slots=True) +class AuthUser: + id: int + username: str + email: str + password_hash: str + created_at: datetime | None = None + updated_at: datetime | None = None + + +class UserExistsError(Exception): + """Raised when a user violates a unique or single-user constraint.""" + + +def hash_password(password: str) -> str: + if len(password) < 8: + raise ValueError("Password must be at least 8 characters") + return bcrypt.hashpw(password.encode("utf-8"), bcrypt.gensalt()).decode("utf-8") + + +def verify_password(password: str, stored_hash: str) -> bool: + try: + return bcrypt.checkpw(password.encode("utf-8"), stored_hash.encode("utf-8")) + except (ValueError, TypeError): + return False + + +class AuthStore: + def __init__(self, database: Database, *, single_user: bool = True) -> None: + self.database = database + self.single_user = single_user + + async def ensure_schema(self) -> None: + await self.database.execute(_SCHEMA) + if self.single_user: + await self.database.execute( + "CREATE UNIQUE INDEX IF NOT EXISTS auth_users_singleton_idx ON auth_users ((true))" + ) + + async def count_users(self) -> int: + return int(await self.database.fetchval("SELECT count(*) FROM auth_users")) + + async def create_user(self, username: str, email: str, password_hash: str) -> AuthUser: + try: + row = await self.database.fetchrow( + """ + INSERT INTO auth_users (username, email, password_hash, updated_at) + VALUES ($1, $2, $3, now()) + RETURNING id, username, email, password_hash, created_at, updated_at + """, + username, + email, + password_hash, + ) + except asyncpg.UniqueViolationError as exc: + raise UserExistsError from exc + assert row is not None + return AuthUser(**dict(row)) + + async def find_by_identifier(self, identifier: str) -> AuthUser | None: + row = await self.database.fetchrow( + """ + SELECT id, username, email, password_hash, created_at, updated_at + FROM auth_users + WHERE username = $1 OR lower(email) = lower($1) + """, + identifier, + ) + return AuthUser(**dict(row)) if row else None + + async def update_credentials( + self, user_id: int, username: str, email: str, password_hash: str + ) -> None: + await self.database.execute( + """ + UPDATE auth_users + SET username = $1, email = $2, password_hash = $3, updated_at = now() + WHERE id = $4 + """, + username, + email, + password_hash, + user_id, + ) + + async def create_session(self, user_id: int, token_hash: str, expires_at: datetime) -> None: + await self.database.execute( + "INSERT INTO auth_sessions (user_id, token_hash, expires_at) VALUES ($1, $2, $3)", + user_id, + token_hash, + expires_at, + ) + + async def find_session_user(self, token_hash: str) -> AuthUser | None: + row = await self.database.fetchrow( + """ + SELECT u.id, u.username, u.email, u.password_hash, u.created_at, u.updated_at + FROM auth_sessions s + JOIN auth_users u ON u.id = s.user_id + WHERE s.token_hash = $1 AND s.expires_at > now() + """, + token_hash, + ) + return AuthUser(**dict(row)) if row else None + + async def delete_session(self, token_hash: str) -> None: + await self.database.execute("DELETE FROM auth_sessions WHERE token_hash = $1", token_hash) + + async def delete_sessions_for_user(self, user_id: int) -> None: + await self.database.execute("DELETE FROM auth_sessions WHERE user_id = $1", user_id) + + async def prune_expired_sessions(self) -> None: + await self.database.execute("DELETE FROM auth_sessions WHERE expires_at < now()") diff --git a/packages/python-backend/src/shared_backend/config.py b/packages/python-backend/src/shared_backend/config.py new file mode 100644 index 0000000..3652418 --- /dev/null +++ b/packages/python-backend/src/shared_backend/config.py @@ -0,0 +1,49 @@ +"""Dependency-free environment configuration helpers.""" + +from __future__ import annotations + +import os +from dataclasses import dataclass +from typing import Mapping + + +def _int_value(env: Mapping[str, str], key: str, fallback: int, minimum: int) -> int: + try: + value = int(env.get(key, "")) + except (TypeError, ValueError): + return fallback + return value if value >= minimum else fallback + + +def database_url_from_env(env: Mapping[str, str] | None = None) -> str: + source = os.environ if env is None else env + value = str(source.get("DATABASE_URL", "")).strip() + if not value: + raise RuntimeError("DATABASE_URL environment variable is required") + return value + + +@dataclass(frozen=True, slots=True) +class DatabaseConfig: + dsn: str + min_size: int = 0 + max_size: int = 20 + timeout: float = 5.0 + command_timeout: float = 15.0 + + @classmethod + def from_env(cls, env: Mapping[str, str] | None = None) -> "DatabaseConfig": + source = os.environ if env is None else env + max_size = _int_value(source, "DATABASE_MAX_CONNS", 20, 1) + min_size = _int_value(source, "DATABASE_MIN_CONNS", 0, 0) + if min_size > max_size: + raise ValueError("DATABASE_MIN_CONNS must not exceed DATABASE_MAX_CONNS") + return cls( + dsn=database_url_from_env(source), + min_size=min_size, + max_size=max_size, + timeout=float(_int_value(source, "DATABASE_CONNECT_TIMEOUT_SECONDS", 5, 1)), + command_timeout=float( + _int_value(source, "DATABASE_COMMAND_TIMEOUT_SECONDS", 15, 1) + ), + ) diff --git a/packages/python-backend/src/shared_backend/postgres.py b/packages/python-backend/src/shared_backend/postgres.py new file mode 100644 index 0000000..60bd0bc --- /dev/null +++ b/packages/python-backend/src/shared_backend/postgres.py @@ -0,0 +1,65 @@ +"""Shared asyncpg pool and transaction wrapper.""" + +from __future__ import annotations + +from contextlib import asynccontextmanager +from typing import Any, AsyncIterator, Awaitable, Callable, Sequence + +import asyncpg + +from .config import DatabaseConfig + + +class Database: + """Own one asyncpg pool and expose common lifecycle/query operations.""" + + def __init__(self, pool: asyncpg.Pool) -> None: + self.pool = pool + + @classmethod + async def connect(cls, config: DatabaseConfig | str) -> "Database": + settings = config if isinstance(config, DatabaseConfig) else DatabaseConfig(dsn=config) + pool = await asyncpg.create_pool( + dsn=settings.dsn, + min_size=settings.min_size, + max_size=settings.max_size, + timeout=settings.timeout, + command_timeout=settings.command_timeout, + ) + try: + await pool.fetchval("SELECT 1") + except Exception: + await pool.close() + raise + return cls(pool) + + async def ping(self) -> None: + await self.pool.fetchval("SELECT 1") + + async def close(self) -> None: + await self.pool.close() + + async def execute(self, query: str, *args: Any) -> str: + return await self.pool.execute(query, *args) + + async def fetch(self, query: str, *args: Any) -> list[asyncpg.Record]: + return await self.pool.fetch(query, *args) + + async def fetchrow(self, query: str, *args: Any) -> asyncpg.Record | None: + return await self.pool.fetchrow(query, *args) + + async def fetchval(self, query: str, *args: Any) -> Any: + return await self.pool.fetchval(query, *args) + + @asynccontextmanager + async def transaction(self) -> AsyncIterator[asyncpg.Connection]: + async with self.pool.acquire() as connection: + async with connection.transaction(): + yield connection + + async def with_transaction( + self, + callback: Callable[[asyncpg.Connection], Awaitable[Any]], + ) -> Any: + async with self.transaction() as connection: + return await callback(connection) diff --git a/packages/python-backend/src/shared_backend/tokens.py b/packages/python-backend/src/shared_backend/tokens.py new file mode 100644 index 0000000..df08139 --- /dev/null +++ b/packages/python-backend/src/shared_backend/tokens.py @@ -0,0 +1,15 @@ +"""Opaque session-token generation and storage hashing.""" + +from __future__ import annotations + +import hashlib +import secrets + + +def new_session_token() -> tuple[str, str]: + token = secrets.token_urlsafe(32) + return token, hash_token(token) + + +def hash_token(token: str) -> str: + return hashlib.sha256(token.encode("utf-8")).hexdigest() diff --git a/packages/web-ui/README.md b/packages/web-ui/README.md new file mode 100644 index 0000000..f5bbdf0 --- /dev/null +++ b/packages/web-ui/README.md @@ -0,0 +1,3 @@ +# `@gabriel20xx/web-ui` + +Reusable Svelte 5 components for the shared application shell and account UI. See the workspace [README](../../README.md) for installation, publishing, and integration examples. diff --git a/packages/web-ui/package.json b/packages/web-ui/package.json new file mode 100644 index 0000000..86ecab3 --- /dev/null +++ b/packages/web-ui/package.json @@ -0,0 +1,42 @@ +{ + "name": "@gabriel20xx/web-ui", + "version": "0.1.0", + "description": "Shared Svelte UI, layout, authentication, and account components for Gabriel20xx web projects.", + "license": "MIT", + "type": "module", + "files": [ + "dist", + "README.md" + ], + "sideEffects": [ + "**/*.css" + ], + "peerDependencies": { + "svelte": "^5.0.0" + }, + "dependencies": { + "@gabriel20xx/design-tokens": "0.1.0" + }, + "devDependencies": { + "@sveltejs/package": "^2.5.0", + "@sveltejs/vite-plugin-svelte": "^6.0.0", + "svelte": "^5.0.0", + "svelte-check": "^4.0.0", + "typescript": "^5.0.0" + }, + "scripts": { + "check": "svelte-check --tsconfig ./tsconfig.json", + "package": "svelte-package" + }, + "svelte": "./dist/index.js", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "svelte": "./dist/index.js", + "import": "./dist/index.js" + }, + "./styles.css": "./dist/styles.css", + "./package.json": "./package.json" + } +} diff --git a/packages/web-ui/src/index.ts b/packages/web-ui/src/index.ts new file mode 100644 index 0000000..09c185e --- /dev/null +++ b/packages/web-ui/src/index.ts @@ -0,0 +1 @@ +export * from './lib/index.js'; diff --git a/packages/web-ui/src/lib/components/AboutDialog.svelte b/packages/web-ui/src/lib/components/AboutDialog.svelte new file mode 100644 index 0000000..6a87263 --- /dev/null +++ b/packages/web-ui/src/lib/components/AboutDialog.svelte @@ -0,0 +1,41 @@ + + + +
+ + {brand} +
+ + {#if version} +

Version {version}

+ {/if} + + {#if description} +

{description}

+ {/if} + + {#if links.length > 0} + + {/if} +
diff --git a/packages/web-ui/src/lib/components/AppShell.svelte b/packages/web-ui/src/lib/components/AppShell.svelte new file mode 100644 index 0000000..d32456d --- /dev/null +++ b/packages/web-ui/src/lib/components/AppShell.svelte @@ -0,0 +1,51 @@ + + +
+
+ +
+ {@render children?.()} +
+
diff --git a/packages/web-ui/src/lib/components/AuthPage.svelte b/packages/web-ui/src/lib/components/AuthPage.svelte new file mode 100644 index 0000000..dbcdd02 --- /dev/null +++ b/packages/web-ui/src/lib/components/AuthPage.svelte @@ -0,0 +1,124 @@ + + +
+
+
+ + {brand} +
+ +

{setupRequired ? 'Create your account' : 'Welcome back'}

+ {#if tagline} +

{tagline}

+ {/if} + +
+ {#if setupRequired} + + + + {:else} + + {/if} + + + + {#if error || submitError} +

{submitError || error}

+ {/if} + + +
+
+
diff --git a/packages/web-ui/src/lib/components/Badge.svelte b/packages/web-ui/src/lib/components/Badge.svelte new file mode 100644 index 0000000..1be5ed5 --- /dev/null +++ b/packages/web-ui/src/lib/components/Badge.svelte @@ -0,0 +1,19 @@ + + + + {@render children?.()} + diff --git a/packages/web-ui/src/lib/components/Button.svelte b/packages/web-ui/src/lib/components/Button.svelte new file mode 100644 index 0000000..6c8e91d --- /dev/null +++ b/packages/web-ui/src/lib/components/Button.svelte @@ -0,0 +1,35 @@ + + + diff --git a/packages/web-ui/src/lib/components/Card.svelte b/packages/web-ui/src/lib/components/Card.svelte new file mode 100644 index 0000000..6541f8a --- /dev/null +++ b/packages/web-ui/src/lib/components/Card.svelte @@ -0,0 +1,15 @@ + + +
+ {@render children?.()} +
diff --git a/packages/web-ui/src/lib/components/Dialog.svelte b/packages/web-ui/src/lib/components/Dialog.svelte new file mode 100644 index 0000000..8818bd0 --- /dev/null +++ b/packages/web-ui/src/lib/components/Dialog.svelte @@ -0,0 +1,54 @@ + + +{#if open} + +{/if} diff --git a/packages/web-ui/src/lib/components/Header.svelte b/packages/web-ui/src/lib/components/Header.svelte new file mode 100644 index 0000000..e23bbeb --- /dev/null +++ b/packages/web-ui/src/lib/components/Header.svelte @@ -0,0 +1,80 @@ + + +
+ (navOpen = false)}> + + {brand} + + + + +
+ {#if showSettings && onSettings} + + {/if} + + {#if username && onProfile} + + {/if} + + {#if onLogout} + + {/if} + + +
+
diff --git a/packages/web-ui/src/lib/components/PageHeader.svelte b/packages/web-ui/src/lib/components/PageHeader.svelte new file mode 100644 index 0000000..61d944b --- /dev/null +++ b/packages/web-ui/src/lib/components/PageHeader.svelte @@ -0,0 +1,31 @@ + + +
+
+

{title}

+ {#if description} +

{description}

+ {/if} + {@render children?.()} +
+ + {#if actions} +
+ {@render actions()} +
+ {/if} +
diff --git a/packages/web-ui/src/lib/components/ProfileDialog.svelte b/packages/web-ui/src/lib/components/ProfileDialog.svelte new file mode 100644 index 0000000..1600844 --- /dev/null +++ b/packages/web-ui/src/lib/components/ProfileDialog.svelte @@ -0,0 +1,80 @@ + + + +
+ {currentUsername || 'Your profile'} + {#if currentEmail} + {currentEmail} + {/if} +
+ +
+ + + + + {#if error} +

{error}

+ {/if} + +
+ + +
+
+
diff --git a/packages/web-ui/src/lib/components/SettingsDialog.svelte b/packages/web-ui/src/lib/components/SettingsDialog.svelte new file mode 100644 index 0000000..23c348f --- /dev/null +++ b/packages/web-ui/src/lib/components/SettingsDialog.svelte @@ -0,0 +1,24 @@ + + + + {#if children} + {@render children()} + {:else} +

No settings have been configured for this application yet.

+ {/if} +
diff --git a/packages/web-ui/src/lib/index.ts b/packages/web-ui/src/lib/index.ts new file mode 100644 index 0000000..6072bc0 --- /dev/null +++ b/packages/web-ui/src/lib/index.ts @@ -0,0 +1,20 @@ +export { default as AboutDialog } from './components/AboutDialog.svelte'; +export { default as AppShell } from './components/AppShell.svelte'; +export { default as AuthPage } from './components/AuthPage.svelte'; +export { default as Badge } from './components/Badge.svelte'; +export { default as Button } from './components/Button.svelte'; +export { default as Card } from './components/Card.svelte'; +export { default as Dialog } from './components/Dialog.svelte'; +export { default as Header } from './components/Header.svelte'; +export { default as PageHeader } from './components/PageHeader.svelte'; +export { default as ProfileDialog } from './components/ProfileDialog.svelte'; +export { default as SettingsDialog } from './components/SettingsDialog.svelte'; +export type { + AboutLink, + AsyncAction, + AuthLoginInput, + AuthSetupInput, + ContentSnippet, + NavItem, + ProfileUpdateInput +} from './types'; diff --git a/packages/web-ui/src/lib/styles.css b/packages/web-ui/src/lib/styles.css new file mode 100644 index 0000000..8ebfcfc --- /dev/null +++ b/packages/web-ui/src/lib/styles.css @@ -0,0 +1,573 @@ +@import '@gabriel20xx/design-tokens/theme.css'; + +:where(.sc-root, .sc-root *) { + box-sizing: border-box; +} + +.sc-root { + min-height: 100%; + color: var(--sc-fg); + background: var(--sc-bg); + font-family: var(--sc-font-sans); +} + +.sc-root button, +.sc-root input, +.sc-root textarea, +.sc-root select { + font: inherit; +} + +.sc-root a { + color: inherit; +} + +.sc-app-shell { + min-height: 100vh; + color: var(--sc-fg); + background: var(--sc-bg); +} + +.sc-main { + width: min(100% - 2rem, 90rem); + margin: 0 auto; + padding: 2rem 0 3rem; +} + +.sc-header { + position: sticky; + z-index: 20; + top: 0; + display: flex; + align-items: center; + gap: 1.25rem; + min-height: 4rem; + padding: 0 1rem; + color: var(--sc-fg); + background: color-mix(in srgb, var(--sc-surface) 92%, transparent); + border-bottom: 1px solid var(--sc-border); + backdrop-filter: blur(14px); +} + +.sc-brand { + display: inline-flex; + flex: 0 0 auto; + align-items: center; + gap: 0.625rem; + color: var(--sc-fg); + font-size: 1rem; + font-weight: 750; + text-decoration: none; + letter-spacing: -0.01em; +} + +.sc-brand-mark { + display: grid; + width: 2rem; + height: 2rem; + place-items: center; + color: var(--sc-primary-fg); + background: var(--sc-primary); + border-radius: var(--sc-radius-md); + font-size: 0.875rem; + font-weight: 800; +} + +.sc-nav { + display: flex; + flex: 1 1 auto; + align-items: center; + gap: 0.25rem; +} + +.sc-nav-link, +.sc-profile-button, +.sc-icon-button { + border: 1px solid transparent; + border-radius: var(--sc-radius-md); + transition: color 140ms ease, background 140ms ease, border-color 140ms ease; +} + +.sc-nav-link { + padding: 0.5rem 0.75rem; + color: var(--sc-muted-fg); + font-size: 0.9rem; + text-decoration: none; +} + +.sc-nav-link:hover, +.sc-nav-link[data-active='true'] { + color: var(--sc-fg); + background: var(--sc-surface-hover); + border-color: var(--sc-border); +} + +.sc-header-actions { + display: flex; + align-items: center; + gap: 0.5rem; + margin-left: auto; +} + +.sc-icon-button, +.sc-profile-button { + color: var(--sc-muted-fg); + background: transparent; + cursor: pointer; +} + +.sc-icon-button { + display: grid; + width: 2.25rem; + height: 2.25rem; + place-items: center; + font-size: 1.15rem; +} + +.sc-profile-button { + padding: 0.5rem 0.75rem; + font-size: 0.875rem; +} + +.sc-icon-button:hover, +.sc-profile-button:hover { + color: var(--sc-fg); + background: var(--sc-surface-hover); + border-color: var(--sc-border); +} + +.sc-mobile-menu-button { + display: none; +} + +.sc-page-header { + display: flex; + align-items: flex-start; + justify-content: space-between; + gap: 1rem; + margin-bottom: 1.5rem; +} + +.sc-page-header h1, +.sc-page-header h2, +.sc-dialog-title, +.sc-auth-card h1 { + margin: 0; + color: var(--sc-fg); + font-weight: 750; + letter-spacing: -0.025em; +} + +.sc-page-header h1 { + font-size: clamp(1.5rem, 3vw, 2.25rem); +} + +.sc-page-header p, +.sc-dialog-description, +.sc-auth-subtitle, +.sc-muted { + margin: 0.5rem 0 0; + color: var(--sc-muted-fg); + line-height: 1.55; +} + +.sc-card { + padding: 1.25rem; + color: var(--sc-fg); + background: var(--sc-surface); + border: 1px solid var(--sc-border); + border-radius: var(--sc-radius-lg); + box-shadow: var(--sc-shadow-sm); +} + +.sc-card-header { + margin-bottom: 1rem; +} + +.sc-card-header h2, +.sc-card-header h3 { + margin: 0; + font-size: 1.05rem; +} + +.sc-card-header p { + margin: 0.375rem 0 0; + color: var(--sc-muted-fg); + font-size: 0.9rem; +} + +.sc-badge { + display: inline-flex; + align-items: center; + min-height: 1.5rem; + padding: 0.125rem 0.5rem; + color: var(--sc-secondary-fg); + background: var(--sc-secondary); + border: 1px solid var(--sc-border); + border-radius: 999px; + font-size: 0.75rem; + font-weight: 650; +} + +.sc-badge[data-variant='success'] { + color: var(--sc-success-fg); + background: var(--sc-success); + border-color: transparent; +} + +.sc-badge[data-variant='warning'] { + color: var(--sc-warning-fg); + background: var(--sc-warning); + border-color: transparent; +} + +.sc-badge[data-variant='danger'] { + color: var(--sc-danger-fg); + background: var(--sc-danger); + border-color: transparent; +} + +.sc-button { + display: inline-flex; + align-items: center; + justify-content: center; + gap: 0.5rem; + min-height: 2.5rem; + padding: 0.625rem 1rem; + border: 1px solid transparent; + border-radius: var(--sc-radius-md); + font-size: 0.9rem; + font-weight: 650; + line-height: 1; + cursor: pointer; + transition: color 140ms ease, background 140ms ease, border-color 140ms ease, opacity 140ms ease; +} + +.sc-button:hover:not(:disabled) { + transform: translateY(-1px); +} + +.sc-button:disabled { + cursor: not-allowed; + opacity: 0.55; +} + +.sc-button:focus-visible, +.sc-icon-button:focus-visible, +.sc-profile-button:focus-visible, +.sc-nav-link:focus-visible, +.sc-dialog-close:focus-visible { + outline: 3px solid color-mix(in srgb, var(--sc-ring) 45%, transparent); + outline-offset: 2px; +} + +.sc-button-primary { + color: var(--sc-primary-fg); + background: var(--sc-primary); +} + +.sc-button-primary:hover:not(:disabled) { + background: var(--sc-primary-hover); +} + +.sc-button-secondary { + color: var(--sc-secondary-fg); + background: var(--sc-secondary); + border-color: var(--sc-border); +} + +.sc-button-secondary:hover:not(:disabled) { + background: var(--sc-secondary-hover); +} + +.sc-button-ghost { + color: var(--sc-muted-fg); + background: transparent; +} + +.sc-button-ghost:hover:not(:disabled) { + color: var(--sc-fg); + background: var(--sc-surface-hover); +} + +.sc-button-danger { + color: var(--sc-danger-fg); + background: var(--sc-danger); +} + +.sc-button-danger:hover:not(:disabled) { + background: var(--sc-danger-hover); +} + +.sc-button-sm { + min-height: 2rem; + padding: 0.45rem 0.75rem; + font-size: 0.8125rem; +} + +.sc-button-lg { + min-height: 2.875rem; + padding: 0.75rem 1.25rem; +} + +.sc-button-full { + width: 100%; +} + +.sc-form { + display: grid; + gap: 1rem; +} + +.sc-field { + display: grid; + gap: 0.4rem; +} + +.sc-label { + color: var(--sc-fg); + font-size: 0.85rem; + font-weight: 650; +} + +.sc-input, +.sc-select, +.sc-textarea { + width: 100%; + min-height: 2.6rem; + padding: 0.625rem 0.75rem; + color: var(--sc-fg); + background: var(--sc-bg); + border: 1px solid var(--sc-border); + border-radius: var(--sc-radius-md); + outline: none; + transition: border-color 140ms ease, box-shadow 140ms ease; +} + +.sc-textarea { + min-height: 7rem; + resize: vertical; +} + +.sc-input::placeholder, +.sc-textarea::placeholder { + color: var(--sc-subtle-fg); +} + +.sc-input:focus, +.sc-select:focus, +.sc-textarea:focus { + border-color: var(--sc-ring); + box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc-ring) 22%, transparent); +} + +.sc-form-actions, +.sc-dialog-footer { + display: flex; + justify-content: flex-end; + gap: 0.625rem; + margin-top: 0.5rem; +} + +.sc-error { + padding: 0.75rem; + color: var(--sc-danger); + background: color-mix(in srgb, var(--sc-danger) 12%, transparent); + border: 1px solid color-mix(in srgb, var(--sc-danger) 35%, transparent); + border-radius: var(--sc-radius-md); + font-size: 0.875rem; + line-height: 1.45; +} + +.sc-success { + color: var(--sc-success); +} + +.sc-auth-page { + display: grid; + min-height: 100vh; + place-items: center; + padding: 1.5rem; + color: var(--sc-fg); + background: + radial-gradient(circle at 15% 10%, color-mix(in srgb, var(--sc-primary) 18%, transparent), transparent 35%), + var(--sc-bg); +} + +.sc-auth-card { + width: min(100%, 28rem); + padding: clamp(1.5rem, 5vw, 2.5rem); + background: var(--sc-surface); + border: 1px solid var(--sc-border); + border-radius: var(--sc-radius-xl); + box-shadow: var(--sc-shadow-lg); +} + +.sc-auth-brand { + display: flex; + align-items: center; + gap: 0.75rem; + margin-bottom: 1.5rem; + font-weight: 750; +} + +.sc-auth-card h1 { + font-size: 1.7rem; +} + +.sc-auth-form { + margin-top: 1.5rem; +} + +.sc-dialog-backdrop { + position: fixed; + z-index: 100; + inset: 0; + display: grid; + place-items: center; + padding: 1rem; + background: var(--sc-backdrop); + backdrop-filter: blur(5px); +} + +.sc-dialog { + width: min(100%, 34rem); + max-height: min(90vh, 48rem); + overflow: auto; + color: var(--sc-fg); + background: var(--sc-surface-raised); + border: 1px solid var(--sc-border); + border-radius: var(--sc-radius-xl); + box-shadow: var(--sc-shadow-lg); +} + +.sc-dialog-header { + display: flex; + align-items: flex-start; + justify-content: space-between; + gap: 1rem; + padding: 1.25rem 1.25rem 0; +} + +.sc-dialog-title { + font-size: 1.25rem; +} + +.sc-dialog-close { + display: grid; + width: 2rem; + height: 2rem; + place-items: center; + color: var(--sc-muted-fg); + background: transparent; + border: 1px solid transparent; + border-radius: var(--sc-radius-sm); + font-size: 1.35rem; + line-height: 1; + cursor: pointer; +} + +.sc-dialog-close:hover { + color: var(--sc-fg); + background: var(--sc-surface-hover); + border-color: var(--sc-border); +} + +.sc-dialog-body { + padding: 1.25rem; +} + +.sc-dialog-footer { + padding: 0 1.25rem 1.25rem; +} + +.sc-about-links { + display: grid; + gap: 0.5rem; + margin-top: 1rem; +} + +.sc-about-links a { + color: var(--sc-primary); + text-decoration: none; +} + +.sc-about-links a:hover { + color: var(--sc-primary-hover); + text-decoration: underline; +} + +.sc-profile-summary { + display: grid; + gap: 0.25rem; + margin-bottom: 1.25rem; + padding: 0.875rem; + background: var(--sc-bg); + border: 1px solid var(--sc-border); + border-radius: var(--sc-radius-md); +} + +.sc-profile-summary strong { + color: var(--sc-fg); +} + +.sc-profile-summary span { + color: var(--sc-muted-fg); + font-size: 0.875rem; +} + +@media (max-width: 45rem) { + .sc-header { + flex-wrap: wrap; + gap: 0.75rem; + padding: 0.75rem 1rem; + } + + .sc-mobile-menu-button { + display: grid; + order: 3; + width: 2.25rem; + height: 2.25rem; + margin-left: auto; + place-items: center; + } + + .sc-nav { + display: none; + flex-basis: 100%; + order: 4; + flex-direction: column; + align-items: stretch; + padding-bottom: 0.25rem; + } + + .sc-nav[data-open='true'] { + display: flex; + } + + .sc-nav-link { + width: 100%; + } + + .sc-header-actions { + margin-left: 0; + } + + .sc-profile-button { + max-width: 9rem; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } +} + +@media (max-width: 30rem) { + .sc-main { + width: min(100% - 1.25rem, 90rem); + padding-top: 1.25rem; + } + + .sc-page-header { + flex-direction: column; + } +} diff --git a/packages/web-ui/src/lib/types.ts b/packages/web-ui/src/lib/types.ts new file mode 100644 index 0000000..71458dd --- /dev/null +++ b/packages/web-ui/src/lib/types.ts @@ -0,0 +1,31 @@ +import type { Snippet } from 'svelte'; + +export type AsyncAction = (value: T) => void | Promise; + +export interface NavItem { + href: string; + label: string; +} + +export interface AuthSetupInput { + username: string; + email: string; + password: string; +} + +export interface AuthLoginInput { + identifier: string; + password: string; +} + +export interface ProfileUpdateInput { + username: string; + email: string; +} + +export interface AboutLink { + label: string; + href: string; +} + +export type ContentSnippet = Snippet; diff --git a/packages/web-ui/svelte.config.js b/packages/web-ui/svelte.config.js new file mode 100644 index 0000000..21b9399 --- /dev/null +++ b/packages/web-ui/svelte.config.js @@ -0,0 +1,5 @@ +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; + +export default { + preprocess: vitePreprocess() +}; diff --git a/packages/web-ui/tsconfig.json b/packages/web-ui/tsconfig.json new file mode 100644 index 0000000..a220ef7 --- /dev/null +++ b/packages/web-ui/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "moduleResolution": "bundler", + "skipLibCheck": true, + "strict": true, + "target": "ES2022", + "verbatimModuleSyntax": true + }, + "include": [ + "src/**/*.d.ts", + "src/**/*.ts", + "src/**/*.svelte" + ] +}