@capgo/cli 4.8.3 → 4.9.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
- "version": "4.8.3",
3
+ "version": "4.9.1",
4
4
  "description": "A CLI to upload to capgo servers",
5
5
  "author": "github.com/riderx",
6
6
  "license": "Apache 2.0",
@@ -43,11 +43,12 @@
43
43
  "lint": "eslint \"src/**/*.ts\" --fix"
44
44
  },
45
45
  "dependencies": {
46
- "@aws-sdk/client-s3": "^3.563.0",
46
+ "@aws-sdk/client-s3": "^3.574.0",
47
47
  "@capacitor/cli": "6.0.0",
48
48
  "@capgo/find-package-manager": "^0.0.17",
49
49
  "@clack/prompts": "^0.7.0",
50
- "@supabase/supabase-js": "^2.42.7",
50
+ "@manypkg/find-root": "^2.2.1",
51
+ "@supabase/supabase-js": "^2.43.1",
51
52
  "@tomasklaen/checksum": "^1.1.0",
52
53
  "@trufflesuite/spinnies": "^0.1.1",
53
54
  "adm-zip": "^0.5.12",
@@ -62,21 +63,21 @@
62
63
  "open": "^10.1.0",
63
64
  "prettyjson": "^1.2.5",
64
65
  "prompt-sync": "^4.2.0",
65
- "semver": "^7.6.0"
66
+ "semver": "^7.6.2"
66
67
  },
67
68
  "devDependencies": {
68
- "@antfu/eslint-config": "^2.16.1",
69
+ "@antfu/eslint-config": "^2.17.0",
69
70
  "@types/adm-zip": "0.5.5",
70
- "@types/mime": "^3.0.4",
71
+ "@types/mime": "^4.0.0",
71
72
  "@types/node": "^20.12.7",
72
73
  "@types/node-dir": "^0.0.37",
73
74
  "@types/npmcli__ci-detect": "^2.0.3",
74
75
  "@types/prettyjson": "^0.0.33",
75
76
  "@types/prompt-sync": "^4.2.3",
76
77
  "@types/semver": "^7.5.8",
77
- "@typescript-eslint/eslint-plugin": "7.7.1",
78
- "@typescript-eslint/parser": "7.7.1",
79
- "esbuild": "^0.20.2",
78
+ "@typescript-eslint/eslint-plugin": "^7.8.0",
79
+ "@typescript-eslint/parser": "^7.8.0",
80
+ "esbuild": "^0.21.2",
80
81
  "eslint": "9.1.1",
81
82
  "git-format-staged": "3.1.1",
82
83
  "husky": "^9.0.11",
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
- pm = findPackageManagerType('.', 'npm')
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('.', 'npm')
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('.', 'npm')
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 }