@contentful/experience-design-system-cli 2.32.1-dev-build-6b922ec.0 → 2.32.1-dev-build-b78fe18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/package.json +1 -2
  2. package/dist/src/credentials-store.d.ts +23 -0
  3. package/dist/src/index.js +846 -1339
  4. package/dist/src/setup/analytics-prompt.d.ts +13 -0
  5. package/dist/src/setup/auto-filter-prompt.d.ts +13 -0
  6. package/dist/src/setup/command.d.ts +13 -4
  7. package/dist/src/setup/composition-mode-prompt.d.ts +14 -0
  8. package/dist/src/setup/debug-mode-prompt.d.ts +11 -0
  9. package/package.json +6 -7
  10. package/dist/src/doctor/checks.d.ts +0 -5
  11. package/dist/src/doctor/command.d.ts +0 -7
  12. package/dist/src/doctor/report.d.ts +0 -12
  13. package/dist/src/lib/agent-definitions.d.ts +0 -7
  14. package/dist/src/setup/lib/checks.d.ts +0 -69
  15. package/dist/src/setup/lib/layout.d.ts +0 -34
  16. package/dist/src/setup/lib/prompt-input.d.ts +0 -17
  17. package/dist/src/setup/lib/shell.d.ts +0 -15
  18. package/dist/src/setup/lib/types.d.ts +0 -55
  19. package/dist/src/setup/lib/yes-no-prompt.d.ts +0 -8
  20. package/dist/src/setup/steps/coding-agent.d.ts +0 -2
  21. package/dist/src/setup/steps/contentful.d.ts +0 -2
  22. package/dist/src/setup/steps/preferences/analytics.d.ts +0 -5
  23. package/dist/src/setup/steps/preferences/auto-filter.d.ts +0 -4
  24. package/dist/src/setup/steps/preferences/concurrency.d.ts +0 -3
  25. package/dist/src/setup/steps/preferences/custom-prompts.d.ts +0 -8
  26. package/dist/src/setup/steps/preferences/debug.d.ts +0 -4
  27. package/dist/src/setup/steps/preferences/index.d.ts +0 -41
  28. package/dist/src/setup/steps/preferences/no-color.d.ts +0 -3
  29. package/dist/src/setup/steps/prerequisites/build.d.ts +0 -2
  30. package/dist/src/setup/steps/prerequisites/index.d.ts +0 -8
  31. package/dist/src/setup/steps/prerequisites/node.d.ts +0 -4
  32. package/dist/src/setup/steps/prerequisites/pnpm.d.ts +0 -2
  33. package/dist/src/setup/tui/SetupScreen.d.ts +0 -30
  34. package/dist/src/setup/tui/SetupStepper.d.ts +0 -7
  35. package/dist/src/setup/tui/usePromptInput.d.ts +0 -19
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Ask the operator whether to persist an opt-out of anonymous usage analytics.
3
+ *
4
+ * The helper is injectable so it can be unit-tested without a TTY. The caller
5
+ * provides an `ask` function that yields one line of input per call.
6
+ *
7
+ * Behavior:
8
+ * - Empty input returns `current` if defined, else `false` (default: enabled).
9
+ * - Input starting with 'y' or 'Y' returns `true` (disabled).
10
+ * - Input starting with 'n' or 'N' returns `false` (enabled).
11
+ * - Any other input falls back to the same rule as empty input.
12
+ */
13
+ export declare function promptAnalyticsPreference(ask: (q: string) => Promise<string>, current?: boolean): Promise<boolean>;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Ask the operator whether to enable the AI auto-filter by default.
3
+ *
4
+ * The helper is injectable so it can be unit-tested without a TTY. The caller
5
+ * provides an `ask` function that yields one line of input per call.
6
+ *
7
+ * Behavior:
8
+ * - Empty input returns `current` if defined, else `true` (default ON).
9
+ * - Input starting with 'y' or 'Y' returns `true`.
10
+ * - Input starting with 'n' or 'N' returns `false`.
11
+ * - Any other input falls back to the same rule as empty input.
12
+ */
13
+ export declare function promptAutoFilterPreference(ask: (q: string) => Promise<string>, current?: boolean): Promise<boolean>;
@@ -1,6 +1,15 @@
1
1
  import type { Command } from 'commander';
