Dashboard › publish › Distillation
bd55e0ea-a3be-4d82-a60a-31993c523c01["lore_tm_v1_-aRuZ2v2QTZt48DwWP2bSd9_EmKH_CVzUU7WmLOm_dY","lore_tm_v1_mWPNGlCILdQuGGnDMzPByEdXIoY5NxyN8D9wotv-_0Q","lore_tm_v1_zVF-EbNX1Kz8vs4ZaOshWhX54n7BhzQVDsEajmv48EY","lore_tm_v1_hslqXIo-DATWVp_uYb6E2hI-R3uei1Gc0XhScAd9CNE","lore_tm_v1_dbS-oH1c3hMLNWEbYhGgJyIVOZwK4TP4ZgYNKUCmD-Q","lore_tm_v1_Ggbb1-IJ_WHJ_BdkyXAvOD3LumJn2G3HY4BTWJzOKjQ","lore_tm_v1_eViOQUEcDV3eGVxDh8IRTpUPnobbVyYy2GAblbdRx-A","lore_tm_v1_oWd3AhqsVrznonacOAMtOfAUqbx6Am76lGRwDLaCqIg","lore_tm_v1_zYMlLMrCdEEPrQNGcM-ya5yfp3l7dw7wpQazl-W5Zl0","lore_tm_v1_l5IEWpWZhrpOCkrMasBKSGBGshG7UTSmwQ0gb9lhSKg","lore_tm_v1_BugBOngFcVaqA0CqwCTvYFL-ixkQJ-1PbShzPr47y_M"]
Date: September 10, 2026
NAME_PLACEHOLDER = '\x00NAME\x00', SIMPLE_PLACEHOLDER = '\x00SIMPLE\x00', and VERSION_PLACEHOLDER = '\x00VERSION\x00'; it temporarily replaces {{name}}, {{simpleName}}, and {{version}}, escapes the surrounding template, then substitutes escaped packageName, escaped simpleName, and versionValue. The default version pattern '\\d.*' is preserved as-is; other version values pass through escapeRegex(version).src/utils/workspaces.ts supports npm, Yarn, and pnpm workspace discovery. discoverWorkspaces() checks pnpm first via pnpm-workspace.yaml, then npm/Yarn via the root package.json; npm versus Yarn is distinguished by the presence of yarn.lock.WorkspacePackage contains name, absolute location, private, hasPublicAccess, and workspaceDependencies; WorkspaceDiscoveryResult.type is 'npm' | 'yarn' | 'pnpm' | 'none'.resolveWorkspaceGlobs() first collects all workspace package names and locations, then resolves workspaceDependencies by filtering all dependency names against the known workspace-name set.topologicalSortPackages() orders dependencies before dependents by computing each package’s depth as 1 + max depth of dependencies; a cycle throws Circular dependency detected among workspace packages: ${cyclePackages.join(', ')}.2.30.1 with CRAFT_BUILD_SHA=cd1e8294061fd970b40d98b77aaa109cb1e00e78. The expected craft workspace list command is not implemented and exits with Unknown commands: workspace, list; consequently, every target checkout having a root .craft.yml would fail before publication when the new discovery path invokes that command.prepare, publish, targets, config, artifacts, and changelog, but no workspace command. Global flags include --no-input, --dry-run, --log-level, -v/--version, and -h/--help.--dry-run means “no file writes, commits, pushes, or API mutations”; it currently defaults from process.env.DRY_RUN with a TODO to deprecate that in favor of CRAFT_DRY_RUN.sanitizeDynamicLinkerEnv() before other main-flow work so LD_PRELOAD, DYLD_*, and related variables cannot leak into spawned subprocesses; it then prints the version, calls warnIfCraftEnvFileExists(), preprocesses global Boolean flags with fixGlobalBooleanFlags(), and parses through yargs..craft-publish-<version>.json to $XDG_STATE_HOME/craft/, falling back to $HOME/.local/state/craft/, preventing committed repository content or earlier CI steps from pre-populating the published-target set and silently skipping targets.getCraftStateDir() returns join(process.env.XDG_STATE_HOME, 'craft') when XDG_STATE_HOME is nonempty; otherwise it returns join(homedir(), '.local', 'state', 'craft').getPublishStateFilename(version, githubConfig, cwd) uses publish-state-<owner>-<repo>-<sha1(cwd)[:12]>-<version>.json when GitHub config is available. Without GitHub config, it uses publish-state-<sha256(cwd)[:16]>-<version>.json.[a-z0-9._-] with _, and trimming leading/trailing underscores. The cwd hash disambiguates monorepo subpaths such as packages/foo and packages/bar.getPublishStatePath(version, githubConfig, cwd = process.cwd()) joins getCraftStateDir() with getPublishStateFilename(version, githubConfig, cwd). In the getsentry/publish Docker image, HOME=/root, making the XDG state location workflow-writable but unreachable by committed repository contents./usr/local/bin/craft; it is executable, owned by root:root, has size 9689940 bytes, and carries timestamp Aug 8 00:33.