@contentful/experience-design-system-cli 2.24.1-dev-build-5ff9f2f.0 → 2.24.1-dev-build-3ddd9a7.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-5ff9f2f.0",
3
+ "version": "2.24.1-dev-build-3ddd9a7.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -288,7 +288,6 @@ 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' }),
292
291
  failures: items
293
292
  .filter((item) => item.status === 'failed')
294
293
  .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, { 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." })] }));
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." })] }));
46
46
  }
47
47
  function formatItemError(error) {
48
48
  return formatEdsiError(error);
@@ -588,15 +588,8 @@ 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
- });
597
591
  progressWriter('');
598
592
  progressWriter(`View your design system: ${viewUrl}`);
599
- progressWriter(`View your design tokens: ${tokensUrl}`);
600
593
  }
601
594
  db.close();
602
595
  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 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" }) })] }));
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" }) })] }));
24
24
  }
@@ -5,13 +5,20 @@
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).
8
17
  */
9
- export type PostPushView = 'components' | 'design_tokens';
10
18
  export interface BuildPostPushUrlInput {
11
19
  host: string;
12
20
  spaceId: string;
13
21
  environmentId: string;
14
- view?: PostPushView;
15
22
  }
16
23
  /**
17
24
  * Map a Contentful API host to the corresponding webapp host. For api.*.com
@@ -19,4 +26,9 @@ export interface BuildPostPushUrlInput {
19
26
  * as-is (callers get the raw host, no guessing).
20
27
  */
21
28
  export declare function apiHostToAppHost(host: string): string;
22
- export declare function buildPostPushUrl({ host, spaceId, environmentId, view }: BuildPostPushUrlInput): 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;
@@ -5,6 +5,15 @@
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).
8
17
  */
9
18
  function normalizeHost(host) {
10
19
  return host
@@ -21,7 +30,12 @@ export function apiHostToAppHost(host) {
21
30
  const normalized = normalizeHost(host);
22
31
  return normalized.replace(/^api\./, 'app.');
23
32
  }
24
- export function buildPostPushUrl({ host, spaceId, environmentId, view = 'components' }) {
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 }) {
25
39
  const appHost = apiHostToAppHost(host);
26
- return `https://${appHost}/spaces/${spaceId}/environments/${environmentId}/views/${view}`;
40
+ return `https://${appHost}/spaces/${spaceId}/environments/${environmentId}/views/components`;
27
41
  }
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-5ff9f2f.0",
3
+ "version": "2.24.1-dev-build-3ddd9a7.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-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"
37
+ "@contentful/experience-design-system-extraction": "2.24.1-dev-build-3ddd9a7.0",
38
+ "@contentful/experience-design-system-generation": "2.24.1-dev-build-3ddd9a7.0",
39
+ "@contentful/experience-design-system-client": "2.24.1-dev-build-3ddd9a7.0",
40
+ "@contentful/experience-design-system-types": "2.24.1-dev-build-3ddd9a7.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@tsconfig/node24": "^24.0.4",