Dashboard › cli › Distillation
b07c3945-19c0-4ffc-b45e-694aa728c620["lore_tm_v1_mcoZP7y5_iS_fE-tSXna2531LRUKv6G7cAYToZsr_Ho"]
src/config.ts imports getPackageVersion, parseVersion, versionGreaterOrEqualThan, and SemVer from ./utils/version; getTargetByName is imported lazily in expandWorkspaceTargets to avoid the circular dependency config -> targets -> registry -> utils/registry -> symlink -> version -> config.src/config.ts defines CONFIG_FILE_NAME = '.craft.yml', DEFAULT_RELEASE_BRANCH_NAME = 'release', and caches configuration in _configCache: CraftProjectConfig.expandBraceAlternatives() forms each alternative from ${prefix}${choice}${suffix}, recursively expands it, returns undefined if an expansion fails, and otherwise appends all expanded values.false if either is unavailable, strips SemVer build metadata from both, and compares them with versionGreaterOrEqualThan().withoutBuildMetadata(version: SemVer) returns { ...version, build: undefined } when build metadata exists because SemVer build metadata does not affect precedence but the comparison helper rejects versions carrying it.ConfigurationError with This configuration defines workspaces; select one with --workspace <name> (or the CRAFT_WORKSPACE env var). Available workspaces: ${available}.checkWorkspacesMinVersion(config) before resolveWorkspaceConfig(...), gating the feature behind the Craft version declared by minVersion.getWorkspaceNames(): string[] lists concrete workspace names from validated configuration without applying a selection; glob patterns are expanded relative to the configuration file so external controllers can discover valid release paths.checkMinimalConfigVersion(config: CraftProjectConfig) skips compatibility checking when config.minVersion is absent and logs the exact typo-bearing message No minimal version specified in the configuration, skpipping the check.checkMinimalConfigVersion() obtains the running version with getPackageVersion() and throws Cannot get the current craft version if unavailable; parse failures throw Cannot parse the minimal version: "${minVersionRaw}" or Cannot parse the current version: "${currentVersionRaw}".X.Y.Z, such as 2.29.0-dev.0, as containing the features slated for X.Y.Z: it removes pre and build from the current version before comparison; non-prerelease versions only have build metadata removed."craft" version is compatible with the minimal version from the configuration file.; incompatibility throws ConfigurationError with Incompatible "craft" versions. Current version: ${currentVersionRaw}, minimal version: ${minVersionRaw} (taken from .craft.yml).requiresMinVersion(requiredVersion: string) loads getConfiguration() and delegates to isVersionGteMinVersion(config.minVersion, requiredVersion).AUTO_VERSION_MIN_VERSION = '2.14.0'; getVersioningPolicy() returns an explicitly configured config.versioning.policy, otherwise defaults to auto when minVersion >= 2.14.0 and manual for backward compatibility. Supported documented policies are auto (analyze commits for bump type), manual (require an explicit version for craft prepare), and calver (calendar versioning).getGitTagPrefix() reads the first github targetβs tagPrefix from the active configuration; workspace selection has already narrowed targets, allowing a per-product prefix, while non-workspace repositories may use separate .craft.yml files per product.github targets with differing tagPrefix values, getGitTagPrefix() returns the first prefix and warns: Multiple "github" targets with different "tagPrefix" values found. Using "${firstPrefix}". For independently-versioned products in a monorepo, use a top-level "workspaces" entry per product (or a separate .craft.yml), each with a single "github" target and its own "tagPrefix".rg: unrecognized flag --label, indicating the invoked rg did not accept the supplied --label option.