@thallylabs/migrate 0.2.40 → 0.2.41
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 +60 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +469 -59
- package/dist/index.js.map +1 -1
- package/dist/url-migration.d.ts +2 -2
- package/dist/url-migration.js +40 -6
- package/dist/url-migration.js.map +1 -1
- package/dist/{url-run-DFnoqEi-.d.ts → url-run-mSKFqHx_.d.ts} +33 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -148,7 +148,8 @@ renderer, so it always produces a clear warning naming the spec instead of
|
|
|
148
148
|
disappearing.
|
|
149
149
|
|
|
150
150
|
`METHOD /path` entries (`"POST /v2/keys.createKey"`) under a container that
|
|
151
|
-
binds an `openapi` spec become
|
|
151
|
+
binds an `openapi` spec become pages of the site (see the next paragraph) or,
|
|
152
|
+
where that is not possible, `api.groups` on the tab that spec binds to:
|
|
152
153
|
nested groups, icons and authored order are kept, and page entries stay in the
|
|
153
154
|
tab's own groups (a group that mixes pages and operations is split, so the
|
|
154
155
|
sidebar lists the API groups after the page groups). Operations written
|
|
@@ -178,8 +179,55 @@ site imported by URL, cannot be placed: one warning says they were not added to
|
|
|
178
179
|
operations still have their pages. This is separate from a `directory`'s flat
|
|
179
180
|
operation list, which still only drives the endpoint redirects.
|
|
180
181
|
|
|
182
|
+
Mintlify serves one generated page per operation a navigation container lists,
|
|
183
|
+
at `/<directory>/<first tag>/<summary>` (`directory` is the reference's
|
|
184
|
+
`{ source, directory }` folder, `api-reference` when it is a plain string).
|
|
185
|
+
Each such operation becomes an MDX page at that path under `src/content`, so it
|
|
186
|
+
keeps its URL, sidebar entry, eyebrow and previous/next links. Its frontmatter is
|
|
187
|
+
the summary as `title` (else the operation id, else `METHOD /path`), the first
|
|
188
|
+
sentence of the description as `description` (the title when there is none), and
|
|
189
|
+
`openapi: "<spec file> METHOD /path"`; the body is empty. `descriptionPlacement: operation`
|
|
190
|
+
keeps that short summary for search and metadata while the runtime renders the
|
|
191
|
+
full operation description as Markdown, including every paragraph and warning.
|
|
192
|
+
The tab that listed the
|
|
193
|
+
operations is an ordinary page tab, kept where it was among its siblings and
|
|
194
|
+
labelled as they are (`Product: API reference`), whose groups are the authored
|
|
195
|
+
ones, nesting and order kept, each operation replaced by its page. Tabs that were
|
|
196
|
+
separate in the source are never merged, even when they share a spec. The spec
|
|
197
|
+
is bound once per spec file in a hidden tab (`OpenAPI: <spec>`, the same as for a
|
|
198
|
+
spec only a page names), which is what the pages' `openapi:` frontmatter resolves
|
|
199
|
+
against; the renderer serves no `/api/` page, sitemap entry or search record for it. A remote spec's pages
|
|
200
|
+
and tab are made by `hydrateRemoteApiSpecs` once it is downloaded; a download
|
|
201
|
+
that fails leaves no tab and no page, as before. An operation the spec withholds
|
|
202
|
+
(`x-hidden`, `x-excluded`) gets no page, nor does one listed only under a
|
|
203
|
+
`hidden` group or an access-restricted container (such groups are left out of
|
|
204
|
+
the tab, as above). Of two operations with the same tag and
|
|
205
|
+
summary the first listed keeps the URL and one warning names the others; an
|
|
206
|
+
authored page at that URL keeps it. Nothing is redirected from these URLs and a
|
|
207
|
+
link to one stays as written; a link to a tag folder or to an address under the
|
|
208
|
+
directory that matches no page goes to a page, and a folder of pages with no page
|
|
209
|
+
of its own opens on its first page, as in any other navigation. The operations
|
|
210
|
+
fall back to `api.groups` on an API tab, as described above, when the containers
|
|
211
|
+
that share a tab disagree on the directory, the directory cannot be a folder name,
|
|
212
|
+
the spec has none of the listed operations, or the tab is bound to another spec.
|
|
213
|
+
A reference that lists no operation (Mintlify generated every endpoint) is not
|
|
214
|
+
affected. Operations whose path item is a local `$ref` are read as the renderer
|
|
215
|
+
reads them (hidden or excluded on any level of the reference withholds them).
|
|
216
|
+
The renderer tries the first visible API tab's spec first for a bare
|
|
217
|
+
`openapi: "METHOD /path"` page; when converting a tab to pages stops its spec being
|
|
218
|
+
that one, each bare reference to an operation the converted spec defines is
|
|
219
|
+
written with that spec's path in front, so it still renders the same operation.
|
|
220
|
+
|
|
181
221
|
Mintlify `styling.eyebrows: "breadcrumbs"` becomes `eyebrow: "path"` (the full
|
|
182
222
|
group path above the page title); `"section"` or no setting writes nothing.
|
|
223
|
+
Mintlify sources also get `smartQuotes: true`, because Mintlify renders straight
|
|
224
|
+
quotes in prose as curly ones; the setting leaves code, heading ids, Markdown and
|
|
225
|
+
`llms.txt` as written.
|
|
226
|
+
|
|
227
|
+
Thally leaves out the sidebar heading of a group named after its tab or dropdown, because
|
|
228
|
+
the collection already names it. Mintlify keeps that heading, so a source with such a group
|
|
229
|
+
(an `API reference` dropdown whose first group is also `API reference`) gets
|
|
230
|
+
`navigation.groupHeadings: "all"`. A source without one gets nothing.
|
|
183
231
|
|
|
184
232
|
Page `openapi:` frontmatter with a spec prefix
|
|
185
233
|
(`openapi: "specs/openapi-b.yaml GET /widgets/{id}"`) is rewritten to where the
|
|
@@ -199,7 +247,8 @@ no operation points to that section's overview page instead, and one warning
|
|
|
199
247
|
lists the affected links (up to ten). A link to an address the site answers
|
|
200
248
|
itself (a guide authored inside an API directory, trailing slash or `/index` or
|
|
201
249
|
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
|
|
250
|
+
Mintlify mounted under a `directory` also gets a redirect from each endpoint URL that directory served
|
|
251
|
+
(not the operations a container lists, which are pages at those URLs),
|
|
203
252
|
to the matching endpoint page, and never to an operation the published spec
|
|
204
253
|
withholds with `x-hidden` or `x-excluded`. A remote spec gets every directory
|
|
205
254
|
each of its tabs mounted it under, limited to the operations the navigation
|
|
@@ -244,6 +293,15 @@ whose address has a `+ ? ( ) [ ] { }` character (a `directory` such as
|
|
|
244
293
|
spec or a downloaded spec is left out instead, and one warning lists the first
|
|
245
294
|
ten of them.
|
|
246
295
|
|
|
296
|
+
A Mintlify page whose frontmatter `url` is a web address is a link in the
|
|
297
|
+
source sidebar. It is imported as a page that is kept out of the sitemap, stays
|
|
298
|
+
in the navigation, and has a redirect from its path to that address. That
|
|
299
|
+
redirect is added after the checks above, because hiding the page is its
|
|
300
|
+
purpose; a `url` that is not an `http(s)` address is ignored. The home page
|
|
301
|
+
(`index.mdx` or `introduction.mdx`) is served at `/` and at `/introduction`, so
|
|
302
|
+
both redirect, and the redirect from `/` replaces the generated one to the first
|
|
303
|
+
page. A redirect for `/` that the source site wrote stays, and a warning says so.
|
|
304
|
+
|
|
247
305
|
A repository is limited to 5,000 documentation files and, separately, 5,000
|
|
248
306
|
asset files. Past that, files are kept in navigation order with the default
|
|
249
307
|
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-
|
|
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-
|
|
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-mSKFqHx_.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-mSKFqHx_.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 {
|