@supacloud/cli 0.120.0 → 0.121.3
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 +10 -9
- package/dist/index.js +633 -129
- package/dist/shared/tools/app-database-check.d.ts +2 -0
- package/dist/shared/tools/app-starter-templates.d.ts +20 -3
- package/dist/shared/tools/app-starter.d.ts +3 -2
- package/dist/shared/tools/app-tools.d.ts +1 -1
- package/dist/shared/tools/lite-cli-tools.d.ts +5 -0
- package/dist/shared/transports/http.d.ts +2 -0
- package/package.json +8 -8
- package/skills/supacloud/references/app-workflow.md +3 -0
|
@@ -2,6 +2,8 @@ export interface AppDatabaseCheck {
|
|
|
2
2
|
name: "database-source-contracts";
|
|
3
3
|
ok: boolean;
|
|
4
4
|
detail: string;
|
|
5
|
+
/** `source` when the checker reports; `runtime` when that checker cannot run. */
|
|
6
|
+
layer: "source" | "runtime";
|
|
5
7
|
}
|
|
6
8
|
/** Use the project's installed tool, not arbitrary package scripts or remote database access. */
|
|
7
9
|
export declare function checkAppDatabaseSources(projectRoot: string): AppDatabaseCheck | undefined;
|
|
@@ -1,8 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
/** Canonical init templates. Unknown values fail closed. */
|
|
2
|
+
export declare const STARTER_TEMPLATES: readonly ["minimal", "client", "command", "model-command"];
|
|
3
|
+
export type StarterTemplate = (typeof STARTER_TEMPLATES)[number];
|
|
4
|
+
/** Forced vibecoding default: compiler, Elysia, and @supacloud/app. */
|
|
5
|
+
export declare const DEFAULT_STARTER_TEMPLATE = "minimal";
|
|
6
|
+
/** Explicit data-plane-only scaffold. Never the default. */
|
|
7
|
+
export declare const CLIENT_STARTER_TEMPLATE = "client";
|
|
8
|
+
/**
|
|
9
|
+
* Accepted CLI aliases. `app` was the 2518 name for the compiler stack and
|
|
10
|
+
* resolves to `minimal` so packed smoke scripts keep working.
|
|
11
|
+
*/
|
|
12
|
+
export declare const STARTER_TEMPLATE_ALIASES: {
|
|
13
|
+
readonly app: "minimal";
|
|
14
|
+
};
|
|
15
|
+
export type StarterTemplateInput = StarterTemplate | keyof typeof STARTER_TEMPLATE_ALIASES;
|
|
2
16
|
export interface StarterSdkDependencies {
|
|
3
17
|
"@supacloud/js": string;
|
|
4
18
|
"@supabase/supabase-js": string;
|
|
5
19
|
}
|
|
20
|
+
export declare function isStarterTemplate(value: string): value is StarterTemplate;
|
|
21
|
+
/** Resolve CLI/API input to a canonical template. Undefined selects the forced default. */
|
|
22
|
+
export declare function resolveStarterTemplate(input: string | undefined): StarterTemplate;
|
|
6
23
|
export declare function baseTemplateFiles(name: string, sdkDependencies: StarterSdkDependencies): Record<string, string>;
|
|
7
|
-
/**
|
|
8
|
-
export declare function appTemplateFiles(name: string, template: "minimal", sdkDependencies: StarterSdkDependencies): Record<string, string>;
|
|
24
|
+
/** `minimal` is the forced compiler/Effect stack. `client` is supabase-js only. */
|
|
25
|
+
export declare function appTemplateFiles(name: string, template: "minimal" | "client", sdkDependencies: StarterSdkDependencies): Record<string, string>;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { type StarterTemplate } from "./app-starter-templates";
|
|
1
|
+
import { type StarterTemplate, type StarterTemplateInput } from "./app-starter-templates";
|
|
2
2
|
/** Embedded source strings are included in both the npm CLI and standalone binary. */
|
|
3
3
|
export declare function appStarterFiles(name: string): Record<string, string>;
|
|
4
4
|
export declare function initializeAppProject(options: {
|
|
5
5
|
root?: string;
|
|
6
6
|
name?: string;
|
|
7
|
-
template?:
|
|
7
|
+
template?: StarterTemplateInput;
|
|
8
8
|
}): Promise<{
|
|
9
9
|
root: string;
|
|
10
10
|
name: string;
|
|
11
11
|
files: string[];
|
|
12
|
+
template: StarterTemplate;
|
|
12
13
|
}>;
|
|
@@ -67,7 +67,7 @@ export interface AppToolArguments {
|
|
|
67
67
|
wait?: boolean;
|
|
68
68
|
timeout_seconds?: number;
|
|
69
69
|
kind?: "module" | "command" | "query" | "controller" | "job" | "contract" | "resource" | "feature";
|
|
70
|
-
template?: "minimal" | "command" | "model-command";
|
|
70
|
+
template?: "minimal" | "client" | "command" | "model-command" | "app";
|
|
71
71
|
name?: string;
|
|
72
72
|
module?: string;
|
|
73
73
|
permission?: string;
|
|
@@ -10,6 +10,11 @@ export interface LiteCliArgs {
|
|
|
10
10
|
storage_dir?: string;
|
|
11
11
|
storage_backend?: "fs" | "memory" | "s3";
|
|
12
12
|
s3_prefix?: string;
|
|
13
|
+
/** [start/doctor] expose the inbound S3-compatible endpoint at /storage/v1/s3 */
|
|
14
|
+
s3_endpoint?: boolean;
|
|
15
|
+
s3_endpoint_access_key_id?: string;
|
|
16
|
+
s3_endpoint_region?: string;
|
|
17
|
+
s3_endpoint_buckets?: string;
|
|
13
18
|
engine?: "pglite" | "native";
|
|
14
19
|
host?: string;
|
|
15
20
|
port?: number;
|
|
@@ -33,6 +33,8 @@ export interface HttpPostOptions {
|
|
|
33
33
|
}
|
|
34
34
|
export interface HttpReleaseMutationOptions {
|
|
35
35
|
timeoutMs?: number;
|
|
36
|
+
/** Retry rate-limited requests only when the mutation is idempotent by contract. */
|
|
37
|
+
retryOnRateLimit?: boolean;
|
|
36
38
|
}
|
|
37
39
|
export interface HttpBinaryPostOptions {
|
|
38
40
|
contentType: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supacloud/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.121.3",
|
|
4
4
|
"description": "Project-scoped CLI for SupaCloud users",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -52,23 +52,23 @@
|
|
|
52
52
|
"directory": "packages/cli"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@supacloud/compiler": "^0.62.
|
|
56
|
-
"@supacloud/delivery": "0.
|
|
57
|
-
"@supacloud/db": "0.24.
|
|
55
|
+
"@supacloud/compiler": "^0.62.2",
|
|
56
|
+
"@supacloud/delivery": "0.27.0",
|
|
57
|
+
"@supacloud/db": "0.24.2",
|
|
58
58
|
"typebox": "1.4.3"
|
|
59
59
|
},
|
|
60
60
|
"overrides": {
|
|
61
61
|
"@supacloud/contracts": "0.16.1",
|
|
62
|
-
"@supacloud/delivery": "0.
|
|
62
|
+
"@supacloud/delivery": "0.27.0",
|
|
63
63
|
"@graphql-tools/utils": "^12.0.4",
|
|
64
|
-
"@supacloud/compiler": "^0.62.
|
|
65
|
-
"@supacloud/db": "0.24.
|
|
64
|
+
"@supacloud/compiler": "^0.62.2",
|
|
65
|
+
"@supacloud/db": "0.24.2",
|
|
66
66
|
"deepmerge-ts": "8.0.2",
|
|
67
67
|
"prisma": "6.19.3"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@supabase/supabase-js": "2.118.0",
|
|
71
|
-
"@supacloud/elysia": "0.42.
|
|
71
|
+
"@supacloud/elysia": "0.42.2",
|
|
72
72
|
"@types/bun": "^1.4.4",
|
|
73
73
|
"effect": "4.0.5",
|
|
74
74
|
"elysia": "2.0.0-rc.1",
|
|
@@ -50,3 +50,6 @@ git diff --check
|
|
|
50
50
|
database and project operations still require the selected project context.
|
|
51
51
|
- Do not weaken compiler governance to make a diagnostic disappear. Fix the
|
|
52
52
|
source or report the required explicit input.
|
|
53
|
+
- `app doctor` keeps the existing checks and adds `layer` on each one: `source`
|
|
54
|
+
(源码), `artifact` (产物), or `runtime` (运行时). A failure names which of those
|
|
55
|
+
the check observed. There is no second catalog of checks.
|