bytifi 0.2.1 → 0.2.2
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 +0 -27
- package/bin/bytifi.js +4 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -155,33 +155,6 @@ JSON output for decrypt includes `outputPath`, `originalName`, `size`, `mimeType
|
|
|
155
155
|
|
|
156
156
|
Files over ~100 MB encrypted use multipart upload automatically. Progress prints to stderr unless `--json` or `--quiet` is set.
|
|
157
157
|
|
|
158
|
-
## How it works
|
|
159
|
-
|
|
160
|
-
**Upload**
|
|
161
|
-
|
|
162
|
-
1. Gzip-compresses each chunk, then encrypts locally with AES-GCM (meta `version: 2`)
|
|
163
|
-
2. Uploads encrypted bytes via multipart pipeline for files >10 MB
|
|
164
|
-
3. Prints a share URL including `#token=...`
|
|
165
|
-
|
|
166
|
-
## Compatibility
|
|
167
|
-
|
|
168
|
-
| Scenario | Works? |
|
|
169
|
-
|----------|--------|
|
|
170
|
-
| Old links (no compression) | Yes — everywhere |
|
|
171
|
-
| New CLI upload + new CLI decrypt | Yes |
|
|
172
|
-
| New CLI upload + **updated website** decrypt | Yes — **deploy Bytifi-Website** after upgrading CLI |
|
|
173
|
-
| New CLI upload + old website (not deployed) | **Broken in browser** — garbled download |
|
|
174
|
-
| New CLI upload + old CLI (≤0.1.5) decrypt | **Broken** — upgrade CLI |
|
|
175
|
-
| Website upload (no compression) | Yes — unchanged |
|
|
176
|
-
|
|
177
|
-
Compressed files larger than one chunk use **part-based storage**; decrypt via share link or CLI part download.
|
|
178
|
-
|
|
179
|
-
**Decrypt**
|
|
180
|
-
|
|
181
|
-
1. Reads link metadata from `/api/link/:token`, from `--upload-json`, or from `--meta`
|
|
182
|
-
2. Downloads the encrypted file (unless you pass a local encrypted file)
|
|
183
|
-
3. Decrypts locally and writes the original file to disk
|
|
184
|
-
|
|
185
158
|
## Development
|
|
186
159
|
|
|
187
160
|
```bash
|
package/bin/bytifi.js
CHANGED
|
@@ -8,7 +8,10 @@ import { decryptFile } from '../lib/decrypt.js'
|
|
|
8
8
|
import { BytifiApiError, BytifiNetworkError, uploadFile } from '../lib/upload.js'
|
|
9
9
|
|
|
10
10
|
const require = createRequire(import.meta.url)
|
|
11
|
-
const
|
|
11
|
+
const version =
|
|
12
|
+
typeof __BYTIFI_VERSION__ !== 'undefined'
|
|
13
|
+
? __BYTIFI_VERSION__
|
|
14
|
+
: require('../package.json').version
|
|
12
15
|
|
|
13
16
|
function printHelp() {
|
|
14
17
|
process.stdout.write(`Bytifi CLI v${version} — encrypt, upload, and decrypt files
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bytifi",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Official Bytifi CLI — encrypt, upload, and decrypt files from the terminal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"scripts": {
|
|
17
17
|
"upload": "node bin/bytifi.js upload",
|
|
18
18
|
"decrypt": "node bin/bytifi.js decrypt",
|
|
19
|
-
"build:bundle": "
|
|
20
|
-
"build:win": "npm run build:bundle && pkg dist/bytifi-bundle.cjs --targets node22-win-x64 --output dist/bytifi.exe --compress GZip"
|
|
19
|
+
"build:bundle": "node scripts/build-bundle.mjs",
|
|
20
|
+
"build:win": "npm run build:bundle && pkg dist/bytifi-bundle.cjs --targets node22-win-x64 --output dist/bytifi.exe --compress GZip --public --public-packages \"*\""
|
|
21
21
|
},
|
|
22
22
|
"repository": {
|
|
23
23
|
"type": "git",
|