2
- import type { SetupScreenDependencies } from './tui/SetupScreen.js';
3
- export declare const SETUP_REQUIRES_TTY_MESSAGE = "Error: experiences setup requires an interactive terminal.";
4
- export declare function getCliVersion(): string;
5
- export declare function createSetupScreenDependencies(): SetupScreenDependencies;
2
+ import type { AgentName } from '@contentful/experience-design-system-generation';
3
+ export declare function promptCodexModel(ask?: (q: string) => Promise<string>): Promise<string | undefined>;
4
+ export declare function setupAgent(): Promise<{
5
+ agent: AgentName | undefined;
6
+ agentModel: string | undefined;
7
+ }>;
8
+ export type SkillPromptKind = 'select' | 'generate';
9
+ /**
10
+ * Prompt the operator for a custom skill prompt path. Returns the resolved
11
+ * trimmed value, or `undefined` to leave the current value unchanged, or `null`
12
+ * to clear it. `ask` is injectable so tests can stub stdin.
13
+ */
14
+ export declare function promptCustomSkillPath(kind: SkillPromptKind, current: string | undefined, ask?: (q: string) => Promise<string>): Promise<string | undefined | null>;
6
15
  export declare function registerSetupCommand(program: Command): void;
@@ -0,0 +1,14 @@
1
+ import type { CompositionMode } from '../lib/composition-mode.js';
2
+ /**
3
+ * Setup prompts for composition (spec T10). Parallels `promptAutoFilterPreference`
4
+ * — injectable `ask` for TTY-free unit testing.
5
+ *
6
+ * (a) Composite-mode default. Default N → atomic (composition OFF); the
7
+ * low-surprise default. `--composite` opts in per invocation.
8
+ */
9
+ export declare function promptCompositeModePreference(ask: (q: string) => Promise<string>, current?: CompositionMode): Promise<CompositionMode>;
10
+ /**
11
+ * (b) Agentic mapping resolution. Default N — opt-in (it costs tokens and the
12
+ * output needs review), and only meaningful in composite mode.
13
+ */
14
+ export declare function promptAgenticResolutionPreference(ask: (q: string) => Promise<string>, current?: boolean): Promise<boolean>;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Ask the operator whether to enable debug logging by default.
3
+ *
4
+ * When ON, every command writes a JSONL trace of its decisions to
5
+ * ~/.contentful/experience-design-system-cli/debug/. Off by default because
6
+ * the trace file grows quickly and contains verbose per-tool-call detail
7
+ * intended for developers debugging the CLI.
8
+ *
9
+ * Injectable `ask` so tests can drive without a TTY.
10
+ */
11
+ export declare function promptDebugModePreference(ask: (q: string) => Promise<string>, current?: boolean): Promise<boolean>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.32.1-dev-build-6b922ec.0",
3
+ "version": "2.32.1-dev-build-b78fe18.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -29,7 +29,6 @@
29
29
  "skills/"
30
30
  ],
31
31
  "dependencies": {
32
- "@inkjs/ui": "^2.0.0",
33
32
  "@segment/analytics-node": "^3.0.0",
34
33
  "@vue/compiler-sfc": "^3.5.31",
35
34
  "commander": "^13.1.0",
@@ -41,8 +40,8 @@
41
40
  "svelte": "^5.56.4",
42
41
  "ts-morph": "^27.0.2",
43
42
  "typescript": "^5.9.3",
44
- "@contentful/experience-design-system-cli-v2": "2.32.1-dev-build-6b922ec.0",
45
- "@contentful/experience-design-system-types": "2.32.1-dev-build-6b922ec.0"
43
+ "@contentful/experience-design-system-cli-v2": "2.32.1-dev-build-b78fe18.0",
44
+ "@contentful/experience-design-system-types": "2.32.1-dev-build-b78fe18.0"
46
45
  },
