0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-10 14:51:37 -05:00

Merge pull request #4291 from penpot/migration

🐛 Several bugfixes
This commit is contained in:
Alejandro 2024-03-20 14:36:15 +01:00 committed by GitHub
commit 8148151ee5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 24 additions and 20 deletions

View file

@ -4,7 +4,7 @@ export PENPOT_HOST=devenv
export PENPOT_TENANT=dev
export PENPOT_FLAGS="\
$PENPOT_FLAGS \
enable-registration
enable-login-with-ldap \
enable-login-with-password
enable-login-with-oidc \
enable-login-with-google \
@ -28,9 +28,7 @@ export PENPOT_FLAGS="\
enable-access-tokens \
disable-feature-components-v2 \
enable-file-validation \
enable-file-schema-validation \
disable-soft-file-schema-validation \
disable-soft-file-validation";
enable-file-schema-validation";
# Setup default upload media file size to 100MiB

View file

@ -15,13 +15,12 @@ export PENPOT_FLAGS="\
enable-feature-fdata-pointer-map \
enable-feature-fdata-objects-map \
disable-secure-session-cookies \
enable-rpc-climit \
enable-smtp \
enable-access-tokens \
disable-feature-components-v2 \
enable-file-validation \
enable-file-schema-validation \
disable-soft-file-schema-validation \
disable-soft-file-validation";
enable-file-schema-validation";
export OPTIONS="
-A:jmx-remote -A:dev \

View file

@ -215,10 +215,15 @@
(update :pages-index update-vals fix-container)
(d/update-when :components update-vals fix-container))))
fix-page-invalid-options
fix-invalid-page
(fn [file-data]
(letfn [(update-page [page]
(update page :options fix-options))
(-> page
(update :name (fn [name]
(if (nil? name)
"Page"
name)))
(update :options fix-options)))
(fix-background [options]
(if (and (contains? options :background)
@ -433,7 +438,8 @@
(letfn [(fix-component [components id component]
(let [root-shape (ctst/get-shape component (:id component))]
(if (or (empty? (:objects component))
(nil? root-shape))
(nil? root-shape)
(nil? (:type root-shape)))
(dissoc components id)
components)))]
@ -992,7 +998,7 @@
(-> file-data
(fix-file-data)
(fix-page-invalid-options)
(fix-invalid-page)
(fix-misc-shape-issues)
(fix-recent-colors)
(fix-missing-image-metadata)

View file

@ -21,7 +21,6 @@
[app.worker :as-alias wrk]
[clojure.edn :as edn]
[clojure.spec.alpha :as s]
[cuerdas.core :as str]
[datoteka.fs :as fs]
[integrant.core :as ig]
[promesa.exec :as px]
@ -241,16 +240,15 @@
[{:keys [::label ::profile-id ::rpc/climit ::mtx/metrics] :as cfg} f]
(let [config (get climit ::config)
cache (get climit ::cache)]
(reduce (fn [handler [limit-id limit-key :as ckey]]
(let [config (get config limit-id)]
(when-not config
(throw (IllegalArgumentException.
(str/ffmt "config not found for: %" limit-id))))
(if-let [config (get config limit-id)]
(fn [& params]
(let [limiter (cache/get cache ckey (partial create-limiter config))]
(invoke limiter metrics limit-id limit-key label profile-id handler params)))))
(invoke limiter metrics limit-id limit-key label profile-id handler params)))
(do
(l/wrn :hint "config not found" :label label :id limit-id)
f)))
f
(get-limits cfg))))

View file

@ -73,7 +73,7 @@
[{:keys [version] :as file}]
(if (int? version)
file
(let [version (or version (-> file :data :version))]
(let [version (or (-> file :data :version) 0)]
(-> file
(assoc :version version)
(update :data dissoc :version)))))

View file

@ -995,6 +995,9 @@
(= key :style)
attrs
(= key :unicode)
attrs
(str/starts-with? (d/name key) "data-")
attrs