   proxy = GraphHandler.proxy contents, (dep) ->
     graph.addDependency current, dep
 
-  locals.contents = proxy
+  locals.contents = proxy # TODO: don't modify locals
 
   async.eachSeries items, (item, callback) ->
     current = item

  , (error) ->
    callback error, graph

exports.buildGraph = buildGraph

        @resolveNode edge, resolved, seen
    resolved.push node
    return resolved

  reverseLookup: (target) ->
    rv = []
    for id, node of @nodes
      continue if node is target
      if target in @resolveNode node
        rv.push node
    return rv

class GraphHandler

