@plitzi/cli 0.38.13 → 0.38.15
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/CHANGELOG.md +253 -0
- package/README.md +47 -9
- package/dist/index.js +7070 -879
- package/package.json +3 -3
- package/skills/plitzi-cli/SKILL.md +3 -2
- package/skills/plitzi-cli/reference/functions.md +2 -1
- package/skills/plitzi-cli/reference/plugins.md +3 -1
- package/skills/plitzi-cli/reference/projects.md +8 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/cli",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.15",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"description": "Command line for Plitzi: scaffold a project that renders a space, a plugin package, or an element of your own.",
|
|
6
6
|
"files": [
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
},
|
|
22
22
|
"sideEffects": false,
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@plitzi/sdk-authoring": "0.38.
|
|
24
|
+
"@plitzi/sdk-authoring": "0.38.15",
|
|
25
25
|
"chalk": "^6.0.1",
|
|
26
26
|
"commander": "^15.0.0",
|
|
27
27
|
"esbuild": "^0.28.2",
|
|
28
28
|
"fflate": "^0.8.3"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@plitzi/sdk-shared": "0.38.
|
|
31
|
+
"@plitzi/sdk-shared": "0.38.15",
|
|
32
32
|
"@types/node": "^26.6.4",
|
|
33
33
|
"eslint": "^9.39.5",
|
|
34
34
|
"eslint-plugin-import": "^2.32.0",
|
|
@@ -22,10 +22,11 @@ npx plitzi element where hero-cta # where the code writes
|
|
|
22
22
|
npx plitzi element edit hero-cta --set content="Hi" # an attribute written there, checked
|
|
23
23
|
npx plitzi element remove ent-trust # an element taken out, with what only it used
|
|
24
24
|
npx plitzi element move ent-faq --before ent-pricing # an element put elsewhere among its siblings
|
|
25
|
-
npx plitzi verify # left passing? author, lints, types, format, pages
|
|
25
|
+
npx plitzi verify # left passing? author, lints, types, tests, format, pages
|
|
26
26
|
npx plitzi page check -- /about --width 1440,390 # whether a page is whole, in text
|
|
27
|
-
npx plitzi explain navigate # what a name means: element, step, code, any export
|
|
27
|
+
npx plitzi explain navigate # what a name means: element, step, code, any @plitzi export
|
|
28
28
|
npx plitzi doctor # whether the project is whole; --fix the simple parts
|
|
29
|
+
npx plitzi cert # HTTPS for a phone on the Wi-Fi (with HOST=0.0.0.0)
|
|
29
30
|
npx plitzi upgrade # the project up to this CLI (--write)
|
|
30
31
|
npx plitzi feedback # a report to Plitzi, for the person to send as a link
|
|
31
32
|
```
|
|
@@ -17,7 +17,8 @@ A space's own server code — TypeScript tasks its actions run as steps, and rou
|
|
|
17
17
|
nothing to the space. Credentials are `PLITZI_CREDENTIALS={"stripe":{"apiKey":"…"}}` in `.env` — what `dev` and the
|
|
18
18
|
project's own server hand `ctx.fetch({ credential })`; in the cloud, the space's Credentials.
|
|
19
19
|
- **An action that only runs one task** is `taskAction(tasks.make, { trigger: { type: 'call', access: 'public' } })`
|
|
20
|
-
(`@plitzi/sdk-authoring`): its input is the task's params, its id `<namespace>-<action
|
|
20
|
+
(`@plitzi/sdk-authoring`): its input is the task's params, its id `<namespace>-<action>` — and a plugin runs it typed by
|
|
21
|
+
both, `useServerAction<typeof make>(make.id)`: one operation is one task, never a `case` in one route. A param says what it
|
|
21
22
|
takes — `required`, `maxLength`, `min`/`max` — and a call outside it is refused with the reason before `run`;
|
|
22
23
|
`ctx.rateLimit('make', { most: 5, perSeconds: 600, refuse: 'Wait ten minutes' })` refuses over the limit alike.
|
|
23
24
|
- **A run gets 100 ms of CPU and 10 s.** A task that needs more asks with `limits: { cpuMs, wallMs }` (or
|
|
@@ -14,7 +14,9 @@ plitzi plugin add ticker --prop interval:number=5000 --prop paused:boolean --tri
|
|
|
14
14
|
|
|
15
15
|
**Say its shape and it is written in it**: `--prop name:type=default` (string, number, boolean; `list`/`json` for data
|
|
16
16
|
a binding fills) per attribute — typed, bindable, with a control in its panel; `--trigger onTick:count` per event and
|
|
17
|
-
what a flow reads, fired with `usePluginTrigger(declaration)` — `fire('onTick', { count })`, typed
|
|
17
|
+
what a flow reads, fired with `usePluginTrigger(declaration)` — `fire('onTick', { count })`, typed, and read by
|
|
18
|
+
naming the step: `[named('tick', on('onTick')), …({ value: '{{ tick.count }}' })]`; `--callback reset` per action a
|
|
19
|
+
flow calls; `--headless`
|
|
18
20
|
for one with nothing to see. Without them it writes a counter showing the three ways an element talks to a space.
|
|
19
21
|
|
|
20
22
|
Each is a folder (`src/plugins/SeatPicker/` in a project `create` wrote):
|
|
@@ -13,6 +13,7 @@ What a project gives you, so you use it rather than rebuild it:
|
|
|
13
13
|
| --- | --- |
|
|
14
14
|
| `start` | serve it — in client mode Vite, which hot-replaces on save. The server prints only what goes wrong; `-- --verbose` adds every request |
|
|
15
15
|
| `start:dev` | server mode: restarted on a save to its code; a plugin is swapped in the open page. Options in `src/config/serverOptions.ts`, actions in `src/actions/`; `plitzi/` is the CLI's, never edit it |
|
|
16
|
+
| `start:dev-inspect` | `start:dev` with Node's inspector on 127.0.0.1:9229, for a debugger to attach to the server |
|
|
16
17
|
| `author` | author `src/space/`: every problem at once (file:line, what to change), then the suggestions (`[suggest]`: a shorter way to the same page, the most elements saved first); `-- --json` for a tool |
|
|
17
18
|
| `lint:space` | how `src/space/` is written, at file:line, and authoring's suggestions; `-- --max-warnings 0`. On purpose: `// plitzi-lint-disable-next-line <code> -- why` (a suggestion: `quiet` on its element) |
|
|
18
19
|
| `npx plitzi space fix` | what `author` reports that has one fix, as a diff of your source; `--write` writes it, formatted, and keeps it only if the space then authors with it gone and nothing new |
|
|
@@ -24,7 +25,13 @@ What a project gives you, so you use it rather than rebuild it:
|
|
|
24
25
|
| `typecheck`, `lint`, `format` | before calling a change done |
|
|
25
26
|
|
|
26
27
|
**Which port.** `start` takes 8080, or the next free one — printed, and written to `tmp/dev-server.json` for `check`,
|
|
27
|
-
`shot` and `visual
|
|
28
|
+
`shot`, `verify` and `visual`, with the scheme it answers on (`https` once it serves a certificate; the local one is
|
|
29
|
+
accepted on this machine only). `PORT` chooses one (a taken one is then an error). `/health` answers with the space's
|
|
30
|
+
name.
|
|
31
|
+
|
|
32
|
+
**On a phone.** `HOST=0.0.0.0` in `.env` opens it to the network, and `plitzi cert` serves it over HTTPS (mkcert;
|
|
33
|
+
`TLS_CERT`, `TLS_KEY`) — over http a phone's browser gives the page no microphone, camera or clipboard. Ask before
|
|
34
|
+
either: the first lets anyone on that network open it, the second trusts an authority on the machine (its password).
|
|
28
35
|
|
|
29
36
|
Data with no backend, server mode: `src/data/*.json`, never served — a provider with `runtime: 'server'` and `query:
|
|
30
37
|
'/data/x.json'` reads it on the server. Client mode: `public/data/`, fetched — public. Learn a file's fields with
|