@velajs/cli 1.23.0 → 1.24.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 CHANGED
@@ -15,6 +15,8 @@ pnpm add -D @velajs/cli
15
15
  | Command | What it does |
16
16
  | --- | --- |
17
17
  | `vela new my-api` | Create a minimal Workers project with a module, controller, injected service, and a working local development setup. |
18
+ | `vela doctor` | Explain config resolution without importing it; `--app` opts into application graph snapshots and teardown. Supports `--json`. |
19
+ | `vela deploy check` | Check an explicit Wrangler config/environment against a saved entrypoint snapshot without bootstrapping, building or deploying. See the [deployment guide](../../docs/deployment.md). |
18
20
  | `vela db seed` | Build the app and run all `@Seeder()` classes in order. |
19
21
  | `vela route list` | HTTP route table: framework-composed controller routes (`Controller#handler`, full paths incl. prefix/version) plus `(mounted)` extras (CRUD/contributed, doc UIs). |
20
22
  | `vela module graph` | Module graph: imports tree with `global`/`lazy` flags and provider counts (`--json` for the raw graph). |
@@ -22,8 +24,9 @@ pnpm add -D @velajs/cli
22
24
  | `vela openapi dump` | Emit the OpenAPI document (needs `rootModule` in the config; `--out`, `--title`, `--api-version`, `--global-prefix`). |
23
25
  | `vela client generate` | Generate an `AppType` for `hc` from the app or `--input openapi.json`; `--out`, `--strict`, and CI `--check`. |
24
26
  | `vela mcp serve` | Run a Model Context Protocol stdio server exposing the introspection above as read-only tools (`route_list`, `module_graph`, `entrypoint_list`, `openapi_dump`, `token_describe`) plus a `vela://openapi` resource — for AI agents. |
27
+ | `vela studio` | Serve the optional Studio UI through a local host, proxying the app selected by `--url`. |
25
28
 
26
- All introspection commands take `--config <path>`; the four listing/dump commands also take `--json`.
29
+ All introspection commands take `--config <path>`; the listing commands also take `--json`.
27
30
 
28
31
  ### Create a project
29
32
 
@@ -76,25 +79,74 @@ the client disconnects, then disposes the app.
76
79
  ## Configure
77
80
 
78
81
  Create a `vela.config.{js,mjs,ts}` at your project root that builds your app.
79
- Wire your runtime bindings here (e.g. via miniflare for Cloudflare, or a Node
80
- adapter):
82
+ Import compiled application JavaScript, including its decorator metadata. The
83
+ starter's SWC build produces these files in `dist/`; run `pnpm build` first.
84
+ This minimal config uses the portable factory in Node:
81
85
 
82
- ```ts
83
- // vela.config.ts
86
+ ```js
87
+ // vela.config.mjs
84
88
  import { defineVelaConfig } from '@velajs/cli/config';
85
- import { AppModule } from './src/app.module';
89
+ import { VelaFactory } from '@velajs/vela';
90
+ import { AppModule } from './dist/app.module.js';
86
91
 
87
92
  export default defineVelaConfig({
88
93
  rootModule: AppModule, // needed by `vela openapi dump` and `vela client generate`
89
- async createApp() {
90
- const { createCloudflareApp } = await import('@velajs/cloudflare');
91
- return createCloudflareApp(AppModule);
92
- },
94
+ createApp: () => VelaFactory.create(AppModule),
93
95
  });
