- 新增 PDF 文档支持,包括格式校验和完整性检查 - 扩展 Word、TXT 和 ZIP 格式附件处理能力 - 添加 Excel 附件可选择仅作为业务文件不解析行数据 - 实现业务助手表格布局配置新增库存和预算字段 - 集成通知、反馈通知等新的业务助手动作类型 - 完善部门管理包含父级部门和排序字段支持 - 增强业务规则校验涵盖更多系统管理场景 - 优化附件上传限制提示信息更准确 - 添加生成文件下载的安全性校验机制 - 扩展测试覆盖确保各业务动作规则正确性
19 lines
1.3 KiB
JavaScript
19 lines
1.3 KiB
JavaScript
import { execFileSync } from 'node:child_process';
|
|
import { writeFile } from 'node:fs/promises';
|
|
import { createRequire } from 'node:module';
|
|
const require=createRequire(import.meta.url);
|
|
const cli=require.resolve('expo/bin/cli');
|
|
const updates=require.resolve('expo-updates/bin/cli.js');
|
|
const env={...process.env,EXPO_NO_TELEMETRY:'1',CI:'1'};
|
|
const runtime=JSON.parse(execFileSync(process.execPath,[updates,'runtimeversion:resolve','--platform','android'],{env,encoding:'utf8'})).runtimeVersion;
|
|
execFileSync(process.execPath,[cli,'export','--platform','android','--output-dir','dist'],{env,stdio:'inherit'});
|
|
const config=JSON.parse(execFileSync(process.execPath,[cli,'config','--type','public','--json'],{env,encoding:'utf8'}));
|
|
const after=JSON.parse(execFileSync(process.execPath,[updates,'runtimeversion:resolve','--platform','android'],{env,encoding:'utf8'})).runtimeVersion;
|
|
if(runtime!==after)throw Error('Native configuration changed during export; rebuild before publishing');
|
|
config.runtimeVersion=runtime;
|
|
// Never ship build-machine paths or private signing material in the manifest.
|
|
delete config._internal;
|
|
await writeFile('dist/resolved-config.json',JSON.stringify(config,null,2));
|
|
await writeFile('dist/runtime-version.txt',runtime);
|
|
console.log(`Exported Android update for native runtime ${runtime}`);
|