[PR #9] [MERGED] feat: v2.1.0 - Full TypeScript migration with enhanced tooling and bug fixes #10

Closed
opened 2026-03-04 01:38:07 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/tuanngocptn/nport/pull/9
Author: @tuanngocptn
Created: 1/27/2026
Status: Merged
Merged: 1/27/2026
Merged by: @tuanngocptn

Base: mainHead: feat/restructure


📝 Commits (7)

  • 7921815 Enhance documentation and code structure for NPort CLI
  • 484c46b Add TypeScript migration and enhance project structure
  • 9b79a2c Fix cloudflared binary download for Intel and ARM64 Macs in bin-manager.ts and update CHANGELOG.md
  • 7d1b669 Add GitHub Actions workflows for server and website deployment
  • 3b7f542 Add CI workflow for testing CLI and server components
  • 0e5939b Update CI workflow to run linting instead of type checking
  • fef176c Update CI workflow and Vitest configuration

📊 Changes

68 files changed (+10344 additions, -6777 deletions)

View changed files

.ai/context.md (+194 -0)
.cursorrules (+83 -0)
.github/CODEOWNERS (+30 -0)
.github/workflows/ci.yml (+56 -0)
.github/workflows/deploy-server.yml (+42 -0)
.github/workflows/deploy-website.yml (+40 -0)
📝 .gitignore (+14 -73)
📝 CHANGELOG.md (+156 -0)
📝 CLIENT_SETUP.md (+40 -5)
📝 README.md (+42 -32)
TODO.md (+188 -0)
bin/.gitkeep (+0 -3)
docs/API.md (+284 -0)
docs/ARCHITECTURE.md (+311 -0)
docs/CONTRIBUTING.md (+376 -0)
index.js (+0 -110)
📝 package-lock.json (+1614 -8)
📝 package.json (+18 -7)
scripts/postinstall.js (+25 -0)
📝 server/.gitignore (+17 -160)

...and 48 more files

📄 Description

  • Complete TypeScript migration for CLI and Server with strict type checking
  • Added comprehensive documentation, unit testing with Vitest, and CI/CD workflows
  • Fixed cloudflared binary download issues on Intel and ARM64 Macs

What's Changed

Added

  • 🔷 Full TypeScript Migration: Complete rewrite of CLI and Server in TypeScript with strict type checking
  • 📚 Comprehensive Documentation: New docs/ folder with ARCHITECTURE.md, API.md, and CONTRIBUTING.md
  • 🧪 Unit Testing with Vitest: Test suite for argument parsing, version comparison, and state management
  • 🔄 Auto-download Cloudflared: Binary downloads automatically on first run
  • 🔒 Protected Subdomain Support: Enhanced error handling for reserved subdomains (e.g., api)
  • 🤖 AI Context Support: Added .ai/context.md and .cursorrules for AI-assisted development
  • ⚙️ CI/CD Workflows: GitHub Actions for testing, server deployment, and website deployment

Changed

  • 🏗️ Project Structure: Reorganized with src/, dist/, tests/, and src/types/ directories
  • 📦 Build System: TypeScript compilation with source maps
  • ⚙️ System Requirements: Updated to Node.js 20+ and npm 10+

Fixed

  • 🐛 Intel Mac Binary Download: Fixed architecture mapping (x64amd64)
  • 🐛 ARM64 Mac Binary: Now downloads correct cloudflared-darwin-arm64.tgz instead of AMD64 binary

Test Plan

  • Run npm test to verify all unit tests pass
  • Run npm run build to verify TypeScript compilation
  • Test npm install -g . on Intel Mac to verify binary download
  • Test npm install -g . on ARM64 Mac to verify binary download
  • Verify nport 3000 -s test creates tunnel successfully

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/tuanngocptn/nport/pull/9 **Author:** [@tuanngocptn](https://github.com/tuanngocptn) **Created:** 1/27/2026 **Status:** ✅ Merged **Merged:** 1/27/2026 **Merged by:** [@tuanngocptn](https://github.com/tuanngocptn) **Base:** `main` ← **Head:** `feat/restructure` --- ### 📝 Commits (7) - [`7921815`](https://github.com/tuanngocptn/nport/commit/7921815ab3e8b7c2c54026076dae7972542c4672) Enhance documentation and code structure for NPort CLI - [`484c46b`](https://github.com/tuanngocptn/nport/commit/484c46be0bf72a4df26503aab92a535d0bee532c) Add TypeScript migration and enhance project structure - [`9b79a2c`](https://github.com/tuanngocptn/nport/commit/9b79a2c243b229f8fb5eabe9afe0195c236fdf13) Fix cloudflared binary download for Intel and ARM64 Macs in bin-manager.ts and update CHANGELOG.md - [`7d1b669`](https://github.com/tuanngocptn/nport/commit/7d1b669372df733ca03b55391ae3eff35ac473fe) Add GitHub Actions workflows for server and website deployment - [`3b7f542`](https://github.com/tuanngocptn/nport/commit/3b7f5422f7aeb89da522ba79031131aa1a259e2c) Add CI workflow for testing CLI and server components - [`0e5939b`](https://github.com/tuanngocptn/nport/commit/0e5939b5e6e6180fdbd32db716a7512aeabc3c4e) Update CI workflow to run linting instead of type checking - [`fef176c`](https://github.com/tuanngocptn/nport/commit/fef176cecd8aed6f06d1353eb6f5b6ccfd84165e) Update CI workflow and Vitest configuration ### 📊 Changes **68 files changed** (+10344 additions, -6777 deletions) <details> <summary>View changed files</summary> ➕ `.ai/context.md` (+194 -0) ➕ `.cursorrules` (+83 -0) ➕ `.github/CODEOWNERS` (+30 -0) ➕ `.github/workflows/ci.yml` (+56 -0) ➕ `.github/workflows/deploy-server.yml` (+42 -0) ➕ `.github/workflows/deploy-website.yml` (+40 -0) 📝 `.gitignore` (+14 -73) 📝 `CHANGELOG.md` (+156 -0) 📝 `CLIENT_SETUP.md` (+40 -5) 📝 `README.md` (+42 -32) ➕ `TODO.md` (+188 -0) ➖ `bin/.gitkeep` (+0 -3) ➕ `docs/API.md` (+284 -0) ➕ `docs/ARCHITECTURE.md` (+311 -0) ➕ `docs/CONTRIBUTING.md` (+376 -0) ➖ `index.js` (+0 -110) 📝 `package-lock.json` (+1614 -8) 📝 `package.json` (+18 -7) ➕ `scripts/postinstall.js` (+25 -0) 📝 `server/.gitignore` (+17 -160) _...and 48 more files_ </details> ### 📄 Description - Complete TypeScript migration for CLI and Server with strict type checking - Added comprehensive documentation, unit testing with Vitest, and CI/CD workflows - Fixed cloudflared binary download issues on Intel and ARM64 Macs ## What's Changed ### Added - 🔷 **Full TypeScript Migration**: Complete rewrite of CLI and Server in TypeScript with strict type checking - 📚 **Comprehensive Documentation**: New `docs/` folder with ARCHITECTURE.md, API.md, and CONTRIBUTING.md - 🧪 **Unit Testing with Vitest**: Test suite for argument parsing, version comparison, and state management - 🔄 **Auto-download Cloudflared**: Binary downloads automatically on first run - 🔒 **Protected Subdomain Support**: Enhanced error handling for reserved subdomains (e.g., `api`) - 🤖 **AI Context Support**: Added `.ai/context.md` and `.cursorrules` for AI-assisted development - ⚙️ **CI/CD Workflows**: GitHub Actions for testing, server deployment, and website deployment ### Changed - 🏗️ **Project Structure**: Reorganized with `src/`, `dist/`, `tests/`, and `src/types/` directories - 📦 **Build System**: TypeScript compilation with source maps - ⚙️ **System Requirements**: Updated to Node.js 20+ and npm 10+ ### Fixed - 🐛 **Intel Mac Binary Download**: Fixed architecture mapping (`x64` → `amd64`) - 🐛 **ARM64 Mac Binary**: Now downloads correct `cloudflared-darwin-arm64.tgz` instead of AMD64 binary ## Test Plan - [x] Run `npm test` to verify all unit tests pass - [x] Run `npm run build` to verify TypeScript compilation - [x] Test `npm install -g .` on Intel Mac to verify binary download - [x] Test `npm install -g .` on ARM64 Mac to verify binary download - [x] Verify `nport 3000 -s test` creates tunnel successfully --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 01:38:07 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nport#10
No description provided.