@contentful/experience-design-system-cli 2.26.3-dev-build-5b6242b.0 → 2.26.3

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.26.3-dev-build-5b6242b.0",
3
+ "version": "2.26.3",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -44,7 +44,7 @@
44
44
  "commander": "^13.1.0",
45
45
  "ink": "^4.4.1",
46
46
  "react": "^18.3.1",
47
- "react-devtools-core": "^4.28.5",
47
+ "react-devtools-core": "^4.19.1",
48
48
  "react-dom": "^18.3.1",
49
49
  "svelte": "^5.56.4",
50
50
  "ts-morph": "^27.0.2",
@@ -56,7 +56,7 @@
56
56
  "@contentful/experience-design-system-generation": "workspace:*",
57
57
  "@tsconfig/node24": "^24.0.4",
58
58
  "@types/node": "^24.0.3",
59
- "@types/react": "^18.3.31",
59
+ "@types/react": "^18.3.24",
60
60
  "eslint": "^9.39.5",
61
61
  "eslint-config-prettier": "^10.1.8",
62
62
  "eslint-plugin-prettier": "^5.5.6",
package/dist/src/index.js CHANGED
@@ -15778,6 +15778,29 @@ var init_command2 = __esm({
15778
15778
  }
15779
15779
  });
15780
15780
 
15781
+ // packages/experience-design-system-cli/src/import/path-utils.ts
15782
+ import { resolve as resolve20 } from "node:path";
15783
+ import { homedir as homedir6 } from "node:os";
15784
+ function expandTilde(input) {
15785
+ if (input === "~" || input.startsWith("~/") || input.startsWith("~\\")) {
15786
+ return homedir6() + input.slice(1);
15787
+ }
15788
+ return input;
15789
+ }
15790
+ function normalizePath(input) {
15791
+ let p = input.trim();
15792
+ if (p.length >= 2 && (p.startsWith('"') && p.endsWith('"') || p.startsWith("'") && p.endsWith("'"))) {
15793
+ p = p.slice(1, -1);
15794
+ }
15795
+ p = expandTilde(p);
15796
+ return resolve20(p);
15797
+ }
15798
+ var init_path_utils = __esm({
15799
+ "packages/experience-design-system-cli/src/import/path-utils.ts"() {
15800
+ "use strict";
15801
+ }
15802
+ });
15803
+
15781
15804
  // packages/experience-design-system-cli/src/runs/save-path-resolver.ts
15782
15805
  import { access as access8 } from "node:fs/promises";
15783
15806
  import { join as join19 } from "node:path";
