MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / rewrite_manifest

Function rewrite_manifest

cli/src/build.rs:202–213  ·  view source on GitHub ↗

Overlay vendored entries on top of the user's manifest; vendored paths win.

(
    manifest: &Manifest,
    vendored_imports: &BTreeMap<String, String>,
    vendored_host: &BTreeMap<String, String>,
)

Source from the content-addressed store, hash-verified

200
201/// Overlay vendored entries on top of the user's manifest; vendored paths win.
202fn rewrite_manifest(
203 manifest: &Manifest,
204 vendored_imports: &BTreeMap<String, String>,
205 vendored_host: &BTreeMap<String, String>,
206) -> Manifest {
207 let mut out = Manifest::default();
208 for (k, v) in &manifest.imports { out.imports.insert(k.clone(), v.clone()); }
209 for (k, v) in &manifest.host { out.host.insert(k.clone(), v.clone()); }
210 for (k, v) in vendored_imports { out.imports.insert(k.clone(), v.clone()); }
211 for (k, v) in vendored_host { out.host.insert(k.clone(), v.clone()); }
212 out
213}
214
215/// Pick `main.py`/`app.py`/`index.py` if present; otherwise the first script found.
216fn find_entry(scripts: &[PathBuf], project: &Path) -> String {

Callers 1

runFunction · 0.85

Calls 1

insertMethod · 0.80

Tested by

no test coverage detected