Dashboard › craft › Distillation
0db664fd-cb17-44d0-9841-3be8114d78f5["lore_tm_v1_RrhYP5UX5x8hqxzPZ8JaV_WqETuABUEJUQ7cKV0touQ","lore_tm_v1_0P4vEhnk3ZISL67ldhAPdC-1KzCmXa0W2jLHogT7d0E","lore_tm_v1_Pxed3tyC9hX0b2KMv__oXcLz0yAppbaqbDDvi8tIP1Y"]
Date: Sep 3, 2026
--workspace --dry-run must never be mistaken for a workspace name./home/byk/Code/getsentry/craft-workspace-action-propagation/src/utils/helpers.ts, MAX_STEP_OUTPUT_BYTES = 64 * 1024 limits GitHub Actions step outputs to avoid E2BIG when outputs become environment variables in later steps; 64 KB is below the approximately 2 MB ARG_MAX limit and GitHub’s approximately 65,536-character issue-body limit.envToBool() in src/utils/helpers.ts lowercases values and treats '', 'undefined', 'null', '0', 'false', and 'no' as false; every other value is true.extractWorkspaceSelection(argv, env) in src/utils/helpers.ts uses Node parseArgs() with { workspace: { type: 'string' } }, allowPositionals: true, strict: false, and tokens: true to select --workspace before yargs builders execute. It supports --workspace foo and --workspace=foo; the last occurrence decides; a bare/empty final occurrence clears an earlier CLI selection and falls back to CRAFT_WORKSPACE.extractWorkspaceSelection() accepts a workspace token value only when it is a nonempty string and either an inline value or does not start with -; therefore --workspace=-foo is valid, while --workspace --foo is not treated as a workspace value. It returns workspace || envWorkspace, so a valued CLI flag overrides CRAFT_WORKSPACE, while an unvalued flag does not.src/utils/helpers.ts global flags are dry-run, no-input, and log-level; internal defaults are false, false, and 'Info'. setGlobals() updates only defined arguments, logs globals and argv at trace level, and calls setLevel(LogLevel[GLOBAL_FLAGS['log-level']]); isDryRun() and hasInput() return the stored dry-run value and inverse of no-input, respectively.promptConfirmation() prompts “Is everything OK? Type "yes" to proceed:” only when input is enabled; validation requires at least 2 characters, and any response other than case-insensitive yes logs “Oh, okay. Aborting.” and exits with status 1. With no-input, it logs “Skipping the confirmation prompt.”setGitHubActionsOutput(name, value) in src/utils/helpers.ts is a no-op without GITHUB_OUTPUT; otherwise it appends name=value for single-line values or uses a randomized EOF_${Date.now()}_${Math.random().toString(36).slice(2)} heredoc delimiter for multiline values.writeGitHubActionsFile(name, content) is a no-op without RUNNER_TEMP; otherwise it creates ${RUNNER_TEMP}/craft, writes UTF-8 content to ${name}.md, sets the ${name}_file GitHub Actions output, and returns the absolute file path.truncateForOutput(value, changelogUrl?) returns unchanged values at or below MAX_STEP_OUTPUT_BYTES; oversized UTF-8 values are byte-sliced to leave room for either \n\n---\n*Changelog truncated.* or \n\n---\n*Changelog truncated. [View full changelog](${changelogUrl}).*. It removes a trailing Unicode replacement character (U+FFFD) only when the byte cut split a multi-byte codepoint.disableChangelogMentions(changelog) replaces changelog-format author mentions matching / by @(\S+) in /g with by **$1** in, preventing contributor pings in GitHub issue bodies; expected source format is - Title by @author in [#123](url)./home/byk/Code/getsentry/craft-workspace-action-propagation/src/schemas/project_config.ts, deprecated ChangelogPolicy values are 'auto', 'simple', and 'none'; StatusProviderName is 'github'; ArtifactProviderName values are 'gcs', 'github', and 'none'; and VersioningPolicy values are 'auto', 'manual', and 'calver'.GitHubGlobalConfigSchema requires owner and repo strings and accepts optional projectPath; TargetConfigSchema requires name, supports optional id, includeNames, and excludeNames, and uses .passthrough() for target-specific properties.BaseStatusProviderSchema accepts only provider name 'github', while BaseArtifactProviderSchema accepts 'gcs', 'github', or 'none'; each permits optional arbitrary config records. GitHub artifact patterns may be a string, a string array, or a mapping from workflow names to either pattern form.CalVerConfigSchema supports optional numeric offset (documented default 14) and optional format (documented default %y.%-m, supporting %y, %m, and %-m); VersioningConfigSchema has optional policy of 'auto', 'manual', or 'calver' plus optional calver.ChangelogConfigSchema accepts either a string or an object with optional filePath, policy ('auto', 'simple', 'none'), and boolean scopeGrouping.releaseUnitFields in src/schemas/project_config.ts defines inheritable optional release-unit configuration: github, targets, preReleaseCommand, postReleaseCommand, releaseBranchPrefix, changelog, changelogPolicy, requireNames, statusProvider, artifactProvider, versioning, and noMerge. noMerge prevents release-branch merging and defaults to true for compiled GitHub Actions/Node.js actions with a dist/ folder.WorkspaceSchema represents a named independently-versioned release unit; its fields inherit top-level defaults when absent. Its github object is partial so a workspace can override owner and/or repo, but explicitly rejects github.projectPath with “Workspace github.projectPath is not supported.”WorkspaceNameSchema reject '__proto__' because assigning it to a regular object mutates the prototype, and reject '.' and '..'.CraftProjectConfigSchema adds optional semver-like minVersion matching /^\d+\.\d+\.\d+.*$/ and optional workspaces: z.record(WorkspaceNameSchema, WorkspaceSchema). When nonempty workspaces are configured, each release must select one with --workspace <name> or CRAFT_WORKSPACE; selected workspace fields override top-level values. Without workspaces, the top-level configuration remains the single implicit release unit for backward compatibility.CraftProjectConfigSchema.superRefine() rejects a configuration containing both nonempty workspaces and top-level github.projectPath, producing “Workspace configurations cannot use github.projectPath.” at path ['github', 'projectPath'].src/schemas/project_config.ts distinguishes named Craft release-unit workspaces from an npm target’s workspaces: true: named Craft workspaces are independently versioned release units, while npm workspaces: true discovers packages within one target and publishes all at the same version./home/byk/Code/getsentry/publish-workspace-acceptance/src/modules/publish-location.js, resolvePublishLocation({ path, workspaceNames }) returns { path } immediately for path === "."; otherwise it validates every discovered name with isWorkspaceName(), throwing Error("Craft workspace discovery returned an invalid workspace list.") if any is invalid.resolvePublishLocation() interprets a non-root path by stripping its first 2 characters (path.slice(2)); if the resulting name is in workspaceNames, it maps the publish location to { path: ".", workspace }, otherwise leaves it as { path }.isWorkspaceName(name) in src/modules/publish-location.js requires a string; rejects '__proto__', '.', '..', and any slash-separated segment equal to '..'; and permits only slash-separated segments matching [A-Za-z0-9_.-]+ via /^(?:[A-Za-z0-9_.-]+\/)*[A-Za-z0-9_.-]+$/.