@deltabox/toolchain 0.0.0-stage → 1.0.7

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 (235) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/LICENSE +373 -0
  3. package/README.md +235 -2
  4. package/dist/_virtual/_rolldown/runtime.js +1 -0
  5. package/dist/biome.d.ts +4 -0
  6. package/dist/biome.js +1 -0
  7. package/dist/changelog.d.ts +17 -0
  8. package/dist/changelog.js +1 -0
  9. package/dist/cli/commands/index.js +1 -0
  10. package/dist/cli/commands/projects.js +1 -0
  11. package/dist/cli/commands/providers.js +1 -0
  12. package/dist/cli/commands/reset.js +1 -0
  13. package/dist/cli/commands/shared.js +1 -0
  14. package/dist/cli/commands/sync.js +1 -0
  15. package/dist/cli/commands/watch.js +1 -0
  16. package/dist/cli/context.js +1 -0
  17. package/dist/cli/index.d.ts +15 -0
  18. package/dist/cli/index.js +2 -0
  19. package/dist/cli/options.js +1 -0
  20. package/dist/cli/register.d.ts +14 -0
  21. package/dist/cli/register.js +1 -0
  22. package/dist/config.d.ts +18 -0
  23. package/dist/config.js +1 -0
  24. package/dist/core.d.ts +13 -0
  25. package/dist/core.js +1 -0
  26. package/dist/index.d.ts +31 -0
  27. package/dist/index.js +1 -0
  28. package/dist/migrate.d.ts +15 -0
  29. package/dist/migrate.js +1 -0
  30. package/dist/package.js +1 -0
  31. package/dist/packages/biome/src/config.js +1 -0
  32. package/dist/packages/biome/src/index.d.ts +34 -0
  33. package/dist/packages/biome/src/index.js +1 -0
  34. package/dist/packages/biome/src/vscode-settings.js +1 -0
  35. package/dist/packages/changelog/src/cli/index.d.ts +8 -0
  36. package/dist/packages/changelog/src/cli/index.js +1 -0
  37. package/dist/packages/changelog/src/index.d.ts +19 -0
  38. package/dist/packages/changelog/src/index.js +1 -0
  39. package/dist/packages/changelog/src/run-workflows.d.ts +35 -0
  40. package/dist/packages/changelog/src/run-workflows.js +1 -0
  41. package/dist/packages/changelog/src/run.d.ts +14 -0
  42. package/dist/packages/changelog/src/run.js +1 -0
  43. package/dist/packages/changelog/src/sync.d.ts +18 -0
  44. package/dist/packages/changelog/src/sync.js +1 -0
  45. package/dist/packages/changelog/src/templates.d.ts +27 -0
  46. package/dist/packages/changelog/src/templates.js +27 -0
  47. package/dist/packages/changelog/src/utils/args.d.ts +7 -0
  48. package/dist/packages/changelog/src/utils/args.js +1 -0
  49. package/dist/packages/changelog/src/utils/format.d.ts +27 -0
  50. package/dist/packages/changelog/src/utils/format.js +5 -0
  51. package/dist/packages/changelog/src/utils/git.d.ts +9 -0
  52. package/dist/packages/changelog/src/utils/git.js +1 -0
  53. package/dist/packages/changelog/src/utils/packages.js +4 -0
  54. package/dist/packages/changelog/src/utils/reformat.d.ts +9 -0
  55. package/dist/packages/changelog/src/utils/reformat.js +6 -0
  56. package/dist/packages/changelog/src/utils/repo.js +1 -0
  57. package/dist/packages/changelog/src/utils/summary.d.ts +7 -0
  58. package/dist/packages/changelog/src/utils/summary.js +1 -0
  59. package/dist/packages/changelog/src/utils/types.d.ts +58 -0
  60. package/dist/packages/changelog/src/utils/version.d.ts +6 -0
  61. package/dist/packages/changelog/src/utils/version.js +14 -0
  62. package/dist/packages/changelog/src/utils/write.js +1 -0
  63. package/dist/packages/changelog/src/workflows.d.ts +51 -0
  64. package/dist/packages/changelog/src/workflows.js +5 -0
  65. package/dist/packages/config/src/cli/index.d.ts +28 -0
  66. package/dist/packages/config/src/cli/index.js +1 -0
  67. package/dist/packages/config/src/collect.d.ts +19 -0
  68. package/dist/packages/config/src/collect.js +1 -0
  69. package/dist/packages/config/src/config-json.d.ts +33 -0
  70. package/dist/packages/config/src/config-json.js +1 -0
  71. package/dist/packages/config/src/engine.d.ts +56 -0
  72. package/dist/packages/config/src/engine.js +1 -0
  73. package/dist/packages/config/src/env-file.d.ts +33 -0
  74. package/dist/packages/config/src/env-file.js +3 -0
  75. package/dist/packages/config/src/env.d.ts +31 -0
  76. package/dist/packages/config/src/env.js +1 -0
  77. package/dist/packages/config/src/generators/cli.d.ts +78 -0
  78. package/dist/packages/config/src/generators/cli.js +1 -0
  79. package/dist/packages/config/src/generators/env.d.ts +42 -0
  80. package/dist/packages/config/src/generators/env.js +23 -0
  81. package/dist/packages/config/src/generators/index.d.ts +8 -0
  82. package/dist/packages/config/src/generators/index.js +1 -0
  83. package/dist/packages/config/src/generators/json.d.ts +24 -0
  84. package/dist/packages/config/src/generators/json.js +1 -0
  85. package/dist/packages/config/src/generators/markdown.d.ts +77 -0
  86. package/dist/packages/config/src/generators/markdown.js +27 -0
  87. package/dist/packages/config/src/generators/types.d.ts +32 -0
  88. package/dist/packages/config/src/generators/types.js +1 -0
  89. package/dist/packages/config/src/index.d.ts +21 -0
  90. package/dist/packages/config/src/index.js +1 -0
  91. package/dist/packages/config/src/root.d.ts +11 -0
  92. package/dist/packages/config/src/root.js +1 -0
  93. package/dist/packages/config/src/schema.d.ts +34 -0
  94. package/dist/packages/config/src/schema.js +1 -0
  95. package/dist/packages/config/src/types.d.ts +75 -0
  96. package/dist/packages/config/src/types.js +1 -0
  97. package/dist/packages/core/src/graph.d.ts +55 -0
  98. package/dist/packages/core/src/graph.js +1 -0
  99. package/dist/packages/core/src/index.d.ts +16 -0
  100. package/dist/packages/core/src/index.js +1 -0
  101. package/dist/packages/core/src/loader.d.ts +27 -0
  102. package/dist/packages/core/src/loader.js +1 -0
  103. package/dist/packages/core/src/manifest.d.ts +17 -0
  104. package/dist/packages/core/src/manifest.js +1 -0
  105. package/dist/packages/core/src/project-type.d.ts +14 -0
  106. package/dist/packages/core/src/project-type.js +1 -0
  107. package/dist/packages/core/src/reset.d.ts +51 -0
  108. package/dist/packages/core/src/reset.js +1 -0
  109. package/dist/packages/core/src/select.d.ts +32 -0
  110. package/dist/packages/core/src/select.js +1 -0
  111. package/dist/packages/core/src/sync.d.ts +42 -0
  112. package/dist/packages/core/src/sync.js +1 -0
  113. package/dist/packages/core/src/vscode.d.ts +27 -0
  114. package/dist/packages/core/src/vscode.js +1 -0
  115. package/dist/packages/core/src/watch.d.ts +17 -0
  116. package/dist/packages/core/src/watch.js +1 -0
  117. package/dist/packages/migrate/src/biome.d.ts +18 -0
  118. package/dist/packages/migrate/src/biome.js +2 -0
  119. package/dist/packages/migrate/src/check.d.ts +14 -0
  120. package/dist/packages/migrate/src/check.js +1 -0
  121. package/dist/packages/migrate/src/cli/index.d.ts +12 -0
  122. package/dist/packages/migrate/src/cli/index.js +1 -0
  123. package/dist/packages/migrate/src/dprint.d.ts +18 -0
  124. package/dist/packages/migrate/src/dprint.js +1 -0
  125. package/dist/packages/migrate/src/eslint.d.ts +24 -0
  126. package/dist/packages/migrate/src/eslint.js +1 -0
  127. package/dist/packages/migrate/src/index.d.ts +14 -0
  128. package/dist/packages/migrate/src/index.js +1 -0
  129. package/dist/packages/migrate/src/oxfmt-map.d.ts +28 -0
  130. package/dist/packages/migrate/src/oxfmt-map.js +1 -0
  131. package/dist/packages/migrate/src/oxlint-map.d.ts +22 -0
  132. package/dist/packages/migrate/src/oxlint-map.js +1 -0
  133. package/dist/packages/migrate/src/prettier.d.ts +20 -0
  134. package/dist/packages/migrate/src/prettier.js +2 -0
  135. package/dist/packages/migrate/src/registry.d.ts +26 -0
  136. package/dist/packages/migrate/src/registry.js +1 -0
  137. package/dist/packages/migrate/src/types.d.ts +75 -0
  138. package/dist/packages/migrate/src/vite-target.d.ts +31 -0
  139. package/dist/packages/migrate/src/vite-target.js +5 -0
  140. package/dist/packages/project/src/cli/index.d.ts +8 -0
  141. package/dist/packages/project/src/cli/index.js +1 -0
  142. package/dist/packages/project/src/config.d.ts +55 -0
  143. package/dist/packages/project/src/config.js +1 -0
  144. package/dist/packages/project/src/index.d.ts +10 -0
  145. package/dist/packages/project/src/index.js +1 -0
  146. package/dist/packages/project/src/typescript.d.ts +66 -0
  147. package/dist/packages/project/src/typescript.js +22 -0
  148. package/dist/packages/shared/src/config-schema.d.ts +2039 -0
  149. package/dist/packages/shared/src/config-schema.js +1 -0
  150. package/dist/packages/shared/src/fs-utils.d.ts +18 -0
  151. package/dist/packages/shared/src/fs-utils.js +1 -0
  152. package/dist/packages/shared/src/index.d.ts +17 -0
  153. package/dist/packages/shared/src/index.js +1 -0
  154. package/dist/packages/shared/src/object-utils.d.ts +15 -0
  155. package/dist/packages/shared/src/object-utils.js +1 -0
  156. package/dist/packages/shared/src/provider.d.ts +66 -0
  157. package/dist/packages/shared/src/provider.js +1 -0
  158. package/dist/packages/shared/src/run.d.ts +26 -0
  159. package/dist/packages/shared/src/run.js +1 -0
  160. package/dist/packages/shared/src/string-utils.d.ts +52 -0
  161. package/dist/packages/shared/src/string-utils.js +3 -0
  162. package/dist/packages/shared/src/template.d.ts +53 -0
  163. package/dist/packages/shared/src/template.js +1 -0
  164. package/dist/packages/shared/src/toolchain.d.ts +159 -0
  165. package/dist/packages/shared/src/toolchain.js +1 -0
  166. package/dist/packages/shared/src/types.d.ts +100 -0
  167. package/dist/packages/shared/src/yaml.d.ts +17 -0
  168. package/dist/packages/shared/src/yaml.js +5 -0
  169. package/dist/packages/template/src/builtin.d.ts +10 -0
  170. package/dist/packages/template/src/builtin.js +1 -0
  171. package/dist/packages/template/src/cli/index.d.ts +8 -0
  172. package/dist/packages/template/src/cli/index.js +1 -0
  173. package/dist/packages/template/src/index.d.ts +10 -0
  174. package/dist/packages/template/src/index.js +1 -0
  175. package/dist/packages/template/src/local.d.ts +20 -0
  176. package/dist/packages/template/src/local.js +1 -0
  177. package/dist/packages/template/src/online.d.ts +17 -0
  178. package/dist/packages/template/src/online.js +1 -0
  179. package/dist/packages/template/src/registry.d.ts +48 -0
  180. package/dist/packages/template/src/registry.js +1 -0
  181. package/dist/packages/template/src/scaffold.d.ts +25 -0
  182. package/dist/packages/template/src/scaffold.js +1 -0
  183. package/dist/packages/template/src/types.d.ts +59 -0
  184. package/dist/packages/tsconfig/src/cli/generate/index.d.ts +35 -0
  185. package/dist/packages/tsconfig/src/cli/generate/index.js +1 -0
  186. package/dist/packages/tsconfig/src/cli/generate/utils.d.ts +43 -0
  187. package/dist/packages/tsconfig/src/cli/generate/utils.js +1 -0
  188. package/dist/packages/tsconfig/src/cli/index.d.ts +11 -0
  189. package/dist/packages/tsconfig/src/cli/index.js +1 -0
  190. package/dist/packages/tsconfig/src/index.d.ts +10 -0
  191. package/dist/packages/tsconfig/src/index.js +1 -0
  192. package/dist/packages/tsconfig/src/sync.d.ts +15 -0
  193. package/dist/packages/tsconfig/src/sync.js +1 -0
  194. package/dist/packages/tsconfig/src/templates/tsconfig.base.js +1 -0
  195. package/dist/packages/tsconfig/src/templates/tsconfig.build.js +1 -0
  196. package/dist/packages/tsconfig/src/templates/tsconfig.default.js +1 -0
  197. package/dist/packages/tsconfig/src/templates.d.ts +38 -0
  198. package/dist/packages/tsconfig/src/templates.js +1 -0
  199. package/dist/packages/tsdown/src/cleanup.d.ts +17 -0
  200. package/dist/packages/tsdown/src/cleanup.js +1 -0
  201. package/dist/packages/tsdown/src/cli/index.d.ts +11 -0
  202. package/dist/packages/tsdown/src/cli/index.js +1 -0
  203. package/dist/packages/tsdown/src/config/node.d.ts +37 -0
  204. package/dist/packages/tsdown/src/config/node.js +3 -0
  205. package/dist/packages/tsdown/src/index.d.ts +9 -0
  206. package/dist/packages/tsdown/src/index.js +1 -0
  207. package/dist/packages/vite/src/cli/index.d.ts +8 -0
  208. package/dist/packages/vite/src/cli/index.js +1 -0
  209. package/dist/packages/vite/src/commands.d.ts +29 -0
  210. package/dist/packages/vite/src/commands.js +1 -0
  211. package/dist/packages/vite/src/index.d.ts +8 -0
  212. package/dist/packages/vite/src/index.js +1 -0
  213. package/dist/packages/vite/src/provider.d.ts +11 -0
  214. package/dist/packages/vite/src/provider.js +1 -0
  215. package/dist/packages/vite/src/sync.d.ts +25 -0
  216. package/dist/packages/vite/src/sync.js +2 -0
  217. package/dist/packages/vite/src/vp.d.ts +59 -0
  218. package/dist/packages/vite/src/vp.js +1 -0
  219. package/dist/project.d.ts +7 -0
  220. package/dist/project.js +1 -0
  221. package/dist/providers.d.ts +11 -0
  222. package/dist/providers.js +1 -0
  223. package/dist/shared.d.ts +14 -0
  224. package/dist/shared.js +1 -0
  225. package/dist/sync.d.ts +12 -0
  226. package/dist/sync.js +1 -0
  227. package/dist/template.d.ts +11 -0
  228. package/dist/template.js +1 -0
  229. package/dist/tsconfig.d.ts +8 -0
  230. package/dist/tsconfig.js +1 -0
  231. package/dist/tsdown.d.ts +7 -0
  232. package/dist/tsdown.js +1 -0
  233. package/dist/vite.d.ts +9 -0
  234. package/dist/vite.js +1 -0
  235. package/package.json +114 -3
