@thallylabs/migrate 0.2.34 → 0.2.37

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.
@@ -165,6 +165,12 @@ interface MigrationNavigationGroup {
165
165
  hidden?: boolean;
166
166
  pages: Array<string | MigrationNavigationGroup>;
167
167
  }
168
+ /** A group of an API tab's authored sidebar: `METHOD /path` operation keys and nested groups. */
169
+ interface MigrationApiGroup {
170
+ group: string;
171
+ icon?: string;
172
+ pages: Array<string | MigrationApiGroup>;
173
+ }
168
174
  interface MigrationNavigationTab {
169
175
  tab: string;
170
176
  /** Reader-facing label when `tab` includes a version for unique identity. */
@@ -180,6 +186,7 @@ interface MigrationNavigationTab {
180
186
  api?: {
181
187
  source: string;
182
188
  navigation?: boolean;
189
+ groups?: Array<MigrationApiGroup>;
183
190
  };
184
191
  }
185
192
  interface MigrationBannerConfig {
@@ -238,6 +245,8 @@ interface MigrationDocsConfig {
238
245
  stylesheets?: Array<string>;
239
246
  /** `false` hides the breadcrumb trail; Mintlify pages show only a group eyebrow. */
240
247
  breadcrumbs?: boolean;
248
+ /** `path` shows the full group path above the title (Mintlify `styling.eyebrows: "breadcrumbs"`); the default shows the nearest group. */
249
+ eyebrow?: 'group' | 'path';
241
250
  tabs: Array<MigrationNavigationTab>;
242
251
  navigation?: {
243
252
  /** How sibling documentation collections are presented to readers. */
@@ -440,6 +449,10 @@ interface RemoteApiSpec {
440
449
  hidden?: boolean;
441
450
  /** Every `directory` docs.json mounts this spec under: several API tabs may share one spec URL. */
442
451
  directories?: Array<RemoteApiSpecDirectory>;
452
+ /** The operation groups docs.json authors for the tab this spec binds to, merged across every reference that shares it. */
453
+ groups?: Array<MigrationApiGroup>;
454
+ /** Every reference sharing the tab lists operations and none survives (all hidden or restricted): no endpoint navigation is generated for it. */
455
+ navigation?: false;
443
456
  /** Operation keys (`get /x`) only access-restricted pages document; marked `x-excluded` after download. */
444
457
  withheldOperations?: Array<string>;
445
458
  /** Operation keys published pages or docs.json also name; keeps a shared `$ref` path item public. */
@@ -1 +1 @@
1
- export { a as MigrationAsset, f as MigrationBundle, h as MigrationCapture, i as MigrationCaptureProvider, j as MigrationCaptureState, k as MigrationCapturedAsset, g as MigrationDocsConfig, l as MigrationEvidence, m as MigrationFetchRequest, n as MigrationFetchResponse, d as MigrationFetcher, o as MigrationJournalAsset, b as MigrationNavigationGroup, p as MigrationNavigationOccurrence, q as MigrationNavigationTab, M as MigrationPage, e as MigrationPlatform, c as MigrationWarning, R as RenderedMigrationFile, U as UrlMigrationCheckpoint, r as UrlMigrationCheckpointDelta, s as UrlMigrationIssue, t as UrlMigrationRecord, u as UrlMigrationRun, v as UrlMigrationRunOptions, w as UrlMigrationValidation, x as classifyMigrationResponse, z as renderMigrationFiles, A as runUrlMigration, B as validateUrlMigration } from './url-migration-EwtII4P-.js';
1
+ export { a as MigrationAsset, f as MigrationBundle, h as MigrationCapture, i as MigrationCaptureProvider, j as MigrationCaptureState, k as MigrationCapturedAsset, g as MigrationDocsConfig, l as MigrationEvidence, m as MigrationFetchRequest, n as MigrationFetchResponse, d as MigrationFetcher, o as MigrationJournalAsset, b as MigrationNavigationGroup, p as MigrationNavigationOccurrence, q as MigrationNavigationTab, M as MigrationPage, e as MigrationPlatform, c as MigrationWarning, R as RenderedMigrationFile, U as UrlMigrationCheckpoint, r as UrlMigrationCheckpointDelta, s as UrlMigrationIssue, t as UrlMigrationRecord, u as UrlMigrationRun, v as UrlMigrationRunOptions, w as UrlMigrationValidation, x as classifyMigrationResponse, z as renderMigrationFiles, A as runUrlMigration, B as validateUrlMigration } from './url-migration-peVzTLjL.js';
@@ -3760,7 +3760,7 @@ function validateUrlMigration(checkpoint, cancelled = false) {
3760
3760
  } catch {
3761
3761
  }
3762
3762
  if (!destination.evidence?.anchors.includes(anchor)) {
3763
- warnings.push({ code: "source-link-warning", source: record.url, message: `The original source link refers to an absent source anchor: ${link}` });
3763
+ warnings.push({ code: "source-link-warning", source: record.url, message: `The original source link refers to an absent source anchor; the imported link opens the page instead: ${link}` });
3764
3764
  } else if (destination.page) {
3765
3765
  const nodes = markdownNodes(destination.page.body);
3766
3766
  const explicit = nodes.flatMap((node) => node.name === "a" ? (node.attributes ?? []).flatMap((attribute) => attribute.name === "id" && typeof attribute.value === "string" ? [attribute.value] : []) : []);
@@ -4209,8 +4209,17 @@ ${difference}`;
4209
4209
  } catch {
4210
4210
  return value;
4211
4211
  }
4212
- const route = routeMap.get(canonical(url.toString(), sourceUrl));
4213
- return route ? `${route}${url.hash}` : value;
4212
+ const identity = canonical(url.toString(), sourceUrl);
4213
+ const route = routeMap.get(identity);
4214
+ if (!route) return value;
4215
+ const destination = resolveMigrationRecord(records, records.get(identity));
4216
+ let anchor = url.hash.slice(1);
4217
+ try {
4218
+ anchor = decodeURIComponent(anchor);
4219
+ } catch {
4220
+ }
4221
+ const hasBrokenSourceAnchor = Boolean(url.hash && destination?.outcome === "imported" && destination.evidence && !destination.evidence.anchors.includes(anchor));
4222
+ return `${route}${hasBrokenSourceAnchor ? "" : url.hash}`;
4214
4223
  }) }] : []);
4215
4224
  const validation = validateUrlMigration(checkpoint, Boolean(options.signal?.aborted));
4216
4225
  validation.issues.push(...navigationIssues);