sftp-zip-deploy 0.0.8 → 0.1.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 +2 -1
- package/dist/utils.js +2 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -54,7 +54,8 @@ So avoid running commands that may trigger an input prompt.
|
|
|
54
54
|
## API
|
|
55
55
|
|
|
56
56
|
The library shares connection options for SFTP / SSH2, and reuses the standard `ConnectOptions` / `ConnectConfig`
|
|
57
|
-
types from the underlying modules.
|
|
57
|
+
types from the underlying modules. If you want to use that type explicitly, you will need to add `@types/ssh2-sftp-client`
|
|
58
|
+
as a DEV dependency.
|
|
58
59
|
|
|
59
60
|
The main interface [ISftpZipDeployConfig] has a number of options, including events for providing progress details:
|
|
60
61
|
|
package/dist/utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createZipArchive, ZipEntry
|
|
1
|
+
import { createZipArchive, ZipEntry } from 'node:zlib';
|
|
2
2
|
import { readFile } from 'node:fs/promises';
|
|
3
3
|
import { createWriteStream } from 'node:fs';
|
|
4
4
|
import { pipeline } from 'node:stream/promises';
|
|
@@ -33,13 +33,7 @@ export async function zipFiles(dir, files, zipPath) {
|
|
|
33
33
|
}
|
|
34
34
|
const archive = createZipArchive(entries);
|
|
35
35
|
const ws = createWriteStream(zipPath);
|
|
36
|
-
|
|
37
|
-
level: constants.Z_BEST_COMPRESSION, // 9 (default is 6)
|
|
38
|
-
windowBits: 15, // Max 32KB history window (default is 15)
|
|
39
|
-
memLevel: 9, // Max internal hash table memory (default is 8)
|
|
40
|
-
strategy: constants.Z_DEFAULT_STRATEGY,
|
|
41
|
-
};
|
|
42
|
-
await pipeline(archive, createGzip(maxCompressionOptions), ws);
|
|
36
|
+
await pipeline(archive, ws);
|
|
43
37
|
return ws.bytesWritten;
|
|
44
38
|
}
|
|
45
39
|
/**
|