@contentful/experience-design-system-cli 2.42.1-dev-build-b165bde7.0 → 2.42.1-dev-build-62049584.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.42.1-dev-build-b165bde7.0",
3
+ "version": "2.42.1-dev-build-62049584.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { type ActivityItem } from './activity.js';
3
+ /** A rolling log of what a long step has done, beside it on a wide terminal and under it on a narrow one. */
4
+ export declare function ActivityPanel({ title, items }: {
5
+ title: string;
6
+ items: readonly ActivityItem[];
7
+ }): React.ReactElement;
8
+ /**
9
+ * Lays out a step with its panel: the panel goes beside the step on a wide terminal and under it on a narrow one. A step
10
+ * with no panel is returned exactly as it is.
11
+ */
12
+ export declare function AsideLayout({ aside, children, }: {
13
+ aside?: React.ReactNode;
14
+ children: React.ReactNode;
15
+ }): React.ReactElement;
@@ -0,0 +1,26 @@
1
+ type ActivityState = 'running' | 'done' | 'failed';
2
+ export interface ActivityItem {
3
+ name: string;
4
+ state: ActivityState;
5
+ /** A short note after the name, for example "cached" or "create component". */
6
+ detail?: string;
7
+ /** How long it took, once it has finished. */
8
+ ms?: number;
9
+ /** Why it failed. */
10
+ error?: string;
11
+ /** When it started, so its time can be worked out when it finishes. */
12
+ startedAt?: number;
13
+ }
14
+ export declare const PANEL_COLUMNS = 46;
15
+ export declare function panelLayout(columns: number): 'beside' | 'below';
16
+ /**
17
+ * The entries that fit. A long run has far more entries than lines, and what a person needs is the failures and what is
18
+ * running now, so those are kept first and the newest finished entries fill what is left. The entries stay in the order
19
+ * they happened. `hidden` is how many were left out.
20
+ */
21
+ export declare function visibleActivity(items: readonly ActivityItem[], max: number): {
22
+ shown: ActivityItem[];
23
+ hidden: number;
24
+ };
25
+ export declare function truncate(text: string, max: number): string;
26
+ export {};
@@ -5,6 +5,8 @@ interface RunningStepProps {
5
5
  step: ImportStepId;
6
6
  description: string;
7
7
  lines?: readonly RunningLine[];
8
+ /** A panel shown beside the step, or under it on a narrow terminal. */
9
+ aside?: React.ReactNode;
8
10
  }
9
- export declare function RunningStep({ step, description, lines, }: RunningStepProps): React.ReactElement;
11
+ export declare function RunningStep({ step, description, lines, aside, }: RunningStepProps): React.ReactElement;
10
12
  export {};
@@ -1,3 +1,5 @@
1
+ import type { GenerateComponentsProgress } from '@contentful/experience-design-system-backend-pipeline';
2
+ import { type ActivityItem } from '../../shared/running-step/activity.js';
1
3
  import { type RunningLine } from '../../shared/running-step/logic.js';
2
4
  import type { GenerationInput, GenerationProgress, GenerationResult } from './types.js';
3
5
  /** What the debug log says the stage started with. The counts are logged, not the lists of names. */
@@ -8,6 +10,11 @@ export declare function generationLogOutputs(result: GenerationResult, progress:
8
10
  status: 'success' | 'error';
9
11
  };
10
12
  export declare function initialProgress(): GenerationProgress;
13
+ /**
14
+ * The panel's entries after one more event. Each component has one entry, in the order they began: it is running from
15
+ * when it starts, then done, cached or failed. A component the pipeline starts again for a retry keeps its entry.
16
+ */
17
+ export declare function applyActivityEvent(event: GenerateComponentsProgress, previous: readonly ActivityItem[], now: number): ActivityItem[];
11
18
  export declare function shouldRunMapTokens(counts: {
12
19
  mappablePropCount: number;
13
20
  rawTokenCount: number;
@@ -1,4 +1,5 @@
1
1
  import type { GenerationHandoff } from '@contentful/experience-design-system-types/handoff';
2
+ import type { ActivityItem } from '../../shared/running-step/activity.js';
2
3
  export interface GenerationInput {
3
4
  /** The extraction session the scope was decided on. */
4
5
  sessionId: string;
@@ -36,6 +37,8 @@ export interface GenerationProgress {
36
37
  current: string;
37
38
  failed: number;
38
39
  } | null;
40
+ /** One entry for each component the run has started, in the order they began. Feeds the activity panel. */
41
+ activity: ActivityItem[];
39
42
  mapTokens: 'idle' | 'running' | 'complete';
40
43
  /** Whether token mapping will run at all; unknown until the generated components have been looked at. */
41
44
  mapTokensEligible: boolean | null;
@@ -1,3 +1,4 @@
1
+ import type { ActivityItem } from '../../../shared/running-step/activity.js';
1
2
  export type PushProgress = {
2
3
  kind: 'queued';
3
4
  operationId: string;
@@ -7,4 +8,22 @@ export type PushProgress = {
7
8
  total: number;
8
9
  failed: number;
9
10
  current: string | null;
11
+ items: ActivityItem[];
10
12
  } | null;
13
+ /** What the API reports for one entity in the push. */
14
+ interface OperationItem {
15
+ entityType: string;
16
+ action: string;
17
+ id: string;
18
+ status: string;
19
+ /** The API gives the reason as an object with a message, or as plain text. */
20
+ error?: string | {
21
+ message: string;
22
+ };
23
+ }
24
+ /**
25
+ * The panel's entries for the entities the push has processed so far. An entity still waiting in the queue is left out,
26
+ * so the panel shows what has happened and not a list of everything that is yet to.
27
+ */
28
+ export declare function activityFromItems(items: readonly OperationItem[]): ActivityItem[];
29
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.42.1-dev-build-b165bde7.0",
3
+ "version": "2.42.1-dev-build-62049584.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -45,7 +45,7 @@
45
45
  "ts-morph": "^27.0.2",
46
46
  "typescript": "^5.9.3",
47
47
  "zod": "^4.6.5",
48
- "@contentful/experience-design-system-types": "2.42.1-dev-build-b165bde7.0"
48
+ "@contentful/experience-design-system-types": "2.42.1-dev-build-62049584.0"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@tsconfig/node24": "^24.0.4",
@@ -59,7 +59,7 @@
59
59
  "ink-testing-library": "^4.0.0",
60
60
  "typescript-eslint": "^8.67.0",
61
61
  "vitest": "^4.0.16",
62
- "@contentful/experience-design-system-backend-pipeline": "2.42.1-dev-build-b165bde7.0"
62
+ "@contentful/experience-design-system-backend-pipeline": "2.42.1-dev-build-62049584.0"
63
63
  },
64
64
  "repository": {
65
65
  "type": "git",