From 4b09e5fc5d272d0f1af7fc74fc7b4a01e48f2394 Mon Sep 17 00:00:00 2001 From: Anthony Alaribe Date: Sun, 25 Oct 2026 14:36:28 +0200 Subject: [PATCH 001/201] Treat /rum/sessions/ like /rum/sessions (#710) A trailing slash captures an empty last path segment, which fell through to the 404 arm. Empty segments are now ignored. --- src/Pages/Dashboards.hs | 2 +- test/integration/Pages/DashboardWidgetsSpec.hs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Pages/Dashboards.hs b/src/Pages/Dashboards.hs index ce6f4084c..71d24ae37 100644 --- a/src/Pages/Dashboards.hs +++ b/src/Pages/Dashboards.hs @@ -2269,7 +2269,7 @@ entrypointRedirectGetH baseTemplate title tags pid qparams = do -- Explorer sessions view over browser telemetry, keeping the window. Shared links from the old -- page (@/rum?tab=sessions&session=…@) land on the same view, narrowed to that session. rumRedirectH :: Projects.ProjectId -> [Text] -> [(Text, Maybe Text)] -> ATAuthCtx (Headers '[Header "Location" Text] NoContent) -rumRedirectH pid segments params = case (segments, param "tab") of +rumRedirectH pid segments params = case (filter (not . T.null) segments, param "tab") of (["sessions"], _) -> sessions ([], Just "sessions") -> sessions ([], _) -> dashboard diff --git a/test/integration/Pages/DashboardWidgetsSpec.hs b/test/integration/Pages/DashboardWidgetsSpec.hs index 40a2f4029..475e093e5 100644 --- a/test/integration/Pages/DashboardWidgetsSpec.hs +++ b/test/integration/Pages/DashboardWidgetsSpec.hs @@ -1502,6 +1502,8 @@ spec = sequential $ aroundAll withTestResources do dashboard `shouldSatisfy` T.isInfixOf "since=7D" location ["dashboard"] window `shouldReturn` dashboard sessions <- location ["sessions"] window + -- A trailing slash captures an empty last segment; it must not turn into a 404. + location ["sessions", ""] window `shouldReturn` sessions linkParams ("/p/" <> testPid.toText <> "/log_explorer") ("href=\"" <> sessions <> "\"") `shouldBe` [[("since", "7D"), ("viz_type", "sessions"), ("query", browserKql)]] -- A link shared from the old page lands on that session, not the dashboard. legacy <- location [] [("tab", Just "sessions"), ("session", Just "abc")] From 8890344e9603c7fedff36e0182ff8d7b9b04124c Mon Sep 17 00:00:00 2001 From: Anthony Alaribe Date: Sun, 25 Oct 2026 14:40:21 +0200 Subject: [PATCH 002/201] Share local CI caches across checkouts (#711) * Share local CI dependency caches across checkouts Each checkout path got its own cabal/npm/playwright volume set, so every worktree and signoff clone leaked ~8GB of content-keyed caches; 35 sets had piled up. Share those. dist-newstyle stays per checkout: sharing it was tried and weeder then reported live functions as dead, because unchanged modules lost their .hie files after another branch built into the volume. * Note that local sign-off must stay fast * Share dist-newstyle across checkouts; weeder repairs missing .hie files After another branch built into a shared dist, GHC can leave a live module compiled without its .hie, so weeder misses every reference it makes and reports live functions dead. The weeder check now recompiles any tracked module missing one (dropping cabal's build stamp, since a touch leaves the source hash unchanged) instead of every checkout paying a cold build. --- AGENTS.md | 9 +++++++++ ci/compose.yml | 12 ++++++++---- docs/local-ci.md | 10 +++++----- scripts/ci/ci.sh | 30 +++++++++++++++++++++++------- 4 files changed, 45 insertions(+), 16 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 6954406ef..25c3bcbd2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -219,6 +219,15 @@ each burning ~85 minutes of wall clock before reporting an e2e expectation that local run would have shown in minutes. Never treat "push it and see what CI says" as a way to test a change. +**Sign-off must stay fast, every time — treat a slower sign-off as a regression.** +The cabal store, `dist-newstyle`, npm and Playwright caches are docker volumes shared +by every checkout (`ci/compose.yml`), so a new worktree or sign-off clone builds +incrementally. Never key a cache per checkout: that leaked ~400GB of volumes and made +every clone a cold build. If one check misbehaves on shared state, fix that check — +never slow every check down for it. The precedent: after another branch built into +the shared `dist`, GHC left some live modules without `.hie` files and weeder reported +their callees dead, so the weeder check recompiles any tracked module missing one. + **`make ship` is the whole deploy from here** — checks, image, push, CapRover — so the slow half stops being a queue you wait on: diff --git a/ci/compose.yml b/ci/compose.yml index 571f98715..077146130 100644 --- a/ci/compose.yml +++ b/ci/compose.yml @@ -128,10 +128,14 @@ services: # would start Postgres and MinIO even for frontend-only signoff. volumes: - cabal: - npm: - dist: + # Shared by every checkout, so a new worktree or signoff clone starts warm + # instead of adding another ~12GB set; ci.sh creates them. Every checkout mounts + # at /build, so dist is incremental across branches; the weeder check repairs + # the .hie files another branch's build leaves behind. + cabal: {external: true, name: monoscope-ci_cabal} + npm: {external: true, name: monoscope-ci_npm} + dist: {external: true, name: monoscope-ci_dist} + playwright: {external: true, name: monoscope-ci_playwright} node: wc-node: e2e-node: - playwright: diff --git a/docs/local-ci.md b/docs/local-ci.md index 842d2650d..a574ed34b 100644 --- a/docs/local-ci.md +++ b/docs/local-ci.md @@ -100,11 +100,11 @@ Two deliberate differences from your normal `make test`: - **Build directories are container-private.** `dist-newstyle`, all three `node_modules` directories, npm's download cache, and Playwright's browser download are named volumes. Your host's macOS/arm64 artifacts would corrupt the Linux build. - Volumes are separate for each worktree and persist, so the second `make ci` there is - fast — but the **first one is a cold build** and takes as long as a cold CI - run. Start it and go do something else; every run after that is incremental. - `make ci-down` keeps them; `make ci-clean` deletes them and buys you the cold - build back. + The cabal store, `dist-newstyle`, and the npm and Playwright caches are shared + by every checkout (only `node_modules` stays per worktree) and persist, so only + the first `make ci` on a machine is a cold build; a new worktree or sign-off + clone builds incrementally from whatever branch built last. `make ci-down` keeps + them; `make ci-clean` deletes them for every checkout. Each `integration-tests` invocation recreates only the ephemeral Postgres, MinIO, and TimeFusion service containers, so deterministic fixture IDs and telemetry rows never leak into the next run. The build-cache volumes remain. diff --git a/scripts/ci/ci.sh b/scripts/ci/ci.sh index 63c672bcf..7ec498228 100755 --- a/scripts/ci/ci.sh +++ b/scripts/ci/ci.sh @@ -359,14 +359,26 @@ run_body() { # unit-tests) if [ -n "${CI_UNIT_BIN:-}" ]; then "$CI_UNIT_BIN"; else cabal test unit-tests -j $CABAL_FLAGS "$CABAL_OPTS" --test-show-details=direct; fi ;; cli-tests) if [ -n "${CI_CLI_BIN:-}" ]; then "$CI_CLI_BIN"; else cabal test monoscope-cli:cli-tests -j $CABAL_FLAGS "$CABAL_OPTS" --test-show-details=direct; fi ;; weeder) + # dist-newstyle is shared with other branches' checkouts, so it can hold .hie files for + # modules this tree lacks (reported dead) and lack them for modules it has (GHC can + # recompile a module without rewriting its .hie, hiding every reference it makes). + srcs=$(git ls-files '*.hs' | sed -E 'h; s#^(src|shared/src|cli/exe|cli/test|cli|test/[a-z]+|app)/##; s#\.hs$##; G; s#\n# #') + src_of() { printf '%s\n' "$srcs" | awk -v m="$1" '$1 == m { print $2; exit }'; } + cabal build integration-tests unit-tests -j $CABAL_FLAGS "$CABAL_OPTS" + find dist-newstyle -name '*.o' | while read -r o; do + b=${o%%-tmp/*}-tmp; [ "$b" = "$o-tmp" ] && b=${o%/build/*}/build + m=${o#"$b"/}; m=${m%.o} + # cabal skips GHC while its sources hash the same, so drop its build stamp too. + if [ -d "$b/extra-compilation-artifacts/hie" ] && [ ! -e "$b/extra-compilation-artifacts/hie/$m.hie" ] && [ -n "$(src_of "$m")" ]; then + rm -f "${b%/build*}/cache/build" "$b/$m".{o,hi,dyn_o,dyn_hi} + fi + done cabal build integration-tests unit-tests -j $CABAL_FLAGS "$CABAL_OPTS" command -v weeder >/dev/null 2>&1 || cabal install weeder --install-method=copy --installdir=/usr/local/bin --overwrite-policy=always - # A restored dist-newstyle keeps .hie files of deleted modules, which weeder reports as dead. - mods=$(git ls-files '*.hs' | sed -E 's#^(src|shared/src|cli/exe|cli/test|cli|test/[a-z]+|app)/##; s#\.hs$##') find dist-newstyle -name '*.hie' | while read -r f; do m=${f%.hie}; m=${m##*/build/}; m=${m##*/hie/}; m=${m##*-tmp/} case $m in Proto/* | Paths_* | */autogen/*) continue ;; esac - printf '%s\n' "$mods" | grep -qxF "$m" || rm -f "$f" + [ -n "$(src_of "$m")" ] || rm -f "$f" done weeder --config weeder.toml --hie-directory dist-newstyle ;; @@ -602,14 +614,18 @@ cmd_gc() { COMPOSE_FILE=ci/compose.yml COMPOSE_PROJECT="monoscope-ci-$(printf '%s' "$ROOT" | sha256 | cut -c1-12)" -compose() { docker compose -f "$COMPOSE_FILE" --project-name "$COMPOSE_PROJECT" "$@"; } +SHARED_VOLUMES=(monoscope-ci_cabal monoscope-ci_npm monoscope-ci_dist monoscope-ci_playwright) +compose() { + local v; for v in "${SHARED_VOLUMES[@]}"; do docker volume create "$v" >/dev/null; done + docker compose -f "$COMPOSE_FILE" --project-name "$COMPOSE_PROJECT" "$@" +} # Wait for a host check started in the background and replay its output. collect_host() { [ -n "$1" ] || return 0; local r=0; wait "$1" || r=$?; cat "$2"; rm -f "$2"; return "$r"; } cmd_local() { - # Serialize local runs to avoid oversubscribing the host. Each worktree has its - # own volumes so a checkout on another branch cannot replace this one's HIE files. + # Serialize local runs: they oversubscribe the host, and every checkout shares the + # cabal store and dist (`shell` takes no lock, so a hand build there can race a run). if [ "${CI_LOCAL_LOCKED:-}" != true ]; then python3 -c ' import fcntl, os, sys @@ -740,7 +756,7 @@ cmd_shell() { # Volumes survive `down` on purpose: they hold the cabal store and dist-newstyle, # and losing them means the next `make ci` is a cold build. `clean` is the nuke. cmd_down() { compose down --remove-orphans; } -cmd_clean() { compose down -v --remove-orphans; } +cmd_clean() { compose down -v --remove-orphans && docker volume rm "${SHARED_VOLUMES[@]}"; } # ---------------------------------------------------------------- deploy image From e0d24e9e3cc4fb7dcd66bb378d02ab97619129d7 Mon Sep 17 00:00:00 2001 From: Anthony Alaribe Date: Sun, 25 Oct 2026 15:54:42 +0200 Subject: [PATCH 003/201] Release sessions display, dependency updates, and Stripe reactivation (#713) Combine the functional changes from #612, #556, #712, #557, #559 and #526. Keep the sessions PR's unrelated Slack plan out of this train. Require complete invoice reads, confirmed payment and retryable settlement for Stripe reactivation. Cover the failure paths through signed webhook and checkout handlers. --- e2e/tests/project-notices.spec.ts | 2 +- package-lock.json | 6 +- src/BackgroundJobs.hs | 55 +++-- src/Pages/BodyWrapper.hs | 5 +- src/Pages/Components.hs | 35 ++-- src/Pages/LogExplorer/Log.hs | 16 +- src/Pages/Onboarding.hs | 14 +- src/Pages/Projects.hs | 16 +- src/Pages/Settings.hs | 194 +++++++++++------- src/Pkg/EmailTemplates.hs | 16 ++ test/integration/Pages/BusinessFlowsSpec.hs | 149 ++++++++++++-- ...=12_subscription=sub_test123_get_with.json | 4 +- web-components/package-lock.json | 166 ++++++++------- web-components/package.json | 12 +- web-components/src/log-list.ts | 2 +- 15 files changed, 450 insertions(+), 242 deletions(-) diff --git a/e2e/tests/project-notices.spec.ts b/e2e/tests/project-notices.spec.ts index 022be26a3..8ed63a6c8 100644 --- a/e2e/tests/project-notices.spec.ts +++ b/e2e/tests/project-notices.spec.ts @@ -19,7 +19,7 @@ test("customer notices keep fullscreen panels and sidebar flyouts aligned", asyn await page.goto(`/p/${pid}/log_explorer?fullscreen=trace&showTrace=test-trace`); const admin = page.locator("#super-admin-banner"), billing = page.locator("#billing-downgrade-banner"); await expect(admin).toContainText("You are a super admin in a customer's project"); - await expect(billing.getByRole("link", { name: "Update payment method" })).toBeVisible(); + await expect(billing.getByRole("link", { name: "Reactivate subscription" })).toBeVisible(); await expect(page.locator("#apiLogsPage")).toHaveAttribute("data-fullscreen", "trace"); const noticeBottom = (await billing.boundingBox())!; const panel = await page.locator("#trace_expanded_view").boundingBox(); diff --git a/package-lock.json b/package-lock.json index 557156597..2c2f54945 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5891,9 +5891,9 @@ ] }, "node_modules/baseline-browser-mapping": { - "version": "2.10.25", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.25.tgz", - "integrity": "sha512-QO/VHsXCQdnzADMfmkeOPvHdIAkoB7i0/rGjINPJEetLx75hNttVWGQ/jycHUDP9zZ9rupbm60WRxcwViB0MiA==", + "version": "2.11.21", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.21.tgz", + "integrity": "sha512-uh8vpY/1/YyFkunIDFH/12p7/7VdPKA1hejMVEbdkEaWnUz0Hesvx5EbiU6XxjyHZIOju+ZMbQJkRh+es3/spQ==", "dev": true, "license": "Apache-2.0", "bin": { diff --git a/src/BackgroundJobs.hs b/src/BackgroundJobs.hs index 52d2734da..79efbc7c7 100644 --- a/src/BackgroundJobs.hs +++ b/src/BackgroundJobs.hs @@ -1,6 +1,6 @@ {-# LANGUAGE StrictData #-} -module BackgroundJobs (jobsWorkerInit, jobsRunner, ensureDailyJobScheduled, processBackgroundJob, enqueueAIRoutine, enqueueJobs, runAIRoutineWith, BgJobs (..), jobTypeName, runHourlyJob, runNotificationDigest, runNotificationSweep, runSlackIncidentDeliveries, expireLapsedAcks, generateOtelFacetsBatch, throwParsePayload, checkTriggeredQueryMonitors, evaluateQueryMonitorValue, monitorStatus, detectSpikeOrDrop, aboveVolumeFloor, isAlertableLogLevel, isIssueWorthy, spikeZScoreThreshold, spikeMinAbsoluteDelta, spikeMinBaselineRate, dropMinBaselineRate, calculateLogPatternBaselines, detectLogPatternSpikes, processNewLogPatterns, pruneStaleLogPatterns, calculateErrorBaselines, detectErrorSpikes, detectPerformanceIssues, detectFrontendIssues, detectFeedback, applyUptimeResult, evaluateCronMonitor, notifyErrorSubscriptions, sweepErrorSubscriptions, consumeNotificationToken, endpointTemplateDiscovery, notifyDiscoveredEndpoints, sendNewEndpointAlerts, runHostRetentionSweep, autoAckProvenEndpoints, endpointAutoAckLockName, provenEndpointMinRequests, provenEndpointMinHours, collapseEndpointAlertFamilies, newEndpointAlertsPerHour, endpointMergeCleanup, reviewResidualEndpointGroups, residualGroups, mergeEvidenceMet, routeWordFraction, looksLikeRouteWord, recheckQuarantinedMerges, sharedIdPrefix, promoteConfirmedIdRules, shapeAgreementOk, autoApplyTrusted, proposePathTemplates, runShape, patternEmbeddingAndMerge, reviewErrorGroups, errorGroupEvidenceMet, processProjectErrors, maskCollapsesDistinctShapes, promoteErrorMask, processEagerBatch, flushDrainTask, runErrorDecayFiber, runDrainFlusher, runDrainAgeFlushTimer, runSchemaFlusherFiber, runSessionBackfillTimer, backfillSessionAttributes, getStripeSubDetails, getStripeInvoices, scheduleTrialReminders, StripeSubDetails (..), StripeInvoice (..), errorTrendChartUrl) where +module BackgroundJobs (jobsWorkerInit, jobsRunner, ensureDailyJobScheduled, processBackgroundJob, enqueueAIRoutine, enqueueJobs, runAIRoutineWith, BgJobs (..), jobTypeName, runHourlyJob, runNotificationDigest, runNotificationSweep, runSlackIncidentDeliveries, expireLapsedAcks, generateOtelFacetsBatch, throwParsePayload, checkTriggeredQueryMonitors, evaluateQueryMonitorValue, monitorStatus, detectSpikeOrDrop, aboveVolumeFloor, isAlertableLogLevel, isIssueWorthy, spikeZScoreThreshold, spikeMinAbsoluteDelta, spikeMinBaselineRate, dropMinBaselineRate, calculateLogPatternBaselines, detectLogPatternSpikes, processNewLogPatterns, pruneStaleLogPatterns, calculateErrorBaselines, detectErrorSpikes, detectPerformanceIssues, detectFrontendIssues, detectFeedback, applyUptimeResult, evaluateCronMonitor, notifyErrorSubscriptions, sweepErrorSubscriptions, consumeNotificationToken, endpointTemplateDiscovery, notifyDiscoveredEndpoints, sendNewEndpointAlerts, runHostRetentionSweep, autoAckProvenEndpoints, endpointAutoAckLockName, provenEndpointMinRequests, provenEndpointMinHours, collapseEndpointAlertFamilies, newEndpointAlertsPerHour, endpointMergeCleanup, reviewResidualEndpointGroups, residualGroups, mergeEvidenceMet, routeWordFraction, looksLikeRouteWord, recheckQuarantinedMerges, sharedIdPrefix, promoteConfirmedIdRules, shapeAgreementOk, autoApplyTrusted, proposePathTemplates, runShape, patternEmbeddingAndMerge, reviewErrorGroups, errorGroupEvidenceMet, processProjectErrors, maskCollapsesDistinctShapes, promoteErrorMask, processEagerBatch, flushDrainTask, runErrorDecayFiber, runDrainFlusher, runDrainAgeFlushTimer, runSchemaFlusherFiber, runSessionBackfillTimer, backfillSessionAttributes, getStripeSubDetails, getStripeInvoices, scheduleTrialReminders, StripeSubDetails (..), StripeInvoice (..), StripeInvoiceScope (..), errorTrendChartUrl) where import BackgroundJobs.Types (BgJobs (..)) import BackgroundJobs.Types qualified as Jobs @@ -12,6 +12,7 @@ import Control.Monad.Extra (whileM) import Data.Aeson qualified as AE import Data.Aeson.Lens qualified as AL import Data.Aeson.QQ (aesonQQ) +import Data.Aeson.Types (parseEither) import Data.CaseInsensitive qualified as CI import Data.Char (isAsciiLower, isAsciiUpper, isDigit) import Data.Default (def) @@ -42,6 +43,8 @@ import Data.Vector qualified as V import Data.Vector.Algorithms.Intro qualified as VA import Database.PostgreSQL.Simple qualified as SimplePG import Database.PostgreSQL.Simple.SqlQQ (sql) +import Deriving.Aeson qualified as DAE +import Deriving.Aeson.Stock qualified as DAE import Effectful (Eff, IOE, (:>)) import Effectful.Concurrent.Async (concurrently, concurrently_, forConcurrently, forConcurrently_) import Effectful.Ki qualified as Ki @@ -2949,16 +2952,24 @@ data StripeSubDetails = StripeSubDetails -- | One Stripe invoice. `periodStart`/`periodEnd` (POSIX seconds) are the usage -- window the invoice bills for — contiguous with the subscription item's period, -- which is why they, and not our own month arithmetic, define a past cycle. --- `total` is in cents; `hostedUrl` is absent on drafts. +-- `total` and `amountRemaining` (still owed) are in cents; `hostedUrl` is absent on drafts. data StripeInvoice = StripeInvoice - { periodStart :: Int + { invoiceId :: Text + , periodStart :: Int , periodEnd :: Int , total :: Int + , amountRemaining :: Int + , currency :: Text , status :: Text , hostedUrl :: Maybe Text , number :: Maybe Text } - deriving stock (Eq, Show) + deriving stock (Eq, Generic, Show) + deriving (AE.FromJSON) via DAE.CustomJSON '[DAE.FieldLabelModifier '[DAE.Rename "invoiceId" "id", DAE.Rename "hostedUrl" "hosted_invoice_url", DAE.CamelToSnake]] StripeInvoice + + +data StripeInvoiceScope = RecentInvoices | OpenInvoices + deriving stock (Eq) -- | Returns Nothing on HTTP/network/TLS error or JSON decode miss. Callers @@ -2982,24 +2993,24 @@ getStripeSubDetails apiKey subId = do pure StripeSubDetails{..} --- | A subscription's invoices, newest first. Empty on any HTTP/decode failure — --- this only enriches the billing page, so a Stripe outage must degrade it, not fail it. -getStripeInvoices :: (IOE :> es, W.HTTP :> es) => Text -> Text -> Eff es [StripeInvoice] -getStripeInvoices apiKey subId = do - respE <- tryAny $ W.getWith (bearerAuth apiKey) ("https://api.stripe.com/v1/invoices?limit=12&subscription=" <> toString subId) - pure $ fromMaybe [] do - resp <- rightToMaybe respE - v <- AE.decode @AE.Value (resp ^. W.responseBody) - pure - [ StripeInvoice{periodStart, periodEnd, total, status, hostedUrl, number} - | inv <- v ^.. AL.key "data" . AL.values - , let total = maybe 0 fromInteger $ inv ^? AL.key "total" . AL._Integer - status = fromMaybe "" $ inv ^? AL.key "status" . AL._String - hostedUrl = inv ^? AL.key "hosted_invoice_url" . AL._String - number = inv ^? AL.key "number" . AL._String - , Just periodStart <- [fromInteger <$> inv ^? AL.key "period_start" . AL._Integer] - , Just periodEnd <- [fromInteger <$> inv ^? AL.key "period_end" . AL._Integer] - ] +-- | The billing page needs recent invoices; reactivation must read every open invoice. +-- A failed or malformed lookup must not be mistaken for a zero outstanding balance. +getStripeInvoices :: (IOE :> es, W.HTTP :> es) => Text -> StripeInvoiceScope -> Text -> Eff es (Either Text [StripeInvoice]) +getStripeInvoices apiKey scope subId = fetch Nothing + where + fetch cursor = do + response <- tryAny $ W.getWith (bearerAuth apiKey) ("https://api.stripe.com/v1/invoices?limit=12&subscription=" <> toString subId <> bool "" "&status=open" (scope == OpenInvoices) <> foldMap (("&starting_after=" <>) . toString) cursor) + let decoded = do + resp <- first (const "Stripe invoice request failed") response + value <- first toText $ AE.eitherDecode @AE.Value (resp ^. W.responseBody) + first toText $ parseEither (AE.withObject "Stripe invoices" \o -> (,) <$> o AE..: "data" <*> (o AE..:? "has_more" AE..!= False)) value + case decoded of + Left err -> pure $ Left err + Right (invoices, hasMore) + | scope == OpenInvoices && hasMore -> case listToMaybe (reverse invoices) of + Just invoice -> fmap (invoices <>) <$> fetch (Just invoice.invoiceId) + Nothing -> pure $ Left "Stripe returned an empty invoice page with more results" + | otherwise -> pure $ Right invoices -- | Enqueues TrialEndingReminder jobs at T-7d and T-3d. Enqueue failures are diff --git a/src/Pages/BodyWrapper.hs b/src/Pages/BodyWrapper.hs index 818cfcba7..95638a5dc 100644 --- a/src/Pages/BodyWrapper.hs +++ b/src/Pages/BodyWrapper.hs @@ -481,7 +481,10 @@ bodyWrapper bcfg child = do $ div_ [id_ "billing-downgrade-banner", role_ "alert", class_ "flex shrink-0 flex-wrap items-center justify-center gap-x-3 gap-y-1 border-b border-strokeWarning-strong bg-fillWarning-weak px-4 py-2 text-xs text-textStrong"] do span_ "Your paid subscription is no longer active. This project has been downgraded to Free." a_ [href_ $ "/p/" <> project.id.toText <> "/manage_billing", class_ "font-medium text-textBrand underline underline-offset-2"] "Review billing or change plan" - a_ [href_ $ "/p/" <> project.id.toText <> "/manage_billing", hxGet_ $ "/p/" <> project.id.toText <> "/manage_subscription", term "hx-preload" "false", class_ "font-medium text-textBrand underline underline-offset-2"] "Update payment method" + -- A cancelled Stripe sub can't be revived from the portal; checkout starts a new one and collects what's owed. + let stripe = Projects.projectProvider project == Projects.StripeProvider + a_ ([href_ $ "/p/" <> project.id.toText <> "/manage_billing", class_ "font-medium text-textBrand underline underline-offset-2"] <> bool [hxGet_ $ "/p/" <> project.id.toText <> "/manage_subscription", term "hx-preload" "false"] [] stripe) + $ bool "Update payment method" "Reactivate subscription" stripe -- Keep fixed fullscreen panels and drawers below the project notices. section_ [class_ "relative flex flex-row flex-1 min-h-0 overflow-hidden", style_ "contain: layout"] do when (isJust bcfg.currProject) diff --git a/src/Pages/Components.hs b/src/Pages/Components.hs index 36225b6a8..a488f8782 100644 --- a/src/Pages/Components.hs +++ b/src/Pages/Components.hs @@ -1,4 +1,4 @@ -module Pages.Components (drawer_, PanelStyle (..), PanelCfg (..), panel_, entityHeader_, detailSection_, pivotLinks_, disclosure_, settingsSection_, settingsH2_, sectionLabel_, fieldLabel_, headerRow_, navBar, brandLogo_, resizer_, resizerWith_, detailTab_, httpTab_, tabPanel_, segmented_, periodToggle_, Deferred (..), RefreshingDeferred (..), withDeferredBody, deferredShell_, lazyPanel_, timeRefreshListener_, drawerLoadingSkeleton_, tableSkeleton_, chartSkeleton_, EmptyStateCfg (..), EmptyStateSize (..), EmptyStateAction (..), emptyState_, callout_, BadgeColor (..), IconBadgeSize (..), iconBadge_, tonePill_, colorChip_, metadataChip_, metaChip_, connectionBadge_, silenceBadge_, statFigure_, factGrid_, kvList_, sparkline_, eventsCountCell_, lastSeenCell_, dateTime, localTimeFmt_, FieldSize (..), FieldCfg (..), formField_, formSelectField_, formCheckbox_, options_, roleOptions_, tagInput_, toggleRow_, searchInput_, copyField_, copyButton_, facetRail_, facetSection_, facetOption_, ModalCfg (..), modalWith_, formActionsModal_, dangerAction_, floatingDialog_, dialogField_, kbdHints_, durationMenu_, primaryButton_, inlineIconBtn_, RowAction (..), rowActions_, externalLink_, installationSettingsLink_, dirtyFormSaveAttr_, resetFormOnSuccessAttr_, detailsClosedBelowAttr_, keyboardActivateAttr_, listboxNavAttr_, copySourceAttr_, filterInputAttr_, TraceFrame (..), stackTrace_, stackFrames_, codeContextUrl, curlCommand, getTargetPage, abbreviateUnit, agoText, durationQuery, untilLabel, paymentPlanPicker) where +module Pages.Components (drawer_, PanelStyle (..), PanelCfg (..), panel_, entityHeader_, detailSection_, pivotLinks_, disclosure_, settingsSection_, settingsH2_, sectionLabel_, fieldLabel_, headerRow_, navBar, brandLogo_, resizer_, resizerWith_, detailTab_, httpTab_, tabPanel_, segmented_, periodToggle_, Deferred (..), RefreshingDeferred (..), withDeferredBody, deferredShell_, lazyPanel_, timeRefreshListener_, drawerLoadingSkeleton_, tableSkeleton_, chartSkeleton_, EmptyStateCfg (..), EmptyStateSize (..), EmptyStateAction (..), emptyState_, callout_, BadgeColor (..), IconBadgeSize (..), iconBadge_, tonePill_, colorChip_, metadataChip_, metaChip_, connectionBadge_, silenceBadge_, statFigure_, factGrid_, kvList_, sparkline_, eventsCountCell_, lastSeenCell_, dateTime, localTimeFmt_, FieldSize (..), FieldCfg (..), formField_, formSelectField_, formCheckbox_, options_, roleOptions_, tagInput_, toggleRow_, searchInput_, copyField_, copyButton_, facetRail_, facetSection_, facetOption_, ModalCfg (..), modalWith_, formActionsModal_, dangerAction_, floatingDialog_, dialogField_, kbdHints_, durationMenu_, primaryButton_, inlineIconBtn_, RowAction (..), rowActions_, externalLink_, installationSettingsLink_, dirtyFormSaveAttr_, resetFormOnSuccessAttr_, detailsClosedBelowAttr_, keyboardActivateAttr_, listboxNavAttr_, copySourceAttr_, filterInputAttr_, TraceFrame (..), stackTrace_, stackFrames_, codeContextUrl, curlCommand, getTargetPage, abbreviateUnit, agoText, durationQuery, untilLabel, grantsTrial, paymentPlanPicker) where import Data.Default (Default (..)) import Data.List (elemIndex, findIndex, lookup) @@ -291,8 +291,8 @@ localTimeFmt_ dfFmt ts = (toHtml $ formatTime defaultTimeLocale "%b %d, %H:%M:%S UTC" ts) -paymentPlanPicker :: Projects.ProjectId -> Text -> Text -> Text -> Bool -> Bool -> Bool -> Projects.BillingProvider -> Html () -paymentPlanPicker pid lemonUrl criticalUrl currentPlan freePricingEnabled basicAuthEnabled isOnboarding provider = do +paymentPlanPicker :: Projects.ProjectId -> Text -> Text -> Text -> Bool -> Bool -> Bool -> Bool -> Projects.BillingProvider -> Html () +paymentPlanPicker pid lemonUrl criticalUrl currentPlan freePricingEnabled basicAuthEnabled trialEligible isOnboarding provider = do let useStripe = provider /= Projects.LemonSqueezyProvider div_ ([class_ "flex flex-col gap-8 w-full"] <> [hxVals_ "{\"isOnboarding\": true}" | isOnboarding]) do unless basicAuthEnabled $ div_ [class_ "flex flex-col gap-2 w-full"] do @@ -307,8 +307,8 @@ paymentPlanPicker pid lemonUrl criticalUrl currentPlan freePricingEnabled basicA then openSourcePricing pid (isCurrent "Open Source") >> enterprisePricing else do when freePricingEnabled $ freePricing pid (isCurrent "Free") - popularPricing pid lemonUrl (isCurrent "Bring nothing") freePricingEnabled useStripe - systemsPricing pid criticalUrl (isCurrent "Bring your own storage") useStripe + popularPricing pid lemonUrl (isCurrent "Bring nothing") freePricingEnabled trialEligible useStripe + systemsPricing pid criticalUrl (isCurrent "Bring your own storage") trialEligible useStripe unless useStripe do script_ [src_ "https://assets.lemonsqueezy.com/lemon.js"] ("" :: Text) script_ @@ -381,11 +381,18 @@ pricingButton_ isCurrent normalCls attrs label = $ bool label "Current plan" isCurrent +-- | Whether a Stripe checkout for @plan@ comes with the 30-day trial: first-time buyers only, +-- and never on Bring-your-own-storage. +grantsTrial :: Bool -> Text -> Bool +grantsTrial trialEligible plan = trialEligible && plan /= "SystemsPricing" + + -- | Plan CTA: inert when already the current plan, else a Stripe checkout POST or a LemonSqueezy popup. -pricingCta_ :: Projects.ProjectId -> Text -> Text -> Text -> Bool -> Bool -> Html () -pricingCta_ pid plan normalCls lemonUrl isCurrent useStripe = +pricingCta_ :: Projects.ProjectId -> Text -> Text -> Text -> Bool -> Bool -> Bool -> Html () +pricingCta_ pid plan normalCls lemonUrl isCurrent trialEligible useStripe = div_ [[__|on click halt|]] - $ pricingButton_ isCurrent normalCls (type_ "button" : attrs) "Start 30 day free trial" + $ pricingButton_ isCurrent normalCls (type_ "button" : attrs) + $ bool "Subscribe" "Start 30 day free trial" (not useStripe || grantsTrial trialEligible plan) where attrs :: [Attribute] attrs @@ -415,8 +422,8 @@ freePricing pid isCurrent = "What's included:" -popularPricing :: Projects.ProjectId -> Text -> Bool -> Bool -> Bool -> Html () -popularPricing pid lemonUrl isCurrent freeTierEnabled useStripe = +popularPricing :: Projects.ProjectId -> Text -> Bool -> Bool -> Bool -> Bool -> Html () +popularPricing pid lemonUrl isCurrent freeTierEnabled trialEligible useStripe = div_ [class_ "relative"] $ div_ (pricingPostAttrs pid "GraduatedPricing" "outline-strokeWeak shadow-[0px_3px_3px_-1.5px_rgba(10,13,18,0.04)] shadow-[0px_8px_8px_-4px_rgba(10,13,18,0.03)] shadow-[0px_20px_24px_-4px_rgba(10,13,18,0.08)]" [hxVals_ "js:{orderIdM: document.querySelector('#popularPricing').value}"]) do div_ [class_ "pricing-gradient-slate-wide"] pass @@ -426,13 +433,13 @@ popularPricing pid lemonUrl isCurrent freeTierEnabled useStripe = "Bring nothing" "This plan can be adjusted" (priceDisplay_ [term "hx-live:text" "(v => v <= 2e7 ? 29 : 29 + (v - 2e7) / 1e6)(+q('#price_range').value)"] "29" "/per month") - (pricingCta_ pid "GraduatedPricing" "btn-primary" lemonUrl isCurrent useStripe) + (pricingCta_ pid "GraduatedPricing" "btn-primary" lemonUrl isCurrent trialEligible useStripe) ["Fully managed cloud service", "Predictable usage-based pricing", "Intelligent incident alerts", "Query your data in english", "30 days data retention included"] (span_ [] $ when freeTierEnabled $ "Everything in " >> span_ [class_ "text-textBrand"] "free" >> " plus...") -systemsPricing :: Projects.ProjectId -> Text -> Bool -> Bool -> Html () -systemsPricing pid critical isCurrent useStripe = +systemsPricing :: Projects.ProjectId -> Text -> Bool -> Bool -> Bool -> Html () +systemsPricing pid critical isCurrent trialEligible useStripe = pricingBadge_ (span_ [class_ "text-sm font-medium leading-tight"] "🌟" >> span_ [class_ "leading-tight text-sm"] "MOST POPULAR") $ div_ (pricingPostAttrs pid "SystemsPricing" "outline-strokeBrand-strong" [hxVals_ "js:{orderIdM: document.querySelector('#systemsPricing').value}"]) $ div_ [class_ "flex flex-col gap-2"] do @@ -442,7 +449,7 @@ systemsPricing pid critical isCurrent useStripe = "Bring your own storage" "Business plan" (priceDisplay_ [term "hx-live:text" "(v => v <= 1e8 ? 199 : 199 + (v - 1e8) / 1e6)(+q('#price_range').value)"] "199" "/per month") - (pricingCta_ pid "SystemsPricing" "bg-fillStrong text-textInverse-strong" critical isCurrent useStripe) + (pricingCta_ pid "SystemsPricing" "bg-fillStrong text-textInverse-strong" critical isCurrent trialEligible useStripe) ["Own and control all your data", "Save all your data to any S3-compatible bucket", "Unlimited data retention period", "Query years of data via monoscope", "No extra cost for data retention"] (span_ [] $ "Everything in " >> span_ [class_ "text-textBrand"] "bring nothing" >> " plus...") diff --git a/src/Pages/LogExplorer/Log.hs b/src/Pages/LogExplorer/Log.hs index 923cbd8f4..878c30142 100644 --- a/src/Pages/LogExplorer/Log.hs +++ b/src/Pages/LogExplorer/Log.hs @@ -1130,19 +1130,15 @@ lookupAlert :: DB es => Maybe Text -> Eff es (Maybe Monitors.QueryMonitor) lookupAlert = maybe (pure Nothing) (Monitors.queryMonitorById . Monitors.QueryMonitorId) . (>>= UUID.fromText) --- | One-decimal percent formatter. +-- | One-decimal percent formatter; positive rates never round down to zero. -- -- >>> import "monoscope" Pages.LogExplorer.Log qualified as LL --- >>> LL.fmtPct1 0 --- "0.0%" --- >>> LL.fmtPct1 5.24 --- "5.2%" --- >>> LL.fmtPct1 100 --- "100.0%" --- >>> LL.fmtPct1 (-1.25) --- "-1.2%" +-- >>> map LL.fmtPct1 [0, 0.03, 0.05, 5.24, 100, -1.25] +-- ["0.0%","<0.1%","0.1%","5.2%","100.0%","-1.2%"] fmtPct1 :: Double -> Text -fmtPct1 x = showFFloat' 1 x <> "%" +fmtPct1 x + | x > 0 && x < 0.05 = "<0.1%" + | otherwise = showFFloat' 1 x <> "%" -- | Shimmer placeholder mirroring 'sessionsHeader_' (6-KPI grid + over-time bar diff --git a/src/Pages/Onboarding.hs b/src/Pages/Onboarding.hs index 5340417e6..de2c6b512 100644 --- a/src/Pages/Onboarding.hs +++ b/src/Pages/Onboarding.hs @@ -74,9 +74,10 @@ onboardingGetH pid stepM = do discordUrl = "https://discord.com/oauth2/authorize?response_type=code&client_id=" <> appCtx.config.discordClientId <> "&permissions=277025392640&integration_type=0&scope=bot+applications.commands&state=" <> pid.toText <> "__onboarding&redirect_uri=" <> appCtx.env.discordRedirectUri pure $ NotifChannelStep pid slackUrl discordUrl phone (maybe mempty (.notify_emails) everyoneTeamM) hasSlack hasDiscord Integration -> IntegrationStep pid . maybe "" (.keyPrefix) . listToMaybe <$> ProjectApiKeys.projectApiKeysByProjectId pid - Pricing -> + Pricing -> do + billing <- Projects.userBilling sess.user.id let checkout u = u <> "&checkout[custom][project_id]=" <> pid.toText - in pure $ PricingStep pid (checkout appCtx.config.lemonSqueezyUrl) (checkout appCtx.config.lemonSqueezyCriticalUrl) project.paymentPlan appCtx.config.enableFreetier appCtx.config.basicAuthEnabled + pure $ PricingStep pid (checkout appCtx.config.lemonSqueezyUrl) (checkout appCtx.config.lemonSqueezyCriticalUrl) project.paymentPlan appCtx.config.enableFreetier appCtx.config.basicAuthEnabled (not billing.hasSubscribedBefore) Info -> pure $ InfoStep pid sess.user.firstName sess.user.lastName (q "companyName") (q "companySize") (q "foundUsFrom") addRespHeaders $ OnboardingGet $ PageCtx bw{currProject = Nothing, hideNavbar = True} stepData @@ -142,6 +143,7 @@ data OnboardingStepData , paymentPlan :: Text , enableFreetier :: Bool , basicAuthEnabled :: Bool + , trialEligible :: Bool } | CompleteStep { stepPid :: Projects.ProjectId @@ -162,7 +164,7 @@ instance ToHtml OnboardingGet where SurveyStep{..} -> onboardingConfigBody stepPid location functionality NotifChannelStep{..} -> notifChannelsWithUrls slackUrl discordUrl stepPid phoneNumber emails hasDiscord hasSlack IntegrationStep{..} -> integrationsPage stepPid apiKey - PricingStep{..} -> pricingPage stepPid lemonUrl criticalUrl paymentPlan enableFreetier basicAuthEnabled + PricingStep{..} -> pricingPage stepPid lemonUrl criticalUrl paymentPlan enableFreetier basicAuthEnabled trialEligible InfoStep{..} -> onboardingInfoBody stepPid firstName lastName companyName companySize foundUsFrom toHtmlRaw = toHtml @@ -272,12 +274,12 @@ onboardingCompleteBody pid = do script_ [src_ "/public/assets/js/confetti.js"] ("" :: Text) -pricingPage :: Projects.ProjectId -> Text -> Text -> Text -> Bool -> Bool -> Html () -pricingPage pid lemon critical paymentPlan freeTierEnabled basicAuthEnabled = +pricingPage :: Projects.ProjectId -> Text -> Text -> Text -> Bool -> Bool -> Bool -> Html () +pricingPage pid lemon critical paymentPlan freeTierEnabled basicAuthEnabled trialEligible = div_ [class_ "w-full max-w-[1100px] mx-auto mt-[70px] mb-10 px-4 md:px-0"] $ do div_ [class_ "flex-col gap-4 flex w-full"] $ do div_ [class_ "w-full md:w-1/2"] $ stepIndicator 5 "Please pick a plan" $ stepUrl pid Integration - paymentPlanPicker pid lemon critical paymentPlan freeTierEnabled basicAuthEnabled True Projects.NoBillingProvider + paymentPlanPicker pid lemon critical paymentPlan freeTierEnabled basicAuthEnabled trialEligible True Projects.NoBillingProvider div_ [class_ "flex flex-col gap-2 w-full pb-20"] do span_ [class_ "text-textStrong text-2xl mt-20"] "FAQ" div_ [class_ "join join-vertical w-full mt-4"] do diff --git a/src/Pages/Projects.hs b/src/Pages/Projects.hs index fccdbfbe8..443e10708 100644 --- a/src/Pages/Projects.hs +++ b/src/Pages/Projects.hs @@ -96,8 +96,9 @@ import Relude hiding (ask, asks) import Servant (addHeader) import Servant.API (Header) import Servant.API.ResponseHeaders (Headers) -import Servant.Server (err302, err500, errBody, errHeaders) +import Servant.Server (err302, err500, err503, errBody, errHeaders) import System.Config (AuthContext (..), EnvConfig (..)) +import System.Logging qualified as Log import System.Types (ATAuthCtx, RespHeaders, addErrorToast, addRespHeaders, addReswap, addSuccessToast, addTriggerEvent, redirectCS, toastError) import Utils (LoadingSize (..), encodeText, faSprite_, htmxIndicator_, isDemoAndNotSudo, lookupValueText) import Web.FormUrlEncoded (FromForm) @@ -1159,9 +1160,19 @@ newtype StripeCheckoutForm = StripeCheckoutForm {plan :: Text} stripeCheckoutInitH :: Projects.ProjectId -> StripeCheckoutForm -> ATAuthCtx (RespHeaders (Html ())) stripeCheckoutInitH pid form = do - (sess, _) <- Projects.sessionAndProject pid + (sess, project) <- Projects.sessionAndProject pid appCtx <- ask @AuthContext let envCfg = appCtx.config + lapsedSubId = guard (Projects.isFreeTier project.paymentPlan && Projects.projectProvider project == Projects.StripeProvider) *> mfilter (not . T.null) project.subId + debts <- + maybe + (pure []) + ( BackgroundJobs.getStripeInvoices envCfg.stripeSecretKey BackgroundJobs.OpenInvoices + >=> either + (\err -> Log.logAttention "Stripe reactivation invoice lookup failed" (pid.toText, err) >> throwError err503{errBody = "Unable to verify outstanding invoices. Please retry."}) + (pure . filter (\i -> i.status == "open" && i.amountRemaining > 0)) + ) + lapsedSubId -- Keyed to the buyer, not the project: people run several projects, and each one -- used to mint its own Stripe customer and hand out its own 30-day trial. billing <- Projects.userBilling sess.user.id @@ -1169,6 +1180,7 @@ stripeCheckoutInitH pid form = do =<< Settings.createStripeCheckoutSession (not billing.hasSubscribedBefore) billing.stripeCustomerId + debts envCfg.stripeSecretKey envCfg.hostUrl pid diff --git a/src/Pages/Settings.hs b/src/Pages/Settings.hs index b8dc063a7..c85390e8f 100644 --- a/src/Pages/Settings.hs +++ b/src/Pages/Settings.hs @@ -60,7 +60,7 @@ module Pages.Settings ( billingUrl, ) where -import Control.Lens ((.~), (^.)) +import Control.Lens ((.~), (?~), (^.)) import Data.Aeson qualified as AE import Data.Aeson.Types (parseMaybe) import Data.ByteArray qualified as BA @@ -110,14 +110,14 @@ import Network.HTTP.Types (urlEncode) import Network.Minio qualified as Minio import Network.Wreq qualified as Wreq import Pages.BodyWrapper (BWConfig (..), PageCtx (..), mkPageCtx, settingsContentTarget) -import Pages.Components (BadgeColor (..), EmptyStateCfg (..), EmptyStateSize (..), FieldCfg (..), FieldSize (..), IconBadgeSize (..), ModalCfg (..), callout_, connectionBadge_, copyField_, copySourceAttr_, dangerAction_, disclosure_, emptyState_, filterInputAttr_, formActionsModal_, formCheckbox_, formField_, headerRow_, iconBadge_, keyboardActivateAttr_, localTimeFmt_, modalWith_, options_, paymentPlanPicker, searchInput_, sectionLabel_, settingsH2_, settingsSection_, tonePill_) +import Pages.Components (BadgeColor (..), EmptyStateCfg (..), EmptyStateSize (..), FieldCfg (..), FieldSize (..), IconBadgeSize (..), ModalCfg (..), callout_, connectionBadge_, copyField_, copySourceAttr_, dangerAction_, disclosure_, emptyState_, filterInputAttr_, formActionsModal_, formCheckbox_, formField_, grantsTrial, headerRow_, iconBadge_, keyboardActivateAttr_, localTimeFmt_, modalWith_, options_, paymentPlanPicker, searchInput_, sectionLabel_, settingsH2_, settingsSection_, tonePill_) import Pkg.Components.Table qualified as Table import Pkg.DeriveUtils (DB, UUIDId (..), WrappedEnumSC (..)) import Pkg.EmailTemplates qualified as ET import Pkg.Mail (NotificationAlerts (..), sampleAlertByIssueTypeText, sampleReport, sendDiscordAlert, sendPagerdutyAlertToService, sendRenderedEmail, sendSlackAlert, sendWhatsAppAlert) import Pkg.Prometheus qualified as Prom import Relude hiding (ask, asks) -import Servant (FromHttpApiData (..), err400, errBody) +import Servant (FromHttpApiData (..), err400, err503, errBody) import System.Config import System.Types (ATAuthCtx, ATBaseCtx, RespHeaders, addErrorToast, addRespHeaders, addReswap, addSuccessToast, addTriggerEvent) import Text.Printf (printf) @@ -1185,6 +1185,7 @@ data BillingData = BillingData , paymentPlan :: Text , enableFreetier :: Bool , basicAuthEnabled :: Bool + , trialEligible :: Bool , provider :: Projects.BillingProvider , dailyUsage :: [Projects.DailyUsage] -- ^ (day, total_requests, metrics, eventBytes, metricBytes); events = total_requests - metrics @@ -1223,7 +1224,8 @@ instance ToHtml BillingGet where manageBillingGetH :: Projects.ProjectId -> ATAuthCtx (RespHeaders BillingGet) manageBillingGetH pid = do - (_, project, bw) <- mkPageCtx pid + (sess, project, bw) <- mkPageCtx pid + billing <- Projects.userBilling sess.user.id let dat = fromMaybe project.createdAt project.billingDay envCfg = bw.config currentTime <- Time.currentTime @@ -1273,7 +1275,7 @@ manageBillingGetH pid = do lemonUrl = envCfg.lemonSqueezyUrl <> "&checkout[custom][project_id]=" <> pid.toText critical = envCfg.lemonSqueezyCriticalUrl <> "&checkout[custom][project_id]=" <> pid.toText provider = Projects.projectProvider project - addRespHeaders $ BillingGet $ PageCtx bwconf BillingData{pid, totalReqs = totalRequests, totalBytes, aiInputTokens, aiOutputTokens, aiCostMicrousd, aiInputRate = envCfg.aiInputMicrousdPerMillionTokens, aiOutputRate = envCfg.aiOutputMicrousdPerMillionTokens, lastReported, lemonUrl, critical, paymentPlan = project.paymentPlan, enableFreetier = envCfg.enableFreetier, basicAuthEnabled = envCfg.basicAuthEnabled, provider, dailyUsage, cycleStart = utctDay cycleStart, cycleEnd, currentInvoice, pastCycles} + addRespHeaders $ BillingGet $ PageCtx bwconf BillingData{pid, totalReqs = totalRequests, totalBytes, aiInputTokens, aiOutputTokens, aiCostMicrousd, aiInputRate = envCfg.aiInputMicrousdPerMillionTokens, aiOutputRate = envCfg.aiOutputMicrousdPerMillionTokens, lastReported, lemonUrl, critical, paymentPlan = project.paymentPlan, enableFreetier = envCfg.enableFreetier, basicAuthEnabled = envCfg.basicAuthEnabled, trialEligible = not billing.hasSubscribedBefore, provider, dailyUsage, cycleStart = utctDay cycleStart, cycleEnd, currentInvoice, pastCycles} where epochDay :: Int -> Day epochDay = utctDay . posixSecondsToUTCTime . fromIntegral @@ -1306,7 +1308,11 @@ stripeBillingPeriods envCfg project Log.logAttention "Billing page: Stripe period unavailable, falling back to local cycle" (project.id.toText, subId) pure Nothing Just (start, end) -> do - invoices <- BJ.getStripeInvoices envCfg.stripeSecretKey subId + invoices <- + BJ.getStripeInvoices envCfg.stripeSecretKey BJ.RecentInvoices subId + >>= either + (\err -> Log.logAttention "Billing page: Stripe invoice lookup failed" (project.id.toText, err) $> []) + pure pure $ Just StripePeriods{periodStart = posixSecondsToUTCTime (fromIntegral start), periodEnd = posixSecondsToUTCTime (fromIntegral end), invoices} @@ -1381,7 +1387,7 @@ billingPage d = div_ [] do span_ [class_ "text-textStrong text-2xl font-semibold"] "Compare Plans" p_ [class_ "mt-2 mb-4"] "Drag the slider to estimate costs at different usage levels." -- Free upgrades use Stripe; billing recovery keeps the existing provider. - paymentPlanPicker d.pid d.lemonUrl d.critical d.paymentPlan d.enableFreetier d.basicAuthEnabled False (bool d.provider Projects.NoBillingProvider isFree) + paymentPlanPicker d.pid d.lemonUrl d.critical d.paymentPlan d.enableFreetier d.basicAuthEnabled d.trialEligible False (bool d.provider Projects.NoBillingProvider isFree) usd :: Double -> Text @@ -1556,8 +1562,11 @@ stripeSessionUrl apiKey endpoint params = do -- `customerM` is the buyer's existing Stripe customer, when they have one. Omitting -- it makes Stripe mint a fresh Customer per session, so one person upgrading a second -- project became a second unrelated customer on the same card. -createStripeCheckoutSession :: W.HTTP :> es => Bool -> Maybe Text -> Text -> Text -> Projects.ProjectId -> Text -> Text -> Text -> Text -> Eff es (Maybe Text) -createStripeCheckoutSession trialEligible customerM apiKey hostUrl pid plan priceIdGraduated priceIdOverage priceIdBYOS = do +-- +-- `debts` are open invoices of the project's lapsed subscription: each becomes a +-- one-time line on the first payment, and 'handleStripeCheckout' marks them paid. +createStripeCheckoutSession :: W.HTTP :> es => Bool -> Maybe Text -> [BJ.StripeInvoice] -> Text -> Text -> Projects.ProjectId -> Text -> Text -> Text -> Text -> Eff es (Maybe Text) +createStripeCheckoutSession trialEligible customerM debts apiKey hostUrl pid plan priceIdGraduated priceIdOverage priceIdBYOS = do let basePrice = case plan of "SystemsPricing" -> priceIdBYOS _ -> priceIdGraduated @@ -1566,12 +1575,25 @@ createStripeCheckoutSession trialEligible customerM apiKey hostUrl pid plan pric , ("line_items[0][quantity]", "1") , ("line_items[1][price]", encodeUtf8 priceIdOverage) ] - trialParams = [("subscription_data[trial_period_days]", "30") | trialEligible && plan /= "SystemsPricing"] + trialParams = [("subscription_data[trial_period_days]", "30") | grantsTrial trialEligible plan] -- Stripe Managed Payments (MoR): Stripe becomes merchant of record and handles -- tax/address collection itself, so the automatic_tax + tax_id params are disallowed. managedPaymentsParams = [("managed_payments[enabled]", "true")] + debtParams = + concat + [ [ (item "[price_data][currency]", encodeUtf8 inv.currency) + , (item "[price_data][unit_amount]", show inv.amountRemaining) + , (item "[price_data][product_data][name]", encodeUtf8 $ "Outstanding balance" <> foldMap (", invoice " <>) inv.number) + , (item "[price_data][product_data][tax_code]", "txcd_10103001") + , (item "[quantity]", "1") + ] + | (i, inv) <- zip [2 :: Int ..] debts + , let item k = "line_items[" <> show i <> "]" <> k + ] + <> [("metadata[settles_invoices]", encodeUtf8 $ T.intercalate "," $ map (.invoiceId) debts) | not (null debts)] params = prices + <> debtParams <> trialParams <> managedPaymentsParams <> [("customer", encodeUtf8 c) | c <- maybeToList customerM] @@ -1604,9 +1626,12 @@ lemonSqueezyOpts apiKey = -- not block the deletion the user asked for, so failures are logged, not thrown. cancelProjectSubscription :: (Log.Log :> es, W.HTTP :> es) => EnvConfig -> Projects.Project -> Eff es () cancelProjectSubscription envConfig project = whenJust target \(opts, url) -> do - res <- trySync $ W.deleteWith opts url - whenLeft_ res \e -> - Log.logAttention "Subscription cancellation failed; subscription may still be billing" (project.id.toText, project.subId, show @Text e) + res <- trySync $ W.deleteWith (opts & Wreq.checkResponse ?~ \_ _ -> pass) url + case (^. Wreq.responseStatus . Wreq.statusCode) <$> res of + -- A sub that already ended (e.g. cancelled by dunning) 404s: nothing left to stop. + Right 404 -> Log.logInfo "Subscription already ended; nothing to cancel" (project.id.toText, project.subId) + Right code | code < 300 -> pass + failure -> Log.logAttention "Subscription cancellation failed; subscription may still be billing" (project.id.toText, project.subId, either (toText . displayException) (("HTTP " <>) . show @Text) failure) where target = do subId <- mfilter (not . T.null) project.subId @@ -1642,11 +1667,11 @@ stripeWebhookPostH sigHeaderM rawBody = do sessionObj = jsonField "data" event >>= jsonField "object" :: Maybe AE.Value handlers = [ ("checkout.session.completed", handleStripeCheckout envConfig) + , ("checkout.session.async_payment_succeeded", handleStripeCheckout envConfig) , ("customer.subscription.deleted", handleStripeDowngrade envConfig "subscription.deleted" "was cancelled") - , ("customer.subscription.updated", handleStripeSubUpdated) - , ("customer.subscription.paused", handleStripeDowngrade envConfig "subscription.paused" "was paused") - , ("customer.subscription.resumed", handleStripeSubResumed envConfig) + , ("customer.subscription.updated", handleStripeSubUpdated envConfig) , ("invoice.payment_failed", handleStripePaymentFailed envConfig) + , ("invoice.paid", handleStripeInvoicePaid envConfig) ] case (,) <$> (eventType >>= flip lookup handlers) <*> sessionObj of Just (handle, obj) -> handle obj @@ -1670,33 +1695,50 @@ handleStripeCheckout envConfig obj = do let pidM = jsonField "client_reference_id" obj :: Maybe Text subIdM = jsonField "subscription" obj :: Maybe Text customerIdM = jsonField "customer" obj :: Maybe Text - planFromMetadata = (jsonField "metadata" obj :: Maybe AE.Value) >>= jsonField "plan" :: Maybe Text + metadata = jsonField "metadata" obj :: Maybe AE.Value + planFromMetadata = metadata >>= jsonField "plan" :: Maybe Text + settledInvoices = maybe [] (T.splitOn ",") (metadata >>= jsonField "settles_invoices") case (pidM >>= Projects.projectIdFromText, subIdM, customerIdM) of + _ | not (null settledInvoices) && jsonField @Text "payment_status" obj /= Just "paid" -> pure "awaiting payment" (Just pid, Just subId, Just customerId) -> do let plan = fromMaybe "GraduatedPricing" planFromMetadata projectM <- Projects.projectById pid - -- Idempotency: skip if this subscription is already set on the project - if maybe False (\p -> p.subId == Just subId) projectM - then pure "already processed" - else do - -- Cancel whatever subscription the project held before this checkout — a - -- LemonSqueezy one (auto-migration) or an older Stripe one. The idempotency - -- guard above means project.subId is never the sub we just created, and the - -- row is about to be overwritten with the new sub, so anything left running - -- here bills the customer twice with nothing left pointing at it. - whenJust projectM $ cancelProjectSubscription envConfig - subDetails <- BJ.getStripeSubDetails envConfig.stripeSecretKey subId - when (isNothing subDetails) $ Log.logAttention "Stripe sub fetch failed after checkout" (pid.toText, subId) - let subItemId = maybe "" (.subItemId) subDetails - void $ Projects.updateStripeProjectBilling pid (Projects.PlanName plan) (Projects.SubId subId) (Projects.SubItemId subItemId) (Projects.CustomerId customerId) - void $ ProjectMembers.activateAllMembers pid - case subDetails of - Just BJ.StripeSubDetails{trialEnd = Just epoch} -> BJ.scheduleTrialReminders pid epoch - Just BJ.StripeSubDetails{status = "trialing"} -> Log.logAttention "Stripe sub trialing but trial_end missing; no reminders scheduled" (pid.toText, subId) - _ -> pass - whenJust projectM \project -> - Notify.runNotifyProduction $ notifyPlanChange envConfig project (ET.planUpgradedEmail plan) - pure "checkout processed" + -- Idempotency: skip if this subscription is already set on the project. Settling runs + -- on both paths, so a retry after a crash past the sub_id write still settles; it runs + -- after that write so the invoice.paid it triggers no longer matches the project. + res <- + if maybe False (\p -> p.subId == Just subId) projectM + then pure "already processed" + else do + -- Cancel whatever subscription the project held before this checkout — a + -- LemonSqueezy one (auto-migration) or an older Stripe one. The idempotency + -- guard above means project.subId is never the sub we just created, and the + -- row is about to be overwritten with the new sub, so anything left running + -- here bills the customer twice with nothing left pointing at it. + whenJust projectM $ cancelProjectSubscription envConfig + subDetails <- BJ.getStripeSubDetails envConfig.stripeSecretKey subId + when (isNothing subDetails) $ Log.logAttention "Stripe sub fetch failed after checkout" (pid.toText, subId) + let subItemId = maybe "" (.subItemId) subDetails + void $ Projects.updateStripeProjectBilling pid (Projects.PlanName plan) (Projects.SubId subId) (Projects.SubItemId subItemId) (Projects.CustomerId customerId) + void $ ProjectMembers.activateAllMembers pid + case subDetails of + Just BJ.StripeSubDetails{trialEnd = Just epoch} -> BJ.scheduleTrialReminders pid epoch + Just BJ.StripeSubDetails{status = "trialing"} -> Log.logAttention "Stripe sub trialing but trial_end missing; no reminders scheduled" (pid.toText, subId) + _ -> pass + whenJust projectM \project -> + Notify.runNotifyProduction $ notifyPlanChange envConfig project (ET.planUpgradedEmail plan) + pure "checkout processed" + forM_ settledInvoices \invId -> do + let url = "https://api.stripe.com/v1/invoices/" <> toString invId + opts = stripeOpts envConfig.stripeSecretKey + settled <- trySync do + invoice <- W.getWith opts url + let status = AE.decode @AE.Value (invoice ^. Wreq.responseBody) >>= jsonField @Text "status" + unless (status == Just "paid") $ void $ W.postWith opts (url <> "/pay") ([("paid_out_of_band", "true")] :: [(ByteString, ByteString)]) + whenLeft_ settled \_ -> do + Log.logAttention "Stripe checkout invoice settlement failed; requesting webhook retry" (pid.toText, invId) + throwError err503{errBody = "Invoice settlement failed. Please retry."} + pure res _ -> do Log.logAttention "Stripe checkout missing project/sub/customer" (pidM, subIdM, customerIdM) pure "missing fields" @@ -1719,19 +1761,47 @@ handleStripeDowngrade envConfig event reason obj = pure "missing sub id" -handleStripeSubUpdated :: AE.Value -> ATBaseCtx (Html ()) -handleStripeSubUpdated obj = do - let subIdM = jsonField "id" obj :: Maybe Text - newItemIdM = (jsonField "items" obj >>= jsonField "data" :: Maybe [AE.Value]) >>= listToMaybe >>= jsonField "id" :: Maybe Text - case (subIdM, newItemIdM) of - (Just subId, Just newItemId) -> - void $ Projects.updateSubItemIdBySubId newItemId subId - _ -> Log.logAttention "Stripe subscription.updated missing sub_id or item_id" (subIdM, newItemIdM) +-- | Keeps the item id current and mirrors the sub's status onto the plan: dunning that ends at +-- @unpaid@ (or a pause) downgrades, and paying the invoice by any route returns the same sub to +-- @active@, which restores the plan its price maps to. Guarded on the current plan so repeat +-- updates don't re-notify. +handleStripeSubUpdated :: EnvConfig -> AE.Value -> ATBaseCtx (Html ()) +handleStripeSubUpdated envConfig obj = do + let item0 = (jsonField "items" obj >>= jsonField "data" :: Maybe [AE.Value]) >>= listToMaybe + itemIdM = item0 >>= jsonField "id" :: Maybe Text + case (jsonField "id" obj :: Maybe Text, itemIdM) of + (Just subId, Just itemId) -> do + void $ Projects.updateSubItemIdBySubId itemId subId + whenJustM (Projects.projectBySubId subId) \project -> case (jsonField "status" obj :: Maybe Text, Projects.isFreeTier project.paymentPlan) of + (Just "unpaid", False) -> void $ handleStripeDowngrade envConfig "subscription.unpaid" "is unpaid" obj + (Just "paused", False) -> void $ handleStripeDowngrade envConfig "subscription.paused" "was paused" obj + (Just status, True) | status `elem` ["active", "trialing"] -> do + let plan = bool "GraduatedPricing" "SystemsPricing" ((item0 >>= jsonField "price" >>= jsonField "id") == Just envConfig.stripePriceIdByos) + void $ Projects.setPlanBySubId (Projects.PlanName plan) (Projects.SubItemId itemId) (Projects.SubId subId) + Notify.runNotifyProduction $ notifyPlanChange envConfig project (ET.planUpgradedEmail plan) + _ -> pass + ids -> Log.logAttention "Stripe subscription.updated missing sub_id or item_id" ids pure "subscription updated" +-- | A cancelled sub can't be revived, so paying its leftover invoice outside our checkout +-- (hosted link, email, portal) leaves the project on Free: point the payer at checkout. +-- An @unpaid@ sub's revival arrives as customer.subscription.updated instead. +handleStripeInvoicePaid :: EnvConfig -> AE.Value -> ATBaseCtx (Html ()) +handleStripeInvoicePaid envConfig obj = do + let subIdM = (jsonField "parent" obj >>= jsonField "subscription_details" >>= jsonField "subscription") <|> jsonField "subscription" obj :: Maybe Text + whenJust subIdM \subId -> whenJustM (Projects.projectBySubId subId) \project -> + when (Projects.isFreeTier project.paymentPlan) $ BJ.getStripeSubDetails envConfig.stripeSecretKey subId >>= \case + Just BJ.StripeSubDetails{status = "canceled"} -> do + Log.logInfo "Stripe invoice paid on a cancelled subscription; asking the payer to reactivate" (project.id.toText, subId) + Notify.runNotifyProduction $ notifyPlanChange envConfig project ET.invoiceSettledEmail + Just _ -> pass + Nothing -> Log.logAttention "Stripe invoice.paid: sub fetch failed; a lapsed payer may not be told to reactivate" (project.id.toText, subId) + pure "invoice paid handled" + + -- Notification only — Stripe retries payments automatically over its dunning period. --- Downgrade happens via customer.subscription.deleted when Stripe gives up. +-- Downgrade happens when Stripe gives up: subscription.deleted, or .updated to unpaid. handleStripePaymentFailed :: EnvConfig -> AE.Value -> ATBaseCtx (Html ()) handleStripePaymentFailed envConfig obj = do let attemptCount = jsonField "attempt_count" obj :: Maybe Int @@ -1741,31 +1811,3 @@ handleStripePaymentFailed envConfig obj = do Log.logAttention "Stripe invoice.payment_failed" (project.id, attemptCount, nextAttempt) Notify.runNotifyProduction $ notifyPlanChange envConfig project ET.paymentFailedEmail pure "payment failed handled" - - --- Look up the sub's price via the Stripe API, reverse-map to our plan name, and re-upgrade. --- (Pause preserved the IDs, so resume never needs a re-checkout.) -handleStripeSubResumed :: EnvConfig -> AE.Value -> ATBaseCtx (Html ()) -handleStripeSubResumed envConfig obj = - case jsonField "id" obj :: Maybe Text of - Just subId -> do - subDetailsM <- BJ.getStripeSubDetails envConfig.stripeSecretKey subId - case subDetailsM of - -- the price id reverse-maps to our internal plan name - Just BJ.StripeSubDetails{subItemId = itemId, priceId} -> do - let plan - | priceId == envConfig.stripePriceIdByos = "SystemsPricing" - | otherwise = "GraduatedPricing" - rows <- Projects.setPlanBySubId (Projects.PlanName plan) (Projects.SubItemId itemId) (Projects.SubId subId) - when (rows == 0) $ Log.logAttention "Stripe subscription.resumed: no project for sub_id" (subId, plan) - when (rows > 1) $ Log.logAttention "Stripe subscription.resumed touched multiple rows" (subId, rows) - when (rows > 0) - $ whenJustM (Projects.projectBySubId subId) \project -> - Notify.runNotifyProduction $ notifyPlanChange envConfig project (ET.planUpgradedEmail plan) - pure "subscription resumed" - Nothing -> do - Log.logAttention "Stripe subscription.resumed: could not fetch sub items" subId - pure "missing items" - Nothing -> do - Log.logAttention "Stripe subscription.resumed: missing sub id" () - pure "missing sub id" diff --git a/src/Pkg/EmailTemplates.hs b/src/Pkg/EmailTemplates.hs index 21fc63209..c2be85697 100644 --- a/src/Pkg/EmailTemplates.hs +++ b/src/Pkg/EmailTemplates.hs @@ -33,6 +33,7 @@ module Pkg.EmailTemplates ( freeTierUsageEmail, planUpgradedEmail, planDowngradedEmail, + invoiceSettledEmail, paymentFailedEmail, trialEndingEmail, @@ -1249,6 +1250,21 @@ planDowngradedEmail reason projectName = "Upgrade Plan" +-- | A cancelled subscription's leftover invoice was paid outside checkout: the money is in, but +-- nothing reactivated, since a cancelled subscription can't be revived. +invoiceSettledEmail :: Text -> Text -> (Text, Html ()) +invoiceSettledEmail projectName = + ctaEmail + ("[···] Payment received - " <> projectName) + True + ( do + h1_ "Payment Received" + richP_ ["Thanks, your outstanding invoice for ", projectName, " is paid. The subscription it belonged to had already ended, so the project is still on the Free plan."] + p_ "Reactivate from the billing page to restore full access." + ) + "Reactivate Subscription" + + -- | Provider dunning is still retrying, so nothing has changed yet; the downgrade only follows -- if every retry fails. paymentFailedEmail :: Text -> Text -> (Text, Html ()) diff --git a/test/integration/Pages/BusinessFlowsSpec.hs b/test/integration/Pages/BusinessFlowsSpec.hs index 37b698fe2..2896d19e5 100644 --- a/test/integration/Pages/BusinessFlowsSpec.hs +++ b/test/integration/Pages/BusinessFlowsSpec.hs @@ -8,7 +8,8 @@ import Data.ByteString.Base16 qualified as B16 import Data.ByteString.Lazy qualified as BL import Data.Default (def) import Data.Effectful.Hasql qualified as Hasql -import Data.Effectful.Wreq (HTTP) +import Data.Effectful.Wreq (HTTP, Options) +import Data.List (lookup) import Data.Pool (Pool, withResource) import Data.Text qualified as T import Data.Text.Lazy qualified as TL @@ -27,8 +28,10 @@ import Hasql.Interpolate qualified as HI import Lucid (renderText, toHtml) import Models.Apis.Issues qualified as Issues import Models.Projects.Projects qualified as Projects +import Network.HTTP.Types.URI (parseSimpleQuery) import OpenTelemetry.Instrumentation.Hasql qualified as OHasql import Pages.BodyWrapper (PageCtx (..)) +import Pages.Bots.BotTestHelpers (withHTTPResponses) import Pages.Dashboards qualified as Dashboards import Pages.LogExplorer.Log qualified as Log import Pages.Monitors qualified as Monitors @@ -314,6 +317,8 @@ settingsTests = do html `shouldSatisfy` TL.isInfixOf "id=\"billing-downgrade-banner\"" html `shouldSatisfy` TL.isInfixOf "Your paid subscription is no longer active. This project has been downgraded to Free." html `shouldSatisfy` TL.isInfixOf ("href=\"/p/" <> toLazy testPid.toText <> "/manage_billing\"") + -- A cancelled Stripe sub can't be revived from the portal, only by a new checkout. + html `shouldSatisfy` TL.isInfixOf (bool "Update payment method" "Reactivate subscription" (provider == Projects.StripeProvider)) session <- refreshSession tr.trPool tr.trATCtx.hasqlPool tr.trSessAndHeader (_, billing) <- testServant tr{trSessAndHeader = session} $ Settings.manageBillingGetH testPid renderText (toHtml billing) `shouldSatisfy` TL.isInfixOf ("hx-get=\"/p/" <> toLazy testPid.toText <> "/manage_subscription\"") @@ -517,7 +522,9 @@ stripeBillingTests = do let checkout = runAsBaseRecordingHTTP tr . atAuthToBase tr.trSessAndHeader . flip CreateProject.stripeCheckoutInitH (CreateProject.StripeCheckoutForm "GraduatedPricing") sessionBody reqs = snd <$> find ((== "https://api.stripe.com/v1/checkout/sessions") . fst) reqs - -- First ever upgrade: no customer to reuse, trial granted. + -- First ever upgrade: no customer to reuse, trial granted, and the plan button says so. + (_, LemonSqueezy.BillingGet (PageCtx _ fresh)) <- testServant tr $ LemonSqueezy.manageBillingGetH testPid + renderText (LemonSqueezy.billingPage fresh) `shouldSatisfy` TL.isInfixOf "Start 30 day free trial" (firstReqs, _) <- checkout testPid case sessionBody firstReqs of Nothing -> fail "no checkout session request recorded" @@ -540,28 +547,126 @@ stripeBillingTests = do -- that the cancel reads the OLD sub_id, i.e. that it stays ahead of the write. it "stripe checkout webhook cancels the subscription the project held before" \TestContext{tcResources = tr, tcProjectId = testPid} -> do _ <- runQueryEffect tr $ Projects.updateStripeProjectBilling testPid (Projects.PlanName "GraduatedPricing") (Projects.SubId "sub_old") (Projects.SubItemId "si_old") (Projects.CustomerId "cus_test") - now <- getTestTime tr.trTestClock - let body = - BL.toStrict - $ AE.encode - $ AE.object - [ "type" AE..= ("checkout.session.completed" :: Text) - , "data" - AE..= AE.object - [ "object" - AE..= AE.object - [ "client_reference_id" AE..= testPid.toText - , "subscription" AE..= ("sub_new" :: Text) - , "customer" AE..= ("cus_test" :: Text) - ] - ] - ] - ts = show @Text @Integer $ round $ utcTimeToPOSIXSeconds now - mac = HMAC.hmac (encodeUtf8 @Text @ByteString tr.trATCtx.env.stripeWebhookSecret) (encodeUtf8 @Text @ByteString ts <> "." <> body) :: HMAC.HMAC SHA256 - sigHeader = "t=" <> ts <> ",v1=" <> decodeUtf8 (B16.encode $ BA.convert mac) - (reqs, _) <- runAsBaseRecordingHTTP tr $ LemonSqueezy.stripeWebhookPostH (Just sigHeader) body + reqs <- stripeCheckoutCompleted tr testPid [] map fst reqs `shouldContain` ["https://api.stripe.com/v1/subscriptions/sub_old"] + -- Stripe cancels a subscription whose payments keep failing, and a cancelled one can't + -- be revived. Paying the leftover invoice in the portal left the project on Free, so + -- reactivating is one Managed Payments checkout that also carries that invoice + -- (Shipbubble, 2026-10-23: $68.37 open on a sub cancelled 2026-09-29). + it "stripeReactivation_lapsedSubscription_settlesOpenInvoiceAndUpgrades" \TestContext{tcResources = tr, tcProjectId = testPid} -> do + _ <- runQueryEffect tr $ Projects.updateStripeProjectBilling testPid (Projects.PlanName "GraduatedPricing") (Projects.SubId "sub_lapsed") (Projects.SubItemId "si_lapsed") (Projects.CustomerId "cus_lapsed") + _ <- runQueryEffect tr $ Projects.downgradeToFreeBySubId "sub_lapsed" + session <- refreshSession tr.trPool tr.trATCtx.hasqlPool tr.trSessAndHeader + -- Checkout withholds a repeat trial, so the button must not promise one. + (_, LemonSqueezy.BillingGet (PageCtx _ lapsed)) <- testServant tr{trSessAndHeader = session} $ LemonSqueezy.manageBillingGetH testPid + renderText (LemonSqueezy.billingPage lapsed) `shouldNotSatisfy` TL.isInfixOf "free trial" + let invoices = AE.encode $ AE.object ["has_more" AE..= True, "data" AE..= ([invoice "in_owed" "open" 6837] :: [AE.Value])] + invoice id' status remaining = AE.object ["id" AE..= (id' :: Text), "currency" AE..= ("usd" :: Text), "status" AE..= (status :: Text), "number" AE..= ("MONO-0003" :: Text), "total" AE..= (6837 :: Int), "amount_remaining" AE..= (remaining :: Int), "period_start" AE..= (1786787328 :: Int), "period_end" AE..= (1789465728 :: Int)] + lapsedInvoices _ url = pure do + guard $ "https://api.stripe.com/v1/invoices?" `T.isPrefixOf` toText url + pure + $ if "starting_after=in_owed" `T.isInfixOf` toText url + then AE.encode $ AE.object ["has_more" AE..= False, "data" AE..= ([invoice "in_older" "open" 100] :: [AE.Value])] + else invoices + (reqs, _) <- runAsBaseRecordingHTTP tr $ withHTTPResponses lapsedInvoices $ atAuthToBase session $ CreateProject.stripeCheckoutInitH testPid (CreateProject.StripeCheckoutForm "GraduatedPricing") + form <- maybe (fail "no checkout session request recorded") (pure . parseSimpleQuery . toStrict . snd) $ find ((== "https://api.stripe.com/v1/checkout/sessions") . fst) reqs + map (`lookup` form) ["line_items[2][price_data][unit_amount]", "line_items[3][price_data][unit_amount]", "line_items[4][price_data][unit_amount]", "metadata[settles_invoices]", "managed_payments[enabled]"] + `shouldBe` ([Just "6837", Just "100", Nothing, Just "in_owed,in_older", Just "true"] :: [Maybe ByteString]) + + paid <- stripeCheckoutCompleted tr testPid [("settles_invoices", "in_owed")] + lookup "https://api.stripe.com/v1/invoices/in_owed/pay" paid `shouldBe` Just "paid_out_of_band=true" + fmap (.paymentPlan) <$> runQueryEffect tr (Projects.projectById testPid) `shouldReturn` Just "GraduatedPricing" + + it "stripeReactivation_invoiceLookupFailure_doesNotCreateACheckoutWithoutTheDebt" \TestContext{tcResources = tr, tcProjectId = testPid} -> do + _ <- runQueryEffect tr $ Projects.updateStripeProjectBilling testPid (Projects.PlanName "Free") (Projects.SubId "sub_lapsed") (Projects.SubItemId "si_lapsed") (Projects.CustomerId "cus_test") + session <- refreshSession tr.trPool tr.trATCtx.hasqlPool tr.trSessAndHeader + let unavailable _ url + | "https://api.stripe.com/v1/invoices?" `T.isPrefixOf` toText url = throwIO $ userError "Stripe temporarily unavailable" + | otherwise = pure Nothing + (requests, status) <- + runAsBaseRecordingHTTP tr + $ catchError @ServantS.ServerError + (withHTTPResponses unavailable (atAuthToBase session $ CreateProject.stripeCheckoutInitH testPid (CreateProject.StripeCheckoutForm "GraduatedPricing")) $> 200) + (\_ err -> pure err.errHTTPCode) + status `shouldBe` 503 + map fst requests `shouldNotContain` ["https://api.stripe.com/v1/checkout/sessions"] + + it "stripeReactivation_settlementFailure_requestsRetryAfterTheProjectUpgrade" \TestContext{tcResources = tr, tcProjectId = testPid} -> do + _ <- runQueryEffect tr $ Projects.updateStripeProjectBilling testPid (Projects.PlanName "Free") (Projects.SubId "sub_lapsed") (Projects.SubItemId "si_lapsed") (Projects.CustomerId "cus_test") + let obj = AE.object ["client_reference_id" AE..= testPid.toText, "subscription" AE..= ("sub_new" :: Text), "customer" AE..= ("cus_test" :: Text), "payment_status" AE..= ("paid" :: Text), "metadata" AE..= AE.object ["settles_invoices" AE..= ("in_settled,in_owed" :: Text)]] + responses failPayment _ url + | url == "https://api.stripe.com/v1/invoices/in_settled" = pure $ Just "{\"status\":\"paid\"}" + | failPayment && url == "https://api.stripe.com/v1/invoices/in_owed/pay" = throwIO $ userError "Stripe temporarily unavailable" + | otherwise = pure Nothing + (_, failedStatus) <- stripeWebhook tr (responses True) "checkout.session.completed" obj + failedStatus `shouldBe` 503 + fmap (.subId) <$> runQueryEffect tr (Projects.projectById testPid) `shouldReturn` Just (Just "sub_new") + (retried, retryStatus) <- stripeWebhook tr (responses False) "checkout.session.completed" obj + retryStatus `shouldBe` 200 + lookup "https://api.stripe.com/v1/invoices/in_owed/pay" retried `shouldBe` Just "paid_out_of_band=true" + map fst retried `shouldNotContain` ["https://api.stripe.com/v1/subscriptions/sub_new", "https://api.stripe.com/v1/invoices/in_settled/pay"] + + it "stripeReactivation_unpaidCheckout_waitsForThePaymentToSucceed" \TestContext{tcResources = tr, tcProjectId = testPid} -> do + _ <- runQueryEffect tr $ Projects.updateStripeProjectBilling testPid (Projects.PlanName "Free") (Projects.SubId "sub_lapsed") (Projects.SubItemId "si_lapsed") (Projects.CustomerId "cus_test") + let checkout status = AE.object ["client_reference_id" AE..= testPid.toText, "subscription" AE..= ("sub_new" :: Text), "customer" AE..= ("cus_test" :: Text), "payment_status" AE..= (status :: Text), "metadata" AE..= AE.object ["settles_invoices" AE..= ("in_owed" :: Text)]] + (unpaidRequests, pendingStatus) <- stripeWebhook tr (\_ _ -> pure Nothing) "checkout.session.completed" (checkout "unpaid") + pendingStatus `shouldBe` 200 + map fst unpaidRequests `shouldNotContain` ["https://api.stripe.com/v1/invoices/in_owed/pay"] + fmap (.paymentPlan) <$> runQueryEffect tr (Projects.projectById testPid) `shouldReturn` Just "Free" + (paid, paidStatus) <- stripeWebhook tr (\_ _ -> pure Nothing) "checkout.session.async_payment_succeeded" (checkout "paid") + paidStatus `shouldBe` 200 + lookup "https://api.stripe.com/v1/invoices/in_owed/pay" paid `shouldBe` Just "paid_out_of_band=true" + fmap (.paymentPlan) <$> runQueryEffect tr (Projects.projectById testPid) `shouldReturn` Just "GraduatedPricing" + + -- Dunning that ends at `unpaid` keeps the subscription: paying its invoice by any route + -- (hosted link, email, portal) makes Stripe flip it back to `active`, and only + -- customer.subscription.updated says so — the project must follow both ways. + it "stripeDunning_unpaidThenPaidAnywhere_followsSubscriptionStatus" \TestContext{tcResources = tr, tcProjectId = testPid} -> do + _ <- runQueryEffect tr $ Projects.updateStripeProjectBilling testPid (Projects.PlanName "GraduatedPricing") (Projects.SubId "sub_dun") (Projects.SubItemId "si_dun") (Projects.CustomerId "cus_dun") + let plan = fmap (.paymentPlan) <$> runQueryEffect tr (Projects.projectById testPid) + sub status = AE.object ["id" AE..= ("sub_dun" :: Text), "status" AE..= (status :: Text), "items" AE..= AE.object ["data" AE..= ([AE.object ["id" AE..= ("si_dun" :: Text), "price" AE..= AE.object ["id" AE..= ("price_graduated" :: Text)]]] :: [AE.Value])]] + _ <- stripeWebhook tr (\_ _ -> pure Nothing) "customer.subscription.updated" (sub "unpaid") + plan `shouldReturn` Just "Free" + _ <- stripeWebhook tr (\_ _ -> pure Nothing) "customer.subscription.updated" (sub "active") + plan `shouldReturn` Just "GraduatedPricing" + + -- A sub Stripe already cancelled can't come back, so paying its leftover invoice outside + -- our checkout must not pretend to reactivate; the payer is pointed back at checkout. + it "stripeInvoicePaid_cancelledSubscription_staysFree" \TestContext{tcResources = tr, tcProjectId = testPid} -> do + _ <- runQueryEffect tr $ Projects.updateStripeProjectBilling testPid (Projects.PlanName "GraduatedPricing") (Projects.SubId "sub_gone") (Projects.SubItemId "si_gone") (Projects.CustomerId "cus_gone") + _ <- runQueryEffect tr $ Projects.downgradeToFreeBySubId "sub_gone" + let cancelled _ url = pure $ AE.encode (AE.object ["status" AE..= ("canceled" :: Text), "items" AE..= AE.object ["data" AE..= ([AE.object ["id" AE..= ("si_gone" :: Text), "price" AE..= AE.object ["id" AE..= ("price_graduated" :: Text)]]] :: [AE.Value])]]) <$ guard (url == "https://api.stripe.com/v1/subscriptions/sub_gone") + (reqs, status) <- stripeWebhook tr cancelled "invoice.paid" $ AE.object ["id" AE..= ("in_gone" :: Text), "customer" AE..= ("cus_gone" :: Text), "parent" AE..= AE.object ["subscription_details" AE..= AE.object ["subscription" AE..= ("sub_gone" :: Text)]]] + status `shouldBe` 200 + map fst reqs `shouldContain` ["https://api.stripe.com/v1/subscriptions/sub_gone"] + fmap (.paymentPlan) <$> runQueryEffect tr (Projects.projectById testPid) `shouldReturn` Just "Free" + + +-- | Deliver a signed checkout.session.completed for @pid@ (new sub @sub_new@) carrying +-- the given session metadata; returns the outgoing Stripe requests. +stripeCheckoutCompleted :: TestResources -> Projects.ProjectId -> [(AE.Key, Text)] -> IO [(Text, LByteString)] +stripeCheckoutCompleted tr pid metadata = do + (requests, status) <- + stripeWebhook tr (\_ _ -> pure Nothing) "checkout.session.completed" + $ AE.object ["client_reference_id" AE..= pid.toText, "subscription" AE..= ("sub_new" :: Text), "customer" AE..= ("cus_test" :: Text), "payment_status" AE..= ("paid" :: Text), "metadata" AE..= AE.object (map (fmap AE.toJSON) metadata)] + status `shouldBe` 200 + pure requests + + +-- | Deliver a signed Stripe event of @eventType@ wrapping @obj@, answering Stripe calls from +-- @responses@; returns the outgoing Stripe requests and HTTP status. +stripeWebhook :: TestResources -> (Options -> String -> IO (Maybe LByteString)) -> Text -> AE.Value -> IO ([(Text, LByteString)], Int) +stripeWebhook tr responses eventType obj = do + let appCtx = tr.trATCtx + isolated = tr{trATCtx = appCtx{System.Config.config = appCtx.config{System.Config.smtpHost = "127.0.0.1", System.Config.smtpPort = 1, System.Config.smtpUsername = "", System.Config.smtpPassword = "", System.Config.postmarkToken = ""}}} + now <- getTestTime tr.trTestClock + let body = toStrict $ AE.encode $ AE.object ["type" AE..= eventType, "data" AE..= AE.object ["object" AE..= obj]] + ts = show @Text @Integer $ round $ utcTimeToPOSIXSeconds now + mac = HMAC.hmac (encodeUtf8 @Text @ByteString tr.trATCtx.env.stripeWebhookSecret) (encodeUtf8 @Text @ByteString ts <> "." <> body) :: HMAC.HMAC SHA256 + sigHeader = "t=" <> ts <> ",v1=" <> decodeUtf8 (B16.encode $ BA.convert mac) + runAsBaseRecordingHTTP isolated $ catchError @ServantS.ServerError (withHTTPResponses (\opts url -> (<|> ("{\"status\":\"open\"}" <$ guard ("https://api.stripe.com/v1/invoices/" `T.isPrefixOf` toText url))) <$> responses opts url) (LemonSqueezy.stripeWebhookPostH (Just sigHeader) body) $> 200) (\_ err -> pure err.errHTTPCode) + -- | LemonSqueezy Webhook Tests - Table-driven testing for all webhook events lemonSqueezyWebhookTests :: SpecWith TestContext diff --git a/tests/golden/https___api.stripe.com_v1_invoices_limit=12_subscription=sub_test123_get_with.json b/tests/golden/https___api.stripe.com_v1_invoices_limit=12_subscription=sub_test123_get_with.json index 87858fe59..733eae19c 100644 --- a/tests/golden/https___api.stripe.com_v1_invoices_limit=12_subscription=sub_test123_get_with.json +++ b/tests/golden/https___api.stripe.com_v1_invoices_limit=12_subscription=sub_test123_get_with.json @@ -1,7 +1,7 @@ { "statusCode": 200, "statusMessage": "OK", - "respBody": "{\"object\": \"list\", \"data\": [{\"object\": \"invoice\", \"number\": null, \"status\": \"draft\", \"total\": 4150, \"amount_paid\": 0, \"period_start\": 1710498600, \"period_end\": 1713177000, \"hosted_invoice_url\": null, \"lines\": {\"data\": [{\"description\": \"1 x Graduated\", \"period\": {\"start\": 1710498600, \"end\": 1713177000}}]}}, {\"object\": \"invoice\", \"number\": \"MONO-0002\", \"status\": \"paid\", \"total\": 3400, \"amount_paid\": 3400, \"period_start\": 1707993000, \"period_end\": 1710498600, \"hosted_invoice_url\": \"https://invoice.stripe.com/i/inv_two\", \"lines\": {\"data\": [{\"description\": \"1 x Graduated\", \"period\": {\"start\": 1707993000, \"end\": 1710498600}}]}}, {\"object\": \"invoice\", \"number\": \"MONO-0001\", \"status\": \"paid\", \"total\": 2900, \"amount_paid\": 2900, \"period_start\": 1705314600, \"period_end\": 1707993000, \"hosted_invoice_url\": \"https://invoice.stripe.com/i/inv_one\", \"lines\": {\"data\": [{\"description\": \"1 x Graduated\", \"period\": {\"start\": 1705314600, \"end\": 1707993000}}]}}, {\"object\": \"invoice\", \"number\": \"MONO-0000\", \"status\": \"paid\", \"total\": 0, \"amount_paid\": 0, \"period_start\": 1705314600, \"period_end\": 1705314600, \"hosted_invoice_url\": \"https://invoice.stripe.com/i/inv_zero\", \"lines\": {\"data\": [{\"description\": \"Trial start\", \"period\": {\"start\": 1705314600, \"end\": 1705314600}}]}}]}", + "respBody": "{\"object\":\"list\",\"data\":[{\"object\":\"invoice\",\"currency\":\"usd\",\"id\":\"in_draft\",\"number\":null,\"status\":\"draft\",\"total\":4150,\"amount_paid\":0,\"period_start\":1710498600,\"period_end\":1713177000,\"hosted_invoice_url\":null,\"lines\":{\"data\":[{\"description\":\"1 x Graduated\",\"period\":{\"start\":1710498600,\"end\":1713177000}}]},\"amount_remaining\":4150},{\"object\":\"invoice\",\"currency\":\"usd\",\"number\":\"MONO-0002\",\"status\":\"paid\",\"total\":3400,\"amount_paid\":3400,\"period_start\":1707993000,\"period_end\":1710498600,\"id\":\"in_two\",\"hosted_invoice_url\":\"https://invoice.stripe.com/i/inv_two\",\"lines\":{\"data\":[{\"description\":\"1 x Graduated\",\"period\":{\"start\":1707993000,\"end\":1710498600}}]},\"amount_remaining\":0},{\"object\":\"invoice\",\"currency\":\"usd\",\"number\":\"MONO-0001\",\"status\":\"paid\",\"total\":2900,\"amount_paid\":2900,\"period_start\":1705314600,\"period_end\":1707993000,\"id\":\"in_one\",\"hosted_invoice_url\":\"https://invoice.stripe.com/i/inv_one\",\"lines\":{\"data\":[{\"description\":\"1 x Graduated\",\"period\":{\"start\":1705314600,\"end\":1707993000}}]},\"amount_remaining\":0},{\"object\":\"invoice\",\"currency\":\"usd\",\"number\":\"MONO-0000\",\"status\":\"paid\",\"total\":0,\"amount_paid\":0,\"period_start\":1705314600,\"period_end\":1705314600,\"id\":\"in_zero\",\"hosted_invoice_url\":\"https://invoice.stripe.com/i/inv_zero\",\"lines\":{\"data\":[{\"description\":\"Trial start\",\"period\":{\"start\":1705314600,\"end\":1705314600}}]},\"amount_remaining\":0}]}", "responseHeaders": [ [ "Content-Type", @@ -10,4 +10,4 @@ ], "originalRequest": "", "responseEarlyHints": [] -} \ No newline at end of file +} diff --git a/web-components/package-lock.json b/web-components/package-lock.json index d547c6496..a6e0139d7 100644 --- a/web-components/package-lock.json +++ b/web-components/package-lock.json @@ -29,7 +29,7 @@ "date-fns": "^4.3.0", "echarts": "^6.1.0", "elkjs": "^0.12.0", - "js-yaml": "^4.2.0", + "js-yaml": "^4.3.2", "jsonpath": "^1.3.0", "lit": "^3.3.3", "lodash": "^4.17.23", @@ -37,18 +37,18 @@ "vite": "^8.0.16" }, "devDependencies": { - "@types/bun": "^1.3.14", + "@types/bun": "^1.4.0", "@types/js-yaml": "^4.0.9", "@types/jsonpath": "^0.2.4", "@types/node": "^25.9.1", - "@vitest/browser": "^4.1.8", - "happy-dom": "^20.7.0", + "@vitest/browser": "^4.1.11", + "happy-dom": "^20.14.0", "jsdom": "^29.1.1", "typescript": "^6.0.3", "vite-plugin-monaco-editor": "^1.1.0", "vite-plugin-node-polyfills": "^0.28.0", - "vitest": "^4.0.16", - "vitest-canvas-mock": "^1.1.4" + "vitest": "^4.1.11", + "vitest-canvas-mock": "^1.1.5" } }, "node_modules/@asamuzakjp/css-color": { @@ -1973,13 +1973,13 @@ } }, "node_modules/@types/bun": { - "version": "1.3.14", - "resolved": "https://registry.npmjs.org/@types/bun/-/bun-1.3.14.tgz", - "integrity": "sha512-h1hFqFVcvAvD9j9K7ZW7vd82aSA+rTdznZa+5bwvCwqSB1jmmfLcbIWhOLx1/+boy/xmjgCs/OMUL8hRJSmnPw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@types/bun/-/bun-1.4.0.tgz", + "integrity": "sha512-K+lZULY23vRgK/CfTjFIV+tyifaNdSMlPh9j+6mQ/cLfpOznLyAuzgV/JQysyECpkBQLVMSyvjlr2fBUSA9wFQ==", "dev": true, "license": "MIT", "dependencies": { - "bun-types": "1.3.14" + "bun-types": "1.4.0" } }, "node_modules/@types/chai": { @@ -2111,15 +2111,15 @@ } }, "node_modules/@vitest/browser": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@vitest/browser/-/browser-4.1.8.tgz", - "integrity": "sha512-u21VzX07HzlJYpFgkxmjEXar/tG2UqWGgyGG/46SrrPc7rSdCTPw5vuowopO9CIqF8UCUQzDFdbVnNpw6N0BfQ==", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/browser/-/browser-4.1.11.tgz", + "integrity": "sha512-bwMovvAeuTFOK5kIFevw4VEf+1gVEICv4SYK4k3knJOxl6b1zEWud8mYKD73e1B0odAn174h1MofURy2TPWf3w==", "dev": true, "license": "MIT", "dependencies": { "@blazediff/core": "1.9.1", - "@vitest/mocker": "4.1.8", - "@vitest/utils": "4.1.8", + "@vitest/mocker": "4.1.11", + "@vitest/utils": "4.1.11", "magic-string": "^0.30.21", "pngjs": "^7.0.0", "sirv": "^3.0.2", @@ -2130,20 +2130,20 @@ "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "vitest": "4.1.8" + "vitest": "4.1.11" } }, "node_modules/@vitest/expect": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.8.tgz", - "integrity": "sha512-h3nDO677RDLEGlBxyQ5CW8RlMThSKSRLUePLOx09gNIWRL40edgA1GCZSZgf1W55MFAG6/Sw14KeaAnqv0NKdQ==", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.11.tgz", + "integrity": "sha512-VX2x5vNJXET47KAFzwERI+KRMtTTCSWTfSMKsW7JsUsXV4psq++e3DvZpuTDOpHcxytiDs6p2nhVb2tVDiiUYw==", "dev": true, "license": "MIT", "dependencies": { "@standard-schema/spec": "^1.1.0", "@types/chai": "^5.2.2", - "@vitest/spy": "4.1.8", - "@vitest/utils": "4.1.8", + "@vitest/spy": "4.1.11", + "@vitest/utils": "4.1.11", "chai": "^6.2.2", "tinyrainbow": "^3.1.0" }, @@ -2152,13 +2152,13 @@ } }, "node_modules/@vitest/mocker": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.8.tgz", - "integrity": "sha512-LEiN/xe4OSIbKe9HQIp5OC24agGD9J5CnmMgsLohVVoOPWL9a2sBoR6VBx43jQZb7Kr1l4RCuyCJzcAa0+dojw==", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.11.tgz", + "integrity": "sha512-2XJVD55d1o5AZous5CCGKS74g/riOj9odEt2bQpCVZeblHyHdnMeFl4jl0XjU21stf4mbjUkew2eXQZt65g5CQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "4.1.8", + "@vitest/spy": "4.1.11", "estree-walker": "^3.0.3", "magic-string": "^0.30.21" }, @@ -2189,9 +2189,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.8.tgz", - "integrity": "sha512-9GasEBxpZ1VYIpqHf/0+YGg121uSNwCKOJqIrTwWP/TB7DmFCiaBpNl3aPZzoLWfWkuqhbH8vJIVobZkvdo2cA==", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.11.tgz", + "integrity": "sha512-yiZzPbGTS9Sr/JpFl8zHrcIkAofNbFV6k21vIgQN/cY/oxZeXhJv5sc/MBJ5jFKWmWs+oJHw0UXLZjmf931+Vw==", "dev": true, "license": "MIT", "dependencies": { @@ -2202,13 +2202,13 @@ } }, "node_modules/@vitest/runner": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.8.tgz", - "integrity": "sha512-EmVxeBAfMJvycdjd6Hm+RbFBbA9fKvo0Kx37hNpBYoYeavH3RNsBXWDooR1mgD52dCrxIIuP7UotpfiwOikvcg==", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.11.tgz", + "integrity": "sha512-LztvUgdwMNJMIkj3hQnnxiC2Xy1zNxq928W/xhjCLaNCzqTZOudjwbQf6v9IntZGPw132i2Lq2rgTRZHD3JHNw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "4.1.8", + "@vitest/utils": "4.1.11", "pathe": "^2.0.3" }, "funding": { @@ -2216,14 +2216,14 @@ } }, "node_modules/@vitest/snapshot": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.8.tgz", - "integrity": "sha512-acfZboRmAIf05DEKcBQy33VXojFJjtUdLyo7oOmV9kebb2xdU01UknNiPuPZoJZQyO7DF0gZdTGTpeAzET9QPQ==", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.11.tgz", + "integrity": "sha512-pN7ikn1ON7h8ee4gIAp4AzyK+zBtJPzVbqOgu5LCEh4VaJVbPQcgYQYJIMGQPXVeJJq1fnfazis7a5pFNPahog==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.1.8", - "@vitest/utils": "4.1.8", + "@vitest/pretty-format": "4.1.11", + "@vitest/utils": "4.1.11", "magic-string": "^0.30.21", "pathe": "^2.0.3" }, @@ -2232,9 +2232,9 @@ } }, "node_modules/@vitest/spy": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.8.tgz", - "integrity": "sha512-6EevtBp6OZOPF7bmz36HrGMeP3txgVSrgebWxHOafDXGkhIzfXK14f8KF6MuFfgXXUeHxmpD3BQxkV00/3s5mA==", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.11.tgz", + "integrity": "sha512-apNa/prQy2qCeywhnixOHPRCgGNhvg7T4Dapfl1GahLp/R+uhBm5cPyFoNVyqsNd2h1nJxL6BqqdIjiABL60YA==", "dev": true, "license": "MIT", "funding": { @@ -2242,13 +2242,13 @@ } }, "node_modules/@vitest/utils": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.8.tgz", - "integrity": "sha512-uOJamYALNhfJ6iolExyQM40yIQwDqYnkKtQ5VCiSe17E33H0aQ/u+1GlRuz4LZBk6Mm3sg90G9hEbmEt37C1Zg==", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.11.tgz", + "integrity": "sha512-zTCVGpyFsGWBhllOyKlTw/vnr6D9qxsfSDyfbyZmTyjHw5N/VuvzHpHoQjm2ZJzn4RJgx5w4r7V0er69CmLgPQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.1.8", + "@vitest/pretty-format": "4.1.11", "convert-source-map": "^2.0.0", "tinyrainbow": "^3.1.0" }, @@ -2642,6 +2642,19 @@ "ieee754": "^1.1.13" } }, + "node_modules/buffer-image-size": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/buffer-image-size/-/buffer-image-size-0.6.4.tgz", + "integrity": "sha512-nEh+kZOPY1w+gcCMobZ6ETUp9WfibndnosbpwB1iJk/8Gt5ZF2bhS6+B6bPYz424KtwsR6Rflc3tCz1/ghX2dQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + }, + "engines": { + "node": ">=4.0" + } + }, "node_modules/buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", @@ -2655,9 +2668,9 @@ "dev": true }, "node_modules/bun-types": { - "version": "1.3.14", - "resolved": "https://registry.npmjs.org/bun-types/-/bun-types-1.3.14.tgz", - "integrity": "sha512-4N0ig0fEomHt5R0KCFWjovxow98rIoRwKolrYdCcknNwMekCXRnWEUvgu5soYV8QXtVsrUD8B95MBOZGPvr6KQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/bun-types/-/bun-types-1.4.0.tgz", + "integrity": "sha512-iIKw23BspnQQYd3prITOBxeUsxBHnwzX6YJfGMuNOZzeNcMmVqzIIVGRm1l69ogaPQmb4wB6BN8mA5bE9YuC5Q==", "dev": true, "license": "MIT", "dependencies": { @@ -3435,18 +3448,19 @@ } }, "node_modules/happy-dom": { - "version": "20.9.0", - "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-20.9.0.tgz", - "integrity": "sha512-GZZ9mKe8r646NUAf/zemnGbjYh4Bt8/MqASJY+pSm5ZDtc3YQox+4gsLI7yi1hba6o+eCsGxpHn5+iEVn31/FQ==", + "version": "20.14.0", + "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-20.14.0.tgz", + "integrity": "sha512-4bRh1KzRvKDnFNTlLhzT1RZTpkKhQbQDl9j+7GXszWsvuspYdo29k6OHRf4PwiM6oLb8r/pMWeYiJjkfod5AvQ==", "dev": true, "license": "MIT", "dependencies": { "@types/node": ">=20.0.0", "@types/whatwg-mimetype": "^3.0.2", "@types/ws": "^8.18.1", + "buffer-image-size": "^0.6.4", "entities": "^7.0.1", "whatwg-mimetype": "^3.0.0", - "ws": "^8.18.3" + "ws": "^8.21.0" }, "engines": { "node": ">=20.0.0" @@ -3748,9 +3762,9 @@ } }, "node_modules/js-yaml": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz", - "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz", + "integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==", "funding": [ { "type": "github", @@ -6693,19 +6707,19 @@ } }, "node_modules/vitest": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.8.tgz", - "integrity": "sha512-flY6ScbCIt9HThs+C5HS7jvGOB560DJtk/Z15IQROTA6zEy49Nh8T/dofWTQL+n3vswqn87sbJNiuqw1SDp5Ig==", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.11.tgz", + "integrity": "sha512-fhACrNXUidIbGSBr5FlbuBkO7VWC1ZyLl0DO4CU2DrQoAPxX84Ysxs+HeGQpii5lZWV1Q4gBZTTu49mF+A6Edw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/expect": "4.1.8", - "@vitest/mocker": "4.1.8", - "@vitest/pretty-format": "4.1.8", - "@vitest/runner": "4.1.8", - "@vitest/snapshot": "4.1.8", - "@vitest/spy": "4.1.8", - "@vitest/utils": "4.1.8", + "@vitest/expect": "4.1.11", + "@vitest/mocker": "4.1.11", + "@vitest/pretty-format": "4.1.11", + "@vitest/runner": "4.1.11", + "@vitest/snapshot": "4.1.11", + "@vitest/spy": "4.1.11", + "@vitest/utils": "4.1.11", "es-module-lexer": "^2.0.0", "expect-type": "^1.3.0", "magic-string": "^0.30.21", @@ -6733,12 +6747,12 @@ "@edge-runtime/vm": "*", "@opentelemetry/api": "^1.9.0", "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", - "@vitest/browser-playwright": "4.1.8", - "@vitest/browser-preview": "4.1.8", - "@vitest/browser-webdriverio": "4.1.8", - "@vitest/coverage-istanbul": "4.1.8", - "@vitest/coverage-v8": "4.1.8", - "@vitest/ui": "4.1.8", + "@vitest/browser-playwright": "4.1.11", + "@vitest/browser-preview": "4.1.11", + "@vitest/browser-webdriverio": "4.1.11", + "@vitest/coverage-istanbul": "4.1.11", + "@vitest/coverage-v8": "4.1.11", + "@vitest/ui": "4.1.11", "happy-dom": "*", "jsdom": "*", "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" @@ -6783,9 +6797,9 @@ } }, "node_modules/vitest-canvas-mock": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/vitest-canvas-mock/-/vitest-canvas-mock-1.1.4.tgz", - "integrity": "sha512-4boWHY+STwAxGl1+uwakNNoQky5EjPLC8HuponXNoAscYyT1h/F7RUvTkl4IyF/MiWr3V8Q626je3Iel3eArqA==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/vitest-canvas-mock/-/vitest-canvas-mock-1.1.5.tgz", + "integrity": "sha512-PWtzolkO/GsG9I9qsLxJ8HzdXQKNz1iRVUcCDJbNBiDuxMp50NC1MWwz2UmDYS4vJqNeKyoLWm7RgjfKWIoQOQ==", "dev": true, "license": "MIT", "dependencies": { @@ -6912,9 +6926,9 @@ } }, "node_modules/ws": { - "version": "8.20.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.20.0.tgz", - "integrity": "sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==", + "version": "8.21.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.3.tgz", + "integrity": "sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw==", "dev": true, "license": "MIT", "engines": { diff --git a/web-components/package.json b/web-components/package.json index 41f385fc5..6a8161c0d 100644 --- a/web-components/package.json +++ b/web-components/package.json @@ -42,7 +42,7 @@ "date-fns": "^4.3.0", "echarts": "^6.1.0", "elkjs": "^0.12.0", - "js-yaml": "^4.2.0", + "js-yaml": "^4.3.2", "jsonpath": "^1.3.0", "lit": "^3.3.3", "lodash": "^4.17.23", @@ -50,18 +50,18 @@ "vite": "^8.0.16" }, "devDependencies": { - "@types/bun": "^1.3.14", + "@types/bun": "^1.4.0", "@types/js-yaml": "^4.0.9", "@types/jsonpath": "^0.2.4", "@types/node": "^25.9.1", - "@vitest/browser": "^4.1.8", - "happy-dom": "^20.7.0", + "@vitest/browser": "^4.1.11", + "happy-dom": "^20.14.0", "jsdom": "^29.1.1", "typescript": "^6.0.3", "vite-plugin-monaco-editor": "^1.1.0", "vite-plugin-node-polyfills": "^0.28.0", - "vitest": "^4.0.16", - "vitest-canvas-mock": "^1.1.4" + "vitest": "^4.1.11", + "vitest-canvas-mock": "^1.1.5" }, "overrides": { "dompurify": "^3.3.2", diff --git a/web-components/src/log-list.ts b/web-components/src/log-list.ts index 15033dee7..9f3165854 100644 --- a/web-components/src/log-list.ts +++ b/web-components/src/log-list.ts @@ -3955,7 +3955,7 @@ export class LogList extends LitElement { parts.push(content); }; - if (user) add(html`${user}`); + if (user) add(html`${user}`); if (url) { // Middle-truncate: keep the last path segment visible since it usually // identifies the page ("/checkout/cart" is more useful than "/api/v2/…"). From f2a7d9658a45d7e6681db3938e07971f18c8b2ef Mon Sep 17 00:00:00 2001 From: Anthony Alaribe Date: Sun, 25 Oct 2026 19:38:51 +0100 Subject: [PATCH 004/201] Allow promotion codes at Stripe checkout (#716) * Allow promotion codes at Stripe checkout * Keep positive rates off 0.0% whatever showFFloat's rounding fmtPct1 promised positive rates never round to zero, but its 0.05 threshold assumed half-up rounding; showFFloat rounds half to even, so 0.05 rendered 0.0% and the doctest from #713 failed. Key on the rendered text instead. --- src/Pages/LogExplorer/Log.hs | 9 +++++---- src/Pages/Settings.hs | 1 + test/integration/Pages/BusinessFlowsSpec.hs | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Pages/LogExplorer/Log.hs b/src/Pages/LogExplorer/Log.hs index 878c30142..4f9256b18 100644 --- a/src/Pages/LogExplorer/Log.hs +++ b/src/Pages/LogExplorer/Log.hs @@ -1133,12 +1133,13 @@ lookupAlert = maybe (pure Nothing) (Monitors.queryMonitorById . Monitors.QueryMo -- | One-decimal percent formatter; positive rates never round down to zero. -- -- >>> import "monoscope" Pages.LogExplorer.Log qualified as LL --- >>> map LL.fmtPct1 [0, 0.03, 0.05, 5.24, 100, -1.25] +-- >>> map LL.fmtPct1 [0, 0.03, 0.06, 5.24, 100, -1.25] -- ["0.0%","<0.1%","0.1%","5.2%","100.0%","-1.2%"] fmtPct1 :: Double -> Text -fmtPct1 x - | x > 0 && x < 0.05 = "<0.1%" - | otherwise = showFFloat' 1 x <> "%" +fmtPct1 x = bool shown "<0.1%" (x > 0 && shown == "0.0%") + where + -- Keyed on the rendered text, not a threshold: showFFloat rounds half to even, so 0.05 shows 0.0. + shown = showFFloat' 1 x <> "%" -- | Shimmer placeholder mirroring 'sessionsHeader_' (6-KPI grid + over-time bar diff --git a/src/Pages/Settings.hs b/src/Pages/Settings.hs index c85390e8f..10e08ba25 100644 --- a/src/Pages/Settings.hs +++ b/src/Pages/Settings.hs @@ -1598,6 +1598,7 @@ createStripeCheckoutSession trialEligible customerM debts apiKey hostUrl pid pla <> managedPaymentsParams <> [("customer", encodeUtf8 c) | c <- maybeToList customerM] <> [ ("mode", "subscription") + , ("allow_promotion_codes", "true") , ("client_reference_id", encodeUtf8 pid.toText) , ("metadata[project_id]", encodeUtf8 pid.toText) , ("metadata[plan]", encodeUtf8 plan) diff --git a/test/integration/Pages/BusinessFlowsSpec.hs b/test/integration/Pages/BusinessFlowsSpec.hs index 2896d19e5..f37e86460 100644 --- a/test/integration/Pages/BusinessFlowsSpec.hs +++ b/test/integration/Pages/BusinessFlowsSpec.hs @@ -531,6 +531,7 @@ stripeBillingTests = do Just b -> do decodeUtf8 @Text b `shouldSatisfy` T.isInfixOf "trial_period_days" decodeUtf8 @Text b `shouldNotSatisfy` T.isInfixOf "customer=" + decodeUtf8 @Text b `shouldSatisfy` T.isInfixOf "allow_promotion_codes=true" -- Once that buyer has any billing history, a further checkout reuses their -- customer and withholds the trial — this is what a second project now hits. From ba59c123d75cfdd26cb0949f6de2ee44e3a9a0ed Mon Sep 17 00:00:00 2001 From: Anthony Alaribe Date: Sun, 25 Oct 2026 21:18:02 +0100 Subject: [PATCH 005/201] Ack capped OTLP payloads instead of dead-lettering them (#714) * Ack capped OTLP payloads instead of dead-lettering them A payload whose every project resolved but is over the free-tier cap converts to zero rows by design. The unresolved-project guard treated it as lost data and sent it to the DLQ, which redelivered it through every retry tier: ~10k attention logs an hour since the cap started tripping on 2026-10-22. Unresolved keys still DLQ. * Dead-letter capped payloads that also name an unresolved key Review follow-up: a zero-row payload is a deliberate drop only when every key it names resolved and every project is capped; a mixed payload is lost data again. * Dead-letter any payload naming an unresolved API key Simpler and general: one unresolved key poisons the whole payload, so a payload mixing it with a capped (or any resolved) key no longer loses the unresolved part. Rows left out on purpose come from resolved keys and are acked. * Pin the 0.05 case and say why only API keys can fail to resolve Review follow-ups: fmtPct1's doctest keeps the half-to-even 0.05 case it exists for; the poison comment is trimmed to its invariant and notes that at-project-ids always get a cache. * Keep the zero-rows safety net for uncapped projects and check at-project-ids Review follow-ups: a payload is dead-lettered when it names an unresolved key or an at-project-id with no cache, or converts to zero rows unless every project it names is capped; only deliberate cap drops are acked. * State the ack condition once: every project resolved, and rows or a cap Review follow-up: traverse the key lookups instead of comparing lengths. --- src/Opentelemetry/OtlpServer.hs | 18 +++++++----------- src/Pages/LogExplorer/Log.hs | 4 ++-- .../BackgroundJobs/ReportUsageSpec.hs | 17 ++++++++++++++++- 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/src/Opentelemetry/OtlpServer.hs b/src/Opentelemetry/OtlpServer.hs index d17beb03c..b49c3a225 100644 --- a/src/Opentelemetry/OtlpServer.hs +++ b/src/Opentelemetry/OtlpServer.hs @@ -462,18 +462,14 @@ processBatchPipeline !label msgs appCtx fallbackTime extractKeys extractIds inva !checked = [(ackId, raw, req, invalidReason req) | (ackId, raw, Right req) <- decodedMsgs] !invalidPoison = [(ackId, raw, err) | (ackId, raw, _, Just err) <- checked] !converted = [(ackId, raw, req, convert fallbackTime projectCachesMap keyToIdMap req) | (ackId, raw, req, Nothing) <- checked] - -- "Converted to zero rows" is NOT proof there was nothing to write. - -- A payload that carried an API key or an at-project-id but produced no - -- rows was DROPPED: its project never resolved (a cached negative entry, - -- a key racing its own creation, a lookup that returned no rows). Acking - -- that commits the offset and destroys the data with no DLQ entry — the - -- 2026-07-27 loss (~200k rows / 10 tenants / 9 min, zero failure signal - -- anywhere in the pipeline). Route it to the DLQ so the bytes survive. + -- DLQ, never ack, a payload naming an unresolved project, or one converting to zero rows + -- unless every project it names is capped (2026-07-27: an ack lost ~200k rows). !dropPoison = - [ (ackId, raw, "unresolved project: payload carried telemetry but converted to zero rows") + [ (ackId, raw, "unresolved project: payload carried telemetry but did not resolve or convert") | (ackId, raw, req, recs) <- converted - , V.null recs - , not (V.null (extractKeys req)) || not (null (extractIds req)) + , let accounted pids = all (`HM.member` projectCachesMap) pids && (not (V.null recs) || all capped pids) + capped p = any overFreeTierQuota (HM.lookup p projectCachesMap) + , not $ maybe False (accounted . (<> extractIds req)) (traverse (`HM.lookup` keyToIdMap) (V.toList (extractKeys req))) ] !dropAckIds = HS.fromList [ackId | (ackId, _, _) <- dropPoison] !writeReady = [(ackId, raw, recs) | (ackId, raw, _, recs) <- converted, not (HS.member ackId dropAckIds)] @@ -484,7 +480,7 @@ processBatchPipeline !label msgs appCtx fallbackTime extractKeys extractIds inva forM_ (decodePoison <> invalidPoison) \(_, raw, err) -> recordProtoError label (toString err) raw unless (null dropPoison) $ Log.logAttention - "processList: payload carried telemetry but resolved to zero rows — routing to DLQ instead of acking" + "processList: payload did not resolve or converted to zero rows — routing to DLQ instead of acking" (AE.object ["label" AE..= label, "dropped_messages" AE..= length dropPoison, "ack_ids" AE..= [a | (a, _, _) <- dropPoison]]) if allEmpty diff --git a/src/Pages/LogExplorer/Log.hs b/src/Pages/LogExplorer/Log.hs index 4f9256b18..654716a09 100644 --- a/src/Pages/LogExplorer/Log.hs +++ b/src/Pages/LogExplorer/Log.hs @@ -1133,8 +1133,8 @@ lookupAlert = maybe (pure Nothing) (Monitors.queryMonitorById . Monitors.QueryMo -- | One-decimal percent formatter; positive rates never round down to zero. -- -- >>> import "monoscope" Pages.LogExplorer.Log qualified as LL --- >>> map LL.fmtPct1 [0, 0.03, 0.06, 5.24, 100, -1.25] --- ["0.0%","<0.1%","0.1%","5.2%","100.0%","-1.2%"] +-- >>> map LL.fmtPct1 [0, 0.03, 0.05, 0.06, 5.24, 100, -1.25] +-- ["0.0%","<0.1%","<0.1%","0.1%","5.2%","100.0%","-1.2%"] fmtPct1 :: Double -> Text fmtPct1 x = bool shown "<0.1%" (x > 0 && shown == "0.0%") where diff --git a/test/integration/BackgroundJobs/ReportUsageSpec.hs b/test/integration/BackgroundJobs/ReportUsageSpec.hs index 5e359741a..045ef78b9 100644 --- a/test/integration/BackgroundJobs/ReportUsageSpec.hs +++ b/test/integration/BackgroundJobs/ReportUsageSpec.hs @@ -10,8 +10,9 @@ module BackgroundJobs.ReportUsageSpec (spec) where -- thing and re-submit chunks that already succeeded. import BackgroundJobs qualified -import Control.Lens ((^.)) +import Control.Lens (_1, (%~), (^.)) import Data.Cache qualified as Cache +import Data.HashMap.Strict qualified as HM import Data.List qualified as L import Data.Pool (withResource) import Data.ProtoLens (decodeMessage, encodeMessage) @@ -537,6 +538,20 @@ spec = around (\f -> withTestResources \tr -> createTestProject tr "report-usage Cache.purge tr.trATCtx.projectCache ingestLog tr key "over the cap" frozenTime logCount tr pid `shouldReturn` 1 + -- Capped data is dropped and acked, not dead-lettered as an unresolved project: that + -- misclassification looped ~10k capped messages/hour through the DLQ tiers (2026-10-22). + -- An unresolved key still is: those bytes are a customer's data with nowhere to land yet. + -- So is a payload mixing the capped key with an unresolved one, and zero rows from a + -- project that is not capped. + uncappedKey <- createTestProject tr "uncapped" >>= \p -> createTestAPIKey tr p "uncapped-key" + let logs k = createOtelLogAtTime k ["capped?"] frozenTime + mixed = logs key & LSF.resourceLogs %~ (<> (logs "no-such-key" ^. LSF.resourceLogs)) + Right (acks, poison) <- + runTestBg frozenTime tr + $ OtlpServer.processList + [("capped-ack", encodeMessage $ logs key), ("unknown-ack", encodeMessage $ logs "no-such-key"), ("mixed-ack", encodeMessage mixed), ("empty-ack", encodeMessage $ createOtelLogAtTime uncappedKey [] frozenTime)] + (HM.singleton "ce-type" "org.opentelemetry.otlp.logs.v1") + (acks, map (^. _1) poison) `shouldBe` (["capped-ack"], ["unknown-ack", "mixed-ack", "empty-ack"]) Right body <- OtlpServer.httpLogsExport tr.trLogger tr.trATCtx tr.trTracerProvider (Just key) (encodeMessage $ createOtelLogAtTime key ["rejected"] frozenTime) Right (res :: LS.ExportLogsServiceResponse) <- pure $ decodeMessage body From 8ee005927d86770d9a32d21cc37c2cfc20ade2c8 Mon Sep 17 00:00:00 2001 From: Anthony Alaribe Date: Sun, 25 Oct 2026 22:38:10 +0100 Subject: [PATCH 006/201] Sample free-tier ingest across the day instead of cutting off at the cap (#715) * Sample free-tier ingest across the day instead of cutting off at the cap A capped project used to keep everything until 10k events, then nothing until 00:00 UTC. Now each pool keeps with probability (budget left) / (traffic still expected today), paced from yesterday's hourly shape or the last hour's rate, with 20% of the budget reserved for errors. Decisions hash the trace id (or record id, or metric series), so a kept trace or series stays whole; kept spans and logs carry attributes.monoscope.sample_weight. Counters live in projects.ingest_sampling. Past 1.2x the budget nothing is kept and the OTLP edge rejects with partial success, as before. The banner, notices and emails say 'sampled' instead of 'dropped'. count() does not yet sum weights; that touches KQL compilation, rollups and monitors. * Key free-tier sampling by project text and keep pacing policy pure Review follow-ups: uncapped records in a mixed batch cost one lookup; metrics reuse metricSeriesId as the series key; the error reserve and ceiling move into Pkg.Sampling.rates with doctests. * Keep error traces whole and make sampling counters best-effort Review follow-ups for free-tier sampling: - a key with any error in the batch is judged at the error rate, so a trace with an error span is kept or dropped whole - a counter write failure is logged, not thrown, so it cannot fail the ingest batch - counters are one row per (project, hour, is_error) with seen/kept, halving the schema, the tally SQL and SampleCounts; an hour index serves the daily cleanup - Pkg.Sampling.rates also takes the hourly meter, so both caps live in one pure place; ceiling is renamed hardCap - the weight is stamped with the module's lodashMerge pattern - tests: error traces kept whole while the rest is thinned, metric series kept whole * Cheaper weight stamp, documented per-batch wholeness, clearer DLQ guard Review follow-ups: stamp the weight into the monoscope key only; note that trace wholeness and pacing are per batch / approximate; doctest an exhausted error reserve; drop the magic hash range; name the resolved projects in the DLQ guard. --- monoscope.cabal | 3 + src/BackgroundJobs.hs | 22 +++-- src/Models/Projects/Projects.hs | 65 +++++++++++- src/Models/Telemetry/Telemetry.hs | 1 + src/Opentelemetry/OtlpServer.hs | 40 ++++---- src/Pages/BodyWrapper.hs | 2 +- src/Pkg/EmailTemplates.hs | 18 ++-- src/Pkg/Metrics.hs | 9 +- src/Pkg/Sampling.hs | 99 +++++++++++++++++++ src/ProcessMessage.hs | 85 ++++++++++++++-- src/Utils.hs | 25 ++--- static/migrations/0254_ingest_sampling.sql | 11 +++ .../BackgroundJobs/ReportUsageSpec.hs | 61 +++++++++++- 13 files changed, 374 insertions(+), 67 deletions(-) create mode 100644 src/Pkg/Sampling.hs create mode 100644 static/migrations/0254_ingest_sampling.sql diff --git a/monoscope.cabal b/monoscope.cabal index 379e44720..3fabfca8b 100644 --- a/monoscope.cabal +++ b/monoscope.cabal @@ -268,6 +268,7 @@ extra-source-files: static/migrations/0251_project_memory_paths.sql static/migrations/0252_project_memory_page_identity.sql static/migrations/0253_project_memory_legacy_writes.sql + static/migrations/0254_ingest_sampling.sql test/fixtures/github-app-test.pem test/fixtures/wiki-browser.mjs static/public/assets/web-components/dist/manifest.json @@ -411,6 +412,7 @@ library Pkg.Prometheus Pkg.QueryCache Pkg.Queue + Pkg.Sampling Pkg.SchemaLearning.Catalog Pkg.SchemaLearning.Hot Pkg.SchemaLearning.Worker @@ -1054,6 +1056,7 @@ test-suite test-dev Pkg.Prometheus Pkg.QueryCache Pkg.Queue + Pkg.Sampling Pkg.SchemaLearning.Catalog Pkg.SchemaLearning.Hot Pkg.SchemaLearning.Worker diff --git a/src/BackgroundJobs.hs b/src/BackgroundJobs.hs index 79efbc7c7..f5ddc7317 100644 --- a/src/BackgroundJobs.hs +++ b/src/BackgroundJobs.hs @@ -1406,6 +1406,8 @@ runHourlyJob scheduledTime hour = do QueryCache.cleanupExpiredCache >>= logDeleted "Cleaned up expired query cache entries" Hasql.interpExecute [HI.sql| DELETE FROM users.device_auth_codes WHERE expires_at < now() - interval '1 hour' |] >>= logDeleted "Cleaned up expired device auth codes" Hasql.interpExecute [HI.sql| DELETE FROM otel_metrics_meta WHERE last_seen_at < now() - interval '3 months' |] >>= logDeleted "Cleaned up stale metrics metadata" + -- Pacing reads today and yesterday only. + Hasql.interpExecute [HI.sql| DELETE FROM projects.ingest_sampling WHERE hour < now() - interval '3 days' |] >>= logDeleted "Cleaned up old free-tier sampling counters" enqueueJobs ctx [Jobs.CompressReplaySessions, Jobs.DashboardsAutoProvision scheduledTime] @@ -1450,28 +1452,28 @@ autoProvisionDashboards scheduledTime = do Log.logInfo "Auto-provisioned dashboard from detected metrics" (AE.object ["project_id" AE..= pid, "template" AE..= file]) --- | For each active capped project, send a system log + email at 80% and 100% of today's cap, --- at most once per level per UTC day ('Projects.claimFreeTierNotice'). +-- | For each active capped project, send a system log + email when sampling starts and when the +-- hard ceiling is reached, at most once per level per UTC day ('Projects.claimFreeTierNotice'). checkFreeTierUsageNotifications :: [Projects.ProjectId] -> UTCTime -> ATBackgroundCtx () checkFreeTierUsageNotifications pids now = forM_ pids \pid -> tryStep "free-tier-check" do ctx <- ask @Config.AuthContext whenJustM (Projects.projectById pid) \project -> whenJust (Projects.freeTierDailyLimit ctx.config.enableFreetier project.paymentPlan) \limit -> do - count <- Projects.dailyUsageOfDay pid now - let notice = case freeTierUsageStatus count limit of + (seen, kept) <- Projects.samplingToday pid now + let notice = case freeTierUsageStatus limit (seen, kept) of FreeTierExceeded{} -> Just Projects.NoticeExceeded - FreeTierWarning{} -> Just Projects.NoticeWarning + FreeTierSampled{} -> Just Projects.NoticeSampling FreeTierOk -> Nothing NotFreeTier -> Nothing whenJust notice \n -> whenM (Projects.claimFreeTierNotice pid n) do (sev, eventName, bodyMsg) :: (SeverityLevel, Text, Text) <- case n of Projects.NoticeExceeded -> - (SLError, "system.free_tier.exceeded", "Daily event limit reached — new events are dropped until 00:00 UTC.") - <$ Log.logAttention "Free tier cap reached; ingestion is being dropped" ("project_id", pid.toText, "used", count, "limit", limit) - Projects.NoticeWarning -> pure (SLWarn, "system.free_tier.warning", "Approaching daily event limit (" <> show count <> " of " <> show limit <> " events used).") - let attrs = Map.fromList [("used", AE.toJSON count), ("limit", AE.toJSON limit), ("payment_plan", AE.String project.paymentPlan)] + (SLError, "system.free_tier.exceeded", "Daily event ceiling reached — new events are dropped until 00:00 UTC.") + <$ Log.logAttention "Free tier ceiling reached; ingestion is being dropped" ("project_id", pid.toText, "kept", kept, "limit", limit) + Projects.NoticeSampling -> pure (SLWarn, "system.free_tier.sampling", "Events are now sampled to fit the daily budget (" <> show kept <> " of " <> show seen <> " kept so far today).") + let attrs = Map.fromList [("seen", AE.toJSON seen), ("kept", AE.toJSON kept), ("limit", AE.toJSON limit), ("payment_plan", AE.String project.paymentPlan)] insertSystemLog (Telemetry.writeTargetFor ctx.env Nothing) ctx.hasqlTimefusionUsesPgTypes $ mkSystemLog pid eventName sev bodyMsg attrs Nothing now users <- Projects.usersByProjectId pid - let mail = ET.freeTierUsageEmail project.title (projectUrl ctx pid <> "/manage_billing") count limit n + let mail = ET.freeTierUsageEmail project.title (projectUrl ctx pid <> "/manage_billing") seen kept limit n forM_ users \user -> renderAndSend (CI.original user.email) mail diff --git a/src/Models/Projects/Projects.hs b/src/Models/Projects/Projects.hs index 8df06de54..bff57b415 100644 --- a/src/Models/Projects/Projects.hs +++ b/src/Models/Projects/Projects.hs @@ -52,6 +52,10 @@ module Models.Projects.Projects ( updateSubItemIdBySubId, projectCacheById, dailyUsageOfDay, + samplingTallies, + recordSampling, + SampleCounts (..), + samplingToday, freeTierDailyMaxEvents, freeTierDailyLimit, claimFreeTierNotice, @@ -150,6 +154,8 @@ import Data.Char (isDigit) import Data.Default import Data.Effectful.Hasql qualified as EHasql import Data.Effectful.UUID (UUIDEff, genUUID) +import Data.HashMap.Strict qualified as HM +import Data.List (unzip4) import Data.Map.Strict qualified as Map import Data.OpenApi (ToSchema) import Data.Text qualified as T @@ -167,12 +173,14 @@ import Effectful import Effectful.Error.Static qualified as EffError import Effectful.Reader.Static qualified as EffReader import Effectful.Time (Time, currentTime) +import GHC.Generics (Generically (..)) import Hasql.Interpolate qualified as HI import Hasql.Statement (Statement) import Hasql.Transaction qualified as Tx import Hasql.Transaction.Sessions qualified as TxS import Pkg.DeriveUtils (DB, SnakeSchema (..), UUIDId (..), WrappedEnumSC (..), idFromText, selectFrom) import Pkg.Parser.Stats (Section) +import Pkg.Sampling qualified as Sampling import Relude import Servant (FromHttpApiData (..), Header, Headers, ServerError, addHeader, err302, errHeaders, getResponse) import System.Envy (Var) @@ -475,6 +483,56 @@ dailyUsageOfDay :: DB es => ProjectId -> UTCTime -> Eff es Int dailyUsageOfDay pid t = fromMaybe 0 <$> EHasql.interpOne (dailyUsageOfDaySql pid t) +-- | One pool of a capped project ('Sampling.Tally' plus its key), for the UTC hour containing @now@. +data SamplingTally = SamplingTally {projectId :: ProjectId, isError :: Bool, keptToday, seenYesterdayAhead, seenLastHour, seenThisHour :: Int} + deriving stock (Generic) + deriving anyclass (HI.DecodeRow) + + +samplingTallies :: DB es => UTCTime -> V.Vector ProjectId -> Eff es (HM.HashMap (ProjectId, Bool) Sampling.Tally) +samplingTallies now pids = + HM.fromList + . map (\(t :: SamplingTally) -> ((t.projectId, t.isError), Sampling.Tally t.keptToday t.seenYesterdayAhead t.seenLastHour t.seenThisHour)) + <$> EHasql.interp + [HI.sql| WITH b AS (SELECT date_trunc('hour', #{now}::timestamptz, 'UTC') AS h, date_trunc('day', #{now}::timestamptz, 'UTC') AS d) + SELECT s.project_id, s.is_error, + COALESCE(SUM(s.kept) FILTER (WHERE s.hour >= b.d), 0)::bigint, + COALESCE(SUM(s.seen) FILTER (WHERE s.hour >= b.h - interval '1 day' AND s.hour < b.d), 0)::bigint, + COALESCE(SUM(s.seen) FILTER (WHERE s.hour = b.h - interval '1 hour'), 0)::bigint, + COALESCE(SUM(s.seen) FILTER (WHERE s.hour = b.h), 0)::bigint + FROM projects.ingest_sampling s, b + WHERE s.project_id = ANY(#{pids}) AND s.hour >= b.d - interval '1 day' + GROUP BY s.project_id, s.is_error |] + + +-- | One batch's sampling outcome for one pool of a project. +data SampleCounts = SampleCounts {seen, kept :: Sum Int} + deriving stock (Generic) + deriving (Monoid, Semigroup) via Generically SampleCounts + + +-- | Add one batch's counts per (project, is_error) pool to the hour containing @now@. +recordSampling :: DB es => UTCTime -> [((ProjectId, Bool), SampleCounts)] -> Eff es () +recordSampling _ [] = pass +recordSampling now counts = + EHasql.interpExecute_ + [HI.sql| INSERT INTO projects.ingest_sampling AS s (project_id, hour, is_error, seen, kept) + SELECT p, date_trunc('hour', #{now}::timestamptz, 'UTC'), e, a, k + FROM unnest(#{V.fromList pids}::uuid[], #{V.fromList errs}::bool[], #{V.fromList seen}::bigint[], #{V.fromList kept}::bigint[]) u(p, e, a, k) + ON CONFLICT (project_id, hour, is_error) DO UPDATE SET seen = s.seen + EXCLUDED.seen, kept = s.kept + EXCLUDED.kept |] + where + (pids, errs, seen, kept) = unzip4 [(pid, err, getSum c.seen, getSum c.kept) | ((pid, err), c) <- counts] + + +-- | (seen, kept) today for one project: what its sampling looks like to the people reading it. +samplingToday :: DB es => ProjectId -> UTCTime -> Eff es (Int, Int) +samplingToday pid now = + fromMaybe (0, 0) + <$> EHasql.interpOne + [HI.sql| SELECT COALESCE(SUM(seen), 0)::bigint, COALESCE(SUM(kept), 0)::bigint FROM projects.ingest_sampling + WHERE project_id = #{pid} AND hour >= date_trunc('day', #{now}::timestamptz, 'UTC') |] + + freeTierDailyMaxEvents :: Int freeTierDailyMaxEvents = 10000 @@ -488,8 +546,9 @@ freeTierDailyLimit :: Bool -> Text -> Maybe Int freeTierDailyLimit enabled plan = freeTierDailyMaxEvents <$ guard (enabled && not (isPaidPlan (parsePlan plan))) --- | A free-tier usage email; exceeding supersedes an earlier warning the same day. -data FreeTierNotice = NoticeWarning | NoticeExceeded +-- | A free-tier usage email: sampling started today, or the hard ceiling was reached (which +-- supersedes the sampling notice the same day). +data FreeTierNotice = NoticeSampling | NoticeExceeded deriving stock (Eq, Show) @@ -500,7 +559,7 @@ claimFreeTierNotice pid notice = do today <- utctDay <$> currentTime -- Spelled out (not 'fromEnum') so reordering the constructors can't change what stored rows mean. let level :: Int = case notice of - NoticeWarning -> 1 + NoticeSampling -> 1 NoticeExceeded -> 2 (== 1) <$> EHasql.interpExecute diff --git a/src/Models/Telemetry/Telemetry.hs b/src/Models/Telemetry/Telemetry.hs index 4a720437a..2aaf20a64 100644 --- a/src/Models/Telemetry/Telemetry.hs +++ b/src/Models/Telemetry/Telemetry.hs @@ -61,6 +61,7 @@ module Models.Telemetry.Telemetry ( metricExemplars, bulkInsertOtelMetrics, mintMetricIds, + metricSeriesId, bulkInsertOtelLogsAndSpansTF, insertAndHandOff, redactJSON, diff --git a/src/Opentelemetry/OtlpServer.hs b/src/Opentelemetry/OtlpServer.hs index b49c3a225..61a75cc79 100644 --- a/src/Opentelemetry/OtlpServer.hs +++ b/src/Opentelemetry/OtlpServer.hs @@ -80,7 +80,7 @@ import Pkg.ErrorMetrics (wireTypeErrorsRef) import Pkg.LiveTail qualified as LiveTail import Pkg.Metrics qualified as Metrics import Pkg.TraceSessionCache qualified as TSC -import ProcessMessage (fetchIngestCaches, overFreeTierQuota, stampHashesAtIngest, urlPathFromRawUrl) +import ProcessMessage (fetchIngestCaches, overFreeTierQuota, sampleMetrics, sampleSpans, stampHashesAtIngest, urlPathFromRawUrl) import Proto.Opentelemetry.Proto.Collector.Logs.V1.LogsService qualified as LS import Proto.Opentelemetry.Proto.Collector.Logs.V1.LogsService_Fields qualified as LSF import Proto.Opentelemetry.Proto.Collector.Metrics.V1.MetricsService qualified as MS @@ -268,7 +268,7 @@ ingestOtelRecords appCtx target caches records = do stamped <- stampOrPassthrough appCtx records -- Mint before route normalization: records without a span ID hash their raw attributes, -- so retry IDs stay independent of the current endpoint-template cache. - let minted = stampHashesAtIngest caches $ Telemetry.mintOtelLogIds stamped + minted <- sampleSpans caches $ stampHashesAtIngest caches $ Telemetry.mintOtelLogIds stamped -- Live Tail, before the durable write: the whole point is that a browser sees the log -- sooner than a query could return it. Runs after minting so the streamed row carries the -- same id the stored row will, and so "open the full record" resolves once the write lands. @@ -410,10 +410,11 @@ processList msgs !attrs = !pid2M = Projects.projectIdFromText =<< getMetricAttributeValue "at-project-id" rms in maybe V.empty (\pid -> V.fromList $ convertResourceMetricsToMetricRecords ft caches pid rms) (pidM <|> pid2M) ) - ( \_caches perMsg -> + ( \caches perMsg -> checkpoint "processList:metrics:bulkInsert" $ Telemetry.bulkInsertOtelMetrics appCtx.metricCatalogBuffer appCtx.hasqlTimefusionUsesPgTypes target - $ Telemetry.mintMetricIds (concatRecs perMsg) + . Telemetry.mintMetricIds + =<< sampleMetrics caches (concatRecs perMsg) ) _ -> do Log.logAttention "processList: unsupported opentelemetry data type" (AE.object ["ce-type" AE..= HM.lookup "ce-type" attrs]) @@ -463,13 +464,16 @@ processBatchPipeline !label msgs appCtx fallbackTime extractKeys extractIds inva !invalidPoison = [(ackId, raw, err) | (ackId, raw, _, Just err) <- checked] !converted = [(ackId, raw, req, convert fallbackTime projectCachesMap keyToIdMap req) | (ackId, raw, req, Nothing) <- checked] -- DLQ, never ack, a payload naming an unresolved project, or one converting to zero rows - -- unless every project it names is capped (2026-07-27: an ack lost ~200k rows). + -- unless every project it names is capped (2026-07-27: an ack lost ~200k rows). A mixed + -- payload goes whole, resolved rows included, so the unresolved part survives. !dropPoison = [ (ackId, raw, "unresolved project: payload carried telemetry but did not resolve or convert") | (ackId, raw, req, recs) <- converted - , let accounted pids = all (`HM.member` projectCachesMap) pids && (not (V.null recs) || all capped pids) + , let resolved = (<> extractIds req) <$> traverse (`HM.lookup` keyToIdMap) (V.toList (extractKeys req)) + -- 'all capped []' holds, so a payload naming nothing is accounted for either way. + accounted pids = all (`HM.member` projectCachesMap) pids && (not (V.null recs) || all capped pids) capped p = any overFreeTierQuota (HM.lookup p projectCachesMap) - , not $ maybe False (accounted . (<> extractIds req)) (traverse (`HM.lookup` keyToIdMap) (V.toList (extractKeys req))) + , maybe True (not . accounted) resolved ] !dropAckIds = HS.fromList [ackId | (ackId, _, _) <- dropPoison] !writeReady = [(ackId, raw, recs) | (ackId, raw, _, recs) <- converted, not (HS.member ackId dropAckIds)] @@ -480,7 +484,7 @@ processBatchPipeline !label msgs appCtx fallbackTime extractKeys extractIds inva forM_ (decodePoison <> invalidPoison) \(_, raw, err) -> recordProtoError label (toString err) raw unless (null dropPoison) $ Log.logAttention - "processList: payload did not resolve or converted to zero rows — routing to DLQ instead of acking" + "processList: unresolved or zero-row payload — routing to DLQ instead of acking" (AE.object ["label" AE..= label, "dropped_messages" AE..= length dropPoison, "ack_ids" AE..= [a | (a, _, _) <- dropPoison]]) if allEmpty @@ -976,12 +980,10 @@ severityMap = base <> Map.mapMaybe (`Map.lookup` base) aliases aliases = Map.fromList [("WARNING", "WARN" :: Text), ("INFORMATION", "INFO"), ("CRITICAL", "FATAL")] --- | Gate a project's converted records on its cache: unknown project or a --- free-tier project past its daily event+metric budget yields nothing. -withinQuota :: HM.HashMap Projects.ProjectId Projects.ProjectCache -> Projects.ProjectId -> [a] -> [a] -withinQuota projectCaches pid records = case HM.lookup pid projectCaches of - Just cache | not (overFreeTierQuota cache) -> records - _ -> [] +-- | Gate a project's converted records on its cache: an unknown project yields nothing, so +-- 'processBatchPipeline' can tell it from a project whose rows sampling later leaves out. +forKnownProject :: HM.HashMap Projects.ProjectId Projects.ProjectCache -> Projects.ProjectId -> [a] -> [a] +forKnownProject projectCaches pid records = bool [] records (HM.member pid projectCaches) -- | Convert ResourceLogs to OtelLogsAndSpans @@ -991,7 +993,7 @@ convertResourceLogsToOtelLogs !fallbackTime !projectCaches !pids resourceLogs = projectId = (snd <$> find ((== projectKey) . fst) pids) <|> (Projects.projectIdFromText =<< (V.!? 0) (getLogAttributeValue "at-project-id" (V.singleton resourceLogs))) - in maybe [] (\pid -> withinQuota projectCaches pid $ convertScopeLogsToOtelLogs fallbackTime pid (Just $ resourceLogs ^. PLF.resource) resourceLogs) projectId + in maybe [] (\pid -> forKnownProject projectCaches pid $ convertScopeLogsToOtelLogs fallbackTime pid (Just $ resourceLogs ^. PLF.resource) resourceLogs) projectId filterEmptyEvents :: OtelLogsAndSpans -> Bool @@ -1081,7 +1083,7 @@ convertResourceSpansToOtelLogs !fallbackTime !projectCaches !pids !resourceSpans -- single project). Picking V.head of a multi-project batch silently -- mis-attributes spans to the wrong project (cross-tenant leak). <|> (case V.toList pids of [(_, sole)] -> Just sole; _ -> Nothing) - in maybe [] (\pid -> withinQuota projectCaches pid $ convertScopeSpansToOtelLogs fallbackTime pid (Just $ rs ^. PTF.resource) rs) projectId + in maybe [] (\pid -> forKnownProject projectCaches pid $ convertScopeSpansToOtelLogs fallbackTime pid (Just $ rs ^. PTF.resource) rs) projectId -- | Convert ScopeSpans to OtelLogsAndSpansF @@ -1265,7 +1267,7 @@ metricRequestHasOverflow req = -- | Convert ResourceMetrics to MetricRecords convertResourceMetricsToMetricRecords :: UTCTime -> HM.HashMap Projects.ProjectId Projects.ProjectCache -> Projects.ProjectId -> V.Vector PM.ResourceMetrics -> [Telemetry.MetricRecord] convertResourceMetricsToMetricRecords !fallbackTime !projectCaches !pid !resourceMetrics = - withinQuota + forKnownProject projectCaches pid [ record @@ -1528,8 +1530,8 @@ processMetricsRequest metadataApiKey req = do (AE.object ["metric_count" AE..= length metricRecords]) unless (null metricRecords) do - let records = Telemetry.mintMetricIds $ V.fromList metricRecords - target = Telemetry.writeTargetFor appCtx.env Nothing + records <- Telemetry.mintMetricIds <$> sampleMetrics projectCaches (V.fromList metricRecords) + let target = Telemetry.writeTargetFor appCtx.env Nothing Telemetry.bulkInsertOtelMetrics appCtx.metricCatalogBuffer appCtx.hasqlTimefusionUsesPgTypes target records >>= throwOnWriteFailure Log.logTrace "Metrics: Successfully inserted metrics into database" diff --git a/src/Pages/BodyWrapper.hs b/src/Pages/BodyWrapper.hs index 95638a5dc..09baa8d9a 100644 --- a/src/Pages/BodyWrapper.hs +++ b/src/Pages/BodyWrapper.hs @@ -1322,4 +1322,4 @@ checkFreeTierStatus pid paymentPlan = do enabled <- EffReader.asks @AuthContext (.config.enableFreetier) case Projects.freeTierDailyLimit enabled paymentPlan of Nothing -> pure NotFreeTier - Just limit -> (`freeTierUsageStatus` limit) <$> (Projects.dailyUsageOfDay pid =<< Time.currentTime) + Just limit -> freeTierUsageStatus limit <$> (Projects.samplingToday pid =<< Time.currentTime) diff --git a/src/Pkg/EmailTemplates.hs b/src/Pkg/EmailTemplates.hs index c2be85697..748813ee6 100644 --- a/src/Pkg/EmailTemplates.hs +++ b/src/Pkg/EmailTemplates.hs @@ -1170,8 +1170,8 @@ monitorRecoveryEmail projectName monitorTitle = "View Monitor" -freeTierUsageEmail :: Text -> Text -> Int -> Int -> Projects.FreeTierNotice -> (Text, Html ()) -freeTierUsageEmail projectName billingUrl used limit notice = +freeTierUsageEmail :: Text -> Text -> Int -> Int -> Int -> Projects.FreeTierNotice -> (Text, Html ()) +freeTierUsageEmail projectName billingUrl seen kept limit notice = ctaEmail ("[···] " <> subject <> " - " <> projectName) True @@ -1179,17 +1179,17 @@ freeTierUsageEmail projectName billingUrl used limit notice = h1_ $ toHtml $ T.toTitle subject richP_ ["Your ", projectName, sentence] emailStatRow - [ ("Events Today", formatWithCommas (fromIntegral used), Just colour) - , ("Daily Limit", formatWithCommas (fromIntegral limit), Nothing) - , ("Usage", show ((used * 100) `div` max 1 limit) <> "%", Just colour) + [ ("Events Today", formatWithCommas (fromIntegral seen), Nothing) + , ("Kept", formatWithCommas (fromIntegral kept), Just colour) + , ("Daily Budget", formatWithCommas (fromIntegral limit), Nothing) ] ) "Upgrade Plan" billingUrl where (subject, sentence, colour) :: (Text, Text, Text) = case notice of - Projects.NoticeWarning -> ("Approaching daily event limit", " project is approaching its daily free tier limit.", "#bf8700") - Projects.NoticeExceeded -> ("Daily event limit reached", " project has hit its daily free tier limit. New events are dropped until the limit resets at 00:00 UTC.", "#cf222e") + Projects.NoticeSampling -> ("Events are being sampled", " project is sending more than its free tier budget, so today's events are sampled to spread that budget across the day. Errors are kept first, and a kept trace is kept whole.", "#bf8700") + Projects.NoticeExceeded -> ("Daily event ceiling reached", " project has hit its daily free tier ceiling. New events are dropped until it resets at 00:00 UTC.", "#cf222e") -- | Paragraph alternating plain and bold runs: @richP_ ["Your ", project, " is ready."]@. @@ -1245,7 +1245,7 @@ planDowngradedEmail reason projectName = ( do h1_ "Plan Downgraded to Free" richP_ ["Your ", projectName, " project has been downgraded to the Free plan because your subscription " <> reason <> "."] - p_ $ toHtml $ "On the Free plan, ingestion is capped at " <> freeTierCap <> " events per day (resetting at 00:00 UTC); anything beyond that is dropped. Additional team members will be deactivated. You can re-subscribe at any time to restore full access." + p_ $ toHtml $ "On the Free plan, ingestion is budgeted at " <> freeTierCap <> " events per day (resetting at 00:00 UTC); beyond that, events are sampled to fit. Additional team members will be deactivated. You can re-subscribe at any time to restore full access." ) "Upgrade Plan" @@ -1275,7 +1275,7 @@ paymentFailedEmail projectName = ( do h1_ "Payment Failed" richP_ ["We couldn't charge the card for your ", projectName, " project. Your plan is unchanged while we retry over the next few days."] - p_ $ toHtml $ "Please update your payment method. If every retry fails, the project moves to the Free plan and ingestion is capped at " <> freeTierCap <> " events per day." + p_ $ toHtml $ "Please update your payment method. If every retry fails, the project moves to the Free plan and ingestion is budgeted at " <> freeTierCap <> " events per day." ) "Update Payment Method" diff --git a/src/Pkg/Metrics.hs b/src/Pkg/Metrics.hs index 408d6ccbe..8822ea3ff 100644 --- a/src/Pkg/Metrics.hs +++ b/src/Pkg/Metrics.hs @@ -34,6 +34,7 @@ module Pkg.Metrics ( ingestSpansProcessed, extractionBatchesDropped, freeTierBatchesDropped, + freeTierSampledOut, drainFlushesCompleted, drainSpansFlushed, drainPatternsPersisted, @@ -292,12 +293,18 @@ extractionBatchesDropped = mkCounter "monoscope.extraction.batches.dropped" Noth -- | Per-project slices of telemetry batches not ingested (or rejected at the OTLP edge) because --- the project is past its free-tier daily cap. Which project is in the hourly attention log. +-- the project is past the hard ceiling of its free-tier daily budget. freeTierBatchesDropped :: Counter Int64 freeTierBatchesDropped = mkCounter "monoscope.ingest.free_tier.batches_dropped" Nothing {-# NOINLINE freeTierBatchesDropped #-} +-- | Records dropped by free-tier sampling ("Pkg.Sampling"). +freeTierSampledOut :: Counter Int64 +freeTierSampledOut = mkCounter "monoscope.ingest.free_tier.sampled_out" Nothing +{-# NOINLINE freeTierSampledOut #-} + + drainFlushesCompleted :: Counter Int64 drainFlushesCompleted = mkCounter "monoscope.drain.flushes.completed" Nothing {-# NOINLINE drainFlushesCompleted #-} diff --git a/src/Pkg/Sampling.hs b/src/Pkg/Sampling.hs new file mode 100644 index 000000000..3296f5a22 --- /dev/null +++ b/src/Pkg/Sampling.hs @@ -0,0 +1,99 @@ +-- | Free-tier sampling: spread a capped project's daily event budget across the UTC day +-- instead of keeping everything until the cap and nothing after it. +-- +-- Pacing is ad-budget pacing: each pool keeps with probability (budget left) / (traffic +-- still expected today). Decisions hash a stable key (trace id, record id, metric series), +-- so every record sharing a key gets the same answer and a kept trace stays whole. Pacing is +-- approximate: pods read counters a batch apart, and 'hardCap' bounds the overshoot. +module Pkg.Sampling (Tally (..), hardCap, rates, pace, keeps) where + +import Data.Default (Default) +import Data.Digest.XXHash (xxHash) +import Data.Fixed (mod') +import Data.Time (UTCTime (..)) +import Relude + + +-- | One pool's counters for a capped project, read from @projects.ingest_sampling@. +-- @seen@ counts before sampling, so yesterday's hours are a usable forecast of today's. +data Tally = Tally + { keptToday :: Int + , seenYesterdayAhead :: Int + -- ^ yesterday's seen events from this hour of day onward + , seenLastHour :: Int + , seenThisHour :: Int + } + deriving stock (Eq, Generic, Show) + deriving anyclass (Default) + + +-- $setup +-- >>> import Data.Time (fromGregorian) +-- >>> let noon = UTCTime (fromGregorian 2026 10 25) 43200 + + +-- | Hard stop: past this many kept events in a day nothing more is kept, whatever the forecast. +-- +-- >>> hardCap 10000 +-- 12000 +hardCap :: Int -> Int +hardCap budget = budget + budget `div` 5 + + +-- | Keep probabilities (events, errors) for a project with a daily @budget@, from the hourly +-- usage meter and its two pools' tallies. A fifth of the budget is reserved for errors, so a +-- noisy success path can't crowd them out; at the hard cap by either count nothing is kept. +-- +-- >>> rates noon 10000 0 (Tally 0 16000 0 0, Tally 0 0 0 0) +-- (0.5,1.0) +-- >>> rates noon 10000 0 (Tally 10000 0 0 0, Tally 2000 0 0 0) +-- (0.0,0.0) +-- >>> rates noon 10000 0 (Tally 10000 0 0 0, Tally 1999 0 0 0) -- one short of the cap +-- (0.0,1.0) +-- >>> rates noon 10000 12000 (Tally 0 0 0 0, Tally 0 0 0 0) -- the meter alone reached it +-- (0.0,0.0) +-- >>> rates noon 10000 0 (Tally 0 16000 0 0, Tally 2000 9000 0 0) -- error reserve spent +-- (0.5,0.0) +rates :: UTCTime -> Int -> Int -> (Tally, Tally) -> (Double, Double) +rates now budget metered (events, errors) + | max metered (events.keptToday + errors.keptToday) >= hardCap budget = (0, 0) + | otherwise = (pace now (budget - reserve) events, pace now reserve errors) + where + reserve = budget `div` 5 + + +-- | Keep probability for one pool: budget left over traffic still expected before 00:00 UTC. +-- The forecast is yesterday's traffic from this hour on, falling back to the recent hourly +-- rate; with no history at all, everything is kept until counters exist. +-- +-- >>> pace noon 8000 (Tally 0 0 0 0) +-- 1.0 +-- >>> pace noon 8000 (Tally 4000 40000 0 0) -- half the budget left, 10x that still coming +-- 0.1 +-- >>> pace noon 8000 (Tally 4000 0 3600 0) -- no yesterday: 3600/h for the 12h left +-- 9.259259259259259e-2 +-- >>> pace noon 8000 (Tally 8000 40000 0 0) -- spent +-- 0.0 +pace :: UTCTime -> Int -> Tally -> Double +pace now budget t + | left <= 0 = 0 + | forecast <= 0 = 1 + | otherwise = min 1 (fromIntegral left / forecast) + where + left = budget - t.keptToday + secondOfDay = realToFrac (utctDayTime now) :: Double + perSecond + | t.seenLastHour > 0 = fromIntegral t.seenLastHour / 3600 + | otherwise = fromIntegral t.seenThisHour / max 60 (secondOfDay `mod'` 3600) + forecast = if t.seenYesterdayAhead > 0 then fromIntegral t.seenYesterdayAhead else perSecond * (86400 - secondOfDay) + + +-- | Consistent keep decision: the key's hash, scaled to [0,1), against the probability. +-- Raising @p@ only adds keys, so a trace kept at a lower rate is kept at every higher one. +-- +-- >>> keeps 1 "trace-a" && not (keeps 0 "trace-a") +-- True +-- >>> let n = length (filter (keeps 0.25 . show) [1 .. 10000 :: Int]) in n > 2300 && n < 2700 +-- True +keeps :: Double -> Text -> Bool +keeps p key = fromIntegral (xxHash (encodeUtf8 key)) < p * (fromIntegral (maxBound :: Word32) + 1) diff --git a/src/ProcessMessage.hs b/src/ProcessMessage.hs index 3445c667e..5179db15d 100644 --- a/src/ProcessMessage.hs +++ b/src/ProcessMessage.hs @@ -41,12 +41,14 @@ module ProcessMessage ( hostFromRawUrl, urlPathFromRawUrl, overFreeTierQuota, + sampleSpans, + sampleMetrics, fetchProjectCache, fetchIngestCaches, ) where -import Control.Lens ((^?)) +import Control.Lens ((.~), (^?)) import Control.Monad.ST (ST, runST) import Data.Aeson qualified as AE import Data.Aeson.Extra (lodashMerge) @@ -57,14 +59,17 @@ import Data.Aeson.Types qualified as AE import Data.ByteString qualified as BS import Data.Cache qualified as Cache import Data.Char (digitToInt, isAlpha, isAlphaNum, isDigit, isHexDigit) +import Data.Default (def) import Data.Effectful.Hasql qualified as Hasql import Data.Effectful.Sleep (Sleep) import Data.Effectful.UUID qualified as UUID +import Data.Generics.Product.Fields (field) import Data.HashMap.Strict qualified as HM import Data.HashSet qualified as HashSet import Data.HashTable.Class qualified as HTC import Data.HashTable.ST.Cuckoo qualified as HT import Data.List qualified as L +import Data.Map.Strict qualified as Map import Data.Text qualified as T import Data.Time (addUTCTime, zonedTimeToUTC) import Data.Time.LocalTime (ZonedTime) @@ -76,7 +81,7 @@ import Effectful.Ki qualified as Ki import Effectful.Labeled (Labeled (..)) import Effectful.Log (Log) import Effectful.Reader.Static qualified as Eff -import Effectful.Time (Time) +import Effectful.Time (Time, currentTime) import Models.Apis.Endpoints qualified as Endpoints import Models.Apis.ErrorPatterns qualified as ErrorPatterns import Models.Apis.LogQueries qualified as LogQueries @@ -86,6 +91,7 @@ import Models.Telemetry.Telemetry (Context (trace_state), OtelLogsAndSpans (..), import Models.Telemetry.Telemetry qualified as Telemetry import Pkg.DeriveUtils (AesonText (..), UUIDId (..), unAesonTextMaybe) import Pkg.Metrics qualified as Metrics +import Pkg.Sampling qualified as Sampling import Pkg.SchemaLearning.Catalog qualified as Catalog import Pkg.SchemaLearning.Hot qualified as SchemaHot import Relude hiding (ask) @@ -97,6 +103,7 @@ import System.Tracing (Tracing, batchSpanAttrs, withSpan_) import System.Types (DB) import Text.RE.TDFA (RE, re, reRegex) import Text.Regex.TDFA qualified as TDFA +import UnliftIO.Exception (tryAny) import Utils (b64ToJson, jsonToMap, nestedJsonFromDotNotation, replaceAllFormats, toXXHash) @@ -129,8 +136,7 @@ processMessages msgs attrs = paired <- forM rMsgs \(ackId, raw, msg) -> runMaybeT do let pid = UUIDId msg.projectId !msgSize = fromIntegral (BS.length raw) - cache <- hoistMaybe $ HM.lookup pid projectCaches - guard $ not (overFreeTierQuota cache) + guard $ HM.member pid projectCaches let (spanId, trId) = requestEventIds msg pure $! (ackId, raw, convertRequestMessageToSpan msg msgSize (spanId, trId)) @@ -140,26 +146,87 @@ processMessages msgs attrs = Nothing -> pure (Right ()) Just (projectCaches, paired) -> Metrics.timed Metrics.ingestWriteHist [] - $ Telemetry.insertAndHandOff appCtx.hasqlTimefusionUsesPgTypes (Telemetry.writeTargetFor appCtx.env Nothing) appCtx.extractionWorker projectCaches (stampHashesAtIngest projectCaches $ V.map (\(_, _, s) -> s) paired) + . Telemetry.insertAndHandOff appCtx.hasqlTimefusionUsesPgTypes (Telemetry.writeTargetFor appCtx.env Nothing) appCtx.extractionWorker projectCaches + =<< sampleSpans projectCaches (stampHashesAtIngest projectCaches $ V.map (\(_, _, s) -> s) paired) -- On success the whole batch landed on every store (no per-row poison); the -- only DLQ entries are the decode failures collected upstream in `poison`. pure $ writeRes $> (rAckIds, poison) --- | A capped project past its daily event+metric budget: its telemetry is not ingested. +-- | A capped project at the hard cap of its daily budget ('Sampling.hardCap') by the hourly +-- meter: the OTLP edge rejects its exports outright. Sampling also checks its own counters. overFreeTierQuota :: Projects.ProjectCache -> Bool -overFreeTierQuota cache = any (cache.row.dailyUsage >=) cache.dailyLimit +overFreeTierQuota cache = any ((cache.row.dailyUsage >=) . Sampling.hardCap) cache.dailyLimit + + +-- | Keep a capped project's share of the batch ("Pkg.Sampling") and record what it saw; records +-- of uncapped or unknown projects pass through. Records sharing a key share a verdict: a key +-- with any error in the batch is judged at the error rate, so a trace stays whole within a +-- batch (one split across batches can be judged at two rates). A sampled +-- record is stamped with its weight (1/p), so what it stands for can be counted back up. +sampleCapped + :: (DB es, IOE :> es, Log :> es, Time :> es) + => (r -> Text) + -> (r -> Bool) + -> (r -> Text) + -> (Double -> r -> r) + -> HM.HashMap Projects.ProjectId Projects.ProjectCache + -> V.Vector r + -> Eff es (V.Vector r) +sampleCapped projectOf isError keyOf stamp caches records + | HM.null capped = pure records + | otherwise = do + now <- currentTime + tallies <- Projects.samplingTallies now (V.fromList $ HM.keys capped) + -- Keyed by the id's text, which records carry, so uncapped records cost one lookup. + let rateOf = HM.fromList [(pid.toText, (pid, Sampling.rates now budget cache.row.dailyUsage (tally pid False, tally pid True))) | (pid, (cache, budget)) <- HM.toList capped] + tally pid err = HM.findWithDefault def (pid, err) tallies + errorKeys = HashSet.fromList [keyOf r | r <- V.toList records, HM.member (projectOf r) rateOf, isError r] + judge r = case HM.lookup (projectOf r) rateOf of + Nothing -> (Just r, Nothing) + Just (pid, (pEvents, pErrors)) -> + let p = bool pEvents (max pEvents pErrors) (HashSet.member (keyOf r) errorKeys) + keep = Sampling.keeps p (keyOf r) + in (bool r (stamp (1 / p) r) (p < 1) <$ guard keep, Just ((pid, isError r), Projects.SampleCounts 1 (Sum (fromEnum keep)))) + judged = V.map judge records + counts = HM.fromListWith (<>) (mapMaybe snd $ V.toList judged) + total = fold counts + -- Counters only steer pacing: losing a batch's worth must not fail the ingest. + whenLeftM_ (tryAny $ Projects.recordSampling now (HM.toList counts)) + $ Log.logAttention "Free-tier sampling counters not recorded; pacing may drift" + . show @Text + Metrics.count Metrics.freeTierSampledOut (getSum $ total.seen - total.kept) [] + pure $ V.mapMaybe fst judged + where + capped = HM.mapMaybe (\c -> (c,) <$> c.dailyLimit) caches + + +-- | 'sampleCapped' for spans and logs: a trace is kept or dropped whole, and a kept record +-- carries @monoscope.sample_weight@. +sampleSpans :: (DB es, IOE :> es, Log :> es, Time :> es) => HM.HashMap Projects.ProjectId Projects.ProjectCache -> V.Vector Telemetry.OtelLogsAndSpans -> Eff es (V.Vector Telemetry.OtelLogsAndSpans) +sampleSpans = + sampleCapped + (.project_id) + Telemetry.isErrorRecord + (\r -> fromMaybe r.id (Telemetry.traceIdOf r)) + (\w r -> r & field @"attributes" .~ Just (AesonText $ Map.insertWith (flip lodashMerge) "monoscope" (AE.object ["sample_weight" AE..= w]) (maybeToMonoid $ unAesonTextMaybe r.attributes))) + + +-- | 'sampleCapped' for metrics: a series is kept or dropped whole, so no kept series has holes. +-- Points carry no weight; a series stands for itself. +sampleMetrics :: (DB es, IOE :> es, Log :> es, Time :> es) => HM.HashMap Projects.ProjectId Projects.ProjectCache -> V.Vector Telemetry.MetricRecord -> Eff es (V.Vector Telemetry.MetricRecord) +sampleMetrics = sampleCapped (UUID.toText . (.projectId)) (const False) Telemetry.metricSeriesId (\_ r -> r) -- | Project cache lookup, memoized in the shared cache. A capped entry expires after 5 minutes --- rather than 30, so a customer who upgrades is uncapped promptly on every pod. +-- rather than 30, so a customer who upgrades stops being sampled promptly on every pod. fetchProjectCache :: (DB es, Eff.Reader AuthContext :> es, IOE :> es, Time :> es) => Projects.ProjectId -> Eff es Projects.ProjectCache fetchProjectCache pid = do appCtx <- Eff.ask @AuthContext whenNothingM (liftIO $ Cache.lookup appCtx.projectCache pid) do c <- Projects.projectCacheById appCtx.config.enableFreetier pid - c <$ liftIO (bool (Cache.insert appCtx.projectCache) (Cache.insert' appCtx.projectCache (Just $ TimeSpec 300 0)) (overFreeTierQuota c) pid c) + c <$ liftIO (bool (Cache.insert appCtx.projectCache) (Cache.insert' appCtx.projectCache (Just $ TimeSpec 300 0)) (isJust c.dailyLimit) pid c) -- | The caches an ingest batch converts against. Every ingest path drops a capped project's diff --git a/src/Utils.hs b/src/Utils.hs index dc67fb1d9..8ce2380fc 100644 --- a/src/Utils.hs +++ b/src/Utils.hs @@ -136,6 +136,7 @@ import Network.HTTP.Types.URI qualified as URI import Network.URI (escapeURIString, isUnescapedInURI) import Numeric (showFFloat, showHex) import Pkg.Icons qualified as Icons +import Pkg.Sampling qualified as Sampling import Relude hiding (notElem) import Relude.Extra.Tuple (toSnd) import Servant hiding ((:>)) @@ -701,17 +702,18 @@ encodeText :: AE.ToJSON a => a -> Text encodeText = decodeUtf8 . AE.encode -data FreeTierStatus = NotFreeTier | FreeTierOk | FreeTierWarning Int Int | FreeTierExceeded Int Int +-- | @FreeTierSampled oneIn limit@: today's events are being kept about one in @oneIn@. +data FreeTierStatus = NotFreeTier | FreeTierOk | FreeTierSampled Int Int | FreeTierExceeded Int Int deriving stock (Eq, Generic, Show) deriving anyclass (Default) freeTierUsageBanner :: Text -> FreeTierStatus -> Html () freeTierUsageBanner pid = \case - FreeTierWarning used limit -> + FreeTierSampled oneIn limit -> div_ [class_ "flex w-full text-center items-center px-4 gap-4 py-1 bg-fillWarning-weak text-textWarning rounded-lg justify-center"] do - strong_ $ "You\x2019ve used " <> toHtml (formatWithCommas $ fromIntegral used) <> " of " <> toHtml (formatWithCommas $ fromIntegral limit) <> " daily events." - a_ [class_ "underline underline-offset-2 link font-medium", href_ $ "/p/" <> pid <> "/manage_billing"] "Compare plans \x2192" + strong_ $ "Free tier: today\x2019s events are sampled, about 1 in " <> toHtml (formatWithCommas $ fromIntegral oneIn) <> " kept, to stay within " <> toHtml (formatWithCommas $ fromIntegral limit) <> " a day." + a_ [class_ "underline underline-offset-2 link font-medium", href_ $ "/p/" <> pid <> "/manage_billing"] "Upgrade to keep every event \x2192" FreeTierExceeded{} -> div_ [class_ "flex w-full text-center items-center px-4 gap-4 py-1 bg-fillError-weak text-textError rounded-lg justify-center"] do strong_ "Daily cap reached \x2014 new events are dropped until 00:00 UTC." @@ -720,14 +722,15 @@ freeTierUsageBanner pid = \case FreeTierOk -> pass --- | Warn at 80% of the cap, stop at 100%. +-- | From today's (seen, kept) under a daily @limit@: sampling once anything was left out, and +-- exceeded at the hard ceiling, where nothing more is kept. -- --- >>> map (`freeTierUsageStatus` 100) [79, 80, 100] --- [FreeTierOk,FreeTierWarning 80 100,FreeTierExceeded 100 100] -freeTierUsageStatus :: Int -> Int -> FreeTierStatus -freeTierUsageStatus used limit - | used >= limit = FreeTierExceeded used limit - | used >= (limit * 80) `div` 100 = FreeTierWarning used limit +-- >>> map (freeTierUsageStatus 100) [(50, 50), (400, 100), (401, 100), (900, 120)] +-- [FreeTierOk,FreeTierSampled 4 100,FreeTierSampled 5 100,FreeTierExceeded 120 100] +freeTierUsageStatus :: Int -> (Int, Int) -> FreeTierStatus +freeTierUsageStatus limit (seen, kept) + | kept >= Sampling.hardCap limit = FreeTierExceeded kept limit + | seen > kept = FreeTierSampled ((seen + kept - 1) `div` max 1 kept) limit | otherwise = FreeTierOk diff --git a/static/migrations/0254_ingest_sampling.sql b/static/migrations/0254_ingest_sampling.sql new file mode 100644 index 000000000..ee66e27d2 --- /dev/null +++ b/static/migrations/0254_ingest_sampling.sql @@ -0,0 +1,11 @@ +-- Free-tier sampling counters per capped project, UTC hour and pool (see Pkg.Sampling). `seen` is +-- counted before sampling, so yesterday's hours forecast today's traffic; `kept` is what landed. +CREATE TABLE IF NOT EXISTS projects.ingest_sampling ( + project_id uuid NOT NULL REFERENCES projects.projects(id) ON DELETE CASCADE, + hour timestamptz NOT NULL, + is_error boolean NOT NULL, + seen bigint NOT NULL DEFAULT 0, + kept bigint NOT NULL DEFAULT 0, + PRIMARY KEY (project_id, hour, is_error) +); +CREATE INDEX IF NOT EXISTS ingest_sampling_hour_idx ON projects.ingest_sampling (hour); diff --git a/test/integration/BackgroundJobs/ReportUsageSpec.hs b/test/integration/BackgroundJobs/ReportUsageSpec.hs index 045ef78b9..6303f12d9 100644 --- a/test/integration/BackgroundJobs/ReportUsageSpec.hs +++ b/test/integration/BackgroundJobs/ReportUsageSpec.hs @@ -10,21 +10,26 @@ module BackgroundJobs.ReportUsageSpec (spec) where -- thing and re-submit chunks that already succeeded. import BackgroundJobs qualified -import Control.Lens (_1, (%~), (^.)) +import Control.Lens (_1, (%~), (.~), (^.)) import Data.Cache qualified as Cache import Data.HashMap.Strict qualified as HM import Data.List qualified as L import Data.Pool (withResource) -import Data.ProtoLens (decodeMessage, encodeMessage) +import Data.ProtoLens (decodeMessage, defMessage, encodeMessage) import Data.Text qualified as T import Data.Time (UTCTime (..), addUTCTime, fromGregorian) import Database.PostgreSQL.Simple qualified as PGS import Database.PostgreSQL.Simple.SqlQQ (sql) import Models.Projects.Projects qualified as Projects +import Pkg.Sampling qualified as Sampling import Opentelemetry.OtlpServer qualified as OtlpServer import Pkg.TestUtils import Proto.Opentelemetry.Proto.Collector.Logs.V1.LogsService qualified as LS import Proto.Opentelemetry.Proto.Collector.Logs.V1.LogsService_Fields qualified as LSF +import Proto.Opentelemetry.Proto.Collector.Metrics.V1.MetricsService_Fields qualified as MSF +import Proto.Opentelemetry.Proto.Collector.Trace.V1.TraceService_Fields qualified as TSF +import Proto.Opentelemetry.Proto.Trace.V1.Trace_Fields qualified as PTF +import Proto.Opentelemetry.Proto.Trace.V1.Trace qualified as PT import Relude import System.Config qualified as Config import Test.Hspec (Spec, around, describe, it, shouldBe, shouldMatchList, shouldNotSatisfy, shouldReturn, shouldSatisfy, shouldThrow) @@ -164,6 +169,18 @@ seedUsageAt tr pid at = do logCount tr pid >>= (`shouldSatisfy` (> 0)) +-- | Turn the free tier on for @pid@ (Free plan) and seed yesterday's non-error traffic from +-- this hour on, which paces today's keep rate; returns the config and a fresh API key. +cappedExpecting :: TestResources -> Projects.ProjectId -> Int -> IO (TestResources, Text) +cappedExpecting tr0 pid seenAhead = do + let tr = tr0{trATCtx = tr0.trATCtx{Config.config = tr0.trATCtx.config{Config.enableFreetier = True}}} + setBilling tr pid "Free" Nothing Nothing frozenTime + key <- createTestAPIKey tr pid "free-tier-sampling-key" + withResource tr.trPool \conn -> + void $ PGS.execute conn [sql| INSERT INTO projects.ingest_sampling (project_id, hour, is_error, seen) VALUES (?, date_trunc('hour', ?::timestamptz, 'UTC') - interval '1 day', false, ?) |] (pid, frozenTime, seenAhead) + pure (tr, key) + + logCount :: TestResources -> Projects.ProjectId -> IO Int logCount tr pid = withResource tr.trPool \conn -> do [PGS.Only c] <- PGS.query conn [sql| SELECT COUNT(*)::INT FROM otel_logs_and_spans WHERE project_id = ?::text |] (PGS.Only pid) @@ -534,7 +551,7 @@ spec = around (\f -> withTestResources \tr -> createTestProject tr "report-usage conn [sql| INSERT INTO apis.daily_usage (project_id, total_requests, total_metrics, window_start, window_end) VALUES (?, ?, 0, now() - interval '1 minute', now()) |] - (pid, Projects.freeTierDailyMaxEvents) + (pid, Sampling.hardCap Projects.freeTierDailyMaxEvents) Cache.purge tr.trATCtx.projectCache ingestLog tr key "over the cap" frozenTime logCount tr pid `shouldReturn` 1 @@ -559,6 +576,42 @@ spec = around (\f -> withTestResources \tr -> createTestProject tr "report-usage res ^. LSF.partialSuccess . LSF.errorMessage `shouldSatisfy` T.isInfixOf "00:00 UTC" logCount tr pid `shouldReturn` 1 + -- Past its budget a capped project keeps a share paced across the day, not everything until + -- the cap and nothing after; each kept record says how many it stands for. + it "freeTierSampling_overBudget_keepsAPacedShareWithWeights" \(tr0, pid) -> do + -- Yesterday from this hour on brought twice the 8,000-event (non-error) budget: keep half. + (tr, key) <- cappedExpecting tr0 pid 16000 + runTestBg frozenTime tr $ OtlpServer.processLogsRequest Nothing (createOtelLogAtTime key [show i | i <- [1 .. 400 :: Int]] frozenTime) + kept <- logCount tr pid + kept `shouldSatisfy` \k -> k > 160 && k < 240 + withResource tr.trPool \conn -> do + PGS.query conn [sql| SELECT SUM(seen)::INT, SUM(kept)::INT FROM projects.ingest_sampling WHERE project_id = ? AND hour >= date_trunc('day', ?::timestamptz, 'UTC') |] (pid, frozenTime) + >>= (`shouldBe` [(400 :: Int, kept)]) + PGS.query conn [sql| SELECT DISTINCT (attributes->'monoscope'->>'sample_weight')::float8 FROM otel_logs_and_spans WHERE project_id = ?::text |] (PGS.Only pid) + >>= (`shouldBe` [PGS.Only (2 :: Double)]) + + -- Errors draw on their own reserve while ordinary traffic is thinned, and a trace with an + -- error in it is kept whole, not just its error span. + it "freeTierSampling_errorTracesKeptWhole_restThinned" \(tr0, pid) -> do + (tr, key) <- cappedExpecting tr0 pid 80000 -- non-errors kept at 0.1, errors (no history) at 1 + let hex n i = T.justifyRight n '0' (show i) + spanAt t s err = mkSpanRequest (hex 32 t) (hex 16 (t * 10 + s)) Nothing "op" [] ((defMessage & PTF.code .~ PT.Status'STATUS_CODE_ERROR) <$ guard err) [] (mkResource key []) frozenTime + spans = [spanAt t s (s == 1) | t <- [1 .. 20 :: Int], s <- [1 .. 3]] <> [spanAt t 1 False | t <- [101 .. 300]] + runTestBg frozenTime tr $ OtlpServer.processTraceRequest Nothing (defMessage & TSF.resourceSpans .~ concatMap (^. TSF.resourceSpans) spans) + perTrace :: [(Text, Int)] <- withResource tr.trPool \conn -> PGS.query conn [sql| SELECT context___trace_id, COUNT(*)::INT FROM otel_logs_and_spans WHERE project_id = ?::text GROUP BY 1 |] (PGS.Only pid) + let (errorTraces, okTraces) = L.partition ((`elem` map (hex 32) [1 .. 20 :: Int]) . fst) perTrace + map snd errorTraces `shouldBe` replicate 20 3 + length okTraces `shouldSatisfy` \k -> k > 5 && k < 45 + + -- A metric series is kept or dropped whole, so a kept series has no holes. + it "freeTierSampling_metricSeriesKeptWhole" \(tr0, pid) -> do + (tr, key) <- cappedExpecting tr0 pid 16000 + let points = [createGaugeMetricAtTime key [] [] ("m" <> show i) 1 t | i <- [1 .. 200 :: Int], t <- [frozenTime, addUTCTime 60 frozenTime]] + runTestBg frozenTime tr $ OtlpServer.processMetricsRequest Nothing (defMessage & MSF.resourceMetrics .~ concatMap (^. MSF.resourceMetrics) points) + perSeries :: [(Text, Int)] <- withResource tr.trPool \conn -> PGS.query conn [sql| SELECT metric_name, COUNT(*)::INT FROM otel_metrics WHERE project_id = ? GROUP BY 1 |] (PGS.Only pid) + L.nub (map snd perSeries) `shouldBe` [2] + length perSeries `shouldSatisfy` \k -> k > 60 && k < 140 + -- Hourly and daily ticks both enqueue ReportUsage at 00:00; the loser of the lease must not -- record the window again (and bill it twice). it "skips recording while another run holds the project's usage lease" \(tr, pid) -> do @@ -583,5 +636,5 @@ spec = around (\f -> withTestResources \tr -> createTestProject tr "report-usage dailyUsage tr pid >>= (`shouldBe` [(3, 0, 0)]) it "claims each usage notice level once per day" \(tr, pid) -> do - claims <- runTestBg frozenTime tr $ traverse (Projects.claimFreeTierNotice pid) [Projects.NoticeWarning, Projects.NoticeWarning, Projects.NoticeExceeded, Projects.NoticeExceeded, Projects.NoticeWarning] + claims <- runTestBg frozenTime tr $ traverse (Projects.claimFreeTierNotice pid) [Projects.NoticeSampling, Projects.NoticeSampling, Projects.NoticeExceeded, Projects.NoticeExceeded, Projects.NoticeSampling] claims `shouldBe` [True, False, True, False, False] From fb684ef32523815b9ae0c3c1c6e4c02fb980f0d7 Mon Sep 17 00:00:00 2001 From: Anthony Alaribe Date: Sun, 25 Oct 2026 22:55:17 +0100 Subject: [PATCH 007/201] Sample before hashing and round the banner's 1-in-N (#717) Review follow-ups: hashes are no longer computed for rows sampling drops; the banner rounds the ratio and appears from about 1 in 2, so 99% kept no longer reads as '1 in 2'; note that metrics share the events pool. --- src/Opentelemetry/OtlpServer.hs | 3 ++- src/ProcessMessage.hs | 6 ++++-- src/Utils.hs | 10 ++++++---- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/Opentelemetry/OtlpServer.hs b/src/Opentelemetry/OtlpServer.hs index 61a75cc79..1d5bed42f 100644 --- a/src/Opentelemetry/OtlpServer.hs +++ b/src/Opentelemetry/OtlpServer.hs @@ -268,7 +268,8 @@ ingestOtelRecords appCtx target caches records = do stamped <- stampOrPassthrough appCtx records -- Mint before route normalization: records without a span ID hash their raw attributes, -- so retry IDs stay independent of the current endpoint-template cache. - minted <- sampleSpans caches $ stampHashesAtIngest caches $ Telemetry.mintOtelLogIds stamped + -- Sample before hashing: hashes for rows sampling drops are wasted work. + minted <- stampHashesAtIngest caches <$> sampleSpans caches (Telemetry.mintOtelLogIds stamped) -- Live Tail, before the durable write: the whole point is that a browser sees the log -- sooner than a query could return it. Runs after minting so the streamed row carries the -- same id the stored row will, and so "open the full record" resolves once the write lands. diff --git a/src/ProcessMessage.hs b/src/ProcessMessage.hs index 5179db15d..38b99e6f0 100644 --- a/src/ProcessMessage.hs +++ b/src/ProcessMessage.hs @@ -147,7 +147,8 @@ processMessages msgs attrs = Just (projectCaches, paired) -> Metrics.timed Metrics.ingestWriteHist [] . Telemetry.insertAndHandOff appCtx.hasqlTimefusionUsesPgTypes (Telemetry.writeTargetFor appCtx.env Nothing) appCtx.extractionWorker projectCaches - =<< sampleSpans projectCaches (stampHashesAtIngest projectCaches $ V.map (\(_, _, s) -> s) paired) + . stampHashesAtIngest projectCaches + =<< sampleSpans projectCaches (V.map (\(_, _, s) -> s) paired) -- On success the whole batch landed on every store (no per-row poison); the -- only DLQ entries are the decode failures collected upstream in `poison`. @@ -214,7 +215,8 @@ sampleSpans = -- | 'sampleCapped' for metrics: a series is kept or dropped whole, so no kept series has holes. --- Points carry no weight; a series stands for itself. +-- Points carry no weight; a series stands for itself. Metrics share the events pool with +-- non-error logs and spans. sampleMetrics :: (DB es, IOE :> es, Log :> es, Time :> es) => HM.HashMap Projects.ProjectId Projects.ProjectCache -> V.Vector Telemetry.MetricRecord -> Eff es (V.Vector Telemetry.MetricRecord) sampleMetrics = sampleCapped (UUID.toText . (.projectId)) (const False) Telemetry.metricSeriesId (\_ r -> r) diff --git a/src/Utils.hs b/src/Utils.hs index 8ce2380fc..b61ae769b 100644 --- a/src/Utils.hs +++ b/src/Utils.hs @@ -722,16 +722,18 @@ freeTierUsageBanner pid = \case FreeTierOk -> pass --- | From today's (seen, kept) under a daily @limit@: sampling once anything was left out, and +-- | From today's (seen, kept) under a daily @limit@: sampled once about half or more is left out, and -- exceeded at the hard ceiling, where nothing more is kept. -- --- >>> map (freeTierUsageStatus 100) [(50, 50), (400, 100), (401, 100), (900, 120)] --- [FreeTierOk,FreeTierSampled 4 100,FreeTierSampled 5 100,FreeTierExceeded 120 100] +-- >>> map (freeTierUsageStatus 100) [(50, 50), (101, 100), (149, 100), (400, 100), (900, 120)] +-- [FreeTierOk,FreeTierOk,FreeTierOk,FreeTierSampled 4 100,FreeTierExceeded 120 100] freeTierUsageStatus :: Int -> (Int, Int) -> FreeTierStatus freeTierUsageStatus limit (seen, kept) | kept >= Sampling.hardCap limit = FreeTierExceeded kept limit - | seen > kept = FreeTierSampled ((seen + kept - 1) `div` max 1 kept) limit + | oneIn >= 2 = FreeTierSampled oneIn limit | otherwise = FreeTierOk + where + oneIn = round (fromIntegral seen / fromIntegral (max 1 kept) :: Double) serviceColors :: V.Vector Text From a55d34b27319c786ce1f1fac63c4f588bb006f35 Mon Sep 17 00:00:00 2001 From: Anthony Alaribe Date: Sun, 25 Oct 2026 22:58:08 +0100 Subject: [PATCH 008/201] Cancel the provider subscription when a project picks Free (#718) Choosing Free in the plan picker cleared sub_id but never cancelled the Stripe or LemonSqueezy subscription, so the customer kept being billed for a plan they left. --- src/Pages/Projects.hs | 2 ++ test/integration/Pages/BusinessFlowsSpec.hs | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/src/Pages/Projects.hs b/src/Pages/Projects.hs index 443e10708..1dd6bf5f6 100644 --- a/src/Pages/Projects.hs +++ b/src/Pages/Projects.hs @@ -1419,6 +1419,8 @@ pricingUpdateH pid PricingUpdateForm{orderIdM, plan, isOnboarding} = do Settings.notifyPlanChange envCfg project (ET.planUpgradedEmail productName) _ -> addErrorToast "Something went wrong while fetching subscription id" Nothing Nothing -> do + -- Free clears sub_id below; cancel first, or the provider keeps billing a sub nothing points at. + whenJustM (Projects.projectById pid) (Settings.cancelProjectSubscription envCfg) _ <- updatePricing "Free" "" "" "" auditPlan ("Free" :: Text) handleOnboarding diff --git a/test/integration/Pages/BusinessFlowsSpec.hs b/test/integration/Pages/BusinessFlowsSpec.hs index f37e86460..469f3fb29 100644 --- a/test/integration/Pages/BusinessFlowsSpec.hs +++ b/test/integration/Pages/BusinessFlowsSpec.hs @@ -477,6 +477,14 @@ stripeBillingTests = do (reqs, _) <- runAsBaseRecordingHTTP tr $ atAuthToBase tr.trSessAndHeader $ CreateProject.deleteProjectGetH testPid map fst reqs `shouldContain` ["https://api.stripe.com/v1/subscriptions/sub_test123"] + -- Choosing Free cleared sub_id but left the Stripe sub running, still billing the customer. + it "freePlanChoice_cancelsTheRunningStripeSubscription" \TestContext{tcResources = tr, tcProjectId = testPid} -> do + _ <- runQueryEffect tr $ Projects.updateStripeProjectBilling testPid (Projects.PlanName "GraduatedPricing") (Projects.SubId "sub_test123") (Projects.SubItemId "si_test") (Projects.CustomerId "cus_test") + session <- refreshSession tr.trPool tr.trATCtx.hasqlPool tr.trSessAndHeader + (reqs, _) <- runAsBaseRecordingHTTP tr $ atAuthToBase session $ CreateProject.pricingUpdateH testPid def + map fst reqs `shouldContain` ["https://api.stripe.com/v1/subscriptions/sub_test123"] + fmap (.paymentPlan) <$> runQueryEffect tr (Projects.projectById testPid) `shouldReturn` Just "Free" + it "deleteProject cancels the project's LemonSqueezy subscription" \TestContext{tcResources = tr, tcProjectId = testPid} -> do _ <- runQueryEffect tr $ Projects.updateProjectPricing testPid (Projects.PlanName "GraduatedPricing") (Projects.SubId "987654") (Projects.SubItemId "si_test") (Projects.OrderId "ord_test") (reqs, _) <- runAsBaseRecordingHTTP tr $ atAuthToBase tr.trSessAndHeader $ CreateProject.deleteProjectGetH testPid From 65e58494d35b71dc85cba67870da531236b71137 Mon Sep 17 00:00:00 2001 From: Anthony Alaribe Date: Sun, 25 Oct 2026 23:21:37 +0100 Subject: [PATCH 009/201] Stop hourly spike detection loading every pattern's error_data (#719) Since a7ece43bc made the hourly per-project jobs actually run, ErrorSpikeDetection loaded error_data for every open pattern: 4.3 GB of JSON for the self-monitoring project (HasqlException messages embedding whole SQL statements, up to 21 MB a row), overflowing the 14G heap and restarting a replica at ~:01 most hours since 10-22. The query no longer selects it (nothing used it), and stored message/root message/ stack trace are capped so a pattern can't grow that large again. --- src/Models/Apis/ErrorPatterns.hs | 11 ++++++++--- test/integration/Pages/ErrorPatternsSpec.hs | 3 ++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Models/Apis/ErrorPatterns.hs b/src/Models/Apis/ErrorPatterns.hs index 82179ff5a..9b0d19fcb 100644 --- a/src/Models/Apis/ErrorPatterns.hs +++ b/src/Models/Apis/ErrorPatterns.hs @@ -41,9 +41,11 @@ module Models.Apis.ErrorPatterns ( ) where +import Control.Lens ((%~)) import Data.Aeson qualified as AE import Data.Default import Data.Effectful.Hasql qualified as Hasql +import Data.Generics.Product.Fields (field) import Data.GeoIP2 qualified as GeoIP2 import Data.HashMap.Strict qualified as HM import Data.IP (IP) @@ -500,7 +502,6 @@ data ErrorPatternWithCurrentRate = ErrorPatternWithCurrentRate , baselineMean :: Maybe Double , baselineStddev :: Maybe Double , currentHourCount :: Int - , errorData :: ATError , stacktrace :: Text , hash :: Text , parentHash :: Maybe Text @@ -520,7 +521,8 @@ getErrorPatternsWithCurrentRates pid now = e.id, e.project_id, e.error_type, LEFT(e.message, 2000), e.service, e.state, e.baseline_state, e.baseline_error_rate_mean, e.baseline_error_rate_stddev, COALESCE(counts.event_count, 0)::BIGINT AS current_hour_count, - e.error_data, LEFT(e.stacktrace, 8000), e.hash, e.parent_hash, e.is_framework, e.slack_thread_ts, e.discord_message_id + -- No error_data: one project's was 4.3 GB of JSON, and loading it hourly overflowed the heap. + LEFT(e.stacktrace, 8000), e.hash, e.parent_hash, e.is_framework, e.slack_thread_ts, e.discord_message_id FROM apis.error_patterns e LEFT JOIN apis.error_hourly_stats counts ON counts.error_id = e.id AND counts.project_id = e.project_id @@ -642,7 +644,10 @@ batchUpsertErrorPatterns pid errors now = -- is not time-ordered) + sum count (avoids ON CONFLICT duplicate-row error). -- The bang keeps the running count forced: a hot hash otherwise accumulates one thunk per occurrence. (errs, counts) = - V.unzip $ V.fromList $ HM.elems $ HM.fromListWith (\(a, n) (b, !k) -> (bool b a (a.when >= b.when), n + k)) [(e.hash, (e, 1 :: Int)) | e <- V.toList errors] + V.unzip $ V.fromList $ HM.elems $ HM.fromListWith (\(a, n) (b, !k) -> (bool b a (a.when >= b.when), n + k)) [(e.hash, (bounded e, 1 :: Int)) | e <- V.toList errors] + -- error_data keeps one occurrence for display: a message embedding a whole SQL statement ran to + -- 21 MB a row. The hash is already taken, so trimming changes no grouping. + bounded e = e & field @"message" %~ T.take 4000 & field @"rootErrorMessage" %~ T.take 4000 & field @"stackTrace" %~ T.take 16000 -- '' would persist and pass every Maybe check downstream, sending the issue -- page off to fetch "trace ''" — every trace-less row in the window. traceIds = V.map (mfilter (not . T.null) . (.traceId)) errs diff --git a/test/integration/Pages/ErrorPatternsSpec.hs b/test/integration/Pages/ErrorPatternsSpec.hs index 4180b5bc5..8c11face5 100644 --- a/test/integration/Pages/ErrorPatternsSpec.hs +++ b/test/integration/Pages/ErrorPatternsSpec.hs @@ -530,7 +530,8 @@ spec = sequential $ aroundAll withTestResources do void $ runTestBg regressionTime tr $ ErrorPatterns.updateErrorPatternState errRate.errorId ErrorPatterns.ESResolved regressionTime runTestBg regressionTime tr $ BackgroundJobs.runHourlyJob regressionTime 0 -- Replay the selected error itself; a newly ingested event may have a different fingerprint. - runTestBg regressionTime tr $ BackgroundJobs.processProjectErrors pid (V.singleton errRate.errorData{ErrorPatterns.when = regressionTime}) regressionTime + pat <- maybe (fail "pattern vanished") pure =<< runTestBg regressionTime tr (ErrorPatterns.getErrorPatternById errRate.errorId) + runTestBg regressionTime tr $ BackgroundJobs.processProjectErrors pid (V.singleton pat.errorData{ErrorPatterns.when = regressionTime}) regressionTime regressedPat <- runTestBg regressionTime tr $ ErrorPatterns.getErrorPatternById errRate.errorId fmap (.state) regressedPat `shouldBe` Just ESRegressed From 0688d815d659b7b52c5b07ff401dbc46e5552193 Mon Sep 17 00:00:00 2001 From: Anthony Alaribe Date: Mon, 26 Oct 2026 11:47:24 +0100 Subject: [PATCH 010/201] Run tmux watchers and dependencies in one shared services window (#729) Panes are tracked per worktree+job in session options, so any window reuses them instead of opening a new window. Adds tmux-minio-local. Co-authored-by: Claude Opus 5.5 (1M context) --- AGENTS.md | 1 + Makefile | 80 ++++++++++++++++++++++++++----------------------------- 2 files changed, 39 insertions(+), 42 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 25c3bcbd2..29442a0db 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -89,6 +89,7 @@ A `make live-reload` process is always running in a tmux pane, logging to `build **Iterate against long-lived ghcid watchers in tmux panes: `make tmux-live-reload` (server, `build.log`) and `make tmux-live-test-dev` (tests, `build-test-dev.log`).** Start each once and leave it running. After the first load, a save recompiles only the changed modules and reruns in seconds; every kill-and-restart reloads all ~220 modules and costs 5–12 minutes. On 2026-10-19 a single session lost hours to restarting `live-test-dev` once per test. - **Change which tests run by editing `.test-args`, not by restarting.** `echo '--match "LiveTail"' > .test-args` reruns the live watcher on that focus (measured: 9 s, against ~10 min for a restart). `TEST_MATCH=…` only seeds the file at startup. +- **Never `tmux new-window`/`new-session` for a watcher or dependency.** Use the `make tmux-*` targets (`tmux-live-reload`, `tmux-live-test-dev`, `tmux-web-components-watch`, `tmux-minio-local`): one pane per worktree+job in the shared `services` window, reused from any window. - Restart a watcher only when it has crashed or wedged (see below), not to change focus. - `monoscope-shared` (`shared/`) is a separate package the test watcher loads prebuilt. Edits there are invisible to a running watcher, so that is the one case that needs a restart. diff --git a/Makefile b/Makefile index 5ebdb3fd0..9d9534aa4 100644 --- a/Makefile +++ b/Makefile @@ -329,65 +329,61 @@ build-chart-cli: build-chart-cli-linux: cd web-components && bun build --compile --target=bun-linux-x64 src/chart-cli.ts --outfile ../chart-cli -# Pin a build pane once (`make tmux-pin-here` from the pane you want), then -# every tmux-live-reload* reuses it. Pin survives ghcid restarts because we -# track the pane id in a tmux user option instead of grepping for the command. -define tmux_run - @PANE=$$(tmux show-option -wv -q @build-pane 2>/dev/null); \ - if [ -n "$$PANE" ] && tmux list-panes -a -F '#{pane_id}' | grep -qx "$$PANE"; then \ - echo "Reusing pinned pane $$PANE"; \ - tmux send-keys -t "$$PANE" C-c; sleep 0.5; \ - tmux send-keys -t "$$PANE" '$(1)' Enter; \ +# Every watcher and dependency runs in one `services` window, one pane per +# worktree+job, tracked by a session option so an agent in any window reuses +# the pane instead of opening another. Panes run a shell and the job is typed +# in, so the C-c on reuse stops the job without closing the pane. +TMUX_WT := $(notdir $(CURDIR)) +define tmux_pane + @KEY=@$(1)-$(TMUX_WT); PANE=$$(tmux show-option -qv $$KEY 2>/dev/null); \ + alive() { [ -n "$$PANE" ] && tmux list-panes -a -F '#{pane_id}' | grep -qx "$$PANE"; }; \ + if alive; then tmux send-keys -t "$$PANE" C-c; sleep 0.5; fi; \ + if alive; then \ + echo "Reusing pane $$PANE for $(TMUX_WT):$(1)"; \ elif [ -n "$$TMUX" ]; then \ - PANE=$$(tmux split-window -d -h -P -F '#{pane_id}' '$(1)'); \ - tmux set-option -w @build-pane "$$PANE"; \ - echo "Pinned new pane $$PANE (use 'make tmux-unpin' to clear)"; \ + if tmux list-windows -F '#{window_name}' | grep -qx services; then \ + PANE=$$(tmux split-window -d -t :services -c "$(CURDIR)" -P -F '#{pane_id}'); \ + else \ + PANE=$$(tmux new-window -d -n services -c "$(CURDIR)" -P -F '#{pane_id}'); \ + tmux set-option -w -t :services pane-border-status top; \ + tmux set-option -w -t :services pane-border-format ' #{@job} '; \ + fi; \ + tmux set-option -p -t "$$PANE" @job "$(TMUX_WT):$(1)"; tmux select-layout -t :services tiled; \ + tmux set-option $$KEY "$$PANE"; \ + echo "Started $(TMUX_WT):$(1) in pane $$PANE (window services)"; \ else \ - echo "Not in tmux — running in foreground"; \ - $(1); \ - fi + echo "Not in tmux — running in foreground"; $(2); exit; \ + fi; \ + tmux send-keys -t "$$PANE" '$(2)' Enter endef +# Pin the build pane to the current one instead (`make tmux-unpin` to clear). tmux-pin-here: - @tmux set-option -w @build-pane "$$TMUX_PANE" && echo "Pinned build pane to $$TMUX_PANE" + @tmux set-option @build-$(TMUX_WT) "$$TMUX_PANE" && echo "Pinned build pane to $$TMUX_PANE" tmux-unpin: - @tmux set-option -wu @build-pane && echo "Unpinned build pane" + @tmux set-option -u @build-$(TMUX_WT) && echo "Unpinned build pane" tmux-live-reload: - $(call tmux_run,make live-reload 2>&1 | tee build.log) + $(call tmux_pane,build,make live-reload 2>&1 | tee build.log) tmux-live-reload-cli: - $(call tmux_run,make live-reload-cli 2>&1 | tee build-cli.log) - -# The Vite watcher gets its own pane rather than the pinned build pane, which -# tmux_run C-c's on reuse — sharing it would kill live-reload. Worth supervising: -# when this dies the server keeps serving the last-built bundle, so server-side -# changes appear and client-side ones silently do not. -# A watcher in its own long-lived pane, tracked by the tmux option $(1): `make $(2)`. -define tmux_own_pane - @PANE=$$(tmux show-option -wv -q $(1) 2>/dev/null); \ - if [ -n "$$PANE" ] && tmux list-panes -a -F '#{pane_id}' | grep -qx "$$PANE"; then \ - tmux send-keys -t "$$PANE" C-c; sleep 0.5; \ - tmux send-keys -t "$$PANE" 'make $(2)' Enter; \ - echo "Reusing pane $$PANE for $(2)"; \ - elif [ -n "$$TMUX" ]; then \ - PANE=$$(tmux split-window -d -v -P -F '#{pane_id}' 'make $(2)'); \ - tmux set-option -w $(1) "$$PANE"; \ - echo "Started $(2) in pane $$PANE"; \ - else \ - echo "Not in tmux — run 'make $(2)' in its own terminal"; \ - fi -endef + $(call tmux_pane,build,make live-reload-cli 2>&1 | tee build-cli.log) +# The Vite watcher gets its own pane, not the build pane, whose reuse C-c's +# live-reload. Worth supervising: when this dies the server keeps serving the +# last-built bundle, so server-side changes appear and client-side ones silently do not. tmux-web-components-watch: - $(call tmux_own_pane,@wc-pane,web-components-watch) + $(call tmux_pane,wc,make web-components-watch) # Start once and leave running: every reload after the first recompiles only what changed. # Refocus it by editing .test-args (see live-test-dev) — never by restarting, which reloads # all ~220 modules. tmux-live-test-dev: - $(call tmux_own_pane,@test-pane,live-test-dev) + $(call tmux_pane,test,make live-test-dev) + +tmux-minio-local: + $(call tmux_pane,minio,make minio-local) e2e-install: @test -x e2e/node_modules/.bin/playwright || (cd e2e && npm install && npx playwright install chromium) @@ -556,4 +552,4 @@ builder-rm: .PHONY: ci ci-signoff ci-status ci-shell ci-down ci-clean ci-selftest deploy-image ship kafka-topics deploy-app rollback-app deploy-status builder-setup builder-status builder-rm tf-image -.PHONY: all test fmt fmt-check lint fix-lint live-reload kill-live-reload live-reload-cli live-reload-doctests live-test-dev tmux-live-test-dev build-chart-cli build-chart-cli-linux tmux-live-reload tmux-live-reload-cli tmux-pin-here tmux-unpin kill-web-components-watch web-components-watch e2e-install test-e2e test-e2e-real test-e2e-ui gen-proto sync-otel-proto update-otel-proto minio-local timefusion-start timefusion-stop test-integration-tf +.PHONY: all test fmt fmt-check lint fix-lint live-reload kill-live-reload live-reload-cli live-reload-doctests live-test-dev tmux-live-test-dev build-chart-cli build-chart-cli-linux tmux-live-reload tmux-live-reload-cli tmux-pin-here tmux-unpin tmux-web-components-watch tmux-minio-local kill-web-components-watch web-components-watch e2e-install test-e2e test-e2e-real test-e2e-ui gen-proto sync-otel-proto update-otel-proto minio-local timefusion-start timefusion-stop test-integration-tf From 8689e1de1f0340edcf9064ee674c66bd358957be Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Oct 2026 11:52:58 +0100 Subject: [PATCH 011/201] chore(ci): bump the github-actions group across 1 directory with 5 updates (#728) Bumps the github-actions group with 5 updates in the / directory: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `6` | `7` | | [actions/cache](https://github.com/actions/cache) | `5` | `6` | | [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3` | `4` | | [docker/build-push-action](https://github.com/docker/build-push-action) | `6` | `7` | | [actions/setup-node](https://github.com/actions/setup-node) | `6` | `7` | Updates `actions/checkout` from 6 to 7 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v6...v7) Updates `actions/cache` from 5 to 6 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v5...v6) Updates `docker/setup-buildx-action` from 3 to 4 - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v3...v4) Updates `docker/build-push-action` from 6 to 7 - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v6...v7) Updates `actions/setup-node` from 6 to 7 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: actions/cache dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: docker/setup-buildx-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: docker/build-push-action dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: actions/setup-node dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci-attest-gc.yml | 2 +- .github/workflows/claude-code-review.yml | 2 +- .github/workflows/claude.yml | 2 +- .github/workflows/cli-release.yml | 12 ++++++------ .github/workflows/deps-image.yml | 6 +++--- .github/workflows/fourmolu.yml | 4 ++-- .github/workflows/haskell.yml | 18 +++++++++--------- .github/workflows/production-image.yml | 10 +++++----- .github/workflows/pullrequest.yml | 20 ++++++++++---------- 9 files changed, 38 insertions(+), 38 deletions(-) diff --git a/.github/workflows/ci-attest-gc.yml b/.github/workflows/ci-attest-gc.yml index 9704b57dd..5e14ae330 100644 --- a/.github/workflows/ci-attest-gc.yml +++ b/.github/workflows/ci-attest-gc.yml @@ -20,5 +20,5 @@ jobs: name: Prune runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - run: scripts/ci/ci.sh gc "${{ github.event.inputs.days || 30 }}" diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index 862118bc9..d46f9b1d5 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -25,7 +25,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: fetch-depth: 1 diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index 5e5d1312c..4f4826a3a 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -26,7 +26,7 @@ jobs: actions: read # Required for Claude to read CI results on PRs steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: fetch-depth: 1 diff --git a/.github/workflows/cli-release.yml b/.github/workflows/cli-release.yml index 750044db6..1d8b24faf 100644 --- a/.github/workflows/cli-release.yml +++ b/.github/workflows/cli-release.yml @@ -43,10 +43,10 @@ jobs: env: CABAL_DIR: /root/.cabal steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Cache dist-newstyle - uses: actions/cache@v5 + uses: actions/cache@v6 with: path: dist-newstyle key: cli-linux-${{ matrix.arch }}-${{ hashFiles('cli/*.cabal', 'shared/*.cabal', 'cabal.project*') }}-${{ github.sha }} @@ -89,7 +89,7 @@ jobs: - arch: x86_64 runner: macos-15-intel steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Read GHC version from cabal.project id: ghc @@ -102,14 +102,14 @@ jobs: cabal-version: '3.14' - name: Cache Cabal - uses: actions/cache@v5 + uses: actions/cache@v6 with: path: ~/.cabal key: cli-macos-${{ matrix.arch }}-cabal-${{ hashFiles('cli/*.cabal', 'shared/*.cabal', 'cabal.project*') }} restore-keys: cli-macos-${{ matrix.arch }}-cabal- - name: Cache dist-newstyle - uses: actions/cache@v5 + uses: actions/cache@v6 with: path: dist-newstyle key: cli-macos-${{ matrix.arch }}-dist-${{ hashFiles('cli/*.cabal', 'shared/*.cabal', 'cabal.project*') }} @@ -156,7 +156,7 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Download all artifacts uses: actions/download-artifact@v8 diff --git a/.github/workflows/deps-image.yml b/.github/workflows/deps-image.yml index 7149af548..7b0352794 100644 --- a/.github/workflows/deps-image.yml +++ b/.github/workflows/deps-image.yml @@ -29,7 +29,7 @@ jobs: - platform: linux/arm64 runner: ubuntu-24.04-arm steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Free Disk Space run: | @@ -40,7 +40,7 @@ jobs: sudo docker image prune --all --force - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 - name: Login to Container Registry uses: docker/login-action@v4 @@ -50,7 +50,7 @@ jobs: password: ${{ secrets.GH_TOKEN }} - name: Build and push platform image - uses: docker/build-push-action@v6 + uses: docker/build-push-action@v7 with: context: . file: ./Dockerfile.deps diff --git a/.github/workflows/fourmolu.yml b/.github/workflows/fourmolu.yml index d16db65c7..422b84603 100644 --- a/.github/workflows/fourmolu.yml +++ b/.github/workflows/fourmolu.yml @@ -14,13 +14,13 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: token: ${{ secrets.GITHUB_TOKEN }} # `make fmt` downloads the version the Makefile pins, so laptops and this bot agree. - name: Cache fourmolu - uses: actions/cache@v5 + uses: actions/cache@v6 with: path: .ci/fourmolu-* key: fourmolu-${{ hashFiles('Makefile') }} diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 45ff07dcf..98b445b89 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -34,7 +34,7 @@ jobs: skip_e2e: ${{ steps.checks.outputs.skip_e2e }} skip_haskell: ${{ steps.haskell.outputs.skip_all }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - id: checks run: scripts/ci/ci.sh gate # Whether the whole container job (image pull + service containers + cabal @@ -49,10 +49,10 @@ jobs: if: needs.gate.outputs.skip_haskell != 'true' runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Setup Node.js - uses: actions/setup-node@v6 + uses: actions/setup-node@v7 with: node-version: '22' cache: 'npm' @@ -179,10 +179,10 @@ jobs: CI_SHARDS: '4' CI_FINGERPRINTS: .ci/fingerprints.tsv steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Cache dist-newstyle - uses: actions/cache@v5 + uses: actions/cache@v6 with: path: dist-newstyle key: ${{ runner.os }}-container-cabal-${{ hashFiles('**/*.cabal', '**/cabal.project*') }}-${{ github.sha }} @@ -302,8 +302,8 @@ jobs: env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true steps: - - uses: actions/checkout@v6 - - uses: docker/setup-buildx-action@v3 + - uses: actions/checkout@v7 + - uses: docker/setup-buildx-action@v4 - uses: docker/login-action@v4 with: registry: ghcr.io @@ -372,8 +372,8 @@ jobs: name: Release regression tests runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6 - - uses: actions/setup-node@v6 + - uses: actions/checkout@v7 + - uses: actions/setup-node@v7 with: node-version: '22' - run: scripts/ci/ci.sh run release-tests diff --git a/.github/workflows/production-image.yml b/.github/workflows/production-image.yml index d9ea91202..e40023dfd 100644 --- a/.github/workflows/production-image.yml +++ b/.github/workflows/production-image.yml @@ -24,25 +24,25 @@ jobs: outputs: digest: ${{ steps.image.outputs.digest }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: ref: ${{ inputs.revision }} - - uses: actions/setup-node@v6 + - uses: actions/setup-node@v7 with: node-version: '22' - - uses: docker/setup-buildx-action@v3 + - uses: docker/setup-buildx-action@v4 # The Dockerfile's dist-newstyle cache mount dies with each fresh runner, so every # build recompiled all of monoscope (~57 min). Carry it in the Actions cache: master # saves, PRs restore master's and stay read-only so they can't evict it. Paths sit # outside the checkout because release.sh refuses a dirty tree. - if: github.ref == 'refs/heads/master' - uses: actions/cache@v5 + uses: actions/cache@v6 with: path: ${{ runner.temp }}/dist-newstyle key: prod-dist-${{ inputs.revision }} restore-keys: prod-dist- - if: github.ref != 'refs/heads/master' - uses: actions/cache/restore@v5 + uses: actions/cache/restore@v6 with: path: ${{ runner.temp }}/dist-newstyle key: prod-dist-${{ inputs.revision }} diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index a03610dc9..9f97d528e 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -36,7 +36,7 @@ jobs: skip_e2e: ${{ steps.checks.outputs.skip_e2e }} skip_haskell: ${{ steps.haskell.outputs.skip_all }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: ref: ${{ github.event.pull_request.head.sha }} - id: checks @@ -53,12 +53,12 @@ jobs: if: needs.gate.outputs.skip_haskell != 'true' runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: ref: ${{ github.event.pull_request.head.sha }} - name: Setup Node.js - uses: actions/setup-node@v6 + uses: actions/setup-node@v7 with: node-version: '22' cache: 'npm' @@ -189,12 +189,12 @@ jobs: CI_SHARDS: '4' CI_FINGERPRINTS: .ci/fingerprints.tsv steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: ref: ${{ github.event.pull_request.head.sha }} - name: Cache dist-newstyle - uses: actions/cache@v5 + uses: actions/cache@v6 with: path: dist-newstyle key: ${{ runner.os }}-container-cabal-${{ hashFiles('**/*.cabal', '**/cabal.project*') }}-${{ github.sha }} @@ -282,7 +282,7 @@ jobs: # Pin to the PR head SHA instead of head_ref: head_ref is the branch name, # which checkout fetches with a glob refspec that 404s on deleted or fork # branches (see i18n-yaml PR fetch failure). - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: ref: ${{ github.event.pull_request.head.sha }} token: ${{ secrets.GITHUB_TOKEN }} @@ -329,11 +329,11 @@ jobs: if: needs.gate.outputs.skip_ui_tests != 'true' runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: ref: ${{ github.event.pull_request.head.sha }} - name: Setup Node.js - uses: actions/setup-node@v6 + uses: actions/setup-node@v7 with: node-version: '22' cache: 'npm' @@ -362,10 +362,10 @@ jobs: name: Release regression tests runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: ref: ${{ github.event.pull_request.head.sha }} - - uses: actions/setup-node@v6 + - uses: actions/setup-node@v7 with: node-version: '22' - run: scripts/ci/ci.sh run release-tests From dd4d5c1fa105d7687d4a3c126566aafeccfec70e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Oct 2026 11:56:43 +0100 Subject: [PATCH 012/201] chore(deps): bump golang.org/x/crypto in /scripts/local/dlq-redrive (#459) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.28.0 to 0.52.0. - [Commits](https://github.com/golang/crypto/compare/v0.28.0...v0.52.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-version: 0.52.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- scripts/local/dlq-redrive/go.mod | 4 ++-- scripts/local/dlq-redrive/go.sum | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/local/dlq-redrive/go.mod b/scripts/local/dlq-redrive/go.mod index b25374a0c..fa1320efd 100644 --- a/scripts/local/dlq-redrive/go.mod +++ b/scripts/local/dlq-redrive/go.mod @@ -1,6 +1,6 @@ module dlq-redrive -go 1.22 +go 1.25.0 require ( github.com/twmb/franz-go v1.18.0 @@ -11,5 +11,5 @@ require ( github.com/klauspost/compress v1.17.11 // indirect github.com/pierrec/lz4/v4 v4.1.21 // indirect github.com/twmb/franz-go/pkg/kmsg v1.9.0 // indirect - golang.org/x/crypto v0.28.0 // indirect + golang.org/x/crypto v0.52.0 // indirect ) diff --git a/scripts/local/dlq-redrive/go.sum b/scripts/local/dlq-redrive/go.sum index afb62cce4..3643ee32f 100644 --- a/scripts/local/dlq-redrive/go.sum +++ b/scripts/local/dlq-redrive/go.sum @@ -8,5 +8,5 @@ github.com/twmb/franz-go/pkg/kadm v1.14.0 h1:nAn1co1lXzJQocpzyIyOFOjUBf4WHWs5/fT github.com/twmb/franz-go/pkg/kadm v1.14.0/go.mod h1:XjOPz6ZaXXjrW2jVCfLuucP8H1w2TvD6y3PT2M+aAM4= github.com/twmb/franz-go/pkg/kmsg v1.9.0 h1:JojYUph2TKAau6SBtErXpXGC7E3gg4vGZMv9xFU/B6M= github.com/twmb/franz-go/pkg/kmsg v1.9.0/go.mod h1:CMbfazviCyY6HM0SXuG5t9vOwYDHRCSrJJyBAe5paqg= -golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= -golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= +golang.org/x/crypto v0.52.0 h1:RMs7fP2rXdep0CftQlK8Uf+kibLm7qkCcradZWYz988= +golang.org/x/crypto v0.52.0/go.mod h1:1QgfPxDqh0T2M/elOJtp9RvuR95kVjir0e6/BvEmGbc= From 4d4d00d8691269c5d478844ca8de1480c99524c3 Mon Sep 17 00:00:00 2001 From: Anthony Alaribe Date: Mon, 26 Oct 2026 12:48:15 +0100 Subject: [PATCH 013/201] Bump npm dependencies and move monaco imports to 0.57 export paths (#734) Consolidates dependabot #721 #727 #726 #725 #724 #723 #722 #558 #529 #505 #504 #499 #488 #480 #478 #477 #476 #464. Monaco 0.57 added an exports map and moved YAML to languages/definitions, so the deep esm imports and their vite aliases no longer resolve. --- package-lock.json | 3284 +++++++++++++++------------ package.json | 12 +- web-components/package-lock.json | 1376 ++++++----- web-components/package.json | 36 +- web-components/src/monaco-yaml.d.ts | 2 +- web-components/src/types/types.ts | 2 +- web-components/src/yaml-editor.ts | 6 +- web-components/vite.config.mjs | 13 +- 8 files changed, 2687 insertions(+), 2044 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2c2f54945..348b62045 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,22 +1,22 @@ { - "name": "monoscope-2", + "name": "m3-deps", "lockfileVersion": 3, "requires": true, "packages": { "": { "dependencies": { - "@opentelemetry/auto-instrumentations-node": "^0.77.0", + "@opentelemetry/auto-instrumentations-node": "^0.82.0", "@tailwindcss/cli": "^4.3.3", "ansi-up": "^1.0.0", "html2canvas": "^1.4.1" }, "devDependencies": { - "@playwright/test": "^1.62.1", + "@playwright/test": "^1.64.1", "@tailwindcss/typography": "^0.5.20", - "autoprefixer": "^10.5.0", - "daisyui": "^5.7.16", - "jest": "^30.4.2", - "postcss": "^8.5.15", + "autoprefixer": "^10.6.1", + "daisyui": "^5.7.50", + "jest": "^30.5.2", + "postcss": "^8.5.31", "tailwindcss": "^4.3.3", "workbox-cli": "^7.4.1" } @@ -69,7 +69,6 @@ "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/code-frame": "^7.29.0", "@babel/generator": "^7.29.0", @@ -268,9 +267,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz", - "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz", + "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==", "dev": true, "license": "MIT", "engines": { @@ -629,13 +628,13 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.28.6.tgz", - "integrity": "sha512-wgEmr06G6sIpqr8YDwA2dSRTE3bJ+V0IfpzfSY3Lfgd7YWOaAdlykvJi13ZKBt8cZHfgH1IXN+CL656W3uUa4w==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.29.7.tgz", + "integrity": "sha512-TSu8+mHCoEaaCDEZ0I3+6mvTBYR4PCxQwf2z9/r5Tbztv6NaLR3B9thGTTxX2WGuGHJqRiAbKPeGTJ5XWXVg6A==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.28.6" + "@babel/helper-plugin-utils": "^7.29.7" }, "engines": { "node": ">=6.9.0" @@ -755,13 +754,13 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.28.6.tgz", - "integrity": "sha512-+nDNmQye7nlnuuHDboPbGm00Vqg3oO8niRRL27/4LYHUsHYh0zJ1xWOz0uRwNFmM1Avzk8wZbc6rdiYhomzv/A==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.29.7.tgz", + "integrity": "sha512-ngr+82Sh0xMz25TPCZi+nC2iTzjfCdWS2ONXTp/PtSCHCgaCNBpdMqgvJ2ccdLlClVZ7sisIgB914j/JFe+RZA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.28.6" + "@babel/helper-plugin-utils": "^7.29.7" }, "engines": { "node": ">=6.9.0" @@ -1810,13 +1809,14 @@ "license": "MIT" }, "node_modules/@emnapi/core": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.0.tgz", - "integrity": "sha512-l9Oo58x0HOP5znGzVhYW9U3e5wVuA4LAZU2AGezTmkhO1CgQRFDhDg4nneHsu/t3WniXg9QrG2nIXL/ZS8ln8Q==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", + "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", + "dev": true, "license": "MIT", "optional": true, "dependencies": { - "@emnapi/wasi-threads": "1.2.2", + "@emnapi/wasi-threads": "1.2.1", "tslib": "^2.4.0" } }, @@ -1824,13 +1824,15 @@ "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, "license": "0BSD", "optional": true }, "node_modules/@emnapi/runtime": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.0.tgz", - "integrity": "sha512-55coeOFKHv1ywEcUXJtWU5f+Jr/W5tZDvZig8DLKSwUN1JpROQ4rk/SNOQiFWmaR/VKF4zuFyW1B8JduOSv6Pg==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz", + "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==", + "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -1841,13 +1843,15 @@ "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, "license": "0BSD", "optional": true }, "node_modules/@emnapi/wasi-threads": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz", - "integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", + "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", + "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -1858,13 +1862,14 @@ "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, "license": "0BSD", "optional": true }, "node_modules/@grpc/grpc-js": { - "version": "1.14.4", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.14.4.tgz", - "integrity": "sha512-k9Dj3DV/itK9D06Y8f190Qgop7/Ui+D0njFV3LHMPwPT75DpXLQohE9Wmz0QElrJnzsjB7KPWiKJbOl7IPDArQ==", + "version": "1.14.6", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.14.6.tgz", + "integrity": "sha512-SgC/B3/VZ8lTyOZ4Cwk6f1skWhmkNAaVfiX90qd5u1rRXGKk1//8FTUEN9GvOUq7rfWIqAYkA3CoyumYVpOS6g==", "license": "Apache-2.0", "dependencies": { "@grpc/proto-loader": "^0.8.0", @@ -1930,17 +1935,17 @@ } }, "node_modules/@jest/console": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-30.4.1.tgz", - "integrity": "sha512-v3bhyxUh9Hgmo5p6hAOXe14/R3ZxZDOsvHleh4B07z3m/x4/ngPUXEm9XwK4sF4u+f+P2ORb0Ge+MgpaqRMVDA==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-30.5.2.tgz", + "integrity": "sha512-e8sQC4pCMHPBrPX7Hk8TJr+DM5dkUnImSTNag8SEWFAFAF6xIz4AJvCKapnrdHnZxep4bxw4PhG+ZbimYBMyKw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "30.4.1", + "@jest/types": "30.5.1", "@types/node": "*", "chalk": "^4.1.2", - "jest-message-util": "30.4.1", - "jest-util": "30.4.1", + "jest-message-util": "30.5.1", + "jest-util": "30.5.1", "slash": "^3.0.0" }, "engines": { @@ -1948,18 +1953,18 @@ } }, "node_modules/@jest/core": { - "version": "30.4.2", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-30.4.2.tgz", - "integrity": "sha512-TZJA6cPJUFxoWhxaLo8t0VX/MZX2wPWr0uIDvLSHIvN4gu9h02vSzqI2kBADG1ExqQlC+cY09xKMSreivvrChQ==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-30.5.2.tgz", + "integrity": "sha512-/jqvFWoJF7LV1a6AUpYMbMm+2yIYsHJfR474H0SCzr9k8tnO/jl9wRg6zSG6lxgf6EozNlCG4amFzWsbZSvvZA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/console": "30.4.1", - "@jest/pattern": "30.4.0", - "@jest/reporters": "30.4.1", - "@jest/test-result": "30.4.1", - "@jest/transform": "30.4.1", - "@jest/types": "30.4.1", + "@jest/console": "30.5.2", + "@jest/pattern": "30.5.0", + "@jest/reporters": "30.5.2", + "@jest/test-result": "30.5.2", + "@jest/transform": "30.5.2", + "@jest/types": "30.5.1", "@types/node": "*", "ansi-escapes": "^4.3.2", "chalk": "^4.1.2", @@ -1967,20 +1972,20 @@ "exit-x": "^0.2.2", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.11", - "jest-changed-files": "30.4.1", - "jest-config": "30.4.2", - "jest-haste-map": "30.4.1", - "jest-message-util": "30.4.1", - "jest-regex-util": "30.4.0", - "jest-resolve": "30.4.1", - "jest-resolve-dependencies": "30.4.2", - "jest-runner": "30.4.2", - "jest-runtime": "30.4.2", - "jest-snapshot": "30.4.1", - "jest-util": "30.4.1", - "jest-validate": "30.4.1", - "jest-watcher": "30.4.1", - "pretty-format": "30.4.1", + "jest-changed-files": "30.5.1", + "jest-config": "30.5.2", + "jest-haste-map": "30.5.1", + "jest-message-util": "30.5.1", + "jest-regex-util": "30.5.0", + "jest-resolve": "30.5.1", + "jest-resolve-dependencies": "30.5.2", + "jest-runner": "30.5.2", + "jest-runtime": "30.5.2", + "jest-snapshot": "30.5.2", + "jest-util": "30.5.1", + "jest-validate": "30.5.1", + "jest-watcher": "30.5.2", + "pretty-format": "30.5.1", "slash": "^3.0.0" }, "engines": { @@ -1996,9 +2001,9 @@ } }, "node_modules/@jest/diff-sequences": { - "version": "30.4.0", - "resolved": "https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.4.0.tgz", - "integrity": "sha512-zOpzlfUs45l6u7jm39qr87JCHUDsaeCtvL+kQe/Vn9jSnRB4/5IPXISm0h9I1vZW/o00Kn4UTJ2MOlhnUGwv3g==", + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.5.0.tgz", + "integrity": "sha512-OsqBjHXCn8cadasoAZBP6nWYvMsRhpMzGXTpxJ5aO04NlbdhIz+FVe3q49l0AwVhsz/cEmIpBes6gAFl1/dWQg==", "dev": true, "license": "MIT", "engines": { @@ -2006,70 +2011,70 @@ } }, "node_modules/@jest/environment": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-30.4.1.tgz", - "integrity": "sha512-AK9yNRqgKxiabqMoe4oW+3/TSSeV8vkdC7BGaxZdU0AFXfOpofTLqdru2GXKZghP3sdgwE9XXpnVwfZ8JnFV4w==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-30.5.2.tgz", + "integrity": "sha512-nwFPOUMbmsjNNRCpnJpB9HbSZu4C07wDDds++5j+j1MezzPLxMPDdbdUVjr2o4RULDOValnDd70taPFI1EtxAg==", "dev": true, "license": "MIT", "dependencies": { - "@jest/fake-timers": "30.4.1", - "@jest/types": "30.4.1", + "@jest/fake-timers": "30.5.2", + "@jest/types": "30.5.1", "@types/node": "*", - "jest-mock": "30.4.1" + "jest-mock": "30.5.2" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/expect": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-30.4.1.tgz", - "integrity": "sha512-ginrj6TMgh2GshLUGCjO94Ptx9HhdZA/I6A9iUfyeLKFtdAjnKzHDgzgP9HYQgbxM1lbXScQ2eUBz2lGeVDPWA==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-30.5.2.tgz", + "integrity": "sha512-2E+1Pg6jJxbRjLNLpciC71iri/3qsKJL222/aXJEFwC0VdUSvfS+JZQQLEVjUYYc8t8pQu2MGE3cF2+bNTYRsg==", "dev": true, "license": "MIT", "dependencies": { - "expect": "30.4.1", - "jest-snapshot": "30.4.1" + "expect": "30.5.2", + "jest-snapshot": "30.5.2" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/expect-utils": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.4.1.tgz", - "integrity": "sha512-ZBn5CglH8fBsQsvs4VWNzD4aWfUYks+IdOOQU3MEK71ol/BcVm+P+rtb1KpiFBpSWSCE27uOahyyf1vfqOVbcQ==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.5.2.tgz", + "integrity": "sha512-d/HOLSrJUlBIl6n3LzOa7cjW3xdePm5H5gQw2lixZ/0h157l9sw3mLblzFqnPcTbhDzhRQdBOX3A3KcG73nm5Q==", "dev": true, "license": "MIT", "dependencies": { - "@jest/get-type": "30.1.0" + "@jest/get-type": "30.5.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/fake-timers": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-30.4.1.tgz", - "integrity": "sha512-iW5umdmfPeWzehrVhugFQZqCchSCud5S1l2YT0O9ZhjRR0ExclANDZkiSBwzqtnlOn0J1JXvO+HZ6rkuyOVOgQ==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-30.5.2.tgz", + "integrity": "sha512-GKk0h0tKT5SpDPxDhPg3r9mm5s8/YCBzVNMOGdRiQXwUiMsjU10mVPlMaQstH6/cu50vOb8N9oQUMETHuwwxKw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "30.4.1", + "@jest/types": "30.5.1", "@sinonjs/fake-timers": "^15.4.0", "@types/node": "*", - "jest-message-util": "30.4.1", - "jest-mock": "30.4.1", - "jest-util": "30.4.1" + "jest-message-util": "30.5.1", + "jest-mock": "30.5.2", + "jest-util": "30.5.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/get-type": { - "version": "30.1.0", - "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.1.0.tgz", - "integrity": "sha512-eMbZE2hUnx1WV0pmURZY9XoXPkUYjpc55mb0CrhtdWLtzMQPFvu/rZkTLZFTsdaVQa+Tr4eWAteqcUzoawq/uA==", + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.5.0.tgz", + "integrity": "sha512-9/2VUPitAjmBzbvDvqrxmvB7BzWsBW0WmkkojX1ODuxX1NLGxx9gfaZpHB0z8DtJ9uhGNmZG/VXBhf8uO0OV8Q==", "dev": true, "license": "MIT", "engines": { @@ -2077,62 +2082,78 @@ } }, "node_modules/@jest/globals": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-30.4.1.tgz", - "integrity": "sha512-ZbuY4cmXC8DkxYjfvT2DbcHWL2T6vmsMhXCDcmTB2T0y0gaezBI77ufq5ZAIdcRkYZ7NEQEDg1xFeKbxUJ5v5Q==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-30.5.2.tgz", + "integrity": "sha512-62zfS+dL+M5aTNHXCNLyqD+j4oqxTIzDYrZbpqMP8Yn+gvlAGyzC6BSPNb1ZmFOakV1RtFYX/O3FCQXSWmQdgg==", "dev": true, "license": "MIT", "dependencies": { - "@jest/environment": "30.4.1", - "@jest/expect": "30.4.1", - "@jest/types": "30.4.1", - "jest-mock": "30.4.1" + "@jest/environment": "30.5.2", + "@jest/expect": "30.5.2", + "@jest/types": "30.5.1", + "jest-mock": "30.5.2" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/@jest/pattern": { - "version": "30.4.0", - "resolved": "https://registry.npmjs.org/@jest/pattern/-/pattern-30.4.0.tgz", - "integrity": "sha512-RAWn3+f9u8BsHijKJ71uHcFp6vmyEt6VvoWXkl6hKF3qVIuWNmudVjg12DlBPGup/frIl5UcUlH5HfEuvHpEXg==", + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/@jest/pattern/-/pattern-30.5.0.tgz", + "integrity": "sha512-HdNQYSdRTEBNrginaqzQtTjG0HRMfrra/z6Ok7uL3S87vSlarIVohEsJsSj5edu3MiHoHjAkvPROz5ZjoKai+w==", "dev": true, "license": "MIT", "dependencies": { "@types/node": "*", - "jest-regex-util": "30.4.0" + "jest-regex-util": "30.5.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, + "node_modules/@jest/react-is-18": { + "name": "react-is", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jest/react-is-19": { + "name": "react-is", + "version": "19.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.3.1.tgz", + "integrity": "sha512-RRieF6IyxQBkcK6pP8xOHprLTPW6QjRkbGdImtqNme+/hYVwCZkLQLdlZGOhUqXwkS9IEynaGvPJtv6XB/cz0Q==", + "dev": true, + "license": "MIT" + }, "node_modules/@jest/reporters": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-30.4.1.tgz", - "integrity": "sha512-/SnkPCzEQpUaBH81kjdEdDdo2WZl5hxw+BmLDGWjRkm8o7XlhjwsU36cqwe5PGBE5WYpBvDzRSdXx9rbGuJtNA==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-30.5.2.tgz", + "integrity": "sha512-ev6E9iG73twQcfAfoTnviuYkr3yOrYbzAtMFCimv2fxHXPIp9PBt2u1wNMt0aYWgl8FPwIcS8oqRJg6alnht4Q==", "dev": true, "license": "MIT", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "30.4.1", - "@jest/test-result": "30.4.1", - "@jest/transform": "30.4.1", - "@jest/types": "30.4.1", - "@jridgewell/trace-mapping": "^0.3.25", + "@jest/console": "30.5.2", + "@jest/test-result": "30.5.2", + "@jest/transform": "30.5.2", + "@jest/types": "30.5.1", + "@jridgewell/trace-mapping": "^0.3.31", "@types/node": "*", "chalk": "^4.1.2", "collect-v8-coverage": "^1.0.2", "exit-x": "^0.2.2", - "glob": "^10.5.0", + "glob": "^13.0.6", "graceful-fs": "^4.2.11", "istanbul-lib-coverage": "^3.0.0", "istanbul-lib-instrument": "^6.0.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^5.0.0", "istanbul-reports": "^3.1.3", - "jest-message-util": "30.4.1", - "jest-util": "30.4.1", - "jest-worker": "30.4.1", + "jest-message-util": "30.5.1", + "jest-util": "30.5.1", + "jest-worker": "30.5.1", "slash": "^3.0.0", "string-length": "^4.0.2", "v8-to-istanbul": "^9.0.1" @@ -2149,10 +2170,67 @@ } } }, + "node_modules/@jest/reporters/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/@jest/reporters/node_modules/brace-expansion": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", + "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@jest/reporters/node_modules/glob": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", + "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@jest/reporters/node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@jest/schemas": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.4.1.tgz", - "integrity": "sha512-i6b4qw5qnP8c5FEeBJg/uZQ4ddrkN6Ca8qISJh0pr7a5hfn3h3v5x60BEbOC7OYAGZNMs1LfFLwnW2CuK8F57Q==", + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.5.0.tgz", + "integrity": "sha512-/hunigyNpc4RCjC0VaW3f5RCUZVM2+WQ65qP7z083Gmvac7or2LI50XVNOtE4YPgBpV0yxYiAgorAPGniCoJmg==", "dev": true, "license": "MIT", "dependencies": { @@ -2163,13 +2241,13 @@ } }, "node_modules/@jest/snapshot-utils": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/snapshot-utils/-/snapshot-utils-30.4.1.tgz", - "integrity": "sha512-ObY4ljvQ95mt6iwKtVLetR/4yXiAgl3H4nJxhztr0MTjrN97TwDYrnCp/kF60Ec9HdhkWTHSu+Hg05aXfngpOA==", + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/@jest/snapshot-utils/-/snapshot-utils-30.5.1.tgz", + "integrity": "sha512-V3wnxNtiVmw5PPVg433Cn3VdXnsOeu/ofLw3KC04Bn2y1wIlU5kozXQn48rhrgj/02LrCVtntTEF1yBha0XSUw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "30.4.1", + "@jest/types": "30.5.1", "chalk": "^4.1.2", "graceful-fs": "^4.2.11", "natural-compare": "^1.4.0" @@ -2179,14 +2257,15 @@ } }, "node_modules/@jest/source-map": { - "version": "30.0.1", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-30.0.1.tgz", - "integrity": "sha512-MIRWMUUR3sdbP36oyNyhbThLHyJ2eEDClPCiHVbrYAe5g3CHRArIVpBw7cdSB5fr+ofSfIb2Tnsw8iEHL0PYQg==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-30.5.2.tgz", + "integrity": "sha512-c5CehvkbfHX6yyNg7bMn2ylqlp9AHXuZ/3hPH/Lh5bxD/vefd/lV9HBjMqXef9yQNqkdwyZvkLSVSwB38hy8Qw==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.25", + "@jridgewell/trace-mapping": "^0.3.31", "callsites": "^3.1.0", + "convert-source-map": "^2.0.0", "graceful-fs": "^4.2.11" }, "engines": { @@ -2194,14 +2273,14 @@ } }, "node_modules/@jest/test-result": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-30.4.1.tgz", - "integrity": "sha512-/ZG7pgEiOmmWkN9TplKbOu4id2N5lh7FHwRwlkgBVAzGdRH+OkkQ8wX/kIxg4zmd3ZQvAL1RwL2yWsvNYYECTw==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-30.5.2.tgz", + "integrity": "sha512-eO6YU5rsLfs60ne694e0IAmRgeBnoA8mu0nlxXDbl/1j5km0o2vO9/VbbUIKIH+WRKKEI+ELgwraRGn2Lhep8g==", "dev": true, "license": "MIT", "dependencies": { - "@jest/console": "30.4.1", - "@jest/types": "30.4.1", + "@jest/console": "30.5.2", + "@jest/types": "30.5.1", "@types/istanbul-lib-coverage": "^2.0.6", "collect-v8-coverage": "^1.0.2" }, @@ -2210,15 +2289,15 @@ } }, "node_modules/@jest/test-sequencer": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-30.4.1.tgz", - "integrity": "sha512-PeYE+4td5rKjoRPxztObrXU+H8hsjZfxKMXOcmrr34JerSyB/ROOxbbicz8B7A5j9R9VayDnVPvBmedqCsFCdw==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-30.5.2.tgz", + "integrity": "sha512-bmij8jZyYAC47ExT2GeP7PcrlwSNS+Bp3KeRuBH88gpcxqDv6fljN8PemS4J/lLZ79xb6mpaennQTTq0zUAVVg==", "dev": true, "license": "MIT", "dependencies": { - "@jest/test-result": "30.4.1", + "@jest/test-result": "30.5.2", "graceful-fs": "^4.2.11", - "jest-haste-map": "30.4.1", + "jest-haste-map": "30.5.1", "slash": "^3.0.0" }, "engines": { @@ -2226,23 +2305,23 @@ } }, "node_modules/@jest/transform": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-30.4.1.tgz", - "integrity": "sha512-Wz0LyktlTvRefoymh+n64hQ84KNXsRGcwdoZ8CSa0Ea+fgYcHZlnk+hDP7v2MS7il2bQ5uTEIxf4/NNfhMN4KQ==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-30.5.2.tgz", + "integrity": "sha512-LBGwmaE886C41jDZ65eqR1YbXM7642MK3ZhTowZd5+xDlrDLuf4ePuDdDmVSvcr8NTVJ3MqxLkMbUCzuigUaoQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/core": "^7.27.4", - "@jest/types": "30.4.1", - "@jridgewell/trace-mapping": "^0.3.25", - "babel-plugin-istanbul": "^7.0.1", + "@jest/types": "30.5.1", + "@jridgewell/trace-mapping": "^0.3.31", + "babel-plugin-istanbul": "^8.0.0", "chalk": "^4.1.2", "convert-source-map": "^2.0.0", "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.11", - "jest-haste-map": "30.4.1", - "jest-regex-util": "30.4.0", - "jest-util": "30.4.1", + "jest-haste-map": "30.5.1", + "jest-regex-util": "30.5.0", + "jest-util": "30.5.1", "pirates": "^4.0.7", "slash": "^3.0.0", "write-file-atomic": "^5.0.1" @@ -2252,14 +2331,14 @@ } }, "node_modules/@jest/types": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.4.1.tgz", - "integrity": "sha512-f1x/vJXIfjOlEmejYpbkbgw1gOqpPECwMvMEtBqe47j7H2Hg8h8w3o3ikhSXq3MI15kg+oQ0exWO0uCtTNJLoQ==", + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.5.1.tgz", + "integrity": "sha512-LvVYn83nnXPl+Rg98nvcFgjx6nRMTArhSn6RAX/w3ELn54S8A42TYZvsCMdGUqTM8S0wyXbtlQdU6Hi6dykj9g==", "dev": true, "license": "MIT", "dependencies": { - "@jest/pattern": "30.4.0", - "@jest/schemas": "30.4.1", + "@jest/pattern": "30.5.0", + "@jest/schemas": "30.5.0", "@types/istanbul-lib-coverage": "^2.0.6", "@types/istanbul-reports": "^3.0.4", "@types/node": "*", @@ -2333,1390 +2412,1318 @@ } }, "node_modules/@napi-rs/wasm-runtime": { - "version": "0.2.12", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz", - "integrity": "sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.6.tgz", + "integrity": "sha512-mRyDmEw9/fCDXCGfL1sbgIw/GUK0PVxRW4YwgPN61F3LQ+fSyoBFarJVzgGyhF6kRzEQZ0FejDqm4WLXSeqQmw==", + "dev": true, "license": "MIT", "optional": true, "dependencies": { - "@emnapi/core": "^1.4.3", - "@emnapi/runtime": "^1.4.3", - "@tybys/wasm-util": "^0.10.0" + "@tybys/wasm-util": "^0.10.3" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1 || 2.0.0-beta.2", + "@emnapi/runtime": "^1.7.1 || 2.0.0-beta.2" } }, "node_modules/@opentelemetry/api": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.1.tgz", - "integrity": "sha512-gLyJlPHPZYdAk1JENA9LeHejZe1Ti77/pTeFm/nMXmQH/HFZlcS/O2XJB+L8fkbrNSqhdtlvjBVjxwUYanNH5Q==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.10.0.tgz", + "integrity": "sha512-lMkyes8iHrG+mk6WH7X70MdCLI2RS0FwNBY1PyQ8UemaijE2m5mv5A0Niy3HtbYTFrgkUEQjFMXmSAk2hQDuPQ==", "license": "Apache-2.0", "peer": true, "engines": { "node": ">=8.0.0" } }, - "node_modules/@opentelemetry/api-logs": { - "version": "0.219.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.219.0.tgz", - "integrity": "sha512-FFx7YnaYJlIjqWW/AG/yAZ0L/NEY724PipXXXQLdtZPbLwBGbUMTGL1i/esI56TWfTUXxhLfpgrnWJCG8aUJyg==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/api": "^1.3.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/@opentelemetry/auto-instrumentations-node": { - "version": "0.77.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/auto-instrumentations-node/-/auto-instrumentations-node-0.77.0.tgz", - "integrity": "sha512-LkF930Cs+v+ZO/qV6LolbocvFkJJ812BBDyRNjQpwllBA+rFvGtP/voXPuh24QV3JKl5/3c3GulLHvMn8spqkQ==", + "version": "0.82.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/auto-instrumentations-node/-/auto-instrumentations-node-0.82.0.tgz", + "integrity": "sha512-WL4U3IZ9a0lHPj9l+c7IWJN+G2LPlM1/Otk15a5qrIkByEw9XCmZ2SwCf8fNZnCf5MNOP0D8LMaR8kv1MWtaFQ==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0", - "@opentelemetry/instrumentation-amqplib": "^0.66.0", - "@opentelemetry/instrumentation-aws-lambda": "^0.71.0", - "@opentelemetry/instrumentation-aws-sdk": "^0.74.0", - "@opentelemetry/instrumentation-bunyan": "^0.64.0", - "@opentelemetry/instrumentation-cassandra-driver": "^0.64.0", - "@opentelemetry/instrumentation-connect": "^0.62.0", - "@opentelemetry/instrumentation-cucumber": "^0.35.0", - "@opentelemetry/instrumentation-dataloader": "^0.36.0", - "@opentelemetry/instrumentation-dns": "^0.62.0", - "@opentelemetry/instrumentation-express": "^0.67.0", - "@opentelemetry/instrumentation-fs": "^0.38.0", - "@opentelemetry/instrumentation-generic-pool": "^0.62.0", - "@opentelemetry/instrumentation-graphql": "^0.67.0", - "@opentelemetry/instrumentation-grpc": "^0.219.0", - "@opentelemetry/instrumentation-hapi": "^0.65.0", - "@opentelemetry/instrumentation-host-metrics": "^0.2.0", - "@opentelemetry/instrumentation-http": "^0.219.0", - "@opentelemetry/instrumentation-ioredis": "^0.67.0", - "@opentelemetry/instrumentation-kafkajs": "^0.28.0", - "@opentelemetry/instrumentation-knex": "^0.63.0", - "@opentelemetry/instrumentation-koa": "^0.67.0", - "@opentelemetry/instrumentation-lru-memoizer": "^0.63.0", - "@opentelemetry/instrumentation-memcached": "^0.62.0", - "@opentelemetry/instrumentation-mongodb": "^0.72.0", - "@opentelemetry/instrumentation-mongoose": "^0.65.0", - "@opentelemetry/instrumentation-mysql": "^0.65.0", - "@opentelemetry/instrumentation-mysql2": "^0.65.0", - "@opentelemetry/instrumentation-nestjs-core": "^0.65.0", - "@opentelemetry/instrumentation-net": "^0.63.0", - "@opentelemetry/instrumentation-openai": "^0.17.0", - "@opentelemetry/instrumentation-oracledb": "^0.44.0", - "@opentelemetry/instrumentation-pg": "^0.71.0", - "@opentelemetry/instrumentation-pino": "^0.65.0", - "@opentelemetry/instrumentation-redis": "^0.67.0", - "@opentelemetry/instrumentation-restify": "^0.64.0", - "@opentelemetry/instrumentation-router": "^0.63.0", - "@opentelemetry/instrumentation-runtime-node": "^0.32.0", - "@opentelemetry/instrumentation-socket.io": "^0.66.0", - "@opentelemetry/instrumentation-tedious": "^0.38.0", - "@opentelemetry/instrumentation-undici": "^0.29.0", - "@opentelemetry/instrumentation-winston": "^0.63.0", - "@opentelemetry/resource-detector-alibaba-cloud": "^0.34.0", - "@opentelemetry/resource-detector-aws": "^2.19.0", - "@opentelemetry/resource-detector-azure": "^0.27.0", - "@opentelemetry/resource-detector-container": "^0.8.10", - "@opentelemetry/resource-detector-gcp": "^0.54.0", - "@opentelemetry/resources": "^2.0.0", - "@opentelemetry/sdk-node": "^0.219.0" + "@opentelemetry/instrumentation": "^0.300.0", + "@opentelemetry/instrumentation-amqplib": "^0.71.0", + "@opentelemetry/instrumentation-aws-lambda": "^0.76.0", + "@opentelemetry/instrumentation-aws-sdk": "^0.79.0", + "@opentelemetry/instrumentation-bunyan": "^0.69.0", + "@opentelemetry/instrumentation-cassandra-driver": "^0.69.0", + "@opentelemetry/instrumentation-connect": "^0.67.0", + "@opentelemetry/instrumentation-cucumber": "^0.40.0", + "@opentelemetry/instrumentation-dataloader": "^0.41.0", + "@opentelemetry/instrumentation-dns": "^0.67.0", + "@opentelemetry/instrumentation-express": "^0.72.0", + "@opentelemetry/instrumentation-fs": "^0.43.0", + "@opentelemetry/instrumentation-generic-pool": "^0.67.0", + "@opentelemetry/instrumentation-graphql": "^0.72.0", + "@opentelemetry/instrumentation-grpc": "^0.300.0", + "@opentelemetry/instrumentation-hapi": "^0.70.0", + "@opentelemetry/instrumentation-host-metrics": "^0.7.0", + "@opentelemetry/instrumentation-http": "^0.300.0", + "@opentelemetry/instrumentation-ioredis": "^0.72.0", + "@opentelemetry/instrumentation-kafkajs": "^0.33.0", + "@opentelemetry/instrumentation-knex": "^0.68.0", + "@opentelemetry/instrumentation-koa": "^0.72.0", + "@opentelemetry/instrumentation-lru-memoizer": "^0.68.0", + "@opentelemetry/instrumentation-memcached": "^0.67.0", + "@opentelemetry/instrumentation-mongodb": "^0.77.0", + "@opentelemetry/instrumentation-mongoose": "^0.70.0", + "@opentelemetry/instrumentation-mysql": "^0.70.0", + "@opentelemetry/instrumentation-mysql2": "^0.70.0", + "@opentelemetry/instrumentation-nestjs-core": "^0.71.0", + "@opentelemetry/instrumentation-net": "^0.68.0", + "@opentelemetry/instrumentation-openai": "^0.22.0", + "@opentelemetry/instrumentation-oracledb": "^0.49.0", + "@opentelemetry/instrumentation-pg": "^0.77.0", + "@opentelemetry/instrumentation-pino": "^0.70.0", + "@opentelemetry/instrumentation-redis": "^0.72.0", + "@opentelemetry/instrumentation-restify": "^0.69.0", + "@opentelemetry/instrumentation-router": "^0.68.0", + "@opentelemetry/instrumentation-runtime-node": "^0.37.0", + "@opentelemetry/instrumentation-socket.io": "^0.71.0", + "@opentelemetry/instrumentation-tedious": "^0.43.0", + "@opentelemetry/instrumentation-undici": "^0.34.0", + "@opentelemetry/instrumentation-winston": "^0.69.0", + "@opentelemetry/resource-detector-alibaba-cloud": "^0.39.0", + "@opentelemetry/resource-detector-aws": "^3.0.0", + "@opentelemetry/resource-detector-azure": "^0.32.0", + "@opentelemetry/resource-detector-container": "^0.9.0", + "@opentelemetry/resource-detector-gcp": "^0.59.0", + "@opentelemetry/resources": "^3.0.0", + "@opentelemetry/sdk-node": "^0.300.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { - "@opentelemetry/api": "^1.4.1", - "@opentelemetry/core": "^2.0.0" + "@opentelemetry/api": "^1.10.0", + "@opentelemetry/core": "^3.0.0" } }, "node_modules/@opentelemetry/configuration": { - "version": "0.219.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/configuration/-/configuration-0.219.0.tgz", - "integrity": "sha512-wXZUYv4ngu43nA4WEhuXNacm46LW+17LRM8nKyIhBzroRA24PBYjMnakwzR/w777nFUB5xlgsYTTeuXxumZM1Q==", + "version": "0.300.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/configuration/-/configuration-0.300.0.tgz", + "integrity": "sha512-vflvT+be02dmKt430t+XAQ2QvcPzjZODdVqMqbpuakuGk4i0zCZ7SyM9VOFHGuBV/HxfVlf3EvgHBGKob2P8TQ==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "2.8.0", - "yaml": "^2.0.0" + "@opentelemetry/core": "3.0.0", + "yaml": "^2.8.3" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.9.0" } }, "node_modules/@opentelemetry/context-async-hooks": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.8.0.tgz", - "integrity": "sha512-/3FIraneMcng67SUJCxvyInk/oxzwsxyadufk0wwfOBLf5wqtAGX4MoQASwSbndBPeARzBryUM9Azr5kHIdWLw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-3.0.0.tgz", + "integrity": "sha512-qDZeKSgTT+qTaL99eRbpvWO5+oZ0MKvMH4pqvzi6xYKyhiMTDBxBeTLI6BpdeMt58T5TpxHJvFl9P52i6CDWGA==", "license": "Apache-2.0", "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" + "@opentelemetry/api": ">=1.0.0 <1.11.0" } }, "node_modules/@opentelemetry/core": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.8.0.tgz", - "integrity": "sha512-hd1Lfh8p545nNz+jq1Ejfz+Mn1hyLuxYn1YzTfFNrxr8urEWMNQLPf1Th8kjOH+HxwawCrtgBp8JpBUR4ZSgww==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-3.0.0.tgz", + "integrity": "sha512-whOLlww0R/RLtCWGBXhK1fdvL9t2/TL0fqdjZvcaoUUuNilRPjXecqQdzyVwV68s6XEDA5oYbm7/bZT62GXF4A==", "license": "Apache-2.0", - "peer": true, "dependencies": { "@opentelemetry/semantic-conventions": "^1.29.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" + "@opentelemetry/api": ">=1.10.0 <1.11.0" } }, "node_modules/@opentelemetry/exporter-logs-otlp-grpc": { - "version": "0.219.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-grpc/-/exporter-logs-otlp-grpc-0.219.0.tgz", - "integrity": "sha512-7SvzDCIclHWAcCwZ1MTOLcwn4BVNPGI3QxS/DJraPNe1TTL+4TvUBq5zeQV8tsnYvtDN7wKW2qocVmaCP2l7sQ==", + "version": "0.300.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-grpc/-/exporter-logs-otlp-grpc-0.300.0.tgz", + "integrity": "sha512-y4BAcN2UBSBs+esuIyXonpV44oeENKdit1BVKvjHf/61KvZVf7u1sTRz2VGwBpGJvUD7rNPjOZnb4PpG3vFEvg==", "license": "Apache-2.0", "dependencies": { - "@grpc/grpc-js": "^1.14.3", - "@opentelemetry/core": "2.8.0", - "@opentelemetry/otlp-exporter-base": "0.219.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.219.0", - "@opentelemetry/otlp-transformer": "0.219.0", - "@opentelemetry/sdk-logs": "0.219.0" + "@opentelemetry/otlp-exporter-base": "0.300.0", + "@opentelemetry/otlp-grpc-exporter-base": "0.300.0", + "@opentelemetry/otlp-transformer": "0.300.0", + "@opentelemetry/sdk-logs": "3.0.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/exporter-logs-otlp-http": { - "version": "0.219.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-http/-/exporter-logs-otlp-http-0.219.0.tgz", - "integrity": "sha512-mhl2HL6GmZI8b8PwPfqMws/5ovJfbRTxwc9Y5agVVHiQ+e5SL1btsFr/kJDgt7YCexDtsUn5HAreHQO9szFS0A==", + "version": "0.300.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-http/-/exporter-logs-otlp-http-0.300.0.tgz", + "integrity": "sha512-S8yP9Fg33CU9+0fr1pnh/afPfgEpSyxQO4JRUZvmDMhAzgR/RLzvYg93MjWjbC1c2VrXffXROMO68RZ1P/ebgQ==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "0.219.0", - "@opentelemetry/core": "2.8.0", - "@opentelemetry/otlp-exporter-base": "0.219.0", - "@opentelemetry/otlp-transformer": "0.219.0", - "@opentelemetry/sdk-logs": "0.219.0" + "@opentelemetry/otlp-exporter-base": "0.300.0", + "@opentelemetry/otlp-transformer": "0.300.0", + "@opentelemetry/sdk-logs": "3.0.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/exporter-logs-otlp-proto": { - "version": "0.219.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-proto/-/exporter-logs-otlp-proto-0.219.0.tgz", - "integrity": "sha512-Ayw4Gf71PS9jhBVaYywa4WsajnqfDehMkTdVH3TSAVHqPcsAv/AhH/wTNRYNt99szeYr6Gbd/D6RjZD77wAxHg==", + "version": "0.300.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-proto/-/exporter-logs-otlp-proto-0.300.0.tgz", + "integrity": "sha512-i9EqF1mvD0IrL6yBAqb2Cnv61WIYjkBxb36MulHf6/iAb/c653onKVWRJbpexBOHq+fd0VjH+1mhn+AtpFIZwQ==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "0.219.0", - "@opentelemetry/core": "2.8.0", - "@opentelemetry/otlp-exporter-base": "0.219.0", - "@opentelemetry/otlp-transformer": "0.219.0", - "@opentelemetry/resources": "2.8.0", - "@opentelemetry/sdk-logs": "0.219.0", - "@opentelemetry/sdk-trace-base": "2.8.0" + "@opentelemetry/otlp-exporter-base": "0.300.0", + "@opentelemetry/otlp-transformer": "0.300.0", + "@opentelemetry/sdk-logs": "3.0.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/exporter-metrics-otlp-grpc": { - "version": "0.219.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-grpc/-/exporter-metrics-otlp-grpc-0.219.0.tgz", - "integrity": "sha512-6LaaSrPxK5L55bXevWajvOMxGOpNm0n12tG53TeZaUeNzXwLPg6d2KCC1zAlGsojan+xRG71mA4Qqs9K2VVrKQ==", + "version": "0.300.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-grpc/-/exporter-metrics-otlp-grpc-0.300.0.tgz", + "integrity": "sha512-Kbfh2eVuj19WxByTI+UOhzjsyhNnl4lovjl9DYr0QsEpAPDyzWxGQmBDaTgIq1Tv3/Zc9ZDczAa//T2bjzac3w==", "license": "Apache-2.0", "dependencies": { - "@grpc/grpc-js": "^1.14.3", - "@opentelemetry/core": "2.8.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.219.0", - "@opentelemetry/otlp-exporter-base": "0.219.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.219.0", - "@opentelemetry/otlp-transformer": "0.219.0", - "@opentelemetry/resources": "2.8.0", - "@opentelemetry/sdk-metrics": "2.8.0" + "@opentelemetry/exporter-metrics-otlp-http": "0.300.0", + "@opentelemetry/otlp-grpc-exporter-base": "0.300.0", + "@opentelemetry/otlp-transformer": "0.300.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/exporter-metrics-otlp-http": { - "version": "0.219.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.219.0.tgz", - "integrity": "sha512-6CaDRbMVHZSDWzNXwrR8y/H4B/Z1eMNnkHiPQlTx3Ojz2OHY4X/aff/UC4P/3pHUQSuTfi3oh2UsPPZppw+Vrg==", + "version": "0.300.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.300.0.tgz", + "integrity": "sha512-y8KYKyM69l9PG4Ax9DKlKH5jaVJCJo9hXOpT6v0/PDX+uC302AhHVitEz8M600ljqLGdPYodnyn+wbYIYXPh6g==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "2.8.0", - "@opentelemetry/otlp-exporter-base": "0.219.0", - "@opentelemetry/otlp-transformer": "0.219.0", - "@opentelemetry/resources": "2.8.0", - "@opentelemetry/sdk-metrics": "2.8.0" + "@opentelemetry/core": "3.0.0", + "@opentelemetry/otlp-exporter-base": "0.300.0", + "@opentelemetry/otlp-transformer": "0.300.0", + "@opentelemetry/sdk-metrics": "3.0.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/exporter-metrics-otlp-proto": { - "version": "0.219.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-proto/-/exporter-metrics-otlp-proto-0.219.0.tgz", - "integrity": "sha512-DUS7XyIiEnoeccQUvuKy0G2/YqeKhpN8FVIrGbrLNIVMj10yeIFLRzRv0tibCI2kXXvlTTABVexGAk78wHk2ug==", + "version": "0.300.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-proto/-/exporter-metrics-otlp-proto-0.300.0.tgz", + "integrity": "sha512-tCL75kJ0JgLmbNCcpYgYpsRht8HgQJwd6LatK9g19O2nTd2GE3v2d38I1m1cVjKw1NRR+vtqei8AzGrznYtm9A==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "2.8.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.219.0", - "@opentelemetry/otlp-exporter-base": "0.219.0", - "@opentelemetry/otlp-transformer": "0.219.0", - "@opentelemetry/resources": "2.8.0", - "@opentelemetry/sdk-metrics": "2.8.0" + "@opentelemetry/exporter-metrics-otlp-http": "0.300.0", + "@opentelemetry/otlp-exporter-base": "0.300.0", + "@opentelemetry/otlp-transformer": "0.300.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/exporter-prometheus": { - "version": "0.219.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-prometheus/-/exporter-prometheus-0.219.0.tgz", - "integrity": "sha512-TxOnJ85eWJY5JyOJsNMXiRTYlkDcOv0u3KbXEzWCc+tUS9sjL/BC6BcdxZ0B9r2OFVqsrZFXUzSD2sZUy42Ucw==", + "version": "0.300.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-prometheus/-/exporter-prometheus-0.300.0.tgz", + "integrity": "sha512-x8MCVBUPYZeQcL14HJUiYuF6IL4/YZ5OtR5ObnznUaTrhPdZUEvOQ4EpkLvfFph/nvk4lEs0cJ6uK5oMrFyjGQ==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "2.8.0", - "@opentelemetry/resources": "2.8.0", - "@opentelemetry/sdk-metrics": "2.8.0", + "@opentelemetry/core": "3.0.0", + "@opentelemetry/resources": "3.0.0", + "@opentelemetry/sdk-metrics": "3.0.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { - "@opentelemetry/api": "^1.3.0" + "@opentelemetry/api": ">=1.10.0 <1.11.0" } }, "node_modules/@opentelemetry/exporter-trace-otlp-grpc": { - "version": "0.219.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.219.0.tgz", - "integrity": "sha512-BkDNv1UD6BscW19MxbAxVmSYSSFuyeqR6buV2/HTYqA7GrR0EbTFzqG6h86T3PtXmpdbsWjMGLDdjG2rikG27Q==", + "version": "0.300.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-grpc/-/exporter-trace-otlp-grpc-0.300.0.tgz", + "integrity": "sha512-I0/XvL7lLsn8aU8wnoIjIbcjcFfltEHsgf56s1vzAxB7CLRKzv/MUpTbIHWY5Eeci1448cAqiDSuj5GU5OcfKg==", "license": "Apache-2.0", "dependencies": { - "@grpc/grpc-js": "^1.14.3", - "@opentelemetry/core": "2.8.0", - "@opentelemetry/otlp-exporter-base": "0.219.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.219.0", - "@opentelemetry/otlp-transformer": "0.219.0", - "@opentelemetry/resources": "2.8.0", - "@opentelemetry/sdk-trace-base": "2.8.0" + "@opentelemetry/otlp-exporter-base": "0.300.0", + "@opentelemetry/otlp-grpc-exporter-base": "0.300.0", + "@opentelemetry/otlp-transformer": "0.300.0", + "@opentelemetry/sdk-trace": "3.0.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/exporter-trace-otlp-http": { - "version": "0.219.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.219.0.tgz", - "integrity": "sha512-9t6SvBXXBEjOBcIzgozvBbd3jWrv3Gt3ngGhl1fhdZ/zRc7oZDVOFEqbi2zlBpW9BXhgDMKv422J0DL/3iQWfw==", + "version": "0.300.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.300.0.tgz", + "integrity": "sha512-Dwdagba93cdhROlFGbkU4yK4hvd3l0k7WV9nvTWIoN6KwxFP+HCvy9EkgIpyfN11fVdIWxY3XqOwWOq83OPfcA==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "2.8.0", - "@opentelemetry/otlp-exporter-base": "0.219.0", - "@opentelemetry/otlp-transformer": "0.219.0", - "@opentelemetry/resources": "2.8.0", - "@opentelemetry/sdk-trace-base": "2.8.0" + "@opentelemetry/otlp-exporter-base": "0.300.0", + "@opentelemetry/otlp-transformer": "0.300.0", + "@opentelemetry/sdk-trace": "3.0.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/exporter-trace-otlp-proto": { - "version": "0.219.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.219.0.tgz", - "integrity": "sha512-lF/LUBfhOFmxJa+SQsLN7ziV4MHa2pyKgOM6JNehSOfU+npjM4gwm9oIKEJrzrWcexMcqydiyoFy0XCb1Ql3wQ==", + "version": "0.300.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-proto/-/exporter-trace-otlp-proto-0.300.0.tgz", + "integrity": "sha512-ZCWrexCUsfp5o5Eti91uvTlXMfszknzrPt3VM+jAk/Q5T53S/ix6mF07ndSHAhreQ5bKmBg3r1Ar4wkqQ1XlPQ==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "2.8.0", - "@opentelemetry/otlp-exporter-base": "0.219.0", - "@opentelemetry/otlp-transformer": "0.219.0", - "@opentelemetry/resources": "2.8.0", - "@opentelemetry/sdk-trace-base": "2.8.0" + "@opentelemetry/otlp-exporter-base": "0.300.0", + "@opentelemetry/otlp-transformer": "0.300.0", + "@opentelemetry/sdk-trace": "3.0.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/exporter-zipkin": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-2.8.0.tgz", - "integrity": "sha512-Mj84UkEa17BK2o903VTXW3wM8CrSZexGs4tRGVZVIMM9ni1T6TuGx5IrRfoWKAbshx42D5/kc7YV+axypLPYyA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-zipkin/-/exporter-zipkin-3.0.0.tgz", + "integrity": "sha512-swgbcj76LgjoLPCYyyX0G27kW2+V8PifDeXRVpQ7vokwldKgLrw7GkDo5A2wD3yAWZKDvSWWjMigC3RT7xsuMA==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "2.8.0", - "@opentelemetry/resources": "2.8.0", - "@opentelemetry/sdk-trace-base": "2.8.0", + "@opentelemetry/core": "3.0.0", + "@opentelemetry/sdk-trace": "3.0.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.0.0" } }, "node_modules/@opentelemetry/instrumentation": { - "version": "0.219.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.219.0.tgz", - "integrity": "sha512-X5t7I8GyIO9rmGHwoedZLREpQqrF1WW2nxzNNym6HOKpFiE+rvqV3ngC0xcZVO2YwIGf3KKmRdWrYwdwz3H9RQ==", + "version": "0.300.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.300.0.tgz", + "integrity": "sha512-8ugx3X75uK2+rFZ9pX252ruDRELE2F7T3Zwazyll21aXksm+d2JLc9Np9SPS48K4ohGeaaXXHSX4ghxuNQ/gMg==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "0.219.0", "import-in-the-middle": "^3.0.0", "require-in-the-middle": "^8.0.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { - "@opentelemetry/api": "^1.3.0" + "@opentelemetry/api": ">=1.10.0 <1.11.0" } }, "node_modules/@opentelemetry/instrumentation-amqplib": { - "version": "0.66.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-amqplib/-/instrumentation-amqplib-0.66.0.tgz", - "integrity": "sha512-lyJgobzP0Ce+tRGOkdnrb60apfqU89xB9FeMTmo1TJU007KTMLiLFd4iCfTiBEXzBsVplx7kwrVN4FqGBUcD2Q==", + "version": "0.71.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-amqplib/-/instrumentation-amqplib-0.71.0.tgz", + "integrity": "sha512-udno0udqQshCVP1I+rMWtV66NOCEn6WBTtRvdBAiDMvGwojwPDiCX6QshMZbjdW/qisbojubizAdWdjx4mUp3w==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.219.0", + "@opentelemetry/core": "^3.0.0", + "@opentelemetry/instrumentation": "^0.300.0", "@opentelemetry/semantic-conventions": "^1.33.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-aws-lambda": { - "version": "0.71.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-aws-lambda/-/instrumentation-aws-lambda-0.71.0.tgz", - "integrity": "sha512-9Sv6flQDeNNF6ZbiLgn+NYJa220yRZdDSIdgDZsqNubpDnYAPF33OHcQDlE8mFiaOq14mngoPS48JnYc8JT+Ug==", + "version": "0.76.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-aws-lambda/-/instrumentation-aws-lambda-0.76.0.tgz", + "integrity": "sha512-hsaeVoaGS44qXfe23ebEVA9XsE4D/pukhfT4SeNKlhyOBeHDVFnCc2RLOa6t9v5tNTbS3D4cUXc04gjSBZAy3g==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0", - "@opentelemetry/propagator-aws-xray": "^2.1.4", + "@opentelemetry/instrumentation": "^0.300.0", + "@opentelemetry/propagator-aws-xray": "^3.0.0", "@opentelemetry/semantic-conventions": "^1.27.0", "@types/aws-lambda": "^8.10.155" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-aws-sdk": { - "version": "0.74.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-aws-sdk/-/instrumentation-aws-sdk-0.74.0.tgz", - "integrity": "sha512-EMLUGgx2wJSXdwMEFdwd3IaW+mkUF8PENdzDFQ1FRdztzMG1d1XN76ORIjAMsXcKQISlRRcz93AWPQeBPn4EKA==", + "version": "0.79.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-aws-sdk/-/instrumentation-aws-sdk-0.79.0.tgz", + "integrity": "sha512-B8dcjI9eNwHPJWRUIROcsuiXwsHNxa05J9Uy6ahlN9qUEMyBdK3sPzCsDKC5YbGFPGiC8aN9m5mSjGQdXoswwQ==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.219.0", + "@opentelemetry/core": "^3.0.0", + "@opentelemetry/instrumentation": "^0.300.0", "@opentelemetry/semantic-conventions": "^1.34.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-bunyan": { - "version": "0.64.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-bunyan/-/instrumentation-bunyan-0.64.0.tgz", - "integrity": "sha512-jrRNFvpREutmpoWhk1T8n9q/RYdxbViXwSUPHN8yQR1bzgtwfOl/y8G/p8Xfudlky9GGsqw5WRc6q6QrfgF3pw==", + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-bunyan/-/instrumentation-bunyan-0.69.0.tgz", + "integrity": "sha512-Q+ur3anFLSWa28aQJg/hvjgBv81ju65qBQXj5s/bL1Xpza3wysrKGwA4gx8106Nil9iwdm+KQZF9hge8heROwQ==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "^0.219.0", - "@opentelemetry/instrumentation": "^0.219.0", - "@types/bunyan": "1.8.11" + "@opentelemetry/instrumentation": "^0.300.0", + "@opentelemetry/semantic-conventions": "^1.41.1" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { - "@opentelemetry/api": "^1.3.0" + "@opentelemetry/api": "^1.10.0" } }, "node_modules/@opentelemetry/instrumentation-cassandra-driver": { - "version": "0.64.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-cassandra-driver/-/instrumentation-cassandra-driver-0.64.0.tgz", - "integrity": "sha512-KN+iOsmPI0nkX2lfgNgHBrHNaDuxDwIbwFrlvyrZ4bAT8bTKcCOXhne70O9qihM8+T1F4tjvPXpCfhKZbmsYiw==", + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-cassandra-driver/-/instrumentation-cassandra-driver-0.69.0.tgz", + "integrity": "sha512-fdFuSVEW1QRm5wfyvHew3RseIXuPK3Fk9OhMQbgbik37Rc0tUuYf9aLUuUANu1qQlMfXr0lhLTaUekUKnUg8vg==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0", + "@opentelemetry/instrumentation": "^0.300.0", "@opentelemetry/semantic-conventions": "^1.37.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-connect": { - "version": "0.62.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-connect/-/instrumentation-connect-0.62.0.tgz", - "integrity": "sha512-ZGV2sOyeffqMiqoh4RpsPTs/TUI5cCS+cEWvC9wUfvaEekR5omR6P/ClG+QDwasGBlKx2zfFPjSYPpzUo81XAw==", + "version": "0.67.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-connect/-/instrumentation-connect-0.67.0.tgz", + "integrity": "sha512-Y7Vh+iKuOAEwUJ4JOI5OvNK56E1PixoDpK+Bfj4QnBivkqHEZEUqbnYRhvHFVXYisP/xeJKOh3pU+iOnxJHedA==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.219.0", + "@opentelemetry/core": "^3.0.0", + "@opentelemetry/instrumentation": "^0.300.0", "@opentelemetry/semantic-conventions": "^1.27.0", "@types/connect": "3.4.38" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-cucumber": { - "version": "0.35.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-cucumber/-/instrumentation-cucumber-0.35.0.tgz", - "integrity": "sha512-H9NsbcFiVOFOcOu40+VOOjxdTeonu0VHI3mte5ie5ka/bazzIPGncQoHpL6su53C3/sgMdKjE6ZuwsB7Y8gQpA==", + "version": "0.40.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-cucumber/-/instrumentation-cucumber-0.40.0.tgz", + "integrity": "sha512-CQ6UlOpTdDEvBlEWsYIeQ0A1zk89bJLhY9WEG7jrOrFXoLYW8Zicvxa1MaMq0xiEooagTrPoV6+Gtwkd28Ekzw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0", + "@opentelemetry/instrumentation": "^0.300.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.0.0" } }, "node_modules/@opentelemetry/instrumentation-dataloader": { - "version": "0.36.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-dataloader/-/instrumentation-dataloader-0.36.0.tgz", - "integrity": "sha512-gE0mTk+EnVaBN0mPRM1V6FqzQ9VckTp6ZFIssU5hxy+e3sqspYILBhV/0IHZ33qxGa3B9buLVZnuzVjUISfyoQ==", + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-dataloader/-/instrumentation-dataloader-0.41.0.tgz", + "integrity": "sha512-Y6wQwsfCgUW0oie1MCaK+nvx4zIN8BHV0rozno5QbmNZN/Td1N5jG0D+Y5Y6bt8Oo7Wyxz8Q8aw6Y5pz3q+iyg==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0" + "@opentelemetry/instrumentation": "^0.300.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-dns": { - "version": "0.62.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-dns/-/instrumentation-dns-0.62.0.tgz", - "integrity": "sha512-6v0X8wEqhIyv2b7MXhmipyCitJfm0vnF5mLBTWXojovoHp7P1EpN5sb12LgdhVlozhGwRZdzb6OvKUVsxKMD8g==", + "version": "0.67.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-dns/-/instrumentation-dns-0.67.0.tgz", + "integrity": "sha512-ENj4hL4w2ilMdq3jhf9dDg5CDzjCuTsshTRTse7j0AjIIFS1knP75BQR0Qmx2URPttW6NbwU61jW1v9vxJ4vfA==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0" + "@opentelemetry/instrumentation": "^0.300.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-express": { - "version": "0.67.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-express/-/instrumentation-express-0.67.0.tgz", - "integrity": "sha512-1WTWX2YNZIV+jPmEqdf/Vd1gHMT92TKA/0pf/iIItWhV6+RhzhnUUW4kSWQn8L3qVcgWEzQ860/ZOwaIwayi8A==", + "version": "0.72.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-express/-/instrumentation-express-0.72.0.tgz", + "integrity": "sha512-YV1T099/8acoA7giEBWm8NJJy+zyMElFkf5DGGcNsBftrA1TLVpctAKBUaV97TOXa+RlglwmxqtOPsF5+KCbzA==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.219.0", + "@opentelemetry/core": "^3.0.0", + "@opentelemetry/instrumentation": "^0.300.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-fs": { - "version": "0.38.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-fs/-/instrumentation-fs-0.38.0.tgz", - "integrity": "sha512-6OBofWODg0RcPkl3bA+7yPf0e4Vi3O7ZxlFGY5QHPMMLxWVMnjWPEXQ2NlLBk19Sr8LcvEyyZOStdLJrT5o2dQ==", + "version": "0.43.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-fs/-/instrumentation-fs-0.43.0.tgz", + "integrity": "sha512-8Q4DmSloluXR4L+nJ91IbmvvBLw3ubc06jG+AN9S+munVJCzA+b9gLm3VCzj3wyh+ZN5C08+5EaTvShnR8bEMQ==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.219.0" + "@opentelemetry/core": "^3.0.0", + "@opentelemetry/instrumentation": "^0.300.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-generic-pool": { - "version": "0.62.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-generic-pool/-/instrumentation-generic-pool-0.62.0.tgz", - "integrity": "sha512-IhO2y/MaK1oZ4EbUgdkSVT+XViPq86IAz4lwPe9jaba00M2yDWs8+f9xjcH3tK5IC3dZuAxXmifGmfvuJp92jw==", + "version": "0.67.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-generic-pool/-/instrumentation-generic-pool-0.67.0.tgz", + "integrity": "sha512-IE8Zws++d8de9Nv1Zb32eaFfXIv7PCsV+YyvwIEb0jpkWjfh2ZqmrgZsHzGOeLvgStFY4tN380lbcMR67FdSGw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0" + "@opentelemetry/instrumentation": "^0.300.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-graphql": { - "version": "0.67.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-graphql/-/instrumentation-graphql-0.67.0.tgz", - "integrity": "sha512-NMUmuhtYvv3AwkK4zsHQbTCXS81QS63hbNZRKfXc7W8f4KbWeKLmqKqvnfjUcqZoGS0eAw2kNKNYcbtbQ7baAg==", + "version": "0.72.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-graphql/-/instrumentation-graphql-0.72.0.tgz", + "integrity": "sha512-kyDJXU6t3rPYkY94riEk8MuhTZZ9stNzd5vQ3EYRpFSCdrRwP8gWSSoFnRJVhFWIruC6d5/JdqVFKUjmJ65p+g==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0" + "@opentelemetry/instrumentation": "^0.300.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-grpc": { - "version": "0.219.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-grpc/-/instrumentation-grpc-0.219.0.tgz", - "integrity": "sha512-GyW1Kfbf7uiJXeBZovB/uXPUdkaZYWzB2ZPCdY2CU7+6V207u8wlCM+zVd3UwhEjOBrMbZAGq+m38aBEI/EVtA==", + "version": "0.300.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-grpc/-/instrumentation-grpc-0.300.0.tgz", + "integrity": "sha512-znZl9LN1Dqg2rqSBRnARApBUlG7vz4FZavWoZ4TxFA7gIIqHfsbImkX/QJCNCiCGEBD8Stji9Ix6Ev25NptK9Q==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "0.219.0", + "@opentelemetry/instrumentation": "0.300.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-hapi": { - "version": "0.65.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-hapi/-/instrumentation-hapi-0.65.0.tgz", - "integrity": "sha512-Whhas9iU0SfK/7XBcgCwfW5c9AaxjxtZpzW21t3Ml8XZ6Irc3hF36JDolMmFa7nUjML9n9bSUAZjwCgrK+2UdQ==", + "version": "0.70.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-hapi/-/instrumentation-hapi-0.70.0.tgz", + "integrity": "sha512-ech8E3/hv6fuTxUfA3QKPpNaRL5/s75C7+/JDMMbff0jMG4wGkAiLJqDjyfaOvP6cqW9EiHqaznZ8/uhrloJsw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.219.0", + "@opentelemetry/core": "^3.0.0", + "@opentelemetry/instrumentation": "^0.300.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-host-metrics": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-host-metrics/-/instrumentation-host-metrics-0.2.0.tgz", - "integrity": "sha512-NIttCEOLdg1ebbDiJpCf0Ly1OGIa10isesik+K2dnXy2P99q4muUFjpaLtTnhkENrt9SmR0Zrxzq7B+W/VNWyw==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-host-metrics/-/instrumentation-host-metrics-0.7.0.tgz", + "integrity": "sha512-S5BbKqXWDYMxWyvsIMNYfPcGfwsODg/xHnBI0SylG3yBnZuQ7Su3EMUK+pY2mBgkqtUAFPXv7P285/AmF7j+xg==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0", + "@opentelemetry/instrumentation": "^0.300.0", "systeminformation": "^5.31.6" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-http": { - "version": "0.219.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.219.0.tgz", - "integrity": "sha512-nNt1fqpyah/OKjNHdEOu8xLwISppRU2qJuF8aR+fCcftVwdFkPgtworBLA+TI1HU2iF508jcQBF2gerWczJAXg==", + "version": "0.300.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.300.0.tgz", + "integrity": "sha512-kAU01q92leb1rMuF5fhuQKjP3MkdCxSiUT/IWo409YrQMbQdLGmM4EyH6RoSmInNSulSgKWkja+IyglnZSPYXg==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "2.8.0", - "@opentelemetry/instrumentation": "0.219.0", + "@opentelemetry/core": "3.0.0", + "@opentelemetry/instrumentation": "0.300.0", "@opentelemetry/semantic-conventions": "^1.29.0", "forwarded-parse": "2.1.2" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-ioredis": { - "version": "0.67.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-ioredis/-/instrumentation-ioredis-0.67.0.tgz", - "integrity": "sha512-dv64vQ4aXbJvRMMAFrMUSzDeJrNv/uQMLjfaav4LHAOar7Xn08W3pkoYoYEnzq/n2+fGgG96rp9S0gQ+VnLDiw==", + "version": "0.72.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-ioredis/-/instrumentation-ioredis-0.72.0.tgz", + "integrity": "sha512-Z3btRN3tAVKbc48h4LuHTfOOnQdrhJ5PdtYAhvXkbdH2neBo8FSvpr4PIt4nvqk6XO5Gyqba3CeP48zaOmrYkQ==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0", - "@opentelemetry/redis-common": "^0.38.3", + "@opentelemetry/instrumentation": "^0.300.0", + "@opentelemetry/redis-common": "^0.39.0", "@opentelemetry/semantic-conventions": "^1.33.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-kafkajs": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-kafkajs/-/instrumentation-kafkajs-0.28.0.tgz", - "integrity": "sha512-dztkg70nJds3Uc0Xo3NFlRqL5iYgGYWh8myuuGfRC6NnXJchY0Kw9QnBjTZxBSldXU+P6nv2snDVMmlxuy6fEw==", + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-kafkajs/-/instrumentation-kafkajs-0.33.0.tgz", + "integrity": "sha512-b1fUlGKB4xAQhAABxUDxINTPIUptC/fa4E5CSmVBNvd/Vr+orFbnXLCz3PWuTH8hR0Ewucwzzll3W6wJmIh1Lw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0", + "@opentelemetry/instrumentation": "^0.300.0", "@opentelemetry/semantic-conventions": "^1.30.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-knex": { - "version": "0.63.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-knex/-/instrumentation-knex-0.63.0.tgz", - "integrity": "sha512-XrpRahI/9vTrfSUfkhy8jGX8KMRKecQIPU9GyEZ8gkR030iJwQYsMmKGO5TK9R80cQGUopXwDvV55zmVNEkcPg==", + "version": "0.68.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-knex/-/instrumentation-knex-0.68.0.tgz", + "integrity": "sha512-sCXpcMsx4Qbg5WZ+vzmaGDJnlUjrVee+cQ812xYkcmjRoYCcQH1L631rqHfUOu9OqqCwtt2/iRIzRcJYUx5lKg==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0", + "@opentelemetry/instrumentation": "^0.300.0", "@opentelemetry/semantic-conventions": "^1.33.1" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-koa": { - "version": "0.67.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-koa/-/instrumentation-koa-0.67.0.tgz", - "integrity": "sha512-QOGY4mjqvF85LDcrzwrQXMcsu1wMTALeL1OHyTkLpN/7cnoDtv0W/qMBjHVq4IKYK6yDH4ZDNdwlonJPhwCGcw==", + "version": "0.72.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-koa/-/instrumentation-koa-0.72.0.tgz", + "integrity": "sha512-tldfHvVxFHK/K8PcRQjegk2md0YWbkRQepU0/7rnQV/bvTD2oGu9JeNByBSk/Ckk5rH3qq7wdXSRoIajbQIjxw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.219.0", + "@opentelemetry/core": "^3.0.0", + "@opentelemetry/instrumentation": "^0.300.0", "@opentelemetry/semantic-conventions": "^1.36.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.9.0" } }, "node_modules/@opentelemetry/instrumentation-lru-memoizer": { - "version": "0.63.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-lru-memoizer/-/instrumentation-lru-memoizer-0.63.0.tgz", - "integrity": "sha512-DlZRNXfiosmREoLbEGbYuxF70cYXjrYqoaO1sJE167i1+ARWXTq0YMPJ97i53Ws/xkZWllJNYU4mpY2LM2yTlA==", + "version": "0.68.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-lru-memoizer/-/instrumentation-lru-memoizer-0.68.0.tgz", + "integrity": "sha512-zNcs1A+FISUHhZuKnlfuCxKn8hgYA80qHVdxFyNCMmxdZyShGRP1KA8HGrGYk0JqQK391IYCgisyt+7TI+3crA==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0" + "@opentelemetry/instrumentation": "^0.300.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-memcached": { - "version": "0.62.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-memcached/-/instrumentation-memcached-0.62.0.tgz", - "integrity": "sha512-kAajd/MtdRBh9PCrMM4fnusFRNPJDU1dv5w9cgnKtMfutRE6K03wBbGSeT3FD1M56sMYWVqPhiKUhfSZCMZrLg==", + "version": "0.67.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-memcached/-/instrumentation-memcached-0.67.0.tgz", + "integrity": "sha512-EnjSnkxp7P/DGD3f/D/Uwa/BrsKWkRkEhR7OdTVyTnu1zk1p/vSTBnvLXVAqRqundONyWeHNeRrwDHBryFyR9Q==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0", + "@opentelemetry/instrumentation": "^0.300.0", "@opentelemetry/semantic-conventions": "^1.33.0", "@types/memcached": "^2.2.6" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-mongodb": { - "version": "0.72.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongodb/-/instrumentation-mongodb-0.72.0.tgz", - "integrity": "sha512-WYgGzvlHzdoxHlrhysYtjxE4RC23j/iFZ66hdMJuAoczOWoD/xb6LhRwaz4CM+LKyKtcSIadAjSUyGv2B+SNwg==", + "version": "0.77.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongodb/-/instrumentation-mongodb-0.77.0.tgz", + "integrity": "sha512-dC5tcoI/jrFvlS6CVayQ8nIU4OlTdRW6qFsCKI/C7UXRmXq7mPNA5DzwS0Pn2+KEMDGTuLamNRB9SNkFgraMVg==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0", + "@opentelemetry/instrumentation": "^0.300.0", "@opentelemetry/semantic-conventions": "^1.33.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-mongoose": { - "version": "0.65.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongoose/-/instrumentation-mongoose-0.65.0.tgz", - "integrity": "sha512-P0iT4oKuinEFZlTIKPJC5hhnmiV9De9lEiLkGzSwnNLdkyHIWug8BfRp5ZROrYAQ9mm47H+WLB/ozvUvgzEvEA==", + "version": "0.70.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongoose/-/instrumentation-mongoose-0.70.0.tgz", + "integrity": "sha512-cJSZVLCyozcoC+lDz3vhJgv6MtcppCZuZI5BpJlCxc15zR81AZ/807dyCSb7WEr5j15WkV1kLhYdJpS8Ugnwdg==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.219.0", + "@opentelemetry/core": "^3.0.0", + "@opentelemetry/instrumentation": "^0.300.0", "@opentelemetry/semantic-conventions": "^1.33.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-mysql": { - "version": "0.65.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql/-/instrumentation-mysql-0.65.0.tgz", - "integrity": "sha512-sh1wRjFaTt+8DOhJ0134rFtJoHVUXKI8faIWTbj4zZNw847dzUgmkO8xOluJ9Css0JzT4vCeZofJmq9mQmmESA==", + "version": "0.70.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql/-/instrumentation-mysql-0.70.0.tgz", + "integrity": "sha512-zr+Tc6bSlqfDT+7am7iwCYVFUwI0omf7BWPBdSCcmJBY9Wzp9L4wk8LAzAWgJ4Q6kIM0Ntx4RR+lY8llGMIFTQ==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0", - "@opentelemetry/semantic-conventions": "^1.33.0", - "@types/mysql": "2.15.27" + "@opentelemetry/instrumentation": "^0.300.0", + "@opentelemetry/semantic-conventions": "^1.33.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-mysql2": { - "version": "0.65.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql2/-/instrumentation-mysql2-0.65.0.tgz", - "integrity": "sha512-Om6BJ/bmFBzNkGbAzj/UV5sCKX6jCGzhTl1Gqgtim/O0dnPE7F2zN65u16Fq3JgyypGAwT2iwh13tYdWkc8/RA==", + "version": "0.70.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql2/-/instrumentation-mysql2-0.70.0.tgz", + "integrity": "sha512-c+wyti8w8xZuXRUsmMBzKXpnTxrafCITnm+UiWIq5oyOpp+Y6n03+ASEP7K+EBLIMQZR6U3EX0iYTlUF7S3hBw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0", + "@opentelemetry/instrumentation": "^0.300.0", "@opentelemetry/semantic-conventions": "^1.33.0", - "@opentelemetry/sql-common": "^0.42.0" + "@opentelemetry/sql-common": "^0.43.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-nestjs-core": { - "version": "0.65.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-nestjs-core/-/instrumentation-nestjs-core-0.65.0.tgz", - "integrity": "sha512-/q8fN2M2zGl+gQRaF79dzqvyvVqHAI11c7xAQZy9W1eAtQScNwaQtPm0EUo5+aOgakaTksBrsiHUF0rQS24NsQ==", + "version": "0.71.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-nestjs-core/-/instrumentation-nestjs-core-0.71.0.tgz", + "integrity": "sha512-EGqspwpbOdarPoXz2TQfvxiKvYujCW2REJM65/pr9SnuF+kW9oWHbJLypKAoxF14SF0SWHIwD7T8OrTmmfqcMQ==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0", + "@opentelemetry/instrumentation": "^0.300.0", "@opentelemetry/semantic-conventions": "^1.30.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-net": { - "version": "0.63.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-net/-/instrumentation-net-0.63.0.tgz", - "integrity": "sha512-fvmVdL4SlsYZf74mq6iLBPd6JJHRAe5utzN7Wt9e4nwa2S3pgExA9poOEmBL1CvIR47MceTA/A8vgVCF23ebbw==", + "version": "0.68.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-net/-/instrumentation-net-0.68.0.tgz", + "integrity": "sha512-SUwiNYcKWq5CVJC4CluReoDqnJdoNbwIcfJbqL0YVQN4gDWAi8vzeQMDAPfgIu4g0uuPEQV5/OTPjq4iGMgALg==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0", + "@opentelemetry/instrumentation": "^0.300.0", "@opentelemetry/semantic-conventions": "^1.33.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-openai": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-openai/-/instrumentation-openai-0.17.0.tgz", - "integrity": "sha512-X3aEZnzj7SJkn1nmqEoD9IljmqENnGrd0vcJngcEApT8uqhFaeimONqKeIzKYvUgC7k4OkAUxC7yfXzxIK1KlA==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-openai/-/instrumentation-openai-0.22.0.tgz", + "integrity": "sha512-1TIMdTkdUYpqN1Sv1kBGMJcs7kaV2j9LqblHTBpmGHd+HDVNmxmBeM9/+T7HUrICWGPYy7xvFi004N+0vLVytg==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "^0.219.0", - "@opentelemetry/instrumentation": "^0.219.0", + "@opentelemetry/instrumentation": "^0.300.0", "@opentelemetry/semantic-conventions": "^1.36.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { - "@opentelemetry/api": "^1.3.0" + "@opentelemetry/api": "^1.10.0" } }, "node_modules/@opentelemetry/instrumentation-oracledb": { - "version": "0.44.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-oracledb/-/instrumentation-oracledb-0.44.0.tgz", - "integrity": "sha512-ncEfP4rzuZXBHJJtzWLYctK4Pq/FvZRiASxlFY9CJG9kGjaFTfzBUys0NiP27alYPvpjj0uDAMheDk9nihO8ZA==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-oracledb/-/instrumentation-oracledb-0.49.0.tgz", + "integrity": "sha512-JsnPQM3ifh/8n+BKIlo1WA+r0K6DgcaEkD9+m2+r6zNQz2pyS9H2F3WYtmyNoH+FnAuHtwrUTQgapLfwiaZNag==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0", - "@opentelemetry/semantic-conventions": "^1.34.0", - "@types/oracledb": "6.5.2" + "@opentelemetry/core": "^3.0.0", + "@opentelemetry/instrumentation": "^0.300.0", + "@opentelemetry/semantic-conventions": "^1.34.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-pg": { - "version": "0.71.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pg/-/instrumentation-pg-0.71.0.tgz", - "integrity": "sha512-jAhfyZeOkEKh3cQ5nm1tNWqHg7HFARyAe+p4BSoDHnB79c1woyEvDKqS11Hj/DjtceP+vrurIfcDs7Fqiy11mQ==", + "version": "0.77.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pg/-/instrumentation-pg-0.77.0.tgz", + "integrity": "sha512-eeM+nAWZqgwrSmGy/yt4wL8CSSXuHZXKyOOKiP0m6x7oA4AQ1Kl5bbHqdr1OkXu5LIXCnIWa6Cmw9tLdzCMLJA==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.219.0", + "@opentelemetry/core": "^3.0.0", + "@opentelemetry/instrumentation": "^0.300.0", "@opentelemetry/semantic-conventions": "^1.34.0", - "@opentelemetry/sql-common": "^0.42.0", + "@opentelemetry/sql-common": "^0.43.0", "@types/pg": "8.15.6", "@types/pg-pool": "2.0.7" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-pino": { - "version": "0.65.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pino/-/instrumentation-pino-0.65.0.tgz", - "integrity": "sha512-p6eh+NRmzi1F+/4QG7XDqRk4ICdCNTsM5vdcwUPnpMie2MddgY1/ENmWvCF9r0Kh6QQRA2kkpnhoJFaiRQ5kVw==", + "version": "0.70.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pino/-/instrumentation-pino-0.70.0.tgz", + "integrity": "sha512-JbxLZ5PhLJU0B1IWPX9/O14de8YGatiRLrlYz+cUy0no/rz6QLH8l6Bk+rF7geun4LHGqQlALIL/9SRDs+yuLg==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "^0.219.0", - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.219.0" + "@opentelemetry/core": "^3.0.0", + "@opentelemetry/instrumentation": "^0.300.0", + "@opentelemetry/semantic-conventions": "^1.41.1" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { - "@opentelemetry/api": "^1.3.0" + "@opentelemetry/api": "^1.10.0" } }, "node_modules/@opentelemetry/instrumentation-redis": { - "version": "0.67.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis/-/instrumentation-redis-0.67.0.tgz", - "integrity": "sha512-TBjO4bPvfGH6bRjJJ+KrJhEqpHg3SWCFZ84MqsTWF639RQZmvkMhT2/DJsBAqqkq33IvHoDJysserqAfZN1s+Q==", + "version": "0.72.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis/-/instrumentation-redis-0.72.0.tgz", + "integrity": "sha512-e9S4dMYpwq1pllqr7supmEC7ZziAzCB/D24X7+VbDbcpl7J+C0Md6RDtcE7BQcsW7428P10lxrYAxWcNIP0GrA==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0", - "@opentelemetry/redis-common": "^0.38.3", + "@opentelemetry/instrumentation": "^0.300.0", + "@opentelemetry/redis-common": "^0.39.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-restify": { - "version": "0.64.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-restify/-/instrumentation-restify-0.64.0.tgz", - "integrity": "sha512-X+gL4KpfPAx7Y07zKQVtyJPckhCcYJdSlEz0Kq0iR5nkQ8/AVWJ05/txl4voZbZdCuNdn+uLZTtJ60bAQwputQ==", + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-restify/-/instrumentation-restify-0.69.0.tgz", + "integrity": "sha512-76fmH5TQd4V6lpou7AVy2hYi0KfS+VV2zA6PWW9kuFAN/yq0hAr16l7+bHPtM2ae4MY3TSO56gkFNpAjOHXWDg==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.219.0", + "@opentelemetry/core": "^3.0.0", + "@opentelemetry/instrumentation": "^0.300.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-router": { - "version": "0.63.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-router/-/instrumentation-router-0.63.0.tgz", - "integrity": "sha512-zIpsZSHGvbaqiEazwUm1X0FkPnLXIwZcL/llu/UplkeGNU58bsw70l2uMqNqTb7J+tzsBC09CLVPty5BhW3X9Q==", + "version": "0.68.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-router/-/instrumentation-router-0.68.0.tgz", + "integrity": "sha512-EPc/e+ccOqYkIX4HRktNClgARaWoAsEjc4dAPt8V3bLySUktx+/Ew/+MZNtNS+CUE4n+J1BvGGdwh4+ZaHgb7A==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0", + "@opentelemetry/instrumentation": "^0.300.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-runtime-node": { - "version": "0.32.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-runtime-node/-/instrumentation-runtime-node-0.32.0.tgz", - "integrity": "sha512-Jo1jSgrHlah3lPpGNPsIpF0q52D5uSLRJrztWUoPc1/Tli2ZWZ+cArgNtcdmiLuKhW21MwYbbcrNw1fbOPeR3A==", + "version": "0.37.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-runtime-node/-/instrumentation-runtime-node-0.37.0.tgz", + "integrity": "sha512-2QZ7M1OUTbowoExKX4eTrMAo0gO5dmxV91cARmkpHs2jzo6oFFLDTRfXluYMtNAhAhReswAsQ7BaKo7O7fo/rw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "^0.219.0", - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.219.0" + "@opentelemetry/core": "^3.0.0", + "@opentelemetry/instrumentation": "^0.300.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { - "@opentelemetry/api": "^1.3.0" + "@opentelemetry/api": "^1.10.0" } }, "node_modules/@opentelemetry/instrumentation-socket.io": { - "version": "0.66.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-socket.io/-/instrumentation-socket.io-0.66.0.tgz", - "integrity": "sha512-XrZmLkFJktVLd3biQiP8BAhupRwPWLHGIiDCfyDAnWI6borIL0wD6BpwFKKPT/etpu4/5OaeAQ7qs/S+FY9nhQ==", + "version": "0.71.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-socket.io/-/instrumentation-socket.io-0.71.0.tgz", + "integrity": "sha512-12dOOiqCwgaQYMR7A2S4aAScn4ZTznCZdzoKiQS9AVHFOYasADgNaiYs6C1odOehnOfNMwt4Z02d5tfhauqy/A==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0" + "@opentelemetry/instrumentation": "^0.300.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-tedious": { - "version": "0.38.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-tedious/-/instrumentation-tedious-0.38.0.tgz", - "integrity": "sha512-9sRWyIMBHDqJvxRVZ+eQ7jHJ9Iu+DapO27WLZbQF1nyD8xIvEMuDonQ/HnlQiaRdwnqFknXSQTFusJUT3mNVyQ==", + "version": "0.43.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-tedious/-/instrumentation-tedious-0.43.0.tgz", + "integrity": "sha512-x+v44lSHbe2a3HCxXWy57jybInwKRNHcMOArycdsHPEw+8YzH2DzQZViTO/J165qbSF0o+q9F1OtTJvr88Q45Q==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.219.0", - "@opentelemetry/semantic-conventions": "^1.33.0", - "@types/tedious": "^4.0.14" + "@opentelemetry/instrumentation": "^0.300.0", + "@opentelemetry/semantic-conventions": "^1.33.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-undici": { - "version": "0.29.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-undici/-/instrumentation-undici-0.29.0.tgz", - "integrity": "sha512-SnA+0XgGc595jtnwFVfWy7Vgfr5hle4D5YKIlm0U4z8aK9YoCZVUn1xAkVZ2evaJyykiDF50FBzr1XZ0uj8CPA==", + "version": "0.34.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-undici/-/instrumentation-undici-0.34.0.tgz", + "integrity": "sha512-RcAEj8opdr/9BVZyEzJatN7sHQCgmdCLvb8Tvf5CNxRmdWbR3FaLN0h7JaI2ganW78MKAX2lM7O5isNIweabnA==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.219.0", + "@opentelemetry/core": "^3.0.0", + "@opentelemetry/instrumentation": "^0.300.0", "@opentelemetry/semantic-conventions": "^1.24.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.7.0" } }, "node_modules/@opentelemetry/instrumentation-winston": { - "version": "0.63.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-winston/-/instrumentation-winston-0.63.0.tgz", - "integrity": "sha512-NFMHLYODph0rWGfT/QLv75hCsu1sxVAV79L8HduBCMo181jOTSRZHaqxfrvDtFOsvgYBaiUBa7Ga50w47wM3FA==", + "version": "0.69.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-winston/-/instrumentation-winston-0.69.0.tgz", + "integrity": "sha512-O+zFASmPbEd1hIx5Y/VGQsbf9/OFU4KtZXI1qFig/WYeY4YZeTKiMN2nn1UGDBoxeBahbXMkt26ZCMWF/PbGIQ==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "^0.219.0", - "@opentelemetry/instrumentation": "^0.219.0" + "@opentelemetry/instrumentation": "^0.300.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { - "@opentelemetry/api": "^1.3.0" + "@opentelemetry/api": "^1.10.0" } }, "node_modules/@opentelemetry/otlp-exporter-base": { - "version": "0.219.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.219.0.tgz", - "integrity": "sha512-zvIxQX/AZUVKDU+hCuYx+7UkiP7GRdnk1ZbFQRYzHvYp47cAWR4j3IhoPhV9KaeXEv2xdGq3IA6PnpzDmLcmSA==", + "version": "0.300.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.300.0.tgz", + "integrity": "sha512-D+PhzYURtv6p7Kk1rUrilLtV+ZvS218tI0jiKTV5z1agOeELw78C+cFd3o9UUshUx1j+EIpFM62yGk8BuydQvg==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "2.8.0", - "@opentelemetry/otlp-transformer": "0.219.0" + "@opentelemetry/core": "3.0.0", + "@opentelemetry/otlp-transformer": "0.300.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/otlp-grpc-exporter-base": { - "version": "0.219.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.219.0.tgz", - "integrity": "sha512-iIk/s8QQu39zpTrRRmsW/Eg3SE2+Hg8tLWepr2FLRgmwUpNd0IpCTLJEHJ77hpt4hgIS8MAh44UYI4xQPZwWlw==", + "version": "0.300.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-grpc-exporter-base/-/otlp-grpc-exporter-base-0.300.0.tgz", + "integrity": "sha512-0C6rf7vVQrT7ZCUYJRZ1P4TsauCfSc4qXSpwqBWW5Ztt/4gxt5uHfLw2nTirSuPpz0sSeeRPW+Z0HyKJXB/CTQ==", "license": "Apache-2.0", "dependencies": { - "@grpc/grpc-js": "^1.14.3", - "@opentelemetry/core": "2.8.0", - "@opentelemetry/otlp-exporter-base": "0.219.0", - "@opentelemetry/otlp-transformer": "0.219.0" + "@grpc/grpc-js": "^1.14.5", + "@opentelemetry/core": "3.0.0", + "@opentelemetry/otlp-exporter-base": "0.300.0", + "@opentelemetry/otlp-transformer": "0.300.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/otlp-transformer": { - "version": "0.219.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.219.0.tgz", - "integrity": "sha512-aaYKAyXhw9VchKZVGOopD3Gw/kPsyrX2c6IQ0AW32mTjqmZOh5Y6Gf5OYqTNqVktAeBjmFinhyFaCwW6GYK9YQ==", + "version": "0.300.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.300.0.tgz", + "integrity": "sha512-T55lRmjRwvXWyTFdy/BbJ3T5RRsq3bAwQgxxA7qHFxgRd4+pZzRk02ZwOFsYK5072OXGYjYFNJcp68eQV4i0Ig==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "0.219.0", - "@opentelemetry/core": "2.8.0", - "@opentelemetry/resources": "2.8.0", - "@opentelemetry/sdk-logs": "0.219.0", - "@opentelemetry/sdk-metrics": "2.8.0", - "@opentelemetry/sdk-trace-base": "2.8.0" + "@opentelemetry/core": "3.0.0", + "@opentelemetry/resources": "3.0.0", + "@opentelemetry/sdk-logs": "3.0.0", + "@opentelemetry/sdk-metrics": "3.0.0", + "@opentelemetry/sdk-trace": "3.0.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { - "@opentelemetry/api": "^1.3.0" + "@opentelemetry/api": ">=1.10.0 <1.11.0" } }, "node_modules/@opentelemetry/propagator-aws-xray": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-aws-xray/-/propagator-aws-xray-2.2.0.tgz", - "integrity": "sha512-Yjvt2EjL+tfpkVOdKbhTPgpM4SIAez9nG6Q/QjQ3yfcJcjIWp59ph70SLfvmkSL6++3DCnuBG3iWcB18PwWavQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-aws-xray/-/propagator-aws-xray-3.0.0.tgz", + "integrity": "sha512-5RHIXJFFPsX2e5Z2lUjcsCOkouW08PuFb9Vfg5l22E0PZ01tapU11wH/gb8RCGckjlvgoc+HrWmYtu/VqI2kAQ==", "license": "Apache-2.0", "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" + "@opentelemetry/api": ">=1.0.0 <1.11.0" } }, "node_modules/@opentelemetry/propagator-b3": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-2.8.0.tgz", - "integrity": "sha512-SazlvuSKi5533rPHTW2TwBwdMakhjZST4SYs0YauuvfGDkT13KbG1gJS75hV0uWVeevhtVP9sAIlaZLTHdSbMg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-3.0.0.tgz", + "integrity": "sha512-pmG16s+UYAobPmtWfkR1/UK233qdl79WO04GnNzr7aoG/P+Aafbn8+5OJg2zl107WvLPYelCUKFiI18GksGbqg==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "2.8.0" + "@opentelemetry/core": "3.0.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/propagator-jaeger": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-2.8.0.tgz", - "integrity": "sha512-Xnz9zZvvQzUw+9DrOn0MomR7BxFCkA2pcfXBQuHC28ndJpSbjLs7knzYb05kw5SyCjSsEWombkZMgGcJSk8JVg==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.8.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" + "@opentelemetry/api": ">=1.0.0 <1.11.0" } }, "node_modules/@opentelemetry/redis-common": { - "version": "0.38.3", - "resolved": "https://registry.npmjs.org/@opentelemetry/redis-common/-/redis-common-0.38.3.tgz", - "integrity": "sha512-VCghU1JYs/4gP6Gqf/xro9MEsZ7LrMv2uONVsaESKL38ZOB9BqnI98FfS23wjMnHlpuE+TTaWSoAVNpTwYXzjw==", + "version": "0.39.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/redis-common/-/redis-common-0.39.0.tgz", + "integrity": "sha512-LwhsURMcyCigjnQHni9RAt0ezrVRxcb6kIE2UTbVI1cxxteeH8mTpPV7xBOVEG2GEm1GniEPLeVkXFHgiIw3xg==", "license": "Apache-2.0", "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" } }, "node_modules/@opentelemetry/resource-detector-alibaba-cloud": { - "version": "0.34.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-alibaba-cloud/-/resource-detector-alibaba-cloud-0.34.0.tgz", - "integrity": "sha512-hUs4CK7MbRfffw8y5zR4Mo37MJRR3Zt8Ub4rgMkIk7gL8jozjV7k+zwIk9grz5kGAuD406BDDIghaY8090K4Zw==", + "version": "0.39.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-alibaba-cloud/-/resource-detector-alibaba-cloud-0.39.0.tgz", + "integrity": "sha512-QRVfll/M50DqDeVawyIonXtxDBhyPiEuxtTvCuQ5t+PML7jP73p4Y9vIggAZanzdvMOKcYZfsiPmBzXUc16Oug==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/resources": "^2.0.0" + "@opentelemetry/core": "^3.0.0", + "@opentelemetry/resources": "^3.0.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.0.0" } }, "node_modules/@opentelemetry/resource-detector-aws": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-aws/-/resource-detector-aws-2.19.0.tgz", - "integrity": "sha512-ELKQCtbc7g2ghbteLftKzXvI3MkIfENrRjAaYd2h9cWNj8g/Dx3oDzpxfcv9mBigtwwWCZwQRr8R//uxREpdrg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-aws/-/resource-detector-aws-3.0.0.tgz", + "integrity": "sha512-wYUmvswkL6LzoHgu2cObFkZPLE95hkXCEmnfz+ejf0ZEHRBj1PIIudpDjldGMxxRwk0nJyDiYOoPcUPtXnIHjg==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/resources": "^2.0.0", + "@opentelemetry/core": "^3.0.0", + "@opentelemetry/resources": "^3.0.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.0.0" } }, "node_modules/@opentelemetry/resource-detector-azure": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-azure/-/resource-detector-azure-0.27.0.tgz", - "integrity": "sha512-m6HCEmK12QpEcWbKtvGpQtoDVceXtpB14AaaW/t5f6gHeLuGq1QivkuohkvKMkxgAdwIHxEQ8qof3whWBpd8JA==", + "version": "0.32.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-azure/-/resource-detector-azure-0.32.0.tgz", + "integrity": "sha512-uVtFH5rAbD0vDnmghJHCZKllhGPifVn5Cf1XZDSPEZDxB0fD3JND+a1qTyJ088RLM959P558wFqnxp1TU8RiTw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/resources": "^2.0.0", + "@opentelemetry/core": "^3.0.0", + "@opentelemetry/resources": "^3.0.0", "@opentelemetry/semantic-conventions": "^1.37.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.0.0" } }, "node_modules/@opentelemetry/resource-detector-container": { - "version": "0.8.10", - "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-container/-/resource-detector-container-0.8.10.tgz", - "integrity": "sha512-aMU2wG4ktcqy6zEotdbIkkX5ACKRxEZLX1ZlMH0dea0M2+2KfabJc1lHPqAIFaa+CD37fCION55e69QmYwqX4A==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-container/-/resource-detector-container-0.9.0.tgz", + "integrity": "sha512-FQnWEjNgAgVZ9Vd3p9yC2cqrB/vOmCm/YPUpayYIuuAiURHZHiqhR424H4j/XSVAlvgUQrrcyjgZJjJnlcoP/w==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/resources": "^2.0.0" + "@opentelemetry/core": "^3.0.0", + "@opentelemetry/resources": "^3.0.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.0.0" } }, "node_modules/@opentelemetry/resource-detector-gcp": { - "version": "0.54.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-gcp/-/resource-detector-gcp-0.54.0.tgz", - "integrity": "sha512-u+6sBzQO03QQGFhxjzFa7uNbH6iQpWTcrpWyomxuppH3AN/+1mm3DRVseS1CiRq9VBKrFO0UosWAdD7fWVUrrg==", + "version": "0.59.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/resource-detector-gcp/-/resource-detector-gcp-0.59.0.tgz", + "integrity": "sha512-zcZyAT9tkZIWCVRd84ivwNNZiBF2iW3HPe02LZfkRLfYaGzaRueh2imKjvjiwhhxpQHfWUREATk4oflVMAqr+A==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/resources": "^2.0.0", + "@opentelemetry/core": "^3.0.0", + "@opentelemetry/resources": "^3.0.0", "gcp-metadata": "^8.0.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.0.0" } }, "node_modules/@opentelemetry/resources": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.8.0.tgz", - "integrity": "sha512-qmXQ27ilDbUK/vGMqwL8D4/rhn76C+sherM4wTbjlfknR8Nvfc/hCxjRJPhkzZzUsPiNg16SA31NxMabwttRjg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-3.0.0.tgz", + "integrity": "sha512-4762KVmlDroRIt+4Ra8AnwcQqdXlkAR55jDrhzna8bzhJx1mUzvHW/Lh/OemFuY9+ouM4xaDc6CbUmoJmM6BFg==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "2.8.0", + "@opentelemetry/core": "3.0.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" + "@opentelemetry/api": ">=1.10.0 <1.11.0" } }, "node_modules/@opentelemetry/sdk-logs": { - "version": "0.219.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.219.0.tgz", - "integrity": "sha512-s6lTKRakaPClvKoWHRChxnXjDMkM/TQ30ff78jN6EBGf7MI7VzANE5PU3f4z9qDUudWjvZjOLHG0rBnBKYvoXA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-3.0.0.tgz", + "integrity": "sha512-IysNZWrBk2PqYw4qU9PZcC7pjrZLa+KLk7vcLmPPNBUr97MgeamWhX0DUHsmxwJv3dnjYM6mLRmP8mw69ld+dA==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "0.219.0", - "@opentelemetry/core": "2.8.0", - "@opentelemetry/resources": "2.8.0", + "@opentelemetry/core": "3.0.0", + "@opentelemetry/resources": "3.0.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { - "@opentelemetry/api": ">=1.4.0 <1.10.0" + "@opentelemetry/api": ">=1.10.0 <1.11.0" } }, "node_modules/@opentelemetry/sdk-metrics": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.8.0.tgz", - "integrity": "sha512-UDBGaj6W0Rgy5rTTaoxs8gVGF/aGkAKyjurJv7se6wjRxJu7FoquTLT/vt54DZfo4crbprYfhX/SOK9+BPw1qg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-3.0.0.tgz", + "integrity": "sha512-YozyS2rIlizvUNLZwcWxH0x2FhX02/mcZwzM8hsl8yvQk+xeKmAc7vcSieWiO4oSwIB20B8eS/zwdopAd/J5zQ==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "2.8.0", - "@opentelemetry/resources": "2.8.0" + "@opentelemetry/core": "3.0.0", + "@opentelemetry/resources": "3.0.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { - "@opentelemetry/api": ">=1.9.0 <1.10.0" + "@opentelemetry/api": ">=1.10.0 <1.11.0" } }, "node_modules/@opentelemetry/sdk-node": { - "version": "0.219.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.219.0.tgz", - "integrity": "sha512-NWLpWLEb8gV3+JBHYoIrktbM385wyHpRJoh3J/4Q52d4PR+AlPMNGJT3DzBUrDSUEVbKAXoHR+EDAPxtiNcj8g==", + "version": "0.300.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-node/-/sdk-node-0.300.0.tgz", + "integrity": "sha512-yRaNP91ilq0m5fBCXSo7ZTR1NDd/GPu02uq0Rur2kMw7VheHwkV8i68oYt4/vM+eofRFKYCGS5B2QrgcZS/rmw==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/api-logs": "0.219.0", - "@opentelemetry/configuration": "0.219.0", - "@opentelemetry/context-async-hooks": "2.8.0", - "@opentelemetry/core": "2.8.0", - "@opentelemetry/exporter-logs-otlp-grpc": "0.219.0", - "@opentelemetry/exporter-logs-otlp-http": "0.219.0", - "@opentelemetry/exporter-logs-otlp-proto": "0.219.0", - "@opentelemetry/exporter-metrics-otlp-grpc": "0.219.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.219.0", - "@opentelemetry/exporter-metrics-otlp-proto": "0.219.0", - "@opentelemetry/exporter-prometheus": "0.219.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.219.0", - "@opentelemetry/exporter-trace-otlp-http": "0.219.0", - "@opentelemetry/exporter-trace-otlp-proto": "0.219.0", - "@opentelemetry/exporter-zipkin": "2.8.0", - "@opentelemetry/instrumentation": "0.219.0", - "@opentelemetry/otlp-exporter-base": "0.219.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.219.0", - "@opentelemetry/propagator-b3": "2.8.0", - "@opentelemetry/propagator-jaeger": "2.8.0", - "@opentelemetry/resources": "2.8.0", - "@opentelemetry/sdk-logs": "0.219.0", - "@opentelemetry/sdk-metrics": "2.8.0", - "@opentelemetry/sdk-trace-base": "2.8.0", - "@opentelemetry/sdk-trace-node": "2.8.0", + "@opentelemetry/configuration": "0.300.0", + "@opentelemetry/context-async-hooks": "3.0.0", + "@opentelemetry/core": "3.0.0", + "@opentelemetry/exporter-logs-otlp-grpc": "0.300.0", + "@opentelemetry/exporter-logs-otlp-http": "0.300.0", + "@opentelemetry/exporter-logs-otlp-proto": "0.300.0", + "@opentelemetry/exporter-metrics-otlp-grpc": "0.300.0", + "@opentelemetry/exporter-metrics-otlp-http": "0.300.0", + "@opentelemetry/exporter-metrics-otlp-proto": "0.300.0", + "@opentelemetry/exporter-prometheus": "0.300.0", + "@opentelemetry/exporter-trace-otlp-grpc": "0.300.0", + "@opentelemetry/exporter-trace-otlp-http": "0.300.0", + "@opentelemetry/exporter-trace-otlp-proto": "0.300.0", + "@opentelemetry/exporter-zipkin": "3.0.0", + "@opentelemetry/instrumentation": "0.300.0", + "@opentelemetry/otlp-exporter-base": "0.300.0", + "@opentelemetry/otlp-grpc-exporter-base": "0.300.0", + "@opentelemetry/propagator-b3": "3.0.0", + "@opentelemetry/resources": "3.0.0", + "@opentelemetry/sdk-logs": "3.0.0", + "@opentelemetry/sdk-metrics": "3.0.0", + "@opentelemetry/sdk-trace": "3.0.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" + "@opentelemetry/api": ">=1.10.0 <1.11.0" } }, - "node_modules/@opentelemetry/sdk-trace-base": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.8.0.tgz", - "integrity": "sha512-mhU4jp+vW0mGbFRd+GeXHvmfA4aDqWjBjLC3pE5XMpLs0IE2ryYb019Ts2AQrOq67gaTF25D91+fgvEHDZEnuQ==", + "node_modules/@opentelemetry/sdk-trace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace/-/sdk-trace-3.0.0.tgz", + "integrity": "sha512-4T0DbDGdtsjNmYK5/lNalHro4fsMZ0UZ3JE+C8fcqYP25xaJC22FHg8kdJNJ21srjJY5XoT7WNFCtj88NNTl4Q==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "2.8.0", - "@opentelemetry/resources": "2.8.0", + "@opentelemetry/core": "3.0.0", + "@opentelemetry/resources": "3.0.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-trace-node": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-2.8.0.tgz", - "integrity": "sha512-nZt9OGufioAc3AfoLTqA9bsAeaMJAictYDdI2VcNQ+PmT+3rfKjAZDZvgPfd8VPX0O5Bw1hdQF6kDK8VSpZiWg==", - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/context-async-hooks": "2.8.0", - "@opentelemetry/core": "2.8.0", - "@opentelemetry/sdk-trace-base": "2.8.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" + "@opentelemetry/api": ">=1.10.0 <1.11.0" } }, "node_modules/@opentelemetry/semantic-conventions": { - "version": "1.41.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.41.1.tgz", - "integrity": "sha512-/UhIkaZgPutTFmQ7RnIJGgDXZmtEJ7Dvi86xNTFWcnRxVRNk/aotsqDJYeEvDP+FSMB2SdW+pQzNMcWP0rwuNA==", + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.43.0.tgz", + "integrity": "sha512-eSYWTm620tTk45EKSedaUL8MFYI8hW164hIXsgIHyxu3VobUB3fFCu5t0hQby6OoWRPsG1KkKUG2M5UadiLiVg==", "license": "Apache-2.0", "engines": { "node": ">=14" } }, "node_modules/@opentelemetry/sql-common": { - "version": "0.42.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sql-common/-/sql-common-0.42.0.tgz", - "integrity": "sha512-nwUwUU+8O8a4bnLqk6CodWeegGMEANgC94KTAhXcpGWLrW/2/hek/0ajNbjXnSOoNuCX+nteUPs46HFHhou9Xw==", + "version": "0.43.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sql-common/-/sql-common-0.43.0.tgz", + "integrity": "sha512-r5FfJFAbRIW+7YkXkD8XBEuExf1RyesrLrzyB1If/hTqxEAUaGPZihgrPLPX+UFq4b20YtHDmFBptNffPAJXjQ==", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/core": "^2.0.0" + "@opentelemetry/core": "^3.0.0" }, "engines": { - "node": "^18.19.0 || >=20.6.0" + "node": ">=22.15.0" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0" @@ -4014,26 +4021,26 @@ } }, "node_modules/@pkgr/core": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.9.tgz", - "integrity": "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.3.6.tgz", + "integrity": "sha512-SEeaJLb3qBNF/OaXnaR1NmmBbFYk1zC0ZH/52fATcRPLFg/p791YrcyFFy44Bo9sLaGuSuLp5Q6axbb/O+v/RA==", "dev": true, "license": "MIT", "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + "node": "^14.18.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/pkgr" } }, "node_modules/@playwright/test": { - "version": "1.62.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.62.1.tgz", - "integrity": "sha512-DTcUc8qii+cpHvtOwggMtBRMjKZHXYWdw8syRYu2vtzuq4Wxphqq4NfCs5Zt44L6mA8rfDfj+PHnxFc/FeK6mQ==", + "version": "1.64.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.64.1.tgz", + "integrity": "sha512-IaYGml/nSOiZWROfPtuIL7neuu9qDOZ3TNvNljUIrhDMxiGTgPjzj/g9p9RxpS2tSepPDRY+UwAaEeiKtUvIAg==", "dev": true, "license": "Apache-2.0", "dependencies": { - "playwright": "1.62.1" + "playwright": "1.64.1" }, "bin": { "playwright": "cli.js" @@ -4139,9 +4146,9 @@ "license": "BSD-3-Clause" }, "node_modules/@protobufjs/utf8": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.1.tgz", - "integrity": "sha512-oOAWABowe8EAbMyWKM0tYDKi8Yaox52D+HWZhAIJqQXbqe0xI/GV7FhLWqlEKreMkfDjshR5FKgi3mnle0h6Eg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.2.tgz", + "integrity": "sha512-b1UQwcEZ4yCnMCD8DAL1VlbvBJE9/IX4FTIp7BG1xYpf29SLazLSrqUkj4w7Y5y7cCVP6E5tcqqcI0xemPkHug==", "license": "BSD-3-Clause" }, "node_modules/@rollup/plugin-babel": { @@ -4628,9 +4635,9 @@ ] }, "node_modules/@sinclair/typebox": { - "version": "0.34.49", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.49.tgz", - "integrity": "sha512-brySQQs7Jtn0joV8Xh9ZV/hZb9Ozb0pmazDIASBkYKCjXrXU3mpcFahmK/z4YDhGkQvP9mWJbVyahdtU5wQA+A==", + "version": "0.34.52", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.52.tgz", + "integrity": "sha512-XiMQh7qqVlxZzcVD+kkGMNGMzcTrDMLWI7S4x7z1MkCkbDPrekpZXEUK0eZqZFMuHQg2a2DZOcDIh9o5v3Gonw==", "dev": true, "license": "MIT" }, @@ -4883,6 +4890,66 @@ "node": ">=14.0.0" } }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/core": { + "version": "1.11.1", + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.2", + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/runtime": { + "version": "1.11.1", + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/wasi-threads": { + "version": "1.2.2", + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": { + "version": "1.1.4", + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1", + "@emnapi/runtime": "^1.7.1" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@tybys/wasm-util": { + "version": "0.10.2", + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/tslib": { + "version": "2.8.1", + "inBundle": true, + "license": "0BSD", + "optional": true + }, "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { "version": "4.3.3", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.3.tgz", @@ -4945,9 +5012,10 @@ } }, "node_modules/@tybys/wasm-util": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.2.tgz", - "integrity": "sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.4.tgz", + "integrity": "sha512-W3c4gRigFS0T/Ma4qIYF3GDAc5AQdHb1yL5znJT1Zv1YaD9Kitx656wBjvr19qbiosmZT8lWDM5BEMynUqX65A==", + "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -4958,13 +5026,14 @@ "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, "license": "0BSD", "optional": true }, "node_modules/@types/aws-lambda": { - "version": "8.10.162", - "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.162.tgz", - "integrity": "sha512-Fn658grtLOci1oxi1391vvDWJRKNGWRSqfxRkmN/Iy3c0tQH1USMKEXcPYHLvope+ZgTFocx9FRQJx1muBL6qw==", + "version": "8.10.164", + "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.164.tgz", + "integrity": "sha512-XOnrazWcOd6yWPnR7DxqCBPPYciDjHq+NN8LPwwqBCJNXLyPJgKo47fZpJ113+oyAn9Zti0Cf6H4k6yPcE3WFg==", "license": "MIT" }, "node_modules/@types/babel__core": { @@ -5008,15 +5077,6 @@ "@babel/types": "^7.20.7" } }, - "node_modules/@types/bunyan": { - "version": "1.8.11", - "resolved": "https://registry.npmjs.org/@types/bunyan/-/bunyan-1.8.11.tgz", - "integrity": "sha512-758fRH7umIMk5qt5ELmRMff4mLDlN+xyYzC+dkPTdKwbSkJFvz6xwyScrytPU0QIBbRRwbiE8/BIg8bpajerNQ==", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/connect": { "version": "3.4.38", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", @@ -5075,15 +5135,6 @@ "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", "dev": true }, - "node_modules/@types/mysql": { - "version": "2.15.27", - "resolved": "https://registry.npmjs.org/@types/mysql/-/mysql-2.15.27.tgz", - "integrity": "sha512-YfWiV16IY0OeBfBCk8+hXKmdTKrKlwKN1MNKAPBu5JYxLwBEZl7QzeEpGnlZb3VMGJrrGmB84gXiH+ofs/TezA==", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/node": { "version": "20.13.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.13.0.tgz", @@ -5098,15 +5149,6 @@ "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", "dev": true }, - "node_modules/@types/oracledb": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/@types/oracledb/-/oracledb-6.5.2.tgz", - "integrity": "sha512-kK1eBS/Adeyis+3OlBDMeQQuasIDLUYXsi2T15ccNJ0iyUpQ4xDF7svFu3+bGVrI0CMBUclPciz+lsQR3JX3TQ==", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/pg": { "version": "8.15.6", "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.15.6.tgz", @@ -5141,15 +5183,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/tedious": { - "version": "4.0.14", - "resolved": "https://registry.npmjs.org/@types/tedious/-/tedious-4.0.14.tgz", - "integrity": "sha512-KHPsfX/FoVbUGbyYvk1q9MMQHLPeRZhRJZdO45Q4YjvFkv4hMNghCWTvy7rdKessBsmtz4euWCWAB6/tVpI1Iw==", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/trusted-types": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", @@ -5175,16 +5208,16 @@ "license": "MIT" }, "node_modules/@ungap/structured-clone": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.1.tgz", - "integrity": "sha512-mUFwbeTqrVgDQxFveS+df2yfap6iuP20NAKAsBt5jDEoOTDew+zwLAOilHCeQJOVSvmgCX4ogqIrA0mnyr08yQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.4.0.tgz", + "integrity": "sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==", "dev": true, "license": "ISC" }, "node_modules/@unrs/resolver-binding-android-arm-eabi": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.11.1.tgz", - "integrity": "sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.12.2.tgz", + "integrity": "sha512-g5T90pqg1bo/7mytQx6F4iBNC0Wsh9cu+z9veDbFjc7HjpesJFWD7QMS0NGStXM075+7dJPPVvBbpZlnrdpi/w==", "cpu": [ "arm" ], @@ -5196,9 +5229,9 @@ ] }, "node_modules/@unrs/resolver-binding-android-arm64": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.11.1.tgz", - "integrity": "sha512-lCxkVtb4wp1v+EoN+HjIG9cIIzPkX5OtM03pQYkG+U5O/wL53LC4QbIeazgiKqluGeVEeBlZahHalCaBvU1a2g==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.12.2.tgz", + "integrity": "sha512-YGCRZv/9GLhwmz6mYDeTsm/92BAyR28l6c2ReweVW5pWgfsitWLY8upvfRlGdoyD8HjeTHSYJWyZGD4KJA/nFQ==", "cpu": [ "arm64" ], @@ -5210,9 +5243,9 @@ ] }, "node_modules/@unrs/resolver-binding-darwin-arm64": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.11.1.tgz", - "integrity": "sha512-gPVA1UjRu1Y/IsB/dQEsp2V1pm44Of6+LWvbLc9SDk1c2KhhDRDBUkQCYVWe6f26uJb3fOK8saWMgtX8IrMk3g==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.12.2.tgz", + "integrity": "sha512-u9DiNT1auQMO20A9SyTuG3wUgQWB9Z7KjAg0uFuCDR1FsAY8A0CG2S6JpHS1xwm/w1G08bjXZDcyOCjv1WAm2w==", "cpu": [ "arm64" ], @@ -5224,9 +5257,9 @@ ] }, "node_modules/@unrs/resolver-binding-darwin-x64": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.11.1.tgz", - "integrity": "sha512-cFzP7rWKd3lZaCsDze07QX1SC24lO8mPty9vdP+YVa3MGdVgPmFc59317b2ioXtgCMKGiCLxJ4HQs62oz6GfRQ==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.12.2.tgz", + "integrity": "sha512-f7rPLi/T1HVKZu/u6t87lroib16n8vrSzcyxI7lg4BGO9UF26KhQL44sd9eOUgrTYhvRXtWOIZT5PejdPyJfUA==", "cpu": [ "x64" ], @@ -5238,9 +5271,9 @@ ] }, "node_modules/@unrs/resolver-binding-freebsd-x64": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.11.1.tgz", - "integrity": "sha512-fqtGgak3zX4DCB6PFpsH5+Kmt/8CIi4Bry4rb1ho6Av2QHTREM+47y282Uqiu3ZRF5IQioJQ5qWRV6jduA+iGw==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.12.2.tgz", + "integrity": "sha512-BpcOjWCJub6nRZUS2zA20pmLvjtqAtGejETaIyRLiZiQf++cbrjltLA5NN/xaXfqeOBOSlMFbemIl5/S5tljmg==", "cpu": [ "x64" ], @@ -5252,9 +5285,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.11.1.tgz", - "integrity": "sha512-u92mvlcYtp9MRKmP+ZvMmtPN34+/3lMHlyMj7wXJDeXxuM0Vgzz0+PPJNsro1m3IZPYChIkn944wW8TYgGKFHw==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.12.2.tgz", + "integrity": "sha512-vZTDvdSISZjJx66OzJqtsOhzifbqRjbmI1Mnu49fQDwog5GtDI4QidRiEAYbZCRj9C8YZEW+3ZjqsyS9GR4k2A==", "cpu": [ "arm" ], @@ -5266,9 +5299,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.11.1.tgz", - "integrity": "sha512-cINaoY2z7LVCrfHkIcmvj7osTOtm6VVT16b5oQdS4beibX2SYBwgYLmqhBjA1t51CarSaBuX5YNsWLjsqfW5Cw==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.12.2.tgz", + "integrity": "sha512-BiPI+IrIlwcW4nLLMM21+B1dFPzd55yAVgVGrdgDjNef+ch03GdxrcyaIz8X9SsQirh/kCQ7mviyWlMxdh2D7g==", "cpu": [ "arm" ], @@ -5280,9 +5313,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-arm64-gnu": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.11.1.tgz", - "integrity": "sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.12.2.tgz", + "integrity": "sha512-zJc0H99FEPoFfSrNpa91HYfxzfAJCr502oxNK1cfdC9hlaFI43RT+JFCann9JUgZmLzzntChHyn13Sgn9ljHNg==", "cpu": [ "arm64" ], @@ -5294,9 +5327,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-arm64-musl": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.11.1.tgz", - "integrity": "sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.12.2.tgz", + "integrity": "sha512-KQ3Lki6l+Pz1k/eBipN41ES+YUK30beLGb9YqcB1O542cyLCNE6GaxrfcY3T6EezmGGk84wb5XyO9loTM9tkcA==", "cpu": [ "arm64" ], @@ -5307,10 +5340,38 @@ "linux" ] }, + "node_modules/@unrs/resolver-binding-linux-loong64-gnu": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-gnu/-/resolver-binding-linux-loong64-gnu-1.12.2.tgz", + "integrity": "sha512-3SJGEh1DborhG6pyxvhPzCT4bbSIVihsvgJc13P1bHG7KLdNDaF9T3gsTwFc7Jw/5Y5/iWOjkEx7Zy0NvCGX3Q==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-loong64-musl": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-musl/-/resolver-binding-linux-loong64-musl-1.12.2.tgz", + "integrity": "sha512-jiuG/Obbel7uw1PwHNFfrkiKhLAF6mnyZ6aWlOAVN9WqKm8v0OFGnciJIHu8+CMvXLQ8AD51LPzAoUfT21D5Ew==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.11.1.tgz", - "integrity": "sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.12.2.tgz", + "integrity": "sha512-q7xRvVpmcfeL+LlZg8Pbbo6QaTZwDU5BaGZbwfhkEsXJn3Was8xYfE0RBH266xZt0rM6B7i8xAYIvjthuUIWHg==", "cpu": [ "ppc64" ], @@ -5322,9 +5383,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-riscv64-gnu": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.11.1.tgz", - "integrity": "sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.12.2.tgz", + "integrity": "sha512-0CVdx6lcnT3Q9inOH8tsMIOJ6ImndllMjqJHg8RLVdB7Vq4SfkEXl9mCSsVNuNA4MCYycRicCUxPCabVHJRr6A==", "cpu": [ "riscv64" ], @@ -5336,9 +5397,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-riscv64-musl": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.11.1.tgz", - "integrity": "sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.12.2.tgz", + "integrity": "sha512-iOwlRo9vnp6R6ohHQS11n0NnfdXx/omhkocmIfaPRpQhKZ+3BDMkkdRVh53qjkFkpPddf+FETA28NwGN7l5l+w==", "cpu": [ "riscv64" ], @@ -5350,9 +5411,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-s390x-gnu": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.11.1.tgz", - "integrity": "sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.12.2.tgz", + "integrity": "sha512-HYJtLfXq94q8iZNFT1lknx258wlkkWhZeUXJRqzKBBUJ00CvZ+N33zgbCqimLjsyw5Va6uUxhVa12mI+kaveEw==", "cpu": [ "s390x" ], @@ -5364,9 +5425,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-x64-gnu": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.11.1.tgz", - "integrity": "sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.12.2.tgz", + "integrity": "sha512-mPsUhunKKDih5O96Y6enDQyHc1SqBPlY1E/SfMWDM3EdJ95Z9CArPeCVwCCqbP45ljvivdEk8Fxn+SIb1rDAJQ==", "cpu": [ "x64" ], @@ -5378,9 +5439,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-x64-musl": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.11.1.tgz", - "integrity": "sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.12.2.tgz", + "integrity": "sha512-azrt6+5ydLd8Vt210AAFis/lZevSfPw93EJRIJG+xPu4WCJ8K0kppCTpMyLPcKT7H15M4Jnt2tMp5bOvCkRC6A==", "cpu": [ "x64" ], @@ -5391,10 +5452,24 @@ "linux" ] }, + "node_modules/@unrs/resolver-binding-openharmony-arm64": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-openharmony-arm64/-/resolver-binding-openharmony-arm64-1.12.2.tgz", + "integrity": "sha512-YZ9hP4O0X9PQb8eO980qmLNGH4zT3I9+SZTdt0Pr0YyuGQhYKoOZkV02VzrzyOZJ5xIJ3UFIenKkUkGg8GjgWQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, "node_modules/@unrs/resolver-binding-wasm32-wasi": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.11.1.tgz", - "integrity": "sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.12.2.tgz", + "integrity": "sha512-tYFDIkMxSflfEc/h92ZWNsZlHSwgimbNHSO3PL2JWQHfCuC2q316jMyYU9TIWZsFK2bQwyK5VAdYgn8ygPj69A==", "cpu": [ "wasm32" ], @@ -5402,16 +5477,18 @@ "license": "MIT", "optional": true, "dependencies": { - "@napi-rs/wasm-runtime": "^0.2.11" + "@emnapi/core": "1.10.0", + "@emnapi/runtime": "1.10.0", + "@napi-rs/wasm-runtime": "^1.1.4" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@unrs/resolver-binding-win32-arm64-msvc": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.11.1.tgz", - "integrity": "sha512-nRcz5Il4ln0kMhfL8S3hLkxI85BXs3o8EYoattsJNdsX4YUU89iOkVn7g0VHSRxFuVMdM4Q1jEpIId1Ihim/Uw==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.12.2.tgz", + "integrity": "sha512-qzNyg3xL0VPQmCaUh+N5jSitce6k+uCBfMDesWRnlULOZaqUkaJ0ybdT+UqlAWJoQjuqfIU/0Ptx9bteN4D82g==", "cpu": [ "arm64" ], @@ -5423,9 +5500,9 @@ ] }, "node_modules/@unrs/resolver-binding-win32-ia32-msvc": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.11.1.tgz", - "integrity": "sha512-DCEI6t5i1NmAZp6pFonpD5m7i6aFrpofcp4LA2i8IIq60Jyo28hamKBxNrZcyOwVOZkgsRp9O2sXWBWP8MnvIQ==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.12.2.tgz", + "integrity": "sha512-WD9sY00OfpHVGfsnHZoA8jVT+esS/Bg8z8jzxp5BnDCjjwsuKsPQrzswwpFy4J1AUJbXPRfkpcX0mXrzeXW79g==", "cpu": [ "ia32" ], @@ -5437,9 +5514,9 @@ ] }, "node_modules/@unrs/resolver-binding-win32-x64-msvc": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.11.1.tgz", - "integrity": "sha512-lrW200hZdbfRtztbygyaq/6jP6AKE8qQN2KvPcJ+x7wiD038YtnYtZ82IMNJ69GJibV7bwL3y9FgK+5w/pYt6g==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.12.2.tgz", + "integrity": "sha512-nAB74NfSNKknqQ1RrYj6uz8FcXEomu/MATJZxh/x+BArzN2U3JbOYC0APYzUIGhVY3m5hRxA8VPNdPBoG8txlA==", "cpu": [ "x64" ], @@ -5454,7 +5531,7 @@ "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", - "peer": true, + "dev": true, "bin": { "acorn": "bin/acorn" }, @@ -5462,15 +5539,6 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-import-attributes": { - "version": "1.9.5", - "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", - "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", - "license": "MIT", - "peerDependencies": { - "acorn": "^8" - } - }, "node_modules/agent-base": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", @@ -5486,7 +5554,6 @@ "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -5664,9 +5731,9 @@ } }, "node_modules/autoprefixer": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.5.0.tgz", - "integrity": "sha512-FMhOoZV4+qR6aTUALKX2rEqGG+oyATvwBt9IIzVR5rMa2HRWPkxf+P+PAJLD1I/H5/II+HuZcBJYEFBpq39ong==", + "version": "10.6.1", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.6.1.tgz", + "integrity": "sha512-cL1Qz6ADZhcEbny/8HPfe99J6HhNoYtpX2LFLIbhgGE7Q1hlQVkYFdetDN7Id3KiQxhDrHwzlHr/YQCnZ8+xSA==", "dev": true, "funding": [ { @@ -5684,8 +5751,8 @@ ], "license": "MIT", "dependencies": { - "browserslist": "^4.28.2", - "caniuse-lite": "^1.0.30001787", + "browserslist": "^4.28.9", + "caniuse-lite": "^1.0.30001810", "fraction.js": "^5.3.4", "picocolors": "^1.1.1", "postcss-value-parser": "^4.2.0" @@ -5717,16 +5784,16 @@ } }, "node_modules/babel-jest": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-30.4.1.tgz", - "integrity": "sha512-fATAbM8piYxkiXQp3RBXmZHxZVNJZAVXXfyeyCN2Tida3+qJ8ea9UxhiJ2y4fLO90ZImKt6k9FlcH2+rLkJGhw==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-30.5.2.tgz", + "integrity": "sha512-ES8WeJ2fNWPEDunyAtUfJ12nHyaWUloCHdkfK2oW5uSoQSUmjNKdWiGaXJITJwvFEWoD/evHEg/QoCXAvLaQqQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/transform": "30.4.1", + "@jest/transform": "30.5.2", "@types/babel__core": "^7.20.5", - "babel-plugin-istanbul": "^7.0.1", - "babel-preset-jest": "30.4.0", + "babel-plugin-istanbul": "^8.0.0", + "babel-preset-jest": "30.5.0", "chalk": "^4.1.2", "graceful-fs": "^4.2.11", "slash": "^3.0.0" @@ -5739,9 +5806,9 @@ } }, "node_modules/babel-plugin-istanbul": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-7.0.1.tgz", - "integrity": "sha512-D8Z6Qm8jCvVXtIRkBnqNHX0zJ37rQcFJ9u8WOS6tkYOsRdHBzypCstaxWiu5ZIlqQtviRYbgnRLSoCEvjqcqbA==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-8.0.0.tgz", + "integrity": "sha512-18wCskrN3DgbuBmp1gr7LBGT8xdz5xhQQqFvFhVxbkl8VBCrMKQ2YtqBWtUal1Zrc1HTuX0011+Brjw78TCFkg==", "dev": true, "license": "BSD-3-Clause", "workspaces": [ @@ -5752,16 +5819,16 @@ "@istanbuljs/load-nyc-config": "^1.0.0", "@istanbuljs/schema": "^0.1.3", "istanbul-lib-instrument": "^6.0.2", - "test-exclude": "^6.0.0" + "test-exclude": "^7.0.1" }, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/babel-plugin-jest-hoist": { - "version": "30.4.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-30.4.0.tgz", - "integrity": "sha512-9EdtWM/sSfXLOGLwSn+GS6pIXyBnL07/8gyJlwFXjWy4DxMOyItqyUT29d4lQiS380EZwYlX7/At4PgBS+m2aA==", + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-30.5.0.tgz", + "integrity": "sha512-gtGo1B+u14jrZQv6TdSWIWkTqclboo7Qn+dFAGUOIuXLFuJKAdg3U5MIWzZnW4vfUb4dX9skmAMiby86e/SF4A==", "dev": true, "license": "MIT", "dependencies": { @@ -5841,20 +5908,20 @@ } }, "node_modules/babel-preset-jest": { - "version": "30.4.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-30.4.0.tgz", - "integrity": "sha512-lBY4jxsNmCnSiu7kquw8ZC9F4+XLMOKypT3RnNHPvU2Kpd4W0xaPuLr5ZkRyOsvLYAY4yaW1ZwTW4xB7NIiZzg==", + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-30.5.0.tgz", + "integrity": "sha512-ZGPn5ClP4lBDpuOK8W1yQIOy359HmbnZv3suucAlIe+SEE9yDsxV4S2PjSbH2Vc97U+WmzYD7vw3kr8NsQ/i6w==", "dev": true, "license": "MIT", "dependencies": { - "babel-plugin-jest-hoist": "30.4.0", + "babel-plugin-jest-hoist": "30.5.0", "babel-preset-current-node-syntax": "^1.2.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" }, "peerDependencies": { - "@babel/core": "^7.11.0 || ^8.0.0-beta.1" + "@babel/core": "^7.11.0 || ^8.0.0-beta.1 || ^8.0.0" } }, "node_modules/balanced-match": { @@ -5891,9 +5958,9 @@ ] }, "node_modules/baseline-browser-mapping": { - "version": "2.11.21", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.21.tgz", - "integrity": "sha512-uh8vpY/1/YyFkunIDFH/12p7/7VdPKA1hejMVEbdkEaWnUz0Hesvx5EbiU6XxjyHZIOju+ZMbQJkRh+es3/spQ==", + "version": "2.11.33", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.33.tgz", + "integrity": "sha512-yiVKDX+qCMRKBE084lXvq9EcwFUhKZ2nU8TK1EQQuOgPNR/lmbGxXOeDdlGUqC2Zz11Cs9rk1d/8NfgBmlkt0w==", "dev": true, "license": "Apache-2.0", "bin": { @@ -6083,9 +6150,9 @@ } }, "node_modules/brace-expansion": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz", - "integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==", + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.7.tgz", + "integrity": "sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -6103,9 +6170,9 @@ } }, "node_modules/browserslist": { - "version": "4.28.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz", - "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==", + "version": "4.29.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.29.4.tgz", + "integrity": "sha512-2TcbbiwXEq+N0kD36tykpCfyyQigUXmuwNQbnPp4Xk4PX9JOqVIKjJlIDjpH7uY6tmRGoAd+apeT1p60T8wsdA==", "dev": true, "funding": [ { @@ -6122,13 +6189,12 @@ } ], "license": "MIT", - "peer": true, "dependencies": { - "baseline-browser-mapping": "^2.10.12", - "caniuse-lite": "^1.0.30001782", - "electron-to-chromium": "^1.5.328", - "node-releases": "^2.0.36", - "update-browserslist-db": "^1.2.3" + "baseline-browser-mapping": "^2.11.29", + "caniuse-lite": "^1.0.30001816", + "electron-to-chromium": "^1.5.459", + "node-releases": "^2.0.59", + "update-browserslist-db": "^1.3.4" }, "bin": { "browserslist": "cli.js" @@ -6138,11 +6204,11 @@ } }, "node_modules/bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.2.tgz", + "integrity": "sha512-V2o8YS2EhrKMO9AumnkK0ynynfFlsajpYupwq7S46H5mhcanwxDkNTw3K67wPIcKTH1ffkA4vhMOtAc7gRmPZw==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "dependencies": { "node-int64": "^0.4.0" } @@ -6264,9 +6330,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001791", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001791.tgz", - "integrity": "sha512-yk0l/YSrOnFZk3UROpDLQD9+kC1l4meK/wed583AXrzoarMGJcbRi2Q4RaUYbKxYAsZ8sWmaSa/DsLmdBeI1vQ==", + "version": "1.0.30001819", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001819.tgz", + "integrity": "sha512-LFUqIIAwpzsIuevnKnsR9qnStBcgzPShTX61lBwN9uFkkf8o8zLiebEjbW8AYtZiF+1YKDWfdt/pWDtMuG8Xwg==", "dev": true, "funding": [ { @@ -6493,13 +6559,6 @@ "node": ">=4.0.0" } }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, "node_modules/config-chain": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", @@ -6601,9 +6660,9 @@ } }, "node_modules/daisyui": { - "version": "5.7.16", - "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-5.7.16.tgz", - "integrity": "sha512-V9CJxvrWIXTDuP/0tpijjWaKaKJNYo2IrULJfTWs3/DjW9rPqswk1n8NCLQRLrTutmlG2Ech7nkJDpCnF+6Dzw==", + "version": "5.7.50", + "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-5.7.50.tgz", + "integrity": "sha512-+/LRqnTCoc7s/bJEKKwtJSwzeXCVdAmRdNmZeZzgHCaQ9PJyl7j+2V2U32GQDMyD+VDkP9e/+JGoC72Y1hLk7w==", "dev": true, "license": "MIT", "funding": { @@ -6893,9 +6952,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.349", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.349.tgz", - "integrity": "sha512-QsWVGyRuY07Aqb234QytTfwd5d9AJlfNIQ5wIOl1L+PZDzI9d9+Fn0FRale/QYlFxt/bUnB0/nLd1jFPGxGK1A==", + "version": "1.5.464", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.464.tgz", + "integrity": "sha512-nRa65aFge40viPAKxMKULIY8tcXKwKboJWNn4RoKwyWXJ6SP7BnrDGKUTzc64818jIciH0PK7LSF8QzZes19GA==", "dev": true, "license": "ISC" }, @@ -7028,6 +7087,12 @@ "node": ">= 0.4" } }, + "node_modules/es-module-lexer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-3.0.4.tgz", + "integrity": "sha512-BldNY5mwkVu+cQ5Ymn3e6hB9Sx8XHx4ZevWbiUyZbfKxJxYO27Hf0wfzkxIaD5CAJMaGl3YspKELj0ff/7nCMA==", + "license": "MIT" + }, "node_modules/es-object-atoms": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", @@ -7185,18 +7250,18 @@ } }, "node_modules/expect": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-30.4.1.tgz", - "integrity": "sha512-PMARsyh/JtqC20HoGqlFcIlQAyqUtW4PlI1rup1uhYJtKuwAjbvWi3GQMAn+STdHum/dk8xrKfUM1+5SAwpolA==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/expect/-/expect-30.5.2.tgz", + "integrity": "sha512-0LNuMvs8/5mRYhnCR4k+lGV7fqPMs6Bnksda4S3zsCUmdxBpAn4zU4NNzXdq1pMKe/H4W5t/zVIDSJ/H3e0vDA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/expect-utils": "30.4.1", - "@jest/get-type": "30.1.0", - "jest-matcher-utils": "30.4.1", - "jest-message-util": "30.4.1", - "jest-mock": "30.4.1", - "jest-util": "30.4.1" + "@jest/expect-utils": "30.5.2", + "@jest/get-type": "30.5.0", + "jest-matcher-utils": "30.5.2", + "jest-message-util": "30.5.1", + "jest-mock": "30.5.2", + "jest-util": "30.5.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" @@ -7236,9 +7301,9 @@ "dev": true }, "node_modules/fast-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz", - "integrity": "sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.9.tgz", + "integrity": "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==", "dev": true, "funding": [ { @@ -7253,13 +7318,13 @@ "license": "BSD-3-Clause" }, "node_modules/fb-watchman": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", - "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.4.tgz", + "integrity": "sha512-tGQtaoYisPDriJBN0mT5yZSyNETnJGA1gTYxaVRAE5KUO3LI9kPUc9WIu8JXcxaIci+faIKlzXqXyPgrmubtBQ==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", "dependencies": { - "bser": "2.1.1" + "bser": "2.1.2" } }, "node_modules/fetch-blob": { @@ -7448,13 +7513,6 @@ "node": ">=10" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "license": "ISC" - }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -7525,9 +7583,9 @@ } }, "node_modules/gcp-metadata": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-8.1.3.tgz", - "integrity": "sha512-ziTrzUhhpL9Zk5k0HHzgP/KIpWDJT0VMBC/ynt/QIBvTW+UUcSivQRl6VlwTf/EilDxtSWklHoRsKy1c4k+59w==", + "version": "8.1.4", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-8.1.4.tgz", + "integrity": "sha512-iJ9KMsiu+xKtNRX0PmGLSaIU3bUBAyzWTyqKemKPzNPsmmsBCQYmlNg+brEbES7IHSXtdVwzBPzx1vz3FAaipw==", "license": "Apache-2.0", "dependencies": { "gaxios": "7.1.3", @@ -8068,14 +8126,13 @@ ] }, "node_modules/import-in-the-middle": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.2.tgz", - "integrity": "sha512-LGLYRl0A2gtyUJb2WDliBHmk6TtlHwdDjxonacZ8QrEs/ZW+YDgNv2QAfjRQWpS8HqvNcq6GGnN6jrOa5FysDQ==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.5.2.tgz", + "integrity": "sha512-WseIA/4o56+GYO3RmlOPvejYi771OFeJEeK/ejROsr9bdjW+E5NXTOD1Di8TL40Qgg3JJX9aa97Hf8iiSVIKZw==", "license": "Apache-2.0", "dependencies": { - "acorn": "^8.15.0", - "acorn-import-attributes": "^1.9.5", "cjs-module-lexer": "^2.2.0", + "es-module-lexer": "^3.0.2", "module-details-from-path": "^1.0.4" }, "engines": { @@ -8121,18 +8178,6 @@ "node": ">=8" } }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", @@ -8777,9 +8822,9 @@ } }, "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.0.tgz", - "integrity": "sha512-AcM7dV/5ul4EekoQ29Agm5vri8JNqRyj39o0qpX6vDF2GZrtutZl5RwgD1XnZjiTAfncsJhMI48QQH3sN87YNA==", + "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": { @@ -8868,16 +8913,16 @@ } }, "node_modules/jest": { - "version": "30.4.2", - "resolved": "https://registry.npmjs.org/jest/-/jest-30.4.2.tgz", - "integrity": "sha512-Yi1jqNC/Oq0N4hBgNH/YvBpP1P57QqundgytzYqy3yqAa7NZPNjSoi4SGbRAXDMdBzNE6xBCi5U7RgfrvMEUVQ==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest/-/jest-30.5.2.tgz", + "integrity": "sha512-3gnpdBIza8ijCl3iMV9ChE3hSt1+46865qqod863gQtJr1DixOkAU5DoGbi3u+XlRcw++BhZQMu/y4xBdHBvSQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/core": "30.4.2", - "@jest/types": "30.4.1", + "@jest/core": "30.5.2", + "@jest/types": "30.5.1", "import-local": "^3.2.0", - "jest-cli": "30.4.2" + "jest-cli": "30.5.2" }, "bin": { "jest": "bin/jest.js" @@ -8895,14 +8940,14 @@ } }, "node_modules/jest-changed-files": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-30.4.1.tgz", - "integrity": "sha512-IuctmYrxi21iOSOaIXpJWalHyPAsVv0GeBHKDn8C1CA4W5htHn7INL+wdnL4Bo0+olEndvAFkmb++tIQJG+vvg==", + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-30.5.1.tgz", + "integrity": "sha512-0+bvMM/ENhDI29Z8q1r4HxiDIi4G5tnBmSw4esfPQoj9q8Nik7KIyuxHkTVnnniJQf05SxpGaKDQ+4h28ynGPg==", "dev": true, "license": "MIT", "dependencies": { "execa": "^5.1.1", - "jest-util": "30.4.1", + "jest-util": "30.5.1", "p-limit": "^3.1.0" }, "engines": { @@ -8910,29 +8955,29 @@ } }, "node_modules/jest-circus": { - "version": "30.4.2", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-30.4.2.tgz", - "integrity": "sha512-rvHH7VlY6LgbJXJTQ87GW62g1FntOtbhh0zT+v04kC+pgL6aBKyYINXxWukCpj3dcIBMw5/XUbtDS9dU9JTXeQ==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-30.5.2.tgz", + "integrity": "sha512-vffFgjs5JSJ9q4ds1vNW3klKYPJfYfIY61LT/zaZgvTeASJOWZUt8LBfHgIcV4rwxlPBLl/ePBGccHEclS4PlQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/environment": "30.4.1", - "@jest/expect": "30.4.1", - "@jest/test-result": "30.4.1", - "@jest/types": "30.4.1", + "@jest/environment": "30.5.2", + "@jest/expect": "30.5.2", + "@jest/test-result": "30.5.2", + "@jest/types": "30.5.1", "@types/node": "*", "chalk": "^4.1.2", "co": "^4.6.0", "dedent": "^1.6.0", "is-generator-fn": "^2.1.0", - "jest-each": "30.4.1", - "jest-matcher-utils": "30.4.1", - "jest-message-util": "30.4.1", - "jest-runtime": "30.4.2", - "jest-snapshot": "30.4.1", - "jest-util": "30.4.1", + "jest-each": "30.5.2", + "jest-matcher-utils": "30.5.2", + "jest-message-util": "30.5.1", + "jest-runtime": "30.5.2", + "jest-snapshot": "30.5.2", + "jest-util": "30.5.1", "p-limit": "^3.1.0", - "pretty-format": "30.4.1", + "pretty-format": "30.5.1", "pure-rand": "^7.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.6" @@ -8942,21 +8987,21 @@ } }, "node_modules/jest-cli": { - "version": "30.4.2", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-30.4.2.tgz", - "integrity": "sha512-jfA2ocvVHMXS2QijrJ0d31ektP+d/W0T5RpcTX2Pq+3sVqHlsXVCM2+FmwpL+bdY8OfHpIg9xMxLF17Zg0U49Q==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-30.5.2.tgz", + "integrity": "sha512-YYYxUUVjFgPvgEleKNKMaYGIFgR3l3832Cl0kRL/oCiDZ03v7wImUtquHl2OOBCCNgprjZgBN5bczS/JklPBDg==", "dev": true, "license": "MIT", "dependencies": { - "@jest/core": "30.4.2", - "@jest/test-result": "30.4.1", - "@jest/types": "30.4.1", + "@jest/core": "30.5.2", + "@jest/test-result": "30.5.2", + "@jest/types": "30.5.1", "chalk": "^4.1.2", "exit-x": "^0.2.2", "import-local": "^3.2.0", - "jest-config": "30.4.2", - "jest-util": "30.4.1", - "jest-validate": "30.4.1", + "jest-config": "30.5.2", + "jest-util": "30.5.1", + "jest-validate": "30.5.1", "yargs": "^17.7.2" }, "bin": { @@ -8975,33 +9020,33 @@ } }, "node_modules/jest-config": { - "version": "30.4.2", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-30.4.2.tgz", - "integrity": "sha512-rNHAShJQqQwFNoL0hbf3BphSBOWnpOUAKvidLS/AjNVLPfoj5mSf4jQMfW3cYOs6hXeZC7nF7mDHaBnbxELOzg==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-30.5.2.tgz", + "integrity": "sha512-U6221OZekabePvGcGPf4raIBKMvYQWFHvhobDJRojOYaFMj2HaGytAdknjDhYc6JTz2fdHW9+6k0wWUDaNeOFQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/core": "^7.27.4", - "@jest/get-type": "30.1.0", - "@jest/pattern": "30.4.0", - "@jest/test-sequencer": "30.4.1", - "@jest/types": "30.4.1", - "babel-jest": "30.4.1", + "@jest/get-type": "30.5.0", + "@jest/pattern": "30.5.0", + "@jest/test-sequencer": "30.5.2", + "@jest/types": "30.5.1", + "babel-jest": "30.5.2", "chalk": "^4.1.2", "ci-info": "^4.2.0", "deepmerge": "^4.3.1", - "glob": "^10.5.0", + "glob": "^13.0.6", "graceful-fs": "^4.2.11", - "jest-circus": "30.4.2", - "jest-docblock": "30.4.0", - "jest-environment-node": "30.4.1", - "jest-regex-util": "30.4.0", - "jest-resolve": "30.4.1", - "jest-runner": "30.4.2", - "jest-util": "30.4.1", - "jest-validate": "30.4.1", + "jest-circus": "30.5.2", + "jest-docblock": "30.5.0", + "jest-environment-node": "30.5.2", + "jest-regex-util": "30.5.0", + "jest-resolve": "30.5.1", + "jest-runner": "30.5.2", + "jest-util": "30.5.1", + "jest-validate": "30.5.1", "parse-json": "^5.2.0", - "pretty-format": "30.4.1", + "pretty-format": "30.5.1", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, @@ -9025,26 +9070,83 @@ } } }, - "node_modules/jest-diff": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.4.1.tgz", - "integrity": "sha512-CRpFK0RtLriVDGcPPAnR6HMVI8bSR2jnUIgralhauzYQZIb4RH9AtEInTuQr65LmmGggGcRT6HIASxwqsVsmlA==", + "node_modules/jest-config/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/jest-config/node_modules/brace-expansion": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", + "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/diff-sequences": "30.4.0", - "@jest/get-type": "30.1.0", + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/jest-config/node_modules/glob": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", + "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/jest-config/node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/jest-diff": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.5.2.tgz", + "integrity": "sha512-rBtHnI6BWTiWj3lM7fOLVfChx7R9B0u9VV3PRHawKs79x6ZjW1QoSrKenaigNGWlvhtoi2BqvDbABDie+Os3xQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/diff-sequences": "30.5.0", + "@jest/get-type": "30.5.0", "chalk": "^4.1.2", - "pretty-format": "30.4.1" + "pretty-format": "30.5.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-docblock": { - "version": "30.4.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-30.4.0.tgz", - "integrity": "sha512-ZPMabUZCx5MpbZ2eBYSvZ0J8fvo3dR9oM+eeUpb3aKNQFuS2tu3Duw1TNlMoP8k3WQgKGJuhcMFvwcVuq6T7oA==", + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-30.5.0.tgz", + "integrity": "sha512-NwDqcxtoZi33RhuW+zJS/RVA3rmheQ8BnwpYZuc/Eruaz6seQb7+aoCeDZu/3X7W2XmD8DbSo9Pn72DbKsBFYw==", "dev": true, "license": "MIT", "dependencies": { @@ -9055,70 +9157,384 @@ } }, "node_modules/jest-each": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-30.4.1.tgz", - "integrity": "sha512-/8MJbH6fuj48TstjrMf+u/pd06Qezz5xOXvZA6442heNOWr8bdeoGZX2d9fCn028CoMgYmroH9//zky5GfyYmA==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-30.5.2.tgz", + "integrity": "sha512-GRrW+7fmmgmkvyfEBqc1QFdWnF1Ex5yG6Y6AWL4TTxnkWlKIT98dsKh3P3UuWm6v4XsQwVE6DEzXIPMzWJ3ZbA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/get-type": "30.1.0", - "@jest/types": "30.4.1", + "@jest/get-type": "30.5.0", + "@jest/types": "30.5.1", "chalk": "^4.1.2", - "jest-util": "30.4.1", - "pretty-format": "30.4.1" + "jest-regex-util": "30.5.0", + "jest-util": "30.5.1", + "pretty-format": "30.5.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-environment-node": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-30.4.1.tgz", - "integrity": "sha512-4FZYVOk85hz2AyT6BbarKy9u37g6DbrDyCdFhsnDdXqyrueYQvB+0zO4f/kqLCRD0BsPRXPMNJeQwihKZV8naw==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-30.5.2.tgz", + "integrity": "sha512-Ciz4KgTGIbojxSKpuFImgWJj5EyqfE8xMq9NxWmOXnQywHHS03H9Mv+vaCB29J5pr3JBrY27WbRV18rBdjh8Dg==", "dev": true, "license": "MIT", "dependencies": { - "@jest/environment": "30.4.1", - "@jest/fake-timers": "30.4.1", - "@jest/types": "30.4.1", + "@jest/environment": "30.5.2", + "@jest/fake-timers": "30.5.2", + "@jest/types": "30.5.1", "@types/node": "*", - "jest-mock": "30.4.1", - "jest-util": "30.4.1", - "jest-validate": "30.4.1" + "jest-mock": "30.5.2", + "jest-util": "30.5.1", + "jest-validate": "30.5.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-haste-map": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-30.4.1.tgz", - "integrity": "sha512-rFrcONd8jeFsyw+Z9CrScJgglRf2+NFmNam8dKu7n+SoHqNYT47mn0DdEcVUZJpvh7Iz6/si7f7yUH7GJHVgnw==", + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-30.5.1.tgz", + "integrity": "sha512-VIFgt67jW480YDxKfEv9IYQKrFpYt7bOCMn3VsnjK7AK9qo7p6acpnA1DHwsVOULE3dTaYew/6JaTD/d0VDHoQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "30.4.1", + "@jest/types": "30.5.1", + "@parcel/watcher": "^2.6.0", "@types/node": "*", "anymatch": "^3.1.3", "fb-watchman": "^2.0.2", + "fdir": "^6.5.0", "graceful-fs": "^4.2.11", - "jest-regex-util": "30.4.0", - "jest-util": "30.4.1", - "jest-worker": "30.4.1", - "picomatch": "^4.0.3", - "walker": "^1.0.8" + "jest-regex-util": "30.5.0", + "jest-util": "30.5.1", + "jest-worker": "30.5.1", + "picomatch": "^4.0.3" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-haste-map/node_modules/@parcel/watcher": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.6.0.tgz", + "integrity": "sha512-7FNeNl8NCE7aINx7WXiKQrPYZWC/hvrTsmk6zmxbI7LTXE7hVek/n8AfVgpe2y82zl3w0HvCHN0bVKMBoJcC0w==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "detect-libc": "^2.0.3", + "is-glob": "^4.0.3", + "node-addon-api": "^7.0.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" }, "optionalDependencies": { - "fsevents": "^2.3.3" + "@parcel/watcher-android-arm64": "2.6.0", + "@parcel/watcher-darwin-arm64": "2.6.0", + "@parcel/watcher-darwin-x64": "2.6.0", + "@parcel/watcher-freebsd-x64": "2.6.0", + "@parcel/watcher-linux-arm-glibc": "2.6.0", + "@parcel/watcher-linux-arm-musl": "2.6.0", + "@parcel/watcher-linux-arm64-glibc": "2.6.0", + "@parcel/watcher-linux-arm64-musl": "2.6.0", + "@parcel/watcher-linux-x64-glibc": "2.6.0", + "@parcel/watcher-linux-x64-musl": "2.6.0", + "@parcel/watcher-win32-arm64": "2.6.0", + "@parcel/watcher-win32-x64": "2.6.0" + } + }, + "node_modules/jest-haste-map/node_modules/@parcel/watcher-android-arm64": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.6.0.tgz", + "integrity": "sha512-trgpLSCKRC/huFjXX/Smh+0sWe4+YtKfktIToiMl59ghz7z+qkH6kMvNnUbLyRs9N11t8l4svSCs1+5B3rOAhA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/jest-haste-map/node_modules/@parcel/watcher-darwin-arm64": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.6.0.tgz", + "integrity": "sha512-Y3QV0gl7Q1zbfueunkWIERICbEojQFCgpyG7YqOGNFLsckXyI1xu9mAIUpKY9QBYzBtSkN8dBPwd3yiAO9ovMw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/jest-haste-map/node_modules/@parcel/watcher-darwin-x64": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.6.0.tgz", + "integrity": "sha512-Ohv6OpzhUfKYD7Beb8kDvG0jbIxORCYY1JRdZnaBtnjjkJxgD7ZVL0nw2sCYd0yTMKTvz3nnTnOF3cDifK+kvw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/jest-haste-map/node_modules/@parcel/watcher-freebsd-x64": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.6.0.tgz", + "integrity": "sha512-5HmXvDgs8VK+74jF9y9/2FE3/OnlcKmc56tjmSrEuZjpSZOGL+fvAu+HKJBdPs9uwoP2hE6TlSUpXZ/C5jUFmQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/jest-haste-map/node_modules/@parcel/watcher-linux-arm-glibc": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.6.0.tgz", + "integrity": "sha512-Ps/hui3A+vMbjdqlqAowK2ZL8+BO8dBjxeWXj6npTBs3jx4wWmbPpaLuqwrQrSqIVMCnpWo238bJ1U37GhQOYg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/jest-haste-map/node_modules/@parcel/watcher-linux-arm-musl": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.6.0.tgz", + "integrity": "sha512-9c6AUHgHoG+IY88MRIHupztQiQnrbqHYQjkM2btA+Bf/wQnQMuiD0Wfk1EVv3TlNT3x41uU71rn6E4xh/+zvkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/jest-haste-map/node_modules/@parcel/watcher-linux-arm64-glibc": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.6.0.tgz", + "integrity": "sha512-yHRqS2owEXe6Hic9z6Mh1ECsCd+ODVOGvZDyciqRd21+v+o+DnXMOrw50DSpIG2sb8GPEaPPmfeCAWKPJdq46g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/jest-haste-map/node_modules/@parcel/watcher-linux-arm64-musl": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.6.0.tgz", + "integrity": "sha512-WhB2e/V7rqdHHWZusBSPuy5Ei8S6lSz6FE5TKKQz5h3a0O+C+mhY7vxU9b/stqvMb8beLnPY82ZrFTLKs+SrKA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/jest-haste-map/node_modules/@parcel/watcher-linux-x64-glibc": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.6.0.tgz", + "integrity": "sha512-ulGE6x6Oz6iAwg75T8YQSoguBWasniIbX+QWpaYPcCnDOpdWX3k+4xbEYPZVLxOuoJI+svJJPD3sEj8G7lrQ3A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/jest-haste-map/node_modules/@parcel/watcher-linux-x64-musl": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.6.0.tgz", + "integrity": "sha512-tkBYKt7YQrjIJWYDnto2YgO8MRkjlMTSNoRHzsXinBqbLdeOM3L32wPZJvIZxqaLMfSlS/4sUjH/6STVP/XDLw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/jest-haste-map/node_modules/@parcel/watcher-win32-arm64": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.6.0.tgz", + "integrity": "sha512-gIZAP23jaHjGWasY/TY6yL7NHFClf0Ga7FN+iINvk+KN94rhm94lYZhFsbYFNcA04/onvGD9kKmiJLJB2HbNwQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/jest-haste-map/node_modules/@parcel/watcher-win32-x64": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.6.0.tgz", + "integrity": "sha512-cA+/pXV2YkfxlIcXOQ5fSWqAzzPyD78/x5qbK/I0vUkrlYHA8TIz+MXjAbGouguKVSI4bOmkTSJ1/poVSsgt+A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/jest-haste-map/node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-haste-map/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/jest-haste-map/node_modules/picomatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", - "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", "dev": true, "license": "MIT", "engines": { @@ -9129,50 +9545,50 @@ } }, "node_modules/jest-leak-detector": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-30.4.1.tgz", - "integrity": "sha512-IpmyiioeHxiWDhesHnUFmOxcTzwCwKpgACgWajtAP+nYQXiY7DakTxB6Bx9JFiRMljr0AX1PvnQdaU1KFoz6NQ==", + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-30.5.1.tgz", + "integrity": "sha512-gt4GT2aWgEoCNTcBe4rqS74xTIUJxi+UD9SNSu9aOk5LmTEd6fS5KSTmAKAfitCCktQHNN+upUuL6EkBfFbMDQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/get-type": "30.1.0", - "pretty-format": "30.4.1" + "@jest/get-type": "30.5.0", + "pretty-format": "30.5.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.4.1.tgz", - "integrity": "sha512-zvYfX5CaeEkFrrLS9suWe9rvJrm9J1Iv3ua8kIBv9GEPzcnsfBf0bob37la7s67fs0nlBC3EuvkOLnXQKxtx4A==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.5.2.tgz", + "integrity": "sha512-lFkB365PTIHOhPzwrb9T6gvlDnPpOZ7/c3ewOKKB7bzztqjVrtlyRL2MkyfJXpyY2u2SKw001JKrTx14fBUFcQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/get-type": "30.1.0", + "@jest/get-type": "30.5.0", "chalk": "^4.1.2", - "jest-diff": "30.4.1", - "pretty-format": "30.4.1" + "jest-diff": "30.5.2", + "pretty-format": "30.5.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-message-util": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.4.1.tgz", - "integrity": "sha512-kwCKIvq0MCW1HzLoGola9Te6JUdzgV0loyKJ3Qghrkz9i5/RRIHsL95BMQc2HBBhlBKC4j22K9p11TGHH8RBpQ==", + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.5.1.tgz", + "integrity": "sha512-UdQlLdd9wL/Ys7xRErckqwD6wPlSZYueosSWuHc1r2ztGLwlgPvtSJq2+BPEgaEY13WLvfFbmhTj8pba0Sd1jg==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", - "@jest/types": "30.4.1", + "@jest/types": "30.5.1", "@types/stack-utils": "^2.0.3", "chalk": "^4.1.2", "graceful-fs": "^4.2.11", - "jest-util": "30.4.1", + "jest-util": "30.5.1", "picomatch": "^4.0.3", - "pretty-format": "30.4.1", + "pretty-format": "30.5.1", "slash": "^3.0.0", "stack-utils": "^2.0.6" }, @@ -9181,9 +9597,9 @@ } }, "node_modules/jest-message-util/node_modules/picomatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", - "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", "dev": true, "license": "MIT", "engines": { @@ -9194,42 +9610,25 @@ } }, "node_modules/jest-mock": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.4.1.tgz", - "integrity": "sha512-/i8SVb8/NSB7RfNi8gfqu8gxLV23KaL5EpAttyb9iz8qWRIqXRLflycz/32wXsYkOnaUlx8NAKnJYtpsmXUmfw==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.5.2.tgz", + "integrity": "sha512-KTHb37Fhj8xY8qPFvTFaFJHcdsumQp+ExsUlgoX232Agmc706gagBs53+CYvulV7MVQo9AgXOUxsqzzVBoJlrA==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "30.4.1", + "@jest/expect-utils": "30.5.2", + "@jest/types": "30.5.1", "@types/node": "*", - "jest-util": "30.4.1" + "jest-util": "30.5.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", - "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, "node_modules/jest-regex-util": { - "version": "30.4.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-30.4.0.tgz", - "integrity": "sha512-mWlvLviKIgIQ8VCuM1xRdD0TWp3zlzionlmDBjuXVBs+VkmXq6FgW9T4Emr7oGz/Rk6feDCGyiugolcQEyp3mg==", + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-30.5.0.tgz", + "integrity": "sha512-Mg0WK7A6xRHLSA1udJ8y9f3lM0uUhFTBnLKzwPmqB9AylvpleJ6BLemR8K9dK27DY+cesDryoA7yLZCAHsPG1A==", "dev": true, "license": "MIT", "engines": { @@ -9237,100 +9636,100 @@ } }, "node_modules/jest-resolve": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-30.4.1.tgz", - "integrity": "sha512-Zry8Yq/yJcNAZ7dJ5F2heic8AheXvbFZ7XI5V+h28nrYZ7Qoyy4dItq8OodjnYD270mvX+ZudmrNV9cysqhW5Q==", + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-30.5.1.tgz", + "integrity": "sha512-wprhLejRtwN6h8ZgaqC0eYjGJ1uMdGPT/+b3eFncbG4NWuuP9QL+vWwRinu9waw7hkOLcpMJGVJAMgBwsPssMQ==", "dev": true, "license": "MIT", "dependencies": { "chalk": "^4.1.2", "graceful-fs": "^4.2.11", - "jest-haste-map": "30.4.1", - "jest-pnp-resolver": "^1.2.3", - "jest-util": "30.4.1", - "jest-validate": "30.4.1", + "jest-haste-map": "30.5.1", + "jest-util": "30.5.1", + "jest-validate": "30.5.1", "slash": "^3.0.0", - "unrs-resolver": "^1.7.11" + "unrs-resolver": "^1.12.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-resolve-dependencies": { - "version": "30.4.2", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-30.4.2.tgz", - "integrity": "sha512-gDiVh1I+GxYzz9oXlyw+1wv6VOYX1WYxMOfjsA3iGKePV2oxmbHhwxfkALxNxYy1ciw6APWwkW2zZONwP97aEQ==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-30.5.2.tgz", + "integrity": "sha512-GMI0DP5enX9Z2qW2zFy1bOkrCfWAOPRJQ7qHt0pdfrxBPsgWxglMPrRSK2TX/wRWYxcPRSLFg3Z88qPOzHx7FQ==", "dev": true, "license": "MIT", "dependencies": { - "jest-regex-util": "30.4.0", - "jest-snapshot": "30.4.1" + "jest-regex-util": "30.5.0", + "jest-snapshot": "30.5.2" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-runner": { - "version": "30.4.2", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-30.4.2.tgz", - "integrity": "sha512-2dw0PslVYXxffXGpLo+Ejad+KcI1Qkjn7f4X4619gf21oCUmL+SPfjqIa/losUem3yEOvfNZe/F1HWUcNpODcg==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-30.5.2.tgz", + "integrity": "sha512-/B6px7hiiNhVSRwuv9AGn0nawYvwsHeQZ3ItTd5Gp2diFd0EOKaWVeWqcbw3L88vx1GfpCKjQkxWItZCTl11Rw==", "dev": true, "license": "MIT", "dependencies": { - "@jest/console": "30.4.1", - "@jest/environment": "30.4.1", - "@jest/test-result": "30.4.1", - "@jest/transform": "30.4.1", - "@jest/types": "30.4.1", + "@jest/console": "30.5.2", + "@jest/environment": "30.5.2", + "@jest/source-map": "30.5.2", + "@jest/test-result": "30.5.2", + "@jest/transform": "30.5.2", + "@jest/types": "30.5.1", "@types/node": "*", "chalk": "^4.1.2", "emittery": "^0.13.1", "exit-x": "^0.2.2", "graceful-fs": "^4.2.11", - "jest-docblock": "30.4.0", - "jest-environment-node": "30.4.1", - "jest-haste-map": "30.4.1", - "jest-leak-detector": "30.4.1", - "jest-message-util": "30.4.1", - "jest-resolve": "30.4.1", - "jest-runtime": "30.4.2", - "jest-util": "30.4.1", - "jest-watcher": "30.4.1", - "jest-worker": "30.4.1", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" + "jest-docblock": "30.5.0", + "jest-environment-node": "30.5.2", + "jest-haste-map": "30.5.1", + "jest-leak-detector": "30.5.1", + "jest-message-util": "30.5.1", + "jest-resolve": "30.5.1", + "jest-runtime": "30.5.2", + "jest-util": "30.5.1", + "jest-watcher": "30.5.2", + "jest-worker": "30.5.1", + "p-limit": "^3.1.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/jest-runtime": { - "version": "30.4.2", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-30.4.2.tgz", - "integrity": "sha512-3/5e8iPz2k/VLqlr8DgTftYyLUv8Su3FkCAO2/Od81UsUTpSxOrS6O5x5KkoQwyUjmpYyDJKeyAvg2T2nvpNkQ==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-30.5.2.tgz", + "integrity": "sha512-0paUAHBlheai10A3XSy9Xh+YBG0IROy+/qzcDPzQ/nbbXrznQzeWy5qniICWK6d3W3scaRQCVAbXdcK0ibBq4w==", "dev": true, "license": "MIT", "dependencies": { - "@jest/environment": "30.4.1", - "@jest/fake-timers": "30.4.1", - "@jest/globals": "30.4.1", - "@jest/source-map": "30.0.1", - "@jest/test-result": "30.4.1", - "@jest/transform": "30.4.1", - "@jest/types": "30.4.1", + "@jest/environment": "30.5.2", + "@jest/fake-timers": "30.5.2", + "@jest/globals": "30.5.2", + "@jest/source-map": "30.5.2", + "@jest/test-result": "30.5.2", + "@jest/transform": "30.5.2", + "@jest/types": "30.5.1", "@types/node": "*", "chalk": "^4.1.2", - "cjs-module-lexer": "^2.1.0", + "cjs-module-lexer": "^2.2.0", "collect-v8-coverage": "^1.0.2", - "glob": "^10.5.0", + "es-module-lexer": "^2.1.0", + "glob": "^13.0.6", "graceful-fs": "^4.2.11", - "jest-haste-map": "30.4.1", - "jest-message-util": "30.4.1", - "jest-mock": "30.4.1", - "jest-regex-util": "30.4.0", - "jest-resolve": "30.4.1", - "jest-snapshot": "30.4.1", - "jest-util": "30.4.1", + "jest-haste-map": "30.5.1", + "jest-message-util": "30.5.1", + "jest-mock": "30.5.2", + "jest-regex-util": "30.5.0", + "jest-resolve": "30.5.1", + "jest-snapshot": "30.5.2", + "jest-util": "30.5.1", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, @@ -9338,10 +9737,74 @@ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, + "node_modules/jest-runtime/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/jest-runtime/node_modules/brace-expansion": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", + "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/jest-runtime/node_modules/es-module-lexer": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz", + "integrity": "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-runtime/node_modules/glob": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", + "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/jest-runtime/node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/jest-snapshot": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-30.4.1.tgz", - "integrity": "sha512-tEOkkfOMppUyeiHwjZswOQ3lcnoTnws/q5FnGIaeIh/jmoU0ZlgMYRR8sTlTj+nNGCoJ0RDq6SfxGxCsyMTPmw==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-30.5.2.tgz", + "integrity": "sha512-jKIdes25AnAH73dOCi2qE6J6vHJ6L2vyBS11M89kT50DVJcLTf2AOjvcc+2vVaN8lUbY5v2R83aqXo3Ro9fqYA==", "dev": true, "license": "MIT", "dependencies": { @@ -9350,20 +9813,20 @@ "@babel/plugin-syntax-jsx": "^7.27.1", "@babel/plugin-syntax-typescript": "^7.27.1", "@babel/types": "^7.27.3", - "@jest/expect-utils": "30.4.1", - "@jest/get-type": "30.1.0", - "@jest/snapshot-utils": "30.4.1", - "@jest/transform": "30.4.1", - "@jest/types": "30.4.1", + "@jest/expect-utils": "30.5.2", + "@jest/get-type": "30.5.0", + "@jest/snapshot-utils": "30.5.1", + "@jest/transform": "30.5.2", + "@jest/types": "30.5.1", "babel-preset-current-node-syntax": "^1.2.0", "chalk": "^4.1.2", - "expect": "30.4.1", + "expect": "30.5.2", "graceful-fs": "^4.2.11", - "jest-diff": "30.4.1", - "jest-matcher-utils": "30.4.1", - "jest-message-util": "30.4.1", - "jest-util": "30.4.1", - "pretty-format": "30.4.1", + "jest-diff": "30.5.2", + "jest-matcher-utils": "30.5.2", + "jest-message-util": "30.5.1", + "jest-util": "30.5.1", + "pretty-format": "30.5.1", "semver": "^7.7.2", "synckit": "^0.11.8" }, @@ -9372,9 +9835,9 @@ } }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.0.tgz", - "integrity": "sha512-AcM7dV/5ul4EekoQ29Agm5vri8JNqRyj39o0qpX6vDF2GZrtutZl5RwgD1XnZjiTAfncsJhMI48QQH3sN87YNA==", + "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": { @@ -9385,13 +9848,13 @@ } }, "node_modules/jest-util": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.4.1.tgz", - "integrity": "sha512-vjQb1sACEiv13DKJMDToJpzVW0joCsIQrmbg0fi7CyOOt+g9jTuQl2A216pWRBYhOVt53XbL/2LbMKg1BECWOw==", + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.5.1.tgz", + "integrity": "sha512-yKuxmNy2rSbTXw+3SIPanJo+nV4/BS1p26v44IYBFMsswSQySfMMcPHErnOncda7i9HEz0q605rIhSTBVgrZTg==", "dev": true, "license": "MIT", "dependencies": { - "@jest/types": "30.4.1", + "@jest/types": "30.5.1", "@types/node": "*", "chalk": "^4.1.2", "ci-info": "^4.2.0", @@ -9403,9 +9866,9 @@ } }, "node_modules/jest-util/node_modules/picomatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", - "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", "dev": true, "license": "MIT", "engines": { @@ -9416,18 +9879,18 @@ } }, "node_modules/jest-validate": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-30.4.1.tgz", - "integrity": "sha512-PDWi4SOwLnwqNDfHZjOcsEFyZ4fc/2W2gVL3DEoyqnB6jCQMLRtfBong8s6omIw3lI0HWOus12xfnFmQtjW3fw==", + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-30.5.1.tgz", + "integrity": "sha512-i/buJ56wTpxihE93hQYNMfdOThS87+HGvLZzZJmU4xggPcdTYQq051iwALLCHp3q+SkCGH+EFejQZz5EbBSkkg==", "dev": true, "license": "MIT", "dependencies": { - "@jest/get-type": "30.1.0", - "@jest/types": "30.4.1", + "@jest/get-type": "30.5.0", + "@jest/types": "30.5.1", "camelcase": "^6.3.0", "chalk": "^4.1.2", "leven": "^3.1.0", - "pretty-format": "30.4.1" + "pretty-format": "30.5.1" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" @@ -9447,19 +9910,19 @@ } }, "node_modules/jest-watcher": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-30.4.1.tgz", - "integrity": "sha512-/l9UonmvCwjHH7d2h3iAwIloLc1H0S8mJZ/LNK3i86hqwPAz8otUJjP9MfYtz9Tt77Su5FD2xGjZn8d31IZHlw==", + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-30.5.2.tgz", + "integrity": "sha512-rqRgg4R11GA9m1UsEZwQeixHsgZReCn6TOHAHtIH33yXrIvoX0OGPA20Yzzjkz7X40fZvcRSxEpQppYPcWzmcQ==", "dev": true, "license": "MIT", "dependencies": { - "@jest/test-result": "30.4.1", - "@jest/types": "30.4.1", + "@jest/test-result": "30.5.2", + "@jest/types": "30.5.1", "@types/node": "*", "ansi-escapes": "^4.3.2", "chalk": "^4.1.2", "emittery": "^0.13.1", - "jest-util": "30.4.1", + "jest-util": "30.5.1", "string-length": "^4.0.2" }, "engines": { @@ -9467,15 +9930,15 @@ } }, "node_modules/jest-worker": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-30.4.1.tgz", - "integrity": "sha512-SHynN/q/QD++iNyvMdy+WMmbCGk8jIsNcRxycXbWubSOhvo6T+j2afcfUSl+3hYsiBebOTo0cT7c2H7CXugu1g==", + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-30.5.1.tgz", + "integrity": "sha512-Cbxh5v7AoLuFRmFJSM4/aHdQ68rjXvUWr716EE0Dh3I7T+T/3FgFKhOERGXHcU2Meftq9+9zxPM3TSNyI9D+HA==", "dev": true, "license": "MIT", "dependencies": { "@types/node": "*", "@ungap/structured-clone": "^1.3.0", - "jest-util": "30.4.1", + "jest-util": "30.5.1", "merge-stream": "^2.0.0", "supports-color": "^8.1.1" }, @@ -9516,9 +9979,9 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", - "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", + "version": "3.15.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.2.tgz", + "integrity": "sha512-6EuL879VkRA+1Cz578mKMiKvjPNEuk6+r1JaFzoSWejZmtf7xWbIyw1e3KkxlkzTIt9Taw6JBhEppG7utc1P+w==", "dev": true, "license": "MIT", "dependencies": { @@ -10005,9 +10468,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.0.tgz", - "integrity": "sha512-AcM7dV/5ul4EekoQ29Agm5vri8JNqRyj39o0qpX6vDF2GZrtutZl5RwgD1XnZjiTAfncsJhMI48QQH3sN87YNA==", + "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": { @@ -10017,16 +10480,6 @@ "node": ">=10" } }, - "node_modules/makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "tmpl": "1.0.5" - } - }, "node_modules/map-obj": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", @@ -10163,10 +10616,10 @@ } }, "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "license": "ISC", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "license": "BlueOak-1.0.0", "engines": { "node": ">=16 || 14 >=14.17" } @@ -10197,9 +10650,9 @@ "dev": true }, "node_modules/nanoid": { - "version": "3.3.12", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz", - "integrity": "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==", + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", "dev": true, "funding": [ { @@ -10216,12 +10669,13 @@ } }, "node_modules/napi-postinstall": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz", - "integrity": "sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==", + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.7.tgz", + "integrity": "sha512-jyU4cU4kVAmy/3qjP+DcoQTNXfINHc+dFw54gGqWC8nu0mpV0kOnk7kff+J+Q18SbX0k3Np8Rm7yFjd3phatNQ==", "dev": true, "license": "MIT", "bin": { + "napi-patch": "lib/patch.js", "napi-postinstall": "lib/cli.js" }, "engines": { @@ -10289,11 +10743,14 @@ "license": "MIT" }, "node_modules/node-releases": { - "version": "2.0.38", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.38.tgz", - "integrity": "sha512-3qT/88Y3FbH/Kx4szpQQ4HzUbVrHPKTLVpVocKiLfoYvw9XSGOX2FmD2d6DrXbVYyAQTF2HeF6My8jmzx7/CRw==", + "version": "2.0.60", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.60.tgz", + "integrity": "sha512-OmO8+GM1JUZqXET720VrJCwkjUCXmCMQm0Z3UDDRbfNLHS4NEAvY60j5jiFv0tkKw2PNNlqOLhahVmwJIOLDIQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=18" + } }, "node_modules/normalize-package-data": { "version": "2.5.0", @@ -10382,16 +10839,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, "node_modules/onetime": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", @@ -10565,16 +11012,6 @@ "node": ">=8" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -10590,9 +11027,9 @@ "dev": true }, "node_modules/path-scurry": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.1.tgz", - "integrity": "sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", + "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -10600,7 +11037,7 @@ "minipass": "^7.1.2" }, "engines": { - "node": "20 || >=22" + "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -10626,9 +11063,9 @@ } }, "node_modules/pg-protocol": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.14.0.tgz", - "integrity": "sha512-n5taZ1kO3s9ngDTVxsEznOqCyToTgz0FLuPq0B33COy5pPpuWJpY3/2oRBVETuOgzdqRXfWpM9HIhp2LBBT1BA==", + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.16.1.tgz", + "integrity": "sha512-p9VOFMiHB/ZbJATetbg+99PxssTVSQRnyuPSQ67mN1+1KBOjZaZ83ZQzltnxPhJwSsC3nwVjJ10DVJlerbFzLg==", "license": "MIT" }, "node_modules/pg-types": { @@ -10688,28 +11125,25 @@ } }, "node_modules/playwright": { - "version": "1.62.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.62.1.tgz", - "integrity": "sha512-0M+L3LAD8/nm554LOla9Ayx0j0tmFZ0FBcoQ7F1VuVHpM/XpiC8RcDzBQB8W5+hA8L22THxELzeF+2WcUzvcLg==", + "version": "1.64.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.64.1.tgz", + "integrity": "sha512-HCrVhHr5QQuwYoswEUGTb7gGp522yflbv/ST8nF4sFWGuLjQCt17Q/EubpGGSNKYn1tsTCPZxqHhHCfVURu7UA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "playwright-core": "1.62.1" + "playwright-core": "1.64.1" }, "bin": { "playwright": "cli.js" }, "engines": { "node": ">=20" - }, - "optionalDependencies": { - "fsevents": "2.3.2" } }, "node_modules/playwright-core": { - "version": "1.62.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.62.1.tgz", - "integrity": "sha512-wPYSwEBJY9GHraISXqyqtx0na0LpO3XEX7jNDhntbex7tzUS7kLnZsOlFruFJB4Hi/rhDMjXGqHewDZ68nYZVw==", + "version": "1.64.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.64.1.tgz", + "integrity": "sha512-BC4s8y6SEVA6Q1rSxZTto8hI1KUI3xXlHGZgvGqP4IqPdI/a6FX9H29IDNz7vKo9l21b6LfYosScPL6M3xxyDQ==", "dev": true, "license": "Apache-2.0", "bin": { @@ -10719,21 +11153,6 @@ "node": ">=20" } }, - "node_modules/playwright/node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/possible-typed-array-names": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", @@ -10745,9 +11164,9 @@ } }, "node_modules/postcss": { - "version": "8.5.15", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz", - "integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==", + "version": "8.5.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.31.tgz", + "integrity": "sha512-YUbWYCgErwnMAVkjUnYa+KlMBzGpHwiIt/DE7f0G33AuX2LH9UcTk6KgWxd3zRU+pN3u/C+Xl3EnMLM4Hea7Sg==", "dev": true, "funding": [ { @@ -10764,11 +11183,10 @@ } ], "license": "MIT", - "peer": true, "dependencies": { - "nanoid": "^3.3.12", + "nanoid": "^3.3.20", "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" + "source-map-js": "^1.2.2" }, "engines": { "node": "^10 || ^12 || >=14" @@ -10846,16 +11264,16 @@ } }, "node_modules/pretty-format": { - "version": "30.4.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.4.1.tgz", - "integrity": "sha512-K6KiKMHTL4jjX4u3Kir2EW07nRfcqVTXIImx50wbjHQTcZPgg+gjVeNTIT3l3L1Rd4UefxfogquC9J37SoFyyw==", + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.5.1.tgz", + "integrity": "sha512-byhRAPguVKMQIj4kjJwJ5lAskVhfuiSdiYl/aLTWpgkGEmic2jYhJh1yE9ih8Ox44Xg9ccCT11/S6QrzSJuNrg==", "dev": true, "license": "MIT", "dependencies": { - "@jest/schemas": "30.4.1", - "ansi-styles": "^5.2.0", - "react-is-18": "npm:react-is@^18.3.1", - "react-is-19": "npm:react-is@^19.2.5" + "@jest/react-is-18": "npm:react-is@^18.3.1", + "@jest/react-is-19": "npm:react-is@^19.2.5", + "@jest/schemas": "30.5.0", + "ansi-styles": "^5.2.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" @@ -10882,9 +11300,9 @@ "license": "ISC" }, "node_modules/protobufjs": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.6.4.tgz", - "integrity": "sha512-RJJPTTpvFfHcWLkIa2JFWK4XvtSzS0yEWDmunqHXli1h3JlkbcQZXDZdcWxv+JK3Xsl5/UFDPZ0iGm7DAengYw==", + "version": "7.6.6", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.6.6.tgz", + "integrity": "sha512-dYDWdjSl5RNb7SgPxGQcRU+GtvP7s2fpkrY0r432PcOIaZ0/rBcxEZnQN67iJhFuQiVw754JDoPruPCNdGsbjg==", "hasInstallScript": true, "license": "BSD-3-Clause", "dependencies": { @@ -10989,22 +11407,6 @@ "node": ">=0.10.0" } }, - "node_modules/react-is-18": { - "name": "react-is", - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", - "dev": true, - "license": "MIT" - }, - "node_modules/react-is-19": { - "name": "react-is", - "version": "19.2.6", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.6.tgz", - "integrity": "sha512-XjBR15BhXuylgWGuslhDKqlSayuqvqBX91BP8pauG8kd1zY8kotkNWbXksTCNRarse4kuGbe2kIY05ARtwNIvw==", - "dev": true, - "license": "MIT" - }, "node_modules/read-pkg": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", @@ -11334,7 +11736,6 @@ "integrity": "sha512-pAQK9HalE84QSm4Po3EmWIZPd3FnjkShVkiMlz1iligWYkWQ7wHYd1PF/T7QZ5TVSD6uSTon5gBVMSM4JfBV+A==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@types/estree": "1.0.8" }, @@ -11682,24 +12083,14 @@ } }, "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==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, - "node_modules/source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, "node_modules/spdx-correct": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", @@ -12040,13 +12431,13 @@ } }, "node_modules/synckit": { - "version": "0.11.12", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.12.tgz", - "integrity": "sha512-Bh7QjT8/SuKUIfObSXNHNSK6WHo6J1tHCqJsuaFDP7gP0fkzSfTxI8y85JrppZ0h8l0maIgc2tfuZQ6/t3GtnQ==", + "version": "0.11.13", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.13.tgz", + "integrity": "sha512-eNRKgb3z66Yp3D2CixVujOUvXLFUTij/zVnV8KRyvFdQwpz7I5DS8UfRkTeLzb64u+dkzDSdelE24izu+zSSUg==", "dev": true, "license": "MIT", "dependencies": { - "@pkgr/core": "^0.2.9" + "@pkgr/core": "^0.3.6" }, "engines": { "node": "^14.18.0 || >=16.0.0" @@ -12056,9 +12447,9 @@ } }, "node_modules/systeminformation": { - "version": "5.31.7", - "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.31.7.tgz", - "integrity": "sha512-/8NC53e5nP9nmhn42/ncdOkyJnOoue/Vy+tJOyUGd1Yv66G069wK4rrziwhrqDETgk78CudTQupw5z19S5uoZw==", + "version": "5.33.16", + "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.33.16.tgz", + "integrity": "sha512-R+Lh69IJXfJj6bfyH1In5cIR9FTr4hBS39YvlZHZjsK1p9cuELPq7hplZZIb56ZESMMb+DzdKqqE6Iomi01Mvg==", "license": "MIT", "os": [ "darwin", @@ -12074,7 +12465,7 @@ "systeminformation": "lib/cli.js" }, "engines": { - "node": ">=8.0.0" + "node": ">=10.0.0" }, "funding": { "type": "Buy me a coffee", @@ -12085,8 +12476,7 @@ "version": "4.3.3", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.3.tgz", "integrity": "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/tapable": { "version": "2.3.3", @@ -12174,64 +12564,57 @@ } }, "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.2.tgz", + "integrity": "sha512-u9E6A+ZDYdp7a4WnarkXPZOx8Ilz46+kby6p1yZ8zsGTz9gYa6FIS7lj2oezzNKmtdyyJNNmmXDppga5GB7kSw==", "dev": true, "license": "ISC", "dependencies": { "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" + "glob": "^10.4.1", + "minimatch": "^10.2.2" }, "engines": { - "node": ">=8" + "node": ">=18" + } + }, + "node_modules/test-exclude/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" } }, "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz", - "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", + "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/test-exclude/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "balanced-match": "^4.0.2" }, "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": "20 || >=22" } }, "node_modules/test-exclude/node_modules/minimatch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", - "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^5.0.8" }, "engines": { - "node": "*" + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/text-segmentation": { @@ -12258,13 +12641,6 @@ "node": ">=14.14" } }, - "node_modules/tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -12299,7 +12675,7 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "devOptional": true + "dev": true }, "node_modules/type-detect": { "version": "4.0.8", @@ -12493,38 +12869,41 @@ } }, "node_modules/unrs-resolver": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.11.1.tgz", - "integrity": "sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.12.2.tgz", + "integrity": "sha512-dmlRxBJJayXjqTwC+JtF1HhJmgf3ftQ3YejFcZrf4+KKtJv0qDsK1pjqaaVjG7wJ5NJ6UVP1OqRMQ71Z4C3rxQ==", "dev": true, "hasInstallScript": true, "license": "MIT", "dependencies": { - "napi-postinstall": "^0.3.0" + "napi-postinstall": "^0.3.4" }, "funding": { "url": "https://opencollective.com/unrs-resolver" }, "optionalDependencies": { - "@unrs/resolver-binding-android-arm-eabi": "1.11.1", - "@unrs/resolver-binding-android-arm64": "1.11.1", - "@unrs/resolver-binding-darwin-arm64": "1.11.1", - "@unrs/resolver-binding-darwin-x64": "1.11.1", - "@unrs/resolver-binding-freebsd-x64": "1.11.1", - "@unrs/resolver-binding-linux-arm-gnueabihf": "1.11.1", - "@unrs/resolver-binding-linux-arm-musleabihf": "1.11.1", - "@unrs/resolver-binding-linux-arm64-gnu": "1.11.1", - "@unrs/resolver-binding-linux-arm64-musl": "1.11.1", - "@unrs/resolver-binding-linux-ppc64-gnu": "1.11.1", - "@unrs/resolver-binding-linux-riscv64-gnu": "1.11.1", - "@unrs/resolver-binding-linux-riscv64-musl": "1.11.1", - "@unrs/resolver-binding-linux-s390x-gnu": "1.11.1", - "@unrs/resolver-binding-linux-x64-gnu": "1.11.1", - "@unrs/resolver-binding-linux-x64-musl": "1.11.1", - "@unrs/resolver-binding-wasm32-wasi": "1.11.1", - "@unrs/resolver-binding-win32-arm64-msvc": "1.11.1", - "@unrs/resolver-binding-win32-ia32-msvc": "1.11.1", - "@unrs/resolver-binding-win32-x64-msvc": "1.11.1" + "@unrs/resolver-binding-android-arm-eabi": "1.12.2", + "@unrs/resolver-binding-android-arm64": "1.12.2", + "@unrs/resolver-binding-darwin-arm64": "1.12.2", + "@unrs/resolver-binding-darwin-x64": "1.12.2", + "@unrs/resolver-binding-freebsd-x64": "1.12.2", + "@unrs/resolver-binding-linux-arm-gnueabihf": "1.12.2", + "@unrs/resolver-binding-linux-arm-musleabihf": "1.12.2", + "@unrs/resolver-binding-linux-arm64-gnu": "1.12.2", + "@unrs/resolver-binding-linux-arm64-musl": "1.12.2", + "@unrs/resolver-binding-linux-loong64-gnu": "1.12.2", + "@unrs/resolver-binding-linux-loong64-musl": "1.12.2", + "@unrs/resolver-binding-linux-ppc64-gnu": "1.12.2", + "@unrs/resolver-binding-linux-riscv64-gnu": "1.12.2", + "@unrs/resolver-binding-linux-riscv64-musl": "1.12.2", + "@unrs/resolver-binding-linux-s390x-gnu": "1.12.2", + "@unrs/resolver-binding-linux-x64-gnu": "1.12.2", + "@unrs/resolver-binding-linux-x64-musl": "1.12.2", + "@unrs/resolver-binding-openharmony-arm64": "1.12.2", + "@unrs/resolver-binding-wasm32-wasi": "1.12.2", + "@unrs/resolver-binding-win32-arm64-msvc": "1.12.2", + "@unrs/resolver-binding-win32-ia32-msvc": "1.12.2", + "@unrs/resolver-binding-win32-x64-msvc": "1.12.2" } }, "node_modules/upath": { @@ -12539,9 +12918,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", - "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.4.tgz", + "integrity": "sha512-t8wonIOdQyOjtPd2VktlBu6QjTVTks6v8bSi7kd0r2Vll8TK1JYDZtRRdbmCHOAMphkZgrzK+L+vXK4pyZ8t4A==", "dev": true, "funding": [ { @@ -12659,16 +13038,6 @@ "spdx-expression-parse": "^3.0.0" } }, - "node_modules/walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "makeerror": "1.0.12" - } - }, "node_modules/wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", @@ -12967,16 +13336,16 @@ } }, "node_modules/workbox-build/node_modules/brace-expansion": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz", - "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", + "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^4.0.2" }, "engines": { - "node": "18 || 20 || >=22" + "node": "20 || >=22" } }, "node_modules/workbox-build/node_modules/glob": { @@ -13083,16 +13452,16 @@ } }, "node_modules/workbox-cli/node_modules/brace-expansion": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", - "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", + "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^4.0.2" }, "engines": { - "node": "18 || 20 || >=22" + "node": "20 || >=22" } }, "node_modules/workbox-cli/node_modules/glob": { @@ -13297,13 +13666,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, - "license": "ISC" - }, "node_modules/write-file-atomic": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", @@ -13368,9 +13730,9 @@ "dev": true }, "node_modules/yaml": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", - "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==", + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.1.tgz", + "integrity": "sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==", "license": "ISC", "bin": { "yaml": "bin.mjs" diff --git a/package.json b/package.json index 158266205..7ae5adffb 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { "devDependencies": { - "@playwright/test": "^1.62.1", + "@playwright/test": "^1.64.1", "@tailwindcss/typography": "^0.5.20", - "autoprefixer": "^10.5.0", - "daisyui": "^5.7.16", - "jest": "^30.4.2", - "postcss": "^8.5.15", + "autoprefixer": "^10.6.1", + "daisyui": "^5.7.50", + "jest": "^30.5.2", + "postcss": "^8.5.31", "tailwindcss": "^4.3.3", "workbox-cli": "^7.4.1" }, "dependencies": { - "@opentelemetry/auto-instrumentations-node": "^0.77.0", + "@opentelemetry/auto-instrumentations-node": "^0.82.0", "@tailwindcss/cli": "^4.3.3", "ansi-up": "^1.0.0", "html2canvas": "^1.4.1" diff --git a/web-components/package-lock.json b/web-components/package-lock.json index a6e0139d7..47ffc292e 100644 --- a/web-components/package-lock.json +++ b/web-components/package-lock.json @@ -9,46 +9,46 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@codemirror/autocomplete": "^6.20.3", - "@codemirror/commands": "^6.11.0", + "@codemirror/autocomplete": "^6.20.4", + "@codemirror/commands": "^6.11.1", "@codemirror/lang-sql": "^6.10.0", - "@codemirror/language": "^6.12.4", + "@codemirror/language": "^6.13.1", "@codemirror/lint": "^6.9.7", - "@codemirror/state": "^6.7.4", - "@codemirror/view": "^6.43.11", - "@lezer/highlight": "^1.2.3", + "@codemirror/state": "^6.7.6", + "@codemirror/view": "^6.43.15", + "@lezer/highlight": "^1.2.5", "@lit-labs/virtualizer": "^2.1.1", "@milkdown/crepe": "7.22.3", "@milkdown/kit": "7.22.3", - "@napi-rs/canvas": "^1.0.0", - "@rrweb/replay": "^2.0.0", + "@napi-rs/canvas": "^1.0.13", + "@rrweb/replay": "^2.1.7", "@rrweb/types": "^2.0.0-alpha.18", - "@types/lodash": "^4.17.24", + "@types/lodash": "^4.17.27", "ansi-up": "^1.0.0", "clsx": "^2.1.1", - "date-fns": "^4.3.0", + "date-fns": "^4.4.0", "echarts": "^6.1.0", "elkjs": "^0.12.0", "js-yaml": "^4.3.2", "jsonpath": "^1.3.0", "lit": "^3.3.3", "lodash": "^4.17.23", - "monaco-editor": "^0.55.1", - "vite": "^8.0.16" + "monaco-editor": "^0.57.0", + "vite": "^8.3.5" }, "devDependencies": { - "@types/bun": "^1.4.0", + "@types/bun": "^1.4.4", "@types/js-yaml": "^4.0.9", "@types/jsonpath": "^0.2.4", "@types/node": "^25.9.1", - "@vitest/browser": "^4.1.11", - "happy-dom": "^20.14.0", + "@vitest/browser": "^5.0.5", + "happy-dom": "^21.0.4", "jsdom": "^29.1.1", - "typescript": "^6.0.3", + "typescript": "^7.0.2", "vite-plugin-monaco-editor": "^1.1.0", "vite-plugin-node-polyfills": "^0.28.0", - "vitest": "^4.1.11", - "vitest-canvas-mock": "^1.1.5" + "vitest": "^5.0.5", + "vitest-canvas-mock": "^1.2.0" } }, "node_modules/@asamuzakjp/css-color": { @@ -145,9 +145,9 @@ } }, "node_modules/@blazediff/core": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@blazediff/core/-/core-1.9.1.tgz", - "integrity": "sha512-ehg3jIkYKulZh+8om/O25vkvSsXXwC+skXmyA87FFx6A/45eqOkZsBltMw/TVteb0mloiGT8oGRTcjRAz66zaA==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@blazediff/core/-/core-1.10.0.tgz", + "integrity": "sha512-AOQff0zgR7cGsZL+4E7hVkmujoPUpm0J9xzWGWZj5wCjd3gmxESXAPfKyuzs93VdpQNFhHlBhfOjrcZ+XTERtQ==", "dev": true, "license": "MIT" }, @@ -165,9 +165,10 @@ } }, "node_modules/@codemirror/autocomplete": { - "version": "6.20.3", - "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.20.3.tgz", - "integrity": "sha512-tlosUqb+3BbxCxZdu4tKeRghPFC+QM7q4X5YhKV2eCmPG+1r2F3f4AaSz5sCrFqUtX4Jh20VFTKecl16MgiV9g==", + "version": "6.20.4", + "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.20.4.tgz", + "integrity": "sha512-yF8RhOf2SXlg00+qtupzLhrglcas61boqaONiNcbPIebHCpJocpqTBA6dyrtUrQO47hqyTdeob/3XnYilT7TaQ==", + "license": "MIT", "dependencies": { "@codemirror/language": "^6.0.0", "@codemirror/state": "^6.0.0", @@ -176,9 +177,10 @@ } }, "node_modules/@codemirror/commands": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.11.0.tgz", - "integrity": "sha512-/K4Rl5BN0OtTiPWmJCdqODu38XnDMsDxKY5rgrPnCkutPTJf2wVbkoixLfealF5Kwse/s8P8M5jAiURiwSwnFA==", + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.11.1.tgz", + "integrity": "sha512-O/4hG3SC1YwcmQ0d2UVNDs+AsaNWd1iHVxbTeEBuqH+6bExAiPK3iS/BvpY6rZGURALv4ZD3sIgcCmRvw3ehBg==", + "license": "MIT", "dependencies": { "@codemirror/language": "^6.0.0", "@codemirror/state": "^6.7.0", @@ -446,11 +448,13 @@ } }, "node_modules/@codemirror/language": { - "version": "6.12.4", - "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.12.4.tgz", - "integrity": "sha512-1q4PaT+o6PbgpkJt4Q8Fv5XJxTy4FUZ4MWETtyiDw3J0Pyr9E2vqcKL+k9wcvjNTIsauxvE7OfmWj3FRPHQ76A==", + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.13.1.tgz", + "integrity": "sha512-zfvU2r3TyylQLMj/te+5CnQ0rSqZi8B1oTCBbQkagcLW4Xc6imab6qN+pEJhsuNOLaJqiRyBXp9UhWA1DhVvDw==", + "license": "MIT", "dependencies": { "@codemirror/state": "^6.0.0", + "@codemirror/streamparser": "^6.0.0", "@codemirror/view": "^6.23.0", "@lezer/common": "^1.5.0", "@lezer/highlight": "^1.0.0", @@ -517,9 +521,10 @@ } }, "node_modules/@codemirror/state": { - "version": "6.7.4", - "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.7.4.tgz", - "integrity": "sha512-QhQIVRY+xHZDxwOSFrJ1eUMapJBUID3IdeAjf7dHO7zBUzSkyooHiodnalz5MG3iHzwixKMlAAyn7244y537EA==", + "version": "6.7.6", + "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.7.6.tgz", + "integrity": "sha512-kAz+AncRtKuIknedxT1bq4XwXv4UowhbkHU1myPrtVb/jZtImWuV5BXzv5vK6i3kYACsdiZiQKFQQ5Mq7elW8w==", + "license": "MIT", "dependencies": { "@marijn/find-cluster-break": "^1.0.0" } @@ -541,9 +546,10 @@ } }, "node_modules/@codemirror/view": { - "version": "6.43.11", - "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.43.11.tgz", - "integrity": "sha512-2+esucbQX6wB2JYi1eDvdCPFTA31BN8oSy6xCmk3G6CloV11yOvEjYk+gH7kLrP0MuHG94E8WDhjs5oMiu3+Wg==", + "version": "6.43.15", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.43.15.tgz", + "integrity": "sha512-HHsfpqFeHyXLs983pSRe38Xajs0vFWZQ2BuX0m7Ki8w3jZ5iD8cuR3lBz2/5/X53Dhf32SBHKh6rtSTB6tKeGw==", + "license": "MIT", "dependencies": { "@codemirror/state": "^6.7.0", "crelt": "^1.0.6", @@ -691,40 +697,6 @@ "node": ">=20.19.0" } }, - "node_modules/@emnapi/core": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.3.tgz", - "integrity": "sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@emnapi/wasi-threads": "1.2.3", - "tslib": "^2.4.0" - } - }, - "node_modules/@emnapi/runtime": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz", - "integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@emnapi/wasi-threads": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.3.tgz", - "integrity": "sha512-ELEBe8PsLvvJ6QMr0zLt8ffvOHW/dc1m3CEzNMg7aJUv3bMaoDtw2TXyDAwkYBuroxxuHEwhRTLJSe5sya547g==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, "node_modules/@exodus/bytes": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/@exodus/bytes/-/bytes-1.15.0.tgz", @@ -765,12 +737,33 @@ "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.12.tgz", "integrity": "sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww==" }, + "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==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", "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/@lezer/common": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.5.2.tgz", @@ -807,9 +800,10 @@ } }, "node_modules/@lezer/highlight": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.3.tgz", - "integrity": "sha512-qXdH7UqTvGfdVBINrgKhDsVTJTxactNNxLk7+UMwZhU13lMHaOBlJe9Vqp907ya56Y3+ed2tlqzys7jDkTmW0g==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.5.tgz", + "integrity": "sha512-O1GMVKgtf5YspFaRzpmqkVgMtIk2HG9uMAbH6wdAIdNh3TVzCsch/+cRi+6l2//UGDKe6NB9BW3cvuR5ezMQ0w==", + "license": "MIT", "dependencies": { "@lezer/common": "^1.3.0" } @@ -1320,9 +1314,9 @@ } }, "node_modules/@napi-rs/canvas": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas/-/canvas-1.0.0.tgz", - "integrity": "sha512-Jqxcy1XOIqj+lH9sl1GT+il6GR3uQv13vI2mrwubP3uT8Olak2ClDrK2RnxlQKjwv8BRr4b3ug0YR7c6hBX8wg==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@napi-rs/canvas/-/canvas-1.0.13.tgz", + "integrity": "sha512-b87ugZpQ5ViwqVBkjervxpwa0GmJPsKHLBNoZN6GpjWeHzTbDUGryriq+2DYW2XbB+xCqSIINQysC0/I87nPbw==", "license": "MIT", "workspaces": [ "e2e/*" @@ -1335,23 +1329,23 @@ "url": "https://github.com/sponsors/Brooooooklyn" }, "optionalDependencies": { - "@napi-rs/canvas-android-arm64": "1.0.0", - "@napi-rs/canvas-darwin-arm64": "1.0.0", - "@napi-rs/canvas-darwin-x64": "1.0.0", - "@napi-rs/canvas-linux-arm-gnueabihf": "1.0.0", - "@napi-rs/canvas-linux-arm64-gnu": "1.0.0", - "@napi-rs/canvas-linux-arm64-musl": "1.0.0", - "@napi-rs/canvas-linux-riscv64-gnu": "1.0.0", - "@napi-rs/canvas-linux-x64-gnu": "1.0.0", - "@napi-rs/canvas-linux-x64-musl": "1.0.0", - "@napi-rs/canvas-win32-arm64-msvc": "1.0.0", - "@napi-rs/canvas-win32-x64-msvc": "1.0.0" + "@napi-rs/canvas-android-arm64": "1.0.13", + "@napi-rs/canvas-darwin-arm64": "1.0.13", + "@napi-rs/canvas-darwin-x64": "1.0.13", + "@napi-rs/canvas-linux-arm-gnueabihf": "1.0.13", + "@napi-rs/canvas-linux-arm64-gnu": "1.0.13", + "@napi-rs/canvas-linux-arm64-musl": "1.0.13", + "@napi-rs/canvas-linux-riscv64-gnu": "1.0.13", + "@napi-rs/canvas-linux-x64-gnu": "1.0.13", + "@napi-rs/canvas-linux-x64-musl": "1.0.13", + "@napi-rs/canvas-win32-arm64-msvc": "1.0.13", + "@napi-rs/canvas-win32-x64-msvc": "1.0.13" } }, "node_modules/@napi-rs/canvas-android-arm64": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-android-arm64/-/canvas-android-arm64-1.0.0.tgz", - "integrity": "sha512-3hNKJObUK7JsCF9aJlVCs1J0/KE/gGfZNeK8MO1ge6bB3aicr5walGme9t9No1f/oyk9GgvdAT/rjSdsx3gbIw==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@napi-rs/canvas-android-arm64/-/canvas-android-arm64-1.0.13.tgz", + "integrity": "sha512-trn7AaDzQ+yeeA0ezhkC7cB1ZDPtp4UYk0EvB5F8qtYL9jEVWtVrU30WOpI52DszoTxaTsCgf5PP4ZVaOlOIHQ==", "cpu": [ "arm64" ], @@ -1369,9 +1363,9 @@ } }, "node_modules/@napi-rs/canvas-darwin-arm64": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-darwin-arm64/-/canvas-darwin-arm64-1.0.0.tgz", - "integrity": "sha512-ZIja19/BiGz2puhki+WUYSRriwFeFJ8Mi9eK3hZdSS85w4Y60cuEAJVhMCfKwswQkKkUtrnzdKMBuO7TupvexA==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@napi-rs/canvas-darwin-arm64/-/canvas-darwin-arm64-1.0.13.tgz", + "integrity": "sha512-6Y2djEetL8copxfNK6hg7oig/xqTwOchv19hBOm+zBNdKc/02Z3kjZN5wrLzv/l5O04/bAQS6I/AlQpwBlXgPg==", "cpu": [ "arm64" ], @@ -1389,9 +1383,9 @@ } }, "node_modules/@napi-rs/canvas-darwin-x64": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-darwin-x64/-/canvas-darwin-x64-1.0.0.tgz", - "integrity": "sha512-hImggWc82jqZVpEsFR9S7PE9OQYjq/H/D7vwCGB6X1jRH+UVBP1+1niJTPBOat1B154T6GKK7/kcFtoWgjgFzQ==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@napi-rs/canvas-darwin-x64/-/canvas-darwin-x64-1.0.13.tgz", + "integrity": "sha512-OZoPwwu4TMMg8GTCFBrg8UFExwQTU/55i3uTC/izDat6PHE+ro9dimyQoOboFf91+NY7Pnn70ScR8f8I8+eZXw==", "cpu": [ "x64" ], @@ -1409,9 +1403,9 @@ } }, "node_modules/@napi-rs/canvas-linux-arm-gnueabihf": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-arm-gnueabihf/-/canvas-linux-arm-gnueabihf-1.0.0.tgz", - "integrity": "sha512-hlJRy6d+kWLKVOG/+1rEvNQVURZ0DxxRPJsLmEWwhwiXZUJc0BF5o9esALHSEP4CoJK4wChRtj3hnyBgVx2oWA==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-arm-gnueabihf/-/canvas-linux-arm-gnueabihf-1.0.13.tgz", + "integrity": "sha512-dZSYaKROuswU2eUWG5aBKndNVe68elo1YX93xtRax7q658tj8rYE+HwduovWJgs6qwv1r1/CLR60nDeBbyjvyg==", "cpu": [ "arm" ], @@ -1429,9 +1423,9 @@ } }, "node_modules/@napi-rs/canvas-linux-arm64-gnu": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-arm64-gnu/-/canvas-linux-arm64-gnu-1.0.0.tgz", - "integrity": "sha512-5Hru4T3RXkosRQafcjelv7AUzw9mXqmGYsxnzeDDOWveFCJyEPMSJltvGCM+jfH98seOCbfwm9KyFg6Jm5FhAA==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-arm64-gnu/-/canvas-linux-arm64-gnu-1.0.13.tgz", + "integrity": "sha512-W6FzYE8ADHI93In1vi80KBL6btDtAMuj50Ch5ptkWS8xuntyzbR4h5JDUmXoakxZn2yMInksudTEqVSWoFqFGg==", "cpu": [ "arm64" ], @@ -1449,9 +1443,9 @@ } }, "node_modules/@napi-rs/canvas-linux-arm64-musl": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-arm64-musl/-/canvas-linux-arm64-musl-1.0.0.tgz", - "integrity": "sha512-LTUl9jS8WsLSUGaxQZKQkxfluOJRpgvBuxxdM4pYcjib+di8AU4OzQc6+L6SzGMLcKc9H0RAjojRatBhTMqYdg==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-arm64-musl/-/canvas-linux-arm64-musl-1.0.13.tgz", + "integrity": "sha512-+6fQ+rR49hkAa4voh2stLIwQ+4t+gmoseM8Bc53/DlMXb73IKymDPWK9A/NtWeqTW4ijWppYuyuxS2hPI8tzNA==", "cpu": [ "arm64" ], @@ -1469,9 +1463,9 @@ } }, "node_modules/@napi-rs/canvas-linux-riscv64-gnu": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-riscv64-gnu/-/canvas-linux-riscv64-gnu-1.0.0.tgz", - "integrity": "sha512-Iz931SAZf+WVDzpjk52Q3ffW3zw0YflFwEZMgs036Wfu1kX/LrwT9wGjsuSqyduqefUkl91/vTdAjn8hQu5ezA==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-riscv64-gnu/-/canvas-linux-riscv64-gnu-1.0.13.tgz", + "integrity": "sha512-17XEMO3t9RW/TtHtSFf2AkaSWuCWdzbPeidz7zrOFawHxoLSJCnpTI1hN5aUvrZNnkNNmt/vZVJCh0ryUaik3A==", "cpu": [ "riscv64" ], @@ -1489,9 +1483,9 @@ } }, "node_modules/@napi-rs/canvas-linux-x64-gnu": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-x64-gnu/-/canvas-linux-x64-gnu-1.0.0.tgz", - "integrity": "sha512-pFEQ5eFK4JusgN1K6KkO9DKP/Hi1WMJOkF8Ch03/khTc4bFbCKkCCsJG4YcOMOW9bI4XbT2/eMAWxhO0xaWgPA==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-x64-gnu/-/canvas-linux-x64-gnu-1.0.13.tgz", + "integrity": "sha512-lc48IwknVHBsNzXn9Xs5OkUsRX38Ml3Z1aOybQ51mMEzZckm8+4A0qROlyYHEoBPzr1kL3IU8ZUAqDb7wtdX8w==", "cpu": [ "x64" ], @@ -1509,9 +1503,9 @@ } }, "node_modules/@napi-rs/canvas-linux-x64-musl": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-x64-musl/-/canvas-linux-x64-musl-1.0.0.tgz", - "integrity": "sha512-jnvr8NrLHiZ3NCiOKWqDbkI4Ah+QDrqtZ+sddPZBltEb1mQ2coSvCSJYfict+oAwcm0c970oTmVySpjKP/lnaA==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@napi-rs/canvas-linux-x64-musl/-/canvas-linux-x64-musl-1.0.13.tgz", + "integrity": "sha512-bGY1r26S2bs8UNFJcPWcCSNdCFbKep5PATsvtgtC9A5u6SRgr2/jJE/RlhHL5m9ZpixNDhVkLY/5h16Kx5V9YA==", "cpu": [ "x64" ], @@ -1529,9 +1523,9 @@ } }, "node_modules/@napi-rs/canvas-win32-arm64-msvc": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-win32-arm64-msvc/-/canvas-win32-arm64-msvc-1.0.0.tgz", - "integrity": "sha512-y2j9/Gfd5joqiqxdP/L1smqjQ+uAx3C4N0EC7bDHrnZEEH8ToM/OC5p3uHvtj4Lq591aHj+ArL01UDLNwT5HgQ==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@napi-rs/canvas-win32-arm64-msvc/-/canvas-win32-arm64-msvc-1.0.13.tgz", + "integrity": "sha512-2vRPBZoaIvJrUkDhZTE2Hn0YrnpJRCWVM3EJACoBKjuWI6WgPxGtUoRMsxRviCsyks8bKTSFdyw14CellnG2qA==", "cpu": [ "arm64" ], @@ -1549,9 +1543,9 @@ } }, "node_modules/@napi-rs/canvas-win32-x64-msvc": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@napi-rs/canvas-win32-x64-msvc/-/canvas-win32-x64-msvc-1.0.0.tgz", - "integrity": "sha512-qwdhh9N6Gge/hC4pL9S1tQp0iKwhSl/dYjg7+RGp9k26iRGRi5MqqUyKGOXIWli0zOcuy5Y2wIH/jk2ry6i/jA==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@napi-rs/canvas-win32-x64-msvc/-/canvas-win32-x64-msvc-1.0.13.tgz", + "integrity": "sha512-DUlW3lZPz63kYsf8mxgyyZuevhlH0T3/BGP9l+NazhB0F1+gL6D4hqZdnhZpw24DlWmTpATDcyYSZlJOi+DdfQ==", "cpu": [ "x64" ], @@ -1568,24 +1562,6 @@ "url": "https://github.com/sponsors/Brooooooklyn" } }, - "node_modules/@napi-rs/wasm-runtime": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.5.tgz", - "integrity": "sha512-AWPoBRJ9tsnVhor4sjO7rkni+7p+2IAEFj6cx06UgP10jkQHqay/36uRV/bFkgrh18D9vb4cr8Q0Pthskgzy+Q==", - "license": "MIT", - "optional": true, - "dependencies": { - "@tybys/wasm-util": "^0.10.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Brooooooklyn" - }, - "peerDependencies": { - "@emnapi/core": "^1.7.1", - "@emnapi/runtime": "^1.7.1" - } - }, "node_modules/@ocavue/utils": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/@ocavue/utils/-/utils-1.9.0.tgz", @@ -1595,12 +1571,12 @@ } }, "node_modules/@oxc-project/types": { - "version": "0.133.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.133.0.tgz", - "integrity": "sha512-KzkdCd6Uxqnf6l3HOw1xfatAlUURA0g14cvBYFyJ5SaNOQbOUvBr9PKArcPcrNIeRsBdgcUzOGrhKveVpvOIGA==", + "version": "0.155.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.155.0.tgz", + "integrity": "sha512-SeE8JPwW1xs1tHeNycjUtUBdhorRa8o4jlvjwk49R7/Z291i+4DQa7JJIgOm/TaYQZx+QrPQbVJ/9c8dMIZN8Q==", "license": "MIT", "funding": { - "url": "https://github.com/sponsors/Boshen" + "url": "https://github.com/sponsors/oxc-project" } }, "node_modules/@polka/url": { @@ -1610,10 +1586,26 @@ "dev": true, "license": "MIT" }, + "node_modules/@rolldown/binding-android-arm-eabi": { + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.15.tgz", + "integrity": "sha512-aLcgK9gIJ3YRvrrtfSBbRa27F5WrpiTaPulnFpsHPxpUHgFlSgnU4854MHwoRGEBhfRJDWCS2WQ7lIjskE9Olw==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, "node_modules/@rolldown/binding-android-arm64": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.3.tgz", - "integrity": "sha512-454rs7jHngixp/NMxd5srYD57OnzSlZ/eFTETjORQHLwJG1lRtmNOJcBerZlfu4GjKqeq8aCCIQrMdHyhI51Hw==", + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.15.tgz", + "integrity": "sha512-xD7DdZCrbThKuxNg7ooQmvp07ys4J/pnSEMTG3/OdOWl6daC67m/Q4fL78sRHMxTH/N4fGUbYhcPM0MF5WFHkg==", "cpu": [ "arm64" ], @@ -1627,9 +1619,9 @@ } }, "node_modules/@rolldown/binding-darwin-arm64": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.3.tgz", - "integrity": "sha512-PcAhP+ynjURNyy8SKGl5DQP94aGuB/7JrXJb/t7P+hanXvQVMWzUvRRhBAcg/lNRadBhoUPqSoP4xw5tR/KBEA==", + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.15.tgz", + "integrity": "sha512-m2WuQ6r0B4OTYxyPpNLtXaMRbRDUbG8YQV2Q3KTdSSK8Th6KHCnC8jVCJt8bvYeSB5WivkkNbc85mKadaSdOxA==", "cpu": [ "arm64" ], @@ -1643,9 +1635,9 @@ } }, "node_modules/@rolldown/binding-darwin-x64": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.3.tgz", - "integrity": "sha512-9YpfeUvSE2RS7wysJ81uOZkXJz7f7Q55H2Gvp3VEw/EsahqDtrphrZ0EwDLK5vvKOzaCrBsjF8JmnMLcUt78Gg==", + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.15.tgz", + "integrity": "sha512-5RtnsHM36nodM9WbMy+zip0LGS/G+y5wro5RHrpOlr4ac24+1zSi9kiV2MP1myZeZ/ifEHfulQcWjnAXzc2C2A==", "cpu": [ "x64" ], @@ -1659,9 +1651,9 @@ } }, "node_modules/@rolldown/binding-freebsd-x64": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.3.tgz", - "integrity": "sha512-yB1IlAsSNHncV6SCTL27/MVGR5htvQsoGxIv5KMGXALp+Ll1wYsn+x98M9MW7qa+NdSbvrrY7ANI4wLJ0n1e6g==", + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.15.tgz", + "integrity": "sha512-g3l09pyFqhu+135JKkbkwiKGQmwU5hUMUPJ4VdBADvuqR8d33L6H578rh8m7rtxbdp+VmX/+nzI7nvhSZlzpUQ==", "cpu": [ "x64" ], @@ -1675,9 +1667,9 @@ } }, "node_modules/@rolldown/binding-linux-arm-gnueabihf": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.3.tgz", - "integrity": "sha512-Yi30IVAAfLUCy2MseFjbB1jAMDl1VMCAas5StnYp8da9+CKvMd2H2cbEjWcw5NPaPqzvYkVIaF1nNUG+b7u/sw==", + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.15.tgz", + "integrity": "sha512-nIe3VugI97nGQtspPxDqA4sXMUpeiocKIP/CqpY/u/vgbT+alX+cVxu1C/oVBPKg4feNTmYovE91v4DgXvXNwQ==", "cpu": [ "arm" ], @@ -1691,9 +1683,9 @@ } }, "node_modules/@rolldown/binding-linux-arm64-gnu": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.3.tgz", - "integrity": "sha512-jsO7R8To+AdlYgUmN5sHSCZbfhtMBkO0WUx8iORQnPcMMdgr7qM2DQmMwgabs3GhNztdmoKkMKQFHD6DTMCIQw==", + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.15.tgz", + "integrity": "sha512-iTBjXx+B5QSvgI89lJfmqh4wTh8NabR1YZIIN3hNx4zSG0EVfVqkOvLulNpG4251pbd6/IAmZ/LefVk1Y4rPhw==", "cpu": [ "arm64" ], @@ -1707,9 +1699,9 @@ } }, "node_modules/@rolldown/binding-linux-arm64-musl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.3.tgz", - "integrity": "sha512-VWkUHwWriDciit80wleYwKILoR/KMvxh/IdwS/paX+ZgpuRpCrKLUdadJbc0NpBEiyhpYawsJ73j9aCvOH+f7Q==", + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.15.tgz", + "integrity": "sha512-uN26XOnVR7rqQupG3V9oAG2EGGatWjcJHOeDOHUFCh4TBWmP2tHTFoVN13aYbwfm0aHqJAEmcwhAu6sooIjfqQ==", "cpu": [ "arm64" ], @@ -1723,9 +1715,9 @@ } }, "node_modules/@rolldown/binding-linux-ppc64-gnu": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.3.tgz", - "integrity": "sha512-5f1laC0SlIR0yDbFCd8acUhvJIag6N3zC5P7oUPN6wX0aOma+uKJ0wBDH5aq7I1PVI2ttTlhJwzwRIBnLiSGEg==", + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.15.tgz", + "integrity": "sha512-9nWkcdd+H+XhaA3fQIwpHnKIrfx/PQ6rO0pivr78Og07tXlUlctBBJoEYLPfhTmCR/QxEVdn6uPjHV5SymPhdw==", "cpu": [ "ppc64" ], @@ -1739,9 +1731,9 @@ } }, "node_modules/@rolldown/binding-linux-s390x-gnu": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.3.tgz", - "integrity": "sha512-Iq4ko0r4XsgbrF/LunNgHtAGLRRVE2kXonAXQ/MV0mC6jQpMOhW1SvtZja2EhC/kd05++bP78dsqBeIQyYJ6Yg==", + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.15.tgz", + "integrity": "sha512-Ggh0ciFjLwIusLSLz7LZYEaGdxOAUJXI+Qu5JCbhPJJHEt8vP+IjRATTJheiJsdzzTYgUiHUiw3X1Ea3ZpMBdA==", "cpu": [ "s390x" ], @@ -1755,9 +1747,9 @@ } }, "node_modules/@rolldown/binding-linux-x64-gnu": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.3.tgz", - "integrity": "sha512-B8m6tD5+/N5FeNQFbKlLA/2yVq9ycQP1SeedyEYYKWBNR3ZQbkvIUcNnDNM03lO1l5F2roiiFJGgvoLLyZXtSg==", + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.15.tgz", + "integrity": "sha512-FHg60rS6DBePAYZ9X9F67x+JObFdmgn6tupA1C/a3B+CufFmTD4mX+e8M75tCiAO3foR/6xwVBI0KQiI7sn/rw==", "cpu": [ "x64" ], @@ -1771,9 +1763,9 @@ } }, "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.3.tgz", - "integrity": "sha512-pSdpdUJHkuCxun9LE7jvgUB9qsRgaiyNNCX7m/AvHTcq67AiT/Yhoxvw5zPfhrM8k/BfP8ce/hMOpthKDpEUow==", + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.15.tgz", + "integrity": "sha512-/cvV/7v5VGz/moiz0XKRj2dE8DzsKyhIu1KpOvJGPjRywg3yscON889UGvAe8zfiJLHup7VLjBduoGWi3HusWQ==", "cpu": [ "x64" ], @@ -1787,9 +1779,9 @@ } }, "node_modules/@rolldown/binding-openharmony-arm64": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.3.tgz", - "integrity": "sha512-OXXS3RKJgX2uLwM+gYyuH5omcH8fL1LJs96pZGgtetVCahON57+d4SJHzTgZiOjxgGkSnpXpOsWuPDGAKAigEg==", + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.15.tgz", + "integrity": "sha512-MyzC5Hrv/sm+Z7TSGKP/j8001RO2xQm1zOpCNVL4j0cY/VhBZviludA2YFQ7i4lH6ZAXxQm0lcMdBzM+99mE7w==", "cpu": [ "arm64" ], @@ -1802,59 +1794,10 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@rolldown/binding-wasm32-wasi": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.3.tgz", - "integrity": "sha512-JTtb8BWFynicNSoPrehsCzBtOKjZ6jhMiPFEmOiuXg1Fl8dn2KHQob+GuPSGR0dryQa1PQJbzjF3dqO/whhjLg==", - "cpu": [ - "wasm32" - ], - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/core": "1.10.0", - "@emnapi/runtime": "1.10.0", - "@napi-rs/wasm-runtime": "^1.1.4" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-wasm32-wasi/node_modules/@emnapi/core": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", - "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/wasi-threads": "1.2.1", - "tslib": "^2.4.0" - } - }, - "node_modules/@rolldown/binding-wasm32-wasi/node_modules/@emnapi/runtime": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz", - "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==", - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@rolldown/binding-wasm32-wasi/node_modules/@emnapi/wasi-threads": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", - "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, "node_modules/@rolldown/binding-win32-arm64-msvc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.3.tgz", - "integrity": "sha512-gEdFFEN70A/jxb2svrWsN3aDL7OUtmvlOy+6fa2jxG8K0wQ1ZbdeLGnidov6Yu5/733dI5ySfzFlQ/cb0bSz1g==", + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.15.tgz", + "integrity": "sha512-+PgYiS+AH5omy6L45ZLxybasauJaj3M8buoT83D+nzPmCayXlxUV9hydhciCKVyIg0B/v0BtXPDE1uGqNwCPpg==", "cpu": [ "arm64" ], @@ -1868,9 +1811,9 @@ } }, "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.3.tgz", - "integrity": "sha512-eXB7CHuaQdqmJcc3koCNtNPmT/bj2gc999kUFgBxG8Ac0NdgXc4rkCHhqrgrhN3zddvvvrgzj1e90SuSfmyIXA==", + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.15.tgz", + "integrity": "sha512-HFZd2QNQYn1JbIi+Hpd7H+r/lkWxcfIu28nirZ6eCn2LafuvmExMlb/P96Sfx5tf7pPArw39IdhmCF8vmV+NhQ==", "cpu": [ "x64" ], @@ -1934,52 +1877,35 @@ } }, "node_modules/@rrweb/replay": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@rrweb/replay/-/replay-2.0.0.tgz", - "integrity": "sha512-7sc2y/jz5psKDxdHuLPJjmMm1vvv8P9KaAhSBaWIgT8zn6xkKgPP7KkkB22PzAAyC0RqXmztxj/us6+XHLoHjg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@rrweb/replay/-/replay-2.2.0.tgz", + "integrity": "sha512-dKug7wlnM2nlIhhHKUjHaz4+1b0duMe6wgo+97eU6CjV0R7yoKvW6NDKlSQQdWx99VMOZMvHTbMbwDQl5CRM1w==", "license": "MIT", "dependencies": { - "@rrweb/types": "^2.0.0", - "rrweb": "^2.0.0" + "@rrweb/types": "^2.2.0", + "rrweb": "^2.2.0" } }, "node_modules/@rrweb/types": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@rrweb/types/-/types-2.0.0.tgz", - "integrity": "sha512-p76i3Bdm/cjb/6NGqmFj0LkGXqC2dXs70AwirgVAsE1ndIa00TJo48La5yobHLsBOk5bfRHy6Yd+9O9VFKhAwQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@rrweb/types/-/types-2.2.0.tgz", + "integrity": "sha512-2gTA/pRpIbuET123oSdX5ZUDZfWCOIMYBvpSai3fr5pk9LcbccPqqaXflX+roP4oKenLjNtJPGpFK3BfYeBKnA==", "license": "MIT" }, "node_modules/@rrweb/utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@rrweb/utils/-/utils-2.0.0.tgz", - "integrity": "sha512-0Q9djyxlwG1fs1TxT7VnKtt33tHku6PENlUAKSXZg8QSSI6aUXdCNZkkBt3JAgbBYVrGhQsYrz+DkCdAXqxs1w==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@rrweb/utils/-/utils-2.2.0.tgz", + "integrity": "sha512-e8FEp8wLswqgjDHpQNUUVfEXeDsrRMOVouvqIGKvnPxKYonjLlh0mU3O/17QNvCixFG5eUFR1B2jgTdiLlZxeQ==", "license": "MIT" }, - "node_modules/@standard-schema/spec": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", - "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tybys/wasm-util": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.2.tgz", - "integrity": "sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==", - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, "node_modules/@types/bun": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@types/bun/-/bun-1.4.0.tgz", - "integrity": "sha512-K+lZULY23vRgK/CfTjFIV+tyifaNdSMlPh9j+6mQ/cLfpOznLyAuzgV/JQysyECpkBQLVMSyvjlr2fBUSA9wFQ==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@types/bun/-/bun-1.4.4.tgz", + "integrity": "sha512-9wkRDXUXK124pEnAutE6n/l18j+i9GC5IAHK8TmX/2nlySETmky0OU6yL5U8pW1AoKh++AN9auDCr647BfurjQ==", "dev": true, "license": "MIT", "dependencies": { - "bun-types": "1.4.0" + "bun-types": "1.4.4" } }, "node_modules/@types/chai": { @@ -2047,9 +1973,9 @@ "integrity": "sha512-trgaNyfU+Xh2Tc+ABIb44a5AYUpicB3uwirOioeOkNPPbmgRNtcWyDeeFRzjPZENO9Vq8gvVqfhaaXWLlevVwg==" }, "node_modules/@types/lodash": { - "version": "4.17.24", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.24.tgz", - "integrity": "sha512-gIW7lQLZbue7lRSWEFql49QJJWThrTFFeIMJdp3eH4tKoxm1OvEPg02rm4wCCSHS0cL3/Fizimb35b7k8atwsQ==", + "version": "4.17.27", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.27.tgz", + "integrity": "sha512-VenMRv/eKNrspX9v3H4dbmjsrnCOYdYBG3kxXKk3dG6X+urBGcj2Prww3xw1U5K4FV/mE4h5GbWd0szEKf+9ew==", "license": "MIT" }, "node_modules/@types/lodash-es": { @@ -2110,63 +2036,397 @@ "@types/node": "*" } }, + "node_modules/@typescript/typescript-aix-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-aix-ppc64/-/typescript-aix-ppc64-7.0.2.tgz", + "integrity": "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-arm64/-/typescript-darwin-arm64-7.0.2.tgz", + "integrity": "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-x64/-/typescript-darwin-x64-7.0.2.tgz", + "integrity": "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-arm64/-/typescript-freebsd-arm64-7.0.2.tgz", + "integrity": "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-x64/-/typescript-freebsd-x64-7.0.2.tgz", + "integrity": "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm/-/typescript-linux-arm-7.0.2.tgz", + "integrity": "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm64/-/typescript-linux-arm64-7.0.2.tgz", + "integrity": "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-loong64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-loong64/-/typescript-linux-loong64-7.0.2.tgz", + "integrity": "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-mips64el": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-mips64el/-/typescript-linux-mips64el-7.0.2.tgz", + "integrity": "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-ppc64/-/typescript-linux-ppc64-7.0.2.tgz", + "integrity": "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-riscv64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-riscv64/-/typescript-linux-riscv64-7.0.2.tgz", + "integrity": "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-s390x": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-s390x/-/typescript-linux-s390x-7.0.2.tgz", + "integrity": "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-x64/-/typescript-linux-x64-7.0.2.tgz", + "integrity": "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-arm64/-/typescript-netbsd-arm64-7.0.2.tgz", + "integrity": "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-x64/-/typescript-netbsd-x64-7.0.2.tgz", + "integrity": "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-arm64/-/typescript-openbsd-arm64-7.0.2.tgz", + "integrity": "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-x64/-/typescript-openbsd-x64-7.0.2.tgz", + "integrity": "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-sunos-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-sunos-x64/-/typescript-sunos-x64-7.0.2.tgz", + "integrity": "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-arm64/-/typescript-win32-arm64-7.0.2.tgz", + "integrity": "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-x64/-/typescript-win32-x64-7.0.2.tgz", + "integrity": "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, "node_modules/@vitest/browser": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/browser/-/browser-4.1.11.tgz", - "integrity": "sha512-bwMovvAeuTFOK5kIFevw4VEf+1gVEICv4SYK4k3knJOxl6b1zEWud8mYKD73e1B0odAn174h1MofURy2TPWf3w==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@vitest/browser/-/browser-5.0.5.tgz", + "integrity": "sha512-IDMoZX/iZ8rkilw7weaSgN8tJ7iZ9hUv0wYoKXyiyjWjWFwLSWAY707DcVTgxTYOudWC1E3HA9LYn7kVa9a7uQ==", "dev": true, "license": "MIT", "dependencies": { - "@blazediff/core": "1.9.1", - "@vitest/mocker": "4.1.11", - "@vitest/utils": "4.1.11", - "magic-string": "^0.30.21", + "@blazediff/core": "1.10.0", + "@vitest/mocker": "5.0.5", + "@vitest/ui": "5.0.5", + "@vitest/utils": "5.0.5", + "magic-string": "^1.4.3", "pngjs": "^7.0.0", "sirv": "^3.0.2", - "tinyrainbow": "^3.1.0", - "ws": "^8.19.0" + "tinyrainbow": "^3.2.0", + "ws": "^8.22.0" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "vitest": "4.1.11" + "vitest": "5.0.5" } }, - "node_modules/@vitest/expect": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.11.tgz", - "integrity": "sha512-VX2x5vNJXET47KAFzwERI+KRMtTTCSWTfSMKsW7JsUsXV4psq++e3DvZpuTDOpHcxytiDs6p2nhVb2tVDiiUYw==", + "node_modules/@vitest/browser/node_modules/magic-string": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.4.tgz", + "integrity": "sha512-jQz9sVhrZuphH4NrAIHSgkDJCluQO7Ioi4KGRLa7aTUjAODQ13hENX0YIytqYE/rIkO485gQG2LeBxJaW53kkQ==", "dev": true, "license": "MIT", "dependencies": { - "@standard-schema/spec": "^1.1.0", - "@types/chai": "^5.2.2", - "@vitest/spy": "4.1.11", - "@vitest/utils": "4.1.11", - "chai": "^6.2.2", - "tinyrainbow": "^3.1.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" + "@jridgewell/sourcemap-codec": "^1.6.0" } }, "node_modules/@vitest/mocker": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.11.tgz", - "integrity": "sha512-2XJVD55d1o5AZous5CCGKS74g/riOj9odEt2bQpCVZeblHyHdnMeFl4jl0XjU21stf4mbjUkew2eXQZt65g5CQ==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-5.0.5.tgz", + "integrity": "sha512-xLL3lkDegJZw+MGoGaCCsFayDZthGgpAtr3Vziyfc4p7xH89K7KRPcRBBh/kEYm0Aqkt5DtTmkYpBtRV/FrHZg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "4.1.11", + "@jridgewell/trace-mapping": "0.3.31", + "@vitest/spy": "5.0.5", "estree-walker": "^3.0.3", - "magic-string": "^0.30.21" + "magic-string": "^1.4.3" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "msw": "^2.4.9", + "msw": "^2.4.9 || ^3.0.0", "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { @@ -2188,69 +2448,70 @@ "@types/estree": "^1.0.0" } }, + "node_modules/@vitest/mocker/node_modules/magic-string": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.4.tgz", + "integrity": "sha512-jQz9sVhrZuphH4NrAIHSgkDJCluQO7Ioi4KGRLa7aTUjAODQ13hENX0YIytqYE/rIkO485gQG2LeBxJaW53kkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.6.0" + } + }, "node_modules/@vitest/pretty-format": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.11.tgz", - "integrity": "sha512-yiZzPbGTS9Sr/JpFl8zHrcIkAofNbFV6k21vIgQN/cY/oxZeXhJv5sc/MBJ5jFKWmWs+oJHw0UXLZjmf931+Vw==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-5.0.5.tgz", + "integrity": "sha512-24sSdIlMA9DVPXnYiB9siwU0bTd887Y9jX3+vabztCSsvHwo7ipvJ/a2L3Rljw8+2rK1f5fCj3h5U9I/Jsqgbw==", "dev": true, "license": "MIT", "dependencies": { - "tinyrainbow": "^3.1.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/runner": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.11.tgz", - "integrity": "sha512-LztvUgdwMNJMIkj3hQnnxiC2Xy1zNxq928W/xhjCLaNCzqTZOudjwbQf6v9IntZGPw132i2Lq2rgTRZHD3JHNw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/utils": "4.1.11", - "pathe": "^2.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/snapshot": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.11.tgz", - "integrity": "sha512-pN7ikn1ON7h8ee4gIAp4AzyK+zBtJPzVbqOgu5LCEh4VaJVbPQcgYQYJIMGQPXVeJJq1fnfazis7a5pFNPahog==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/pretty-format": "4.1.11", - "@vitest/utils": "4.1.11", - "magic-string": "^0.30.21", - "pathe": "^2.0.3" + "tinyrainbow": "^3.2.0" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/spy": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.11.tgz", - "integrity": "sha512-apNa/prQy2qCeywhnixOHPRCgGNhvg7T4Dapfl1GahLp/R+uhBm5cPyFoNVyqsNd2h1nJxL6BqqdIjiABL60YA==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-5.0.5.tgz", + "integrity": "sha512-lwJRExuH417257Q5wv9QYugN9IMJkoxcrKrYxGPQkBzl7wlNpTUxD/5yNX4ESKVUIShKPgkGchYPFMWOOk0wzw==", "dev": true, "license": "MIT", "funding": { "url": "https://opencollective.com/vitest" } }, - "node_modules/@vitest/utils": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.11.tgz", - "integrity": "sha512-zTCVGpyFsGWBhllOyKlTw/vnr6D9qxsfSDyfbyZmTyjHw5N/VuvzHpHoQjm2ZJzn4RJgx5w4r7V0er69CmLgPQ==", + "node_modules/@vitest/ui": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-5.0.5.tgz", + "integrity": "sha512-dCoGUOdgmCaSB2g+WQ/spPCBkytAWdNUkFSXY4z+eYp2d8JEOY8v0uDRaJTG9qf/kTlTVZ4CuYMYMz/f1HS/qQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.1.11", + "@vitest/utils": "5.0.5", + "fflate": "^0.8.3", + "flatted": "^3.4.4", + "pathe": "^2.0.3", + "sirv": "^3.0.2", + "tinyrainbow": "^3.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "vitest": "5.0.5" + } + }, + "node_modules/@vitest/utils": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-5.0.5.tgz", + "integrity": "sha512-/rBu7gzLDQI/SC79Tn98b5DwOgaHU/Gt4I9OVeP3YofzNaYtbImRCOJQmT1S6vOJg9gEIlWC+r3QxKkjuSa1nQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "5.0.5", "convert-source-map": "^2.0.0", - "tinyrainbow": "^3.1.0" + "tinyrainbow": "^3.2.0" }, "funding": { "url": "https://opencollective.com/vitest" @@ -2668,13 +2929,14 @@ "dev": true }, "node_modules/bun-types": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/bun-types/-/bun-types-1.4.0.tgz", - "integrity": "sha512-iIKw23BspnQQYd3prITOBxeUsxBHnwzX6YJfGMuNOZzeNcMmVqzIIVGRm1l69ogaPQmb4wB6BN8mA5bE9YuC5Q==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/bun-types/-/bun-types-1.4.4.tgz", + "integrity": "sha512-yjrJh5oGX7mMPKGd19YXyIjmEuj4G4zNC30bs7PM9Az7NQ3ndF3j6hbeRdvJTRQEhJ/FYQwW0a2moweEi2hMxQ==", "dev": true, "license": "MIT", "dependencies": { - "@types/node": "*" + "@types/node": "*", + "undici-types": "*" } }, "node_modules/call-bind": { @@ -2734,9 +2996,9 @@ } }, "node_modules/chai": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", - "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-6.3.0.tgz", + "integrity": "sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==", "dev": true, "license": "MIT", "engines": { @@ -2950,9 +3212,9 @@ } }, "node_modules/date-fns": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.3.0.tgz", - "integrity": "sha512-OYcL+3N/jyWbYdFGqoMAhytDgxP9pbYPUUiRCOgn4Fewaadk9l/Wam4Avciiyp2BgkpfQyBV9B+ehnVJych+eQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.4.0.tgz", + "integrity": "sha512-+1UMbeh68lH1SegH83CGWwpb6OHHbpSgr3+s5Eww5M4CAgswBpoWS0AjTOfEJ33HiYKz1hdj/KTFprzXHmq/6w==", "license": "MIT", "funding": { "type": "github", @@ -3196,9 +3458,9 @@ } }, "node_modules/es-module-lexer": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.1.0.tgz", - "integrity": "sha512-n27zTYMjYu1aj4MjCWzSP7G9r75utsaoc8m61weK+W8JMBGGQybd43GstCXZ3WNmSFtGT9wi59qQTW6mhTR5LQ==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz", + "integrity": "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==", "dev": true, "license": "MIT" }, @@ -3314,9 +3576,9 @@ } }, "node_modules/expect-type": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz", - "integrity": "sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz", + "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -3345,6 +3607,13 @@ } } }, + "node_modules/fflate": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.3.tgz", + "integrity": "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==", + "dev": true, + "license": "MIT" + }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -3361,6 +3630,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/flatted": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz", + "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==", + "dev": true, + "license": "ISC" + }, "node_modules/for-each": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", @@ -3448,9 +3724,9 @@ } }, "node_modules/happy-dom": { - "version": "20.14.0", - "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-20.14.0.tgz", - "integrity": "sha512-4bRh1KzRvKDnFNTlLhzT1RZTpkKhQbQDl9j+7GXszWsvuspYdo29k6OHRf4PwiM6oLb8r/pMWeYiJjkfod5AvQ==", + "version": "21.0.4", + "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-21.0.4.tgz", + "integrity": "sha512-tFm+GaLBgo6o0awHnvHaNoraVo27qJ+2tZEtZ+cIa08hXbeitrxAJajLI05hsUy/2/YTKcUjQYzHe5mCcraLBw==", "dev": true, "license": "MIT", "dependencies": { @@ -3851,9 +4127,9 @@ } }, "node_modules/lightningcss": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", - "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", "license": "MPL-2.0", "dependencies": { "detect-libc": "^2.0.3" @@ -3866,23 +4142,23 @@ "url": "https://opencollective.com/parcel" }, "optionalDependencies": { - "lightningcss-android-arm64": "1.32.0", - "lightningcss-darwin-arm64": "1.32.0", - "lightningcss-darwin-x64": "1.32.0", - "lightningcss-freebsd-x64": "1.32.0", - "lightningcss-linux-arm-gnueabihf": "1.32.0", - "lightningcss-linux-arm64-gnu": "1.32.0", - "lightningcss-linux-arm64-musl": "1.32.0", - "lightningcss-linux-x64-gnu": "1.32.0", - "lightningcss-linux-x64-musl": "1.32.0", - "lightningcss-win32-arm64-msvc": "1.32.0", - "lightningcss-win32-x64-msvc": "1.32.0" + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" } }, "node_modules/lightningcss-android-arm64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", - "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", "cpu": [ "arm64" ], @@ -3900,9 +4176,9 @@ } }, "node_modules/lightningcss-darwin-arm64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", - "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", "cpu": [ "arm64" ], @@ -3920,9 +4196,9 @@ } }, "node_modules/lightningcss-darwin-x64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", - "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", "cpu": [ "x64" ], @@ -3940,9 +4216,9 @@ } }, "node_modules/lightningcss-freebsd-x64": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", - "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", "cpu": [ "x64" ], @@ -3960,9 +4236,9 @@ } }, "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", - "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", "cpu": [ "arm" ], @@ -3980,9 +4256,9 @@ } }, "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", - "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", "cpu": [ "arm64" ], @@ -4000,9 +4276,9 @@ } }, "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", - "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", "cpu": [ "arm64" ], @@ -4020,9 +4296,9 @@ } }, "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", - "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", "cpu": [ "x64" ], @@ -4040,9 +4316,9 @@ } }, "node_modules/lightningcss-linux-x64-musl": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", - "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", "cpu": [ "x64" ], @@ -4060,9 +4336,9 @@ } }, "node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", - "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", "cpu": [ "arm64" ], @@ -4080,9 +4356,9 @@ } }, "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", - "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", "cpu": [ "x64" ], @@ -5076,12 +5352,12 @@ "license": "MIT" }, "node_modules/monaco-editor": { - "version": "0.55.1", - "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.55.1.tgz", - "integrity": "sha512-jz4x+TJNFHwHtwuV9vA9rMujcZRb0CEilTEwG2rRSpe/A7Jdkuj8xPKttCgOh+v/lkHy7HsZ64oj+q3xoAFl9A==", + "version": "0.57.0", + "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.57.0.tgz", + "integrity": "sha512-5BkI9KGoqrNvBGUe15/QlZq3OooZ8WLg1AxTpaqHRCP3HNpzPPZKE2EDz8M7c+VRmCeUw1Brp4cx/PWm3kI/5A==", "license": "MIT", "dependencies": { - "dompurify": "3.2.7", + "dompurify": "3.4.15", "marked": "14.0.0" } }, @@ -5223,15 +5499,18 @@ } }, "node_modules/obug": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.1.tgz", - "integrity": "sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/obug/-/obug-3.0.0.tgz", + "integrity": "sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==", "dev": true, "funding": [ "https://github.com/sponsors/sxzz", "https://opencollective.com/debug" ], - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=12.20.0" + } }, "node_modules/orderedmap": { "version": "2.1.1", @@ -5362,9 +5641,9 @@ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" }, "node_modules/picomatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", - "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", "license": "MIT", "engines": { "node": ">=12" @@ -5898,12 +6177,12 @@ "license": "MIT" }, "node_modules/rolldown": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.3.tgz", - "integrity": "sha512-i00lAJ2ks1BYr7rjNjKC7BcqAS7nVfiT3QX1SI5aY+AFHblCmaUf9OE9dbdzDvW6dJxbi2ZCZiy9v3CcwOiX3g==", + "version": "1.2.15", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.15.tgz", + "integrity": "sha512-6odND+fel5zVw3I4Yc2e69gvguDnX0CAAGiNDZSq4ik5WUcaLrkD2GLuog0XcODbor31hZ5ayEMgVDno+KPV5g==", "license": "MIT", "dependencies": { - "@oxc-project/types": "=0.133.0", + "@oxc-project/types": "=0.155.0", "@rolldown/pluginutils": "^1.0.0" }, "bin": { @@ -5913,21 +6192,21 @@ "node": "^20.19.0 || >=22.12.0" }, "optionalDependencies": { - "@rolldown/binding-android-arm64": "1.0.3", - "@rolldown/binding-darwin-arm64": "1.0.3", - "@rolldown/binding-darwin-x64": "1.0.3", - "@rolldown/binding-freebsd-x64": "1.0.3", - "@rolldown/binding-linux-arm-gnueabihf": "1.0.3", - "@rolldown/binding-linux-arm64-gnu": "1.0.3", - "@rolldown/binding-linux-arm64-musl": "1.0.3", - "@rolldown/binding-linux-ppc64-gnu": "1.0.3", - "@rolldown/binding-linux-s390x-gnu": "1.0.3", - "@rolldown/binding-linux-x64-gnu": "1.0.3", - "@rolldown/binding-linux-x64-musl": "1.0.3", - "@rolldown/binding-openharmony-arm64": "1.0.3", - "@rolldown/binding-wasm32-wasi": "1.0.3", - "@rolldown/binding-win32-arm64-msvc": "1.0.3", - "@rolldown/binding-win32-x64-msvc": "1.0.3" + "@rolldown/binding-android-arm-eabi": "1.2.15", + "@rolldown/binding-android-arm64": "1.2.15", + "@rolldown/binding-darwin-arm64": "1.2.15", + "@rolldown/binding-darwin-x64": "1.2.15", + "@rolldown/binding-freebsd-x64": "1.2.15", + "@rolldown/binding-linux-arm-gnueabihf": "1.2.15", + "@rolldown/binding-linux-arm64-gnu": "1.2.15", + "@rolldown/binding-linux-arm64-musl": "1.2.15", + "@rolldown/binding-linux-ppc64-gnu": "1.2.15", + "@rolldown/binding-linux-s390x-gnu": "1.2.15", + "@rolldown/binding-linux-x64-gnu": "1.2.15", + "@rolldown/binding-linux-x64-musl": "1.2.15", + "@rolldown/binding-openharmony-arm64": "1.2.15", + "@rolldown/binding-win32-arm64-msvc": "1.2.15", + "@rolldown/binding-win32-x64-msvc": "1.2.15" } }, "node_modules/rope-sequence": { @@ -5936,34 +6215,34 @@ "integrity": "sha512-UT5EDe2cu2E/6O4igUr5PSFs23nvvukicWHx6GnOPlHAiiYbzNuCRQCuiUdHJQcqKalLKlrYJnjY0ySGsXNQXQ==" }, "node_modules/rrdom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/rrdom/-/rrdom-2.0.0.tgz", - "integrity": "sha512-Yv+T/IBngNEjhbRv6yJzKdbhgMOiRCV+UA3R0HOpx4yySc8vl4I11Xr5BxCYrnt00l7CGjHbFB9VULEvcg1u6w==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/rrdom/-/rrdom-2.2.0.tgz", + "integrity": "sha512-gxcBJWVtS/Xz+Ys8xcjPoWqr+C7wz/MS8NgmKw136I47Xygy17FYOGZqoGwEyvBn724jRDK1ljS+8w9FsZStOg==", "license": "MIT", "dependencies": { - "rrweb-snapshot": "^2.0.0" + "rrweb-snapshot": "^2.2.0" } }, "node_modules/rrweb": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/rrweb/-/rrweb-2.0.0.tgz", - "integrity": "sha512-ID7NE8OdfAbxZKlTPc/EdL/8sLhTOVB1aZKoQ/M0peKGYB7dIDj0hsdJo+OVXfpiYMTtGzXnKfnMVUj4LnsrhQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/rrweb/-/rrweb-2.2.0.tgz", + "integrity": "sha512-ofVzPq11/yIQ7WhVb++rJGI2LoPPrxdqu0QAvRA4KGeXJ7LH52jQ0VlRH4+VXn5PA/7pz85/rRkQyBUqT1LraQ==", "license": "MIT", "dependencies": { - "@rrweb/types": "^2.0.0", - "@rrweb/utils": "^2.0.0", + "@rrweb/types": "^2.2.0", + "@rrweb/utils": "^2.2.0", "@types/css-font-loading-module": "0.0.7", "@xstate/fsm": "^1.4.0", "base64-arraybuffer": "^1.0.1", "mitt": "^3.0.0", - "rrdom": "^2.0.0", - "rrweb-snapshot": "^2.0.0" + "rrdom": "^2.2.0", + "rrweb-snapshot": "^2.2.0" } }, "node_modules/rrweb-snapshot": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/rrweb-snapshot/-/rrweb-snapshot-2.0.0.tgz", - "integrity": "sha512-mDYvvHVXYUD6wZj2AGz5UuupnYnhrWUmF+Hm+haZtVPx8bK3hpAMpu7YjPAoHVluv6KZJNJvVb/6HeBKwXTAvA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/rrweb-snapshot/-/rrweb-snapshot-2.2.0.tgz", + "integrity": "sha512-Tg/PiCLy+zV9C0Jfb4IAGABtt5l/UOvwW5xjFk41ZQhBfUjeqPP1rZ9HMDrFPc7cawCUEenWw54+g/4vluO5lg==", "license": "MIT", "dependencies": { "postcss": "^8.4.38" @@ -6134,12 +6413,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/siginfo": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", - "dev": true - }, "node_modules/sirv": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.2.tgz", @@ -6173,12 +6446,6 @@ "node": ">=0.10.0" } }, - "node_modules/stackback": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", - "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", - "dev": true - }, "node_modules/static-eval": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.1.1.tgz", @@ -6189,9 +6456,9 @@ } }, "node_modules/std-env": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.1.0.tgz", - "integrity": "sha512-Rq7ybcX2RuC55r9oaPVEW7/xu3tj8u4GeBYHBWCychFtzMIr86A7e3PPEBPT37sHStKX3+TiX/Fr/ACmJLVlLQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.3.0.tgz", + "integrity": "sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==", "dev": true, "license": "MIT" }, @@ -6262,15 +6529,19 @@ } }, "node_modules/tinybench": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", - "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", - "dev": true + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-6.2.2.tgz", + "integrity": "sha512-nIZ2N2dFpjBsg2hgitKu7mA+FvsIJuGJOwysRngmVRRmWgR/UyPjwJj8c/fT/dhm8EkHnF5EOogRf+0Z2qrimA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.0.0" + } }, "node_modules/tinyexec": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.2.tgz", - "integrity": "sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.1.tgz", + "integrity": "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==", "dev": true, "license": "MIT", "engines": { @@ -6294,9 +6565,9 @@ } }, "node_modules/tinyrainbow": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.0.tgz", - "integrity": "sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.2.0.tgz", + "integrity": "sha512-LgO3D9yZJjApUiuUfl9iFAwrtaX4+lok3wJIqttGoKCHlWUqHqbQpnxCf82L8FjgKsh4iGo78hqJwgL8F6To2A==", "dev": true, "license": "MIT", "engines": { @@ -6427,17 +6698,38 @@ } }, "node_modules/typescript": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", - "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz", + "integrity": "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==", "devOptional": true, "license": "Apache-2.0", "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" + "tsc": "bin/tsc" }, "engines": { - "node": ">=14.17" + "node": ">=16.20.0" + }, + "optionalDependencies": { + "@typescript/typescript-aix-ppc64": "7.0.2", + "@typescript/typescript-darwin-arm64": "7.0.2", + "@typescript/typescript-darwin-x64": "7.0.2", + "@typescript/typescript-freebsd-arm64": "7.0.2", + "@typescript/typescript-freebsd-x64": "7.0.2", + "@typescript/typescript-linux-arm": "7.0.2", + "@typescript/typescript-linux-arm64": "7.0.2", + "@typescript/typescript-linux-loong64": "7.0.2", + "@typescript/typescript-linux-mips64el": "7.0.2", + "@typescript/typescript-linux-ppc64": "7.0.2", + "@typescript/typescript-linux-riscv64": "7.0.2", + "@typescript/typescript-linux-s390x": "7.0.2", + "@typescript/typescript-linux-x64": "7.0.2", + "@typescript/typescript-netbsd-arm64": "7.0.2", + "@typescript/typescript-netbsd-x64": "7.0.2", + "@typescript/typescript-openbsd-arm64": "7.0.2", + "@typescript/typescript-openbsd-x64": "7.0.2", + "@typescript/typescript-sunos-x64": "7.0.2", + "@typescript/typescript-win32-arm64": "7.0.2", + "@typescript/typescript-win32-x64": "7.0.2" } }, "node_modules/underscore": { @@ -6447,9 +6739,9 @@ "license": "MIT" }, "node_modules/undici": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-7.25.0.tgz", - "integrity": "sha512-xXnp4kTyor2Zq+J1FfPI6Eq3ew5h6Vl0F/8d9XU5zZQf1tX9s2Su1/3PiMmUANFULpmksxkClamIZcaUqryHsQ==", + "version": "7.30.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.30.1.tgz", + "integrity": "sha512-03KrMbjIFDWQR5RNPrSw3bd1r12JpyFQl9/yxjUbJtqkjmllqC5lFjZh6ujeuJCKr8EOQvRW872Oy/az+nLYxg==", "dev": true, "license": "MIT", "engines": { @@ -6604,15 +6896,15 @@ } }, "node_modules/vite": { - "version": "8.0.16", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.16.tgz", - "integrity": "sha512-h9bXPmJichP5fLmVQo3PyaGSDE2n3aPuomeAlVRm0JLmt4rY6zmPKd59HYI4LNW8oTK7tlTsuC7l/m7awx9Jcw==", + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.3.5.tgz", + "integrity": "sha512-z1YpjieJ9g0ebTmQpLBv/oq9E3F9EIlOe+7LahW8SrE3LTiG3udBRUXQOlYXP9b+IC2q2phHeVxj9xGlw34OEQ==", "license": "MIT", "dependencies": { - "lightningcss": "^1.32.0", - "picomatch": "^4.0.4", - "postcss": "^8.5.15", - "rolldown": "1.0.3", + "lightningcss": "^1.33.0", + "picomatch": "^4.0.7", + "postcss": "^8.5.30", + "rolldown": "~1.2.14", "tinyglobby": "^0.2.17" }, "bin": { @@ -6629,7 +6921,7 @@ }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", - "@vitejs/devtools": "^0.1.18", + "@vitejs/devtools": "^0.7.1 || ^0.8.0", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", @@ -6707,38 +6999,31 @@ } }, "node_modules/vitest": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.11.tgz", - "integrity": "sha512-fhACrNXUidIbGSBr5FlbuBkO7VWC1ZyLl0DO4CU2DrQoAPxX84Ysxs+HeGQpii5lZWV1Q4gBZTTu49mF+A6Edw==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-5.0.5.tgz", + "integrity": "sha512-cPODOMF8YnkiiYtDdHo6n4wWmBrOBBbOIYH2d33M4l3CdNn72h+qMmO6uXffUN6A5AZFXNND/d+krS9mgkXRfg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/expect": "4.1.11", - "@vitest/mocker": "4.1.11", - "@vitest/pretty-format": "4.1.11", - "@vitest/runner": "4.1.11", - "@vitest/snapshot": "4.1.11", - "@vitest/spy": "4.1.11", - "@vitest/utils": "4.1.11", - "es-module-lexer": "^2.0.0", - "expect-type": "^1.3.0", - "magic-string": "^0.30.21", - "obug": "^2.1.1", - "pathe": "^2.0.3", - "picomatch": "^4.0.3", - "std-env": "^4.0.0-rc.1", - "tinybench": "^2.9.0", - "tinyexec": "^1.0.2", - "tinyglobby": "^0.2.15", - "tinyrainbow": "^3.1.0", - "vite": "^6.0.0 || ^7.0.0 || ^8.0.0", - "why-is-node-running": "^2.3.0" + "@types/chai": "^5.2.2", + "@vitest/mocker": "5.0.5", + "chai": "^6.3.0", + "es-module-lexer": "^2.3.2", + "expect-type": "^1.4.0", + "magic-string": "^1.4.3", + "obug": "^3.0.0", + "picomatch": "^4.0.7", + "std-env": "^4.3.0", + "tinybench": "^6.2.2", + "tinyexec": "^1.3.1", + "tinyglobby": "^0.2.17", + "why-is-node-running": "3.2.1" }, "bin": { "vitest": "vitest.mjs" }, "engines": { - "node": "^20.0.0 || ^22.0.0 || >=24.0.0" + "node": "^22.12.0 || ^24.0.0 || >=26.0.0" }, "funding": { "url": "https://opencollective.com/vitest" @@ -6746,16 +7031,16 @@ "peerDependencies": { "@edge-runtime/vm": "*", "@opentelemetry/api": "^1.9.0", - "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", - "@vitest/browser-playwright": "4.1.11", - "@vitest/browser-preview": "4.1.11", - "@vitest/browser-webdriverio": "4.1.11", - "@vitest/coverage-istanbul": "4.1.11", - "@vitest/coverage-v8": "4.1.11", - "@vitest/ui": "4.1.11", + "@types/node": "^22.0.0 || >=24.0.0", + "@vitest/browser-playwright": "5.0.5", + "@vitest/browser-preview": "5.0.5", + "@vitest/browser-webdriverio": "^5.0.0-beta.5 || >=5.0.0", + "@vitest/coverage-istanbul": "5.0.5", + "@vitest/coverage-v8": "5.0.5", + "@vitest/ui": "5.0.5", "happy-dom": "*", "jsdom": "*", - "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + "vite": "^6.4.0 || ^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "@edge-runtime/vm": { @@ -6797,9 +7082,9 @@ } }, "node_modules/vitest-canvas-mock": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/vitest-canvas-mock/-/vitest-canvas-mock-1.1.5.tgz", - "integrity": "sha512-PWtzolkO/GsG9I9qsLxJ8HzdXQKNz1iRVUcCDJbNBiDuxMp50NC1MWwz2UmDYS4vJqNeKyoLWm7RgjfKWIoQOQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vitest-canvas-mock/-/vitest-canvas-mock-1.2.0.tgz", + "integrity": "sha512-gTy8+dL7aDFZq2EOGCk5krSVsvszTW/M+58efNzybehZNakON2HiPfi3bDBAp85L8DL+D+f/cNtQ5N60rZEL7A==", "dev": true, "license": "MIT", "dependencies": { @@ -6807,7 +7092,17 @@ "moo-color": "^1.0.3" }, "peerDependencies": { - "vitest": "^3.0.0 || ^4.0.0" + "vitest": "^3.0.0 || ^4.0.0 || ^5.0.0" + } + }, + "node_modules/vitest/node_modules/magic-string": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.4.tgz", + "integrity": "sha512-jQz9sVhrZuphH4NrAIHSgkDJCluQO7Ioi4KGRLa7aTUjAODQ13hENX0YIytqYE/rIkO485gQG2LeBxJaW53kkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.6.0" } }, "node_modules/vm-browserify": { @@ -6910,25 +7205,22 @@ } }, "node_modules/why-is-node-running": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", - "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-3.2.1.tgz", + "integrity": "sha512-Tb2FUhB4vUsGQlfSquQLYkApkuPAFQXGFzxWKHHumVz2dK+X1RUm/HnID4+TfIGYJ1kTcwOaCk/buYCEJr6YjQ==", "dev": true, - "dependencies": { - "siginfo": "^2.0.0", - "stackback": "0.0.2" - }, + "license": "MIT", "bin": { "why-is-node-running": "cli.js" }, "engines": { - "node": ">=8" + "node": ">=20.11" } }, "node_modules/ws": { - "version": "8.21.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.3.tgz", - "integrity": "sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw==", + "version": "8.22.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.22.0.tgz", + "integrity": "sha512-Ydggc987+RO0AnWtZ/7Wq9FtNvcrL1b/RO0ud9mWjUPgDrsAAwQSF51sm2hm1XofbU/4jkpGEsLFsZZxU+1DOg==", "dev": true, "license": "MIT", "engines": { diff --git a/web-components/package.json b/web-components/package.json index 6a8161c0d..3580fe252 100644 --- a/web-components/package.json +++ b/web-components/package.json @@ -22,46 +22,46 @@ "author": "", "license": "ISC", "dependencies": { - "@codemirror/autocomplete": "^6.20.3", - "@codemirror/commands": "^6.11.0", + "@codemirror/autocomplete": "^6.20.4", + "@codemirror/commands": "^6.11.1", "@codemirror/lang-sql": "^6.10.0", - "@codemirror/language": "^6.12.4", + "@codemirror/language": "^6.13.1", "@codemirror/lint": "^6.9.7", - "@codemirror/state": "^6.7.4", - "@codemirror/view": "^6.43.11", - "@lezer/highlight": "^1.2.3", + "@codemirror/state": "^6.7.6", + "@codemirror/view": "^6.43.15", + "@lezer/highlight": "^1.2.5", "@lit-labs/virtualizer": "^2.1.1", "@milkdown/crepe": "7.22.3", "@milkdown/kit": "7.22.3", - "@napi-rs/canvas": "^1.0.0", - "@rrweb/replay": "^2.0.0", + "@napi-rs/canvas": "^1.0.13", + "@rrweb/replay": "^2.1.7", "@rrweb/types": "^2.0.0-alpha.18", - "@types/lodash": "^4.17.24", + "@types/lodash": "^4.17.27", "ansi-up": "^1.0.0", "clsx": "^2.1.1", - "date-fns": "^4.3.0", + "date-fns": "^4.4.0", "echarts": "^6.1.0", "elkjs": "^0.12.0", "js-yaml": "^4.3.2", "jsonpath": "^1.3.0", "lit": "^3.3.3", "lodash": "^4.17.23", - "monaco-editor": "^0.55.1", - "vite": "^8.0.16" + "monaco-editor": "^0.57.0", + "vite": "^8.3.5" }, "devDependencies": { - "@types/bun": "^1.4.0", + "@types/bun": "^1.4.4", "@types/js-yaml": "^4.0.9", "@types/jsonpath": "^0.2.4", "@types/node": "^25.9.1", - "@vitest/browser": "^4.1.11", - "happy-dom": "^20.14.0", + "@vitest/browser": "^5.0.5", + "happy-dom": "^21.0.4", "jsdom": "^29.1.1", - "typescript": "^6.0.3", + "typescript": "^7.0.2", "vite-plugin-monaco-editor": "^1.1.0", "vite-plugin-node-polyfills": "^0.28.0", - "vitest": "^4.1.11", - "vitest-canvas-mock": "^1.1.5" + "vitest": "^5.0.5", + "vitest-canvas-mock": "^1.2.0" }, "overrides": { "dompurify": "^3.3.2", diff --git a/web-components/src/monaco-yaml.d.ts b/web-components/src/monaco-yaml.d.ts index 2877b1774..4ade32d7e 100644 --- a/web-components/src/monaco-yaml.d.ts +++ b/web-components/src/monaco-yaml.d.ts @@ -1,4 +1,4 @@ -declare module 'monaco-editor/esm/vs/basic-languages/yaml/yaml.js' { +declare module 'monaco-editor/languages/definitions/yaml/yaml.js' { export const conf: unknown; export const language: unknown; } diff --git a/web-components/src/types/types.ts b/web-components/src/types/types.ts index e5334007a..70ea706f4 100644 --- a/web-components/src/types/types.ts +++ b/web-components/src/types/types.ts @@ -49,7 +49,7 @@ declare global { getAttributes: (tagData: TagifyTagData) => string; }; - var monaco: typeof import('monaco-editor/esm/vs/editor/editor.api.js'); + var monaco: typeof import('monaco-editor/editor/editor.api.js'); function updateUrlState(key: string | string[], value: string, action?: 'set' | 'delete'): void; } diff --git a/web-components/src/yaml-editor.ts b/web-components/src/yaml-editor.ts index b49f29874..e416a1672 100644 --- a/web-components/src/yaml-editor.ts +++ b/web-components/src/yaml-editor.ts @@ -1,9 +1,9 @@ import { LitElement, html } from 'lit'; import { customElement, query } from 'lit/decorators.js'; import type * as Monaco from 'monaco-editor'; -import * as monacoInstance from 'monaco-editor/esm/vs/editor/editor.api.js'; -import EditorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker'; -import { conf, language } from 'monaco-editor/esm/vs/basic-languages/yaml/yaml.js'; +import * as monacoInstance from 'monaco-editor/editor/editor.api.js'; +import EditorWorker from 'monaco-editor/editor/editor.worker.js?worker'; +import { conf, language } from 'monaco-editor/languages/definitions/yaml/yaml.js'; (self as any).MonacoEnvironment ||= { getWorker: () => new EditorWorker() }; monacoInstance.languages.register({ id: 'yaml' }); monacoInstance.languages.setMonarchTokensProvider('yaml', language as Monaco.languages.IMonarchLanguage); diff --git a/web-components/vite.config.mjs b/web-components/vite.config.mjs index 55c650bc9..5a562a211 100644 --- a/web-components/vite.config.mjs +++ b/web-components/vite.config.mjs @@ -1,9 +1,5 @@ import { defineConfig } from 'vite'; import { nodePolyfills } from 'vite-plugin-node-polyfills'; -import { resolve } from 'path'; -import { fileURLToPath } from 'url'; - -const __dirname = fileURLToPath(new URL('.', import.meta.url)); export default defineConfig(({ mode }) => ({ base: '/public/assets/web-components/dist/', @@ -22,16 +18,9 @@ export default defineConfig(({ mode }) => ({ plugins: [ nodePolyfills({ overrides: { fs: null } }), // for @kusto/language-service ], - resolve: { - alias: [ - // Fix the monaco-editor alias to properly resolve imports - { find: 'monaco-editor', replacement: resolve(__dirname, 'node_modules/monaco-editor') }, - { find: /^monaco-editor\/esm\/vs\/(.*)/, replacement: resolve(__dirname, 'node_modules/monaco-editor/esm/vs/$1') }, - ], - }, optimizeDeps: { include: ['monaco-editor', 'xregexp'], - exclude: ['monaco-editor/esm/vs/editor/editor.worker'], + exclude: ['monaco-editor/editor/editor.worker.js'], }, build: { target: 'esnext', From 8306eace25e7f9ee26fb193e0a611b9062e67350 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Oct 2026 13:12:28 +0100 Subject: [PATCH 014/201] chore(deps): bump serialize-javascript from 7.0.5 to 7.1.4 (#731) Bumps [serialize-javascript](https://github.com/yahoo/serialize-javascript) from 7.0.5 to 7.1.4. - [Release notes](https://github.com/yahoo/serialize-javascript/releases) - [Commits](https://github.com/yahoo/serialize-javascript/compare/v7.0.5...v7.1.4) --- updated-dependencies: - dependency-name: serialize-javascript dependency-version: 7.1.4 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 348b62045..40a7d5d07 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11894,9 +11894,9 @@ } }, "node_modules/serialize-javascript": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-7.0.5.tgz", - "integrity": "sha512-F4LcB0UqUl1zErq+1nYEEzSHJnIwb3AF2XWB94b+afhrekOUijwooAYqFyRbjYkm2PAKBabx6oYv/xDxNi8IBw==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-7.1.4.tgz", + "integrity": "sha512-FqlEuoTq/zRmA4Lg6aOqyH3lCHbUtCB0bmHCeFniX2GBdDqMJM3FwdvEhlE5Pim1dlt2FfBdVPmUNNiGhhKqpw==", "dev": true, "license": "BSD-3-Clause", "engines": { diff --git a/package.json b/package.json index 7ae5adffb..c86d80ed9 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "test:gridstack-parity": "playwright test test/browser/dashboard-grid-parity.spec.js --reporter=line" }, "overrides": { - "serialize-javascript": "^7.0.5", + "serialize-javascript": "^7.1.4", "tmp": "^0.2.4" } } From 4a8e70cff59bf911f4663d61f2dc62e9fb81ab10 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Oct 2026 13:13:13 +0100 Subject: [PATCH 015/201] chore(deps): bump github.com/klauspost/compress (#735) Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.17.11 to 1.18.7. - [Release notes](https://github.com/klauspost/compress/releases) - [Commits](https://github.com/klauspost/compress/compare/v1.17.11...v1.18.7) --- updated-dependencies: - dependency-name: github.com/klauspost/compress dependency-version: 1.18.7 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- scripts/local/dlq-redrive/go.mod | 2 +- scripts/local/dlq-redrive/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/local/dlq-redrive/go.mod b/scripts/local/dlq-redrive/go.mod index fa1320efd..e33e6a5c7 100644 --- a/scripts/local/dlq-redrive/go.mod +++ b/scripts/local/dlq-redrive/go.mod @@ -8,7 +8,7 @@ require ( ) require ( - github.com/klauspost/compress v1.17.11 // indirect + github.com/klauspost/compress v1.18.7 // indirect github.com/pierrec/lz4/v4 v4.1.21 // indirect github.com/twmb/franz-go/pkg/kmsg v1.9.0 // indirect golang.org/x/crypto v0.52.0 // indirect diff --git a/scripts/local/dlq-redrive/go.sum b/scripts/local/dlq-redrive/go.sum index 3643ee32f..0a77d0046 100644 --- a/scripts/local/dlq-redrive/go.sum +++ b/scripts/local/dlq-redrive/go.sum @@ -1,5 +1,5 @@ -github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= -github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= +github.com/klauspost/compress v1.18.7 h1:aUyZsS4kH3QTKurYhAOwAHxllVPnOthb3vPfnF1Ehjw= +github.com/klauspost/compress v1.18.7/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ= github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/twmb/franz-go v1.18.0 h1:25FjMZfdozBywVX+5xrWC2W+W76i0xykKjTdEeD2ejw= From b09f00330275a58064b844147a62b1926d7fe104 Mon Sep 17 00:00:00 2001 From: Anthony Alaribe Date: Mon, 26 Oct 2026 14:25:22 +0100 Subject: [PATCH 016/201] Share Explorer facets and infrastructure table controls (#720) * Share Explorer facets and infrastructure table controls * Verify shared controls across namespaces and responsive layouts * Remove orphaned time inputs and await browser state * Classify facet content exhaustively * Consolidate inventory defaults and overlapping regression scenarios * Share Clear all across facet rails and demote facet glue to CSS Clear all lives in the shared rail for both Explorer and inventories and only shows while a facet is ticked. Column choices restore without a sync event, filter inputs skip re-filtering swaps while empty, and the collapsible rail opens on desktop via ::details-content instead of a resize script. * Cover Explorer facet Clear all end to end * Clear facets through their own checkboxes; re-filter swaps only while searching * Skip the facet Clear all e2e quickly when the fixture has no facet values * Distill grouped rendering and align facet controls with selection semantics --- AGENTS.md | 7 + e2e/tests/container-identity.spec.ts | 190 +++-------- e2e/tests/dashboard-add-widget.spec.ts | 1 + e2e/tests/infrastructure-time-window.spec.ts | 102 +++++- e2e/tests/query-editor.spec.ts | 15 + e2e/tests/repositories.spec.ts | 2 +- monoscope.cabal | 2 + src/Pages/Components.hs | 53 +-- src/Pages/Containers.hs | 32 +- src/Pages/Infrastructure.hs | 202 +++++------- src/Pages/LogExplorer/Log.hs | 183 +++++------ src/Pkg/Components/Facets.hs | 112 +++++++ src/Pkg/Components/Table.hs | 324 +++++++++++-------- src/Pkg/Components/TimePicker.hs | 6 - test/integration/Pages/ContainersSpec.hs | 203 +++++------- web-components/src/main.ts | 5 +- web-components/test/table-export.test.ts | 14 +- 17 files changed, 725 insertions(+), 728 deletions(-) create mode 100644 src/Pkg/Components/Facets.hs diff --git a/AGENTS.md b/AGENTS.md index 29442a0db..016456627 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -204,6 +204,13 @@ without having run them. ### Sign off locally before updating the pull request — never push and wait on CI +**Run sign-off only at the end, after all requested work, reviews, and focused +verification are complete. Sign-off is expensive: do not start or queue +`make ci-signoff`, full CI, or deploy-image builds while implementation or UI +iteration is still in progress. Use the existing watchers and focused tests +during development. If more work is requested after sign-off starts, stop that +run and finish the work before starting the final sign-off again.** + **A push to `master` IS a deploy, and remote CI is far too slow to be a feedback loop: an image build alone runs ~85 minutes.** So `make ci-signoff` must be green *before* you push the branch. It runs the checks locally and publishes diff --git a/e2e/tests/container-identity.spec.ts b/e2e/tests/container-identity.spec.ts index 809fd5414..55a34eed5 100644 --- a/e2e/tests/container-identity.spec.ts +++ b/e2e/tests/container-identity.spec.ts @@ -61,94 +61,7 @@ test("navbar refresh menu applies Off and interval options", async ({ page }) => } }); -test("changing the container time preset refreshes inventory and drawer windows", async ({ page }) => { - test.setTimeout(90_000); // Includes a real 15s live tick, repeated presets and held initial arrival. - test.skip(!process.env.E2E_BASE_URL, "Requires a disposable fixture database"); - const namespace = "e2e-container-preset"; - const cleanup = `DELETE FROM otel_metrics WHERE project_id='${DEMO_PROJECT}' AND resource->'k8s'->'namespace'->>'name'='${namespace}';`; - sql(cleanup + [30, 600].map(age => `INSERT INTO otel_metrics (project_id,id,series_id,timestamp,metric_name,metric_type,value,resource___k8s___container___name,resource___k8s___pod___name,resource___k8s___namespace___name,resource) - VALUES ('${DEMO_PROJECT}',gen_random_uuid(),'preset-${age}','${new Date(Date.now() - age * 1000).toISOString()}','container.cpu.usage','GAUGE',1,'preset-${age}','preset-pod-${age}','${namespace}', - '${JSON.stringify({ k8s: { container: { name: `preset-${age}` }, pod: { name: `preset-pod-${age}` }, namespace: { name: namespace }, cluster: { uid: CLUSTER }, node: { name: "preset-node" } } })}');`).join("")); - try { - await page.setViewportSize({ width: 390, height: 900 }); - await page.goto(`/p/${DEMO_PROJECT}/infrastructure/containers?namespace=${namespace}&cluster=${CLUSTER}&since=5M`, { waitUntil: "domcontentloaded" }); - const rows = page.locator('#containersContainer tr[role="button"]'); - await expect(rows).toHaveCount(1); - await expect(page.getByText(/containers reporting in the final 5m of this range/)).toBeVisible(); - const refresh = page.waitForRequest(request => new URL(request.url()).searchParams.get("deferred") === "1" && new URL(request.url()).searchParams.get("since") === "1H"); - await page.locator('[popovertarget="n-timepicker-popover"]').click(); - await page.locator('#n-timepicker-popover button[data-value="1H"]').click(); - const requested = new URL((await refresh).url()).searchParams; - expect(requested.getAll("since")).toEqual(["1H"]); - expect(requested.get("namespace")).toBe(namespace); - expect(requested.get("cluster")).toBe(CLUSTER); - await expect(page).toHaveURL(/since=1H/); - await expect(rows).toHaveCount(2); - await expect(page.getByText(/containers reporting in the final 15m of this range/)).toBeVisible(); - expect(await rows.evaluateAll(rows => rows.every(row => { - const params = new URL(row.getAttribute("data-hx-get")!, location.origin).searchParams; - return params.get("since") === "1H" && params.get("namespace") === "e2e-container-preset" && params.get("cluster") === "8b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"; - }))).toBe(true); - const search = page.getByRole("searchbox", { name: "Search containers", exact: true }); - await search.fill("preset-600"); - await expect(page.locator('#containersContainer tr[role="button"]:visible')).toHaveCount(1); - for (const [preset, count] of [["5M", 1], ["1H", 2]] as const) { - await page.locator('[popovertarget="n-timepicker-popover"]').click(); - await page.locator(`#n-timepicker-popover button[data-value="${preset}"]`).click(); - await expect(rows).toHaveCount(count); - await expect(search).toHaveValue("preset-600"); - await expect(page.locator('#containersContainer tr[role="button"]:visible')).toHaveCount(preset === "1H" ? 1 : 0); - expect(new URL((await rows.first().getAttribute("data-hx-get"))!, page.url()).searchParams.get("since")).toBe(preset); - } - await search.focus(); - await page.evaluate(() => new Promise(resolve => document.getElementById("containersContainer")!.addEventListener("htmx:afterSwap", () => resolve(), { once: true }))); - await expect(search).toBeFocused(); - await expect(search).toHaveValue("preset-600"); - await expect(page.locator('#containersContainer tr[role="button"]:visible')).toHaveCount(1); - await search.fill(""); - await page.locator('[popovertarget="n-timepicker-popover"]').click(); - await page.getByRole("button", { name: "Previous time window", exact: true }).click(); - await expect.poll(() => new URL(page.url()).searchParams.get("from")).toBeTruthy(); - await expect(rows).toHaveCount(0); - await page.locator('#n-timepicker-popover button[data-value="1H"]').click(); - await expect(rows).toHaveCount(2); - const restored = new URL((await rows.first().getAttribute("data-hx-get"))!, page.url()).searchParams; - expect(restored.get("since")).toBe("1H"); - expect(restored.get("from") || restored.get("to")).toBeFalsy(); - await page.reload({ waitUntil: "domcontentloaded" }); - await expect(rows).toHaveCount(2); - await rows.filter({ hasText: "preset-600" }).focus(); - await page.keyboard.press("Enter"); - const drawer = page.locator("#global-data-drawer-content"); - await expect(drawer.getByText(/^Pod:\s*preset-pod-600$/)).toBeVisible(); - expect(new URL((await drawer.getByRole("link", { name: "View logs", exact: true }).getAttribute("href"))!, page.url()).searchParams.get("since")).toBe("1H"); - let release = () => {}; - const held = new Promise(resolve => { release = resolve; }); - await page.route("**/infrastructure/containers?**", async route => { - const params = new URL(route.request().url()).searchParams; - if (params.get("deferred") === "1" && params.get("since") === "5M") await held; - await route.continue(); - }); - try { - const initial = page.waitForRequest(request => new URL(request.url()).searchParams.get("deferred") === "1"); - await page.goto(`/p/${DEMO_PROJECT}/infrastructure/containers?namespace=${namespace}&cluster=${CLUSTER}&since=5M`, { waitUntil: "domcontentloaded" }); - await initial; - await page.locator('[popovertarget="n-timepicker-popover"]').click(); - await page.locator("[data-mobile-live-toggle]").click(); - await expect(page.locator("[data-time-transport]")).toHaveAttribute("data-interval", "0"); - await page.locator('#n-timepicker-popover button[data-value="1H"]').click(); - release(); - await expect(rows).toHaveCount(2); - expect(new URL((await rows.first().getAttribute("data-hx-get"))!, page.url()).searchParams.get("since")).toBe("1H"); - } finally { - release(); - } - } finally { - sql(cleanup); - } -}); - -for (const width of [390, 1280]) { +for (const width of [390, 1280, 1920]) { test(`duplicate containers expose their identity before opening a drawer at ${width}px`, async ({ page }) => { await page.setViewportSize({ width, height: 900 }); await page.goto(`/p/${DEMO_PROJECT}/infrastructure/containers?from=2024-12-31T23:00:00Z&to=2025-01-01T00:00:00Z`, { waitUntil: "domcontentloaded" }); @@ -163,7 +76,7 @@ for (const width of [390, 1280]) { return value ? value.getClientRects().length > 0 : null; }); })); - expect(visible).toEqual(Array(identities.length * 4).fill(width < 1024)); + expect(visible).toEqual(Array(identities.length * 4).fill(width < 1536)); await expect.poll(() => page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth)).toBe(true); }); } @@ -213,38 +126,30 @@ for (const width of [390, 1280]) { expect(data.error ?? null).toBeNull(); expect(data.dataset.map((row: number[]) => row.slice(1))).toEqual([[2]]); await expect(drawer.locator("#container-detail-cpu canvas")).toBeVisible(); - }); -} - -for (const theme of ["dark", "light"]) { - test(`a lone container metric observation has a visible point in ${theme} appearance`, async ({ page }) => { - await page.setViewportSize({ width: 1280, height: 900 }); - await page.goto(`/p/${DEMO_PROJECT}/infrastructure/containers?namespace=identity-b&from=2024-12-31T23:00:00Z&to=2025-01-01T00:00:00Z`, { waitUntil: "domcontentloaded" }); - await expect(page.locator("[data-deferred-shell]")).toHaveCount(0); - if (await page.locator("body").getAttribute("data-theme") !== theme) await page.evaluate(() => (window as any).toggleDarkMode()); - await page.locator(`tr[role="button"][data-hx-get*="container=${CONTAINER}"] td`).first().click(); - await expect(page.locator("#global-data-drawer-content #container-detail-cpu canvas")).toBeVisible(); - await expect(page.locator("#container-detail-cpu")).toHaveAttribute("aria-busy", "false"); - const rendered = await page.evaluate(() => { - const chart = (window as any).echarts.getInstanceByDom(document.getElementById("container-detail-cpu")); - const data = chart.getModel().getSeriesByIndex(0)?.getData(); - if (!data) return { values: [], symbols: 0 }; - const dimension = data.mapDimension("y"); - const values = Array.from({ length: data.count() }, (_, index) => data.get(dimension, index)).filter(Number.isFinite); - const symbols = Array.from({ length: data.count() }, (_, index) => data.getItemGraphicEl(index)).filter(element => element && !element.ignore && element.getBoundingRect().width > 0 && element.getBoundingRect().height > 0).length; - return { values, symbols }; - }); - expect(rendered.values).toEqual([2]); - expect(rendered.symbols).toBe(1); - const point = await page.evaluate(() => { - const element = document.getElementById("container-detail-cpu")!; - const chart = (window as any).echarts.getInstanceByDom(element); - const pixel = chart.convertToPixel({ seriesIndex: 0 }, chart.getOption().dataset[0].source[1]); - const bounds = element.getBoundingClientRect(); - return { x: bounds.left + pixel[0], y: bounds.top + pixel[1] }; - }); - await page.mouse.move(point.x, point.y + 1); - await expect(page.getByText("2 cores", { exact: true })).toBeVisible(); + for (const theme of width === 1280 ? ["dark", "light"] : []) { + if (await page.locator("body").getAttribute("data-theme") !== theme) await page.evaluate(() => (window as any).toggleDarkMode()); + await expect(page.locator("#container-detail-cpu")).toHaveAttribute("aria-busy", "false"); + const rendered = await page.evaluate(() => { + const chart = (window as any).echarts.getInstanceByDom(document.getElementById("container-detail-cpu")); + const data = chart.getModel().getSeriesByIndex(0)?.getData(); + if (!data) return { values: [], symbols: 0 }; + const dimension = data.mapDimension("y"); + const values = Array.from({ length: data.count() }, (_, index) => data.get(dimension, index)).filter(Number.isFinite); + const symbols = Array.from({ length: data.count() }, (_, index) => data.getItemGraphicEl(index)).filter(element => element && !element.ignore && element.getBoundingRect().width > 0 && element.getBoundingRect().height > 0).length; + return { values, symbols }; + }); + expect(rendered.values).toEqual([2]); + expect(rendered.symbols).toBe(1); + const point = await page.evaluate(() => { + const element = document.getElementById("container-detail-cpu")!; + const chart = (window as any).echarts.getInstanceByDom(element); + const pixel = chart.convertToPixel({ seriesIndex: 0 }, chart.getOption().dataset[0].source[1]); + const bounds = element.getBoundingClientRect(); + return { x: bounds.left + pixel[0], y: bounds.top + pixel[1] }; + }); + await page.mouse.move(point.x, point.y + 1); + await expect(page.getByText("2 cores", { exact: true })).toBeVisible(); + } }); } @@ -255,13 +160,12 @@ test("mobile namespace facet preserves the selected cluster", async ({ page }) = const rows = page.locator(`tr[role="button"][data-hx-get*="container=${CONTAINER}"]`); await expect(rows).toHaveCount(4); expect(await page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth)).toBe(true); - await page.locator("#containersContainer summary").filter({ hasText: /^Filters$/ }).focus(); - await page.keyboard.press("Enter"); - await page.locator('[data-component="facet-section"] summary').filter({ hasText: /^Namespace$/ }).focus(); + await page.locator("#containersContainer summary").filter({ hasText: /^Filters$/ }).press("Enter"); + await page.locator('[data-component="facet-section"] summary').filter({ hasText: /^Namespace$/ }).press("Enter"); + await expect(page.getByRole("radio", { name: "identity-a", exact: true })).toBeHidden(); await page.keyboard.press("Enter"); const changed = page.waitForResponse(response => new URL(response.url()).searchParams.get("namespace") === "identity-a"); - await page.getByRole("radio", { name: "identity-a", exact: true }).focus(); - await page.keyboard.press("Space"); + await page.getByRole("radio", { name: "identity-a", exact: true }).press("Space"); const url = new URL((await changed).url()); await expect(rows).toHaveCount(3); expect(url.searchParams.getAll("cluster")).toEqual([CLUSTER]); @@ -269,24 +173,19 @@ test("mobile namespace facet preserves the selected cluster", async ({ page }) = expect(url.searchParams.get("from")).toBe("2024-12-31T23:00:00Z"); expect(url.searchParams.get("to")).toBe("2025-01-01T00:00:00Z"); expect(await rows.evaluateAll((rows, cluster) => rows.every(row => new URL(row.getAttribute("data-hx-get")!, "http://localhost").searchParams.get("cluster") === cluster), CLUSTER)).toBe(true); - await page.locator("#containersContainer summary").filter({ hasText: /^Filters$/ }).focus(); - await page.keyboard.press("Enter"); + await page.locator("#containersContainer summary").filter({ hasText: /^Filters$/ }).press("Enter"); const replaced = page.waitForResponse(response => new URL(response.url()).searchParams.get("namespace") === "identity-b"); - await page.getByRole("radio", { name: "identity-b", exact: true }).focus(); - await page.keyboard.press("Space"); + await page.getByRole("radio", { name: "identity-b", exact: true }).press("Space"); const replacedUrl = new URL((await replaced).url()); await expect(rows).toHaveCount(1); expect(replacedUrl.searchParams.getAll("namespace")).toEqual(["identity-b"]); expect(replacedUrl.searchParams.getAll("cluster")).toEqual([CLUSTER]); - await page.getByRole("button", { name: "Remove filter Namespace: identity-b", exact: true }).focus(); - await page.keyboard.press("Enter"); + await page.getByRole("button", { name: "Remove filter Namespace: identity-b", exact: true }).press("Enter"); await expect(rows).toHaveCount(4); await expect(page.getByRole("button", { name: `Remove filter Cluster: ${CLUSTER}`, exact: true })).toBeVisible(); - await page.locator("#containersContainer summary").filter({ hasText: /^Filters$/ }).focus(); - await page.keyboard.press("Enter"); + await page.locator("#containersContainer summary").filter({ hasText: /^Filters$/ }).press("Enter"); const cleared = page.waitForResponse(response => new URL(response.url()).pathname.endsWith("/infrastructure/containers")); - await page.getByRole("button", { name: "Clear all", exact: true }).focus(); - await page.keyboard.press("Enter"); + await page.getByRole("button", { name: "Clear all", exact: true }).press("Enter"); const clearUrl = new URL((await cleared).url()); await expect(rows).toHaveCount(5); for (const key of ["runtime", "cluster", "namespace", "node", "image"]) expect(clearUrl.searchParams.has(key)).toBe(false); @@ -301,6 +200,9 @@ test("mobile container search remains reachable and preserves drawer identity", await expect(page.locator("[data-deferred-shell]")).toHaveCount(0); const rows = page.locator(`tr[role="button"][data-hx-get*="container=${CONTAINER}"]:visible`); await expect(rows).toHaveCount(4); + const cpu = rows.filter({ hasText: "Node / host: identity-node-b" }).locator("td").nth(4).locator("span"); + await expect(cpu).toHaveText("4.000"); + await expect(cpu).toBeInViewport({ ratio: 0.95 }); const search = page.getByPlaceholder("Search containers", { exact: true }); await expect(search).toBeVisible(); expect(await search.evaluate(input => parseFloat(getComputedStyle(input).fontSize))).toBeGreaterThanOrEqual(16); @@ -319,27 +221,13 @@ test("mobile container search remains reachable and preserves drawer identity", expect(url.searchParams.get("from")).toBe("2024-12-31T23:00:00Z"); expect(url.searchParams.get("to")).toBe("2025-01-01T00:00:00Z"); expect(await page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth)).toBe(true); - await rows.focus(); - await page.keyboard.press("Enter"); + await rows.press("Enter"); const drawer = page.locator("#global-data-drawer-content"); await expect(drawer.getByText(/^Node \/ host:\s*identity-node-b$/)).toBeVisible(); await expect(drawer.getByText(/^Namespace:\s*identity-a$/)).toBeVisible(); }); -test("mobile container CPU fits initially with an active cluster filter", async ({ page }) => { - await page.setViewportSize({ width: 390, height: 900 }); - await page.goto(`/p/${DEMO_PROJECT}/infrastructure/containers?cluster=${CLUSTER}&from=2024-12-31T23:00:00Z&to=2025-01-01T00:00:00Z`, { waitUntil: "domcontentloaded" }); - await expect(page.locator("[data-deferred-shell]")).toHaveCount(0); - const rows = page.locator(`tr[role="button"][data-hx-get*="container=${CONTAINER}"]`); - await expect(rows).toHaveCount(4); - const cpu = rows.filter({ hasText: "Node / host: identity-node-b" }).locator("td").nth(4).locator("span"); - await expect(cpu).toHaveText("4.000"); - await expect(cpu).toBeInViewport({ ratio: 0.95 }); - expect(await page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth)).toBe(true); -}); - - for (const width of [390, 1280]) { test(`container CPU fits initially with collector image and workload metadata at ${width}px`, async ({ page }) => { test.skip(!process.env.E2E_BASE_URL, "Requires a disposable fixture server"); diff --git a/e2e/tests/dashboard-add-widget.spec.ts b/e2e/tests/dashboard-add-widget.spec.ts index 8f0ec2572..3cc3f53d5 100644 --- a/e2e/tests/dashboard-add-widget.spec.ts +++ b/e2e/tests/dashboard-add-widget.spec.ts @@ -43,6 +43,7 @@ async function openFixture(page: Page): Promise { async function openWidgetDrawer(page: Page) { await page.locator('[aria-label="Add a new widget"]').first().click(); await expect(page.locator("#visualizationTabs")).toBeVisible({ timeout: 20000 }); + await expect(page.getByRole("textbox", { name: "Query", exact: true })).toBeVisible(); } test("a slow avatar does not block dashboard initialization", async ({ page }) => { diff --git a/e2e/tests/infrastructure-time-window.spec.ts b/e2e/tests/infrastructure-time-window.spec.ts index bf07abd29..acf2816f0 100644 --- a/e2e/tests/infrastructure-time-window.spec.ts +++ b/e2e/tests/infrastructure-time-window.spec.ts @@ -24,8 +24,92 @@ const views = [ ["hosts", "hostsContainer", { provider, group: "region" }, "Search hosts"], ["images", "imagesContainer", { registry: "registry.example", runtime: "kubernetes" }, "Search images"], ["kubernetes", "kubernetesContainer", { resource: "pods", namespace, cluster }, "Search pods"], + ["containers", "containersContainer", { namespace, cluster }, "Search containers"], ["host-map", "hostMapContainer", { provider, group: "region", fill: "memory" }, ""], ] as const; + +for (const width of [390, 1440]) { + test(`shared host controls preserve filters, columns and grouped exports at ${width}px`, async ({ page }) => { + test.skip(!process.env.E2E_BASE_URL, "Requires a disposable fixture database"); + await page.setViewportSize({ width, height: 900 }); + await page.goto(`/p/${DEMO_PROJECT}/infrastructure/hosts?${new URLSearchParams({ provider, since: "1H" })}`); + const container = page.locator('#hostsContainer'); + await expect(container.locator('tr[role="button"]')).toHaveCount(2); + if (width === 1440) { + await container.evaluate(async (target, url) => { await (window as any).htmx.ajax('GET', url, { target, swap: 'beforeend', select: '#imagesContainer-facets' }); }, `/p/${DEMO_PROJECT}/infrastructure/images?since=1H&deferred=1`); + const other = page.locator('#imagesContainer-facets'); + await expect(other.getByRole('radio', { name: 'kubernetes', exact: true })).toBeVisible(); + const search = container.locator('#hostsContainer-facets').getByRole('searchbox'); + await search.fill(provider); + await expect(other.getByRole('radio', { name: 'kubernetes', exact: true })).toBeVisible(); + await search.fill(''); + await other.evaluate(rail => rail.remove()); + } + await expect(container.getByRole('button', { name: 'Customize', exact: true })).toBeInViewport(); + await expect(container.getByRole('button', { name: 'Export', exact: true })).toBeInViewport(); + await container.getByRole('button', { name: 'Customize', exact: true }).click(); + await container.locator('[data-column-toggle="CPU"]').uncheck(); + await container.getByRole('button', { name: 'Customize', exact: true }).click(); + await container.getByRole('combobox', { name: 'Group by', exact: true }).selectOption('region'); + await expect(page).toHaveURL(/group=region/); + expect(new URL(page.url()).searchParams.get('provider')).toBe(provider); + expect(new URL(page.url()).searchParams.get('since')).toBe('1H'); + expect(new URL(page.url()).searchParams.has('deferred')).toBe(false); + await expect(container.locator('[data-table-group]')).toHaveCount(1); + await expect(container.locator('td[data-column-key="CPU"]').first()).toBeHidden(); + const search = container.getByRole('searchbox', { name: 'Search hosts', exact: true }); + await search.fill('no-such-host'); + await expect(container.locator('[data-table-group]')).toBeHidden(); + await search.fill(''); + await expect(container.locator('[data-table-group]')).toBeVisible(); + const download = page.waitForEvent('download'); + await container.getByRole('button', { name: 'Export', exact: true }).click(); + const stream = await (await download).createReadStream(); + const chunks: Buffer[] = []; + for await (const chunk of stream!) chunks.push(Buffer.from(chunk)); + const csv = Buffer.concat(chunks).toString(); + expect(csv.split('\n')).toHaveLength(3); + expect(csv).not.toContain('"CPU"'); + expect(csv).toContain('infra-preset-host-30'); + expect(csv).toContain('infra-preset-host-600'); + await page.reload(); + await expect(container.locator('tr[role="button"]')).toHaveCount(2); + await expect(container.locator('td[data-column-key="CPU"]').first()).toBeHidden(); + await container.getByRole('button', { name: 'Customize', exact: true }).click(); + await container.getByRole('button', { name: 'Reset columns', exact: true }).click(); + await expect(container.locator('td[data-column-key="CPU"]').first()).toBeVisible(); + if (width === 390) { + const system = container.locator('[data-column-toggle="System"]'); + await expect(system).not.toBeChecked(); + await system.check(); + await expect(container.locator('td[data-column-key="System"]').first()).toBeVisible(); + await container.getByRole('button', { name: 'Reset columns', exact: true }).click(); + await expect(container.locator('td[data-column-key="System"]').first()).toBeHidden(); + await page.setViewportSize({ width: 1440, height: 900 }); + await expect(container.locator('td[data-column-key="System"]').first()).toBeVisible(); + await expect(system).toBeChecked(); + } + }); +} + +test('shared Kubernetes tabs preserve scoped filters and column choices', async ({ page }) => { + test.skip(!process.env.E2E_BASE_URL, "Requires a disposable fixture database"); + await page.goto(`/p/${DEMO_PROJECT}/infrastructure/kubernetes?${new URLSearchParams({ resource: 'pods', namespace, cluster, since: '1H' })}`); + const container = page.locator('#kubernetesContainer'); + await expect(container.locator('tr[role="button"]')).toHaveCount(2); + await container.getByRole('button', { name: 'Customize', exact: true }).click(); + await container.locator('[data-column-toggle="Memory"]').uncheck(); + await container.getByRole('button', { name: 'Customize', exact: true }).click(); + await container.getByRole('tab', { name: 'Nodes', exact: true }).click(); + await expect(page).toHaveURL(/resource=nodes/); + const params = new URL(page.url()).searchParams; + expect(params.get('namespace')).toBe(namespace); + expect(params.get('cluster')).toBe(cluster); + expect(params.get('since')).toBe('1H'); + await expect(container.locator('tr[role="button"]')).toHaveCount(2); + await expect(container.locator('td[data-column-key="Memory"]').first()).toBeHidden(); +}); + for (const [route, container, filters, searchName] of views) { test(`${route} time presets refresh scoped inventory`, async ({ page }) => { test.skip(!process.env.E2E_BASE_URL, "Requires a disposable fixture database"); @@ -33,8 +117,9 @@ for (const [route, container, filters, searchName] of views) { const url = `/p/${DEMO_PROJECT}/infrastructure/${route}?${new URLSearchParams({ ...filters, from: "", to: "", since: "5m" })}`; await page.goto(url, { waitUntil: "domcontentloaded" }); await expect(page.locator("[data-deferred-shell]")).toHaveCount(0, { timeout: 5_000 }); - const entries = page.locator(`#${container} ${route === "host-map" ? "button[data-hx-get]" : 'tr[role="button"]'}`); + const entries = page.locator(`#${container} ${route === "host-map" ? 'button[data-hx-get*="/infrastructure/hosts/detail"]' : 'tr[role="button"]'}`); await expect(entries).toHaveCount(1); + if (route === "containers") await expect(page.getByText(/containers reporting in the final 5m of this range/)).toBeVisible(); await page.locator('[popovertarget="n-timepicker-popover"]').click(); await page.locator("[data-mobile-live-toggle]").click(); await expect(page.locator("[data-time-transport]")).toHaveAttribute("data-interval", "0"); @@ -43,6 +128,7 @@ for (const [route, container, filters, searchName] of views) { await page.locator('#n-timepicker-popover button[data-value="1H"]').click(); await expect(page).toHaveURL(/since=1H/); await expect(entries).toHaveCount(2); + if (route === "containers") await expect(page.getByText(/containers reporting in the final 15m of this range/)).toBeVisible(); const params = new URL((await refresh).url()).searchParams; expect(params.getAll("since")).toEqual(["1H"]); expect(params.getAll("from")).toEqual([""]); @@ -86,6 +172,14 @@ for (const [route, container, filters, searchName] of views) { const restored = new URL((await entries.first().getAttribute("data-hx-get"))!, page.url()).searchParams; expect(restored.get("since")).toBe("1H"); expect(restored.get("from") || restored.get("to")).toBeFalsy(); + if (route === "containers") { + await page.reload({ waitUntil: "domcontentloaded" }); + await expect(entries).toHaveCount(2); + await entries.filter({ hasText: "600" }).press("Enter"); + const drawer = page.locator("#global-data-drawer-content"); + await expect(drawer.getByText(/^Pod:\s*infra-preset-pod-600$/)).toBeVisible(); + expect(new URL((await drawer.getByRole("link", { name: "View logs", exact: true }).getAttribute("href"))!, page.url()).searchParams.get("since")).toBe("1H"); + } }); test(`${route} time presets replace held initial inventory`, async ({ page }) => { test.skip(!process.env.E2E_BASE_URL, "Requires a disposable fixture database"); @@ -107,14 +201,14 @@ for (const [route, container, filters, searchName] of views) { await page.locator('#n-timepicker-popover button[data-value="1H"]').click(); release(); await expect(page.locator("[data-deferred-shell]")).toHaveCount(0, { timeout: 5_000 }); - const entries = page.locator(`#${container} ${route === "host-map" ? "button[data-hx-get]" : 'tr[role="button"]'}`); + const entries = page.locator(`#${container} ${route === "host-map" ? 'button[data-hx-get*="/infrastructure/hosts/detail"]' : 'tr[role="button"]'}`); await expect(entries).toHaveCount(2); expect(new URL((await entries.first().getAttribute("data-hx-get"))!, page.url()).searchParams.get("since")).toBe("1H"); } finally { release(); } }); } -for (const [route, container, filters] of [...views, ["containers", "containersContainer", { namespace, cluster }]] as const) { +for (const [route, container, filters] of views) { test(`${route} initial inventory does not wait for application script arrival`, async ({ page }) => { test.skip(!process.env.E2E_BASE_URL, "Requires a disposable fixture database"); let release = () => {}; @@ -122,7 +216,7 @@ for (const [route, container, filters] of [...views, ["containers", "containersC await page.route(/\/public\/assets\/(?:js\/main\.|web-components\/dist\/js\/index\.).*\.js$/, async route => { await held; await route.continue(); }); try { await page.goto(`/p/${DEMO_PROJECT}/infrastructure/${route}?${new URLSearchParams({ ...filters, from: "", to: "", since: "5M" })}&since=5m`, { waitUntil: "commit" }); - const entries = page.locator(`#${container} ${route === "host-map" ? "button[data-hx-get]" : 'tr[role="button"]'}`); + const entries = page.locator(`#${container} ${route === "host-map" ? 'button[data-hx-get*="/infrastructure/hosts/detail"]' : 'tr[role="button"]'}`); await page.waitForFunction(() => Boolean((window as any).htmx)); await expect.poll(() => page.evaluate(() => typeof (window as any).params)).toBe("undefined"); // The shell may have loaded automatically before this test reaches it. diff --git a/e2e/tests/query-editor.spec.ts b/e2e/tests/query-editor.spec.ts index 4b892ebc5..eb5205e3e 100644 --- a/e2e/tests/query-editor.spec.ts +++ b/e2e/tests/query-editor.spec.ts @@ -145,6 +145,21 @@ test.describe("Query editor", () => { for (const tab of ["Popular", "Saved", "Recent"]) await expect(library.getByRole("tab", { name: tab })).toBeVisible(); }); + + test("facet Clear all removes facet clauses and keeps typed ones", async ({ page }) => { + const facets = page.locator(".facet-rail .facet-item input[data-field]"); + const clear = page.locator(".facet-rail button", { hasText: "Clear all" }); + await facets.first().waitFor({ state: "attached", timeout: 10_000 }).catch(() => {}); + test.skip((await facets.count()) < 2, "no facet values in this database"); + await page.locator("#filterElement").evaluate((el: any) => el.setValue("duration > 1000")); + await expect(clear).toBeHidden(); + await facets.nth(0).check(); + await facets.nth(1).check(); + await expect(clear).toBeVisible(); + await clear.click(); + await expect.poll(() => page.locator("#filterElement").evaluate((el: any) => el.getValue())).toBe("duration > 1000"); + await expect(clear).toBeHidden(); + }); }); // Regression: the explorer ships without Tagify, so the monitor panel's teams picker threw diff --git a/e2e/tests/repositories.spec.ts b/e2e/tests/repositories.spec.ts index a6e19a8ba..a030fbc5c 100644 --- a/e2e/tests/repositories.spec.ts +++ b/e2e/tests/repositories.spec.ts @@ -197,7 +197,7 @@ test('one repository list owns service links and independent capabilities in bot expect(sql(`SELECT count(*) FROM projects.code_mappings WHERE project_id = '${pid}'`).toString().trim()).toBe('2'); await page.getByRole('button', { name: 'Save review settings', exact: true }).press('Enter'); await expect(page.locator('#repository-detail')).toHaveCount(1); - expect(sql(`SELECT enabled FROM projects.pr_review_settings WHERE project_id = '${pid}' AND owner = 'team-a'`).toString().trim()).toBe('t'); + await expect.poll(() => sql(`SELECT enabled FROM projects.pr_review_settings WHERE project_id = '${pid}' AND owner = 'team-a'`).toString().trim()).toBe('t'); await page.getByText('Move existing resources into this folder', { exact: true }).click(); await page.getByRole('combobox', { name: /Cron/ }).selectOption(cron); await page.getByRole('combobox', { name: /Cron/ }).locator('..').locator('..').getByRole('button', { name: 'Move into folder', exact: true }).press('Enter'); diff --git a/monoscope.cabal b/monoscope.cabal index 3fabfca8b..8c712899d 100644 --- a/monoscope.cabal +++ b/monoscope.cabal @@ -386,6 +386,7 @@ library Pages.Telemetry Pkg.AI Pkg.AssetManifestFingerprint + Pkg.Components.Facets Pkg.Components.LogQueryBox Pkg.Components.ServiceMap Pkg.Components.Table @@ -1030,6 +1031,7 @@ test-suite test-dev Pages.Telemetry Pkg.AI Pkg.AssetManifestFingerprint + Pkg.Components.Facets Pkg.Components.LogQueryBox Pkg.Components.ServiceMap Pkg.Components.Table diff --git a/src/Pages/Components.hs b/src/Pages/Components.hs index a488f8782..fd3204785 100644 --- a/src/Pages/Components.hs +++ b/src/Pages/Components.hs @@ -1,4 +1,4 @@ -module Pages.Components (drawer_, PanelStyle (..), PanelCfg (..), panel_, entityHeader_, detailSection_, pivotLinks_, disclosure_, settingsSection_, settingsH2_, sectionLabel_, fieldLabel_, headerRow_, navBar, brandLogo_, resizer_, resizerWith_, detailTab_, httpTab_, tabPanel_, segmented_, periodToggle_, Deferred (..), RefreshingDeferred (..), withDeferredBody, deferredShell_, lazyPanel_, timeRefreshListener_, drawerLoadingSkeleton_, tableSkeleton_, chartSkeleton_, EmptyStateCfg (..), EmptyStateSize (..), EmptyStateAction (..), emptyState_, callout_, BadgeColor (..), IconBadgeSize (..), iconBadge_, tonePill_, colorChip_, metadataChip_, metaChip_, connectionBadge_, silenceBadge_, statFigure_, factGrid_, kvList_, sparkline_, eventsCountCell_, lastSeenCell_, dateTime, localTimeFmt_, FieldSize (..), FieldCfg (..), formField_, formSelectField_, formCheckbox_, options_, roleOptions_, tagInput_, toggleRow_, searchInput_, copyField_, copyButton_, facetRail_, facetSection_, facetOption_, ModalCfg (..), modalWith_, formActionsModal_, dangerAction_, floatingDialog_, dialogField_, kbdHints_, durationMenu_, primaryButton_, inlineIconBtn_, RowAction (..), rowActions_, externalLink_, installationSettingsLink_, dirtyFormSaveAttr_, resetFormOnSuccessAttr_, detailsClosedBelowAttr_, keyboardActivateAttr_, listboxNavAttr_, copySourceAttr_, filterInputAttr_, TraceFrame (..), stackTrace_, stackFrames_, codeContextUrl, curlCommand, getTargetPage, abbreviateUnit, agoText, durationQuery, untilLabel, grantsTrial, paymentPlanPicker) where +module Pages.Components (drawer_, PanelStyle (..), PanelCfg (..), panel_, entityHeader_, detailSection_, pivotLinks_, disclosure_, settingsSection_, settingsH2_, sectionLabel_, fieldLabel_, headerRow_, navBar, brandLogo_, resizer_, resizerWith_, detailTab_, httpTab_, tabPanel_, segmented_, periodToggle_, Deferred (..), RefreshingDeferred (..), withDeferredBody, deferredShell_, lazyPanel_, timeRefreshListener_, drawerLoadingSkeleton_, tableSkeleton_, chartSkeleton_, EmptyStateCfg (..), EmptyStateSize (..), EmptyStateAction (..), emptyState_, callout_, BadgeColor (..), IconBadgeSize (..), iconBadge_, tonePill_, colorChip_, metadataChip_, metaChip_, connectionBadge_, silenceBadge_, statFigure_, factGrid_, kvList_, sparkline_, eventsCountCell_, lastSeenCell_, dateTime, localTimeFmt_, FieldSize (..), FieldCfg (..), formField_, formSelectField_, formCheckbox_, options_, roleOptions_, tagInput_, toggleRow_, searchInput_, copyField_, copyButton_, ModalCfg (..), modalWith_, formActionsModal_, dangerAction_, floatingDialog_, dialogField_, kbdHints_, durationMenu_, primaryButton_, inlineIconBtn_, RowAction (..), rowActions_, externalLink_, installationSettingsLink_, dirtyFormSaveAttr_, resetFormOnSuccessAttr_, detailsClosedBelowAttr_, keyboardActivateAttr_, listboxNavAttr_, copySourceAttr_, filterInputAttr_, TraceFrame (..), stackTrace_, stackFrames_, codeContextUrl, curlCommand, getTargetPage, abbreviateUnit, agoText, durationQuery, untilLabel, grantsTrial, paymentPlanPicker) where import Data.Default (Default (..)) import Data.List (elemIndex, findIndex, lookup) @@ -77,55 +77,6 @@ searchInput_ extra ph attrs = label_ [class_ $ "input input-sm flex items-center input_ $ [type_ "search", class_ "min-w-0 grow bg-transparent max-md:text-base", placeholder_ ph, Aria.label_ (T.dropWhileEnd (== '…') ph)] <> attrs --- | Shared shell for searchable facet trees. The content decides how filters change --- (query-editor operations in Explorer, URL parameters in inventories); search, --- accessibility, and disclosure markers stay identical. -facetRail_ :: Maybe Text -> Text -> Text -> Maybe (Html ()) -> Html () -> Html () -facetRail_ elemId extraClass searchLabel actions content = - div_ ([class_ $ "facet-rail flex flex-col gap-2 " <> extraClass, data_ "component" "facet-rail"] <> [id_ x | x <- maybeToList elemId]) do - searchInput_ - "sticky top-0 z-10 h-9 w-[calc(100%-1rem)] mx-2 border-strokeStrong bg-bgBase" - searchLabel - [ name_ "facet-search" - , oninput_ "const q=this.value.toLowerCase();this.closest('[data-component=\"facet-rail\"]').querySelectorAll('[data-component=\"facet-option\"],[data-component=\"facet-section\"]').forEach(el=>el.classList.toggle('hidden',!el.textContent.toLowerCase().includes(q)))" - , onkeydown_ "if(event.key==='Escape'){this.value='';this.dispatchEvent(new Event('input',{bubbles:true}))}" - ] - whenJust actions id - content - - --- | Native details/summary facet disclosure shared by Explorer's lazy hierarchy --- and inventory filter menus. Extra attributes must not include @class@. -facetSection_ :: Bool -> Text -> [Attribute] -> Html () -> Html () -> Html () -facetSection_ startOpen extraClass attrs title content = - details_ - ( [ class_ $ "facet-section block border-t border-strokeWeak [&[open]>summary_.facet-chevron]:rotate-0 " <> extraClass - , data_ "component" "facet-section" - ] - <> attrs - <> [open_ "" | startOpen] - ) - do - summary_ [class_ "flex cursor-pointer list-none items-center gap-2 rounded px-2 py-2 text-xs font-semibold text-textStrong hover:bg-fillWeak [&::-webkit-details-marker]:hidden"] do - faSprite_ "chevron-down" "regular" "facet-chevron h-2.5 w-2.5 shrink-0 -rotate-90 transition-transform" - div_ [class_ "min-w-0 flex-1"] title - content - - --- | Shared option row. Callers provide the control/label body and optional count. -facetOption_ :: Text -> [Attribute] -> Html () -> Html () -> Html () -facetOption_ extraClass attrs body trailing = - label_ - ( [ class_ $ "flex min-h-7 cursor-pointer items-center justify-between gap-2 rounded px-2 py-1 hover:bg-fillWeak " <> extraClass - , data_ "component" "facet-option" - ] - <> attrs - ) - do - div_ [class_ "flex min-w-0 flex-1 items-center gap-2"] body - trailing - - -- | Header of an entity detail drawer: icon and title with inline @badges@, then the -- identity @chips@ row. Its sections go in a @main_@ that owns their rules -- (@[&>*+*]:border-t [&>*+*]:pt-4@), so 'detailSection_' and 'pivotLinks_' carry none. @@ -1116,7 +1067,7 @@ curlCommand method url headers body = T.intercalate " \\\n " $ ("curl -X " <> m -- server-generated ids, never from user input. Pair with @type_ "search"@ so Escape -- clears the box and refilters natively. filterInputAttr_ :: Text -> Attribute -filterInputAttr_ sel = term "_" [text|on input or htmx:after:swap from document set v to my value.toLowerCase() then repeat for el in <${sel}/> if (el.dataset.filter or el.textContent).toLowerCase().includes(v) remove .hidden from el else add .hidden to el end end|] +filterInputAttr_ sel = term "_" [text|on input set v to my value.toLowerCase() then repeat for el in <${sel}/> if (el.dataset.filter or el.textContent).toLowerCase().includes(v) remove .hidden from el else add .hidden to el end end on htmx:after:swap from document if my value is not '' send input to me end on keydown[key is 'Escape'] set my value to '' then send input to me|] -- | Toned icon + label chip. diff --git a/src/Pages/Containers.hs b/src/Pages/Containers.hs index 34f02a95f..5d681cddd 100644 --- a/src/Pages/Containers.hs +++ b/src/Pages/Containers.hs @@ -22,8 +22,8 @@ import Lucid import Models.Projects.Projects qualified as Projects import Models.Telemetry.Containers (ContainerRow (..), Runtime (..), Scope (..), containersInWindowCached, cpuPctOfLimit, freshnessWindow, memPctOfLimit, runtimeOf) import Pages.BodyWrapper (BWConfig (..), PageCtx (..), mkPageCtx) -import Pages.Components (BadgeColor (..), Deferred (..), EmptyStateAction (..), EmptyStateCfg (..), RefreshingDeferred (..), callout_, detailSection_, emptyState_, entityHeader_, factGrid_, metaChip_, pivotLinks_, tableSkeleton_, timeRefreshListener_, withDeferredBody) -import Pkg.Components.Table (Column, Config (..), Features (..), SearchMode (..), Table (..), ZeroState (..), col, facetActions, facetValues, singleSelectFilter, withAttrs, withColHeaderExtra) +import Pages.Components (BadgeColor (..), Deferred (..), EmptyStateAction (..), EmptyStateCfg (..), RefreshingDeferred (..), callout_, detailSection_, emptyState_, entityHeader_, factGrid_, metaChip_, pivotLinks_, tableSkeleton_, withDeferredBody) +import Pkg.Components.Table (Column, Features (..), Table (..), ZeroState (..), col, countedFilter, facetActions, inventoryTable, withAttrs, withColHeaderExtra) import Pkg.Components.TimePicker qualified as TimePicker import Pkg.Components.Widget qualified as Widget import Relude @@ -145,22 +145,16 @@ containersGetH pid runtimeM namespaceM nodeM imageM clusterM fromParam toParam s rows = sortOn (Down . (.cpuCores)) $ V.toList $ applyFilters filters allRows -- Facet values come from the unfiltered result, so choosing a namespace never empties -- the node or image menus — the way a facet bar is expected to behave. - menu label param selected fromRow = singleSelectFilter label param selected $ facetValues fromRow allRows + menu label param selected fromRow = countedFilter label param selected (maybeToList . fromRow) allRows + let table = inventoryTable "containers" deferredUrl pure - Table - { -- bulkActionsInHeader is what puts the header action group — and with it the whole - -- filter dropdown — into a column header. Leaving it unset renders no facet menus - -- at all, however many are configured. - config = def{elemID = "containersForm", containerId = Just "containersContainer", addPadding = True, renderAsTable = True, bulkActionsInHeader = Just 0} - , columns = containerColumns + table + { columns = containerColumns , rows = V.fromList $ map (ContainerVM pid window) rows , features = - def - { header = Just $ timeRefreshListener_ "containersContainer" deferredUrl - , search = Just ClientSide - , searchPlaceholder = Just "Search containers" - , rowAttrs = Just $ drawerRowAttrs_ . detailUrl - , tableHeaderActions = + table.features + { rowAttrs = Just $ drawerRowAttrs_ . detailUrl + , facets = Just $ facetActions (infraUrl pid "/infrastructure/containers" [] window) @@ -173,9 +167,7 @@ containersGetH pid runtimeM namespaceM nodeM imageM clusterM fromParam toParam s , menu "Node" "node" filters.node (.nodeName) , menu "Image" "image" filters.image (.image) ] - , showFilterRail = True , resultSummary = Just $ "Showing " <> show (length rows) <> " of " <> show (V.length allRows) <> " containers reporting in the final " <> freshnessLabel window <> " of this range" - , exportName = Just "containers" , zeroState = Just ZeroState @@ -191,8 +183,8 @@ containersGetH pid runtimeM namespaceM nodeM imageM clusterM fromParam toParam s containerColumns :: [Column ContainerVM] containerColumns = [ col "Container" renderNameCol & withAttrs [class_ "w-80 max-w-80 overflow-hidden max-md:w-auto max-md:max-w-none"] - , col "Pod" (textCell (.podName)) & withAttrs [class_ "w-72 max-w-72 overflow-hidden max-lg:hidden"] - , col "Namespace" (textCell (.namespace)) & withAttrs [class_ "w-32 max-lg:hidden"] + , col "Pod" (textCell (.podName)) & withAttrs [class_ "w-72 max-w-72 overflow-hidden max-2xl:hidden"] + , col "Namespace" (textCell (.namespace)) & withAttrs [class_ "w-32 max-2xl:hidden"] , col "Node" (textCell (.nodeName)) & withAttrs [class_ "w-36 max-md:hidden"] , col "CPU (cores)" (numCell (showFFloat' 3) (.cpuCores)) & withAttrs [class_ "w-24 text-right"] , col "CPU limit used" (pctCell "CPU limit used" cpuPctOfLimit) & withAttrs [class_ "w-36 max-md:hidden"] @@ -248,7 +240,7 @@ containersGetH pid runtimeM namespaceM nodeM imageM clusterM fromParam toParam s in span_ [class_ "min-w-0 flex-1 truncate", data_ "tippy-content" $ "Image: " <> image] $ toHtml image -- The badge is a flex box, so the ellipsis has to live on an inner block or the name clips at its start. whenJust vm.row.workload \workload -> span_ [class_ "badge badge-xs badge-ghost min-w-0 max-w-36 truncate", data_ "tippy-content" $ "Workload: " <> workload] $ span_ [class_ "min-w-0 truncate"] $ toHtml workload - div_ [class_ "hidden max-lg:flex flex-col gap-0.5 text-xs leading-normal text-textWeak"] + div_ [class_ "hidden max-2xl:flex flex-col gap-0.5 text-xs leading-normal text-textWeak"] $ forM_ ([("Pod", vm.row.podName), ("Namespace", vm.row.namespace), ("Cluster", vm.row.cluster), ("Node / host", vm.row.nodeName)] :: [(Text, Maybe Text)]) \(label, value) -> whenJust value \v -> span_ [class_ "whitespace-normal break-all"] $ toHtml $ label <> ": " <> v diff --git a/src/Pages/Infrastructure.hs b/src/Pages/Infrastructure.hs index 591e26be8..bb4082410 100644 --- a/src/Pages/Infrastructure.hs +++ b/src/Pages/Infrastructure.hs @@ -32,14 +32,14 @@ import Pages.Components (BadgeColor (..), Deferred (..), EmptyStateAction (..), import Pages.Containers (deferUrl, infraSnapshot, infraUrl, infrastructureBW, matchesAny, matchesFilter, mkWindow, pctText) import Pages.Containers qualified as Containers import Pages.LogExplorer.Log qualified as Log -import Pkg.Components.Table (Config (..), Features (..), SearchMode (..), Table (..), ZeroState (..), col, facetActions, facetValues, singleSelectFilter, withAttrs) +import Pkg.Components.Facets qualified as Facets +import Pkg.Components.Table (Features (..), SelectControl (..), Table (..), TableTabs (..), ZeroState (..), col, countedFilter, facetActions, facetsConfig, inventoryTable, selectControl_, withAttrs) import Pkg.Components.TimePicker qualified as TimePicker import Pkg.Components.Widget qualified as Widget import Pkg.DeriveUtils (WrappedEnumSC (..)) import Relude -import Relude.Extra.Tuple (dup) import System.Types (ATAuthCtx, RespHeaders, addRespHeaders) -import Utils (TabStrip (..), drawerLoadAttrs_, drawerRowAttrs_, faSprite_, formatBytes, navTabStrip_, showFFloat') +import Utils (drawerLoadAttrs_, drawerRowAttrs_, faSprite_, formatBytes, showFFloat') -- | Group by an optional key, dropping rows without one. Per-key lists come out in reverse @@ -139,19 +139,13 @@ hostGroupOption = \case GroupIntegration -> ("integration", "Integration") --- | Bucket every host falls into. @GroupNone@ collapses to a single bucket, which the table --- skips entirely and the map renders as one section. -groupHosts :: HostGroup -> V.Vector HostRow -> [(Text, [HostRow])] -groupHosts grouping = groupRows \host -> - Just case grouping of - GroupNone -> "All hosts" - GroupProvider -> fromMaybe "Unknown provider" host.provider - GroupRegion -> fromMaybe "Unknown region" host.region - GroupOS -> fromMaybe "Unknown OS" host.osType - GroupIntegration -> maybe "OpenTelemetry" integrationLabel $ listToMaybe $ drop 1 host.integrations - - -data HostListRow = HostGroupRow Text Int | HostItem HostRow +hostGroupLabel :: HostGroup -> HostRow -> Text +hostGroupLabel grouping host = case grouping of + GroupNone -> "All hosts" + GroupProvider -> fromMaybe "Unknown provider" host.provider + GroupRegion -> fromMaybe "Unknown region" host.region + GroupOS -> fromMaybe "Unknown OS" host.osType + GroupIntegration -> maybe "OpenTelemetry" integrationLabel $ listToMaybe $ drop 1 host.integrations hostsGetH :: Projects.ProjectId -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> ATAuthCtx (RespHeaders HostsGet) @@ -167,42 +161,30 @@ hostsGetH pid providerM regionM osM integrationM groupM fromParam toParam sinceP addRespHeaders $ HostsPage $ PageCtx (infrastructureBW pid "Hosts" window bw) body -newtype HostsGet = HostsPage (PageCtx (Deferred (Table HostListRow))) - deriving (ToHtml) via (PageCtx (RefreshingDeferred (Table HostListRow))) +newtype HostsGet = HostsPage (PageCtx (Deferred (Table HostRow))) + deriving (ToHtml) via (PageCtx (RefreshingDeferred (Table HostRow))) -hostsTable :: Projects.ProjectId -> TimePicker.TimeWindow -> Text -> HostFilters -> HostGroup -> V.Vector HostRow -> V.Vector HostRow -> Table HostListRow +hostsTable :: Projects.ProjectId -> TimePicker.TimeWindow -> Text -> HostFilters -> HostGroup -> V.Vector HostRow -> V.Vector HostRow -> Table HostRow hostsTable pid window url filters grouping hosts allHosts = - Table - { config = - def - { elemID = "hostsForm" - , containerId = Just "hostsContainer" - , addPadding = True - , renderAsTable = True - , bulkActionsInHeader = Just 0 - , containerClasses = "w-full mx-auto space-y-2 group/columns" - } - , columns = hostColumns - , rows = hostEntries grouping hosts + table + { columns = hostColumns + , rows = V.fromList $ sortOn (\h -> (hostGroupLabel grouping h, h.name)) $ V.toList hosts , features = - def - { search = Just ClientSide - , searchPlaceholder = Just "Search hosts" - , rowAttrs = Just $ \case HostGroupRow _ _ -> []; HostItem host -> drawerRowAttrs_ $ hostDetailUrl pid window host.name - , header = Just $ timeRefreshListener_ "hostsContainer" url >> hostGroupControl - , showFilterRail = True + table.features + { rowAttrs = Just $ drawerRowAttrs_ . hostDetailUrl pid window . (.name) + , rowGroup = if grouping == GroupNone then Nothing else Just $ Just . hostGroupLabel grouping + , grouping = Just $ SelectControl "group" "Group by" (hostGroupParam grouping) (map hostGroupOption [minBound ..]) url "hostsContainer" , resultSummary = Just $ "Showing " <> show (V.length hosts) <> " of " <> show (V.length allHosts) <> " hosts" - , exportName = Just "hosts" - , tableHeaderActions = + , facets = Just $ facetActions (infraUrl pid "/infrastructure/hosts" [("group", hostGroupParam grouping) | grouping /= GroupNone] window) "hostsContainer" - [ singleSelectFilter "Provider" "provider" filters.provider $ facetValues (.provider) allHosts - , singleSelectFilter "Region" "region" filters.region $ facetValues (.region) allHosts - , singleSelectFilter "OS" "os" filters.osType $ facetValues (.osType) allHosts - , singleSelectFilter "Integration" "integration" filters.integration $ map integrationLabel $ ordNub $ concatMap (.integrations) $ V.toList allHosts + [ countedFilter "Provider" "provider" filters.provider (maybeToList . (.provider)) allHosts + , countedFilter "Region" "region" filters.region (maybeToList . (.region)) allHosts + , countedFilter "OS" "os" filters.osType (maybeToList . (.osType)) allHosts + , countedFilter "Integration" "integration" filters.integration (map integrationLabel . (.integrations)) allHosts ] , zeroState = Just @@ -215,17 +197,7 @@ hostsTable pid window url filters grouping hosts allHosts = } } where - hostEntries GroupNone = V.map HostItem - hostEntries g = V.fromList . concatMap (\(label, hs) -> HostGroupRow label (length hs) : map HostItem (sortOn (.name) hs)) . groupHosts g - hostGroupControl = - form_ [method_ "get", action_ $ "/p/" <> pid.toText <> "/infrastructure/hosts", class_ "ml-auto mr-3 flex w-fit items-center gap-2 whitespace-nowrap"] do - TimePicker.timeHiddenInputs_ window.fromQuery window.toQuery window.sinceQuery - forM_ [(field, value) | (field, Just value) <- [("provider", filters.provider), ("region", filters.region), ("os", filters.osType), ("integration", filters.integration)]] \(field, value) -> - input_ [type_ "hidden", name_ field, value_ value] - label_ [Lucid.for_ "hosts-group", class_ "shrink-0 text-xs text-textWeak"] "Group by" - select_ [id_ "hosts-group", name_ "group", class_ "select select-xs w-auto cursor-pointer border-strokeWeak bg-bgBase", onchange_ "this.form.requestSubmit()"] - $ forM_ (map hostGroupOption [minBound ..]) \(value, label) -> - option_ ([value_ value] <> [selected_ "" | value == hostGroupParam grouping]) $ toHtml label + table = inventoryTable "hosts" url -- Configuration only earns its width when some host reports a provider or region; it is -- decided over the unfiltered inventory so a facet never toggles a column. hostColumns = @@ -235,29 +207,26 @@ hostsTable pid window url filters grouping hosts allHosts = , col "CPU" (metricCell (.cpuPct)) & withAttrs [class_ "w-32"] , col "Memory" (metricCell (.memoryPct)) & withAttrs [class_ "w-32"] , col "Storage" (metricCell (.storagePct)) & withAttrs [class_ "host-col-storage w-32 max-lg:hidden"] - , col "Load (1m)" (itemOnly $ plainCell . fmap (showFFloat' 2) . (.load1)) & withAttrs [class_ "host-col-load w-24 text-right max-xl:hidden"] + , col "Load (1m)" (plainCell . fmap (showFFloat' 2) . (.load1)) & withAttrs [class_ "host-col-load w-24 text-right max-xl:hidden"] , col "Uptime" uptimeCell & withAttrs [class_ "w-24 max-xl:hidden"] , col "Containers" containersCell & withAttrs [class_ "w-24 text-right"] , col "Integrations" integrationsCell & withAttrs [class_ "w-56 max-md:hidden"] ] where -- The row itself opens the drawer; a button in the name would be a second tab stop for the same action. - nameCell = \case - HostGroupRow label count -> div_ [class_ "flex items-center gap-2 py-1 font-semibold text-textStrong"] $ toHtml label >> span_ [class_ "badge badge-xs badge-ghost"] (toHtml $ show count) - HostItem host -> div_ [class_ "flex min-w-0 items-center gap-2 font-medium text-textStrong"] do - faSprite_ "server" "solid" "h-3.5 w-3.5 shrink-0 text-iconNeutral" - span_ [class_ "truncate"] $ toHtml host.name - configCell = itemOnly \host -> div_ [class_ "flex flex-wrap gap-1"] do + nameCell host = div_ [class_ "flex min-w-0 items-center gap-2 font-medium text-textStrong"] do + faSprite_ "server" "solid" "h-3.5 w-3.5 shrink-0 text-iconNeutral" + span_ [class_ "truncate"] $ toHtml host.name + configCell host = div_ [class_ "flex flex-wrap gap-1"] do whenJust host.provider $ metadataChip "cloud" . T.toTitle whenJust host.region $ metadataChip "location-dot" - systemCell = itemOnly \host -> span_ [class_ "text-xs text-textWeak"] $ toHtml $ T.intercalate " · " $ catMaybes [host.osType, host.architecture] - metricCell getter = itemOnly $ utilizationCell . getter - uptimeCell = itemOnly $ plainCell . fmap formatUptime . (.uptime) - containersCell = itemOnly $ span_ [class_ "tabular-nums text-textStrong"] . toHtml . show . (.containers) - integrationsCell = itemOnly \host -> div_ [class_ "flex flex-nowrap gap-1"] $ forM_ host.integrations \integration -> span_ [class_ "inline-flex items-center gap-1 whitespace-nowrap rounded-md border border-strokeWeak bg-fillWeak px-1.5 py-0.5 text-xs text-textWeak"] do + systemCell host = span_ [class_ "text-xs text-textWeak"] $ toHtml $ T.intercalate " · " $ catMaybes [host.osType, host.architecture] + metricCell getter = utilizationCell . getter + uptimeCell = plainCell . fmap formatUptime . (.uptime) + containersCell = span_ [class_ "tabular-nums text-textStrong"] . toHtml . show . (.containers) + integrationsCell host = div_ [class_ "flex flex-nowrap gap-1"] $ forM_ host.integrations \integration -> span_ [class_ "inline-flex items-center gap-1 whitespace-nowrap rounded-md border border-strokeWeak bg-fillWeak px-1.5 py-0.5 text-xs text-textWeak"] do faSprite_ (case integration of OpenTelemetryIntegration -> "arrows-turn-right"; KubernetesIntegration -> "cube"; DockerIntegration -> "layer-group") "regular" "h-3 w-3" toHtml $ integrationLabel integration - itemOnly render = \case HostGroupRow _ _ -> mempty; HostItem host -> render host metadataChip icon value = span_ [class_ "inline-flex items-center gap-1 rounded bg-fillWeak px-1.5 py-0.5 text-xs text-textWeak"] $ faSprite_ icon "regular" "h-3 w-3" >> toHtml value @@ -410,9 +379,8 @@ newtype ImagesGet = ImagesPage (PageCtx (Deferred (Table ImageRow))) imagesTable :: Projects.ProjectId -> TimePicker.TimeWindow -> Text -> Maybe Text -> Maybe Text -> V.Vector ImageRow -> V.Vector ImageRow -> Table ImageRow imagesTable pid window url runtimeM registryM images allImages = - Table - { config = def{elemID = "imagesForm", containerId = Just "imagesContainer", addPadding = True, renderAsTable = True, bulkActionsInHeader = Just 0} - , columns = + table + { columns = [ col "Image" (\image -> div_ [class_ "flex items-center gap-2 min-w-0"] $ faSprite_ "layer-group" "solid" "h-3.5 w-3.5 shrink-0 text-iconNeutral" >> span_ [class_ "truncate font-medium text-textStrong"] (toHtml image.image)) & withAttrs [class_ "min-w-72 w-full"] , col "Running" (\image -> span_ [class_ "tabular-nums text-textStrong"] $ toHtml $ show image.running) & withAttrs [class_ "w-24 text-right"] , col "Source" (\image -> span_ [class_ "whitespace-nowrap text-textWeak"] $ toHtml image.registry) & withAttrs [class_ "w-36"] @@ -424,26 +392,23 @@ imagesTable pid window url runtimeM registryM images allImages = ] , rows = images , features = - def - { header = Just $ timeRefreshListener_ "imagesContainer" url - , search = Just ClientSide - , searchPlaceholder = Just "Search images" - , rowAttrs = Just \image -> drawerRowAttrs_ $ infraUrl pid "/infrastructure/images/detail" [("image", image.image)] window - , tableHeaderActions = + table.features + { rowAttrs = Just \image -> drawerRowAttrs_ $ infraUrl pid "/infrastructure/images/detail" [("image", image.image)] window + , facets = Just $ facetActions (infraUrl pid "/infrastructure/images" [] window) "imagesContainer" - [ singleSelectFilter "Runtime" "runtime" runtimeM $ sortNub $ map Containers.runtimeLabel $ concatMap (.runtimes) $ V.toList allImages - , singleSelectFilter "Registry" "registry" registryM $ facetValues (Just . (.registry)) allImages + [ countedFilter "Runtime" "runtime" runtimeM (map Containers.runtimeLabel . (.runtimes)) allImages + , countedFilter "Registry" "registry" registryM (one . (.registry)) allImages ] , zeroState = Just $ ZeroState "layer-group" "No container images reporting" "Images appear when container telemetry includes container.image.name." (ESLink "https://monoscope.tech/docs/sdks/infrastructure/kubernetes" "Container setup guide") - , showFilterRail = True , resultSummary = Just $ "Showing " <> show (V.length images) <> " of " <> show (V.length allImages) <> " images" , exportName = Just "container-images" } } where + table = inventoryTable "images" url -- Two tags and a "+N" pill wrap rather than clip: a long tag used to cut the pill to "(". renderTags image = div_ [class_ "flex max-w-72 flex-wrap gap-1"] do forM_ (take 2 image.tags) $ \tag -> span_ [class_ "badge badge-xs badge-ghost shrink-0"] $ toHtml tag @@ -568,8 +533,9 @@ kubernetesGetH pid resourceM clusterM namespaceM statusM fromParam toParam since let resource = parseParam KubePods display resourceM url = deferUrl pid "/infrastructure/kubernetes" [("resource", resourceM), ("cluster", clusterM), ("namespace", namespaceM), ("status", statusM)] window body <- withDeferredBody deferredM "kubernetesContainer" url (tableSkeleton_ 8) do - allRows <- kubeRowsFromRows resource <$> infraSnapshot pid window - let rows = V.filter (\row -> matchesFilter clusterM row.cluster && matchesFilter namespaceM row.namespace && matchesFilter statusM (Just $ kubeStatusLabel row.status)) allRows + snapshot <- infraSnapshot pid window + let allRows = kubeRowsFromRows resource snapshot + rows = V.filter (\row -> matchesFilter clusterM row.cluster && matchesFilter statusM (Just $ kubeStatusLabel row.status)) $ kubeRowsFromRows resource $ V.filter (matchesFilter namespaceM . (.namespace)) snapshot pure $ kubernetesTable pid window url resource clusterM namespaceM statusM rows allRows addRespHeaders $ KubernetesPage $ PageCtx (infrastructureBW pid "Kubernetes" window bw) body @@ -580,9 +546,8 @@ newtype KubernetesGet = KubernetesPage (PageCtx (Deferred (Table KubeRow))) kubernetesTable :: Projects.ProjectId -> TimePicker.TimeWindow -> Text -> KubeResource -> Maybe Text -> Maybe Text -> Maybe Text -> V.Vector KubeRow -> V.Vector KubeRow -> Table KubeRow kubernetesTable pid window url resource clusterM namespaceM statusM rows allRows = - Table - { config = def{elemID = "kubernetesForm", containerId = Just "kubernetesContainer", addPadding = True, renderAsTable = True, bulkActionsInHeader = Just 0} - , columns = + table + { columns = [ col (resourceLabel resource) (\row -> div_ [class_ "flex min-w-0 items-center gap-2"] $ faSprite_ (kubeIcon resource) "solid" "h-3.5 w-3.5 shrink-0 text-iconNeutral" >> span_ [class_ "min-w-0 truncate font-medium text-textStrong", term "data-tippy-content" row.name] (toHtml $ bool id clusterLabel (resource == KubeClusters) row.name)) & withAttrs [class_ "min-w-56 w-full"] , col "Status" (statusBadge . (.status)) & withAttrs [class_ "w-28"] , col "Cluster" (\row -> maybe Containers.emDash_ (\value -> span_ [class_ "block truncate whitespace-nowrap text-textStrong", term "data-tippy-content" value] $ toHtml $ clusterLabel value) row.cluster) & withAttrs [class_ "w-36 max-lg:hidden"] @@ -597,27 +562,26 @@ kubernetesTable pid window url resource clusterM namespaceM statusM rows allRows ] , rows , features = - def - { search = Just ClientSide - , searchPlaceholder = Just $ "Search " <> display resource + table.features + { searchPlaceholder = Just $ "Search " <> display resource , rowAttrs = Just $ drawerRowAttrs_ . kubeDetailUrl - , header = Just $ timeRefreshListener_ "kubernetesContainer" url >> navTabStrip_ ViewTabs "Kubernetes resource" "tabs-sm mx-3 w-fit" [(toHtml $ resourceLabel r <> "s", infraUrl pid "/infrastructure/kubernetes" [("resource", display r)] window, r == resource) | r <- [minBound ..]] - , showFilterRail = True + , tabs = Just $ TableTabs "Kubernetes resource" [(resourceLabel r <> "s", infraUrl pid "/infrastructure/kubernetes" ([("resource", display r)] <> mapMaybe sequenceA [("cluster", clusterM), ("namespace", namespaceM), ("status", statusM)]) window, r == resource) | r <- [minBound ..]] , resultSummary = Just $ "Showing " <> show (V.length rows) <> " resources" , exportName = Just $ "kubernetes-" <> display resource - , tableHeaderActions = + , facets = Just $ facetActions (infraUrl pid "/infrastructure/kubernetes" [("resource", display resource)] window) "kubernetesContainer" - [ singleSelectFilter "Cluster" "cluster" clusterM $ facetValues (.cluster) allRows - , singleSelectFilter "Namespace" "namespace" namespaceM $ facetValues (.namespace) allRows - , singleSelectFilter "Status" "status" statusM $ facetValues (Just . kubeStatusLabel . (.status)) allRows + [ countedFilter "Cluster" "cluster" clusterM (maybeToList . (.cluster)) allRows + , countedFilter "Namespace" "namespace" namespaceM (maybeToList . (.namespace)) allRows + , countedFilter "Status" "status" statusM (one . kubeStatusLabel . (.status)) allRows ] , zeroState = Just $ ZeroState "cube" "No Kubernetes resources reporting" "Enable kubeletstats and k8s_cluster receivers to populate pods, workloads, and nodes." (ESLink "https://monoscope.tech/docs/sdks/infrastructure/kubernetes" "Kubernetes setup guide") } } where + table = inventoryTable "kubernetes" url kubeDetailUrl row = infraUrl pid "/infrastructure/kubernetes/detail" ([("resource", display resource), ("name", row.name)] <> mapMaybe sequenceA [("cluster", row.cluster), ("namespace", row.namespace)]) window @@ -702,7 +666,7 @@ hostMapGetH pid fillM groupM providerM regionM osM fromParam toParam sinceParam url = deferUrl pid "/infrastructure/host-map" [("fill", fillM), ("group", groupM), ("provider", providerM), ("region", regionM), ("os", osM)] window body <- withDeferredBody deferredM "hostMapContainer" url hostMapSkeleton_ do allHosts <- hostsFromRows <$> infraSnapshot pid window - let groups = groupHosts grouping $ applyHostFilters filters allHosts + let groups = groupRows (Just . hostGroupLabel grouping) $ applyHostFilters filters allHosts pure HostMapData{pid, window, fill = parseParam FillCPU display fillM, grouping, filters, allHosts, groups} addRespHeaders $ HostMapPage $ PageCtx (infrastructureBW pid "Host Map" window bw) body where @@ -714,36 +678,40 @@ hostMapGetH pid fillM groupM providerM regionM osM fromParam toParam sinceParam hostMap_ :: HostMapData -> Html () hostMap_ page = div_ [id_ "hostMapContainer", class_ "flex min-h-full flex-col bg-bgBase"] do timeRefreshListener_ "hostMapContainer" (deferUrl page.pid "/infrastructure/host-map" [("fill", Just $ display page.fill), ("group", Just $ hostGroupParam page.grouping), ("provider", page.filters.provider), ("region", page.filters.region), ("os", page.filters.osType)] page.window) - form_ [method_ "get", action_ $ "/p/" <> page.pid.toText <> "/infrastructure/host-map", class_ "flex flex-wrap items-end gap-3 border-b border-strokeWeak bg-bgRaised px-4 py-3 max-sm:grid max-sm:grid-cols-2"] do - TimePicker.timeHiddenInputs_ page.window.fromQuery page.window.toQuery page.window.sinceQuery - mapSelect "fill" "Fill by" (display page.fill) [(display f, case f of FillCPU -> "CPU usage"; FillMemory -> "Memory usage"; FillStorage -> "Storage usage") | f <- [minBound ..]] - mapSelect "group" "Group by" (hostGroupParam page.grouping) (map hostGroupOption [minBound ..]) - mapSelect "provider" "Provider" (fromMaybe "" page.filters.provider) $ ("", "All") : map dup (facetValues (.provider) page.allHosts) - mapSelect "region" "Region" (fromMaybe "" page.filters.region) $ ("", "All") : map dup (facetValues (.region) page.allHosts) - mapSelect "os" "Operating system" (fromMaybe "" page.filters.osType) $ ("", "All") : map dup (facetValues (.osType) page.allHosts) + div_ [class_ "flex flex-wrap items-center gap-3 border-b border-strokeWeak bg-bgRaised px-4 py-3 max-sm:grid max-sm:grid-cols-2"] do + selectControl_ $ SelectControl "fill" "Fill by" (display page.fill) [(display f, case f of { FillCPU -> "CPU usage"; FillMemory -> "Memory usage"; FillStorage -> "Storage usage" }) | f <- [minBound ..]] mapUrl "hostMapContainer" + selectControl_ $ SelectControl "group" "Group by" (hostGroupParam page.grouping) (map hostGroupOption [minBound ..]) mapUrl "hostMapContainer" div_ [class_ "ml-auto flex flex-wrap items-center gap-3 text-xs text-textWeak max-sm:col-span-2 max-sm:ml-0", Aria.label_ "Utilization legend"] do legend "bg-fillSuccess-strong" "Below 60%" legend "bg-fillWarning-strong" "60–85%" legend "bg-fillError-strong" "Above 85%" legend "bg-fillNeutral-strong" "No data" - if null page.groups - then - div_ [class_ "m-auto"] - $ emptyState_ - def{icon = Just "server", action = ESLink "https://monoscope.tech/docs/sdks/infrastructure/" "Set up host monitoring"} - "No hosts reporting" - "Enable host metrics or Kubernetes node telemetry to populate the map." - else div_ [class_ "flex flex-wrap items-start gap-4 p-4"] $ forM_ page.groups \(label, hosts) -> - let enlarged = length hosts <= 12 - in section_ [class_ $ "rounded-lg border border-strokeWeak bg-bgRaised p-3 shadow-sm " <> bool "min-w-80 flex-1" "w-fit min-w-72" enlarged] do - h2_ [class_ "mb-3 flex items-center gap-2 text-sm font-semibold text-textStrong"] $ toHtml label >> span_ [class_ "badge badge-xs badge-ghost"] (toHtml $ show (length hosts) <> " hosts") - div_ [class_ $ "flex flex-wrap " <> bool "gap-1" "gap-2" enlarged] $ forM_ (sortOn (.name) hosts) $ hostHex enlarged + div_ [class_ "flex items-start gap-4 p-4 max-lg:flex-col"] do + Facets.sidebar_ + . facetsConfig + $ facetActions + mapUrl + "hostMapContainer" + [ countedFilter "Provider" "provider" page.filters.provider (maybeToList . (.provider)) page.allHosts + , countedFilter "Region" "region" page.filters.region (maybeToList . (.region)) page.allHosts + , countedFilter "OS" "os" page.filters.osType (maybeToList . (.osType)) page.allHosts + ] + div_ [class_ "min-w-0 w-full flex-1"] do + if null page.groups + then + div_ [class_ "m-auto"] + $ emptyState_ + def{icon = Just "server", action = ESLink "https://monoscope.tech/docs/sdks/infrastructure/" "Set up host monitoring"} + "No hosts reporting" + "Enable host metrics or Kubernetes node telemetry to populate the map." + else div_ [class_ "flex flex-wrap items-start gap-4"] $ forM_ page.groups \(label, hosts) -> + let enlarged = length hosts <= 12 + in section_ [class_ $ "rounded-lg border border-strokeWeak bg-bgRaised p-3 shadow-sm " <> bool "min-w-80 flex-1" "w-fit min-w-72" enlarged] do + h2_ [class_ "mb-3 flex items-center gap-2 text-sm font-semibold text-textStrong"] $ toHtml label >> span_ [class_ "badge badge-xs badge-ghost"] (toHtml $ show (length hosts) <> " hosts") + div_ [class_ $ "flex flex-wrap " <> bool "gap-1" "gap-2" enlarged] $ forM_ (sortOn (.name) hosts) $ hostHex enlarged where + mapUrl = infraUrl page.pid "/infrastructure/host-map" ([("fill", display page.fill), ("group", hostGroupParam page.grouping)] <> mapMaybe sequenceA [("provider", page.filters.provider), ("region", page.filters.region), ("os", page.filters.osType)]) page.window legend colour label = span_ [class_ "inline-flex items-center gap-1.5"] $ span_ [class_ $ "h-3 w-3 " <> colour, style_ hexClipPath] mempty >> toHtml label - mapSelect :: Text -> Text -> Text -> [(Text, Text)] -> Html () - mapSelect field label current options = label_ [class_ "flex flex-col gap-1 text-xs text-textWeak"] do - toHtml label - select_ [name_ field, class_ "select select-sm min-w-44 border-strokeWeak bg-bgBase text-sm text-textStrong max-sm:h-11 max-sm:min-w-0 max-sm:w-full", onchange_ "this.form.requestSubmit()"] $ forM_ options \(value, title) -> option_ ([value_ value] <> [selected_ "" | value == current]) $ toHtml title hostHex enlarged host = div_ [class_ $ "flex flex-col items-center gap-1 " <> bool "" "w-24" enlarged] do let value = case page.fill of FillCPU -> host.cpuPct; FillMemory -> host.memoryPct; FillStorage -> host.storagePct button_ diff --git a/src/Pages/LogExplorer/Log.hs b/src/Pages/LogExplorer/Log.hs index 654716a09..53be42433 100644 --- a/src/Pages/LogExplorer/Log.hs +++ b/src/Pages/LogExplorer/Log.hs @@ -39,7 +39,6 @@ import Data.Aeson.Types qualified as AET import Data.Default (Default, def) import Data.Effectful.Hasql (Hasql) import Data.Effectful.Hasql qualified as Hasql -import Data.Foldable.WithIndex (iforM_) import Data.HashMap.Strict qualified as HM import Data.List qualified as L import Data.Map.Strict qualified as Map @@ -75,10 +74,12 @@ import Models.Telemetry.Schema qualified as Schema import Models.Telemetry.Telemetry qualified as Telemetry import NeatInterpolation (text) import Pages.BodyWrapper (BWConfig (..), PageCtx (..), checkFreeTierStatus, mkPageCtx, pageActions, pageTitle) -import Pages.Components (FieldCfg (..), FieldSize (..), facetOption_, facetRail_, facetSection_, formField_, keyboardActivateAttr_, lazyPanel_, localTimeFmt_, resetFormOnSuccessAttr_, resizer_) +import Pages.Components (FieldCfg (..), FieldSize (..), formField_, keyboardActivateAttr_, lazyPanel_, localTimeFmt_, resetFormOnSuccessAttr_, resizer_) import Pages.LogExplorer.LogItem qualified as LogItem import Pages.Monitors qualified as AlertUI import Pkg.AI qualified as AI +import Pkg.Components.Facets (FacetChoice (..), FacetContent (..), FacetNode (..), FacetOverflow (..), facetHeadCount, facetNode_, facetTail_) +import Pkg.Components.Facets qualified as Facets import Pkg.Components.LogQueryBox (LogQueryBoxConfig (..), VizSurface (..), VizType (..), enrichSchemaWithFacets, logQueryBox_, visTypes) import Pkg.Components.TimePicker qualified as Components import Pkg.Components.Widget (WidgetAxis (..), WidgetType (WTTimeseries, WTTimeseriesLine)) @@ -99,7 +100,7 @@ import System.Types import Text.Casing (fromAny, toKebab) import Text.Megaparsec (parseMaybe) import Text.Slugify (slugify) -import Utils (FieldAction (..), FieldMenuCtx (..), LoadingSize (..), LoadingType (..), encodeText, explorerNavTabs_, faSprite_, fieldContextMenuItems_, fieldMenuPanel_, getDurationNSMS, getServiceColors, levelFillColor, listToIndexHashMap, loadingIndicator_, lookupVecBy, lookupVecNonEmptyText, lookupVecTextByKey, methodFillColor, nonEmptyT, popoverTrigger_, prettyPrintCount, sanitizeBackendError, serviceFillColor, showFFloat', statusFillColorText, toUriStr) +import Utils (FieldAction (..), FieldMenuCtx (..), encodeText, explorerNavTabs_, faSprite_, fieldContextMenuItems_, fieldMenuPanel_, getDurationNSMS, getServiceColors, levelFillColor, listToIndexHashMap, lookupVecBy, lookupVecNonEmptyText, lookupVecTextByKey, methodFillColor, nonEmptyT, popoverTrigger_, prettyPrintCount, sanitizeBackendError, serviceFillColor, showFFloat', statusFillColorText, toUriStr) import Web.FormUrlEncoded (FromForm) import Web.HttpApiData (parseUrlPiece) @@ -513,105 +514,72 @@ facetGroupPaths g = map (.path) $ Map.findWithDefault [] g facetsByGroup -- | Render facet data for Log Explorer sidebar in a compact format. -- The facet counts are scaled in the upstream summary based on the selected time range. renderFacets :: FacetSummary -> Html () -renderFacets facetSummary = - forM_ (universe :: [FacetGroup]) \facetGroup -> renderFacetGroup (facetGroup == FGCommon) facetGroup facetSummary +renderFacets = mapM_ facetNode_ . facetGroups --- | A group shell is cheap enough for the initial sidebar. Only Common Filters --- includes its fields immediately; every closed group fetches and replaces --- its shell with the server-rendered Lucid fragment on first open. -renderFacetGroup :: Bool -> FacetGroup -> FacetSummary -> Html () -renderFacetGroup loaded facetGroup facetSummary = - facetSection_ loaded "facet-section-group" attrs (span_ [class_ "font-medium text-sm"] $ toHtml $ facetGroupLabel facetGroup) body - where - attrs = - if loaded - then [] - else - [ hxGet_ url - , hxTrigger_ "toggle[target.open] once" - , hxTarget_ "this" - , hxSwap_ "outerHTML" - , hxIndicator_ "find .facet-group-loader" - ] - body - | loaded = div_ [class_ "facets-container"] $ renderFacetFields facetGroup facetSummary - | otherwise = div_ [class_ "facet-group-loader htmx-indicator flex h-8 items-center justify-center"] $ loadingIndicator_ LdXS LdSpinner - url = "/p/" <> facetSummary.projectId <> "/log_explorer/facets?group=" <> facetGroupParam facetGroup +facetGroups :: FacetSummary -> [FacetNode] +facetGroups summary = [facetGroupNode (g == FGCommon) g summary | g <- universe] --- | Facet values shown before the "+ More" fold. 'renderFacetFields' takes this --- many and 'renderFacetTail' drops exactly the same many — two different numbers --- here would make the tail repeat or skip values. -facetHeadCount :: Int -facetHeadCount = 5 - - -renderFacetFields :: FacetGroup -> FacetSummary -> Html () -renderFacetFields facetGroup facetSummary = do - let (FacetData facetMap) = facetSummary.facetJson - facets = Map.findWithDefault [] facetGroup facetsByGroup - -- Checkbox↔query sync lives in web-components/src/main.ts (syncFacetCheckboxes), - -- wired to `update-query` + `htmx:after:swap` so swapped-in facets re-sync. - iforM_ facets \idx facet -> do - let values = HM.lookupDefault [] facet.path facetMap - open = facetGroup == FGCommon && idx < 5 && not (null values) - (visibleValues, hiddenValues) = splitAt facetHeadCount values - hiddenCount = length hiddenValues - facetSection_ - open - "" - [] - ( div_ [class_ "flex items-center justify-between gap-2"] do - span_ [class_ "truncate text-sm font-normal", term "data-tippy-content" facet.path] $ toHtml facet.label - -- Bubble-halt so the ⋮ popover (and its menu items) don't toggle the
. - div_ [class_ "inline-block", [__|on click halt the event's bubbling|]] do - button_ ([type_ "button", class_ "cursor-pointer rounded p-1 hover:bg-fillWeak", Aria.label_ "Facet options"] <> popoverTrigger_ (slugify facet.path)) - $ faSprite_ "ellipsis-vertical" "regular" "w-3 h-3" - ul_ ([class_ "dropdown menu p-2 shadow-sm bg-bgRaised rounded-box w-96 border border-strokeWeak z-50", term "data-field-path" facet.path] <> fieldMenuPanel_ (slugify facet.path)) - $ fieldContextMenuItems_ (StaticField facet.path Nothing) [FCopyField, FDivider, FGroupBy, FViewPatterns, FDivider, FAddColumn] - ) - $ div_ [class_ "facet-values pl-5 pr-1 mb-1 space-y-1"] do - if null values - then div_ [class_ "facet-empty px-1 py-1 text-xs italic text-textWeak"] "no values in window" - else forM_ visibleValues (renderFacetValue facet) - when (hiddenCount > 0) - $ div_ [class_ "facet-tail"] - $ button_ - [ type_ "button" - , class_ "facet-more text-textBrand text-xs px-1 py-0.5 cursor-pointer hover:underline" - , hxGet_ $ "/p/" <> facetSummary.projectId <> "/log_explorer/facets?field=" <> toUriStr facet.path - , hxTarget_ "closest .facet-tail" +facetGroupNode :: Bool -> FacetGroup -> FacetSummary -> FacetNode +facetGroupNode loaded facetGroup summary = + FacetNode + { label = facetGroupLabel facetGroup + , path = Nothing + , expanded = loaded + , attrs = + if loaded + then [] + else + [ hxGet_ $ "/p/" <> summary.projectId <> "/log_explorer/facets?group=" <> facetGroupParam facetGroup + , hxTrigger_ "toggle[target.open] once" + , hxTarget_ "this" , hxSwap_ "outerHTML" + , hxIndicator_ "find .facet-group-loader" ] - $ toHtml - $ "+ More (" - <> prettyPrintCount hiddenCount - <> ")" + , actions = Nothing + , content = if loaded then FacetChildren fields else FacetLoading + } + where + (FacetData valuesByPath) = summary.facetJson + fields = + [ FacetNode + { label = facet.label + , path = Just facet.path + , expanded = facetGroup == FGCommon && index < 5 && not (null values) + , attrs = [] + , actions = Just do + button_ ([type_ "button", class_ "cursor-pointer rounded p-1 hover:bg-fillWeak", Aria.label_ "Facet options"] <> popoverTrigger_ (slugify facet.path)) $ faSprite_ "ellipsis-vertical" "regular" "w-3 h-3" + ul_ ([class_ "dropdown menu p-2 shadow-sm bg-bgRaised rounded-box w-96 border border-strokeWeak z-50", term "data-field-path" facet.path] <> fieldMenuPanel_ (slugify facet.path)) + $ fieldContextMenuItems_ (StaticField facet.path Nothing) [FCopyField, FDivider, FGroupBy, FViewPatterns, FDivider, FAddColumn] + , content = + FacetValues (map (facetChoice facet) values) + $ FetchValues + [ hxGet_ $ "/p/" <> summary.projectId <> "/log_explorer/facets?field=" <> toUriStr facet.path + , hxTarget_ "closest .facet-tail" + , hxSwap_ "outerHTML" + ] + } + | (index, facet) <- zip [0 :: Int ..] $ Map.findWithDefault [] facetGroup facetsByGroup + , let values = HM.lookupDefault [] facet.path valuesByPath + ] -renderFacetValue :: Facet -> FacetValue -> Html () -renderFacetValue f (FacetValue val count) = - facetOption_ - "facet-item max-md:min-h-9" - [] - ( do - input_ - [ type_ "checkbox" - , class_ "checkbox checkbox-xs max-md:checkbox-sm" - , -- Via queryEditorCall, not the element directly: Monaco is loaded lazily, so on a fresh - -- page load is still un-upgraded and `.toggleSubQuery` doesn't exist yet. - term "hx-on:click" "window.queryEditorCall('toggleSubQuery', this.dataset.field, this.dataset.value)" - , Aria.label_ (f.path <> " equals " <> val) - , term "data-tippy-content" (f.path <> " == \"" <> val <> "\"") - , term "data-field" f.path - , term "data-value" val - ] - let colorClass = f.color val - unless (T.null colorClass) $ span_ [class_ $ colorClass <> " shrink-0 w-0.5 h-3 rounded-sm"] "" - span_ [class_ "facet-value truncate text-xs", term "data-tippy-content" val] $ toHtml val - ) - (span_ [class_ "facet-count shrink-0 text-xs tabular-nums text-textWeak"] $ toHtml $ prettyPrintCount count) +facetChoice :: Facet -> FacetValue -> FacetChoice +facetChoice f (FacetValue val count) = + FacetChoice + { label = val + , multiSelect = True + , inputAttrs = + [ term "hx-on:click" "window.queryEditorCall('toggleSubQuery', this.dataset.field, this.dataset.value)" + , Aria.label_ (f.path <> " equals " <> val) + , term "data-tippy-content" (f.path <> " == \"" <> val <> "\"") + , term "data-field" f.path + , term "data-value" val + ] + , marker = if T.null (f.color val) then Nothing else Just $ span_ [class_ $ f.color val <> " shrink-0 w-0.5 h-3 rounded-sm"] "" + , count = Just $ prettyPrintCount count + } -- | Descendants of a page of rows, for the trace tree: seed from each row's own @@ -1022,7 +990,7 @@ logExplorerFacetsH pid fieldM groupM = do (div_ [class_ "px-1 py-4 text-xs italic text-textWeak"] "Filters are still being built for this project.") ( \summary -> case (fieldM, facetGroupM) of (Just field, _) -> renderFacetTail field summary - (_, Just facetGroup) -> renderFacetGroup True facetGroup summary + (_, Just facetGroup) -> facetNode_ $ facetGroupNode True facetGroup summary _ -> renderFacets summary ) facetSummary @@ -1032,12 +1000,7 @@ logExplorerFacetsH pid fieldM groupM = do whenJust (find ((== field) . (.path)) facetDefs) \facet -> do let (FacetData facetMap) = facetSummary.facetJson values = drop facetHeadCount $ HM.lookupDefault [] field facetMap - count = prettyPrintCount $ length values - details_ [class_ "facet-tail group", open_ ""] do - summary_ [class_ "list-none cursor-pointer text-textBrand text-xs px-1 py-0.5 hover:underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-strokeBrand-strong"] do - span_ [class_ "group-open:hidden"] $ toHtml $ "+ More (" <> count <> ")" - span_ [class_ "hidden group-open:inline"] $ toHtml $ "− Less (" <> count <> ")" - div_ [class_ "space-y-1"] $ forM_ values (renderFacetValue facet) + facetTail_ True $ map (facetChoice facet) values -- | Structured verdict for the query editor. It underlines @column@..@width@ and @@ -1689,16 +1652,14 @@ apiLogsPage page = do -- No `contain:layout` here: it makes this a containing block for fixed/anchored -- descendants, which clips the facet action popover (top layer) to the sidebar. facetsPanel = - facetRail_ - (Just "facets-container") - "w-68 will-change-[width] text-sm text-textWeak shrink-0 h-full overflow-y-scroll max-md:w-full max-md:shrink max-md:max-h-[55vh] max-md:border-b max-md:border-strokeWeak group-has-[.toggle-filters:checked]/pg:max-w-0 group-has-[.toggle-filters:checked]/pg:overflow-hidden max-md:group-has-[.toggle-filters:checked]/pg:max-h-0" - "Search filters" - Nothing - $ div_ [id_ "facets-list"] - $ maybe - (div_ [class_ "px-1 py-4 text-xs italic text-textWeak"] "Filters are still being built for this project.") - renderFacets - page.facetSummary + Facets.sidebar_ + Facets.Config + { elemId = "facets-container" + , extraClass = "will-change-[width] h-full overflow-y-scroll max-md:shrink max-md:max-h-[55vh] max-md:border-b max-md:border-strokeWeak group-has-[.toggle-filters:checked]/pg:max-w-0 group-has-[.toggle-filters:checked]/pg:overflow-hidden max-md:group-has-[.toggle-filters:checked]/pg:max-h-0" + , clear = Just [[__|on click repeat for cb in in closest .facet-rail call cb.click() end|]] + , content = facetGroups <$> page.facetSummary + , layout = Facets.Plain + } logsListPanel = div_ [class_ "@container grow will-change-[width] contain-[layout_style] relative flex flex-col shrink-1 min-w-0 w-full h-full ", id_ "logs_list_container"] do rowCountHeader diff --git a/src/Pkg/Components/Facets.hs b/src/Pkg/Components/Facets.hs new file mode 100644 index 000000000..bb4628dce --- /dev/null +++ b/src/Pkg/Components/Facets.hs @@ -0,0 +1,112 @@ +module Pkg.Components.Facets (Config (..), Layout (..), FacetNode (..), FacetContent (..), FacetOverflow (..), FacetChoice (..), sidebar_, facetNode_, facetChoice_, facetTail_, facetHeadCount) where + +import Lucid +import Lucid.Hyperscript (__) +import Pages.Components (filterInputAttr_, searchInput_) +import Relude +import Utils (LoadingSize (..), LoadingType (..), faSprite_, loadingIndicator_, prettyPrintCount) + + +data Layout = Plain | Collapsible + + +data Config = Config + { elemId :: Text + , extraClass :: Text + , clear :: Maybe [Attribute] + , content :: Maybe [FacetNode] + , layout :: Layout + } + + +-- | Explorer's facet sidebar, also embedded by inventory tables and the host map. +sidebar_ :: Config -> Html () +sidebar_ cfg = case cfg.layout of + Plain -> rail "" + Collapsible -> details_ [class_ "w-68 shrink-0 max-lg:w-full lg:[&::details-content]:block lg:[&::details-content]:[content-visibility:visible]"] do + summary_ [class_ "flex cursor-pointer list-none items-center gap-2 rounded px-2 py-2 text-xs font-semibold text-textStrong hover:bg-fillWeak lg:hidden [&::-webkit-details-marker]:hidden"] "Filters" + rail " max-lg:w-full" + where + rail extra = div_ [class_ $ "facet-rail group/rail flex w-68 shrink-0 flex-col gap-2 text-sm text-textWeak max-md:w-full " <> cfg.extraClass <> extra, data_ "component" "facet-rail", id_ cfg.elemId] do + searchInput_ + "sticky top-0 z-10 h-9 w-[calc(100%-1rem)] mx-2 border-strokeStrong bg-bgBase" + "Search filters" + [name_ "facet-search", filterInputAttr_ $ "#" <> cfg.elemId <> " :is(.facet-item,.facet-section)"] + forM_ cfg.clear $ \attrs -> button_ ([type_ "button", class_ "hidden items-center justify-between rounded px-2 py-1.5 text-xs text-textBrand hover:bg-fillWeak group-has-[.facet-item_input:checked]/rail:flex"] <> attrs) $ "Clear all" >> faSprite_ "xmark" "regular" "h-3 w-3" + div_ [class_ "facets-container"] $ maybe (div_ [class_ "px-1 py-4 text-xs italic text-textWeak"] "Filters are still being built for this project.") (mapM_ facetNode_) cfg.content + + +data FacetNode = FacetNode + { label :: Text + , path :: Maybe Text + , expanded :: Bool + , attrs :: [Attribute] + , actions :: Maybe (Html ()) + , content :: FacetContent + } + + +data FacetContent + = FacetValues [FacetChoice] FacetOverflow + | FacetChildren [FacetNode] + | FacetLoading + + +facetNode_ :: FacetNode -> Html () +facetNode_ node = do + let grouped = case node.content of FacetValues{} -> False; FacetChildren{} -> True; FacetLoading -> True + details_ ([class_ $ "facet-section block border-t border-strokeWeak [&[open]>summary_.facet-chevron]:rotate-0 " <> bool "" "facet-section-group" grouped, data_ "component" "facet-section"] <> node.attrs <> [open_ "" | node.expanded]) do + summary_ [class_ "flex cursor-pointer list-none items-center gap-2 rounded px-2 py-2 text-textStrong hover:bg-fillWeak [&::-webkit-details-marker]:hidden"] do + faSprite_ "chevron-down" "regular" "facet-chevron h-2.5 w-2.5 shrink-0 -rotate-90 transition-transform" + div_ [class_ "flex min-w-0 flex-1 items-center justify-between gap-2"] do + span_ ([class_ $ "truncate text-sm " <> bool "font-normal" "font-medium" grouped] <> [term "data-tippy-content" p | p <- maybeToList node.path]) $ toHtml node.label + forM_ node.actions $ \actions -> div_ [class_ "inline-block", [__|on click halt the event's bubbling|]] actions + case node.content of + FacetChildren children -> div_ [class_ "facets-container"] $ mapM_ facetNode_ children + FacetLoading -> div_ [class_ "facet-group-loader htmx-indicator flex h-8 items-center justify-center"] $ loadingIndicator_ LdXS LdSpinner + FacetValues choices overflow -> div_ [class_ "facet-values pl-5 pr-1 mb-1 space-y-1"] do + let (visible, hidden) = splitAt facetHeadCount choices + moreLabel = "+ More (" <> prettyPrintCount (length hidden) <> ")" + if null choices + then div_ [class_ "facet-empty px-1 py-1 text-xs italic text-textWeak"] "no values in window" + else forM_ visible facetChoice_ + unless (null hidden) $ case overflow of + ExpandValues -> facetTail_ False hidden + FetchValues attrs -> div_ [class_ "facet-tail"] $ button_ ([type_ "button", class_ "facet-more text-textBrand text-xs px-1 py-0.5 cursor-pointer hover:underline"] <> attrs) $ toHtml moreLabel + + +facetTail_ :: Bool -> [FacetChoice] -> Html () +facetTail_ expanded choices = details_ ([class_ "facet-tail group/tail"] <> [open_ "" | expanded]) do + summary_ [class_ "list-none cursor-pointer text-textBrand text-xs px-1 py-0.5 hover:underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-strokeBrand-strong"] do + span_ [class_ "group-open/tail:hidden"] $ toHtml $ "+ More (" <> count <> ")" + span_ [class_ "hidden group-open/tail:inline"] $ toHtml $ "− Less (" <> count <> ")" + div_ [class_ "space-y-1"] $ mapM_ facetChoice_ choices + where + count = prettyPrintCount $ length choices + + +-- | Local inventories expand in place; Explorer fetches the tail lazily. +data FacetOverflow = ExpandValues | FetchValues [Attribute] + + +-- | The initial field and its lazy tail must use the same cutoff. +facetHeadCount :: Int +facetHeadCount = 5 + + +data FacetChoice = FacetChoice + { label :: Text + , multiSelect :: Bool + , inputAttrs :: [Attribute] + , marker :: Maybe (Html ()) + , count :: Maybe Text + } + + +facetChoice_ :: FacetChoice -> Html () +facetChoice_ choice = label_ [class_ "facet-item flex min-h-7 cursor-pointer items-center justify-between gap-2 rounded px-2 py-1 hover:bg-fillWeak max-md:min-h-9", data_ "component" "facet-option"] do + div_ [class_ "flex min-w-0 flex-1 items-center gap-2"] do + input_ $ [type_ $ bool "radio" "checkbox" choice.multiSelect, class_ $ bool "radio radio-xs max-md:radio-sm" "checkbox checkbox-xs max-md:checkbox-sm" choice.multiSelect] <> choice.inputAttrs + sequence_ choice.marker + span_ [class_ "facet-value truncate text-xs", term "data-tippy-content" choice.label] $ toHtml choice.label + forM_ choice.count $ \n -> span_ [class_ "facet-count shrink-0 text-xs tabular-nums text-textWeak"] $ toHtml n diff --git a/src/Pkg/Components/Table.hs b/src/Pkg/Components/Table.hs index b76bc4f1d..55f1ff97c 100644 --- a/src/Pkg/Components/Table.hs +++ b/src/Pkg/Components/Table.hs @@ -1,11 +1,16 @@ module Pkg.Components.Table ( Table (..), + inventoryTable, TableRows (..), TableResponse (..), Column (..), Config (..), Features (..), - defaultFeaturesAreInert, + SelectControl (..), + TableTabs (..), + selectControl_, + facetsConfig, + countedFilter, SearchMode (..), BulkAction (..), TabFilter (..), @@ -21,8 +26,6 @@ module Pkg.Components.Table ( TableHeaderActions (..), FilterMenu (..), FilterOption (..), - facetValues, - singleSelectFilter, multiSelectFilter, facetActions, -- Sorting types and utilities @@ -37,8 +40,10 @@ module Pkg.Components.Table ( ) where import Data.Default (Default (..)) +import Data.Foldable.WithIndex (iforM_) import Data.List (lookup) import Data.List.NonEmpty qualified as NE +import Data.Map.Strict qualified as Map import Data.Text qualified as T import Data.Text.Lazy qualified as TL import Data.Vector qualified as V @@ -48,9 +53,11 @@ import Lucid.Aria qualified as Aria import Lucid.Htmx import Lucid.Hyperscript (__) import Pages.BodyWrapper (PageCtx) -import Pages.Components (EmptyStateAction (..), EmptyStateCfg (..), detailsClosedBelowAttr_, emptyState_, facetOption_, facetRail_, facetSection_, filterInputAttr_, keyboardActivateAttr_, searchInput_) +import Pages.Components (EmptyStateAction (..), EmptyStateCfg (..), emptyState_, filterInputAttr_, keyboardActivateAttr_, searchInput_, timeRefreshListener_) +import Pkg.Components.Facets (FacetChoice (..), FacetContent (..), FacetNode (..), FacetOverflow (..), facetChoice_) +import Pkg.Components.Facets qualified as Facets import Relude -import Utils (TabStrip (..), deleteParam, faSprite_, navTabAttrs, navTabStrip_, popoverPanel_, popoverTrigger_, toUriStr) +import Utils (TabStrip (..), deleteParam, faSprite_, navTabAttrs, navTabStrip_, popoverPanel_, popoverTrigger_, prettyPrintCount, toUriStr) -- Core Types @@ -77,6 +84,18 @@ data Table a = Table } +inventoryTable :: Text -> Text -> Table a +inventoryTable name url = + Table + { config = def{elemID = name <> "Form", containerId = Just target, addPadding = True, renderAsTable = True} + , columns = [] + , rows = V.empty + , features = def{header = Just $ timeRefreshListener_ target url, search = Just ClientSide, searchPlaceholder = Just $ "Search " <> name, customizeColumns = True, exportName = Just name} + } + where + target = name <> "Container" + + -- TableRows for pagination - renders rows + pagination footer type role TableRows nominal data TableRows a = TableRows @@ -104,6 +123,11 @@ data Pagination = Pagination data SearchMode = ClientSide | ServerSide Text +-- | Features default to no optional behavior. +-- +-- >>> let html = renderText $ toHtml (Table def [] V.empty def :: Table ()) +-- >>> any @[] (`TL.isInfixOf` html) ["facet-rail", " Text) , rowId :: Maybe (a -> Text) @@ -121,42 +145,23 @@ data Features a = Features , zeroState :: Maybe ZeroState , header :: Maybe (Html ()) , treeConfig :: Maybe (TreeConfig a) - , showFilterRail :: Bool + , facets :: Maybe TableHeaderActions , resultSummary :: Maybe Text , exportName :: Maybe Text + , customizeColumns :: Bool + , grouping :: Maybe SelectControl + , tabs :: Maybe TableTabs } - -- Every field's default is the generic one (Nothing / [] / False). The - -- hand-written instance was 21 lines that had to be edited in lockstep with the - -- record; derived, a newly added field cannot be forgotten. The doctest on - -- 'defaultFeaturesAreInert' pins that the derived defaults match what the - -- hand-written instance produced — every table's behaviour depends on it. deriving stock (Generic) deriving anyclass (Default) -- $setup --- >>> :set -XTypeApplications +-- >>> :set -XTypeApplications -XOverloadedRecordDot -XOverloadedStrings -- >>> import Data.Default (def) - - --- | The derived 'Default' for 'Features' must stay inert: no row link, no bulk --- actions, no filter rail. This is what the hand-written instance guaranteed, and --- what every @def{...}@ table construction in the codebase assumes. --- --- >>> defaultFeaturesAreInert --- True -defaultFeaturesAreInert :: Bool -defaultFeaturesAreInert = - and - [ isNothing d.rowLink - , isNothing d.search - , isNothing d.pagination - , isNothing d.rowGroup - , null d.bulkActions - , not d.showFilterRail - ] - where - d = def @(Features ()) +-- >>> import Data.Vector qualified as V +-- >>> import Data.Text.Lazy qualified as TL +-- >>> import Lucid (renderText, toHtml) data Config = Config @@ -183,6 +188,22 @@ data Config = Config } +data SelectControl = SelectControl + { name :: Text + , label :: Text + , current :: Text + , options :: [(Text, Text)] -- (value, label) + , baseUrl :: Text + , targetId :: Text + } + + +data TableTabs = TableTabs + { label :: Text + , options :: [(Text, Text, Bool)] -- (label, url, active) + } + + -- Supporting Types -- | A toolbar action over the checked rows. With @choices@ it opens a menu and each @@ -280,38 +301,30 @@ data FilterOption = FilterOption { label :: Text , value :: Text , isActive :: Bool + , count :: Maybe Int } deriving stock (Eq, Show) --- | Sorted distinct values from the unfiltered result, so choosing one facet does --- not empty the menus of the others. --- --- >>> facetValues snd (V.fromList [("a", Just "b"), ("c", Just "a"), ("d", Nothing)]) --- ["a","b"] -facetValues :: (a -> Maybe Text) -> V.Vector a -> [Text] -facetValues getter = sortNub . filter (not . T.null) . mapMaybe getter . V.toList - - --- | A facet menu over @values@, marking those in @selected@ active. Single-select is the --- same menu with at most one selection, so both go through here rather than each call site --- assembling 'FilterMenu'/'FilterOption' by hand. -filterMenu :: Bool -> Text -> Text -> [Text] -> [Text] -> FilterMenu -filterMenu multiSelect label paramName selected values = +multiSelectFilter :: Text -> Text -> [Text] -> [Text] -> FilterMenu +multiSelectFilter label paramName selected values = FilterMenu { label , paramName - , options = [FilterOption value value (value `elem` selected) | value <- values] - , multiSelect + , options = [FilterOption value value (value `elem` selected) Nothing | value <- values] + , multiSelect = True } -singleSelectFilter :: Text -> Text -> Maybe Text -> [Text] -> FilterMenu -singleSelectFilter label paramName selected = filterMenu False label paramName (maybeToList selected) - - -multiSelectFilter :: Text -> Text -> [Text] -> [Text] -> FilterMenu -multiSelectFilter = filterMenu True +-- | Count each inventory row once per value, before applying any filters. +-- +-- >>> map (\o -> (o.value, o.count)) (countedFilter "Runtime" "runtime" Nothing id (V.fromList [["a", "a"], ["a", "b"], [""]])).options +-- [("a",Just 2),("b",Just 1)] +countedFilter :: Text -> Text -> Maybe Text -> (a -> [Text]) -> V.Vector a -> FilterMenu +countedFilter label paramName selected valuesOf rows = FilterMenu label paramName options False + where + counts = Map.fromListWith (+) [(value, 1) | row <- V.toList rows, value <- ordNub (valuesOf row), not (T.null value)] + options = [FilterOption value value (Just value == selected) (Just count) | (value, count) <- Map.toAscList counts] -- | Header actions for a filter-only inventory table. The active-filter chips are read back @@ -465,7 +478,8 @@ renderTable tbl = let isEmpty = V.null tbl.rows && isJust tbl.features.zeroState tableMain = do sequence_ tbl.features.header - when (isJust tbl.features.resultSummary || isJust tbl.features.exportName) $ renderResultToolbar tbl + forM_ tbl.features.tabs $ \tabs -> navTabStrip_ ViewTabs tabs.label "tabs-sm mx-3 w-fit" [(toHtml label, url, active) | (label, url, active) <- tabs.options] + when (isJust tbl.features.resultSummary || isJust tbl.features.exportName || tbl.features.customizeColumns || isJust tbl.features.grouping || isJust tbl.features.facets) $ renderResultToolbar tbl -- Scrolls horizontally rather than clipping. `overflow-hidden` silently cut off whatever -- did not fit: Containers, Kubernetes and Images each need 1460-1820px and get ~1250 -- with the facet rail open, so 200-570px of columns were unreachable — no scrollbar, no @@ -485,13 +499,13 @@ renderTable tbl = whenJust tbl.features.search \_ -> span_ [id_ "searchIndicator", class_ "htmx-indicator loading loading-sm loading-dots mx-auto"] "" div_ [id_ "rowsContainer", class_ divCls] do renderRows tbl - tableContent = div_ [class_ $ tbl.config.containerClasses <> bool " pb-24" "" isEmpty, id_ $ tbl.config.elemID <> "_page"] do + tableContent = div_ ([class_ $ tbl.config.containerClasses <> bool " pb-24" "" isEmpty, id_ $ tbl.config.elemID <> "_page"] <> [data_ "table-columns" tbl.config.elemID | tbl.features.customizeColumns]) do unless isEmpty $ whenJust tbl.features.search $ renderSearch tbl.config.elemID (fromMaybe "Search" tbl.features.searchPlaceholder) - if tbl.features.showFilterRail - then div_ [class_ "flex items-start gap-4 max-lg:flex-col"] do - whenJust tbl.features.tableHeaderActions renderFilterRail - div_ [class_ "min-w-0 flex-1 space-y-3"] tableMain - else tableMain + case tbl.features.facets of + Just facets -> div_ [class_ "flex items-start gap-4 max-lg:flex-col"] do + Facets.sidebar_ $ facetsConfig facets + div_ [class_ "min-w-0 w-full flex-1 space-y-3"] tableMain + Nothing -> tableMain -- Pagination footer outside the raised surface whenJust tbl.features.pagination renderPaginationFooter when (isJust tbl.features.treeConfig) treeScript @@ -527,7 +541,7 @@ renderRows tbl thAttrs = [class_ $ " " <> tbl.config.thClasses <> " " <> fromMaybe "" c.align <> bool "" " cursor-pointer hover:bg-fillWeak" (isJust sortable)] sortAttrs = foldMap (\(field, cfg) -> swapTarget_ cfg.targetId (toggleSortUrl cfg field)) sortable sortOrder = sortable >>= \(field, cfg) -> lookup cfg.currentSort [("-" <> field, Desc), ("+" <> field, Asc)] - th_ (c.attrs <> thAttrs <> sortAttrs <> [data_ "column-index" $ show idx]) do + th_ (c.attrs <> thAttrs <> sortAttrs <> [data_ "column-key" c.name]) do span_ [class_ $ "flex items-center gap-2 min-w-0" <> bool "" " flex-wrap" (tbl.config.bulkActionsInHeader == Just idx)] do span_ [class_ $ bool "max-md:hidden" "" (idx > 0)] $ toHtml c.name sequence_ c.headerExtra @@ -550,24 +564,32 @@ renderRows tbl -- so htmx-swapped pages stay markup-identical to page 1. renderBody :: [Attribute] -> Table a -> Html () renderBody extra tbl - | tbl.config.renderAsTable = tbody_ (extra <> [class_ "stagger-fade"]) $ maybe (V.mapM_ (renderTableRow tbl) tbl.rows) groupedRows tbl.features.rowGroup - | otherwise = div_ [class_ "stagger-fade"] $ V.mapM_ (renderListRow tbl) tbl.rows + | not tbl.config.renderAsTable = div_ [class_ "stagger-fade"] $ V.mapM_ (renderListRow tbl) tbl.rows + | Just groupOf <- tbl.features.rowGroup = + if isJust tbl.features.grouping then groupedRows groupOf else body $ groupedRows groupOf + | otherwise = body $ V.mapM_ (renderTableRow tbl) tbl.rows where - groupedRows groupOf = - forM_ (sortWith (fst . head) $ NE.groupAllWith (\(idx, row) -> maybeToRight idx $ groupOf row) $ zip [0 :: Int ..] (V.toList tbl.rows)) \((_, row) :| siblings) -> - case (groupOf row, siblings) of - (Just label, _ : _) -> tr_ [class_ "not-has-[.itemsListItem:not(.hidden)]:hidden"] - $ td_ [colspan_ $ show $ length tbl.columns + bool 0 1 (isJust tbl.features.rowId)] - $ details_ [class_ "group/disclosure", [__|on input from closest <[id$='_page']/> if event.target.type is "search" set my.open to true end|]] do - summary_ [class_ "cursor-pointer px-4 py-3 text-sm font-medium text-textStrong focus-visible:outline-offset-[-2px]"] do - toHtml label - span_ [class_ "ms-2 text-xs font-normal text-textWeak tabular-nums"] $ toHtml $ show (1 + length siblings) <> " items on this page" - table_ [class_ tbl.config.tableClasses] do - thead_ [class_ "sr-only"] $ tr_ do - when (isJust tbl.features.rowId) $ th_ [scope_ "col"] "Select issue" - forM_ tbl.columns $ \c -> th_ [scope_ "col"] $ toHtml c.name - tbody_ $ mapM_ (renderTableRow tbl) (row : map snd siblings) - _ -> renderTableRow tbl row + body = tbody_ (extra <> [class_ "stagger-fade"]) + columnCount = length tbl.columns + bool 0 1 (isJust tbl.features.rowId) + groups groupOf = sortWith (fst . head) $ NE.groupAllWith (\(idx, row) -> maybeToRight idx $ groupOf row) $ zip [0 :: Int ..] (V.toList tbl.rows) + groupedRows groupOf = iforM_ (groups groupOf) $ \idx ((_, row) :| siblings) -> + let renderedRows = mapM_ (renderTableRow tbl) (row : map snd siblings) + groupLabel label suffix = toHtml label >> span_ [class_ "ms-2 text-xs font-normal text-textWeak tabular-nums"] (toHtml $ show (1 + length siblings) <> suffix) + in if isJust tbl.features.grouping + then tbody_ ([class_ "stagger-fade not-has-[.itemsListItem:not(.hidden)]:hidden"] <> if idx == 0 then extra else []) do + forM_ (groupOf row) $ \label -> tr_ [data_ "table-group" label] $ td_ [colspan_ $ show columnCount, class_ "px-4 py-3 text-sm font-medium text-textStrong"] $ groupLabel label " items" + renderedRows + else case (groupOf row, siblings) of + (Just label, _ : _) -> tr_ [class_ "not-has-[.itemsListItem:not(.hidden)]:hidden"] + $ td_ [colspan_ $ show columnCount] + $ details_ [class_ "group/disclosure", [__|on input from closest <[id$='_page']/> if event.target.type is "search" set my.open to true end|]] do + summary_ [class_ "cursor-pointer px-4 py-3 text-sm font-medium text-textStrong focus-visible:outline-offset-[-2px]"] $ groupLabel label " items on this page" + table_ [class_ tbl.config.tableClasses] do + thead_ [class_ "sr-only"] $ tr_ do + when (isJust tbl.features.rowId) $ th_ [scope_ "col"] "Select issue" + forM_ tbl.columns $ \c -> th_ [scope_ "col", data_ "column-key" c.name] $ toHtml c.name + tbody_ renderedRows + _ -> renderedRows treeRowAttrs :: a -> TreeConfig a -> [Attribute] @@ -608,7 +630,7 @@ renderTableRow tbl row = $ input_ $ [term "aria-label" $ "Select " <> maybe "Item" ($ row) tbl.features.rowLabel, class_ "bulkactionItemCheckbox checkbox checkbox-md checked:checkbox-primary", type_ "checkbox", name_ "itemId", value_ $ getId row] <> [checked_ | maybe False ($ row) tbl.features.selectRow] - forM_ (zip [0 :: Int ..] tbl.columns) \(idx, c) -> td_ (c.attrs <> (class_ <$> maybeToList c.align) <> [data_ "column-index" $ show idx]) $ c.render row + forM_ tbl.columns $ \c -> td_ (c.attrs <> (class_ <$> maybeToList c.align) <> [data_ "column-key" c.name]) $ c.render row where rowAttrs = maybe [] ($ row) tbl.features.rowAttrs treeAttrs = maybe [] (treeRowAttrs row) tbl.features.treeConfig @@ -638,32 +660,38 @@ renderHeaderTableActions :: TableHeaderActions -> Html () renderHeaderTableActions actions = span_ [class_ "inline-flex flex-wrap items-center gap-2 ml-2"] do unless (null actions.sortOptions) $ renderSortDropdown actions unless (null actions.filterMenus) $ renderFilterDropdown actions - -- Each active filter as a removable chip, Sentry-search style: "Type: runtime_exception ×". - forM_ actions.filterMenus \menu -> forM_ (filter (.isActive) menu.options) \opt -> - button_ ([type_ "button", class_ "inline-flex items-center gap-1 rounded-md border border-strokeWeak bg-fillWeak px-2 py-0.5 text-xs text-textStrong hover:bg-fillWeaker max-md:whitespace-normal", Aria.label_ $ "Remove filter " <> menu.label <> ": " <> opt.label] <> swapTarget_ actions.targetId (deleteParamValue menu.paramName opt.value actions.baseUrl)) do - span_ [class_ "text-textWeak"] $ toHtml $ menu.label <> ":" - toHtml opt.label - faSprite_ "xmark" "regular" "w-2.5 h-2.5 text-textWeak" + renderFilterChips actions + + +renderFilterChips :: TableHeaderActions -> Html () +renderFilterChips actions = forM_ actions.filterMenus \menu -> forM_ (filter (.isActive) menu.options) \opt -> + button_ ([type_ "button", class_ "inline-flex items-center gap-1 rounded-md border border-strokeWeak bg-fillWeak px-2 py-0.5 text-xs text-textStrong hover:bg-fillWeaker max-md:whitespace-normal", Aria.label_ $ "Remove filter " <> menu.label <> ": " <> opt.label] <> swapTarget_ actions.targetId (deleteParamValue menu.paramName opt.value actions.baseUrl)) do + span_ [class_ "text-textWeak"] $ toHtml $ menu.label <> ":" + toHtml opt.label + faSprite_ "xmark" "regular" "w-2.5 h-2.5 text-textWeak" clearFiltersUrl :: TableHeaderActions -> Text clearFiltersUrl actions = foldl' (\url menu -> deleteParam menu.paramName url) actions.baseUrl actions.filterMenus -renderFilterRail :: TableHeaderActions -> Html () -renderFilterRail actions = - details_ [open_ "", class_ "w-60 shrink-0 max-lg:w-full", detailsClosedBelowAttr_ 1024] do - summary_ [class_ "flex cursor-pointer list-none items-center gap-2 rounded px-2 py-2 text-xs font-semibold text-textStrong hover:bg-fillWeak [&::-webkit-details-marker]:hidden"] "Filters" - facetRail_ Nothing "p-2" "Search filters" (Just clearAll) $ forM_ (zip [0 :: Int ..] actions.filterMenus) \(index, menu) -> - facetSection_ (index == 0 || any (.isActive) menu.options) "" [] (toHtml menu.label) - $ div_ [class_ "max-h-48 overflow-y-auto"] - $ forM_ menu.options (renderFilterOption actions menu) +-- | Adapt URL filters to the same sidebar data Explorer supplies. +facetsConfig :: TableHeaderActions -> Facets.Config +facetsConfig actions = Facets.Config (actions.targetId <> "-facets") "" (Just $ swapTarget_ actions.targetId $ clearFiltersUrl actions) (Just [common]) Facets.Collapsible where - clearAll = - button_ - ([type_ "button", class_ "flex items-center justify-between rounded px-2 py-1.5 text-xs text-textBrand hover:bg-fillWeak"] <> swapTarget_ actions.targetId (clearFiltersUrl actions)) - $ "Clear all" - >> faSprite_ "xmark" "regular" "h-3 w-3" + common = + FacetNode "Common Filters" Nothing True [] Nothing + $ FacetChildren + [ FacetNode + { label = menu.label + , path = Just menu.paramName + , expanded = (index < 5 && not (null menu.options)) || any (.isActive) menu.options + , attrs = [] + , actions = Nothing + , content = FacetValues (map (filterChoice actions menu) $ sortOn (not . (.isActive)) menu.options) ExpandValues + } + | (index, menu) <- zip [0 :: Int ..] actions.filterMenus + ] renderSortDropdown :: TableHeaderActions -> Html () @@ -706,29 +734,26 @@ renderFilterMenuItem actions menu = div_ [class_ "relative"] do ] do div_ [class_ "px-3 py-2 text-sm font-semibold text-textStrong border-b border-strokeWeak"] $ toHtml menu.label - div_ [class_ "p-1"] $ forM_ menu.options (renderFilterOption actions menu) + div_ [class_ "p-1"] $ forM_ menu.options (facetChoice_ . filterChoice actions menu) -renderFilterOption :: TableHeaderActions -> FilterMenu -> FilterOption -> Html () -renderFilterOption actions menu opt = facetOption_ "" [] optionBody pass +filterChoice :: TableHeaderActions -> FilterMenu -> FilterOption -> FacetChoice +filterChoice actions menu opt = FacetChoice{label = opt.label, multiSelect = menu.multiSelect, inputAttrs, marker = Nothing, count = prettyPrintCount <$> opt.count} where paramVal = menu.paramName <> "=" <> toUriStr opt.value -- For multi-select: toggle this value; for single-select: replace all with this value url - | menu.multiSelect && opt.isActive = deleteParamValue menu.paramName opt.value actions.baseUrl + | opt.isActive = deleteParamValue menu.paramName opt.value actions.baseUrl | menu.multiSelect = withQuery actions.baseUrl paramVal | otherwise = withQuery (deleteParam menu.paramName actions.baseUrl) paramVal - optionBody = do - input_ - $ [ type_ $ bool "radio" "checkbox" menu.multiSelect - , class_ $ bool "radio radio-xs" "checkbox checkbox-xs" menu.multiSelect - , value_ opt.value - , name_ $ "filter_" <> menu.paramName -- group radios by param name - , hxTrigger_ "change" - ] + inputAttrs = + [ Aria.label_ opt.label + , value_ opt.value + , name_ $ actions.targetId <> "_filter_" <> menu.paramName + , hxTrigger_ "change" + ] <> swapTarget_ actions.targetId url <> [checked_ | opt.isActive] - span_ [class_ "truncate text-sm"] $ toHtml opt.label -- | Remove a specific param=value pair from a URL (for multi-select filter toggle) @@ -772,23 +797,64 @@ renderSortMenu sortCfg = do renderResultToolbar :: Table a -> Html () renderResultToolbar tbl = div_ [class_ "flex min-h-9 flex-wrap items-center justify-between gap-2"] do whenJust tbl.features.resultSummary $ \summary -> span_ [class_ "text-sm text-textWeak", role_ "status", Aria.live_ "polite"] $ toHtml summary - whenJust tbl.features.exportName $ \name -> div_ [class_ "flex items-center gap-2"] do - button_ - [ type_ "button" - , class_ "btn btn-xs border border-strokeWeak bg-transparent font-normal text-textWeak shadow-none" - , onclick_ $ "window.exportTableCsv('#" <> tbl.config.elemID <> "_grid table','" <> name <> ".csv')" - ] - do - faSprite_ "download" "solid" "h-3 w-3" - "Export" - button_ ([type_ "button", class_ "btn btn-xs border border-strokeWeak bg-transparent font-normal text-textWeak shadow-none"] <> popoverTrigger_ (tbl.config.elemID <> "-columns")) do - faSprite_ "table-columns" "regular" "h-3 w-3" - "Customize" - div_ (popoverPanel_ (tbl.config.elemID <> "-columns") <> [class_ "dropdown dropdown-end z-50 mt-1 w-56 rounded-md border border-strokeWeak bg-bgRaised p-2 text-sm shadow-lg"]) do - span_ [class_ "block px-2 pb-1 text-xs font-semibold text-textStrong"] "Visible columns" - forM_ (zip [0 :: Int ..] tbl.columns) \(idx, column) -> label_ [class_ "flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 hover:bg-fillWeak"] do - input_ [type_ "checkbox", checked_, class_ "checkbox checkbox-xs", onchange_ $ "document.querySelectorAll('#" <> tbl.config.elemID <> "_grid [data-column-index=\"" <> show idx <> "\"]').forEach((element)=>element.classList.toggle('hidden',!this.checked))"] - toHtml column.name + forM_ tbl.features.facets $ \facets -> div_ [class_ "flex flex-wrap gap-2"] $ renderFilterChips facets + div_ [class_ "ml-auto flex flex-wrap items-center gap-2"] do + forM_ tbl.features.grouping selectControl_ + forM_ tbl.features.exportName $ \name -> + button_ + [ type_ "button" + , class_ "btn btn-xs border border-strokeWeak bg-transparent font-normal text-textWeak shadow-none" + , onclick_ $ "window.exportTableCsv('#" <> tbl.config.elemID <> "_grid table','" <> name <> ".csv')" + ] + $ faSprite_ "download" "solid" "h-3 w-3" + >> "Export" + when tbl.features.customizeColumns do + button_ ([type_ "button", class_ "btn btn-xs border border-strokeWeak bg-transparent font-normal text-textWeak shadow-none"] <> popoverTrigger_ (tbl.config.elemID <> "-columns")) do + faSprite_ "table-columns" "regular" "h-3 w-3" + "Customize" + -- CSS owns visibility; the checkbox only restores a stored choice. @data-forced@ marks a + -- user choice, so ticking a column that a breakpoint hides shows it. + style_ $ flip foldMap tbl.columns \c -> + let rule toggle display = "#" <> tbl.config.elemID <> "_page:has([data-column-toggle=\"" <> c.name <> "\"]" <> toggle <> ") [data-column-key=\"" <> c.name <> "\"]{display:" <> display <> "}" + in rule "[data-forced]:not(:checked)" "none" <> rule "[data-forced]:checked" "table-cell" + div_ + ( popoverPanel_ (tbl.config.elemID <> "-columns") + <> [ class_ "dropdown dropdown-end z-50 mt-1 w-56 rounded-md border border-strokeWeak bg-bgRaised p-2 text-sm shadow-lg" + , [__|on beforetoggle if event.newState is 'open' send syncColumn to <[data-column-toggle]/> in me end + on resize from window if me.matches(':popover-open') send syncColumn to <[data-column-toggle]/> in me end|] + ] + ) + do + span_ [class_ "block px-2 pb-1 text-xs font-semibold text-textStrong"] "Visible columns" + forM_ tbl.columns $ \column -> label_ [class_ "flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 hover:bg-fillWeak"] do + input_ + [ type_ "checkbox" + , checked_ + , class_ "checkbox checkbox-xs" + , data_ "column-toggle" column.name + , data_ "column-storage" $ "table-columns:" <> tbl.config.elemID <> ":" <> column.name + , [__|init set saved to localStorage.getItem(@data-column-storage) if saved is not null set @data-forced to 'true' then set my.checked to saved is 'true' end + on syncColumn if not @data-forced + set cell to (closest <[data-table-columns]/>).querySelector('[data-column-key="' + @data-column-toggle + '"]') + if cell set my.checked to getComputedStyle(cell).display is not 'none' end + end + on change set @data-forced to 'true' then call localStorage.setItem(@data-column-storage, my.checked)|] + ] + toHtml column.name + button_ + [ type_ "button" + , class_ "btn btn-xs btn-ghost mt-1 w-full font-normal" + , [__|on click repeat for t in <[data-column-toggle]/> in closest <[data-table-columns]/> call localStorage.removeItem(t.getAttribute('data-column-storage')) then remove @data-forced from t then send syncColumn to t end|] + ] + "Reset columns" + + +selectControl_ :: SelectControl -> Html () +selectControl_ cfg = label_ [class_ "flex items-center gap-2 whitespace-nowrap text-xs text-textWeak"] do + toHtml cfg.label + select_ ([name_ cfg.name, class_ "select select-xs w-auto cursor-pointer border-strokeWeak bg-bgBase max-md:min-h-11 max-md:text-base", hxTrigger_ "change"] <> swapTarget_ cfg.targetId (deleteParam "deferred" $ deleteParam cfg.name cfg.baseUrl)) + $ forM_ cfg.options + $ \(value, label) -> option_ ([value_ value] <> [selected_ "" | value == cfg.current]) $ toHtml label renderPaginationFooter :: Pagination -> Html () diff --git a/src/Pkg/Components/TimePicker.hs b/src/Pkg/Components/TimePicker.hs index ef4c27653..bcf875aae 100644 --- a/src/Pkg/Components/TimePicker.hs +++ b/src/Pkg/Components/TimePicker.hs @@ -3,7 +3,6 @@ module Pkg.Components.TimePicker ( parseTimeRange, LiveDataMode (..), liveDataControls_, - timeHiddenInputs_, TimePicker (..), rangePairs, rangeJson, @@ -489,11 +488,6 @@ windowUrl :: Text -> [(Text, Text)] -> TimeWindow -> Text windowUrl base extras window = timeScopedUrl base extras window.fromQuery window.toQuery window.sinceQuery -timeHiddenInputs_ :: Maybe Text -> Maybe Text -> Maybe Text -> Html () -timeHiddenInputs_ fromM toM sinceM = forM_ ([("from", fromM), ("to", toM), ("since", sinceM)] :: [(Text, Maybe Text)]) \(name, valueM) -> - input_ [type_ "hidden", name_ name, value_ $ fromMaybe "" valueM, term "_" "on 'update-query' from window set my.value to window.params()[my.name] or ''"] - - refreshOptions :: [(Text, Text, Text)] refreshOptions = [ ("Off", "Turn off automatic refresh", "0") diff --git a/test/integration/Pages/ContainersSpec.hs b/test/integration/Pages/ContainersSpec.hs index c43ca7b91..cc68f0e01 100644 --- a/test/integration/Pages/ContainersSpec.hs +++ b/test/integration/Pages/ContainersSpec.hs @@ -7,7 +7,6 @@ import Data.Cache qualified as Cache import Data.Effectful.Hasql qualified as Hasql import Data.List (lookup) import Data.Text qualified as T -import Data.Text.Lazy qualified as LT import Data.Time (NominalDiffTime, addUTCTime) import Data.Vector qualified as V import Lucid qualified @@ -16,7 +15,7 @@ import Pages.BodyWrapper (BWConfig (..), PageCtx (..)) import Pages.Charts.Charts qualified as Charts import Pages.Containers qualified as Containers import Pages.Infrastructure qualified as Infrastructure -import Pkg.Components.Table (Table (..)) +import Pkg.Components.Table (Features (customizeColumns, exportName, resultSummary), Table (..)) import Pkg.Components.Widget qualified as Widget import Pkg.Icons qualified as Icons import Pkg.TestUtils @@ -99,59 +98,19 @@ ingestFixture tr key = do k8sOther = k8sResource "kube-system" "coredns-c6d9fc49c-bj5sw" "coredns" k8sStateful = mkAttr "k8s.statefulset.name" "postgres" : k8sPodResource "data" "postgres-0" "postgres" - -- 0.5 cores against a 2-core limit and 512 MiB against 1 GiB: both percentages land on - -- round numbers so a unit slip anywhere in the pipeline is obvious rather than plausible. + -- Mixed receiver families, absent limits, controller fallback, pod-only telemetry, + -- and a pod rollup that must lose to its reporting containers. forM_ - ( [ ("container.cpu.usage", 0.5) - , ("container.memory.working_set", 536870912) - , ("k8s.container.cpu_limit", 2) - , ("k8s.container.cpu_request", 1) - , ("k8s.container.memory_limit", 1073741824) - , ("k8s.container.memory_request", 268435456) - , ("k8s.container.restarts", 3) - , ("k8s.container.ready", 1) + ( [ (k8sChecked, [("container.cpu.usage", 0.5), ("container.memory.working_set", 536870912), ("k8s.container.cpu_limit", 2), ("k8s.container.cpu_request", 1), ("k8s.container.memory_limit", 1073741824), ("k8s.container.memory_request", 268435456), ("k8s.container.restarts", 3), ("k8s.container.ready", 1)]) + , (k8sOther, [("container.cpu.usage", 0.25), ("container.memory.working_set", 33554432), ("k8s.container.ready", 0)]) + , (dockerResource "srv-captain--redpanda-0.1.tt13bkp5", [("container.cpu.utilization", 80), ("container.memory.usage.total", 3221225472), ("container.memory.usage.limit", 4294967296)]) + , (k8sStateful, [("container.cpu.usage", 0.1), ("container.memory.usage", 16777216)]) + , (mkAttr "k8s.deployment.name" "frontend" : k8sPodResource "shop" "frontend-544d9b6f4-2xk7z" "frontend", [("k8s.pod.cpu.usage", 0.75), ("k8s.pod.memory.working_set", 268435456)]) + , (k8sChecked, [("k8s.pod.cpu.usage", 9.9), ("k8s.pod.memory.working_set", 9999999)]) ] - :: [(Text, Double)] + :: [([PC.KeyValue], [(Text, Double)])] ) - (emit k8sChecked) - - -- A second namespace, and deliberately no CPU limit — the case Datadog documents as - -- "cannot infer the usage percentage", which must stay blank rather than become 0%. - forM_ - ( [ ("container.cpu.usage", 0.25) - , ("container.memory.working_set", 33554432) - , ("k8s.container.ready", 0) - ] - :: [(Text, Double)] - ) - (emit k8sOther) - - -- Docker: 80 means 0.8 cores under Docker's own formula, and the memory limit arrives on a - -- different metric name from the Kubernetes one. - forM_ - ( [ ("container.cpu.utilization", 80) - , ("container.memory.usage.total", 3221225472) - , ("container.memory.usage.limit", 4294967296) - ] - :: [(Text, Double)] - ) - (emit $ dockerResource "srv-captain--redpanda-0.1.tt13bkp5") - - -- A StatefulSet pod, and memory on kubeletstats' container.memory.usage rather than - -- working_set: neither the workload nor the memory reading survives without a fallback. - forM_ ([("container.cpu.usage", 0.1), ("container.memory.usage", 16777216)] :: [(Text, Double)]) (emit k8sStateful) - - -- A pod whose collector runs kubeletstats without the container metric group: only - -- k8s.pod.* arrives, so the pod itself has to stand in for its containers. - forM_ - ([("k8s.pod.cpu.usage", 0.75), ("k8s.pod.memory.working_set", 268435456)] :: [(Text, Double)]) - (emit $ mkAttr "k8s.deployment.name" "frontend" : k8sPodResource "shop" "frontend-544d9b6f4-2xk7z" "frontend") - - -- The same pod metrics for a pod that DOES report container metrics: the rollup must lose - -- to its containers rather than appear beside them. - forM_ - ([("k8s.pod.cpu.usage", 9.9), ("k8s.pod.memory.working_set", 9999999)] :: [(Text, Double)]) - (emit k8sChecked) + \(resource, metrics) -> mapM_ (emit resource) metrics -- A bare node. Four logical cores, each reporting idle and user; 0.25 busy on each of two -- of them is 0.5 cores of a 4-core box. Memory is per state and the limit is their sum. @@ -208,11 +167,11 @@ spec = sequential $ aroundAll withTfChartResources do conf.pageTitle `shouldBe` "Infrastructure" conf.prePageTitle `shouldBe` Nothing V.length table.rows `shouldBe` 0 - let html = LT.toStrict $ Lucid.renderText $ Lucid.toHtml page + let html = toText $ Lucid.renderText $ Lucid.toHtml page html `shouldContainAll` ["No containers reporting"] (_, hostMap) <- testServant tr $ Infrastructure.hostMapGetH testPid Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing (Just "1") - LT.toStrict (Lucid.renderText $ Lucid.toHtml hostMap) + toText (Lucid.renderText $ Lucid.toHtml hostMap) `shouldContainAll` ["No hosts reporting", "Set up host monitoring"] it "kubernetesAndDockerContainers_landInOneListWithNormalisedCpuAndMemory" \tr -> do @@ -315,17 +274,17 @@ spec = sequential $ aroundAll withTfChartResources do let Containers.ContainersPage (PageCtx _ body) = page table <- deferredBody body V.length table.rows `shouldBe` 8 - let html = LT.toStrict $ Lucid.renderText $ Lucid.toHtml page + let html = toText $ Lucid.renderText $ Lucid.toHtml page cacheKey = (testPid, Nothing, Nothing, Just "5M") :: ContainerSnapshotKey cached <- Cache.lookup tr.trATCtx.infrastructureCache cacheKey :: IO (Maybe (V.Vector ContainerRow)) V.length <$> cached `shouldBe` Just 8 -- Both runtimes in one table, with the facet menus the filter dropdown is built from. - html `shouldContainAll` ["checkout", "srv-captain--redpanda-0.1.tt13bkp5", "kube-system", "namespace=", "runtime=", "cluster=", "otel-demo", "vps-bare-01", "Search containers", "CPU limit used", "Memory limit used", "data-live-mode=\"refresh-only\"", "data-component=\"facet-rail\"", "data-component=\"facet-section\"", "data-component=\"facet-option\"", "Last 5 mins", "bg-bgAlternate sticky", "bg-fillWarning-strong", "hidden max-md:inline-flex", "data-header-actions", "/infrastructure/containers/detail?since=5M"] + html `shouldContainAll` ["checkout", "srv-captain--redpanda-0.1.tt13bkp5", "kube-system", "namespace=", "runtime=", "cluster=", "otel-demo", "vps-bare-01", "Search containers", "CPU limit used", "Memory limit used", "data-live-mode=\"refresh-only\"", "data-component=\"facet-rail\"", "data-component=\"facet-section\"", "data-component=\"facet-option\"", "Common Filters", "facet-count", "Last 5 mins", "bg-bgAlternate sticky", "bg-fillWarning-strong", "hidden max-md:inline-flex", "data-header-actions", "/infrastructure/containers/detail?since=5M"] T.isInfixOf "group/summary" html `shouldBe` False T.isInfixOf "Usage over time" html `shouldBe` False T.isInfixOf "min-height:" html `shouldBe` False T.isInfixOf "data-widget=" html `shouldBe` False - T.count "data-component=\"facet-section\" open>" html `shouldBe` 1 + T.count "data-component=\"facet-section\" open>" html `shouldBe` 6 -- The screenshot regression: "Not ready" wrapped onto two lines in the narrow status -- column, crossing the badge border. The label is one indivisible status. html `shouldContainAll` ["Not ready", "class=\"badge badge-sm badge-error whitespace-nowrap\""] @@ -333,6 +292,30 @@ spec = sequential $ aroundAll withTfChartResources do -- as a clipped stroke. The table export uses the correctly framed Font Awesome symbol. html `shouldContainAll` ["M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32"] + html + `shouldContainAll` [ "w-80 max-w-80 overflow-hidden" + , "w-72 max-w-72 overflow-hidden" + , "min-w-0 flex-1 truncate" + , "max-w-36 truncate" + , "data-tip=\"Runtime: kubernetes\"" + , "data-tippy-content=\"Container: checkout\"" + , "data-tippy-content=\"Image: demo:2.2.0\"" + , "data-tippy-content=\"Workload: checkout\"" + , "data-tippy-content=\"CPU limit used: " + , "data-tippy-content=\"Memory limit used: " + , "data-tippy-content=\"Latest reported readiness: Ready\"" + , "Latest cumulative restart count reported within the selected time range. This is not the number of restarts during the range." + ] + + let render features = toText $ Lucid.renderText $ Lucid.toHtml table{features} + customizeOnly = render table.features{resultSummary = Nothing, exportName = Nothing, customizeColumns = True} + exportOnly = render table.features{resultSummary = Nothing, exportName = Just "containers", customizeColumns = False} + render table.features `shouldContainAll` ["type=\"radio\"", "id=\"containersContainer-facets\"", "name=\"containersContainer_filter_namespace\""] + customizeOnly `shouldContainAll` ["Customize", "Reset columns", "data-column-key=", "data-column-toggle=", "[data-forced]:not(:checked)) [data-column-key=\"Pod\"]{display:none}"] + customizeOnly `shouldNotSatisfy` T.isInfixOf ">Export" + exportOnly `shouldContainAll` ["Export", "containers.csv"] + exportOnly `shouldNotSatisfy` T.isInfixOf "Customize" + -- Each facet narrows independently, and an unknown value yields an empty list rather -- than silently falling back to "all". let listWith f = do @@ -352,31 +335,18 @@ spec = sequential $ aroundAll withTfChartResources do -- A bare node is its own runtime, so it is reachable and does not pollute the others. listWith (containersPage noContainerFilters{runtime = Just "host"}) >>= (`shouldMatchList` ["vps-bare-01", "vps-d6d7e318"]) - -- Keep both identity columns readable when image and workload names are long. - it "longContainerMetadata_doesNotOverlapPodColumn" \tr -> do - (_, page) <- testServant tr $ containersPage noContainerFilters - let html = LT.toStrict $ Lucid.renderText $ Lucid.toHtml page - html - `shouldContainAll` [ "w-80 max-w-80 overflow-hidden" - , "w-72 max-w-72 overflow-hidden" - , "min-w-0 flex-1 truncate" - , "max-w-36 truncate" - , "data-tip=\"Runtime: kubernetes\"" - , "data-tippy-content=\"Container: checkout\"" - , "data-tippy-content=\"Image: demo:2.2.0\"" - , "data-tippy-content=\"Workload: checkout\"" - , "data-tippy-content=\"CPU limit used: " - , "data-tippy-content=\"Memory limit used: " - , "data-tippy-content=\"Latest reported readiness: Ready\"" - , "Latest cumulative restart count reported within the selected time range. This is not the number of restarts during the range." - ] - it "infrastructureViews_projectTheSameTelemetryIntoHostsImagesKubernetesAndMap" \tr -> do - (_, hosts@(Infrastructure.HostsPage (PageCtx hostsBW _))) <- testServant tr $ Infrastructure.hostsGetH testPid Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing (Just "1") + (_, hosts@(Infrastructure.HostsPage (PageCtx hostsBW body))) <- testServant tr $ Infrastructure.hostsGetH testPid Nothing Nothing Nothing Nothing (Just "integration") Nothing Nothing Nothing (Just "1") V.null hostsBW.serviceOptions `shouldBe` True hostsBW.pageTitle `shouldBe` "Infrastructure" hostsBW.prePageTitle `shouldBe` Nothing - let hostsHtml = LT.toStrict $ Lucid.renderText $ Lucid.toHtml hosts + let hostsHtml = toText $ Lucid.renderText $ Lucid.toHtml hosts + table <- deferredBody body + V.length table.rows `shouldBe` 3 + let tableHtml = toText $ Lucid.renderText $ Lucid.toHtml table + hostsHtml `shouldContainAll` ["data-table-group=\"Docker\"", "data-table-group=\"Kubernetes\"", "data-table-group=\"OpenTelemetry\"", "data-hx-trigger=\"change\"", "name=\"group\"", "data-column-key=\"CPU\""] + T.count "role=\"button\"" tableHtml `shouldBe` 3 + T.count " clusterUid <> "\""] (_, hostMap) <- testServant tr $ Infrastructure.hostMapGetH testPid (Just "storage") Nothing Nothing Nothing Nothing Nothing Nothing Nothing (Just "1") - let hostMapHtml = LT.toStrict $ Lucid.renderText $ Lucid.toHtml hostMap + let hostMapHtml = toText $ Lucid.renderText $ Lucid.toHtml hostMap hostMapHtml - `shouldContainAll` ["Host Map", "Fill by", "Group by", "vps-bare-01", "clip-path:polygon", "bg-fillNeutral-strong", "onchange=\"this.form.requestSubmit()\"", "name=\"os\""] + `shouldContainAll` ["Host Map", "Fill by", "Group by", "vps-bare-01", "clip-path:polygon", "bg-fillNeutral-strong", "name=\"fill\"", "data-hx-trigger=\"change\"", "data-component=\"facet-rail\"", "Provider", "Region", "OS"] hostMapHtml `shouldNotSatisfy` T.isInfixOf ">Apply" (_, hostDetail) <- testServant tr $ Infrastructure.hostDetailGetH testPid (Just "vps-bare-01") Nothing Nothing Nothing - LT.toStrict (Lucid.renderText $ Lucid.toHtml hostDetail) + toText (Lucid.renderText $ Lucid.toHtml hostDetail) `shouldContainAll` [ "Host summary" , "CPU usage" , "Memory usage" @@ -418,11 +388,11 @@ spec = sequential $ aroundAll withTfChartResources do ] (_, imageDetail) <- testServant tr $ Infrastructure.imageDetailGetH testPid (Just "ghcr.io/open-telemetry/demo") Nothing Nothing Nothing - LT.toStrict (Lucid.renderText $ Lucid.toHtml imageDetail) + toText (Lucid.renderText $ Lucid.toHtml imageDetail) `shouldContainAll` ["Image summary", "Running containers", "Security coverage", "View containers"] (_, kubeDetail) <- testServant tr $ Infrastructure.kubernetesDetailGetH testPid (Just "pods") (Just "checkout-7fb5b4f859-nlcjs") (Just "otel-demo") (Just "default") Nothing Nothing Nothing - LT.toStrict (Lucid.renderText $ Lucid.toHtml kubeDetail) + toText (Lucid.renderText $ Lucid.toHtml kubeDetail) `shouldContainAll` ["Pod summary", "CPU / limit", "View containers", "View logs", "View metrics"] it "hostCpuChart_normalizesAcrossLogicalCoresAndRepeatedSamples" \tr -> do @@ -432,17 +402,20 @@ spec = sequential $ aroundAll withTfChartResources do forM_ ([("idle", 0.875), ("user", 0.125)] :: [(Text, Double)]) \(mode, value) -> ingestMetric tr key [mkAttr "host.name" "four-core-host"] [mkAttr "cpu.logical_number" core, mkAttr "cpu.mode" mode] "system.cpu.utilization" value (addUTCTime offset frozenTime) ingestMetric tr key [mkAttr "host.name" "host-without-idle"] [mkAttr "cpu.logical_number" "cpu0", mkAttr "cpu.mode" "user"] "system.cpu.utilization" 0.5 (addUTCTime (-60) frozenTime) - forM_ ([("four-core-host", Just 12.5), ("vps-d6d7e318", Just 25), ("host-without-idle", Nothing)] :: [(Text, Maybe Double)]) \(host, expected) -> do + forM_ ([("four-core-host", Just 12.5), ("vps-d6d7e318", Just 25), ("host-without-idle", Nothing), ("0ce201583b04", Nothing)] :: [(Text, Maybe Double)]) \(host, expected) -> do html <- shellHtml tr $ Infrastructure.hostDetailGetH testPid (Just host) Nothing Nothing (Just "2H") case expected of Just percentage -> chartPlotsOnly tr testPid "host-cpu" percentage html Nothing -> do - html `shouldContainAll` ["No host metrics in this time range", "Metrics coverage: 0 of 4"] + html `shouldContainAll` ["No host metrics in this time range", "Try last 1 hour", "Set up host metrics", "View logs", "Metrics coverage: 0 of 4"] html `shouldNotSatisfy` T.isInfixOf "host-cpu" it "infrastructureDrawer_drilldownsKeepTheSelectedTimeWindow" \tr -> do containerHtml <- shellHtml tr $ Containers.containerDetailGetH testPid (Just "checkout") (Just "checkout-7fb5b4f859-nlcjs") Nothing Nothing Nothing Nothing Nothing Nothing (Just "24H") containerHtml `shouldContainAll` ["/log_explorer?since=24H&query=", "/metrics?since=24H&metric_prefix=k8s."] + containerHtml `shouldContainAll` ["Requests and limits", "vps-d6d7e318", "View logs", "resource.k8s.pod.name", "data-tippy-content=\"Pod: checkout-7fb5b4f859-nlcjs\"", ""hide_value":true", "text-textWeak widget-subtitle", "\\"bottom\\":0", "\\"tooltip\\":{\\"show\\":true}"] + gone <- shellHtml tr $ Containers.containerDetailGetH testPid (Just "ghost") Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing + gone `shouldContainAll` ["no longer reporting"] historicalContainer <- shellHtml tr $ Containers.containerDetailGetH testPid (Just "checkout") (Just "checkout-7fb5b4f859-nlcjs") Nothing Nothing Nothing Nothing (Just "2024-12-31T23:00:00Z") (Just "2025-01-01T00:00:00Z") Nothing historicalContainer `shouldContainAll` ["/log_explorer?from=2024-12-31T23%3A00%3A00Z&to=2025-01-01T00%3A00%3A00Z&query=", "/metrics?from=2024-12-31T23%3A00%3A00Z&to=2025-01-01T00%3A00%3A00Z&metric_prefix=k8s."] hostHtml <- shellHtml tr $ Infrastructure.hostDetailGetH testPid (Just "vps-bare-01") Nothing Nothing (Just "24H") @@ -481,36 +454,19 @@ spec = sequential $ aroundAll withTfChartResources do param "since" `shouldBe` Just "4H" it "firstRequest_rendersChromeAndASelfFetchingSkeleton_notRows" \tr -> do - -- Every infrastructure view is one multi-second metrics pivot. The request that paints - -- the page must not wait for it: it answers with nav, tabs and a skeleton that fetches - -- the body itself. Rows appearing here again would mean the deferral was undone and - -- navigating the section is back to seconds per click. - hostsShell <- shellHtml tr $ Infrastructure.hostsGetH testPid Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing - hostsShell `shouldContainAll` ["Infrastructure", "Hosts", "id=\"hostsContainer\"", "hx-trigger=\"load, update-query from:window\"", "/infrastructure/hosts?", "deferred=1"] - hostsShell `shouldNotSatisfy` T.isInfixOf "vps-bare-01" - - containersShell <- shellHtml tr $ Containers.containersGetH testPid Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing - containersShell `shouldContainAll` ["id=\"containersContainer\"", "hx-trigger=\"load, update-query from:window\"", "deferred=1"] - containersShell `shouldNotSatisfy` T.isInfixOf "checkout-7fb5b4f859-nlcjs" - - -- The filters the shell was asked for have to survive the round trip, or the rows that - -- arrive would not be the rows the visible filter chips claim. - filteredShell <- shellHtml tr $ Infrastructure.kubernetesGetH testPid (Just "pods") (Just "otel-demo") (Just "default") Nothing Nothing Nothing Nothing Nothing - filteredShell `shouldContainAll` ["resource=pods", "cluster=otel-demo", "namespace=default", "deferred=1", "hx-trigger=\"load, update-query from:window\""] - - imagesShell <- shellHtml tr $ Infrastructure.imagesGetH testPid Nothing Nothing Nothing Nothing Nothing Nothing - imagesShell `shouldContainAll` ["id=\"imagesContainer\"", "data-deferred-shell", "hx-trigger=\"load, update-query from:window\""] - mapShell <- shellHtml tr $ Infrastructure.hostMapGetH testPid Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing - mapShell `shouldContainAll` ["id=\"hostMapContainer\"", "Loading host map", "hx-trigger=\"load, update-query from:window\""] - mapShell `shouldNotSatisfy` T.isInfixOf "data-visible-host-label" - - it "hostDetail_withoutHostMetrics_collapsesChartsIntoRecoveryState" \tr -> do - -- The Docker host: containers report against it but no system.* series does. - -- (vps-d6d7e318 no longer qualifies — the in-cluster agent gives it host CPU.) - (_, hostWithoutMetrics) <- testServant tr $ Infrastructure.hostDetailGetH testPid (Just "0ce201583b04") Nothing Nothing Nothing - let html = LT.toStrict $ Lucid.renderText $ Lucid.toHtml hostWithoutMetrics - html `shouldContainAll` ["No host metrics in this time range", "Try last 1 hour", "Set up host metrics", "View logs", "Metrics coverage: 0 of 4"] - html `shouldNotSatisfy` T.isInfixOf "host-cpu" + forM_ + ( [ (shellHtml tr $ Infrastructure.hostsGetH testPid Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing, ["Infrastructure", "Hosts", "id=\"hostsContainer\"", "/infrastructure/hosts?", "deferred=1"], ["vps-bare-01"]) + , (shellHtml tr $ Containers.containersGetH testPid Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing, ["id=\"containersContainer\"", "deferred=1"], ["checkout-7fb5b4f859-nlcjs"]) + , (shellHtml tr $ Infrastructure.kubernetesGetH testPid (Just "pods") (Just "otel-demo") (Just "default") Nothing Nothing Nothing Nothing Nothing, ["resource=pods", "cluster=otel-demo", "namespace=default", "deferred=1"], []) + , (shellHtml tr $ Infrastructure.imagesGetH testPid Nothing Nothing Nothing Nothing Nothing Nothing, ["id=\"imagesContainer\"", "data-deferred-shell"], []) + , (shellHtml tr $ Infrastructure.hostMapGetH testPid Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing, ["id=\"hostMapContainer\"", "Loading host map"], ["data-visible-host-label"]) + ] + :: [(IO Text, [Text], [Text])] + ) + \(render, expected, absent) -> do + html <- render + html `shouldContainAll` ("hx-trigger=\"load, update-query from:window\"" : expected) + forM_ absent $ \value -> html `shouldNotSatisfy` T.isInfixOf value it "containerDrawer_sameNamesRemainDistinctAndKeepTheirMetricScope" \tr -> do pid <- createTestProject tr "container-scoped-drawer" @@ -550,19 +506,6 @@ spec = sequential $ aroundAll withTfChartResources do victim <- createTestProject tr "victim" assertNonMemberDenied tr victim $ Containers.containerDetailGetH victim (Just "checkout") Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing - it "detailDrawer_showsRequestsAndLimitsAndPivots" \tr -> do - (_, html') <- testServant tr $ Containers.containerDetailGetH testPid (Just "checkout") (Just "checkout-7fb5b4f859-nlcjs") Nothing Nothing Nothing Nothing Nothing Nothing Nothing - let html = LT.toStrict $ Lucid.renderText $ Lucid.toHtml html' - html `shouldContainAll` ["Requests and limits", "vps-d6d7e318", "View logs", "resource.k8s.pod.name", "data-tippy-content=\"Pod: checkout-7fb5b4f859-nlcjs\""] - - -- The chart options ride as a JSON string inside data-chart-config, so their quotes are - -- JSON-escaped and then attribute-escaped; the bare form would mean a broken JSON.parse. - html `shouldContainAll` [""hide_value":true", "text-textWeak widget-subtitle", "\\"bottom\\":0", "\\"tooltip\\":{\\"show\\":true}"] - - -- A container that stopped reporting must say so, not render a blank panel. - (_, gone) <- testServant tr $ Containers.containerDetailGetH testPid (Just "ghost") Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing - LT.toStrict (Lucid.renderText $ Lucid.toHtml gone) `shouldContainAll` ["no longer reporting"] - -- The pivot reads the newest datapoint per series, so scanning the picker's whole window -- can only turn up older points it then discards -- while paying to sort every one. Over a -- day that cost the statement timeout, which meant the snapshot never cached and every load diff --git a/web-components/src/main.ts b/web-components/src/main.ts index 8755d0f9e..322e7915c 100644 --- a/web-components/src/main.ts +++ b/web-components/src/main.ts @@ -391,9 +391,12 @@ window.exportTableCsv = (selector, filename) => { if (!table) return; const quote = (value: string) => `"${value.replaceAll('"', '""')}"`; const csv = Array.from(table.querySelectorAll('tr')) + .filter(row => !row.hasAttribute('data-table-group') && + (!row.closest('thead') || row.parentElement === table.tHead) && + !Array.from(row.cells).some(cell => cell.querySelector('table'))) .filter((row) => getComputedStyle(row).display !== 'none') .map((row) => - Array.from(row.querySelectorAll('th,td')) + Array.from(row.cells) .filter((cell) => getComputedStyle(cell).display !== 'none') .map((cell) => quote(cell.innerText.trim().replaceAll(/\s+/g, ' '))) .join(',') diff --git a/web-components/test/table-export.test.ts b/web-components/test/table-export.test.ts index 1577b9673..bbc5d3367 100644 --- a/web-components/test/table-export.test.ts +++ b/web-components/test/table-export.test.ts @@ -18,13 +18,13 @@ beforeEach(() => { afterEach(() => vi.restoreAllMocks()); describe('table CSV export', () => { - test('downloads escaped visible cells with the requested filename', async () => { - document.body.innerHTML = ` - - - - -
HostNoteSecret
api-1ready, "primary"token
hiddenrow
`; + test.each([false, true])('downloads escaped visible cells, grouped=%s', async (grouped) => { + const header = 'HostNoteSecret'; + const rows = `api-1ready, "primary"token + hiddenrow`; + document.body.innerHTML = `${header}${grouped + ? `` + : rows}
Europe: 2 hosts${header}${rows}
`; document.querySelectorAll('th,td').forEach((cell) => (cell.innerText = cell.textContent ?? '')); const click = vi.spyOn(HTMLAnchorElement.prototype, 'click').mockImplementation(() => undefined); From d5deee79ee5127b72f02e08a92b919b696448fe5 Mon Sep 17 00:00:00 2001 From: Anthony Alaribe Date: Mon, 26 Oct 2026 15:58:09 +0100 Subject: [PATCH 017/201] Group vitest with @vitest/* in dependabot and drop unused root jest (#736) The vite group's "vite*" pattern also matched vitest, so vitest and @vitest/browser landed in different groups and each major bump failed to install alone (#723, #727). Root jest had no tests of its own; it only picked up web-components' vitest files. --- .github/dependabot.yml | 11 +- package-lock.json | 3156 +--------------------------------------- package.json | 2 - 3 files changed, 16 insertions(+), 3153 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 818e5b0af..6ffd75a75 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -43,14 +43,17 @@ updates: patterns: - "lit*" - "@lit*" + # Exact names: a bare "vite*" also claims vitest, splitting it from @vitest/* across groups. vite-ecosystem: patterns: - - "vite*" - - "@vite*" + - "vite" + - "vite-plugin-*" + - "@vitejs/*" vitest-ecosystem: patterns: - - "vitest*" - - "@vitest*" + - "vitest" + - "vitest-*" + - "@vitest/*" commit-message: prefix: "chore(deps)" diff --git a/package-lock.json b/package-lock.json index 40a7d5d07..484410928 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "m3-deps", + "name": "m3-chore", "lockfileVersion": 3, "requires": true, "packages": { @@ -15,7 +15,6 @@ "@tailwindcss/typography": "^0.5.20", "autoprefixer": "^10.6.1", "daisyui": "^5.7.50", - "jest": "^30.5.2", "postcss": "^8.5.31", "tailwindcss": "^4.3.3", "workbox-cli": "^7.4.1" @@ -514,61 +513,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-import-assertions": { "version": "7.28.6", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.28.6.tgz", @@ -601,174 +545,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.29.7.tgz", - "integrity": "sha512-TSu8+mHCoEaaCDEZ0I3+6mvTBYR4PCxQwf2z9/r5Tbztv6NaLR3B9thGTTxX2WGuGHJqRiAbKPeGTJ5XWXVg6A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.29.7.tgz", - "integrity": "sha512-ngr+82Sh0xMz25TPCZi+nC2iTzjfCdWS2ONXTp/PtSCHCgaCNBpdMqgvJ2ccdLlClVZ7sisIgB914j/JFe+RZA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-unicode-sets-regex": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", @@ -1801,71 +1577,6 @@ "node": ">=6.9.0" } }, - "node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@emnapi/core": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", - "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/wasi-threads": "1.2.1", - "tslib": "^2.4.0" - } - }, - "node_modules/@emnapi/core/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, - "license": "0BSD", - "optional": true - }, - "node_modules/@emnapi/runtime": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz", - "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@emnapi/runtime/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, - "license": "0BSD", - "optional": true - }, - "node_modules/@emnapi/wasi-threads": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", - "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@emnapi/wasi-threads/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, - "license": "0BSD", - "optional": true - }, "node_modules/@grpc/grpc-js": { "version": "1.14.6", "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.14.6.tgz", @@ -1907,448 +1618,6 @@ "node": ">=18" } }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.6.tgz", - "integrity": "sha512-+Sg6GCR/wy1oSmQDFq4LQDAhm3ETKnorxN+y5nbLULOR3P0c14f2Wurzj3/xqPXtasLFfHd5iRFQ7AJt4KH2cw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/console": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-30.5.2.tgz", - "integrity": "sha512-e8sQC4pCMHPBrPX7Hk8TJr+DM5dkUnImSTNag8SEWFAFAF6xIz4AJvCKapnrdHnZxep4bxw4PhG+ZbimYBMyKw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.5.1", - "@types/node": "*", - "chalk": "^4.1.2", - "jest-message-util": "30.5.1", - "jest-util": "30.5.1", - "slash": "^3.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/core": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-30.5.2.tgz", - "integrity": "sha512-/jqvFWoJF7LV1a6AUpYMbMm+2yIYsHJfR474H0SCzr9k8tnO/jl9wRg6zSG6lxgf6EozNlCG4amFzWsbZSvvZA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "30.5.2", - "@jest/pattern": "30.5.0", - "@jest/reporters": "30.5.2", - "@jest/test-result": "30.5.2", - "@jest/transform": "30.5.2", - "@jest/types": "30.5.1", - "@types/node": "*", - "ansi-escapes": "^4.3.2", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "exit-x": "^0.2.2", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.11", - "jest-changed-files": "30.5.1", - "jest-config": "30.5.2", - "jest-haste-map": "30.5.1", - "jest-message-util": "30.5.1", - "jest-regex-util": "30.5.0", - "jest-resolve": "30.5.1", - "jest-resolve-dependencies": "30.5.2", - "jest-runner": "30.5.2", - "jest-runtime": "30.5.2", - "jest-snapshot": "30.5.2", - "jest-util": "30.5.1", - "jest-validate": "30.5.1", - "jest-watcher": "30.5.2", - "pretty-format": "30.5.1", - "slash": "^3.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/diff-sequences": { - "version": "30.5.0", - "resolved": "https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.5.0.tgz", - "integrity": "sha512-OsqBjHXCn8cadasoAZBP6nWYvMsRhpMzGXTpxJ5aO04NlbdhIz+FVe3q49l0AwVhsz/cEmIpBes6gAFl1/dWQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/environment": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-30.5.2.tgz", - "integrity": "sha512-nwFPOUMbmsjNNRCpnJpB9HbSZu4C07wDDds++5j+j1MezzPLxMPDdbdUVjr2o4RULDOValnDd70taPFI1EtxAg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/fake-timers": "30.5.2", - "@jest/types": "30.5.1", - "@types/node": "*", - "jest-mock": "30.5.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/expect": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-30.5.2.tgz", - "integrity": "sha512-2E+1Pg6jJxbRjLNLpciC71iri/3qsKJL222/aXJEFwC0VdUSvfS+JZQQLEVjUYYc8t8pQu2MGE3cF2+bNTYRsg==", - "dev": true, - "license": "MIT", - "dependencies": { - "expect": "30.5.2", - "jest-snapshot": "30.5.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/expect-utils": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.5.2.tgz", - "integrity": "sha512-d/HOLSrJUlBIl6n3LzOa7cjW3xdePm5H5gQw2lixZ/0h157l9sw3mLblzFqnPcTbhDzhRQdBOX3A3KcG73nm5Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/get-type": "30.5.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/fake-timers": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-30.5.2.tgz", - "integrity": "sha512-GKk0h0tKT5SpDPxDhPg3r9mm5s8/YCBzVNMOGdRiQXwUiMsjU10mVPlMaQstH6/cu50vOb8N9oQUMETHuwwxKw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.5.1", - "@sinonjs/fake-timers": "^15.4.0", - "@types/node": "*", - "jest-message-util": "30.5.1", - "jest-mock": "30.5.2", - "jest-util": "30.5.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/get-type": { - "version": "30.5.0", - "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.5.0.tgz", - "integrity": "sha512-9/2VUPitAjmBzbvDvqrxmvB7BzWsBW0WmkkojX1ODuxX1NLGxx9gfaZpHB0z8DtJ9uhGNmZG/VXBhf8uO0OV8Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/globals": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-30.5.2.tgz", - "integrity": "sha512-62zfS+dL+M5aTNHXCNLyqD+j4oqxTIzDYrZbpqMP8Yn+gvlAGyzC6BSPNb1ZmFOakV1RtFYX/O3FCQXSWmQdgg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "30.5.2", - "@jest/expect": "30.5.2", - "@jest/types": "30.5.1", - "jest-mock": "30.5.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/pattern": { - "version": "30.5.0", - "resolved": "https://registry.npmjs.org/@jest/pattern/-/pattern-30.5.0.tgz", - "integrity": "sha512-HdNQYSdRTEBNrginaqzQtTjG0HRMfrra/z6Ok7uL3S87vSlarIVohEsJsSj5edu3MiHoHjAkvPROz5ZjoKai+w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "jest-regex-util": "30.5.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/react-is-18": { - "name": "react-is", - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", - "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@jest/react-is-19": { - "name": "react-is", - "version": "19.3.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.3.1.tgz", - "integrity": "sha512-RRieF6IyxQBkcK6pP8xOHprLTPW6QjRkbGdImtqNme+/hYVwCZkLQLdlZGOhUqXwkS9IEynaGvPJtv6XB/cz0Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/@jest/reporters": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-30.5.2.tgz", - "integrity": "sha512-ev6E9iG73twQcfAfoTnviuYkr3yOrYbzAtMFCimv2fxHXPIp9PBt2u1wNMt0aYWgl8FPwIcS8oqRJg6alnht4Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "30.5.2", - "@jest/test-result": "30.5.2", - "@jest/transform": "30.5.2", - "@jest/types": "30.5.1", - "@jridgewell/trace-mapping": "^0.3.31", - "@types/node": "*", - "chalk": "^4.1.2", - "collect-v8-coverage": "^1.0.2", - "exit-x": "^0.2.2", - "glob": "^13.0.6", - "graceful-fs": "^4.2.11", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^6.0.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^5.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "30.5.1", - "jest-util": "30.5.1", - "jest-worker": "30.5.1", - "slash": "^3.0.0", - "string-length": "^4.0.2", - "v8-to-istanbul": "^9.0.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/reporters/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/@jest/reporters/node_modules/brace-expansion": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", - "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@jest/reporters/node_modules/glob": { - "version": "13.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", - "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "minimatch": "^10.2.2", - "minipass": "^7.1.3", - "path-scurry": "^2.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@jest/reporters/node_modules/minimatch": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", - "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.8" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@jest/schemas": { - "version": "30.5.0", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.5.0.tgz", - "integrity": "sha512-/hunigyNpc4RCjC0VaW3f5RCUZVM2+WQ65qP7z083Gmvac7or2LI50XVNOtE4YPgBpV0yxYiAgorAPGniCoJmg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sinclair/typebox": "^0.34.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/snapshot-utils": { - "version": "30.5.1", - "resolved": "https://registry.npmjs.org/@jest/snapshot-utils/-/snapshot-utils-30.5.1.tgz", - "integrity": "sha512-V3wnxNtiVmw5PPVg433Cn3VdXnsOeu/ofLw3KC04Bn2y1wIlU5kozXQn48rhrgj/02LrCVtntTEF1yBha0XSUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.5.1", - "chalk": "^4.1.2", - "graceful-fs": "^4.2.11", - "natural-compare": "^1.4.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/source-map": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-30.5.2.tgz", - "integrity": "sha512-c5CehvkbfHX6yyNg7bMn2ylqlp9AHXuZ/3hPH/Lh5bxD/vefd/lV9HBjMqXef9yQNqkdwyZvkLSVSwB38hy8Qw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.31", - "callsites": "^3.1.0", - "convert-source-map": "^2.0.0", - "graceful-fs": "^4.2.11" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/test-result": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-30.5.2.tgz", - "integrity": "sha512-eO6YU5rsLfs60ne694e0IAmRgeBnoA8mu0nlxXDbl/1j5km0o2vO9/VbbUIKIH+WRKKEI+ELgwraRGn2Lhep8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "30.5.2", - "@jest/types": "30.5.1", - "@types/istanbul-lib-coverage": "^2.0.6", - "collect-v8-coverage": "^1.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/test-sequencer": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-30.5.2.tgz", - "integrity": "sha512-bmij8jZyYAC47ExT2GeP7PcrlwSNS+Bp3KeRuBH88gpcxqDv6fljN8PemS4J/lLZ79xb6mpaennQTTq0zUAVVg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "30.5.2", - "graceful-fs": "^4.2.11", - "jest-haste-map": "30.5.1", - "slash": "^3.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/transform": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-30.5.2.tgz", - "integrity": "sha512-LBGwmaE886C41jDZ65eqR1YbXM7642MK3ZhTowZd5+xDlrDLuf4ePuDdDmVSvcr8NTVJ3MqxLkMbUCzuigUaoQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.27.4", - "@jest/types": "30.5.1", - "@jridgewell/trace-mapping": "^0.3.31", - "babel-plugin-istanbul": "^8.0.0", - "chalk": "^4.1.2", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.11", - "jest-haste-map": "30.5.1", - "jest-regex-util": "30.5.0", - "jest-util": "30.5.1", - "pirates": "^4.0.7", - "slash": "^3.0.0", - "write-file-atomic": "^5.0.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/@jest/types": { - "version": "30.5.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.5.1.tgz", - "integrity": "sha512-LvVYn83nnXPl+Rg98nvcFgjx6nRMTArhSn6RAX/w3ELn54S8A42TYZvsCMdGUqTM8S0wyXbtlQdU6Hi6dykj9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/pattern": "30.5.0", - "@jest/schemas": "30.5.0", - "@types/istanbul-lib-coverage": "^2.0.6", - "@types/istanbul-reports": "^3.0.4", - "@types/node": "*", - "@types/yargs": "^17.0.33", - "chalk": "^4.1.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", @@ -2411,28 +1680,6 @@ "url": "https://opencollective.com/js-sdsl" } }, - "node_modules/@napi-rs/wasm-runtime": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.6.tgz", - "integrity": "sha512-mRyDmEw9/fCDXCGfL1sbgIw/GUK0PVxRW4YwgPN61F3LQ+fSyoBFarJVzgGyhF6kRzEQZ0FejDqm4WLXSeqQmw==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@tybys/wasm-util": "^0.10.3" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=23.5.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Brooooooklyn" - }, - "peerDependencies": { - "@emnapi/core": "^1.7.1 || 2.0.0-beta.2", - "@emnapi/runtime": "^1.7.1 || 2.0.0-beta.2" - } - }, "node_modules/@opentelemetry/api": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.10.0.tgz", @@ -4020,19 +3267,6 @@ "node": ">=14" } }, - "node_modules/@pkgr/core": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.3.6.tgz", - "integrity": "sha512-SEeaJLb3qBNF/OaXnaR1NmmBbFYk1zC0ZH/52fATcRPLFg/p791YrcyFFy44Bo9sLaGuSuLp5Q6axbb/O+v/RA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/pkgr" - } - }, "node_modules/@playwright/test": { "version": "1.64.1", "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.64.1.tgz", @@ -4634,33 +3868,6 @@ "win32" ] }, - "node_modules/@sinclair/typebox": { - "version": "0.34.52", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.52.tgz", - "integrity": "sha512-XiMQh7qqVlxZzcVD+kkGMNGMzcTrDMLWI7S4x7z1MkCkbDPrekpZXEUK0eZqZFMuHQg2a2DZOcDIh9o5v3Gonw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@sinonjs/commons": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", - "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "15.4.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-15.4.0.tgz", - "integrity": "sha512-DsG+8/LscQIQg68J6Ef3dv10u6nVyetYn923s3/sus5eaGfTo1of5WMZSLf0UJc9KDuKPilPH0UDJCjvNbDNCA==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.1" - } - }, "node_modules/@tailwindcss/cli": { "version": "4.3.3", "resolved": "https://registry.npmjs.org/@tailwindcss/cli/-/cli-4.3.3.tgz", @@ -5011,25 +4218,6 @@ "node": ">=12" } }, - "node_modules/@tybys/wasm-util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.4.tgz", - "integrity": "sha512-W3c4gRigFS0T/Ma4qIYF3GDAc5AQdHb1yL5znJT1Zv1YaD9Kitx656wBjvr19qbiosmZT8lWDM5BEMynUqX65A==", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@tybys/wasm-util/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, - "license": "0BSD", - "optional": true - }, "node_modules/@types/aws-lambda": { "version": "8.10.164", "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.164.tgz", @@ -5041,6 +4229,8 @@ "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", @@ -5054,6 +4244,8 @@ "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "@babel/types": "^7.0.0" } @@ -5063,6 +4255,8 @@ "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "@babel/parser": "^7.1.0", "@babel/types": "^7.0.0" @@ -5073,6 +4267,8 @@ "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "@babel/types": "^7.20.7" } @@ -5093,33 +4289,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", - "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", - "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", - "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, "node_modules/@types/memcached": { "version": "2.2.10", "resolved": "https://registry.npmjs.org/@types/memcached/-/memcached-2.2.10.tgz", @@ -5176,13 +4345,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/stack-utils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", - "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", - "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", @@ -5190,343 +4352,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/yargs": { - "version": "17.0.35", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.35.tgz", - "integrity": "sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.3", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", - "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@ungap/structured-clone": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.4.0.tgz", - "integrity": "sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/@unrs/resolver-binding-android-arm-eabi": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.12.2.tgz", - "integrity": "sha512-g5T90pqg1bo/7mytQx6F4iBNC0Wsh9cu+z9veDbFjc7HjpesJFWD7QMS0NGStXM075+7dJPPVvBbpZlnrdpi/w==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@unrs/resolver-binding-android-arm64": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.12.2.tgz", - "integrity": "sha512-YGCRZv/9GLhwmz6mYDeTsm/92BAyR28l6c2ReweVW5pWgfsitWLY8upvfRlGdoyD8HjeTHSYJWyZGD4KJA/nFQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@unrs/resolver-binding-darwin-arm64": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.12.2.tgz", - "integrity": "sha512-u9DiNT1auQMO20A9SyTuG3wUgQWB9Z7KjAg0uFuCDR1FsAY8A0CG2S6JpHS1xwm/w1G08bjXZDcyOCjv1WAm2w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@unrs/resolver-binding-darwin-x64": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.12.2.tgz", - "integrity": "sha512-f7rPLi/T1HVKZu/u6t87lroib16n8vrSzcyxI7lg4BGO9UF26KhQL44sd9eOUgrTYhvRXtWOIZT5PejdPyJfUA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@unrs/resolver-binding-freebsd-x64": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.12.2.tgz", - "integrity": "sha512-BpcOjWCJub6nRZUS2zA20pmLvjtqAtGejETaIyRLiZiQf++cbrjltLA5NN/xaXfqeOBOSlMFbemIl5/S5tljmg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.12.2.tgz", - "integrity": "sha512-vZTDvdSISZjJx66OzJqtsOhzifbqRjbmI1Mnu49fQDwog5GtDI4QidRiEAYbZCRj9C8YZEW+3ZjqsyS9GR4k2A==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.12.2.tgz", - "integrity": "sha512-BiPI+IrIlwcW4nLLMM21+B1dFPzd55yAVgVGrdgDjNef+ch03GdxrcyaIz8X9SsQirh/kCQ7mviyWlMxdh2D7g==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-arm64-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.12.2.tgz", - "integrity": "sha512-zJc0H99FEPoFfSrNpa91HYfxzfAJCr502oxNK1cfdC9hlaFI43RT+JFCann9JUgZmLzzntChHyn13Sgn9ljHNg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-arm64-musl": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.12.2.tgz", - "integrity": "sha512-KQ3Lki6l+Pz1k/eBipN41ES+YUK30beLGb9YqcB1O542cyLCNE6GaxrfcY3T6EezmGGk84wb5XyO9loTM9tkcA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-loong64-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-gnu/-/resolver-binding-linux-loong64-gnu-1.12.2.tgz", - "integrity": "sha512-3SJGEh1DborhG6pyxvhPzCT4bbSIVihsvgJc13P1bHG7KLdNDaF9T3gsTwFc7Jw/5Y5/iWOjkEx7Zy0NvCGX3Q==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-loong64-musl": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-musl/-/resolver-binding-linux-loong64-musl-1.12.2.tgz", - "integrity": "sha512-jiuG/Obbel7uw1PwHNFfrkiKhLAF6mnyZ6aWlOAVN9WqKm8v0OFGnciJIHu8+CMvXLQ8AD51LPzAoUfT21D5Ew==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.12.2.tgz", - "integrity": "sha512-q7xRvVpmcfeL+LlZg8Pbbo6QaTZwDU5BaGZbwfhkEsXJn3Was8xYfE0RBH266xZt0rM6B7i8xAYIvjthuUIWHg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-riscv64-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.12.2.tgz", - "integrity": "sha512-0CVdx6lcnT3Q9inOH8tsMIOJ6ImndllMjqJHg8RLVdB7Vq4SfkEXl9mCSsVNuNA4MCYycRicCUxPCabVHJRr6A==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-riscv64-musl": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.12.2.tgz", - "integrity": "sha512-iOwlRo9vnp6R6ohHQS11n0NnfdXx/omhkocmIfaPRpQhKZ+3BDMkkdRVh53qjkFkpPddf+FETA28NwGN7l5l+w==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-s390x-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.12.2.tgz", - "integrity": "sha512-HYJtLfXq94q8iZNFT1lknx258wlkkWhZeUXJRqzKBBUJ00CvZ+N33zgbCqimLjsyw5Va6uUxhVa12mI+kaveEw==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-x64-gnu": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.12.2.tgz", - "integrity": "sha512-mPsUhunKKDih5O96Y6enDQyHc1SqBPlY1E/SfMWDM3EdJ95Z9CArPeCVwCCqbP45ljvivdEk8Fxn+SIb1rDAJQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-linux-x64-musl": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.12.2.tgz", - "integrity": "sha512-azrt6+5ydLd8Vt210AAFis/lZevSfPw93EJRIJG+xPu4WCJ8K0kppCTpMyLPcKT7H15M4Jnt2tMp5bOvCkRC6A==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@unrs/resolver-binding-openharmony-arm64": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-openharmony-arm64/-/resolver-binding-openharmony-arm64-1.12.2.tgz", - "integrity": "sha512-YZ9hP4O0X9PQb8eO980qmLNGH4zT3I9+SZTdt0Pr0YyuGQhYKoOZkV02VzrzyOZJ5xIJ3UFIenKkUkGg8GjgWQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ] - }, - "node_modules/@unrs/resolver-binding-wasm32-wasi": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.12.2.tgz", - "integrity": "sha512-tYFDIkMxSflfEc/h92ZWNsZlHSwgimbNHSO3PL2JWQHfCuC2q316jMyYU9TIWZsFK2bQwyK5VAdYgn8ygPj69A==", - "cpu": [ - "wasm32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/core": "1.10.0", - "@emnapi/runtime": "1.10.0", - "@napi-rs/wasm-runtime": "^1.1.4" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@unrs/resolver-binding-win32-arm64-msvc": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.12.2.tgz", - "integrity": "sha512-qzNyg3xL0VPQmCaUh+N5jSitce6k+uCBfMDesWRnlULOZaqUkaJ0ybdT+UqlAWJoQjuqfIU/0Ptx9bteN4D82g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@unrs/resolver-binding-win32-ia32-msvc": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.12.2.tgz", - "integrity": "sha512-WD9sY00OfpHVGfsnHZoA8jVT+esS/Bg8z8jzxp5BnDCjjwsuKsPQrzswwpFy4J1AUJbXPRfkpcX0mXrzeXW79g==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@unrs/resolver-binding-win32-x64-msvc": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.12.2.tgz", - "integrity": "sha512-nAB74NfSNKknqQ1RrYj6uz8FcXEomu/MATJZxh/x+BArzN2U3JbOYC0APYzUIGhVY3m5hRxA8VPNdPBoG8txlA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, "node_modules/acorn": { "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", @@ -5634,16 +4459,6 @@ "node": ">= 8" } }, - "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/array-buffer-byte-length": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", @@ -5783,61 +4598,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/babel-jest": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-30.5.2.tgz", - "integrity": "sha512-ES8WeJ2fNWPEDunyAtUfJ12nHyaWUloCHdkfK2oW5uSoQSUmjNKdWiGaXJITJwvFEWoD/evHEg/QoCXAvLaQqQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/transform": "30.5.2", - "@types/babel__core": "^7.20.5", - "babel-plugin-istanbul": "^8.0.0", - "babel-preset-jest": "30.5.0", - "chalk": "^4.1.2", - "graceful-fs": "^4.2.11", - "slash": "^3.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.11.0 || ^8.0.0-0" - } - }, - "node_modules/babel-plugin-istanbul": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-8.0.0.tgz", - "integrity": "sha512-18wCskrN3DgbuBmp1gr7LBGT8xdz5xhQQqFvFhVxbkl8VBCrMKQ2YtqBWtUal1Zrc1HTuX0011+Brjw78TCFkg==", - "dev": true, - "license": "BSD-3-Clause", - "workspaces": [ - "test/babel-8" - ], - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.3", - "istanbul-lib-instrument": "^6.0.2", - "test-exclude": "^7.0.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/babel-plugin-jest-hoist": { - "version": "30.5.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-30.5.0.tgz", - "integrity": "sha512-gtGo1B+u14jrZQv6TdSWIWkTqclboo7Qn+dFAGUOIuXLFuJKAdg3U5MIWzZnW4vfUb4dX9skmAMiby86e/SF4A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/babel__core": "^7.20.5" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, "node_modules/babel-plugin-polyfill-corejs2": { "version": "0.4.17", "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.17.tgz", @@ -5880,50 +4640,6 @@ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, - "node_modules/babel-preset-current-node-syntax": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz", - "integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-import-attributes": "^7.24.7", - "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5" - }, - "peerDependencies": { - "@babel/core": "^7.0.0 || ^8.0.0-0" - } - }, - "node_modules/babel-preset-jest": { - "version": "30.5.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-30.5.0.tgz", - "integrity": "sha512-ZGPn5ClP4lBDpuOK8W1yQIOy359HmbnZv3suucAlIe+SEE9yDsxV4S2PjSbH2Vc97U+WmzYD7vw3kr8NsQ/i6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "babel-plugin-jest-hoist": "30.5.0", - "babel-preset-current-node-syntax": "^1.2.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.11.0 || ^8.0.0-beta.1 || ^8.0.0" - } - }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -6203,16 +4919,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/bser": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.2.tgz", - "integrity": "sha512-V2o8YS2EhrKMO9AumnkK0ynynfFlsajpYupwq7S46H5mhcanwxDkNTw3K67wPIcKTH1ffkA4vhMOtAc7gRmPZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "node-int64": "^0.4.0" - } - }, "node_modules/buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", @@ -6293,16 +4999,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -6366,16 +5062,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, "node_modules/chardet": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", @@ -6418,22 +5104,6 @@ "node": ">= 6" } }, - "node_modules/ci-info": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.4.0.tgz", - "integrity": "sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/cjs-module-lexer": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz", @@ -6508,24 +5178,6 @@ "node": ">=0.8" } }, - "node_modules/co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "node_modules/collect-v8-coverage": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz", - "integrity": "sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw==", - "dev": true, - "license": "MIT" - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -6782,21 +5434,6 @@ "node": ">=0.10.0" } }, - "node_modules/dedent": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.2.tgz", - "integrity": "sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "babel-plugin-macros": "^3.1.0" - }, - "peerDependenciesMeta": { - "babel-plugin-macros": { - "optional": true - } - } - }, "node_modules/deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", @@ -6875,16 +5512,6 @@ "node": ">=0.10" } }, - "node_modules/detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/dot-prop": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-9.0.0.tgz", @@ -6958,19 +5585,6 @@ "dev": true, "license": "ISC" }, - "node_modules/emittery": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", - "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -7161,30 +5775,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "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/estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", @@ -7215,58 +5805,6 @@ "url": "https://github.com/bgub/eta?sponsor=1" } }, - "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/exit-x": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/exit-x/-/exit-x-0.2.2.tgz", - "integrity": "sha512-+I6B/IkJc1o/2tiURyz/ivu/O0nKNEArIUB5O7zBrlDVJr22SCLH3xTeEry428LvFhRzIA1g8izguxJ/gbNcVQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/expect": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/expect/-/expect-30.5.2.tgz", - "integrity": "sha512-0LNuMvs8/5mRYhnCR4k+lGV7fqPMs6Bnksda4S3zsCUmdxBpAn4zU4NNzXdq1pMKe/H4W5t/zVIDSJ/H3e0vDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/expect-utils": "30.5.2", - "@jest/get-type": "30.5.0", - "jest-matcher-utils": "30.5.2", - "jest-message-util": "30.5.1", - "jest-mock": "30.5.2", - "jest-util": "30.5.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -7317,16 +5855,6 @@ ], "license": "BSD-3-Clause" }, - "node_modules/fb-watchman": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.4.tgz", - "integrity": "sha512-tGQtaoYisPDriJBN0mT5yZSyNETnJGA1gTYxaVRAE5KUO3LI9kPUc9WIu8JXcxaIci+faIKlzXqXyPgrmubtBQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "bser": "2.1.2" - } - }, "node_modules/fetch-blob": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", @@ -7668,16 +6196,6 @@ "dev": true, "license": "ISC" }, - "node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/get-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", @@ -7692,19 +6210,6 @@ "node": ">= 0.4" } }, - "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/get-symbol-description": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", @@ -8044,13 +6549,6 @@ "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true, - "license": "MIT" - }, "node_modules/html2canvas": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.4.1.tgz", @@ -8076,16 +6574,6 @@ "node": ">= 14" } }, - "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10.17.0" - } - }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -8139,36 +6627,6 @@ "node": ">=18" } }, - "node_modules/import-local": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", - "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", - "dev": true, - "license": "MIT", - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, "node_modules/indent-string": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", @@ -8417,16 +6875,6 @@ "node": ">=8" } }, - "node_modules/is-generator-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", - "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/is-generator-function": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", @@ -8794,90 +7242,6 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", - "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", - "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.23.9", - "@babel/parser": "^7.23.9", - "@istanbuljs/schema": "^0.1.3", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-instrument/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/istanbul-lib-report": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", - "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.23", - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-reports": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", - "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jackspeak": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.2.3.tgz", @@ -8912,1056 +7276,6 @@ "node": ">=10" } }, - "node_modules/jest": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/jest/-/jest-30.5.2.tgz", - "integrity": "sha512-3gnpdBIza8ijCl3iMV9ChE3hSt1+46865qqod863gQtJr1DixOkAU5DoGbi3u+XlRcw++BhZQMu/y4xBdHBvSQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "30.5.2", - "@jest/types": "30.5.1", - "import-local": "^3.2.0", - "jest-cli": "30.5.2" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-changed-files": { - "version": "30.5.1", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-30.5.1.tgz", - "integrity": "sha512-0+bvMM/ENhDI29Z8q1r4HxiDIi4G5tnBmSw4esfPQoj9q8Nik7KIyuxHkTVnnniJQf05SxpGaKDQ+4h28ynGPg==", - "dev": true, - "license": "MIT", - "dependencies": { - "execa": "^5.1.1", - "jest-util": "30.5.1", - "p-limit": "^3.1.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-circus": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-30.5.2.tgz", - "integrity": "sha512-vffFgjs5JSJ9q4ds1vNW3klKYPJfYfIY61LT/zaZgvTeASJOWZUt8LBfHgIcV4rwxlPBLl/ePBGccHEclS4PlQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "30.5.2", - "@jest/expect": "30.5.2", - "@jest/test-result": "30.5.2", - "@jest/types": "30.5.1", - "@types/node": "*", - "chalk": "^4.1.2", - "co": "^4.6.0", - "dedent": "^1.6.0", - "is-generator-fn": "^2.1.0", - "jest-each": "30.5.2", - "jest-matcher-utils": "30.5.2", - "jest-message-util": "30.5.1", - "jest-runtime": "30.5.2", - "jest-snapshot": "30.5.2", - "jest-util": "30.5.1", - "p-limit": "^3.1.0", - "pretty-format": "30.5.1", - "pure-rand": "^7.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.6" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-cli": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-30.5.2.tgz", - "integrity": "sha512-YYYxUUVjFgPvgEleKNKMaYGIFgR3l3832Cl0kRL/oCiDZ03v7wImUtquHl2OOBCCNgprjZgBN5bczS/JklPBDg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/core": "30.5.2", - "@jest/test-result": "30.5.2", - "@jest/types": "30.5.1", - "chalk": "^4.1.2", - "exit-x": "^0.2.2", - "import-local": "^3.2.0", - "jest-config": "30.5.2", - "jest-util": "30.5.1", - "jest-validate": "30.5.1", - "yargs": "^17.7.2" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-config": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-30.5.2.tgz", - "integrity": "sha512-U6221OZekabePvGcGPf4raIBKMvYQWFHvhobDJRojOYaFMj2HaGytAdknjDhYc6JTz2fdHW9+6k0wWUDaNeOFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.27.4", - "@jest/get-type": "30.5.0", - "@jest/pattern": "30.5.0", - "@jest/test-sequencer": "30.5.2", - "@jest/types": "30.5.1", - "babel-jest": "30.5.2", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "deepmerge": "^4.3.1", - "glob": "^13.0.6", - "graceful-fs": "^4.2.11", - "jest-circus": "30.5.2", - "jest-docblock": "30.5.0", - "jest-environment-node": "30.5.2", - "jest-regex-util": "30.5.0", - "jest-resolve": "30.5.1", - "jest-runner": "30.5.2", - "jest-util": "30.5.1", - "jest-validate": "30.5.1", - "parse-json": "^5.2.0", - "pretty-format": "30.5.1", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "esbuild-register": ">=3.4.0", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "esbuild-register": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/jest-config/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/jest-config/node_modules/brace-expansion": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", - "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/jest-config/node_modules/glob": { - "version": "13.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", - "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "minimatch": "^10.2.2", - "minipass": "^7.1.3", - "path-scurry": "^2.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/jest-config/node_modules/minimatch": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", - "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.8" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/jest-diff": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.5.2.tgz", - "integrity": "sha512-rBtHnI6BWTiWj3lM7fOLVfChx7R9B0u9VV3PRHawKs79x6ZjW1QoSrKenaigNGWlvhtoi2BqvDbABDie+Os3xQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/diff-sequences": "30.5.0", - "@jest/get-type": "30.5.0", - "chalk": "^4.1.2", - "pretty-format": "30.5.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-docblock": { - "version": "30.5.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-30.5.0.tgz", - "integrity": "sha512-NwDqcxtoZi33RhuW+zJS/RVA3rmheQ8BnwpYZuc/Eruaz6seQb7+aoCeDZu/3X7W2XmD8DbSo9Pn72DbKsBFYw==", - "dev": true, - "license": "MIT", - "dependencies": { - "detect-newline": "^3.1.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-each": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-30.5.2.tgz", - "integrity": "sha512-GRrW+7fmmgmkvyfEBqc1QFdWnF1Ex5yG6Y6AWL4TTxnkWlKIT98dsKh3P3UuWm6v4XsQwVE6DEzXIPMzWJ3ZbA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/get-type": "30.5.0", - "@jest/types": "30.5.1", - "chalk": "^4.1.2", - "jest-regex-util": "30.5.0", - "jest-util": "30.5.1", - "pretty-format": "30.5.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-environment-node": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-30.5.2.tgz", - "integrity": "sha512-Ciz4KgTGIbojxSKpuFImgWJj5EyqfE8xMq9NxWmOXnQywHHS03H9Mv+vaCB29J5pr3JBrY27WbRV18rBdjh8Dg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "30.5.2", - "@jest/fake-timers": "30.5.2", - "@jest/types": "30.5.1", - "@types/node": "*", - "jest-mock": "30.5.2", - "jest-util": "30.5.1", - "jest-validate": "30.5.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-haste-map": { - "version": "30.5.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-30.5.1.tgz", - "integrity": "sha512-VIFgt67jW480YDxKfEv9IYQKrFpYt7bOCMn3VsnjK7AK9qo7p6acpnA1DHwsVOULE3dTaYew/6JaTD/d0VDHoQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.5.1", - "@parcel/watcher": "^2.6.0", - "@types/node": "*", - "anymatch": "^3.1.3", - "fb-watchman": "^2.0.2", - "fdir": "^6.5.0", - "graceful-fs": "^4.2.11", - "jest-regex-util": "30.5.0", - "jest-util": "30.5.1", - "jest-worker": "30.5.1", - "picomatch": "^4.0.3" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-haste-map/node_modules/@parcel/watcher": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.6.0.tgz", - "integrity": "sha512-7FNeNl8NCE7aINx7WXiKQrPYZWC/hvrTsmk6zmxbI7LTXE7hVek/n8AfVgpe2y82zl3w0HvCHN0bVKMBoJcC0w==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "detect-libc": "^2.0.3", - "is-glob": "^4.0.3", - "node-addon-api": "^7.0.0", - "picomatch": "^4.0.4" - }, - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "@parcel/watcher-android-arm64": "2.6.0", - "@parcel/watcher-darwin-arm64": "2.6.0", - "@parcel/watcher-darwin-x64": "2.6.0", - "@parcel/watcher-freebsd-x64": "2.6.0", - "@parcel/watcher-linux-arm-glibc": "2.6.0", - "@parcel/watcher-linux-arm-musl": "2.6.0", - "@parcel/watcher-linux-arm64-glibc": "2.6.0", - "@parcel/watcher-linux-arm64-musl": "2.6.0", - "@parcel/watcher-linux-x64-glibc": "2.6.0", - "@parcel/watcher-linux-x64-musl": "2.6.0", - "@parcel/watcher-win32-arm64": "2.6.0", - "@parcel/watcher-win32-x64": "2.6.0" - } - }, - "node_modules/jest-haste-map/node_modules/@parcel/watcher-android-arm64": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.6.0.tgz", - "integrity": "sha512-trgpLSCKRC/huFjXX/Smh+0sWe4+YtKfktIToiMl59ghz7z+qkH6kMvNnUbLyRs9N11t8l4svSCs1+5B3rOAhA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/jest-haste-map/node_modules/@parcel/watcher-darwin-arm64": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.6.0.tgz", - "integrity": "sha512-Y3QV0gl7Q1zbfueunkWIERICbEojQFCgpyG7YqOGNFLsckXyI1xu9mAIUpKY9QBYzBtSkN8dBPwd3yiAO9ovMw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/jest-haste-map/node_modules/@parcel/watcher-darwin-x64": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.6.0.tgz", - "integrity": "sha512-Ohv6OpzhUfKYD7Beb8kDvG0jbIxORCYY1JRdZnaBtnjjkJxgD7ZVL0nw2sCYd0yTMKTvz3nnTnOF3cDifK+kvw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/jest-haste-map/node_modules/@parcel/watcher-freebsd-x64": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.6.0.tgz", - "integrity": "sha512-5HmXvDgs8VK+74jF9y9/2FE3/OnlcKmc56tjmSrEuZjpSZOGL+fvAu+HKJBdPs9uwoP2hE6TlSUpXZ/C5jUFmQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/jest-haste-map/node_modules/@parcel/watcher-linux-arm-glibc": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.6.0.tgz", - "integrity": "sha512-Ps/hui3A+vMbjdqlqAowK2ZL8+BO8dBjxeWXj6npTBs3jx4wWmbPpaLuqwrQrSqIVMCnpWo238bJ1U37GhQOYg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/jest-haste-map/node_modules/@parcel/watcher-linux-arm-musl": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.6.0.tgz", - "integrity": "sha512-9c6AUHgHoG+IY88MRIHupztQiQnrbqHYQjkM2btA+Bf/wQnQMuiD0Wfk1EVv3TlNT3x41uU71rn6E4xh/+zvkw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/jest-haste-map/node_modules/@parcel/watcher-linux-arm64-glibc": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.6.0.tgz", - "integrity": "sha512-yHRqS2owEXe6Hic9z6Mh1ECsCd+ODVOGvZDyciqRd21+v+o+DnXMOrw50DSpIG2sb8GPEaPPmfeCAWKPJdq46g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/jest-haste-map/node_modules/@parcel/watcher-linux-arm64-musl": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.6.0.tgz", - "integrity": "sha512-WhB2e/V7rqdHHWZusBSPuy5Ei8S6lSz6FE5TKKQz5h3a0O+C+mhY7vxU9b/stqvMb8beLnPY82ZrFTLKs+SrKA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/jest-haste-map/node_modules/@parcel/watcher-linux-x64-glibc": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.6.0.tgz", - "integrity": "sha512-ulGE6x6Oz6iAwg75T8YQSoguBWasniIbX+QWpaYPcCnDOpdWX3k+4xbEYPZVLxOuoJI+svJJPD3sEj8G7lrQ3A==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/jest-haste-map/node_modules/@parcel/watcher-linux-x64-musl": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.6.0.tgz", - "integrity": "sha512-tkBYKt7YQrjIJWYDnto2YgO8MRkjlMTSNoRHzsXinBqbLdeOM3L32wPZJvIZxqaLMfSlS/4sUjH/6STVP/XDLw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/jest-haste-map/node_modules/@parcel/watcher-win32-arm64": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.6.0.tgz", - "integrity": "sha512-gIZAP23jaHjGWasY/TY6yL7NHFClf0Ga7FN+iINvk+KN94rhm94lYZhFsbYFNcA04/onvGD9kKmiJLJB2HbNwQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/jest-haste-map/node_modules/@parcel/watcher-win32-x64": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.6.0.tgz", - "integrity": "sha512-cA+/pXV2YkfxlIcXOQ5fSWqAzzPyD78/x5qbK/I0vUkrlYHA8TIz+MXjAbGouguKVSI4bOmkTSJ1/poVSsgt+A==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/jest-haste-map/node_modules/detect-libc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", - "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-haste-map/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/jest-haste-map/node_modules/picomatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", - "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/jest-leak-detector": { - "version": "30.5.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-30.5.1.tgz", - "integrity": "sha512-gt4GT2aWgEoCNTcBe4rqS74xTIUJxi+UD9SNSu9aOk5LmTEd6fS5KSTmAKAfitCCktQHNN+upUuL6EkBfFbMDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/get-type": "30.5.0", - "pretty-format": "30.5.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-matcher-utils": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.5.2.tgz", - "integrity": "sha512-lFkB365PTIHOhPzwrb9T6gvlDnPpOZ7/c3ewOKKB7bzztqjVrtlyRL2MkyfJXpyY2u2SKw001JKrTx14fBUFcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/get-type": "30.5.0", - "chalk": "^4.1.2", - "jest-diff": "30.5.2", - "pretty-format": "30.5.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-message-util": { - "version": "30.5.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.5.1.tgz", - "integrity": "sha512-UdQlLdd9wL/Ys7xRErckqwD6wPlSZYueosSWuHc1r2ztGLwlgPvtSJq2+BPEgaEY13WLvfFbmhTj8pba0Sd1jg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.27.1", - "@jest/types": "30.5.1", - "@types/stack-utils": "^2.0.3", - "chalk": "^4.1.2", - "graceful-fs": "^4.2.11", - "jest-util": "30.5.1", - "picomatch": "^4.0.3", - "pretty-format": "30.5.1", - "slash": "^3.0.0", - "stack-utils": "^2.0.6" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-message-util/node_modules/picomatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", - "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/jest-mock": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.5.2.tgz", - "integrity": "sha512-KTHb37Fhj8xY8qPFvTFaFJHcdsumQp+ExsUlgoX232Agmc706gagBs53+CYvulV7MVQo9AgXOUxsqzzVBoJlrA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/expect-utils": "30.5.2", - "@jest/types": "30.5.1", - "@types/node": "*", - "jest-util": "30.5.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-regex-util": { - "version": "30.5.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-30.5.0.tgz", - "integrity": "sha512-Mg0WK7A6xRHLSA1udJ8y9f3lM0uUhFTBnLKzwPmqB9AylvpleJ6BLemR8K9dK27DY+cesDryoA7yLZCAHsPG1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-resolve": { - "version": "30.5.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-30.5.1.tgz", - "integrity": "sha512-wprhLejRtwN6h8ZgaqC0eYjGJ1uMdGPT/+b3eFncbG4NWuuP9QL+vWwRinu9waw7hkOLcpMJGVJAMgBwsPssMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.2", - "graceful-fs": "^4.2.11", - "jest-haste-map": "30.5.1", - "jest-util": "30.5.1", - "jest-validate": "30.5.1", - "slash": "^3.0.0", - "unrs-resolver": "^1.12.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-resolve-dependencies": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-30.5.2.tgz", - "integrity": "sha512-GMI0DP5enX9Z2qW2zFy1bOkrCfWAOPRJQ7qHt0pdfrxBPsgWxglMPrRSK2TX/wRWYxcPRSLFg3Z88qPOzHx7FQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-regex-util": "30.5.0", - "jest-snapshot": "30.5.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-runner": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-30.5.2.tgz", - "integrity": "sha512-/B6px7hiiNhVSRwuv9AGn0nawYvwsHeQZ3ItTd5Gp2diFd0EOKaWVeWqcbw3L88vx1GfpCKjQkxWItZCTl11Rw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/console": "30.5.2", - "@jest/environment": "30.5.2", - "@jest/source-map": "30.5.2", - "@jest/test-result": "30.5.2", - "@jest/transform": "30.5.2", - "@jest/types": "30.5.1", - "@types/node": "*", - "chalk": "^4.1.2", - "emittery": "^0.13.1", - "exit-x": "^0.2.2", - "graceful-fs": "^4.2.11", - "jest-docblock": "30.5.0", - "jest-environment-node": "30.5.2", - "jest-haste-map": "30.5.1", - "jest-leak-detector": "30.5.1", - "jest-message-util": "30.5.1", - "jest-resolve": "30.5.1", - "jest-runtime": "30.5.2", - "jest-util": "30.5.1", - "jest-watcher": "30.5.2", - "jest-worker": "30.5.1", - "p-limit": "^3.1.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-runtime": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-30.5.2.tgz", - "integrity": "sha512-0paUAHBlheai10A3XSy9Xh+YBG0IROy+/qzcDPzQ/nbbXrznQzeWy5qniICWK6d3W3scaRQCVAbXdcK0ibBq4w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "30.5.2", - "@jest/fake-timers": "30.5.2", - "@jest/globals": "30.5.2", - "@jest/source-map": "30.5.2", - "@jest/test-result": "30.5.2", - "@jest/transform": "30.5.2", - "@jest/types": "30.5.1", - "@types/node": "*", - "chalk": "^4.1.2", - "cjs-module-lexer": "^2.2.0", - "collect-v8-coverage": "^1.0.2", - "es-module-lexer": "^2.1.0", - "glob": "^13.0.6", - "graceful-fs": "^4.2.11", - "jest-haste-map": "30.5.1", - "jest-message-util": "30.5.1", - "jest-mock": "30.5.2", - "jest-regex-util": "30.5.0", - "jest-resolve": "30.5.1", - "jest-snapshot": "30.5.2", - "jest-util": "30.5.1", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-runtime/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/jest-runtime/node_modules/brace-expansion": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", - "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/jest-runtime/node_modules/es-module-lexer": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz", - "integrity": "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-runtime/node_modules/glob": { - "version": "13.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", - "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "minimatch": "^10.2.2", - "minipass": "^7.1.3", - "path-scurry": "^2.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/jest-runtime/node_modules/minimatch": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", - "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.8" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/jest-snapshot": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-30.5.2.tgz", - "integrity": "sha512-jKIdes25AnAH73dOCi2qE6J6vHJ6L2vyBS11M89kT50DVJcLTf2AOjvcc+2vVaN8lUbY5v2R83aqXo3Ro9fqYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.27.4", - "@babel/generator": "^7.27.5", - "@babel/plugin-syntax-jsx": "^7.27.1", - "@babel/plugin-syntax-typescript": "^7.27.1", - "@babel/types": "^7.27.3", - "@jest/expect-utils": "30.5.2", - "@jest/get-type": "30.5.0", - "@jest/snapshot-utils": "30.5.1", - "@jest/transform": "30.5.2", - "@jest/types": "30.5.1", - "babel-preset-current-node-syntax": "^1.2.0", - "chalk": "^4.1.2", - "expect": "30.5.2", - "graceful-fs": "^4.2.11", - "jest-diff": "30.5.2", - "jest-matcher-utils": "30.5.2", - "jest-message-util": "30.5.1", - "jest-util": "30.5.1", - "pretty-format": "30.5.1", - "semver": "^7.7.2", - "synckit": "^0.11.8" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-snapshot/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/jest-util": { - "version": "30.5.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.5.1.tgz", - "integrity": "sha512-yKuxmNy2rSbTXw+3SIPanJo+nV4/BS1p26v44IYBFMsswSQySfMMcPHErnOncda7i9HEz0q605rIhSTBVgrZTg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "30.5.1", - "@types/node": "*", - "chalk": "^4.1.2", - "ci-info": "^4.2.0", - "graceful-fs": "^4.2.11", - "picomatch": "^4.0.3" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-util/node_modules/picomatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", - "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/jest-validate": { - "version": "30.5.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-30.5.1.tgz", - "integrity": "sha512-i/buJ56wTpxihE93hQYNMfdOThS87+HGvLZzZJmU4xggPcdTYQq051iwALLCHp3q+SkCGH+EFejQZz5EbBSkkg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/get-type": "30.5.0", - "@jest/types": "30.5.1", - "camelcase": "^6.3.0", - "chalk": "^4.1.2", - "leven": "^3.1.0", - "pretty-format": "30.5.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-validate/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-watcher": { - "version": "30.5.2", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-30.5.2.tgz", - "integrity": "sha512-rqRgg4R11GA9m1UsEZwQeixHsgZReCn6TOHAHtIH33yXrIvoX0OGPA20Yzzjkz7X40fZvcRSxEpQppYPcWzmcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/test-result": "30.5.2", - "@jest/types": "30.5.1", - "@types/node": "*", - "ansi-escapes": "^4.3.2", - "chalk": "^4.1.2", - "emittery": "^0.13.1", - "jest-util": "30.5.1", - "string-length": "^4.0.2" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-worker": { - "version": "30.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-30.5.1.tgz", - "integrity": "sha512-Cbxh5v7AoLuFRmFJSM4/aHdQ68rjXvUWr716EE0Dh3I7T+T/3FgFKhOERGXHcU2Meftq9+9zxPM3TSNyI9D+HA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "@ungap/structured-clone": "^1.3.0", - "jest-util": "30.5.1", - "merge-stream": "^2.0.0", - "supports-color": "^8.1.1" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, "node_modules/jiti": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz", @@ -9978,20 +7292,6 @@ "dev": true, "license": "MIT" }, - "node_modules/js-yaml": { - "version": "3.15.2", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.2.tgz", - "integrity": "sha512-6EuL879VkRA+1Cz578mKMiKvjPNEuk6+r1JaFzoSWejZmtf7xWbIyw1e3KkxlkzTIt9Taw6JBhEppG7utc1P+w==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/jsesc": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", @@ -10451,35 +7751,6 @@ "@jridgewell/sourcemap-codec": "^1.5.5" } }, - "node_modules/make-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/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/map-obj": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", @@ -10539,13 +7810,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true, - "license": "MIT" - }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -10668,30 +7932,6 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/napi-postinstall": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.7.tgz", - "integrity": "sha512-jyU4cU4kVAmy/3qjP+DcoQTNXfINHc+dFw54gGqWC8nu0mpV0kOnk7kff+J+Q18SbX0k3Np8Rm7yFjd3phatNQ==", - "dev": true, - "license": "MIT", - "bin": { - "napi-patch": "lib/patch.js", - "napi-postinstall": "lib/cli.js" - }, - "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/napi-postinstall" - } - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" - }, "node_modules/node-addon-api": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", @@ -10735,13 +7975,6 @@ "url": "https://opencollective.com/node-fetch" } }, - "node_modules/node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", - "dev": true, - "license": "MIT" - }, "node_modules/node-releases": { "version": "2.0.60", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.60.tgz", @@ -10782,19 +8015,6 @@ "node": ">=0.10.0" } }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/object-inspect": { "version": "1.13.4", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", @@ -10895,22 +8115,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "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", @@ -11101,29 +8305,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pirates": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", - "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/playwright": { "version": "1.64.1", "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.64.1.tgz", @@ -11263,35 +8444,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/pretty-format": { - "version": "30.5.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.5.1.tgz", - "integrity": "sha512-byhRAPguVKMQIj4kjJwJ5lAskVhfuiSdiYl/aLTWpgkGEmic2jYhJh1yE9ih8Ox44Xg9ccCT11/S6QrzSJuNrg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/react-is-18": "npm:react-is@^18.3.1", - "@jest/react-is-19": "npm:react-is@^19.2.5", - "@jest/schemas": "30.5.0", - "ansi-styles": "^5.2.0" - }, - "engines": { - "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/proto-list": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", @@ -11348,23 +8500,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/pure-rand": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-7.0.1.tgz", - "integrity": "sha512-oTUZM/NAZS8p7ANR3SHh30kXB+zK2r2BPcEn/awJIbOvq82WoMN4p62AWWp3Hhw50G0xMsw1mhIBLqHw64EcNQ==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/dubzzz" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" - } - ], - "license": "MIT" - }, "node_modules/quick-lru": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", @@ -11679,29 +8814,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "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/restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", @@ -12053,16 +9165,6 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "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/smob": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/smob/-/smob-1.6.1.tgz", @@ -12123,26 +9225,6 @@ "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==", "dev": true }, - "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/stack-utils": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", - "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/stop-iteration-iterator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", @@ -12166,20 +9248,6 @@ "safe-buffer": "~5.2.0" } }, - "node_modules/string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -12334,16 +9402,6 @@ "node": ">=8" } }, - "node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/strip-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-comments/-/strip-comments-2.0.1.tgz", @@ -12354,16 +9412,6 @@ "node": ">=10" } }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/strip-indent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", @@ -12376,19 +9424,6 @@ "node": ">=8" } }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/stubborn-fs": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/stubborn-fs/-/stubborn-fs-2.0.0.tgz", @@ -12430,22 +9465,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/synckit": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.13.tgz", - "integrity": "sha512-eNRKgb3z66Yp3D2CixVujOUvXLFUTij/zVnV8KRyvFdQwpz7I5DS8UfRkTeLzb64u+dkzDSdelE24izu+zSSUg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@pkgr/core": "^0.3.6" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/synckit" - } - }, "node_modules/systeminformation": { "version": "5.33.16", "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.33.16.tgz", @@ -12563,60 +9582,6 @@ "source-map": "^0.6.0" } }, - "node_modules/test-exclude": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.2.tgz", - "integrity": "sha512-u9E6A+ZDYdp7a4WnarkXPZOx8Ilz46+kby6p1yZ8zsGTz9gYa6FIS7lj2oezzNKmtdyyJNNmmXDppga5GB7kSw==", - "dev": true, - "license": "ISC", - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^10.4.1", - "minimatch": "^10.2.2" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/test-exclude/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", - "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/test-exclude/node_modules/minimatch": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", - "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.8" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/text-segmentation": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.3.tgz", @@ -12677,16 +9642,6 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/type-fest": { "version": "0.21.3", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", @@ -12868,44 +9823,6 @@ "node": ">= 10.0.0" } }, - "node_modules/unrs-resolver": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.12.2.tgz", - "integrity": "sha512-dmlRxBJJayXjqTwC+JtF1HhJmgf3ftQ3YejFcZrf4+KKtJv0qDsK1pjqaaVjG7wJ5NJ6UVP1OqRMQ71Z4C3rxQ==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "napi-postinstall": "^0.3.4" - }, - "funding": { - "url": "https://opencollective.com/unrs-resolver" - }, - "optionalDependencies": { - "@unrs/resolver-binding-android-arm-eabi": "1.12.2", - "@unrs/resolver-binding-android-arm64": "1.12.2", - "@unrs/resolver-binding-darwin-arm64": "1.12.2", - "@unrs/resolver-binding-darwin-x64": "1.12.2", - "@unrs/resolver-binding-freebsd-x64": "1.12.2", - "@unrs/resolver-binding-linux-arm-gnueabihf": "1.12.2", - "@unrs/resolver-binding-linux-arm-musleabihf": "1.12.2", - "@unrs/resolver-binding-linux-arm64-gnu": "1.12.2", - "@unrs/resolver-binding-linux-arm64-musl": "1.12.2", - "@unrs/resolver-binding-linux-loong64-gnu": "1.12.2", - "@unrs/resolver-binding-linux-loong64-musl": "1.12.2", - "@unrs/resolver-binding-linux-ppc64-gnu": "1.12.2", - "@unrs/resolver-binding-linux-riscv64-gnu": "1.12.2", - "@unrs/resolver-binding-linux-riscv64-musl": "1.12.2", - "@unrs/resolver-binding-linux-s390x-gnu": "1.12.2", - "@unrs/resolver-binding-linux-x64-gnu": "1.12.2", - "@unrs/resolver-binding-linux-x64-musl": "1.12.2", - "@unrs/resolver-binding-openharmony-arm64": "1.12.2", - "@unrs/resolver-binding-wasm32-wasi": "1.12.2", - "@unrs/resolver-binding-win32-arm64-msvc": "1.12.2", - "@unrs/resolver-binding-win32-ia32-msvc": "1.12.2", - "@unrs/resolver-binding-win32-x64-msvc": "1.12.2" - } - }, "node_modules/upath": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", @@ -13013,21 +9930,6 @@ "base64-arraybuffer": "^1.0.2" } }, - "node_modules/v8-to-istanbul": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", - "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", - "dev": true, - "license": "ISC", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^2.0.0" - }, - "engines": { - "node": ">=10.12.0" - } - }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -13666,33 +10568,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/write-file-atomic": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", - "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/write-file-atomic/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/xdg-basedir": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz", @@ -13781,19 +10656,6 @@ "engines": { "node": ">=12" } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } } } } diff --git a/package.json b/package.json index c86d80ed9..e0eb04d40 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,6 @@ "@tailwindcss/typography": "^0.5.20", "autoprefixer": "^10.6.1", "daisyui": "^5.7.50", - "jest": "^30.5.2", "postcss": "^8.5.31", "tailwindcss": "^4.3.3", "workbox-cli": "^7.4.1" @@ -16,7 +15,6 @@ "html2canvas": "^1.4.1" }, "scripts": { - "test": "jest", "test:gridstack-parity": "playwright test test/browser/dashboard-grid-parity.spec.js --reporter=line" }, "overrides": { From f3a3a9ce89902ac05bfda67b9a43dc1e62f1ce8d Mon Sep 17 00:00:00 2001 From: Anthony Alaribe Date: Mon, 26 Oct 2026 17:35:20 +0100 Subject: [PATCH 018/201] Add RUM audience breakdowns and reusable segments (#740) * Highlight the selected visualization tab with brand colors * Add RUM audience breakdowns, investigation filters, and saved segments * Declare form decoding dependency for integration tests * Check expanded RUM templates for query scoping * Supply required summaries in RUM browser fixtures * Prepare shared npm dependencies before parallel CI lanes * Target the segment disclosure explicitly in browser coverage --- ci/checks.tsv | 2 + e2e/playwright.config.ts | 4 +- e2e/tests/rum-audience.spec.ts | 62 +++++ monoscope.cabal | 6 + package.yaml | 1 + scripts/ci/ci.sh | 32 ++- src/Pages/Charts/Charts.hs | 6 +- src/Pages/Dashboards.hs | 32 +-- src/Pages/Rum.hs | 88 +++++++ src/Pkg/Components/LogQueryBox.hs | 2 +- src/Pkg/Components/Widget.hs | 16 +- src/Pkg/Parser.hs | 7 + src/Pkg/Rum.hs | 93 ++++++++ src/Web/Routes.hs | 7 + static/migrations/0254_rum_segments.sql | 6 + static/public/assets/css/tailwind.css | 37 +++ static/public/dashboards/rum.yaml | 221 +++++++++++++++--- .../integration/Pages/DashboardWidgetsSpec.hs | 58 ++++- test/unit/Models/DashboardTemplatesSpec.hs | 5 +- 19 files changed, 620 insertions(+), 65 deletions(-) create mode 100644 e2e/tests/rum-audience.spec.ts create mode 100644 src/Pages/Rum.hs create mode 100644 src/Pkg/Rum.hs create mode 100644 static/migrations/0254_rum_segments.sql diff --git a/ci/checks.tsv b/ci/checks.tsv index 272160e71..306948386 100644 --- a/ci/checks.tsv +++ b/ci/checks.tsv @@ -16,6 +16,8 @@ # # Narrow `inputs` only where it is provably sound. A too-wide set costs a rerun; # a too-narrow one ships an untested change. +# Parallel integration, UI, and e2e lanes share dependency installs prepared by +# the runner before launch; each check still declares its own source inputs. frontend node @fe @uisrc build ghc @hs @fe doctests ghc @hs @fe diff --git a/e2e/playwright.config.ts b/e2e/playwright.config.ts index 2adc7700c..480151656 100644 --- a/e2e/playwright.config.ts +++ b/e2e/playwright.config.ts @@ -18,7 +18,7 @@ export default defineConfig({ trace: "on-first-retry", }, projects: [ - { name: "chromium", use: { ...devices["Desktop Chrome"] }, testIgnore: /(container-identity|endpoint-analytics|host-map|infrastructure-time-window|metric-exemplars|metrics-catalog|tabs)\.spec\.ts$/ }, - { name: "chromium-fixtures", use: { ...devices["Desktop Chrome"] }, testMatch: /(container-identity|endpoint-analytics|host-map|infrastructure-time-window|metric-exemplars|metrics-catalog|tabs)\.spec\.ts$/, dependencies: ["chromium"], workers: 1 }, + { name: "chromium", use: { ...devices["Desktop Chrome"] }, testIgnore: /(container-identity|endpoint-analytics|host-map|infrastructure-time-window|metric-exemplars|metrics-catalog|tabs|rum-audience)\.spec\.ts$/ }, + { name: "chromium-fixtures", use: { ...devices["Desktop Chrome"] }, testMatch: /(container-identity|endpoint-analytics|host-map|infrastructure-time-window|metric-exemplars|metrics-catalog|tabs|rum-audience)\.spec\.ts$/, dependencies: ["chromium"], workers: 1 }, ], }); diff --git a/e2e/tests/rum-audience.spec.ts b/e2e/tests/rum-audience.spec.ts new file mode 100644 index 000000000..6f825e694 --- /dev/null +++ b/e2e/tests/rum-audience.spec.ts @@ -0,0 +1,62 @@ +import { test, expect } from "@playwright/test"; +import { DEMO_PROJECT, sql } from "./helpers"; + +test("audience groups filter sessions, search users, and persist named segments", async ({ page }) => { + const app = `e2e-rum-audience-${Date.now()}`; + const segment = `${app} Mobile Safari`; + const cleanup = () => sql(`DELETE FROM otel_logs_and_spans WHERE project_id='${DEMO_PROJECT}' AND resource___service___name='${app}'; DELETE FROM projects.rum_segments WHERE project_id='${DEMO_PROJECT}' AND name='${segment}';`); + sql(`INSERT INTO otel_logs_and_spans (project_id,summary,name,timestamp,start_time,end_time,resource___service___name,resource___user_agent___original,attributes___session___id,attributes___user___id,attributes___user___email,attributes___exception___type) + VALUES + ('${DEMO_PROJECT}',ARRAY['RUM audience'],'documentLoad',now(),now(),now(),'${app}','iPhone Mobile Safari/604','${app}-alice','alice','alice@example.com',NULL), + ('${DEMO_PROJECT}',ARRAY['RUM audience'],'browser error',now(),now(),now(),'${app}','iPhone Mobile Safari/604','${app}-alice','alice','alice@example.com','TypeError'), + ('${DEMO_PROJECT}',ARRAY['RUM audience'],'documentLoad',now(),now(),now(),'${app}','Windows Chrome/151 Safari/537','${app}-bob','bob','bob@example.com',NULL), + ('${DEMO_PROJECT}',ARRAY['RUM audience'],'documentLoad',now(),now(),now(),'${app}',NULL,'${app}-anonymous',NULL,NULL,NULL);`); + try { + const errors: string[] = []; + page.on("pageerror", error => errors.push(error.message)); + page.on("console", message => { if (message.type() === "error" && /SyntaxError|parse error/i.test(message.text())) errors.push(message.text()); }); + await page.goto(`/p/${DEMO_PROJECT}/rum?tab=audience&var-app=${app}&since=1H`); + const toolbar = page.locator("#rum-segments"); + await expect(toolbar.getByRole("link", { name: "View sessions", exact: true })).toBeVisible(); + const browsers = page.getByRole("table").filter({ has: page.getByRole("columnheader", { name: "Browser", exact: true }) }); + const systems = page.getByRole("table").filter({ has: page.getByRole("columnheader", { name: "Operating system", exact: true }) }); + await expect(browsers.getByText("Unknown", { exact: true })).toBeVisible(); + await expect(browsers.locator("tbody tr").filter({ hasText: "Safari" })).toContainText("100 %"); + for (const width of [1920, 1280, 390]) { + await page.setViewportSize({ width, height: 1000 }); + await expect.poll(async () => { + const [browser, system] = await Promise.all([browsers.boundingBox(), systems.boundingBox()]); + return !!browser && !!system && (width === 1920 ? Math.abs(browser.y - system.y) < 3 : system.y > browser.y + browser.height); + }).toBe(true); + for (const table of [browsers, systems]) { + expect(await table.evaluate(el => el.getBoundingClientRect().right <= innerWidth && el.scrollWidth <= el.clientWidth + 1)).toBe(true); + } + } + await page.setViewportSize({ width: 1280, height: 1000 }); + await page.locator("[data-widget]").filter({ has: page.getByText("Identified users", { exact: true }) }).scrollIntoViewIfNeeded(); + const users = page.getByRole("table").filter({ has: page.getByRole("columnheader", { name: "User", exact: true }) }); + await expect(users.getByRole("link", { name: "alice@example.com" })).toBeVisible(); + await page.getByRole("searchbox", { name: "Search Identified users" }).fill("bob"); + await expect(users.locator("tbody tr").filter({ visible: true })).toHaveCount(1); + await expect(users.locator("tbody tr").filter({ visible: true })).toContainText("bob@example.com"); + await page.getByRole("searchbox", { name: "Search Identified users" }).fill(""); + await expect(users.locator("tbody tr").filter({ visible: true })).toHaveCount(2); + const safari = browsers.locator("tbody tr").filter({ hasText: "Safari" }); + await safari.focus(); + await safari.press("Enter"); + await expect(page).toHaveURL(/var-browser=Safari/); + await toolbar.locator("summary").filter({ hasText: "Save segment" }).click(); + await toolbar.getByLabel("Segment name").fill(segment); + await toolbar.getByRole("button", { name: "Save segment", exact: true }).click(); + await expect(toolbar.getByRole("link", { name: segment, exact: true })).toBeVisible(); + await page.reload(); + await expect(toolbar.getByRole("link", { name: segment, exact: true })).toBeVisible(); + await toolbar.getByRole("link", { name: "View errors", exact: true }).click(); + await expect(page).toHaveURL(/\/tab\/errors/); + await expect(page).toHaveURL(/var-browser=Safari/); + await toolbar.getByRole("link", { name: "View sessions", exact: true }).click(); + await expect(page).toHaveURL(/viz_type=sessions/); + expect(new URL(page.url()).searchParams.get("query")).toContain("Safari/"); + expect(errors).toEqual([]); + } finally { cleanup(); } +}); diff --git a/monoscope.cabal b/monoscope.cabal index 8c712899d..5f0710fae 100644 --- a/monoscope.cabal +++ b/monoscope.cabal @@ -269,6 +269,7 @@ extra-source-files: static/migrations/0252_project_memory_page_identity.sql static/migrations/0253_project_memory_legacy_writes.sql static/migrations/0254_ingest_sampling.sql + static/migrations/0254_rum_segments.sql test/fixtures/github-app-test.pem test/fixtures/wiki-browser.mjs static/public/assets/web-components/dist/manifest.json @@ -380,6 +381,7 @@ library Pages.Projects Pages.Replay Pages.Reports + Pages.Rum Pages.ServiceMap Pages.Settings Pages.Share @@ -413,6 +415,7 @@ library Pkg.Prometheus Pkg.QueryCache Pkg.Queue + Pkg.Rum Pkg.Sampling Pkg.SchemaLearning.Catalog Pkg.SchemaLearning.Hot @@ -895,6 +898,7 @@ test-suite integration-tests , hs-opentelemetry-instrumentation-auto , hs-opentelemetry-instrumentation-hasql , hspec + , http-api-data , http-client , http-client-tls , http-types @@ -1025,6 +1029,7 @@ test-suite test-dev Pages.Projects Pages.Replay Pages.Reports + Pages.Rum Pages.ServiceMap Pages.Settings Pages.Share @@ -1058,6 +1063,7 @@ test-suite test-dev Pkg.Prometheus Pkg.QueryCache Pkg.Queue + Pkg.Rum Pkg.Sampling Pkg.SchemaLearning.Catalog Pkg.SchemaLearning.Hot diff --git a/package.yaml b/package.yaml index 420c91a9f..dd2281e47 100644 --- a/package.yaml +++ b/package.yaml @@ -296,6 +296,7 @@ tests: - unix - lucid - http-types + - http-api-data - wai - wai-extra - unordered-containers diff --git a/scripts/ci/ci.sh b/scripts/ci/ci.sh index 7ec498228..e120449d4 100755 --- a/scripts/ci/ci.sh +++ b/scripts/ci/ci.sh @@ -332,9 +332,17 @@ CABAL_OPTS="--ghc-options=-O0 -j$CI_CORES +RTS -A64m -n2m -RTS" CABAL_FLAGS='-f-devtest' prepare_browser() { + [ "${CI_BROWSER_PREPARED:-}" != true ] || return 0 (cd e2e && npm ci --prefer-offline --no-audit && \ { [ -e /usr/local/share/monoscope-playwright-deps ] || npx playwright install-deps chromium; } && \ npx playwright install chromium) + export CI_BROWSER_PREPARED=true +} + +prepare_web_deps() { + [ "${CI_WEB_DEPS_PREPARED:-}" != true ] || return 0 + (cd web-components && npm ci --prefer-offline --no-audit) + export CI_WEB_DEPS_PREPARED=true } run_body() { # @@ -384,7 +392,7 @@ run_body() { # ;; release-tests) node --test scripts/ci/release-test.mjs ;; hlint) hlint -j src/ shared/src cli ;; - ui-tests) (cd web-components && npm ci --prefer-offline --no-audit && npm test) ;; + ui-tests) prepare_web_deps; (cd web-components && npm test) ;; # Drives the real server in a real browser. scripts/e2e.sh starts that server itself on # 8081 against a throwaway database, so this only has to supply the binary and chromium. e2e) @@ -410,7 +418,7 @@ run_integration() { # reached under CI_ALLOW_DEGRADED — cmd_run refuses this check otherwise. case " ${CAPS:-} " in *" tf-real "*) ;; *) unset TIMEFUSION_PG_TEST_URL ;; esac export USE_EXTERNAL_DB=true LOG_LEVEL=${LOG_LEVEL:-warn} - (cd web-components && npm ci --prefer-offline --no-audit) + prepare_web_deps prepare_browser make build-chart-cli [ -n "${CI_INTEGRATION_BIN:-}" ] || cabal build integration-tests -j $CABAL_FLAGS "$CABAL_OPTS" @@ -484,6 +492,11 @@ stop_early() { [ "$1" -ne 0 ] && [ "${CI_KEEP_GOING:-}" != true ]; } # Background lanes live in $BG_DIR as .{pid,log,result}. start_background() { # + # npm ci removes node_modules: finish installs before any parallel consumer. + case "$1" in + integration-tests) prepare_web_deps; prepare_browser ;; + e2e) prepare_browser ;; + esac CI_ATTEST_OUT="$BG_DIR/$1.result" "$0" run "$1" > "$BG_DIR/$1.log" 2>&1 & echo $! > "$BG_DIR/$1.pid" } @@ -1013,6 +1026,21 @@ cmd_selftest() { assert "background failure propagates" 1 "$body_rc" assert "background diagnostics retained" yes "$([ -f "$BG_DIR/failing.log" ] && echo yes || echo no)" rm -rf "$BG_DIR" + BG_DIR=$(mktemp -d -t ci-selftest-browser.XXXXXX) + printf '#!/bin/sh\necho install >> "%s/calls"\n' "$BG_DIR" > "$BG_DIR/npm" + printf '#!/bin/sh\nexit 0\n' > "$BG_DIR/npx" + chmod +x "$BG_DIR/npm" "$BG_DIR/npx" + ( + export PATH="$BG_DIR:$PATH" + unset CI_BROWSER_PREPARED CI_WEB_DEPS_PREPARED + prepare_browser + prepare_web_deps + prepare_browser & browser_one=$! + prepare_web_deps & browser_two=$! + wait "$browser_one" "$browser_two" + ) + assert "parallel lanes install each dependency tree once" 2 "$(wc -l < "$BG_DIR/calls" | tr -d ' ')" + rm -rf "$BG_DIR" # kafka-topics.sh under macOS /bin/bash 3.2 with no SASL user: an empty array under # `set -u` killed it silently (2026-10-20). A stub rpk records what it was asked to do. # Only bash < 4.4 reproduces the bug, so on Linux CI this checks the happy path alone. diff --git a/src/Pages/Charts/Charts.hs b/src/Pages/Charts/Charts.hs index 0cdaeae2f..6f8e140ee 100644 --- a/src/Pages/Charts/Charts.hs +++ b/src/Pages/Charts/Charts.hs @@ -183,7 +183,7 @@ runQueryAST authCtx dbSource respDataType pid source binDensity environment serv case querySQLM of Just querySQL - | Just message <- rawSqlScopeError environment service querySQL -> + | Just message <- rawSqlScopeError environment service (fillQueryTemplate mappngSQL querySQL) -> pure (emptyMetricsFor now fromD toD){error = Just message} Just querySQL -> do let tbl = sourceTable source @@ -223,7 +223,7 @@ runRawQuery authCtx dbSource decoder cfg ast kql template mapping liveRange prog (from, to) = bounds canonical = M.fromList [("query_ast_filters", rawAstFilters cacheCfg components)] - <> variablePresets cfg.binDensity cfg.pid.toText from to [] cfg.currentTime + <> variablePresets cfg.binDensity cfg.pid.toText from to [(key, Just value) | (key, value) <- M.toList mapping, "var-" `T.isPrefixOf` key || key == "table-search"] cfg.currentTime <> mapping sql = fillQueryTemplate canonical template fetch = liftIO $ fetchMetricsDataWithProgress progress decoder sql cfg.currentTime from to authCtx dbSource >>= either throwIO pure @@ -755,7 +755,7 @@ queryMetricsStream dbSource dataTypeM pidM queryM querySQLM sinceM fromM toM sou maybe (first queryErrorText $ parseQueryDiagnosed source $ fillQueryTemplate mappingKQL $ maybeToMonoid $ Utils.nonEmptyT queryM) Left - (raw >>= rawSqlScopeError environment service) + (raw >>= rawSqlScopeError environment service . fillQueryTemplate mapping) scope = mkScopedQuery pid (fromD, toD) environment service cfg = (applyScopedQuery scope $ defSqlQueryCfg pid now source Nothing){binDensity = density, targetsTimefusion = usesTimefusionBackend authCtx.env.enableTimefusionReads dbSource} run emit = case parsed of diff --git a/src/Pages/Dashboards.hs b/src/Pages/Dashboards.hs index 71d24ae37..3e68f8aae 100644 --- a/src/Pages/Dashboards.hs +++ b/src/Pages/Dashboards.hs @@ -105,6 +105,7 @@ import Pages.GitSync qualified as GitSyncPage import Pages.Issues qualified as IssuesPage import Pages.LogExplorer.LogItem qualified as LogItem import Pages.Monitors qualified as Alerts +import Pages.Rum qualified as Rum import Pkg.Components.LogQueryBox (LogQueryBoxConfig (..), logQueryBox_) import Pkg.Components.ServiceMap (endpointDependencyMapPanel_) import Pkg.Components.Table (Table (..)) @@ -115,6 +116,7 @@ import Pkg.DeriveUtils (UUIDId (..), WrappedEnumSC (..), assetUrl, bulkActionSlu import Pkg.Metrics qualified as Metrics import Pkg.Parser (QueryComponents (..), SqlQueryCfg (..), applyScopedQuery, binDensityFor, browserKql, constantToKQLList, constantToSQLList, defSqlQueryCfg, fillQueryTemplate, fixedUTCTime, mkScopedQuery, parseQueryToComponents, variablePresetsKQL) import Pkg.Parser.Expr (sqlStringLit) +import Pkg.Rum qualified import Pkg.SchemaLearning.Catalog qualified as Catalog import Relude hiding (ask) import Servant (NoContent (..), ServerError, err302, err400, err404, errBody, errHeaders) @@ -328,7 +330,7 @@ dashboardPage_ pid dashId dash dashVM allParams = do dashboardTabStrip_ pidText dashIdText activeTabIdx tabs queryStr [] -- Variables section (pushed to the right, collapsible on mobile) - whenJust dash.variables \variables -> dashboardVariables_ pid dashId (isJust dash.tabs) variables [] + whenJust dash.variables \_ -> dashboardVariables_ pid dashId (isJust dash.tabs) (Rum.variablesForTab dash renderTabSlug) [] let widgetOrderUrl = "/p/" <> pidText <> "/dashboards/" <> dashIdText <> "/widgets_order" <> maybe "" ("?tab=" <>) renderTabSlug constants = constantsJson allParams @@ -347,11 +349,14 @@ dashboardPage_ pid dashId dash dashVM allParams = do -- Tab system with htmx lazy loading - only render active tab content. -- Grid re-init after a swap is the document-level listener's job (see this page's script). div_ - [ class_ "dashboard-tabs-container" - , id_ "dashboard-tabs-content" - , data_ "constants" constants - ] - $ whenJust (tabs !!? activeTabIdx) \activeTab -> + ( [ class_ "dashboard-tabs-container" + , id_ "dashboard-tabs-content" + , data_ "constants" constants + ] + <> [data_ "rum-audience" "" | dash.file == Just "rum.yaml" && renderTabSlug == Just "audience"] + ) + $ whenJust (tabs !!? activeTabIdx) \activeTab -> do + when (dash.file == Just "rum.yaml" && slugify activeTab.name `elem` ["audience", "errors"]) $ Rum.segmentToolbar_ pid allParams -- An unanswered required variable IS the tab's content, not a modal over -- it. Rendering the widgets underneath meant every one of them ran with -- the variable interpolated to '' and reported "no data in the selected @@ -452,7 +457,7 @@ dashboardPage_ pid dashId dash dashVM allParams = do animate: false, columnOpts: { breakpointForWindow: false, - breakpoints: [{w: 800, c: 6}, {w: 400, c: 1}], + breakpoints: gridEl.closest('[data-rum-audience]') ? [{w: 1500, c: 1}] : [{w: 800, c: 6}, {w: 400, c: 1}], layout: 'list' }, }, gridEl); @@ -512,7 +517,7 @@ dashboardPage_ pid dashId dash dashVM allParams = do animate: false, columnOpts: { breakpointForWindow: false, - breakpoints: [{w: 600, c: 6}, {w: 400, c: 1}], + breakpoints: nestedEl.closest('[data-rum-audience]') ? [{w: 600, c: 6}, {w: 320, c: 1}] : [{w: 600, c: 6}, {w: 400, c: 1}], layout: 'list' }, }, nestedEl); @@ -1255,7 +1260,7 @@ dashboardGetH pid dashId fileM fromDStr toDStr sinceStr hxRequest allParams = do (dashVM, dash) <- getDashAndVM pid dashId fileM -- Deep links to a widget must open its tab, rather than the default tab. - case (join (lookup "expand" allParams) >>= \wid -> fst =<< findWidgetInDashboard wid dash) <|> (slugify . (.name) <$> (dash.tabs >>= viaNonEmpty head)) of + case (join (lookup "expand" allParams) >>= \wid -> fst =<< findWidgetInDashboard wid dash) <|> (join (lookup "tab" allParams) >>= \slug -> slug <$ findTabBySlug (fold dash.tabs) slug) <|> (slugify . (.name) <$> (dash.tabs >>= viaNonEmpty head)) of Just tabSlug -> do let redirectUrl = "/p/" <> pid.toText <> "/dashboards/" <> dashId.toText <> "/tab/" <> tabSlug <> queryStringFrom allParams throwError $ err302{errHeaders = [("Location", encodeUtf8 redirectUrl)]} @@ -2278,7 +2283,7 @@ rumRedirectH pid segments params = case (filter (not . T.null) segments, param " where param k = join $ lookup k params dashboard = entrypointRedirectGetH "rum.yaml" "Real User Monitoring" ["rum", "browser", "frontend", "web-vitals"] pid params - query = maybe browserKql (("attributes.session.id == " <>) . kqlQuoted) (param "session") + query = T.intercalate " and " $ filter (not . T.null) [maybe browserKql (("attributes.session.id == " <>) . kqlQuoted) (param "session"), Pkg.Rum.audienceKql $ Pkg.Rum.audienceFilters params] sessions = pure $ addHeader (timeScopedUrl ("/p/" <> pid.toText <> "/log_explorer") [("viz_type", "sessions"), ("query", query)] (param "from") (param "to") (param "since")) NoContent @@ -2805,15 +2810,16 @@ dashboardTabGetH pid dashId tabSlug fileM fromDStr toDStr sinceStr hxRequest hxT queryStr = queryStringFrom $ filter (\(k, _) -> k `notElem` [activeTabSlugKey, "expand"]) paramsWithTab fragment = do dashboardTabStrip_ pid.toText dashId.toText activeTabIdx (fold dash''.tabs) queryStr [hxSwapOob_ "outerMorph"] - when (hxTriggerName == Just "dashboard-variable-option") - $ whenJust dash''.variables \variables -> dashboardVariables_ pid dashId True variables [hxSwapOob_ "true"] - div_ [class_ "dashboard-tabs-container", id_ "dashboard-tabs-content", data_ "constants" $ constantsJson paramsWithTab] + when (hxTriggerName == Just "dashboard-variable-option" || dash''.file == Just "rum.yaml") + $ whenJust dash''.variables \_ -> dashboardVariables_ pid dashId True (Rum.variablesForTab dash'' $ Just tabSlug) [hxSwapOob_ "true"] + div_ ([class_ "dashboard-tabs-container", id_ "dashboard-tabs-content", data_ "constants" $ constantsJson paramsWithTab] <> [data_ "rum-audience" "" | dash''.file == Just "rum.yaml" && tabSlug == "audience"]) $ case findVarToPrompt (snd <$> activeTabInfo) (fold dash''.variables) of Just v -> do whenJust activeTabName breadcrumbSuffixOob_ variablePickerModal_ pid dashId (Just tabSlug) paramsWithTab v Nothing -> whenJust (dash''.tabs >>= (!!? activeTabIdx)) \activeTab -> do breadcrumbSuffixOob_ activeTab.name + when (dash''.file == Just "rum.yaml" && tabSlug `elem` ["audience", "errors"]) $ Rum.segmentToolbar_ pid paramsWithTab widgetCanvas_ pid ("tab-panel-" <> dashId.toText <> "-" <> show activeTabIdx) activeTab.widgets addRespHeaders $ navigationResponse hxRequest page fragment diff --git a/src/Pages/Rum.hs b/src/Pages/Rum.hs new file mode 100644 index 000000000..e119f7206 --- /dev/null +++ b/src/Pages/Rum.hs @@ -0,0 +1,88 @@ +module Pages.Rum (SegmentForm (..), segmentsGetH, segmentsPostH, segmentsDeleteH, segmentToolbar_, variablesForTab) where + +import Data.Effectful.Hasql qualified as Hasql +import Data.List (lookup) +import Data.Text qualified as T +import Effectful.Error.Static (throwError) +import Hasql.Interpolate qualified as HI +import Lucid +import Lucid.Aria qualified as Aria +import Lucid.Htmx +import Models.Projects.Dashboards qualified as Dashboards +import Models.Projects.Projects qualified as Projects +import Pkg.Rum (AudienceFilters (..), audienceFilters, audienceParams) +import Relude +import Servant (err400, errBody) +import System.Types +import Utils (faSprite_, queryStringFrom, toUriStr) +import Web.FormUrlEncoded (FromForm (..), parseUnique) + + +data SegmentForm = SegmentForm {name :: Text, filters :: AudienceFilters} + deriving stock (Generic, Show) + + +instance FromForm SegmentForm where + fromForm form = SegmentForm <$> parseUnique "name" form <*> fromForm form + + +variablesForTab :: Dashboards.Dashboard -> Maybe Text -> [Dashboards.Variable] +variablesForTab dash tab = filter (\v -> dash.file /= Just "rum.yaml" || tab == Just "audience" || tab == Just "errors" || v.key == "app") $ fold dash.variables + + +segmentToolbar_ :: Projects.ProjectId -> [(Text, Maybe Text)] -> Html () +segmentToolbar_ pid params = + div_ + [ id_ "rum-segments" + , hxGet_ $ "/p/" <> pid.toText <> "/rum/segments" <> queryStringFrom params + , hxTrigger_ "load, update-query from:window" + , hxVals_ "js:{...Object.fromEntries(new URLSearchParams(location.search))}" + , hxSwap_ "innerHTML" + , class_ "px-4 py-2 border-b border-strokeWeak" + ] + mempty + + +segmentsGetH :: Projects.ProjectId -> [(Text, Maybe Text)] -> ATAuthCtx (RespHeaders (Html ())) +segmentsGetH pid params = do + _ <- Projects.sessionAndProject pid + segments <- Hasql.interp @[(Text, HI.AsJsonb AudienceFilters)] [HI.sql|SELECT name, filters FROM projects.rum_segments WHERE project_id = #{pid} ORDER BY name|] + let current = audienceFilters params + root = "/p/" <> pid.toText <> "/rum" + window = filter (\(key, _) -> key `elem` ["from", "to", "since", "environment"]) params + tab = [("tab", Just $ fromMaybe "audience" $ join (lookup "activeTabSlug" params) <|> join (lookup "tab" params))] + addRespHeaders $ div_ [class_ "flex flex-wrap items-center gap-x-4 gap-y-2 text-sm"] do + nav_ [Aria.label_ "Saved audience segments", class_ "flex flex-wrap items-center gap-2"] do + span_ [class_ "text-textWeak"] "Segments" + forM_ segments \(name, HI.AsJsonb filters) -> do + a_ [href_ $ root <> queryStringFrom (tab <> audienceParams filters <> window), class_ $ "rounded px-2 py-1 hover:bg-fillWeak " <> if filters == current then "bg-fillBrand-weak text-textBrand font-semibold" else "text-textStrong"] $ toHtml name + button_ [type_ "button", class_ "btn btn-ghost btn-xs", Aria.label_ $ "Delete segment " <> name, hxDelete_ $ root <> "/segments/" <> toUriStr name <> queryStringFrom params, hxTarget_ "#rum-segments", hxSwap_ "innerHTML"] $ faSprite_ "xmark" "regular" "h-3 w-3" + details_ [class_ "relative"] do + summary_ [class_ "cursor-pointer text-textBrand"] "Save segment" + form_ [class_ "absolute z-20 mt-2 p-3 w-64 rounded-lg border border-strokeWeak bg-bgRaised shadow-lg flex flex-col gap-3", hxPost_ $ root <> "/segments" <> queryStringFrom params, hxTarget_ "#rum-segments", hxSwap_ "innerHTML"] do + label_ [class_ "flex flex-col gap-1"] do + "Segment name" + input_ [name_ "name", required_ "", maxlength_ "100", class_ "input input-sm w-full", placeholder_ "Mobile Safari"] + forM_ ([("app", current.app), ("browser", current.browser), ("os", current.os), ("device", current.device), ("errored", Just $ if current.errored then "true" else "false")] :: [(Text, Maybe Text)]) \(key, value) -> input_ [type_ "hidden", name_ key, value_ $ fromMaybe "" value] + button_ [type_ "submit", class_ "btn btn-primary btn-sm"] "Save segment" + a_ [class_ "text-textBrand hover:underline", href_ $ root <> "/sessions" <> queryStringFrom (audienceParams current <> window)] "View sessions" + a_ [class_ "text-textBrand hover:underline", href_ $ root <> queryStringFrom ([("tab", Just "errors")] <> audienceParams current <> window)] "View errors" + when (any isJust [current.app, current.browser, current.os, current.device] || current.errored) + $ a_ [class_ "text-textWeak hover:underline", href_ $ root <> queryStringFrom (tab <> window)] "Clear filters" + + +segmentsPostH :: Projects.ProjectId -> [(Text, Maybe Text)] -> SegmentForm -> ATAuthCtx (RespHeaders (Html ())) +segmentsPostH pid params form = do + _ <- Projects.sessionAndProject pid + let name = T.strip form.name + filters = audienceFilters $ audienceParams form.filters + when (T.null name || T.length name > 100) $ throwError err400{errBody = "Segment name must contain 1–100 characters."} + Hasql.interpExecute_ [HI.sql|INSERT INTO projects.rum_segments (project_id, name, filters) VALUES (#{pid}, #{name}, #{HI.AsJsonb filters}) ON CONFLICT (project_id, name) DO UPDATE SET filters = EXCLUDED.filters|] + segmentsGetH pid params + + +segmentsDeleteH :: Projects.ProjectId -> Text -> [(Text, Maybe Text)] -> ATAuthCtx (RespHeaders (Html ())) +segmentsDeleteH pid name params = do + _ <- Projects.sessionAndProject pid + Hasql.interpExecute_ [HI.sql|DELETE FROM projects.rum_segments WHERE project_id = #{pid} AND name = #{name}|] + segmentsGetH pid params diff --git a/src/Pkg/Components/LogQueryBox.hs b/src/Pkg/Components/LogQueryBox.hs index 038b9c848..c22e8283e 100644 --- a/src/Pkg/Components/LogQueryBox.hs +++ b/src/Pkg/Components/LogQueryBox.hs @@ -342,7 +342,7 @@ logQueryBox_ config = do $ filter (not . hiddenHere) visTypes forM_ visible \v -> do let vizType = v.key - label_ [data_ "value" vizType, class_ "tab !shadow-none !border-strokeWeak flex gap-1 whitespace-nowrap"] do + label_ [data_ "value" vizType, class_ "tab !shadow-none !border-strokeWeak has-[:checked]:bg-fillBrand-weak! has-[:checked]:border-strokeBrand-strong! has-[:checked]:text-textBrand! flex gap-1 whitespace-nowrap"] do input_ $ [ type_ "radio" , name_ "visualization" diff --git a/src/Pkg/Components/Widget.hs b/src/Pkg/Components/Widget.hs index 3faa8d15a..c4c12a0d3 100644 --- a/src/Pkg/Components/Widget.hs +++ b/src/Pkg/Components/Widget.hs @@ -37,7 +37,7 @@ import Models.Apis.Monitors qualified as Monitors import Models.Projects.Projects qualified as Projects import NeatInterpolation import Pages.Charts.Charts qualified as Charts -import Pages.Components (copyButton_, headerRow_) +import Pages.Components (copyButton_, headerRow_, searchInput_) import Pkg.Components.TimePicker qualified as TimePicker import Pkg.DeriveUtils (JsonValueSchema (..), WrappedEnumSC (..)) import Pkg.Parser (ToQueryText (..), parseQueryToAST, replacePlaceholders) @@ -311,6 +311,7 @@ data Widget = Widget , standalone :: Maybe Bool -- Not used in a grid stack , allowZoom :: Maybe Bool -- Allow zooming in the chart , columns :: Maybe [TableColumn] -- Table columns + , searchable :: Maybe Bool , onRowClick :: Maybe RowClickAction -- Action when table row is clicked -- Alert fields (populated from QueryMonitor at render time) , alertId :: Maybe Text -- Linked QueryMonitor ID @@ -1190,17 +1191,19 @@ renderTable widget = do $ div_ [ class_ "h-full overflow-auto p-3" , hxGet_ $ widgetFetchUrl eagerWidget - , hxTrigger_ $ bool "intersect once, update-query from:window, table-sort" "update-query from:window, table-sort" (isJust widget.html) + , hxTrigger_ $ bool "intersect once, update-query from:window, table-sort" "update-query from:window, table-sort" (isJust widget.html) <> memptyIfFalse (widget.searchable == Just True) ", input delay:250ms, search" , hxTarget_ $ "#" <> tableId , hxSelect_ $ "#" <> tableId , hxSwap_ "outerHTML" , term "hx-sync" "this:replace" - , term "hx-vals" "js:{...Object.fromEntries(new URLSearchParams(location.search)), ...JSON.parse(this.closest('[data-constants]')?.dataset.constants || '{}'), 'table-sort': this.dataset.tableSort || ''}" + , term "hx-vals" "js:{...Object.fromEntries(new URLSearchParams(location.search)), ...JSON.parse(this.closest('[data-constants]')?.dataset.constants || '{}'), 'table-sort': this.dataset.tableSort || '', 'table-search': this.querySelector('input[type=search]')?.value || ''}" , data_ "table-fetch" "" ] - $ case widget.html of - Just html -> toHtmlRaw html - Nothing -> div_ [class_ "flex h-full min-h-32 items-center justify-center", id_ tableId] $ loadingIndicator_ LdSM LdSpinner + $ do + when (widget.searchable == Just True) $ searchInput_ "" ("Search " <> fromMaybe "rows" widget.title) [] + case widget.html of + Just html -> toHtmlRaw html + Nothing -> div_ [class_ "flex h-full min-h-32 items-center justify-center", id_ tableId] $ loadingIndicator_ LdSM LdSpinner -- | Render stat widget content with HTMX lazy loading support @@ -1635,6 +1638,7 @@ renderTableWithDataAndParams widget dataRows params = do ( [class_ $ "hover" <> memptyIfFalse (isJust widget.onRowClick) " cursor-pointer" <> memptyIfFalse isCurrent " bg-fillBrand-weak font-semibold"] <> [term "aria-current" "true" | isCurrent] <> rowNavAttrs rowValue + <> memptyIfFalse (isJust widget.onRowClick) [tabindex_ "0", Aria.label_ $ "Filter by " <> rowValue, term "_" " on keydown[key=='Enter' or key==' '] halt the event then call me.click() end "] ) $ ifor_ columns \idx col -> unless (or col.hidden) diff --git a/src/Pkg/Parser.hs b/src/Pkg/Parser.hs index d70cc0616..55cce765d 100644 --- a/src/Pkg/Parser.hs +++ b/src/Pkg/Parser.hs @@ -14,6 +14,7 @@ import Models.Projects.Projects qualified as Projects import Pkg.Deriving (WrappedEnumSC (..)) import Pkg.Parser.Expr import Pkg.Parser.Stats +import Pkg.Rum qualified as Rum import PyF (fmt) import Relude import Relude.Extra.Foldable1 (minimumOn1) @@ -964,6 +965,8 @@ variablePresets :: BinDensity -> Text -> Maybe UTCTime -> Maybe UTCTime -> [(Tex variablePresets density pid mf mt allParams currentTime = let fmtUTC = maybe "" formatUTC andPrefix = (" AND " <>) + audience = Rum.audienceFilters allParams + audienceSessions = Rum.audienceSessionsSql browserSql errorSql audience bound op t field' = field' <> " " <> op <> " '" <> formatUTC t <> "'" clause field = case catMaybes [bound ">=" <$> mf, bound "<=" <$> mt] of [] -> "" @@ -979,6 +982,10 @@ variablePresets density pid mf mt allParams currentTime = , ("pageview_filter", pageViewSql) , ("error_filter", errorSql) , ("browser_kql", browserKql) + , ("audience_sessions", audienceSessions) + , ("audience_kql_literal", sqlStringLit $ Rum.audienceKql audience) + , ("table_search", sqlStringLit $ maybeToMonoid $ join $ Map.lookup "table-search" $ Map.fromList allParams) + , ("audience_filter", if any isJust [audience.browser, audience.os, audience.device] || audience.errored then "attributes___session___id IN (" <> audienceSessions <> "SELECT session FROM audience_sessions)" else "TRUE") ] <> (allParams <&> second maybeToMonoid) diff --git a/src/Pkg/Rum.hs b/src/Pkg/Rum.hs new file mode 100644 index 000000000..dfdc1d6d2 --- /dev/null +++ b/src/Pkg/Rum.hs @@ -0,0 +1,93 @@ +module Pkg.Rum (AudienceFilters (..), audienceFilters, audienceParams, audienceSessionsSql, audienceKql) where + +import Data.Aeson qualified as AE +import Data.List (lookup) +import Data.Text qualified as T +import Pkg.Parser.Expr (sqlStringLit) +import Relude +import Utils (kqlQuoted, nonEmptyT) +import Web.FormUrlEncoded (FromForm) + + +data AudienceFilters = AudienceFilters + { app :: Maybe Text + , browser :: Maybe Text + , os :: Maybe Text + , device :: Maybe Text + , errored :: Bool + } + deriving stock (Eq, Generic, Show) + deriving anyclass (AE.FromJSON, AE.ToJSON, FromForm) + + +audienceFilters :: [(Text, Maybe Text)] -> AudienceFilters +audienceFilters params = AudienceFilters (param "app") (param "browser") (param "os") (param "device") (param "errors" == Just "true") + where + param key = nonEmptyT $ join $ lookup ("var-" <> key) params + + +audienceParams :: AudienceFilters -> [(Text, Maybe Text)] +audienceParams f = [("var-app", f.app), ("var-browser", f.browser), ("var-os", f.os), ("var-device", f.device), ("var-errors", Just $ if f.errored then "true" else "false")] + + +-- Ordered rules: embedded browser/OS names must not win over their host family. +data AgentRule = Contains (NonEmpty Text) | Tablet | AnyAgent + + +families :: [(Text, [(Text, AgentRule)])] +families = + [ ("browser", [("Edge", Contains ("Edg/" :| ["Edge/", "EdgiOS/", "EdgA/"])), ("Opera", Contains ("OPR/" :| ["Opera", "OPiOS/"])), ("Samsung Internet", Contains ("SamsungBrowser" :| [])), ("Firefox", Contains ("Firefox/" :| ["FxiOS/"])), ("Chrome", Contains ("Chrome/" :| ["CriOS/"])), ("Safari", Contains ("Safari/" :| []))]) + , ("os", [("Windows", Contains ("Windows" :| [])), ("iOS", Contains ("iPhone" :| ["iPad", "iPod"])), ("macOS", Contains ("Mac OS X" :| ["Macintosh"])), ("Android", Contains ("Android" :| [])), ("ChromeOS", Contains ("CrOS" :| [])), ("Linux", Contains ("Linux" :| ["X11"]))]) + , ("device", [("Tablet", Tablet), ("Mobile", Contains ("Mobile" :| ["iPhone", "iPod"])), ("Desktop", AnyAgent)]) + ] + + +audienceSessionsSql :: Text -> Text -> AudienceFilters -> Text +audienceSessionsSql browserSql errorSql f = + "WITH rum_session_events AS (SELECT attributes___session___id AS session, " + <> "MAX(COALESCE(NULLIF(attributes___user_agent___original, ''), NULLIF(resource___user_agent___original, ''), '')) AS ua, " + <> "MAX(NULLIF(attributes___user___id, '')) AS user_id, MAX(NULLIF(attributes___user___email, '')) AS email, MAX(NULLIF(attributes___user___full_name, '')) AS full_name, " + <> "MAX(timestamp) AS last_seen, MAX(CASE WHEN " + <> errorSql + <> " THEN 1 ELSE 0 END) AS errored " + <> "FROM otel_logs_and_spans WHERE {{query_ast_filters}} AND " + <> browserSql + <> " AND NULLIF(attributes___session___id, '') IS NOT NULL GROUP BY attributes___session___id), " + <> "rum_sessions AS (SELECT *, " + <> T.intercalate ", " [classify rules <> " AS " <> key | (key, rules) <- families] + <> " FROM rum_session_events), " + <> "audience_sessions AS (SELECT * FROM rum_sessions WHERE " + <> T.intercalate " AND " ("TRUE" : [key <> " = " <> sqlStringLit val | (key, Just val) <- [("browser", f.browser), ("os", f.os), ("device", f.device)]] <> ["errored = 1" | f.errored]) + <> ") " + where + classify rules = "CASE WHEN ua = '' THEN 'Unknown' " <> T.concat ["WHEN " <> match rule <> " THEN " <> sqlStringLit label <> " " | (label, rule) <- rules] <> "ELSE 'Other' END" + match Tablet = "(ua ILIKE '%iPad%' OR (ua ILIKE '%Android%' AND ua NOT ILIKE '%Mobile%'))" + match AnyAgent = "TRUE" + match (Contains tokens) = "(" <> T.intercalate " OR " ["ua ILIKE " <> sqlStringLit ("%" <> token <> "%") | token <- toList tokens] <> ")" + + +-- The same ordered family rules drive session Explorer links. +audienceKql :: AudienceFilters -> Text +audienceKql f = + T.intercalate " and " + $ ["resource.service.name == " <> kqlQuoted value | value <- toList f.app] + <> [predicate rules value | (key, rules) <- families, Just value <- [join $ lookup key [("browser", f.browser), ("os", f.os), ("device", f.device)]]] + <> ["(status_code == \"ERROR\" or level matches /^error$/ or attributes.exception.type != null)" | f.errored] + where + attribute = "attributes.user_agent.original" + resource = "resource.user_agent.original" + predicate rules value + | value == "Unknown" = "(isempty(" <> attribute <> ") and isempty(" <> resource <> "))" + | value /= "Other" && isNothing (lookup value rules) = "1 == 0" + | otherwise = "((isnotempty(" <> attribute <> ") and " <> select attribute <> ") or (isempty(" <> attribute <> ") and isnotempty(" <> resource <> ") and " <> select resource <> "))" + where + (before, rest) = break ((== value) . fst) rules + select field = "(" <> T.intercalate " and " ([test False field rule | (_, rule) <- before] <> [maybe "1 == 1" (test True field . snd) $ listToMaybe rest]) <> ")" + test positive field (Contains tokens) = "(" <> T.intercalate (if positive then " or " else " and ") [field <> (if positive then " contains " else " !contains ") <> kqlQuoted token | token <- toList tokens] <> ")" + test positive _ AnyAgent = if positive then "1 == 1" else "1 == 0" + test positive field Tablet = + let has token = field <> " contains " <> kqlQuoted token + lacks token = field <> " !contains " <> kqlQuoted token + in if positive + then "(" <> has "iPad" <> " or (" <> has "Android" <> " and " <> lacks "Mobile" <> "))" + else "(" <> lacks "iPad" <> " and (" <> lacks "Android" <> " or " <> has "Mobile" <> "))" diff --git a/src/Web/Routes.hs b/src/Web/Routes.hs index 1b6968462..d7449ff08 100644 --- a/src/Web/Routes.hs +++ b/src/Web/Routes.hs @@ -77,6 +77,7 @@ import Pages.Projects qualified as ListProjects import Pages.Projects qualified as ManageMembers import Pages.Replay qualified as Replay import Pages.Reports qualified as Reports +import Pages.Rum qualified as Rum import Pages.ServiceMap qualified as ServiceMap import Pages.Settings qualified as Settings import Pages.Share qualified as Share @@ -473,6 +474,9 @@ data CookieProtectedRoutes mode = CookieProtectedRoutes , slackIdentityPost :: mode :- "slack" :> "link" :> Capture "linkId" (UUIDId "slack_link") :> ReqBody '[FormUrlEncoded] Slack.SlackLinkForm :> Post '[HTML] (RespHeaders (Html ())) , slackLinkProjectGet :: mode :- "slack" :> "oauth" :> "callback" :> QPT "code" :> QPT "state" :> LocationRedirect BotUtils.BotResponse , endpointDetailsRedirect :: mode :- "p" :> ProjectId :> "endpoints" :> "details" :> AllQueryParams :> LocationRedirect NoContent + , rumSegmentsGet :: mode :- "p" :> ProjectId :> "rum" :> "segments" :> AllQueryParams :> Get '[HTML] (RespHeaders (Html ())) + , rumSegmentsPost :: mode :- "p" :> ProjectId :> "rum" :> "segments" :> AllQueryParams :> ReqBody '[FormUrlEncoded] Rum.SegmentForm :> Post '[HTML] (RespHeaders (Html ())) + , rumSegmentsDelete :: mode :- "p" :> ProjectId :> "rum" :> "segments" :> Capture "name" Text :> AllQueryParams :> Delete '[HTML] (RespHeaders (Html ())) , rumRedirect :: mode :- "p" :> ProjectId :> "rum" :> CaptureAll "view" Text :> AllQueryParams :> LocationRedirect NoContent , dashboardNewGet :: mode :- "p" :> ProjectId :> "dashboards" :> "new" :> Get '[HTML] (RespHeaders Dashboards.DashboardNew) , dashboardsGet :: mode :- "p" :> ProjectId :> "dashboards" :> Capture "dashboard_id" Dashboards.DashboardId :> QPT "file" :> QPT "from" :> QPT "to" :> QPT "since" :> HXRequest :> AllQueryParams :> Get '[HTML] (RespHeaders (PageCtx Dashboards.DashboardGet)) @@ -977,6 +981,9 @@ cookieProtectedServer = , slackLinkProjectGet = Slack.linkProjectGetH , endpointDetailsRedirect = Dashboards.entrypointRedirectGetH "endpoint-stats.yaml" "Endpoint Analytics" ["endpoints", "http", "events"] , rumRedirect = Dashboards.rumRedirectH + , rumSegmentsGet = Rum.segmentsGetH + , rumSegmentsPost = Rum.segmentsPostH + , rumSegmentsDelete = Rum.segmentsDeleteH , dashboardsGet = Dashboards.dashboardGetH , dashboardNewGet = Dashboards.dashboardNewGetH , dashboardsGetList = Dashboards.dashboardsGetH diff --git a/static/migrations/0254_rum_segments.sql b/static/migrations/0254_rum_segments.sql new file mode 100644 index 000000000..90d78c861 --- /dev/null +++ b/static/migrations/0254_rum_segments.sql @@ -0,0 +1,6 @@ +CREATE TABLE projects.rum_segments ( + project_id uuid NOT NULL REFERENCES projects.projects(id) ON DELETE CASCADE, + name text NOT NULL CHECK (length(btrim(name)) BETWEEN 1 AND 100), + filters jsonb NOT NULL, + PRIMARY KEY (project_id, name) +); diff --git a/static/public/assets/css/tailwind.css b/static/public/assets/css/tailwind.css index b5caafa36..1463f542e 100644 --- a/static/public/assets/css/tailwind.css +++ b/static/public/assets/css/tailwind.css @@ -2588,6 +2588,43 @@ table td a[href]:not(.btn):not([data-no-preview]) { --tooltip-z: 100; --tooltip- container: dashboard / inline-size; } +[data-rum-audience] table { + table-layout: fixed; +} +[data-rum-audience] :is(th, td) { + overflow-wrap: anywhere; + white-space: normal; +} +[data-rum-audience] th > div, +[data-rum-audience] th > div > span { + min-width: 0; +} +@container dashboard (max-width: 400px) { + [data-rum-audience] > .grid-stack { + width: 100%; + margin-inline: 0 !important; + } + [data-rum-audience] .grid-stack-item > .grid-stack-item-content { + inset: auto !important; + } + [data-rum-audience] :is(th, td) { + padding-inline: 0.375rem; + } + [data-rum-audience] .nested-grid { + display: grid !important; + grid-template-columns: repeat(2, minmax(0, 1fr)); + width: 100% !important; + height: auto !important; + margin-inline: 0 !important; + } + [data-rum-audience] .nested-grid.grid-stack > .grid-stack-item:not([data-mobile-autofit]) { + width: auto !important; + min-width: 0; + height: 7.5rem !important; + min-height: 7.5rem !important; + } +} + .stat-widget { container: stat / inline-size; } diff --git a/static/public/dashboards/rum.yaml b/static/public/dashboards/rum.yaml index 134399927..063b1dd1d 100644 --- a/static/public/dashboards/rum.yaml +++ b/static/public/dashboards/rum.yaml @@ -30,6 +30,31 @@ variables: LIMIT 100 multi: false + - key: browser + title: Browser + type: values + multi: false + options: [[Chrome], [Edge], [Firefox], [Opera], [Safari], [Samsung Internet], [Other], [Unknown]] + + - key: os + title: Operating system + type: values + multi: false + options: [[Windows], [iOS], [macOS], [Android], [ChromeOS], [Linux], [Other], [Unknown]] + + - key: device + title: Device + type: values + multi: false + options: [[Desktop], [Mobile], [Tablet], [Other], [Unknown]] + + - key: errors + title: Session health + type: values + multi: false + options: [["false", All sessions], ["true", Sessions with errors]] + value: "false" + widgets: [] tabs: @@ -344,7 +369,8 @@ tabs: title: Browser error volume icon: triangle-exclamation query: *app - sql: *browser_error_series + sql: | + SELECT extract(epoch from time_bucket('{{rollup_interval}}', timestamp))::integer, 'value', count(*)::float FROM otel_logs_and_spans WHERE {{query_ast_filters}} AND {{browser_filter}} AND {{error_filter}} AND {{audience_filter}} GROUP BY time_bucket('{{rollup_interval}}', timestamp) ORDER BY time_bucket('{{rollup_interval}}', timestamp) DESC unit: errors summarize_by: sum series_intent: error @@ -355,7 +381,7 @@ tabs: icon: users query: *app sql: | - SELECT COUNT(DISTINCT attributes___session___id)::float FROM otel_logs_and_spans WHERE {{query_ast_filters}} AND {{browser_filter}} AND {{error_filter}} + SELECT COUNT(DISTINCT attributes___session___id)::float FROM otel_logs_and_spans WHERE {{query_ast_filters}} AND {{browser_filter}} AND {{error_filter}} AND {{audience_filter}} unit: sessions layout: { w: 4, h: 3 } @@ -364,7 +390,7 @@ tabs: icon: user query: *app sql: | - SELECT COUNT(DISTINCT COALESCE(attributes___user___id, attributes___user___email))::float FROM otel_logs_and_spans WHERE {{query_ast_filters}} AND {{browser_filter}} AND {{error_filter}} + SELECT COUNT(DISTINCT COALESCE(attributes___user___id, attributes___user___email))::float FROM otel_logs_and_spans WHERE {{query_ast_filters}} AND {{browser_filter}} AND {{error_filter}} AND {{audience_filter}} unit: users layout: { w: 4, h: 3 } @@ -401,50 +427,177 @@ tabs: LEFT(regexp_replace(COALESCE(NULLIF(attributes___exception___message, ''), NULLIF(status_message, ''), name, 'No error message'), '[0-9a-fA-F-]{8,}|[0-9]+', '', 'g'), 300) AS message, MIN(name) AS span_name, COUNT(*) AS n, COUNT(DISTINCT attributes___session___id)::text AS sessions, MAX(timestamp)::text AS last_seen FROM otel_logs_and_spans - WHERE {{query_ast_filters}} AND {{browser_filter}} AND {{error_filter}} + WHERE {{query_ast_filters}} AND {{browser_filter}} AND {{error_filter}} AND {{audience_filter}} GROUP BY 1, 2, 3 ORDER BY COUNT(*) DESC LIMIT 50 ) AS groups ORDER BY n DESC - # User-agent families, coarse on purpose. Arm order matters: Edge and Opera embed "Chrome", - # Chrome embeds "Safari", iOS says "like Mac OS X", Android embeds "Linux". - name: Audience icon: users widgets: + - type: group + title: Audience in this window + description: Each session counts once. Unknown means no user agent was supplied; identified users exclude anonymous sessions. + layout: { w: 12, h: 3 } + children: + - type: stat + title: Audience sessions + query: *app + sql: "{{audience_sessions}} SELECT COUNT(*)::float FROM audience_sessions" + unit: sessions + layout: { w: 3, h: 2 } + - type: stat + title: Identified audience users + query: *app + sql: "{{audience_sessions}} SELECT COUNT(DISTINCT COALESCE('id:' || user_id, 'email:' || email))::float FROM audience_sessions" + unit: users + layout: { w: 3, h: 2 } + - type: stat + title: Sessions with errors + query: *app + sql: "{{audience_sessions}} SELECT COALESCE(SUM(errored), 0)::float FROM audience_sessions" + unit: sessions + series_intent: error + layout: { w: 3, h: 2 } + - type: stat + title: Session error rate + description: Sessions with at least one browser error divided by all sessions in the selected audience. + query: *app + sql: "{{audience_sessions}} SELECT (100.0 * SUM(errored) / NULLIF(COUNT(*), 0))::float FROM audience_sessions" + unit: '%' + series_intent: error + layout: { w: 3, h: 2 } + - type: table - title: Browsers, systems and devices - description: Sessions per user-agent family; errored counts sessions with at least one browser error. - layout: { w: 12, h: 7 } + title: Browsers + description: Select a row to filter this audience. Share is within the current filters; error rate is within each group. + layout: { x: 0, w: 4, h: 5 } + on_row_click: + set_variable: browser + navigate_to_tab: Audience columns: - - field: dimension - title: Dimension - field: name - title: Name + title: Browser - field: sessions title: Sessions column_type: number - progress: column_percent - - field: errored - title: Errored + - field: share + title: Share + unit: '%' + column_type: number + - field: affected + title: Affected description: Sessions with at least one browser error. column_type: number + - field: error_rate + title: Error rate + unit: '%' + column_type: number query: *app sql: | - WITH sessions AS ( - SELECT COALESCE(NULLIF(attributes___user_agent___original, ''), resource___user_agent___original) AS ua, attributes___session___id AS session, - MAX(CASE WHEN {{error_filter}} THEN 1 ELSE 0 END) AS errored - FROM otel_logs_and_spans WHERE {{query_ast_filters}} AND {{browser_filter}} - GROUP BY 1, 2 - ), families AS ( - SELECT session, errored, - CASE WHEN ua LIKE '%Edg/%' OR ua LIKE '%Edge/%' THEN 'Edge' WHEN ua LIKE '%OPR/%' OR ua LIKE '%Opera%' THEN 'Opera' WHEN ua LIKE '%SamsungBrowser%' THEN 'Samsung Internet' - WHEN ua LIKE '%Firefox/%' THEN 'Firefox' WHEN ua LIKE '%Chrome/%' OR ua LIKE '%CriOS/%' THEN 'Chrome' WHEN ua LIKE '%Safari/%' THEN 'Safari' ELSE 'Other' END AS browser, - CASE WHEN ua LIKE '%Windows%' THEN 'Windows' WHEN ua LIKE '%iPhone%' OR ua LIKE '%iPad%' OR ua LIKE '%iPod%' THEN 'iOS' WHEN ua LIKE '%Mac OS X%' OR ua LIKE '%Macintosh%' THEN 'macOS' - WHEN ua LIKE '%Android%' THEN 'Android' WHEN ua LIKE '%CrOS%' THEN 'ChromeOS' WHEN ua LIKE '%Linux%' OR ua LIKE '%X11%' THEN 'Linux' ELSE 'Other' END AS os, - CASE WHEN ua LIKE '%iPad%' OR (ua LIKE '%Android%' AND ua NOT LIKE '%Mobile%') THEN 'Tablet' WHEN ua LIKE '%Mobile%' OR ua LIKE '%iPhone%' THEN 'Mobile' ELSE 'Desktop' END AS device - FROM sessions WHERE ua IS NOT NULL - ), counted AS ( - SELECT 1 AS d, 'Browser' AS dimension, browser AS name, COUNT(DISTINCT session) AS n, SUM(errored) AS errored FROM families GROUP BY browser - UNION ALL SELECT 2, 'Operating system', os, COUNT(DISTINCT session), SUM(errored) FROM families GROUP BY os - UNION ALL SELECT 3, 'Device', device, COUNT(DISTINCT session), SUM(errored) FROM families GROUP BY device - ) - SELECT dimension, name, n::text AS sessions, errored::text AS errored FROM counted ORDER BY d, n DESC + {{audience_sessions}} + SELECT browser AS name, COUNT(*)::text AS sessions, + ROUND(100.0 * COUNT(*) / NULLIF(SUM(COUNT(*)) OVER (), 0), 1)::text AS share, + SUM(errored)::text AS affected, + ROUND(100.0 * SUM(errored) / NULLIF(COUNT(*), 0), 1)::text AS error_rate + FROM audience_sessions GROUP BY browser ORDER BY COUNT(*) DESC, browser + + - type: table + title: Operating systems + description: Select a row to filter this audience. Share is within the current filters; error rate is within each group. + layout: { x: 4, w: 4, h: 5 } + on_row_click: + set_variable: os + navigate_to_tab: Audience + columns: + - field: name + title: Operating system + - field: sessions + title: Sessions + column_type: number + - field: share + title: Share + unit: '%' + column_type: number + - field: affected + title: Affected + description: Sessions with at least one browser error. + column_type: number + - field: error_rate + title: Error rate + unit: '%' + column_type: number + query: *app + sql: | + {{audience_sessions}} + SELECT os AS name, COUNT(*)::text AS sessions, + ROUND(100.0 * COUNT(*) / NULLIF(SUM(COUNT(*)) OVER (), 0), 1)::text AS share, + SUM(errored)::text AS affected, + ROUND(100.0 * SUM(errored) / NULLIF(COUNT(*), 0), 1)::text AS error_rate + FROM audience_sessions GROUP BY os ORDER BY COUNT(*) DESC, os + + - type: table + title: Devices + description: Select a row to filter this audience. Share is within the current filters; error rate is within each group. + layout: { x: 8, w: 4, h: 5 } + on_row_click: + set_variable: device + navigate_to_tab: Audience + columns: + - field: name + title: Device + - field: sessions + title: Sessions + column_type: number + - field: share + title: Share + unit: '%' + column_type: number + - field: affected + title: Affected + description: Sessions with at least one browser error. + column_type: number + - field: error_rate + title: Error rate + unit: '%' + column_type: number + query: *app + sql: | + {{audience_sessions}} + SELECT device AS name, COUNT(*)::text AS sessions, + ROUND(100.0 * COUNT(*) / NULLIF(SUM(COUNT(*)) OVER (), 0), 1)::text AS share, + SUM(errored)::text AS affected, + ROUND(100.0 * SUM(errored) / NULLIF(COUNT(*), 0), 1)::text AS error_rate + FROM audience_sessions GROUP BY device ORDER BY COUNT(*) DESC, device + + - type: table + title: Identified users + description: Search all identified users in this audience by name, email or id. Shows up to 200 matches, most recently active first. + searchable: true + layout: { w: 12, h: 7 } + columns: + - field: user + title: User + link: /p/{{project_id}}/log_explorer?viz_type=sessions&query={{row.kql}}{{time_range}} + - field: sessions + title: Sessions + column_type: number + - field: affected + title: Affected sessions + column_type: number + - field: last_seen + title: Last seen + - field: kql + title: Session query + hidden: true + query: *app + sql: | + {{audience_sessions}} + SELECT COALESCE(MAX(email), MAX(full_name), MAX(user_id)) AS "user", COUNT(*)::text AS sessions, + SUM(errored)::text AS affected, MAX(last_seen)::text AS last_seen, + '{{browser_kql}}' || CASE WHEN {{audience_kql_literal}} = '' THEN '' ELSE ' and ' || {{audience_kql_literal}} END || + CASE WHEN MAX(user_id) IS NOT NULL THEN ' and attributes.user.id == "' || replace(replace(MAX(user_id), '\', '\\'), '"', '\"') || '"' + ELSE ' and attributes.user.email == "' || replace(replace(MAX(email), '\', '\\'), '"', '\"') || '"' END AS kql + FROM audience_sessions WHERE user_id IS NOT NULL OR email IS NOT NULL + GROUP BY COALESCE('id:' || user_id, 'email:' || email) + HAVING {{table_search}} = '' OR strpos(lower(COALESCE(MAX(email), '') || ' ' || COALESCE(MAX(full_name), '') || ' ' || COALESCE(MAX(user_id), '')), lower({{table_search}})) > 0 + ORDER BY 4 DESC LIMIT 200 diff --git a/test/integration/Pages/DashboardWidgetsSpec.hs b/test/integration/Pages/DashboardWidgetsSpec.hs index 475e093e5..614614cb9 100644 --- a/test/integration/Pages/DashboardWidgetsSpec.hs +++ b/test/integration/Pages/DashboardWidgetsSpec.hs @@ -45,6 +45,7 @@ import Pages.Dashboards (DashboardFilters (..)) import Pages.Dashboards qualified as Dashboards import Pages.Issues qualified as Issues import Pages.LogExplorer.Log qualified as Log +import Pages.Rum qualified as Rum import Pkg.Components.Widget qualified as Widget import Pkg.Parser (browserKql, parseQueryToAST) import Pkg.QueryCache qualified as QueryCache @@ -68,6 +69,7 @@ import Utils qualified import Web.ApiHandlers qualified as Api import Web.ApiTypes qualified as ApiTypes import Web.Auth qualified as Auth +import Web.FormUrlEncoded (urlDecodeAsForm) import Web.Routes qualified as Routes @@ -1430,7 +1432,7 @@ spec = sequential $ aroundAll withTestResources do it "rumDashboard_everyWidgetRuns_andVitalsReadHistogramBuckets" \tr -> do projectId <- createTestProject tr "RUM dashboard template" apiKey <- createTestAPIKey tr projectId "rum-dashboard-key" - let browserSpan n name attrs ua = ingestSpanReq tr $ mkSpanRequest ("e" <> T.justifyRight 31 '0' (show @Text n)) ("e" <> T.justifyRight 15 '0' (show @Text n)) Nothing name [] Nothing (mkAttr "session.id" "dash-session" : attrs) (mkResource apiKey [mkAttr "service.name" "storefront", mkAttr "user_agent.original" ua]) frozenTime + let browserSpan n name attrs ua = ingestSpanReq tr $ mkSpanRequest ("e" <> T.justifyRight 31 '0' (show @Text n)) ("e" <> T.justifyRight 15 '0' (show @Text n)) Nothing name [] Nothing (mkAttr "session.id" ("dash-session-" <> show n) : attrs) (mkResource apiKey [mkAttr "service.name" "storefront", mkAttr "user_agent.original" ua]) frozenTime browserSpan (1 :: Int) "documentLoad" [mkAttr "url.full" "https://shop.example/cart"] "Mozilla/5.0 (X11; Linux x86_64) Chrome/151" browserSpan 2 "Pageview · /orders/123" [mkAttr "url.path" "/orders/123", mkAttr "exception.type" "TypeError"] "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) Mobile/15E148 Safari/604.1" -- Three DELTA exports merge to [3,9,3,1,0] over 16 observations; the 12th lands on the @@ -1471,7 +1473,7 @@ spec = sequential $ aroundAll withTestResources do exportVital "lcp" [point (-5) (-10) [4, 0] & PMF.explicitBounds .~ [2500]] mixed <- run [vitals] vitalRow mixed "LCP" `shouldBe` Just ["LCP", "2344 ms", "rating;success-strong⇒Good", "0 – 2500", "20"] - sort [name | row <- V.toList $ table results "Browsers, systems and devices", row V.!? 0 == Just "Device", Just name <- [row V.!? 1]] `shouldBe` ["Desktop", "Mobile"] + sort [name | row <- V.toList $ table results "Devices", Just name <- [row V.!? 0]] `shouldBe` ["Desktop", "Mobile"] sort (V.toList $ V.mapMaybe (V.!? 0) $ table results "Top pages") `shouldBe` ["/cart", "/orders/:id"] -- Each page row's hidden Explorer query finds the events it counted, and the rendered -- link carries it with the dashboard's window while the column itself stays off screen. @@ -1490,6 +1492,58 @@ spec = sequential $ aroundAll withTestResources do map (\ps -> (lookup "since" ps, lookup "query" ps)) (linkParams ("/p/" <> projectId.toText <> "/log_explorer") html) `shouldBe` [(Just "7D", row V.!? 3) | row <- V.toList $ table results "Top pages"] + it "audience_countsEachSessionOnce_keepsUnknown_andFiltersCohorts" \tr -> do + pid <- createTestProject tr "RUM audience" + apiKey <- createTestAPIKey tr pid "audience-key" + let emit n session ua attrs = ingestSpanReq tr $ mkSpanRequest ("a" <> T.justifyRight 31 '0' (show @Text n)) ("a" <> T.justifyRight 15 '0' (show @Text n)) Nothing "documentLoad" [] Nothing (mkAttr "session.id" session : attrs) (mkResource apiKey $ mkAttr "service.name" "storefront" : [mkAttr "user_agent.original" agent | agent <- toList ua]) frozenTime + emit (1 :: Int) "safari" (Just "iPhone Mobile Safari/604") [mkAttr "user.id" "alice", mkAttr "user.email" "alice@example.com"] + emit 2 "safari" (Just "iPhone Mobile Safari/604") [mkAttr "user.id" "alice", mkAttr "exception.type" "TypeError"] + emit 3 "chrome" (Just "Windows Chrome/151 Safari/537") [mkAttr "user.id" "bob"] + emit 4 "unknown" Nothing [] + emit 5 "" (Just "Windows Chrome/151") [mkAttr "exception.type" "TypeError"] + rum <- maybe (fail "missing rum.yaml") pure . find (\d -> d.file == Just "rum.yaml") =<< DashboardModel.readDashboardsFromDisk "static/public/dashboards" + let from = toText $ iso8601Show $ addUTCTime (-3600) frozenTime + to = toText $ iso8601Show $ addUTCTime 3600 frozenTime + readTable params title = do + w <- maybe (fail $ "missing " <> toString title) pure $ find ((== Just title) . (.title)) (DashboardModel.allWidgets rum) + result <- runQueryEffect tr $ Charts.queryMetrics Nothing (Just Charts.DTText) (Just pid) w.query w.sql Nothing (Just from) (Just to) Nothing Nothing params + result.error `shouldBe` Nothing + pure result.dataText + browsers <- readTable [] "Browsers" + sort (map (V.toList . V.take 5) $ V.toList browsers) `shouldBe` [["Chrome", "1", "33.3", "0", "0.0"], ["Safari", "1", "33.3", "1", "100.0"], ["Unknown", "1", "33.3", "0", "0.0"]] + filtered <- readTable [("var-browser", Just "Safari")] "Devices" + map (V.toList . V.take 5) (V.toList filtered) `shouldBe` [["Mobile", "1", "100.0", "1", "100.0"]] + users <- readTable [("var-errors", Just "true")] "Identified users" + map (V.toList . V.take 3) (V.toList users) `shouldBe` [["alice@example.com", "1", "1"]] + forM_ ([([("var-browser", Just "Safari")], 2), ([("var-os", Just "iOS"), ("var-device", Just "Mobile")], 2), ([("var-browser", Just "Unknown")], 1), ([("var-errors", Just "true")], 2)] :: [([(Text, Maybe Text)], Int)]) \(params, expected) -> do + headers <- runAuthHandler tr $ Dashboards.rumRedirectH pid ["sessions"] params + let location = case lookupResponseHeader @"Location" headers of Header url -> url; _ -> "" + query = lookup "query" =<< listToMaybe (linkParams ("/p/" <> pid.toText <> "/log_explorer") ("href=\"" <> location <> "\"")) + (_, events) <- testServant tr $ Log.logExplorerDataH pid def{Log.query = query, Log.from = Just from, Log.to = Just to} + (events.error, events.queryResultCount) `shouldBe` (Nothing, expected) + readTable [("var-app", Just "missing-app")] "Browsers" `shouldReturn` V.empty + readTable [("environment", Just "prod")] "Browsers" `shouldReturn` V.empty + found <- readTable [("table-search", Just "ALICE")] "Identified users" + map (V.toList . V.take 3) (V.toList found) `shouldBe` [["alice@example.com", "1", "1"]] + readTable [("table-search", Just "missing-user")] "Identified users" `shouldReturn` V.empty + + it "audienceSegments_persistFilters_keepTheWindow_andStayProjectScoped" \tr -> do + pid <- createTestProject tr "RUM segments" + otherPid <- createTestProject tr "Other RUM segments" + let params = [("var-app", Just "storefront"), ("var-browser", Just "Safari"), ("var-device", Just "Mobile"), ("since", Just "7D"), ("tab", Just "errors")] + root = "/p/" <> pid.toText <> "/rum" + render = toStrict . renderText + form <- either (fail . toString) pure $ urlDecodeAsForm @Rum.SegmentForm "name=Mobile+Safari&app=storefront&browser=Safari&device=Mobile&os=&errored=false" + (_, saved) <- testServant tr $ Rum.segmentsPostH pid params form + let links = linkParams root (render saved) + links `shouldSatisfy` any (\ps -> lookup "var-browser" ps == Just "Safari" && lookup "since" ps == Just "7D" && lookup "tab" ps == Just "errors") + (_, reloaded) <- testServant tr $ Rum.segmentsGetH pid [] + render reloaded `shouldSatisfy` T.isInfixOf ">Mobile Safari" + (_, other) <- testServant tr $ Rum.segmentsGetH otherPid [] + render other `shouldNotSatisfy` T.isInfixOf ">Mobile Safari" + (_, deleted) <- testServant tr $ Rum.segmentsDeleteH pid "Mobile Safari" [] + render deleted `shouldNotSatisfy` T.isInfixOf ">Mobile Safari" + -- /rum and its older /rum/dashboard open the dashboard; /rum/sessions the Explorer. Links from -- emails and alerts carry a window, which both must keep. it "rumRedirects_openTheDashboardOrSessions_andKeepTheWindow" \tr -> do diff --git a/test/unit/Models/DashboardTemplatesSpec.hs b/test/unit/Models/DashboardTemplatesSpec.hs index ef560515a..6ec319ea5 100644 --- a/test/unit/Models/DashboardTemplatesSpec.hs +++ b/test/unit/Models/DashboardTemplatesSpec.hs @@ -6,7 +6,7 @@ import Data.Text qualified as T import Models.Projects.Dashboards qualified as Dashboards import Models.Projects.GitSync qualified as GitSync import Pkg.Components.Widget qualified as Widget -import Pkg.Parser (browserKql, parseQueryToAST) +import Pkg.Parser (BinDensity (BarDensity), browserKql, fillQueryTemplate, fixedUTCTime, parseQueryToAST, variablePresets) import Relude import System.Directory (listDirectory) import Test.Hspec (Spec, describe, expectationFailure, it, runIO, shouldBe, shouldSatisfy) @@ -76,8 +76,9 @@ spec = describe "dashboard templates" do Nothing -> expectationFailure "missing template: rum.yaml" Just d -> do let sqlWidgets = [w | w <- Dashboards.allWidgets d, isJust w.sql] + expand = fillQueryTemplate $ variablePresets BarDensity "project" Nothing Nothing [] fixedUTCTime sqlWidgets `shouldSatisfy` (not . null) - forM_ sqlWidgets \w -> (w.title, any (T.isInfixOf "{{query_ast_filters}}") w.sql, any (T.isInfixOf "{{var-app}}") w.query) `shouldBe` (w.title, True, True) + forM_ sqlWidgets \w -> (w.title, any (T.isInfixOf "{{query_ast_filters}}" . expand) w.sql, any (T.isInfixOf "{{var-app}}") w.query) `shouldBe` (w.title, True, True) it "endpoint latency summaries average percentile buckets and declare milliseconds" $ withEndpointTemplate \d -> do let flatten w = w : maybe [] (concatMap flatten) w.children From ac55bb7e4a4d55286edd6d23ed45dccd4867ba73 Mon Sep 17 00:00:00 2001 From: Anthony Alaribe Date: Tue, 27 Oct 2026 12:07:29 +0100 Subject: [PATCH 019/201] Issues responsive log details, API-change service labels, repositories redesign (#742) * Issues: responsive log details, API change service labels, code context cleanup * Simplify review fixes: fix unparsed hyperscript in trace divider and review rows * Match htmx 4 HX-Target on dashboard tabs; align tests with the redesigned repositories and issue pages * Close the review dialog on rerun; align repositories e2e with the table view * Align repositories e2e with the shared empty state and tab navigation * Host map e2e: the inspector drawer is modal --- e2e/tests/host-map.spec.ts | 7 +- e2e/tests/repositories.spec.ts | 19 +- hpack-includes/lib-deps.yaml | 1 + monoscope.cabal | 7 +- src/BackgroundJobs.hs | 15 +- src/Models/Apis/ApiChanges.hs | 52 +- src/Models/Apis/IssueEnhancement.hs | 38 +- src/Models/Apis/Issues.hs | 52 +- src/Models/Projects/ImpactReviews.hs | 3 +- src/Models/Projects/ProjectMemory.hs | 20 +- src/Pages/BodyWrapper.hs | 25 +- src/Pages/CodeContext.hs | 732 +++++++++++------- src/Pages/Components.hs | 42 +- src/Pages/Dashboards.hs | 18 +- src/Pages/GitSync.hs | 7 +- src/Pages/Issues.hs | 642 ++++++++++----- src/Pages/LogExplorer/Log.hs | 3 +- src/Pages/LogExplorer/LogItem.hs | 6 +- src/Pages/Monitors.hs | 94 +-- src/Pages/Replay.hs | 2 +- src/Pages/Telemetry.hs | 80 +- src/Pkg/Components/Table.hs | 47 +- src/Pkg/Parser.hs | 7 +- src/Web/Routes.hs | 21 +- .../0255_api_change_recorded_service.sql | 9 + static/public/assets/css/tailwind.css | 28 +- .../public/assets/svgs/fa-sprites/regular.svg | 3 + test/fixtures/wiki-browser.mjs | 30 +- test/integration/Pages/Bots/AgenticSpec.hs | 4 +- test/integration/Pages/CodeContextSpec.hs | 36 +- .../integration/Pages/DashboardWidgetsSpec.hs | 39 +- test/integration/Pages/ErrorPatternsSpec.hs | 2 +- test/integration/Pages/IssuesSpec.hs | 70 +- test/integration/Pages/TelemetrySpec.hs | 9 +- web-components/package-lock.json | 15 + web-components/package.json | 2 + web-components/src/index.ts | 6 +- web-components/src/log-list.ts | 42 +- web-components/src/log-worker-functions.ts | 8 + web-components/src/main.ts | 5 +- web-components/src/page-chrome.ts | 28 +- web-components/src/session-replay.ts | 277 ++++--- web-components/src/wiki-editor.css | 8 +- web-components/src/wiki-editor.ts | 73 +- web-components/test/log-list-bugs.test.ts | 2 +- web-components/test/log-list-embedded.test.ts | 5 +- web-components/test/page-chrome.test.ts | 36 +- .../test/session-replay-progressive.test.ts | 8 +- web-components/test/time-picker-state.test.ts | 17 + 49 files changed, 1698 insertions(+), 1004 deletions(-) create mode 100644 static/migrations/0255_api_change_recorded_service.sql diff --git a/e2e/tests/host-map.spec.ts b/e2e/tests/host-map.spec.ts index e0cfb1fe4..0c530ebfe 100644 --- a/e2e/tests/host-map.spec.ts +++ b/e2e/tests/host-map.spec.ts @@ -23,7 +23,7 @@ async function openHostMap(page: import("@playwright/test").Page) { test.describe("Host map", () => { test.describe.configure({ mode: "serial" }); - test("the desktop host inspector stays labelled and leaves the map interactive", async ({ page }) => { + test("the desktop host inspector is a labelled modal that returns focus on close", async ({ page }) => { await openHostMap(page); await expect(page.locator(`[data-visible-host-label="${HOST}"]`)).toBeVisible(); const host = page.getByRole("button", { name: new RegExp(`${HOST}, CPU usage:`) }); @@ -31,7 +31,7 @@ test.describe("Host map", () => { const dialog = page.getByRole("dialog"); await expect(dialog).toBeVisible(); - await expect(dialog).not.toHaveAttribute("aria-modal", "true"); + await expect(dialog).toHaveAttribute("aria-modal", "true"); await expect(dialog).toHaveAccessibleName(/vps-|host/i); const header = dialog.locator("header"); await expect(header).toBeVisible(); @@ -39,9 +39,6 @@ test.describe("Host map", () => { panel.querySelector('[aria-label="Close drawer"]')!.getBoundingClientRect().right - panel.querySelector('header')!.getBoundingClientRect().right, )).toBeLessThanOrEqual(-12); - await expect - .poll(() => page.locator("#main-content").evaluate((element) => (element as HTMLElement).inert)) - .toBe(false); await page.keyboard.press("Escape"); await expect(dialog).toBeHidden(); diff --git a/e2e/tests/repositories.spec.ts b/e2e/tests/repositories.spec.ts index a030fbc5c..211aee761 100644 --- a/e2e/tests/repositories.spec.ts +++ b/e2e/tests/repositories.spec.ts @@ -75,14 +75,14 @@ test('rerunning a pull request review replaces its view without nesting content' try { await page.context().addCookies([{ name: 'monoscope_session', value: sid, url: baseURL! }]); await page.goto(`/p/${pid}/repositories?tab=reviews`); - await page.getByText('team/checkout #1', { exact: true }).click(); + await page.getByRole('button', { name: 'View review for team/checkout #1', exact: true }).click(); await page.getByRole('button', { name: 'Rerun review', exact: true }).click(); await expect(page.locator('#repository-content').getByText('Queued', { exact: true })).toBeVisible(); await expect(page.locator('#repository-content')).toHaveCount(1); await expect(page.getByText('Review unavailable', { exact: true })).toHaveCount(0); await page.getByRole('navigation', { name: 'Repository views' }).getByRole('link', { name: 'Repositories', exact: true }).click(); await expect(page.locator('#repository-content')).toHaveCount(1); - await expect(page.getByRole('heading', { name: 'Connect the repositories behind your services', exact: true })).toBeVisible(); + await expect(page.getByText('Connect the repositories behind your services', { exact: true })).toBeVisible(); } finally { sql(`DELETE FROM background_jobs WHERE payload->>'contents' = '${run}'; DELETE FROM projects.projects WHERE id = '${pid}'; DELETE FROM users.users WHERE id = '${uid}';`); @@ -93,7 +93,7 @@ test('repositories are discoverable and their views survive navigation and histo await page.goto(`${project}/settings/integrations`); await page.locator('#main-sidenav').getByRole('link', { name: 'Repositories', exact: true }).click(); await expect(page).toHaveURL(`${project}/repositories`); - await expect(page.locator('#main-content').getByRole('heading', { name: 'Repositories', exact: true })).toBeVisible(); + await expect(page.getByRole('heading', { level: 1, name: 'Repositories', exact: true })).toBeVisible(); const views = page.getByRole('navigation', { name: 'Repository views' }); await views.getByRole('link', { name: 'Pull requests', exact: true }).click(); await expect(page).toHaveURL(/repositories\?tab=reviews/); @@ -487,9 +487,9 @@ test('service investigations reach only applicable repositories by keyboard in b const link = menu.getByRole('link', { name: 'View repositories', exact: true }); await link.focus(); await page.keyboard.press('Enter'); - await expect(page.getByRole('heading', { name: `Repositories for ${service}`, exact: true })).toBeVisible(); + await expect(page.getByRole('heading', { level: 1, name: `Repositories ${service}`, exact: true })).toBeVisible(); const content = page.locator('#repository-content'); - await expect(content.locator('article')).toHaveCount(2); + await expect(content.locator('tr.itemsListItem')).toHaveCount(2); await expect(content.getByRole('link', { name: 'acme/checkout', exact: true })).toHaveAttribute('href', `/p/${pid}/repositories/${repositories[0]}`); await expect(content.getByText('All services', { exact: true })).toBeVisible(); await expect(page.getByRole('link', { name: 'Add repositories', exact: true })).toHaveCount(0); @@ -497,14 +497,15 @@ test('service investigations reach only applicable repositories by keyboard in b await expect.poll(() => page.evaluate(() => document.documentElement.scrollWidth)).toBe(320); await expect.poll(() => page.locator('#side-nav-menu').evaluate(element => element.getBoundingClientRect().right)).toBeLessThanOrEqual(0); await page.screenshot({ path: testInfo.outputPath(`service-repositories-${theme}.png`) }); - await page.getByRole('link', { name: 'All repositories', exact: true }).click(); - await expect(page.locator('#repository-content article')).toHaveCount(4); + await page.setViewportSize({ width: 1200, height: 900 }); + await page.getByRole('navigation', { name: 'Repository views' }).getByRole('link', { name: 'Repositories', exact: true }).click(); + await expect(page.locator('#repository-content tr.itemsListItem')).toHaveCount(4); await page.goBack(); - await expect(page.getByRole('heading', { name: `Repositories for ${service}`, exact: true })).toBeVisible(); + await expect(page.getByRole('heading', { level: 1, name: `Repositories ${service}`, exact: true })).toBeVisible(); } sql(`DELETE FROM projects.code_mappings WHERE project_id = '${pid}' AND service IS NULL;`); await page.goto(`/p/${pid}/repositories/services/unmapped`); - await expect(page.getByRole('heading', { name: 'No repositories linked to this service', exact: true })).toBeVisible(); + await expect(page.getByText('No repositories linked to this service', { exact: true })).toBeVisible(); await expect(page.getByText('Ask a project editor to link services to their source repositories.', { exact: true })).toBeVisible(); await expect(page.getByRole('link', { name: 'Choose a repository', exact: true })).toHaveCount(0); } finally { diff --git a/hpack-includes/lib-deps.yaml b/hpack-includes/lib-deps.yaml index a22c19b9d..2bf02beff 100644 --- a/hpack-includes/lib-deps.yaml +++ b/hpack-includes/lib-deps.yaml @@ -56,6 +56,7 @@ - mmark - commonmark >= 0.2.6.1 && < 0.3 - commonmark-extensions >= 0.2.6 && < 0.3 +- Diff >= 1.0 && < 1.1 - parsec >= 3.1 && < 3.2 - xss-sanitize >= 0.3.7.2 && < 0.4 - extra diff --git a/monoscope.cabal b/monoscope.cabal index 5f0710fae..fd9759057 100644 --- a/monoscope.cabal +++ b/monoscope.cabal @@ -270,6 +270,7 @@ extra-source-files: static/migrations/0253_project_memory_legacy_writes.sql static/migrations/0254_ingest_sampling.sql static/migrations/0254_rum_segments.sql + static/migrations/0255_api_change_recorded_service.sql test/fixtures/github-app-test.pem test/fixtures/wiki-browser.mjs static/public/assets/web-components/dist/manifest.json @@ -510,7 +511,8 @@ library build-tool-depends: proto-lens-protoc:proto-lens-protoc build-depends: - PyF + Diff ==1.0.* + , PyF , Unique , aeson , aeson-extra @@ -1233,7 +1235,8 @@ test-suite test-dev hspec-discover:hspec-discover , proto-lens-protoc:proto-lens-protoc build-depends: - PyF + Diff ==1.0.* + , PyF , Unique , aeson , aeson-extra diff --git a/src/BackgroundJobs.hs b/src/BackgroundJobs.hs index f5ddc7317..9391a1a9f 100644 --- a/src/BackgroundJobs.hs +++ b/src/BackgroundJobs.hs @@ -3799,13 +3799,14 @@ enhanceIssuesWithLLM pid issueIds = do enhancement.enhancedTitle enhancement.recommendedAction enhancement.migrationComplexity - -- Also classify and update criticality - criticalityResult <- Enhancement.classifyIssueCriticality ctx issue - case criticalityResult of - Left err -> Log.logAttention "Failed to classify issue criticality" (issueId, err) - Right (isCritical, breakingCount, _incrementalCount) -> do - void $ Enhancement.updateIssueClassification issue.id isCritical breakingCount - Log.logInfo "Successfully enhanced and classified issue" (issueId, isCritical, breakingCount) + -- Schema observations do not establish consumer compatibility or urgency. + when (issue.issueType /= Issues.ApiChange) do + criticalityResult <- Enhancement.classifyIssueCriticality ctx issue + case criticalityResult of + Left err -> Log.logAttention "Failed to classify issue criticality" (issueId, err) + Right (isCritical, breakingCount, _incrementalCount) -> do + void $ Enhancement.updateIssueClassification issue.id isCritical breakingCount + Log.logInfo "Successfully enhanced and classified issue" (issueId, isCritical, breakingCount) -- Analyze error patterns for root cause and category. -- Left = not a runtime exception, or the LLM call failed. diff --git a/src/Models/Apis/ApiChanges.hs b/src/Models/Apis/ApiChanges.hs index 5a6f0576b..3ff1a8f30 100644 --- a/src/Models/Apis/ApiChanges.hs +++ b/src/Models/Apis/ApiChanges.hs @@ -8,6 +8,9 @@ -- that nothing ever read back. module Models.Apis.ApiChanges ( AnomalyVM (..), + SchemaSubject (..), + schemaSubject, + spanSchemaTitle, FieldEvidence (..), FieldSnapshot (..), fieldSnapshot, @@ -19,7 +22,6 @@ module Models.Apis.ApiChanges ( FieldChange (..), FieldChangeKind (..), parseAnomalyTypes, - detectService, getAnomaliesVM, ) where @@ -28,7 +30,6 @@ import Data.Aeson qualified as AE import Data.Default (Default, def) import Data.Effectful.Hasql qualified as Hasql import Data.HashMap.Strict qualified as HM -import Data.Text qualified as T import Data.Text.Display (Display) import Data.Time import Data.Vector qualified as V @@ -88,6 +89,9 @@ data AnomalyVM = AnomalyVM , endpointMethod :: Maybe Text , endpointUrlPath :: Maybe Text , endpointHost :: Maybe Text + , serviceName :: Maybe Text + , keyKind :: Maybe Catalog.KeyKind + , scope :: Maybe (Aeson Catalog.Scope) , newFields :: V.Vector Text , modifiedFields :: V.Vector Text , fieldEvidence :: Aeson (V.Vector FieldEvidence) @@ -96,6 +100,21 @@ data AnomalyVM = AnomalyVM deriving anyclass (HI.DecodeRow) +-- | HTTP and non-HTTP schema observations have different telemetry identities. +data SchemaSubject = EndpointSchema Catalog.Scope | SpanSchema Catalog.Scope + deriving stock (Generic, Show) + deriving anyclass (AE.FromJSON, AE.ToJSON, NFData) + + +schemaSubject :: Catalog.KeyKind -> Catalog.Scope -> SchemaSubject +schemaSubject Catalog.HttpEndpoint = EndpointSchema +schemaSubject Catalog.SpanIdentity = SpanSchema + + +spanSchemaTitle :: Catalog.Scope -> Text +spanSchemaTitle scope = "Span schema changed" <> foldMap (": " <>) scope.spanName + + -- | Immutable observations at detection time; absence of a prior snapshot means a new field. data FieldEvidence = FieldEvidence { path :: !Text @@ -143,6 +162,9 @@ SELECT COALESCE(an.method, endpoints.method), COALESCE(an.url_path, endpoints.url_path), COALESCE(an.host, endpoints.host), + COALESCE(NULLIF(btrim(c.scope->>'service'), ''), NULLIF(btrim(endpoints.service_name), '')), + c.key_kind, + c.scope, an.new_fields, an.modified_fields, an.field_evidence @@ -150,6 +172,8 @@ from apis.anomalies an LEFT JOIN apis.endpoints ON an.project_id = endpoints.project_id AND endpoints.hash = split_part(an.target_hash, ':', 1) + LEFT JOIN apis.schema_catalog c ON c.project_id = an.project_id + AND c.key_hash = split_part(an.target_hash, ':', 1) where an.project_id=#{pid} AND an.target_hash=ANY(#{hash}) |] @@ -203,29 +227,5 @@ data FieldChangeKind = Modified | Added | Removed deriving anyclass (AE.FromJSON, AE.ToJSON, NFData) --- | Derive a service name from the path (@\/api\/v1\/auth\/login@ → @auth-service@), falling back to the host. --- --- The @api@ form skips the version segment, so @\/api\/v1\/auth\/…@ and @\/api\/v2\/auth\/…@ are --- one service rather than two: --- --- >>> detectService Nothing (Just "/api/v1/auth/login") --- "auth-service" --- >>> detectService Nothing (Just "/billing/invoices") --- "billing-service" --- --- Anything with no usable first segment — no path, a bare @\/@, or an @\/api@ too short to --- carry a service — falls back to the host, then to a constant: --- --- >>> detectService (Just "checkout.internal") (Just "/") --- "checkout.internal" --- >>> detectService Nothing Nothing --- "api-service" -detectService :: Maybe Text -> Maybe Text -> Text -detectService hostM endpointPathM = case maybe [] (T.splitOn "/" . T.dropWhile (== '/')) endpointPathM of - ("api" : _ : service : _) -> service <> "-service" - (service : _) | service /= "" -> service <> "-service" - _ -> fromMaybe "api-service" hostM - - -- $setup -- >>> :set -XOverloadedStrings diff --git a/src/Models/Apis/IssueEnhancement.hs b/src/Models/Apis/IssueEnhancement.hs index ec063b9d8..9a258cc84 100644 --- a/src/Models/Apis/IssueEnhancement.hs +++ b/src/Models/Apis/IssueEnhancement.hs @@ -114,20 +114,7 @@ buildTitlePrompt issue = |] case issue.issueType of Issues.ApiChange -> - withIssueData @Issues.APIChangeData issue "Generate a concise title for this API change." \d -> - if V.null d.newFields && V.null d.deletedFields && V.null d.modifiedFields - then - [fmtTrim|Generate a concise title for this newly discovered API endpoint. - Endpoint: {d.endpointMethod} {d.endpointPath} - Service: {Issues.serviceLabel issue.service} - This is a brand new endpoint that was just detected for the first time.|] - else - [fmtTrim|Generate a concise, descriptive title for this API change. - Endpoint: {d.endpointMethod} {d.endpointPath} - New fields: {V.length d.newFields} - Deleted fields: {V.length d.deletedFields} - Modified fields: {V.length d.modifiedFields} - Service: {Issues.serviceLabel issue.service}|] + withIssueData @Issues.APIChangeData issue "Generate a concise title for this schema observation." schemaObservationPrompt Issues.RuntimeException -> withIssueData @Issues.RuntimeExceptionData issue "Generate a concise title for this runtime exception." \d -> [fmtTrim|Generate a concise title for this runtime exception. @@ -218,21 +205,7 @@ buildDescriptionPrompt issue = |] case issue.issueType of Issues.ApiChange -> - withIssueData @Issues.APIChangeData issue "Describe this API change and its implications." \d -> - if V.null d.newFields && V.null d.deletedFields && V.null d.modifiedFields - then - [fmtTrim|Describe this newly discovered API endpoint. - Endpoint: {d.endpointMethod} {d.endpointPath} - Service: {Issues.serviceLabel issue.service} - This endpoint was just detected for the first time. Summarize what it likely does based on its path and method.|] - else - [fmtTrim|Describe this API change and its impact. - Endpoint: {d.endpointMethod} {d.endpointPath} - New fields: {show $ V.toList d.newFields} - Deleted fields: {show $ V.toList d.deletedFields} - Modified fields: {show $ V.toList d.modifiedFields} - Total anomalies grouped: {V.length d.anomalyHashes} - Service: {Issues.serviceLabel issue.service}|] + withIssueData @Issues.APIChangeData issue "Describe this schema observation." schemaObservationPrompt Issues.RuntimeException -> withIssueData @Issues.RuntimeExceptionData issue "Analyze this runtime exception." \d -> [fmtTrim|Analyze this runtime exception and provide debugging guidance. @@ -314,6 +287,13 @@ buildDescriptionPrompt issue = An error occurred in the same trace: {related}|] +schemaObservationPrompt :: Issues.APIChangeData -> Text +schemaObservationPrompt observation = + "Describe the observed schema data below. Use its subject to distinguish an HTTP endpoint from a span. " + <> "Do not invent HTTP details for a span, infer consumer breakage from sample/format changes, or infer required fields. " + <> decodeUtf8 (AE.encode observation) + + -- | Classify issue as critical/safe and count breaking/incremental changes classifyIssueCriticality :: ELLM.LLM :> es => AuthContext -> Issues.Issue -> Eff es (Either Text (Bool, Int, Int)) classifyIssueCriticality authCtx issue = (parse =<<) <$> askLLMLines authCtx (buildCriticalityPrompt issue) diff --git a/src/Models/Apis/Issues.hs b/src/Models/Apis/Issues.hs index b177f42aa..122cefbc6 100644 --- a/src/Models/Apis/Issues.hs +++ b/src/Models/Apis/Issues.hs @@ -34,6 +34,8 @@ module Models.Apis.Issues ( APIChangeData (..), apiChangeDataFrom, hasFieldDrift, + knownMethod, + knownHost, RuntimeExceptionData (..), QueryAlertData (..), ThresholdDirection (..), @@ -460,7 +462,9 @@ serviceLabel = fromMaybe "unknown-service" isNewEndpointOnly :: Issue -> Bool isNewEndpointOnly issue = case issuePayload issue of - Just (ApiChangeP d) -> not $ hasFieldDrift d + Just (ApiChangeP d) -> case d.subject of + Just (ApiChanges.SpanSchema _) -> False + _ -> not $ hasFieldDrift d _ -> False @@ -468,9 +472,16 @@ hasFieldDrift :: APIChangeData -> Bool hasFieldDrift d = not $ all V.null ([d.newFields, d.deletedFields, d.modifiedFields] :: [V.Vector Text]) +-- | The endpoint's method and host, absent the placeholders 'apiChangeDataFrom' stores for missing values. +knownMethod, knownHost :: APIChangeData -> Maybe Text +knownMethod d = mfilter (`notElem` ["", "UNKNOWN"]) $ Just $ T.strip d.endpointMethod +knownHost d = mfilter (`notElem` ["", "Unknown"]) $ Just $ T.strip d.endpointHost + + -- | API Change issue data data APIChangeData = APIChangeData - { endpointMethod :: Text + { subject :: Maybe ApiChanges.SchemaSubject + , endpointMethod :: Text , endpointPath :: Text , endpointHost :: Text , anomalyHashes :: V.Vector Text @@ -490,7 +501,8 @@ data APIChangeData = APIChangeData instance Semigroup APIChangeData where a <> b = b - { anomalyHashes = u (.anomalyHashes) + { subject = b.subject <|> a.subject + , anomalyHashes = u (.anomalyHashes) , shapeChanges = a.shapeChanges <> b.shapeChanges , formatChanges = a.formatChanges <> b.formatChanges , newFields = u (.newFields) @@ -858,6 +870,11 @@ selectIssues pid projection f = do AND ((^{col}is_framework AND ep.parent_hash = ^{col}target_hash) OR (NOT ^{col}is_framework AND ep.hash = ^{col}target_hash))), (^{col}issue_data->>'last_seen')::timestamptz) + WHEN ^{col}issue_type = ^{enumLit ApiChange} THEN COALESCE( + (SELECT MAX(an.created_at) FROM apis.anomalies an + WHERE an.project_id = ^{col}project_id + AND an.target_hash IN (SELECT jsonb_array_elements_text(^{col}issue_data->'anomaly_hashes'))), + ^{col}created_at) END, ^{col}updated_at) |] orderBy pfx | f.order == Just "-last_seen" = lastSeenAt pfx <> [HI.sql| DESC, ^{rawSql pfx}id DESC|] orderBy pfx = rawSql case T.uncons =<< f.order of @@ -946,13 +963,12 @@ selectIssues pid projection f = do pure (issues, total) --- | Fold an anomaly group's drift into an open API-change issue, escalating it on a breaking change. +-- | Fold observed schema drift into an open issue without inferring consumer compatibility. -- The row lock keeps concurrent jobs folding into the same issue from dropping each other's drift. updateIssueWithNewAnomaly :: (DB es, Time :> es) => IssueId -> NonEmpty ApiChanges.AnomalyVM -> Eff es () updateIssueWithNewAnomaly issueId anomalies = do now <- Time.currentTime let new = apiChangeDataFrom anomalies - breaking = not (V.null new.deletedFields && V.null new.modifiedFields) Hasql.transaction TxS.ReadCommitted TxS.Write do old <- Hasql.queryTx @[HI.OneColumn (Aeson AE.Value)] @@ -962,8 +978,7 @@ updateIssueWithNewAnomaly issueId anomalies = do [HI.sql| UPDATE apis.issues SET issue_data = issue_data || #{Aeson merged}::jsonb, - critical = critical OR #{breaking}, - severity = CASE WHEN #{breaking} THEN #{Critical} ELSE severity END, + service = #{(head anomalies).serviceName}, affected_requests = affected_requests + 1, updated_at = #{now} WHERE id = #{issueId} |] @@ -1327,7 +1342,8 @@ autoArchiveStaleDiscoveryIssues pid now days = apiChangeDataFrom :: NonEmpty ApiChanges.AnomalyVM -> APIChangeData apiChangeDataFrom anomalies@(a :| _) = APIChangeData - { endpointMethod = fromMaybe "UNKNOWN" a.endpointMethod + { subject = ApiChanges.schemaSubject <$> a.keyKind <*> (getAeson <$> a.scope) + , endpointMethod = fromMaybe "UNKNOWN" a.endpointMethod , endpointPath = fromMaybe "/" a.endpointUrlPath , endpointHost = fromMaybe "Unknown" a.endpointHost , anomalyHashes = V.fromList $ toList $ fmap (.targetHash) anomalies @@ -1346,23 +1362,23 @@ createAPIChangeIssue :: (Time :> es, UUIDEff :> es) => Projects.ProjectId -> Tex createAPIChangeIssue projectId endpointHash anomalies = do let firstAnomaly = head anomalies apiChangeData = apiChangeDataFrom anomalies - breakingChanges = V.length apiChangeData.deletedFields + V.length apiChangeData.modifiedFields - isCritical = breakingChanges > 0 mkIssue MkIssueOpts { projectId , targetHash = endpointHash , parentHash = Nothing , isFramework = False - , service = Just $ ApiChanges.detectService Nothing firstAnomaly.endpointUrlPath - , critical = isCritical - , severity = if isCritical then Critical else Warning - , title = - if any ((== ApiChanges.ATEndpoint) . (.anomalyType)) anomalies - then "New endpoint detected: " <> apiChangeData.endpointMethod <> " " <> apiChangeData.endpointPath <> " on " <> apiChangeData.endpointHost - else "API structure has changed" + , service = firstAnomaly.serviceName + , critical = False + , severity = Warning + , title = case apiChangeData.subject of + Just (ApiChanges.SpanSchema scope) -> ApiChanges.spanSchemaTitle scope + _ -> + if any ((== ApiChanges.ATEndpoint) . (.anomalyType)) anomalies + then "New endpoint detected: " <> apiChangeData.endpointMethod <> " " <> apiChangeData.endpointPath <> " on " <> apiChangeData.endpointHost + else "API schema changed" , recommendedAction = defaultRecommendedAction - , migrationComplexity = if breakingChanges > 5 then "high" else if breakingChanges > 0 then "medium" else "low" + , migrationComplexity = "low" , payload = ApiChangeP apiChangeData , timestamp = Just firstAnomaly.createdAt } diff --git a/src/Models/Projects/ImpactReviews.hs b/src/Models/Projects/ImpactReviews.hs index 0f79664fc..bfb25f375 100644 --- a/src/Models/Projects/ImpactReviews.hs +++ b/src/Models/Projects/ImpactReviews.hs @@ -68,6 +68,7 @@ data ReviewRun = ReviewRun , error :: Maybe Text , commentId :: Maybe Int64 , latestRevision :: Text + , createdAt :: UTCTime } deriving stock (Generic, Show) deriving anyclass (AE.FromJSON, HI.DecodeRow) @@ -179,7 +180,7 @@ selectRuns :: DB es => Maybe ProjectId -> Maybe ReviewId -> Eff es [ReviewRun] selectRuns pid rid = Hasql.interp [HI.sql|SELECT r.id, t.id, t.project_id, t.owner, t.repo, t.number::bigint, r.revision, - r.state, r.result, r.error, t.comment_id, t.latest_revision + r.state, r.result, r.error, t.comment_id, t.latest_revision, r.created_at FROM projects.pr_review_runs r JOIN projects.pr_review_threads t ON t.id = r.thread_id WHERE (#{pid}::uuid IS NULL OR t.project_id = #{pid}) AND (#{rid}::uuid IS NULL OR r.id = #{rid}) ORDER BY r.created_at DESC LIMIT 20|] diff --git a/src/Models/Projects/ProjectMemory.hs b/src/Models/Projects/ProjectMemory.hs index 554cc3dfe..6efbfb75c 100644 --- a/src/Models/Projects/ProjectMemory.hs +++ b/src/Models/Projects/ProjectMemory.hs @@ -1,4 +1,4 @@ -module Models.Projects.ProjectMemory (PagePath, mkPagePath, pagePathText, WriteError (..), pageAtPath, pageWindow, PageId, MemoryText, mkMemoryText, memoryText, Document (..), Author (..), Page (..), pageLimit, latestPages, pageHistory, writePage) where +module Models.Projects.ProjectMemory (PagePath, mkPagePath, pagePathText, WriteError (..), PageFilter (..), pageAtPath, pageWindow, PageId, MemoryText, mkMemoryText, memoryText, Document (..), Author (..), Page (..), pageLimit, latestPages, pageHistory, writePage) where import Data.Aeson qualified as AE import Data.Char (isAlphaNum, isAscii) @@ -161,15 +161,25 @@ pageAtPath :: DB es => UUIDId "project" -> PagePath -> Eff es (Maybe PageId) pageAtPath pid path = fmap HI.getOneColumn <$> Hasql.interpOne [HI.sql| SELECT page_id FROM projects.memory_pages WHERE project_id = #{pid} AND path = #{path} |] -pageWindow :: DB es => UUIDId "project" -> Maybe PagePath -> Eff es [Page] -pageWindow pid after = - Hasql.interp - [HI.sql| +-- | 'LinkingTo' matches both @[[path]]@ and @[[path|title]]@ wikilinks; 'Matching' is a case-insensitive substring of path, title or body. +data PageFilter = AllPages | Matching Text | LinkingTo PagePath + + +pageWindow :: DB es => UUIDId "project" -> PageFilter -> Maybe PagePath -> Eff es [Page] +pageWindow pid scope after = + let (search, target) = case scope of + AllPages -> (Nothing, Nothing) + Matching term -> (Just $ T.toLower term, Nothing) + LinkingTo path -> (Nothing, Just path) + in Hasql.interp + [HI.sql| SELECT p.page_id, r.version, r.document, r.author, r.created_at, p.path FROM projects.memory_pages p CROSS JOIN LATERAL ( SELECT version, document, author, created_at FROM projects.memory_revisions WHERE project_id = p.project_id AND page_id = p.page_id ORDER BY version DESC LIMIT 1 ) r WHERE p.project_id = #{pid} AND (#{after}::text IS NULL OR p.path > #{after}) + AND (#{search}::text IS NULL OR strpos(lower(p.path || ' ' || (r.document->>'title') || ' ' || (r.document->>'body')), #{search}) > 0) + AND (#{target}::text IS NULL OR p.path <> #{target} AND (strpos(r.document->>'body', '[[' || #{target} || ']]') > 0 OR strpos(r.document->>'body', '[[' || #{target} || '|') > 0)) ORDER BY p.path LIMIT #{pageLimit + 1} |] diff --git a/src/Pages/BodyWrapper.hs b/src/Pages/BodyWrapper.hs index 09baa8d9a..fb9dabae1 100644 --- a/src/Pages/BodyWrapper.hs +++ b/src/Pages/BodyWrapper.hs @@ -25,6 +25,7 @@ import Models.Projects.Projects qualified as Projects import NeatInterpolation (text) import Pages.CommandPalette qualified as CommandPalette import Pages.Components qualified as Components +import Pages.LogExplorer.LogItem qualified as LogItem import Pkg.DeriveUtils (DB, UUIDId, WrappedEnumShow (..), assetUrl, viteAssetFile) import PyF import Relude hiding (ask) @@ -230,6 +231,7 @@ data BWConfig = BWConfig , currProject :: Maybe Projects.Project , prePageTitle :: Maybe Text , pageTitle :: Text + , pageTitleUrl :: Maybe Text -- Link for a parent breadcrumb with a dynamic route. , pageTitleSuffix :: Maybe Text -- Additional breadcrumb after pageTitle (e.g., tab name) , pageTitleModalId :: Maybe Text -- Modal ID for renaming page title , pageTitleSuffixModalId :: Maybe Text -- Modal ID for renaming suffix (e.g., tab) @@ -243,6 +245,7 @@ data BWConfig = BWConfig , needsGridStack :: Bool , needsTagify :: Bool , headContent :: Maybe (Html ()) -- Optional HTML content to include in the head + , pageProvidesLogDetails :: Bool -- Explorer supplies its resizable panel; other project pages use the shell drawer. , globalDrawerContent :: Maybe (Html ()) , config :: EnvConfig -- Environment configuration for telemetry , envOptions :: V.Vector Text @@ -501,6 +504,8 @@ bodyWrapper bcfg child = do if bcfg.isSettingsPage then maybe child (\p -> settingsWrapper p.id bcfg.pageTitle child) bcfg.currProject else child + unless bcfg.pageProvidesLogDetails $ forM_ bcfg.currProject \p -> + LogItem.detailsPanel_ p.id Nothing LogItem.DrawerPanel div_ [class_ "h-0 shrink"] do Components.drawer_ "global-data-drawer" (isJust bcfg.globalDrawerContent) Nothing bcfg.globalDrawerContent "" -- Modal for copying widgets to other dashboards @@ -654,7 +659,7 @@ bodyWrapper bcfg child = do "" div_ [class_ "hidden group-has-[#ai-composer-routine:checked]/dialog:flex items-center justify-between gap-3 border-b border-base-300 px-4 py-3"] do label_ [Lucid.for_ "ai-routine-interval", class_ "text-xs font-medium text-textStrong"] "Run every" - select_ [id_ "ai-routine-interval", name_ "intervalMinutes", class_ "select select-sm h-8 min-h-8 border-strokeWeak bg-bgRaised text-xs text-textStrong"] do + select_ [id_ "ai-routine-interval", name_ "intervalMinutes", disabled_ "disabled", term "hx-live:disabled" "!q('#ai-composer-routine').checked", class_ "select select-sm h-8 min-h-8 border-strokeWeak bg-bgRaised text-xs text-textStrong"] do option_ [value_ "60", class_ "bg-bgRaised text-textStrong"] "Hour" option_ [value_ "1440", selected_ "selected", class_ "bg-bgRaised text-textStrong"] "Day" option_ [value_ "10080", class_ "bg-bgRaised text-textStrong"] "Week" @@ -746,7 +751,15 @@ sideNav sess project bcfg = aside_ [class_ "group/nav relative z-40 bg-fillWeake -- Collapsed: search icon button_ ([class_ "group-has-[#sidenav-toggle:checked]/pg:hidden flex items-center justify-center p-2 rounded-lg hover:bg-fillHover text-textWeak hover:text-textStrong cursor-pointer transition-colors duration-100", searchScript, Aria.label_ "Search"] <> tippyRight_ "Search (\x2318K)") do faSprite_ "sidebar-search" "regular" "w-4 h-4" - Components.segmented_ "hidden group-has-[#sidenav-toggle:checked]/pg:grid grid-cols-2 rounded-lg bg-fillWeak p-0.5 text-xs" "Sidebar view" "nav-view" "nav-view-" [("menu", "Navigate"), ("ai", "Assistant")] + let defaultView = bool "menu" "ai" (bcfg.menuItem == Just "AI") :: Text + Components.segmentedWith_ + [class_ "hidden group-has-[#sidenav-toggle:checked]/pg:grid grid-cols-2 rounded-lg bg-fillWeak p-0.5 text-xs"] + "Sidebar view" + "nav-view" + "nav-view-" + [ (view, label, [checked_ | view == defaultView] <> [term "hx-live:checked" ("this.value === (sessionStorage.getItem('sidebar-view') || '" <> defaultView <> "')"), [__|on input call sessionStorage.setItem('sidebar-view', my.value)|]]) + | (view, label) <- [("menu", "Navigate"), ("ai", "Assistant")] + ] nav_ [id_ "main-sidenav", class_ "mt-2 min-h-0 overflow-x-hidden overflow-y-auto flex flex-col gap-1 text-textWeak group-has-[#nav-view-ai:checked]/nav:hidden [&_.main-nav-link.active]:bg-fillBrand-weak [&_.main-nav-link.active]:text-textStrong [&_.main-nav-link.active]:font-medium [&_.main-nav-link.active]:border-l-strokeBrand-strong [&_.main-nav-link.active]:border-y-transparent [&_.main-nav-link.active]:border-r-transparent [&_.main-nav-link.active_.nav-icon]:text-textBrand", [__|on click set #mobile-nav-toggle.checked to false end|]] do let pidTxt = project.id.toText flyoutLink (linkText, link) = @@ -1024,12 +1037,12 @@ navbar bcfg menuL = toHtml pt faSprite_ "chevron-right" "regular" "w-3 h-3 max-md:hidden" h1_ [class_ "flex min-w-0 items-center text-textStrong"] do - let targetPageM = Components.getTargetPage bcfg.pageTitle <* bcfg.pageTitleSuffix + let targetPageM = bcfg.pageTitleUrl <|> ((\p path -> "/p/" <> p.id.toText <> path) <$> bcfg.currProject <*> (Components.getTargetPage bcfg.pageTitle <* bcfg.pageTitleSuffix)) case targetPageM of - Just targetPage -> whenJust bcfg.currProject \p -> a_ ([class_ "max-w-48 truncate rounded-md p-1 py-2 text-xl font-semibold leading-none text-textStrong hover:bg-fillWeak max-md:max-w-24 max-md:text-sm", href_ $ "/p/" <> p.id.toText <> targetPage, id_ "pageTitleText"] <> navTabAttrs) $ toHtml bcfg.pageTitle + Just targetPage -> a_ ([class_ "max-w-[40ch] truncate rounded-md p-1 py-2 text-xl font-semibold leading-none text-textStrong hover:bg-fillWeak max-md:max-w-24 max-md:text-sm", href_ targetPage, id_ "pageTitleText", title_ bcfg.pageTitle] <> navTabAttrs) $ toHtml bcfg.pageTitle Nothing -> case bcfg.pageTitleModalId of - Just modalId -> label_ [class_ "max-w-48 truncate rounded-md p-1 py-2 text-xl font-semibold leading-none text-textStrong cursor-pointer hover:bg-fillWeak focus-visible:outline-2 focus-visible:outline-offset-2 max-md:max-w-24 max-md:text-sm", Lucid.for_ modalId, id_ "pageTitleText", role_ "button", tabindex_ "0", Aria.label_ $ "Rename " <> bcfg.pageTitle, Components.keyboardActivateAttr_] $ toHtml bcfg.pageTitle - Nothing -> span_ [class_ "max-w-48 truncate p-1 py-2 text-xl font-semibold leading-none text-textStrong max-md:max-w-24 max-md:text-sm", id_ "pageTitleText"] $ toHtml bcfg.pageTitle + Just modalId -> label_ [class_ "max-w-[40ch] truncate rounded-md p-1 py-2 text-xl font-semibold leading-none text-textStrong cursor-pointer hover:bg-fillWeak focus-visible:outline-2 focus-visible:outline-offset-2 max-md:max-w-24 max-md:text-sm", Lucid.for_ modalId, id_ "pageTitleText", title_ bcfg.pageTitle, role_ "button", tabindex_ "0", Aria.label_ $ "Rename " <> bcfg.pageTitle, Components.keyboardActivateAttr_] $ toHtml bcfg.pageTitle + Nothing -> span_ [class_ "max-w-[40ch] truncate p-1 py-2 text-xl font-semibold leading-none text-textStrong max-md:max-w-24 max-md:text-sm", id_ "pageTitleText", title_ bcfg.pageTitle] $ toHtml bcfg.pageTitle -- Show tab/suffix in breadcrumbs if present (with ID for htmx out-of-band updates) span_ [id_ "pageTitleSuffix", class_ "max-md:hidden flex items-center gap-1"] $ whenJust bcfg.pageTitleSuffix \suffix -> do faSprite_ "chevron-right" "regular" "w-3 h-3" diff --git a/src/Pages/CodeContext.hs b/src/Pages/CodeContext.hs index 71ac21806..e31cf1f22 100644 --- a/src/Pages/CodeContext.hs +++ b/src/Pages/CodeContext.hs @@ -12,11 +12,12 @@ module Pages.CodeContext (wikiGetH, memoryGetH, memoryPostH, MemoryForm (..), Wi import BackgroundJobs.Types qualified as Jobs import Commonmark qualified as Markdown import Commonmark.Blocks qualified as MarkdownBlocks -import Commonmark.Extensions (gfmExtensions) +import Commonmark.Extensions (HasWikilinks (..), TitlePosition (..), gfmExtensions, wikilinksSpec) import Commonmark.Tag qualified as MarkdownTag import Commonmark.TokParsers (symbol) import Data.Aeson qualified as AE import Data.Aeson.Types qualified as AET +import Data.Algorithm.Diff qualified as Diff import Data.Cache qualified as Cache import Data.Default (def) import Data.Effectful.Hasql qualified as Hasql @@ -27,6 +28,7 @@ import Data.Map.Strict qualified as Map import Data.Pool (withResource) import Data.Text qualified as T import Data.UUID qualified as UUID +import Data.Vector qualified as V import Data.Yaml qualified as Yaml import Effectful (Eff, IOE, (:>)) import Effectful.Error.Static (throwError) @@ -43,10 +45,10 @@ import Models.Projects.ProjectMembers qualified as ProjectMembers import Models.Projects.ProjectMemory qualified as Memory import Models.Projects.Projects qualified as Projects import Models.Projects.RepositorySync qualified as RepositorySync -import Network.HTTP.Types.URI (urlEncode) import OddJobs.Job (createJob) import Pages.BodyWrapper (BWConfig (..), PageCtx (..), bodyWrapper, mkPageCtx) -import Pages.Components (BadgeColor (..), FieldCfg (..), FieldSize (..), colorChip_, disclosure_, filterInputAttr_, formField_, formSelectField_, installationSettingsLink_, options_) +import Pages.Components (BadgeColor (..), FieldCfg (..), FieldSize (..), PanelCfg (..), PanelStyle (..), callout_, colorChip_, disclosure_, filterInputAttr_, formField_, formSelectField_, installationSettingsLink_, localTimeFmt_, options_, panel_, settingsH2_) +import Pkg.Components.Table qualified as Table import Pkg.DeriveUtils (UUIDId (..)) import Pkg.Git qualified as Git import Pkg.ImpactReview qualified as ImpactReview @@ -57,7 +59,8 @@ import System.Logging qualified as Log import System.Types (ATAuthCtx, RespHeaders, addErrorToast, addRespHeaders, addSuccessToast, redirectCS) import Text.HTML.SanitizeXSS (sanitizeBalance) import Text.Parsec qualified as Parsec -import Utils (LoadingSize (..), faSprite_, htmxIndicator_, nonEmptyT, renderMarkdown) +import Text.Slugify (slugify) +import Utils (LoadingSize (..), TabStrip (..), faSprite_, htmxIndicator_, navTabStrip_, nonEmptyT, renderMarkdown, toUriStr) import Web.Auth (demoGuestSessionId) import Web.FormUrlEncoded (FromForm) import Web.HttpApiData (FromHttpApiData (..)) @@ -92,7 +95,7 @@ codeContextH pid fileM lineM svcM revM = do toHtml msg whenJust fixPathM \path -> a_ - [ href_ ("/p/" <> pid.toText <> "/repositories?sample=" <> decodeUtf8 (urlEncode True $ encodeUtf8 path)) + [ href_ ("/p/" <> pid.toText <> "/repositories?sample=" <> toUriStr path) , class_ "not-italic text-textBrand underline shrink-0" ] "Choose a repository" @@ -142,43 +145,64 @@ data MemoryForm = MemoryForm {pageId :: Memory.PageId, version :: Word32, path : deriving anyclass (FromForm) -data WikiSelection = NewPage | ById Memory.PageId | ByPath Memory.PagePath +-- | @NewPage@ carries the path to prefill; @Landing@ is the wiki index. +data WikiSelection = Landing | NewPage Text | ById Memory.PageId | ByPath Memory.PagePath data WikiTree = WikiTree (Maybe Memory.Page) (Map Text WikiTree) -wikiGetH :: Projects.ProjectId -> [Text] -> Maybe Memory.PagePath -> ATAuthCtx (RespHeaders (PageCtx WikiGet)) -wikiGetH pid segments after = do +-- | Markdown rendered for the wiki, where @[[path|label]]@ links to another page. +data WikiDoc + + +instance Markdown.Rangeable (Markdown.Html WikiDoc) where + ranged _ = id + + +-- | Valid targets become @wiki:@ hrefs that the renderer resolves to the project wiki; others stay plain text. +instance {-# OVERLAPPING #-} HasWikilinks (Markdown.Html WikiDoc) where + wikilink target label = either (const label) (\path -> Markdown.addAttribute ("class", "wikilink") $ Markdown.link ("wiki:" <> Memory.pagePathText path) "" label) $ Memory.mkPagePath target + + +wikiGetH :: Projects.ProjectId -> [Text] -> Maybe Memory.PagePath -> Maybe Text -> Maybe Text -> Bool -> ATAuthCtx (RespHeaders (PageCtx WikiGet)) +wikiGetH pid segments after search folder edit = do when (any (T.any (== '/')) segments) $ throwError err404 - selection <- if null segments then pure NewPage else either (const $ throwError err404) (pure . ByPath) $ Memory.mkPagePath $ T.intercalate "/" segments - memoryPageH pid selection after Nothing + selection <- if null segments then pure $ maybe Landing (NewPage . (\f -> bool (f <> "/") "" $ T.null f) . T.dropAround (== '/')) folder else either (const $ throwError err404) (pure . ByPath) $ Memory.mkPagePath $ T.intercalate "/" segments + memoryPageH pid selection after (nonEmptyT $ T.strip <$> search) edit Nothing memoryGetH :: Projects.ProjectId -> Maybe Memory.PageId -> ATAuthCtx (RespHeaders (PageCtx WikiGet)) -memoryGetH pid page = memoryPageH pid (maybe NewPage ById page) Nothing Nothing +memoryGetH pid page = memoryPageH pid (maybe Landing ById page) Nothing Nothing False Nothing memoryPostH :: Projects.ProjectId -> MemoryForm -> ATAuthCtx (RespHeaders (PageCtx WikiGet)) memoryPostH pid form = do requireReviewWrite pid session <- Projects.getSession - case (,) <$> traverse Memory.mkPagePath form.path <*> (Memory.Document <$> Memory.mkMemoryText form.title <*> Memory.mkMemoryText form.body) of - Left message -> memoryPageH pid (ById form.pageId) Nothing (Just (form, message)) - Right (path, document) -> do - saved <- Memory.writePage pid form.pageId form.version path document $ Memory.Member session.user.id - case saved of - Left failure -> memoryPageH pid (ById form.pageId) Nothing (Just (form, case failure of Memory.StaleRevision -> "This page changed while you were editing. Your draft is below. Open the latest revision before saving again."; Memory.PathTaken -> "Another page already uses this path. Your draft is below. Choose a different path.")) + -- A blank path, or one ending in a folder, takes its page name from the title. + let named path = bool path (path <> slugify form.title) $ T.null path || "/" `T.isSuffixOf` path + case (,) <$> traverse (Memory.mkPagePath . named . T.strip) form.path <*> (Memory.Document <$> Memory.mkMemoryText form.title <*> Memory.mkMemoryText form.body) of + Left message -> redraft message + Right (path, document) -> + Memory.writePage pid form.pageId form.version path document (Memory.Member session.user.id) >>= \case + Left Memory.StaleRevision -> redraft "This page changed while you were editing. Your draft is below. Open the latest revision before saving again." + Left Memory.PathTaken -> redraft "Another page already uses this path. Your draft is below. Choose a different path." Right page -> do addSuccessToast "Wiki page saved" Nothing redirectCS $ "/p/" <> pid.toText <> "/wiki/" <> Memory.pagePathText page.path memoryGetH pid $ Just form.pageId + where + redraft message = memoryPageH pid (ById form.pageId) Nothing Nothing False (Just (form, message)) data WikiGet = WikiGet { projectId :: Projects.ProjectId , canEdit :: Bool + , editing :: Bool , pages :: [Memory.Page] + , search :: Maybe Text + , backlinks :: [Memory.Page] , history :: [Memory.Page] , form :: MemoryForm , message :: Maybe Text @@ -186,151 +210,190 @@ data WikiGet = WikiGet deriving stock (Generic, Show) -memoryPageH :: Projects.ProjectId -> WikiSelection -> Maybe Memory.PagePath -> Maybe (MemoryForm, Text) -> ATAuthCtx (RespHeaders (PageCtx WikiGet)) -memoryPageH pid selection after draft = do +memoryPageH :: Projects.ProjectId -> WikiSelection -> Maybe Memory.PagePath -> Maybe Text -> Bool -> Maybe (MemoryForm, Text) -> ATAuthCtx (RespHeaders (PageCtx WikiGet)) +memoryPageH pid selection after search editRequested draft = do (session, _, bw) <- mkPageCtx pid when (session.persistentSession.id == demoGuestSessionId) $ throwError err404 canEdit <- maybe False (>= ProjectMembers.PEdit) <$> ProjectMembers.getUserPermission pid session.user.id - selected <- case selection of - NewPage -> pure Nothing - ById page -> pure $ Just page - ByPath path -> Just <$> (maybe (throwError err404) pure =<< Memory.pageAtPath pid path) - pages <- Memory.pageWindow pid after + -- @newPath@ is the path a new page starts at; an editor following a link to a missing page gets one there. + (selected, newPath) <- case selection of + Landing -> pure (Nothing, Nothing) + NewPage path -> pure (Nothing, Just path) + ById page -> pure (Just page, Nothing) + ByPath path -> + Memory.pageAtPath pid path >>= \case + Just page -> pure (Just page, Nothing) + Nothing | canEdit -> pure (Nothing, Just $ Memory.pagePathText path) + Nothing -> throwError err404 + pages <- Memory.pageWindow pid (maybe Memory.AllPages Memory.Matching search) after history <- maybe (pure []) (Memory.pageHistory pid) selected let current = listToMaybe history when (isJust selected && isNothing current && isNothing draft) $ throwError err404 + backlinks <- maybe (pure []) (\page -> Memory.pageWindow pid (Memory.LinkingTo page.path) Nothing) current fresh <- maybe (UUIDId <$> UUIDEff.genUUID) pure selected - let edit = maybe (MemoryForm fresh 0 (Just "") "" "") (\page -> MemoryForm page.id (fromIntegral page.version) (Just $ Memory.pagePathText page.path) (Memory.memoryText page.document.title) (Memory.memoryText page.document.body)) current - addRespHeaders $ PageCtx bw{pageTitle = "Repositories"} $ WikiGet pid canEdit pages history (maybe edit fst draft) (snd <$> draft) + let edit = maybe (MemoryForm fresh 0 (newPath <|> Just "") "" "") (\page -> MemoryForm page.id (fromIntegral page.version) (Just $ Memory.pagePathText page.path) (Memory.memoryText page.document.title) (Memory.memoryText page.document.body)) current + let editing = canEdit && (editRequested || isJust draft || isJust newPath) + base = "/p/" <> pid.toText <> "/wiki" + pageLink page = base <> "/" <> Memory.pagePathText page.path + actions = div_ [class_ "flex items-center gap-2"] case (editing, current) of + (True, _) -> do + span_ [id_ "wiki-dirty", hidden_ "", class_ "text-xs text-textWeak", [__|on input from #wiki-form remove @hidden from me|]] "Unsaved changes" + for_ current \page -> a_ [href_ $ pageLink page, class_ "btn btn-ghost btn-sm", [__|on click if #wiki-dirty.hidden is false and not confirm('Discard unsaved changes?') halt the event|]] "Cancel" + button_ [type_ "submit", term "form" "wiki-form", title_ "Save (\x2318S)", class_ "btn btn-primary btn-sm"] "Save page" + (False, Just page) -> a_ (class_ "btn btn-primary btn-sm gap-1.5" : repositoryNavAttrs (pageLink page <> "?edit=true")) $ faSprite_ "pen-to-square" "regular" "h-3.5 w-3.5" >> "Edit" + (False, Nothing) -> a_ (class_ "btn btn-primary btn-sm gap-1.5" : repositoryNavAttrs (base <> "?folder=")) $ faSprite_ "plus" "regular" "h-3.5 w-3.5" >> "New page" + addRespHeaders $ PageCtx (repositoryBWConfig bw pid Wiki Nothing canEdit True){pageActions = actions <$ guard canEdit} $ WikiGet pid canEdit editing pages search backlinks history (maybe edit fst draft) (snd <$> draft) instance ToHtml WikiGet where - toHtml WikiGet{projectId = pid, canEdit, pages, history, form, message} = toHtmlRaw $ repositoryLayout_ pid Wiki Nothing canEdit True do + toHtml WikiGet{projectId = pid, canEdit, editing, pages, search, backlinks, history, form, message} = toHtmlRaw $ repositoryLayout_ Nothing do let current = listToMaybe history base = "/p/" <> pid.toText <> "/wiki" pageLink page = base <> "/" <> Memory.pagePathText page.path visible = take Memory.pageLimit pages displayed = visible <> [page | page <- maybeToList current, all ((/= page.id) . (.id)) visible] + title page = toHtml $ Memory.memoryText page.document.title authorName = \case Memory.Member _ -> "Project member"; Memory.Agent _ -> "Agent" - baseSyntax = gfmExtensions <> Markdown.defaultSyntaxSpec + edited page = span_ [class_ "tabular-nums"] do + toHtml @Text $ "Revision " <> show page.version <> " · " <> authorName page.author <> " · " + localTimeFmt_ "MMM d, yyyy HH:mm" page.updatedAt + baseSyntax = wikilinksSpec TitleAfterPipe <> gfmExtensions <> Markdown.defaultSyntaxSpec -- Embedded HTML is text; only Markdown constructs may create markup. syntax = baseSyntax - { Markdown.syntaxBlockSpecs = filter ((/= (MarkdownBlocks.rawHtmlSpec @Identity @(Markdown.Html ()) @(Markdown.Html ())).blockType) . (.blockType)) baseSyntax.syntaxBlockSpecs + { Markdown.syntaxBlockSpecs = filter ((/= (MarkdownBlocks.rawHtmlSpec @Identity @(Markdown.Html WikiDoc) @(Markdown.Html WikiDoc)).blockType) . (.blockType)) baseSyntax.syntaxBlockSpecs , Markdown.syntaxInlineParsers = (Markdown.str . Markdown.untokenize <$> Parsec.try ((:) <$> symbol '<' <*> MarkdownTag.htmlTag)) : baseSyntax.syntaxInlineParsers } - pageBody body = div_ [class_ "prose prose-sm max-w-none break-words text-sm text-textStrong [&_pre]:overflow-x-auto"] $ case runIdentity $ Markdown.commonmarkWith syntax "" body of + pageBody body = div_ [class_ "prose max-w-none break-words text-textStrong [&_pre]:overflow-x-auto"] $ case runIdentity $ Markdown.commonmarkWith syntax "" body of Left _ -> toHtml body - Right (parsed :: Markdown.Html ()) -> toHtmlRaw $ sanitizeBalance $ toStrict $ Markdown.renderHtml parsed - div_ [class_ "grid gap-6 md:grid-cols-[15rem_minmax(0,1fr)]"] do - nav_ [Aria.label_ "Wiki pages", class_ "space-y-3", term "preload" "mouseover"] do - when canEdit $ a_ (class_ "btn btn-sm btn-ghost" : repositoryNavAttrs base) "New page" - when (null pages) $ p_ [class_ "text-sm text-textWeak"] "No wiki pages yet. Record service context, investigation notes, or runbooks here." + Right (parsed :: Markdown.Html WikiDoc) -> toHtmlRaw $ sanitizeBalance $ T.replace "href=\"wiki:" ("href=\"" <> base <> "/") $ toStrict $ Markdown.renderHtml parsed + revisionLines page = ("Title: " <> Memory.memoryText page.document.title) : "" : lines (Memory.memoryText page.document.body) + revisionDiff old new = pre_ [class_ "overflow-x-auto rounded-lg bg-fillWeak py-2 text-xs leading-relaxed"] $ for_ (Diff.getGroupedDiff (revisionLines old) (revisionLines new)) \case + Diff.First removed -> diffLines "bg-fillError-weak text-textError" "- " removed + Diff.Second added -> diffLines "bg-fillSuccess-weak text-textSuccess" "+ " added + Diff.Both same _ -> diffLines "text-textWeak" " " $ if length same > 5 then take 2 same <> ["\x22EF " <> show (length same - 4) <> " unchanged lines"] <> drop (length same - 2) same else same + where + diffLines cls sigil = traverse_ \line -> span_ [class_ $ "block whitespace-pre-wrap break-words px-2 " <> cls] $ toHtml @Text $ sigil <> line + newPageIn folder = a_ ([Aria.label_ $ "New page in " <> folder, title_ "New page", class_ "btn btn-ghost btn-xs btn-square shrink-0 opacity-0 group-hover/row:opacity-100 focus-visible:opacity-100"] <> repositoryNavAttrs (base <> "?folder=" <> toUriStr folder)) $ faSprite_ "plus" "regular" "h-3 w-3" + div_ [class_ "grid min-h-full md:grid-cols-[16rem_minmax(0,1fr)]"] do + nav_ [Aria.label_ "Wiki pages", class_ "min-w-0 space-y-3 border-strokeWeak pb-6 md:sticky md:top-0 md:max-h-[calc(100dvh-8rem)] md:self-start md:overflow-y-auto md:border-r md:pr-3", term "preload" "mouseover"] do + div_ [class_ "flex items-center justify-between gap-2 ps-2"] do + span_ [class_ "text-xs font-semibold uppercase tracking-wider text-textWeak"] "Pages" + when canEdit $ a_ ([Aria.label_ "New page", title_ "New page", class_ "btn btn-ghost btn-sm btn-square"] <> repositoryNavAttrs (base <> "?folder=")) $ faSprite_ "plus" "regular" "h-3.5 w-3.5" + form_ [method_ "get", action_ base, role_ "search", class_ "relative"] do + faSprite_ "magnifying-glass" "regular" "pointer-events-none absolute start-2.5 top-1/2 z-10 h-3.5 w-3.5 -translate-y-1/2 text-iconNeutral" + input_ [type_ "search", id_ "wiki-search", name_ "q", value_ $ fromMaybe "" search, placeholder_ "Search pages", Aria.label_ "Search wiki pages", class_ "input input-sm w-full ps-8", hxGet_ base, hxTrigger_ "input changed delay:300ms, search", hxTarget_ "#repository-content", hxSelect_ "#repository-content", hxSwap_ "outerMorph", hxPushUrl_ "true"] + when (null pages) $ p_ [class_ "px-2 text-sm text-textWeak"] $ maybe "No pages yet." (\q -> toHtml $ "No pages match \x201C" <> q <> "\x201D.") search let insert page [] (WikiTree _ children) = WikiTree (Just page) children insert page (segment : rest) (WikiTree item children) = WikiTree item $ Map.alter (Just . insert page rest . fromMaybe (WikiTree Nothing mempty)) segment children tree = foldr (\page -> insert page $ T.splitOn "/" $ Memory.pagePathText page.path) (WikiTree Nothing mempty) displayed - renderTree prefix (WikiTree _ children) = ul_ [class_ "space-y-1 border-l border-strokeWeak pl-3"] $ for_ (Map.toAscList children) \(segment, branch@(WikiTree page descendants)) -> li_ do - let link item = a_ ([class_ $ "block rounded-md px-2 py-2 text-sm text-textBrand hover:bg-fillWeak break-words focus-visible:outline-2 focus-visible:outline-strokeBrand-strong" <> bool "" " bg-fillBrand-weak font-medium" (Just item.id == ((.id) <$> current)), title_ $ Memory.memoryText item.document.title] <> [term "aria-current" "page" | Just item.id == ((.id) <$> current)] <> repositoryNavAttrs (pageLink item)) $ toHtml segment + isCurrent item = Just item.id == ((.id) <$> current) + link item = a_ ([class_ $ "flex min-w-0 items-center gap-2 rounded-md px-2 py-1.5 text-sm focus-visible:outline-2 focus-visible:outline-strokeFocus " <> bool "text-textWeak hover:bg-fillWeak hover:text-textStrong" "bg-fillBrand-weak font-medium text-textStrong" (isCurrent item), title_ $ Memory.pagePathText item.path] <> [term "aria-current" "page" | isCurrent item] <> repositoryNavAttrs (pageLink item)) do + faSprite_ "file-lines" "regular" "h-3.5 w-3.5 shrink-0" + span_ [class_ "truncate"] $ title item + renderTree prefix (WikiTree _ children) = ul_ [class_ "space-y-px"] $ for_ (Map.toAscList children) \(segment, branch@(WikiTree page descendants)) -> li_ do + let folder = T.intercalate "/" (prefix <> [segment]) + holdsCurrent = maybe True (\item -> Memory.pagePathText item.path == folder || (folder <> "/") `T.isPrefixOf` Memory.pagePathText item.path) current if Map.null descendants then for_ page link - else details_ ([class_ "py-1"] <> [open_ "" | maybe False (\item -> let path = T.intercalate "/" (prefix <> [segment]) in Memory.pagePathText item.path == path || (path <> "/") `T.isPrefixOf` Memory.pagePathText item.path) current || isNothing current]) do - summary_ [class_ "cursor-pointer py-2 text-sm font-medium text-textStrong"] $ toHtml segment - for_ page link - renderTree (prefix <> [segment]) branch - renderTree [] tree + else details_ ([class_ "group/folder"] <> [open_ "" | holdsCurrent]) do + summary_ [class_ "group/row flex cursor-pointer list-none items-center gap-1 rounded-md py-1 ps-1 pe-1 text-sm text-textStrong hover:bg-fillWeak [&::-webkit-details-marker]:hidden"] do + faSprite_ "chevron-right" "regular" "h-3 w-3 shrink-0 text-iconNeutral transition-transform group-open/folder:rotate-90" + faSprite_ "folder" "regular" "h-3.5 w-3.5 shrink-0 text-iconNeutral" + span_ [class_ "min-w-0 flex-1 truncate"] $ toHtml segment + when canEdit $ newPageIn folder + div_ [class_ "ms-3 border-s border-strokeWeak ps-1"] do + for_ page link + renderTree (prefix <> [segment]) branch + case search of + Nothing -> renderTree [] tree + Just _ -> ul_ [class_ "space-y-px"] $ for_ visible \page -> li_ $ a_ (class_ "block rounded-md px-2 py-1.5 hover:bg-fillWeak" : repositoryNavAttrs (pageLink page)) do + span_ [class_ "block truncate text-sm text-textStrong"] $ title page + span_ [class_ "block truncate font-mono text-xs text-textWeak"] $ toHtml $ Memory.pagePathText page.path when (length pages > Memory.pageLimit) $ for_ (viaNonEmpty last visible) \page -> - a_ (class_ "block py-2 text-sm text-textBrand hover:underline" : repositoryNavAttrs (base <> "?after=" <> decodeUtf8 (urlEncode True $ encodeUtf8 $ Memory.pagePathText page.path))) "More pages" - section_ [class_ "min-w-0 space-y-5"] do - h2_ [class_ "text-lg font-semibold text-textStrong"] $ toHtml $ maybe "New wiki page" (Memory.memoryText . (.document.title)) current - for_ current \page -> nav_ [Aria.label_ "Wiki breadcrumb", class_ "flex flex-wrap gap-1 text-xs text-textWeak"] do - a_ (class_ "text-textBrand hover:underline" : repositoryNavAttrs base) "Wiki" - for_ (T.splitOn "/" $ Memory.pagePathText page.path) \segment -> do - span_ [Aria.hidden_ "true"] "/" - span_ [class_ "break-all"] $ toHtml segment - p_ [class_ "text-sm text-textWeak"] "Shared project notes and runbooks. Check dated conclusions against current source and telemetry." - for_ current \page -> do - p_ [class_ "text-xs text-textWeak"] $ toHtml @Text $ authorName page.author <> " · Revision " <> show page.version <> " · " <> show page.updatedAt - pageBody $ Memory.memoryText page.document.body - when canEdit $ details_ ([class_ "border-t border-strokeWeak pt-4"] <> [open_ "" | isNothing current || isJust message]) do - summary_ [class_ "cursor-pointer text-sm font-medium text-textStrong"] $ if isNothing current then "Write a page" else "Edit this page" - form_ [method_ "post", action_ ("/p/" <> pid.toText <> "/memories"), hxPost_ ("/p/" <> pid.toText <> "/memories"), hxTarget_ "#repository-content", hxSelect_ "#repository-content", hxSwap_ "outerHTML", class_ "mt-4 space-y-4"] do - input_ [type_ "hidden", name_ "pageId", value_ form.pageId.toText] - input_ [type_ "hidden", name_ "version", value_ $ show form.version] - for_ message $ p_ [id_ "memory-error", role_ "alert", class_ "text-sm text-textError"] . toHtml - label_ [term "for" "memory-path", class_ "block space-y-1 text-sm font-medium text-textStrong"] do - span_ "Page path (required)" - input_ ([id_ "memory-path", name_ "path", required_ "", maxlength_ "512", placeholder_ "runbooks/payments/retries", value_ $ fromMaybe "" form.path, class_ "input input-bordered w-full"] <> [Aria.describedby_ "memory-error" | isJust message]) - label_ [term "for" "memory-title", class_ "block space-y-1 text-sm font-medium text-textStrong"] do - span_ "Title (required)" - input_ ([id_ "memory-title", name_ "title", required_ "", maxlength_ "120", value_ form.title, class_ "input input-bordered w-full"] <> [Aria.describedby_ "memory-error" | isJust message]) - term "wiki-editor" [class_ "block", term "data-mode" "source"] do - div_ [hidden_ "", term "data-editor-controls" "", class_ "mb-3 space-y-2 text-sm text-textStrong"] do - label_ do - "Editing mode " - select_ [term "data-editor-mode" "", class_ "select select-bordered select-sm"] do - option_ [value_ "rich"] "Rich text" - option_ [value_ "source"] "Markdown source" - div_ [term "data-editor-formatting" "", class_ "flex flex-wrap gap-1", role_ "group", Aria.label_ "Text formatting"] - $ for_ - ( [ ("Bold", "ToggleStrong", Nothing) - , ("Italic", "ToggleEmphasis", Nothing) - , ("Inline code", "ToggleInlineCode", Nothing) - , ("Paragraph", "TurnIntoText", Nothing) - , ("Heading 1", "WrapInHeading", Just "1") - , ("Heading 2", "WrapInHeading", Just "2") - , ("Bullet list", "WrapInBulletList", Nothing) - , ("Numbered list", "WrapInOrderedList", Nothing) - , ("Quote", "WrapInBlockquote", Nothing) - , ("Code block", "CreateCodeBlock", Nothing) - , ("Undo", "Undo", Nothing) - , ("Redo", "Redo", Nothing) - ] - :: [(Text, Text, Maybe Text)] - ) - \(label, command, parameter) -> - button_ ([type_ "button", term "data-editor-command" command, class_ "btn btn-sm btn-ghost focus-visible:outline-2 focus-visible:outline-offset-2"] <> maybe [] (pure . term "data-editor-parameter") parameter) $ toHtml label - label_ [term "for" "memory-body", class_ "block space-y-1 text-sm font-medium text-textStrong"] do - span_ [id_ "memory-body-label"] "Page content (required)" - textarea_ ([id_ "memory-body", name_ "body", required_ "", maxlength_ "16000", rows_ "12", class_ "textarea textarea-bordered w-full text-sm font-normal"] <> [Aria.describedby_ "memory-error" | isJust message]) $ toHtml form.body - div_ [term "data-rich-editor" "", hidden_ "", class_ "mt-2 rounded-md border border-strokeWeak"] pass - p_ [term "data-editor-status" "", role_ "status", class_ "mt-2 text-xs text-textWeak"] "Content is saved as Markdown." - button_ [type_ "submit", class_ "btn btn-sm btn-primary"] "Save page" - unless (null history) $ details_ [class_ "border-t border-strokeWeak pt-4"] do - summary_ [class_ "cursor-pointer text-sm font-medium text-textStrong"] "Revision history" - when (length history == Memory.pageLimit) $ p_ [class_ "mt-3 text-sm text-textWeak"] $ toHtml @Text $ "Showing the " <> show Memory.pageLimit <> " most recent revisions. Older revisions remain stored." - div_ [class_ "mt-3 divide-y divide-strokeWeak"] $ for_ history \page -> details_ [class_ "py-3"] do - summary_ [class_ "cursor-pointer text-sm text-textWeak"] $ toHtml @Text $ "Revision " <> show page.version <> " · " <> authorName page.author <> " · " <> show page.updatedAt - h3_ [class_ "mt-3 text-sm font-semibold text-textStrong"] $ toHtml $ Memory.memoryText page.document.title - div_ [class_ "mt-2"] $ pageBody $ Memory.memoryText page.document.body + a_ (class_ "block px-2 py-1.5 text-sm text-textBrand hover:underline" : repositoryNavAttrs (base <> "?after=" <> toUriStr (Memory.pagePathText page.path) <> foldMap (("&q=" <>) . toUriStr) search)) "More pages" + article_ [class_ "min-w-0 pb-16 md:px-10"] do + header_ [class_ "sticky top-0 z-10 flex min-h-12 flex-wrap items-center gap-x-3 gap-y-1 border-b border-strokeWeak bg-bgBase py-2"] do + nav_ [Aria.label_ "Wiki breadcrumb", class_ "flex min-w-0 flex-1 items-center gap-1 text-sm text-textWeak"] do + a_ (class_ "hover:text-textStrong" : repositoryNavAttrs base) "Wiki" + for_ (maybe (bool [] ["New page"] editing) (T.splitOn "/" . Memory.pagePathText . (.path)) current) \segment -> do + faSprite_ "chevron-right" "regular" "h-2.5 w-2.5 shrink-0" + span_ [class_ "truncate last:text-textStrong"] $ toHtml segment + unless editing $ for_ current $ p_ [class_ "text-xs text-textWeak"] . edited + div_ [class_ "mx-auto max-w-3xl"] do + unless editing $ case current of + Just page -> div_ [class_ "space-y-6 pt-8"] do + h2_ [class_ "text-3xl font-bold tracking-tight text-balance text-textStrong"] $ title page + pageBody $ Memory.memoryText page.document.body + Nothing -> div_ [class_ "space-y-4 pt-16"] do + h2_ [class_ "text-2xl font-semibold tracking-tight text-textStrong"] "Project wiki" + p_ [class_ "max-w-prose text-sm text-textWeak"] "Shared notes and runbooks for this project. Check dated conclusions against current source and telemetry." + unless (null pages) $ section_ [Aria.labelledby_ "wiki-recent", class_ "space-y-1 pt-4"] do + h3_ [id_ "wiki-recent", class_ "text-xs font-semibold uppercase tracking-wider text-textWeak"] "Recently updated" + ul_ [class_ "divide-y divide-strokeWeak"] $ for_ (take 8 $ sortOn (Down . (.updatedAt)) visible) \page -> li_ $ a_ (class_ "flex items-baseline justify-between gap-4 py-2 hover:text-textBrand" : repositoryNavAttrs (pageLink page)) do + span_ [class_ "truncate text-sm text-textStrong"] $ title page + span_ [class_ "shrink-0 text-xs text-textWeak tabular-nums"] $ localTimeFmt_ "MMM d, HH:mm" page.updatedAt + when editing $ div_ [class_ "pt-8"] do + when (isNothing current) $ h2_ [class_ "sr-only"] "New page" + form_ [id_ "wiki-form", method_ "post", action_ ("/p/" <> pid.toText <> "/memories"), hxPost_ ("/p/" <> pid.toText <> "/memories"), hxTarget_ "#repository-content", hxSelect_ "#repository-content", hxSwap_ "outerHTML", class_ "space-y-3", [__|on keydown[(metaKey or ctrlKey) and key is 's'] from window halt the event then call me.requestSubmit()|]] do + input_ [type_ "hidden", name_ "pageId", value_ form.pageId.toText] + input_ [type_ "hidden", name_ "version", value_ $ show form.version] + for_ message $ p_ [id_ "memory-error", role_ "alert", class_ "rounded-lg bg-fillError-weak px-3 py-2 text-sm text-textError"] . toHtml + term "wiki-editor" [class_ "block space-y-3", term "data-mode" "source"] do + input_ ([id_ "memory-title", name_ "title", required_ "", maxlength_ "120", value_ form.title, placeholder_ "Untitled", Aria.label_ "Title", class_ "w-full rounded-md bg-transparent text-3xl font-bold tracking-tight text-textStrong placeholder:text-textWeak focus-visible:outline-none"] <> [Aria.describedby_ "memory-error" | isJust message]) + div_ [class_ "flex items-center gap-1.5 text-xs text-textWeak"] do + faSprite_ "folder" "regular" "h-3 w-3 shrink-0" + input_ ([id_ "memory-path", name_ "path", maxlength_ "512", placeholder_ "folder/page \x2014 blank uses the title", value_ $ fromMaybe "" form.path, Aria.label_ "Page path", class_ "min-w-0 flex-1 rounded bg-transparent px-1 py-0.5 font-mono text-xs text-textWeak placeholder:text-textWeak hover:bg-fillWeak focus-visible:bg-fillWeak focus-visible:outline-2 focus-visible:outline-strokeFocus"] <> [Aria.describedby_ "memory-error" | isJust message]) + div_ [hidden_ "", term "data-editor-controls" ""] + $ select_ [term "data-editor-mode" "", Aria.label_ "Editing mode", class_ "select select-ghost select-xs w-auto text-textWeak"] do + option_ [value_ "rich"] "Rich text" + option_ [value_ "source"] "Markdown" + label_ [term "for" "memory-body", id_ "memory-body-label", class_ "sr-only"] "Page content" + textarea_ ([id_ "memory-body", name_ "body", required_ "", maxlength_ "16000", rows_ "18", class_ "textarea w-full font-mono text-sm leading-relaxed"] <> [Aria.describedby_ "memory-error" | isJust message]) $ toHtml form.body + div_ [term "data-rich-editor" "", hidden_ "", class_ "-ms-12"] pass + p_ [term "data-editor-status" "", role_ "status", class_ "text-xs text-textWeak"] "Markdown \x00B7 / for blocks \x00B7 [[path]] or [[path|label]] links a page \x00B7 \x2318S saves" + unless (null backlinks) $ section_ [Aria.labelledby_ "wiki-backlinks", class_ "mt-12 space-y-2 border-t border-strokeWeak pt-4"] do + h3_ [id_ "wiki-backlinks", class_ "flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-textWeak"] $ faSprite_ "link" "regular" "h-3 w-3" >> "Linked from" + ul_ [class_ "flex flex-wrap gap-2"] $ for_ backlinks \page -> li_ $ a_ (class_ "inline-flex items-center gap-1.5 rounded-md bg-fillWeak px-2 py-1 text-sm text-textStrong hover:text-textBrand" : repositoryNavAttrs (pageLink page)) $ faSprite_ "file-lines" "regular" "h-3 w-3" >> title page + unless (null history) $ details_ [class_ "mt-6 border-t border-strokeWeak pt-4"] do + summary_ [class_ "flex cursor-pointer items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-textWeak hover:text-textStrong"] $ faSprite_ "clock-rotate-left" "regular" "h-3 w-3" >> "Revision history" + when (length history == Memory.pageLimit) $ p_ [class_ "mt-3 text-sm text-textWeak"] $ toHtml @Text $ "Showing the " <> show Memory.pageLimit <> " most recent revisions. Older revisions remain stored." + div_ [class_ "mt-3 divide-y divide-strokeWeak"] $ for_ (zip history $ map Just (drop 1 history) <> [Nothing]) \(page, previous) -> details_ [class_ "py-3"] do + summary_ [class_ "cursor-pointer text-sm text-textWeak"] $ edited page + for_ previous \old -> div_ [class_ "mt-3 space-y-1"] do + p_ [class_ "text-xs font-medium text-textWeak"] $ toHtml @Text $ "Changes from revision " <> show old.version + revisionDiff old page + h3_ [class_ "mt-3 text-sm font-semibold text-textStrong"] $ title page + div_ [class_ "mt-2"] $ pageBody $ Memory.memoryText page.document.body toHtmlRaw = toHtml -repositoryLayout_ :: Projects.ProjectId -> RepositoryTab -> Maybe Text -> Bool -> Bool -> Html () -> Html () -repositoryLayout_ pid tab serviceM canEdit canReadWiki content = +repositoryBWConfig :: BWConfig -> Projects.ProjectId -> RepositoryTab -> Maybe Text -> Bool -> Bool -> BWConfig +repositoryBWConfig bw pid tab serviceM canEdit canReadWiki = let base = "/p/" <> pid.toText <> "/repositories" - in div_ [class_ "h-full w-full overflow-y-auto"] do - section_ [class_ "mx-auto max-w-6xl space-y-6 px-4 py-6 sm:px-8 sm:py-8"] do - header_ [class_ "flex flex-col items-start gap-4 sm:flex-row sm:justify-between"] do - div_ [class_ "min-w-0 w-full flex-1 space-y-1"] do - h1_ [class_ "text-xl sm:text-2xl font-semibold tracking-tight text-textStrong break-words"] $ toHtml $ maybe "Repositories" ("Repositories for " <>) serviceM - p_ [class_ "text-sm text-textWeak max-w-2xl"] $ toHtml @Text $ maybe "Manage source context, pull request reviews, and configuration sync for each repository." (const "Source mappings that apply to this service, including mappings for all services.") serviceM - when (isJust serviceM) $ a_ [href_ base, class_ "inline-flex items-center gap-1 py-1 text-sm text-textBrand hover:underline"] "All repositories" - when canEdit $ a_ [href_ (base <> "/connect"), class_ "btn btn-sm btn-ghost gap-2"] do - faSprite_ "plus" "regular" "h-3.5 w-3.5" - "Add repositories" - when (isNothing serviceM) - $ nav_ [id_ "repository-nav", Aria.label_ "Repository views", class_ "flex flex-wrap gap-1 border-b border-strokeWeak pb-2", term "preload" "mouseover"] - $ forM_ ([(Overview, "Repositories", ""), (PullRequests, "Pull requests", "?tab=reviews"), (Wiki, "Project wiki", "?tab=wiki")] :: [(RepositoryTab, Text, Text)]) \(value, label, query) -> - when (value /= Wiki || canReadWiki) - $ a_ - ( [class_ $ "rounded-lg px-3 py-2 text-sm font-medium transition-colors " <> bool "text-textWeak hover:bg-fillWeak hover:text-textStrong" "bg-fillBrand-weak text-textBrand" (tab == value)] - <> repositoryNavAttrs (if value == Wiki then "/p/" <> pid.toText <> "/wiki" else base <> query) - <> [term "aria-current" "page" | tab == value] - ) - $ toHtml @Text label - section_ [id_ "repository-content", class_ "min-w-0"] content + in bw + { pageTitle = "Repositories" + , menuItem = Just "Repositories" + , pageTitleSuffix = serviceM + , pageActions = + a_ [href_ (base <> "/connect"), class_ "btn btn-sm btn-primary gap-2"] (faSprite_ "plus" "regular" "h-3.5 w-3.5" >> "Add repositories") <$ guard canEdit + , navTabs = + Just + $ navTabStrip_ + NavLinks + "Repository views" + "" + [(toHtml label, url, tab == value) | (value, label, url) <- [(Overview, "Repositories" :: Text, base), (PullRequests, "Pull requests", base <> "?tab=reviews"), (Wiki, "Project wiki", "/p/" <> pid.toText <> "/wiki")], value /= Wiki || canReadWiki] + } + + +repositoryLayout_ :: Maybe Text -> Html () -> Html () +repositoryLayout_ serviceM content = + div_ [class_ "h-full w-full overflow-y-auto"] do + when (isJust serviceM) $ p_ [class_ "px-4 pt-4 text-sm text-textWeak"] "Source mappings that apply to this service, including mappings for all services." + section_ [id_ "repository-content", class_ "min-w-0 p-4"] content repositoryNavAttrs :: Text -> [Attribute] @@ -339,7 +402,7 @@ repositoryNavAttrs url = , hxGet_ url , hxTarget_ "#repository-content" , hxSelect_ "#repository-content" - , term "hx-select-oob" "#repository-nav:outerMorph" + , term "hx-select-oob" "#main-navbar:outerMorph" , hxSwap_ "outerMorph" , hxPushUrl_ "true" , [__|on click set my.preloadState to 'DONE'|] @@ -384,84 +447,139 @@ repositoriesPageH pid selection = do settings <- ImpactReviews.repositorySettings pid credentials <- GitSync.getGitHubCredentials pid repositories <- GitSync.getRepositories pid - conflicts <- Hasql.interp @[HI.OneColumn GitSync.GitHubSyncId] [HI.sql| SELECT DISTINCT sync_id FROM projects.repository_resources WHERE project_id = #{pid} AND conflicted |] + conflicts <- map HI.getOneColumn <$> Hasql.interp @[HI.OneColumn GitSync.GitHubSyncId] [HI.sql| SELECT DISTINCT sync_id FROM projects.repository_resources WHERE project_id = #{pid} AND conflicted |] let applicable = filter (\m -> maybe True (\service -> isNothing m.service || m.service == Just service) serviceM) mappings visible = filter (\repository -> isNothing serviceM || any (mappingInRepository credentials repository) applicable) repositories - pure $ overview_ canEdit serviceM sampleM base applicable syncs settings credentials visible [sid | HI.OneColumn sid <- conflicts] + pure do + let linked = [((c.host, c.apiBase, m.owner, m.repo), m) | m <- applicable, c <- credentials, c.id == m.credentialId] + repositoryKey repository = (repository.host, repository.apiBase, repository.owner, repository.repo) + servicesFor repository = sort . ordNub $ mapMaybe (\(key, m) -> guard (key == repositoryKey repository) *> m.service) linked + repositoryUrl repository = base <> "/" <> repository.id.toText <> foldMap (("/source?sample=" <>) . toUriStr) sampleM + toHtml + $ Table.Table + { Table.config = def{Table.elemID = "repositoriesTable", Table.renderAsTable = True} + , Table.columns = + [ Table.col + "Repository" + ( \repository -> div_ [class_ "min-w-0 space-y-1"] do + a_ [href_ $ repositoryUrl repository, class_ "font-medium text-textStrong hover:text-textBrand hover:underline break-all"] $ toHtml (repository.owner <> "/" <> repository.repo) + p_ [class_ "text-xs text-textWeak break-all"] $ toHtml $ fromMaybe (Git.hostLabel repository.host) repository.apiBase + ) + , Table.col "Services" (\repository -> span_ [class_ "text-xs text-textWeak break-words"] $ toHtml $ if any (\(key, m) -> key == repositoryKey repository && isNothing m.service) linked then "All services" else case servicesFor repository of [] -> "No services linked"; services -> T.intercalate ", " services) + , Table.col + "Source context" + ( \repository -> + if repository.sourceEnabled && any ((== repositoryKey repository) . fst) linked + then colorChip_ SuccessBadge "circle-check" "Active" + else colorChip_ NeutralBadge "circle-info" $ if repository.sourceEnabled then "Needs setup" else "Off" + ) + , Table.col + "Production impact reviews" + ( \repository -> case find (\s -> repository.host == Git.GitHub && isNothing repository.apiBase && s.owner == T.toLower repository.owner && s.repo == T.toLower repository.repo) settings of + Just s | s.enabled && not (null $ servicesFor repository) -> colorChip_ SuccessBadge "circle-check" "Enabled" + Just s | s.enabled -> colorChip_ WarningBadge "circle-info" "Link a service" + Just _ -> colorChip_ NeutralBadge "circle-info" "Off" + Nothing -> colorChip_ NeutralBadge "circle-info" "Not configured" + ) + , Table.col + "Configuration sync" + ( \repository -> case find (\s -> (s.host, s.apiBase, s.owner, s.repo) == repositoryKey repository) syncs of + Just s | s.id `elem` conflicts -> colorChip_ WarningBadge "circle-exclamation" "Conflicts need input" + Just s | s.exportPaused -> colorChip_ WarningBadge "circle-info" "Export paused" + Just s | isJust s.lastExportHash -> colorChip_ WarningBadge "code-branch" "Changes pending" + Just s | Just err <- s.lastError -> colorChip_ ErrorBadge "circle-exclamation" "Sync failed" >> p_ [class_ "text-xs text-textError break-words"] (toHtml err.message) + Just s | not s.syncEnabled -> colorChip_ NeutralBadge "circle-info" "Paused" + Just s | isJust s.announcedRevision -> colorChip_ WarningBadge "circle-info" "Changes pending" + Just s | isJust s.lastRevision -> colorChip_ SuccessBadge "circle-check" "Synced" + Just _ -> colorChip_ NeutralBadge "circle-info" "Awaiting first sync" + Nothing -> colorChip_ NeutralBadge "circle-info" "Not configured" + ) + , Table.col "" (const $ span_ [Aria.hidden_ "true", class_ "flex justify-end text-iconNeutral"] $ faSprite_ "chevron-right" "regular" "h-3.5 w-3.5") + ] + , Table.rows = V.fromList visible + , Table.features = + def + { Table.search = Just Table.ClientSide + , Table.searchPlaceholder = Just "Search repositories" + , Table.rowLink = Just repositoryUrl + , Table.zeroState = + Just + Table.ZeroState + { Table.icon = "code-branch" + , Table.title = maybe "Connect the repositories behind your services" (const "No repositories linked to this service") serviceM + , Table.description = if canEdit then maybe "Link services to their code for source context and production impact reviews. You can also connect repositories that only contain dashboards." (const "Choose a repository, then link this service in Configure source context.") serviceM else "Ask a project editor to link services to their source repositories." + , Table.action = Table.ESCustom $ when canEdit $ a_ [href_ (base <> maybe "/connect" (const "") serviceM), class_ "btn btn-sm btn-primary"] $ toHtml @Text $ maybe "Connect repositories" (const "Choose a repository") serviceM + } + } + } ReviewsPage -> do cfg <- (.config) <$> Effectful.Reader.Static.ask @AuthContext runs <- ImpactReviews.latestRuns pid - pure $ reviewHistory_ canEdit cfg runs - addRespHeaders $ bodyWrapper bw{pageTitle = "Repositories"} $ repositoryLayout_ pid tab serviceM canEdit canReadWiki content - where - overview_ :: Bool -> Maybe Text -> Maybe Text -> Text -> [CodeContext.CodeMapping] -> [GitSync.GitHubSync] -> [ImpactReviews.ReviewSettings] -> [GitSync.GitHubCredential] -> [GitSync.Repository] -> [GitSync.GitHubSyncId] -> Html () - overview_ canEdit serviceM sampleM base mappings syncs settings credentials repositories conflicts = do - let linked = [((c.host, c.apiBase, m.owner, m.repo), m) | m <- mappings, c <- credentials, c.id == m.credentialId] - if null repositories - then div_ [class_ "rounded-xl border border-strokeWeak p-6 sm:p-8 space-y-3"] do - h2_ [class_ "font-semibold text-textStrong"] $ toHtml @Text $ maybe "Connect the repositories behind your services" (const "No repositories linked to this service") serviceM - p_ [class_ "text-sm text-textWeak max-w-xl"] - $ toHtml @Text - $ if canEdit - then maybe "Link services to their code for source context and production impact reviews. You can also connect repositories that only contain dashboards." (const "Choose a repository, then link this service in Configure source context.") serviceM - else "Ask a project editor to link services to their source repositories." - when canEdit $ a_ [href_ (base <> maybe "/connect" (const "") serviceM), class_ "btn btn-sm btn-primary"] $ toHtml @Text $ maybe "Connect repositories" (const "Choose a repository") serviceM - else div_ [class_ "divide-y divide-strokeWeak rounded-xl border border-strokeWeak"] $ forM_ repositories \repository -> do - let host = repository.host - origin = repository.apiBase - owner = repository.owner - repo = repository.repo - key = (host, origin, owner, repo) - services = sort . ordNub $ mapMaybe (\(repoKey, m) -> guard (repoKey == key) *> m.service) linked - reviewM = find (\s -> host == Git.GitHub && isNothing origin && s.owner == T.toLower owner && s.repo == T.toLower repo) settings - sync = find (\s -> (s.host, s.apiBase, s.owner, s.repo) == key) syncs - article_ [class_ "grid gap-4 p-4 sm:p-5 lg:grid-cols-[minmax(0,2fr)_repeat(3,minmax(0,1fr))]"] do - div_ [class_ "min-w-0 space-y-2"] do - a_ [href_ (base <> "/" <> repository.id.toText <> foldMap (\sample -> "/source?sample=" <> decodeUtf8 (urlEncode True $ encodeUtf8 sample)) sampleM), class_ "font-medium text-sm text-textBrand break-all hover:underline"] $ toHtml (owner <> "/" <> repo) - p_ [class_ "text-xs text-textWeak break-all"] $ toHtml $ fromMaybe (Git.hostLabel host) origin - p_ [class_ "text-xs text-textWeak break-words"] $ toHtml $ if any (\(repoKey, m) -> repoKey == key && isNothing m.service) linked then "All services" else if null services then "No services linked" else T.intercalate ", " services + pure $ div_ [class_ "space-y-4"] do + p_ [class_ "text-sm text-textWeak max-w-2xl"] "Pull request reviews connect code changes to production telemetry. Configure reviews and evidence sharing in each repository." + toHtml + $ Table.Table + { Table.config = def{Table.elemID = "pullRequestsTable", Table.renderAsTable = True} + , Table.columns = + [ Table.col "Repository" (\run -> span_ [class_ "font-medium text-textStrong break-all"] $ toHtml (run.owner <> "/" <> run.repo)) + , Table.col + "Pull request" + ( \run -> a_ [href_ $ "https://github.com/" <> run.owner <> "/" <> run.repo <> "/pull/" <> show run.number, target_ "_blank", rel_ "noopener noreferrer", class_ "inline-flex items-center gap-2 text-textBrand hover:underline whitespace-nowrap tabular-nums", Aria.label_ $ "Open pull request #" <> show run.number <> " in " <> run.owner <> "/" <> run.repo] do + toHtml @Text $ "#" <> show run.number + faSprite_ "arrow-up-right-from-square" "regular" "h-3 w-3" + ) + , Table.col + "Status" + ( \run -> case run.state of + ImpactReviews.Superseded -> span_ [class_ "inline-flex items-center gap-1.5 text-xs text-textWeak"] $ faSprite_ "clock-rotate-left" "regular" "h-3 w-3" >> "Superseded" + ImpactReviews.Completed -> colorChip_ SuccessBadge "circle-check" "Completed" + ImpactReviews.Incomplete -> colorChip_ WarningBadge "circle-exclamation" "Incomplete" + ImpactReviews.Queued -> colorChip_ NeutralBadge "clock" "Queued" + ImpactReviews.Reviewing -> colorChip_ BrandBadge "arrows-rotate" "Reviewing" + ) + , Table.col "Revision" (\run -> code_ [class_ "text-xs text-textWeak", title_ run.revision] $ toHtml $ T.take 8 run.revision) + , Table.col "Reviewed" (\run -> span_ [class_ "whitespace-nowrap text-xs text-textWeak tabular-nums"] $ localTimeFmt_ "MMM d, HH:mm" run.createdAt) + , Table.col "" (\run -> button_ [type_ "button", class_ "btn btn-sm btn-ghost btn-square -me-2", onclick_ $ "document.getElementById('review-" <> run.id.toText <> "').showModal()", Aria.label_ $ "View review for " <> run.owner <> "/" <> run.repo <> " #" <> show run.number] $ faSprite_ "chevron-right" "regular" "h-3.5 w-3.5") + ] + , Table.rows = V.fromList runs + , Table.features = + def + { Table.search = Just Table.ClientSide + , Table.searchPlaceholder = Just "Search pull requests" + , Table.rowAttrs = Just \run -> [class_ "cursor-pointer", data_ "review" ("review-" <> run.id.toText), [__|on click if not event.target.closest('a, button') call document.getElementById(@data-review).showModal() end|]] + , Table.zeroState = + Just + Table.ZeroState + { Table.icon = "code-branch" + , Table.title = "No pull requests reviewed yet" + , Table.description = "Link a GitHub repository and its services to review pull requests with production telemetry." + , Table.action = Table.ESCustom $ a_ [href_ $ "/p/" <> pid.toText <> "/repositories", class_ "btn btn-sm btn-primary"] "Configure repositories" + } + } + } + forM_ runs \run -> term "dialog" [id_ $ "review-" <> run.id.toText, Aria.labelledby_ $ "review-title-" <> run.id.toText, class_ "modal overscroll-contain"] do + div_ [class_ "modal-box w-full max-w-4xl space-y-5 p-6"] do div_ [class_ "space-y-2"] do - p_ [class_ "text-xs font-medium text-textWeak"] "Source context" - if repository.sourceEnabled && any ((== key) . fst) linked - then colorChip_ SuccessBadge "circle-check" "Active" - else colorChip_ NeutralBadge "circle-info" $ if repository.sourceEnabled then "Needs setup" else "Off" - div_ [class_ "space-y-2"] do - p_ [class_ "text-xs font-medium text-textWeak"] "Production impact reviews" - case reviewM of - Just s | s.enabled && not (null services) -> colorChip_ SuccessBadge "circle-check" "Enabled" - Just s | s.enabled -> colorChip_ WarningBadge "circle-info" "Link a service" - Just _ -> colorChip_ NeutralBadge "circle-info" "Off" - Nothing -> colorChip_ NeutralBadge "circle-info" "Not configured" - div_ [class_ "space-y-2"] do - p_ [class_ "text-xs font-medium text-textWeak"] "Configuration sync" - case sync of - Just s | s.id `elem` conflicts -> colorChip_ WarningBadge "circle-exclamation" "Conflicts need input" - Just s | s.exportPaused -> colorChip_ WarningBadge "circle-info" "Export paused" - Just s | isJust s.lastExportHash -> colorChip_ WarningBadge "code-branch" "Changes pending" - Just s | Just err <- s.lastError -> colorChip_ ErrorBadge "circle-exclamation" "Sync failed" >> p_ [class_ "text-xs text-textError break-words"] (toHtml err.message) - Just s | not s.syncEnabled -> colorChip_ NeutralBadge "circle-info" "Paused" - Just s | isJust s.announcedRevision -> colorChip_ WarningBadge "circle-info" "Changes pending" - Just s | isJust s.lastRevision -> colorChip_ SuccessBadge "circle-check" "Synced" - Just _ -> colorChip_ NeutralBadge "circle-info" "Awaiting first sync" - Nothing -> colorChip_ NeutralBadge "circle-info" "Not configured" - - reviewHistory_ :: Bool -> EnvConfig -> [ImpactReviews.ReviewRun] -> Html () - reviewHistory_ canEdit cfg runs = div_ [class_ "space-y-4"] do - h2_ [class_ "text-base font-semibold text-textStrong"] "Production impact reviews" - p_ [class_ "text-sm text-textWeak max-w-2xl"] "Advisory pull request reviews connect code changes to this project's production telemetry. Open a repository to configure reviews and evidence sharing." - when (null runs) $ div_ [class_ "rounded-xl border border-strokeWeak p-5 space-y-2"] do - p_ [class_ "text-sm font-medium text-textStrong"] "No pull requests reviewed yet" - p_ [class_ "text-sm text-textWeak"] "Link a GitHub repository and its services to receive reviews when ready pull requests are opened or updated." - forM_ runs \run -> details_ [class_ "rounded-lg border border-strokeWeak p-4"] do - summary_ [class_ "cursor-pointer flex flex-wrap items-center gap-2 text-sm text-textStrong"] do - span_ [class_ "font-medium break-all"] $ toHtml (run.owner <> "/" <> run.repo <> " #" <> show run.number) - colorChip_ (case run.state of ImpactReviews.Completed -> SuccessBadge; ImpactReviews.Incomplete -> WarningBadge; ImpactReviews.Queued -> NeutralBadge; ImpactReviews.Reviewing -> BrandBadge; ImpactReviews.Superseded -> NeutralBadge) "code-branch" (show run.state) - code_ [class_ "text-xs text-textWeak"] $ toHtml $ T.take 8 run.revision - whenJust run.error $ p_ [class_ "mt-2 text-sm text-textError break-words"] . toHtml - whenJust run.result \value -> case AE.fromJSON value of - AE.Error _ -> p_ [class_ "mt-2 text-sm text-textWeak"] "The saved review could not be displayed. Rerun the review." - AE.Success result -> div_ [class_ "prose prose-sm mt-3 max-w-none"] $ renderMarkdown (ImpactReview.renderReview cfg.hostUrl run True result) - when (canEdit && run.revision == run.latestRevision && run.state /= ImpactReviews.Reviewing) $ button_ [class_ "btn btn-sm btn-ghost mt-3", hxPost_ ("/p/" <> pid.toText <> "/settings/pr-reviews/" <> run.id.toText <> "/rerun"), hxTarget_ "#repository-content", hxSelect_ "#repository-content", hxSwap_ "outerMorph"] "Rerun review" + h2_ [id_ $ "review-title-" <> run.id.toText, class_ "text-lg font-semibold text-textStrong break-words"] $ toHtml (run.owner <> "/" <> run.repo <> " #" <> show run.number) + div_ [class_ "flex flex-wrap items-center gap-3 text-xs text-textWeak"] do + toHtml @Text $ "Review " <> show run.state + code_ [title_ run.revision] $ toHtml $ T.take 8 run.revision + whenJust run.error $ p_ [class_ "text-sm text-textError break-words"] . toHtml + case run.result of + Nothing -> p_ [class_ "text-sm text-textWeak"] $ toHtml @Text case run.state of + ImpactReviews.Queued -> "This review is queued." + ImpactReviews.Reviewing -> "This review is in progress." + ImpactReviews.Superseded -> "A newer revision replaced this review." + ImpactReviews.Completed -> "No review result is available." + ImpactReviews.Incomplete -> "No review result is available." + Just value -> case AE.fromJSON value of + AE.Error _ -> p_ [class_ "text-sm text-textWeak"] "The saved review could not be displayed. Rerun the review." + AE.Success result -> div_ [class_ "prose prose-sm max-w-none break-words [&_pre]:overflow-x-auto"] $ renderMarkdown (ImpactReview.renderReview cfg.hostUrl run True result) + div_ [class_ "flex flex-wrap justify-end gap-2 border-t border-strokeWeak pt-4"] do + form_ [method_ "dialog"] $ button_ [class_ "btn btn-sm btn-ghost", autofocus_] "Close" + when (canEdit && run.revision == run.latestRevision && run.state /= ImpactReviews.Reviewing) $ button_ [type_ "button", class_ "btn btn-sm btn-primary", hxPost_ ("/p/" <> pid.toText <> "/settings/pr-reviews/" <> run.id.toText <> "/rerun"), hxTarget_ "#repository-content", hxSelect_ "#repository-content", hxSwap_ "outerMorph", [__|on click call (closest ).close()|]] "Rerun review" + form_ [method_ "dialog", class_ "modal-backdrop"] $ button_ [Aria.label_ "Close review"] "Close" + addRespHeaders $ bodyWrapper (repositoryBWConfig bw pid tab serviceM canEdit canReadWiki) $ repositoryLayout_ serviceM content data ReviewReadiness @@ -512,7 +630,7 @@ repositoryGetH pid rid = do conflictVersions <- forM (filter (.conflicted) resources) $ \resource -> (resource.id,) <$> RepositorySync.localDefinition resource folderCandidates <- RepositorySync.folderCandidates pid analysis <- GitSync.getRepositoryAnalysis pid rid - addRespHeaders $ PageCtx bw{pageTitle = repository.owner <> "/" <> repository.repo} RepositoryGet{repository, mappings, dashboardSync, reviewReadiness, reviewSettings, resources, conflictVersions, folderCandidates, analysis, permission} + addRespHeaders $ PageCtx bw{prePageTitle = Just "Repositories", pageTitle = repository.owner <> "/" <> repository.repo, menuItem = Just "Repositories"} RepositoryGet{repository, mappings, dashboardSync, reviewReadiness, reviewSettings, resources, conflictVersions, folderCandidates, analysis, permission} newtype ConflictForm = ConflictForm {useGit :: Bool} @@ -627,94 +745,108 @@ repositoryDeleteH pid rid = do instance ToHtml RepositoryGet where - toHtml page = section_ [id_ "repository-detail", class_ "mx-auto max-w-4xl space-y-8 px-4 py-6 sm:px-8 sm:py-8"] do + toHtml page = section_ [id_ "repository-detail", class_ "@container/repository w-full min-w-0 space-y-5 p-4 sm:p-6"] do let repository = page.repository base = "/p/" <> repository.projectId.toText <> "/repositories" + self = base <> "/" <> repository.id.toText canEdit = maybe False (>= ProjectMembers.PEdit) page.permission - a_ [href_ base, class_ "inline-flex items-center gap-2 text-sm text-textBrand hover:underline"] do - faSprite_ "arrow-left" "regular" "h-3 w-3" - "All repositories" - header_ [class_ "space-y-2"] do - h1_ [class_ "text-xl font-semibold text-textStrong break-all"] $ toHtml $ repository.owner <> "/" <> repository.repo - p_ [class_ "text-sm text-textWeak break-all"] $ toHtml $ fromMaybe (Git.hostLabel repository.host) repository.apiBase + post path attrs = form_ ([method_ "post", action_ (self <> path), hxPost_ (self <> path), hxTarget_ "#repository-detail", hxSelect_ "#repository-detail", hxSwap_ "outerMorph"] <> attrs) + syncLink = a_ [href_ (self <> "/dashboards"), class_ "btn btn-sm btn-outline"] $ if canEdit then "Configure sync" else "View sync" + header_ [class_ "flex flex-wrap items-center gap-x-6 gap-y-3"] do + div_ [class_ "min-w-0 space-y-2 break-words"] do + settingsH2_ $ repository.owner <> "/" <> repository.repo + p_ [class_ "text-sm text-textWeak break-all"] $ toHtml $ fromMaybe (Git.hostLabel repository.host) repository.apiBase + when canEdit $ post "/analyze" [] $ button_ [type_ "submit", class_ "btn btn-sm btn-outline gap-2"] do + faSprite_ "arrows-rotate" "regular" "h-3.5 w-3.5" + "Analyze repository" + when canEdit $ p_ [class_ "w-full max-w-[65ch] text-xs text-textWeak"] "Analysis matches this repository to services in your telemetry. The first run can link those services and turn on dashboard sync; existing settings are kept." whenJust (page.analysis >>= (.error)) $ \err -> p_ [role_ "status", class_ "text-sm text-textError"] $ toHtml $ "Setup needs attention: " <> err whenJust (page.analysis >>= (.suggestions)) $ \suggestions -> when (null page.mappings) $ div_ [class_ "rounded-xl border border-strokeWeak p-4 space-y-2"] do p_ [class_ "text-sm font-medium text-textStrong"] "Service mapping needs input" p_ [class_ "text-sm text-textWeak break-words"] $ toHtml $ if null suggestions.services then "No service names have been observed yet. Link a service when its telemetry arrives." else "Observed services: " <> T.intercalate ", " (take 12 suggestions.services) - when canEdit $ form_ [method_ "post", action_ (base <> "/" <> repository.id.toText <> "/analyze"), hxPost_ (base <> "/" <> repository.id.toText <> "/analyze"), hxTarget_ "#repository-detail", hxSelect_ "#repository-detail", hxSwap_ "outerMorph"] $ button_ [type_ "submit", class_ "btn btn-sm btn-ghost"] "Analyze repository" - section_ [class_ "space-y-3"] do - h2_ [class_ "text-base font-semibold text-textStrong"] "Services and source context" - colorChip_ NeutralBadge "circle-info" $ if repository.sourceEnabled then "Source context enabled" else "Source context disabled" - when canEdit $ form_ [method_ "post", action_ (base <> "/" <> repository.id.toText <> "/source/enabled"), hxPost_ (base <> "/" <> repository.id.toText <> "/source/enabled"), hxTarget_ "#repository-detail", hxSelect_ "#repository-detail", hxSwap_ "outerMorph"] do - input_ [type_ "hidden", name_ "enabled", value_ (if repository.sourceEnabled then "false" else "true")] - button_ [type_ "submit", class_ "btn btn-sm btn-ghost"] $ if repository.sourceEnabled then "Disable source context" else "Enable source context" - - if null page.mappings - then p_ [class_ "text-sm text-textWeak"] "No source paths are linked. Link a service to read the failing code directly from its stack trace." - else div_ [class_ "divide-y divide-strokeWeak rounded-xl border border-strokeWeak"] $ forM_ page.mappings \mapping -> div_ [class_ "p-4 space-y-2"] do - p_ [class_ "text-sm font-medium text-textStrong break-words"] $ toHtml $ fromMaybe "All services" mapping.service - p_ [class_ "text-xs text-textWeak break-all"] $ toHtml $ scopeLabel mapping - code_ [class_ "text-xs text-textWeak break-all"] $ toHtml mapping.ref - a_ [href_ (base <> "/" <> repository.id.toText <> "/source"), class_ "btn btn-sm btn-ghost"] $ if canEdit then "Configure source context" else "View source context" - section_ [class_ "space-y-3"] do - h2_ [class_ "text-base font-semibold text-textStrong"] "Production impact reviews" - case page.reviewReadiness of - ReviewReady settings -> do - colorChip_ SuccessBadge "circle-check" "Ready for pull requests" - p_ [class_ "text-sm text-textWeak"] $ if settings.includeEvidence then "Reviews share production aggregates and links in GitHub." else "Reviews share links to production evidence in GitHub." - ReviewDisabled -> colorChip_ NeutralBadge "circle-info" "Reviews disabled" - ReviewNeedsService -> p_ [class_ "text-sm text-textWeak"] "Link a named service so reviews can find the production telemetry for this repository." - ReviewNeedsApp -> p_ [class_ "text-sm text-textWeak"] "Link source context through the GitHub App to receive automatic pull request reviews. A token connection can still provide source context and configuration sync." - ReviewNeedsServer -> p_ [class_ "text-sm text-textWeak"] "An administrator must configure the GitHub App and webhook before automatic reviews can run." - ReviewUnsupportedHost -> p_ [class_ "text-sm text-textWeak"] "Automatic pull request reviews currently support GitHub.com. Source context and configuration sync remain available for this host." - when (canEdit && repository.host == Git.GitHub && isNothing repository.apiBase) $ form_ [method_ "post", action_ (base <> "/" <> repository.id.toText <> "/source/reviews"), hxPost_ (base <> "/" <> repository.id.toText <> "/source/reviews"), hxTarget_ "#repository-detail", hxSelect_ "#repository-detail", hxSwap_ "outerMorph", class_ "flex flex-wrap items-end gap-3"] do - input_ [type_ "hidden", name_ "owner", value_ repository.owner] - input_ [type_ "hidden", name_ "repo", value_ repository.repo] - label_ [class_ "space-y-1 text-sm text-textWeak"] do - span_ [class_ "block"] "PR reviews" - select_ [name_ "enabled", class_ "select select-sm"] $ forM_ ([(True, "Enabled"), (False, "Disabled")] :: [(Bool, Text)]) \(value, label) -> option_ ([value_ (if value then "true" else "false")] <> [selected_ "selected" | value == maybe False (.enabled) page.reviewSettings]) $ toHtml @Text label - label_ [class_ "space-y-1 text-sm text-textWeak"] do - span_ [class_ "block"] "Production evidence in GitHub" - select_ [name_ "includeEvidence", class_ "select select-sm"] $ forM_ ([(False, "Links only"), (True, "Aggregates and links")] :: [(Bool, Text)]) \(value, label) -> option_ ([value_ (if value then "true" else "false")] <> [selected_ "selected" | value == maybe False (.includeEvidence) page.reviewSettings]) $ toHtml @Text label - button_ [type_ "submit", class_ "btn btn-sm btn-primary"] "Save review settings" - div_ [class_ "flex flex-wrap gap-2"] do - a_ [href_ (base <> "?tab=reviews"), class_ "btn btn-sm btn-ghost"] "Review history" - section_ [class_ "space-y-3"] do - h2_ [class_ "text-base font-semibold text-textStrong"] "Dashboards and monitors" - case page.dashboardSync of - Nothing -> p_ [class_ "text-sm text-textWeak"] "Configuration sync is not configured. This repository remains connected for your team." - Just sync -> do - whenJust sync.lastError $ p_ [role_ "status", class_ "text-sm text-textError break-words"] . toHtml . (.message) - p_ [class_ "text-sm text-textWeak break-all"] $ toHtml $ sync.branch <> " · " <> GitSync.getDashboardsPath sync - colorChip_ NeutralBadge "code-branch" $ if not sync.syncEnabled then "Disabled" else if sync.exportPaused then "Export paused" else if any (.conflicted) page.resources then "Conflicts need input" else if isJust sync.lastExportHash then "Changes proposed" else if isJust sync.lastRevision then "Synced" else "Preparing folder" - whenJust sync.pullRequestNumber $ \number -> a_ [href_ ("https://github.com/" <> sync.owner <> "/" <> sync.repo <> "/pull/" <> show number), target_ "_blank", rel_ "noopener noreferrer", class_ "text-sm text-textBrand hover:underline"] $ toHtml $ "Configuration PR #" <> show @Text number - p_ [class_ "text-sm text-textWeak"] "Monoscope edits are active immediately. Git changes apply after merge into the target branch. Dashboards and monitor definitions share this folder." - when (canEdit && sync.exportPaused) $ form_ [method_ "post", action_ (base <> "/" <> repository.id.toText <> "/resume"), hxPost_ (base <> "/" <> repository.id.toText <> "/resume"), hxTarget_ "#repository-detail", hxSelect_ "#repository-detail", hxSwap_ "outerMorph"] $ button_ [type_ "submit", class_ "btn btn-sm btn-primary"] "Resume export" - unless (null page.resources) $ ul_ [class_ "divide-y divide-strokeWeak rounded-xl border border-strokeWeak"] $ forM_ page.resources \resource -> li_ [class_ "flex flex-wrap items-center justify-between gap-3 p-3"] do - code_ [class_ "text-xs text-textStrong break-all"] $ toHtml resource.filePath - when resource.conflicted do - span_ [class_ "text-sm text-textWarning"] "Both versions changed" - details_ [class_ "w-full min-w-0 space-y-3"] do - summary_ [class_ "cursor-pointer text-sm text-textBrand"] "Compare versions" - div_ [class_ "grid min-w-0 gap-4 md:grid-cols-2"] $ for_ ([("Active in Monoscope", Yaml.encode . AE.toJSON <$> join (lookup resource.id page.conflictVersions)), ("Merged Git version", Yaml.encode <$> resource.remoteDefinition)] :: [(Text, Maybe ByteString)]) \(label, version) -> div_ [class_ "min-w-0 space-y-2"] do - h3_ [class_ "text-sm font-medium text-textStrong"] $ toHtml label - pre_ [class_ "max-h-80 overflow-auto rounded-lg bg-fillWeak p-3 text-xs text-textWeak"] $ toHtml @Text $ maybe "Deleted" decodeUtf8 version - when canEdit $ form_ [method_ "post", action_ (base <> "/" <> repository.id.toText <> "/resources/" <> resource.id.toText <> "/conflict"), hxPost_ (base <> "/" <> repository.id.toText <> "/resources/" <> resource.id.toText <> "/conflict"), hxTarget_ "#repository-detail", hxSelect_ "#repository-detail", hxSwap_ "outerMorph", class_ "flex gap-2"] do - button_ [type_ "submit", name_ "useGit", value_ "false", class_ "btn btn-sm btn-ghost"] "Keep Monoscope" - button_ [type_ "submit", name_ "useGit", value_ "true", class_ "btn btn-sm btn-ghost"] "Use Git" - when canEdit $ details_ [class_ "space-y-3"] do - summary_ [class_ "cursor-pointer text-sm text-textBrand"] "Move existing resources into this folder" - for_ ([RepositorySync.Dashboard, RepositorySync.Query, RepositorySync.Uptime, RepositorySync.Cron] :: [RepositorySync.ResourceKind]) \kind -> do - let candidates = filter ((== kind) . (.kind)) page.folderCandidates - unless (null candidates) $ form_ [method_ "post", action_ (base <> "/" <> repository.id.toText <> "/folder"), hxPost_ (base <> "/" <> repository.id.toText <> "/folder"), hxTarget_ "#repository-detail", hxSelect_ "#repository-detail", hxSwap_ "outerMorph", class_ "flex flex-wrap items-end gap-2"] do - input_ [type_ "hidden", name_ "kind", value_ $ T.toLower $ show kind] - formSelectField_ FieldSm (show kind) "localId" True $ for_ candidates \candidate -> option_ [value_ $ show candidate.localId] $ toHtml candidate.title - button_ [type_ "submit", class_ "btn btn-sm btn-ghost"] "Move into folder" - a_ [href_ (base <> "/" <> repository.id.toText <> "/dashboards"), class_ "btn btn-sm btn-ghost"] $ if canEdit then "Configure sync" else "View sync" - when canEdit $ section_ [class_ "space-y-3 border-t border-strokeWeak pt-6"] do - h2_ [class_ "text-base font-semibold text-textStrong"] "Remove connection" - p_ [class_ "max-w-2xl text-sm text-textWeak"] "Stop using this repository for source context, pull request reviews, and configuration sync. Dashboards and monitors stay local and review history is retained. Shared repository accounts remain connected." - button_ [type_ "button", onclick_ "document.getElementById('remove-repository-dialog').showModal()", class_ "btn btn-sm btn-ghost text-textError hover:bg-fillError-weak"] "Remove repository" + div_ [class_ "grid min-w-0 items-start gap-5 @min-[64rem]/repository:grid-cols-2"] do + section_ [class_ "min-w-0 @min-[64rem]/repository:col-start-1 @min-[64rem]/repository:row-start-1", Aria.label_ "Services and source context"] + $ panel_ Raised def{icon = Just "code-branch"} "Services and source context" + $ div_ [class_ "space-y-4"] do + bool (colorChip_ NeutralBadge "circle-info" "Disabled") (colorChip_ SuccessBadge "circle-check" "Enabled") repository.sourceEnabled + if null page.mappings + then p_ [class_ "text-sm text-textWeak"] "No source paths are linked. Link a service to read the failing code directly from its stack trace." + else div_ [class_ "divide-y divide-strokeWeak rounded-lg bg-fillWeak"] $ forM_ page.mappings \mapping -> div_ [class_ "flex flex-wrap items-start justify-between gap-3 p-3"] do + div_ [class_ "min-w-0 space-y-1"] do + p_ [class_ "text-sm font-medium text-textStrong break-words"] $ toHtml $ fromMaybe "All services" mapping.service + p_ [class_ "text-xs text-textWeak break-all"] $ toHtml $ scopeLabel mapping + code_ [class_ "rounded bg-bgBase px-2 py-1 text-xs text-textWeak break-all"] $ toHtml mapping.ref + div_ [class_ "flex flex-wrap items-center gap-2"] do + a_ [href_ (self <> "/source"), class_ "btn btn-sm btn-outline"] $ if canEdit then "Configure source context" else "View source context" + when canEdit $ post "/source/enabled" [] do + input_ [type_ "hidden", name_ "enabled", value_ (if repository.sourceEnabled then "false" else "true")] + button_ [type_ "submit", class_ "btn btn-sm btn-ghost"] $ if repository.sourceEnabled then "Disable source context" else "Enable source context" + section_ [class_ "min-w-0 @min-[64rem]/repository:col-start-2 @min-[64rem]/repository:row-start-1 @min-[64rem]/repository:row-span-2", Aria.label_ "Production impact reviews"] + $ panel_ Raised def{icon = Just "code-pull-request"} "Production impact reviews" + $ div_ [class_ "space-y-4"] do + let setupRequired = (,True) . callout_ WarningBadge (Just "Setup required") + (readiness, blocked) = case page.reviewReadiness of + ReviewReady settings -> (,False) do + colorChip_ SuccessBadge "circle-check" "Ready for pull requests" + p_ [class_ "text-sm text-textWeak"] $ if settings.includeEvidence then "Reviews share production aggregates and links in GitHub." else "Reviews share links to production evidence in GitHub." + ReviewDisabled -> (colorChip_ NeutralBadge "circle-info" "Reviews disabled", False) + ReviewNeedsService -> setupRequired "Link a named service so reviews can find the production telemetry for this repository." + ReviewNeedsApp -> setupRequired "Link source context through the GitHub App to receive automatic pull request reviews. A token connection can still provide source context and configuration sync." + ReviewNeedsServer -> setupRequired "An administrator must configure the GitHub App and webhook before automatic reviews can run." + ReviewUnsupportedHost -> (callout_ NeutralBadge (Just "Unavailable") "Automatic pull request reviews currently support GitHub.com. Source context and configuration sync remain available for this host.", True) + readiness + when (canEdit && repository.host == Git.GitHub && isNothing repository.apiBase) $ post "/source/reviews" [class_ "flex flex-wrap items-end gap-3"] do + input_ [type_ "hidden", name_ "owner", value_ repository.owner] + input_ [type_ "hidden", name_ "repo", value_ repository.repo] + formSelectField_ FieldSm "Automatic pull request reviews" "enabled" False + $ options_ (Just $ bool "false" "true" $ maybe False (.enabled) page.reviewSettings) [("true", "On"), ("false", "Off")] + formSelectField_ FieldSm "Production evidence in GitHub" "includeEvidence" False + $ options_ (Just $ bool "false" "true" $ maybe False (.includeEvidence) page.reviewSettings) [("false", "Links only"), ("true", "Aggregates and links")] + button_ [type_ "submit", class_ $ "btn btn-sm mb-1 " <> bool "btn-primary" "btn-outline" blocked] "Save review settings" + when blocked $ p_ [class_ "w-full text-xs text-textWeak"] "Saved settings take effect once setup is complete." + a_ [href_ (base <> "?tab=reviews"), class_ "btn btn-sm btn-outline"] "Review history" + section_ [class_ "min-w-0 @min-[64rem]/repository:col-start-1 @min-[64rem]/repository:row-start-2", Aria.label_ "Dashboards and monitors"] + $ panel_ Raised def{icon = Just "dashboard"} "Dashboards and monitors" + $ div_ [class_ "space-y-4"] do + case page.dashboardSync of + Nothing -> div_ [class_ "space-y-3"] do + p_ [class_ "text-sm text-textWeak"] "Keep dashboards and monitors as files in this repository. Monoscope proposes changes as pull requests, and merged changes apply automatically." + syncLink + Just sync -> do + whenJust sync.lastError $ p_ [role_ "status", class_ "text-sm text-textError break-words"] . toHtml . (.message) + p_ [class_ "text-sm text-textWeak break-all"] $ toHtml $ sync.branch <> " · " <> GitSync.getDashboardsPath sync + colorChip_ NeutralBadge "code-branch" $ if not sync.syncEnabled then "Disabled" else if sync.exportPaused then "Export paused" else if any (.conflicted) page.resources then "Conflicts need input" else if isJust sync.lastExportHash then "Changes proposed" else if isJust sync.lastRevision then "Synced" else "Preparing folder" + whenJust sync.pullRequestNumber $ \number -> a_ [href_ ("https://github.com/" <> sync.owner <> "/" <> sync.repo <> "/pull/" <> show number), target_ "_blank", rel_ "noopener noreferrer", class_ "text-sm text-textBrand hover:underline"] $ toHtml $ "Configuration PR #" <> show @Text number + p_ [class_ "text-sm text-textWeak"] "Monoscope edits are active immediately. Git changes apply after merge into the target branch. Dashboards and monitor definitions share this folder." + syncLink + when (canEdit && sync.exportPaused) $ post "/resume" [] $ button_ [type_ "submit", class_ "btn btn-sm btn-primary"] "Resume export" + when canEdit $ details_ [class_ "space-y-3"] do + summary_ [class_ "cursor-pointer text-sm text-textBrand"] "Move existing resources into this folder" + for_ ([RepositorySync.Dashboard, RepositorySync.Query, RepositorySync.Uptime, RepositorySync.Cron] :: [RepositorySync.ResourceKind]) \kind -> do + let candidates = filter ((== kind) . (.kind)) page.folderCandidates + unless (null candidates) $ post "/folder" [class_ "flex flex-wrap items-end gap-2"] do + input_ [type_ "hidden", name_ "kind", value_ $ T.toLower $ show kind] + formSelectField_ FieldSm (show kind) "localId" True $ for_ candidates \candidate -> option_ [value_ $ show candidate.localId] $ toHtml candidate.title + button_ [type_ "submit", class_ "btn btn-sm btn-ghost"] "Move into folder" + unless (null page.resources) + $ panel_ Raised def{icon = Just "dashboard"} "Synced resources" + $ ul_ [class_ "divide-y divide-strokeWeak"] + $ forM_ page.resources \resource -> li_ [class_ "flex flex-wrap items-center justify-between gap-3 p-3"] do + code_ [class_ "text-xs text-textStrong break-all"] $ toHtml resource.filePath + when resource.conflicted do + span_ [class_ "text-sm text-textWarning"] "Both versions changed" + details_ [class_ "w-full min-w-0 space-y-3"] do + summary_ [class_ "cursor-pointer text-sm text-textBrand"] "Compare versions" + div_ [class_ "grid min-w-0 gap-4 md:grid-cols-2"] $ for_ ([("Active in Monoscope", Yaml.encode . AE.toJSON <$> join (lookup resource.id page.conflictVersions)), ("Merged Git version", Yaml.encode <$> resource.remoteDefinition)] :: [(Text, Maybe ByteString)]) \(label, version) -> div_ [class_ "min-w-0 space-y-2"] do + h3_ [class_ "text-sm font-medium text-textStrong"] $ toHtml label + pre_ [class_ "max-h-80 overflow-auto rounded-lg bg-fillWeak p-3 text-xs text-textWeak"] $ toHtml @Text $ maybe "Deleted" decodeUtf8 version + when canEdit $ post ("/resources/" <> resource.id.toText <> "/conflict") [class_ "flex gap-2"] do + button_ [type_ "submit", name_ "useGit", value_ "false", class_ "btn btn-sm btn-ghost"] "Keep Monoscope" + button_ [type_ "submit", name_ "useGit", value_ "true", class_ "btn btn-sm btn-ghost"] "Use Git" + when canEdit $ panel_ Raised def{icon = Just "link-slash"} "Remove connection" $ do + div_ [class_ "space-y-3"] do + p_ [class_ "max-w-[65ch] text-sm leading-relaxed text-textWeak"] "Stop using this repository for source context, pull request reviews, and configuration sync. Dashboards and monitors stay local and review history is retained. Shared repository accounts remain connected." + button_ [type_ "button", onclick_ "document.getElementById('remove-repository-dialog').showModal()", class_ "btn btn-sm btn-outline text-textError hover:bg-fillError-weak"] "Remove repository" term "dialog" [id_ "remove-repository-dialog", Aria.labelledby_ "remove-repository-title", Aria.describedby_ "remove-repository-description", class_ "modal overscroll-contain"] do div_ [class_ "modal-box space-y-4 p-6"] do h2_ [id_ "remove-repository-title", class_ "text-lg font-semibold text-textStrong break-all"] $ toHtml $ "Remove " <> repository.owner <> "/" <> repository.repo <> "?" @@ -722,7 +854,7 @@ instance ToHtml RepositoryGet where div_ [id_ "remove-repository-feedback"] "" div_ [class_ "flex flex-wrap justify-end gap-2"] do form_ [method_ "dialog"] $ button_ [class_ "btn btn-sm btn-ghost", autofocus_] "Cancel" - button_ [type_ "button", hxDelete_ (base <> "/" <> repository.id.toText), hxTarget_ "#remove-repository-feedback", hxSwap_ "innerHTML", term "hx-disable" "this", hxIndicator_ "#remove-repository-indicator", class_ "btn btn-sm bg-fillError-strong text-textInverse-strong hover:opacity-90 gap-2"] do + button_ [type_ "button", hxDelete_ self, hxTarget_ "#remove-repository-feedback", hxSwap_ "innerHTML", term "hx-disable" "this", hxIndicator_ "#remove-repository-indicator", class_ "btn btn-sm bg-fillError-strong text-textInverse-strong hover:opacity-90 gap-2"] do "Remove repository" htmxIndicator_ "remove-repository-indicator" LdXS form_ [method_ "dialog", class_ "modal-backdrop"] $ button_ [Aria.label_ "Cancel removal"] "Close" @@ -741,8 +873,7 @@ repositorySourceGetH pid rid cid sample = do (_, _, bw) <- mkPageCtx pid repository <- GitSync.getRepository pid rid >>= maybe (throwError err404) pure content <- codeMappingsContent pid sample cid (Just repository) - addRespHeaders $ bodyWrapper bw{pageTitle = "Source context"} $ section_ [class_ "mx-auto max-w-4xl space-y-6 px-4 py-6 sm:px-8 sm:py-8"] do - a_ [href_ ("/p/" <> pid.toText <> "/repositories/" <> rid.toText), class_ "text-sm text-textBrand hover:underline"] $ toHtml $ repository.owner <> "/" <> repository.repo + addRespHeaders $ bodyWrapper bw{prePageTitle = Just "Repositories", pageTitle = repository.owner <> "/" <> repository.repo, pageTitleUrl = Just $ "/p/" <> pid.toText <> "/repositories/" <> rid.toText, pageTitleSuffix = Just "Source context", menuItem = Just "Repositories"} $ section_ [class_ "w-full min-w-0 space-y-6 p-4 sm:p-6"] do header_ [class_ "space-y-2"] do h1_ [class_ "text-xl font-semibold text-textStrong"] "Source context" p_ [class_ "text-sm text-textWeak max-w-2xl"] "Link this repository to the services it builds. Stack traces and pull request reviews use these mappings to find the right code and production telemetry." @@ -821,7 +952,9 @@ codeMappingsContent pid sampleM credentialM repositoryM = do authConfig <- (.config) <$> Effectful.Reader.Static.ask @AuthContext pure $ div_ [class_ "space-y-6"] do unless canEdit $ p_ [class_ "text-sm text-textWeak"] "A project editor can configure source context and pull request reviews." - unless (null mappings) $ div_ [class_ "divide-y divide-strokeWeak rounded-xl border border-strokeWeak"] $ forM_ mappings (mappingRow_ canEdit) + unless (null mappings) $ section_ [class_ "space-y-3 rounded-xl border border-strokeWeak p-4 sm:p-5"] do + h2_ [class_ "text-base font-semibold text-textStrong"] "Linked services" + div_ [class_ "divide-y divide-strokeWeak rounded-lg bg-fillWeak"] $ forM_ mappings (mappingRow_ canEdit) when (canEdit && not (null accounts) && isNothing repositoryM) $ form_ ( [ action_ editorUrl @@ -919,7 +1052,7 @@ codeMappingsContent pid sampleM credentialM repositoryM = do addMappingForm_ :: [Git.GitRepo] -> GitSync.GitHubCredential -> Html () addMappingForm_ repos credential = form_ - ( [ class_ "pt-4 space-y-3 border-t border-strokeWeak" + ( [ class_ "space-y-4 rounded-xl border border-strokeWeak bg-bgBase p-4 sm:p-5" , hxPost_ postUrl , hxTarget_ "#code-mappings-content" , hxIndicator_ "#code-mapping-indicator" @@ -927,8 +1060,9 @@ codeMappingsContent pid sampleM credentialM repositoryM = do <> scopedSwap ) $ do + h2_ [class_ "text-base font-semibold text-textStrong"] "Link a service" input_ [type_ "hidden", name_ "credentialId", value_ credential.id.toText] - div_ [class_ "grid grid-cols-1 gap-3 md:grid-cols-3"] do + div_ [class_ "grid grid-cols-1 gap-4 sm:grid-cols-2"] do -- Each option carries its own default branch, so the Branch field below can fill -- itself in and a repo whose trunk is not called "main" needs no correction. case repositoryM of @@ -1027,7 +1161,7 @@ repositoryConnectPage projectId cid = do selectedAccount <- codeContextCredential projectId cid repositories <- maybe (pure $ Right []) (credentialRepos Nothing) selectedAccount let credential = find (\account -> Just account.id == ((.id) <$> selectedAccount)) accounts - pure $ PageCtx bw{pageTitle = "Connect repositories"} RepositoryConnectGet{projectId, accounts, credential, repositories, selected = [], connectionError = Nothing} + pure $ PageCtx bw{prePageTitle = Just "Repositories", pageTitle = "Connect repositories", menuItem = Just "Repositories"} RepositoryConnectGet{projectId, accounts, credential, repositories, selected = [], connectionError = Nothing} repositoryConnectPostH :: Projects.ProjectId -> Maybe GitSync.GitHubCredentialId -> RepositoryConnectForm -> ATAuthCtx (RespHeaders (PageCtx RepositoryConnectGet)) @@ -1056,14 +1190,13 @@ repositoryConnectPostH pid cid form = do instance ToHtml RepositoryConnectGet where - toHtml page = section_ [class_ "mx-auto max-w-4xl space-y-6 px-4 py-6 sm:px-8 sm:py-8"] do + toHtml page = section_ [class_ "w-full min-w-0 space-y-6 p-4 sm:p-6"] do let base = "/p/" <> page.projectId.toText <> "/repositories" connectionUrl = base <> "/connect" <> foldMap (\c -> "?credentialId=" <> c.id.toText) page.credential - a_ [href_ base, class_ "text-sm text-textBrand hover:underline"] "All repositories" header_ [class_ "space-y-2"] do h1_ [class_ "text-xl font-semibold text-textStrong"] "Connect repositories" p_ [class_ "text-sm text-textWeak max-w-2xl"] "Choose repositories to add. Monoscope analyzes their services and enables source context, PR reviews, and dashboard and monitor sync where setup is clear. This can post reviews and open configuration PRs. You can disable each capability at any time." - div_ [id_ "repository-connect-content", class_ "space-y-5"] do + div_ [id_ "repository-connect-content", class_ "space-y-5 rounded-xl border border-strokeWeak bg-bgBase p-4 sm:p-5"] do unless (null page.accounts) $ form_ [action_ (base <> "/connect"), method_ "get", hxGet_ (base <> "/connect"), hxTrigger_ "change", hxPushUrl_ "true", hxTarget_ "#repository-connect-content", hxSelect_ "#repository-connect-content", hxSwap_ "outerMorph", hxIndicator_ "#repository-account-indicator", class_ "space-y-2"] do @@ -1093,8 +1226,8 @@ instance ToHtml RepositoryConnectGet where "Connect selected repositories" htmxIndicator_ "repository-connect-indicator" LdXS whenJust account.installationId $ installationSettingsLink_ . GitSync.installationSettingsUrl - a_ [href_ ("/p/" <> page.projectId.toText <> "/settings/git-sync/install?to=code"), class_ "btn btn-sm btn-ghost"] "Connect GitHub account" - p_ [class_ "text-xs text-textWeak"] do + a_ [href_ ("/p/" <> page.projectId.toText <> "/settings/git-sync/install?to=code"), class_ "btn btn-sm btn-outline"] "Connect GitHub account" + p_ [class_ "border-t border-strokeWeak pt-4 text-xs text-textWeak"] do "Using another Git host or a repository token? " a_ [href_ (base <> "/connect/token"), class_ "text-textBrand underline underline-offset-2"] "Connect with a token" toHtmlRaw = toHtml @@ -1125,7 +1258,7 @@ repositoryTokenPage :: Projects.ProjectId -> ATAuthCtx (PageCtx RepositoryTokenG repositoryTokenPage pid = do requireReviewWrite pid (_, _, bw) <- mkPageCtx pid - pure $ PageCtx bw{pageTitle = "Connect with a token"} $ RepositoryTokenGet pid Git.GitHub Nothing "" Nothing + pure $ PageCtx bw{prePageTitle = Just "Repositories", pageTitle = "Connect repositories", pageTitleUrl = Just $ "/p/" <> pid.toText <> "/repositories/connect", pageTitleSuffix = Just "Token", menuItem = Just "Repositories"} $ RepositoryTokenGet pid Git.GitHub Nothing "" Nothing repositoryTokenGetH :: Projects.ProjectId -> ATAuthCtx (RespHeaders (PageCtx RepositoryTokenGet)) @@ -1171,13 +1304,12 @@ repositoryTokenPostH pid form = do instance ToHtml RepositoryTokenGet where - toHtml page = section_ [class_ "mx-auto max-w-2xl space-y-6 px-4 py-6 sm:px-8 sm:py-8"] do + toHtml page = section_ [class_ "w-full min-w-0 space-y-6 p-4 sm:p-6"] do let base = "/p/" <> page.projectId.toText <> "/repositories/connect" - a_ [href_ base, class_ "text-sm text-textBrand hover:underline"] "Back to repository connections" header_ [class_ "space-y-2"] do h1_ [class_ "text-xl font-semibold text-textStrong"] "Connect with a token" p_ [class_ "text-sm text-textWeak"] "Monoscope analyzes this repository and configures source context and configuration sync where supported. Automatic PR reviews require the GitHub App. You can disable each capability later." - div_ [id_ "repository-token-content", class_ "space-y-4"] do + div_ [id_ "repository-token-content", class_ "space-y-4 rounded-xl border border-strokeWeak bg-bgBase p-4 sm:p-5"] do whenJust page.connectionError $ p_ [role_ "alert", class_ "text-sm text-textError break-words"] . toHtml form_ [action_ (base <> "/token"), method_ "post", hxPost_ (base <> "/token"), hxTarget_ "#repository-token-content", hxSelect_ "#repository-token-content", hxSwap_ "outerMorph", hxIndicator_ "#repository-token-indicator", class_ "space-y-4"] do formSelectField_ FieldSm "Git host" "host" True $ forM_ (universe @Git.GitHost) \host -> @@ -1186,7 +1318,7 @@ instance ToHtml RepositoryTokenGet where formField_ FieldSm def{value = page.repoFullName, placeholder = "team/checkout"} "Full repository name" "repoFullName" True Nothing formField_ FieldSm def{inputType = "password", extraAttrs = [autocomplete_ "new-password"]} "Access token" "accessToken" True Nothing p_ [class_ "text-xs text-textWeak"] "The token needs read access to this repository. Dashboard sync will also need write access if you enable it later." - details_ [class_ "space-y-3"] do + details_ [class_ "space-y-3 rounded-lg bg-fillWeak p-3"] do summary_ [class_ "cursor-pointer text-sm text-textWeak"] "Replacing an existing connection?" label_ [class_ "flex items-start gap-3 text-sm text-textStrong"] do input_ [type_ "checkbox", name_ "replaceToken", value_ "true", class_ "checkbox checkbox-sm shrink-0"] diff --git a/src/Pages/Components.hs b/src/Pages/Components.hs index fd3204785..f1ce118f7 100644 --- a/src/Pages/Components.hs +++ b/src/Pages/Components.hs @@ -1,4 +1,4 @@ -module Pages.Components (drawer_, PanelStyle (..), PanelCfg (..), panel_, entityHeader_, detailSection_, pivotLinks_, disclosure_, settingsSection_, settingsH2_, sectionLabel_, fieldLabel_, headerRow_, navBar, brandLogo_, resizer_, resizerWith_, detailTab_, httpTab_, tabPanel_, segmented_, periodToggle_, Deferred (..), RefreshingDeferred (..), withDeferredBody, deferredShell_, lazyPanel_, timeRefreshListener_, drawerLoadingSkeleton_, tableSkeleton_, chartSkeleton_, EmptyStateCfg (..), EmptyStateSize (..), EmptyStateAction (..), emptyState_, callout_, BadgeColor (..), IconBadgeSize (..), iconBadge_, tonePill_, colorChip_, metadataChip_, metaChip_, connectionBadge_, silenceBadge_, statFigure_, factGrid_, kvList_, sparkline_, eventsCountCell_, lastSeenCell_, dateTime, localTimeFmt_, FieldSize (..), FieldCfg (..), formField_, formSelectField_, formCheckbox_, options_, roleOptions_, tagInput_, toggleRow_, searchInput_, copyField_, copyButton_, ModalCfg (..), modalWith_, formActionsModal_, dangerAction_, floatingDialog_, dialogField_, kbdHints_, durationMenu_, primaryButton_, inlineIconBtn_, RowAction (..), rowActions_, externalLink_, installationSettingsLink_, dirtyFormSaveAttr_, resetFormOnSuccessAttr_, detailsClosedBelowAttr_, keyboardActivateAttr_, listboxNavAttr_, copySourceAttr_, filterInputAttr_, TraceFrame (..), stackTrace_, stackFrames_, codeContextUrl, curlCommand, getTargetPage, abbreviateUnit, agoText, durationQuery, untilLabel, grantsTrial, paymentPlanPicker) where +module Pages.Components (drawer_, PanelStyle (..), PanelCfg (..), panel_, entityHeader_, detailSection_, pivotLinks_, disclosure_, settingsSection_, settingsH2_, sectionLabel_, fieldLabel_, headerRow_, navBar, brandLogo_, resizer_, resizerWith_, detailTab_, httpTab_, tabPanel_, segmented_, segmentedWith_, periodToggle_, Deferred (..), RefreshingDeferred (..), withDeferredBody, deferredShell_, lazyPanel_, timeRefreshListener_, drawerLoadingSkeleton_, tableSkeleton_, chartSkeleton_, EmptyStateCfg (..), EmptyStateSize (..), EmptyStateAction (..), emptyState_, callout_, BadgeColor (..), IconBadgeSize (..), iconBadge_, tonePill_, colorChip_, metadataChip_, metaChip_, connectionBadge_, silenceBadge_, statFigure_, factGrid_, kvList_, sparkline_, eventsCountCell_, lastSeenCell_, dateTime, localTimeFmt_, FieldSize (..), FieldCfg (..), formField_, formSelectField_, formCheckbox_, options_, roleOptions_, tagInput_, toggleRow_, searchInput_, copyField_, copyButton_, ModalCfg (..), modalWith_, formActionsModal_, dangerAction_, floatingDialog_, dialogField_, kbdHints_, durationMenu_, primaryButton_, inlineIconBtn_, RowAction (..), rowActions_, externalLink_, installationSettingsLink_, dirtyFormSaveAttr_, resetFormOnSuccessAttr_, detailsClosedBelowAttr_, keyboardActivateAttr_, listboxNavAttr_, copySourceAttr_, filterInputAttr_, TraceFrame (..), stackTrace_, stackFrames_, codeContextUrl, curlCommand, getTargetPage, abbreviateUnit, agoText, durationQuery, untilLabel, grantsTrial, paymentPlanPicker) where import Data.Default (Default (..)) import Data.List (elemIndex, findIndex, lookup) @@ -139,10 +139,10 @@ el_ n = with (makeElement n) -- >>> let h = toStrict $ renderText $ drawer_ "d" False Nothing Nothing "" -- >>> "drawer-side top-0 left-0 w-full h-full flex justify-end z-10000 overflow-y-scroll overflow-x-hidden" `T.isInfixOf` h -- True --- >>> "pointer-events-none max-md:pointer-events-auto" `T.isInfixOf` h --- True --- >>> "aria-modal" `T.isInfixOf` h +-- >>> "hidden max-md:flex" `T.isInfixOf` h -- False +-- >>> "aria-modal=\"true\"" `T.isInfixOf` h +-- True drawer_ :: Text -> Bool -> Maybe Text -> Maybe (Html ()) -> Html () -> Html () drawer_ drawerId startOpen urlM content trigger = div_ [class_ "drawer drawer-end inline-block w-auto"] do input_ @@ -154,12 +154,10 @@ drawer_ drawerId startOpen urlM content trigger = div_ [class_ "drawer drawer-en <> [checked_ | startOpen] <> [ [__|on change if my.checked then - if window.matchMedia('(max-width: 767px)').matches then - add .overflow-hidden to - set my._focusTrapCleanup to window.createFocusTrap(my.closest('.drawer').querySelector('.drawer-side > [role=dialog]')) - set :closeBtn to my.closest('.drawer').querySelector('[data-drawer-close-primary]') or my.closest('.drawer').querySelector('button[aria-label="Close drawer"]') - if :closeBtn then call :closeBtn.focus() end - end + add .overflow-hidden to + set my._focusTrapCleanup to window.createFocusTrap(my.closest('.drawer').querySelector('.drawer-side > [role=dialog]')) + set :closeBtn to my.closest('.drawer').querySelector('[data-drawer-close-primary]') or my.closest('.drawer').querySelector('button[aria-label="Close drawer"]') + if :closeBtn then call :closeBtn.focus() end else remove .overflow-hidden from if my._focusTrapCleanup then @@ -167,7 +165,7 @@ drawer_ drawerId startOpen urlM content trigger = div_ [class_ "drawer drawer-en set my._focusTrapCleanup to null end end - on keydown[key == 'Escape' and my.checked and not (the event's target matches ) and no <[popover]:popover-open/> and no ] from window + on keydown[key == 'Escape' and my.checked and not event.defaultPrevented and no <#details-open:checked/> and no <[popover]:popover-open/> and no ] from window set my.checked to false trigger change on me end @@ -177,15 +175,14 @@ drawer_ drawerId startOpen urlM content trigger = div_ [class_ "drawer drawer-en label_ [Lucid.for_ drawerId, class_ "drawer-button inline-block", Aria.label_ "Open drawer"] trigger -- The closed panel is translated beyond the viewport. Clip it here rather than letting -- its transformed width create a page-level horizontal scroll range. - -- Desktop drawers are non-modal workbench panels: the page remains interactive so - -- list rows and charts can load their next selection straight into the open drawer. - -- Mobile keeps the ordinary modal overlay because the panel occupies the viewport. - div_ [class_ "drawer-side top-0 left-0 w-full h-full flex justify-end z-10000 overflow-y-scroll overflow-x-hidden pointer-events-none max-md:pointer-events-auto"] do - label_ [Lucid.for_ drawerId, Aria.label_ "Close drawer", class_ "hidden max-md:flex w-full drawer-overlay grow flex-1"] "" + -- Standard drawers are modal. Explorer log details use their separate non-modal panel. + div_ [class_ "drawer-side top-0 left-0 w-full h-full flex justify-end z-10000 overflow-y-scroll overflow-x-hidden"] do + label_ [Lucid.for_ drawerId, Aria.label_ "Close drawer", class_ "w-full drawer-overlay grow flex-1"] "" div_ [ id_ $ drawerId <> "-panel" , class_ "pointer-events-auto fixed right-0 top-0 h-dvh w-[min(90vw,75rem)] max-sm:w-screen! overflow-y-auto overscroll-contain overflow-x-hidden bg-bgRaised border-s border-strokeWeak shadow-2xl relative [&:has(.widget-editor)>.drawer-floating-close]:hidden" , role_ "dialog" + , term "aria-modal" "true" , Aria.label_ "Details" ] do @@ -743,7 +740,7 @@ data PanelCfg = PanelCfg panel_ :: Monad m => PanelStyle -> PanelCfg -> Text -> HtmlT m () -> HtmlT m () panel_ style cfg title content = case style of Raised -> div_ [class_ "surface-raised rounded-2xl p-4 relative"] do - span_ [class_ "flex items-center gap-2 text-sm font-semibold text-textStrong mb-3"] do + h3_ [class_ "flex items-center gap-2 text-sm font-semibold text-textStrong mb-3"] do whenJust cfg.icon \ic -> faSprite_ ic "regular" "w-4 h-4 text-iconNeutral" toHtml title whenJust cfg.subtitle $ span_ [class_ "normal-case tracking-normal font-normal"] . toHtml @@ -949,11 +946,16 @@ kbdHints_ hints = div_ [class_ "cmd-palette-hints mt-3 flex items-center justify -- | Segmented two-or-more-way radio switch; the first option starts checked. Input ids are -- @idPrefix <> value@ so callers can style siblings on @:checked@. segmented_ :: Text -> Text -> Text -> Text -> [(Text, Text)] -> Html () -segmented_ cls legend grp idPrefix opts = fieldset_ [class_ cls] do +segmented_ cls legend grp idPrefix opts = + segmentedWith_ [class_ cls] legend grp idPrefix [(val, lbl, [checked_ | active]) | (active, (val, lbl)) <- zip (True : repeat False) opts] + + +segmentedWith_ :: [Attribute] -> Text -> Text -> Text -> [(Text, Text, [Attribute])] -> Html () +segmentedWith_ attrs legend grp idPrefix opts = fieldset_ attrs do legend_ [class_ "sr-only"] $ toHtml legend - forM_ (zip (True : repeat False) opts) \(active, (val, lbl)) -> + forM_ opts \(val, lbl, inputAttrs) -> label_ [class_ "cursor-pointer rounded-md px-3 py-1 text-center font-medium text-textWeak has-[:checked]:bg-bgRaised has-[:checked]:text-textStrong has-[:checked]:shadow-xs has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 transition-[color,background-color,box-shadow] duration-100"] do - input_ $ [type_ "radio", name_ grp, id_ (idPrefix <> val), class_ "sr-only"] <> [checked_ | active] <> [value_ val] + input_ $ [type_ "radio", name_ grp, id_ (idPrefix <> val), class_ "sr-only"] <> inputAttrs <> [value_ val] toHtml lbl diff --git a/src/Pages/Dashboards.hs b/src/Pages/Dashboards.hs index 3e68f8aae..c4cd8b8ab 100644 --- a/src/Pages/Dashboards.hs +++ b/src/Pages/Dashboards.hs @@ -103,7 +103,6 @@ import Pages.Components (EmptyStateCfg (..), EmptyStateSize (..), FieldCfg (..), import Pages.Components qualified as Components import Pages.GitSync qualified as GitSyncPage import Pages.Issues qualified as IssuesPage -import Pages.LogExplorer.LogItem qualified as LogItem import Pages.Monitors qualified as Alerts import Pages.Rum qualified as Rum import Pkg.Components.LogQueryBox (LogQueryBoxConfig (..), logQueryBox_) @@ -368,10 +367,6 @@ dashboardPage_ pid dashId dash dashVM allParams = do -- Hidden form for widget order PATCH via HTMX (tab slug hardcoded in URL) widgetOrderTriggerForm_ widgetOrderUrl False - -- Where a logs widget's row click loads its details. A dashboard has no third - -- pane to give it, so it is always the drawer. - LogItem.detailsPanel_ pid Nothing LogItem.DrawerPanel - -- ?expand= opens the widget in the global drawer. drawerLoadAttrs_ already -- checks the drawer toggle and fires its change handler (body overflow + focus trap), -- and htmx processes the swapped content itself. @@ -2771,11 +2766,11 @@ processDashWidgets prefill pid dashId now timeParams paramsWithConstants widgets -- | Handler for dashboard with tab in path: /p/{pid}/dashboards/{dash_id}/tab/{tab_slug} -- This renders the full page with the specified tab active dashboardTabGetH :: Projects.ProjectId -> Dashboards.DashboardId -> Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> [(Text, Maybe Text)] -> ATAuthCtx (RespHeaders (NavigationResponse DashboardGet)) -dashboardTabGetH pid dashId tabSlug fileM fromDStr toDStr sinceStr hxRequest hxTriggerName allParams = - Metrics.timed Metrics.dashboardShellDuration [("navigation", OA.toAttribute $ if isJust hxRequest then ("tab" :: Text) else "initial")] - $ withSpan_ "dashboard.tab.render" [("monoscope.dashboard.navigation", OA.toAttribute $ if isJust hxRequest then ("tab" :: Text) else "initial")] +dashboardTabGetH pid dashId tabSlug fileM fromDStr toDStr sinceStr hxTarget hxTriggerName allParams = + Metrics.timed Metrics.dashboardShellDuration [("navigation", navigation)] + $ withSpan_ "dashboard.tab.render" [("monoscope.dashboard.navigation", navigation)] $ do - let prefill = prefillFor hxRequest + let prefill = prefillFor hxTarget (session, project, bw) <- mkPageCtx pid now <- Time.currentTime let (_fromD, _toD, currentRange) = TimePicker.parseTimeRange now (TimePicker.TimePicker sinceStr fromDStr toDStr) @@ -2821,7 +2816,10 @@ dashboardTabGetH pid dashId tabSlug fileM fromDStr toDStr sinceStr hxRequest hxT breadcrumbSuffixOob_ activeTab.name when (dash''.file == Just "rum.yaml" && tabSlug `elem` ["audience", "errors"]) $ Rum.segmentToolbar_ pid paramsWithTab widgetCanvas_ pid ("tab-panel-" <> dashId.toText <> "-" <> show activeTabIdx) activeTab.widgets - addRespHeaders $ navigationResponse hxRequest page fragment + addRespHeaders $ navigationResponse tabTarget page fragment + where + tabTarget = mfilter ("#dashboard-tabs-content" `T.isSuffixOf`) hxTarget -- htmx 4 sends `tag#id` + navigation = OA.toAttribute @Text $ bool "initial" "tab" $ isJust tabTarget -- | Dashboard URLs carry variables and time, not a second global scope authority. Internal diff --git a/src/Pages/GitSync.hs b/src/Pages/GitSync.hs index acedc7cd9..bca42cc91 100644 --- a/src/Pages/GitSync.hs +++ b/src/Pages/GitSync.hs @@ -468,7 +468,7 @@ repositoryDashboardPage pid rid = do repos <- maybe (pure Nothing) (liftIO . Cache.lookup ctx.repoListCache) repository.credentialId let branch = maybe "" (.defaultBranch) $ find ((== repository.owner <> "/" <> repository.repo) . (.fullName)) (fold repos) permission <- ProjectMembers.getUserPermission pid session.user.id - pure $ PageCtx bw{pageTitle = "Configuration sync"} RepositoryDashboardGet{repository, sync, accounts, form = RepositoryDashboardForm repository.credentialId branch Nothing, hostUrl = ctx.config.hostUrl, permission, setupError = Nothing} + pure $ PageCtx bw{prePageTitle = Just "Repositories", pageTitle = repository.owner <> "/" <> repository.repo, pageTitleUrl = Just $ "/p/" <> pid.toText <> "/repositories/" <> rid.toText, pageTitleSuffix = Just "Configuration sync", menuItem = Just "Repositories"} RepositoryDashboardGet{repository, sync, accounts, form = RepositoryDashboardForm repository.credentialId branch Nothing, hostUrl = ctx.config.hostUrl, permission, setupError = Nothing} repositoryDashboardGetH :: Projects.ProjectId -> GitSync.RepositoryId -> ATAuthCtx (RespHeaders (PageCtx RepositoryDashboardGet)) @@ -512,14 +512,13 @@ repositoryDashboardPostH pid rid form = do instance ToHtml RepositoryDashboardGet where - toHtml page = section_ [class_ "mx-auto max-w-4xl space-y-6 px-4 py-6 sm:px-8 sm:py-8"] do + toHtml page = section_ [class_ "w-full min-w-0 space-y-6 p-4 sm:p-6"] do let repository = page.repository base = "/p/" <> repository.projectId.toText <> "/repositories/" <> repository.id.toText - a_ [href_ base, class_ "text-sm text-textBrand hover:underline"] $ toHtml $ repository.owner <> "/" <> repository.repo header_ [class_ "space-y-2"] do h1_ [class_ "text-xl font-semibold text-textStrong"] "Configuration sync" p_ [class_ "text-sm text-textWeak max-w-2xl"] "Keep dashboard and monitor definitions alongside code. Monoscope edits open or update one configuration PR; merged target-branch changes update Monoscope." - div_ [id_ "repository-dashboard-content", class_ "space-y-4"] do + div_ [id_ "repository-dashboard-content", class_ "space-y-4 rounded-xl border border-strokeWeak bg-bgBase p-4 sm:p-5"] do whenJust page.setupError $ p_ [role_ "alert", class_ "text-sm text-textError"] . toHtml if not (maybe False (>= ProjectMembers.PEdit) page.permission) then do diff --git a/src/Pages/Issues.hs b/src/Pages/Issues.hs index b0b521736..bd9ef8123 100644 --- a/src/Pages/Issues.hs +++ b/src/Pages/Issues.hs @@ -49,13 +49,14 @@ where import BackgroundJobs qualified import Control.Exception qualified as Exception -import Control.Lens (preview) +import Control.Lens (preview, (%~)) import Data.Aeson qualified as AE import Data.Aeson.Types (Pair, Parser, parseMaybe) import Data.CaseInsensitive qualified as CI import Data.Char (isHexDigit) import Data.Default (def) import Data.Effectful.Hasql qualified as Hasql +import Data.Generics.Product.Fields qualified as Optics import Data.Generics.Sum.Constructors (_Ctor) import Data.HashMap.Strict qualified as HM import Data.HashSet qualified as HS @@ -109,7 +110,7 @@ import Pages.BodyWrapper (BWConfig (..), PageCtx (..), checkFreeTierStatus, mkPa import Pages.Charts.Charts qualified as Charts import Pages.Components (BadgeColor (..), EmptyStateAction (..), EmptyStateCfg (..), EmptyStateSize (..), TraceFrame (..), agoText, codeContextUrl, colorChip_, copyButton_, curlCommand, detailsClosedBelowAttr_, disclosure_, durationMenu_, durationQuery, emptyState_, eventsCountCell_, externalLink_, fieldLabel_, filterInputAttr_, inlineIconBtn_, kvList_, lastSeenCell_, metadataChip_, options_, periodToggle_, resizer_, sectionLabel_, silenceBadge_, sparkline_, stackFrames_, statFigure_, tonePill_, untilLabel) import Pages.LogExplorer.Log (virtualTable) -import Pages.LogExplorer.LogItem qualified as LogItem +import Pages.Replay qualified as Replay import Pages.Telemetry (traceFragmentUrl) import Pkg.AI qualified as AI import Pkg.Components.Table (BulkAction (..), Column (..), Config (..), Features (..), Pagination (..), SearchMode (..), TabFilter (..), TabFilterOpt (..), Table (..), TableHeaderActions (..), TableResponse (..), TableRows (..), ZeroState (..), col, multiSelectFilter, withAttrs, withColHeaderExtra) @@ -124,12 +125,13 @@ import Pkg.SchemaLearning.Catalog (FacetData (..), FacetSummary (..), FacetValue import Pkg.SchemaLearning.Catalog qualified as Catalog import PyF (fmt) import Relude hiding (ask) +import Relude.Extra.Foldable1 (minimum1) import Servant (Header, Headers, NoContent (..), addHeader) import System.Config (AuthContext (..), EnvConfig (..)) import System.IO.Error (userError) import System.Logging qualified as Log import System.Types (ATAuthCtx, RespHeaders, addErrorToast, addRespHeaders, addSuccessToast, addTriggerEvent, redirectCS, useTfReads) -import Utils (LoadingSize (..), LoadingType (..), countNoun, faSprite_, fmtDate, formatOffset, formatUTC, formatWithCommas, hostPath, isoT, loadingIndicator_, lookupValueText, popoverPanel_, popoverTrigger_, renderMarkdown, summaryWords, timeScopedUrl, toUriStr) +import Utils (LoadingSize (..), LoadingType (..), countNoun, faSprite_, fmtDate, formatOffset, formatUTC, formatWithCommas, hostPath, isoT, kqlQuoted, loadingIndicator_, lookupValueText, popoverPanel_, popoverTrigger_, renderMarkdown, summaryWords, timeScopedUrl, toUriStr) import Web.FormUrlEncoded (FromForm) import Web.HttpApiData (FromHttpApiData (..), parseQueryParamMaybe) @@ -227,11 +229,11 @@ issueTriage_ pid issue members = form_ [id_ "issue-triage", class_ "ml-auto max-md:w-full flex flex-wrap items-center gap-3 text-xs text-textWeak", hxPost_ $ "/p/" <> pid.toText <> "/issues/" <> issue.id.toText <> "/triage", hxTrigger_ "change", hxSwap_ "outerHTML"] do label_ [class_ "flex items-center gap-1.5 max-md:flex-1 min-w-0"] do "Priority" - select_ [class_ "select select-sm md:w-28 max-md:flex-1 min-w-0", name_ "severity", Aria.label_ "Priority"] + select_ [id_ "issue-triage-priority", class_ "select select-sm md:w-28 max-md:flex-1 min-w-0", name_ "severity", Aria.label_ "Priority"] $ options_ (Just $ display issue.severity) [(display sev, T.toTitle $ display sev) | sev <- [minBound .. maxBound :: Issues.IssueSeverity]] label_ [class_ "flex items-center gap-1.5 max-md:flex-1 min-w-0"] do "Assignee" - select_ [class_ "select select-sm md:w-44 max-md:flex-1 min-w-0", name_ "assigneeId", Aria.label_ "Assignee"] + select_ [id_ "issue-triage-assignee", class_ "select select-sm md:w-44 max-md:flex-1 min-w-0", name_ "assigneeId", Aria.label_ "Assignee"] $ options_ (Just $ maybe "" (.toText) issue.assigneeId) (("", "Unassigned") : [(m.userId.toText, memberLabel m) | m <- members]) @@ -436,25 +438,6 @@ issueDetailCore pid firstM eventM requestedRange fetchIssue = do Just (Issues.CronP _) -> pure Nothing Just (Issues.FeedbackP _) -> pure Nothing Nothing -> pure Nothing - let - -- +/-2h: the widest bracket that stays inside ~3s (see the table above). - bracketAround = windowAround 7200 - lastActive = zonedTimeToUTC $ maybe issue.updatedAt (.lastSeenAt) patternM - -- ~2x the issue's age so the data fills the chart, capped at 24H by the cost above. - defaultSinceRange createdAt - | ageH < 1 = "1H" :: Text - | ageH < 3 = "3H" - | ageH < 6 = "6H" - | otherwise = "24H" - where - ageH = diffUTCTime now (zonedTimeToUTC createdAt) / 3600 - -- The URL's range drives the picker, sample lookup and log links together. - -- Previously only widgets saw absolute dates; the server silently used defaults. - tp = case Issues.issuePayload issue of - _ | any (maybe False (not . T.null)) [requestedRange.since, requestedRange.from, requestedRange.to] -> requestedRange - Just (Issues.QueryAlertP d) -> bracketAround d.triggeredAt - _ | diffUTCTime now lastActive > 43200 -> bracketAround lastActive - _ -> TimePicker.TimePicker (Just $ defaultSinceRange issue.createdAt) Nothing Nothing stateEvent <- enriching "latest_state_event" $ Issues.selectLatestStateEvent issue.id errorM <- bool (pure Nothing) (ErrorPatterns.getErrorPatternLByHash pid issue.targetHash now) (issue.issueType == Issues.RuntimeException) canResolve <- case errorM of @@ -491,7 +474,9 @@ issueDetailCore pid firstM eventM requestedRange fetchIssue = do recordedAt = guard (isJust selectedTraceId && selectedTraceId == base.errorData.traceId) $> base.errorData.when approximateAt = zonedTimeToUTC $ if isFirst || selectedTraceId == base.firstTraceId then base.createdAt else base.updatedAt pure $ (,fromMaybe approximateAt (recordedAt <|> capturedAt)) <$> selectedTraceId - Just (Issues.ApiChangeP d) -> Telemetry.getEndpointTraceId pid d.endpointMethod d.endpointPath isFirst now + Just (Issues.ApiChangeP d) -> case d.subject of + Just (ApiChanges.SpanSchema _) -> pure Nothing + _ -> Telemetry.getEndpointTraceId pid d.endpointMethod d.endpointPath isFirst now Just (Issues.QueryAlertP _) -> pure Nothing Just (Issues.LogPatternP _) -> pure Nothing Just (Issues.LogPatternRateChangeP _) -> pure Nothing @@ -502,6 +487,30 @@ issueDetailCore pid firstM eventM requestedRange fetchIssue = do Just (Issues.FeedbackP d) -> pure $ (,d.observedAt) <$> d.traceId Nothing -> pure Nothing mTraceRef <- maybe defaultTraceRef (\ev -> pure $ Just (ev.traceId, ev.at)) eventM + let recordedAt = case Issues.issuePayload issue of + Just (Issues.RuntimeExceptionP d) -> maybe (if isFirst then d.firstSeen else d.lastSeen) (\e -> zonedTimeToUTC $ if isFirst then e.base.createdAt else e.base.updatedAt) errorM + Just (Issues.LogPatternP d) -> maybe d.firstSeenAt (zonedTimeToUTC . (.lastSeenAt)) patternM + Just (Issues.LogPatternRateChangeP d) -> d.detectedAt + Just (Issues.QueryAlertP d) -> d.triggeredAt + Just (Issues.PerformanceP d) -> d.observedAt + Just (Issues.FrontendP d) -> d.observedAt + Just (Issues.FeedbackP d) -> d.observedAt + Just (Issues.UptimeP d) -> d.downSince + Just (Issues.CronP d) -> d.expectedBy + Just (Issues.ApiChangeP _) -> zonedTimeToUTC issue.createdAt + Nothing -> zonedTimeToUTC issue.createdAt + selectedAt = maybe recordedAt snd mTraceRef + defaultSinceRange + | ageH < 1 = "1H" :: Text + | ageH < 3 = "3H" + | ageH < 6 = "6H" + | otherwise = "24H" + where + ageH = diffUTCTime now selectedAt / 3600 + tp + | any (maybe False (not . T.null)) [requestedRange.since, requestedRange.from, requestedRange.to] = requestedRange + | isFirst || isJust eventM || issue.issueType == Issues.QueryAlert || diffUTCTime now selectedAt > 43200 = windowAround 7200 selectedAt + | otherwise = TimePicker.TimePicker (Just defaultSinceRange) Nothing Nothing -- The trace is supporting evidence, not the page. It used to be fetched here -- and a cold read of a multi-thousand-span trace took >56s, so the gateway -- 504'd the whole issue. The Trace section now pulls it as its own @@ -524,9 +533,11 @@ issueDetailCore pid firstM eventM requestedRange fetchIssue = do -- without setSession, where the session is derived from user identity) -- can never have one, so it never reaches the lookup. let sessionM = tracedSession <|> listToMaybe ([sid | Just (Issues.FrontendP d) <- [Issues.issuePayload issue], Just sid <- [d.sessionId]] <> [sid | Just (Issues.FeedbackP d) <- [Issues.issuePayload issue], Just sid <- [d.sessionId]]) - replaySession <- enriching "replay_recording" $ flip foldMapM (UUID.fromText =<< sessionM) \sid -> - listToMaybe @Text - <$> Hasql.interp [HI.sql| SELECT session_id::text FROM projects.replay_sessions WHERE project_id = #{pid} AND session_id = #{sid} LIMIT 1 |] + replaySession <- + enriching "replay_recording" + $ join + <$> forM (UUID.fromText =<< sessionM) \sid -> + fmap (UUID.toText sid,) <$> Replay.sessionMetadata pid sid (one ("issue_id", issue.id.toText)) apiEvidence <- enriching "api_change_evidence" $ forM (apiChangeData issue) \d -> do changes <- ApiChanges.getAnomaliesVM pid d.anomalyHashes schemas <- SchemaCatalog.getByKeysBatch (V.singleton (pid, issue.targetHash)) @@ -534,7 +545,7 @@ issueDetailCore pid firstM eventM requestedRange fetchIssue = do addRespHeaders $ PageCtx bwconf $ issueDetailPage - IssueView{pid, issue, apiEvidence, traceRef = mTraceRef, replaySession, errM = errorM, patternM, now, isFirst, tp, stateEvent, canResolve, members, tagCounts, errHourlyFrom} + IssueView{pid, issue, apiEvidence, traceRef = mTraceRef, selectedAt, replaySession, errM = errorM, patternM, now, isFirst, tp, stateEvent, canResolve, members, tagCounts, errHourlyFrom} where -- A lookup that only decides whether an optional panel renders: a throw or a 10s stall -- degrades to Nothing. A transient TF error used to 500 the whole issue, precisely @@ -628,15 +639,15 @@ issueSampleCard_ pid snapshot result = case result of a_ [href_ $ "/p/" <> pid.toText <> "/traces/" <> toUriStr tid <> "?timestamp=" <> toUriStr (formatUTC at), class_ "text-textBrand underline underline-offset-2"] "View trace" div_ [class_ "flex flex-wrap items-center gap-1 p-4 max-h-80 overflow-y-auto"] $ V.mapM_ (summaryToken_ True) summary SampleLoading -> withSnapshot "Looking for an event in the selected range…" - SampleEmpty -> withSnapshot "No matching event in the selected range. Try another range or inspect the logs below." + SampleEmpty -> withSnapshot "No occurrences in this range. Try another range; older raw events may no longer be retained." SampleUnavailable -> withSnapshot do "The event sample could not be loaded. " button_ [type_ "button", class_ "text-textBrand underline underline-offset-2", [__|on click send retryIssueSample to #issue-sample|]] "Retry" where withSnapshot message = do div_ [class_ "px-4 py-3 text-sm text-textWeak", role_ "status"] message - whenJust (mfilter (not . T.null . T.strip) snapshot) \stored -> do - div_ [class_ "px-4 pt-2 border-t border-strokeWeak text-xs text-textWeak"] "Stored sample · saved with this issue, outside the range filter" + whenJust (nonBlank snapshot) \stored -> do + div_ [class_ "px-4 pt-2 border-t border-strokeWeak text-xs text-textWeak"] "Stored sample · preserved with this issue independently of the date filter and raw-event retention" renderLogContent_ stored @@ -727,43 +738,48 @@ userJourneySection_ spans = whenJust (extractBreadcrumbs spans) \crumbs -> do lastIdx = total - 1 renderCrumb idx bc = do let (icn, iconColor) = breadcrumbVisual bc.kind - isTerminal = idx == lastIdx - timeLabel - | idx == 0 = fmtDate "%b %-e, %H:%M:%S" $ POSIX.posixSecondsToUTCTime $ realToFrac (fromIntegral bc.timestamp / 1000 :: Double) - | otherwise = formatOffset base bc.timestamp - div_ [class_ $ bool "crumb relative flex gap-2.5 px-4 py-2 border-l-2 border-transparent hover:bg-fillWeaker" "crumb relative flex gap-2.5 px-4 py-2 border-l-2 border-strokeError-strong bg-fillError-weak" isTerminal] do - div_ [class_ "flex flex-col items-center pt-0.5 shrink-0"] do + message = nonBlank bc.message + payload = nonBlank (bc.payload >>= breadcrumbDataSummary) + rowHeader expandable = span_ [class_ "flex items-start gap-2 min-w-0 min-h-6"] do + span_ [class_ "w-7 shrink-0 font-mono text-2xs leading-5 tabular-nums text-textWeak", title_ $ fmtDate "%F %T UTC" $ POSIX.posixSecondsToUTCTime $ realToFrac (fromIntegral bc.timestamp / 1000 :: Double)] $ toHtml $ formatOffset base bc.timestamp + span_ [class_ "min-w-0 flex-1 text-xs leading-5 text-textStrong break-normal [overflow-wrap:anywhere]"] (slashBreaks_ bc.kind) + when expandable $ span_ [class_ "shrink-0 mt-1 text-textWeak", Aria.hidden_ "true"] $ faSprite_ "chevron-right" "regular" "w-3 h-3 group-open/crumb:rotate-90" + div_ [class_ "crumb flex gap-2 px-4 py-0.5 hover:bg-fillWeaker"] do + div_ [class_ "flex flex-col items-center pt-1 shrink-0"] do faSprite_ icn "regular" $ "w-3 h-3 " <> iconColor - unless isTerminal $ div_ [class_ "w-px flex-1 bg-strokeWeak mt-1"] "" - div_ [class_ "min-w-0 flex-1 flex flex-col gap-0.5"] do - div_ [class_ "flex items-center gap-2 flex-wrap"] do - span_ [class_ "text-xs tabular-nums text-textWeak shrink-0"] $ toHtml timeLabel - span_ [class_ $ "text-xs font-medium " <> iconColor] $ toHtml bc.kind - -- Long messages clamp to 3 lines; a hidden checkbox + `group-has` removes the - -- clamp, so expansion is pure CSS and survives htmx morphs with no re-init. - let expandable cls val = - label_ [class_ "group/bc cursor-pointer flex items-start gap-1"] do - input_ [type_ "checkbox", class_ "hidden"] - span_ [class_ $ cls <> " group-has-[:checked]/bc:line-clamp-none group-has-[:checked]/bc:!block min-w-0 flex-1"] $ toHtml val - faSprite_ "chevron-down" "regular" "w-3 h-3 text-textWeak shrink-0 mt-1 group-has-[:checked]/bc:rotate-180 transition-transform" - whenJust bc.message - $ expandable "text-sm text-textStrong line-clamp-3 break-words whitespace-pre-wrap" - whenJust (bc.payload >>= breadcrumbDataSummary) - $ expandable "font-mono text-xs text-textWeak line-clamp-2 break-all" + unless (idx == lastIdx) $ div_ [class_ "w-px flex-1 bg-strokeWeak mt-1"] "" + if isNothing message && isNothing payload + then div_ [class_ "min-w-0 flex-1"] $ rowHeader False + else details_ [class_ "group/crumb min-w-0 flex-1"] do + summary_ [class_ "cursor-pointer list-none [&::-webkit-details-marker]:hidden rounded focus-visible:outline-2 focus-visible:outline-offset-2"] $ rowHeader True + div_ [class_ "pl-9 pt-1 space-y-1"] do + whenJust message $ p_ [class_ "text-xs leading-relaxed text-textWeak whitespace-pre-wrap break-words"] . toHtml + whenJust payload $ p_ [class_ "font-mono text-2xs leading-relaxed text-textWeak whitespace-pre-wrap break-normal [overflow-wrap:anywhere]"] . toHtml + renderCrumbs rows = div_ [class_ "py-0.5 flex flex-col group-has-[.crumb-rev:checked]/journey:flex-col-reverse"] $ traverse_ (uncurry renderCrumb) rows + indexedCrumbs = zip [0 :: Int ..] crumbList div_ [id_ "issue-journey", class_ "border-t border-strokeWeak group/journey"] do div_ [class_ "px-4 py-2 flex flex-wrap items-center gap-2 bg-fillWeaker/40"] do faSprite_ "route" "regular" "w-3 h-3 text-textWeak" fieldLabel_ "" "User journey" span_ [class_ "text-2xs text-textWeak"] $ toHtml $ countNoun total "event" <> " before error" - div_ [class_ "ml-auto flex items-center gap-2"] do - input_ [type_ "search", placeholder_ "Search", Aria.label_ "Search the user journey", class_ "input input-xs w-32", filterInputAttr_ "#issue-journey .crumb"] - label_ [class_ "btn btn-xs btn-ghost gap-1 has-[:checked]:text-textBrand", term "data-tippy-content" "Newest first"] do - input_ [type_ "checkbox", class_ "crumb-rev sr-only"] + div_ ([class_ "w-full min-w-0 flex items-center gap-1.5"] <> [[__|on input from #issue-journey-search set #issue-journey-events.open to true|] | total > 5]) do + input_ [id_ "issue-journey-search", type_ "search", placeholder_ "Search", Aria.label_ "Search the user journey", class_ "input input-xs w-full min-w-0 flex-1 text-base sm:text-xs", filterInputAttr_ "#issue-journey .crumb"] + label_ [class_ "btn btn-xs btn-ghost shrink-0 gap-1 has-[:checked]:text-textBrand has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2", term "data-tippy-content" "Newest first"] do + input_ [type_ "checkbox", class_ "crumb-rev sr-only", Aria.label_ "Newest events first"] faSprite_ "arrows-up-down" "regular" "w-3 h-3" copyButton_ "btn btn-xs btn-ghost" "w-3 h-3" "#issue-journey-text's textContent" [] pre_ [id_ "issue-journey-text", class_ "hidden"] $ toHtml $ unlines [bc.kind <> foldMap (" " <>) bc.message | bc <- crumbList] - div_ [class_ "py-1 flex flex-col group-has-[.crumb-rev:checked]/journey:flex-col-reverse"] - $ traverse_ (uncurry renderCrumb) (zip [0 :: Int ..] crumbList) + if total <= 5 + then renderCrumbs indexedCrumbs + else do + div_ [class_ "group-has-[#issue-journey-events[open]]/journey:hidden"] do + p_ [class_ "px-4 pt-2 pb-1 text-2xs text-textWeak"] "Last 5 events" + renderCrumbs $ drop (total - 5) indexedCrumbs + details_ [id_ "issue-journey-events", class_ "group/events"] do + summary_ [class_ "px-4 py-1 text-xs text-textBrand cursor-pointer hover:bg-fillWeaker list-none [&::-webkit-details-marker]:hidden focus-visible:outline-2 focus-visible:outline-offset-[-2px]"] do + span_ [class_ "group-open/events:hidden"] $ toHtml $ "View all " <> countNoun total "event" + span_ [class_ "hidden group-open/events:inline"] "Show fewer" + renderCrumbs indexedCrumbs where -- Every breadcrumb the trace can yield, deduped across overlapping -- instrumentation (an SDK may ship both the legacy attribute and OTel events) and @@ -855,18 +871,31 @@ railSection_ title body = section_ [class_ "py-4 border-b border-strokeWeak last -- environment set is not an issue in an environment called Unknown. issueFactRow_ :: UTCTime -> Issues.Issue -> Maybe ErrorPatterns.ErrorPattern -> Maybe LogPatterns.LogPattern -> Html () issueFactRow_ now issue errM patternM = - railSection_ "Seen" $ kvList_ "text-sm" [(lbl, span_ [class_ "font-medium", term "data-tippy-content" tip] $ toHtml value) | (lbl, value, tip) <- facts] + railSection_ "Issue details" + $ kvList_ "text-sm" + $ [ ( lbl + , time_ + [ datetime_ $ isoT at + , tabindex_ "0" + , class_ "font-medium rounded-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-strokeBrand-strong" + , Aria.label_ $ lbl <> ": " <> agoText now at <> " (" <> formatUTC at <> ")" + , term "data-tippy-content" $ formatUTC at + ] + $ toHtml + $ agoText now at + ) + | (lbl, at) <- [("Last seen", lastSeen), ("First seen", firstSeen)] + ] + <> [(lbl, span_ [class_ "font-medium", term "data-tippy-content" value] $ toHtml value) | (lbl, value) <- facts] where - nonBlank = mfilter (not . T.null . T.strip) (firstSeen, lastSeen) = bimap zonedTimeToUTC zonedTimeToUTC $ fromMaybe (issue.createdAt, issue.updatedAt) $ ((\e -> (e.createdAt, e.updatedAt)) <$> errM) <|> ((\p -> (p.firstSeenAt, p.lastSeenAt)) <$> patternM) facts = - [("Last seen", agoText now lastSeen, formatUTC lastSeen), ("First seen", agoText now firstSeen, formatUTC firstSeen)] - <> catMaybes - [ (\r -> ("First release", r, r)) <$> (errM >>= (.firstRelease)) - , (\r -> ("Last release", r, r)) <$> (errM >>= (.lastRelease)) - , (\sv -> ("Service", sv, sv)) <$> nonBlank issue.service - , (\e -> ("Environment", e, e)) <$> nonBlank issue.environment - ] + catMaybes + [ ("First release",) <$> (errM >>= (.firstRelease)) + , ("Last release",) <$> (errM >>= (.lastRelease)) + , issueSource issue + , ("Environment",) <$> nonBlank issue.environment + ] -- | Everything the issue detail page's sections read. Bundled because the @@ -882,7 +911,8 @@ data IssueView = IssueView , issue :: Issues.Issue , apiEvidence :: Maybe ([ApiChanges.AnomalyVM], Maybe Catalog.CatalogEntry) , traceRef :: Maybe (Text, UTCTime) - , replaySession :: Maybe Text + , selectedAt :: UTCTime + , replaySession :: Maybe (Text, Replay.SessionMeta) , errM :: Maybe ErrorPatterns.ErrorPatternL , patternM :: Maybe LogPatterns.LogPattern , now :: UTCTime @@ -910,6 +940,32 @@ data IssueSection = IssueSection } +schemaSubjectFor :: IssueView -> Maybe ApiChanges.SchemaSubject +schemaSubjectFor v = (apiChangeData v.issue >>= (.subject)) <|> fromCatalog <|> fromEndpoint + where + fromCatalog = do + (_, Just entry) <- v.apiEvidence + pure $ ApiChanges.schemaSubject entry.template.keyKind entry.scope + fromEndpoint = do + d <- apiChangeData v.issue + method <- Issues.knownMethod d + pure $ ApiChanges.EndpointSchema Catalog.emptyScope{Catalog.method = Just method, Catalog.urlPath = Just d.endpointPath, Catalog.host = Issues.knownHost d, Catalog.service = v.issue.service} + + +-- | KQL for the issue's events: its span hash, or a span schema's service, name and kind. +-- A schema observation with no recorded source has neither. +issueEventsQuery :: IssueView -> Maybe Text +issueEventsQuery v = case schemaSubjectFor v of + Just (ApiChanges.SpanSchema scope) -> do + service <- nonBlank scope.service + name <- nonBlank scope.spanName + pure $ "resource.service.name==" <> kqlQuoted service <> " AND name==" <> kqlQuoted name <> foldMap ((" AND kind==" <>) . kqlQuoted) scope.kind + Just (ApiChanges.EndpointSchema _) -> hashQuery + Nothing -> hashQuery <* guard (v.issue.issueType /= Issues.ApiChange) + where + hashQuery = ("hashes[*]==" <>) . kqlQuoted <$> issueHashKey v.issue + + -- | Sentry's issue layout in our visual language: a full-width title block with the -- workflow bar under it, then the evidence column beside a rail. In the evidence -- column the aggregate band (range, chart, context) comes first, then one event card @@ -924,36 +980,45 @@ issueDetailPage v@IssueView{..} = div_ [class_ "flex h-full overflow-hidden rela -- standalone chart widgets read the window the picker shows. A query alert -- defaults to an absolute from/to, so seeding `since` would override it. let seedParams = TimePicker.rangeJson tp - script_ [fmt|document.addEventListener('DOMContentLoaded',function(){{const p=new URLSearchParams(location.search);if(!p.get('since')&&!p.get('from')&&!p.get('to'))window.setParams({seedParams})}});|] + script_ [fmt|(() => {{const seed=()=>{{const p=new URLSearchParams(location.search);if(!p.get('since')&&!p.get('from')&&!p.get('to'))window.setParams({seedParams})}};if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',seed,{{once:true}});else seed()}})();|] issueAggregate_ v eventCard_ v - aside_ [class_ "min-w-0 max-md:px-3 px-4 xl:border-l max-xl:border-t border-strokeWeak"] do + aside_ [class_ "min-w-0 px-4 xl:border-l max-xl:border-t border-strokeWeak"] do issueFactRow_ now issue ((.base) <$> errM) patternM railSection_ "AI analysis" do -- The background analysis job's verdict, when it has run for this error. case errM >>= \errL -> (,errL.base.errorCategory) <$> errL.base.rootCause of - Just (rootCause, categoryM) -> div_ [class_ "mb-3 rounded-lg border border-strokeWeak p-3 space-y-1.5"] do + Just (rootCause, categoryM) -> div_ [class_ "mb-2 rounded-lg bg-fillWeaker/60 p-3 space-y-2"] do div_ [class_ "flex items-center gap-2"] do - span_ [class_ "text-xs font-semibold text-textStrong"] "Root cause" - whenJust categoryM $ span_ [class_ "badge badge-sm badge-ghost"] . toHtml - p_ [class_ "text-sm text-textStrong"] $ toHtml rootCause + span_ [class_ "text-xs font-semibold text-textStrong"] "Likely cause" + whenJust categoryM $ \category -> span_ [class_ "rounded bg-fillWeak px-1.5 py-0.5 text-2xs text-textWeak"] $ toHtml $ if T.toLower category == "data" then "Data handling" else T.toTitle category + details_ [class_ "group/analysis"] do + summary_ [class_ "cursor-pointer list-none [&::-webkit-details-marker]:hidden rounded focus-visible:outline-2 focus-visible:outline-offset-2"] do + span_ [class_ "text-sm leading-relaxed text-textStrong break-words line-clamp-3 group-open/analysis:hidden"] $ toHtml rootCause + span_ [class_ "block mt-2 text-xs text-textBrand"] do + span_ [class_ "group-open/analysis:hidden"] "Read full analysis" + span_ [class_ "hidden group-open/analysis:inline"] "Show less" + p_ [class_ "mt-2 text-sm leading-relaxed text-textStrong break-words"] $ toHtml rootCause Nothing -> p_ [class_ "text-sm text-textWeak mb-2"] "Ask about the cause, the blast radius, or a fix — answered from this issue's telemetry." div_ [class_ "flex gap-2"] do - label_ [Lucid.for_ "ai-panel-toggle", class_ "btn btn-sm btn-outline flex-1 gap-1.5"] do - faSprite_ "sparkles" "regular" "w-3.5 h-3.5" - "Investigate" button_ - [ type_ "button" - , class_ "btn btn-sm btn-outline flex-1 gap-1.5" - , [__|on click set #ai-panel-toggle's checked to true then send change to #ai-panel-toggle + (class_ "btn btn-sm btn-ghost bg-fillBrand-weak text-textBrand hover:bg-fillBrand-weak hover:brightness-110 flex-1 min-w-0 gap-1.5" : aiPanelOpenerAttrs) + do + faSprite_ "sparkles" "regular" "w-3.5 h-3.5" + "Investigate" + button_ + ( aiPanelToggleAttrs + <> [ class_ "btn btn-sm btn-ghost bg-fillWeaker flex-1 min-w-0 gap-1.5" + , [__|on click set #ai-panel-toggle's opener to me then set #ai-panel-toggle's checked to true then send change to #ai-panel-toggle then set #ai-chat-input's value to 'Propose a step-by-step fix plan for this issue, with the code changes, citing the files and lines from the stack trace.' then call (#ai-chat-input).form.requestSubmit()|] - ] + ] + ) do faSprite_ "code" "regular" "w-3.5 h-3.5" "Plan a fix" whenJust errM \errL -> - div_ [hxGet_ $ "/p/" <> pid.toText <> "/issues/errors/" <> UUID.toText errL.base.id.unErrorPatternId <> "/group_members", hxTrigger_ "load", hxSwap_ "innerHTML"] pass + div_ [hxGet_ $ "/p/" <> pid.toText <> "/issues/errors/" <> UUID.toText errL.base.id.unErrorPatternId <> "/group_members", hxTrigger_ "load, issuePatternGroupChanged from:body", hxSwap_ "innerHTML"] pass activityPanel_ pid issue.id.toText traceRef aiSidePanel_ pid issue.id @@ -961,12 +1026,13 @@ issueDetailPage v@IssueView{..} = div_ [class_ "flex h-full overflow-hidden rela -- | Title, culprit, the state line, the Events figure, then the workflow bar — the -- zone that identifies the issue and acts on it, full width above both columns. issueHeader_ :: IssueView -> Html () -issueHeader_ IssueView{..} = header_ [class_ "max-md:px-3 px-4 max-md:pt-4 pt-6 pb-3 border-b border-strokeWeak space-y-3"] do +issueHeader_ v@IssueView{..} = header_ [class_ "max-md:px-3 px-4 max-md:pt-4 pt-6 pb-3 border-b border-strokeWeak space-y-3"] do issueStatusStrip_ -- h2, not h3: the shell's breadcrumb owns h1, and an h3 here ranked below the -- empty-state h2s further down the page. - let detailTitle = case Issues.issuePayload issue of - Just (Issues.QueryAlertP alertData) | not (T.null $ T.strip alertData.queryName) -> alertData.queryName + let detailTitle = case (Issues.issuePayload issue, schemaSubjectFor v) of + (Just (Issues.QueryAlertP alertData), _) | not (T.null $ T.strip alertData.queryName) -> alertData.queryName + (_, Just (ApiChanges.SpanSchema scope)) -> ApiChanges.spanSchemaTitle scope _ -> issue.title div_ [class_ "flex gap-6 items-start pr-10"] do div_ [class_ "min-w-0 flex-1 space-y-1.5"] do @@ -975,7 +1041,7 @@ issueHeader_ IssueView{..} = header_ [class_ "max-md:px-3 px-4 max-md:pt-4 pt-6 $ p_ [class_ "text-sm text-textWeak max-w-3xl border-l-2 border-strokeError-strong pl-2"] $ toHtml issue.recommendedAction div_ [class_ "flex flex-wrap gap-x-3 gap-y-1.5 items-center"] do - issueTypeChip_ False issue.issueType issue.critical + issueTypeChip_ False issue.issueType issueStateBadge_ stateEvent -- Only what is peculiar to the type belongs here; service, environment and -- first/last seen are common to every issue and live in the rail. @@ -1005,10 +1071,10 @@ issueHeader_ IssueView{..} = header_ [class_ "max-md:px-3 px-4 max-md:pt-4 pt-6 -- The chart's own total, hoisted: `naked` suppresses the widget's value slot, so -- this is the only place it renders and it cannot disagree with the chart. div_ [class_ "shrink-0 flex gap-6"] do - when (isJust $ Issues.hashPrefix issue.issueType) - $ statFigure_ "items-end" [term "data-tippy-content" "Events in the selected range"] "Events" (Widget.widgetValueSlotAs_ (issueChartId issue) Nothing) + when (isJust $ issueEventsQuery v) + $ statFigure_ "items-end" [term "data-tippy-content" "Events in the selected range"] "Events · this range" (Widget.widgetValueSlotAs_ (issueChartId issue) Nothing) -- Distinct users by user.id / user.email / client.address, all time. - whenJust errM \errL -> statFigure_ "items-end" [term "data-tippy-content" "Distinct users affected, all time"] "Users" $ toHtml $ formatWithCommas (fromIntegral errL.base.usersCount :: Double) + whenJust errM \errL -> statFigure_ "items-end" [term "data-tippy-content" "Distinct users affected, all time"] "Users · all time" $ toHtml $ formatWithCommas (fromIntegral errL.base.usersCount :: Double) div_ [class_ "flex flex-wrap items-center gap-2"] do issueAcknowledgeButton pid issue.id now ackUntil issueArchiveButton pid issue.id (isJust issue.archivedAt) @@ -1044,23 +1110,33 @@ issueHeader_ IssueView{..} = header_ [class_ "max-md:px-3 px-4 max-md:pt-4 pt-6 issueChartId :: Issues.Issue -> Text -issueChartId issue = issue.id.toText <> "-pattern-volume" +issueChartId issue = issue.id.toText <> if issue.issueType == Issues.ApiChange then "-schema-activity" else "-pattern-volume" -- | A chart series over one key of an hourly stats table, bounded by the chart's window. hourlyRollupSql :: Text -> Text -> Text -hourlyRollupSql tbl key = "SELECT * FROM (SELECT hour_bucket AS timestamp, 'value', event_count::float FROM " <> tbl <> " WHERE project_id = '{{project_id}}' AND " <> key <> ") s WHERE TRUE{{time_filter}} ORDER BY 1" +hourlyRollupSql tbl key = "SELECT * FROM (SELECT hour_bucket AS timestamp, 'value', event_count::float FROM " <> tbl <> " WHERE project_id = '{{project_id}}' AND " <> key <> ") s WHERE TRUE{{rollup_time_filter}} ORDER BY 1" -- | The aggregate band: the range every panel below reads, then the chart beside the -- type's context panel. issueAggregate_ :: IssueView -> Html () -issueAggregate_ IssueView{..} = do - let (_, _, currentRange) = TimePicker.parseTimeRange now tp +issueAggregate_ v@IssueView{..} = do + let (rangeFrom, rangeTo, currentRange) = TimePicker.parseTimeRange now tp + eventWindow = windowAround 7200 selectedAt refreshId = "anomaly-chart-refresh" div_ [id_ refreshId, class_ "hidden", [__|on submit trigger 'update-query' on window|]] "" div_ [class_ "flex flex-wrap items-center gap-2 [&>button]:max-md:basis-full"] $ TimePicker.liveDataControls_ (Just refreshId) currentRange (Just $ "issue-" <> issueChartId issue) TimePicker.RefreshOnly + p_ [class_ "flex flex-wrap items-center gap-x-2 text-xs text-textWeak"] do + span_ $ if issue.issueType == Issues.ApiChange then "Change detected" else "Selected event" + time_ [datetime_ $ isoT selectedAt] $ toHtml $ fmtDate "%F %T UTC" selectedAt + when (tp.from == eventWindow.from && tp.to == eventWindow.to && isNothing tp.since) + $ span_ "· Around selected event · ±2 hours" + when (any (> selectedAt) rangeFrom || any (< selectedAt) rangeTo) + $ p_ [class_ "text-sm text-textWeak"] do + "Selected event is outside this range. " + a_ [href_ $ "/p/" <> pid.toText <> "/issues/" <> issue.id.toText, class_ "text-textBrand hover:underline"] "Jump to latest occurrence" case Issues.issuePayload issue of Nothing -> unparsablePayload_ Just (Issues.LogPatternP _) -> issueVolumeChart_ "Pattern Volume" @@ -1104,15 +1180,19 @@ issueAggregate_ IssueView{..} = do detailRow_ [("bolt", "text-fillWarning-strong", "Recorded", agoText now d.triggeredAt)] whenJust (monitorIdFromStored d.queryId) \mid_ -> externalLink_ [href_ $ "/p/" <> pid.toText <> "/monitors/" <> mid_ <> "/overview"] "View monitor" Just (Issues.ApiChangeP d) -> do - div_ [class_ "flex flex-wrap items-center gap-3"] do - span_ [class_ $ "cbadge-sm whitespace-nowrap " <> Telemetry.methodStyle d.endpointMethod] $ toHtml d.endpointMethod - span_ [class_ "font-mono bg-fillWeaker px-2 py-1 rounded text-sm text-textStrong"] $ toHtml d.endpointPath - span_ [class_ "flex items-center gap-1.5 text-sm text-textWeak"] do - faSprite_ "server" "regular" "h-3 w-3" - toHtml d.endpointHost - sideBySide_ (issueVolumeChart_ "Request Trend") - $ contextCard_ "p-4 flex flex-col gap-3" "Endpoint Details" - $ detailRow_ [("hashtag", "text-fillBrand-strong", "Requests", formatWithCommas (fromIntegral issue.affectedRequests :: Double))] + div_ [class_ "flex flex-wrap items-center gap-x-4 gap-y-2 text-sm text-textStrong"] do + case schemaSubjectFor v of + Just (ApiChanges.SpanSchema scope) -> do + span_ [class_ "text-textWeak"] "Span schema" + whenJust scope.service $ span_ . toHtml + whenJust scope.spanName $ code_ [class_ "font-mono break-normal [overflow-wrap:anywhere]"] . toHtml + Just (ApiChanges.EndpointSchema scope) -> do + whenJust scope.method $ \method -> span_ [class_ $ "cbadge-sm " <> Telemetry.methodStyle method] $ toHtml method + whenJust scope.urlPath $ code_ [class_ "font-mono break-normal [overflow-wrap:anywhere]"] . toHtml + whenJust scope.host $ span_ . toHtml + Nothing -> span_ [class_ "text-textWeak"] "Schema observation · source details unavailable" + span_ [class_ "text-textWeak"] $ toHtml $ countNoun (length $ ordNub $ V.toList $ d.newFields <> d.deletedFields <> d.modifiedFields) "changed field" + p_ [class_ "text-xs text-textWeak"] "Observed changes describe recorded data. They do not by themselves confirm a breaking API change." where figures_ :: [(Text, Text)] -> Html () figures_ = mapM_ \(lbl, val) -> statFigure_ "" [] lbl (toHtml val) @@ -1204,10 +1284,10 @@ issueAggregate_ IssueView{..} = do eventCard_ :: IssueView -> Html () -- @--event-nav-h@ is the navigator's height (h-10 + h-9 + its 1px border); the trace -- waterfall's sticky rows and the jump-link landing offset read it. -eventCard_ IssueView{..} = div_ [class_ "surface-raised rounded-2xl overflow-clip [--event-nav-h:77px]"] do +eventCard_ view@IssueView{..} = div_ [class_ "surface-raised rounded-2xl overflow-clip [--event-nav-h:77px]"] do let occurrenceUrl useFirst = "/p/" <> pid.toText <> "/issues/" <> issue.id.toText <> "?" <> T.drop 1 (mconcat ["&first_occurrence=true" | useFirst] <> TimePicker.rangeQuery tp) -- Only issues keyed by an event hash have a stream of occurrences to step through. - hasOccurrences = isJust (Issues.hashPrefix issue.issueType) && not isLogPatternIssue + hasOccurrences = isJust (Issues.hashPrefix issue.issueType) && not isLogPatternIssue && issue.issueType /= Issues.ApiChange nav_ [id_ "issue-event-nav", class_ "sticky top-0 z-20 bg-bgRaised border-b border-strokeWeak", Aria.label_ "Issue evidence"] do div_ [class_ "max-md:px-3 px-4 h-10 flex items-center gap-3 overflow-x-auto whitespace-nowrap"] do span_ [class_ "text-sm font-semibold text-textStrong"] $ bool "Evidence" "Event" hasOccurrences @@ -1252,19 +1332,36 @@ eventCard_ IssueView{..} = div_ [class_ "surface-raised rounded-2xl overflow-cli <> foldMap (\errL -> let e = errL.base.errorData in ["- Release: " <> r | Just r <- [e.release]] <> ["", "```", e.errorType <> ": " <> e.message, errL.base.stacktrace, "```"]) errM -- The type's own evidence, then trace, logs and replay when the issue has them. -- A section with nothing to show is left out rather than rendered as an empty state. - sections = typeSections <> traceSection <> logsSection <> eventsSection <> replaySection + sections = typeSections <> apiActivitySection <> traceSection <> logsSection <> eventsSection <> replaySection -- Every event of the issue in the page's range, from its own hash; picking one's -- trace re-opens the page on that event. + apiActivitySection = + [ section "issue-schema-activity" "chart-line" "Matching span activity" + $ div_ [class_ "h-32 px-4"] + $ Widget.widget_ + (def :: Widget.Widget) + { Widget.standalone = Just True + , Widget.naked = Just True + , Widget.id = Just $ issueChartId issue + , Widget.wType = Widget.WTTimeseries + , Widget.query = Just $ query <> " | summarize count(*) by bin_auto(timestamp)" + , Widget._projectId = Just pid + , Widget.hideLegend = Just True + , Widget.hideSubtitle = Just True + } + | issue.issueType == Issues.ApiChange + , Just query <- [issueEventsQuery view] + ] eventsSection = - [ section "issue-events" "list-check" "All events" + [ section "issue-events" "list-check" (if issue.issueType == Issues.ApiChange then "Matching events" else "All events") $ div_ [class_ "max-md:px-1 px-2 flex flex-col max-h-[50vh]"] - $ virtualTable pid (Just ("/p/" <> pid.toText <> "/log_explorer/data?json=true&query=" <> toUriStr ("hashes[*]==\"" <> key <> "\"") <> TimePicker.rangeQuery tp)) Nothing + $ virtualTable pid (Just ("/p/" <> pid.toText <> "/log_explorer/data?json=true&query=" <> toUriStr query <> TimePicker.rangeQuery tp)) Nothing | not isLogPatternIssue - , Just key <- [issueHashKey issue] + , Just query <- [issueEventsQuery view] ] section = IssueSection Nothing [] evidence anchor glyph heading = pure . section anchor glyph heading . kvRows_ "max-md:px-3 px-4" . present - present = mapMaybe \(k, v) -> (k,) <$> mfilter (not . T.null . T.strip) v + present = mapMaybe \(k, v) -> (k,) <$> nonBlank v kvRows_ :: Text -> [(Text, Text)] -> Html () kvRows_ cls rows = dl_ [class_ $ "grid gap-y-0.5 font-mono text-xs " <> cls] $ forM_ rows \(k, val) -> div_ [class_ "flex gap-3 px-2 py-1 rounded odd:bg-fillWeaker min-w-0"] do dt_ [class_ "w-28 shrink-0 text-textWeak"] $ toHtml k @@ -1280,6 +1377,9 @@ eventCard_ IssueView{..} = div_ [class_ "surface-raised rounded-2xl overflow-cli runtimeM = errM >>= (.base.errorData.runtime) field :: (ErrorPatterns.ATError -> Maybe a) -> Maybe a field f = errM >>= f . (.base.errorData) + userContext = case replaySession of + Just (_, meta) | rows@(_ : _) <- present [("name", meta.userName), ("email", meta.userEmail), ("id", meta.userId)] -> rows + _ -> present [("name", field (.userName)), ("email", field (.userEmail)), ("id", field (.userId)), ("location", place), ("ip", field (.userIp)), ("tenant", field (.tenantName))] highlights = present [ ("handled", bool "no" "yes" <$> field (.handled)) @@ -1294,7 +1394,7 @@ eventCard_ IssueView{..} = div_ [class_ "surface-raised rounded-2xl overflow-cli contexts = filter (not . null . snd) - [ ("User", present [("id", field (.userId)), ("email", field (.userEmail)), ("name", field (.userName)), ("location", place), ("ip", field (.userIp)), ("tenant", field (.tenantName))]) + [ ("User", userContext) , ("Client", present [("browser", field (.browser)), ("os", field (.os)), ("device", field (.device)), ("user_agent", field (.userAgent))]) , ("Runtime", present [("runtime", runtimeM), ("service", field (.serviceName) <|> issue.service), ("release", field (.release)), ("thread", field (.threadName) <|> field (.threadId)), ("mechanism", display <$> field (.mechanism))]) , ("Trace", present [("trace.id", fst <$> traceRef), ("span.id", field (.spanId)), ("parent_span.id", field (.parentSpanId)), ("session.id", field (.sessionId))]) @@ -1456,61 +1556,92 @@ eventCard_ IssueView{..} = div_ [class_ "surface-raised rounded-2xl overflow-cli Just (Issues.ApiChangeP d) | Just (apiChanges, apiSchema) <- apiEvidence -> let snapshots = [(zonedTimeToUTC a.createdAt, change) | a <- apiChanges, change <- V.toList $ getAeson a.fieldEvidence] - snapshotCell :: Maybe ApiChanges.FieldSnapshot -> Html () - snapshotCell Nothing = span_ [class_ "text-textWeak"] "Not previously observed" - snapshotCell (Just snapshot) = do - div_ [class_ "font-mono text-xs break-words"] $ toHtml $ T.intercalate ", " $ Relude.sort $ (.toText) <$> HS.toList snapshot.structure.types - unless (HS.null snapshot.structure.formats) - $ div_ [class_ "text-xs text-textWeak break-words"] + snapshotCell :: Bool -> Bool -> Maybe ApiChanges.FieldSnapshot -> Html () + snapshotCell _ _ Nothing = span_ [class_ "text-textWeak"] "Not previously observed" + snapshotCell typeChanged formatChanged (Just snapshot) = do + div_ [class_ $ "font-mono text-xs break-words " <> bool "text-textWeak" "text-textStrong font-medium" typeChanged] $ toHtml - $ "Formats: " - <> T.intercalate ", " (Relude.sort $ HS.toList snapshot.structure.formats) + $ T.intercalate ", " + $ Relude.sort + $ (.toText) + <$> HS.toList snapshot.structure.types + when (formatChanged || not (HS.null snapshot.structure.formats)) $ div_ [class_ "text-xs text-textWeak break-words"] do + "Inferred format: " + span_ [class_ $ bool "text-textWeak" "text-textStrong font-medium" formatChanged] + $ toHtml + $ if HS.null snapshot.structure.formats then "None inferred" else T.intercalate ", " (Relude.sort $ map (T.dropAround (`elem` ['{', '}'])) $ HS.toList snapshot.structure.formats) unless (V.null snapshot.examples) do - let samples values = pre_ [class_ "mt-1 text-xs font-mono whitespace-pre-wrap break-all"] $ toHtml (decodeUtf8 (AE.encode values) :: Text) + div_ [class_ "mt-2 text-2xs text-textWeak"] "Sample values" + let samples values = div_ [class_ "mt-1 space-y-1"] $ forM_ values $ \value -> + pre_ [class_ "text-xs font-mono whitespace-pre-wrap break-normal [overflow-wrap:anywhere]"] $ case value of + AE.String text -> slashBreaks_ text + _ -> toHtml $ decodeUtf8 @Text (AE.encode value) samples (V.take 3 snapshot.examples) when (V.length snapshot.examples > 3) $ details_ do summary_ [class_ "cursor-pointer text-xs text-textBrand py-1"] $ toHtml $ "Show " <> show (V.length snapshot.examples - 3) <> " more sample values" samples (V.drop 3 snapshot.examples) + -- One tbody per detection time, headed by that time. + detectedBatches :: [(Maybe UTCTime, a)] -> (a -> Html ()) -> Html () + detectedBatches rows row = forM_ (NE.groupAllWith fst rows) \batch@((timestamp, _) :| _) -> tbody_ do + tr_ + $ th_ [scope_ "rowgroup", colspan_ "4", class_ "px-2 py-2 text-xs font-normal text-textWeak bg-fillWeaker/40 border-t border-strokeWeak"] + $ case timestamp of + Nothing -> "Detection time not recorded" + Just at -> do + "Detected " + time_ [datetime_ $ isoT at] $ toHtml $ fmtDate "%b %-e, %H:%M:%S UTC" at + traverse_ (row . snd) batch kindOf change = bool ApiChanges.Modified ApiChanges.Added (isNothing change.before) legacyFields = [(kind, path) | (kind, paths) <- [(ApiChanges.Added, d.newFields), (ApiChanges.Removed, d.deletedFields), (ApiChanges.Modified, d.modifiedFields)], path <- V.toList paths, (kind, path) `notElem` [(kindOf c, c.path) | (_, c) <- snapshots]] in [ section "issue-fields" "list-check" "Field changes" $ if Issues.hasFieldDrift d then div_ [class_ "max-md:px-3 px-4 space-y-3"] do - p_ [class_ "text-xs text-textWeak"] "Before and after show the types, formats and sample values observed at detection time." - div_ [class_ "overflow-x-auto"] $ table_ [class_ "w-full min-w-[48rem] text-left text-sm"] do - thead_ $ tr_ $ forM_ (["Field", "Change", "Before", "After", "Detected"] :: [Text]) $ th_ [scope_ "col", class_ "p-2 font-medium text-textWeak"] . toHtml - tbody_ do - forM_ (sortWith fst snapshots) \(detectedAt, change) -> tr_ [class_ "border-t border-strokeWeak align-top"] do - th_ [scope_ "row", class_ "p-2 font-mono text-xs font-normal break-all"] $ toHtml change.path - td_ [class_ "p-2"] $ toHtml $ show @Text $ kindOf change - td_ [class_ "p-2 min-w-40"] $ snapshotCell change.before - td_ [class_ "p-2 min-w-40"] $ snapshotCell (Just change.after) - td_ [class_ "p-2 text-xs whitespace-nowrap"] $ time_ [datetime_ $ isoT detectedAt] $ toHtml $ isoT detectedAt - forM_ legacyFields \(kind, path) -> tr_ [class_ "border-t border-strokeWeak align-top"] do - th_ [scope_ "row", class_ "p-2 font-mono text-xs font-normal break-all"] $ toHtml path - td_ [class_ "p-2"] $ toHtml $ show @Text kind - td_ [class_ "p-2 text-xs text-textWeak"] "Historical types and values were not captured for this change." - td_ [class_ "p-2 min-w-40"] $ case apiSchema >>= ApiChanges.fieldSnapshot path of - Nothing -> span_ [class_ "text-xs text-textWeak"] "No current samples available" - Just current -> do - div_ [class_ "text-xs text-textWeak mb-1"] "Current observations" - snapshotCell (Just current) - td_ [class_ "p-2 text-xs whitespace-nowrap"] - $ maybe "Not recorded" (toHtml . isoT) - $ listToMaybe - $ Relude.sort - [ zonedTimeToUTC a.createdAt - | a <- apiChanges - , path `V.elem` case kind of - ApiChanges.Added -> a.newFields - ApiChanges.Modified -> a.modifiedFields - ApiChanges.Removed -> V.empty - ] + p_ [class_ "text-xs text-textWeak"] "Formats are inferred from sample values and may be inaccurate." + div_ [class_ "overflow-x-auto"] $ table_ [class_ "w-full min-w-[40rem] table-fixed text-left text-sm"] do + colgroup_ do + col_ [class_ "w-[22%]"] + col_ [class_ "w-[14%]"] + col_ [class_ "w-[32%]"] + col_ [class_ "w-[32%]"] + thead_ $ tr_ $ forM_ (["Field", "Change", "Before", "After"] :: [Text]) $ th_ [scope_ "col", class_ "p-2 font-medium text-textWeak"] . toHtml + detectedBatches (first Just <$> snapshots) \change -> tr_ [class_ "border-t border-strokeWeak align-top"] do + let typeChanged = maybe True ((/= change.after.structure.types) . (.structure.types)) change.before + formatChanged = maybe True ((/= change.after.structure.formats) . (.structure.formats)) change.before + th_ [scope_ "row", class_ "p-2 font-mono text-xs font-normal break-normal [overflow-wrap:anywhere]"] $ toHtml change.path + td_ [class_ "p-2 text-xs text-textWeak break-words"] $ toHtml $ case change.before of + Just _ | not typeChanged && formatChanged -> "Format changed" + _ -> show @Text $ kindOf change + td_ [class_ "p-2"] $ snapshotCell typeChanged formatChanged change.before + td_ [class_ "p-2"] $ snapshotCell typeChanged formatChanged (Just change.after) + let legacyRows = + [ ( viaNonEmpty + minimum1 + [ zonedTimeToUTC a.createdAt + | a <- apiChanges + , path `V.elem` case kind of + ApiChanges.Added -> a.newFields + ApiChanges.Modified -> a.modifiedFields + ApiChanges.Removed -> V.empty + ] + , (kind, path) + ) + | (kind, path) <- legacyFields + ] + detectedBatches legacyRows \(kind, path) -> tr_ [class_ "border-t border-strokeWeak align-top"] do + th_ [scope_ "row", class_ "p-2 font-mono text-xs font-normal break-normal [overflow-wrap:anywhere]"] $ toHtml path + td_ [class_ "p-2 text-xs text-textWeak break-words"] $ toHtml $ show @Text kind + td_ [class_ "p-2 text-xs text-textWeak"] "Historical types and values were not captured for this change." + td_ [class_ "p-2"] $ case apiSchema >>= ApiChanges.fieldSnapshot path of + Nothing -> span_ [class_ "text-xs text-textWeak"] "No current samples available" + Just current -> do + div_ [class_ "text-xs text-textWeak mb-1"] "Current observations" + snapshotCell False False (Just current) else - emptyState_ - def{icon = Just "rocket", size = ESCompact} - "New endpoint discovered" - "This endpoint started receiving traffic. Inspect the originating request in the Trace section to see headers, body, and call site." + let (heading, message) = case schemaSubjectFor view of + Just (ApiChanges.SpanSchema _) -> ("Span schema observed", "Matching events below show the recorded spans.") + Just (ApiChanges.EndpointSchema _) -> ("New endpoint discovered", "This endpoint started receiving traffic. Matching events below show its recorded requests.") + Nothing -> ("Schema observed", "Source identity was not recorded for this observation.") + in emptyState_ def{icon = Just "list-check", size = ESCompact} heading message ] -- The log-pattern types differ only in their chip row, which the header owns. patternSections sourceField logPattern sampleMessage = @@ -1573,7 +1704,10 @@ eventCard_ IssueView{..} = div_ [class_ "surface-raised rounded-2xl overflow-cli ] -- A query alert is a threshold crossing on an aggregate — no originating request, -- so no trace-scoped logs (and 'traceRef' is always Nothing, so no Trace either). - logsSection = [logs | issue.issueType /= Issues.QueryAlert] + logsSection + | issue.issueType == Issues.ApiChange && isNothing traceRef = + [section "issue-logs" "list-view" "Related logs" $ p_ [class_ "px-4 text-sm text-textWeak"] "Related logs are unavailable because this observation has no recorded trace."] + | otherwise = [logs | issue.issueType /= Issues.QueryAlert] where -- A trace happens at an instant, so trace- and service-scoped reads get a -- +/-5min window rather than the page's range: 0.37s for the same 14 rows @@ -1598,17 +1732,20 @@ eventCard_ IssueView{..} = div_ [class_ "surface-raised rounded-2xl overflow-cli div_ [id_ "log-content", class_ "max-md:px-1 px-2 flex flex-col lg:flex-row w-full lg:max-h-[70vh]"] do div_ [class_ "grow min-w-0 min-h-0 flex flex-col"] $ virtualTable pid (Just ("/p/" <> pid.toText <> "/log_explorer/data?json=true&query=" <> toUriStr logsQuery <> logsParams)) Nothing - -- Starts hidden alongside the collapsed pane; the swap handler reveals - -- both together, and closeDetailPanel puts them back. - div_ [class_ "transition-opacity duration-200 mx-1 hidden lg:block opacity-0 pointer-events-none", id_ "resizer-details_width-wrapper"] $ resizer_ "log_details_container" "details_width" False - LogItem.detailsPanel_ pid Nothing LogItem.IssuesPanel + replaySection = [ section "replay-section" "video" "Session replay" $ termRaw "session-replay" [id_ "sessionReplay", term "initialSession" sessionId, term "consoleOpen" "true", term "fullWidth" "true", class_ "block w-full", term "projectId" pid.toText, term "containerId" "sessionPlayerWrapper"] ("" :: Text) - | Just sessionId <- [replaySession] + | Just (sessionId, _) <- [replaySession] ] +-- | A button that opens the AI panel; @opener@ is where closing returns focus. +aiPanelToggleAttrs, aiPanelOpenerAttrs :: [Attribute] +aiPanelToggleAttrs = [type_ "button", Aria.controls_ "ai_chat_container", term "aria-expanded" "false", term "hx-live:aria-expanded" "q('#ai-panel-toggle').checked ? 'true' : 'false'"] +aiPanelOpenerAttrs = aiPanelToggleAttrs <> [[__|on click set #ai-panel-toggle's opener to me then set #ai-panel-toggle's checked to true then send change to #ai-panel-toggle then call (#ai-chat-input).focus({preventScroll: true})|]] + + -- | Collapsible AI chat, open-state in localStorage and driven by a checkbox + -- group-has variants so it survives htmx swaps. aiSidePanel_ :: Projects.ProjectId -> Issues.IssueId -> Html () @@ -1627,7 +1764,13 @@ aiSidePanel_ pid issueId = do if my.checked trigger 'load-chat' on #ai-response-container end end|] ] - label_ [Lucid.for_ "ai-panel-toggle", class_ "absolute right-0 top-3 z-10 flex items-center gap-1.5 bg-fillBrand-strong text-white px-2 py-2.5 rounded-l-lg cursor-pointer shadow-md hover:opacity-90 transition-opacity group-has-[#ai-panel-toggle:checked]/ai:hidden", Aria.label_ "Open AI Assistant"] + button_ + ( [ id_ "issue-ai-launcher" + , class_ "absolute right-0 top-3 z-10 flex items-center gap-1.5 bg-fillBrand-strong text-white px-2 py-2.5 rounded-l-lg cursor-pointer shadow-md hover:opacity-90 transition-opacity group-has-[#ai-panel-toggle:checked]/ai:hidden" + , Aria.label_ "Open AI Assistant" + ] + <> aiPanelOpenerAttrs + ) $ faSprite_ "sparkles" "regular" "w-3.5 h-3.5" div_ [class_ "hidden group-has-[#ai-panel-toggle:checked]/ai:block"] $ resizer_ "ai_chat_container" "ai_width" False div_ [id_ "ai_chat_container", class_ "hidden group-has-[#ai-panel-toggle:checked]/ai:flex w-[420px] shrink-0 h-full overflow-hidden flex-col bg-bgBase border-l border-t border-strokeWeak"] do @@ -1635,7 +1778,13 @@ aiSidePanel_ pid issueId = do div_ [class_ "flex items-center gap-2"] do faSprite_ "sparkles" "regular" "w-3.5 h-3.5 text-fillBrand-strong" sectionLabel_ "AI Assistant" - label_ [Lucid.for_ "ai-panel-toggle", class_ "p-1.5 rounded-lg hover:bg-fillWeaker cursor-pointer transition-colors tap-target", Aria.label_ "Close AI Assistant"] + button_ + [ type_ "button" + , class_ "p-1.5 rounded-lg hover:bg-fillWeaker cursor-pointer transition-colors tap-target" + , Aria.label_ "Close AI Assistant" + , Aria.controls_ "ai_chat_container" + , [__|on click set #ai-panel-toggle's checked to false then send change to #ai-panel-toggle then if #ai-panel-toggle's opener call (#ai-panel-toggle).opener.focus({preventScroll: true}) else call (#issue-ai-launcher).focus({preventScroll: true}) end|] + ] $ faSprite_ "xmark" "regular" "w-3 h-3 text-textWeak" let baseUrl = "/p/" <> pid.toText <> "/issues/" <> issueId.toText div_ @@ -2255,6 +2404,26 @@ issueListGetH pid filterTM sortM _since pageM perPageM loadM periodM serviceFilt (Hasql.interp [HI.sql| SELECT DISTINCT issue_type::text FROM apis.issues WHERE project_id = #{pid} |]) ) + -- Recover source identity for issues written before subjects were stored. + schemas <- SchemaCatalog.getByKeysBatch $ V.fromList [(pid, row.base.targetHash) | row <- issues, row.base.issueType == Issues.ApiChange] + let withSchema row = case (apiChangeData row.base, HM.lookup (pid, row.base.targetHash) schemas) of + (Just d, Just entry) -> + row + & Optics.field @"base" + %~ \base -> + base + { Issues.service = entry.scope.service <|> base.service + , Issues.issueData = + Aeson + $ AE.toJSON + d + { Issues.subject = Just $ ApiChanges.schemaSubject entry.template.keyKind entry.scope + , Issues.endpointMethod = fromMaybe d.endpointMethod entry.scope.method + , Issues.endpointPath = fromMaybe d.endpointPath entry.scope.urlPath + , Issues.endpointHost = fromMaybe d.endpointHost entry.scope.host + } + } + _ -> row let listQuery types = "filter=" <> currentFilterTab <> "&sort=" <> currentSort <> "&period=" <> period <> foldMap ("&service=" <>) serviceFilters <> foldMap ("&type=" <>) types listUrl = (("/p/" <> pid.toText <> "/issues?") <>) . listQuery baseUrl = listUrl typeFilters @@ -2268,7 +2437,7 @@ issueListGetH pid filterTM sortM _since pageM perPageM loadM periodM serviceFilt } serviceMenu = multiSelectFilter "Service" "service" serviceFilters availableServices typeMenu = multiSelectFilter "Type" "type" typeFilters availableTypes - issuesVM = V.fromList $ map (IssueVM currTime period) issues + issuesVM = V.fromList $ map (IssueVM currTime . withSchema) issues tableActions = TableHeaderActions { baseUrl @@ -2278,7 +2447,7 @@ issueListGetH pid filterTM sortM _since pageM perPageM loadM periodM serviceFilt , ("Oldest", "Oldest issues first", "+created_at") , ("Recently Updated", "Most recently updated", "-updated_at") , ("Recently Active", "Most recently seen", "-last_seen") - , ("Most events", "Most events in the period", "-event_count") + , ("Highest count", "Counts use the time range shown in each row", "-event_count") , ("Most users", "Most distinct users affected", "-users_count") , ("Name (A-Z)", "Sort alphabetically", "+title") , ("Name (Z-A)", "Sort reverse alphabetically", "-title") @@ -2351,7 +2520,12 @@ issueListGetH pid filterTM sortM _since pageM perPageM loadM periodM serviceFilt else TablePage $ PageCtx bwconf issuesTable where apiChangeGroup :: IssueVM -> Maybe Text - apiChangeGroup (IssueVM _ _ issue) = (\d -> foldMap (<> " · ") issue.base.service <> d.endpointHost <> " · " <> bool "Incremental API changes" "Breaking API changes" issue.base.critical) <$> apiChangeData issue.base + apiChangeGroup (IssueVM _ issue) = do + d <- apiChangeData issue.base + let label = case d.subject of + Just (ApiChanges.SpanSchema _) -> "Span schema changes" + _ -> "API changes" + pure $ label <> " · " <> maybe "Source unavailable" snd (issueSource issue.base) -- Inbox additionally hides severity='low' so demoted silent drops don't clutter it. tabIssueFilters :: IssueTab -> Issues.IssueFilters @@ -2445,7 +2619,7 @@ issueZeroState pid = \case issueRowAttrs :: IssueVM -> [Attribute] -issueRowAttrs (IssueVM _ _ issue) = class_ ("group/row hover:bg-fillWeaker " <> bg) : sty +issueRowAttrs (IssueVM _ issue) = class_ ("group/row hover:bg-fillWeaker " <> bg) : sty where -- Matched on the constructor, not on @display@: severity is typed everywhere -- else on this page, and a Text round-trip would drop both tints silently if a @@ -2461,8 +2635,25 @@ apiChangeData :: Issues.Issue -> Maybe Issues.APIChangeData apiChangeData issue = Issues.issuePayload issue >>= preview (_Ctor @"ApiChangeP") +-- API-change ownership is the monitored host; telemetry scopes still use the recorded service. +issueSource :: Issues.Issue -> Maybe (Text, Text) +issueSource issue = case apiChangeData issue of + Just d | Just (ApiChanges.SpanSchema scope) <- d.subject -> ("Service",) <$> (scope.service <|> issue.service) + Just d | Just host <- Issues.knownHost d -> Just ("Host", host) + _ -> ("Service",) <$> nonBlank issue.service + + +nonBlank :: Maybe Text -> Maybe Text +nonBlank = mfilter (not . T.null . T.strip) + + +-- | A @@ after each @/@ so long paths can wrap. +slashBreaks_ :: Text -> Html () +slashBreaks_ = sequence_ . intersperse (toHtml @Text "/" >> wbr_ []) . map toHtml . T.splitOn "/" + + issueRowId :: IssueVM -> Text -issueRowId (IssueVM _ _ issue) = issue.base.id.toText +issueRowId (IssueVM _ issue) = issue.base.id.toText -- | (icon, colorClass, tooltip) — uses shape+color so status isn't color-only. @@ -2483,29 +2674,37 @@ anomalyStatusIndicator issue active = ("circle-exclamation", "text-iconNeutral", "Active") -data IssueVM = IssueVM UTCTime Text Issues.IssueL +data IssueVM = IssueVM UTCTime Issues.IssueL deriving stock (Show) issueColumns :: Projects.ProjectId -> Text -> Map.Map Projects.UserId Text -> Maybe (Html ()) -> [Column IssueVM] issueColumns pid period names toggleM = [ col "Issue" renderIssueMainCol & withAttrs [class_ "min-w-0 max-w-0 w-full"] - , col "Last seen" (\(IssueVM now _ issue) -> lastSeenCell_ now (Just issue.lastSeen)) & withAttrs [class_ "w-24 max-md:hidden"] + , col "Last seen" (\(IssueVM now issue) -> lastSeenCell_ now (Just issue.lastSeen)) & withAttrs [class_ "w-24 max-md:hidden"] , col "Activity" activityCol & withAttrs [class_ "w-40 max-md:hidden"] & maybe identity withColHeaderExtra toggleM - , col ("Events (" <> period <> ")") (\(IssueVM _ _ issue) -> eventsCountCell_ issue.eventCount) & withAttrs [class_ "w-24 max-md:hidden"] + , col "Count" countCol & withAttrs [class_ "w-36 min-w-36 max-md:hidden"] , col "Users" usersCol & withAttrs [class_ "w-16 max-md:hidden"] ] where - usersCol (IssueVM _ _ issue) = span_ [class_ $ "tabular-nums text-sm " <> bool "text-textStrong" "text-textWeak" (issue.usersCount == 0)] $ toHtml $ bool (formatWithCommas (fromIntegral issue.usersCount :: Double)) "\x2014" (issue.usersCount == 0) - activityCol (IssueVM _ _ issue) = sparkline_ $ V.toList issue.activityBuckets - renderIssueMainCol (IssueVM currTime countPeriod issue) = do + countContext issue = + ( if issue.base.issueType == Issues.ApiChange then "detection" else "event" + , if issue.base.issueType `elem` [Issues.RuntimeException, Issues.LogPattern, Issues.LogPatternRateChange] then period else "all time" + ) + countCol (IssueVM _ issue) = do + let (noun, scope) = countContext issue + eventsCountCell_ issue.eventCount + span_ [class_ "block text-2xs text-textWeak whitespace-nowrap"] $ toHtml $ noun <> (if issue.eventCount == 1 then "" else "s") <> " · " <> scope + usersCol (IssueVM _ issue) = span_ [class_ $ "tabular-nums text-sm " <> bool "text-textStrong" "text-textWeak" (issue.usersCount == 0)] $ toHtml $ bool (formatWithCommas (fromIntegral issue.usersCount :: Double)) "\x2014" (issue.usersCount == 0) + activityCol (IssueVM _ issue) = sparkline_ $ V.toList issue.activityBuckets + renderIssueMainCol (IssueVM currTime issue) = do let b = issue.base isAcknowledged = isJust b.acknowledgedAt isArchived = isJust b.archivedAt (icon, iconColor, tooltip) = anomalyStatusIndicator b issueUrl = "/p/" <> pid.toText <> "/issues/" <> b.id.toText stateBadges = do - severityBadge_ b.severity + issuePriorityBadge_ b issueStateBadge_ issue.latestStateEvent -- Silence has an end, and the list is where you need to see it without opening anything. whenJust (zonedTimeToUTC <$> b.acknowledgedUntil <* b.acknowledgedAt) $ silenceBadge_ "Ack'd" "Acknowledged" currTime @@ -2527,7 +2726,7 @@ issueColumns pid period names toggleM = div_ [class_ "max-md:hidden"] $ issuePreview_ (Just currTime) issue div_ [class_ "hidden max-md:flex items-center justify-between text-xs text-textWeak"] do div_ [class_ "flex items-center gap-1.5"] do - span_ [class_ $ "tabular-nums" <> bool "" " font-medium text-textStrong" (issue.eventCount > 100)] $ toHtml $ countNoun issue.eventCount "event" <> " (" <> countPeriod <> ")" + span_ [class_ $ "tabular-nums" <> bool "" " font-medium text-textStrong" (issue.eventCount > 100)] $ toHtml $ let (noun, scope) = countContext issue in countNoun issue.eventCount noun <> " · " <> scope span_ [class_ "opacity-30"] "·" span_ [] $ toHtml $ agoText currTime $ zonedTimeToUTC b.createdAt div_ [class_ "flex items-center gap-3"] do @@ -2578,6 +2777,12 @@ renderSummaryText_ = traverse_ (summaryToken_ False) . summaryWords renderIssueTitle_ :: Issues.IssueL -> Html () renderIssueTitle_ Issues.IssueL{base} + | Just d <- apiChangeData base = + let sourceTitle = case d.subject of + Just (ApiChanges.SpanSchema scope) -> fromMaybe "Span schema observation" scope.spanName + _ | Just method <- Issues.knownMethod d -> method <> " " <> d.endpointPath + _ -> "Schema observation" + in span_ [class_ "font-mono", term "data-tippy-content" sourceTitle] $ toHtml sourceTitle | T.null title = "(Untitled)" | "⇒" `T.isInfixOf` title = renderSummaryText_ title | looksLikeRawPattern title = span_ [class_ "font-mono text-xs break-all"] $ renderWithPlaceholders_ title @@ -2606,11 +2811,18 @@ issueCardCompact_ pid now issue = do span_ [class_ $ "shrink-0 " <> iconColor, title_ tooltip, Aria.label_ tooltip] $ faSprite_ icon "regular" "w-3.5 h-3.5" span_ [class_ "text-xs text-textWeak shrink-0 tabular-nums"] $ toHtml $ "#" <> show b.seqNum span_ [class_ "text-sm font-medium text-textStrong truncate min-w-0"] $ renderIssueTitle_ issue - severityBadge_ b.severity + issuePriorityBadge_ b span_ [class_ "text-xs text-textWeak shrink-0 ml-auto"] $ toHtml $ agoText now $ zonedTimeToUTC b.createdAt issuePreview_ Nothing issue +issuePriorityBadge_ :: Issues.Issue -> Html () +issuePriorityBadge_ issue + | issue.issueType == Issues.ApiChange = + tonePill_ (case issue.severity of Issues.Critical -> ErrorBadge; Issues.Warning -> WarningBadge; Issues.Info -> NeutralBadge; Issues.Low -> NeutralBadge) $ "Priority: " <> T.toTitle (display issue.severity) + | otherwise = severityBadge_ issue.severity + + -- | Only Critical and Warning carry a badge; Info and Low are deliberately unbadged. -- -- Took 'Text' and matched @"critical"@/@"warning"@ with a fall-through, while all three @@ -2639,8 +2851,8 @@ issueStateBadge_ = \case -- | Type, service, age (when given the render clock) and a payload snippet on one line. issuePreview_ :: Maybe UTCTime -> Issues.IssueL -> Html () issuePreview_ nowM Issues.IssueL{base} = div_ [class_ "flex items-center gap-2 min-w-0 overflow-hidden text-xs text-textWeak"] do - issueTypeChip_ True base.issueType base.critical - whenJust base.service $ span_ [class_ "shrink-0", term "data-tippy-content" "Service"] . toHtml + issueTypeChip_ True base.issueType + whenJust (issueSource base) $ \(label, value) -> span_ [class_ "shrink-0", term "data-tippy-content" label] $ toHtml value whenJust nowM \now -> do let created = zonedTimeToUTC base.createdAt; age = agoText now created span_ [class_ "shrink-0 opacity-40"] "·" @@ -2659,7 +2871,11 @@ issuePreview_ nowM Issues.IssueL{base} = div_ [class_ "flex items-center gap-2 m Just (Issues.UptimeP d) -> previewSnippet $ d.url <> " \x2014 " <> d.reason Just (Issues.FrontendP d) -> previewSnippet $ d.element <> foldMap (" on " <>) d.pageUrl Just (Issues.ApiChangeP d) -> - previewSnippet $ d.endpointMethod <> " " <> d.endpointPath <> if T.null d.endpointHost then "" else " on " <> d.endpointHost + previewSnippet $ case [countNoun (V.length fs) "field" <> " " <> verb | (verb, fs) <- [("added", d.newFields), ("modified", d.modifiedFields), ("removed", d.deletedFields)], not (V.null fs)] of + [] -> case d.subject of + Just (ApiChanges.SpanSchema _) -> "Span schema observed" + _ -> "New endpoint observed" + changes -> T.intercalate " · " changes Nothing -> unparsablePayload_ previewSnippet txt = span_ [class_ "font-mono truncate min-w-0", term "data-tippy-content" txt] $ renderWithPlaceholders_ $ unescSummary txt logPatternPreview pat sampleMsg @@ -2726,8 +2942,8 @@ issueArchiveButton pid aid archived = div_ [id_ ctlId, class_ "inline-flex"] do -- | The issue's type as icon + label. @compact@ is the list\'s chip: tighter, -- abbreviated where the full label would not fit in a row, with the full text on -- hover. The detail header takes the roomier form. -issueTypeChip_ :: Bool -> Issues.IssueType -> Bool -> Html () -issueTypeChip_ compact issueType critical = +issueTypeChip_ :: Bool -> Issues.IssueType -> Html () +issueTypeChip_ compact issueType = span_ ( [class_ $ bool "flex items-center gap-1.5 text-xs font-medium " "flex items-center gap-1 text-2xs whitespace-nowrap " compact <> color] <> [term "data-tippy-content" fullTxt | compact] @@ -2747,8 +2963,7 @@ issueTypeChip_ compact issueType critical = Issues.Uptime -> ("text-fillError-strong", "heart-pulse", "Uptime") Issues.Cron -> ("text-fillError-strong", "clock", "Cron") Issues.Feedback -> ("text-fillBrand-strong", "comment", "Feedback") - Issues.ApiChange | critical -> ("text-fillError-strong", "exclamation-triangle", "Breaking") - Issues.ApiChange -> ("text-fillInformation-strong", "info", "Incremental") + Issues.ApiChange -> ("text-fillInformation-strong", "info", "Schema change") shortTxt = case issueType of Issues.LogPattern -> "Log" Issues.LogPatternRateChange -> "Rate" @@ -2806,9 +3021,9 @@ issueActivityGetH pid issueId traceIdM traceTsM = do links = [(url, fromMaybe url (lookupValueText m "title")) | a <- timeline, a.event == Issues.Lifecycle Issues.IELinked, Just m <- [a.metadata], Just url <- [lookupValueText m "url"]] issueUrl = "/p/" <> pid.toText <> "/issues/" <> issueId.toText addRespHeaders do - form_ [class_ "px-4 pb-3 flex flex-col gap-2", hxPost_ $ issueUrl <> "/comment", hxSwap_ "none"] do - textarea_ [name_ "body", required_ "", rows_ "2", placeholder_ "Add a comment\x2026", Aria.label_ "Comment", class_ "textarea textarea-sm w-full"] "" - button_ [type_ "submit", class_ "btn btn-xs btn-outline self-end"] "Comment" + form_ [class_ "mx-4 mb-3 p-2 rounded-lg border border-strokeWeak bg-fillWeaker/40 flex flex-col gap-2 focus-within:border-strokeBrand-strong", hxPost_ $ issueUrl <> "/comment", hxSwap_ "none"] do + textarea_ [name_ "body", required_ "", rows_ "2", placeholder_ "Add a comment\x2026", Aria.label_ "Comment", class_ "textarea textarea-ghost textarea-sm w-full min-h-16 border-0 bg-transparent shadow-none focus:outline-none text-base sm:text-sm"] "" + button_ [type_ "submit", class_ "btn btn-xs btn-ghost bg-fillWeak border-0 shadow-none self-end"] "Comment" unless (null links) $ div_ [class_ "px-4 pb-3 space-y-1"] do h4_ [class_ "text-2xs font-semibold text-textWeak uppercase tracking-wide"] "External links" forM_ links \(url, title) -> a_ [href_ url, target_ "_blank", rel_ "noopener", class_ "flex items-center gap-1.5 text-sm text-textBrand hover:underline truncate"] do @@ -2821,10 +3036,17 @@ issueActivityGetH pid issueId traceIdM traceTsM = do input_ [type_ "url", name_ "url", required_ "", placeholder_ "https://github.com/org/repo/issues/42", Aria.label_ "Issue URL", class_ "input input-sm w-full"] input_ [type_ "text", name_ "title", placeholder_ "Title (optional)", Aria.label_ "Link title", class_ "input input-sm w-full"] button_ [type_ "submit", class_ "btn btn-xs self-end"] "Link" - unless (null participants && null viewers) $ div_ [class_ "px-4 pb-3 space-y-1 text-xs text-textWeak"] do + unless (null participants && null viewers) $ div_ [class_ "px-4 pb-3 space-y-1 text-xs leading-relaxed text-textWeak break-words"] do h4_ [class_ "text-2xs font-semibold uppercase tracking-wide"] "People" - unless (null participants) $ p_ $ toHtml $ "Participating: " <> T.intercalate ", " (name <$> participants) - unless (null viewers) $ p_ $ toHtml $ "Viewed: " <> T.intercalate ", " (name <$> viewers) + details_ [class_ "group/people"] do + summary_ [class_ "flex items-center gap-2 cursor-pointer list-none [&::-webkit-details-marker]:hidden rounded focus-visible:outline-2 focus-visible:outline-offset-2"] do + span_ [class_ "flex -space-x-1"] $ forM_ (take 5 $ participants <> viewers) \uid -> + img_ [src_ $ "/api/avatar/" <> uid.toText, alt_ $ name uid, title_ $ name uid, loading_ "lazy", width_ "24", height_ "24", class_ "h-6 w-6 rounded-full bg-fillWeak outline outline-1 outline-black/10 dark:outline-white/10"] + span_ $ toHtml $ let n = length participants + length viewers in show n <> bool " people" " person" (n == 1) + faSprite_ "chevron-down" "regular" "w-3 h-3 group-open/people:rotate-180" + div_ [class_ "pt-2 space-y-1"] do + unless (null participants) $ p_ $ toHtml $ "Participating: " <> T.intercalate ", " (name <$> participants) + unless (null viewers) $ p_ $ toHtml $ "Viewed: " <> T.intercalate ", " (name <$> viewers) div_ [class_ "border-t border-strokeWeak"] do div_ [class_ "px-4 py-2 flex items-center gap-2 bg-fillWeaker/40"] do faSprite_ "circle-info" "regular" "w-3 h-3 text-textWeak" @@ -2839,7 +3061,7 @@ issueActivityTimeline_ userMap now activities | otherwise = div_ [class_ "p-4 flex flex-col gap-0"] $ forM_ activities \a -> do let (icon, color, label) = eventDisplay a.event actorText = foldMap (\uid -> foldMap (\u -> " by " <> CI.original u.email) $ Map.lookup uid userMap) a.createdBy - div_ [class_ "flex items-start gap-3 relative pl-4 pb-4 border-l-2 border-strokeWeak ml-2"] do + div_ [class_ "flex items-start gap-3 relative pl-4 pb-4 last:pb-0 border-l border-strokeWeak ml-2"] do div_ [class_ $ "absolute -left-[9px] top-0.5 w-4 h-4 rounded-full flex items-center justify-center " <> color] $ faSprite_ icon "regular" "w-2.5 h-2.5" div_ [class_ "flex flex-col gap-0.5 min-w-0"] do @@ -2961,20 +3183,27 @@ errorGroupMembersGetH pid errorId = do forM_ members \member -> do let memberId = UUID.toText member.id.unErrorPatternId unmergeUrl = "/p/" <> pid.toText <> "/issues/errors/" <> memberId <> "/unmerge" - div_ [class_ "flex items-center justify-between p-3 bg-fillWeaker rounded-lg", id_ $ "member-" <> memberId] do - div_ [class_ "flex flex-col gap-1 min-w-0"] do - span_ [class_ "text-sm font-medium text-textStrong truncate"] $ toHtml $ member.errorType <> ": " <> member.message - span_ [class_ "text-xs text-textWeak"] $ toHtml $ "Hash: " <> member.hash - button_ - [ class_ "btn btn-xs btn-ghost tap-target" - , Aria.label_ "Unmerge pattern" - , hxPost_ unmergeUrl - , hxTarget_ $ "#member-" <> memberId - , hxSwap_ "outerHTML" - ] - do - faSprite_ "code-branch" "regular" "w-3 h-3" - "Unmerge" + div_ [class_ "p-3 bg-fillWeaker rounded-lg space-y-2", id_ $ "member-" <> memberId] do + div_ [class_ "flex items-center justify-between gap-2"] do + span_ [class_ "text-xs font-medium text-textWeak min-w-0 break-words"] $ toHtml member.errorType + button_ + [ type_ "button" + , class_ "btn btn-xs btn-ghost tap-target shrink-0" + , Aria.label_ $ "Unmerge pattern " <> member.hash + , hxPost_ unmergeUrl + , hxSwap_ "none" + ] + do + faSprite_ "code-branch" "regular" "w-3 h-3" + "Unmerge" + details_ [class_ "group/pattern"] do + summary_ [class_ "cursor-pointer list-none [&::-webkit-details-marker]:hidden rounded focus-visible:outline-2 focus-visible:outline-offset-2"] do + span_ [class_ "text-sm text-textStrong break-normal [overflow-wrap:anywhere] line-clamp-2 group-open/pattern:hidden"] $ toHtml member.message + span_ [class_ "block mt-1 text-xs text-textBrand"] do + span_ [class_ "group-open/pattern:hidden"] "Read full message" + span_ [class_ "hidden group-open/pattern:inline"] "Show less" + p_ [class_ "mt-2 text-sm text-textStrong whitespace-pre-wrap break-normal [overflow-wrap:anywhere]"] $ toHtml member.message + span_ [class_ "block font-mono text-2xs text-textWeak"] $ toHtml $ "Hash: " <> member.hash errorUnmergePostH :: Projects.ProjectId -> UUID.UUID -> ATAuthCtx (RespHeaders (Html ())) @@ -2982,4 +3211,5 @@ errorUnmergePostH pid errorId = do _ <- Projects.sessionAndProject pid void $ PatternMerge.unmergePattern pid (ErrorPatternId errorId) addSuccessToast "Pattern unmerged" Nothing - addRespHeaders $ div_ [class_ "p-3 bg-fillSuccess-weak rounded-lg text-sm text-fillSuccess-strong"] "Pattern unmerged successfully" + addTriggerEvent "issuePatternGroupChanged" AE.Null + addRespHeaders mempty diff --git a/src/Pages/LogExplorer/Log.hs b/src/Pages/LogExplorer/Log.hs index 53be42433..c4ff22c17 100644 --- a/src/Pages/LogExplorer/Log.hs +++ b/src/Pages/LogExplorer/Log.hs @@ -787,6 +787,7 @@ apiLogH pid queryM' cols' sinceM fromM toM sourceM targetSpansM targetEventM sho let bwconf = bw { pageTitle = "Explorer" + , pageProvidesLogDetails = True , docsLink = Just "https://monoscope.tech/docs/dashboard/dashboard-pages/api-log-explorer/" , freeTierStatus = freeTierStatus , headContent = Nothing @@ -1548,7 +1549,7 @@ apiLogsPage page = do <> ", {headers: {Accept: \"application/json\"}, credentials: \"include\"}).then(r => r.json()); window.logDataPromise = load().catch(load);}" sectionWrapper_ do template_ [id_ "trace-loading-skeleton"] traceLoadingSkeleton_ - div_ [class_ "fixed z-[9999] hidden right-0 w-max h-max border border-strokeWeak rounded top-32 bg-bgBase shadow-2xl", id_ "sessionPlayerWrapper"] do + div_ [class_ "fixed z-10030 hidden right-4 w-max h-max rounded-2xl top-32 border-2 border-strokeStrong p-0.5 bg-bgRaised shadow-lg [&_#replayerOuterContainer]:shadow-none", id_ "sessionPlayerWrapper"] do termRaw "session-replay" [id_ "sessionReplay", class_ "shrink-1 flex flex-col", term "projectId" pidTxt, term "containerId" "sessionPlayerWrapper"] ("" :: Text) queryControlsSection facetsAndLogListSection diff --git a/src/Pages/LogExplorer/LogItem.hs b/src/Pages/LogExplorer/LogItem.hs index d5daaaac4..45e9f9b9b 100644 --- a/src/Pages/LogExplorer/LogItem.hs +++ b/src/Pages/LogExplorer/LogItem.hs @@ -204,7 +204,7 @@ detailsPanel_ pid targetEventM layout = div_ [class_ $ "contents group/details " $ label_ [ Lucid.for_ "details-open" , Aria.label_ "Close item details" - , class_ "fixed inset-0 z-40 bg-transparent pointer-events-none max-md:bg-black/40 max-md:pointer-events-auto hidden group-has-[#details-open:checked]/details:block" + , class_ "fixed inset-0 z-10010 bg-transparent pointer-events-none max-md:bg-black/40 max-md:pointer-events-auto hidden group-has-[#details-open:checked]/details:block" ] "" div_ @@ -212,7 +212,7 @@ detailsPanel_ pid targetEventM layout = div_ [class_ $ "contents group/details " $ memptyIfFalse (layout == IssuesPanel) "peer-checked/open:max-w-full! max-lg:peer-checked/open:w-full! " <> "details-panel grow-0 relative shrink-0 overflow-y-auto overflow-x-hidden h-full c-scroll w-0 max-w-0 overflow-hidden " <> "group-has-[#viz-logs:checked]/pg:max-w-full group-has-[#viz-logs:checked]/pg:overflow-y-auto group-has-[#viz-sessions:checked]/pg:max-w-full group-has-[#viz-sessions:checked]/pg:overflow-y-auto " - <> "max-md:hidden max-md:[&.details-open]:block! max-md:[&.details-open]:fixed max-md:[&.details-open]:inset-0 max-md:[&.details-open]:z-40 max-md:[&.details-open]:w-full max-md:[&.details-open]:max-w-full max-md:[&.details-open]:bg-bgBase " + <> "max-md:hidden max-md:[&.details-open]:block! max-md:[&.details-open]:fixed max-md:[&.details-open]:inset-0 max-md:[&.details-open]:z-10020 max-md:[&.details-open]:w-full max-md:[&.details-open]:max-w-full max-md:[&.details-open]:bg-bgBase " -- Drawer geometry. `!` on width/max-width beats the inline style the -- resizer leaves behind when the reader switches modes mid-session. -- @@ -220,7 +220,7 @@ detailsPanel_ pid targetEventM layout = div_ [class_ $ "contents group/details " -- containing block for every `position: fixed` descendant, which is what put the -- Share-link modal (fixed inset-0, meant to centre on the viewport) half off the -- screen when it opened inside the drawer. - <> "peer-checked/drawer:fixed peer-checked/drawer:top-0 peer-checked/drawer:bottom-0 peer-checked/drawer:z-50 peer-checked/drawer:h-full peer-checked/drawer:w-[min(56rem,94vw)]! peer-checked/drawer:max-w-full! peer-checked/drawer:bg-bgBase peer-checked/drawer:border-l peer-checked/drawer:border-strokeWeak peer-checked/drawer:shadow-2xl peer-checked/drawer:overflow-y-auto peer-checked/drawer:transition-[right] peer-checked/drawer:right-[-100vw] " + <> "peer-checked/drawer:fixed peer-checked/drawer:top-0 peer-checked/drawer:bottom-0 peer-checked/drawer:z-10020 peer-checked/drawer:h-full peer-checked/drawer:w-[min(56rem,94vw)]! peer-checked/drawer:max-w-full! peer-checked/drawer:bg-bgBase peer-checked/drawer:border-l peer-checked/drawer:border-strokeWeak peer-checked/drawer:shadow-2xl peer-checked/drawer:overflow-y-auto peer-checked/drawer:transition-[right] peer-checked/drawer:right-[-100vw] " -- Open state. Inline mode never positions the panel, so this is inert there. <> "peer-checked/open:right-0! peer-checked/open:block!" , data_ "inline-width" (if layout == IssuesPanel then "33.333333%" else "") diff --git a/src/Pages/Monitors.hs b/src/Pages/Monitors.hs index 36897d582..069363cf0 100644 --- a/src/Pages/Monitors.hs +++ b/src/Pages/Monitors.hs @@ -363,7 +363,7 @@ notificationSettingsSection_ allTeams selectedTeamIds formId monitorM = do stopEnabled = maybe False (isJust . (.stopAfterCount)) monitorM stopVal = maybe "5" show $ monitorM >>= (.stopAfterCount) panel_ (Collapsible False) def{icon = Just "envelope"} "Notification Settings" do - formField_ FieldSm def{hint = Just "@everyone includes all project members and project notification channels."} "Teams" (formId <> "-teams") False + formField_ FieldSm def{hint = Just "All project members and notification channels."} "Teams" (formId <> "-teams") False $ Just $ tagInput_ (formId <> "-teams") "" [name_ "teams", data_ "tagify-text-prop" "name", data_ "tagify-whitelist" teamList, data_ "tagify-initial" existingTeams, Aria.describedby_ (formId <> "-teams-hint")] details_ [class_ "mt-4 border-t border-strokeWeak pt-3"] do @@ -764,14 +764,15 @@ unifiedOverviewPage pid alert currTime teams = do div_ [class_ "max-md:hidden w-78 shrink-0"] $ alertSidebar_ display alert currTime -- Which tab is open is DOM state (radio), so no script is needed and it survives a morph. - div_ [role_ "tablist", class_ "w-full group/mt", id_ "monitor-tabs"] do - div_ [class_ "w-full flex border-b border-strokeWeak"] do + div_ [class_ "w-full group/mt", id_ "monitor-tabs"] do + fieldset_ [class_ "w-full min-w-0 flex border-b border-strokeWeak"] do + legend_ [class_ "sr-only"] "Monitor detail view" detailTab_ "monitor-tabs" "tab-exec-history" "shrink-0 font-medium text-textWeak" True "Execution History" detailTab_ "monitor-tabs" "tab-notif-channels" "shrink-0 font-medium text-textWeak" False "Notification Channels" - div_ [role_ "tabpanel", class_ "overflow-y-auto hidden group-has-[.tab-exec-history:checked]/mt:block"] + div_ [class_ "overflow-y-auto hidden group-has-[.tab-exec-history:checked]/mt:block"] $ div_ [class_ "mt-2 p-2 border border-strokeWeak rounded-lg overflow-x-auto flex flex-col max-h-[400px] max-md:max-h-[300px]"] $ termRaw "log-list" [id_ "resultTable", class_ "w-full divide-y shrink-1 flex flex-col h-full min-h-0 min-w-0 rr-block", term "windowTarget" "logList", term "projectId" pid.toText, term "initialFetchUrl" historyUrl] ("" :: Text) - div_ [role_ "tabpanel", class_ "overflow-y-auto hidden group-has-[.tab-notif-channels:checked]/mt:block"] $ alertNotificationsTab_ alert teams + div_ [class_ "overflow-y-auto hidden group-has-[.tab-notif-channels:checked]/mt:block"] $ alertNotificationsTab_ alert teams where display = maybe (MDStatus alert.currentStatus) (const MDDeactivated) alert.deactivatedAt historyUrl = "/p/" <> pid.toText <> "/log_explorer/data?json=true&query=" <> toUriStr ("kind==\"alert\" and parent_id==\"" <> alert.id.toText <> "\"") @@ -826,46 +827,51 @@ alertSidebar_ display alert currTime = do alertNotificationsTab_ :: Monitors.QueryMonitor -> V.Vector ManageMembers.Team -> Html () -alertNotificationsTab_ alert teams = do - div_ [class_ "pt-6 pb-3"] do - div_ [class_ "mb-6"] do - h4_ [class_ "text-base font-medium text-textStrong mb-2 flex items-center"] $ faSprite_ "users" "regular" "h-4 w-4 mr-2" >> "Teams" +alertNotificationsTab_ alert teams = + div_ [class_ "py-6 grid grid-cols-1 lg:grid-cols-[minmax(0,22rem)_minmax(0,1fr)] gap-6 items-start max-w-6xl"] do + section_ [Aria.labelledby_ "monitor-recipients-heading", class_ "min-w-0 space-y-3"] do + h3_ [id_ "monitor-recipients-heading", class_ "text-base font-medium text-textStrong flex items-center gap-2"] do + faSprite_ "users" "regular" "h-4 w-4" + "Recipients" if V.null teams - then do - div_ [class_ "text-sm text-textWeak"] "No teams configured for this monitor." - div_ [class_ "pt-2 flex items-center gap-1"] do - span_ [class_ "text-sm text-textWeak"] "Project level notification integrations will be used." - a_ [href_ $ "/p/" <> alert.projectId.toText <> "/settings/integrations", class_ "text-sm text-textBrand hover:underline"] "Configure integrations" - else div_ [class_ "flex flex-wrap gap-4 mb-4"] $ forM_ teams \team -> - div_ [class_ "flex flex-col border rounded-lg gap-4 border-strokeWeak p-6 relative w-96", id_ team.handle] do - unless team.is_everyone - $ button_ - [ type_ "button" - , class_ "absolute top-3 cursor-pointer right-3 text-iconNeutral hover:text-iconBrand transition-colors" - , Aria.label_ $ "Remove " <> team.name <> " team" - , term "data-tippy-content" "Remove team" - , hxDelete_ $ "/p/" <> alert.projectId.toText <> "/monitors/alerts/" <> alert.id.toText <> "/teams/" <> team.id.toText - , hxTarget_ $ "#" <> team.handle - , hxSwap_ "outerHTML" - ] - $ faSprite_ "trash" "regular" "h-3 w-3" - span_ [class_ "text-sm font-medium"] $ toHtml team.name - forM_ ([("envelope", "regular", team.notify_emails), ("slack", "solid", ("#" <>) <$> team.slack_channels), ("discord", "brand", ("#" <>) <$> team.discord_channels)] :: [(Text, Text, V.Vector Text)]) \(icon, style, entries) -> - forM_ entries \entry -> - div_ [class_ "flex items-center gap-2"] - $ span_ [class_ "text-sm text-textWeak"] - $ faSprite_ icon style "h-3 w-3 mr-2 text-iconNeutral" - >> toHtml entry - - div_ [class_ "pt-6 pb-3"] do - h4_ [class_ "font-medium text-textStrong mb-2"] "Notification Template" - div_ [class_ "rounded-lg py-2 space-y-2"] do - div_ [class_ "flex items-center gap-1"] do - span_ [class_ "text-sm font-medium text-textStrong"] "Subject: " - span_ [class_ "text-sm text-textWeak"] $ toHtml alert.alertConfig.subject - div_ [class_ "flex flex-col gap-1"] do - span_ [class_ "text-sm font-medium text-textStrong"] "Message" - p_ [class_ "text-sm text-textWeak mt-1"] $ toHtml alert.alertConfig.message + then div_ [class_ "rounded-xl border border-strokeWeak bg-bgRaised p-4 space-y-2"] do + p_ [class_ "text-sm text-textWeak"] "No teams configured for this monitor. Project notification integrations will be used." + a_ [href_ $ "/p/" <> alert.projectId.toText <> "/settings/integrations", class_ "text-sm text-textBrand hover:underline"] "Configure integrations" + else forM_ teams \team -> + article_ [class_ "rounded-xl border border-strokeWeak bg-bgRaised p-4 space-y-4 min-w-0", id_ team.handle] do + div_ [class_ "space-y-1"] do + div_ [class_ "flex items-center justify-between gap-2"] do + h4_ [class_ "text-sm font-semibold text-textStrong min-w-0 break-words"] $ toHtml team.name + unless team.is_everyone + $ button_ + [ type_ "button" + , class_ "btn btn-xs btn-ghost min-h-6 min-w-6 shrink-0 text-textWeak" + , Aria.label_ $ "Remove " <> team.name <> " team" + , term "data-tippy-content" "Remove team" + , hxDelete_ $ "/p/" <> alert.projectId.toText <> "/monitors/alerts/" <> alert.id.toText <> "/teams/" <> team.id.toText + , hxTarget_ $ "#" <> team.handle + , hxSwap_ "outerHTML" + ] + $ faSprite_ "trash" "regular" "h-3 w-3" + when team.is_everyone $ p_ [class_ "text-xs leading-relaxed text-textWeak"] "All project members and notification channels." + let destinations = filter (not . V.null . snd) [("Email", team.notify_emails), ("Slack", ("#" <>) <$> team.slack_channels), ("Discord", ("#" <>) <$> team.discord_channels)] :: [(Text, V.Vector Text)] + when (null destinations) $ p_ [class_ "text-sm text-textWeak"] "No destinations configured for this team." + forM_ destinations \(provider, entries) -> div_ [class_ "space-y-1.5"] do + h5_ [class_ "text-xs font-medium text-textWeak"] $ toHtml $ provider <> " (" <> show (V.length entries) <> ")" + ul_ [class_ "space-y-1 text-sm text-textStrong break-normal [overflow-wrap:anywhere]"] $ forM_ entries $ li_ . toHtml + section_ [Aria.labelledby_ "monitor-message-heading", class_ "min-w-0 space-y-3"] do + h3_ [id_ "monitor-message-heading", class_ "text-base font-medium text-textStrong"] "Message preview" + div_ [class_ "rounded-xl border border-strokeWeak bg-bgRaised p-4 space-y-4"] do + div_ [class_ "space-y-1"] do + h4_ [class_ "text-xs font-medium text-textWeak"] "Subject" + p_ [class_ "text-base font-semibold text-textStrong break-normal [overflow-wrap:anywhere] max-w-[65ch]"] + $ toHtml + $ if T.null (T.strip alert.alertConfig.subject) then "No subject configured" else alert.alertConfig.subject + div_ [class_ "space-y-1"] do + h4_ [class_ "text-xs font-medium text-textWeak"] "Message" + p_ [class_ "text-sm leading-relaxed text-textStrong whitespace-pre-wrap break-normal [overflow-wrap:anywhere] max-w-[65ch]"] + $ toHtml + $ if T.null (T.strip alert.alertConfig.message) then "No message configured" else alert.alertConfig.message -- | Uptime checks: URLs Monoscope probes on a schedule. They share the scrape-target diff --git a/src/Pages/Replay.hs b/src/Pages/Replay.hs index cf74f4788..ec2be0f1b 100644 --- a/src/Pages/Replay.hs +++ b/src/Pages/Replay.hs @@ -1,4 +1,4 @@ -module Pages.Replay (replayPostH, ReplayPost (..), processReplayEvents, replaySessionGetH, fetchReplaySession, ReplaySessionResp (..), RawJson (..), compressAndMergeReplaySessions, mergeReplaySession, expireOldReplayData, replayObjectPrefix, migratedReplayKey, concatRawJsonArrays, sessionFileKeys, splitReplayPayload, ReplayPayload (..), firstEventTimestampRaw, claimMergeLease, releaseMergeLease, ReplayManifest (..), ReplaySegment (..), replaySessionManifestGetH, replaySessionShardGetH, buildReplayManifest, fetchReplayShard, projectMinioConn) where +module Pages.Replay (SessionMeta (..), sessionMetadata, replayPostH, ReplayPost (..), processReplayEvents, replaySessionGetH, fetchReplaySession, ReplaySessionResp (..), RawJson (..), compressAndMergeReplaySessions, mergeReplaySession, expireOldReplayData, replayObjectPrefix, migratedReplayKey, concatRawJsonArrays, sessionFileKeys, splitReplayPayload, ReplayPayload (..), firstEventTimestampRaw, claimMergeLease, releaseMergeLease, ReplayManifest (..), ReplaySegment (..), replaySessionManifestGetH, replaySessionShardGetH, buildReplayManifest, fetchReplayShard, projectMinioConn) where import Codec.Compression.GZip qualified as GZip import Conduit (runConduit) diff --git a/src/Pages/Telemetry.hs b/src/Pages/Telemetry.hs index ab9f79946..8ee5e6d15 100644 --- a/src/Pages/Telemetry.hs +++ b/src/Pages/Telemetry.hs @@ -22,7 +22,9 @@ module Pages.Telemetry ( ) where import Data.Aeson qualified as AE +import Data.Char (isSpace) import Data.Default +import Data.List qualified as L import Data.Map qualified as Map import Data.Set qualified as S import Data.Text qualified as T @@ -189,18 +191,38 @@ resizeDivider_ cssVar minPct maxPct resizeEvt extraCls = if pct < $minT set pct to $minT end if pct > $maxT set pct to $maxT end call container.style.setProperty($qVar, pct + '%') + set @aria-valuenow to Math.round(pct) send $resizeEvt to window end set document.body.style.userSelect to '' set document.body.style.cursor to '' + on keydown[key is 'ArrowLeft' or key is 'ArrowRight'] + halt the event + set container to the closest parent + if no container exit end + set delta to -2 + if event.key is 'ArrowRight' set delta to 2 end + set pct to Math.max($minT, Math.min($maxT, (((my.offsetLeft + 4) / container.clientWidth) * 100) + delta)) + call container.style.setProperty($qVar, pct + '%') + set @aria-valuenow to Math.round(pct) + send $resizeEvt to window + on focus + set container to the closest parent + if container set @aria-valuenow to Math.round(((my.offsetLeft + 4) / container.clientWidth) * 100) end |] in div_ - [ class_ $ "absolute top-0 bottom-0 w-2 cursor-col-resize z-20 flex justify-center group " <> extraCls + [ class_ $ "absolute top-0 bottom-0 w-2 cursor-col-resize z-20 flex justify-center group focus-visible:outline-2 focus-visible:outline-strokeBrand-strong " <> extraCls , style_ $ "left:calc(var(" <> cssVar <> ") - 4px)" + , tabindex_ "0" + , role_ "separator" + , Aria.label_ "Resize trace columns" + , term "aria-orientation" "vertical" + , term "aria-valuemin" minT + , term "aria-valuemax" maxT , term "_" script ] $ div_ [class_ "w-px h-full bg-strokeWeak group-hover:bg-fillBrand-strong group-active:bg-fillBrand-strong transition-colors pointer-events-none relative"] do - div_ [class_ "absolute top-1/2 -translate-y-1/2 -translate-x-[3px] w-2 h-6 flex flex-col justify-center gap-px opacity-0 group-hover:opacity-100 transition-opacity"] do + div_ [class_ "absolute top-1/2 -translate-y-1/2 -translate-x-[3px] w-2 h-6 flex flex-col justify-center gap-px opacity-50 group-hover:opacity-100 group-focus-visible:opacity-100 transition-opacity"] do forM_ ([1 .. 3] :: [Int]) \_ -> div_ [class_ "w-full h-px bg-fillBrand-strong rounded-full"] pass @@ -229,11 +251,10 @@ instance ToHtml TraceDetailsGet where toHtml (TraceDetails pid tr spanRecs openFirst moreUrl) = do toHtml $ tracePage pid tr spanRecs moreUrl when openFirst $ whenJust (spanRecs V.!? 0) \sr -> - -- Desktop only: on mobile the trace panel is a full-screen overlay, so - -- auto-opening it would bury the page behind span details on load. + -- Preload only when details fit inline; a drawer must wait for a span click. -- KeepCurrent: the panel opens when content lands rather than flashing a -- skeleton, so a re-fired preload can't wipe rendered details back to a loader. - div_ (spanDetailAttrs_ KeepCurrent pid.toText sr.uSpanId sr.timestamp <> [hxTrigger_ "load[window.innerWidth>=768]", term "hx-sync" "this:replace"]) pass + div_ (spanDetailAttrs_ KeepCurrent pid.toText sr.uSpanId sr.timestamp <> [hxTrigger_ "load[document.getElementById('trace_span_container').clientWidth >= 64 * parseFloat(getComputedStyle(document.documentElement).fontSize)]", term "hx-sync" "this:replace"]) pass toHtml (SpanDetails pid s aptSpn) = toHtml $ LogItem.expandedItemView pid s aptSpn Nothing toHtml (TraceDetailsUnavailable selfUrl explorerUrl embedded reason) = -- The id is what Retry swaps: `closest div` would only replace the button row. @@ -1162,7 +1183,7 @@ tracePage pid traceItem rawSpanRecords moreUrl = do -- reports counts and durations only. Node size comes from the duration share. (traceHops, traceDurationNs) = ServiceGraph.traceEdgeSamples spanRecords traceGraph = ServiceGraph.buildServiceGraph 0 serviceMapNodeCap ServiceGraph.CollapseOff (Just traceDurationNs) traceHops - div_ [class_ "w-full h-full flex overflow-hidden", id_ "trace_span_container"] $ do + div_ [class_ "@container/trace w-full h-full flex overflow-hidden", id_ "trace_span_container"] $ do div_ [class_ "flex flex-col grow min-w-0 gap-4 p-2 pb-4 overflow-y-auto overflow-x-hidden overscroll-y-contain c-scroll"] $ do div_ [class_ "flex flex-wrap justify-between items-center gap-y-1"] do div_ [class_ "flex items-center gap-3"] $ do @@ -1292,7 +1313,7 @@ tracePage pid traceItem rawSpanRecords moreUrl = do div_ [class_ "flex items-center gap-1.5"] do div_ [class_ $ "w-2.5 h-2.5 rounded-full shrink-0 " <> getServiceColor s serviceColors] pass span_ [class_ "truncate max-w-40"] $ toHtml s - div_ [class_ "border border-strokeWeak w-full rounded-2xl min-h-[230px] overflow-y-auto overflow-x-hidden relative", style_ "--wf-left:35%", id_ $ "waterfall-container-" <> traceItem.traceId] do + div_ [class_ "border border-strokeWeak w-full rounded-2xl min-h-[230px] overflow-y-auto overflow-x-hidden relative", style_ "--wf-left:min(60%,max(18rem,40%))", id_ $ "waterfall-container-" <> traceItem.traceId] do resizeDivider_ "--wf-left" 15 70 "waterfallResize" "waterfall-divider" div_ [class_ "h-full top-0 absolute z-30 hidden pointer-events-none", id_ $ "wf-time-indicator-" <> traceItem.traceId] do div_ [class_ "relative h-full"] do @@ -1315,10 +1336,16 @@ tracePage pid traceItem rawSpanRecords moreUrl = do serviceMapPanel_ pid ("trace-service-map-" <> traceItem.traceId) traceGraph serviceColors Nothing -- Open state is this checkbox: rows check it before loading a span, close unchecks it. input_ [type_ "checkbox", class_ "hidden peer/trace", id_ "trace-details-open"] - div_ [class_ "hidden md:peer-checked/trace:block", id_ "trace-details-resizer-wrapper"] + div_ [class_ "hidden @min-[64rem]/trace:peer-checked/trace:block", id_ "trace-details-resizer-wrapper"] $ Components.resizerWith_ [data_ "min" "260", data_ "max" "70vw"] "trace_details_container" "trace_details_width" False + label_ + [ Lucid.for_ "trace-details-open" + , Aria.label_ "Close span details" + , class_ "hidden @max-[64rem]/trace:peer-checked/trace:block fixed inset-0 z-40 bg-transparent pointer-events-none max-md:bg-black/40 max-md:pointer-events-auto" + ] + "" div_ - [ class_ "details-panel group/tdp shrink-0 h-full w-1/3 max-w-0 overflow-hidden overflow-y-auto c-scroll bg-bgBase peer-checked/trace:max-w-[70vw] peer-checked/trace:border-l border-strokeWeak max-md:fixed max-md:inset-0 max-md:z-50 max-md:w-full! max-md:peer-checked/trace:max-w-full" + [ class_ "details-panel group/tdp shrink-0 h-full w-1/3 max-w-0 overflow-hidden overflow-y-auto c-scroll bg-bgBase peer-checked/trace:max-w-[70vw] peer-checked/trace:border-l border-strokeWeak @max-[64rem]/trace:hidden @max-[64rem]/trace:peer-checked/trace:block @max-[64rem]/trace:fixed! @max-[64rem]/trace:inset-[0_0_0_auto]! @max-[64rem]/trace:z-50 @max-[64rem]/trace:w-[min(56rem,100vw)]! @max-[64rem]/trace:h-dvh! @max-[64rem]/trace:max-h-none! @max-[64rem]/trace:peer-checked/trace:max-w-full!" , id_ "trace_details_container" , -- Close buttons in the shared detail view send closeDetailPanel to their .details-panel. [__|init set my *width to localStorage.getItem('resizer-trace_details_width') or '' end @@ -1530,10 +1557,16 @@ buildSpanTree_ :: Projects.ProjectId -> SpanTree -> Int -> HashMap Text Text -> buildSpanTree_ pid sp level scol = do let hasChildren = not $ null sp.children serviceCol = getServiceColor sp.spanRecord.serviceName scol - indent = show (level * 12) <> "px" + treeIndent = min level 4 * 8 + max 0 (level - 4) * 4 + indent = show (8 + treeIndent) <> "px" isSynthetic = isNothing sp.spanRecord.uSpanId label = fromMaybe sp.spanRecord.spanName (spanDisplayLabel sp.spanRecord.attributes) - tip = sp.spanRecord.serviceName <> " — " <> label + attr k = Telemetry.atMapText k sp.spanRecord.attributes + operation = fromMaybe label (attr "db.query.text" <|> attr "db.statement") + operationLines = L.dropWhileEnd (T.all isSpace) $ dropWhile (T.all isSpace) $ lines operation + operationIndent = fromMaybe 0 $ viaNonEmpty minimum1 [T.length $ T.takeWhile isSpace line | line <- operationLines, not $ T.all isSpace line] + errorMessage = fold $ guard sp.spanRecord.hasErrors *> (attr "exception.message" <|> attr "error.message") + tip = "Service: " <> sp.spanRecord.serviceName <> "\nSpan: " <> sp.spanRecord.spanName <> (if label == sp.spanRecord.spanName then "" else "\nOperation: " <> label) <> "\nDepth: " <> show level div_ [class_ "span-filterble"] do div_ ( [ class_ $ "flex items-center w-full h-7 hover:bg-fillWeaker waterfall-row" <> bool "" " bg-fillError-weak/40 hover:bg-fillError-weak" sp.spanRecord.hasErrors <> bool " cursor-pointer" " italic text-textWeak bg-fillWeaker/50" isSynthetic @@ -1553,7 +1586,7 @@ buildSpanTree_ pid sp level scol = do sp.spanRecord.uSpanId ) do - div_ [class_ "shrink-0 flex items-center gap-1 px-2 overflow-hidden", style_ $ "width:var(--wf-left);padding-left:" <> indent] do + div_ [class_ "relative h-full shrink-0 flex items-center gap-1 px-2 overflow-hidden before:absolute before:left-2 before:inset-y-0 before:w-[min(32px,var(--wf-indent))] before:pointer-events-none before:bg-[repeating-linear-gradient(to_right,transparent_0px,transparent_7px,var(--color-strokeWeak)_7px,var(--color-strokeWeak)_8px)] after:absolute after:left-10 after:inset-y-0 after:w-[max(0px,calc(var(--wf-indent)_-_32px))] after:pointer-events-none after:bg-[repeating-linear-gradient(to_right,transparent_0px,transparent_3px,var(--color-strokeWeak)_3px,var(--color-strokeWeak)_4px)]", style_ $ "width:var(--wf-left);padding-left:" <> indent <> ";--wf-indent:" <> show treeIndent <> "px"] do if hasChildren then button_ @@ -1568,7 +1601,7 @@ buildSpanTree_ pid sp level scol = do else div_ [class_ "w-6 shrink-0"] pass if isSynthetic then faSprite_ "circle-question" "regular" "h-3 w-3 text-textWeak shrink-0" - else div_ [class_ $ "w-2.5 h-2.5 rounded-full shrink-0 " <> serviceCol, title_ sp.spanRecord.serviceName] pass + else div_ [class_ $ "w-2.5 h-2.5 rounded-full shrink-0 " <> serviceCol] pass when sp.spanRecord.hasErrors $ span_ [ class_ "shrink-0 w-3.5 h-3.5 rounded-sm bg-fillError-strong text-textInverse-strong text-2xs font-bold flex items-center justify-center leading-none" @@ -1576,8 +1609,25 @@ buildSpanTree_ pid sp level scol = do , Aria.label_ "Error span" ] $ toHtml @Text "!" - span_ [class_ "text-xs font-medium text-textStrong truncate max-w-20", title_ tip] $ toHtml sp.spanRecord.serviceName - span_ [class_ "text-xs text-textWeak truncate", title_ tip] $ toHtml label + div_ + [ class_ "min-w-0 flex-1 flex items-center gap-1" + , term "data-tippy-placement" "bottom-start" + , term "data-tippy-theme" "trace-span" + ] + do + span_ [class_ "w-20 max-w-[30%] shrink-0 text-xs text-textWeak truncate"] $ toHtml sp.spanRecord.serviceName + span_ [class_ "min-w-0 flex-1 text-xs text-textStrong truncate"] $ toHtml label + template_ [data_ "trace-tooltip" ""] $ div_ [class_ "space-y-3"] do + div_ [class_ "flex flex-wrap items-center gap-2"] do + strong_ [class_ "min-w-0 flex-1 text-sm font-semibold break-normal [overflow-wrap:anywhere] text-textStrong"] $ toHtml sp.spanRecord.serviceName + when sp.spanRecord.hasErrors $ span_ [class_ "rounded-md bg-fillError-weak px-1.5 py-0.5 text-2xs font-medium text-textError"] "Error span" + span_ [class_ "text-2xs tabular-nums text-textWeak"] $ toHtml $ getDurationNSMS sp.spanRecord.spanDurationNs + div_ [class_ "space-y-3 max-h-[min(18rem,50vh)] overflow-y-auto overscroll-contain c-scroll focus-visible:outline-2 focus-visible:outline-strokeBrand-strong", tabindex_ "0", role_ "region", Aria.label_ "Span information"] do + forM_ ([("Span", sp.spanRecord.spanName), ("Operation", if operation == sp.spanRecord.spanName then "" else T.intercalate "\n" $ map (T.drop operationIndent) operationLines), ("Error", errorMessage)] :: [(Text, Text)]) \(heading, value) -> + unless (T.null value) $ div_ do + p_ [class_ "mb-1 text-2xs font-medium text-textWeak"] $ toHtml @Text heading + p_ [class_ $ "text-xs leading-relaxed whitespace-pre-wrap break-normal [overflow-wrap:anywhere] " <> bool "font-mono text-textStrong" "text-textError" (heading == "Error")] $ toHtml value + when (sp.spanRecord.hasErrors && T.all isSpace errorMessage) $ p_ [class_ "border-t border-strokeWeak pt-3 text-xs leading-relaxed text-textWeak"] "No error message available in this preview. Select the span for details." div_ [ class_ "h-full relative grow min-w-0" , id_ $ "waterfall-bar-" <> sp.spanRecord.spanId diff --git a/src/Pkg/Components/Table.hs b/src/Pkg/Components/Table.hs index 55f1ff97c..8dce93aad 100644 --- a/src/Pkg/Components/Table.hs +++ b/src/Pkg/Components/Table.hs @@ -566,30 +566,30 @@ renderBody :: [Attribute] -> Table a -> Html () renderBody extra tbl | not tbl.config.renderAsTable = div_ [class_ "stagger-fade"] $ V.mapM_ (renderListRow tbl) tbl.rows | Just groupOf <- tbl.features.rowGroup = - if isJust tbl.features.grouping then groupedRows groupOf else body $ groupedRows groupOf + if V.null tbl.rows then body pass else groupedRows groupOf | otherwise = body $ V.mapM_ (renderTableRow tbl) tbl.rows where body = tbody_ (extra <> [class_ "stagger-fade"]) columnCount = length tbl.columns + bool 0 1 (isJust tbl.features.rowId) groups groupOf = sortWith (fst . head) $ NE.groupAllWith (\(idx, row) -> maybeToRight idx $ groupOf row) $ zip [0 :: Int ..] (V.toList tbl.rows) groupedRows groupOf = iforM_ (groups groupOf) $ \idx ((_, row) :| siblings) -> - let renderedRows = mapM_ (renderTableRow tbl) (row : map snd siblings) + let labelM = groupOf row + collapsible = isNothing tbl.features.grouping && isJust labelM && not (null siblings) groupLabel label suffix = toHtml label >> span_ [class_ "ms-2 text-xs font-normal text-textWeak tabular-nums"] (toHtml $ show (1 + length siblings) <> suffix) - in if isJust tbl.features.grouping - then tbody_ ([class_ "stagger-fade not-has-[.itemsListItem:not(.hidden)]:hidden"] <> if idx == 0 then extra else []) do - forM_ (groupOf row) $ \label -> tr_ [data_ "table-group" label] $ td_ [colspan_ $ show columnCount, class_ "px-4 py-3 text-sm font-medium text-textStrong"] $ groupLabel label " items" - renderedRows - else case (groupOf row, siblings) of - (Just label, _ : _) -> tr_ [class_ "not-has-[.itemsListItem:not(.hidden)]:hidden"] - $ td_ [colspan_ $ show columnCount] - $ details_ [class_ "group/disclosure", [__|on input from closest <[id$='_page']/> if event.target.type is "search" set my.open to true end|]] do - summary_ [class_ "cursor-pointer px-4 py-3 text-sm font-medium text-textStrong focus-visible:outline-offset-[-2px]"] $ groupLabel label " items on this page" - table_ [class_ tbl.config.tableClasses] do - thead_ [class_ "sr-only"] $ tr_ do - when (isJust tbl.features.rowId) $ th_ [scope_ "col"] "Select issue" - forM_ tbl.columns $ \c -> th_ [scope_ "col", data_ "column-key" c.name] $ toHtml c.name - tbody_ renderedRows - _ -> renderedRows + in tbody_ + ([class_ $ if collapsible then "stagger-fade bg-fillWeaker/30 not-has-[.itemsListItem:not(.hidden)]:hidden not-has-[>tr:first-child_.row-group-toggle[open]]:[&>tr:not(:first-child)]:hidden" else if isJust tbl.features.grouping then "stagger-fade not-has-[.itemsListItem:not(.hidden)]:hidden" <> bool "" " bg-fillWeaker/30" (isJust labelM) else "stagger-fade"] <> if idx == 0 then extra else []) + do + forM_ labelM $ \label -> + if isJust tbl.features.grouping + then tr_ [data_ "table-group" label] $ td_ [colspan_ $ show columnCount, class_ "px-4 py-3 text-sm font-medium text-textStrong"] $ groupLabel label " items" + else + when collapsible + $ tr_ [data_ "table-group" label] + $ td_ [colspan_ $ show columnCount, class_ "p-0"] + $ details_ [class_ "row-group-toggle group/disclosure", [__|on input from closest <[id$='_page']/> if event.target.type is "search" set my.open to true end|]] + $ summary_ [class_ "cursor-pointer px-4 py-3 text-sm font-medium text-textStrong focus-visible:outline-offset-[-2px]"] + $ groupLabel label " items on this page" + mapM_ (renderTableRow tbl) (row : map snd siblings) treeRowAttrs :: a -> TreeConfig a -> [Attribute] @@ -614,17 +614,22 @@ treeRowAttrs row tc = -- List mode: render columns in a flex container (no table wrapper/headers) {-# INLINE renderListRow #-} renderListRow :: Table a -> a -> Html () -renderListRow tbl row = div_ (treeAttrs <> rowAttrs <> [class_ "flex gap-4 md:gap-8 items-start itemsListItem py-3 hover:bg-fillWeak transition-colors duration-75"]) $ forM_ tbl.columns \c -> div_ c.attrs $ c.render row +renderListRow tbl row = div_ (treeAttrs <> rowAttrs <> [class_ " flex gap-4 md:gap-8 items-start itemsListItem py-3 hover:bg-fillWeak transition-colors duration-75 "]) $ forM_ tbl.columns \c -> div_ c.attrs $ c.render row where rowAttrs = maybe [] ($ row) tbl.features.rowAttrs treeAttrs = maybe [] (treeRowAttrs row) tbl.features.treeConfig --- Table mode: render as table rows with columns +-- | Table mode: render as table rows with columns. A @rowAttrs@ class stays separate from the row's own classes. +-- +-- >>> import Lucid (class_) +-- >>> let tbl = Table (def :: Config){renderAsTable = True} [col "c" (const "x")] (V.singleton ()) (def :: Features ()){rowAttrs = Just (const [class_ "hover:bg-fillWeaker"])} +-- >>> "hover:bg-fillWeaker hover:bg-fillWeak" `TL.isInfixOf` renderText (toHtml tbl) +-- True {-# INLINE renderTableRow #-} renderTableRow :: Table a -> a -> Html () renderTableRow tbl row = - tr_ ([class_ $ "hover:bg-fillWeak transition-colors duration-75 itemsListItem" <> bool "" " cursor-pointer" (isTreeGroup || isJust tbl.features.rowLink)] <> treeAttrs <> rowAttrs <> linkHandler) do + tr_ ([class_ $ " hover:bg-fillWeak transition-colors duration-75 itemsListItem" <> bool "" " cursor-pointer" (isTreeGroup || isJust tbl.features.rowLink) <> " "] <> treeAttrs <> rowAttrs <> linkHandler) do whenJust tbl.features.rowId \getId -> td_ [class_ "w-8 align-top pt-4 max-md:hidden"] $ input_ @@ -635,7 +640,7 @@ renderTableRow tbl row = rowAttrs = maybe [] ($ row) tbl.features.rowAttrs treeAttrs = maybe [] (treeRowAttrs row) tbl.features.treeConfig isTreeGroup = maybe False (\tc -> tc.isGroupRow row) tbl.features.treeConfig - -- single class_ attribute: Lucid concatenates duplicates with no separator + -- Lucid joins duplicate class_ attributes with no separator, so the row class is space-padded for rowAttrs classes. linkHandler = maybe [] (\getLink -> [hxGet_ (getLink row), hxPushUrl_ "true"] <> navTabAttrs) tbl.features.rowLink diff --git a/src/Pkg/Parser.hs b/src/Pkg/Parser.hs index 55cce765d..7bcfd9038 100644 --- a/src/Pkg/Parser.hs +++ b/src/Pkg/Parser.hs @@ -968,15 +968,16 @@ variablePresets density pid mf mt allParams currentTime = audience = Rum.audienceFilters allParams audienceSessions = Rum.audienceSessionsSql browserSql errorSql audience bound op t field' = field' <> " " <> op <> " '" <> formatUTC t <> "'" - clause field = case catMaybes [bound ">=" <$> mf, bound "<=" <$> mt] of + clause endOp field = case catMaybes [bound ">=" <$> mf, bound endOp <$> mt] of [] -> "" bs -> andPrefix $ "(" <> T.intercalate " AND " (map ($ field) bs) <> ")" in Map.fromList $ [ ("project_id", pid) , ("from", andPrefix $ fmtUTC mf) , ("to", andPrefix $ fmtUTC mt) - , ("time_filter", clause "timestamp") - , ("time_filter_sql_created_at", clause "created_at") + , ("time_filter", clause "<=" "timestamp") + , ("rollup_time_filter", clause "<" "timestamp") + , ("time_filter_sql_created_at", clause "<=" "created_at") , ("rollup_interval", calculateAutoBinWidth density (mf, mt) currentTime) , ("browser_filter", browserSql) , ("pageview_filter", pageViewSql) diff --git a/src/Web/Routes.hs b/src/Web/Routes.hs index d7449ff08..32d609d9b 100644 --- a/src/Web/Routes.hs +++ b/src/Web/Routes.hs @@ -500,7 +500,7 @@ data CookieProtectedRoutes mode = CookieProtectedRoutes , widgetAlertToggle :: mode :- "p" :> ProjectId :> "widgets" :> Capture "widget_id" Text :> "alert" :> "toggle_active" :> QueryParam "dashboard_id" Dashboards.DashboardId :> Post '[HTML] (RespHeaders (Html ())) , dashboardBulkActionPost :: mode :- "p" :> ProjectId :> "dashboards" :> "bulk_action" :> Capture "action" Dashboards.DashboardBulkAction :> ReqBody '[FormUrlEncoded] Dashboards.DashboardBulkActionForm :> Post '[HTML] (RespHeaders NoContent) , -- Dashboard tab routes (htmx lazy loading) - dashboardTabGet :: mode :- "p" :> ProjectId :> "dashboards" :> Capture "dashboard_id" Dashboards.DashboardId :> "tab" :> Capture "tab_slug" Text :> QPT "file" :> QPT "from" :> QPT "to" :> QPT "since" :> HXRequest :> Header "HX-Trigger-Name" Text :> AllQueryParams :> Get '[HTML] (RespHeaders (NavigationResponse Dashboards.DashboardGet)) + dashboardTabGet :: mode :- "p" :> ProjectId :> "dashboards" :> Capture "dashboard_id" Dashboards.DashboardId :> "tab" :> Capture "tab_slug" Text :> QPT "file" :> QPT "from" :> QPT "to" :> QPT "since" :> Header "HX-Target" Text :> Header "HX-Trigger-Name" Text :> AllQueryParams :> Get '[HTML] (RespHeaders (NavigationResponse Dashboards.DashboardGet)) , dashboardTabRenamePatch :: mode :- "p" :> ProjectId :> "dashboards" :> Capture "dashboard_id" Dashboards.DashboardId :> "tab" :> Capture "tab_slug" Text :> "rename" :> ReqBody '[FormUrlEncoded] Dashboards.TabRenameForm :> Patch '[HTML] (RespHeaders Dashboards.TabRenameRes) , dashboardYamlGet :: mode :- "p" :> ProjectId :> "dashboards" :> Capture "dashboard_id" Dashboards.DashboardId :> "yaml" :> Get '[HTML] (RespHeaders (Html ())) , dashboardYamlPut :: mode :- "p" :> ProjectId :> "dashboards" :> Capture "dashboard_id" Dashboards.DashboardId :> "yaml" :> ReqBody '[FormUrlEncoded] Dashboards.YamlForm :> Put '[HTML] (RespHeaders (Html ())) @@ -541,7 +541,7 @@ data CookieProtectedRoutes mode = CookieProtectedRoutes , bringS3Post :: mode :- "p" :> ProjectId :> "byob_s3" :> ReqBody '[FormUrlEncoded] Projects.ProjectS3Bucket :> Post '[HTML] (RespHeaders Settings.StorageGet) , bringS3Remove :: mode :- "p" :> ProjectId :> "byob_s3" :> Delete '[HTML] (RespHeaders Settings.StorageGet) , gitSyncSettings :: mode :- "p" :> ProjectId :> "settings" :> "git-sync" :> Get '[HTML] (RespHeaders (Html ())) - , projectWikiGet :: mode :- "p" :> ProjectId :> "wiki" :> CaptureAll "path" Text :> QueryParam "after" ProjectMemory.PagePath :> Get '[HTML] (RespHeaders (PageCtx PageCodeContext.WikiGet)) + , projectWikiGet :: mode :- "p" :> ProjectId :> "wiki" :> CaptureAll "path" Text :> QueryParam "after" ProjectMemory.PagePath :> QueryParam "q" Text :> QueryParam "folder" Text :> QueryFlag "edit" :> Get '[HTML] (RespHeaders (PageCtx PageCodeContext.WikiGet)) , projectMemoryGet :: mode :- "p" :> ProjectId :> "memories" :> QueryParam "page" (UUIDId "memory_page") :> Get '[HTML] (RespHeaders (PageCtx PageCodeContext.WikiGet)) , projectMemoryPost :: mode :- "p" :> ProjectId :> "memories" :> ReqBody '[FormUrlEncoded] PageCodeContext.MemoryForm :> Post '[HTML] (RespHeaders (PageCtx PageCodeContext.WikiGet)) , repositoriesGet :: mode :- "p" :> ProjectId :> "repositories" :> QueryParam "tab" PageCodeContext.RepositoryTab :> QueryParam "sample" Text :> Get '[HTML] (RespHeaders (Html ())) @@ -1343,9 +1343,10 @@ clientPostgresSqlRejection dbSource pidM querySqlM = case (dbSource, pidM, Utils -- | @rollup_sql@ is a Postgres statement over an hourly rollup that answers the same -- series as the chart's KQL query, for hours from @rollup_from@ on. It replaces the --- query whenever the window starts inside that coverage and no environment or service --- scope applies (the rollup has no column to honour one). Short windows included: on a --- busy project three live hours of the query took 90s, and hourly bars do not. +-- query when coverage and whole-hour boundaries permit it, with no environment or +-- service scope. A partial first hour cannot use hourly counts: filtering its bucket +-- drops in-range events, while including it counts events before the requested start. +-- A partial last hour is safe only while it is still the current hour. -- -- >>> import Data.Time (addUTCTime) -- >>> let now = Parser.fixedUTCTime; t = Utils.isoT . (`addUTCTime` now) . (* 3600); since s = TimePicker.TimePicker (Just s) Nothing Nothing; abs' a b = TimePicker.TimePicker Nothing (Just $ t a) (Just $ t b) @@ -1354,16 +1355,22 @@ clientPostgresSqlRejection dbSource pidM querySqlM = case (dbSource, pidM, Utils -- (Just SqlPostgres,Just SqlPostgres,Just SqlPostgres) -- >>> (route (since "24H") (r (-12)), route (since "24H") (("environment", Just "prod") : r (-72)), route (since "24H") (take 1 $ r (-72))) -- (Nothing,Nothing,Nothing) +-- >>> (route (abs' (-2 + 1/6) (-1)) (r (-72)), route (abs' (-2) (-1 + 1/6)) (r (-72))) +-- (Nothing,Nothing) +-- >>> fst $ rollupRoute (addUTCTime 1800 now) (since "1H") (r (-72)) (Nothing, Nothing) +-- Nothing rollupRoute :: UTCTime -> TimePicker.TimePicker -> [(Text, Maybe Text)] -> (Maybe Hasql.SqlSource, Maybe Text) -> (Maybe Hasql.SqlSource, Maybe Text) rollupRoute now tp params source = case (param "rollup_sql", iso8601ParseM . toString =<< param "rollup_from", fromM) of (Just rollup, Just covered, Just start) | all (isNothing . param) ["environment", "service"] - , start >= covered -> + , start >= covered + , start == Utils.truncateHour start + , all (\end -> end == Utils.truncateHour end || end >= now) toM -> (Just Hasql.SqlPostgres, Just rollup) _ -> source where param k = Utils.nonEmptyT $ join $ L.lookup k params - (fromM, _, _) = TimePicker.parseTimeRange now tp + (fromM, toM, _) = TimePicker.parseTimeRange now tp -- | The @/chart_data@ handler shape, shared by the buffered and the streamed route. diff --git a/static/migrations/0255_api_change_recorded_service.sql b/static/migrations/0255_api_change_recorded_service.sql new file mode 100644 index 000000000..28261abcb --- /dev/null +++ b/static/migrations/0255_api_change_recorded_service.sql @@ -0,0 +1,9 @@ +-- Replace path-inferred API-change service labels with the endpoint's recorded service. +-- Host labels are read from issue_data; service remains a valid telemetry scope. +UPDATE apis.issues i +SET service = ( + SELECT NULLIF(btrim(e.service_name), '') + FROM apis.endpoints e + WHERE e.project_id = i.project_id AND e.hash = i.target_hash +) +WHERE i.issue_type = 'api_change'; diff --git a/static/public/assets/css/tailwind.css b/static/public/assets/css/tailwind.css index 1463f542e..ab6a7d07b 100644 --- a/static/public/assets/css/tailwind.css +++ b/static/public/assets/css/tailwind.css @@ -1634,17 +1634,6 @@ code, pre, .code, .monospace { .replayer-wrapper > iframe { border: none; } -.event-container.expanded { - @apply border border-strokeBrand-strong -} -.event-container.expanded button > svg { - @apply rotate-180 -} -.event-container.expanded > .event-detail { - display: flex; -} - - /* Database-specific badges - consolidated with CSS custom properties */ .badge-postgres, .badge-mysql, .badge-redis, .badge-mongo, .badge-mongodb, .badge-elastic, .badge-elasticsearch, .badge-cassandra, .badge-dynamodb, @@ -2800,3 +2789,20 @@ table td a[href]:not(.btn):not([data-no-preview]) { --tooltip-z: 100; --tooltip- width: min(24rem, calc(100vw - 1rem)); } } + +/* Keep trace hover cards above the third-party tooltip stylesheet's unlayered defaults. */ + .tippy-box[data-theme~='trace-span'] { + color: var(--color-textStrong); + background: var(--color-bgRaised); + border: 1px solid var(--color-strokeStrong); + border-radius: var(--radius-field); + box-shadow: var(--shadow-lg); + animation: none; + } + .tippy-box[data-theme~='trace-span'] .tippy-content { + padding: 12px; + text-align: start; + } + .tippy-box[data-theme~='trace-span'] .tippy-arrow { + color: var(--color-bgRaised); + } diff --git a/static/public/assets/svgs/fa-sprites/regular.svg b/static/public/assets/svgs/fa-sprites/regular.svg index 32e12fd70..26cad0ca2 100644 --- a/static/public/assets/svgs/fa-sprites/regular.svg +++ b/static/public/assets/svgs/fa-sprites/regular.svg @@ -999,4 +999,7 @@ + + + diff --git a/test/fixtures/wiki-browser.mjs b/test/fixtures/wiki-browser.mjs index 22d9d68f9..5454e4655 100644 --- a/test/fixtures/wiki-browser.mjs +++ b/test/fixtures/wiki-browser.mjs @@ -29,8 +29,9 @@ else { return target.origin === origin && (target.pathname.includes('/memories') || target.pathname.includes('/wiki')) ? route.continue() : route.abort(); }); await load(url); - await page.getByLabel('Page path (required)').fill('runbooks/retries'); - await page.getByLabel('Title (required)').fill('Browser memory'); + await page.getByRole('link', { name: 'New page', exact: true }).first().click(); + await page.getByLabel('Page path', { exact: true }).fill('runbooks/retries'); + await page.getByLabel('Title', { exact: true }).fill('Browser memory'); const initial = 'Typed while the editor loads.'; await page.locator('textarea[name=body]').fill(initial); releaseEditor(); @@ -43,16 +44,19 @@ else { await page.waitForFunction(text => document.querySelector('textarea[name=body]').value === text, initial); await rich.press('ControlOrMeta+Shift+z'); await rich.press('ControlOrMeta+a'); - const bold = page.getByRole('button', { name: 'Bold', exact: true }); - await bold.waitFor({ timeout: 5000 }); - await bold.focus(); - await bold.press('Enter'); - await page.getByRole('button', { name: 'Heading 2', exact: true }).focus(); - await page.getByRole('button', { name: 'Heading 2', exact: true }).press('Enter'); + await rich.press('ControlOrMeta+b'); + await rich.press('ControlOrMeta+Alt+2'); assert.equal(await rich.locator('h2 strong').textContent(), 'Keep caller retry tokens.'); - await page.getByRole('button', { name: 'Paragraph', exact: true }).click(); + await rich.press('ControlOrMeta+Alt+0'); await page.getByLabel('Editing mode').selectOption('source'); assert.equal(await page.locator('textarea[name=body]').inputValue(), '**Keep caller retry tokens.**\n'); + await page.locator('textarea[name=body]').fill('See [[runbooks/retries|Retry notes]].\n'); + await page.getByLabel('Editing mode').selectOption('rich'); + await rich.locator('p').last().click(); + await rich.press('End'); + await rich.pressSequentially(' Done'); + await page.getByLabel('Editing mode').selectOption('source'); + assert.equal(await page.locator('textarea[name=body]').inputValue(), 'See [[runbooks/retries|Retry notes]]. Done\n'); await page.locator('textarea[name=body]').fill('**Keep caller retry tokens.**\n\n[Runbook][ref]\n\n[ref]: https://monoscope.tech\n'); await page.getByLabel('Editing mode').selectOption('rich'); assert.equal(await rich.locator('strong').textContent(), 'Keep caller retry tokens.'); @@ -65,16 +69,16 @@ else { const urls = [new URL(page.url()).pathname]; const targets = [await page.locator('#repository-content').count()]; await load(url); - await page.getByRole('link', { name: 'retries', exact: true }).click(); + await page.getByRole('link', { name: 'Browser memory', exact: true }).click(); await page.waitForFunction(() => document.querySelector('#repository-content h2')?.textContent === 'Browser memory'); targets.push(await page.locator('#repository-content').count()); await load(url + '?page=' + id); - await page.getByRole('link', { name: 'New page', exact: true }).click(); - await page.waitForFunction(() => document.querySelector('#repository-content h2')?.textContent === 'New wiki page'); + await page.getByRole('link', { name: 'New page', exact: true }).first().click(); + await page.waitForFunction(() => document.querySelector('#repository-content h2')?.textContent === 'New page'); targets.push(await page.locator('#repository-content').count()); urls.push(new URL(page.url()).pathname); await page.locator('wiki-editor[data-mode=rich] .ProseMirror').waitFor(); assert.equal(await page.locator('wiki-editor .ProseMirror').textContent(), ''); - process.stdout.write(JSON.stringify({ targets, urls, fields: [await page.getByLabel('Page path (required)').inputValue(), await page.getByLabel('Title (required)').inputValue(), await page.locator('textarea[name=body]').inputValue()] })); + process.stdout.write(JSON.stringify({ targets, urls, fields: [await page.getByLabel('Page path', { exact: true }).inputValue(), await page.getByLabel('Title', { exact: true }).inputValue(), await page.locator('textarea[name=body]').inputValue()] })); } finally { await browser.close(); } } diff --git a/test/integration/Pages/Bots/AgenticSpec.hs b/test/integration/Pages/Bots/AgenticSpec.hs index cd1a03ca6..759c85709 100644 --- a/test/integration/Pages/Bots/AgenticSpec.hs +++ b/test/integration/Pages/Bots/AgenticSpec.hs @@ -115,12 +115,12 @@ spec = around withTestResources do scheduledActionable `shouldContain` ["send_to_slack"] describe "Web conversation persistence" do - it "assistantPages_defaultToNavigation" \tr -> do + it "assistantPages_defaultToAssistant" \tr -> do let convId = UUIDId UUID.nil void $ runTestBg frozenTime tr $ Hasql.interpExecute [HI.sql|INSERT INTO apis.ai_conversations (project_id, conversation_id, conversation_type) VALUES (#{testPid}, #{convId}, #{Issues.CTWeb})|] (_, threadPage) <- testServant tr $ AIThreads.threadGetH testPid convId let html = LT.toStrict $ Lucid.renderText $ Lucid.toHtml threadPage - html `shouldSatisfy` T.isInfixOf "id=\"nav-view-menu\" class=\"sr-only\" checked" + html `shouldSatisfy` T.isInfixOf "id=\"nav-view-ai\" class=\"sr-only\" checked" it "issueConversation_linksBackToItsIssue" \tr -> do let issueId = UUIDId UUID.nil :: Issues.IssueId diff --git a/test/integration/Pages/CodeContextSpec.hs b/test/integration/Pages/CodeContextSpec.hs index 0fed9192a..96c617759 100644 --- a/test/integration/Pages/CodeContextSpec.hs +++ b/test/integration/Pages/CodeContextSpec.hs @@ -248,8 +248,11 @@ spec = do nested <- request H.methodGet ("/p/" <> testPid.toText <> "/wiki/runbooks/retries") [] H.statusCode nested.simpleStatus `shouldBe` 200 html nested `shouldSatisfy` T.isInfixOf "runbooks" - html nested `shouldSatisfy` T.isInfixOf " testPid.toText <> "/wiki/runbooks/retries?edit=true") [] + html editing `shouldSatisfy` T.isInfixOf " "?page=" <> page.toText) [] H.statusCode readOnly.simpleStatus `shouldBe` 200 html readOnly `shouldNotSatisfy` T.isInfixOf "Save page" + viewerMissing <- request H.methodGet ("/p/" <> testPid.toText <> "/wiki/runbooks/unwritten") [] + H.statusCode viewerMissing.simpleStatus `shouldBe` 404 refused <- save testPid 2 "Retry behavior" "Viewer must not write" H.statusCode refused.simpleStatus `shouldBe` 403 length <$> runQueryEffect tr (Memory.pageHistory testPid page) `shouldReturn` 2 @@ -353,7 +358,28 @@ spec = do moved <- request H.methodGet ("/p/" <> testPid.toText <> "/wiki/services/retries") [] H.statusCode moved.simpleStatus `shouldBe` 200 oldPath <- request H.methodGet ("/p/" <> testPid.toText <> "/wiki/runbooks/retries") [] - H.statusCode oldPath.simpleStatus `shouldBe` 404 + H.statusCode oldPath.simpleStatus `shouldBe` 200 + html oldPath `shouldSatisfy` T.isInfixOf "id=\"wiki-form\"" + html oldPath `shouldSatisfy` T.isInfixOf "value=\"runbooks/retries\"" + derived <- request H.methodPost (base testPid) [("pageId", UUID.toText (UUID.fromWords 50 0 0 99)), ("version", "0"), ("path", "runbooks/"), ("title", "Restart the Consumer"), ("body", "Steps")] + html derived `shouldSatisfy` T.isInfixOf "/wiki/runbooks/restart-the-consumer" + folderNew <- request H.methodGet ("/p/" <> testPid.toText <> "/wiki?folder=runbooks") [] + html folderNew `shouldSatisfy` T.isInfixOf "value=\"runbooks/\"" + linking <- request H.methodPost (base testPid) [("pageId", duplicate.toText), ("version", "1"), ("path", "services/other"), ("title", "Other page"), ("body", "See [[services/retries|retry notes]] and [[javascript:alert(1)]].")] + html linking `shouldSatisfy` T.isInfixOf ("href=\"/p/" <> testPid.toText <> "/wiki/services/retries\"") + html linking `shouldSatisfy` T.isInfixOf ">retry notes" + T.toLower (html linking) `shouldNotSatisfy` T.isInfixOf "href=\"javascript" + html linking `shouldNotSatisfy` T.isInfixOf "/wiki/javascript" + linked <- request H.methodGet ("/p/" <> testPid.toText <> "/wiki/services/retries") [] + html linked `shouldSatisfy` T.isInfixOf "Linked from" + html linked `shouldSatisfy` T.isInfixOf "/wiki/services/other" + searched <- request H.methodGet ("/p/" <> testPid.toText <> "/wiki?q=RETRY%20NOTES") [] + html searched `shouldSatisfy` T.isInfixOf "/wiki/services/other" + html searched `shouldNotSatisfy` T.isInfixOf "/wiki/services/retries" + changes <- request H.methodGet (base testPid <> "?page=" <> duplicate.toText) [] + html changes `shouldSatisfy` T.isInfixOf "Changes from revision 1" + html changes `shouldSatisfy` T.isInfixOf "- Other notes" + html changes `shouldSatisfy` T.isInfixOf "+ See [[services/retries|retry notes]]" legacy <- request H.methodGet (base testPid <> "?page=" <> page.toText) [] H.statusCode legacy.simpleStatus `shouldBe` 200 length <$> runQueryEffect tr (Memory.pageHistory testPid page) `shouldReturn` 3 @@ -839,8 +865,8 @@ spec = do forM_ repositories \repository -> T.isInfixOf ("/repositories/" <> repository.id.toText <> "\"") html `shouldBe` (isNothing repository.apiBase && repository.repo `elem` ["checkout-service", "shared-source"]) html `shouldSatisfy` T.isInfixOf "All services" - html `shouldSatisfy` T.isInfixOf "Repositories for team/api & jobs" - html `shouldSatisfy` T.isInfixOf "All repositories" + html `shouldSatisfy` T.isInfixOf "team/api & jobs" + html `shouldSatisfy` T.isInfixOf "Source mappings that apply to this service, including mappings for all services." html `shouldNotSatisfy` T.isInfixOf "id=\"repository-nav\"" runQueryEffect tr $ Hasql.interpExecute_ [HI.sql| DELETE FROM projects.code_mappings WHERE project_id = #{testPid} |] (_, unlinkedPage) <- testServant tr $ PageCodeContext.serviceRepositoriesGetH testPid service diff --git a/test/integration/Pages/DashboardWidgetsSpec.hs b/test/integration/Pages/DashboardWidgetsSpec.hs index 614614cb9..bdefbf436 100644 --- a/test/integration/Pages/DashboardWidgetsSpec.hs +++ b/test/integration/Pages/DashboardWidgetsSpec.hs @@ -16,12 +16,12 @@ import Data.Aeson qualified as AE import Data.Aeson.KeyMap qualified as KM import Data.ByteString.Lazy qualified as LBS import Data.Default (def) -import Data.List (lookup) import Data.Effectful.Hasql qualified as Hasql +import Data.List (lookup) import Data.Map.Strict qualified as Map import Data.Pool (withResource) -import Data.Text qualified as T import Data.ProtoLens (defMessage) +import Data.Text qualified as T import Data.Time (addUTCTime) import Data.Time.Clock.POSIX (utcTimeToPOSIXSeconds) import Data.Time.Format.ISO8601 (iso8601Show) @@ -1024,7 +1024,7 @@ spec = sequential $ aroundAll withTestResources do , Endpoints.outgoing = True } filters hash = do - (_, response) <- testServant tr $ Dashboards.dashboardTabGetH testPid dashId "overview" Nothing Nothing Nothing (Just "24H") (Just "true") Nothing [("var-host", Just "integrations.routelift.com"), ("var-endpointHash", Just hash)] + (_, response) <- testServant tr $ Dashboards.dashboardTabGetH testPid dashId "overview" Nothing Nothing Nothing (Just "24H") (Just "div#dashboard-tabs-content") Nothing [("var-host", Just "integrations.routelift.com"), ("var-endpointHash", Just hash)] let Dashboards.DashboardGet _ _ _ _ params = tabDashboard response values = Map.fromList params pure (Map.lookup "const-endpointFilter" values, Map.lookup "const-endpointFilter-kql" values) @@ -1068,7 +1068,7 @@ spec = sequential $ aroundAll withTestResources do Nothing Nothing (Just "3D") - (Just "true") + (Just "div#dashboard-tabs-content") Nothing [ ("const-endpointFilter", Just "hashes @> ARRAY['']") , ("const-endpointFilter-kql", Just "hashes[*] in (\"\")") @@ -1322,7 +1322,7 @@ spec = sequential $ aroundAll withTestResources do , Endpoints.host = "dellyman.com" , Endpoints.hash = "ba3431d5" } - let open params = snd <$> testServant tr (Dashboards.dashboardTabGetH testPid dashId "overview" Nothing Nothing Nothing (Just "24H") (Just "true") Nothing params) + let open params = snd <$> testServant tr (Dashboards.dashboardTabGetH testPid dashId "overview" Nothing Nothing Nothing (Just "24H") (Just "div#dashboard-tabs-content") Nothing params) partialHtml = \case NavigationPartial _ fragment -> pure $ toStrict $ renderText fragment NavigationFull _ -> expectationFailure "htmx picker navigation returned a full document" $> "" @@ -1349,7 +1349,7 @@ spec = sequential $ aroundAll withTestResources do Nothing Nothing (Just "24H") - (Just "true") + (Just "div#dashboard-tabs-content") (Just "dashboard-variable-option") [("var-host", Just "dellyman.com"), ("var-endpointHash", Just "ba3431d5")] case response of @@ -1377,24 +1377,34 @@ spec = sequential $ aroundAll withTestResources do -- themselves rather than blocking on the widget phase (measured 4.9s -> 1.2s). describe "Prefill on a full load, skeletons on a swap" do let openTab tr dashId hx = do - (tabDashboard . snd) <$> testServant tr (Dashboards.dashboardTabGetH testPid dashId "overview" Nothing Nothing Nothing (Just "24H") hx Nothing [("var-host", Just "dellyman.com"), ("var-endpointHash", Just "ba3431d5")]) + snd <$> testServant tr (Dashboards.dashboardTabGetH testPid dashId "overview" Nothing Nothing Nothing (Just "24H") hx Nothing [("var-host", Just "dellyman.com"), ("var-endpointHash", Just "ba3431d5")]) eagerOnes = filter (\w -> w.eager == Just True || isJust w.html || isJust w.dataset) it "keeps the server-side prefill for a full page load" \tr -> do dashId <- newDashboard tr "endpoint-stats.yaml" "Prefill Full" full <- openTab tr dashId Nothing - eagerOnes (renderedWidgets full) `shouldSatisfy` not . null + eagerOnes (renderedWidgets $ tabDashboard full) `shouldSatisfy` not . null T.count "id=\"log_details_container\"" (toStrict $ renderText $ toHtml full) `shouldBe` 1 it "hands a swap the same widgets with nothing prefilled" \tr -> do dashId <- newDashboard tr "endpoint-stats.yaml" "Prefill Swap" - swapped <- openTab tr dashId (Just "true") - let ws = renderedWidgets swapped + swapped <- openTab tr dashId (Just "div#dashboard-tabs-content") + let ws = renderedWidgets $ tabDashboard swapped ws `shouldSatisfy` not . null -- lazyWidget strips `eager` too: renderStatContent reads the flag as "data is here" -- and would otherwise spin forever. map (fromMaybe "" . (.title)) (eagerOnes ws) `shouldBe` [] + it "dashboardTab_sidebarNavigationFromSessions_keepsMainContent" \tr -> do + dashId <- newDashboard tr "rum.yaml" "RUM sidebar navigation" + (_, response) <- testServant tr $ Dashboards.dashboardTabGetH testPid dashId "overview" Nothing Nothing Nothing (Just "24H") (Just "div#main-content") Nothing [] + case response of + NavigationFull page -> do + let html = toStrict $ renderText $ toHtml page + html `shouldSatisfy` T.isInfixOf "id=\"main-content\"" + html `shouldSatisfy` T.isInfixOf "id=\"dashboardPage\"" + NavigationPartial _ _ -> expectationFailure "sidebar navigation returned a tab fragment, blanking the page" + it "returns the shared fragment contract for an htmx tab navigation" \tr -> do dashId <- newDashboard tr "endpoint-stats.yaml" "Partial navigation" (_, response) <- @@ -1407,7 +1417,7 @@ spec = sequential $ aroundAll withTestResources do Nothing Nothing (Just "24H") - (Just "true") + (Just "div#dashboard-tabs-content") Nothing [ ("var-host", Just "dellyman.com") , ("var-endpointHash", Just "ba3431d5") @@ -1547,9 +1557,10 @@ spec = sequential $ aroundAll withTestResources do -- /rum and its older /rum/dashboard open the dashboard; /rum/sessions the Explorer. Links from -- emails and alerts carry a window, which both must keep. it "rumRedirects_openTheDashboardOrSessions_andKeepTheWindow" \tr -> do - let location view ps = runAuthHandler tr (Dashboards.rumRedirectH testPid view ps) <&> \h -> case lookupResponseHeader @"Location" h of - Header l -> l - _ -> "" + let location view ps = + runAuthHandler tr (Dashboards.rumRedirectH testPid view ps) <&> \h -> case lookupResponseHeader @"Location" h of + Header l -> l + _ -> "" window = [("since", Just "7D"), ("environment", Just "prod")] dashboard <- location [] window dashboard `shouldSatisfy` T.isInfixOf ("/p/" <> testPid.toText <> "/dashboards/") diff --git a/test/integration/Pages/ErrorPatternsSpec.hs b/test/integration/Pages/ErrorPatternsSpec.hs index 8c11face5..34d35d572 100644 --- a/test/integration/Pages/ErrorPatternsSpec.hs +++ b/test/integration/Pages/ErrorPatternsSpec.hs @@ -128,7 +128,7 @@ spec = sequential $ aroundAll withTestResources do (e.browser, e.os, e.device, e.userAgent) `shouldBe` (Just "Chrome", Just "Windows", Just "Desktop", Just ua) (e.geoCountry, e.geoCity, e.threadName, e.attachments) `shouldBe` (Just "US", Just "Santa Clara", Just "main", Just ["https://cdn.example.com/shot.png"]) issue <- issueOf tr e.hash - issuePageText tr issue.id >>= (`shouldContainAll` ["id=\"issue-contexts\"", "Santa Clara, US", "26.3.1", "Chrome", "exception_event", "id=\"issue-http\"", "https://shop.example.com/api/context?cart=7&coupon=x", "coupon", "x-request-id", "curl -X GET", "id=\"issue-copy-json\"", ""release":"26.3.1"", "## ", "id=\"issue-grouping\"", "context probe", "Root cause", "The cart line has no price", "Plan a fix", "id=\"issue-tags\"", ">release", ">26.3.1", "100%", "id=\"issue-attachments\"", "src=\"https://cdn.example.com/shot.png\""]) + issuePageText tr issue.id >>= (`shouldContainAll` ["id=\"issue-contexts\"", "Santa Clara, US", "26.3.1", "Chrome", "exception_event", "id=\"issue-http\"", "https://shop.example.com/api/context?cart=7&coupon=x", "coupon", "x-request-id", "curl -X GET", "id=\"issue-copy-json\"", ""release":"26.3.1"", "## ", "id=\"issue-grouping\"", "context probe", "Likely cause", "The cart line has no price", "Plan a fix", "id=\"issue-tags\"", ">release", ">26.3.1", "100%", "id=\"issue-attachments\"", "src=\"https://cdn.example.com/shot.png\""]) it "1c. releases and distinct users are tracked, and resolve-in-next-release holds until a new release" \tr -> do apiKey <- createTestAPIKey tr pid "release-key" diff --git a/test/integration/Pages/IssuesSpec.hs b/test/integration/Pages/IssuesSpec.hs index da9eb2489..7590bb79f 100644 --- a/test/integration/Pages/IssuesSpec.hs +++ b/test/integration/Pages/IssuesSpec.hs @@ -18,6 +18,7 @@ import Database.PostgreSQL.Simple qualified as PGS import Database.PostgreSQL.Simple.SqlQQ (sql) import Hasql.Interpolate qualified as HI import Lucid (ToHtml, renderText, toHtml) +import Models.Apis.ApiChanges qualified as ApiChanges import Models.Apis.ErrorPatterns qualified as ErrorPatterns import Models.Apis.Incidents qualified as Incidents import Models.Apis.Issues qualified as Issues @@ -30,6 +31,7 @@ import Pages.Issues qualified as IssuesPage import Pages.Telemetry qualified as Trace import Pkg.Components.Table qualified as Table import Pkg.DeriveUtils (UUIDId (..)) +import Pkg.SchemaLearning.Catalog qualified as Catalog import Pkg.TestUtils import Relude import Relude.Unsafe qualified as Unsafe @@ -148,7 +150,7 @@ spec = sequential $ aroundAll withTestResources do -- Regression: since #376 dropped apis.shapes/fields/formats, getAnomaliesVM selected -- NULL drift detail, so new/changed fields never reached the issue, never updated an - -- open one, and a breaking change never marked it critical. + -- open one. Observed field drift does not establish consumer breakage. it "apiChangeIssue_fieldDrift_neverReachedIssuePayload" \tr -> do nowTxt <- nowText let ingest body = do @@ -173,7 +175,7 @@ spec = sequential $ aroundAll withTestResources do ingest "eyJ1c2VybmFtZSI6MiwicGFzc3dvcmQiOiJ4Iiwibmlja25hbWUiOjJ9" -- username, nickname: string -> number (i2, d2) <- driftIssue (hasField "password" d2.newFields, hasField "username" d2.modifiedFields, hasField "password" d2.modifiedFields) `shouldBe` (True, True, False) - (i2.id == i0.id, i2.critical) `shouldBe` (True, True) + (i2.id == i0.id, i2.critical, i2.severity) `shouldBe` (True, False, Issues.Warning) (_, detail) <- testServant tr $ IssuesPage.issueDetailGetH testPid i2.id Nothing Nothing Nothing Nothing Nothing let html = renderPage detail for_ ["Before", "After", "Detected", "a@b.co", "string", "number"] \text -> @@ -183,7 +185,7 @@ spec = sequential $ aroundAll withTestResources do for_ ["Historical types and values were not captured", "Current observations", "a@b.co"] \text -> renderPage legacyDetail `shouldSatisfy` T.isInfixOf text for_ ([("Added", "2026-01-01T00:00:00Z"), ("Modified", "2026-01-02T00:00:00Z")] :: [(Text, Text)]) \(kind, detected) -> - T.splitOn "" (renderPage legacyDetail) `shouldSatisfy` any (\row -> all (`T.isInfixOf` row) ["nickname", ">" <> kind <> "", detected]) + T.splitOn "" (renderPage legacyDetail) `shouldSatisfy` any (\batch -> all (`T.isInfixOf` batch) ["nickname", ">" <> kind <> "", detected]) it "apiChangeEvidence_unavailable_doesNotHideIssue" \tr -> do issueId <- pickApiChangeIssue tr @@ -196,7 +198,7 @@ spec = sequential $ aroundAll withTestResources do (_, detail) <- testServant tr $ IssuesPage.issueDetailGetH testPid issueId Nothing Nothing Nothing Nothing Nothing for_ ["Field changes", "Field evidence unavailable"] \text -> renderPage detail `shouldSatisfy` T.isInfixOf text - it "apiChanges_sameService_collapseWithoutLosingEndpointIssues" \tr -> do + it "apiChanges_sameHost_collapseWithoutLosingEndpointIssues" \tr -> do nowTxt <- nowText for_ ["eyJ1c2VybmFtZSI6ImFAYi5jbyJ9", "eyJ1c2VybmFtZSI6Mn0="] \body -> do processMessagesAndBackgroundJobs tr [("group", encMsg $ msgWithBody "/v1/grouped-drift" body nowTxt)] @@ -211,9 +213,9 @@ spec = sequential $ aroundAll withTestResources do do (_, page) <- testServant tr $ IssuesPage.issueListGetH testPid (Just "Inbox") Nothing Nothing Nothing Nothing Nothing Nothing [] ["api_change"] let html = renderPage page - for_ [" + for_ [" html `shouldSatisfy` T.isInfixOf text - T.splitOn "
" html `shouldSatisfy` any (\disclosure -> all (`T.isInfixOf` disclosure) ["" html `shouldSatisfy` any (\batch -> all (`T.isInfixOf` batch) [" do issueId <- pickApiChangeIssue tr - let containsIssue = V.any \(IssuesPage.IssueVM _ _ issue) -> issue.base.id == issueId + let containsIssue = V.any \(IssuesPage.IssueVM _ issue) -> issue.base.id == issueId withResource tr.trPool \conn -> do void $ PGS.execute conn [sql| UPDATE apis.issues SET archived_at=NULL, acknowledged_at=NULL, acknowledged_by=NULL WHERE id=? |] (Only issueId) @@ -547,7 +549,38 @@ spec = sequential $ aroundAll withTestResources do html `shouldSatisfy` T.isInfixOf "data-end=\"2026-09-02T10:04:43Z\"" html `shouldSatisfy` T.isInfixOf ("\"from\":\"" <> from <> "\"") html `shouldSatisfy` T.isInfixOf ("\"to\":\"" <> to <> "\"") - html `shouldSatisfy` T.isInfixOf "first_occurrence=true&from=2026-09-02T06" + html `shouldNotSatisfy` T.isInfixOf "first_occurrence=true" + html `shouldSatisfy` T.isInfixOf "Selected event is outside this range." + html `shouldSatisfy` T.isInfixOf "Jump to latest occurrence" + + it "spanSchemaIssue_doesNotLookUpTraceUsingLegacyHttpPlaceholders" \tr -> do + let subject = ApiChanges.SpanSchema Catalog.emptyScope{Catalog.service = Just "checkout", Catalog.spanName = Just "process-order"} + payload = + [aesonQQ|{ "subject": #{subject}, "endpoint_method": "UNKNOWN", "endpoint_path": "/", "endpoint_host": "Unknown", + "anomaly_hashes": [], "shape_changes": [], "format_changes": [], "new_fields": [], "deleted_fields": [], "modified_fields": [] }|] + traceIdText <- DataUUID.toText <$> UUID.nextRandom + issueId <- withResource tr.trPool \conn -> do + void + $ PGS.execute + conn + [sql| INSERT INTO otel_logs_and_spans + (id, project_id, timestamp, start_time, attributes___http___request___method, attributes___url___path, context___trace_id, summary) + VALUES (gen_random_uuid(), ?, ?, ?, 'UNKNOWN', '/', ?, '{}') |] + (testPid, frozenTime, frozenTime, traceIdText) + maybe (fail "expected schema issue") (pure . fromOnly) + . listToMaybe + =<< PGS.query + conn + [sql| INSERT INTO apis.issues + (project_id, issue_type, title, target_hash, issue_data, created_at, updated_at) + VALUES (?, 'api_change', 'Span schema changed', ?, ?::jsonb, ?, ?) RETURNING id |] + (testPid, "span-schema-" <> traceIdText, AE.encode payload, frozenTime, frozenTime) + (_, page) <- testServant tr $ IssuesPage.issueDetailGetH testPid issueId Nothing Nothing Nothing Nothing Nothing + let html = renderPage page + html `shouldSatisfy` T.isInfixOf "process-order" + html `shouldNotSatisfy` T.isInfixOf traceIdText + html `shouldSatisfy` T.isInfixOf "Span schema observed" + html `shouldNotSatisfy` T.isInfixOf "New endpoint discovered" it "log-pattern evidence loads separately and honors the shared absolute range" \tr -> do patternHash <- DataUUID.toText <$> UUID.nextRandom @@ -586,9 +619,10 @@ spec = sequential $ aroundAll withTestResources do sampleHtml `shouldSatisfy` T.isInfixOf ("/traces/" <> traceIdText <> "?timestamp=") (_, emptySample) <- testServant tr $ IssuesPage.issueSampleGetH testPid (UUIDId issueId) Nothing (Just $ iso $ addUTCTime 3600 frozenTime) (Just $ iso $ addUTCTime 3660 frozenTime) let emptyHtml = TL.toStrict $ renderText emptySample - emptyHtml `shouldSatisfy` T.isInfixOf "No matching event" + emptyHtml `shouldSatisfy` T.isInfixOf "No occurrences in this range." emptyHtml `shouldSatisfy` T.isInfixOf "Stored sample" emptyHtml `shouldSatisfy` T.isInfixOf "saved occurrence" + emptyHtml `shouldSatisfy` T.isInfixOf "independently of the date filter and raw-event retention" let otherPid = UUIDId $ DataUUID.fromWords 0x12345678 0x9abcdef0 0x12345678 0x9abcdef0 (_, otherProjectSample) <- testServant tr $ IssuesPage.issueSampleGetH otherPid (UUIDId issueId) Nothing (Just from) (Just to) TL.toStrict (renderText otherProjectSample) `shouldSatisfy` not . T.isInfixOf "occurrence" @@ -775,7 +809,7 @@ spec = sequential $ aroundAll withTestResources do it "issueList_mobileEventCount_labelsPeriodNotTimeFilter" \tr -> do void $ seedIssue tr Issues.LogPattern "mobile count probe" "mobile-count" (_, page) <- testServant tr $ IssuesPage.issueListGetH testPid (Just "Inbox") Nothing (Just "7d") Nothing (Just "100") Nothing (Just "24h") [] [] - renderPage page `shouldSatisfy` T.isInfixOf "0 events (24h)" + renderPage page `shouldSatisfy` T.isInfixOf "0 events · 24h" renderPage page `shouldNotSatisfy` T.isInfixOf "(7d)" it "the user journey offers search, newest-first ordering and copy, and skips contentless events" \tr -> do @@ -786,11 +820,11 @@ spec = sequential $ aroundAll withTestResources do apiKey <- createTestAPIKey tr testPid "journey-key" let at dt = addUTCTime dt frozenTime checkoutEvents = [mkSpanEvent "message" [("rpc.message.type", "SENT")] (at 0), mkSpanEvent "log" [("message", "checkout declined")] (at 0)] - forM_ @[] [(-2, "a1", "GET /cart", []), (-1, "a2", "cart item missing price", []), (0, "a3", "POST /checkout", checkoutEvents)] \(dt, sid, name, evs) -> + forM_ @[] [(-5, "a0", "page loaded", []), (-4, "b0", "cart opened", []), (-3, "c0", "shipping selected", []), (-2, "a1", "GET /cart", []), (-1, "a2", "cart item missing price", []), (0, "a3", "POST /checkout", checkoutEvents)] \(dt, sid, name, evs) -> ingestSpanReq tr $ mkSpanRequest traceIdText sid Nothing name evs Nothing [] (mkResource apiKey []) (at dt) issueId <- seedIssue tr Issues.RuntimeException "journey probe" "journey-probe" html <- eventually (renderPage . snd <$> testServant tr (IssuesPage.issueActivityGetH testPid issueId (Just traceIdText) (Just frozenTime))) (T.isInfixOf "checkout declined") - html `shouldContainAll` ["id=\"issue-journey\"", "Search the user journey", "crumb-rev", "issue-journey-text", "cart item missing price", "checkout declined"] + html `shouldContainAll` ["id=\"issue-journey\"", "Search the user journey", "crumb-rev", "issue-journey-text", "cart item missing price", "checkout declined", "id=\"issue-journey-events\"", "View all", "Show fewer", "Last 5 events"] html `shouldNotSatisfy` T.isInfixOf ">message" it "comments, external links and viewers show in the issue's activity" \tr -> do @@ -803,7 +837,7 @@ spec = sequential $ aroundAll withTestResources do _ <- testServant tr $ IssuesPage.linkPostH testPid iid (IssuesPage.LinkForm "javascript:alert(1)" Nothing) (_, activity) <- testServant tr $ IssuesPage.issueActivityGetH testPid iid Nothing Nothing let html = renderPage activity - html `shouldContainAll` ["Rolled back the cart service", "External links", "GitHub", "Cart crash", "Participating:", "name=\"body\""] + html `shouldContainAll` ["Rolled back the cart service", "External links", "GitHub", "Cart crash", "Participating:", "/api/avatar/", "People", "name=\"body\""] html `shouldSatisfy` not . T.isInfixOf "javascript:alert" -- Two views in a day record one, and views stay off the timeline. withResource tr.trPool (\conn -> PGS.query conn [sql| SELECT count(*)::int FROM apis.issue_activity_log WHERE issue_id = ? AND event = 'viewed' |] (Only iid)) `shouldReturn` [Only (1 :: Int)] @@ -834,8 +868,12 @@ spec = sequential $ aroundAll withTestResources do _ -> fail "no Location" eventually (stepTo Telemetry.Older (IssuesPage.EventRef tc (at 0))) (T.isInfixOf tb) >>= (`shouldSatisfy` T.isInfixOf tb) stepTo Telemetry.Older (IssuesPage.EventRef ta (at (-600))) >>= (`shouldSatisfy` T.isInfixOf ta) + -- A triage edit must not move a historical event's default investigation window. + withResource tr.trPool \conn -> void $ PGS.execute conn [sql| UPDATE apis.issues SET updated_at=? WHERE id=? |] (at 86400, iid) (_, page) <- testServant tr $ IssuesPage.issueDetailGetH testPid iid Nothing Nothing Nothing Nothing (Just $ IssuesPage.EventRef tb (at (-300))) renderPage page `shouldContainAll` [tb, "id=\"issue-events\"", "/step?dir=older", "/step?dir=recommended", "class=\"dropdown dropdown-end menu", "id=\"issue-copy-pop\""] + renderPage page `shouldContainAll` ["data-start=\"2024-12-31T21:55:00Z\"", "data-end=\"2025-01-01T01:55:00Z\"", "Around selected event", "±2 hours", "2024-12-31 23:55:00 UTC"] + renderPage page `shouldNotSatisfy` T.isInfixOf "Selected event is outside this range." it "category views, filter chips and saved views on the issue list" \tr -> do let list types = renderPage . snd <$> testServant tr (IssuesPage.issueListGetH testPid (Just "Inbox") Nothing Nothing Nothing Nothing Nothing (Just "24h") [] types) @@ -1344,11 +1382,11 @@ spec = sequential $ aroundAll withTestResources do isApiChange :: IssuesPage.IssueVM -> Bool -isApiChange (IssuesPage.IssueVM _ _ c) = c.base.issueType == Issues.ApiChange +isApiChange (IssuesPage.IssueVM _ c) = c.base.issueType == Issues.ApiChange issueOf :: IssuesPage.IssueVM -> Issues.IssueL -issueOf (IssuesPage.IssueVM _ _ issue) = issue +issueOf (IssuesPage.IssueVM _ issue) = issue issueIdOf :: IssuesPage.IssueVM -> Issues.IssueId diff --git a/test/integration/Pages/TelemetrySpec.hs b/test/integration/Pages/TelemetrySpec.hs index 44e99cf93..3ca97fbd1 100644 --- a/test/integration/Pages/TelemetrySpec.hs +++ b/test/integration/Pages/TelemetrySpec.hs @@ -155,7 +155,7 @@ spec = do ingestSpanReq tr $ withSpanStatus PT.Status'STATUS_CODE_ERROR $ withSpanKind PT.Span'SPAN_KIND_CLIENT - $ mkSpanRequest trId childSid (Just rootSid) "pg.query" [] Nothing [] (mkResource apiKey []) frozenTime + $ mkSpanRequest trId childSid (Just rootSid) "pg.query" [mkSpanEvent "exception" [] frozenTime] Nothing [mkAttr "db.statement" "\n SELECT \n FROM checkout\n \n"] (mkResource apiKey []) frozenTime traceM' <- runTestBg frozenTime tr $ Telemetry.getTraceDetailsForView False testPid trId (Just frozenTime) frozenTime Nothing spans <- maybe (fail "expected the ingested trace to be found") (\(_, sps, _) -> pure sps) traceM' @@ -173,6 +173,9 @@ spec = do let html = LT.toStrict $ Lucid.renderText $ Lucid.toHtml page for_ ["Waterfall", "GET /checkout", "pg.query", ">Errors1<"] \text -> html `shouldSatisfy` T.isInfixOf text + for_ ["