@deltabox/toolchain 1.3.1 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +117 -4
- package/README.md +32 -39
- package/dist/changelog.d.ts +3 -2
- package/dist/changelog.js +1 -1
- package/dist/cli/commands/providers.js +1 -1
- package/dist/cli/commands/sync.js +1 -1
- package/dist/cli/context.js +1 -1
- package/dist/cli/index.d.ts +4 -4
- package/dist/cli/index.js +1 -1
- package/dist/cli/register.d.ts +3 -3
- package/dist/cli/register.js +1 -1
- package/dist/config.d.ts +2 -2
- package/dist/config.js +1 -1
- package/dist/core.d.ts +4 -3
- package/dist/core.js +1 -1
- package/dist/index.d.ts +11 -9
- package/dist/index.js +1 -1
- package/dist/migrate.d.ts +3 -2
- package/dist/migrate.js +1 -1
- package/dist/package.js +1 -1
- package/dist/packages/changelog/src/cli/index.d.ts +2 -2
- package/dist/packages/changelog/src/cli/index.js +1 -1
- package/dist/packages/changelog/src/index.d.ts +4 -3
- package/dist/packages/changelog/src/index.js +1 -1
- package/dist/packages/changelog/src/run-workflows.d.ts +2 -2
- package/dist/packages/changelog/src/run.d.ts +8 -2
- package/dist/packages/changelog/src/run.js +1 -1
- package/dist/packages/changelog/src/sync.d.ts +13 -5
- package/dist/packages/changelog/src/sync.js +1 -1
- package/dist/packages/changelog/src/utils/versioning.d.ts +78 -0
- package/dist/packages/changelog/src/utils/versioning.js +1 -0
- package/dist/packages/changelog/src/utils/write.js +1 -1
- package/dist/packages/changelog/src/workflows.js +1 -1
- package/dist/packages/config/src/cli/index.d.ts +2 -2
- package/dist/packages/config/src/generators/index.d.ts +2 -2
- package/dist/packages/config/src/generators/index.js +1 -1
- package/dist/packages/config/src/generators/types.d.ts +16 -0
- package/dist/packages/config/src/generators/types.js +2 -1
- package/dist/packages/config/src/index.d.ts +3 -3
- package/dist/packages/config/src/index.js +1 -1
- package/dist/packages/config/src/schema.d.ts +1 -1
- package/dist/packages/config/src/schema.js +1 -1
- package/dist/packages/core/src/index.d.ts +5 -4
- package/dist/packages/core/src/index.js +1 -1
- package/dist/packages/core/src/loader.d.ts +3 -3
- package/dist/packages/core/src/loader.js +1 -1
- package/dist/packages/core/src/project-type.d.ts +2 -2
- package/dist/packages/core/src/provider-registry.d.ts +12 -0
- package/dist/packages/core/src/provider-registry.js +1 -0
- package/dist/packages/core/src/reset.d.ts +3 -3
- package/dist/packages/core/src/reset.js +1 -1
- package/dist/packages/core/src/sync.d.ts +2 -2
- package/dist/packages/core/src/vscode.d.ts +3 -3
- package/dist/packages/migrate/src/biome.d.ts +3 -3
- package/dist/packages/migrate/src/biome.js +1 -1
- package/dist/packages/migrate/src/cli/index.d.ts +5 -4
- package/dist/packages/migrate/src/cli/index.js +1 -1
- package/dist/packages/migrate/src/dprint.d.ts +2 -2
- package/dist/packages/migrate/src/dprint.js +1 -1
- package/dist/packages/migrate/src/eslint.d.ts +2 -2
- package/dist/packages/migrate/src/eslint.js +1 -1
- package/dist/packages/migrate/src/index.d.ts +3 -2
- package/dist/packages/migrate/src/index.js +1 -1
- package/dist/packages/migrate/src/prettier.d.ts +2 -2
- package/dist/packages/migrate/src/prettier.js +1 -1
- package/dist/packages/migrate/src/registry.d.ts +4 -4
- package/dist/packages/migrate/src/registry.js +1 -1
- package/dist/packages/migrate/src/types.d.ts +4 -4
- package/dist/packages/migrate/src/vite.d.ts +52 -0
- package/dist/packages/migrate/src/vite.js +5 -0
- package/dist/packages/project/src/cli/index.d.ts +2 -2
- package/dist/packages/project/src/config.js +1 -1
- package/dist/packages/project/src/index.d.ts +3 -3
- package/dist/packages/project/src/index.js +1 -1
- package/dist/packages/project/src/typescript.d.ts +1 -1
- package/dist/packages/project/src/typescript.js +1 -1
- package/dist/packages/shared/src/bin.d.ts +32 -0
- package/dist/packages/shared/src/bin.js +1 -0
- package/dist/packages/shared/src/config-schema.d.ts +131 -57
- package/dist/packages/shared/src/config-schema.js +1 -1
- package/dist/packages/shared/src/config-types.d.ts +42 -39
- package/dist/packages/shared/src/index.d.ts +9 -8
- package/dist/packages/shared/src/index.js +1 -1
- package/dist/packages/shared/src/logger.d.ts +7 -4
- package/dist/packages/shared/src/logger.js +1 -1
- package/dist/packages/shared/src/provider.d.ts +6 -6
- package/dist/packages/shared/src/run.d.ts +22 -2
- package/dist/packages/shared/src/run.js +1 -1
- package/dist/packages/shared/src/toolchain.d.ts +17 -19
- package/dist/packages/shared/src/toolchain.js +1 -1
- package/dist/packages/shared/src/types.d.ts +9 -9
- package/dist/packages/template/src/cli/index.d.ts +2 -2
- package/dist/packages/template/src/cli/index.js +1 -1
- package/dist/packages/template/src/online.d.ts +3 -3
- package/dist/packages/template/src/registry.d.ts +8 -8
- package/dist/packages/template/src/types.d.ts +3 -3
- package/dist/packages/tsconfig/src/cli/index.d.ts +2 -2
- package/dist/packages/tsdown/src/cli/index.d.ts +2 -2
- package/dist/packages/vite/src/cli/index.d.ts +2 -2
- package/dist/packages/vite/src/index.d.ts +4 -3
- package/dist/packages/vite/src/index.js +1 -1
- package/dist/packages/vite/src/plugin.d.ts +32 -19
- package/dist/packages/vite/src/plugin.js +1 -1
- package/dist/packages/vite/src/provider.d.ts +2 -2
- package/dist/packages/vite/src/resolve.d.ts +19 -0
- package/dist/packages/vite/src/resolve.js +1 -0
- package/dist/packages/vite/src/sync.d.ts +10 -14
- package/dist/packages/vite/src/sync.js +2 -2
- package/dist/packages/vite/src/vp.d.ts +5 -0
- package/dist/packages/vite/src/vp.js +1 -1
- package/dist/project.d.ts +2 -2
- package/dist/project.js +1 -1
- package/dist/providers.d.ts +8 -4
- package/dist/providers.js +1 -1
- package/dist/shared.d.ts +8 -7
- package/dist/shared.js +1 -1
- package/dist/vite.d.ts +4 -3
- package/dist/vite.js +1 -1
- package/package.json +25 -16
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import __tsdown_shims_path from 'node:path';
|
|
2
|
+
import __tsdown_shims_url from 'node:url';
|
|
3
|
+
//#region packages/shared/src/bin.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Locating a project's own `dbx` binary.
|
|
6
|
+
*
|
|
7
|
+
* The toolchain always prefers a project-local `dbx` over a global one, so the
|
|
8
|
+
* version a project pins is the one that runs and a stale global install cannot
|
|
9
|
+
* interfere. A consumer gets this from `node_modules/.bin/dbx`; a repo that *is*
|
|
10
|
+
* the toolchain (dogfooding from source) has no such shim, so its own package
|
|
11
|
+
* `bin` is used instead.
|
|
12
|
+
*/
|
|
13
|
+
/** The published toolchain package name. */
|
|
14
|
+
export declare const TOOLCHAIN_PACKAGE = "@deltabox/toolchain";
|
|
15
|
+
/**
|
|
16
|
+
* The `bin.dbx` entry of the nearest enclosing `@deltabox/toolchain` package
|
|
17
|
+
* (walking up from `cwd`), when the file exists on disk. Used to run the
|
|
18
|
+
* toolchain repo's own CLI instead of a global `dbx`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function findOwnCliEntry(cwd?: string): string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* The version of the `@deltabox/toolchain` this project pins — from the nearest
|
|
23
|
+
* `node_modules/@deltabox/toolchain/package.json`, else the nearest enclosing
|
|
24
|
+
* `@deltabox/toolchain` package (so the toolchain repo resolves its own version
|
|
25
|
+
* even before `dist` is built). `undefined` when the project doesn't pin the
|
|
26
|
+
* toolchain at all, in which case only a global install / `npx` is available.
|
|
27
|
+
*
|
|
28
|
+
* A pinned project must never run a global `dbx`: a stale global install would
|
|
29
|
+
* write older-format generated files, silently reverting the project's own.
|
|
30
|
+
*/
|
|
31
|
+
export declare function localToolchainVersion(cwd?: string): string | undefined;
|
|
32
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{default as e}from"node:path";import"node:url";import.meta.url;import t from"node:fs";const n=`@deltabox/toolchain`;function r(n=process.cwd()){let r=e.resolve(n);for(;;){let n=e.join(r,`package.json`);if(t.existsSync(n))try{let i=JSON.parse(t.readFileSync(n,`utf-8`));if(i.name===`@deltabox/toolchain`){let n=typeof i.bin==`string`?i.bin:i.bin?.dbx;if(n){let i=e.resolve(r,n);if(t.existsSync(i))return i}}}catch{}let i=e.dirname(r);if(i===r)return;r=i}}function i(e){try{let n=JSON.parse(t.readFileSync(e,`utf-8`));return typeof n.version==`string`?n.version:void 0}catch{return}}function a(r=process.cwd()){let a=e.resolve(r),o;for(;;){let r=i(e.join(a,`node_modules`,n,`package.json`));if(r)return r;let s=e.join(a,`package.json`);if(o===void 0&&t.existsSync(s))try{let e=JSON.parse(t.readFileSync(s,`utf-8`));e.name===`@deltabox/toolchain`&&typeof e.version==`string`&&(o=e.version)}catch{}let c=e.dirname(a);if(c===a)return o;a=c}}export{n as TOOLCHAIN_PACKAGE,r as findOwnCliEntry,a as localToolchainVersion};
|
|
@@ -475,6 +475,30 @@ export declare const changelogWorkflowsConfigSchema: z.ZodObject<{
|
|
|
475
475
|
tokens: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
476
476
|
}, z.core.$strip>]>>;
|
|
477
477
|
}, z.core.$strip>;
|
|
478
|
+
/** Which `package.json` versions a changelog run bumps. */
|
|
479
|
+
export declare const changelogVersioningTargetSchema: z.ZodEnum<{
|
|
480
|
+
individual: "individual";
|
|
481
|
+
"root-only": "root-only";
|
|
482
|
+
uniform: "uniform";
|
|
483
|
+
}>;
|
|
484
|
+
/** Options for `changelog.versioning` when configured as an object. */
|
|
485
|
+
export declare const changelogVersioningConfigSchema: z.ZodObject<{
|
|
486
|
+
target: z.ZodOptional<z.ZodEnum<{
|
|
487
|
+
individual: "individual";
|
|
488
|
+
"root-only": "root-only";
|
|
489
|
+
uniform: "uniform";
|
|
490
|
+
}>>;
|
|
491
|
+
workspaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
492
|
+
}, z.core.$strip>;
|
|
493
|
+
/** Automatic version bumping: `true` (default), `false`, or a set of options. */
|
|
494
|
+
export declare const changelogVersioningSchema: z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
495
|
+
target: z.ZodOptional<z.ZodEnum<{
|
|
496
|
+
individual: "individual";
|
|
497
|
+
"root-only": "root-only";
|
|
498
|
+
uniform: "uniform";
|
|
499
|
+
}>>;
|
|
500
|
+
workspaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
501
|
+
}, z.core.$strip>]>;
|
|
478
502
|
/** Conventional-Commits CI, commitlint and the changelog pipeline. */
|
|
479
503
|
export declare const changelogConfigSchema: z.ZodObject<{
|
|
480
504
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -776,6 +800,14 @@ export declare const changelogConfigSchema: z.ZodObject<{
|
|
|
776
800
|
}, z.core.$strip>>;
|
|
777
801
|
types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
778
802
|
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
803
|
+
versioning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
804
|
+
target: z.ZodOptional<z.ZodEnum<{
|
|
805
|
+
individual: "individual";
|
|
806
|
+
"root-only": "root-only";
|
|
807
|
+
uniform: "uniform";
|
|
808
|
+
}>>;
|
|
809
|
+
workspaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
810
|
+
}, z.core.$strip>]>>;
|
|
779
811
|
vscode: z.ZodOptional<z.ZodBoolean>;
|
|
780
812
|
}, z.core.$strip>;
|
|
781
813
|
/** Biome config generation (for consumers that still want a `biome.json`). */
|
|
@@ -888,17 +920,20 @@ export declare const templatesConfigSchema: z.ZodObject<{
|
|
|
888
920
|
online: z.ZodOptional<z.ZodBoolean>;
|
|
889
921
|
}, z.core.$strip>>>;
|
|
890
922
|
}, z.core.$strip>;
|
|
891
|
-
/**
|
|
923
|
+
/**
|
|
924
|
+
* Vite+ configuration: the raw `vite.config.ts` object, held under
|
|
925
|
+
* `toolchain.vite`, plus the single toolchain opt-out `config`.
|
|
926
|
+
*
|
|
927
|
+
* Every other key is passed through verbatim to the generated
|
|
928
|
+
* `vite.config.ts` (see the `vite` sync task), so `dbx.config.*` is the only
|
|
929
|
+
* hand-authored root config. `config: false` leaves a hand-written
|
|
930
|
+
* `vite.config.ts` alone.
|
|
931
|
+
*/
|
|
892
932
|
export declare const viteConfigSchema: z.ZodObject<{
|
|
893
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
894
933
|
config: z.ZodOptional<z.ZodBoolean>;
|
|
895
|
-
|
|
896
|
-
testInclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
897
|
-
lintIgnore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
898
|
-
overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
899
|
-
}, z.core.$strip>;
|
|
934
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
900
935
|
/** The full `dbx.config` schema (minus the function-bearing `hooks`). */
|
|
901
|
-
export declare const
|
|
936
|
+
export declare const toolchainConfigSchema: z.ZodObject<{
|
|
902
937
|
project: z.ZodOptional<z.ZodObject<{
|
|
903
938
|
type: z.ZodOptional<z.ZodEnum<{
|
|
904
939
|
"monorepo-root": "monorepo-root";
|
|
@@ -1216,6 +1251,14 @@ export declare const toolingConfigSchema: z.ZodObject<{
|
|
|
1216
1251
|
}, z.core.$strip>>;
|
|
1217
1252
|
types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1218
1253
|
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1254
|
+
versioning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
1255
|
+
target: z.ZodOptional<z.ZodEnum<{
|
|
1256
|
+
individual: "individual";
|
|
1257
|
+
"root-only": "root-only";
|
|
1258
|
+
uniform: "uniform";
|
|
1259
|
+
}>>;
|
|
1260
|
+
workspaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1261
|
+
}, z.core.$strip>]>>;
|
|
1219
1262
|
vscode: z.ZodOptional<z.ZodBoolean>;
|
|
1220
1263
|
}, z.core.$strip>]>>;
|
|
1221
1264
|
biome: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
@@ -1262,13 +1305,8 @@ export declare const toolingConfigSchema: z.ZodObject<{
|
|
|
1262
1305
|
}, z.core.$strip>>>;
|
|
1263
1306
|
}, z.core.$strip>]>>;
|
|
1264
1307
|
vite: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
1265
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
1266
1308
|
config: z.ZodOptional<z.ZodBoolean>;
|
|
1267
|
-
|
|
1268
|
-
testInclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1269
|
-
lintIgnore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1270
|
-
overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1271
|
-
}, z.core.$strip>]>>;
|
|
1309
|
+
}, z.core.$catchall<z.ZodUnknown>>]>>;
|
|
1272
1310
|
watch: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
1273
1311
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
1274
1312
|
debounce: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1608,6 +1646,14 @@ export declare const dbxConfigSchema: z.ZodObject<{
|
|
|
1608
1646
|
}, z.core.$strip>>;
|
|
1609
1647
|
types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1610
1648
|
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1649
|
+
versioning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
1650
|
+
target: z.ZodOptional<z.ZodEnum<{
|
|
1651
|
+
individual: "individual";
|
|
1652
|
+
"root-only": "root-only";
|
|
1653
|
+
uniform: "uniform";
|
|
1654
|
+
}>>;
|
|
1655
|
+
workspaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1656
|
+
}, z.core.$strip>]>>;
|
|
1611
1657
|
vscode: z.ZodOptional<z.ZodBoolean>;
|
|
1612
1658
|
}, z.core.$strip>]>>;
|
|
1613
1659
|
biome: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
@@ -1654,13 +1700,8 @@ export declare const dbxConfigSchema: z.ZodObject<{
|
|
|
1654
1700
|
}, z.core.$strip>>>;
|
|
1655
1701
|
}, z.core.$strip>]>>;
|
|
1656
1702
|
vite: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
1657
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
1658
1703
|
config: z.ZodOptional<z.ZodBoolean>;
|
|
1659
|
-
|
|
1660
|
-
testInclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1661
|
-
lintIgnore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1662
|
-
overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1663
|
-
}, z.core.$strip>]>>;
|
|
1704
|
+
}, z.core.$catchall<z.ZodUnknown>>]>>;
|
|
1664
1705
|
watch: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
1665
1706
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
1666
1707
|
debounce: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1692,7 +1733,7 @@ export declare const CONFIG_TYPE_SCHEMAS: {
|
|
|
1692
1733
|
"monorepo-workspace": "monorepo-workspace";
|
|
1693
1734
|
project: "project";
|
|
1694
1735
|
}>;
|
|
1695
|
-
readonly
|
|
1736
|
+
readonly ToolchainProjectConfig: z.ZodObject<{
|
|
1696
1737
|
type: z.ZodOptional<z.ZodEnum<{
|
|
1697
1738
|
"monorepo-root": "monorepo-root";
|
|
1698
1739
|
"monorepo-workspace": "monorepo-workspace";
|
|
@@ -2153,7 +2194,28 @@ export declare const CONFIG_TYPE_SCHEMAS: {
|
|
|
2153
2194
|
tokens: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
2154
2195
|
}, z.core.$strip>]>>;
|
|
2155
2196
|
}, z.core.$strip>;
|
|
2156
|
-
readonly
|
|
2197
|
+
readonly ChangelogVersioningTarget: z.ZodEnum<{
|
|
2198
|
+
individual: "individual";
|
|
2199
|
+
"root-only": "root-only";
|
|
2200
|
+
uniform: "uniform";
|
|
2201
|
+
}>;
|
|
2202
|
+
readonly ChangelogVersioningConfig: z.ZodObject<{
|
|
2203
|
+
target: z.ZodOptional<z.ZodEnum<{
|
|
2204
|
+
individual: "individual";
|
|
2205
|
+
"root-only": "root-only";
|
|
2206
|
+
uniform: "uniform";
|
|
2207
|
+
}>>;
|
|
2208
|
+
workspaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2209
|
+
}, z.core.$strip>;
|
|
2210
|
+
readonly ChangelogVersioning: z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
2211
|
+
target: z.ZodOptional<z.ZodEnum<{
|
|
2212
|
+
individual: "individual";
|
|
2213
|
+
"root-only": "root-only";
|
|
2214
|
+
uniform: "uniform";
|
|
2215
|
+
}>>;
|
|
2216
|
+
workspaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2217
|
+
}, z.core.$strip>]>;
|
|
2218
|
+
readonly ToolchainChangelogConfig: z.ZodObject<{
|
|
2157
2219
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
2158
2220
|
workflows: z.ZodOptional<z.ZodObject<{
|
|
2159
2221
|
ci: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
@@ -2453,14 +2515,22 @@ export declare const CONFIG_TYPE_SCHEMAS: {
|
|
|
2453
2515
|
}, z.core.$strip>>;
|
|
2454
2516
|
types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2455
2517
|
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2518
|
+
versioning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
2519
|
+
target: z.ZodOptional<z.ZodEnum<{
|
|
2520
|
+
individual: "individual";
|
|
2521
|
+
"root-only": "root-only";
|
|
2522
|
+
uniform: "uniform";
|
|
2523
|
+
}>>;
|
|
2524
|
+
workspaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2525
|
+
}, z.core.$strip>]>>;
|
|
2456
2526
|
vscode: z.ZodOptional<z.ZodBoolean>;
|
|
2457
2527
|
}, z.core.$strip>;
|
|
2458
|
-
readonly
|
|
2528
|
+
readonly ToolchainBiomeConfig: z.ZodObject<{
|
|
2459
2529
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
2460
2530
|
vscode: z.ZodOptional<z.ZodBoolean>;
|
|
2461
2531
|
overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2462
2532
|
}, z.core.$strip>;
|
|
2463
|
-
readonly
|
|
2533
|
+
readonly ToolchainTsconfigConfig: z.ZodObject<{
|
|
2464
2534
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
2465
2535
|
glob: z.ZodOptional<z.ZodString>;
|
|
2466
2536
|
appGlob: z.ZodOptional<z.ZodString>;
|
|
@@ -2470,18 +2540,18 @@ export declare const CONFIG_TYPE_SCHEMAS: {
|
|
|
2470
2540
|
indent: z.ZodOptional<z.ZodNumber>;
|
|
2471
2541
|
rootFile: z.ZodOptional<z.ZodString>;
|
|
2472
2542
|
}, z.core.$strip>;
|
|
2473
|
-
readonly
|
|
2543
|
+
readonly ToolchainWatchConfig: z.ZodObject<{
|
|
2474
2544
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
2475
2545
|
debounce: z.ZodOptional<z.ZodNumber>;
|
|
2476
2546
|
}, z.core.$strip>;
|
|
2477
|
-
readonly
|
|
2547
|
+
readonly ToolchainTemplateSourceType: z.ZodEnum<{
|
|
2478
2548
|
builtin: "builtin";
|
|
2479
2549
|
git: "git";
|
|
2480
2550
|
local: "local";
|
|
2481
2551
|
npm: "npm";
|
|
2482
2552
|
"vite-plus": "vite-plus";
|
|
2483
2553
|
}>;
|
|
2484
|
-
readonly
|
|
2554
|
+
readonly ToolchainTemplateKind: z.ZodEnum<{
|
|
2485
2555
|
application: "application";
|
|
2486
2556
|
folder: "folder";
|
|
2487
2557
|
pipeline: "pipeline";
|
|
@@ -2489,7 +2559,7 @@ export declare const CONFIG_TYPE_SCHEMAS: {
|
|
|
2489
2559
|
tooling: "tooling";
|
|
2490
2560
|
workspace: "workspace";
|
|
2491
2561
|
}>;
|
|
2492
|
-
readonly
|
|
2562
|
+
readonly ToolchainTemplateSource: z.ZodObject<{
|
|
2493
2563
|
type: z.ZodEnum<{
|
|
2494
2564
|
builtin: "builtin";
|
|
2495
2565
|
git: "git";
|
|
@@ -2514,7 +2584,7 @@ export declare const CONFIG_TYPE_SCHEMAS: {
|
|
|
2514
2584
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2515
2585
|
online: z.ZodOptional<z.ZodBoolean>;
|
|
2516
2586
|
}, z.core.$strip>;
|
|
2517
|
-
readonly
|
|
2587
|
+
readonly ToolchainTemplatesConfig: z.ZodObject<{
|
|
2518
2588
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
2519
2589
|
sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2520
2590
|
type: z.ZodEnum<{
|
|
@@ -2542,15 +2612,10 @@ export declare const CONFIG_TYPE_SCHEMAS: {
|
|
|
2542
2612
|
online: z.ZodOptional<z.ZodBoolean>;
|
|
2543
2613
|
}, z.core.$strip>>>;
|
|
2544
2614
|
}, z.core.$strip>;
|
|
2545
|
-
readonly
|
|
2546
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
2615
|
+
readonly ToolchainViteConfig: z.ZodObject<{
|
|
2547
2616
|
config: z.ZodOptional<z.ZodBoolean>;
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
lintIgnore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2551
|
-
overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2552
|
-
}, z.core.$strip>;
|
|
2553
|
-
readonly ToolingLoggerConfig: z.ZodObject<{
|
|
2617
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
2618
|
+
readonly ToolchainLoggerConfig: z.ZodObject<{
|
|
2554
2619
|
level: z.ZodOptional<z.ZodEnum<{
|
|
2555
2620
|
debug: "debug";
|
|
2556
2621
|
error: "error";
|
|
@@ -2561,10 +2626,10 @@ export declare const CONFIG_TYPE_SCHEMAS: {
|
|
|
2561
2626
|
color: z.ZodOptional<z.ZodBoolean>;
|
|
2562
2627
|
name: z.ZodOptional<z.ZodString>;
|
|
2563
2628
|
}, z.core.$strip>;
|
|
2564
|
-
readonly
|
|
2629
|
+
readonly ToolchainProvidersConfig: z.ZodObject<{
|
|
2565
2630
|
color: z.ZodOptional<z.ZodBoolean>;
|
|
2566
2631
|
}, z.core.$strip>;
|
|
2567
|
-
readonly
|
|
2632
|
+
readonly ToolchainConfigSections: z.ZodObject<{
|
|
2568
2633
|
project: z.ZodOptional<z.ZodObject<{
|
|
2569
2634
|
type: z.ZodOptional<z.ZodEnum<{
|
|
2570
2635
|
"monorepo-root": "monorepo-root";
|
|
@@ -2882,6 +2947,14 @@ export declare const CONFIG_TYPE_SCHEMAS: {
|
|
|
2882
2947
|
}, z.core.$strip>>;
|
|
2883
2948
|
types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2884
2949
|
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2950
|
+
versioning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
2951
|
+
target: z.ZodOptional<z.ZodEnum<{
|
|
2952
|
+
individual: "individual";
|
|
2953
|
+
"root-only": "root-only";
|
|
2954
|
+
uniform: "uniform";
|
|
2955
|
+
}>>;
|
|
2956
|
+
workspaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2957
|
+
}, z.core.$strip>]>>;
|
|
2885
2958
|
vscode: z.ZodOptional<z.ZodBoolean>;
|
|
2886
2959
|
}, z.core.$strip>]>>;
|
|
2887
2960
|
biome: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
@@ -2928,13 +3001,8 @@ export declare const CONFIG_TYPE_SCHEMAS: {
|
|
|
2928
3001
|
}, z.core.$strip>>>;
|
|
2929
3002
|
}, z.core.$strip>]>>;
|
|
2930
3003
|
vite: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
2931
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
2932
3004
|
config: z.ZodOptional<z.ZodBoolean>;
|
|
2933
|
-
|
|
2934
|
-
testInclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2935
|
-
lintIgnore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2936
|
-
overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2937
|
-
}, z.core.$strip>]>>;
|
|
3005
|
+
}, z.core.$catchall<z.ZodUnknown>>]>>;
|
|
2938
3006
|
watch: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
2939
3007
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
2940
3008
|
debounce: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3273,6 +3341,14 @@ export declare const CONFIG_TYPE_SCHEMAS: {
|
|
|
3273
3341
|
}, z.core.$strip>>;
|
|
3274
3342
|
types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3275
3343
|
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3344
|
+
versioning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
3345
|
+
target: z.ZodOptional<z.ZodEnum<{
|
|
3346
|
+
individual: "individual";
|
|
3347
|
+
"root-only": "root-only";
|
|
3348
|
+
uniform: "uniform";
|
|
3349
|
+
}>>;
|
|
3350
|
+
workspaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3351
|
+
}, z.core.$strip>]>>;
|
|
3276
3352
|
vscode: z.ZodOptional<z.ZodBoolean>;
|
|
3277
3353
|
}, z.core.$strip>]>>;
|
|
3278
3354
|
biome: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
@@ -3319,13 +3395,8 @@ export declare const CONFIG_TYPE_SCHEMAS: {
|
|
|
3319
3395
|
}, z.core.$strip>>>;
|
|
3320
3396
|
}, z.core.$strip>]>>;
|
|
3321
3397
|
vite: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
3322
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
3323
3398
|
config: z.ZodOptional<z.ZodBoolean>;
|
|
3324
|
-
|
|
3325
|
-
testInclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3326
|
-
lintIgnore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3327
|
-
overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3328
|
-
}, z.core.$strip>]>>;
|
|
3399
|
+
}, z.core.$catchall<z.ZodUnknown>>]>>;
|
|
3329
3400
|
watch: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
3330
3401
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
3331
3402
|
debounce: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3666,6 +3737,14 @@ export declare const CONFIG_SECTION_SCHEMAS: {
|
|
|
3666
3737
|
}, z.core.$strip>>;
|
|
3667
3738
|
types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3668
3739
|
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3740
|
+
versioning: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
3741
|
+
target: z.ZodOptional<z.ZodEnum<{
|
|
3742
|
+
individual: "individual";
|
|
3743
|
+
"root-only": "root-only";
|
|
3744
|
+
uniform: "uniform";
|
|
3745
|
+
}>>;
|
|
3746
|
+
workspaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3747
|
+
}, z.core.$strip>]>>;
|
|
3669
3748
|
vscode: z.ZodOptional<z.ZodBoolean>;
|
|
3670
3749
|
}, z.core.$strip>;
|
|
3671
3750
|
readonly biome: z.ZodObject<{
|
|
@@ -3712,13 +3791,8 @@ export declare const CONFIG_SECTION_SCHEMAS: {
|
|
|
3712
3791
|
}, z.core.$strip>>>;
|
|
3713
3792
|
}, z.core.$strip>;
|
|
3714
3793
|
readonly vite: z.ZodObject<{
|
|
3715
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
3716
3794
|
config: z.ZodOptional<z.ZodBoolean>;
|
|
3717
|
-
|
|
3718
|
-
testInclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3719
|
-
lintIgnore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3720
|
-
overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3721
|
-
}, z.core.$strip>;
|
|
3795
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
3722
3796
|
readonly watch: z.ZodObject<{
|
|
3723
3797
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
3724
3798
|
debounce: z.ZodOptional<z.ZodNumber>;
|
|
@@ -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:`
|
|
1
|
+
import"node:path";import"node:url";import.meta.url;import{z as e}from"zod";const t=e.enum([`monorepo-root`,`monorepo-workspace`,`project`]).describe(`The project kind (detected when omitted).`).meta({id:`ProjectType`}),n=e.object({type:t.optional(),name:e.string().describe(`The unscoped project name.`).optional(),scope:e.string().describe("The npm scope, eg. `@acme`.").optional(),author:e.string().describe(`Package author.`).optional(),license:e.string().describe(`SPDX license id.`).optional(),homepage:e.string().describe(`Project homepage.`).optional(),repo:e.string().describe("Repository URL, eg. `https://github.com/acme/app`.").optional(),nodeVersion:e.string().describe("Node engine range, eg. `>=22`.").optional(),packageManager:e.string().describe("Package manager name (default `yarn`).").optional(),packageManagerVersion:e.string().describe("Package manager version, eg. `4.17.1`.").optional(),description:e.string().describe(`One-line description.`).optional()}).meta({id:`ToolchainProjectConfig`}),r=e.object({name:e.string().optional(),id:e.string().optional(),if:e.string().optional(),uses:e.string().optional(),run:e.string().optional(),shell:e.string().optional(),"working-directory":e.string().optional(),with:e.record(e.string(),e.union([e.string(),e.number(),e.boolean()])).optional(),env:e.record(e.string(),e.string()).optional()}).meta({id:`WorkflowStep`}),i=e.object({job:e.string().describe(`Target job id (defaults to the primary/first job).`).optional(),before:e.array(r).describe(`Steps inserted at the start.`).optional(),after:e.array(r).describe(`Steps appended at the end.`).optional()}).meta({id:`WorkflowStepsConfig`}),a=e.object({enabled:e.boolean().describe(`Enable/disable this workflow (default true).`).optional(),pushBranches:e.array(e.string()).describe("Replace `on.push.branches`.").optional(),pullRequestBranches:e.array(e.string()).describe("Replace `on.pull_request.branches`.").optional(),triggers:e.record(e.string(),e.unknown()).describe("Extra `on.*` triggers.").optional(),extra:e.record(e.string(),e.unknown()).describe("Extra top-level keys (`permissions`, `concurrency`, `env`, ...).").optional(),steps:e.union([i,e.array(i)]).describe(`Extra steps for a job (one group, or per-job groups).`).optional(),jobs:e.record(e.string(),e.unknown()).describe(`Extra complete jobs merged in.`).optional(),tokens:e.record(e.string(),e.union([e.string(),e.number(),e.boolean()])).describe("Per-workflow token overrides (`nodeVersion`, `packageManager`, ...).").optional()}).meta({id:`WorkflowConfig`}),o=e.union([e.boolean(),a]).meta({id:`WorkflowSetting`}),s=e.object({ci:o.optional(),changelog:o.optional(),release:o.optional(),issues:o.optional(),sync:o.optional()}).meta({id:`ChangelogWorkflowsConfig`}),c=e.enum([`uniform`,`root-only`,`individual`]).describe(`Where the changelog version bump is applied.`).meta({id:`ChangelogVersioningTarget`}),l=e.object({target:c.describe("`uniform` bumps the root and every workspace to one shared version; `root-only` bumps the root only; `individual` bumps each changed workspace independently (default `uniform`).").optional(),workspaces:e.array(e.string()).describe("Glob patterns selecting the workspaces to version (relative to the root). Defaults to the root `package.json` `workspaces` field; when there is none the root `package.json` is used on its own.").optional()}).meta({id:`ChangelogVersioningConfig`}),u=e.union([e.boolean(),l]).describe(`Automatic version bumping when a changelog entry is generated.`).meta({id:`ChangelogVersioning`}),d=e.object({enabled:e.boolean().describe(`Master switch (enabled when the section is defined).`).optional(),workflows:s.describe("Which workflows to write into `.github/workflows`.").optional(),branches:e.object({main:e.string().optional(),dev:e.string().optional()}).describe(`Branch names the workflows target.`).optional(),types:e.array(e.string()).describe(`Allowed commit types (commitlint).`).optional(),scopes:e.array(e.string()).describe(`Allowed commit scopes (commitlint).`).optional(),versioning:u.describe("Automatic version bumping on changelog generation (default `true`).").optional(),vscode:e.boolean().describe(`Write the Conventional-Commits VS Code settings.`).optional()}).meta({id:`ToolchainChangelogConfig`}),f=e.object({enabled:e.boolean().describe(`Master switch (enabled when the section is defined).`).optional(),vscode:e.boolean().describe(`Write the Biome VS Code settings (default true).`).optional(),overrides:e.record(e.string(),e.unknown()).describe("Deep-merged over the generated `biome.json` (arrays union).").optional()}).meta({id:`ToolchainBiomeConfig`}),p=e.object({enabled:e.boolean().describe(`Master switch (enabled when the section is defined).`).optional(),glob:e.string().describe("Glob for workspace `tsconfig.default.json` files.").optional(),appGlob:e.string().describe(`Glob for "override" (app) workspaces.`).optional(),refs:e.boolean().describe(`Wire project references (default false).`).optional(),composite:e.boolean().describe("Emit `composite: true` (default false).").optional(),aliases:e.boolean().describe(`Inject path aliases (default true).`).optional(),indent:e.number().describe(`JSON indentation (default 4).`).optional(),rootFile:e.string().describe("The monorepo tsconfig file name (default `tsconfig.monorepo.json`).").optional()}).meta({id:`ToolchainTsconfigConfig`}),m=e.object({enabled:e.boolean().describe(`Watch by default (enabled when the section is defined).`).optional(),debounce:e.number().describe(`Debounce window in ms (default 150).`).optional()}).meta({id:`ToolchainWatchConfig`}),h=e.object({level:e.enum([`debug`,`info`,`warn`,`error`,`silent`]).describe("Minimum level to print (default `info`).").optional(),color:e.boolean().describe("Force colours on/off (default: on; `--no-color` disables).").optional(),name:e.string().describe("Prefix non-indented lines with `<name>:` (default `dbx`).").optional()}).meta({id:`ToolchainLoggerConfig`}),g=e.object({color:e.boolean().describe(`Force provider command colours on/off (default: inherit the logger).`).optional()}).meta({id:`ToolchainProvidersConfig`}),_=e.enum([`builtin`,`local`,`npm`,`git`,`vite-plus`]).describe(`How to load the source.`).meta({id:`ToolchainTemplateSourceType`}),v=e.enum([`project`,`workspace`,`application`,`folder`,`tooling`,`pipeline`]).describe(`What the template produces.`).meta({id:`ToolchainTemplateKind`}),y=e.object({type:_,locate:e.string().describe(`A builtin id, local dir, npm scope, git URL or Vite+ id.`),id:e.string().describe(`Stable id (defaults to the basename/scope).`).optional(),name:e.string().describe(`Display name override.`).optional(),description:e.string().describe(`Description override.`).optional(),kind:v.optional(),ref:e.string().describe(`Git branch/tag/commit.`).optional(),subdir:e.string().describe(`Subdirectory within the source that holds the template.`).optional(),tags:e.array(e.string()).describe(`Free-form tags.`).optional(),online:e.boolean().describe(`Whether the source needs network access.`).optional()}).meta({id:`ToolchainTemplateSource`}),b=e.object({enabled:e.boolean().describe(`Master switch (enabled when the section is defined).`).optional(),sources:e.array(y).describe(`Extra sources on top of the builtin + registry sources.`).optional()}).meta({id:`ToolchainTemplatesConfig`}),x=e.object({config:e.boolean().describe("Write the managed `vite.config.ts` (default true).").optional()}).catchall(e.unknown()).meta({id:`ToolchainViteConfig`});function S(t){return e.union([e.boolean(),t])}const C=e.object({project:n.optional(),changelog:S(d).optional(),biome:S(f).optional(),tsconfig:S(p).optional(),templates:S(b).optional(),vite:S(x).optional(),watch:S(m).optional(),logger:S(h).optional(),providers:S(g).optional()}).meta({id:`ToolchainConfigSections`}),w=e.object({toolchain:C.optional()}).meta({id:`DbxConfigSections`}),T={ProjectType:t,ToolchainProjectConfig:n,WorkflowStep:r,WorkflowStepsConfig:i,WorkflowConfig:a,WorkflowSetting:o,ChangelogWorkflowsConfig:s,ChangelogVersioningTarget:c,ChangelogVersioningConfig:l,ChangelogVersioning:u,ToolchainChangelogConfig:d,ToolchainBiomeConfig:f,ToolchainTsconfigConfig:p,ToolchainWatchConfig:m,ToolchainTemplateSourceType:_,ToolchainTemplateKind:v,ToolchainTemplateSource:y,ToolchainTemplatesConfig:b,ToolchainViteConfig:x,ToolchainLoggerConfig:h,ToolchainProvidersConfig:g,ToolchainConfigSections:C,DbxConfigSections:w},E={project:n,changelog:d,biome:f,tsconfig:p,templates:b,vite:x,watch:m,logger:h,providers:g},D={project:`Project metadata used as replacement tokens across every template.`,changelog:`Conventional-Commits CI, commitlint and the changelog pipeline.`,biome:"Biome config generation (for consumers that still want a `biome.json`).",tsconfig:`Workspace tsconfig generation (path aliases + project references).`,templates:`Template sources / scaffolding.`,vite:"The full Vite+ config; `dbx sync` writes the root `vite.config.ts` from it.",watch:"Watch behaviour for `dbx watch`.",logger:`Logging level, colours and prefix for toolchain output.`,providers:`Provider command behaviour (eg. colour for the provider passthrough commands).`};export{D as CONFIG_SECTION_DESCRIPTIONS,E as CONFIG_SECTION_SCHEMAS,T as CONFIG_TYPE_SCHEMAS,f as biomeConfigSchema,d as changelogConfigSchema,l as changelogVersioningConfigSchema,u as changelogVersioningSchema,c as changelogVersioningTargetSchema,s as changelogWorkflowsConfigSchema,w as dbxConfigSchema,h as loggerConfigSchema,n as projectConfigSchema,t as projectTypeSchema,g as providersConfigSchema,v as templateKindSchema,y as templateSourceSchema,_ as templateSourceTypeSchema,b as templatesConfigSchema,C as toolchainConfigSchema,p as tsconfigConfigSchema,x as viteConfigSchema,m as watchConfigSchema,a as workflowConfigSchema,o as workflowSettingSchema,r as workflowStepSchema,i as workflowStepsConfigSchema};
|
|
@@ -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
|
|
6
|
+
export interface ToolchainProjectConfig {
|
|
6
7
|
type?: ProjectType;
|
|
7
8
|
/** The unscoped project name. */
|
|
8
9
|
name?: string;
|
|
@@ -70,7 +71,18 @@ export interface ChangelogWorkflowsConfig {
|
|
|
70
71
|
issues?: WorkflowSetting;
|
|
71
72
|
sync?: WorkflowSetting;
|
|
72
73
|
}
|
|
73
|
-
export
|
|
74
|
+
export type ChangelogVersioningTarget = 'uniform' | 'root-only' | 'individual';
|
|
75
|
+
export interface ChangelogVersioningConfig {
|
|
76
|
+
target?: ChangelogVersioningTarget;
|
|
77
|
+
/**
|
|
78
|
+
* Glob patterns selecting the workspaces to version (relative to the root). Defaults to the root
|
|
79
|
+
* `package.json` `workspaces` field; when there is none the root `package.json` is used on its
|
|
80
|
+
* own.
|
|
81
|
+
*/
|
|
82
|
+
workspaces?: Array<string>;
|
|
83
|
+
}
|
|
84
|
+
export type ChangelogVersioning = boolean | ChangelogVersioningConfig;
|
|
85
|
+
export interface ToolchainChangelogConfig {
|
|
74
86
|
/** Master switch (enabled when the section is defined). */
|
|
75
87
|
enabled?: boolean;
|
|
76
88
|
workflows?: ChangelogWorkflowsConfig;
|
|
@@ -82,10 +94,11 @@ export interface ToolingChangelogConfig {
|
|
|
82
94
|
types?: Array<string>;
|
|
83
95
|
/** Allowed commit scopes (commitlint). */
|
|
84
96
|
scopes?: Array<string>;
|
|
97
|
+
versioning?: ChangelogVersioning;
|
|
85
98
|
/** Write the Conventional-Commits VS Code settings. */
|
|
86
99
|
vscode?: boolean;
|
|
87
100
|
}
|
|
88
|
-
export interface
|
|
101
|
+
export interface ToolchainBiomeConfig {
|
|
89
102
|
/** Master switch (enabled when the section is defined). */
|
|
90
103
|
enabled?: boolean;
|
|
91
104
|
/** Write the Biome VS Code settings (default true). */
|
|
@@ -93,7 +106,7 @@ export interface ToolingBiomeConfig {
|
|
|
93
106
|
/** Deep-merged over the generated `biome.json` (arrays union). */
|
|
94
107
|
overrides?: Record<string, unknown>;
|
|
95
108
|
}
|
|
96
|
-
export interface
|
|
109
|
+
export interface ToolchainTsconfigConfig {
|
|
97
110
|
/** Master switch (enabled when the section is defined). */
|
|
98
111
|
enabled?: boolean;
|
|
99
112
|
/** Glob for workspace `tsconfig.default.json` files. */
|
|
@@ -111,17 +124,17 @@ export interface ToolingTsconfigConfig {
|
|
|
111
124
|
/** The monorepo tsconfig file name (default `tsconfig.monorepo.json`). */
|
|
112
125
|
rootFile?: string;
|
|
113
126
|
}
|
|
114
|
-
export interface
|
|
127
|
+
export interface ToolchainWatchConfig {
|
|
115
128
|
/** Watch by default (enabled when the section is defined). */
|
|
116
129
|
enabled?: boolean;
|
|
117
130
|
/** Debounce window in ms (default 150). */
|
|
118
131
|
debounce?: number;
|
|
119
132
|
}
|
|
120
|
-
export type
|
|
121
|
-
export type
|
|
122
|
-
export interface
|
|
133
|
+
export type ToolchainTemplateSourceType = 'builtin' | 'local' | 'npm' | 'git' | 'vite-plus';
|
|
134
|
+
export type ToolchainTemplateKind = 'project' | 'workspace' | 'application' | 'folder' | 'tooling' | 'pipeline';
|
|
135
|
+
export interface ToolchainTemplateSource {
|
|
123
136
|
/** @required */
|
|
124
|
-
type:
|
|
137
|
+
type: ToolchainTemplateSourceType;
|
|
125
138
|
/**
|
|
126
139
|
* A builtin id, local dir, npm scope, git URL or Vite+ id.
|
|
127
140
|
*
|
|
@@ -134,7 +147,7 @@ export interface ToolingTemplateSource {
|
|
|
134
147
|
name?: string;
|
|
135
148
|
/** Description override. */
|
|
136
149
|
description?: string;
|
|
137
|
-
kind?:
|
|
150
|
+
kind?: ToolchainTemplateKind;
|
|
138
151
|
/** Git branch/tag/commit. */
|
|
139
152
|
ref?: string;
|
|
140
153
|
/** Subdirectory within the source that holds the template. */
|
|
@@ -144,50 +157,40 @@ export interface ToolingTemplateSource {
|
|
|
144
157
|
/** Whether the source needs network access. */
|
|
145
158
|
online?: boolean;
|
|
146
159
|
}
|
|
147
|
-
export interface
|
|
160
|
+
export interface ToolchainTemplatesConfig {
|
|
148
161
|
/** Master switch (enabled when the section is defined). */
|
|
149
162
|
enabled?: boolean;
|
|
150
163
|
/** Extra sources on top of the builtin + registry sources. */
|
|
151
|
-
sources?: Array<
|
|
164
|
+
sources?: Array<ToolchainTemplateSource>;
|
|
152
165
|
}
|
|
153
|
-
export
|
|
154
|
-
/**
|
|
155
|
-
enabled?: boolean;
|
|
156
|
-
/** Write the managed `vite.config.ts` (default true when the section is set). */
|
|
166
|
+
export type ToolchainViteConfig = ViteUserConfig & {
|
|
167
|
+
/** Write the managed `vite.config.ts` (default true). */
|
|
157
168
|
config?: boolean;
|
|
158
|
-
|
|
159
|
-
|
|
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 {
|
|
169
|
+
};
|
|
170
|
+
export interface ToolchainLoggerConfig {
|
|
168
171
|
/** Minimum level to print (default `info`). */
|
|
169
172
|
level?: 'debug' | 'info' | 'warn' | 'error' | 'silent';
|
|
170
|
-
/** Force colours on/off (default:
|
|
173
|
+
/** Force colours on/off (default: on; `--no-color` disables). */
|
|
171
174
|
color?: boolean;
|
|
172
175
|
/** Prefix non-indented lines with `<name>:` (default `dbx`). */
|
|
173
176
|
name?: string;
|
|
174
177
|
}
|
|
175
|
-
export interface
|
|
178
|
+
export interface ToolchainProvidersConfig {
|
|
176
179
|
/** Force provider command colours on/off (default: inherit the logger). */
|
|
177
180
|
color?: boolean;
|
|
178
181
|
}
|
|
179
|
-
export interface
|
|
180
|
-
project?:
|
|
181
|
-
changelog?: boolean |
|
|
182
|
-
biome?: boolean |
|
|
183
|
-
tsconfig?: boolean |
|
|
184
|
-
templates?: boolean |
|
|
185
|
-
vite?: boolean |
|
|
186
|
-
watch?: boolean |
|
|
187
|
-
logger?: boolean |
|
|
188
|
-
providers?: boolean |
|
|
182
|
+
export interface ToolchainConfigSections {
|
|
183
|
+
project?: ToolchainProjectConfig;
|
|
184
|
+
changelog?: boolean | ToolchainChangelogConfig;
|
|
185
|
+
biome?: boolean | ToolchainBiomeConfig;
|
|
186
|
+
tsconfig?: boolean | ToolchainTsconfigConfig;
|
|
187
|
+
templates?: boolean | ToolchainTemplatesConfig;
|
|
188
|
+
vite?: boolean | ToolchainViteConfig;
|
|
189
|
+
watch?: boolean | ToolchainWatchConfig;
|
|
190
|
+
logger?: boolean | ToolchainLoggerConfig;
|
|
191
|
+
providers?: boolean | ToolchainProvidersConfig;
|
|
189
192
|
}
|
|
190
193
|
export interface DbxConfigSections {
|
|
191
|
-
toolchain?:
|
|
194
|
+
toolchain?: ToolchainConfigSections;
|
|
192
195
|
}
|
|
193
196
|
//#endregion
|