Give each channel a package index
orbit-index:latest in a channel lists its packages. Search reads it and falls back to the catalog; publish keeps it current and 'orbit index' rebuilds it. Installs never use it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2026319f61
commit
4271a084b6
7 files changed
+498
-25
No files matched your search
+13
-5
@@ -25,8 +25,10 @@ let usage : String =
|
||||
#| orbit logout <host> remove stored registry credentials
|
||||
#| orbit channel list channels, highest priority first
|
||||
#| orbit channel add <name> <url> [--plain-http]
|
||||
#| orbit publish <dir> [--channel <name>] [--no-latest]
|
||||
#| orbit publish <dir> [--channel <name>] [--no-latest] [--no-index]
|
||||
#| push <dir>/orbit.json + <dir>/files/
|
||||
#| orbit index [--channel <name>] [name...]
|
||||
#| rebuild the channel's package index
|
||||
#| orbit install [-g] [channel::]<name>[@constraint]...
|
||||
#| install globally with SAT dependency solving
|
||||
#| orbit remove [-g] <name>... [--force] remove, then drop unused dependencies
|
||||
@@ -35,7 +37,7 @@ let usage : String =
|
||||
#| orbit list [-g] installed global packages
|
||||
#| orbit info [channel::]<name> installed package details (local only)
|
||||
#| orbit versions <name> published versions
|
||||
#| orbit search [term] list repositories (needs catalog API)
|
||||
#| orbit search [term] list packages (channel index or catalog API)
|
||||
#| orbit gc delete unused builds from the store
|
||||
#| orbit env [-g] print the PATH line for your shell
|
||||
#|
|
||||
@@ -147,8 +149,8 @@ async fn dispatch(args : Array[String]) -> Unit raise OrbitError {
|
||||
} else if has_prefix(a, "--manifest-path=") {
|
||||
manifest_path = Some(drop_chars(a, 16))
|
||||
} else if a == "--channel" {
|
||||
if cmd != "publish" || i + 1 >= args.length() {
|
||||
raise OrbitError("usage: orbit publish <dir> --channel <name>")
|
||||
if (cmd != "publish" && cmd != "index") || i + 1 >= args.length() {
|
||||
raise OrbitError("usage: orbit publish <dir> | index --channel <name>")
|
||||
}
|
||||
publish_to = args[i + 1]
|
||||
i = i + 1
|
||||
@@ -279,8 +281,14 @@ async fn dispatch(args : Array[String]) -> Unit raise OrbitError {
|
||||
"publish" => {
|
||||
need(pos, 1, "publish <dir>")
|
||||
let ch = find_channel(load_ctx(), publish_to)
|
||||
publish(ch, pos[0], !flags.contains("--no-latest"))
|
||||
publish(
|
||||
ch,
|
||||
pos[0],
|
||||
!flags.contains("--no-latest"),
|
||||
update_index=!flags.contains("--no-index"),
|
||||
)
|
||||
}
|
||||
"index" => cmd_index(find_channel(load_ctx(), publish_to), pos)
|
||||
"install" =>
|
||||
match resolve_project_or_none(force_global, manifest_path) {
|
||||
Some(mf) =>
|
||||
|
||||
Reference in new issue
Block a user