Files
order-notification-automation/src/server.cjs
T
abaishu0730 94fc985553 feat: add guarded BPM category and template workflow
Implement server-owned read-only sample checks, category publication, explicit
order-version identity and durable PDF/archive/notification steps. Freeze
category-bound templates and recipients for isolated scheduled delivery, and
require human verification for unknown SMTP outcomes. Add order/batch views
and local HTTP/browser/PDF/archive regression coverage.

Fix Unicode Windows startup links found by full regression using IShellLinkW.
Automatic processing and sending stay disabled; no service deployment.

Validation: npm ci; npm test -- --test-concurrency=1 (242 pass, 1 optional
ZCode skip, 0 fail); 31 syntax checks; scoped independent code review.
Live BPM V13/SMB/163 acceptance remains pending.
2026-10-22 16:52:59 +08:00

12 lines
753 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const {createServer,startService}=require('./app/bridge.cjs');
const {main}=require('./app/application.cjs');
const {safeDiagnostic}=require('./shared/diagnostics.cjs');
const startupAt=performance.now();
if (require.main === module) main().then(app=>{
const stop=()=>app.stop().then(()=>process.exit(0),()=>process.exit(1));
process.once('SIGINT',stop);process.once('SIGTERM',stop);
process.on('message',message=>{if(message==='order:shutdown')stop();});
console.info('启动耗时(ms):'+Math.round(performance.now()-startupAt));
}).catch(error => { console.error('启动失败:'+JSON.stringify(safeDiagnostic(error,{durationMs:performance.now()-startupAt}))); process.exitCode=1; });
module.exports = { createServer, startService, main };