cli/parse-graph returns ast data as well

This data was not returned and is valuable for CI jobs
and possibly other functionality
This commit is contained in:
Gabriel Horner
2022-06-17 12:09:21 -04:00
committed by Tienson Qin
parent 0c19a02a2d
commit 69ba15252e
7 changed files with 68 additions and 44 deletions

View File

@@ -130,18 +130,19 @@
file)
file (gp-util/path-normalize file)
new? (nil? (db/entity [:file/path file]))]
(graph-parser/parse-file
(db/get-db repo-url false)
file
content
(merge options
{:new? new?
:delete-blocks-fn (partial get-delete-blocks repo-url)
:extract-options {:user-config (state/get-config)
:date-formatter (state/get-date-formatter)
:page-name-order (state/page-name-order)
:block-pattern (config/get-block-pattern (gp-util/get-format file))
:supported-formats (gp-config/supported-formats)}})))))
(:tx
(graph-parser/parse-file
(db/get-db repo-url false)
file
content
(merge options
{:new? new?
:delete-blocks-fn (partial get-delete-blocks repo-url)
:extract-options {:user-config (state/get-config)
:date-formatter (state/get-date-formatter)
:page-name-order (state/page-name-order)
:block-pattern (config/get-block-pattern (gp-util/get-format file))
:supported-formats (gp-config/supported-formats)}}))))))
;; TODO: Remove this function in favor of `alter-files`
(defn alter-file