@@ -0,0 +1,75 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { ZodType } from "zod";
4
+ import { Schema } from "untyped";
5
+ //#region packages/config/src/types.d.ts
6
+ /** The value type an env var resolves to. */
7
+ export type EnvValueType = 'string' | 'number' | 'boolean' | 'array' | 'object';
8
+ /**
9
+ * The metadata a consumer attaches to a Zod leaf via `.meta()` to describe the
10
+ * environment variable that backs a configuration value.
11
+ */
12
+ export interface EnvVarMeta {
13
+ /** The env var name, e.g. `MYAPP_AUTH_PASSWORD`. */
14
+ env: string;
15
+ /** The dotted config path, e.g. `auth.password`. */
16
+ path?: string;
17
+ /** Human-readable description (used by `.env.example` + the docs). */
18
+ description?: string;
19
+ /** Whether the var has no safe default and must be set. */
20
+ required?: boolean;
21
+ /** Whether the value is a secret (never emitted/logged). */
22
+ secret?: boolean;
23
+ /** The scope the variable belongs to. */
24
+ scope?: string;
25
+ /** Whether the variable is safe to expose to the browser (frontend). */
26
+ public?: boolean;
27
+ /**
28
+ * The resolved-config default, when it differs from the raw env default
29
+ * (e.g. the positive field behind a negative-named env flag).
30
+ */
31
+ defaultValue?: unknown;
32
+ }
33
+ /** A collected env-var definition. */
34
+ export interface EnvVarDef {
35
+ name: string;
36
+ path: string;
37
+ description?: string;
38
+ default?: unknown;
39
+ required?: boolean;
40
+ secret?: boolean;
41
+ public?: boolean;
42
+ scope: string;
43
+ envType?: EnvValueType;
44
+ }
45
+ /** One configuration scope: its Zod schema and an optional resolved schema. */
46
+ export interface ConfigScopeDef {
47
+ /** The Zod schema (the single source of truth). */
48
+ zodSchema: ZodType;
49
+ /** A pre-resolved untyped schema (resolved from the Zod schema if omitted). */
50
+ jsonSchema?: Schema;
51
+ }
52
+ /** The scopes registered with an engine, keyed by scope name. */
53
+ export type ConfigScopes = Record<string, ConfigScopeDef>;
54
+ /** Options shared by every generator. */
55
+ export interface ConfigEngineOptions {
56
+ /** The scopes to walk, keyed by scope name (eg. `{ server, frontend, cli }`). */
57
+ scopes: ConfigScopes;
58
+ /** The env-var prefix (eg. `MYAPP_`). Kept as a replacement token in code. */
59
+ envPrefix?: string;
60
+ /**
61
+ * The object key that holds the "flat" base config fields, hoisted out of
62
+ * the nested groups in the generated types/docs (default `base`).
63
+ */
64
+ baseGroup?: string;
65
+ /** The monorepo/project root used for default output paths. */
66
+ root?: string;
67
+ /**
68
+ * Custom env-name -> dotted-path derivation for leaves without an explicit
69
+ * `path` (eg. to handle dual `PREFIX_`/`VITE_` prefixes).
70
+ */
71
+ envPathOf?: (env: string) => string;
72
+ }
73
+ /** Derive the dotted config path from an env var name + prefix. */
74
+ export declare function envPathOf(env: string, prefix?: string): string;
75
+ //#endregion
@@ -0,0 +1 @@
1
+ import"node:path";import"node:url";import.meta.url;function e(e,t=`APP_`){return e.slice(e.startsWith(t)?t.length:0).toLowerCase().replace(/_/g,`.`)}export{e as envPathOf};
@@ -0,0 +1,55 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ //#region packages/core/src/graph.d.ts
4
+ /** Directory names never descended into during discovery. */
5
+ export declare const IGNORED_DIRS: Set<string>;
6
+ /** The package managers a lock file can indicate. */
7
+ export type PackageManager = 'yarn' | 'npm' | 'pnpm' | 'bun';
8
+ /** One discovered package (a `package.json` and/or a dbx config directory). */
9
+ export interface ProjectNode {
10
+ /** The package name (from `package.json`). */
11
+ name?: string;
12
+ /** Directory relative to the graph root (posix). */
13
+ dir: string;
14
+ /** Whether the directory contains a `dbx.config.*` file. */
15
+ hasConfig: boolean;
16
+ /** The dbx config path relative to the root (when present). */
17
+ config?: string;
18
+ /** Names of the other discovered projects this one depends on. */
19
+ dependencies: string[];
20
+ }
21
+ /** The project dependency graph written to `.dbx/toolchain/projects.json`. */
22
+ export interface ProjectGraph {
23
+ root: string;
24
+ packageManager?: PackageManager;
25
+ generatedAt: string;
26
+ /** Every discovered package. */
27
+ projects: ProjectNode[];
28
+ /** The subset with a dbx config (what the tooling syncs). */
29
+ dbxProjects: ProjectNode[];
30
+ /** Dbx project dirs (relative) in dependency order (dependencies first). */
31
+ order: string[];
32
+ }
33
+ export interface BuildProjectGraphOptions {
34
+ /** Maximum directory depth to descend (default 5). */
35
+ maxDepth?: number;
36
+ }
37
+ /** Detect the package manager from the lock file present at the root. */
38
+ export declare function detectPackageManager(root: string): PackageManager | undefined;
39
+ /**
40
+ * Recursively discover projects under `root` and build their dependency graph.
41
+ * Skips `node_modules`, `.dbx/toolchain` and other common/generated directories.
42
+ */
43
+ export declare function buildProjectGraph(root: string, options?: BuildProjectGraphOptions): ProjectGraph;
44
+ /**
45
+ * Topologically order dbx projects so a dependency is always synced before its
46
+ * dependents. Cycles (or missing edges) fall back to the input order.
47
+ */
48
+ export declare function orderProjects(dbxProjects: ProjectNode[]): string[];
49
+ /** The path of the generated project graph for a root. */
50
+ export declare function projectGraphPath(root: string): string;
51
+ /** Write the project graph to `<root>/.dbx/toolchain/projects.json`. */
52
+ export declare function writeProjectGraph(root: string, graph?: ProjectGraph): string;
53
+ /** Read the project graph for a root, or `undefined` when it does not exist. */
54
+ export declare function readProjectGraph(root: string): ProjectGraph | undefined;
55
+ //#endregion
@@ -0,0 +1 @@
1
+ import{default as e}from"node:path";import"node:url";import.meta.url;import{readJsonAt as t,toJson as n}from"../../shared/src/fs-utils.js";import"../../shared/src/index.js";import{findConfigFile as r}from"./loader.js";import i from"node:fs";const a=/* @__PURE__ */ new Set([`node_modules`,`dist`,`build`,`out`,`coverage`,`tmp`,`temp`,`vendor`,`jspm_packages`,`web_modules`]);function o(e){return e.startsWith(`.`)||a.has(e)}function s(t){try{return i.readdirSync(t,{withFileTypes:!0}).filter(e=>e.isDirectory()&&!o(e.name)).map(n=>e.join(t,n.name))}catch{return[]}}function c(t,n){return e.relative(t,n).replace(/\\/g,`/`)||`.`}function l(t){let n=n=>i.existsSync(e.join(t,n));if(n(`yarn.lock`))return`yarn`;if(n(`pnpm-lock.yaml`))return`pnpm`;if(n(`package-lock.json`))return`npm`;if(n(`bun.lock`)||n(`bun.lockb`))return`bun`}const u=[`dependencies`,`devDependencies`,`peerDependencies`,`optionalDependencies`];function d(e,n={}){let i=n.maxDepth??5,a=/* @__PURE__ */ new Map,o=/* @__PURE__ */ new Map,d=(n,l)=>{let u=t(n,`package.json`),f=r(n);if(u||f){let t={...u?.name?{name:u.name}:{},dir:c(e,n),hasConfig:!!f,...f?{config:c(e,f)}:{},dependencies:[]};a.set(n,t),u?.name&&o.set(u.name,n)}if(!(l>=i))for(let e of s(n))d(e,l+1)};d(e,0);for(let[e,n]of a){let r=t(e,`package.json`);if(!r)continue;let i=/* @__PURE__ */ new Set;for(let t of u){let n=r[t];if(n&&typeof n==`object`)for(let t of Object.keys(n)){let n=o.get(t);n&&n!==e&&i.add(t)}}n.dependencies=[...i].sort()}let p=[...a.values()].sort((e,t)=>e.dir.localeCompare(t.dir)),m=p.filter(e=>e.hasConfig);return{root:e,packageManager:l(e),generatedAt:(/* @__PURE__ */ new Date()).toISOString(),projects:p,dbxProjects:m,order:f(m)}}function f(e){let t=/* @__PURE__ */ new Map;for(let n of e)n.name&&t.set(n.name,n.dir);let n=new Map(e.map(e=>[e.dir,e])),r=/* @__PURE__ */ new Set,i=/* @__PURE__ */ new Set,a=[],o=e=>{if(r.has(e)||i.has(e))return;i.add(e);let s=n.get(e);for(let e of s?.dependencies??[]){let r=t.get(e);r&&n.has(r)&&o(r)}i.delete(e),r.add(e),a.push(e)};for(let t of e)o(t.dir);return a}function p(t){return e.join(t,`.dbx`,`toolchain`,`projects.json`)}function m(t,r){let a=p(t);return i.mkdirSync(e.dirname(a),{recursive:!0}),i.writeFileSync(a,n(r??d(t)),`utf-8`),a}function h(e){try{return JSON.parse(i.readFileSync(p(e),`utf-8`))}catch{return}}export{a as IGNORED_DIRS,d as buildProjectGraph,l as detectPackageManager,f as orderProjects,p as projectGraphPath,h as readProjectGraph,m as writeProjectGraph};
@@ -0,0 +1,16 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { BuildProjectGraphOptions, IGNORED_DIRS, PackageManager, ProjectGraph, ProjectNode, buildProjectGraph, detectPackageManager, orderProjects, projectGraphPath, readProjectGraph, writeProjectGraph } from "./graph.js";
4
+ import { LoadedConfig, findConfigFile, loadToolingConfig } from "./loader.js";
5
+ import { MANIFEST_DIR, MANIFEST_FILE, Manifest, readManifest, writeManifest } from "./manifest.js";
6
+ import { detectProjectType, resolveProjectType } from "./project-type.js";
7
+ import { SelectProjectsOptions, SelectedProject, selectProjects } from "./select.js";
8
+ import { ResetProjectsOptions, ResetProjectsResult, ResetSelectors, ResetToolingOptions, ResetToolingResult, resetProjects, resetTooling } from "./reset.js";
9
+ import { RunSyncOptions, SyncResult, runSync } from "./sync.js";
10
+ import { VscodeSyncOptions, vscodeSyncTask } from "./vscode.js";
11
+ import { RunWatchOptions, runWatch } from "./watch.js";
12
+ declare namespace index_d_exports {
13
+ export { BuildProjectGraphOptions, IGNORED_DIRS, LoadedConfig, MANIFEST_DIR, MANIFEST_FILE, Manifest, PackageManager, ProjectGraph, ProjectNode, ResetProjectsOptions, ResetProjectsResult, ResetSelectors, ResetToolingOptions, ResetToolingResult, RunSyncOptions, RunWatchOptions, SelectProjectsOptions, SelectedProject, SyncResult, VscodeSyncOptions, buildProjectGraph, detectPackageManager, detectProjectType, findConfigFile, loadToolingConfig, orderProjects, projectGraphPath, readManifest, readProjectGraph, resetProjects, resetTooling, resolveProjectType, runSync, runWatch, selectProjects, vscodeSyncTask, writeManifest, writeProjectGraph };
14
+ }
15
+ //#endregion
16
+ export { BuildProjectGraphOptions, IGNORED_DIRS, LoadedConfig, MANIFEST_DIR, MANIFEST_FILE, Manifest, PackageManager, ProjectGraph, ProjectNode, ResetProjectsOptions, ResetProjectsResult, ResetSelectors, ResetToolingOptions, ResetToolingResult, RunSyncOptions, RunWatchOptions, SelectProjectsOptions, SelectedProject, SyncResult, VscodeSyncOptions, buildProjectGraph, detectPackageManager, detectProjectType, findConfigFile, index_d_exports, loadToolingConfig, orderProjects, projectGraphPath, readManifest, readProjectGraph, resetProjects, resetTooling, resolveProjectType, runSync, runWatch, selectProjects, vscodeSyncTask, writeManifest, writeProjectGraph };
@@ -0,0 +1 @@
1
+ import"node:path";import"node:url";import.meta.url;import{__exportAll as e}from"../../../_virtual/_rolldown/runtime.js";import{detectProjectType as t,resolveProjectType as n}from"./project-type.js";import{findConfigFile as r,loadToolingConfig as i}from"./loader.js";import{IGNORED_DIRS as a,buildProjectGraph as o,detectPackageManager as s,orderProjects as c,projectGraphPath as l,readProjectGraph as u,writeProjectGraph as d}from"./graph.js";import{MANIFEST_DIR as f,MANIFEST_FILE as p,readManifest as m,writeManifest as h}from"./manifest.js";import{selectProjects as g}from"./select.js";import{resetProjects as _,resetTooling as v}from"./reset.js";import{runSync as y}from"./sync.js";import{vscodeSyncTask as b}from"./vscode.js";import{runWatch as x}from"./watch.js";var S=/* @__PURE__ */ e({IGNORED_DIRS:()=>a,MANIFEST_DIR:()=>f,MANIFEST_FILE:()=>p,buildProjectGraph:()=>o,detectPackageManager:()=>s,detectProjectType:()=>t,findConfigFile:()=>r,loadToolingConfig:()=>i,orderProjects:()=>c,projectGraphPath:()=>l,readManifest:()=>m,readProjectGraph:()=>u,resetProjects:()=>_,resetTooling:()=>v,resolveProjectType:()=>n,runSync:()=>y,runWatch:()=>x,selectProjects:()=>g,vscodeSyncTask:()=>b,writeManifest:()=>h,writeProjectGraph:()=>d});export{a as IGNORED_DIRS,f as MANIFEST_DIR,p as MANIFEST_FILE,o as buildProjectGraph,s as detectPackageManager,t as detectProjectType,r as findConfigFile,i as loadToolingConfig,c as orderProjects,l as projectGraphPath,m as readManifest,u as readProjectGraph,_ as resetProjects,v as resetTooling,n as resolveProjectType,y as runSync,x as runWatch,g as selectProjects,S as src_exports,b as vscodeSyncTask,h as writeManifest,d as writeProjectGraph};
@@ -0,0 +1,27 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { Replacements } from "../../shared/src/template.js";
4
+ import { ProjectType } from "../../shared/src/config-schema.js";
5
+ import { ToolingConfig } from "../../shared/src/toolchain.js";
6
+ import "../../shared/src/index.js";
7
+ //#region packages/core/src/loader.d.ts
8
+ /** A loaded tooling config plus its resolved path + replacement tokens. */
9
+ export interface LoadedConfig {
10
+ config: ToolingConfig;
11
+ /** The config file that was loaded (undefined when none was found). */
12
+ path?: string;
13
+ tokens: Replacements;
14
+ /** The resolved project kind. */
15
+ projectType: ProjectType;
16
+ }
17
+ /** Find the first `dbx.config.*` file at `cwd`, if any. */
18
+ export declare function findConfigFile(cwd?: string): string | undefined;
19
+ /**
20
+ * Load the tooling config for a project. A `dbx.config.*` file exports
21
+ * `{ toolchain: { ...sections } }`; the `toolchain` value is unwrapped here so
22
+ * the rest of the toolchain works with flat sections. When no config file (or no
23
+ * `toolchain` key) exists an empty config is returned (so every task falls back
24
+ * to its defaults).
25
+ */
26
+ export declare function loadToolingConfig(cwd?: string): Promise<LoadedConfig>;
27
+ //#endregion
@@ -0,0 +1 @@
1
+ import{default as e}from"node:path";import{pathToFileURL as t}from"node:url";import.meta.url;import{CONFIG_FILE_NAMES as n,resolveTokens as r}from"../../shared/src/toolchain.js";import"../../shared/src/index.js";import{resolveProjectType as i}from"./project-type.js";import a from"node:fs";function o(t=process.cwd()){for(let r of n){let n=e.resolve(t,r);if(a.existsSync(n))return n}}async function s(e){if(e.endsWith(`.json`))return JSON.parse(a.readFileSync(e,`utf-8`));let n=t(e).href;try{let e=await import(n);return e.default??e}catch(e){try{let{tsImport:e}=await import(`C:\\Users\\user\\coding\\projects\\deltabox\\@deltabox\\toolchain\\node_modules\\tsx\\dist\\esm\\api\\index.mjs`),t=await e(n,import.meta.url);return t.default??t}catch{throw e}}}async function c(e=process.cwd()){let t=o(e),n={};if(t){let e=await s(t),r=e&&typeof e==`object`?e.toolchain:void 0;r&&typeof r==`object`&&(n=r)}let a=r(n);return await n.hooks?.afterLoad?.({cwd:e,config:n,tokens:a,...t?{path:t}:{}}),{config:n,...t?{path:t}:{},tokens:a,projectType:i(e,n)}}export{o as findConfigFile,c as loadToolingConfig};
@@ -0,0 +1,17 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ //#region packages/core/src/manifest.d.ts
4
+ /** The manifest directory + file recording every file the tooling manages. */
5
+ export declare const MANIFEST_DIR = ".dbx/toolchain";
6
+ export declare const MANIFEST_FILE = "manifest.json";
7
+ export interface Manifest {
8
+ /** Repo-relative paths of every generated/managed file. */
9
+ files: string[];
10
+ /** ISO timestamp of the last successful sync (absent when never synced). */
11
+ syncedAt?: string;
12
+ }
13
+ /** Read the manifest (`{ files: [] }` when missing/invalid). */
14
+ export declare function readManifest(cwd: string): Manifest;
15
+ /** Write the manifest, creating the directory as needed. */
16
+ export declare function writeManifest(cwd: string, files: string[], syncedAt?: string): void;
17
+ //#endregion
@@ -0,0 +1 @@
1
+ import{default as e}from"node:path";import"node:url";import.meta.url;import{toJson as t}from"../../shared/src/fs-utils.js";import"../../shared/src/index.js";import n from"node:fs";const r=`.dbx/toolchain`,i=`manifest.json`;function a(t){let a=e.resolve(t,r,i);try{let e=JSON.parse(n.readFileSync(a,`utf-8`));return{files:Array.isArray(e.files)?e.files:[],...typeof e.syncedAt==`string`?{syncedAt:e.syncedAt}:{}}}catch{return{files:[]}}}function o(a,o,s){let c=e.resolve(a,r,i);n.mkdirSync(e.dirname(c),{recursive:!0}),n.writeFileSync(c,t({files:[...new Set(o)].sort(),syncedAt:s??(/* @__PURE__ */ new Date()).toISOString()}),`utf-8`)}export{r as MANIFEST_DIR,i as MANIFEST_FILE,a as readManifest,o as writeManifest};
@@ -0,0 +1,14 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { ProjectType } from "../../shared/src/config-schema.js";
4
+ import { ToolingConfig } from "../../shared/src/toolchain.js";
5
+ import "../../shared/src/index.js";
6
+ //#region packages/core/src/project-type.d.ts
7
+ /**
8
+ * Resolve the project kind: an explicit `project.type` in the config wins,
9
+ * otherwise it is detected from the filesystem.
10
+ */
11
+ export declare function resolveProjectType(cwd: string, config?: ToolingConfig): ProjectType;
12
+ /** Detect the project kind from `cwd` (workspaces / monorepo file heuristics). */
13
+ export declare function detectProjectType(cwd: string): ProjectType;
14
+ //#endregion
@@ -0,0 +1 @@
1
+ import{default as e}from"node:path";import"node:url";import.meta.url;import{readJsonAt as t}from"../../shared/src/fs-utils.js";import"../../shared/src/index.js";import n from"node:fs";function r(e,t={}){return t.project?.type?t.project.type:i(e)}function i(r){let i=t(r,`package.json`)?.workspaces;return(Array.isArray(i)?i.length>0:i&&Array.isArray(i.packages)&&i.packages.length>0)||n.existsSync(e.join(r,`tsconfig.monorepo.json`))?`monorepo-root`:n.existsSync(e.join(r,`tsconfig.default.json`))?`monorepo-workspace`:`project`}export{i as detectProjectType,r as resolveProjectType};
@@ -0,0 +1,51 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { SelectProjectsOptions } from "./select.js";
4
+ //#region packages/core/src/reset.d.ts
5
+ /** What parts of the tooling to remove for a project. */
6
+ export interface ResetSelectors {
7
+ /** Remove the generated/managed files listed in the manifest. */
8
+ generated?: boolean;
9
+ /** Remove the `.dbx/toolchain` directory (manifest + graph). */
10
+ manifest?: boolean;
11
+ /** Remove the `dbx.config.*` file(s). */
12
+ config?: boolean;
13
+ }
14
+ export interface ResetToolingOptions extends ResetSelectors {
15
+ /** The project directory to reset. */
16
+ cwd: string;
17
+ /** Report what would be removed without deleting anything. */
18
+ dryRun?: boolean;
19
+ }
20
+ export interface ResetToolingResult {
21
+ /** Repo-relative paths removed (or that would be removed). */
22
+ removed: string[];
23
+ /** Whether this was a dry run. */
24
+ dryRun: boolean;
25
+ }
26
+ /**
27
+ * Remove the tooling artifacts from a single project: the generated files
28
+ * recorded in `.dbx/toolchain/manifest.json`, the `.dbx/toolchain` directory and/or
29
+ * the `dbx.config.*` file. With no selectors the generated files + the
30
+ * manifest directory are removed (the config is kept).
31
+ */
32
+ export declare function resetTooling(options: ResetToolingOptions): ResetToolingResult;
33
+ export interface ResetProjectsOptions extends ResetSelectors, Omit<SelectProjectsOptions, 'kind'> {
34
+ /** Apply to every discovered project under `root` (not just `root`). */
35
+ recursive?: boolean;
36
+ dryRun?: boolean;
37
+ }
38
+ export interface ResetProjectsResult {
39
+ results: {
40
+ dir: string;
41
+ rel: string;
42
+ removed: string[];
43
+ }[];
44
+ dryRun: boolean;
45
+ }
46
+ /**
47
+ * Reset one or many projects. When `recursive` is set every discovered project
48
+ * (optionally filtered by `include`/`exclude`) is reset; otherwise only `root`.
49
+ */
50
+ export declare function resetProjects(options: ResetProjectsOptions): ResetProjectsResult;
51
+ //#endregion
@@ -0,0 +1 @@
1
+ import{default as e}from"node:path";import"node:url";import.meta.url;import{findConfigFile as t}from"./loader.js";import{MANIFEST_DIR as n,readManifest as r}from"./manifest.js";import{selectProjects as i}from"./select.js";import a from"node:fs";function o(e){return e.replace(/\\/g,`/`)}function s(e){let t=e.generated!==void 0||e.manifest!==void 0||e.config!==void 0;return{generated:e.generated??!t,manifest:e.manifest??!t,config:e.config??!1}}function c(i){let{cwd:c}=i,l=i.dryRun??!1,u=s(i),d=[],f=(e,t)=>{a.existsSync(e)&&(l||a.rmSync(e,{force:!0}),d.push(t))};if(u.generated)for(let t of r(c).files)f(e.resolve(c,t),t);if(u.config){let n=t(c);n&&f(n,o(e.relative(c,n)))}if(u.manifest){let t=e.resolve(c,n);a.existsSync(t)&&(l||a.rmSync(t,{recursive:!0,force:!0}),d.push(`${n}/`))}return{removed:d,dryRun:l}}function l(e){let n=e.dryRun??!1;return{results:(e.recursive?i({root:e.root,...e.include?{include:e.include}:{},...e.exclude?{exclude:e.exclude}:{},...e.maxDepth===void 0?{}:{maxDepth:e.maxDepth}}):[{dir:e.root,rel:`.`,hasConfig:!!t(e.root)}]).map(t=>({dir:t.dir,rel:t.rel,removed:c({cwd:t.dir,...e.generated===void 0?{}:{generated:e.generated},...e.manifest===void 0?{}:{manifest:e.manifest},...e.config===void 0?{}:{config:e.config},dryRun:n}).removed})),dryRun:n}}export{l as resetProjects,c as resetTooling};
@@ -0,0 +1,32 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ //#region packages/core/src/select.d.ts
4
+ /** A project selected by {@link selectProjects}. */
5
+ export interface SelectedProject {
6
+ /** Absolute project directory. */
7
+ dir: string;
8
+ /** Directory relative to the root (posix). */
9
+ rel: string;
10
+ /** Package name when available. */
11
+ name?: string;
12
+ /** Whether the directory has a `dbx.config.*`. */
13
+ hasConfig: boolean;
14
+ }
15
+ export interface SelectProjectsOptions {
16
+ /** Root to scan. */
17
+ root: string;
18
+ /** Keep only projects matching one of these patterns (glob or substring). */
19
+ include?: string[];
20
+ /** Drop projects matching any of these patterns (glob or substring). */
21
+ exclude?: string[];
22
+ /**
23
+ * What to keep: `all` (default), `configured` (has a dbx config) or
24
+ * `unconfigured` (missing a dbx config).
25
+ */
26
+ kind?: 'all' | 'configured' | 'unconfigured';
27
+ /** Maximum directory depth to scan (default 5). */
28
+ maxDepth?: number;
29
+ }
30
+ /** Discover projects under a root, applying include/exclude + kind filters. */
31
+ export declare function selectProjects(options: SelectProjectsOptions): SelectedProject[];
32
+ //#endregion
@@ -0,0 +1 @@
1
+ import{default as e}from"node:path";import"node:url";import.meta.url;import{buildProjectGraph as t}from"./graph.js";const n=/[*?[\]{}]/,r=`<<dbx-globstar>>`;function i(e){let t=e.replace(/[.+^${}()|\\]/g,`\\$&`).replace(/\*\*/g,r).replace(/\*/g,`[^/]*`).replaceAll(r,`.*`).replace(/\?/g,`.`);return RegExp(`^${t}$`,`i`)}function a(t,r){let a=[t.rel,t.name??``,e.basename(t.rel)];if(n.test(r)){let e=i(r);return a.some(t=>e.test(t))}let o=r.toLowerCase();return a.some(e=>e.toLowerCase().includes(o))}function o(n){let r=t(n.root,n.maxDepth===void 0?{}:{maxDepth:n.maxDepth}).projects.map(t=>({dir:e.resolve(n.root,t.dir),rel:t.dir,...t.name?{name:t.name}:{},hasConfig:t.hasConfig})),i=n.kind??`all`,o=n.include?.filter(Boolean)??[],s=n.exclude?.filter(Boolean)??[];return r.filter(e=>!(i===`configured`&&!e.hasConfig||i===`unconfigured`&&e.hasConfig||o.length>0&&!o.some(t=>a(e,t))||s.some(t=>a(e,t))))}export{o as selectProjects};
@@ -0,0 +1,42 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { Replacements } from "../../shared/src/template.js";
4
+ import { ProjectType } from "../../shared/src/config-schema.js";
5
+ import { SyncTask, ToolingConfig } from "../../shared/src/toolchain.js";
6
+ import "../../shared/src/index.js";
7
+ //#region packages/core/src/sync.d.ts
8
+ export interface RunSyncOptions {
9
+ /** The task list to run. */
10
+ tasks: SyncTask[];
11
+ /** The project root. */
12
+ cwd: string;
13
+ /** The loaded config. */
14
+ config: ToolingConfig;
15
+ /** The resolved replacement tokens. */
16
+ tokens: Replacements;
17
+ /** The project kind (resolved from the config/cwd when omitted). */
18
+ projectType?: ProjectType;
19
+ /** Dry-run: report drift and exit non-zero without writing. */
20
+ check?: boolean;
21
+ /** Suppress logging. */
22
+ quiet?: boolean;
23
+ /** Custom logger (default `console.log`). */
24
+ log?: (message: string) => void;
25
+ }
26
+ export interface SyncResult {
27
+ /** Paths written (empty in check mode). */
28
+ written: string[];
29
+ /** Paths whose generated content differs from disk. */
30
+ changed: string[];
31
+ /** Previously-managed paths removed because they are no longer generated. */
32
+ removed: string[];
33
+ /** Whether disk already matched the generated output. */
34
+ upToDate: boolean;
35
+ }
36
+ /**
37
+ * Run every enabled sync task, writing the managed files and pruning files that
38
+ * are no longer generated. With `check: true` nothing is written: drift is
39
+ * reported instead (for CI).
40
+ */
41
+ export declare function runSync(options: RunSyncOptions): Promise<SyncResult>;
42
+ //#endregion
@@ -0,0 +1 @@
1
+ import{default as e}from"node:path";import"node:url";import.meta.url;import{resolveProjectType as t}from"./project-type.js";import{readManifest as n,writeManifest as r}from"./manifest.js";import i from"node:fs";function a(e){return e.replace(/\\/g,`/`)}async function o(o){let{tasks:s,cwd:c,config:l,tokens:u}=o,d=o.quiet?()=>{}:o.log??(e=>console.log(e)),f=o.projectType??t(c,l),p={cwd:c,projectType:f,config:l,tokens:u,log:d},m=l.hooks??{};await m.beforeSync?.(p);let h=s.filter(e=>(!e.projectTypes||e.projectTypes.includes(f))&&(!e.enabled||e.enabled(l)));d(`dbx: running ${h.length} task(s)${o.check?` (check)`:``} [${f}]`);let g=[];for(let e of h){d(` - ${e.name}`),await m.beforeTask?.({task:e,ctx:p});let t=await e.run(p),n=Array.isArray(t)?t:void 0;n&&g.push(...n),await m.afterTask?.({task:e,ctx:p,...n?{files:n}:{}})}let _=new Map(g.map(e=>[a(e.path),e.content])),v=n(c),y=/* @__PURE__ */ new Set;for(let e of h)for(let t of e.keep??[])y.add(t);let b=e=>{for(let t of y)if(e===t||e.endsWith(`/${t}`)||e.endsWith(t))return!0;return!1},x=[];for(let[t,n]of _){let r=e.resolve(c,t);(i.existsSync(r)?i.readFileSync(r,`utf-8`):void 0)!==n&&x.push(t)}let S=v.files.filter(t=>!_.has(t)&&!b(t)&&i.existsSync(e.resolve(c,t))),C=x.length===0&&S.length===0;if(o.check){if(C)d(`dbx: generated files are in sync.`);else{d(`dbx: generated files are out of date:`);for(let e of x)d(` M ${e}`);for(let e of S)d(` D ${e}`);d("Run `dbx sync` to regenerate them.")}let e={written:[],changed:x,removed:S,upToDate:C};return await m.afterSync?.({cwd:c,config:l,result:e}),e}let w=[];for(let[t,n]of _){let r=e.resolve(c,t);i.mkdirSync(e.dirname(r),{recursive:!0}),i.writeFileSync(r,n,`utf-8`),w.push(t)}for(let t of S)i.rmSync(e.resolve(c,t),{force:!0});r(c,[..._.keys()]),d(`dbx: wrote ${w.length}, removed ${S.length} file(s)${x.length?`, updated ${x.length}`:``}.`);let T={written:w,changed:x,removed:S,upToDate:C};return await m.afterSync?.({cwd:c,config:l,result:T}),T}export{o as runSync};
@@ -0,0 +1,27 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { ProjectType } from "../../shared/src/config-schema.js";
4
+ import { SyncTask, ToolingConfig } from "../../shared/src/toolchain.js";
5
+ import "../../shared/src/index.js";
6
+ //#region packages/core/src/vscode.d.ts
7
+ export interface VscodeSyncOptions {
8
+ /**
9
+ * Settings patches, deep-merged in order (then merged into the consumer's).
10
+ * A function lets the patches depend on the config (eg. only inject Biome
11
+ * settings when the `biome` section is enabled).
12
+ */
13
+ settings?: Record<string, unknown>[] | ((config: ToolingConfig) => Record<string, unknown>[]);
14
+ /** Recommended extensions (unioned with the consumer's existing list). */
15
+ extensions?: string[];
16
+ /** Whether the task runs (default: always). */
17
+ enabled?: (config: ToolingConfig) => boolean;
18
+ /** The project kinds the task applies to (default root + single project). */
19
+ projectTypes?: ProjectType[];
20
+ }
21
+ /**
22
+ * The VS Code sync task: merges the given settings/extensions into the
23
+ * consumer's `.vscode/settings.json` / `.vscode/extensions.json`, preserving
24
+ * whatever they already have.
25
+ */
26
+ export declare function vscodeSyncTask(options?: VscodeSyncOptions): SyncTask;
27
+ //#endregion
@@ -0,0 +1 @@
1
+ import"node:path";import"node:url";import.meta.url;import{deepMerge as e}from"../../shared/src/object-utils.js";import{mergeJsonAt as t}from"../../shared/src/fs-utils.js";import"../../shared/src/index.js";function n(n={}){return{name:`vscode`,projectTypes:n.projectTypes??[`monorepo-root`,`project`],...n.enabled?{enabled:n.enabled}:{},run:r=>{let i=[],a=(typeof n.settings==`function`?n.settings(r.config):n.settings??[]).reduce((t,n)=>e(t,n),{});return Object.keys(a).length>0&&i.push({path:`.vscode/settings.json`,content:t(r.cwd,`.vscode/settings.json`,a)}),n.extensions?.length&&i.push({path:`.vscode/extensions.json`,content:t(r.cwd,`.vscode/extensions.json`,{recommendations:n.extensions})}),i}}}export{n as vscodeSyncTask};
@@ -0,0 +1,17 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { RunSyncOptions } from "./sync.js";
4
+ //#region packages/core/src/watch.d.ts
5
+ export interface RunWatchOptions extends Omit<RunSyncOptions, 'check'> {
6
+ /** The config file to watch (re-runs every task on change). */
7
+ configPath?: string;
8
+ /** Debounce window in ms (default 150). */
9
+ debounce?: number;
10
+ }
11
+ /**
12
+ * Run one sync, then watch the config file + every task's `watch` globs and
13
+ * re-run on change. Writing generated files must not re-trigger a run, so a
14
+ * short quiet window follows each sync.
15
+ */
16
+ export declare function runWatch(options: RunWatchOptions): Promise<void>;
17
+ //#endregion
@@ -0,0 +1 @@
1
+ import{default as e}from"node:path";import"node:url";import.meta.url;import{runSync as t}from"./sync.js";import n from"node:fs";import{Glob as r}from"glob";async function i(i){let{cwd:a,tasks:o}=i,s=i.debounce??150,c=i.quiet?()=>{}:i.log??(e=>console.log(e)),l=0,u,d=!1,f=!1,p=async()=>{if(d)f=!0;else{d=!0;try{await t(i)}finally{d=!1,l=Date.now()+Math.max(s*3,300),f&&(f=!1,m())}}},m=()=>{clearTimeout(u),u=setTimeout(p,s)};await p();let h=/* @__PURE__ */ new Set([a]),g=/* @__PURE__ */ new Set;for(let e of o)for(let t of e.watch??[])g.add(t);for(let t of g)try{let n=new r(t,{cwd:a,dot:!0,ignore:[`**/node_modules/**`]}).walkSync();for(let t of n)h.add(e.dirname(e.resolve(a,t)))}catch{}let _=[],v=e=>{Date.now()<l||(i.config?.hooks?.onChange?.(e?{path:e}:{}),m())};if(i.configPath)try{_.push(n.watch(i.configPath,()=>{c(`config changed; re-syncing`),v(i.configPath)}))}catch{}for(let e of h)try{_.push(n.watch(e,{recursive:!0},(e,t)=>v(t??void 0)))}catch{try{_.push(n.watch(e,(e,t)=>v(t??void 0)))}catch{}}c(`dbx: watching for changes (Ctrl+C to stop)`),await new Promise(e=>{let t=()=>{for(let e of _)e.close();process.off(`SIGINT`,t),process.off(`SIGTERM`,t),e()};process.on(`SIGINT`,t),process.on(`SIGTERM`,t)})}export{i as runWatch};
@@ -0,0 +1,18 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { ToolingMigration } from "./types.js";
4
+ //#region packages/migrate/src/biome.d.ts
5
+ /** The Biome config file names, in priority order. */
6
+ export declare const BIOME_CONFIG_FILES: readonly ['biome.json', 'biome.jsonc'];
7
+ /** The Biome config path in `cwd`, if present. */
8
+ export declare function findBiomeConfig(cwd: string): string | undefined;
9
+ /**
10
+ * Strip JSONC comments + trailing commas. String-aware, so glob patterns such as
11
+ * `**\/*\/dist` (which contain `/*`) are never mistaken for comments.
12
+ */
13
+ export declare function stripJsonc(input: string): string;
14
+ /** Read and parse a JSON/JSONC file (BOM-tolerant). */
15
+ export declare function readJsonc(file: string): Record<string, any>;
16
+ /** Build the Biome -> ox migration. */
17
+ export declare const biomeToOx: ToolingMigration;
18
+ //#endregion
@@ -0,0 +1,2 @@
1
+ import{default as e}from"node:path";import"node:url";import.meta.url;import{mapBiomeToOxfmt as t}from"./oxfmt-map.js";import{mapBiomeToOxlint as n}from"./oxlint-map.js";import{renderViteTarget as r}from"./vite-target.js";import i from"node:fs";const a=[`biome.json`,`biome.jsonc`];function o(t){for(let n of a){let r=e.join(t,n);if(i.existsSync(r))return r}}function s(e){let t=``,n=!1,r=``;for(let i=0;i<e.length;i++){let a=e[i];if(n)t+=a,a===`\\`?(t+=e[i+1]??``,i++):a===r&&(n=!1);else if(a===`"`||a===`'`)n=!0,r=a,t+=a;else if(a===`/`&&e[i+1]===`/`)for(;i<e.length&&e[i]!==`
2
+ `;)i++;else if(a===`/`&&e[i+1]===`*`){for(i+=2;i<e.length&&(e[i]!==`*`||e[i+1]!==`/`);)i++;i++}else t+=a}return t.replace(/,(\s*[}\]])/g,`$1`)}function c(e){let t=i.readFileSync(e,`utf-8`).replace(/^\uFEFF/,``);return JSON.parse(s(t))}const l={id:`biome-to-ox`,from:`biome`,to:`ox`,description:`Migrate Biome (formatter + organizeImports + linter) to Oxfmt/Oxlint.`,detect:e=>!!o(e),run:async a=>{let s=o(a.cwd);if(!s)throw Error(`biome-to-ox: no biome.json/biome.jsonc found.`);let u=c(s),d=t(u),f=n(u,d.oxfmt.ignorePatterns??[]),p=[...d.unmapped,...f.unmapped],m=[`Source: ${e.basename(s)}.`,`Formatter + organizeImports + linter rules mapped.`];if((a.target??`files`)===`vite`){let e=r(a.cwd,{fmt:d.oxfmt,lint:f.oxlint});return a.write&&i.writeFileSync(e.path,e.content,`utf-8`),{id:l.id,from:`biome`,to:`ox`,written:[e.path],files:[e],oxfmt:d.oxfmt,oxlint:f.oxlint,unmapped:p,notes:[...m,"Folded into vite.config.ts (`fmt` + `lint`)."]}}let h=[[`.oxfmtrc.json`,d.oxfmt],[`.oxlintrc.json`,f.oxlint]].map(([t,n])=>({path:e.join(a.cwd,t),content:`${JSON.stringify(n,null,4)}\n`}));if(a.write)for(let e of h)i.writeFileSync(e.path,e.content,`utf-8`);return{id:l.id,from:`biome`,to:`ox`,written:h.map(e=>e.path),files:h,oxfmt:d.oxfmt,oxlint:f.oxlint,unmapped:p,notes:[...m,"Next: run `oxfmt` to reformat, then drop Biome.","Tip: `--target vite` folds this into vite.config.ts instead."]}}};export{a as BIOME_CONFIG_FILES,l as biomeToOx,o as findBiomeConfig,c as readJsonc,s as stripJsonc};
@@ -0,0 +1,14 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { MigrationFile } from "./types.js";
4
+ //#region packages/migrate/src/check.d.ts
5
+ export type FileStatus = 'missing' | 'changed' | 'same';
6
+ export interface FileDiff {
7
+ path: string;
8
+ status: FileStatus;
9
+ }
10
+ /** Compare produced files against disk (`missing` / `changed` / `same`). */
11
+ export declare function diffFiles(files: MigrationFile[]): FileDiff[];
12
+ /** Whether any produced file is missing or out of date. */
13
+ export declare function hasPending(diffs: FileDiff[]): boolean;
14
+ //#endregion
@@ -0,0 +1 @@
1
+ import"node:path";import"node:url";import.meta.url;import e from"node:fs";function t(t){return t.map(t=>{if(!e.existsSync(t.path))return{path:t.path,status:`missing`};let n=e.readFileSync(t.path,`utf-8`).replace(/^\uFEFF/,``),r=t.content.replace(/^\uFEFF/,``);return{path:t.path,status:n===r?`same`:`changed`}})}function n(e){return e.some(e=>e.status!==`same`)}export{t as diffFiles,n as hasPending};
@@ -0,0 +1,12 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { ToolingCommand } from "../../../shared/src/types.js";
4
+ import "../../../shared/src/index.js";
5
+ //#region packages/migrate/src/cli/index.d.ts
6
+ /**
7
+ * `dbx migrate` — convert a project's tooling config from another
8
+ * tool (Biome / ESLint / Prettier / Dprint) to Ox (Oxfmt / Oxlint). Dry-run by
9
+ * default; pass `--write` to apply, or `--check` for a CI gate.
10
+ */
11
+ export declare function migrateCommands(): ToolingCommand[];
12
+ //#endregion
@@ -0,0 +1 @@
1
+ import{default as e}from"node:path";import"node:url";import.meta.url;import{diffFiles as t,hasPending as n}from"../check.js";import{detectMigrations as r,listMigrations as i,migrations as a}from"../registry.js";function o(){return[{name:`migrate`,description:`Migrate Biome / ESLint / Prettier / Dprint config to Ox (oxlint + oxfmt).`,options:[{flags:`--from <tool>`,description:`Source tool: biome | eslint | prettier | dprint | all.`},{flags:`--to <tool>`,description:`Target tool (default: ox).`,default:`ox`},{flags:`--cwd <dir>`,description:`Project root (default: cwd).`},{flags:`--write`,description:`Write the files (default: dry-run).`},{flags:`--dry-run`,description:`Do not write anything (default).`},{flags:`--check`,description:`CI: exit non-zero when the ox config is stale.`},{flags:`--target <target>`,description:`files (default) | vite.`},{flags:`--online`,description:`Allow network (e.g. @oxlint/migrate).`},{flags:`--json`,description:`Print the result as JSON.`}],run:async(i,o)=>{let s=i.cwd??o.cwd,c=!!i.check,l=!!i.write&&!i.dryRun&&!c,u=!!i.online,d=i.from,f=i.target??`files`,p=!d||d===`all`?r(s):a().filter(e=>e.from===d);if(p.length===0){console.log(d&&d!==`all`?`dbx: no "${d}" migration is registered.`:`dbx: nothing to migrate (no Biome/ESLint/Prettier/Dprint config detected).`);return}let m=[];for(let e of p)m.push(await e.run({cwd:s,write:l,online:u,target:f}));if(c){let r=m.flatMap(e=>t(e.files??[])),a=r.filter(e=>e.status!==`same`);if(i.json)console.log(JSON.stringify(m,null,4));else if(a.length){for(let t of a)console.log(`dbx: ${t.status} ${e.relative(s,t.path)||t.path}`);console.log(`dbx: ${a.length} file(s) out of date — run \`migrate --write\` to apply.`)}else console.log(`dbx: up to date.`);n(r)&&(process.exitCode=1)}else if(i.json)console.log(JSON.stringify(m,null,4));else{for(let e of m){console.log(`dbx: ${e.from} -> ${e.to} ${l?`wrote`:`would write`}`);for(let t of e.written)console.log(` ${l?`+`:`?`} ${t}`);for(let t of e.notes??[])console.log(` ${t}`);if(e.unmapped?.length){console.log(` unmapped (${e.unmapped.length}):`);for(let t of e.unmapped.slice(0,25))console.log(` - ${t.source}: ${t.reason}`)}}l||console.log(`dbx: dry-run — re-run with --write to apply.`)}}},{name:`migrate:list`,description:`List the registered migrations and whether each is detected.`,options:[{flags:`--cwd <dir>`,description:`Project root (default: cwd).`},{flags:`--json`,description:`Print as JSON.`}],run:(e,t)=>{let n=e.cwd??t.cwd,r=i(n);if(e.json)console.log(JSON.stringify(r,null,4));else for(let e of r)console.log(` ${e.id.padEnd(16)} ${e.from} -> ${e.to} [${e.detected?`detected`:`not found`}]`),console.log(` ${e.description}`)}}]}export{o as migrateCommands};
@@ -0,0 +1,18 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { ToolingMigration } from "./types.js";
4
+ //#region packages/migrate/src/dprint.d.ts
5
+ type Json = Record<string, any>;
6
+ /** Locate a dprint config. */
7
+ export declare function findDprintConfig(cwd: string): {
8
+ file: string;
9
+ config: Json;
10
+ } | undefined;
11
+ /** Map a dprint config to Oxfmt options. */
12
+ export declare function mapDprintToOxfmt(dprint: Json): {
13
+ oxfmt: Json;
14
+ unmapped: string[];
15
+ };
16
+ export declare const dprintToOx: ToolingMigration;
17
+ //#endregion
18
+ export {};
@@ -0,0 +1 @@
1
+ import{default as e}from"node:path";import"node:url";import.meta.url;import{renderViteTarget as t}from"./vite-target.js";import n from"node:fs";const r=[`dprint.json`,`dprint.jsonc`,`.dprint.json`];function i(t){for(let i of r){let r=e.join(t,i);if(!n.existsSync(r))continue;let a=n.readFileSync(r,`utf-8`).replace(/^\uFEFF/,``).replace(/\/\*[\s\S]*?\*\//g,``).replace(/(^|[^:])\/\/.*$/gm,`$1`).replace(/,(\s*[}\]])/g,`$1`);try{return{file:r,config:JSON.parse(a)}}catch{}}}function a(e){let t={},n=e.typescript??{};typeof e.lineWidth==`number`&&(t.printWidth=e.lineWidth),typeof e.indentWidth==`number`&&(t.tabWidth=e.indentWidth),typeof e.useTabs==`boolean`&&(t.useTabs=e.useTabs),(e.newLineKind===`lf`||e.newLineKind===`crlf`)&&(t.endOfLine=e.newLineKind),n.quoteStyle&&(t.singleQuote=String(n.quoteStyle).includes(`Single`)||n.quoteStyle===`alwaysSingle`),n.semiColons&&(t.semi=n.semiColons!==`asi`),n.trailingCommas&&(t.trailingComma=n.trailingCommas===`always`?`all`:n.trailingCommas===`never`?`none`:`es5`);let r=[],i=[`lineWidth`,`indentWidth`,`useTabs`,`newLineKind`,`typescript`,`plugins`];for(let t of Object.keys(e))i.includes(t)||r.push(`dprint section: ${t}`);return Array.isArray(e.plugins)&&e.plugins.length&&r.push(`plugins (Oxfmt has built-in equivalents for common cases)`),{oxfmt:t,unmapped:r}}const o={id:`dprint-to-ox`,from:`dprint`,to:`oxfmt`,description:`Migrate a dprint.json (formatter) to Oxfmt.`,detect:e=>!!i(e),run:async r=>{let o=i(r.cwd);if(!o)throw Error(`dprint-to-ox: no dprint.json found.`);let s=a(o.config),c=s.unmapped.map(e=>({source:e,reason:`no Oxfmt equivalent`})),l=[`Source: ${e.basename(o.file)}.`];if((r.target??`files`)===`vite`){let e=t(r.cwd,{fmt:s.oxfmt});return r.write&&n.writeFileSync(e.path,e.content,`utf-8`),{id:`dprint-to-ox`,from:`dprint`,to:`oxfmt`,written:[e.path],files:[e],oxfmt:s.oxfmt,unmapped:c,notes:[...l,"Folded into vite.config.ts (`fmt`)."]}}let u={path:e.join(r.cwd,`.oxfmtrc.json`),content:`${JSON.stringify(s.oxfmt,null,4)}\n`};return r.write&&n.writeFileSync(u.path,u.content,`utf-8`),{id:`dprint-to-ox`,from:`dprint`,to:`oxfmt`,written:[u.path],files:[u],oxfmt:s.oxfmt,unmapped:c,notes:l}}};export{o as dprintToOx,i as findDprintConfig,a as mapDprintToOxfmt};
@@ -0,0 +1,24 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { ToolingMigration } from "./types.js";
4
+ //#region packages/migrate/src/eslint.d.ts
5
+ type Json = Record<string, any>;
6
+ /** The ESLint config in `cwd`, preferring JSON (parseable) then JS. */
7
+ export declare function findEslintConfig(cwd: string): {
8
+ file: string;
9
+ json: boolean;
10
+ } | undefined;
11
+ /** Map an ESLint rule name to an Oxlint rule name. */
12
+ export declare function mapRuleName(name: string): {
13
+ name: string;
14
+ mapped: boolean;
15
+ };
16
+ /**
17
+ * Evaluate a JS/flat ESLint config with the official `@oxlint/migrate` and read
18
+ * the `.oxlintrc.json` it writes. Returns `undefined` on failure. Note: the
19
+ * migrator writes to disk, so callers only run it when writing.
20
+ */
21
+ export declare function runOxlintMigrate(cwd: string): Promise<Json | undefined>;
22
+ export declare const eslintToOx: ToolingMigration;
23
+ //#endregion
24
+ export {};
@@ -0,0 +1 @@
1
+ import{default as e}from"node:path";import"node:url";import.meta.url;import{spawnCross as t}from"../../shared/src/run.js";import"../../shared/src/index.js";import{renderViteTarget as n}from"./vite-target.js";import r from"node:fs";const i=[`.eslintrc.json`,`.eslintrc`],a=[`eslint.config.js`,`eslint.config.mjs`,`eslint.config.cjs`,`eslint.config.ts`,`.eslintrc.js`,`.eslintrc.cjs`];function o(t){for(let n of i){let i=e.join(t,n);if(r.existsSync(i))return{file:i,json:!0}}for(let n of a){let i=e.join(t,n);if(r.existsSync(i))return{file:i,json:!1}}}function s(e){let t=Array.isArray(e)?e[0]:e;return t===2||t===`error`?`error`:t===1||t===`warn`?`warn`:`off`}function c(e){return e.startsWith(`@typescript-eslint/`)?{name:`typescript/${e.slice(19)}`,mapped:!0}:{name:e,mapped:!0}}function l(e,t,n){for(let[r,i]of Object.entries(e??{})){let e=c(r);t[e.name]=s(i),e.mapped||n.push({source:r,reason:`unknown plugin prefix`})}}function u(e,n,r){return new Promise(i=>{let a=t(e,n,{cwd:r,stdio:`inherit`});a.on(`error`,()=>i(1)),a.on(`exit`,e=>i(e??0))})}async function d(t){let n=e.join(t,`.oxlintrc.json`);if(await u(`npx`,[`--yes`,`@oxlint/migrate`],t)===0&&r.existsSync(n))try{return JSON.parse(r.readFileSync(n,`utf-8`).replace(/^\uFEFF/,``))}catch{return}}const f={id:`eslint-to-ox`,from:`eslint`,to:`oxlint`,description:`Migrate ESLint to Oxlint (JSON configs; flat configs via @oxlint/migrate --online).`,detect:e=>!!o(e),run:async t=>{let i=o(t.cwd);if(!i)throw Error(`eslint-to-ox: no ESLint config found.`);let a={},s=[],c=[`Source: ${e.basename(i.file)}.`];if(i.json)l(JSON.parse(r.readFileSync(i.file,`utf-8`).replace(/^\uFEFF/,``)).rules,a,s);else if(t.online&&t.write){let e=await d(t.cwd);e?(l(e.rules,a,s),c.push("Rules evaluated with `@oxlint/migrate` (online).")):c.push("`@oxlint/migrate` did not produce `.oxlintrc.json`; hand-map the rules.")}else t.online?c.push("Flat config: online evaluation runs `@oxlint/migrate`, which writes `.oxlintrc.json` — re-run with `--write`."):c.push("Flat config detected — re-run with `--online --write` to use `@oxlint/migrate`, or hand-map the rules.");let u={$schema:`./node_modules/oxlint/configuration_schema.json`,rules:a};if((t.target??`files`)===`vite`){let e=n(t.cwd,{lint:u});return t.write&&r.writeFileSync(e.path,e.content,`utf-8`),{id:f.id,from:`eslint`,to:`oxlint`,written:[e.path],files:[e],oxlint:u,unmapped:s,notes:[...c,"Folded into vite.config.ts (`lint`)."]}}let p={path:e.join(t.cwd,`.oxlintrc.json`),content:`${JSON.stringify(u,null,4)}\n`};return t.write&&r.writeFileSync(p.path,p.content,`utf-8`),{id:f.id,from:`eslint`,to:`oxlint`,written:[p.path],files:[p],oxlint:u,unmapped:s,notes:c}}};export{f as eslintToOx,o as findEslintConfig,c as mapRuleName,d as runOxlintMigrate};
@@ -0,0 +1,14 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { MigrateTarget, MigrateTool, MigrationContext, MigrationFile, MigrationResult, ToolingMigration, UnmappedItem } from "./types.js";
4
+ import { BIOME_CONFIG_FILES, biomeToOx, findBiomeConfig, readJsonc, stripJsonc } from "./biome.js";
5
+ import { FileDiff, FileStatus, diffFiles, hasPending } from "./check.js";
6
+ import { migrateCommands } from "./cli/index.js";
7
+ import { dprintToOx, findDprintConfig, mapDprintToOxfmt } from "./dprint.js";
8
+ import { eslintToOx, findEslintConfig, mapRuleName, runOxlintMigrate } from "./eslint.js";
9
+ import { DEFAULT_IGNORE, OxfmtMapping, mapBiomeFormatter, mapBiomeIncludes, mapBiomeToOxfmt, mapOrganizeImports } from "./oxfmt-map.js";
10
+ import { OxlintMapping, RULE_MAP, mapBiomeToOxlint } from "./oxlint-map.js";
11
+ import { findPrettierConfig, mapPrettierToOxfmt, prettierToOx, readPrettierIgnore } from "./prettier.js";
12
+ import { MigrationInfo, detectMigrations, findMigration, listMigrations, migrations, runDetectedMigrations, runMigration } from "./registry.js";
13
+ import { findTopLevelValue, matchBracket, mergeViteConfig, renderViteTarget, serializeTs, writeViteTarget } from "./vite-target.js";
14
+ export { BIOME_CONFIG_FILES, DEFAULT_IGNORE, FileDiff, FileStatus, MigrateTarget, MigrateTool, MigrationContext, MigrationFile, MigrationInfo, MigrationResult, OxfmtMapping, OxlintMapping, RULE_MAP, ToolingMigration, UnmappedItem, biomeToOx, detectMigrations, diffFiles, dprintToOx, eslintToOx, findBiomeConfig, findDprintConfig, findEslintConfig, findMigration, findPrettierConfig, findTopLevelValue, hasPending, listMigrations, mapBiomeFormatter, mapBiomeIncludes, mapBiomeToOxfmt, mapBiomeToOxlint, mapDprintToOxfmt, mapOrganizeImports, mapPrettierToOxfmt, mapRuleName, matchBracket, mergeViteConfig, migrateCommands, migrations, prettierToOx, readJsonc, readPrettierIgnore, renderViteTarget, runDetectedMigrations, runMigration, runOxlintMigrate, serializeTs, stripJsonc, writeViteTarget };
@@ -0,0 +1 @@
1
+ import"node:path";import"node:url";import.meta.url;import{diffFiles as e,hasPending as t}from"./check.js";import{DEFAULT_IGNORE as n,mapBiomeFormatter as r,mapBiomeIncludes as i,mapBiomeToOxfmt as a,mapOrganizeImports as o}from"./oxfmt-map.js";import{RULE_MAP as s,mapBiomeToOxlint as c}from"./oxlint-map.js";import{findTopLevelValue as l,matchBracket as u,mergeViteConfig as d,renderViteTarget as f,serializeTs as p,writeViteTarget as m}from"./vite-target.js";import{BIOME_CONFIG_FILES as h,biomeToOx as g,findBiomeConfig as _,readJsonc as v,stripJsonc as y}from"./biome.js";import{dprintToOx as b,findDprintConfig as x,mapDprintToOxfmt as S}from"./dprint.js";import{eslintToOx as C,findEslintConfig as w,mapRuleName as T,runOxlintMigrate as E}from"./eslint.js";import{findPrettierConfig as D,mapPrettierToOxfmt as O,prettierToOx as k,readPrettierIgnore as A}from"./prettier.js";import{detectMigrations as j,findMigration as M,listMigrations as N,migrations as P,runDetectedMigrations as F,runMigration as I}from"./registry.js";import{migrateCommands as L}from"./cli/index.js";export{h as BIOME_CONFIG_FILES,n as DEFAULT_IGNORE,s as RULE_MAP,g as biomeToOx,j as detectMigrations,e as diffFiles,b as dprintToOx,C as eslintToOx,_ as findBiomeConfig,x as findDprintConfig,w as findEslintConfig,M as findMigration,D as findPrettierConfig,l as findTopLevelValue,t as hasPending,N as listMigrations,r as mapBiomeFormatter,i as mapBiomeIncludes,a as mapBiomeToOxfmt,c as mapBiomeToOxlint,S as mapDprintToOxfmt,o as mapOrganizeImports,O as mapPrettierToOxfmt,T as mapRuleName,u as matchBracket,d as mergeViteConfig,L as migrateCommands,P as migrations,k as prettierToOx,v as readJsonc,A as readPrettierIgnore,f as renderViteTarget,F as runDetectedMigrations,I as runMigration,E as runOxlintMigrate,p as serializeTs,y as stripJsonc,m as writeViteTarget};