@lunora/runtime 1.0.0-alpha.6 → 1.0.0-alpha.61

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.
Files changed (48) hide show
  1. package/LICENSE.md +6 -0
  2. package/README.md +17 -0
  3. package/dist/index.d.mts +3833 -1308
  4. package/dist/index.d.ts +3833 -1308
  5. package/dist/index.mjs +1 -14
  6. package/dist/packem_shared/BACKUP_KEY_PREFIX-DhFUE3VL.mjs +1 -0
  7. package/dist/packem_shared/DEFAULT_LOG_COLUMNS-CzsNuTZj.mjs +1 -0
  8. package/dist/packem_shared/DEFAULT_REGISTRY_CACHE_TTL_MS-DqWtiFAk.mjs +1 -0
  9. package/dist/packem_shared/HEALTH_PATH-BwWsxoqV.mjs +1 -0
  10. package/dist/packem_shared/LOG_ARCHIVE_NOT_CONFIGURED-CDpi4yFD.mjs +1 -0
  11. package/dist/packem_shared/LOG_ARCHIVE_PATH-CuHKuDCS.mjs +1 -0
  12. package/dist/packem_shared/LunoraError-ByasbDmd.mjs +1 -0
  13. package/dist/packem_shared/NOOP_EXECUTION_CONTEXT-YmXqH-jH.mjs +1 -0
  14. package/dist/packem_shared/STORAGE_UPLOAD_MAX_BODY_BYTES-K0uZPIUj.mjs +1 -0
  15. package/dist/packem_shared/analyticsEngineSink-iIRy11I9.mjs +1 -0
  16. package/dist/packem_shared/applyJurisdiction-DX_lQ6fY.mjs +1 -0
  17. package/dist/packem_shared/applyRestCache-DwBDPRf6.mjs +1 -0
  18. package/dist/packem_shared/argsFromQuery-nMGzM5bK.mjs +1 -0
  19. package/dist/packem_shared/base64-DPPVK6s_.mjs +1 -0
  20. package/dist/packem_shared/composeIdentityResolvers-DwE0Jbww.mjs +1 -0
  21. package/dist/packem_shared/composeWorker-rVokGnPq.mjs +6 -0
  22. package/dist/packem_shared/createCrossShardRelationCapabilities-CQfrCIWR.mjs +1 -0
  23. package/dist/packem_shared/createKvCursorStore-C24tEuYk.mjs +3 -0
  24. package/dist/packem_shared/createQueryCoordinator-D8GY_boW.mjs +1 -0
  25. package/dist/packem_shared/createShardClient-DoSOeXwx.mjs +1 -0
  26. package/dist/packem_shared/decorateResponse-BeLVRQuJ.mjs +1 -0
  27. package/dist/packem_shared/emitLogEvent-BxJ6jRKW.mjs +1 -0
  28. package/dist/packem_shared/evict-oldest-C2XU6HBR.mjs +1 -0
  29. package/dist/packem_shared/identity-header-pdXOyDU4.mjs +1 -0
  30. package/dist/packem_shared/memoizeIdentity-CX3xEPYw.mjs +1 -0
  31. package/dist/packem_shared/method-guard-rzvo19pa.mjs +1 -0
  32. package/dist/packem_shared/observability-DWlkDJJw.mjs +1 -0
  33. package/dist/packem_shared/otlp-resource-B-ByO9qo.mjs +1 -0
  34. package/dist/packem_shared/pipeline-log-reader-FF1V32O2.mjs +1 -0
  35. package/dist/packem_shared/rest-cache-5unAzdFN.mjs +1 -0
  36. package/dist/packem_shared/rest-routes-BqldHiaH.mjs +1 -0
  37. package/dist/packem_shared/toAirbyteMessages-DTk8e2f9.mjs +1 -0
  38. package/package.json +6 -1
  39. package/dist/packem_shared/DEFAULT_REGISTRY_CACHE_TTL_MS-ocax8v0n.mjs +0 -78
  40. package/dist/packem_shared/LunoraError-CL0aOtpo.mjs +0 -46
  41. package/dist/packem_shared/NOOP_EXECUTION_CONTEXT-Rns-X7RV.mjs +0 -2529
  42. package/dist/packem_shared/analyticsEngineSink-DqEvrQs0.mjs +0 -141
  43. package/dist/packem_shared/applyJurisdiction-BkZtTkct.mjs +0 -20
  44. package/dist/packem_shared/createCrossShardRelationCapabilities-C0KOf7er.mjs +0 -61
  45. package/dist/packem_shared/createQueryCoordinator-Cbds9cUI.mjs +0 -838
  46. package/dist/packem_shared/decorateResponse-DbISh_Wi.mjs +0 -233
  47. package/dist/packem_shared/emitLogEvent-pEdtqAK8.mjs +0 -20
  48. package/dist/packem_shared/toAirbyteMessages-DrHdplb4.mjs +0 -39
package/LICENSE.md CHANGED
@@ -103,3 +103,9 @@ Unless required by applicable law or agreed to in writing, software distributed
103
103
  under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
104
  CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
105
  specific language governing permissions and limitations under the License.
106
+
107
+ <!-- DEPENDENCIES -->
108
+ <!-- /DEPENDENCIES -->
109
+
110
+ <!-- TYPE_DEPENDENCIES -->
111
+ <!-- /TYPE_DEPENDENCIES -->
package/README.md CHANGED
@@ -86,6 +86,23 @@ export { ShardDO };
86
86
 
87
87
  > This README covers the basics. For the full API, options, and guides, see the **[documentation](https://lunora.sh/docs/packages/runtime)**.
88
88
 
89
+ ### Workers Cache
90
+
91
+ When `cache: { enabled: true }` is present in `wrangler.jsonc` and `compatibility_date >= "2026-05-01"`, the runtime forwards the Worker's `ExecutionContext.cache` into action handlers as `ctx.cache`. This lets you purge cache by tag from HTTP action handlers:
92
+
93
+ ```ts
94
+ export const refreshProducts = action.action(async ({ ctx }) => {
95
+ if (!ctx.cache) {
96
+ throw new Error("Workers Cache is not enabled in wrangler.jsonc");
97
+ }
98
+
99
+ await ctx.cache.purge({ tags: ["products"] });
100
+ return { ok: true };
101
+ });
102
+ ```
103
+
104
+ The `ctx.cache` binding is only available in **action** handlers (not query/mutation), because actions run in the Worker while queries/mutations run inside the Durable Object. Cache header declarations on `httpRoute` (`.cacheControl()`, `.cacheTag()`, `.vary()`) are attached by `@lunora/server` before the response leaves the handler.
105
+
89
106
  ## Related
90
107
 
91
108
  - [`@lunora/do`](https://www.npmjs.com/package/@lunora/do) — the `ShardDO` / `SessionDO` Durable Objects this runtime routes to.