mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-18 14:08:21 +00:00
* fix: normalize MCP UI resource rendering * fix: filter unsupported MCP UI resources * fix: preserve MCP UI marker examples * fix: handle MCP UI resource edge cases * fix: harden MCP UI marker sanitization * fix: scope MCP UI marker sanitization * fix: parse MCP UI marker contexts * fix: align MCP UI sanitizer parsing * fix: match MCP UI renderer syntax * fix: align blockquote marker spans * fix: decode MCP UI text node sources * fix: sanitize nested subagent markers * fix: bound MCP UI sanitizer traversal * fix: keep MCP UI marker mapping linear * style: sort security patch imports * fix: harden nested MCP UI sanitization * fix: mirror citation cleanup for MCP UI markers * fix: clean decoded citation markers * fix: clean assembled citation markers * fix: align MCP marker sanitization with rendering * fix: match persisted MCP marker render paths * fix: preserve highlighted citation boundaries * fix: align MCP markers across content renderers * fix: preserve citation renderer boundaries * fix: match legacy thinking trim semantics
33 lines
1.3 KiB
JavaScript
33 lines
1.3 KiB
JavaScript
import path from 'node:path';
|
|
import { defineConfig } from 'tsdown';
|
|
|
|
const isMarkdownParserDependency = (id) =>
|
|
/^(?:mdast-util-|micromark(?:-|$)|decode-named-character-reference$|devlop$|longest-streak$|unist-util-|zwitch$|character-(?:entities|reference)(?:-|$)|parse-entities$|stringify-entities$|is-(?:alphanumerical|alphabetical|decimal|hexadecimal)$|ccount$|markdown-table$|escape-string-regexp$)/.test(
|
|
id,
|
|
);
|
|
|
|
export default defineConfig({
|
|
entry: ['src/index.ts', 'src/admin/capabilities.ts'],
|
|
format: ['esm', 'cjs'],
|
|
platform: 'node',
|
|
dts: { oxc: true },
|
|
outDir: 'dist',
|
|
sourcemap: true,
|
|
// Warn on module cycles at build time; CI enforces via config/circular-deps.mjs.
|
|
checks: { circularDependency: true },
|
|
// Externalize third-party deps consumers provide, while bundling `dotenv` for its
|
|
// env-loading side effect and the ESM-only Markdown parser for CommonJS consumers.
|
|
// `neverBundle` is the 0.22 replacement for the deprecated `external`.
|
|
deps: {
|
|
alwaysBundle: isMarkdownParserDependency,
|
|
neverBundle: (id) =>
|
|
id !== 'dotenv' &&
|
|
!id.startsWith('dotenv/') &&
|
|
!isMarkdownParserDependency(id) &&
|
|
!id.startsWith('.') &&
|
|
!id.startsWith('~') &&
|
|
!path.isAbsolute(id),
|
|
// dotenv is bundled on purpose, so silence the "detected dependencies in bundle" hint.
|
|
onlyBundle: false,
|
|
},
|
|
});
|