@supacloud/cli 0.77.0 → 0.79.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/README.md +88 -0
- package/dist/index.js +789 -87
- package/dist/shared/tools/app-tools.d.ts +14 -1
- package/dist/shared/tools/application-activation-http-status.test.d.ts +1 -0
- package/dist/shared/tools/application-preview-tools.d.ts +74 -0
- package/dist/shared/tools/application-preview-tools.test.d.ts +1 -0
- package/dist/shared/tools/application-schemas.d.ts +16 -0
- package/dist/shared/tools/application-tools.d.ts +8 -1
- package/dist/shared/tools/branch-promotion-http-status.test.d.ts +1 -0
- package/dist/shared/tools/branch-tools.d.ts +2 -1
- package/dist/shared/transports/http.d.ts +4 -0
- package/package.json +3 -3
|
@@ -5,10 +5,16 @@ declare const REMOTE_APP_ACTIONS: {
|
|
|
5
5
|
readonly configure: "put_configuration";
|
|
6
6
|
readonly deploy: "activate_release";
|
|
7
7
|
readonly status: "get_runtime";
|
|
8
|
-
readonly rollback: "
|
|
8
|
+
readonly rollback: "rollback_release";
|
|
9
|
+
readonly "rollback-plan": "get_rollback_snapshot";
|
|
9
10
|
readonly reconcile: "reconcile_activation";
|
|
10
11
|
readonly retire: "retire_activation";
|
|
11
12
|
readonly logs: "logs";
|
|
13
|
+
readonly "preview-plan": "get_preview_plan";
|
|
14
|
+
readonly preview: "create_preview";
|
|
15
|
+
readonly previews: "list_previews";
|
|
16
|
+
readonly "preview-status": "get_preview";
|
|
17
|
+
readonly "preview-cleanup": "cleanup_preview";
|
|
12
18
|
};
|
|
13
19
|
export interface AppToolOptions {
|
|
14
20
|
getApplications?: () => ((args: Record<string, unknown>) => Promise<ToolResult>) | undefined;
|
|
@@ -29,6 +35,13 @@ export interface AppToolArguments {
|
|
|
29
35
|
configuration_path?: string;
|
|
30
36
|
manifest_path?: string;
|
|
31
37
|
release_id?: string;
|
|
38
|
+
preview_id?: string;
|
|
39
|
+
branch_ref?: string;
|
|
40
|
+
branch_name?: string;
|
|
41
|
+
data_mode?: "schema_only" | "full_clone";
|
|
42
|
+
ttl_seconds?: number;
|
|
43
|
+
wait?: boolean;
|
|
44
|
+
timeout_seconds?: number;
|
|
32
45
|
kind?: "module" | "command" | "query" | "controller" | "job" | "contract" | "resource";
|
|
33
46
|
template?: "minimal" | "http" | "command" | "edge";
|
|
34
47
|
name?: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Type, type Static } from "typebox";
|
|
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"];
|
|
4
|
+
export declare const APPLICATION_PREVIEW_FIELDS: {
|
|
5
|
+
preview_id: Type.TOptional<Type.TString>;
|
|
6
|
+
branch_ref: Type.TOptional<Type.TString>;
|
|
7
|
+
branch_name: Type.TOptional<Type.TString>;
|
|
8
|
+
data_mode: Type.TOptional<Type.TEnum<("schema_only" | "full_clone")[]>>;
|
|
9
|
+
ttl_seconds: Type.TOptional<Type.TInteger>;
|
|
10
|
+
wait: Type.TOptional<Type.TBoolean>;
|
|
11
|
+
timeout_seconds: Type.TOptional<Type.TInteger>;
|
|
12
|
+
};
|
|
13
|
+
declare const receiptSchema: Type.TObject<{
|
|
14
|
+
schema: Type.TLiteral<"supacloud.application-preview.v1">;
|
|
15
|
+
preview_id: Type.TString;
|
|
16
|
+
project_ref: Type.TString;
|
|
17
|
+
application_id: Type.TString;
|
|
18
|
+
environment_id: Type.TString;
|
|
19
|
+
release_id: Type.TString;
|
|
20
|
+
expires_at: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
21
|
+
status: Type.TEnum<("failed" | "ready" | "planned" | "cleaned" | "provisioning")[]>;
|
|
22
|
+
resources: Type.TObject<{
|
|
23
|
+
build_artifact: Type.TObject<{
|
|
24
|
+
status: Type.TEnum<("pending" | "failed" | "ready" | "cleaned")[]>;
|
|
25
|
+
release_id: Type.TString;
|
|
26
|
+
}>;
|
|
27
|
+
database_branch: Type.TObject<{
|
|
28
|
+
status: Type.TEnum<("pending" | "failed" | "ready" | "cleaned")[]>;
|
|
29
|
+
branch_ref: Type.TString;
|
|
30
|
+
data_mode: Type.TEnum<("schema_only" | "full_clone")[]>;
|
|
31
|
+
}>;
|
|
32
|
+
queue_namespace: Type.TObject<{
|
|
33
|
+
status: Type.TEnum<("pending" | "failed" | "ready" | "cleaned")[]>;
|
|
34
|
+
namespace: Type.TString;
|
|
35
|
+
}>;
|
|
36
|
+
storage_namespace: Type.TObject<{
|
|
37
|
+
status: Type.TEnum<("pending" | "failed" | "ready" | "cleaned")[]>;
|
|
38
|
+
namespace: Type.TString;
|
|
39
|
+
}>;
|
|
40
|
+
test_secret: Type.TObject<{
|
|
41
|
+
status: Type.TEnum<("pending" | "failed" | "ready" | "cleaned")[]>;
|
|
42
|
+
name: Type.TString;
|
|
43
|
+
value_issued: Type.TLiteral<false>;
|
|
44
|
+
}>;
|
|
45
|
+
configuration_revision: Type.TObject<{
|
|
46
|
+
status: Type.TEnum<("pending" | "failed" | "ready" | "cleaned")[]>;
|
|
47
|
+
configuration_id: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
48
|
+
}>;
|
|
49
|
+
application_activation: Type.TObject<{
|
|
50
|
+
status: Type.TEnum<("pending" | "failed" | "ready" | "cleaned")[]>;
|
|
51
|
+
activation_id: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
52
|
+
}>;
|
|
53
|
+
smoke_test: Type.TObject<{
|
|
54
|
+
status: Type.TEnum<("pending" | "failed" | "ready" | "cleaned")[]>;
|
|
55
|
+
checks: Type.TArray<Type.TString>;
|
|
56
|
+
passed: Type.TArray<Type.TString>;
|
|
57
|
+
failed: Type.TArray<Type.TString>;
|
|
58
|
+
}>;
|
|
59
|
+
}>;
|
|
60
|
+
cleanup: Type.TObject<{
|
|
61
|
+
required: Type.TBoolean;
|
|
62
|
+
completed: Type.TBoolean;
|
|
63
|
+
error: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
64
|
+
}>;
|
|
65
|
+
branch_name: Type.TOptional<Type.TString>;
|
|
66
|
+
queue_name: Type.TOptional<Type.TString>;
|
|
67
|
+
test_secret_name: Type.TOptional<Type.TString>;
|
|
68
|
+
source_configuration_id: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
69
|
+
created_at: Type.TOptional<Type.TString>;
|
|
70
|
+
updated_at: Type.TOptional<Type.TString>;
|
|
71
|
+
}>;
|
|
72
|
+
export declare function applicationPreviewAction(http: HttpTransport, args: Record<string, unknown>, project: string): Promise<import("./release-control-response").ReleaseControlToolResponse>;
|
|
73
|
+
export type ApplicationPreviewReceipt = Static<typeof receiptSchema>;
|
|
74
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -73,3 +73,19 @@ export declare const ApplicationActivationRetirementResultSchema: import("typebo
|
|
|
73
73
|
activation_id: import("typebox").TString;
|
|
74
74
|
retired_at: import("typebox").TString;
|
|
75
75
|
}>;
|
|
76
|
+
export declare const ApplicationRollbackSnapshotSchema: import("typebox").TObject<{
|
|
77
|
+
schema: import("typebox").TLiteral<"supacloud.application-rollback-snapshot.v1">;
|
|
78
|
+
project_ref: import("typebox").TString;
|
|
79
|
+
application_id: import("typebox").TString;
|
|
80
|
+
environment_id: import("typebox").TString;
|
|
81
|
+
active: import("typebox").TUnion<[import("typebox").TObject<{
|
|
82
|
+
release_id: import("typebox").TString;
|
|
83
|
+
configuration_id: import("typebox").TString;
|
|
84
|
+
activation_id: import("typebox").TString;
|
|
85
|
+
}>, import("typebox").TNull]>;
|
|
86
|
+
previous: import("typebox").TUnion<[import("typebox").TObject<{
|
|
87
|
+
release_id: import("typebox").TString;
|
|
88
|
+
configuration_id: import("typebox").TString;
|
|
89
|
+
activation_id: import("typebox").TString;
|
|
90
|
+
}>, import("typebox").TNull]>;
|
|
91
|
+
}>;
|
|
@@ -2,7 +2,14 @@ import { Type } from "typebox";
|
|
|
2
2
|
import type { HttpTransport } from "../transports/http";
|
|
3
3
|
import { type ToolServer } from "../tool-server";
|
|
4
4
|
export declare const APPLICATION_TOOL_SCHEMA: {
|
|
5
|
-
|
|
5
|
+
preview_id: Type.TOptional<Type.TString>;
|
|
6
|
+
branch_ref: Type.TOptional<Type.TString>;
|
|
7
|
+
branch_name: Type.TOptional<Type.TString>;
|
|
8
|
+
data_mode: Type.TOptional<Type.TEnum<("schema_only" | "full_clone")[]>>;
|
|
9
|
+
ttl_seconds: Type.TOptional<Type.TInteger>;
|
|
10
|
+
wait: Type.TOptional<Type.TBoolean>;
|
|
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_rollback_snapshot" | "get_preview_plan" | "put_configuration" | "rollback_release" | "reconcile_activation" | "retire_activation" | "create_preview" | "list_previews" | "get_preview" | "cleanup_preview")[]>;
|
|
6
13
|
ref: Type.TString;
|
|
7
14
|
id: Type.TString;
|
|
8
15
|
environment_id: Type.TOptional<Type.TString>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { HttpTransport } from "../transports/http";
|
|
2
2
|
import { type ToolServer } from "../tool-server";
|
|
3
|
-
export
|
|
3
|
+
export type BranchHttpTransport = Pick<HttpTransport, "get" | "post" | "delete">;
|
|
4
|
+
export declare function registerBranchTools(server: ToolServer, http: BranchHttpTransport, options?: {
|
|
4
5
|
projectRef?: string;
|
|
5
6
|
readOnly?: boolean;
|
|
6
7
|
}): void;
|
|
@@ -18,6 +18,10 @@ export interface HttpResult<T = unknown> {
|
|
|
18
18
|
responseReadError?: true;
|
|
19
19
|
}
|
|
20
20
|
export interface HttpGetOptions {
|
|
21
|
+
timeoutMs?: number;
|
|
22
|
+
retry?: boolean;
|
|
23
|
+
/** Complete header/body budget for a bounded JSON GET with retries disabled. */
|
|
24
|
+
totalTimeoutMs?: number;
|
|
21
25
|
maxResponseBytes?: number;
|
|
22
26
|
maxJsonBytes?: number;
|
|
23
27
|
responseTimeoutMs?: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supacloud/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.79.0",
|
|
4
4
|
"description": "Project-scoped CLI for SupaCloud users",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@supacloud/compiler": "^0.43.0",
|
|
55
|
-
"@supacloud/delivery": "0.
|
|
55
|
+
"@supacloud/delivery": "0.9.0",
|
|
56
56
|
"@supacloud/db": "0.16.0",
|
|
57
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.
|
|
62
|
+
"@supacloud/delivery": "0.9.0",
|
|
63
63
|
"@graphql-tools/utils": "^12.0.3"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|