Include features info in exported zipfiles

This commit is contained in:
Andrés Moya 2022-12-01 14:19:27 +01:00
parent 1b8e4dfdfa
commit 94cdd4a481
4 changed files with 14 additions and 14 deletions

View file

@ -24,7 +24,7 @@
(defn create-manifest
"Creates a manifest entry for the given files"
[team-id file-id export-type files]
[team-id file-id export-type files components-v2]
(letfn [(format-page [manifest page]
(-> manifest
(assoc (str (:id page))
@ -37,10 +37,14 @@
(mapv str))
index (->> (get-in file [:data :pages-index])
(vals)
(reduce format-page {}))]
(reduce format-page {}))
features (cond-> []
components-v2
(conj "components/v2"))]
(-> manifest
(assoc (str (:id file))
{:name name
:features features
:shared is-shared
:pages pages
:pagesIndex index
@ -395,7 +399,7 @@
manifest-stream
(->> files-stream
(rx/map #(create-manifest team-id file-id export-type %))
(rx/map #(create-manifest team-id file-id export-type % components-v2))
(rx/map #(vector "manifest.json" %)))
render-stream