How mizotake/unity-license-activate works
Main Components
• CLI Interface: This includes the command-line environment where the tool is invoked with parameters (email, password, .alf file path, and optionally a two-factor authentication code).
• Core Automation Script (activate.js): The heart of the project where the logic interacts with Puppeteer to automate browser actions.
• Puppeteer Module: Although not explicitly visible in the file tree, this dependency (listed in package.json) handles the headless browser functionality to automate the Unity license activation process.
• External Unity License Website: Represent the Unity website (https://license.unity3d.com/manual) as an external system that the tool interacts with.
• File System & Assets: This includes the .alf input file, image resources in the img folder, and the resulting .ulf file output saved in the project root.
• Package/Dependency Management: package.json and package-lock.json represent the Node.js ecosystem dependencies that facilitate running and updating the tool.
Relationships and Data Flow
• Inside the script, show a component labeled “Puppeteer Automation Engine” that represents the module managing browser automation.
Highlighting Architectural Patterns
• Separation of concerns: The CLI handling, core automation logic, external service interaction, and file system operations are clearly distinguished.
• That the design leverages puppeteer for screen-scraping/automation, a common pattern in automation tools.