@contentful/experience-design-system-cli 2.24.1-dev-build-1db4d13.0 → 2.24.1-dev-build-5ff9f2f.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.24.1-dev-build-1db4d13.0",
3
+ "version": "2.24.1-dev-build-5ff9f2f.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -288,6 +288,7 @@ function buildApplyOutput(operation, spaceId, environmentId, host) {
288
288
  componentTypes: countByAction(componentItems),
289
289
  designTokens: countByAction(tokenItems),
290
290
  viewUrl: buildPostPushUrl({ host: host ?? 'api.contentful.com', spaceId, environmentId }),
291
+ tokensUrl: buildPostPushUrl({ host: host ?? 'api.contentful.com', spaceId, environmentId, view: 'design_tokens' }),
291
292
  failures: items
292
293
  .filter((item) => item.status === 'failed')
293
294
  .map((item) => ({
@@ -42,7 +42,7 @@ export function ServerApplyDone({ operation, spaceId, environmentId, host }) {
42
42
  }
43
43
  });
44
44
  const failures = (operation.items ?? []).filter((item) => item.status === 'failed');
45
- return (_jsxs(Box, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [_jsxs(Text, { bold: true, children: ["Import complete \u2014 ", environmentId, " @ ", spaceId] }), _jsx(Text, { children: " " }), _jsxs(Text, { color: "green", children: [" \u2713 ", operation.summary.succeeded, " succeeded"] }), operation.summary.failed > 0 && _jsxs(Text, { color: "red", children: [" \u2717 ", operation.summary.failed, " failed"] }), operation.summary.failed === 0 && _jsx(Text, { dimColor: true, children: " All entities imported successfully." }), failures.length > 0 && (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { children: " " }), _jsx(Text, { bold: true, children: " Failures:" }), failures.map((item, i) => (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { color: "red", children: [' ', "\u2717 ", item.entityType, ": ", item.id] }), item.error && _jsxs(Text, { dimColor: true, children: [" ", formatItemError(item.error)] })] }, i)))] })), operation.sys.status === 'succeeded' && operation.summary.succeeded > 0 && (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { children: " " }), _jsx(Text, { dimColor: true, children: " View your design system:" }), _jsxs(Text, { color: "cyan", children: [" ", buildPostPushUrl({ host: host ?? 'api.contentful.com', spaceId, environmentId })] })] })), _jsx(Text, { children: " " }), _jsx(Text, { dimColor: true, children: " Press Q to exit." })] }));
45
+ return (_jsxs(Box, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [_jsxs(Text, { bold: true, children: ["Import complete \u2014 ", environmentId, " @ ", spaceId] }), _jsx(Text, { children: " " }), _jsxs(Text, { color: "green", children: [" \u2713 ", operation.summary.succeeded, " succeeded"] }), operation.summary.failed > 0 && _jsxs(Text, { color: "red", children: [" \u2717 ", operation.summary.failed, " failed"] }), operation.summary.failed === 0 && _jsx(Text, { dimColor: true, children: " All entities imported successfully." }), failures.length > 0 && (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { children: " " }), _jsx(Text, { bold: true, children: " Failures:" }), failures.map((item, i) => (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { color: "red", children: [' ', "\u2717 ", item.entityType, ": ", item.id] }), item.error && _jsxs(Text, { dimColor: true, children: [" ", formatItemError(item.error)] })] }, i)))] })), operation.sys.status === 'succeeded' && operation.summary.succeeded > 0 && (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { children: " " }), _jsx(Text, { dimColor: true, children: " View your design system:" }), _jsxs(Text, { color: "cyan", children: [" ", buildPostPushUrl({ host: host ?? 'api.contentful.com', spaceId, environmentId })] }), _jsx(Text, { dimColor: true, children: " View your design tokens:" }), _jsxs(Text, { color: "cyan", children: [' ', buildPostPushUrl({ host: host ?? 'api.contentful.com', spaceId, environmentId, view: 'design_tokens' })] })] })), _jsx(Text, { children: " " }), _jsx(Text, { dimColor: true, children: " Press Q to exit." })] }));
46
46
  }
