@capgo/cli 4.8.2 → 4.9.0
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/bun.lockb +0 -0
- package/dist/index.js +16232 -10
- package/package.json +3 -2
- package/src/utils.ts +7 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/cli",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.9.0",
|
|
4
4
|
"description": "A CLI to upload to capgo servers",
|
|
5
5
|
"author": "github.com/riderx",
|
|
6
6
|
"license": "Apache 2.0",
|
|
@@ -45,8 +45,9 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@aws-sdk/client-s3": "^3.563.0",
|
|
47
47
|
"@capacitor/cli": "6.0.0",
|
|
48
|
-
"@capgo/find-package-manager": "^0.0.
|
|
48
|
+
"@capgo/find-package-manager": "^0.0.17",
|
|
49
49
|
"@clack/prompts": "^0.7.0",
|
|
50
|
+
"@manypkg/find-root": "^2.2.1",
|
|
50
51
|
"@supabase/supabase-js": "^2.42.7",
|
|
51
52
|
"@tomasklaen/checksum": "^1.1.0",
|
|
52
53
|
"@trufflesuite/spinnies": "^0.1.1",
|
package/src/utils.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { LogSnag } from 'logsnag'
|
|
|
12
12
|
import * as p from '@clack/prompts'
|
|
13
13
|
import ky from 'ky'
|
|
14
14
|
import { promiseFiles } from 'node-dir'
|
|
15
|
+
import { findRootSync } from '@manypkg/find-root'
|
|
15
16
|
import type { InstallCommand, PackageManagerRunner, PackageManagerType } from '@capgo/find-package-manager'
|
|
16
17
|
import { findInstallCommand, findPackageManagerRunner, findPackageManagerType } from '@capgo/find-package-manager'
|
|
17
18
|
import type { Database } from './types/supabase.types'
|
|
@@ -766,14 +767,16 @@ let pmRunner: PackageManagerRunner = 'npx'
|
|
|
766
767
|
export function getPMAndCommand() {
|
|
767
768
|
if (pmFetched)
|
|
768
769
|
return { pm, command: pmCommand, installCommand: `${pm} ${pmCommand}`, runner: pmRunner }
|
|
769
|
-
|
|
770
|
+
const dir = findRootSync(process.cwd())
|
|
771
|
+
pm = findPackageManagerType(dir.rootDir, 'npm')
|
|
770
772
|
pmCommand = findInstallCommand(pm)
|
|
771
773
|
pmFetched = true
|
|
772
|
-
pmRunner = findPackageManagerRunner()
|
|
774
|
+
pmRunner = findPackageManagerRunner(dir.rootDir)
|
|
773
775
|
return { pm, command: pmCommand, installCommand: `${pm} ${pmCommand}`, runner: pmRunner }
|
|
774
776
|
}
|
|
775
777
|
|
|
776
778
|
export async function getLocalDepenencies() {
|
|
779
|
+
const dir = findRootSync(process.cwd())
|
|
777
780
|
if (!existsSync('./package.json')) {
|
|
778
781
|
p.log.error('Missing package.json, you need to be in a capacitor project')
|
|
779
782
|
program.error('')
|
|
@@ -803,7 +806,7 @@ export async function getLocalDepenencies() {
|
|
|
803
806
|
}
|
|
804
807
|
|
|
805
808
|
if (!existsSync('./node_modules/')) {
|
|
806
|
-
const pm = findPackageManagerType(
|
|
809
|
+
const pm = findPackageManagerType(dir.rootDir, 'npm')
|
|
807
810
|
const installCmd = findInstallCommand(pm)
|
|
808
811
|
p.log.error(`Missing node_modules folder, please run ${pm} ${installCmd}`)
|
|
809
812
|
program.error('')
|
|
@@ -818,7 +821,7 @@ export async function getLocalDepenencies() {
|
|
|
818
821
|
|
|
819
822
|
if (!dependencyFolderExists) {
|
|
820
823
|
anyInvalid = true
|
|
821
|
-
const pm = findPackageManagerType(
|
|
824
|
+
const pm = findPackageManagerType(dir.rootDir, 'npm')
|
|
822
825
|
const installCmd = findInstallCommand(pm)
|
|
823
826
|
p.log.error(`Missing dependency ${key}, please run ${pm} ${installCmd}`)
|
|
824
827
|
return { name: key, version: value }
|