@ayush24k/telezipper 1.3.0 → 1.4.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 -2
- package/dist/bin/zipper.js +1 -1
- package/dist/src/chunking.js +3 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# TeleZipper
|
|
2
2
|
|
|
3
|
-
Split folders into multiple
|
|
3
|
+
Split folders into multiple 50MB zip files with optional Telegram upload.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@ayush24k/telezipper)
|
|
6
6
|
[](https://www.npmjs.com/package/@ayush24k/telezipper)
|
|
@@ -141,7 +141,7 @@ telezipper ./my-project -p MySecurePassword123 --telegram --bot-token 123456:ABC
|
|
|
141
141
|
|
|
142
142
|
## Features
|
|
143
143
|
|
|
144
|
-
- ✅ Automatically splits large folders into
|
|
144
|
+
- ✅ Automatically splits large folders into 50MB chunks
|
|
145
145
|
- ✅ Creates zip files with maximum compression
|
|
146
146
|
- ✅ Password protection with AES-256 encryption
|
|
147
147
|
- ✅ Optional Telegram upload with progress bars
|
package/dist/bin/zipper.js
CHANGED
|
@@ -30,7 +30,7 @@ program
|
|
|
30
30
|
const files = await (0, crawler_1.crawl)(source);
|
|
31
31
|
console.log(`📂 Found ${files.length} file${files.length !== 1 ? 's' : ''}`);
|
|
32
32
|
const chunks = (0, chunking_1.chunkFiles)(files);
|
|
33
|
-
console.log(`📦 Created ${chunks.length} chunk${chunks.length !== 1 ? 's' : ''} (max
|
|
33
|
+
console.log(`📦 Created ${chunks.length} chunk${chunks.length !== 1 ? 's' : ''} (max 48MB each)${password ? ' 🔒 Password protected' : ''}\n`);
|
|
34
34
|
await (0, zipper_1.zipChunks)(chunks, outputDir, useTelegram, botToken, chatId, password);
|
|
35
35
|
console.log(`\n🎉 All done! ${useTelegram ? 'Files uploaded to Telegram.' : `Zips saved to ${outputDir}`}`);
|
|
36
36
|
})();
|
package/dist/src/chunking.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.chunkFiles = chunkFiles;
|
|
4
|
-
const CHUNK_SIZE =
|
|
4
|
+
const CHUNK_SIZE = 48 * 1024 * 1024; // 48 MB
|
|
5
5
|
// groups files into chunks where the total size of each chunk does not exceed CHUNK_SIZE
|
|
6
6
|
function chunkFiles(files) {
|
|
7
7
|
const chunks = [];
|
|
@@ -9,7 +9,8 @@ function chunkFiles(files) {
|
|
|
9
9
|
let currentChunkSize = 0;
|
|
10
10
|
for (const file of files) {
|
|
11
11
|
if (file.size > CHUNK_SIZE) {
|
|
12
|
-
|
|
12
|
+
console.warn(`⚠️ Skipping file ${file.path} as it exceeds the maximum size of 48MB (${(file.size / (1024 * 1024)).toFixed(2)} MB).`);
|
|
13
|
+
continue;
|
|
13
14
|
}
|
|
14
15
|
if (currentChunkSize + file.size > CHUNK_SIZE) {
|
|
15
16
|
chunks.push(currentChunk);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ayush24k/telezipper",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Split folders into multiple
|
|
3
|
+
"version": "1.4.0",
|
|
4
|
+
"description": "Split folders into multiple 50MB zip files with optional Telegram upload made for personal use.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
7
7
|
],
|