@contentful/experience-design-system-cli 2.32.1-dev-build-dc74ac7.0 → 2.32.1-dev-build-e667d41.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/helpers/build-contentful-management-client.d.ts +7 -0
- package/dist/src/helpers/fetch-existing-contentful-entities.d.ts +11 -0
- package/dist/src/helpers/find-nearly-matching-component.d.ts +7 -0
- package/dist/src/helpers/read-existing-contentful-entities-from-session.d.ts +7 -0
- package/dist/src/helpers/summarize-existing-contentful-entities.d.ts +50 -0
- package/dist/src/import/orchestrator.d.ts +0 -1
- package/dist/src/index.js +341 -137
- package/dist/src/session/cache-keys.d.ts +1 -1
- package/package.json +6 -6
- package/skills/generate-components.md +27 -0
- package/skills/map-tokens.md +12 -0
- package/skills/select-components.md +11 -0
- package/dist/src/helpers/cma-client.d.ts +0 -17
- package/dist/src/helpers/fetch-existing-entities.d.ts +0 -16
package/dist/package.json
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type PlainClientAPI } from 'contentful-management';
|
|
2
|
+
interface BuildContentfulManagementClientOptions {
|
|
3
|
+
cmaToken: string;
|
|
4
|
+
host?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function buildContentfulManagementClient(opts: BuildContentfulManagementClientOptions): PlainClientAPI;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ComponentProps, type DesignTokenProps, type PlainClientAPI } from 'contentful-management';
|
|
2
|
+
export interface ExistingContentfulEntities {
|
|
3
|
+
components: ComponentProps[];
|
|
4
|
+
tokens: DesignTokenProps[];
|
|
5
|
+
}
|
|
6
|
+
interface FetchExistingContentfulEntitiesParams {
|
|
7
|
+
spaceId: string;
|
|
8
|
+
environmentId: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function fetchExistingContentfulEntitiesFromContentful(client: PlainClientAPI, params: FetchExistingContentfulEntitiesParams): Promise<ExistingContentfulEntities>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ComponentProps } from 'contentful-management';
|
|
2
|
+
/**
|
|
3
|
+
* Find the space component whose name is closest to the codebase component name,
|
|
4
|
+
* within a small edit budget. Handles case, punctuation, and plural differences
|
|
5
|
+
* so `Btn-Primary` matches `btnPrimary`, and `Cards` matches `Card`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function findNearlyMatchingComponent(components: ComponentProps[], codebaseName: string): ComponentProps | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ExistingContentfulEntities } from './fetch-existing-contentful-entities.js';
|
|
2
|
+
/**
|
|
3
|
+
* Read the session file the orchestrator writes after
|
|
4
|
+
* `fetchExistingContentfulEntitiesFromContentful()`. Returns undefined on
|
|
5
|
+
* any failure — this is optional enrichment and must never block the step.
|
|
6
|
+
*/
|
|
7
|
+
export declare function readExistingContentfulEntitiesFromSession(path: string | undefined): Promise<ExistingContentfulEntities | undefined>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ExistingContentfulEntities } from './fetch-existing-contentful-entities.js';
|
|
2
|
+
export interface SelectAgentSummary {
|
|
3
|
+
components: Array<{
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
}>;
|
|
8
|
+
tokens: {
|
|
9
|
+
count: number;
|
|
10
|
+
kinds: string[];
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface GenerateAgentSummary {
|
|
14
|
+
likelyMatch?: {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
designProperties: Array<{
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
type: string;
|
|
21
|
+
}>;
|
|
22
|
+
contentProperties: Array<{
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
type: string;
|
|
26
|
+
}>;
|
|
27
|
+
slots: Array<{
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
}>;
|
|
31
|
+
};
|
|
32
|
+
otherComponents: Array<{
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
}>;
|
|
36
|
+
tokens: {
|
|
37
|
+
count: number;
|
|
38
|
+
kinds: string[];
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export interface MapTokensSummary {
|
|
42
|
+
tokens: Array<{
|
|
43
|
+
id: string;
|
|
44
|
+
name: string;
|
|
45
|
+
type: string;
|
|
46
|
+
}>;
|
|
47
|
+
}
|
|
48
|
+
export declare function summarizeForSelectAgent(entities: ExistingContentfulEntities): SelectAgentSummary;
|
|
49
|
+
export declare function summarizeForGenerateAgent(entities: ExistingContentfulEntities, codebaseComponentName: string): GenerateAgentSummary;
|
|
50
|
+
export declare function summarizeForMapTokens(entities: ExistingContentfulEntities): MapTokensSummary;
|
|
@@ -28,7 +28,6 @@ export interface PipelineOptions {
|
|
|
28
28
|
/** When true, auto-reject cycle participants and retry push instead of surfacing an error. */
|
|
29
29
|
autoRejectCycles?: boolean;
|
|
30
30
|
allowDeletions?: boolean;
|
|
31
|
-
withSpaceContext?: boolean;
|
|
32
31
|
compositionMode?: CompositionMode;
|
|
33
32
|
compositionMap?: string;
|
|
34
33
|
compositionAgent?: boolean;
|