@fragments-sdk/cli 0.7.2 → 0.7.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/bin.js +20 -16
- package/dist/bin.js.map +1 -1
- package/dist/chunk-D34Q6A7S.js +266 -0
- package/dist/chunk-D34Q6A7S.js.map +1 -0
- package/dist/chunk-EKLMXTWU.js +80 -0
- package/dist/chunk-EKLMXTWU.js.map +1 -0
- package/dist/{chunk-GHYYFAQN.js → chunk-P33AKQJW.js} +1 -76
- package/dist/chunk-P33AKQJW.js.map +1 -0
- package/dist/{chunk-7KUSBMI4.js → chunk-QPY4DUFB.js} +174 -45
- package/dist/chunk-QPY4DUFB.js.map +1 -0
- package/dist/{chunk-DH4ETVSM.js → chunk-R2YH7NLN.js} +9 -7
- package/dist/{chunk-DH4ETVSM.js.map → chunk-R2YH7NLN.js.map} +1 -1
- package/dist/{chunk-3T6QL7IY.js → chunk-R6IZZSE7.js} +23 -275
- package/dist/chunk-R6IZZSE7.js.map +1 -0
- package/dist/{chunk-DQHWLAUV.js → chunk-TOIE7VXF.js} +2 -2
- package/dist/{chunk-OOGTG5FM.js → chunk-UXLGIGSX.js} +56 -2
- package/dist/chunk-UXLGIGSX.js.map +1 -0
- package/dist/{chunk-GKX2HPZ6.js → chunk-YMPGYEWK.js} +9 -3
- package/dist/chunk-YMPGYEWK.js.map +1 -0
- package/dist/chunk-Z7EY4VHE.js +50 -0
- package/dist/{core-UQXZTBFZ.js → core-3NMNCLFW.js} +8 -5
- package/dist/discovery-AKGA6CJD.js +28 -0
- package/dist/{generate-GP6ZLAQB.js → generate-JAUEHKK7.js} +7 -4
- package/dist/{generate-GP6ZLAQB.js.map → generate-JAUEHKK7.js.map} +1 -1
- package/dist/index.js +15 -11
- package/dist/index.js.map +1 -1
- package/dist/{init-W72WBSU2.js → init-DZQOT54X.js} +6 -4
- package/dist/{init-W72WBSU2.js.map → init-DZQOT54X.js.map} +1 -1
- package/dist/mcp-bin.js +5 -3
- package/dist/mcp-bin.js.map +1 -1
- package/dist/sass.node-4XJK6YBF.js +130708 -0
- package/dist/sass.node-4XJK6YBF.js.map +1 -0
- package/dist/scan-OJRCVKK2.js +15 -0
- package/dist/{service-PVGTYUKX.js → service-CFFBHW4X.js} +6 -4
- package/dist/service-CFFBHW4X.js.map +1 -0
- package/dist/{static-viewer-KILKIVN7.js → static-viewer-VA2JXSCX.js} +6 -4
- package/dist/static-viewer-VA2JXSCX.js.map +1 -0
- package/dist/{test-3YRYQRGV.js → test-O7DZNKDC.js} +8 -4
- package/dist/{test-3YRYQRGV.js.map → test-O7DZNKDC.js.map} +1 -1
- package/dist/{tokens-IXSQHPQK.js → tokens-N7THFD6J.js} +10 -7
- package/dist/{tokens-IXSQHPQK.js.map → tokens-N7THFD6J.js.map} +1 -1
- package/dist/{viewer-K42REJU2.js → viewer-QTR7QJMM.js} +390 -25
- package/dist/viewer-QTR7QJMM.js.map +1 -0
- package/package.json +1 -1
- package/src/build.ts +57 -5
- package/src/core/__tests__/token-resolver.test.ts +82 -0
- package/src/core/token-parser.ts +102 -0
- package/src/core/token-resolver.ts +155 -0
- package/src/service/__tests__/patch-generator.test.ts +2 -2
- package/src/service/patch-generator.ts +8 -1
- package/src/viewer/render-utils.ts +141 -0
- package/src/viewer/vite-plugin.ts +381 -23
- package/dist/chunk-3T6QL7IY.js.map +0 -1
- package/dist/chunk-7KUSBMI4.js.map +0 -1
- package/dist/chunk-GHYYFAQN.js.map +0 -1
- package/dist/chunk-GKX2HPZ6.js.map +0 -1
- package/dist/chunk-OOGTG5FM.js.map +0 -1
- package/dist/scan-V54HWRDY.js +0 -12
- package/dist/viewer-K42REJU2.js.map +0 -1
- /package/dist/{chunk-DQHWLAUV.js.map → chunk-TOIE7VXF.js.map} +0 -0
- /package/dist/{core-UQXZTBFZ.js.map → chunk-Z7EY4VHE.js.map} +0 -0
- /package/dist/{scan-V54HWRDY.js.map → core-3NMNCLFW.js.map} +0 -0
- /package/dist/{service-PVGTYUKX.js.map → discovery-AKGA6CJD.js.map} +0 -0
- /package/dist/{static-viewer-KILKIVN7.js.map → scan-OJRCVKK2.js.map} +0 -0
package/dist/bin.js
CHANGED
|
@@ -9,10 +9,17 @@ import {
|
|
|
9
9
|
validateAll,
|
|
10
10
|
validateCoverage,
|
|
11
11
|
validateSchema
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QPY4DUFB.js";
|
|
13
13
|
import {
|
|
14
14
|
scan
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-R2YH7NLN.js";
|
|
16
|
+
import {
|
|
17
|
+
loadConfig,
|
|
18
|
+
loadFragmentFile
|
|
19
|
+
} from "./chunk-R6IZZSE7.js";
|
|
20
|
+
import {
|
|
21
|
+
discoverFragmentFiles
|
|
22
|
+
} from "./chunk-D34Q6A7S.js";
|
|
16
23
|
import {
|
|
17
24
|
FigmaClient,
|
|
18
25
|
StorageManager,
|
|
@@ -28,18 +35,15 @@ import {
|
|
|
28
35
|
renderAllComponentVariants,
|
|
29
36
|
scanCodebase,
|
|
30
37
|
shutdownSharedPool
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import {
|
|
33
|
-
discoverFragmentFiles,
|
|
34
|
-
loadConfig,
|
|
35
|
-
loadFragmentFile
|
|
36
|
-
} from "./chunk-3T6QL7IY.js";
|
|
38
|
+
} from "./chunk-YMPGYEWK.js";
|
|
37
39
|
import {
|
|
38
40
|
generateContext
|
|
39
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-UXLGIGSX.js";
|
|
42
|
+
import "./chunk-P33AKQJW.js";
|
|
40
43
|
import {
|
|
41
44
|
BRAND
|
|
42
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-EKLMXTWU.js";
|
|
46
|
+
import "./chunk-Z7EY4VHE.js";
|
|
43
47
|
|
|
44
48
|
// src/bin.ts
|
|
45
49
|
import { Command } from "commander";
|
|
@@ -1785,7 +1789,7 @@ ${BRAND.name} Dev Server
|
|
|
1785
1789
|
}
|
|
1786
1790
|
}
|
|
1787
1791
|
}
|
|
1788
|
-
const { createDevServer } = await import("./viewer-
|
|
1792
|
+
const { createDevServer } = await import("./viewer-QTR7QJMM.js");
|
|
1789
1793
|
console.log(pc7.dim("\nStarting dev server..."));
|
|
1790
1794
|
const parsedPort = typeof port === "string" ? parseInt(port, 10) : port;
|
|
1791
1795
|
try {
|
|
@@ -5550,7 +5554,7 @@ Make sure the dev server is running: ${BRAND.cliCommand} dev`));
|
|
|
5550
5554
|
});
|
|
5551
5555
|
program.command("view").description(`Generate a static HTML viewer for ${BRAND.outFile}`).option("-i, --input <path>", `Path to ${BRAND.outFile}`, BRAND.outFile).option("-o, --output <path>", "Output HTML file path", BRAND.viewerHtmlFile).option("--open", "Open in browser after generation").action(async (options) => {
|
|
5552
5556
|
try {
|
|
5553
|
-
const { generateViewerFromJson } = await import("./static-viewer-
|
|
5557
|
+
const { generateViewerFromJson } = await import("./static-viewer-VA2JXSCX.js");
|
|
5554
5558
|
const fs2 = await import("fs/promises");
|
|
5555
5559
|
const path = await import("path");
|
|
5556
5560
|
const inputPath = path.resolve(process.cwd(), options.input);
|
|
@@ -5598,7 +5602,7 @@ program.command("add").argument("[name]", 'Component name (e.g., "Button", "Text
|
|
|
5598
5602
|
});
|
|
5599
5603
|
program.command("init").description("Initialize fragments in a project (interactive by default)").option("--force", "Overwrite existing config").option("-y, --yes", "Non-interactive mode - auto-detect and use defaults").action(async (options) => {
|
|
5600
5604
|
try {
|
|
5601
|
-
const { init } = await import("./init-
|
|
5605
|
+
const { init } = await import("./init-DZQOT54X.js");
|
|
5602
5606
|
const result = await init({
|
|
5603
5607
|
projectRoot: process.cwd(),
|
|
5604
5608
|
force: options.force,
|
|
@@ -5618,7 +5622,7 @@ program.command("init").description("Initialize fragments in a project (interact
|
|
|
5618
5622
|
});
|
|
5619
5623
|
program.command("tokens").description("Discover and list design tokens from CSS/SCSS files").option("-c, --config <path>", "Path to config file").option("--json", "Output as JSON").option("--categories", "Group tokens by category").option("--theme <theme>", "Filter by theme name").option("--category <category>", "Filter by category (color, spacing, typography, etc.)").option("--verbose", "Show all tokens (no truncation)").action(async (options) => {
|
|
5620
5624
|
try {
|
|
5621
|
-
const { tokens } = await import("./tokens-
|
|
5625
|
+
const { tokens } = await import("./tokens-N7THFD6J.js");
|
|
5622
5626
|
const result = await tokens({
|
|
5623
5627
|
config: options.config,
|
|
5624
5628
|
json: options.json,
|
|
@@ -5637,7 +5641,7 @@ program.command("tokens").description("Discover and list design tokens from CSS/
|
|
|
5637
5641
|
});
|
|
5638
5642
|
program.command("generate").description("Generate fragment files from component source code").argument("[component]", "Specific component name to generate (optional)").option("--force", "Overwrite existing fragment files").option("--pattern <glob>", "Pattern for component files", "src/components/**/*.tsx").action(async (component, options) => {
|
|
5639
5643
|
try {
|
|
5640
|
-
const { generate } = await import("./generate-
|
|
5644
|
+
const { generate } = await import("./generate-JAUEHKK7.js");
|
|
5641
5645
|
const result = await generate({
|
|
5642
5646
|
projectRoot: process.cwd(),
|
|
5643
5647
|
component,
|
|
@@ -5664,7 +5668,7 @@ program.command("graph").description("Query the component relationship graph").a
|
|
|
5664
5668
|
program.command("test").description("Run interaction tests for fragments with play functions").option("-c, --config <path>", "Path to config file").option("--component <name>", "Filter by component name").option("--tags <tags>", "Filter by tags (comma-separated)").option("--grep <pattern>", "Filter by variant name pattern").option("--exclude <pattern>", "Exclude tests matching pattern").option("--parallel <count>", "Number of parallel browser contexts", parseInt, 4).option("--timeout <ms>", "Timeout per test in milliseconds", parseInt, 3e4).option("--retries <count>", "Number of retries for failed tests", parseInt, 0).option("--bail", "Stop on first failure").option("--browser <name>", "Browser to use (chromium, firefox, webkit)", "chromium").option("--headed", "Run in headed mode (show browser)").option("--a11y", "Run accessibility checks with axe-core").option("--visual", "Capture screenshots for visual regression").option("--update-snapshots", "Update visual snapshots").option("--watch", "Watch mode - re-run on file changes").option("--reporters <names>", "Reporters to use (console, junit, json)", "console").option("-o, --output <dir>", "Output directory for results", "./test-results").option("--server-url <url>", "URL of running dev server (skips starting server)").option("-p, --port <port>", "Port for dev server", parseInt, 6006).option("--ci", "CI mode - non-interactive, exit with code 1 on failure").option("--list", "List available tests without running them").action(async (options) => {
|
|
5665
5669
|
try {
|
|
5666
5670
|
const { config, configDir } = await loadConfig(options.config);
|
|
5667
|
-
const { runTestCommand, listTests } = await import("./test-
|
|
5671
|
+
const { runTestCommand, listTests } = await import("./test-O7DZNKDC.js");
|
|
5668
5672
|
if (options.list) {
|
|
5669
5673
|
await listTests(config, configDir, {
|
|
5670
5674
|
component: options.component,
|