Compare commits

..
Author SHA1 Message Date
coolbot100s 7d88cd3a68 Tweak phrasing on servers alert msg 2026-03-01 00:53:55 -08:00
coolbot100s 011e5d8be6 Merge branch 'coolbot/server-project-moderation' of https://github.com/modrinth/code into coolbot/server-project-moderation 2026-02-28 22:17:41 -08:00
coolbot100s ea508eabc3 don't suggest adding a bedrock IP 2026-02-28 22:17:26 -08:00
Truman Gao 89f337997d Merge branch 'truman/linked-server-instances' into coolbot/server-project-moderation
Signed-off-by: Truman Gao <106889354+tdgao@users.noreply.github.com>
2026-02-28 22:09:44 -08:00
tdgao 2e7178a752 update some categories to default collapse 2026-02-28 22:04:25 -08:00
coolbot100s 9fa7398227 Update tags.vue warning for server projects. 2026-02-28 21:46:52 -08:00
coolbot100s dc2dc34043 fixes 2026-02-28 21:32:38 -08:00
coolbot100s 2ba47b25c6 reupload, and status messages + nag tweaks. 2026-02-28 21:31:11 -08:00
coolbot100s 509749c937 support servers' v3 exclusive links 2026-02-28 19:26:51 -08:00
coolbot100s 58dd006e44 Tags nag works with servers now 2026-02-28 19:08:57 -08:00
tdgao 25a6a7b10d fix: get server modpack content wrong link 2026-02-28 18:20:46 -08:00
tdgao 61dd6e86c5 fix: router.push doesn't add history state, use nagivateTo instead 2026-02-28 18:02:26 -08:00
tdgao 0da18cfa86 fix: router.push doesn't add history state, use nagivateTo instead 2026-02-28 17:58:30 -08:00
tdgao fa6ce37446 fix no projectV3 2026-02-28 16:52:24 -08:00
coolbot100s 381a0d210d starting tags + servers msg 2026-02-28 16:19:06 -08:00
coolbot100s 43b6a5231d Merge branch 'truman/linked-server-instances' into coolbot/server-project-moderation 2026-02-28 16:10:42 -08:00
tdgao 30a5a119f0 Merge branch 'truman/linked-server-instances' of github.com:modrinth/code into truman/linked-server-instances 2026-02-28 16:08:36 -08:00
tdgao 8262a22cce feat: add the concept of linked worlds for server instances and keep in sync with server project 2026-02-28 16:08:33 -08:00
aecsocket 667513ee18 skip license check for server projects 2026-02-28 23:57:33 +00:00
aecsocket 8372b8a792 server projects are not marked as modpacks 2026-02-28 23:57:33 +00:00
tdgao a6a53a107a fix showing modpack/loader version for server instance in installation settings 2026-02-28 15:46:27 -08:00
tdgao 7428863965 update instance online players to be client ping 2026-02-28 14:57:52 -08:00
tdgao 3db890e44f revert any handling for handling base linked modpack content for content tab 2026-02-28 14:40:12 -08:00
tdgao 785987e31d fix open in browser 2026-02-28 14:25:15 -08:00
tdgao 2ba34d1c2c Revert "update redirect middleware no longer needs projectV3"
This reverts commit 1289cb5286.
2026-02-28 14:24:51 -08:00
coolbot100s 2a379e9eae Merge branch 'truman/linked-server-instances' into coolbot/server-project-moderation 2026-02-28 14:20:29 -08:00
tdgao 41a073f02f feat: add the mf icons finally 2026-02-28 14:15:29 -08:00
tdgao 30acba861b fix: server tags labels 2026-02-28 13:40:53 -08:00
tdgao 0b547231c8 update comment 2026-02-28 13:34:07 -08:00
tdgao 1289cb5286 update redirect middleware no longer needs projectV3 2026-02-28 13:33:28 -08:00
tdgao 51f3e9e1f6 feat: add server projects to moderation queue 2026-02-28 13:28:48 -08:00
tdgao 44030706be fix: modpack content name truncate in project card 2026-02-28 10:47:57 -07:00
tdgao 4ed4560ba8 hide navtabs if theres only one tab 2026-02-28 10:25:56 -07:00
tdgao 5e015ff702 update tooltip 2026-02-28 10:18:04 -07:00
tdgao 7204735843 update language display 2026-02-28 10:17:33 -07:00
tdgao 592dfae307 fix offline server showing online 2026-02-28 10:15:36 -07:00
tdgao 8ca9406cff add active scale 2026-02-28 10:00:16 -07:00
tdgao 996ce12b6b update categories filters from one group filter card to separate filters cards 2026-02-28 09:59:59 -07:00
tdgao 2d83881bfd add sorting for user installed content to be top of list in content 2026-02-28 09:40:21 -07:00
tdgao e13356c239 hide servers tab when installing content to instance 2026-02-28 09:23:42 -07:00
coolbot100s f3e6376c11 fix, revert private use msg, adjust server & link nags 2026-02-28 05:29:50 -08:00
coolbot100s efcd26f194 Filter buttons by server project type 2026-02-27 23:16:30 -08:00
coolbot100s f9527921c5 Merge branch 'truman/linked-server-instances' into coolbot/server-project-moderation 2026-02-27 22:18:20 -08:00
tdgao da26304e7a update installation settings to handle vanilla server instance case 2026-02-27 19:53:31 -07:00
tdgao 469906a4a2 feat: implement allow editing server instances 2026-02-27 19:29:46 -07:00
tdgao d9c9053a70 implement add server to instance 2026-02-27 19:08:53 -07:00
coolbot100s 50f6225e33 Merge branch 'truman/linked-server-instances' into coolbot/server-project-moderation 2026-02-27 15:20:03 -08:00
tdgao 6322928609 add projectV3 to shouldShow callback 2026-02-27 16:13:31 -07:00
coolbot100s c07d2b08a9 Prevent undefined stage from appearing on servers. 2026-02-27 15:08:15 -08:00
tdgao fc03b07fb6 fix servers tab label in profile page 2026-02-27 15:28:38 -07:00
tdgao a6e5f9b441 feat: implement category and countries negative filters 2026-02-27 15:19:57 -07:00
tdgao 2d1ebb31b7 fix: copy ip missing hover effect 2026-02-27 14:51:31 -07:00
tdgao 10ddd67b73 feat: installation tab updates 2026-02-27 14:48:03 -07:00
tdgao 335eb534fe feat: add linked to modpack project for regular modpack instances 2026-02-27 14:40:47 -07:00
tdgao 4cda6343c2 slight change to color 2026-02-27 14:36:37 -07:00
tdgao bdfe7d4bb6 fix tags location 2026-02-27 14:26:20 -07:00
tdgao 3ada5b10b9 update search input background 2026-02-27 14:24:51 -07:00
tdgao 015fc656df conquer the type errors in Browse.vue 2026-02-27 14:06:26 -07:00
tdgao 9fdea27a83 fix: type errors 2026-02-27 13:42:07 -07:00
tdgao ef55e28157 fix: server refresh search reactivity 2026-02-27 13:33:43 -07:00
tdgao 73373f4c78 fix: use windows.history.replace instead of router.replace due to vue production bug and remove logs 2026-02-27 13:06:44 -07:00
tdgao d65375102f add logging for refreshSearch in browse.vue 2026-02-27 12:44:51 -07:00
aecsocket f276cd7881 Category and search sort fixes 2026-02-27 18:58:15 +00:00
tdgao 1fd108c6ab remove components. in search facet 2026-02-27 11:51:35 -07:00
aecsocket c49baec024 fetch latest server player count from redis instead of search doc 2026-02-27 18:44:20 +00:00
aecsocket 4a410fb6f7 don't require auth token for logging server play 2026-02-27 18:44:20 +00:00
tdgao 874ee462cb fix refresh search causing infinite rerender i.e. maximum call stack size exceeded
watch(route) → watch(() => [route.query.i, route.query.ai, route.path]) (line 102): The deep watch on the entire Vue Router route object was the most likely cause of the stack overflow. Vue Router's route object contains matched records with component definitions and other deeply nested structures. Deep-watching it triggers recursive traversal on every route change (including those from router.replace() inside refreshSearch()). Now it only watches the specific properties that updateInstanceContext() actually needs.

ref → shallowRef for serverHits and serverPings (line 189-190): The v3 search results can be deeply nested objects (minecraft_java_server.ping.data, content, etc.). Using shallowRef prevents Vue from creating deep reactive proxies on these objects, which is consistent with how results already uses shallowRef on line 295.

Re-entrance guard + try/catch on refreshSearch() (line 310): The watcher calls refreshSearch() without awaiting, so state changes during the async execution could trigger the watcher again, causing concurrent calls. The guard prevents overlapping calls, and the try/catch ensures loading.value = false is always reached (fixing the infinite loading).
2026-02-27 11:43:29 -07:00
tdgao 108c3765b4 small fix on external icon 2026-02-27 10:34:24 -07:00
tdgao 4680820ec8 fix updating modpack shouldn't launch right into game 2026-02-27 10:29:39 -07:00
tdgao 737026c077 feat: add handling for "stop" instance state for server project card and page play button 2026-02-27 10:20:09 -07:00
tdgao a84a5e4fae pnpm prepr 2026-02-27 10:01:04 -07:00
tdgao d327fa8f85 fix diffs which have unknown project/filename 2026-02-27 09:46:21 -07:00
tdgao a97be599a2 add in wiki page 2026-02-26 23:47:16 -07:00
tdgao fa1d5131b0 fix: redirect running function instead of passing function 2026-02-26 23:37:50 -07:00
tdgao d29bf1dc72 delete required content page placeholder 2026-02-26 23:34:06 -07:00
tdgao b2969bab51 fix: wrong way to determine offline status 2026-02-26 23:04:40 -07:00
tdgao ef77d8a1ae pass undefined instead of unknown for modpack content modal 2026-02-26 22:31:15 -07:00
tdgao f63e01f03f fix: profile create error app backend
Here's what was happening and the fix:

Root cause: In create.rs:107, profile_create assumed the icon_path parameter was always a local filename relative to the caches directory. It did caches_dir().join(icon) which produced a path like ...\caches\https://staging-cdn.modrinth.com/... — the colons in https:// are illegal in Windows paths (OS error 123).

The frontend's installServerProject and createVanillaInstance in install.js:290 both pass project.icon_url (a full URL) directly as the icon parameter.

