Dashboard › craft › Distillation
4e4542fb-b7f1-4993-8dae-6628839035ed["626e23a05da5a7dc6d0ce9f05c91d4bb","a3b146a197f6bd40be9c767ca4862364","16c6792902a259afad75eed0f6f7f442","8df4ffec9d13a3a7140b3719b12a6e72"]
Date: Jul 21, 2026
import { getGitHubClient } from '../utils/githubApi'; (line 17).export interface GitHubTargetConfig extends GitHubGlobalConfig { ... } (line 55).export class GitHubTarget extends BaseTarget { ... } (line 93).const repo = typedConfig.repo || githubRepo.repo; (line 112).tag_name: tag, (line 207).deletedAny = true; set inside asset-deletion loop (line 282).return this.createDraftRelease(version, revision, changes); (line 301).const { data: releases } = await this.github.repos.listReleases({...}); (line 319).body: '' set when preparing release payload (line 338).public async deleteRelease(release: GitHubRelease): Promise<boolean> (line 376).public async getReleaseByTag(...) (line 432).private async handleGitHubUpload(...) (line 526) — includes size check if (ret.size != stats.size) (line 563) inside try/finally.draft: false, set when finalizing a release (line 601).this.logger.info(\Pushing the tag reference: "${tagRef}"...`);` (line 620)..replace('{minor}', String(parsedVersion.minor)) and similar placeholder replacements (line 639).const latestReleaseTag = latestRelease?.tag_name; (line 752).const existingRelease = await this.getReleaseByTag(tag); (line 772).if (currentRelease && currentRelease.draft === false) { ... } (line 809).this.logger.warn(...) call (line 847).latestReleaseTag is determined when publishing GitHub releases..replace() calls substituting placeholders like {minor} with actual parsed version fields (e.g. parsedVersion.minor, line 639).#!/usr/bin/env node (line 1); imports ./instrument first "before any other code" for Sentry instrumentation (line 3).isCI from 'is-ci' (line 5), yargs (line 6), logger, LogLevel from './logger' (line 8), sanitizeDynamicLinkerEnv, warnIfCraftEnvFileExists from './utils/env' (lines 9-12), envToBool, setGlobals from './utils/helpers' (line 13), getPackageVersion from './utils/version' (line 14), withTracing from './utils/tracing' (line 15).prepare, publish, targets, config, artifacts, changelog (lines 18-23, all from ./commands/*).function printVersion(): void (line 25) — logs `craft ${getPackageVersion()}` via logger.debug unless -v/--version flag present.const GLOBAL_BOOLEAN_FLAGS (line 32) defines two flags: 'no-input' (coerce envToBool, default isCI, "Suppresses all user prompts") and 'dry-run' (coerce envToBool, default process.env.DRY_RUN, describe "Dry run mode: no file writes, commits, pushes, or API mutations"); comment // TODO(byk): Deprecate this in favor of CRAFT_DRY_RUN (line 41).function fixGlobalBooleanFlags(argv: string[]): string[] (line 61) — JSDoc explains it works around a yargs limitation by injecting a truthy '1' string after standalone boolean flags so they can still be overridden via --flag=no env-var notation.async function main(): Promise<void> (line 75) — calls sanitizeDynamicLinkerEnv(), printVersion(), warnIfCraftEnvFileExists(), builds argv via fixGlobalBooleanFlags(process.argv.slice(2)), then configures yargs: .parserConfiguration({ 'boolean-negation': false }), .env('CRAFT'), .command(prepare/publish/targets/config/artifacts/changelog), .demandCommand(), .version(getPackageVersion()), .alias('v','version'), .help(), .alias('h','help'), .options(GLOBAL_BOOLEAN_FLAGS), .option('log-level', {default:'Info', choices: non-numeric LogLevel keys, coerce: capitalize first letter, global:true}), .strictCommands(), .showHelpOnFail(true), .middleware(setGlobals), .parse(argv).withTracing(main, { name: 'craft.cli', op: 'cli' })(); (line 116)..env('CRAFT') in src/index.ts main() enables env-var layering where CLI options can be set via CRAFT_-prefixed environment variables.