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

    Function resolvePlanNumber

    • Resolves one numeric knob: explicit env override first, then the plan profile.

      Parameters

      • raw: string | number | null | undefined

        the environment value, which arrives from wrangler as a string

      • field:
            | "fillBatchSize"
            | "fillBatchWallMs"
            | "httpDrainLimit"
            | "mirrorLimit"
            | "inlineBudgetMs"

        which profile field supplies the default

      • max: number

        a hard cap applied to BOTH the override and the profile, because these bound a single invocation and an operator typo must not be able to hang the object

      • Optionalenv: PlanEnv | null

      Returns number