Type updates

This commit is contained in:
Will Galebach 2024-01-26 15:35:58 +00:00
parent cdcbf8e57b
commit 03c991547b
6 changed files with 137 additions and 40 deletions

File diff suppressed because one or more lines are too long

View File

@ -181,7 +181,7 @@ fn handle_message(
handle_eth_sub_event(&our, &mut state, e)?;
}
Req::Http(incoming) => {
if source.node() != our.node() || source.process() != "http_server:distro:sys" {
if source.node() != our.node() || &source.process.to_string() != "http_server:distro:sys" {
return Err(anyhow::anyhow!("http_server from non-local node"));
}
if let HttpServerRequest::Http(req) = incoming {

View File

@ -33,11 +33,13 @@ pub struct PackageListing {
#[derive(Debug, Serialize, Deserialize)]
pub struct OnchainPackageMetadata {
pub name: Option<String>,
pub subtitle: Option<String>,
pub description: Option<String>,
pub image: Option<String>,
pub version: Option<String>,
pub license: Option<String>,
pub website: Option<String>,
pub screenshots: Vec<String>,
pub mirrors: Vec<NodeId>,
pub versions: Vec<String>,
}

View File

@ -0,0 +1,34 @@
[
{
"process_name": "main",
"process_wasm_path": "/app_store.wasm",
"on_exit": "Restart",
"request_networking": true,
"request_capabilities": [
"terminal:terminal:sys",
"filesystem:distro:sys",
"http_server:distro:sys",
"http_client:distro:sys",
"net:distro:sys",
"vfs:distro:sys",
"kernel:distro:sys",
"eth:distro:sys",
"sqlite:distro:sys",
"kv:distro:sys",
"chess:chess:sys",
"kns_indexer:kns_indexer:sys",
{
"process": "vfs:distro:sys",
"params": {
"root": true
}
}
],
"grant_capabilities": [
"http_server:distro:sys",
"terminal:terminal:sys",
"vfs:distro:sys"
],
"public": false
}
]

View File

@ -0,0 +1,10 @@
{
"package": "app_store",
"publisher": "sys",
"version": [
0,
2,
0
],
"description": "A package manager + app store."
}

View File

@ -0,0 +1,35 @@
{
"download.wasm": {
"root": false,
"public": false,
"requestNetworking": false,
"requestCapabilities": [
"main:app_store:sys"
],
"grantCapabilities": [
"main:app_store:sys"
]
},
"install.wasm": {
"root": false,
"public": false,
"requestNetworking": false,
"requestCapabilities": [
"main:app_store:sys"
],
"grantCapabilities": [
"main:app_store:sys"
]
},
"uninstall.wasm": {
"root": false,
"public": false,
"requestNetworking": false,
"requestCapabilities": [
"main:app_store:sys"
],
"grantCapabilities": [
"main:app_store:sys"
]
}
}