@@ -150,7 +150,7 @@ export async function generateMock(incoming: ?string = ''): Promise<void> {
150150 // createMockClass(pl[0].commands[0], 'PluginCommandObjectMock')
151151
152152 const name = await getInput ( 'What is the name of the mock?' )
153- // console.log(this[name])
153+
154154 if ( name && this [ name ] ) createMockOutput ( this [ name ] , name )
155155 else console . log ( `No object for ${ name || '' } ` )
156156 } catch ( error ) {
@@ -195,7 +195,16 @@ export function getNotePlan(): any {
195195export function outputEditorJson ( ) {
196196 try {
197197 const e = Editor
198- const nObj = { title : e . title , filename : e . filename , type : e . type , paragraphs : [ ] }
198+ const nObj = {
199+ title : e . title ,
200+ filename : e . filename ,
201+ type : e . type ,
202+ paragraphs : [ ] ,
203+ frontmatterAttributes : e . frontmatterAttributes ,
204+ frontmatterTypes : e . frontmatterTypes ,
205+ linkedItems : e . linkedItems ,
206+ datedTodos : e . datedTodos ,
207+ }
199208 nObj . paragraphs = e . paragraphs . map ( ( p ) => ( {
200209 content : p . content ,
201210 rawContent : p . rawContent ,
@@ -209,18 +218,11 @@ export function outputEditorJson() {
209218 } ) )
210219 console . log ( `--- Editor ---` )
211220 console . log ( JSON . stringify ( nObj , null , 2 ) )
212- clo ( Editor . frontmatterAttributes , `Editor.frontmatterAttributes ` )
213- clo ( Editor . note ?. frontmatterAttributes , `Editor.note.frontmatterAttributes ` )
214- clo ( Editor . frontmatterTypes , `Editor.frontmatterTypes ` )
215- clo ( Editor . note ?. frontmatterTypes , `Editor.note.frontmatterTypes ` )
216- clo ( Editor . linkedItems , `Editor.linkedItems ` )
217- clo ( Editor . note ?. linkedItems , `Editor.note.linkedItems ` )
218- clo ( Editor . datedTodos , `Editor.datedTodos ` )
219- clo ( Editor . note ?. datedTodos , `Editor.note.datedTodos ` )
220221
221222 console . log ( `--- /Editor ---` )
222223 console . log ( `--- For debugging paras ---` )
223224 nObj . paragraphs . forEach ( ( p ) => console . log ( `[${ p . lineIndex } ]: type=${ p . type } content="${ p . content } " heading:"${ p . heading } "` ) )
225+ return { }
224226 } catch ( error ) {
225227 logError ( pluginJson , JSON . stringify ( error ) )
226228 }
0 commit comments