94
96
  ```
95
97
 
96
- > `.ts` configs require a runtime that strips types (Node 22+
97
- > `--experimental-strip-types`, or `tsx`). `.js`/`.mjs` load directly.
98
+ Supply local runtime bindings inside `createApp` if the application needs them.
99
+ Do not import the Worker entrypoint into Node when it uses native
100
+ `cloudflare:workers` APIs. A plain default-exported object or named `config`
101
+ export also works; `defineVelaConfig` preserves the inferred app subtype and
102
+ custom fields. The loader validates `createApp` and optional `rootModule` before
103
+ commands use them. Command teardown awaits application disposal even when work
104
+ fails, and cleanup warnings do not replace the command's exit result.
105
+
106
+ Node 24 can strip erasable types in a `.ts` config, but it does not transform
107
+ legacy decorators, emit constructor metadata, or resolve `tsconfig` path
108
+ aliases. A `.ts` config should therefore also import the compiled `.js` graph
109
+ with explicit extensions. Use SWC's `legacyDecorator` and `decoratorMetadata`
110
+ settings from the starter, or a compiler with equivalent output. The CLI adds
111
+ no compiler hooks. See [Node's TypeScript documentation](https://nodejs.org/docs/latest-v24.x/api/typescript.html#typescript-features).
112
+
113
+ The loader checks `vela.config.js`, then `.mjs`, then `.ts` in the current
114
+ directory; it does not search parents. `--config` selects exactly that path,
115
+ relative to the current directory or absolute, with no fallback to another file.
116
+ `resolveConfig()` from `@velajs/cli/config` returns the selected absolute path,
117
+ the `explicit`/`discovered` source and the candidates actually checked, without
118
+ importing user code.
119
+
120
+ ### Diagnose configuration
121
+
122
+ ```sh
123
+ vela doctor --json
124
+ pnpm build
125
+ vela doctor --app --config vela.config.mjs --json
126
+ ```
127
+
128
+ The default only resolves the config file. `--app` imports it and runs normal
129
+ application bootstrap and shutdown hooks, which may perform application-defined
130
+ work. It then reads existing module, route and entrypoint descriptions without
131
+ resolving providers or materializing lazy modules for inspection. Reports omit
132
+ provider values, environment values and arbitrary entrypoint metadata, and show
133
+ only entrypoints belonging to that app. `--json` uses `schemaVersion: 1`; missing
134
+ configs, bootstrap/snapshot errors or cleanup warnings return exit code 1.
135
+ Send application startup logs to stderr when consuming JSON output.
136
+
137
+ For breakpoints and source maps, see the [debugging guide](../../docs/debugging.md).
138
+
139
+ ### Studio
140
+
141
+ ```sh
142
+ vela studio --url http://127.0.0.1:8787 --port 4000
143
+ ```
144
+
145
+ The optional `@velajs/studio-host` and `@velajs/studio-ui` packages provide the
146
+ host and UI. `--port` accepts a decimal integer from 0 to 65535 (0 asks the OS
147
+ for an available port). Tokens come from `--token` or `VELA_STUDIO_TOKEN` and are
148
+ injected by the host. The CLI config and client-generation entrypoints remain
149
+ usable without Studio installed.
98
150
 
99
151
  ## Commands
100
152
 
@@ -103,9 +155,14 @@ export default defineVelaConfig({
103
155
  vela db seed
104
156
  vela db seed --config ./config/vela.config.js
105
157
  vela db seed --continue-on-error
158
+ # Inspect registration owners without running seeders:
159
+ vela db seed --list --json
106
160
  ```
107
161
 
108
162
  Exit code is `0` when all seeders run and `1` if any fail.
163
+ Seeders registered in multiple modules run once per owner, including async
164
+ providers. Invocations finish their managed deferred work and dispose request
165
+ resources before the next seeder starts. See [seeding](../../docs/seeding.md).
109
166
 
110
167
  ## Typed HTTP clients
111
168
 
package/dist/config.d.ts CHANGED
@@ -6,13 +6,13 @@ import { Type, VelaApplication } from "@velajs/vela";
6
6
  * Cloudflare Worker, or a plain Node adapter — and return a built app.
7
7
  *
