autotel-eventcatalog 28.0.0 → 29.0.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 29.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - autotel-subscribers@58.0.0
8
+
3
9
  ## 28.0.0
4
10
 
5
11
  ### Patch Changes
package/dist/cli.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- const require_map_html = require('./map-html-AxfF9V_g.cjs');
2
+ const require_map_html = require('./map-html-D56rylWV.cjs');
3
3
  let node_fs_promises = require("node:fs/promises");
4
4
  let node_path = require("node:path");
5
5
  node_path = require_map_html.__toESM(node_path, 1);
@@ -448,8 +448,9 @@ function buildSummary(mode, headReport, delta, policyResult) {
448
448
  };
449
449
  }
450
450
  async function runStamp(args) {
451
+ const snapshot = await require_map_html.loadSnapshot(args.snapshot);
451
452
  const result = await require_map_html.stampCatalog({
452
- snapshot: await require_map_html.loadSnapshot(args.snapshot),
453
+ snapshot,
453
454
  catalogPath: args.catalog,
454
455
  dryRun: args.dryRun
455
456
  });
@@ -474,8 +475,9 @@ async function runStamp(args) {
474
475
  }
475
476
  }
476
477
  async function runGenerate(args) {
478
+ const snapshot = await require_map_html.loadSnapshot(args.snapshot);
477
479
  const result = await require_map_html.generateCatalogFromSnapshot({
478
- snapshot: await require_map_html.loadSnapshot(args.snapshot),
480
+ snapshot,
479
481
  catalogPath: args.catalog,
480
482
  dryRun: args.dryRun,
481
483
  edgesOnly: args.edgesOnly,
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- import { H as loadSnapshot, I as countDriftEntries, L as countDriftReport, P as compareDriftReports, R as diffCatalogAgainstSnapshot, V as readCatalogState, _ as getRenderer, a as buildGenerateSummary, f as buildStampSummary, m as evaluatePolicy, o as generateCatalogFromSnapshot, p as stampCatalog, r as buildLiveMap, t as renderLiveMapHtml, v as listRendererNames, y as registerRenderer } from "./map-html-Dm_gpZUi.js";
2
+ import { H as loadSnapshot, I as countDriftEntries, L as countDriftReport, P as compareDriftReports, R as diffCatalogAgainstSnapshot, V as readCatalogState, _ as getRenderer, a as buildGenerateSummary, f as buildStampSummary, m as evaluatePolicy, o as generateCatalogFromSnapshot, p as stampCatalog, r as buildLiveMap, t as renderLiveMapHtml, v as listRendererNames, y as registerRenderer } from "./map-html-BrSITccr.js";
3
3
  import { mkdir, writeFile } from "node:fs/promises";
4
4
  import path from "node:path";
5
5
  import { pathToFileURL } from "node:url";
@@ -447,8 +447,9 @@ function buildSummary(mode, headReport, delta, policyResult) {
447
447
  };
448
448
  }
449
449
  async function runStamp(args) {
450
+ const snapshot = await loadSnapshot(args.snapshot);
450
451
  const result = await stampCatalog({
451
- snapshot: await loadSnapshot(args.snapshot),
452
+ snapshot,
452
453
  catalogPath: args.catalog,
453
454
  dryRun: args.dryRun
454
455
  });
@@ -473,8 +474,9 @@ async function runStamp(args) {
473
474
  }
474
475
  }
475
476
  async function runGenerate(args) {
477
+ const snapshot = await loadSnapshot(args.snapshot);
476
478
  const result = await generateCatalogFromSnapshot({
477
- snapshot: await loadSnapshot(args.snapshot),
479
+ snapshot,
478
480
  catalogPath: args.catalog,
479
481
  dryRun: args.dryRun,
480
482
  edgesOnly: args.edgesOnly,
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
- const require_map_html = require('./map-html-AxfF9V_g.cjs');
3
+ const require_map_html = require('./map-html-D56rylWV.cjs');
4
4
 
5
5
  exports.EVENTCATALOG_SNAPSHOT_DIFF_SPEC = require_map_html.EVENTCATALOG_SNAPSHOT_DIFF_SPEC;
6
6
  exports.GENERATE_SUMMARY_SPEC = require_map_html.GENERATE_SUMMARY_SPEC;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
 
2
- import { A as renderMarkdown, B as extractDeclaredFieldPaths, C as toSnapshotDiffFromDelta, D as renderDeltaTerminal, E as renderJson, F as countDriftDelta, H as loadSnapshot, I as countDriftEntries, L as countDriftReport, M as suggestRenames, N as suggestRenamesBetween, O as renderTerminal, P as compareDriftReports, R as diffCatalogAgainstSnapshot, S as renderEventCatalogSnapshotDiffFromReport, T as REPORT_SPEC, V as readCatalogState, _ as getRenderer, a as buildGenerateSummary, b as EVENTCATALOG_SNAPSHOT_DIFF_SPEC, c as STAMP_END, d as buildStampBlock, f as buildStampSummary, g as RENDERER_NAMES, h as RENDERERS, i as GENERATE_SUMMARY_SPEC, j as describeSuggestion, k as renderDeltaMarkdown, l as STAMP_START, m as evaluatePolicy, n as LIVE_MAP_SPEC, o as generateCatalogFromSnapshot, p as stampCatalog, r as buildLiveMap, s as inferJsonSchemaFromObservation, t as renderLiveMapHtml, u as STAMP_SUMMARY_SPEC, w as toSnapshotDiffFromReport, x as renderEventCatalogSnapshotDiffFromDelta, z as hasDrift } from "./map-html-Dm_gpZUi.js";
2
+ import { A as renderMarkdown, B as extractDeclaredFieldPaths, C as toSnapshotDiffFromDelta, D as renderDeltaTerminal, E as renderJson, F as countDriftDelta, H as loadSnapshot, I as countDriftEntries, L as countDriftReport, M as suggestRenames, N as suggestRenamesBetween, O as renderTerminal, P as compareDriftReports, R as diffCatalogAgainstSnapshot, S as renderEventCatalogSnapshotDiffFromReport, T as REPORT_SPEC, V as readCatalogState, _ as getRenderer, a as buildGenerateSummary, b as EVENTCATALOG_SNAPSHOT_DIFF_SPEC, c as STAMP_END, d as buildStampBlock, f as buildStampSummary, g as RENDERER_NAMES, h as RENDERERS, i as GENERATE_SUMMARY_SPEC, j as describeSuggestion, k as renderDeltaMarkdown, l as STAMP_START, m as evaluatePolicy, n as LIVE_MAP_SPEC, o as generateCatalogFromSnapshot, p as stampCatalog, r as buildLiveMap, s as inferJsonSchemaFromObservation, t as renderLiveMapHtml, u as STAMP_SUMMARY_SPEC, w as toSnapshotDiffFromReport, x as renderEventCatalogSnapshotDiffFromDelta, z as hasDrift } from "./map-html-BrSITccr.js";
3
3
 
4
4
  export { EVENTCATALOG_SNAPSHOT_DIFF_SPEC, GENERATE_SUMMARY_SPEC, LIVE_MAP_SPEC, RENDERERS, RENDERER_NAMES, REPORT_SPEC, STAMP_END, STAMP_START, STAMP_SUMMARY_SPEC, buildGenerateSummary, buildLiveMap, buildStampBlock, buildStampSummary, compareDriftReports, countDriftDelta, countDriftEntries, countDriftReport, describeSuggestion, diffCatalogAgainstSnapshot, evaluatePolicy, extractDeclaredFieldPaths, generateCatalogFromSnapshot, getRenderer, hasDrift, inferJsonSchemaFromObservation, loadSnapshot, readCatalogState, renderDeltaMarkdown, renderDeltaTerminal, renderEventCatalogSnapshotDiffFromDelta, renderEventCatalogSnapshotDiffFromReport, renderJson, renderLiveMapHtml, renderMarkdown, renderTerminal, stampCatalog, suggestRenames, suggestRenamesBetween, toSnapshotDiffFromDelta, toSnapshotDiffFromReport };
@@ -1139,20 +1139,21 @@ function buildGenerateSummary(result, options) {
1139
1139
  const messages = [];
1140
1140
  for (const op of result.operations) {
1141
1141
  if (!isLink(op)) continue;
1142
- if (op.kind === "service-edge") if (op.detail === "receives") {
1143
- const [service, event] = op.id.split("<-");
1144
- if (service && event) receives.push({
1145
- service,
1146
- event
1147
- });
1148
- } else {
1149
- const [service, event] = op.id.split("->");
1150
- if (service && event) sends.push({
1151
- service,
1152
- event
1153
- });
1154
- }
1155
- else if (op.kind === "channel-edge") {
1142
+ if (op.kind === "service-edge") {
1143
+ if (op.detail === "receives") {
1144
+ const [service, event] = op.id.split("<-");
1145
+ if (service && event) receives.push({
1146
+ service,
1147
+ event
1148
+ });
1149
+ } else {
1150
+ const [service, event] = op.id.split("->");
1151
+ if (service && event) sends.push({
1152
+ service,
1153
+ event
1154
+ });
1155
+ }
1156
+ } else if (op.kind === "channel-edge") {
1156
1157
  const [event, channel] = op.id.split("->");
1157
1158
  if (event && channel) messages.push({
1158
1159
  channel,
@@ -1242,10 +1243,7 @@ function mapRuntimeTypes(types) {
1242
1243
  case "boolean":
1243
1244
  case "object":
1244
1245
  case "array":
1245
- case "null":
1246
- out.add(t);
1247
- break;
1248
- default: break;
1246
+ case "null": out.add(t);
1249
1247
  }
1250
1248
  return [...out];
1251
1249
  }
@@ -1520,7 +1518,7 @@ function buildLiveMap(snapshot, catalog) {
1520
1518
  }
1521
1519
 
1522
1520
  //#endregion
1523
- //#region \0@oxc-project+runtime@0.140.0/helpers/esm/taggedTemplateLiteral.js
1521
+ //#region \0@oxc-project+runtime@0.147.0/helpers/esm/taggedTemplateLiteral.js
1524
1522
  function _taggedTemplateLiteral(e, t) {
1525
1523
  return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } }));
1526
1524
  }
@@ -1643,7 +1641,8 @@ function stripPrefix(id, prefix) {
1643
1641
  * to be matchable too, or live evidence could never reach it.
1644
1642
  */
1645
1643
  function matchKeyOf(edge) {
1646
- return normaliseEventId$2(stripPrefix(edge.kind === "produces" ? edge.target : edge.source, "event:"));
1644
+ const eventId = edge.kind === "produces" ? edge.target : edge.source;
1645
+ return normaliseEventId$2(stripPrefix(eventId, "event:"));
1647
1646
  }
1648
1647
  function strokeWidth(edge) {
1649
1648
  if (edge.liveness === "declared-only") return 1.25;
@@ -20,7 +20,7 @@ var __copyProps = (to, from, except, desc) => {
20
20
  }
21
21
  return to;
22
22
  };
23
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
24
24
  value: mod,
25
25
  enumerable: true
26
26
  }) : target, mod));
@@ -1167,20 +1167,21 @@ function buildGenerateSummary(result, options) {
1167
1167
  const messages = [];
1168
1168
  for (const op of result.operations) {
1169
1169
  if (!isLink(op)) continue;
1170
- if (op.kind === "service-edge") if (op.detail === "receives") {
1171
- const [service, event] = op.id.split("<-");
1172
- if (service && event) receives.push({
1173
- service,
1174
- event
1175
- });
1176
- } else {
1177
- const [service, event] = op.id.split("->");
1178
- if (service && event) sends.push({
1179
- service,
1180
- event
1181
- });
1182
- }
1183
- else if (op.kind === "channel-edge") {
1170
+ if (op.kind === "service-edge") {
1171
+ if (op.detail === "receives") {
1172
+ const [service, event] = op.id.split("<-");
1173
+ if (service && event) receives.push({
1174
+ service,
1175
+ event
1176
+ });
1177
+ } else {
1178
+ const [service, event] = op.id.split("->");
1179
+ if (service && event) sends.push({
1180
+ service,
1181
+ event
1182
+ });
1183
+ }
1184
+ } else if (op.kind === "channel-edge") {
1184
1185
  const [event, channel] = op.id.split("->");
1185
1186
  if (event && channel) messages.push({
1186
1187
  channel,
@@ -1270,10 +1271,7 @@ function mapRuntimeTypes(types) {
1270
1271
  case "boolean":
1271
1272
  case "object":
1272
1273
  case "array":
1273
- case "null":
1274
- out.add(t);
1275
- break;
1276
- default: break;
1274
+ case "null": out.add(t);
1277
1275
  }
1278
1276
  return [...out];
1279
1277
  }
@@ -1548,7 +1546,7 @@ function buildLiveMap(snapshot, catalog) {
1548
1546
  }
1549
1547
 
1550
1548
  //#endregion
1551
- //#region \0@oxc-project+runtime@0.140.0/helpers/esm/taggedTemplateLiteral.js
1549
+ //#region \0@oxc-project+runtime@0.147.0/helpers/esm/taggedTemplateLiteral.js
1552
1550
  function _taggedTemplateLiteral(e, t) {
1553
1551
  return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } }));
1554
1552
  }
@@ -1671,7 +1669,8 @@ function stripPrefix(id, prefix) {
1671
1669
  * to be matchable too, or live evidence could never reach it.
1672
1670
  */
1673
1671
  function matchKeyOf(edge) {
1674
- return normaliseEventId$2(stripPrefix(edge.kind === "produces" ? edge.target : edge.source, "event:"));
1672
+ const eventId = edge.kind === "produces" ? edge.target : edge.source;
1673
+ return normaliseEventId$2(stripPrefix(eventId, "event:"));
1675
1674
  }
1676
1675
  function strokeWidth(edge) {
1677
1676
  if (edge.liveness === "declared-only") return 1.25;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autotel-eventcatalog",
3
- "version": "28.0.0",
3
+ "version": "29.0.0",
4
4
  "description": "Diff your autotel architecture snapshot against an EventCatalog and report drift. Same model as Pact, for event architectures.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/node": "^26.1.2",
56
- "autotel-subscribers": "57.0.0",
56
+ "autotel-subscribers": "58.0.0",
57
57
  "playwright": "^1.62.0",
58
58
  "rimraf": "^6.1.3",
59
59
  "tsdown": "^0.22.14",