目录重组:后端按core/domains分领域存放(仅移动与更新引用)

- 50个后端模块用git mv移入core/与domains/<领域>/,入口server.js、launch.js、restore.js及server/原位不动
- 所有require路径由脚本按新旧位置统一换算(后端、server/、测试)
- 新增test/app-paths.test.js,锁定默认数据目录、public目录与飞书配置文件的绝对位置
- 维护与部署.md补充目录说明并更新模块路径

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
黄健铭andClaude Opus 5.5 committed 2026-12-04 13:01:19 -08:00
1 parent 95c481c74a
commit 9ec37196d4
172 files changed
+458 -384

No files matched your search

@@ -5,9 +5,9 @@ const { test } = require('node:test'),
const fs = require('node:fs'),
os = require('node:os'),
path = require('node:path');
const { Ledger, today } = require('../ledger'),
const { Ledger, today } = require('../core/ledger'),
{ createApp, createUser } = require('../server');
const RecoveryChanges = require('../recovery-changes');
const RecoveryChanges = require('../domains/recoveries/recovery-changes');
const owner = { id: 'synthetic-pair-integration-owner', name: '合成对数经办', role: 'owner' },
D = today();
const contents = l =>
@@ -484,7 +484,7 @@ test('未启用对数的回收更正保留升级前快照指纹,不因新增
assert.ok(!Object.hasOwn(snapshot, 'movementCounts'));
const legacyDependency = {
snapshot,
pool: require('../rolling-material-pools').dependency(f.l),
pool: require('../domains/materials/rolling-material-pools').dependency(f.l),
inventory: f.l.rows('SELECT id,date,pocket,mg FROM movements ORDER BY rowid'),
};
assert.equal(saved.dependency, createHash('sha256').update(JSON.stringify(legacyDependency)).digest('hex'));