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?: ... | ... | ...; default?: ... | ...; description?: ... | ... | ...; flag: string; label?: ... | ... | ...; options?: undefined; pattern?: ... | ...; private?: ... | ... | ...; redactInHistory?: ... | ... | ...; required?: ... | ... | ...; requiredWhen?: ... | ... | ...; type: "text"; visibleWhen?: ... | ... | ...; } | { argumentStyle?: undefined; default?: ... | ... | ...; description?: ... | ... | ...; flag: string; label?: ... | ... | ...; 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?: ... | ... | ...; }>>; }; defaults?: { agent?: string; }; extensions?: Record<string, unknown>; packages?: Record<string, { description?: string | {[key: string]: string; default: string; }; }>; project?: { color?: "blue" | "cyan" | "green" | "orange" | "pink" | "purple" | "red" | "yellow"; icon?: string; name?: 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?: ... | ... | ...; default?: ... | ...; description?: ... | ... | ...; flag: string; label?: ... | ... | ...; options?: undefined; pattern?: ... | ...; private?: ... | ... | ...; redactInHistory?: ... | ... | ...; required?: ... | ... | ...; requiredWhen?: ... | ... | ...; type: "text"; visibleWhen?: ... | ... | ...; } | { argumentStyle?: undefined; default?: ... | ... | ...; description?: ... | ... | ...; flag: string; label?: ... | ... | ...; 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?: ... | ... | ...; }>>; }; defaults?: { agent?: string; }; extensions?: Record<string, unknown>; packages?: Record<string, { description?: string | {[key: string]: string; default: string; }; }>; project?: { color?: "blue" | "cyan" | "green" | "orange" | "pink" | "purple" | "red" | "yellow"; icon?: string; name?: string; }; version: 1; } | undefined>

Released under the MIT License.