@wolfstar/schema 0.5.0 → 0.6.0-next-20261004142621
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/dist/esm/{config-BFRzY_rK.d.ts → config-CMYQZ7XK.d.ts} +86 -5
- package/dist/esm/config-CMYQZ7XK.d.ts.map +1 -0
- package/dist/esm/config.d.ts +2 -2
- package/dist/esm/index.d.ts +14 -2
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +96 -4
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/esm/config-BFRzY_rK.d.ts.map +0 -1
|
@@ -155,8 +155,23 @@ type ResolvedTunnelConfig = {
|
|
|
155
155
|
readonly path: string;
|
|
156
156
|
readonly updateEndpoint: boolean;
|
|
157
157
|
};
|
|
158
|
+
interface ResolvedDevLogsConfig {
|
|
159
|
+
/** The channels shown at start, `null` for every channel. */
|
|
160
|
+
readonly channels: readonly string[] | null;
|
|
161
|
+
readonly levels: readonly StarsLogLevel[];
|
|
162
|
+
/** Absolute directory of the per-run log files, `null` when disabled. */
|
|
163
|
+
readonly dir: string | null;
|
|
164
|
+
readonly keep: number;
|
|
165
|
+
}
|
|
166
|
+
interface ResolvedDevCommandsConfig {
|
|
167
|
+
readonly refresh: 'prompt' | 'auto' | 'off';
|
|
168
|
+
}
|
|
158
169
|
interface ResolvedDevConfig {
|
|
159
170
|
readonly banner: readonly string[] | false | null;
|
|
171
|
+
readonly layout: 'auto' | 'dashboard' | 'panel';
|
|
172
|
+
readonly logs: ResolvedDevLogsConfig;
|
|
173
|
+
readonly commands: ResolvedDevCommandsConfig;
|
|
174
|
+
readonly hmr: boolean;
|
|
160
175
|
readonly watch: readonly string[];
|
|
161
176
|
readonly ignore: readonly string[];
|
|
162
177
|
readonly debounce: number;
|
|
@@ -238,6 +253,10 @@ interface ResolveConfigOptions {
|
|
|
238
253
|
*/
|
|
239
254
|
projectEnv?: Readonly<Record<string, string>>;
|
|
240
255
|
}
|
|
256
|
+
/** Every level `dev.logs.levels` accepts, from the most verbose to the most severe. */
|
|
257
|
+
declare const LOG_LEVELS: readonly ["trace", "debug", "info", "warn", "error"];
|
|
258
|
+
/** `trace` is the per-request noise: it starts hidden, and the dev UI turns it on. */
|
|
259
|
+
declare const DEFAULT_LOG_LEVELS: readonly ["error", "warn", "info", "debug"];
|
|
241
260
|
/**
|
|
242
261
|
* Applies defaults, validates every option and resolves all paths to absolute ones.
|
|
243
262
|
*
|
|
@@ -500,9 +519,69 @@ interface StarsTunnelConfig {
|
|
|
500
519
|
*/
|
|
501
520
|
path?: string;
|
|
502
521
|
}
|
|
522
|
+
/** The severities a dev log entry can be filtered by, from the most verbose to the most severe. */
|
|
523
|
+
type StarsLogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error';
|
|
524
|
+
interface StarsDevLogsConfig {
|
|
525
|
+
/**
|
|
526
|
+
* The channels shown when `stars dev` starts (`cli`, `build`, `bot`, `types`, `tunnel`, `hmr`, `commands`,
|
|
527
|
+
* `interactions`, `http`, `lifecycle`, or one a plugin logs on). Every other channel starts hidden; the dev UI can
|
|
528
|
+
* still toggle each of them, and the log file always receives everything.
|
|
529
|
+
* @default every channel
|
|
530
|
+
*/
|
|
531
|
+
channels?: string[];
|
|
532
|
+
/**
|
|
533
|
+
* The levels shown when `stars dev` starts.
|
|
534
|
+
* @default ['error', 'warn', 'info', 'debug']
|
|
535
|
+
*/
|
|
536
|
+
levels?: StarsLogLevel[];
|
|
537
|
+
/**
|
|
538
|
+
* A directory, relative to {@link StarsConfig.root}, that receives one log file per `stars dev` run
|
|
539
|
+
* (`dev-<timestamp>.log`), next to {@link StarsDevConfig.logFile} which only keeps the latest run.
|
|
540
|
+
* @default false
|
|
541
|
+
*/
|
|
542
|
+
dir?: string | false;
|
|
543
|
+
/**
|
|
544
|
+
* How many per-run files {@link StarsDevLogsConfig.dir} keeps, the file of the current run included; older ones
|
|
545
|
+
* are deleted when a run starts. A positive integer: `1` keeps only the current run.
|
|
546
|
+
* @default 10
|
|
547
|
+
*/
|
|
548
|
+
keep?: number;
|
|
549
|
+
}
|
|
550
|
+
interface StarsDevCommandsConfig {
|
|
551
|
+
/**
|
|
552
|
+
* What `stars dev` does when the application commands the bot registers differ from the ones it saw before:
|
|
553
|
+
*
|
|
554
|
+
* - `'prompt'`: ask in the dev UI (`Refresh commands? (y/n)`) and redeploy on `y`. Without the interactive UI
|
|
555
|
+
* (`--no-tui`, CI) the change is only reported.
|
|
556
|
+
* - `'auto'`: redeploy right away.
|
|
557
|
+
* - `'off'`: only report the change.
|
|
558
|
+
*
|
|
559
|
+
* Needs `@wolfstar/http-framework` 6.1 or later in the project: the bot reports its commands to the CLI itself.
|
|
560
|
+
* @default 'prompt'
|
|
561
|
+
*/
|
|
562
|
+
refresh?: 'prompt' | 'auto' | 'off';
|
|
563
|
+
}
|
|
503
564
|
interface StarsDevConfig {
|
|
504
565
|
/** Custom terminal wordmark (one or more lines), or `false` to hide it. Defaults to the Stars wordmark. */
|
|
505
566
|
banner?: string | readonly string[] | false;
|
|
567
|
+
/**
|
|
568
|
+
* The interactive dev UI: `'dashboard'` is the full-screen view (status sidebar, channel and level filters, the
|
|
569
|
+
* log stream), `'panel'` the compact one pinned to the bottom of the terminal with the logs folded away. `'auto'`
|
|
570
|
+
* picks the dashboard when the terminal is at least 90 columns by 20 rows.
|
|
571
|
+
* @default 'auto'
|
|
572
|
+
*/
|
|
573
|
+
layout?: 'auto' | 'dashboard' | 'panel';
|
|
574
|
+
/** Which log channels and levels the dev UI starts with, and where a run's logs are kept. */
|
|
575
|
+
logs?: StarsDevLogsConfig;
|
|
576
|
+
/** How `stars dev` reacts when the bot's application commands change. */
|
|
577
|
+
commands?: StarsDevCommandsConfig;
|
|
578
|
+
/**
|
|
579
|
+
* Leaves a change to the bot's own hot reload instead of restarting it, when the bot runs with `hmr` enabled and
|
|
580
|
+
* every file the build changed is a piece it watches. Anything else still restarts the bot. `false` always
|
|
581
|
+
* restarts.
|
|
582
|
+
* @default true
|
|
583
|
+
*/
|
|
584
|
+
hmr?: boolean;
|
|
506
585
|
/**
|
|
507
586
|
* Extra paths to watch, relative to {@link StarsConfig.root}. Only used when
|
|
508
587
|
* the build tool is `none`; `tsdown` and `tsc` watch through their own build.
|
|
@@ -711,10 +790,12 @@ interface StarsEnvSetupOptions {
|
|
|
711
790
|
/** Only keep the variables starting with this prefix (e.g. `BOT_`). */
|
|
712
791
|
prefix?: string;
|
|
713
792
|
/**
|
|
714
|
-
* **Experimental.** `'
|
|
715
|
-
*
|
|
793
|
+
* **Experimental.** `'node'` parses the files with Node.js' own `util.parseEnv`, `'dotenv'` with `dotenv` and
|
|
794
|
+
* `dotenv-expand` (optional packages of `@wolfstar/env-utilities`), and `'varlock'` resolves the environment through
|
|
795
|
+
* [varlock](https://varlock.dev). When left out, `'varlock'` is used for a project with a `.env.schema`, otherwise
|
|
796
|
+
* `'dotenv'` if it is installed and `'node'` if it is not.
|
|
716
797
|
*/
|
|
717
|
-
loader?: 'dotenv' | 'varlock';
|
|
798
|
+
loader?: 'node' | 'dotenv' | 'varlock';
|
|
718
799
|
/** Logs every file loaded and every prefix match. */
|
|
719
800
|
debug?: boolean;
|
|
720
801
|
/**
|
|
@@ -801,5 +882,5 @@ interface StarsConfig {
|
|
|
801
882
|
*/
|
|
802
883
|
declare function defineConfig(config: StarsConfig): StarsConfig;
|
|
803
884
|
//#endregion
|
|
804
|
-
export {
|
|
805
|
-
//# sourceMappingURL=config-
|
|
885
|
+
export { ResolvedHooksConfig as $, Builder as A, ResolvedDevCommandsConfig as B, PrepareProjectResult as C, StarsHooksConfig as D, StarsHooks as E, LOG_LEVELS as F, ResolvedImportsConfig as G, ResolvedDevLogsConfig as H, PackageJsonLike as I, ResolvedTunnelConfig as J, ResolvedNitroConfig as K, ResolveConfigOptions as L, BuilderEvents as M, BuilderLogLevel as N, StarsRestartReason as O, DEFAULT_LOG_LEVELS as P, resolveStarsConfig as Q, ResolvedBuildConfig as R, StarsViteConfig as S, StarsHookNamespace as T, ResolvedExperimentalConfig as U, ResolvedDevConfig as V, ResolvedI18nCodegenConfig as W, displayPath as X, ResolvedTypecheckConfig as Y, readProjectEnvFiles as Z, StarsNitroConfig as _, StarsModuleEntry as _t, StarsCompatibilityVersion as a, DEFAULT_COMPATIBILITY_VERSION as at, StarsTypecheckConfig as b, StarsDevConfig as c, LEGACY_COMPATIBILITY_VERSION as ct, StarsEnvSetupOptions as d, Validator as dt, STARS_HOOK_NAMES as et, StarsExperimentalConfig as f, EMPTY_MODULES_RUNTIME as ft, StarsLogLevel as g, RuntimePluginRegistration as gt, StarsImportsConfig as h, ResolvedModuleEntry as ht, StarsCodegenConfig as i, AUTO_ENV_VERSION as it, BuilderContext as j, BuildOutcome as k, StarsDevLogsConfig as l, ResolvedFutureConfig as lt, StarsI18nCodegenConfig as m, ModulesRuntime as mt, StarsBuildConfig as n, ResolvedEnvConfig as nt, StarsConfig as o, EOL_COMPATIBILITY_VERSIONS as ot, StarsFutureConfig as p, InstalledModule as pt, ResolvedStarsConfig as q, StarsBuildTool as r, resolveEnv as rt, StarsDevCommandsConfig as s, LATEST_COMPATIBILITY_VERSION as st, defineConfig as t, resolveHooks as tt, StarsEnvConfig as u, STARS_CONFIG_TSDOWN_VERSION as ut, StarsTsdownConfig as v, StarsHookName as w, StarsTypechecker as x, StarsTunnelConfig as y, ResolvedCodegenConfig as z };
|
|
886
|
+
//# sourceMappingURL=config-CMYQZ7XK.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-CMYQZ7XK.d.ts","names":[],"sources":["../../src/types/modules.ts","../../src/config/validator.ts","../../src/config/compatibility.ts","../../src/config/env.ts","../../src/config/hooks.ts","../../src/config/resolve.ts","../../src/types/builder.ts","../../src/types/hooks.ts","../../src/types/config.ts","../../src/config.ts"],"mappings":";;;;;;;;KAKY,sCAAsC,mBAAmB,UAAU;;UAG9D;;WAEP;;WAEA,SAAS,SAAS;;;;;;;;UASX;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B;EAA4B;;;;;;;EAOlD;;;;;;;;;;;EAWA;EACA;;EAGA;EACA;;;;;;;;;;;;;EAaA;;EAEA,QAAQ;;;;;;;UAQM;;;;;;EAMhB;;EAEA;;EAEA;;;;;;;EAOA;;EAEA;;;;;EAKA;;;;;;;UAQgB,uBAAuB;;EAEvC;;UAGgB;;;;;EAKhB;;;;;EAKA;EACA,QAAQ;EACR,MAAM;EACN,UAAU;;;;;;EAMV,UAAU;;;;;EAKV,MAAM;;;;;EAKN,QAAQ;;;;;;;EAOR,oBAAoB;;EAEpB,eAAe;;EAEf,SAAS;;;;;EAKT,OAAO;;;;;EAKP,SAAS;;;;;;;;;;;;;;;;;iBCtfM,aAAa,QAAQ,cAAc"}
|
package/dist/esm/config.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
export { type StarsBuildConfig, type StarsBuildTool, type StarsCodegenConfig, type StarsCompatibilityVersion, type StarsConfig, type StarsDevConfig, type StarsEnvConfig, type StarsEnvSetupOptions, type StarsExperimentalConfig, type StarsFutureConfig, type StarsI18nCodegenConfig, type StarsImportsConfig, type StarsNitroConfig, type StarsTsdownConfig, type StarsTunnelConfig, type StarsTypecheckConfig, type StarsTypechecker, type StarsViteConfig, defineConfig };
|
|
1
|
+
import { S as StarsViteConfig, _ as StarsNitroConfig, a as StarsCompatibilityVersion, b as StarsTypecheckConfig, c as StarsDevConfig, d as StarsEnvSetupOptions, f as StarsExperimentalConfig, g as StarsLogLevel, h as StarsImportsConfig, i as StarsCodegenConfig, l as StarsDevLogsConfig, m as StarsI18nCodegenConfig, n as StarsBuildConfig, o as StarsConfig, p as StarsFutureConfig, r as StarsBuildTool, s as StarsDevCommandsConfig, t as defineConfig, u as StarsEnvConfig, v as StarsTsdownConfig, x as StarsTypechecker, y as StarsTunnelConfig } from "./config-CMYQZ7XK.js";
|
|
2
|
+
export { type StarsBuildConfig, type StarsBuildTool, type StarsCodegenConfig, type StarsCompatibilityVersion, type StarsConfig, type StarsDevCommandsConfig, type StarsDevConfig, type StarsDevLogsConfig, type StarsEnvConfig, type StarsEnvSetupOptions, type StarsExperimentalConfig, type StarsFutureConfig, type StarsI18nCodegenConfig, type StarsImportsConfig, type StarsLogLevel, type StarsNitroConfig, type StarsTsdownConfig, type StarsTunnelConfig, type StarsTypecheckConfig, type StarsTypechecker, type StarsViteConfig, defineConfig };
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as ResolvedHooksConfig, A as Builder, B as ResolvedDevCommandsConfig, C as PrepareProjectResult, D as StarsHooksConfig, E as StarsHooks, F as LOG_LEVELS, G as ResolvedImportsConfig, H as ResolvedDevLogsConfig, I as PackageJsonLike, J as ResolvedTunnelConfig, K as ResolvedNitroConfig, L as ResolveConfigOptions, M as BuilderEvents, N as BuilderLogLevel, O as StarsRestartReason, P as DEFAULT_LOG_LEVELS, Q as resolveStarsConfig, R as ResolvedBuildConfig, S as StarsViteConfig, T as StarsHookNamespace, U as ResolvedExperimentalConfig, V as ResolvedDevConfig, W as ResolvedI18nCodegenConfig, X as displayPath, Y as ResolvedTypecheckConfig, Z as readProjectEnvFiles, _ as StarsNitroConfig, _t as StarsModuleEntry, a as StarsCompatibilityVersion, at as DEFAULT_COMPATIBILITY_VERSION, b as StarsTypecheckConfig, c as StarsDevConfig, ct as LEGACY_COMPATIBILITY_VERSION, d as StarsEnvSetupOptions, dt as Validator, et as STARS_HOOK_NAMES, f as StarsExperimentalConfig, ft as EMPTY_MODULES_RUNTIME, g as StarsLogLevel, gt as RuntimePluginRegistration, h as StarsImportsConfig, ht as ResolvedModuleEntry, i as StarsCodegenConfig, it as AUTO_ENV_VERSION, j as BuilderContext, k as BuildOutcome, l as StarsDevLogsConfig, lt as ResolvedFutureConfig, m as StarsI18nCodegenConfig, mt as ModulesRuntime, n as StarsBuildConfig, nt as ResolvedEnvConfig, o as StarsConfig, ot as EOL_COMPATIBILITY_VERSIONS, p as StarsFutureConfig, pt as InstalledModule, q as ResolvedStarsConfig, r as StarsBuildTool, rt as resolveEnv, s as StarsDevCommandsConfig, st as LATEST_COMPATIBILITY_VERSION, t as defineConfig, tt as resolveHooks, u as StarsEnvConfig, ut as STARS_CONFIG_TSDOWN_VERSION, v as StarsTsdownConfig, w as StarsHookName, x as StarsTypechecker, y as StarsTunnelConfig, z as ResolvedCodegenConfig } from "./config-CMYQZ7XK.js";
|
|
2
2
|
//#region src/config/load.d.ts
|
|
3
3
|
export declare const CONFIG_EXTENSIONS: readonly ['ts', 'mts', 'cts', 'js', 'mjs', 'cjs'];
|
|
4
4
|
export declare const CONFIG_FILE_NAMES: string[];
|
|
@@ -255,6 +255,18 @@ export declare const configDiagnostics: import("nostics").Diagnostics<{
|
|
|
255
255
|
url: string;
|
|
256
256
|
}) => string;
|
|
257
257
|
};
|
|
258
|
+
readonly INVALID_CHOICE: {
|
|
259
|
+
why: (p: {
|
|
260
|
+
path: string;
|
|
261
|
+
value: string;
|
|
262
|
+
allowed: string;
|
|
263
|
+
}) => string;
|
|
264
|
+
fix: (p: {
|
|
265
|
+
path: string;
|
|
266
|
+
value: string;
|
|
267
|
+
allowed: string;
|
|
268
|
+
}) => string;
|
|
269
|
+
};
|
|
258
270
|
readonly INVALID_TYPECHECKER: {
|
|
259
271
|
why: (p: {
|
|
260
272
|
checker: string;
|
|
@@ -316,5 +328,5 @@ export interface LoadStarsConfigOptions {
|
|
|
316
328
|
*/
|
|
317
329
|
export declare function loadStarsConfig(options?: LoadStarsConfigOptions): Promise<ResolvedStarsConfig>;
|
|
318
330
|
//#endregion
|
|
319
|
-
export { AUTO_ENV_VERSION, type BuildOutcome, type Builder, type BuilderContext, type BuilderEvents, type BuilderLogLevel, type ConfigDiagnosticCode, DEFAULT_COMPATIBILITY_VERSION, EMPTY_MODULES_RUNTIME, EOL_COMPATIBILITY_VERSIONS, type InstalledModule, LATEST_COMPATIBILITY_VERSION, LEGACY_COMPATIBILITY_VERSION, type LoadConfigFileOptions, type LoadedConfigFile, type ModulesRuntime, type PackageJsonLike, type PrepareProjectResult, type ResolveConfigOptions, type ResolvedBuildConfig, type ResolvedCodegenConfig, type ResolvedDevConfig, type ResolvedEnvConfig, type ResolvedExperimentalConfig, type ResolvedFutureConfig, type ResolvedHooksConfig, type ResolvedI18nCodegenConfig, type ResolvedImportsConfig, type ResolvedModuleEntry, type ResolvedNitroConfig, type ResolvedStarsConfig, type ResolvedTunnelConfig, type ResolvedTypecheckConfig, type RuntimePluginRegistration, STARS_CONFIG_TSDOWN_VERSION, STARS_HOOK_NAMES, type StarsBuildConfig, type StarsBuildTool, type StarsCodegenConfig, type StarsCompatibilityVersion, type StarsConfig, type StarsDevConfig, type StarsEnvConfig, type StarsEnvSetupOptions, type StarsExperimentalConfig, type StarsFutureConfig, type StarsHookName, type StarsHookNamespace, type StarsHooks, type StarsHooksConfig, type StarsI18nCodegenConfig, type StarsImportsConfig, type StarsModuleEntry, type StarsNitroConfig, type StarsRestartReason, type StarsTsdownConfig, type StarsTunnelConfig, type StarsTypecheckConfig, type StarsTypechecker, type StarsViteConfig, defineConfig, displayPath, readProjectEnvFiles, resolveEnv, resolveHooks, resolveStarsConfig };
|
|
331
|
+
export { AUTO_ENV_VERSION, type BuildOutcome, type Builder, type BuilderContext, type BuilderEvents, type BuilderLogLevel, type ConfigDiagnosticCode, DEFAULT_COMPATIBILITY_VERSION, DEFAULT_LOG_LEVELS, EMPTY_MODULES_RUNTIME, EOL_COMPATIBILITY_VERSIONS, type InstalledModule, LATEST_COMPATIBILITY_VERSION, LEGACY_COMPATIBILITY_VERSION, LOG_LEVELS, type LoadConfigFileOptions, type LoadedConfigFile, type ModulesRuntime, type PackageJsonLike, type PrepareProjectResult, type ResolveConfigOptions, type ResolvedBuildConfig, type ResolvedCodegenConfig, type ResolvedDevCommandsConfig, type ResolvedDevConfig, type ResolvedDevLogsConfig, type ResolvedEnvConfig, type ResolvedExperimentalConfig, type ResolvedFutureConfig, type ResolvedHooksConfig, type ResolvedI18nCodegenConfig, type ResolvedImportsConfig, type ResolvedModuleEntry, type ResolvedNitroConfig, type ResolvedStarsConfig, type ResolvedTunnelConfig, type ResolvedTypecheckConfig, type RuntimePluginRegistration, STARS_CONFIG_TSDOWN_VERSION, STARS_HOOK_NAMES, type StarsBuildConfig, type StarsBuildTool, type StarsCodegenConfig, type StarsCompatibilityVersion, type StarsConfig, type StarsDevCommandsConfig, type StarsDevConfig, type StarsDevLogsConfig, type StarsEnvConfig, type StarsEnvSetupOptions, type StarsExperimentalConfig, type StarsFutureConfig, type StarsHookName, type StarsHookNamespace, type StarsHooks, type StarsHooksConfig, type StarsI18nCodegenConfig, type StarsImportsConfig, type StarsLogLevel, type StarsModuleEntry, type StarsNitroConfig, type StarsRestartReason, type StarsTsdownConfig, type StarsTunnelConfig, type StarsTypecheckConfig, type StarsTypechecker, type StarsViteConfig, defineConfig, displayPath, readProjectEnvFiles, resolveEnv, resolveHooks, resolveStarsConfig };
|
|
320
332
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/config/load.ts","../../src/config/errors.ts","../../src/config/modules.ts","../../src/config/index.ts"],"mappings":";;qBAKa;qBACA;UAEI;;EAEhB;;EAEA;;UAGgB;;EAEhB;EACA,QAAQ;;;;;wBAMO,mBAAmB;;;;;wBAab,eAAe,SAAS,wBAAwB,QAAQ;;;;;;;;;;;;;;;;;;;qBCnBjE,qCAAiB;;IAK3B,MAAG;MAAQ;;IACX,MAAG;MAAS;;;;IAGZ,MAAG;MAAQ;MAAc;;IACzB,MAAG;MAAS;MAAc;;;;IAG1B,MAAG;MAAQ;;IACX,MAAG;MAAS;;;;IAGZ,MAAG;MAAQ;MAAc;;IACzB,MAAG;MAAQ;MAAc;;;;IAGzB,MAAG;MAAQ;;IACX,MAAG;MAAS;;;;IAGZ,MAAG;MAAQ;MAA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G3C,MAAG;IACH,MAAG;;;IAGH,MAAG;IACH,MAAG;;;IAGH,MAAG;MAAQ;;IACX,MAAG;MAAS;;;;IAGZ,MAAG;MAAQ;MAAa;;IACxB,MAAG;MAAQ;MAAa;;;;IAGxB,MAAG;MAAQ;;IACX,MAAG;MAAS;;;;IAGZ,MAAG;MAAQ;MAAc;MAAe;;IACxC,MAAG;MAAQ;MAAc;MAAe;;;;IAGxC,MAAG;MAAQ;;IACX,MAAG;MAAS;;;;IAGZ,MAAG;MAAQ;MAAc;MAAa;;IACtC,MAAG;MAAQ;MAAc;MAAa;;;;IAGtC,MAAG;MAAQ;;IACX,MAAG;MAAS;;;;IAGZ,MAAG;IACH,MAAG;;;KAKM,oCAAoC;;;;wBCxIhC,eAAe,iBAAiB,WAAW,qBAAqB;;;iBCJ/D;;;;;EAKhB;;EAEA;;;;;EAKA,MAAM,OAAO;;;;;;;wBAQQ,gBAAgB,UAAS,yBAA8B,QAAQ"}
|
package/dist/esm/index.js
CHANGED
|
@@ -116,6 +116,10 @@ const configDiagnostics = defineDiagnostics({
|
|
|
116
116
|
why: (p) => `The tunnel URL must be https, received "${p.url}"`,
|
|
117
117
|
fix: (_p) => "Discord only accepts an https interactions endpoint."
|
|
118
118
|
},
|
|
119
|
+
INVALID_CHOICE: {
|
|
120
|
+
why: (p) => `Unknown value "${p.value}" for \`${p.path}\``,
|
|
121
|
+
fix: (p) => `Use one of ${p.allowed}.`
|
|
122
|
+
},
|
|
119
123
|
INVALID_TYPECHECKER: {
|
|
120
124
|
why: (p) => `Unknown type checker "${p.checker}"`,
|
|
121
125
|
fix: (_p) => "Use one of 'tsc', 'golar', 'tsz' or 'auto'."
|
|
@@ -272,7 +276,11 @@ function resolveFuture(config, validator, warnings) {
|
|
|
272
276
|
//#endregion
|
|
273
277
|
//#region src/config/env.ts
|
|
274
278
|
const ENV_UTILITIES = "@wolfstar/env-utilities";
|
|
275
|
-
const LOADERS = /* @__PURE__ */ new Set([
|
|
279
|
+
const LOADERS = /* @__PURE__ */ new Set([
|
|
280
|
+
"node",
|
|
281
|
+
"dotenv",
|
|
282
|
+
"varlock"
|
|
283
|
+
]);
|
|
276
284
|
/**
|
|
277
285
|
* Resolves the `env` block. It is on by default from {@link AUTO_ENV_VERSION} on, but only when the project depends on
|
|
278
286
|
* `@wolfstar/env-utilities` (the module the built entry imports) and does not build through Nitro, whose serverless
|
|
@@ -305,7 +313,7 @@ function resolveEnv(config, packageJson, future, experimental, validator) {
|
|
|
305
313
|
if (prefix !== void 0) options.prefix = prefix;
|
|
306
314
|
const loader = validator.string(raw.loader, "env.loader");
|
|
307
315
|
if (loader !== void 0) {
|
|
308
|
-
if (!LOADERS.has(loader)) throw validator.typeError("env.loader", "'dotenv' or 'varlock'", loader, "Use 'dotenv'
|
|
316
|
+
if (!LOADERS.has(loader)) throw validator.typeError("env.loader", "'node', 'dotenv' or 'varlock'", loader, "Use 'node', 'dotenv' or 'varlock', or leave it out to have it detected.");
|
|
309
317
|
options.loader = loader;
|
|
310
318
|
}
|
|
311
319
|
const debug = validator.boolean(raw.debug, "env.debug");
|
|
@@ -501,6 +509,22 @@ const DEFAULT_IMPORTS_PRESETS = [
|
|
|
501
509
|
const DEFAULT_IMPORTS_DTS = ".stars/imports.d.ts";
|
|
502
510
|
const DEFAULT_DEV_LOG_FILE = ".stars/dev.log";
|
|
503
511
|
const DEFAULT_TUNNEL_PATH = "/";
|
|
512
|
+
/** Every level `dev.logs.levels` accepts, from the most verbose to the most severe. */
|
|
513
|
+
const LOG_LEVELS = [
|
|
514
|
+
"trace",
|
|
515
|
+
"debug",
|
|
516
|
+
"info",
|
|
517
|
+
"warn",
|
|
518
|
+
"error"
|
|
519
|
+
];
|
|
520
|
+
/** `trace` is the per-request noise: it starts hidden, and the dev UI turns it on. */
|
|
521
|
+
const DEFAULT_LOG_LEVELS = [
|
|
522
|
+
"error",
|
|
523
|
+
"warn",
|
|
524
|
+
"info",
|
|
525
|
+
"debug"
|
|
526
|
+
];
|
|
527
|
+
const DEFAULT_LOGS_KEEP = 10;
|
|
504
528
|
const BUILD_TOOLS = /* @__PURE__ */ new Set([
|
|
505
529
|
"tsdown",
|
|
506
530
|
"tsc",
|
|
@@ -514,6 +538,16 @@ const TYPECHECKERS = /* @__PURE__ */ new Set([
|
|
|
514
538
|
"tsz",
|
|
515
539
|
"auto"
|
|
516
540
|
]);
|
|
541
|
+
const DEV_LAYOUTS = [
|
|
542
|
+
"auto",
|
|
543
|
+
"dashboard",
|
|
544
|
+
"panel"
|
|
545
|
+
];
|
|
546
|
+
const COMMAND_REFRESH_MODES = [
|
|
547
|
+
"prompt",
|
|
548
|
+
"auto",
|
|
549
|
+
"off"
|
|
550
|
+
];
|
|
517
551
|
const VITE_CONFIG_FILES = [
|
|
518
552
|
"vite.config.ts",
|
|
519
553
|
"vite.config.mts",
|
|
@@ -787,6 +821,10 @@ function readDevPortFromEnvFile(root, environment, envOptions, projectEnv) {
|
|
|
787
821
|
function resolveDev(root, entry, packageJson, config, env, envOptions, projectEnv, validator) {
|
|
788
822
|
validator.knownKeys(config, "dev", [
|
|
789
823
|
"banner",
|
|
824
|
+
"layout",
|
|
825
|
+
"logs",
|
|
826
|
+
"commands",
|
|
827
|
+
"hmr",
|
|
790
828
|
"watch",
|
|
791
829
|
"ignore",
|
|
792
830
|
"debounce",
|
|
@@ -825,6 +863,10 @@ function resolveDev(root, entry, packageJson, config, env, envOptions, projectEn
|
|
|
825
863
|
const tunnel = resolveTunnel(config.tunnel, validator);
|
|
826
864
|
const logFile = config.logFile === false ? null : resolve(root, validator.string(config.logFile, "dev.logFile") ?? ".stars/dev.log");
|
|
827
865
|
const banner = config.banner === false ? false : typeof config.banner === "string" ? config.banner.split("\n") : validator.stringArray(config.banner, "dev.banner") ?? null;
|
|
866
|
+
const layout = oneOf(validator.string(config.layout, "dev.layout"), "dev.layout", DEV_LAYOUTS, validator) ?? "auto";
|
|
867
|
+
const logs = resolveDevLogs(root, config.logs, validator);
|
|
868
|
+
const commands = resolveDevCommands(config.commands, validator);
|
|
869
|
+
const hmr = validator.boolean(config.hmr, "dev.hmr") ?? true;
|
|
828
870
|
return {
|
|
829
871
|
watch,
|
|
830
872
|
ignore,
|
|
@@ -838,9 +880,59 @@ function resolveDev(root, entry, packageJson, config, env, envOptions, projectEn
|
|
|
838
880
|
typecheck,
|
|
839
881
|
tunnel,
|
|
840
882
|
logFile,
|
|
841
|
-
banner
|
|
883
|
+
banner,
|
|
884
|
+
layout,
|
|
885
|
+
logs,
|
|
886
|
+
commands,
|
|
887
|
+
hmr
|
|
842
888
|
};
|
|
843
889
|
}
|
|
890
|
+
/** A string option limited to a fixed set of values. */
|
|
891
|
+
function oneOf(value, path, allowed, validator) {
|
|
892
|
+
if (value === void 0) return void 0;
|
|
893
|
+
if (allowed.includes(value)) return value;
|
|
894
|
+
throw validator.error(configDiagnostics.INVALID_CHOICE, {
|
|
895
|
+
path,
|
|
896
|
+
value,
|
|
897
|
+
allowed: allowed.map((item) => `'${item}'`).join(", ")
|
|
898
|
+
});
|
|
899
|
+
}
|
|
900
|
+
/**
|
|
901
|
+
* Resolves `dev.logs`: which channels and levels the dev UI starts with (the log file is never filtered), and the
|
|
902
|
+
* optional directory of per-run log files.
|
|
903
|
+
*/
|
|
904
|
+
function resolveDevLogs(root, config, validator) {
|
|
905
|
+
if (config === void 0) return {
|
|
906
|
+
channels: null,
|
|
907
|
+
levels: [...DEFAULT_LOG_LEVELS],
|
|
908
|
+
dir: null,
|
|
909
|
+
keep: 10
|
|
910
|
+
};
|
|
911
|
+
if (config === null || typeof config !== "object" || Array.isArray(config)) throw validator.typeError("dev.logs", "an object", config, "Use `{ channels, levels, dir, keep }`.");
|
|
912
|
+
validator.knownKeys(config, "dev.logs", [
|
|
913
|
+
"channels",
|
|
914
|
+
"levels",
|
|
915
|
+
"dir",
|
|
916
|
+
"keep"
|
|
917
|
+
]);
|
|
918
|
+
const channels = validator.stringArray(config.channels, "dev.logs.channels") ?? null;
|
|
919
|
+
const levels = (validator.stringArray(config.levels, "dev.logs.levels") ?? [...DEFAULT_LOG_LEVELS]).map((level, index) => oneOf(level, `dev.logs.levels[${index}]`, LOG_LEVELS, validator));
|
|
920
|
+
const dir = config.dir === false || config.dir === void 0 ? null : resolve(root, validator.string(config.dir, "dev.logs.dir"));
|
|
921
|
+
const keep = validator.nonNegativeNumber(config.keep, "dev.logs.keep") ?? 10;
|
|
922
|
+
if (!Number.isInteger(keep) || keep < 1) throw validator.typeError("dev.logs.keep", "a positive integer", config.keep);
|
|
923
|
+
return {
|
|
924
|
+
channels,
|
|
925
|
+
levels,
|
|
926
|
+
dir,
|
|
927
|
+
keep
|
|
928
|
+
};
|
|
929
|
+
}
|
|
930
|
+
function resolveDevCommands(config, validator) {
|
|
931
|
+
if (config === void 0) return { refresh: "prompt" };
|
|
932
|
+
if (config === null || typeof config !== "object" || Array.isArray(config)) throw validator.typeError("dev.commands", "an object", config, "Use `{ refresh: 'prompt' | 'auto' | 'off' }`.");
|
|
933
|
+
validator.knownKeys(config, "dev.commands", ["refresh"]);
|
|
934
|
+
return { refresh: oneOf(validator.string(config.refresh, "dev.commands.refresh"), "dev.commands.refresh", COMMAND_REFRESH_MODES, validator) ?? "prompt" };
|
|
935
|
+
}
|
|
844
936
|
/**
|
|
845
937
|
* Resolves `dev.typecheck`. The tsconfig is looked up the same way the `tsc` build tool looks up its own, so a
|
|
846
938
|
* project building with `tsdown` still gets `tsc --watch --noEmit` on the right project file.
|
|
@@ -1053,5 +1145,5 @@ async function loadStarsConfig(options = {}) {
|
|
|
1053
1145
|
}
|
|
1054
1146
|
|
|
1055
1147
|
//#endregion
|
|
1056
|
-
export { AUTO_ENV_VERSION, CONFIG_EXTENSIONS, CONFIG_FILE_NAMES, DEFAULT_COMPATIBILITY_VERSION, EMPTY_MODULES_RUNTIME, EOL_COMPATIBILITY_VERSIONS, LATEST_COMPATIBILITY_VERSION, LEGACY_COMPATIBILITY_VERSION, STARS_CONFIG_TSDOWN_VERSION, STARS_HOOK_NAMES, configDiagnostics, defineConfig, discoverConfigFile, displayPath, loadConfigFile, loadStarsConfig, readProjectEnvFiles, resolveEnv, resolveHooks, resolveModules, resolveStarsConfig };
|
|
1148
|
+
export { AUTO_ENV_VERSION, CONFIG_EXTENSIONS, CONFIG_FILE_NAMES, DEFAULT_COMPATIBILITY_VERSION, DEFAULT_LOG_LEVELS, EMPTY_MODULES_RUNTIME, EOL_COMPATIBILITY_VERSIONS, LATEST_COMPATIBILITY_VERSION, LEGACY_COMPATIBILITY_VERSION, LOG_LEVELS, STARS_CONFIG_TSDOWN_VERSION, STARS_HOOK_NAMES, configDiagnostics, defineConfig, discoverConfigFile, displayPath, loadConfigFile, loadStarsConfig, readProjectEnvFiles, resolveEnv, resolveHooks, resolveModules, resolveStarsConfig };
|
|
1057
1149
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["isFile"],"sources":["../../src/config/errors.ts","../../src/config/load.ts","../../src/types/modules.ts","../../src/config/compatibility.ts","../../src/config/env.ts","../../src/config/hooks.ts","../../src/config/modules.ts","../../src/config/validator.ts","../../src/config/resolve.ts","../../src/config/index.ts"],"sourcesContent":["import { defineDiagnostics } from 'nostics';\n\n/**\n * Structured, stable diagnostic codes for every way a `stars.config.*` can fail to load or validate.\n *\n * This is a plain data error (no exit code or terminal formatting), so nothing here reports anywhere on its own —\n * `reporters` stays empty and each call only builds and returns a `Diagnostic`. That keeps it meaningful outside a\n * CLI, e.g. for a dashboard or test that calls {@link loadStarsConfig} directly; `@wolfstar/cli` is what renders it\n * and picks an exit code (`exitCodeOf`).\n *\n * The `sources` field (populated with the configuration file, when there is one) carries the \"which file\" grounding\n * `ConfigError` used to expose as `.file`; the \"which option\" grounding it exposed as `.path` is folded directly into\n * every `why`/`fix` message instead, the way every other diagnostic code already reads.\n *\n * `why` and `fix` are always given the same, fully-typed params object (even when one of them ignores part of it):\n * a bare `() => value` loses nostics' param-type inference (a zero-arg function widens to `unknown` params), so every\n * entry here spells out its shape on both sides instead.\n */\nexport const configDiagnostics = defineDiagnostics({\n\tdocsBase: (code) => `https://stars-components.js.org/docs/config/errors#${code.toLowerCase()}`,\n\treporters: [],\n\tcodes: {\n\t\tROOT_NOT_FOUND: {\n\t\t\twhy: (p: { root: string }) => `The project root does not exist: ${p.root}`,\n\t\t\tfix: (_p: { root: string }) => 'Point `root` to an existing directory, relative to the configuration file.'\n\t\t},\n\t\tPACKAGE_JSON_INVALID: {\n\t\t\twhy: (p: { file: string; message: string }) => `Failed to parse ${p.file}: ${p.message}`,\n\t\t\tfix: (_p: { file: string; message: string }) => 'Fix the JSON syntax of the package.json file.'\n\t\t},\n\t\tENTRY_NOT_FOUND: {\n\t\t\twhy: (p: { entry: string }) => `The entry file does not exist: ${p.entry}`,\n\t\t\tfix: (_p: { entry: string }) => 'Point `entry` to the file that starts the bot, relative to the project root.'\n\t\t},\n\t\tENTRY_DEFAULT_NOT_FOUND: {\n\t\t\twhy: (p: { root: string; defaults: string }) => `Could not find the entry file in ${p.root}`,\n\t\t\tfix: (p: { root: string; defaults: string }) => `Set \\`entry\\` in the configuration, or create one of ${p.defaults}.`\n\t\t},\n\t\tINVALID_BUILD_TOOL: {\n\t\t\twhy: (p: { tool: string }) => `Unknown build tool \"${p.tool}\"`,\n\t\t\tfix: (_p: { tool: string }) => \"Use one of 'tsdown', 'tsc', 'vite', 'none' or 'auto'.\"\n\t\t},\n\t\tEXPERIMENTAL_BUILD_TOOL: {\n\t\t\twhy: (p: { tool: string; flag: string }) => `The '${p.tool}' build tool is experimental`,\n\t\t\tfix: (p: { tool: string; flag: string }) => `Set \\`${p.flag}\\` to true to use it.`\n\t\t},\n\t\tBUILD_TOOL_REQUIRED: {\n\t\t\twhy: (p: { entry: string }) => `The entry ${p.entry} is TypeScript but the build tool is 'none'`,\n\t\t\tfix: (_p: { entry: string }) => \"Set `build.tool` to 'tsdown' or 'tsc', or point `entry` to a JavaScript file.\"\n\t\t},\n\t\tTSCONFIG_EXPLICIT_NOT_FOUND: {\n\t\t\twhy: (p: { tsconfig: string; path: string }) => `The tsconfig file does not exist: ${p.tsconfig}`,\n\t\t\tfix: (p: { tsconfig: string; path: string }) => `Point \\`${p.path}\\` to an existing tsconfig.json, relative to the project root.`\n\t\t},\n\t\tTSCONFIG_NOT_FOUND: {\n\t\t\twhy: (p: { root: string; suggestion: string }) => `Could not find a tsconfig.json in ${p.root}`,\n\t\t\tfix: (p: { root: string; suggestion: string }) => `Create src/tsconfig.json or tsconfig.json, or set \\`${p.suggestion}\\`.`\n\t\t},\n\t\tTSDOWN_OPTIONS_REQUIRE_TSDOWN: {\n\t\t\twhy: (_p: { tool: string }) => '`tsdown` options need the `tsdown` build tool',\n\t\t\tfix: (p: { tool: string }) => `Set \\`build.tool\\` to 'tsdown', or remove \\`tsdown\\` (the build tool is '${p.tool}').`\n\t\t},\n\t\tVITE_OPTIONS_REQUIRE_VITE: {\n\t\t\twhy: (_p: { tool: string }) => '`vite` options need the `vite` build tool',\n\t\t\tfix: (p: { tool: string }) =>\n\t\t\t\t`Set \\`build.tool\\` to 'vite' with \\`experimental.enableVite\\`, or remove \\`vite\\` (the build tool is '${p.tool}').`\n\t\t},\n\t\tTSDOWN_CONFIG_FILE_UNSUPPORTED: {\n\t\t\twhy: (p: { file: string; version: number; legacyVersion: number }) => `\\`${p.file}\\` is not used with compatibility version ${p.version}`,\n\t\t\tfix: (p: { file: string; version: number; legacyVersion: number }) =>\n\t\t\t\t`Move its options into \\`tsdown\\` here and drop ${p.file}. \\`future.compatibilityVersion\\` ${p.legacyVersion} still loads it, but is end-of-life.`\n\t\t},\n\t\tINVALID_TYPE: {\n\t\t\twhy: (p: { path: string; expected: string; value: unknown; fix: string }) =>\n\t\t\t\t`\\`${p.path}\\` must be ${p.expected}, received ${describeValue(p.value)}`,\n\t\t\tfix: (p: { path: string; expected: string; value: unknown; fix: string }) => p.fix\n\t\t},\n\t\tINVALID_COMPATIBILITY_VERSION: {\n\t\t\twhy: (p: { value: unknown; supported: string; latestVersion: number }) => `Unknown compatibility version ${describeValue(p.value)}`,\n\t\t\tfix: (p: { value: unknown; supported: string; latestVersion: number }) =>\n\t\t\t\t`Use one of ${p.supported}; ${p.latestVersion} carries today's defaults.`\n\t\t},\n\t\tCOMPATIBILITY_VERSION_EOL: {\n\t\t\twhy: (p: { version: number; latestVersion: number }) =>\n\t\t\t\t`Compatibility version ${p.version} is end-of-life and will be removed in the next major`,\n\t\t\tfix: (p: { version: number; latestVersion: number }) =>\n\t\t\t\t`Move the options of your tsdown.config.* into \\`tsdown\\` in stars.config, delete that file, then set \\`future.compatibilityVersion\\` to ${p.latestVersion} (or remove it).`\n\t\t},\n\t\tUNKNOWN_OPTION: {\n\t\t\twhy: (p: { path: string; parent: string; known: string }) => `Unknown option \\`${p.path}\\``,\n\t\t\tfix: (p: { path: string; parent: string; known: string }) => `Known options${p.parent ? ` of \\`${p.parent}\\`` : ''}: ${p.known}.`\n\t\t},\n\t\tUNKNOWN_HOOK: {\n\t\t\twhy: (p: { name: string; known: string }) => `Unknown hook \\`${p.name}\\``,\n\t\t\tfix: (p: { name: string; known: string }) => `Known hooks: ${p.known}.`\n\t\t},\n\t\tEXPERIMENT_REQUIRED: {\n\t\t\twhy: (p: { path: string; requires: string; drop: string }) => `\\`${p.path}\\` needs \\`${p.requires}\\``,\n\t\t\tfix: (p: { path: string; requires: string; drop: string }) => `Set \\`${p.requires}\\` to true as well, or drop \\`${p.drop}\\`.`\n\t\t},\n\t\tIMPORTS_REQUIRE_TSDOWN: {\n\t\t\twhy: (_p: {}) => '`imports` requires the `tsdown` build tool',\n\t\t\tfix: (_p: {}) => \"Set `build.tool` to 'tsdown', or remove `imports`/set it to `false`.\"\n\t\t},\n\t\tENV_REQUIRES_ENV_UTILITIES: {\n\t\t\twhy: (_p: {}) => '`env` is enabled, but the project does not depend on `@wolfstar/env-utilities`',\n\t\t\tfix: (_p: {}) => 'Install it with `pnpm add @wolfstar/env-utilities`, or set `env` to `false`.'\n\t\t},\n\t\tLOCALES_NOT_FOUND: {\n\t\t\twhy: (p: { locales: string }) => `The locales directory does not exist: ${p.locales}`,\n\t\t\tfix: (_p: { locales: string }) => 'Point `codegen.i18n.locales` to the base locale directory, relative to the project root.'\n\t\t},\n\t\tINVALID_URL: {\n\t\t\twhy: (p: { url: string; fix: string }) => `Invalid URL \"${p.url}\"`,\n\t\t\tfix: (p: { url: string; fix: string }) => p.fix\n\t\t},\n\t\tTUNNEL_URL_NOT_HTTPS: {\n\t\t\twhy: (p: { url: string }) => `The tunnel URL must be https, received \"${p.url}\"`,\n\t\t\tfix: (_p: { url: string }) => 'Discord only accepts an https interactions endpoint.'\n\t\t},\n\t\tINVALID_TYPECHECKER: {\n\t\t\twhy: (p: { checker: string }) => `Unknown type checker \"${p.checker}\"`,\n\t\t\tfix: (_p: { checker: string }) => \"Use one of 'tsc', 'golar', 'tsz' or 'auto'.\"\n\t\t},\n\t\tCONFIG_NOT_FOUND: {\n\t\t\twhy: (p: { file: string; cwd: string; names: string }) => `Configuration file not found: ${p.file}`,\n\t\t\tfix: (p: { file: string; cwd: string; names: string }) => `Pass an existing file to --config, or create one of ${p.names} in ${p.cwd}.`\n\t\t},\n\t\tCONFIG_LOAD_FAILED: {\n\t\t\twhy: (p: { message: string }) => `Failed to load the configuration: ${p.message}`,\n\t\t\tfix: (_p: { message: string }) => 'The file must be valid TypeScript/JavaScript and export the configuration as its default export.'\n\t\t},\n\t\tCONFIG_NOT_OBJECT: {\n\t\t\twhy: (_p: {}) => 'The configuration file must export an object as its default export.',\n\t\t\tfix: (_p: {}) => \"Use `export default defineConfig({ ... })` from '@wolfstar/http-framework/config'.\"\n\t\t}\n\t}\n});\n\nexport type ConfigDiagnosticCode = keyof typeof configDiagnostics;\n\nfunction describeValue(value: unknown): string {\n\tif (value === null) return 'null';\n\tif (Array.isArray(value)) return 'an array';\n\tif (typeof value === 'string') return `\"${value}\"`;\n\treturn typeof value === 'object' ? 'an object' : `${typeof value} ${String(value)}`;\n}\n","import { existsSync, statSync } from 'node:fs';\nimport { basename, dirname, join, resolve } from 'node:path';\nimport type { StarsConfig } from '../types/config.js';\nimport { configDiagnostics } from './errors.js';\n\nexport const CONFIG_EXTENSIONS = ['ts', 'mts', 'cts', 'js', 'mjs', 'cjs'] as const;\nexport const CONFIG_FILE_NAMES = CONFIG_EXTENSIONS.map((extension) => `stars.config.${extension}`);\n\nexport interface LoadConfigFileOptions {\n\t/** The directory to discover the configuration file from. */\n\tcwd: string;\n\t/** An explicit configuration file (`--config`), resolved from `cwd`. */\n\tconfigFile?: string | null;\n}\n\nexport interface LoadedConfigFile {\n\t/** The absolute path of the loaded file, `null` when running on defaults. */\n\tconfigFile: string | null;\n\tconfig: StarsConfig;\n}\n\n/**\n * Finds the first `stars.config.*` file in `cwd`, in {@link CONFIG_FILE_NAMES} order.\n */\nexport function discoverConfigFile(cwd: string): string | null {\n\tfor (const name of CONFIG_FILE_NAMES) {\n\t\tconst candidate = join(cwd, name);\n\t\tif (isFile(candidate)) return candidate;\n\t}\n\n\treturn null;\n}\n\n/**\n * Loads the raw configuration object. The loader (`c12`) is imported lazily so\n * commands that never touch the configuration stay fast.\n */\nexport async function loadConfigFile(options: LoadConfigFileOptions): Promise<LoadedConfigFile> {\n\tconst cwd = resolve(options.cwd);\n\tlet file: string | null;\n\n\tif (options.configFile) {\n\t\tfile = resolve(cwd, options.configFile);\n\t\tif (!isFile(file)) {\n\t\t\tthrow configDiagnostics.CONFIG_NOT_FOUND({ file, cwd, names: CONFIG_FILE_NAMES.join(', ') });\n\t\t}\n\t} else {\n\t\tfile = discoverConfigFile(cwd);\n\t\tif (!file) return { configFile: null, config: {} };\n\t}\n\n\tconst { loadConfig } = await import('c12');\n\n\tlet loaded: unknown;\n\ttry {\n\t\tconst result = await loadConfig<StarsConfig>({\n\t\t\tname: 'stars',\n\t\t\tcwd: dirname(file),\n\t\t\tconfigFile: basename(file),\n\t\t\trcFile: false,\n\t\t\tglobalRc: false,\n\t\t\tdotenv: false,\n\t\t\tpackageJson: false,\n\t\t\tdefaults: {}\n\t\t});\n\t\t// c12 merges every layer with the defaults, which turns non-object exports into `{}`: inspect the raw layer.\n\t\tconst layer = result.layers?.find(\n\t\t\t(candidate) => candidate.configFile && resolve(candidate.cwd ?? dirname(file), candidate.configFile) === file\n\t\t);\n\t\tloaded = layer ? layer.config : result.config;\n\t} catch (error) {\n\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\tthrow configDiagnostics.CONFIG_LOAD_FAILED({ message, cause: error, sources: [file] });\n\t}\n\n\tif (loaded === null || typeof loaded !== 'object' || Array.isArray(loaded)) {\n\t\tthrow configDiagnostics.CONFIG_NOT_OBJECT({ sources: [file] });\n\t}\n\n\treturn { configFile: file, config: loaded as StarsConfig };\n}\n\nfunction isFile(path: string): boolean {\n\ttry {\n\t\treturn existsSync(path) && statSync(path).isFile();\n\t} catch {\n\t\treturn false;\n\t}\n}\n","/**\n * A module as listed in `modules` in `stars.config`: a package name (or a file path Node can import) on its own, or\n * a `[specifier, options]` tuple whose options are merged over the module's `defaults`. Falsy entries are dropped, so\n * `modules: [useCache && '@wolfstar/plugin-cache']` works.\n */\nexport type StarsModuleEntry = string | readonly [specifier: string, options?: Record<string, unknown>];\n\n/** One entry of `modules`, normalised. */\nexport interface ResolvedModuleEntry {\n\t/** A package name, or a file path/URL, the module is imported from. */\n\treadonly specifier: string;\n\t/** The options written in `stars.config`, before the module's `defaults` are merged under them. */\n\treadonly options: Readonly<Record<string, unknown>>;\n}\n\n/**\n * A runtime plugin a module registered with `ctx.addPlugin`. Plugins cross from the CLI process into the bot by\n * source, not by value: the entry (or, for the `tsc`/`none` build tools, a `node --import` preload) imports `from` and\n * passes its `export` to `Client.use` — as the plugin itself, or, when it is a function, the result of calling it with\n * `options`.\n */\nexport interface RuntimePluginRegistration {\n\t/** The module that registered it. */\n\treadonly module: string;\n\t/** A package specifier or an absolute file path. */\n\treadonly from: string;\n\t/** @default 'default' */\n\treadonly export: string;\n\t/** JSON-serialisable options handed to the plugin when it is a factory. */\n\treadonly options?: unknown;\n}\n\n/** A module that was installed. */\nexport interface InstalledModule {\n\treadonly name: string;\n\treadonly version?: string;\n}\n\n/** What the installed modules contributed, known once the CLI ran their `setup`. Empty until then. */\nexport interface ModulesRuntime {\n\treadonly modules: readonly InstalledModule[];\n\treadonly plugins: readonly RuntimePluginRegistration[];\n\t/** Packages added to `imports.presets` by `ctx.addImports`. */\n\treadonly imports: readonly string[];\n}\n\nexport const EMPTY_MODULES_RUNTIME: ModulesRuntime = Object.freeze({ modules: [], plugins: [], imports: [] });\n","import type { Diagnostic } from 'nostics';\nimport type { StarsCompatibilityVersion, StarsFutureConfig } from '../types/config.js';\nimport { configDiagnostics } from './errors.js';\nimport type { Validator } from './validator.js';\n\nexport interface ResolvedFutureConfig {\n\treadonly compatibilityVersion: StarsCompatibilityVersion;\n}\n\nexport const LEGACY_COMPATIBILITY_VERSION = 3;\nexport const LATEST_COMPATIBILITY_VERSION = 5;\n/** The version a project without `future.compatibilityVersion` runs on: today, the latest one. */\nexport const DEFAULT_COMPATIBILITY_VERSION = 5;\n/** Versions still accepted but scheduled for removal in the next major. */\nexport const EOL_COMPATIBILITY_VERSIONS: ReadonlySet<number> = new Set([LEGACY_COMPATIBILITY_VERSION]);\n/** From this version on, `tsdown` is configured from `stars.config` alone and auto imports are on by default. */\nexport const STARS_CONFIG_TSDOWN_VERSION = 4;\n/** From this version on, `env` is registered automatically in the built entry. */\nexport const AUTO_ENV_VERSION = 5;\n\nconst COMPATIBILITY_VERSIONS = new Set<number>([LEGACY_COMPATIBILITY_VERSION, STARS_CONFIG_TSDOWN_VERSION, AUTO_ENV_VERSION]);\n\n/**\n * Resolves the Nuxt-style compatibility block. Version 5 is the default and version 4 remains supported. Version 3 is\n * end-of-life: it still resolves, with a warning pushed to `warnings`, and is removed in the next major.\n *\n * New behaviour is gated by a named version constant (such as {@link AUTO_ENV_VERSION}), never by\n * {@link LATEST_COMPATIBILITY_VERSION}: bumping the latest version must not move older versions onto other defaults.\n */\nexport function resolveFuture(config: StarsFutureConfig, validator: Validator, warnings: Diagnostic[]): ResolvedFutureConfig {\n\tif (config === null || typeof config !== 'object' || Array.isArray(config)) {\n\t\tthrow validator.typeError('future', 'an object', config, 'Use `{ compatibilityVersion }`.');\n\t}\n\n\tvalidator.knownKeys(config, 'future', ['compatibilityVersion']);\n\tconst version = config.compatibilityVersion;\n\tif (version === undefined) return { compatibilityVersion: DEFAULT_COMPATIBILITY_VERSION };\n\n\tif (typeof version !== 'number' || !COMPATIBILITY_VERSIONS.has(version)) {\n\t\tthrow validator.error(configDiagnostics.INVALID_COMPATIBILITY_VERSION, {\n\t\t\tvalue: version,\n\t\t\tsupported: [...COMPATIBILITY_VERSIONS].join(', '),\n\t\t\tlatestVersion: LATEST_COMPATIBILITY_VERSION\n\t\t});\n\t}\n\n\tif (EOL_COMPATIBILITY_VERSIONS.has(version)) {\n\t\twarnings.push(validator.error(configDiagnostics.COMPATIBILITY_VERSION_EOL, { version, latestVersion: LATEST_COMPATIBILITY_VERSION }));\n\t}\n\n\treturn { compatibilityVersion: version as StarsCompatibilityVersion };\n}\n","import type { StarsConfig, StarsEnvSetupOptions } from '../types/config.js';\nimport { AUTO_ENV_VERSION, type ResolvedFutureConfig } from './compatibility.js';\nimport { configDiagnostics } from './errors.js';\nimport { hasDependency, type PackageJsonLike, type ResolvedExperimentalConfig } from './resolve.js';\nimport type { Validator } from './validator.js';\n\nexport interface ResolvedEnvConfig {\n\t/** Whether the built entry registers the environment before any other module. */\n\treadonly enabled: boolean;\n\t/** The options handed to `setup()` from `@wolfstar/env-utilities`, as written by the user. */\n\treadonly options: Readonly<StarsEnvSetupOptions>;\n}\n\nconst ENV_UTILITIES = '@wolfstar/env-utilities';\nconst LOADERS = new Set(['dotenv', 'varlock']);\n\n/**\n * Resolves the `env` block. It is on by default from {@link AUTO_ENV_VERSION} on, but only when the project depends on\n * `@wolfstar/env-utilities` (the module the built entry imports) and does not build through Nitro, whose serverless\n * presets have no `.env` files to load. `true`, `enabled: true` or any option at all is an explicit opt-in, which\n * does require the dependency.\n */\nexport function resolveEnv(\n\tconfig: StarsConfig['env'],\n\tpackageJson: PackageJsonLike | null,\n\tfuture: ResolvedFutureConfig,\n\texperimental: ResolvedExperimentalConfig,\n\tvalidator: Validator\n): ResolvedEnvConfig {\n\tif (config === false) return { enabled: false, options: {} };\n\n\tconst forcedOn = config === true;\n\tconst raw = forcedOn || config === undefined ? {} : config;\n\tif (typeof raw !== 'object' || raw === null || Array.isArray(raw)) {\n\t\tthrow validator.typeError(\n\t\t\t'env',\n\t\t\t'an object, `true` or `false`',\n\t\t\traw,\n\t\t\t'Use `{ path, env, prefix, loader, debug, encoding }`, `true` to enable with defaults, or `false` to disable.'\n\t\t);\n\t}\n\n\tvalidator.knownKeys(raw, 'env', ['enabled', 'path', 'env', 'prefix', 'loader', 'debug', 'encoding']);\n\n\tconst options: StarsEnvSetupOptions = {};\n\tconst path = validator.string(raw.path, 'env.path');\n\tif (path !== undefined) options.path = path;\n\tconst env = validator.string(raw.env, 'env.env');\n\tif (env !== undefined) options.env = env;\n\tconst prefix = validator.string(raw.prefix, 'env.prefix');\n\tif (prefix !== undefined) options.prefix = prefix;\n\tconst loader = validator.string(raw.loader, 'env.loader');\n\tif (loader !== undefined) {\n\t\tif (!LOADERS.has(loader)) throw validator.typeError('env.loader', \"'dotenv' or 'varlock'\", loader, \"Use 'dotenv' (default) or 'varlock'.\");\n\t\toptions.loader = loader as NonNullable<StarsEnvSetupOptions['loader']>;\n\t}\n\tconst debug = validator.boolean(raw.debug, 'env.debug');\n\tif (debug !== undefined) options.debug = debug;\n\tconst encoding = validator.string(raw.encoding, 'env.encoding');\n\tif (encoding !== undefined) options.encoding = encoding;\n\n\tconst enabled = validator.boolean(raw.enabled, 'env.enabled');\n\tif (enabled === false) return { enabled: false, options };\n\n\tconst installed = hasDependency(packageJson, ENV_UTILITIES);\n\tconst explicit = forcedOn || enabled === true || Object.keys(options).length > 0;\n\tif (explicit && !installed) throw validator.error(configDiagnostics.ENV_REQUIRES_ENV_UTILITIES, {});\n\n\tconst enabledByDefault = installed && future.compatibilityVersion >= AUTO_ENV_VERSION && !experimental.enableNitro;\n\treturn { enabled: explicit || enabledByDefault, options };\n}\n","import type { StarsHookName, StarsHooks, StarsHooksConfig } from '../types/hooks.js';\nimport { configDiagnostics } from './errors.js';\nimport type { Validator } from './validator.js';\n\ntype AnyHook = StarsHooks[StarsHookName];\n\n/** Every hook of `stars.config`, flattened to its full name, with its callbacks in declaration order. */\nexport type ResolvedHooksConfig = Readonly<Partial<Record<StarsHookName, readonly AnyHook[]>>>;\n\nexport const STARS_HOOK_NAMES = [\n\t'config:resolved',\n\t'env:options',\n\t'prepare:before',\n\t'prepare:done',\n\t'builder:created',\n\t'tsdown:options',\n\t'build:before',\n\t'build:done',\n\t'dev:start',\n\t'dev:restart',\n\t'dev:close'\n] as const satisfies readonly StarsHookName[];\n\nconst KNOWN = new Set<string>(STARS_HOOK_NAMES);\n\n/**\n * Flattens and validates `hooks`. `hookable`'s own `flatHooks` is not used: it would split an array of callbacks into\n * `name:0`, `name:1` and silently drop anything that is not a function, while a typo in a hook name here should fail\n * loudly rather than register a hook that never runs.\n */\nexport function resolveHooks(config: StarsHooksConfig | undefined, validator: Validator): ResolvedHooksConfig {\n\tif (config === undefined) return {};\n\n\tconst resolved: Partial<Record<StarsHookName, AnyHook[]>> = {};\n\tconst visit = (value: unknown, path: string): void => {\n\t\tif (value === null || typeof value !== 'object' || Array.isArray(value)) {\n\t\t\tthrow validator.typeError(\n\t\t\t\tpath ? `hooks.${path}` : 'hooks',\n\t\t\t\t'an object',\n\t\t\t\tvalue,\n\t\t\t\t\"Use `{ 'build:done'() {} }` or `{ build: { done() {} } }`.\"\n\t\t\t);\n\t\t}\n\n\t\tfor (const [key, entry] of Object.entries(value)) {\n\t\t\tconst name = path ? `${path}:${key}` : key;\n\t\t\tif (entry !== null && typeof entry === 'object' && !Array.isArray(entry)) {\n\t\t\t\tvisit(entry, name);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (!KNOWN.has(name)) throw validator.error(configDiagnostics.UNKNOWN_HOOK, { name, known: STARS_HOOK_NAMES.join(', ') });\n\n\t\t\tconst callbacks: unknown[] = Array.isArray(entry) ? entry : [entry];\n\t\t\tfor (const callback of callbacks) {\n\t\t\t\tif (typeof callback !== 'function') {\n\t\t\t\t\tthrow validator.typeError(`hooks.${name}`, 'a function or an array of functions', callback, 'Pass a function.');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t(resolved[name as StarsHookName] ??= []).push(...(callbacks as AnyHook[]));\n\t\t}\n\t};\n\n\tvisit(config, '');\n\treturn resolved;\n}\n","import type { ResolvedModuleEntry } from '../types/modules.js';\nimport type { Validator } from './validator.js';\n\nconst FIX =\n\t\"Use a package name, or `[name, options]` to pass options: `modules: ['@wolfstar/plugin-cache', ['@wolfstar/plugin-gateway', { shards: 2 }]]`.\";\n\n/** Normalises `modules`: falsy entries are dropped, a bare specifier gets empty options. */\nexport function resolveModules(config: unknown, validator: Validator): readonly ResolvedModuleEntry[] {\n\tif (config === undefined) return [];\n\tif (!Array.isArray(config)) throw validator.typeError('modules', 'an array', config, FIX);\n\n\tconst resolved: ResolvedModuleEntry[] = [];\n\tfor (const [index, entry] of (config as unknown[]).entries()) {\n\t\tif (!entry) continue;\n\t\tconst path = `modules[${index}]`;\n\n\t\tif (typeof entry === 'string') {\n\t\t\tif (entry.length === 0) throw validator.typeError(path, 'a non-empty module specifier', entry, FIX);\n\t\t\tresolved.push({ specifier: entry, options: {} });\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!Array.isArray(entry)) throw validator.typeError(path, 'a module specifier or a `[specifier, options]` tuple', entry, FIX);\n\n\t\tif (entry.length > 2) {\n\t\t\tthrow validator.typeError(path, 'a `[specifier, options]` tuple with at most two members', entry, FIX);\n\t\t}\n\n\t\tconst [specifier, options] = entry as [unknown, unknown?];\n\t\tif (typeof specifier !== 'string' || specifier.length === 0) {\n\t\t\tthrow validator.typeError(`${path}[0]`, 'a non-empty module specifier', specifier, FIX);\n\t\t}\n\n\t\tif (options !== undefined && (options === null || typeof options !== 'object' || Array.isArray(options))) {\n\t\t\tthrow validator.typeError(`${path}[1]`, 'an object', options, FIX);\n\t\t}\n\n\t\tresolved.push({ specifier, options: (options as Record<string, unknown> | undefined) ?? {} });\n\t}\n\n\treturn resolved;\n}\n","import type { Diagnostic } from 'nostics';\nimport { configDiagnostics } from './errors.js';\n\n/** Validates raw `stars.config` values, throwing a `configDiagnostics` diagnostic grounded in the configuration file. */\nexport class Validator {\n\tpublic constructor(private readonly file: string | null) {}\n\n\tprivate get sources(): string[] | undefined {\n\t\treturn this.file ? [this.file] : undefined;\n\t}\n\n\tpublic error<Handle extends (params: any) => Diagnostic>(handle: Handle, params: Parameters<Handle>[0]): Diagnostic {\n\t\treturn handle({ ...params, sources: this.sources });\n\t}\n\n\tpublic knownKeys(value: object, path: string, keys: readonly string[]): void {\n\t\tfor (const key of Object.keys(value)) {\n\t\t\tif (keys.includes(key)) continue;\n\t\t\tconst fullPath = path ? `${path}.${key}` : key;\n\t\t\tthrow this.error(configDiagnostics.UNKNOWN_OPTION, { path: fullPath, parent: path, known: keys.join(', ') });\n\t\t}\n\t}\n\n\tpublic string(value: unknown, path: string): string | undefined {\n\t\tif (value === undefined) return undefined;\n\t\tif (typeof value !== 'string' || value.length === 0) throw this.typeError(path, 'a non-empty string', value);\n\t\treturn value;\n\t}\n\n\tpublic boolean(value: unknown, path: string): boolean | undefined {\n\t\tif (value === undefined) return undefined;\n\t\tif (typeof value !== 'boolean') throw this.typeError(path, 'a boolean', value);\n\t\treturn value;\n\t}\n\n\t/** A plain object passed through as-is (e.g. raw `vite`/`tsdown` config merged into the project's own). */\n\tpublic plainObject(value: unknown, path: string): Record<string, unknown> | undefined {\n\t\tif (value === undefined) return undefined;\n\t\tif (value === null || typeof value !== 'object' || Array.isArray(value)) throw this.typeError(path, 'an object', value);\n\t\treturn value as Record<string, unknown>;\n\t}\n\n\tpublic stringArray(value: unknown, path: string): string[] | undefined {\n\t\tif (value === undefined) return undefined;\n\t\tif (!Array.isArray(value) || !value.every((item) => typeof item === 'string')) throw this.typeError(path, 'an array of strings', value);\n\t\treturn value;\n\t}\n\n\tpublic nonNegativeNumber(value: unknown, path: string): number | undefined {\n\t\tif (value === undefined) return undefined;\n\t\tif (typeof value !== 'number' || !Number.isFinite(value) || value < 0) throw this.typeError(path, 'a non-negative number', value);\n\t\treturn value;\n\t}\n\n\tpublic stringRecord(value: unknown, path: string): Record<string, string> | undefined {\n\t\tif (value === undefined) return undefined;\n\t\tif (value === null || typeof value !== 'object' || Array.isArray(value) || !Object.values(value).every((item) => typeof item === 'string')) {\n\t\t\tthrow this.typeError(path, 'an object of string values', value);\n\t\t}\n\t\treturn value as Record<string, string>;\n\t}\n\n\t/** A generic \"wrong type\" diagnostic. `fix` defaults to the standard \"set it or remove it\" wording. */\n\tpublic typeError(path: string, expected: string, value: unknown, fix?: string): Diagnostic {\n\t\treturn this.error(configDiagnostics.INVALID_TYPE, {\n\t\t\tpath,\n\t\t\texpected,\n\t\t\tvalue,\n\t\t\tfix: fix ?? `Set \\`${path}\\` to ${expected} or remove it to use the default.`\n\t\t});\n\t}\n}\n","import { existsSync, readFileSync, statSync } from 'node:fs';\nimport { basename, dirname, extname, isAbsolute, join, relative, resolve } from 'node:path';\nimport type { Diagnostic } from 'nostics';\nimport type {\n\tStarsBuildTool,\n\tStarsConfig,\n\tStarsDevConfig,\n\tStarsEnvSetupOptions,\n\tStarsExperimentalConfig,\n\tStarsTypechecker\n} from '../types/config.js';\nimport { EMPTY_MODULES_RUNTIME, type ModulesRuntime, type ResolvedModuleEntry } from '../types/modules.js';\nimport { LEGACY_COMPATIBILITY_VERSION, STARS_CONFIG_TSDOWN_VERSION, resolveFuture, type ResolvedFutureConfig } from './compatibility.js';\nimport { resolveEnv, type ResolvedEnvConfig } from './env.js';\nimport { configDiagnostics } from './errors.js';\nimport { resolveHooks, type ResolvedHooksConfig } from './hooks.js';\nimport { resolveModules } from './modules.js';\nimport { Validator } from './validator.js';\n\nexport type { ResolvedFutureConfig } from './compatibility.js';\n\nexport interface PackageJsonLike {\n\tname?: string;\n\t/** `tsdown` reads its options from here as well as from a `tsdown.config.*`. */\n\ttsdown?: unknown;\n\tversion?: string;\n\tmain?: string;\n\ttype?: string;\n\tscripts?: Record<string, string>;\n\tdependencies?: Record<string, string>;\n\tdevDependencies?: Record<string, string>;\n}\n\nexport interface ResolvedBuildConfig {\n\treadonly tool: StarsBuildTool;\n\t/** Absolute output directory. */\n\treadonly outDir: string;\n\t/** Absolute `tsconfig.json` used by `tsc`, `null` for the other tools. */\n\treadonly tsconfig: string | null;\n\t/** Absolute path of the file `node` runs, i.e. the built entry (or the entry itself when `tool` is `none`). */\n\treadonly output: string;\n\t/**\n\t * Absolute path of the build tool's own configuration file (`tsdown.config.*`, `vite.config.*`), `null` when the\n\t * tool has none — which is always the case for `tsdown` from `future.compatibilityVersion` 4 on, where the build is\n\t * configured from `stars.config` alone.\n\t */\n\treadonly configFile: string | null;\n}\n\nexport interface ResolvedTypecheckConfig {\n\treadonly enabled: boolean;\n\t/** Absolute `tsconfig.json` the type checker runs against, `null` when it could not be found. */\n\treadonly tsconfig: string | null;\n\t/** The type checker to run, with `'auto'` already resolved. */\n\treadonly checker: StarsTypechecker;\n}\n\nexport type ResolvedTunnelConfig =\n\t| { readonly mode: 'off' }\n\t/** A `cloudflared` quick tunnel, whose hostname is only known once it is up. */\n\t| { readonly mode: 'quick'; readonly path: string; readonly updateEndpoint: boolean }\n\t/** An https URL the user already serves. */\n\t| { readonly mode: 'url'; readonly url: string; readonly path: string; readonly updateEndpoint: boolean };\n\nexport interface ResolvedDevConfig {\n\treadonly banner: readonly string[] | false | null;\n\treadonly watch: readonly string[];\n\treadonly ignore: readonly string[];\n\treadonly debounce: number;\n\treadonly env: Readonly<Record<string, string>>;\n\treadonly nodeArgs: readonly string[];\n\treadonly args: readonly string[];\n\treadonly url: string | null;\n\treadonly health: string | null;\n\treadonly killTimeout: number;\n\treadonly typecheck: ResolvedTypecheckConfig;\n\treadonly tunnel: ResolvedTunnelConfig;\n\t/** Absolute path of the file the dev session's logs are mirrored into, `null` when disabled. */\n\treadonly logFile: string | null;\n}\n\nexport interface ResolvedNitroConfig {\n\treadonly [option: string]: unknown;\n\treadonly preset: string;\n}\n\nexport interface ResolvedExperimentalConfig {\n\treadonly enableVite: boolean;\n\treadonly enableExternalVite: boolean;\n\treadonly enableNitro: boolean;\n\treadonly nitro: ResolvedNitroConfig;\n}\n\nexport interface ResolvedImportsConfig {\n\treadonly enabled: boolean;\n\t/** Directory glob patterns, relative to the project root (the way `unimport` scans them). */\n\treadonly dirs: readonly string[];\n\treadonly presets: readonly string[];\n\treadonly exclude: readonly string[];\n\t/** Absolute path of the generated declaration file. */\n\treadonly dts: string;\n}\n\nexport interface ResolvedI18nCodegenConfig {\n\treadonly locales: string;\n\treadonly output: string;\n}\n\nexport interface ResolvedCodegenConfig {\n\treadonly i18n: ResolvedI18nCodegenConfig | null;\n}\n\nexport interface ResolvedStarsConfig {\n\t/** Absolute path of the configuration file, `null` when running on defaults. */\n\treadonly configFile: string | null;\n\t/** The directory the CLI was invoked from. */\n\treadonly cwd: string;\n\t/** Absolute project root. */\n\treadonly root: string;\n\treadonly packageJson: PackageJsonLike | null;\n\t/** Absolute source entry. */\n\treadonly entry: string;\n\treadonly build: ResolvedBuildConfig;\n\treadonly dev: ResolvedDevConfig;\n\treadonly codegen: ResolvedCodegenConfig;\n\treadonly imports: ResolvedImportsConfig;\n\treadonly env: ResolvedEnvConfig;\n\t/** The `hooks` block, flattened to full hook names (`build:done`). */\n\treadonly hooks: ResolvedHooksConfig;\n\t/** The `modules` block, normalised. */\n\treadonly modules: readonly ResolvedModuleEntry[];\n\t/** What the installed modules contributed. Empty until the CLI ran their `setup`. */\n\treadonly runtime: ModulesRuntime;\n\treadonly experimental: ResolvedExperimentalConfig;\n\treadonly future: ResolvedFutureConfig;\n\t/** Raw options merged into `vite.config.*`. */\n\treadonly vite: Readonly<Record<string, unknown>>;\n\t/** The `tsdown` build's options: merged over `tsdown.config.*` at compatibility version 3, the whole build from 4 on. */\n\treadonly tsdown: Readonly<Record<string, unknown>>;\n\t/** Non-fatal diagnostics (e.g. an end-of-life compatibility version), for the host to report. */\n\treadonly warnings: readonly Diagnostic[];\n}\n\nexport interface ResolveConfigOptions {\n\tcwd: string;\n\tconfigFile: string | null;\n\tconfig: StarsConfig;\n\tenv?: NodeJS.ProcessEnv;\n\t/**\n\t * The variables the bot will load, when the host resolved them itself (e.g. through `varlock load`). Used instead\n\t * of the project's env files for the defaults read from them, such as the `dev.url` port.\n\t */\n\tprojectEnv?: Readonly<Record<string, string>>;\n}\n\nexport const DEFAULT_ENTRIES = ['src/main.ts', 'src/main.js', 'src/index.ts', 'src/index.js'] as const;\nexport const DEFAULT_IGNORE = ['**/node_modules/**', '**/dist/**', '**/.git/**'] as const;\nexport const DEFAULT_DEBOUNCE = 150;\nexport const DEFAULT_KILL_TIMEOUT = 5000;\nexport const DEFAULT_NODE_ARGS = ['--enable-source-maps'] as const;\nexport const DEFAULT_DEV_PORT = 3000;\nexport const DEFAULT_I18N_LOCALES = 'src/locales/en-US';\nexport const DEFAULT_I18N_OUTPUT = 'src/@types/i18next.d.ts';\nexport const DEFAULT_IMPORTS_DIRS = ['src/lib/**', 'src/utils/**'] as const;\nexport const DEFAULT_IMPORTS_PRESETS = ['@wolfstar/http-framework', '@wolfstar/decorators', '@wolfstar/env-utilities'] as const;\nexport const DEFAULT_IMPORTS_DTS = '.stars/imports.d.ts';\nexport const DEFAULT_DEV_LOG_FILE = '.stars/dev.log';\nexport const DEFAULT_TUNNEL_PATH = '/';\n\nconst BUILD_TOOLS = new Set<string>(['tsdown', 'tsc', 'none', 'vite', 'auto']);\nconst TYPECHECKERS = new Set<string>(['tsc', 'golar', 'tsz', 'auto']);\nconst VITE_CONFIG_FILES = ['vite.config.ts', 'vite.config.mts', 'vite.config.cts', 'vite.config.js', 'vite.config.mjs', 'vite.config.cjs'];\nconst TSDOWN_CONFIG_FILES = [\n\t'tsdown.config.ts',\n\t'tsdown.config.mts',\n\t'tsdown.config.cts',\n\t'tsdown.config.js',\n\t'tsdown.config.mjs',\n\t'tsdown.config.cjs',\n\t'tsdown.config.json'\n];\nconst TYPESCRIPT_EXTENSIONS = new Set(['.ts', '.mts', '.cts']);\n\n/**\n * Applies defaults, validates every option and resolves all paths to absolute ones.\n *\n * @throws {Diagnostic} (from `nostics`, via {@link configDiagnostics}) with an actionable `fix` on the first invalid option.\n */\nexport function resolveStarsConfig(options: ResolveConfigOptions): ResolvedStarsConfig {\n\tconst cwd = resolve(options.cwd);\n\tconst env = options.env ?? process.env;\n\tconst file = options.configFile;\n\tconst config = options.config;\n\tconst validator = new Validator(file);\n\tconst warnings: Diagnostic[] = [];\n\n\tvalidator.knownKeys(config, '', [\n\t\t'root',\n\t\t'entry',\n\t\t'build',\n\t\t'dev',\n\t\t'codegen',\n\t\t'imports',\n\t\t'env',\n\t\t'hooks',\n\t\t'modules',\n\t\t'experimental',\n\t\t'future',\n\t\t'vite',\n\t\t'tsdown'\n\t]);\n\tconst baseDirectory = file ? dirname(file) : cwd;\n\n\tconst root = resolve(baseDirectory, validator.string(config.root, 'root') ?? '.');\n\tif (!isDirectory(root)) {\n\t\tthrow validator.error(configDiagnostics.ROOT_NOT_FOUND, { root });\n\t}\n\n\tconst packageJson = readPackageJson(root, validator);\n\tconst experimental = resolveExperimental(config.experimental ?? {}, validator);\n\tconst future = resolveFuture(config.future ?? {}, validator, warnings);\n\tconst entry = resolveEntry(root, validator.string(config.entry, 'entry'), validator);\n\t// The tool-specific blocks are read before the build so a project that only declares `tsdown: {}` still resolves\n\t// `build.tool: 'auto'` to `tsdown`: configuring a tool is as clear a signal as depending on it.\n\tconst vite = validator.plainObject(config.vite, 'vite') ?? {};\n\tconst tsdown = validator.plainObject(config.tsdown, 'tsdown') ?? {};\n\tconst build = resolveBuild(root, entry, packageJson, config.build ?? {}, experimental, future, Object.keys(tsdown).length > 0, validator);\n\tconst hooks = resolveHooks(config.hooks, validator);\n\tconst modules = resolveModules(config.modules, validator);\n\tconst envConfig = resolveEnv(config.env, packageJson, future, experimental, validator);\n\tconst dev = resolveDev(root, entry, packageJson, config.dev ?? {}, env, envConfig.options, options.projectEnv, validator);\n\tconst codegen = resolveCodegen(root, config.codegen ?? {}, validator);\n\tconst imports = resolveImports(root, build.tool, future, config.imports, validator);\n\n\tif (Object.keys(tsdown).length > 0 && build.tool !== 'tsdown') {\n\t\tthrow validator.error(configDiagnostics.TSDOWN_OPTIONS_REQUIRE_TSDOWN, { tool: build.tool });\n\t}\n\n\tif (Object.keys(vite).length > 0 && build.tool !== 'vite') {\n\t\tthrow validator.error(configDiagnostics.VITE_OPTIONS_REQUIRE_VITE, { tool: build.tool });\n\t}\n\n\treturn {\n\t\tconfigFile: file,\n\t\tcwd,\n\t\troot,\n\t\tpackageJson,\n\t\tentry,\n\t\tbuild,\n\t\tdev,\n\t\tcodegen,\n\t\timports,\n\t\tenv: envConfig,\n\t\thooks,\n\t\tmodules,\n\t\truntime: EMPTY_MODULES_RUNTIME,\n\t\texperimental,\n\t\tfuture,\n\t\tvite,\n\t\ttsdown,\n\t\twarnings\n\t};\n}\n\n/**\n * Presents an absolute path relative to `root` when possible, for display purposes.\n */\nexport function displayPath(root: string, path: string): string {\n\tconst rel = relative(root, path);\n\tif (!rel) return '.';\n\treturn rel.startsWith('..') || isAbsolute(rel) ? path : rel;\n}\n\nfunction resolveEntry(root: string, configured: string | undefined, validator: Validator): string {\n\tif (configured !== undefined) {\n\t\tconst entry = resolve(root, configured);\n\t\tif (!isFile(entry)) {\n\t\t\tthrow validator.error(configDiagnostics.ENTRY_NOT_FOUND, { entry });\n\t\t}\n\t\treturn entry;\n\t}\n\n\tfor (const candidate of DEFAULT_ENTRIES) {\n\t\tconst entry = join(root, candidate);\n\t\tif (isFile(entry)) return entry;\n\t}\n\n\tthrow validator.error(configDiagnostics.ENTRY_DEFAULT_NOT_FOUND, { root, defaults: DEFAULT_ENTRIES.join(', ') });\n}\n\nfunction resolveBuild(\n\troot: string,\n\tentry: string,\n\tpackageJson: PackageJsonLike | null,\n\tconfig: NonNullable<StarsConfig['build']>,\n\texperimental: ResolvedExperimentalConfig,\n\tfuture: ResolvedFutureConfig,\n\thasTsdownOptions: boolean,\n\tvalidator: Validator\n): ResolvedBuildConfig {\n\tvalidator.knownKeys(config, 'build', ['tool', 'outDir', 'tsconfig']);\n\n\tconst requested = validator.string(config.tool, 'build.tool') ?? 'auto';\n\tif (!BUILD_TOOLS.has(requested)) {\n\t\tthrow validator.error(configDiagnostics.INVALID_BUILD_TOOL, { tool: requested });\n\t}\n\n\tif (requested === 'vite' && !experimental.enableVite) {\n\t\tthrow validator.error(configDiagnostics.EXPERIMENTAL_BUILD_TOOL, { tool: 'vite', flag: 'experimental.enableVite' });\n\t}\n\n\tconst isTypeScriptEntry = TYPESCRIPT_EXTENSIONS.has(extname(entry));\n\tconst tool: StarsBuildTool =\n\t\trequested === 'auto'\n\t\t\t? detectBuildTool(root, packageJson, isTypeScriptEntry, experimental, future, hasTsdownOptions)\n\t\t\t: (requested as StarsBuildTool);\n\n\tif (tool === 'none' && isTypeScriptEntry) {\n\t\tthrow validator.error(configDiagnostics.BUILD_TOOL_REQUIRED, { entry: displayPath(root, entry) });\n\t}\n\n\t// Nitro owns its own output layout; anything else keeps the plain `dist` convention.\n\tconst defaultOutDir = experimental.enableNitro ? '.output' : 'dist';\n\tconst outDir = resolve(root, validator.string(config.outDir, 'build.outDir') ?? defaultOutDir);\n\n\tlet tsconfig: string | null = null;\n\tconst configuredTsconfig = validator.string(config.tsconfig, 'build.tsconfig');\n\tif (configuredTsconfig !== undefined) {\n\t\ttsconfig = resolve(root, configuredTsconfig);\n\t\tif (!isFile(tsconfig)) {\n\t\t\tthrow validator.error(configDiagnostics.TSCONFIG_EXPLICIT_NOT_FOUND, { tsconfig, path: 'build.tsconfig' });\n\t\t}\n\t} else if (tool === 'tsc' || tool === 'tsdown') {\n\t\t// `tsdown` only looks for a `tsconfig.json` next to the project root, so a bot keeping its sources' one in\n\t\t// `src/` (the layout both the scaffold and the examples use) would silently build without its paths and\n\t\t// target. Resolving it here is what makes the `tsdown` build need no configuration of its own.\n\t\ttsconfig = [join(root, 'src', 'tsconfig.json'), join(root, 'tsconfig.json')].find((candidate) => isFile(candidate)) ?? null;\n\t\tif (!tsconfig && tool === 'tsc') {\n\t\t\tthrow validator.error(configDiagnostics.TSCONFIG_NOT_FOUND, { root, suggestion: 'build.tsconfig' });\n\t\t}\n\t}\n\n\t// Nitro always writes its server entry to `<outDir>/server/index.mjs`, regardless of the project's own entry\n\t// file name or `package.json#main` — it is Nitro's output, not a build of the project's own entry file.\n\tconst output = experimental.enableNitro\n\t\t? join(outDir, 'server', 'index.mjs')\n\t\t: tool === 'none'\n\t\t\t? entry\n\t\t\t: resolveBuildOutput(root, entry, outDir, packageJson);\n\n\tlet configFile = findConfigFile(root, tool === 'tsdown' ? TSDOWN_CONFIG_FILES : tool === 'vite' ? VITE_CONFIG_FILES : []);\n\t// `tsdown` reads `package.json#tsdown` when no configuration file is around, so it counts as one here.\n\tif (tool === 'tsdown' && configFile === null && packageJson?.tsdown !== undefined) configFile = join(root, 'package.json');\n\n\t// Compatibility version 4 builds `tsdown` from this file alone. A `tsdown.config.*` left behind would keep the\n\t// plugins and entry points it declares out of the build, so it is reported rather than quietly ignored.\n\tif (tool === 'tsdown' && configFile !== null && future.compatibilityVersion >= STARS_CONFIG_TSDOWN_VERSION) {\n\t\tthrow validator.error(configDiagnostics.TSDOWN_CONFIG_FILE_UNSUPPORTED, {\n\t\t\tfile: displayPath(root, configFile),\n\t\t\tversion: future.compatibilityVersion,\n\t\t\tlegacyVersion: LEGACY_COMPATIBILITY_VERSION\n\t\t});\n\t}\n\n\treturn { tool, outDir, tsconfig, output, configFile };\n}\n\nfunction findConfigFile(root: string, names: readonly string[]): string | null {\n\tfor (const name of names) {\n\t\tconst candidate = join(root, name);\n\t\tif (isFile(candidate)) return candidate;\n\t}\n\n\treturn null;\n}\n\nfunction detectBuildTool(\n\troot: string,\n\tpackageJson: PackageJsonLike | null,\n\tisTypeScriptEntry: boolean,\n\texperimental: ResolvedExperimentalConfig,\n\tfuture: ResolvedFutureConfig,\n\thasTsdownOptions: boolean\n): StarsBuildTool {\n\t// Vite only wins the detection once the project opted into it; without the flag a `vite.config.*` is somebody\n\t// else's (a dashboard, a docs site) and must not take the bot's build over.\n\tif (experimental.enableVite) {\n\t\tconst hasVite = VITE_CONFIG_FILES.some((name) => isFile(join(root, name))) || hasDependency(packageJson, 'vite');\n\t\tif (hasVite) return 'vite';\n\t}\n\n\tif (hasTsdownOptions) return 'tsdown';\n\n\t// From compatibility version 4 on, `tsdown` is the build of a TypeScript project rather than one of the options:\n\t// there is no `tsdown.config.*` left to detect it from, and a missing dependency is reported by the builder with\n\t// an install hint instead of silently falling back to `tsc`.\n\tif (future.compatibilityVersion >= STARS_CONFIG_TSDOWN_VERSION) return isTypeScriptEntry ? 'tsdown' : 'none';\n\n\tconst hasTsdown = TSDOWN_CONFIG_FILES.some((name) => isFile(join(root, name))) || hasDependency(packageJson, 'tsdown');\n\tif (hasTsdown) return 'tsdown';\n\tif (isTypeScriptEntry) return 'tsc';\n\treturn 'none';\n}\n\n/**\n * Resolves the `experimental` block. Every flag is a boolean defaulting to `false`, the way Nuxt's own experimental\n * flags are declared, and the ones that build on each other are checked here rather than surfacing later as a\n * confusing runtime failure.\n */\nfunction resolveExperimental(config: StarsExperimentalConfig, validator: Validator): ResolvedExperimentalConfig {\n\tif (config === null || typeof config !== 'object' || Array.isArray(config)) {\n\t\tthrow validator.typeError('experimental', 'an object', config, 'Use `{ enableVite, enableExternalVite, enableNitro, nitro }`.');\n\t}\n\n\tvalidator.knownKeys(config, 'experimental', ['enableVite', 'enableExternalVite', 'enableNitro', 'nitro']);\n\tconst enableVite = validator.boolean(config.enableVite, 'experimental.enableVite') ?? false;\n\tconst enableExternalVite = validator.boolean(config.enableExternalVite, 'experimental.enableExternalVite') ?? false;\n\tconst enableNitro = validator.boolean(config.enableNitro, 'experimental.enableNitro') ?? false;\n\n\tif (enableExternalVite && !enableVite) {\n\t\tthrow validator.error(configDiagnostics.EXPERIMENT_REQUIRED, {\n\t\t\tpath: 'experimental.enableExternalVite',\n\t\t\trequires: 'experimental.enableVite',\n\t\t\tdrop: 'enableExternalVite'\n\t\t});\n\t}\n\n\tif (enableNitro && !enableVite) {\n\t\tthrow validator.error(configDiagnostics.EXPERIMENT_REQUIRED, {\n\t\t\tpath: 'experimental.enableNitro',\n\t\t\trequires: 'experimental.enableVite',\n\t\t\tdrop: 'enableNitro'\n\t\t});\n\t}\n\n\tconst rawNitro = 'nitro' in config ? config.nitro : undefined;\n\tif (rawNitro !== undefined && !enableNitro) {\n\t\tthrow validator.error(configDiagnostics.EXPERIMENT_REQUIRED, {\n\t\t\tpath: 'experimental.nitro',\n\t\t\trequires: 'experimental.enableNitro',\n\t\t\tdrop: 'nitro'\n\t\t});\n\t}\n\tif (rawNitro !== undefined && (rawNitro === null || typeof rawNitro !== 'object' || Array.isArray(rawNitro))) {\n\t\tthrow validator.typeError('experimental.nitro', 'an object', rawNitro, 'Use `{ preset }`.');\n\t}\n\tconst preset = validator.string(rawNitro?.preset, 'experimental.nitro.preset') ?? 'node-server';\n\n\treturn { enableVite, enableExternalVite, enableNitro, nitro: { ...rawNitro, preset } };\n}\n\nfunction resolveBuildOutput(root: string, entry: string, outDir: string, packageJson: PackageJsonLike | null): string {\n\tif (packageJson?.main) return resolve(root, packageJson.main);\n\n\tconst extension = extname(entry);\n\tconst outputExtension = extension === '.mts' ? '.mjs' : extension === '.cts' ? '.cjs' : '.js';\n\treturn join(outDir, `${basename(entry, extension)}${outputExtension}`);\n}\n\nconst ENV_PORT_KEYS = ['HTTP_PORT', 'PORT'] as const;\n\n/**\n * Reads the project's environment layers from `src/.env*` and `.env*` into a plain object, the way `stars dev` and\n * `stars commands` need it:\n * these files are only loaded into `process.env` by the bot itself once it starts (see `@wolfstar/env-utilities`),\n * so by the time the CLI runs they are not there yet. This is a minimal line reader, not a full dotenv\n * implementation — quoting is stripped, but expansion (`dotenv-expand`) is not. Earlier files win, matching\n * dotenv's own precedence.\n */\nexport function readProjectEnvFiles(root: string, environment = 'development', options: { path?: string } = {}): Record<string, string> {\n\tconst result: Record<string, string> = {};\n\tconst suffixes = [`.${environment}.local`, ...(environment === 'test' ? [] : ['.local']), `.${environment}`, ''];\n\t// A custom `env.path` replaces both default locations, the way it does in `@wolfstar/env-utilities`.\n\tconst bases = options.path ? [options.path] : [join('src', '.env'), '.env'];\n\tconst files = suffixes.flatMap((suffix) => bases.map((base) => `${base}${suffix}`));\n\n\tfor (const file of files) {\n\t\t// `resolve`, not `join`: an absolute `env.path` is used as-is, as `@wolfstar/env-utilities` itself does.\n\t\tconst path = resolve(root, file);\n\t\tif (!isFile(path)) continue;\n\n\t\tlet contents: string;\n\t\ttry {\n\t\t\tcontents = readFileSync(path, 'utf-8');\n\t\t} catch {\n\t\t\tcontinue;\n\t\t}\n\n\t\tfor (const line of contents.split(/\\r?\\n/)) {\n\t\t\tconst match = /^\\s*(?:export\\s+)?([A-Za-z_][A-Za-z0-9_]*)\\s*=\\s*(.*)$/.exec(line);\n\t\t\tif (!match) continue;\n\n\t\t\tconst key = match[1]!;\n\t\t\tif (key in result) continue;\n\t\t\tresult[key] = match[2]!.trim().replace(/^['\"]|['\"]$/g, '');\n\t\t}\n\t}\n\n\treturn result;\n}\n\nfunction readDevPortFromEnvFile(\n\troot: string,\n\tenvironment: string,\n\tenvOptions: Readonly<StarsEnvSetupOptions>,\n\tprojectEnv: Readonly<Record<string, string>> | undefined\n): string | null {\n\t// Varlock resolves its `.env.schema` on its own terms (and may pull values from elsewhere), so a dotenv file is\n\t// not what the bot loads: without the values the host resolved (`projectEnv`), there is nothing to read.\n\tif (projectEnv === undefined && envOptions.loader === 'varlock') return null;\n\n\tconst values = projectEnv ?? readProjectEnvFiles(root, environment, { path: envOptions.path });\n\tfor (const key of ENV_PORT_KEYS) {\n\t\tif (values[key]) return values[key];\n\t}\n\n\treturn null;\n}\n\nfunction resolveDev(\n\troot: string,\n\tentry: string,\n\tpackageJson: PackageJsonLike | null,\n\tconfig: NonNullable<StarsConfig['dev']>,\n\tenv: NodeJS.ProcessEnv,\n\tenvOptions: Readonly<StarsEnvSetupOptions>,\n\tprojectEnv: Readonly<Record<string, string>> | undefined,\n\tvalidator: Validator\n): ResolvedDevConfig {\n\tvalidator.knownKeys(config, 'dev', [\n\t\t'banner',\n\t\t'watch',\n\t\t'ignore',\n\t\t'debounce',\n\t\t'env',\n\t\t'nodeArgs',\n\t\t'args',\n\t\t'url',\n\t\t'health',\n\t\t'killTimeout',\n\t\t'typecheck',\n\t\t'tunnel',\n\t\t'logFile'\n\t]);\n\n\tconst watch = (validator.stringArray(config.watch, 'dev.watch') ?? [displayPath(root, dirname(entry))]).map((path) => resolve(root, path));\n\tconst ignore = validator.stringArray(config.ignore, 'dev.ignore') ?? [...DEFAULT_IGNORE];\n\tconst debounce = validator.nonNegativeNumber(config.debounce, 'dev.debounce') ?? DEFAULT_DEBOUNCE;\n\tconst devEnv = validator.stringRecord(config.env, 'dev.env') ?? {};\n\tconst nodeArgs = validator.stringArray(config.nodeArgs, 'dev.nodeArgs') ?? [...DEFAULT_NODE_ARGS];\n\tconst args = validator.stringArray(config.args, 'dev.args') ?? [];\n\tconst killTimeout = validator.nonNegativeNumber(config.killTimeout, 'dev.killTimeout') ?? DEFAULT_KILL_TIMEOUT;\n\tconst health = validator.string(config.health, 'dev.health') ?? null;\n\n\tlet url = validator.string(config.url, 'dev.url') ?? null;\n\tif (url !== null) {\n\t\ttry {\n\t\t\tnew URL(url);\n\t\t} catch {\n\t\t\tthrow validator.error(configDiagnostics.INVALID_URL, { url, fix: 'Use an absolute URL such as http://localhost:3000.' });\n\t\t}\n\t} else {\n\t\t// Mirrors Vite's and Nuxt's own dev servers: a URL is shown without any configuration. The exact host\n\t\t// (`localhost` vs `127.0.0.1`) is resolved at runtime by `stars dev`, once it knows which one is actually reachable.\n\t\tconst port =\n\t\t\tdevEnv.HTTP_PORT ??\n\t\t\tenv.HTTP_PORT ??\n\t\t\treadDevPortFromEnvFile(root, envOptions.env ?? env.NODE_ENV ?? 'development', envOptions, projectEnv) ??\n\t\t\tString(DEFAULT_DEV_PORT);\n\t\turl = /^\\d+$/.test(port) ? `http://localhost:${port}` : `http://localhost:${DEFAULT_DEV_PORT}`;\n\t}\n\n\tconst typecheck = resolveTypecheck(root, packageJson, config.typecheck, validator);\n\tconst tunnel = resolveTunnel(config.tunnel, validator);\n\tconst logFile = config.logFile === false ? null : resolve(root, validator.string(config.logFile, 'dev.logFile') ?? DEFAULT_DEV_LOG_FILE);\n\tconst banner =\n\t\tconfig.banner === false\n\t\t\t? false\n\t\t\t: typeof config.banner === 'string'\n\t\t\t\t? config.banner.split('\\n')\n\t\t\t\t: (validator.stringArray(config.banner, 'dev.banner') ?? null);\n\n\treturn { watch, ignore, debounce, env: devEnv, nodeArgs, args, url, health, killTimeout, typecheck, tunnel, logFile, banner };\n}\n\n/**\n * Resolves `dev.typecheck`. The tsconfig is looked up the same way the `tsc` build tool looks up its own, so a\n * project building with `tsdown` still gets `tsc --watch --noEmit` on the right project file.\n */\nfunction resolveTypecheck(\n\troot: string,\n\tpackageJson: PackageJsonLike | null,\n\tconfig: StarsDevConfig['typecheck'],\n\tvalidator: Validator\n): ResolvedTypecheckConfig {\n\tif (config === undefined || config === false) return { enabled: false, tsconfig: null, checker: detectTypechecker(packageJson) };\n\n\tlet configured: string | undefined;\n\tlet requestedChecker = 'auto';\n\tif (config !== true) {\n\t\tif (config === null || typeof config !== 'object' || Array.isArray(config)) {\n\t\t\tthrow validator.typeError(\n\t\t\t\t'dev.typecheck',\n\t\t\t\t'a boolean or an object',\n\t\t\t\tconfig,\n\t\t\t\t'Use `true` to type-check with the project tsconfig, `{ tsconfig }` to pick one, or `false` to disable it.'\n\t\t\t);\n\t\t}\n\n\t\tvalidator.knownKeys(config, 'dev.typecheck', ['tsconfig', 'checker']);\n\t\tconfigured = validator.string(config.tsconfig, 'dev.typecheck.tsconfig');\n\t\trequestedChecker = validator.string(config.checker, 'dev.typecheck.checker') ?? 'auto';\n\t\tif (!TYPECHECKERS.has(requestedChecker)) {\n\t\t\tthrow validator.error(configDiagnostics.INVALID_TYPECHECKER, { checker: requestedChecker });\n\t\t}\n\t}\n\n\tconst checker: StarsTypechecker = requestedChecker === 'auto' ? detectTypechecker(packageJson) : (requestedChecker as StarsTypechecker);\n\n\tif (configured !== undefined) {\n\t\tconst tsconfig = resolve(root, configured);\n\t\tif (!isFile(tsconfig)) {\n\t\t\tthrow validator.error(configDiagnostics.TSCONFIG_EXPLICIT_NOT_FOUND, { tsconfig, path: 'dev.typecheck.tsconfig' });\n\t\t}\n\t\treturn { enabled: true, tsconfig, checker };\n\t}\n\n\tconst found = [join(root, 'src', 'tsconfig.json'), join(root, 'tsconfig.json')].find((candidate) => isFile(candidate)) ?? null;\n\tif (!found) {\n\t\tthrow validator.error(configDiagnostics.TSCONFIG_NOT_FOUND, { root, suggestion: 'dev.typecheck.tsconfig' });\n\t}\n\n\treturn { enabled: true, tsconfig: found, checker };\n}\n\n/**\n * Picks the type checker when `dev.typecheck.checker` is `auto`: `golar` when the project already depends on it\n * (it wraps TypeScript and is what this repository's own `typecheck` scripts run), `tsc` otherwise. `tsz` is never\n * picked automatically — it is an early, tsc-compatible alternative a project opts into.\n */\nfunction detectTypechecker(packageJson: PackageJsonLike | null): StarsTypechecker {\n\treturn hasDependency(packageJson, 'golar') ? 'golar' : 'tsc';\n}\n\n/**\n * Resolves `dev.tunnel`: `true` (or `{}`) opens a `cloudflared` quick tunnel, a string (or `{ url }`) is an https\n * URL the user already serves and the CLI only checks.\n */\nfunction resolveTunnel(config: StarsDevConfig['tunnel'], validator: Validator): ResolvedTunnelConfig {\n\tif (config === undefined || config === false) return { mode: 'off' };\n\n\tlet url: string | undefined;\n\tlet updateEndpoint = false;\n\tlet path = DEFAULT_TUNNEL_PATH;\n\n\tif (typeof config === 'string') {\n\t\turl = config;\n\t} else if (config !== true) {\n\t\tif (config === null || typeof config !== 'object' || Array.isArray(config)) {\n\t\t\tthrow validator.typeError(\n\t\t\t\t'dev.tunnel',\n\t\t\t\t'a boolean, an https URL or an object',\n\t\t\t\tconfig,\n\t\t\t\t'Use `true` for a cloudflared quick tunnel, an https URL you already serve, or `false` to disable it.'\n\t\t\t);\n\t\t}\n\n\t\tvalidator.knownKeys(config, 'dev.tunnel', ['url', 'updateEndpoint', 'path']);\n\t\turl = validator.string(config.url, 'dev.tunnel.url');\n\t\tupdateEndpoint = validator.boolean(config.updateEndpoint, 'dev.tunnel.updateEndpoint') ?? false;\n\t\tpath = validator.string(config.path, 'dev.tunnel.path') ?? DEFAULT_TUNNEL_PATH;\n\t}\n\n\tif (url === undefined) return { mode: 'quick', path, updateEndpoint };\n\n\t// Discord only accepts an https interactions endpoint.\n\tlet parsed: URL;\n\ttry {\n\t\tparsed = new URL(url);\n\t} catch {\n\t\tthrow validator.error(configDiagnostics.INVALID_URL, { url, fix: 'Use an absolute https URL such as https://bot.example.com.' });\n\t}\n\n\tif (parsed.protocol !== 'https:') {\n\t\tthrow validator.error(configDiagnostics.TUNNEL_URL_NOT_HTTPS, { url });\n\t}\n\n\treturn { mode: 'url', url, path, updateEndpoint };\n}\n\nfunction resolveCodegen(root: string, config: NonNullable<StarsConfig['codegen']>, validator: Validator): ResolvedCodegenConfig {\n\tvalidator.knownKeys(config, 'codegen', ['i18n']);\n\n\tif (config.i18n === false) return { i18n: null };\n\n\tif (config.i18n === undefined) {\n\t\tconst locales = join(root, DEFAULT_I18N_LOCALES);\n\t\treturn { i18n: isDirectory(locales) ? { locales, output: join(root, DEFAULT_I18N_OUTPUT) } : null };\n\t}\n\n\tif (config.i18n === null || typeof config.i18n !== 'object') {\n\t\tthrow validator.typeError(\n\t\t\t'codegen.i18n',\n\t\t\t'an object or `false`',\n\t\t\tconfig.i18n,\n\t\t\t'Use `{ locales, output }` to configure it or `false` to disable it.'\n\t\t);\n\t}\n\n\tvalidator.knownKeys(config.i18n, 'codegen.i18n', ['locales', 'output']);\n\tconst locales = resolve(root, validator.string(config.i18n.locales, 'codegen.i18n.locales') ?? DEFAULT_I18N_LOCALES);\n\tif (!isDirectory(locales)) {\n\t\tthrow validator.error(configDiagnostics.LOCALES_NOT_FOUND, { locales });\n\t}\n\n\tconst output = resolve(root, validator.string(config.i18n.output, 'codegen.i18n.output') ?? DEFAULT_I18N_OUTPUT);\n\treturn { i18n: { locales, output } };\n}\n\n/**\n * The transform that injects auto imports (`@wolfstar/http-framework/auto-imports`) only runs through `tsdown`'s\n * rolldown pipeline, the same way Nuxt's own auto imports only run through its Vite/webpack build: `tsc` and `none`\n * have no transform step to hook into. `tsdown` is picked as `build.tool` first (see {@link detectBuildTool}) for the\n * same reason — it is the only tool this feature, and this build config in general, treats as the default choice.\n *\n * They are on by default from compatibility version 4 on, where `stars` wires the plugin into the build itself. At 3\n * the plugin is the project's to add, so defaulting them on would promise imports that never get injected.\n */\nfunction resolveImports(\n\troot: string,\n\tbuildTool: StarsBuildTool,\n\tfuture: ResolvedFutureConfig,\n\tconfig: StarsConfig['imports'],\n\tvalidator: Validator\n): ResolvedImportsConfig {\n\tconst defaultDirs = DEFAULT_IMPORTS_DIRS.map((dir) => resolve(root, dir));\n\tconst defaultPresets = [...DEFAULT_IMPORTS_PRESETS];\n\tconst defaultDts = resolve(root, DEFAULT_IMPORTS_DTS);\n\n\tif (config === false) {\n\t\treturn { enabled: false, dirs: defaultDirs, presets: defaultPresets, exclude: [], dts: defaultDts };\n\t}\n\n\tconst forcedOn = config === true;\n\tconst options = forcedOn || config === undefined ? {} : config;\n\tif (typeof options !== 'object' || options === null || Array.isArray(options)) {\n\t\tthrow validator.typeError(\n\t\t\t'imports',\n\t\t\t'an object, `true` or `false`',\n\t\t\toptions,\n\t\t\t'Use `{ dirs, presets, exclude, dts }`, `true` to enable with defaults, or `false` to disable.'\n\t\t);\n\t}\n\n\tvalidator.knownKeys(options, 'imports', ['enabled', 'dirs', 'presets', 'exclude', 'dts']);\n\n\tconst requestedOn = forcedOn || validator.boolean(options.enabled, 'imports.enabled');\n\tif (requestedOn && buildTool !== 'tsdown') {\n\t\tthrow validator.error(configDiagnostics.IMPORTS_REQUIRE_TSDOWN, {});\n\t}\n\n\tconst dirs = (validator.stringArray(options.dirs, 'imports.dirs') ?? [...DEFAULT_IMPORTS_DIRS]).map((dir) => resolve(root, dir));\n\tconst presets = validator.stringArray(options.presets, 'imports.presets') ?? defaultPresets;\n\tconst exclude = validator.stringArray(options.exclude, 'imports.exclude') ?? [];\n\tconst dts = resolve(root, validator.string(options.dts, 'imports.dts') ?? DEFAULT_IMPORTS_DTS);\n\n\tconst enabledByDefault = buildTool === 'tsdown' && future.compatibilityVersion >= STARS_CONFIG_TSDOWN_VERSION;\n\treturn { enabled: requestedOn ?? enabledByDefault, dirs, presets, exclude, dts };\n}\n\nexport function hasDependency(packageJson: PackageJsonLike | null, name: string): boolean {\n\treturn Boolean(packageJson?.dependencies?.[name] ?? packageJson?.devDependencies?.[name]);\n}\n\nfunction readPackageJson(root: string, validator: Validator): PackageJsonLike | null {\n\tconst file = join(root, 'package.json');\n\tif (!isFile(file)) return null;\n\n\ttry {\n\t\tconst parsed: unknown = JSON.parse(readFileSync(file, 'utf-8'));\n\t\treturn parsed !== null && typeof parsed === 'object' ? (parsed as PackageJsonLike) : null;\n\t} catch (error) {\n\t\tthrow validator.error(configDiagnostics.PACKAGE_JSON_INVALID, {\n\t\t\tfile,\n\t\t\tmessage: error instanceof Error ? error.message : String(error),\n\t\t\tcause: error\n\t\t});\n\t}\n}\n\nfunction isFile(path: string): boolean {\n\ttry {\n\t\treturn existsSync(path) && statSync(path).isFile();\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nfunction isDirectory(path: string): boolean {\n\ttry {\n\t\treturn existsSync(path) && statSync(path).isDirectory();\n\t} catch {\n\t\treturn false;\n\t}\n}\n","import { loadConfigFile } from './load.js';\nimport { resolveStarsConfig, type ResolvedStarsConfig } from './resolve.js';\n\nexport interface LoadStarsConfigOptions {\n\t/**\n\t * The directory to discover `stars.config.*` from.\n\t * @default process.cwd()\n\t */\n\tcwd?: string;\n\t/** An explicit configuration file, resolved from `cwd`. */\n\tconfigFile?: string | null;\n\t/**\n\t * Environment used for defaults such as `HTTP_PORT`.\n\t * @default process.env\n\t */\n\tenv?: NodeJS.ProcessEnv;\n}\n\n/**\n * Loads, validates and resolves a project's `stars.config.*`.\n *\n * @throws {Diagnostic} (from `nostics`, via {@link configDiagnostics}) when the configuration file cannot be loaded or contains an invalid option.\n */\nexport async function loadStarsConfig(options: LoadStarsConfigOptions = {}): Promise<ResolvedStarsConfig> {\n\tconst cwd = options.cwd ?? process.cwd();\n\tconst loaded = await loadConfigFile({ cwd, configFile: options.configFile });\n\treturn resolveStarsConfig({ cwd, configFile: loaded.configFile, config: loaded.config, env: options.env });\n}\n\nexport { CONFIG_EXTENSIONS, CONFIG_FILE_NAMES, discoverConfigFile, loadConfigFile } from './load.js';\nexport type { LoadConfigFileOptions, LoadedConfigFile } from './load.js';\nexport {\n\tAUTO_ENV_VERSION,\n\tDEFAULT_COMPATIBILITY_VERSION,\n\tEOL_COMPATIBILITY_VERSIONS,\n\tLATEST_COMPATIBILITY_VERSION,\n\tLEGACY_COMPATIBILITY_VERSION,\n\tSTARS_CONFIG_TSDOWN_VERSION\n} from './compatibility.js';\nexport { resolveEnv } from './env.js';\nexport type { ResolvedEnvConfig } from './env.js';\nexport { configDiagnostics } from './errors.js';\nexport { resolveHooks, STARS_HOOK_NAMES } from './hooks.js';\nexport type { ResolvedHooksConfig } from './hooks.js';\nexport type { ConfigDiagnosticCode } from './errors.js';\nexport { resolveModules } from './modules.js';\nexport { displayPath, readProjectEnvFiles, resolveStarsConfig } from './resolve.js';\nexport type {\n\tPackageJsonLike,\n\tResolveConfigOptions,\n\tResolvedBuildConfig,\n\tResolvedCodegenConfig,\n\tResolvedDevConfig,\n\tResolvedExperimentalConfig,\n\tResolvedFutureConfig,\n\tResolvedNitroConfig,\n\tResolvedI18nCodegenConfig,\n\tResolvedImportsConfig,\n\tResolvedStarsConfig,\n\tResolvedTunnelConfig,\n\tResolvedTypecheckConfig\n} from './resolve.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAkBA,MAAa,oBAAoB,kBAAkB;CAClD,WAAW,SAAS,sDAAsD,KAAK,YAAY;CAC3F,WAAW,CAAC;CACZ,OAAO;EACN,gBAAgB;GACf,MAAM,MAAwB,oCAAoC,EAAE;GACpE,MAAM,OAAyB;EAChC;EACA,sBAAsB;GACrB,MAAM,MAAyC,mBAAmB,EAAE,KAAK,IAAI,EAAE;GAC/E,MAAM,OAA0C;EACjD;EACA,iBAAiB;GAChB,MAAM,MAAyB,kCAAkC,EAAE;GACnE,MAAM,OAA0B;EACjC;EACA,yBAAyB;GACxB,MAAM,MAA0C,oCAAoC,EAAE;GACtF,MAAM,MAA0C,wDAAwD,EAAE,SAAS;EACpH;EACA,oBAAoB;GACnB,MAAM,MAAwB,uBAAuB,EAAE,KAAK;GAC5D,MAAM,OAAyB;EAChC;EACA,yBAAyB;GACxB,MAAM,MAAsC,QAAQ,EAAE,KAAK;GAC3D,MAAM,MAAsC,SAAS,EAAE,KAAK;EAC7D;EACA,qBAAqB;GACpB,MAAM,MAAyB,aAAa,EAAE,MAAM;GACpD,MAAM,OAA0B;EACjC;EACA,6BAA6B;GAC5B,MAAM,MAA0C,qCAAqC,EAAE;GACvF,MAAM,MAA0C,WAAW,EAAE,KAAK;EACnE;EACA,oBAAoB;GACnB,MAAM,MAA4C,qCAAqC,EAAE;GACzF,MAAM,MAA4C,uDAAuD,EAAE,WAAW;EACvH;EACA,+BAA+B;GAC9B,MAAM,OAAyB;GAC/B,MAAM,MAAwB,4EAA4E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CAE1B,IAAI;EACH,MAAM,SAAkB,KAAK,MAAM,aAAa,MAAM,OAAO,CAAC;EAC9D,OAAO,WAAW,QAAQ,OAAO,WAAW,WAAY,SAA6B;CACtF,SAAS,OAAO;EACf,MAAM,UAAU,MAAM,kBAAkB,sBAAsB;GAC7D;GACA,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;GAC9D,OAAO;EACR,CAAC;CACF;AACD;AAEA,SAAS,OAAO,MAAuB;CACtC,IAAI;EACH,OAAO,WAAW,IAAI,KAAK,SAAS,IAAI,CAAC,CAAC,OAAO;CAClD,QAAQ;EACP,OAAO;CACR;AACD;AAEA,SAAS,YAAY,MAAuB;CAC3C,IAAI;EACH,OAAO,WAAW,IAAI,KAAK,SAAS,IAAI,CAAC,CAAC,YAAY;CACvD,QAAQ;EACP,OAAO;CACR;AACD;;;;;;;;;AC7wBA,eAAsB,gBAAgB,UAAkC,CAAC,GAAiC;CACzG,MAAM,MAAM,QAAQ,OAAO,QAAQ,IAAI;CACvC,MAAM,SAAS,MAAM,eAAe;EAAE;EAAK,YAAY,QAAQ;CAAW,CAAC;CAC3E,OAAO,mBAAmB;EAAE;EAAK,YAAY,OAAO;EAAY,QAAQ,OAAO;EAAQ,KAAK,QAAQ;CAAI,CAAC;AAC1G"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["isFile"],"sources":["../../src/config/errors.ts","../../src/config/load.ts","../../src/types/modules.ts","../../src/config/compatibility.ts","../../src/config/env.ts","../../src/config/hooks.ts","../../src/config/modules.ts","../../src/config/validator.ts","../../src/config/resolve.ts","../../src/config/index.ts"],"sourcesContent":["import { defineDiagnostics } from 'nostics';\n\n/**\n * Structured, stable diagnostic codes for every way a `stars.config.*` can fail to load or validate.\n *\n * This is a plain data error (no exit code or terminal formatting), so nothing here reports anywhere on its own —\n * `reporters` stays empty and each call only builds and returns a `Diagnostic`. That keeps it meaningful outside a\n * CLI, e.g. for a dashboard or test that calls {@link loadStarsConfig} directly; `@wolfstar/cli` is what renders it\n * and picks an exit code (`exitCodeOf`).\n *\n * The `sources` field (populated with the configuration file, when there is one) carries the \"which file\" grounding\n * `ConfigError` used to expose as `.file`; the \"which option\" grounding it exposed as `.path` is folded directly into\n * every `why`/`fix` message instead, the way every other diagnostic code already reads.\n *\n * `why` and `fix` are always given the same, fully-typed params object (even when one of them ignores part of it):\n * a bare `() => value` loses nostics' param-type inference (a zero-arg function widens to `unknown` params), so every\n * entry here spells out its shape on both sides instead.\n */\nexport const configDiagnostics = defineDiagnostics({\n\tdocsBase: (code) => `https://stars-components.js.org/docs/config/errors#${code.toLowerCase()}`,\n\treporters: [],\n\tcodes: {\n\t\tROOT_NOT_FOUND: {\n\t\t\twhy: (p: { root: string }) => `The project root does not exist: ${p.root}`,\n\t\t\tfix: (_p: { root: string }) => 'Point `root` to an existing directory, relative to the configuration file.'\n\t\t},\n\t\tPACKAGE_JSON_INVALID: {\n\t\t\twhy: (p: { file: string; message: string }) => `Failed to parse ${p.file}: ${p.message}`,\n\t\t\tfix: (_p: { file: string; message: string }) => 'Fix the JSON syntax of the package.json file.'\n\t\t},\n\t\tENTRY_NOT_FOUND: {\n\t\t\twhy: (p: { entry: string }) => `The entry file does not exist: ${p.entry}`,\n\t\t\tfix: (_p: { entry: string }) => 'Point `entry` to the file that starts the bot, relative to the project root.'\n\t\t},\n\t\tENTRY_DEFAULT_NOT_FOUND: {\n\t\t\twhy: (p: { root: string; defaults: string }) => `Could not find the entry file in ${p.root}`,\n\t\t\tfix: (p: { root: string; defaults: string }) => `Set \\`entry\\` in the configuration, or create one of ${p.defaults}.`\n\t\t},\n\t\tINVALID_BUILD_TOOL: {\n\t\t\twhy: (p: { tool: string }) => `Unknown build tool \"${p.tool}\"`,\n\t\t\tfix: (_p: { tool: string }) => \"Use one of 'tsdown', 'tsc', 'vite', 'none' or 'auto'.\"\n\t\t},\n\t\tEXPERIMENTAL_BUILD_TOOL: {\n\t\t\twhy: (p: { tool: string; flag: string }) => `The '${p.tool}' build tool is experimental`,\n\t\t\tfix: (p: { tool: string; flag: string }) => `Set \\`${p.flag}\\` to true to use it.`\n\t\t},\n\t\tBUILD_TOOL_REQUIRED: {\n\t\t\twhy: (p: { entry: string }) => `The entry ${p.entry} is TypeScript but the build tool is 'none'`,\n\t\t\tfix: (_p: { entry: string }) => \"Set `build.tool` to 'tsdown' or 'tsc', or point `entry` to a JavaScript file.\"\n\t\t},\n\t\tTSCONFIG_EXPLICIT_NOT_FOUND: {\n\t\t\twhy: (p: { tsconfig: string; path: string }) => `The tsconfig file does not exist: ${p.tsconfig}`,\n\t\t\tfix: (p: { tsconfig: string; path: string }) => `Point \\`${p.path}\\` to an existing tsconfig.json, relative to the project root.`\n\t\t},\n\t\tTSCONFIG_NOT_FOUND: {\n\t\t\twhy: (p: { root: string; suggestion: string }) => `Could not find a tsconfig.json in ${p.root}`,\n\t\t\tfix: (p: { root: string; suggestion: string }) => `Create src/tsconfig.json or tsconfig.json, or set \\`${p.suggestion}\\`.`\n\t\t},\n\t\tTSDOWN_OPTIONS_REQUIRE_TSDOWN: {\n\t\t\twhy: (_p: { tool: string }) => '`tsdown` options need the `tsdown` build tool',\n\t\t\tfix: (p: { tool: string }) => `Set \\`build.tool\\` to 'tsdown', or remove \\`tsdown\\` (the build tool is '${p.tool}').`\n\t\t},\n\t\tVITE_OPTIONS_REQUIRE_VITE: {\n\t\t\twhy: (_p: { tool: string }) => '`vite` options need the `vite` build tool',\n\t\t\tfix: (p: { tool: string }) =>\n\t\t\t\t`Set \\`build.tool\\` to 'vite' with \\`experimental.enableVite\\`, or remove \\`vite\\` (the build tool is '${p.tool}').`\n\t\t},\n\t\tTSDOWN_CONFIG_FILE_UNSUPPORTED: {\n\t\t\twhy: (p: { file: string; version: number; legacyVersion: number }) => `\\`${p.file}\\` is not used with compatibility version ${p.version}`,\n\t\t\tfix: (p: { file: string; version: number; legacyVersion: number }) =>\n\t\t\t\t`Move its options into \\`tsdown\\` here and drop ${p.file}. \\`future.compatibilityVersion\\` ${p.legacyVersion} still loads it, but is end-of-life.`\n\t\t},\n\t\tINVALID_TYPE: {\n\t\t\twhy: (p: { path: string; expected: string; value: unknown; fix: string }) =>\n\t\t\t\t`\\`${p.path}\\` must be ${p.expected}, received ${describeValue(p.value)}`,\n\t\t\tfix: (p: { path: string; expected: string; value: unknown; fix: string }) => p.fix\n\t\t},\n\t\tINVALID_COMPATIBILITY_VERSION: {\n\t\t\twhy: (p: { value: unknown; supported: string; latestVersion: number }) => `Unknown compatibility version ${describeValue(p.value)}`,\n\t\t\tfix: (p: { value: unknown; supported: string; latestVersion: number }) =>\n\t\t\t\t`Use one of ${p.supported}; ${p.latestVersion} carries today's defaults.`\n\t\t},\n\t\tCOMPATIBILITY_VERSION_EOL: {\n\t\t\twhy: (p: { version: number; latestVersion: number }) =>\n\t\t\t\t`Compatibility version ${p.version} is end-of-life and will be removed in the next major`,\n\t\t\tfix: (p: { version: number; latestVersion: number }) =>\n\t\t\t\t`Move the options of your tsdown.config.* into \\`tsdown\\` in stars.config, delete that file, then set \\`future.compatibilityVersion\\` to ${p.latestVersion} (or remove it).`\n\t\t},\n\t\tUNKNOWN_OPTION: {\n\t\t\twhy: (p: { path: string; parent: string; known: string }) => `Unknown option \\`${p.path}\\``,\n\t\t\tfix: (p: { path: string; parent: string; known: string }) => `Known options${p.parent ? ` of \\`${p.parent}\\`` : ''}: ${p.known}.`\n\t\t},\n\t\tUNKNOWN_HOOK: {\n\t\t\twhy: (p: { name: string; known: string }) => `Unknown hook \\`${p.name}\\``,\n\t\t\tfix: (p: { name: string; known: string }) => `Known hooks: ${p.known}.`\n\t\t},\n\t\tEXPERIMENT_REQUIRED: {\n\t\t\twhy: (p: { path: string; requires: string; drop: string }) => `\\`${p.path}\\` needs \\`${p.requires}\\``,\n\t\t\tfix: (p: { path: string; requires: string; drop: string }) => `Set \\`${p.requires}\\` to true as well, or drop \\`${p.drop}\\`.`\n\t\t},\n\t\tIMPORTS_REQUIRE_TSDOWN: {\n\t\t\twhy: (_p: {}) => '`imports` requires the `tsdown` build tool',\n\t\t\tfix: (_p: {}) => \"Set `build.tool` to 'tsdown', or remove `imports`/set it to `false`.\"\n\t\t},\n\t\tENV_REQUIRES_ENV_UTILITIES: {\n\t\t\twhy: (_p: {}) => '`env` is enabled, but the project does not depend on `@wolfstar/env-utilities`',\n\t\t\tfix: (_p: {}) => 'Install it with `pnpm add @wolfstar/env-utilities`, or set `env` to `false`.'\n\t\t},\n\t\tLOCALES_NOT_FOUND: {\n\t\t\twhy: (p: { locales: string }) => `The locales directory does not exist: ${p.locales}`,\n\t\t\tfix: (_p: { locales: string }) => 'Point `codegen.i18n.locales` to the base locale directory, relative to the project root.'\n\t\t},\n\t\tINVALID_URL: {\n\t\t\twhy: (p: { url: string; fix: string }) => `Invalid URL \"${p.url}\"`,\n\t\t\tfix: (p: { url: string; fix: string }) => p.fix\n\t\t},\n\t\tTUNNEL_URL_NOT_HTTPS: {\n\t\t\twhy: (p: { url: string }) => `The tunnel URL must be https, received \"${p.url}\"`,\n\t\t\tfix: (_p: { url: string }) => 'Discord only accepts an https interactions endpoint.'\n\t\t},\n\t\tINVALID_CHOICE: {\n\t\t\twhy: (p: { path: string; value: string; allowed: string }) => `Unknown value \"${p.value}\" for \\`${p.path}\\``,\n\t\t\tfix: (p: { path: string; value: string; allowed: string }) => `Use one of ${p.allowed}.`\n\t\t},\n\t\tINVALID_TYPECHECKER: {\n\t\t\twhy: (p: { checker: string }) => `Unknown type checker \"${p.checker}\"`,\n\t\t\tfix: (_p: { checker: string }) => \"Use one of 'tsc', 'golar', 'tsz' or 'auto'.\"\n\t\t},\n\t\tCONFIG_NOT_FOUND: {\n\t\t\twhy: (p: { file: string; cwd: string; names: string }) => `Configuration file not found: ${p.file}`,\n\t\t\tfix: (p: { file: string; cwd: string; names: string }) => `Pass an existing file to --config, or create one of ${p.names} in ${p.cwd}.`\n\t\t},\n\t\tCONFIG_LOAD_FAILED: {\n\t\t\twhy: (p: { message: string }) => `Failed to load the configuration: ${p.message}`,\n\t\t\tfix: (_p: { message: string }) => 'The file must be valid TypeScript/JavaScript and export the configuration as its default export.'\n\t\t},\n\t\tCONFIG_NOT_OBJECT: {\n\t\t\twhy: (_p: {}) => 'The configuration file must export an object as its default export.',\n\t\t\tfix: (_p: {}) => \"Use `export default defineConfig({ ... })` from '@wolfstar/http-framework/config'.\"\n\t\t}\n\t}\n});\n\nexport type ConfigDiagnosticCode = keyof typeof configDiagnostics;\n\nfunction describeValue(value: unknown): string {\n\tif (value === null) return 'null';\n\tif (Array.isArray(value)) return 'an array';\n\tif (typeof value === 'string') return `\"${value}\"`;\n\treturn typeof value === 'object' ? 'an object' : `${typeof value} ${String(value)}`;\n}\n","import { existsSync, statSync } from 'node:fs';\nimport { basename, dirname, join, resolve } from 'node:path';\nimport type { StarsConfig } from '../types/config.js';\nimport { configDiagnostics } from './errors.js';\n\nexport const CONFIG_EXTENSIONS = ['ts', 'mts', 'cts', 'js', 'mjs', 'cjs'] as const;\nexport const CONFIG_FILE_NAMES = CONFIG_EXTENSIONS.map((extension) => `stars.config.${extension}`);\n\nexport interface LoadConfigFileOptions {\n\t/** The directory to discover the configuration file from. */\n\tcwd: string;\n\t/** An explicit configuration file (`--config`), resolved from `cwd`. */\n\tconfigFile?: string | null;\n}\n\nexport interface LoadedConfigFile {\n\t/** The absolute path of the loaded file, `null` when running on defaults. */\n\tconfigFile: string | null;\n\tconfig: StarsConfig;\n}\n\n/**\n * Finds the first `stars.config.*` file in `cwd`, in {@link CONFIG_FILE_NAMES} order.\n */\nexport function discoverConfigFile(cwd: string): string | null {\n\tfor (const name of CONFIG_FILE_NAMES) {\n\t\tconst candidate = join(cwd, name);\n\t\tif (isFile(candidate)) return candidate;\n\t}\n\n\treturn null;\n}\n\n/**\n * Loads the raw configuration object. The loader (`c12`) is imported lazily so\n * commands that never touch the configuration stay fast.\n */\nexport async function loadConfigFile(options: LoadConfigFileOptions): Promise<LoadedConfigFile> {\n\tconst cwd = resolve(options.cwd);\n\tlet file: string | null;\n\n\tif (options.configFile) {\n\t\tfile = resolve(cwd, options.configFile);\n\t\tif (!isFile(file)) {\n\t\t\tthrow configDiagnostics.CONFIG_NOT_FOUND({ file, cwd, names: CONFIG_FILE_NAMES.join(', ') });\n\t\t}\n\t} else {\n\t\tfile = discoverConfigFile(cwd);\n\t\tif (!file) return { configFile: null, config: {} };\n\t}\n\n\tconst { loadConfig } = await import('c12');\n\n\tlet loaded: unknown;\n\ttry {\n\t\tconst result = await loadConfig<StarsConfig>({\n\t\t\tname: 'stars',\n\t\t\tcwd: dirname(file),\n\t\t\tconfigFile: basename(file),\n\t\t\trcFile: false,\n\t\t\tglobalRc: false,\n\t\t\tdotenv: false,\n\t\t\tpackageJson: false,\n\t\t\tdefaults: {}\n\t\t});\n\t\t// c12 merges every layer with the defaults, which turns non-object exports into `{}`: inspect the raw layer.\n\t\tconst layer = result.layers?.find(\n\t\t\t(candidate) => candidate.configFile && resolve(candidate.cwd ?? dirname(file), candidate.configFile) === file\n\t\t);\n\t\tloaded = layer ? layer.config : result.config;\n\t} catch (error) {\n\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\tthrow configDiagnostics.CONFIG_LOAD_FAILED({ message, cause: error, sources: [file] });\n\t}\n\n\tif (loaded === null || typeof loaded !== 'object' || Array.isArray(loaded)) {\n\t\tthrow configDiagnostics.CONFIG_NOT_OBJECT({ sources: [file] });\n\t}\n\n\treturn { configFile: file, config: loaded as StarsConfig };\n}\n\nfunction isFile(path: string): boolean {\n\ttry {\n\t\treturn existsSync(path) && statSync(path).isFile();\n\t} catch {\n\t\treturn false;\n\t}\n}\n","/**\n * A module as listed in `modules` in `stars.config`: a package name (or a file path Node can import) on its own, or\n * a `[specifier, options]` tuple whose options are merged over the module's `defaults`. Falsy entries are dropped, so\n * `modules: [useCache && '@wolfstar/plugin-cache']` works.\n */\nexport type StarsModuleEntry = string | readonly [specifier: string, options?: Record<string, unknown>];\n\n/** One entry of `modules`, normalised. */\nexport interface ResolvedModuleEntry {\n\t/** A package name, or a file path/URL, the module is imported from. */\n\treadonly specifier: string;\n\t/** The options written in `stars.config`, before the module's `defaults` are merged under them. */\n\treadonly options: Readonly<Record<string, unknown>>;\n}\n\n/**\n * A runtime plugin a module registered with `ctx.addPlugin`. Plugins cross from the CLI process into the bot by\n * source, not by value: the entry (or, for the `tsc`/`none` build tools, a `node --import` preload) imports `from` and\n * passes its `export` to `Client.use` — as the plugin itself, or, when it is a function, the result of calling it with\n * `options`.\n */\nexport interface RuntimePluginRegistration {\n\t/** The module that registered it. */\n\treadonly module: string;\n\t/** A package specifier or an absolute file path. */\n\treadonly from: string;\n\t/** @default 'default' */\n\treadonly export: string;\n\t/** JSON-serialisable options handed to the plugin when it is a factory. */\n\treadonly options?: unknown;\n}\n\n/** A module that was installed. */\nexport interface InstalledModule {\n\treadonly name: string;\n\treadonly version?: string;\n}\n\n/** What the installed modules contributed, known once the CLI ran their `setup`. Empty until then. */\nexport interface ModulesRuntime {\n\treadonly modules: readonly InstalledModule[];\n\treadonly plugins: readonly RuntimePluginRegistration[];\n\t/** Packages added to `imports.presets` by `ctx.addImports`. */\n\treadonly imports: readonly string[];\n}\n\nexport const EMPTY_MODULES_RUNTIME: ModulesRuntime = Object.freeze({ modules: [], plugins: [], imports: [] });\n","import type { Diagnostic } from 'nostics';\nimport type { StarsCompatibilityVersion, StarsFutureConfig } from '../types/config.js';\nimport { configDiagnostics } from './errors.js';\nimport type { Validator } from './validator.js';\n\nexport interface ResolvedFutureConfig {\n\treadonly compatibilityVersion: StarsCompatibilityVersion;\n}\n\nexport const LEGACY_COMPATIBILITY_VERSION = 3;\nexport const LATEST_COMPATIBILITY_VERSION = 5;\n/** The version a project without `future.compatibilityVersion` runs on: today, the latest one. */\nexport const DEFAULT_COMPATIBILITY_VERSION = 5;\n/** Versions still accepted but scheduled for removal in the next major. */\nexport const EOL_COMPATIBILITY_VERSIONS: ReadonlySet<number> = new Set([LEGACY_COMPATIBILITY_VERSION]);\n/** From this version on, `tsdown` is configured from `stars.config` alone and auto imports are on by default. */\nexport const STARS_CONFIG_TSDOWN_VERSION = 4;\n/** From this version on, `env` is registered automatically in the built entry. */\nexport const AUTO_ENV_VERSION = 5;\n\nconst COMPATIBILITY_VERSIONS = new Set<number>([LEGACY_COMPATIBILITY_VERSION, STARS_CONFIG_TSDOWN_VERSION, AUTO_ENV_VERSION]);\n\n/**\n * Resolves the Nuxt-style compatibility block. Version 5 is the default and version 4 remains supported. Version 3 is\n * end-of-life: it still resolves, with a warning pushed to `warnings`, and is removed in the next major.\n *\n * New behaviour is gated by a named version constant (such as {@link AUTO_ENV_VERSION}), never by\n * {@link LATEST_COMPATIBILITY_VERSION}: bumping the latest version must not move older versions onto other defaults.\n */\nexport function resolveFuture(config: StarsFutureConfig, validator: Validator, warnings: Diagnostic[]): ResolvedFutureConfig {\n\tif (config === null || typeof config !== 'object' || Array.isArray(config)) {\n\t\tthrow validator.typeError('future', 'an object', config, 'Use `{ compatibilityVersion }`.');\n\t}\n\n\tvalidator.knownKeys(config, 'future', ['compatibilityVersion']);\n\tconst version = config.compatibilityVersion;\n\tif (version === undefined) return { compatibilityVersion: DEFAULT_COMPATIBILITY_VERSION };\n\n\tif (typeof version !== 'number' || !COMPATIBILITY_VERSIONS.has(version)) {\n\t\tthrow validator.error(configDiagnostics.INVALID_COMPATIBILITY_VERSION, {\n\t\t\tvalue: version,\n\t\t\tsupported: [...COMPATIBILITY_VERSIONS].join(', '),\n\t\t\tlatestVersion: LATEST_COMPATIBILITY_VERSION\n\t\t});\n\t}\n\n\tif (EOL_COMPATIBILITY_VERSIONS.has(version)) {\n\t\twarnings.push(validator.error(configDiagnostics.COMPATIBILITY_VERSION_EOL, { version, latestVersion: LATEST_COMPATIBILITY_VERSION }));\n\t}\n\n\treturn { compatibilityVersion: version as StarsCompatibilityVersion };\n}\n","import type { StarsConfig, StarsEnvSetupOptions } from '../types/config.js';\nimport { AUTO_ENV_VERSION, type ResolvedFutureConfig } from './compatibility.js';\nimport { configDiagnostics } from './errors.js';\nimport { hasDependency, type PackageJsonLike, type ResolvedExperimentalConfig } from './resolve.js';\nimport type { Validator } from './validator.js';\n\nexport interface ResolvedEnvConfig {\n\t/** Whether the built entry registers the environment before any other module. */\n\treadonly enabled: boolean;\n\t/** The options handed to `setup()` from `@wolfstar/env-utilities`, as written by the user. */\n\treadonly options: Readonly<StarsEnvSetupOptions>;\n}\n\nconst ENV_UTILITIES = '@wolfstar/env-utilities';\nconst LOADERS = new Set(['node', 'dotenv', 'varlock']);\n\n/**\n * Resolves the `env` block. It is on by default from {@link AUTO_ENV_VERSION} on, but only when the project depends on\n * `@wolfstar/env-utilities` (the module the built entry imports) and does not build through Nitro, whose serverless\n * presets have no `.env` files to load. `true`, `enabled: true` or any option at all is an explicit opt-in, which\n * does require the dependency.\n */\nexport function resolveEnv(\n\tconfig: StarsConfig['env'],\n\tpackageJson: PackageJsonLike | null,\n\tfuture: ResolvedFutureConfig,\n\texperimental: ResolvedExperimentalConfig,\n\tvalidator: Validator\n): ResolvedEnvConfig {\n\tif (config === false) return { enabled: false, options: {} };\n\n\tconst forcedOn = config === true;\n\tconst raw = forcedOn || config === undefined ? {} : config;\n\tif (typeof raw !== 'object' || raw === null || Array.isArray(raw)) {\n\t\tthrow validator.typeError(\n\t\t\t'env',\n\t\t\t'an object, `true` or `false`',\n\t\t\traw,\n\t\t\t'Use `{ path, env, prefix, loader, debug, encoding }`, `true` to enable with defaults, or `false` to disable.'\n\t\t);\n\t}\n\n\tvalidator.knownKeys(raw, 'env', ['enabled', 'path', 'env', 'prefix', 'loader', 'debug', 'encoding']);\n\n\tconst options: StarsEnvSetupOptions = {};\n\tconst path = validator.string(raw.path, 'env.path');\n\tif (path !== undefined) options.path = path;\n\tconst env = validator.string(raw.env, 'env.env');\n\tif (env !== undefined) options.env = env;\n\tconst prefix = validator.string(raw.prefix, 'env.prefix');\n\tif (prefix !== undefined) options.prefix = prefix;\n\tconst loader = validator.string(raw.loader, 'env.loader');\n\tif (loader !== undefined) {\n\t\tif (!LOADERS.has(loader))\n\t\t\tthrow validator.typeError(\n\t\t\t\t'env.loader',\n\t\t\t\t\"'node', 'dotenv' or 'varlock'\",\n\t\t\t\tloader,\n\t\t\t\t\"Use 'node', 'dotenv' or 'varlock', or leave it out to have it detected.\"\n\t\t\t);\n\t\toptions.loader = loader as NonNullable<StarsEnvSetupOptions['loader']>;\n\t}\n\tconst debug = validator.boolean(raw.debug, 'env.debug');\n\tif (debug !== undefined) options.debug = debug;\n\tconst encoding = validator.string(raw.encoding, 'env.encoding');\n\tif (encoding !== undefined) options.encoding = encoding;\n\n\tconst enabled = validator.boolean(raw.enabled, 'env.enabled');\n\tif (enabled === false) return { enabled: false, options };\n\n\tconst installed = hasDependency(packageJson, ENV_UTILITIES);\n\tconst explicit = forcedOn || enabled === true || Object.keys(options).length > 0;\n\tif (explicit && !installed) throw validator.error(configDiagnostics.ENV_REQUIRES_ENV_UTILITIES, {});\n\n\tconst enabledByDefault = installed && future.compatibilityVersion >= AUTO_ENV_VERSION && !experimental.enableNitro;\n\treturn { enabled: explicit || enabledByDefault, options };\n}\n","import type { StarsHookName, StarsHooks, StarsHooksConfig } from '../types/hooks.js';\nimport { configDiagnostics } from './errors.js';\nimport type { Validator } from './validator.js';\n\ntype AnyHook = StarsHooks[StarsHookName];\n\n/** Every hook of `stars.config`, flattened to its full name, with its callbacks in declaration order. */\nexport type ResolvedHooksConfig = Readonly<Partial<Record<StarsHookName, readonly AnyHook[]>>>;\n\nexport const STARS_HOOK_NAMES = [\n\t'config:resolved',\n\t'env:options',\n\t'prepare:before',\n\t'prepare:done',\n\t'builder:created',\n\t'tsdown:options',\n\t'build:before',\n\t'build:done',\n\t'dev:start',\n\t'dev:restart',\n\t'dev:close'\n] as const satisfies readonly StarsHookName[];\n\nconst KNOWN = new Set<string>(STARS_HOOK_NAMES);\n\n/**\n * Flattens and validates `hooks`. `hookable`'s own `flatHooks` is not used: it would split an array of callbacks into\n * `name:0`, `name:1` and silently drop anything that is not a function, while a typo in a hook name here should fail\n * loudly rather than register a hook that never runs.\n */\nexport function resolveHooks(config: StarsHooksConfig | undefined, validator: Validator): ResolvedHooksConfig {\n\tif (config === undefined) return {};\n\n\tconst resolved: Partial<Record<StarsHookName, AnyHook[]>> = {};\n\tconst visit = (value: unknown, path: string): void => {\n\t\tif (value === null || typeof value !== 'object' || Array.isArray(value)) {\n\t\t\tthrow validator.typeError(\n\t\t\t\tpath ? `hooks.${path}` : 'hooks',\n\t\t\t\t'an object',\n\t\t\t\tvalue,\n\t\t\t\t\"Use `{ 'build:done'() {} }` or `{ build: { done() {} } }`.\"\n\t\t\t);\n\t\t}\n\n\t\tfor (const [key, entry] of Object.entries(value)) {\n\t\t\tconst name = path ? `${path}:${key}` : key;\n\t\t\tif (entry !== null && typeof entry === 'object' && !Array.isArray(entry)) {\n\t\t\t\tvisit(entry, name);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (!KNOWN.has(name)) throw validator.error(configDiagnostics.UNKNOWN_HOOK, { name, known: STARS_HOOK_NAMES.join(', ') });\n\n\t\t\tconst callbacks: unknown[] = Array.isArray(entry) ? entry : [entry];\n\t\t\tfor (const callback of callbacks) {\n\t\t\t\tif (typeof callback !== 'function') {\n\t\t\t\t\tthrow validator.typeError(`hooks.${name}`, 'a function or an array of functions', callback, 'Pass a function.');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t(resolved[name as StarsHookName] ??= []).push(...(callbacks as AnyHook[]));\n\t\t}\n\t};\n\n\tvisit(config, '');\n\treturn resolved;\n}\n","import type { ResolvedModuleEntry } from '../types/modules.js';\nimport type { Validator } from './validator.js';\n\nconst FIX =\n\t\"Use a package name, or `[name, options]` to pass options: `modules: ['@wolfstar/plugin-cache', ['@wolfstar/plugin-gateway', { shards: 2 }]]`.\";\n\n/** Normalises `modules`: falsy entries are dropped, a bare specifier gets empty options. */\nexport function resolveModules(config: unknown, validator: Validator): readonly ResolvedModuleEntry[] {\n\tif (config === undefined) return [];\n\tif (!Array.isArray(config)) throw validator.typeError('modules', 'an array', config, FIX);\n\n\tconst resolved: ResolvedModuleEntry[] = [];\n\tfor (const [index, entry] of (config as unknown[]).entries()) {\n\t\tif (!entry) continue;\n\t\tconst path = `modules[${index}]`;\n\n\t\tif (typeof entry === 'string') {\n\t\t\tif (entry.length === 0) throw validator.typeError(path, 'a non-empty module specifier', entry, FIX);\n\t\t\tresolved.push({ specifier: entry, options: {} });\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!Array.isArray(entry)) throw validator.typeError(path, 'a module specifier or a `[specifier, options]` tuple', entry, FIX);\n\n\t\tif (entry.length > 2) {\n\t\t\tthrow validator.typeError(path, 'a `[specifier, options]` tuple with at most two members', entry, FIX);\n\t\t}\n\n\t\tconst [specifier, options] = entry as [unknown, unknown?];\n\t\tif (typeof specifier !== 'string' || specifier.length === 0) {\n\t\t\tthrow validator.typeError(`${path}[0]`, 'a non-empty module specifier', specifier, FIX);\n\t\t}\n\n\t\tif (options !== undefined && (options === null || typeof options !== 'object' || Array.isArray(options))) {\n\t\t\tthrow validator.typeError(`${path}[1]`, 'an object', options, FIX);\n\t\t}\n\n\t\tresolved.push({ specifier, options: (options as Record<string, unknown> | undefined) ?? {} });\n\t}\n\n\treturn resolved;\n}\n","import type { Diagnostic } from 'nostics';\nimport { configDiagnostics } from './errors.js';\n\n/** Validates raw `stars.config` values, throwing a `configDiagnostics` diagnostic grounded in the configuration file. */\nexport class Validator {\n\tpublic constructor(private readonly file: string | null) {}\n\n\tprivate get sources(): string[] | undefined {\n\t\treturn this.file ? [this.file] : undefined;\n\t}\n\n\tpublic error<Handle extends (params: any) => Diagnostic>(handle: Handle, params: Parameters<Handle>[0]): Diagnostic {\n\t\treturn handle({ ...params, sources: this.sources });\n\t}\n\n\tpublic knownKeys(value: object, path: string, keys: readonly string[]): void {\n\t\tfor (const key of Object.keys(value)) {\n\t\t\tif (keys.includes(key)) continue;\n\t\t\tconst fullPath = path ? `${path}.${key}` : key;\n\t\t\tthrow this.error(configDiagnostics.UNKNOWN_OPTION, { path: fullPath, parent: path, known: keys.join(', ') });\n\t\t}\n\t}\n\n\tpublic string(value: unknown, path: string): string | undefined {\n\t\tif (value === undefined) return undefined;\n\t\tif (typeof value !== 'string' || value.length === 0) throw this.typeError(path, 'a non-empty string', value);\n\t\treturn value;\n\t}\n\n\tpublic boolean(value: unknown, path: string): boolean | undefined {\n\t\tif (value === undefined) return undefined;\n\t\tif (typeof value !== 'boolean') throw this.typeError(path, 'a boolean', value);\n\t\treturn value;\n\t}\n\n\t/** A plain object passed through as-is (e.g. raw `vite`/`tsdown` config merged into the project's own). */\n\tpublic plainObject(value: unknown, path: string): Record<string, unknown> | undefined {\n\t\tif (value === undefined) return undefined;\n\t\tif (value === null || typeof value !== 'object' || Array.isArray(value)) throw this.typeError(path, 'an object', value);\n\t\treturn value as Record<string, unknown>;\n\t}\n\n\tpublic stringArray(value: unknown, path: string): string[] | undefined {\n\t\tif (value === undefined) return undefined;\n\t\tif (!Array.isArray(value) || !value.every((item) => typeof item === 'string')) throw this.typeError(path, 'an array of strings', value);\n\t\treturn value;\n\t}\n\n\tpublic nonNegativeNumber(value: unknown, path: string): number | undefined {\n\t\tif (value === undefined) return undefined;\n\t\tif (typeof value !== 'number' || !Number.isFinite(value) || value < 0) throw this.typeError(path, 'a non-negative number', value);\n\t\treturn value;\n\t}\n\n\tpublic stringRecord(value: unknown, path: string): Record<string, string> | undefined {\n\t\tif (value === undefined) return undefined;\n\t\tif (value === null || typeof value !== 'object' || Array.isArray(value) || !Object.values(value).every((item) => typeof item === 'string')) {\n\t\t\tthrow this.typeError(path, 'an object of string values', value);\n\t\t}\n\t\treturn value as Record<string, string>;\n\t}\n\n\t/** A generic \"wrong type\" diagnostic. `fix` defaults to the standard \"set it or remove it\" wording. */\n\tpublic typeError(path: string, expected: string, value: unknown, fix?: string): Diagnostic {\n\t\treturn this.error(configDiagnostics.INVALID_TYPE, {\n\t\t\tpath,\n\t\t\texpected,\n\t\t\tvalue,\n\t\t\tfix: fix ?? `Set \\`${path}\\` to ${expected} or remove it to use the default.`\n\t\t});\n\t}\n}\n","import { existsSync, readFileSync, statSync } from 'node:fs';\nimport { basename, dirname, extname, isAbsolute, join, relative, resolve } from 'node:path';\nimport type { Diagnostic } from 'nostics';\nimport type {\n\tStarsBuildTool,\n\tStarsConfig,\n\tStarsDevConfig,\n\tStarsEnvSetupOptions,\n\tStarsExperimentalConfig,\n\tStarsLogLevel,\n\tStarsTypechecker\n} from '../types/config.js';\nimport { EMPTY_MODULES_RUNTIME, type ModulesRuntime, type ResolvedModuleEntry } from '../types/modules.js';\nimport { LEGACY_COMPATIBILITY_VERSION, STARS_CONFIG_TSDOWN_VERSION, resolveFuture, type ResolvedFutureConfig } from './compatibility.js';\nimport { resolveEnv, type ResolvedEnvConfig } from './env.js';\nimport { configDiagnostics } from './errors.js';\nimport { resolveHooks, type ResolvedHooksConfig } from './hooks.js';\nimport { resolveModules } from './modules.js';\nimport { Validator } from './validator.js';\n\nexport type { ResolvedFutureConfig } from './compatibility.js';\n\nexport interface PackageJsonLike {\n\tname?: string;\n\t/** `tsdown` reads its options from here as well as from a `tsdown.config.*`. */\n\ttsdown?: unknown;\n\tversion?: string;\n\tmain?: string;\n\ttype?: string;\n\tscripts?: Record<string, string>;\n\tdependencies?: Record<string, string>;\n\tdevDependencies?: Record<string, string>;\n}\n\nexport interface ResolvedBuildConfig {\n\treadonly tool: StarsBuildTool;\n\t/** Absolute output directory. */\n\treadonly outDir: string;\n\t/** Absolute `tsconfig.json` used by `tsc`, `null` for the other tools. */\n\treadonly tsconfig: string | null;\n\t/** Absolute path of the file `node` runs, i.e. the built entry (or the entry itself when `tool` is `none`). */\n\treadonly output: string;\n\t/**\n\t * Absolute path of the build tool's own configuration file (`tsdown.config.*`, `vite.config.*`), `null` when the\n\t * tool has none — which is always the case for `tsdown` from `future.compatibilityVersion` 4 on, where the build is\n\t * configured from `stars.config` alone.\n\t */\n\treadonly configFile: string | null;\n}\n\nexport interface ResolvedTypecheckConfig {\n\treadonly enabled: boolean;\n\t/** Absolute `tsconfig.json` the type checker runs against, `null` when it could not be found. */\n\treadonly tsconfig: string | null;\n\t/** The type checker to run, with `'auto'` already resolved. */\n\treadonly checker: StarsTypechecker;\n}\n\nexport type ResolvedTunnelConfig =\n\t| { readonly mode: 'off' }\n\t/** A `cloudflared` quick tunnel, whose hostname is only known once it is up. */\n\t| { readonly mode: 'quick'; readonly path: string; readonly updateEndpoint: boolean }\n\t/** An https URL the user already serves. */\n\t| { readonly mode: 'url'; readonly url: string; readonly path: string; readonly updateEndpoint: boolean };\n\nexport interface ResolvedDevLogsConfig {\n\t/** The channels shown at start, `null` for every channel. */\n\treadonly channels: readonly string[] | null;\n\treadonly levels: readonly StarsLogLevel[];\n\t/** Absolute directory of the per-run log files, `null` when disabled. */\n\treadonly dir: string | null;\n\treadonly keep: number;\n}\n\nexport interface ResolvedDevCommandsConfig {\n\treadonly refresh: 'prompt' | 'auto' | 'off';\n}\n\nexport interface ResolvedDevConfig {\n\treadonly banner: readonly string[] | false | null;\n\treadonly layout: 'auto' | 'dashboard' | 'panel';\n\treadonly logs: ResolvedDevLogsConfig;\n\treadonly commands: ResolvedDevCommandsConfig;\n\treadonly hmr: boolean;\n\treadonly watch: readonly string[];\n\treadonly ignore: readonly string[];\n\treadonly debounce: number;\n\treadonly env: Readonly<Record<string, string>>;\n\treadonly nodeArgs: readonly string[];\n\treadonly args: readonly string[];\n\treadonly url: string | null;\n\treadonly health: string | null;\n\treadonly killTimeout: number;\n\treadonly typecheck: ResolvedTypecheckConfig;\n\treadonly tunnel: ResolvedTunnelConfig;\n\t/** Absolute path of the file the dev session's logs are mirrored into, `null` when disabled. */\n\treadonly logFile: string | null;\n}\n\nexport interface ResolvedNitroConfig {\n\treadonly [option: string]: unknown;\n\treadonly preset: string;\n}\n\nexport interface ResolvedExperimentalConfig {\n\treadonly enableVite: boolean;\n\treadonly enableExternalVite: boolean;\n\treadonly enableNitro: boolean;\n\treadonly nitro: ResolvedNitroConfig;\n}\n\nexport interface ResolvedImportsConfig {\n\treadonly enabled: boolean;\n\t/** Directory glob patterns, relative to the project root (the way `unimport` scans them). */\n\treadonly dirs: readonly string[];\n\treadonly presets: readonly string[];\n\treadonly exclude: readonly string[];\n\t/** Absolute path of the generated declaration file. */\n\treadonly dts: string;\n}\n\nexport interface ResolvedI18nCodegenConfig {\n\treadonly locales: string;\n\treadonly output: string;\n}\n\nexport interface ResolvedCodegenConfig {\n\treadonly i18n: ResolvedI18nCodegenConfig | null;\n}\n\nexport interface ResolvedStarsConfig {\n\t/** Absolute path of the configuration file, `null` when running on defaults. */\n\treadonly configFile: string | null;\n\t/** The directory the CLI was invoked from. */\n\treadonly cwd: string;\n\t/** Absolute project root. */\n\treadonly root: string;\n\treadonly packageJson: PackageJsonLike | null;\n\t/** Absolute source entry. */\n\treadonly entry: string;\n\treadonly build: ResolvedBuildConfig;\n\treadonly dev: ResolvedDevConfig;\n\treadonly codegen: ResolvedCodegenConfig;\n\treadonly imports: ResolvedImportsConfig;\n\treadonly env: ResolvedEnvConfig;\n\t/** The `hooks` block, flattened to full hook names (`build:done`). */\n\treadonly hooks: ResolvedHooksConfig;\n\t/** The `modules` block, normalised. */\n\treadonly modules: readonly ResolvedModuleEntry[];\n\t/** What the installed modules contributed. Empty until the CLI ran their `setup`. */\n\treadonly runtime: ModulesRuntime;\n\treadonly experimental: ResolvedExperimentalConfig;\n\treadonly future: ResolvedFutureConfig;\n\t/** Raw options merged into `vite.config.*`. */\n\treadonly vite: Readonly<Record<string, unknown>>;\n\t/** The `tsdown` build's options: merged over `tsdown.config.*` at compatibility version 3, the whole build from 4 on. */\n\treadonly tsdown: Readonly<Record<string, unknown>>;\n\t/** Non-fatal diagnostics (e.g. an end-of-life compatibility version), for the host to report. */\n\treadonly warnings: readonly Diagnostic[];\n}\n\nexport interface ResolveConfigOptions {\n\tcwd: string;\n\tconfigFile: string | null;\n\tconfig: StarsConfig;\n\tenv?: NodeJS.ProcessEnv;\n\t/**\n\t * The variables the bot will load, when the host resolved them itself (e.g. through `varlock load`). Used instead\n\t * of the project's env files for the defaults read from them, such as the `dev.url` port.\n\t */\n\tprojectEnv?: Readonly<Record<string, string>>;\n}\n\nexport const DEFAULT_ENTRIES = ['src/main.ts', 'src/main.js', 'src/index.ts', 'src/index.js'] as const;\nexport const DEFAULT_IGNORE = ['**/node_modules/**', '**/dist/**', '**/.git/**'] as const;\nexport const DEFAULT_DEBOUNCE = 150;\nexport const DEFAULT_KILL_TIMEOUT = 5000;\nexport const DEFAULT_NODE_ARGS = ['--enable-source-maps'] as const;\nexport const DEFAULT_DEV_PORT = 3000;\nexport const DEFAULT_I18N_LOCALES = 'src/locales/en-US';\nexport const DEFAULT_I18N_OUTPUT = 'src/@types/i18next.d.ts';\nexport const DEFAULT_IMPORTS_DIRS = ['src/lib/**', 'src/utils/**'] as const;\nexport const DEFAULT_IMPORTS_PRESETS = ['@wolfstar/http-framework', '@wolfstar/decorators', '@wolfstar/env-utilities'] as const;\nexport const DEFAULT_IMPORTS_DTS = '.stars/imports.d.ts';\nexport const DEFAULT_DEV_LOG_FILE = '.stars/dev.log';\nexport const DEFAULT_TUNNEL_PATH = '/';\n/** Every level `dev.logs.levels` accepts, from the most verbose to the most severe. */\nexport const LOG_LEVELS = ['trace', 'debug', 'info', 'warn', 'error'] as const satisfies readonly StarsLogLevel[];\n/** `trace` is the per-request noise: it starts hidden, and the dev UI turns it on. */\nexport const DEFAULT_LOG_LEVELS = ['error', 'warn', 'info', 'debug'] as const satisfies readonly StarsLogLevel[];\nexport const DEFAULT_LOGS_KEEP = 10;\n\nconst BUILD_TOOLS = new Set<string>(['tsdown', 'tsc', 'none', 'vite', 'auto']);\nconst TYPECHECKERS = new Set<string>(['tsc', 'golar', 'tsz', 'auto']);\nconst DEV_LAYOUTS = ['auto', 'dashboard', 'panel'] as const;\nconst COMMAND_REFRESH_MODES = ['prompt', 'auto', 'off'] as const;\nconst VITE_CONFIG_FILES = ['vite.config.ts', 'vite.config.mts', 'vite.config.cts', 'vite.config.js', 'vite.config.mjs', 'vite.config.cjs'];\nconst TSDOWN_CONFIG_FILES = [\n\t'tsdown.config.ts',\n\t'tsdown.config.mts',\n\t'tsdown.config.cts',\n\t'tsdown.config.js',\n\t'tsdown.config.mjs',\n\t'tsdown.config.cjs',\n\t'tsdown.config.json'\n];\nconst TYPESCRIPT_EXTENSIONS = new Set(['.ts', '.mts', '.cts']);\n\n/**\n * Applies defaults, validates every option and resolves all paths to absolute ones.\n *\n * @throws {Diagnostic} (from `nostics`, via {@link configDiagnostics}) with an actionable `fix` on the first invalid option.\n */\nexport function resolveStarsConfig(options: ResolveConfigOptions): ResolvedStarsConfig {\n\tconst cwd = resolve(options.cwd);\n\tconst env = options.env ?? process.env;\n\tconst file = options.configFile;\n\tconst config = options.config;\n\tconst validator = new Validator(file);\n\tconst warnings: Diagnostic[] = [];\n\n\tvalidator.knownKeys(config, '', [\n\t\t'root',\n\t\t'entry',\n\t\t'build',\n\t\t'dev',\n\t\t'codegen',\n\t\t'imports',\n\t\t'env',\n\t\t'hooks',\n\t\t'modules',\n\t\t'experimental',\n\t\t'future',\n\t\t'vite',\n\t\t'tsdown'\n\t]);\n\tconst baseDirectory = file ? dirname(file) : cwd;\n\n\tconst root = resolve(baseDirectory, validator.string(config.root, 'root') ?? '.');\n\tif (!isDirectory(root)) {\n\t\tthrow validator.error(configDiagnostics.ROOT_NOT_FOUND, { root });\n\t}\n\n\tconst packageJson = readPackageJson(root, validator);\n\tconst experimental = resolveExperimental(config.experimental ?? {}, validator);\n\tconst future = resolveFuture(config.future ?? {}, validator, warnings);\n\tconst entry = resolveEntry(root, validator.string(config.entry, 'entry'), validator);\n\t// The tool-specific blocks are read before the build so a project that only declares `tsdown: {}` still resolves\n\t// `build.tool: 'auto'` to `tsdown`: configuring a tool is as clear a signal as depending on it.\n\tconst vite = validator.plainObject(config.vite, 'vite') ?? {};\n\tconst tsdown = validator.plainObject(config.tsdown, 'tsdown') ?? {};\n\tconst build = resolveBuild(root, entry, packageJson, config.build ?? {}, experimental, future, Object.keys(tsdown).length > 0, validator);\n\tconst hooks = resolveHooks(config.hooks, validator);\n\tconst modules = resolveModules(config.modules, validator);\n\tconst envConfig = resolveEnv(config.env, packageJson, future, experimental, validator);\n\tconst dev = resolveDev(root, entry, packageJson, config.dev ?? {}, env, envConfig.options, options.projectEnv, validator);\n\tconst codegen = resolveCodegen(root, config.codegen ?? {}, validator);\n\tconst imports = resolveImports(root, build.tool, future, config.imports, validator);\n\n\tif (Object.keys(tsdown).length > 0 && build.tool !== 'tsdown') {\n\t\tthrow validator.error(configDiagnostics.TSDOWN_OPTIONS_REQUIRE_TSDOWN, { tool: build.tool });\n\t}\n\n\tif (Object.keys(vite).length > 0 && build.tool !== 'vite') {\n\t\tthrow validator.error(configDiagnostics.VITE_OPTIONS_REQUIRE_VITE, { tool: build.tool });\n\t}\n\n\treturn {\n\t\tconfigFile: file,\n\t\tcwd,\n\t\troot,\n\t\tpackageJson,\n\t\tentry,\n\t\tbuild,\n\t\tdev,\n\t\tcodegen,\n\t\timports,\n\t\tenv: envConfig,\n\t\thooks,\n\t\tmodules,\n\t\truntime: EMPTY_MODULES_RUNTIME,\n\t\texperimental,\n\t\tfuture,\n\t\tvite,\n\t\ttsdown,\n\t\twarnings\n\t};\n}\n\n/**\n * Presents an absolute path relative to `root` when possible, for display purposes.\n */\nexport function displayPath(root: string, path: string): string {\n\tconst rel = relative(root, path);\n\tif (!rel) return '.';\n\treturn rel.startsWith('..') || isAbsolute(rel) ? path : rel;\n}\n\nfunction resolveEntry(root: string, configured: string | undefined, validator: Validator): string {\n\tif (configured !== undefined) {\n\t\tconst entry = resolve(root, configured);\n\t\tif (!isFile(entry)) {\n\t\t\tthrow validator.error(configDiagnostics.ENTRY_NOT_FOUND, { entry });\n\t\t}\n\t\treturn entry;\n\t}\n\n\tfor (const candidate of DEFAULT_ENTRIES) {\n\t\tconst entry = join(root, candidate);\n\t\tif (isFile(entry)) return entry;\n\t}\n\n\tthrow validator.error(configDiagnostics.ENTRY_DEFAULT_NOT_FOUND, { root, defaults: DEFAULT_ENTRIES.join(', ') });\n}\n\nfunction resolveBuild(\n\troot: string,\n\tentry: string,\n\tpackageJson: PackageJsonLike | null,\n\tconfig: NonNullable<StarsConfig['build']>,\n\texperimental: ResolvedExperimentalConfig,\n\tfuture: ResolvedFutureConfig,\n\thasTsdownOptions: boolean,\n\tvalidator: Validator\n): ResolvedBuildConfig {\n\tvalidator.knownKeys(config, 'build', ['tool', 'outDir', 'tsconfig']);\n\n\tconst requested = validator.string(config.tool, 'build.tool') ?? 'auto';\n\tif (!BUILD_TOOLS.has(requested)) {\n\t\tthrow validator.error(configDiagnostics.INVALID_BUILD_TOOL, { tool: requested });\n\t}\n\n\tif (requested === 'vite' && !experimental.enableVite) {\n\t\tthrow validator.error(configDiagnostics.EXPERIMENTAL_BUILD_TOOL, { tool: 'vite', flag: 'experimental.enableVite' });\n\t}\n\n\tconst isTypeScriptEntry = TYPESCRIPT_EXTENSIONS.has(extname(entry));\n\tconst tool: StarsBuildTool =\n\t\trequested === 'auto'\n\t\t\t? detectBuildTool(root, packageJson, isTypeScriptEntry, experimental, future, hasTsdownOptions)\n\t\t\t: (requested as StarsBuildTool);\n\n\tif (tool === 'none' && isTypeScriptEntry) {\n\t\tthrow validator.error(configDiagnostics.BUILD_TOOL_REQUIRED, { entry: displayPath(root, entry) });\n\t}\n\n\t// Nitro owns its own output layout; anything else keeps the plain `dist` convention.\n\tconst defaultOutDir = experimental.enableNitro ? '.output' : 'dist';\n\tconst outDir = resolve(root, validator.string(config.outDir, 'build.outDir') ?? defaultOutDir);\n\n\tlet tsconfig: string | null = null;\n\tconst configuredTsconfig = validator.string(config.tsconfig, 'build.tsconfig');\n\tif (configuredTsconfig !== undefined) {\n\t\ttsconfig = resolve(root, configuredTsconfig);\n\t\tif (!isFile(tsconfig)) {\n\t\t\tthrow validator.error(configDiagnostics.TSCONFIG_EXPLICIT_NOT_FOUND, { tsconfig, path: 'build.tsconfig' });\n\t\t}\n\t} else if (tool === 'tsc' || tool === 'tsdown') {\n\t\t// `tsdown` only looks for a `tsconfig.json` next to the project root, so a bot keeping its sources' one in\n\t\t// `src/` (the layout both the scaffold and the examples use) would silently build without its paths and\n\t\t// target. Resolving it here is what makes the `tsdown` build need no configuration of its own.\n\t\ttsconfig = [join(root, 'src', 'tsconfig.json'), join(root, 'tsconfig.json')].find((candidate) => isFile(candidate)) ?? null;\n\t\tif (!tsconfig && tool === 'tsc') {\n\t\t\tthrow validator.error(configDiagnostics.TSCONFIG_NOT_FOUND, { root, suggestion: 'build.tsconfig' });\n\t\t}\n\t}\n\n\t// Nitro always writes its server entry to `<outDir>/server/index.mjs`, regardless of the project's own entry\n\t// file name or `package.json#main` — it is Nitro's output, not a build of the project's own entry file.\n\tconst output = experimental.enableNitro\n\t\t? join(outDir, 'server', 'index.mjs')\n\t\t: tool === 'none'\n\t\t\t? entry\n\t\t\t: resolveBuildOutput(root, entry, outDir, packageJson);\n\n\tlet configFile = findConfigFile(root, tool === 'tsdown' ? TSDOWN_CONFIG_FILES : tool === 'vite' ? VITE_CONFIG_FILES : []);\n\t// `tsdown` reads `package.json#tsdown` when no configuration file is around, so it counts as one here.\n\tif (tool === 'tsdown' && configFile === null && packageJson?.tsdown !== undefined) configFile = join(root, 'package.json');\n\n\t// Compatibility version 4 builds `tsdown` from this file alone. A `tsdown.config.*` left behind would keep the\n\t// plugins and entry points it declares out of the build, so it is reported rather than quietly ignored.\n\tif (tool === 'tsdown' && configFile !== null && future.compatibilityVersion >= STARS_CONFIG_TSDOWN_VERSION) {\n\t\tthrow validator.error(configDiagnostics.TSDOWN_CONFIG_FILE_UNSUPPORTED, {\n\t\t\tfile: displayPath(root, configFile),\n\t\t\tversion: future.compatibilityVersion,\n\t\t\tlegacyVersion: LEGACY_COMPATIBILITY_VERSION\n\t\t});\n\t}\n\n\treturn { tool, outDir, tsconfig, output, configFile };\n}\n\nfunction findConfigFile(root: string, names: readonly string[]): string | null {\n\tfor (const name of names) {\n\t\tconst candidate = join(root, name);\n\t\tif (isFile(candidate)) return candidate;\n\t}\n\n\treturn null;\n}\n\nfunction detectBuildTool(\n\troot: string,\n\tpackageJson: PackageJsonLike | null,\n\tisTypeScriptEntry: boolean,\n\texperimental: ResolvedExperimentalConfig,\n\tfuture: ResolvedFutureConfig,\n\thasTsdownOptions: boolean\n): StarsBuildTool {\n\t// Vite only wins the detection once the project opted into it; without the flag a `vite.config.*` is somebody\n\t// else's (a dashboard, a docs site) and must not take the bot's build over.\n\tif (experimental.enableVite) {\n\t\tconst hasVite = VITE_CONFIG_FILES.some((name) => isFile(join(root, name))) || hasDependency(packageJson, 'vite');\n\t\tif (hasVite) return 'vite';\n\t}\n\n\tif (hasTsdownOptions) return 'tsdown';\n\n\t// From compatibility version 4 on, `tsdown` is the build of a TypeScript project rather than one of the options:\n\t// there is no `tsdown.config.*` left to detect it from, and a missing dependency is reported by the builder with\n\t// an install hint instead of silently falling back to `tsc`.\n\tif (future.compatibilityVersion >= STARS_CONFIG_TSDOWN_VERSION) return isTypeScriptEntry ? 'tsdown' : 'none';\n\n\tconst hasTsdown = TSDOWN_CONFIG_FILES.some((name) => isFile(join(root, name))) || hasDependency(packageJson, 'tsdown');\n\tif (hasTsdown) return 'tsdown';\n\tif (isTypeScriptEntry) return 'tsc';\n\treturn 'none';\n}\n\n/**\n * Resolves the `experimental` block. Every flag is a boolean defaulting to `false`, the way Nuxt's own experimental\n * flags are declared, and the ones that build on each other are checked here rather than surfacing later as a\n * confusing runtime failure.\n */\nfunction resolveExperimental(config: StarsExperimentalConfig, validator: Validator): ResolvedExperimentalConfig {\n\tif (config === null || typeof config !== 'object' || Array.isArray(config)) {\n\t\tthrow validator.typeError('experimental', 'an object', config, 'Use `{ enableVite, enableExternalVite, enableNitro, nitro }`.');\n\t}\n\n\tvalidator.knownKeys(config, 'experimental', ['enableVite', 'enableExternalVite', 'enableNitro', 'nitro']);\n\tconst enableVite = validator.boolean(config.enableVite, 'experimental.enableVite') ?? false;\n\tconst enableExternalVite = validator.boolean(config.enableExternalVite, 'experimental.enableExternalVite') ?? false;\n\tconst enableNitro = validator.boolean(config.enableNitro, 'experimental.enableNitro') ?? false;\n\n\tif (enableExternalVite && !enableVite) {\n\t\tthrow validator.error(configDiagnostics.EXPERIMENT_REQUIRED, {\n\t\t\tpath: 'experimental.enableExternalVite',\n\t\t\trequires: 'experimental.enableVite',\n\t\t\tdrop: 'enableExternalVite'\n\t\t});\n\t}\n\n\tif (enableNitro && !enableVite) {\n\t\tthrow validator.error(configDiagnostics.EXPERIMENT_REQUIRED, {\n\t\t\tpath: 'experimental.enableNitro',\n\t\t\trequires: 'experimental.enableVite',\n\t\t\tdrop: 'enableNitro'\n\t\t});\n\t}\n\n\tconst rawNitro = 'nitro' in config ? config.nitro : undefined;\n\tif (rawNitro !== undefined && !enableNitro) {\n\t\tthrow validator.error(configDiagnostics.EXPERIMENT_REQUIRED, {\n\t\t\tpath: 'experimental.nitro',\n\t\t\trequires: 'experimental.enableNitro',\n\t\t\tdrop: 'nitro'\n\t\t});\n\t}\n\tif (rawNitro !== undefined && (rawNitro === null || typeof rawNitro !== 'object' || Array.isArray(rawNitro))) {\n\t\tthrow validator.typeError('experimental.nitro', 'an object', rawNitro, 'Use `{ preset }`.');\n\t}\n\tconst preset = validator.string(rawNitro?.preset, 'experimental.nitro.preset') ?? 'node-server';\n\n\treturn { enableVite, enableExternalVite, enableNitro, nitro: { ...rawNitro, preset } };\n}\n\nfunction resolveBuildOutput(root: string, entry: string, outDir: string, packageJson: PackageJsonLike | null): string {\n\tif (packageJson?.main) return resolve(root, packageJson.main);\n\n\tconst extension = extname(entry);\n\tconst outputExtension = extension === '.mts' ? '.mjs' : extension === '.cts' ? '.cjs' : '.js';\n\treturn join(outDir, `${basename(entry, extension)}${outputExtension}`);\n}\n\nconst ENV_PORT_KEYS = ['HTTP_PORT', 'PORT'] as const;\n\n/**\n * Reads the project's environment layers from `src/.env*` and `.env*` into a plain object, the way `stars dev` and\n * `stars commands` need it:\n * these files are only loaded into `process.env` by the bot itself once it starts (see `@wolfstar/env-utilities`),\n * so by the time the CLI runs they are not there yet. This is a minimal line reader, not a full dotenv\n * implementation — quoting is stripped, but expansion (`dotenv-expand`) is not. Earlier files win, matching\n * dotenv's own precedence.\n */\nexport function readProjectEnvFiles(root: string, environment = 'development', options: { path?: string } = {}): Record<string, string> {\n\tconst result: Record<string, string> = {};\n\tconst suffixes = [`.${environment}.local`, ...(environment === 'test' ? [] : ['.local']), `.${environment}`, ''];\n\t// A custom `env.path` replaces both default locations, the way it does in `@wolfstar/env-utilities`.\n\tconst bases = options.path ? [options.path] : [join('src', '.env'), '.env'];\n\tconst files = suffixes.flatMap((suffix) => bases.map((base) => `${base}${suffix}`));\n\n\tfor (const file of files) {\n\t\t// `resolve`, not `join`: an absolute `env.path` is used as-is, as `@wolfstar/env-utilities` itself does.\n\t\tconst path = resolve(root, file);\n\t\tif (!isFile(path)) continue;\n\n\t\tlet contents: string;\n\t\ttry {\n\t\t\tcontents = readFileSync(path, 'utf-8');\n\t\t} catch {\n\t\t\tcontinue;\n\t\t}\n\n\t\tfor (const line of contents.split(/\\r?\\n/)) {\n\t\t\tconst match = /^\\s*(?:export\\s+)?([A-Za-z_][A-Za-z0-9_]*)\\s*=\\s*(.*)$/.exec(line);\n\t\t\tif (!match) continue;\n\n\t\t\tconst key = match[1]!;\n\t\t\tif (key in result) continue;\n\t\t\tresult[key] = match[2]!.trim().replace(/^['\"]|['\"]$/g, '');\n\t\t}\n\t}\n\n\treturn result;\n}\n\nfunction readDevPortFromEnvFile(\n\troot: string,\n\tenvironment: string,\n\tenvOptions: Readonly<StarsEnvSetupOptions>,\n\tprojectEnv: Readonly<Record<string, string>> | undefined\n): string | null {\n\t// Varlock resolves its `.env.schema` on its own terms (and may pull values from elsewhere), so a dotenv file is\n\t// not what the bot loads: without the values the host resolved (`projectEnv`), there is nothing to read.\n\tif (projectEnv === undefined && envOptions.loader === 'varlock') return null;\n\n\tconst values = projectEnv ?? readProjectEnvFiles(root, environment, { path: envOptions.path });\n\tfor (const key of ENV_PORT_KEYS) {\n\t\tif (values[key]) return values[key];\n\t}\n\n\treturn null;\n}\n\nfunction resolveDev(\n\troot: string,\n\tentry: string,\n\tpackageJson: PackageJsonLike | null,\n\tconfig: NonNullable<StarsConfig['dev']>,\n\tenv: NodeJS.ProcessEnv,\n\tenvOptions: Readonly<StarsEnvSetupOptions>,\n\tprojectEnv: Readonly<Record<string, string>> | undefined,\n\tvalidator: Validator\n): ResolvedDevConfig {\n\tvalidator.knownKeys(config, 'dev', [\n\t\t'banner',\n\t\t'layout',\n\t\t'logs',\n\t\t'commands',\n\t\t'hmr',\n\t\t'watch',\n\t\t'ignore',\n\t\t'debounce',\n\t\t'env',\n\t\t'nodeArgs',\n\t\t'args',\n\t\t'url',\n\t\t'health',\n\t\t'killTimeout',\n\t\t'typecheck',\n\t\t'tunnel',\n\t\t'logFile'\n\t]);\n\n\tconst watch = (validator.stringArray(config.watch, 'dev.watch') ?? [displayPath(root, dirname(entry))]).map((path) => resolve(root, path));\n\tconst ignore = validator.stringArray(config.ignore, 'dev.ignore') ?? [...DEFAULT_IGNORE];\n\tconst debounce = validator.nonNegativeNumber(config.debounce, 'dev.debounce') ?? DEFAULT_DEBOUNCE;\n\tconst devEnv = validator.stringRecord(config.env, 'dev.env') ?? {};\n\tconst nodeArgs = validator.stringArray(config.nodeArgs, 'dev.nodeArgs') ?? [...DEFAULT_NODE_ARGS];\n\tconst args = validator.stringArray(config.args, 'dev.args') ?? [];\n\tconst killTimeout = validator.nonNegativeNumber(config.killTimeout, 'dev.killTimeout') ?? DEFAULT_KILL_TIMEOUT;\n\tconst health = validator.string(config.health, 'dev.health') ?? null;\n\n\tlet url = validator.string(config.url, 'dev.url') ?? null;\n\tif (url !== null) {\n\t\ttry {\n\t\t\tnew URL(url);\n\t\t} catch {\n\t\t\tthrow validator.error(configDiagnostics.INVALID_URL, { url, fix: 'Use an absolute URL such as http://localhost:3000.' });\n\t\t}\n\t} else {\n\t\t// Mirrors Vite's and Nuxt's own dev servers: a URL is shown without any configuration. The exact host\n\t\t// (`localhost` vs `127.0.0.1`) is resolved at runtime by `stars dev`, once it knows which one is actually reachable.\n\t\tconst port =\n\t\t\tdevEnv.HTTP_PORT ??\n\t\t\tenv.HTTP_PORT ??\n\t\t\treadDevPortFromEnvFile(root, envOptions.env ?? env.NODE_ENV ?? 'development', envOptions, projectEnv) ??\n\t\t\tString(DEFAULT_DEV_PORT);\n\t\turl = /^\\d+$/.test(port) ? `http://localhost:${port}` : `http://localhost:${DEFAULT_DEV_PORT}`;\n\t}\n\n\tconst typecheck = resolveTypecheck(root, packageJson, config.typecheck, validator);\n\tconst tunnel = resolveTunnel(config.tunnel, validator);\n\tconst logFile = config.logFile === false ? null : resolve(root, validator.string(config.logFile, 'dev.logFile') ?? DEFAULT_DEV_LOG_FILE);\n\tconst banner =\n\t\tconfig.banner === false\n\t\t\t? false\n\t\t\t: typeof config.banner === 'string'\n\t\t\t\t? config.banner.split('\\n')\n\t\t\t\t: (validator.stringArray(config.banner, 'dev.banner') ?? null);\n\n\tconst layout = oneOf(validator.string(config.layout, 'dev.layout'), 'dev.layout', DEV_LAYOUTS, validator) ?? 'auto';\n\tconst logs = resolveDevLogs(root, config.logs, validator);\n\tconst commands = resolveDevCommands(config.commands, validator);\n\tconst hmr = validator.boolean(config.hmr, 'dev.hmr') ?? true;\n\n\treturn {\n\t\twatch,\n\t\tignore,\n\t\tdebounce,\n\t\tenv: devEnv,\n\t\tnodeArgs,\n\t\targs,\n\t\turl,\n\t\thealth,\n\t\tkillTimeout,\n\t\ttypecheck,\n\t\ttunnel,\n\t\tlogFile,\n\t\tbanner,\n\t\tlayout,\n\t\tlogs,\n\t\tcommands,\n\t\thmr\n\t};\n}\n\n/** A string option limited to a fixed set of values. */\nfunction oneOf<const Value extends string>(\n\tvalue: string | undefined,\n\tpath: string,\n\tallowed: readonly Value[],\n\tvalidator: Validator\n): Value | undefined {\n\tif (value === undefined) return undefined;\n\tif ((allowed as readonly string[]).includes(value)) return value as Value;\n\tthrow validator.error(configDiagnostics.INVALID_CHOICE, { path, value, allowed: allowed.map((item) => `'${item}'`).join(', ') });\n}\n\n/**\n * Resolves `dev.logs`: which channels and levels the dev UI starts with (the log file is never filtered), and the\n * optional directory of per-run log files.\n */\nfunction resolveDevLogs(root: string, config: StarsDevConfig['logs'], validator: Validator): ResolvedDevLogsConfig {\n\tif (config === undefined) return { channels: null, levels: [...DEFAULT_LOG_LEVELS], dir: null, keep: DEFAULT_LOGS_KEEP };\n\tif (config === null || typeof config !== 'object' || Array.isArray(config)) {\n\t\tthrow validator.typeError('dev.logs', 'an object', config, 'Use `{ channels, levels, dir, keep }`.');\n\t}\n\n\tvalidator.knownKeys(config, 'dev.logs', ['channels', 'levels', 'dir', 'keep']);\n\tconst channels = validator.stringArray(config.channels, 'dev.logs.channels') ?? null;\n\tconst levels = (validator.stringArray(config.levels, 'dev.logs.levels') ?? [...DEFAULT_LOG_LEVELS]).map((level, index) =>\n\t\toneOf(level, `dev.logs.levels[${index}]`, LOG_LEVELS, validator)!\n\t);\n\tconst dir = config.dir === false || config.dir === undefined ? null : resolve(root, validator.string(config.dir, 'dev.logs.dir')!);\n\t// A count of files, the one of the current run included: a fraction or zero has no meaning.\n\tconst keep = validator.nonNegativeNumber(config.keep, 'dev.logs.keep') ?? DEFAULT_LOGS_KEEP;\n\tif (!Number.isInteger(keep) || keep < 1) throw validator.typeError('dev.logs.keep', 'a positive integer', config.keep);\n\n\treturn { channels, levels, dir, keep };\n}\n\nfunction resolveDevCommands(config: StarsDevConfig['commands'], validator: Validator): ResolvedDevCommandsConfig {\n\tif (config === undefined) return { refresh: 'prompt' };\n\tif (config === null || typeof config !== 'object' || Array.isArray(config)) {\n\t\tthrow validator.typeError('dev.commands', 'an object', config, \"Use `{ refresh: 'prompt' | 'auto' | 'off' }`.\");\n\t}\n\n\tvalidator.knownKeys(config, 'dev.commands', ['refresh']);\n\treturn {\n\t\trefresh: oneOf(validator.string(config.refresh, 'dev.commands.refresh'), 'dev.commands.refresh', COMMAND_REFRESH_MODES, validator) ?? 'prompt'\n\t};\n}\n\n/**\n * Resolves `dev.typecheck`. The tsconfig is looked up the same way the `tsc` build tool looks up its own, so a\n * project building with `tsdown` still gets `tsc --watch --noEmit` on the right project file.\n */\nfunction resolveTypecheck(\n\troot: string,\n\tpackageJson: PackageJsonLike | null,\n\tconfig: StarsDevConfig['typecheck'],\n\tvalidator: Validator\n): ResolvedTypecheckConfig {\n\tif (config === undefined || config === false) return { enabled: false, tsconfig: null, checker: detectTypechecker(packageJson) };\n\n\tlet configured: string | undefined;\n\tlet requestedChecker = 'auto';\n\tif (config !== true) {\n\t\tif (config === null || typeof config !== 'object' || Array.isArray(config)) {\n\t\t\tthrow validator.typeError(\n\t\t\t\t'dev.typecheck',\n\t\t\t\t'a boolean or an object',\n\t\t\t\tconfig,\n\t\t\t\t'Use `true` to type-check with the project tsconfig, `{ tsconfig }` to pick one, or `false` to disable it.'\n\t\t\t);\n\t\t}\n\n\t\tvalidator.knownKeys(config, 'dev.typecheck', ['tsconfig', 'checker']);\n\t\tconfigured = validator.string(config.tsconfig, 'dev.typecheck.tsconfig');\n\t\trequestedChecker = validator.string(config.checker, 'dev.typecheck.checker') ?? 'auto';\n\t\tif (!TYPECHECKERS.has(requestedChecker)) {\n\t\t\tthrow validator.error(configDiagnostics.INVALID_TYPECHECKER, { checker: requestedChecker });\n\t\t}\n\t}\n\n\tconst checker: StarsTypechecker = requestedChecker === 'auto' ? detectTypechecker(packageJson) : (requestedChecker as StarsTypechecker);\n\n\tif (configured !== undefined) {\n\t\tconst tsconfig = resolve(root, configured);\n\t\tif (!isFile(tsconfig)) {\n\t\t\tthrow validator.error(configDiagnostics.TSCONFIG_EXPLICIT_NOT_FOUND, { tsconfig, path: 'dev.typecheck.tsconfig' });\n\t\t}\n\t\treturn { enabled: true, tsconfig, checker };\n\t}\n\n\tconst found = [join(root, 'src', 'tsconfig.json'), join(root, 'tsconfig.json')].find((candidate) => isFile(candidate)) ?? null;\n\tif (!found) {\n\t\tthrow validator.error(configDiagnostics.TSCONFIG_NOT_FOUND, { root, suggestion: 'dev.typecheck.tsconfig' });\n\t}\n\n\treturn { enabled: true, tsconfig: found, checker };\n}\n\n/**\n * Picks the type checker when `dev.typecheck.checker` is `auto`: `golar` when the project already depends on it\n * (it wraps TypeScript and is what this repository's own `typecheck` scripts run), `tsc` otherwise. `tsz` is never\n * picked automatically — it is an early, tsc-compatible alternative a project opts into.\n */\nfunction detectTypechecker(packageJson: PackageJsonLike | null): StarsTypechecker {\n\treturn hasDependency(packageJson, 'golar') ? 'golar' : 'tsc';\n}\n\n/**\n * Resolves `dev.tunnel`: `true` (or `{}`) opens a `cloudflared` quick tunnel, a string (or `{ url }`) is an https\n * URL the user already serves and the CLI only checks.\n */\nfunction resolveTunnel(config: StarsDevConfig['tunnel'], validator: Validator): ResolvedTunnelConfig {\n\tif (config === undefined || config === false) return { mode: 'off' };\n\n\tlet url: string | undefined;\n\tlet updateEndpoint = false;\n\tlet path = DEFAULT_TUNNEL_PATH;\n\n\tif (typeof config === 'string') {\n\t\turl = config;\n\t} else if (config !== true) {\n\t\tif (config === null || typeof config !== 'object' || Array.isArray(config)) {\n\t\t\tthrow validator.typeError(\n\t\t\t\t'dev.tunnel',\n\t\t\t\t'a boolean, an https URL or an object',\n\t\t\t\tconfig,\n\t\t\t\t'Use `true` for a cloudflared quick tunnel, an https URL you already serve, or `false` to disable it.'\n\t\t\t);\n\t\t}\n\n\t\tvalidator.knownKeys(config, 'dev.tunnel', ['url', 'updateEndpoint', 'path']);\n\t\turl = validator.string(config.url, 'dev.tunnel.url');\n\t\tupdateEndpoint = validator.boolean(config.updateEndpoint, 'dev.tunnel.updateEndpoint') ?? false;\n\t\tpath = validator.string(config.path, 'dev.tunnel.path') ?? DEFAULT_TUNNEL_PATH;\n\t}\n\n\tif (url === undefined) return { mode: 'quick', path, updateEndpoint };\n\n\t// Discord only accepts an https interactions endpoint.\n\tlet parsed: URL;\n\ttry {\n\t\tparsed = new URL(url);\n\t} catch {\n\t\tthrow validator.error(configDiagnostics.INVALID_URL, { url, fix: 'Use an absolute https URL such as https://bot.example.com.' });\n\t}\n\n\tif (parsed.protocol !== 'https:') {\n\t\tthrow validator.error(configDiagnostics.TUNNEL_URL_NOT_HTTPS, { url });\n\t}\n\n\treturn { mode: 'url', url, path, updateEndpoint };\n}\n\nfunction resolveCodegen(root: string, config: NonNullable<StarsConfig['codegen']>, validator: Validator): ResolvedCodegenConfig {\n\tvalidator.knownKeys(config, 'codegen', ['i18n']);\n\n\tif (config.i18n === false) return { i18n: null };\n\n\tif (config.i18n === undefined) {\n\t\tconst locales = join(root, DEFAULT_I18N_LOCALES);\n\t\treturn { i18n: isDirectory(locales) ? { locales, output: join(root, DEFAULT_I18N_OUTPUT) } : null };\n\t}\n\n\tif (config.i18n === null || typeof config.i18n !== 'object') {\n\t\tthrow validator.typeError(\n\t\t\t'codegen.i18n',\n\t\t\t'an object or `false`',\n\t\t\tconfig.i18n,\n\t\t\t'Use `{ locales, output }` to configure it or `false` to disable it.'\n\t\t);\n\t}\n\n\tvalidator.knownKeys(config.i18n, 'codegen.i18n', ['locales', 'output']);\n\tconst locales = resolve(root, validator.string(config.i18n.locales, 'codegen.i18n.locales') ?? DEFAULT_I18N_LOCALES);\n\tif (!isDirectory(locales)) {\n\t\tthrow validator.error(configDiagnostics.LOCALES_NOT_FOUND, { locales });\n\t}\n\n\tconst output = resolve(root, validator.string(config.i18n.output, 'codegen.i18n.output') ?? DEFAULT_I18N_OUTPUT);\n\treturn { i18n: { locales, output } };\n}\n\n/**\n * The transform that injects auto imports (`@wolfstar/http-framework/auto-imports`) only runs through `tsdown`'s\n * rolldown pipeline, the same way Nuxt's own auto imports only run through its Vite/webpack build: `tsc` and `none`\n * have no transform step to hook into. `tsdown` is picked as `build.tool` first (see {@link detectBuildTool}) for the\n * same reason — it is the only tool this feature, and this build config in general, treats as the default choice.\n *\n * They are on by default from compatibility version 4 on, where `stars` wires the plugin into the build itself. At 3\n * the plugin is the project's to add, so defaulting them on would promise imports that never get injected.\n */\nfunction resolveImports(\n\troot: string,\n\tbuildTool: StarsBuildTool,\n\tfuture: ResolvedFutureConfig,\n\tconfig: StarsConfig['imports'],\n\tvalidator: Validator\n): ResolvedImportsConfig {\n\tconst defaultDirs = DEFAULT_IMPORTS_DIRS.map((dir) => resolve(root, dir));\n\tconst defaultPresets = [...DEFAULT_IMPORTS_PRESETS];\n\tconst defaultDts = resolve(root, DEFAULT_IMPORTS_DTS);\n\n\tif (config === false) {\n\t\treturn { enabled: false, dirs: defaultDirs, presets: defaultPresets, exclude: [], dts: defaultDts };\n\t}\n\n\tconst forcedOn = config === true;\n\tconst options = forcedOn || config === undefined ? {} : config;\n\tif (typeof options !== 'object' || options === null || Array.isArray(options)) {\n\t\tthrow validator.typeError(\n\t\t\t'imports',\n\t\t\t'an object, `true` or `false`',\n\t\t\toptions,\n\t\t\t'Use `{ dirs, presets, exclude, dts }`, `true` to enable with defaults, or `false` to disable.'\n\t\t);\n\t}\n\n\tvalidator.knownKeys(options, 'imports', ['enabled', 'dirs', 'presets', 'exclude', 'dts']);\n\n\tconst requestedOn = forcedOn || validator.boolean(options.enabled, 'imports.enabled');\n\tif (requestedOn && buildTool !== 'tsdown') {\n\t\tthrow validator.error(configDiagnostics.IMPORTS_REQUIRE_TSDOWN, {});\n\t}\n\n\tconst dirs = (validator.stringArray(options.dirs, 'imports.dirs') ?? [...DEFAULT_IMPORTS_DIRS]).map((dir) => resolve(root, dir));\n\tconst presets = validator.stringArray(options.presets, 'imports.presets') ?? defaultPresets;\n\tconst exclude = validator.stringArray(options.exclude, 'imports.exclude') ?? [];\n\tconst dts = resolve(root, validator.string(options.dts, 'imports.dts') ?? DEFAULT_IMPORTS_DTS);\n\n\tconst enabledByDefault = buildTool === 'tsdown' && future.compatibilityVersion >= STARS_CONFIG_TSDOWN_VERSION;\n\treturn { enabled: requestedOn ?? enabledByDefault, dirs, presets, exclude, dts };\n}\n\nexport function hasDependency(packageJson: PackageJsonLike | null, name: string): boolean {\n\treturn Boolean(packageJson?.dependencies?.[name] ?? packageJson?.devDependencies?.[name]);\n}\n\nfunction readPackageJson(root: string, validator: Validator): PackageJsonLike | null {\n\tconst file = join(root, 'package.json');\n\tif (!isFile(file)) return null;\n\n\ttry {\n\t\tconst parsed: unknown = JSON.parse(readFileSync(file, 'utf-8'));\n\t\treturn parsed !== null && typeof parsed === 'object' ? (parsed as PackageJsonLike) : null;\n\t} catch (error) {\n\t\tthrow validator.error(configDiagnostics.PACKAGE_JSON_INVALID, {\n\t\t\tfile,\n\t\t\tmessage: error instanceof Error ? error.message : String(error),\n\t\t\tcause: error\n\t\t});\n\t}\n}\n\nfunction isFile(path: string): boolean {\n\ttry {\n\t\treturn existsSync(path) && statSync(path).isFile();\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nfunction isDirectory(path: string): boolean {\n\ttry {\n\t\treturn existsSync(path) && statSync(path).isDirectory();\n\t} catch {\n\t\treturn false;\n\t}\n}\n","import { loadConfigFile } from './load.js';\nimport { resolveStarsConfig, type ResolvedStarsConfig } from './resolve.js';\n\nexport interface LoadStarsConfigOptions {\n\t/**\n\t * The directory to discover `stars.config.*` from.\n\t * @default process.cwd()\n\t */\n\tcwd?: string;\n\t/** An explicit configuration file, resolved from `cwd`. */\n\tconfigFile?: string | null;\n\t/**\n\t * Environment used for defaults such as `HTTP_PORT`.\n\t * @default process.env\n\t */\n\tenv?: NodeJS.ProcessEnv;\n}\n\n/**\n * Loads, validates and resolves a project's `stars.config.*`.\n *\n * @throws {Diagnostic} (from `nostics`, via {@link configDiagnostics}) when the configuration file cannot be loaded or contains an invalid option.\n */\nexport async function loadStarsConfig(options: LoadStarsConfigOptions = {}): Promise<ResolvedStarsConfig> {\n\tconst cwd = options.cwd ?? process.cwd();\n\tconst loaded = await loadConfigFile({ cwd, configFile: options.configFile });\n\treturn resolveStarsConfig({ cwd, configFile: loaded.configFile, config: loaded.config, env: options.env });\n}\n\nexport { CONFIG_EXTENSIONS, CONFIG_FILE_NAMES, discoverConfigFile, loadConfigFile } from './load.js';\nexport type { LoadConfigFileOptions, LoadedConfigFile } from './load.js';\nexport {\n\tAUTO_ENV_VERSION,\n\tDEFAULT_COMPATIBILITY_VERSION,\n\tEOL_COMPATIBILITY_VERSIONS,\n\tLATEST_COMPATIBILITY_VERSION,\n\tLEGACY_COMPATIBILITY_VERSION,\n\tSTARS_CONFIG_TSDOWN_VERSION\n} from './compatibility.js';\nexport { resolveEnv } from './env.js';\nexport type { ResolvedEnvConfig } from './env.js';\nexport { configDiagnostics } from './errors.js';\nexport { resolveHooks, STARS_HOOK_NAMES } from './hooks.js';\nexport type { ResolvedHooksConfig } from './hooks.js';\nexport type { ConfigDiagnosticCode } from './errors.js';\nexport { resolveModules } from './modules.js';\nexport { DEFAULT_LOG_LEVELS, LOG_LEVELS, displayPath, readProjectEnvFiles, resolveStarsConfig } from './resolve.js';\nexport type {\n\tPackageJsonLike,\n\tResolveConfigOptions,\n\tResolvedBuildConfig,\n\tResolvedCodegenConfig,\n\tResolvedDevCommandsConfig,\n\tResolvedDevConfig,\n\tResolvedDevLogsConfig,\n\tResolvedExperimentalConfig,\n\tResolvedFutureConfig,\n\tResolvedNitroConfig,\n\tResolvedI18nCodegenConfig,\n\tResolvedImportsConfig,\n\tResolvedStarsConfig,\n\tResolvedTunnelConfig,\n\tResolvedTypecheckConfig\n} from './resolve.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAkBA,MAAa,oBAAoB,kBAAkB;CAClD,WAAW,SAAS,sDAAsD,KAAK,YAAY;CAC3F,WAAW,CAAC;CACZ,OAAO;EACN,gBAAgB;GACf,MAAM,MAAwB,oCAAoC,EAAE;GACpE,MAAM,OAAyB;EAChC;EACA,sBAAsB;GACrB,MAAM,MAAyC,mBAAmB,EAAE,KAAK,IAAI,EAAE;GAC/E,MAAM,OAA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O;EAAE,SAAS,eAAe;EAAkB;EAAM;EAAS;EAAS;CAAI;AAChF;AAEA,SAAgB,cAAc,aAAqC,MAAuB;CACzF,OAAO,QAAQ,aAAa,eAAe,SAAS,aAAa,kBAAkB,KAAK;AACzF;AAEA,SAAS,gBAAgB,MAAc,WAA8C;CACpF,MAAM,OAAO,KAAK,MAAM,cAAc;CACtC,IAAI,CAAC,OAAO,IAAI,GAAG,OAAO;CAE1B,IAAI;EACH,MAAM,SAAkB,KAAK,MAAM,aAAa,MAAM,OAAO,CAAC;EAC9D,OAAO,WAAW,QAAQ,OAAO,WAAW,WAAY,SAA6B;CACtF,SAAS,OAAO;EACf,MAAM,UAAU,MAAM,kBAAkB,sBAAsB;GAC7D;GACA,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;GAC9D,OAAO;EACR,CAAC;CACF;AACD;AAEA,SAAS,OAAO,MAAuB;CACtC,IAAI;EACH,OAAO,WAAW,IAAI,KAAK,SAAS,IAAI,CAAC,CAAC,OAAO;CAClD,QAAQ;EACP,OAAO;CACR;AACD;AAEA,SAAS,YAAY,MAAuB;CAC3C,IAAI;EACH,OAAO,WAAW,IAAI,KAAK,SAAS,IAAI,CAAC,CAAC,YAAY;CACvD,QAAQ;EACP,OAAO;CACR;AACD;;;;;;;;;ACh3BA,eAAsB,gBAAgB,UAAkC,CAAC,GAAiC;CACzG,MAAM,MAAM,QAAQ,OAAO,QAAQ,IAAI;CACvC,MAAM,SAAS,MAAM,eAAe;EAAE;EAAK,YAAY,QAAQ;CAAW,CAAC;CAC3E,OAAO,mBAAmB;EAAE;EAAK,YAAY,OAAO;EAAY,QAAQ,OAAO;EAAQ,KAAK,QAAQ;CAAI,CAAC;AAC1G"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-BFRzY_rK.d.ts","names":[],"sources":["../../src/types/modules.ts","../../src/config/validator.ts","../../src/config/compatibility.ts","../../src/config/env.ts","../../src/config/hooks.ts","../../src/config/resolve.ts","../../src/types/builder.ts","../../src/types/hooks.ts","../../src/types/config.ts","../../src/config.ts"],"mappings":";;;;;;;;KAKY,sCAAsC,mBAAmB,UAAU;;UAG9D;;WAEP;;WAEA,SAAS,SAAS;;;;;;;;UASX;;WAEP;;WAEA;;WAEA;;WAEA;;;UAIO;WACP;WACA;;;UAIO;WACP,kBAAkB;WAClB,kBAAkB;;WAElB;;cAGG,uBAAuB;;;;cC1CvB;mBACwB;EAApC,YAAoC;cAExB;EAIL,MAAM,gBAAgB,gBAAgB,YAAY,QAAQ,QAAQ,QAAQ,WAAW,aAAa;EAIlG,UAAU,eAAe,cAAc;EAQvC,OAAO,gBAAgB;EAMvB,QAAQ,gBAAgB;;EAOxB,YAAY,gBAAgB,eAAe;EAM3C,YAAY,gBAAgB;EAM5B,kBAAkB,gBAAgB;EAMlC,aAAa,gBAAgB,eAAe;;EAS5C,UAAU,cAAc,kBAAkB,gBAAgB,eAAe;;;;UC1DhE;WACP,sBAAsB;;cAGnB;cACA;;cAEA;;cAEA,4BAA4B;;cAE5B;;cAEA;;;UCZI;;WAEP;;WAEA,SAAS,SAAS;;;;;;;;iBAYZ,WACf,QAAQ,oBACR,aAAa,wBACb,QAAQ,sBACR,cAAc,4BACd,WAAW,YACT;;;KCxBE,UAAU,WAAW;;KAGd,sBAAsB,SAAS,QAAQ,OAAO,wBAAwB;cAErE;;;;;;iBAqBG,aAAa,QAAQ,8BAA8B,WAAW,YAAY;;;UCTzE;EAChB;;EAEA;EACA;EACA;EACA;EACA,UAAU;EACV,eAAe;EACf,kBAAkB;;UAGF;WACP,MAAM;;WAEN;;WAEA;;WAEA;;;;;;WAMA;;UAGO;WACP;;WAEA;;WAEA,SAAS;;KAGP;WACE;;;;WAEA;WAAwB;WAAuB;;;;WAE/C;WAAsB;WAAsB;WAAuB;;UAEhE;WACP;WACA;WACA;WACA;WACA,KAAK,SAAS;WACd;WACA;WACA;WACA;WACA;WACA,WAAW;WACX,QAAQ;;WAER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