@deltabox/toolchain 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +31 -3
  2. package/dist/changelog.d.ts +2 -1
  3. package/dist/changelog.js +1 -1
  4. package/dist/index.d.ts +5 -5
  5. package/dist/index.js +1 -1
  6. package/dist/package.js +1 -1
  7. package/dist/packages/changelog/src/cli/index.js +1 -1
  8. package/dist/packages/changelog/src/index.d.ts +3 -2
  9. package/dist/packages/changelog/src/index.js +1 -1
  10. package/dist/packages/changelog/src/run.d.ts +8 -2
  11. package/dist/packages/changelog/src/run.js +1 -1
  12. package/dist/packages/changelog/src/utils/versioning.d.ts +78 -0
  13. package/dist/packages/changelog/src/utils/versioning.js +1 -0
  14. package/dist/packages/changelog/src/utils/write.js +1 -1
  15. package/dist/packages/shared/src/bin.d.ts +11 -0
  16. package/dist/packages/shared/src/bin.js +1 -1
  17. package/dist/packages/shared/src/config-schema.d.ts +101 -0
  18. package/dist/packages/shared/src/config-schema.js +1 -1
  19. package/dist/packages/shared/src/config-types.d.ts +12 -0
  20. package/dist/packages/shared/src/index.d.ts +6 -6
  21. package/dist/packages/shared/src/index.js +1 -1
  22. package/dist/packages/shared/src/run.d.ts +22 -2
  23. package/dist/packages/shared/src/run.js +1 -1
  24. package/dist/packages/shared/src/toolchain.d.ts +3 -3
  25. package/dist/packages/shared/src/toolchain.js +1 -1
  26. package/dist/packages/vite/src/index.d.ts +2 -2
  27. package/dist/packages/vite/src/index.js +1 -1
  28. package/dist/packages/vite/src/plugin.d.ts +26 -5
  29. package/dist/packages/vite/src/plugin.js +1 -1
  30. package/dist/packages/vite/src/vp.d.ts +5 -0
  31. package/dist/packages/vite/src/vp.js +1 -1
  32. package/dist/shared.d.ts +5 -5
  33. package/dist/shared.js +1 -1
  34. package/dist/vite.d.ts +2 -2
  35. package/dist/vite.js +1 -1
  36. package/package.json +12 -12
package/CHANGELOG.md CHANGED
@@ -1,17 +1,45 @@
1
1
  # Changelog
2
2
 
3
- ## 1.5.0 (October 2026)
3
+ ## 1.6.0 (October 2026)
4
4
 
5
5
  <!-- release:start -->
6
6
 
7
7
  ### New features
8
8
  #### Changelog
