wawesome 0.5.0 → 0.6.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
@@ -313,17 +313,25 @@ A job on a timer should not also be sitting at a guessable URL where a stranger
313
313
  }
314
314
  ```
315
315
 
316
- A private Function has **no address at all** — not a hidden one, not one behind a credential. A
317
- request for it is answered with the same 404 as a Function that was never deployed, on your App's
318
- own hostname and on the development path form alike. This is how you deploy a job with side effects
319
- without leaving it where a stranger who guesses the slug can fire it.
316
+ A private Function has **no public address at all** in production — not a hidden one, not one
317
+ behind a credential. A request for it against your App's own hostname is answered with the same 404
318
+ as a Function that was never deployed. This is how you deploy a job with side effects without leaving
319
+ it where a stranger who guesses the slug can fire it.
320
320
 
321
321
  Leave the line out and your Function is public, which is what every Function without it has always
322
322
  been.
323
323
 
324
- Today that is all a private Function is: there is no way *in* to one yet. Schedules do not fire yet,
325
- and the authenticated trigger that runs a Function by hand is not built — so make one private when
326
- you want it off the web, and expect to publish it again to call it until those land.
324
+ On your own machine, the local development surface serves Functions regardless of visibility, and
325
+ honours an explicit `x-wawesome-trigger` header so you can exercise a scheduled run by hand:
326
+
327
+ ```bash
328
+ # Exercise a private or scheduled function locally on the development path form:
329
+ curl -X POST http://localhost:3000/x/my-tenant-slug/default-app/nightly-reconcile \
330
+ -H "x-wawesome-trigger: schedule"
331
+ ```
332
+
333
+ Because production strips the reserved header namespace inbound, a request that works locally
334
+ provably cannot work against the Public address.
327
335
 
328
336
  Making a Function private takes nothing but the deploy. Making it public again does not: deleting
329
337
  the line is refused, and the deploy tells you so having written nothing.
@@ -348,7 +356,7 @@ Four headers arrive or leave on it, and the stripping is what makes them worth t
348
356
  | Header | Direction | What it means |
349
357
  | --- | --- | --- |
350
358
  | `x-wawesome-forwarded-prefix` | inbound | The mount that was stripped from the path. Join it to the path you observe to rebuild the caller's URL. |
351
- | `x-wawesome-trigger` | inbound | How this run started: `caller` when someone called your address. A caller cannot forge it, so you may skip your own authorization on anything else and open nothing. |
359
+ | `x-wawesome-trigger` | inbound | How this run started: `caller` when someone called your address, `schedule` when fired by a Schedule. A caller cannot forge it in production (stripped inbound). On the local development surface, pass `x-wawesome-trigger: schedule` to exercise a background run by hand with the collapsed budget. |
352
360
  | `x-wawesome-invocation-id` | outbound | The id of this run — the key to fetch its logs with `npx wawesome logs --invocation <id>`. |
353
361
  | `x-wawesome-error` | outbound | Present only when the platform failed, never when your Function did. Its *absence* means the status on the wire is yours — up to the moment your response is committed, and no further. |
354
362
 
package/dist/index.mjs CHANGED
@@ -759,7 +759,7 @@ async function buildJs(entryInput, options) {
759
759
  * that has to name this version — `--version`, the dependency a scaffolded
760
760
  * project pins — reads it here, so a release bumps one file.
761
761
  */
762
- const CLI_VERSION = "0.5.0";
762
+ const CLI_VERSION = "0.6.0";
763
763
  //#endregion
764
764
  //#region src/prompt.ts
765
765
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wawesome",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "CLI tool for building and deploying serverless functions on wawesome.io platform",
5
5
  "type": "module",
6
6
  "bin": {