@contentful/experience-design-system-cli 2.37.1-dev-build-6df388e4.0 → 2.37.1-dev-build-df3fca68.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/app.js +9 -30
- package/dist/index.js +12 -39
- package/dist/package.json +1 -1
- package/dist/src/tui/import/steps/03-path-validation/helpers/scan-files.d.ts +10 -0
- package/legacy/package.json +1 -1
- package/package.json +3 -3
- package/dist/src/tui/import/steps/03-path-validation/helpers/fold-svelte-and-md-into-other.d.ts +0 -13
- package/dist/src/tui/import/steps/03-path-validation/loader.d.ts +0 -7
package/dist/app.js
CHANGED
|
@@ -2428,30 +2428,12 @@ var execFileAsync = promisify(execFile);
|
|
|
2428
2428
|
// packages/experience-design-system-backend-pipeline/dist/src/steps/generation/src/controller/map-tokens/run-map-tokens.js
|
|
2429
2429
|
var DEFAULT_TIMEOUT_MS2 = 5 * 60 * 1e3;
|
|
2430
2430
|
|
|
2431
|
-
// packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/helpers/
|
|
2432
|
-
function
|
|
2433
|
-
return
|
|
2434
|
-
tsx: counts.tsx,
|
|
2435
|
-
ts: counts.ts,
|
|
2436
|
-
vue: counts.vue,
|
|
2437
|
-
astro: counts.astro,
|
|
2438
|
-
jsx: counts.jsx,
|
|
2439
|
-
js: counts.js,
|
|
2440
|
-
json: counts.json,
|
|
2441
|
-
other: counts.other + counts.svelte + counts.md,
|
|
2442
|
-
total: counts.total
|
|
2443
|
-
};
|
|
2444
|
-
}
|
|
2445
|
-
|
|
2446
|
-
// packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/loader.ts
|
|
2447
|
-
async function scanProject(directory) {
|
|
2448
|
-
const outcome = collectFiles(directory);
|
|
2449
|
-
return toScanResult(outcome);
|
|
2431
|
+
// packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/helpers/scan-files.ts
|
|
2432
|
+
function scanFiles(directory) {
|
|
2433
|
+
return toScanResult(collectFiles(directory));
|
|
2450
2434
|
}
|
|
2451
2435
|
function toScanResult(outcome) {
|
|
2452
|
-
if (!outcome.ok) {
|
|
2453
|
-
return { ok: false, failure: outcome.failure };
|
|
2454
|
-
}
|
|
2436
|
+
if (!outcome.ok) return { ok: false, failure: outcome.failure };
|
|
2455
2437
|
return {
|
|
2456
2438
|
ok: true,
|
|
2457
2439
|
counts: foldSvelteAndMdIntoOther(outcome.result.counts),
|
|
@@ -2459,6 +2441,10 @@ function toScanResult(outcome) {
|
|
|
2459
2441
|
warnings: outcome.result.warnings
|
|
2460
2442
|
};
|
|
2461
2443
|
}
|
|
2444
|
+
function foldSvelteAndMdIntoOther(counts) {
|
|
2445
|
+
const { svelte, md, ...rest } = counts;
|
|
2446
|
+
return { ...rest, other: rest.other + svelte + md };
|
|
2447
|
+
}
|
|
2462
2448
|
|
|
2463
2449
|
// packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/screen.tsx
|
|
2464
2450
|
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
@@ -2511,14 +2497,7 @@ function PathValidationScreen({
|
|
|
2511
2497
|
const resolvedPath = useMemo(() => resolveUserPath(projectPath), [projectPath]);
|
|
2512
2498
|
const [scan, setScan] = useState5();
|
|
2513
2499
|
useEffect3(() => {
|
|
2514
|
-
|
|
2515
|
-
setScan(void 0);
|
|
2516
|
-
void scanProject(resolvedPath).then((result) => {
|
|
2517
|
-
if (!cancelled) setScan(result);
|
|
2518
|
-
});
|
|
2519
|
-
return () => {
|
|
2520
|
-
cancelled = true;
|
|
2521
|
-
};
|
|
2500
|
+
setScan(scanFiles(resolvedPath));
|
|
2522
2501
|
}, [resolvedPath]);
|
|
2523
2502
|
const phase = phaseOf(scan);
|
|
2524
2503
|
usePathValidationControls(phase, {
|
package/dist/index.js
CHANGED
|
@@ -4686,35 +4686,12 @@ var init_src3 = __esm({
|
|
|
4686
4686
|
}
|
|
4687
4687
|
});
|
|
4688
4688
|
|
|
4689
|
-
// packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/helpers/
|
|
4690
|
-
function
|
|
4691
|
-
return
|
|
4692
|
-
tsx: counts.tsx,
|
|
4693
|
-
ts: counts.ts,
|
|
4694
|
-
vue: counts.vue,
|
|
4695
|
-
astro: counts.astro,
|
|
4696
|
-
jsx: counts.jsx,
|
|
4697
|
-
js: counts.js,
|
|
4698
|
-
json: counts.json,
|
|
4699
|
-
other: counts.other + counts.svelte + counts.md,
|
|
4700
|
-
total: counts.total
|
|
4701
|
-
};
|
|
4702
|
-
}
|
|
4703
|
-
var init_fold_svelte_and_md_into_other = __esm({
|
|
4704
|
-
"packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/helpers/fold-svelte-and-md-into-other.ts"() {
|
|
4705
|
-
"use strict";
|
|
4706
|
-
}
|
|
4707
|
-
});
|
|
4708
|
-
|
|
4709
|
-
// packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/loader.ts
|
|
4710
|
-
async function scanProject(directory) {
|
|
4711
|
-
const outcome = collectFiles(directory);
|
|
4712
|
-
return toScanResult(outcome);
|
|
4689
|
+
// packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/helpers/scan-files.ts
|
|
4690
|
+
function scanFiles(directory) {
|
|
4691
|
+
return toScanResult(collectFiles(directory));
|
|
4713
4692
|
}
|
|
4714
4693
|
function toScanResult(outcome) {
|
|
4715
|
-
if (!outcome.ok) {
|
|
4716
|
-
return { ok: false, failure: outcome.failure };
|
|
4717
|
-
}
|
|
4694
|
+
if (!outcome.ok) return { ok: false, failure: outcome.failure };
|
|
4718
4695
|
return {
|
|
4719
4696
|
ok: true,
|
|
4720
4697
|
counts: foldSvelteAndMdIntoOther(outcome.result.counts),
|
|
@@ -4722,11 +4699,14 @@ function toScanResult(outcome) {
|
|
|
4722
4699
|
warnings: outcome.result.warnings
|
|
4723
4700
|
};
|
|
4724
4701
|
}
|
|
4725
|
-
|
|
4726
|
-
|
|
4702
|
+
function foldSvelteAndMdIntoOther(counts) {
|
|
4703
|
+
const { svelte, md, ...rest } = counts;
|
|
4704
|
+
return { ...rest, other: rest.other + svelte + md };
|
|
4705
|
+
}
|
|
4706
|
+
var init_scan_files = __esm({
|
|
4707
|
+
"packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/helpers/scan-files.ts"() {
|
|
4727
4708
|
"use strict";
|
|
4728
4709
|
init_src3();
|
|
4729
|
-
init_fold_svelte_and_md_into_other();
|
|
4730
4710
|
}
|
|
4731
4711
|
});
|
|
4732
4712
|
|
|
@@ -4783,14 +4763,7 @@ function PathValidationScreen({
|
|
|
4783
4763
|
const resolvedPath = useMemo(() => resolveUserPath(projectPath), [projectPath]);
|
|
4784
4764
|
const [scan, setScan] = useState5();
|
|
4785
4765
|
useEffect3(() => {
|
|
4786
|
-
|
|
4787
|
-
setScan(void 0);
|
|
4788
|
-
void scanProject(resolvedPath).then((result) => {
|
|
4789
|
-
if (!cancelled) setScan(result);
|
|
4790
|
-
});
|
|
4791
|
-
return () => {
|
|
4792
|
-
cancelled = true;
|
|
4793
|
-
};
|
|
4766
|
+
setScan(scanFiles(resolvedPath));
|
|
4794
4767
|
}, [resolvedPath]);
|
|
4795
4768
|
const phase = phaseOf(scan);
|
|
4796
4769
|
usePathValidationControls(phase, {
|
|
@@ -4822,7 +4795,7 @@ var init_screen3 = __esm({
|
|
|
4822
4795
|
init_home_theme();
|
|
4823
4796
|
init_resolve_user_path();
|
|
4824
4797
|
init_controls3();
|
|
4825
|
-
|
|
4798
|
+
init_scan_files();
|
|
4826
4799
|
init_logic3();
|
|
4827
4800
|
}
|
|
4828
4801
|
});
|
package/dist/package.json
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { collectFiles } from '@contentful/experience-design-system-backend-pipeline';
|
|
2
|
+
import type { FileCounts as LocalFileCounts, ScanResult } from '../logic.js';
|
|
3
|
+
type CollectedFilesOutcome = ReturnType<typeof collectFiles>;
|
|
4
|
+
type PipelineFileCounts = Extract<CollectedFilesOutcome, {
|
|
5
|
+
ok: true;
|
|
6
|
+
}>['result']['counts'];
|
|
7
|
+
export declare function scanFiles(directory: string): ScanResult;
|
|
8
|
+
export declare function toScanResult(outcome: CollectedFilesOutcome): ScanResult;
|
|
9
|
+
export declare function foldSvelteAndMdIntoOther(counts: PipelineFileCounts): LocalFileCounts;
|
|
10
|
+
export {};
|
package/legacy/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experience-design-system-cli",
|
|
3
|
-
"version": "2.37.1-dev-build-
|
|
3
|
+
"version": "2.37.1-dev-build-df3fca68.0",
|
|
4
4
|
"description": "Contentful Experiences design system import CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"ts-morph": "^27.0.2",
|
|
45
45
|
"typescript": "^5.9.3",
|
|
46
46
|
"zod": "^4.6.5",
|
|
47
|
-
"@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-
|
|
48
|
-
"@contentful/experience-design-system-types": "2.37.1-dev-build-
|
|
47
|
+
"@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-df3fca68.0",
|
|
48
|
+
"@contentful/experience-design-system-types": "2.37.1-dev-build-df3fca68.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@tsconfig/node24": "^24.0.4",
|
package/dist/src/tui/import/steps/03-path-validation/helpers/fold-svelte-and-md-into-other.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { collectFiles } from '@contentful/experience-design-system-backend-pipeline';
|
|
2
|
-
import type { FileCounts as LocalFileCounts } from '../logic.js';
|
|
3
|
-
type CollectFilesOutcome = ReturnType<typeof collectFiles>;
|
|
4
|
-
type PipelineFileCounts = Extract<CollectFilesOutcome, {
|
|
5
|
-
ok: true;
|
|
6
|
-
}>['result']['counts'];
|
|
7
|
-
/**
|
|
8
|
-
* The pipeline tracks `svelte` and `md` as their own buckets; this screen
|
|
9
|
-
* does not render those rows yet. Fold them into `other` for display so the
|
|
10
|
-
* total stays consistent with what the user sees.
|
|
11
|
-
*/
|
|
12
|
-
export declare function foldSvelteAndMdIntoOther(counts: PipelineFileCounts): LocalFileCounts;
|
|
13
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ScanResult } from './logic.js';
|
|
2
|
-
/**
|
|
3
|
-
* Scan the project path using the pipeline's walker so counts shown here
|
|
4
|
-
* match exactly what extract will later walk. Keeps the file list on the ok
|
|
5
|
-
* variant so downstream screens can consume `filePaths` without re-walking.
|
|
6
|
-
*/
|
|
7
|
-
export declare function scanProject(directory: string): Promise<ScanResult>;
|