@supacloud/cli 0.82.0 → 0.84.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.
@@ -25,6 +25,7 @@ declare const REMOTE_APP_ACTIONS: {
25
25
  readonly logs: "logs";
26
26
  readonly preview: "create_preview";
27
27
  readonly previews: "list_previews";
28
+ readonly "preview-reconcile": "reconcile_preview";
28
29
  };
29
30
  export interface AppToolOptions {
30
31
  getApplications?: () => ((args: Record<string, unknown>) => Promise<ToolResult>) | undefined;
@@ -1,6 +1,6 @@
1
1
  import { Type, type Static } from "typebox";
2
2
  import type { HttpTransport } from "../transports/http";
3
- export declare const APPLICATION_PREVIEW_ACTIONS: readonly ["get_preview_plan", "create_preview", "list_previews", "get_preview", "cleanup_preview"];
3
+ export declare const APPLICATION_PREVIEW_ACTIONS: readonly ["get_preview_plan", "create_preview", "list_previews", "get_preview", "reconcile_preview", "cleanup_preview"];
4
4
  export declare const APPLICATION_PREVIEW_FIELDS: {
5
5
  preview_id: Type.TOptional<Type.TString>;
6
6
  branch_ref: Type.TOptional<Type.TString>;
@@ -17,41 +17,41 @@ declare const receiptSchema: Type.TObject<{
17
17
  application_id: Type.TString;
18
18
  environment_id: Type.TString;
19
19
  release_id: Type.TString;
20
- expires_at: Type.TUnion<[Type.TString, Type.TNull]>;
21
- status: Type.TEnum<("failed" | "ready" | "planned" | "cleaned" | "provisioning")[]>;
20
+ expires_at: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
21
+ status: Type.TEnum<("ready" | "failed" | "cleaned" | "planned" | "provisioning")[]>;
22
22
  resources: Type.TObject<{
23
23
  build_artifact: Type.TObject<{
24
- status: Type.TEnum<("pending" | "failed" | "ready" | "cleaned")[]>;
24
+ status: Type.TEnum<("pending" | "ready" | "failed" | "cleaned")[]>;
25
25
  release_id: Type.TString;
26
26
  }>;
27
27
  database_branch: Type.TObject<{
28
- status: Type.TEnum<("pending" | "failed" | "ready" | "cleaned")[]>;
28
+ status: Type.TEnum<("pending" | "ready" | "failed" | "cleaned")[]>;
29
29
  branch_ref: Type.TString;
30
30
  data_mode: Type.TEnum<("schema_only" | "full_clone")[]>;
31
31
  }>;
32
32
  queue_namespace: Type.TObject<{
33
- status: Type.TEnum<("pending" | "failed" | "ready" | "cleaned")[]>;
33
+ status: Type.TEnum<("pending" | "ready" | "failed" | "cleaned")[]>;
34
34
  namespace: Type.TString;
35
35
  }>;
36
36
  storage_namespace: Type.TObject<{
37
- status: Type.TEnum<("pending" | "failed" | "ready" | "cleaned")[]>;
37
+ status: Type.TEnum<("pending" | "ready" | "failed" | "cleaned")[]>;
38
38
  namespace: Type.TString;
39
39
  }>;
40
40
  test_secret: Type.TObject<{
41
- status: Type.TEnum<("pending" | "failed" | "ready" | "cleaned")[]>;
41
+ status: Type.TEnum<("pending" | "ready" | "failed" | "cleaned")[]>;
42
42
  name: Type.TString;
43
43
  value_issued: Type.TLiteral<false>;
44
44
  }>;
45
45
  configuration_revision: Type.TObject<{
46
- status: Type.TEnum<("pending" | "failed" | "ready" | "cleaned")[]>;
46
+ status: Type.TEnum<("pending" | "ready" | "failed" | "cleaned")[]>;
47
47
  configuration_id: Type.TUnion<[Type.TString, Type.TNull]>;
48
48
  }>;
49
49
  application_activation: Type.TObject<{
50
- status: Type.TEnum<("pending" | "failed" | "ready" | "cleaned")[]>;
50
+ status: Type.TEnum<("pending" | "ready" | "failed" | "cleaned")[]>;
51
51
  activation_id: Type.TUnion<[Type.TString, Type.TNull]>;
52
52
  }>;
53
53
  smoke_test: Type.TObject<{
54
- status: Type.TEnum<("pending" | "failed" | "ready" | "cleaned")[]>;
54
+ status: Type.TEnum<("pending" | "ready" | "failed" | "cleaned")[]>;
55
55
  checks: Type.TArray<Type.TString>;
56
56
  passed: Type.TArray<Type.TString>;
57
57
  failed: Type.TArray<Type.TString>;
@@ -0,0 +1 @@
1
+ export {};
@@ -9,7 +9,7 @@ export declare const APPLICATION_TOOL_SCHEMA: {
9
9
  ttl_seconds: Type.TOptional<Type.TInteger>;
10
10
  wait: Type.TOptional<Type.TBoolean>;
11
11
  timeout_seconds: Type.TOptional<Type.TInteger>;
12
- action: Type.TEnum<("list_releases" | "get_release" | "upload_release" | "activate_release" | "logs" | "get_runtime" | "get_deployment_evidence" | "get_configuration" | "get_release_transfer_plan" | "get_promotion_plan" | "get_rollback_snapshot" | "get_history" | "get_deploy_plan" | "get_promotion_status" | "get_preview_plan" | "put_configuration" | "transfer_release" | "promote_application" | "reconcile_promotion" | "create_preview" | "list_previews" | "get_preview" | "cleanup_preview" | "deploy_release" | "rollback_release" | "reconcile_activation" | "retire_activation")[]>;
12
+ action: Type.TEnum<("list_releases" | "get_release" | "upload_release" | "activate_release" | "logs" | "get_runtime" | "get_deployment_evidence" | "get_configuration" | "get_release_transfer_plan" | "get_promotion_plan" | "get_promotion_status" | "get_rollback_snapshot" | "get_history" | "get_deploy_plan" | "get_preview_plan" | "list_previews" | "get_preview" | "put_configuration" | "transfer_release" | "promote_application" | "reconcile_promotion" | "create_preview" | "reconcile_preview" | "cleanup_preview" | "deploy_release" | "rollback_release" | "reconcile_activation" | "retire_activation")[]>;
13
13
  ref: Type.TString;
14
14
  id: Type.TString;
15
15
  environment_id: Type.TOptional<Type.TString>;
@@ -121,49 +121,49 @@ export declare function parsePreviewReceipt(value: unknown, identity: Applicatio
121
121
  project_ref: string;
122
122
  application_id: string;
123
123
  environment_id: string;
124
- status: "failed" | "ready" | "planned" | "cleaned" | "provisioning";
124
+ status: "ready" | "failed" | "cleaned" | "planned" | "provisioning";
125
125
  schema: "supacloud.application-preview.v1";
126
126
  resources: {
127
127
  build_artifact: {
128
- status: "pending" | "failed" | "ready" | "cleaned";
128
+ status: "pending" | "ready" | "failed" | "cleaned";
129
129
  release_id: string;
130
130
  };
131
131
  database_branch: {
132
- status: "pending" | "failed" | "ready" | "cleaned";
132
+ status: "pending" | "ready" | "failed" | "cleaned";
133
133
  branch_ref: string;
134
134
  data_mode: "schema_only" | "full_clone";
135
135
  };
136
136
  queue_namespace: {
137
- status: "pending" | "failed" | "ready" | "cleaned";
137
+ status: "pending" | "ready" | "failed" | "cleaned";
138
138
  namespace: string;
139
139
  };
140
140
  storage_namespace: {
141
- status: "pending" | "failed" | "ready" | "cleaned";
141
+ status: "pending" | "ready" | "failed" | "cleaned";
142
142
  namespace: string;
143
143
  };
144
144
  test_secret: {
145
145
  name: string;
146
- status: "pending" | "failed" | "ready" | "cleaned";
146
+ status: "pending" | "ready" | "failed" | "cleaned";
147
147
  value_issued: false;
148
148
  };
149
149
  configuration_revision: {
150
- status: "pending" | "failed" | "ready" | "cleaned";
150
+ status: "pending" | "ready" | "failed" | "cleaned";
151
151
  configuration_id: string | null;
152
152
  };
153
153
  application_activation: {
154
- status: "pending" | "failed" | "ready" | "cleaned";
154
+ status: "pending" | "ready" | "failed" | "cleaned";
155
155
  activation_id: string | null;
156
156
  };
157
157
  smoke_test: {
158
- status: "pending" | "failed" | "ready" | "cleaned";
158
+ status: "pending" | "ready" | "failed" | "cleaned";
159
159
  checks: string[];
160
160
  failed: string[];
161
161
  passed: string[];
162
162
  };
163
163
  };
164
164
  release_id: string;
165
- expires_at: string | null;
166
165
  preview_id: string;
166
+ expires_at: string | null;
167
167
  cleanup: {
168
168
  required: boolean;
169
169
  error: string | null;
@@ -184,49 +184,49 @@ export declare function parsePreviewList(value: unknown, identity: ApplicationWo
184
184
  project_ref: string;
185
185
  application_id: string;
186
186
  environment_id: string;
187
- status: "failed" | "ready" | "planned" | "cleaned" | "provisioning";
187
+ status: "ready" | "failed" | "cleaned" | "planned" | "provisioning";
188
188
  schema: "supacloud.application-preview.v1";
189
189
  resources: {
190
190
  build_artifact: {
191
- status: "pending" | "failed" | "ready" | "cleaned";
191
+ status: "pending" | "ready" | "failed" | "cleaned";
192
192
  release_id: string;
193
193
  };
194
194
  database_branch: {
195
- status: "pending" | "failed" | "ready" | "cleaned";
195
+ status: "pending" | "ready" | "failed" | "cleaned";
196
196
  branch_ref: string;
197
197
  data_mode: "schema_only" | "full_clone";
198
198
  };
199
199
  queue_namespace: {
200
- status: "pending" | "failed" | "ready" | "cleaned";
200
+ status: "pending" | "ready" | "failed" | "cleaned";
201
201
  namespace: string;
202
202
  };
203
203
  storage_namespace: {
204
- status: "pending" | "failed" | "ready" | "cleaned";
204
+ status: "pending" | "ready" | "failed" | "cleaned";
205
205
  namespace: string;
206
206
  };
207
207
  test_secret: {
208
208
  name: string;
209
- status: "pending" | "failed" | "ready" | "cleaned";
209
+ status: "pending" | "ready" | "failed" | "cleaned";
210
210
  value_issued: false;
211
211
  };
212
212
  configuration_revision: {
213
- status: "pending" | "failed" | "ready" | "cleaned";
213
+ status: "pending" | "ready" | "failed" | "cleaned";
214
214
  configuration_id: string | null;
215
215
  };
216
216
  application_activation: {
217
- status: "pending" | "failed" | "ready" | "cleaned";
217
+ status: "pending" | "ready" | "failed" | "cleaned";
218
218
  activation_id: string | null;
219
219
  };
220
220
  smoke_test: {
221
- status: "pending" | "failed" | "ready" | "cleaned";
221
+ status: "pending" | "ready" | "failed" | "cleaned";
222
222
  checks: string[];
223
223
  failed: string[];
224
224
  passed: string[];
225
225
  };
226
226
  };
227
227
  release_id: string;
228
- expires_at: string | null;
229
228
  preview_id: string;
229
+ expires_at: string | null;
230
230
  cleanup: {
231
231
  required: boolean;
232
232
  error: string | null;
@@ -3,6 +3,7 @@ import type { HttpTransport } from "../transports/http";
3
3
  import { type ToolServer } from "../tool-server";
4
4
  interface DeployToolOptions {
5
5
  projectRef?: string;
6
+ environment?: string | null;
6
7
  cwd?: string;
7
8
  edgeFunctionDeploy?: (args: Record<string, unknown>) => Promise<ToolResponse>;
8
9
  }
@@ -22,12 +23,16 @@ export declare const deployToolSchema: {
22
23
  output_dir: Type.TOptional<Type.TString>;
23
24
  skip_build: Type.TOptional<Type.TBoolean>;
24
25
  dry_run: Type.TOptional<Type.TBoolean>;
26
+ plan: Type.TOptional<Type.TBoolean>;
27
+ diff: Type.TOptional<Type.TBoolean>;
25
28
  json: Type.TOptional<Type.TBoolean>;
26
29
  };
27
30
  export declare function findDeployConfigRoot(startDirectory: string): Promise<string>;
28
31
  export declare function createFrontendArchive(outputDirectory: string): Promise<{
29
32
  archivePath: string;
30
33
  sha256: string;
34
+ treeSha256: string;
35
+ archiveBytes: number;
31
36
  sourceBytes: number;
32
37
  fileCount: number;
33
38
  cleanup(): Promise<void>;
@@ -1,3 +1,4 @@
1
+ import { FRONTEND_ARCHIVE_FORMAT } from "@supacloud/delivery/frontend-archive";
1
2
  import type { HttpResult } from "../transports/http";
2
3
  type ToolResponse = {
3
4
  content: Array<{
@@ -36,10 +37,12 @@ export interface FrontendReleaseRecord {
36
37
  file_count: number;
37
38
  created_at: string;
38
39
  kind: "prebuilt_static";
40
+ archive_format: typeof FRONTEND_ARCHIVE_FORMAT;
39
41
  }
40
42
  export declare function listFrontendReleases(http: FrontendReleaseHttp, projectRef: string, deploymentId: string, cursor?: string, limit?: number): Promise<ToolResponse>;
41
43
  export declare function getFrontendRelease(http: FrontendReleaseHttp, projectRef: string, deploymentId: string, releaseId: string): Promise<ToolResponse>;
42
44
  export declare function uploadFrontendRelease(http: FrontendReleaseHttp, projectRef: string, deploymentId: string, archivePath: string): Promise<ToolResponse>;
45
+ export declare function uploadFrontendSource(http: FrontendReleaseHttp, projectRef: string, deploymentId: string, archivePath: string): Promise<ToolResponse>;
43
46
  export declare function getActiveFrontendRelease(http: FrontendReleaseHttp, projectRef: string, deploymentId: string): Promise<ToolResponse>;
44
47
  export declare function readFrontendReleaseAuthority(http: FrontendReleaseHttp, projectRef: string, deploymentId: string): Promise<ToolResponse>;
45
48
  export declare function rollbackFrontendRelease(http: FrontendReleaseHttp, projectRef: string, deploymentId: string, releaseId?: string): Promise<ToolResponse>;
@@ -63,6 +63,6 @@ export declare class HttpTransport {
63
63
  postMultipart<T = unknown>(path: string, formData: FormData, options?: HttpPostOptions): Promise<HttpResult<T>>;
64
64
  patch<T = unknown>(path: string, body?: unknown): Promise<HttpResult<T>>;
65
65
  put<T = unknown>(path: string, body?: unknown, options?: HttpPostOptions): Promise<HttpResult<T>>;
66
- delete<T = unknown>(path: string, body?: unknown): Promise<HttpResult<T>>;
66
+ delete<T = unknown>(path: string, body?: unknown, options?: HttpPostOptions): Promise<HttpResult<T>>;
67
67
  ping(): Promise<boolean>;
68
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supacloud/cli",
3
- "version": "0.82.0",
3
+ "version": "0.84.0",
4
4
  "description": "Project-scoped CLI for SupaCloud users",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -31,11 +31,12 @@
31
31
  "dev": "bun run --watch src/index.ts",
32
32
  "prepare:db": "bun install --cwd ../contracts --frozen-lockfile && bun run --cwd ../contracts build && bun install --cwd ../db --force --frozen-lockfile && bun run --cwd ../db build && bun install --force --frozen-lockfile",
33
33
  "prebuild": "bun run prepare:db",
34
- "build": "bun build src/index.ts --outdir dist --target node --conditions=supacloud-source --external @supacloud/compiler && bun run build:tool-runtime && bun run build:types",
34
+ "build": "bun build src/index.ts --outdir dist --target node --conditions=supacloud-source --external @supacloud/compiler --external @supacloud/db && bun run build:tool-runtime && bun run build:types",
35
35
  "build:tool-runtime": "bun build src/tool-runtime.ts --outdir dist --target node --external typebox && tsc -p tsconfig.tool-runtime.json --emitDeclarationOnly",
36
36
  "build:types": "tsc --emitDeclarationOnly",
37
+ "check:release-bundle": "node scripts/check-release-bundle.mjs",
37
38
  "pretypecheck": "bun install --cwd ../delivery --frozen-lockfile && bun install --cwd ../compiler --frozen-lockfile && bun run --cwd ../compiler build && bun run prepare:db",
38
- "prepublishOnly": "bun run build",
39
+ "prepublishOnly": "bun run build && bun run check:release-bundle",
39
40
  "typecheck": "tsc --noEmit"
40
41
  },
41
42
  "keywords": [
@@ -52,14 +53,13 @@
52
53
  },
53
54
  "dependencies": {
54
55
  "@supacloud/compiler": "^0.43.0",
55
- "@supacloud/delivery": "0.11.0",
56
+ "@supacloud/delivery": "0.13.0",
56
57
  "@supacloud/db": "0.16.0",
57
- "fflate": "^0.8.3",
58
58
  "typebox": "1.3.34"
59
59
  },
60
60
  "overrides": {
61
61
  "@supacloud/contracts": "0.8.0",
62
- "@supacloud/delivery": "0.11.0",
62
+ "@supacloud/delivery": "0.13.0",
63
63
  "@graphql-tools/utils": "^12.0.3"
64
64
  },
65
65
  "devDependencies": {