From 47e877d6c33c90db3f1ecbe41aaf09a939f97c74 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 8 Nov 2023 10:44:44 +0100 Subject: [PATCH 01/13] :sparkles: Add minor internal db api improvements --- backend/src/app/db.clj | 45 +++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/backend/src/app/db.clj b/backend/src/app/db.clj index a2a5d059bf..4e07cca50f 100644 --- a/backend/src/app/db.clj +++ b/backend/src/app/db.clj @@ -422,29 +422,30 @@ (.rollback conn sp))) (defn tx-run! - [cfg f] + [system f & params] (cond - (connection? cfg) - (tx-run! {::conn cfg} f) + (connection? system) + (tx-run! {::conn system} f) - (pool? cfg) - (tx-run! {::pool cfg} f) + (pool? system) + (tx-run! {::pool system} f) - (::conn cfg) - (let [conn (::conn cfg) + (::conn system) + (let [conn (::conn system) sp (savepoint conn)] (try - (let [result (f cfg)] + (let [result (apply f system params)] (release! conn sp) result) (catch Throwable cause (rollback! conn sp) (throw cause)))) - (::pool cfg) - (with-atomic [conn (::pool cfg)] - (let [result (f (assoc cfg ::conn conn))] - (when (::rollback cfg) + (::pool system) + (with-atomic [conn (::pool system)] + (let [system (assoc system ::conn conn) + result (apply f system params)] + (when (::rollback system) (l/dbg :hint "explicit rollback requested") (rollback! conn)) result)) @@ -453,20 +454,20 @@ (throw (IllegalArgumentException. "invalid arguments")))) (defn run! - [cfg f] + [system f & params] (cond - (connection? cfg) - (run! {::conn cfg} f) + (connection? system) + (run! {::conn system} f) - (pool? cfg) - (run! {::pool cfg} f) + (pool? system) + (run! {::pool system} f) - (::conn cfg) - (f cfg) + (::conn system) + (apply f system params) - (::pool cfg) - (with-open [^Connection conn (open (::pool cfg))] - (f (assoc cfg ::conn conn))) + (::pool system) + (with-open [^Connection conn (open (::pool system))] + (apply f (assoc system ::conn conn) params)) :else (throw (IllegalArgumentException. "invalid arguments")))) From b0418ff5f2524f1179cae1968138e3e9451b98be Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 8 Nov 2023 10:45:08 +0100 Subject: [PATCH 02/13] :sparkles: Add file snapshoting on migration --- backend/src/app/features/components_v2.clj | 4 ++++ backend/src/app/srepl/components_v2.clj | 1 + backend/src/app/srepl/main.clj | 4 +--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/src/app/features/components_v2.clj b/backend/src/app/features/components_v2.clj index f26cd50c97..c6389cd8de 100644 --- a/backend/src/app/features/components_v2.clj +++ b/backend/src/app/features/components_v2.clj @@ -33,6 +33,7 @@ [app.db :as db] [app.media :as media] [app.rpc.commands.files :as files] + [app.rpc.commands.files-snapshot :as fsnap] [app.rpc.commands.media :as cmd.media] [app.storage :as sto] [app.storage.tmp :as tmp] @@ -645,6 +646,9 @@ (let [system (update system ::sto/storage media/configure-assets-storage)] (db/tx-run! system (fn [{:keys [::db/conn] :as system}] + (fsnap/take-file-snapshot! system {:file-id file-id + :label "migration/components-v2"}) + (binding [*system* system] (-> (db/get conn :file {:id file-id}) (update :features db/decode-pgarray #{}) diff --git a/backend/src/app/srepl/components_v2.clj b/backend/src/app/srepl/components_v2.clj index 2b709b6276..b6cb138b44 100644 --- a/backend/src/app/srepl/components_v2.clj +++ b/backend/src/app/srepl/components_v2.clj @@ -210,6 +210,7 @@ preset :shutdown-on-failure max-jobs Integer/MAX_VALUE max-items Long/MAX_VALUE}}] + (letfn [(get-chunk [cursor] (let [sql (str/concat "SELECT id, created_at, features FROM team " diff --git a/backend/src/app/srepl/main.clj b/backend/src/app/srepl/main.clj index da7f211201..e468d3fc4b 100644 --- a/backend/src/app/srepl/main.clj +++ b/backend/src/app/srepl/main.clj @@ -193,9 +193,7 @@ collectable file-changes entry." [system & {:keys [file-id label]}] (let [file-id (h/parse-uuid file-id)] - (db/tx-run! system - (fn [cfg] - (fsnap/take-file-snapshot! cfg {:file-id file-id :label label}))))) + (db/tx-run! system fsnap/take-file-snapshot! {:file-id file-id :label label}))) (defn restore-file-snapshot! [system & {:keys [file-id id]}] From 8193cea7e1daef38db8411046647291af06c8413 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 8 Nov 2023 10:45:28 +0100 Subject: [PATCH 03/13] :sparkles: Add feature-styles-v2 alternative flag for enable new styles --- common/src/app/common/features.cljc | 1 + 1 file changed, 1 insertion(+) diff --git a/common/src/app/common/features.cljc b/common/src/app/common/features.cljc index cf5d0b897b..310f7eef79 100644 --- a/common/src/app/common/features.cljc +++ b/common/src/app/common/features.cljc @@ -91,6 +91,7 @@ (case flag :feature-components-v2 "components/v2" :feature-new-css-system "styles/v2" + :feature-styles-v2 "styles/v2" :feature-grid-layout "layout/grid" :feature-fdata-objects-map "fdata/objects-map" :feature-fdata-pointer-map "fdata/pointer-map" From ec51e0c0d77025cbbe20f2e5a5ee0885d29a6677 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 8 Nov 2023 11:13:31 +0100 Subject: [PATCH 04/13] :sparkles: Add max-time constraint for migration --- backend/src/app/srepl/components_v2.clj | 35 ++++++++++++++++--------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/backend/src/app/srepl/components_v2.clj b/backend/src/app/srepl/components_v2.clj index b6cb138b44..af69bb79bb 100644 --- a/backend/src/app/srepl/components_v2.clj +++ b/backend/src/app/srepl/components_v2.clj @@ -203,7 +203,7 @@ (defn migrate-teams! [{:keys [::db/pool] :as system} - & {:keys [chunk-size max-jobs max-items start-at rollback preset skip-on-error] + & {:keys [chunk-size max-jobs max-items start-at rollback preset skip-on-error max-time] :or {chunk-size 10000 rollback true skip-on-error true @@ -227,14 +227,29 @@ (map #(update % :features db/decode-pgarray #{})) (remove #(contains? (:features %) "ephimeral/v2-migration")) (take max-items) - (map :id)))] + (map :id))) + + (migrate-team [team-id] + (try + (-> (assoc system ::db/rollback rollback) + (feat/migrate-team! team-id)) + (catch Throwable cause + (l/err :hint "unexpected error on processing team" :team-id (dm/str team-id) :cause cause)))) + + (process-team [scope tpoint mtime team-id] + (ps/acquire! feat/*semaphore*) + (let [ts (tpoint)] + (if (and mtime (neg? (compare mtime ts))) + (l/trc :hint "max time constraint reached" :elapsed (dt/format-duration ts)) + (px/submit! scope (partial migrate-team team-id)))))] (l/dbg :hint "migrate:start") (let [sem (ps/create :permits max-jobs) total (get-total-teams pool) stats (atom {:total/teams (min total max-items)}) - tpoint (dt/tpoint)] + tpoint (dt/tpoint) + mtime (some-> max-time dt/duration)] (add-watch stats :progress-report (report-progress-teams tpoint)) @@ -244,17 +259,11 @@ (try (pu/with-open [scope (px/structured-task-scope :preset preset :factory :virtual)] - (run! (fn [team-id] - (l/trc :hint "scheduling task" :team-id (dm/str team-id)) - (ps/acquire! sem) - (px/submit! scope (fn [] - (try - (-> (assoc system ::db/rollback rollback) - (feat/migrate-team! team-id)) - (catch Throwable cause - (l/err :hint "unexpected error on processing team" :team-id (dm/str team-id) :cause cause)))))) + (loop [candidates (get-candidates)] + (when-let [team-id (first candidates)] + (when (process-team scope tpoint mtime team-id) + (recur (rest candidates))))) - (get-candidates)) (p/await! scope)) (print-stats! From aaf2179b2073a6b43d6f8e13e80e5c9cfed70f15 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 8 Nov 2023 13:17:56 +0100 Subject: [PATCH 05/13] :bug: Fix features related issues on viewer --- backend/src/app/rpc/commands/teams.clj | 11 +-- backend/src/app/rpc/commands/viewer.clj | 99 ++++++++++++++----------- 2 files changed, 60 insertions(+), 50 deletions(-) diff --git a/backend/src/app/rpc/commands/teams.clj b/backend/src/app/rpc/commands/teams.clj index e59cae681d..d0271d93a5 100644 --- a/backend/src/app/rpc/commands/teams.clj +++ b/backend/src/app/rpc/commands/teams.clj @@ -100,7 +100,7 @@ (dm/with-open [conn (db/open pool)] (get-teams conn profile-id))) -(def sql:teams +(def sql:get-teams-with-permissions "select t.*, tp.is_owner, tp.is_admin, @@ -128,7 +128,7 @@ (defn get-teams [conn profile-id] (let [profile (profile/get-profile conn profile-id)] - (->> (db/exec! conn [sql:teams (:default-team-id profile) profile-id]) + (->> (db/exec! conn [sql:get-teams-with-permissions (:default-team-id profile) profile-id]) (map decode-row) (map process-permissions) (vec)))) @@ -156,18 +156,19 @@ (let [{:keys [default-team-id] :as profile} (profile/get-profile conn profile-id) result (cond (some? team-id) - (let [sql (str "WITH teams AS (" sql:teams ") SELECT * FROM teams WHERE id=?")] + (let [sql (str "WITH teams AS (" sql:get-teams-with-permissions + ") SELECT * FROM teams WHERE id=?")] (db/exec-one! conn [sql default-team-id profile-id team-id])) (some? project-id) - (let [sql (str "WITH teams AS (" sql:teams ") " + (let [sql (str "WITH teams AS (" sql:get-teams-with-permissions ") " "SELECT t.* FROM teams AS t " " JOIN project AS p ON (p.team_id = t.id) " " WHERE p.id=?")] (db/exec-one! conn [sql default-team-id profile-id project-id])) (some? file-id) - (let [sql (str "WITH teams AS (" sql:teams ") " + (let [sql (str "WITH teams AS (" sql:get-teams-with-permissions ") " "SELECT t.* FROM teams AS t " " JOIN project AS p ON (p.team_id = t.id) " " JOIN file AS f ON (f.project_id = p.id) " diff --git a/backend/src/app/rpc/commands/viewer.clj b/backend/src/app/rpc/commands/viewer.clj index 0e776da2bb..6173f388d3 100644 --- a/backend/src/app/rpc/commands/viewer.clj +++ b/backend/src/app/rpc/commands/viewer.clj @@ -6,28 +6,49 @@ (ns app.rpc.commands.viewer (:require - [app.common.data.macros :as dm] [app.common.exceptions :as ex] [app.common.features :as cfeat] [app.common.schema :as sm] + [app.config :as cf] [app.db :as db] [app.rpc :as-alias rpc] [app.rpc.commands.comments :as comments] [app.rpc.commands.files :as files] + [app.rpc.commands.teams :as teams] [app.rpc.cond :as-alias cond] [app.rpc.doc :as-alias doc] [app.util.services :as sv])) ;; --- QUERY: View Only Bundle -(defn- get-project - [conn id] - (db/get-by-id conn :project id {:columns [:id :name :team-id]})) +(defn- remove-not-allowed-pages + [data allowed] + (-> data + (update :pages (fn [pages] (filterv #(contains? allowed %) pages))) + (update :pages-index select-keys allowed))) + +(defn- get-view-only-bundle + [{:keys [::db/conn] :as cfg} {:keys [profile-id file-id ::perms] :as params}] + (let [file (files/get-file conn file-id) + + project (db/get conn :project + {:id (:project-id file)} + {:columns [:id :name :team-id]}) + + team (-> (db/get conn :team {:id (:team-id project)}) + (teams/decode-row)) + + _ (-> (cfeat/get-team-enabled-features cf/flags team) + (cfeat/check-client-features! (:features params)) + (cfeat/check-file-features! (:features file) (:features params))) + + file (cond-> file + (= :share-link (:type perms)) + (update :data remove-not-allowed-pages (:pages perms)) + + :always + (update :data select-keys [:id :options :pages :pages-index :components])) -(defn- get-bundle - [conn file-id profile-id features] - (let [file (files/get-file conn file-id features) - project (get-project conn (:project-id file)) libs (files/get-file-libraries conn file-id) users (comments/get-file-comments-users conn file-id profile-id) links (->> (db/query conn :share-link {:file-id file-id}) @@ -42,45 +63,19 @@ (dissoc :flags))))) fonts (db/query conn :team-font-variant - {:team-id (:team-id project) + {:team-id (:id team) :deleted-at nil})] - {:file file - :users users + {:users users :fonts fonts :project project :share-links links - :libraries libs})) + :libraries libs + :file file + :team team + :permissions perms})) -(defn- remove-not-allowed-pages - [data allowed] - (-> data - (update :pages (fn [pages] (filterv #(contains? allowed %) pages))) - (update :pages-index select-keys allowed))) - -(defn get-view-only-bundle - [conn {:keys [profile-id file-id share-id features] :as params}] - (let [perms (files/get-permissions conn profile-id file-id share-id) - bundle (-> (get-bundle conn file-id profile-id features) - (assoc :permissions perms))] - - ;; When we have neither profile nor share, we just return a not - ;; found response to the user. - (when-not perms - (ex/raise :type :not-found - :code :object-not-found - :hint "object not found")) - - (update bundle :file - (fn [file] - (cond-> file - (= :share-link (:type perms)) - (update :data remove-not-allowed-pages (:pages perms)) - - :always - (update :data select-keys [:id :options :pages :pages-index :components])))))) - -(sm/def! ::get-view-only-bundle +(def schema:get-view-only-bundle [:map {:title "get-view-only-bundle"} [:file-id ::sm/uuid] [:share-id {:optional true} ::sm/uuid] @@ -89,7 +84,21 @@ (sv/defmethod ::get-view-only-bundle {::rpc/auth false ::doc/added "1.17" - ::sm/params ::get-view-only-bundle} - [{:keys [::db/pool]} {:keys [::rpc/profile-id] :as params}] - (dm/with-open [conn (db/open pool)] - (get-view-only-bundle conn (assoc params :profile-id profile-id)))) + ::sm/params schema:get-view-only-bundle} + [system {:keys [::rpc/profile-id file-id share-id] :as params}] + (db/run! system (fn [{:keys [::db/conn] :as system}] + (let [perms (files/get-permissions conn profile-id file-id share-id) + params (-> params + (assoc ::perms perms) + (assoc :profile-id profile-id))] + + ;; When we have neither profile nor share, we just return a not + ;; found response to the user. + (when-not perms + (ex/raise :type :not-found + :code :object-not-found + :hint "object not found")) + + (get-view-only-bundle system params))))) + + From f370f28ca62590e4e23a96c8be8cd9be07d95b68 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 8 Nov 2023 13:33:19 +0100 Subject: [PATCH 06/13] :sparkles: Add improvements to the tmp file deletion scheduling --- backend/src/app/storage/s3.clj | 2 +- backend/src/app/storage/tmp.clj | 27 ++++++++++++++------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/backend/src/app/storage/s3.clj b/backend/src/app/storage/s3.clj index ffd873c42c..b477686ce0 100644 --- a/backend/src/app/storage/s3.clj +++ b/backend/src/app/storage/s3.clj @@ -313,7 +313,7 @@ ;; to the filesystem and then read with buffered inputstream; if ;; not, read the contento into memory using bytearrays. (if (> ^long size (* 1024 1024 2)) - (let [path (tmp/tempfile :prefix "penpot.storage.s3.") + (let [path (tmp/tempfile :prefix "penpot.storage.s3." :min-age "6h") rxf (AsyncResponseTransformer/toFile ^Path path)] (->> (.getObject ^S3AsyncClient client ^GetObjectRequest gor diff --git a/backend/src/app/storage/tmp.clj b/backend/src/app/storage/tmp.clj index 3c1f46af84..43c9259d34 100644 --- a/backend/src/app/storage/tmp.clj +++ b/backend/src/app/storage/tmp.clj @@ -42,14 +42,15 @@ (defn- io-loop [{:keys [::min-age] :as cfg}] - (l/info :hint "started tmp file cleaner") + (l/inf :hint "started tmp cleaner" :default-min-age (dt/format-duration min-age)) (try (loop [] - (when-let [path (sp/take! queue)] - (l/debug :hint "schedule tempfile deletion" :path path + (when-let [[path min-age'] (sp/take! queue)] + (let [min-age (or min-age' min-age)] + (l/dbg :hint "schedule tempfile deletion" :path path :expires-at (dt/plus (dt/now) min-age)) - (px/schedule! (inst-ms min-age) (partial remove-temp-file cfg path)) - (recur))) + (px/schedule! (inst-ms min-age) (partial remove-temp-file cfg path)) + (recur)))) (catch InterruptedException _ (l/trace :hint "cleaner interrupted")) (finally @@ -57,11 +58,11 @@ (defn- remove-temp-file "Permanently delete tempfile" - [{:keys [::wrk/executor path]}] + [{:keys [::wrk/executor]} path] (when (fs/exists? path) (px/run! executor (fn [] - (l/debug :hint "permanently delete tempfile" :path path) + (l/dbg :hint "permanently delete tempfile" :path path) (fs/delete path))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -70,17 +71,17 @@ (defn tempfile "Returns a tmpfile candidate (without creating it)" - [& {:keys [suffix prefix] + [& {:keys [suffix prefix min-age] :or {prefix "penpot." suffix ".tmp"}}] - (let [candidate (fs/tempfile :suffix suffix :prefix prefix)] - (sp/offer! queue candidate) - candidate)) + (let [path (fs/tempfile :suffix suffix :prefix prefix)] + (sp/offer! queue [path (some-> min-age dt/duration)]) + path)) (defn create-tempfile - [& {:keys [suffix prefix] + [& {:keys [suffix prefix min-age] :or {prefix "penpot." suffix ".tmp"}}] (let [path (fs/create-tempfile :suffix suffix :prefix prefix)] - (sp/offer! queue path) + (sp/offer! queue [path (some-> min-age dt/duration)]) path)) From aadd312e39fd72b12529ac51f381b6cea8e10516 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 8 Nov 2023 13:37:02 +0100 Subject: [PATCH 07/13] :bug: Fix team image uploading --- backend/src/app/rpc/commands/teams.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/app/rpc/commands/teams.clj b/backend/src/app/rpc/commands/teams.clj index d0271d93a5..39dc53495f 100644 --- a/backend/src/app/rpc/commands/teams.clj +++ b/backend/src/app/rpc/commands/teams.clj @@ -651,7 +651,7 @@ (defn update-team-photo [{:keys [::db/pool ::sto/storage] :as cfg} {:keys [profile-id team-id] :as params}] - (let [team (get-team pool profile-id team-id) + (let [team (get-team cfg :profile-id profile-id :team-id team-id) photo (profile/upload-photo cfg params)] (db/with-atomic [conn pool] From fbdba39be9e7787cf00312219657c6ac8efb6a6d Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 8 Nov 2023 13:48:41 +0100 Subject: [PATCH 08/13] :bug: Fix importation of zip files --- backend/src/app/rpc/commands/files_temp.clj | 73 ++++++++++++------- .../src/app/main/ui/dashboard/import.cljs | 6 +- frontend/src/app/worker/import.cljs | 20 +++-- 3 files changed, 64 insertions(+), 35 deletions(-) diff --git a/backend/src/app/rpc/commands/files_temp.clj b/backend/src/app/rpc/commands/files_temp.clj index 85902a0faf..83cbfea033 100644 --- a/backend/src/app/rpc/commands/files_temp.clj +++ b/backend/src/app/rpc/commands/files_temp.clj @@ -7,21 +7,26 @@ (ns app.rpc.commands.files-temp (:require [app.common.exceptions :as ex] + [app.common.features :as cfeat] [app.common.pages :as cp] [app.common.spec :as us] [app.common.uuid :as uuid] + [app.config :as cf] [app.db :as db] [app.rpc :as-alias rpc] [app.rpc.commands.files :as files] - [app.rpc.commands.files-create :refer [create-file]] + [app.rpc.commands.files-create :as files.create] [app.rpc.commands.files-update :as-alias files.update] [app.rpc.commands.projects :as projects] + [app.rpc.commands.teams :as teams] [app.rpc.doc :as-alias doc] [app.util.blob :as blob] [app.util.services :as sv] [app.util.time :as dt] + [clojure.set :as set] [clojure.spec.alpha :as s])) + ;; --- MUTATION COMMAND: create-temp-file (s/def ::create-page ::us/boolean) @@ -38,25 +43,35 @@ (sv/defmethod ::create-temp-file {::doc/added "1.17" ::doc/module :files} - [{:keys [::db/pool] :as cfg} {:keys [::rpc/profile-id project-id] :as params}] - (db/with-atomic [conn pool] - (projects/check-edition-permissions! conn profile-id project-id) - (create-file conn (assoc params :profile-id profile-id :deleted-at (dt/in-future {:days 1}))))) + [cfg {:keys [::rpc/profile-id project-id] :as params}] + (db/tx-run! cfg (fn [{:keys [::db/conn] :as cfg}] + (projects/check-edition-permissions! conn profile-id project-id) + (let [team (teams/get-team cfg + :profile-id profile-id + :project-id project-id) + + ;; When we create files, we only need to respect the team + ;; features, because some features can be enabled + ;; globally, but the team is still not migrated properly. + features (-> (cfeat/get-team-enabled-features cf/flags team) + (cfeat/check-client-features! (:features params))) + + ;; We also include all no migration features declared by + ;; client; that enables the ability to enable a runtime + ;; feature on frontend and make it permanent on file + features (-> (:features params #{}) + (set/intersection cfeat/no-migration-features) + (set/union features)) + + params (-> params + (assoc :profile-id profile-id) + (assoc :deleted-at (dt/in-future {:days 1})) + (assoc :features features))] + + (files.create/create-file cfg params))))) ;; --- MUTATION COMMAND: update-temp-file -(defn update-temp-file - [conn {:keys [profile-id session-id id revn changes] :as params}] - (db/insert! conn :file-change - {:id (uuid/next) - :session-id session-id - :profile-id profile-id - :created-at (dt/now) - :file-id id - :revn revn - :data nil - :changes (blob/encode changes)})) - (s/def ::update-temp-file (s/keys :req [::rpc/profile-id] :req-un [::files.update/changes @@ -67,10 +82,18 @@ (sv/defmethod ::update-temp-file {::doc/added "1.17" ::doc/module :files} - [{:keys [::db/pool] :as cfg} {:keys [::rpc/profile-id] :as params}] - (db/with-atomic [conn pool] - (update-temp-file conn (assoc params :profile-id profile-id)) - nil)) + [cfg {:keys [::rpc/profile-id session-id id revn changes] :as params}] + (db/tx-run! cfg (fn [{:keys [::db/conn]}] + (db/insert! conn :file-change + {:id (uuid/next) + :session-id session-id + :profile-id profile-id + :created-at (dt/now) + :file-id id + :revn revn + :data nil + :changes (blob/encode changes)}) + nil))) ;; --- MUTATION COMMAND: persist-temp-file @@ -105,7 +128,7 @@ (sv/defmethod ::persist-temp-file {::doc/added "1.17" ::doc/module :files} - [{:keys [::db/pool] :as cfg} {:keys [::rpc/profile-id id] :as params}] - (db/with-atomic [conn pool] - (files/check-edition-permissions! conn profile-id id) - (persist-temp-file conn params))) + [cfg {:keys [::rpc/profile-id id] :as params}] + (db/tx-run! cfg (fn [{:keys [::db/conn]}] + (files/check-edition-permissions! conn profile-id id) + (persist-temp-file conn params)))) diff --git a/frontend/src/app/main/ui/dashboard/import.cljs b/frontend/src/app/main/ui/dashboard/import.cljs index 57aba1b11b..120119193b 100644 --- a/frontend/src/app/main/ui/dashboard/import.cljs +++ b/frontend/src/app/main/ui/dashboard/import.cljs @@ -13,6 +13,7 @@ [app.main.data.events :as ev] [app.main.data.messages :as msg] [app.main.data.modal :as modal] + [app.main.features :as features] [app.main.store :as st] [app.main.ui.components.file-uploader :refer [file-uploader]] [app.main.ui.icons :as i] @@ -272,7 +273,8 @@ (->> (uw/ask-many! {:cmd :import-files :project-id project-id - :files files}) + :files files + :features @features/features-ref}) (rx/subs (fn [{:keys [file-id status message errors] :as msg}] (swap! state update :files update-status file-id status message errors)))))) @@ -347,7 +349,7 @@ success-files (->> files (filter #(and (= (:status %) :import-finish) (empty? (:errors %)))) count) pending-analysis? (> (->> files (filter #(= (:status %) :analyzing)) count) 0) pending-import? (> num-importing 0) - + valid-files? (or (some? template) (> (+ (->> files (filterv (fn [x] (not= (:status x) :analyze-error))) count)) 0))] diff --git a/frontend/src/app/worker/import.cljs b/frontend/src/app/worker/import.cljs index e52e1c508f..8e46f3846a 100644 --- a/frontend/src/app/worker/import.cljs +++ b/frontend/src/app/worker/import.cljs @@ -126,10 +126,9 @@ (defn create-file "Create a new file on the back-end" - [context] + [context features] (let [resolve-fn (:resolve context) - file-id (resolve-fn (:file-id context)) - features (into #{} (:features context))] + file-id (resolve-fn (:file-id context))] (rp/cmd! :create-temp-file {:id file-id :name (:name context) @@ -575,14 +574,14 @@ (rx/tap #(rx/end! progress-str)))])) (defn create-files - [context files] + [{:keys [features] :as context} files] (let [data (group-by :file-id files)] (rx/concat (->> (rx/from files) (rx/map #(merge context %)) (rx/flat-map (fn [context] - (->> (create-file context) + (->> (create-file context features) (rx/map #(vector % (first (get data (:file-id context))))))))) (->> (rx/from files) @@ -641,10 +640,11 @@ (rx/of {:uri (:uri file) :error error})))))))))) (defmethod impl/handler :import-files - [{:keys [project-id files]}] + [{:keys [project-id files features]}] (let [context {:project-id project-id - :resolve (resolve-factory)} + :resolve (resolve-factory) + :features features} zip-files (filter #(= "application/zip" (:type %)) files) binary-files (filter #(= "application/octet-stream" (:type %)) files)] @@ -691,5 +691,9 @@ (rx/catch (fn [cause] (log/error :hint "unexpected error on import process" :project-id project-id - :cause cause)))))) + :cause cause) + (if (map? cause) + (js/console.error (pr-str cause)) + (js/console.error cause))))))) + From 3b463f334c374c9df05ad2baf6307b8b8763b670 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 8 Nov 2023 13:49:15 +0100 Subject: [PATCH 09/13] :sparkles: Add minor improvement to s3 storage upload thread Start using virtual threads --- backend/src/app/storage/s3.clj | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/app/storage/s3.clj b/backend/src/app/storage/s3.clj index b477686ce0..3a5cdacd03 100644 --- a/backend/src/app/storage/s3.clj +++ b/backend/src/app/storage/s3.clj @@ -226,6 +226,7 @@ [id subscriber sem content] (px/thread {:name "penpot/s3/uploader" + :virtual true :daemon true} (l/trace :hint "start upload thread" :object-id (str id) From da68eae7c681e0f1ae1f993971f747ac9305e3e1 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 8 Nov 2023 15:15:09 +0100 Subject: [PATCH 10/13] :sparkles: Add proper climit configuration for file-thumbnails --- backend/resources/climit.edn | 3 + backend/src/app/rpc/climit.clj | 82 +++++++++---------- .../src/app/rpc/commands/files_thumbnails.clj | 14 +++- 3 files changed, 51 insertions(+), 48 deletions(-) diff --git a/backend/resources/climit.edn b/backend/resources/climit.edn index 5802af5e3b..4a485b8f7d 100644 --- a/backend/resources/climit.edn +++ b/backend/resources/climit.edn @@ -10,5 +10,8 @@ :process-font {:permits 4 :queue 32} :process-image {:permits 8 :queue 32} + :file-thumbnail-ops + {:permits 2} + :submit-audit-events-by-profile {:permits 1 :queue 3}} diff --git a/backend/src/app/rpc/climit.clj b/backend/src/app/rpc/climit.clj index 060ab00154..279723d57e 100644 --- a/backend/src/app/rpc/climit.clj +++ b/backend/src/app/rpc/climit.clj @@ -35,7 +35,7 @@ [{:keys [::wrk/executor]} config] (letfn [(load-fn [key] (let [config (get config (nth key 0))] - (l/trace :hint "insert into cache" :key key) + (l/trc :hint "insert into cache" :key key) (pbh/create :permits (or (:permits config) (:concurrency config)) :queue (or (:queue config) (:queue-size config)) :timeout (:timeout config) @@ -43,7 +43,7 @@ :type (:type config :semaphore)))) (on-remove [_ _ cause] - (l/trace :hint "evict from cache" :key key :reason (str cause)))] + (l/trc :hint "evict from cache" :key key :reason (str cause)))] (cache/create :executor :same-thread :on-remove on-remove @@ -71,7 +71,7 @@ [_ {:keys [::path ::mtx/metrics ::wrk/executor] :as cfg}] (when (contains? cf/flags :rpc-climit) (when-let [params (some->> path slurp edn/read-string)] - (l/info :hint "initializing concurrency limit" :config (str path)) + (l/inf :hint "initializing concurrency limit" :config (str path)) (us/verify! ::config params) {::cache (create-bulkhead-cache cfg params) ::config params @@ -99,15 +99,15 @@ (fn [] (let [elapsed (tpoint) stats (pbh/get-stats limiter)] - (l/trace :hint "executed" - :id (name id) - :key key - :fnh (hash f) - :permits (:permits stats) - :queue (:queue stats) - :max-permits (:max-permits stats) - :max-queue (:max-queue stats) - :elapsed (dt/format-duration elapsed)) + (l/trc :hint "executed" + :id (name id) + :key key + :fnh (hash f) + :permits (:permits stats) + :queue (:queue stats) + :max-permits (:max-permits stats) + :max-queue (:max-queue stats) + :elapsed (dt/format-duration elapsed)) (mtx/run! metrics :id :rpc-climit-timing :val (inst-ms elapsed) @@ -116,15 +116,15 @@ (f) (finally (let [elapsed (tpoint)] - (l/trace :hint "finished" - :id (name id) - :key key - :fnh (hash f) - :permits (:permits stats) - :queue (:queue stats) - :max-permits (:max-permits stats) - :max-queue (:max-queue stats) - :elapsed (dt/format-duration elapsed))))))) + (l/trc :hint "finished" + :id (name id) + :key key + :fnh (hash f) + :permits (:permits stats) + :queue (:queue stats) + :max-permits (:max-permits stats) + :max-queue (:max-queue stats) + :elapsed (dt/format-duration elapsed))))))) measure! (fn [stats] (mtx/run! metrics @@ -139,14 +139,14 @@ (try (let [stats (pbh/get-stats limiter)] (measure! stats) - (l/trace :hint "enqueued" - :id (name id) - :key key - :fnh (hash f) - :permits (:permits stats) - :queue (:queue stats) - :max-permits (:max-permits stats) - :max-queue (:max-queue stats)) + (l/trc :hint "enqueued" + :id (name id) + :key key + :fnh (hash f) + :permits (:permits stats) + :queue (:queue stats) + :max-permits (:max-permits stats) + :max-queue (:max-queue stats)) (pbh/invoke! limiter wrapped)) (catch ExceptionInfo cause (let [{:keys [type code]} (ex-data cause)] @@ -193,13 +193,6 @@ (app.rpc.climit/run! (^:once fn* [] ~@body))) `(run! ~instance (^:once fn* [] ~@body)))) -(defmacro with-dispatch - "Dispatch blocking operation to a separated thread protected with - the specified semaphore. - DEPRECATED" - [& params] - `(with-dispatch! ~@params)) - (def noop-fn (constantly nil)) (defn wrap @@ -207,18 +200,19 @@ (if (and (some? climit) (some? id)) (if-let [config (get-in climit [::config id])] (let [cache (::cache climit)] - (l/debug :hint "wrap: instrumenting method" - :limit (name id) - :service-name (::sv/name mdata) - :timeout (:timeout config) - :permits (:permits config) - :queue (:queue config) - :keyed? (some? key-fn)) + (l/dbg :hint "instrumenting method" + :limit (name id) + :service-name (::sv/name mdata) + :timeout (:timeout config) + :permits (:permits config) + :queue (:queue config) + :keyed? (not= key-fn noop-fn)) + (fn [cfg params] (invoke! cache metrics id (key-fn params) (partial f cfg params)))) (do - (l/warn :hint "no config found for specified queue" :id id) + (l/wrn :hint "no config found for specified queue" :id id) f)) f)) diff --git a/backend/src/app/rpc/commands/files_thumbnails.clj b/backend/src/app/rpc/commands/files_thumbnails.clj index d4475a6358..da5511c65e 100644 --- a/backend/src/app/rpc/commands/files_thumbnails.clj +++ b/backend/src/app/rpc/commands/files_thumbnails.clj @@ -20,6 +20,7 @@ [app.loggers.webhooks :as-alias webhooks] [app.media :as media] [app.rpc :as-alias rpc] + [app.rpc.climit :as-alias climit] [app.rpc.commands.files :as files] [app.rpc.commands.teams :as teams] [app.rpc.cond :as-alias cond] @@ -262,8 +263,10 @@ [:tag {:optional true} :string]]) (sv/defmethod ::create-file-object-thumbnail - {:doc/added "1.19" + {::doc/added "1.19" ::doc/module :files + ::climit/id :file-thumbnail-ops + ::climit/key-fn ::rpc/profile-id ::audit/skip true ::sm/params schema:create-file-object-thumbnail} @@ -288,9 +291,8 @@ {:file-id file-id :object-id object-id} {::db/for-update? true})] - (when media-id - (sto/del-object! storage media-id)) + (sto/del-object! storage media-id) (db/delete! conn :file-tagged-object-thumbnail {:file-id file-id :object-id object-id}) @@ -301,8 +303,10 @@ :req-un [::file-id ::object-id])) (sv/defmethod ::delete-file-object-thumbnail - {:doc/added "1.19" + {::doc/added "1.19" ::doc/module :files + ::climit/id :file-thumbnail-ops + ::climit/key-fn ::rpc/profile-id ::audit/skip true} [{:keys [::db/pool] :as cfg} {:keys [::rpc/profile-id file-id object-id]}] @@ -351,6 +355,8 @@ {::doc/added "1.19" ::doc/module :files ::audit/skip true + ::climit/id :file-thumbnail-ops + ::climit/key-fn ::rpc/profile-id ::sm/params [:map {:title "create-file-thumbnail"} [:file-id ::sm/uuid] [:revn :int] From 76a2e9609fb2bdb0c09ace4aaa97b25ea9404424 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 8 Nov 2023 16:10:58 +0100 Subject: [PATCH 11/13] :arrow_up: Update dependencies --- backend/deps.edn | 10 +- common/deps.edn | 24 ++-- common/package.json | 2 +- common/yarn.lock | 8 +- exporter/deps.edn | 4 +- exporter/package.json | 2 +- exporter/yarn.lock | 328 +++++++++++++++++------------------------- frontend/deps.edn | 2 +- frontend/package.json | 2 +- frontend/yarn.lock | 8 +- 10 files changed, 164 insertions(+), 226 deletions(-) diff --git a/backend/deps.edn b/backend/deps.edn index b37b71a224..ea29b77905 100644 --- a/backend/deps.edn +++ b/backend/deps.edn @@ -4,7 +4,7 @@ :deps {penpot/common {:local/root "../common"} org.clojure/clojure {:mvn/version "1.12.0-alpha5"} - com.github.luben/zstd-jni {:mvn/version "1.5.5-5"} + com.github.luben/zstd-jni {:mvn/version "1.5.5-10"} io.prometheus/simpleclient {:mvn/version "0.16.0"} io.prometheus/simpleclient_hotspot {:mvn/version "0.16.0"} @@ -24,12 +24,12 @@ :git/url "https://github.com/funcool/yetti.git" :exclusions [org.slf4j/slf4j-api]} - com.github.seancorfield/next.jdbc {:mvn/version "1.3.883"} + com.github.seancorfield/next.jdbc {:mvn/version "1.3.894"} metosin/reitit-core {:mvn/version "0.6.0"} org.postgresql/postgresql {:mvn/version "42.6.0"} - com.zaxxer/HikariCP {:mvn/version "5.0.1"} + com.zaxxer/HikariCP {:mvn/version "5.1.0"} io.whitfin/siphash {:mvn/version "2.0.0"} @@ -38,7 +38,7 @@ com.github.ben-manes.caffeine/caffeine {:mvn/version "3.1.8"} - org.jsoup/jsoup {:mvn/version "1.16.1"} + org.jsoup/jsoup {:mvn/version "1.16.2"} org.im4java/im4java {:git/tag "1.4.0-penpot-2" :git/sha "e2b3e16" @@ -49,7 +49,7 @@ org.clojars.pntblnk/clj-ldap {:mvn/version "0.0.17"} dawran6/emoji {:mvn/version "0.1.5"} - markdown-clj/markdown-clj {:mvn/version "1.11.4"} + markdown-clj/markdown-clj {:mvn/version "1.11.7"} ;; Pretty Print specs pretty-spec/pretty-spec {:mvn/version "0.1.4"} diff --git a/common/deps.edn b/common/deps.edn index 8ffce485be..41f1ced96a 100644 --- a/common/deps.edn +++ b/common/deps.edn @@ -7,19 +7,19 @@ org.clojure/data.fressian {:mvn/version "1.0.0"} ;; Logging - org.apache.logging.log4j/log4j-api {:mvn/version "2.20.0"} - org.apache.logging.log4j/log4j-core {:mvn/version "2.20.0"} - org.apache.logging.log4j/log4j-web {:mvn/version "2.20.0"} - org.apache.logging.log4j/log4j-jul {:mvn/version "2.20.0"} - org.apache.logging.log4j/log4j-slf4j2-impl {:mvn/version "2.20.0"} - org.slf4j/slf4j-api {:mvn/version "2.0.7"} - pl.tkowalcz.tjahzi/log4j2-appender {:mvn/version "0.9.30"} + org.apache.logging.log4j/log4j-api {:mvn/version "2.21.1"} + org.apache.logging.log4j/log4j-core {:mvn/version "2.21.1"} + org.apache.logging.log4j/log4j-web {:mvn/version "2.21.1"} + org.apache.logging.log4j/log4j-jul {:mvn/version "2.21.1"} + org.apache.logging.log4j/log4j-slf4j2-impl {:mvn/version "2.21.1"} + org.slf4j/slf4j-api {:mvn/version "2.0.9"} + pl.tkowalcz.tjahzi/log4j2-appender {:mvn/version "0.9.32"} selmer/selmer {:mvn/version "1.12.59"} criterium/criterium {:mvn/version "0.4.6"} - metosin/jsonista {:mvn/version "0.3.7"} - metosin/malli {:mvn/version "0.11.0"} + metosin/jsonista {:mvn/version "0.3.8"} + metosin/malli {:mvn/version "0.13.0"} expound/expound {:mvn/version "0.9.0"} com.cognitect/transit-clj {:mvn/version "1.0.333"} @@ -28,7 +28,7 @@ integrant/integrant {:mvn/version "0.8.1"} org.apache.commons/commons-pool2 {:mvn/version "2.12.0"} - org.graalvm.js/js {:mvn/version "23.0.1"} + org.graalvm.js/js {:mvn/version "23.0.2"} funcool/tubax {:mvn/version "2021.05.20-0"} funcool/cuerdas {:mvn/version "2022.06.16-403"} @@ -38,7 +38,7 @@ funcool/datoteka {:mvn/version "3.0.66" :exclusions [funcool/promesa]} - lambdaisland/uri {:mvn/version "1.15.125" + lambdaisland/uri {:mvn/version "1.16.134" :exclusions [org.clojure/data.json]} frankiesardo/linked {:mvn/version "1.3.0"} @@ -55,7 +55,7 @@ {:dev {:extra-deps {org.clojure/tools.namespace {:mvn/version "RELEASE"} - thheller/shadow-cljs {:mvn/version "2.25.3"} + thheller/shadow-cljs {:mvn/version "2.25.10"} com.bhauman/rebel-readline {:mvn/version "RELEASE"} criterium/criterium {:mvn/version "RELEASE"} mockery/mockery {:mvn/version "RELEASE"}} diff --git a/common/package.json b/common/package.json index ce7e549b0b..b59a3010f6 100644 --- a/common/package.json +++ b/common/package.json @@ -14,7 +14,7 @@ "test": "yarn run test:compile && yarn run test:run" }, "devDependencies": { - "shadow-cljs": "2.25.3", + "shadow-cljs": "2.25.10", "source-map-support": "^0.5.21", "ws": "^8.13.0" } diff --git a/common/yarn.lock b/common/yarn.lock index 2831c20617..1e216e4d04 100644 --- a/common/yarn.lock +++ b/common/yarn.lock @@ -538,10 +538,10 @@ shadow-cljs-jar@1.3.4: resolved "https://registry.yarnpkg.com/shadow-cljs-jar/-/shadow-cljs-jar-1.3.4.tgz#0939d91c468b4bc5eab5a958f79e7ef5696fdf62" integrity sha512-cZB2pzVXBnhpJ6PQdsjO+j/MksR28mv4QD/hP/2y1fsIa9Z9RutYgh3N34FZ8Ktl4puAXaIGlct+gMCJ5BmwmA== -shadow-cljs@2.25.3: - version "2.25.3" - resolved "https://registry.yarnpkg.com/shadow-cljs/-/shadow-cljs-2.25.3.tgz#2eccaa6ecd06dfbcfe73a3987ea6ba480fbd0e26" - integrity sha512-vqziimWfQl6WbVq/mJbbIO7W9pg8tZrKxtehoA2kS713ro1PlZxGrZoKfrxCw9T03zgHrO/Zmh/y8GLtqKUbLQ== +shadow-cljs@2.25.10: + version "2.25.10" + resolved "https://registry.yarnpkg.com/shadow-cljs/-/shadow-cljs-2.25.10.tgz#69c87fc0b097da7c7e580c27cf306aa8f3b36d0a" + integrity sha512-EjqAEVc+YALo9w4zDPL4wBIECmpO4L7cvd1ppSziRySsOEo4u2HKg3nPqe7xo0WzHE53woGGLLNcygM6sxtUxg== dependencies: node-libs-browser "^2.2.1" readline-sync "^1.4.7" diff --git a/exporter/deps.edn b/exporter/deps.edn index e1e5d3ee9f..117b839b79 100644 --- a/exporter/deps.edn +++ b/exporter/deps.edn @@ -3,7 +3,7 @@ {penpot/common {:local/root "../common"} org.clojure/clojure {:mvn/version "1.11.1"} binaryage/devtools {:mvn/version "RELEASE"} - metosin/reitit-core {:mvn/version "0.5.18"} + metosin/reitit-core {:mvn/version "0.6.0"} funcool/beicon {:mvn/version "2021.07.05-1"} } :aliases @@ -15,7 +15,7 @@ :dev {:extra-deps - {thheller/shadow-cljs {:mvn/version "2.25.3"}}} + {thheller/shadow-cljs {:mvn/version "2.25.10"}}} :shadow-cljs {:main-opts ["-m" "shadow.cljs.devtools.cli"]} diff --git a/exporter/package.json b/exporter/package.json index f65f033251..883cb33d43 100644 --- a/exporter/package.json +++ b/exporter/package.json @@ -21,7 +21,7 @@ "xregexp": "^5.1.1" }, "devDependencies": { - "shadow-cljs": "^2.25.3", + "shadow-cljs": "^2.25.10", "source-map-support": "^0.5.21" } } diff --git a/exporter/yarn.lock b/exporter/yarn.lock index 1fd28ead29..0952df2af1 100644 --- a/exporter/yarn.lock +++ b/exporter/yarn.lock @@ -15,50 +15,30 @@ resolved "https://registry.yarnpkg.com/@ioredis/commands/-/commands-1.2.0.tgz#6d61b3097470af1fdbbe622795b8921d42018e11" integrity sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg== -archiver-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-2.1.0.tgz#e8a460e94b693c3e3da182a098ca6285ba9249e2" - integrity sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw== +archiver-utils@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-4.0.1.tgz#66ad15256e69589a77f706c90c6dbcc1b2775d2a" + integrity sha512-Q4Q99idbvzmgCTEAAhi32BkOyq8iVI5EwdO0PmBDSGIzzjYNdcFn7Q7k3OzbLy4kLUPXfJtG6fO2RjftXbobBg== dependencies: - glob "^7.1.4" + glob "^8.0.0" graceful-fs "^4.2.0" lazystream "^1.0.0" - lodash.defaults "^4.2.0" - lodash.difference "^4.5.0" - lodash.flatten "^4.4.0" - lodash.isplainobject "^4.0.6" - lodash.union "^4.6.0" - normalize-path "^3.0.0" - readable-stream "^2.0.0" - -archiver-utils@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-3.0.3.tgz#0531e6f64078a325e591886773fa80d72c97df19" - integrity sha512-fXzpEZTKgBJMWy0eUT0/332CAQnJ27OJd7sGcvNZzxS2Yzg7iITivMhXOm+zUTO4vT8ZqlPCqiaLPmB8qWhWRA== - dependencies: - glob "^7.1.4" - graceful-fs "^4.2.0" - lazystream "^1.0.0" - lodash.defaults "^4.2.0" - lodash.difference "^4.5.0" - lodash.flatten "^4.4.0" - lodash.isplainobject "^4.0.6" - lodash.union "^4.6.0" + lodash "^4.17.15" normalize-path "^3.0.0" readable-stream "^3.6.0" archiver@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/archiver/-/archiver-6.0.0.tgz#b366c8a21bdb84932b3913d83d0cc576dd4ec112" - integrity sha512-EPGa+bYaxaMiCT8DCbEDqFz8IjeBSExrJzyUOJx2FBkFJ/OZzJuso3lMSk901M50gMqXxTQcumlGajOFlXhVhw== + version "6.0.1" + resolved "https://registry.yarnpkg.com/archiver/-/archiver-6.0.1.tgz#d56968d4c09df309435adb5a1bbfc370dae48133" + integrity sha512-CXGy4poOLBKptiZH//VlWdFuUC1RESbdZjGjILwBuZ73P7WkAUN0htfSfBq/7k6FRFlpu7bg4JOkj1vU9G6jcQ== dependencies: - archiver-utils "^3.0.0" + archiver-utils "^4.0.1" async "^3.2.4" buffer-crc32 "^0.2.1" readable-stream "^3.6.0" readdir-glob "^1.1.2" - tar-stream "^2.2.0" - zip-stream "^4.1.0" + tar-stream "^3.0.0" + zip-stream "^5.0.1" asn1.js@^5.2.0: version "5.4.1" @@ -79,29 +59,25 @@ assert@^1.1.1: util "0.10.3" async@^3.2.4: - version "3.2.4" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" - integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== + version "3.2.5" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66" + integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg== + +b4a@^1.6.4: + version "1.6.4" + resolved "https://registry.yarnpkg.com/b4a/-/b4a-1.6.4.tgz#ef1c1422cae5ce6535ec191baeed7567443f36c9" + integrity sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw== balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base64-js@^1.0.2, base64-js@^1.3.1: +base64-js@^1.0.2: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== -bl@^4.0.3: - version "4.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" - integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== - dependencies: - buffer "^5.5.0" - inherits "^2.0.4" - readable-stream "^3.4.0" - bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9: version "4.12.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" @@ -112,14 +88,6 @@ bn.js@^5.0.0, bn.js@^5.1.1: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - brace-expansion@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" @@ -193,10 +161,10 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -buffer-crc32@^0.2.1, buffer-crc32@^0.2.13: +buffer-crc32@^0.2.1: version "0.2.13" resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= + integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== buffer-from@^1.0.0: version "1.1.2" @@ -217,14 +185,6 @@ buffer@^4.3.0: ieee754 "^1.1.4" isarray "^1.0.0" -buffer@^5.5.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - builtin-status-codes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" @@ -248,21 +208,16 @@ cluster-key-slot@^1.1.0: resolved "https://registry.yarnpkg.com/cluster-key-slot/-/cluster-key-slot-1.1.0.tgz#30474b2a981fb12172695833052bc0d01336d10d" integrity sha512-2Nii8p3RwAPiFwsnZvukotvow2rIHM+yQ6ZcBXGHdniadkYGZYiGmkHJIbZPIV9nfv7m/U1IPMVVcAhoWFeklw== -compress-commons@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-4.1.1.tgz#df2a09a7ed17447642bad10a85cc9a19e5c42a7d" - integrity sha512-QLdDLCKNV2dtoTorqgxngQCMA+gWXkM/Nwu7FpeBhk/RdkzimqC3jueb/FDmaZeXh+uby1jkBqE3xArsLBE5wQ== +compress-commons@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-5.0.1.tgz#e46723ebbab41b50309b27a0e0f6f3baed2d6590" + integrity sha512-MPh//1cERdLtqwO3pOFLeXtpuai0Y2WCd5AhtKxznqM7WtaMYaOEMSgn45d9D10sIHSfIKE603HlOp8OPGrvag== dependencies: - buffer-crc32 "^0.2.13" - crc32-stream "^4.0.2" + crc-32 "^1.2.0" + crc32-stream "^5.0.0" normalize-path "^3.0.0" readable-stream "^3.6.0" -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - console-browserify@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" @@ -287,22 +242,19 @@ core-js-pure@^3.25.1: integrity sha512-oml3M22pHM+igfWHDfdLVq2ShWmjM2V4L+dQEBs0DWVIqEm9WHCwGAlZ6BmyBQGy5sFrJmcx+856D9lVKyGWYg== core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== crc-32@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.1.tgz#436d2bcaad27bcb6bd073a2587139d3024a16460" - integrity sha512-Dn/xm/1vFFgs3nfrpEVScHoIslO9NZRITWGz/1E/St6u4xw99vfZzVkW0OSnzx2h9egej9xwMCEut6sqwokM/w== - dependencies: - exit-on-epipe "~1.0.1" - printj "~1.3.1" + version "1.2.2" + resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" + integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== -crc32-stream@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-4.0.2.tgz#c922ad22b38395abe9d3870f02fa8134ed709007" - integrity sha512-DxFZ/Hk473b/muq1VJ///PMNLj0ZMnzye9thBpmjpJKCc5eMgB95aK8zCGrGfQ90cWo561Te6HK9D+j4KPdM6w== +crc32-stream@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-5.0.0.tgz#a97d3a802c8687f101c27cc17ca5253327354720" + integrity sha512-B0EPa1UK+qnpBZpG+7FgPCu0J2ETLpXq09o9BkLkEAhdB6Z61Qo4pJ3JYu0c+Qi+/SAL7QThqnzS06pmSSyZaw== dependencies: crc-32 "^1.2.0" readable-stream "^3.4.0" @@ -407,13 +359,6 @@ elliptic@^6.5.3: minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" -end-of-stream@^1.4.1: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - events@^3.0.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" @@ -427,42 +372,41 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: md5.js "^1.3.4" safe-buffer "^5.1.1" -exit-on-epipe@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz#0bdd92e87d5285d267daa8171d0eb06159689692" - integrity sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw== - -fs-constants@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" - integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== +fast-fifo@^1.1.0, fast-fifo@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.3.2.tgz#286e31de96eb96d38a97899815740ba2a4f3640c" + integrity sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ== fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== generic-pool@^3.9.0: version "3.9.0" resolved "https://registry.yarnpkg.com/generic-pool/-/generic-pool-3.9.0.tgz#36f4a678e963f4fdb8707eab050823abc4e8f5e4" integrity sha512-hymDOu5B53XvN4QT9dBmZxPX4CWhBPPLguTZ9MMFeFa/Kg0xWVfylOVNlJji/E7yTZWFd/q9GO5TxDLq156D7g== -glob@^7.1.4: - version "7.2.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" - integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== +glob@^8.0.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "^3.0.4" + minimatch "^5.0.1" once "^1.3.0" - path-is-absolute "^1.0.0" graceful-fs@^4.2.0: - version "4.2.9" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96" - integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ== + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== hash-base@^3.0.0: version "3.1.0" @@ -513,20 +457,20 @@ iconv-lite@0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -ieee754@^1.1.13, ieee754@^1.1.4: +ieee754@^1.1.4: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== inflation@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/inflation/-/inflation-2.0.0.tgz#8b417e47c28f925a45133d914ca1fd389107f30f" - integrity sha1-i0F+R8KPklpFEz2RTKH9OJEH8w8= + version "2.1.0" + resolved "https://registry.yarnpkg.com/inflation/-/inflation-2.1.0.tgz#9214db11a47e6f756d111c4f9df96971c60f886c" + integrity sha512-t54PPJHG1Pp7VQvxyVCJ9mBbjG3Hqryges9bXoOO6GExCPa+//i/d5GSuFtpx3ALLd7lgIAur6zrIlBQyJuMlQ== inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== dependencies: once "^1.3.0" wrappy "1" @@ -588,37 +532,22 @@ lazystream@^1.0.0: lodash.defaults@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" - integrity sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw= - -lodash.difference@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.difference/-/lodash.difference-4.5.0.tgz#9ccb4e505d486b91651345772885a2df27fd017c" - integrity sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw= - -lodash.flatten@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" - integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= + integrity sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ== lodash.isarguments@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" integrity sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo= -lodash.isplainobject@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" - integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs= - -lodash.union@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88" - integrity sha1-SLtQiECfFvGCFmZkHETdGqrjzYg= +lodash@^4.17.15: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== luxon@^3.4.2: - version "3.4.2" - resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.4.2.tgz#f5bcab779f3d6a943ee7c8621c2b416bc10abd24" - integrity sha512-uBoAVCVcajsrqy3pv7eo5jEUz1oeLmCcnMv8n4AJpT5hbpN9lUssAXibNElpbLce3Mhm9dyBzwYLs9zctM/0tA== + version "3.4.3" + resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.4.3.tgz#8ddf0358a9492267ffec6a13675fbaab5551315d" + integrity sha512-tFWBiv3h7z+T/tDaoxA8rqTxy1CHV6gHS//QdaH4pulbq/JuBSGgQspQQqcgnwdAx6pNI7cmvz5Sv/addzHmUg== md5.js@^1.3.4: version "1.3.5" @@ -647,14 +576,7 @@ minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= -minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^5.1.0: +minimatch@^5.0.1, minimatch@^5.1.0: version "5.1.6" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== @@ -705,10 +627,10 @@ object-assign@^4.1.1: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= -once@^1.3.0, once@^1.4.0: +once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" @@ -738,11 +660,6 @@ path-browserify@0.0.1: resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" integrity sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ== -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - pbkdf2@^3.0.3: version "3.1.2" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" @@ -754,22 +671,19 @@ pbkdf2@^3.0.3: safe-buffer "^5.0.1" sha.js "^2.4.8" -playwright-core@1.37.1: - version "1.37.1" - resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.37.1.tgz#cb517d52e2e8cb4fa71957639f1cd105d1683126" - integrity sha512-17EuQxlSIYCmEMwzMqusJ2ztDgJePjrbttaefgdsiqeLWidjYz9BxXaTaZWxH1J95SHGk6tjE+dwgWILJoUZfA== +playwright-core@1.39.0: + version "1.39.0" + resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.39.0.tgz#efeaea754af4fb170d11845b8da30b2323287c63" + integrity sha512-+k4pdZgs1qiM+OUkSjx96YiKsXsmb59evFoqv8SKO067qBA+Z2s/dCzJij/ZhdQcs2zlTAgRKfeiiLm8PQ2qvw== playwright@^1.37.1: - version "1.37.1" - resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.37.1.tgz#6e488d82d7d98b9127c5db9c701f9c956ab47e76" - integrity sha512-bgUXRrQKhT48zHdxDYQTpf//0xDfDd5hLeEhjuSw8rXEGoT9YeElpfvs/izonTNY21IQZ7d3s22jLxYaAnubbQ== + version "1.39.0" + resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.39.0.tgz#184c81cd6478f8da28bcd9e60e94fcebf566e077" + integrity sha512-naE5QT11uC/Oiq0BwZ50gDmy8c8WLPRTEWuSSFVG2egBka/1qMoSqYQcROMT9zLwJ86oPofcTH2jBY/5wWOgIw== dependencies: - playwright-core "1.37.1" - -printj@~1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/printj/-/printj-1.3.1.tgz#9af6b1d55647a1587ac44f4c1654a4b95b8e12cb" - integrity sha512-GA3TdL8szPK4AQ2YnOe/b+Y1jUFwmmGMMK/qbY7VcE3Z7FU8JstbKiKRzO6CIiAKPhTO8m01NoQ0V5f3jc4OGg== + playwright-core "1.39.0" + optionalDependencies: + fsevents "2.3.2" process-nextick-args@~2.0.0: version "2.0.1" @@ -813,6 +727,11 @@ querystring@0.2.0: resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= +queue-tick@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/queue-tick/-/queue-tick-1.0.1.tgz#f6f07ac82c1fd60f82e098b417a80e52f1f4c142" + integrity sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag== + randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" @@ -838,7 +757,7 @@ raw-body@^2.5.2: iconv-lite "0.4.24" unpipe "1.0.0" -readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.3.3, readable-stream@^2.3.6: +readable-stream@^2.0.2, readable-stream@^2.3.3, readable-stream@^2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -851,10 +770,23 @@ readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.0.5, readable string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== +readable-stream@^2.0.5: + version "2.3.8" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" + integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@^3.4.0, readable-stream@^3.6.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== dependencies: inherits "^2.0.3" string_decoder "^1.1.1" @@ -940,10 +872,10 @@ shadow-cljs-jar@1.3.4: resolved "https://registry.yarnpkg.com/shadow-cljs-jar/-/shadow-cljs-jar-1.3.4.tgz#0939d91c468b4bc5eab5a958f79e7ef5696fdf62" integrity sha512-cZB2pzVXBnhpJ6PQdsjO+j/MksR28mv4QD/hP/2y1fsIa9Z9RutYgh3N34FZ8Ktl4puAXaIGlct+gMCJ5BmwmA== -shadow-cljs@^2.25.3: - version "2.25.3" - resolved "https://registry.yarnpkg.com/shadow-cljs/-/shadow-cljs-2.25.3.tgz#2eccaa6ecd06dfbcfe73a3987ea6ba480fbd0e26" - integrity sha512-vqziimWfQl6WbVq/mJbbIO7W9pg8tZrKxtehoA2kS713ro1PlZxGrZoKfrxCw9T03zgHrO/Zmh/y8GLtqKUbLQ== +shadow-cljs@^2.25.10: + version "2.25.10" + resolved "https://registry.yarnpkg.com/shadow-cljs/-/shadow-cljs-2.25.10.tgz#69c87fc0b097da7c7e580c27cf306aa8f3b36d0a" + integrity sha512-EjqAEVc+YALo9w4zDPL4wBIECmpO4L7cvd1ppSziRySsOEo4u2HKg3nPqe7xo0WzHE53woGGLLNcygM6sxtUxg== dependencies: node-libs-browser "^2.2.1" readline-sync "^1.4.7" @@ -1006,6 +938,14 @@ stream-http@^2.7.2: to-arraybuffer "^1.0.0" xtend "^4.0.0" +streamx@^2.15.0: + version "2.15.2" + resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.15.2.tgz#680eacebdc9c43ede7362c2e6695b34dd413c741" + integrity sha512-b62pAV/aeMjUoRN2C/9F0n+G8AfcJjNC0zw/ZmOHeFsIe4m4GzjVW9m6VHXVjk536NbdU9JRwKMJRfkc+zUFTg== + dependencies: + fast-fifo "^1.1.0" + queue-tick "^1.0.1" + string_decoder@^1.0.0, string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -1020,16 +960,14 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -tar-stream@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" - integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== +tar-stream@^3.0.0: + version "3.1.6" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-3.1.6.tgz#6520607b55a06f4a2e2e04db360ba7d338cc5bab" + integrity sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg== dependencies: - bl "^4.0.3" - end-of-stream "^1.4.1" - fs-constants "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.1.1" + b4a "^1.6.4" + fast-fifo "^1.2.0" + streamx "^2.15.0" timers-browserify@^2.0.4: version "2.0.12" @@ -1074,7 +1012,7 @@ url@^0.11.0: util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== util@0.10.3: version "0.10.3" @@ -1105,7 +1043,7 @@ which@^1.3.1: wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== ws@^7.4.6: version "7.5.3" @@ -1131,11 +1069,11 @@ xtend@^4.0.0: resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== -zip-stream@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-4.1.0.tgz#51dd326571544e36aa3f756430b313576dc8fc79" - integrity sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A== +zip-stream@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-5.0.1.tgz#cf3293bba121cad98be2ec7f05991d81d9f18134" + integrity sha512-UfZ0oa0C8LI58wJ+moL46BDIMgCQbnsb+2PoiJYtonhBsMh2bq1eRBVkvjfVsqbEHd9/EgKPUuL9saSSsec8OA== dependencies: - archiver-utils "^2.1.0" - compress-commons "^4.1.0" + archiver-utils "^4.0.1" + compress-commons "^5.0.1" readable-stream "^3.6.0" diff --git a/frontend/deps.edn b/frontend/deps.edn index fc0e78170d..a12627a053 100644 --- a/frontend/deps.edn +++ b/frontend/deps.edn @@ -35,7 +35,7 @@ :dev {:extra-paths ["dev"] :extra-deps - {thheller/shadow-cljs {:mvn/version "2.25.3"} + {thheller/shadow-cljs {:mvn/version "2.25.10"} org.clojure/tools.namespace {:mvn/version "RELEASE"} cider/cider-nrepl {:mvn/version "0.37.0"}}} diff --git a/frontend/package.json b/frontend/package.json index e6d46b70ce..26123a6a4d 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -54,7 +54,7 @@ "prettier": "^3.0.3", "rimraf": "^5.0.1", "sass": "^1.66.1", - "shadow-cljs": "2.25.3" + "shadow-cljs": "2.25.10" }, "dependencies": { "@sentry/browser": "^6.17.4", diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 3ee87430d5..a6eeea10a4 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -4802,10 +4802,10 @@ shadow-cljs-jar@1.3.4: resolved "https://registry.yarnpkg.com/shadow-cljs-jar/-/shadow-cljs-jar-1.3.4.tgz#0939d91c468b4bc5eab5a958f79e7ef5696fdf62" integrity sha512-cZB2pzVXBnhpJ6PQdsjO+j/MksR28mv4QD/hP/2y1fsIa9Z9RutYgh3N34FZ8Ktl4puAXaIGlct+gMCJ5BmwmA== -shadow-cljs@2.25.3: - version "2.25.3" - resolved "https://registry.yarnpkg.com/shadow-cljs/-/shadow-cljs-2.25.3.tgz#2eccaa6ecd06dfbcfe73a3987ea6ba480fbd0e26" - integrity sha512-vqziimWfQl6WbVq/mJbbIO7W9pg8tZrKxtehoA2kS713ro1PlZxGrZoKfrxCw9T03zgHrO/Zmh/y8GLtqKUbLQ== +shadow-cljs@2.25.10: + version "2.25.10" + resolved "https://registry.yarnpkg.com/shadow-cljs/-/shadow-cljs-2.25.10.tgz#69c87fc0b097da7c7e580c27cf306aa8f3b36d0a" + integrity sha512-EjqAEVc+YALo9w4zDPL4wBIECmpO4L7cvd1ppSziRySsOEo4u2HKg3nPqe7xo0WzHE53woGGLLNcygM6sxtUxg== dependencies: node-libs-browser "^2.2.1" readline-sync "^1.4.7" From 5d93f17efca6abe8757ffd35dad59e4eecb3c108 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 8 Nov 2023 16:25:21 +0100 Subject: [PATCH 12/13] :bug: Fix session renewal mechanism --- backend/src/app/http/session.clj | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/backend/src/app/http/session.clj b/backend/src/app/http/session.clj index ea8002688c..5c10816323 100644 --- a/backend/src/app/http/session.clj +++ b/backend/src/app/http/session.clj @@ -221,12 +221,15 @@ request (cond-> request (some? session) (assoc ::profile-id (:profile-id session) - ::id (:id session)))] + ::id (:id session))) + response (handler request)] - (cond-> (handler request) - (renew-session? session) - (-> (assign-auth-token-cookie session) - (assign-authenticated-cookie session)))))) + (if (renew-session? session) + (let [session (update! manager session)] + (-> response + (assign-auth-token-cookie session) + (assign-authenticated-cookie session))) + response)))) (def soft-auth {:name ::soft-auth From b892242915e88adf6c6c59627d1542d18b9af7f2 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 8 Nov 2023 17:26:47 +0100 Subject: [PATCH 13/13] :bug: Fix rpc climit initialization --- backend/src/app/config.clj | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/app/config.clj b/backend/src/app/config.clj index ed98060d2b..3d109abc4a 100644 --- a/backend/src/app/config.clj +++ b/backend/src/app/config.clj @@ -294,6 +294,7 @@ ::redis-uri ::registration-domain-whitelist ::rpc-rlimit-config + ::rpc-climit-config ::semaphore-process-font ::semaphore-process-image