LibreChat/packages/api/src/auth
Danny Avila 6bc75d24c8
️ refactor: Migrate @librechat/api build to tsdown (#13595)
* ️ refactor: Migrate @librechat/api build to tsdown

Replace Rollup with tsdown (rolldown + oxc isolated-declarations) for the
@librechat/api package build, mirroring the merged data-schemas migration.

- Add tsdown.config.mjs (cjs output, oxc dts, externalize all bare deps,
  bundle first-party `~/` + relative imports)
- Annotate exports for isolatedDeclarations (codefix-driven). Collapse the
  tokens.ts model->token maps to Record<string, Record<string, number>> and
  switch validation.ts's runtime `files` field from z.any() to z.unknown()
  so no explicit `any` is introduced
- Repoint package.json main/types/exports to tsdown's .cjs/.d.cts output
- Add src/telemetry.ts entry shim so the two index.ts entries don't collide
  in oxc's flat dts output (stable dist/telemetry.{cjs,d.cts})
- Delete rollup.config.js

Build time ~36s -> ~0.5s. No runtime behavior change: 5712 unit tests pass,
both entries load via require(), legacy /api consumes them unchanged.

* 👷 ci: Hash packages/api/tsdown.config.mjs in build-api cache keys

The build-api cache keys hashed `packages/api/server-rollup.config.js`,
which never existed (api used `rollup.config.js`, now removed) — a copy-paste
artifact from the data-provider key that matched no file. Replace it with the
new `packages/api/tsdown.config.mjs` so edits to the build config (entry,
format, externals) bust the api build cache, matching the data-schemas key.
2026-06-08 10:54:48 -04:00
..
adminPkce.spec.ts 🧽 fix: Strip Admin OAuth Redirect Params (#13181) 2026-05-18 15:27:19 -04:00
agent.spec.ts 🛡️ fix: Harden MCP OAuth Request Handling (#13264) 2026-05-22 20:39:16 -04:00
agent.ts 🛡️ fix: Harden MCP OAuth Request Handling (#13264) 2026-05-22 20:39:16 -04:00
allowedAddresses.ts 🛡️ refactor: Scope allowedAddresses By Port (#13022) 2026-05-08 12:28:34 -04:00
codeapi.spec.ts 🔐 feat: Mint Code API Auth Tokens (#13028) 2026-05-09 16:09:10 -04:00
codeapi.ts 🔐 feat: Mint Code API Auth Tokens (#13028) 2026-05-09 16:09:10 -04:00
domain.spec.ts 🛡️ refactor: Scope allowedAddresses By Port (#13022) 2026-05-08 12:28:34 -04:00
domain.ts 🛡️ refactor: Scope allowedAddresses By Port (#13022) 2026-05-08 12:28:34 -04:00
exchange.spec.ts 🛡️ fix: Add Origin Binding to Admin OAuth Exchange Codes (#12469) 2026-03-30 16:54:00 -04:00
exchange.ts ️ refactor: Migrate @librechat/api build to tsdown (#13595) 2026-06-08 10:54:48 -04:00
index.ts 🪜 feat: Add OpenID Role Sync (#13415) 2026-06-02 14:00:56 -04:00
invite.ts 📦 refactor: Consolidate DB models, encapsulating Mongoose usage in data-schemas (#11830) 2026-03-21 14:28:53 -04:00
ip.ts 🪟 feat: Add allowedAddresses Exemption List For SSRF-Guarded Targets (#12933) 2026-05-03 21:43:59 -04:00
openid.spec.ts ⚖️ feat: Add Operational Prometheus Metrics (#13265) 2026-05-22 20:47:41 -04:00
openid.ts ⚖️ feat: Add Operational Prometheus Metrics (#13265) 2026-05-22 20:47:41 -04:00
openidRoleSync.spec.ts 🪜 feat: Add OpenID Role Sync (#13415) 2026-06-02 14:00:56 -04:00
openidRoleSync.ts 🪜 feat: Add OpenID Role Sync (#13415) 2026-06-02 14:00:56 -04:00
password.ts 📦 refactor: Consolidate DB models, encapsulating Mongoose usage in data-schemas (#11830) 2026-03-21 14:28:53 -04:00
refresh.spec.ts 🏃 fix: Improve OpenID Lookup Planning (#13229) 2026-05-21 14:17:55 -04:00
refresh.ts 🏃 fix: Improve OpenID Lookup Planning (#13229) 2026-05-21 14:17:55 -04:00