@blotout/qinto-cli 0.1.14 → 0.1.16

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
@@ -128,6 +128,48 @@ qinto app publish --site example.com # …and install it on a site
128
128
  qinto app status my-app --site example.com # desired vs deployed state
129
129
  ```
130
130
 
131
+ ### Get a developer organization
132
+
133
+ **A team is not an organization.** A team owns sites and installs apps; an organization owns the apps you write. Membership in a
134
+ team — even as its owner — gives you nothing in any organization, and switching the active team does not change that. Until your
135
+ account belongs to an organization, `qinto app register` refuses with one of:
136
+
137
+ ```
138
+ This credential has no organizations. Log in with `qinto login` first.
139
+ Organization <name> is not available to this credential.
140
+ ```
141
+
142
+ Neither is fixed by logging in again. `qinto whoami` says which case you are in — it prints an `Organizations:` block listing each
143
+ organization and your role in it, and prints no such block when you belong to none.
144
+
145
+ **The CLI cannot create an organization; the Qinto platform does.** Open it in a browser and click **Developer** in the sidebar,
146
+ or go straight to the Developer area:
147
+
148
+ | Environment | Developer area |
149
+ | --- | --- |
150
+ | `production` | `https://portal.qinto.io/developer` |
151
+ | `sandbox` | `https://portal.qinto.tech/developer` |
152
+
153
+ **Opening that page is the whole step.** The first visit creates a personal organization named after your email address and makes
154
+ you its owner — nothing is approved, granted, or provisioned by anyone else. Use the organization switcher at the top of the
155
+ Developer sidebar to rename it, or **Create organization** to add another (one per customer or product, say).
156
+
157
+ To publish under an organization that already exists — a company's, rather than your own — one of its owners invites you under
158
+ **Developer → Organization members** and you accept the emailed link. An organization cannot be joined by naming its id.
159
+
160
+ Back in the terminal the organization appears immediately: the CLI reads it from the API on every call, so **no new login is
161
+ needed**. Pass it by id or name with `--org`.
162
+
163
+ ```sh
164
+ qinto whoami # confirm the Organizations block now lists it
165
+ qinto app register ./my-app --org "Acme Inc."
166
+ ```
167
+
168
+ If `whoami` still lists no organization when you know you belong to one, the login is too narrow rather than the organization
169
+ missing: your account identity needs the `profile` scope and every `qinto app` command needs `developer`. A plain `qinto login`
170
+ requests both, a login narrowed with `--scopes` may not, and `whoami` names it — `Authenticated with an OAuth token without the
171
+ profile scope.` Run `qinto login --reauthorize` and grant them.
172
+
131
173
  ### Scaffold — `qinto app create [dir]`
132
174
 
133
175
  Asks for the app name, proposes a slug derived from it that you confirm or replace, and asks which template to start from. It
@@ -168,8 +210,9 @@ declares only its build tooling.
168
210
 
169
211
  ### Register — `qinto app register [dir]`
170
212
 
171
- Registers the slug under an organization. `create --register` calls it for you; run it directly to register an app you scaffolded
172
- earlier or wrote by hand. The slug is immutable and unique inside the organization.
213
+ Registers the slug under an organization — see [Get a developer organization](#get-a-developer-organization) when you have none.
214
+ `create --register` calls it for you; run it directly to register an app you scaffolded earlier or wrote by hand. The slug is
215
+ immutable and unique inside the organization.
173
216
 
174
217
  The slug, name, and description come from `qinto.app.jsonc` — the one in `dir`, or the one in the current directory when you pass
175
218
  no `dir`. Pass `--slug`, `--name`, and `--description` only for an app that has no manifest yet; alongside a manifest they are
@@ -268,6 +311,7 @@ are namespaced by its slug, so two apps declaring a `d1` called `ledger` get a d
268
311
  | `--reset` | Discard this directory's local installs, variables, secrets and stored data first. |
269
312
  | `--tunnel` | Expose the site worker on a fresh `trycloudflare.com` hostname, so a vendor webhook can reach its endpoints. |
270
313
  | `--tunnel-name <name>` | Expose it through this named Cloudflare Tunnel instead, for a hostname that survives a restart. |
314
+ | `--tunnel-hours <hours>` | Close the tunnel after this many hours, instead of leaving it open until `app dev` stops. |
271
315
  | `--no-input` | Disable all interactive prompts, mounting every app found. |
272
316
 
273
317
  All four listeners bind `127.0.0.1` only.
@@ -300,9 +344,16 @@ register with the vendor and keeps the loopback one beside it for `curl`.
300
344
 
301
345
  `cloudflared` is downloaded and cached on first use, unless you already have one on `PATH` or at `CLOUDFLARED_PATH`.
302
346
 
303
- **The tunnel closes after an hour.** It is a public door onto your machine, and an `app dev` left running overnight would hold it
304
- open until you noticed. `dev` says how long is left every ten minutes; press `a` then Enter to add an hour, up to three hours from
305
- now. When it closes, the public URL stops being advertised and the loopback one carries on.
347
+ **The tunnel closes when `app dev` does.** It is a public door onto your machine, so quitting `dev` is what shuts it: there is no
348
+ separate clock, and a session left running overnight holds the door open until you stop it. Cloudflare places no limit of its own,
349
+ so a named tunnel will happily run for days.
350
+
351
+ **`--tunnel-hours <hours>` closes it earlier.** Give it a deadline and `dev` says how long is left every ten minutes; press `a`
352
+ then Enter to add an hour, as often as you like. When it closes, the public URL stops being advertised and the loopback one
353
+ carries on. Fractions work, so `--tunnel-hours 0.5` is half an hour. Nothing caps the number.
354
+
355
+ For a run measured in days, use `--tunnel-name`. Cloudflare gives `trycloudflare.com` no uptime guarantee and caps it at 200
356
+ in-flight requests, so a quick tunnel is a debug aid rather than something to leave up over a weekend.
306
357
 
307
358
  **A hostname that survives a restart — `--tunnel-name <name>`.** A quick tunnel is free and needs no account, but its hostname is
308
359
  new on every run, so a vendor has to be told the new one each time. A named tunnel keeps one hostname. `dev` reads it from **your