@deltabox/toolchain 1.11.4 → 2.1.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 (229) hide show
  1. package/CHANGELOG.md +336 -4
  2. package/README.md +21 -14
  3. package/dist/_virtual/_rolldown/runtime.js +1 -1
  4. package/dist/changelog.d.ts +10 -6
  5. package/dist/changelog.js +1 -1
  6. package/dist/cli/commands/index.js +1 -1
  7. package/dist/cli/commands/providers.js +1 -1
  8. package/dist/cli/commands/reset.js +1 -1
  9. package/dist/cli/commands/shared.js +1 -1
  10. package/dist/cli/commands/sync.js +1 -1
  11. package/dist/cli/commands/watch.js +1 -1
  12. package/dist/cli/config-selection.d.ts +23 -0
  13. package/dist/cli/config-selection.js +1 -0
  14. package/dist/cli/context.js +1 -1
  15. package/dist/cli/index.d.ts +5 -3
  16. package/dist/cli/index.js +1 -1
  17. package/dist/cli/register.js +1 -1
  18. package/dist/config.d.ts +8 -8
  19. package/dist/config.js +1 -1
  20. package/dist/core.d.ts +7 -6
  21. package/dist/core.js +1 -1
  22. package/dist/globals.d.ts +31 -0
  23. package/dist/globals.js +1 -0
  24. package/dist/index.d.ts +33 -11
  25. package/dist/index.js +1 -1
  26. package/dist/migrate.d.ts +3 -2
  27. package/dist/migrate.js +1 -1
  28. package/dist/package.js +1 -1
  29. package/dist/packages/biome/src/index.d.ts +2 -1
  30. package/dist/packages/biome/src/index.js +1 -1
  31. package/dist/packages/changelog/src/cli/index.js +1 -1
  32. package/dist/packages/changelog/src/index.d.ts +11 -7
  33. package/dist/packages/changelog/src/index.js +1 -1
  34. package/dist/packages/changelog/src/run-workflows.d.ts +19 -4
  35. package/dist/packages/changelog/src/run-workflows.js +1 -1
  36. package/dist/packages/changelog/src/run.d.ts +4 -3
  37. package/dist/packages/changelog/src/run.js +1 -1
  38. package/dist/packages/changelog/src/sync.d.ts +7 -4
  39. package/dist/packages/changelog/src/sync.js +1 -1
  40. package/dist/packages/changelog/src/utils/args.js +1 -1
  41. package/dist/packages/changelog/src/utils/breaking.d.ts +16 -0
  42. package/dist/packages/changelog/src/utils/breaking.js +1 -0
  43. package/dist/packages/changelog/src/utils/format.d.ts +2 -1
  44. package/dist/packages/changelog/src/utils/format.js +5 -5
  45. package/dist/packages/changelog/src/utils/git.d.ts +3 -1
  46. package/dist/packages/changelog/src/utils/git.js +1 -1
  47. package/dist/packages/changelog/src/utils/reformat.d.ts +4 -1
  48. package/dist/packages/changelog/src/utils/reformat.js +4 -4
  49. package/dist/packages/changelog/src/utils/release-notes.d.ts +18 -0
  50. package/dist/packages/changelog/src/utils/release-notes.js +1 -0
  51. package/dist/packages/changelog/src/utils/summary.d.ts +29 -2
  52. package/dist/packages/changelog/src/utils/summary.js +3 -1
  53. package/dist/packages/changelog/src/utils/types.d.ts +39 -2
  54. package/dist/packages/changelog/src/utils/version.d.ts +1 -0
  55. package/dist/packages/changelog/src/utils/versioning.d.ts +30 -4
  56. package/dist/packages/changelog/src/utils/versioning.js +1 -1
  57. package/dist/packages/changelog/src/utils/write.js +1 -1
  58. package/dist/packages/changelog/src/workflows.d.ts +27 -7
  59. package/dist/packages/changelog/src/workflows.js +5 -5
  60. package/dist/packages/config/src/cli/index.js +1 -1
  61. package/dist/packages/config/src/collect.d.ts +10 -8
  62. package/dist/packages/config/src/collect.js +1 -1
  63. package/dist/packages/config/src/config-json.d.ts +4 -4
  64. package/dist/packages/config/src/config-json.js +1 -1
  65. package/dist/packages/config/src/engine.d.ts +14 -25
  66. package/dist/packages/config/src/engine.js +1 -1
  67. package/dist/packages/config/src/env-file.d.ts +4 -4
  68. package/dist/packages/config/src/env-file.js +2 -2
  69. package/dist/packages/config/src/env.d.ts +4 -6
  70. package/dist/packages/config/src/env.js +1 -1
  71. package/dist/packages/config/src/generators/cli.d.ts +6 -6
  72. package/dist/packages/config/src/generators/cli.js +1 -1
  73. package/dist/packages/config/src/generators/env.d.ts +9 -9
  74. package/dist/packages/config/src/generators/env.js +2 -2
  75. package/dist/packages/config/src/generators/index.d.ts +4 -4
  76. package/dist/packages/config/src/generators/index.js +1 -1
  77. package/dist/packages/config/src/generators/json.d.ts +5 -7
  78. package/dist/packages/config/src/generators/json.js +1 -1
  79. package/dist/packages/config/src/generators/markdown.d.ts +57 -35
  80. package/dist/packages/config/src/generators/markdown.js +18 -19
  81. package/dist/packages/config/src/generators/types.d.ts +28 -23
  82. package/dist/packages/config/src/generators/types.js +3 -3
  83. package/dist/packages/config/src/index.d.ts +9 -9
  84. package/dist/packages/config/src/index.js +1 -1
  85. package/dist/packages/config/src/schema.d.ts +31 -3
  86. package/dist/packages/config/src/schema.js +1 -1
  87. package/dist/packages/config/src/types.d.ts +134 -28
  88. package/dist/packages/core/src/editor-config.d.ts +14 -0
  89. package/dist/packages/core/src/editor-config.js +1 -0
  90. package/dist/packages/core/src/graph.js +1 -1
  91. package/dist/packages/core/src/index.d.ts +8 -7
  92. package/dist/packages/core/src/index.js +1 -1
  93. package/dist/packages/core/src/loader.d.ts +20 -2
  94. package/dist/packages/core/src/loader.js +1 -1
  95. package/dist/packages/core/src/manifest.d.ts +20 -1
  96. package/dist/packages/core/src/manifest.js +1 -1
  97. package/dist/packages/core/src/provider-registry.d.ts +48 -3
  98. package/dist/packages/core/src/provider-registry.js +1 -1
  99. package/dist/packages/core/src/reset.d.ts +15 -0
  100. package/dist/packages/core/src/reset.js +1 -1
  101. package/dist/packages/core/src/sync.d.ts +10 -0
  102. package/dist/packages/core/src/sync.js +1 -1
  103. package/dist/packages/core/src/watch.d.ts +9 -0
  104. package/dist/packages/core/src/watch.js +1 -1
  105. package/dist/packages/migrate/src/cli/index.js +1 -1
  106. package/dist/packages/migrate/src/index.d.ts +3 -2
  107. package/dist/packages/migrate/src/index.js +1 -1
  108. package/dist/packages/migrate/src/oxc.d.ts +13 -0
  109. package/dist/packages/migrate/src/oxc.js +1 -0
  110. package/dist/packages/migrate/src/registry.js +1 -1
  111. package/dist/packages/migrate/src/vite-target.js +1 -1
  112. package/dist/packages/migrate/src/vite.d.ts +25 -3
  113. package/dist/packages/migrate/src/vite.js +7 -2
  114. package/dist/packages/project/src/catalogs.d.ts +7 -0
  115. package/dist/packages/project/src/catalogs.js +1 -1
  116. package/dist/packages/project/src/cli/index.js +1 -1
  117. package/dist/packages/project/src/config.d.ts +6 -0
  118. package/dist/packages/project/src/config.js +1 -1
  119. package/dist/packages/project/src/index.d.ts +5 -4
  120. package/dist/packages/project/src/index.js +1 -1
  121. package/dist/packages/project/src/sync.js +1 -1
  122. package/dist/packages/project/src/typescript.d.ts +64 -12
  123. package/dist/packages/project/src/typescript.js +12 -7
  124. package/dist/packages/shared/src/changelog-breaking.d.ts +31 -0
  125. package/dist/packages/shared/src/changelog-groups.d.ts +59 -0
  126. package/dist/packages/shared/src/config-schema/biome.d.ts +10 -0
  127. package/dist/packages/shared/src/config-schema/biome.js +1 -0
  128. package/dist/packages/shared/src/config-schema/catalogs.d.ts +14 -0
  129. package/dist/packages/shared/src/config-schema/catalogs.js +1 -0
  130. package/dist/packages/shared/src/config-schema/changelog.d.ts +248 -0
  131. package/dist/packages/shared/src/config-schema/changelog.js +1 -0
  132. package/dist/packages/shared/src/config-schema/ci.d.ts +390 -0
  133. package/dist/packages/shared/src/config-schema/ci.js +1 -0
  134. package/dist/packages/shared/src/config-schema/format.d.ts +38 -0
  135. package/dist/packages/shared/src/config-schema/format.js +1 -0
  136. package/dist/packages/shared/src/config-schema/index.d.ts +1654 -0
  137. package/dist/packages/shared/src/config-schema/index.js +1 -0
  138. package/dist/packages/shared/src/config-schema/logger.d.ts +19 -0
  139. package/dist/packages/shared/src/config-schema/logger.js +1 -0
  140. package/dist/packages/shared/src/config-schema/meta.d.ts +16 -0
  141. package/dist/packages/shared/src/config-schema/meta.js +1 -0
  142. package/dist/packages/shared/src/config-schema/project.d.ts +35 -0
  143. package/dist/packages/shared/src/config-schema/project.js +1 -0
  144. package/dist/packages/shared/src/config-schema/providers.d.ts +9 -0
  145. package/dist/packages/shared/src/config-schema/providers.js +1 -0
  146. package/dist/packages/shared/src/config-schema/registry.d.ts +21 -0
  147. package/dist/packages/shared/src/config-schema/registry.js +1 -0
  148. package/dist/packages/shared/src/config-schema/templates.d.ts +81 -0
  149. package/dist/packages/shared/src/config-schema/templates.js +1 -0
  150. package/dist/packages/shared/src/config-schema/tsconfig.d.ts +30 -0
  151. package/dist/packages/shared/src/config-schema/tsconfig.js +1 -0
  152. package/dist/packages/shared/src/config-schema/vite.d.ts +26 -0
  153. package/dist/packages/shared/src/config-schema/vite.js +1 -0
  154. package/dist/packages/shared/src/config-schema/watch.d.ts +11 -0
  155. package/dist/packages/shared/src/config-schema/watch.js +1 -0
  156. package/dist/packages/shared/src/config-schema/workflow.d.ts +590 -0
  157. package/dist/packages/shared/src/config-schema/workflow.js +1 -0
  158. package/dist/packages/shared/src/config-types.d.ts +295 -90
  159. package/dist/packages/shared/src/fs-utils.js +1 -1
  160. package/dist/packages/shared/src/index.d.ts +27 -7
  161. package/dist/packages/shared/src/index.js +1 -1
  162. package/dist/packages/shared/src/logger.d.ts +26 -3
  163. package/dist/packages/shared/src/logger.js +1 -1
  164. package/dist/packages/shared/src/messages.d.ts +36 -0
  165. package/dist/packages/shared/src/messages.js +1 -0
  166. package/dist/packages/shared/src/object-utils.d.ts +5 -0
  167. package/dist/packages/shared/src/object-utils.js +1 -1
  168. package/dist/packages/shared/src/registry-policy.d.ts +17 -0
  169. package/dist/packages/shared/src/registry-policy.js +1 -0
  170. package/dist/packages/shared/src/toolchain.d.ts +90 -11
  171. package/dist/packages/shared/src/toolchain.js +1 -1
  172. package/dist/packages/shared/src/types.d.ts +6 -0
  173. package/dist/packages/shared/src/vite-defaults.d.ts +29 -0
  174. package/dist/packages/shared/src/vite-defaults.js +1 -0
  175. package/dist/packages/template/src/builtin.js +1 -1
  176. package/dist/packages/template/src/cli/index.js +1 -1
  177. package/dist/packages/template/src/global.d.ts +130 -0
  178. package/dist/packages/template/src/global.js +3 -0
  179. package/dist/packages/template/src/index.d.ts +3 -2
  180. package/dist/packages/template/src/index.js +1 -1
  181. package/dist/packages/template/src/online.d.ts +13 -4
  182. package/dist/packages/template/src/online.js +1 -1
  183. package/dist/packages/template/src/registry.d.ts +2 -1
  184. package/dist/packages/template/src/registry.js +1 -1
  185. package/dist/packages/template/src/scaffold.d.ts +5 -1
  186. package/dist/packages/template/src/scaffold.js +1 -1
  187. package/dist/packages/tsconfig/src/cli/generate/index.d.ts +3 -0
  188. package/dist/packages/tsconfig/src/cli/generate/index.js +1 -1
  189. package/dist/packages/tsconfig/src/cli/generate/utils.d.ts +10 -1
  190. package/dist/packages/tsconfig/src/cli/generate/utils.js +1 -1
  191. package/dist/packages/tsconfig/src/cli/index.js +1 -1
  192. package/dist/packages/tsconfig/src/index.d.ts +7 -4
  193. package/dist/packages/tsconfig/src/index.js +1 -1
  194. package/dist/packages/tsconfig/src/overrides.d.ts +74 -0
  195. package/dist/packages/tsconfig/src/overrides.js +1 -0
  196. package/dist/packages/tsconfig/src/resolve.d.ts +62 -0
  197. package/dist/packages/tsconfig/src/resolve.js +3 -0
  198. package/dist/packages/tsconfig/src/snapshots.d.ts +50 -0
  199. package/dist/packages/tsconfig/src/snapshots.js +1 -0
  200. package/dist/packages/tsconfig/src/sync.d.ts +14 -5
  201. package/dist/packages/tsconfig/src/sync.js +1 -1
  202. package/dist/packages/tsconfig/src/templates/tsconfig.default.js +1 -1
  203. package/dist/packages/tsconfig/src/templates.d.ts +12 -4
  204. package/dist/packages/tsconfig/src/templates.js +1 -1
  205. package/dist/packages/vite/src/index.d.ts +2 -2
  206. package/dist/packages/vite/src/index.js +1 -1
  207. package/dist/packages/vite/src/resolve.d.ts +13 -3
  208. package/dist/packages/vite/src/resolve.js +1 -1
  209. package/dist/packages/vite/src/sync.d.ts +46 -5
  210. package/dist/packages/vite/src/sync.js +5 -2
  211. package/dist/project.d.ts +4 -3
  212. package/dist/project.js +1 -1
  213. package/dist/providers.d.ts +11 -4
  214. package/dist/providers.js +1 -1
  215. package/dist/shared.d.ts +26 -6
  216. package/dist/shared.js +1 -1
  217. package/dist/sync.js +1 -1
  218. package/dist/template.d.ts +3 -2
  219. package/dist/template.js +1 -1
  220. package/dist/tooling.d.ts +21 -0
  221. package/dist/tooling.js +1 -0
  222. package/dist/tsconfig.d.ts +6 -3
  223. package/dist/tsconfig.js +1 -1
  224. package/dist/vite.d.ts +2 -2
  225. package/dist/vite.js +1 -1
  226. package/package.json +28 -23
  227. package/dist/packages/config/src/types.js +0 -1
  228. package/dist/packages/shared/src/config-schema.d.ts +0 -3928
  229. package/dist/packages/shared/src/config-schema.js +0 -1
