@capgo/cli 4.0.6 → 4.0.8
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 +7 -4
- package/package.json +1 -1
- package/src/api/app.ts +3 -0
- package/src/app/debug.ts +1 -2
- package/src/utils.ts +2 -3
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.0.8](https://github.com/Cap-go/CLI/compare/v4.0.7...v4.0.8) (2024-02-19)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* prevent usage of default appId ([8fa2002](https://github.com/Cap-go/CLI/commit/8fa2002f2913f84e52390bcf9cf147a954573867))
|
|
11
|
+
|
|
12
|
+
### [4.0.7](https://github.com/Cap-go/CLI/compare/v4.0.6...v4.0.7) (2024-02-18)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* use new endpoint path ([f3b5ae3](https://github.com/Cap-go/CLI/commit/f3b5ae3b355a04d4ff804da25870c16d9a31392b))
|
|
18
|
+
|
|
5
19
|
### [4.0.6](https://github.com/Cap-go/CLI/compare/v4.0.5...v4.0.6) (2024-02-18)
|
|
6
20
|
|
|
7
21
|
|
package/dist/index.js
CHANGED
|
@@ -61661,7 +61661,7 @@ var import_get_latest_version = __toESM(require_src3());
|
|
|
61661
61661
|
// package.json
|
|
61662
61662
|
var package_default = {
|
|
61663
61663
|
name: "@capgo/cli",
|
|
61664
|
-
version: "4.0.
|
|
61664
|
+
version: "4.0.8",
|
|
61665
61665
|
description: "A CLI to upload to capgo servers",
|
|
61666
61666
|
main: "dist/index.js",
|
|
61667
61667
|
bin: {
|
|
@@ -62342,7 +62342,7 @@ var getLocalConfig = async () => {
|
|
|
62342
62342
|
var nativeFileRegex = /([A-Za-z0-9]+)\.(java|swift|kt|scala)$/;
|
|
62343
62343
|
var getRemoteConfig = async () => {
|
|
62344
62344
|
const localConfig = await getLocalConfig();
|
|
62345
|
-
return distribution_default.get(`${defaultApiHost}/
|
|
62345
|
+
return distribution_default.get(`${defaultApiHost}/private/config`).then((res) => res.json()).then((data) => ({ ...data, ...localConfig })).catch(() => {
|
|
62346
62346
|
console.log("Local config", localConfig);
|
|
62347
62347
|
return localConfig;
|
|
62348
62348
|
});
|
|
@@ -62568,7 +62568,7 @@ async function uploadUrl(supabase, appId, bucketId) {
|
|
|
62568
62568
|
bucket_id: bucketId
|
|
62569
62569
|
};
|
|
62570
62570
|
try {
|
|
62571
|
-
const pathUploadLink = "upload_link";
|
|
62571
|
+
const pathUploadLink = "private/upload_link";
|
|
62572
62572
|
const res = await supabase.functions.invoke(pathUploadLink, { body: JSON.stringify(data) });
|
|
62573
62573
|
return res.data.url;
|
|
62574
62574
|
} catch (error) {
|
|
@@ -62944,6 +62944,9 @@ var checkAppExistsAndHasPermissionErr = async (supabase, apikey, appid, shouldEx
|
|
|
62944
62944
|
}
|
|
62945
62945
|
if (res && !perm) {
|
|
62946
62946
|
f2.error(`App ${appid} exist and you don't have permission to access it`);
|
|
62947
|
+
if (appid === "io.ionic.starter") {
|
|
62948
|
+
f2.info("Modify your appid in your capacitor.config.json file to something unique, this is a default appid for ionic starter app");
|
|
62949
|
+
}
|
|
62947
62950
|
program.error("");
|
|
62948
62951
|
}
|
|
62949
62952
|
};
|
|
@@ -62999,7 +63002,7 @@ var cancelCommand = async (channel2, command, userId, snag) => {
|
|
|
62999
63002
|
};
|
|
63000
63003
|
async function getStats(supabase, query) {
|
|
63001
63004
|
try {
|
|
63002
|
-
const pathStats = "
|
|
63005
|
+
const pathStats = "private/stats";
|
|
63003
63006
|
const res = await supabase.functions.invoke(pathStats, { body: JSON.stringify(query) });
|
|
63004
63007
|
const listData = res.data.data;
|
|
63005
63008
|
if (listData?.length > 0) {
|
package/package.json
CHANGED
package/src/api/app.ts
CHANGED
|
@@ -26,6 +26,9 @@ export const checkAppExistsAndHasPermissionErr = async (supabase: SupabaseClient
|
|
|
26
26
|
}
|
|
27
27
|
if (res && !perm) {
|
|
28
28
|
p.log.error(`App ${appid} exist and you don't have permission to access it`);
|
|
29
|
+
if (appid === 'io.ionic.starter') {
|
|
30
|
+
p.log.info('Modify your appid in your capacitor.config.json file to something unique, this is a default appid for ionic starter app');
|
|
31
|
+
}
|
|
29
32
|
program.error('');
|
|
30
33
|
}
|
|
31
34
|
}
|
package/src/app/debug.ts
CHANGED
|
@@ -50,8 +50,7 @@ interface QueryStats {
|
|
|
50
50
|
export async function getStats(supabase: SupabaseClient<Database>, query: QueryStats)
|
|
51
51
|
: Promise<Database['public']['Tables']['stats']['Row'] | null> {
|
|
52
52
|
try {
|
|
53
|
-
const pathStats = '
|
|
54
|
-
// const pathStats = 'private/stats' // TODO: switch to new endpoint when new backend released
|
|
53
|
+
const pathStats = 'private/stats'
|
|
55
54
|
const res = await supabase.functions.invoke(pathStats, { body: JSON.stringify(query) })
|
|
56
55
|
const listData = res.data.data as Database['public']['Tables']['stats']['Row'][]
|
|
57
56
|
if (listData?.length > 0) {
|
package/src/utils.ts
CHANGED
|
@@ -70,7 +70,7 @@ export const getRemoteConfig = async () => {
|
|
|
70
70
|
// call host + /api/get_config and parse the result as json using axios
|
|
71
71
|
const localConfig = await getLocalConfig()
|
|
72
72
|
return ky
|
|
73
|
-
.get(`${defaultApiHost}/
|
|
73
|
+
.get(`${defaultApiHost}/private/config`)
|
|
74
74
|
.then((res) => res.json<CapgoConfig>())
|
|
75
75
|
.then(data => ({ ...data, ...localConfig } as CapgoConfig))
|
|
76
76
|
.catch(() => {
|
|
@@ -405,8 +405,7 @@ export async function uploadUrl(supabase: SupabaseClient<Database>, appId: strin
|
|
|
405
405
|
bucket_id: bucketId,
|
|
406
406
|
}
|
|
407
407
|
try {
|
|
408
|
-
const pathUploadLink = 'upload_link'
|
|
409
|
-
// const pathUploadLink = 'private/upload_link' // TODO: switch to new endpoint when new backend released
|
|
408
|
+
const pathUploadLink = 'private/upload_link'
|
|
410
409
|
const res = await supabase.functions.invoke(pathUploadLink, { body: JSON.stringify(data) })
|
|
411
410
|
return res.data.url
|
|
412
411
|
} catch (error) {
|