sftp-push-sync 2.1.4 → 2.3.0
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/README.md +9 -6
- package/package.json +1 -1
- package/src/core/SftpPushSyncApp.mjs +5 -1
package/README.md
CHANGED
|
@@ -153,15 +153,17 @@ The dry run is a great way to compare files and fill the cache.
|
|
|
153
153
|
|
|
154
154
|
### How ist works
|
|
155
155
|
|
|
156
|
-
|
|
156
|
+
There are 7 steps to follow:
|
|
157
157
|
|
|
158
158
|
- Phase 1: Scan local files
|
|
159
159
|
- Phase 2: Scan remote files
|
|
160
|
-
- Phase 3: Compare &
|
|
160
|
+
- Phase 3: Compare & Decide
|
|
161
161
|
- Phase 4: Removing orphaned remote files
|
|
162
|
-
- Preparing remote directories
|
|
163
|
-
- Phase
|
|
164
|
-
- Cleaning up empty remote directories
|
|
162
|
+
- Phase 5: Preparing remote directories
|
|
163
|
+
- Phase 6: Apply changes
|
|
164
|
+
- Phase 7: Cleaning up empty remote directories
|
|
165
|
+
|
|
166
|
+
Phases 1 and 2 can optionally be executed in parallel. Phase 6 always runs in parallel with as many worker threads as the FTP server allows.
|
|
165
167
|
|
|
166
168
|
### Sidecar uploads / downloads
|
|
167
169
|
|
|
@@ -256,7 +258,8 @@ However, it should also manage directories:
|
|
|
256
258
|
|
|
257
259
|
You can safely delete the local cache at any time. The first analysis will then take longer, because remote hashes will be streamed again. After that, everything will run fast.
|
|
258
260
|
|
|
259
|
-
Note: The first run always takes a while, especially with lots of media – so be patient! Once the cache is full, it will be faster.
|
|
261
|
+
Note 1: The first run always takes a while, especially with lots of media – so be patient! Once the cache is full, it will be faster.
|
|
262
|
+
Note 2: Reliability and accuracy are more important to me than speed.
|
|
260
263
|
|
|
261
264
|
## Example Output
|
|
262
265
|
|
package/package.json
CHANGED
|
@@ -730,6 +730,10 @@ export class SftpPushSyncApp {
|
|
|
730
730
|
port: this.connection.port,
|
|
731
731
|
username: this.connection.user,
|
|
732
732
|
password: this.connection.password,
|
|
733
|
+
// Keep-Alive to prevent server disconnection during long operations
|
|
734
|
+
keepaliveInterval: 10000, // Send keepalive every 10 seconds
|
|
735
|
+
keepaliveCountMax: 10, // Allow up to 10 missed keepalives before disconnect
|
|
736
|
+
readyTimeout: 30000, // 30s timeout for initial connection
|
|
733
737
|
});
|
|
734
738
|
connected = true;
|
|
735
739
|
this.log(`${TAB_A}${pc.green("✔ Connected to SFTP.")}`);
|
|
@@ -838,7 +842,7 @@ export class SftpPushSyncApp {
|
|
|
838
842
|
this.log("");
|
|
839
843
|
|
|
840
844
|
// Phase 3 – Analyse Differences (delegiert an Helper)
|
|
841
|
-
this.log(pc.bold(pc.cyan("🔎 Phase 3: Compare &
|
|
845
|
+
this.log(pc.bold(pc.cyan("🔎 Phase 3: Compare & Decide …")));
|
|
842
846
|
|
|
843
847
|
const { getLocalHash, getRemoteHash, save: saveCache } = this.hashCache;
|
|
844
848
|
|