mirror of
https://github.com/logseq/logseq.git
synced 2026-04-25 22:54:48 +00:00
fix: display more helpful notifications for invalid
properties and classes that can't build a db-ident. Part of LOG-3176
This commit is contained in:
10
deps/graph-parser/script/db_import.cljs
vendored
10
deps/graph-parser/script/db_import.cljs
vendored
@@ -131,12 +131,14 @@
|
||||
[(node-path/join (os/homedir) "logseq" "graphs") db-graph-dir])
|
||||
file-graph' (resolve-path file-graph)
|
||||
conn (outliner-cli/init-conn dir db-name {:classpath (cp/get-classpath)})
|
||||
directory? (.isDirectory (fs/statSync file-graph'))]
|
||||
directory? (.isDirectory (fs/statSync file-graph'))
|
||||
;; coerce option collection into strings
|
||||
options' (if (:tag-classes options) (update options :tag-classes (partial mapv str)) options)]
|
||||
(p/do!
|
||||
(if directory?
|
||||
(import-file-graph-to-db file-graph' (node-path/join dir db-name) conn (merge options {:graph-name db-name}))
|
||||
(import-files-to-db file-graph' conn (merge options {:graph-name db-name})))
|
||||
(when (:verbose options) (println "Transacted" (count (d/datoms @conn :eavt)) "datoms"))
|
||||
(import-file-graph-to-db file-graph' (node-path/join dir db-name) conn (merge options' {:graph-name db-name}))
|
||||
(import-files-to-db file-graph' conn (merge options' {:graph-name db-name})))
|
||||
(when (:verbose options') (println "Transacted" (count (d/datoms @conn :eavt)) "datoms"))
|
||||
(println "Created graph" (str db-name "!")))))
|
||||
|
||||
(when (= nbb/*file* (:file (meta #'-main)))
|
||||
|
||||
Reference in New Issue
Block a user