@takodotid/circuit 0.36.0 → 0.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/chunks/index-6wb41q67.js +62 -0
  2. package/dist/chunks/{index-2r4bbhac.js → index-yzw86rc8.js} +9 -65
  3. package/dist/chunks/{server-gzsf5me5.js → server-cxr9ynxc.js} +1 -1
  4. package/dist/cli/index.js +110 -13
  5. package/dist/helpers/index.js +227 -1
  6. package/dist/types/core/address-space.d.ts +1 -1
  7. package/dist/types/core/address.d.ts +1 -1
  8. package/dist/types/core/cabling.d.ts +3 -3
  9. package/dist/types/core/cross-checks.d.ts +3 -3
  10. package/dist/types/core/define.d.ts +2 -2
  11. package/dist/types/core/secrets.d.ts +2 -2
  12. package/dist/types/core/topology.d.ts +2 -2
  13. package/dist/types/core/validator.d.ts +1 -1
  14. package/dist/types/helpers/bgp.d.ts +48 -5
  15. package/dist/types/helpers/cables.d.ts +70 -0
  16. package/dist/types/helpers/checks.d.ts +1 -1
  17. package/dist/types/helpers/exchange.d.ts +3 -3
  18. package/dist/types/helpers/filters.d.ts +1 -1
  19. package/dist/types/helpers/index.d.ts +14 -10
  20. package/dist/types/helpers/route-server.d.ts +2 -2
  21. package/dist/types/helpers/upstreams.d.ts +156 -0
  22. package/dist/types/index.d.ts +8 -6
  23. package/dist/types/integrations/librenms.d.ts +2 -2
  24. package/dist/types/integrations/netbox.d.ts +1 -1
  25. package/dist/types/integrations/peeringdb.d.ts +1 -1
  26. package/dist/types/integrations/prometheus.d.ts +2 -2
  27. package/dist/types/integrations/registries.d.ts +2 -2
  28. package/dist/types/platforms/bgp-wait.d.ts +7 -1
  29. package/dist/types/platforms/derive.d.ts +1 -1
  30. package/dist/types/platforms/fortios/firewall.d.ts +2 -2
  31. package/dist/types/platforms/fortios/index.d.ts +4 -4
  32. package/dist/types/platforms/fortios/names.d.ts +1 -1
  33. package/dist/types/platforms/fortios/plan.d.ts +1 -1
  34. package/dist/types/platforms/fortios/render.d.ts +1 -1
  35. package/dist/types/platforms/fortios/routing.d.ts +2 -2
  36. package/dist/types/platforms/index.d.ts +1 -1
  37. package/dist/types/platforms/junos/bgp.d.ts +2 -2
  38. package/dist/types/platforms/junos/index.d.ts +4 -4
  39. package/dist/types/platforms/junos/render.d.ts +1 -1
  40. package/dist/types/platforms/line-diff.d.ts +1 -1
  41. package/dist/types/platforms/platform.d.ts +17 -5
  42. package/dist/types/platforms/raisecom-ros/index.d.ts +4 -4
  43. package/dist/types/platforms/raisecom-ros/render.d.ts +1 -1
  44. package/dist/types/platforms/routeros/index.d.ts +12 -5
  45. package/dist/types/platforms/routeros/plan.d.ts +1 -1
  46. package/dist/types/platforms/routeros/render.d.ts +1 -1
  47. package/dist/types/platforms/vrp/index.d.ts +4 -4
  48. package/dist/types/platforms/vrp/render.d.ts +1 -1
  49. package/dist/types/schema/device.d.ts +6 -6
  50. package/dist/types/schema/firewall.d.ts +1 -1
  51. package/dist/types/schema/index.d.ts +8 -8
  52. package/dist/types/schema/interfaces.d.ts +5 -1
  53. package/dist/types/schema/policy.d.ts +1 -1
  54. package/dist/types/schema/routing.d.ts +1 -1
  55. package/dist/types/schema/system.d.ts +2 -2
  56. package/dist/types/transport/console.d.ts +1 -1
  57. package/dist/types/transport/ssh.d.ts +1 -1
  58. package/package.json +2 -2
  59. package/src/cli/index.ts +55 -4
  60. package/src/core/cabling.ts +4 -1
  61. package/src/core/cross-checks.ts +6 -1
  62. package/src/core/topology.ts +4 -3
  63. package/src/helpers/bgp.ts +104 -2
  64. package/src/helpers/cables.ts +91 -0
  65. package/src/helpers/index.ts +6 -2
  66. package/src/helpers/upstreams.ts +306 -0
  67. package/src/index.ts +3 -0
  68. package/src/platforms/bgp-wait.ts +24 -1
  69. package/src/platforms/platform.ts +9 -0
  70. package/src/platforms/routeros/TRAPS.md +1 -0
  71. package/src/platforms/routeros/index.ts +57 -10
  72. package/src/schema/interfaces.ts +4 -0
  73. package/src/studio/data.ts +3 -0
  74. package/src/studio/public/tables.js +15 -1
@@ -1021,19 +1021,33 @@ export class Tables {
1021
1021
 
1022
1022
  /** @param {HTMLElement} container */
1023
1023
  static #cablesView(container) {
1024
+ // A carrier column only when a cable runs through one.
1025
+ const carried = Tables.#data.cables.some((cable) => cable.through);
1026
+
1024
1027
  container.append(
1025
1028
  Tables.heading("Cables", "h2"),
1026
1029
  Tables.empty("Every cable a port's link names, once, from the end that names it first."),
1027
1030
  Tables.#data.cables.length
1028
1031
  ? Tables.of({
1029
1032
  csv: "cables",
1030
- head: ["Device", "Port", "Far device", "Far port", "LAG", "VLANs", "Description", ""].map((label) => ({ label })),
1033
+ head: [
1034
+ "Device",
1035
+ "Port",
1036
+ "Far device",
1037
+ "Far port",
1038
+ ...(carried ? ["Through"] : []),
1039
+ "LAG",
1040
+ "VLANs",
1041
+ "Description",
1042
+ "",
1043
+ ].map((label) => ({ label })),
1031
1044
  rows: Tables.#data.cables.map((cable) => ({
1032
1045
  cells: [
1033
1046
  Tables.deviceLink(cable.device),
1034
1047
  cable.port,
1035
1048
  Tables.deviceLink(cable.farDevice),
1036
1049
  cable.farPort,
1050
+ ...(carried ? [cable.through ?? ""] : []),
1037
1051
  [cable.lag, cable.farLag].filter(Boolean).join(" to "),
1038
1052
  cable.vlans.join(", "),
1039
1053
  cable.description ?? "",