1.7 KiB
1.7 KiB
Development Hints
Project Structure
This project follows the nupst/spark pattern for Deno-based CLI tools with binary distribution.
Key Components
-
ISO Management (
ts/classes/)iso-downloader.ts- Downloads Ubuntu ISOs from official mirrorsiso-cache.ts- Manages cached ISOs with multi-version supportiso-extractor.ts- Extracts ISOs using xorrisoiso-packer.ts- Repacks modified ISOs into bootable imagesiso-builder.ts- Orchestrates the entire build process
-
Cloud-Init (
ts/classes/)cloud-init-generator.ts- Generates cloud-init configuration filesconfig-manager.ts- Loads and validates YAML configs
-
CLI (
ts/cli.ts)- Command-line interface with commands: build, cache, template, validate
System Dependencies
The tool requires these system tools at runtime:
xorriso- ISO manipulationsyslinux-utils- For USB-bootable ISOs (isohybrid command)
Development Commands
# Install dependencies
deno install
# Run in development mode
deno task dev --help
# Type checking
deno task check
# Format code
deno task fmt
# Lint
deno task lint
# Run tests
deno task test
# Compile binaries
deno task compile
Distribution
Binaries are compiled for 5 platforms:
- Linux x64
- Linux ARM64
- macOS x64
- macOS ARM64
- Windows x64
Next Steps
- Implement CLI flag-based building (currently only config files work)
- Add interactive mode with prompts
- Implement boot scripts injection with systemd service creation
- Add pre-install packages feature (requires squashfs manipulation)
- Write comprehensive tests
- Compile and test binaries
- Set up CI/CD pipeline
- Publish to npm