9
- - Emit the husky commit-msg hook for consumers ([#6898386](https://github.com/deltabox-studio/toolchain/issues/6898386) by [T0chi](https://github.com/T0chi))
10
- - \dbx sync\ now writes .husky/commit-msg (running commitlint) alongside the workflows and commitlint.config.mjs, so consumers using the Conventional-Commits CI lint commits locally too. The docs recommend \postinstall: husky\ (Yarn Berry never runs \prepare\) and \.husky/* text eol=lf\ (a trailing CR breaks the hook).
9
+ - Add a configurable versioning option ([#e5cbefc](https://github.com/deltabox-studio/toolchain/commit/e5cbefc) by [T0chi](https://github.com/T0chi))
10
+ - Add \ oolchain.changelog.versioning\ (boolean | { target, workspaces }) to the shared Zod model, defaulting to true/uniform. \ arget\ selects uniform (root + all workspaces), root-only, or individual (each changed workspace bumps on its own); \workspaces\ globs select which workspaces to version (defaulting to the root workspaces field, else the root package.json alone). The CLI now threads the changelog config into the generator and writeChangelogs takes per-workspace versions. Documented in the new 'Changelog & versioning' guide.
11
+ ### Bug fixes
12
+ #### Shared
13
+ - Add spawn timeouts so a stalled child can't hang the tool ([#e7fdf96](https://github.com/deltabox-studio/toolchain/commit/e7fdf96) by [T0chi](https://github.com/T0chi))
14
+ - spawnCross/run gain \ imeoutMs\ (kills the child's whole tree — \ askkill /t\ on Windows — with a warning); runVp forwards it; the plugin's one-shot \
15
+ #### Vite
16
+ - Build DBX_TASKS from a resolved binary and warn on fallbacks ([#c1a29db](https://github.com/deltabox-studio/toolchain/commit/c1a29db) by [T0chi](https://github.com/T0chi))
17
+ - Vite Task runs a task's command through a shell, so a bare \dbx sync\ depended on PATH/environment and could miss or pick a stale binary. DBX_TASKS now bakes in the \
18
+ - Warn and fall back on missing DBX_BIN/PATH/ComSpec ([#f91ad12](https://github.com/deltabox-studio/toolchain/commit/f91ad12) by [T0chi](https://github.com/T0chi))
19
+ - resolveDbx now ignores a DBX_BIN that points at a missing file (warn + fall through) instead of wedging every dbx call; \which\ warns once when PATH is empty; the Windows spawner warns once when ComSpec is unset before falling back to cmd.exe.
20
+ - Never run a stale global dbx from a pinned project ([#d441427](https://github.com/deltabox-studio/toolchain/commit/d441427) by [T0chi](https://github.com/T0chi))
21
+ - resolveDbx fell back to a global \dbx\ on PATH whenever the project's own binary wasn't resolvable — which happens in the toolchain repo itself (Yarn doesn't link the root's own bin, and findOwnCliEntry needs a built dist). A stale global dbx would then run \dbx sync\ and rewrite generated files in an older format. Now a project that pins @deltabox/toolchain (node_modules or the repo itself) never uses a global dbx: it warns and uses \
22
+ px @deltabox/toolchain@<pinned>\; the global is only used when the project pins nothing. Adds localToolchainVersion() + tests, and documents the resolution.
23
+ #### Vscode
24
+ - Pin the npx fallback to the extension's version ([#57d27fa](https://github.com/deltabox-studio/toolchain/commit/57d27fa) by [T0chi](https://github.com/T0chi))
25
+ - The extension's last-resort \
26
+ px --yes @deltabox/toolchain\ resolved \@latest\, which could drift from the workspace's generated files. It now pins its own version (\@deltabox/toolchain@<extension version>\), since the extension is versioned in lockstep with the toolchain.
27
+ #### Tsdown
28
+ - Let Yarn own the single-entry bin field ([#d6198b5](https://github.com/deltabox-studio/toolchain/commit/d6198b5) by [T0chi](https://github.com/T0chi))
29
+ - Reproduced (and minimised) the 'unexplained' bin revert: Yarn 4 normalises a single-entry \in\ object to a plain string on every \yarn install\, so an explicit tsdown \in\ object could never persist — install and build fought over package.json. Set tsdown's \exports.bin\ to \ alse\ so tsdown leaves the field alone, and commit the string form Yarn writes. install + build are now idempotent.
30
+ - Re-apply the explicit changelog and tsconfig bins ([#192a2d3](https://github.com/deltabox-studio/toolchain/commit/192a2d3) by [T0chi](https://github.com/T0chi))
31
+ - The generated version bump commit dropped the explicit \in\ mapping (object form) from both package.jsons; regenerate it from the pinned tsdown \exports.bin\ so \yarn build\ stays idempotent.
11
32
 
12
33
  <!-- release:end -->
13
34
 
14
35
 
36
+ ## 1.5.0 (October 2026)
37
+
38
+ ### New features
39
+ #### Changelog
40
+ - Emit the husky commit-msg hook for consumers ([#6898386](https://github.com/deltabox-studio/toolchain/issues/6898386) by [T0chi](https://github.com/T0chi))
41
+ - \dbx sync\ now writes .husky/commit-msg (running commitlint) alongside the workflows and commitlint.config.mjs, so consumers using the Conventional-Commits CI lint commits locally too. The docs recommend \postinstall: husky\ (Yarn Berry never runs \prepare\) and \.husky/* text eol=lf\ (a trailing CR breaks the hook).
42
+
15
43
  ## 1.4.1 (October 2026)
16
44
 
17
45
  ### Bug fixes
@@ -12,6 +12,7 @@ import { DEFAULT_WORKFLOW_TOKENS, RenderWorkflowOptions, WORKFLOW_FILENAMES, Wor
12
12
  import { RanWorkflow, RunWorkflowsOptions, RunWorkflowsResult, resolveWorkflowId, runWorkflows } from "./packages/changelog/src/run-workflows.js";
13
13
  import { COMMITLINT_HEADER, COMMIT_MSG_HOOK, HOOK_HEADER, WORKFLOW_HEADER, changelogSyncTask, workflowFilenames } from "./packages/changelog/src/sync.js";
14
14
  import { CommitlintOptions, conventionalCommitsVscodeExtensions, conventionalCommitsVscodeSettings, renderCommitlintConfig } from "./packages/changelog/src/templates.js";
15
+ import { PlanVersionsOptions, ResolvedVersioning, VersionPackages, VersionPlan, VersioningTarget, discoverVersionPackages, planVersions, readPackageVersion, resolveVersioning, writePackageVersion } from "./packages/changelog/src/utils/versioning.js";
15
16
  import "./packages/changelog/src/index.js";
16
17
  import { changelogCommands } from "./packages/changelog/src/cli/index.js";
17
- export { AuthorInfo, BumpType, COMMITLINT_HEADER, COMMIT_MSG_HOOK, CliOptions, CommitRecord, CommitlintOptions, DEFAULT_WORKFLOW_TOKENS, ExistingEntry, GroupedItem, GroupedRule, HOOK_HEADER, IssueInfo, ParsedCommit, ProcessingMethod, RanWorkflow, RenderWorkflowOptions, RunWorkflowsOptions, RunWorkflowsResult, WORKFLOW_FILENAMES, WORKFLOW_HEADER, Workflow, WorkflowId, WorkflowJob, applyWorkflowConfig, buildSummary, changelogCommands, changelogSyncTask, conventionalCommitsVscodeExtensions, conventionalCommitsVscodeSettings, defaultWorkflows, deriveBump, formatBody, groupItems, isEnabled, main, parseArgsCli, parseCcSubject, parseExistingChangelog, readCommits, reformatChangelogContent, renderChangelogEntry, renderCommitRef, renderCommitlintConfig, renderGroups, renderWorkflow, renderWorkflows, resolveWorkflowId, ruleTitle, runChangelog, runWorkflows, splitInlineDescription, workflowFilenames };
18
+ export { AuthorInfo, BumpType, COMMITLINT_HEADER, COMMIT_MSG_HOOK, CliOptions, CommitRecord, CommitlintOptions, DEFAULT_WORKFLOW_TOKENS, ExistingEntry, GroupedItem, GroupedRule, HOOK_HEADER, IssueInfo, ParsedCommit, PlanVersionsOptions, ProcessingMethod, RanWorkflow, RenderWorkflowOptions, ResolvedVersioning, RunWorkflowsOptions, RunWorkflowsResult, VersionPackages, VersionPlan, VersioningTarget, WORKFLOW_FILENAMES, WORKFLOW_HEADER, Workflow, WorkflowId, WorkflowJob, applyWorkflowConfig, buildSummary, changelogCommands, changelogSyncTask, conventionalCommitsVscodeExtensions, conventionalCommitsVscodeSettings, defaultWorkflows, deriveBump, discoverVersionPackages, formatBody, groupItems, isEnabled, main, parseArgsCli, parseCcSubject, parseExistingChangelog, planVersions, readCommits, readPackageVersion, reformatChangelogContent, renderChangelogEntry, renderCommitRef, renderCommitlintConfig, renderGroups, renderWorkflow, renderWorkflows, resolveVersioning, resolveWorkflowId, ruleTitle, runChangelog, runWorkflows, splitInlineDescription, workflowFilenames, writePackageVersion };
package/dist/changelog.js CHANGED
@@ -1 +1 @@
1
- import"node:path";import"node:url";import.meta.url;import{parseArgsCli as e}from"./packages/changelog/src/utils/args.js";import{deriveBump as t,readCommits as n}from"./packages/changelog/src/utils/git.js";import{formatBody as r,groupItems as i,parseCcSubject as a,renderGroups as o,ruleTitle as s,splitInlineDescription as c}from"./packages/changelog/src/utils/format.js";import{renderChangelogEntry as l}from"./packages/changelog/src/utils/version.js";import{parseExistingChangelog as u,reformatChangelogContent as d}from"./packages/changelog/src/utils/reformat.js";import{buildSummary as f,renderCommitRef as p}from"./packages/changelog/src/utils/summary.js";import{main as m,runChangelog as h}from"./packages/changelog/src/run.js";import{DEFAULT_WORKFLOW_TOKENS as g,WORKFLOW_FILENAMES as _,applyWorkflowConfig as v,defaultWorkflows as y,isEnabled as b,renderWorkflow as x,renderWorkflows as S}from"./packages/changelog/src/workflows.js";import{resolveWorkflowId as C,runWorkflows as w}from"./packages/changelog/src/run-workflows.js";import{conventionalCommitsVscodeExtensions as T,conventionalCommitsVscodeSettings as E,renderCommitlintConfig as D}from"./packages/changelog/src/templates.js";import{COMMITLINT_HEADER as O,COMMIT_MSG_HOOK as k,HOOK_HEADER as A,WORKFLOW_HEADER as j,changelogSyncTask as M,workflowFilenames as N}from"./packages/changelog/src/sync.js";import"./packages/changelog/src/index.js";import{changelogCommands as P}from"./packages/changelog/src/cli/index.js";export{O as COMMITLINT_HEADER,k as COMMIT_MSG_HOOK,g as DEFAULT_WORKFLOW_TOKENS,A as HOOK_HEADER,_ as WORKFLOW_FILENAMES,j as WORKFLOW_HEADER,v as applyWorkflowConfig,f as buildSummary,P as changelogCommands,M as changelogSyncTask,T as conventionalCommitsVscodeExtensions,E as conventionalCommitsVscodeSettings,y as defaultWorkflows,t as deriveBump,r as formatBody,i as groupItems,b as isEnabled,m as main,e as parseArgsCli,a as parseCcSubject,u as parseExistingChangelog,n as readCommits,d as reformatChangelogContent,l as renderChangelogEntry,p as renderCommitRef,D as renderCommitlintConfig,o as renderGroups,x as renderWorkflow,S as renderWorkflows,C as resolveWorkflowId,s as ruleTitle,h as runChangelog,w as runWorkflows,c as splitInlineDescription,N as workflowFilenames};
1
+ import"node:path";import"node:url";import.meta.url;import{parseArgsCli as e}from"./packages/changelog/src/utils/args.js";import{deriveBump as t,readCommits as n}from"./packages/changelog/src/utils/git.js";import{formatBody as r,groupItems as i,parseCcSubject as a,renderGroups as o,ruleTitle as s,splitInlineDescription as c}from"./packages/changelog/src/utils/format.js";import{renderChangelogEntry as l}from"./packages/changelog/src/utils/version.js";import{parseExistingChangelog as u,reformatChangelogContent as d}from"./packages/changelog/src/utils/reformat.js";import{buildSummary as f,renderCommitRef as p}from"./packages/changelog/src/utils/summary.js";import{discoverVersionPackages as m,planVersions as h,readPackageVersion as g,resolveVersioning as _,writePackageVersion as v}from"./packages/changelog/src/utils/versioning.js";import{main as y,runChangelog as b}from"./packages/changelog/src/run.js";import{DEFAULT_WORKFLOW_TOKENS as x,WORKFLOW_FILENAMES as S,applyWorkflowConfig as C,defaultWorkflows as w,isEnabled as T,renderWorkflow as E,renderWorkflows as D}from"./packages/changelog/src/workflows.js";import{resolveWorkflowId as O,runWorkflows as k}from"./packages/changelog/src/run-workflows.js";import{conventionalCommitsVscodeExtensions as A,conventionalCommitsVscodeSettings as j,renderCommitlintConfig as M}from"./packages/changelog/src/templates.js";import{COMMITLINT_HEADER as N,COMMIT_MSG_HOOK as P,HOOK_HEADER as F,WORKFLOW_HEADER as I,changelogSyncTask as L,workflowFilenames as R}from"./packages/changelog/src/sync.js";import"./packages/changelog/src/index.js";import{changelogCommands as z}from"./packages/changelog/src/cli/index.js";export{N as COMMITLINT_HEADER,P as COMMIT_MSG_HOOK,x as DEFAULT_WORKFLOW_TOKENS,F as HOOK_HEADER,S as WORKFLOW_FILENAMES,I as WORKFLOW_HEADER,C as applyWorkflowConfig,f as buildSummary,z as changelogCommands,L as changelogSyncTask,A as conventionalCommitsVscodeExtensions,j as conventionalCommitsVscodeSettings,w as defaultWorkflows,t as deriveBump,m as discoverVersionPackages,r as formatBody,i as groupItems,T as isEnabled,y as main,e as parseArgsCli,a as parseCcSubject,u as parseExistingChangelog,h as planVersions,n as readCommits,g as readPackageVersion,d as reformatChangelogContent,l as renderChangelogEntry,p as renderCommitRef,M as renderCommitlintConfig,o as renderGroups,E as renderWorkflow,D as renderWorkflows,_ as resolveVersioning,O as resolveWorkflowId,s as ruleTitle,b as runChangelog,k as runWorkflows,c as splitInlineDescription,R as workflowFilenames,v as writePackageVersion};
package/dist/index.d.ts CHANGED
@@ -1,16 +1,16 @@
1
1
  import __tsdown_shims_path from 'node:path';
2
2
  import __tsdown_shims_url from 'node:url';
3
- import { TOOLCHAIN_PACKAGE, findOwnCliEntry } from "./packages/shared/src/bin.js";
3
+ import { TOOLCHAIN_PACKAGE, findOwnCliEntry, localToolchainVersion } from "./packages/shared/src/bin.js";
4
4
  import { mergeJsonAt, readJsonAt, readJsonFile, toJson, writeJsonFile } from "./packages/shared/src/fs-utils.js";
5
5
  import { Colors, LOG_LEVELS, LogChannel, LogLevel, Logger, LoggerConfig, LoggerOptions, configureLogger, createLogger, getLogOverrides, getLogger, isLogLevel, logger, normalizeLogLevel, setLogConfig, setLogOverrides, stripAnsi } from "./packages/shared/src/logger.js";
6
6
  import { Sortable, deepMerge, isPlainObject, mapValues, resolveSort, sort } from "./packages/shared/src/object-utils.js";
7
7
  import { ToolchainProvider, ToolchainProviderAction, ToolchainProviderCommand, providerActions } from "./packages/shared/src/provider.js";
8
- import { RunOptions, run, spawnCross } from "./packages/shared/src/run.js";
8
+ import { RunOptions, SpawnCrossOptions, killProcessTree, run, spawnCross } from "./packages/shared/src/run.js";
9
9
  import { asString, camelCase, camelCaseId, capitalize, constantCase, ensureLeadingSlash, ensureSlashes, ensureTrailingSlash, formatCliFlag, hasText, indent, isLocalhost, kebabCase, pascalCase, removeDoubleSlashes, removeLeadingSlash, removeTrailingSlash, sanitizeSlashes, snakeCase, str, titleCase } from "./packages/shared/src/string-utils.js";
10
10
  import { ReplacementOptions, ReplacementValue, Replacements, Replacer, applyReplacements, applyReplacementsDeep, createReplacer, defineReplacements, extractTokens, hasUnresolvedTokens, tokenPattern } from "./packages/shared/src/template.js";
11
- import { ChangelogWorkflowsConfig, DbxConfigSections, ProjectType, ToolchainBiomeConfig, ToolchainChangelogConfig, ToolchainConfigSections, ToolchainLoggerConfig, ToolchainProjectConfig, ToolchainProvidersConfig, ToolchainTemplateKind, ToolchainTemplateSource, ToolchainTemplateSourceType, ToolchainTemplatesConfig, ToolchainTsconfigConfig, ToolchainViteConfig, ToolchainWatchConfig, WorkflowConfig, WorkflowSetting, WorkflowStep, WorkflowStepsConfig } from "./packages/shared/src/config-types.js";
11
+ import { ChangelogVersioning, ChangelogVersioningConfig, ChangelogVersioningTarget, ChangelogWorkflowsConfig, DbxConfigSections, ProjectType, ToolchainBiomeConfig, ToolchainChangelogConfig, ToolchainConfigSections, ToolchainLoggerConfig, ToolchainProjectConfig, ToolchainProvidersConfig, ToolchainTemplateKind, ToolchainTemplateSource, ToolchainTemplateSourceType, ToolchainTemplatesConfig, ToolchainTsconfigConfig, ToolchainViteConfig, ToolchainWatchConfig, WorkflowConfig, WorkflowSetting, WorkflowStep, WorkflowStepsConfig } from "./packages/shared/src/config-types.js";
12
12
  import { Awaitable, GeneratedFile, JsonValue, PackageJson, ToolchainArgument, ToolchainCommand, ToolchainCommandContext, ToolchainOption } from "./packages/shared/src/types.js";
13
- import { CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, biomeConfigSchema, changelogConfigSchema, changelogWorkflowsConfigSchema, dbxConfigSchema, loggerConfigSchema, projectConfigSchema, projectTypeSchema, providersConfigSchema, templateKindSchema, templateSourceSchema, templateSourceTypeSchema, templatesConfigSchema, toolchainConfigSchema, tsconfigConfigSchema, viteConfigSchema, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema } from "./packages/shared/src/config-schema.js";
13
+ import { CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, biomeConfigSchema, changelogConfigSchema, changelogVersioningConfigSchema, changelogVersioningSchema, changelogVersioningTargetSchema, changelogWorkflowsConfigSchema, dbxConfigSchema, loggerConfigSchema, projectConfigSchema, projectTypeSchema, providersConfigSchema, templateKindSchema, templateSourceSchema, templateSourceTypeSchema, templatesConfigSchema, toolchainConfigSchema, tsconfigConfigSchema, viteConfigSchema, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema } from "./packages/shared/src/config-schema.js";
14
14
  import { CONFIG_FILE_NAMES, DbxConfig, ManagedFile, SyncContext, SyncSummary, SyncTask, ToolchainConfig, ToolchainHooks, ToolchainSection, defineConfig, repoSlugFromUrl, resolveTokens, sectionConfig, sectionEnabled } from "./packages/shared/src/toolchain.js";
15
15
  import { YamlValue, toYaml } from "./packages/shared/src/yaml.js";
16
16
  import { index_d_exports as index_d_exports$5 } from "./packages/shared/src/index.js";
@@ -33,4 +33,4 @@ import { index_d_exports as index_d_exports$6 } from "./packages/tsconfig/src/in
33
33
  import { index_d_exports as index_d_exports$4 } from "./packages/project/src/index.js";
34
34
  import { index_d_exports as index_d_exports$7 } from "./packages/tsdown/src/index.js";
35
35
  import { defaultSyncTasks } from "./sync.js";
36
- export { Awaitable, BuildProjectGraphOptions, CONFIG_FILE_NAMES, CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, ChangelogWorkflowsConfig, Colors, DBX_GITIGNORE_BLOCK, DbxConfig, DbxConfigSections, GeneratedFile, IGNORED_DIRS, JsonValue, LOG_LEVELS, LoadedConfig, LogChannel, LogLevel, Logger, LoggerConfig, LoggerOptions, MANIFEST_DIR, MANIFEST_FILE, ManagedFile, Manifest, PackageJson, PackageManager, ProjectGraph, ProjectNode, ProjectType, ReplacementOptions, ReplacementValue, Replacements, Replacer, ResetProjectsOptions, ResetProjectsResult, ResetSelectors, ResetToolchainOptions, ResetToolchainResult, RunOptions, RunSyncOptions, RunWatchOptions, SelectProjectsOptions, SelectedProject, Sortable, SyncContext, SyncResult, SyncSummary, SyncTask, TOOLCHAIN_PACKAGE, ToolchainArgument, ToolchainBiomeConfig, ToolchainChangelogConfig, ToolchainCommand, ToolchainCommandContext, ToolchainConfig, ToolchainConfigSections, ToolchainHooks, ToolchainLoggerConfig, ToolchainOption, ToolchainProjectConfig, ToolchainProvider, ToolchainProviderAction, ToolchainProviderCommand, ToolchainProvidersConfig, ToolchainSection, ToolchainTemplateKind, ToolchainTemplateSource, ToolchainTemplateSourceType, ToolchainTemplatesConfig, ToolchainTsconfigConfig, ToolchainViteConfig, ToolchainWatchConfig, VscodeSyncOptions, WorkflowConfig, WorkflowSetting, WorkflowStep, WorkflowStepsConfig, type YamlValue, applyReplacements, applyReplacementsDeep, asString, index_d_exports as biome, biomeConfigSchema, buildProjectGraph, camelCase, camelCaseId, capitalize, index_d_exports$1 as changelog, changelogConfigSchema, changelogWorkflowsConfigSchema, index_d_exports$2 as config, configureLogger, constantCase, index_d_exports$3 as core, createLogger, createReplacer, dbxConfigSchema, deepMerge, defaultSyncTasks, defineConfig, defineReplacements, detectPackageManager, detectProjectType, ensureDbxGitignore, ensureLeadingSlash, ensureSlashes, ensureTrailingSlash, extractTokens, findConfigFile, findOwnCliEntry, formatCliFlag, getLogOverrides, getLogger, hasText, hasUnresolvedTokens, indent, isLocalhost, isLogLevel, isPlainObject, kebabCase, loadToolchainConfig, logger, loggerConfigSchema, mapValues, mergeJsonAt, normalizeLogLevel, orderProjects, pascalCase, index_d_exports$4 as project, projectConfigSchema, projectGraphPath, projectTypeSchema, providerActions, providerRegistryPath, providersConfigSchema, readJsonAt, readJsonFile, readManifest, readProjectGraph, readProviderRegistry, removeDoubleSlashes, removeLeadingSlash, removeTrailingSlash, repoSlugFromUrl, resetProjects, resetToolchain, resolveProjectType, resolveSort, resolveTokens, run, runSync, runWatch, sanitizeSlashes, sectionConfig, sectionEnabled, selectProjects, setLogConfig, setLogOverrides, index_d_exports$5 as shared, snakeCase, sort, spawnCross, str, stripAnsi, templateKindSchema, templateSourceSchema, templateSourceTypeSchema, templatesConfigSchema, titleCase, toJson, toYaml, tokenPattern, toolchainConfigSchema, index_d_exports$6 as tsconfig, tsconfigConfigSchema, index_d_exports$7 as tsdown, viteConfigSchema, vscodeSyncTask, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema, writeJsonFile, writeManifest, writeProjectGraph, writeProviderRegistry };
36
+ export { Awaitable, BuildProjectGraphOptions, CONFIG_FILE_NAMES, CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, ChangelogVersioning, ChangelogVersioningConfig, ChangelogVersioningTarget, ChangelogWorkflowsConfig, Colors, DBX_GITIGNORE_BLOCK, DbxConfig, DbxConfigSections, GeneratedFile, IGNORED_DIRS, JsonValue, LOG_LEVELS, LoadedConfig, LogChannel, LogLevel, Logger, LoggerConfig, LoggerOptions, MANIFEST_DIR, MANIFEST_FILE, ManagedFile, Manifest, PackageJson, PackageManager, ProjectGraph, ProjectNode, ProjectType, ReplacementOptions, ReplacementValue, Replacements, Replacer, ResetProjectsOptions, ResetProjectsResult, ResetSelectors, ResetToolchainOptions, ResetToolchainResult, RunOptions, RunSyncOptions, RunWatchOptions, SelectProjectsOptions, SelectedProject, Sortable, SpawnCrossOptions, SyncContext, SyncResult, SyncSummary, SyncTask, TOOLCHAIN_PACKAGE, ToolchainArgument, ToolchainBiomeConfig, ToolchainChangelogConfig, ToolchainCommand, ToolchainCommandContext, ToolchainConfig, ToolchainConfigSections, ToolchainHooks, ToolchainLoggerConfig, ToolchainOption, ToolchainProjectConfig, ToolchainProvider, ToolchainProviderAction, ToolchainProviderCommand, ToolchainProvidersConfig, ToolchainSection, ToolchainTemplateKind, ToolchainTemplateSource, ToolchainTemplateSourceType, ToolchainTemplatesConfig, ToolchainTsconfigConfig, ToolchainViteConfig, ToolchainWatchConfig, VscodeSyncOptions, WorkflowConfig, WorkflowSetting, WorkflowStep, WorkflowStepsConfig, type YamlValue, applyReplacements, applyReplacementsDeep, asString, index_d_exports as biome, biomeConfigSchema, buildProjectGraph, camelCase, camelCaseId, capitalize, index_d_exports$1 as changelog, changelogConfigSchema, changelogVersioningConfigSchema, changelogVersioningSchema, changelogVersioningTargetSchema, changelogWorkflowsConfigSchema, index_d_exports$2 as config, configureLogger, constantCase, index_d_exports$3 as core, createLogger, createReplacer, dbxConfigSchema, deepMerge, defaultSyncTasks, defineConfig, defineReplacements, detectPackageManager, detectProjectType, ensureDbxGitignore, ensureLeadingSlash, ensureSlashes, ensureTrailingSlash, extractTokens, findConfigFile, findOwnCliEntry, formatCliFlag, getLogOverrides, getLogger, hasText, hasUnresolvedTokens, indent, isLocalhost, isLogLevel, isPlainObject, kebabCase, killProcessTree, loadToolchainConfig, localToolchainVersion, logger, loggerConfigSchema, mapValues, mergeJsonAt, normalizeLogLevel, orderProjects, pascalCase, index_d_exports$4 as project, projectConfigSchema, projectGraphPath, projectTypeSchema, providerActions, providerRegistryPath, providersConfigSchema, readJsonAt, readJsonFile, readManifest, readProjectGraph, readProviderRegistry, removeDoubleSlashes, removeLeadingSlash, removeTrailingSlash, repoSlugFromUrl, resetProjects, resetToolchain, resolveProjectType, resolveSort, resolveTokens, run, runSync, runWatch, sanitizeSlashes, sectionConfig, sectionEnabled, selectProjects, setLogConfig, setLogOverrides, index_d_exports$5 as shared, snakeCase, sort, spawnCross, str, stripAnsi, templateKindSchema, templateSourceSchema, templateSourceTypeSchema, templatesConfigSchema, titleCase, toJson, toYaml, tokenPattern, toolchainConfigSchema, index_d_exports$6 as tsconfig, tsconfigConfigSchema, index_d_exports$7 as tsdown, viteConfigSchema, vscodeSyncTask, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema, writeJsonFile, writeManifest, writeProjectGraph, writeProviderRegistry };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import"node:path";import"node:url";import.meta.url;import{TOOLCHAIN_PACKAGE as e,findOwnCliEntry as t}from"./packages/shared/src/bin.js";import{deepMerge as n,isPlainObject as r,mapValues as i,resolveSort as a,sort as o}from"./packages/shared/src/object-utils.js";import{mergeJsonAt as s,readJsonAt as c,readJsonFile as l,toJson as u,writeJsonFile as d}from"./packages/shared/src/fs-utils.js";import{LOG_LEVELS as f,configureLogger as p,createLogger as m,getLogOverrides as h,getLogger as g,isLogLevel as _,logger as v,normalizeLogLevel as y,setLogConfig as b,setLogOverrides as x,stripAnsi as S}from"./packages/shared/src/logger.js";import{providerActions as C}from"./packages/shared/src/provider.js";import{run as w,spawnCross as T}from"./packages/shared/src/run.js";import{asString as E,camelCase as D,camelCaseId as O,capitalize as k,constantCase as A,ensureLeadingSlash as j,ensureSlashes as M,ensureTrailingSlash as N,formatCliFlag as P,hasText as F,indent as I,isLocalhost as L,kebabCase as R,pascalCase as z,removeDoubleSlashes as B,removeLeadingSlash as V,removeTrailingSlash as H,sanitizeSlashes as U,snakeCase as W,str as G,titleCase as K}from"./packages/shared/src/string-utils.js";import{applyReplacements as q,applyReplacementsDeep as J,createReplacer as Y,defineReplacements as X,extractTokens as Z,hasUnresolvedTokens as Q,tokenPattern as $}from"./packages/shared/src/template.js";import{CONFIG_SECTION_DESCRIPTIONS as ee,CONFIG_SECTION_SCHEMAS as te,CONFIG_TYPE_SCHEMAS as ne,biomeConfigSchema as re,changelogConfigSchema as ie,changelogWorkflowsConfigSchema as ae,dbxConfigSchema as oe,loggerConfigSchema as se,projectConfigSchema as ce,projectTypeSchema as le,providersConfigSchema as ue,templateKindSchema as de,templateSourceSchema as fe,templateSourceTypeSchema as pe,templatesConfigSchema as me,toolchainConfigSchema as he,tsconfigConfigSchema as ge,viteConfigSchema as _e,watchConfigSchema as ve,workflowConfigSchema as ye,workflowSettingSchema as be,workflowStepSchema as xe,workflowStepsConfigSchema as Se}from"./packages/shared/src/config-schema.js";import{CONFIG_FILE_NAMES as Ce,defineConfig as we,repoSlugFromUrl as Te,resolveTokens as Ee,sectionConfig as De,sectionEnabled as Oe}from"./packages/shared/src/toolchain.js";import{toYaml as ke}from"./packages/shared/src/yaml.js";import{src_exports as Ae}from"./packages/shared/src/index.js";import{src_exports as je}from"./packages/biome/src/index.js";import{src_exports as Me}from"./packages/changelog/src/index.js";import{src_exports as Ne}from"./packages/config/src/index.js";import{DBX_GITIGNORE_BLOCK as Pe,ensureDbxGitignore as Fe}from"./packages/core/src/gitignore.js";import{detectProjectType as Ie,resolveProjectType as Le}from"./packages/core/src/project-type.js";import{findConfigFile as Re,loadToolchainConfig as ze}from"./packages/core/src/loader.js";import{IGNORED_DIRS as Be,buildProjectGraph as Ve,detectPackageManager as He,orderProjects as Ue,projectGraphPath as We,readProjectGraph as Ge,writeProjectGraph as Ke}from"./packages/core/src/graph.js";import{MANIFEST_DIR as qe,MANIFEST_FILE as Je,readManifest as Ye,writeManifest as Xe}from"./packages/core/src/manifest.js";import{providerRegistryPath as Ze,readProviderRegistry as Qe,writeProviderRegistry as $e}from"./packages/core/src/provider-registry.js";import{selectProjects as et}from"./packages/core/src/select.js";import{resetProjects as tt,resetToolchain as nt}from"./packages/core/src/reset.js";import{runSync as rt}from"./packages/core/src/sync.js";import{vscodeSyncTask as it}from"./packages/core/src/vscode.js";import{runWatch as at}from"./packages/core/src/watch.js";import{src_exports as ot}from"./packages/core/src/index.js";import{src_exports as st}from"./packages/tsconfig/src/index.js";import{src_exports as ct}from"./packages/project/src/index.js";import{src_exports as lt}from"./packages/tsdown/src/index.js";import{defaultSyncTasks as ut}from"./sync.js";export{Ce as CONFIG_FILE_NAMES,ee as CONFIG_SECTION_DESCRIPTIONS,te as CONFIG_SECTION_SCHEMAS,ne as CONFIG_TYPE_SCHEMAS,Pe as DBX_GITIGNORE_BLOCK,Be as IGNORED_DIRS,f as LOG_LEVELS,qe as MANIFEST_DIR,Je as MANIFEST_FILE,e as TOOLCHAIN_PACKAGE,q as applyReplacements,J as applyReplacementsDeep,E as asString,je as biome,re as biomeConfigSchema,Ve as buildProjectGraph,D as camelCase,O as camelCaseId,k as capitalize,Me as changelog,ie as changelogConfigSchema,ae as changelogWorkflowsConfigSchema,Ne as config,p as configureLogger,A as constantCase,ot as core,m as createLogger,Y as createReplacer,oe as dbxConfigSchema,n as deepMerge,ut as defaultSyncTasks,we as defineConfig,X as defineReplacements,He as detectPackageManager,Ie as detectProjectType,Fe as ensureDbxGitignore,j as ensureLeadingSlash,M as ensureSlashes,N as ensureTrailingSlash,Z as extractTokens,Re as findConfigFile,t as findOwnCliEntry,P as formatCliFlag,h as getLogOverrides,g as getLogger,F as hasText,Q as hasUnresolvedTokens,I as indent,L as isLocalhost,_ as isLogLevel,r as isPlainObject,R as kebabCase,ze as loadToolchainConfig,v as logger,se as loggerConfigSchema,i as mapValues,s as mergeJsonAt,y as normalizeLogLevel,Ue as orderProjects,z as pascalCase,ct as project,ce as projectConfigSchema,We as projectGraphPath,le as projectTypeSchema,C as providerActions,Ze as providerRegistryPath,ue as providersConfigSchema,c as readJsonAt,l as readJsonFile,Ye as readManifest,Ge as readProjectGraph,Qe as readProviderRegistry,B as removeDoubleSlashes,V as removeLeadingSlash,H as removeTrailingSlash,Te as repoSlugFromUrl,tt as resetProjects,nt as resetToolchain,Le as resolveProjectType,a as resolveSort,Ee as resolveTokens,w as run,rt as runSync,at as runWatch,U as sanitizeSlashes,De as sectionConfig,Oe as sectionEnabled,et as selectProjects,b as setLogConfig,x as setLogOverrides,Ae as shared,W as snakeCase,o as sort,T as spawnCross,G as str,S as stripAnsi,de as templateKindSchema,fe as templateSourceSchema,pe as templateSourceTypeSchema,me as templatesConfigSchema,K as titleCase,u as toJson,ke as toYaml,$ as tokenPattern,he as toolchainConfigSchema,st as tsconfig,ge as tsconfigConfigSchema,lt as tsdown,_e as viteConfigSchema,it as vscodeSyncTask,ve as watchConfigSchema,ye as workflowConfigSchema,be as workflowSettingSchema,xe as workflowStepSchema,Se as workflowStepsConfigSchema,d as writeJsonFile,Xe as writeManifest,Ke as writeProjectGraph,$e as writeProviderRegistry};
1
+ import"node:path";import"node:url";import.meta.url;import{TOOLCHAIN_PACKAGE as e,findOwnCliEntry as t,localToolchainVersion as n}from"./packages/shared/src/bin.js";import{deepMerge as r,isPlainObject as i,mapValues as a,resolveSort as o,sort as s}from"./packages/shared/src/object-utils.js";import{mergeJsonAt as c,readJsonAt as l,readJsonFile as u,toJson as d,writeJsonFile as f}from"./packages/shared/src/fs-utils.js";import{LOG_LEVELS as p,configureLogger as m,createLogger as h,getLogOverrides as g,getLogger as _,isLogLevel as v,logger as y,normalizeLogLevel as b,setLogConfig as x,setLogOverrides as S,stripAnsi as C}from"./packages/shared/src/logger.js";import{providerActions as w}from"./packages/shared/src/provider.js";import{killProcessTree as T,run as E,spawnCross as D}from"./packages/shared/src/run.js";import{asString as O,camelCase as k,camelCaseId as A,capitalize as j,constantCase as M,ensureLeadingSlash as N,ensureSlashes as P,ensureTrailingSlash as F,formatCliFlag as I,hasText as L,indent as R,isLocalhost as z,kebabCase as B,pascalCase as V,removeDoubleSlashes as H,removeLeadingSlash as U,removeTrailingSlash as W,sanitizeSlashes as G,snakeCase as K,str as q,titleCase as J}from"./packages/shared/src/string-utils.js";import{applyReplacements as Y,applyReplacementsDeep as X,createReplacer as Z,defineReplacements as Q,extractTokens as $,hasUnresolvedTokens as ee,tokenPattern as te}from"./packages/shared/src/template.js";import{CONFIG_SECTION_DESCRIPTIONS as ne,CONFIG_SECTION_SCHEMAS as re,CONFIG_TYPE_SCHEMAS as ie,biomeConfigSchema as ae,changelogConfigSchema as oe,changelogVersioningConfigSchema as se,changelogVersioningSchema as ce,changelogVersioningTargetSchema as le,changelogWorkflowsConfigSchema as ue,dbxConfigSchema as de,loggerConfigSchema as fe,projectConfigSchema as pe,projectTypeSchema as me,providersConfigSchema as he,templateKindSchema as ge,templateSourceSchema as _e,templateSourceTypeSchema as ve,templatesConfigSchema as ye,toolchainConfigSchema as be,tsconfigConfigSchema as xe,viteConfigSchema as Se,watchConfigSchema as Ce,workflowConfigSchema as we,workflowSettingSchema as Te,workflowStepSchema as Ee,workflowStepsConfigSchema as De}from"./packages/shared/src/config-schema.js";import{CONFIG_FILE_NAMES as Oe,defineConfig as ke,repoSlugFromUrl as Ae,resolveTokens as je,sectionConfig as Me,sectionEnabled as Ne}from"./packages/shared/src/toolchain.js";import{toYaml as Pe}from"./packages/shared/src/yaml.js";import{src_exports as Fe}from"./packages/shared/src/index.js";import{src_exports as Ie}from"./packages/biome/src/index.js";import{src_exports as Le}from"./packages/changelog/src/index.js";import{src_exports as Re}from"./packages/config/src/index.js";import{DBX_GITIGNORE_BLOCK as ze,ensureDbxGitignore as Be}from"./packages/core/src/gitignore.js";import{detectProjectType as Ve,resolveProjectType as He}from"./packages/core/src/project-type.js";import{findConfigFile as Ue,loadToolchainConfig as We}from"./packages/core/src/loader.js";import{IGNORED_DIRS as Ge,buildProjectGraph as Ke,detectPackageManager as qe,orderProjects as Je,projectGraphPath as Ye,readProjectGraph as Xe,writeProjectGraph as Ze}from"./packages/core/src/graph.js";import{MANIFEST_DIR as Qe,MANIFEST_FILE as $e,readManifest as et,writeManifest as tt}from"./packages/core/src/manifest.js";import{providerRegistryPath as nt,readProviderRegistry as rt,writeProviderRegistry as it}from"./packages/core/src/provider-registry.js";import{selectProjects as at}from"./packages/core/src/select.js";import{resetProjects as ot,resetToolchain as st}from"./packages/core/src/reset.js";import{runSync as ct}from"./packages/core/src/sync.js";import{vscodeSyncTask as lt}from"./packages/core/src/vscode.js";import{runWatch as ut}from"./packages/core/src/watch.js";import{src_exports as dt}from"./packages/core/src/index.js";import{src_exports as ft}from"./packages/tsconfig/src/index.js";import{src_exports as pt}from"./packages/project/src/index.js";import{src_exports as mt}from"./packages/tsdown/src/index.js";import{defaultSyncTasks as ht}from"./sync.js";export{Oe as CONFIG_FILE_NAMES,ne as CONFIG_SECTION_DESCRIPTIONS,re as CONFIG_SECTION_SCHEMAS,ie as CONFIG_TYPE_SCHEMAS,ze as DBX_GITIGNORE_BLOCK,Ge as IGNORED_DIRS,p as LOG_LEVELS,Qe as MANIFEST_DIR,$e as MANIFEST_FILE,e as TOOLCHAIN_PACKAGE,Y as applyReplacements,X as applyReplacementsDeep,O as asString,Ie as biome,ae as biomeConfigSchema,Ke as buildProjectGraph,k as camelCase,A as camelCaseId,j as capitalize,Le as changelog,oe as changelogConfigSchema,se as changelogVersioningConfigSchema,ce as changelogVersioningSchema,le as changelogVersioningTargetSchema,ue as changelogWorkflowsConfigSchema,Re as config,m as configureLogger,M as constantCase,dt as core,h as createLogger,Z as createReplacer,de as dbxConfigSchema,r as deepMerge,ht as defaultSyncTasks,ke as defineConfig,Q as defineReplacements,qe as detectPackageManager,Ve as detectProjectType,Be as ensureDbxGitignore,N as ensureLeadingSlash,P as ensureSlashes,F as ensureTrailingSlash,$ as extractTokens,Ue as findConfigFile,t as findOwnCliEntry,I as formatCliFlag,g as getLogOverrides,_ as getLogger,L as hasText,ee as hasUnresolvedTokens,R as indent,z as isLocalhost,v as isLogLevel,i as isPlainObject,B as kebabCase,T as killProcessTree,We as loadToolchainConfig,n as localToolchainVersion,y as logger,fe as loggerConfigSchema,a as mapValues,c as mergeJsonAt,b as normalizeLogLevel,Je as orderProjects,V as pascalCase,pt as project,pe as projectConfigSchema,Ye as projectGraphPath,me as projectTypeSchema,w as providerActions,nt as providerRegistryPath,he as providersConfigSchema,l as readJsonAt,u as readJsonFile,et as readManifest,Xe as readProjectGraph,rt as readProviderRegistry,H as removeDoubleSlashes,U as removeLeadingSlash,W as removeTrailingSlash,Ae as repoSlugFromUrl,ot as resetProjects,st as resetToolchain,He as resolveProjectType,o as resolveSort,je as resolveTokens,E as run,ct as runSync,ut as runWatch,G as sanitizeSlashes,Me as sectionConfig,Ne as sectionEnabled,at as selectProjects,x as setLogConfig,S as setLogOverrides,Fe as shared,K as snakeCase,s as sort,D as spawnCross,q as str,C as stripAnsi,ge as templateKindSchema,_e as templateSourceSchema,ve as templateSourceTypeSchema,ye as templatesConfigSchema,J as titleCase,d as toJson,Pe as toYaml,te as tokenPattern,be as toolchainConfigSchema,ft as tsconfig,xe as tsconfigConfigSchema,mt as tsdown,Se as viteConfigSchema,lt as vscodeSyncTask,Ce as watchConfigSchema,we as workflowConfigSchema,Te as workflowSettingSchema,Ee as workflowStepSchema,De as workflowStepsConfigSchema,f as writeJsonFile,tt as writeManifest,Ze as writeProjectGraph,it as writeProviderRegistry};
package/dist/package.js CHANGED
@@ -1 +1 @@
1
- import"node:path";import"node:url";import.meta.url;var e=`1.5.0`;export{e as version};
1
+ import"node:path";import"node:url";import.meta.url;var e=`1.6.0`;export{e as version};
@@ -1 +1 @@
1
- import"node:path";import"node:url";import.meta.url;import{logger as e}from"../../../shared/src/logger.js";import"../../../shared/src/index.js";import{runChangelog as t}from"../run.js";import{runWorkflows as n}from"../run-workflows.js";function r(){return[{name:`workflow`,description:"Trigger one or more generated GitHub workflows (via `gh workflow run`).",args:[{name:`workflows`,description:`Workflow ids or file names (default: every enabled workflow).`,variadic:!0,required:!1}],options:[{flags:`--cwd <dir>`,description:`Project root (default: cwd).`},{flags:`--ref <ref>`,description:`Git ref to run the workflow on.`},{flags:`--gh <cmd>`,description:`The gh executable (default: gh).`}],run:async(t,r)=>{let i=t.workflows,a=Array.isArray(i)?i:i?[String(i)]:void 0,o=await n({cwd:t.cwd??r.cwd,config:r.config,...a?{workflows:a}:{},...t.ref?{ref:t.ref}:{},...t.gh?{gh:t.gh}:{}}),s=!1;for(let t of o.ran)t.code===0?e.info(`triggered ${t.file}`):(s=!0,e.error(`${t.file} exited ${t.code}`));s&&(process.exitCode=1)}},{name:`changelog`,description:`Scan commits, derive the semver bump and update the CHANGELOG.md files + versions.`,options:[{flags:`--range <range>`,description:`Git revision range to scan.`},{flags:`--dry-run`,description:`Print the proposed entry without writing.`},{flags:`--version <semver>`,description:`Override the version.`},{flags:`--base-version <semver>`,description:`Bump from this version instead.`},{flags:`--processing-method <method>`,description:"`latest` (default), `all`, or a git range."},{flags:`--format-only`,description:`Only regroup existing changelogs.`},{flags:`--no-package-changes-section`,description:`Skip the package-changes footer.`}],run:e=>{let n=[];e.range&&n.push(`--range`,String(e.range)),e.dryRun&&n.push(`--dry-run`),e.version&&n.push(`--version`,String(e.version)),e.baseVersion&&n.push(`--base-version`,String(e.baseVersion)),e.processingMethod&&n.push(`--processing-method`,String(e.processingMethod)),e.formatOnly&&n.push(`--format-only`),e.packageChangesSection===!1&&n.push(`--no-package-changes-section`),t(n)}}]}export{r as changelogCommands};
1
+ import"node:path";import"node:url";import.meta.url;import{logger as e}from"../../../shared/src/logger.js";import{sectionConfig as t}from"../../../shared/src/toolchain.js";import"../../../shared/src/index.js";import{runChangelog as n}from"../run.js";import{runWorkflows as r}from"../run-workflows.js";function i(){return[{name:`workflow`,description:"Trigger one or more generated GitHub workflows (via `gh workflow run`).",args:[{name:`workflows`,description:`Workflow ids or file names (default: every enabled workflow).`,variadic:!0,required:!1}],options:[{flags:`--cwd <dir>`,description:`Project root (default: cwd).`},{flags:`--ref <ref>`,description:`Git ref to run the workflow on.`},{flags:`--gh <cmd>`,description:`The gh executable (default: gh).`}],run:async(t,n)=>{let i=t.workflows,a=Array.isArray(i)?i:i?[String(i)]:void 0,o=await r({cwd:t.cwd??n.cwd,config:n.config,...a?{workflows:a}:{},...t.ref?{ref:t.ref}:{},...t.gh?{gh:t.gh}:{}}),s=!1;for(let t of o.ran)t.code===0?e.info(`triggered ${t.file}`):(s=!0,e.error(`${t.file} exited ${t.code}`));s&&(process.exitCode=1)}},{name:`changelog`,description:`Scan commits, derive the semver bump and update the CHANGELOG.md files + versions.`,options:[{flags:`--range <range>`,description:`Git revision range to scan.`},{flags:`--dry-run`,description:`Print the proposed entry without writing.`},{flags:`--version <semver>`,description:`Override the version.`},{flags:`--base-version <semver>`,description:`Bump from this version instead.`},{flags:`--processing-method <method>`,description:"`latest` (default), `all`, or a git range."},{flags:`--format-only`,description:`Only regroup existing changelogs.`},{flags:`--no-package-changes-section`,description:`Skip the package-changes footer.`}],run:(e,r)=>{let i=[];e.range&&i.push(`--range`,String(e.range)),e.dryRun&&i.push(`--dry-run`),e.version&&i.push(`--version`,String(e.version)),e.baseVersion&&i.push(`--base-version`,String(e.baseVersion)),e.processingMethod&&i.push(`--processing-method`,String(e.processingMethod)),e.formatOnly&&i.push(`--format-only`),e.packageChangesSection===!1&&i.push(`--no-package-changes-section`),n(i,t(r.config.changelog))}}]}export{i as changelogCommands};
@@ -12,8 +12,9 @@ import { DEFAULT_WORKFLOW_TOKENS, RenderWorkflowOptions, WORKFLOW_FILENAMES, Wor
12
12
  import { RanWorkflow, RunWorkflowsOptions, RunWorkflowsResult, resolveWorkflowId, runWorkflows } from "./run-workflows.js";
13
13
  import { COMMITLINT_HEADER, COMMIT_MSG_HOOK, HOOK_HEADER, WORKFLOW_HEADER, changelogSyncTask, workflowFilenames } from "./sync.js";
14
14
  import { CommitlintOptions, conventionalCommitsVscodeExtensions, conventionalCommitsVscodeSettings, renderCommitlintConfig } from "./templates.js";
15
+ import { PlanVersionsOptions, ResolvedVersioning, VersionPackages, VersionPlan, VersioningTarget, discoverVersionPackages, planVersions, readPackageVersion, resolveVersioning, writePackageVersion } from "./utils/versioning.js";
15
16
  declare namespace index_d_exports {
16
- export { AuthorInfo, BumpType, COMMITLINT_HEADER, COMMIT_MSG_HOOK, CliOptions, CommitRecord, CommitlintOptions, DEFAULT_WORKFLOW_TOKENS, ExistingEntry, GroupedItem, GroupedRule, HOOK_HEADER, IssueInfo, ParsedCommit, ProcessingMethod, RanWorkflow, RenderWorkflowOptions, RunWorkflowsOptions, RunWorkflowsResult, WORKFLOW_FILENAMES, WORKFLOW_HEADER, Workflow, WorkflowId, WorkflowJob, applyWorkflowConfig, buildSummary, changelogSyncTask, conventionalCommitsVscodeExtensions, conventionalCommitsVscodeSettings, defaultWorkflows, deriveBump, formatBody, groupItems, isEnabled, main, parseArgsCli, parseCcSubject, parseExistingChangelog, readCommits, reformatChangelogContent, renderChangelogEntry, renderCommitRef, renderCommitlintConfig, renderGroups, renderWorkflow, renderWorkflows, resolveWorkflowId, ruleTitle, runChangelog, runWorkflows, splitInlineDescription, workflowFilenames };
17
+ export { AuthorInfo, BumpType, COMMITLINT_HEADER, COMMIT_MSG_HOOK, CliOptions, CommitRecord, CommitlintOptions, DEFAULT_WORKFLOW_TOKENS, ExistingEntry, GroupedItem, GroupedRule, HOOK_HEADER, IssueInfo, ParsedCommit, PlanVersionsOptions, ProcessingMethod, RanWorkflow, RenderWorkflowOptions, ResolvedVersioning, RunWorkflowsOptions, RunWorkflowsResult, VersionPackages, VersionPlan, VersioningTarget, WORKFLOW_FILENAMES, WORKFLOW_HEADER, Workflow, WorkflowId, WorkflowJob, applyWorkflowConfig, buildSummary, changelogSyncTask, conventionalCommitsVscodeExtensions, conventionalCommitsVscodeSettings, defaultWorkflows, deriveBump, discoverVersionPackages, formatBody, groupItems, isEnabled, main, parseArgsCli, parseCcSubject, parseExistingChangelog, planVersions, readCommits, readPackageVersion, reformatChangelogContent, renderChangelogEntry, renderCommitRef, renderCommitlintConfig, renderGroups, renderWorkflow, renderWorkflows, resolveVersioning, resolveWorkflowId, ruleTitle, runChangelog, runWorkflows, splitInlineDescription, workflowFilenames, writePackageVersion };
17
18
  }
18
19
  //#endregion
19
- export { AuthorInfo, BumpType, COMMITLINT_HEADER, COMMIT_MSG_HOOK, CliOptions, CommitRecord, CommitlintOptions, DEFAULT_WORKFLOW_TOKENS, ExistingEntry, GroupedItem, GroupedRule, HOOK_HEADER, IssueInfo, ParsedCommit, ProcessingMethod, RanWorkflow, RenderWorkflowOptions, RunWorkflowsOptions, RunWorkflowsResult, WORKFLOW_FILENAMES, WORKFLOW_HEADER, Workflow, WorkflowId, WorkflowJob, applyWorkflowConfig, buildSummary, changelogSyncTask, conventionalCommitsVscodeExtensions, conventionalCommitsVscodeSettings, defaultWorkflows, deriveBump, formatBody, groupItems, index_d_exports, isEnabled, main, parseArgsCli, parseCcSubject, parseExistingChangelog, readCommits, reformatChangelogContent, renderChangelogEntry, renderCommitRef, renderCommitlintConfig, renderGroups, renderWorkflow, renderWorkflows, resolveWorkflowId, ruleTitle, runChangelog, runWorkflows, splitInlineDescription, workflowFilenames };
20
+ export { AuthorInfo, BumpType, COMMITLINT_HEADER, COMMIT_MSG_HOOK, CliOptions, CommitRecord, CommitlintOptions, DEFAULT_WORKFLOW_TOKENS, ExistingEntry, GroupedItem, GroupedRule, HOOK_HEADER, IssueInfo, ParsedCommit, PlanVersionsOptions, ProcessingMethod, RanWorkflow, RenderWorkflowOptions, ResolvedVersioning, RunWorkflowsOptions, RunWorkflowsResult, VersionPackages, VersionPlan, VersioningTarget, WORKFLOW_FILENAMES, WORKFLOW_HEADER, Workflow, WorkflowId, WorkflowJob, applyWorkflowConfig, buildSummary, changelogSyncTask, conventionalCommitsVscodeExtensions, conventionalCommitsVscodeSettings, defaultWorkflows, deriveBump, discoverVersionPackages, formatBody, groupItems, index_d_exports, isEnabled, main, parseArgsCli, parseCcSubject, parseExistingChangelog, planVersions, readCommits, readPackageVersion, reformatChangelogContent, renderChangelogEntry, renderCommitRef, renderCommitlintConfig, renderGroups, renderWorkflow, renderWorkflows, resolveVersioning, resolveWorkflowId, ruleTitle, runChangelog, runWorkflows, splitInlineDescription, workflowFilenames, writePackageVersion };
@@ -1 +1 @@
1
- import"node:path";import"node:url";import.meta.url;import{__exportAll as e}from"../../../_virtual/_rolldown/runtime.js";import{parseArgsCli as t}from"./utils/args.js";import{deriveBump as n,readCommits as r}from"./utils/git.js";import{formatBody as i,groupItems as a,parseCcSubject as o,renderGroups as s,ruleTitle as c,splitInlineDescription as l}from"./utils/format.js";import{renderChangelogEntry as u}from"./utils/version.js";import{parseExistingChangelog as d,reformatChangelogContent as f}from"./utils/reformat.js";import{buildSummary as p,renderCommitRef as m}from"./utils/summary.js";import{main as h,runChangelog as g}from"./run.js";import{DEFAULT_WORKFLOW_TOKENS as _,WORKFLOW_FILENAMES as v,applyWorkflowConfig as y,defaultWorkflows as b,isEnabled as x,renderWorkflow as S,renderWorkflows as C}from"./workflows.js";import{resolveWorkflowId as w,runWorkflows as T}from"./run-workflows.js";import{conventionalCommitsVscodeExtensions as E,conventionalCommitsVscodeSettings as D,renderCommitlintConfig as O}from"./templates.js";import{COMMITLINT_HEADER as k,COMMIT_MSG_HOOK as A,HOOK_HEADER as j,WORKFLOW_HEADER as M,changelogSyncTask as N,workflowFilenames as P}from"./sync.js";var F=/* @__PURE__ */ e({COMMITLINT_HEADER:()=>k,COMMIT_MSG_HOOK:()=>A,DEFAULT_WORKFLOW_TOKENS:()=>_,HOOK_HEADER:()=>j,WORKFLOW_FILENAMES:()=>v,WORKFLOW_HEADER:()=>M,applyWorkflowConfig:()=>y,buildSummary:()=>p,changelogSyncTask:()=>N,conventionalCommitsVscodeExtensions:()=>E,conventionalCommitsVscodeSettings:()=>D,defaultWorkflows:()=>b,deriveBump:()=>n,formatBody:()=>i,groupItems:()=>a,isEnabled:()=>x,main:()=>h,parseArgsCli:()=>t,parseCcSubject:()=>o,parseExistingChangelog:()=>d,readCommits:()=>r,reformatChangelogContent:()=>f,renderChangelogEntry:()=>u,renderCommitRef:()=>m,renderCommitlintConfig:()=>O,renderGroups:()=>s,renderWorkflow:()=>S,renderWorkflows:()=>C,resolveWorkflowId:()=>w,ruleTitle:()=>c,runChangelog:()=>g,runWorkflows:()=>T,splitInlineDescription:()=>l,workflowFilenames:()=>P});export{k as COMMITLINT_HEADER,A as COMMIT_MSG_HOOK,_ as DEFAULT_WORKFLOW_TOKENS,j as HOOK_HEADER,v as WORKFLOW_FILENAMES,M as WORKFLOW_HEADER,y as applyWorkflowConfig,p as buildSummary,N as changelogSyncTask,E as conventionalCommitsVscodeExtensions,D as conventionalCommitsVscodeSettings,b as defaultWorkflows,n as deriveBump,i as formatBody,a as groupItems,x as isEnabled,h as main,t as parseArgsCli,o as parseCcSubject,d as parseExistingChangelog,r as readCommits,f as reformatChangelogContent,u as renderChangelogEntry,m as renderCommitRef,O as renderCommitlintConfig,s as renderGroups,S as renderWorkflow,C as renderWorkflows,w as resolveWorkflowId,c as ruleTitle,g as runChangelog,T as runWorkflows,l as splitInlineDescription,F as src_exports,P as workflowFilenames};
1
+ import"node:path";import"node:url";import.meta.url;import{__exportAll as e}from"../../../_virtual/_rolldown/runtime.js";import{parseArgsCli as t}from"./utils/args.js";import{deriveBump as n,readCommits as r}from"./utils/git.js";import{formatBody as i,groupItems as a,parseCcSubject as o,renderGroups as s,ruleTitle as c,splitInlineDescription as l}from"./utils/format.js";import{renderChangelogEntry as u}from"./utils/version.js";import{parseExistingChangelog as d,reformatChangelogContent as f}from"./utils/reformat.js";import{buildSummary as p,renderCommitRef as m}from"./utils/summary.js";import{discoverVersionPackages as h,planVersions as g,readPackageVersion as _,resolveVersioning as v,writePackageVersion as y}from"./utils/versioning.js";import{main as b,runChangelog as x}from"./run.js";import{DEFAULT_WORKFLOW_TOKENS as S,WORKFLOW_FILENAMES as C,applyWorkflowConfig as w,defaultWorkflows as T,isEnabled as E,renderWorkflow as D,renderWorkflows as O}from"./workflows.js";import{resolveWorkflowId as k,runWorkflows as A}from"./run-workflows.js";import{conventionalCommitsVscodeExtensions as j,conventionalCommitsVscodeSettings as M,renderCommitlintConfig as N}from"./templates.js";import{COMMITLINT_HEADER as P,COMMIT_MSG_HOOK as F,HOOK_HEADER as I,WORKFLOW_HEADER as L,changelogSyncTask as R,workflowFilenames as z}from"./sync.js";var B=/* @__PURE__ */ e({COMMITLINT_HEADER:()=>P,COMMIT_MSG_HOOK:()=>F,DEFAULT_WORKFLOW_TOKENS:()=>S,HOOK_HEADER:()=>I,WORKFLOW_FILENAMES:()=>C,WORKFLOW_HEADER:()=>L,applyWorkflowConfig:()=>w,buildSummary:()=>p,changelogSyncTask:()=>R,conventionalCommitsVscodeExtensions:()=>j,conventionalCommitsVscodeSettings:()=>M,defaultWorkflows:()=>T,deriveBump:()=>n,discoverVersionPackages:()=>h,formatBody:()=>i,groupItems:()=>a,isEnabled:()=>E,main:()=>b,parseArgsCli:()=>t,parseCcSubject:()=>o,parseExistingChangelog:()=>d,planVersions:()=>g,readCommits:()=>r,readPackageVersion:()=>_,reformatChangelogContent:()=>f,renderChangelogEntry:()=>u,renderCommitRef:()=>m,renderCommitlintConfig:()=>N,renderGroups:()=>s,renderWorkflow:()=>D,renderWorkflows:()=>O,resolveVersioning:()=>v,resolveWorkflowId:()=>k,ruleTitle:()=>c,runChangelog:()=>x,runWorkflows:()=>A,splitInlineDescription:()=>l,workflowFilenames:()=>z,writePackageVersion:()=>y});export{P as COMMITLINT_HEADER,F as COMMIT_MSG_HOOK,S as DEFAULT_WORKFLOW_TOKENS,I as HOOK_HEADER,C as WORKFLOW_FILENAMES,L as WORKFLOW_HEADER,w as applyWorkflowConfig,p as buildSummary,R as changelogSyncTask,j as conventionalCommitsVscodeExtensions,M as conventionalCommitsVscodeSettings,T as defaultWorkflows,n as deriveBump,h as discoverVersionPackages,i as formatBody,a as groupItems,E as isEnabled,b as main,t as parseArgsCli,o as parseCcSubject,d as parseExistingChangelog,g as planVersions,r as readCommits,_ as readPackageVersion,f as reformatChangelogContent,u as renderChangelogEntry,m as renderCommitRef,N as renderCommitlintConfig,s as renderGroups,D as renderWorkflow,O as renderWorkflows,v as resolveVersioning,k as resolveWorkflowId,c as ruleTitle,x as runChangelog,A as runWorkflows,l as splitInlineDescription,B as src_exports,z as workflowFilenames,y as writePackageVersion};
@@ -1,5 +1,7 @@
1
1
  import __tsdown_shims_path from 'node:path';
2
2
  import __tsdown_shims_url from 'node:url';
3
+ import { ToolchainChangelogConfig } from "../../shared/src/config-types.js";
4
+ import "../../shared/src/index.js";
3
5
  import { parseArgsCli } from "./utils/args.js";
4
6
  import { formatBody, groupItems, parseCcSubject, renderGroups, ruleTitle, splitInlineDescription } from "./utils/format.js";
5
7
  import { deriveBump, readCommits } from "./utils/git.js";
@@ -7,8 +9,12 @@ import { parseExistingChangelog, reformatChangelogContent } from "./utils/reform
7
9
  import { buildSummary } from "./utils/summary.js";
8
10
  import { renderChangelogEntry } from "./utils/version.js";
9
11
  //#region packages/changelog/src/run.d.ts
10
- /** Run the changelog pipeline (bump versions + write changelogs). */
11
- export declare function runChangelog(argv?: string[]): void;
12
+ /**
13
+ * Run the changelog pipeline (bump versions + write changelogs). `changelog` is
14
+ * the consumer's `toolchain.changelog` section (threaded from `dbx changelog`);
15
+ * the standalone bin runs with the defaults (`versioning: true`, uniform).
16
+ */
17
+ export declare function runChangelog(argv?: string[], changelog?: ToolchainChangelogConfig): void;
12
18
  /** Alias kept for backwards compatibility. */
13
19
  export declare const main: typeof runChangelog;
14
20
  //#endregion
@@ -1 +1 @@
1
- import{resolve as e}from"node:path";import{fileURLToPath as t}from"node:url";import.meta.url;import{logger as n}from"../../shared/src/logger.js";import"../../shared/src/index.js";import{parseArgsCli as r}from"./utils/args.js";import{deriveBump as i,readCommits as a}from"./utils/git.js";import{changelogFiles as o,readRootVersion as s,repoRoot as c,writeVersion as l}from"./utils/repo.js";import{packageChangesForCurrent as u}from"./utils/packages.js";import"./utils/format.js";import{bumpVersion as d,insertNewEntry as f,renderChangelogEntry as p,retagChangelogs as m}from"./utils/version.js";import{formatExistingChangelogs as h,parseExistingChangelog as g,reformatRootChangelog as _}from"./utils/reformat.js";import{buildSummary as v}from"./utils/summary.js";import{writeChangelogs as y}from"./utils/write.js";import{existsSync as b,readFileSync as x,realpathSync as S,writeFileSync as C}from"node:fs";function w(t=process.argv.slice(2)){let S=r(t);if(S.formatOnly){n.info(`[format-only] Reformatting ${o().length} changelog file(s)${S.dryRun?` (dry run)`:``}.`),h(S.dryRun,S.packageChanges);return}let w=s();if(S.version){let e=S.version.trim();if(!/^\d+\.\d+\.\d+$/.test(e))throw Error(`Invalid version: ${e}`);if(e===w){n.info(`Version is already ${e}; nothing to do.`);return}l(e),m(w,e),n.info(`Retagged versions ${w} -> ${e}.`);return}let T=w;if(S.baseVersion){if(!/^\d+\.\d+\.\d+$/.test(S.baseVersion.trim()))throw Error(`Invalid base version: ${S.baseVersion}`);T=S.baseVersion.trim()}let E=S.processingMethod,D=E===`all`,O=E!==`latest`&&E!==`all`?E:S.range,k=a(O),A=i(k),j=v(k),M=d(T,A);if(S.dryRun){let t=c(),r=e(t,`CHANGELOG.md`),i=b(r)?x(r,`utf8`):``,a=g(i)[0]?.version,o=S.packageChanges&&a?u(a):``,s=p(M,j,/* @__PURE__ */ new Date,!0,o);n.info(`[DRY-RUN] Range: ${O}`),n.info(`[DRY-RUN] Processing method: ${E}${D?` (backward reformat)`:``}`),n.info(`[DRY-RUN] Bump: ${A} (\`${T}\` -> \`${M}\`)`),n.info(`[DRY-RUN] ${k.length} commit(s) scanned. Project files untouched.`),n.info(``),n.info(`Proposed new CHANGELOG.md entry (new version only):`),n.info(``),n.raw(s),n.info(`--- end of proposed entry ---`);let l=D?_(S.packageChanges):i,d=f(l,s),m=e(t,`CHANGELOG.proposed.md`);C(m,d,`utf8`),n.info(`Wrote ${m}`)}else l(M),y(M,O,k,j,D,S.packageChanges),n.info(`Bumped ${T} -> ${M} (${A}) from ${k.length} commit(s).`)}const T=w,E=t(import.meta.url);process.argv[1]&&/[\\/]run\.[cm]?[jt]s$/.test(E)&&D(process.argv[1])===E&&w();function D(e){try{return S(e)}catch{return e}}export{T as main,w as runChangelog};
1
+ import{resolve as e}from"node:path";import{fileURLToPath as t}from"node:url";import.meta.url;import{logger as n}from"../../shared/src/logger.js";import"../../shared/src/index.js";import{parseArgsCli as r}from"./utils/args.js";import{deriveBump as i,readCommits as a}from"./utils/git.js";import{changelogFiles as o,readRootVersion as s,repoRoot as c,writeVersion as l}from"./utils/repo.js";import{packageChangesForCurrent as u}from"./utils/packages.js";import"./utils/format.js";import{insertNewEntry as d,renderChangelogEntry as f,retagChangelogs as p}from"./utils/version.js";import{formatExistingChangelogs as m,parseExistingChangelog as h,reformatRootChangelog as g}from"./utils/reformat.js";import{buildSummary as _}from"./utils/summary.js";import{planVersions as v,resolveVersioning as y,writePackageVersion as b}from"./utils/versioning.js";import{writeChangelogs as x}from"./utils/write.js";import{existsSync as S,readFileSync as C,realpathSync as w,writeFileSync as T}from"node:fs";function E(t=process.argv.slice(2),w){let E=r(t);if(E.formatOnly){n.info(`[format-only] Reformatting ${o().length} changelog file(s)${E.dryRun?` (dry run)`:``}.`),m(E.dryRun,E.packageChanges);return}let D=s();if(E.version){let e=E.version.trim();if(!/^\d+\.\d+\.\d+$/.test(e))throw Error(`Invalid version: ${e}`);if(e===D){n.info(`Version is already ${e}; nothing to do.`);return}l(e),p(D,e),n.info(`Retagged versions ${D} -> ${e}.`);return}let O=D;if(E.baseVersion){if(!/^\d+\.\d+\.\d+$/.test(E.baseVersion.trim()))throw Error(`Invalid base version: ${E.baseVersion}`);O=E.baseVersion.trim()}let k=E.processingMethod,A=k===`all`,j=k!==`latest`&&k!==`all`?k:E.range,M=a(j),N=i(M),P=_(M),F=y(w),I=v({versioning:F,rootVersion:O,bump:N,range:j}),L=I.rootVersion;if(E.dryRun){let t=c(),r=e(t,`CHANGELOG.md`),i=S(r)?C(r,`utf8`):``,a=h(i)[0]?.version,o=E.packageChanges&&a?u(a):``,s=f(L,P,/* @__PURE__ */ new Date,!0,o);n.info(`[DRY-RUN] Range: ${j}`),n.info(`[DRY-RUN] Processing method: ${k}${A?` (backward reformat)`:``}`),n.info(`[DRY-RUN] Bump: ${N} (\`${O}\` -> \`${L}\`)`),n.info(`[DRY-RUN] Versioning: ${F.enabled?F.target:`disabled`}`),n.info(`[DRY-RUN] ${M.length} commit(s) scanned. Project files untouched.`),n.info(``),n.info(`Proposed new CHANGELOG.md entry (new version only):`),n.info(``),n.raw(s),n.info(`--- end of proposed entry ---`);let l=A?g(E.packageChanges):i,p=d(l,s),m=e(t,`CHANGELOG.proposed.md`);T(m,p,`utf8`),n.info(`Wrote ${m}`)}else{for(let[e,t]of I.writes)b(e,t);x(L,j,M,P,A,E.packageChanges,I.entries),F.enabled?n.info(`Bumped ${O} -> ${L} (${N}) from ${M.length} commit(s).`):n.info(`Wrote changelogs for ${L} (${N}) from ${M.length} commit(s); versioning disabled.`)}}const D=E,O=t(import.meta.url);process.argv[1]&&/[\\/]run\.[cm]?[jt]s$/.test(O)&&k(process.argv[1])===O&&E();function k(e){try{return w(e)}catch{return e}}export{D as main,E as runChangelog};
@@ -0,0 +1,78 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { ToolchainChangelogConfig } from "../../../shared/src/config-types.js";
4
+ import "../../../shared/src/index.js";
5
+ import { BumpType, CommitRecord } from "./types.js";
6
+ //#region packages/changelog/src/utils/versioning.d.ts
7
+ /** How/where a changelog run applies its version bump. */
8
+ export type VersioningTarget = 'uniform' | 'root-only' | 'individual';
9
+ /** The normalized `changelog.versioning` config. */
10
+ export interface ResolvedVersioning {
11
+ /** Whether versions are written to `package.json` at all. */
12
+ enabled: boolean;
13
+ /** Where the bump is applied. */
14
+ target: VersioningTarget;
15
+ /** Explicit workspace globs (when configured). */
16
+ workspaces?: string[];
17
+ }
18
+ /**
19
+ * Normalize the `changelog.versioning` union (`boolean | { target, workspaces }`)
20
+ * into a concrete plan input. `true`/absent means uniform with defaults; `false`
21
+ * disables writing versions while still generating changelog entries.
22
+ */
23
+ export declare function resolveVersioning(changelog?: ToolchainChangelogConfig): ResolvedVersioning;
24
+ /** The packages a changelog run versions. */
25
+ export interface VersionPackages {
26
+ /** The repository root. */
27
+ root: string;
28
+ /** Whether the root has a `package.json`. */
29
+ rootHasPackage: boolean;
30
+ /** Workspace directories (root excluded) that have a `package.json`. */
31
+ workspaces: string[];
32
+ }
33
+ /** Read the `version` field of a directory's `package.json` (if any). */
34
+ export declare function readPackageVersion(dir: string): string | undefined;
35
+ /** Write `version` into a directory's `package.json` in place (minimal diff). */
36
+ export declare function writePackageVersion(dir: string, version: string): void;
37
+ /**
38
+ * Resolve the packages to version: the explicit `workspaces` globs, else the
39
+ * root `package.json` `workspaces` field, else the root `package.json` alone.
40
+ * Warns (never throws) when neither a root `package.json` nor a matching
41
+ * workspace is found, so a broken checkout can't wedge a release.
42
+ */
43
+ export declare function discoverVersionPackages(workspaces?: string[], root?: string): VersionPackages;
44
+ /** The version bump plan for a changelog run. */
45
+ export interface VersionPlan {
46
+ /** The version heading for the root changelog. */
47
+ rootVersion: string;
48
+ /** `package.json` writes to apply (empty when versioning is disabled). */
49
+ writes: Map<string, string>;
50
+ /** Workspace dirs to give a changelog entry, and the version to head it with. */
51
+ entries: Map<string, string>;
52
+ }
53
+ export interface PlanVersionsOptions {
54
+ versioning: ResolvedVersioning;
55
+ /** The starting root version (`--base-version` when provided). */
56
+ rootVersion: string;
57
+ /** The bump derived from all scanned commits. */
58
+ bump: BumpType;
59
+ /** The git revision range the commits were read from. */
60
+ range: string;
61
+ /** The repository root (default: resolved from cwd). */
62
+ root?: string;
63
+ /** Read the commits touching a workspace dir (injected for tests). */
64
+ commitsFor?: (dir: string) => CommitRecord[];
65
+ }
66
+ /**
67
+ * Compute which packages get which version, and which changelogs get an entry.
68
+ *
69
+ * - `uniform`: the root (when present) and every workspace share one version.
70
+ * - `root-only`: only the root is versioned; workspaces get no entry.
71
+ * - `individual`: the root tracks the overall bump; each workspace that has
72
+ * commits in the range is bumped on its own.
73
+ *
74
+ * A disabled `versioning` writes no `package.json` but still heads the
75
+ * changelogs as `uniform` would, so the entries stay complete.
76
+ */
77
+ export declare function planVersions(options: PlanVersionsOptions): VersionPlan;
78
+ //#endregion
@@ -0,0 +1 @@
1
+ import{relative as e,resolve as t}from"node:path";import"node:url";import.meta.url;import{logger as n}from"../../../shared/src/logger.js";import"../../../shared/src/index.js";import{deriveBump as r,readCommits as i}from"./git.js";import{repoRoot as a}from"./repo.js";import{bumpVersion as o}from"./version.js";import{existsSync as s,globSync as c,readFileSync as l,writeFileSync as u}from"node:fs";function d(e){let t=e?.versioning;return t===!1?{enabled:!1,target:`uniform`}:t===void 0||t===!0?{enabled:!0,target:`uniform`}:{enabled:!0,target:t.target??`uniform`,...t.workspaces?{workspaces:t.workspaces}:{}}}function f(e){try{let n=JSON.parse(l(t(e,`package.json`),`utf8`));return typeof n.version==`string`?n.version:void 0}catch{return}}function p(e,r){let i=t(e,`package.json`),a=l(i,`utf8`),o=a.replace(/("version"\s*:\s*)"[^"]*"/,`$1"${r}"`);o!==a&&(u(i,o,`utf8`),n.info(` bumped ${i}`))}function m(e,r=a()){let i=s(t(r,`package.json`)),o=e;if(o===void 0&&i)try{o=JSON.parse(l(t(r,`package.json`),`utf8`)).workspaces}catch{o=void 0}let u=/* @__PURE__ */ new Set;for(let e of o??[])if(e===`.`)u.add(r);else for(let n of c(e,{cwd:r})){let e=t(r,n);s(t(e,`package.json`))&&u.add(e)}return u.delete(r),!i&&u.size===0&&n.warn(`[changelog] versioning: no root package.json and no matching workspaces — nothing to version.`),{root:r,rootHasPackage:i,workspaces:[...u]}}function h(t){let{versioning:n,bump:s,range:c}=t,l=t.root??a(),{rootHasPackage:u,workspaces:d}=m(n.workspaces,l),p=t.commitsFor??(t=>i(c,e(l,t).replace(/\\/g,`/`))),h=o(t.rootVersion,s),g=/* @__PURE__ */ new Map,_=/* @__PURE__ */ new Map,v=n.enabled?n.target:`uniform`;if(u&&n.enabled&&g.set(l,h),v===`individual`)for(let e of d){let t=p(e);if(t.length===0)continue;let i=o(f(e)??`0.0.0`,r(t));_.set(e,i),n.enabled&&g.set(e,i)}else if(v===`uniform`)for(let e of d)_.set(e,h),n.enabled&&g.set(e,h);return{rootVersion:h,writes:g,entries:_}}export{m as discoverVersionPackages,h as planVersions,f as readPackageVersion,d as resolveVersioning,p as writePackageVersion};
@@ -1 +1 @@
1
- import{relative as e,resolve as t}from"node:path";import"node:url";import.meta.url;import{logger as n}from"../../../shared/src/logger.js";import"../../../shared/src/index.js";import{readCommits as r,repoSlug as i}from"./git.js";import{discoverWorkspaceDirs as a,repoRoot as o}from"./repo.js";import{packageChangesForCurrent as s}from"./packages.js";import{formatChangelogFile as c}from"./format.js";import{prependChangelogEntry as l,renderChangelogEntry as u}from"./version.js";import{parseExistingChangelog as d,reformatRootChangelog as f}from"./reformat.js";import{buildSummary as p}from"./summary.js";import{existsSync as m,readFileSync as h,writeFileSync as g}from"node:fs";function _(_,v,y,b,x,S=!1){let C=o(),w=i(),T=t(C,`CHANGELOG.md`),E=``;if(S&&m(T)){let e=d(h(T,`utf8`))[0];e&&(E=s(e.version))}if(x){let e=f(S);e&&(g(T,e,`utf8`),n.info(` reformatted ${T}`))}let D=u(_,b,/* @__PURE__ */ new Date,!0,E);l(T,D),n.info(` updated ${T}`);for(let i of a()){if(t(i)===t(C))continue;let a=t(i,`CHANGELOG.md`);if(!m(a))continue;let o=e(C,i).replace(/\\/g,`/`),s=r(v,o);if(s.length===0){n.info(` skipped ${a} (no commits in ${o})`);continue}let c=p(s);l(a,u(_,c,/* @__PURE__ */ new Date)),n.info(` updated ${a}`)}for(let e of[t(C,`CHANGELOG.md`),...a().filter(e=>t(e)!==t(C)).map(e=>t(e,`CHANGELOG.md`)).filter(e=>m(e))])c(e,w)}export{_ as writeChangelogs};
1
+ import{relative as e,resolve as t}from"node:path";import"node:url";import.meta.url;import{logger as n}from"../../../shared/src/logger.js";import"../../../shared/src/index.js";import{readCommits as r,repoSlug as i}from"./git.js";import{discoverWorkspaceDirs as a,repoRoot as o}from"./repo.js";import{packageChangesForCurrent as s}from"./packages.js";import{formatChangelogFile as c}from"./format.js";import{prependChangelogEntry as l,renderChangelogEntry as u}from"./version.js";import{parseExistingChangelog as d,reformatRootChangelog as f}from"./reformat.js";import{buildSummary as p}from"./summary.js";import{existsSync as m,readFileSync as h,writeFileSync as g}from"node:fs";function _(_,v,y,b,x,S=!1,C){let w=o(),T=i(),E=t(w,`CHANGELOG.md`),D=``;if(S&&m(E)){let e=d(h(E,`utf8`))[0];e&&(D=s(e.version))}if(x){let e=f(S);e&&(g(E,e,`utf8`),n.info(` reformatted ${E}`))}let O=u(_,b,/* @__PURE__ */ new Date,!0,D);l(E,O),n.info(` updated ${E}`);let k=C??new Map(a().filter(e=>t(e)!==t(w)).map(e=>[e,_]));for(let[i,a]of k){let o=t(i,`CHANGELOG.md`);if(!m(o))continue;let s=e(w,i).replace(/\\/g,`/`),c=r(v,s);if(c.length===0){n.info(` skipped ${o} (no commits in ${s})`);continue}let d=p(c);l(o,u(a,d,/* @__PURE__ */ new Date)),n.info(` updated ${o}`)}let A=/* @__PURE__ */ new Set([...a(),...k.keys()]);for(let e of A){let n=t(e,`CHANGELOG.md`);m(n)&&c(n,T)}}export{_ as writeChangelogs};
@@ -18,4 +18,15 @@ export declare const TOOLCHAIN_PACKAGE = "@deltabox/toolchain";
18
18
  * toolchain repo's own CLI instead of a global `dbx`.
19
19
  */
20
20
  export declare function findOwnCliEntry(cwd?: string): string | undefined;
21
+ /**
22
+ * The version of the `@deltabox/toolchain` this project pins — from the nearest
23
+ * `node_modules/@deltabox/toolchain/package.json`, else the nearest enclosing
24
+ * `@deltabox/toolchain` package (so the toolchain repo resolves its own version
25
+ * even before `dist` is built). `undefined` when the project doesn't pin the
26
+ * toolchain at all, in which case only a global install / `npx` is available.
27
+ *
28
+ * A pinned project must never run a global `dbx`: a stale global install would
29
+ * write older-format generated files, silently reverting the project's own.
30
+ */
31
+ export declare function localToolchainVersion(cwd?: string): string | undefined;
21
32
  //#endregion
@@ -1 +1 @@
1
- import{default as e}from"node:path";import"node:url";import.meta.url;import t from"node:fs";const n=`@deltabox/toolchain`;function r(n=process.cwd()){let r=e.resolve(n);for(;;){let n=e.join(r,`package.json`);if(t.existsSync(n))try{let i=JSON.parse(t.readFileSync(n,`utf-8`));if(i.name===`@deltabox/toolchain`){let n=typeof i.bin==`string`?i.bin:i.bin?.dbx;if(n){let i=e.resolve(r,n);if(t.existsSync(i))return i}}}catch{}let i=e.dirname(r);if(i===r)return;r=i}}export{n as TOOLCHAIN_PACKAGE,r as findOwnCliEntry};
1
+ import{default as e}from"node:path";import"node:url";import.meta.url;import t from"node:fs";const n=`@deltabox/toolchain`;function r(n=process.cwd()){let r=e.resolve(n);for(;;){let n=e.join(r,`package.json`);if(t.existsSync(n))try{let i=JSON.parse(t.readFileSync(n,`utf-8`));if(i.name===`@deltabox/toolchain`){let n=typeof i.bin==`string`?i.bin:i.bin?.dbx;if(n){let i=e.resolve(r,n);if(t.existsSync(i))return i}}}catch{}let i=e.dirname(r);if(i===r)return;r=i}}function i(e){try{let n=JSON.parse(t.readFileSync(e,`utf-8`));return typeof n.version==`string`?n.version:void 0}catch{return}}function a(r=process.cwd()){let a=e.resolve(r),o;for(;;){let r=i(e.join(a,`node_modules`,n,`package.json`));if(r)return r;let s=e.join(a,`package.json`);if(o===void 0&&t.existsSync(s))try{let e=JSON.parse(t.readFileSync(s,`utf-8`));e.name===`@deltabox/toolchain`&&typeof e.version==`string`&&(o=e.version)}catch{}let c=e.dirname(a);if(c===a)return o;a=c}}export{n as TOOLCHAIN_PACKAGE,r as findOwnCliEntry,a as localToolchainVersion};
@@ -475,6 +475,30 @@ export declare const changelogWorkflowsConfigSchema: z.ZodObject<{
475
475
  tokens: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
476
476
  }, z.core.$strip>]>>;
477
477
  }, z.core.$strip>;
478
+ /** Which `package.json` versions a changelog run bumps. */
479
+ export declare const changelogVersioningTargetSchema: z.ZodEnum<{
480
+ individual: "individual";
481
+ "root-only": "root-only";
482
+ uniform: "uniform";
483
+ }>;
484
+ /** Options for `changelog.versioning` when configured as an object. */
485
+ export declare const changelogVersioningConfigSchema: z.ZodObject<{
486
+ target: z.ZodOptional<z.ZodEnum<{
487
+ individual: "individual";
488
+ "root-only": "root-only";
489
+ uniform: "uniform";
490
+ }>>;
491
+ workspaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
492
+ }, z.core.$strip>;
493
+ /** Automatic version bumping: `true` (default), `false`, or a set of options. */
494
+ export declare const changelogVersioningSchema: z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
495
+ target: z.ZodOptional<z.ZodEnum<{
496
+ individual: "individual";
497
+ "root-only": "root-only";
498
+ uniform: "uniform";
499
+ }>>;
500
+ workspaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
501
+ }, z.core.$strip>]>;
478
502
  /** Conventional-Commits CI, commitlint and the changelog pipeline. */
479
503
  export declare const changelogConfigSchema: z.ZodObject<{
480
504
  enabled: z.ZodOptional<z.ZodBoolean>;
@@ -776,6 +800,14 @@ export declare const changelogConfigSchema: z.ZodObject<{
776
800
  }, z.core.$strip>>;
777
801
  types: z.ZodOptional<z.ZodArray<z.ZodString>>;
778
802
  scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
803
+ versioning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
804
+ target: z.ZodOptional<z.ZodEnum<{
805
+ individual: "individual";
806
+ "root-only": "root-only";
807
+ uniform: "uniform";
808
+ }>>;
809
+ workspaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
810
+ }, z.core.$strip>]>>;
779
811
  vscode: z.ZodOptional<z.ZodBoolean>;
780
812
  }, z.core.$strip>;
781
813
  /** Biome config generation (for consumers that still want a `biome.json`). */
@@ -1219,6 +1251,14 @@ export declare const toolchainConfigSchema: z.ZodObject<{
1219
1251
  }, z.core.$strip>>;
1220
1252
  types: z.ZodOptional<z.ZodArray<z.ZodString>>;
1221
1253
  scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
1254
+ versioning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
1255
+ target: z.ZodOptional<z.ZodEnum<{
1256
+ individual: "individual";
1257
+ "root-only": "root-only";
1258
+ uniform: "uniform";
1259
+ }>>;
1260
+ workspaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
1261
+ }, z.core.$strip>]>>;
1222
1262
  vscode: z.ZodOptional<z.ZodBoolean>;
