Skip to content

Commit 9d90346

Browse files
fix: remove dead files, upgrade dependencies, add 10 transport protocols
- Remove 9 unused deps (dotenv, ini, js-yaml, open, ora, decompress, brotli, lz4js, ws) - Upgrade uuid 9→14, commander 11→12, archiver 6→7 - Fix ES module bugs in crypto, vcs, transport (require() in ESM) - Fix Commander parseInt radix bug causing port corruption in 7 commands - Fix --verbose/--version flag conflict with Commander v12 - Add operation logger (logger.js) with fallback history in log command - Add 10 transport protocols (ssh/scp/sftp/rsync/ws/pipe/hybrid/chunked/http) - Add Windows installer wizard (CloudSync-Setup.bat + CloudSync.iss) - Add CalVer auto-versioning CI/CD (YYYY.M.BUILD) - Rewrite README with full protocol documentation and usage examples - Remove AI-generated docs, dead references, replit traces - Clean .gitignore and .npmignore alignment
1 parent ba5f5cb commit 9d90346

36 files changed

Lines changed: 1303 additions & 4217 deletions

.github/workflows/ci.yml

Lines changed: 15 additions & 198 deletions
Original file line numberDiff line numberDiff line change
@@ -1,213 +1,30 @@
1-
name: CI/CD Pipeline
1+
name: CI
2+
3+
# PR check — fast feedback before merging to main.
4+
# The full release pipeline (tests + build + publish) runs on push to main via release.yml.
25

36
on:
4-
push:
5-
branches: [ main, develop ]
67
pull_request:
78
branches: [ main ]
8-
release:
9-
types: [ published ]
109
workflow_dispatch:
1110

