lecodes-cli 0.1.2 → 0.1.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/README.md CHANGED
@@ -35,7 +35,7 @@ lecodes preview > app.js # compile the local project to JS
35
35
  | `pull` | Overwrite local files with the project's current remote state. `--force` to discard local edits. |
36
36
  | `push` | Push all local changes as **one** new checkpoint. `-m`/`--message` for the message, `--force` to override the "server moved on" guard. |
37
37
  | `preview` | Compile the local project to a single JS bundle, printed to **stdout** (pipeable). `-o`/`--out <file>` to write a file, `--entry <path>` to override the entrypoint, `--no-header` to omit the metadata header, `--public-url <url>` for the asset URL prefix. Diagnostics go to stderr. |
38
- | `render` | Render the local **UI** project. 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). `--width`/`--height` set the viewport (default 390×844). Requires the optional `lecodes-render` package (`npm i -D lecodes-render`); PNG also needs `@napi-rs/canvas`. 3D scenes aren't rendered. |
38
+ | `render` | Render the local **UI** project. 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). `--width`/`--height` set the viewport (default 390×844). Requires the optional `lecodes-renderer` package (`npm i -D lecodes-renderer`); PNG also needs `@napi-rs/canvas`. 3D scenes aren't rendered. |
39
39
 
40
40
  ## How it works
41
41
 
package/dist/index.js CHANGED
@@ -871,9 +871,9 @@ var render = async (args) => {
871
871
  }
872
872
  let renderer;
873
873
  try {
874
- renderer = await import("lecodes-render");
874
+ renderer = await import("lecodes-renderer/headless");
875
875
  } catch {
876
- throw new CliError("The renderer isn't installed. Run: npm i -D lecodes-render");
876
+ throw new CliError("The renderer isn't installed. Run: npm i -D lecodes-renderer");
877
877
  }
878
878
  const width = Number(flagStr(args, "width")) || 390;
879
879
  const height = Number(flagStr(args, "height")) || 844;
@@ -1054,7 +1054,7 @@ ${c.bold("Commands:")}
1054
1054
  --no-header omit the metadata header
1055
1055
  --public-url <url> asset URL prefix (default: the API origin)
1056
1056
  render Render the local UI project to a semantic JSON description
1057
- (needs the optional 'lecodes-render' package; UI projects only)
1057
+ (needs the optional 'lecodes-renderer' package; UI projects only)
1058
1058
  -o, --out <file> write JSON to a file instead of stdout
1059
1059
  --png [file] rasterize a PNG (default screenshot.png;
1060
1060
  needs @napi-rs/canvas)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lecodes-cli",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Clone, edit and push LeCodes projects from your machine.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "scripts": {
23
23
  "vendor-runtime": "bun scripts/vendor-runtime.ts",
24
- "build": "bun scripts/vendor-runtime.ts && bun build src/index.ts --target=node --outfile dist/index.js --external esbuild --external lecodes-render --banner=\"#!/usr/bin/env node\"",
24
+ "build": "bun scripts/vendor-runtime.ts && bun build src/index.ts --target=node --outfile dist/index.js --external esbuild --external lecodes-renderer --banner=\"#!/usr/bin/env node\"",
25
25
  "typecheck": "tsc --noEmit",
26
26
  "dev": "bun run src/index.ts",
27
27
  "prepublishOnly": "bun run build"
@@ -30,14 +30,14 @@
30
30
  "esbuild": "^0.27.3"
31
31
  },
32
32
  "peerDependencies": {
33
- "lecodes-render": "*"
33
+ "lecodes-renderer": "^0.1.0"
34
34
  },
35
35
  "peerDependenciesMeta": {
36
- "lecodes-render": {
36
+ "lecodes-renderer": {
37
37
  "optional": true
38
38
  }
39
39
  },
40
40
  "devDependencies": {
41
- "lecodes-render": "workspace:*"
41
+ "lecodes-renderer": "workspace:*"
42
42
  }
43
43
  }