8
8
  * ```ts
9
- * // vela.config.ts
9
+ * // vela.config.mjs — run `pnpm build` before using app-aware commands.
10
10
  * import { defineVelaConfig } from '@velajs/cli/config';
11
+ * import { VelaFactory } from '@velajs/vela';
12
+ * import { AppModule } from './dist/app.module.js';
11
13
  * export default defineVelaConfig({
12
- * async createApp() {
13
- * const { createCloudflareApp } = await import('@velajs/cloudflare');
14
- * return createCloudflareApp(AppModule);
15
- * },
14
+ * rootModule: AppModule,
15
+ * createApp: () => VelaFactory.create(AppModule),
16
16
  * });
17
17
  * ```
18
18
  */
@@ -25,12 +25,21 @@ export interface VelaConfig {
25
25
  rootModule?: Type;
26
26
  }
27
27
  /** Identity helper for type-safe config files. */
28
- export declare function defineVelaConfig(config: VelaConfig): VelaConfig;
28
+ export declare function defineVelaConfig<const Config extends VelaConfig>(config: Config): Config;
29
29
  /**
30
- * Locate + import the vela config. `.ts` requires a runtime that strips types
31
- * (Node 22+ `--experimental-strip-types`, or tsx/ts-node); `.js`/`.mjs` load
32
- * directly.
30
+ * Locate and import a config using Node's loader. Node 24 can strip erasable
31
+ * types in `.ts` configs, but does not emit legacy decorators or DI metadata.
32
+ * Import compiled application `.js` from the config (e.g. the SWC build used
33
+ * by Wrangler). This loader does not install compiler or path-alias hooks.
33
34
  */
34
35
  export declare function loadConfig(cwd?: string, explicitPath?: string): Promise<VelaConfig>;
36
+ export interface ConfigResolution {
37
+ readonly path: string;
38
+ readonly source: 'explicit' | 'discovered';
39
+ /** Absolute paths checked in order, ending at the selected file. */
40
+ readonly candidates: readonly string[];
41
+ }
42
+ /** Resolve provenance without importing application code or walking parent directories. */
43
+ export declare function resolveConfig(cwd?: string, explicitPath?: string): Promise<ConfigResolution>;
35
44
  //#endregion
36
45
  //# sourceMappingURL=config.d.ts.map
package/dist/config.js CHANGED
@@ -1,5 +1,5 @@
1
- import { access } from "node:fs/promises";
2
- import { isAbsolute, join, resolve } from "node:path";
1
+ import { stat } from "node:fs/promises";
2
+ import { join, resolve } from "node:path";
3
3
  import { pathToFileURL } from "node:url";
4
4
  //#region src/config.ts
5
5
  /** Identity helper for type-safe config files. */
@@ -12,28 +12,59 @@ const CANDIDATES = [
12
12
  "vela.config.ts"
13
13
  ];
14
14
  /**
15
- * Locate + import the vela config. `.ts` requires a runtime that strips types
16
- * (Node 22+ `--experimental-strip-types`, or tsx/ts-node); `.js`/`.mjs` load
17
- * directly.
15
+ * Locate and import a config using Node's loader. Node 24 can strip erasable
16
+ * types in `.ts` configs, but does not emit legacy decorators or DI metadata.
17
+ * Import compiled application `.js` from the config (e.g. the SWC build used
18
+ * by Wrangler). This loader does not install compiler or path-alias hooks.
18
19
  */
