Files
core/packages/compiled/tsup.config.ts
Teror Fox 00b66bef7e feat(core): 实现文章的发布/取消发布功能 (#2443)
* feat(migration): add isPublished field to posts and notes collections

* feat(note, post): add publish status management for notes and posts

* build(tsup): 添加 import.meta.url 支持

- 在 tsup 配置中添加 platform: 'node' 设置
- 注入 import.meta.url 兼容层,以支持不同模块格式

* build(core): 修改 mx-server 启动脚本路径

* feat(migration): 添加 v8.4.0 版本迁移脚本至history

* feat(core): 修复未认证用户可查看未发布内容的安全问题

- 在 Note 和 Post 模块中添加了对未认证用户的访问限制

* fix(core): 回滚 mx-server 启动脚本路径

* feat(migration): 添加 v8.4.0 数据库脚本以更新 notes 集合字段

* feat(migration): 更新 v8.4.0 修复脚本以重命名 hide 字段并互换其值

* feat(note): 替换 hide 字段为 isPublished,更新相关查询和条件

* feat(note): 将 hide 字段替换为 isPublished,更新相关数据模型

* feat(migration): 添加 v8.4.0 fix2修复脚本以更新 posts 集合中的 isPublished 字段为true
2025-07-03 16:06:06 +08:00

21 lines
496 B
TypeScript

import { defineConfig } from 'tsup'
export default defineConfig({
clean: true,
target: 'es2020',
entry: ['index.ts', 'auth.ts', 'zod.ts', 'install-pkg.ts'],
dts: true,
external: ['mongodb'],
format: ['cjs'],
platform: 'node',
banner: {
js: `const __injected_import_meta_url = require("url").pathToFileURL(__filename).href;`,
},
esbuildOptions(options) {
options.define = {
...options.define,
'import.meta.url': '__injected_import_meta_url',
}
},
})