Skip to content

Floorplan 0.11.0

Latest

Choose a tag to compare

@haydenschmitty haydenschmitty released this 18 Nov 04:37
  • Serverless Framework endpoints are on the map: a backend whose endpoints are declared in serverless.yml rather than in code showed none, so the website's requests to it weren't connected and Health skipped its sign-in check. Endpoints now come from each function's http and httpApi events (path and method, any and *, and the short http: GET /orders form) in serverless.yml, serverless-*.yml and serverless_*.yml, including function lists split across files included with ${file(./functions.yml)}. Each endpoint sits in the file its handler: names (src/orders.create is create in src/orders.ts), followed through a file that re-exports it, or into another file's function when the handler only passes the request on to it ((event) => withEvent(event, options, orders.create)). Health counts an authorizer, private: true (an API key) or a sign-in check handed to the wrapper as protecting an endpoint, and still reads the handler for a check of its own. CloudFormation tags (!Ref, !GetAtt, !Sub), ${opt:…} and ${self:…} variables and anchors are read without trouble, and the scan summary lists schedules, queues, streams and other background functions for a worker node. Sample configs in test folders add no endpoints. Reported and fixed by @ShehanEk in #131 and #132.
  • Supabase Edge Functions are on the map: an app whose server code lives in Supabase Edge Functions showed no endpoints, so the website's calls to them weren't connected and Health's sign-in check had nothing to look at. Now each folder under supabase/functions/ is an endpoint at /functions/v1/<name> (Deno.serve, or serve() from Deno's standard library), placed on the line that serves it, and a function with a router of its own (Hono and the like) shows that router's endpoints under /functions/v1. Folders starting with _, like _shared, aren't functions. The website's supabase.functions.invoke('send-invite') calls (a POST unless their options give another method) and requests to ${SUPABASE_URL}/functions/v1/send-invite reach them. Health reads each function's own code for a sign-in check, such as supabase.auth.getUser(); Supabase's verify_jwt setting doesn't count as one, because the public anon key the website ships passes it. Reported by @jstncrwn in #54.
  • Plain PHP sites get their pages as endpoints: a PHP site without a framework answers each request with the script at that address, which Floorplan didn't read as an endpoint, so its pages showed none and the website's requests to them (fetch('/orders/save.php')) weren't connected. Now each script under the document root (public/, public_html/, www/ or htdocs/) is an endpoint at its own address, with an index.php at its folder's. Scripts that other scripts include, and folders starting with _ or a dot, aren't pages, and a document root whose index.php loads Composer's autoloader (Laravel, Symfony, Slim) is left to that framework. Health doesn't judge their sign-in yet. Asked for by @maccydee in #12, with the document-root rule from their #13.
  • Requests reach the right endpoint again when part of the address is filled in: since 0.10.0, a request like fetch(`/api/users/${user.id}`, { method: "PATCH" }) could be linked to a fixed endpoint beside the right one, GET /api/users/stripe, instead of PATCH /api/users/[userId]. Learning a client's base address (new in 0.10.0) let looser matches under that base back in beside the best one. Now the best matches under the base come first, and a looser one only stands in when none of them is under it. The request's method is also read from its options when they start on the lines below the address, as they usually do with fetch, where before it counted as a read.
  • Placeholders in other languages are not secrets: Health knew "your key here" and "change me" only in English, so a value like SECRET_KEY: troque-esta-chave-2024 or APP_PASSWORD="sua_senha_aqui" was reported as a secret written into the code. The same words in Portuguese, Spanish, French and German now mark a placeholder too (sua, aqui, troque, defina, tu, cambia, votre, ici, changez, dein, hier and others), as whole words only, so a random key that happens to hold those letters is still found. In database set-up scripts, a psql variable written without a space (PASSWORD:'app_password') and a SQL comment line (-- password = …) no longer count either. Reported by @auroraferraz in #107 and #108 and @jeanlima17-cmd in #110.
  • The map names the program that really answers questions: when another program was installed under the claude command, opening the map printed ASK works: questions run through the Claude Code CLI (devin 3000.11.238). When the program's version names something else, the line now says so: questions run through devin, found as the claude command. Reported by @fjjjuv in #95, with a first version of the fix by @1oridevs in #97.

Update with claude plugin update floorplan@floorplan.