@deltabox/toolchain 1.3.1 → 1.5.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 (109) hide show
  1. package/CHANGELOG.md +89 -4
  2. package/README.md +32 -39
  3. package/dist/changelog.d.ts +2 -2
  4. package/dist/changelog.js +1 -1
  5. package/dist/cli/commands/providers.js +1 -1
  6. package/dist/cli/commands/sync.js +1 -1
  7. package/dist/cli/context.js +1 -1
  8. package/dist/cli/index.d.ts +4 -4
  9. package/dist/cli/index.js +1 -1
  10. package/dist/cli/register.d.ts +3 -3
  11. package/dist/cli/register.js +1 -1
  12. package/dist/config.d.ts +2 -2
  13. package/dist/config.js +1 -1
  14. package/dist/core.d.ts +4 -3
  15. package/dist/core.js +1 -1
  16. package/dist/index.d.ts +10 -8
  17. package/dist/index.js +1 -1
  18. package/dist/migrate.d.ts +3 -2
  19. package/dist/migrate.js +1 -1
  20. package/dist/package.js +1 -1
  21. package/dist/packages/changelog/src/cli/index.d.ts +2 -2
  22. package/dist/packages/changelog/src/index.d.ts +3 -3
  23. package/dist/packages/changelog/src/index.js +1 -1
  24. package/dist/packages/changelog/src/run-workflows.d.ts +2 -2
  25. package/dist/packages/changelog/src/sync.d.ts +13 -5
  26. package/dist/packages/changelog/src/sync.js +1 -1
  27. package/dist/packages/changelog/src/workflows.js +1 -1
  28. package/dist/packages/config/src/cli/index.d.ts +2 -2
  29. package/dist/packages/config/src/generators/index.d.ts +2 -2
  30. package/dist/packages/config/src/generators/index.js +1 -1
  31. package/dist/packages/config/src/generators/types.d.ts +16 -0
  32. package/dist/packages/config/src/generators/types.js +2 -1
  33. package/dist/packages/config/src/index.d.ts +3 -3
  34. package/dist/packages/config/src/index.js +1 -1
  35. package/dist/packages/config/src/schema.d.ts +1 -1
  36. package/dist/packages/config/src/schema.js +1 -1
  37. package/dist/packages/core/src/index.d.ts +5 -4
  38. package/dist/packages/core/src/index.js +1 -1
  39. package/dist/packages/core/src/loader.d.ts +3 -3
  40. package/dist/packages/core/src/loader.js +1 -1
  41. package/dist/packages/core/src/project-type.d.ts +2 -2
  42. package/dist/packages/core/src/provider-registry.d.ts +12 -0
  43. package/dist/packages/core/src/provider-registry.js +1 -0
  44. package/dist/packages/core/src/reset.d.ts +3 -3
  45. package/dist/packages/core/src/reset.js +1 -1
  46. package/dist/packages/core/src/sync.d.ts +2 -2
  47. package/dist/packages/core/src/vscode.d.ts +3 -3
  48. package/dist/packages/migrate/src/biome.d.ts +3 -3
  49. package/dist/packages/migrate/src/biome.js +1 -1
  50. package/dist/packages/migrate/src/cli/index.d.ts +5 -4
  51. package/dist/packages/migrate/src/cli/index.js +1 -1
  52. package/dist/packages/migrate/src/dprint.d.ts +2 -2
  53. package/dist/packages/migrate/src/dprint.js +1 -1
  54. package/dist/packages/migrate/src/eslint.d.ts +2 -2
  55. package/dist/packages/migrate/src/eslint.js +1 -1
  56. package/dist/packages/migrate/src/index.d.ts +3 -2
  57. package/dist/packages/migrate/src/index.js +1 -1
  58. package/dist/packages/migrate/src/prettier.d.ts +2 -2
  59. package/dist/packages/migrate/src/prettier.js +1 -1
  60. package/dist/packages/migrate/src/registry.d.ts +4 -4
  61. package/dist/packages/migrate/src/registry.js +1 -1
  62. package/dist/packages/migrate/src/types.d.ts +4 -4
  63. package/dist/packages/migrate/src/vite.d.ts +52 -0
  64. package/dist/packages/migrate/src/vite.js +5 -0
  65. package/dist/packages/project/src/cli/index.d.ts +2 -2
  66. package/dist/packages/project/src/config.js +1 -1
  67. package/dist/packages/project/src/index.d.ts +3 -3
  68. package/dist/packages/project/src/index.js +1 -1
  69. package/dist/packages/project/src/typescript.d.ts +1 -1
  70. package/dist/packages/project/src/typescript.js +1 -1
  71. package/dist/packages/shared/src/bin.d.ts +21 -0
  72. package/dist/packages/shared/src/bin.js +1 -0
  73. package/dist/packages/shared/src/config-schema.d.ts +30 -57
  74. package/dist/packages/shared/src/config-schema.js +1 -1
  75. package/dist/packages/shared/src/config-types.d.ts +30 -39
  76. package/dist/packages/shared/src/index.d.ts +8 -7
  77. package/dist/packages/shared/src/index.js +1 -1
  78. package/dist/packages/shared/src/logger.d.ts +7 -4
  79. package/dist/packages/shared/src/logger.js +1 -1
  80. package/dist/packages/shared/src/provider.d.ts +6 -6
  81. package/dist/packages/shared/src/toolchain.d.ts +17 -19
  82. package/dist/packages/shared/src/toolchain.js +1 -1
  83. package/dist/packages/shared/src/types.d.ts +9 -9
  84. package/dist/packages/template/src/cli/index.d.ts +2 -2
  85. package/dist/packages/template/src/cli/index.js +1 -1
  86. package/dist/packages/template/src/online.d.ts +3 -3
  87. package/dist/packages/template/src/registry.d.ts +8 -8
  88. package/dist/packages/template/src/types.d.ts +3 -3
  89. package/dist/packages/tsconfig/src/cli/index.d.ts +2 -2
  90. package/dist/packages/tsdown/src/cli/index.d.ts +2 -2
  91. package/dist/packages/vite/src/cli/index.d.ts +2 -2
  92. package/dist/packages/vite/src/index.d.ts +4 -3
  93. package/dist/packages/vite/src/index.js +1 -1
  94. package/dist/packages/vite/src/plugin.d.ts +8 -16
  95. package/dist/packages/vite/src/plugin.js +1 -1
  96. package/dist/packages/vite/src/provider.d.ts +2 -2
  97. package/dist/packages/vite/src/resolve.d.ts +19 -0
  98. package/dist/packages/vite/src/resolve.js +1 -0
  99. package/dist/packages/vite/src/sync.d.ts +10 -14
  100. package/dist/packages/vite/src/sync.js +2 -2
  101. package/dist/project.d.ts +2 -2
  102. package/dist/project.js +1 -1
  103. package/dist/providers.d.ts +8 -4
  104. package/dist/providers.js +1 -1
  105. package/dist/shared.d.ts +7 -6
  106. package/dist/shared.js +1 -1
  107. package/dist/vite.d.ts +4 -3
  108. package/dist/vite.js +1 -1
  109. package/package.json +25 -16
