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 +16 -8
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
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
|
|
317
|
-
request for it is answered with the same 404
|
|
318
|
-
|
|
319
|
-
|
|
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
|
-
|
|
325
|
-
|
|
326
|
-
|
|
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,
|
|
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.
|
|
762
|
+
const CLI_VERSION = "0.6.0";
|
|
763
763
|
//#endregion
|
|
764
764
|
//#region src/prompt.ts
|
|
765
765
|
/**
|