@tokenoftrust/storefront-runner 2.4.65 → 2.4.66
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.
|
@@ -66,9 +66,7 @@ export class CommerceAlarmDispatcher {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
export async function getReliableDispatcher(): Promise<CommerceAlarmDispatcher | Response> {
|
|
69
|
-
const scheduler = await readEnv("SCRAPPY_COMMERCE_SCHEDULER");
|
|
70
|
-
if (scheduler !== COMMERCE_SCHEDULER) return json({ error: "commerce scheduler not configured" }, 503);
|
|
71
69
|
const d1 = await readD1("STOREFRONT_APPS_DB");
|
|
72
70
|
if (!d1) return json({ error: "commerce scheduler not configured" }, 503);
|
|
73
|
-
return new CommerceAlarmDispatcher(fromD1(d1),
|
|
71
|
+
return new CommerceAlarmDispatcher(fromD1(d1), COMMERCE_SCHEDULER);
|
|
74
72
|
}
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
import type { APIContext } from "astro";
|
|
12
12
|
import { requireAdminApiEntry } from "@/lib/auth/adminApiGuard";
|
|
13
13
|
import { workerCommit } from "@/lib/activity/workerCommit";
|
|
14
|
-
import { readEnv } from "@/lib/env";
|
|
15
14
|
import {
|
|
16
15
|
COMMERCE_SCHEDULER,
|
|
17
16
|
actorMayCommand,
|
|
@@ -107,8 +106,7 @@ export function admitAdminReplay(input: {
|
|
|
107
106
|
export async function GET(context: APIContext): Promise<Response> {
|
|
108
107
|
const access = await requireAdminApiEntry(context, { requireOwner: true });
|
|
109
108
|
if (!access.ok) return json({ ok: false, reason: access.reason }, access.status);
|
|
110
|
-
|
|
111
|
-
return json({ ok: true, report: projectAdminReadiness({ scheduler, deployedSha: workerCommit() }) });
|
|
109
|
+
return json({ ok: true, report: projectAdminReadiness({ scheduler: COMMERCE_SCHEDULER, deployedSha: workerCommit() }) });
|
|
112
110
|
}
|
|
113
111
|
|
|
114
112
|
export async function POST(context: APIContext): Promise<Response> {
|
|
@@ -133,13 +131,12 @@ export async function POST(context: APIContext): Promise<Response> {
|
|
|
133
131
|
if (!OPAQUE.test(record.orderId) || !OPAQUE.test(record.sourceEventId)) return json({ ok: false, reason: "refused" }, 400);
|
|
134
132
|
const decision = admitAdminReplay({ tenantId: context.locals.tenant.tenant_id, stage, kind });
|
|
135
133
|
if (!decision.admitted) return json({ ok: false, reason: decision.reason }, 403);
|
|
136
|
-
const scheduler = await readEnv("SCRAPPY_COMMERCE_SCHEDULER");
|
|
137
134
|
return json({
|
|
138
135
|
ok: true,
|
|
139
136
|
admitted: true,
|
|
140
137
|
durableWrite: false,
|
|
141
138
|
command: "reconcile",
|
|
142
139
|
reason: decision.reason,
|
|
143
|
-
report: projectAdminReadiness({ scheduler, deployedSha: workerCommit() }),
|
|
140
|
+
report: projectAdminReadiness({ scheduler: COMMERCE_SCHEDULER, deployedSha: workerCommit() }),
|
|
144
141
|
});
|
|
145
142
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenoftrust/storefront-runner",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.66",
|
|
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",
|