|
@@ -15,7 +15,8 @@
|
|
|
[cljs-time.coerce :as tc]
|
|
[cljs-time.coerce :as tc]
|
|
|
[cljs-time.core :as t]
|
|
[cljs-time.core :as t]
|
|
|
[frontend.storage :as storage]
|
|
[frontend.storage :as storage]
|
|
|
- [logseq.graph-parser.util :as gp-util]))
|
|
|
|
|
|
|
+ [logseq.graph-parser.util :as gp-util]
|
|
|
|
|
+ [lambdaisland.glogi :as log]))
|
|
|
|
|
|
|
|
(def *beta-unavailable? (volatile! false))
|
|
(def *beta-unavailable? (volatile! false))
|
|
|
|
|
|
|
@@ -142,18 +143,25 @@
|
|
|
(#(js->clj % :keywordize-keys true))
|
|
(#(js->clj % :keywordize-keys true))
|
|
|
((juxt :dir :name))
|
|
((juxt :dir :name))
|
|
|
(apply path/join base-path))
|
|
(apply path/join base-path))
|
|
|
- version-file-paths (<! (p->c (fs/readdir version-files-dir :path-only? true)))]
|
|
|
|
|
|
|
+ version-file-paths (->> (<! (p->c (fs/readdir version-files-dir :path-only? true)))
|
|
|
|
|
+ (remove #{version-files-dir}))]
|
|
|
(when-not (instance? ExceptionInfo version-file-paths)
|
|
(when-not (instance? ExceptionInfo version-file-paths)
|
|
|
(when (seq version-file-paths)
|
|
(when (seq version-file-paths)
|
|
|
- (mapv
|
|
|
|
|
- (fn [path]
|
|
|
|
|
- (let [create-time
|
|
|
|
|
- (-> (path/parse path)
|
|
|
|
|
- (js->clj :keywordize-keys true)
|
|
|
|
|
- :name
|
|
|
|
|
- (#(tf/parse (tf/formatter "yyyy-MM-dd'T'HH_mm_ss.SSSZZ") %)))]
|
|
|
|
|
- {:create-time create-time :path path :relative-path (string/replace-first path base-path "")}))
|
|
|
|
|
- version-file-paths)))))))
|
|
|
|
|
|
|
+ (->>
|
|
|
|
|
+ (mapv
|
|
|
|
|
+ (fn [path]
|
|
|
|
|
+ (try
|
|
|
|
|
+ (let [create-time
|
|
|
|
|
+ (-> (path/parse path)
|
|
|
|
|
+ (js->clj :keywordize-keys true)
|
|
|
|
|
+ :name
|
|
|
|
|
+ (#(tf/parse (tf/formatter "yyyy-MM-dd'T'HH_mm_ss.SSSZZ") %)))]
|
|
|
|
|
+ {:create-time create-time :path path :relative-path (string/replace-first path base-path "")})
|
|
|
|
|
+ (catch :default e
|
|
|
|
|
+ (log/error :page-history/parse-format-error e)
|
|
|
|
|
+ nil)))
|
|
|
|
|
+ version-file-paths)
|
|
|
|
|
+ (remove nil?))))))))
|
|
|
|
|
|
|
|
(defn fetch-page-file-versions [graph-uuid page]
|
|
(defn fetch-page-file-versions [graph-uuid page]
|
|
|
[]
|
|
[]
|