@tokenoftrust/storefront-runner 6.11.4 → 6.11.5
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.
|
@@ -17,7 +17,7 @@ import { AppRegistryService } from "./registryService.js";
|
|
|
17
17
|
import { D1CredentialStore } from "./credentials.js";
|
|
18
18
|
import { DEFAULT_APP_GATEWAY_KID, APP_GATEWAY_KID_ENV } from "./gatewayKeys.js";
|
|
19
19
|
import { fromD1 } from "../../catalog/d1/catalog.js";
|
|
20
|
-
import { readD1, readEnv } from "../../publication/shared/env.js";
|
|
20
|
+
import { readD1, readEnv, readKv } from "../../publication/shared/env.js";
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* No-store JSON response — install/rotate bodies carry a one-time client
|
|
@@ -43,3 +43,12 @@ export async function getRegistryService(): Promise<AppRegistryService | Respons
|
|
|
43
43
|
const credentials = new D1CredentialStore(db, activeKid);
|
|
44
44
|
return new AppRegistryService(db, credentials);
|
|
45
45
|
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Read the Worker's `TENANT_CACHE` KV binding used by the fixed-window
|
|
49
|
+
* per-install rate limiter (`kvWindow.ts`). Returns `undefined` when unconfigured
|
|
50
|
+
* so `checkRateLimit` fails closed.
|
|
51
|
+
*/
|
|
52
|
+
export async function getAppRateLimitKv(): Promise<KVNamespace | undefined> {
|
|
53
|
+
return readKv("TENANT_CACHE");
|
|
54
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenoftrust/storefront-runner",
|
|
3
|
-
"version": "6.11.
|
|
3
|
+
"version": "6.11.5",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"description": "World-shareable storefront runner: multi-tenant renderer on Astro/Cloudflare. No control plane.",
|
|
6
6
|
"packageManager": "pnpm@11.9.0",
|