feat/observability #4
12
.env.example
12
.env.example
@@ -11,8 +11,18 @@ BETTER_AUTH_SECRET="change-me-with-openssl-rand-base64-32"
|
|||||||
BETTER_AUTH_URL="http://localhost:4100"
|
BETTER_AUTH_URL="http://localhost:4100"
|
||||||
# "development" enables pretty logs, "production" emits JSON
|
# "development" enables pretty logs, "production" emits JSON
|
||||||
NODE_ENV="development"
|
NODE_ENV="development"
|
||||||
# Optional: Pino log level (defaults to "debug" outside production, "info" in production)
|
# Optional: log level (trace, debug, info, warning, error, fatal) (defaults to "debug" outside production, "info" in production)
|
||||||
# LOG_LEVEL="info"
|
# LOG_LEVEL="info"
|
||||||
|
# Optional: ship logs to OpenObserve over OTLP/HTTP. Without OPENOBSERVE_URL logs only go to the console.
|
||||||
|
# OPENOBSERVE_URL="http://localhost:5080"
|
||||||
|
# Optional: organization (defaults to "default") and stream (defaults to "superlist")
|
||||||
|
# OPENOBSERVE_ORG="default"
|
||||||
|
# OPENOBSERVE_STREAM="superlist"
|
||||||
|
# OpenObserve user email and password (sent as Basic auth)
|
||||||
|
# OPENOBSERVE_USER="root@example.com"
|
||||||
|
# OPENOBSERVE_PASSWORD=""
|
||||||
|
# Optional: how often HTTP metrics are pushed to OpenObserve, in milliseconds (defaults to 15000)
|
||||||
|
# METRICS_EXPORT_INTERVAL_MS="15000"
|
||||||
# Resend API key used to send invitation and password reset emails. Without it, emails are logged instead.
|
# Resend API key used to send invitation and password reset emails. Without it, emails are logged instead.
|
||||||
# RESEND_API_KEY="re_xxxxxxxx"
|
# RESEND_API_KEY="re_xxxxxxxx"
|
||||||
# From address for outgoing email (must be a verified Resend sender)
|
# From address for outgoing email (must be a verified Resend sender)
|
||||||
|
|||||||
25
AGENTS.md
25
AGENTS.md
@@ -15,7 +15,7 @@ The `health` module is the reference example.
|
|||||||
|
|
||||||
- Monorepo orchestrated with **Turborepo** (see the managed block at the end of this file)
|
- Monorepo orchestrated with **Turborepo** (see the managed block at the end of this file)
|
||||||
- Backend: **Bun** + **Hono**, **Prisma 7** against **Postgres** (via `@prisma/adapter-pg`), **Zod** for
|
- Backend: **Bun** + **Hono**, **Prisma 7** against **Postgres** (via `@prisma/adapter-pg`), **Zod** for
|
||||||
validation, **Pino** for logging, **BetterAuth** for auth
|
validation, **LogTape** for logging (shipped to **OpenObserve**), **BetterAuth** for auth
|
||||||
- Frontend: **React + Vite + TypeScript**, **Tailwind v4**, UI components from **shadcn/ui**
|
- Frontend: **React + Vite + TypeScript**, **Tailwind v4**, UI components from **shadcn/ui**
|
||||||
- Frontend routing: **TanStack Router** (file-based) · server state: **TanStack Query** ·
|
- Frontend routing: **TanStack Router** (file-based) · server state: **TanStack Query** ·
|
||||||
forms: **React Hook Form + Zod**
|
forms: **React Hook Form + Zod**
|
||||||
@@ -197,9 +197,26 @@ export class CreateAlert {
|
|||||||
(`problemResponse`, `notFoundHandler`, `errorHandler`) in `apps/api/src/lib/problem-details.ts`.
|
(`problemResponse`, `notFoundHandler`, `errorHandler`) in `apps/api/src/lib/problem-details.ts`.
|
||||||
- Zod is the only validation library, and Zod 4 is what is installed. Define schemas next to the feature that
|
- Zod is the only validation library, and Zod 4 is what is installed. Define schemas next to the feature that
|
||||||
uses them (`schema.ts`); share them through `@superlist/shared` only when more than one module needs them.
|
uses them (`schema.ts`); share them through `@superlist/shared` only when more than one module needs them.
|
||||||
- **Logging: Pino** — one shared logger in `apps/api/src/lib/logger.ts`, reachable from handlers as
|
- **Logging: LogTape** — root logger (`superlist` category) exported from `apps/api/src/lib/logger.ts`, reachable
|
||||||
`c.get('logger')` (already enriched with the request id); never `console.log` in the backend. Level comes from
|
from handlers as `c.get('logger')`; never `console.log` in the backend. The call shape is
|
||||||
`LOG_LEVEL`, defaulting to `debug` (pretty) outside production and `info` (JSON) in production.
|
`logger.info('message {prop}', { prop })` (message first, properties second; pass errors as `{ error }`).
|
||||||
|
`configureLogging()` runs once in `src/index.ts` (tests never call it, so logging is silent there) and
|
||||||
|
`dispose()` flushes on SIGINT/SIGTERM. Sinks: console (`@logtape/pretty` outside production, JSON lines in
|
||||||
|
production) plus OpenObserve over OTLP/HTTP (`@logtape/otel`, `/api/<org>/v1/logs`, Basic auth, `stream-name`
|
||||||
|
header) when `OPENOBSERVE_URL` is set (`OPENOBSERVE_ORG`, `OPENOBSERVE_STREAM`, `OPENOBSERVE_USER`,
|
||||||
|
`OPENOBSERVE_PASSWORD`). Level comes from `LOG_LEVEL` (`debug` in dev, `info` in production; `warn` is accepted
|
||||||
|
for `warning`). The request middleware in `app.ts` wraps each request in `withContext({ requestId })`, so every
|
||||||
|
record logged during it carries the request id, and logs one `superlist.http` record per request with
|
||||||
|
`method`, `path`, `route` (the Hono pattern, e.g. `/api/lists/:listId`), `status`, `durationMs`, `userId` and
|
||||||
|
`userAgent` — `error` for 5xx, `warning` for 4xx, `debug` for `/api/health`, `info` otherwise. SSE routes
|
||||||
|
return their `Response` immediately, so their duration is the time to open the stream.
|
||||||
|
- **Metrics: OpenTelemetry SDK** (`apps/api/src/lib/metrics.ts`), pushed to OpenObserve over OTLP/HTTP
|
||||||
|
(`/api/<org>/v1/metrics`, cumulative temporality) every `METRICS_EXPORT_INTERVAL_MS` (15 s) when
|
||||||
|
`OPENOBSERVE_URL` is set; otherwise the global meter is a no-op. The same request middleware records
|
||||||
|
`http.server.request.duration` (histogram, seconds; attributes `http.request.method`, `http.route`,
|
||||||
|
`http.response.status_code`) and `http.server.active_requests`. Always use the route pattern
|
||||||
|
(`routePath(c, -1)`), never the raw path, as an attribute. The OpenObserve settings live in
|
||||||
|
`lib/openobserve.ts`, shared by logs and metrics. Dashboard guide: `docs/openobserve-dashboard.md` (importable JSON: `docs/openobserve-dashboard.json`).
|
||||||
- Unexpected throws are turned into Problem Details by `app.onError`; unmatched routes by `app.notFound`
|
- Unexpected throws are turned into Problem Details by `app.onError`; unmatched routes by `app.notFound`
|
||||||
(both in `apps/api/src/lib/problem-details.ts`).
|
(both in `apps/api/src/lib/problem-details.ts`).
|
||||||
- `createApp()` middleware order matters: `secureHeaders` → `cors` (origins from `CORS_ORIGIN`, credentials on)
|
- `createApp()` middleware order matters: `secureHeaders` → `cors` (origins from `CORS_ORIGIN`, credentials on)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Monorepo with a Bun + Hono API and a React + Vite admin app.
|
|||||||
|
|
||||||
| Workspace | What it is |
|
| Workspace | What it is |
|
||||||
| ----------------- | ----------------------------------------------------------------------- |
|
| ----------------- | ----------------------------------------------------------------------- |
|
||||||
| `apps/api` | Bun + Hono backend, Prisma (Postgres), Zod validation, Pino logging |
|
| `apps/api` | Bun + Hono backend, Prisma (Postgres), Zod validation, LogTape logging |
|
||||||
| `apps/web` | React + Vite + TypeScript frontend, shadcn/ui, TanStack Router + Query |
|
| `apps/web` | React + Vite + TypeScript frontend, shadcn/ui, TanStack Router + Query |
|
||||||
| `packages/shared` | `@superlist/shared` — Result pattern and RFC 9457 Problem Details types |
|
| `packages/shared` | `@superlist/shared` — Result pattern and RFC 9457 Problem Details types |
|
||||||
|
|
||||||
|
|||||||
2
STACK.md
2
STACK.md
@@ -1,5 +1,5 @@
|
|||||||
- Monorepo con TURBO
|
- Monorepo con TURBO
|
||||||
- Backend en Bun con Hono. Acceso a DB Postgres con Prisma. Validación con Zod. Logging con Pino
|
- Backend en Bun con Hono. Acceso a DB Postgres con Prisma. Validación con Zod. Logging con LogTape (consola + OpenObserve vía OTLP)
|
||||||
- Salidas del backend según RFC 9457 (Problem Details)
|
- Salidas del backend según RFC 9457 (Problem Details)
|
||||||
- Frontend en React con vite y typescript. Componentes Shadcn
|
- Frontend en React con vite y typescript. Componentes Shadcn
|
||||||
- Rutas del frontend con TanStack Router usando file-based routing
|
- Rutas del frontend con TanStack Router usando file-based routing
|
||||||
|
|||||||
@@ -4,8 +4,18 @@ CORS_ORIGIN="http://localhost:7153"
|
|||||||
BETTER_AUTH_SECRET="change-me-with-openssl-rand-base64-32"
|
BETTER_AUTH_SECRET="change-me-with-openssl-rand-base64-32"
|
||||||
BETTER_AUTH_URL="http://localhost:4100"
|
BETTER_AUTH_URL="http://localhost:4100"
|
||||||
NODE_ENV="development"
|
NODE_ENV="development"
|
||||||
# Optional: Pino log level (defaults to "debug" outside production, "info" in production)
|
# Optional: log level (trace, debug, info, warning, error, fatal) (defaults to "debug" outside production, "info" in production)
|
||||||
# LOG_LEVEL="info"
|
# LOG_LEVEL="info"
|
||||||
|
# Optional: ship logs to OpenObserve over OTLP/HTTP. Without OPENOBSERVE_URL logs only go to the console.
|
||||||
|
# OPENOBSERVE_URL="http://localhost:5080"
|
||||||
|
# Optional: organization (defaults to "default") and stream (defaults to "superlist")
|
||||||
|
# OPENOBSERVE_ORG="default"
|
||||||
|
# OPENOBSERVE_STREAM="superlist"
|
||||||
|
# OpenObserve user email and password (sent as Basic auth)
|
||||||
|
# OPENOBSERVE_USER="root@example.com"
|
||||||
|
# OPENOBSERVE_PASSWORD=""
|
||||||
|
# Optional: how often HTTP metrics are pushed to OpenObserve, in milliseconds (defaults to 15000)
|
||||||
|
# METRICS_EXPORT_INTERVAL_MS="15000"
|
||||||
# Resend API key used to send invitation and password reset emails. Without it, emails are logged instead.
|
# Resend API key used to send invitation and password reset emails. Without it, emails are logged instead.
|
||||||
# RESEND_API_KEY="re_xxxxxxxx"
|
# RESEND_API_KEY="re_xxxxxxxx"
|
||||||
# From address for outgoing email (must be a verified Resend sender)
|
# From address for outgoing email (must be a verified Resend sender)
|
||||||
|
|||||||
@@ -18,14 +18,19 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@better-auth/passkey": "1.7.7",
|
"@better-auth/passkey": "1.7.7",
|
||||||
"@hono/zod-validator": "^0.9.1",
|
"@hono/zod-validator": "^0.9.1",
|
||||||
|
"@logtape/logtape": "^2.4.2",
|
||||||
|
"@logtape/otel": "^2.4.2",
|
||||||
|
"@logtape/pretty": "^2.4.2",
|
||||||
|
"@opentelemetry/api": "1.9.0",
|
||||||
|
"@opentelemetry/exporter-metrics-otlp-http": "0.208.0",
|
||||||
|
"@opentelemetry/resources": "2.2.0",
|
||||||
|
"@opentelemetry/sdk-metrics": "2.2.0",
|
||||||
"@prisma/adapter-pg": "^7.10.0",
|
"@prisma/adapter-pg": "^7.10.0",
|
||||||
"@prisma/client": "^7.10.0",
|
"@prisma/client": "^7.10.0",
|
||||||
"@superlist/shared": "workspace:*",
|
"@superlist/shared": "workspace:*",
|
||||||
"better-auth": "^1.7.7",
|
"better-auth": "^1.7.7",
|
||||||
"hono": "^4.13.13",
|
"hono": "^4.13.13",
|
||||||
"pg": "^8.23.1",
|
"pg": "^8.23.1",
|
||||||
"pino": "^10.4.0",
|
|
||||||
"pino-pretty": "^13.2.0",
|
|
||||||
"resend": "^6.32.1",
|
"resend": "^6.32.1",
|
||||||
"zod": "^4.6.7"
|
"zod": "^4.6.7"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "shopping_list_members" ADD COLUMN "icon" TEXT,
|
||||||
|
ADD COLUMN "is_pinned" BOOLEAN NOT NULL DEFAULT false,
|
||||||
|
ADD COLUMN "pinned_order" INTEGER;
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE INDEX "shopping_list_members_user_id_is_pinned_idx" ON "shopping_list_members"("user_id", "is_pinned");
|
||||||
@@ -168,11 +168,18 @@ model ShoppingListMember {
|
|||||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||||
role ListRole @default(collaborator)
|
role ListRole @default(collaborator)
|
||||||
isPrimary Boolean @default(false) @map("is_primary")
|
isPrimary Boolean @default(false) @map("is_primary")
|
||||||
|
/// Per user: the list is pinned to the always-visible bar (at most 4 per user).
|
||||||
|
isPinned Boolean @default(false) @map("is_pinned")
|
||||||
|
/// Position among the user's pinned lists (pin order); null when not pinned.
|
||||||
|
pinnedOrder Int? @map("pinned_order")
|
||||||
|
/// Per user: key of the icon chosen for the list (see `LIST_ICONS` in `@superlist/shared`).
|
||||||
|
icon String?
|
||||||
createdAt DateTime @default(now()) @map("created_at")
|
createdAt DateTime @default(now()) @map("created_at")
|
||||||
updatedAt DateTime @updatedAt @map("updated_at")
|
updatedAt DateTime @updatedAt @map("updated_at")
|
||||||
|
|
||||||
@@unique([listId, userId])
|
@@unique([listId, userId])
|
||||||
@@index([userId, isPrimary])
|
@@index([userId, isPrimary])
|
||||||
|
@@index([userId, isPinned])
|
||||||
@@map("shopping_list_members")
|
@@map("shopping_list_members")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
|
import { withContext } from '@logtape/logtape'
|
||||||
import { Hono } from 'hono'
|
import { Hono } from 'hono'
|
||||||
import { cors } from 'hono/cors'
|
import { cors } from 'hono/cors'
|
||||||
import { requestId } from 'hono/request-id'
|
import { requestId } from 'hono/request-id'
|
||||||
|
import { routePath } from 'hono/route'
|
||||||
import { secureHeaders } from 'hono/secure-headers'
|
import { secureHeaders } from 'hono/secure-headers'
|
||||||
|
|
||||||
import { auth } from '@/lib/auth'
|
import { auth } from '@/lib/auth'
|
||||||
import { logger } from '@/lib/logger'
|
import { logger } from '@/lib/logger'
|
||||||
|
import { httpMetrics } from '@/lib/metrics'
|
||||||
import { errorHandler, notFoundHandler } from '@/lib/problem-details'
|
import { errorHandler, notFoundHandler } from '@/lib/problem-details'
|
||||||
import { healthModule } from '@/modules/health'
|
import { healthModule } from '@/modules/health'
|
||||||
import { invitationsModule } from '@/modules/invitations'
|
import { invitationsModule } from '@/modules/invitations'
|
||||||
import { listsModule } from '@/modules/lists'
|
import { listsModule } from '@/modules/lists'
|
||||||
import { voiceModule } from '@/modules/voice'
|
import { voiceModule } from '@/modules/voice'
|
||||||
import type { AppEnv } from '@/types'
|
import type { AppEnv, SessionUser } from '@/types'
|
||||||
|
|
||||||
|
const httpLogger = logger.getChild('http')
|
||||||
|
|
||||||
const allowedOrigins = (process.env.CORS_ORIGIN ?? 'http://localhost:7153')
|
const allowedOrigins = (process.env.CORS_ORIGIN ?? 'http://localhost:7153')
|
||||||
.split(',')
|
.split(',')
|
||||||
@@ -24,20 +29,53 @@ export function createApp() {
|
|||||||
app.use(cors({ origin: allowedOrigins, credentials: true }))
|
app.use(cors({ origin: allowedOrigins, credentials: true }))
|
||||||
app.use(requestId())
|
app.use(requestId())
|
||||||
app.use(async (c, next) => {
|
app.use(async (c, next) => {
|
||||||
const requestLogger = logger.child({ requestId: c.get('requestId') })
|
const requestId = c.get('requestId')
|
||||||
c.set('logger', requestLogger)
|
c.set('logger', httpLogger.with({ requestId }))
|
||||||
|
|
||||||
|
const http = httpMetrics()
|
||||||
|
const method = c.req.method
|
||||||
|
http.activeRequests.add(1, { 'http.request.method': method })
|
||||||
|
|
||||||
const start = performance.now()
|
const start = performance.now()
|
||||||
await next()
|
try {
|
||||||
requestLogger.info(
|
// Every record logged while the request runs (module loggers included)
|
||||||
{
|
// inherits the requestId through LogTape's implicit context.
|
||||||
method: c.req.method,
|
await withContext({ requestId }, next)
|
||||||
|
} finally {
|
||||||
|
http.activeRequests.add(-1, { 'http.request.method': method })
|
||||||
|
}
|
||||||
|
const elapsedMs = performance.now() - start
|
||||||
|
const durationMs = Math.round(elapsedMs * 10) / 10
|
||||||
|
|
||||||
|
const status = c.res.status
|
||||||
|
const route = routePath(c, -1)
|
||||||
|
// SSE streams (/events) return their Response right away, so for them this is
|
||||||
|
// the time to open the stream, not the lifetime of the connection.
|
||||||
|
http.duration.record(elapsedMs / 1000, {
|
||||||
|
'http.request.method': method,
|
||||||
|
// The Hono pattern (/api/lists/:listId), never the raw path, to keep cardinality low.
|
||||||
|
'http.route': route,
|
||||||
|
'http.response.status_code': status,
|
||||||
|
})
|
||||||
|
|
||||||
|
const userId = (c.get('user') as SessionUser | undefined)?.id
|
||||||
|
const properties = {
|
||||||
|
requestId,
|
||||||
|
method,
|
||||||
path: c.req.path,
|
path: c.req.path,
|
||||||
status: c.res.status,
|
route,
|
||||||
durationMs: Math.round(performance.now() - start),
|
status,
|
||||||
},
|
durationMs,
|
||||||
'request',
|
userAgent: c.req.header('user-agent'),
|
||||||
)
|
...(userId && { userId }),
|
||||||
|
}
|
||||||
|
const message = '{method} {path} {status} in {durationMs} ms'
|
||||||
|
|
||||||
|
if (status >= 500) httpLogger.error(message, properties)
|
||||||
|
else if (status >= 400) httpLogger.warn(message, properties)
|
||||||
|
// The container healthcheck hits /api/health every 10 s.
|
||||||
|
else if (c.req.path === '/api/health') httpLogger.debug(message, properties)
|
||||||
|
else httpLogger.info(message, properties)
|
||||||
})
|
})
|
||||||
|
|
||||||
// Every API route lives under /api: in production nginx serves the SPA on the
|
// Every API route lives under /api: in production nginx serves the SPA on the
|
||||||
|
|||||||
@@ -1,11 +1,25 @@
|
|||||||
|
import { dispose } from '@logtape/logtape'
|
||||||
|
|
||||||
import { createApp } from '@/app'
|
import { createApp } from '@/app'
|
||||||
import { logger } from '@/lib/logger'
|
import { configureLogging, logger } from '@/lib/logger'
|
||||||
|
import { configureMetrics, shutdownMetrics } from '@/lib/metrics'
|
||||||
|
|
||||||
|
await configureLogging()
|
||||||
|
const metricsEnabled = configureMetrics()
|
||||||
|
|
||||||
const port = Number(process.env.PORT ?? 4100)
|
const port = Number(process.env.PORT ?? 4100)
|
||||||
|
|
||||||
const app = createApp()
|
const app = createApp()
|
||||||
|
|
||||||
logger.info({ port }, 'api listening')
|
logger.info('api listening on port {port}', { port, metricsEnabled })
|
||||||
|
|
||||||
|
// Flush buffered logs and the last metrics batch before exiting.
|
||||||
|
for (const signal of ['SIGINT', 'SIGTERM'] as const) {
|
||||||
|
process.once(signal, async () => {
|
||||||
|
await Promise.allSettled([shutdownMetrics(), dispose()])
|
||||||
|
process.exit(0)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
port,
|
port,
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export const auth = betterAuth({
|
|||||||
to: email,
|
to: email,
|
||||||
...passwordResetEmail({ otp, expiresInMinutes: OTP_EXPIRES_IN_SECONDS / 60 }),
|
...passwordResetEmail({ otp, expiresInMinutes: OTP_EXPIRES_IN_SECONDS / 60 }),
|
||||||
}).catch((error: unknown) => {
|
}).catch((error: unknown) => {
|
||||||
logger.error({ err: error, to: email }, 'failed to send the password reset email')
|
logger.error('failed to send the password reset email', { error, to: email })
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -1,21 +1,99 @@
|
|||||||
import { pino } from 'pino'
|
import { AsyncLocalStorage } from 'node:async_hooks'
|
||||||
|
|
||||||
|
import {
|
||||||
|
configure,
|
||||||
|
getConsoleSink,
|
||||||
|
getLogger,
|
||||||
|
isLogLevel,
|
||||||
|
jsonLinesFormatter,
|
||||||
|
type Logger,
|
||||||
|
type LogLevel,
|
||||||
|
type Sink,
|
||||||
|
} from '@logtape/logtape'
|
||||||
|
import { getOpenTelemetrySink } from '@logtape/otel'
|
||||||
|
import { getPrettyFormatter } from '@logtape/pretty'
|
||||||
|
|
||||||
|
import { getOpenObserveConfig, SERVICE_NAME } from '@/lib/openobserve'
|
||||||
|
|
||||||
|
export type { Logger } from '@logtape/logtape'
|
||||||
|
|
||||||
const isProduction = process.env.NODE_ENV === 'production'
|
const isProduction = process.env.NODE_ENV === 'production'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Single logger instance for the whole API. Import it wherever you need to log —
|
* Root logger of the API (category `superlist`). Import it wherever you need to
|
||||||
* never use `console.log` in the backend.
|
* log — never use `console.log` in the backend. Inside a request, prefer
|
||||||
|
* `c.get('logger')`; either way every record emitted while the request runs
|
||||||
|
* carries its `requestId` (see `withContext` in `app.ts`).
|
||||||
|
*
|
||||||
|
* LogTape loggers are inert until `configureLogging()` runs (from `index.ts`),
|
||||||
|
* so tests that import modules using it stay silent.
|
||||||
*/
|
*/
|
||||||
export const logger = pino({
|
export const logger: Logger = getLogger(['superlist'])
|
||||||
level: process.env.LOG_LEVEL || (isProduction ? 'info' : 'debug'),
|
|
||||||
...(isProduction
|
|
||||||
? {}
|
|
||||||
: {
|
|
||||||
transport: {
|
|
||||||
target: 'pino-pretty',
|
|
||||||
options: { colorize: true, translateTime: 'HH:MM:ss', ignore: 'pid,hostname' },
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
|
|
||||||
export type Logger = typeof logger
|
/** Accepts LogTape levels plus Pino-style aliases (`warn`) for `LOG_LEVEL`. */
|
||||||
|
function resolveLevel(value: string | undefined): LogLevel {
|
||||||
|
const level = value?.trim().toLowerCase()
|
||||||
|
if (level === 'warn') return 'warning'
|
||||||
|
if (level && isLogLevel(level)) return level
|
||||||
|
|
||||||
|
return isProduction ? 'info' : 'debug'
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ships logs to OpenObserve over OTLP/HTTP (`/api/<org>/v1/logs`), routed to a
|
||||||
|
* stream by the `stream-name` header. Returns `null` when it is not configured.
|
||||||
|
*/
|
||||||
|
function openObserveSink(): Sink | null {
|
||||||
|
const config = getOpenObserveConfig()
|
||||||
|
if (!config) return null
|
||||||
|
|
||||||
|
return getOpenTelemetrySink({
|
||||||
|
serviceName: SERVICE_NAME,
|
||||||
|
// Nested property objects become JSON instead of util.inspect output.
|
||||||
|
objectRenderer: 'json',
|
||||||
|
otlpExporterConfig: {
|
||||||
|
url: `${config.otlpBaseUrl}/v1/logs`,
|
||||||
|
headers: { Authorization: config.authorization, 'stream-name': config.logStream },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configures LogTape once, at startup: console output (pretty in development,
|
||||||
|
* JSON lines in production) plus OpenObserve when `OPENOBSERVE_URL` is set.
|
||||||
|
* Call `dispose()` from `@logtape/logtape` on shutdown to flush pending records.
|
||||||
|
*/
|
||||||
|
export async function configureLogging(): Promise<void> {
|
||||||
|
const consoleSink = getConsoleSink({
|
||||||
|
formatter: isProduction
|
||||||
|
? jsonLinesFormatter
|
||||||
|
: getPrettyFormatter({
|
||||||
|
properties: true,
|
||||||
|
categoryWidth: 16,
|
||||||
|
wordWrap: false,
|
||||||
|
// Interpolate strings bare ("GET /api/lists") instead of quoted.
|
||||||
|
value: 'bare',
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
const openObserve = openObserveSink()
|
||||||
|
|
||||||
|
const sinks: Record<string, Sink> = { console: consoleSink }
|
||||||
|
if (openObserve) sinks.openObserve = openObserve
|
||||||
|
|
||||||
|
await configure({
|
||||||
|
sinks,
|
||||||
|
contextLocalStorage: new AsyncLocalStorage(),
|
||||||
|
loggers: [
|
||||||
|
{
|
||||||
|
category: ['superlist'],
|
||||||
|
sinks: Object.keys(sinks),
|
||||||
|
lowestLevel: resolveLevel(process.env.LOG_LEVEL),
|
||||||
|
},
|
||||||
|
{ category: ['logtape', 'meta'], sinks: ['console'], lowestLevel: 'warning' },
|
||||||
|
],
|
||||||
|
})
|
||||||
|
|
||||||
|
if (openObserve) {
|
||||||
|
logger.info('shipping logs to OpenObserve at {url}', { url: process.env.OPENOBSERVE_URL })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -24,17 +24,18 @@ function getClient(): Resend | null {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends an email through Resend. Without `RESEND_API_KEY` (local development)
|
* Sends an email through Resend. Without `RESEND_API_KEY` (local development)
|
||||||
* it logs the message with Pino instead of sending it, so invitation links are
|
* it logs the message instead of sending it, so invitation links are
|
||||||
* still discoverable in the terminal.
|
* still discoverable in the terminal.
|
||||||
*/
|
*/
|
||||||
export async function sendEmail(email: Email): Promise<void> {
|
export async function sendEmail(email: Email): Promise<void> {
|
||||||
const resend = getClient()
|
const resend = getClient()
|
||||||
|
|
||||||
if (!resend) {
|
if (!resend) {
|
||||||
logger.info(
|
logger.info('email not sent (RESEND_API_KEY is not set) — logging payload instead', {
|
||||||
{ to: email.to, subject: email.subject, text: email.text },
|
to: email.to,
|
||||||
'email not sent (RESEND_API_KEY is not set) — logging payload instead',
|
subject: email.subject,
|
||||||
)
|
text: email.text,
|
||||||
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
92
apps/api/src/lib/metrics.ts
Normal file
92
apps/api/src/lib/metrics.ts
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
import { type Histogram, metrics, type UpDownCounter } from '@opentelemetry/api'
|
||||||
|
import { OTLPMetricExporter } from '@opentelemetry/exporter-metrics-otlp-http'
|
||||||
|
import { resourceFromAttributes } from '@opentelemetry/resources'
|
||||||
|
import {
|
||||||
|
AggregationTemporality,
|
||||||
|
AggregationType,
|
||||||
|
MeterProvider,
|
||||||
|
PeriodicExportingMetricReader,
|
||||||
|
} from '@opentelemetry/sdk-metrics'
|
||||||
|
|
||||||
|
import { getOpenObserveConfig, SERVICE_NAME } from '@/lib/openobserve'
|
||||||
|
|
||||||
|
const DEFAULT_EXPORT_INTERVAL_MS = 15_000
|
||||||
|
|
||||||
|
/** Bucket bounds (seconds) of the request duration histogram: 5 ms … 10 s. */
|
||||||
|
const DURATION_BUCKETS = [0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10]
|
||||||
|
|
||||||
|
let provider: MeterProvider | null = null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Starts exporting metrics to OpenObserve (`/api/<org>/v1/metrics`) every
|
||||||
|
* `METRICS_EXPORT_INTERVAL_MS` (15 s by default). Without `OPENOBSERVE_URL` the
|
||||||
|
* global meter stays a no-op, so instruments cost nothing in tests or locally.
|
||||||
|
*/
|
||||||
|
export function configureMetrics(): boolean {
|
||||||
|
const config = getOpenObserveConfig()
|
||||||
|
if (!config) return false
|
||||||
|
|
||||||
|
const exporter = new OTLPMetricExporter({
|
||||||
|
url: `${config.otlpBaseUrl}/v1/metrics`,
|
||||||
|
headers: { Authorization: config.authorization },
|
||||||
|
// Cumulative is what OpenObserve's PromQL (rate, histogram_quantile) expects.
|
||||||
|
temporalityPreference: AggregationTemporality.CUMULATIVE,
|
||||||
|
})
|
||||||
|
|
||||||
|
provider = new MeterProvider({
|
||||||
|
resource: resourceFromAttributes({ 'service.name': SERVICE_NAME }),
|
||||||
|
views: [
|
||||||
|
{
|
||||||
|
instrumentName: 'http.server.request.duration',
|
||||||
|
aggregation: {
|
||||||
|
type: AggregationType.EXPLICIT_BUCKET_HISTOGRAM,
|
||||||
|
options: { boundaries: DURATION_BUCKETS },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
readers: [
|
||||||
|
new PeriodicExportingMetricReader({
|
||||||
|
exporter,
|
||||||
|
exportIntervalMillis:
|
||||||
|
Number(process.env.METRICS_EXPORT_INTERVAL_MS) || DEFAULT_EXPORT_INTERVAL_MS,
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
})
|
||||||
|
metrics.setGlobalMeterProvider(provider)
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Flushes the last batch and stops the exporter (call on shutdown). */
|
||||||
|
export async function shutdownMetrics(): Promise<void> {
|
||||||
|
await provider?.shutdown()
|
||||||
|
}
|
||||||
|
|
||||||
|
type HttpInstruments = {
|
||||||
|
duration: Histogram
|
||||||
|
activeRequests: UpDownCounter
|
||||||
|
}
|
||||||
|
|
||||||
|
let http: HttpInstruments | null = null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* HTTP server instruments, following the OpenTelemetry semantic conventions.
|
||||||
|
* Created lazily so they bind to the provider set by `configureMetrics()`.
|
||||||
|
*/
|
||||||
|
export function httpMetrics(): HttpInstruments {
|
||||||
|
if (!http) {
|
||||||
|
const meter = metrics.getMeter(SERVICE_NAME)
|
||||||
|
http = {
|
||||||
|
duration: meter.createHistogram('http.server.request.duration', {
|
||||||
|
description: 'Duration of HTTP server requests.',
|
||||||
|
unit: 's',
|
||||||
|
}),
|
||||||
|
activeRequests: meter.createUpDownCounter('http.server.active_requests', {
|
||||||
|
description: 'Number of HTTP server requests in flight.',
|
||||||
|
unit: '{request}',
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return http
|
||||||
|
}
|
||||||
30
apps/api/src/lib/openobserve.ts
Normal file
30
apps/api/src/lib/openobserve.ts
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
/** Service name reported to OpenObserve for logs and metrics. */
|
||||||
|
export const SERVICE_NAME = 'superlist-api'
|
||||||
|
|
||||||
|
export type OpenObserveConfig = {
|
||||||
|
/** Base of the OTLP/HTTP endpoints: `<OPENOBSERVE_URL>/api/<org>` (append `/v1/logs`, `/v1/metrics`). */
|
||||||
|
otlpBaseUrl: string
|
||||||
|
/** Basic auth (user email + password) for every OTLP request. */
|
||||||
|
authorization: string
|
||||||
|
/** Stream that receives the logs (`stream-name` header); metrics get one stream per metric. */
|
||||||
|
logStream: string
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reads the OpenObserve settings from the environment, or `null` when
|
||||||
|
* `OPENOBSERVE_URL` is not set (logs and metrics then stay local).
|
||||||
|
*/
|
||||||
|
export function getOpenObserveConfig(): OpenObserveConfig | null {
|
||||||
|
const baseUrl = process.env.OPENOBSERVE_URL?.trim().replace(/\/+$/, '')
|
||||||
|
if (!baseUrl) return null
|
||||||
|
|
||||||
|
const org = process.env.OPENOBSERVE_ORG || 'default'
|
||||||
|
const user = process.env.OPENOBSERVE_USER ?? ''
|
||||||
|
const password = process.env.OPENOBSERVE_PASSWORD ?? ''
|
||||||
|
|
||||||
|
return {
|
||||||
|
otlpBaseUrl: `${baseUrl}/api/${org}`,
|
||||||
|
authorization: `Basic ${btoa(`${user}:${password}`)}`,
|
||||||
|
logStream: process.env.OPENOBSERVE_STREAM || 'superlist',
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -25,7 +25,7 @@ export function errorHandler(error: Error, c: Context) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.error({ err: error, path: c.req.path }, 'unhandled error')
|
logger.error('unhandled error on {path}', { error, path: c.req.path })
|
||||||
|
|
||||||
return problemResponse(
|
return problemResponse(
|
||||||
c,
|
c,
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ export class CreateInvitation {
|
|||||||
|
|
||||||
// Best effort: the person already sees the list, so a mail failure is not fatal.
|
// Best effort: the person already sees the list, so a mail failure is not fatal.
|
||||||
await this.mailer(message).catch((error: unknown) => {
|
await this.mailer(message).catch((error: unknown) => {
|
||||||
logger.warn({ err: error, to: email }, 'could not send the invitation email')
|
logger.warn('could not send the invitation email', { error, to: email })
|
||||||
})
|
})
|
||||||
|
|
||||||
return Ok({ status: 'added', email })
|
return Ok({ status: 'added', email })
|
||||||
@@ -148,7 +148,7 @@ export class CreateInvitation {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
// Without the email the invitee cannot know about the list: undo everything.
|
// Without the email the invitee cannot know about the list: undo everything.
|
||||||
await this.db.shoppingListInvitation.delete({ where: { id: invitation.id } })
|
await this.db.shoppingListInvitation.delete({ where: { id: invitation.id } })
|
||||||
logger.error({ err: error, to: email }, 'failed to send the invitation email')
|
logger.error('failed to send the invitation email', { error, to: email })
|
||||||
|
|
||||||
return Failure(
|
return Failure(
|
||||||
problems.unavailable('No pudimos enviar la invitación por correo. Inténtalo de nuevo.'),
|
problems.unavailable('No pudimos enviar la invitación por correo. Inténtalo de nuevo.'),
|
||||||
|
|||||||
@@ -33,12 +33,14 @@ function createDb({
|
|||||||
name: input.data.name,
|
name: input.data.name,
|
||||||
createdAt: new Date('2026-10-15T00:00:00.000Z'),
|
createdAt: new Date('2026-10-15T00:00:00.000Z'),
|
||||||
updatedAt: new Date('2026-10-15T00:00:00.000Z'),
|
updatedAt: new Date('2026-10-15T00:00:00.000Z'),
|
||||||
_count: { members: membershipsOnCreate },
|
_count: { members: membershipsOnCreate, items: 0 },
|
||||||
members: [
|
members: [
|
||||||
{
|
{
|
||||||
id: 'member-1',
|
id: 'member-1',
|
||||||
role: 'owner',
|
role: 'owner',
|
||||||
isPrimary: input.data.members.create.isPrimary,
|
isPrimary: input.data.members.create.isPrimary,
|
||||||
|
isPinned: false,
|
||||||
|
icon: null,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
@@ -65,6 +67,9 @@ describe('CreateShoppingList', () => {
|
|||||||
name: 'Compra semanal',
|
name: 'Compra semanal',
|
||||||
role: 'owner',
|
role: 'owner',
|
||||||
isPrimary: true,
|
isPrimary: true,
|
||||||
|
isPinned: false,
|
||||||
|
icon: null,
|
||||||
|
pendingCount: 0,
|
||||||
memberCount: 1,
|
memberCount: 1,
|
||||||
createdAt: '2026-10-15T00:00:00.000Z',
|
createdAt: '2026-10-15T00:00:00.000Z',
|
||||||
updatedAt: '2026-10-15T00:00:00.000Z',
|
updatedAt: '2026-10-15T00:00:00.000Z',
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { Ok, type ProblemDetails, type Result, type ShoppingListSummary } from '
|
|||||||
|
|
||||||
import type { Database } from '@/lib/prisma'
|
import type { Database } from '@/lib/prisma'
|
||||||
|
|
||||||
import { toSummary } from '../serialize'
|
import { summaryCountInclude, toSummary } from '../serialize'
|
||||||
|
|
||||||
/** Creates a shopping list owned by the user. The first list becomes primary. */
|
/** Creates a shopping list owned by the user. The first list becomes primary. */
|
||||||
export class CreateShoppingList {
|
export class CreateShoppingList {
|
||||||
@@ -29,7 +29,7 @@ export class CreateShoppingList {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
include: {
|
include: {
|
||||||
_count: { select: { members: true } },
|
...summaryCountInclude,
|
||||||
members: { where: { userId: input.userId } },
|
members: { where: { userId: input.userId } },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -44,6 +44,8 @@ export class CreateShoppingList {
|
|||||||
toSummary({
|
toSummary({
|
||||||
role: membership.role,
|
role: membership.role,
|
||||||
isPrimary: membership.isPrimary,
|
isPrimary: membership.isPrimary,
|
||||||
|
isPinned: membership.isPinned,
|
||||||
|
icon: membership.icon,
|
||||||
list: {
|
list: {
|
||||||
id: list.id,
|
id: list.id,
|
||||||
name: list.name,
|
name: list.name,
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { listEventsRoute } from './events/route'
|
|||||||
import { getListRoute } from './get/route'
|
import { getListRoute } from './get/route'
|
||||||
import { listItemsModule } from './items'
|
import { listItemsModule } from './items'
|
||||||
import { listListsRoute } from './list/route'
|
import { listListsRoute } from './list/route'
|
||||||
|
import { updateListPreferencesRoute } from './preferences/route'
|
||||||
import { setPrimaryListRoute } from './set-primary/route'
|
import { setPrimaryListRoute } from './set-primary/route'
|
||||||
import { updateListRoute } from './update/route'
|
import { updateListRoute } from './update/route'
|
||||||
|
|
||||||
@@ -17,5 +18,6 @@ export const listsModule = new Hono<AppEnv>()
|
|||||||
.route('/', getListRoute)
|
.route('/', getListRoute)
|
||||||
.route('/', updateListRoute)
|
.route('/', updateListRoute)
|
||||||
.route('/', setPrimaryListRoute)
|
.route('/', setPrimaryListRoute)
|
||||||
|
.route('/', updateListPreferencesRoute)
|
||||||
.route('/:listId/items', listItemsModule)
|
.route('/:listId/items', listItemsModule)
|
||||||
.route('/:listId/events', listEventsRoute)
|
.route('/:listId/events', listEventsRoute)
|
||||||
|
|||||||
60
apps/api/src/modules/lists/list/use-case.test.ts
Normal file
60
apps/api/src/modules/lists/list/use-case.test.ts
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
import { describe, expect, it } from 'bun:test'
|
||||||
|
|
||||||
|
import type { Database } from '@/lib/prisma'
|
||||||
|
|
||||||
|
import { ListShoppingLists } from './use-case'
|
||||||
|
|
||||||
|
describe('ListShoppingLists', () => {
|
||||||
|
it('returns the pending count and the user preferences of each list', async () => {
|
||||||
|
const queries: unknown[] = []
|
||||||
|
const db = {
|
||||||
|
shoppingListMember: {
|
||||||
|
findMany: async (args: unknown) => {
|
||||||
|
queries.push(args)
|
||||||
|
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
role: 'owner',
|
||||||
|
isPrimary: false,
|
||||||
|
isPinned: true,
|
||||||
|
icon: 'unknown-icon',
|
||||||
|
list: {
|
||||||
|
id: 'list-1',
|
||||||
|
name: 'Verdulería',
|
||||||
|
createdAt: new Date('2026-11-01T00:00:00.000Z'),
|
||||||
|
updatedAt: new Date('2026-11-02T00:00:00.000Z'),
|
||||||
|
_count: { members: 1, items: 4 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = await new ListShoppingLists(db as unknown as Database).execute({
|
||||||
|
userId: 'user-1',
|
||||||
|
})
|
||||||
|
|
||||||
|
expect(result.ok).toBe(true)
|
||||||
|
if (!result.ok) throw new Error('expected the use case to succeed')
|
||||||
|
expect(result.value).toEqual([
|
||||||
|
{
|
||||||
|
id: 'list-1',
|
||||||
|
name: 'Verdulería',
|
||||||
|
role: 'owner',
|
||||||
|
isPrimary: false,
|
||||||
|
isPinned: true,
|
||||||
|
icon: null,
|
||||||
|
pendingCount: 4,
|
||||||
|
memberCount: 1,
|
||||||
|
createdAt: '2026-11-01T00:00:00.000Z',
|
||||||
|
updatedAt: '2026-11-02T00:00:00.000Z',
|
||||||
|
},
|
||||||
|
])
|
||||||
|
expect(queries[0]).toMatchObject({
|
||||||
|
include: {
|
||||||
|
list: { include: { _count: { select: { items: { where: { completed: false } } } } } },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
@@ -2,27 +2,27 @@ import { Ok, type ProblemDetails, type Result, type ShoppingListSummary } from '
|
|||||||
|
|
||||||
import type { Database } from '@/lib/prisma'
|
import type { Database } from '@/lib/prisma'
|
||||||
|
|
||||||
/** Lists every shopping list the user belongs to (owned or shared). */
|
import { summaryCountInclude, toSummary } from '../serialize'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lists every shopping list the user belongs to (owned or shared): the primary
|
||||||
|
* one first, then the pinned ones in pin order, then the rest, newest first.
|
||||||
|
*/
|
||||||
export class ListShoppingLists {
|
export class ListShoppingLists {
|
||||||
constructor(private readonly db: Database) {}
|
constructor(private readonly db: Database) {}
|
||||||
|
|
||||||
async execute(input: { userId: string }): Promise<Result<ShoppingListSummary[], ProblemDetails>> {
|
async execute(input: { userId: string }): Promise<Result<ShoppingListSummary[], ProblemDetails>> {
|
||||||
const memberships = await this.db.shoppingListMember.findMany({
|
const memberships = await this.db.shoppingListMember.findMany({
|
||||||
where: { userId: input.userId },
|
where: { userId: input.userId },
|
||||||
include: { list: { include: { _count: { select: { members: true } } } } },
|
include: { list: { include: summaryCountInclude } },
|
||||||
orderBy: [{ isPrimary: 'desc' }, { list: { createdAt: 'desc' } }],
|
orderBy: [
|
||||||
|
{ isPrimary: 'desc' },
|
||||||
|
{ isPinned: 'desc' },
|
||||||
|
{ pinnedOrder: { sort: 'asc', nulls: 'last' } },
|
||||||
|
{ list: { createdAt: 'desc' } },
|
||||||
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
const lists = memberships.map((membership) => ({
|
return Ok(memberships.map(toSummary))
|
||||||
id: membership.list.id,
|
|
||||||
name: membership.list.name,
|
|
||||||
role: membership.role,
|
|
||||||
isPrimary: membership.isPrimary,
|
|
||||||
memberCount: membership.list._count.members,
|
|
||||||
createdAt: membership.list.createdAt.toISOString(),
|
|
||||||
updatedAt: membership.list.updatedAt.toISOString(),
|
|
||||||
}))
|
|
||||||
|
|
||||||
return Ok(lists)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
30
apps/api/src/modules/lists/preferences/route.ts
Normal file
30
apps/api/src/modules/lists/preferences/route.ts
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
import { Hono } from 'hono'
|
||||||
|
|
||||||
|
import { requireSession } from '@/lib/auth-session'
|
||||||
|
import { prisma } from '@/lib/prisma'
|
||||||
|
import { resultJson } from '@/lib/result-json'
|
||||||
|
import { validate } from '@/lib/validate'
|
||||||
|
import type { AppEnv } from '@/types'
|
||||||
|
|
||||||
|
import { ListParamsSchema } from '../schema'
|
||||||
|
import { UpdateListPreferencesSchema } from './schema'
|
||||||
|
import { UpdateListPreferences } from './use-case'
|
||||||
|
|
||||||
|
/** PATCH /lists/:listId/preferences — pins the list or changes its icon (per user). */
|
||||||
|
export const updateListPreferencesRoute = new Hono<AppEnv>().patch(
|
||||||
|
'/:listId/preferences',
|
||||||
|
requireSession,
|
||||||
|
validate.param(ListParamsSchema),
|
||||||
|
validate.json(UpdateListPreferencesSchema),
|
||||||
|
async (c) => {
|
||||||
|
const { listId } = c.req.valid('param')
|
||||||
|
const body = c.req.valid('json')
|
||||||
|
const result = await new UpdateListPreferences(prisma).execute({
|
||||||
|
listId,
|
||||||
|
userId: c.get('user').id,
|
||||||
|
...body,
|
||||||
|
})
|
||||||
|
|
||||||
|
return resultJson(c, result)
|
||||||
|
},
|
||||||
|
)
|
||||||
14
apps/api/src/modules/lists/preferences/schema.ts
Normal file
14
apps/api/src/modules/lists/preferences/schema.ts
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import { ListIconSchema } from '@superlist/shared'
|
||||||
|
import { z } from 'zod'
|
||||||
|
|
||||||
|
/** Body of `PATCH /lists/:listId/preferences`: the user's own settings for the list. */
|
||||||
|
export const UpdateListPreferencesSchema = z
|
||||||
|
.object({
|
||||||
|
isPinned: z.boolean().optional(),
|
||||||
|
icon: ListIconSchema.nullable().optional(),
|
||||||
|
})
|
||||||
|
.refine((body) => body.isPinned !== undefined || body.icon !== undefined, {
|
||||||
|
message: 'Indica al menos una preferencia para actualizar',
|
||||||
|
})
|
||||||
|
|
||||||
|
export type UpdateListPreferencesInput = z.infer<typeof UpdateListPreferencesSchema>
|
||||||
147
apps/api/src/modules/lists/preferences/use-case.test.ts
Normal file
147
apps/api/src/modules/lists/preferences/use-case.test.ts
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
import { describe, expect, it } from 'bun:test'
|
||||||
|
|
||||||
|
import type { Database } from '@/lib/prisma'
|
||||||
|
|
||||||
|
import { UpdateListPreferences } from './use-case'
|
||||||
|
|
||||||
|
type Membership = {
|
||||||
|
role: 'owner' | 'collaborator'
|
||||||
|
isPrimary: boolean
|
||||||
|
isPinned: boolean
|
||||||
|
icon: string | null
|
||||||
|
}
|
||||||
|
|
||||||
|
function createDb({
|
||||||
|
membership,
|
||||||
|
pinnedCount = 0,
|
||||||
|
maxPinnedOrder = null,
|
||||||
|
}: {
|
||||||
|
membership: Membership | null
|
||||||
|
pinnedCount?: number
|
||||||
|
maxPinnedOrder?: number | null
|
||||||
|
}) {
|
||||||
|
const updates: Array<{ data: Record<string, unknown> }> = []
|
||||||
|
|
||||||
|
const tx = {
|
||||||
|
shoppingListMember: {
|
||||||
|
findUnique: async () => membership,
|
||||||
|
aggregate: async () => ({
|
||||||
|
_count: { _all: pinnedCount },
|
||||||
|
_max: { pinnedOrder: maxPinnedOrder },
|
||||||
|
}),
|
||||||
|
update: async (args: { data: Record<string, unknown> }) => {
|
||||||
|
updates.push(args)
|
||||||
|
|
||||||
|
return {
|
||||||
|
...membership,
|
||||||
|
...args.data,
|
||||||
|
list: {
|
||||||
|
id: 'list-1',
|
||||||
|
name: 'Casa de fin de semana',
|
||||||
|
createdAt: new Date('2026-11-01T00:00:00.000Z'),
|
||||||
|
updatedAt: new Date('2026-11-01T00:00:00.000Z'),
|
||||||
|
_count: { members: 2, items: 3 },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
const db = { $transaction: async (fn: (client: typeof tx) => unknown) => fn(tx) }
|
||||||
|
|
||||||
|
return { db: db as unknown as Database, updates }
|
||||||
|
}
|
||||||
|
|
||||||
|
const collaborator: Membership = {
|
||||||
|
role: 'collaborator',
|
||||||
|
isPrimary: false,
|
||||||
|
isPinned: false,
|
||||||
|
icon: null,
|
||||||
|
}
|
||||||
|
|
||||||
|
describe('UpdateListPreferences', () => {
|
||||||
|
it('answers 404 when the user does not belong to the list', async () => {
|
||||||
|
const { db, updates } = createDb({ membership: null })
|
||||||
|
const result = await new UpdateListPreferences(db).execute({
|
||||||
|
listId: 'list-1',
|
||||||
|
userId: 'user-1',
|
||||||
|
isPinned: true,
|
||||||
|
})
|
||||||
|
|
||||||
|
expect(result.ok).toBe(false)
|
||||||
|
if (result.ok) throw new Error('expected the use case to fail')
|
||||||
|
expect(result.error.status).toBe(404)
|
||||||
|
expect(updates).toHaveLength(0)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('pins the list after the last pinned one and returns its pending count', async () => {
|
||||||
|
const { db, updates } = createDb({
|
||||||
|
membership: collaborator,
|
||||||
|
pinnedCount: 2,
|
||||||
|
maxPinnedOrder: 5,
|
||||||
|
})
|
||||||
|
const result = await new UpdateListPreferences(db).execute({
|
||||||
|
listId: 'list-1',
|
||||||
|
userId: 'user-1',
|
||||||
|
isPinned: true,
|
||||||
|
icon: 'park',
|
||||||
|
})
|
||||||
|
|
||||||
|
expect(result.ok).toBe(true)
|
||||||
|
if (!result.ok) throw new Error('expected the use case to succeed')
|
||||||
|
expect(updates[0]?.data).toEqual({ isPinned: true, pinnedOrder: 6, icon: 'park' })
|
||||||
|
expect(result.value).toMatchObject({
|
||||||
|
isPinned: true,
|
||||||
|
icon: 'park',
|
||||||
|
pendingCount: 3,
|
||||||
|
memberCount: 2,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it('refuses to pin more than four lists', async () => {
|
||||||
|
const { db, updates } = createDb({
|
||||||
|
membership: collaborator,
|
||||||
|
pinnedCount: 4,
|
||||||
|
maxPinnedOrder: 4,
|
||||||
|
})
|
||||||
|
const result = await new UpdateListPreferences(db).execute({
|
||||||
|
listId: 'list-1',
|
||||||
|
userId: 'user-1',
|
||||||
|
isPinned: true,
|
||||||
|
})
|
||||||
|
|
||||||
|
expect(result.ok).toBe(false)
|
||||||
|
if (result.ok) throw new Error('expected the use case to fail')
|
||||||
|
expect(result.error.status).toBe(409)
|
||||||
|
expect(updates).toHaveLength(0)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('unpins the list and clears its position', async () => {
|
||||||
|
const { db, updates } = createDb({ membership: { ...collaborator, isPinned: true } })
|
||||||
|
const result = await new UpdateListPreferences(db).execute({
|
||||||
|
listId: 'list-1',
|
||||||
|
userId: 'user-1',
|
||||||
|
isPinned: false,
|
||||||
|
})
|
||||||
|
|
||||||
|
expect(result.ok).toBe(true)
|
||||||
|
expect(updates[0]?.data).toEqual({ isPinned: false, pinnedOrder: null })
|
||||||
|
})
|
||||||
|
|
||||||
|
it('changes only the icon of an already pinned list', async () => {
|
||||||
|
const { db, updates } = createDb({
|
||||||
|
membership: { ...collaborator, isPinned: true, icon: 'carrot' },
|
||||||
|
})
|
||||||
|
const result = await new UpdateListPreferences(db).execute({
|
||||||
|
listId: 'list-1',
|
||||||
|
userId: 'user-1',
|
||||||
|
isPinned: true,
|
||||||
|
icon: null,
|
||||||
|
})
|
||||||
|
|
||||||
|
expect(result.ok).toBe(true)
|
||||||
|
if (!result.ok) throw new Error('expected the use case to succeed')
|
||||||
|
expect(updates[0]?.data).toEqual({ icon: null })
|
||||||
|
expect(result.value.icon).toBeNull()
|
||||||
|
})
|
||||||
|
})
|
||||||
76
apps/api/src/modules/lists/preferences/use-case.ts
Normal file
76
apps/api/src/modules/lists/preferences/use-case.ts
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
import {
|
||||||
|
Failure,
|
||||||
|
type ListIcon,
|
||||||
|
MAX_PINNED_LISTS,
|
||||||
|
Ok,
|
||||||
|
type ProblemDetails,
|
||||||
|
problems,
|
||||||
|
type Result,
|
||||||
|
type ShoppingListSummary,
|
||||||
|
} from '@superlist/shared'
|
||||||
|
|
||||||
|
import type { Database } from '@/lib/prisma'
|
||||||
|
|
||||||
|
import { summaryCountInclude, toSummary } from '../serialize'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the user's own settings for a list: whether it is pinned to the
|
||||||
|
* always-visible bar and which icon it shows. Any member may do it, because
|
||||||
|
* the settings are per user (like the primary list), not shared with the list.
|
||||||
|
*/
|
||||||
|
export class UpdateListPreferences {
|
||||||
|
constructor(private readonly db: Database) {}
|
||||||
|
|
||||||
|
async execute(input: {
|
||||||
|
listId: string
|
||||||
|
userId: string
|
||||||
|
isPinned?: boolean
|
||||||
|
icon?: ListIcon | null
|
||||||
|
}): Promise<Result<ShoppingListSummary, ProblemDetails>> {
|
||||||
|
const where = { listId_userId: { listId: input.listId, userId: input.userId } }
|
||||||
|
|
||||||
|
return this.db.$transaction(async (tx) => {
|
||||||
|
const membership = await tx.shoppingListMember.findUnique({ where })
|
||||||
|
|
||||||
|
if (!membership) {
|
||||||
|
return Failure(problems.notFound('La lista no existe o no tienes acceso.'))
|
||||||
|
}
|
||||||
|
|
||||||
|
const data: { isPinned?: boolean; pinnedOrder?: number | null; icon?: ListIcon | null } = {}
|
||||||
|
|
||||||
|
if (input.icon !== undefined) data.icon = input.icon
|
||||||
|
|
||||||
|
if (input.isPinned === true && !membership.isPinned) {
|
||||||
|
const pinned = await tx.shoppingListMember.aggregate({
|
||||||
|
where: { userId: input.userId, isPinned: true },
|
||||||
|
_count: { _all: true },
|
||||||
|
_max: { pinnedOrder: true },
|
||||||
|
})
|
||||||
|
|
||||||
|
if (pinned._count._all >= MAX_PINNED_LISTS) {
|
||||||
|
return Failure(
|
||||||
|
problems.conflict(
|
||||||
|
`Puedes fijar hasta ${MAX_PINNED_LISTS} listas. Desfija otra para fijar esta.`,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
data.isPinned = true
|
||||||
|
data.pinnedOrder = (pinned._max.pinnedOrder ?? 0) + 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if (input.isPinned === false && membership.isPinned) {
|
||||||
|
data.isPinned = false
|
||||||
|
data.pinnedOrder = null
|
||||||
|
}
|
||||||
|
|
||||||
|
const updated = await tx.shoppingListMember.update({
|
||||||
|
where,
|
||||||
|
data,
|
||||||
|
include: { list: { include: summaryCountInclude } },
|
||||||
|
})
|
||||||
|
|
||||||
|
return Ok(toSummary(updated))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,17 @@
|
|||||||
import type { ListMember, ShoppingListDetail, ShoppingListSummary } from '@superlist/shared'
|
import {
|
||||||
|
type ListIcon,
|
||||||
|
ListIconSchema,
|
||||||
|
type ListMember,
|
||||||
|
type ShoppingListDetail,
|
||||||
|
type ShoppingListSummary,
|
||||||
|
} from '@superlist/shared'
|
||||||
|
|
||||||
|
/** Reads a stored icon key; unknown keys (e.g. one removed from the set) fall back to none. */
|
||||||
|
export function toListIcon(icon: string | null): ListIcon | null {
|
||||||
|
const parsed = ListIconSchema.safeParse(icon)
|
||||||
|
|
||||||
|
return parsed.success ? parsed.data : null
|
||||||
|
}
|
||||||
|
|
||||||
type ListRow = {
|
type ListRow = {
|
||||||
id: string
|
id: string
|
||||||
@@ -10,16 +23,29 @@ type ListRow = {
|
|||||||
type MemberRow = {
|
type MemberRow = {
|
||||||
role: 'owner' | 'collaborator'
|
role: 'owner' | 'collaborator'
|
||||||
isPrimary: boolean
|
isPrimary: boolean
|
||||||
list: ListRow & { _count: { members: number } }
|
isPinned: boolean
|
||||||
|
icon: string | null
|
||||||
|
list: ListRow & { _count: { members: number; items: number } }
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Maps a membership (with its list and member count) to the summary DTO. */
|
/**
|
||||||
|
* Prisma `include` for a summary: the member count plus the pending items
|
||||||
|
* (`items` counts only the ones not bought yet).
|
||||||
|
*/
|
||||||
|
export const summaryCountInclude = {
|
||||||
|
_count: { select: { members: true, items: { where: { completed: false } } } },
|
||||||
|
} as const
|
||||||
|
|
||||||
|
/** Maps a membership (with its list, member and pending counts) to the summary DTO. */
|
||||||
export function toSummary(member: MemberRow): ShoppingListSummary {
|
export function toSummary(member: MemberRow): ShoppingListSummary {
|
||||||
return {
|
return {
|
||||||
id: member.list.id,
|
id: member.list.id,
|
||||||
name: member.list.name,
|
name: member.list.name,
|
||||||
role: member.role,
|
role: member.role,
|
||||||
isPrimary: member.isPrimary,
|
isPrimary: member.isPrimary,
|
||||||
|
isPinned: member.isPinned,
|
||||||
|
icon: toListIcon(member.icon),
|
||||||
|
pendingCount: member.list._count.items,
|
||||||
memberCount: member.list._count.members,
|
memberCount: member.list._count.members,
|
||||||
createdAt: member.list.createdAt.toISOString(),
|
createdAt: member.list.createdAt.toISOString(),
|
||||||
updatedAt: member.list.updatedAt.toISOString(),
|
updatedAt: member.list.updatedAt.toISOString(),
|
||||||
@@ -29,6 +55,8 @@ export function toSummary(member: MemberRow): ShoppingListSummary {
|
|||||||
type DetailRow = {
|
type DetailRow = {
|
||||||
role: 'owner' | 'collaborator'
|
role: 'owner' | 'collaborator'
|
||||||
isPrimary: boolean
|
isPrimary: boolean
|
||||||
|
isPinned: boolean
|
||||||
|
icon: string | null
|
||||||
list: ListRow & {
|
list: ListRow & {
|
||||||
members: Array<{
|
members: Array<{
|
||||||
id: string
|
id: string
|
||||||
@@ -65,6 +93,8 @@ export function toDetail(member: DetailRow): ShoppingListDetail {
|
|||||||
name: member.list.name,
|
name: member.list.name,
|
||||||
role: member.role,
|
role: member.role,
|
||||||
isPrimary: member.isPrimary,
|
isPrimary: member.isPrimary,
|
||||||
|
isPinned: member.isPinned,
|
||||||
|
icon: toListIcon(member.icon),
|
||||||
members,
|
members,
|
||||||
invitations: member.list.invitations.map((invitation) => ({
|
invitations: member.list.invitations.map((invitation) => ({
|
||||||
id: invitation.id,
|
id: invitation.id,
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import {
|
|||||||
import { type ListEvents, listEvents } from '@/lib/events'
|
import { type ListEvents, listEvents } from '@/lib/events'
|
||||||
import type { Database } from '@/lib/prisma'
|
import type { Database } from '@/lib/prisma'
|
||||||
|
|
||||||
|
import { summaryCountInclude, toSummary } from '../serialize'
|
||||||
|
|
||||||
/** Renames a list. Only the owner (`role: owner`) may do it. */
|
/** Renames a list. Only the owner (`role: owner`) may do it. */
|
||||||
export class UpdateShoppingList {
|
export class UpdateShoppingList {
|
||||||
constructor(
|
constructor(
|
||||||
@@ -37,19 +39,11 @@ export class UpdateShoppingList {
|
|||||||
const list = await this.db.shoppingList.update({
|
const list = await this.db.shoppingList.update({
|
||||||
where: { id: input.listId },
|
where: { id: input.listId },
|
||||||
data: { name: input.name },
|
data: { name: input.name },
|
||||||
include: { _count: { select: { members: true } } },
|
include: summaryCountInclude,
|
||||||
})
|
})
|
||||||
|
|
||||||
this.events.publish({ type: 'list.updated', listId: list.id, name: list.name })
|
this.events.publish({ type: 'list.updated', listId: list.id, name: list.name })
|
||||||
|
|
||||||
return Ok({
|
return Ok(toSummary({ ...membership, list }))
|
||||||
id: list.id,
|
|
||||||
name: list.name,
|
|
||||||
role: membership.role,
|
|
||||||
isPrimary: membership.isPrimary,
|
|
||||||
memberCount: list._count.members,
|
|
||||||
createdAt: list.createdAt.toISOString(),
|
|
||||||
updatedAt: list.updatedAt.toISOString(),
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,10 @@ export class SplitVoiceText {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fallback(text: string, reason: string): Result<VoiceSplitResponse, ProblemDetails> {
|
private fallback(text: string, reason: string): Result<VoiceSplitResponse, ProblemDetails> {
|
||||||
this.logger.warn({ reason, textLength: text.length }, 'voice split: using the fallback split')
|
this.logger.warn('voice split: using the fallback split ({reason})', {
|
||||||
|
reason,
|
||||||
|
textLength: text.length,
|
||||||
|
})
|
||||||
|
|
||||||
return Ok({ items: fallbackSplit(text) })
|
return Ok({ items: fallbackSplit(text) })
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export function InstallPrompt() {
|
|||||||
if (!visible) return null
|
if (!visible) return null
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="fixed inset-x-0 bottom-0 z-40 px-3 pb-[calc(4.75rem+env(safe-area-inset-bottom))] md:left-auto md:right-4 md:max-w-md md:px-4 md:pb-4">
|
<div className="fixed inset-x-0 bottom-0 z-40 px-3 pb-[calc(var(--bottom-nav-height,4.5rem)+0.25rem+env(safe-area-inset-bottom))] md:left-auto md:right-4 md:max-w-md md:px-4 md:pb-4">
|
||||||
<div className="bg-card shadow-lg border rounded-xl p-3 flex items-center gap-3 w-full">
|
<div className="bg-card shadow-lg border rounded-xl p-3 flex items-center gap-3 w-full">
|
||||||
<div className="bg-primary/10 text-primary rounded-lg p-2">
|
<div className="bg-primary/10 text-primary rounded-lg p-2">
|
||||||
{needsManualInstructions ? (
|
{needsManualInstructions ? (
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export function DictateFab({ listId }: DictateFabProps) {
|
|||||||
aria-label="Dictar ítems"
|
aria-label="Dictar ítems"
|
||||||
aria-haspopup="dialog"
|
aria-haspopup="dialog"
|
||||||
aria-expanded={open}
|
aria-expanded={open}
|
||||||
className="fixed right-4 bottom-[calc(4.5rem+env(safe-area-inset-bottom)+0.75rem)] z-40 size-14 rounded-full shadow-lg md:right-6 md:bottom-6"
|
className="fixed right-4 bottom-[calc(var(--bottom-nav-height,4.5rem)+env(safe-area-inset-bottom)+0.75rem)] z-40 size-14 rounded-full shadow-lg md:right-6 md:bottom-6"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setOpen(true)
|
setOpen(true)
|
||||||
// Called right in the click, before any state update, so the browser still
|
// Called right in the click, before any state update, so the browser still
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { AppLogo } from '@/components/app-logo'
|
|||||||
import { focusNewItemInput } from '@/components/items/create-item-form'
|
import { focusNewItemInput } from '@/components/items/create-item-form'
|
||||||
import { isNavItemActive, NAV_ITEMS } from '@/components/layout/nav-items'
|
import { isNavItemActive, NAV_ITEMS } from '@/components/layout/nav-items'
|
||||||
import { NavUser } from '@/components/layout/nav-user'
|
import { NavUser } from '@/components/layout/nav-user'
|
||||||
|
import { PinnedListsSidebarGroup } from '@/components/layout/pinned-lists'
|
||||||
import {
|
import {
|
||||||
Sidebar,
|
Sidebar,
|
||||||
SidebarContent,
|
SidebarContent,
|
||||||
@@ -60,6 +61,7 @@ export function AppSidebar() {
|
|||||||
))}
|
))}
|
||||||
</SidebarMenu>
|
</SidebarMenu>
|
||||||
</SidebarGroup>
|
</SidebarGroup>
|
||||||
|
<PinnedListsSidebarGroup />
|
||||||
</SidebarContent>
|
</SidebarContent>
|
||||||
|
|
||||||
<SidebarFooter>
|
<SidebarFooter>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { Link, useRouterState } from '@tanstack/react-router'
|
|||||||
|
|
||||||
import { focusNewItemInput } from '@/components/items/create-item-form'
|
import { focusNewItemInput } from '@/components/items/create-item-form'
|
||||||
import { isNavItemActive, NAV_ITEMS } from '@/components/layout/nav-items'
|
import { isNavItemActive, NAV_ITEMS } from '@/components/layout/nav-items'
|
||||||
|
import { PinnedListsBar } from '@/components/layout/pinned-lists'
|
||||||
import { cn } from '@/lib/utils'
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
export function BottomNav() {
|
export function BottomNav() {
|
||||||
@@ -9,6 +10,7 @@ export function BottomNav() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<footer className="fixed inset-x-0 bottom-0 z-30 border-t bg-background/95 supports-[backdrop-filter]:bg-background/60 backdrop-blur md:hidden pb-[env(safe-area-inset-bottom)]">
|
<footer className="fixed inset-x-0 bottom-0 z-30 border-t bg-background/95 supports-[backdrop-filter]:bg-background/60 backdrop-blur md:hidden pb-[env(safe-area-inset-bottom)]">
|
||||||
|
<PinnedListsBar />
|
||||||
<nav className="mx-auto flex h-18 max-w-lg items-center justify-around px-2">
|
<nav className="mx-auto flex h-18 max-w-lg items-center justify-around px-2">
|
||||||
{NAV_ITEMS.map((item) => {
|
{NAV_ITEMS.map((item) => {
|
||||||
const active = isNavItemActive(pathname, item.to)
|
const active = isNavItemActive(pathname, item.to)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { useQuery } from '@tanstack/react-query'
|
|||||||
import { Link } from '@tanstack/react-router'
|
import { Link } from '@tanstack/react-router'
|
||||||
import { CheckIcon, ChevronDownIcon, ListIcon, StarIcon } from 'lucide-react'
|
import { CheckIcon, ChevronDownIcon, ListIcon, StarIcon } from 'lucide-react'
|
||||||
|
|
||||||
|
import { ListGlyph } from '@/components/lists/list-glyph'
|
||||||
import {
|
import {
|
||||||
DropdownMenu,
|
DropdownMenu,
|
||||||
DropdownMenuContent,
|
DropdownMenuContent,
|
||||||
@@ -27,12 +28,14 @@ type ListSwitcherProps = {
|
|||||||
*/
|
*/
|
||||||
export function ListSwitcher({ list }: ListSwitcherProps) {
|
export function ListSwitcher({ list }: ListSwitcherProps) {
|
||||||
const { data: lists } = useLists()
|
const { data: lists } = useLists()
|
||||||
|
const icon = lists?.find((option) => option.id === list.id)?.icon
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex min-w-0 flex-col">
|
<div className="flex min-w-0 flex-col">
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<h1 className="flex min-w-0">
|
<h1 className="flex min-w-0">
|
||||||
<DropdownMenuTrigger className="focus-visible:ring-ring/50 -ml-1 flex min-h-11 min-w-0 items-center gap-1 rounded-lg px-1 text-left text-xl leading-tight font-bold outline-none focus-visible:ring-3">
|
<DropdownMenuTrigger className="focus-visible:ring-ring/50 -ml-1 flex min-h-11 min-w-0 items-center gap-1 rounded-lg px-1 text-left text-xl leading-tight font-bold outline-none focus-visible:ring-3">
|
||||||
|
{icon && <ListGlyph list={{ name: list.name, icon }} className="mr-1" />}
|
||||||
<span className="truncate">{list.name}</span>
|
<span className="truncate">{list.name}</span>
|
||||||
<ChevronDownIcon className="size-5 shrink-0" aria-hidden />
|
<ChevronDownIcon className="size-5 shrink-0" aria-hidden />
|
||||||
<span className="sr-only">: cambiar de lista</span>
|
<span className="sr-only">: cambiar de lista</span>
|
||||||
@@ -70,6 +73,7 @@ export function ListSwitcher({ list }: ListSwitcherProps) {
|
|||||||
function ListOption({ list, current }: { list: ShoppingListSummary; current: boolean }) {
|
function ListOption({ list, current }: { list: ShoppingListSummary; current: boolean }) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<ListGlyph list={list} className="text-muted-foreground size-4" />
|
||||||
<span className="min-w-0 flex-1 truncate">{list.name}</span>
|
<span className="min-w-0 flex-1 truncate">{list.name}</span>
|
||||||
{list.isPrimary && <StarIcon aria-label="Principal" className="text-muted-foreground" />}
|
{list.isPrimary && <StarIcon aria-label="Principal" className="text-muted-foreground" />}
|
||||||
{current && <CheckIcon aria-label="Lista actual" className="text-primary" />}
|
{current && <CheckIcon aria-label="Lista actual" className="text-primary" />}
|
||||||
|
|||||||
183
apps/web/src/components/layout/pinned-lists.tsx
Normal file
183
apps/web/src/components/layout/pinned-lists.tsx
Normal file
@@ -0,0 +1,183 @@
|
|||||||
|
import type { ShoppingListSummary } from '@superlist/shared'
|
||||||
|
import { Link, useRouterState } from '@tanstack/react-router'
|
||||||
|
import { CheckIcon } from 'lucide-react'
|
||||||
|
import type { ComponentProps } from 'react'
|
||||||
|
|
||||||
|
import { ListGlyph } from '@/components/lists/list-glyph'
|
||||||
|
import {
|
||||||
|
SidebarGroup,
|
||||||
|
SidebarGroupLabel,
|
||||||
|
SidebarMenu,
|
||||||
|
SidebarMenuBadge,
|
||||||
|
SidebarMenuButton,
|
||||||
|
SidebarMenuItem,
|
||||||
|
} from '@/components/ui/sidebar'
|
||||||
|
import { pickPrimaryList, useLists, usePinnedLists } from '@/hooks/use-lists'
|
||||||
|
import { usePendingCount } from '@/hooks/use-pending-count'
|
||||||
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
|
/** The list the current page shows: the primary one on `/`, the one in the URL under `/lists/:id`. */
|
||||||
|
function useCurrentListId(): string | undefined {
|
||||||
|
const pathname = useRouterState({ select: (state) => state.location.pathname })
|
||||||
|
const { data: lists } = useLists()
|
||||||
|
|
||||||
|
if (pathname === '/') return lists ? pickPrimaryList(lists)?.id : undefined
|
||||||
|
|
||||||
|
return /^\/lists\/([^/]+)/.exec(pathname)?.[1]
|
||||||
|
}
|
||||||
|
|
||||||
|
function pendingLabel(list: ShoppingListSummary, count: number) {
|
||||||
|
return `${list.name}: ${count === 0 ? 'nada pendiente' : `${count} ${count === 1 ? 'pendiente' : 'pendientes'}`}`
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Opens a list where the app expects it: the primary one on the home page, the rest on their own page. */
|
||||||
|
function PinnedListLink({
|
||||||
|
list,
|
||||||
|
className,
|
||||||
|
children,
|
||||||
|
...props
|
||||||
|
}: ComponentProps<'a'> & { list: ShoppingListSummary }) {
|
||||||
|
return list.isPrimary ? (
|
||||||
|
<Link to="/" className={className} {...props}>
|
||||||
|
{children}
|
||||||
|
</Link>
|
||||||
|
) : (
|
||||||
|
<Link to="/lists/$listId" params={{ listId: list.id }} className={className} {...props}>
|
||||||
|
{children}
|
||||||
|
</Link>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mobile: the pinned lists as chips above the bottom navigation, each with its
|
||||||
|
* icon and the number of items still to buy, so the other lists stay in sight
|
||||||
|
* while shopping from one. Renders nothing when no list is pinned.
|
||||||
|
*
|
||||||
|
* It is exactly 4.5rem tall (as the navigation itself), which is what the
|
||||||
|
* authenticated layout adds to `--bottom-nav-height` while lists are pinned.
|
||||||
|
*/
|
||||||
|
export function PinnedListsBar() {
|
||||||
|
const pinned = usePinnedLists()
|
||||||
|
const currentListId = useCurrentListId()
|
||||||
|
|
||||||
|
if (pinned.length === 0) return null
|
||||||
|
|
||||||
|
return (
|
||||||
|
<nav aria-label="Listas fijadas" className="mx-auto max-w-lg px-3 pt-2.5">
|
||||||
|
<ul className="bg-muted/60 flex gap-1 rounded-2xl border p-1">
|
||||||
|
{pinned.map((list) => (
|
||||||
|
<li key={list.id} className="min-w-0 flex-1">
|
||||||
|
<PinnedChip list={list} current={list.id === currentListId} />
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function PinnedChip({ list, current }: { list: ShoppingListSummary; current: boolean }) {
|
||||||
|
const count = usePendingCount(list)
|
||||||
|
|
||||||
|
return (
|
||||||
|
<PinnedListLink
|
||||||
|
list={list}
|
||||||
|
aria-current={current ? 'page' : undefined}
|
||||||
|
aria-label={pendingLabel(list, count)}
|
||||||
|
className={cn(
|
||||||
|
'relative flex h-13 flex-col items-center justify-center gap-0.5 rounded-xl px-1 text-[11px] leading-tight transition-colors',
|
||||||
|
current
|
||||||
|
? 'bg-background text-foreground font-medium shadow-xs'
|
||||||
|
: count > 0
|
||||||
|
? 'text-foreground hover:bg-background/60'
|
||||||
|
: 'text-muted-foreground hover:bg-background/60',
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<span className="relative">
|
||||||
|
<ListGlyph list={list} />
|
||||||
|
<PendingBadge count={count} current={current} className="absolute -top-1.5 left-3.5" />
|
||||||
|
</span>
|
||||||
|
<span className="w-full truncate text-center">{list.name}</span>
|
||||||
|
</PinnedListLink>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function PendingBadge({
|
||||||
|
count,
|
||||||
|
current,
|
||||||
|
className,
|
||||||
|
}: {
|
||||||
|
count: number
|
||||||
|
current: boolean
|
||||||
|
className?: string
|
||||||
|
}) {
|
||||||
|
if (count === 0) {
|
||||||
|
return (
|
||||||
|
<span
|
||||||
|
aria-hidden
|
||||||
|
className={cn(
|
||||||
|
'bg-muted text-muted-foreground flex size-4 items-center justify-center rounded-full border',
|
||||||
|
className,
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<CheckIcon className="size-2.5" />
|
||||||
|
</span>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<span
|
||||||
|
aria-hidden
|
||||||
|
className={cn(
|
||||||
|
'flex h-4.5 min-w-4.5 items-center justify-center rounded-full px-1 text-[10px] font-semibold tabular-nums',
|
||||||
|
// The open list is already in front of the user; the others are the ones to remember.
|
||||||
|
current ? 'bg-primary text-primary-foreground' : 'bg-destructive text-white',
|
||||||
|
className,
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{count > 99 ? '99+' : count}
|
||||||
|
</span>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Desktop: the pinned lists as a sidebar group, with the pending count (a dot when collapsed). */
|
||||||
|
export function PinnedListsSidebarGroup() {
|
||||||
|
const pinned = usePinnedLists()
|
||||||
|
const currentListId = useCurrentListId()
|
||||||
|
|
||||||
|
if (pinned.length === 0) return null
|
||||||
|
|
||||||
|
return (
|
||||||
|
<SidebarGroup>
|
||||||
|
<SidebarGroupLabel>Fijadas</SidebarGroupLabel>
|
||||||
|
<SidebarMenu>
|
||||||
|
{pinned.map((list) => (
|
||||||
|
<PinnedSidebarItem key={list.id} list={list} current={list.id === currentListId} />
|
||||||
|
))}
|
||||||
|
</SidebarMenu>
|
||||||
|
</SidebarGroup>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function PinnedSidebarItem({ list, current }: { list: ShoppingListSummary; current: boolean }) {
|
||||||
|
const count = usePendingCount(list)
|
||||||
|
|
||||||
|
return (
|
||||||
|
<SidebarMenuItem>
|
||||||
|
<SidebarMenuButton asChild isActive={current} tooltip={pendingLabel(list, count)}>
|
||||||
|
<PinnedListLink list={list}>
|
||||||
|
<ListGlyph list={list} className="size-4" />
|
||||||
|
<span>{list.name}</span>
|
||||||
|
{count > 0 && !current && (
|
||||||
|
<span
|
||||||
|
aria-hidden
|
||||||
|
className="bg-destructive absolute top-1 right-1 hidden size-2 rounded-full group-data-[collapsible=icon]:block"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</PinnedListLink>
|
||||||
|
</SidebarMenuButton>
|
||||||
|
<SidebarMenuBadge className={cn(count > 0 && !current && 'text-destructive')}>
|
||||||
|
{count === 0 ? <CheckIcon className="size-3.5" aria-label="Nada pendiente" /> : count}
|
||||||
|
</SidebarMenuBadge>
|
||||||
|
</SidebarMenuItem>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -1,11 +1,13 @@
|
|||||||
import type { ShoppingListSummary } from '@superlist/shared'
|
import type { ShoppingListSummary } from '@superlist/shared'
|
||||||
|
import { MAX_PINNED_LISTS } from '@superlist/shared'
|
||||||
import { Link } from '@tanstack/react-router'
|
import { Link } from '@tanstack/react-router'
|
||||||
import { SettingsIcon, StarIcon, UsersIcon } from 'lucide-react'
|
import { PinIcon, PinOffIcon, SettingsIcon, StarIcon, UsersIcon } from 'lucide-react'
|
||||||
|
|
||||||
|
import { ListGlyph } from '@/components/lists/list-glyph'
|
||||||
import { Badge } from '@/components/ui/badge'
|
import { Badge } from '@/components/ui/badge'
|
||||||
import { Button } from '@/components/ui/button'
|
import { Button } from '@/components/ui/button'
|
||||||
import { Card, CardContent } from '@/components/ui/card'
|
import { Card, CardContent } from '@/components/ui/card'
|
||||||
import { useSetPrimaryList } from '@/hooks/use-lists'
|
import { usePinnedLists, useSetPrimaryList, useUpdateListPreferences } from '@/hooks/use-lists'
|
||||||
|
|
||||||
type ListCardProps = {
|
type ListCardProps = {
|
||||||
list: ShoppingListSummary
|
list: ShoppingListSummary
|
||||||
@@ -18,20 +20,34 @@ export function ListCard({ list }: ListCardProps) {
|
|||||||
return (
|
return (
|
||||||
<Card>
|
<Card>
|
||||||
<CardContent className="flex items-center gap-1 p-4">
|
<CardContent className="flex items-center gap-1 p-4">
|
||||||
<Link to="/lists/$listId" params={{ listId: list.id }} className="min-w-0 flex-1">
|
<Link
|
||||||
|
to="/lists/$listId"
|
||||||
|
params={{ listId: list.id }}
|
||||||
|
className="flex min-w-0 flex-1 items-center gap-3"
|
||||||
|
>
|
||||||
|
<span className="bg-muted text-muted-foreground flex size-10 shrink-0 items-center justify-center rounded-lg">
|
||||||
|
<ListGlyph list={list} />
|
||||||
|
</span>
|
||||||
|
<span className="min-w-0 flex-1">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<span className="truncate font-medium">{list.name}</span>
|
<span className="truncate font-medium">{list.name}</span>
|
||||||
{list.isPrimary && <Badge>Principal</Badge>}
|
{list.isPrimary && <Badge>Principal</Badge>}
|
||||||
</div>
|
</div>
|
||||||
<div className="text-muted-foreground mt-1 flex items-center gap-3 text-xs">
|
<div className="text-muted-foreground mt-1 flex flex-wrap items-center gap-x-3 gap-y-0.5 text-xs whitespace-nowrap">
|
||||||
<span className="flex items-center gap-1">
|
<span className="flex items-center gap-1">
|
||||||
<UsersIcon className="size-3.5" />
|
<UsersIcon className="size-3.5" />
|
||||||
{list.memberCount} {list.memberCount === 1 ? 'persona' : 'personas'}
|
{list.memberCount} {list.memberCount === 1 ? 'persona' : 'personas'}
|
||||||
</span>
|
</span>
|
||||||
<span>{list.role === 'owner' ? 'Propietario' : 'Colaborador'}</span>
|
<span>{list.role === 'owner' ? 'Propietario' : 'Colaborador'}</span>
|
||||||
|
<span>
|
||||||
|
{list.pendingCount} {list.pendingCount === 1 ? 'pendiente' : 'pendientes'}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
|
<PinButton list={list} />
|
||||||
|
|
||||||
{!list.isPrimary && (
|
{!list.isPrimary && (
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
@@ -53,3 +69,24 @@ export function ListCard({ list }: ListCardProps) {
|
|||||||
</Card>
|
</Card>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Pins or unpins the list to the always-visible bar (disabled once the limit is reached). */
|
||||||
|
function PinButton({ list }: ListCardProps) {
|
||||||
|
const updatePreferences = useUpdateListPreferences(list.id)
|
||||||
|
const pinnedCount = usePinnedLists().length
|
||||||
|
const limitReached = !list.isPinned && pinnedCount >= MAX_PINNED_LISTS
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
size="icon"
|
||||||
|
aria-pressed={list.isPinned}
|
||||||
|
aria-label={list.isPinned ? `Desfijar ${list.name}` : `Fijar ${list.name} en la barra`}
|
||||||
|
title={limitReached ? `Puedes fijar hasta ${MAX_PINNED_LISTS} listas` : undefined}
|
||||||
|
disabled={limitReached || updatePreferences.isPending}
|
||||||
|
onClick={() => updatePreferences.mutate({ isPinned: !list.isPinned })}
|
||||||
|
>
|
||||||
|
{list.isPinned ? <PinOffIcon className="size-4" /> : <PinIcon className="size-4" />}
|
||||||
|
</Button>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|||||||
29
apps/web/src/components/lists/list-glyph.tsx
Normal file
29
apps/web/src/components/lists/list-glyph.tsx
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
import type { ShoppingListSummary } from '@superlist/shared'
|
||||||
|
|
||||||
|
import { LIST_ICON_OPTIONS } from '@/lib/list-icons'
|
||||||
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
|
type ListGlyphProps = {
|
||||||
|
list: Pick<ShoppingListSummary, 'name' | 'icon'>
|
||||||
|
className?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
/** The icon the user picked for a list, or the first letter of its name when there is none. */
|
||||||
|
export function ListGlyph({ list, className }: ListGlyphProps) {
|
||||||
|
if (list.icon) {
|
||||||
|
const { icon: Icon } = LIST_ICON_OPTIONS[list.icon]
|
||||||
|
return <Icon aria-hidden className={cn('size-5 shrink-0', className)} />
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<span
|
||||||
|
aria-hidden
|
||||||
|
className={cn(
|
||||||
|
'flex size-5 shrink-0 items-center justify-center text-sm leading-none font-semibold uppercase',
|
||||||
|
className,
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{list.name.trim().charAt(0) || '?'}
|
||||||
|
</span>
|
||||||
|
)
|
||||||
|
}
|
||||||
94
apps/web/src/components/lists/list-preferences-card.tsx
Normal file
94
apps/web/src/components/lists/list-preferences-card.tsx
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
import { LIST_ICONS, MAX_PINNED_LISTS, type ShoppingListDetail } from '@superlist/shared'
|
||||||
|
|
||||||
|
import { Alert, AlertDescription } from '@/components/ui/alert'
|
||||||
|
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
|
||||||
|
import { Switch } from '@/components/ui/switch'
|
||||||
|
import { usePinnedLists, useUpdateListPreferences } from '@/hooks/use-lists'
|
||||||
|
import { ApiError } from '@/lib/api-client'
|
||||||
|
import { LIST_ICON_OPTIONS } from '@/lib/list-icons'
|
||||||
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
|
type ListPreferencesCardProps = {
|
||||||
|
list: Pick<ShoppingListDetail, 'id' | 'name' | 'isPinned' | 'icon'>
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The user's own settings for a list: pin it to the always-visible bar and pick
|
||||||
|
* its icon. Every member has their own, so it is shown to collaborators too.
|
||||||
|
*/
|
||||||
|
export function ListPreferencesCard({ list }: ListPreferencesCardProps) {
|
||||||
|
const updatePreferences = useUpdateListPreferences(list.id)
|
||||||
|
const pinnedCount = usePinnedLists().length
|
||||||
|
const pinLimitReached = !list.isPinned && pinnedCount >= MAX_PINNED_LISTS
|
||||||
|
const error = updatePreferences.error
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Card>
|
||||||
|
<CardHeader>
|
||||||
|
<CardTitle className="text-base">Acceso rápido</CardTitle>
|
||||||
|
</CardHeader>
|
||||||
|
<CardContent className="flex flex-col gap-5">
|
||||||
|
{error && (
|
||||||
|
<Alert variant="destructive">
|
||||||
|
<AlertDescription>
|
||||||
|
{error instanceof ApiError
|
||||||
|
? (error.problem.detail ?? error.problem.title)
|
||||||
|
: 'No pudimos guardar el cambio.'}
|
||||||
|
</AlertDescription>
|
||||||
|
</Alert>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<label htmlFor="pin-list" className="flex items-start gap-3">
|
||||||
|
<span className="min-w-0 flex-1">
|
||||||
|
<span className="block text-sm font-medium">Fijar en la barra</span>
|
||||||
|
<span className="text-muted-foreground block text-sm">
|
||||||
|
{pinLimitReached
|
||||||
|
? `Ya tienes ${MAX_PINNED_LISTS} listas fijadas. Desfija otra para fijar esta.`
|
||||||
|
: `Siempre visible con sus pendientes, en cualquier pantalla. Hasta ${MAX_PINNED_LISTS} listas.`}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<Switch
|
||||||
|
id="pin-list"
|
||||||
|
className="mt-1"
|
||||||
|
checked={list.isPinned}
|
||||||
|
disabled={pinLimitReached}
|
||||||
|
onCheckedChange={(checked) => updatePreferences.mutate({ isPinned: checked })}
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<fieldset className="flex flex-col gap-2">
|
||||||
|
<legend className="mb-2 text-sm font-medium">Ícono</legend>
|
||||||
|
<div className="grid grid-cols-6 gap-2 sm:grid-cols-9">
|
||||||
|
{LIST_ICONS.map((key) => {
|
||||||
|
const { icon: Icon, label } = LIST_ICON_OPTIONS[key]
|
||||||
|
const selected = list.icon === key
|
||||||
|
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
key={key}
|
||||||
|
type="button"
|
||||||
|
aria-pressed={selected}
|
||||||
|
aria-label={label}
|
||||||
|
title={label}
|
||||||
|
// Tapping the selected icon again clears it (back to the initial).
|
||||||
|
onClick={() => updatePreferences.mutate({ icon: selected ? null : key })}
|
||||||
|
className={cn(
|
||||||
|
'focus-visible:ring-ring/50 flex aspect-square min-h-11 items-center justify-center rounded-lg border outline-none transition-colors focus-visible:ring-3',
|
||||||
|
selected
|
||||||
|
? 'border-primary bg-primary/10 text-primary border-2'
|
||||||
|
: 'text-muted-foreground hover:bg-muted hover:text-foreground',
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<Icon className="size-5" />
|
||||||
|
</button>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
<p className="text-muted-foreground text-xs">
|
||||||
|
Sin ícono se muestra la inicial: «{list.name.trim().charAt(0).toUpperCase()}».
|
||||||
|
</p>
|
||||||
|
</fieldset>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
import type { ShoppingListSummary } from '@superlist/shared'
|
import type {
|
||||||
|
ShoppingListDetail,
|
||||||
|
ShoppingListSummary,
|
||||||
|
UpdateListPreferencesRequest,
|
||||||
|
} from '@superlist/shared'
|
||||||
import { queryOptions, useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
|
import { queryOptions, useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
|
||||||
|
|
||||||
import { apiFetch } from '@/lib/api-client'
|
import { apiFetch } from '@/lib/api-client'
|
||||||
@@ -18,6 +22,61 @@ export function pickPrimaryList(lists: ShoppingListSummary[]): ShoppingListSumma
|
|||||||
return lists.find((list) => list.isPrimary) ?? lists[0]
|
return lists.find((list) => list.isPrimary) ?? lists[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** The lists pinned to the always-visible bar, in the API's order. */
|
||||||
|
export function pickPinnedLists(lists: ShoppingListSummary[]): ShoppingListSummary[] {
|
||||||
|
return lists.filter((list) => list.isPinned)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function usePinnedLists(): ShoppingListSummary[] {
|
||||||
|
const { data: lists } = useLists()
|
||||||
|
return lists ? pickPinnedLists(lists) : []
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pins/unpins a list or changes its icon (the user's own settings). The change is
|
||||||
|
* applied to the cached lists and list detail right away and rolled back if the
|
||||||
|
* API refuses it (e.g. a fifth pinned list).
|
||||||
|
*/
|
||||||
|
export function useUpdateListPreferences(listId: string) {
|
||||||
|
const queryClient = useQueryClient()
|
||||||
|
const listsKey = listsQueryOptions().queryKey
|
||||||
|
const detailKey = ['lists', listId]
|
||||||
|
|
||||||
|
return useMutation({
|
||||||
|
mutationFn: (input: UpdateListPreferencesRequest) =>
|
||||||
|
apiFetch<ShoppingListSummary>(`/lists/${listId}/preferences`, {
|
||||||
|
method: 'PATCH',
|
||||||
|
body: JSON.stringify(input),
|
||||||
|
}),
|
||||||
|
onMutate: async (input) => {
|
||||||
|
await queryClient.cancelQueries({ queryKey: listsKey, exact: true })
|
||||||
|
await queryClient.cancelQueries({ queryKey: detailKey, exact: true })
|
||||||
|
|
||||||
|
const previousLists = queryClient.getQueryData<ShoppingListSummary[]>(listsKey)
|
||||||
|
const previousDetail = queryClient.getQueryData<ShoppingListDetail>(detailKey)
|
||||||
|
|
||||||
|
queryClient.setQueryData<ShoppingListSummary[]>(listsKey, (lists) =>
|
||||||
|
lists?.map((list) => (list.id === listId ? { ...list, ...input } : list)),
|
||||||
|
)
|
||||||
|
queryClient.setQueryData<ShoppingListDetail>(detailKey, (detail) =>
|
||||||
|
detail ? { ...detail, ...input } : detail,
|
||||||
|
)
|
||||||
|
|
||||||
|
return { previousLists, previousDetail }
|
||||||
|
},
|
||||||
|
onError: (_error, _input, context) => {
|
||||||
|
queryClient.setQueryData(listsKey, context?.previousLists)
|
||||||
|
queryClient.setQueryData(detailKey, context?.previousDetail)
|
||||||
|
},
|
||||||
|
// `exact`: only the collection and this list's detail, not every list's items.
|
||||||
|
onSettled: () =>
|
||||||
|
Promise.all([
|
||||||
|
queryClient.invalidateQueries({ queryKey: listsKey, exact: true }),
|
||||||
|
queryClient.invalidateQueries({ queryKey: detailKey, exact: true }),
|
||||||
|
]),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function useCreateList() {
|
export function useCreateList() {
|
||||||
const queryClient = useQueryClient()
|
const queryClient = useQueryClient()
|
||||||
|
|
||||||
|
|||||||
22
apps/web/src/hooks/use-pending-count.ts
Normal file
22
apps/web/src/hooks/use-pending-count.ts
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
import type { ShoppingListSummary } from '@superlist/shared'
|
||||||
|
import { useQuery } from '@tanstack/react-query'
|
||||||
|
|
||||||
|
import { itemsQueryOptions, usePendingDeletions } from '@/hooks/use-items'
|
||||||
|
import { useListEvents } from '@/hooks/use-list-events'
|
||||||
|
import { countPendingItems } from '@/lib/items'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Items still to buy in a list, kept live from any page: it reads the list's
|
||||||
|
* items (so optimistic changes and deletions waiting for undo count the same as
|
||||||
|
* on the list itself) and follows its SSE stream, shared with any other
|
||||||
|
* subscriber of that list. Until the items load it falls back to the count
|
||||||
|
* the lists endpoint returned.
|
||||||
|
*/
|
||||||
|
export function usePendingCount(list: Pick<ShoppingListSummary, 'id' | 'pendingCount'>): number {
|
||||||
|
const { data: items } = useQuery(itemsQueryOptions(list.id))
|
||||||
|
const deletingIds = usePendingDeletions()
|
||||||
|
|
||||||
|
useListEvents(list.id)
|
||||||
|
|
||||||
|
return items ? countPendingItems(items, deletingIds) : list.pendingCount
|
||||||
|
}
|
||||||
45
apps/web/src/lib/list-icons.ts
Normal file
45
apps/web/src/lib/list-icons.ts
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
import type { ListIcon } from '@superlist/shared'
|
||||||
|
import {
|
||||||
|
AppleIcon,
|
||||||
|
BabyIcon,
|
||||||
|
BeefIcon,
|
||||||
|
CarrotIcon,
|
||||||
|
CroissantIcon,
|
||||||
|
DogIcon,
|
||||||
|
FishIcon,
|
||||||
|
GiftIcon,
|
||||||
|
HammerIcon,
|
||||||
|
HouseIcon,
|
||||||
|
type LucideIcon,
|
||||||
|
MilkIcon,
|
||||||
|
ParkIcon,
|
||||||
|
PillIcon,
|
||||||
|
ShirtIcon,
|
||||||
|
ShoppingCartIcon,
|
||||||
|
TreesIcon,
|
||||||
|
WineIcon,
|
||||||
|
} from 'lucide-react'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The icons a list can show, in picker order. Keys come from `LIST_ICONS` in
|
||||||
|
* `@superlist/shared` (the API validates them); the labels are for screen readers.
|
||||||
|
*/
|
||||||
|
export const LIST_ICON_OPTIONS: Record<ListIcon, { icon: LucideIcon; label: string }> = {
|
||||||
|
'shopping-cart': { icon: ShoppingCartIcon, label: 'Carrito' },
|
||||||
|
carrot: { icon: CarrotIcon, label: 'Zanahoria' },
|
||||||
|
apple: { icon: AppleIcon, label: 'Manzana' },
|
||||||
|
house: { icon: HouseIcon, label: 'Casa' },
|
||||||
|
trees: { icon: TreesIcon, label: 'Árboles' },
|
||||||
|
park: { icon: ParkIcon, label: 'Parque' },
|
||||||
|
beef: { icon: BeefIcon, label: 'Carne' },
|
||||||
|
fish: { icon: FishIcon, label: 'Pescado' },
|
||||||
|
milk: { icon: MilkIcon, label: 'Leche' },
|
||||||
|
croissant: { icon: CroissantIcon, label: 'Panadería' },
|
||||||
|
wine: { icon: WineIcon, label: 'Bebidas' },
|
||||||
|
pill: { icon: PillIcon, label: 'Farmacia' },
|
||||||
|
baby: { icon: BabyIcon, label: 'Bebé' },
|
||||||
|
dog: { icon: DogIcon, label: 'Mascotas' },
|
||||||
|
shirt: { icon: ShirtIcon, label: 'Ropa' },
|
||||||
|
hammer: { icon: HammerIcon, label: 'Ferretería' },
|
||||||
|
gift: { icon: GiftIcon, label: 'Regalos' },
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ import { useState } from 'react'
|
|||||||
import { useForm } from 'react-hook-form'
|
import { useForm } from 'react-hook-form'
|
||||||
import { z } from 'zod'
|
import { z } from 'zod'
|
||||||
|
|
||||||
|
import { ListPreferencesCard } from '@/components/lists/list-preferences-card'
|
||||||
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert'
|
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert'
|
||||||
import { Avatar, AvatarFallback } from '@/components/ui/avatar'
|
import { Avatar, AvatarFallback } from '@/components/ui/avatar'
|
||||||
import { Badge } from '@/components/ui/badge'
|
import { Badge } from '@/components/ui/badge'
|
||||||
@@ -77,6 +78,8 @@ function ListSettingsPage() {
|
|||||||
|
|
||||||
{!list.isPrimary && <SetPrimaryButton listId={list.id} />}
|
{!list.isPrimary && <SetPrimaryButton listId={list.id} />}
|
||||||
|
|
||||||
|
<ListPreferencesCard list={list} />
|
||||||
|
|
||||||
{list.role === 'owner' && <RenameListCard list={list} />}
|
{list.role === 'owner' && <RenameListCard list={list} />}
|
||||||
|
|
||||||
{list.role === 'owner' && <InviteCollaboratorCard listId={list.id} />}
|
{list.role === 'owner' && <InviteCollaboratorCard listId={list.id} />}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { createFileRoute, Outlet, redirect } from '@tanstack/react-router'
|
import { createFileRoute, Outlet, redirect } from '@tanstack/react-router'
|
||||||
|
import type { CSSProperties } from 'react'
|
||||||
import { AppBadge } from '@/components/app-badge'
|
import { AppBadge } from '@/components/app-badge'
|
||||||
import { InstallPrompt } from '@/components/install-prompt'
|
import { InstallPrompt } from '@/components/install-prompt'
|
||||||
import { AppHeader } from '@/components/layout/app-header'
|
import { AppHeader } from '@/components/layout/app-header'
|
||||||
@@ -6,6 +7,7 @@ import { AppSidebar } from '@/components/layout/app-sidebar'
|
|||||||
import { BottomNav } from '@/components/layout/bottom-nav'
|
import { BottomNav } from '@/components/layout/bottom-nav'
|
||||||
import { SidebarInset, SidebarProvider } from '@/components/ui/sidebar'
|
import { SidebarInset, SidebarProvider } from '@/components/ui/sidebar'
|
||||||
import { Skeleton } from '@/components/ui/skeleton'
|
import { Skeleton } from '@/components/ui/skeleton'
|
||||||
|
import { usePinnedLists } from '@/hooks/use-lists'
|
||||||
import { authClient, useSession } from '@/lib/auth-client'
|
import { authClient, useSession } from '@/lib/auth-client'
|
||||||
|
|
||||||
export const Route = createFileRoute('/_authenticated')({
|
export const Route = createFileRoute('/_authenticated')({
|
||||||
@@ -36,13 +38,26 @@ function AuthenticatedLayout() {
|
|||||||
return <SessionLoading />
|
return <SessionLoading />
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return <AuthenticatedShell />
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Split from the layout so the lists query only runs once the session is known. */
|
||||||
|
function AuthenticatedShell() {
|
||||||
|
// Height of the mobile bottom navigation, which grows by the pinned lists bar.
|
||||||
|
// Everything placed above it (page padding, install prompt, dictation button)
|
||||||
|
// reads this variable instead of a fixed offset.
|
||||||
|
const hasPinnedLists = usePinnedLists().length > 0
|
||||||
|
const shellStyle = {
|
||||||
|
'--bottom-nav-height': hasPinnedLists ? '9rem' : '4.5rem',
|
||||||
|
} as CSSProperties
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SidebarProvider>
|
<SidebarProvider style={shellStyle}>
|
||||||
<AppBadge />
|
<AppBadge />
|
||||||
<AppSidebar />
|
<AppSidebar />
|
||||||
<SidebarInset>
|
<SidebarInset>
|
||||||
<AppHeader />
|
<AppHeader />
|
||||||
<div className="flex flex-1 flex-col gap-4 p-4 pb-[calc(5rem+env(safe-area-inset-bottom))] md:gap-6 md:p-6 md:pb-6">
|
<div className="flex flex-1 flex-col gap-4 p-4 pb-[calc(var(--bottom-nav-height)+0.5rem+env(safe-area-inset-bottom))] md:gap-6 md:p-6 md:pb-6">
|
||||||
<Outlet />
|
<Outlet />
|
||||||
</div>
|
</div>
|
||||||
<BottomNav />
|
<BottomNav />
|
||||||
|
|||||||
131
bun.lock
131
bun.lock
@@ -16,14 +16,19 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@better-auth/passkey": "1.7.7",
|
"@better-auth/passkey": "1.7.7",
|
||||||
"@hono/zod-validator": "^0.9.1",
|
"@hono/zod-validator": "^0.9.1",
|
||||||
|
"@logtape/logtape": "^2.4.2",
|
||||||
|
"@logtape/otel": "^2.4.2",
|
||||||
|
"@logtape/pretty": "^2.4.2",
|
||||||
|
"@opentelemetry/api": "1.9.0",
|
||||||
|
"@opentelemetry/exporter-metrics-otlp-http": "0.208.0",
|
||||||
|
"@opentelemetry/resources": "2.2.0",
|
||||||
|
"@opentelemetry/sdk-metrics": "2.2.0",
|
||||||
"@prisma/adapter-pg": "^7.10.0",
|
"@prisma/adapter-pg": "^7.10.0",
|
||||||
"@prisma/client": "^7.10.0",
|
"@prisma/client": "^7.10.0",
|
||||||
"@superlist/shared": "workspace:*",
|
"@superlist/shared": "workspace:*",
|
||||||
"better-auth": "^1.7.7",
|
"better-auth": "^1.7.7",
|
||||||
"hono": "^4.13.13",
|
"hono": "^4.13.13",
|
||||||
"pg": "^8.23.1",
|
"pg": "^8.23.1",
|
||||||
"pino": "^10.4.0",
|
|
||||||
"pino-pretty": "^13.2.0",
|
|
||||||
"resend": "^6.32.1",
|
"resend": "^6.32.1",
|
||||||
"zod": "^4.6.7",
|
"zod": "^4.6.7",
|
||||||
},
|
},
|
||||||
@@ -344,6 +349,10 @@
|
|||||||
|
|
||||||
"@fontsource-variable/geist": ["@fontsource-variable/geist@5.3.0", "", {}, "sha512-j0m+vLQuG5XAYoHtGCVu0spvlGreR3EzpECUVzkFmI1mTVnAO38l/NEPDCFgZ177JxzYJCLSmTQibIiYPilGrA=="],
|
"@fontsource-variable/geist": ["@fontsource-variable/geist@5.3.0", "", {}, "sha512-j0m+vLQuG5XAYoHtGCVu0spvlGreR3EzpECUVzkFmI1mTVnAO38l/NEPDCFgZ177JxzYJCLSmTQibIiYPilGrA=="],
|
||||||
|
|
||||||
|
"@grpc/grpc-js": ["@grpc/grpc-js@1.14.7", "", { "dependencies": { "@grpc/proto-loader": "^0.8.0", "@js-sdsl/ordered-map": "^4.4.2" } }, "sha512-W4W/fcBMGRVtG6dW2c7cw2mnpS3hvbBd+oQXjh2iYFTZDk1JJmcNqkM5KSaPubQpamlUUurrlb7G1s9NJeERmQ=="],
|
||||||
|
|
||||||
|
"@grpc/proto-loader": ["@grpc/proto-loader@0.8.1", "", { "dependencies": { "lodash.camelcase": "^4.3.0", "long": "^5.0.0", "protobufjs": "^7.5.5", "yargs": "^17.7.2" }, "bin": { "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" } }, "sha512-wtF6h+DY6M3YaDBPAmvuuA6jV8Sif9MjtOI5euKFWRgCDl5PeDpPsHR9u2l6St5ceY8AZgoNDww5+HvEsXFsGg=="],
|
||||||
|
|
||||||
"@hexagon/base64": ["@hexagon/base64@1.1.28", "", {}, "sha512-lhqDEAvWixy3bZ+UOYbPwUbBkwBq5C1LAJ/xPC8Oi+lL54oyakv/npbA0aU2hgCsx/1NUd4IBvV03+aUBWxerw=="],
|
"@hexagon/base64": ["@hexagon/base64@1.1.28", "", {}, "sha512-lhqDEAvWixy3bZ+UOYbPwUbBkwBq5C1LAJ/xPC8Oi+lL54oyakv/npbA0aU2hgCsx/1NUd4IBvV03+aUBWxerw=="],
|
||||||
|
|
||||||
"@hono/node-server": ["@hono/node-server@1.19.9", "", { "peerDependencies": { "hono": "^4" } }, "sha512-vHL6w3ecZsky+8P5MD+eFfaGTyCeOHUIFYMGpQGbrBTSmNNoxv0if69rEZ5giu36weC5saFuznL411gRX7bJDw=="],
|
"@hono/node-server": ["@hono/node-server@1.19.9", "", { "peerDependencies": { "hono": "^4" } }, "sha512-vHL6w3ecZsky+8P5MD+eFfaGTyCeOHUIFYMGpQGbrBTSmNNoxv0if69rEZ5giu36weC5saFuznL411gRX7bJDw=="],
|
||||||
@@ -368,12 +377,20 @@
|
|||||||
|
|
||||||
"@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.31", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="],
|
"@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.31", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="],
|
||||||
|
|
||||||
|
"@js-sdsl/ordered-map": ["@js-sdsl/ordered-map@4.4.2", "", {}, "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw=="],
|
||||||
|
|
||||||
"@kobalte/core": ["@kobalte/core@0.13.14", "", { "dependencies": { "@floating-ui/dom": "^1.5.1", "@internationalized/number": "^3.2.1", "@kobalte/utils": "^0.9.2", "@solid-primitives/props": "^3.1.8", "@solid-primitives/resize-observer": "^2.0.26", "solid-presence": "^0.2.0", "solid-prevent-scroll": "^0.1.11" }, "peerDependencies": { "solid-js": "^1.9.8" } }, "sha512-SBVB1lnvYbYt2x3t7fG0lo5fGLEbHQ6PII3NDPva8vD5e2v53On84ZVQiuIk0XI/55R4GQhden7Yem+R/XR8uQ=="],
|
"@kobalte/core": ["@kobalte/core@0.13.14", "", { "dependencies": { "@floating-ui/dom": "^1.5.1", "@internationalized/number": "^3.2.1", "@kobalte/utils": "^0.9.2", "@solid-primitives/props": "^3.1.8", "@solid-primitives/resize-observer": "^2.0.26", "solid-presence": "^0.2.0", "solid-prevent-scroll": "^0.1.11" }, "peerDependencies": { "solid-js": "^1.9.8" } }, "sha512-SBVB1lnvYbYt2x3t7fG0lo5fGLEbHQ6PII3NDPva8vD5e2v53On84ZVQiuIk0XI/55R4GQhden7Yem+R/XR8uQ=="],
|
||||||
|
|
||||||
"@kobalte/utils": ["@kobalte/utils@0.9.2", "", { "dependencies": { "@solid-primitives/event-listener": "^2.2.14", "@solid-primitives/keyed": "^1.2.0", "@solid-primitives/map": "^0.4.7", "@solid-primitives/media": "^2.2.4", "@solid-primitives/props": "^3.1.8", "@solid-primitives/refs": "^1.0.5", "@solid-primitives/utils": "^6.2.1" }, "peerDependencies": { "solid-js": "^1.8.8" } }, "sha512-jRVXr+zsVHxzDXRoh+CDeXzvCsFJ6uiHhqqNQ26Cw9ZsZ3D6nqPUBt1gGVtj2ZPmRL3a9Uk1v8D1aJ8/I12Dow=="],
|
"@kobalte/utils": ["@kobalte/utils@0.9.2", "", { "dependencies": { "@solid-primitives/event-listener": "^2.2.14", "@solid-primitives/keyed": "^1.2.0", "@solid-primitives/map": "^0.4.7", "@solid-primitives/media": "^2.2.4", "@solid-primitives/props": "^3.1.8", "@solid-primitives/refs": "^1.0.5", "@solid-primitives/utils": "^6.2.1" }, "peerDependencies": { "solid-js": "^1.8.8" } }, "sha512-jRVXr+zsVHxzDXRoh+CDeXzvCsFJ6uiHhqqNQ26Cw9ZsZ3D6nqPUBt1gGVtj2ZPmRL3a9Uk1v8D1aJ8/I12Dow=="],
|
||||||
|
|
||||||
"@levischuck/tiny-cbor": ["@levischuck/tiny-cbor@0.2.11", "", {}, "sha512-llBRm4dT4Z89aRsm6u2oEZ8tfwL/2l6BwpZ7JcyieouniDECM5AqNgr/y08zalEIvW3RSK4upYyybDcmjXqAow=="],
|
"@levischuck/tiny-cbor": ["@levischuck/tiny-cbor@0.2.11", "", {}, "sha512-llBRm4dT4Z89aRsm6u2oEZ8tfwL/2l6BwpZ7JcyieouniDECM5AqNgr/y08zalEIvW3RSK4upYyybDcmjXqAow=="],
|
||||||
|
|
||||||
|
"@logtape/logtape": ["@logtape/logtape@2.4.2", "", {}, "sha512-YJyC1gEMgWmTqJTRtKkjgasEbi8/0gP7Dj8n6bL46gQIAhpTY8uXJ+1QYMOgF5asotlGMvy3G7ejXUe45Yd1MQ=="],
|
||||||
|
|
||||||
|
"@logtape/otel": ["@logtape/otel@2.4.2", "", { "dependencies": { "@opentelemetry/api": "^1.9.0", "@opentelemetry/api-logs": "^0.208.0", "@opentelemetry/exporter-logs-otlp-grpc": "^0.208.0", "@opentelemetry/exporter-logs-otlp-http": "^0.208.0", "@opentelemetry/exporter-logs-otlp-proto": "^0.208.0", "@opentelemetry/otlp-exporter-base": "^0.208.0", "@opentelemetry/resources": "^2.2.0", "@opentelemetry/sdk-logs": "^0.208.0", "@opentelemetry/semantic-conventions": "^1.38.0" }, "peerDependencies": { "@logtape/logtape": "^2.4.2" } }, "sha512-65xTJ1MdaUmegfqVEUil2btaMv//gqe4v2Nxip1Zh2kuC20jMcJYoxVZZqIJzkZpwzwzUFBFvj4/j1TNaQE/4A=="],
|
||||||
|
|
||||||
|
"@logtape/pretty": ["@logtape/pretty@2.4.2", "", { "peerDependencies": { "@logtape/logtape": "^2.4.2" } }, "sha512-WcsJYsBwjL2DypJO4vJSZ7MAgbbEIm7//JE1G61kCV7ttiPqiX+5e+IB4h01bBdTE8FH2IkEIC4dMss7SwHPTg=="],
|
||||||
|
|
||||||
"@modelcontextprotocol/sdk": ["@modelcontextprotocol/sdk@1.32.1", "", { "dependencies": { "@hono/node-server": "^1.19.9 || ^2.0.5", "ajv": "^8.17.1", "ajv-formats": "^3.0.1", "content-type": "^1.0.5", "cors": "^2.8.5", "cross-spawn": "^7.0.5", "eventsource": "^3.0.2", "eventsource-parser": "^3.0.0", "express": "^5.2.1", "express-rate-limit": "^8.2.1", "hono": "^4.11.4", "jose": "^6.1.3", "json-schema-typed": "^8.0.2", "pkce-challenge": "^5.0.0", "raw-body": "^3.0.0", "zod": "^3.25 || ^4.0", "zod-to-json-schema": "^3.25.1" }, "peerDependencies": { "@cfworker/json-schema": "^4.1.1" }, "optionalPeers": ["@cfworker/json-schema"] }, "sha512-2DdE+SJDtzLEEWzY1ZjY7Q+VcPhcV1KisD3zI4u0XZyktsjHum1mwbMI+JaulUBi2OZk+KJAi2uPXzxichPkdw=="],
|
"@modelcontextprotocol/sdk": ["@modelcontextprotocol/sdk@1.32.1", "", { "dependencies": { "@hono/node-server": "^1.19.9 || ^2.0.5", "ajv": "^8.17.1", "ajv-formats": "^3.0.1", "content-type": "^1.0.5", "cors": "^2.8.5", "cross-spawn": "^7.0.5", "eventsource": "^3.0.2", "eventsource-parser": "^3.0.0", "express": "^5.2.1", "express-rate-limit": "^8.2.1", "hono": "^4.11.4", "jose": "^6.1.3", "json-schema-typed": "^8.0.2", "pkce-challenge": "^5.0.0", "raw-body": "^3.0.0", "zod": "^3.25 || ^4.0", "zod-to-json-schema": "^3.25.1" }, "peerDependencies": { "@cfworker/json-schema": "^4.1.1" }, "optionalPeers": ["@cfworker/json-schema"] }, "sha512-2DdE+SJDtzLEEWzY1ZjY7Q+VcPhcV1KisD3zI4u0XZyktsjHum1mwbMI+JaulUBi2OZk+KJAi2uPXzxichPkdw=="],
|
||||||
|
|
||||||
"@napi-rs/lzma-linux-x64-gnu": ["@napi-rs/lzma-linux-x64-gnu@1.5.1", "", { "os": "linux", "cpu": "x64" }, "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ=="],
|
"@napi-rs/lzma-linux-x64-gnu": ["@napi-rs/lzma-linux-x64-gnu@1.5.1", "", { "os": "linux", "cpu": "x64" }, "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ=="],
|
||||||
@@ -388,6 +405,34 @@
|
|||||||
|
|
||||||
"@nodelib/fs.walk": ["@nodelib/fs.walk@1.2.8", "", { "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" } }, "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg=="],
|
"@nodelib/fs.walk": ["@nodelib/fs.walk@1.2.8", "", { "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" } }, "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg=="],
|
||||||
|
|
||||||
|
"@opentelemetry/api": ["@opentelemetry/api@1.9.0", "", {}, "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg=="],
|
||||||
|
|
||||||
|
"@opentelemetry/api-logs": ["@opentelemetry/api-logs@0.208.0", "", { "dependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-CjruKY9V6NMssL/T1kAFgzosF1v9o6oeN+aX5JB/C/xPNtmgIJqcXHG7fA82Ou1zCpWGl4lROQUKwUNE1pMCyg=="],
|
||||||
|
|
||||||
|
"@opentelemetry/core": ["@opentelemetry/core@2.2.0", "", { "dependencies": { "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, "sha512-FuabnnUm8LflnieVxs6eP7Z383hgQU4W1e3KJS6aOG3RxWxcHyBxH8fDMHNgu/gFx/M2jvTOW/4/PHhLz6bjWw=="],
|
||||||
|
|
||||||
|
"@opentelemetry/exporter-logs-otlp-grpc": ["@opentelemetry/exporter-logs-otlp-grpc@0.208.0", "", { "dependencies": { "@grpc/grpc-js": "^1.7.1", "@opentelemetry/core": "2.2.0", "@opentelemetry/otlp-exporter-base": "0.208.0", "@opentelemetry/otlp-grpc-exporter-base": "0.208.0", "@opentelemetry/otlp-transformer": "0.208.0", "@opentelemetry/sdk-logs": "0.208.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-AmZDKFzbq/idME/yq68M155CJW1y056MNBekH9OZewiZKaqgwYN4VYfn3mXVPftYsfrCM2r4V6tS8H2LmfiDCg=="],
|
||||||
|
|
||||||
|
"@opentelemetry/exporter-logs-otlp-http": ["@opentelemetry/exporter-logs-otlp-http@0.208.0", "", { "dependencies": { "@opentelemetry/api-logs": "0.208.0", "@opentelemetry/core": "2.2.0", "@opentelemetry/otlp-exporter-base": "0.208.0", "@opentelemetry/otlp-transformer": "0.208.0", "@opentelemetry/sdk-logs": "0.208.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-jOv40Bs9jy9bZVLo/i8FwUiuCvbjWDI+ZW13wimJm4LjnlwJxGgB+N/VWOZUTpM+ah/awXeQqKdNlpLf2EjvYg=="],
|
||||||
|
|
||||||
|
"@opentelemetry/exporter-logs-otlp-proto": ["@opentelemetry/exporter-logs-otlp-proto@0.208.0", "", { "dependencies": { "@opentelemetry/api-logs": "0.208.0", "@opentelemetry/core": "2.2.0", "@opentelemetry/otlp-exporter-base": "0.208.0", "@opentelemetry/otlp-transformer": "0.208.0", "@opentelemetry/resources": "2.2.0", "@opentelemetry/sdk-logs": "0.208.0", "@opentelemetry/sdk-trace-base": "2.2.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-Wy8dZm16AOfM7yddEzSFzutHZDZ6HspKUODSUJVjyhnZFMBojWDjSNgduyCMlw6qaxJYz0dlb0OEcb4Eme+BfQ=="],
|
||||||
|
|
||||||
|
"@opentelemetry/exporter-metrics-otlp-http": ["@opentelemetry/exporter-metrics-otlp-http@0.208.0", "", { "dependencies": { "@opentelemetry/core": "2.2.0", "@opentelemetry/otlp-exporter-base": "0.208.0", "@opentelemetry/otlp-transformer": "0.208.0", "@opentelemetry/resources": "2.2.0", "@opentelemetry/sdk-metrics": "2.2.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-QZ3TrI90Y0i1ezWQdvreryjY0a5TK4J9gyDLIyhLBwV+EQUvyp5wR7TFPKCAexD4TDSWM0t3ulQDbYYjVtzTyA=="],
|
||||||
|
|
||||||
|
"@opentelemetry/otlp-exporter-base": ["@opentelemetry/otlp-exporter-base@0.208.0", "", { "dependencies": { "@opentelemetry/core": "2.2.0", "@opentelemetry/otlp-transformer": "0.208.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-gMd39gIfVb2OgxldxUtOwGJYSH8P1kVFFlJLuut32L6KgUC4gl1dMhn+YC2mGn0bDOiQYSk/uHOdSjuKp58vvA=="],
|
||||||
|
|
||||||
|
"@opentelemetry/otlp-grpc-exporter-base": ["@opentelemetry/otlp-grpc-exporter-base@0.208.0", "", { "dependencies": { "@grpc/grpc-js": "^1.7.1", "@opentelemetry/core": "2.2.0", "@opentelemetry/otlp-exporter-base": "0.208.0", "@opentelemetry/otlp-transformer": "0.208.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-fGvAg3zb8fC0oJAzfz7PQppADI2HYB7TSt/XoCaBJFi1mSquNUjtHXEoviMgObLAa1NRIgOC1lsV1OUKi+9+lQ=="],
|
||||||
|
|
||||||
|
"@opentelemetry/otlp-transformer": ["@opentelemetry/otlp-transformer@0.208.0", "", { "dependencies": { "@opentelemetry/api-logs": "0.208.0", "@opentelemetry/core": "2.2.0", "@opentelemetry/resources": "2.2.0", "@opentelemetry/sdk-logs": "0.208.0", "@opentelemetry/sdk-metrics": "2.2.0", "@opentelemetry/sdk-trace-base": "2.2.0", "protobufjs": "^7.3.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-DCFPY8C6lAQHUNkzcNT9R+qYExvsk6C5Bto2pbNxgicpcSWbe2WHShLxkOxIdNcBiYPdVHv/e7vH7K6TI+C+fQ=="],
|
||||||
|
|
||||||
|
"@opentelemetry/resources": ["@opentelemetry/resources@2.2.0", "", { "dependencies": { "@opentelemetry/core": "2.2.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.3.0 <1.10.0" } }, "sha512-1pNQf/JazQTMA0BiO5NINUzH0cbLbbl7mntLa4aJNmCCXSj0q03T5ZXXL0zw4G55TjdL9Tz32cznGClf+8zr5A=="],
|
||||||
|
|
||||||
|
"@opentelemetry/sdk-logs": ["@opentelemetry/sdk-logs@0.208.0", "", { "dependencies": { "@opentelemetry/api-logs": "0.208.0", "@opentelemetry/core": "2.2.0", "@opentelemetry/resources": "2.2.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.4.0 <1.10.0" } }, "sha512-QlAyL1jRpOeaqx7/leG1vJMp84g0xKP6gJmfELBpnI4O/9xPX+Hu5m1POk9Kl+veNkyth5t19hRlN6tNY1sjbA=="],
|
||||||
|
|
||||||
|
"@opentelemetry/sdk-metrics": ["@opentelemetry/sdk-metrics@2.2.0", "", { "dependencies": { "@opentelemetry/core": "2.2.0", "@opentelemetry/resources": "2.2.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.9.0 <1.10.0" } }, "sha512-G5KYP6+VJMZzpGipQw7Giif48h6SGQ2PFKEYCybeXJsOCB4fp8azqMAAzE5lnnHK3ZVwYQrgmFbsUJO/zOnwGw=="],
|
||||||
|
|
||||||
|
"@opentelemetry/sdk-trace-base": ["@opentelemetry/sdk-trace-base@2.2.0", "", { "dependencies": { "@opentelemetry/core": "2.2.0", "@opentelemetry/resources": "2.2.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.3.0 <1.10.0" } }, "sha512-xWQgL0Bmctsalg6PaXExmzdedSp3gyKV8mQBwK/j9VGdCDu2fmXIb2gAehBKbkXCpJ4HPkgv3QfoJWRT4dHWbw=="],
|
||||||
|
|
||||||
"@opentelemetry/semantic-conventions": ["@opentelemetry/semantic-conventions@1.43.0", "", {}, "sha512-eSYWTm620tTk45EKSedaUL8MFYI8hW164hIXsgIHyxu3VobUB3fFCu5t0hQby6OoWRPsG1KkKUG2M5UadiLiVg=="],
|
"@opentelemetry/semantic-conventions": ["@opentelemetry/semantic-conventions@1.43.0", "", {}, "sha512-eSYWTm620tTk45EKSedaUL8MFYI8hW164hIXsgIHyxu3VobUB3fFCu5t0hQby6OoWRPsG1KkKUG2M5UadiLiVg=="],
|
||||||
|
|
||||||
"@oxc-project/types": ["@oxc-project/types@0.153.0", "", {}, "sha512-jSNrRIyvPVLL5E1z/tS5zLAprosGz/FuI1PWwEOz59j3E4TTTzSpqKb/RDGqJhhW0QHYISGXxq582wGx6T11Tw=="],
|
"@oxc-project/types": ["@oxc-project/types@0.153.0", "", {}, "sha512-jSNrRIyvPVLL5E1z/tS5zLAprosGz/FuI1PWwEOz59j3E4TTTzSpqKb/RDGqJhhW0QHYISGXxq582wGx6T11Tw=="],
|
||||||
@@ -418,8 +463,6 @@
|
|||||||
|
|
||||||
"@peculiar/x509": ["@peculiar/x509@1.14.3", "", { "dependencies": { "@peculiar/asn1-cms": "^2.6.0", "@peculiar/asn1-csr": "^2.6.0", "@peculiar/asn1-ecc": "^2.6.0", "@peculiar/asn1-pkcs9": "^2.6.0", "@peculiar/asn1-rsa": "^2.6.0", "@peculiar/asn1-schema": "^2.6.0", "@peculiar/asn1-x509": "^2.6.0", "pvtsutils": "^1.3.6", "reflect-metadata": "^0.2.2", "tslib": "^2.8.1", "tsyringe": "^4.10.0" } }, "sha512-C2Xj8FZ0uHWeCXXqX5B4/gVFQmtSkiuOolzAgutjTfseNOHT3pUjljDZsTSxXFGgio54bCzVFqmEOUrIVk8RDA=="],
|
"@peculiar/x509": ["@peculiar/x509@1.14.3", "", { "dependencies": { "@peculiar/asn1-cms": "^2.6.0", "@peculiar/asn1-csr": "^2.6.0", "@peculiar/asn1-ecc": "^2.6.0", "@peculiar/asn1-pkcs9": "^2.6.0", "@peculiar/asn1-rsa": "^2.6.0", "@peculiar/asn1-schema": "^2.6.0", "@peculiar/asn1-x509": "^2.6.0", "pvtsutils": "^1.3.6", "reflect-metadata": "^0.2.2", "tslib": "^2.8.1", "tsyringe": "^4.10.0" } }, "sha512-C2Xj8FZ0uHWeCXXqX5B4/gVFQmtSkiuOolzAgutjTfseNOHT3pUjljDZsTSxXFGgio54bCzVFqmEOUrIVk8RDA=="],
|
||||||
|
|
||||||
"@pinojs/redact": ["@pinojs/redact@0.4.0", "", {}, "sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg=="],
|
|
||||||
|
|
||||||
"@prisma/adapter-pg": ["@prisma/adapter-pg@7.10.0", "", { "dependencies": { "@prisma/driver-adapter-utils": "7.10.0", "@types/pg": "^8.16.0", "pg": "^8.16.3", "postgres-array": "3.0.4" } }, "sha512-N7nwSor0HO1Kz6xBv0TPAjAPysKK0fac6p4fVN3ensLOuzc/83Fgmln5k92eK/cvzqdkSR/2kkAqlbcdwVrwpw=="],
|
"@prisma/adapter-pg": ["@prisma/adapter-pg@7.10.0", "", { "dependencies": { "@prisma/driver-adapter-utils": "7.10.0", "@types/pg": "^8.16.0", "pg": "^8.16.3", "postgres-array": "3.0.4" } }, "sha512-N7nwSor0HO1Kz6xBv0TPAjAPysKK0fac6p4fVN3ensLOuzc/83Fgmln5k92eK/cvzqdkSR/2kkAqlbcdwVrwpw=="],
|
||||||
|
|
||||||
"@prisma/client": ["@prisma/client@7.10.0", "", { "dependencies": { "@prisma/client-runtime-utils": "7.10.0" }, "peerDependencies": { "prisma": "*", "typescript": ">=5.4.0" }, "optionalPeers": ["prisma", "typescript"] }, "sha512-Ubw/QS9JGIBSBUsyxAUQuK/Jcu0Tsva7le7QbLd91Kix9yJvYDdj5QkwgEbbZniH80dd+sziQcALPc+HnvQC8Q=="],
|
"@prisma/client": ["@prisma/client@7.10.0", "", { "dependencies": { "@prisma/client-runtime-utils": "7.10.0" }, "peerDependencies": { "prisma": "*", "typescript": ">=5.4.0" }, "optionalPeers": ["prisma", "typescript"] }, "sha512-Ubw/QS9JGIBSBUsyxAUQuK/Jcu0Tsva7le7QbLd91Kix9yJvYDdj5QkwgEbbZniH80dd+sziQcALPc+HnvQC8Q=="],
|
||||||
@@ -448,6 +491,24 @@
|
|||||||
|
|
||||||
"@prisma/studio-core": ["@prisma/studio-core@0.33.0", "", { "dependencies": { "@radix-ui/react-toggle": "1.1.10", "@visx/curve": "4.0.1-alpha.0", "@visx/event": "4.0.1-alpha.0", "@visx/grid": "4.0.1-alpha.0", "@visx/group": "4.0.1-alpha.0", "@visx/responsive": "4.0.1-alpha.0", "@visx/scale": "4.0.1-alpha.0", "@visx/shape": "4.0.1-alpha.0", "d3-array": "3.2.4", "d3-shape": "3.2.0", "elkjs": "0.11.1" }, "peerDependencies": { "@types/react": "^18.0.0 || ^19.0.0", "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" } }, "sha512-V2fX/nKEymNTrHXwfP26PGjoLStO35Ogu+ex7CFJbLrMYEcZxxZpiSNOs7px23Hk5mzLWvM5RsqG6Ka+rha+wg=="],
|
"@prisma/studio-core": ["@prisma/studio-core@0.33.0", "", { "dependencies": { "@radix-ui/react-toggle": "1.1.10", "@visx/curve": "4.0.1-alpha.0", "@visx/event": "4.0.1-alpha.0", "@visx/grid": "4.0.1-alpha.0", "@visx/group": "4.0.1-alpha.0", "@visx/responsive": "4.0.1-alpha.0", "@visx/scale": "4.0.1-alpha.0", "@visx/shape": "4.0.1-alpha.0", "d3-array": "3.2.4", "d3-shape": "3.2.0", "elkjs": "0.11.1" }, "peerDependencies": { "@types/react": "^18.0.0 || ^19.0.0", "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" } }, "sha512-V2fX/nKEymNTrHXwfP26PGjoLStO35Ogu+ex7CFJbLrMYEcZxxZpiSNOs7px23Hk5mzLWvM5RsqG6Ka+rha+wg=="],
|
||||||
|
|
||||||
|
"@protobufjs/aspromise": ["@protobufjs/aspromise@1.1.2", "", {}, "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ=="],
|
||||||
|
|
||||||
|
"@protobufjs/base64": ["@protobufjs/base64@1.1.2", "", {}, "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg=="],
|
||||||
|
|
||||||
|
"@protobufjs/codegen": ["@protobufjs/codegen@2.0.5", "", {}, "sha512-zgXFLzW3Ap33e6d0Wlj4MGIm6Ce8O89n/apUaGNB/jx+hw+ruWEp7EwGUshdLKVRCxZW12fp9r40E1mQrf/34g=="],
|
||||||
|
|
||||||
|
"@protobufjs/eventemitter": ["@protobufjs/eventemitter@1.1.1", "", {}, "sha512-vW1GmwMZNnL+gMRaovlh9yZX74kc+TTU3FObkkurpMaRtBfLP3ldjS9KQWlwZgraRE0+dheEEoAxdzcJQ8eXZg=="],
|
||||||
|
|
||||||
|
"@protobufjs/fetch": ["@protobufjs/fetch@1.1.1", "", { "dependencies": { "@protobufjs/aspromise": "^1.1.1" } }, "sha512-GpptLrs57adMSuHi3VNj0mAF8dwh36LMaYF6XyJ6JMWlVsc+t42tm1HSEDmOs3A8fC9yyeisgLhsTVQokOZ0zw=="],
|
||||||
|
|
||||||
|
"@protobufjs/float": ["@protobufjs/float@1.0.2", "", {}, "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ=="],
|
||||||
|
|
||||||
|
"@protobufjs/path": ["@protobufjs/path@1.1.2", "", {}, "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA=="],
|
||||||
|
|
||||||
|
"@protobufjs/pool": ["@protobufjs/pool@1.1.0", "", {}, "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw=="],
|
||||||
|
|
||||||
|
"@protobufjs/utf8": ["@protobufjs/utf8@1.1.2", "", {}, "sha512-b1UQwcEZ4yCnMCD8DAL1VlbvBJE9/IX4FTIp7BG1xYpf29SLazLSrqUkj4w7Y5y7cCVP6E5tcqqcI0xemPkHug=="],
|
||||||
|
|
||||||
"@radix-ui/number": ["@radix-ui/number@1.1.3", "", {}, "sha512-Road2bidD0uu/1BGDOWNdPI06g0lIRy6IF9GZcIrDK2KGItfor8IQwQa+yM2ERgHM1MmHxaxpTzk0/Jp42lNfA=="],
|
"@radix-ui/number": ["@radix-ui/number@1.1.3", "", {}, "sha512-Road2bidD0uu/1BGDOWNdPI06g0lIRy6IF9GZcIrDK2KGItfor8IQwQa+yM2ERgHM1MmHxaxpTzk0/Jp42lNfA=="],
|
||||||
|
|
||||||
"@radix-ui/primitive": ["@radix-ui/primitive@1.2.0", "", {}, "sha512-KABY+VMIRPJL+Vyzv/335FEhXXD/xDv8BMb1kl48/aXJZMH0LtHCTx5ga5RnxaEP3nZHtmTLf1P9vanmFX46bw=="],
|
"@radix-ui/primitive": ["@radix-ui/primitive@1.2.0", "", {}, "sha512-KABY+VMIRPJL+Vyzv/335FEhXXD/xDv8BMb1kl48/aXJZMH0LtHCTx5ga5RnxaEP3nZHtmTLf1P9vanmFX46bw=="],
|
||||||
@@ -904,8 +965,6 @@
|
|||||||
|
|
||||||
"at-least-node": ["at-least-node@1.0.0", "", {}, "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg=="],
|
"at-least-node": ["at-least-node@1.0.0", "", {}, "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg=="],
|
||||||
|
|
||||||
"atomic-sleep": ["atomic-sleep@1.0.0", "", {}, "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ=="],
|
|
||||||
|
|
||||||
"atomically": ["atomically@1.7.0", "", {}, "sha512-Xcz9l0z7y9yQ9rdDaxlmaI4uJHf/T8g9hOEzJcsEqX2SjCj4J20uK7+ldkDHMbpJDK76wF7xEIgxc/vSlsfw5w=="],
|
"atomically": ["atomically@1.7.0", "", {}, "sha512-Xcz9l0z7y9yQ9rdDaxlmaI4uJHf/T8g9hOEzJcsEqX2SjCj4J20uK7+ldkDHMbpJDK76wF7xEIgxc/vSlsfw5w=="],
|
||||||
|
|
||||||
"available-typed-arrays": ["available-typed-arrays@1.0.7", "", { "dependencies": { "possible-typed-array-names": "^1.0.0" } }, "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ=="],
|
"available-typed-arrays": ["available-typed-arrays@1.0.7", "", { "dependencies": { "possible-typed-array-names": "^1.0.0" } }, "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ=="],
|
||||||
@@ -982,8 +1041,6 @@
|
|||||||
|
|
||||||
"color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="],
|
"color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="],
|
||||||
|
|
||||||
"colorette": ["colorette@2.0.20", "", {}, "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w=="],
|
|
||||||
|
|
||||||
"commander": ["commander@14.0.3", "", {}, "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw=="],
|
"commander": ["commander@14.0.3", "", {}, "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw=="],
|
||||||
|
|
||||||
"common-tags": ["common-tags@1.8.2", "", {}, "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA=="],
|
"common-tags": ["common-tags@1.8.2", "", {}, "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA=="],
|
||||||
@@ -1050,8 +1107,6 @@
|
|||||||
|
|
||||||
"data-view-byte-offset": ["data-view-byte-offset@1.0.1", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "is-data-view": "^1.0.1" } }, "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ=="],
|
"data-view-byte-offset": ["data-view-byte-offset@1.0.1", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "is-data-view": "^1.0.1" } }, "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ=="],
|
||||||
|
|
||||||
"dateformat": ["dateformat@4.6.3", "", {}, "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA=="],
|
|
||||||
|
|
||||||
"debounce-fn": ["debounce-fn@4.0.0", "", { "dependencies": { "mimic-fn": "^3.0.0" } }, "sha512-8pYCQiL9Xdcg0UPSD3d+0KMlOjp+KGU5EPwYddgzQ7DATsg4fuUDjQtsYLmWjnk2obnNHgV3vE2Y4jejSOJVBQ=="],
|
"debounce-fn": ["debounce-fn@4.0.0", "", { "dependencies": { "mimic-fn": "^3.0.0" } }, "sha512-8pYCQiL9Xdcg0UPSD3d+0KMlOjp+KGU5EPwYddgzQ7DATsg4fuUDjQtsYLmWjnk2obnNHgV3vE2Y4jejSOJVBQ=="],
|
||||||
|
|
||||||
"debug": ["debug@4.4.3", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="],
|
"debug": ["debug@4.4.3", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="],
|
||||||
@@ -1112,8 +1167,6 @@
|
|||||||
|
|
||||||
"encodeurl": ["encodeurl@2.0.0", "", {}, "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg=="],
|
"encodeurl": ["encodeurl@2.0.0", "", {}, "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg=="],
|
||||||
|
|
||||||
"end-of-stream": ["end-of-stream@1.4.5", "", { "dependencies": { "once": "^1.4.0" } }, "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg=="],
|
|
||||||
|
|
||||||
"enhanced-resolve": ["enhanced-resolve@5.26.0", "", { "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.3.3" } }, "sha512-9vhedylFonb2YGogzUKX6+Ja72gOJbN1QHAqdrvqLwhdl/QWbKopzoUC9EbQNVsAns/bx/4uyqalrQAoy1IByw=="],
|
"enhanced-resolve": ["enhanced-resolve@5.26.0", "", { "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.3.3" } }, "sha512-9vhedylFonb2YGogzUKX6+Ja72gOJbN1QHAqdrvqLwhdl/QWbKopzoUC9EbQNVsAns/bx/4uyqalrQAoy1IByw=="],
|
||||||
|
|
||||||
"enquirer": ["enquirer@2.4.1", "", { "dependencies": { "ansi-colors": "^4.1.1", "strip-ansi": "^6.0.1" } }, "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ=="],
|
"enquirer": ["enquirer@2.4.1", "", { "dependencies": { "ansi-colors": "^4.1.1", "strip-ansi": "^6.0.1" } }, "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ=="],
|
||||||
@@ -1170,8 +1223,6 @@
|
|||||||
|
|
||||||
"fast-check": ["fast-check@3.23.2", "", { "dependencies": { "pure-rand": "^6.1.0" } }, "sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A=="],
|
"fast-check": ["fast-check@3.23.2", "", { "dependencies": { "pure-rand": "^6.1.0" } }, "sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A=="],
|
||||||
|
|
||||||
"fast-copy": ["fast-copy@4.1.2", "", {}, "sha512-DUHggaYcouhy5I1LacDJ+JDSqGlumVJP2EAi5Nwt1pWPeLpSvIjkrY+x4fsoI1/+GlTyq+DM9zdgWCFSfqNODA=="],
|
|
||||||
|
|
||||||
"fast-decode-uri-component": ["fast-decode-uri-component@1.0.1", "", {}, "sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg=="],
|
"fast-decode-uri-component": ["fast-decode-uri-component@1.0.1", "", {}, "sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg=="],
|
||||||
|
|
||||||
"fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="],
|
"fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="],
|
||||||
@@ -1182,8 +1233,6 @@
|
|||||||
|
|
||||||
"fast-querystring": ["fast-querystring@1.1.2", "", { "dependencies": { "fast-decode-uri-component": "^1.0.1" } }, "sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg=="],
|
"fast-querystring": ["fast-querystring@1.1.2", "", { "dependencies": { "fast-decode-uri-component": "^1.0.1" } }, "sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg=="],
|
||||||
|
|
||||||
"fast-safe-stringify": ["fast-safe-stringify@2.1.1", "", {}, "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA=="],
|
|
||||||
|
|
||||||
"fast-sha256": ["fast-sha256@1.3.0", "", {}, "sha512-n11RGP/lrWEFI/bWdygLxhI+pVeo1ZYIVwvvPkW7azl/rOy+F3HYRZ2K5zeE9mmkhQppyv9sQFx0JM9UabnpPQ=="],
|
"fast-sha256": ["fast-sha256@1.3.0", "", {}, "sha512-n11RGP/lrWEFI/bWdygLxhI+pVeo1ZYIVwvvPkW7azl/rOy+F3HYRZ2K5zeE9mmkhQppyv9sQFx0JM9UabnpPQ=="],
|
||||||
|
|
||||||
"fast-uri": ["fast-uri@3.1.8", "", {}, "sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg=="],
|
"fast-uri": ["fast-uri@3.1.8", "", {}, "sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg=="],
|
||||||
@@ -1280,8 +1329,6 @@
|
|||||||
|
|
||||||
"hasown": ["hasown@2.0.4", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A=="],
|
"hasown": ["hasown@2.0.4", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A=="],
|
||||||
|
|
||||||
"help-me": ["help-me@5.0.0", "", {}, "sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg=="],
|
|
||||||
|
|
||||||
"hono": ["hono@4.13.13", "", {}, "sha512-CQ46U0ZkAGmbT/4UxdzzGJpacP2IeKgY4a5/tOI9AABbpOMfK739wfDXmv1usCk+3RkKj1hQy4/fjhiwa2xlrA=="],
|
"hono": ["hono@4.13.13", "", {}, "sha512-CQ46U0ZkAGmbT/4UxdzzGJpacP2IeKgY4a5/tOI9AABbpOMfK739wfDXmv1usCk+3RkKj1hQy4/fjhiwa2xlrA=="],
|
||||||
|
|
||||||
"http-errors": ["http-errors@2.0.1", "", { "dependencies": { "depd": "~2.0.0", "inherits": "~2.0.4", "setprototypeof": "~1.2.0", "statuses": "~2.0.2", "toidentifier": "~1.0.1" } }, "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ=="],
|
"http-errors": ["http-errors@2.0.1", "", { "dependencies": { "depd": "~2.0.0", "inherits": "~2.0.4", "setprototypeof": "~1.2.0", "statuses": "~2.0.2", "toidentifier": "~1.0.1" } }, "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ=="],
|
||||||
@@ -1400,8 +1447,6 @@
|
|||||||
|
|
||||||
"jose": ["jose@6.2.12", "", {}, "sha512-9NiFmJEex0sy2Dk58j2UGBSHgUs2ypF9eZSu4L6vjOX3Dp96Sw1F3uL+H+D1sx02jZZdzUT0HgvCy59CuvXcWw=="],
|
"jose": ["jose@6.2.12", "", {}, "sha512-9NiFmJEex0sy2Dk58j2UGBSHgUs2ypF9eZSu4L6vjOX3Dp96Sw1F3uL+H+D1sx02jZZdzUT0HgvCy59CuvXcWw=="],
|
||||||
|
|
||||||
"joycon": ["joycon@3.1.1", "", {}, "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw=="],
|
|
||||||
|
|
||||||
"js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="],
|
"js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="],
|
||||||
|
|
||||||
"jsesc": ["jsesc@3.1.0", "", { "bin": { "jsesc": "bin/jsesc" } }, "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA=="],
|
"jsesc": ["jsesc@3.1.0", "", { "bin": { "jsesc": "bin/jsesc" } }, "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA=="],
|
||||||
@@ -1450,6 +1495,8 @@
|
|||||||
|
|
||||||
"lodash": ["lodash@4.17.21", "", {}, "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="],
|
"lodash": ["lodash@4.17.21", "", {}, "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="],
|
||||||
|
|
||||||
|
"lodash.camelcase": ["lodash.camelcase@4.3.0", "", {}, "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA=="],
|
||||||
|
|
||||||
"lodash.debounce": ["lodash.debounce@4.0.8", "", {}, "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow=="],
|
"lodash.debounce": ["lodash.debounce@4.0.8", "", {}, "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow=="],
|
||||||
|
|
||||||
"log-symbols": ["log-symbols@6.0.0", "", { "dependencies": { "chalk": "^5.3.0", "is-unicode-supported": "^1.3.0" } }, "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw=="],
|
"log-symbols": ["log-symbols@6.0.0", "", { "dependencies": { "chalk": "^5.3.0", "is-unicode-supported": "^1.3.0" } }, "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw=="],
|
||||||
@@ -1520,8 +1567,6 @@
|
|||||||
|
|
||||||
"ohash": ["ohash@2.0.12", "", {}, "sha512-65S/5gk9YSsaRjcyf7Nfa6h/d3E8/1gslpXfI4W7Dxn/oap8IKRuNT5VXkLQ1YFKIEg4apRY4Pj6aiwFzrDdmw=="],
|
"ohash": ["ohash@2.0.12", "", {}, "sha512-65S/5gk9YSsaRjcyf7Nfa6h/d3E8/1gslpXfI4W7Dxn/oap8IKRuNT5VXkLQ1YFKIEg4apRY4Pj6aiwFzrDdmw=="],
|
||||||
|
|
||||||
"on-exit-leak-free": ["on-exit-leak-free@2.1.2", "", {}, "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA=="],
|
|
||||||
|
|
||||||
"on-finished": ["on-finished@2.4.1", "", { "dependencies": { "ee-first": "1.1.1" } }, "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg=="],
|
"on-finished": ["on-finished@2.4.1", "", { "dependencies": { "ee-first": "1.1.1" } }, "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg=="],
|
||||||
|
|
||||||
"once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="],
|
"once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="],
|
||||||
@@ -1582,14 +1627,6 @@
|
|||||||
|
|
||||||
"picomatch": ["picomatch@4.0.7", "", {}, "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA=="],
|
"picomatch": ["picomatch@4.0.7", "", {}, "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA=="],
|
||||||
|
|
||||||
"pino": ["pino@10.4.0", "", { "dependencies": { "@pinojs/redact": "^0.4.0", "atomic-sleep": "^1.0.0", "on-exit-leak-free": "^2.1.0", "pino-abstract-transport": "^3.0.0", "pino-std-serializers": "^7.0.0", "process-warning": "^5.0.0", "quick-format-unescaped": "^4.0.3", "real-require": "^1.0.0", "safe-stable-stringify": "^2.3.1", "sonic-boom": "^4.0.1", "thread-stream": "^4.0.0" }, "bin": { "pino": "bin.js" } }, "sha512-bk1ZMTwG/Vymx+zPoa28MhNzucFvXJWp3csrSuxuHPSMeUettaCoQ5Jvg07mtC4JGNpcfTwz41oVCnNgBK9+vA=="],
|
|
||||||
|
|
||||||
"pino-abstract-transport": ["pino-abstract-transport@3.0.0", "", { "dependencies": { "split2": "^4.0.0" } }, "sha512-wlfUczU+n7Hy/Ha5j9a/gZNy7We5+cXp8YL+X+PG8S0KXxw7n/JXA3c46Y0zQznIJ83URJiwy7Lh56WLokNuxg=="],
|
|
||||||
|
|
||||||
"pino-pretty": ["pino-pretty@13.2.0", "", { "dependencies": { "colorette": "^2.0.7", "dateformat": "^4.6.3", "fast-copy": "^4.0.0", "fast-safe-stringify": "^2.1.1", "help-me": "^5.0.0", "joycon": "^3.1.1", "minimist": "^1.2.6", "on-exit-leak-free": "^2.1.2", "pino-abstract-transport": "^3.0.0", "pump": "^3.0.3", "secure-json-parse": "^4.1.0", "sonic-boom": "^5.0.0", "strip-json-comments": "^5.0.3" }, "bin": { "pino-pretty": "bin.js" } }, "sha512-jjghD1ML+Di/WxjJDz6j6Y4FT7hIXOlb8h27AyJ+ohtAXJXH4PS/xkv7si+RCCIW59HMgZsMKTDgzdr0RhuRrg=="],
|
|
||||||
|
|
||||||
"pino-std-serializers": ["pino-std-serializers@7.1.0", "", {}, "sha512-BndPH67/JxGExRgiX1dX0w1FvZck5Wa4aal9198SrRhZjH3GxKQUKIBnYJTdj2HDN3UQAS06HlfcSbQj2OHmaw=="],
|
|
||||||
|
|
||||||
"pkce-challenge": ["pkce-challenge@5.0.1", "", {}, "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ=="],
|
"pkce-challenge": ["pkce-challenge@5.0.1", "", {}, "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ=="],
|
||||||
|
|
||||||
"pkg-types": ["pkg-types@2.3.3", "", { "dependencies": { "confbox": "^0.3.1", "exsolve": "^1.1.1", "pathe": "^2.0.3" } }, "sha512-j/lCFdcppV0JxWpCEITdbDltBxPP6cHT+yNJ6Go2OgoSA9518X847X9z0p6LtA4Nc16+eQzCZjRrWanTGvHJ5w=="],
|
"pkg-types": ["pkg-types@2.3.3", "", { "dependencies": { "confbox": "^0.3.1", "exsolve": "^1.1.1", "pathe": "^2.0.3" } }, "sha512-j/lCFdcppV0JxWpCEITdbDltBxPP6cHT+yNJ6Go2OgoSA9518X847X9z0p6LtA4Nc16+eQzCZjRrWanTGvHJ5w=="],
|
||||||
@@ -1624,15 +1661,13 @@
|
|||||||
|
|
||||||
"prisma": ["prisma@7.10.0", "", { "dependencies": { "@prisma/config": "7.10.0", "@prisma/dev": "0.24.17", "@prisma/engines": "7.10.0", "@prisma/studio-core": "0.33.0", "mysql2": "3.15.3", "postgres": "3.4.7" }, "peerDependencies": { "better-sqlite3": ">=9.0.0", "typescript": ">=5.4.0" }, "optionalPeers": ["better-sqlite3", "typescript"], "bin": { "prisma": "build/index.js" } }, "sha512-o0ornyJOWgygVAzGCpr8PdXV8EJLHyVGDDUr/voBQt8Azzw8cYTByzzPGcA/m4tCkPcnJA8raEOv2CslsKhPEw=="],
|
"prisma": ["prisma@7.10.0", "", { "dependencies": { "@prisma/config": "7.10.0", "@prisma/dev": "0.24.17", "@prisma/engines": "7.10.0", "@prisma/studio-core": "0.33.0", "mysql2": "3.15.3", "postgres": "3.4.7" }, "peerDependencies": { "better-sqlite3": ">=9.0.0", "typescript": ">=5.4.0" }, "optionalPeers": ["better-sqlite3", "typescript"], "bin": { "prisma": "build/index.js" } }, "sha512-o0ornyJOWgygVAzGCpr8PdXV8EJLHyVGDDUr/voBQt8Azzw8cYTByzzPGcA/m4tCkPcnJA8raEOv2CslsKhPEw=="],
|
||||||
|
|
||||||
"process-warning": ["process-warning@5.1.1", "", {}, "sha512-oCkNVj4OKnKEcocVBcDfiIugN1/cE6rgfT3nCtzeqZPA8+rIxMaQ0xXzIkGP8Gj2qUaP1UR7uhJ1VD8lUCpzCg=="],
|
|
||||||
|
|
||||||
"prompts": ["prompts@2.4.2", "", { "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" } }, "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q=="],
|
"prompts": ["prompts@2.4.2", "", { "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" } }, "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q=="],
|
||||||
|
|
||||||
"proper-lockfile": ["proper-lockfile@4.1.2", "", { "dependencies": { "graceful-fs": "^4.2.4", "retry": "^0.12.0", "signal-exit": "^3.0.2" } }, "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA=="],
|
"proper-lockfile": ["proper-lockfile@4.1.2", "", { "dependencies": { "graceful-fs": "^4.2.4", "retry": "^0.12.0", "signal-exit": "^3.0.2" } }, "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA=="],
|
||||||
|
|
||||||
"proxy-addr": ["proxy-addr@2.0.8", "", { "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" } }, "sha512-5nnx0yGyVUcY6t9RnWcARWtwT9F1D8O9rt08htPvnd49W1IgZtmLkhu9WfMzQj1cFxjHIO6connUNVW5k7AVyQ=="],
|
"protobufjs": ["protobufjs@7.6.6", "", { "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", "@protobufjs/codegen": "^2.0.5", "@protobufjs/eventemitter": "^1.1.1", "@protobufjs/fetch": "^1.1.1", "@protobufjs/float": "^1.0.2", "@protobufjs/path": "^1.1.2", "@protobufjs/pool": "^1.1.0", "@protobufjs/utf8": "^1.1.1", "@types/node": ">=13.7.0", "long": "^5.3.2" } }, "sha512-dYDWdjSl5RNb7SgPxGQcRU+GtvP7s2fpkrY0r432PcOIaZ0/rBcxEZnQN67iJhFuQiVw754JDoPruPCNdGsbjg=="],
|
||||||
|
|
||||||
"pump": ["pump@3.0.4", "", { "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA=="],
|
"proxy-addr": ["proxy-addr@2.0.8", "", { "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" } }, "sha512-5nnx0yGyVUcY6t9RnWcARWtwT9F1D8O9rt08htPvnd49W1IgZtmLkhu9WfMzQj1cFxjHIO6connUNVW5k7AVyQ=="],
|
||||||
|
|
||||||
"pure-rand": ["pure-rand@6.1.0", "", {}, "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA=="],
|
"pure-rand": ["pure-rand@6.1.0", "", {}, "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA=="],
|
||||||
|
|
||||||
@@ -1644,8 +1679,6 @@
|
|||||||
|
|
||||||
"queue-microtask": ["queue-microtask@1.2.3", "", {}, "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="],
|
"queue-microtask": ["queue-microtask@1.2.3", "", {}, "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="],
|
||||||
|
|
||||||
"quick-format-unescaped": ["quick-format-unescaped@4.0.4", "", {}, "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg=="],
|
|
||||||
|
|
||||||
"radix-ui": ["radix-ui@1.8.0", "", { "dependencies": { "@radix-ui/primitive": "1.2.0", "@radix-ui/react-accessible-icon": "1.2.0", "@radix-ui/react-accordion": "1.3.0", "@radix-ui/react-alert-dialog": "1.2.0", "@radix-ui/react-arrow": "1.1.17", "@radix-ui/react-aspect-ratio": "1.2.0", "@radix-ui/react-avatar": "1.3.0", "@radix-ui/react-checkbox": "1.4.0", "@radix-ui/react-collapsible": "1.2.0", "@radix-ui/react-collection": "1.2.0", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.3.0", "@radix-ui/react-context-menu": "2.4.0", "@radix-ui/react-dialog": "1.3.0", "@radix-ui/react-direction": "1.2.0", "@radix-ui/react-dismissable-layer": "1.2.0", "@radix-ui/react-dropdown-menu": "2.2.0", "@radix-ui/react-focus-guards": "1.2.0", "@radix-ui/react-focus-scope": "1.3.0", "@radix-ui/react-form": "0.3.0", "@radix-ui/react-hover-card": "1.2.0", "@radix-ui/react-label": "2.1.17", "@radix-ui/react-menu": "2.2.0", "@radix-ui/react-menubar": "1.2.0", "@radix-ui/react-navigation-menu": "1.4.0", "@radix-ui/react-one-time-password-field": "0.2.0", "@radix-ui/react-password-toggle-field": "0.2.0", "@radix-ui/react-popover": "1.3.0", "@radix-ui/react-popper": "1.4.0", "@radix-ui/react-portal": "1.2.0", "@radix-ui/react-presence": "1.1.11", "@radix-ui/react-primitive": "2.2.0", "@radix-ui/react-progress": "1.2.0", "@radix-ui/react-radio-group": "1.5.0", "@radix-ui/react-roving-focus": "1.2.0", "@radix-ui/react-scroll-area": "1.4.0", "@radix-ui/react-select": "2.4.0", "@radix-ui/react-separator": "1.2.0", "@radix-ui/react-slider": "1.6.0", "@radix-ui/react-slot": "1.5.0", "@radix-ui/react-switch": "1.4.0", "@radix-ui/react-tabs": "1.2.0", "@radix-ui/react-toast": "1.3.0", "@radix-ui/react-toggle": "1.2.0", "@radix-ui/react-toggle-group": "1.2.0", "@radix-ui/react-toolbar": "1.2.0", "@radix-ui/react-tooltip": "1.4.0", "@radix-ui/react-use-callback-ref": "1.1.5", "@radix-ui/react-use-controllable-state": "1.3.0", "@radix-ui/react-use-effect-event": "0.0.5", "@radix-ui/react-use-escape-keydown": "1.1.6", "@radix-ui/react-use-is-hydrated": "0.1.3", "@radix-ui/react-use-layout-effect": "1.1.4", "@radix-ui/react-use-size": "1.1.5", "@radix-ui/react-visually-hidden": "1.2.13" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-d2p7l6XzZ9agJABImQYTFSbALCqaieTEXs2TmVNpT4cFam6RD91rsucu0VhMs45Oe35rQVWJk8PoDej0z/w3yg=="],
|
"radix-ui": ["radix-ui@1.8.0", "", { "dependencies": { "@radix-ui/primitive": "1.2.0", "@radix-ui/react-accessible-icon": "1.2.0", "@radix-ui/react-accordion": "1.3.0", "@radix-ui/react-alert-dialog": "1.2.0", "@radix-ui/react-arrow": "1.1.17", "@radix-ui/react-aspect-ratio": "1.2.0", "@radix-ui/react-avatar": "1.3.0", "@radix-ui/react-checkbox": "1.4.0", "@radix-ui/react-collapsible": "1.2.0", "@radix-ui/react-collection": "1.2.0", "@radix-ui/react-compose-refs": "1.1.5", "@radix-ui/react-context": "1.3.0", "@radix-ui/react-context-menu": "2.4.0", "@radix-ui/react-dialog": "1.3.0", "@radix-ui/react-direction": "1.2.0", "@radix-ui/react-dismissable-layer": "1.2.0", "@radix-ui/react-dropdown-menu": "2.2.0", "@radix-ui/react-focus-guards": "1.2.0", "@radix-ui/react-focus-scope": "1.3.0", "@radix-ui/react-form": "0.3.0", "@radix-ui/react-hover-card": "1.2.0", "@radix-ui/react-label": "2.1.17", "@radix-ui/react-menu": "2.2.0", "@radix-ui/react-menubar": "1.2.0", "@radix-ui/react-navigation-menu": "1.4.0", "@radix-ui/react-one-time-password-field": "0.2.0", "@radix-ui/react-password-toggle-field": "0.2.0", "@radix-ui/react-popover": "1.3.0", "@radix-ui/react-popper": "1.4.0", "@radix-ui/react-portal": "1.2.0", "@radix-ui/react-presence": "1.1.11", "@radix-ui/react-primitive": "2.2.0", "@radix-ui/react-progress": "1.2.0", "@radix-ui/react-radio-group": "1.5.0", "@radix-ui/react-roving-focus": "1.2.0", "@radix-ui/react-scroll-area": "1.4.0", "@radix-ui/react-select": "2.4.0", "@radix-ui/react-separator": "1.2.0", "@radix-ui/react-slider": "1.6.0", "@radix-ui/react-slot": "1.5.0", "@radix-ui/react-switch": "1.4.0", "@radix-ui/react-tabs": "1.2.0", "@radix-ui/react-toast": "1.3.0", "@radix-ui/react-toggle": "1.2.0", "@radix-ui/react-toggle-group": "1.2.0", "@radix-ui/react-toolbar": "1.2.0", "@radix-ui/react-tooltip": "1.4.0", "@radix-ui/react-use-callback-ref": "1.1.5", "@radix-ui/react-use-controllable-state": "1.3.0", "@radix-ui/react-use-effect-event": "0.0.5", "@radix-ui/react-use-escape-keydown": "1.1.6", "@radix-ui/react-use-is-hydrated": "0.1.3", "@radix-ui/react-use-layout-effect": "1.1.4", "@radix-ui/react-use-size": "1.1.5", "@radix-ui/react-visually-hidden": "1.2.13" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-d2p7l6XzZ9agJABImQYTFSbALCqaieTEXs2TmVNpT4cFam6RD91rsucu0VhMs45Oe35rQVWJk8PoDej0z/w3yg=="],
|
||||||
|
|
||||||
"range-parser": ["range-parser@1.3.0", "", {}, "sha512-hek2mFQpPuI4E1BBKrSto+BU3e3x4xuarsbiwr3+lf7p44juvFMV0XFWQAP3xUyqXA4RrXLIoaSUGbSt056ZMw=="],
|
"range-parser": ["range-parser@1.3.0", "", {}, "sha512-hek2mFQpPuI4E1BBKrSto+BU3e3x4xuarsbiwr3+lf7p44juvFMV0XFWQAP3xUyqXA4RrXLIoaSUGbSt056ZMw=="],
|
||||||
@@ -1672,8 +1705,6 @@
|
|||||||
|
|
||||||
"readdirp": ["readdirp@5.1.1", "", {}, "sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA=="],
|
"readdirp": ["readdirp@5.1.1", "", {}, "sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA=="],
|
||||||
|
|
||||||
"real-require": ["real-require@1.0.0", "", {}, "sha512-P4nbQYQfePJxRSmY+v/KINxVucm4NF3p3s7pJveMTtom52FR4YGltUQLB8idDXwDDWW+eYrWDFbuzUnjoWHF7g=="],
|
|
||||||
|
|
||||||
"recast": ["recast@0.23.21", "", { "dependencies": { "ast-types": "^0.16.1", "esprima": "~4.0.0", "source-map": "~0.6.1", "tiny-invariant": "^1.3.3", "tslib": "^2.0.1" } }, "sha512-mFAyJq9vUbSTARLZUvAEf1z3YxlvAwswbmxMx2mPA/MSm4KmpwvwvhsH/NIrZhyOuwD60Lzyw2qh83uCbgTPYw=="],
|
"recast": ["recast@0.23.21", "", { "dependencies": { "ast-types": "^0.16.1", "esprima": "~4.0.0", "source-map": "~0.6.1", "tiny-invariant": "^1.3.3", "tslib": "^2.0.1" } }, "sha512-mFAyJq9vUbSTARLZUvAEf1z3YxlvAwswbmxMx2mPA/MSm4KmpwvwvhsH/NIrZhyOuwD60Lzyw2qh83uCbgTPYw=="],
|
||||||
|
|
||||||
"recharts": ["recharts@3.10.1", "", { "dependencies": { "@reduxjs/toolkit": "^1.9.0 || 2.x.x", "clsx": "^2.1.1", "decimal.js-light": "^2.5.1", "es-toolkit": "^1.39.3", "eventemitter3": "^5.0.1", "immer": "^11.1.8", "react-redux": "8.x.x || 9.x.x", "reselect": "5.2.0", "tiny-invariant": "^1.3.3", "use-sync-external-store": "^1.2.2", "victory-vendor": "^37.0.2" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-is": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-QXFrvt6IVcw7eeZCoyXTwkIJAX3Dv1nyVhMicXJ47GsGDDpcN8z6o644DibE9XjpBTThtsomLKnTV6lc+cVFUA=="],
|
"recharts": ["recharts@3.10.1", "", { "dependencies": { "@reduxjs/toolkit": "^1.9.0 || 2.x.x", "clsx": "^2.1.1", "decimal.js-light": "^2.5.1", "es-toolkit": "^1.39.3", "eventemitter3": "^5.0.1", "immer": "^11.1.8", "react-redux": "8.x.x || 9.x.x", "reselect": "5.2.0", "tiny-invariant": "^1.3.3", "use-sync-external-store": "^1.2.2", "victory-vendor": "^37.0.2" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-is": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-QXFrvt6IVcw7eeZCoyXTwkIJAX3Dv1nyVhMicXJ47GsGDDpcN8z6o644DibE9XjpBTThtsomLKnTV6lc+cVFUA=="],
|
||||||
@@ -1742,14 +1773,10 @@
|
|||||||
|
|
||||||
"safe-regex2": ["safe-regex2@5.1.2", "", { "dependencies": { "ret": "~0.5.0" }, "bin": { "safe-regex2": "bin/safe-regex2.js" } }, "sha512-tAtCGFPPP02VroDVzp4daGi6bC7jWG+41D47GKf18FeH/ubvKQHT9VmhAkvtjNOmJwqtApzWeUpEhkyEYULvmw=="],
|
"safe-regex2": ["safe-regex2@5.1.2", "", { "dependencies": { "ret": "~0.5.0" }, "bin": { "safe-regex2": "bin/safe-regex2.js" } }, "sha512-tAtCGFPPP02VroDVzp4daGi6bC7jWG+41D47GKf18FeH/ubvKQHT9VmhAkvtjNOmJwqtApzWeUpEhkyEYULvmw=="],
|
||||||
|
|
||||||
"safe-stable-stringify": ["safe-stable-stringify@2.5.0", "", {}, "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA=="],
|
|
||||||
|
|
||||||
"safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="],
|
"safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="],
|
||||||
|
|
||||||
"scheduler": ["scheduler@0.28.0", "", {}, "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw=="],
|
"scheduler": ["scheduler@0.28.0", "", {}, "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw=="],
|
||||||
|
|
||||||
"secure-json-parse": ["secure-json-parse@4.1.1", "", {}, "sha512-lnd81MQEZKjhW/Gd2TQqdd4XP6QYNdDW/EP+I7nTrFHP9y2LmaGPIHk9xsnzcOiEr1c39c/e84xFgGviQKBTRw=="],
|
|
||||||
|
|
||||||
"semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="],
|
"semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="],
|
||||||
|
|
||||||
"send": ["send@1.2.1", "", { "dependencies": { "debug": "^4.4.3", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", "fresh": "^2.0.0", "http-errors": "^2.0.1", "mime-types": "^3.0.2", "ms": "^2.1.3", "on-finished": "^2.4.1", "range-parser": "^1.2.1", "statuses": "^2.0.2" } }, "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ=="],
|
"send": ["send@1.2.1", "", { "dependencies": { "debug": "^4.4.3", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", "fresh": "^2.0.0", "http-errors": "^2.0.1", "mime-types": "^3.0.2", "ms": "^2.1.3", "on-finished": "^2.4.1", "range-parser": "^1.2.1", "statuses": "^2.0.2" } }, "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ=="],
|
||||||
@@ -1806,8 +1833,6 @@
|
|||||||
|
|
||||||
"solid-transition-group": ["solid-transition-group@0.2.3", "", { "dependencies": { "@solid-primitives/refs": "^1.0.5", "@solid-primitives/transition-group": "^1.0.2" }, "peerDependencies": { "solid-js": "^1.6.12" } }, "sha512-iB72c9N5Kz9ykRqIXl0lQohOau4t0dhel9kjwFvx81UZJbVwaChMuBuyhiZmK24b8aKEK0w3uFM96ZxzcyZGdg=="],
|
"solid-transition-group": ["solid-transition-group@0.2.3", "", { "dependencies": { "@solid-primitives/refs": "^1.0.5", "@solid-primitives/transition-group": "^1.0.2" }, "peerDependencies": { "solid-js": "^1.6.12" } }, "sha512-iB72c9N5Kz9ykRqIXl0lQohOau4t0dhel9kjwFvx81UZJbVwaChMuBuyhiZmK24b8aKEK0w3uFM96ZxzcyZGdg=="],
|
||||||
|
|
||||||
"sonic-boom": ["sonic-boom@4.2.1", "", { "dependencies": { "atomic-sleep": "^1.0.0" } }, "sha512-w6AxtubXa2wTXAUsZMMWERrsIRAdrK0Sc+FUytWvYAhBJLyuI4llrMIC1DtlNSdI99EI86KZum2MMq3EAZlF9Q=="],
|
|
||||||
|
|
||||||
"sonner": ["sonner@2.0.8", "", { "peerDependencies": { "@types/react": "^18.0.0 || ^19.0.0", "react": "^18.0.0 || ^19.0.0 || ^19.0.0-rc", "react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-UM/ByIoFra8yzV75n1o0Puu0bw5U/9UNnDacrJNspekBewIfsQ3D6ez1nvlWpt7aTsO6rujQtifBpycwIivqlg=="],
|
"sonner": ["sonner@2.0.8", "", { "peerDependencies": { "@types/react": "^18.0.0 || ^19.0.0", "react": "^18.0.0 || ^19.0.0 || ^19.0.0-rc", "react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-UM/ByIoFra8yzV75n1o0Puu0bw5U/9UNnDacrJNspekBewIfsQ3D6ez1nvlWpt7aTsO6rujQtifBpycwIivqlg=="],
|
||||||
|
|
||||||
"source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="],
|
"source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="],
|
||||||
@@ -1850,8 +1875,6 @@
|
|||||||
|
|
||||||
"strip-final-newline": ["strip-final-newline@4.0.0", "", {}, "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw=="],
|
"strip-final-newline": ["strip-final-newline@4.0.0", "", {}, "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw=="],
|
||||||
|
|
||||||
"strip-json-comments": ["strip-json-comments@5.0.3", "", {}, "sha512-1tB5mhVo7U+ETBKNf92xT4hrQa3pm0MZ0PQvuDnWgAAGHDsfp4lPSpiS6psrSiet87wyGPh9ft6wmhOMQ0hDiw=="],
|
|
||||||
|
|
||||||
"superjson": ["superjson@2.2.6", "", { "dependencies": { "copy-anything": "^4" } }, "sha512-H+ue8Zo4vJmV2nRjpx86P35lzwDT3nItnIsocgumgr0hHMQ+ZGq5vrERg9kJBo5AWGmxZDhzDo+WVIJqkB0cGA=="],
|
"superjson": ["superjson@2.2.6", "", { "dependencies": { "copy-anything": "^4" } }, "sha512-H+ue8Zo4vJmV2nRjpx86P35lzwDT3nItnIsocgumgr0hHMQ+ZGq5vrERg9kJBo5AWGmxZDhzDo+WVIJqkB0cGA=="],
|
||||||
|
|
||||||
"supports-preserve-symlinks-flag": ["supports-preserve-symlinks-flag@1.0.0", "", {}, "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="],
|
"supports-preserve-symlinks-flag": ["supports-preserve-symlinks-flag@1.0.0", "", {}, "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="],
|
||||||
@@ -1870,8 +1893,6 @@
|
|||||||
|
|
||||||
"terser": ["terser@5.51.2", "", { "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.15.0", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, "bin": { "terser": "bin/terser" } }, "sha512-bWnjSNscmuI+GJze6ZupnHP8G/cTcsJF+bXCeQknk2SHQsgbNJnLrqiH9jZ2W4STPVXH2mDKKRX3iwPhc9Cn/Q=="],
|
"terser": ["terser@5.51.2", "", { "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.15.0", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, "bin": { "terser": "bin/terser" } }, "sha512-bWnjSNscmuI+GJze6ZupnHP8G/cTcsJF+bXCeQknk2SHQsgbNJnLrqiH9jZ2W4STPVXH2mDKKRX3iwPhc9Cn/Q=="],
|
||||||
|
|
||||||
"thread-stream": ["thread-stream@4.2.0", "", { "dependencies": { "real-require": "^1.0.0" } }, "sha512-e2zZ96wSChazBsbENf/Pcm/4swHt2cEKQ92rhUjkL9GCKiTDJIaTBenjE/m9DXi0QBmTMDkFDdOomUy20A1tDQ=="],
|
|
||||||
|
|
||||||
"tiny-invariant": ["tiny-invariant@1.3.3", "", {}, "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg=="],
|
"tiny-invariant": ["tiny-invariant@1.3.3", "", {}, "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg=="],
|
||||||
|
|
||||||
"tinybench": ["tinybench@6.2.2", "", {}, "sha512-nIZ2N2dFpjBsg2hgitKu7mA+FvsIJuGJOwysRngmVRRmWgR/UyPjwJj8c/fT/dhm8EkHnF5EOogRf+0Z2qrimA=="],
|
"tinybench": ["tinybench@6.2.2", "", {}, "sha512-nIZ2N2dFpjBsg2hgitKu7mA+FvsIJuGJOwysRngmVRRmWgR/UyPjwJj8c/fT/dhm8EkHnF5EOogRf+0Z2qrimA=="],
|
||||||
@@ -2040,6 +2061,12 @@
|
|||||||
|
|
||||||
"@dotenvx/dotenvx/open": ["open@8.4.2", "", { "dependencies": { "define-lazy-prop": "^2.0.0", "is-docker": "^2.1.1", "is-wsl": "^2.2.0" } }, "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ=="],
|
"@dotenvx/dotenvx/open": ["open@8.4.2", "", { "dependencies": { "define-lazy-prop": "^2.0.0", "is-docker": "^2.1.1", "is-wsl": "^2.2.0" } }, "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ=="],
|
||||||
|
|
||||||
|
"@logtape/otel/@opentelemetry/api": ["@opentelemetry/api@1.10.0", "", {}, "sha512-lMkyes8iHrG+mk6WH7X70MdCLI2RS0FwNBY1PyQ8UemaijE2m5mv5A0Niy3HtbYTFrgkUEQjFMXmSAk2hQDuPQ=="],
|
||||||
|
|
||||||
|
"@logtape/otel/@opentelemetry/resources": ["@opentelemetry/resources@2.12.0", "", { "dependencies": { "@opentelemetry/core": "2.12.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.3.0 <1.10.0" } }, "sha512-+rSRoOdln6NhXTVcBdHSlZxJDNzwxadeweK2ltZO3tVtfp6aklABc06xclDk6ovRR+EiGgIcSbh/6NgjFhnb3A=="],
|
||||||
|
|
||||||
|
"@opentelemetry/api-logs/@opentelemetry/api": ["@opentelemetry/api@1.10.0", "", {}, "sha512-lMkyes8iHrG+mk6WH7X70MdCLI2RS0FwNBY1PyQ8UemaijE2m5mv5A0Niy3HtbYTFrgkUEQjFMXmSAk2hQDuPQ=="],
|
||||||
|
|
||||||
"@prisma/dev/std-env": ["std-env@3.10.0", "", {}, "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg=="],
|
"@prisma/dev/std-env": ["std-env@3.10.0", "", {}, "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg=="],
|
||||||
|
|
||||||
"@prisma/engines/@prisma/get-platform": ["@prisma/get-platform@7.10.0", "", { "dependencies": { "@prisma/debug": "7.10.0" } }, "sha512-0bra1LFYi8xNw0yqV62bHJNQk4BKleOngZiqPWIQc7a3+9q6rqsnqJ15BuepP8943PFMvtmgnP52juZsyYkA6w=="],
|
"@prisma/engines/@prisma/get-platform": ["@prisma/get-platform@7.10.0", "", { "dependencies": { "@prisma/debug": "7.10.0" } }, "sha512-0bra1LFYi8xNw0yqV62bHJNQk4BKleOngZiqPWIQc7a3+9q6rqsnqJ15BuepP8943PFMvtmgnP52juZsyYkA6w=="],
|
||||||
@@ -2144,14 +2171,14 @@
|
|||||||
|
|
||||||
"pg-types/postgres-array": ["postgres-array@2.0.0", "", {}, "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA=="],
|
"pg-types/postgres-array": ["postgres-array@2.0.0", "", {}, "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA=="],
|
||||||
|
|
||||||
"pino-pretty/sonic-boom": ["sonic-boom@5.0.2", "", { "dependencies": { "atomic-sleep": "^1.0.0" } }, "sha512-/JEruzo6yhNVhsLblTRchgTQHIt7SsdJP0YyrfWaNKjIOQDfrdZv9gwYraYCAsmKV39/LAdV31FLL5NCDpoL/A=="],
|
|
||||||
|
|
||||||
"pkg-types/confbox": ["confbox@0.3.1", "", {}, "sha512-cKUSoKa8YxFZZSmraVi7onONx3amu77ngK3kGpsYHDH7drPwCRkQE1RYMPlLRrMtnciRj274XNRxcHxnKmDSnA=="],
|
"pkg-types/confbox": ["confbox@0.3.1", "", {}, "sha512-cKUSoKa8YxFZZSmraVi7onONx3amu77ngK3kGpsYHDH7drPwCRkQE1RYMPlLRrMtnciRj274XNRxcHxnKmDSnA=="],
|
||||||
|
|
||||||
"prompts/kleur": ["kleur@3.0.3", "", {}, "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w=="],
|
"prompts/kleur": ["kleur@3.0.3", "", {}, "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w=="],
|
||||||
|
|
||||||
"proper-lockfile/signal-exit": ["signal-exit@3.0.7", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="],
|
"proper-lockfile/signal-exit": ["signal-exit@3.0.7", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="],
|
||||||
|
|
||||||
|
"protobufjs/@types/node": ["@types/node@26.6.5", "", { "dependencies": { "undici-types": "~8.9.0" } }, "sha512-uMzsv9stDdofIZBx4UGh4Z9ZgXnGC9seRDscilBcTHAeOFk67MZg/k9bWVfO+bk4qZmG+l52hRnLwUiH2LnJTg=="],
|
||||||
|
|
||||||
"restore-cursor/onetime": ["onetime@7.0.0", "", { "dependencies": { "mimic-function": "^5.0.0" } }, "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ=="],
|
"restore-cursor/onetime": ["onetime@7.0.0", "", { "dependencies": { "mimic-function": "^5.0.0" } }, "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ=="],
|
||||||
|
|
||||||
"shadcn/cn": ["cn@0.2.6", "", { "bin": { "cn": "bin/cn.mjs" } }, "sha512-+i4L0zUGgRcEnhsxueVrP7iBGxBx5iD0WOTYg1MwFEu2ZyCmH5Ov2V1cul2Ht5UchRQQgftCf4be/RxspuW6QQ=="],
|
"shadcn/cn": ["cn@0.2.6", "", { "bin": { "cn": "bin/cn.mjs" } }, "sha512-+i4L0zUGgRcEnhsxueVrP7iBGxBx5iD0WOTYg1MwFEu2ZyCmH5Ov2V1cul2Ht5UchRQQgftCf4be/RxspuW6QQ=="],
|
||||||
@@ -2196,6 +2223,8 @@
|
|||||||
|
|
||||||
"@dotenvx/dotenvx/open/define-lazy-prop": ["define-lazy-prop@2.0.0", "", {}, "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og=="],
|
"@dotenvx/dotenvx/open/define-lazy-prop": ["define-lazy-prop@2.0.0", "", {}, "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og=="],
|
||||||
|
|
||||||
|
"@logtape/otel/@opentelemetry/resources/@opentelemetry/core": ["@opentelemetry/core@2.12.0", "", { "dependencies": { "@opentelemetry/semantic-conventions": "^1.29.0" }, "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, "sha512-1HsSAuvT4/my0QrXWsyXFdWjKaPeCHsismKZgEEIb8NK13LP6DrMRlsUbvD/0F9mDWK3xDom9AMv3IscxgOnOQ=="],
|
||||||
|
|
||||||
"@prisma/studio-core/@radix-ui/react-toggle/@radix-ui/primitive": ["@radix-ui/primitive@1.1.3", "", {}, "sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg=="],
|
"@prisma/studio-core/@radix-ui/react-toggle/@radix-ui/primitive": ["@radix-ui/primitive@1.1.3", "", {}, "sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg=="],
|
||||||
|
|
||||||
"@prisma/studio-core/@radix-ui/react-toggle/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="],
|
"@prisma/studio-core/@radix-ui/react-toggle/@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="],
|
||||||
@@ -2240,6 +2269,8 @@
|
|||||||
|
|
||||||
"ora/string-width/emoji-regex": ["emoji-regex@10.6.0", "", {}, "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A=="],
|
"ora/string-width/emoji-regex": ["emoji-regex@10.6.0", "", {}, "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A=="],
|
||||||
|
|
||||||
|
"protobufjs/@types/node/undici-types": ["undici-types@8.9.0", "", {}, "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg=="],
|
||||||
|
|
||||||
"string-width/strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
|
"string-width/strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
|
||||||
|
|
||||||
"workbox-build/stringify-object/is-obj": ["is-obj@1.0.1", "", {}, "sha512-l4RyHgRqGN4Y3+9JHVrNqO+tN0rV5My76uW5/nuO4K1b6vw5G8d/cmFjP9tRfEsdhZNt0IFdZuK/c2Vr4Nb+Qg=="],
|
"workbox-build/stringify-object/is-obj": ["is-obj@1.0.1", "", {}, "sha512-l4RyHgRqGN4Y3+9JHVrNqO+tN0rV5My76uW5/nuO4K1b6vw5G8d/cmFjP9tRfEsdhZNt0IFdZuK/c2Vr4Nb+Qg=="],
|
||||||
|
|||||||
@@ -22,6 +22,13 @@ services:
|
|||||||
NODE_ENV: ${NODE_ENV:-production}
|
NODE_ENV: ${NODE_ENV:-production}
|
||||||
PORT: ${PORT:-4100}
|
PORT: ${PORT:-4100}
|
||||||
LOG_LEVEL: ${LOG_LEVEL:-}
|
LOG_LEVEL: ${LOG_LEVEL:-}
|
||||||
|
# Logs to OpenObserve (optional): without OPENOBSERVE_URL they only go to stdout.
|
||||||
|
OPENOBSERVE_URL: ${OPENOBSERVE_URL:-}
|
||||||
|
OPENOBSERVE_ORG: ${OPENOBSERVE_ORG:-default}
|
||||||
|
OPENOBSERVE_STREAM: ${OPENOBSERVE_STREAM:-superlist}
|
||||||
|
OPENOBSERVE_USER: ${OPENOBSERVE_USER:-}
|
||||||
|
OPENOBSERVE_PASSWORD: ${OPENOBSERVE_PASSWORD:-}
|
||||||
|
METRICS_EXPORT_INTERVAL_MS: ${METRICS_EXPORT_INTERVAL_MS:-15000}
|
||||||
RESEND_API_KEY: ${RESEND_API_KEY:-}
|
RESEND_API_KEY: ${RESEND_API_KEY:-}
|
||||||
MAIL_FROM: ${MAIL_FROM:-}
|
MAIL_FROM: ${MAIL_FROM:-}
|
||||||
# Dictation (optional): Groq when its key is set, else Gemini; without any key,
|
# Dictation (optional): Groq when its key is set, else Gemini; without any key,
|
||||||
|
|||||||
555
docs/openobserve-dashboard.json
Normal file
555
docs/openobserve-dashboard.json
Normal file
@@ -0,0 +1,555 @@
|
|||||||
|
{
|
||||||
|
"version": 8,
|
||||||
|
"title": "Superlist API",
|
||||||
|
"description": "Métricas HTTP de la API (OTLP) y requests lentos (logs)",
|
||||||
|
"role": "",
|
||||||
|
"owner": "",
|
||||||
|
"created": "1970-01-01T00:00:00Z",
|
||||||
|
"dashboardId": "",
|
||||||
|
"defaultDatetimeDuration": {
|
||||||
|
"type": "relative",
|
||||||
|
"relativeTimePeriod": "1h",
|
||||||
|
"startTime": null,
|
||||||
|
"endTime": null
|
||||||
|
},
|
||||||
|
"variables": {
|
||||||
|
"list": [],
|
||||||
|
"showDynamicFilters": false
|
||||||
|
},
|
||||||
|
"tabs": [
|
||||||
|
{
|
||||||
|
"tabId": "default",
|
||||||
|
"name": "Default",
|
||||||
|
"panels": [
|
||||||
|
{
|
||||||
|
"id": "Panel_rps",
|
||||||
|
"type": "line",
|
||||||
|
"title": "Requests por segundo por ruta",
|
||||||
|
"description": "Sin /api/health",
|
||||||
|
"config": {
|
||||||
|
"show_legends": true,
|
||||||
|
"legends_position": null,
|
||||||
|
"unit": "default",
|
||||||
|
"decimals": 2,
|
||||||
|
"axis_border_show": false,
|
||||||
|
"line_thickness": 1.5,
|
||||||
|
"connect_nulls": false,
|
||||||
|
"no_value_replacement": "",
|
||||||
|
"mark_line": [],
|
||||||
|
"override_config": []
|
||||||
|
},
|
||||||
|
"queryType": "promql",
|
||||||
|
"queries": [
|
||||||
|
{
|
||||||
|
"query": "sum by (http_route) (rate(http_server_request_duration_count{service_name=\"superlist-api\", http_route!=\"/api/health\"}[5m]))",
|
||||||
|
"vrlFunctionQuery": "",
|
||||||
|
"customQuery": true,
|
||||||
|
"joins": [],
|
||||||
|
"fields": {
|
||||||
|
"stream": "http_server_request_duration_count",
|
||||||
|
"stream_type": "metrics",
|
||||||
|
"x": [],
|
||||||
|
"y": [],
|
||||||
|
"z": [],
|
||||||
|
"breakdown": [],
|
||||||
|
"filter": {
|
||||||
|
"filterType": "group",
|
||||||
|
"logicalOperator": "AND",
|
||||||
|
"conditions": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"promql_legend": "{http_route}",
|
||||||
|
"layer_type": "scatter",
|
||||||
|
"weight_fixed": 1,
|
||||||
|
"limit": 0,
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"time_shift": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"layout": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"w": 24,
|
||||||
|
"h": 9,
|
||||||
|
"i": 1
|
||||||
|
},
|
||||||
|
"htmlContent": "",
|
||||||
|
"markdownContent": "",
|
||||||
|
"customChartContent": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Panel_latency",
|
||||||
|
"type": "line",
|
||||||
|
"title": "Latencia p50 / p95 / p99",
|
||||||
|
"description": "Percentiles interpolados en buckets de 5 ms a 10 s",
|
||||||
|
"config": {
|
||||||
|
"show_legends": true,
|
||||||
|
"legends_position": null,
|
||||||
|
"unit": "seconds",
|
||||||
|
"decimals": 2,
|
||||||
|
"axis_border_show": false,
|
||||||
|
"line_thickness": 1.5,
|
||||||
|
"connect_nulls": false,
|
||||||
|
"no_value_replacement": "",
|
||||||
|
"mark_line": [],
|
||||||
|
"override_config": []
|
||||||
|
},
|
||||||
|
"queryType": "promql",
|
||||||
|
"queries": [
|
||||||
|
{
|
||||||
|
"query": "histogram_quantile(0.5, sum by (le) (rate(http_server_request_duration_bucket{http_route!=\"/api/health\"}[5m])))",
|
||||||
|
"vrlFunctionQuery": "",
|
||||||
|
"customQuery": true,
|
||||||
|
"joins": [],
|
||||||
|
"fields": {
|
||||||
|
"stream": "http_server_request_duration_bucket",
|
||||||
|
"stream_type": "metrics",
|
||||||
|
"x": [],
|
||||||
|
"y": [],
|
||||||
|
"z": [],
|
||||||
|
"breakdown": [],
|
||||||
|
"filter": {
|
||||||
|
"filterType": "group",
|
||||||
|
"logicalOperator": "AND",
|
||||||
|
"conditions": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"promql_legend": "p50",
|
||||||
|
"layer_type": "scatter",
|
||||||
|
"weight_fixed": 1,
|
||||||
|
"limit": 0,
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"time_shift": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"query": "histogram_quantile(0.95, sum by (le) (rate(http_server_request_duration_bucket{http_route!=\"/api/health\"}[5m])))",
|
||||||
|
"vrlFunctionQuery": "",
|
||||||
|
"customQuery": true,
|
||||||
|
"joins": [],
|
||||||
|
"fields": {
|
||||||
|
"stream": "http_server_request_duration_bucket",
|
||||||
|
"stream_type": "metrics",
|
||||||
|
"x": [],
|
||||||
|
"y": [],
|
||||||
|
"z": [],
|
||||||
|
"breakdown": [],
|
||||||
|
"filter": {
|
||||||
|
"filterType": "group",
|
||||||
|
"logicalOperator": "AND",
|
||||||
|
"conditions": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"promql_legend": "p95",
|
||||||
|
"layer_type": "scatter",
|
||||||
|
"weight_fixed": 1,
|
||||||
|
"limit": 0,
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"time_shift": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"query": "histogram_quantile(0.99, sum by (le) (rate(http_server_request_duration_bucket{http_route!=\"/api/health\"}[5m])))",
|
||||||
|
"vrlFunctionQuery": "",
|
||||||
|
"customQuery": true,
|
||||||
|
"joins": [],
|
||||||
|
"fields": {
|
||||||
|
"stream": "http_server_request_duration_bucket",
|
||||||
|
"stream_type": "metrics",
|
||||||
|
"x": [],
|
||||||
|
"y": [],
|
||||||
|
"z": [],
|
||||||
|
"breakdown": [],
|
||||||
|
"filter": {
|
||||||
|
"filterType": "group",
|
||||||
|
"logicalOperator": "AND",
|
||||||
|
"conditions": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"promql_legend": "p99",
|
||||||
|
"layer_type": "scatter",
|
||||||
|
"weight_fixed": 1,
|
||||||
|
"limit": 0,
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"time_shift": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"layout": {
|
||||||
|
"x": 24,
|
||||||
|
"y": 0,
|
||||||
|
"w": 24,
|
||||||
|
"h": 9,
|
||||||
|
"i": 2
|
||||||
|
},
|
||||||
|
"htmlContent": "",
|
||||||
|
"markdownContent": "",
|
||||||
|
"customChartContent": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Panel_errors",
|
||||||
|
"type": "metric",
|
||||||
|
"title": "Tasa de error 5xx",
|
||||||
|
"description": "Porcentaje de requests con status 5xx (vacío = 0 %)",
|
||||||
|
"config": {
|
||||||
|
"show_legends": true,
|
||||||
|
"legends_position": null,
|
||||||
|
"unit": "percent",
|
||||||
|
"decimals": 2,
|
||||||
|
"axis_border_show": false,
|
||||||
|
"line_thickness": 1.5,
|
||||||
|
"connect_nulls": false,
|
||||||
|
"no_value_replacement": "0",
|
||||||
|
"mark_line": [],
|
||||||
|
"override_config": []
|
||||||
|
},
|
||||||
|
"queryType": "promql",
|
||||||
|
"queries": [
|
||||||
|
{
|
||||||
|
"query": "100 * sum(rate(http_server_request_duration_count{http_response_status_code=~\"5..\"}[5m])) / sum(rate(http_server_request_duration_count[5m]))",
|
||||||
|
"vrlFunctionQuery": "",
|
||||||
|
"customQuery": true,
|
||||||
|
"joins": [],
|
||||||
|
"fields": {
|
||||||
|
"stream": "http_server_request_duration_count",
|
||||||
|
"stream_type": "metrics",
|
||||||
|
"x": [],
|
||||||
|
"y": [],
|
||||||
|
"z": [],
|
||||||
|
"breakdown": [],
|
||||||
|
"filter": {
|
||||||
|
"filterType": "group",
|
||||||
|
"logicalOperator": "AND",
|
||||||
|
"conditions": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"promql_legend": "5xx %",
|
||||||
|
"layer_type": "scatter",
|
||||||
|
"weight_fixed": 1,
|
||||||
|
"limit": 0,
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"time_shift": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"layout": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 9,
|
||||||
|
"w": 12,
|
||||||
|
"h": 9,
|
||||||
|
"i": 3
|
||||||
|
},
|
||||||
|
"htmlContent": "",
|
||||||
|
"markdownContent": "",
|
||||||
|
"customChartContent": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Panel_active",
|
||||||
|
"type": "metric",
|
||||||
|
"title": "Requests en curso",
|
||||||
|
"description": "SSE no cuenta: responde enseguida",
|
||||||
|
"config": {
|
||||||
|
"show_legends": true,
|
||||||
|
"legends_position": null,
|
||||||
|
"unit": "default",
|
||||||
|
"decimals": 2,
|
||||||
|
"axis_border_show": false,
|
||||||
|
"line_thickness": 1.5,
|
||||||
|
"connect_nulls": false,
|
||||||
|
"no_value_replacement": "0",
|
||||||
|
"mark_line": [],
|
||||||
|
"override_config": []
|
||||||
|
},
|
||||||
|
"queryType": "promql",
|
||||||
|
"queries": [
|
||||||
|
{
|
||||||
|
"query": "sum(http_server_active_requests)",
|
||||||
|
"vrlFunctionQuery": "",
|
||||||
|
"customQuery": true,
|
||||||
|
"joins": [],
|
||||||
|
"fields": {
|
||||||
|
"stream": "http_server_active_requests",
|
||||||
|
"stream_type": "metrics",
|
||||||
|
"x": [],
|
||||||
|
"y": [],
|
||||||
|
"z": [],
|
||||||
|
"breakdown": [],
|
||||||
|
"filter": {
|
||||||
|
"filterType": "group",
|
||||||
|
"logicalOperator": "AND",
|
||||||
|
"conditions": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"promql_legend": "en curso",
|
||||||
|
"layer_type": "scatter",
|
||||||
|
"weight_fixed": 1,
|
||||||
|
"limit": 0,
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"time_shift": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"layout": {
|
||||||
|
"x": 12,
|
||||||
|
"y": 9,
|
||||||
|
"w": 12,
|
||||||
|
"h": 9,
|
||||||
|
"i": 4
|
||||||
|
},
|
||||||
|
"htmlContent": "",
|
||||||
|
"markdownContent": "",
|
||||||
|
"customChartContent": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Panel_status",
|
||||||
|
"type": "stacked",
|
||||||
|
"title": "Requests por status",
|
||||||
|
"description": "Requests/s por código de respuesta (sin /api/health)",
|
||||||
|
"config": {
|
||||||
|
"show_legends": true,
|
||||||
|
"legends_position": null,
|
||||||
|
"unit": "default",
|
||||||
|
"decimals": 2,
|
||||||
|
"axis_border_show": false,
|
||||||
|
"line_thickness": 1.5,
|
||||||
|
"connect_nulls": false,
|
||||||
|
"no_value_replacement": "",
|
||||||
|
"mark_line": [],
|
||||||
|
"override_config": []
|
||||||
|
},
|
||||||
|
"queryType": "promql",
|
||||||
|
"queries": [
|
||||||
|
{
|
||||||
|
"query": "sum by (http_response_status_code) (rate(http_server_request_duration_count{http_route!=\"/api/health\"}[5m]))",
|
||||||
|
"vrlFunctionQuery": "",
|
||||||
|
"customQuery": true,
|
||||||
|
"joins": [],
|
||||||
|
"fields": {
|
||||||
|
"stream": "http_server_request_duration_count",
|
||||||
|
"stream_type": "metrics",
|
||||||
|
"x": [],
|
||||||
|
"y": [],
|
||||||
|
"z": [],
|
||||||
|
"breakdown": [],
|
||||||
|
"filter": {
|
||||||
|
"filterType": "group",
|
||||||
|
"logicalOperator": "AND",
|
||||||
|
"conditions": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"promql_legend": "{http_response_status_code}",
|
||||||
|
"layer_type": "scatter",
|
||||||
|
"weight_fixed": 1,
|
||||||
|
"limit": 0,
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"time_shift": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"layout": {
|
||||||
|
"x": 24,
|
||||||
|
"y": 9,
|
||||||
|
"w": 24,
|
||||||
|
"h": 9,
|
||||||
|
"i": 5
|
||||||
|
},
|
||||||
|
"htmlContent": "",
|
||||||
|
"markdownContent": "",
|
||||||
|
"customChartContent": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Panel_p95_route",
|
||||||
|
"type": "line",
|
||||||
|
"title": "p95 por ruta",
|
||||||
|
"description": "Para encontrar el endpoint lento",
|
||||||
|
"config": {
|
||||||
|
"show_legends": true,
|
||||||
|
"legends_position": null,
|
||||||
|
"unit": "seconds",
|
||||||
|
"decimals": 2,
|
||||||
|
"axis_border_show": false,
|
||||||
|
"line_thickness": 1.5,
|
||||||
|
"connect_nulls": false,
|
||||||
|
"no_value_replacement": "",
|
||||||
|
"mark_line": [],
|
||||||
|
"override_config": []
|
||||||
|
},
|
||||||
|
"queryType": "promql",
|
||||||
|
"queries": [
|
||||||
|
{
|
||||||
|
"query": "histogram_quantile(0.95, sum by (le, http_route) (rate(http_server_request_duration_bucket{http_route!=\"/api/health\"}[5m])))",
|
||||||
|
"vrlFunctionQuery": "",
|
||||||
|
"customQuery": true,
|
||||||
|
"joins": [],
|
||||||
|
"fields": {
|
||||||
|
"stream": "http_server_request_duration_bucket",
|
||||||
|
"stream_type": "metrics",
|
||||||
|
"x": [],
|
||||||
|
"y": [],
|
||||||
|
"z": [],
|
||||||
|
"breakdown": [],
|
||||||
|
"filter": {
|
||||||
|
"filterType": "group",
|
||||||
|
"logicalOperator": "AND",
|
||||||
|
"conditions": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"promql_legend": "{http_route}",
|
||||||
|
"layer_type": "scatter",
|
||||||
|
"weight_fixed": 1,
|
||||||
|
"limit": 0,
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"time_shift": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"layout": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 18,
|
||||||
|
"w": 24,
|
||||||
|
"h": 9,
|
||||||
|
"i": 6
|
||||||
|
},
|
||||||
|
"htmlContent": "",
|
||||||
|
"markdownContent": "",
|
||||||
|
"customChartContent": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Panel_avg_route",
|
||||||
|
"type": "line",
|
||||||
|
"title": "Latencia media por ruta",
|
||||||
|
"description": "sum / count de la duración",
|
||||||
|
"config": {
|
||||||
|
"show_legends": true,
|
||||||
|
"legends_position": null,
|
||||||
|
"unit": "seconds",
|
||||||
|
"decimals": 2,
|
||||||
|
"axis_border_show": false,
|
||||||
|
"line_thickness": 1.5,
|
||||||
|
"connect_nulls": false,
|
||||||
|
"no_value_replacement": "",
|
||||||
|
"mark_line": [],
|
||||||
|
"override_config": []
|
||||||
|
},
|
||||||
|
"queryType": "promql",
|
||||||
|
"queries": [
|
||||||
|
{
|
||||||
|
"query": "sum by (http_route) (rate(http_server_request_duration_sum{http_route!=\"/api/health\"}[5m])) / sum by (http_route) (rate(http_server_request_duration_count{http_route!=\"/api/health\"}[5m]))",
|
||||||
|
"vrlFunctionQuery": "",
|
||||||
|
"customQuery": true,
|
||||||
|
"joins": [],
|
||||||
|
"fields": {
|
||||||
|
"stream": "http_server_request_duration_sum",
|
||||||
|
"stream_type": "metrics",
|
||||||
|
"x": [],
|
||||||
|
"y": [],
|
||||||
|
"z": [],
|
||||||
|
"breakdown": [],
|
||||||
|
"filter": {
|
||||||
|
"filterType": "group",
|
||||||
|
"logicalOperator": "AND",
|
||||||
|
"conditions": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"promql_legend": "{http_route}",
|
||||||
|
"layer_type": "scatter",
|
||||||
|
"weight_fixed": 1,
|
||||||
|
"limit": 0,
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"time_shift": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"layout": {
|
||||||
|
"x": 24,
|
||||||
|
"y": 18,
|
||||||
|
"w": 24,
|
||||||
|
"h": 9,
|
||||||
|
"i": 7
|
||||||
|
},
|
||||||
|
"htmlContent": "",
|
||||||
|
"markdownContent": "",
|
||||||
|
"customChartContent": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Panel_slowest",
|
||||||
|
"type": "table",
|
||||||
|
"title": "Requests más lentos",
|
||||||
|
"description": "Desde los logs: usa requestid en Logs para ver el detalle",
|
||||||
|
"config": {
|
||||||
|
"show_legends": false,
|
||||||
|
"legends_position": null,
|
||||||
|
"unit": "default",
|
||||||
|
"decimals": 2,
|
||||||
|
"axis_border_show": false,
|
||||||
|
"line_thickness": 1.5,
|
||||||
|
"connect_nulls": false,
|
||||||
|
"no_value_replacement": "",
|
||||||
|
"mark_line": [],
|
||||||
|
"override_config": []
|
||||||
|
},
|
||||||
|
"queryType": "sql",
|
||||||
|
"queries": [
|
||||||
|
{
|
||||||
|
"query": "SELECT _timestamp, method, path, status, durationms, requestid FROM \"superlist\" WHERE durationms IS NOT NULL AND path != '/api/health' ORDER BY durationms DESC LIMIT 20",
|
||||||
|
"vrlFunctionQuery": "",
|
||||||
|
"customQuery": true,
|
||||||
|
"joins": [],
|
||||||
|
"fields": {
|
||||||
|
"stream": "superlist",
|
||||||
|
"stream_type": "logs",
|
||||||
|
"x": [],
|
||||||
|
"y": [],
|
||||||
|
"z": [],
|
||||||
|
"breakdown": [],
|
||||||
|
"filter": {
|
||||||
|
"filterType": "group",
|
||||||
|
"logicalOperator": "AND",
|
||||||
|
"conditions": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"promql_legend": "",
|
||||||
|
"layer_type": "scatter",
|
||||||
|
"weight_fixed": 1,
|
||||||
|
"limit": 0,
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"time_shift": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"layout": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 27,
|
||||||
|
"w": 48,
|
||||||
|
"h": 12,
|
||||||
|
"i": 8
|
||||||
|
},
|
||||||
|
"htmlContent": "",
|
||||||
|
"markdownContent": "",
|
||||||
|
"customChartContent": ""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
184
docs/openobserve-dashboard.md
Normal file
184
docs/openobserve-dashboard.md
Normal file
@@ -0,0 +1,184 @@
|
|||||||
|
# Dashboard de la API en OpenObserve
|
||||||
|
|
||||||
|
Guía para armar en OpenObserve un dashboard con las métricas HTTP de la API (latencia, tráfico, errores) y
|
||||||
|
una tabla de requests lentos a partir de los logs.
|
||||||
|
|
||||||
|
## 1. Qué datos llegan
|
||||||
|
|
||||||
|
Con `OPENOBSERVE_URL`, `OPENOBSERVE_USER` y `OPENOBSERVE_PASSWORD` en `apps/api/.env`, la API envía:
|
||||||
|
|
||||||
|
**Métricas** (OTLP, cada `METRICS_EXPORT_INTERVAL_MS`, 15 s por defecto). OpenObserve cambia los puntos por
|
||||||
|
guiones bajos y crea un stream por serie:
|
||||||
|
|
||||||
|
| Stream (tipo `metrics`) | Qué es |
|
||||||
|
| ---------------------------------------- | --------------------------------------------------------- |
|
||||||
|
| `http_server_request_duration_bucket` | Histograma de duración (segundos), un contador por `le` |
|
||||||
|
| `http_server_request_duration_count` | Cantidad de requests (contador acumulado) |
|
||||||
|
| `http_server_request_duration_sum` | Suma de duraciones en segundos (contador acumulado) |
|
||||||
|
| `http_server_active_requests` | Requests en curso (gauge) |
|
||||||
|
|
||||||
|
Labels disponibles: `http_route` (patrón de Hono, ej. `/api/lists/:listId`), `http_request_method`,
|
||||||
|
`http_response_status_code`, `service_name` (`superlist-api`) y `le` (solo en `_bucket`).
|
||||||
|
|
||||||
|
Los buckets van de 5 ms a 10 s: `0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10`.
|
||||||
|
|
||||||
|
**Logs** (stream `superlist`, tipo `logs`). OpenObserve pasa los nombres de campo a **minúsculas**:
|
||||||
|
`method`, `path`, `route`, `status`, `durationms`, `requestid`, `userid`, `useragent`, `severity`, `body`,
|
||||||
|
`category`.
|
||||||
|
|
||||||
|
> Los requests a `/api/health` se loguean en `debug`: en desarrollo (nivel por defecto `debug`) llegan a
|
||||||
|
> OpenObserve, en producción (`info`) no. En las métricas están siempre; los filtros de abajo los excluyen.
|
||||||
|
>
|
||||||
|
> Las rutas que no existen (404 de `notFound`) aparecen con `http_route="/*"`. Agrega `http_route!="/*"` al
|
||||||
|
> selector si no las quieres ver en los paneles de latencia.
|
||||||
|
|
||||||
|
## 2. Comprobar que hay datos
|
||||||
|
|
||||||
|
1. **Streams**: deberías ver los streams de la tabla anterior (filtro *Metrics*) y `superlist` (filtro *Logs*).
|
||||||
|
2. **Logs** → stream `superlist` → *Run query*: aparecen los requests con `durationms`.
|
||||||
|
3. **Metrics** → elegir `http_server_request_duration_count` → aparecen series por `http_route`.
|
||||||
|
|
||||||
|
Si los streams existen pero no tienen registros, mira los logs del contenedor de OpenObserve
|
||||||
|
(`docker logs openobserve`) antes de seguir (ver *Problemas frecuentes*).
|
||||||
|
|
||||||
|
## 3. Crear el dashboard
|
||||||
|
|
||||||
|
> **Atajo:** el dashboard completo (paneles 1–8) está en `docs/openobserve-dashboard.json`. En OpenObserve:
|
||||||
|
> **Dashboards** → **Import** → pegar o subir el JSON. También se puede crear por API:
|
||||||
|
> `curl -u "$OPENOBSERVE_USER:$OPENOBSERVE_PASSWORD" -X POST "$OPENOBSERVE_URL/api/default/dashboards?folder=default" -H 'content-type: application/json' --data-binary @docs/openobserve-dashboard.json`.
|
||||||
|
> Los pasos de abajo explican cada panel por si quieres armarlo o cambiarlo a mano.
|
||||||
|
|
||||||
|
1. **Dashboards** → **New Dashboard** → nombre `Superlist API` → *Save*.
|
||||||
|
2. Rango de tiempo arriba a la derecha: *Past 1 hour*; autorrefresco: *30s* (no tiene sentido menos que el
|
||||||
|
intervalo de exportación).
|
||||||
|
3. Para cada panel: **Add Panel** → tipo de gráfico → en el panel de la izquierda elegir **Stream Type
|
||||||
|
`metrics`** y el stream → cambiar el modo de consulta a **PromQL** → pegar la consulta → en *Legend* poner
|
||||||
|
el label (ej. `{http_route}`) → **Apply** → título → **Save**.
|
||||||
|
|
||||||
|
Todas las consultas usan una ventana de `[5m]`: con contadores acumulados, `rate()` necesita al menos dos
|
||||||
|
muestras dentro de la ventana, y con exportación cada 15 s 5 minutos dan margen de sobra.
|
||||||
|
|
||||||
|
### Panel 1 — Requests por segundo por ruta (línea)
|
||||||
|
|
||||||
|
```promql
|
||||||
|
sum by (http_route) (
|
||||||
|
rate(http_server_request_duration_count{service_name="superlist-api", http_route!="/api/health"}[5m])
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
Legend: `{http_route}`. Unidad: *req/s* (o *Default*).
|
||||||
|
|
||||||
|
### Panel 2 — Latencia p50 / p95 / p99 (línea)
|
||||||
|
|
||||||
|
Agregar tres consultas en el mismo panel (botón **+** junto a la query):
|
||||||
|
|
||||||
|
```promql
|
||||||
|
histogram_quantile(0.50, sum by (le) (rate(http_server_request_duration_bucket{http_route!="/api/health"}[5m])))
|
||||||
|
histogram_quantile(0.95, sum by (le) (rate(http_server_request_duration_bucket{http_route!="/api/health"}[5m])))
|
||||||
|
histogram_quantile(0.99, sum by (le) (rate(http_server_request_duration_bucket{http_route!="/api/health"}[5m])))
|
||||||
|
```
|
||||||
|
|
||||||
|
Legends: `p50`, `p95`, `p99`. Unidad: **Seconds** (la métrica está en segundos; OpenObserve la muestra como
|
||||||
|
ms cuando corresponde).
|
||||||
|
|
||||||
|
Los percentiles se interpolan dentro de cada bucket: si casi todo tarda menos de 5 ms (el primer bucket), verás
|
||||||
|
valores como `4.75 ms` aunque el request real tarde 0.2 ms. Para la duración exacta usa el panel 4 (media) o
|
||||||
|
la tabla del panel 8.
|
||||||
|
|
||||||
|
### Panel 3 — p95 por ruta (línea o barras horizontales)
|
||||||
|
|
||||||
|
```promql
|
||||||
|
histogram_quantile(0.95,
|
||||||
|
sum by (le, http_route) (rate(http_server_request_duration_bucket{http_route!="/api/health"}[5m]))
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
Legend: `{http_route}`. Unidad: *Seconds*. Es el panel para encontrar el endpoint lento.
|
||||||
|
|
||||||
|
### Panel 4 — Latencia media por ruta (línea)
|
||||||
|
|
||||||
|
```promql
|
||||||
|
sum by (http_route) (rate(http_server_request_duration_sum{http_route!="/api/health"}[5m]))
|
||||||
|
/
|
||||||
|
sum by (http_route) (rate(http_server_request_duration_count{http_route!="/api/health"}[5m]))
|
||||||
|
```
|
||||||
|
|
||||||
|
### Panel 5 — Requests por status (barras apiladas)
|
||||||
|
|
||||||
|
```promql
|
||||||
|
sum by (http_response_status_code) (rate(http_server_request_duration_count{http_route!="/api/health"}[5m]))
|
||||||
|
```
|
||||||
|
|
||||||
|
Legend: `{http_response_status_code}`. Los 401 son normales (sesión vencida, `/api/lists` sin login); fíjate
|
||||||
|
en los 5xx.
|
||||||
|
|
||||||
|
### Panel 6 — Tasa de error 5xx (métrica única / *Metric*)
|
||||||
|
|
||||||
|
```promql
|
||||||
|
100 * sum(rate(http_server_request_duration_count{http_response_status_code=~"5.."}[5m]))
|
||||||
|
/ sum(rate(http_server_request_duration_count[5m]))
|
||||||
|
```
|
||||||
|
|
||||||
|
Unidad: *Percent*. Sin errores la consulta no devuelve nada (no hay serie 5xx); eso es *0 %*.
|
||||||
|
|
||||||
|
### Panel 7 — Requests en curso (métrica única)
|
||||||
|
|
||||||
|
```promql
|
||||||
|
sum(http_server_active_requests)
|
||||||
|
```
|
||||||
|
|
||||||
|
Normalmente 0–1: las conexiones SSE (`/events`) devuelven la respuesta enseguida y no cuentan mientras están
|
||||||
|
abiertas.
|
||||||
|
|
||||||
|
### Panel 8 — Requests más lentos (tabla, desde logs)
|
||||||
|
|
||||||
|
Este sale de los logs, así que tiene el `requestid` para ir al detalle. **Add Panel** → *Table* → **Stream Type
|
||||||
|
`logs`**, stream `superlist` → modo **Custom SQL**:
|
||||||
|
|
||||||
|
```sql
|
||||||
|
SELECT _timestamp, method, path, status, durationms, requestid
|
||||||
|
FROM "superlist"
|
||||||
|
WHERE durationms IS NOT NULL AND path != '/api/health'
|
||||||
|
ORDER BY durationms DESC
|
||||||
|
LIMIT 20
|
||||||
|
```
|
||||||
|
|
||||||
|
Con el `requestid` de una fila, en **Logs** filtra `requestid = '<id>'` y verás todo lo que se logueó durante
|
||||||
|
ese request (emails, fallbacks de dictado, errores).
|
||||||
|
|
||||||
|
### Opcional — Variable para filtrar por ruta
|
||||||
|
|
||||||
|
**Settings** del dashboard (engranaje) → **Variables** → **Add Variable**:
|
||||||
|
|
||||||
|
- Type: *Query Values* · Name: `route` · Stream type: `metrics` · Stream: `http_server_request_duration_count`
|
||||||
|
· Field: `http_route` · habilitar *Multi select* e *Include All*.
|
||||||
|
|
||||||
|
Después, en las consultas, agrega `http_route=~"$route"` al selector, por ejemplo:
|
||||||
|
|
||||||
|
```promql
|
||||||
|
sum by (http_route) (rate(http_server_request_duration_count{http_route=~"$route"}[5m]))
|
||||||
|
```
|
||||||
|
|
||||||
|
## 4. Alertas sugeridas
|
||||||
|
|
||||||
|
En **Alerts** → **Add alert**, tipo *Scheduled*, stream `metrics`, modo PromQL, cada 5 minutos:
|
||||||
|
|
||||||
|
- **p95 alto**: `histogram_quantile(0.95, sum by (le) (rate(http_server_request_duration_bucket{http_route!="/api/health"}[5m]))) > 1`
|
||||||
|
- **Errores 5xx**: `sum(rate(http_server_request_duration_count{http_response_status_code=~"5.."}[5m])) > 0`
|
||||||
|
|
||||||
|
## Problemas frecuentes
|
||||||
|
|
||||||
|
- **No aparece ningún stream**: falta `OPENOBSERVE_URL` o las credenciales están mal (OpenObserve responde
|
||||||
|
401 y el exporter no muestra nada en consola). El log de arranque dice `metricsEnabled: true` si las métricas
|
||||||
|
están activas.
|
||||||
|
- **Los streams existen pero están vacíos y `docker logs openobserve` muestra
|
||||||
|
`wal file create error: ... File exists`**: el directorio de datos de OpenObserve está roto. Pasa, por
|
||||||
|
ejemplo, si la carpeta del host montada en `/data` se borró con el contenedor corriendo. Recrea el contenedor
|
||||||
|
con un volumen con nombre o una carpeta fuera del repo (`-v ~/personal-projects/openobserve-data:/data`).
|
||||||
|
- **Rutas con valores `NaN`** en los paneles de latencia: no tuvieron tráfico en la ventana de 5 minutos
|
||||||
|
(división 0/0). Es normal; desaparecen solas.
|
||||||
|
- **Campo desconocido en SQL (`unknown field 'durationMs'`)**: los nombres de campo de los logs están en
|
||||||
|
minúsculas (`durationms`, `requestid`).
|
||||||
|
- **`rate()` vacío al principio**: hacen falta al menos dos exportaciones dentro de la ventana; espera ~30 s
|
||||||
|
después de arrancar la API.
|
||||||
|
- **`/events` con duraciones muy bajas**: es lo esperado, se mide el tiempo hasta abrir el stream SSE.
|
||||||
@@ -3,8 +3,47 @@
|
|||||||
* and the web app consumes them, so they live here instead of being duplicated.
|
* and the web app consumes them, so they live here instead of being duplicated.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { z } from 'zod'
|
||||||
|
|
||||||
export type ListRole = 'owner' | 'collaborator'
|
export type ListRole = 'owner' | 'collaborator'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Icons a user can give a list (keys of lucide icons). The web app maps each key
|
||||||
|
* to its component; the API only validates the key.
|
||||||
|
*/
|
||||||
|
export const LIST_ICONS = [
|
||||||
|
'shopping-cart',
|
||||||
|
'carrot',
|
||||||
|
'apple',
|
||||||
|
'house',
|
||||||
|
'trees',
|
||||||
|
'park',
|
||||||
|
'beef',
|
||||||
|
'fish',
|
||||||
|
'milk',
|
||||||
|
'croissant',
|
||||||
|
'wine',
|
||||||
|
'pill',
|
||||||
|
'baby',
|
||||||
|
'dog',
|
||||||
|
'shirt',
|
||||||
|
'hammer',
|
||||||
|
'gift',
|
||||||
|
] as const
|
||||||
|
|
||||||
|
export const ListIconSchema = z.enum(LIST_ICONS)
|
||||||
|
|
||||||
|
export type ListIcon = (typeof LIST_ICONS)[number]
|
||||||
|
|
||||||
|
/** Most lists a user can pin to the always-visible bar. */
|
||||||
|
export const MAX_PINNED_LISTS = 4
|
||||||
|
|
||||||
|
/** Body of `PATCH /lists/:listId/preferences` (per-user settings of a list). */
|
||||||
|
export type UpdateListPreferencesRequest = {
|
||||||
|
isPinned?: boolean
|
||||||
|
icon?: ListIcon | null
|
||||||
|
}
|
||||||
|
|
||||||
export type InvitationStatus = 'pending' | 'accepted' | 'revoked' | 'expired'
|
export type InvitationStatus = 'pending' | 'accepted' | 'revoked' | 'expired'
|
||||||
|
|
||||||
/** A member of a list, as seen in the list detail. */
|
/** A member of a list, as seen in the list detail. */
|
||||||
@@ -26,6 +65,12 @@ export type ShoppingListSummary = {
|
|||||||
name: string
|
name: string
|
||||||
role: ListRole
|
role: ListRole
|
||||||
isPrimary: boolean
|
isPrimary: boolean
|
||||||
|
/** Per user: pinned to the always-visible bar. */
|
||||||
|
isPinned: boolean
|
||||||
|
/** Per user: icon chosen for the list, `null` to show its initial. */
|
||||||
|
icon: ListIcon | null
|
||||||
|
/** Items not bought yet. */
|
||||||
|
pendingCount: number
|
||||||
memberCount: number
|
memberCount: number
|
||||||
createdAt: string
|
createdAt: string
|
||||||
updatedAt: string
|
updatedAt: string
|
||||||
@@ -37,6 +82,8 @@ export type ShoppingListDetail = {
|
|||||||
name: string
|
name: string
|
||||||
role: ListRole
|
role: ListRole
|
||||||
isPrimary: boolean
|
isPrimary: boolean
|
||||||
|
isPinned: boolean
|
||||||
|
icon: ListIcon | null
|
||||||
members: ListMember[]
|
members: ListMember[]
|
||||||
invitations: ListInvitation[]
|
invitations: ListInvitation[]
|
||||||
createdAt: string
|
createdAt: string
|
||||||
|
|||||||
18
turbo.json
18
turbo.json
@@ -24,7 +24,14 @@
|
|||||||
"GEMINI_TIMEOUT_MS",
|
"GEMINI_TIMEOUT_MS",
|
||||||
"GROQ_API_KEY",
|
"GROQ_API_KEY",
|
||||||
"GROQ_MODEL",
|
"GROQ_MODEL",
|
||||||
"GROQ_TIMEOUT_MS"
|
"GROQ_TIMEOUT_MS",
|
||||||
|
"LOG_LEVEL",
|
||||||
|
"OPENOBSERVE_URL",
|
||||||
|
"OPENOBSERVE_ORG",
|
||||||
|
"OPENOBSERVE_STREAM",
|
||||||
|
"OPENOBSERVE_USER",
|
||||||
|
"OPENOBSERVE_PASSWORD",
|
||||||
|
"METRICS_EXPORT_INTERVAL_MS"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dev": {
|
"dev": {
|
||||||
@@ -46,7 +53,14 @@
|
|||||||
"GROQ_API_KEY",
|
"GROQ_API_KEY",
|
||||||
"GROQ_MODEL",
|
"GROQ_MODEL",
|
||||||
"GROQ_TIMEOUT_MS",
|
"GROQ_TIMEOUT_MS",
|
||||||
"VITE_API_URL"
|
"VITE_API_URL",
|
||||||
|
"LOG_LEVEL",
|
||||||
|
"OPENOBSERVE_URL",
|
||||||
|
"OPENOBSERVE_ORG",
|
||||||
|
"OPENOBSERVE_STREAM",
|
||||||
|
"OPENOBSERVE_USER",
|
||||||
|
"OPENOBSERVE_PASSWORD",
|
||||||
|
"METRICS_EXPORT_INTERVAL_MS"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"db:generate": {
|
"db:generate": {
|
||||||
|
|||||||
Reference in New Issue
Block a user