@contentful/experience-design-system-cli 2.26.2-dev-build-65b76e6.0 → 2.26.2
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/index.js +35 -52
- package/package.json +5 -5
package/dist/package.json
CHANGED
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
|
|
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(
|
|
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
|
|
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
|
|
16026
|
-
if (arg.startsWith("~/")) return resolvePath(
|
|
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";
|
|
@@ -26571,22 +26571,6 @@ 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
|
-
}
|
|
26590
26574
|
update({ step: "path-validation", tokensPath, tokenSessionId, tokenCount });
|
|
26591
26575
|
};
|
|
26592
26576
|
const runExtract = async (projectPath) => {
|
|
@@ -32449,7 +32433,6 @@ function registerPrintCommand(program) {
|
|
|
32449
32433
|
}
|
|
32450
32434
|
|
|
32451
32435
|
// packages/experience-design-system-cli/src/import/command.ts
|
|
32452
|
-
init_path_utils();
|
|
32453
32436
|
import { resolve as resolve25, join as join25 } from "node:path";
|
|
32454
32437
|
|
|
32455
32438
|
// packages/experience-design-system-cli/src/import/orchestrator.ts
|
|
@@ -32462,7 +32445,7 @@ init_analytics();
|
|
|
32462
32445
|
init_env();
|
|
32463
32446
|
init_cli_path();
|
|
32464
32447
|
import { mkdir as mkdir5 } from "node:fs/promises";
|
|
32465
|
-
import { join as join18, resolve as
|
|
32448
|
+
import { join as join18, resolve as resolve20 } from "node:path";
|
|
32466
32449
|
import { execFile as execFile2 } from "node:child_process";
|
|
32467
32450
|
async function runStep(args, cliPath, analyticsSessionId, env = {}, streamStderr = false) {
|
|
32468
32451
|
const debug = getDebugLogger();
|
|
@@ -32548,8 +32531,8 @@ function buildPushStepResult(args) {
|
|
|
32548
32531
|
};
|
|
32549
32532
|
}
|
|
32550
32533
|
async function runPipeline(opts, progressWriter, cliPathOverride) {
|
|
32551
|
-
const projectRoot =
|
|
32552
|
-
const outDir =
|
|
32534
|
+
const projectRoot = resolve20(opts.project);
|
|
32535
|
+
const outDir = resolve20(opts.out);
|
|
32553
32536
|
const componentsPath = join18(outDir, "components.json");
|
|
32554
32537
|
const cliPath = cliPathOverride ?? findCliPath();
|
|
32555
32538
|
const db = openPipelineDb();
|
|
@@ -33623,7 +33606,7 @@ function registerImportCommand(program) {
|
|
|
33623
33606
|
}
|
|
33624
33607
|
const { access: access11 } = await import("node:fs/promises");
|
|
33625
33608
|
try {
|
|
33626
|
-
await access11(
|
|
33609
|
+
await access11(opts.rawTokens);
|
|
33627
33610
|
} catch {
|
|
33628
33611
|
process.stderr.write(`Error: --raw-tokens: file not found: ${opts.rawTokens}
|
|
33629
33612
|
`);
|
|
@@ -33685,7 +33668,7 @@ function registerImportCommand(program) {
|
|
|
33685
33668
|
initialHost: toConfiguredHost(opts.host ?? creds.host) ?? DEFAULT_CONFIGURED_HOST,
|
|
33686
33669
|
initialAgent: resolvedAgent,
|
|
33687
33670
|
...resolvedModel ? { initialModel: resolvedModel } : {},
|
|
33688
|
-
initialProjectPath: opts.project !== "." ?
|
|
33671
|
+
initialProjectPath: opts.project !== "." ? resolve25(opts.project) : void 0,
|
|
33689
33672
|
host: opts.host,
|
|
33690
33673
|
autoAcceptScope,
|
|
33691
33674
|
autoRejectCycles: opts.autoRejectCycles ?? false,
|
|
@@ -33705,7 +33688,7 @@ function registerImportCommand(program) {
|
|
|
33705
33688
|
...opts.onConflict ? { onConflictMode: opts.onConflict } : {},
|
|
33706
33689
|
selectPromptPath: opts.selectPromptPath ?? creds.selectPromptPath,
|
|
33707
33690
|
generatePromptPath: opts.generatePromptPath ?? creds.generatePromptPath,
|
|
33708
|
-
...opts.rawTokens ? { initialRawTokensPath:
|
|
33691
|
+
...opts.rawTokens ? { initialRawTokensPath: resolve25(opts.rawTokens) } : {},
|
|
33709
33692
|
allowDeletions: opts.allowDeletions === true,
|
|
33710
33693
|
...pickerProps
|
|
33711
33694
|
})
|
|
@@ -33741,7 +33724,7 @@ function registerImportCommand(program) {
|
|
|
33741
33724
|
process.exit(1);
|
|
33742
33725
|
return;
|
|
33743
33726
|
}
|
|
33744
|
-
const projectRoot =
|
|
33727
|
+
const projectRoot = resolve25(opts.project);
|
|
33745
33728
|
const outDir = opts.out ? resolve25(opts.out) : join25(projectRoot, ".contentful");
|
|
33746
33729
|
const headlessCreds = await readExperiencesCredentials();
|
|
33747
33730
|
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
|
|
3
|
+
"version": "2.26.2",
|
|
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
|
|
42
|
+
"@contentful/experience-design-system-types": "2.26.2"
|
|
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-client": "2.26.2
|
|
55
|
-
"@contentful/experience-design-system-extraction": "2.26.2
|
|
56
|
-
"@contentful/experience-design-system-generation": "2.26.2
|
|
54
|
+
"@contentful/experience-design-system-client": "2.26.2",
|
|
55
|
+
"@contentful/experience-design-system-extraction": "2.26.2",
|
|
56
|
+
"@contentful/experience-design-system-generation": "2.26.2"
|
|
57
57
|
},
|
|
58
58
|
"repository": {
|
|
59
59
|
"type": "git",
|