🐛 Add migrations to fix colors

This commit is contained in:
Alejandro Alonso 2025-06-03 17:05:47 +02:00 committed by Andrey Antukh
parent 29ad99d685
commit 055ee27be0
7 changed files with 200 additions and 100 deletions

View file

@ -617,8 +617,7 @@
(let [object (->> (read-entry input entry)
(clean-component-pre-decode)
(decode-component)
(clean-component-post-decode)
(validate-component))]
(clean-component-post-decode))]
(if (= id (:id object))
(assoc result id object)
result)))
@ -652,8 +651,7 @@
(let [object (->> (read-entry input entry)
(bfl/clean-shape-pre-decode)
(decode-shape)
(bfl/clean-shape-post-decode)
(validate-shape))]
(bfl/clean-shape-post-decode))]
(if (= id (:id object))
(assoc result id object)
result)))
@ -699,7 +697,6 @@
components (read-file-components cfg)
plugin-data (read-file-plugin-data cfg)
pages (read-file-pages cfg)]
{:pages (-> pages keys vec)
:pages-index (into {} pages)
:colors colors
@ -756,7 +753,8 @@
(assoc :project-id project-id)
(dissoc :options))
file (bfc/process-file cfg file)]
file (bfc/process-file cfg file)
file (ctf/check-file file)]
(bfm/register-pending-migrations! cfg file)
(bfc/save-file! cfg file ::db/return-keys false)