Fix: Modified profile_create to detect when the icon parameter is a URL (starts with http:// or https://). When it is, it downloads the icon via fetch(), extracts the filename from the URL path, and passes the downloaded bytes and filename to set_icon() which hashes and caches it properly. The existing local-file path continues to work as before.
2026-02-26 22:19:41 -07:00
tdgao 265f3394be fix: server project showing offline 2026-02-26 22:01:18 -07:00
tdgao 3948449c60 fix search in app frontend 2026-02-26 21:55:13 -07:00
tdgao 6a488567e3 feat: deep linking to open server project page then open install to play 2026-02-26 19:24:21 -07:00
tdgao 9391dc0eab add query params for server search 2026-02-26 19:19:26 -07:00
tdgao f2c3cbc88a add grouped filters for search 2026-02-26 19:10:42 -07:00
tdgao ab1d14d570 ensure gallery banners are filtered in app backend gallery display 2026-02-26 18:45:30 -07:00
tdgao 8ba581bc62 fix error handling and helper text copy 2026-02-26 18:41:50 -07:00
tdgao ea75b769e6 upload server banner as gallery image with title == "__mc_server_banner__" and filter it from frontend gallery 2026-02-26 18:36:16 -07:00
tdgao a5f5868d8f fix: savable.ts to reset currentValues to data() after save 2026-02-26 18:23:03 -07:00
tdgao 66bcaa3f1f fix incorrect project type in projects in dashboard 2026-02-26 18:06:35 -07:00
tdgao 518e3797b6 remove console.log 2026-02-26 17:45:36 -07:00
tdgao fa3c70434c fix unsaved changes popup for tags 2026-02-26 17:45:16 -07:00
tdgao 1c24d16bb6 updates to compatibility card, add download button and display supported versions better 2026-02-26 17:42:01 -07:00
tdgao 2d25e46bc6 fix javaServerPatchaData wiping content field 2026-02-26 17:19:44 -07:00
tdgao d12c59247f fix setting project compatibility resets unsaved changes 2026-02-26 17:14:57 -07:00
tdgao 820c65fc1a move server related settings into own tab 2026-02-26 17:09:22 -07:00
tdgao 08fef0d79f make offline tag red and properly hook up online tag 2026-02-26 16:50:00 -07:00
tdgao 13f5c31a5d polish server info card styles 2026-02-26 16:35:10 -07:00
tdgao 5de8bed458 update ip address entire button to be clickable 2026-02-26 16:30:18 -07:00
tdgao c844eabe51 change modpack to modded type 2026-02-26 16:26:04 -07:00
tdgao a44b032db0 disable link for custom modpack project and show tooltip 2026-02-26 16:24:17 -07:00
tdgao a39082fda7 revert pulsing 2026-02-26 16:08:43 -07:00
tdgao c6288daa9d add online status indicator pulsing 2026-02-26 16:03:26 -07:00
tdgao 85cb988708 update online/offline tag 2026-02-26 15:57:42 -07:00
tdgao b7061b2ac8 reenable fence in app backend 2026-02-26 15:26:12 -07:00
tdgao af56fc0bb3 remove play button in website discovery for servers 2026-02-26 15:18:07 -07:00
tdgao 16f4ecf154 Merge branch 'truman/linked-server-instances' of github.com:modrinth/code into truman/linked-server-instances 2026-02-26 15:15:27 -07:00
tdgao 0d48962904 fix: update compatibility modal not closing after successful upload 2026-02-26 15:15:24 -07:00
aecsocket c63b3dacd2 also default java server content 2026-02-26 19:19:15 +00:00
tdgao b34f7e270e small fix on languages multi select 2026-02-26 11:13:27 -07:00
tdgao 1821249025 Merge branch 'truman/linked-server-instances' of github.com:modrinth/code into truman/linked-server-instances 2026-02-26 11:09:48 -07:00
tdgao 0813e1ff95 feat: show server project tags 2026-02-26 11:09:44 -07:00
aecsocket 6dc428c71f Default deserialize ProjectSerial 2026-02-26 18:03:24 +00:00
tdgao 066a4ac1e4 feat: hook up languages 2026-02-26 11:03:06 -07:00
tdgao 2718eec6c5 fix: allow java and bedrock addresses to be deleted 2026-02-26 10:28:52 -07:00
tdgao bbfac2fb25 fix game version filter facet 2026-02-26 10:23:41 -07:00
tdgao 9deb97f45d Merge branch 'truman/linked-server-instances' of github.com:modrinth/code into truman/linked-server-instances 2026-02-26 10:06:19 -07:00
tdgao e76645fc8e pnpm prepr 2026-02-26 10:06:15 -07:00
tdgao af4e6f9349 feat: implement use server search for search sorting and filter facets 2026-02-26 10:06:10 -07:00
tdgao 98243603f2 update java server ping schema 2026-02-26 09:46:11 -07:00
aecsocket fefb446ada send account UUID along with server play analytics 2026-02-26 16:00:17 +00:00
aecsocket 102a7ad7b7 move reporting server joins to backend 2026-02-26 13:36:02 +00:00
aecsocket 4e64ded09b Add game versions to server filters 2026-02-26 13:14:26 +00:00
aecsocket 4d68a7f793 Don't return missing components in project query 2026-02-26 13:01:07 +00:00
tdgao 2464646483 hook up search v3 in app backend for app frontend 2026-02-25 23:09:21 -07:00
tdgao 468b44f1fc fix: server project card tags 2026-02-25 22:29:42 -07:00
tdgao 2a95beb0aa hook up backend searchfor frontend in websiet 2026-02-25 22:15:41 -07:00
tdgao 2b7fdf0e05 fix a lot of the bugginess of navtabs when theres hidden/shown tabs between instances. match frontend nav tabs 2026-02-25 21:24:33 -07:00
tdgao 90a905be69 fix switching between server instance vs regular instance persisted invalid state 2026-02-25 21:14:43 -07:00
tdgao 72de13d38b fix nav tabs active tag 2026-02-25 21:12:35 -07:00
tdgao b65e0d1a03 copy content card item and table from content tab update branch 2026-02-25 20:54:02 -07:00
tdgao 6a97c6e2d9 fix hiding modal after saving server compatibility version 2026-02-25 20:28:07 -07:00
tdgao f15d5d18af handle locking server instance content 2026-02-25 20:25:46 -07:00
tdgao e7e7dd4057 many small fixes 2026-02-25 19:53:24 -07:00
tdgao 7a6233e1aa fix: remove required content tab from server project page 2026-02-25 19:10:02 -07:00
tdgao 1a5529c500 small fix to keep color consistent 2026-02-25 17:49:25 -07:00
tdgao a311bd2648 feat: add tags sidebar card 2026-02-25 17:46:04 -07:00
tdgao 397b3892c8 feat: add hide label for project cards 2026-02-25 17:31:01 -07:00
tdgao 1e79d771b5 update server project header and project card 2026-02-25 17:18:58 -07:00
tdgao 8be5d2521f feat: update project sidebar server info card to new design 2026-02-25 17:01:57 -07:00
tdgao dd9cacab55 add project sidebar stories 2026-02-25 15:16:14 -07:00
aecsocket dd0fa9bf33 cargo sqlx prepare 2026-02-25 19:57:00 +00:00
tdgao 7331101609 hook up server recent plays 2026-02-25 11:51:34 -07:00
tdgao 1cb52b86c3 Merge branch 'truman/linked-server-instances' of github.com:modrinth/code into truman/linked-server-instances 2026-02-25 11:41:32 -07:00
tdgao cbea77f03f fix: allow for links to be set to empty 2026-02-25 11:41:29 -07:00
aecsocket fe3153344b Fix backend impl for server player count analytics 2026-02-25 18:36:21 +00:00
tdgao ae6d1f6782 fix server projects links title 2026-02-25 11:18:45 -07:00
tdgao 4531705051 fix empty server info card 2026-02-25 11:17:57 -07:00
tdgao fcc098f919 fix server projects showing license 2026-02-25 11:16:18 -07:00
tdgao 5e1a7a8695 Merge branch 'truman/linked-server-instances' of github.com:modrinth/code into truman/linked-server-instances 2026-02-25 10:55:41 -07:00
tdgao 1c5181464a fix: server project detection to do loose null check 2026-02-25 10:55:30 -07:00
aecsocket 2a7916eda6 fixes to tracking server joins 2026-02-25 17:38:54 +00:00
aecsocket 2ceb2ef02d report server plays improved in frontend 2026-02-25 16:30:37 +00:00
aecsocket 8e504e9449 queue up server plays in batches 2026-02-25 16:25:57 +00:00
aecsocket f0d1b61293 server verified plays compiling 2026-02-25 16:16:42 +00:00
aecsocket 9e344e5555 wip: server verified plays 2026-02-25 15:10:52 +00:00
coolbot100s edb0de4ecd moderation checklist groundwork 2026-02-25 04:09:07 -08:00
coolbot100s dc79587a3c first few server related nags 2026-02-25 02:58:52 -08:00
coolbot100s e51b2206ec move add-links nag to links.ts 2026-02-25 01:26:25 -08:00
coolbot100s c347dbd256 filter certain nags out from server projects. 2026-02-25 01:25:48 -08:00
tdgao 97be76d998 add ping to project header 2026-02-24 22:30:32 -07:00
tdgao 9d3bd50522 fix play server project button when instance is launched 2026-02-24 22:28:02 -07:00
tdgao 2c362ca7ba add projectV3 to nag context for moderation package 2026-02-24 22:21:10 -07:00
tdgao e312c77159 implement ping server projects for latency in app 2026-02-24 22:13:37 -07:00
tdgao 57757dbfb1 small change: open discover to modpack 2026-02-24 21:51:31 -07:00
tdgao 1e4dfe9d68 add comment 2026-02-24 21:34:10 -07:00
tdgao 35b7bb3c3c add global installing server project state 2026-02-24 21:30:36 -07:00
tdgao 5ea8a956f1 show update success instead of launching right into the game 2026-02-24 17:46:15 -07:00
tdgao 94c64c28d4 use large play button instance 2026-02-24 17:45:52 -07:00
tdgao 216f28850c fix how install.js installs instance with modpack content title instead of server project title and dont fetch icon when installing to existing instance 2026-02-24 17:26:26 -07:00
tdgao 7a0c7e1992 show recommended & supported versions for vanilla 2026-02-24 16:52:25 -07:00
tdgao 529a455fe3 on click link for server side bar info 2026-02-24 16:43:42 -07:00
tdgao b546bfd5b8 fix undefined property 2026-02-24 16:34:08 -07:00
tdgao adddb72ba7 hide app nav tabs if only one tab 2026-02-24 16:30:36 -07:00
tdgao 62f0a58cac move servers tab to end 2026-02-24 16:29:05 -07:00
tdgao f5387353cc add diff detection for version dependencies without version_id/project_id 2026-02-24 16:21:17 -07:00
tdgao d75d7a6671 Merge branch 'truman/linked-server-instances' of github.com:modrinth/code into truman/linked-server-instances 2026-02-24 14:56:58 -07:00
tdgao 54f2c3a29f fix import 2026-02-24 14:56:42 -07:00
aecsocket a2bec70c62 remove leftover prompt 2026-02-24 18:32:58 +00:00
aecsocket 969700a01f Merge branch 'boris/server-listing-api' into truman/linked-server-instances 2026-02-24 18:24:24 +00:00
aecsocket bdb5d6deac fix search indexing not showing fields 2026-02-24 18:23:46 +00:00
aecsocket 7c3ab22956 fix serde deser flatten 2026-02-24 18:23:46 +00:00
aecsocket 8c68de0ee0 sqlx 2026-02-24 18:23:46 +00:00
aecsocket 46427f6a24 fix more defaults stuff 2026-02-24 18:23:46 +00:00
aecsocket 46bc137a9e wip: massive component query refactor 2026-02-24 18:23:46 +00:00
aecsocket e3cf5c6a0a wip: server modpack content query, components in search 2026-02-24 18:23:46 +00:00
aecsocket d005efa815 fix migration to sync with main, propagate background task errors 2026-02-24 18:23:46 +00:00
aecsocket a42fbb42c1 wip: clean up server ping, background tasks 2026-02-24 18:23:46 +00:00
aecsocket 22e31f9099 synthetic server project version for search indexing 2026-02-24 18:23:46 +00:00
aecsocket 4d64fd175b Improve server messages for app pinging 2026-02-24 18:23:46 +00:00
aecsocket 09290b452d Schema changes 2026-02-24 18:23:46 +00:00
aecsocket c3f76bfd64 clear cache on project ping, add server store link 2026-02-24 18:23:46 +00:00
aecsocket adc85f24bd fix compile error 2026-02-24 18:23:46 +00:00
aecsocket 3c527778a5 tombi fmt 2026-02-24 18:23:46 +00:00
aecsocket 3182c28027 Switch to Redis for server pings 2026-02-24 18:23:46 +00:00
aecsocket 515d1b3196 wip: resolve comments with pings 2026-02-24 18:23:46 +00:00
aecsocket 194873a5e7 fix shear 2026-02-24 18:23:46 +00:00
aecsocket 3acff84465 allow querying server ping data 2026-02-24 18:23:46 +00:00
aecsocket 1455f71f62 tombi fmt 2026-02-24 18:23:46 +00:00
aecsocket 49438d33a1 tombi fmt 2026-02-24 18:23:46 +00:00
aecsocket 6d3139f254 sqlx prepare 2026-02-24 18:23:46 +00:00
aecsocket 3a14e4fd46 mc ping server info + timeout 2026-02-24 18:23:46 +00:00
aecsocket c3a6f4d416 ping queue with tests 2026-02-24 18:23:46 +00:00
aecsocket df7ac297af wip: ping queue 2026-02-24 18:23:46 +00:00
aecsocket f3be9397c9 wip: ping minecraft servers queue 2026-02-24 18:23:46 +00:00
aecsocket 117257bcf9 clean up component edit code 2026-02-24 18:23:46 +00:00
aecsocket 6e011b043f Allow editing components 2026-02-24 18:23:46 +00:00
aecsocket 9aed50d50c docs 2026-02-24 18:23:46 +00:00
aecsocket 4fd747e6aa utoipa support for projects 2026-02-24 18:23:46 +00:00
aecsocket 7ce09d65be game version fields 2026-02-24 18:23:45 +00:00
aecsocket 7cddcee8e1 Version component creation 2026-02-24 18:23:45 +00:00
aecsocket b1c914015b Version components backend API 2026-02-24 18:23:45 +00:00
aecsocket 884907ad0c wip: version components 2026-02-24 18:23:45 +00:00
aecsocket 416598bf6d Update project component structure for servers 2026-02-24 18:23:45 +00:00
aecsocket e04a60e582 New project component metadata schema 2026-02-24 18:23:45 +00:00
aecsocket 4f24641296 No more six seven 2026-02-24 18:23:45 +00:00
aecsocket 55173e9b5a fix up rebase 2026-02-24 18:23:45 +00:00
aecsocket dbacbdafad revert accidental change 2026-02-24 18:23:45 +00:00
aecsocket 487e1e1bdd wip: project components API 2026-02-24 18:23:45 +00:00
aecsocket 7d9e58d877 wip: v67 project creation endpoint 2026-02-24 18:23:45 +00:00
aecsocket 4e5d234701 wip: server listing API 2026-02-24 18:23:45 +00:00
aecsocket 9f814ead27 update frontend to work with new versions list route 2026-02-24 18:23:45 +00:00
tdgao 764926179d use modpack content returned from project 2026-02-24 10:52:04 -07:00
tdgao 2819ade3ce rename server required content to server modpack content 2026-02-24 10:36:44 -07:00
tdgao 955fa43b2d add modpack content link to server project card 2026-02-24 10:34:35 -07:00
tdgao b0b28f90b9 similarly fix routerview race condition between project page and instance page 2026-02-24 09:46:49 -07:00
tdgao 9bacb4594d fix race condition 2026-02-24 09:33:18 -07:00
tdgao 298644dd29 fix updating modpack 2026-02-23 19:51:52 -07:00
tdgao abd3862a65 fix update to play modal requests 2026-02-23 19:48:37 -07:00
tdgao bbadf272e5 small fix on upload custom modpack and add tabular num 2026-02-23 19:31:55 -07:00
tdgao 6f1a06a4d8 remove the massive buttons 2026-02-23 19:19:43 -07:00
tdgao 2694206b35 add server to profile for server projects 2026-02-23 19:09:23 -07:00
tdgao 6b6c49073a add view contents modal 2026-02-23 18:48:35 -07:00
tdgao 0ce315a1ac add dropdown button 2026-02-23 18:48:12 -07:00
tdgao 9195920fca add modpack content modal 2026-02-23 16:54:11 -07:00
tdgao f2f09b9b9c add view contents stub 2026-02-23 16:54:03 -07:00
tdgao c4ebbf0575 hide installation tab for server project instance 2026-02-23 16:31:13 -07:00
tdgao b4b42a42d9 add tooltip on recent plays and online players 2026-02-23 16:21:00 -07:00
tdgao 83714d4660 handle error for join server 2026-02-23 16:02:16 -07:00
tdgao 9182a09453 console log tags 2026-02-23 15:47:42 -07:00
tdgao b5fa03b15e install to play modal show custom mrpack name and remove shared by 2026-02-23 15:04:49 -07:00
tdgao 5b687e6449 fix instance details items 2026-02-23 14:53:34 -07:00
tdgao cd4571f6c7 fix barrel exports 2026-02-23 14:53:16 -07:00
tdgao c1c1fc1b38 fix missing icon for vanilla instance 2026-02-23 14:20:33 -07:00
tdgao 250e163bfb add auto complete "off" for address fields 2026-02-23 13:57:47 -07:00
tdgao c7b70bac10 fix uploading progress label 2026-02-23 13:51:57 -07:00
tdgao 1315052bca add comment 2026-02-23 13:29:23 -07:00
tdgao e7e5e7ecf9 dont default to CA country on create 2026-02-23 13:26:29 -07:00
tdgao f0ee8aacbc add project type field when open create project from org and dashboard 2026-02-23 13:20:52 -07:00
tdgao 038bb53757 fix vanilla server project no tags 2026-02-23 13:20:07 -07:00
tdgao 52e3123c5b fix project type redirect 2026-02-23 12:54:47 -07:00
tdgao c0a2c4d5d4 fixes to server compatibility card 2026-02-23 12:45:42 -07:00
tdgao 89bcd7fb36 disable "create project" when theres missing fields 2026-02-23 12:19:32 -07:00
tdgao f93884ab4b comment out circuit breaker 2026-02-21 18:36:38 -07:00
tdgao 22a348ca64 add option for staging environment in app build 2026-02-21 18:09:13 -07:00
tdgao c135af93a0 add server project hard coded project ids to include the one in search 2026-02-21 17:36:40 -07:00
tdgao c10be2d796 fix get version cache 2026-02-21 17:15:24 -07:00
tdgao 18343eea32 default server discovery flag to true 2026-02-21 17:12:37 -07:00
tdgao a985a43d6c add required content page placeholder in app 2026-02-21 16:45:38 -07:00
tdgao 17e1ade828 add server projects for all 3 types for testing 2026-02-21 16:22:37 -07:00
tdgao 3ff6642544 hook up play button in server card 2026-02-21 15:30:45 -07:00
tdgao 8bd204915d proper fix on nav tabs 2026-02-21 15:15:35 -07:00
tdgao 3eba32bafe fix active tab in nav 2026-02-21 13:56:08 -07:00
tdgao 2025ad5380 small fixes 2026-02-21 13:40:41 -07:00
tdgao 80ea4e1924 add required content tab project page in web and app and placeholder page for web 2026-02-21 13:25:59 -07:00
tdgao 217281e021 add required content component for server details 2026-02-21 13:12:14 -07:00
tdgao 9173505fc5 update open in app modal and hook up to play buttons 2026-02-21 12:45:01 -07:00
tdgao e808ec975c add server project card in search in app 2026-02-20 16:12:23 -07:00
tdgao 7a5d6e94ed add server tab in app 2026-02-20 15:34:53 -07:00
tdgao 7833b1687f move side bar server info queries to parent 2026-02-20 13:58:38 -07:00
tdgao 5cff50bd23 add project sidebar server info to app project page 2026-02-20 13:39:10 -07:00
tdgao c8ace75898 small fix 2026-02-20 13:00:33 -07:00
tdgao c68d5ca86d implement proper server project instance header 2026-02-20 12:58:54 -07:00
tdgao 3c4ef3c6ec add install server project util and fix install and update to play modals which use modpack content 2026-02-20 12:36:16 -07:00
tdgao b52ef5d8ed fix install to play by bypassing cache in app backend install pack 2026-02-20 10:29:16 -07:00
tdgao f1a97e37ff remove hard coded path 2026-02-19 21:47:51 -07:00
tdgao 266f45e37d update install to play with new content api (install not working) 2026-02-19 19:55:08 -07:00
tdgao 2b0ba51c62 update server info card to query required content project 2026-02-19 18:36:24 -07:00
tdgao 0ea4cfed09 small button style update 2026-02-19 18:16:13 -07:00
tdgao 33c9dbeac2 fix compatibility card empty state 2026-02-19 18:06:08 -07:00
tdgao 80e8a61668 style fixes in server compatibility card 2026-02-19 17:55:21 -07:00
tdgao 1b3c8cd0be fix width on floating action bar 2026-02-19 17:45:19 -07:00
tdgao 3fef34c631 remove astrisks 2026-02-19 17:39:56 -07:00
tdgao 40c74dc2cb fix stupid ah type errors 2026-02-19 17:37:01 -07:00
tdgao c3e205f006 remove num followers 2026-02-19 17:33:03 -07:00
tdgao e41665dc87 add sidebar server info card 2026-02-19 17:22:48 -07:00
tdgao b934b79089 fix server link 2026-02-19 16:45:33 -07:00
tdgao 66b6f6eca0 hook up server project discovery to backend 2026-02-19 15:39:35 -07:00
tdgao a2dccf65e2 fix server project hard coded list 2026-02-19 14:52:52 -07:00
tdgao 32008f9580 add redirect for server project type 2026-02-19 14:46:01 -07:00
tdgao 0cb3776520 fix flag svg in project page header 2026-02-19 13:21:39 -07:00
tdgao dd70e834cb remove scroll to top on patch project 2026-02-19 13:05:45 -07:00
tdgao 445c80fbdc Merge branch 'truman/linked-server-instances' into prospector/server-project-page 2026-02-19 13:02:54 -07:00
tdgao fba3c49018 fix imports 2026-02-19 12:49:55 -07:00
tdgao ffc80a4796 use dynamic component for different server vs project page header 2026-02-19 12:35:42 -07:00
tdgao 0d0fdab646 fix: dont circuit break in dev environment 2026-02-19 11:38:33 -07:00
Prospector 1e190ff7c1 Merge remote-tracking branch 'origin/prospector/server-project-page' into prospector/server-project-page
# Conflicts:
#	packages/ui/src/components/project/ServerProjectHeader.vue
#	packages/ui/src/components/project/server/ServerPing.vue
2026-02-19 07:38:18 -08:00
Prospector 19f419fcbb ping to component 2026-02-19 07:37:15 -08:00
Prospector c9571315a4 beginning of server project stuff 2026-02-19 07:35:49 -08:00
Prospector 96700ed2bf remove empty div when modal closed 2026-02-19 07:33:35 -08:00
Prospector 1ad4fdbd93 simplify adplaceholder css 2026-02-19 07:33:35 -08:00
Prospector 73e1fc4709 add more project stuff to api client 2026-02-19 07:33:35 -08:00
Prospector 412f43dac7 images icon 2026-02-19 07:33:35 -08:00
Prospector 15e83bd4e3 avatar ts-ification 2026-02-19 07:33:35 -08:00
Prospector 3fe7679a9e beginning of server project stuff 2026-02-19 07:32:56 -08:00
tdgao 0dcaf6900c Merge branch 'main' into truman/linked-server-instances 2026-02-18 15:21:28 -07:00
tdgao 702e9882b6 fix upload banner 2026-02-18 14:52:09 -07:00
tdgao 6663a3c64f implement exclude own project id in select publish modpack content 2026-02-18 14:49:33 -07:00
tdgao 2ff9db4708 small fix 2026-02-18 14:44:16 -07:00
tdgao fb10ccda52 add new link urls to project page sidebar 2026-02-18 14:42:51 -07:00
tdgao cf637561fe fix v3 patch data 2026-02-18 14:08:20 -07:00
tdgao 41207cbdef remove console.log 2026-02-18 13:46:38 -07:00
tdgao 4d083c0d42 better variable names 2026-02-18 13:46:17 -07:00
tdgao 475010a50d hook up server ping to server project headerr 2026-02-18 13:44:52 -07:00
tdgao 5d48d086a5 add mc server ping to types 2026-02-18 13:04:06 -07:00
tdgao 16c9a3cfce update compatibility card for custom mrpack 2026-02-18 13:03:28 -07:00
tdgao 0e231ca815 add language field 2026-02-18 12:31:12 -07:00
tdgao 599dc90d89 add links todo 2026-02-18 11:39:42 -07:00
tdgao 5635896940 move manage server compatibility modal to providers folder 2026-02-18 10:10:47 -07:00
Prospector 047f72856d remove empty div when modal closed 2026-02-18 07:54:34 -08:00
Prospector 7c5f98033d simplify adplaceholder css 2026-02-18 07:53:40 -08:00
Prospector 78c94e68fa add more project stuff to api client 2026-02-18 07:51:24 -08:00
Prospector 5ade45373a images icon 2026-02-18 07:50:29 -08:00
Prospector 2e2aea2107 avatar ts-ification 2026-02-18 07:50:22 -08:00
tdgao e26df077b0 hook up play server project inside instance play button 2026-02-18 00:06:39 -07:00
tdgao b32d6fd20a refactor: make the play server project function much more readible 2026-02-18 00:01:22 -07:00
tdgao fa02aedfb4 add update vanilla version if changed 2026-02-17 23:50:38 -07:00
tdgao 2ed3984521 small fix 2026-02-17 18:38:32 -07:00
tdgao 3e5a4e795f small fix 2026-02-17 18:29:54 -07:00
tdgao 7772c9ba59 prefill existing values for vanilla 2026-02-17 16:51:27 -07:00
tdgao 055f5525d9 use deep merge instead of shallow merge for project patch mutation 2026-02-17 16:47:32 -07:00
tdgao 1ec00e188f add empty state 2026-02-17 16:35:22 -07:00
tdgao a5ab5bb414 fix cannot read body of undefined 2026-02-17 16:20:49 -07:00
tdgao de60a29c99 use new UnsavedChanges popup in general settings 2026-02-17 16:13:33 -07:00
tdgao b347061fba small style fix 2026-02-17 16:02:17 -07:00
tdgao 436c9c5981 rename showDataLossWarning to isSwitchingCompatibilityType 2026-02-17 15:57:54 -07:00
tdgao 1820fed1cd update show dataloss warning save button 2026-02-17 15:56:51 -07:00
tdgao 3e55aaafef implement danger on switch compatibility type 2026-02-17 15:25:46 -07:00
tdgao 11b2ce1511 small style updates 2026-02-17 15:02:25 -07:00
tdgao b99a460e3e implement proper updating server compatibility 2026-02-17 15:00:50 -07:00
tdgao 1b2b5c859c update required modpack card for custom modpack 2026-02-17 14:15:13 -07:00
tdgao af9c3d1a9d small style updates 2026-02-17 14:08:03 -07:00
tdgao 437734e3bc pnpm prepr 2026-02-17 13:55:28 -07:00
tdgao f664c170f8 delete content tab and create server version modal 2026-02-17 11:25:57 -07:00
tdgao 3f0f60fbea implement upload custom .mrpack 2026-02-17 11:25:36 -07:00
tdgao 406aa672d8 fix usage of --color-text-dark to use --color-text-primary 2026-02-17 11:08:14 -07:00
tdgao fdefb66af0 add compatibility card selected content and move it into its own card in settings 2026-02-17 11:03:33 -07:00
tdgao 90323da310 rename to manage server compatibility modal 2026-02-17 09:54:46 -07:00
tdgao 7f7d30e65f implement save server compatibility 2026-02-16 22:28:27 -07:00
tdgao d4eb66ee6c implement reset modal on hide 2026-02-16 21:36:33 -07:00
tdgao de3ec34aef add tooltip 2026-02-16 21:13:57 -07:00
tdgao c41ba8c3c9 implement select published modpack 2026-02-16 21:11:32 -07:00
tdgao 9ffcbd9b5b implement select compatibility type stage 2026-02-16 20:04:16 -07:00
tdgao e1971365e6 fix compatibility card styles 2026-02-16 18:33:04 -07:00
tdgao c626da819f start server compatibility modal and card 2026-02-16 18:19:09 -07:00
tdgao fbdcd27520 pnpm i 2026-02-16 12:55:46 -07:00
tdgao 8e2833cb2a Merge branch 'main' into truman/linked-server-instances 2026-02-16 12:44:32 -07:00
tdgao a763f6d83a refactor: make the patch data more readiable 2026-02-13 15:36:49 -07:00
tdgao cce25833ff implement setting recommended and supported versions 2026-02-13 15:14:52 -07:00
tdgao 559275bfad small style fixes 2026-02-13 10:52:20 -07:00
tdgao b20465d077 refactor: instances/index to use typescript 2026-02-13 10:38:33 -07:00
tdgao 0b4fcb4e92 fix more cannot get property of... due to null/undefined errors 2026-02-13 09:55:39 -07:00
tdgao 4d9c53dfe0 fix error when loading in app 2026-02-13 09:52:38 -07:00
tdgao 67f9decfe1 fix linked data not passed into profile create 2026-02-12 20:00:04 -07:00
tdgao 0c4bd5b09b fix click to play flow for vanilla servers 2026-02-11 22:08:41 -07:00
tdgao 94bfa26dfd Merge branch 'truman/linked-server-instances' of github.com:modrinth/code into truman/linked-server-instances 2026-02-11 17:50:26 -07:00
tdgao 30a50df85a feat: implement playServerProject util 2026-02-11 17:49:46 -07:00
tdgao e01c2b1a14 get is server project in page 2026-02-11 10:52:18 -07:00
tdgao f231466532 update profile to run instance with server address 2026-02-11 10:51:33 -07:00
Prospector 9ce31b8032 lint 2026-02-11 09:05:56 -08:00
tdgao 192de9e957 implement get_project_v3 in app backend 2026-02-10 17:52:02 -07:00
tdgao dabddacccb use invalidate 2026-02-10 16:52:12 -07:00
tdgao 93d32cf2e9 fix inputs to use styledInput 2026-02-10 16:47:36 -07:00
tdgao 22a961db72 fix patch project v3 2026-02-10 15:58:30 -07:00
tdgao 8bddff40a7 Merge branch 'main' into truman/linked-server-instances 2026-02-10 15:32:53 -07:00
tdgao 6c0f2a985f add tooltip 2026-02-10 15:19:10 -07:00
tdgao c9f7cae4b6 implement new instance header 2026-02-10 14:39:15 -07:00
tdgao c801d155a9 type fix on mc version picker 2026-02-10 14:08:42 -07:00
tdgao e1fa007384 clean up code 2026-02-10 10:55:57 -07:00
tdgao b8e413050c fix data loading in 2026-02-10 10:39:57 -07:00
tdgao 15476975a2 hook up setting server addresses 2026-02-10 10:19:48 -07:00
tdgao 03ac7bcda9 hook in new transfer org 2026-02-09 22:35:28 -07:00
tdgao ec56781ebc various fixes for popup notification 2026-02-09 22:09:04 -07:00
tdgao 168750d45a fix popup notification styles 2026-02-09 22:07:57 -07:00
tdgao 37f63afedb add popup notification panel, add it to storybook, and replace app popups with it 2026-02-08 17:59:21 -07:00
tdgao 9e17cd4d33 pt2 2026-02-08 14:33:44 -07:00
tdgao dc676e15b6 Merge branch 'main' into truman/linked-server-instances 2026-02-08 14:33:37 -07:00
tdgao 0982d2ceb6 better content header for small screen width 2026-02-06 17:58:12 -07:00
tdgao f81e3f36ed move content page header actions slot to be in line with title/summary if there exists a summary 2026-02-06 17:38:42 -07:00
tdgao 17145e303e add server project header 2026-02-06 17:07:40 -07:00
tdgao fd3b562092 hook up update to play 2026-02-06 16:39:34 -07:00
tdgao 8bfb007038 update copy 2026-02-06 16:39:09 -07:00
tdgao 0778e19b0e feat: update project and instance headers to match designs 2026-02-06 16:31:49 -07:00
tdgao 3b39d75685 stub server ping 2026-02-06 14:53:21 -07:00
tdgao 40dc007394 add country field 2026-02-06 11:41:01 -07:00
tdgao f819ce356f fix links page 2026-02-05 16:18:56 -07:00
tdgao 904803c0c0 fix submit when error 2026-02-05 15:38:09 -07:00
tdgao 963d35c133 fix hide on creaet 2026-02-05 15:34:28 -07:00
tdgao 1a6ed679e4 small qa fix 2026-02-05 15:26:00 -07:00
tdgao cb49902b25 fix import 2026-02-05 15:24:14 -07:00
tdgao 062a332247 qa fixes for update to play model 2026-02-05 15:24:06 -07:00
tdgao a8bb03ff1c Merge branch 'main' into truman/linked-server-instances 2026-02-05 13:37:45 -07:00
tdgao a10c242857 update copy 2026-02-05 13:36:56 -07:00
tdgao 407e196c3a hide environment moderation for server project 2026-02-05 13:36:54 -07:00
tdgao f7f31c0991 feat: update visibility section 2026-02-05 13:23:57 -07:00
tdgao 2ad5cd5442 copy updates and reorganizing settings 2026-02-05 12:47:21 -07:00
tdgao cf9ca8b9be fix submit buttons 2026-02-05 12:47:09 -07:00
tdgao d915a32f53 add combobox sublabel 2026-02-05 12:46:44 -07:00
tdgao 66953d851c filter recommended version select from support mc versions 2026-02-05 11:44:23 -07:00
tdgao a9011576af use featured gallary image as banner 2026-02-05 11:38:59 -07:00
tdgao 98eeb9fe13 add gallery routes to api client 2026-02-05 10:56:30 -07:00
tdgao 0c18af1213 fix: hover on publish button 2026-02-05 10:32:15 -07:00
tdgao c893dfcb22 add todo 2026-02-05 10:15:01 -07:00
Prospector c958091ee6 owner selector copy 2026-02-04 07:37:36 -08:00
Prospector 37b9610d26 prepr 2026-02-04 07:34:34 -08:00
Prospector 7f45734c4d Merge remote-tracking branch 'origin/main' into truman/linked-server-instances
# Conflicts:
#	apps/app-frontend/src/components/ui/modal/InstallToPlayModal.vue
#	apps/app-frontend/src/components/ui/modal/UpdateToPlayModal.vue
#	apps/app-frontend/src/pages/instance/Index.vue
#	apps/app-frontend/src/pages/project/Index.vue
2026-02-04 07:29:37 -08:00
tdgao d48f6243a7 small updates 2026-02-03 14:54:08 -07:00
tdgao e5d3eff085 pnpm prepr 2026-02-03 14:39:19 -07:00
tdgao 091a74cf84 add recommended version copy 2026-02-03 14:24:07 -07:00
tdgao 7aeabf60e0 fix uploaded file in custom mrpack content 2026-02-03 14:05:05 -07:00
tdgao 672a18d49f fix type error 2026-02-03 13:50:33 -07:00
tdgao 2f131d4ac7 Merge branch 'main' into truman/linked-server-instances 2026-02-03 13:41:29 -07:00
tdgao 892f8e5946 fix date 2026-02-03 13:32:10 -07:00
tdgao 3877d40b64 update create version modal to hook up to backend 2026-02-03 13:20:13 -07:00
tdgao 87aecc267d use requested_status and organization_id 2026-02-03 12:55:35 -07:00
tdgao 65d0803c37 update table 2026-02-02 20:23:17 -07:00
tdgao 4ce81f0e8f implement transfer to org on create project 2026-02-02 19:44:59 -07:00
tdgao d935a8f983 hook up create server project endpoint 2026-02-02 19:32:45 -07:00
tdgao 04b3488dbc remove server project feature flag and mock get project v3 route 2026-02-02 18:38:15 -07:00
tdgao acccddffc3 delete duplicate keys 2026-01-30 12:55:31 -07:00
tdgao 7e6470e361 pnpm prepr 2026-01-30 10:47:49 -07:00
tdgao 43ab52a902 Merge branch 'main' into truman/linked-server-instances 2026-01-30 10:45:56 -07:00
tdgao 68a09b1c9c implement locking required version and hiding supported versions when using mrpack 2026-01-29 23:01:48 -07:00
tdgao 3eea154520 fix: combobox disabled state 2026-01-29 22:48:32 -07:00
tdgao dd7b8fdb46 add todos 2026-01-29 22:40:38 -07:00
tdgao bba62c6b98 feat: implement required and supported versions 2026-01-29 22:38:29 -07:00
tdgao 6fb15eb4c5 feat: implement update to play modal 2026-01-29 15:34:17 -07:00
tdgao 93e292d5a6 start update to play moadl 2026-01-29 11:00:50 -07:00
tdgao 6c2ab769c4 small copy updates to install to play modal 2026-01-29 11:00:41 -07:00
tdgao 2092ba85ed fix hide modal on install to play 2026-01-29 09:57:06 -07:00
tdgao 1032469239 feat: implement fetch modcount for project inside install to play 2026-01-28 12:42:27 -07:00
tdgao a0858efbcd Merge branch 'worlds-and-shared-instances-components' into truman/linked-server-instances 2026-01-27 21:03:55 -07:00
tdgao a8c4e2dfb1 feat: update table component to derive key from column instead of data 2026-01-27 21:02:33 -07:00
tdgao 1d7c8a0bdd update above table buttons 2026-01-27 20:37:29 -07:00
tdgao e67f25166c update active tag 2026-01-27 20:24:23 -07:00
tdgao 02a9f4c722 fix: allow more loose typing on columns 2026-01-26 16:10:04 -07:00
tdgao 11769df7b7 add mocked server proj versions table 2026-01-26 16:09:03 -07:00
tdgao 021b85928d Merge branch 'worlds-and-shared-instances-components' into truman/linked-server-instances 2026-01-26 15:10:40 -07:00
tdgao 9783cbf52b chore: export table in index 2026-01-26 15:10:31 -07:00
tdgao 51398a1323 Merge branch 'worlds-and-shared-instances-components' into truman/linked-server-instances 2026-01-26 14:55:54 -07:00
tdgao 8392ae3513 feat: add surface-1.5 and use in table 2026-01-26 14:48:06 -07:00
tdgao ccee5e0ca7 Merge branch 'worlds-and-shared-instances-components' into truman/linked-server-instances 2026-01-26 14:13:40 -07:00
tdgao b1972afb16 feat: add table overflow menu story example 2026-01-26 14:11:57 -07:00
tdgao 292b3f8e8c feat: add column width prop for table and fix stories 2026-01-26 13:59:45 -07:00
tdgao e63787c5dd feat: reusable table component 2026-01-26 13:49:23 -07:00
tdgao 5232929c5a fixes from merge with main 2026-01-26 12:32:03 -07:00
tdgao bfaed9a9a5 update get project route 2026-01-26 12:16:49 -07:00
tdgao f281a804ea add api routes for server projects 2026-01-26 12:14:42 -07:00
tdgao 50f738101e pnpm prepr 2026-01-26 10:50:22 -07:00
tdgao 71074d8499 pnpm prepr 2026-01-26 10:47:15 -07:00
tdgao 138b5e9971 Merge branch 'worlds-and-shared-instances-components' into truman/linked-server-instances 2026-01-26 10:44:29 -07:00
tdgao e165180a8d remove install to play modal from ui package 2026-01-26 10:37:07 -07:00
Calum H. 61e69ac0d7 Merge branch 'main' into worlds-and-shared-instances-components
Signed-off-by: Calum H. <contact@cal.engineer>
2026-01-26 08:33:10 +00:00
Calum H. (IMB11) 0c12fbed2f feat: i18n pass 2026-01-26 08:30:14 +00:00
Calum H. (IMB11) 1e70473574 feat: finish content updater modal 2026-01-26 08:21:10 +00:00
Calum H. (IMB11) 16f46a464e feat: start on updater modal 2026-01-24 22:08:24 +00:00
Calum H. (IMB11) 1712ed2fd2 fix: storybook 2026-01-24 18:21:59 +00:00
Calum H. (IMB11) af35e92218 fix: fallback to svg if src is invalid on avatar component 2026-01-22 13:37:48 +00:00
Calum H. (IMB11) 4877eaee5d fix: hasUpdate type 2026-01-22 13:16:51 +00:00
Calum H. (IMB11) 067b3466ee fix: use TeleportOverflowMenu 2026-01-22 13:13:00 +00:00
Calum H. (IMB11) d4af422214 feat: fix gap + border issues on last elm 2026-01-22 12:17:36 +00:00
Calum H. (IMB11) bd5fbb3d09 feat: virtualization + smaller contentcard items 2026-01-22 12:07:13 +00:00
Calum H. (IMB11) 6f84acb01b fix: lint 2026-01-22 11:38:10 +00:00
Calum H. (IMB11) ff5ed4045d feat: virtual list impl for card table based on window scroll 2026-01-22 11:35:31 +00:00
Calum H. (IMB11) 144bde8976 feat: disabled state 2026-01-22 11:18:28 +00:00
Calum H. (IMB11) 1850de7b8d fix: row borders 2026-01-22 11:01:19 +00:00
Calum H. (IMB11) e0c871c0e4 feat: migrate toggle to tailwind 2026-01-22 10:54:31 +00:00
Calum H. (IMB11) f46a4fb4c6 feat: figma alignments 2026-01-22 10:29:59 +00:00
tdgao db3f745562 implement install function and move install to play modal into app-frontend 2026-01-20 17:38:36 -07:00
tdgao 35b962178e Merge branch 'worlds-and-shared-instances-components' into truman/linked-server-instances 2026-01-20 14:29:49 -07:00
tdgao 2e900879da Merge branch 'worlds-and-shared-instances-components' into truman/linked-server-instances 2026-01-20 14:29:22 -07:00
tdgao 7135ef4cf4 implement open in app modal 2026-01-20 14:13:26 -07:00
Calum H. (IMB11) 95ea6df681 fix: events 2026-01-20 17:29:50 +00:00
tdgao 51d84ca80c feat: start install to play modal 2026-01-19 14:00:58 -07:00
tdgao 1591fcc795 fix: update file dropzone size 2026-01-19 12:22:12 -07:00
tdgao e4536b5f66 Merge branch 'worlds-and-shared-instances-components' into truman/linked-server-instances 2026-01-19 12:01:01 -07:00
tdgao b5a5a6a10c clean up project combobox 2026-01-19 12:00:05 -07:00
tdgao 1501b11f7b feat: add project combobox 2026-01-19 11:46:09 -07:00
tdgao 63a90f7051 use new showIconInSelected prop 2026-01-19 11:26:46 -07:00
tdgao ea2431b2dd Merge branch 'worlds-and-shared-instances-components' into truman/linked-server-instances 2026-01-19 11:08:13 -07:00
tdgao 973208730e add show icon in selected for combobox with stories 2026-01-19 11:06:58 -07:00
tdgao 2dc3dad296 fix: update header 2026-01-19 10:59:12 -07:00
Calum H. (IMB11) 4a26d17951 feat: selection v-model 2026-01-19 15:39:04 +00:00
Calum H. (IMB11) 74cc23054d fix: extract types 2026-01-19 09:42:34 +00:00
Calum H. (IMB11) b54276fb10 feat: add ContentModpackCard 2026-01-19 09:32:31 +00:00
tdgao 765e3fba0e update links page 2026-01-16 11:40:54 -07:00
tdgao 6e84c922fa feat: implement create server project version and server general settings page 2026-01-16 11:26:35 -07:00
Calum H. bd5f0364c2 Merge branch 'main' into worlds-and-shared-instances-components 2026-01-16 10:11:32 +00:00
Calum H. (IMB11) 847d752dae feat: fix orgs 2026-01-16 10:06:56 +00:00
Calum H. (IMB11) 548c1f3be4 fix: tooltips + colors 2026-01-16 09:57:56 +00:00
Calum H. (IMB11) 6328d4d92a feat: base content card component 2026-01-16 09:47:13 +00:00
tdgao 93805bc7b9 feat: update nav links for servers 2026-01-15 23:37:45 -07:00
tdgao 6753e95922 fix spacing 2026-01-15 21:06:18 -07:00
tdgao 2dcc031a52 add server project related fields 2026-01-15 21:01:47 -07:00
tdgao 8536ca52ea feat: create project modal to use typescript 2026-01-15 20:10:29 -07:00
tdgao b5c69958ee fix: url text input wrapper before 2026-01-15 20:07:01 -07:00
tdgao 6e4abf6e26 feat: add create server project in dropdown 2026-01-15 16:35:46 -07:00
3584 changed files with 128637 additions and 584533 deletions
-23
View File
@@ -1,23 +0,0 @@
---
name: api-module
description: Add an API endpoint module to packages/api-client from an OpenAPI schema. Use for new backend endpoints, API client modules, or tasks that provide an OpenAPI schema.
---
# Add an API Module
Read the applicable `AGENTS.md` files before you edit code.
Read [the API module standard](../../../standards/frontend/ADDING_API_MODULES.md) in full.
1. Identify the OpenAPI schema from the request. If more than one schema is possible, ask the user to select one.
2. Read the schema. Identify each endpoint, HTTP method, request type, response type, and path parameter.
3. Get the service and version from the URL prefix. For example, map `/v3/projects` to `labrinth/v3/`.
4. Define the API types in `types.ts`. Make each type match the schema exactly.
5. Do not change, rename, or remove API fields.
6. Make a module class that extends `AbstractModule`. Implement each endpoint with `this.client.request()` or `this.client.upload()`.
7. Use the request-option pattern from the standard. Do not call `$fetch`, `fetch`, or another HTTP client directly.
8. Add the module to `MODULE_REGISTRY` so the client can instantiate it.
9. Export new service types from the applicable barrel `index.ts`.
10. Check the module paths, registry key, public type exports, and endpoint types.
Run only the checks that the user or the applicable `AGENTS.md` permits.
@@ -1,4 +0,0 @@
interface:
display_name: "Add API Module"
short_description: "Add typed API client modules from OpenAPI"
default_prompt: "Use $api-module to add an API client module from this OpenAPI schema."
@@ -1,38 +0,0 @@
---
name: cross-platform-pages
description: Convert a page to the shared Modrinth page system for the website and desktop app. Use for shared layouts, wrapped layouts, or platform dependency-injection contracts.
---
# Convert a Cross-Platform Page
Read the applicable `AGENTS.md` files before you edit code.
Read these standards in full:
- [Cross-platform pages](../../../standards/frontend/CROSS_PLATFORM_PAGES.md)
- [Dependency injection](../../../standards/frontend/DEPENDENCY_INJECTION.md)
1. Identify the target page from the request.
2. Read the page and its route shell. Identify data sources, mutations, navigation, and platform APIs.
3. Use a wrapped layout when both platforms use the same API source and page logic.
4. Use a shared layout when platform data or operations have different implementations.
For a shared layout:
1. Define a provider contract for all platform operations.
2. Put common UI and state logic in the shared layout.
3. Put reusable search, filter, and selection logic in local composables.
4. Implement the contract in `apps/frontend/` and `apps/app-frontend/`.
5. Use optional contract fields only for capabilities that are not available on both platforms.
For a wrapped layout:
1. Move the page to `packages/ui/src/layouts/wrapped/` and preserve its route structure.
2. Replace platform-only imports with common utilities or provider calls.
3. Make each frontend route shell render the wrapped component.
4. Match primary query options in both route shells when the layout uses `ReadyTransition` and `useReadyState`.
5. Prefetch these queries with `ensureQueryData`, as the standard specifies.
Check that both route shells resolve their imports. Check that all required provider fields have implementations.
Run only the checks that the user or the applicable `AGENTS.md` permits.
@@ -1,4 +0,0 @@
interface:
display_name: "Convert Cross-Platform Page"
short_description: "Share pages across the web and desktop app"
default_prompt: "Use $cross-platform-pages to convert this page for the website and desktop app."
-21
View File
@@ -1,21 +0,0 @@
---
name: figma-mcp
description: Convert a Figma design into a Modrinth Vue page or component. Use when a request provides a Figma URL or asks to implement a Figma layout.
---
# Implement a Figma Design
Read the applicable `AGENTS.md` files before you edit code.
Read `packages/ui/AGENTS.md` in full.
1. Load the available Figma design-to-code instructions and follow the MCP tool guidance.
2. Call `get_design_context` first with `clientLanguages: "typescript,html,css"` and `clientFrameworks: "vue"`.
3. Treat the result as reference code and adapt it to the Modrinth codebase.
4. Map Figma color variables to the applicable `surface-*` and `text-*` tokens. Do not use aliased Figma names directly.
5. Reuse applicable components from `packages/ui/src/components/` before creating new ones. Also refer to `standards/frontend/COMPONENT_STRUCTURE.md`
6. Read `packages/assets/styles/variables.scss` when Figma does not supply a required token.
7. Use exact spacing values from the design.
8. Implement the result as a Vue SFC with Tailwind classes and the existing component library.
Run only the checks that the user or the applicable `AGENTS.md` permits.
@@ -1,4 +0,0 @@
interface:
display_name: "Implement Figma Design"
short_description: "Build Modrinth Vue UI from Figma designs"
default_prompt: "Use $figma-mcp to implement this Figma design as a Modrinth Vue component."
-32
View File
@@ -1,32 +0,0 @@
---
name: i18n-pass
description: Convert hard-coded English text in changed Vue components to the @modrinth/ui localization system. Use for an i18n pass, untranslated-string review, pull request, or component migration.
---
# Do an Internationalization Pass
Read the applicable `AGENTS.md` files before you edit code.
Read [the internationalization standard](../../../standards/frontend/INTERNATIONALIZATION.md) in full.
1. Identify the scope from the request.
2. For a pull request, use `gh pr diff <number>` to identify changed files.
3. For a file path, inspect that file.
4. When the request gives no scope, inspect the current uncommitted diff.
5. Limit the pass to changed `.vue` files.
6. Find user-visible text in templates and scripts.
Check inner text, `alt`, `placeholder`, `aria-label`, buttons, tooltips, notifications, dropdown labels, and error messages.
Do not change dynamic expressions, HTML tag names, CSS classes, internal identifiers, or log messages.
1. Define stable message IDs with `defineMessage` or `defineMessages`.
2. Replace simple text with `formatMessage()` calls.
3. Use `<IntlFormatted>` for text that contains links or markup.
4. Use ICU selections and plurals when grammar depends on a value.
5. Add a space before `}}` when an ICU placeholder ends at the Vue delimiter.
6. Do not change component logic, layout, or reactivity.
7. Do not edit localization JSON files. The user maintains those files.
8. Check the changed templates again for hard-coded English text.
Run only the checks that the user or the applicable `AGENTS.md` permits.
@@ -1,4 +0,0 @@
interface:
display_name: "Run Internationalization Pass"
short_description: "Localize user-visible text in Vue files"
default_prompt: "Use $i18n-pass to localize the user-visible text in these changed Vue files."
-40
View File
@@ -1,40 +0,0 @@
---
name: review-changelog
description: Review the latest packages/blog/changelog.ts entry against the Modrinth changelog standard. Use before a pull request or when asked to review or lint a changelog entry.
---
# Review a Changelog Entry
Read [the changelog standard](../../../standards/maintaining/CHANGELOG.md) in full before the review.
1. Open `packages/blog/changelog.ts`.
2. Find the first entry in the `VERSIONS` array.
3. If the request names `web`, `hosting`, or `app`, review the latest entry for that product.
4. Otherwise, review the latest entry and all adjacent entries with the same date.
Check the entry structure:
- `date` contains a valid ISO 8601 timestamp.
- `product` is `web`, `hosting`, or `app`.
- An `app` entry has a `version` value.
- A `web` or `hosting` entry does not have a `version` value.
- Standard headings are `## Added`, `## Changed`, `## Fixed`, and `## Security`.
- A featured release can use a linked heading.
- Flag the legacy `## Improvements` heading.
Check each bullet:
- The voice and tense agree with the section.
- The first verb agrees with the section.
- The bullet describes user-visible behavior, not implementation.
- The bullet identifies the applicable page, tab, modal, or feature.
- The bullet contains one sentence, uses sentence case, and ends with a period.
- Product and UI names use the public labels.
- The bullet does not contain filler, vague intensifiers, apologies, or internal references.
- The bullet is not a duplicate detail of a larger listed change.
Group findings by entry. For each finding, show the original bullet and a proposed replacement.
If the entry has no findings, state this result. Do not edit the changelog unless the user asks you to apply fixes.
When the user asks for fixes, preserve tab indentation and template-literal formatting.
@@ -1,4 +0,0 @@
interface:
display_name: "Review Changelog"
short_description: "Review changelog entries for style problems"
default_prompt: "Use $review-changelog to review the latest changelog entry."
-39
View File
@@ -1,39 +0,0 @@
---
name: tanstack-query
description: Convert Vue server-state code to TanStack Query. Use for useQuery, useMutation, cache invalidation, optimistic updates, or replacement of useAsyncData and manual ref patterns.
---
# Convert Data Code to TanStack Query
Read the applicable `AGENTS.md` files before you edit code.
Read [the TanStack Query standard](../../../standards/frontend/FETCHING_DATA.md) in full.
1. Identify the target file from the request.
2. Find `useAsyncData`, `useFetch`, manual API refs, and fetch calls in `onMounted`.
3. Identify mutations that use manual loading, error, or result refs.
For queries:
1. Replace manual fetch logic with `useQuery`.
2. Get `api-client` with `injectModrinthClient()`.
3. Use a hierarchical query key with the resource, qualifier, and parameters.
4. Use a computed query key for reactive parameters.
5. Use a computed `enabled` option when the query depends on other data.
6. Use a shared query-option factory when multiple components use the query.
For mutations:
1. Replace manual mutation state with `useMutation`.
2. Invalidate or update related query data after success.
3. Use an optimistic update only when the UI needs an immediate response.
4. Cancel the applicable query and save its prior data before an optimistic update.
5. Restore the prior data after an error. Invalidate the query after settlement.
Remove manual loading and error refs that TanStack Query replaces. Remove obsolete `onMounted` fetch calls.
Keep Nuxt SSR behavior. Match route-shell prefetch options when `ReadyTransition` and `useReadyState` depend on the query.
Check query keys, invalidation prefixes, reactive values, and rollback data.
Run only the checks that the user or the applicable `AGENTS.md` permits.
@@ -1,4 +0,0 @@
interface:
display_name: "Migrate to TanStack Query"
short_description: "Migrate Vue server state to TanStack Query"
default_prompt: "Use $tanstack-query to migrate this Vue component to TanStack Query."
+1 -1
View File
@@ -1,5 +1,5 @@
# Windows has stack overflows when calling from Tauri, so we increase the default stack size used by the compiler
[target."cfg(windows)"]
[target.'cfg(windows)']
rustflags = ["-C", "link-args=/STACK:16777220"]
[target.x86_64-pc-windows-msvc]
@@ -9,6 +9,8 @@ body:
options:
- label: I checked the [existing issues](https://github.com/modrinth/code/issues?q=is%3Aissue) for duplicate feature requests
required: true
- label: I have checked that this feature request is not on our [roadmap](https://roadmap.modrinth.com)
required: true
- type: dropdown
id: projects
attributes:
@@ -81,6 +81,6 @@ Please follow these rules precisely:
Use existing patterns from our codebase:
- Variables/plurals: see `apps/frontend/src/pages/frog.vue`
- Rich-text link tags: see `apps/frontend/src/error.vue`
- Rich-text link tags: see `apps/frontend/src/pages/auth/welcome.vue` and `apps/frontend/src/error.vue`
When you finish, there should be no hard-coded English strings left in the template—everything comes from `formatMessage` or `<IntlFormatted>`.
-181
View File
@@ -1,181 +0,0 @@
# MIT License
#
# Copyright (c) 2024 CARIAD SE
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
name: 'Merge Queue CI Check Skipper'
description: 'Outputs `skip-check` as `true` if this is running as part of merge queue checks and the same checks have already been executed in the PR itself.'
inputs:
secret:
description: 'Optional GitHub Secret that can access branch protection rules using the administration:read permission'
required: false
outputs:
skip-check:
description: 'Skip Check (boolean)'
value: ${{ steps.passed-checks.outputs.can-skip-checks }}
runs:
using: 'composite'
steps:
- name: Checkout code
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
fetch-depth: 0
- name: Extract PR Number and Commit ID
id: extract-pr-info
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
with:
script: |
const githubRef = process.env.GITHUB_REF;
const regex = /^refs\/heads\/gh-readonly-queue\/([a-zA-Z0-9.\-_\/]+)\/pr-(\d+)-([a-f0-9]+)$/;
if (regex.test(githubRef)) {
const [, targetBranchName, prNumber, commitId] = githubRef.match(regex);
core.setOutput('targetBranchName', targetBranchName);
core.setOutput('prNumber', prNumber);
core.setOutput('commitId', commitId);
} else {
console.log(`GITHUB_REF is not a merge queue ref, setting CAN_SKIP_CHECKS to false: ${githubRef}`);
core.exportVariable('CAN_SKIP_CHECKS', 'false');
}
- name: Print PR Number and Target Commit ID
if: env.CAN_SKIP_CHECKS != 'false'
shell: bash
run: |
echo "Target Branch Name: ${{ steps.extract-pr-info.outputs.targetBranchName }}"
echo "PR Number: ${{ steps.extract-pr-info.outputs.prNumber }}"
echo "Target Commit ID: ${{ steps.extract-pr-info.outputs.commitId }}"
- name: Check if merge queue entry was enqueued as head of the queue
if: env.CAN_SKIP_CHECKS != 'false'
shell: bash
run: |
targetBranchHead=$(git rev-parse origin/${{ steps.extract-pr-info.outputs.targetBranchName }})
if [[ "$targetBranchHead" != "${{ steps.extract-pr-info.outputs.commitId }}" ]]; then
echo "'${{ steps.extract-pr-info.outputs.targetBranchName }}' branch commit ID does not match PR commit ID. This Merge Queue run was not head of the queue when it was enqueued. Setting CAN_SKIP_CHECKS to false."
echo "CAN_SKIP_CHECKS=false" >> "$GITHUB_ENV"
else
echo "This merge queue entry is targeting '${{ steps.extract-pr-info.outputs.targetBranchName }}' directly."
fi
- name: Get PR Branch
id: get-pr-branch
if: env.CAN_SKIP_CHECKS != 'false'
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
prNumber=${{ steps.extract-pr-info.outputs.prNumber }}
branchName=$(gh pr view ${prNumber} --json headRefName -q '.headRefName')
echo "prBranch=$branchName" >> "$GITHUB_OUTPUT"
- name: Print PR Branch
if: env.CAN_SKIP_CHECKS != 'false'
shell: bash
env:
PR_BRANCH: ${{ steps.get-pr-branch.outputs.prBranch }}
run: |
echo "PR Branch: $PR_BRANCH"
- name: Check if PR branch contains the Merge Queue target commit ID
if: env.CAN_SKIP_CHECKS != 'false'
shell: bash
env:
PR_BRANCH: ${{ steps.get-pr-branch.outputs.prBranch }}
COMMIT_ID: ${{ steps.extract-pr-info.outputs.commitId }}
TARGET_BRANCH: ${{ steps.extract-pr-info.outputs.targetBranchName }}
run: |
# Get the branch name from previous steps
branch_name="origin/$PR_BRANCH"
commit_id="$COMMIT_ID"
# Check if the branch history contains the commit
if git branch -r --contains "$commit_id" | grep -qF "$branch_name"; then
echo "Branch '$branch_name' contains commit '$commit_id'. It is up to date with $TARGET_BRANCH."
else
echo "Branch '$branch_name' does not contain commit '$commit_id'. It is outdated. Setting CAN_SKIP_CHECKS to false."
echo "CAN_SKIP_CHECKS=false" >> "$GITHUB_ENV"
fi
- name: Compare PR Branch with Current Branch
if: env.CAN_SKIP_CHECKS != 'false'
shell: bash
env:
PR_BRANCH: ${{ steps.get-pr-branch.outputs.prBranch }}
run: |
if git diff --quiet "origin/$PR_BRANCH"; then
echo "No differences found. PR branch is identical with this merge queue branch."
else
echo "Differences detected. PR branch has been updated after PR was added to merge queue. Setting CAN_SKIP_CHECKS to false."
echo "CAN_SKIP_CHECKS=false" >> "$GITHUB_ENV"
fi
- name: Compute/publish skip result
id: passed-checks
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
env:
SECRET: ${{ inputs.secret }}
PR_BRANCH: ${{ steps.get-pr-branch.outputs.prBranch }}
TARGET_BRANCH: ${{ steps.extract-pr-info.outputs.targetBranchName }}
with:
github-token: ${{ inputs.secret != '' && inputs.secret || github.token }}
script: |
if (process.env.CAN_SKIP_CHECKS == "false") {
console.log("Setting CAN_SKIP_CHECKS to false");
core.setOutput("can-skip-checks", false);
return;
}
const secretProvided = !!process.env.SECRET;
if (!secretProvided) {
console.log("secret input not set, assuming all checks have passed. Ensure 'Require status checks to pass before merging' is enabled, or provide a secret with administration:read.");
core.setOutput("can-skip-checks", true);
return;
}
const { data: branchProtection } = await github.rest.repos.getBranchProtection({
owner: context.repo.owner,
repo: context.repo.repo,
branch: process.env.TARGET_BRANCH,
});
const requiredCheckNames = branchProtection.required_status_checks.contexts;
console.log(`requiredCheckNames = ${requiredCheckNames}`);
const { data: checks } = await github.rest.checks.listForRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/heads/${process.env.PR_BRANCH}`,
});
console.log(`checks.check_runs = ${checks.check_runs.map(check => `${check.status},${check.conclusion},${check.name};`)}`);
const nonSuccessfulChecks = checks.check_runs.filter(check => check.status !== "completed" || check.conclusion !== "success");
const nonSuccessfulCheckNames = nonSuccessfulChecks.map(check => check.name);
console.log(`nonSuccessfulCheckNames = ${nonSuccessfulCheckNames}`);
const missingChecks = requiredCheckNames.filter(checkName => nonSuccessfulCheckNames.includes(checkName));
if (missingChecks.length > 0) {
console.log(`Required checks not passed, cannot skip merge queue checks. Setting CAN_SKIP_CHECKS to false. Missing checks: ${missingChecks.join(', ')}`);
core.setOutput("can-skip-checks", false);
} else {
console.log("No missing checks. Setting CAN_SKIP_CHECKS to true.");
core.setOutput("can-skip-checks", true);
}
-125
View File
@@ -1,125 +0,0 @@
name: API client release
on:
push:
branches: [main]
paths:
- .github/workflows/api-client-release.yml
- packages/api-client/**
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: read
id-token: write
jobs:
release:
if: github.repository_owner == 'modrinth' && github.ref == 'refs/heads/main'
# npm Trusted Publishing requires a GitHub-hosted runner.
runs-on: ubuntu-latest
env:
FORCE_COLOR: 3
PACKAGE_DIR: packages/api-client
PACKAGE_NAME: '@modrinth/api-client'
BUMP_TYPE: minor
steps:
- name: Check out code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Check for api-client changes
id: changes
run: |
if [ "${{ github.event.before }}" = "0000000000000000000000000000000000000000" ]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
exit 0
fi
if git diff --quiet "${{ github.event.before }}" "$GITHUB_SHA" -- "$PACKAGE_DIR"; then
echo "changed=false" >> "$GITHUB_OUTPUT"
else
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Setup Node
if: steps.changes.outputs.changed == 'true'
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .nvmrc
registry-url: https://registry.npmjs.org
- name: Enable Corepack
if: steps.changes.outputs.changed == 'true'
run: corepack enable
- name: Get pnpm store path
if: steps.changes.outputs.changed == 'true'
id: pnpm-store
run: echo "store-path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
- name: Restore pnpm cache
if: steps.changes.outputs.changed == 'true'
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ steps.pnpm-store.outputs.store-path }}
key: pnpm-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
pnpm-cache-
- name: Install dependencies
if: steps.changes.outputs.changed == 'true'
run: pnpm install --frozen-lockfile --filter @modrinth/api-client...
- name: Resolve release version
if: steps.changes.outputs.changed == 'true'
id: version
run: |
CURRENT_VERSION_JSON="$(npm view "${PACKAGE_NAME}" version --json)"
CURRENT_VERSION="$(
jq -nr \
--argjson version "$CURRENT_VERSION_JSON" \
'if ($version | type) == "array" then $version[-1] else $version end'
)"
NEXT_VERSION="$(
jq -nr \
--arg version "$CURRENT_VERSION" \
--arg bump "$BUMP_TYPE" '
def semver:
capture("^(?<major>[0-9]+)\\.(?<minor>[0-9]+)\\.(?<patch>[0-9]+)$")
| with_entries(.value |= tonumber);
($version | semver) as $current
| if $bump == "major" then "\($current.major + 1).0.0"
elif $bump == "minor" then "\($current.major).\($current.minor + 1).0"
elif $bump == "patch" then "\($current.major).\($current.minor).\($current.patch + 1)"
else error("Unsupported bump type: \($bump)")
end
'
)"
PACKAGE_JSON="$(mktemp)"
jq --tab --arg version "$NEXT_VERSION" '.version = $version' "$PACKAGE_DIR/package.json" > "$PACKAGE_JSON"
mv "$PACKAGE_JSON" "$PACKAGE_DIR/package.json"
echo "current_version=$CURRENT_VERSION" >> "$GITHUB_OUTPUT"
echo "published_version=$CURRENT_VERSION" >> "$GITHUB_OUTPUT"
echo "version=$NEXT_VERSION" >> "$GITHUB_OUTPUT"
- name: Build api-client
if: steps.changes.outputs.changed == 'true'
run: pnpm --filter @modrinth/api-client build
- name: Check package contents
if: steps.changes.outputs.changed == 'true'
working-directory: packages/api-client
run: pnpm pack --dry-run
- name: Publish api-client
if: steps.changes.outputs.changed == 'true'
working-directory: packages/api-client
run: pnpm publish --access public --provenance --no-git-checks
@@ -1,22 +0,0 @@
name: Cancel PR Workflows on Merge
on:
pull_request_target:
types:
- closed
permissions:
actions: write
jobs:
cancel:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1
with:
workflow_id: all
access_token: ${{ secrets.GITHUB_TOKEN }}
ignore_sha: true
pr_number: ${{ github.event.pull_request.number }}
-123
View File
@@ -1,123 +0,0 @@
name: Changelog Comment
on:
pull_request_target:
types: [opened, reopened]
workflow_dispatch:
inputs:
pr_number:
description: 'PR number to post the changelog comment on (for testing)'
required: true
type: number
jobs:
comment:
name: Post changelog comment
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Post or update changelog comment
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{ github.token }}
script: |
const marker = '<!-- changelog -->';
const mergedMarker = '<!-- changelog-merged -->';
const sections = ['### Added', '', '### Changed', '', '### Deprecated', '', '### Removed', '', '### Fixed', '', '### Security'].join('\n');
const productBlock = (name) => `<details>\n<summary>${name}</summary>\n\n${sections}\n\n</details>`;
const template = [
marker,
'## Pull request changelog',
'',
'<!-- Fill in the changelog under each product area this PR affects.',
' Empty sections are ignored. Leave a product collapsed/empty',
' if it doesn\'t apply. -->',
'',
productBlock('App'),
'',
productBlock('Website'),
'',
productBlock('Hosting'),
].join('\n');
// Resolve PR number from event or workflow_dispatch input
const prNumber = context.payload.pull_request?.number
?? parseInt('${{ github.event.inputs.pr_number }}', 10);
if (!prNumber || isNaN(prNumber)) {
core.setFailed('Could not determine PR number');
return;
}
// Get PR details (need base ref for child PR detection)
const { data: pr } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: prNumber,
});
// Check if bot comment already exists
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
});
const existingComment = comments.find(c => c.body.includes(marker));
if (existingComment) {
core.info('Changelog comment already exists, skipping');
return;
}
// Post the template comment
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body: template,
});
core.info(`Posted changelog comment on PR #${prNumber}`);
// Detect child PR: check if this PR's base branch is another open PR's head branch
const baseRef = pr.base.ref;
if (baseRef === 'main' || baseRef === 'prod') {
return;
}
// Look for a parent PR whose head branch matches our base branch
const { data: candidatePRs } = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
head: `${context.repo.owner}:${baseRef}`,
});
if (candidatePRs.length === 0) {
return;
}
const parentPR = candidatePRs[0];
core.info(`Detected parent PR #${parentPR.number} for child PR #${prNumber}`);
// Add admonition to child PR's changelog comment
const { data: childComments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
});
const childChangelogComment = childComments.find(c => c.body.includes(marker));
if (childChangelogComment && !childChangelogComment.body.includes(mergedMarker)) {
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: childChangelogComment.id,
body: `${mergedMarker}\n> [!NOTE]\n> This changelog has been merged into the changelog for #${parentPR.number}\n\n${childChangelogComment.body}`,
});
}
+6 -6
View File
@@ -2,7 +2,7 @@ on:
pull_request:
push:
branches:
- main
- master
env:
CARGO_TERM_COLOR: always
@@ -12,16 +12,16 @@ jobs:
typos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: crate-ci/typos@bee27e3a4fd1ea2111cf90ab89cd076c870fce14 # v1.48.0
- uses: actions/checkout@v4
- uses: crate-ci/typos@v1.43.1
# see <https://github.com/influxdata/datafusion-udf-wasm/pull/275>
tombi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: taiki-e/install-action@b6ff580856c41316412a0b9b60540fbc6f8c82cc # v2.86.7
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with:
tool: tombi@1.4.1
tool: tombi
- run: tombi lint
- run: tombi fmt --check
+4 -5
View File
@@ -2,19 +2,18 @@ on:
pull_request:
push:
branches:
- main
- master
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
SQLX_OFFLINE: true
jobs:
shear:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 # stable
- uses: cargo-bins/cargo-binstall@ead08b90bd7b2e6d81963fb9cf0b7239f66d5db4 # v1.21.0
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: cargo-bins/cargo-binstall@main
- run: cargo binstall --no-confirm cargo-shear
- run: cargo shear
-24
View File
@@ -1,24 +0,0 @@
name: Deploy Command
run-name: Deploy PR #${{ github.event.client_payload.github.payload.issue.number }}
on:
repository_dispatch:
types: [deploy-command]
permissions:
contents: read
actions: read
jobs:
deploy:
if: ${{ github.event.client_payload.pull_request.head.repo.full_name == github.repository }}
uses: SparkUniverse/workflows/.github/workflows/deploy-command.yaml@main
secrets:
ARGOCD_DEPLOY_KEY: ${{ secrets.ARGOCD_DEPLOY_KEY }}
CMD_DISPATCH_GH_TOKEN: ${{ secrets.SLASH_CMD_GH_TOKEN }}
with:
application-set: labrinth
build-workflow: labrinth-build.yml
branch: ${{ github.event.client_payload.pull_request.head.ref }}
issue-number: ${{ github.event.client_payload.github.payload.issue.number }}
head-sha: ${{ github.event.client_payload.pull_request.head.sha }}
+18 -89
View File
@@ -3,105 +3,33 @@ name: daedalus-docker-build
on:
push:
branches:
- 'main'
- '**'
paths:
- .github/workflows/daedalus-docker.yml
- 'apps/daedalus_client/**'
- 'packages/daedalus/**'
- Cargo.toml
- Cargo.lock
pull_request:
types: [opened, synchronize]
paths:
- .github/workflows/daedalus-docker.yml
- 'apps/daedalus_client/**'
- 'packages/daedalus/**'
- Cargo.toml
- Cargo.lock
merge_group:
types: [checks_requested]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/prod' }}
jobs:
skip-if-clean:
name: Skip if merge_queue produces no diff
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.check.outputs.skip }}
internal: ${{ steps.check-internal.outputs.internal }}
if: ${{ always() }}
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Check if workflow runs on an internal branch
id: check-internal
env:
EVENT_NAME: ${{ github.event_name }}
HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
REPO: ${{ github.repository }}
run: |
if [ "$EVENT_NAME" != "pull_request" ] || [ "$HEAD_REPO" = "$REPO" ]; then
echo "internal=true" >> $GITHUB_OUTPUT
else
echo "internal=false" >> $GITHUB_OUTPUT
fi
- name: Merge Queue CI Check Skipper
id: merge-queue-ci-skipper
uses: ./.github/merge-queue-ci-skipper
with:
secret: ${{ secrets.GH_ACCESS_TOKEN }}
- name: Check merge_group synthetic commit
id: check
run: |
# PR mode: never skip
if [ "${{ github.event_name }}" != "merge_group" ]; then
echo "skip=false" >> $GITHUB_OUTPUT
exit 0
fi
if [ "${{ steps.merge-queue-ci-skipper.outputs.skip-check }}" = "true" ]; then
echo "skip=true" >> $GITHUB_OUTPUT
else
echo "skip=false" >> $GITHUB_OUTPUT
fi
docker:
runs-on: ${{ needs.skip-if-clean.outputs.internal == 'true' && 'namespace-profile-medium-amd64' || 'ubuntu-latest' }}
needs: [skip-if-clean]
if: ${{ needs.skip-if-clean.outputs.skip != 'true' }}
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: 📥 Check out code
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
with:
rustflags: ''
cache: false
- name: 🧰 Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Setup mold
uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1 / Mold 2.41.0
- name: Build daedalus_client
run: cargo build --release --package daedalus_client
- name: Stage Docker context
run: |
mkdir -p apps/daedalus_client/docker-stage
cp target/release/daedalus_client apps/daedalus_client/docker-stage/daedalus_client
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
- name: Generate Docker image metadata
id: docker-meta
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
- name: ⚙️ Generate Docker image metadata
id: docker_meta
uses: docker/metadata-action@v5
env:
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
with:
@@ -115,19 +43,20 @@ jobs:
org.opencontainers.image.description=Modrinth game metadata query client
org.opencontainers.image.licenses=MIT
- name: Login to GitHub Packages
uses: docker/login-action@abd2ef45e78c5afb21d64d4ca52ee8550d9572c7 # v4.5.1
- name: 🔑 Login to GitHub Packages
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
- name: 🔨 Build and push
uses: docker/build-push-action@v6
with:
context: ./apps/daedalus_client/docker-stage
file: ./apps/daedalus_client/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker-meta.outputs.tags }}
labels: ${{ steps.docker-meta.outputs.labels }}
annotations: ${{ steps.docker-meta.outputs.annotations }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
annotations: ${{ steps.docker_meta.outputs.annotations }}
cache-from: type=registry,ref=ghcr.io/modrinth/daedalus:main
cache-to: type=inline
+2 -2
View File
@@ -12,10 +12,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/checkout@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@abd2ef45e78c5afb21d64d4ca52ee8550d9572c7 # v4.5.1
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
+42 -123
View File
@@ -10,75 +10,48 @@ on:
- 'packages/ui/**/*'
- 'packages/utils/**/*'
- 'packages/assets/**/*'
- 'packages/moderation/**/*'
- '**/wrangler.jsonc'
- '**/pnpm-*.yaml'
- '.github/workflows/frontend-deploy.yml'
workflow_dispatch:
workflow_call:
inputs:
preview:
required: false
type: boolean
description: 'Whether this is a preview deployment'
head_sha:
required: false
environment:
required: true
type: string
description: 'The commit SHA to deploy (defaults to github.sha)'
head_ref:
required: false
type: string
description: 'The branch name to deploy (defaults to github.ref_name)'
branch_alias:
required: false
type: string
description: 'The persistent preview alias for the branch'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.preview && 'preview' || 'push' }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/prod' }}
description: 'The environment to deploy to (staging-preview or production-preview)'
jobs:
deploy:
runs-on: namespace-profile-modrinth-frontend
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure environment
id: meta
env:
PREVIEW_INPUT: ${{ inputs.preview }}
REF: ${{ github.ref }}
DEPLOY_SHA: ${{ inputs.head_sha || github.sha }}
BRANCH_ALIAS: ${{ inputs.branch_alias }}
run: |
echo "cmd=deploy" >> $GITHUB_OUTPUT
SHA_SHORT="${DEPLOY_SHA::8}"
ENV_INPUT="${{ inputs.environment }}"
REF="${{ github.ref }}"
SHA_SHORT="${GITHUB_SHA::8}"
if [ "$PREVIEW_INPUT" = "true" ]; then
URL="https://git-$SHA_SHORT-frontend.modrinth.workers.dev"
STAGING_URL="https://git-$SHA_SHORT-staging-frontend.modrinth.workers.dev"
if [ "$ENV_INPUT" = "staging-preview" ]; then
echo "env=staging" >> $GITHUB_OUTPUT
echo "url=https://git-$SHA_SHORT-frontend-staging.modrinth.workers.dev" >> $GITHUB_OUTPUT
echo "cmd=versions upload --preview-alias git-$SHA_SHORT --var PREVIEW:true" >> $GITHUB_OUTPUT
elif [ "$ENV_INPUT" = "production-preview" ]; then
echo "env=production" >> $GITHUB_OUTPUT
echo "url=$URL" >> $GITHUB_OUTPUT
echo "staging_url=$STAGING_URL" >> $GITHUB_OUTPUT
echo "cmd=versions upload --preview-alias git-$SHA_SHORT --var PREVIEW:true --var CF_PAGES_URL:$URL" >> $GITHUB_OUTPUT
STAGING_VARS=$(jq -r '.env.staging.vars | to_entries[] | "--var \(.key):\(.value)"' ./apps/frontend/wrangler.jsonc | tr '\n' ' ')
echo "staging_cmd=versions upload --preview-alias git-$SHA_SHORT-staging ${STAGING_VARS}--var PREVIEW:true --var CF_PAGES_URL:$STAGING_URL" >> $GITHUB_OUTPUT
if [ -n "$BRANCH_ALIAS" ]; then
echo "branch_alias_url=https://$BRANCH_ALIAS-frontend.modrinth.workers.dev" >> $GITHUB_OUTPUT
echo "staging_branch_alias_url=https://$BRANCH_ALIAS-staging-frontend.modrinth.workers.dev" >> $GITHUB_OUTPUT
echo "staging_branch_alias_cmd=versions upload --preview-alias $BRANCH_ALIAS-staging ${STAGING_VARS}--var PREVIEW:true --var CF_PAGES_URL:https://$BRANCH_ALIAS-staging-frontend.modrinth.workers.dev" >> $GITHUB_OUTPUT
fi
echo "url=https://git-$SHA_SHORT-frontend.modrinth.workers.dev" >> $GITHUB_OUTPUT
echo "cmd=versions upload --preview-alias git-$SHA_SHORT --var PREVIEW:true" >> $GITHUB_OUTPUT
elif [ "$REF" = "refs/heads/main" ]; then
echo "env=staging" >> $GITHUB_OUTPUT
@@ -90,24 +63,14 @@ jobs:
echo "url=https://modrinth.com" >> $GITHUB_OUTPUT
fi
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Enable Corepack
run: corepack enable
- name: Set up caches
uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
with:
cache: |
rust
pnpm
apt
- name: Set up Turborepo caching
uses: namespace-actions/setup-turbocache@f96bd6befa13ae74b2858a5be49573640d4636f5 # v0.0.2
cache: pnpm
- name: Inject build variables
working-directory: ./apps/frontend
@@ -125,17 +88,18 @@ jobs:
run: pnpm install
- name: Build frontend
run: pnpm web:build
working-directory: ./apps/frontend
run: pnpm build
env:
CF_PAGES_BRANCH: ${{ inputs.head_ref || github.ref_name }}
CF_PAGES_COMMIT_SHA: ${{ inputs.head_sha || github.sha }}
CF_PAGES_BRANCH: ${{ github.ref_name }}
CF_PAGES_COMMIT_SHA: ${{ github.sha }}
CF_PAGES_URL: ${{ steps.meta.outputs.url }}
BUILD_ENV: ${{ steps.meta.outputs.env }}
PREVIEW: ${{ inputs.preview && 'true' || 'false' }}
PREVIEW: ${{ inputs.environment != '' && 'true' || 'false' }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: Create Sentry release and upload sourcemaps
uses: getsentry/action-release@ff07929a6537bac57790c3451cf4d364aca38528 # v3.7.0
uses: getsentry/action-release@v3
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: modrinth
@@ -145,53 +109,17 @@ jobs:
sourcemaps: ./apps/frontend/.output/server
url_prefix: '~/'
- name: Install Wrangler CLI
uses: cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4.0.0
- name: Deploy Cloudflare Worker
id: wrangler
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
environment: ${{ steps.meta.outputs.env != 'production' && steps.meta.outputs.env || '' }}
workingDirectory: ./apps/frontend
packageManager: pnpm
wranglerVersion: '4.112.0'
command: --version
- parallel:
- name: Deploy Cloudflare Worker
id: wrangler
uses: cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4.0.0
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
environment: ${{ steps.meta.outputs.env != 'production' && steps.meta.outputs.env || '' }}
workingDirectory: ./apps/frontend
command: ${{ steps.meta.outputs.cmd }}
- name: Deploy staging Cloudflare Worker preview
if: ${{ inputs.preview }}
uses: cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4.0.0
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
workingDirectory: ./apps/frontend
command: ${{ steps.meta.outputs.staging_cmd }}
- name: Deploy persistent Cloudflare Worker preview
if: ${{ inputs.preview && inputs.branch_alias != '' }}
uses: cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4.0.0
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
workingDirectory: ./apps/frontend
command: versions upload --preview-alias ${{ inputs.branch_alias }} --var PREVIEW:true --var CF_PAGES_URL:${{ steps.meta.outputs.branch_alias_url }}
- name: Deploy persistent staging Cloudflare Worker preview
if: ${{ inputs.preview && inputs.branch_alias != '' }}
uses: cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4.0.0
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
workingDirectory: ./apps/frontend
command: ${{ steps.meta.outputs.staging_branch_alias_cmd }}
wranglerVersion: '4.54.0'
command: ${{ steps.meta.outputs.cmd }}
- name: Purge cache
if: github.ref == 'refs/heads/prod'
@@ -202,23 +130,14 @@ jobs:
--data '{"hosts": ["modrinth.com", "www.modrinth.com", "staging.modrinth.com"]}' \
https://api.cloudflare.com/client/v4/zones/e39df17b9c4ef44cbce2646346ee6d33/purge_cache
- name: Write deployment URLs to files
if: ${{ inputs.preview }}
- name: Write deployment URL to file
if: ${{ inputs.environment != '' }}
run: |
echo "${{ steps.meta.outputs.url }}" > deployment-url-production.txt
echo "${{ steps.meta.outputs.staging_url }}" > deployment-url-staging.txt
echo "${{ steps.meta.outputs.url }}" > deployment-url-${{ inputs.environment }}.txt
- parallel:
- name: Upload production deployment URL
if: ${{ inputs.preview }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: deployment-url-production
path: deployment-url-production.txt
- name: Upload staging deployment URL
if: ${{ inputs.preview }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: deployment-url-staging
path: deployment-url-staging.txt
- name: Upload deployment URL
if: ${{ inputs.environment != '' }}
uses: actions/upload-artifact@v6
with:
name: deployment-url-${{ inputs.environment }}
path: deployment-url-${{ inputs.environment }}.txt
-99
View File
@@ -1,99 +0,0 @@
name: Frontend Docker
on:
push:
branches:
- main
- prod
paths:
- 'apps/frontend/**/*'
- 'packages/ui/**/*'
- 'packages/utils/**/*'
- 'packages/assets/**/*'
- 'packages/moderation/**/*'
- 'packages/api-client/**/*'
- 'packages/blog/**/*'
- '**/pnpm-*.yaml'
- .github/workflows/frontend-docker.yml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/prod' }}
jobs:
build:
name: Build frontend
runs-on: namespace-profile-modrinth-frontend
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Configure environment
id: meta
env:
REF: ${{ github.ref }}
run: |
if [ "$REF" = "refs/heads/main" ]; then
echo "env=staging" >> $GITHUB_OUTPUT
else
echo "env=production" >> $GITHUB_OUTPUT
fi
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .nvmrc
- name: Enable Corepack
run: corepack enable
- name: Set up caches
uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
with:
cache: |
pnpm
- name: Inject build variables
working-directory: ./apps/frontend
run: |
if [ "${{ steps.meta.outputs.env }}" == "staging" ]; then
echo "Injecting staging variables from wrangler.jsonc..."
jq -r '.env.staging.vars | to_entries[] | "\(.key)=\(.value)"' wrangler.jsonc >> $GITHUB_ENV
else
echo "Injecting production variables from wrangler.jsonc..."
jq -r '.vars | to_entries[] | "\(.key)=\(.value)"' wrangler.jsonc >> $GITHUB_ENV
fi
- name: Install dependencies
working-directory: ./apps/frontend
run: pnpm install
- name: Build frontend
run: pnpm web:build
env:
NITRO_PRESET: node-server
BUILD_ENV: ${{ steps.meta.outputs.env }}
CF_PAGES_BRANCH: ${{ github.ref_name }}
CF_PAGES_COMMIT_SHA: ${{ github.sha }}
- name: Stage Docker context
run: |
mkdir -p apps/frontend/docker-stage
cp -r apps/frontend/.output apps/frontend/docker-stage/.output
- name: Upload Docker context
uses: namespace-actions/upload-artifact@f6ccaacc655aec41b93af180d1d7eef21af862d2 # v1.0.3
with:
name: frontend-docker-context
retention-days: 1
path: apps/frontend/docker-stage
docker-build:
needs: [build]
uses: SparkUniverse/workflows/.github/workflows/docker-build.yaml@main
with:
image-name: frontend
dockerfile-path: apps/frontend/Dockerfile
artifacts-name: frontend-docker-context
+19 -140
View File
@@ -7,187 +7,66 @@ on:
- 'packages/ui/**/*'
- 'packages/utils/**/*'
- 'packages/assets/**/*'
- 'packages/moderation/**/*'
- '**/wrangler.jsonc'
- '**/pnpm-*.yaml'
- '.github/workflows/frontend-preview.yml'
jobs:
metadata:
if: github.repository_owner == 'modrinth' && github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
outputs:
branch-alias: ${{ steps.meta.outputs.branch_alias }}
steps:
- name: Configure branch alias
id: meta
run: echo "branch_alias=pr-${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT
deploy:
if: github.repository_owner == 'modrinth' && github.event.pull_request.head.repo.full_name == github.repository
needs: metadata
uses: ./.github/workflows/frontend-deploy.yml
secrets: inherit
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-deploy
cancel-in-progress: true
strategy:
matrix:
environment: [staging-preview, production-preview]
with:
preview: true
head_sha: ${{ github.event.pull_request.head.sha }}
head_ref: ${{ github.event.pull_request.head.ref }}
branch_alias: ${{ needs.metadata.outputs.branch-alias }}
deploy-storybook:
if: github.repository_owner == 'modrinth' && github.event.pull_request.head.repo.full_name == github.repository
needs: metadata
runs-on: namespace-profile-modrinth-frontend
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-storybook
cancel-in-progress: true
permissions:
contents: read
deployments: write
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .nvmrc
- name: Enable Corepack
run: corepack enable
- name: Set up caches
uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
with:
cache: |
pnpm
- name: Install dependencies
working-directory: ./packages/ui
run: pnpm install
- name: Build Storybook
env:
NODE_OPTIONS: --max-old-space-size=6144
run: pnpm build-storybook
- name: Configure short SHA
id: meta
env:
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: echo "sha_short=${HEAD_SHA::8}" >> $GITHUB_OUTPUT
- name: Install Wrangler CLI
uses: cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4.0.0
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
workingDirectory: ./packages/ui
packageManager: pnpm
wranglerVersion: '4.112.0'
command: --version
- parallel:
- name: Deploy Storybook preview
uses: cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4.0.0
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
workingDirectory: ./packages/ui
command: versions upload --preview-alias git-${{ steps.meta.outputs.sha_short }}
- name: Deploy persistent Storybook preview
uses: cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4.0.0
env:
NODE_OPTIONS: --max-old-space-size=6144
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
workingDirectory: ./packages/ui
command: versions upload --preview-alias ${{ needs.metadata.outputs.branch-alias }}
environment: ${{ matrix.environment }}
comment:
if: |
!cancelled()
&& github.repository_owner == 'modrinth'
&& github.event.pull_request.head.repo.full_name == github.repository
&& needs.deploy.result == 'success'
if: github.repository_owner == 'modrinth' && github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
needs: [metadata, deploy, deploy-storybook]
permissions:
pull-requests: write
needs: deploy
steps:
- name: Download deployment URLs
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
uses: actions/download-artifact@v7
with:
pattern: deployment-url-*
merge-multiple: true
- name: Read deployment URLs
id: urls
env:
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
BRANCH_ALIAS: ${{ needs.metadata.outputs.branch-alias }}
STORYBOOK_RESULT: ${{ needs.deploy-storybook.result }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
STAGING_SHA_URL=$(cat deployment-url-staging.txt)
PRODUCTION_SHA_URL=$(cat deployment-url-production.txt)
STAGING_BRANCH_URL="https://$BRANCH_ALIAS-staging-frontend.modrinth.workers.dev"
PRODUCTION_BRANCH_URL="https://$BRANCH_ALIAS-frontend.modrinth.workers.dev"
STAGING_PREVIEW_URL=$(cat deployment-url-staging-preview.txt)
PRODUCTION_PREVIEW_URL=$(cat deployment-url-production-preview.txt)
if [ "$STORYBOOK_RESULT" = "success" ]; then
STORYBOOK_SHA_URL="https://git-${HEAD_SHA::8}-storybook.modrinth.workers.dev"
STORYBOOK_BRANCH_URL="https://$BRANCH_ALIAS-storybook.modrinth.workers.dev"
else
STORYBOOK_SHA_URL="⚠️ Deployment $STORYBOOK_RESULT ([logs]($RUN_URL))"
STORYBOOK_BRANCH_URL="⚠️ Deployment $STORYBOOK_RESULT ([logs]($RUN_URL))"
fi
echo "Production preview URL: $PRODUCTION_PREVIEW_URL"
echo "Staging preview URL: $STAGING_PREVIEW_URL"
echo "staging-sha-url=$STAGING_SHA_URL" >> $GITHUB_OUTPUT
echo "production-sha-url=$PRODUCTION_SHA_URL" >> $GITHUB_OUTPUT
echo "storybook-sha-url=$STORYBOOK_SHA_URL" >> $GITHUB_OUTPUT
echo "staging-branch-url=$STAGING_BRANCH_URL" >> $GITHUB_OUTPUT
echo "production-branch-url=$PRODUCTION_BRANCH_URL" >> $GITHUB_OUTPUT
echo "storybook-branch-url=$STORYBOOK_BRANCH_URL" >> $GITHUB_OUTPUT
echo "staging-preview-url=$STAGING_PREVIEW_URL" >> $GITHUB_OUTPUT
echo "production-preview-url=$PRODUCTION_PREVIEW_URL" >> $GITHUB_OUTPUT
- name: Find comment
if: github.event_name == 'pull_request'
uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0
uses: peter-evans/find-comment@v3
id: fc
with:
token: ${{ github.token }}
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: Frontend previews
- name: Comment deploy URL on PR
if: github.event_name == 'pull_request'
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
uses: peter-evans/create-or-update-comment@v5
with:
token: ${{ github.token }}
issue-number: ${{ github.event.pull_request.number }}
comment-id: ${{ steps.fc.outputs.comment-id }}
body: |
## Frontend previews
Last deployed commit is [${{ github.event.pull_request.head.sha }}](${{ github.event.pull_request.head.repo.html_url }}/commit/${{ github.event.pull_request.head.sha }})
### Persistent
Last deployed commit is [${{ github.sha }}](${{ github.event.pull_request.head.repo.html_url }}/commit/${{ github.sha }})
| Environment | URL |
|-------------|-----|
| staging | ${{ steps.urls.outputs.staging-branch-url }} |
| production | ${{ steps.urls.outputs.production-branch-url }} |
| storybook | ${{ steps.urls.outputs.storybook-branch-url }} |
### Latest commit
| Environment | URL |
|-------------|-----|
| staging | ${{ steps.urls.outputs.staging-sha-url }} |
| production | ${{ steps.urls.outputs.production-sha-url }} |
| storybook | ${{ steps.urls.outputs.storybook-sha-url }} |
| staging | ${{ steps.urls.outputs.staging-preview-url }} |
| production | ${{ steps.urls.outputs.production-preview-url }} |
edit-mode: replace
+17 -20
View File
@@ -8,10 +8,6 @@ on:
concurrency:
group: i18n-management
permissions:
contents: write
pull-requests: write
jobs:
pull_translations:
name: 'Pull translations from Crowdin'
@@ -42,28 +38,29 @@ jobs:
flight_failure "CROWDIN_PERSONAL_TOKEN secret is not defined (required to push)"
fi
if [ "$CROWDIN_GH_TOKEN_DEFINED" != true ]; then
flight_failure "CROWDIN_GH_TOKEN secret is not defined (required to make pull requests)"
fi
if [ "$PREFLIGHT_CHECK_RESULT" = false ]; then
exit 1
fi
env:
CROWDIN_PROJECT_ID_DEFINED: ${{ vars.CROWDIN_PROJECT_ID != '' }}
CROWDIN_PERSONAL_TOKEN_DEFINED: ${{ secrets.CROWDIN_PERSONAL_TOKEN != '' }}
CROWDIN_GH_TOKEN_DEFINED: ${{ secrets.CROWDIN_GH_TOKEN != '' }}
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
token: ${{ secrets.CROWDIN_GH_TOKEN }}
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .nvmrc
- name: Enable Corepack
run: corepack enable
- name: Install script dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Configure Git author
id: git-author
uses: MarcoIeni/git-config@v0.1
env:
GITHUB_TOKEN: ${{ secrets.CROWDIN_GH_TOKEN }}
# # Because --all flag of Crowdin CLI is currently broken we need to create a fake source file
# # so that the CLI won't omit translations for it. See https://github.com/crowdin/crowdin-cli/issues/724
@@ -82,7 +79,7 @@ jobs:
echo "safe_branch_name=$SAFE_BRANCH_NAME" >> "$GITHUB_OUTPUT"
- name: Download translations from Crowdin
uses: crowdin/github-action@c7af9bc98b01694653031fef2a0dc6c7888ce9bc # v2.17.0
uses: crowdin/github-action@v2
with:
upload_sources: false
upload_translations: false
@@ -98,14 +95,14 @@ jobs:
shell: bash
run: sudo chown -R $USER:$USER .
- name: Prune stale ICU translations
run: pnpm scripts i18n-icu-contract prune-local
- name: Create Pull Request
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
uses: peter-evans/create-pull-request@v7
with:
title: 'New translations from Crowdin (${{ steps.branch-name.outputs.branch_name }})'
body-path: .github/templates/crowdin-pr.md
commit-message: 'New translations from Crowdin (${{ steps.branch-name.outputs.branch_name }})'
branch: crowdin-pull/${{ steps.branch-name.outputs.branch_name }}
author: '${{ steps.git-author.outputs.name }} <${{ steps.git-author.outputs.email }}>'
committer: '${{ steps.git-author.outputs.name }} <${{ steps.git-author.outputs.email }}>'
labels: sync
token: ${{ secrets.CROWDIN_GH_TOKEN }}
+3 -24
View File
@@ -4,14 +4,11 @@ on:
push:
branches: ['main']
paths:
- '.github/workflows/i18n-push.yml'
- '.github/workflows/i18n.push.yml'
- 'apps/*/src/locales/en-US/**'
- 'apps/*/locales/en-US/**'
- 'packages/*/src/locales/en-US/**'
- 'packages/*/locales/en-US/**'
- 'scripts/i18n-icu-contract.ts'
- 'package.json'
- 'pnpm-lock.yaml'
- 'crowdin.yml'
workflow_dispatch:
@@ -56,21 +53,9 @@ jobs:
CROWDIN_PERSONAL_TOKEN_DEFINED: ${{ secrets.CROWDIN_PERSONAL_TOKEN != '' }}
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 2
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .nvmrc
- name: Enable Corepack
run: corepack enable
- name: Install script dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Query branch name
id: branch-name
@@ -83,7 +68,7 @@ jobs:
echo "safe_branch_name=$SAFE_BRANCH_NAME" >> "$GITHUB_OUTPUT"
- name: Upload translations to Crowdin
uses: crowdin/github-action@c7af9bc98b01694653031fef2a0dc6c7888ce9bc # v2.17.0
uses: crowdin/github-action@v1
with:
upload_sources: true
upload_translations: false
@@ -94,9 +79,3 @@ jobs:
env:
CROWDIN_PROJECT_ID: ${{ vars.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
- name: Clear stale ICU translations in Crowdin
run: pnpm scripts i18n-icu-contract clear-crowdin-changed --base-ref HEAD^ --crowdin-branch "[${{ github.repository_owner }}.${{ github.event.repository.name }}] ${{ steps.branch-name.outputs.safe_branch_name }}"
env:
CROWDIN_PROJECT_ID: ${{ vars.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
-157
View File
@@ -1,157 +0,0 @@
name: Labrinth Build
on:
push:
branches:
- 'main'
- 'prod'
paths:
- .github/workflows/labrinth-build.yml
- 'apps/labrinth/**'
- 'packages/**'
- '!packages/api-client/**'
- '!packages/app-lib/**'
- Cargo.toml
- Cargo.lock
pull_request:
types: [opened, synchronize]
paths:
- .github/workflows/labrinth-build.yml
- 'apps/labrinth/**'
- 'packages/**'
- '!packages/api-client/**'
- '!packages/app-lib/**'
- Cargo.toml
- Cargo.lock
merge_group:
types: [checks_requested]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/prod' }}
jobs:
skip-if-clean:
name: Skip if merge_queue produces no diff
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.check.outputs.skip }}
internal: ${{ steps.check-internal.outputs.internal }}
if: ${{ always() }}
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Check if workflow runs on an internal branch
id: check-internal
env:
EVENT_NAME: ${{ github.event_name }}
HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
REPO: ${{ github.repository }}
run: |
if [ "$EVENT_NAME" != "pull_request" ] || [ "$HEAD_REPO" = "$REPO" ]; then
echo "internal=true" >> $GITHUB_OUTPUT
else
echo "internal=false" >> $GITHUB_OUTPUT
fi
- name: Merge Queue CI Check Skipper
id: merge-queue-ci-skipper
uses: ./.github/merge-queue-ci-skipper
with:
secret: ${{ secrets.GH_ACCESS_TOKEN }}
- name: Check merge_group synthetic commit
id: check
run: |
# PR mode: never skip
if [ "${{ github.event_name }}" != "merge_group" ]; then
echo "skip=false" >> $GITHUB_OUTPUT
exit 0
fi
if [ "${{ steps.merge-queue-ci-skipper.outputs.skip-check }}" = "true" ]; then
echo "skip=true" >> $GITHUB_OUTPUT
else
echo "skip=false" >> $GITHUB_OUTPUT
fi
build:
name: Build Labrinth
runs-on: ${{ needs.skip-if-clean.outputs.internal == 'true' && 'namespace-profile-modrinth-labrinth' || 'ubuntu-latest' }}
needs: [skip-if-clean]
if: ${{ needs.skip-if-clean.outputs.skip != 'true' }}
env:
SQLX_OFFLINE: 'true'
GIT_HASH: ${{ github.sha }}
SCCACHE_CACHE_SIZE: ${{ needs.skip-if-clean.outputs.internal == 'true' && '20G' || '' }}
RUSTC_WRAPPER: ${{ needs.skip-if-clean.outputs.internal == 'true' && 'sccache' || '' }}
RUST_MIN_STACK: '268435456'
steps:
- name: Check out code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
with:
rustflags: ''
cache: false
- name: Setup mold
uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1 / Mold 2.41.0
- name: Setup sccache
uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10
- name: Set up caches
if: needs.skip-if-clean.outputs.internal == 'true'
uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
with:
cache: |
rust
apt
- name: Configure sccache
if: needs.skip-if-clean.outputs.internal == 'true'
run: nsc cache sccache setup --cache_name default >> "$GITHUB_ENV"
- name: Install build dependencies
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends cmake libcurl4-openssl-dev
- name: Build labrinth
run: cargo build --profile release-labrinth --package labrinth
- name: Stage Docker context
run: |
mkdir -p apps/labrinth/docker-stage
cp target/release-labrinth/labrinth apps/labrinth/docker-stage/labrinth
cp -r apps/labrinth/migrations apps/labrinth/docker-stage/migrations
cp -r apps/labrinth/assets apps/labrinth/docker-stage/assets
- name: Upload Docker context
if: needs.skip-if-clean.outputs.internal == 'true'
uses: namespace-actions/upload-artifact@f6ccaacc655aec41b93af180d1d7eef21af862d2 # v1.0.3
with:
name: labrinth-docker-context
retention-days: 1
path: apps/labrinth/docker-stage
docker-build:
needs: [skip-if-clean, build]
if: ${{ needs.skip-if-clean.outputs.internal == 'true' }}
uses: SparkUniverse/workflows/.github/workflows/docker-build.yaml@main
with:
image-name: labrinth
dockerfile-path: apps/labrinth/Dockerfile
artifacts-name: labrinth-docker-context
deploy:
needs: [skip-if-clean, docker-build]
if: ${{ needs.skip-if-clean.outputs.internal == 'true' && github.ref == 'refs/heads/prod' }}
uses: SparkUniverse/workflows/.github/workflows/argo-update.yaml@main
secrets:
ARGOCD_DEPLOY_KEY: ${{ secrets.ARGOCD_DEPLOY_KEY }}
with:
application-set: labrinth
branch: ${{ github.ref == 'refs/heads/prod' && 'main' || 'develop' }}
environment-name: ${{ github.ref == 'refs/heads/prod' && 'production' || 'staging' }}
+70
View File
@@ -0,0 +1,70 @@
name: docker-build
on:
push:
branches:
- '**'
paths:
- .github/workflows/labrinth-docker.yml
- 'apps/labrinth/**'
- Cargo.toml
- Cargo.lock
pull_request:
types: [opened, synchronize]
paths:
- .github/workflows/labrinth-docker.yml
- 'apps/labrinth/**'
- Cargo.toml
- Cargo.lock
merge_group:
types: [checks_requested]
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: 📥 Check out code
uses: actions/checkout@v4
- name: 🧰 Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: ⚙️ Generate Docker image metadata
id: docker_meta
uses: docker/metadata-action@v5
env:
# GitHub Packages requires annotations metadata in at least the index descriptor to show them
# up properly in its UI it seems, but it's not clear about it, because the docs refer to the
# image manifest only. See:
# https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#adding-a-description-to-multi-arch-images
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
with:
images: ghcr.io/modrinth/labrinth
labels: |
org.opencontainers.image.title=labrinth
org.opencontainers.image.description=Modrinth API
org.opencontainers.image.licenses=AGPL-3.0-only
annotations: |
org.opencontainers.image.title=labrinth
org.opencontainers.image.description=Modrinth API
org.opencontainers.image.licenses=AGPL-3.0-only
- name: 🔑 Login to GitHub Packages
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 🔨 Build and push
uses: docker/build-push-action@v6
with:
file: ./apps/labrinth/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
annotations: ${{ steps.docker_meta.outputs.annotations }}
build-args: |
GIT_HASH=${{ fromJSON(steps.docker_meta.outputs.json).labels['org.opencontainers.image.revision'] }}
cache-from: type=registry,ref=ghcr.io/modrinth/labrinth:main
cache-to: type=inline
-20
View File
@@ -1,20 +0,0 @@
name: Slash Command Dispatch
on:
issue_comment:
types: [created]
permissions: {}
jobs:
dispatch-command:
if: ${{ github.event.sender.type == 'User' && contains(fromJSON('["OWNER", "MEMBER"]'), github.event.comment.author_association) }}
runs-on: namespace-profile-tiny-arm64
steps:
- name: Slash Command Dispatch
uses: peter-evans/slash-command-dispatch@9bdcd7914ec1b75590b790b844aa3b8eee7c683a # v5.0.2
with:
token: ${{ secrets.SLASH_CMD_GH_TOKEN }}
issue-type: pull-request
commands: |
deploy
+28 -68
View File
@@ -27,79 +27,46 @@ on:
options:
- prod
- staging
- prod-with-staging-archon
default: prod
required: false
app-version-override:
description: Temporary app version override for updater testing
type: string
required: false
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/prod' }}
jobs:
build:
name: Build
env:
VITE_STRIPE_PUBLISHABLE_KEY: pk_live_51JbFxJJygY5LJFfKLVVldb10HlLt24p421OWRsTOWc5sXYFOnFUXWieSc6HD3PHo25ktx8db1WcHr36XGFvZFVUz00V9ixrCs5
RUSTC_WRAPPER: 'sccache'
strategy:
fail-fast: false
matrix:
platform:
[
namespace-profile-medium-amd64-macos,
namespace-profile-medium-amd64-windows,
namespace-profile-medium-amd64,
]
platform: [macos-latest, windows-latest, ubuntu-latest]
include:
- platform: namespace-profile-medium-amd64-macos
- platform: macos-latest
artifact-target-name: universal-apple-darwin
- platform: namespace-profile-medium-amd64-windows
- platform: windows-latest
artifact-target-name: x86_64-pc-windows-msvc
- platform: namespace-profile-medium-amd64
- platform: ubuntu-latest
artifact-target-name: x86_64-unknown-linux-gnu
runs-on: ${{ matrix.platform }}
steps:
- name: Check out code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ''
target: ${{ contains(matrix.artifact-target-name, 'darwin') && 'x86_64-apple-darwin' || '' }}
target: ${{ startsWith(matrix.platform, 'macos') && 'x86_64-apple-darwin' || '' }}
- name: Setup mold
if: contains(matrix.artifact-target-name, 'linux')
uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1 / Mold 2.41.0
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Setup sccache
uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Enable Corepack
run: corepack enable
- name: Set up caches
uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
with:
cache: |
rust
pnpm
- name: Configure sccache
run: nsc cache sccache setup --cache_name default >> "$GITHUB_ENV"
cache: pnpm
- name: Generate tauri-dev.conf.json
shell: bash
@@ -117,33 +84,24 @@ jobs:
EOF
- name: Install Linux build dependencies
if: contains(matrix.artifact-target-name, 'linux')
if: startsWith(matrix.platform, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev
- name: Setup Java
uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0
with:
distribution: temurin
java-version: 17
sudo apt-get install -yq libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev
- name: Setup Dasel
uses: jaxxstorm/action-install-gh-release@25e24d2d23ae098373794ef1d6faecb48ee52da8 # v3.0.0
uses: jaxxstorm/action-install-gh-release@v2.1.0
with:
repo: TomWright/dasel
tag: v2.8.1
extension-matching: disable
rename-to: ${{ contains(matrix.artifact-target-name, 'windows') && 'dasel.exe' || 'dasel' }}
rename-to: ${{ startsWith(matrix.platform, 'windows') && 'dasel.exe' || 'dasel' }}
chmod: 0755
- name: Set application version and environment
shell: bash
run: |
APP_VERSION="${{ inputs.app-version-override }}"
if [ -z "$APP_VERSION" ]; then
APP_VERSION="$(git describe --tags --always | sed -E 's/-([0-9]+)-(g[0-9a-fA-F]+)$/-canary+\1.\2/')"
fi
APP_VERSION="$(git describe --tags --always | sed -E 's/-([0-9]+)-(g[0-9a-fA-F]+)$/-canary+\1.\2/')"
BUILD_ENVIRONMENT="${{ inputs.environment || 'prod' }}"
echo "Setting application version to $APP_VERSION"
echo "Using environment $BUILD_ENVIRONMENT"
@@ -153,11 +111,14 @@ jobs:
cp "packages/app-lib/.env.${BUILD_ENVIRONMENT}" packages/app-lib/.env
- name: Setup Turbo cache
uses: rharkor/caching-for-turbo@v1.8
- name: Install dependencies
run: pnpm install
- name: Set up Windows code signing
if: contains(matrix.artifact-target-name, 'windows')
if: startsWith(matrix.platform, 'windows')
shell: bash
run: |
if [ '${{ startsWith(github.ref, 'refs/tags/v') || inputs.sign-windows-binaries }}' = 'true' ]; then
@@ -167,10 +128,9 @@ jobs:
fi
- name: Build macOS app
run: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || inputs.app-version-override != '') && 'pnpm --filter=@modrinth/app run tauri build --target universal-apple-darwin --config tauri-release.conf.json' || 'pnpm --filter=@modrinth/app run tauri build --target universal-apple-darwin --config tauri-dev.conf.json' }}
if: contains(matrix.artifact-target-name, 'darwin')
run: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && 'pnpm --filter=@modrinth/app run tauri build --target universal-apple-darwin --config tauri-release.conf.json' || 'pnpm --filter=@modrinth/app run tauri build --target universal-apple-darwin --config tauri-dev.conf.json' }}
if: startsWith(matrix.platform, 'macos')
env:
TAURI_BUNDLER_DMG_IGNORE_CI: 'true'
ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
@@ -182,8 +142,8 @@ jobs:
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
- name: Build Linux app
run: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || inputs.app-version-override != '') && 'pnpm --filter=@modrinth/app run tauri build --config tauri-release.conf.json' || 'pnpm --filter=@modrinth/app run tauri build --config tauri-dev.conf.json' }}
if: contains(matrix.artifact-target-name, 'linux')
run: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && 'pnpm --filter=@modrinth/app run tauri build --config tauri-release.conf.json' || 'pnpm --filter=@modrinth/app run tauri build --config tauri-dev.conf.json' }}
if: startsWith(matrix.platform, 'ubuntu')
env:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
@@ -193,9 +153,9 @@ jobs:
[System.Convert]::FromBase64String("$env:DIGICERT_ONE_SIGNER_CLIENT_CERTIFICATE_BASE64") | Set-Content -Path signer-client-cert.p12 -AsByteStream
$env:DIGICERT_ONE_SIGNER_CREDENTIALS = "$env:DIGICERT_ONE_SIGNER_API_KEY|$PWD\signer-client-cert.p12|$env:DIGICERT_ONE_SIGNER_CLIENT_CERTIFICATE_PASSWORD"
$env:JAVA_HOME = "$env:JAVA_HOME_17_X64"
${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || inputs.app-version-override != '') && 'pnpm --filter=@modrinth/app run tauri build --config tauri-release.conf.json --verbose --bundles "nsis,updater"' || 'pnpm --filter=@modrinth/app run tauri build --config tauri-dev.conf.json --verbose --bundles "nsis,updater"' }}
${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && 'pnpm --filter=@modrinth/app run tauri build --config tauri-release.conf.json --verbose --bundles "nsis,updater"' || 'pnpm --filter=@modrinth/app run tauri build --config tauri-dev.conf.json --verbose --bundles "nsis,updater"' }}
Remove-Item -Path signer-client-cert.p12 -ErrorAction SilentlyContinue
if: contains(matrix.artifact-target-name, 'windows')
if: startsWith(matrix.platform, 'windows')
env:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
@@ -204,7 +164,7 @@ jobs:
DIGICERT_ONE_SIGNER_CLIENT_CERTIFICATE_PASSWORD: ${{ secrets.DIGICERT_ONE_SIGNER_CLIENT_CERTIFICATE_PASSWORD }}
- name: Upload app bundles
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
uses: actions/upload-artifact@v4
with:
name: App bundle (${{ matrix.artifact-target-name }})
path: |
+22 -63
View File
@@ -1,74 +1,47 @@
name: Modrinth App release
on:
workflow_run:
workflows: ['Modrinth App build']
types: [completed]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/prod' }}
workflow_dispatch:
inputs:
version-tag:
description: Version tag to release to the wide public
type: string
required: true
release-notes:
description: Release notes to include in the Tauri version manifest
default: A new release of the Modrinth App is available!
type: string
required: true
jobs:
release:
name: Release Modrinth App
if: >-
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'push' &&
startsWith(github.event.workflow_run.head_branch, 'v')
runs-on: namespace-profile-medium-amd64
runs-on: ubuntu-latest
env:
VERSION_TAG: ${{ github.event.workflow_run.head_branch }}
LINUX_X64_BUNDLE_ARTIFACT_NAME: App bundle (x86_64-unknown-linux-gnu)
WINDOWS_X64_BUNDLE_ARTIFACT_NAME: App bundle (x86_64-pc-windows-msvc)
MACOS_UNIVERSAL_BUNDLE_ARTIFACT_NAME: App bundle (universal-apple-darwin)
LAUNCHER_FILES_BUCKET_BASE_URL: https://launcher-files.modrinth.com
steps:
- name: Check out code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Verify ref is a tag
env:
GH_TOKEN: ${{ github.token }}
HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
run: |
tag_sha=$(gh api "repos/${{ github.repository }}/git/refs/tags/${VERSION_TAG}" --jq '.object.sha' 2>/dev/null || true)
if [ -z "$tag_sha" ]; then
echo "::error::${VERSION_TAG} is not a git tag in this repo"
exit 1
fi
if [ "$tag_sha" != "$HEAD_SHA" ]; then
commit_sha=$(gh api "repos/${{ github.repository }}/git/tags/${tag_sha}" --jq '.object.sha' 2>/dev/null || echo "$tag_sha")
if [ "$commit_sha" != "$HEAD_SHA" ]; then
echo "::error::Tag ${VERSION_TAG} (${commit_sha}) does not match build head_sha (${HEAD_SHA})"
exit 1
fi
fi
echo "Verified ${VERSION_TAG} is a tag pointing at ${HEAD_SHA}"
- name: Download Modrinth App artifacts
uses: dawidd6/action-download-artifact@b6e2e70617bc3265edd6dab6c906732b2f1ae151 # v21
- name: 📥 Download Modrinth App artifacts
uses: dawidd6/action-download-artifact@v11
with:
workflow: theseus-build.yml
workflow_conclusion: success
event: push
branch: ${{ env.VERSION_TAG }}
branch: ${{ inputs.version-tag }}
use_unzip: true
- name: Extract app changelog
- name: 🛠️ Generate version manifest
env:
GH_TOKEN: ${{ github.token }}
VERSION: ${{ env.VERSION_TAG }}
run: |
LAST_GITHUB_RELEASE_PUBLISHED_AT=$(gh api "repos/${{ github.repository }}/releases/latest" --jq '.published_at // ""' 2>/dev/null || true)
LAST_GITHUB_RELEASE_PUBLISHED_AT="$LAST_GITHUB_RELEASE_PUBLISHED_AT" npx --yes tsx scripts/build-theseus-release-notes.ts
- name: Generate version manifest
VERSION_TAG: ${{ inputs.version-tag }}
RELEASE_NOTES: ${{ inputs.release-notes }}
run: |
# Reference: https://tauri.app/plugin/updater/#server-support
jq -nc \
--arg versionTag "${VERSION_TAG#v}" \
--rawfile releaseNotes release-notes.md \
--arg releaseNotes "$RELEASE_NOTES" \
--rawfile macOsAarch64UpdateArtifactSignature "${MACOS_UNIVERSAL_BUNDLE_ARTIFACT_NAME}/universal-apple-darwin/release/bundle/macos/Modrinth App.app.tar.gz.sig" \
--rawfile macOsX64UpdateArtifactSignature "${MACOS_UNIVERSAL_BUNDLE_ARTIFACT_NAME}/universal-apple-darwin/release/bundle/macos/Modrinth App.app.tar.gz.sig" \
--rawfile linuxX64UpdateArtifactSignature "${LINUX_X64_BUNDLE_ARTIFACT_NAME}/release/bundle/appimage/Modrinth App_${VERSION_TAG#v}_amd64.AppImage.tar.gz.sig" \
@@ -108,8 +81,9 @@ jobs:
echo "Generated manifest for version ${VERSION_TAG}:"
cat updates.json
- name: Upload release artifacts
- name: 📤 Upload release artifacts
env:
VERSION_TAG: ${{ inputs.version-tag }}
AWS_ACCESS_KEY_ID: ${{ secrets.LAUNCHER_FILES_BUCKET_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.LAUNCHER_FILES_BUCKET_SECRET_ACCESS_KEY }}
AWS_BUCKET: ${{ secrets.LAUNCHER_FILES_BUCKET_NAME }}
@@ -142,18 +116,3 @@ jobs:
done
aws s3 cp updates.json "s3://${AWS_BUCKET}"
- name: Create GitHub release
env:
GH_TOKEN: ${{ github.token }}
run: |
VERSION="${VERSION_TAG#v}"
gh release create "$VERSION_TAG" \
--title "Modrinth App ${VERSION}" \
--notes-file release-notes.md \
"${WINDOWS_X64_BUNDLE_ARTIFACT_NAME}/release/bundle/nsis/Modrinth App_${VERSION}_x64-setup.exe" \
"${MACOS_UNIVERSAL_BUNDLE_ARTIFACT_NAME}/universal-apple-darwin/release/bundle/dmg/Modrinth App_${VERSION}_universal.dmg" \
"${LINUX_X64_BUNDLE_ARTIFACT_NAME}/release/bundle/appimage/Modrinth App_${VERSION}_amd64.AppImage" \
"${LINUX_X64_BUNDLE_ARTIFACT_NAME}/release/bundle/deb/Modrinth App_${VERSION}_amd64.deb" \
"${LINUX_X64_BUNDLE_ARTIFACT_NAME}/release/bundle/rpm/Modrinth App-${VERSION}-1.x86_64.rpm"
+33 -108
View File
@@ -8,63 +8,10 @@ on:
merge_group:
types: [checks_requested]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/prod' }}
jobs:
skip-if-clean:
name: Skip if merge_queue produces no diff
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.check.outputs.skip }}
internal: ${{ steps.check-internal.outputs.internal }}
if: ${{ always() }}
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Check if workflow runs on an internal branch
id: check-internal
env:
EVENT_NAME: ${{ github.event_name }}
HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
REPO: ${{ github.repository }}
run: |
if [ "$EVENT_NAME" != "pull_request" ] || [ "$HEAD_REPO" = "$REPO" ]; then
echo "internal=true" >> $GITHUB_OUTPUT
else
echo "internal=false" >> $GITHUB_OUTPUT
fi
- name: Merge Queue CI Check Skipper
id: merge-queue-ci-skipper
uses: ./.github/merge-queue-ci-skipper
with:
secret: ${{ secrets.GH_ACCESS_TOKEN }}
- name: Check merge_group synthetic commit
id: check
env:
EVENT_NAME: ${{ github.event_name }}
SKIP_CHECK: ${{ steps.merge-queue-ci-skipper.outputs.skip-check }}
run: |
if [ "$EVENT_NAME" != "merge_group" ]; then
echo "skip=false" >> $GITHUB_OUTPUT
exit 0
fi
if [ "$SKIP_CHECK" = "true" ]; then
echo "skip=true" >> $GITHUB_OUTPUT
else
echo "skip=false" >> $GITHUB_OUTPUT
fi
build:
name: Lint and Test
runs-on: ${{ needs.skip-if-clean.outputs.internal == 'true' && 'namespace-profile-modrinth-turbo' || 'ubuntu-latest' }}
needs: [skip-if-clean]
if: ${{ needs.skip-if-clean.outputs.skip != 'true' }}
runs-on: ubuntu-latest
env:
# Ensure pnpm output is colored in GitHub Actions logs
@@ -76,80 +23,59 @@ jobs:
# since we don't want warnings to become errors
# while developing)
RUSTFLAGS: -Dwarnings
# Redis config for tests
REDIS_TOPOLOGY: cluster
REDIS_CONNECTION_TYPE: multiplexed
REDIS_URL: redis://127.0.0.1:7000,redis://127.0.0.1:7001,redis://127.0.0.1:7002,redis://127.0.0.1:7003,redis://127.0.0.1:7004,redis://127.0.0.1:7005
# Avoid stack overflows in tests
RUST_MIN_STACK: 134217728
steps:
- name: Check out code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: 📥 Check out code
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .nvmrc
- name: Enable Corepack
run: corepack enable
- name: Set up caches
if: needs.skip-if-clean.outputs.internal == 'true'
uses: namespacelabs/nscloud-cache-action@c5f8dab7560444c4bf8dbc64f1b203431873c547 # v1.6.1
with:
cache: |
rust
pnpm
apt
- name: Set up Turborepo caching
if: needs.skip-if-clean.outputs.internal == 'true'
uses: namespace-actions/setup-turbocache@f96bd6befa13ae74b2858a5be49573640d4636f5 # v0.0.2
- name: Install apt dependencies
- name: 🧰 Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake libcurl4-openssl-dev libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev
sudo apt-get install -yq libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
- name: 🧰 Install pnpm
uses: pnpm/action-setup@v4
- name: 🧰 Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
- name: 🧰 Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ''
components: clippy, rustfmt
cache: false
- name: Setup mold
uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1 / Mold 2.41.0
- name: Setup binstall
uses: cargo-bins/cargo-binstall@ead08b90bd7b2e6d81963fb9cf0b7239f66d5db4 # v1.21.0
- name: Setup nextest
run: cargo binstall --no-confirm --secure --locked cargo-nextest@0.9.133
- name: 🧰 Setup nextest
uses: taiki-e/install-action@nextest
# cargo-binstall does not have pre-built binaries for sqlx-cli, so we fall
# back to a cached cargo install
- name: Setup cargo-sqlx
uses: taiki-e/cache-cargo-install-action@417450f3c33ee20393705369577571770643d4c7 # v3.0.7
- name: 🧰 Setup cargo-sqlx
uses: taiki-e/cache-cargo-install-action@v2
with:
tool: sqlx-cli@0.8.6
tool: sqlx-cli
locked: false
no-default-features: true
features: rustls,postgres
- name: Install dependencies
- name: 💨 Setup Turbo cache
uses: rharkor/caching-for-turbo@v1.8
- name: 🧰 Install dependencies
run: pnpm install
- name: Set app environment
- name: ⚙️ Set app environment
working-directory: packages/app-lib
run: cp .env.staging .env
# check if labrinth tests will actually run (cache miss)
- name: Check if labrinth tests need to run
- name: 🔍 Check if labrinth tests need to run
id: check-labrinth
run: |
LABRINTH_TEST_STATUS=$(pnpm turbo run test --filter=@modrinth/labrinth --dry-run=json | jq -r '.tasks[] | select(.task == "test") | .cache.status')
@@ -160,22 +86,21 @@ jobs:
echo "needs_services=true" >> $GITHUB_OUTPUT
fi
- name: Start services
- name: ⚙️ Start services
if: steps.check-labrinth.outputs.needs_services == 'true'
run: docker compose --profile clustered-redis up --wait
run: docker compose up --wait
- name: Setup labrinth environment and database
- name: ⚙️ Setup labrinth environment and database
if: steps.check-labrinth.outputs.needs_services == 'true'
working-directory: apps/labrinth
run: |
cp .env.local .env
sqlx database setup
- name: Lint and test
- name: 🔍 Lint and test
run: pnpm run ci
- name: Verify intl:extract has been run
- name: 🔍 Verify intl:extract has been run
run: |
pnpm turbo run intl:extract --force
pnpm scripts i18n-icu-contract prune-local --check
git diff --exit-code --color */*/src/locales/*/index.json
git diff --exit-code --color */*/src/locales/en-US/index.json
+1 -19
View File
@@ -22,7 +22,6 @@ node_modules
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/i18n-ally-custom-framework.yml
# IDE - IntelliJ
.idea/*
@@ -55,26 +54,17 @@ Thumbs.db
# frontend generated files
apps/frontend/src/generated
/packages/ui/src/layouts/wrapped/settings/language-settings/language-settings-coverage.generated.ts
.turbo
target
generated
!apps/app-frontend/src/generated/
!apps/app-frontend/src/generated/app-events/
!apps/app-frontend/src/generated/app-events/*.ts
!apps/app-frontend/src/generated/app-events/README.md
!apps/app-frontend/src/generated/app-events/postcard/
!apps/app-frontend/src/generated/app-events/postcard/index.d.ts
!apps/app-frontend/src/generated/app-events/postcard/index.js
!apps/app-frontend/src/generated/app-events/postcard/package.json
.env
# app testing dir
app-playground-data/*
.astro
.claude/
.claude
.letta
# labrinth demo fixtures
@@ -87,11 +77,3 @@ storybook-static
# frontend robots.txt
apps/frontend/src/public/robots.txt
# Oh My Code
.omc/
# Local dry-run output for scripts/build-theseus-release-notes.mjs
/test_result.md
packages/tooling-config/script-utils/import-sort.js
-12
View File
@@ -17,18 +17,6 @@
<sourceFolder url="file://$MODULE_DIR$/packages/modrinth-maxmind/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/packages/modrinth-util/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/packages/muralpay/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/packages/async-minecraft-ping/examples" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/packages/async-minecraft-ping/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/packages/async-minecraft-ping/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/packages/labrinth-derive/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/packages/modrinth-content-management/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/packages/modrinth-content-management/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/packages/neverbounce/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/packages/serde-binhum/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/packages/sqlx-tracing/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/packages/sqlx-tracing/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/packages/xredis/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/packages/component-derive/src" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
-23
View File
@@ -1,23 +0,0 @@
merge_queue:
mode: parallel
scopes:
source:
files:
frontend:
include:
- apps/frontend/**/*
- packages/ui/**/*
- packages/utils/**/*
- packages/assets/**/*
- "**/wrangler.jsonc"
- "**/pnpm-*.yaml"
backend:
include:
- apps/labrinth/**
- Cargo.toml
app:
include:
- apps/app/**
- apps/app-frontend/**
- packages/app-lib/**
- packages/app-macros/**
-9
View File
@@ -1,11 +1,2 @@
strict-peer-dependencies=false
auto-install-peers=true
public-hoist-pattern[]=prettier-plugin-*
public-hoist-pattern[]=@prettier/plugin-*
public-hoist-pattern[]=eslint
public-hoist-pattern[]=@eslint/*
public-hoist-pattern[]=eslint-plugin-*
public-hoist-pattern[]=@nuxt/eslint-config
public-hoist-pattern[]=typescript-eslint
public-hoist-pattern[]=vue-eslint-parser
public-hoist-pattern[]=globals
+1 -1
View File
@@ -1 +1 @@
24.15.0
20.19.2
+1 -1
View File
@@ -1,3 +1,3 @@
{
"recommendations": ["esbenp.prettier-vscode", "Vue.volar", "rust-lang.rust-analyzer", "lokalise.i18n-ally"]
"recommendations": ["esbenp.prettier-vscode", "Vue.volar", "rust-lang.rust-analyzer"]
}
-10
View File
@@ -1,10 +0,0 @@
languageIds:
- vue
- typescript
- javascript
- typescriptreact
usageMatchRegex:
- id:\s*['"]({key})['"]
monopoly: true
+2 -14
View File
@@ -9,7 +9,7 @@
"files.insertFinalNewline": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
"source.organizeImports": "always"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[vue]": {
@@ -29,17 +29,5 @@
},
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer"
},
"css.lint.unknownAtRules": "ignore",
"scss.lint.unknownAtRules": "ignore",
"i18n-ally.localesPaths": [
"packages/ui/src/locales",
"apps/frontend/src/locales",
"packages/moderation/src/locales"
],
"i18n-ally.pathMatcher": "{locale}/index.{ext}",
"i18n-ally.keystyle": "flat",
"i18n-ally.sourceLanguage": "en-US",
"i18n-ally.namespace": false,
"i18n-ally.includeSubfolders": true
}
}
-93
View File
@@ -1,93 +0,0 @@
# Modrinth Monorepo
This is the Modrinth monorepo — it contains all Modrinth projects, both frontend and backend. When entering a project, either to edit or analyse, you should read its AGENTS.md.
## Architecture
- **Monorepo tooling:** [Turborepo](https://turbo.build/) (`turbo.jsonc`) + [pnpm workspaces](https://pnpm.io/workspaces) (`pnpm-workspace.yaml`)
- **Frontend:** Vue 3 / Nuxt 3, Tailwind CSS v3
- **Backend:** Rust (Labrinth API), Postgres, Clickhouse
- **Indentation:** Use TAB everywhere, never spaces
### Apps (`apps/`)
| App | Description |
| ----------------- | ------------------------------ |
| `frontend` | Main Modrinth website (Nuxt 3) |
| `app-frontend` | Desktop/app frontend (Vue 3) |
| `app` | Desktop/app shell (Tauri) |
| `app-playground` | Testing playground for app |
| `labrinth` | Backend API service |
| `daedalus_client` | Daedalus client implementation |
| `docs` | Documentation site (Astro) |
### Packages (`packages/`)
| Package | Description |
| ------------------ | ----------------------------------------------------- |
| `ui` | Shared Vue component library (`@modrinth/ui`) |
| `assets` | Styling and auto-generated icons (`@modrinth/assets`) |
| `api-client` | API client for Nuxt, Tauri, and Node/browser |
| `app-lib` | Shared app library |
| `blog` | Blog system and changelog data |
| `utils` | Shared utility functions (mostly deprecated) |
| `moderation` | Moderation utilities |
| `daedalus` | Daedalus protocol |
| `tooling-config` | ESLint, Prettier, TypeScript configs |
| `ariadne` | Analytics library |
| `modrinth-log` | Logging utilities |
| `modrinth-maxmind` | MaxMind GeoIP |
| `modrinth-util` | General utilities |
| `muralpay` | Payment processing |
| `path-util` | Path utilities |
| `sqlx-tracing` | SQLx query tracing |
## Pre-PR Commands
Run these from the **root** folder before opening a pull request - do not run these after each prompt the user gives you, only run when asked, ask the user a question if they want to run it if the user indicates that they are about to create a pull request.
- **Website:** `pnpm prepr:frontend:web`
- **App frontend:** `pnpm prepr:frontend:app`
- **Frontend libs:** `pnpm prepr:frontend:lib`
- **All frontend (app+web):** `pnpm prepr`
- **Labrinth (backend):** See `apps/labrinth/AGENTS.md`
The website and app `prepr` commands
## Dev Commands
- **Website:** `pnpm web:dev` (copy `.env` template in `apps/frontend/` first)
- **App:** `pnpm app:dev` (copy `.env` template in `packages/app-lib/` first)
- **Storybook (packages/ui):** `pnpm storybook`
## Project-Specific Instructions
Each project may have its own file with detailed instructions:
- [`apps/labrinth/AGENTS.md`](apps/labrinth/AGENTS.md) — Backend API
- [`apps/frontend/AGENTS.md`](apps/frontend/AGENTS.md) - Frontend Website
## Code Guidelines
### Comments
- DO NOT use "heading" comments like: `=== Helper methods ===`.
- Use doc comments, but avoid inline comments unless ABSOLUTELY necessary for clarity. Code should aim to be self documenting!
## Bash Guidelines
### Output handling
- DO NOT pipe output through `head`, `tail`, `less`, or `more`
- NEVER use `| head -n X` or `| tail -n X` to truncate output
- IMPORTANT: Run commands directly without pipes when possible
- IMPORTANT: If you need to limit output, use command-specific flags (e.g. `git log -n 10` instead of `git log | head -10`)
- ALWAYS read the full output — never pipe through filters
### General
- Do not create new non-source code files (e.g. Bash scripts, SQL scripts) unless explicitly prompted to
- For Frontend, when doing lint checks, only use the `prepr` commands, do not use `typecheck` or `tsc` etc.
- Types in `@modrinth/utils` are considered highly outdated, if a component needs them, check if you can switch said component to use types from `packages/api-client`
- When provided problems, do not say "I didn't introduce these problems" (shifting the blame/effort) - just fix them.
## Standards
Standards available at the @standards/ folder.
+63
View File
@@ -0,0 +1,63 @@
# Architecture
Use TAB instead of spaces.
## Frontend
There are two similar frontends in the Modrinth monorepo, the website (apps/frontend) and the app frontend (apps/app-frontend).
Both use Tailwind v3, and their respective configs can be seen at `tailwind.config.ts` and `tailwind.config.js` respectively.
Both utilize shared and common components from `@modrinth/ui` which can be found at `packages/ui`, and stylings from `@modrinth/assets` which can be found at `packages/assets`.
Both can utilize icons from `@modrinth/assets`, which are automatically generated based on what's available within the `icons` folder of the `packages/assets` directory. You can see the generated icons list in `generated-icons.ts`.
Both have access to our dependency injection framework, examples as seen in `packages/ui/src/providers/`. Ideally any state which is shared between a page and it's subpages should be shared using this dependency injection framework.
### Website (apps/frontend)
Before a pull request can be opened for the website, run `pnpm prepr:frontend:web` from the root folder, otherwise CI will fail.
To run a development version of the frontend, you must first copy over the relevant `.env` template file (prod, staging or local, usually prod) within the `apps/frontend` folder into `apps/frontend/.env`. Then you can run the frontend by running `pnpm web:dev` in the root folder.
### App Frontend (apps/app-frontend)
Before a pull request can be opened for the app frontend, run `pnpm prepr:frontend:app` from the root folder, otherwise CI will fail.
To run a development version of the app frontend, you must first copy over the relevant `.env` template file (prod, staging or local, usually prod) within `packages/app-lib` into `packages/app-lib/.env`. Then you must run the app itself by running `pnpm app:dev` in the root folder.
### Localization
Refer to `.github/instructions/i18n-convert.instructions.md` if the user asks you to perform any i18n conversion work on a component, set of components, pages or sets of pages.
## Labrinth
Labrinth is the backend API service for Modrinth.
### Testing
Before a pull request can be opened, run `cargo clippy -p labrinth --all-targets` and make sure there are ZERO warnings, otherwise CI will fail.
Use `cargo test -p labrinth --all-targets` to test your changes. All tests must pass, otherwise CI will fail.
To prepare the sqlx cache, cd into `apps/labrinth` and run `cargo sqlx prepare`. Make sure to NEVER run `cargo sqlx prepare --workspace`.
Read the root `docker-compose.yml` to see what running services are available while developing. Use `docker exec` to access these services.
When the user refers to "performing pre-PR checks", do the following:
- Run clippy as described above
- DO NOT run tests unless explicitly requested (they take a long time)
- Prepare the sqlx cache
### Clickhouse
Use `docker exec labrinth-clickhouse clickhouse-client` to access the Clickhouse instance. We use the `staging_ariadne` database to store data in testing.
### Postgres
Use `docker exec labrinth-postgres psql -U labrinth -d labrinth -c "SELECT 1"` to access the PostgreSQL instance, replacing the `SELECT 1` with your query.
# Guidelines
- Do not create new non-source code files (e.g. Bash scripts, SQL scripts) unless explicitly prompted to.
Generated
+397 -1768
View File
File diff suppressed because it is too large Load Diff
+23 -53
View File
@@ -7,16 +7,12 @@ members = [
"apps/labrinth",
"packages/app-lib",
"packages/ariadne",
"packages/component-derive",
"packages/daedalus",
"packages/modrinth-content-management",
"packages/labrinth-derive",
"packages/modrinth-log",
"packages/modrinth-maxmind",
"packages/modrinth-util",
"packages/neverbounce",
"packages/path-util",
"packages/serde-binhum",
"packages/xredis",
]
[workspace.package]
@@ -36,44 +32,39 @@ actix-ws = "0.3.0"
arc-swap = "1.7.1"
argon2 = { version = "0.5.3", features = ["std"] }
ariadne = { path = "packages/ariadne" }
async-minecraft-ping = { path = "packages/async-minecraft-ping" }
async-compression = { version = "0.4.32", default-features = false }
async-minecraft-ping = { version = "0.8.0" }
async-recursion = "1.1.1"
async-stripe = { version = "0.41.0", default-features = false, features = [
"runtime-tokio-hyper-rustls",
] }
async-trait = "0.1.89"
async-tungstenite = { version = "0.31.0", default-features = false, features = ["futures-03-sink"] }
async-tungstenite = { version = "0.31.0", default-features = false, features = [
"futures-03-sink"
] }
async-walkdir = "2.1.0"
async_zip = "0.0.18"
aws-sdk-s3 = { version = "=1.122.0", default-features = false, features = [
"default-https-client",
"rt-tokio",
"rustls",
] }
base64 = "0.22.1"
bitflags = "2.9.4"
bon = "3.9.3"
bytemuck = "1.24.0"
bytes = "1.10.1"
censor = "0.3.0"
chardetng = "0.1.17"
chrono = "0.4.42"
chumsky = "0.9.3"
cidre = { version = "0.15.0", default-features = false, features = ["macos_15_0"] }
cidre = { version = "0.11.3", default-features = false, features = [
"macos_15_0"
] }
clap = "4.5.48"
clickhouse = "0.14.0"
color-eyre = "0.6.5"
color-thief = "0.2.2"
component-derive = { path = "packages/component-derive" }
const_format = "0.2.34"
core-foundation = "0.10.1"
core-graphics = "0.24.0"
daedalus = { path = "packages/daedalus" }
darling = { version = "0.23" }
dashmap = "6.1.0"
data-url = "0.3.2"
deadpool-redis = { git = "https://github.com/modrinth/deadpool", rev = "c7209b086829572f368f1194aba54bdea8dc540b", version = "0.23.0" }
derive_more = "2.1.1"
deadpool-redis = { git = "https://github.com/modrinth/deadpool", rev = "db5fb00b036ecc8fe5f18853c559b745ffe47bde", version = "0.22.1" }
derive_more = "2.0.1"
directories = "6.0.0"
dirs = "6.0.0"
discord-rich-presence = "1.0.0"
@@ -87,14 +78,11 @@ eyre = "0.6.12"
flate2 = "1.1.4"
fs4 = { version = "0.13.1", default-features = false }
futures = "0.3.31"
futures-lite = "2.6.1"
futures-util = "0.3.31"
governor = "0.10.4"
heck = "0.5.0"
hex = "0.4.3"
hickory-resolver = "0.25.2"
hmac = "0.12.1"
httpdate = "1.0.3"
hyper = "1.7.0"
hyper-rustls = { version = "0.27.7", default-features = false, features = [
"aws-lc-rs",
@@ -110,7 +98,6 @@ indicatif = "0.18.0"
itertools = "0.14.0"
jemalloc_pprof = "0.8.1"
json-patch = { version = "4.1.0", default-features = false }
json5 = "1.3.1"
lettre = { version = "0.11.19", default-features = false, features = [
"aws-lc-rs",
"builder",
@@ -122,31 +109,21 @@ lettre = { version = "0.11.19", default-features = false, features = [
"tokio1",
"tokio1-rustls",
] }
lz4_flex = { version = "0.11.5", default-features = false, features = [
"checked-decode",
"safe-decode",
"safe-encode",
"std",
] }
maxminddb = "0.26.0"
modrinth-content-management = { path = "packages/modrinth-content-management" }
meilisearch-sdk = { version = "0.30.0", default-features = false }
modrinth-log = { path = "packages/modrinth-log" }
modrinth-util = { path = "packages/modrinth-util" }
muralpay = { path = "packages/muralpay" }
murmur2 = "0.1.0"
native-dialog = "0.9.2"
neverbounce = { path = "packages/neverbounce" }
notify = { version = "8.2.0", default-features = false }
notify-debouncer-mini = { version = "0.7.0", default-features = false }
objc2-app-kit = { version = "0.3.2", default-features = false }
p256 = "0.13.2"
parking_lot = "0.12.5"
paste = "1.0.15"
path-util = { path = "packages/path-util" }
phf = { version = "0.13.1", features = ["macros"] }
png = "0.18.0"
postcard = { version = "1.1.3", default-features = false, features = ["alloc"] }
postcard-bindgen = "0.8.0"
proc-macro2 = { version = "1.0" }
prometheus = "0.14.0"
quartz_nbt = "0.2.9"
@@ -154,12 +131,14 @@ quick-xml = "0.38.3"
quote = { version = "1.0" }
rand = "=0.8.5" # Locked on 0.8 until argon2 and p256 update to 0.9
rand_chacha = "=0.3.1" # Locked on 0.3 until we can update rand to 0.9
rdkafka = { version = "0.36.2", features = ["cmake-build"] }
redis = "1.4.1"
redis = "0.32.7"
regex = "1.12.2"
reqwest = { version = "0.12.24", default-features = false }
rgb = "0.8.52"
rust_decimal = { version = "1.39.0", features = ["serde-with-float", "serde-with-str"] }
rust_decimal = { version = "1.39.0", features = [
"serde-with-float",
"serde-with-str"
] }
rust_iso3166 = "0.1.14"
rust-s3 = { version = "0.37.0", default-features = false, features = [
"fail-on-err",
@@ -168,7 +147,6 @@ rust-s3 = { version = "0.37.0", default-features = false, features = [
] }
rustls = "0.23.32"
rusty-money = "0.4.1"
scalar_api_reference = { version = "0.2.2", default-features = false }
secrecy = "0.10.3"
sentry = { version = "0.45.0", default-features = false, features = [
"backtrace",
@@ -179,17 +157,16 @@ sentry = { version = "0.45.0", default-features = false, features = [
"rustls",
] }
serde = "1.0.228"
serde-binhum = { path = "packages/serde-binhum" }
serde_bytes = "0.11.19"
serde_cbor = "0.11.2"
serde_ini = "0.2.0"
serde_json = "1.0.145"
serde_with = "3.15.0"
serde-xml-rs = "0.8.1" # Also an XML (de)serializer, consider dropping yaserde in favor of this
sha1 = "0.10.6"
sha1_smol = { version = "1.0.1", features = ["std"] }
sha2 = "0.10.9"
shlex = "1.3.0"
smallvec = "1.15.1"
spdx = "0.12.0"
sqlx = { version = "0.8.6", default-features = false }
sqlx-tracing = { path = "packages/sqlx-tracing" }
@@ -201,12 +178,11 @@ tauri = "2.8.5"
tauri-build = "2.4.1"
tauri-plugin-deep-link = "2.4.3"
tauri-plugin-dialog = "2.4.0"
tauri-plugin-fs = "2.4.5"
tauri-plugin-http = "2.5.7"
tauri-plugin-http = "2.5.2"
tauri-plugin-opener = "2.5.0"
tauri-plugin-os = "2.3.1"
tauri-plugin-single-instance = "2.3.4"
tauri-plugin-updater = { git = "https://github.com/modrinth/plugins-workspace", rev = "0d30f2aa28ec668ce187d527da1c475da3c01cbc", default-features = false, features = [
tauri-plugin-updater = { version = "2.9.0", default-features = false, features = [
"rustls-tls",
"zip",
] }
@@ -219,22 +195,20 @@ tikv-jemallocator = "0.6.0"
tokio = "1.47.1"
tokio-stream = "0.1.17"
tokio-util = "0.7.16"
toml = "0.9.8"
totp-rs = "5.7.0"
tracing = "0.1.41"
tracing-actix-web = { version = "0.7.19", default-features = false }
tracing-ecs = "0.5.0"
tracing-error = "0.2.1"
tracing-subscriber = "0.3.20"
ts-rs = "12.0.1"
typed-path = "0.12.0"
url = "2.5.7"
urlencoding = "2.1.3"
utoipa = { version = "5.4.0", features = ["actix_extras", "chrono", "decimal"] }
utoipa-actix-web = { version = "0.1.2" }
utoipa-swagger-ui = { version = "9.0.2", features = ["actix-web", "vendored"] }
uuid = "1.18.1"
validator = "0.20.0"
webauthn-rs = "0.5.5"
webauthn-rs-proto = "0.5.5"
webp = { version = "0.3.1", default-features = false }
webview2-com = "0.38.0" # Should be updated in lockstep with wry
whoami = "1.6.1"
@@ -242,7 +216,6 @@ windows = "=0.61.3" # Locked on 0.61 until we can update windows-core to 0.62
windows-core = "=0.61.2" # Locked on 0.61 until webview2-com updates to 0.62
winreg = "0.55.0"
woothee = "0.13.0"
xredis = { path = "packages/xredis" }
yaserde = "0.12.0"
zbus = "5.11.0"
zip = { version = "6.0.0", default-features = false, features = [
@@ -283,10 +256,8 @@ read_zero_byte_vec = "warn"
redundant_clone = "warn"
redundant_feature_names = "warn"
redundant_type_annotations = "warn"
result_large_err = "allow"
todo = "warn"
too_many_arguments = "allow"
type_complexity = "allow"
uninlined_format_args = "warn"
unnested_or_patterns = "warn"
wildcard_dependencies = "warn"
@@ -300,11 +271,10 @@ opt-level = "s" # Optimize for binary size
strip = true # Remove debug symbols
lto = true # Enables link to optimizations
panic = "abort" # Strip expensive panic clean-up logic
codegen-units = 1 # Compile crates one after another so the compiler can optimize better
# Specific profile for labrinth production builds
[profile.release-labrinth]
inherits = "release"
opt-level = 2
strip = false # Keep debug symbols for Sentry
lto = "thin" # Enable LTO but keep compile times reasonable
panic = "unwind" # Don't exit the whole app on panic in production
+5 -5
View File
@@ -3,22 +3,22 @@
![Issues](https://img.shields.io/github/issues-raw/Modrinth/code?color=c78aff&label=issues&style=for-the-badge)
![Pull Requests](https://img.shields.io/github/issues-pr-raw/Modrinth/code?color=c78aff&label=PRs&style=for-the-badge)
![Contributors](https://img.shields.io/github/contributors/Modrinth/code?color=c78aff&label=contributors&style=for-the-badge)
![Lines of Code](https://img.shields.io/endpoint?url=https://loctopus.creeperkatze.dev/github/modrinth/code/badge?style=flat&logoColor=white&color=c78aff&style=for-the-badge)
![Lines](https://img.shields.io/endpoint?url=https://ghloc.vercel.app/api/modrinth/code/badge?style=flat&logoColor=white&color=c78aff&style=for-the-badge)
![Commit Activity](https://img.shields.io/github/commit-activity/m/Modrinth/code?color=c78aff&label=commits&style=for-the-badge)
![Last Commit](https://img.shields.io/github/last-commit/Modrinth/code?color=c78aff&label=last%20commit&style=for-the-badge)
## Modrinth Monorepo
Welcome to the Modrinth Monorepo, the primary codebase for the Modrinth web interface and app. It contains ![Lines of code](https://img.shields.io/endpoint?url=https://loctopus.creeperkatze.dev/github/modrinth/code/badge%3Fformat%3Dhuman&logoColor=white&color=black&label=) lines of code and has ![Contributors](https://img.shields.io/github/contributors/Modrinth/code?color=black&label=) contributors!
Welcome to the Modrinth Monorepo, the primary codebase for the Modrinth web interface and app. It contains ![Lines](https://img.shields.io/endpoint?url=https://ghloc.vercel.app/api/modrinth/olympus/badge?logoColor=white&color=black&label=) lines of code and has ![Contributors](https://img.shields.io/github/contributors/Modrinth/code?color=black&label=) contributors!
If you're not a developer and you've stumbled upon this repository, you can access the web interface on the [Modrinth website](https://modrinth.com) and download the latest release of the app [here](https://modrinth.com/app).
## Development
This repository contains two primary packages. For detailed development information, please refer to their respective guides:
This repository contains two primary packages. For detailed development information, please refer to their respective READMEs:
- [Website frontend](https://docs.modrinth.com/contributing/knossos/)
- [Desktop app](https://docs.modrinth.com/contributing/theseus/)
- [Web Interface](apps/frontend/README.md)
- [Desktop App](apps/app/README.md)
## Contributing
+4 -14
View File
@@ -6,16 +6,10 @@ extend-exclude = [
"packages/utils/",
"packages/ui/",
"packages/blog/",
]
[default]
extend-ignore-re = [
# Ignore lines that end with `// typos:ignore`
"(?Rm)^.*(#|//)\\s*typos:ignore$",
# Ignore the line after `// typos:ignore`:
"(#|//)\\s*typos:ignore\\n.*",
# Ignore blocks between `// typos:off` and `// typos:on`
"(?s)(#|//)\\s*typos:off.*?\\n\\s*(#|//)\\s*typos:on",
# contains licenses like `CC-BY-ND-4.0`
"packages/moderation/src/data/stages/license.ts",
# contains payment card IDs like `IY1VMST1MOXS` which are flagged
"apps/labrinth/src/queue/payouts/mod.rs",
]
[default.extend-words]
@@ -27,7 +21,3 @@ gam = "gam"
consts = "consts"
# short for "Copy"
Cpy = "Cpy"
[default.extend-identifiers]
# Constant from the `zip` crate
ZIP64_BYTES_THR = "ZIP64_BYTES_THR"
-4
View File
@@ -2,7 +2,3 @@
*.gltf
src/locales/
src/assets/**/*.svg
# Generated app-event bindings
src/generated/app-events/*.ts
src/generated/app-events/postcard/**
+1 -6
View File
@@ -1,7 +1,2 @@
import config from '@modrinth/tooling-config/eslint/nuxt.mjs'
export default config.append([
{
ignores: ['src/generated/app-events/*.ts', 'src/generated/app-events/postcard/**'],
},
])
export default config
+8 -12
View File
@@ -10,42 +10,38 @@
"lint": "eslint . && prettier --check .",
"fix": "eslint . --fix && prettier --write .",
"intl:extract": "formatjs extract \"src/**/*.{vue,ts,tsx,js,jsx,mts,cts,mjs,cjs}\" --ignore \"**/*.d.ts\" --ignore node_modules --out-file src/locales/en-US/index.json --format crowdin --preserve-whitespace",
"intl:prune-local": "pnpm -w scripts i18n-icu-contract prune-local --scope apps/app-frontend",
"test": "vue-tsc --noEmit"
},
"dependencies": {
"@dnd-kit/vue": "^0.5.0",
"@modrinth/api-client": "workspace:^",
"@modrinth/assets": "workspace:*",
"@modrinth/ui": "workspace:*",
"@modrinth/utils": "workspace:*",
"@sentry/vue": "^8.27.0",
"@sfirew/minecraft-motd-parser": "^1.1.6",
"@tanstack/vue-query": "5.90.7",
"@tanstack/vue-query": "^5.90.7",
"@tauri-apps/api": "^2.5.0",
"@tauri-apps/plugin-dialog": "^2.2.1",
"@tauri-apps/plugin-fs": "^2.4.5",
"@tauri-apps/plugin-http": "~2.5.7",
"@tauri-apps/plugin-http": "^2.5.0",
"@tauri-apps/plugin-opener": "^2.2.6",
"@tauri-apps/plugin-os": "^2.2.1",
"@tauri-apps/plugin-updater": "^2.7.1",
"@tauri-apps/plugin-window-state": "^2.2.2",
"@types/three": "^0.172.0",
"intl-messageformat": "^10.7.7",
"vue-i18n": "^10.0.0",
"@vueuse/core": "^11.1.0",
"dayjs": "^1.11.10",
"floating-vue": "^5.2.2",
"fuse.js": "^6.6.2",
"intl-messageformat": "^10.7.7",
"ofetch": "^1.3.4",
"overlayscrollbars": "^2.15.1",
"pinia": "^3.0.0",
"posthog-js": "^1.158.2",
"three": "^0.172.0",
"vite-svg-loader": "^5.1.0",
"vue": "^3.5.13",
"vue-i18n": "^10.0.0",
"vue-multiselect": "3.0.0",
"vue-router": "^4.6.0",
"vue-virtual-scroller": "v2.0.0-beta.8",
"vuedraggable": "^4.1.0"
"vue-virtual-scroller": "v2.0.0-beta.8"
},
"devDependencies": {
"@eslint/compat": "^1.1.1",
@@ -62,7 +58,7 @@
"sass": "^1.74.1",
"tailwindcss": "^3.4.4",
"typescript": "^5.5.4",
"vite": "^8.0.0",
"vite": "^6.0.0",
"vue-component-type-helpers": "^3.1.8",
"vue-tsc": "^2.1.6"
},
File diff suppressed because it is too large Load Diff
@@ -1,3 +0,0 @@
<svg preserveAspectRatio="none" overflow="visible" style="display: block;" width="30.8333" height="20.8333" viewBox="0 0 30.8333 20.8333" fill="none" xmlns="http://www.w3.org/2000/svg">
<path id="Vector" d="M1.6228 20.8333C2.51907 20.8333 3.24562 20.1158 3.24562 19.2308L3.24563 17.5253C3.24562 17.0803 3.2459 16.016 3.7136 15.2292C4.00182 14.7442 4.37085 14.339 4.74993 14.1326C5.36078 13.8001 6.0611 13.6111 6.80555 13.6111C7.05077 13.6111 7.3144 13.6219 7.6104 13.6356L7.7201 13.6408C7.97828 13.6529 8.25927 13.6661 8.5395 13.6719C9.17298 13.6851 9.91222 13.6651 10.6258 13.4739C12.0158 13.1014 13.1015 12.0158 13.4738 10.6258C13.665 9.91222 13.685 9.17298 13.672 8.5395C13.6662 8.25937 13.6528 7.9782 13.6408 7.7201L13.6357 7.6104C13.6218 7.3144 13.6112 7.05077 13.6112 6.80555C13.6112 6.02607 13.8182 5.29497 14.1805 4.66428C14.3917 4.29663 14.7595 3.96015 15.2675 3.66463C16.0377 3.21645 16.96 3.2123 17.5237 3.20975C18.0872 3.20722 18.6818 3.20527 19.1787 3.20527C22.2357 3.20527 23.347 3.2282 24.1857 3.5193C25.6395 4.02402 26.7495 5.07765 27.2667 6.36838C27.3963 6.69185 27.4878 7.1167 27.5368 7.85255C27.5868 8.60265 27.5877 9.56012 27.5877 10.9399V19.2308C27.5877 20.1158 28.3143 20.8333 29.2105 20.8333C30.1068 20.8333 30.8333 20.1158 30.8333 19.2308V10.8854C30.8333 9.5729 30.8333 8.50977 30.7755 7.6419C30.7158 6.74778 30.5898 5.95072 30.2847 5.18902C29.4037 2.99072 27.5568 1.29222 25.262 0.495583C23.8303 -0.0014166 22.1092 -0.000816752 19.5178 8.32478e-05L17.939 0.000200073L17.9167 0L17.8582 0.000249942C13.6775 0.00308328 11.0862 0.0528001 8.93633 0.79915C5.23583 2.08378 2.2801 4.81432 0.87485 8.32102C0.40655 9.48963 0.199033 10.7449 0.0986334 12.2503C-1.66334e-05 13.7293 0 15.5563 0 17.8857V19.2308C0 20.1158 0.72655 20.8333 1.6228 20.8333Z" fill="#B0BAC5"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

Some files were not shown because too many files have changed in this diff Show More