feat embed wallets and add withdrawal records
This commit is contained in:
@@ -13,6 +13,10 @@ const frontendDefinitions = [
|
||||
...source.matchAll(/define\('([^']+)',\s*'[^']+',\s*'([^']+)'/g),
|
||||
].map((match) => ({ name: match[1], mode: match[2] }));
|
||||
const frontendNames = frontendDefinitions.map((item) => item.name);
|
||||
const embeddedResources = new Set([
|
||||
'wallet_basic', 'wallet_bank', 'wallet_payment', 'wallet_record',
|
||||
'wallet_refund', 'wallet_apply_cash',
|
||||
]);
|
||||
|
||||
for (const name of frontendNames) {
|
||||
const item = backend.get(name);
|
||||
@@ -29,7 +33,7 @@ for (const item of contract.resources) {
|
||||
throw new Error(
|
||||
`资源模式不一致:${item.name},后端=${item.mode},前端=${frontend?.mode}`,
|
||||
);
|
||||
if (!routes.includes(`'/${item.name}'`))
|
||||
if (!embeddedResources.has(item.name) && !routes.includes(`'/${item.name}'`))
|
||||
throw new Error(`缺少后端资源路由:${item.name}`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user