update marketplace url to reflect build version (#2914)

* update marketplace url to reflect build version

* adjust marketplace config

* use helper function to compare urls

* rework some registry stuff

* #2900, #2899, and other registry changes

* alpha.1

* trailing /

* add startosRegistry

* fix migration

---------

Co-authored-by: Matt Hill <mattnine@protonmail.com>
Co-authored-by: Aiden McClelland <me@drbonez.dev>
Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com>
This commit is contained in:
Lucy
2025-04-29 16:12:21 -04:00
committed by GitHub
parent 2adf34fbaf
commit 5c473eb9cc
63 changed files with 733 additions and 470 deletions

View File

@@ -22,16 +22,30 @@ pub fn admin_api<C: Context>() -> ParentHandler<C> {
"signer",
signers_api::<C>().with_about("Commands to add or list signers"),
)
.subcommand("add", from_fn_async(add_admin).no_cli())
.subcommand(
"add",
from_fn_async(add_admin)
.with_metadata("admin", Value::Bool(true))
.no_cli(),
)
.subcommand(
"add",
from_fn_async(cli_add_admin)
.no_display()
.with_about("Add admin signer"),
)
.subcommand(
"remove",
from_fn_async(remove_admin)
.with_metadata("admin", Value::Bool(true))
.no_display()
.with_about("Remove an admin signer")
.with_call_remote::<CliContext>(),
)
.subcommand(
"list",
from_fn_async(list_admins)
.with_metadata("admin", Value::Bool(true))
.with_display_serializable()
.with_custom_display_fn(|handle, result| Ok(display_signers(handle.params, result)))
.with_about("List admin signers")
@@ -285,6 +299,27 @@ pub async fn add_admin(
.result
}
#[derive(Debug, Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export)]
pub struct RemoveAdminParams {
pub signer: Guid,
}
// TODO: don't allow removing self?
pub async fn remove_admin(
ctx: RegistryContext,
RemoveAdminParams { signer }: RemoveAdminParams,
) -> Result<(), Error> {
ctx.db
.mutate(|db| {
db.as_admins_mut().mutate(|a| Ok(a.remove(&signer)))?;
Ok(())
})
.await
.result
}
#[derive(Debug, Deserialize, Serialize, Parser)]
#[command(rename_all = "kebab-case")]
#[serde(rename_all = "camelCase")]