lecodes-cli 0.10.2 → 0.10.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 +1 -0
- package/dist/index.js +480 -69
- package/package.json +1 -1
- package/runtime/sdk/inject.ts +1 -0
- package/runtime/sdk/plugins/push.ts +132 -0
- package/runtime/sdk/runtime/app.ts +13 -0
- package/runtime/sdk/runtime/channel.ts +14 -3
- package/runtime/sdk/runtime/service.ts +1 -1
- package/runtime/sdk/ui/NativeView.ts +1 -1
- package/runtime/sdk/ui/UIVirtualizedList.ts +7 -1
- package/runtime/sdk/ui/UIWidget.ts +2 -1
- package/runtime/sdk-types.json +1 -1
package/README.md
CHANGED
|
@@ -66,6 +66,7 @@ lecodes push -m "Tweak the menu" # push as a new checkpoint
|
|
|
66
66
|
| `design snapshot [screen…]` | Render design screens headless (needs `lecodes-renderer`). One screen → semantic JSON to stdout; otherwise JSON files in `design/.snapshots/`; `--png` also rasterizes PNGs (needs `@napi-rs/canvas`); `--out-dir <dir>`, `--logs`. |
|
|
67
67
|
| `scene [path]` | **LeCodes Scene Editor** — visually edit a `.scene.ts` 3D scene (needs the optional `lecodes-3d-editor` package). Works inside a cloned project **or standalone in any folder**. Starts a local editor server + browser app: a scene tree, a per-node inspector, and a move/rotate/scale gizmo; add mesh/light/camera/model/aspect nodes; edits are written straight back to the `.scene.ts`, and external (IDE) edits hot-reload over SSE. Registers an MCP server in `.mcp.json` so Claude Code can call `scene_state` (scenes + models + aspect classes with field hints) and `check_scene` (compile status) — `--no-mcp` to skip. `path` is a folder or a `.scene.ts` to host (default: the current folder / enclosing project). `--port <n>` (default 4488), `--no-open`. |
|
|
68
68
|
| `render` | Render the local project (**UI + 2D**). By default emits a semantic JSON description (great for AI/automated checks) to stdout or `-o`/`--out <file>`; `--png [file]` rasterizes a PNG (default `screenshot.png`, `--scale <n>` for DPR). A creator-2d scene is composited **under** the UI; `--time <ms>` advances its physics/animation. `asset('./x.png')` resources (images, sprite textures) load from the local working tree by default — use `--remote-assets` (or an explicit `--public-url`) to fetch them from the server instead (which then needs `--wait-network`). `--width`/`--height` set the viewport (default 390×844). Requires the optional `lecodes-renderer` package (`npm i -D lecodes-renderer@^0.2.0`); PNG also needs `@napi-rs/canvas`. 3D scenes aren't rendered. |
|
|
69
|
+
| `pn` | **Push notifications** for the project (`pn send` / `pn devices` / `pn keys`). `pn send --title "Order shipped" --user u42` sends through the le.codes relay **on your login — no push key needed to test** (`--to <pa_…>` targets addresses instead; `--body`, `--url`, `--badge`, `--data '{…}'` fill the payload; comma-separate multiple targets). `pn devices` lists the devices that actually called `Push.register()` — the first thing to check when a notification doesn't arrive (`--user <id>` to filter). `pn keys` manages the `lecodes_pk_…` keys you deploy in **your own server's** env: the server generates them, so `pn keys new [name]` prints the value exactly once — `--env` writes it straight into `.env` as `LECODES_PUSH_KEY` and gitignores the file. `pn keys revoke <id>` deletes one (owner only for both). |
|
|
69
70
|
| `types [dir]` | Re-materialize the IDE type surface (`.lecodes/types/` + `tsconfig.json`). Fetches `GET /api/types` from the server by default — so a project scaffolded offline by `init` picks up the SDK the platform actually runs — falling back to the copy bundled in this CLI when the server is unreachable. `--local` to use that bundled copy outright (fully offline), `--check` to report drift without writing (exits non-zero when stale — handy in CI), `--api <url>` for the server. IDE-only: the compiler always uses the SDK vendored in the CLI, and the command warns when the two disagree. |
|
|
70
71
|
|
|
71
72
|
## How it works
|