@lunora/cli
Version:
The Lunora CLI: init, dev, deploy, codegen, migrate, seed, doctor, insights, logs, registry, and the rest of the project commands
2 lines (1 loc) • 869 B
JavaScript
import{p as c}from"../packem_shared/api-spec-lYyq4vL6.mjs";import{d as t}from"../packem_shared/command-DwC11Cwe.mjs";import{runPreDeployPipeline as i}from"./runDeployCommand.mjs";const l=async a=>{const r=a.cwd??process.cwd(),e=await i({allowSchemaDrift:a.allowSchemaDrift,apiSpec:a.apiSpec,cwd:r,logger:a.logger,spawner:a.spawner,target:a.target,updateSchemaBaseline:a.updateSchemaBaseline},"prepare");return e.error!==void 0?{code:1,error:e.error,...e.schemaDrift===void 0?{}:{schemaDrift:e.schemaDrift},validation:e.validation}:(e.reblessSchemaBaseline?.(),a.logger.success("project is ready to deploy"),{code:0,validation:e.validation})},s=t(({cwd:a,logger:r,options:e})=>l({allowSchemaDrift:e.allowSchemaDrift===!0,apiSpec:c(e.apiSpec),cwd:a,logger:r,target:e.target,updateSchemaBaseline:e.updateSchemaBaseline===!0}));export{s as execute,l as runPrepareCommand};