@davmash/bygone 0.8.5 → 0.8.7

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/out/changeTour.js CHANGED
@@ -239,6 +239,9 @@ function parseChangeTourManifest(value) {
239
239
  }
240
240
  requireString(value.title, "title");
241
241
  requireString(value.generatedAt, "generatedAt");
242
+ if (value.windowTitle !== void 0) {
243
+ requireString(value.windowTitle, "windowTitle");
244
+ }
242
245
  if (value.sourceUrl !== void 0) {
243
246
  requireString(value.sourceUrl, "sourceUrl");
244
247
  }
@@ -533,8 +536,9 @@ function parseChangeTourSource(value) {
533
536
  if (!isRecord2(value) || value.version !== CHANGE_TOUR_SOURCE_VERSION) {
534
537
  throw new Error("Unsupported or missing change-tour source version.");
535
538
  }
536
- requireOnlyKeys(value, ["version", "title", "sourceUrl", "range", "anchors", "connections", "chapters", "coverage"], "source");
539
+ requireOnlyKeys(value, ["version", "title", "windowTitle", "sourceUrl", "range", "anchors", "connections", "chapters", "coverage"], "source");
537
540
  optionalString(value.title, "title");
541
+ optionalString(value.windowTitle, "windowTitle");
538
542
  optionalString(value.sourceUrl, "sourceUrl");
539
543
  if (value.range !== void 0) {
540
544
  if (!isRecord2(value.range)) throw new Error("range must be an object.");
@@ -1385,7 +1389,7 @@ var CHAPTERS = {
1385
1389
  packaging: { id: "packaging", title: "Packaging and dependencies", priority: 4 }
1386
1390
  };
1387
1391
  function buildChangeTourManifest(startPath, options = {}) {
1388
- var _a, _b, _c, _d;
1392
+ var _a, _b, _c, _d, _e;
1389
1393
  const range = resolveBranchReviewRange(startPath, options.headRef, options.baseRef);
1390
1394
  const maxFileBytes = options.maxFileBytes ?? DEFAULT_MAX_TOUR_FILE_BYTES;
1391
1395
  const maxLineBytes = options.maxLineBytes ?? DEFAULT_MAX_TOUR_LINE_BYTES;
@@ -1457,7 +1461,8 @@ function buildChangeTourManifest(startPath, options = {}) {
1457
1461
  const manifest = {
1458
1462
  version: CHANGE_TOUR_MANIFEST_VERSION,
1459
1463
  title: ((_a = options.source) == null ? void 0 : _a.title) || ((_b = options.story) == null ? void 0 : _b.title) || options.title || `${range.headRef} against ${range.baseRef}`,
1460
- sourceUrl: ((_c = options.source) == null ? void 0 : _c.sourceUrl) || ((_d = options.story) == null ? void 0 : _d.sourceUrl) || options.sourceUrl,
1464
+ windowTitle: (_c = options.source) == null ? void 0 : _c.windowTitle,
1465
+ sourceUrl: ((_d = options.source) == null ? void 0 : _d.sourceUrl) || ((_e = options.story) == null ? void 0 : _e.sourceUrl) || options.sourceUrl,
1461
1466
  generatedAt: options.generatedAt || (/* @__PURE__ */ new Date()).toISOString(),
1462
1467
  range: {
1463
1468
  baseRef: range.baseRef,