Added npm package wrapper to enable installation via npm while
maintaining the Deno binary distribution model.
New Files:
- package.json: npm package configuration with binary wrapper
- bin/spark-wrapper.js: Detects platform and executes correct binary
- scripts/install-binary.js: Downloads appropriate binary on npm install
- .npmignore: Excludes source files from npm package
- npmextra.json: npm extra configuration
Updated:
- readme.md: Added npm installation instructions
How It Works:
1. User runs: npm install -g @serve.zone/spark
2. Postinstall script (install-binary.js) downloads the correct
pre-compiled binary for the user's platform from Gitea releases
3. Binary is cached in dist/binaries/
4. Wrapper script (spark-wrapper.js) executes the binary when user
runs 'spark' command
Supported via npm:
- Linux (x64, ARM64)
- macOS (Intel, Apple Silicon)
- Windows (x64)
This maintains the benefits of Deno compilation (no runtime deps)
while providing familiar npm-based installation for users who prefer it.
- Updated installation instructions for binary distribution
- Removed all npm/Node.js references
- Added detailed CLI command reference
- Included programmatic usage examples
- Added architecture diagrams
- Added troubleshooting section
- Added emojis for modern appeal
- Documented Deno development workflow
- Kept legal section up to date
Major migration to Deno runtime following the nupst project pattern:
Core Changes:
- Created deno.json configuration with tasks, imports, and settings
- Created mod.ts as main entry point with Deno permissions
- Updated all TypeScript imports from .js to .ts extensions
- Replaced Node.js APIs (process.exit) with Deno equivalents (Deno.exit)
- Updated path imports to use @std/path from JSR
Dependencies:
- Migrated all npm dependencies to use npm: prefix in import map
- Added Deno standard library imports (@std/path, @std/assert)
- Configured import aliases for all @push.rocks and @serve.zone packages
Build & Distribution:
- Created install.sh for downloading pre-compiled binaries
- Created uninstall.sh for clean system removal
- Created scripts/compile-all.sh for multi-platform compilation
- Supports Linux (x64, ARM64), macOS (x64, ARM64), Windows (x64)
Testing:
- Migrated tests to Deno test framework using @std/assert
- Created test.simple.ts for basic verification
- Updated test structure to use Deno.test instead of tap
CI/CD:
- Created .gitea/workflows/ci.yml for type checking, linting, and builds
- Created .gitea/workflows/release.yml for automated releases
- Created .gitea/release-template.md for release documentation
Cleanup:
- Removed package.json, pnpm-lock.yaml, tsconfig.json
- Removed Node.js CLI files (cli.js, cli.child.ts, cli.ts.js)
- Removed dist_ts/ compiled output directory
- Removed npmextra.json configuration
This migration enables standalone binary distribution without Node.js
runtime dependency while maintaining all existing functionality.