@fui-org/fui-cli 1.1.0 → 1.2.1
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 +14 -36
- package/dist/fui.js +196 -186
- package/package.json +5 -8
- package/skills/fui/SKILL.md +2 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fui-org/fui-cli",
|
|
3
|
-
"version": "1.1
|
|
4
|
-
"description": "Token-lean CLI for the FUI low-code platform (
|
|
3
|
+
"version": "1.2.1",
|
|
4
|
+
"description": "Token-lean CLI for the FUI low-code platform (Node.js), successor to Fui MCP",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
7
7
|
"bun",
|
|
@@ -23,9 +23,8 @@
|
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
|
-
"fui": "bun
|
|
27
|
-
"build": "bun build src/bin.ts --target node --minify --
|
|
28
|
-
"build:bin": "bun build --compile --minify src/bin.ts --outfile dist/fui",
|
|
26
|
+
"fui": "bun run build && node dist/fui.js",
|
|
27
|
+
"build": "bun build src/bin.ts --target node --minify --outfile dist/fui.js",
|
|
29
28
|
"prepack": "bun run build",
|
|
30
29
|
"test": "bun test",
|
|
31
30
|
"lint": "oxlint",
|
|
@@ -33,8 +32,7 @@
|
|
|
33
32
|
"format:check": "oxfmt --check",
|
|
34
33
|
"typecheck": "tsc --noEmit",
|
|
35
34
|
"sync:skill": "bun scripts/sync-skill.ts",
|
|
36
|
-
"sync:upstream-tests": "bun scripts/sync-upstream-tests.ts"
|
|
37
|
-
"test:node": "bun run build && FUI_TEST_NODE=1 bun test test/cli.test.ts test/file.test.ts test/log.test.ts test/settings.test.ts test/simulate-last.test.ts"
|
|
35
|
+
"sync:upstream-tests": "bun scripts/sync-upstream-tests.ts"
|
|
38
36
|
},
|
|
39
37
|
"devDependencies": {
|
|
40
38
|
"@fui-org/fui-mcp": "1.4.0",
|
|
@@ -53,7 +51,6 @@
|
|
|
53
51
|
}
|
|
54
52
|
},
|
|
55
53
|
"engines": {
|
|
56
|
-
"bun": ">=1.4.0",
|
|
57
54
|
"node": ">=22"
|
|
58
55
|
}
|
|
59
56
|
}
|
package/skills/fui/SKILL.md
CHANGED
|
@@ -58,7 +58,7 @@ description: Use the `fui` CLI for all FUI (low-code platform) work — projects
|
|
|
58
58
|
- `fui module outline`: the layout tree (grid widths, bindings, actions, dialogs) to confirm the structure is what you meant.
|
|
59
59
|
- `fui module simulate --scenario '[{"click":"Save"},{"assert":"vueData.list.length > 0"}]'`: runs the module in a simulated runtime; exit 1 when an assert fails. `--mocks` wins over live data. An unmocked static API may call the real tAPI when its local `.sql` body reads as read-only (max 8 calls, cached in `_testdata/`). For an existing SP take mocks from `fui sp verify`, never invent them. Keep scenario and mocks in files (`--scenario-file`, `--mocks-file`); `fui module simulate --last` reruns the module's last input (render mode, viewport, files) and re-reads those files. When the scenario changes a lot, pass it inline with `--last --scenario '[...]'`: one command, one step. Add `--brief` (remembered by `--last`) to print only failures, warnings, asserts, stats and screenshot paths.
|
|
60
60
|
- `fui component preview <uc-name> --cases '[{"name":"empty","props":{"items":[]}}]'`: one local `.vue` alone in a real browser; do it before wiring a component in and before publishing a project-scope one.
|
|
61
|
-
- `fui module simulate --render [--device mobile]`: the real page in headless Chromium, last and only for problems that need pixels. Project-level assets come from the server, so publish project files first. It prints screenshot paths: open and read them, then fix what you see. Needs Playwright once: `bun add -g playwright && bunx playwright install chromium
|
|
61
|
+
- `fui module simulate --render [--device mobile]`: the real page in headless Chromium, last and only for problems that need pixels. Project-level assets come from the server, so publish project files first. It prints screenshot paths: open and read them, then fix what you see. Needs Playwright once, installed with the same package manager as fui: `npm install -g playwright && npx playwright install chromium` (or `bun add -g playwright && bunx playwright install chromium`).
|
|
62
62
|
4. Publish:
|
|
63
63
|
- **Whole module, including header/body:** `fui module preview` → show the changes to the user → after approval `fui module publish html --approval <token>`.
|
|
64
64
|
- The token breaks if any payload file changes after the preview.
|
|
@@ -157,7 +157,7 @@ fui query "SELECT TOP 5 ID, Name FROM tblX" --json | jq -r '.[].Name'
|
|
|
157
157
|
|
|
158
158
|
```bash
|
|
159
159
|
printf %s "$TOKEN" | fui db add docs -p lhu-docs --token - --api-domain tapi.lhu.edu.vn --user-token-env UT
|
|
160
|
-
fui db add local -p demo --conn-env
|
|
160
|
+
fui db add local -p demo --conn-env SQLITE_URL # sqlite:// connects directly (MSSQL goes through tAPI)
|
|
161
161
|
fui db default lhu-docs/docs
|
|
162
162
|
fui db test --db lhu-docs/docs
|
|
163
163
|
fui token decode --db lhu-docs/docs # never shows the password
|