File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ type ResultsSoFar = {
5050const TREE_API_LIMIT = 200 ;
5151
5252const refRegex = ( object : string ) : RegExp => new RegExp ( `^@${ object } Ref\\d+$` ) ;
53+
5354export const importFromPlan = async ( conn : Connection , planFilePath : string ) : Promise < ImportStatus > => {
5455 const resolvedPlanPath = path . resolve ( process . cwd ( ) , planFilePath ) ;
5556 const logger = Logger . childFromRoot ( 'data:import:tree:importFromPlan' ) ;
@@ -194,9 +195,10 @@ export function validatePlanContents(
194195 const parseResults = DataImportPlanArraySchema . safeParse ( planContents ) ;
195196
196197 if ( parseResults . error ) {
198+ // console.log(parseResults);
197199 throw messages . createError ( 'error.InvalidDataImport' , [
198200 planPath ,
199- parseResults . error . issues . map ( ( e ) => e . message ) . join ( '\n' ) ,
201+ parseResults . error . issues . map ( ( e ) => JSON . stringify ( e , null , 2 ) ) . join ( '\n' ) ,
200202 ] ) ;
201203 }
202204 const parsedPlans : DataImportPlanArray = parseResults . data ;
You can’t perform that action at this time.
0 commit comments