@capgo/cli 4.10.17 → 4.10.21
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 +23 -0
- package/dist/index.js +8 -8
- package/package.json +1 -1
- package/src/bundle/upload.ts +1 -8
- package/src/channel/delete.ts +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,29 @@
|
|
|
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.10.21](https://github.com/Cap-go/CLI/compare/v4.10.20...v4.10.21) (2024-06-18)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* remove old headers ([4d0c4b2](https://github.com/Cap-go/CLI/commit/4d0c4b24c5608034f948e0ce07d1e6fb5b9bb75d))
|
|
11
|
+
|
|
12
|
+
### [4.10.20](https://github.com/Cap-go/CLI/compare/v4.10.19...v4.10.20) (2024-06-18)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* lint issue ([df7867b](https://github.com/Cap-go/CLI/commit/df7867ba88b1c87a2a123caae68b5b9c4505487e))
|
|
18
|
+
|
|
19
|
+
### [4.10.19](https://github.com/Cap-go/CLI/compare/v4.10.18...v4.10.19) (2024-06-18)
|
|
20
|
+
|
|
21
|
+
### [4.10.18](https://github.com/Cap-go/CLI/compare/v4.10.17...v4.10.18) (2024-06-17)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* add log message for the user ([e8b7437](https://github.com/Cap-go/CLI/commit/e8b7437da81bf819d6765fab7659f5d975855693))
|
|
27
|
+
|
|
5
28
|
### [4.10.17](https://github.com/Cap-go/CLI/compare/v4.10.16...v4.10.17) (2024-06-13)
|
|
6
29
|
|
|
7
30
|
|
package/dist/index.js
CHANGED
|
@@ -110508,7 +110508,7 @@ async function getUserId(options) {
|
|
|
110508
110508
|
// package.json
|
|
110509
110509
|
var package_default = {
|
|
110510
110510
|
name: "@capgo/cli",
|
|
110511
|
-
version: "4.10.
|
|
110511
|
+
version: "4.10.21",
|
|
110512
110512
|
description: "A CLI to upload to capgo servers",
|
|
110513
110513
|
author: "github.com/riderx",
|
|
110514
110514
|
license: "Apache 2.0",
|
|
@@ -111319,7 +111319,6 @@ async function uploadBundle(appid, options, shouldExit = true) {
|
|
|
111319
111319
|
const snag = useLogSnag();
|
|
111320
111320
|
channel2 = channel2 || "dev";
|
|
111321
111321
|
const config = await getConfig();
|
|
111322
|
-
const localS3 = (config?.app?.extConfig?.plugins && config?.app?.extConfig?.plugins?.CapacitorUpdater && config?.app?.extConfig?.plugins?.CapacitorUpdater?.localS3) === true;
|
|
111323
111322
|
const checkNotifyAppReady = options.codeCheck;
|
|
111324
111323
|
appid = appid || config?.app?.appId;
|
|
111325
111324
|
const uuid = (0, import_node_crypto3.randomUUID)().split("-")[0];
|
|
@@ -111551,6 +111550,7 @@ The app size is ${mbSize} Mb, this may take a while to download for users
|
|
|
111551
111550
|
const startTime = import_node_perf_hooks.performance.now();
|
|
111552
111551
|
try {
|
|
111553
111552
|
if (options.multipart !== void 0 && options.multipart) {
|
|
111553
|
+
f2.info(`Uploading bundle as multipart`);
|
|
111554
111554
|
await uploadMultipart(supabase, appid, bundle2, zipped, orgId);
|
|
111555
111555
|
} else {
|
|
111556
111556
|
const url = await uploadUrl(supabase, appid, bundle2);
|
|
@@ -111561,11 +111561,7 @@ The app size is ${mbSize} Mb, this may take a while to download for users
|
|
|
111561
111561
|
await distribution_default.put(url, {
|
|
111562
111562
|
timeout: options.timeout || UPLOAD_TIMEOUT,
|
|
111563
111563
|
retry: 5,
|
|
111564
|
-
body: zipped
|
|
111565
|
-
headers: !localS3 ? {
|
|
111566
|
-
"Content-Type": "application/octet-stream",
|
|
111567
|
-
"Cache-Control": "public, max-age=456789, immutable"
|
|
111568
|
-
} : void 0
|
|
111564
|
+
body: zipped
|
|
111569
111565
|
});
|
|
111570
111566
|
}
|
|
111571
111567
|
} catch (errorUpload) {
|
|
@@ -112855,7 +112851,11 @@ async function deleteChannel(channelId, appId, options) {
|
|
|
112855
112851
|
await checkAppExistsAndHasPermissionOrgErr(supabase, options.apikey, appId, 4 /* admin */);
|
|
112856
112852
|
f2.info(`Deleting channel ${appId}#${channelId} from Capgo`);
|
|
112857
112853
|
try {
|
|
112858
|
-
await delChannel(supabase, channelId, appId, userId);
|
|
112854
|
+
const deleteStatus = await delChannel(supabase, channelId, appId, userId);
|
|
112855
|
+
if (deleteStatus.error) {
|
|
112856
|
+
f2.error(`Cannot delete Channel \u{1F640} ${formatError(deleteStatus.error)}`);
|
|
112857
|
+
program.error("");
|
|
112858
|
+
}
|
|
112859
112859
|
const orgId = await getOrganizationId(supabase, appId);
|
|
112860
112860
|
f2.success(`Channel deleted`);
|
|
112861
112861
|
await snag.track({
|
package/package.json
CHANGED
package/src/bundle/upload.ts
CHANGED
|
@@ -100,8 +100,6 @@ export async function uploadBundle(appid: string, options: Options, shouldExit =
|
|
|
100
100
|
channel = channel || 'dev'
|
|
101
101
|
|
|
102
102
|
const config = await getConfig()
|
|
103
|
-
const localS3: boolean = (config?.app?.extConfig?.plugins && config?.app?.extConfig?.plugins?.CapacitorUpdater
|
|
104
|
-
&& config?.app?.extConfig?.plugins?.CapacitorUpdater?.localS3) === true
|
|
105
103
|
|
|
106
104
|
const checkNotifyAppReady = options.codeCheck
|
|
107
105
|
appid = appid || config?.app?.appId
|
|
@@ -387,6 +385,7 @@ It will be also visible in your dashboard\n`)
|
|
|
387
385
|
|
|
388
386
|
try {
|
|
389
387
|
if (options.multipart !== undefined && options.multipart) {
|
|
388
|
+
p.log.info(`Uploading bundle as multipart`)
|
|
390
389
|
await uploadMultipart(supabase, appid, bundle, zipped, orgId)
|
|
391
390
|
}
|
|
392
391
|
else {
|
|
@@ -399,12 +398,6 @@ It will be also visible in your dashboard\n`)
|
|
|
399
398
|
timeout: options.timeout || UPLOAD_TIMEOUT,
|
|
400
399
|
retry: 5,
|
|
401
400
|
body: zipped,
|
|
402
|
-
headers: (!localS3
|
|
403
|
-
? {
|
|
404
|
-
'Content-Type': 'application/octet-stream',
|
|
405
|
-
'Cache-Control': 'public, max-age=456789, immutable',
|
|
406
|
-
}
|
|
407
|
-
: undefined),
|
|
408
401
|
})
|
|
409
402
|
}
|
|
410
403
|
}
|
package/src/channel/delete.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as p from '@clack/prompts'
|
|
|
4
4
|
import { checkAppExistsAndHasPermissionOrgErr } from '../api/app'
|
|
5
5
|
import { delChannel } from '../api/channels'
|
|
6
6
|
import type { OptionsBase } from '../utils'
|
|
7
|
-
import { OrganizationPerm, createSupabaseClient, findSavedKey, getConfig, getOrganizationId, useLogSnag, verifyUser } from '../utils'
|
|
7
|
+
import { OrganizationPerm, createSupabaseClient, findSavedKey, formatError, getConfig, getOrganizationId, useLogSnag, verifyUser } from '../utils'
|
|
8
8
|
|
|
9
9
|
export async function deleteChannel(channelId: string, appId: string, options: OptionsBase) {
|
|
10
10
|
p.intro(`Delete channel`)
|
|
@@ -29,7 +29,11 @@ export async function deleteChannel(channelId: string, appId: string, options: O
|
|
|
29
29
|
|
|
30
30
|
p.log.info(`Deleting channel ${appId}#${channelId} from Capgo`)
|
|
31
31
|
try {
|
|
32
|
-
await delChannel(supabase, channelId, appId, userId)
|
|
32
|
+
const deleteStatus = await delChannel(supabase, channelId, appId, userId)
|
|
33
|
+
if (deleteStatus.error) {
|
|
34
|
+
p.log.error(`Cannot delete Channel 🙀 ${formatError(deleteStatus.error)}`)
|
|
35
|
+
program.error('')
|
|
36
|
+
}
|
|
33
37
|
const orgId = await getOrganizationId(supabase, appId)
|
|
34
38
|
p.log.success(`Channel deleted`)
|
|
35
39
|
await snag.track({
|