@samebase/alchemy-convex 0.14.0 → 0.15.0

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
@@ -283,6 +283,24 @@ call.
283
283
  as the build inputs `["src/**", "public/**", "vite.config.ts"]`. A minted key for a command
284
284
  has every action, because the command can do more than a push.
285
285
 
286
+ - `Convex.HubClient`: `{ team, app, redirectUri, deploymentType, clientName, softwareVersion? }`
287
+ registers one deployment as a client of the identity hub of the team. The hub is in the base of the
288
+ team, the production deployment of the project `samebase`. The resource finds it by name and runs
289
+ its internal function `identityBroker:registerClient` with a short-lived key, so the stack needs no
290
+ other credential and no hub address. The first client of an `app` creates the app. Outputs
291
+ `issuer`, `clientId`, `clientSecret`, `redirectUri`, `deploymentType`, and `clientName`, which the
292
+ `env` of the `Convex.Deployment` writes to the deployment. Another `redirectUri` is a new client, and
293
+ a destroy deletes the client.
294
+
295
+ A development deployment has no stack, so the package has a command for it. Run it in the directory
296
+ of the app, before the first push: it registers the deployment of that directory with
297
+ `CONVEX_ACCESS_TOKEN` or the Convex CLI login, and writes `HUB_ISSUER`, `HUB_CLIENT_ID`, and
298
+ `HUB_CLIENT_SECRET` to it. A deployment with all three variables keeps them.
299
+
300
+ ```sh
301
+ npx alchemy-convex hub-client --team my-team --app scout --callback-path /auth/hub/callback
302
+ ```
303
+
286
304
  ## Data safety
287
305
 
288
306
  - `Convex.Project` and `Convex.Deployment` have the removal policy `retain`. `alchemy destroy`