@contentful/experience-design-system-cli 2.37.1-dev-build-1c5cd11a.0 → 2.37.1-dev-build-f18643c3.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 CHANGED
@@ -16241,6 +16241,37 @@ init_build_prompt();
16241
16241
  init_describe_agent_failure();
16242
16242
  init_invoke_agent_with_output();
16243
16243
  init_parse_tool_calls();
16244
+
16245
+ // packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/helpers/build-cached-component-result.js
16246
+ function buildCachedComponentResult(componentName, warnings = []) {
16247
+ return {
16248
+ componentName,
16249
+ classified: 0,
16250
+ excluded: 0,
16251
+ slots: 0,
16252
+ warnings,
16253
+ failed: false,
16254
+ cached: true,
16255
+ renamedSlotsCount: 0
16256
+ };
16257
+ }
16258
+
16259
+ // packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/helpers/build-failed-component-result.js
16260
+ function buildFailedComponentResult(componentName, error, renamedSlotsCount) {
16261
+ return {
16262
+ componentName,
16263
+ classified: 0,
16264
+ excluded: 0,
16265
+ slots: 0,
16266
+ warnings: [],
16267
+ failed: true,
16268
+ error,
16269
+ cached: false,
16270
+ renamedSlotsCount
16271
+ };
16272
+ }
16273
+
16274
+ // packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/helpers/run-one-generate-component.js
16244
16275
  var DEFAULT_TIMEOUT_MS4 = Number(process.env["EDS_AGENT_TIMEOUT_MS"] ?? 5 * 60 * 1e3);
16245
16276
  var RETRY_BACKOFF_MS = Number(process.env["EDS_RETRY_BACKOFF_MS"] ?? 5e3);
16246
16277
  async function runOneGenerateComponent(options, component, index, total) {
@@ -16263,7 +16294,7 @@ async function runOneGenerateComponent(options, component, index, total) {
16263
16294
  const cacheComponent = normalizeComponentForCache(component);
16264
16295
  if (!noCache && precomputedCachedNames.has(component.name)) {
16265
16296
  onProgress?.({ kind: "component:cached", index, total, name: component.name, pinned: false });
16266
- return cachedResult(component.name);
16297
+ return buildCachedComponentResult(component.name);
16267
16298
  }
16268
16299
  if (!noCache) {
16269
16300
  const resolution = resolveComponentCache(db, component, promptHash, allowedComponentNames2);
@@ -16273,14 +16304,16 @@ async function runOneGenerateComponent(options, component, index, total) {
16273
16304
  });
16274
16305
  storeCache(db, hashComponentShape(cacheComponent), "component", component.component_id, resolution.entry.sourceSessionId, resolution.entry.humanEdited, promptHash);
16275
16306
  onProgress?.({ kind: "component:cached", index, total, name: component.name, pinned: false });
16276
- return cachedResult(component.name);
16307
+ return buildCachedComponentResult(component.name);
16277
16308
  }
16278
16309
  if (resolution?.humanEdited) {
16279
16310
  copyComponentFromCache(db, resolution.entry.sourceSessionId, sessionId, component.component_id, true, {
16280
16311
  allowedComponentNames: allowedComponentNames2
16281
16312
  });
16282
16313
  onProgress?.({ kind: "component:cached", index, total, name: component.name, pinned: true });
16283
- return cachedResult(component.name, [`${component.name}: source changed but human edits preserved`]);
16314
+ return buildCachedComponentResult(component.name, [
16315
+ `${component.name}: source changed but human edits preserved`
16316
+ ]);
16284
16317
  }
16285
16318
  }
