@capgo/cli 4.11.4 → 4.11.5
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 +7 -0
- package/bun.lockb +0 -0
- package/dist/index.js +50 -1125
- package/package.json +1 -3
- package/src/app/info.ts +3 -4
- package/src/bundle/cleanup.ts +3 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/cli",
|
|
3
|
-
"version": "4.11.
|
|
3
|
+
"version": "4.11.5",
|
|
4
4
|
"description": "A CLI to upload to capgo servers",
|
|
5
5
|
"author": "github.com/riderx",
|
|
6
6
|
"license": "Apache 2.0",
|
|
@@ -51,7 +51,6 @@
|
|
|
51
51
|
"@manypkg/find-root": "^2.2.1",
|
|
52
52
|
"@supabase/supabase-js": "^2.43.5",
|
|
53
53
|
"@tomasklaen/checksum": "^1.1.0",
|
|
54
|
-
"@trufflesuite/spinnies": "^0.1.1",
|
|
55
54
|
"adm-zip": "^0.5.14",
|
|
56
55
|
"ci-info": "^4.0.0",
|
|
57
56
|
"commander": "12.1.0",
|
|
@@ -65,7 +64,6 @@
|
|
|
65
64
|
"node-dir": "^0.1.17",
|
|
66
65
|
"open": "^10.1.0",
|
|
67
66
|
"prettyjson": "^1.2.5",
|
|
68
|
-
"prompt-sync": "^4.2.0",
|
|
69
67
|
"semver": "^7.6.2",
|
|
70
68
|
"tmp": "^0.2.3"
|
|
71
69
|
},
|
package/src/app/info.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { join } from 'node:path'
|
|
|
3
3
|
import os from 'node:os'
|
|
4
4
|
import process from 'node:process'
|
|
5
5
|
import getLatest from 'get-latest-version'
|
|
6
|
-
import Spinnies from '@trufflesuite/spinnies'
|
|
7
6
|
import * as p from '@clack/prompts'
|
|
8
7
|
import pack from '../../package.json'
|
|
9
8
|
|
|
@@ -69,10 +68,10 @@ export async function getInfo() {
|
|
|
69
68
|
}
|
|
70
69
|
}
|
|
71
70
|
p.log.info('\n')
|
|
72
|
-
const
|
|
73
|
-
|
|
71
|
+
const s = p.spinner()
|
|
72
|
+
s.start(`Running: Loading latest dependencies`)
|
|
74
73
|
const latestDependencies = await getLatestDependencies(installedDependencies)
|
|
75
|
-
|
|
74
|
+
s.stop(`Latest Dependencies:`)
|
|
76
75
|
for (const dependency in latestDependencies) {
|
|
77
76
|
if (Object.prototype.hasOwnProperty.call(latestDependencies, dependency)) {
|
|
78
77
|
const latestVersion = (latestDependencies as any)[dependency]
|
package/src/bundle/cleanup.ts
CHANGED
|
@@ -2,7 +2,6 @@ import process from 'node:process'
|
|
|
2
2
|
import { program } from 'commander'
|
|
3
3
|
import semver from 'semver/preload'
|
|
4
4
|
import * as p from '@clack/prompts'
|
|
5
|
-
import promptSync from 'prompt-sync'
|
|
6
5
|
import type { SupabaseClient } from '@supabase/supabase-js'
|
|
7
6
|
import type { Database } from '../types/supabase.types'
|
|
8
7
|
import type { OptionsBase } from '../utils'
|
|
@@ -18,8 +17,6 @@ interface Options extends OptionsBase {
|
|
|
18
17
|
force: boolean
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
const prompt = promptSync()
|
|
22
|
-
|
|
23
20
|
async function removeVersions(toRemove: Database['public']['Tables']['app_versions']['Row'][], supabase: SupabaseClient<Database>, appid: string) {
|
|
24
21
|
// call deleteSpecificVersion one by one from toRemove sync
|
|
25
22
|
for await (const row of toRemove) {
|
|
@@ -109,13 +106,12 @@ export async function cleanupBundle(appid: string, options: Options) {
|
|
|
109
106
|
return
|
|
110
107
|
}
|
|
111
108
|
displayBundles(allVersions)
|
|
112
|
-
|
|
113
109
|
// Check user wants to clean that all up
|
|
114
110
|
if (!force) {
|
|
115
|
-
const
|
|
116
|
-
if (
|
|
111
|
+
const doDelete = await p.confirm({ message: 'Do you want to continue removing the versions specified?' })
|
|
112
|
+
if (p.isCancel(doDelete) || !doDelete) {
|
|
117
113
|
p.log.warn('Not confirmed, aborting removal...')
|
|
118
|
-
|
|
114
|
+
process.exit()
|
|
119
115
|
}
|
|
120
116
|
}
|
|
121
117
|
|