@capgo/cli 4.11.1 → 4.11.3
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 +14 -0
- package/dist/index.js +9 -8
- package/package.json +1 -1
- package/src/utils.ts +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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.11.3](https://github.com/Cap-go/CLI/compare/v4.11.2...v4.11.3) (2024-06-23)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* use better win detection ([2020dc1](https://github.com/Cap-go/CLI/commit/2020dc1dc3daa4d020d700edb6e15c7bf1d847a0))
|
|
11
|
+
|
|
12
|
+
### [4.11.2](https://github.com/Cap-go/CLI/compare/v4.11.1...v4.11.2) (2024-06-23)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* add log for windows ([a871d7f](https://github.com/Cap-go/CLI/commit/a871d7f444796b9e2b53fc4d8ad91ac202c9adae))
|
|
18
|
+
|
|
5
19
|
### [4.11.1](https://github.com/Cap-go/CLI/compare/v4.11.0...v4.11.1) (2024-06-23)
|
|
6
20
|
|
|
7
21
|
|
package/dist/index.js
CHANGED
|
@@ -6915,9 +6915,9 @@ var require_supports_color = __commonJS({
|
|
|
6915
6915
|
return min;
|
|
6916
6916
|
}
|
|
6917
6917
|
if (process.platform === "win32") {
|
|
6918
|
-
const
|
|
6919
|
-
if (Number(
|
|
6920
|
-
return Number(
|
|
6918
|
+
const osRelease = os3.release().split(".");
|
|
6919
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
6920
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
6921
6921
|
}
|
|
6922
6922
|
return 1;
|
|
6923
6923
|
}
|
|
@@ -39375,9 +39375,9 @@ var require_supports_colors = __commonJS({
|
|
|
39375
39375
|
}
|
|
39376
39376
|
var min = forceColor ? 1 : 0;
|
|
39377
39377
|
if (process.platform === "win32") {
|
|
39378
|
-
var
|
|
39379
|
-
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(
|
|
39380
|
-
return Number(
|
|
39378
|
+
var osRelease = os3.release().split(".");
|
|
39379
|
+
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
39380
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
39381
39381
|
}
|
|
39382
39382
|
return 1;
|
|
39383
39383
|
}
|
|
@@ -118903,7 +118903,7 @@ var {
|
|
|
118903
118903
|
// package.json
|
|
118904
118904
|
var package_default = {
|
|
118905
118905
|
name: "@capgo/cli",
|
|
118906
|
-
version: "4.11.
|
|
118906
|
+
version: "4.11.3",
|
|
118907
118907
|
description: "A CLI to upload to capgo servers",
|
|
118908
118908
|
author: "github.com/riderx",
|
|
118909
118909
|
license: "Apache 2.0",
|
|
@@ -120441,7 +120441,7 @@ async function prepareMultipart(supabase, appId, name) {
|
|
|
120441
120441
|
}
|
|
120442
120442
|
}
|
|
120443
120443
|
async function zipFile(filePath) {
|
|
120444
|
-
if ((0, import_node_os2.
|
|
120444
|
+
if ((0, import_node_os2.platform)() === "win32") {
|
|
120445
120445
|
return zipFileWindows(filePath);
|
|
120446
120446
|
} else {
|
|
120447
120447
|
return zipFileUnix(filePath);
|
|
@@ -120453,6 +120453,7 @@ function zipFileUnix(filePath) {
|
|
|
120453
120453
|
return zip.toBuffer();
|
|
120454
120454
|
}
|
|
120455
120455
|
async function zipFileWindows(filePath) {
|
|
120456
|
+
f2.info("Zipping file windows mode");
|
|
120456
120457
|
const zip = new import_jszip.default();
|
|
120457
120458
|
const addToZip = async (folderPath, zipPath) => {
|
|
120458
120459
|
const items = (0, import_node_fs4.readdirSync)(folderPath);
|
package/package.json
CHANGED
package/src/utils.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs'
|
|
2
|
-
import { homedir,
|
|
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'
|
|
5
5
|
import type { Buffer } from 'node:buffer'
|
|
@@ -519,7 +519,7 @@ async function prepareMultipart(supabase: SupabaseClient<Database>, appId: strin
|
|
|
519
519
|
}
|
|
520
520
|
|
|
521
521
|
export async function zipFile(filePath: string): Promise<Buffer> {
|
|
522
|
-
if (
|
|
522
|
+
if (osPlatform() === 'win32') {
|
|
523
523
|
return zipFileWindows(filePath)
|
|
524
524
|
}
|
|
525
525
|
else {
|
|
@@ -534,6 +534,7 @@ export function zipFileUnix(filePath: string) {
|
|
|
534
534
|
}
|
|
535
535
|
|
|
536
536
|
export async function zipFileWindows(filePath: string): Promise<Buffer> {
|
|
537
|
+
p.log.info('Zipping file windows mode')
|
|
537
538
|
const zip = new JSZip()
|
|
538
539
|
|
|
539
540
|
// Helper function to recursively add files and folders to the ZIP archive
|