@@ -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:`ToolingProjectConfig`}),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:`ToolingChangelogConfig`}),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:`ToolingBiomeConfig`}),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:`ToolingTsconfigConfig`}),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:`ToolingWatchConfig`}),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: auto).`).optional(),name:e.string().describe("Prefix non-indented lines with `<name>:` (default `dbx`).").optional()}).meta({id:`ToolingLoggerConfig`}),p=e.object({color:e.boolean().describe(`Force provider command colours on/off (default: inherit the logger).`).optional()}).meta({id:`ToolingProvidersConfig`}),m=e.enum([`builtin`,`local`,`npm`,`git`,`vite-plus`]).describe(`How to load the source.`).meta({id:`ToolingTemplateSourceType`}),h=e.enum([`project`,`workspace`,`application`,`folder`,`tooling`,`pipeline`]).describe(`What the template produces.`).meta({id:`ToolingTemplateKind`}),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:`ToolingTemplateSource`}),_=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:`ToolingTemplatesConfig`}),v=e.object({enabled:e.boolean().describe(`Master switch (enabled when the section is defined).`).optional(),config:e.boolean().describe("Write the managed `vite.config.ts` (default true when the section is set).").optional(),defaultTemplate:e.string().describe("`create.defaultTemplate`, eg. `@acme` for `@acme/create`.").optional(),testInclude:e.array(e.string()).describe(`Extra Vitest include globs (default: tests under src + tests).`).optional(),lintIgnore:e.array(e.string()).describe(`Glob patterns Oxlint should ignore.`).optional(),overrides:e.record(e.string(),e.unknown()).describe("Deep-merged over the generated `vite.config.ts` object.").optional()}).meta({id:`ToolingViteConfig`});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:`ToolingConfigSections`}),x=e.object({toolchain:b.optional()}).meta({id:`DbxConfigSections`}),S={ProjectType:t,ToolingProjectConfig:n,WorkflowStep:r,WorkflowStepsConfig:i,WorkflowConfig:a,WorkflowSetting:o,ChangelogWorkflowsConfig:s,ToolingChangelogConfig:c,ToolingBiomeConfig:l,ToolingTsconfigConfig:u,ToolingWatchConfig:d,ToolingTemplateSourceType:m,ToolingTemplateKind:h,ToolingTemplateSource:g,ToolingTemplatesConfig:_,ToolingViteConfig:v,ToolingLoggerConfig:f,ToolingProvidersConfig:p,ToolingConfigSections: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:"Vite+ configuration (manages `vite.config.ts` + the `vite:*` commands).",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 toolingConfigSchema,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.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,8 +1,9 @@
1
1
  import __tsdown_shims_path from 'node:path';
2
2
  import __tsdown_shims_url from 'node:url';
3
+ import { ViteUserConfig } from "vite-plus";
3
4
  //#region packages/shared/src/config-types.d.ts
4
5
  export type ProjectType = 'monorepo-root' | 'monorepo-workspace' | 'project';
5
- export interface ToolingProjectConfig {
6
+ export interface ToolchainProjectConfig {
6
7
  type?: ProjectType;
7
8
  /** The unscoped project name. */
8
9
  name?: string;
@@ -70,7 +71,7 @@ export interface ChangelogWorkflowsConfig {
70
71
  issues?: WorkflowSetting;
71
72
  sync?: WorkflowSetting;
72
73
  }
73
- export interface ToolingChangelogConfig {
74
+ export interface ToolchainChangelogConfig {
74
75
  /** Master switch (enabled when the section is defined). */
75
76
  enabled?: boolean;
76
77
  workflows?: ChangelogWorkflowsConfig;
@@ -85,7 +86,7 @@ export interface ToolingChangelogConfig {
85
86
  /** Write the Conventional-Commits VS Code settings. */
86
87
  vscode?: boolean;
87
88
  }
88
- export interface ToolingBiomeConfig {
89
+ export interface ToolchainBiomeConfig {
89
90
  /** Master switch (enabled when the section is defined). */
90
91
  enabled?: boolean;
91
92
  /** Write the Biome VS Code settings (default true). */
@@ -93,7 +94,7 @@ export interface ToolingBiomeConfig {
93
94
  /** Deep-merged over the generated `biome.json` (arrays union). */
94
95
  overrides?: Record<string, unknown>;
95
96
  }
96
- export interface ToolingTsconfigConfig {
97
+ export interface ToolchainTsconfigConfig {
97
98
  /** Master switch (enabled when the section is defined). */
98
99
  enabled?: boolean;
99
100
  /** Glob for workspace `tsconfig.default.json` files. */
@@ -111,17 +112,17 @@ export interface ToolingTsconfigConfig {
111
112
  /** The monorepo tsconfig file name (default `tsconfig.monorepo.json`). */
112
113
  rootFile?: string;
113
114
  }
114
- export interface ToolingWatchConfig {
115
+ export interface ToolchainWatchConfig {
115
116
  /** Watch by default (enabled when the section is defined). */
116
117
  enabled?: boolean;
117
118
  /** Debounce window in ms (default 150). */
118
119
  debounce?: number;
119
120
  }
120
- export type ToolingTemplateSourceType = 'builtin' | 'local' | 'npm' | 'git' | 'vite-plus';
121
- export type ToolingTemplateKind = 'project' | 'workspace' | 'application' | 'folder' | 'tooling' | 'pipeline';
122
- export interface ToolingTemplateSource {
121
+ export type ToolchainTemplateSourceType = 'builtin' | 'local' | 'npm' | 'git' | 'vite-plus';
122
+ export type ToolchainTemplateKind = 'project' | 'workspace' | 'application' | 'folder' | 'tooling' | 'pipeline';
123
+ export interface ToolchainTemplateSource {
123
124
  /** @required */
124
- type: ToolingTemplateSourceType;
125
+ type: ToolchainTemplateSourceType;
125
126
  /**
126
127
  * A builtin id, local dir, npm scope, git URL or Vite+ id.
127
128
  *
@@ -134,7 +135,7 @@ export interface ToolingTemplateSource {
134
135
  name?: string;
135
136
  /** Description override. */
136
137
  description?: string;
137
- kind?: ToolingTemplateKind;
138
+ kind?: ToolchainTemplateKind;
138
139
  /** Git branch/tag/commit. */
139
140
  ref?: string;
140
141
  /** Subdirectory within the source that holds the template. */
@@ -144,50 +145,40 @@ export interface ToolingTemplateSource {
144
145
  /** Whether the source needs network access. */
145
146
  online?: boolean;
146
147
  }
147
- export interface ToolingTemplatesConfig {
148
+ export interface ToolchainTemplatesConfig {
148
149
  /** Master switch (enabled when the section is defined). */
149
150
  enabled?: boolean;
150
151
  /** Extra sources on top of the builtin + registry sources. */
151
- sources?: Array<ToolingTemplateSource>;
152
+ sources?: Array<ToolchainTemplateSource>;
152
153
  }
153
- export interface ToolingViteConfig {
154
- /** Master switch (enabled when the section is defined). */
155
- enabled?: boolean;
156
- /** Write the managed `vite.config.ts` (default true when the section is set). */
154
+ export type ToolchainViteConfig = ViteUserConfig & {
155
+ /** Write the managed `vite.config.ts` (default true). */
157
156
  config?: boolean;
158
- /** `create.defaultTemplate`, eg. `@acme` for `@acme/create`. */
159
- defaultTemplate?: string;
160
- /** Extra Vitest include globs (default: tests under src + tests). */
161
- testInclude?: Array<string>;
162
- /** Glob patterns Oxlint should ignore. */
163
- lintIgnore?: Array<string>;
164
- /** Deep-merged over the generated `vite.config.ts` object. */
165
- overrides?: Record<string, unknown>;
166
- }
167
- export interface ToolingLoggerConfig {
157
+ };
158
+ export interface ToolchainLoggerConfig {
168
159
  /** Minimum level to print (default `info`). */
169
160
  level?: 'debug' | 'info' | 'warn' | 'error' | 'silent';
170
- /** Force colours on/off (default: auto). */
161
+ /** Force colours on/off (default: on; `--no-color` disables). */
171
162
  color?: boolean;
172
163
  /** Prefix non-indented lines with `<name>:` (default `dbx`). */
173
164
  name?: string;
174
165
  }
175
- export interface ToolingProvidersConfig {
166
+ export interface ToolchainProvidersConfig {
176
167
  /** Force provider command colours on/off (default: inherit the logger). */
177
168
  color?: boolean;
178
169
  }
179
- export interface ToolingConfigSections {
180
- project?: ToolingProjectConfig;
181
- changelog?: boolean | ToolingChangelogConfig;
182
- biome?: boolean | ToolingBiomeConfig;
183
- tsconfig?: boolean | ToolingTsconfigConfig;
184
- templates?: boolean | ToolingTemplatesConfig;
185
- vite?: boolean | ToolingViteConfig;
186
- watch?: boolean | ToolingWatchConfig;
187
- logger?: boolean | ToolingLoggerConfig;
188
- providers?: boolean | ToolingProvidersConfig;
170
+ export interface ToolchainConfigSections {
171
+ project?: ToolchainProjectConfig;
172
+ changelog?: boolean | ToolchainChangelogConfig;
173
+ biome?: boolean | ToolchainBiomeConfig;
174
+ tsconfig?: boolean | ToolchainTsconfigConfig;
175
+ templates?: boolean | ToolchainTemplatesConfig;
176
+ vite?: boolean | ToolchainViteConfig;
177
+ watch?: boolean | ToolchainWatchConfig;
178
+ logger?: boolean | ToolchainLoggerConfig;
179
+ providers?: boolean | ToolchainProvidersConfig;
189
180
  }
190
181
  export interface DbxConfigSections {
191
- toolchain?: ToolingConfigSections;
182
+ toolchain?: ToolchainConfigSections;
192
183
  }
193
184
  //#endregion
@@ -1,19 +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
4
  import { mergeJsonAt, readJsonAt, readJsonFile, toJson, writeJsonFile } from "./fs-utils.js";
4
5
  import { Colors, LOG_LEVELS, LogChannel, LogLevel, Logger, LoggerConfig, LoggerOptions, configureLogger, createLogger, getLogOverrides, getLogger, isLogLevel, logger, normalizeLogLevel, setLogConfig, setLogOverrides, stripAnsi } from "./logger.js";
5
6
  import { Sortable, deepMerge, isPlainObject, mapValues, resolveSort, sort } from "./object-utils.js";
6
- import { ToolingProvider, ToolingProviderAction, ToolingProviderCommand, providerActions } from "./provider.js";
7
+ import { ToolchainProvider, ToolchainProviderAction, ToolchainProviderCommand, providerActions } from "./provider.js";
7
8
  import { RunOptions, run, spawnCross } from "./run.js";
8
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";
9
10
  import { ReplacementOptions, ReplacementValue, Replacements, Replacer, applyReplacements, applyReplacementsDeep, createReplacer, defineReplacements, extractTokens, hasUnresolvedTokens, tokenPattern } from "./template.js";
10
- import { ChangelogWorkflowsConfig, DbxConfigSections, ProjectType, ToolingBiomeConfig, ToolingChangelogConfig, ToolingConfigSections, ToolingLoggerConfig, ToolingProjectConfig, ToolingProvidersConfig, ToolingTemplateKind, ToolingTemplateSource, ToolingTemplateSourceType, ToolingTemplatesConfig, ToolingTsconfigConfig, ToolingViteConfig, ToolingWatchConfig, WorkflowConfig, WorkflowSetting, WorkflowStep, WorkflowStepsConfig } from "./config-types.js";
11
- import { Awaitable, GeneratedFile, JsonValue, PackageJson, ToolingArgument, ToolingCommand, ToolingCommandContext, ToolingOption } from "./types.js";
12
- import { CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, biomeConfigSchema, changelogConfigSchema, changelogWorkflowsConfigSchema, dbxConfigSchema, loggerConfigSchema, projectConfigSchema, projectTypeSchema, providersConfigSchema, templateKindSchema, templateSourceSchema, templateSourceTypeSchema, templatesConfigSchema, toolingConfigSchema, tsconfigConfigSchema, viteConfigSchema, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema } from "./config-schema.js";
13
- import { CONFIG_FILE_NAMES, DbxConfig, ManagedFile, SyncContext, SyncSummary, SyncTask, ToolingConfig, ToolingHooks, ToolingSection, defineConfig, repoSlugFromUrl, resolveTokens, sectionConfig, sectionEnabled } from "./toolchain.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";
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";
14
+ import { CONFIG_FILE_NAMES, DbxConfig, ManagedFile, SyncContext, SyncSummary, SyncTask, ToolchainConfig, ToolchainHooks, ToolchainSection, defineConfig, repoSlugFromUrl, resolveTokens, sectionConfig, sectionEnabled } from "./toolchain.js";
14
15
  import { YamlValue, toYaml } from "./yaml.js";
15
16
  declare namespace index_d_exports {
16
- 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, ToolingArgument, ToolingBiomeConfig, ToolingChangelogConfig, ToolingCommand, ToolingCommandContext, ToolingConfig, ToolingConfigSections, ToolingHooks, ToolingLoggerConfig, ToolingOption, ToolingProjectConfig, ToolingProvider, ToolingProviderAction, ToolingProviderCommand, ToolingProvidersConfig, ToolingSection, ToolingTemplateKind, ToolingTemplateSource, ToolingTemplateSourceType, ToolingTemplatesConfig, ToolingTsconfigConfig, ToolingViteConfig, ToolingWatchConfig, 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, 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, toolingConfigSchema, tsconfigConfigSchema, viteConfigSchema, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema, writeJsonFile };
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
18
  }
18
19
  //#endregion
19
- 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, ToolingArgument, ToolingBiomeConfig, ToolingChangelogConfig, ToolingCommand, ToolingCommandContext, ToolingConfig, ToolingConfigSections, ToolingHooks, ToolingLoggerConfig, ToolingOption, ToolingProjectConfig, ToolingProvider, ToolingProviderAction, ToolingProviderCommand, ToolingProvidersConfig, ToolingSection, ToolingTemplateKind, ToolingTemplateSource, ToolingTemplateSourceType, ToolingTemplatesConfig, ToolingTsconfigConfig, ToolingViteConfig, ToolingWatchConfig, 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, 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, toolingConfigSchema, tsconfigConfigSchema, viteConfigSchema, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema, writeJsonFile };
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 };
@@ -1 +1 @@
1
- import"node:path";import"node:url";import.meta.url;import{__exportAll as ee}from"../../../_virtual/_rolldown/runtime.js";import{deepMerge as e,isPlainObject as t,mapValues as n,resolveSort as r,sort as i}from"./object-utils.js";import{mergeJsonAt as a,readJsonAt as o,readJsonFile as s,toJson as c,writeJsonFile as l}from"./fs-utils.js";import{LOG_LEVELS as u,configureLogger as d,createLogger as f,getLogOverrides as p,getLogger as m,isLogLevel as h,logger as g,normalizeLogLevel as _,setLogConfig as v,setLogOverrides as y,stripAnsi as b}from"./logger.js";import{providerActions as x}from"./provider.js";import{run as S,spawnCross as C}from"./run.js";import{asString as w,camelCase as T,camelCaseId as E,capitalize as D,constantCase as O,ensureLeadingSlash as k,ensureSlashes as A,ensureTrailingSlash as j,formatCliFlag as M,hasText as N,indent as P,isLocalhost as F,kebabCase as I,pascalCase as L,removeDoubleSlashes as R,removeLeadingSlash as z,removeTrailingSlash as B,sanitizeSlashes as V,snakeCase as H,str as U,titleCase as te}from"./string-utils.js";import{applyReplacements as W,applyReplacementsDeep as G,createReplacer as K,defineReplacements as q,extractTokens as J,hasUnresolvedTokens as Y,tokenPattern as X}from"./template.js";import{CONFIG_SECTION_DESCRIPTIONS as Z,CONFIG_SECTION_SCHEMAS as Q,CONFIG_TYPE_SCHEMAS as $,biomeConfigSchema as ne,changelogConfigSchema as re,changelogWorkflowsConfigSchema as ie,dbxConfigSchema as ae,loggerConfigSchema as oe,projectConfigSchema as se,projectTypeSchema as ce,providersConfigSchema as le,templateKindSchema as ue,templateSourceSchema as de,templateSourceTypeSchema as fe,templatesConfigSchema as pe,toolingConfigSchema as me,tsconfigConfigSchema as he,viteConfigSchema as ge,watchConfigSchema as _e,workflowConfigSchema as ve,workflowSettingSchema as ye,workflowStepSchema as be,workflowStepsConfigSchema as xe}from"./config-schema.js";import{CONFIG_FILE_NAMES as Se,defineConfig as Ce,repoSlugFromUrl as we,resolveTokens as Te,sectionConfig as Ee,sectionEnabled as De}from"./toolchain.js";import{toYaml as Oe}from"./yaml.js";var ke=/* @__PURE__ */ ee({CONFIG_FILE_NAMES:()=>Se,CONFIG_SECTION_DESCRIPTIONS:()=>Z,CONFIG_SECTION_SCHEMAS:()=>Q,CONFIG_TYPE_SCHEMAS:()=>$,LOG_LEVELS:()=>u,applyReplacements:()=>W,applyReplacementsDeep:()=>G,asString:()=>w,biomeConfigSchema:()=>ne,camelCase:()=>T,camelCaseId:()=>E,capitalize:()=>D,changelogConfigSchema:()=>re,changelogWorkflowsConfigSchema:()=>ie,configureLogger:()=>d,constantCase:()=>O,createLogger:()=>f,createReplacer:()=>K,dbxConfigSchema:()=>ae,deepMerge:()=>e,defineConfig:()=>Ce,defineReplacements:()=>q,ensureLeadingSlash:()=>k,ensureSlashes:()=>A,ensureTrailingSlash:()=>j,extractTokens:()=>J,formatCliFlag:()=>M,getLogOverrides:()=>p,getLogger:()=>m,hasText:()=>N,hasUnresolvedTokens:()=>Y,indent:()=>P,isLocalhost:()=>F,isLogLevel:()=>h,isPlainObject:()=>t,kebabCase:()=>I,logger:()=>g,loggerConfigSchema:()=>oe,mapValues:()=>n,mergeJsonAt:()=>a,normalizeLogLevel:()=>_,pascalCase:()=>L,projectConfigSchema:()=>se,projectTypeSchema:()=>ce,providerActions:()=>x,providersConfigSchema:()=>le,readJsonAt:()=>o,readJsonFile:()=>s,removeDoubleSlashes:()=>R,removeLeadingSlash:()=>z,removeTrailingSlash:()=>B,repoSlugFromUrl:()=>we,resolveSort:()=>r,resolveTokens:()=>Te,run:()=>S,sanitizeSlashes:()=>V,sectionConfig:()=>Ee,sectionEnabled:()=>De,setLogConfig:()=>v,setLogOverrides:()=>y,snakeCase:()=>H,sort:()=>i,spawnCross:()=>C,str:()=>U,stripAnsi:()=>b,templateKindSchema:()=>ue,templateSourceSchema:()=>de,templateSourceTypeSchema:()=>fe,templatesConfigSchema:()=>pe,titleCase:()=>te,toJson:()=>c,toYaml:()=>Oe,tokenPattern:()=>X,toolingConfigSchema:()=>me,tsconfigConfigSchema:()=>he,viteConfigSchema:()=>ge,watchConfigSchema:()=>_e,workflowConfigSchema:()=>ve,workflowSettingSchema:()=>ye,workflowStepSchema:()=>be,workflowStepsConfigSchema:()=>xe,writeJsonFile:()=>l});export{Se as CONFIG_FILE_NAMES,Z as CONFIG_SECTION_DESCRIPTIONS,Q as CONFIG_SECTION_SCHEMAS,$ as CONFIG_TYPE_SCHEMAS,u as LOG_LEVELS,W as applyReplacements,G as applyReplacementsDeep,w as asString,ne as biomeConfigSchema,T as camelCase,E as camelCaseId,D as capitalize,re as changelogConfigSchema,ie as changelogWorkflowsConfigSchema,d as configureLogger,O as constantCase,f as createLogger,K as createReplacer,ae as dbxConfigSchema,e as deepMerge,Ce as defineConfig,q as defineReplacements,k as ensureLeadingSlash,A as ensureSlashes,j as ensureTrailingSlash,J as extractTokens,M as formatCliFlag,p as getLogOverrides,m as getLogger,N as hasText,Y as hasUnresolvedTokens,P as indent,F as isLocalhost,h as isLogLevel,t as isPlainObject,I as kebabCase,g as logger,oe as loggerConfigSchema,n as mapValues,a as mergeJsonAt,_ as normalizeLogLevel,L as pascalCase,se as projectConfigSchema,ce as projectTypeSchema,x as providerActions,le as providersConfigSchema,o as readJsonAt,s as readJsonFile,R as removeDoubleSlashes,z as removeLeadingSlash,B as removeTrailingSlash,we as repoSlugFromUrl,r as resolveSort,Te as resolveTokens,S as run,V as sanitizeSlashes,Ee as sectionConfig,De as sectionEnabled,v as setLogConfig,y as setLogOverrides,H as snakeCase,i as sort,C as spawnCross,ke as src_exports,U as str,b as stripAnsi,ue as templateKindSchema,de as templateSourceSchema,fe as templateSourceTypeSchema,pe as templatesConfigSchema,te as titleCase,c as toJson,Oe as toYaml,X as tokenPattern,me as toolingConfigSchema,he as tsconfigConfigSchema,ge as viteConfigSchema,_e as watchConfigSchema,ve as workflowConfigSchema,ye as workflowSettingSchema,be as workflowStepSchema,xe as workflowStepsConfigSchema,l 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}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};
@@ -13,7 +13,10 @@ export declare const LOG_LEVELS: readonly ['debug', 'info', 'warn', 'error', 'si
13
13
  export interface LoggerOptions {
14
14
  /** Minimum level to print (default `info`). */
15
15
  level?: LogLevel;
16
- /** Force colors on/off (default: `picocolors` autodetection). */
16
+ /**
17
+ * Force colors on/off (default: on). The toolchain colors its output by
18
+ * default; `--no-color` or `logger.color: false` turn it off.
19
+ */
17
20
  color?: boolean;
18
21
  /** Prefix non-indented lines with `<name>:` (default `dbx`). */
19
22
  name?: string;
@@ -23,11 +26,11 @@ export interface Logger {
23
26
  readonly level: LogLevel;
24
27
  /** A `picocolors` color set honoring the color setting. */
25
28
  readonly colors: Colors;
26
- /** Machine-readable output: raw to stdout, no prefix, no color. */
29
+ /** Machine-readable output: raw to stdout, no prefix, no decoration. */
27
30
  raw(message?: string): void;
28
- /** Raw output to stderr, no prefix, no color. */
31
+ /** Raw output to stderr, no prefix, no decoration. */
29
32
  rawError(message?: string): void;
30
- /** Write `text` verbatim to a channel (no prefix, no color, no added newline). */
33
+ /** Write `text` verbatim to a channel (no prefix, no decoration, no newline). */
31
34
  write(channel: LogChannel, text: string): void;
32
35
  debug(message?: string): void;
33
36
  info(message?: string): void;
@@ -1 +1 @@
1
- import"node:path";import"node:url";import.meta.url;import e from"picocolors";const t=[`debug`,`info`,`warn`,`error`,`silent`],n={debug:0,info:1,warn:2,error:3,silent:4};function r(e){return typeof e==`string`&&t.includes(e)}function i(e,t=`info`){return r(e)?e:t}function a(e){return e.replace(/\x1b\[[0-9;]*m/g,``)}function o(t={}){let r=i(t.level),a=n[r],o=t.color===void 0?e:e.createColors(t.color),s=t.name?`${t.name}: `:``,c=(e,t)=>{let n=e===``?``:t(e);return!s||e===``||/^\s/.test(e)?n:`${o.dim(s)}${n}`},l=e=>{process.stdout.write(`${e}\n`)},u=e=>{process.stderr.write(`${e}\n`)};return{level:r,colors:o,raw:(e=``)=>l(e),rawError:(e=``)=>u(e),write:(e,t)=>{e===`err`?process.stderr.write(t):process.stdout.write(t)},debug:(e=``)=>{a<=n.debug&&l(c(e,o.dim))},info:(e=``)=>{a<=n.info&&l(c(e,e=>e))},success:(e=``)=>{a<=n.info&&l(c(e,o.green))},warn:(e=``)=>{a<=n.warn&&u(c(e,o.yellow))},error:(e=``)=>{a<=n.error&&u(c(e,o.red))}}}let s={},c={};function l(e){return!e||typeof e!=`object`?{}:{...r(e.level)?{level:e.level}:{},...typeof e.color==`boolean`?{color:e.color}:{},...typeof e.name==`string`?{name:e.name}:{}}}function u(){return o({name:`dbx`,...s,...c})}let d=u();function f(e){s=l(e),d=u()}function p(e){c=e,d=u()}function m(e){p(e)}function h(){return c}function g(){return d}const _={get level(){return d.level},get colors(){return d.colors},raw:(e=``)=>d.raw(e),rawError:(e=``)=>d.rawError(e),write:(e,t)=>d.write(e,t),debug:(e=``)=>d.debug(e),info:(e=``)=>d.info(e),success:(e=``)=>d.success(e),warn:(e=``)=>d.warn(e),error:(e=``)=>d.error(e)};export{t as LOG_LEVELS,m as configureLogger,o as createLogger,h as getLogOverrides,g as getLogger,r as isLogLevel,_ as logger,i as normalizeLogLevel,f as setLogConfig,p as setLogOverrides,a as stripAnsi};
1
+ import"node:path";import"node:url";import.meta.url;import{log as e}from"@clack/prompts";import t from"picocolors";const n=[`debug`,`info`,`warn`,`error`,`silent`],r={debug:0,info:1,warn:2,error:3,silent:4};function i(e){return typeof e==`string`&&n.includes(e)}function a(e,t=`info`){return i(e)?e:t}function o(e){return e.replace(/\x1b\[[0-9;]*m/g,``)}function s(n={}){let i=a(n.level),o=r[i],s=t.createColors(n.color??!0),c=n.name?`${n.name}: `:``;typeof n.color==`boolean`&&d(n.color);let l=e=>!c||e===``||/^\s/.test(e)?e:`${c}${e}`,u=(e,t,n)=>{e(l(t),{spacing:0,...n?{output:n}:{}})};return{level:i,colors:s,raw:(e=``)=>{process.stdout.write(`${e}\n`)},rawError:(e=``)=>{process.stderr.write(`${e}\n`)},write:(e,t)=>{e===`err`?process.stderr.write(t):process.stdout.write(t)},debug:(t=``)=>{o<=r.debug&&u(e.message,t)},info:(t=``)=>{o<=r.info&&u(e.info,t)},success:(t=``)=>{o<=r.info&&u(e.success,t)},warn:(t=``)=>{o<=r.warn&&u(e.warn,t,process.stderr)},error:(t=``)=>{o<=r.error&&u(e.error,t,process.stderr)}}}let c={},l={};function u(e){return!e||typeof e!=`object`?{}:{...i(e.level)?{level:e.level}:{},...typeof e.color==`boolean`?{color:e.color}:{},...typeof e.name==`string`?{name:e.name}:{}}}function d(e){e?(delete process.env.NO_COLOR,process.env.FORCE_COLOR=`1`):(delete process.env.FORCE_COLOR,process.env.NO_COLOR=`1`)}function f(e=!0){let t={name:`dbx`,...c,...l};return e&&t.color===void 0&&(t.color=!0),s(t)}let p=f(!1);function m(e){c=u(e),p=f()}function h(e){l=e,p=f()}function g(e){h(e)}function _(){return l}function v(){return p}const y={get level(){return p.level},get colors(){return p.colors},raw:(e=``)=>p.raw(e),rawError:(e=``)=>p.rawError(e),write:(e,t)=>p.write(e,t),debug:(e=``)=>p.debug(e),info:(e=``)=>p.info(e),success:(e=``)=>p.success(e),warn:(e=``)=>p.warn(e),error:(e=``)=>p.error(e)};export{n as LOG_LEVELS,g as configureLogger,s as createLogger,_ as getLogOverrides,v as getLogger,i as isLogLevel,y as logger,a as normalizeLogLevel,m as setLogConfig,h as setLogOverrides,o as stripAnsi};
@@ -15,7 +15,7 @@ import __tsdown_shims_url from 'node:url';
15
15
  * this description (the extension over `dbx providers --json`).
16
16
  */
17
17
  /** A CLI command a provider contributes (namespaced, eg. `vite:dev`). */
18
- export interface ToolingProviderCommand {
18
+ export interface ToolchainProviderCommand {
19
19
  /** The namespaced `dbx` command name, eg. `vite:dev`. */
20
20
  name: string;
21
21
  /** The wrapped subcommand on the provider binary, eg. `dev`. */
@@ -28,7 +28,7 @@ export interface ToolingProviderCommand {
28
28
  aliases?: string[];
29
29
  }
30
30
  /** A curated action the VS Code extension can surface for a provider. */
31
- export interface ToolingProviderAction {
31
+ export interface ToolchainProviderAction {
32
32
  /** Stable id, unique within the provider. */
33
33
  id: string;
34
34
  /** Menu label. */
@@ -41,7 +41,7 @@ export interface ToolingProviderAction {
41
41
  group?: string;
42
42
  }
43
43
  /** A provider descriptor consumed by the CLI + the VS Code extension. */
44
- export interface ToolingProvider {
44
+ export interface ToolchainProvider {
45
45
  /** Stable id, eg. `vite-plus`. */
46
46
  id: string;
47
47
  /** Display name, eg. `Vite+`. */
@@ -53,14 +53,14 @@ export interface ToolingProvider {
53
53
  /** The external binary the provider wraps, eg. `vp`. */
54
54
  binary?: string;
55
55
  /** The commands the provider contributes to the CLI. */
56
- commands: ToolingProviderCommand[];
56
+ commands: ToolchainProviderCommand[];
57
57
  /** Curated actions for the extension (defaults to one per command). */
58
- actions?: ToolingProviderAction[];
58
+ actions?: ToolchainProviderAction[];
59
59
  }
60
60
  /**
61
61
  * Derive the default actions (one per command) for a provider that does not
62
62
  * declare its own. This keeps a provider descriptor minimal while still giving
63
63
  * the extension something to render.
64
64
  */
65
- export declare function providerActions(provider: ToolingProvider): ToolingProviderAction[];
65
+ export declare function providerActions(provider: ToolchainProvider): ToolchainProviderAction[];
66
66
  //#endregion
@@ -1,11 +1,11 @@
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, ToolingBiomeConfig, ToolingChangelogConfig, ToolingConfigSections, ToolingLoggerConfig, ToolingProjectConfig, ToolingProvidersConfig, ToolingTemplateKind, ToolingTemplateSource, ToolingTemplateSourceType, ToolingTemplatesConfig, ToolingTsconfigConfig, ToolingViteConfig, ToolingWatchConfig, WorkflowConfig, WorkflowSetting, WorkflowStep, WorkflowStepsConfig } from "./config-types.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";
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, toolingConfigSchema, tsconfigConfigSchema, viteConfigSchema, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema } from "./config-schema.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";
7
7
  //#region packages/shared/src/toolchain.d.ts
8
- /** A summary of a sync run, handed to {@link ToolingHooks.afterSync}. */
8
+ /** A summary of a sync run, handed to {@link ToolchainHooks.afterSync}. */
9
9
  export interface SyncSummary {
10
10
  written: string[];
11
11
  changed: string[];
@@ -16,11 +16,11 @@ export interface SyncSummary {
16
16
  * Lifecycle hooks, declared as functions in `dbx.config.ts` (so they only work
17
17
  * from a `.ts`/`.js` config, not JSON). Return values are awaited.
18
18
  */
19
- export interface ToolingHooks {
19
+ export interface ToolchainHooks {
20
20
  /** Runs after the config is loaded + tokens resolved. */
21
21
  afterLoad?: (info: {
22
22
  cwd: string;
23
- config: ToolingConfig;
23
+ config: ToolchainConfig;
24
24
  tokens: Replacements;
25
25
  path?: string;
26
26
  }) => Awaitable<void>;
@@ -40,7 +40,7 @@ export interface ToolingHooks {
40
40
  /** Runs once after the sync tasks with the result summary. */
41
41
  afterSync?: (info: {
42
42
  cwd: string;
43
- config: ToolingConfig;
43
+ config: ToolchainConfig;
44
44
  result: SyncSummary;
45
45
  }) => Awaitable<void>;
46
46
  /** Runs on every watch-triggered change. */
@@ -56,8 +56,8 @@ export interface ToolingHooks {
56
56
  * section to enable it; omit it to leave that area untouched. Within a defined
57
57
  * section, `enabled: false` disables it explicitly.
58
58
  */
59
- export type ToolingConfig = ToolingConfigSections & {
60
- hooks?: ToolingHooks;
59
+ export type ToolchainConfig = ToolchainConfigSections & {
60
+ hooks?: ToolchainHooks;
61
61
  };
62
62
  /**
63
63
  * The root shape of a `dbx.config.*` file. The `@deltabox/toolchain` settings
@@ -65,7 +65,7 @@ export type ToolingConfig = ToolingConfigSections & {
65
65
  * alongside it.
66
66
  */
67
67
  export interface DbxConfig {
68
- toolchain?: ToolingConfig;
68
+ toolchain?: ToolchainConfig;
69
69
  }
70
70
  /**
71
71
  * Identity helper that gives a config file full type-checking + autocomplete.
@@ -76,7 +76,7 @@ export declare function defineConfig(config: DbxConfig): DbxConfig;
76
76
  * A config section that is enabled with `true`, disabled with `false`, or
77
77
  * configured with an options object.
78
78
  */
79
- export type ToolingSection<T> = boolean | T;
79
+ export type ToolchainSection<T> = boolean | T;
80
80
  /**
81
81
  * Whether an optional top-level config section is enabled.
82
82
  *
@@ -86,24 +86,22 @@ export type ToolingSection<T> = boolean | T;
86
86
  * no options, or configure it with an object (`biome: { overrides: { ... } }`).
87
87
  * Either way the tooling never touches an area the consumer did not ask for.
88
88
  */
89
- export declare function sectionEnabled(section: ToolingSection<{
90
- enabled?: boolean;
91
- }> | undefined): boolean;
89
+ export declare function sectionEnabled(section: boolean | object | undefined): boolean;
92
90
  /**
93
91
  * The options object for a section (`undefined` when it is a boolean/absent).
94
92
  * Not every section declares `enabled` (eg. `providers`), so the constraint is
95
93
  * any object rather than `{ enabled?: boolean }`.
96
94
  */
97
- export declare function sectionConfig<T extends object>(section: ToolingSection<T> | undefined): T | undefined;
95
+ export declare function sectionConfig<T extends object>(section: ToolchainSection<T> | undefined): T | undefined;
98
96
  /** The file names a config loader looks for, in priority order. */
99
97
  export declare const CONFIG_FILE_NAMES: readonly ['dbx.config.ts', 'dbx.config.mts', 'dbx.config.js', 'dbx.config.mjs', 'dbx.config.cjs', 'dbx.config.json'];
100
98
  /** Derive the `owner/name` slug from a repository URL. */
101
99
  export declare function repoSlugFromUrl(repo: string | undefined): string | undefined;
102
100
  /**
103
- * Flatten a {@link ToolingConfig} into the `{{ token }}` replacements every
101
+ * Flatten a {@link ToolchainConfig} into the `{{ token }}` replacements every
104
102
  * template understands. Defaults are chosen so a bare config still renders.
105
103
  */
106
- export declare function resolveTokens(config?: ToolingConfig): Replacements;
104
+ export declare function resolveTokens(config?: ToolchainConfig): Replacements;
107
105
  /** A file written by a sync task (its parent directory is created as needed). */
108
106
  export interface ManagedFile {
109
107
  /** Path relative to the project root. */
@@ -123,7 +121,7 @@ export interface SyncContext {
123
121
  /** The detected/configured project kind. */
124
122
  projectType: ProjectType;
125
123
  /** The loaded config. */
126
- config: ToolingConfig;
124
+ config: ToolchainConfig;
127
125
  /** The resolved replacement tokens. */
128
126
  tokens: Replacements;
129
127
  /** Log a line (respects `--quiet`). */
@@ -146,7 +144,7 @@ export interface SyncTask {
146
144
  */
147
145
  keep?: string[];
148
146
  /** Whether the task runs for the given config (default: always). */
149
- enabled?: (config: ToolingConfig) => boolean;
147
+ enabled?: (config: ToolchainConfig) => boolean;
150
148
  /**
151
149
  * The project kinds the task applies to (default: all). A task is skipped
152
150
  * when the resolved project type is not in this list.
@@ -159,4 +157,4 @@ export interface SyncTask {
159
157
  run: (ctx: SyncContext) => Awaitable<ManagedFile[] | void>;
160
158
  }
161
159
  //#endregion
162
- export { CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, ChangelogWorkflowsConfig, DbxConfigSections, ProjectType, ToolingBiomeConfig, ToolingChangelogConfig, ToolingConfigSections, ToolingLoggerConfig, ToolingProjectConfig, ToolingProvidersConfig, ToolingTemplateKind, ToolingTemplateSource, ToolingTemplateSourceType, ToolingTemplatesConfig, ToolingTsconfigConfig, ToolingViteConfig, ToolingWatchConfig, WorkflowConfig, WorkflowSetting, WorkflowStep, WorkflowStepsConfig, biomeConfigSchema, changelogConfigSchema, changelogWorkflowsConfigSchema, dbxConfigSchema, loggerConfigSchema, projectConfigSchema, projectTypeSchema, providersConfigSchema, templateKindSchema, templateSourceSchema, templateSourceTypeSchema, templatesConfigSchema, toolingConfigSchema, tsconfigConfigSchema, viteConfigSchema, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema };
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 };
@@ -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,toolingConfigSchema 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 toolingConfigSchema,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,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};
@@ -2,7 +2,7 @@ import __tsdown_shims_path from 'node:path';
2
2
  import __tsdown_shims_url from 'node:url';
3
3
  import { Replacements } from "./template.js";
4
4
  import { ProjectType } from "./config-types.js";
5
- import { ToolingConfig } from "./toolchain.js";
5
+ import { ToolchainConfig } from "./toolchain.js";
6
6
  //#region packages/shared/src/types.d.ts
7
7
  /** A value that may or may not be awaited. */
8
8
  export type Awaitable<T> = T | Promise<T>;
@@ -16,7 +16,7 @@ export type JsonValue = string | number | boolean | null | JsonValue[] | {
16
16
  [key: string]: JsonValue;
17
17
  };
18
18
  /** A CLI option a tooling command exposes (framework-agnostic). */
19
- export interface ToolingOption {
19
+ export interface ToolchainOption {
20
20
  /** Commander-style flags, eg. `-o, --out <path>`. */
21
21
  flags: string;
22
22
  /** Human-readable description. */
@@ -29,20 +29,20 @@ export interface ToolingOption {
29
29
  * `dbx.config.*` has been loaded, so a command can derive its defaults
30
30
  * from the config; explicit CLI flags override those defaults.
31
31
  */
32
- export interface ToolingCommandContext {
32
+ export interface ToolchainCommandContext {
33
33
  /** The project root the config was loaded from. */
34
34
  cwd: string;
35
35
  /** The detected/configured project kind. */
36
36
  projectType: ProjectType;
37
37
  /** The loaded tooling config (empty object when none was found). */
38
- config: ToolingConfig;
38
+ config: ToolchainConfig;
39
39
  /** The resolved replacement tokens. */
40
40
  tokens: Replacements;
41
41
  /** The config file that was loaded, if any. */
42
42
  configPath?: string;
43
43
  }
44
44
  /** A positional argument a command accepts. */
45
- export interface ToolingArgument {
45
+ export interface ToolchainArgument {
46
46
  /** The argument name (also its key in the run `args` object). */
47
47
  name: string;
48
48
  /** Human-readable description. */
@@ -59,15 +59,15 @@ export interface ToolingArgument {
59
59
  * the flags explicitly passed on the command line (so config defaults apply
60
60
  * otherwise); `context` carries the loaded config.
61
61
  */
62
- export interface ToolingCommand<Args extends Record<string, unknown> = Record<string, unknown>> {
62
+ export interface ToolchainCommand<Args extends Record<string, unknown> = Record<string, unknown>> {
63
63
  /** The command name, eg. `config` or `generate`. */
64
64
  name: string;
65
65
  /** Human-readable description. */
66
66
  description: string;
67
67
  /** Positional arguments the command accepts. */
68
- args?: ToolingArgument[];
68
+ args?: ToolchainArgument[];
69
69
  /** Options the command accepts. */
70
- options?: ToolingOption[];
70
+ options?: ToolchainOption[];
71
71
  /**
72
72
  * Forward every operand (including unknown flags) to the command instead of
73
73
  * parsing them. Used by provider passthrough commands (eg. `vite:dev`), which
@@ -76,7 +76,7 @@ export interface ToolingCommand<Args extends Record<string, unknown> = Record<st
76
76
  */
77
77
  passthrough?: boolean;
78
78
  /** Run the command with the CLI-provided options + the loaded config. */
79
- run: (args: Args, context: ToolingCommandContext) => Awaitable<void>;
79
+ run: (args: Args, context: ToolchainCommandContext) => Awaitable<void>;
80
80
  }
81
81
  /** A package.json-shaped object (loose; only the fields the tooling touches). */
82
82
  export interface PackageJson {
@@ -1,8 +1,8 @@
1
1
  import __tsdown_shims_path from 'node:path';
2
2
  import __tsdown_shims_url from 'node:url';
3
- import { ToolingCommand } from "../../../shared/src/types.js";
3
+ import { ToolchainCommand } from "../../../shared/src/types.js";
4
4
  import "../../../shared/src/index.js";
5
5
  //#region packages/template/src/cli/index.d.ts
6
6
  /** The `template:*` commands plus the template-driven `create`. */
7
- export declare function templateCommands(): ToolingCommand[];
7
+ export declare function templateCommands(): ToolchainCommand[];
8
8
  //#endregion