@blotout/qinto-cli 0.1.16 → 0.1.17

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
@@ -263,8 +263,19 @@ goes caller → the site worker's broker → callee, each app in its own worker.
263
263
  apps are mounted; a `private` one is refused with `403 forbidden` until you approve it under **App-to-app approvals** on the
264
264
  callee's page, exactly as a site manager does on a deployed site.
265
265
 
266
+ **An app you call but do not have is mocked for you.** When a mounted app's `rpc.calls` names a slug nothing mounts, `dev`
267
+ scaffolds `mocks/<slug>.ts` inside the calling app — one exported function per function it exposes — and mounts it under that
268
+ slug. `ctx.apps.call('resend', 'send', args)` then takes the real path: caller → broker → the mock's own worker, with no `if` in
269
+ your code and nothing to change when the real app arrives beside you.
270
+
271
+ If you are logged in, the mock is typed: `dev` fetches the app's published rpc contract, writes it next to the stub as
272
+ `mocks/<slug>.rpc.json`, generates `mocks/<slug>.types.ts` from it, and the platform validates every call and result against it —
273
+ so a mock that lies about its shape fails locally the way the real app would. Commit all three files; the sidecar keeps the mock
274
+ typed offline and for anyone else who checks the app out. Without a contract (not logged in, or the app is unpublished) the stub
275
+ takes and returns `unknown` and the terminal says why.
276
+
266
277
  An app folder added or removed while `dev` is running is not picked up — it says so and asks for a restart. A save inside a
267
- mounted app rebuilds that app alone.
278
+ mounted app rebuilds that app and every mock alongside it.
268
279
 
269
280
  Declared `server.schedules` fire on their own while `dev` runs — at the cron's minute, in UTC, with `scheduledTime` set to that
270
281
  instant, exactly as the deployed sweep dispatches them. Each schedule on the app's console page also has a **Run now** button,
@@ -532,7 +543,7 @@ digest is what the version is finalized against. Every field and option is docum
532
543
  | `variables` | Up to 32 per-install settings a team fills in — `plain` or `secret`, `text`/`password`/`toggle`. |
533
544
  | `appVariables` | Up to 16 settings you fill in once for the whole app with `qinto app var set` / `qinto app secret set`. |
534
545
  | `endpoints` | Up to 16 HTTP routes served at `https://<site>/app/<slug><path>`. |
535
- | `rpc` | Functions this app `exposes` to other apps, and the ones it `calls` on them. |
546
+ | `rpc` | Functions this app `exposes` to other apps, and the ones it `calls` on them. Each exposed one is built with `defineRpc`, and publish uploads its argument and result schemas as the version's contract. |
536
547
  | `events` | The push topics this app broadcasts to every app on the site. |
537
548
  | `ui` | `dir` holding the built panel, and the `build` command that produces it. |
538
549
  | `install` | `multiple: true` to let a site install the app more than once, plus a `labelHint`. |