47
46
  "devDependencies": {
48
47
  "@tsconfig/node24": "^24.0.4",
@@ -54,9 +53,9 @@
54
53
  "ink-testing-library": "^4.0.0",
55
54
  "typescript-eslint": "^8.67.0",
56
55
  "vitest": "^4.0.16",
57
- "@contentful/experience-design-system-extraction": "2.32.1-dev-build-6b922ec.0",
58
- "@contentful/experience-design-system-generation": "2.32.1-dev-build-6b922ec.0",
59
- "@contentful/experience-design-system-client": "2.32.1-dev-build-6b922ec.0"
56
+ "@contentful/experience-design-system-extraction": "2.32.1-dev-build-b78fe18.0",
57
+ "@contentful/experience-design-system-generation": "2.32.1-dev-build-b78fe18.0",
58
+ "@contentful/experience-design-system-client": "2.32.1-dev-build-b78fe18.0"
60
59
  },
61
60
  "repository": {
62
61
  "type": "git",
@@ -1,5 +0,0 @@
1
- export declare function reportNode(): Promise<boolean>;
2
- export declare function reportPnpm(pkgRoot: string): Promise<boolean>;
3
- export declare function reportDependencies(pkgRoot: string): Promise<boolean>;
4
- export declare function reportBuild(pkgRoot: string): Promise<boolean>;
5
- export declare function reportAgent(): Promise<boolean>;
@@ -1,7 +0,0 @@
1
- import type { Command } from 'commander';
2
- export interface DoctorOptions {
3
- skipBuild?: boolean;
4
- skipAgent?: boolean;
5
- }
6
- export declare function runDoctor(opts: DoctorOptions): Promise<void>;
7
- export declare function registerDoctorCommand(program: Command): void;
@@ -1,12 +0,0 @@
1
- /**
2
- * `experiences doctor` streams its findings as each check runs rather than
3
- * repainting a screen, so it writes ANSI directly instead of mounting the Ink
4
- * setup UI.
5
- */
6
- export declare function ok(msg: string): void;
7
- export declare function fail(msg: string): void;
8
- export declare function warn(msg: string): void;
9
- export declare function info(msg: string): void;
10
- export declare function section(title: string): void;
11
- /** Echo the first `limit` lines of a failed command's stderr. */
12
- export declare function infoStderr(stderr: string, limit: number): void;
@@ -1,7 +0,0 @@
1
- import type { AgentName } from '@contentful/experience-design-system-generation';
2
- export interface AgentDefinition {
3
- name: string;
4
- binary: AgentName;
5
- installHint: string;
6
- }
7
- export declare const AGENT_DEFS: readonly AgentDefinition[];
@@ -1,69 +0,0 @@
1
- import { binaryExists, pathExists, runSpawn, type ShellCommandResult } from './shell.js';
2
- /**
3
- * The decision half of each prerequisite check, shared by `experiences doctor`
4
- * and the setup wizard's Prerequisites step. Neither writes output from here:
5
- * doctor streams ANSI, setup emits events for Ink, and both need the same
6
- * verdict. Anything a caller needs for its own wording is returned rather than
7
- * printed.
8
- */
9
- export interface NodeVersionCheck {
10
- passed: boolean;
11
- version: string;
12
- major: number;
13
- required: number;
14
- }
15
- export declare function checkNodeVersion(nodeVersion?: string): NodeVersionCheck;
16
- /** Which Node version manager is available, so callers can offer the right fix. */
17
- export interface NodeVersionManagers {
18
- nvm: boolean;
19
- fnm: boolean;
20
- nvmScript: string;
21
- }
22
- export declare function detectNodeVersionManagers(homeDir: string, deps?: {
23
- binaryExists: typeof binaryExists;
24
- pathExists: typeof pathExists;
25
- }): Promise<NodeVersionManagers>;
26
- export type PnpmCheck = {
27
- status: 'missing';
28
- } | {
29
- status: 'broken';
30
- } | {
31
- status: 'unusable-in-repo';
32
- version: string;
33
- } | {
34
- status: 'ok';
35
- version: string;
36
- };
37
- type PnpmDeps = {
38
- binaryExists: typeof binaryExists;
39
- run: typeof runSpawn;
40
- };
41
- /** Whether pnpm is on PATH and reports a version. */
42
- export declare function detectPnpm(deps?: PnpmDeps): Promise<Extract<PnpmCheck, {
43
- status: 'missing' | 'broken' | 'ok';
44
- }>>;
45
- /**
46
- * `detectPnpm` plus proof that pnpm can execute inside the repo. A store built
47
- * against a different Node version still passes `--version` but fails there,
48
- * which is the failure operators actually hit — so doctor checks it, while the
49
- * setup wizard only needs to know pnpm exists before it installs.
50
- */
51
- export declare function checkPnpm(pkgRoot: string, deps?: PnpmDeps): Promise<PnpmCheck>;
52
- export interface InstallCheck {
53
- passed: boolean;
54
- /** Whether `node_modules` was already present, which changes doctor's wording. */
55
- hadNodeModules: boolean;
56
- result: ShellCommandResult;
57
- }
58
- export declare function installDependencies(pkgRoot: string, deps?: {
59
- pathExists: typeof pathExists;
60
- run: typeof runSpawn;
61
- }): Promise<InstallCheck>;
62
- export interface BuildCheck {
63
- passed: boolean;
64
- result: ShellCommandResult;
65
- }
66
- export declare function buildCli(repoRoot: string, deps?: {
67
- run: typeof runSpawn;
68
- }): Promise<BuildCheck>;
69
- export {};
@@ -1,34 +0,0 @@
1
- export declare const SETUP_SCREENS: readonly [{
2
- readonly title: "Prerequisites";
3
- readonly kind: "required";
4
- }, {
5
- readonly title: "Coding agent";
6
- readonly kind: "required";
7
- }, {
8
- readonly title: "Contentful";
9
- readonly kind: "optional";
10
- }, {
11
- readonly title: "Preferences";
12
- readonly kind: "optional";
13
- }];
14
- export declare const SETUP_TITLE = "experiences setup";
15
- export declare const WIDE_STEPPER_MIN_COLUMNS: number;
16
- export type SetupStepState = 'complete' | 'active' | 'pending';
17
- export interface SetupStepperEntry {
18
- step: number;
19
- title: string;
20
- state: SetupStepState;
21
- label: string;
22
- }
23
- export declare function shouldUseWideStepper(columns?: number): boolean;
24
- export declare function setupStepperSeparator(columns?: number): string;
25
- export declare function setupStepperEntries(activeStep: number, columns?: number): SetupStepperEntry[];
26
- export declare function shouldAlignVersionRight(version: string, columns?: number): boolean;
27
- export type SetupResultStatus = 'completed' | 'skipped' | 'failed';
28
- export interface SetupResultEntry {
29
- name: string;
30
- status: SetupResultStatus;
31
- required: boolean;
32
- }
33
- export declare function countRequiredFailures(results: readonly SetupResultEntry[]): number;
34
- export declare function formatSetupCompletionMessage(results: readonly SetupResultEntry[]): string;
@@ -1,17 +0,0 @@
1
- /**
2
- * A terminal coalesces fast input, so a pasted value and the Enter that follows
3
- * it arrive in a single chunk (`"my-token\r"`). Only the first line is kept, so
4
- * a multi-line paste submits its first value instead of filling one field with
5
- * all of them.
6
- *
7
- * This is why setup reads raw chunks instead of using @inkjs/ui's TextInput.
8
- * Ink's `parseKeypress` reports `key.return` only for a bare `"\r"`, so a
9
- * coalesced chunk arrives as text with `key.return === false`; TextInput then
10
- * inserts the whole thing — trailing CR and all — and never submits. Verified
11
- * against @inkjs/ui 2 on Ink 5, where PasswordInput behaves the same way and
12
- * ConfirmInput ignores `"y\r"` outright.
13
- */
14
- export declare function splitPromptInput(input: string): {
15
- text: string;
16
- submitted: boolean;
17
- };
@@ -1,15 +0,0 @@
1
- export declare const REQUIRED_NODE_MAJOR = 24;
2
- export interface ShellCommandResult {
3
- exitCode: number;
4
- stdout: string;
5
- stderr: string;
6
- }
7
- export declare function binaryExists(name: string): Promise<boolean>;
8
- export declare function pathExists(path: string): Promise<boolean>;
9
- export declare function runSpawn(cmd: string, args: string[], opts?: {
10
- cwd?: string;
11
- env?: NodeJS.ProcessEnv;
12
- }): Promise<ShellCommandResult>;
13
- export declare function detectShellProfile(): Promise<string>;
14
- export declare function profileContains(profilePath: string, value: string): Promise<boolean>;
15
- export declare function appendToProfile(profilePath: string, lines: string): Promise<void>;
@@ -1,55 +0,0 @@
1
- import type { AgentName } from '@contentful/experience-design-system-generation';
2
- import type { ExperiencesCredentials } from '../../credentials-store.js';
3
- import type { ShellCommandResult } from './shell.js';
4
- export type SetupActionEventKind = 'success' | 'failure' | 'warning' | 'info' | 'value' | 'help' | 'page';
5
- export interface SetupActionEvent {
6
- kind: SetupActionEventKind;
7
- message: string;
8
- }
9
- export interface SetupChoice {
10
- label: string;
11
- description?: string;
12
- }
13
- /**
14
- * Everything a setup step needs from the outside world. Prompts and output are
15
- * supplied by whatever renders the step — the Ink screen in production, stubs in
16
- * tests — so the steps hold the business rules and none of the presentation.
17
- */
18
- export interface SetupActionDependencies {
19
- nodeVersion: string;
20
- homeDir: string;
21
- env: NodeJS.ProcessEnv;
22
- ask(question: string): Promise<string>;
23
- askSecret(question: string): Promise<string>;
24
- confirm(question: string, defaultYes?: boolean): Promise<boolean>;
25
- /** Resolves the chosen index, or `undefined` when the operator skips. */
26
- choose(question: string, options: readonly SetupChoice[]): Promise<number | undefined>;
27
- write(event: SetupActionEvent): void;
28
- binaryExists(binary: string): Promise<boolean>;
29
- run(command: string, args: string[], options?: {
30
- cwd?: string;
31
- env?: NodeJS.ProcessEnv;
32
- }): Promise<ShellCommandResult>;
33
- pathExists(path: string): Promise<boolean>;
34
- profileContains(profilePath: string, value: string): Promise<boolean>;
35
- appendToProfile(profilePath: string, lines: string): Promise<void>;
36
- readCredentials(): Promise<ExperiencesCredentials>;
37
- writeCredentials(credentials: ExperiencesCredentials): Promise<void>;
38
- credentialsPath(): string;
39
- }
40
- export interface SetupCheckResult {
41
- passed: boolean;
42
- }
43
- export interface PrerequisitesSetupResult {
44
- node: SetupCheckResult & {
45
- restartRequired?: boolean;
46
- };
47
- pnpm?: SetupCheckResult;
48
- build?: SetupCheckResult;
49
- }
50
- export interface AgentSetupResult {
51
- agent: AgentName | undefined;
52
- agentModel: string | undefined;
53
- passed: boolean;
54
- }
55
- export declare function emit(dependencies: SetupActionDependencies, kind: SetupActionEventKind, message: string): void;
@@ -1,8 +0,0 @@
1
- import type { SetupActionDependencies } from './types.js';
2
- /**
3
- * Ask a yes/no question that defaults to the operator's current setting.
4
- *
5
- * Empty input — and anything that is not a yes or a no — keeps the current
6
- * value, so pressing Enter through the wizard never silently changes a setting.
7
- */
8
- export declare function askYesNo(ask: SetupActionDependencies['ask'], question: string, defaultValue: boolean): Promise<boolean>;
@@ -1,2 +0,0 @@
1
- import { type AgentSetupResult, type SetupActionDependencies } from '../lib/types.js';
2
- export declare function runAgentSetup(dependencies: SetupActionDependencies): Promise<AgentSetupResult>;
@@ -1,2 +0,0 @@
1
- import { type SetupActionDependencies, type SetupCheckResult } from '../lib/types.js';
2
- export declare function runCredentialsSetup(dependencies: SetupActionDependencies): Promise<SetupCheckResult>;
@@ -1,5 +0,0 @@
1
- import { type SetupActionDependencies } from '../../lib/types.js';
2
- export declare const ANALYTICS_HELP = "Shares anonymous usage data about which CLI commands run.";
3
- /** Returns whether analytics should be *disabled*, matching the stored field. */
4
- export declare function promptAnalyticsPreference(ask: SetupActionDependencies['ask'], current?: boolean): Promise<boolean>;
5
- export declare function configureAnalytics(dependencies: SetupActionDependencies): Promise<void>;
@@ -1,4 +0,0 @@
1
- import { type SetupActionDependencies } from '../../lib/types.js';
2
- export declare const AUTO_FILTER_HELP = "Filters out components irrelevant to experience orchestration during extraction.";
3
- export declare function promptAutoFilterPreference(ask: SetupActionDependencies['ask'], current?: boolean): Promise<boolean>;
4
- export declare function configureAutoFilter(dependencies: SetupActionDependencies): Promise<void>;
@@ -1,3 +0,0 @@
1
- import { type SetupActionDependencies } from '../../lib/types.js';
2
- export declare const CONCURRENCY_HELP = "Analyzes more components at once, which is faster on machines with spare cores.";
3
- export declare function configureConcurrency(dependencies: SetupActionDependencies, profilePath: string): Promise<void>;
@@ -1,8 +0,0 @@
1
- import { type SetupActionDependencies } from '../../lib/types.js';
2
- export declare const CUSTOM_PROMPTS_HELP = "Replaces the built-in instructions the coding agent follows when it selects and generates components.";
3
- /**
4
- * Ask for one custom prompt path. Returns the trimmed path, `undefined` to leave
5
- * the stored value alone, or `null` to clear it.
6
- */
7
- export declare function promptCustomSkillPathAction(kind: 'select' | 'generate', current: string | undefined, ask: SetupActionDependencies['ask']): Promise<string | undefined | null>;
8
- export declare function configureCustomPrompts(dependencies: SetupActionDependencies): Promise<void>;
@@ -1,4 +0,0 @@
1
- import { type SetupActionDependencies } from '../../lib/types.js';
2
- export declare const DEBUG_HELP = "Writes a verbose trace of every command decision, for troubleshooting.";
3
- export declare function promptDebugModePreference(ask: SetupActionDependencies['ask'], current?: boolean): Promise<boolean>;
4
- export declare function configureDebug(dependencies: SetupActionDependencies): Promise<void>;
@@ -1,41 +0,0 @@
1
- import type { SetupActionDependencies } from '../../lib/types.js';
2
- import { configureAnalytics } from './analytics.js';
3
- import { configureAutoFilter } from './auto-filter.js';
4
- import { configureConcurrency } from './concurrency.js';
5
- import { configureCustomPrompts } from './custom-prompts.js';
6
- import { configureDebug } from './debug.js';
7
- import { configureNoColor } from './no-color.js';
8
- /**
9
- * The preferences the wizard walks, in the order it presents them. Each entry
10
- * pairs its label with the function that owns that setting's help text, prompt,
11
- * and persistence — so adding a preference means adding a file and a row here.
12
- */
13
- export declare const PREFERENCE_OPTIONS: readonly [{
14
- readonly key: "autoFilter";
15
- readonly label: "AI auto-filter";
16
- readonly configure: typeof configureAutoFilter;
17
- }, {
18
- readonly key: "concurrency";
19
- readonly label: "Performance concurrency";
20
- readonly configure: typeof configureConcurrency;
21
- }, {
22
- readonly key: "customPrompts";
23
- readonly label: "Custom prompts";
24
- readonly configure: typeof configureCustomPrompts;
25
- }, {
26
- readonly key: "debug";
27
- readonly label: "Debug logging";
28
- readonly configure: typeof configureDebug;
29
- }, {
30
- readonly key: "analytics";
31
- readonly label: "Usage analytics";
32
- readonly configure: typeof configureAnalytics;
33
- }, {
34
- readonly key: "noColor";
35
- readonly label: "Disable terminal colors";
36
- readonly configure: typeof configureNoColor;
37
- }];
38
- export type PreferenceKey = (typeof PREFERENCE_OPTIONS)[number]['key'];
39
- export declare function runPreferenceSetupAction(dependencies: SetupActionDependencies, profilePath: string): Promise<{
40
- selected: PreferenceKey[];
41
- }>;
@@ -1,3 +0,0 @@
1
- import { type SetupActionDependencies } from '../../lib/types.js';
2
- export declare const NO_COLOR_HELP = "Prints plain text with no color, which suits CI logs and basic terminals.";
3
- export declare function configureNoColor(dependencies: SetupActionDependencies, profilePath: string): Promise<void>;
@@ -1,2 +0,0 @@
1
- import { type SetupActionDependencies, type SetupCheckResult } from '../../lib/types.js';
2
- export declare function runBuildSetup(dependencies: SetupActionDependencies, repoRoot: string): Promise<SetupCheckResult>;
@@ -1,8 +0,0 @@
1
- import type { PrerequisitesSetupResult, SetupActionDependencies } from '../../lib/types.js';
2
- import { runBuildSetup } from './build.js';
3
- import { runNodeSetup } from './node.js';
4
- import { runPnpmSetup } from './pnpm.js';
5
- export { runBuildSetup, runNodeSetup, runPnpmSetup };
6
- export declare function runPrerequisitesSetup(dependencies: SetupActionDependencies, repoRoot: string, options?: {
7
- skipBuild?: boolean;
8
- }): Promise<PrerequisitesSetupResult>;
@@ -1,4 +0,0 @@
1
- import { type SetupActionDependencies, type SetupCheckResult } from '../../lib/types.js';
2
- export declare function runNodeSetup(dependencies: SetupActionDependencies): Promise<SetupCheckResult & {
3
- restartRequired?: boolean;
4
- }>;
@@ -1,2 +0,0 @@
1
- import { type SetupActionDependencies, type SetupCheckResult } from '../../lib/types.js';
2
- export declare function runPnpmSetup(dependencies: SetupActionDependencies): Promise<SetupCheckResult>;
@@ -1,30 +0,0 @@
1
- import React from 'react';
2
- import { type SetupResultEntry } from '../lib/layout.js';
3
- import type { SetupActionDependencies } from '../lib/types.js';
4
- /** Prompts and output are UI-owned; the screen supplies the rest itself. */
5
- export type SetupScreenDependencies = Omit<SetupActionDependencies, 'ask' | 'askSecret' | 'confirm' | 'choose' | 'write'>;
6
- export type SetupSkipFlags = {
7
- skipBuild?: boolean;
8
- skipAgent?: boolean;
9
- skipCredentials?: boolean;
10
- skipOptional?: boolean;
11
- };
12
- export type SetupOutcome = {
13
- results: SetupResultEntry[];
14
- exitCode: number;
15
- restartRequired: boolean;
16
- runDoctor: boolean;
17
- };
18
- type SetupScreenProps = {
19
- version: string;
20
- repoRoot: string;
21
- profilePath: string;
22
- dependencies: SetupScreenDependencies;
23
- skip?: SetupSkipFlags;
24
- /** Defaults to the live Ink stdout columns. */
25
- columns?: number;
26
- offerDoctor?: boolean;
27
- onComplete: (outcome: SetupOutcome) => void;
28
- };
29
- export declare function SetupScreen({ version, repoRoot, profilePath, dependencies, skip, columns: columnsOverride, offerDoctor, onComplete, }: SetupScreenProps): React.ReactElement;
30
- export {};
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- type SetupStepperProps = {
3
- activeStep: number;
4
- columns?: number;
5
- };
6
- export declare function SetupStepper({ activeStep, columns }: SetupStepperProps): React.ReactElement;
7
- export {};
@@ -1,19 +0,0 @@
1
- export type PromptKey = {
2
- return: boolean;
3
- escape: boolean;
4
- tab: boolean;
5
- backspace: boolean;
6
- delete: boolean;
7
- upArrow: boolean;
8
- downArrow: boolean;
9
- ctrl: boolean;
10
- meta: boolean;
11
- };
12
- export type PromptInputHandler = (chunk: string, key: PromptKey) => void;
13
- /**
14
- * Raw-mode stdin that hands the handler the unparsed chunk.
15
- *
16
- * Setup needs the raw data because `useImmediateInput` blanks `input` for a
17
- * chunk that ends in a newline, which is exactly how a pasted value arrives.
18
- */
19
- export declare function usePromptInput(handler: PromptInputHandler): void;