@capgo/cli 8.29.2 → 8.30.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.
@@ -3915,6 +3915,14 @@ export type Database = {
3915
3915
  yearly: number;
3916
3916
  }[];
3917
3917
  };
3918
+ get_org_credits_used_in_period: {
3919
+ Args: {
3920
+ p_end: string;
3921
+ p_org_id: string;
3922
+ p_start: string;
3923
+ };
3924
+ Returns: number;
3925
+ };
3918
3926
  get_cycle_info_org: {
3919
3927
  Args: {
3920
3928
  orgid: string;
@@ -144,6 +144,17 @@ interface CapgoFilesConfig {
144
144
  }
145
145
  export declare function getRemoteFileConfig(): Promise<CapgoFilesConfig>;
146
146
  export declare function normalizeSupabaseHost(host: string): string;
147
+ export declare function formatCapgoApiErrorBody(body: unknown): string;
148
+ /** Resolve Capgo public API base URL for CLI mutations (app create/update, etc.). */
149
+ export declare function resolveConfiguredCapgoPublicApiHost(config: {
150
+ hostApi: string;
151
+ supaHost?: string;
152
+ supaKey?: string;
153
+ }): string;
154
+ export declare function resolveCapgoPublicApiHost(options?: {
155
+ supaHost?: string;
156
+ supaAnon?: string;
157
+ }, silent?: boolean): Promise<string>;
147
158
  export declare function createSupabaseClient(apikey: string, supaHost?: string, supaKey?: string, silent?: boolean, instrument?: boolean, signal?: AbortSignal): Promise<SupabaseClient<Database, "public", "public", {
148
159
  Tables: {
149
160
  apikey_global_permissions: {
@@ -3908,6 +3919,14 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
3908
3919
  yearly: number;
3909
3920
  }[];
3910
3921
  };
3922
+ get_org_credits_used_in_period: {
3923
+ Args: {
3924
+ p_end: string;
3925
+ p_org_id: string;
3926
+ p_start: string;
3927
+ };
3928
+ Returns: number;
3929
+ };
3911
3930
  get_cycle_info_org: {
3912
3931
  Args: {
3913
3932
  orgid: string;
@@ -5640,6 +5659,16 @@ export declare function zipFileUnix(filePath: string): Buffer<ArrayBufferLike>;
5640
5659
  export declare function zipFileWindows(filePath: string): Promise<Buffer>;
5641
5660
  export declare function uploadTUS(apikey: string, data: Buffer, orgId: string, appId: string, name: string, spinner: ReturnType<typeof spinnerC>, localConfig: CapgoConfig, chunkSize: number): Promise<boolean>;
5642
5661
  export declare function deletedFailedVersion(supabase: SupabaseClient<Database>, appId: string, name: string): Promise<void>;
5662
+ export interface VersionManifestEntry {
5663
+ file_name: string;
5664
+ s3_path: string;
5665
+ file_hash: string;
5666
+ }
5667
+ /**
5668
+ * Writes delta manifest rows through the backend (file_size stays 0 until R2 size lookup).
5669
+ * Prefer this over writing app_versions.manifest jsonb — old CLIs still use that legacy path.
5670
+ */
5671
+ export declare function setVersionManifest(supabase: SupabaseClient<Database>, appId: string, name: string, manifest: VersionManifestEntry[]): Promise<void>;
5643
5672
  export declare function updateOrCreateChannel(supabase: SupabaseClient<Database>, update: Database['public']['Tables']['channels']['Insert']): Promise<import("@supabase/supabase-js").PostgrestSingleResponse<{
5644
5673
  allow_dev: boolean;
5645
5674
  allow_device: boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
3
  "type": "module",
4
- "version": "8.29.2",
4
+ "version": "8.30.0",
5
5
  "description": "A CLI to upload to capgo servers",
6
6
  "author": "Martin martin@capgo.app",
7
7
  "license": "Apache 2.0",