@capgo/cli 4.12.3-beta.0 → 4.12.4
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/CHANGELOG.md +9 -0
- package/dist/index.js +16 -16
- package/package.json +1 -1
- package/src/utils.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [4.12.4](https://github.com/Cap-go/CLI/compare/v4.12.3...v4.12.4) (2024-07-09)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* make better compression on windows ([dc93876](https://github.com/Cap-go/CLI/commit/dc9387649ae6cdfa09172e2e806d834787cb2fd0))
|
|
11
|
+
* use custom function to read recurst dir to fix windows issue ([cbd2217](https://github.com/Cap-go/CLI/commit/cbd2217ab877a40179f65be217e915fcbf7d0be1))
|
|
12
|
+
* version error ([6ec20c7](https://github.com/Cap-go/CLI/commit/6ec20c7195cfe454ef5bfa258163088c14231647))
|
|
13
|
+
|
|
5
14
|
### [4.12.3](https://github.com/Cap-go/CLI/compare/v4.12.2...v4.12.3) (2024-07-08)
|
|
6
15
|
|
|
7
16
|
|
package/dist/index.js
CHANGED
|
@@ -4207,9 +4207,9 @@ var require_graceful_fs = __commonJS({
|
|
|
4207
4207
|
}
|
|
4208
4208
|
}
|
|
4209
4209
|
var fs$readdir = fs7.readdir;
|
|
4210
|
-
fs7.readdir =
|
|
4210
|
+
fs7.readdir = readdir;
|
|
4211
4211
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
4212
|
-
function
|
|
4212
|
+
function readdir(path3, options, cb) {
|
|
4213
4213
|
if (typeof options === "function")
|
|
4214
4214
|
cb = options, options = null;
|
|
4215
4215
|
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path4, options2, cb2, startTime) {
|
|
@@ -6147,14 +6147,14 @@ var require_safe = __commonJS({
|
|
|
6147
6147
|
}
|
|
6148
6148
|
}
|
|
6149
6149
|
exports2.stat = stat;
|
|
6150
|
-
async function
|
|
6150
|
+
async function readdir(dir) {
|
|
6151
6151
|
try {
|
|
6152
6152
|
return await fs6.readdir(dir);
|
|
6153
6153
|
} catch (e2) {
|
|
6154
6154
|
return [];
|
|
6155
6155
|
}
|
|
6156
6156
|
}
|
|
6157
|
-
exports2.readdir =
|
|
6157
|
+
exports2.readdir = readdir;
|
|
6158
6158
|
}
|
|
6159
6159
|
});
|
|
6160
6160
|
|
|
@@ -20999,14 +20999,14 @@ var require_safe2 = __commonJS({
|
|
|
20999
20999
|
}
|
|
21000
21000
|
}
|
|
21001
21001
|
exports2.stat = stat;
|
|
21002
|
-
async function
|
|
21002
|
+
async function readdir(dir) {
|
|
21003
21003
|
try {
|
|
21004
21004
|
return await fs6.readdir(dir);
|
|
21005
21005
|
} catch (e2) {
|
|
21006
21006
|
return [];
|
|
21007
21007
|
}
|
|
21008
21008
|
}
|
|
21009
|
-
exports2.readdir =
|
|
21009
|
+
exports2.readdir = readdir;
|
|
21010
21010
|
}
|
|
21011
21011
|
});
|
|
21012
21012
|
|
|
@@ -53280,7 +53280,7 @@ var require_async2 = __commonJS({
|
|
|
53280
53280
|
readdirWithFileTypes(directory, settings, callback);
|
|
53281
53281
|
return;
|
|
53282
53282
|
}
|
|
53283
|
-
|
|
53283
|
+
readdir(directory, settings, callback);
|
|
53284
53284
|
}
|
|
53285
53285
|
exports2.read = read;
|
|
53286
53286
|
function readdirWithFileTypes(directory, settings, callback) {
|
|
@@ -53329,7 +53329,7 @@ var require_async2 = __commonJS({
|
|
|
53329
53329
|
});
|
|
53330
53330
|
};
|
|
53331
53331
|
}
|
|
53332
|
-
function
|
|
53332
|
+
function readdir(directory, settings, callback) {
|
|
53333
53333
|
settings.fs.readdir(directory, (readdirError, names) => {
|
|
53334
53334
|
if (readdirError !== null) {
|
|
53335
53335
|
callFailureCallback(callback, readdirError);
|
|
@@ -53364,7 +53364,7 @@ var require_async2 = __commonJS({
|
|
|
53364
53364
|
});
|
|
53365
53365
|
});
|
|
53366
53366
|
}
|
|
53367
|
-
exports2.readdir =
|
|
53367
|
+
exports2.readdir = readdir;
|
|
53368
53368
|
function callFailureCallback(callback, error) {
|
|
53369
53369
|
callback(error);
|
|
53370
53370
|
}
|
|
@@ -53388,7 +53388,7 @@ var require_sync2 = __commonJS({
|
|
|
53388
53388
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
53389
53389
|
return readdirWithFileTypes(directory, settings);
|
|
53390
53390
|
}
|
|
53391
|
-
return
|
|
53391
|
+
return readdir(directory, settings);
|
|
53392
53392
|
}
|
|
53393
53393
|
exports2.read = read;
|
|
53394
53394
|
function readdirWithFileTypes(directory, settings) {
|
|
@@ -53413,7 +53413,7 @@ var require_sync2 = __commonJS({
|
|
|
53413
53413
|
});
|
|
53414
53414
|
}
|
|
53415
53415
|
exports2.readdirWithFileTypes = readdirWithFileTypes;
|
|
53416
|
-
function
|
|
53416
|
+
function readdir(directory, settings) {
|
|
53417
53417
|
const names = settings.fs.readdirSync(directory);
|
|
53418
53418
|
return names.map((name) => {
|
|
53419
53419
|
const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
|
|
@@ -53429,7 +53429,7 @@ var require_sync2 = __commonJS({
|
|
|
53429
53429
|
return entry;
|
|
53430
53430
|
});
|
|
53431
53431
|
}
|
|
53432
|
-
exports2.readdir =
|
|
53432
|
+
exports2.readdir = readdir;
|
|
53433
53433
|
}
|
|
53434
53434
|
});
|
|
53435
53435
|
|
|
@@ -80551,9 +80551,9 @@ var require_graceful_fs2 = __commonJS({
|
|
|
80551
80551
|
}
|
|
80552
80552
|
}
|
|
80553
80553
|
var fs$readdir = fs7.readdir;
|
|
80554
|
-
fs7.readdir =
|
|
80554
|
+
fs7.readdir = readdir;
|
|
80555
80555
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
80556
|
-
function
|
|
80556
|
+
function readdir(path3, options, cb) {
|
|
80557
80557
|
if (typeof options === "function")
|
|
80558
80558
|
cb = options, options = null;
|
|
80559
80559
|
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path4, options2, cb2, startTime) {
|
|
@@ -86219,7 +86219,7 @@ var {
|
|
|
86219
86219
|
// package.json
|
|
86220
86220
|
var package_default = {
|
|
86221
86221
|
name: "@capgo/cli",
|
|
86222
|
-
version: "4.12.
|
|
86222
|
+
version: "4.12.4",
|
|
86223
86223
|
description: "A CLI to upload to capgo servers",
|
|
86224
86224
|
author: "github.com/riderx",
|
|
86225
86225
|
license: "Apache 2.0",
|
|
@@ -87780,7 +87780,7 @@ async function zipFileWindows(filePath) {
|
|
|
87780
87780
|
}
|
|
87781
87781
|
};
|
|
87782
87782
|
await addToZip(filePath, "");
|
|
87783
|
-
const zipBuffer = await zip.generateAsync({ type: "nodebuffer", platform: "UNIX", compression: "DEFLATE" });
|
|
87783
|
+
const zipBuffer = await zip.generateAsync({ type: "nodebuffer", platform: "UNIX", compression: "DEFLATE", compressionOptions: { level: 6 } });
|
|
87784
87784
|
return zipBuffer;
|
|
87785
87785
|
}
|
|
87786
87786
|
async function finishMultipartDownload(key2, uploadId, url, parts) {
|
package/package.json
CHANGED
package/src/utils.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { existsSync, readFileSync,
|
|
1
|
+
import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs'
|
|
2
2
|
import { homedir, platform as osPlatform } from 'node:os'
|
|
3
3
|
import { join, resolve, sep } from 'node:path'
|
|
4
4
|
import process from 'node:process'
|
|
@@ -558,7 +558,7 @@ export async function zipFileWindows(filePath: string): Promise<Buffer> {
|
|
|
558
558
|
await addToZip(filePath, '')
|
|
559
559
|
|
|
560
560
|
// Generate the ZIP file as a Buffer
|
|
561
|
-
const zipBuffer = await zip.generateAsync({ type: 'nodebuffer', platform: 'UNIX', compression: 'DEFLATE' })
|
|
561
|
+
const zipBuffer = await zip.generateAsync({ type: 'nodebuffer', platform: 'UNIX', compression: 'DEFLATE', compressionOptions: { level: 6 } })
|
|
562
562
|
return zipBuffer
|
|
563
563
|
}
|
|
564
564
|
|