@capgo/cli 7.18.19 → 7.18.20

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.
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Fetches the latest version of an npm package from the registry
3
+ * @param packageName - The name of the package to check
4
+ * @returns The latest version string, or null if not found
5
+ */
6
+ export declare function getLatestVersion(packageName: string): Promise<string | null>;
7
+ //# sourceMappingURL=latest-version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"latest-version.d.ts","sourceRoot":"","sources":["../../../src/utils/latest-version.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAsBlF"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Fetches the latest version of an npm package from the registry
3
+ * @param packageName - The name of the package to check
4
+ * @returns The latest version string, or null if not found
5
+ */
6
+ export async function getLatestVersion(packageName) {
7
+ try {
8
+ const encodedName = encodeURIComponent(packageName.toLowerCase());
9
+ const packageUrl = `https://registry.npmjs.org/${encodedName}`;
10
+ const response = await fetch(packageUrl, {
11
+ headers: {
12
+ accept: 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*',
13
+ },
14
+ });
15
+ if (!response.ok) {
16
+ return null;
17
+ }
18
+ const data = await response.json();
19
+ // Get the latest version from dist-tags
20
+ return data['dist-tags']?.latest || null;
21
+ }
22
+ catch {
23
+ return null;
24
+ }
25
+ }
26
+ //# sourceMappingURL=latest-version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"latest-version.js","sourceRoot":"","sources":["../../../src/utils/latest-version.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,WAAmB;IACxD,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,kBAAkB,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAA;QACjE,MAAM,UAAU,GAAG,8BAA8B,WAAW,EAAE,CAAA;QAE9D,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,UAAU,EAAE;YACvC,OAAO,EAAE;gBACP,MAAM,EAAE,0EAA0E;aACnF;SACF,CAAC,CAAA;QAEF,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,OAAO,IAAI,CAAA;QACb,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAyB,CAAA;QACzD,wCAAwC;QACxC,OAAO,IAAI,CAAC,WAAW,CAAC,EAAE,MAAM,IAAI,IAAI,CAAA;IAC1C,CAAC;IACD,MAAM,CAAC;QACL,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
- "version": "7.18.19",
3
+ "version": "7.18.20",
4
4
  "description": "A CLI to upload to capgo servers",
5
5
  "author": "Martin martin@capgo.app",
6
6
  "license": "Apache 2.0",
@@ -66,14 +66,12 @@
66
66
  "@supabase/supabase-js": "^2.76.1",
67
67
  "@tomasklaen/checksum": "^1.1.0",
68
68
  "@types/adm-zip": "^0.5.7",
69
- "@types/brotli": "^1.3.4",
70
69
  "@types/node": "^24.9.1",
71
70
  "@types/prettyjson": "^0.0.33",
72
71
  "@types/semver": "^7.7.1",
73
72
  "@types/tmp": "^0.2.6",
74
73
  "@vercel/ncc": "^0.38.4",
75
74
  "adm-zip": "^0.5.16",
76
- "brotli": "^1.3.3",
77
75
  "ci-info": "^4.3.1",
78
76
  "commander": "^14.0.2",
79
77
  "esbuild": "^0.25.11",
@@ -81,7 +79,6 @@
81
79
  "git-format-staged": "3.1.1",
82
80
  "husky": "^9.1.7",
83
81
  "is-wsl": "^3.1.0",
84
- "latest-version": "^9.0.0",
85
82
  "open": "^10.1.2",
86
83
  "pkg": "5.8.1",
87
84
  "prettyjson": "^1.2.5",