Bundle dependencies (self-contained package)
bundle_dependenciesMake a component self-contained by scanning external references, copying assets, rewriting network parameters to relative paths, and saving a portable .tox package.
Instructions
Make a COMP self-contained: recursively scan its subtree for external file references (movie/image files, fonts, LUTs, externaltox links — reusing the collect_project_assets scan), COPY each existing asset into /assets/, rewrite each referencing parameter in the LIVE network to the copied relative path (assets/), then save the COMP as a .tox beside its assets with a tdmcp-component manifest. The result is a folder you can move to another machine and open without broken links. Delta vs make_portable_tox (which saves the .tox only, leaving external assets behind) and collect_project_assets (which only reports refs). Rewriting mutates the live network — set rewrite_refs=false to copy-and-report without touching parameters.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Package/.tox stem. Defaults to the last path segment of comp_path. | |
| out_dir | Yes | Local folder to write the self-contained package into (created if missing). The .tox and an assets/ subfolder land here. | |
| comp_path | Yes | Full path of the COMP subtree to bundle (assets are gathered recursively). | |
| rewrite_refs | No | When true, rewrite each referencing parameter in the LIVE network to the copied relative path (assets/<file>) BEFORE saving the .tox, so the saved component points at the bundled copies. When false, assets are copied but the network is left untouched (a report-and-copy pass). | |
| include_missing | No | If true, still record assets whose source file is missing on disk (they cannot be copied and their ref is not rewritten). If false, missing refs are skipped with a warning. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| comp | Yes | Echoed COMP path that was bundled. | |
| out_dir | Yes | Absolute package folder. | |
| skipped | Yes | Refs that were not bundled (missing source, or duplicate collision). | |
| tox_path | Yes | Absolute path of the saved .tox. | |
| warnings | Yes | ||
| tox_bytes | Yes | Size of the saved .tox in bytes, or null if unknown. | |
| copied_count | Yes | ||
| assets_copied | Yes | Every external file that was copied into the package. | |
| manifest_path | Yes | Absolute path of the tdmcp-component.json manifest written. |