Commit Graph

60 Commits

Author SHA1 Message Date
Andrey Antukh f457c68355 📎 Backport devenv improvements 2026-06-05 11:44:20 +02:00
Andrey Antukh 947f6d392d 🎉 Add chunked upload support for font variants (#9551)
*  Add additional logging and validation for image upload

* 🎉 Add chunked upload support for font variants

Extend the font variant upload flow across frontend, backend, and common
to support the standardized chunked upload protocol.

**Backend:**
- Add \`:font-max-file-size\` config default (30 MiB) and schema entry
- Add \`validate-font-size!\` in \`media.clj\` (mirrors
  \`validate-media-size!\`, raises \`:font-max-file-size-reached\`)
- Extend \`schema:create-font-variant\` to accept either \`:data\`
  (legacy bytes or chunk-vector) or \`:uploads\` (new chunked session
  map), with a validator requiring exactly one
- Add \`prepare-font-data-from-uploads\`: assembles each chunked
  session via \`cmedia/assemble-chunks\`, validates type+size
- Add \`prepare-font-data-from-legacy\`: normalises legacy byte/chunk
  entries, writing to a tempfile (joining via SequenceInputStream),
  validates type+size
- Add structured logging ("init"/"end") with \`:size\`, \`:mtypes\`,
  and \`:elapsed\` in \`create-font-variant\`

**Frontend:**
- \`upload-blob-chunked\` accepts a per-caller \`:chunk-size\` option
- Add \`font-upload-chunk-size\` (10 MiB) and \`upload-font-variant\`
  fn that uploads each mtype as a separate chunked session
- \`on-upload*\` in dashboard fonts now calls \`upload-font-variant\`
  instead of issuing \`create-font-variant\` RPC directly
- \`process-upload\` stores raw ArrayBuffer instead of chunking
  client-side

**Common:**
- Replace \`"font/opentype"\` with \`"font/woff2"\` in \`font-types\`

**Tests:**
- 25 tests / 224 assertions covering all three upload paths (direct
  bytes, legacy chunk-vector, new chunked sessions), size validation,
  and media type validation

Signed-off-by: Andrey Antukh <niwi@niwi.nz>

* 📎 Add a script for check the commit format locally

---------

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-05-12 18:30:19 +02:00
Andrey Antukh 7ec9261475 Add improvements to AGENTS.md (#8586) 2026-03-11 15:24:40 +01:00
Andrey Antukh 9123d199b7 🐛 Fix scripts/fmt 2025-12-02 17:43:21 +01:00
Andrey Antukh e7029f2182 Make automatic workflows not dependent on yarn 2025-12-01 08:17:52 +01:00
Andrey Antukh e21798f1ed Move all files under frontend directory. 2016-11-20 20:03:17 +01:00
Andrey Antukh 42e87588b6 Elide asserts on production builds. 2016-09-30 23:38:31 +02:00
Andrey Antukh 819fa69ae2 Minor improvements on figwheel script. 2016-09-30 11:33:44 +02:00
Andrey Antukh 9913388116 Fix default connection string on figwheel build script. 2016-08-03 09:27:23 +03:00
Andrey Antukh 7909375eb2 Add missing entry for dist-view command on dist script. 2016-07-29 15:31:37 +03:00
Andrey Antukh aff352335b Minor fixes on build scripts. 2016-07-29 15:17:15 +03:00
Andrey Antukh 58563a41cb Define a new settings for the view application. 2016-07-29 13:45:00 +03:00
Andrey Antukh b3e17bd2b7 Move common constants as uxbox.config ns. 2016-06-30 19:53:01 +03:00
Andrey Antukh 73b901954a Update depencies. 2016-06-22 22:18:25 +03:00
Andrey Antukh ce53bdb867 Set proper defaults for api urls. 2016-06-22 22:18:10 +03:00
Andrey Antukh d5df7eba3b Many changes on scripts. 2016-06-22 21:20:17 +03:00
Andrey Antukh 967b67f0b1 Fix and restructure tests. 2016-06-21 19:31:35 +03:00
Andrey Antukh 1a8e29a0b1 Add missing entry to css-dirs of figwheel config. 2016-06-16 09:20:17 +03:00
Andrey Antukh 149e99f466 Use advanced compilation mode for production. 2016-06-15 22:26:19 +03:00
Andrey Antukh c0cc1d2b81 Improve and adapt build scripts for new view app. 2016-06-15 20:23:39 +03:00
Andrey Antukh b16a649121 Minor fixes on worker build scripts. 2016-06-14 23:57:52 +03:00
Andrey Antukh 9dc94caffd Restructure build scripts for facilitate incorporate more apps. 2016-06-14 23:50:55 +03:00
Andrey Antukh ab36a12385 Enable parallel builds. 2016-06-12 13:40:31 +03:00
Andrey Antukh c13e86c735 Move worker code into uxbox-worker namespace. 2016-06-12 13:38:18 +03:00
Andrey Antukh d8dac5169f Move routes declaration into ui ns.
Leaving router as agnostic helpers impl.
2016-06-12 10:27:05 +03:00
Andrey Antukh 4124f83a22 Use :none as optimization level for watch-bench script. 2016-06-11 18:30:57 +03:00
Andrey Antukh 87f9e8b38d Minor changes on figwheel script. 2016-05-11 00:42:01 +03:00
Andrey Antukh 1aab333eba Fix dist compilation script. 2016-05-08 18:03:37 +03:00
Andrey Antukh f24a80468e Improve tests build scripts. 2016-04-16 11:11:28 +03:00
Andrey Antukh 433d4fe7ee Use :simple optimization level for tests. 2016-04-15 23:39:21 +03:00
Andrey Antukh debc68661a Remove obsolete usage of reader macro #ux/tr. 2016-04-14 21:39:50 +03:00
Andrey Antukh 2ef31f3e08 Improve initial compilation and add worker compilation to dist. 2016-04-11 18:03:34 +03:00
Andrey Antukh 280c272c2a Fix build-worker script. 2016-04-11 17:40:08 +03:00
Andrey Antukh 8916a9b7ac Fix build scripts (related to webworker). 2016-04-11 17:33:24 +03:00
Andrey Antukh 051163c3ae Add webworkers architecture (rcp). 2016-04-10 18:51:13 +03:00
Andrey Antukh d976afda30 Fix wrong filename on watch-tests script. 2016-04-10 18:51:13 +03:00
Andrey Antukh 78e7f57655 Update figwheel.clj 2016-04-09 18:51:54 +03:00
Andrey Antukh c419e9406b Add bench code and update all scripts. 2016-04-08 11:03:29 +03:00
Andrey Antukh 4422974e4a Remporary disable advanced compilation on dist for more easy debugging. 2016-04-03 20:08:18 +03:00
Andrey Antukh aeff49b3e6 Add externs for interop calls and enable advanced compilation. 2016-04-02 23:17:52 +03:00
Andrey Antukh 63f2f3f0a7 Add missing config on dist.clj script. 2016-03-19 17:59:13 +02:00
Andrey Antukh f80c48e679 Add compile time defined url variable for easy config the api url. 2016-03-15 23:00:57 +02:00
Andrey Antukh 0d9d2325cc Move doc and docker script out of this repo. 2016-03-03 23:49:31 +02:00
Andrey Antukh 7b05b54307 Update readme. 2016-03-01 19:50:30 +02:00
Andrey Antukh ce2ac6fe47 More improvements to deploy tasks. 2016-02-21 20:42:01 +02:00
Andrey Antukh c7e09dc13d Setup advanced compilation on dist. 2016-02-21 17:41:40 +02:00
Andrey Antukh 2aa95a3467 Prepare scripts for deploy. 2016-02-21 16:42:35 +02:00
Andrey Antukh 6a1dad581e Disable var and ns clash warning. 2016-02-06 12:24:47 +02:00
Andrey Antukh 1abc0e4239 Replace :whitespace optimization with :none
Because :whitespace is not compatible with nodejs target.
2016-02-04 23:09:27 +02:00
Andrey Antukh 0a64ff9ef3 Replace advanced optimizations with whitespace on tests. 2016-02-04 23:06:26 +02:00