Sanity Library Reference Docs
    Preparing search index...
    • What emissionWritePlan reads from the generation root root as it is on disk: the handler files already there, the developer's sanity.blueprint.ts when it exists, and the dependency specifications the project's package.json declares. Reads only.

      Does not discover the config file. Whoever loaded the config knows which of the accepted names it came from, and the plan needs that name, so supply configFile alongside this result.

      A root with no package.json, or one declaring none of the dependencies a generated function imports, yields an empty declaredDependencies; the plan then fails naming what to install rather than guessing a range.

      Parameters

      • root: string

      Returns Omit<EmissionWriteInputs, "plan" | "configFile">

      const plan = emissionWritePlan({
      plan: runtimeEmissionPlan(config),
      configFile: 'sanity.workflow.ts',
      ...readGenerationRoot(root),
      })