LibreChat/packages/api/src/app
Danny Avila 192703e041
perf: Migrate data-schemas Build to tsdown with isolatedDeclarations (#13578)
*  perf: Migrate data-schemas Build to tsdown with isolatedDeclarations

Replace Rollup with tsdown (rolldown + oxc) for @librechat/data-schemas. With the source made isolatedDeclarations-clean, oxc emits .d.ts without tsc, dropping the package build from ~5.8s to ~0.8s (~7x).

- Annotate exported model/method factories for isolatedDeclarations (TypeScript's fixMissingTypeAnnotationOnExports codefix plus hand-authored interfaces); type the ~44 mongoose `any`s and add an explicit PromptMethods interface (previously its declaration was silently dropped by the Rollup build).
- Repoint package.json exports/main/module/types to tsdown output; drop rollup config.
- Config lives in tsdown.config.mjs (native ESM) so CI without a TS-config loader can build it; bundle `dotenv` so the package stays self-contained for its env-loading side effect.
- Fix a latent token `metadata` mismatch the accurate types surfaced: widen TokenCreate/UpdateData inputs to accept plain objects, flatten OAuthMetadata at the api boundary.
- Update mongoMeili/aclEntry specs to the precise model types; drop redundant terser minification from data-provider's library build.

All data-schemas tests pass; api builds clean against the new output.

* 🔧 chore: Hash tsdown.config.mjs in data-schemas CI build-cache keys

The data-schemas build switched from rollup to tsdown, but the build-data-schemas / build-api cache keys in backend-review, config-review, and playwright-mock still hashed the (now-deleted) rollup.config.js. Hash tsdown.config.mjs instead so a config-only change invalidates the cached dist/api builds. (Found by Codex review.)

* 🔧 chore: Replace deprecated tsdown `external` with `deps.neverBundle`

tsdown 0.22 deprecated the top-level `external` option in favor of `deps.neverBundle`. Migrate the data-schemas config and set `deps.onlyBundle: false` to silence the (intentional) dotenv bundling hint. Build output and externalization are unchanged — dotenv bundled, all peers external.
2026-06-07 21:40:48 -04:00
..
__tests__ 🌩️ feat: Strict CloudFront signed cookie enforcement via requireSignedAccess (#13078) 2026-05-11 23:30:01 -04:00
AppService.interface.spec.ts 🔃 refactor: Decouple Effects from AppService, move to data-schemas (#9974) 2025-10-05 06:37:57 -04:00
AppService.spec.ts perf: Migrate data-schemas Build to tsdown with isolatedDeclarations (#13578) 2026-06-07 21:40:48 -04:00
build.spec.ts 🆔 feat: Built-in Build Metadata for Support Triage (#12756) 2026-05-23 09:41:13 -04:00
build.ts 🆔 feat: Built-in Build Metadata for Support Triage (#12756) 2026-05-23 09:41:13 -04:00
cdn.ts 🌩️ feat: Strict CloudFront signed cookie enforcement via requireSignedAccess (#13078) 2026-05-11 23:30:01 -04:00
checks.spec.ts 🔃 refactor: Decouple Effects from AppService, move to data-schemas (#9974) 2025-10-05 06:37:57 -04:00
checks.ts 🧹 chore: Clean Up Config Fields (#12537) 2026-04-03 12:22:58 -04:00
config.test.ts 🧹 chore: Clean Up Config Fields (#12537) 2026-04-03 12:22:58 -04:00
config.ts 🗝️ feat: Credential Variables for DB-Sourced MCP Servers (#12044) 2026-03-03 18:02:37 -05:00
index.ts 🆔 feat: Built-in Build Metadata for Support Triage (#12756) 2026-05-23 09:41:13 -04:00
limits.ts 🔃 refactor: Decouple Effects from AppService, move to data-schemas (#9974) 2025-10-05 06:37:57 -04:00
metrics.spec.ts ⚖️ feat: Add Operational Prometheus Metrics (#13265) 2026-05-22 20:47:41 -04:00
metrics.ts ⚖️ feat: Add Operational Prometheus Metrics (#13265) 2026-05-22 20:47:41 -04:00
permissions.spec.ts 🔗 feat: Add Granular Access Control to Shared Links via ACL System (#13051) 2026-06-03 14:17:17 -04:00
permissions.ts 🔗 feat: Add Granular Access Control to Shared Links via ACL System (#13051) 2026-06-03 14:17:17 -04:00
resolve.spec.ts 🏢 feat: Tenant-Scoped App Config in Auth Login Flows (#12434) 2026-03-27 16:08:43 -04:00
resolve.ts 🏢 feat: Tenant-Scoped App Config in Auth Login Flows (#12434) 2026-03-27 16:08:43 -04:00
service.spec.ts 🎛️ refactor: Scope App-Config Override Cache by Isolation Context (#13455) 2026-06-01 18:00:53 -04:00
service.ts 🎛️ refactor: Scope App-Config Override Cache by Isolation Context (#13455) 2026-06-01 18:00:53 -04:00
shutdown.spec.ts 🎨 chore: prettier --write all workspaces (#13281) 2026-05-23 17:52:58 -04:00
shutdown.ts 🎨 chore: prettier --write all workspaces (#13281) 2026-05-23 17:52:58 -04:00