@contentful/experience-design-system-cli 2.37.1-dev-build-a2aef8c6.0 → 2.37.1-dev-build-a67bc4a4.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.d.ts +1 -1
- package/dist/app.js +255 -1014
- package/dist/index.js +275 -1117
- package/dist/package.json +1 -1
- package/dist/src/tui/settings/{configuration/ConfigurationScreen.d.ts → contentful-configuration/ContentfulConfigScreen.d.ts} +0 -1
- package/package.json +3 -3
- package/dist/src/tui/help/file-locations.d.ts +0 -23
- package/dist/src/tui/settings/configuration/agents/AgentDetail.d.ts +0 -13
- package/dist/src/tui/settings/configuration/agents/AgentStatusBadge.d.ts +0 -10
- package/dist/src/tui/settings/configuration/agents/AgentsScreen.d.ts +0 -11
- package/dist/src/tui/settings/configuration/agents/agent-status.d.ts +0 -63
- package/dist/src/tui/settings/configuration/agents/agent-store.d.ts +0 -16
- package/dist/src/tui/settings/configuration/agents/apply-binary-overrides.d.ts +0 -13
- package/dist/src/tui/settings/configuration/project/ProjectScreen.d.ts +0 -5
- package/dist/src/tui/settings/shared/FieldForm.d.ts +0 -50
- package/dist/src/tui/upgrade/PageContainer.d.ts +0 -4
- /package/dist/src/tui/{upgrade → home}/version.d.ts +0 -0
- /package/dist/src/tui/settings/{configuration/project/project-store.d.ts → contentful-configuration/config-store.d.ts} +0 -0
- /package/dist/src/tui/settings/{shared → utils}/v1-store.d.ts +0 -0
package/dist/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-a67bc4a4.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-backend-pipeline": "2.37.1-dev-build-
|
|
49
|
-
"@contentful/experience-design-system-types": "2.37.1-dev-build-
|
|
48
|
+
"@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-a67bc4a4.0",
|
|
49
|
+
"@contentful/experience-design-system-types": "2.37.1-dev-build-a67bc4a4.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,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type AgentName } from '@contentful/experience-design-system-backend-pipeline';
|
|
3
|
-
import { type AgentConfig } from './agent-store.js';
|
|
4
|
-
/**
|
|
5
|
-
* One agent's screen: what was found for it, its two settings, and the test. Saving writes the whole agent config, so the
|
|
6
|
-
* default agent and the other agents are kept. The test uses the values on screen, saved or not.
|
|
7
|
-
*/
|
|
8
|
-
export declare function AgentDetail({ name, config, setConfig, onBack, }: {
|
|
9
|
-
name: AgentName;
|
|
10
|
-
config: AgentConfig;
|
|
11
|
-
setConfig: (config: AgentConfig) => void;
|
|
12
|
-
onBack: () => void;
|
|
13
|
-
}): React.ReactElement;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { AgentName } from '@contentful/experience-design-system-backend-pipeline';
|
|
3
|
-
import { type AgentCheck, type StatusRow } from './agent-status.js';
|
|
4
|
-
export declare const TONE_COLOR: Record<StatusRow['tone'], string>;
|
|
5
|
-
/** The symbol and one-word state for an agent, shown on its row in the list. `binary` is the saved path, empty when none is saved. */
|
|
6
|
-
export declare function AgentStatusBadge({ name, checks, binary, }: {
|
|
7
|
-
name: AgentName;
|
|
8
|
-
checks: AgentCheck[] | undefined;
|
|
9
|
-
binary: string;
|
|
10
|
-
}): React.ReactElement;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Settings > Configuration > Agents. The list holds only what is needed to pick an agent: the name, a star on the default,
|
|
4
|
-
* and a one-word status. Below it, a panel shows the full detail for the focused agent and follows the cursor, so nothing
|
|
5
|
-
* has to be opened to read it. The "Default agent" line at the top is read-only: ↑/↓ move through the agents, Enter makes
|
|
6
|
-
* the focused one the default (saved at once), and → opens its own screen, where its path and model are edited and the
|
|
7
|
-
* test is run.
|
|
8
|
-
*/
|
|
9
|
-
export declare function AgentsScreen({ onDone }: {
|
|
10
|
-
onDone: () => void;
|
|
11
|
-
}): React.ReactElement;
|
|
@@ -1,63 +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
|
-
/** Only on the prompt step: the agent did not answer in time. That is not the same as a failure or a missing login. */
|
|
9
|
-
timedOut?: boolean;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* The one-word state shown on an agent's row. `not-configured` means no path is saved and the command is not on the
|
|
13
|
-
* PATH; `not-found` means a saved path does not work. `unknown` means it runs but its login cannot be checked.
|
|
14
|
-
*/
|
|
15
|
-
export type AgentStatus = 'checking' | 'ready' | 'not-configured' | 'not-found' | 'not-logged-in' | 'test-failed' | 'timed-out' | 'unknown';
|
|
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[], savedBinary: string): AgentStatus;
|
|
27
|
-
export type StatusRow = {
|
|
28
|
-
label: string;
|
|
29
|
-
value: string;
|
|
30
|
-
tone: 'ok' | 'bad' | 'muted';
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* How a full test went, in one line for a banner on the agent's screen. Undefined when no test has run (the quick checks
|
|
34
|
-
* alone are not a test), so the banner only appears after the user asked for one.
|
|
35
|
-
*/
|
|
36
|
-
export declare function testOutcome(checks: readonly AgentCheck[] | undefined): {
|
|
37
|
-
ok: boolean;
|
|
38
|
-
text: string;
|
|
39
|
-
} | undefined;
|
|
40
|
-
/**
|
|
41
|
-
* The short form of a status for the list, where every row has to be scannable at a glance. The wording is plainer than
|
|
42
|
-
* the detail panel's: "not installed" covers both "nothing saved" and "saved path broken", which the panel tells apart.
|
|
43
|
-
*/
|
|
44
|
-
export declare const LIST_STATUS: Record<AgentStatus, {
|
|
45
|
-
symbol: string;
|
|
46
|
-
text: string;
|
|
47
|
-
tone: StatusRow['tone'];
|
|
48
|
-
}>;
|
|
49
|
-
/**
|
|
50
|
-
* The rows of the detail panel under the list, for the focused agent. Everything here is read-only and comes from
|
|
51
|
-
* checks already collected, so moving the cursor never runs anything.
|
|
52
|
-
*/
|
|
53
|
-
export declare function panelRows(name: AgentName, checks: readonly AgentCheck[] | undefined, settings: {
|
|
54
|
-
binary: string;
|
|
55
|
-
model: string;
|
|
56
|
-
}): StatusRow[];
|
|
57
|
-
/**
|
|
58
|
-
* What the Status section of an agent's screen shows: the shared rows, then the login and the test, which only this
|
|
59
|
-
* view has. The login row is always there once the command is found, because for most agents it has to say that login
|
|
60
|
-
* cannot be checked without a test.
|
|
61
|
-
*/
|
|
62
|
-
export declare function statusRows(name: AgentName, checks: readonly AgentCheck[] | undefined, savedBinary: string): StatusRow[];
|
|
63
|
-
export {};
|
|
@@ -1,16 +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 function emptyAgents(): Record<AgentName, AgentSettings>;
|
|
15
|
-
export declare function readAgentConfig(): Promise<AgentConfig>;
|
|
16
|
-
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,50 +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
|
-
/** A row after the fields that Enter runs instead of opening for editing, such as "Run test". */
|
|
11
|
-
export interface FormAction {
|
|
12
|
-
label: string;
|
|
13
|
-
/** What running it does, shown dimmed after the label. */
|
|
14
|
-
description: string;
|
|
15
|
-
/** Shown instead of the description while it runs. */
|
|
16
|
-
runningText?: string;
|
|
17
|
-
running?: boolean;
|
|
18
|
-
/** The control hint for Enter while this row is focused. */
|
|
19
|
-
hint: string;
|
|
20
|
-
onRun: () => void;
|
|
21
|
-
}
|
|
22
|
-
export type FormNotice = {
|
|
23
|
-
kind: 'success' | 'error';
|
|
24
|
-
text: string;
|
|
25
|
-
};
|
|
26
|
-
interface FieldFormProps<K extends string> {
|
|
27
|
-
title: string;
|
|
28
|
-
/** What this form is for, shown dimmed under the title. */
|
|
29
|
-
subtitle?: string;
|
|
30
|
-
fields: readonly FormField<K>[];
|
|
31
|
-
values: Record<K, string>;
|
|
32
|
-
onChange: (key: K, value: string) => void;
|
|
33
|
-
onSave: () => void;
|
|
34
|
-
/** Leaves without saving. */
|
|
35
|
-
onQuit: () => void;
|
|
36
|
-
/** Rows after the fields that are run, not edited. They share the cursor with the fields. */
|
|
37
|
-
actions?: readonly FormAction[];
|
|
38
|
-
notice?: FormNotice | null;
|
|
39
|
-
/** Ignores keys while a load or save is in flight. */
|
|
40
|
-
busy?: boolean;
|
|
41
|
-
/** Shown after the rows and the notice, for read-only content that belongs to the same screen. */
|
|
42
|
-
children?: React.ReactNode;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* The edit-in-place form the Configuration pages share. Fields are read-only until Enter opens one; Enter again closes it.
|
|
46
|
-
* 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.
|
|
47
|
-
* Actions sit after the fields and take the same cursor: Enter runs one, and `c` does nothing on it.
|
|
48
|
-
*/
|
|
49
|
-
export declare function FieldForm<K extends string>({ title, subtitle, fields, values, onChange, onSave, onQuit, actions, notice, busy, children, }: FieldFormProps<K>): React.ReactElement;
|
|
50
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|