MCPcopy Create free account
hub / github.com/NVIDIA/NeMo-Relay / generate

Function generate

scripts/docs/generate_node_library_reference.py:429–442  ·  view source on GitHub ↗
(package_root: Path, output_dir: Path)

Source from the content-addressed store, hash-verified

427
428
429def generate(package_root: Path, output_dir: Path) -> int:
430 package_json = package_root / "package.json"
431 if not package_json.is_file():
432 raise SystemExit(f"package.json not found: {package_json}")
433
434 modules = [
435 _parse_declaration_file(types_path, import_path) for import_path, types_path in _package_exports(package_json)
436 ]
437
438 reset_output_dir(output_dir)
439 _write_index(output_dir, modules)
440 for position, module in enumerate(modules, start=2):
441 _write_module(output_dir, module, position)
442 return len(modules)
443
444
445def main() -> None:

Callers 3

mainFunction · 0.70
generate_completions_toFunction · 0.50
installFunction · 0.50

Calls 5

reset_output_dirFunction · 0.90
_parse_declaration_fileFunction · 0.85
_package_exportsFunction · 0.85
_write_indexFunction · 0.70
_write_moduleFunction · 0.70

Tested by

no test coverage detected