@syncline-design/cli 0.1.0-sandbox.53 → 0.1.0-sandbox.54
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 +18 -13
- package/bin.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/{run-Cr3o-ltQ.js → run-Bx68LVYw.js} +2085 -2058
package/README.md
CHANGED
|
@@ -48,13 +48,14 @@ with the old paths needs the same one-word change.
|
|
|
48
48
|
|
|
49
49
|
## Options
|
|
50
50
|
|
|
51
|
-
| Option
|
|
52
|
-
|
|
|
53
|
-
| `--config <file>`
|
|
54
|
-
| `--cwd <dir>`
|
|
55
|
-
| `--check`
|
|
56
|
-
| `--verbose`
|
|
57
|
-
| `--
|
|
51
|
+
| Option | |
|
|
52
|
+
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
53
|
+
| `--config <file>` | Config file (default `syncline.config.json`; every setting has a default, so no file is needed) |
|
|
54
|
+
| `--cwd <dir>` | Project root (default: the current directory) |
|
|
55
|
+
| `--check` | Drift check for CI: nothing is written; exit 1 if the output differs from what is on disk |
|
|
56
|
+
| `--verbose` | List every warning instead of a per-phase count |
|
|
57
|
+
| `--overwrite-stories` | For this run only, rewrite stories files that already exist so they get the proposed `play()` stories (replaces hand edits to those files; the config is untouched) |
|
|
58
|
+
| `--accept <path>` | After a merge conflict you resolved by hand: keep the file and record the new base (repeatable) |
|
|
58
59
|
|
|
59
60
|
Warnings are design feedback (for example a fill that is not bound to a Figma
|
|
60
61
|
variable), never failures.
|
|
@@ -101,7 +102,7 @@ Every key is optional; this is the full shape with its defaults. The Figma plugi
|
|
|
101
102
|
"sendSource": false, // required with llm: the conflicting files' source is sent to the bridge
|
|
102
103
|
},
|
|
103
104
|
"enrichStories": {
|
|
104
|
-
"enabled":
|
|
105
|
+
"enabled": true, // part of generating stories; the plan decides at run time (paid), false opts out
|
|
105
106
|
"verify": true, // run each proposed story (jsdom, your Vitest) and write only the ones that pass
|
|
106
107
|
},
|
|
107
108
|
"theme": {
|
|
@@ -247,16 +248,19 @@ credentials or the paid plan just reports the conflicts.
|
|
|
247
248
|
|
|
248
249
|
## AI-proposed stories (`enrichStories`)
|
|
249
250
|
|
|
250
|
-
|
|
251
|
-
stories
|
|
252
|
-
|
|
251
|
+
Proposing extra stories with `play()` interaction tests is part of generating
|
|
252
|
+
the stories (`enrichStories.enabled` is on by default; `false` opts out). It is a
|
|
253
|
+
paid feature and the plan decides at run time: on an account without it the bridge
|
|
254
|
+
says no, the CLI prints why and writes the plain stories, so an upgrade needs no
|
|
255
|
+
config change. The CLI asks for every component that has no stories file yet. **Only facts leave the repo**: prop names and closed option lists, and
|
|
253
256
|
the roles and texts a story can act on; no source code. The model's answer is
|
|
254
257
|
data that the CLI validates against the real component (props, options and
|
|
255
258
|
targets must exist) before it renders the `play()` with `storybook/test`, so
|
|
256
259
|
whatever the model gets wrong is dropped, not written. Answers are cached in
|
|
257
260
|
`.syncline/stories.enriched.json` (commit it), `--check` and `--no-enrich` never
|
|
258
261
|
call the bridge, and a run without a bridge, credentials or the paid plan just
|
|
259
|
-
writes the plain stories. An existing stories file is never rewritten
|
|
262
|
+
writes the plain stories. An existing stories file is never rewritten, unless you
|
|
263
|
+
run `syncline generate --overwrite-stories` once to upgrade the files you already have.
|
|
260
264
|
|
|
261
265
|
**Every proposed story is run before it is written** (`enrichStories.verify`, on
|
|
262
266
|
by default). The model cannot know what a component really does, and in a first
|
|
@@ -265,7 +269,8 @@ the project, runs them headless with the project's own Vitest (jsdom, your
|
|
|
265
269
|
`vite.config.*` and `.storybook/preview`, Storybook's portable stories), keeps
|
|
266
270
|
the ones that pass and records the rest, with the reason, under `rejected` in the
|
|
267
271
|
cache, so a re-run does not ask again. It needs `vitest`, `jsdom` and
|
|
268
|
-
`@storybook/react` in the project
|
|
272
|
+
`@storybook/react` in the project (the dependency check lists them, and
|
|
273
|
+
`dependencies.install` adds them); without them nothing is written and the run
|
|
269
274
|
says why. Set `verify` to `false` to write the proposals unchecked.
|
|
270
275
|
|
|
271
276
|
## Fonts
|
package/bin.js
CHANGED
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, C as t, D as n, E as r, O as i, S as a, T as o, _ as s, a as c, b as l, c as u, d, f, g as p, h as m, i as h, k as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T, v as E, w as D, x as O, y as k } from "./run-
|
|
1
|
+
import { A as e, C as t, D as n, E as r, O as i, S as a, T as o, _ as s, a as c, b as l, c as u, d, f, g as p, h as m, i as h, k as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T, v as E, w as D, x as O, y as k } from "./run-Bx68LVYw.js";
|
|
2
2
|
import { join as A } from "node:path";
|
|
3
3
|
//#region src/stories/project-step.ts
|
|
4
4
|
async function j(n) {
|