@capgo/cli 4.0.3 → 4.0.7
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/.github/workflows/build.yml +4 -0
- package/CHANGELOG.md +28 -0
- package/dist/index.js +7 -6
- package/package.json +4 -3
- package/src/app/debug.ts +1 -2
- package/src/utils.ts +2 -3
|
@@ -9,6 +9,9 @@ jobs:
|
|
|
9
9
|
deploy:
|
|
10
10
|
runs-on: ubuntu-latest
|
|
11
11
|
name: "Build code and release"
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
id-token: write
|
|
12
15
|
steps:
|
|
13
16
|
- name: Checkout
|
|
14
17
|
uses: actions/checkout@v4
|
|
@@ -34,6 +37,7 @@ jobs:
|
|
|
34
37
|
if: ${{ !contains(github.ref, '-alpha.') }}
|
|
35
38
|
with:
|
|
36
39
|
token: ${{ secrets.NPM_TOKEN }}
|
|
40
|
+
provenance: true
|
|
37
41
|
- uses: JS-DevTools/npm-publish@v3
|
|
38
42
|
if: ${{ contains(github.ref, '-alpha.') }}
|
|
39
43
|
with:
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,34 @@
|
|
|
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.7](https://github.com/Cap-go/CLI/compare/v4.0.6...v4.0.7) (2024-02-18)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* use new endpoint path ([f3b5ae3](https://github.com/Cap-go/CLI/commit/f3b5ae3b355a04d4ff804da25870c16d9a31392b))
|
|
11
|
+
|
|
12
|
+
### [4.0.6](https://github.com/Cap-go/CLI/compare/v4.0.5...v4.0.6) (2024-02-18)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* provenance ([12c8e62](https://github.com/Cap-go/CLI/commit/12c8e62634f49304712fc398717ef21b125a60d1))
|
|
18
|
+
|
|
19
|
+
### [4.0.5](https://github.com/Cap-go/capgo-cli/compare/v4.0.4...v4.0.5) (2024-02-18)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* add missing flag ([b4356a2](https://github.com/Cap-go/capgo-cli/commit/b4356a28c466d1745238bc8b240300ad73655c07))
|
|
25
|
+
|
|
26
|
+
### [4.0.4](https://github.com/Cap-go/capgo-cli/compare/v4.0.3...v4.0.4) (2024-02-18)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* add provenance ([bdbe14f](https://github.com/Cap-go/capgo-cli/commit/bdbe14f78ba59bcda9b6ee6c35f8bc6e56103463))
|
|
32
|
+
|
|
5
33
|
### [4.0.3](https://github.com/Cap-go/capgo-cli/compare/v4.0.2...v4.0.3) (2024-02-18)
|
|
6
34
|
|
|
7
35
|
|
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.7",
|
|
61665
61665
|
description: "A CLI to upload to capgo servers",
|
|
61666
61666
|
main: "dist/index.js",
|
|
61667
61667
|
bin: {
|
|
@@ -61669,11 +61669,12 @@ var package_default = {
|
|
|
61669
61669
|
},
|
|
61670
61670
|
repository: {
|
|
61671
61671
|
type: "git",
|
|
61672
|
-
url: "git+https://github.com/Cap-go/
|
|
61672
|
+
url: "git+https://github.com/Cap-go/CLI.git"
|
|
61673
61673
|
},
|
|
61674
61674
|
bugs: {
|
|
61675
|
-
url: "https://github.com/Cap-go/
|
|
61675
|
+
url: "https://github.com/Cap-go/CLI/issues"
|
|
61676
61676
|
},
|
|
61677
|
+
homepage: "https://github.com/Cap-go/CLIl#readme",
|
|
61677
61678
|
engines: {
|
|
61678
61679
|
npm: ">=8.0.0",
|
|
61679
61680
|
node: ">=20.0.0"
|
|
@@ -62341,7 +62342,7 @@ var getLocalConfig = async () => {
|
|
|
62341
62342
|
var nativeFileRegex = /([A-Za-z0-9]+)\.(java|swift|kt|scala)$/;
|
|
62342
62343
|
var getRemoteConfig = async () => {
|
|
62343
62344
|
const localConfig = await getLocalConfig();
|
|
62344
|
-
return distribution_default.get(`${defaultApiHost}/
|
|
62345
|
+
return distribution_default.get(`${defaultApiHost}/private/config`).then((res) => res.json()).then((data) => ({ ...data, ...localConfig })).catch(() => {
|
|
62345
62346
|
console.log("Local config", localConfig);
|
|
62346
62347
|
return localConfig;
|
|
62347
62348
|
});
|
|
@@ -62567,7 +62568,7 @@ async function uploadUrl(supabase, appId, bucketId) {
|
|
|
62567
62568
|
bucket_id: bucketId
|
|
62568
62569
|
};
|
|
62569
62570
|
try {
|
|
62570
|
-
const pathUploadLink = "upload_link";
|
|
62571
|
+
const pathUploadLink = "private/upload_link";
|
|
62571
62572
|
const res = await supabase.functions.invoke(pathUploadLink, { body: JSON.stringify(data) });
|
|
62572
62573
|
return res.data.url;
|
|
62573
62574
|
} catch (error) {
|
|
@@ -62998,7 +62999,7 @@ var cancelCommand = async (channel2, command, userId, snag) => {
|
|
|
62998
62999
|
};
|
|
62999
63000
|
async function getStats(supabase, query) {
|
|
63000
63001
|
try {
|
|
63001
|
-
const pathStats = "
|
|
63002
|
+
const pathStats = "private/stats";
|
|
63002
63003
|
const res = await supabase.functions.invoke(pathStats, { body: JSON.stringify(query) });
|
|
63003
63004
|
const listData = res.data.data;
|
|
63004
63005
|
if (listData?.length > 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.7",
|
|
4
4
|
"description": "A CLI to upload to capgo servers",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
},
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/Cap-go/
|
|
11
|
+
"url": "git+https://github.com/Cap-go/CLI.git"
|
|
12
12
|
},
|
|
13
13
|
"bugs": {
|
|
14
|
-
"url": "https://github.com/Cap-go/
|
|
14
|
+
"url": "https://github.com/Cap-go/CLI/issues"
|
|
15
15
|
},
|
|
16
|
+
"homepage": "https://github.com/Cap-go/CLIl#readme",
|
|
16
17
|
"engines": {
|
|
17
18
|
"npm": ">=8.0.0",
|
|
18
19
|
"node": ">=20.0.0"
|
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) {
|