19
20
  async function loadConfig(cwd = process.cwd(), explicitPath) {
20
- const path = explicitPath ? isAbsolute(explicitPath) ? explicitPath : resolve(cwd, explicitPath) : await findConfig(cwd);
21
- if (!path) throw new Error(`No vela config found. Create one of: ${CANDIDATES.join(", ")} (or pass --config <path>).`);
22
- const mod = await import(pathToFileURL(path).href);
23
- const config = mod.default ?? mod.config;
24
- if (!config || typeof config.createApp !== "function") throw new Error(`Config at ${path} must export { createApp(): Promise<VelaApplication> } (default export or a named 'config').`);
21
+ const { path } = await resolveConfig(cwd, explicitPath);
22
+ let mod;
23
+ try {
24
+ mod = await import(pathToFileURL(path).href);
25
+ } catch (cause) {
26
+ throw new Error(`Could not import config at ${path}: ${cause instanceof Error ? cause.message : String(cause)}\nConfigs run in Node. Compile decorated application source with SWC (legacyDecorator + decoratorMetadata) or an equivalent metadata-emitting compiler, then import its compiled .js files with explicit extensions. Run your application build first; native TypeScript stripping does not transform decorators or tsconfig paths.`, { cause });
27
+ }
28
+ const config = isRecord(mod) ? mod.default ?? mod.config : void 0;
29
+ if (!isVelaConfig(config)) throw new Error(`Config at ${path} must export an object with createApp(): VelaApplication | Promise<VelaApplication> (default export or a named 'config'); rootModule, when provided, must be a constructor.`);
25
30
  return config;
26
31
  }
