MCPcopy Index your code
hub / github.com/nodejs/node / compare_domains

Function compare_domains

deps/inspector_protocol/check_protocol_compatibility.py:83–101  ·  view source on GitHub ↗
(domain_1, domain_2, types_map_1, types_map_2, errors, reverse)

Source from the content-addressed store, hash-verified

81
82
83def compare_domains(domain_1, domain_2, types_map_1, types_map_2, errors, reverse):
84 domain_name = domain_1["domain"]
85 commands_1 = named_list_to_map(domain_1, "commands", "name")
86 commands_2 = named_list_to_map(domain_2, "commands", "name")
87 for name in commands_1:
88 command_1 = commands_1[name]
89 if name not in commands_2:
90 errors.append("%s.%s: command has been %s" % (domain_1["domain"], name, removed(reverse)))
91 continue
92 compare_commands(domain_name, command_1, commands_2[name], types_map_1, types_map_2, errors, reverse)
93
94 events_1 = named_list_to_map(domain_1, "events", "name")
95 events_2 = named_list_to_map(domain_2, "events", "name")
96 for name in events_1:
97 event_1 = events_1[name]
98 if name not in events_2:
99 errors.append("%s.%s: event has been %s" % (domain_1["domain"], name, removed(reverse)))
100 continue
101 compare_events(domain_name, event_1, events_2[name], types_map_1, types_map_2, errors, reverse)
102
103
104def compare_commands(domain_name, command_1, command_2, types_map_1, types_map_2, errors, reverse):

Callers 1

compare_schemasFunction · 0.70

Calls 5

named_list_to_mapFunction · 0.70
removedFunction · 0.70
compare_commandsFunction · 0.70
compare_eventsFunction · 0.70
appendMethod · 0.45

Tested by

no test coverage detected