import { Context } from "../../bundler/context.js"; import { EvaluateSchemaResponse } from "./deployApi/evaluateSchema.js"; import { StartPushRequest } from "./deployApi/startPush.js"; import { Span } from "./tracing.js"; type EvaluateOptions = { url: string; deploymentName: string | null; adminKey: string; }; /** * A schema evaluation shared by the pre-push checks. Resolves to `null` when * the deployment doesn't support `evaluate_schema` or the request failed, in * which case each check skips itself. */ export type SchemaEvaluation = (span: Span) => Promise; /** * Evaluate the schema at most once per push however many checks consume it: * the first check to call sends the request under its own span, and the rest * await the same promise. Each request makes the backend evaluate the schema * module in an isolate and predict against a fresh snapshot, so repeating it * per check would add that work and a round trip to the deploy's critical * path for every check. */ /** * Whether a schema module in the push calls `.staged(`. Bundles aren't * minified, so the call survives bundling. A false positive from a comment or * string costs one evaluation, while a push without staged validators skips * the evaluation round trip on its critical path. */ export declare function pushStagesValidators(request: StartPushRequest): boolean; export declare function sharedSchemaEvaluation(ctx: Context, request: StartPushRequest, options: EvaluateOptions): SchemaEvaluation; export {}; //# sourceMappingURL=schemaEvaluation.d.ts.map