47
47
  function formatItemError(error) {
48
48
  return formatEdsiError(error);
@@ -588,8 +588,15 @@ export async function runPipeline(opts, progressWriter, cliPathOverride) {
588
588
  spaceId: opts.spaceId,
589
589
  environmentId: opts.environmentId,
590
590
  });
591
+ const tokensUrl = buildPostPushUrl({
592
+ host: opts.host ?? 'api.contentful.com',
593
+ spaceId: opts.spaceId,
594
+ environmentId: opts.environmentId,
595
+ view: 'design_tokens',
596
+ });
591
597
  progressWriter('');
592
598
  progressWriter(`View your design system: ${viewUrl}`);
599
+ progressWriter(`View your design tokens: ${tokensUrl}`);
593
600
  }
594
601
  db.close();
595
602
  return { session: sessionId, project: projectRoot, steps };
@@ -20,5 +20,5 @@ export function DoneStep({ componentTypes, designTokens, summary, spaceId, envir
20
20
  function EntityRows({ entity, label }) {
21
21
  return (_jsxs(_Fragment, { children: [entity.created > 0 && (_jsxs(Box, { gap: 1, children: [_jsx(Text, { color: PALETTE.success, children: "\u2713" }), _jsxs(Text, { children: [entity.created, " ", label, entity.created !== 1 ? 's' : '', " created"] })] })), entity.updated > 0 && (_jsxs(Box, { gap: 1, children: [_jsx(Text, { color: PALETTE.success, children: "\u2713" }), _jsxs(Text, { children: [entity.updated, " ", label, entity.updated !== 1 ? 's' : '', " updated"] })] })), entity.removed > 0 && (_jsxs(Box, { gap: 1, children: [_jsx(Text, { color: PALETTE.success, children: "\u2713" }), _jsxs(Text, { children: [entity.removed, " ", label, entity.removed !== 1 ? 's' : '', " removed"] })] })), entity.failed > 0 && (_jsxs(Box, { gap: 1, children: [_jsx(Text, { color: PALETTE.error, children: "\u2717" }), _jsxs(Text, { color: PALETTE.error, children: [entity.failed, " ", label, entity.failed !== 1 ? 's' : '', " failed \u2014 check logs above"] })] }))] }));
22
22
  }
23
- return (_jsxs(Box, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [success ? (_jsx(Text, { bold: true, color: PALETTE.success, children: "Done!" })) : (_jsx(Text, { bold: true, color: PALETTE.warning, children: "\u26A0 Finished with errors" })), totalPushed === 0 && totalFailed === 0 && !summary ? (_jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Nothing was pushed \u2014 everything was already up to date." }) })) : (_jsxs(Box, { flexDirection: "column", gap: 0, marginTop: 1, children: [_jsx(EntityRows, { entity: componentTypes, label: "Component Type" }), _jsx(EntityRows, { entity: designTokens, label: "Design Token" }), summary && (_jsxs(Box, { gap: 1, marginTop: 1, children: [_jsxs(Text, { dimColor: true, children: ["Server: ", summary.succeeded, "/", summary.total, " succeeded"] }), summary.failed > 0 && _jsxs(Text, { color: PALETTE.error, children: [", ", summary.failed, " failed"] })] }))] })), failures.length > 0 && (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { bold: true, color: PALETTE.error, children: "Failure details" }), failures.map((failure) => (_jsxs(Text, { color: PALETTE.error, children: [failure.entityType, " ", failure.entityId, ": ", failure.message] }, `${failure.entityType}:${failure.entityId}`)))] })), _jsxs(Box, { gap: 1, marginTop: 1, children: [_jsx(Text, { dimColor: true, children: "Space:" }), _jsx(Text, { children: spaceId }), _jsx(Text, { dimColor: true, children: "/" }), _jsx(Text, { dimColor: true, children: "Environment:" }), _jsx(Text, { children: environmentId })] }), success && totalPushed > 0 && (_jsxs(Box, { flexDirection: "column", gap: 1, marginTop: 1, children: [_jsx(Text, { dimColor: true, children: "Your design system is now in Contentful ExO." }), _jsxs(Box, { flexDirection: "column", gap: 0, children: [_jsx(Text, { dimColor: true, children: "View it here:" }), _jsx(Text, { color: PALETTE.info, children: buildPostPushUrl({ host: host ?? 'api.contentful.com', spaceId, environmentId }) })] })] })), runTeaser && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: runTeaser }) })), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "[Enter / q] Exit" }) })] }));
23
+ return (_jsxs(Box, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [success ? (_jsx(Text, { bold: true, color: PALETTE.success, children: "Done!" })) : (_jsx(Text, { bold: true, color: PALETTE.warning, children: "\u26A0 Finished with errors" })), totalPushed === 0 && totalFailed === 0 && !summary ? (_jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Nothing was pushed \u2014 everything was already up to date." }) })) : (_jsxs(Box, { flexDirection: "column", gap: 0, marginTop: 1, children: [_jsx(EntityRows, { entity: componentTypes, label: "Component Type" }), _jsx(EntityRows, { entity: designTokens, label: "Design Token" }), summary && (_jsxs(Box, { gap: 1, marginTop: 1, children: [_jsxs(Text, { dimColor: true, children: ["Server: ", summary.succeeded, "/", summary.total, " succeeded"] }), summary.failed > 0 && _jsxs(Text, { color: PALETTE.error, children: [", ", summary.failed, " failed"] })] }))] })), failures.length > 0 && (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { bold: true, color: PALETTE.error, children: "Failure details" }), failures.map((failure) => (_jsxs(Text, { color: PALETTE.error, children: [failure.entityType, " ", failure.entityId, ": ", failure.message] }, `${failure.entityType}:${failure.entityId}`)))] })), _jsxs(Box, { gap: 1, marginTop: 1, children: [_jsx(Text, { dimColor: true, children: "Space:" }), _jsx(Text, { children: spaceId }), _jsx(Text, { dimColor: true, children: "/" }), _jsx(Text, { dimColor: true, children: "Environment:" }), _jsx(Text, { children: environmentId })] }), success && totalPushed > 0 && (_jsxs(Box, { flexDirection: "column", gap: 1, marginTop: 1, children: [_jsx(Text, { dimColor: true, children: "Your design system is now in Contentful ExO." }), _jsxs(Box, { flexDirection: "column", gap: 0, children: [_jsx(Text, { dimColor: true, children: "View your components here:" }), _jsx(Text, { color: PALETTE.info, children: buildPostPushUrl({ host: host ?? 'api.contentful.com', spaceId, environmentId }) })] }), _jsxs(Box, { flexDirection: "column", gap: 0, children: [_jsx(Text, { dimColor: true, children: "View your design tokens here:" }), _jsx(Text, { color: PALETTE.info, children: buildPostPushUrl({ host: host ?? 'api.contentful.com', spaceId, environmentId, view: 'design_tokens' }) })] })] })), runTeaser && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: runTeaser }) })), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "[Enter / q] Exit" }) })] }));
24
24
  }
@@ -5,20 +5,13 @@
5
5
  * to inline the same post-push URL formatter. This module centralizes that
6
6
  * formatter so the wizard, `apply push`, and `apply select` all emit the same
7
7
  * URL shape.
8
- *
9
- * Path: `/views/components` (modern path; the legacy `/exo/components` was
10
- * replaced in INTEG-4227).
11
- *
12
- * Host mapping: api.contentful.com → app.contentful.com,
13
- * api.flinkly.com → app.flinkly.com,
14
- * api.quirely.com → app.quirely.com.
15
- * Unknown hosts fall through unchanged (no guessing — see the parity-gap-fills
16
- * spec, "Gap 4 URL host mapping" risk note).
17
8
  */
9
+ export type PostPushView = 'components' | 'design_tokens';
18
10
  export interface BuildPostPushUrlInput {
19
11
  host: string;
20
12
  spaceId: string;
21
13
  environmentId: string;
14
+ view?: PostPushView;
22
15
  }
23
16
  /**
24
17
  * Map a Contentful API host to the corresponding webapp host. For api.*.com
@@ -26,9 +19,4 @@ export interface BuildPostPushUrlInput {
26
19
  * as-is (callers get the raw host, no guessing).
27
20
  */
28
21
  export declare function apiHostToAppHost(host: string): string;
29
- /**
30
- * Build the Contentful webapp URL operators see after a successful push.
31
- * Matches the wizard `done` step's existing output byte-for-byte for
32
- * `api.contentful.com`.
33
- */
34
- export declare function buildPostPushUrl({ host, spaceId, environmentId }: BuildPostPushUrlInput): string;
22
+ export declare function buildPostPushUrl({ host, spaceId, environmentId, view }: BuildPostPushUrlInput): string;
@@ -5,15 +5,6 @@
5
5
  * to inline the same post-push URL formatter. This module centralizes that
6
6
  * formatter so the wizard, `apply push`, and `apply select` all emit the same
7
7
  * URL shape.
8
- *
9
- * Path: `/views/components` (modern path; the legacy `/exo/components` was
10
- * replaced in INTEG-4227).
11
- *
12
- * Host mapping: api.contentful.com → app.contentful.com,
13
- * api.flinkly.com → app.flinkly.com,
14
- * api.quirely.com → app.quirely.com.
15
- * Unknown hosts fall through unchanged (no guessing — see the parity-gap-fills
16
- * spec, "Gap 4 URL host mapping" risk note).
17
8
  */
18
9
  function normalizeHost(host) {
19
10
  return host
@@ -30,12 +21,7 @@ export function apiHostToAppHost(host) {
30
21
  const normalized = normalizeHost(host);
31
22
  return normalized.replace(/^api\./, 'app.');
32
23
  }
33
- /**
34
- * Build the Contentful webapp URL operators see after a successful push.
35
- * Matches the wizard `done` step's existing output byte-for-byte for
36
- * `api.contentful.com`.
37
- */
38
- export function buildPostPushUrl({ host, spaceId, environmentId }) {
24
+ export function buildPostPushUrl({ host, spaceId, environmentId, view = 'components' }) {
39
25
  const appHost = apiHostToAppHost(host);
40
- return `https://${appHost}/spaces/${spaceId}/environments/${environmentId}/views/components`;
26
+ return `https://${appHost}/spaces/${spaceId}/environments/${environmentId}/views/${view}`;
41
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.24.1-dev-build-1db4d13.0",
3
+ "version": "2.24.1-dev-build-5ff9f2f.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -34,10 +34,10 @@
34
34
  "react": "^18.3.1",
35
35
  "react-devtools-core": "^4.19.1",
36
36
  "react-dom": "^18.3.1",
37
- "@contentful/experience-design-system-client": "2.24.1-dev-build-1db4d13.0",
38
- "@contentful/experience-design-system-extraction": "2.24.1-dev-build-1db4d13.0",
39
- "@contentful/experience-design-system-generation": "2.24.1-dev-build-1db4d13.0",
40
- "@contentful/experience-design-system-types": "2.24.1-dev-build-1db4d13.0"
37
+ "@contentful/experience-design-system-extraction": "2.24.1-dev-build-5ff9f2f.0",
38
+ "@contentful/experience-design-system-client": "2.24.1-dev-build-5ff9f2f.0",
39
+ "@contentful/experience-design-system-generation": "2.24.1-dev-build-5ff9f2f.0",
40
+ "@contentful/experience-design-system-types": "2.24.1-dev-build-5ff9f2f.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@tsconfig/node24": "^24.0.4",