Layout CLI 0.4.2
Version 0.4.2 of the Layout CLI is out. Update with npm i -g @layoutplatforms/cli. layout --version prints yours.
What changed
layout webhooks add <https url> [--events <a,b>] [--name <name>]adds an endpoint, for every event unless you name some. Layout sends itendpoint.verificationand turns it on when it answers 2xx. If it does not, the endpoint is added but off, and the command exits 1 withendpoint_not_verifiedand thesubscriptionIdon stderr, or 6 when Layout could not send the verification yet.layout webhooks remove <id> --yesremoves one. Both work while the application is not approved, and are refused with exit code 4 once it is: an endpoint has no environment, so one added to an application under review also receives its live events once it is approved. The console still adds and removes endpoints at any time. A CLI session's capabilities now includewebhooks:sandbox.layout webhooks listshows the sandbox signing secret as its prefix and last four, such aswhsec_...wxyz. Add--show-secretto print it whole. With--json,signingSecretMaskedsays which you got.--apptakes an application's id or a name only one application has. A name several applications share exits 2 and lists them; an unknown name exits 5. With--json, every error that asks you to pick an application carriesapps, each withid,nameandstatus.layout init --appworks the same way.layout usagelists every sandbox allowance and rateGET /v1/usagelists, with today's use, and says whether each counts for the application or for your developer account. With--json, whendailyis there it no longer carries the oldersandboxandliveblocks.layout test-orderalso runstest_place_needs_choices,test_place_needs_location,test_place_pickup_laterandtest_place_delivery_far. Aprice_changedrefusal is its own step with the old and new totals, and the JSONordercarriesconfirmedTotalMinor.layout listensays on stderr when Layout cannot start recording for the run, and asks again every 10 seconds;recordsWithoutEndpointis false until it does. Ctrl-C stops it at once.- A
405fromlayout apiexits with code 2. The update notice is shown on stderr also when no terminal is attached, never with--json.
What to do
If a script reads the signing secret from layout webhooks list --json, add --show-secret. If a script reads usage.sandbox or usage.live from layout usage --json, read usage.daily instead. See Commands.
Breaking changes
layout webhooks listmasks the signing secret unless you add--show-secret, in--jsontoo.layout usage --jsonno longer carries thesandboxandliveblocks whendailyis there.- A
405fromlayout apinow exits 2, where it was 1.