Layout CLI 0.5.0
Version 0.5.0 of the Layout CLI is out. Update with npm i -g @layoutplatforms/cli. layout --version prints yours.
What changed
layout checkgrades your integration from the last 24 hours of sandbox. Each check that does not pass says what to do. It exits 0 when nothing failed and 1 otherwise.--forward-to <url>sends your webhook handler four test events, signed with your sandbox signing secret or with--secret <whsec>. Without it the webhook handler check fails.--no-webhooksskips the webhook handler check, for an integration that readsGET /v1/orders.--since <30m|2h>grades a shorter window, up to24h.- Confirms with a code and Confirms again after price_changed grade an order built with
"simulate": "code"and one built with"simulate": "price_changed". layout listen --secret <whsec>, at least 16 characters, signs with that secret instead of a new one each run. Pass the same one tolayout check --secret.- Every POST
layout apiandlayout test-ordersend carries anIdempotency-Keystartingcli-unless you give one, andcheckleaves out the test people those carts were built for. layout test-order --place <placeId> [--simulate <ending>] [--latency <realistic|instant>]runs a whole sandbox order at a real restaurant, ordering the first item on the menu Layout holds.
What to do
Run layout check --forward-to <your webhook URL>, or layout check --no-webhooks, until every check passes. See Check your integration.
Breaking changes
None.