@@ -0,0 +1 @@
1
+ import"node:path";import"node:url";import.meta.url;import{ENABLED_DESCRIPTION as e,section as t,withEnabled as n}from"./meta.js";import{biomeConfigSchema as r}from"./biome.js";import{catalogsConfigSchema as i}from"./catalogs.js";import{customWorkflowSettingsSchema as a,workflowConfigSchema as o,workflowOptionsSchema as s,workflowSettingSchema as c,workflowStepSchema as l,workflowStepsConfigSchema as u}from"./workflow.js";import{changelogBranchesConfigSchema as d,changelogCommitlintConfigSchema as f,changelogConfigSchema as p,changelogVersioningConfigSchema as m,changelogVersioningSchema as h,changelogVersioningTargetSchema as g,changelogWorkflowSettingSchema as _,legacyChangelogConfigSchema as v}from"./changelog.js";import{ciConfigSchema as y}from"./ci.js";import{fmtConfigSchema as b,lintConfigSchema as x,vscodeSettingsSchema as S}from"./format.js";import{loggerConfigSchema as C}from"./logger.js";import{projectConfigSchema as w,projectTypeSchema as T}from"./project.js";import{providersConfigSchema as E}from"./providers.js";import{registryConfigSchema as D,registryPolicySchema as O}from"./registry.js";import{templateKindSchema as k,templateSourceSchema as A,templateSourceTypeSchema as j,templatesConfigSchema as M}from"./templates.js";import{tsconfigConfigSchema as N}from"./tsconfig.js";import{viteConfigSchema as P}from"./vite.js";import{watchConfigSchema as F}from"./watch.js";import{z as I}from"zod";const L=I.object({project:w.describe("Project metadata: canonical `package.json` fields and template tokens (inherited by workspaces).").optional(),ci:t(y).describe(`GitHub Actions workflows to generate (CI, release, issues, changelog, sync).`).optional(),changelog:t(v).describe("Manual changelog pipeline options for `dbx changelog`, the VS Code actions and the API. `ci.changelog` inherits these options.").optional(),fmt:t(b).describe(`Formatter configuration: Oxc/Biome options, editor defaults and tools.`).optional(),lint:t(x).describe(`Linter configuration: Oxc/Biome/ESLint options and editor defaults.`).optional(),biome:t(r).describe("Biome config generation (for consumers that still want a `biome.json`).").optional(),tsconfig:t(N).describe(`Workspace tsconfig generation (path aliases + project references).`).optional(),templates:t(M).describe(`Template sources / scaffolding.`).optional(),registry:t(D).describe(`Allow/deny host and path globs for template/provider registries.`).optional(),catalogs:t(i).describe("Package catalogs written to the package manager catalog file (`catalog:`).").optional(),vite:t(P).describe("The full Vite+ config; `dbx sync` writes the root `vite.config.ts` from it.").optional(),watch:t(F).describe("Watch behaviour for `dbx watch`.").optional(),logger:t(C).describe(`Logging level, colours and prefix for toolchain output.`).optional(),providers:t(E).describe(`Provider command behaviour (eg. colour for the passthrough commands).`).optional()}).meta({id:`ToolchainConfigSections`}),R=I.object({toolchain:L.describe("The `@deltabox/toolchain` settings (every section is opt-in by presence).").optional()}).meta({id:`DbxConfigSections`}),z={project:w,ci:y,changelog:v,fmt:b,lint:x,biome:r,tsconfig:N,templates:M,registry:D,catalogs:i,vite:P,watch:F,logger:C,providers:E};export{e as ENABLED_DESCRIPTION,r as biomeConfigSchema,i as catalogsConfigSchema,d as changelogBranchesConfigSchema,f as changelogCommitlintConfigSchema,p as changelogConfigSchema,m as changelogVersioningConfigSchema,h as changelogVersioningSchema,g as changelogVersioningTargetSchema,_ as changelogWorkflowSettingSchema,y as ciConfigSchema,z as configSchema,a as customWorkflowSettingsSchema,R as dbxConfigSchema,b as fmtConfigSchema,v as legacyChangelogConfigSchema,x as lintConfigSchema,C as loggerConfigSchema,w as projectConfigSchema,T as projectTypeSchema,E as providersConfigSchema,D as registryConfigSchema,O as registryPolicySchema,t as section,k as templateKindSchema,A as templateSourceSchema,j as templateSourceTypeSchema,M as templatesConfigSchema,L as toolchainConfigSchema,N as tsconfigConfigSchema,P as viteConfigSchema,S as vscodeSettingsSchema,F as watchConfigSchema,n as withEnabled,o as workflowConfigSchema,s as workflowOptionsSchema,c as workflowSettingSchema,l as workflowStepSchema,u as workflowStepsConfigSchema};
@@ -0,0 +1,19 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { z } from "zod";
4
+ //#region packages/shared/src/config-schema/logger.d.ts
5
+ /** Logging (level, colour, prefix) for every toolchain message. */
6
+ export declare const loggerConfigSchema: z.ZodObject<{
7
+ level: z.ZodOptional<z.ZodEnum<{
8
+ debug: "debug";
9
+ error: "error";
10
+ info: "info";
11
+ silent: "silent";
12
+ warn: "warn";
13
+ }>>;
14
+ color: z.ZodOptional<z.ZodBoolean>;
15
+ name: z.ZodOptional<z.ZodString>;
16
+ suppress: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
17
+ logger: z.ZodOptional<z.ZodUnknown>;
18
+ }, z.core.$strip>;
19
+ //#endregion
@@ -0,0 +1 @@
1
+ import"node:path";import"node:url";import.meta.url;import{withEnabled as e}from"./meta.js";import{z as t}from"zod";const n=e(t.object({level:t.enum([`debug`,`info`,`warn`,`error`,`silent`]).describe("Minimum level to print (default `info`).").optional(),color:t.boolean().describe("Force colours on/off (default: on; `--no-color` disables).").optional(),name:t.string().describe("Prefix non-indented lines with `<name>:` (default `dbx`).").optional(),suppress:t.union([t.string(),t.array(t.string())]).describe("Warning/error id, message substring, or `/regex/` to silence (single value or array).").optional(),logger:t.unknown().describe("Custom `ToolchainLogger` implementation (TS/JS configs only; JSON cannot carry functions).").optional()})).describe(`Logging level, colours and prefix for toolchain output.`).meta({id:`ToolchainLoggerConfig`});export{n as loggerConfigSchema};
@@ -0,0 +1,16 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { ZodObject, ZodRawShape, ZodType, z } from "zod";
4
+ //#region packages/shared/src/config-schema/meta.d.ts
5
+ /** The default description for the shared `enabled` flag. */
6
+ export declare const ENABLED_DESCRIPTION = "Enable/disable this section (default: enabled when defined).";
7
+ /** A section: enabled/disabled with a boolean, or configured with an object. */
8
+ export declare function section<T extends ZodType>(schema: T): z.ZodUnion<readonly [z.ZodBoolean, T]>;
9
+ /**
10
+ * Add the shared `enabled?: boolean` opt-out to a Zod object schema.
11
+ *
12
+ * Every config section and nested toggle carries the same flag, so define it
13
+ * once here instead of repeating the field (and its description) in each schema.
14
+ */
15
+ export declare function withEnabled<T extends ZodObject<ZodRawShape>>(schema: T, description?: string): T;
16
+ //#endregion
@@ -0,0 +1 @@
1
+ import"node:path";import"node:url";import.meta.url;import{z as e}from"zod";const t=`Enable/disable this section (default: enabled when defined).`;function n(t){return e.union([e.boolean(),t])}function r(n,r=t){return n.extend({enabled:e.boolean().optional().describe(r)})}export{t as ENABLED_DESCRIPTION,n as section,r as withEnabled};
@@ -0,0 +1,35 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { z } from "zod";
4
+ //#region packages/shared/src/config-schema/project.d.ts
5
+ /** The kind of project a `dbx.config.*` lives in. */
6
+ export declare const projectTypeSchema: z.ZodEnum<{
7
+ "monorepo-root": "monorepo-root";
8
+ "monorepo-workspace": "monorepo-workspace";
9
+ project: "project";
10
+ }>;
11
+ /**
12
+ * Project-level metadata: the canonical `package.json` fields (applied on sync,
13
+ * and inherited by workspaces) plus the replacement tokens every template
14
+ * understands. When a field is omitted it falls back to the project's own
15
+ * `package.json` value.
16
+ */
17
+ export declare const projectConfigSchema: z.ZodObject<{
18
+ type: z.ZodOptional<z.ZodEnum<{
19
+ "monorepo-root": "monorepo-root";
20
+ "monorepo-workspace": "monorepo-workspace";
21
+ project: "project";
22
+ }>>;
23
+ name: z.ZodOptional<z.ZodString>;
24
+ scope: z.ZodOptional<z.ZodString>;
25
+ author: z.ZodOptional<z.ZodString>;
26
+ license: z.ZodOptional<z.ZodString>;
27
+ homepage: z.ZodOptional<z.ZodString>;
28
+ repo: z.ZodOptional<z.ZodString>;
29
+ nodeVersion: z.ZodOptional<z.ZodString>;
30
+ packageManager: z.ZodOptional<z.ZodString>;
31
+ packageManagerVersion: z.ZodOptional<z.ZodString>;
32
+ description: z.ZodOptional<z.ZodString>;
33
+ inherit: z.ZodOptional<z.ZodBoolean>;
34
+ }, z.core.$strip>;
35
+ //#endregion
@@ -0,0 +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 (written as `<scope>/<name>`).").optional(),scope:e.string().describe("The npm scope, eg. `@acme`.").optional(),author:e.string().describe("Package author (`package.json` `author`).").optional(),license:e.string().describe("SPDX license id (`package.json` `license`).").optional(),homepage:e.string().describe("Project homepage (`package.json` `homepage`).").optional(),repo:e.string().describe("Repository URL (`package.json` `repository`). For a workspace it also resolves to the workspace path (`repository.directory`).").optional(),nodeVersion:e.string().describe("Node version for CI/templates, eg. `22` (not `package.json` `engines`).").optional(),packageManager:e.string().describe("Package manager name, written as `<name>@<version>` (default `yarn`).").optional(),packageManagerVersion:e.string().describe("Package manager version, eg. `4.17.1`.").optional(),description:e.string().describe("One-line description (`package.json` `description`).").optional(),inherit:e.boolean().describe(`Inherit the parent project metadata (default true). Set false to keep this project metadata independent of the root config (other sections still merge normally).`).optional()}).describe("Project metadata: canonical `package.json` fields and template tokens (shared fields are inherited by workspaces).").meta({id:`ToolchainProjectConfig`});export{n as projectConfigSchema,t as projectTypeSchema};
@@ -0,0 +1,9 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { z } from "zod";
4
+ //#region packages/shared/src/config-schema/providers.d.ts
5
+ /** Provider command behaviour (colour of the provider passthrough commands). */
6
+ export declare const providersConfigSchema: z.ZodObject<{
7
+ color: z.ZodOptional<z.ZodBoolean>;
8
+ }, z.core.$strip>;
9
+ //#endregion
@@ -0,0 +1 @@
1
+ import"node:path";import"node:url";import.meta.url;import{withEnabled as e}from"./meta.js";import{z as t}from"zod";const n=e(t.object({color:t.boolean().describe(`Force provider command colours on/off (default: inherit the logger).`).optional()})).describe(`Provider command behaviour (eg. colour for the passthrough commands).`).meta({id:`ToolchainProvidersConfig`});export{n as providersConfigSchema};
@@ -0,0 +1,21 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { z } from "zod";
4
+ //#region packages/shared/src/config-schema/registry.d.ts
5
+ /** Allow/deny host and path globs for one registry kind. */
6
+ export declare const registryPolicySchema: z.ZodObject<{
7
+ allow: z.ZodOptional<z.ZodArray<z.ZodString>>;
8
+ deny: z.ZodOptional<z.ZodArray<z.ZodString>>;
9
+ }, z.core.$strip>;
10
+ /** Registry source policies for templates and providers. */
11
+ export declare const registryConfigSchema: z.ZodObject<{
12
+ templates: z.ZodOptional<z.ZodObject<{
13
+ allow: z.ZodOptional<z.ZodArray<z.ZodString>>;
14
+ deny: z.ZodOptional<z.ZodArray<z.ZodString>>;
15
+ }, z.core.$strip>>;
16
+ providers: z.ZodOptional<z.ZodObject<{
17
+ allow: z.ZodOptional<z.ZodArray<z.ZodString>>;
18
+ deny: z.ZodOptional<z.ZodArray<z.ZodString>>;
19
+ }, z.core.$strip>>;
20
+ }, z.core.$strip>;
21
+ //#endregion
@@ -0,0 +1 @@
1
+ import"node:path";import"node:url";import.meta.url;import{withEnabled as e}from"./meta.js";import{z as t}from"zod";const n=t.object({allow:t.array(t.string()).describe("Allowed host/path globs. When non-empty, only matching sources are used (eg. `*.example.com`, `https://registry.example.com/**`).").optional(),deny:t.array(t.string()).describe("Denied host/path globs (checked before `allow`).").optional()}).describe(`Registry source allow/deny globs.`).meta({id:`ToolchainRegistryPolicy`}),r=e(t.object({templates:n.describe(`Allow/deny globs for template sources and registries.`).optional(),providers:n.describe(`Allow/deny globs for provider sources and registries.`).optional()})).describe(`Registry source allow/deny policies (templates + providers).`).meta({id:`ToolchainRegistryConfig`});export{r as registryConfigSchema,n as registryPolicySchema};
@@ -0,0 +1,81 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { z } from "zod";
4
+ //#region packages/shared/src/config-schema/templates.d.ts
5
+ /** Where a template source is loaded from. */
6
+ export declare const templateSourceTypeSchema: z.ZodEnum<{
7
+ builtin: "builtin";
8
+ git: "git";
9
+ local: "local";
10
+ npm: "npm";
11
+ remote: "remote";
12
+ "vite-plus": "vite-plus";
13
+ }>;
14
+ /** What a template produces. */
15
+ export declare const templateKindSchema: z.ZodEnum<{
16
+ application: "application";
17
+ folder: "folder";
18
+ pipeline: "pipeline";
19
+ project: "project";
20
+ tooling: "tooling";
21
+ workspace: "workspace";
22
+ }>;
23
+ /** A source a template registry loads templates from (offline or online). */
24
+ export declare const templateSourceSchema: z.ZodObject<{
25
+ type: z.ZodEnum<{
26
+ builtin: "builtin";
27
+ git: "git";
28
+ local: "local";
29
+ npm: "npm";
30
+ remote: "remote";
31
+ "vite-plus": "vite-plus";
32
+ }>;
33
+ locate: z.ZodString;
34
+ id: z.ZodOptional<z.ZodString>;
35
+ name: z.ZodOptional<z.ZodString>;
36
+ description: z.ZodOptional<z.ZodString>;
37
+ kind: z.ZodOptional<z.ZodEnum<{
38
+ application: "application";
39
+ folder: "folder";
40
+ pipeline: "pipeline";
41
+ project: "project";
42
+ tooling: "tooling";
43
+ workspace: "workspace";
44
+ }>>;
45
+ ref: z.ZodOptional<z.ZodString>;
46
+ registry: z.ZodOptional<z.ZodString>;
47
+ subdir: z.ZodOptional<z.ZodString>;
48
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
49
+ online: z.ZodOptional<z.ZodBoolean>;
50
+ }, z.core.$strip>;
51
+ /** Template sources / scaffolding. */
52
+ export declare const templatesConfigSchema: z.ZodObject<{
53
+ sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
54
+ type: z.ZodEnum<{
55
+ builtin: "builtin";
56
+ git: "git";
57
+ local: "local";
58
+ npm: "npm";
59
+ remote: "remote";
60
+ "vite-plus": "vite-plus";
61
+ }>;
62
+ locate: z.ZodString;
63
+ id: z.ZodOptional<z.ZodString>;
64
+ name: z.ZodOptional<z.ZodString>;
65
+ description: z.ZodOptional<z.ZodString>;
66
+ kind: z.ZodOptional<z.ZodEnum<{
67
+ application: "application";
68
+ folder: "folder";
69
+ pipeline: "pipeline";
70
+ project: "project";
71
+ tooling: "tooling";
72
+ workspace: "workspace";
73
+ }>>;
74
+ ref: z.ZodOptional<z.ZodString>;
75
+ registry: z.ZodOptional<z.ZodString>;
76
+ subdir: z.ZodOptional<z.ZodString>;
77
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
78
+ online: z.ZodOptional<z.ZodBoolean>;
79
+ }, z.core.$strip>>>;
80
+ }, z.core.$strip>;
81
+ //#endregion
@@ -0,0 +1 @@
1
+ import"node:path";import"node:url";import.meta.url;import{withEnabled as e}from"./meta.js";import{z as t}from"zod";const n=t.enum([`builtin`,`local`,`npm`,`git`,`vite-plus`,`remote`]).describe(`How to load the source.`).meta({id:`ToolchainTemplateSourceType`}),r=t.enum([`project`,`workspace`,`application`,`folder`,`tooling`,`pipeline`]).describe(`What the template produces.`).meta({id:`ToolchainTemplateKind`}),i=t.object({type:n.describe(`How to load the source.`),locate:t.string().describe(`A builtin id, local dir, npm scope, git URL or Vite+ id.`),id:t.string().describe(`Stable id (defaults to the basename/scope).`).optional(),name:t.string().describe(`Display name override.`).optional(),description:t.string().describe(`Description override.`).optional(),kind:r.describe(`What the template produces.`).optional(),ref:t.string().describe(`Git branch/tag/commit.`).optional(),registry:t.string().describe(`Custom npm registry URL (default: the project package manager registry).`).optional(),subdir:t.string().describe(`Subdirectory within the source that holds the template.`).optional(),tags:t.array(t.string()).describe(`Free-form tags.`).optional(),online:t.boolean().describe(`Whether the source needs network access.`).optional()}).describe(`A template source: builtin, local, npm, git or Vite+.`).meta({id:`ToolchainTemplateSource`}),a=e(t.object({sources:t.array(i).describe(`Extra sources on top of the builtin + registry sources.`).optional()})).describe(`Template sources / scaffolding.`).meta({id:`ToolchainTemplatesConfig`});export{r as templateKindSchema,i as templateSourceSchema,n as templateSourceTypeSchema,a as templatesConfigSchema};
@@ -0,0 +1,30 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { z } from "zod";
4
+ //#region packages/shared/src/config-schema/tsconfig.d.ts
5
+ /** Workspace tsconfig generation (aliases + project references). */
6
+ export declare const tsconfigConfigSchema: z.ZodObject<{
7
+ glob: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
8
+ exclude: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
9
+ gitignore: z.ZodOptional<z.ZodBoolean>;
10
+ refs: z.ZodOptional<z.ZodBoolean>;
11
+ composite: z.ZodOptional<z.ZodBoolean>;
12
+ aliases: z.ZodOptional<z.ZodBoolean>;
13
+ indent: z.ZodOptional<z.ZodNumber>;
14
+ rootFile: z.ZodOptional<z.ZodString>;
15
+ defaultFile: z.ZodOptional<z.ZodString>;
16
+ buildFile: z.ZodOptional<z.ZodString>;
17
+ baseFile: z.ZodOptional<z.ZodString>;
18
+ extends: z.ZodOptional<z.ZodObject<{
19
+ base: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
20
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
21
+ build: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodLiteral<false>]>>;
22
+ }, z.core.$strip>>;
23
+ overrides: z.ZodOptional<z.ZodObject<{
24
+ base: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
25
+ default: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
26
+ build: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
27
+ root: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
28
+ }, z.core.$strip>>;
29
+ }, z.core.$strip>;
30
+ //#endregion
@@ -0,0 +1 @@
1
+ import"node:path";import"node:url";import.meta.url;import{withEnabled as e}from"./meta.js";import{z as t}from"zod";const n=e(t.object({glob:t.union([t.string(),t.array(t.string())]).describe("Glob(s) for the workspace default tsconfig files. Defaults to matching every `defaultFile` recursively.").optional(),exclude:t.union([t.string(),t.array(t.string())]).describe("Glob(s) to exclude from `glob`. Defaults to the common ignored paths (`node_modules`, `.dbx`, `dist`, `build`, ...).").optional(),gitignore:t.boolean().describe("Also respect `.gitignore` files (root + nested) when matching `glob` (default true).").optional(),refs:t.boolean().describe(`Wire project references (default false).`).optional(),composite:t.boolean().describe("Emit `composite: true` (default false).").optional(),aliases:t.boolean().describe(`Inject path aliases (default true).`).optional(),indent:t.number().describe(`JSON indentation (default 4).`).optional(),rootFile:t.string().describe("The workspaces tsconfig file name that holds `paths` + `references` (default `tsconfig.workspaces.json`).").optional(),defaultFile:t.string().describe("The workspace default tsconfig file name that the generator expands (default `tsconfig.default.json`).").optional(),buildFile:t.string().describe("The workspace build tsconfig file name (default `tsconfig.build.json`).").optional(),baseFile:t.string().describe("The root base tsconfig file name (default `tsconfig.base.json`).").optional(),extends:t.object({base:t.union([t.string(),t.array(t.string()),t.literal(!1)]).describe("`extends` written into scaffolded `tsconfig.base.json` files (or `false` to remove the field).").optional(),default:t.union([t.string(),t.array(t.string()),t.literal(!1)]).describe("`extends` written into scaffolded `tsconfig.default.json` files (or `false` to remove the field).").optional(),build:t.union([t.string(),t.array(t.string()),t.literal(!1)]).describe("`extends` written into scaffolded `tsconfig.build.json` files. Default `./tsconfig.default.json`; use `./tsconfig.json` to let builds reuse the path aliases (at the cost of pulling workspace source into the build).").optional()}).describe("Per-file `extends` overrides for generated/scaffolded tsconfig templates.").optional(),overrides:t.object({base:t.record(t.string(),t.unknown()).describe("Deep-merged into the root base tsconfig (`baseFile`) during sync.").optional(),default:t.record(t.string(),t.unknown()).describe("Deep-merged into every workspace default tsconfig (`defaultFile`) during sync.").optional(),build:t.record(t.string(),t.unknown()).describe("Deep-merged into every workspace build tsconfig (`buildFile`) during sync.").optional(),root:t.record(t.string(),t.unknown()).describe("Deep-merged into the root workspaces tsconfig (`rootFile`) during sync.").optional()}).describe(`Managed overrides deep-merged into the base/root/default/build tsconfig files during sync. The originals are snapshotted in the manifest, so removing a key reverts it (restoring the original value when the file defined one).`).meta({id:`ToolchainTsconfigOverrides`}).optional()})).describe(`Workspace tsconfig generation (path aliases + project references).`).meta({id:`ToolchainTsconfigConfig`});export{n as tsconfigConfigSchema};
@@ -0,0 +1,26 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { z } from "zod";
4
+ //#region packages/shared/src/config-schema/vite.d.ts
5
+ /**
6
+ * Vite+ configuration: the raw `vite.config.ts` object, held under
7
+ * `toolchain.vite`, plus the toolchain-only `config` (managed shim opt-out),
8
+ * `shim` (runtime/static render mode) and `shimImport` (runtime import
9
+ * specifier) keys.
10
+ *
11
+ * Every other key is passed through verbatim to the generated
12
+ * `vite.config.ts` (see the `vite` sync task), so `dbx.config.*` is the only
13
+ * hand-authored root config. `config: false` leaves a hand-written
14
+ * `vite.config.ts` alone.
15
+ */
16
+ export declare const viteConfigSchema: z.ZodObject<{
17
+ config: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
18
+ shim: z.ZodOptional<z.ZodEnum<{
19
+ runtime: "runtime";
20
+ static: "static";
21
+ }>>;
22
+ shimImport: z.ZodOptional<z.ZodString>;
23
+ fmt: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
24
+ lint: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
25
+ }, z.core.$catchall<z.ZodUnknown>>;
26
+ //#endregion
@@ -0,0 +1 @@
1
+ import"node:path";import"node:url";import.meta.url;import{withEnabled as e}from"./meta.js";import{z as t}from"zod";const n=e(t.object({config:t.union([t.boolean(),t.string()]).describe(`Write the managed Vite config (default true). A string sets its file name/path (relative to the project, or absolute).`).optional(),shim:t.enum([`runtime`,`static`]).describe("How the generated `vite.config.ts` is rendered. `runtime` (default) loads the config from `dbx.config.*`; `static` serializes it into the file so the shim does not import `@deltabox/toolchain` (it then needs no built `dist`).").optional(),shimImport:t.string().describe("Module specifier used to import `resolveVite` in runtime shims (default `@deltabox/toolchain/vite`). A relative path is resolved from the repo root and rewritten relative to each generated config - useful for dogfooding a source checkout without a built `dist`.").optional(),fmt:t.union([t.boolean(),t.record(t.string(),t.unknown())]).describe("Oxfmt options; `true` uses the toolchain defaults.").optional(),lint:t.union([t.boolean(),t.record(t.string(),t.unknown())]).describe("Oxlint options; `true` uses the toolchain defaults.").optional()})).catchall(t.unknown()).describe("The full Vite+ config; `dbx sync` writes the root `vite.config.ts` from it.").meta({id:`ToolchainViteConfig`});export{n as viteConfigSchema};
@@ -0,0 +1,11 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { z } from "zod";
4
+ //#region packages/shared/src/config-schema/watch.d.ts
5
+ /** Watch behaviour for `dbx watch`. */
6
+ export declare const watchConfigSchema: z.ZodObject<{
7
+ debounce: z.ZodOptional<z.ZodNumber>;
8
+ exclude: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
9
+ gitignore: z.ZodOptional<z.ZodBoolean>;
10
+ }, z.core.$strip>;
11
+ //#endregion
@@ -0,0 +1 @@
1
+ import"node:path";import"node:url";import.meta.url;import{withEnabled as e}from"./meta.js";import{z as t}from"zod";const n=e(t.object({debounce:t.number().describe(`Debounce window in ms (default 150).`).optional(),exclude:t.union([t.string(),t.array(t.string())]).describe("Glob(s) excluded from watching. Defaults to the common ignored paths (`node_modules`, `.dbx`, `dist`, `build`, ...).").optional(),gitignore:t.boolean().describe("Also respect `.gitignore` files (root + nested) when watching (default true).").optional()})).describe("Watch behaviour for `dbx watch`.").meta({id:`ToolchainWatchConfig`});export{n as watchConfigSchema};