@pikku/lambda 0.12.10 → 0.12.12

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/CHANGELOG.md DELETED
@@ -1,679 +0,0 @@
1
- ## 0.12.10
2
-
3
- ### Patch Changes
4
-
5
- - 3a83f85: Stop re-exporting package internals through entry points
6
-
7
- 66 names reached consumers only because an `export *` in an entry point swept
8
- them up. Each one is referenced solely inside its own package, so the star is
9
- now an explicit named re-export listing what is genuinely public. The
10
- declarations themselves are untouched — this narrows the entry point, not the
11
- module.
12
-
13
- - Updated dependencies [9687ad1]
14
- - Updated dependencies [2d21628]
15
- - Updated dependencies [985b87b]
16
- - Updated dependencies [3a83f85]
17
- - @pikku/core@0.12.87
18
-
19
- ## 0.12.9
20
-
21
- ### Patch Changes
22
-
23
- - 266e3bc: One door per name: `@pikku/core/ecosystem/*` and the package root are gone
24
-
25
- `@pikku/core` published every module twice. `ecosystem/http` re-exported
26
- `./http`, `ecosystem/services` re-exported `./services`, and a name was
27
- reachable through either — so every addition had to be made in two places, and a
28
- consumer's import said nothing about what it actually used. The package root was
29
- the same problem at a larger scale: a single barrel of 206 names that no bundler
30
- could take apart, and the one specifier that revealed nothing at all.
31
-
32
- Both are deleted. Every name now lives on the subpath that owns it, and every
33
- import carries that subpath — `@pikku/core/http`, `@pikku/core/services`,
34
- `@pikku/core/errors`, `@pikku/core/types`.
35
-
36
- Deleting the facades meant the raw subpaths had to become a superset of them,
37
- which they were not: the facade tree had accumulated 25 names with no raw home
38
- and about 26 more filed under a different area than the module they came from.
39
- Those names moved to the area that owns them, and three areas were published as
40
- new entry points rather than left on a root that is going away — `./types` (the
41
- shared type surface, the largest single destination), `./state` and
42
- `./classification`.
43
-
44
- `./classification` is one door onto one subject: what a value is and how it must
45
- be handled. Its three halves would each have been an entry point — the brands
46
- and manifest types, the stored-form helpers (`hashToken`, `unsafeAsSealed` and
47
- friends), and `SecretValue` — split by whether a name happens to be a type or a
48
- value, which is the same defect as the facades. The duration and versioned-id
49
- helpers went to `./utils`, which already published, and `PikkuRequest` went to
50
- `./function`: it is the transport-agnostic request base, not an HTTP one — HTTP
51
- has `PikkuHTTPAbstractRequest`, and the only thing outside core that extends
52
- `PikkuRequest` is Azure's timer request.
53
-
54
- `./types` inherited the root barrel's habit before it inherited its contents, so
55
- the names with an owner elsewhere were moved off it. The middleware types and the
56
- five middleware factories — `pikkuMiddleware`, `pikkuMiddlewareFactory`,
57
- `pikkuChannelMiddleware`, `pikkuChannelMiddlewareFactory` and
58
- `pikkuAgentMiddleware`, runtime values on a types entry point — are now
59
- `@pikku/core/middleware`; the function meta types are `@pikku/core/function`;
60
- `SerializedError` is `@pikku/core/errors`; and the generic TypeScript helpers
61
- (`MakeRequired`, `PickRequired`, `PickOptional`, `RequireAtLeastOne`,
62
- `JSONPrimitive`, `JSONValue`) are `@pikku/core/utils`. What is left on `./types`
63
- is the vocabulary the wirings share, which no single module owns.
64
-
65
- `pikku` was itself a root barrel — `export * from '@pikku/core'` — and
66
- now exports only the services it bundles.
67
-
68
- One module survives at the old specifier, and only for the bootstrap:
69
- `packages/cli` is generated by the _published_ CLI pinned in its `build.sh`, and
70
- that CLI still writes a bare `@pikku/core` into the files it generates for the
71
- CLI itself. `bootstrap-compat/root.ts` carries the eight types it names, a test
72
- in core fails if that list grows, and it goes when the pin moves to a CLI
73
- released from this branch. The adapter names the pinned CLI reaches for —
74
- `pikkuState` and `CreateWireServices` — are rewritten to `@pikku/core/state` and
75
- `@pikku/core/types` by the same `build.sh` patch pass, so no second shim is
76
- needed for them.
77
-
78
- A guard test keeps the root shut: it parses imports and rejects a bare
79
- `@pikku/core` rather than grepping for it, because several tests hold a user's
80
- file as a template literal, where `import … from '@pikku/core'` is fixture text
81
- rather than an import this repo makes.
82
-
83
- An agent scaffold a project generated under an older CLI is refreshed rather
84
- than left to fail: `pikku all` already deleted one importing an entry point
85
- `@pikku/core` no longer publishes, and the `#pikku` hub joins that list.
86
- Without it a project that scaffolds the agent endpoint but
87
- declares no agents keeps the old file forever — the generator that would rewrite
88
- it only runs when agents exist, and the file being present is what stops it
89
- being regenerated as missing.
90
-
91
- `pikku new addon` also wrote a tsconfig `paths` map naming only the deleted hub.
92
- An addon's `imports` map points into `dist`, so `paths` is what resolves
93
- `#pikku/<leaf>` for the addon's own source build — it now names the two leaf
94
- patterns, in both the addon and its test harness.
95
-
96
- - 6eef0a0: Bump every dependency to its latest compatible minor/patch across the monorepo.
97
- - Updated dependencies [7722ceb]
98
- - Updated dependencies [375c1ff]
99
- - Updated dependencies [02a70cd]
100
- - Updated dependencies [aeef159]
101
- - Updated dependencies [a281de6]
102
- - Updated dependencies [266e3bc]
103
- - Updated dependencies [02a70cd]
104
- - Updated dependencies [786dae5]
105
- - Updated dependencies [6eef0a0]
106
- - Updated dependencies [3561d67]
107
- - Updated dependencies [a91c433]
108
- - Updated dependencies [02a70cd]
109
- - Updated dependencies [9537f74]
110
- - Updated dependencies [2b57ca8]
111
- - Updated dependencies [266e3bc]
112
- - Updated dependencies [9fce0f1]
113
- - Updated dependencies [83683a0]
114
- - Updated dependencies [456c88b]
115
- - Updated dependencies [456c88b]
116
- - Updated dependencies [c127273]
117
- - @pikku/core@0.12.85
118
-
119
- ## 0.12.8
120
-
121
- ### Patch Changes
122
-
123
- - 6794681: Publish the ecosystem surface as per-area sub-barrels under `@pikku/core/ecosystem/*`, and point generated code, the CLI, the inspector and the runtime adapters at them.
124
-
125
- 348 names that only generated code, the toolchain or a runtime adapter ever imports now have a second home on `@pikku/core/ecosystem/<area>` — one sub-barrel per area, matching how core already publishes its entrypoints, so no single barrel grows without bound and a consumer only pulls in the area it uses.
126
-
127
- This step is additive: every name is still exported from the entrypoint it was published from before, so nothing downstream breaks. Removing them from the app-facing barrels is a later change, and needs a release carrying `./ecosystem/*` first.
128
-
129
- - Updated dependencies [7406bfe]
130
- - Updated dependencies [6794681]
131
- - @pikku/core@0.12.84
132
-
133
- ## 0.12.7
134
-
135
- ### Patch Changes
136
-
137
- - fd9d834: Stop publishing internals that only their own package or file used. The declarations stay; only the entrypoint re-export is removed, so nothing that imported a name from where it is declared is affected.
138
- - Updated dependencies [063f43a]
139
- - Updated dependencies [ce66bf8]
140
- - Updated dependencies [d0307a8]
141
- - Updated dependencies [ce66bf8]
142
- - Updated dependencies [3ad2131]
143
- - Updated dependencies [b930dca]
144
- - Updated dependencies [b95e77d]
145
- - Updated dependencies [fd9d834]
146
- - Updated dependencies [8978fbd]
147
- - @pikku/core@0.12.82
148
-
149
- ## 0.12.6
150
-
151
- ### Patch Changes
152
-
153
- - afef587: Close eleven security weaknesses found in a review of `@pikku/core`. Most are
154
- breaking, and two invalidate data or credentials already in the wild — read the
155
- migration notes before upgrading.
156
-
157
- **Breaking: AI agent thread ownership now fails closed.** Reading, listing,
158
- resuming or approving an existing thread or run requires a resolved session
159
- principal (`userId`, or `orgId` for `sessionScope: 'org'`), regardless of the
160
- agent's `auth` setting. Previously a request without a session had no ownership
161
- model at all: the caller-supplied `resourceId` was accepted as the ownership
162
- key, so any caller could read or resume another party's thread by naming its
163
- `resourceId`. Worse, `threadOwnerConstraint` returned `undefined` for a
164
- sessionless caller, and `undefined` means _no filter_ rather than _no rows_ —
165
- so `getAgentThreads` returned every thread in the deployment. It now returns
166
- `string[]`, empty for a sessionless caller, which every storage backend already
167
- treats as matching nothing. Sessionless agents still run one-shot conversations,
168
- each with a fresh unguessable owner; what they lose is cross-request continuity.
169
- Wire a session to restore it.
170
-
171
- **Breaking: stored secrets and credentials must be re-entered.** `deriveKey` ran
172
- a single unsalted round of SHA-256 over the passphrase and used the digest
173
- directly as the AES-GCM key — roughly one hash per brute-force guess, with one
174
- rainbow table working against every deployment. It is now PBKDF2-HMAC-SHA256 at
175
- 600,000 iterations over a random salt. There is no compatibility path: every
176
- value held by the kysely, mongodb and redis secret services and the kysely
177
- credential service becomes undecryptable. They fail loud, naming the key and
178
- `key_version`, so the app hard-fails on first secret read until each is re-set.
179
-
180
- The KEK salt is scoped to the key version and stored alongside it, rather than
181
- per secret, so a bulk read costs one derivation instead of N — `getSecrets` over
182
- 50 secrets went from ~2.3s to ~48ms, and rotation from ~4.6s to ~94ms. This adds
183
- a salt table (kysely), hash field (redis) or collection (mongodb), created
184
- automatically on first use.
185
-
186
- **Breaking: `PIKKU_REMOTE_SECRET` must be at least 32 characters.** The
187
- remote-RPC session envelope moved from PBKDF2 to HKDF, which expands
188
- high-entropy key material rather than stretching a low-entropy passphrase. That
189
- took a remote hop from ~269ms to ~0.4ms — PBKDF2 was running twice per request —
190
- but HKDF supplies no brute-force resistance, so the secret must carry the
191
- entropy itself. A shorter secret now throws `WeakKeyMaterialError` at both ends.
192
- Generate one with `openssl rand -base64 32` and roll it out to every service in
193
- the mesh together: existing bearer tokens are format-incompatible, so a partial
194
- rollout produces 401s until every instance is updated. The Cloudflare, Lambda
195
- and Azure deployment services each hand-rolled a copy of `buildRemoteHeaders`
196
- and now call the shared one, which is what keeps the two sides in step.
197
-
198
- **Breaking: previously signed content URLs stop verifying.** `LocalContent`
199
- signed only `{signedAt, expiresAt, notBefore}`, so a signature proved when a URL
200
- was issued but never what it was issued for — any valid token was a skeleton
201
- key, and swapping the pathname from a public thumbnail to a private document
202
- still verified. The signature now binds the request path. Separately, the
203
- verifier returned "valid" when no JWT service was wired, which is how
204
- `pikku serve` ran: a forged `?signedAt=0&expiresAt=99999999999999` was accepted.
205
- It now rejects with 403, `LocalContent` requires a `JWTService`, and
206
- `pikku serve`/`pikku dev` mint an ephemeral per-process signing key so local
207
- development works without shipping a fail-open path. In-flight signed URLs must
208
- be re-issued.
209
-
210
- **Request body size limits now apply to every adapter.** The `maxBodySize` cap
211
- existed only in `PikkuFetchHTTPRequest`. The real hole was uWebSockets, which
212
- drove `res.onData` itself and concatenated every chunk with no bound and nothing
213
- downstream able to intervene; it now drops chunks past the limit and replies 413
214
- before routing. Fastify delegates to its native `bodyLimit` (set only when
215
- `maxBodySize` is configured, so fastify's stricter 1 MB default is never
216
- loosened), and `PikkuExpressServer` feeds the limit into its body parsers. Two
217
- paths can only reject rather than prevent, and are documented as such:
218
- `express-middleware` mounted on your own app receives an already-parsed body, so
219
- that deployment must bound its own parser; Next server actions bottom out at
220
- `experimental.serverActions.bodySizeLimit`.
221
-
222
- **Breaking: the console addon's privileged functions are gated by default.**
223
- `wireAddon` gains a `scopes` option that applies to every function in the
224
- addon's namespace, and the console scaffold now generates
225
- `wireAddon({ name: 'console', package: '@pikku/addon-console', scopes: ['admin'] })`.
226
- Previously the console's entire privileged surface — around 54 functions
227
- including `credentialGet`, which returns a resolved OAuth token for an arbitrary
228
- `userId`, `updateFunctionBody`, and `installAddon`, which shells out to a
229
- package install — was protected only by an optional host-registered
230
- `addGlobalPermission`. `resolveGlobalPermissions` returns `[]` when none is
231
- registered and permission checking then no-ops, so an app that never registered
232
- one served those functions to anyone, and with the template's default
233
- `scaffold.rpc: "no-auth"` that meant unauthenticated. All of them now return 403
234
- `MissingScopeError` without an `admin`, `admin:*` or `*` scope. **Regenerating
235
- is required** — an app holding an old `console.gen.ts` stays open.
236
- `installAddon` and `installOpenapiAddon` additionally declare their own
237
- `auth: true, scopes: ['admin']`, and `getAgentThreads` now scopes its listing to
238
- the session's own threads unless the caller holds admin.
239
-
240
- Addon scopes are enforced in `runPikkuFunc` rather than at the RPC boundary,
241
- because a wiring can reference an addon function directly — the inspector
242
- records the addon's `packageName` on HTTP, channel, schedule, queue, CLI,
243
- trigger, gateway and MCP wirings — and those paths never call `resolveNamespace`.
244
- Enforcing at the RPC seam would have covered only the `namespace:function` form
245
- while reading as complete.
246
-
247
- **Breaking: `wireAddon`'s `auth` and `tags` now apply on direct wirings too.**
248
- Both were read only by `resolveAddonFunction`, so they had exactly the hole
249
- scopes had: `wireAddon({ name: 'console', package: '@pikku/addon-console', auth:
250
- true, tags: ['admin'] })` gated `rpc('console:credentialGet')` and gated nothing
251
- at all on an HTTP route wired straight to `credentialGet`. A consumer who
252
- reached for the documented way to lock an addon down got a control that was
253
- silently inert on every wiring except one. Both now resolve in `runPikkuFunc`.
254
- `auth` merges as an OR — `auth: false` from an addon is ignored on a direct
255
- wiring, because an addon may require a session the wiring did not but must never
256
- waive one it did. Addon tags resolve to concrete middleware against the **root**
257
- tag groups before the call rather than being folded into the function's
258
- inherited middleware: `addTagMiddleware('admin', …)` is written by the consuming
259
- app and registers under the root package, whereas `combineMiddleware` would look
260
- the tag up under the addon's own `packageName`, where it does not exist.
261
-
262
- One consequence worth naming: an addon that wires `auth: true` and also runs its
263
- own sessionless internal work — a scheduled task or queue worker inside the
264
- addon calling a sibling function — is now gated where it previously was not,
265
- because a bare `rpc('fn')` from inside the addon reaches `runPikkuFunc` with the
266
- addon's `packageName` like any other call. This reverses a decision that
267
- deliberately scoped the gate to the namespaced boundary; that reasoning held
268
- only while the boundary was real, and a direct wiring can enter an addon without
269
- crossing it, so "already inside" is not something the runtime can infer. Such an
270
- addon should carry authorization on the function via
271
- `pikkuFunc({ permissions })`, which has always been enforced on every path. A
272
- follow-up will add execution provenance so an intra-addon call can be
273
- distinguished from an external one and skip the addon-level check; that needs a
274
- marker no caller outside the process can set, which is its own design problem
275
- and does not belong in a security fix.
276
-
277
- **Codegen now warns when an exposed function has no gate (PKU574).** The
278
- generated `POST /rpc/:rpcName` dispatcher forwards to `rpc.exposed`, which
279
- refuses anything without `expose: true` — but nothing checked whether the
280
- target was gated, because a dispatcher cannot know what it dispatches to. The
281
- console shipped ~54 privileged functions through that gap and the toolchain was
282
- silent. The inspector now reports every function that is exposed, sessionless,
283
- and carries no `auth`, `scopes` or `permissions` of its own and none from a
284
- governing `wireAddon`. It is a `warn`, not a critical: `expose: true` on an
285
- ungated sessionless function is correct for a genuinely public endpoint, so it
286
- blocks a build only under `--fail-on-warn`.
287
-
288
- Two pieces of metadata were missing for this to be answerable statically, and
289
- both are now recorded. A `pikkuSessionlessFunc`'s own `auth: true` was read at
290
- runtime but never written to function meta, so a self-gated function was
291
- indistinguishable from an ungated one — `sessionless` carries the baseline, and
292
- `auth` now carries the tightening. And `wireAddon`'s `scopes`, `auth` and `tags`
293
- were not parsed at all: the inspector recorded the addon's `rpcEndpoint` and its
294
- secret, variable and credential overrides, and dropped every one of its gates.
295
- An addon whose gates are not statically knowable is treated as gated, because a
296
- false positive on a correctly-secured addon costs more than the one case it
297
- would catch.
298
-
299
- **Breaking: an application's global permissions now apply inside addons.**
300
- `resolveGlobalPermissions` read only the bucket matching the function's own
301
- package, but the generated `addGlobalPermission` wrapper takes no package
302
- argument and always registers under the root. An app-wide rule like "every
303
- request needs a signed-in user" therefore stopped at the addon boundary, and the
304
- bucket an addon's functions did read was one no host could write to — which is
305
- why the console addon's recommended `addGlobalPermission([isAdmin],
306
- '@pikku/addon-console')` was never a gate anybody could actually install. A
307
- function now resolves the root bucket and its own package's, root first.
308
- Unioning is safe in a way nothing else here would be: globals AND, so adding the
309
- root ones can only tighten. Package buckets stay one-way — a package's globals
310
- never reach root functions, or an installed addon could gate the whole
311
- application. Apps with both a root global and addon-provided functions will see
312
- those functions gated where they previously were not.
313
-
314
- **Codegen now records whether each HTTP route requires a session, and warns
315
- about inert addon tags (PKU575).** Four separate things can demand a session —
316
- the function's `sessionless`, its own `auth`, the route's (or its group's)
317
- `auth`, and the addon it belongs to — and answering "which routes are open?"
318
- meant joining all four by hand and knowing which wins. Each route's meta now
319
- carries the resolved `requiresSession` alongside the route's own `auth`. Scopes
320
- count as requiring one, since they are matched against the session's and fail
321
- closed. Anything not statically knowable resolves to `true`, matching PKU574:
322
- a route that looks stricter than it is costs less than one that looks open and
323
- isn't. Separately, `wireAddon({ tags: ['admin'] })` reads like a gate and is
324
- applied like one right up until no `addTagMiddleware('admin', …)` exists, at
325
- which point it resolves to an empty list and gates nothing; that now warns.
326
- Only addon tags are reported — a tag on a function is as likely to be
327
- organizational, and warning about those would bury the case that matters.
328
-
329
- **Object-shorthand permissions were missing from meta.** The inspector visited
330
- `ts.PropertyAssignment` but not `ts.ShorthandPropertyAssignment`, so
331
- `permissions: { canAdminOrg }` — enforced identically to the longhand form at
332
- runtime, since `verifyPermissions` has a non-array branch — was recorded as _no
333
- permissions at all_. That is the most dangerous direction for meta to be wrong
334
- in: an audit reading it sees an open door where one is shut. It cost this review
335
- a false IDOR report across ~35 billing and org functions before the source
336
- contradicted the metadata.
337
-
338
- **Functions that authorize in their own body can say so.** A webhook receiver
339
- verifying a signature, or a handler redeeming a signed invite, is genuinely
340
- closed while carrying no session, scope or permission — indistinguishable in
341
- meta from one nobody remembered to gate, and so warned about forever by PKU574.
342
- `selfAuthenticated: true` on the function config records the claim and silences
343
- the warning for that function. It is declarative only: nothing at runtime reads
344
- it and it grants nothing. Detection was rejected deliberately — inferring it
345
- from the body means a function that _looks_ like it checks something silences
346
- the warning while checking nothing, and a warning that is usually wrong stops
347
- being read.
348
-
349
- **Breaking: `scaffold.<feature>` is now `boolean | { auth?, path? }`, and `true`
350
- means authenticated.** The old `'auth' | 'no-auth' | false` read like a
351
- starter-file preference while being a live authorization decision, set three
352
- directories from the functions it governed — the shape the console incident
353
- took. A surface now becomes public only by writing `{ auth: false }`, so
354
- omitting a field can never open anything: the failure mode of a forgotten flag
355
- is a locked door. `{ path }` additionally overrides where the file is
356
- generated, which previously could only be set for all features at once via
357
- `pikkuDir`.
358
-
359
- The legacy strings are **refused, not coerced**. `resolveScaffoldFeature` throws
360
- naming the key and its replacement (`"rpc": "no-auth"` → `"rpc": { "auth":
361
- false }`), and it does so at config load, not downstream. An earlier design used
362
- a bare `string` for the output path, under which `"no-auth"` would have parsed
363
- as a file named `no-auth` and every unmigrated config would have silently
364
- produced nonsense; the object form makes any string invalid, so the failure is
365
- loud.
366
-
367
- The collapse is deliberately not uniform in effect. For `rpc` the flag was a
368
- blanket "no anonymous RPC in this app" set on a dispatcher that cannot know what
369
- it dispatches to; for `userAdmin` it was redundant, since the generated
370
- functions are already `pikkuFunc` with `scopes: ['admin:users:list']`. But for
371
- `agent`, `workflow`, `events` and `scenarios` it is the only gate — those
372
- generate real endpoints the app never authors — so `true` keeps them
373
- authenticated rather than opening them as a side effect of a config cleanup.
374
- `webhook` and `remoteRpc` have no auth dimension at all (`serialize-remote-rpc.ts`
375
- hardcodes `auth: false`), so an `{ auth }` on them is ignored. The three
376
- configs in this repo are migrated preserving their current behaviour exactly.
377
-
378
- **Queue job identities are signed.** A job carried the producer's `pikkuUserId`
379
- as a plain string and the worker resolved a session from it with no
380
- verification, so write access to the queue backend was act-as-any-user. The
381
- identity is now `pq1.<claim>.<hmac>`, HMAC-SHA256 over the claim and the
382
- canonicalized job payload, keyed by HKDF expansion of a new
383
- `PIKKU_QUEUE_IDENTITY_SECRET`. Producers opt in by wrapping their queue service
384
- with `SignedQueueService`. This fails safe rather than closed: with no secret
385
- configured the identity is dropped and jobs still process, warning once per
386
- process, so no existing deployment breaks on upgrade — it simply loses queue
387
- identity until the secret is set. The payload rather than the job id is bound
388
- because SQS, Cloudflare Queues, Azure and the in-memory service all mint ids
389
- after `add` returns.
390
-
391
- **Workflow inline state is read from the run record.** `isInline` consulted a
392
- process-local `Map`, while `WorkflowRun.inline` is durable. Any instance that
393
- did not start a run disagreed with the record, so one instance could dispatch a
394
- queued job for a workflow another was already executing in-process. It is now
395
- async and resolves through the durable identity, cached only when a context
396
- already exists so a passive reader allocates nothing. The same `Map` also leaked:
397
- `nextStepKey` fabricated replay state on every step, and `releaseContext`
398
- refused to free anything carrying it, so runs whose steps executed outside a
399
- `beginReplay` bracket — the step-worker queue path — stranded their context and
400
- step state for the process lifetime. Contexts are now released by an explicit
401
- execution counter. Step ordinals reset per execution rather than accumulating
402
- across step-worker invocations in one process, which makes step naming
403
- independent of how work was distributed.
404
-
405
- **Secret reads fail loud in every store.** `MongoDBSecretService.getSecrets`
406
- skipped rows that failed to decrypt, and the redis equivalent dropped every
407
- rejection via `Promise.allSettled`, including the "No KEK available for
408
- key_version N" configuration error. Both now throw, naming the key and its key
409
- version, matching the kysely behaviour. This matters most alongside the KEK
410
- change above: without it, an upgrade surfaces as a partial secrets map and an
411
- opaque downstream failure instead of an error naming the secret to re-enter.
412
-
413
- **A second middleware registration for a pattern no longer erases the first.**
414
- `addHTTPMiddleware`, `addTagMiddleware` and `addChannelMiddleware` groups are
415
- keyed by pattern or tag and held one source file each, so a second file's call
416
- overwrote the first's. Codegen emits its imports from what is stored, so the
417
- losing file was never imported and its middleware never registered — the
418
- runtime composes repeated registrations for a pattern happily, and only codegen
419
- dropped one. Adding an unrelated `addHTTPMiddleware('*', …)` to an app was
420
- enough to silently unregister the generated better-auth session bridge, which
421
- fails open and gives no sign until a request arrives without a session. A group
422
- now carries every registration made for it, and all of them are imported.
423
-
424
- - Updated dependencies [6a307f0]
425
- - Updated dependencies [afef587]
426
- - Updated dependencies [8075f6a]
427
- - @pikku/core@0.12.74
428
-
429
- ## 0.12.5
430
-
431
- ### Patch Changes
432
-
433
- - daec082: Drop Node 22 support — the minimum supported runtime is now Node 24 (LTS).
434
-
435
- Node 22 deadlocks `pikku dev` at `loadUserBootstrap` (tsx `register()` + `require(esm)` cycle handling on node 22.12+), and Node 20 is already below our floor. The `engines.node` requirement is raised to `>=24` across all packages, matching `.nvmrc` and the CI test matrix. Closes #751.
436
-
437
- - Updated dependencies [7b17b14]
438
- - Updated dependencies [daec082]
439
- - Updated dependencies [e0fd352]
440
- - @pikku/core@0.12.58
441
-
442
- ## 0.12.4
443
-
444
- ### Patch Changes
445
-
446
- - 41ce2cb: Upgrade to TypeScript 6 and raise the minimum Node.js version to 22.
447
-
448
- All packages now build against `typescript@^6.0.3` and declare `engines.node >= 22`. Internal tooling (`ts-json-schema-generator`, `zod-to-ts`) was bumped to TypeScript 6-compatible releases.
449
-
450
- - Updated dependencies [41ce2cb]
451
- - @pikku/core@0.12.44
452
-
453
- ## 0.12.0
454
-
455
- ## 0.12.3
456
-
457
- ### Patch Changes
458
-
459
- - e3142ad: Fix OPTIONS method comparison to use uppercase, matching the Fetch API Request.method convention. Previously the CORS preflight handler was dead code.
460
- - 87433f0: Replace full SQS event logging with message count to prevent sensitive data leaking into CloudWatch logs.
461
- - Updated dependencies [e412b4d]
462
- - Updated dependencies [53dc8c8]
463
- - Updated dependencies [0a1cc51]
464
- - Updated dependencies [0a1cc51]
465
- - Updated dependencies [0a1cc51]
466
- - Updated dependencies [0a1cc51]
467
- - Updated dependencies [0a1cc51]
468
- - Updated dependencies [0a1cc51]
469
- - Updated dependencies [0a1cc51]
470
- - Updated dependencies [0a1cc51]
471
- - Updated dependencies [0a1cc51]
472
- - Updated dependencies [8b9b2e9]
473
- - Updated dependencies [8b9b2e9]
474
- - Updated dependencies [b973d44]
475
- - Updated dependencies [8b9b2e9]
476
- - Updated dependencies [8b9b2e9]
477
- - @pikku/core@0.12.9
478
-
479
- ## 0.12.2
480
-
481
- ### Patch Changes
482
-
483
- - 3e04565: chore: update dependencies to latest minor/patch versions
484
- - Updated dependencies [cc4c9e9]
485
- - Updated dependencies [3e04565]
486
- - @pikku/core@0.12.2
487
-
488
- ## 0.12.1
489
-
490
- ### Patch Changes
491
-
492
- - 62a8725: Update `@types/aws-lambda` peer and dev dependency to `^8.10.161` to resolve a `Duplicate identifier 'HttpResponseStream'` TypeScript error that appeared when bundling alongside other AWS SDK packages.
493
- - Updated dependencies [62a8725]
494
- - Updated dependencies [a3bdb0d]
495
- - Updated dependencies [e0349ff]
496
- - Updated dependencies [62a8725]
497
- - Updated dependencies [e04531f]
498
- - Updated dependencies [62a8725]
499
- - Updated dependencies [a83efb8]
500
- - Updated dependencies [8eed717]
501
- - Updated dependencies [62a8725]
502
- - Updated dependencies [62a8725]
503
- - Updated dependencies [62a8725]
504
- - @pikku/core@0.12.1
505
-
506
- ### New Features
507
-
508
- - `createWireServices` and `createConfig` are now optional
509
-
510
- ## 0.11.0
511
-
512
- ## 0.11.1
513
-
514
- ### Patch Changes
515
-
516
- - 4b811db: chore: updating all dependencies
517
- - ce902b1: chore: updating aws types
518
- - 06e1a31: breaking: change session services to wire services
519
- - Updated dependencies [4b811db]
520
- - Updated dependencies [e12a00c]
521
- - Updated dependencies [4579434]
522
- - Updated dependencies [28aeb7f]
523
- - Updated dependencies [ce902b1]
524
- - Updated dependencies [06e1a31]
525
- - @pikku/core@0.11.1
526
-
527
- ### Minor Changes
528
-
529
- - Workflow support
530
-
531
- ## 0.8.0
532
-
533
- ## 0.10.1
534
-
535
- ### Patch Changes
536
-
537
- - e35722d: Fix request converter to avoid undefined httpMethod
538
-
539
- Store httpMethod in a variable before using it to prevent potential undefined access issues in request body handling.
540
-
541
- - Updated dependencies [ea652dc]
542
- - Updated dependencies [4349ec5]
543
- - Updated dependencies [44d71a8]
544
- - @pikku/core@0.10.2
545
-
546
- ## 0.10.0
547
-
548
- This release includes significant improvements across the framework including tree-shaking support, middleware/permission factories, enhanced CLI functionality, improved TypeScript type safety, and comprehensive test strategies.
549
-
550
- For complete details, see https://pikku.dev/changelogs/0_10_0.md
551
-
552
- ## 0.9.4-next.0
553
-
554
- ### Patch Changes
555
-
556
- - Updated dependencies
557
- - @pikku/core@0.9.12-next.0
558
-
559
- ## 0.9.3
560
-
561
- ### Patch Changes
562
-
563
- - c18800d: feat: adding queue and scheduledTask to interactions
564
- - Updated dependencies [c18800d]
565
- - @pikku/core@0.9.4
566
-
567
- ## 0.9.2
568
-
569
- ### Patch Changes
570
-
571
- - a5905a9: chore: updating all dependencies
572
- - Updated dependencies [1256238]
573
- - Updated dependencies [6cf8efd]
574
- - Updated dependencies [d3a9a09]
575
- - Updated dependencies [840e078]
576
- - Updated dependencies [667d23c]
577
- - Updated dependencies [a5905a9]
578
- - @pikku/core@0.9.2
579
-
580
- ## 0.9.1
581
-
582
- ### Patch Changes
583
-
584
- - fdb1593: core: bumping everything with a patch to sync up the major release inconsistencies in dependencies
585
- - Updated dependencies [fdb1593]
586
- - @pikku/core@0.9.1
587
-
588
- ## 0.9.0
589
-
590
- ### Breaking Changes
591
-
592
- - Normalized all transports to use "wirings" instead of events/routes/transports for consistency across the framework
593
-
594
- ### Major Features
595
-
596
- - **SQS Queue Support**: Added SQS queue worker support
597
-
598
- ## 0.7.0
599
-
600
- - Updating to match remaining packages
601
-
602
- ## 0.6.8
603
-
604
- ### Patch Changes
605
-
606
- - 60b2265: refactor: supporting request and response objects
607
- - Updated dependencies [60b2265]
608
- - @pikku/core@0.6.22
609
-
610
- ## 0.6.7
611
-
612
- ### Patch Changes
613
-
614
- - a234e33: fix: regressions in channels due to user session changes
615
-
616
- ## 0.6.6
617
-
618
- ### Patch Changes
619
-
620
- - ee5c874: feat: moving towards using middleware for http and channels
621
- - Updated dependencies [c1d8381]
622
- - Updated dependencies [ee5c874]
623
- - @pikku/core@0.6.14
624
-
625
- ## 0.6.5
626
-
627
- ### Patch Changes
628
-
629
- - de4a36b: refactor: renaming serverless templates to aws-lambda
630
-
631
- ## 0.6.4
632
-
633
- ### Patch Changes
634
-
635
- - 269a532: fix: fixing some typing issues
636
- - Updated dependencies [7859b28]
637
- - Updated dependencies [269a532]
638
- - @pikku/core@0.6.11
639
-
640
- ## 0.6.3
641
-
642
- ### Patch Changes
643
-
644
- - 0a92fa7: refactor: pulling schema into seperate package since ajv doesnt work on cloudflare (also keeps bundle size small!)
645
- - Updated dependencies [0a92fa7]
646
- - @pikku/core@0.6.7
647
-
648
- ## 0.6.2
649
-
650
- ### Patch Changes
651
-
652
- - 09fc52c: feat: adding cloudflare and lambda websockets
653
- breaking change: moved subscription from channel to services and renamed to event hub
654
- - adecb52: feat: changes required to get cloudflare functions to work
655
- - Updated dependencies [09fc52c]
656
- - Updated dependencies [adecb52]
657
- - @pikku/core@0.6.3
658
-
659
- ### Patch Changes
660
-
661
- - ed45ca9: feat: adding lambda serverless
662
- - adeb392: feat: more channel improvements, and adding bubble option to runners to avoid all the empty try catches
663
- - Updated dependencies [ed45ca9]
664
- - Updated dependencies [adeb392]
665
- - @pikku/core@0.6.2
666
-
667
- ## 0.0.2 - 28.07.2021
668
-
669
- Using peer dependencies to avoid version mismatches, which in turn affects lambda and singletons
670
-
671
- ## 0.0.1 - 27.07.2021
672
-
673
- Chore: Bumping deps
674
-
675
- ## 23.07.2021
676
-
677
- ### Initial Release
678
-
679
- A package that allows users to call Pikku functions from lambda