1211
jobs:
13-
# ============================================
14-
# LINT AND TEST
15-
# ============================================
16-
lint-and-test:
17-
name: Lint & Test (Node ${{ matrix.node }})
12+
test:
13+
name: Test (Node ${{ matrix.node }})
1814
runs-on: ubuntu-latest
19-
defaults:
20-
run:
21-
working-directory: ./cloudsync-cli
22-
15+
defaults: { run: { working-directory: ./cloudsync-cli } }
2316
strategy:
2417
matrix:
2518
node: ['18', '20', '22']
26-
2719
steps:
28-
- name: Checkout
29-
uses: actions/checkout@v4
30-
31-
- name: Setup Node.js ${{ matrix.node }}
32-
uses: actions/setup-node@v4
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-node@v4
3322
with:
3423
node-version: ${{ matrix.node }}
35-
cache: 'npm'
24+
cache: npm
3625
cache-dependency-path: cloudsync-cli/package-lock.json
37-
38-
- name: Install dependencies
39-
run: npm ci
40-
41-
- name: Run ESLint
42-
run: npm run lint || true
43-
44-
- name: Run tests
45-
run: npm test
46-
47-
- name: Upload coverage
48-
uses: codecov/codecov-action@v3
49-
with:
50-
file: ./cloudsync-cli/coverage/lcov.info
51-
fail_ci_if_error: false
52-
53-
# ============================================
54-
# TEST ON WINDOWS
55-
# ============================================
56-
test-windows:
57-
name: Test on Windows
58-
runs-on: windows-latest
59-
defaults:
60-
run:
61-
working-directory: ./cloudsync-cli
62-
63-
steps:
64-
- name: Checkout
65-
uses: actions/checkout@v4
66-
67-
- name: Setup Node.js
68-
uses: actions/setup-node@v4
69-
with:
70-
node-version: '20'
71-
cache: 'npm'
72-
cache-dependency-path: cloudsync-cli/package-lock.json
73-
74-
- name: Install dependencies
75-
run: npm ci
76-
77-
- name: Run tests
78-
run: npm test
79-
80-
- name: Test CLI help
81-
run: node bin/cloudsync.js --help
82-
83-
# ============================================
84-
# TEST ON MACOS
85-
# ============================================
86-
test-macos:
87-
name: Test on macOS
88-
runs-on: macos-latest
89-
defaults:
90-
run:
91-
working-directory: ./cloudsync-cli
92-
93-
steps:
94-
- name: Checkout
95-
uses: actions/checkout@v4
96-
97-
- name: Setup Node.js
98-
uses: actions/setup-node@v4
99-
with:
100-
node-version: '20'
101-
cache: 'npm'
102-
cache-dependency-path: cloudsync-cli/package-lock.json
103-
104-
- name: Install dependencies
105-
run: npm ci
106-
107-
- name: Run tests
108-
run: npm test
109-
110-
# ============================================
111-
# SECURITY AUDIT
112-
# ============================================
113-
security-audit:
114-
name: Security Audit
115-
runs-on: ubuntu-latest
116-
defaults:
117-
run:
118-
working-directory: ./cloudsync-cli
119-
120-
steps:
121-
- name: Checkout
122-
uses: actions/checkout@v4
123-
124-
- name: Setup Node.js
125-
uses: actions/setup-node@v4
126-
with:
127-
node-version: '20'
128-
129-
- name: Install dependencies
130-
run: npm ci
131-
132-
- name: Run npm audit
133-
run: npm audit --audit-level=high || true
134-
135-
# ============================================
136-
# BUILD PACKAGE
137-
# ============================================
138-
build:
139-
name: Build Package
140-
runs-on: ubuntu-latest
141-
needs: [lint-and-test]
142-
defaults:
143-
run:
144-
working-directory: ./cloudsync-cli
145-
146-
steps:
147-
- name: Checkout
148-
uses: actions/checkout@v4
149-
150-
- name: Setup Node.js
151-
uses: actions/setup-node@v4
152-
with:
153-
node-version: '20'
154-
cache: 'npm'
155-
cache-dependency-path: cloudsync-cli/package-lock.json
156-
157-
- name: Install dependencies
158-
run: npm ci
159-
160-
- name: Build package
161-
run: npm run build || true
162-
163-
- name: Verify CLI
164-
run: |
165-
node bin/cloudsync.js --version
166-
node bin/cloudsync.js doctor
167-
168-
- name: Upload artifacts
169-
uses: actions/upload-artifact@v4
170-
with:
171-
name: cloudsync-cli-artifact
172-
path: |
173-
cloudsync-cli/bin/
174-
cloudsync-cli/src/
175-
cloudsync-cli/package.json
176-
cloudsync-cli/package-lock.json
177-
cloudsync-cli/LICENSE
178-
cloudsync-cli/README.md
179-
retention-days: 7
180-
181-
# ============================================
182-
# PUBLISH TO NPM (on release)
183-
# ============================================
184-
publish-npm:
185-
name: Publish to npm
186-
runs-on: ubuntu-latest
187-
needs: [lint-and-test, test-windows, test-macos]
188-
if: github.event_name == 'release'
189-
defaults:
190-
run:
191-
working-directory: ./cloudsync-cli
192-
193-
steps:
194-
- name: Checkout
195-
uses: actions/checkout@v4
196-
197-
- name: Setup Node.js
198-
uses: actions/setup-node@v4
199-
with:
200-
node-version: '20'
201-
cache: 'npm'
202-
cache-dependency-path: cloudsync-cli/package-lock.json
203-
204-
- name: Install dependencies
205-
run: npm ci
206-
207-
- name: Run tests
208-
run: npm test
209-
210-
- name: Publish to npm
211-
run: npm publish
212-
env:
213-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
26+
- run: npm ci
27+
- run: |
28+
for f in $(find src -name '*.js'); do node --check "$f" || exit 1; done
29+
node --check bin/cloudsync.js || exit 1
30+
- run: npm test

.github/workflows/coverage.yml

Lines changed: 0 additions & 100 deletions
This file was deleted.

0 commit comments

Comments
 (0)