How azatakmyradov/sagex3-compiler-server works
Project Type Analysis
This is a specialized development tool that serves as a compiler service for Sage X3 Adonix, with integration into VSCode through an extension. It's designed to run as a persistent service using PM2 process manager.
Main Components
A. Core Service Components:
• Adonix Compiler Service (Main Process)
• Configuration Manager
• Command Handler
• Type Definitions System
B. External Integrations:
• VSCode Extension (External Component)
• Sage X3 Environment
• PM2 Process Manager
┌─────────────────────────────────────────────┐
• VSCode Extension │
• ┘
• ↕
┌─────────────────────────────────────────────┐
• Adonix Compiler Service │
• ┬──────────────┬───────────┤
• Adonix.ts │ Command.ts │ helpers.ts│
• (Core Logic) │(CMD Handler) │(Utilities)│
• ┴──────────────┴───────────┘
• ↕
┌─────────────────────────────────────────────┐
• Sage X3 Environment │
• ┘
Component Details
a) Service Layer:
• Main service entry point (main.ts)
• Adonix compiler core (Adonix.ts)
• Command handling system (Command.ts)
• Helper utilities (helpers.ts)
b) Configuration Layer:
• Environment configuration (.env)
• Application configuration (app.config.cjs)
• TypeScript configuration (tsconfig.json)
c) Integration Points:
• VSCode Extension connection
• Sage X3 environment interaction
• PM2 process management
Important Elements to Emphasize
a) Data Flow:
• How commands flow from VSCode to the compiler service
• How the compiler interacts with the Sage X3 environment
• Configuration loading paths
b) Process Management:
• PM2's role in maintaining the service
• Startup/shutdown flows (start.bat, stop.bat)