@thallylabs/migrate 0.2.40 → 0.2.42

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/README.md CHANGED
@@ -10,6 +10,12 @@ ordered navigation and binary assets), or uses ordinary local fetching. Hosted
10
10
  callers must inject their own network-safe text/capture and binary boundaries.
11
11
  No browser, model, credentials, sandbox or publishing provider is bundled here.
12
12
 
13
+ Default page requests advertise HTML to retain rendered content and declared
14
+ alternates. An explicit same-origin, same-route Markdown alternate shares the
15
+ article's destination; the rendered article takes precedence even when the
16
+ Markdown URL was discovered first or restored from an interrupted checkpoint.
17
+ Independent pages still report destination collisions.
18
+
13
19
  Server applications should import `@thallylabs/migrate/svg-policy` for the passive
14
20
  SVG validator, or `@thallylabs/migrate/url-migration` for the URL runner, renderer
15
21
  and their types. These independent entries avoid tracing repository cloning and
@@ -99,8 +105,13 @@ Missing primary counterparts and projected path collisions require review; the
99
105
  engine does not invent translations. Fresh HTML captures also observe `html lang`; conflicting or unsupported
100
106
  language evidence requires review. Capture adapters can supply `locale` when
101
107
  no language is declared in HTML or identified by the scoped URL path.
102
- The `url-evidence-v6` converter rejects earlier journals: replay retained raw
108
+ The `url-evidence-v7` converter rejects earlier journals: replay retained raw
103
109
  captures into a new journal rather than relabelling previously hashed pages.
110
+ Distinct observed redirect routes can retain their own sidebar titles through
111
+ noindex page metadata and portable internal redirects to the captured article.
112
+ Conflicting labels on the same route still require review. Markdown image and
113
+ link destinations are localized by source spans, including escaped query strings,
114
+ without changing matching labels, titles, or fenced examples.
104
115
 
105
116
  `stopReason` distinguishes a resumable `capture-limit` from hard `page-limit`
106
117
  or `byte-limit` outcomes. Hosts must not automatically retry a hard limit as an
@@ -148,7 +159,8 @@ renderer, so it always produces a clear warning naming the spec instead of
148
159
  disappearing.
149
160
 
150
161
  `METHOD /path` entries (`"POST /v2/keys.createKey"`) under a container that
151
- binds an `openapi` spec become `api.groups` on the tab that spec binds to:
162
+ binds an `openapi` spec become pages of the site (see the next paragraph) or,
163
+ where that is not possible, `api.groups` on the tab that spec binds to:
152
164
  nested groups, icons and authored order are kept, and page entries stay in the
153
165
  tab's own groups (a group that mixes pages and operations is split, so the
154
166
  sidebar lists the API groups after the page groups). Operations written
@@ -178,8 +190,55 @@ site imported by URL, cannot be placed: one warning says they were not added to
178
190
  operations still have their pages. This is separate from a `directory`'s flat
179
191
  operation list, which still only drives the endpoint redirects.
180
192
 
