Skip to content

Commit d56a742

Browse files
committed
refactor(cli): drop dead re-exports from create/command.ts
The five re-exports in `create/command.ts` were a leftover from the earlier consolidation pass: - `ExecutionResult`, `RunCommandOptions`, `RunCommandResult` (type re-exports): nobody imported them through `create/command.ts`. Three dead bridges. - `runCommand`, `runCommandSilently` (value re-exports): only `create/templates/remote.ts` consumed them. Migrate that one file to import directly from `'../../utils/command.ts'` and the bridge can go. `create/command.ts` is now strictly a create-flow module: it defines `ExecutionWithProjectDir`, `runCommandAndDetectProjectDir`, `getPackageRunner`, `formatDlxCommand`, `prependToPathToEnvs` — no bridging from utils.
1 parent f1fe113 commit d56a742

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

packages/cli/src/create/command.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ import { runCommand as runCommandWithFspy } from '../../binding/index.js';
55
import type { WorkspaceInfo } from '../types/index.ts';
66
import type { ExecutionResult, RunCommandOptions } from '../utils/command.ts';
77

8-
export type { ExecutionResult, RunCommandOptions, RunCommandResult } from '../utils/command.ts';
9-
export { runCommand, runCommandSilently } from '../utils/command.ts';
10-
118
/** Set by `runCommandAndDetectProjectDir` and the template executors
129
* that call it; plain `runCommand` / `runCommandSilently` don't. */
1310
export interface ExecutionWithProjectDir extends ExecutionResult {

packages/cli/src/create/templates/remote.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ import * as prompts from '@voidzero-dev/vite-plus-prompts';
22
import colors from 'picocolors';
33

44
import type { WorkspaceInfo } from '../../types/index.ts';
5+
import { runCommand, runCommandSilently } from '../../utils/command.ts';
56
import { checkNpmPackageExists } from '../../utils/package.ts';
67
import {
78
type ExecutionWithProjectDir,
89
formatDlxCommand,
9-
runCommand,
1010
runCommandAndDetectProjectDir,
11-
runCommandSilently,
1211
} from '../command.ts';
1312
import type { TemplateInfo } from './types.ts';
1413

0 commit comments

Comments
 (0)