@contentful/experience-design-system-cli 2.34.2-dev-build-cfb3467.0 → 2.34.2-dev-build-a06e747.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/package.json +1 -1
- package/dist/src/index.js +2 -22
- package/dist/src/lib/cli-errors.d.ts +0 -10
- package/package.json +6 -6
package/dist/package.json
CHANGED
package/dist/src/index.js
CHANGED
|
@@ -373,11 +373,6 @@ function agentSupportsStdinPrompt(agent) {
|
|
|
373
373
|
function shouldUseStdinPrompt(agent, prompt2) {
|
|
374
374
|
return agentSupportsStdinPrompt(agent) && prompt2.length > ARGV_PROMPT_LIMIT;
|
|
375
375
|
}
|
|
376
|
-
function promptExceedsArgvLimit(agent, prompt2, platform = process.platform) {
|
|
377
|
-
if (agentSupportsStdinPrompt(agent))
|
|
378
|
-
return false;
|
|
379
|
-
return platform === "win32" && prompt2.length > 8191;
|
|
380
|
-
}
|
|
381
376
|
function buildArgs(agent, prompt2, model, promptViaStdin = false, bedrock = false) {
|
|
382
377
|
const resolvedModel = resolveAgentModel(agent, model, bedrock);
|
|
383
378
|
const modelArg = resolvedModel ? ["--model", resolvedModel] : [];
|
|
@@ -985,7 +980,6 @@ __export(src_exports, {
|
|
|
985
980
|
parseSelectToolCallLines: () => parseSelectToolCallLines,
|
|
986
981
|
parseTokenToolCallLines: () => parseTokenToolCallLines,
|
|
987
982
|
parseToolCallLines: () => parseToolCallLines,
|
|
988
|
-
promptExceedsArgvLimit: () => promptExceedsArgvLimit,
|
|
989
983
|
resolveAgentModel: () => resolveAgentModel,
|
|
990
984
|
resolveBinary: () => resolveBinary,
|
|
991
985
|
resolveSkillPath: () => resolveSkillPath,
|
|
@@ -32896,17 +32890,6 @@ function die2(message) {
|
|
|
32896
32890
|
async function assertBinaryInPath(binary) {
|
|
32897
32891
|
return binaryExists(binary);
|
|
32898
32892
|
}
|
|
32899
|
-
function assertAgentCanReceivePrompt(agent) {
|
|
32900
|
-
if (process.platform !== "win32" || agentSupportsStdinPrompt(agent)) return;
|
|
32901
|
-
die2(
|
|
32902
|
-
`Error: --agent ${agent} does not work on Windows.
|
|
32903
|
-
Its CLI only accepts the prompt as a command-line argument, and Windows limits a command
|
|
32904
|
-
line to 8191 characters \u2014 shorter than the prompts this command sends.
|
|
32905
|
-
|
|
32906
|
-
Every other agent reads the prompt from standard input, so they are unaffected.
|
|
32907
|
-
Use --agent claude, codex, opencode, or cursor.`
|
|
32908
|
-
);
|
|
32909
|
-
}
|
|
32910
32893
|
|
|
32911
32894
|
// packages/experience-design-system-cli/src/generate/command.ts
|
|
32912
32895
|
init_path_exists();
|
|
@@ -33311,7 +33294,6 @@ async function runGenerateSkill(skill, opts, verbose = false) {
|
|
|
33311
33294
|
});
|
|
33312
33295
|
await exitWithAnalytics(1);
|
|
33313
33296
|
}
|
|
33314
|
-
assertAgentCanReceivePrompt(agent);
|
|
33315
33297
|
if (skill === "components" && allComponents && sessionId2) {
|
|
33316
33298
|
const db = openPipelineDb();
|
|
33317
33299
|
let componentResults;
|
|
@@ -34841,7 +34823,6 @@ Install it, choose another agent with --agent, or use --print-prompt to run the
|
|
|
34841
34823
|
${resolveSkillPath("map-tokens")}`
|
|
34842
34824
|
);
|
|
34843
34825
|
}
|
|
34844
|
-
assertAgentCanReceivePrompt(agent);
|
|
34845
34826
|
const stepId = createStep(db, sessionId2, "map tokens", { agent, model: model ?? "" });
|
|
34846
34827
|
const prompt2 = await buildPrompt({
|
|
34847
34828
|
skill: "map-tokens",
|
|
@@ -36750,8 +36731,7 @@ async function setupAgent() {
|
|
|
36750
36731
|
section("Step 4: Coding agent (claude, codex, opencode, or copilot)", "[required]");
|
|
36751
36732
|
info("experiences import uses a coding agent to generate component definitions.");
|
|
36752
36733
|
info("");
|
|
36753
|
-
const
|
|
36754
|
-
const found = (await Promise.all(candidates.map(async (a) => await binaryExists2(a.binary) ? a : null))).filter(
|
|
36734
|
+
const found = (await Promise.all(AGENT_DEFS.map(async (a) => await binaryExists2(a.binary) ? a : null))).filter(
|
|
36755
36735
|
(a) => a !== null
|
|
36756
36736
|
);
|
|
36757
36737
|
if (found.length === 1) {
|
|
@@ -37106,7 +37086,7 @@ async function checkBuild(pkgRoot) {
|
|
|
37106
37086
|
}
|
|
37107
37087
|
async function checkAgent() {
|
|
37108
37088
|
section("Checking coding agent");
|
|
37109
|
-
const agents = AGENT_DEFS
|
|
37089
|
+
const agents = AGENT_DEFS;
|
|
37110
37090
|
const creds = await readExperiencesCredentials();
|
|
37111
37091
|
const savedAgent = creds.agent;
|
|
37112
37092
|
const savedModel = creds.agentModel;
|
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
import { type AgentName } from '@contentful/experience-design-system-generation';
|
|
2
1
|
export declare function die(message: string): never;
|
|
3
2
|
export declare function assertBinaryInPath(binary: string): Promise<boolean>;
|
|
4
|
-
/**
|
|
5
|
-
* Exit early when the chosen agent can't receive a prompt on this platform.
|
|
6
|
-
*
|
|
7
|
-
* Windows limits a command line to 8191 characters and every skill prompt is
|
|
8
|
-
* larger, so an agent that can only take the prompt as an argument has no way to
|
|
9
|
-
* receive one. Every agent but copilot reads the prompt on stdin instead, where
|
|
10
|
-
* no limit applies.
|
|
11
|
-
*/
|
|
12
|
-
export declare function assertAgentCanReceivePrompt(agent: AgentName): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.34.2-dev-build-
|
|
3
|
+
"version": "2.34.2-dev-build-a06e747.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"svelte": "^5.56.4",
|
|
40
40
|
"ts-morph": "^27.0.2",
|
|
41
41
|
"typescript": "^5.9.3",
|
|
42
|
-
"@contentful/experience-design-system-cli-v2": "2.34.2-dev-build-
|
|
43
|
-
"@contentful/experience-design-system-types": "2.34.2-dev-build-
|
|
42
|
+
"@contentful/experience-design-system-cli-v2": "2.34.2-dev-build-a06e747.0",
|
|
43
|
+
"@contentful/experience-design-system-types": "2.34.2-dev-build-a06e747.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@tsconfig/node24": "^24.0.4",
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"ink-testing-library": "^4.0.0",
|
|
53
53
|
"typescript-eslint": "^8.67.0",
|
|
54
54
|
"vitest": "^4.0.16",
|
|
55
|
-
"@contentful/experience-design-system-client": "2.34.2-dev-build-
|
|
56
|
-
"@contentful/experience-design-system-generation": "2.34.2-dev-build-
|
|
57
|
-
"@contentful/experience-design-system-extraction": "2.34.2-dev-build-
|
|
55
|
+
"@contentful/experience-design-system-client": "2.34.2-dev-build-a06e747.0",
|
|
56
|
+
"@contentful/experience-design-system-generation": "2.34.2-dev-build-a06e747.0",
|
|
57
|
+
"@contentful/experience-design-system-extraction": "2.34.2-dev-build-a06e747.0"
|
|
58
58
|
},
|
|
59
59
|
"repository": {
|
|
60
60
|
"type": "git",
|