193
+ Mintlify serves one generated page per operation a navigation container lists,
194
+ at `/<directory>/<first tag>/<summary>` (`directory` is the reference's
195
+ `{ source, directory }` folder, `api-reference` when it is a plain string).
196
+ Each such operation becomes an MDX page at that path under `src/content`, so it
197
+ keeps its URL, sidebar entry, eyebrow and previous/next links. Its frontmatter is
198
+ the summary as `title` (else the operation id, else `METHOD /path`), the first
199
+ sentence of the description as `description` (the title when there is none), and
200
+ `openapi: "<spec file> METHOD /path"`; the body is empty. `descriptionPlacement: operation`
201
+ keeps that short summary for search and metadata while the runtime renders the
202
+ full operation description as Markdown, including every paragraph and warning.
203
+ The tab that listed the
204
+ operations is an ordinary page tab, kept where it was among its siblings and
205
+ labelled as they are (`Product: API reference`), whose groups are the authored
206
+ ones, nesting and order kept, each operation replaced by its page. Tabs that were
207
+ separate in the source are never merged, even when they share a spec. The spec
208
+ is bound once per spec file in a hidden tab (`OpenAPI: <spec>`, the same as for a
209
+ spec only a page names), which is what the pages' `openapi:` frontmatter resolves
210
+ against; the renderer serves no `/api/` page, sitemap entry or search record for it. A remote spec's pages
211
+ and tab are made by `hydrateRemoteApiSpecs` once it is downloaded; a download
212
+ that fails leaves no tab and no page, as before. An operation the spec withholds
213
+ (`x-hidden`, `x-excluded`) gets no page, nor does one listed only under a
214
+ `hidden` group or an access-restricted container (such groups are left out of
215
+ the tab, as above). Of two operations with the same tag and
216
+ summary the first listed keeps the URL and one warning names the others; an
217
+ authored page at that URL keeps it. Nothing is redirected from these URLs and a
218
+ link to one stays as written; a link to a tag folder or to an address under the
219
+ directory that matches no page goes to a page, and a folder of pages with no page
220
+ of its own opens on its first page, as in any other navigation. The operations
221
+ fall back to `api.groups` on an API tab, as described above, when the containers
222
+ that share a tab disagree on the directory, the directory cannot be a folder name,
223
+ the spec has none of the listed operations, or the tab is bound to another spec.
224
+ A reference that lists no operation (Mintlify generated every endpoint) is not
225
+ affected. Operations whose path item is a local `$ref` are read as the renderer
226
+ reads them (hidden or excluded on any level of the reference withholds them).
227
+ The renderer tries the first visible API tab's spec first for a bare
228
+ `openapi: "METHOD /path"` page; when converting a tab to pages stops its spec being
229
+ that one, each bare reference to an operation the converted spec defines is
230
+ written with that spec's path in front, so it still renders the same operation.
231
+
181
232
  Mintlify `styling.eyebrows: "breadcrumbs"` becomes `eyebrow: "path"` (the full
182
233
  group path above the page title); `"section"` or no setting writes nothing.
234
+ Mintlify sources also get `smartQuotes: true`, because Mintlify renders straight
235
+ quotes in prose as curly ones; the setting leaves code, heading ids, Markdown and
236
+ `llms.txt` as written.
237
+
238
+ Thally leaves out the sidebar heading of a group named after its tab or dropdown, because
239
+ the collection already names it. Mintlify keeps that heading, so a source with such a group
240
+ (an `API reference` dropdown whose first group is also `API reference`) gets
241
+ `navigation.groupHeadings: "all"`. A source without one gets nothing.
183
242
 
184
243
  Page `openapi:` frontmatter with a spec prefix
185
244
  (`openapi: "specs/openapi-b.yaml GET /widgets/{id}"`) is rewritten to where the
@@ -199,7 +258,8 @@ no operation points to that section's overview page instead, and one warning
199
258
  lists the affected links (up to ten). A link to an address the site answers
200
259
  itself (a guide authored inside an API directory, trailing slash or `/index` or
201
260
  not, or the source of an authored redirect) is never rewritten. A spec that
202
- Mintlify mounted under a `directory` also gets a redirect from each endpoint URL that directory served,
261
+ Mintlify mounted under a `directory` also gets a redirect from each endpoint URL that directory served
262
+ (not the operations a container lists, which are pages at those URLs),
203
263
  to the matching endpoint page, and never to an operation the published spec
204
264
  withholds with `x-hidden` or `x-excluded`. A remote spec gets every directory
205
265
  each of its tabs mounted it under, limited to the operations the navigation