27
- async function findConfig(cwd) {
28
- for (const name of CANDIDATES) {
29
- const candidate = join(cwd, name);
32
+ /** Resolve provenance without importing application code or walking parent directories. */
33
+ async function resolveConfig(cwd = process.cwd(), explicitPath) {
34
+ if (explicitPath !== void 0 && explicitPath.trim() === "") throw new Error("--config must name a file.");
35
+ const candidates = explicitPath === void 0 ? CANDIDATES.map((name) => join(resolve(cwd), name)) : [resolve(cwd, explicitPath)];
36
+ const checked = [];
37
+ for (const candidate of candidates) {
38
+ checked.push(candidate);
30
39
  try {
31
- await access(candidate);
32
- return candidate;
33
- } catch {}
40
+ if (!(await stat(candidate)).isFile()) throw new Error(`Config at ${candidate} must be a file.`);
41
+ return {
42
+ path: candidate,
43
+ source: explicitPath === void 0 ? "discovered" : "explicit",
44
+ candidates: checked
45
+ };
46
+ } catch (error) {
47
+ if (!isRecord(error) || error.code !== "ENOENT") throw error;
48
+ }
34
49
  }
50
+ throw new Error(`No vela config found. Checked: ${checked.join(", ")}. Create one of: ${CANDIDATES.join(", ")} (or pass --config <path>).`);
51
+ }
52
+ function isRecord(value) {
53
+ return value !== null && typeof value === "object" && !Array.isArray(value);
54
+ }
55
+ function isConstructor(value) {
56
+ if (typeof value !== "function") return false;
57
+ try {
58
+ Reflect.construct(Object, [], value);
59
+ return true;
60
+ } catch {
61
+ return false;
62
+ }
63
+ }
64
+ function isVelaConfig(value) {
65
+ return isRecord(value) && typeof value.createApp === "function" && (value.rootModule === void 0 || isConstructor(value.rootModule));
35
66
  }
36
67
  //#endregion
37
- export { defineVelaConfig, loadConfig };
68
+ export { defineVelaConfig, loadConfig, resolveConfig };
38
69
 
39
70
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","names":[],"sources":["../src/config.ts"],"sourcesContent":["import { access } from 'node:fs/promises';\nimport { isAbsolute, join, resolve } from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport type { Type, VelaApplication } from '@velajs/vela';\n\n/**\n * A `vela.config.{js,mjs,ts}` default-exports (or exports `config`) this shape.\n * You wire your runtime bindings inside `createApp` — e.g. via miniflare for a\n * Cloudflare Worker, or a plain Node adapter — and return a built app.\n *\n * ```ts\n * // vela.config.ts\n * import { defineVelaConfig } from '@velajs/cli/config';\n * export default defineVelaConfig({\n * async createApp() {\n * const { createCloudflareApp } = await import('@velajs/cloudflare');\n * return createCloudflareApp(AppModule);\n * },\n * });\n * ```\n */\nexport interface VelaConfig {\n createApp(): Promise<VelaApplication> | VelaApplication;\n /**\n * The app's root module class — needed only by commands that work from\n * module metadata rather than the built app (`vela openapi dump`, `vela client generate`).\n */\n rootModule?: Type;\n}\n\n/** Identity helper for type-safe config files. */\nexport function defineVelaConfig(config: VelaConfig): VelaConfig {\n return config;\n}\n\nconst CANDIDATES = ['vela.config.js', 'vela.config.mjs', 'vela.config.ts'];\n\n/**\n * Locate + import the vela config. `.ts` requires a runtime that strips types\n * (Node 22+ `--experimental-strip-types`, or tsx/ts-node); `.js`/`.mjs` load\n * directly.\n */\nexport async function loadConfig(\n cwd: string = process.cwd(),\n explicitPath?: string,\n): Promise<VelaConfig> {\n const path = explicitPath\n ? isAbsolute(explicitPath)\n ? explicitPath\n : resolve(cwd, explicitPath)\n : await findConfig(cwd);\n\n if (!path) {\n throw new Error(\n `No vela config found. Create one of: ${CANDIDATES.join(', ')} (or pass --config <path>).`,\n );\n }\n\n const mod = (await import(pathToFileURL(path).href)) as {\n default?: VelaConfig;\n config?: VelaConfig;\n };\n const config = mod.default ?? mod.config;\n if (!config || typeof config.createApp !== 'function') {\n throw new Error(\n `Config at ${path} must export { createApp(): Promise<VelaApplication> } (default export or a named 'config').`,\n );\n }\n return config;\n}\n\nasync function findConfig(cwd: string): Promise<string | undefined> {\n for (const name of CANDIDATES) {\n const candidate = join(cwd, name);\n try {\n await access(candidate);\n return candidate;\n } catch {\n // try next\n }\n }\n return undefined;\n}\n"],"mappings":";;;;;AA+BA,SAAgB,iBAAiB,QAAgC;CAC/D,OAAO;AACT;AAEA,MAAM,aAAa;CAAC;CAAkB;CAAmB;AAAgB;;;;;;AAOzE,eAAsB,WACpB,MAAc,QAAQ,IAAI,GAC1B,cACqB;CACrB,MAAM,OAAO,eACT,WAAW,YAAY,IACrB,eACA,QAAQ,KAAK,YAAY,IAC3B,MAAM,WAAW,GAAG;CAExB,IAAI,CAAC,MACH,MAAM,IAAI,MACR,wCAAwC,WAAW,KAAK,IAAI,EAAE,4BAChE;CAGF,MAAM,MAAO,MAAM,OAAO,cAAc,IAAI,CAAC,CAAC;CAI9C,MAAM,SAAS,IAAI,WAAW,IAAI;CAClC,IAAI,CAAC,UAAU,OAAO,OAAO,cAAc,YACzC,MAAM,IAAI,MACR,aAAa,KAAK,6FACpB;CAEF,OAAO;AACT;AAEA,eAAe,WAAW,KAA0C;CAClE,KAAK,MAAM,QAAQ,YAAY;EAC7B,MAAM,YAAY,KAAK,KAAK,IAAI;EAChC,IAAI;GACF,MAAM,OAAO,SAAS;GACtB,OAAO;EACT,QAAQ,CAER;CACF;AAEF"}
1
+ {"version":3,"file":"config.js","names":[],"sources":["../src/config.ts"],"sourcesContent":["import { stat } from 'node:fs/promises';\nimport { join, resolve } from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport type { Type, VelaApplication } from '@velajs/vela';\n\n/**\n * A `vela.config.{js,mjs,ts}` default-exports (or exports `config`) this shape.\n * You wire your runtime bindings inside `createApp` — e.g. via miniflare for a\n * Cloudflare Worker, or a plain Node adapter — and return a built app.\n *\n * ```ts\n * // vela.config.mjs — run `pnpm build` before using app-aware commands.\n * import { defineVelaConfig } from '@velajs/cli/config';\n * import { VelaFactory } from '@velajs/vela';\n * import { AppModule } from './dist/app.module.js';\n * export default defineVelaConfig({\n * rootModule: AppModule,\n * createApp: () => VelaFactory.create(AppModule),\n * });\n * ```\n */\nexport interface VelaConfig {\n createApp(): Promise<VelaApplication> | VelaApplication;\n /**\n * The app's root module class — needed only by commands that work from\n * module metadata rather than the built app (`vela openapi dump`, `vela client generate`).\n */\n rootModule?: Type;\n}\n\n/** Identity helper for type-safe config files. */\nexport function defineVelaConfig<const Config extends VelaConfig>(config: Config): Config {\n return config;\n}\n\nconst CANDIDATES = ['vela.config.js', 'vela.config.mjs', 'vela.config.ts'];\n\n/**\n * Locate and import a config using Node's loader. Node 24 can strip erasable\n * types in `.ts` configs, but does not emit legacy decorators or DI metadata.\n * Import compiled application `.js` from the config (e.g. the SWC build used\n * by Wrangler). This loader does not install compiler or path-alias hooks.\n */\nexport async function loadConfig(\n cwd: string = process.cwd(),\n explicitPath?: string,\n): Promise<VelaConfig> {\n const { path } = await resolveConfig(cwd, explicitPath);\n let mod: unknown;\n try {\n mod = await import(pathToFileURL(path).href);\n } catch (cause) {\n throw new Error(\n `Could not import config at ${path}: ${cause instanceof Error ? cause.message : String(cause)}\\n` +\n 'Configs run in Node. Compile decorated application source with SWC (legacyDecorator + decoratorMetadata) ' +\n 'or an equivalent metadata-emitting compiler, then import its compiled .js files with explicit extensions. ' +\n 'Run your application build first; native TypeScript stripping does not transform decorators or tsconfig paths.',\n { cause },\n );\n }\n const config = isRecord(mod) ? (mod.default ?? mod.config) : undefined;\n if (!isVelaConfig(config)) {\n throw new Error(\n `Config at ${path} must export an object with createApp(): VelaApplication | Promise<VelaApplication> ` +\n \"(default export or a named 'config'); rootModule, when provided, must be a constructor.\",\n );\n }\n return config;\n}\n\nexport interface ConfigResolution {\n readonly path: string;\n readonly source: 'explicit' | 'discovered';\n /** Absolute paths checked in order, ending at the selected file. */\n readonly candidates: readonly string[];\n}\n\n/** Resolve provenance without importing application code or walking parent directories. */\nexport async function resolveConfig(\n cwd: string = process.cwd(),\n explicitPath?: string,\n): Promise<ConfigResolution> {\n if (explicitPath !== undefined && explicitPath.trim() === '') {\n throw new Error('--config must name a file.');\n }\n const candidates =\n explicitPath === undefined\n ? CANDIDATES.map((name) => join(resolve(cwd), name))\n : [resolve(cwd, explicitPath)];\n const checked: string[] = [];\n for (const candidate of candidates) {\n checked.push(candidate);\n try {\n if (!(await stat(candidate)).isFile()) {\n throw new Error(`Config at ${candidate} must be a file.`);\n }\n return {\n path: candidate,\n source: explicitPath === undefined ? 'discovered' : 'explicit',\n candidates: checked,\n };\n } catch (error) {\n if (!isRecord(error) || error.code !== 'ENOENT') throw error;\n }\n }\n throw new Error(\n `No vela config found. Checked: ${checked.join(', ')}. Create one of: ${CANDIDATES.join(', ')} (or pass --config <path>).`,\n );\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return value !== null && typeof value === 'object' && !Array.isArray(value);\n}\n\nfunction isConstructor(value: unknown): value is Type {\n if (typeof value !== 'function') return false;\n try {\n // Validate constructability without invoking the user's constructor.\n Reflect.construct(Object, [], value);\n return true;\n } catch {\n return false;\n }\n}\n\nfunction isVelaConfig(value: unknown): value is VelaConfig {\n return (\n isRecord(value) &&\n typeof value.createApp === 'function' &&\n (value.rootModule === undefined || isConstructor(value.rootModule))\n );\n}\n"],"mappings":";;;;;AA+BA,SAAgB,iBAAkD,QAAwB;CACxF,OAAO;AACT;AAEA,MAAM,aAAa;CAAC;CAAkB;CAAmB;AAAgB;;;;;;;AAQzE,eAAsB,WACpB,MAAc,QAAQ,IAAI,GAC1B,cACqB;CACrB,MAAM,EAAE,SAAS,MAAM,cAAc,KAAK,YAAY;CACtD,IAAI;CACJ,IAAI;EACF,MAAM,MAAM,OAAO,cAAc,IAAI,CAAC,CAAC;CACzC,SAAS,OAAO;EACd,MAAM,IAAI,MACR,8BAA8B,KAAK,IAAI,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,EAAE,sUAI9F,EAAE,MAAM,CACV;CACF;CACA,MAAM,SAAS,SAAS,GAAG,IAAK,IAAI,WAAW,IAAI,SAAU,KAAA;CAC7D,IAAI,CAAC,aAAa,MAAM,GACtB,MAAM,IAAI,MACR,aAAa,KAAK,4KAEpB;CAEF,OAAO;AACT;;AAUA,eAAsB,cACpB,MAAc,QAAQ,IAAI,GAC1B,cAC2B;CAC3B,IAAI,iBAAiB,KAAA,KAAa,aAAa,KAAK,MAAM,IACxD,MAAM,IAAI,MAAM,4BAA4B;CAE9C,MAAM,aACJ,iBAAiB,KAAA,IACb,WAAW,KAAK,SAAS,KAAK,QAAQ,GAAG,GAAG,IAAI,CAAC,IACjD,CAAC,QAAQ,KAAK,YAAY,CAAC;CACjC,MAAM,UAAoB,CAAC;CAC3B,KAAK,MAAM,aAAa,YAAY;EAClC,QAAQ,KAAK,SAAS;EACtB,IAAI;GACF,IAAI,EAAE,MAAM,KAAK,SAAS,EAAA,CAAG,OAAO,GAClC,MAAM,IAAI,MAAM,aAAa,UAAU,iBAAiB;GAE1D,OAAO;IACL,MAAM;IACN,QAAQ,iBAAiB,KAAA,IAAY,eAAe;IACpD,YAAY;GACd;EACF,SAAS,OAAO;GACd,IAAI,CAAC,SAAS,KAAK,KAAK,MAAM,SAAS,UAAU,MAAM;EACzD;CACF;CACA,MAAM,IAAI,MACR,kCAAkC,QAAQ,KAAK,IAAI,EAAE,mBAAmB,WAAW,KAAK,IAAI,EAAE,4BAChG;AACF;AAEA,SAAS,SAAS,OAAkD;CAClE,OAAO,UAAU,QAAQ,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAEA,SAAS,cAAc,OAA+B;CACpD,IAAI,OAAO,UAAU,YAAY,OAAO;CACxC,IAAI;EAEF,QAAQ,UAAU,QAAQ,CAAC,GAAG,KAAK;EACnC,OAAO;CACT,QAAQ;EACN,OAAO;CACT;AACF;AAEA,SAAS,aAAa,OAAqC;CACzD,OACE,SAAS,KAAK,KACd,OAAO,MAAM,cAAc,eAC1B,MAAM,eAAe,KAAA,KAAa,cAAc,MAAM,UAAU;AAErE"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { GeneratedClientContract, generateClientContract } from "./client-contract.js";
2
- import { VelaConfig, defineVelaConfig, loadConfig } from "./config.js";
2
+ import { ConfigResolution, VelaConfig, defineVelaConfig, loadConfig, resolveConfig } from "./config.js";
3
3
  import { Command } from "clipanion";
4
4
  import { ModuleDescription, VelaApplication } from "@velajs/vela";
5
5
  import { SeederResult } from "@velajs/vela/seeder";
@@ -10,6 +10,8 @@ export declare class SeedCommand extends Command {
10
10
  static usage: import("clipanion").Usage;
11
11
  config: string | undefined;
12
12
  continueOnError: boolean;
13
+ list: boolean;
14
+ json: boolean;
13
15
  execute(): Promise<number>;
14
16
  }
15
17
  //#endregion
@@ -66,10 +68,8 @@ export declare class OpenApiDumpCommand extends Command {
66
68
  * introspection as the `route`/`module`/`entrypoint`/`openapi` commands, so an
67
69
  * AI agent can query a Vela app's shape over the Model Context Protocol.
68
70
  *
69
- * Deliberately does NOT extend `AppCommand`: that base disposes the app in its
70
- * `finally` the moment `run()` returns, but an MCP server must stay alive until
71
- * the transport closes. stdout is reserved for JSON-RPC framing; every human
72
- * message goes to stderr.
71
+ * The application lifetime includes the transport's close promise. stdout is
72
+ * reserved for JSON-RPC framing; every human message goes to stderr.
73
73
  */
74
74
  export declare class McpServeCommand extends Command {
75
75
  static paths: string[][];
@@ -101,6 +101,7 @@ export declare class StudioCommand extends Command {
101
101
  //#endregion
102
102
  //#region src/commands/client.command.d.ts
103
103
  export declare class ClientGenerateCommand extends Command {
104
+ #private;
104
105
  static paths: string[][];
105
106
  static usage: import("clipanion").Usage;
106
107
  config: string | undefined;
@@ -109,8 +110,28 @@ export declare class ClientGenerateCommand extends Command {
109
110
  check: boolean;
110
111
  strict: boolean;
111
112
  execute(): Promise<number>;
112
- private readDocument;
113
- private fromApp;
113
+ }
114
+ //#endregion
115
+ //#region src/commands/doctor.command.d.ts
116
+ export declare class DoctorCommand extends Command {
117
+ static paths: string[][];
118
+ static usage: import("clipanion").Usage;
119
+ config: string | undefined;
120
+ app: boolean;
121
+ json: boolean;
122
+ execute(): Promise<number>;
123
+ }
124
+ //#endregion
125
+ //#region src/commands/deploy-check.command.d.ts
126
+ /** Static application deployment preflight; never invokes Wrangler or application code. */
127
+ export declare class DeployCheckCommand extends Command {
128
+ static paths: string[][];
129
+ static usage: import("clipanion").Usage;
130
+ config: string;
131
+ environment: string;
132
+ entrypoints: string;
133
+ json: boolean;
134
+ execute(): Promise<number>;
114
135
  }
115
136
  //#endregion
116
137
  //#region src/introspect.d.ts
@@ -154,5 +175,5 @@ export declare function formatSeedResults(results: SeederResult[], log?: (messag
154
175
  /** Aligned plain-text table. Pure; returns lines. */
155
176
  export declare function renderTable(headers: string[], rows: string[][]): string[];
156
177
  //#endregion
157
- export { type EntrypointRow, type GeneratedClientContract, type RouteRow, type VelaConfig, defineVelaConfig, generateClientContract, loadConfig };
178
+ export { type ConfigResolution, type EntrypointRow, type GeneratedClientContract, type RouteRow, type VelaConfig, defineVelaConfig, generateClientContract, loadConfig, resolveConfig };
158
179
  //# sourceMappingURL=index.d.ts.map