@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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
import {
|
|
3
|
+
import { ToolchainCommand } from "../../../shared/src/types.js";
|
|
4
4
|
import "../../../shared/src/index.js";
|
|
5
5
|
//#region packages/tsdown/src/cli/index.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* The cleanup commands (`cleanup`, `cleanup:turbo`). The working directory
|
|
8
8
|
* comes from `context.cwd` (the root the config was loaded from).
|
|
9
9
|
*/
|
|
10
|
-
export declare function cleanupCommands():
|
|
10
|
+
export declare function cleanupCommands(): ToolchainCommand[];
|
|
11
11
|
//#endregion
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
import {
|
|
3
|
+
import { ToolchainCommand } from "../../../shared/src/types.js";
|
|
4
4
|
import "../../../shared/src/index.js";
|
|
5
5
|
import { resolveVpCommand } from "../commands.js";
|
|
6
6
|
//#region packages/vite/src/cli/index.d.ts
|
|
7
7
|
/** The guard key for a `run` invocation, or `undefined` for other commands. */
|
|
8
8
|
export declare function runGuard(args: string[], cwd: string): string | undefined;
|
|
9
9
|
/** Every Vite+ passthrough command (the generic `vite` + one per subcommand). */
|
|
10
|
-
export declare function viteCommands():
|
|
10
|
+
export declare function viteCommands(): ToolchainCommand[];
|
|
11
11
|
//#endregion
|
|
12
12
|
export { resolveVpCommand };
|
|
@@ -2,8 +2,9 @@ import __tsdown_shims_path from 'node:path';
|
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { VP_COMMANDS, VpCommandInfo, VpGroup, resolveVpCommand, viteCommandName } from "./commands.js";
|
|
4
4
|
import { runGuard, viteCommands } from "./cli/index.js";
|
|
5
|
-
import { DBX_TASKS, DbxPluginOptions, DbxSource,
|
|
5
|
+
import { DBX_TASKS, DBX_TIMEOUT_MS, DbxPluginOptions, DbxSource, ResolvedDbx, dbx, dbxTaskCommand, resolveDbx, runDbx } from "./plugin.js";
|
|
6
6
|
import { viteProvider } from "./provider.js";
|
|
7
|
-
import {
|
|
7
|
+
import { ResolveViteOptions, resolveVite } from "./resolve.js";
|
|
8
|
+
import { VITE_CONFIG_SHIM, renderViteConfig, viteConfigObject, viteSyncTask } from "./sync.js";
|
|
8
9
|
import { ResolvedVp, RunVpOptions, VpResult, VpSource, describeVp, hasVp, resolveVp, runVp, vpVersion, which } from "./vp.js";
|
|
9
|
-
export { DBX_TASKS,
|
|
10
|
+
export { DBX_TASKS, DBX_TIMEOUT_MS, DbxPluginOptions, DbxSource, ResolveViteOptions, ResolvedDbx, ResolvedVp, RunVpOptions, VITE_CONFIG_SHIM, VP_COMMANDS, VpCommandInfo, VpGroup, VpResult, VpSource, dbx, dbxTaskCommand, describeVp, hasVp, renderViteConfig, resolveDbx, resolveVite, resolveVp, resolveVpCommand, runDbx, runGuard, runVp, viteCommandName, viteCommands, viteConfigObject, viteProvider, viteSyncTask, vpVersion, which };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"node:path";import"node:url";import.meta.url;import{VP_COMMANDS as e,resolveVpCommand as t,viteCommandName as n}from"./commands.js";import{describeVp as r,hasVp as i,resolveVp as a,runVp as o,vpVersion as s,which as c}from"./vp.js";import{runGuard as l,viteCommands as u}from"./cli/index.js";import{DBX_TASKS as d,
|
|
1
|
+
import"node:path";import"node:url";import.meta.url;import{VP_COMMANDS as e,resolveVpCommand as t,viteCommandName as n}from"./commands.js";import{describeVp as r,hasVp as i,resolveVp as a,runVp as o,vpVersion as s,which as c}from"./vp.js";import{runGuard as l,viteCommands as u}from"./cli/index.js";import{DBX_TASKS as d,DBX_TIMEOUT_MS as f,dbx as p,dbxTaskCommand as m,resolveDbx as h,runDbx as g}from"./plugin.js";import{viteProvider as _}from"./provider.js";import{VITE_CONFIG_SHIM as v,renderViteConfig as y,viteConfigObject as b,viteSyncTask as x}from"./sync.js";import{resolveVite as S}from"./resolve.js";export{d as DBX_TASKS,f as DBX_TIMEOUT_MS,v as VITE_CONFIG_SHIM,e as VP_COMMANDS,p as dbx,m as dbxTaskCommand,r as describeVp,i as hasVp,y as renderViteConfig,h as resolveDbx,S as resolveVite,a as resolveVp,t as resolveVpCommand,g as runDbx,l as runGuard,o as runVp,n as viteCommandName,u as viteCommands,b as viteConfigObject,_ as viteProvider,x as viteSyncTask,s as vpVersion,c as which};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
import { Plugin
|
|
3
|
+
import { Plugin } from "/home/runner/work/toolchain/toolchain/node_modules/vite/dist/node/index.js";
|
|
4
4
|
//#region packages/vite/src/plugin.d.ts
|
|
5
5
|
/** How a `dbx` binary was resolved. */
|
|
6
6
|
export type DbxSource = 'local' | 'global' | 'npx';
|
|
@@ -14,19 +14,43 @@ export interface ResolvedDbx {
|
|
|
14
14
|
source: DbxSource;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* Resolve the `dbx` binary
|
|
18
|
-
* `
|
|
17
|
+
* Resolve the `dbx` binary, always preferring the project's own over a global
|
|
18
|
+
* install: `DBX_BIN` override -> project-local shim -> the repo's own
|
|
19
|
+
* `@deltabox/toolchain` bin -> (only for a project that pins nothing) global
|
|
20
|
+
* `PATH` -> `npx` of the pinned version.
|
|
21
|
+
*
|
|
22
|
+
* A project-local binary is what the project pins, so a stale global `dbx` can
|
|
23
|
+
* never be used by accident: when the project pins the toolchain but has no
|
|
24
|
+
* resolvable local binary, the global install is skipped (with a warning) in
|
|
25
|
+
* favour of `npx @deltabox/toolchain@<pinned>` — a stale global would otherwise
|
|
26
|
+
* write older-format files and silently revert the project's generated ones.
|
|
19
27
|
*/
|
|
20
28
|
export declare function resolveDbx(cwd?: string): ResolvedDbx;
|
|
29
|
+
/**
|
|
30
|
+
* Default deadline for a one-shot `dbx` call (`sync`/`--check`): a stalled run
|
|
31
|
+
* is killed rather than left hanging. Long-running work streams its own output,
|
|
32
|
+
* so this only bounds the plugin's own sync.
|
|
33
|
+
*/
|
|
34
|
+
export declare const DBX_TIMEOUT_MS: number;
|
|
21
35
|
/** Run `dbx <args>` in `cwd`, streaming output. Resolves with the exit code. */
|
|
22
|
-
export declare function runDbx(args: string[], cwd?: string): Promise<number>;
|
|
36
|
+
export declare function runDbx(args: string[], cwd?: string, timeoutMs?: number): Promise<number>;
|
|
37
|
+
/**
|
|
38
|
+
* The shell command Vite Task runs for a `dbx` subcommand. Vite Task runs the
|
|
39
|
+
* `command` string through a shell, so instead of relying on `dbx` being on
|
|
40
|
+
* `PATH` (an env-dependent lookup that can miss or pick a stale global) the
|
|
41
|
+
* command is built from {@link resolveDbx} — the project's own binary, or the
|
|
42
|
+
* pinned `npx` fallback — resolved when the config loads. `resolveDbx` warns
|
|
43
|
+
* when it has to fall back, so a missing environment is visible rather than
|
|
44
|
+
* silent.
|
|
45
|
+
*/
|
|
46
|
+
export declare function dbxTaskCommand(subcommand: string, cwd?: string): string;
|
|
23
47
|
/** The Vite+ tasks the wrapper registers, keyed by task name. */
|
|
24
48
|
export declare const DBX_TASKS: {
|
|
25
49
|
readonly 'dbx:sync': {
|
|
26
|
-
readonly command:
|
|
50
|
+
readonly command: string;
|
|
27
51
|
};
|
|
28
52
|
readonly 'dbx:check': {
|
|
29
|
-
readonly command:
|
|
53
|
+
readonly command: string;
|
|
30
54
|
};
|
|
31
55
|
};
|
|
32
56
|
export interface DbxPluginOptions {
|
|
@@ -47,19 +71,8 @@ export interface DbxPluginOptions {
|
|
|
47
71
|
/**
|
|
48
72
|
* A Vite / Vite+ plugin that runs `@deltabox/toolchain` in the Vite pipeline:
|
|
49
73
|
* `dbx sync` before dev/build (or `dbx sync --check` in CI) and a debounced
|
|
50
|
-
* re-sync when a dbx input changes. Add it to `plugins
|
|
51
|
-
*
|
|
74
|
+
* re-sync when a dbx input changes. Add it to `plugins`; spread {@link DBX_TASKS}
|
|
75
|
+
* into `run.tasks` for the `vp run dbx:*` tasks.
|
|
52
76
|
*/
|
|
53
77
|
export declare function dbx(options?: DbxPluginOptions): Plugin;
|
|
54
|
-
/** A Vite+ config: Vite's `UserConfig` plus the Vite+ `run` block. */
|
|
55
|
-
export type DbxViteConfig = UserConfig & {
|
|
56
|
-
run?: {
|
|
57
|
-
tasks?: Record<string, unknown>;
|
|
58
|
-
} & Record<string, unknown>;
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* Wrap a Vite+ config with dbx: prepend the {@link dbx} plugin and register the
|
|
62
|
-
* `dbx:sync` / `dbx:check` tasks.
|
|
63
|
-
*/
|
|
64
|
-
export declare function defineDbxConfig(config: DbxViteConfig, options?: DbxPluginOptions): DbxViteConfig;
|
|
65
78
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as e}from"node:path";import"node:url";import.meta.url;import{
|
|
1
|
+
import{default as e}from"node:path";import"node:url";import.meta.url;import{TOOLCHAIN_PACKAGE as t,findOwnCliEntry as n,localToolchainVersion as r}from"../../shared/src/bin.js";import{logger as i}from"../../shared/src/logger.js";import{spawnCross as a}from"../../shared/src/run.js";import"../../shared/src/index.js";import{which as o}from"./vp.js";import s from"node:fs";const c=process.platform===`win32`;let l=!1,u=!1;function d(t){let n=e.join(t,`node_modules`,`.bin`,`dbx`);return c?[`${n}.cmd`,`${n}.exe`,`${n}.ps1`,n]:[n]}function f(e=process.cwd()){let a=process.env.DBX_BIN;if(a){if(s.existsSync(a))return{exe:a,args:[],source:`local`};u||(u=!0,i.warn(`DBX_BIN points at ${a}, which does not exist; ignoring it.`))}for(let t of d(e))if(s.existsSync(t))return{exe:t,args:[],source:`local`};let f=n(e);if(f)return{exe:process.execPath,args:[f],source:`local`};let p=r(e),m=o(`dbx`);if(m){if(p===void 0)return{exe:m,args:[],source:`global`};i.warn(`ignoring the global \`dbx\` at ${m} — this project pins ${t}@${p}.`)}let h=p?`${t}@${p}`:t;return l||(l=!0,i.warn(`no project-local ${t} found — running \`npx --yes ${h}\` (needs network).`)),{exe:c?`npx.cmd`:`npx`,args:[`--yes`,h],source:`npx`}}const p=3e5;function m(e,t=process.cwd(),n=p){let r=f(t);return new Promise(i=>{let o=a(r.exe,[...r.args,...e],{cwd:t,env:process.env,stdio:`inherit`,...n>0?{timeoutMs:n}:{}});o.on(`error`,()=>i(1)),o.on(`exit`,e=>i(e??0))})}function h(e){return/[\s"'&|<>^()]/.test(e)?`"${e.replace(/"/g,`\\"`)}"`:e}function g(e,t=process.cwd()){let n=f(t);return[...[n.exe,...n.args].map(h),e].join(` `)}const _={"dbx:sync":{command:g(`sync`)},"dbx:check":{command:g(`sync --check`)}},v=[/dbx\.config\.[cm]?[jt]s$/,/tsconfig\.(?:default|monorepo)\.json$/];function y(e={}){let t=e.check??!!process.env.CI,n=e.sync??!0,r=e.watch??!0,i=e.debounce??150,a=e.cwd??process.cwd(),o,s=!1,c=async()=>{if(!s){s=!0;try{await m([`sync`],a)}finally{s=!1}}},l=()=>{o&&clearTimeout(o),o=setTimeout(()=>{c()},i)};return{name:`deltabox-toolchain`,enforce:`pre`,configResolved(t){a=e.cwd??t.root},async buildStart(){t?await m([`sync`,`--check`],a)!==0&&this.error("deltabox-toolchain: generated files are out of date — run `dbx sync`."):n&&await c()},watchChange(e){r&&n&&v.some(t=>t.test(e))&&l()}}}export{_ as DBX_TASKS,p as DBX_TIMEOUT_MS,y as dbx,g as dbxTaskCommand,f as resolveDbx,m as runDbx};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
import {
|
|
3
|
+
import { ToolchainProvider } from "../../shared/src/provider.js";
|
|
4
4
|
import "../../shared/src/index.js";
|
|
5
5
|
//#region packages/vite/src/provider.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* Build the Vite+ provider descriptor. The command list mirrors {@link VP_COMMANDS}
|
|
8
8
|
* so the CLI and the extension stay in sync automatically.
|
|
9
9
|
*/
|
|
10
|
-
export declare function viteProvider():
|
|
10
|
+
export declare function viteProvider(): ToolchainProvider;
|
|
11
11
|
//#endregion
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import __tsdown_shims_path from 'node:path';
|
|
2
|
+
import __tsdown_shims_url from 'node:url';
|
|
3
|
+
import { DbxConfig } from "../../shared/src/toolchain.js";
|
|
4
|
+
import "../../shared/src/index.js";
|
|
5
|
+
import { ViteUserConfig } from "vite-plus";
|
|
6
|
+
//#region packages/vite/src/resolve.d.ts
|
|
7
|
+
export interface ResolveViteOptions {
|
|
8
|
+
/** Project root to look for `dbx.config.*` in (default: `process.cwd()`). */
|
|
9
|
+
cwd?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Resolve the Vite+ config from `dbx.config.*`'s `toolchain.vite`.
|
|
13
|
+
*
|
|
14
|
+
* Returns a promise (the config file is imported asynchronously). Vite awaits a
|
|
15
|
+
* config's default export, so `export default defineConfig(resolveVite())` works
|
|
16
|
+
* — the promise is resolved before the config is used.
|
|
17
|
+
*/
|
|
18
|
+
export declare function resolveVite(dbxConfig?: DbxConfig, options?: ResolveViteOptions): Promise<ViteUserConfig>;
|
|
19
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"node:path";import"node:url";import.meta.url;import{applyReplacementsDeep as e}from"../../shared/src/template.js";import{resolveTokens as t,sectionConfig as n}from"../../shared/src/toolchain.js";import"../../shared/src/index.js";import{loadToolchainConfig as r}from"../../core/src/loader.js";import"../../core/src/index.js";import{viteConfigObject as i}from"./sync.js";async function a(a,o={}){let s;if(a)s=a.toolchain??{};else{let e=await r(o.cwd??process.cwd());if(!e.path)throw Error(`resolveVite: no dbx.config.* found — create one, or pass a config to resolveVite().`);s=e.config}let c=n(s.vite)??{};return e(i(c),t(s))}export{a as resolveVite};
|
|
@@ -1,25 +1,21 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
import {
|
|
4
|
-
import { ToolingViteConfig } from "../../shared/src/config-types.js";
|
|
3
|
+
import { ToolchainViteConfig } from "../../shared/src/config-types.js";
|
|
5
4
|
import { SyncTask } from "../../shared/src/toolchain.js";
|
|
6
5
|
import "../../shared/src/index.js";
|
|
7
6
|
//#region packages/vite/src/sync.d.ts
|
|
8
|
-
/** The
|
|
9
|
-
export declare
|
|
10
|
-
/** The default Oxlint ignore globs. */
|
|
11
|
-
export declare const DEFAULT_LINT_IGNORE: string[];
|
|
7
|
+
/** The `vite` section with the toolchain opt-out (`config`) removed. */
|
|
8
|
+
export declare function viteConfigObject(config?: ToolchainViteConfig): Record<string, unknown>;
|
|
12
9
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* consumer's `overrides` deep-merged on top and `{{ token }}`s resolved.
|
|
10
|
+
* The managed `vite.config.ts`: a header, the imports and a one-line shim that
|
|
11
|
+
* resolves the real config from `dbx.config.*` at load time.
|
|
16
12
|
*/
|
|
17
|
-
export declare
|
|
18
|
-
/**
|
|
19
|
-
export declare function renderViteConfig(
|
|
13
|
+
export declare const VITE_CONFIG_SHIM: string;
|
|
14
|
+
/** The managed `vite.config.ts` source (a fixed shim). */
|
|
15
|
+
export declare function renderViteConfig(): string;
|
|
20
16
|
/**
|
|
21
|
-
* The vite sync task: writes `vite.config.ts` when the `vite` section is
|
|
22
|
-
* (and `config` is not `false`). Runs for every project kind.
|
|
17
|
+
* The vite sync task: writes the `vite.config.ts` shim when the `vite` section is
|
|
18
|
+
* enabled (and `config` is not `false`). Runs for every project kind.
|
|
23
19
|
*/
|
|
24
20
|
export declare function viteSyncTask(): SyncTask;
|
|
25
21
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"node:path";import"node:url";import.meta.url;import{
|
|
2
|
-
`)
|
|
1
|
+
import"node:path";import"node:url";import.meta.url;import{sectionConfig as e,sectionEnabled as t}from"../../shared/src/toolchain.js";import"../../shared/src/index.js";function n(e={}){let{config:t,...n}=e;return n}const r=["// Generated by @deltabox/toolchain — edit the vite section in dbx.config and run `dbx sync`.",`import { resolveVite } from '@deltabox/toolchain/vite';`,`import { defineConfig } from 'vite-plus';`,``,`export default defineConfig(resolveVite());`,``].join(`
|
|
2
|
+
`);function i(){return r}function a(){return{name:`vite`,projectTypes:[`monorepo-root`,`monorepo-workspace`,`project`],enabled:e=>t(e.vite),run:t=>(e(t.config.vite)??{}).config===!1?[]:[{path:`vite.config.ts`,content:i()}]}}export{r as VITE_CONFIG_SHIM,i as renderViteConfig,n as viteConfigObject,a as viteSyncTask};
|
|
@@ -44,6 +44,11 @@ export interface RunVpOptions {
|
|
|
44
44
|
* `undefined` leaves detection to the child.
|
|
45
45
|
*/
|
|
46
46
|
color?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Kill `vp` (and its tree) after this many ms. Omit for long-running
|
|
49
|
+
* commands (`vp dev`); set it for one-shot ones so a hang can't linger.
|
|
50
|
+
*/
|
|
51
|
+
timeoutMs?: number;
|
|
47
52
|
}
|
|
48
53
|
export interface VpResult {
|
|
49
54
|
code: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as e}from"node:path";import"node:url";import.meta.url;import{
|
|
1
|
+
import{default as e}from"node:path";import"node:url";import.meta.url;import{logger as t}from"../../shared/src/logger.js";import{spawnCross as n}from"../../shared/src/run.js";import"../../shared/src/index.js";import r from"node:fs";const i=process.platform===`win32`;function a(t){let n=e.join(t,`node_modules`,`.bin`,`vp`);return i?[`${n}.cmd`,`${n}.exe`,`${n}.ps1`,n]:[n]}let o=!1;function s(n){let a=i?(process.env.PATHEXT??`.COM;.EXE;.BAT;.CMD`).split(`;`).filter(Boolean):[``],s=(process.env.PATH??``).split(e.delimiter).filter(Boolean);s.length===0&&!o&&(o=!0,t.warn(`PATH is empty — cannot look up binaries on PATH; falling back.`));for(let t of s)for(let i of a){let a=e.join(t,`${n}${i.toLowerCase()}`);try{return r.accessSync(a,r.constants.X_OK),a}catch{}}}function c(e=process.cwd()){for(let t of a(e))if(r.existsSync(t))return{exe:t,args:[],source:`local`};let t=s(`vp`);return t?{exe:t,args:[],source:`global`}:{exe:i?`npx.cmd`:`npx`,args:[`--yes`,`vite-plus`],source:`npx`}}function l(e=process.cwd()){return c(e).source!==`npx`}function u(e,t={}){let r=t.cwd??process.cwd(),i=c(r),a=t.mode===`capture`,o={...process.env,...t.env};return t.color===!1&&(o.NO_COLOR=`1`,o.FORCE_COLOR=`0`),new Promise(s=>{let c=``,l=``,u=n(i.exe,[...i.args,...e],{cwd:r,env:o,stdio:a?`pipe`:`inherit`,...t.timeoutMs===void 0?{}:{timeoutMs:t.timeoutMs}});u.stdout?.on(`data`,e=>{c+=e}),u.stderr?.on(`data`,e=>{l+=e}),u.on(`error`,e=>{s({code:1,stdout:c,stderr:`${l}${String(e)}`,resolved:i})}),u.on(`exit`,e=>{s({code:e??0,stdout:c,stderr:l,resolved:i})})})}async function d(e=process.cwd()){let t=await u([`--version`],{cwd:e,mode:`capture`});if(t.code===0)return t.stdout.trim()||t.stderr.trim()||void 0}function f(e=process.cwd()){let t=c(e);return t.source===`local`?`local (node_modules/.bin/vp)`:t.source===`global`?`global (PATH)`:`npx --yes vite-plus`}export{f as describeVp,l as hasVp,c as resolveVp,u as runVp,d as vpVersion,s as which};
|
package/dist/project.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ import __tsdown_shims_path from 'node:path';
|
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { projectCommands } from "./packages/project/src/cli/index.js";
|
|
4
4
|
import { GENERATED_CONFIG_FILENAME, GenerateProjectConfigsOptions, GenerateProjectConfigsResult, GeneratedProjectConfig, generateProjectConfigs } from "./packages/project/src/config.js";
|
|
5
|
-
import { MonorepoRootContext, ProjectContext, WorkspaceContext, createMonorepoRootFiles, createRootProjectFiles, createWorkspaceFiles, renderGitignore,
|
|
5
|
+
import { MonorepoRootContext, ProjectContext, WorkspaceContext, createMonorepoRootFiles, createRootProjectFiles, createWorkspaceFiles, renderGitignore, renderToolchainConfig, renderTurboJson, renderWorkspaceTsconfig, writeGeneratedFiles } from "./packages/project/src/typescript.js";
|
|
6
6
|
import "./packages/project/src/index.js";
|
|
7
|
-
export { GENERATED_CONFIG_FILENAME, GenerateProjectConfigsOptions, GenerateProjectConfigsResult, GeneratedProjectConfig, MonorepoRootContext, ProjectContext, WorkspaceContext, createMonorepoRootFiles, createRootProjectFiles, createWorkspaceFiles, generateProjectConfigs, projectCommands, renderGitignore,
|
|
7
|
+
export { GENERATED_CONFIG_FILENAME, GenerateProjectConfigsOptions, GenerateProjectConfigsResult, GeneratedProjectConfig, MonorepoRootContext, ProjectContext, WorkspaceContext, createMonorepoRootFiles, createRootProjectFiles, createWorkspaceFiles, generateProjectConfigs, projectCommands, renderGitignore, renderToolchainConfig, renderTurboJson, renderWorkspaceTsconfig, writeGeneratedFiles };
|
package/dist/project.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"node:path";import"node:url";import.meta.url;import{createMonorepoRootFiles as e,createRootProjectFiles as t,createWorkspaceFiles as n,renderGitignore as r,
|
|
1
|
+
import"node:path";import"node:url";import.meta.url;import{createMonorepoRootFiles as e,createRootProjectFiles as t,createWorkspaceFiles as n,renderGitignore as r,renderToolchainConfig as i,renderTurboJson as a,renderWorkspaceTsconfig as o,writeGeneratedFiles as s}from"./packages/project/src/typescript.js";import{GENERATED_CONFIG_FILENAME as c,generateProjectConfigs as l}from"./packages/project/src/config.js";import{projectCommands as u}from"./packages/project/src/cli/index.js";import"./packages/project/src/index.js";export{c as GENERATED_CONFIG_FILENAME,e as createMonorepoRootFiles,t as createRootProjectFiles,n as createWorkspaceFiles,l as generateProjectConfigs,u as projectCommands,r as renderGitignore,i as renderToolchainConfig,a as renderTurboJson,o as renderWorkspaceTsconfig,s as writeGeneratedFiles};
|
package/dist/providers.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
import {
|
|
3
|
+
import { ToolchainProvider, ToolchainProviderAction, ToolchainProviderCommand, providerActions } from "./packages/shared/src/provider.js";
|
|
4
4
|
import "./packages/shared/src/index.js";
|
|
5
5
|
import { viteProvider } from "./packages/vite/src/provider.js";
|
|
6
6
|
import "./packages/vite/src/index.js";
|
|
7
7
|
//#region src/providers.d.ts
|
|
8
|
-
/**
|
|
9
|
-
|
|
8
|
+
/**
|
|
9
|
+
* The registered providers: the built-ins, then any custom ones from the
|
|
10
|
+
* project's registry (`.dbx/toolchain/providers.json`), deduped by id. Each
|
|
11
|
+
* carries its resolved actions (defaults applied).
|
|
12
|
+
*/
|
|
13
|
+
export declare function toolchainProviders(cwd?: string): ToolchainProvider[];
|
|
10
14
|
//#endregion
|
|
11
|
-
export { type
|
|
15
|
+
export { type ToolchainProvider, type ToolchainProviderAction, type ToolchainProviderCommand, providerActions, viteProvider };
|
package/dist/providers.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"node:path";import"node:url";import.meta.url;import{providerActions as e}from"./packages/shared/src/provider.js";import"./packages/shared/src/index.js";import{
|
|
1
|
+
import"node:path";import"node:url";import.meta.url;import{providerActions as e}from"./packages/shared/src/provider.js";import"./packages/shared/src/index.js";import{readProviderRegistry as t}from"./packages/core/src/provider-registry.js";import"./packages/core/src/index.js";import{viteProvider as n}from"./packages/vite/src/provider.js";import"./packages/vite/src/index.js";function r(r=process.cwd()){let i=/* @__PURE__ */ new Set,a=[];for(let o of[n(),...t(r)])i.has(o.id)||(i.add(o.id),a.push({...o,actions:e(o)}));return a}export{e as providerActions,r as toolchainProviders,n as viteProvider};
|
package/dist/shared.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
+
import { TOOLCHAIN_PACKAGE, findOwnCliEntry, localToolchainVersion } from "./packages/shared/src/bin.js";
|
|
3
4
|
import { mergeJsonAt, readJsonAt, readJsonFile, toJson, writeJsonFile } from "./packages/shared/src/fs-utils.js";
|
|
4
5
|
import { Colors, LOG_LEVELS, LogChannel, LogLevel, Logger, LoggerConfig, LoggerOptions, configureLogger, createLogger, getLogOverrides, getLogger, isLogLevel, logger, normalizeLogLevel, setLogConfig, setLogOverrides, stripAnsi } from "./packages/shared/src/logger.js";
|
|
5
6
|
import { Sortable, deepMerge, isPlainObject, mapValues, resolveSort, sort } from "./packages/shared/src/object-utils.js";
|
|
6
|
-
import {
|
|
7
|
-
import { RunOptions, run, spawnCross } from "./packages/shared/src/run.js";
|
|
7
|
+
import { ToolchainProvider, ToolchainProviderAction, ToolchainProviderCommand, providerActions } from "./packages/shared/src/provider.js";
|
|
8
|
+
import { RunOptions, SpawnCrossOptions, killProcessTree, run, spawnCross } from "./packages/shared/src/run.js";
|
|
8
9
|
import { asString, camelCase, camelCaseId, capitalize, constantCase, ensureLeadingSlash, ensureSlashes, ensureTrailingSlash, formatCliFlag, hasText, indent, isLocalhost, kebabCase, pascalCase, removeDoubleSlashes, removeLeadingSlash, removeTrailingSlash, sanitizeSlashes, snakeCase, str, titleCase } from "./packages/shared/src/string-utils.js";
|
|
9
10
|
import { ReplacementOptions, ReplacementValue, Replacements, Replacer, applyReplacements, applyReplacementsDeep, createReplacer, defineReplacements, extractTokens, hasUnresolvedTokens, tokenPattern } from "./packages/shared/src/template.js";
|
|
10
|
-
import { ChangelogWorkflowsConfig, DbxConfigSections, ProjectType,
|
|
11
|
-
import { Awaitable, GeneratedFile, JsonValue, PackageJson,
|
|
12
|
-
import { CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, biomeConfigSchema, changelogConfigSchema, changelogWorkflowsConfigSchema, dbxConfigSchema, loggerConfigSchema, projectConfigSchema, projectTypeSchema, providersConfigSchema, templateKindSchema, templateSourceSchema, templateSourceTypeSchema, templatesConfigSchema,
|
|
13
|
-
import { CONFIG_FILE_NAMES, DbxConfig, ManagedFile, SyncContext, SyncSummary, SyncTask,
|
|
11
|
+
import { ChangelogVersioning, ChangelogVersioningConfig, ChangelogVersioningTarget, ChangelogWorkflowsConfig, DbxConfigSections, ProjectType, ToolchainBiomeConfig, ToolchainChangelogConfig, ToolchainConfigSections, ToolchainLoggerConfig, ToolchainProjectConfig, ToolchainProvidersConfig, ToolchainTemplateKind, ToolchainTemplateSource, ToolchainTemplateSourceType, ToolchainTemplatesConfig, ToolchainTsconfigConfig, ToolchainViteConfig, ToolchainWatchConfig, WorkflowConfig, WorkflowSetting, WorkflowStep, WorkflowStepsConfig } from "./packages/shared/src/config-types.js";
|
|
12
|
+
import { Awaitable, GeneratedFile, JsonValue, PackageJson, ToolchainArgument, ToolchainCommand, ToolchainCommandContext, ToolchainOption } from "./packages/shared/src/types.js";
|
|
13
|
+
import { CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, biomeConfigSchema, changelogConfigSchema, changelogVersioningConfigSchema, changelogVersioningSchema, changelogVersioningTargetSchema, changelogWorkflowsConfigSchema, dbxConfigSchema, loggerConfigSchema, projectConfigSchema, projectTypeSchema, providersConfigSchema, templateKindSchema, templateSourceSchema, templateSourceTypeSchema, templatesConfigSchema, toolchainConfigSchema, tsconfigConfigSchema, viteConfigSchema, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema } from "./packages/shared/src/config-schema.js";
|
|
14
|
+
import { CONFIG_FILE_NAMES, DbxConfig, ManagedFile, SyncContext, SyncSummary, SyncTask, ToolchainConfig, ToolchainHooks, ToolchainSection, defineConfig, repoSlugFromUrl, resolveTokens, sectionConfig, sectionEnabled } from "./packages/shared/src/toolchain.js";
|
|
14
15
|
import { YamlValue, toYaml } from "./packages/shared/src/yaml.js";
|
|
15
16
|
import "./packages/shared/src/index.js";
|
|
16
|
-
export { Awaitable, CONFIG_FILE_NAMES, CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, ChangelogWorkflowsConfig, Colors, DbxConfig, DbxConfigSections, GeneratedFile, JsonValue, LOG_LEVELS, LogChannel, LogLevel, Logger, LoggerConfig, LoggerOptions, ManagedFile, PackageJson, ProjectType, ReplacementOptions, ReplacementValue, Replacements, Replacer, RunOptions, Sortable, SyncContext, SyncSummary, SyncTask,
|
|
17
|
+
export { Awaitable, CONFIG_FILE_NAMES, CONFIG_SECTION_DESCRIPTIONS, CONFIG_SECTION_SCHEMAS, CONFIG_TYPE_SCHEMAS, ChangelogVersioning, ChangelogVersioningConfig, ChangelogVersioningTarget, ChangelogWorkflowsConfig, Colors, DbxConfig, DbxConfigSections, GeneratedFile, JsonValue, LOG_LEVELS, LogChannel, LogLevel, Logger, LoggerConfig, LoggerOptions, ManagedFile, PackageJson, ProjectType, ReplacementOptions, ReplacementValue, Replacements, Replacer, RunOptions, Sortable, SpawnCrossOptions, SyncContext, SyncSummary, SyncTask, TOOLCHAIN_PACKAGE, ToolchainArgument, ToolchainBiomeConfig, ToolchainChangelogConfig, ToolchainCommand, ToolchainCommandContext, ToolchainConfig, ToolchainConfigSections, ToolchainHooks, ToolchainLoggerConfig, ToolchainOption, ToolchainProjectConfig, ToolchainProvider, ToolchainProviderAction, ToolchainProviderCommand, ToolchainProvidersConfig, ToolchainSection, ToolchainTemplateKind, ToolchainTemplateSource, ToolchainTemplateSourceType, ToolchainTemplatesConfig, ToolchainTsconfigConfig, ToolchainViteConfig, ToolchainWatchConfig, WorkflowConfig, WorkflowSetting, WorkflowStep, WorkflowStepsConfig, type YamlValue, applyReplacements, applyReplacementsDeep, asString, biomeConfigSchema, camelCase, camelCaseId, capitalize, changelogConfigSchema, changelogVersioningConfigSchema, changelogVersioningSchema, changelogVersioningTargetSchema, changelogWorkflowsConfigSchema, configureLogger, constantCase, createLogger, createReplacer, dbxConfigSchema, deepMerge, defineConfig, defineReplacements, ensureLeadingSlash, ensureSlashes, ensureTrailingSlash, extractTokens, findOwnCliEntry, formatCliFlag, getLogOverrides, getLogger, hasText, hasUnresolvedTokens, indent, isLocalhost, isLogLevel, isPlainObject, kebabCase, killProcessTree, localToolchainVersion, logger, loggerConfigSchema, mapValues, mergeJsonAt, normalizeLogLevel, pascalCase, projectConfigSchema, projectTypeSchema, providerActions, providersConfigSchema, readJsonAt, readJsonFile, removeDoubleSlashes, removeLeadingSlash, removeTrailingSlash, repoSlugFromUrl, resolveSort, resolveTokens, run, sanitizeSlashes, sectionConfig, sectionEnabled, setLogConfig, setLogOverrides, snakeCase, sort, spawnCross, str, stripAnsi, templateKindSchema, templateSourceSchema, templateSourceTypeSchema, templatesConfigSchema, titleCase, toJson, toYaml, tokenPattern, toolchainConfigSchema, tsconfigConfigSchema, viteConfigSchema, watchConfigSchema, workflowConfigSchema, workflowSettingSchema, workflowStepSchema, workflowStepsConfigSchema, writeJsonFile };
|
package/dist/shared.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"node:path";import"node:url";import.meta.url;import{
|
|
1
|
+
import"node:path";import"node:url";import.meta.url;import{TOOLCHAIN_PACKAGE as e,findOwnCliEntry as t,localToolchainVersion as n}from"./packages/shared/src/bin.js";import{deepMerge as r,isPlainObject as i,mapValues as a,resolveSort as o,sort as s}from"./packages/shared/src/object-utils.js";import{mergeJsonAt as c,readJsonAt as l,readJsonFile as u,toJson as d,writeJsonFile as f}from"./packages/shared/src/fs-utils.js";import{LOG_LEVELS as p,configureLogger as m,createLogger as h,getLogOverrides as g,getLogger as _,isLogLevel as v,logger as y,normalizeLogLevel as b,setLogConfig as x,setLogOverrides as S,stripAnsi as C}from"./packages/shared/src/logger.js";import{providerActions as w}from"./packages/shared/src/provider.js";import{killProcessTree as T,run as E,spawnCross as D}from"./packages/shared/src/run.js";import{asString as O,camelCase as k,camelCaseId as A,capitalize as j,constantCase as M,ensureLeadingSlash as N,ensureSlashes as P,ensureTrailingSlash as F,formatCliFlag as I,hasText as L,indent as R,isLocalhost as z,kebabCase as B,pascalCase as V,removeDoubleSlashes as H,removeLeadingSlash as U,removeTrailingSlash as W,sanitizeSlashes as G,snakeCase as K,str as q,titleCase as J}from"./packages/shared/src/string-utils.js";import{applyReplacements as Y,applyReplacementsDeep as X,createReplacer as Z,defineReplacements as Q,extractTokens as $,hasUnresolvedTokens as ee,tokenPattern as te}from"./packages/shared/src/template.js";import{CONFIG_SECTION_DESCRIPTIONS as ne,CONFIG_SECTION_SCHEMAS as re,CONFIG_TYPE_SCHEMAS as ie,biomeConfigSchema as ae,changelogConfigSchema as oe,changelogVersioningConfigSchema as se,changelogVersioningSchema as ce,changelogVersioningTargetSchema as le,changelogWorkflowsConfigSchema as ue,dbxConfigSchema as de,loggerConfigSchema as fe,projectConfigSchema as pe,projectTypeSchema as me,providersConfigSchema as he,templateKindSchema as ge,templateSourceSchema as _e,templateSourceTypeSchema as ve,templatesConfigSchema as ye,toolchainConfigSchema as be,tsconfigConfigSchema as xe,viteConfigSchema as Se,watchConfigSchema as Ce,workflowConfigSchema as we,workflowSettingSchema as Te,workflowStepSchema as Ee,workflowStepsConfigSchema as De}from"./packages/shared/src/config-schema.js";import{CONFIG_FILE_NAMES as Oe,defineConfig as ke,repoSlugFromUrl as Ae,resolveTokens as je,sectionConfig as Me,sectionEnabled as Ne}from"./packages/shared/src/toolchain.js";import{toYaml as Pe}from"./packages/shared/src/yaml.js";import"./packages/shared/src/index.js";export{Oe as CONFIG_FILE_NAMES,ne as CONFIG_SECTION_DESCRIPTIONS,re as CONFIG_SECTION_SCHEMAS,ie as CONFIG_TYPE_SCHEMAS,p as LOG_LEVELS,e as TOOLCHAIN_PACKAGE,Y as applyReplacements,X as applyReplacementsDeep,O as asString,ae as biomeConfigSchema,k as camelCase,A as camelCaseId,j as capitalize,oe as changelogConfigSchema,se as changelogVersioningConfigSchema,ce as changelogVersioningSchema,le as changelogVersioningTargetSchema,ue as changelogWorkflowsConfigSchema,m as configureLogger,M as constantCase,h as createLogger,Z as createReplacer,de as dbxConfigSchema,r as deepMerge,ke as defineConfig,Q as defineReplacements,N as ensureLeadingSlash,P as ensureSlashes,F as ensureTrailingSlash,$ as extractTokens,t as findOwnCliEntry,I as formatCliFlag,g as getLogOverrides,_ as getLogger,L as hasText,ee as hasUnresolvedTokens,R as indent,z as isLocalhost,v as isLogLevel,i as isPlainObject,B as kebabCase,T as killProcessTree,n as localToolchainVersion,y as logger,fe as loggerConfigSchema,a as mapValues,c as mergeJsonAt,b as normalizeLogLevel,V as pascalCase,pe as projectConfigSchema,me as projectTypeSchema,w as providerActions,he as providersConfigSchema,l as readJsonAt,u as readJsonFile,H as removeDoubleSlashes,U as removeLeadingSlash,W as removeTrailingSlash,Ae as repoSlugFromUrl,o as resolveSort,je as resolveTokens,E as run,G as sanitizeSlashes,Me as sectionConfig,Ne as sectionEnabled,x as setLogConfig,S as setLogOverrides,K as snakeCase,s as sort,D as spawnCross,q as str,C as stripAnsi,ge as templateKindSchema,_e as templateSourceSchema,ve as templateSourceTypeSchema,ye as templatesConfigSchema,J as titleCase,d as toJson,Pe as toYaml,te as tokenPattern,be as toolchainConfigSchema,xe as tsconfigConfigSchema,Se as viteConfigSchema,Ce as watchConfigSchema,we as workflowConfigSchema,Te as workflowSettingSchema,Ee as workflowStepSchema,De as workflowStepsConfigSchema,f as writeJsonFile};
|
package/dist/vite.d.ts
CHANGED
|
@@ -2,9 +2,10 @@ import __tsdown_shims_path from 'node:path';
|
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { VP_COMMANDS, VpCommandInfo, VpGroup, resolveVpCommand, viteCommandName } from "./packages/vite/src/commands.js";
|
|
4
4
|
import { runGuard, viteCommands } from "./packages/vite/src/cli/index.js";
|
|
5
|
-
import { DBX_TASKS, DbxPluginOptions, DbxSource,
|
|
5
|
+
import { DBX_TASKS, DBX_TIMEOUT_MS, DbxPluginOptions, DbxSource, ResolvedDbx, dbx, dbxTaskCommand, resolveDbx, runDbx } from "./packages/vite/src/plugin.js";
|
|
6
6
|
import { viteProvider } from "./packages/vite/src/provider.js";
|
|
7
|
-
import {
|
|
7
|
+
import { ResolveViteOptions, resolveVite } from "./packages/vite/src/resolve.js";
|
|
8
|
+
import { VITE_CONFIG_SHIM, renderViteConfig, viteConfigObject, viteSyncTask } from "./packages/vite/src/sync.js";
|
|
8
9
|
import { ResolvedVp, RunVpOptions, VpResult, VpSource, describeVp, hasVp, resolveVp, runVp, vpVersion, which } from "./packages/vite/src/vp.js";
|
|
9
10
|
import "./packages/vite/src/index.js";
|
|
10
|
-
export { DBX_TASKS,
|
|
11
|
+
export { DBX_TASKS, DBX_TIMEOUT_MS, DbxPluginOptions, DbxSource, ResolveViteOptions, ResolvedDbx, ResolvedVp, RunVpOptions, VITE_CONFIG_SHIM, VP_COMMANDS, VpCommandInfo, VpGroup, VpResult, VpSource, dbx, dbxTaskCommand, describeVp, hasVp, renderViteConfig, resolveDbx, resolveVite, resolveVp, resolveVpCommand, runDbx, runGuard, runVp, viteCommandName, viteCommands, viteConfigObject, viteProvider, viteSyncTask, vpVersion, which };
|
package/dist/vite.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"node:path";import"node:url";import.meta.url;import{VP_COMMANDS as e,resolveVpCommand as t,viteCommandName as n}from"./packages/vite/src/commands.js";import{describeVp as r,hasVp as i,resolveVp as a,runVp as o,vpVersion as s,which as c}from"./packages/vite/src/vp.js";import{runGuard as l,viteCommands as u}from"./packages/vite/src/cli/index.js";import{DBX_TASKS as d,
|
|
1
|
+
import"node:path";import"node:url";import.meta.url;import{VP_COMMANDS as e,resolveVpCommand as t,viteCommandName as n}from"./packages/vite/src/commands.js";import{describeVp as r,hasVp as i,resolveVp as a,runVp as o,vpVersion as s,which as c}from"./packages/vite/src/vp.js";import{runGuard as l,viteCommands as u}from"./packages/vite/src/cli/index.js";import{DBX_TASKS as d,DBX_TIMEOUT_MS as f,dbx as p,dbxTaskCommand as m,resolveDbx as h,runDbx as g}from"./packages/vite/src/plugin.js";import{viteProvider as _}from"./packages/vite/src/provider.js";import{VITE_CONFIG_SHIM as v,renderViteConfig as y,viteConfigObject as b,viteSyncTask as x}from"./packages/vite/src/sync.js";import{resolveVite as S}from"./packages/vite/src/resolve.js";import"./packages/vite/src/index.js";export{d as DBX_TASKS,f as DBX_TIMEOUT_MS,v as VITE_CONFIG_SHIM,e as VP_COMMANDS,p as dbx,m as dbxTaskCommand,r as describeVp,i as hasVp,y as renderViteConfig,h as resolveDbx,S as resolveVite,a as resolveVp,t as resolveVpCommand,g as runDbx,l as runGuard,o as runVp,n as viteCommandName,u as viteCommands,b as viteConfigObject,_ as viteProvider,x as viteSyncTask,s as vpVersion,c as which};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deltabox/toolchain",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "All-in-one toolchain: scaffold projects, manage templates, configs, tsconfigs, changelogs and builds.",
|
|
5
5
|
"homepage": "https://toolchain.deltabox.studio",
|
|
6
6
|
"author": "Victor Sango <victor@deltabox.studio>",
|
|
@@ -37,15 +37,15 @@
|
|
|
37
37
|
"settings"
|
|
38
38
|
],
|
|
39
39
|
"scripts": {
|
|
40
|
-
"build": "vp run --filter \"./packages/*\" build && vp run build:root",
|
|
40
|
+
"build": "node scripts/bootstrap.mjs && vp run --filter \"./packages/*\" build && vp run build:root && yarn workspace toolchain-vscode package:vsix",
|
|
41
41
|
"docs": "vp run --filter \"./apps/docs\"",
|
|
42
42
|
"format": "vp fmt",
|
|
43
43
|
"format:check": "vp fmt --check",
|
|
44
44
|
"lint": "vp lint --fix",
|
|
45
45
|
"lint:check": "vp lint",
|
|
46
46
|
"check": "vp check",
|
|
47
|
-
"typecheck": "vp run --filter \"./packages/*\" build && vp run --filter \"./packages/*\" typecheck && vp run typecheck:root",
|
|
48
|
-
"test": "vp run --filter \"./packages/*\" build && vp run --filter \"./packages/*\" test && vp run test:root",
|
|
47
|
+
"typecheck": "node scripts/bootstrap.mjs && vp run --filter \"./packages/*\" build && vp run --filter \"./packages/*\" typecheck && vp run typecheck:root",
|
|
48
|
+
"test": "node scripts/bootstrap.mjs && vp run --filter \"./packages/*\" build && vp run --filter \"./packages/*\" test && vp run test:root",
|
|
49
49
|
"vp:test": "vp test --run --config vite.config.ts",
|
|
50
50
|
"vp:toolchain": "vp toolchain",
|
|
51
51
|
"config:generate": "tsx scripts/generate-config.ts",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"dev": "tsx src/cli/index.ts",
|
|
54
54
|
"dbx": "tsx src/cli/index.ts",
|
|
55
55
|
"commitlint": "commitlint",
|
|
56
|
-
"
|
|
56
|
+
"postinstall": "husky && node scripts/bootstrap.mjs"
|
|
57
57
|
},
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public",
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
"apps/*"
|
|
65
65
|
],
|
|
66
66
|
"dependencies": {
|
|
67
|
+
"@clack/prompts": "^1.8.1",
|
|
67
68
|
"commander": "^14.0.0",
|
|
68
69
|
"glob": "^13.0.6",
|
|
69
70
|
"lodash": "^4.18.1",
|
|
@@ -75,17 +76,17 @@
|
|
|
75
76
|
"devDependencies": {
|
|
76
77
|
"@commitlint/cli": "^21.2.2",
|
|
77
78
|
"@commitlint/config-conventional": "^21.2.2",
|
|
78
|
-
"@deltabox/toolchain-biome": "1.
|
|
79
|
-
"@deltabox/toolchain-changelog": "1.
|
|
80
|
-
"@deltabox/toolchain-config": "1.
|
|
81
|
-
"@deltabox/toolchain-core": "1.
|
|
82
|
-
"@deltabox/toolchain-migrate": "1.
|
|
83
|
-
"@deltabox/toolchain-project": "1.
|
|
84
|
-
"@deltabox/toolchain-shared": "1.
|
|
85
|
-
"@deltabox/toolchain-template": "1.
|
|
86
|
-
"@deltabox/toolchain-tsconfig": "1.
|
|
87
|
-
"@deltabox/toolchain-tsdown": "1.
|
|
88
|
-
"@deltabox/toolchain-vite": "1.
|
|
79
|
+
"@deltabox/toolchain-biome": "1.6.0",
|
|
80
|
+
"@deltabox/toolchain-changelog": "1.6.0",
|
|
81
|
+
"@deltabox/toolchain-config": "1.6.0",
|
|
82
|
+
"@deltabox/toolchain-core": "1.6.0",
|
|
83
|
+
"@deltabox/toolchain-migrate": "1.6.0",
|
|
84
|
+
"@deltabox/toolchain-project": "1.6.0",
|
|
85
|
+
"@deltabox/toolchain-shared": "1.6.0",
|
|
86
|
+
"@deltabox/toolchain-template": "1.6.0",
|
|
87
|
+
"@deltabox/toolchain-tsconfig": "1.6.0",
|
|
88
|
+
"@deltabox/toolchain-tsdown": "1.6.0",
|
|
89
|
+
"@deltabox/toolchain-vite": "1.6.0",
|
|
89
90
|
"@types/node": "^22.10.2",
|
|
90
91
|
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
91
92
|
"cross-env": "^10.1.0",
|
|
@@ -100,6 +101,14 @@
|
|
|
100
101
|
"vite-plus": "^1.2.0",
|
|
101
102
|
"vitest": "^5.0.0"
|
|
102
103
|
},
|
|
104
|
+
"peerDependencies": {
|
|
105
|
+
"vite-plus": ">=1"
|
|
106
|
+
},
|
|
107
|
+
"peerDependenciesMeta": {
|
|
108
|
+
"vite-plus": {
|
|
109
|
+
"optional": true
|
|
110
|
+
}
|
|
111
|
+
},
|
|
103
112
|
"packageManager": "yarn@4.17.1",
|
|
104
113
|
"engines": {
|
|
105
114
|
"node": ">=22.5.0"
|