Dashboard › craft › Distillation
df180b7c-8db6-495e-b61d-0ca5ca887a8e["lore_tm_v1_yJ0VuOc-B22cAA64BJjD4p_6BxpsubpEL_yy0OKOLpY","lore_tm_v1_zM15N1R_EwlNzEvk025_t6WBeqhxId9bcTADFUK5l6c","lore_tm_v1_nuw6zoaljhzTnrncltcwGedC3SAwEn3TqIBbzY5Ib1w","lore_tm_v1_4C0oLe0odTEYF69swm_cfHteoLfWzIGcmuJ9XBWCpoI","lore_tm_v1_QGH_angNImiJxr5M0QWN4wQyQRpBQ-jSHe6A2AD-lWw","lore_tm_v1_o_iav7oX2hd208_8QDCyXjOFn1dm6XjeKNleDm-O7kg","lore_tm_v1_1t5a_af3G9XXL8p4r9llRXfNjMdTlYiq5_WwM6cmBQ8"]
Date: Aug 25, 2026
src/index.ts imports extractWorkspaceSelection from ./utils/helpers and setActiveWorkspace from ./config; after fixGlobalBooleanFlags(process.argv.slice(2)), it calls setActiveWorkspace(extractWorkspaceSelection(argv)) before yargs parsing/builders, because command builders can resolve config (notably publish derives --target choices from config.targets) before middleware.src/index.ts defines global workspace as a string option, global to all commands, described as selecting a named release-unit workspace from configuration; it is required when config defines "workspaces" and can be supplied through CRAFT_WORKSPACE.src/index.ts uses .env('CRAFT'), .strictCommands(), .middleware(setGlobals), and .parserConfiguration({ 'boolean-negation': false }); global boolean flags are no-input (default isCI) and dry-run (default process.env.DRY_RUN), both coerced by envToBool.fixGlobalBooleanFlags(argv) in src/index.ts injects '1' immediately after a standalone global boolean flag recognized by arg.slice(2) in GLOBAL_BOOLEAN_FLAGS; this allows CLI flag presence to be truthy while preserving environment-variable string coercion and allowing only --flag=no syntaxβnot --flag noβto override environment values.src/config.ts defines WORKSPACES_MIN_VERSION = '2.29.0'; a dev prerelease of that release, such as 2.29.0-dev.0, satisfies the gate through checkMinimalConfigVersion prerelease relaxation.src/config.ts maintains _activeWorkspaceName: string | undefined; setActiveWorkspace(name) sets it and invalidates _configCache and _globalGitHubConfigCache, allowing subsequent configuration reads to re-resolve against a new selection. getActiveWorkspace() returns the current selection.resolveWorkspaceConfig(base, workspaceName) validates that the named workspace exists; unknown selections throw ConfigurationError naming available workspaces, or state that no workspaces are defined.CraftProjectConfig: defined workspace release-relevant fields shallowly replace top-level fields; arrays/objects are inherited or wholly replaced rather than deep-merged. minVersion and workspaces are stripped from the resolved result.github configuration is shallow-merged with base github, enabling overrides such as projectPath while inheriting owner/repo; the merged github is retained only if it has both owner and repo, otherwise it is deleted so git-remote detection can provide owner/repo.applyWorkspaceSelection(config) returns config unchanged if no workspaces and no active selection; errors if a workspace was selected but config has no workspaces; errors if workspaces exist but no explicit --workspace <name> or CRAFT_WORKSPACE selection was supplied; and requires config.minVersion >= '2.29.0' before resolving the selected workspace. It never implicitly selects the first workspace.withoutBuildMetadata() because build metadata does not affect precedence but the comparison helper rejects it, then uses versionGreaterOrEqualThan(); configurations such as 2.29.0+linux remain valid.src/__tests__/config.test.ts includes workspace-selection reset tests via setActiveWorkspace(undefined), selection tests for 'cli', 'mcp', and unknown 'nope', and a test named setActiveWorkspace re-resolves against a new selection that changes selection from 'cli' to 'mcp'./home/byk/Code/getsentry/publish-workspace-acceptance/src/publish/inputs.js, inputs() calls detailsFromContext({ context: github.context }) and writes its result to the GitHub Actions output named result via core.setOutput('result', result).workspace input described as the named Craft release workspace to prepare and publish; its request-publish step exposes WORKSPACE: ${{ inputs.workspace }} and serializes the selected workspace through jq -Rn --arg workspace "$WORKSPACE" '$workspace'.MAX_CHANGELOG_CHARS limit, searches existing GitHub issues ordered newest-first, preserves checked target states when refreshing an existing issue body, and restricts checkbox parsing to the ### Targets section to avoid changelog checkboxes.