tom_build_base 2.5.13
tom_build_base: ^2.5.13 copied to clipboard
Shared utilities for Tom build tools — configuration loading from buildkit.yaml, project scanning, path validation, and build.yaml utilities.
2.5.13 #
Improved #
tool_runner.dart— When:macro,:define,:defines,:undefine,:unmacro, or:macroscommands are used but{tool}_master.yamlcannot be found, a clear error message is shown explaining which file is missing and the detected workspace root. Previously these commands silently fell through to "Unknown command".tool_runner.dart— Help text for macro/define/pipeline commands is now shown even when the master yaml is missing, so users can understand how to set things up.
2.5.12 #
Fixed #
tool_runner.dart— Macro expansion (@macroName) now actually works. TheexpandMacros()function frommacro_expansion.dartwas never called duringrun(), so@macroinvocations were passed through unparsed. Expansion now happens before arg parsing, after loading persisted macros.
2.5.11 #
Added #
tool_definition.dart— AddedversionStringproperty toToolDefinitionfor custom--versionoutput. When provided, this string (typically from versioner-generated code) is shown instead of the default "name vX.X.X" format.tool_runner.dart—:defineand:undefinecommands now support-m MODEor--mode MODEflag for mode-specific defines (e.g.,buildkit :define -m DEV DEBUG=true).tool_runner.dart—:definescommand now lists all defines including mode-specific ones (e.g.,DEV-defines:,CI-defines:).tool_runner.dart— Macros now stored in{tool}_master.yamlundermacros:section instead of separate{tool}_macros.yamlfile.tool_runner.dart— Defines stored under{tool}:section in master.yaml with structure:{tool}: defines:for default and{tool}: {MODE}-defines:for mode-specific.
Changed #
cli_arg_parser.dart— Extended special-case greedy argument handling to include:undefinecommand (all args after:undefineare treated as positional to allow-m MODE namesyntax).
2.5.10 #
Fixed #
tool_runner.dart— Runtime macros (:macro,:macros,:unmacro) now persist to{workspace_root}/{tool_name}_macros.yaml. Previously, macros defined in onebuildkitinvocation were lost in the next invocation because they were stored only in an in-memory map. The file is written on everyadd/removeand loaded lazily on the first macro operation of each invocation; it is deleted automatically when the last macro is removed.
2.5.9 #
Fixed #
cli_arg_parser.dart—:commandtokens appearing after a:macroor:definecommand are now treated as positional arguments (part of the macro value) rather than being dispatched as separate commands. Previously,buildkit :macro vc=:v $1 :comp $2would execute:compimmediately and store only:vas the macro value. Now the full token sequence is captured as the value.
2.5.6 #
Fixed #
cli_arg_parser.dart— Global navigation/feature flags (--dry-run,--verbose,-n,-v,--force,--list, etc.) now route to global state regardless of whether they appear before or after a command name. Previouslybuildkit :compiler --dry-runwas silently ignored; now it works identically tobuildkit --dry-run :compiler.
2.5.5 #
Added #
tool_runner.dart— Added required-environment validation support from<tool>_master.yaml(includingbuildkit_master.yamlfallback forbuildkit), with checks for environment variables, folders, binaries, and caret-version constraints.tool_runner.dart— Added doctor-mode execution flow for tools: doctor requests now print requirement warnings/errors and return success/failure based on hard requirement violations.
Fixed #
tool_runner.dart— Normalized doctor token detection so bothdoctorand:doctorforms are recognized consistently in positional and command argument paths.
2.5.4 #
Fixed #
cli_arg_parser.dart— Fixed short option abbreviation collision when multiple commands share the same abbreviation (e.g.-cused by bothrunnerandexecute)._shortToLongnow prioritizes the current command's options before falling through to all commands.
2.5.3 #
Changed #
execute_placeholder.dart— Migrated placeholder syntax from${...}to%{...}to avoid shell variable expansion (${}) and YAML comment stripping (#{}after whitespace). All regex patterns, error messages, and help text updated.builtin_help_topics.dart— Updated all placeholder documentation to use%{...}syntax.
2.5.2 #
Changed #
repository_id_lookup.dart— RemovedCRPT(tom_module_crypto) andCOM(tom_module_communication) repository IDs after module consolidation into tom_module_basics.
2.5.1 #
Fixed #
builtin_help_topics.dart— Escaped*in placeholders help topic context reference table to prevent console_markdown from consuming it as italic markup.
2.5.0 #
Added #
console_markdown_zone.dart— Central console_markdown integration via Dart zones. ProvidesrunWithConsoleMarkdown()(async) andrunWithConsoleMarkdownSync()to wrap CLI tool execution in a zone that renders markdown syntax (**bold**,<cyan>text</cyan>, etc.) to ANSI escape codes.console_markdown_zone.dart—ConsoleMarkdownSinkwrapper class forStringSinkthat applies.toConsole()rendering to all writes, enabling markdown rendering onstdout/stderrsinks.console_markdown_zone.dart—isConsoleMarkdownActivegetter andkConsoleMarkdownZoneKeyzone key for double-processing detection. Prevents nested zones (e.g. when tom_d4rt_dcli already wraps output).tool_runner.dart—ToolRunnernow automatically wraps its output sink withConsoleMarkdownSinkwhen running inside a console_markdown zone, so alloutput.writeln()calls render markdown.pubspec.yaml— Addedconsole_markdown: ^0.0.3dependency.
2.4.0 #
Added #
execute_placeholder.dart—resolveCommand()now acceptsskipUnknownparameter. When true, unrecognized placeholders are left as-is instead of throwing, enabling multi-phase resolution (e.g., general placeholders first, then compiler-specific ones).execute_placeholder.dart— AddedExecutePlaceholderContext.fromCommandContext()factory for easy creation from traversal'sCommandContext.cli_arg_parser.dart— AddedCliArgs.withResolvedStrings()method to create a copy with placeholders resolved in positional args, extra options, and per-command options.tool_runner.dart— ToolRunner now automatically resolves general placeholders (${folder},${dart.name}, etc.) in all CLI args per folder during traversal, giving universal placeholder support to all commands.tom_build_base_v2.dart— Exportedexecute_placeholder.dartfrom the v2 barrel.
2.3.0 #
Added #
help_topic.dart— NewHelpTopicclass for named help sections (topic content, summary, name).builtin_help_topics.dart— Built-inplaceholdersHelpTopicwith comprehensive placeholder documentation.tool_definition.dart— AddedhelpTopicsfield andfindHelpTopic()method.help_generator.dart— AddedgenerateTopicHelp()and "Help Topics" section in tool help.special_commands.dart— Help topic lookup inhandleSpecialCommands()andgeneratePlainToolHelp().tool_runner.dart— Help topic lookup before "Unknown command" error.
2.2.0 #
Added #
filter_pipeline.dart— Added_matchesRelativePath()and_isPathPattern()for path-based pattern matching in--exclude-projectsand--projectfilters. Patterns containing/(e.g.,core/tom_core_kernel) are now matched against relative paths using glob matching, enabling directory-scoped project exclusion.filter_pipeline.dart— UpdatedmatchesProjectPattern()to accept optionalexecutionRootparameter for path-based matching.tool_runner.dart—ToolRunner.run()now handles bareversionas a positional arg (in addition to--version/-V), consistent withhandleSpecialCommands.help_generator.dart—generateCommandHelp()now includes a "Common Options" section showing--help,--verbose, and--dry-run.tool_runner.dart— Per-commandmatchesProjectPattern()calls now passexecutionRootfor path-based pattern support.
2.1.0 #
Added #
navigation_bridge.dart— Re-introducesWorkspaceNavigationArgs,addNavigationOptions(),preprocessRootFlag(),parseNavigationArgs(),resolveExecutionRoot(),isVersionCommand(),isHelpCommand()as v2-clean code (dart:io only, no DCli dependency). These bridge thepackage:argsArgParser to the v2 traversal system for tools that useArgParserfor global option parsing.- Exported from both
tom_build_base.dartandtom_build_base_v2.dartbarrels.
2.0.0 #
Breaking Changes — V1 Navigation System Removed #
Deleted the entire v1 project navigation/discovery system:
workspace_mode.dart—WorkspaceNavigationArgs,ExecutionMode,addNavigationOptions(),parseNavigationArgs(),preprocessRootFlag(),resolveExecutionRoot(), and related helpers are removed.project_discovery.dart—ProjectDiscoveryclass (includingscanForProjects(),resolveProjectPatterns(),hasSkipFile(),getSkipFileName(),applyModulesFilter(),findGitRepositories(),filterByModules(),resolveModulePaths()) is removed.project_navigator.dart—ProjectNavigator,NavigationConfig,NavigationResult,NavigationDefaultsare removed.project_scanner.dart—ProjectScannerclass is removed.
Migration #
All these APIs have v2 replacements in tom_build_base_v2.dart:
| Removed V1 API | V2 Replacement |
|---|---|
WorkspaceNavigationArgs |
CliArgs (from cli_arg_parser.dart) |
addNavigationOptions / parseNavigationArgs |
CliArgParser + OptionDefinition |
ProjectDiscovery.scanForProjects |
FolderScanner + BuildBase.traverse |
ProjectNavigator.navigate |
BuildBase.traverse |
ProjectScanner |
FolderScanner |
ProjectDiscovery.hasSkipFile |
FolderScanner skip logic |
ProjectDiscovery.applyModulesFilter |
FilterPipeline module filtering |
Preserved APIs #
findWorkspaceRoot()— Moved toworkspace_utils.dart(exported from both barrels). Same API, now usesdart:ioinstead of DCli.kBuildkitMasterYaml,kTomWorkspaceYaml,kTomCodeWorkspace,kBuildkitSkipYaml— Constants moved toworkspace_utils.dart.isWorkspaceBoundary()— Moved toworkspace_utils.dart.- All shared utility files (
build_config.dart,config_loader.dart,config_merger.dart,tool_logging.dart,path_utils.dart,processing_result.dart,yaml_utils.dart,build_yaml_utils.dart,show_versions.dart) are unchanged.
Internal #
show_versions.dart— Migrated fromProjectDiscovery/ProjectScannerto inline directory scanning withdart:ioandglob.- Removed v1-specific tests (10 tests removed; 547 remaining tests pass).
1.15.0 #
Breaking Changes #
- Renamed
--all/-ato--no-skip— The global CLI option that ignores skip markers (tom_skip.yaml,*_skip.yaml) has been renamed from--all/-ato--no-skip(no abbreviation). This resolves conflicts with per-command-a/--alloptions in buildkit tools (dependencies, publisher, gitcommit, gitbranch).
Features #
-
--no-skipflag in v1 system — AddednoSkipfield toWorkspaceNavigationArgs, wired throughaddNavigationOptions(),parseNavigationArgs(),ProjectDiscovery.scanForProjects(), andProjectNavigator. Both v1 (buildkit ArgParser) and v2 (CliArgs) systems now support--no-skip. -
--no-skipinprojectTraversalOptions— Added to the standard v2 option definitions for consistent help output.
1.14.0 #
Features #
AnchorWalkerclass — New utility for walking up the directory tree to find workspace/repository root "anchor" directories. Anchors are identified by.git(directory or file),tom_workspace.yaml, orbuildkit_master.yamlmarkers. Enables reusable upward-search logic for tools likegoto.
1.13.0 #
Features #
-
--all/-aflag — New CLI option to traverse into folders that would normally be skipped (subworkspaces,tom_skip.yaml,<tool>_skip.yaml). Skip messages still print but traversal continues. (Renamed to--no-skipin 1.15.0) -
Skip messages to stderr — FolderScanner now always prints skip messages to stderr when encountering workspace boundaries or skip marker files: "Skipping subworkspace: <folder>", "Skipping - tom_skip.yaml found: <folder>", "Skipping - <tool>_skip.yaml found: <folder>".
Bug Fixes #
allGlobalOptionsdedup precedence — Fixed option deduplication to use first-wins (putIfAbsent) instead of last-wins. User-definedglobalOptionsnow correctly take precedence overcommonOptionsdefaults.
Code Quality #
- Fixed
unnecessary_brace_in_string_interpslint issues incompletion_generator.dart. - Fixed
curly_braces_in_flow_control_structureslint issues innature_detector.dart.
1.12.0 #
Features #
-
BuildkitFolder.projectName— BuildkitFolder nature now reads thenamefield frombuildkit.yaml, enabling project name matching for buildkit-configured projects. -
--projectID and name matching — FilterPipeline now matches--projectvalues against project IDs and names from bothtom_project.yamlandbuildkit.yaml:TomBuildFolder: matchesproject_idandshort-idfieldsBuildkitFolder: matchesidandnamefields- Case-insensitive matching
-
handleSpecialCommands()— New utility function for tools to handlehelpandversioncommands consistently without custom parsing. -
BuildOrderComputer— Topological sort (Kahn's algorithm) moved from tom_build_kit to tom_build_base. Available for any tool that needs dependency-ordered traversal.
Breaking Changes #
-
Nature filtering is now mandatory —
BuildBase.traverse()throwsArgumentErrorif neitherrequiredNaturesnorworksWithNaturesis configured. Previously,nullrequiredNaturessilently visited all folders. Tools that want all folders must now setrequiredNatures: {FsFolder}orworksWithNatures: {FsFolder}explicitly. -
ToolRunner validates nature config —
ToolRunner._runWithTraversal()returnsToolResult.failurewith an error message before traversal starts if no nature configuration is present on the command.
Bug Fixes #
-
Nature detection before filter application — Fixed
BuildBase.traverse()to detect folder natures before applying project filters. Previously,applyProjectFilters()was called beforedetectNatures(), causing ID/name-based--projectmatching to always fail. -
tom_project.yamlfield name —NatureDetector._createTomProjectNature()now readsproject_id(underscore) in addition toshort-id(hyphen) fromtom_project.yaml.
Internal #
- ToolLogger / ProcessRunner — Central logging infrastructure with
--verbosesupport for consistent tool output.
1.11.0 #
Features #
-
Command prefix matching —
findCommand()now supports unambiguous command prefixes.:versmatches:versionerif no other command starts with "vers":cois ambiguous if both:compilerand:configexist, returns null- Exact matches (name or alias) always take priority over prefix matches
findCommandsWithPrefix()returns all commands matching a prefix (for error messages)
-
Improved error messages — When a prefix is ambiguous, tool shows all matching commands.
1.10.0 #
Features #
-
ExecutePlaceholderResolver — New placeholder resolution system for execute commands.
- Path placeholders:
${root},${folder},${folder.name},${folder.relative} - Platform placeholders:
${current-os},${current-arch},${current-platform} - Nature existence (boolean):
${dart.exists},${flutter.exists},${git.exists}, etc. - Nature attributes:
${dart.name},${dart.version},${git.branch}, etc. - Ternary syntax:
${condition?(true-value):(false-value)}for boolean placeholders checkCondition()for filtering based on boolean placeholders
- Path placeholders:
-
ExecutePlaceholderContext — Context class holding folder, root, and natures for resolution.
-
UnresolvedPlaceholderException — Exception thrown when placeholder cannot be resolved.
1.9.0 #
Breaking Changes #
- Default traversal behavior changed:
- Default is now
--scan . -R --not-recursive(workspace mode, single directory) - Previously defaulted to current directory without workspace root detection
- Use
-rflag to explicitly enable recursive traversal
- Default is now
Features #
- Traversal cascade: CLI options > buildkit_master.yaml navigation > hardcoded defaults
- Explicit CLI tracking:
scanExplicitlySetandrecursiveExplicitlySetfields in CliArgs - TraversalDefaults class: Loads navigation defaults from buildkit_master.yaml
- Git mode validation:
toGitTraversalInfo()now returns null if git mode not specified - WorkspaceScanner: Unified scanning API with FolderScanner + NatureDetector
- Top repository navigation (
-T, --top-repo): Traverse up to find topmost git repo - DartProjectFolder.isPublishable: Check if package can be published to pub.dev
Classes Modified #
CliArgs— AddedscanExplicitlySet,recursiveExplicitlySetfieldsTraversalDefaults— New class for config defaults withfromMap()factoryToolRunner._runWithTraversal()— Loads defaults, applies cascade, validates git mode_ParseState— Tracks explicit CLI options
1.11.0 #
Features #
-
WorkspaceScanner — Unified scanning API combining FolderScanner + NatureDetector.
scan()returnsScanResultswith type-safebyNature<T>()filtering.findGitRepos(),findDartProjects(),findPublishable()— Nature-based queries.findGitRepoPaths(),findDartProjectPaths(),findPublishablePaths()— Path convenience methods.FolderContextprovides folder + natures together withhasNature<T>(),getNature<T>().
-
DartProjectFolder.isPublishable — New getter to check if package can be published to pub.dev.
Exports #
- V2 traversal API now exported from main barrel:
WorkspaceScanner,GitFolder,DartProjectFolder, etc.
1.10.0 #
Features #
- Top repository navigation (
-T, --top-repo) — New git traversal option.- Traverses UP the directory tree to find the topmost (outermost) git repository.
- Uses that repository as the root for subsequent traversal.
- Can be combined with
-i(inner-first-git) or-o(outer-first-git). - Added
GitRepoFinder.findTopRepo()method for upward git repo discovery. - Example:
buildkit -T -i :compile— finds top repo, then processes inner repos first.
Classes Modified #
CliArgs— AddedtopRepofield.WorkspaceNavigationArgs— AddedtopRepofield and updated execution mode detection.GitRepoFinder— AddedfindTopRepo(String startPath)method.ProjectNavigator— IntegratedtopRepooption in navigation.CliArgParser— Added parsing for-Tand--top-repoflags.OptionDefinition— Addedtop-repotogitTraversalOptions.
1.9.0 #
Features #
- DCli integration — Refactored file operations to use DCli library for improved code readability.
File(path).existsSync()→exists(path)File(path).readAsStringSync()→read(path).toParagraph()Directory(path).listSync()→find('*', types: [Find.directory])- Improved directory filtering with DCli's
find()type filtering.
Dependencies #
- Added
dclipackage as dependency for file and directory operations.
Files Refactored #
build_config.dart— Config file loadingbuild_yaml_utils.dart— Build.yaml utilitiesconfig_loader.dart— Configuration loading with placeholdersproject_discovery.dart— Project discovery and scanningproject_scanner.dart— Project validation and scanningshow_versions.dart— Version display functionalityworkspace_mode.dart— Workspace navigation utilities
1.8.0 #
Features #
-
ConfigLoaderclass — New unified configuration loader with mode processing and placeholder resolution.- Loads
{basename}_master.yaml(workspace) and{basename}.yaml(project) configuration files. - Processes mode-prefixed keys (e.g.,
DEV-target,CI-enabled) with merging behavior. - Resolves
@[...]define placeholders from thedefines:section. - Resolves
@{...}tool placeholders (project-path, project-name, workspace-root, etc.). - Custom tool placeholders via
PlaceholderDefinition.
- Loads
-
Mode system — Workspace-wide configuration dimensions.
--modesCLI option to override active modes (e.g.,--modes=DEV,CI).- Mode sources: CLI option (highest) →
tom_workspace.yamldefault. - UPPERCASE mode prefixes merge in order, later modes override earlier.
-
Skip file system — Directory-level skip markers.
tom_skip.yaml— Skips directory for ALL tools.{basename}_skip.yaml— Skips directory for specific tool only.- Skip reason readable from YAML
reason:field.
-
resolvePlaceholders()function — Standalone placeholder resolution utility.- Supports
@[...]defines,@{...}tool placeholders. - Environment variable resolution with
$VARand$[VAR]syntax. - Recursive resolution (max depth 10).
- Supports
API Changes #
- New
config_loader.dartexported fromtom_build_base.dart. WorkspaceNavigationArgs.modes— New field for active modes.addNavigationOptions()registers--modesoption.parseNavigationArgs()parses modes as comma-separated, uppercased values.ProjectNavigatoraccepts optionaltoolBasenameparameter for tool-specific skip files.ProjectDiscovery.hasSkipFile(basename)— Updated signature with basename parameter.ProjectDiscovery.getSkipFileName(basename)— Returns tool-specific skip filename.ProjectDiscovery.globalSkipFileName— Constant fortom_skip.yaml.- v2
FolderScanner— Now supports tool-specific skip files:- Constructor accepts
toolBasenameparameter (defaults to 'buildkit'). - Checks for
tom_skip.yaml(global skip for all tools). - Checks for
{toolBasename}_skip.yaml(tool-specific skip). - New
skipFilenamegetter returns tool-specific skip filename. - New
kTomSkipYamlconstant exported.
- Constructor accepts
1.7.1 #
- Changelog update for 1.7.0 features.
1.7.0 #
Features #
ProjectNavigatorclass — New unified project navigation and discovery class that can be shared across CLI tools. Supports all navigation modes: project patterns, directory scanning, git-based traversal.NavigationConfigclass — Configurable opt-in/opt-out for navigation features (path exclude, name exclude, modules filter, skip files, master config defaults, build order, git traversal).NavigationDefaultsclass — Navigation defaults loaded from master config.NavigationResultclass — Result container with discovered paths and metadata.- Build order sorting —
ProjectNavigator.sortByBuildOrder()uses Kahn's algorithm for dependency-based topological sorting. - Git repository discovery —
ProjectNavigator.findGitRepositories()recursively scans for.gitfolders. - Static filter methods —
filterByPath(),filterByName(),filterSkippedProjects(),hasSkipFile(). - Master config loading —
loadNavigationDefaults()andloadMasterExcludeProjects()static methods.
API Changes #
- New
project_navigator.dartexported fromtom_build_base.dart. kBuildkitSkipYamlconstant now exported fromworkspace_mode.dart.toStringList()utility added toyaml_utils.dart.
1.6.0 #
Features #
--no-recursivesupport — The--recursiveflag is now negatable. Pass--no-recursiveto suppress recursion when applied viabuildkit.yamlor parent directories.--no-build-ordersupport — The--build-orderflag is now negatable. Pass--no-build-orderto skip dependency-based sorting.recursiveExplicitlySetfield —WorkspaceNavigationArgsnow tracks whether the-r, --recursiveflag was explicitly set by the user, allowing downstream tools to distinguish between defaulted and explicit values.
API Changes #
WorkspaceNavigationArgs.recursiveExplicitlySet— New boolean field indicating explicit user setting.parseNavigationArgs()now useswasParsed('recursive')to detect explicit usage.withDefaults()andwithProjectModeDefaults()respect explicit settings and don't override them.
1.5.0 #
Features #
--modules/-mnavigation option — New include filter to limit project discovery to specific git modules (repositories). Comma-separated list of module names (e.g.,--modules tom_module_d4rt,tom_module_basics). Use "root" or "tom" to reference the main repository.ProjectDiscovery.findGitRepositories()— Static method to discover all git repositories in a workspace.ProjectDiscovery.resolveModulePaths()— Resolve module names to absolute paths.ProjectDiscovery.filterByModules()— Filter project list to only those within specified modules.ProjectDiscovery.applyModulesFilter()— Convenience method combining resolution and filtering.
API Changes #
WorkspaceNavigationArgsnow includes amodulesfield (ListaddNavigationOptions()registers the-m, --modulesoption.parseNavigationArgs()parses the modules option as comma-separated values.- Help text updated with modules documentation.
1.3.2 #
Internal #
- Config filename standardization — Updated all code references from
tom_build.yamltobuildkit.yaml. TheTomBuildConfig.projectFilenameconstant was already correct; this release ensureshasTomBuildConfig()andProjectDiscovery.getProjectRecursiveSetting()use the constant instead of hardcoded strings.
1.3.0 #
Features #
yamlToMap()utility — Public function to recursively convertYamlMapto plainMap<String, dynamic>. Eliminates private YAML-to-Map conversion duplicated across build tools.yamlListToList()utility — Companion function to recursively convertYamlListto plainList<dynamic>.
Internal #
- Replaced private
_convertYamlToMapinbuild_config.dartand_yamlToMap/_yamlListToListinbuild_yaml_utils.dartwith the shared public utilities.
1.2.0 #
Features #
show_versionsCLI tool — New executable inbin/show_versions.dart. Run viadart run tom_build_base:show_versions [workspace-path]or install globally withdart pub global activate tom_build_base.showVersions()library function — Importable API inlib/src/show_versions.dartthat discovers projects and reads their pubspec versions. Returns a structuredShowVersionsResult.readPubspecVersion()helper — Reusable function to read theversion:field from any project'spubspec.yaml.
Improvements #
- Example file now delegates to the library function instead of reimplementing the logic.
1.1.0 #
Improvements #
- Comprehensive example — Rewrote the example as a
show_versionsCLI tool that exercises every library feature: config loading & merging, project scanning & discovery, build.yaml utilities, path validation, and result tracking. - Updated user guide — Complete rewrite of
doc/build_base_user_guide.mdwith accurate API signatures,ConfigMergerdocumentation,ProjectDiscoverysection, and an API quick-reference table. - Updated README — Refreshed usage examples to cover
ConfigMerger,ProjectDiscovery, and allbuild.yamlutility functions.
1.0.0 #
Features #
- TomBuildConfig: Unified configuration loading from
tom_build.yamlfiles with support for project paths, glob patterns, scan directories, recursive traversal, exclusion patterns, and tool-specific options. - ProjectScanner: Directory traversal with configurable project validation. Finds subprojects, scans directories recursively, supports glob-based project matching, and applies exclusion patterns.
- ProjectDiscovery: Advanced project discovery with proper scan vs recursive semantics. Scans until it hits a project boundary; recursive mode also looks inside found projects for nested projects. Supports comma-separated glob patterns with brace group handling.
- build.yaml utilities: Detect builder definitions (
isBuildYamlBuilderDefinition) vs consumer configurations (hasBuildYamlConsumerConfig) — so CLI tools can skip packages that define builders and only process consumer packages. - Path utilities: Path containment validation (
isPathContained) and multi-path validation (validatePathContainment) for security. - ProcessingResult: Simple success/failure/file-count tracking for batch operations.
- Multi-project support:
--projectoption accepts comma-separated lists and glob patterns (e.g.,tom_*,xternal/tom_module_*/*). --listflag support: Tools can list discovered projects without processing.