@blotout/qinto-cli 0.1.16 → 0.1.18

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
@@ -147,7 +147,7 @@ or go straight to the Developer area:
147
147
 
148
148
  | Environment | Developer area |
149
149
  | --- | --- |
150
- | `production` | `https://portal.qinto.io/developer` |
150
+ | `production` | `https://platform.blotout.io/developer` |
151
151
  | `sandbox` | `https://portal.qinto.tech/developer` |
152
152
 
153
153
  **Opening that page is the whole step.** The first visit creates a personal organization named after your email address and makes
@@ -263,13 +263,32 @@ 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,
271
282
  so you never wait for the window.
272
283
 
284
+ Declared `server.hooks.onLifecycle` hooks fire on the same transitions the platform announces: `installed` when you install the
285
+ app or add an install — and on the first boot of a dev root, which seeds the app installed — `enabled` and `disabled` when
286
+ you switch the app or an install, `configurationChanged` when install or app variables change, from the console or the panel,
287
+ and `uninstalled` when you remove an install or uninstall the app. Each goes out once the worker holds the new state, in
288
+ per-install sequence order. `versionChanged` never fires locally, because a dev build has one version. Like a deployed hook,
289
+ a failing one rolls nothing back: the change stays saved and the console, or the terminal at boot, names the hook that failed.
290
+ To run `installed` again on an existing dev root, uninstall and install the app.
291
+
273
292
  Three surfaces, one per side of the product:
274
293
 
275
294
  - **The console** is the platform's side. A team and the site `dev.localhost` are seeded for you; every mounted app is listed
@@ -284,7 +303,7 @@ Three surfaces, one per side of the product:
284
303
  `track`, `identify`, `consent`, `alias`, `getSession` — then shows which app bundles `q.js` carried and which installs
285
304
  activated. Its **Visitor** panel shows the browser's anon id, the one to paste into the ID graph page, and the person id
286
305
  once `identify` links one. Its **Events** panel has a button for each of the eleven standard events in
287
- [the standard events reference](https://docs.qinto.io): selecting one loads its documented payload into an editable box,
306
+ [the standard events reference](https://docs.blotout.io): selecting one loads its documented payload into an editable box,
288
307
  and **Track it** sends whatever is in it, so you can fire the real shape or your own. Every event reaches your hooks;
289
308
  only one carrying a numeric `value` and a non-empty `orderId` — `Purchase`, among the standard ones — is also recorded as a
290
309
  conversion in the identity graph.
@@ -516,7 +535,7 @@ can cancel it — an organization owner unwedges an abandoned draft with `--forc
516
535
 
517
536
  `qinto.app.jsonc` is the app: it is JSONC (comments and trailing commas allowed), it is validated before every publish, and its
518
537
  digest is what the version is finalized against. Every field and option is documented in
519
- [the manifest reference](https://docs.qinto.io); the summary:
538
+ [the manifest reference](https://docs.blotout.io); the summary:
520
539
 
521
540
  | Field | What it declares |
522
541
  | --- | --- |
@@ -524,7 +543,7 @@ digest is what the version is finalized against. Every field and option is docum
524
543
  | `slug`, `name`, `description` | Identity. `slug` is immutable and must match the registered app. |
525
544
  | `flows` | `transform`, `destination`, or both. |
526
545
  | `consent` | The single consent category a visitor must have granted before events reach the app. |
527
- | `legal` | `termsUrl` and `privacyUrl` — HTTPS, and your own documents, never a `qinto.io` URL. |
546
+ | `legal` | `termsUrl` and `privacyUrl` — HTTPS, and your own documents, never a Qinto platform URL. |
528
547
  | `server` | `entry` plus the event and advisory lifecycle hooks the entry exports. |
529
548
  | `browser` | `entry` for the bundle inside the site's `q.js`, optional capture names, and action types whose browser handlers return a same-event server result. |
530
549
  | `capabilities` | The platform `api` calls and the event `data` the app is allowed to read. |
@@ -532,7 +551,7 @@ digest is what the version is finalized against. Every field and option is docum
532
551
  | `variables` | Up to 32 per-install settings a team fills in — `plain` or `secret`, `text`/`password`/`toggle`. |
533
552
  | `appVariables` | Up to 16 settings you fill in once for the whole app with `qinto app var set` / `qinto app secret set`. |
534
553
  | `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. |
554
+ | `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
555
  | `events` | The push topics this app broadcasts to every app on the site. |
537
556
  | `ui` | `dir` holding the built panel, and the `build` command that produces it. |
538
557
  | `install` | `multiple: true` to let a site install the app more than once, plus a `labelHint`. |
@@ -541,7 +560,7 @@ Limits worth knowing before a publish: the server bundle is capped at 10 MB, the
541
560
  one site together), the UI panel at 200 files and 25 MB, and an app at 15 installs per site. A variable value is capped at 256
542
561
  serialized bytes, and one variable's values across every install of that app on a site must fit in 5 KB. Every other cap — the
543
562
  manifest, the publish, the install, and the runtime envelope — is listed in
544
- [Qinto app limits](https://docs.qinto.io).
563
+ [Qinto app limits](https://docs.blotout.io).
545
564
 
546
565
  ## Built for humans and agents alike
547
566
 
@@ -563,7 +582,7 @@ Qinto runs in two environments, and every command talks to exactly one of them:
563
582
 
564
583
  | Environment | API origin | Platform |
565
584
  | --- | --- | --- |
566
- | `production` | `https://api.qinto.io` | `https://portal.qinto.io` |
585
+ | `production` | `https://qinto-api.blotout.io` | `https://platform.blotout.io` |
567
586
  | `sandbox` | `https://api.qinto.tech` | `https://portal.qinto.tech` |
568
587
 
569
588
  `qinto env` picks one and remembers it, so nothing after it needs a flag: