feat(v1.1.3-modules): dashboard kind dropdown + scripts-list and detail badges
- `Script` type gains `kind: 'endpoint' | 'module'`. `CreateScriptInput` + `UpdateScriptInput` carry an optional `kind` field. - App page's script-create form grows a kind dropdown next to Name + Description. Selecting "module" surfaces a hint that modules cannot bind to routes / triggers. - Scripts list renders a small badge after the version: blue "endpoint" or purple "module". - Script detail page renders the same badge next to the H1. `npm run check` passes (0 errors, 0 warnings). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,8 @@ export interface ScriptSandbox {
|
||||
max_expr_depth?: number;
|
||||
}
|
||||
|
||||
export type ScriptKind = 'endpoint' | 'module';
|
||||
|
||||
export interface Script {
|
||||
id: string;
|
||||
app_id: string;
|
||||
@@ -28,6 +30,8 @@ export interface Script {
|
||||
description: string | null;
|
||||
version: number;
|
||||
source: string;
|
||||
/** v1.1.3 — 'endpoint' (default) handles routes/triggers; 'module' is imported by other scripts. */
|
||||
kind: ScriptKind;
|
||||
timeout_seconds: number;
|
||||
memory_limit_mb: number;
|
||||
sandbox: ScriptSandbox;
|
||||
@@ -173,6 +177,8 @@ export interface CreateScriptInput {
|
||||
name: string;
|
||||
description?: string | null;
|
||||
source: string;
|
||||
/** Defaults to 'endpoint' server-side if omitted. v1.1.3. */
|
||||
kind?: ScriptKind;
|
||||
timeout_seconds?: number;
|
||||
memory_limit_mb?: number;
|
||||
}
|
||||
@@ -184,6 +190,8 @@ export interface UpdateScriptInput {
|
||||
timeout_seconds?: number;
|
||||
memory_limit_mb?: number;
|
||||
sandbox?: ScriptSandbox;
|
||||
/** v1.1.3 — endpoint→module rejected if routes/triggers reference the script. */
|
||||
kind?: ScriptKind;
|
||||
}
|
||||
|
||||
export interface DeadLetterRow {
|
||||
|
||||
Reference in New Issue
Block a user