@@ -244,6 +304,15 @@ whose address has a `+ ? ( ) [ ] { }` character (a `directory` such as
244
304
  spec or a downloaded spec is left out instead, and one warning lists the first
245
305
  ten of them.
246
306
 
307
+ A Mintlify page whose frontmatter `url` is a web address is a link in the
308
+ source sidebar. It is imported as a page that is kept out of the sitemap, stays
309
+ in the navigation, and has a redirect from its path to that address. That
310
+ redirect is added after the checks above, because hiding the page is its
311
+ purpose; a `url` that is not an `http(s)` address is ignored. The home page
312
+ (`index.mdx` or `introduction.mdx`) is served at `/` and at `/introduction`, so
313
+ both redirect, and the redirect from `/` replaces the generated one to the first
314
+ page. A redirect for `/` that the source site wrote stays, and a warning says so.
315
+
247
316
  A repository is limited to 5,000 documentation files and, separately, 5,000
248
317
  asset files. Past that, files are kept in navigation order with the default
249
318
  version first, then pages not listed in navigation, and one warning counts and
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { M as MigrationPage, a as MigrationAsset, b as MigrationNavigationGroup, R as RenderedMigrationFile, c as MigrationWarning, d as MigrationFetcher, e as MigrationPlatform, f as MigrationBundle, g as MigrationDocsConfig } from './url-run-DFnoqEi-.js';
2
- export { h as MigrationCapture, i as MigrationCaptureProvider, j as MigrationCaptureState, k as MigrationCapturedAsset, l as MigrationEvidence, m as MigrationFetchRequest, n as MigrationFetchResponse, o as MigrationJournalAsset, p as MigrationNavigationOccurrence, q as MigrationNavigationTab, U as UrlMigrationCheckpoint, r as UrlMigrationCheckpointDelta, s as UrlMigrationIssue, t as UrlMigrationRecord, u as UrlMigrationRun, v as UrlMigrationRunOptions, w as UrlMigrationValidation, x as classifyMigrationResponse, y as mergeMigrationConfig, z as renderMigrationFiles, A as runUrlMigration, B as validateUrlMigration } from './url-run-DFnoqEi-.js';
1
+ import { M as MigrationPage, a as MigrationAsset, b as MigrationNavigationGroup, R as RenderedMigrationFile, c as MigrationWarning, d as MigrationFetcher, e as MigrationPlatform, f as MigrationBundle, g as MigrationDocsConfig, E as EndpointTabSlot } from './url-run-CPzQfjRW.js';
2
+ export { h as MigrationCapture, i as MigrationCaptureProvider, j as MigrationCaptureState, k as MigrationCapturedAsset, l as MigrationEvidence, m as MigrationFetchRequest, n as MigrationFetchResponse, o as MigrationJournalAsset, p as MigrationNavigationOccurrence, q as MigrationNavigationTab, U as UrlMigrationCheckpoint, r as UrlMigrationCheckpointDelta, s as UrlMigrationIssue, t as UrlMigrationRecord, u as UrlMigrationRun, v as UrlMigrationRunOptions, w as UrlMigrationValidation, x as classifyMigrationResponse, y as mergeMigrationConfig, z as renderMigrationFiles, A as runUrlMigration, B as validateUrlMigration } from './url-run-CPzQfjRW.js';
3
3
  export { isPassiveSvg } from './svg-policy.js';
4
4
 
5
5
  /**
@@ -171,6 +171,14 @@ interface MintlifyNavigationResult {
171
171
  referenceAccess: Array<MintlifyReferenceAccess>;
172
172
  /** `sourceRef` mounts under a restricted container; never resolved, so nothing of theirs is imported. */
173
173
  gatedSourceRefs: Array<string>;
174
+ /**
175
+ * The API tabs that list operations and nothing else, which `docsConfig.tabs` leaves out: each with the navigation container that
176
+ * owns it and the place it held among the tabs. Only produced with `operationGroups`; the spec binding puts such a tab back as a page tab.
177
+ */
178
+ apiTabSlots: Array<{
179
+ container: object;
180
+ slot: EndpointTabSlot;
181
+ }>;
174
182
  warnings: Array<MigrationWarning>;
175
183
  }
176
184
  interface MintlifyProjectionOptions {