@substrat-run/adapter-cloudflare 0.103.0 → 0.105.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/dist/host.js CHANGED
@@ -502,6 +502,10 @@ export class CloudflareScopeHost {
502
502
  * rewind points a backout UI offers. Behind the vertical's platform-gated
503
503
  * `/internal/bookmarks`; the control plane is the gate and the auditor.
504
504
  */
505
+ /** When this host's own scope applied each migration (#1236) — the vertical-host read. */
506
+ async appliedMigrationsLocal(scopeId) {
507
+ return this.scopeStub(scopeId).appliedMigrations();
508
+ }
505
509
  async migrationBookmarksLocal(scopeId) {
506
510
  return this.scopeStub(scopeId).migrationBookmarks();
507
511
  }
@@ -2061,6 +2065,14 @@ export class CloudflareScopeHost {
2061
2065
  await this.cp.setScopeExpiresAt(scopeId, expiresAt);
2062
2066
  await this.recordAdmin(actor, 'setScopeExpiresAt', { tenantId, scopeId }, { expiresAt: scope.expires_at ?? null }, { expiresAt });
2063
2067
  },
2068
+ scopeAppliedMigrations: async (actor, tenantId, scopeId) => {
2069
+ const scope = await this.cp.getScopeRecord(tenantId, scopeId);
2070
+ if (!scope)
2071
+ throw new Error(`unknown scope ${scopeId} in tenant ${tenantId}`);
2072
+ const applied = await this.scopeStub(scopeId).appliedMigrations();
2073
+ await this.recordAccess(actor, 'scopeAppliedMigrations', { tenantId, scopeId }, null, applied.length);
2074
+ return applied;
2075
+ },
2064
2076
  scopeMigrationBookmarks: async (actor, tenantId, scopeId) => {
2065
2077
  const scope = await this.cp.getScopeRecord(tenantId, scopeId);
2066
2078
  if (!scope)