Dashboard › craft › Distillation
5d7c8781-f6ca-4044-9021-1e11a7456cfa["lore_tm_v1_pAebqqgiz4HXgyArLOibyM1f021asB0S6r6cvf0dPK8","lore_tm_v1_xxDuOMYDe3o1JnN7sJ1dNdXSDYGiYVSUA26SM-dxZbE"]
Date: Aug 27, 2026
src/index.ts imports sanitizeDynamicLinkerEnv and warnIfCraftEnvFileExists from ./utils/env; envToBool, setGlobals, and extractWorkspaceSelection from ./utils/helpers; and setActiveWorkspace from ./config.src/index.ts, printVersion() logs craft ${getPackageVersion()} at debug level unless process.argv includes -v or --version.src/index.ts defines GLOBAL_BOOLEAN_FLAGS: 'no-input' uses coerce: envToBool, defaults to isCI, suppresses all user prompts, and is global; 'dry-run' uses coerce: envToBool, defaults to process.env.DRY_RUN, is global, and is described as preventing file writes, commits, pushes, and API mutations. A TODO says to deprecate 'dry-run' in favor of CRAFT_DRY_RUN.fixGlobalBooleanFlags(argv: string[]): string[] in src/index.ts iterates raw arguments, appending every argument and additionally appending '1' whenever arg.slice(2) in GLOBAL_BOOLEAN_FLAGS; this makes standalone global boolean flags truthy while preserving --flag=no behavior and not treating positional --flag no notation as an override.main() in src/index.ts calls sanitizeDynamicLinkerEnv() before all other startup work to prevent LD_PRELOAD, DYLD_*, and other dynamic-linker environment variables leaking into subprocesses Craft spawns; it then calls printVersion() and warnIfCraftEnvFileExists().src/index.ts derives argv with fixGlobalBooleanFlags(process.argv.slice(2)), then calls setActiveWorkspace(extractWorkspaceSelection(argv)) before yargs parsing. The code states this is necessary because yargs command builders run before middleware and may resolve configuration—e.g., publish derives --target choices from config.targets—so workspace selection in middleware would be too late; extractWorkspaceSelection is the single source of truth for CLI/environment precedence.src/index.ts yargs configuration sets 'boolean-negation': false, loads CRAFT environment variables via .env('CRAFT'), registers commands prepare, publish, targets, config, artifacts, and changelog, requires a command with .demandCommand(), uses version getPackageVersion() with alias v, help alias h, .strictCommands(), .showHelpOnFail(true), middleware setGlobals, and parses the preprocessed argv.src/index.ts defines global log-level with default 'Info', choices from nonnumeric Object.keys(LogLevel), and coercion level => level[0].toUpperCase() + level.slice(1).toLowerCase(). It defines global string option workspace, described as selecting a named workspace/release unit and being required when config defines "workspaces"; its environment variable is CRAFT_WORKSPACE.src/index.ts invokes the CLI through withTracing(main, { name: 'craft.cli', op: 'cli' })();./home/byk/Code/getsentry/publish-workspace-acceptance/src/publish/inputs.js imports @actions/github, @actions/core, and detailsFromContext from ../modules/details-from-context; its inputs() function awaits detailsFromContext({ context: github.context }), then calls core.setOutput('result', result), and is immediately invoked with inputs();.