MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / parse_packaged_manifest

Function parse_packaged_manifest

xtask/src/extension_catalog.rs:1083–1104  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

1081}
1082
1083fn parse_packaged_manifest(path: &Path) -> Result<BTreeMap<String, PackagedExtension>> {
1084 if !path.exists() {
1085 return Ok(BTreeMap::new());
1086 }
1087 let text = fs::read_to_string(path).with_context(|| format!("read {}", path.display()))?;
1088 let manifest: AssetManifest =
1089 serde_json::from_str(&text).with_context(|| format!("parse {}", path.display()))?;
1090 Ok(manifest
1091 .extensions
1092 .into_iter()
1093 .map(|extension| {
1094 (
1095 extension.sql_name,
1096 PackagedExtension {
1097 archive: Some(extension.archive),
1098 module_sha256: Some(extension.module_sha256),
1099 stable: extension.stable,
1100 },
1101 )
1102 })
1103 .collect())
1104}
1105
1106fn parse_other_extension_submodules(path: &Path) -> Result<BTreeMap<String, SubmodulePin>> {
1107 let gitmodules = path

Callers 1

discover_catalogFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected