@fragments-sdk/cli 0.7.3 → 0.7.4
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/README.md +2 -0
- package/dist/bin.js +13 -9
- package/dist/bin.js.map +1 -1
- package/dist/{chunk-D34Q6A7S.js → chunk-AWYCDRPG.js} +8 -2
- package/dist/chunk-AWYCDRPG.js.map +1 -0
- package/dist/{chunk-R2YH7NLN.js → chunk-NEJ2FBTN.js} +2 -2
- package/dist/{chunk-QPY4DUFB.js → chunk-S56I5FST.js} +2 -2
- package/dist/{discovery-AKGA6CJD.js → discovery-Z4RDDFVR.js} +2 -2
- package/dist/{generate-JAUEHKK7.js → generate-23VLX7QN.js} +2 -2
- package/dist/index.js +2 -2
- package/dist/{init-DZQOT54X.js → init-VYVYMVHH.js} +6 -4
- package/dist/{init-DZQOT54X.js.map → init-VYVYMVHH.js.map} +1 -1
- package/dist/{scan-OJRCVKK2.js → scan-FZR6YVI5.js} +3 -3
- package/dist/{test-O7DZNKDC.js → test-VTD7R6G2.js} +2 -2
- package/dist/{tokens-N7THFD6J.js → tokens-7JA5CPDL.js} +2 -2
- package/dist/{viewer-QTR7QJMM.js → viewer-WXTDDQGK.js} +16 -4
- package/dist/viewer-WXTDDQGK.js.map +1 -0
- package/package.json +5 -1
- package/src/commands/init.ts +6 -2
- package/src/core/discovery.ts +7 -1
- package/src/migrate/detect.ts +4 -0
- package/src/viewer/components/App.tsx +63 -2
- package/src/viewer/components/Layout.tsx +1 -1
- package/src/viewer/components/LeftSidebar.tsx +35 -77
- package/src/viewer/preview-frame.html +1 -1
- package/src/viewer/styles/globals.css +2 -1
- package/src/viewer/vite-plugin.ts +18 -1
- package/dist/chunk-D34Q6A7S.js.map +0 -1
- package/dist/viewer-QTR7QJMM.js.map +0 -1
- /package/dist/{chunk-R2YH7NLN.js.map → chunk-NEJ2FBTN.js.map} +0 -0
- /package/dist/{chunk-QPY4DUFB.js.map → chunk-S56I5FST.js.map} +0 -0
- /package/dist/{discovery-AKGA6CJD.js.map → discovery-Z4RDDFVR.js.map} +0 -0
- /package/dist/{generate-JAUEHKK7.js.map → generate-23VLX7QN.js.map} +0 -0
- /package/dist/{scan-OJRCVKK2.js.map → scan-FZR6YVI5.js.map} +0 -0
- /package/dist/{test-O7DZNKDC.js.map → test-VTD7R6G2.js.map} +0 -0
- /package/dist/{tokens-N7THFD6J.js.map → tokens-7JA5CPDL.js.map} +0 -0
package/README.md
CHANGED
package/dist/bin.js
CHANGED
|
@@ -9,17 +9,17 @@ import {
|
|
|
9
9
|
validateAll,
|
|
10
10
|
validateCoverage,
|
|
11
11
|
validateSchema
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-S56I5FST.js";
|
|
13
13
|
import {
|
|
14
14
|
scan
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-NEJ2FBTN.js";
|
|
16
16
|
import {
|
|
17
17
|
loadConfig,
|
|
18
18
|
loadFragmentFile
|
|
19
19
|
} from "./chunk-R6IZZSE7.js";
|
|
20
20
|
import {
|
|
21
21
|
discoverFragmentFiles
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-AWYCDRPG.js";
|
|
23
23
|
import {
|
|
24
24
|
FigmaClient,
|
|
25
25
|
StorageManager,
|
|
@@ -1624,7 +1624,11 @@ async function discoverStoryFiles(projectRoot, patterns) {
|
|
|
1624
1624
|
"**/node_modules/**",
|
|
1625
1625
|
"**/dist/**",
|
|
1626
1626
|
"**/build/**",
|
|
1627
|
-
"**/.storybook/**"
|
|
1627
|
+
"**/.storybook/**",
|
|
1628
|
+
"**/*.test.stories.*",
|
|
1629
|
+
"**/*.stories.test.*",
|
|
1630
|
+
"**/*.test.story.*",
|
|
1631
|
+
"**/*.story.test.*"
|
|
1628
1632
|
]
|
|
1629
1633
|
});
|
|
1630
1634
|
return files.sort();
|
|
@@ -1789,7 +1793,7 @@ ${BRAND.name} Dev Server
|
|
|
1789
1793
|
}
|
|
1790
1794
|
}
|
|
1791
1795
|
}
|
|
1792
|
-
const { createDevServer } = await import("./viewer-
|
|
1796
|
+
const { createDevServer } = await import("./viewer-WXTDDQGK.js");
|
|
1793
1797
|
console.log(pc7.dim("\nStarting dev server..."));
|
|
1794
1798
|
const parsedPort = typeof port === "string" ? parseInt(port, 10) : port;
|
|
1795
1799
|
try {
|
|
@@ -5602,7 +5606,7 @@ program.command("add").argument("[name]", 'Component name (e.g., "Button", "Text
|
|
|
5602
5606
|
});
|
|
5603
5607
|
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) => {
|
|
5604
5608
|
try {
|
|
5605
|
-
const { init } = await import("./init-
|
|
5609
|
+
const { init } = await import("./init-VYVYMVHH.js");
|
|
5606
5610
|
const result = await init({
|
|
5607
5611
|
projectRoot: process.cwd(),
|
|
5608
5612
|
force: options.force,
|
|
@@ -5622,7 +5626,7 @@ program.command("init").description("Initialize fragments in a project (interact
|
|
|
5622
5626
|
});
|
|
5623
5627
|
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) => {
|
|
5624
5628
|
try {
|
|
5625
|
-
const { tokens } = await import("./tokens-
|
|
5629
|
+
const { tokens } = await import("./tokens-7JA5CPDL.js");
|
|
5626
5630
|
const result = await tokens({
|
|
5627
5631
|
config: options.config,
|
|
5628
5632
|
json: options.json,
|
|
@@ -5641,7 +5645,7 @@ program.command("tokens").description("Discover and list design tokens from CSS/
|
|
|
5641
5645
|
});
|
|
5642
5646
|
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) => {
|
|
5643
5647
|
try {
|
|
5644
|
-
const { generate } = await import("./generate-
|
|
5648
|
+
const { generate } = await import("./generate-23VLX7QN.js");
|
|
5645
5649
|
const result = await generate({
|
|
5646
5650
|
projectRoot: process.cwd(),
|
|
5647
5651
|
component,
|
|
@@ -5668,7 +5672,7 @@ program.command("graph").description("Query the component relationship graph").a
|
|
|
5668
5672
|
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) => {
|
|
5669
5673
|
try {
|
|
5670
5674
|
const { config, configDir } = await loadConfig(options.config);
|
|
5671
|
-
const { runTestCommand, listTests } = await import("./test-
|
|
5675
|
+
const { runTestCommand, listTests } = await import("./test-VTD7R6G2.js");
|
|
5672
5676
|
if (options.list) {
|
|
5673
5677
|
await listTests(config, configDir, {
|
|
5674
5678
|
component: options.component,
|