1223
1263
  }, z.core.$strip>]>>;
1224
1264
  biome: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
@@ -1606,6 +1646,14 @@ export declare const dbxConfigSchema: z.ZodObject<{
1606
1646
  }, z.core.$strip>>;
1607
1647
  types: z.ZodOptional<z.ZodArray<z.ZodString>>;
1608
1648
  scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
1649
+ versioning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
1650
+ target: z.ZodOptional<z.ZodEnum<{
1651
+ individual: "individual";
1652
+ "root-only": "root-only";
1653
+ uniform: "uniform";
1654
+ }>>;
1655
+ workspaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
1656
+ }, z.core.$strip>]>>;
1609
1657
  vscode: z.ZodOptional<z.ZodBoolean>;
1610
1658
  }, z.core.$strip>]>>;
1611
1659
  biome: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
@@ -2146,6 +2194,27 @@ export declare const CONFIG_TYPE_SCHEMAS: {
2146
2194
  tokens: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
2147
2195
  }, z.core.$strip>]>>;
2148
2196
  }, z.core.$strip>;
2197
+ readonly ChangelogVersioningTarget: z.ZodEnum<{
2198
+ individual: "individual";
2199
+ "root-only": "root-only";
2200
+ uniform: "uniform";
2201
+ }>;
2202
+ readonly ChangelogVersioningConfig: z.ZodObject<{
2203
+ target: z.ZodOptional<z.ZodEnum<{
2204
+ individual: "individual";
2205
+ "root-only": "root-only";
2206
+ uniform: "uniform";
2207
+ }>>;
2208
+ workspaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
2209
+ }, z.core.$strip>;
2210
+ readonly ChangelogVersioning: z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
2211
+ target: z.ZodOptional<z.ZodEnum<{
2212
+ individual: "individual";
2213
+ "root-only": "root-only";
2214
+ uniform: "uniform";
2215
+ }>>;
2216
+ workspaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
2217
+ }, z.core.$strip>]>;
2149
2218
  readonly ToolchainChangelogConfig: z.ZodObject<{
2150
2219
  enabled: z.ZodOptional<z.ZodBoolean>;
2151
2220
  workflows: z.ZodOptional<z.ZodObject<{
@@ -2446,6 +2515,14 @@ export declare const CONFIG_TYPE_SCHEMAS: {
2446
2515
  }, z.core.$strip>>;
2447
2516
  types: z.ZodOptional<z.ZodArray<z.ZodString>>;
2448
2517
  scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
2518
+ versioning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
2519
+ target: z.ZodOptional<z.ZodEnum<{
2520
+ individual: "individual";
2521
+ "root-only": "root-only";
2522
+ uniform: "uniform";
2523
+ }>>;
2524
+ workspaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
2525
+ }, z.core.$strip>]>>;
2449
2526
  vscode: z.ZodOptional<z.ZodBoolean>;
2450
2527
  }, z.core.$strip>;
2451
2528
  readonly ToolchainBiomeConfig: z.ZodObject<{
@@ -2870,6 +2947,14 @@ export declare const CONFIG_TYPE_SCHEMAS: {
2870
2947
  }, z.core.$strip>>;
2871
2948
  types: z.ZodOptional<z.ZodArray<z.ZodString>>;
2872
2949
  scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
2950
+ versioning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
2951
+ target: z.ZodOptional<z.ZodEnum<{
2952
+ individual: "individual";
2953
+ "root-only": "root-only";
2954
+ uniform: "uniform";
2955
+ }>>;
2956
+ workspaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
2957
+ }, z.core.$strip>]>>;
2873
2958
  vscode: z.ZodOptional<z.ZodBoolean>;
2874
2959
  }, z.core.$strip>]>>;
2875
2960
  biome: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
@@ -3256,6 +3341,14 @@ export declare const CONFIG_TYPE_SCHEMAS: {
3256
3341
  }, z.core.$strip>>;
3257
3342
  types: z.ZodOptional<z.ZodArray<z.ZodString>>;
3258
3343
  scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
3344
+ versioning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
3345
+ target: z.ZodOptional<z.ZodEnum<{
3346
+ individual: "individual";
3347
+ "root-only": "root-only";
3348
+ uniform: "uniform";
3349
+ }>>;
3350
+ workspaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
3351
+ }, z.core.$strip>]>>;
3259
3352
  vscode: z.ZodOptional<z.ZodBoolean>;
3260
3353
  }, z.core.$strip>]>>;
3261
3354
  biome: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
@@ -3644,6 +3737,14 @@ export declare const CONFIG_SECTION_SCHEMAS: {
3644
3737
  }, z.core.$strip>>;
3645
3738
  types: z.ZodOptional<z.ZodArray<z.ZodString>>;
3646
3739
  scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
3740
+ versioning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
3741
+ target: z.ZodOptional<z.ZodEnum<{
3742
+ individual: "individual";
3743
+ "root-only": "root-only";
3744
+ uniform: "uniform";
3745
+ }>>;
3746
+ workspaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
3747
+ }, z.core.$strip>]>>;
3647
3748
  vscode: z.ZodOptional<z.ZodBoolean>;
3648
3749
  }, z.core.$strip>;
