drupflare/worker - v1.0.0
    Preparing search index...

    Function resolvePlan

    • The effective plan: KV first, then the deployed var, then free.

      KV WINS ON PURPOSE. PLAN is a vars entry, so upgrading an account meant editing the config and redeploying -- a deploy to change a fact the deploy does not control. An operator who upgrades flips one KV key and every isolate picks it up within PLAN_MEMO_MS.

      A missing binding, a KV error and an unrecognised value all fall through to the var rather than throwing: this runs on the serving path, and a KV blip must not take a site from paid to broken. The same reason isPaid() treats an unrecognised value as free -- every limit here is a free limit, and guessing upward is the failure that costs money.

      Parameters

      • Optionalenv: PlanEnv | null
      • Optionalkv: PlanKv | null
      • nowMs: number = ...

      Returns Promise<ResolvedPlan>