Pārlūkot izejas kodu

fix(dev): schema.org debug edn was invalid and noisy

Gabriel Horner 1 gadu atpakaļ
vecāks
revīzija
3a22c28493

+ 1 - 1
deps/db/src/logseq/db/frontend/db_ident.cljc

@@ -68,7 +68,7 @@
          :cljs (exists? js/process)
          :cljs (exists? js/process)
          :default false)
          :default false)
     ;; So that we don't have to change :user.{property|class} in our tests
     ;; So that we don't have to change :user.{property|class} in our tests
-    (keyword user-namespace (string/replace name-string "/" "-"))
+    (keyword user-namespace (-> name-string (string/replace "/" "-") (string/replace-first #"^\d+" "")))
     (keyword user-namespace
     (keyword user-namespace
              (str
              (str
               (->> (filter #(re-find #"[0-9a-zA-Z-]{1}" %) (seq name-string)) (apply str))
               (->> (filter #(re-find #"[0-9a-zA-Z-]{1}" %) (seq name-string)) (apply str))

+ 3 - 1
scripts/src/logseq/tasks/db_graph/create_graph_with_schema_org.cljs

@@ -374,7 +374,9 @@
                       (pr-str
                       (pr-str
                        (->> ents
                        (->> ents
                             (map (fn [m]
                             (map (fn [m]
-                                   (let [props (db-property/properties m)]
+                                   (let [props (->> (db-property/properties m)
+                                                    (remove #(db-property/private-db-attribute-properties (key %)))
+                                                    (into {}))]
                                      (cond-> (select-keys m [:block/name :block/type :block/title :block/schema :db/ident
                                      (cond-> (select-keys m [:block/name :block/type :block/title :block/schema :db/ident
                                                              :logseq.property.class/properties :logseq.property/parent
                                                              :logseq.property.class/properties :logseq.property/parent
                                                              :db/cardinality :property/schema.classes :block/refs])
                                                              :db/cardinality :property/schema.classes :block/refs])