- build.ts: 大幅扩展 Node.js Bun polyfill,新增 spawn、spawnSync、 file、gc、generateHeapSnapshot、embeddedFiles、semver、YAML、 version、stringWidth、wrapAnsi、listen 等 API 实现 - package.json: 更新描述为多模型终端 AI 编程助手,Node.js 为主要 运行时依赖,ws/yaml 移至 dependencies,bin 入口指向 cli-node.js - scripts/defines.ts: 版本号更新至 4.0.5.1 - fetch.ts: fetch.preconnect 添加 Node.js 降级实现(net.createConnection)
19 lines
734 B
TypeScript
19 lines
734 B
TypeScript
/**
|
|
* Shared MACRO define map used by both dev.ts (runtime -d flags)
|
|
* and build.ts (Bun.build define option).
|
|
*
|
|
* Each value is a JSON-stringified expression that replaces the
|
|
* corresponding MACRO.* identifier at transpile / bundle time.
|
|
*/
|
|
export function getMacroDefines(): Record<string, string> {
|
|
return {
|
|
"MACRO.VERSION": JSON.stringify("4.0.5.1"),
|
|
"MACRO.BUILD_TIME": JSON.stringify(new Date().toISOString()),
|
|
"MACRO.FEEDBACK_CHANNEL": JSON.stringify(""),
|
|
"MACRO.ISSUES_EXPLAINER": JSON.stringify(""),
|
|
"MACRO.NATIVE_PACKAGE_URL": JSON.stringify(""),
|
|
"MACRO.PACKAGE_URL": JSON.stringify("@costrict/csc"),
|
|
"MACRO.VERSION_CHANGELOG": JSON.stringify(""),
|
|
};
|
|
}
|