shared-hosting-sync 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +3 -0
- package/CHANGELOG.md +25 -0
- package/README.md +61 -13
- package/RELEASING.md +7 -7
- package/package.json +2 -2
- package/src/arguments.js +2 -2
- package/src/cli.js +535 -511
- package/src/core/deployment.js +3 -0
- package/src/core/envSchema.js +9 -0
- package/src/core/fileFingerprint.js +9 -0
- package/src/core/migrations/003_sync_state.sql +18 -0
- package/src/core/syncState.js +65 -0
- package/src/server/deployments.js +46 -9
- package/src/server/index.js +2 -1
- package/src/server/routes.js +1 -1
- package/src/transport/ftp.js +1 -1
- package/src/transport/reliable.js +3 -3
- package/src/transport/sftp.js +8 -2
- package/src/ui/deployments.js +17 -7
- package/src/ui/index.html +7 -6
- package/src/ui/logo.svg +7 -0
- package/src/ui/style.css +10 -2
- package/src/ui/ui.js +303 -293
- package/src/uploadQueue.js +106 -0
- package/src/uploader.js +69 -12
- package/src/watcher.js +7 -2
package/.env.example
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.5 — 18 November 2026
|
|
4
|
+
|
|
5
|
+
- List server folders before comparing local files during an initial scan, avoiding
|
|
6
|
+
a separate server metadata request for every local file. Verified matches are
|
|
7
|
+
saved to SQLite before the next sync.
|
|
8
|
+
- Upload through three independent connections by default, balanced by file size.
|
|
9
|
+
Idle workers take pending work from other queues.
|
|
10
|
+
- Return interrupted files to the pending queue for healthy workers, with bounded
|
|
11
|
+
retries and completion-based progress. Failed files remain pending in SQLite.
|
|
12
|
+
- Show individual queue status in the dashboard and allow 1–8 parallel uploads
|
|
13
|
+
through project settings, DEVSYNC_CONCURRENCY, or --concurrency.
|
|
14
|
+
|
|
15
|
+
## 0.1.4 — 27 October 2026
|
|
16
|
+
|
|
17
|
+
- Use persistent per-file sync records for fast local size and timestamp checks.
|
|
18
|
+
Unchanged syncs and previews no longer connect to the server.
|
|
19
|
+
- Add a confirmed, read-only Scan server / Initial sync action to seed matching
|
|
20
|
+
files before the first sync, with baseline status and setup guidance.
|
|
21
|
+
- Share sync records across CLI, dashboard, and watch; record successful uploads
|
|
22
|
+
individually, and keep failed uploads and in-flight edits pending for retry.
|
|
23
|
+
|
|
24
|
+
- Add a DevSync SVG logo to the dashboard header, About & Help, and browser tab.
|
|
25
|
+
- Show the running app version beside the logo in About & Help, loaded from package
|
|
26
|
+
metadata on startup and refreshed whenever Help opens.
|
|
27
|
+
|
|
3
28
|
## 0.1.3 — 27 October 2026
|
|
4
29
|
|
|
5
30
|
- Add a styled console startup banner with app version and creator contact details,
|
package/README.md
CHANGED
|
@@ -6,8 +6,7 @@ choose a local folder and a server destination, then deploy or keep files in syn
|
|
|
6
6
|
Use the terminal or a local browser dashboard. Both interfaces control the same
|
|
7
7
|
projects, settings, and deployment operations.
|
|
8
8
|
|
|
9
|
-
>
|
|
10
|
-
> CLI and UI onboarding, previews, deployment, sync, and watching are implemented.
|
|
9
|
+
> Requires Node.js 24 or newer.
|
|
11
10
|
|
|
12
11
|
The package name is **shared-hosting-sync**. Run it as `shared-hosting-sync` or
|
|
13
12
|
use the shorter `devsync` alias shown in examples below. Both commands run the
|
|
@@ -44,10 +43,11 @@ shared-hosting-sync --version
|
|
|
44
43
|
shared-hosting-sync ui
|
|
45
44
|
```
|
|
46
45
|
|
|
47
|
-
Alternatively,
|
|
46
|
+
Alternatively, run `npm run release:check` from the checkout and install the resulting
|
|
47
|
+
archive. Replace `<version>` with its actual version:
|
|
48
48
|
|
|
49
49
|
```sh
|
|
50
|
-
npm install -g ./artifacts/shared-hosting-sync
|
|
50
|
+
npm install -g "./artifacts/shared-hosting-sync-<version>.tgz"
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
For development, install from this checkout:
|
|
@@ -67,12 +67,46 @@ name conflict:
|
|
|
67
67
|
|
|
68
68
|
```sh
|
|
69
69
|
npm uninstall -g devsync
|
|
70
|
-
npm install -g
|
|
70
|
+
npm install -g shared-hosting-sync
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
This replaces the old global installation. Saved projects and credentials remain
|
|
74
|
-
in `~/.devsync/` (or your configured `DEVSYNC_HOME`).
|
|
75
|
-
|
|
74
|
+
in `~/.devsync/` (or your configured `DEVSYNC_HOME`). To back up the settings,
|
|
75
|
+
stop DevSync and copy that directory somewhere private. Keep the database and
|
|
76
|
+
`master.key` together so saved credentials can be restored.
|
|
77
|
+
|
|
78
|
+
## First sync for an existing site
|
|
79
|
+
|
|
80
|
+
1. Choose **Scan server / Initial sync** and confirm. DevSync lists the destination
|
|
81
|
+
folders first, then checks local files against that inventory. Files with the
|
|
82
|
+
same size are checked by content before being marked as synced.
|
|
83
|
+
2. Review pending files, then choose **Sync changes** to upload them. The scan
|
|
84
|
+
saves verified matches to SQLite and does not upload or delete server files.
|
|
85
|
+
3. For everyday updates, use **Sync changes** directly. It uses saved records and
|
|
86
|
+
only queues new or changed files. For an empty destination, skip the scan and
|
|
87
|
+
use **Sync changes** or **Deploy all files**.
|
|
88
|
+
|
|
89
|
+
## Parallel uploads
|
|
90
|
+
|
|
91
|
+
Deploy, Sync, and Watch use up to **3 upload queues** by default. Each queue owns
|
|
92
|
+
an independent connection to the same host and configured port, so FTP commands
|
|
93
|
+
never overlap on one control connection. FTP/FTPS data connections still use the
|
|
94
|
+
server's passive ports. SFTP uses separate SSH/SFTP sessions.
|
|
95
|
+
|
|
96
|
+
Files are initially balanced by byte size. Idle queues take pending work from
|
|
97
|
+
other queues. If a connection drops, its interrupted file returns to the pending
|
|
98
|
+
list and healthy queues continue. A file gets at most two retries after its first
|
|
99
|
+
attempt; replacement connection rounds are also bounded. Permission errors are
|
|
100
|
+
reported immediately. Failed files remain pending for a later sync. An uncertain
|
|
101
|
+
rename retries the entire temporary-file upload.
|
|
102
|
+
|
|
103
|
+
Set **Parallel uploads** under Edit setup → Hosting → SSH key and advanced
|
|
104
|
+
settings, or use `DEVSYNC_CONCURRENCY=3` in the project's environment file.
|
|
105
|
+
The CLI also accepts `devsync sync [label] --concurrency 3`. Values from 1 to 8
|
|
106
|
+
are supported; choose 1 for restrictive hosting accounts. Small batches open only
|
|
107
|
+
as many connections as needed, and previews or unchanged syncs open none.
|
|
108
|
+
Stopping Watch finishes the current upload batch, including bounded retries,
|
|
109
|
+
then closes its connections. Progress counts completed files, never retry attempts.
|
|
76
110
|
|
|
77
111
|
## Start from a project folder
|
|
78
112
|
|
|
@@ -342,9 +376,23 @@ Provision any server-side application secrets separately.
|
|
|
342
376
|
aliases are not coordinated. Keep `DEVSYNC_HOME` on a local disk.
|
|
343
377
|
- Plan, sync, and watch use the resolved server destination. Missing destinations
|
|
344
378
|
fail before connecting; `/` is allowed only when explicitly configured.
|
|
345
|
-
-
|
|
346
|
-
|
|
347
|
-
|
|
379
|
+
- Sync, preview, and watch compare local file size, modification time, and change
|
|
380
|
+
time with the last successful sync records in SQLite. Matching records survive
|
|
381
|
+
restarts. Unchanged syncs and previews do not connect to the server.
|
|
382
|
+
- Upload records are saved only after successful uploads. Failed files and files
|
|
383
|
+
edited during an upload remain pending. Preview-only runs do not update records.
|
|
384
|
+
- Records belong to a source folder and destination (protocol, host, port, account,
|
|
385
|
+
and server folder). Changing either starts a separate baseline.
|
|
386
|
+
- If files already exist on the server, use **Scan server / Initial sync** in the
|
|
387
|
+
dashboard once before your first sync. It asks for confirmation, lists server folders first, then compares local and server
|
|
388
|
+
content using SHA-256 for equal-size files, and saves only matching files. It
|
|
389
|
+
uploads or deletes nothing; use Sync changes afterward for pending files.
|
|
390
|
+
Terminal equivalent: `devsync scan [label]` (or `--confirm` for automation).
|
|
391
|
+
- Without existing records, Sync uploads every eligible local file and starts
|
|
392
|
+
tracking successful uploads. Normal Sync trusts those records: it does not detect
|
|
393
|
+
direct server edits or remote deletions. Use Deploy all files to restore local
|
|
394
|
+
content, or explicitly scan again to rebuild the baseline. Local deletions are
|
|
395
|
+
never mirrored to the server. `--force` uploads all eligible files.
|
|
348
396
|
- Upload failures remain visible in the saved project status and make one-time
|
|
349
397
|
sync commands exit unsuccessfully. Directory and inspection errors are surfaced.
|
|
350
398
|
- Settings and encrypted saved credentials live in `~/.devsync/`; set
|
|
@@ -394,6 +442,6 @@ Thank you for supporting the project!
|
|
|
394
442
|
|
|
395
443
|
## License
|
|
396
444
|
|
|
397
|
-
MIT. See [LICENSE](LICENSE).
|
|
398
|
-
|
|
399
|
-
|
|
445
|
+
MIT. See [LICENSE](LICENSE).
|
|
446
|
+
|
|
447
|
+
|
package/RELEASING.md
CHANGED
|
@@ -24,7 +24,7 @@ aliases, SQLite storage, environment onboarding, real FTP deploy/sync, dashboard
|
|
|
24
24
|
startup, API identity, and UI assets must pass. Nothing is installed into the
|
|
25
25
|
developer's usual global prefix. Generated files are under `artifacts/`:
|
|
26
26
|
|
|
27
|
-
- `shared-hosting-sync
|
|
27
|
+
- `shared-hosting-sync-<version>.tgz` (version follows package.json)
|
|
28
28
|
- `release.json`, including the complete package file list
|
|
29
29
|
- `SHA256SUMS`
|
|
30
30
|
|
|
@@ -45,9 +45,9 @@ npm whoami
|
|
|
45
45
|
npm view shared-hosting-sync name version
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
the
|
|
48
|
+
Confirm the signed-in account is the intended maintainer and that the candidate
|
|
49
|
+
version has not already been published. Replace `<version>` in the examples with
|
|
50
|
+
the candidate version from package.json. Use npm's browser sign-in and
|
|
51
51
|
complete any account/2FA requirements personally; do not put tokens into source
|
|
52
52
|
files or chat.
|
|
53
53
|
|
|
@@ -55,7 +55,7 @@ Once the account, version, passing CI, package manifest, and checksum are review
|
|
|
55
55
|
publish the exact checked archive:
|
|
56
56
|
|
|
57
57
|
```sh
|
|
58
|
-
npm publish ./artifacts/shared-hosting-sync
|
|
58
|
+
npm publish "./artifacts/shared-hosting-sync-<version>.tgz" --access public
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
Publishing with `--access public` makes the package contents publicly available. Publishing
|
|
@@ -66,8 +66,8 @@ published version; fix issues in a new version.
|
|
|
66
66
|
## Verify publication
|
|
67
67
|
|
|
68
68
|
```sh
|
|
69
|
-
npm view shared-hosting-sync
|
|
70
|
-
npm install -g shared-hosting-sync
|
|
69
|
+
npm view "shared-hosting-sync@<version>" name version dist.integrity
|
|
70
|
+
npm install -g "shared-hosting-sync@<version>"
|
|
71
71
|
shared-hosting-sync --version
|
|
72
72
|
devsync --version
|
|
73
73
|
shared-hosting-sync ui
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shared-hosting-sync",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Deploy and sync local projects to shared hosting over FTP, FTPS, or SFTP, with a CLI and local dashboard.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"scripts": {
|
|
50
50
|
"start": "node src/cli.js",
|
|
51
51
|
"release:check": "node scripts/release-check.js",
|
|
52
|
-
"test": "node test/ignore.test.js && node --test --test-timeout=60000 --test-concurrency=1 test/uploader.test.js test/transport-ftp.test.js test/cli-deployment.test.js test/cli-onboarding.test.js test/onboarding.test.js test/ui-onboarding.test.js test/ui-deployments.test.js test/reliability.test.js test/protocols.test.js test/transport-sftp.test.js test/watcher.test.js test/envResolver.test.js test/db.test.js test/secrets.test.js",
|
|
52
|
+
"test": "node test/ignore.test.js && node --test --test-timeout=60000 --test-concurrency=1 test/uploader.test.js test/upload-queue.test.js test/sync-state.test.js test/transport-ftp.test.js test/cli-deployment.test.js test/cli-onboarding.test.js test/onboarding.test.js test/ui-onboarding.test.js test/ui-deployments.test.js test/ui-sync.test.js test/reliability.test.js test/protocols.test.js test/transport-sftp.test.js test/watcher.test.js test/envResolver.test.js test/db.test.js test/secrets.test.js",
|
|
53
53
|
"prepack": "npm test",
|
|
54
54
|
"prepublishOnly": "npm test"
|
|
55
55
|
},
|
package/src/arguments.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const VALUE_FLAGS = new Set(['transport', 'env-file', 'remote-path', 'host', 'username', 'port', 'label', 'path'])
|
|
2
|
-
const BOOL_FLAGS = new Set(['dry-run', 'force', 'plan', 'sync', 'edit', 'browse', 'browser', 'help', 'version'])
|
|
1
|
+
const VALUE_FLAGS = new Set(['concurrency', 'transport', 'env-file', 'remote-path', 'host', 'username', 'port', 'label', 'path'])
|
|
2
|
+
const BOOL_FLAGS = new Set(['confirm', 'dry-run', 'force', 'plan', 'sync', 'edit', 'browse', 'browser', 'help', 'version'])
|
|
3
3
|
|
|
4
4
|
export function parseArgs(argv) {
|
|
5
5
|
let command
|