Skip to content

craft-hub / loadProjectConfig

Function: loadProjectConfig() ​

loadProjectConfig(projectPath): Promise<{ $schema?: string; capabilities?: { descriptions?: Record<string, string | {[key: string]: string; default: string; }>; disabledPresets?: string[]; hidden?: string[]; inputs?: Record<string, Record<string, { argumentStyle?: ... | ... | ...; default?: ... | ...; description?: ... | ... | ...; flag: string; label?: ... | ... | ...; options: ...[]; pattern?: ... | ...; private?: ... | ... | ...; redactInHistory?: ... | ... | ...; required?: ... | ... | ...; requiredWhen?: ... | ... | ...; type: "select"; visibleWhen?: ... | ... | ...; } | { argumentStyle: "positional"; default?: ... | ...; description?: ... | ... | ...; flag?: undefined; label?: ... | ... | ...; options: ...[]; pattern?: ... | ...; private?: ... | ... | ...; redactInHistory?: ... | ... | ...; required?: ... | ... | ...; requiredWhen?: ... | ... | ...; type: "select"; visibleWhen?: ... | ... | ...; } | { argumentStyle?: ... | ... | ...; default?: ... | ...; description?: ... | ... | ...; flag: string; label?: ... | ... | ...; options?: undefined; pattern?: ... | ...; private?: ... | ... | ...; redactInHistory?: ... | ... | ...; required?: ... | ... | ...; requiredWhen?: ... | ... | ...; type: "text"; visibleWhen?: ... | ... | ...; } | { argumentStyle: "positional"; default?: ... | ...; description?: ... | ... | ...; flag?: undefined; label?: ... | ... | ...; options?: undefined; pattern?: ... | ...; private?: ... | ... | ...; redactInHistory?: ... | ... | ...; required?: ... | ... | ...; requiredWhen?: ... | ... | ...; type: "text"; visibleWhen?: ... | ... | ...; } | { argumentStyle?: undefined; default?: ... | ... | ...; description?: ... | ... | ...; flag: string; label?: ... | ... | ...; omitArgument?: ... | ...; options?: undefined; pattern?: undefined; private?: ... | ... | ...; redactInHistory?: ... | ... | ...; required?: ... | ... | ...; requiredWhen?: ... | ... | ...; type: "boolean"; visibleWhen?: ... | ... | ...; } | { argumentStyle?: undefined; default?: ... | ... | ...; description?: ... | ... | ...; flag?: undefined; label?: ... | ... | ...; omitArgument: true; options?: undefined; pattern?: undefined; private?: ... | ... | ...; redactInHistory?: ... | ... | ...; required?: ... | ... | ...; requiredWhen?: ... | ... | ...; type: "boolean"; visibleWhen?: ... | ... | ...; }>>; operations?: Record<string, { customVersionInput?: string; kind: "release"; prereleaseIdInput?: string; requiredBranch?: string; requiresCleanGit?: boolean; versionInput?: string; workflowPath?: string; }>; skillInputs?: Record<string, Record<string, { default?: ... | ...; description?: ... | ... | ...; label?: ... | ... | ...; options: ...[]; pattern?: ... | ...; private?: ... | ... | ...; redactInHistory?: ... | ... | ...; required?: ... | ... | ...; requiredWhen?: ... | ... | ...; type: "select"; visibleWhen?: ... | ... | ...; } | { default?: ... | ...; description?: ... | ... | ...; label?: ... | ... | ...; options?: undefined; pattern?: ... | ...; private?: ... | ... | ...; redactInHistory?: ... | ... | ...; required?: ... | ... | ...; requiredWhen?: ... | ... | ...; type: "text"; visibleWhen?: ... | ... | ...; }>>; skills?: { disabled?: object[]; disabledPlugins?: string[]; enabled?: object[]; enabledPlugins?: string[]; mode?: "auto" | "manual"; }; }; defaults?: { agent?: string; }; extensions?: Record<string, unknown>; packages?: Record<string, { description?: string | {[key: string]: string; default: string; }; featured?: boolean; hidden?: boolean; order?: number; quickActions?: string[]; readme?: string; }>; project?: { color?: "blue" | "cyan" | "green" | "orange" | "pink" | "purple" | "red" | "yellow"; description?: string | {[key: string]: string; default: string; }; icon?: string; name?: string; quickActions?: string[]; readme?: string; }; version: 1; } | undefined>

Defined in: packages/craft-hub/src/config.ts:33

