• Home
  • Raw
  • Download

Lines Matching +full:ts +full:- +full:node

8 #      http://www.apache.org/licenses/LICENSE-2.0
20 coupling (aka fewer imports) outside of the directory - but also
22 - "base should not depend on the fronted"
23 - "plugins should only directly depend on the public API"
24 - "we should not have circular dependencies"
40 # Current plan for the dependency tree of the UI code (2023-09-21)
69 engine_worker_bundle -> _engine;
70 frontend_bundle -> _core [color=green];
71 frontend_bundle -> _frontend [color=red];
73 _core -> _public;
74 _plugins -> _public;
76 _widgets -> _base;
77 _core -> _base;
78 _core -> _widgets;
81 _widgets -> mithril;
82 _plugins -> mithril;
83 _core -> mithril
85 _plugins -> _widgets;
87 _core -> _chrome_extension;
89 _frontend -> _widgets [color=red];
90 _common -> _core [color=red];
91 _frontend -> _core [color=red];
92 _controller -> _core [color=red];
94 _frontend -> _controller [color=red];
95 _frontend -> _common [color=red];
96 _controller -> _frontend [color=red];
97 _controller -> _common [color=red];
98 _common -> _controller [color=red];
99 _common -> _frontend [color=red];
100 _tracks -> _frontend [color=red];
101 _tracks -> _controller [color=red];
102 _common -> _chrome_extension [color=red];
104 _core -> _trace_processor [color=green];
106 _engine -> _trace_processor [color=green];
107 _engine -> _common [color=red];
108 _engine -> _base;
110 _gen -> protos;
111 _core -> _gen [color=red];
113 _core -> _protos;
114 _protos -> _gen;
115 _trace_processor -> _protos [color=green];
117 _trace_processor -> _public [color=green];
120 npm_trace_processor -> engine_worker_bundle [color="green"];
121 npm_trace_processor -> _trace_processor [color="green"];
133 nice_path = ["ui/src" + name + ".ts" for name in self.path]
136 '\n -> '.join(nice_path),
152 for node, edges in graph.items():
155 if not any(re.match(a, node) for a in self.allowed):
156 yield Failure([node, edge], self)
170 for node, edges in graph.items():
171 if re.match(self.src, node):
174 yield Failure([node, edge], self)
188 for node in graph:
189 if re.match(self.src, node):
190 for connected, path in bfs(graph, node):
204 for node in graph:
205 for child in graph[node]:
207 if reached == node:
208 yield Failure([node] + path, self)
216 # files matching regex 'b' - but they may indirectly depend on them.
223 'protos should be re-exported from /protos/index without the nesting.',
347 # ui/src/frontend/cookie_consent.ts
348 # -> ui/src/frontend/globals.ts
349 # -> ui/src/frontend/router.ts
350 # -> ui/src/frontend/pages.ts
351 # -> ui/src/frontend/cookie_consent.ts
359 if name.endswith('.ts') and not name.endswith('.d.ts'):
376 return s[:-len(suffix)] if s.endswith(suffix) else s
382 src = remove_suffix(src, '.ts')
399 path = path.replace('-', '_')
414 node, path = queue.pop(0)
415 if node in seen:
418 seen.add(node)
421 path.append(node)
423 yield node, path
424 queue.extend([(child, path) for child in graph[node]])
432 node, path = queue.pop()
433 if node in seen:
436 seen.add(node)
439 path.append(node)
441 yield node, path
442 queue.extend([(child, path) for child in graph[node]])
447 for node, edges in graph.items():
448 node_id = path_to_id(node)
449 shape = 'rectangle' if is_external_dep(node) else 'ellipse'
450 print(f'{node_id} [shape={shape}, label="{node}"];', file=f)
454 print(f'{node_id} -> {edge_id};', file=f)
469 print(" - ", end='')
474 for node, edges in graph.items():
476 print("{}\t{}".format(node, edge))
488 for node, edges in graph.items():
491 new_graph[simplify(node)].add(simplify(edge))
496 for node, edges in graph.items():
497 if is_external_dep(node):
503 new_graph[node].add(edge)
532 …in dot format suitble for use in graphviz (e.g. ./tools/check_imports dot | dot -Tpng -ograph.png)'
536 '--simplify',
541 '--ignore-external',
547 'plan-dot',
548 …t format suitble for use in graphviz (e.g. ./tools/check_imports plan-dot | dot -Tpng -ograph.png)'