3649
3750
  readonly biome: z.ZodObject<{
@@ -1 +1 @@
1
- import"node:path";import"node:url";import.meta.url;import{z as e}from"zod";const t=e.enum([`monorepo-root`,`monorepo-workspace`,`project`]).describe(`The project kind (detected when omitted).`).meta({id:`ProjectType`}),n=e.object({type:t.optional(),name:e.string().describe(`The unscoped project name.`).optional(),scope:e.string().describe("The npm scope, eg. `@acme`.").optional(),author:e.string().describe(`Package author.`).optional(),license:e.string().describe(`SPDX license id.`).optional(),homepage:e.string().describe(`Project homepage.`).optional(),repo:e.string().describe("Repository URL, eg. `https://github.com/acme/app`.").optional(),nodeVersion:e.string().describe("Node engine range, eg. `>=22`.").optional(),packageManager:e.string().describe("Package manager name (default `yarn`).").optional(),packageManagerVersion:e.string().describe("Package manager version, eg. `4.17.1`.").optional(),description:e.string().describe(`One-line description.`).optional()}).meta({id:`ToolchainProjectConfig`}),r=e.object({name:e.string().optional(),id:e.string().optional(),if:e.string().optional(),uses:e.string().optional(),run:e.string().optional(),shell:e.string().optional(),"working-directory":e.string().optional(),with:e.record(e.string(),e.union([e.string(),e.number(),e.boolean()])).optional(),env:e.record(e.string(),e.string()).optional()}).meta({id:`WorkflowStep`}),i=e.object({job:e.string().describe(`Target job id (defaults to the primary/first job).`).optional(),before:e.array(r).describe(`Steps inserted at the start.`).optional(),after:e.array(r).describe(`Steps appended at the end.`).optional()}).meta({id:`WorkflowStepsConfig`}),a=e.object({enabled:e.boolean().describe(`Enable/disable this workflow (default true).`).optional(),pushBranches:e.array(e.string()).describe("Replace `on.push.branches`.").optional(),pullRequestBranches:e.array(e.string()).describe("Replace `on.pull_request.branches`.").optional(),triggers:e.record(e.string(),e.unknown()).describe("Extra `on.*` triggers.").optional(),extra:e.record(e.string(),e.unknown()).describe("Extra top-level keys (`permissions`, `concurrency`, `env`, ...).").optional(),steps:e.union([i,e.array(i)]).describe(`Extra steps for a job (one group, or per-job groups).`).optional(),jobs:e.record(e.string(),e.unknown()).describe(`Extra complete jobs merged in.`).optional(),tokens:e.record(e.string(),e.union([e.string(),e.number(),e.boolean()])).describe("Per-workflow token overrides (`nodeVersion`, `packageManager`, ...).").optional()}).meta({id:`WorkflowConfig`}),o=e.union([e.boolean(),a]).meta({id:`WorkflowSetting`}),s=e.object({ci:o.optional(),changelog:o.optional(),release:o.optional(),issues:o.optional(),sync:o.optional()}).meta({id:`ChangelogWorkflowsConfig`}),c=e.object({enabled:e.boolean().describe(`Master switch (enabled when the section is defined).`).optional(),workflows:s.describe("Which workflows to write into `.github/workflows`.").optional(),branches:e.object({main:e.string().optional(),dev:e.string().optional()}).describe(`Branch names the workflows target.`).optional(),types:e.array(e.string()).describe(`Allowed commit types (commitlint).`).optional(),scopes:e.array(e.string()).describe(`Allowed commit scopes (commitlint).`).optional(),vscode:e.boolean().describe(`Write the Conventional-Commits VS Code settings.`).optional()}).meta({id:`ToolchainChangelogConfig`}),l=e.object({enabled:e.boolean().describe(`Master switch (enabled when the section is defined).`).optional(),vscode:e.boolean().describe(`Write the Biome VS Code settings (default true).`).optional(),overrides:e.record(e.string(),e.unknown()).describe("Deep-merged over the generated `biome.json` (arrays union).").optional()}).meta({id:`ToolchainBiomeConfig`}),u=e.object({enabled:e.boolean().describe(`Master switch (enabled when the section is defined).`).optional(),glob:e.string().describe("Glob for workspace `tsconfig.default.json` files.").optional(),appGlob:e.string().describe(`Glob for "override" (app) workspaces.`).optional(),refs:e.boolean().describe(`Wire project references (default false).`).optional(),composite:e.boolean().describe("Emit `composite: true` (default false).").optional(),aliases:e.boolean().describe(`Inject path aliases (default true).`).optional(),indent:e.number().describe(`JSON indentation (default 4).`).optional(),rootFile:e.string().describe("The monorepo tsconfig file name (default `tsconfig.monorepo.json`).").optional()}).meta({id:`ToolchainTsconfigConfig`}),d=e.object({enabled:e.boolean().describe(`Watch by default (enabled when the section is defined).`).optional(),debounce:e.number().describe(`Debounce window in ms (default 150).`).optional()}).meta({id:`ToolchainWatchConfig`}),f=e.object({level:e.enum([`debug`,`info`,`warn`,`error`,`silent`]).describe("Minimum level to print (default `info`).").optional(),color:e.boolean().describe("Force colours on/off (default: on; `--no-color` disables).").optional(),name:e.string().describe("Prefix non-indented lines with `<name>:` (default `dbx`).").optional()}).meta({id:`ToolchainLoggerConfig`}),p=e.object({color:e.boolean().describe(`Force provider command colours on/off (default: inherit the logger).`).optional()}).meta({id:`ToolchainProvidersConfig`}),m=e.enum([`builtin`,`local`,`npm`,`git`,`vite-plus`]).describe(`How to load the source.`).meta({id:`ToolchainTemplateSourceType`}),h=e.enum([`project`,`workspace`,`application`,`folder`,`tooling`,`pipeline`]).describe(`What the template produces.`).meta({id:`ToolchainTemplateKind`}),g=e.object({type:m,locate:e.string().describe(`A builtin id, local dir, npm scope, git URL or Vite+ id.`),id:e.string().describe(`Stable id (defaults to the basename/scope).`).optional(),name:e.string().describe(`Display name override.`).optional(),description:e.string().describe(`Description override.`).optional(),kind:h.optional(),ref:e.string().describe(`Git branch/tag/commit.`).optional(),subdir:e.string().describe(`Subdirectory within the source that holds the template.`).optional(),tags:e.array(e.string()).describe(`Free-form tags.`).optional(),online:e.boolean().describe(`Whether the source needs network access.`).optional()}).meta({id:`ToolchainTemplateSource`}),_=e.object({enabled:e.boolean().describe(`Master switch (enabled when the section is defined).`).optional(),sources:e.array(g).describe(`Extra sources on top of the builtin + registry sources.`).optional()}).meta({id:`ToolchainTemplatesConfig`}),v=e.object({config:e.boolean().describe("Write the managed `vite.config.ts` (default true).").optional()}).catchall(e.unknown()).meta({id:`ToolchainViteConfig`});function y(t){return e.union([e.boolean(),t])}const b=e.object({project:n.optional(),changelog:y(c).optional(),biome:y(l).optional(),tsconfig:y(u).optional(),templates:y(_).optional(),vite:y(v).optional(),watch:y(d).optional(),logger:y(f).optional(),providers:y(p).optional()}).meta({id:`ToolchainConfigSections`}),x=e.object({toolchain:b.optional()}).meta({id:`DbxConfigSections`}),S={ProjectType:t,ToolchainProjectConfig:n,WorkflowStep:r,WorkflowStepsConfig:i,WorkflowConfig:a,WorkflowSetting:o,ChangelogWorkflowsConfig:s,ToolchainChangelogConfig:c,ToolchainBiomeConfig:l,ToolchainTsconfigConfig:u,ToolchainWatchConfig:d,ToolchainTemplateSourceType:m,ToolchainTemplateKind:h,ToolchainTemplateSource:g,ToolchainTemplatesConfig:_,ToolchainViteConfig:v,ToolchainLoggerConfig:f,ToolchainProvidersConfig:p,ToolchainConfigSections:b,DbxConfigSections:x},C={project:n,changelog:c,biome:l,tsconfig:u,templates:_,vite:v,watch:d,logger:f,providers:p},w={project:`Project metadata used as replacement tokens across every template.`,changelog:`Conventional-Commits CI, commitlint and the changelog pipeline.`,biome:"Biome config generation (for consumers that still want a `biome.json`).",tsconfig:`Workspace tsconfig generation (path aliases + project references).`,templates:`Template sources / scaffolding.`,vite:"The full Vite+ config; `dbx sync` writes the root `vite.config.ts` from it.",watch:"Watch behaviour for `dbx watch`.",logger:`Logging level, colours and prefix for toolchain output.`,providers:`Provider command behaviour (eg. colour for the provider passthrough commands).`};export{w as CONFIG_SECTION_DESCRIPTIONS,C as CONFIG_SECTION_SCHEMAS,S as CONFIG_TYPE_SCHEMAS,l as biomeConfigSchema,c as changelogConfigSchema,s as changelogWorkflowsConfigSchema,x as dbxConfigSchema,f as loggerConfigSchema,n as projectConfigSchema,t as projectTypeSchema,p as providersConfigSchema,h as templateKindSchema,g as templateSourceSchema,m as templateSourceTypeSchema,_ as templatesConfigSchema,b as toolchainConfigSchema,u as tsconfigConfigSchema,v as viteConfigSchema,d as watchConfigSchema,a as workflowConfigSchema,o as workflowSettingSchema,r as workflowStepSchema,i as workflowStepsConfigSchema};
1
+ import"node:path";import"node:url";import.meta.url;import{z as e}from"zod";const t=e.enum([`monorepo-root`,`monorepo-workspace`,`project`]).describe(`The project kind (detected when omitted).`).meta({id:`ProjectType`}),n=e.object({type:t.optional(),name:e.string().describe(`The unscoped project name.`).optional(),scope:e.string().describe("The npm scope, eg. `@acme`.").optional(),author:e.string().describe(`Package author.`).optional(),license:e.string().describe(`SPDX license id.`).optional(),homepage:e.string().describe(`Project homepage.`).optional(),repo:e.string().describe("Repository URL, eg. `https://github.com/acme/app`.").optional(),nodeVersion:e.string().describe("Node engine range, eg. `>=22`.").optional(),packageManager:e.string().describe("Package manager name (default `yarn`).").optional(),packageManagerVersion:e.string().describe("Package manager version, eg. `4.17.1`.").optional(),description:e.string().describe(`One-line description.`).optional()}).meta({id:`ToolchainProjectConfig`}),r=e.object({name:e.string().optional(),id:e.string().optional(),if:e.string().optional(),uses:e.string().optional(),run:e.string().optional(),shell:e.string().optional(),"working-directory":e.string().optional(),with:e.record(e.string(),e.union([e.string(),e.number(),e.boolean()])).optional(),env:e.record(e.string(),e.string()).optional()}).meta({id:`WorkflowStep`}),i=e.object({job:e.string().describe(`Target job id (defaults to the primary/first job).`).optional(),before:e.array(r).describe(`Steps inserted at the start.`).optional(),after:e.array(r).describe(`Steps appended at the end.`).optional()}).meta({id:`WorkflowStepsConfig`}),a=e.object({enabled:e.boolean().describe(`Enable/disable this workflow (default true).`).optional(),pushBranches:e.array(e.string()).describe("Replace `on.push.branches`.").optional(),pullRequestBranches:e.array(e.string()).describe("Replace `on.pull_request.branches`.").optional(),triggers:e.record(e.string(),e.unknown()).describe("Extra `on.*` triggers.").optional(),extra:e.record(e.string(),e.unknown()).describe("Extra top-level keys (`permissions`, `concurrency`, `env`, ...).").optional(),steps:e.union([i,e.array(i)]).describe(`Extra steps for a job (one group, or per-job groups).`).optional(),jobs:e.record(e.string(),e.unknown()).describe(`Extra complete jobs merged in.`).optional(),tokens:e.record(e.string(),e.union([e.string(),e.number(),e.boolean()])).describe("Per-workflow token overrides (`nodeVersion`, `packageManager`, ...).").optional()}).meta({id:`WorkflowConfig`}),o=e.union([e.boolean(),a]).meta({id:`WorkflowSetting`}),s=e.object({ci:o.optional(),changelog:o.optional(),release:o.optional(),issues:o.optional(),sync:o.optional()}).meta({id:`ChangelogWorkflowsConfig`}),c=e.enum([`uniform`,`root-only`,`individual`]).describe(`Where the changelog version bump is applied.`).meta({id:`ChangelogVersioningTarget`}),l=e.object({target:c.describe("`uniform` bumps the root and every workspace to one shared version; `root-only` bumps the root only; `individual` bumps each changed workspace independently (default `uniform`).").optional(),workspaces:e.array(e.string()).describe("Glob patterns selecting the workspaces to version (relative to the root). Defaults to the root `package.json` `workspaces` field; when there is none the root `package.json` is used on its own.").optional()}).meta({id:`ChangelogVersioningConfig`}),u=e.union([e.boolean(),l]).describe(`Automatic version bumping when a changelog entry is generated.`).meta({id:`ChangelogVersioning`}),d=e.object({enabled:e.boolean().describe(`Master switch (enabled when the section is defined).`).optional(),workflows:s.describe("Which workflows to write into `.github/workflows`.").optional(),branches:e.object({main:e.string().optional(),dev:e.string().optional()}).describe(`Branch names the workflows target.`).optional(),types:e.array(e.string()).describe(`Allowed commit types (commitlint).`).optional(),scopes:e.array(e.string()).describe(`Allowed commit scopes (commitlint).`).optional(),versioning:u.describe("Automatic version bumping on changelog generation (default `true`).").optional(),vscode:e.boolean().describe(`Write the Conventional-Commits VS Code settings.`).optional()}).meta({id:`ToolchainChangelogConfig`}),f=e.object({enabled:e.boolean().describe(`Master switch (enabled when the section is defined).`).optional(),vscode:e.boolean().describe(`Write the Biome VS Code settings (default true).`).optional(),overrides:e.record(e.string(),e.unknown()).describe("Deep-merged over the generated `biome.json` (arrays union).").optional()}).meta({id:`ToolchainBiomeConfig`}),p=e.object({enabled:e.boolean().describe(`Master switch (enabled when the section is defined).`).optional(),glob:e.string().describe("Glob for workspace `tsconfig.default.json` files.").optional(),appGlob:e.string().describe(`Glob for "override" (app) workspaces.`).optional(),refs:e.boolean().describe(`Wire project references (default false).`).optional(),composite:e.boolean().describe("Emit `composite: true` (default false).").optional(),aliases:e.boolean().describe(`Inject path aliases (default true).`).optional(),indent:e.number().describe(`JSON indentation (default 4).`).optional(),rootFile:e.string().describe("The monorepo tsconfig file name (default `tsconfig.monorepo.json`).").optional()}).meta({id:`ToolchainTsconfigConfig`}),m=e.object({enabled:e.boolean().describe(`Watch by default (enabled when the section is defined).`).optional(),debounce:e.number().describe(`Debounce window in ms (default 150).`).optional()}).meta({id:`ToolchainWatchConfig`}),h=e.object({level:e.enum([`debug`,`info`,`warn`,`error`,`silent`]).describe("Minimum level to print (default `info`).").optional(),color:e.boolean().describe("Force colours on/off (default: on; `--no-color` disables).").optional(),name:e.string().describe("Prefix non-indented lines with `<name>:` (default `dbx`).").optional()}).meta({id:`ToolchainLoggerConfig`}),g=e.object({color:e.boolean().describe(`Force provider command colours on/off (default: inherit the logger).`).optional()}).meta({id:`ToolchainProvidersConfig`}),_=e.enum([`builtin`,`local`,`npm`,`git`,`vite-plus`]).describe(`How to load the source.`).meta({id:`ToolchainTemplateSourceType`}),v=e.enum([`project`,`workspace`,`application`,`folder`,`tooling`,`pipeline`]).describe(`What the template produces.`).meta({id:`ToolchainTemplateKind`}),y=e.object({type:_,locate:e.string().describe(`A builtin id, local dir, npm scope, git URL or Vite+ id.`),id:e.string().describe(`Stable id (defaults to the basename/scope).`).optional(),name:e.string().describe(`Display name override.`).optional(),description:e.string().describe(`Description override.`).optional(),kind:v.optional(),ref:e.string().describe(`Git branch/tag/commit.`).optional(),subdir:e.string().describe(`Subdirectory within the source that holds the template.`).optional(),tags:e.array(e.string()).describe(`Free-form tags.`).optional(),online:e.boolean().describe(`Whether the source needs network access.`).optional()}).meta({id:`ToolchainTemplateSource`}),b=e.object({enabled:e.boolean().describe(`Master switch (enabled when the section is defined).`).optional(),sources:e.array(y).describe(`Extra sources on top of the builtin + registry sources.`).optional()}).meta({id:`ToolchainTemplatesConfig`}),x=e.object({config:e.boolean().describe("Write the managed `vite.config.ts` (default true).").optional()}).catchall(e.unknown()).meta({id:`ToolchainViteConfig`});function S(t){return e.union([e.boolean(),t])}const C=e.object({project:n.optional(),changelog:S(d).optional(),biome:S(f).optional(),tsconfig:S(p).optional(),templates:S(b).optional(),vite:S(x).optional(),watch:S(m).optional(),logger:S(h).optional(),providers:S(g).optional()}).meta({id:`ToolchainConfigSections`}),w=e.object({toolchain:C.optional()}).meta({id:`DbxConfigSections`}),T={ProjectType:t,ToolchainProjectConfig:n,WorkflowStep:r,WorkflowStepsConfig:i,WorkflowConfig:a,WorkflowSetting:o,ChangelogWorkflowsConfig:s,ChangelogVersioningTarget:c,ChangelogVersioningConfig:l,ChangelogVersioning:u,ToolchainChangelogConfig:d,ToolchainBiomeConfig:f,ToolchainTsconfigConfig:p,ToolchainWatchConfig:m,ToolchainTemplateSourceType:_,ToolchainTemplateKind:v,ToolchainTemplateSource:y,ToolchainTemplatesConfig:b,ToolchainViteConfig:x,ToolchainLoggerConfig:h,ToolchainProvidersConfig:g,ToolchainConfigSections:C,DbxConfigSections:w},E={project:n,changelog:d,biome:f,tsconfig:p,templates:b,vite:x,watch:m,logger:h,providers:g},D={project:`Project metadata used as replacement tokens across every template.`,changelog:`Conventional-Commits CI, commitlint and the changelog pipeline.`,biome:"Biome config generation (for consumers that still want a `biome.json`).",tsconfig:`Workspace tsconfig generation (path aliases + project references).`,templates:`Template sources / scaffolding.`,vite:"The full Vite+ config; `dbx sync` writes the root `vite.config.ts` from it.",watch:"Watch behaviour for `dbx watch`.",logger:`Logging level, colours and prefix for toolchain output.`,providers:`Provider command behaviour (eg. colour for the provider passthrough commands).`};export{D as CONFIG_SECTION_DESCRIPTIONS,E as CONFIG_SECTION_SCHEMAS,T as CONFIG_TYPE_SCHEMAS,f as biomeConfigSchema,d as changelogConfigSchema,l as changelogVersioningConfigSchema,u as changelogVersioningSchema,c as changelogVersioningTargetSchema,s as changelogWorkflowsConfigSchema,w as dbxConfigSchema,h as loggerConfigSchema,n as projectConfigSchema,t as projectTypeSchema,g as providersConfigSchema,v as templateKindSchema,y as templateSourceSchema,_ as templateSourceTypeSchema,b as templatesConfigSchema,C as toolchainConfigSchema,p as tsconfigConfigSchema,x as viteConfigSchema,m as watchConfigSchema,a as workflowConfigSchema,o as workflowSettingSchema,r as workflowStepSchema,i as workflowStepsConfigSchema};
@@ -71,6 +71,17 @@ export interface ChangelogWorkflowsConfig {
71
71
  issues?: WorkflowSetting;
72
72
  sync?: WorkflowSetting;
73
73
  }
74
+ export type ChangelogVersioningTarget = 'uniform' | 'root-only' | 'individual';
75
+ export interface ChangelogVersioningConfig {
76
+ target?: ChangelogVersioningTarget;
77
+ /**
78
+ * Glob patterns selecting the workspaces to version (relative to the root). Defaults to the root
79
+ * `package.json` `workspaces` field; when there is none the root `package.json` is used on its
80
+ * own.
81
+ */
82
+ workspaces?: Array<string>;
83
+ }
84
+ export type ChangelogVersioning = boolean | ChangelogVersioningConfig;
74
85
  export interface ToolchainChangelogConfig {
75
86
  /** Master switch (enabled when the section is defined). */
76
87
  enabled?: boolean;
@@ -83,6 +94,7 @@ export interface ToolchainChangelogConfig {
83
94
  types?: Array<string>;
84
95
  /** Allowed commit scopes (commitlint). */
85
96
  scopes?: Array<string>;
97
+ versioning?: ChangelogVersioning;
86
98
  /** Write the Conventional-Commits VS Code settings. */
87
99
  vscode?: boolean;
88
100
  }
@@ -1,20 +1,20 @@
1
1
  import __tsdown_shims_path from 'node:path';
2
2
  import __tsdown_shims_url from 'node:url';
3
- import { TOOLCHAIN_PACKAGE, findOwnCliEntry } from "./bin.js";
3
+ import { TOOLCHAIN_PACKAGE, findOwnCliEntry, localToolchainVersion } from "./bin.js";
4
4
  import { mergeJsonAt, readJsonAt, readJsonFile, toJson, writeJsonFile } from "./fs-utils.js";
5
5
  import { Colors, LOG_LEVELS, LogChannel, LogLevel, Logger, LoggerConfig, LoggerOptions, configureLogger, createLogger, getLogOverrides, getLogger, isLogLevel, logger, normalizeLogLevel, setLogConfig, setLogOverrides, stripAnsi } from "./logger.js";
6
6
  import { Sortable, deepMerge, isPlainObject, mapValues, resolveSort, sort } from "./object-utils.js";
7
7
  import { ToolchainProvider, ToolchainProviderAction, ToolchainProviderCommand, providerActions } from "./provider.js";
8
- import { RunOptions, run, spawnCross } from "./run.js";
8
+ import { RunOptions, SpawnCrossOptions, killProcessTree, run, spawnCross } from "./run.js";
9
9
  import { asString, camelCase, camelCaseId, capitalize, constantCase, ensureLeadingSlash, ensureSlashes, ensureTrailingSlash, formatCliFlag, hasText, indent, isLocalhost, kebabCase, pascalCase, removeDoubleSlashes, removeLeadingSlash, removeTrailingSlash, sanitizeSlashes, snakeCase, str, titleCase } from "./string-utils.js";
10
10
  import { ReplacementOptions, ReplacementValue, Replacements, Replacer, applyReplacements, applyReplacementsDeep, createReplacer, defineReplacements, extractTokens, hasUnresolvedTokens, tokenPattern } from "./template.js";
11
- import { ChangelogWorkflowsConfig, DbxConfigSections, ProjectType, ToolchainBiomeConfig, ToolchainChangelogConfig, ToolchainConfigSections, ToolchainLoggerConfig, ToolchainProjectConfig, ToolchainProvidersConfig, ToolchainTemplateKind, ToolchainTemplateSource, ToolchainTemplateSourceType, ToolchainTemplatesConfig, ToolchainTsconfigConfig, ToolchainViteConfig, ToolchainWatchConfig, WorkflowConfig, WorkflowSetting, WorkflowStep, WorkflowStepsConfig } from "./config-types.js";
11
+ import { ChangelogVersioning, ChangelogVersioningConfig, ChangelogVersioningTarget, ChangelogWorkflowsConfig, DbxConfigSections, ProjectType, ToolchainBiomeConfig, ToolchainChangelogConfig, ToolchainConfigSections, ToolchainLoggerConfig, ToolchainProjectConfig, ToolchainProvidersConfig, ToolchainTemplateKind, ToolchainTemplateSource, ToolchainTemplateSourceType, ToolchainTemplatesConfig, ToolchainTsconfigConfig, ToolchainViteConfig, ToolchainWatchConfig, WorkflowConfig, WorkflowSetting, WorkflowStep, WorkflowStepsConfig } from "./config-types.js";
12
12
  import { Awaitable, GeneratedFile, JsonValue, PackageJson, ToolchainArgument, ToolchainCommand, ToolchainCommandContext, ToolchainOption } from "./types.js";
13
- import { CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, biomeConfigSchema, changelogConfigSchema, changelogWorkflowsConfigSchema, dbxConfigSchema, loggerConfigSchema, projectConfigSchema, projectTypeSchema, providersConfigSchema, templateKindSchema, templateSourceSchema, templateSourceTypeSchema, templatesConfigSchema, toolchainConfigSchema, tsconfigConfigSchema, viteConfigSchema, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema } from "./config-schema.js";
13
+ import { CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, biomeConfigSchema, changelogConfigSchema, changelogVersioningConfigSchema, changelogVersioningSchema, changelogVersioningTargetSchema, changelogWorkflowsConfigSchema, dbxConfigSchema, loggerConfigSchema, projectConfigSchema, projectTypeSchema, providersConfigSchema, templateKindSchema, templateSourceSchema, templateSourceTypeSchema, templatesConfigSchema, toolchainConfigSchema, tsconfigConfigSchema, viteConfigSchema, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema } from "./config-schema.js";
14
14
  import { CONFIG_FILE_NAMES, DbxConfig, ManagedFile, SyncContext, SyncSummary, SyncTask, ToolchainConfig, ToolchainHooks, ToolchainSection, defineConfig, repoSlugFromUrl, resolveTokens, sectionConfig, sectionEnabled } from "./toolchain.js";
15
15
  import { YamlValue, toYaml } from "./yaml.js";
16
16
  declare namespace index_d_exports {
17
- export { Awaitable, CONFIG_FILE_NAMES, CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, ChangelogWorkflowsConfig, Colors, DbxConfig, DbxConfigSections, GeneratedFile, JsonValue, LOG_LEVELS, LogChannel, LogLevel, Logger, LoggerConfig, LoggerOptions, ManagedFile, PackageJson, ProjectType, ReplacementOptions, ReplacementValue, Replacements, Replacer, RunOptions, Sortable, SyncContext, SyncSummary, SyncTask, TOOLCHAIN_PACKAGE, ToolchainArgument, ToolchainBiomeConfig, ToolchainChangelogConfig, ToolchainCommand, ToolchainCommandContext, ToolchainConfig, ToolchainConfigSections, ToolchainHooks, ToolchainLoggerConfig, ToolchainOption, ToolchainProjectConfig, ToolchainProvider, ToolchainProviderAction, ToolchainProviderCommand, ToolchainProvidersConfig, ToolchainSection, ToolchainTemplateKind, ToolchainTemplateSource, ToolchainTemplateSourceType, ToolchainTemplatesConfig, ToolchainTsconfigConfig, ToolchainViteConfig, ToolchainWatchConfig, WorkflowConfig, WorkflowSetting, WorkflowStep, WorkflowStepsConfig, YamlValue, applyReplacements, applyReplacementsDeep, asString, biomeConfigSchema, camelCase, camelCaseId, capitalize, changelogConfigSchema, changelogWorkflowsConfigSchema, configureLogger, constantCase, createLogger, createReplacer, dbxConfigSchema, deepMerge, defineConfig, defineReplacements, ensureLeadingSlash, ensureSlashes, ensureTrailingSlash, extractTokens, findOwnCliEntry, formatCliFlag, getLogOverrides, getLogger, hasText, hasUnresolvedTokens, indent, isLocalhost, isLogLevel, isPlainObject, kebabCase, logger, loggerConfigSchema, mapValues, mergeJsonAt, normalizeLogLevel, pascalCase, projectConfigSchema, projectTypeSchema, providerActions, providersConfigSchema, readJsonAt, readJsonFile, removeDoubleSlashes, removeLeadingSlash, removeTrailingSlash, repoSlugFromUrl, resolveSort, resolveTokens, run, sanitizeSlashes, sectionConfig, sectionEnabled, setLogConfig, setLogOverrides, snakeCase, sort, spawnCross, str, stripAnsi, templateKindSchema, templateSourceSchema, templateSourceTypeSchema, templatesConfigSchema, titleCase, toJson, toYaml, tokenPattern, toolchainConfigSchema, tsconfigConfigSchema, viteConfigSchema, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema, writeJsonFile };
17
+ export { Awaitable, CONFIG_FILE_NAMES, CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, ChangelogVersioning, ChangelogVersioningConfig, ChangelogVersioningTarget, ChangelogWorkflowsConfig, Colors, DbxConfig, DbxConfigSections, GeneratedFile, JsonValue, LOG_LEVELS, LogChannel, LogLevel, Logger, LoggerConfig, LoggerOptions, ManagedFile, PackageJson, ProjectType, ReplacementOptions, ReplacementValue, Replacements, Replacer, RunOptions, Sortable, SpawnCrossOptions, SyncContext, SyncSummary, SyncTask, TOOLCHAIN_PACKAGE, ToolchainArgument, ToolchainBiomeConfig, ToolchainChangelogConfig, ToolchainCommand, ToolchainCommandContext, ToolchainConfig, ToolchainConfigSections, ToolchainHooks, ToolchainLoggerConfig, ToolchainOption, ToolchainProjectConfig, ToolchainProvider, ToolchainProviderAction, ToolchainProviderCommand, ToolchainProvidersConfig, ToolchainSection, ToolchainTemplateKind, ToolchainTemplateSource, ToolchainTemplateSourceType, ToolchainTemplatesConfig, ToolchainTsconfigConfig, ToolchainViteConfig, ToolchainWatchConfig, WorkflowConfig, WorkflowSetting, WorkflowStep, WorkflowStepsConfig, YamlValue, applyReplacements, applyReplacementsDeep, asString, biomeConfigSchema, camelCase, camelCaseId, capitalize, changelogConfigSchema, changelogVersioningConfigSchema, changelogVersioningSchema, changelogVersioningTargetSchema, changelogWorkflowsConfigSchema, configureLogger, constantCase, createLogger, createReplacer, dbxConfigSchema, deepMerge, defineConfig, defineReplacements, ensureLeadingSlash, ensureSlashes, ensureTrailingSlash, extractTokens, findOwnCliEntry, formatCliFlag, getLogOverrides, getLogger, hasText, hasUnresolvedTokens, indent, isLocalhost, isLogLevel, isPlainObject, kebabCase, killProcessTree, localToolchainVersion, logger, loggerConfigSchema, mapValues, mergeJsonAt, normalizeLogLevel, pascalCase, projectConfigSchema, projectTypeSchema, providerActions, providersConfigSchema, readJsonAt, readJsonFile, removeDoubleSlashes, removeLeadingSlash, removeTrailingSlash, repoSlugFromUrl, resolveSort, resolveTokens, run, sanitizeSlashes, sectionConfig, sectionEnabled, setLogConfig, setLogOverrides, snakeCase, sort, spawnCross, str, stripAnsi, templateKindSchema, templateSourceSchema, templateSourceTypeSchema, templatesConfigSchema, titleCase, toJson, toYaml, tokenPattern, toolchainConfigSchema, tsconfigConfigSchema, viteConfigSchema, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema, writeJsonFile };
18
18
  }
19
19
  //#endregion
20
- export { Awaitable, CONFIG_FILE_NAMES, CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, ChangelogWorkflowsConfig, Colors, DbxConfig, DbxConfigSections, GeneratedFile, JsonValue, LOG_LEVELS, LogChannel, LogLevel, Logger, LoggerConfig, LoggerOptions, ManagedFile, PackageJson, ProjectType, ReplacementOptions, ReplacementValue, Replacements, Replacer, RunOptions, Sortable, SyncContext, SyncSummary, SyncTask, TOOLCHAIN_PACKAGE, ToolchainArgument, ToolchainBiomeConfig, ToolchainChangelogConfig, ToolchainCommand, ToolchainCommandContext, ToolchainConfig, ToolchainConfigSections, ToolchainHooks, ToolchainLoggerConfig, ToolchainOption, ToolchainProjectConfig, ToolchainProvider, ToolchainProviderAction, ToolchainProviderCommand, ToolchainProvidersConfig, ToolchainSection, ToolchainTemplateKind, ToolchainTemplateSource, ToolchainTemplateSourceType, ToolchainTemplatesConfig, ToolchainTsconfigConfig, ToolchainViteConfig, ToolchainWatchConfig, WorkflowConfig, WorkflowSetting, WorkflowStep, WorkflowStepsConfig, type YamlValue, applyReplacements, applyReplacementsDeep, asString, biomeConfigSchema, camelCase, camelCaseId, capitalize, changelogConfigSchema, changelogWorkflowsConfigSchema, configureLogger, constantCase, createLogger, createReplacer, dbxConfigSchema, deepMerge, defineConfig, defineReplacements, ensureLeadingSlash, ensureSlashes, ensureTrailingSlash, extractTokens, findOwnCliEntry, formatCliFlag, getLogOverrides, getLogger, hasText, hasUnresolvedTokens, indent, index_d_exports, isLocalhost, isLogLevel, isPlainObject, kebabCase, logger, loggerConfigSchema, mapValues, mergeJsonAt, normalizeLogLevel, pascalCase, projectConfigSchema, projectTypeSchema, providerActions, providersConfigSchema, readJsonAt, readJsonFile, removeDoubleSlashes, removeLeadingSlash, removeTrailingSlash, repoSlugFromUrl, resolveSort, resolveTokens, run, sanitizeSlashes, sectionConfig, sectionEnabled, setLogConfig, setLogOverrides, snakeCase, sort, spawnCross, str, stripAnsi, templateKindSchema, templateSourceSchema, templateSourceTypeSchema, templatesConfigSchema, titleCase, toJson, toYaml, tokenPattern, toolchainConfigSchema, tsconfigConfigSchema, viteConfigSchema, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema, writeJsonFile };
20
+ export { Awaitable, CONFIG_FILE_NAMES, CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, ChangelogVersioning, ChangelogVersioningConfig, ChangelogVersioningTarget, ChangelogWorkflowsConfig, Colors, DbxConfig, DbxConfigSections, GeneratedFile, JsonValue, LOG_LEVELS, LogChannel, LogLevel, Logger, LoggerConfig, LoggerOptions, ManagedFile, PackageJson, ProjectType, ReplacementOptions, ReplacementValue, Replacements, Replacer, RunOptions, Sortable, SpawnCrossOptions, SyncContext, SyncSummary, SyncTask, TOOLCHAIN_PACKAGE, ToolchainArgument, ToolchainBiomeConfig, ToolchainChangelogConfig, ToolchainCommand, ToolchainCommandContext, ToolchainConfig, ToolchainConfigSections, ToolchainHooks, ToolchainLoggerConfig, ToolchainOption, ToolchainProjectConfig, ToolchainProvider, ToolchainProviderAction, ToolchainProviderCommand, ToolchainProvidersConfig, ToolchainSection, ToolchainTemplateKind, ToolchainTemplateSource, ToolchainTemplateSourceType, ToolchainTemplatesConfig, ToolchainTsconfigConfig, ToolchainViteConfig, ToolchainWatchConfig, WorkflowConfig, WorkflowSetting, WorkflowStep, WorkflowStepsConfig, type YamlValue, applyReplacements, applyReplacementsDeep, asString, biomeConfigSchema, camelCase, camelCaseId, capitalize, changelogConfigSchema, changelogVersioningConfigSchema, changelogVersioningSchema, changelogVersioningTargetSchema, changelogWorkflowsConfigSchema, configureLogger, constantCase, createLogger, createReplacer, dbxConfigSchema, deepMerge, defineConfig, defineReplacements, ensureLeadingSlash, ensureSlashes, ensureTrailingSlash, extractTokens, findOwnCliEntry, formatCliFlag, getLogOverrides, getLogger, hasText, hasUnresolvedTokens, indent, index_d_exports, isLocalhost, isLogLevel, isPlainObject, kebabCase, killProcessTree, localToolchainVersion, logger, loggerConfigSchema, mapValues, mergeJsonAt, normalizeLogLevel, pascalCase, projectConfigSchema, projectTypeSchema, providerActions, providersConfigSchema, readJsonAt, readJsonFile, removeDoubleSlashes, removeLeadingSlash, removeTrailingSlash, repoSlugFromUrl, resolveSort, resolveTokens, run, sanitizeSlashes, sectionConfig, sectionEnabled, setLogConfig, setLogOverrides, snakeCase, sort, spawnCross, str, stripAnsi, templateKindSchema, templateSourceSchema, templateSourceTypeSchema, templatesConfigSchema, titleCase, toJson, toYaml, tokenPattern, toolchainConfigSchema, tsconfigConfigSchema, viteConfigSchema, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema, writeJsonFile };
@@ -1 +1 @@
1
- import"node:path";import"node:url";import.meta.url;import{__exportAll as ee}from"../../../_virtual/_rolldown/runtime.js";import{TOOLCHAIN_PACKAGE as e,findOwnCliEntry as t}from"./bin.js";import{deepMerge as n,isPlainObject as r,mapValues as i,resolveSort as a,sort as o}from"./object-utils.js";import{mergeJsonAt as s,readJsonAt as c,readJsonFile as l,toJson as u,writeJsonFile as d}from"./fs-utils.js";import{LOG_LEVELS as f,configureLogger as p,createLogger as m,getLogOverrides as h,getLogger as g,isLogLevel as _,logger as v,normalizeLogLevel as y,setLogConfig as b,setLogOverrides as x,stripAnsi as S}from"./logger.js";import{providerActions as C}from"./provider.js";import{run as w,spawnCross as T}from"./run.js";import{asString as E,camelCase as D,camelCaseId as O,capitalize as k,constantCase as A,ensureLeadingSlash as j,ensureSlashes as M,ensureTrailingSlash as N,formatCliFlag as P,hasText as F,indent as I,isLocalhost as L,kebabCase as R,pascalCase as z,removeDoubleSlashes as B,removeLeadingSlash as V,removeTrailingSlash as H,sanitizeSlashes as U,snakeCase as te,str as W,titleCase as G}from"./string-utils.js";import{applyReplacements as K,applyReplacementsDeep as q,createReplacer as J,defineReplacements as Y,extractTokens as X,hasUnresolvedTokens as Z,tokenPattern as Q}from"./template.js";import{CONFIG_SECTION_DESCRIPTIONS as $,CONFIG_SECTION_SCHEMAS as ne,CONFIG_TYPE_SCHEMAS as re,biomeConfigSchema as ie,changelogConfigSchema as ae,changelogWorkflowsConfigSchema as oe,dbxConfigSchema as se,loggerConfigSchema as ce,projectConfigSchema as le,projectTypeSchema as ue,providersConfigSchema as de,templateKindSchema as fe,templateSourceSchema as pe,templateSourceTypeSchema as me,templatesConfigSchema as he,toolchainConfigSchema as ge,tsconfigConfigSchema as _e,viteConfigSchema as ve,watchConfigSchema as ye,workflowConfigSchema as be,workflowSettingSchema as xe,workflowStepSchema as Se,workflowStepsConfigSchema as Ce}from"./config-schema.js";import{CONFIG_FILE_NAMES as we,defineConfig as Te,repoSlugFromUrl as Ee,resolveTokens as De,sectionConfig as Oe,sectionEnabled as ke}from"./toolchain.js";import{toYaml as Ae}from"./yaml.js";var je=/* @__PURE__ */ ee({CONFIG_FILE_NAMES:()=>we,CONFIG_SECTION_DESCRIPTIONS:()=>$,CONFIG_SECTION_SCHEMAS:()=>ne,CONFIG_TYPE_SCHEMAS:()=>re,LOG_LEVELS:()=>f,TOOLCHAIN_PACKAGE:()=>e,applyReplacements:()=>K,applyReplacementsDeep:()=>q,asString:()=>E,biomeConfigSchema:()=>ie,camelCase:()=>D,camelCaseId:()=>O,capitalize:()=>k,changelogConfigSchema:()=>ae,changelogWorkflowsConfigSchema:()=>oe,configureLogger:()=>p,constantCase:()=>A,createLogger:()=>m,createReplacer:()=>J,dbxConfigSchema:()=>se,deepMerge:()=>n,defineConfig:()=>Te,defineReplacements:()=>Y,ensureLeadingSlash:()=>j,ensureSlashes:()=>M,ensureTrailingSlash:()=>N,extractTokens:()=>X,findOwnCliEntry:()=>t,formatCliFlag:()=>P,getLogOverrides:()=>h,getLogger:()=>g,hasText:()=>F,hasUnresolvedTokens:()=>Z,indent:()=>I,isLocalhost:()=>L,isLogLevel:()=>_,isPlainObject:()=>r,kebabCase:()=>R,logger:()=>v,loggerConfigSchema:()=>ce,mapValues:()=>i,mergeJsonAt:()=>s,normalizeLogLevel:()=>y,pascalCase:()=>z,projectConfigSchema:()=>le,projectTypeSchema:()=>ue,providerActions:()=>C,providersConfigSchema:()=>de,readJsonAt:()=>c,readJsonFile:()=>l,removeDoubleSlashes:()=>B,removeLeadingSlash:()=>V,removeTrailingSlash:()=>H,repoSlugFromUrl:()=>Ee,resolveSort:()=>a,resolveTokens:()=>De,run:()=>w,sanitizeSlashes:()=>U,sectionConfig:()=>Oe,sectionEnabled:()=>ke,setLogConfig:()=>b,setLogOverrides:()=>x,snakeCase:()=>te,sort:()=>o,spawnCross:()=>T,str:()=>W,stripAnsi:()=>S,templateKindSchema:()=>fe,templateSourceSchema:()=>pe,templateSourceTypeSchema:()=>me,templatesConfigSchema:()=>he,titleCase:()=>G,toJson:()=>u,toYaml:()=>Ae,tokenPattern:()=>Q,toolchainConfigSchema:()=>ge,tsconfigConfigSchema:()=>_e,viteConfigSchema:()=>ve,watchConfigSchema:()=>ye,workflowConfigSchema:()=>be,workflowSettingSchema:()=>xe,workflowStepSchema:()=>Se,workflowStepsConfigSchema:()=>Ce,writeJsonFile:()=>d});export{we as CONFIG_FILE_NAMES,$ as CONFIG_SECTION_DESCRIPTIONS,ne as CONFIG_SECTION_SCHEMAS,re as CONFIG_TYPE_SCHEMAS,f as LOG_LEVELS,e as TOOLCHAIN_PACKAGE,K as applyReplacements,q as applyReplacementsDeep,E as asString,ie as biomeConfigSchema,D as camelCase,O as camelCaseId,k as capitalize,ae as changelogConfigSchema,oe as changelogWorkflowsConfigSchema,p as configureLogger,A as constantCase,m as createLogger,J as createReplacer,se as dbxConfigSchema,n as deepMerge,Te as defineConfig,Y as defineReplacements,j as ensureLeadingSlash,M as ensureSlashes,N as ensureTrailingSlash,X as extractTokens,t as findOwnCliEntry,P as formatCliFlag,h as getLogOverrides,g as getLogger,F as hasText,Z as hasUnresolvedTokens,I as indent,L as isLocalhost,_ as isLogLevel,r as isPlainObject,R as kebabCase,v as logger,ce as loggerConfigSchema,i as mapValues,s as mergeJsonAt,y as normalizeLogLevel,z as pascalCase,le as projectConfigSchema,ue as projectTypeSchema,C as providerActions,de as providersConfigSchema,c as readJsonAt,l as readJsonFile,B as removeDoubleSlashes,V as removeLeadingSlash,H as removeTrailingSlash,Ee as repoSlugFromUrl,a as resolveSort,De as resolveTokens,w as run,U as sanitizeSlashes,Oe as sectionConfig,ke as sectionEnabled,b as setLogConfig,x as setLogOverrides,te as snakeCase,o as sort,T as spawnCross,je as src_exports,W as str,S as stripAnsi,fe as templateKindSchema,pe as templateSourceSchema,me as templateSourceTypeSchema,he as templatesConfigSchema,G as titleCase,u as toJson,Ae as toYaml,Q as tokenPattern,ge as toolchainConfigSchema,_e as tsconfigConfigSchema,ve as viteConfigSchema,ye as watchConfigSchema,be as workflowConfigSchema,xe as workflowSettingSchema,Se as workflowStepSchema,Ce as workflowStepsConfigSchema,d as writeJsonFile};
1
+ import"node:path";import"node:url";import.meta.url;import{__exportAll as ee}from"../../../_virtual/_rolldown/runtime.js";import{TOOLCHAIN_PACKAGE as e,findOwnCliEntry as t,localToolchainVersion as n}from"./bin.js";import{deepMerge as r,isPlainObject as i,mapValues as a,resolveSort as o,sort as s}from"./object-utils.js";import{mergeJsonAt as c,readJsonAt as l,readJsonFile as u,toJson as d,writeJsonFile as f}from"./fs-utils.js";import{LOG_LEVELS as p,configureLogger as m,createLogger as h,getLogOverrides as g,getLogger as _,isLogLevel as v,logger as y,normalizeLogLevel as b,setLogConfig as x,setLogOverrides as S,stripAnsi as C}from"./logger.js";import{providerActions as w}from"./provider.js";import{killProcessTree as T,run as E,spawnCross as D}from"./run.js";import{asString as O,camelCase as k,camelCaseId as A,capitalize as j,constantCase as M,ensureLeadingSlash as N,ensureSlashes as P,ensureTrailingSlash as F,formatCliFlag as I,hasText as L,indent as R,isLocalhost as z,kebabCase as B,pascalCase as V,removeDoubleSlashes as H,removeLeadingSlash as U,removeTrailingSlash as W,sanitizeSlashes as G,snakeCase as K,str as q,titleCase as te}from"./string-utils.js";import{applyReplacements as J,applyReplacementsDeep as Y,createReplacer as X,defineReplacements as Z,extractTokens as Q,hasUnresolvedTokens as $,tokenPattern as ne}from"./template.js";import{CONFIG_SECTION_DESCRIPTIONS as re,CONFIG_SECTION_SCHEMAS as ie,CONFIG_TYPE_SCHEMAS as ae,biomeConfigSchema as oe,changelogConfigSchema as se,changelogVersioningConfigSchema as ce,changelogVersioningSchema as le,changelogVersioningTargetSchema as ue,changelogWorkflowsConfigSchema as de,dbxConfigSchema as fe,loggerConfigSchema as pe,projectConfigSchema as me,projectTypeSchema as he,providersConfigSchema as ge,templateKindSchema as _e,templateSourceSchema as ve,templateSourceTypeSchema as ye,templatesConfigSchema as be,toolchainConfigSchema as xe,tsconfigConfigSchema as Se,viteConfigSchema as Ce,watchConfigSchema as we,workflowConfigSchema as Te,workflowSettingSchema as Ee,workflowStepSchema as De,workflowStepsConfigSchema as Oe}from"./config-schema.js";import{CONFIG_FILE_NAMES as ke,defineConfig as Ae,repoSlugFromUrl as je,resolveTokens as Me,sectionConfig as Ne,sectionEnabled as Pe}from"./toolchain.js";import{toYaml as Fe}from"./yaml.js";var Ie=/* @__PURE__ */ ee({CONFIG_FILE_NAMES:()=>ke,CONFIG_SECTION_DESCRIPTIONS:()=>re,CONFIG_SECTION_SCHEMAS:()=>ie,CONFIG_TYPE_SCHEMAS:()=>ae,LOG_LEVELS:()=>p,TOOLCHAIN_PACKAGE:()=>e,applyReplacements:()=>J,applyReplacementsDeep:()=>Y,asString:()=>O,biomeConfigSchema:()=>oe,camelCase:()=>k,camelCaseId:()=>A,capitalize:()=>j,changelogConfigSchema:()=>se,changelogVersioningConfigSchema:()=>ce,changelogVersioningSchema:()=>le,changelogVersioningTargetSchema:()=>ue,changelogWorkflowsConfigSchema:()=>de,configureLogger:()=>m,constantCase:()=>M,createLogger:()=>h,createReplacer:()=>X,dbxConfigSchema:()=>fe,deepMerge:()=>r,defineConfig:()=>Ae,defineReplacements:()=>Z,ensureLeadingSlash:()=>N,ensureSlashes:()=>P,ensureTrailingSlash:()=>F,extractTokens:()=>Q,findOwnCliEntry:()=>t,formatCliFlag:()=>I,getLogOverrides:()=>g,getLogger:()=>_,hasText:()=>L,hasUnresolvedTokens:()=>$,indent:()=>R,isLocalhost:()=>z,isLogLevel:()=>v,isPlainObject:()=>i,kebabCase:()=>B,killProcessTree:()=>T,localToolchainVersion:()=>n,logger:()=>y,loggerConfigSchema:()=>pe,mapValues:()=>a,mergeJsonAt:()=>c,normalizeLogLevel:()=>b,pascalCase:()=>V,projectConfigSchema:()=>me,projectTypeSchema:()=>he,providerActions:()=>w,providersConfigSchema:()=>ge,readJsonAt:()=>l,readJsonFile:()=>u,removeDoubleSlashes:()=>H,removeLeadingSlash:()=>U,removeTrailingSlash:()=>W,repoSlugFromUrl:()=>je,resolveSort:()=>o,resolveTokens:()=>Me,run:()=>E,sanitizeSlashes:()=>G,sectionConfig:()=>Ne,sectionEnabled:()=>Pe,setLogConfig:()=>x,setLogOverrides:()=>S,snakeCase:()=>K,sort:()=>s,spawnCross:()=>D,str:()=>q,stripAnsi:()=>C,templateKindSchema:()=>_e,templateSourceSchema:()=>ve,templateSourceTypeSchema:()=>ye,templatesConfigSchema:()=>be,titleCase:()=>te,toJson:()=>d,toYaml:()=>Fe,tokenPattern:()=>ne,toolchainConfigSchema:()=>xe,tsconfigConfigSchema:()=>Se,viteConfigSchema:()=>Ce,watchConfigSchema:()=>we,workflowConfigSchema:()=>Te,workflowSettingSchema:()=>Ee,workflowStepSchema:()=>De,workflowStepsConfigSchema:()=>Oe,writeJsonFile:()=>f});export{ke as CONFIG_FILE_NAMES,re as CONFIG_SECTION_DESCRIPTIONS,ie as CONFIG_SECTION_SCHEMAS,ae as CONFIG_TYPE_SCHEMAS,p as LOG_LEVELS,e as TOOLCHAIN_PACKAGE,J as applyReplacements,Y as applyReplacementsDeep,O as asString,oe as biomeConfigSchema,k as camelCase,A as camelCaseId,j as capitalize,se as changelogConfigSchema,ce as changelogVersioningConfigSchema,le as changelogVersioningSchema,ue as changelogVersioningTargetSchema,de as changelogWorkflowsConfigSchema,m as configureLogger,M as constantCase,h as createLogger,X as createReplacer,fe as dbxConfigSchema,r as deepMerge,Ae as defineConfig,Z as defineReplacements,N as ensureLeadingSlash,P as ensureSlashes,F as ensureTrailingSlash,Q as extractTokens,t as findOwnCliEntry,I as formatCliFlag,g as getLogOverrides,_ as getLogger,L as hasText,$ as hasUnresolvedTokens,R as indent,z as isLocalhost,v as isLogLevel,i as isPlainObject,B as kebabCase,T as killProcessTree,n as localToolchainVersion,y as logger,pe as loggerConfigSchema,a as mapValues,c as mergeJsonAt,b as normalizeLogLevel,V as pascalCase,me as projectConfigSchema,he as projectTypeSchema,w as providerActions,ge as providersConfigSchema,l as readJsonAt,u as readJsonFile,H as removeDoubleSlashes,U as removeLeadingSlash,W as removeTrailingSlash,je as repoSlugFromUrl,o as resolveSort,Me as resolveTokens,E as run,G as sanitizeSlashes,Ne as sectionConfig,Pe as sectionEnabled,x as setLogConfig,S as setLogOverrides,K as snakeCase,s as sort,D as spawnCross,Ie as src_exports,q as str,C as stripAnsi,_e as templateKindSchema,ve as templateSourceSchema,ye as templateSourceTypeSchema,be as templatesConfigSchema,te as titleCase,d as toJson,Fe as toYaml,ne as tokenPattern,xe as toolchainConfigSchema,Se as tsconfigConfigSchema,Ce as viteConfigSchema,we as watchConfigSchema,Te as workflowConfigSchema,Ee as workflowSettingSchema,De as workflowStepSchema,Oe as workflowStepsConfigSchema,f as writeJsonFile};
@@ -2,7 +2,24 @@ import __tsdown_shims_path from 'node:path';
2
2
  import __tsdown_shims_url from 'node:url';
3
3
  import { ChildProcess, SpawnOptions } from "node:child_process";
4
4
  //#region packages/shared/src/run.d.ts
5
- export interface RunOptions extends SpawnOptions {
5
+ /**
6
+ * Kill a child process **and its descendants**. On Windows the child is a
7
+ * `cmd.exe` wrapper, so a plain `child.kill()` would orphan the real command;
8
+ * `taskkill /t` tears down the whole tree. On POSIX the child is killed directly.
9
+ */
10
+ export declare function killProcessTree(child: ChildProcess, signal?: NodeJS.Signals): void;
11
+ /** {@link spawnCross} options: {@link SpawnOptions} plus an optional deadline. */
12
+ export interface SpawnCrossOptions extends SpawnOptions {
13
+ /**
14
+ * Kill the child (and its tree) after this many ms. Use it for one-shot
15
+ * commands so a hung child can never be left running; omit it for
16
+ * long-running processes (dev servers, watchers).
17
+ */
18
+ timeoutMs?: number;
19
+ /** Called instead of the default warning when the deadline is hit. */
20
+ onTimeout?: (cmd: string, timeoutMs: number) => void;
21
+ }
22
+ export interface RunOptions extends SpawnCrossOptions {
6
23
  /** Exit the main process with the child's exit code (default true). */
7
24
  exitWithMainProc?: boolean;
8
25
  /** Append a trailing `--` to the args (default true). */
@@ -15,8 +32,11 @@ export interface RunOptions extends SpawnOptions {
15
32
  * child process. On Windows the command and every argument are escaped for
16
33
  * `cmd.exe` (and a `.cmd`/`.bat` shim is re-escaped) so a caller-supplied argv
17
34
  * value can never inject a command. `options.stdio` defaults to `inherit`.
35
+ *
36
+ * When `timeoutMs` is set the child's whole process tree is killed once the
37
+ * deadline passes (with a warning), so a stalled command can't hang forever.
18
38
  */
19
- export declare function spawnCross(cmd: string, args: string[], options?: SpawnOptions): ChildProcess;
39
+ export declare function spawnCross(cmd: string, args: string[], options?: SpawnCrossOptions): ChildProcess;
20
40
  /**
21
41
  * Spawn a command without a shell in a cross-platform safe way. On Windows the
22
42
  * command and every argument are escaped for `cmd.exe` so a caller-supplied
@@ -1 +1 @@
1
- import{default as e}from"node:path";import"node:url";import.meta.url;import{logger as t}from"./logger.js";import n from"node:fs";import{spawn as r}from"node:child_process";const i=process.platform===`win32`,a=/([()\][%!^"`<>&|;, *?])/g;function o(e){return e.replace(a,`^$1`)}function s(e,t){let n=String(e);return n=n.replace(/(?=(\\+?)?)\1"/g,`$1$1\\"`),n=n.replace(/(?=(\\+?)?)\1$/,`$1$1`),n=`"${n}"`,n=n.replace(a,`^$1`),t&&(n=n.replace(a,`^$1`)),n}function c(t){if(e.extname(t))return n.existsSync(t)?t:void 0;let r=(process.env.PATHEXT??`.COM;.EXE;.BAT;.CMD`).split(`;`),i=(process.env.PATH??``).split(e.delimiter);for(let a of r)for(let r of i){let i=e.join(r,`${t}${a.toLowerCase()}`);if(n.existsSync(i))return i}}function l(e){let t=c(e)??e;return/\.(cmd|bat)$/i.test(t)}function u(e,t,n={}){if(i){let i=l(e),a=[o(e),...t.map(e=>s(e,i))].join(` `);return r(process.env.ComSpec??`cmd.exe`,[`/d`,`/s`,`/c`,`"${a}"`],{stdio:`inherit`,...n,shell:!1,windowsVerbatimArguments:!0})}return r(e,t,{stdio:`inherit`,...n,shell:!1})}function d(e,n,r){let{exitWithMainProc:i=!0,argsEndingDashes:a=!0,verbose:o=!0,...s}=r??{},c=[...n,...a?[`--`]:[]];o&&t.info(`$ ${e} ${c.join(` `)}`);let l=u(e,c,s);return i&&l.on(`exit`,process.exit),l}export{d as run,u as spawnCross};
1
+ import{default as e}from"node:path";import"node:url";import.meta.url;import{logger as t}from"./logger.js";import n from"node:fs";import{spawn as r,spawnSync as i}from"node:child_process";const a=process.platform===`win32`;let o=!1;const s=/([()\][%!^"`<>&|;, *?])/g;function c(e){return e.replace(s,`^$1`)}function l(e,t){let n=String(e);return n=n.replace(/(?=(\\+?)?)\1"/g,`$1$1\\"`),n=n.replace(/(?=(\\+?)?)\1$/,`$1$1`),n=`"${n}"`,n=n.replace(s,`^$1`),t&&(n=n.replace(s,`^$1`)),n}function u(t){if(e.extname(t))return n.existsSync(t)?t:void 0;let r=(process.env.PATHEXT??`.COM;.EXE;.BAT;.CMD`).split(`;`),i=(process.env.PATH??``).split(e.delimiter);for(let a of r)for(let r of i){let i=e.join(r,`${t}${a.toLowerCase()}`);if(n.existsSync(i))return i}}function d(e){let t=u(e)??e;return/\.(cmd|bat)$/i.test(t)}function f(e,t=`SIGKILL`){let n=e.pid;if(n!==void 0){if(a)try{i(`taskkill`,[`/pid`,String(n),`/t`,`/f`],{stdio:`ignore`});return}catch{}try{e.kill(t)}catch{}}}function p(e,n,i={}){let{timeoutMs:s,onTimeout:u,...p}=i,m;if(a){let i=d(e),a=[c(e),...n.map(e=>l(e,i))].join(` `),s=process.env.ComSpec;!s&&!o&&(o=!0,t.warn(`ComSpec is not set — falling back to cmd.exe.`)),m=r(s??`cmd.exe`,[`/d`,`/s`,`/c`,`"${a}"`],{stdio:`inherit`,...p,shell:!1,windowsVerbatimArguments:!0})}else m=r(e,n,{stdio:`inherit`,...p,shell:!1});if(s!==void 0&&s>0){let n=setTimeout(()=>{u?u(e,s):t.warn(`\`${e}\` exceeded ${s}ms — terminating it.`),f(m)},s);n.unref?.(),m.once(`exit`,()=>clearTimeout(n))}return m}function m(e,n,r){let{exitWithMainProc:i=!0,argsEndingDashes:a=!0,verbose:o=!0,timeoutMs:s,...c}=r??{},l=[...n,...a?[`--`]:[]];o&&t.info(`$ ${e} ${l.join(` `)}`);let u=p(e,l,{...c,...s===void 0?{}:{timeoutMs:s}});return i&&u.on(`exit`,process.exit),u}export{f as killProcessTree,m as run,p as spawnCross};
@@ -1,9 +1,9 @@
1
1
  import __tsdown_shims_path from 'node:path';
2
2
  import __tsdown_shims_url from 'node:url';
3
3
  import { Replacements } from "./template.js";
4
- import { ChangelogWorkflowsConfig, DbxConfigSections, ProjectType, ToolchainBiomeConfig, ToolchainChangelogConfig, ToolchainConfigSections, ToolchainLoggerConfig, ToolchainProjectConfig, ToolchainProvidersConfig, ToolchainTemplateKind, ToolchainTemplateSource, ToolchainTemplateSourceType, ToolchainTemplatesConfig, ToolchainTsconfigConfig, ToolchainViteConfig, ToolchainWatchConfig, WorkflowConfig, WorkflowSetting, WorkflowStep, WorkflowStepsConfig } from "./config-types.js";
4
+ import { ChangelogVersioning, ChangelogVersioningConfig, ChangelogVersioningTarget, ChangelogWorkflowsConfig, DbxConfigSections, ProjectType, ToolchainBiomeConfig, ToolchainChangelogConfig, ToolchainConfigSections, ToolchainLoggerConfig, ToolchainProjectConfig, ToolchainProvidersConfig, ToolchainTemplateKind, ToolchainTemplateSource, ToolchainTemplateSourceType, ToolchainTemplatesConfig, ToolchainTsconfigConfig, ToolchainViteConfig, ToolchainWatchConfig, WorkflowConfig, WorkflowSetting, WorkflowStep, WorkflowStepsConfig } from "./config-types.js";
5
5
  import { Awaitable } from "./types.js";
6
- import { CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, biomeConfigSchema, changelogConfigSchema, changelogWorkflowsConfigSchema, dbxConfigSchema, loggerConfigSchema, projectConfigSchema, projectTypeSchema, providersConfigSchema, templateKindSchema, templateSourceSchema, templateSourceTypeSchema, templatesConfigSchema, toolchainConfigSchema, tsconfigConfigSchema, viteConfigSchema, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema } from "./config-schema.js";
6
+ import { CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, biomeConfigSchema, changelogConfigSchema, changelogVersioningConfigSchema, changelogVersioningSchema, changelogVersioningTargetSchema, changelogWorkflowsConfigSchema, dbxConfigSchema, loggerConfigSchema, projectConfigSchema, projectTypeSchema, providersConfigSchema, templateKindSchema, templateSourceSchema, templateSourceTypeSchema, templatesConfigSchema, toolchainConfigSchema, tsconfigConfigSchema, viteConfigSchema, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema } from "./config-schema.js";
7
7
  //#region packages/shared/src/toolchain.d.ts
8
8
  /** A summary of a sync run, handed to {@link ToolchainHooks.afterSync}. */
9
9
  export interface SyncSummary {
@@ -157,4 +157,4 @@ export interface SyncTask {
157
157
  run: (ctx: SyncContext) => Awaitable<ManagedFile[] | void>;
158
158
  }
159
159
  //#endregion
160
- export { CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, ChangelogWorkflowsConfig, DbxConfigSections, ProjectType, ToolchainBiomeConfig, ToolchainChangelogConfig, ToolchainConfigSections, ToolchainLoggerConfig, ToolchainProjectConfig, ToolchainProvidersConfig, ToolchainTemplateKind, ToolchainTemplateSource, ToolchainTemplateSourceType, ToolchainTemplatesConfig, ToolchainTsconfigConfig, ToolchainViteConfig, ToolchainWatchConfig, WorkflowConfig, WorkflowSetting, WorkflowStep, WorkflowStepsConfig, biomeConfigSchema, changelogConfigSchema, changelogWorkflowsConfigSchema, dbxConfigSchema, loggerConfigSchema, projectConfigSchema, projectTypeSchema, providersConfigSchema, templateKindSchema, templateSourceSchema, templateSourceTypeSchema, templatesConfigSchema, toolchainConfigSchema, tsconfigConfigSchema, viteConfigSchema, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema };
160
+ export { CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, ChangelogVersioning, ChangelogVersioningConfig, ChangelogVersioningTarget, ChangelogWorkflowsConfig, DbxConfigSections, ProjectType, ToolchainBiomeConfig, ToolchainChangelogConfig, ToolchainConfigSections, ToolchainLoggerConfig, ToolchainProjectConfig, ToolchainProvidersConfig, ToolchainTemplateKind, ToolchainTemplateSource, ToolchainTemplateSourceType, ToolchainTemplatesConfig, ToolchainTsconfigConfig, ToolchainViteConfig, ToolchainWatchConfig, WorkflowConfig, WorkflowSetting, WorkflowStep, WorkflowStepsConfig, biomeConfigSchema, changelogConfigSchema, changelogVersioningConfigSchema, changelogVersioningSchema, changelogVersioningTargetSchema, changelogWorkflowsConfigSchema, dbxConfigSchema, loggerConfigSchema, projectConfigSchema, projectTypeSchema, providersConfigSchema, templateKindSchema, templateSourceSchema, templateSourceTypeSchema, templatesConfigSchema, toolchainConfigSchema, tsconfigConfigSchema, viteConfigSchema, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema };
@@ -1 +1 @@
1
- import"node:path";import"node:url";import.meta.url;import{CONFIG_SECTION_DESCRIPTIONS as e,CONFIG_SECTION_SCHEMAS as t,CONFIG_TYPE_SCHEMAS as n,biomeConfigSchema as r,changelogConfigSchema as i,changelogWorkflowsConfigSchema as a,dbxConfigSchema as o,loggerConfigSchema as s,projectConfigSchema as c,projectTypeSchema as l,providersConfigSchema as u,templateKindSchema as d,templateSourceSchema as f,templateSourceTypeSchema as p,templatesConfigSchema as m,toolchainConfigSchema as h,tsconfigConfigSchema as g,viteConfigSchema as _,watchConfigSchema as v,workflowConfigSchema as y,workflowSettingSchema as b,workflowStepSchema as x,workflowStepsConfigSchema as S}from"./config-schema.js";function C(e){return e}function w(e){return e===void 0?!1:typeof e==`boolean`?e:e.enabled!==!1}function T(e){return e!==void 0&&typeof e==`object`?e:void 0}const E=[`dbx.config.ts`,`dbx.config.mts`,`dbx.config.js`,`dbx.config.mjs`,`dbx.config.cjs`,`dbx.config.json`];function D(e){if(!e)return;let t=e.match(/github\.com[/:]([^/]+)\/([^/.]+?)(?:\.git)?$/);return t?.[1]&&t[2]?`${t[1]}/${t[2]}`:void 0}function O(e={}){let t=e.project??{},n=T(e.changelog)??{};return{name:t.name??`app`,scope:t.scope??``,author:t.author??``,license:t.license??`MIT`,homepage:t.homepage??``,repo:t.repo??``,repoSlug:D(t.repo)??``,description:t.description??``,nodeVersion:t.nodeVersion??`22`,packageManager:t.packageManager??`yarn`,yarnVersion:t.packageManagerVersion??`4.17.1`,packageManagerVersion:t.packageManagerVersion??`4.17.1`,mainBranch:n.branches?.main??`main`,devBranch:n.branches?.dev??`dev`}}export{E as CONFIG_FILE_NAMES,e as CONFIG_SECTION_DESCRIPTIONS,t as CONFIG_SECTION_SCHEMAS,n as CONFIG_TYPE_SCHEMAS,r as biomeConfigSchema,i as changelogConfigSchema,a as changelogWorkflowsConfigSchema,o as dbxConfigSchema,C as defineConfig,s as loggerConfigSchema,c as projectConfigSchema,l as projectTypeSchema,u as providersConfigSchema,D as repoSlugFromUrl,O as resolveTokens,T as sectionConfig,w as sectionEnabled,d as templateKindSchema,f as templateSourceSchema,p as templateSourceTypeSchema,m as templatesConfigSchema,h as toolchainConfigSchema,g as tsconfigConfigSchema,_ as viteConfigSchema,v as watchConfigSchema,y as workflowConfigSchema,b as workflowSettingSchema,x as workflowStepSchema,S as workflowStepsConfigSchema};
1
+ import"node:path";import"node:url";import.meta.url;import{CONFIG_SECTION_DESCRIPTIONS as e,CONFIG_SECTION_SCHEMAS as t,CONFIG_TYPE_SCHEMAS as n,biomeConfigSchema as r,changelogConfigSchema as i,changelogVersioningConfigSchema as a,changelogVersioningSchema as o,changelogVersioningTargetSchema as s,changelogWorkflowsConfigSchema as c,dbxConfigSchema as l,loggerConfigSchema as u,projectConfigSchema as d,projectTypeSchema as f,providersConfigSchema as p,templateKindSchema as m,templateSourceSchema as h,templateSourceTypeSchema as g,templatesConfigSchema as _,toolchainConfigSchema as v,tsconfigConfigSchema as y,viteConfigSchema as b,watchConfigSchema as x,workflowConfigSchema as S,workflowSettingSchema as C,workflowStepSchema as w,workflowStepsConfigSchema as T}from"./config-schema.js";function E(e){return e}function D(e){return e===void 0?!1:typeof e==`boolean`?e:e.enabled!==!1}function O(e){return e!==void 0&&typeof e==`object`?e:void 0}const k=[`dbx.config.ts`,`dbx.config.mts`,`dbx.config.js`,`dbx.config.mjs`,`dbx.config.cjs`,`dbx.config.json`];function A(e){if(!e)return;let t=e.match(/github\.com[/:]([^/]+)\/([^/.]+?)(?:\.git)?$/);return t?.[1]&&t[2]?`${t[1]}/${t[2]}`:void 0}function j(e={}){let t=e.project??{},n=O(e.changelog)??{};return{name:t.name??`app`,scope:t.scope??``,author:t.author??``,license:t.license??`MIT`,homepage:t.homepage??``,repo:t.repo??``,repoSlug:A(t.repo)??``,description:t.description??``,nodeVersion:t.nodeVersion??`22`,packageManager:t.packageManager??`yarn`,yarnVersion:t.packageManagerVersion??`4.17.1`,packageManagerVersion:t.packageManagerVersion??`4.17.1`,mainBranch:n.branches?.main??`main`,devBranch:n.branches?.dev??`dev`}}export{k as CONFIG_FILE_NAMES,e as CONFIG_SECTION_DESCRIPTIONS,t as CONFIG_SECTION_SCHEMAS,n as CONFIG_TYPE_SCHEMAS,r as biomeConfigSchema,i as changelogConfigSchema,a as changelogVersioningConfigSchema,o as changelogVersioningSchema,s as changelogVersioningTargetSchema,c as changelogWorkflowsConfigSchema,l as dbxConfigSchema,E as defineConfig,u as loggerConfigSchema,d as projectConfigSchema,f as projectTypeSchema,p as providersConfigSchema,A as repoSlugFromUrl,j as resolveTokens,O as sectionConfig,D as sectionEnabled,m as templateKindSchema,h as templateSourceSchema,g as templateSourceTypeSchema,_ as templatesConfigSchema,v as toolchainConfigSchema,y as tsconfigConfigSchema,b as viteConfigSchema,x as watchConfigSchema,S as workflowConfigSchema,C as workflowSettingSchema,w as workflowStepSchema,T as workflowStepsConfigSchema};
@@ -2,9 +2,9 @@ import __tsdown_shims_path from 'node:path';
2
2
  import __tsdown_shims_url from 'node:url';
3
3
  import { VP_COMMANDS, VpCommandInfo, VpGroup, resolveVpCommand, viteCommandName } from "./commands.js";
4
4
  import { runGuard, viteCommands } from "./cli/index.js";
5
- import { DBX_TASKS, DbxPluginOptions, DbxSource, ResolvedDbx, dbx, resolveDbx, runDbx } from "./plugin.js";
5
+ import { DBX_TASKS, DBX_TIMEOUT_MS, DbxPluginOptions, DbxSource, ResolvedDbx, dbx, dbxTaskCommand, resolveDbx, runDbx } from "./plugin.js";
6
6
  import { viteProvider } from "./provider.js";
7
7
  import { ResolveViteOptions, resolveVite } from "./resolve.js";
8
8
  import { VITE_CONFIG_SHIM, renderViteConfig, viteConfigObject, viteSyncTask } from "./sync.js";
9
9
  import { ResolvedVp, RunVpOptions, VpResult, VpSource, describeVp, hasVp, resolveVp, runVp, vpVersion, which } from "./vp.js";
10
- export { DBX_TASKS, DbxPluginOptions, DbxSource, ResolveViteOptions, ResolvedDbx, ResolvedVp, RunVpOptions, VITE_CONFIG_SHIM, VP_COMMANDS, VpCommandInfo, VpGroup, VpResult, VpSource, dbx, describeVp, hasVp, renderViteConfig, resolveDbx, resolveVite, resolveVp, resolveVpCommand, runDbx, runGuard, runVp, viteCommandName, viteCommands, viteConfigObject, viteProvider, viteSyncTask, vpVersion, which };
10
+ export { DBX_TASKS, DBX_TIMEOUT_MS, DbxPluginOptions, DbxSource, ResolveViteOptions, ResolvedDbx, ResolvedVp, RunVpOptions, VITE_CONFIG_SHIM, VP_COMMANDS, VpCommandInfo, VpGroup, VpResult, VpSource, dbx, dbxTaskCommand, describeVp, hasVp, renderViteConfig, resolveDbx, resolveVite, resolveVp, resolveVpCommand, runDbx, runGuard, runVp, viteCommandName, viteCommands, viteConfigObject, viteProvider, viteSyncTask, vpVersion, which };
@@ -1 +1 @@
1
- import"node:path";import"node:url";import.meta.url;import{VP_COMMANDS as e,resolveVpCommand as t,viteCommandName as n}from"./commands.js";import{describeVp as r,hasVp as i,resolveVp as a,runVp as o,vpVersion as s,which as c}from"./vp.js";import{runGuard as l,viteCommands as u}from"./cli/index.js";import{DBX_TASKS as d,dbx as f,resolveDbx as p,runDbx as m}from"./plugin.js";import{viteProvider as h}from"./provider.js";import{VITE_CONFIG_SHIM as g,renderViteConfig as _,viteConfigObject as v,viteSyncTask as y}from"./sync.js";import{resolveVite as b}from"./resolve.js";export{d as DBX_TASKS,g as VITE_CONFIG_SHIM,e as VP_COMMANDS,f as dbx,r as describeVp,i as hasVp,_ as renderViteConfig,p as resolveDbx,b as resolveVite,a as resolveVp,t as resolveVpCommand,m as runDbx,l as runGuard,o as runVp,n as viteCommandName,u as viteCommands,v as viteConfigObject,h as viteProvider,y as viteSyncTask,s as vpVersion,c as which};
1
+ import"node:path";import"node:url";import.meta.url;import{VP_COMMANDS as e,resolveVpCommand as t,viteCommandName as n}from"./commands.js";import{describeVp as r,hasVp as i,resolveVp as a,runVp as o,vpVersion as s,which as c}from"./vp.js";import{runGuard as l,viteCommands as u}from"./cli/index.js";import{DBX_TASKS as d,DBX_TIMEOUT_MS as f,dbx as p,dbxTaskCommand as m,resolveDbx as h,runDbx as g}from"./plugin.js";import{viteProvider as _}from"./provider.js";import{VITE_CONFIG_SHIM as v,renderViteConfig as y,viteConfigObject as b,viteSyncTask as x}from"./sync.js";import{resolveVite as S}from"./resolve.js";export{d as DBX_TASKS,f as DBX_TIMEOUT_MS,v as VITE_CONFIG_SHIM,e as VP_COMMANDS,p as dbx,m as dbxTaskCommand,r as describeVp,i as hasVp,y as renderViteConfig,h as resolveDbx,S as resolveVite,a as resolveVp,t as resolveVpCommand,g as runDbx,l as runGuard,o as runVp,n as viteCommandName,u as viteCommands,b as viteConfigObject,_ as viteProvider,x as viteSyncTask,s as vpVersion,c as which};
@@ -16,20 +16,41 @@ export interface ResolvedDbx {
16
16
  /**
17
17
  * Resolve the `dbx` binary, always preferring the project's own over a global
18
18
  * install: `DBX_BIN` override -> project-local shim -> the repo's own
19
- * `@deltabox/toolchain` bin -> global `PATH` -> `npx --yes @deltabox/toolchain`.
19
+ * `@deltabox/toolchain` bin -> (only for a project that pins nothing) global
20
+ * `PATH` -> `npx` of the pinned version.
21
+ *
20
22
  * A project-local binary is what the project pins, so a stale global `dbx` can
21
- * never be used by accident.
23
+ * never be used by accident: when the project pins the toolchain but has no
24
+ * resolvable local binary, the global install is skipped (with a warning) in
25
+ * favour of `npx @deltabox/toolchain@<pinned>` — a stale global would otherwise
26
+ * write older-format files and silently revert the project's generated ones.
22
27
  */
23
28
  export declare function resolveDbx(cwd?: string): ResolvedDbx;
29
+ /**
30
+ * Default deadline for a one-shot `dbx` call (`sync`/`--check`): a stalled run
31
+ * is killed rather than left hanging. Long-running work streams its own output,
32
+ * so this only bounds the plugin's own sync.
33
+ */
34
+ export declare const DBX_TIMEOUT_MS: number;
24
35
  /** Run `dbx <args>` in `cwd`, streaming output. Resolves with the exit code. */
25
- export declare function runDbx(args: string[], cwd?: string): Promise<number>;
36
+ export declare function runDbx(args: string[], cwd?: string, timeoutMs?: number): Promise<number>;
37
+ /**
38
+ * The shell command Vite Task runs for a `dbx` subcommand. Vite Task runs the
39
+ * `command` string through a shell, so instead of relying on `dbx` being on
40
+ * `PATH` (an env-dependent lookup that can miss or pick a stale global) the
41
+ * command is built from {@link resolveDbx} — the project's own binary, or the
42
+ * pinned `npx` fallback — resolved when the config loads. `resolveDbx` warns
43
+ * when it has to fall back, so a missing environment is visible rather than
44
+ * silent.
45
+ */
46
+ export declare function dbxTaskCommand(subcommand: string, cwd?: string): string;
26
47
  /** The Vite+ tasks the wrapper registers, keyed by task name. */
27
48
  export declare const DBX_TASKS: {
28
49
  readonly 'dbx:sync': {
29
- readonly command: 'dbx sync';
50
+ readonly command: string;
30
51
  };
31
52
  readonly 'dbx:check': {
32
- readonly command: 'dbx sync --check';
53
+ readonly command: string;
33
54
  };
34
55
  };
35
56
  export interface DbxPluginOptions {
@@ -1 +1 @@
1
- import{default as e}from"node:path";import"node:url";import.meta.url;import{findOwnCliEntry as t}from"../../shared/src/bin.js";import{spawnCross as n}from"../../shared/src/run.js";import"../../shared/src/index.js";import{which as r}from"./vp.js";import i from"node:fs";const a=process.platform===`win32`;function o(t){let n=e.join(t,`node_modules`,`.bin`,`dbx`);return a?[`${n}.cmd`,`${n}.exe`,`${n}.ps1`,n]:[n]}function s(e=process.cwd()){let n=process.env.DBX_BIN;if(n)return{exe:n,args:[],source:`local`};for(let t of o(e))if(i.existsSync(t))return{exe:t,args:[],source:`local`};let s=t(e);if(s)return{exe:process.execPath,args:[s],source:`local`};let c=r(`dbx`);return c?{exe:c,args:[],source:`global`}:{exe:a?`npx.cmd`:`npx`,args:[`--yes`,`@deltabox/toolchain`],source:`npx`}}function c(e,t=process.cwd()){let r=s(t);return new Promise(i=>{let a=n(r.exe,[...r.args,...e],{cwd:t,env:process.env,stdio:`inherit`});a.on(`error`,()=>i(1)),a.on(`exit`,e=>i(e??0))})}const l={"dbx:sync":{command:`dbx sync`},"dbx:check":{command:`dbx sync --check`}},u=[/dbx\.config\.[cm]?[jt]s$/,/tsconfig\.(?:default|monorepo)\.json$/];function d(e={}){let t=e.check??!!process.env.CI,n=e.sync??!0,r=e.watch??!0,i=e.debounce??150,a=e.cwd??process.cwd(),o,s=!1,l=async()=>{if(!s){s=!0;try{await c([`sync`],a)}finally{s=!1}}},d=()=>{o&&clearTimeout(o),o=setTimeout(()=>{l()},i)};return{name:`deltabox-toolchain`,enforce:`pre`,configResolved(t){a=e.cwd??t.root},async buildStart(){t?await c([`sync`,`--check`],a)!==0&&this.error("deltabox-toolchain: generated files are out of date — run `dbx sync`."):n&&await l()},watchChange(e){r&&n&&u.some(t=>t.test(e))&&d()}}}export{l as DBX_TASKS,d as dbx,s as resolveDbx,c as runDbx};
1
+ import{default as e}from"node:path";import"node:url";import.meta.url;import{TOOLCHAIN_PACKAGE as t,findOwnCliEntry as n,localToolchainVersion as r}from"../../shared/src/bin.js";import{logger as i}from"../../shared/src/logger.js";import{spawnCross as a}from"../../shared/src/run.js";import"../../shared/src/index.js";import{which as o}from"./vp.js";import s from"node:fs";const c=process.platform===`win32`;let l=!1,u=!1;function d(t){let n=e.join(t,`node_modules`,`.bin`,`dbx`);return c?[`${n}.cmd`,`${n}.exe`,`${n}.ps1`,n]:[n]}function f(e=process.cwd()){let a=process.env.DBX_BIN;if(a){if(s.existsSync(a))return{exe:a,args:[],source:`local`};u||(u=!0,i.warn(`DBX_BIN points at ${a}, which does not exist; ignoring it.`))}for(let t of d(e))if(s.existsSync(t))return{exe:t,args:[],source:`local`};let f=n(e);if(f)return{exe:process.execPath,args:[f],source:`local`};let p=r(e),m=o(`dbx`);if(m){if(p===void 0)return{exe:m,args:[],source:`global`};i.warn(`ignoring the global \`dbx\` at ${m} — this project pins ${t}@${p}.`)}let h=p?`${t}@${p}`:t;return l||(l=!0,i.warn(`no project-local ${t} found — running \`npx --yes ${h}\` (needs network).`)),{exe:c?`npx.cmd`:`npx`,args:[`--yes`,h],source:`npx`}}const p=3e5;function m(e,t=process.cwd(),n=p){let r=f(t);return new Promise(i=>{let o=a(r.exe,[...r.args,...e],{cwd:t,env:process.env,stdio:`inherit`,...n>0?{timeoutMs:n}:{}});o.on(`error`,()=>i(1)),o.on(`exit`,e=>i(e??0))})}function h(e){return/[\s"'&|<>^()]/.test(e)?`"${e.replace(/"/g,`\\"`)}"`:e}function g(e,t=process.cwd()){let n=f(t);return[...[n.exe,...n.args].map(h),e].join(` `)}const _={"dbx:sync":{command:g(`sync`)},"dbx:check":{command:g(`sync --check`)}},v=[/dbx\.config\.[cm]?[jt]s$/,/tsconfig\.(?:default|monorepo)\.json$/];function y(e={}){let t=e.check??!!process.env.CI,n=e.sync??!0,r=e.watch??!0,i=e.debounce??150,a=e.cwd??process.cwd(),o,s=!1,c=async()=>{if(!s){s=!0;try{await m([`sync`],a)}finally{s=!1}}},l=()=>{o&&clearTimeout(o),o=setTimeout(()=>{c()},i)};return{name:`deltabox-toolchain`,enforce:`pre`,configResolved(t){a=e.cwd??t.root},async buildStart(){t?await m([`sync`,`--check`],a)!==0&&this.error("deltabox-toolchain: generated files are out of date — run `dbx sync`."):n&&await c()},watchChange(e){r&&n&&v.some(t=>t.test(e))&&l()}}}export{_ as DBX_TASKS,p as DBX_TIMEOUT_MS,y as dbx,g as dbxTaskCommand,f as resolveDbx,m as runDbx};
@@ -44,6 +44,11 @@ export interface RunVpOptions {
44
44
  * `undefined` leaves detection to the child.
45
45
  */
46
46
  color?: boolean;
47
+ /**
48
+ * Kill `vp` (and its tree) after this many ms. Omit for long-running
49
+ * commands (`vp dev`); set it for one-shot ones so a hang can't linger.
50
+ */
51
+ timeoutMs?: number;
47
52
  }
48
53
  export interface VpResult {
49
54
  code: number;
@@ -1 +1 @@
1
- import{default as e}from"node:path";import"node:url";import.meta.url;import{spawnCross as t}from"../../shared/src/run.js";import"../../shared/src/index.js";import n from"node:fs";const r=process.platform===`win32`;function i(t){let n=e.join(t,`node_modules`,`.bin`,`vp`);return r?[`${n}.cmd`,`${n}.exe`,`${n}.ps1`,n]:[n]}function a(t){let i=r?(process.env.PATHEXT??`.COM;.EXE;.BAT;.CMD`).split(`;`).filter(Boolean):[``],a=(process.env.PATH??``).split(e.delimiter).filter(Boolean);for(let r of a)for(let a of i){let i=e.join(r,`${t}${a.toLowerCase()}`);try{return n.accessSync(i,n.constants.X_OK),i}catch{}}}function o(e=process.cwd()){for(let t of i(e))if(n.existsSync(t))return{exe:t,args:[],source:`local`};let t=a(`vp`);return t?{exe:t,args:[],source:`global`}:{exe:r?`npx.cmd`:`npx`,args:[`--yes`,`vite-plus`],source:`npx`}}function s(e=process.cwd()){return o(e).source!==`npx`}function c(e,n={}){let r=n.cwd??process.cwd(),i=o(r),a=n.mode===`capture`,s={...process.env,...n.env};return n.color===!1&&(s.NO_COLOR=`1`,s.FORCE_COLOR=`0`),new Promise(n=>{let o=``,c=``,l=t(i.exe,[...i.args,...e],{cwd:r,env:s,stdio:a?`pipe`:`inherit`});l.stdout?.on(`data`,e=>{o+=e}),l.stderr?.on(`data`,e=>{c+=e}),l.on(`error`,e=>{n({code:1,stdout:o,stderr:`${c}${String(e)}`,resolved:i})}),l.on(`exit`,e=>{n({code:e??0,stdout:o,stderr:c,resolved:i})})})}async function l(e=process.cwd()){let t=await c([`--version`],{cwd:e,mode:`capture`});if(t.code===0)return t.stdout.trim()||t.stderr.trim()||void 0}function u(e=process.cwd()){let t=o(e);return t.source===`local`?`local (node_modules/.bin/vp)`:t.source===`global`?`global (PATH)`:`npx --yes vite-plus`}export{u as describeVp,s as hasVp,o as resolveVp,c as runVp,l as vpVersion,a as which};
1
+ import{default as e}from"node:path";import"node:url";import.meta.url;import{logger as t}from"../../shared/src/logger.js";import{spawnCross as n}from"../../shared/src/run.js";import"../../shared/src/index.js";import r from"node:fs";const i=process.platform===`win32`;function a(t){let n=e.join(t,`node_modules`,`.bin`,`vp`);return i?[`${n}.cmd`,`${n}.exe`,`${n}.ps1`,n]:[n]}let o=!1;function s(n){let a=i?(process.env.PATHEXT??`.COM;.EXE;.BAT;.CMD`).split(`;`).filter(Boolean):[``],s=(process.env.PATH??``).split(e.delimiter).filter(Boolean);s.length===0&&!o&&(o=!0,t.warn(`PATH is empty — cannot look up binaries on PATH; falling back.`));for(let t of s)for(let i of a){let a=e.join(t,`${n}${i.toLowerCase()}`);try{return r.accessSync(a,r.constants.X_OK),a}catch{}}}function c(e=process.cwd()){for(let t of a(e))if(r.existsSync(t))return{exe:t,args:[],source:`local`};let t=s(`vp`);return t?{exe:t,args:[],source:`global`}:{exe:i?`npx.cmd`:`npx`,args:[`--yes`,`vite-plus`],source:`npx`}}function l(e=process.cwd()){return c(e).source!==`npx`}function u(e,t={}){let r=t.cwd??process.cwd(),i=c(r),a=t.mode===`capture`,o={...process.env,...t.env};return t.color===!1&&(o.NO_COLOR=`1`,o.FORCE_COLOR=`0`),new Promise(s=>{let c=``,l=``,u=n(i.exe,[...i.args,...e],{cwd:r,env:o,stdio:a?`pipe`:`inherit`,...t.timeoutMs===void 0?{}:{timeoutMs:t.timeoutMs}});u.stdout?.on(`data`,e=>{c+=e}),u.stderr?.on(`data`,e=>{l+=e}),u.on(`error`,e=>{s({code:1,stdout:c,stderr:`${l}${String(e)}`,resolved:i})}),u.on(`exit`,e=>{s({code:e??0,stdout:c,stderr:l,resolved:i})})})}async function d(e=process.cwd()){let t=await u([`--version`],{cwd:e,mode:`capture`});if(t.code===0)return t.stdout.trim()||t.stderr.trim()||void 0}function f(e=process.cwd()){let t=c(e);return t.source===`local`?`local (node_modules/.bin/vp)`:t.source===`global`?`global (PATH)`:`npx --yes vite-plus`}export{f as describeVp,l as hasVp,c as resolveVp,u as runVp,d as vpVersion,s as which};
package/dist/shared.d.ts CHANGED
@@ -1,17 +1,17 @@
1
1
  import __tsdown_shims_path from 'node:path';
2
2
  import __tsdown_shims_url from 'node:url';
3
- import { TOOLCHAIN_PACKAGE, findOwnCliEntry } from "./packages/shared/src/bin.js";
3
+ import { TOOLCHAIN_PACKAGE, findOwnCliEntry, localToolchainVersion } from "./packages/shared/src/bin.js";
4
4
  import { mergeJsonAt, readJsonAt, readJsonFile, toJson, writeJsonFile } from "./packages/shared/src/fs-utils.js";
5
5
  import { Colors, LOG_LEVELS, LogChannel, LogLevel, Logger, LoggerConfig, LoggerOptions, configureLogger, createLogger, getLogOverrides, getLogger, isLogLevel, logger, normalizeLogLevel, setLogConfig, setLogOverrides, stripAnsi } from "./packages/shared/src/logger.js";
6
6
  import { Sortable, deepMerge, isPlainObject, mapValues, resolveSort, sort } from "./packages/shared/src/object-utils.js";
7
7
  import { ToolchainProvider, ToolchainProviderAction, ToolchainProviderCommand, providerActions } from "./packages/shared/src/provider.js";
8
- import { RunOptions, run, spawnCross } from "./packages/shared/src/run.js";
8
+ import { RunOptions, SpawnCrossOptions, killProcessTree, run, spawnCross } from "./packages/shared/src/run.js";
9
9
  import { asString, camelCase, camelCaseId, capitalize, constantCase, ensureLeadingSlash, ensureSlashes, ensureTrailingSlash, formatCliFlag, hasText, indent, isLocalhost, kebabCase, pascalCase, removeDoubleSlashes, removeLeadingSlash, removeTrailingSlash, sanitizeSlashes, snakeCase, str, titleCase } from "./packages/shared/src/string-utils.js";
10
10
  import { ReplacementOptions, ReplacementValue, Replacements, Replacer, applyReplacements, applyReplacementsDeep, createReplacer, defineReplacements, extractTokens, hasUnresolvedTokens, tokenPattern } from "./packages/shared/src/template.js";
11
- import { ChangelogWorkflowsConfig, DbxConfigSections, ProjectType, ToolchainBiomeConfig, ToolchainChangelogConfig, ToolchainConfigSections, ToolchainLoggerConfig, ToolchainProjectConfig, ToolchainProvidersConfig, ToolchainTemplateKind, ToolchainTemplateSource, ToolchainTemplateSourceType, ToolchainTemplatesConfig, ToolchainTsconfigConfig, ToolchainViteConfig, ToolchainWatchConfig, WorkflowConfig, WorkflowSetting, WorkflowStep, WorkflowStepsConfig } from "./packages/shared/src/config-types.js";
11
+ import { ChangelogVersioning, ChangelogVersioningConfig, ChangelogVersioningTarget, ChangelogWorkflowsConfig, DbxConfigSections, ProjectType, ToolchainBiomeConfig, ToolchainChangelogConfig, ToolchainConfigSections, ToolchainLoggerConfig, ToolchainProjectConfig, ToolchainProvidersConfig, ToolchainTemplateKind, ToolchainTemplateSource, ToolchainTemplateSourceType, ToolchainTemplatesConfig, ToolchainTsconfigConfig, ToolchainViteConfig, ToolchainWatchConfig, WorkflowConfig, WorkflowSetting, WorkflowStep, WorkflowStepsConfig } from "./packages/shared/src/config-types.js";
12
12
  import { Awaitable, GeneratedFile, JsonValue, PackageJson, ToolchainArgument, ToolchainCommand, ToolchainCommandContext, ToolchainOption } from "./packages/shared/src/types.js";
13
- import { CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, biomeConfigSchema, changelogConfigSchema, changelogWorkflowsConfigSchema, dbxConfigSchema, loggerConfigSchema, projectConfigSchema, projectTypeSchema, providersConfigSchema, templateKindSchema, templateSourceSchema, templateSourceTypeSchema, templatesConfigSchema, toolchainConfigSchema, tsconfigConfigSchema, viteConfigSchema, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema } from "./packages/shared/src/config-schema.js";
13
+ import { CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, biomeConfigSchema, changelogConfigSchema, changelogVersioningConfigSchema, changelogVersioningSchema, changelogVersioningTargetSchema, changelogWorkflowsConfigSchema, dbxConfigSchema, loggerConfigSchema, projectConfigSchema, projectTypeSchema, providersConfigSchema, templateKindSchema, templateSourceSchema, templateSourceTypeSchema, templatesConfigSchema, toolchainConfigSchema, tsconfigConfigSchema, viteConfigSchema, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema } from "./packages/shared/src/config-schema.js";
14
14
  import { CONFIG_FILE_NAMES, DbxConfig, ManagedFile, SyncContext, SyncSummary, SyncTask, ToolchainConfig, ToolchainHooks, ToolchainSection, defineConfig, repoSlugFromUrl, resolveTokens, sectionConfig, sectionEnabled } from "./packages/shared/src/toolchain.js";
15
15
  import { YamlValue, toYaml } from "./packages/shared/src/yaml.js";
16
16
  import "./packages/shared/src/index.js";
17
- export { Awaitable, CONFIG_FILE_NAMES, CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, ChangelogWorkflowsConfig, Colors, DbxConfig, DbxConfigSections, GeneratedFile, JsonValue, LOG_LEVELS, LogChannel, LogLevel, Logger, LoggerConfig, LoggerOptions, ManagedFile, PackageJson, ProjectType, ReplacementOptions, ReplacementValue, Replacements, Replacer, RunOptions, Sortable, SyncContext, SyncSummary, SyncTask, TOOLCHAIN_PACKAGE, ToolchainArgument, ToolchainBiomeConfig, ToolchainChangelogConfig, ToolchainCommand, ToolchainCommandContext, ToolchainConfig, ToolchainConfigSections, ToolchainHooks, ToolchainLoggerConfig, ToolchainOption, ToolchainProjectConfig, ToolchainProvider, ToolchainProviderAction, ToolchainProviderCommand, ToolchainProvidersConfig, ToolchainSection, ToolchainTemplateKind, ToolchainTemplateSource, ToolchainTemplateSourceType, ToolchainTemplatesConfig, ToolchainTsconfigConfig, ToolchainViteConfig, ToolchainWatchConfig, WorkflowConfig, WorkflowSetting, WorkflowStep, WorkflowStepsConfig, type YamlValue, applyReplacements, applyReplacementsDeep, asString, biomeConfigSchema, camelCase, camelCaseId, capitalize, changelogConfigSchema, changelogWorkflowsConfigSchema, configureLogger, constantCase, createLogger, createReplacer, dbxConfigSchema, deepMerge, defineConfig, defineReplacements, ensureLeadingSlash, ensureSlashes, ensureTrailingSlash, extractTokens, findOwnCliEntry, formatCliFlag, getLogOverrides, getLogger, hasText, hasUnresolvedTokens, indent, isLocalhost, isLogLevel, isPlainObject, kebabCase, logger, loggerConfigSchema, mapValues, mergeJsonAt, normalizeLogLevel, pascalCase, projectConfigSchema, projectTypeSchema, providerActions, providersConfigSchema, readJsonAt, readJsonFile, removeDoubleSlashes, removeLeadingSlash, removeTrailingSlash, repoSlugFromUrl, resolveSort, resolveTokens, run, sanitizeSlashes, sectionConfig, sectionEnabled, setLogConfig, setLogOverrides, snakeCase, sort, spawnCross, str, stripAnsi, templateKindSchema, templateSourceSchema, templateSourceTypeSchema, templatesConfigSchema, titleCase, toJson, toYaml, tokenPattern, toolchainConfigSchema, tsconfigConfigSchema, viteConfigSchema, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema, writeJsonFile };
17
+ export { Awaitable, CONFIG_FILE_NAMES, CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, ChangelogVersioning, ChangelogVersioningConfig, ChangelogVersioningTarget, ChangelogWorkflowsConfig, Colors, DbxConfig, DbxConfigSections, GeneratedFile, JsonValue, LOG_LEVELS, LogChannel, LogLevel, Logger, LoggerConfig, LoggerOptions, ManagedFile, PackageJson, ProjectType, ReplacementOptions, ReplacementValue, Replacements, Replacer, RunOptions, Sortable, SpawnCrossOptions, SyncContext, SyncSummary, SyncTask, TOOLCHAIN_PACKAGE, ToolchainArgument, ToolchainBiomeConfig, ToolchainChangelogConfig, ToolchainCommand, ToolchainCommandContext, ToolchainConfig, ToolchainConfigSections, ToolchainHooks, ToolchainLoggerConfig, ToolchainOption, ToolchainProjectConfig, ToolchainProvider, ToolchainProviderAction, ToolchainProviderCommand, ToolchainProvidersConfig, ToolchainSection, ToolchainTemplateKind, ToolchainTemplateSource, ToolchainTemplateSourceType, ToolchainTemplatesConfig, ToolchainTsconfigConfig, ToolchainViteConfig, ToolchainWatchConfig, WorkflowConfig, WorkflowSetting, WorkflowStep, WorkflowStepsConfig, type YamlValue, applyReplacements, applyReplacementsDeep, asString, biomeConfigSchema, camelCase, camelCaseId, capitalize, changelogConfigSchema, changelogVersioningConfigSchema, changelogVersioningSchema, changelogVersioningTargetSchema, changelogWorkflowsConfigSchema, configureLogger, constantCase, createLogger, createReplacer, dbxConfigSchema, deepMerge, defineConfig, defineReplacements, ensureLeadingSlash, ensureSlashes, ensureTrailingSlash, extractTokens, findOwnCliEntry, formatCliFlag, getLogOverrides, getLogger, hasText, hasUnresolvedTokens, indent, isLocalhost, isLogLevel, isPlainObject, kebabCase, killProcessTree, localToolchainVersion, logger, loggerConfigSchema, mapValues, mergeJsonAt, normalizeLogLevel, pascalCase, projectConfigSchema, projectTypeSchema, providerActions, providersConfigSchema, readJsonAt, readJsonFile, removeDoubleSlashes, removeLeadingSlash, removeTrailingSlash, repoSlugFromUrl, resolveSort, resolveTokens, run, sanitizeSlashes, sectionConfig, sectionEnabled, setLogConfig, setLogOverrides, snakeCase, sort, spawnCross, str, stripAnsi, templateKindSchema, templateSourceSchema, templateSourceTypeSchema, templatesConfigSchema, titleCase, toJson, toYaml, tokenPattern, toolchainConfigSchema, tsconfigConfigSchema, viteConfigSchema, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema, writeJsonFile };
package/dist/shared.js CHANGED
@@ -1 +1 @@
1
- import"node:path";import"node:url";import.meta.url;import{TOOLCHAIN_PACKAGE as e,findOwnCliEntry as t}from"./packages/shared/src/bin.js";import{deepMerge as n,isPlainObject as r,mapValues as i,resolveSort as a,sort as o}from"./packages/shared/src/object-utils.js";import{mergeJsonAt as s,readJsonAt as c,readJsonFile as l,toJson as u,writeJsonFile as d}from"./packages/shared/src/fs-utils.js";import{LOG_LEVELS as f,configureLogger as p,createLogger as m,getLogOverrides as h,getLogger as g,isLogLevel as _,logger as v,normalizeLogLevel as y,setLogConfig as b,setLogOverrides as x,stripAnsi as S}from"./packages/shared/src/logger.js";import{providerActions as C}from"./packages/shared/src/provider.js";import{run as w,spawnCross as T}from"./packages/shared/src/run.js";import{asString as E,camelCase as D,camelCaseId as O,capitalize as k,constantCase as A,ensureLeadingSlash as j,ensureSlashes as M,ensureTrailingSlash as N,formatCliFlag as P,hasText as F,indent as I,isLocalhost as L,kebabCase as R,pascalCase as z,removeDoubleSlashes as B,removeLeadingSlash as V,removeTrailingSlash as H,sanitizeSlashes as U,snakeCase as W,str as G,titleCase as K}from"./packages/shared/src/string-utils.js";import{applyReplacements as q,applyReplacementsDeep as J,createReplacer as Y,defineReplacements as X,extractTokens as Z,hasUnresolvedTokens as Q,tokenPattern as $}from"./packages/shared/src/template.js";import{CONFIG_SECTION_DESCRIPTIONS as ee,CONFIG_SECTION_SCHEMAS as te,CONFIG_TYPE_SCHEMAS as ne,biomeConfigSchema as re,changelogConfigSchema as ie,changelogWorkflowsConfigSchema as ae,dbxConfigSchema as oe,loggerConfigSchema as se,projectConfigSchema as ce,projectTypeSchema as le,providersConfigSchema as ue,templateKindSchema as de,templateSourceSchema as fe,templateSourceTypeSchema as pe,templatesConfigSchema as me,toolchainConfigSchema as he,tsconfigConfigSchema as ge,viteConfigSchema as _e,watchConfigSchema as ve,workflowConfigSchema as ye,workflowSettingSchema as be,workflowStepSchema as xe,workflowStepsConfigSchema as Se}from"./packages/shared/src/config-schema.js";import{CONFIG_FILE_NAMES as Ce,defineConfig as we,repoSlugFromUrl as Te,resolveTokens as Ee,sectionConfig as De,sectionEnabled as Oe}from"./packages/shared/src/toolchain.js";import{toYaml as ke}from"./packages/shared/src/yaml.js";import"./packages/shared/src/index.js";export{Ce as CONFIG_FILE_NAMES,ee as CONFIG_SECTION_DESCRIPTIONS,te as CONFIG_SECTION_SCHEMAS,ne as CONFIG_TYPE_SCHEMAS,f as LOG_LEVELS,e as TOOLCHAIN_PACKAGE,q as applyReplacements,J as applyReplacementsDeep,E as asString,re as biomeConfigSchema,D as camelCase,O as camelCaseId,k as capitalize,ie as changelogConfigSchema,ae as changelogWorkflowsConfigSchema,p as configureLogger,A as constantCase,m as createLogger,Y as createReplacer,oe as dbxConfigSchema,n as deepMerge,we as defineConfig,X as defineReplacements,j as ensureLeadingSlash,M as ensureSlashes,N as ensureTrailingSlash,Z as extractTokens,t as findOwnCliEntry,P as formatCliFlag,h as getLogOverrides,g as getLogger,F as hasText,Q as hasUnresolvedTokens,I as indent,L as isLocalhost,_ as isLogLevel,r as isPlainObject,R as kebabCase,v as logger,se as loggerConfigSchema,i as mapValues,s as mergeJsonAt,y as normalizeLogLevel,z as pascalCase,ce as projectConfigSchema,le as projectTypeSchema,C as providerActions,ue as providersConfigSchema,c as readJsonAt,l as readJsonFile,B as removeDoubleSlashes,V as removeLeadingSlash,H as removeTrailingSlash,Te as repoSlugFromUrl,a as resolveSort,Ee as resolveTokens,w as run,U as sanitizeSlashes,De as sectionConfig,Oe as sectionEnabled,b as setLogConfig,x as setLogOverrides,W as snakeCase,o as sort,T as spawnCross,G as str,S as stripAnsi,de as templateKindSchema,fe as templateSourceSchema,pe as templateSourceTypeSchema,me as templatesConfigSchema,K as titleCase,u as toJson,ke as toYaml,$ as tokenPattern,he as toolchainConfigSchema,ge as tsconfigConfigSchema,_e as viteConfigSchema,ve as watchConfigSchema,ye as workflowConfigSchema,be as workflowSettingSchema,xe as workflowStepSchema,Se as workflowStepsConfigSchema,d as writeJsonFile};
1
+ import"node:path";import"node:url";import.meta.url;import{TOOLCHAIN_PACKAGE as e,findOwnCliEntry as t,localToolchainVersion as n}from"./packages/shared/src/bin.js";import{deepMerge as r,isPlainObject as i,mapValues as a,resolveSort as o,sort as s}from"./packages/shared/src/object-utils.js";import{mergeJsonAt as c,readJsonAt as l,readJsonFile as u,toJson as d,writeJsonFile as f}from"./packages/shared/src/fs-utils.js";import{LOG_LEVELS as p,configureLogger as m,createLogger as h,getLogOverrides as g,getLogger as _,isLogLevel as v,logger as y,normalizeLogLevel as b,setLogConfig as x,setLogOverrides as S,stripAnsi as C}from"./packages/shared/src/logger.js";import{providerActions as w}from"./packages/shared/src/provider.js";import{killProcessTree as T,run as E,spawnCross as D}from"./packages/shared/src/run.js";import{asString as O,camelCase as k,camelCaseId as A,capitalize as j,constantCase as M,ensureLeadingSlash as N,ensureSlashes as P,ensureTrailingSlash as F,formatCliFlag as I,hasText as L,indent as R,isLocalhost as z,kebabCase as B,pascalCase as V,removeDoubleSlashes as H,removeLeadingSlash as U,removeTrailingSlash as W,sanitizeSlashes as G,snakeCase as K,str as q,titleCase as J}from"./packages/shared/src/string-utils.js";import{applyReplacements as Y,applyReplacementsDeep as X,createReplacer as Z,defineReplacements as Q,extractTokens as $,hasUnresolvedTokens as ee,tokenPattern as te}from"./packages/shared/src/template.js";import{CONFIG_SECTION_DESCRIPTIONS as ne,CONFIG_SECTION_SCHEMAS as re,CONFIG_TYPE_SCHEMAS as ie,biomeConfigSchema as ae,changelogConfigSchema as oe,changelogVersioningConfigSchema as se,changelogVersioningSchema as ce,changelogVersioningTargetSchema as le,changelogWorkflowsConfigSchema as ue,dbxConfigSchema as de,loggerConfigSchema as fe,projectConfigSchema as pe,projectTypeSchema as me,providersConfigSchema as he,templateKindSchema as ge,templateSourceSchema as _e,templateSourceTypeSchema as ve,templatesConfigSchema as ye,toolchainConfigSchema as be,tsconfigConfigSchema as xe,viteConfigSchema as Se,watchConfigSchema as Ce,workflowConfigSchema as we,workflowSettingSchema as Te,workflowStepSchema as Ee,workflowStepsConfigSchema as De}from"./packages/shared/src/config-schema.js";import{CONFIG_FILE_NAMES as Oe,defineConfig as ke,repoSlugFromUrl as Ae,resolveTokens as je,sectionConfig as Me,sectionEnabled as Ne}from"./packages/shared/src/toolchain.js";import{toYaml as Pe}from"./packages/shared/src/yaml.js";import"./packages/shared/src/index.js";export{Oe as CONFIG_FILE_NAMES,ne as CONFIG_SECTION_DESCRIPTIONS,re as CONFIG_SECTION_SCHEMAS,ie as CONFIG_TYPE_SCHEMAS,p as LOG_LEVELS,e as TOOLCHAIN_PACKAGE,Y as applyReplacements,X as applyReplacementsDeep,O as asString,ae as biomeConfigSchema,k as camelCase,A as camelCaseId,j as capitalize,oe as changelogConfigSchema,se as changelogVersioningConfigSchema,ce as changelogVersioningSchema,le as changelogVersioningTargetSchema,ue as changelogWorkflowsConfigSchema,m as configureLogger,M as constantCase,h as createLogger,Z as createReplacer,de as dbxConfigSchema,r as deepMerge,ke as defineConfig,Q as defineReplacements,N as ensureLeadingSlash,P as ensureSlashes,F as ensureTrailingSlash,$ as extractTokens,t as findOwnCliEntry,I as formatCliFlag,g as getLogOverrides,_ as getLogger,L as hasText,ee as hasUnresolvedTokens,R as indent,z as isLocalhost,v as isLogLevel,i as isPlainObject,B as kebabCase,T as killProcessTree,n as localToolchainVersion,y as logger,fe as loggerConfigSchema,a as mapValues,c as mergeJsonAt,b as normalizeLogLevel,V as pascalCase,pe as projectConfigSchema,me as projectTypeSchema,w as providerActions,he as providersConfigSchema,l as readJsonAt,u as readJsonFile,H as removeDoubleSlashes,U as removeLeadingSlash,W as removeTrailingSlash,Ae as repoSlugFromUrl,o as resolveSort,je as resolveTokens,E as run,G as sanitizeSlashes,Me as sectionConfig,Ne as sectionEnabled,x as setLogConfig,S as setLogOverrides,K as snakeCase,s as sort,D as spawnCross,q as str,C as stripAnsi,ge as templateKindSchema,_e as templateSourceSchema,ve as templateSourceTypeSchema,ye as templatesConfigSchema,J as titleCase,d as toJson,Pe as toYaml,te as tokenPattern,be as toolchainConfigSchema,xe as tsconfigConfigSchema,Se as viteConfigSchema,Ce as watchConfigSchema,we as workflowConfigSchema,Te as workflowSettingSchema,Ee as workflowStepSchema,De as workflowStepsConfigSchema,f as writeJsonFile};
package/dist/vite.d.ts CHANGED
@@ -2,10 +2,10 @@ import __tsdown_shims_path from 'node:path';
2
2
  import __tsdown_shims_url from 'node:url';
3
3
  import { VP_COMMANDS, VpCommandInfo, VpGroup, resolveVpCommand, viteCommandName } from "./packages/vite/src/commands.js";
4
4
  import { runGuard, viteCommands } from "./packages/vite/src/cli/index.js";
5
- import { DBX_TASKS, DbxPluginOptions, DbxSource, ResolvedDbx, dbx, resolveDbx, runDbx } from "./packages/vite/src/plugin.js";
5
+ import { DBX_TASKS, DBX_TIMEOUT_MS, DbxPluginOptions, DbxSource, ResolvedDbx, dbx, dbxTaskCommand, resolveDbx, runDbx } from "./packages/vite/src/plugin.js";
6
6
  import { viteProvider } from "./packages/vite/src/provider.js";
7
7
  import { ResolveViteOptions, resolveVite } from "./packages/vite/src/resolve.js";
8
8
  import { VITE_CONFIG_SHIM, renderViteConfig, viteConfigObject, viteSyncTask } from "./packages/vite/src/sync.js";
9
9
  import { ResolvedVp, RunVpOptions, VpResult, VpSource, describeVp, hasVp, resolveVp, runVp, vpVersion, which } from "./packages/vite/src/vp.js";
10
10
  import "./packages/vite/src/index.js";
11
- export { DBX_TASKS, DbxPluginOptions, DbxSource, ResolveViteOptions, ResolvedDbx, ResolvedVp, RunVpOptions, VITE_CONFIG_SHIM, VP_COMMANDS, VpCommandInfo, VpGroup, VpResult, VpSource, dbx, describeVp, hasVp, renderViteConfig, resolveDbx, resolveVite, resolveVp, resolveVpCommand, runDbx, runGuard, runVp, viteCommandName, viteCommands, viteConfigObject, viteProvider, viteSyncTask, vpVersion, which };
11
+ export { DBX_TASKS, DBX_TIMEOUT_MS, DbxPluginOptions, DbxSource, ResolveViteOptions, ResolvedDbx, ResolvedVp, RunVpOptions, VITE_CONFIG_SHIM, VP_COMMANDS, VpCommandInfo, VpGroup, VpResult, VpSource, dbx, dbxTaskCommand, describeVp, hasVp, renderViteConfig, resolveDbx, resolveVite, resolveVp, resolveVpCommand, runDbx, runGuard, runVp, viteCommandName, viteCommands, viteConfigObject, viteProvider, viteSyncTask, vpVersion, which };
package/dist/vite.js CHANGED
@@ -1 +1 @@
1
- import"node:path";import"node:url";import.meta.url;import{VP_COMMANDS as e,resolveVpCommand as t,viteCommandName as n}from"./packages/vite/src/commands.js";import{describeVp as r,hasVp as i,resolveVp as a,runVp as o,vpVersion as s,which as c}from"./packages/vite/src/vp.js";import{runGuard as l,viteCommands as u}from"./packages/vite/src/cli/index.js";import{DBX_TASKS as d,dbx as f,resolveDbx as p,runDbx as m}from"./packages/vite/src/plugin.js";import{viteProvider as h}from"./packages/vite/src/provider.js";import{VITE_CONFIG_SHIM as g,renderViteConfig as _,viteConfigObject as v,viteSyncTask as y}from"./packages/vite/src/sync.js";import{resolveVite as b}from"./packages/vite/src/resolve.js";import"./packages/vite/src/index.js";export{d as DBX_TASKS,g as VITE_CONFIG_SHIM,e as VP_COMMANDS,f as dbx,r as describeVp,i as hasVp,_ as renderViteConfig,p as resolveDbx,b as resolveVite,a as resolveVp,t as resolveVpCommand,m as runDbx,l as runGuard,o as runVp,n as viteCommandName,u as viteCommands,v as viteConfigObject,h as viteProvider,y as viteSyncTask,s as vpVersion,c as which};
1
+ import"node:path";import"node:url";import.meta.url;import{VP_COMMANDS as e,resolveVpCommand as t,viteCommandName as n}from"./packages/vite/src/commands.js";import{describeVp as r,hasVp as i,resolveVp as a,runVp as o,vpVersion as s,which as c}from"./packages/vite/src/vp.js";import{runGuard as l,viteCommands as u}from"./packages/vite/src/cli/index.js";import{DBX_TASKS as d,DBX_TIMEOUT_MS as f,dbx as p,dbxTaskCommand as m,resolveDbx as h,runDbx as g}from"./packages/vite/src/plugin.js";import{viteProvider as _}from"./packages/vite/src/provider.js";import{VITE_CONFIG_SHIM as v,renderViteConfig as y,viteConfigObject as b,viteSyncTask as x}from"./packages/vite/src/sync.js";import{resolveVite as S}from"./packages/vite/src/resolve.js";import"./packages/vite/src/index.js";export{d as DBX_TASKS,f as DBX_TIMEOUT_MS,v as VITE_CONFIG_SHIM,e as VP_COMMANDS,p as dbx,m as dbxTaskCommand,r as describeVp,i as hasVp,y as renderViteConfig,h as resolveDbx,S as resolveVite,a as resolveVp,t as resolveVpCommand,g as runDbx,l as runGuard,o as runVp,n as viteCommandName,u as viteCommands,b as viteConfigObject,_ as viteProvider,x as viteSyncTask,s as vpVersion,c as which};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deltabox/toolchain",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "All-in-one toolchain: scaffold projects, manage templates, configs, tsconfigs, changelogs and builds.",
5
5
  "homepage": "https://toolchain.deltabox.studio",
6
6
  "author": "Victor Sango <victor@deltabox.studio>",
@@ -76,17 +76,17 @@
76
76
  "devDependencies": {
77
77
  "@commitlint/cli": "^21.2.2",
78
78
  "@commitlint/config-conventional": "^21.2.2",
79
- "@deltabox/toolchain-biome": "1.5.0",
80
- "@deltabox/toolchain-changelog": "1.5.0",
81
- "@deltabox/toolchain-config": "1.5.0",
82
- "@deltabox/toolchain-core": "1.5.0",
83
- "@deltabox/toolchain-migrate": "1.5.0",
84
- "@deltabox/toolchain-project": "1.5.0",
85
- "@deltabox/toolchain-shared": "1.5.0",
86
- "@deltabox/toolchain-template": "1.5.0",
87
- "@deltabox/toolchain-tsconfig": "1.5.0",
88
- "@deltabox/toolchain-tsdown": "1.5.0",
89
- "@deltabox/toolchain-vite": "1.5.0",
79
+ "@deltabox/toolchain-biome": "1.6.0",
80
+ "@deltabox/toolchain-changelog": "1.6.0",
81
+ "@deltabox/toolchain-config": "1.6.0",
82
+ "@deltabox/toolchain-core": "1.6.0",
83
+ "@deltabox/toolchain-migrate": "1.6.0",
84
+ "@deltabox/toolchain-project": "1.6.0",
85
+ "@deltabox/toolchain-shared": "1.6.0",
86
+ "@deltabox/toolchain-template": "1.6.0",
87
+ "@deltabox/toolchain-tsconfig": "1.6.0",
88
+ "@deltabox/toolchain-tsdown": "1.6.0",
89
+ "@deltabox/toolchain-vite": "1.6.0",
90
90
  "@types/node": "^22.10.2",
91
91
  "@typescript/native-preview": "7.0.0-dev.20260707.2",
92
92
  "cross-env": "^10.1.0",