Load optional project-owned metadata without requiring configuration.

Parameters ​

projectPath ​

string

Returns ​

Promise<{ $schema?: string; capabilities?: { descriptions?: Record<string, string | {[key: string]: string; default: string; }>; disabledPresets?: string[]; hidden?: string[]; inputs?: Record<string, Record<string, { argumentStyle?: ... | ... | ...; default?: ... | ...; description?: ... | ... | ...; flag: string; label?: ... | ... | ...; options: ...[]; pattern?: ... | ...; private?: ... | ... | ...; redactInHistory?: ... | ... | ...; required?: ... | ... | ...; requiredWhen?: ... | ... | ...; type: "select"; visibleWhen?: ... | ... | ...; } | { argumentStyle: "positional"; default?: ... | ...; description?: ... | ... | ...; flag?: undefined; label?: ... | ... | ...; options: ...[]; pattern?: ... | ...; private?: ... | ... | ...; redactInHistory?: ... | ... | ...; required?: ... | ... | ...; requiredWhen?: ... | ... | ...; type: "select"; visibleWhen?: ... | ... | ...; } | { argumentStyle?: ... | ... | ...; default?: ... | ...; description?: ... | ... | ...; flag: string; label?: ... | ... | ...; options?: undefined; pattern?: ... | ...; private?: ... | ... | ...; redactInHistory?: ... | ... | ...; required?: ... | ... | ...; requiredWhen?: ... | ... | ...; type: "text"; visibleWhen?: ... | ... | ...; } | { argumentStyle: "positional"; default?: ... | ...; description?: ... | ... | ...; flag?: undefined; label?: ... | ... | ...; options?: undefined; pattern?: ... | ...; private?: ... | ... | ...; redactInHistory?: ... | ... | ...; required?: ... | ... | ...; requiredWhen?: ... | ... | ...; type: "text"; visibleWhen?: ... | ... | ...; } | { argumentStyle?: undefined; default?: ... | ... | ...; description?: ... | ... | ...; flag: string; label?: ... | ... | ...; omitArgument?: ... | ...; options?: undefined; pattern?: undefined; private?: ... | ... | ...; redactInHistory?: ... | ... | ...; required?: ... | ... | ...; requiredWhen?: ... | ... | ...; type: "boolean"; visibleWhen?: ... | ... | ...; } | { argumentStyle?: undefined; default?: ... | ... | ...; description?: ... | ... | ...; flag?: undefined; label?: ... | ... | ...; omitArgument: true; options?: undefined; pattern?: undefined; private?: ... | ... | ...; redactInHistory?: ... | ... | ...; required?: ... | ... | ...; requiredWhen?: ... | ... | ...; type: "boolean"; visibleWhen?: ... | ... | ...; }>>; operations?: Record<string, { customVersionInput?: string; kind: "release"; prereleaseIdInput?: string; requiredBranch?: string; requiresCleanGit?: boolean; versionInput?: string; workflowPath?: string; }>; skillInputs?: Record<string, Record<string, { default?: ... | ...; description?: ... | ... | ...; label?: ... | ... | ...; options: ...[]; pattern?: ... | ...; private?: ... | ... | ...; redactInHistory?: ... | ... | ...; required?: ... | ... | ...; requiredWhen?: ... | ... | ...; type: "select"; visibleWhen?: ... | ... | ...; } | { default?: ... | ...; description?: ... | ... | ...; label?: ... | ... | ...; options?: undefined; pattern?: ... | ...; private?: ... | ... | ...; redactInHistory?: ... | ... | ...; required?: ... | ... | ...; requiredWhen?: ... | ... | ...; type: "text"; visibleWhen?: ... | ... | ...; }>>; skills?: { disabled?: object[]; disabledPlugins?: string[]; enabled?: object[]; enabledPlugins?: string[]; mode?: "auto" | "manual"; }; }; defaults?: { agent?: string; }; extensions?: Record<string, unknown>; packages?: Record<string, { description?: string | {[key: string]: string; default: string; }; featured?: boolean; hidden?: boolean; order?: number; quickActions?: string[]; readme?: string; }>; project?: { color?: "blue" | "cyan" | "green" | "orange" | "pink" | "purple" | "red" | "yellow"; description?: string | {[key: string]: string; default: string; }; icon?: string; name?: string; quickActions?: string[]; readme?: string; }; version: 1; } | undefined>

Released under the MIT License.