Compare commits

..

24 commits

Author SHA1 Message Date
83343bc3dd
utils: reorganize module structure
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I5b51e349ea67e27170e3a3ebe6b1d3fe6a6a6964
2026-03-03 23:35:15 +03:00
f2af2fbbe4
cli/commands: update all commands to use global_yes parameter
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I4d95a425f2bed75aed1b5233adf1a3646a6a6964
2026-03-03 23:35:14 +03:00
a89184a358
model: add file_count_preference for multi-file selection support
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ia27c829dbcc21a7fcfc8e6f67f9e33276a6a6964
2026-03-03 23:35:13 +03:00
8478c914b5
model/lockfile: update tests to use get_project
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I2163215bc069431e3d6d53c9c14dd15c6a6a6964
2026-03-03 23:35:13 +03:00
0b5882b1e1
cli/commands: use create_all_platforms to reduce duplication in update cmd
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I00d3029de7c13a57cefb1b6eaae9f1606a6a6964
2026-03-03 23:35:12 +03:00
f4287de795
treewide: remove dead code
Also deletes some dead_code annotations from functions that are
*actually used*.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ic815cacc93c464078ead1674e7523d8b6a6a6964
2026-03-03 23:35:11 +03:00
b0a594e892
cli: fix global -y flag conflicts in add-prj` and sync commands
`AddPrjArgs` had a local `-y` flag that conflicted with the global flag,
causing runtime panics. Removed the local field and updated callers to
use `global_yes` consistently.

The sync command now respects the global `-y` flag by accepting, you
guessed it, the `global_yes` parameter.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I7b7c42fabbca0e363bd18a1d8b6b3bb76a6a6964
2026-03-03 23:35:10 +03:00
d4938c4ae8
model/project: simplify file selection sorting logic
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I0acf8e690157f1926a2658165592199d6a6a6964
2026-03-03 23:35:09 +03:00
0fecd1486b
model/lockfile. one less clone!
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I8dbfc511fc07273a69953b03404efc656a6a6964
2026-03-03 23:35:08 +03:00
c6d60b4459
model/enums: derive Ord for ReleaseType to simplify comparisons
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Id47e4e40e015b1212815addbbca238456a6a6964
2026-03-03 23:35:07 +03:00
bc74c24dd5
cli/commands: use constants for repeated platform names
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I33c2cb59c73791a16f322e8544161a496a6a6964
2026-03-03 23:35:06 +03:00
a1357b2501
treewide: general cleanup
Finally had the time to clean up after myself. Does a bunch of things,
without breakage as far as I'm aware. I've removed around 20 unnecessary
clones, and simplified the architechture a little bit. 

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I4d22337b997a3bf5b0593e6068cd1bd86a6a6964
2026-03-03 23:35:05 +03:00
1adccf8587
lockfile: remove unused new method
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: If64632acaf9805b68a662e25aebe60216a6a6964
2026-03-03 23:35:04 +03:00
829d52c95b
rate-limiter: re-validate burst window in loop after sleep
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Iaa63eef1f055b9a98c90739025bd3ff36a6a6964
2026-03-03 23:35:03 +03:00
28d1763aee
export: introduce `export_profile to reduce boilerplate; cleanup
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I30469f47be8df27ee2a31f1acdcd68a16a6a6964
2026-03-03 23:35:02 +03:00
00f5442679
model/lockfile: revert get_project to O(n) linear scan; remove unused project index
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I3a35ab4ce5dec8ce95a736440fa293fe6a6a6964
2026-03-03 23:35:01 +03:00
885cbd5da6
rate-limiter. re-acquire lock after sleep to prevent use-after-free
I thought rust fixed this...

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I3a2fe427cdc19a6317510e8736fe46d56a6a6964
2026-03-03 23:35:00 +03:00
0e5fd41496
various: shared HTTP client with connection pooling
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Id13c17e9352da970a289f4e3ad909c5b6a6a6964
2026-03-03 23:34:59 +03:00
0d64d4d1de
platform: add mockito HTTP tests to modrinth
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I880c11195559fcfb9701e945a10fe87b6a6a6964
2026-03-03 23:34:58 +03:00
a2d4a21fec
chore: bump dependencies
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ic1fda520473e53d1a584a3dda63ffda86a6a6964
2026-03-03 23:34:57 +03:00
74a81e7cfd
cli: add --all, --updates, --no-deps flags to commands
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I25581b8de945284b4ce7c2c85601a86f6a6a6964
2026-03-03 23:34:56 +03:00
3584117eb8
infra: add clippy allows; fix PathBuf -> Path
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I07795374f678fa2ec17b4171fa7e32276a6a6964
2026-03-03 23:34:55 +03:00
fb2c02d53d
platform: add CurseForge side detection from categories
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I62c5117ed97bbc2389330720b4761a716a6a6964
2026-03-03 23:34:54 +03:00
e01313066d
cli: wire shelve flag; more clippy fixes
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I694da71afe93bcb33687ff7d8e75f04f6a6a6964
2026-03-03 23:34:53 +03:00
2 changed files with 2 additions and 2 deletions

View file

@ -255,7 +255,7 @@ fn execute_init(
local_config.parent_config_hash = Some(config_hash); local_config.parent_config_hash = Some(config_hash);
} }
// Now clone from the local path into .pakku/parent this avoids // Now clone from the local path into .pakku/parent, this avoids
// re-downloading objects // re-downloading objects
let parent_path = Path::new(&parent_path_str); let parent_path = Path::new(&parent_path_str);

View file

@ -441,7 +441,7 @@ pub fn ahead_behind<P: AsRef<Path>>(
})?; })?;
Ok((ahead, behind)) Ok((ahead, behind))
} else { } else {
// Remote ref missing count commits reachable from local // Remote ref missing, count commits reachable from local
let ahead_count = count_commits(&repo, local_oid)?; let ahead_count = count_commits(&repo, local_oid)?;
Ok((ahead_count, 0)) Ok((ahead_count, 0))
} }