@contentful/experience-design-system-cli 2.26.2-dev-build-1b57430.0 → 2.26.2-dev-build-41f44ea.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.26.2-dev-build-1b57430.0",
3
+ "version": "2.26.2-dev-build-41f44ea.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/dist/src/index.js CHANGED
@@ -15778,29 +15778,6 @@ 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
-
15804
15781
  // packages/experience-design-system-cli/src/runs/save-path-resolver.ts
15805
15782
  import { access as access8 } from "node:fs/promises";
15806
15783
  import { join as join19 } from "node:path";
@@ -15863,7 +15840,7 @@ var init_save_path_resolver = __esm({
15863
15840
  // packages/experience-design-system-cli/src/runs/store.ts
15864
15841
  import { readFile as readFile20, writeFile as writeFile5, mkdir as mkdir6, rename } from "node:fs/promises";
15865
15842
  import { join as join20 } from "node:path";
15866
- import { homedir as homedir7 } from "node:os";
15843
+ import { homedir as homedir6 } from "node:os";
15867
15844
  import { randomBytes as randomBytes2 } from "node:crypto";
15868
15845
  function runsFilePath() {
15869
15846
  return RUNS_PATH;
@@ -15983,7 +15960,7 @@ var init_store = __esm({
15983
15960
  RUNS_FILE_VERSION = 3;
15984
15961
  RUNS_FILE_CAP = 200;
15985
15962
  READABLE_VERSIONS = /* @__PURE__ */ new Set([1, 2, 3]);
15986
- RUNS_DIR = join20(homedir7(), ".config", "experiences");
15963
+ RUNS_DIR = join20(homedir6(), ".config", "experiences");
15987
15964
  RUNS_PATH = join20(RUNS_DIR, "runs.json");
15988
15965
  CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
15989
15966
  }
@@ -15994,7 +15971,7 @@ var resolve_run_target_exports = {};
15994
15971
  __export(resolve_run_target_exports, {
15995
15972
  resolveRunTarget: () => resolveRunTarget
15996
15973
  });
15997
- import { homedir as homedir8 } from "node:os";
15974
+ import { homedir as homedir7 } from "node:os";
15998
15975
  import { resolve as resolvePath } from "node:path";
15999
15976
  async function resolveRunTarget(arg) {
16000
15977
  if (looksLikePath2(arg)) {
@@ -16022,8 +15999,8 @@ function looksLikePath2(arg) {
16022
15999
  return arg.startsWith("/") || arg.startsWith("./") || arg.startsWith("../") || arg.startsWith("~/");
16023
16000
  }
16024
16001
  function expandHome(arg) {
16025
- if (arg === "~") return homedir8();
16026
- if (arg.startsWith("~/")) return resolvePath(homedir8(), arg.slice(2));
16002
+ if (arg === "~") return homedir7();
16003
+ if (arg.startsWith("~/")) return resolvePath(homedir7(), arg.slice(2));
16027
16004
  return arg;
16028
16005
  }
16029
16006
  var init_resolve_run_target = __esm({
@@ -16044,6 +16021,29 @@ var init_run_teaser = __esm({
16044
16021
  }
16045
16022
  });
16046
16023
 
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";
@@ -26572,22 +26572,6 @@ If you are using AWS Bedrock, run:
26572
26572
  return;
26573
26573
  }
26574
26574
  const tokenCount = parsePrintTokensCount(r.stdout);
26575
- if (!state.projectPath) {
26576
- update({
26577
- tokensPath,
26578
- tokenSessionId,
26579
- tokenCount,
26580
- skipComponents: true,
26581
- acceptedCount: 0,
26582
- outDir: state.outDir || join23(process.cwd(), ".contentful")
26583
- });
26584
- if (noPush) {
26585
- void startSaveFlow();
26586
- } else {
26587
- update({ step: "credentials" });
26588
- }
26589
- return;
26590
- }
26591
26575
  update({ step: "path-validation", tokensPath, tokenSessionId, tokenCount });
26592
26576
  };
26593
26577
  const runExtract = async (projectPath) => {
@@ -32451,7 +32435,6 @@ function registerPrintCommand(program) {
32451
32435
  }
32452
32436
 
32453
32437
  // packages/experience-design-system-cli/src/import/command.ts
32454
- init_path_utils();
32455
32438
  import { resolve as resolve25, join as join25 } from "node:path";
32456
32439
 
32457
32440
  // packages/experience-design-system-cli/src/import/orchestrator.ts
@@ -32464,7 +32447,7 @@ init_analytics();
32464
32447
  init_env();
32465
32448
  init_cli_path();
32466
32449
  import { mkdir as mkdir5 } from "node:fs/promises";
32467
- import { join as join18, resolve as resolve21 } from "node:path";
32450
+ import { join as join18, resolve as resolve20 } from "node:path";
32468
32451
  import { execFile as execFile2 } from "node:child_process";
32469
32452
  async function runStep(args, cliPath, analyticsSessionId, env = {}, streamStderr = false) {
32470
32453
  const debug = getDebugLogger();
@@ -32550,8 +32533,8 @@ function buildPushStepResult(args) {
32550
32533
  };
32551
32534
  }
32552
32535
  async function runPipeline(opts, progressWriter, cliPathOverride) {
32553
- const projectRoot = resolve21(opts.project);
32554
- const outDir = resolve21(opts.out);
32536
+ const projectRoot = resolve20(opts.project);
32537
+ const outDir = resolve20(opts.out);
32555
32538
  const componentsPath = join18(outDir, "components.json");
32556
32539
  const cliPath = cliPathOverride ?? findCliPath();
32557
32540
  const db = openPipelineDb();
@@ -33625,7 +33608,7 @@ function registerImportCommand(program) {
33625
33608
  }
33626
33609
  const { access: access11 } = await import("node:fs/promises");
33627
33610
  try {
33628
- await access11(normalizePath(opts.rawTokens));
33611
+ await access11(opts.rawTokens);
33629
33612
  } catch {
33630
33613
  process.stderr.write(`Error: --raw-tokens: file not found: ${opts.rawTokens}
33631
33614
  `);
@@ -33687,7 +33670,7 @@ function registerImportCommand(program) {
33687
33670
  initialHost: toConfiguredHost(opts.host ?? creds.host) ?? DEFAULT_CONFIGURED_HOST,
33688
33671
  initialAgent: resolvedAgent,
33689
33672
  ...resolvedModel ? { initialModel: resolvedModel } : {},
33690
- initialProjectPath: opts.project !== "." ? normalizePath(opts.project) : void 0,
33673
+ initialProjectPath: opts.project !== "." ? resolve25(opts.project) : void 0,
33691
33674
  host: opts.host,
33692
33675
  autoAcceptScope,
33693
33676
  autoRejectCycles: opts.autoRejectCycles ?? false,
@@ -33707,7 +33690,7 @@ function registerImportCommand(program) {
33707
33690
  ...opts.onConflict ? { onConflictMode: opts.onConflict } : {},
33708
33691
  selectPromptPath: opts.selectPromptPath ?? creds.selectPromptPath,
33709
33692
  generatePromptPath: opts.generatePromptPath ?? creds.generatePromptPath,
33710
- ...opts.rawTokens ? { initialRawTokensPath: normalizePath(opts.rawTokens) } : {},
33693
+ ...opts.rawTokens ? { initialRawTokensPath: resolve25(opts.rawTokens) } : {},
33711
33694
  allowDeletions: opts.allowDeletions === true,
33712
33695
  ...pickerProps
33713
33696
  })
@@ -33743,7 +33726,7 @@ function registerImportCommand(program) {
33743
33726
  process.exit(1);
33744
33727
  return;
33745
33728
  }
33746
- const projectRoot = normalizePath(opts.project);
33729
+ const projectRoot = resolve25(opts.project);
33747
33730
  const outDir = opts.out ? resolve25(opts.out) : join25(projectRoot, ".contentful");
33748
33731
  const headlessCreds = await readExperiencesCredentials();
33749
33732
  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.2-dev-build-1b57430.0",
3
+ "version": "2.26.2-dev-build-41f44ea.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -39,7 +39,7 @@
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.2-dev-build-1b57430.0"
42
+ "@contentful/experience-design-system-types": "2.26.2-dev-build-41f44ea.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@tsconfig/node24": "^24.0.4",
@@ -51,9 +51,9 @@
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-extraction": "2.26.2-dev-build-1b57430.0",
55
- "@contentful/experience-design-system-client": "2.26.2-dev-build-1b57430.0",
56
- "@contentful/experience-design-system-generation": "2.26.2-dev-build-1b57430.0"
54
+ "@contentful/experience-design-system-client": "2.26.2-dev-build-41f44ea.0",
55
+ "@contentful/experience-design-system-extraction": "2.26.2-dev-build-41f44ea.0",
56
+ "@contentful/experience-design-system-generation": "2.26.2-dev-build-41f44ea.0"
57
57
  },
58
58
  "repository": {
59
59
  "type": "git",