@contentful/experience-design-system-cli 2.41.1-dev-build-bf9d918c.0 → 2.41.1-dev-build-c9e39919.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.
@@ -0,0 +1,20 @@
1
+ import type { CdfReviewEntry } from './types.js';
2
+ type Counts = {
3
+ accepted: number;
4
+ rejected: number;
5
+ unresolved: number;
6
+ };
7
+ /**
8
+ * Writes one debug log for a visit to the Review. It starts once the components are loaded, grows in memory as the user
9
+ * edits, and is written when they finalize or leave. The trail is also handed to the logger as it grows, so a crash or
10
+ * Ctrl+C writes what happened so far. Going back to the review later is a new visit and a new log.
11
+ */
12
+ export declare function useReviewLog({ loading, loadError, components, }: {
13
+ loading: boolean;
14
+ loadError: string | null | undefined;
15
+ components: CdfReviewEntry[];
16
+ }): {
17
+ record: (label: string) => void;
18
+ finish: (counts: Counts) => void;
19
+ };
20
+ export {};
@@ -31,8 +31,10 @@ type UseReviewHistoryOptions = {
31
31
  components: CdfReviewEntry[];
32
32
  createSnapshot: (components: CdfReviewEntry[]) => HistorySnapshot;
33
33
  applySnapshot: (snapshot: HistorySnapshot) => void;
34
+ /** Told what each edit was called, and about each undo and redo, so the debug log can follow the session. */
35
+ onAction?: (label: string) => void;
34
36
  };
35
- export declare function useReviewHistory({ loading, components, createSnapshot, applySnapshot }: UseReviewHistoryOptions): {
37
+ export declare function useReviewHistory({ loading, components, createSnapshot, applySnapshot, onAction, }: UseReviewHistoryOptions): {
36
38
  historySeededRef: {
37
39
  current: boolean;
38
40
  };
@@ -12,8 +12,6 @@ export type FlowTrail = {
12
12
  /** The step the flow is in now. */
13
13
  at: FlowStep;
14
14
  stages: string[];
15
- /** How many times the user went back from the preview to edit the definitions. */
16
- edits: number;
17
15
  preview?: Record<string, unknown>;
18
16
  push?: Record<string, unknown>;
19
17
  pushFailed?: boolean;
@@ -1,7 +1,7 @@
1
1
  import type { FlowState } from './types.js';
2
2
  /**
3
3
  * Writes one debug log for the flow after the review. The trail grows in memory as the step changes; the log is written
4
- * when the flow reaches done or an error, or when the import is left. The trail is also handed to the logger as it grows,
5
- * so a crash or Ctrl+C writes what happened so far. The final review is not part of it: it is its own step.
4
+ * when the flow reaches done or an error, goes back to the review, or when the import is left. The trail is also handed to
5
+ * the logger as it grows, so a crash or Ctrl+C writes what happened so far. The review is its own step with its own log.
6
6
  */
7
7
  export declare function useFlowLog(state: FlowState): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.41.1-dev-build-bf9d918c.0",
3
+ "version": "2.41.1-dev-build-c9e39919.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.41.1-dev-build-bf9d918c.0"
48
+ "@contentful/experience-design-system-types": "2.41.1-dev-build-c9e39919.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.41.1-dev-build-bf9d918c.0"
62
+ "@contentful/experience-design-system-backend-pipeline": "2.41.1-dev-build-c9e39919.0"
63
63
  },
64
64
  "repository": {
65
65
  "type": "git",