سامانه صدور فاکتور و حسابداری
Phase 1: enforce application shell quality gates
davoodmehraban89 committed
Sep 28, 2026 at 17:30 UTC
521e62971c64e64a5cd3111eeeba0d67078cea0f
1 file changed
+3
-1
scripts/quality-check.mjs
+3
-1
@@ -17,6 +17,8 @@ for(const v of ['view-purchases','view-payments'])if(!index.includes(`data-view=
17
if(!index.includes("frame-ancestors 'none'")||!index.includes('upgrade-insecure-requests'))throw new Error('Production CSP hardening missing');
18
if(!index.includes('name="referrer" content="strict-origin-when-cross-origin"'))throw new Error('Referrer policy metadata missing');
19
if(!index.includes('فینورا — نسخه ۱.۰')||!index.includes('نسخه ۱.۰'))throw new Error('Visible application version is inconsistent');
20
+for(const shellId of ['module-rail','module-panel','module-panel-links','global-command-search','command-search-results'])if(!ids.includes(shellId))throw new Error('Phase 1 shell missing #'+shellId);
21
+for(const cls of ['module-rail','module-panel','topbar','global-search'])if(!index.includes('class="'+cls)&&!index.includes('class="sidebar '+cls)&&!index.includes('class="'+cls+' '))throw new Error('Phase 1 shell class missing: '+cls);
22
23
24
const scriptSrc=[...index.matchAll(/<script\s+src="([^"]+)"/g)].map(m=>m[1].split('?')[0]);
@@ -34,7 +36,7 @@ const must={
36
'selfcheck.js':['datastore.payments','invoices.has','purchases.has'],
37
'payments.js':['commitSavePayment','invoiceOutstanding','purchaseOutstanding','companyOk','legacyOk','amount>outstanding',"direction!=='inbound'","direction!=='outbound'",'projectId',"paymentMethod!=='credit'","old.invoiceType===invoiceType"],
38
'idle-and-reports.js':['rep-purchase-total','rep-expense-total','rep-accrual-profit','rep-cash-net','report-financial-summary'],
37
- 'ui.js':["dock.dataset.view===viewId"],
39
+ 'ui.js':["dock.dataset.view===viewId",'FINORA_MODULES','FINORA_COMMANDS','renderModulePanel','global-command-search'],
40
'accounting.js':['productMovement','getInventorySnapshot','getProjectFinancials','accrualProfit','cashNet','i.prodId||i.productId','companyId===active','companyOk'],
41
'drilldown.js':['openContactLedger','openDashboardDetail','openReportDetail','openFinancialSummaryDetail',"status==='cleared'"],
42
'sync.js':['getMyPurchases'],