Commit Graph

35 Commits

Author SHA1 Message Date
mae
fbf1dd4c6c cmd/pkgserver: finish search implementation 2026-04-18 11:23:29 -05:00
mae
5a552993e5 cmd/pkgserver: remove get endpoint count field 2026-04-18 11:23:29 -05:00
mae
63b1f3fc4b cmd/pkgserver: search endpoint 2026-04-18 11:23:29 -05:00
mae
42bed68072 cmd/pkgserver: pagination bugfix 2026-04-18 11:23:29 -05:00
0066556d19 cmd/pkgserver: guard sass/ts behind build tag
Packaging nodejs and ruby is an immense burden for the Rosa OS base system, and these files diff poorly.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-18 11:23:29 -05:00
mae
fa6e0f1ea0 cmd/pkgserver: add size 2026-04-18 11:23:29 -05:00
bdbdced477 cmd/pkgserver: expose size and store pre-encoded ident
This change also handles SIGSEGV correctly in newStatusHandler, and makes serving status fully zero copy.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-18 11:23:29 -05:00
8a80f6dbab cmd/pkgserver: look up status by name once
This has far less overhead.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-18 11:23:29 -05:00
f5fdfcb271 cmd/pkgserver: refer to preset in index
This enables referencing back to internal/rosa through an entry obtained via the index.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-18 11:23:29 -05:00
87a19d7ec1 cmd/pkgserver: handle unversioned value
This omits the field for an unversioned artifact, and only does so once on startup.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-18 11:23:29 -05:00
f81527eb07 cmd/pkgserver: determine disposition route in mux
This removes duplicate checks and uses the more sound check in mux.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-18 11:23:29 -05:00
0e20a7d86e cmd/pkgserver: format get error messages
This improves source code readability on smaller displays.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-18 11:23:29 -05:00
d881c059b1 cmd/pkgserver: constant string in pattern
This resolves patterns at compile time.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-18 11:23:29 -05:00
c17b6ee190 cmd/pkgserver: satisfy handler signature in method
This is somewhat cleaner.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-18 11:23:29 -05:00
65a0cf068d cmd/pkgserver: log instead of write encoding error
This message is unlikely to be useful to the user, and output may be partially written at this point, causing the error to be even less intelligible.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-18 11:23:29 -05:00
964e47fcec cmd/pkgserver: appropriately mark test helpers
This improves usefulness of test log messages.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-18 11:23:29 -05:00
78bfc3acec cmd/pkgserver: do not omit report field
Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-18 11:23:29 -05:00
de580952af cmd/pkgserver: gracefully shut down on signal
Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-18 11:23:29 -05:00
dbb07b0631 cmd/pkgserver: specify full addr string in flag
This allows greater flexibility.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-18 11:23:29 -05:00
ed4692659e cmd/pkgserver: make report argument optional
This allows serving metadata only without a populated report. This also removes the out-of-bounds read on args when no arguments are passed.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-18 11:23:29 -05:00
f19b86fe94 cmd/pkgserver: embed internal/rosa metadata
This change also cleans up and reduces some unnecessary copies.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-18 11:23:29 -05:00
bc069cc83d cmd/pkgserver: do not assume default mux
This helps with testing.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-18 11:23:29 -05:00
def2b8fab7 cmd/pkgserver: create index without report
This is useful for testing, where report testdata is not available.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-18 11:23:29 -05:00
mae
23c957b22c cmd/pkgserver: add sort orders, change pagination rules 2026-04-18 11:23:29 -05:00
mae
dc13407386 cmd/pkgserver: add /status endpoint 2026-04-18 11:23:29 -05:00
mae
42a2918644 cmd/pkgserver: minimum viable frontend 2026-04-18 11:23:29 -05:00
mae
d8e720bcc9 cmd/pkgserver: api versioning 2026-04-18 11:23:29 -05:00
mae
459acd7dce cmd/pkgserver: add get endpoint 2026-04-18 11:23:29 -05:00
mae
e7c64bcd41 cmd/pkgserver: add count endpoint and restructure 2026-04-18 11:23:29 -05:00
mae
eee4e3be5e cmd/pkgserver: add status endpoint 2026-04-18 11:23:29 -05:00
mae
01ed763993 cmd/pkgserver: add createPackageIndex 2026-04-18 11:23:29 -05:00
mae
3930b2bf7f cmd/pkgserver: add command handler 2026-04-18 11:23:29 -05:00
mae
5158ecffd1 cmd/pkgserver: replace favicon 2026-04-18 11:23:29 -05:00
mae
d41dd227dd cmd/pkgserver: pagination 2026-04-18 11:23:29 -05:00
mae
0d7be9c287 cmd/pkgserver: basic web ui 2026-04-18 11:23:29 -05:00