@contentful/experience-design-system-cli 2.37.1-dev-build-8b3a1c07.0 → 2.37.1-dev-build-35e4cab1.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/dist/app.js +482 -1023
- package/dist/index.js +552 -1154
- package/dist/package.json +1 -1
- package/dist/src/tui/home/home.theme.d.ts +0 -8
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/theme.d.ts +6 -6
- package/dist/src/tui/import/steps/10-flow/theme.d.ts +16 -7
- package/dist/src/tui/settings/contentful-configuration/ContentfulConfigScreen.d.ts +0 -1
- package/dist/src/tui/theme.d.ts +19 -0
- package/legacy/dist/src/index.js +0 -1
- package/legacy/package.json +1 -1
- package/package.json +3 -3
- package/dist/src/tui/help/file-locations.d.ts +0 -23
- package/dist/src/tui/import/steps/09-review/theme.d.ts +0 -9
- package/dist/src/tui/settings/agents/AgentScreens.d.ts +0 -8
- package/dist/src/tui/settings/agents/AgentStatusLine.d.ts +0 -13
- package/dist/src/tui/settings/agents/agent-status.d.ts +0 -29
- package/dist/src/tui/settings/agents/agent-store.d.ts +0 -17
- package/dist/src/tui/settings/agents/apply-binary-overrides.d.ts +0 -13
- package/dist/src/tui/settings/contentful-configuration/ProjectConfigScreen.d.ts +0 -5
- package/dist/src/tui/settings/shared/FieldForm.d.ts +0 -41
package/dist/package.json
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
export declare const PALETTE: {
|
|
2
|
-
readonly accent: "#1773EB";
|
|
3
|
-
readonly success: "#00C459";
|
|
4
|
-
readonly error: "#E44F20";
|
|
5
|
-
readonly warning: "#FFDA00";
|
|
6
|
-
readonly muted: "#8B8D91";
|
|
7
|
-
readonly border: "#C4D1DE";
|
|
8
|
-
};
|
|
9
1
|
export declare function brandBar(width: number, ramp?: readonly string[]): {
|
|
10
2
|
text: string;
|
|
11
3
|
color: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const PALETTE: {
|
|
2
|
-
readonly info: "#
|
|
3
|
-
readonly success: "#
|
|
4
|
-
readonly error: "#
|
|
5
|
-
readonly warning: "#
|
|
6
|
-
readonly muted: "#
|
|
7
|
-
readonly border: "#
|
|
2
|
+
readonly info: "#40a0ff" | "#0059c8";
|
|
3
|
+
readonly success: "#5DB057" | "#006D23";
|
|
4
|
+
readonly error: "#ff707d" | "#bd002a";
|
|
5
|
+
readonly warning: "#FFC835" | "#CC4500";
|
|
6
|
+
readonly muted: "#aec1cc" | "#5a657c";
|
|
7
|
+
readonly border: "#aec1cc" | "#5a657c";
|
|
8
8
|
};
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
export declare const PALETTE: {
|
|
2
2
|
readonly link: "#58A6FF";
|
|
3
|
-
readonly
|
|
4
|
-
readonly
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
3
|
+
readonly text: "#f7f9fa";
|
|
4
|
+
readonly muted: "#aec1cc";
|
|
5
|
+
readonly border: "#aec1cc";
|
|
6
|
+
readonly accent: "#40a0ff";
|
|
7
|
+
readonly error: "#ff707d";
|
|
8
|
+
readonly success: "#5DB057";
|
|
9
|
+
readonly warning: "#FFC835";
|
|
10
|
+
} | {
|
|
11
|
+
readonly link: "#58A6FF";
|
|
12
|
+
readonly text: "#111b2b";
|
|
13
|
+
readonly muted: "#5a657c";
|
|
14
|
+
readonly border: "#5a657c";
|
|
15
|
+
readonly accent: "#0059c8";
|
|
16
|
+
readonly error: "#bd002a";
|
|
17
|
+
readonly success: "#006D23";
|
|
18
|
+
readonly warning: "#CC4500";
|
|
10
19
|
};
|
|
11
20
|
export declare const INK_UI_THEME: {
|
|
12
21
|
components: Record<string, import("@inkjs/ui").ComponentTheme>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type ColorMode = 'dark' | 'light';
|
|
2
|
+
export declare function detectColorMode(env?: NodeJS.ProcessEnv): ColorMode;
|
|
3
|
+
export declare const PALETTE: {
|
|
4
|
+
readonly text: "#f7f9fa";
|
|
5
|
+
readonly muted: "#aec1cc";
|
|
6
|
+
readonly border: "#aec1cc";
|
|
7
|
+
readonly accent: "#40a0ff";
|
|
8
|
+
readonly error: "#ff707d";
|
|
9
|
+
readonly success: "#5DB057";
|
|
10
|
+
readonly warning: "#FFC835";
|
|
11
|
+
} | {
|
|
12
|
+
readonly text: "#111b2b";
|
|
13
|
+
readonly muted: "#5a657c";
|
|
14
|
+
readonly border: "#5a657c";
|
|
15
|
+
readonly accent: "#0059c8";
|
|
16
|
+
readonly error: "#bd002a";
|
|
17
|
+
readonly success: "#006D23";
|
|
18
|
+
readonly warning: "#CC4500";
|
|
19
|
+
};
|
package/legacy/dist/src/index.js
CHANGED
|
@@ -19579,7 +19579,6 @@ var init_src5 = __esm({
|
|
|
19579
19579
|
init_agents();
|
|
19580
19580
|
init_agent_name();
|
|
19581
19581
|
init_models();
|
|
19582
|
-
init_binaries();
|
|
19583
19582
|
init_is_agent_name();
|
|
19584
19583
|
init_agent_supports_bedrock();
|
|
19585
19584
|
init_check_agent_auth2();
|
package/legacy/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.37.1-dev-build-
|
|
3
|
+
"version": "2.37.1-dev-build-35e4cab1.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"ts-morph": "^27.0.2",
|
|
46
46
|
"typescript": "^5.9.3",
|
|
47
47
|
"zod": "^4.6.5",
|
|
48
|
-
"@contentful/experience-design-system-
|
|
49
|
-
"@contentful/experience-design-system-
|
|
48
|
+
"@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-35e4cab1.0",
|
|
49
|
+
"@contentful/experience-design-system-types": "2.37.1-dev-build-35e4cab1.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@tsconfig/node24": "^24.0.4",
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export interface FileLocationInput {
|
|
2
|
-
/** The Root Project Directory from Settings > Configuration > Project. Empty when not set. */
|
|
3
|
-
contentfulBaseDir: string;
|
|
4
|
-
/** Whether Debug Mode is on. Debug logs and the per-run folders only exist while it is. */
|
|
5
|
-
debugModeEnabled: boolean;
|
|
6
|
-
/** This terminal session's folder, once it has started. */
|
|
7
|
-
currentSessionDir: string | undefined;
|
|
8
|
-
}
|
|
9
|
-
export interface FileLocations {
|
|
10
|
-
debugLogs: string;
|
|
11
|
-
importFiles: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Where the CLI writes the files a user goes looking for, from the settings that decide it (see `startImportRun`).
|
|
15
|
-
*
|
|
16
|
-
* With Debug Mode on, everything goes in this terminal session's folder, `<base>/.contentful/<date>-session-N/`:
|
|
17
|
-
* the debug logs in `debug/` and, for each import, a `dsi-import-N/` folder with `tokens.json` and `components.json`.
|
|
18
|
-
* `<base>` is the Root Project Directory, or the project being imported when none is set. With Debug Mode off there is
|
|
19
|
-
* no session folder and no logs, and the files go to `<project>/.contentful/`.
|
|
20
|
-
*
|
|
21
|
-
* Names that are only known when a session or an import starts are shown as patterns, never guessed.
|
|
22
|
-
*/
|
|
23
|
-
export declare function describeFileLocations({ contentfulBaseDir, debugModeEnabled, currentSessionDir, }: FileLocationInput): FileLocations;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Settings > Configuration > Agents: which coding agent the CLI uses, and each agent's own settings. Enter on an agent
|
|
4
|
-
* opens its form; the first row picks the default agent (←/→ or Enter cycles it, and the change is saved at once).
|
|
5
|
-
*/
|
|
6
|
-
export declare function AgentsScreen({ onDone }: {
|
|
7
|
-
onDone: () => void;
|
|
8
|
-
}): React.ReactElement;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { AgentName } from '@contentful/experience-design-system-backend-pipeline';
|
|
3
|
-
import { type AgentCheck } from './agent-status.js';
|
|
4
|
-
/** The one-word state for an agent, shown on its row in the list. */
|
|
5
|
-
export declare function AgentStatusBadge({ name, checks, }: {
|
|
6
|
-
name: AgentName;
|
|
7
|
-
checks: AgentCheck[] | undefined;
|
|
8
|
-
}): React.ReactElement;
|
|
9
|
-
/** Every check that ran, one per line, and what to do next when the agent is not ready. */
|
|
10
|
-
export declare function AgentChecks({ name, checks, }: {
|
|
11
|
-
name: AgentName;
|
|
12
|
-
checks: AgentCheck[] | undefined;
|
|
13
|
-
}): React.ReactElement;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type AgentName } from '@contentful/experience-design-system-backend-pipeline';
|
|
2
|
-
type AgentCheckStep = 'path' | 'version' | 'login' | 'prompt';
|
|
3
|
-
export type AgentCheck = {
|
|
4
|
-
step: AgentCheckStep;
|
|
5
|
-
ok: boolean;
|
|
6
|
-
/** One line for the user: the version string, the reason it failed, or what to run next. */
|
|
7
|
-
detail: string;
|
|
8
|
-
};
|
|
9
|
-
/** The one-word state shown on an agent's row. `unknown` means it runs but its login cannot be checked. */
|
|
10
|
-
export type AgentStatus = 'checking' | 'ready' | 'not-found' | 'not-logged-in' | 'unknown';
|
|
11
|
-
/**
|
|
12
|
-
* The binary the import will actually run for this agent: the saved path if there is one, otherwise the built-in
|
|
13
|
-
* command name. Shown in the form so the user sees what is used when the field is empty.
|
|
14
|
-
*/
|
|
15
|
-
export declare function effectiveBinary(name: AgentName, savedBinary: string): string;
|
|
16
|
-
/** The model the agent runs with when none is saved ("haiku", "gpt-mini", or the agent's own pick), for the model row. */
|
|
17
|
-
export declare function defaultModelLabel(name: AgentName): string;
|
|
18
|
-
/**
|
|
19
|
-
* Steps 1 to 3 against `binary`. Never throws and never spends tokens, so it is safe to run for every row on open.
|
|
20
|
-
* Checks the path the user typed, not what is saved, so the form can test a value before it is written.
|
|
21
|
-
*/
|
|
22
|
-
export declare function inspectAgent(name: AgentName, binary: string): Promise<AgentCheck[]>;
|
|
23
|
-
/** Steps 1 to 4. The prompt step is the only way to verify login and model name for agents other than claude. */
|
|
24
|
-
export declare function testAgent(name: AgentName, binary: string, model: string): Promise<AgentCheck[]>;
|
|
25
|
-
/** Collapses a list of checks into the status shown on the row. */
|
|
26
|
-
export declare function statusFromChecks(name: AgentName, checks: readonly AgentCheck[]): AgentStatus;
|
|
27
|
-
/** What to tell a user whose agent is not ready: the install command, or the login command. Empty when nothing is needed. */
|
|
28
|
-
export declare function nextStepHint(name: AgentName, status: AgentStatus): string;
|
|
29
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type AgentName } from '@contentful/experience-design-system-backend-pipeline';
|
|
2
|
-
export type AgentSettings = {
|
|
3
|
-
/** Passed as --model. Empty: the agent's built-in default (see defaultModelLabel). */
|
|
4
|
-
model: string;
|
|
5
|
-
/** Path to the agent's command. Empty: the command name is looked up on the PATH. */
|
|
6
|
-
binary: string;
|
|
7
|
-
};
|
|
8
|
-
export type AgentConfig = {
|
|
9
|
-
/** The agent the CLI uses when `--agent` is not given. */
|
|
10
|
-
defaultAgent: AgentName;
|
|
11
|
-
agents: Record<AgentName, AgentSettings>;
|
|
12
|
-
};
|
|
13
|
-
export declare const AGENT_LABELS: Record<AgentName, string>;
|
|
14
|
-
export declare const AGENT_HINTS: Record<AgentName, string>;
|
|
15
|
-
export declare function emptyAgents(): Record<AgentName, AgentSettings>;
|
|
16
|
-
export declare function readAgentConfig(): Promise<AgentConfig>;
|
|
17
|
-
export declare function writeAgentConfig(config: AgentConfig): Promise<void>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { AgentConfig } from './agent-store.js';
|
|
2
|
-
/**
|
|
3
|
-
* The pipeline picks an agent's binary from `EDS_AGENT_BINARY_<AGENT>` and nowhere else. This copies each saved
|
|
4
|
-
* `agents.<name>.binary` into that variable, so the saved path reaches every place that spawns an agent (the import,
|
|
5
|
-
* the generation package and the legacy commands) without touching their call sites.
|
|
6
|
-
*
|
|
7
|
-
* Called once at startup, and again after Settings saves a binary so a change applies without a restart.
|
|
8
|
-
*
|
|
9
|
-
* Settings wins over a variable already in the shell, so a forgotten `EDS_AGENT_BINARY_CLAUDE` cannot silently override
|
|
10
|
-
* what the user sees on screen. An agent with no saved path leaves the shell's variable alone, and clearing a path
|
|
11
|
-
* puts the shell's value back.
|
|
12
|
-
*/
|
|
13
|
-
export declare function applyBinaryOverrides(config: AgentConfig): void;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface FormField<K extends string> {
|
|
3
|
-
key: K;
|
|
4
|
-
label: string;
|
|
5
|
-
/** A short note shown dimmed after the value, so the label column stays narrow. */
|
|
6
|
-
hint?: string;
|
|
7
|
-
/** Shows dots instead of the value, for secrets. */
|
|
8
|
-
masked?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export type FormNotice = {
|
|
11
|
-
kind: 'success' | 'error';
|
|
12
|
-
text: string;
|
|
13
|
-
};
|
|
14
|
-
interface FieldFormProps<K extends string> {
|
|
15
|
-
title: string;
|
|
16
|
-
/** What this form is for, shown dimmed under the title. */
|
|
17
|
-
subtitle?: string;
|
|
18
|
-
fields: readonly FormField<K>[];
|
|
19
|
-
values: Record<K, string>;
|
|
20
|
-
onChange: (key: K, value: string) => void;
|
|
21
|
-
onSave: () => void;
|
|
22
|
-
/** Leaves without saving. */
|
|
23
|
-
onQuit: () => void;
|
|
24
|
-
notice?: FormNotice | null;
|
|
25
|
-
/** Ignores keys while a load or save is in flight. */
|
|
26
|
-
busy?: boolean;
|
|
27
|
-
/** Shown above the controls, for a screen's own explanation. */
|
|
28
|
-
footer?: React.ReactNode;
|
|
29
|
-
/** Extra single-key actions. They only fire when no field is open, so typing a "t" into a path is just a "t". */
|
|
30
|
-
actions?: readonly {
|
|
31
|
-
key: string;
|
|
32
|
-
label: string;
|
|
33
|
-
run: () => void;
|
|
34
|
-
}[];
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* The edit-in-place form the Configuration pages share. Fields are read-only until Enter opens one; Enter again closes it.
|
|
38
|
-
* While one is open, keys type into it (so a "q" in a path is just a "q"), and Esc closes it and restores the old value.
|
|
39
|
-
*/
|
|
40
|
-
export declare function FieldForm<K extends string>({ title, subtitle, fields, values, onChange, onSave, onQuit, notice, busy, footer, actions, }: FieldFormProps<K>): React.ReactElement;
|
|
41
|
-
export {};
|