@@ -15840,7 +15863,7 @@ var init_save_path_resolver = __esm({
15840
15863
  // packages/experience-design-system-cli/src/runs/store.ts
15841
15864
  import { readFile as readFile20, writeFile as writeFile5, mkdir as mkdir6, rename } from "node:fs/promises";
15842
15865
  import { join as join20 } from "node:path";
15843
- import { homedir as homedir6 } from "node:os";
15866
+ import { homedir as homedir7 } from "node:os";
15844
15867
  import { randomBytes as randomBytes2 } from "node:crypto";
15845
15868
  function runsFilePath() {
15846
15869
  return RUNS_PATH;
@@ -15960,7 +15983,7 @@ var init_store = __esm({
15960
15983
  RUNS_FILE_VERSION = 3;
15961
15984
  RUNS_FILE_CAP = 200;
15962
15985
  READABLE_VERSIONS = /* @__PURE__ */ new Set([1, 2, 3]);
15963
- RUNS_DIR = join20(homedir6(), ".config", "experiences");
15986
+ RUNS_DIR = join20(homedir7(), ".config", "experiences");
15964
15987
  RUNS_PATH = join20(RUNS_DIR, "runs.json");
15965
15988
  CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
15966
15989
  }
@@ -15971,7 +15994,7 @@ var resolve_run_target_exports = {};
15971
15994
  __export(resolve_run_target_exports, {
15972
15995
  resolveRunTarget: () => resolveRunTarget
15973
15996
  });
15974
- import { homedir as homedir7 } from "node:os";
15997
+ import { homedir as homedir8 } from "node:os";
15975
15998
  import { resolve as resolvePath } from "node:path";
15976
15999
  async function resolveRunTarget(arg) {
15977
16000
  if (looksLikePath2(arg)) {
@@ -15999,8 +16022,8 @@ function looksLikePath2(arg) {
15999
16022
  return arg.startsWith("/") || arg.startsWith("./") || arg.startsWith("../") || arg.startsWith("~/");
16000
16023
  }
16001
16024
  function expandHome(arg) {
16002
- if (arg === "~") return homedir7();
16003
- if (arg.startsWith("~/")) return resolvePath(homedir7(), arg.slice(2));
16025
+ if (arg === "~") return homedir8();
16026
+ if (arg.startsWith("~/")) return resolvePath(homedir8(), arg.slice(2));
16004
16027
  return arg;
16005
16028
  }
16006
16029
  var init_resolve_run_target = __esm({
@@ -16021,29 +16044,6 @@ var init_run_teaser = __esm({
16021
16044
  }
16022
16045
  });
16023
16046
 
16024
- // packages/experience-design-system-cli/src/import/path-utils.ts
16025
- import { resolve as resolve21 } from "node:path";
16026
- import { homedir as homedir8 } from "node:os";
16027
- function expandTilde(input) {
16028
- if (input === "~" || input.startsWith("~/") || input.startsWith("~\\")) {
16029
- return homedir8() + input.slice(1);
16030
- }
16031
- return input;
16032
- }
16033
- function normalizePath(input) {
16034
- let p = input.trim();
16035
- if (p.length >= 2 && (p.startsWith('"') && p.endsWith('"') || p.startsWith("'") && p.endsWith("'"))) {
16036
- p = p.slice(1, -1);
16037
- }
16038
- p = expandTilde(p);
16039
- return resolve21(p);
16040
- }
16041
- var init_path_utils = __esm({
16042
- "packages/experience-design-system-cli/src/import/path-utils.ts"() {
16043
- "use strict";
16044
- }
16045
- });
16046
-
16047
16047
  // packages/experience-design-system-cli/src/runs/path-prompt.tsx
16048
16048
  import { useState as useState9, useEffect as useEffect3 } from "react";
16049
16049
  import { Box as Box19, Text as Text19 } from "ink";
@@ -26571,6 +26571,22 @@ If you are using AWS Bedrock, run:
26571
26571
  return;
26572
26572
  }
26573
26573
  const tokenCount = parsePrintTokensCount(r.stdout);
26574
+ if (!state.projectPath) {
26575
+ update({
26576
+ tokensPath,
26577
+ tokenSessionId,
26578
+ tokenCount,
26579
+ skipComponents: true,
26580
+ acceptedCount: 0,
26581
+ outDir: state.outDir || join23(process.cwd(), ".contentful")
26582
+ });
26583
+ if (noPush) {
26584
+ void startSaveFlow();
26585
+ } else {
26586
+ update({ step: "credentials" });
26587
+ }
26588
+ return;
26589
+ }
26574
26590
  update({ step: "path-validation", tokensPath, tokenSessionId, tokenCount });
26575
26591
  };
26576
26592
  const runExtract = async (projectPath) => {
@@ -32433,6 +32449,7 @@ function registerPrintCommand(program) {
32433
32449
  }
32434
32450
 
32435
32451
  // packages/experience-design-system-cli/src/import/command.ts
32452
+ init_path_utils();
32436
32453
  import { resolve as resolve25, join as join25 } from "node:path";
32437
32454
 
32438
32455
  // packages/experience-design-system-cli/src/import/orchestrator.ts
@@ -32445,7 +32462,7 @@ init_analytics();
32445
32462
  init_env();
32446
32463
  init_cli_path();
32447
32464
  import { mkdir as mkdir5 } from "node:fs/promises";
32448
- import { join as join18, resolve as resolve20 } from "node:path";
32465
+ import { join as join18, resolve as resolve21 } from "node:path";
32449
32466
  import { execFile as execFile2 } from "node:child_process";
32450
32467
  async function runStep(args, cliPath, analyticsSessionId, env = {}, streamStderr = false) {
32451
32468
  const debug = getDebugLogger();
@@ -32531,8 +32548,8 @@ function buildPushStepResult(args) {
32531
32548
  };
32532
32549
  }
32533
32550
  async function runPipeline(opts, progressWriter, cliPathOverride) {
32534
- const projectRoot = resolve20(opts.project);
32535
- const outDir = resolve20(opts.out);
32551
+ const projectRoot = resolve21(opts.project);
32552
+ const outDir = resolve21(opts.out);
32536
32553
  const componentsPath = join18(outDir, "components.json");
32537
32554
  const cliPath = cliPathOverride ?? findCliPath();
32538
32555
  const db = openPipelineDb();
@@ -33606,7 +33623,7 @@ function registerImportCommand(program) {
33606
33623
  }
33607
33624
  const { access: access11 } = await import("node:fs/promises");
33608
33625
  try {
33609
- await access11(opts.rawTokens);
33626
+ await access11(normalizePath(opts.rawTokens));
33610
33627
  } catch {
33611
33628
  process.stderr.write(`Error: --raw-tokens: file not found: ${opts.rawTokens}
33612
33629
  `);
@@ -33668,7 +33685,7 @@ function registerImportCommand(program) {
33668
33685
  initialHost: toConfiguredHost(opts.host ?? creds.host) ?? DEFAULT_CONFIGURED_HOST,
33669
33686
  initialAgent: resolvedAgent,
33670
33687
  ...resolvedModel ? { initialModel: resolvedModel } : {},
33671
- initialProjectPath: opts.project !== "." ? resolve25(opts.project) : void 0,
33688
+ initialProjectPath: opts.project !== "." ? normalizePath(opts.project) : void 0,
33672
33689
  host: opts.host,
33673
33690
  autoAcceptScope,
33674
33691
  autoRejectCycles: opts.autoRejectCycles ?? false,
@@ -33688,7 +33705,7 @@ function registerImportCommand(program) {
33688
33705
  ...opts.onConflict ? { onConflictMode: opts.onConflict } : {},
33689
33706
  selectPromptPath: opts.selectPromptPath ?? creds.selectPromptPath,
33690
33707
  generatePromptPath: opts.generatePromptPath ?? creds.generatePromptPath,
33691
- ...opts.rawTokens ? { initialRawTokensPath: resolve25(opts.rawTokens) } : {},
33708
+ ...opts.rawTokens ? { initialRawTokensPath: normalizePath(opts.rawTokens) } : {},
33692
33709
  allowDeletions: opts.allowDeletions === true,
33693
33710
  ...pickerProps
33694
33711
  })
@@ -33724,7 +33741,7 @@ function registerImportCommand(program) {
33724
33741
  process.exit(1);
33725
33742
  return;
33726
33743
  }
33727
- const projectRoot = resolve25(opts.project);
33744
+ const projectRoot = normalizePath(opts.project);
33728
33745
  const outDir = opts.out ? resolve25(opts.out) : join25(projectRoot, ".contentful");
33729
33746
  const headlessCreds = await readExperiencesCredentials();
33730
33747
  const headlessAgent = resolveAgent(opts.agent, headlessCreds.agent);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.26.3-dev-build-5b6242b.0",
3
+ "version": "2.26.3",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -34,26 +34,26 @@
34
34
  "commander": "^13.1.0",
35
35
  "ink": "^4.4.1",
36
36
  "react": "^18.3.1",
37
- "react-devtools-core": "^4.28.5",
37
+ "react-devtools-core": "^4.19.1",
38
38
  "react-dom": "^18.3.1",
39
39
  "svelte": "^5.56.4",
40
40
  "ts-morph": "^27.0.2",
41
41
  "typescript": "^5.9.3",
42
- "@contentful/experience-design-system-types": "2.26.3-dev-build-5b6242b.0"
42
+ "@contentful/experience-design-system-types": "2.26.3"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@tsconfig/node24": "^24.0.4",
46
46
  "@types/node": "^24.0.3",
47
- "@types/react": "^18.3.31",
47
+ "@types/react": "^18.3.24",
48
48
  "eslint": "^9.39.5",
49
49
  "eslint-config-prettier": "^10.1.8",
50
50
  "eslint-plugin-prettier": "^5.5.6",
51
51
  "ink-testing-library": "^4.0.0",
52
52
  "typescript-eslint": "^8.67.0",
53
53
  "vitest": "^4.0.16",
54
- "@contentful/experience-design-system-client": "2.26.3-dev-build-5b6242b.0",
55
- "@contentful/experience-design-system-extraction": "2.26.3-dev-build-5b6242b.0",
56
- "@contentful/experience-design-system-generation": "2.26.3-dev-build-5b6242b.0"
54
+ "@contentful/experience-design-system-client": "2.26.3",
55
+ "@contentful/experience-design-system-extraction": "2.26.3",
56
+ "@contentful/experience-design-system-generation": "2.26.3"
57
57
  },
58
58
  "repository": {
59
59
  "type": "git",