def map_value(self, val: Any) -> Any: """ Evaluate using project home as a base dir. """ from .runtime import NodeInstance from .eval import map_value instance = NodeInstance() instance._baseDir = self.config.config.get_base_dir() return map_value(val, instance)
def create_local_instance(self, localName, attributes): # local or secret from .runtime import NodeInstance if "default" in attributes: if not "default" in attributes.get(".interfaces", {}): attributes.setdefault(".interfaces", {})[ "default" ] = "unfurl.support.DelegateAttributes" if "inheritFrom" in attributes: if not "inherit" in attributes.get(".interfaces", {}): attributes.setdefault(".interfaces", {})[ "inherit" ] = "unfurl.support.DelegateAttributes" instance = NodeInstance(localName, attributes) instance._baseDir = self.config.get_base_dir() return instance