16286
16319
  const rawComponentsInline = JSON.stringify([
@@ -16319,7 +16352,7 @@ async function runOneGenerateComponent(options, component, index, total) {
16319
16352
  if (result.timedOut) {
16320
16353
  const error = `timed out after ${DEFAULT_TIMEOUT_MS4 / 6e4} minutes`;
16321
16354
  onProgress?.({ kind: "component:failed", index, total, name: component.name, error });
16322
- return failed(component.name, error, renames.length);
16355
+ return buildFailedComponentResult(component.name, error, renames.length);
16323
16356
  }
16324
16357
  if (result.exitCode !== 0) {
16325
16358
  lastError = describeAgentFailure(result);
@@ -16358,32 +16391,7 @@ async function runOneGenerateComponent(options, component, index, total) {
16358
16391
  };
16359
16392
  }
16360
16393
  onProgress?.({ kind: "component:failed", index, total, name: component.name, error: lastError });
16361
- return failed(component.name, lastError, renames.length);
16362
- }
16363
- function cachedResult(componentName, warnings = []) {
16364
- return {
16365
- componentName,
16366
- classified: 0,
16367
- excluded: 0,
16368
- slots: 0,
16369
- warnings,
16370
- failed: false,
16371
- cached: true,
16372
- renamedSlotsCount: 0
16373
- };
16374
- }
16375
- function failed(componentName, error, renamedSlotsCount) {
16376
- return {
16377
- componentName,
16378
- classified: 0,
16379
- excluded: 0,
16380
- slots: 0,
16381
- warnings: [],
16382
- failed: true,
16383
- error,
16384
- cached: false,
16385
- renamedSlotsCount
16386
- };
16394
+ return buildFailedComponentResult(component.name, lastError, renames.length);
16387
16395
  }
16388
16396
 
16389
16397
  // packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/helpers/run-with-pool.js
@@ -16402,6 +16410,36 @@ async function runWithPool(items, concurrency, worker) {
16402
16410
 
16403
16411
  // packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/check-generate-components-cache.js
16404
16412
  init_cache_keys();
16413
+
16414
+ // packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/helpers/restore-cached-components.js
16415
+ function restoreCachedComponents(db, sessionId, cachedComponents, promptHash, allowedComponentNames2) {
16416
+ const restorations = [];
16417
+ const rekeyed = [];
16418
+ const componentStatus = db.prepare("SELECT status FROM raw_components WHERE session_id = ? AND component_id = ?");
16419
+ for (const { component, resolution } of cachedComponents) {
16420
+ const current = componentStatus.get(sessionId, component.component_id);
16421
+ if (current?.status === "generated")
16422
+ continue;
16423
+ renameEmptySlots(db, sessionId, component.component_id, component.name, component.slots.length);
16424
+ restorations.push({
16425
+ sourceSessionId: resolution.entry.sourceSessionId,
16426
+ targetSessionId: sessionId,
16427
+ componentId: component.component_id
16428
+ });
16429
+ rekeyed.push({ component, cached: resolution.entry });
16430
+ }
16431
+ copyComponentsFromCache(db, restorations, { allowedComponentNames: allowedComponentNames2 });
16432
+ storeCaches(db, rekeyed.map(({ component, cached }) => ({
16433
+ inputHash: hashComponentShape(normalizeComponentForCache(component)),
16434
+ entityType: "component",
16435
+ entityId: component.component_id,
16436
+ sourceSessionId: cached.sourceSessionId,
16437
+ humanEdited: cached.humanEdited,
16438
+ promptHash
16439
+ })));
16440
+ }
16441
+
16442
+ // packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/check-generate-components-cache.js
16405
16443
  async function checkGenerateComponentsCache(request) {
16406
16444
  if (request.noCache) {
16407
16445
  return { sessionId: request.sessionId, cachedComponentNames: [], fullyCached: false, cacheDisabled: true };
@@ -16426,8 +16464,9 @@ async function checkGenerateComponentsCache(request) {
16426
16464
  const resolution = resolveComponentCache(db, component, promptHash, allowedComponentNames2);
16427
16465
  return resolution ? [{ component, resolution }] : [];
16428
16466
  });
16429
- if (request.restoreCache)
16430
- restoreCached(db, request.sessionId, cachedComponents, promptHash, allowedComponentNames2);
16467
+ if (request.restoreCache) {
16468
+ restoreCachedComponents(db, request.sessionId, cachedComponents, promptHash, allowedComponentNames2);
16469
+ }
16431
16470
  return {
16432
16471
  sessionId: request.sessionId,
16433
16472
  cachedComponentNames: cachedComponents.map(({ component }) => component.name),
@@ -16438,32 +16477,6 @@ async function checkGenerateComponentsCache(request) {
16438
16477
  db.close();
16439
16478
  }
16440
16479
  }
16441
- function restoreCached(db, sessionId, cachedComponents, promptHash, allowedComponentNames2) {
16442
- const restorations = [];
16443
- const rekeyed = [];
16444
- const componentStatus = db.prepare("SELECT status FROM raw_components WHERE session_id = ? AND component_id = ?");
16445
- for (const { component, resolution } of cachedComponents) {
16446
- const current = componentStatus.get(sessionId, component.component_id);
16447
- if (current?.status === "generated")
16448
- continue;
16449
- renameEmptySlots(db, sessionId, component.component_id, component.name, component.slots.length);
16450
- restorations.push({
16451
- sourceSessionId: resolution.entry.sourceSessionId,
16452
- targetSessionId: sessionId,
16453
- componentId: component.component_id
16454
- });
16455
- rekeyed.push({ component, cached: resolution.entry });
16456
- }
16457
- copyComponentsFromCache(db, restorations, { allowedComponentNames: allowedComponentNames2 });
16458
- storeCaches(db, rekeyed.map(({ component, cached }) => ({
16459
- inputHash: hashComponentShape(normalizeComponentForCache(component)),
16460
- entityType: "component",
16461
- entityId: component.component_id,
16462
- sourceSessionId: cached.sourceSessionId,
16463
- humanEdited: cached.humanEdited,
16464
- promptHash
16465
- })));
16466
- }
16467
16480
 
16468
16481
  // packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/run-generate-components-session.js
16469
16482
  var DEFAULT_COMPONENT_CONCURRENCY = Number(process.env["EDS_GENERATE_CONCURRENCY"] ?? 10);
@@ -20875,8 +20888,8 @@ function missingNote(missingNames) {
20875
20888
  Note: ${plural2(missingNames.length, "component name")} from the server (${missingNames.join(", ")}) ${verb} not match anything in this session \u2014 they cannot be edited or skipped from here.`;
20876
20889
  }
20877
20890
  function contextText(errors, missingNames) {
20878
- const failed2 = failedComponentNames(errors);
20879
- return `${plural2(failed2.length, "component")} failed server validation. Edit their definitions in the review TUI, or skip them and retry preview without them.${missingNote(missingNames)}`;
20891
+ const failed = failedComponentNames(errors);
20892
+ return `${plural2(failed.length, "component")} failed server validation. Edit their definitions in the review TUI, or skip them and retry preview without them.${missingNote(missingNames)}`;
20880
20893
  }
20881
20894
  function skipLabel(matchedNames) {
20882
20895
  if (matchedNames.length === 0) return "No matching components to skip";
@@ -27388,19 +27401,19 @@ function resultOf(operation, preview) {
27388
27401
  const items = operation.items ?? [];
27389
27402
  if (items.length > 0) {
27390
27403
  const count = (entityType, action) => items.filter((i) => i.entityType === entityType && i.action === action && i.status === "succeeded").length;
27391
- const failed2 = (entityType) => items.filter((i) => i.entityType === entityType && i.status === "failed").length;
27404
+ const failed = (entityType) => items.filter((i) => i.entityType === entityType && i.status === "failed").length;
27392
27405
  return {
27393
27406
  componentTypes: {
27394
27407
  created: count("ComponentType", "create"),
27395
27408
  updated: count("ComponentType", "update"),
27396
27409
  removed: count("ComponentType", "delete"),
27397
- failed: failed2("ComponentType")
27410
+ failed: failed("ComponentType")
27398
27411
  },
27399
27412
  designTokens: {
27400
27413
  created: count("DesignToken", "create"),
27401
27414
  updated: count("DesignToken", "update"),
27402
27415
  removed: count("DesignToken", "delete"),
27403
- failed: failed2("DesignToken")
27416
+ failed: failed("DesignToken")
27404
27417
  },
27405
27418
  summary: operation.summary,
27406
27419
  failures: items.filter((item) => item.status === "failed").map((item) => ({
package/dist/index.js CHANGED
@@ -19204,6 +19204,45 @@ var init_resolve_generate_prompt = __esm({
19204
19204
  }
19205
19205
  });
19206
19206
 
19207
+ // packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/helpers/build-cached-component-result.js
19208
+ function buildCachedComponentResult(componentName, warnings = []) {
19209
+ return {
19210
+ componentName,
19211
+ classified: 0,
19212
+ excluded: 0,
19213
+ slots: 0,
19214
+ warnings,
19215
+ failed: false,
19216
+ cached: true,
19217
+ renamedSlotsCount: 0
19218
+ };
19219
+ }
19220
+ var init_build_cached_component_result = __esm({
19221
+ "packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/helpers/build-cached-component-result.js"() {
19222
+ "use strict";
19223
+ }
19224
+ });
19225
+
19226
+ // packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/helpers/build-failed-component-result.js
19227
+ function buildFailedComponentResult(componentName, error, renamedSlotsCount) {
19228
+ return {
19229
+ componentName,
19230
+ classified: 0,
19231
+ excluded: 0,
19232
+ slots: 0,
19233
+ warnings: [],
19234
+ failed: true,
19235
+ error,
19236
+ cached: false,
19237
+ renamedSlotsCount
19238
+ };
19239
+ }
19240
+ var init_build_failed_component_result = __esm({
19241
+ "packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/helpers/build-failed-component-result.js"() {
19242
+ "use strict";
19243
+ }
19244
+ });
19245
+
19207
19246
  // packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/helpers/run-one-generate-component.js
19208
19247
  async function runOneGenerateComponent(options, component, index, total) {
19209
19248
  const { db, sessionId, invoker, agent, model, tokensInline, tokenMapInline, verbose, noCache, skillPathOverride, skillContentOverride, promptHash, existingContentfulEntities, existingTokensInline, precomputedCachedNames, allowedComponentNames: allowedComponentNames2, onProgress } = options;
@@ -19225,7 +19264,7 @@ async function runOneGenerateComponent(options, component, index, total) {
19225
19264
  const cacheComponent = normalizeComponentForCache(component);
19226
19265
  if (!noCache && precomputedCachedNames.has(component.name)) {
19227
19266
  onProgress?.({ kind: "component:cached", index, total, name: component.name, pinned: false });
19228
- return cachedResult(component.name);
19267
+ return buildCachedComponentResult(component.name);
19229
19268
  }
19230
19269
  if (!noCache) {
19231
19270
  const resolution = resolveComponentCache(db, component, promptHash, allowedComponentNames2);
@@ -19235,14 +19274,16 @@ async function runOneGenerateComponent(options, component, index, total) {
19235
19274
  });
19236
19275
  storeCache(db, hashComponentShape(cacheComponent), "component", component.component_id, resolution.entry.sourceSessionId, resolution.entry.humanEdited, promptHash);
19237
19276
  onProgress?.({ kind: "component:cached", index, total, name: component.name, pinned: false });
19238
- return cachedResult(component.name);
19277
+ return buildCachedComponentResult(component.name);
19239
19278
  }
19240
19279
  if (resolution?.humanEdited) {
19241
19280
  copyComponentFromCache(db, resolution.entry.sourceSessionId, sessionId, component.component_id, true, {
19242
19281
  allowedComponentNames: allowedComponentNames2
19243
19282
  });
19244
19283
  onProgress?.({ kind: "component:cached", index, total, name: component.name, pinned: true });
19245
- return cachedResult(component.name, [`${component.name}: source changed but human edits preserved`]);
19284
+ return buildCachedComponentResult(component.name, [
19285
+ `${component.name}: source changed but human edits preserved`
19286
+ ]);
19246
19287
  }
19247
19288
  }
19248
19289
  const rawComponentsInline = JSON.stringify([
@@ -19281,7 +19322,7 @@ async function runOneGenerateComponent(options, component, index, total) {
19281
19322
  if (result.timedOut) {
19282
19323
  const error = `timed out after ${DEFAULT_TIMEOUT_MS4 / 6e4} minutes`;
19283
19324
  onProgress?.({ kind: "component:failed", index, total, name: component.name, error });
19284
- return failed(component.name, error, renames.length);
19325
+ return buildFailedComponentResult(component.name, error, renames.length);
19285
19326
  }
19286
19327
  if (result.exitCode !== 0) {
19287
19328
  lastError = describeAgentFailure(result);
@@ -19320,32 +19361,7 @@ async function runOneGenerateComponent(options, component, index, total) {
19320
19361
  };
19321
19362
  }
19322
19363
  onProgress?.({ kind: "component:failed", index, total, name: component.name, error: lastError });
19323
- return failed(component.name, lastError, renames.length);
19324
- }
19325
- function cachedResult(componentName, warnings = []) {
19326
- return {
19327
- componentName,
19328
- classified: 0,
19329
- excluded: 0,
19330
- slots: 0,
19331
- warnings,
19332
- failed: false,
19333
- cached: true,
19334
- renamedSlotsCount: 0
19335
- };
19336
- }
19337
- function failed(componentName, error, renamedSlotsCount) {
19338
- return {
19339
- componentName,
19340
- classified: 0,
19341
- excluded: 0,
19342
- slots: 0,
19343
- warnings: [],
19344
- failed: true,
19345
- error,
19346
- cached: false,
19347
- renamedSlotsCount
19348
- };
19364
+ return buildFailedComponentResult(component.name, lastError, renames.length);
19349
19365
  }
19350
19366
  var DEFAULT_TIMEOUT_MS4, RETRY_BACKOFF_MS;
19351
19367
  var init_run_one_generate_component = __esm({
@@ -19359,6 +19375,8 @@ var init_run_one_generate_component = __esm({
19359
19375
  init_normalize_component_for_cache();
19360
19376
  init_resolve_component_cache();
19361
19377
  init_summarize_for_generate();
19378
+ init_build_cached_component_result();
19379
+ init_build_failed_component_result();
19362
19380
  DEFAULT_TIMEOUT_MS4 = Number(process.env["EDS_AGENT_TIMEOUT_MS"] ?? 5 * 60 * 1e3);
19363
19381
  RETRY_BACKOFF_MS = Number(process.env["EDS_RETRY_BACKOFF_MS"] ?? 5e3);
19364
19382
  }
@@ -19383,6 +19401,41 @@ var init_run_with_pool = __esm({
19383
19401
  }
19384
19402
  });
19385
19403
 
19404
+ // packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/helpers/restore-cached-components.js
19405
+ function restoreCachedComponents(db, sessionId, cachedComponents, promptHash, allowedComponentNames2) {
19406
+ const restorations = [];
19407
+ const rekeyed = [];
19408
+ const componentStatus = db.prepare("SELECT status FROM raw_components WHERE session_id = ? AND component_id = ?");
19409
+ for (const { component, resolution } of cachedComponents) {
19410
+ const current = componentStatus.get(sessionId, component.component_id);
19411
+ if (current?.status === "generated")
19412
+ continue;
19413
+ renameEmptySlots(db, sessionId, component.component_id, component.name, component.slots.length);
19414
+ restorations.push({
19415
+ sourceSessionId: resolution.entry.sourceSessionId,
19416
+ targetSessionId: sessionId,
19417
+ componentId: component.component_id
19418
+ });
19419
+ rekeyed.push({ component, cached: resolution.entry });
19420
+ }
19421
+ copyComponentsFromCache(db, restorations, { allowedComponentNames: allowedComponentNames2 });
19422
+ storeCaches(db, rekeyed.map(({ component, cached }) => ({
19423
+ inputHash: hashComponentShape(normalizeComponentForCache(component)),
19424
+ entityType: "component",
19425
+ entityId: component.component_id,
19426
+ sourceSessionId: cached.sourceSessionId,
19427
+ humanEdited: cached.humanEdited,
19428
+ promptHash
19429
+ })));
19430
+ }
19431
+ var init_restore_cached_components = __esm({
19432
+ "packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/helpers/restore-cached-components.js"() {
19433
+ "use strict";
19434
+ init_db();
19435
+ init_normalize_component_for_cache();
19436
+ }
19437
+ });
19438
+
19386
19439
  // packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/check-generate-components-cache.js
19387
19440
  async function checkGenerateComponentsCache(request) {
19388
19441
  if (request.noCache) {
@@ -19408,8 +19461,9 @@ async function checkGenerateComponentsCache(request) {
19408
19461
  const resolution = resolveComponentCache(db, component, promptHash, allowedComponentNames2);
19409
19462
  return resolution ? [{ component, resolution }] : [];
19410
19463
  });
19411
- if (request.restoreCache)
19412
- restoreCached(db, request.sessionId, cachedComponents, promptHash, allowedComponentNames2);
19464
+ if (request.restoreCache) {
19465
+ restoreCachedComponents(db, request.sessionId, cachedComponents, promptHash, allowedComponentNames2);
19466
+ }
19413
19467
  return {
19414
19468
  sessionId: request.sessionId,
19415
19469
  cachedComponentNames: cachedComponents.map(({ component }) => component.name),
@@ -19420,43 +19474,17 @@ async function checkGenerateComponentsCache(request) {
19420
19474
  db.close();
19421
19475
  }
19422
19476
  }
19423
- function restoreCached(db, sessionId, cachedComponents, promptHash, allowedComponentNames2) {
19424
- const restorations = [];
19425
- const rekeyed = [];
19426
- const componentStatus = db.prepare("SELECT status FROM raw_components WHERE session_id = ? AND component_id = ?");
19427
- for (const { component, resolution } of cachedComponents) {
19428
- const current = componentStatus.get(sessionId, component.component_id);
19429
- if (current?.status === "generated")
19430
- continue;
19431
- renameEmptySlots(db, sessionId, component.component_id, component.name, component.slots.length);
19432
- restorations.push({
19433
- sourceSessionId: resolution.entry.sourceSessionId,
19434
- targetSessionId: sessionId,
19435
- componentId: component.component_id
19436
- });
19437
- rekeyed.push({ component, cached: resolution.entry });
19438
- }
19439
- copyComponentsFromCache(db, restorations, { allowedComponentNames: allowedComponentNames2 });
19440
- storeCaches(db, rekeyed.map(({ component, cached }) => ({
19441
- inputHash: hashComponentShape(normalizeComponentForCache(component)),
19442
- entityType: "component",
19443
- entityId: component.component_id,
19444
- sourceSessionId: cached.sourceSessionId,
19445
- humanEdited: cached.humanEdited,
19446
- promptHash
19447
- })));
19448
- }
19449
19477
  var init_check_generate_components_cache = __esm({
19450
19478
  "packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/check-generate-components-cache.js"() {
19451
19479
  "use strict";
19452
19480
  init_summarize_for_map_tokens();
19453
19481
  init_resolve_component_cache();
19454
- init_normalize_component_for_cache();
19455
19482
  init_db();
19456
19483
  init_cache_keys();
19457
19484
  init_src();
19458
19485
  init_read_existing_entities();
19459
19486
  init_resolve_generate_prompt();
19487
+ init_restore_cached_components();
19460
19488
  }
19461
19489
  });
19462
19490
 
@@ -24604,8 +24632,8 @@ function missingNote(missingNames) {
24604
24632
  Note: ${plural2(missingNames.length, "component name")} from the server (${missingNames.join(", ")}) ${verb} not match anything in this session \u2014 they cannot be edited or skipped from here.`;
24605
24633
  }
24606
24634
  function contextText(errors, missingNames) {
24607
- const failed2 = failedComponentNames(errors);
24608
- return `${plural2(failed2.length, "component")} failed server validation. Edit their definitions in the review TUI, or skip them and retry preview without them.${missingNote(missingNames)}`;
24635
+ const failed = failedComponentNames(errors);
24636
+ return `${plural2(failed.length, "component")} failed server validation. Edit their definitions in the review TUI, or skip them and retry preview without them.${missingNote(missingNames)}`;
24609
24637
  }
24610
24638
  function skipLabel(matchedNames) {
24611
24639
  if (matchedNames.length === 0) return "No matching components to skip";
@@ -31546,19 +31574,19 @@ function resultOf(operation, preview) {
31546
31574
  const items = operation.items ?? [];
31547
31575
  if (items.length > 0) {
31548
31576
  const count = (entityType, action) => items.filter((i) => i.entityType === entityType && i.action === action && i.status === "succeeded").length;
31549
- const failed2 = (entityType) => items.filter((i) => i.entityType === entityType && i.status === "failed").length;
31577
+ const failed = (entityType) => items.filter((i) => i.entityType === entityType && i.status === "failed").length;
31550
31578
  return {
31551
31579
  componentTypes: {
31552
31580
  created: count("ComponentType", "create"),
31553
31581
  updated: count("ComponentType", "update"),
31554
31582
  removed: count("ComponentType", "delete"),
31555
- failed: failed2("ComponentType")
31583
+ failed: failed("ComponentType")
31556
31584
  },
31557
31585
  designTokens: {
31558
31586
  created: count("DesignToken", "create"),
31559
31587
  updated: count("DesignToken", "update"),
31560
31588
  removed: count("DesignToken", "delete"),
31561
- failed: failed2("DesignToken")
31589
+ failed: failed("DesignToken")
31562
31590
  },
31563
31591
  summary: operation.summary,
31564
31592
  failures: items.filter((item) => item.status === "failed").map((item) => ({
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.37.1-dev-build-1c5cd11a.0",
3
+ "version": "2.37.1-dev-build-f18643c3.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -24452,6 +24452,20 @@ var init_resolve_generate_prompt = __esm({
24452
24452
  }
24453
24453
  });
24454
24454
 
24455
+ // packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/helpers/build-cached-component-result.js
24456
+ var init_build_cached_component_result = __esm({
24457
+ "packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/helpers/build-cached-component-result.js"() {
24458
+ "use strict";
24459
+ }
24460
+ });
24461
+
24462
+ // packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/helpers/build-failed-component-result.js
24463
+ var init_build_failed_component_result = __esm({
24464
+ "packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/helpers/build-failed-component-result.js"() {
24465
+ "use strict";
24466
+ }
24467
+ });
24468
+
24455
24469
  // packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/helpers/run-one-generate-component.js
24456
24470
  var DEFAULT_TIMEOUT_MS6, RETRY_BACKOFF_MS2;
24457
24471
  var init_run_one_generate_component = __esm({
@@ -24465,6 +24479,8 @@ var init_run_one_generate_component = __esm({
24465
24479
  init_normalize_component_for_cache();
24466
24480
  init_resolve_component_cache();
24467
24481
  init_summarize_for_generate();
24482
+ init_build_cached_component_result();
24483
+ init_build_failed_component_result();
24468
24484
  DEFAULT_TIMEOUT_MS6 = Number(process.env["EDS_AGENT_TIMEOUT_MS"] ?? 5 * 60 * 1e3);
24469
24485
  RETRY_BACKOFF_MS2 = Number(process.env["EDS_RETRY_BACKOFF_MS"] ?? 5e3);
24470
24486
  }
@@ -24477,18 +24493,27 @@ var init_run_with_pool = __esm({
24477
24493
  }
24478
24494
  });
24479
24495
 
24496
+ // packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/helpers/restore-cached-components.js
24497
+ var init_restore_cached_components = __esm({
24498
+ "packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/helpers/restore-cached-components.js"() {
24499
+ "use strict";
24500
+ init_db2();
24501
+ init_normalize_component_for_cache();
24502
+ }
24503
+ });
24504
+
24480
24505
  // packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/check-generate-components-cache.js
24481
24506
  var init_check_generate_components_cache = __esm({
24482
24507
  "packages/experience-design-system-backend-pipeline/dist/src/orchestrators/run-generate-components-session/check-generate-components-cache.js"() {
24483
24508
  "use strict";
24484
24509
  init_summarize_for_map_tokens();
24485
24510
  init_resolve_component_cache();
24486
- init_normalize_component_for_cache();
24487
24511
  init_db2();
24488
24512
  init_cache_keys2();
24489
24513
  init_src3();
24490
24514
  init_read_existing_entities();
24491
24515
  init_resolve_generate_prompt();
24516
+ init_restore_cached_components();
24492
24517
  }
24493
24518
  });
24494
24519
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.37.1-dev-build-1c5cd11a.0",
3
+ "version": "2.37.1-dev-build-f18643c3.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
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-1c5cd11a.0",
3
+ "version": "2.37.1-dev-build-f18643c3.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-1c5cd11a.0",
49
- "@contentful/experience-design-system-types": "2.37.1-dev-build-1c5cd11a.0"
48
+ "@contentful/experience-design-system-types": "2.37.1-dev-build-f18643c3.0",
49
+ "@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-f18643c3.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@tsconfig/node24": "^24.0.4",