@thallylabs/migrate 0.2.26 → 0.2.28
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 +97 -0
- package/dist/index.d.ts +10 -357
- package/dist/index.js +3504 -1560
- package/dist/index.js.map +1 -1
- package/dist/svg-policy.d.ts +16 -0
- package/dist/svg-policy.js +308 -0
- package/dist/svg-policy.js.map +1 -0
- package/dist/url-migration-CDjLZVaN.d.ts +512 -0
- package/dist/url-migration.d.ts +1 -0
- package/dist/url-migration.js +3786 -0
- package/dist/url-migration.js.map +1 -0
- package/package.json +13 -2
package/README.md
CHANGED
|
@@ -4,6 +4,56 @@ The shared migration engine used by the Thally CLI, MCP server, and Thally
|
|
|
4
4
|
Cloud. It imports documentation repositories and public documentation URLs
|
|
5
5
|
into one canonical bundle before any caller writes files.
|
|
6
6
|
|
|
7
|
+
`runUrlMigration` adds an evidence-bearing, resumable URL path. It accepts a
|
|
8
|
+
provider-neutral `captureProvider` (rendered HTML, read-only alternative states,
|
|
9
|
+
ordered navigation and binary assets), or uses ordinary local fetching. Hosted
|
|
10
|
+
callers must inject their own network-safe text/capture and binary boundaries.
|
|
11
|
+
No browser, model, credentials, sandbox or publishing provider is bundled here.
|
|
12
|
+
|
|
13
|
+
Server applications should import `@thallylabs/migrate/svg-policy` for the passive
|
|
14
|
+
SVG validator, or `@thallylabs/migrate/url-migration` for the URL runner, renderer
|
|
15
|
+
and their types. These independent entries avoid tracing repository cloning and
|
|
16
|
+
filesystem discovery into application routes. The root entry remains compatible.
|
|
17
|
+
|
|
18
|
+
The returned `checkpoint` is JSON-safe. `onRecord` lets a host persist a completed
|
|
19
|
+
page before acknowledging it; `onCheckpoint` emits bounded deltas, including
|
|
20
|
+
pending discoveries and checkpoint identity fields. Merge delta records by URL,
|
|
21
|
+
then pass the reconstructed checkpoint back to resume. Converted page and asset
|
|
22
|
+
hashes are checked before reuse, and `reconcile` verifies externally stored
|
|
23
|
+
artifacts. Capture adapters should persist raw source/state evidence before
|
|
24
|
+
returning an `artifactRef`. `maxCaptures` bounds a continuation; `signal` cancels
|
|
25
|
+
capture and returns committed progress. Failed pages retry on resume by default.
|
|
26
|
+
|
|
27
|
+
Page limits support 1–10,000 pages (default 1,000). This interface limit does not
|
|
28
|
+
establish that an arbitrary site can be imported completely. Every inventory
|
|
29
|
+
entry has an explicit outcome; pending/failed pages, missing anchors, technical
|
|
30
|
+
payload differences, unavailable assets and unsupported interactive components
|
|
31
|
+
make validation partial. Raster/PDF assets require matching MIME and signatures;
|
|
32
|
+
SVG must pass the exported `isPassiveSvg` policy: static drawing elements with
|
|
33
|
+
only in-document references, no scripts, external resources, styles or animations.
|
|
34
|
+
Rejected SVG and executable downloads are reported for review.
|
|
35
|
+
Responsive `picture`/`source`/`img` choices retain their descriptors, media
|
|
36
|
+
conditions, sizing and literal alt text. Every candidate is localized; shared
|
|
37
|
+
asset URLs are fetched once and identical payloads count once toward the byte
|
|
38
|
+
budget, including resumed journals. Complete static tab panels are preserved as
|
|
39
|
+
alternatives; empty/lazy panels still require a capture provider.
|
|
40
|
+
Observed locale metadata and URL prefixes are projected onto the runtime layout:
|
|
41
|
+
primary-language files are unprefixed and secondary-language files retain their
|
|
42
|
+
locale prefix. A single-language localized site uses that language as primary.
|
|
43
|
+
Missing primary counterparts and projected path collisions require review; the
|
|
44
|
+
engine does not invent translations. Fresh HTML captures also observe `html lang`; conflicting or unsupported
|
|
45
|
+
language evidence requires review. Capture adapters can supply `locale` when
|
|
46
|
+
no language is declared in HTML or identified by the scoped URL path.
|
|
47
|
+
The `url-evidence-v2` converter rejects earlier journals: replay retained raw
|
|
48
|
+
captures into a new journal rather than relabelling previously hashed pages.
|
|
49
|
+
|
|
50
|
+
`stopReason` distinguishes a resumable `capture-limit` from hard `page-limit`
|
|
51
|
+
or `byte-limit` outcomes. Hosts must not automatically retry a hard limit as an
|
|
52
|
+
unfinished capture slice. Discovery indexes drain independently of article caps.
|
|
53
|
+
Source validation remains independent of generated-site build/browser checks.
|
|
54
|
+
The CLI's programmatic `migrateDocs({ urlMigration: { ... } })` path retains
|
|
55
|
+
those source validation results in its migration report.
|
|
56
|
+
|
|
7
57
|
Repository migration includes dedicated Mintlify and Docusaurus adapters.
|
|
8
58
|
Mintlify repositories are located inside monorepos automatically. Their
|
|
9
59
|
`docs.json`/`mint.json` page and group trees are projected without flattening
|
|
@@ -115,6 +165,12 @@ Docusaurus `mdx-code-block` wrappers are opened as live MDX when the resulting
|
|
|
115
165
|
page compiles and its special fences contain no module declarations. Pages
|
|
116
166
|
whose fragments still need Docusaurus theme imports or remark plugins remain
|
|
117
167
|
fenced and are retained.
|
|
168
|
+
Directories and files whose names start with `_`, and `__tests__` directories,
|
|
169
|
+
are skipped, as Docusaurus does not treat them as documents. Pages with `unlisted`
|
|
170
|
+
set stay routable but are left out of navigation. Partial imports of `toc`,
|
|
171
|
+
`frontMatter`, `metadata` and `assets` are bound to values the page can use
|
|
172
|
+
instead of failing. `<Admonition>` becomes a callout like the colon fence, and
|
|
173
|
+
`<ThemedImage>` keeps its light image.
|
|
118
174
|
|
|
119
175
|
Fern repositories are located by their `fern/docs.yml` + `fern/fern.config.json`
|
|
120
176
|
pair. `docs.yml` is parsed as bounded YAML—never executed—and preserves tabs,
|
|
@@ -129,6 +185,8 @@ Internal links are adjusted for the site's domain path, selected version, and
|
|
|
129
185
|
source-file routes. Links to sections not imported into Thally stay on the
|
|
130
186
|
published Fern site and produce a migration warning, so the generated site can
|
|
131
187
|
build while the remaining content is moved separately.
|
|
188
|
+
`<Markdown src="...">` includes are inlined from the referenced file when it is
|
|
189
|
+
inside the repository.
|
|
132
190
|
Every `api:` section's OpenAPI document is resolved from its own
|
|
133
191
|
`generators.yml` (`api.specs[].openapi`, or the legacy `api:` string) and
|
|
134
192
|
imported into its own tab — a docs.yml with several API sections (e.g. a REST
|
|
@@ -357,6 +415,34 @@ and its original is written unchanged to `migration-quarantine/<original path>`
|
|
|
357
415
|
at the project root, which no runtime reader walks; `create-thally-docs` adds
|
|
358
416
|
that folder to `.gitignore`. Each quarantined page gets a `gated-page` warning.
|
|
359
417
|
|
|
418
|
+
Fern and Docusaurus have no runtime access mapping in Thally, so their restricted
|
|
419
|
+
pages fail closed in the same way: they are quarantined (not written to
|
|
420
|
+
`src/content`, removed from navigation, original saved under
|
|
421
|
+
`migration-quarantine/`) and never inlined into other pages. Fern signals:
|
|
422
|
+
frontmatter `viewers` (any non-empty value) or `authed`, `<If roles>` or
|
|
423
|
+
`<If viewers>` content in a page, and `viewers` in `docs.yml` on pages, sections,
|
|
424
|
+
tabs, products, versions and api nodes; the specs of a restricted api node are
|
|
425
|
+
withheld too. Docusaurus: a `draft` page, where any value other than unset,
|
|
426
|
+
`false` or `"false"` counts as a draft; the check is skipped for files under `_`
|
|
427
|
+
directories and `__tests__`, which Docusaurus does not publish as documents. Links
|
|
428
|
+
from other pages to a quarantined page are left as authored and will fail
|
|
429
|
+
`thally check`.
|
|
430
|
+
|
|
431
|
+
Fern migration stops with an explicit error if cyclic navigation, excessive
|
|
432
|
+
nesting, or the node budget prevents complete access classification. It emits
|
|
433
|
+
no pages, assets, or API specs, because an unvisited branch could restrict a
|
|
434
|
+
file also listed under a public node. Simplify the source navigation and retry.
|
|
435
|
+
|
|
436
|
+
Assets are copied to `public/` only when a published page, the site configuration,
|
|
437
|
+
copied styles or a migrated component names them by their exact normalized path;
|
|
438
|
+
a restricted page's text never makes an asset public. On a site that withholds
|
|
439
|
+
anything, an asset nothing published names that way, one named only by a bare file
|
|
440
|
+
name or in a different letter case, one built at runtime, and one that shares its
|
|
441
|
+
public path with another file are saved under `migration-quarantine/assets/`
|
|
442
|
+
instead, with a warning listing them so they can be copied back by hand. On every
|
|
443
|
+
platform a page over 2 MB is not inlined, OpenAPI spec reads are capped at 50 MB,
|
|
444
|
+
and a path that resolves outside the repository through a symlink is refused.
|
|
445
|
+
|
|
360
446
|
What a restricted page uses must not leak through surfaces that are not access
|
|
361
447
|
controlled: it is never inlined into another page (a `gated-page` warning names
|
|
362
448
|
the importer), images and other assets used only by restricted pages are not
|
|
@@ -395,6 +481,17 @@ Legacy `mint.json` `topbarLinks` and `topbarCtaButton` (including
|
|
|
395
481
|
|
|
396
482
|
## Branding
|
|
397
483
|
|
|
484
|
+
Docusaurus custom CSS projects Infima palette, typography, header spacing,
|
|
485
|
+
announcement styling, and local Prism colors into a portable stylesheet.
|
|
486
|
+
For Sass or Tailwind expressions, provide locally compiled
|
|
487
|
+
`build/assets/css/styles.*.css`; unresolved expressions produce a migration
|
|
488
|
+
warning. Configuration and theme modules are read as static data.
|
|
489
|
+
|
|
490
|
+
Remote Fern `global-theme` references fall back to local overrides and base
|
|
491
|
+
Thally tokens with a structured warning. The NVIDIA theme uses `#76B900`
|
|
492
|
+
when no local accent is configured. No remote theme assets are fetched.
|
|
493
|
+
Authored section expansion defaults are retained on desktop and mobile.
|
|
494
|
+
|
|
398
495
|
A source site's logo, favicon, and theme accent color(s) are extracted where
|
|
399
496
|
each platform's config exposes them (Mintlify's `colors`, Fern's
|
|
400
497
|
`colors.accent-primary`, Docusaurus's classic theme `customCss`). A valid
|
package/dist/index.d.ts
CHANGED
|
@@ -1,349 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* normalization finish, so a partial crawl can never leave a half-written site.
|
|
5
|
-
*/
|
|
6
|
-
type MigrationPlatform = 'mintlify' | 'docusaurus' | 'fern' | 'gitbook' | 'nextra' | 'vitepress' | 'starlight' | 'thally' | 'generic' | 'unknown';
|
|
7
|
-
interface MigrationNavigationGroup {
|
|
8
|
-
group: string;
|
|
9
|
-
icon?: string;
|
|
10
|
-
hidden?: boolean;
|
|
11
|
-
pages: Array<string | MigrationNavigationGroup>;
|
|
12
|
-
}
|
|
13
|
-
interface MigrationNavigationTab {
|
|
14
|
-
tab: string;
|
|
15
|
-
/** Reader-facing label when `tab` includes a version for unique identity. */
|
|
16
|
-
displayLabel?: string;
|
|
17
|
-
version?: string;
|
|
18
|
-
description?: string;
|
|
19
|
-
icon?: string;
|
|
20
|
-
href?: string;
|
|
21
|
-
hidden?: boolean;
|
|
22
|
-
/** Root page/group nodes used when the source has no synthetic section heading. */
|
|
23
|
-
pages?: Array<string | MigrationNavigationGroup>;
|
|
24
|
-
groups?: Array<MigrationNavigationGroup>;
|
|
25
|
-
api?: {
|
|
26
|
-
source: string;
|
|
27
|
-
navigation?: boolean;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
interface MigrationBannerConfig {
|
|
31
|
-
content: string | Record<string, string>;
|
|
32
|
-
dismissible?: boolean;
|
|
33
|
-
id?: string;
|
|
34
|
-
revision?: string;
|
|
35
|
-
type?: 'info' | 'warning' | 'critical';
|
|
36
|
-
color?: {
|
|
37
|
-
light?: string;
|
|
38
|
-
dark?: string;
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
interface MigrationNavbarConfig {
|
|
42
|
-
links?: Array<{
|
|
43
|
-
label: string;
|
|
44
|
-
href: string;
|
|
45
|
-
type?: 'github';
|
|
46
|
-
button?: {
|
|
47
|
-
background: string;
|
|
48
|
-
color?: string;
|
|
49
|
-
};
|
|
50
|
-
}>;
|
|
51
|
-
/** Explicit null suppresses the starter's sample call to action. */
|
|
52
|
-
primary?: {
|
|
53
|
-
label: string;
|
|
54
|
-
href: string;
|
|
55
|
-
type?: 'github';
|
|
56
|
-
} | null;
|
|
57
|
-
/** Local public assets used until an owner uploads a brand replacement. */
|
|
58
|
-
/** Explicit null requests a text-only brand when the source has no logo. */
|
|
59
|
-
logo?: {
|
|
60
|
-
light: string;
|
|
61
|
-
dark?: string;
|
|
62
|
-
showTitle?: boolean;
|
|
63
|
-
rightText?: string;
|
|
64
|
-
} | null;
|
|
65
|
-
}
|
|
66
|
-
interface MigrationFooterConfig {
|
|
67
|
-
socials?: Record<string, string>;
|
|
68
|
-
/** Literal footer attribution; `{year}` is resolved by the site at render time. */
|
|
69
|
-
copyright?: string;
|
|
70
|
-
links?: Array<{
|
|
71
|
-
heading: string;
|
|
72
|
-
items: Array<{
|
|
73
|
-
label: string;
|
|
74
|
-
href: string;
|
|
75
|
-
}>;
|
|
76
|
-
}>;
|
|
77
|
-
}
|
|
78
|
-
interface MigrationDocsConfig {
|
|
79
|
-
markdown?: {
|
|
80
|
-
enabled?: boolean;
|
|
81
|
-
};
|
|
82
|
-
/** Local site-authored CSS projected from a source docs site, served from public/. */
|
|
83
|
-
stylesheets?: Array<string>;
|
|
84
|
-
/** `false` hides the breadcrumb trail; Mintlify pages show only a group eyebrow. */
|
|
85
|
-
breadcrumbs?: boolean;
|
|
86
|
-
tabs: Array<MigrationNavigationTab>;
|
|
87
|
-
navigation?: {
|
|
88
|
-
/** How sibling documentation collections are presented to readers. */
|
|
89
|
-
display?: 'tabs' | 'dropdown';
|
|
90
|
-
versions?: Array<{
|
|
91
|
-
label: string;
|
|
92
|
-
prefix: string;
|
|
93
|
-
href: string;
|
|
94
|
-
default?: boolean;
|
|
95
|
-
hidden?: boolean;
|
|
96
|
-
}>;
|
|
97
|
-
shortcuts?: Array<{
|
|
98
|
-
label: string;
|
|
99
|
-
href: string;
|
|
100
|
-
icon?: string;
|
|
101
|
-
}>;
|
|
102
|
-
};
|
|
103
|
-
theme?: 'default' | 'maple' | 'sharp' | 'minimal';
|
|
104
|
-
appearance?: {
|
|
105
|
-
default?: 'system' | 'light' | 'dark';
|
|
106
|
-
showToggle?: boolean;
|
|
107
|
-
};
|
|
108
|
-
background?: {
|
|
109
|
-
image?: string;
|
|
110
|
-
imageDark?: string;
|
|
111
|
-
decoration?: 'none' | 'grid' | 'gradient';
|
|
112
|
-
};
|
|
113
|
-
/** Icon set for content `icon` names; Mintlify's `icons.library` carries through. */
|
|
114
|
-
contextual?: {
|
|
115
|
-
options?: Array<string>;
|
|
116
|
-
};
|
|
117
|
-
colors?: Partial<Record<'light' | 'dark', {
|
|
118
|
-
primary?: string;
|
|
119
|
-
accent?: string;
|
|
120
|
-
}>>;
|
|
121
|
-
icons?: {
|
|
122
|
-
library?: 'lucide' | 'fontawesome' | 'tabler';
|
|
123
|
-
};
|
|
124
|
-
banner?: MigrationBannerConfig;
|
|
125
|
-
navbar?: MigrationNavbarConfig;
|
|
126
|
-
favicon?: {
|
|
127
|
-
light: string;
|
|
128
|
-
dark?: string;
|
|
129
|
-
};
|
|
130
|
-
footer?: MigrationFooterConfig;
|
|
131
|
-
seo?: {
|
|
132
|
-
indexing?: 'navigable' | 'all';
|
|
133
|
-
titleSeparator?: string;
|
|
134
|
-
sitemap?: 'navigable';
|
|
135
|
-
metatags?: Record<string, string>;
|
|
136
|
-
};
|
|
137
|
-
fonts?: {
|
|
138
|
-
body?: {
|
|
139
|
-
family: string;
|
|
140
|
-
weight?: Array<string>;
|
|
141
|
-
};
|
|
142
|
-
heading?: {
|
|
143
|
-
family: string;
|
|
144
|
-
weight?: Array<string>;
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
feedback?: {
|
|
148
|
-
thumbsRating?: boolean;
|
|
149
|
-
};
|
|
150
|
-
customScripts?: Array<{
|
|
151
|
-
src: string;
|
|
152
|
-
strategy?: 'beforeInteractive' | 'afterInteractive' | 'lazyOnload';
|
|
153
|
-
}>;
|
|
154
|
-
ai?: {
|
|
155
|
-
chat?: boolean;
|
|
156
|
-
label?: string;
|
|
157
|
-
icon?: string;
|
|
158
|
-
};
|
|
159
|
-
admin?: {
|
|
160
|
-
enabled?: boolean;
|
|
161
|
-
};
|
|
162
|
-
analytics?: {
|
|
163
|
-
enabled?: boolean;
|
|
164
|
-
};
|
|
165
|
-
/** Manual API pages: default server(s) and auth for `api:` frontmatter pages. */
|
|
166
|
-
api?: {
|
|
167
|
-
mdx?: {
|
|
168
|
-
server?: string | Array<string>;
|
|
169
|
-
auth?: {
|
|
170
|
-
method?: 'bearer' | 'basic' | 'key';
|
|
171
|
-
name?: string;
|
|
172
|
-
};
|
|
173
|
-
};
|
|
174
|
-
/** Mintlify `api.playground.display`; `auth` is carried as `simple`. */
|
|
175
|
-
playground?: {
|
|
176
|
-
display: 'interactive' | 'simple' | 'none';
|
|
177
|
-
};
|
|
178
|
-
/** `false` hides the visible "OpenAPI specification" line; Mintlify does not show it. */
|
|
179
|
-
specLink?: boolean;
|
|
180
|
-
};
|
|
181
|
-
/** Third-party analytics in Mintlify's `integrations` shape; validated again by the renderer. */
|
|
182
|
-
integrations?: {
|
|
183
|
-
ga4?: {
|
|
184
|
-
measurementId: string;
|
|
185
|
-
};
|
|
186
|
-
gtm?: {
|
|
187
|
-
tagId: string;
|
|
188
|
-
};
|
|
189
|
-
posthog?: {
|
|
190
|
-
apiKey: string;
|
|
191
|
-
apiHost?: string;
|
|
192
|
-
sessionRecording?: boolean;
|
|
193
|
-
};
|
|
194
|
-
plausible?: {
|
|
195
|
-
domain: string;
|
|
196
|
-
server?: string;
|
|
197
|
-
};
|
|
198
|
-
};
|
|
199
|
-
redirects?: Array<{
|
|
200
|
-
source: string;
|
|
201
|
-
destination: string;
|
|
202
|
-
permanent?: boolean;
|
|
203
|
-
}>;
|
|
204
|
-
i18n?: {
|
|
205
|
-
defaultLocale: string;
|
|
206
|
-
locales: Array<{
|
|
207
|
-
code: string;
|
|
208
|
-
label: string;
|
|
209
|
-
}>;
|
|
210
|
-
/** Source-authored navigation labels and ordering for each translation. */
|
|
211
|
-
navigation?: Record<string, Array<MigrationNavigationTab>>;
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
interface MigrationPage {
|
|
215
|
-
/** Path below `src/content`, without the `.mdx` extension. */
|
|
216
|
-
id: string;
|
|
217
|
-
/** Locale-independent page id used by the shared navigation projection. */
|
|
218
|
-
navigationId: string;
|
|
219
|
-
locale?: string;
|
|
220
|
-
title: string;
|
|
221
|
-
navTitle?: string;
|
|
222
|
-
/** Sidebar icon name or image URL from page frontmatter, with its optional style. */
|
|
223
|
-
icon?: string;
|
|
224
|
-
iconType?: 'regular' | 'solid' | 'outline' | 'brands';
|
|
225
|
-
description: string;
|
|
226
|
-
/** Keep SEO/search description without repeating it above Docusaurus body copy. */
|
|
227
|
-
descriptionPlacement?: 'body';
|
|
228
|
-
badge?: string;
|
|
229
|
-
keywords: Array<string>;
|
|
230
|
-
mode?: 'default' | 'wide' | 'custom' | 'center' | 'home';
|
|
231
|
-
hidden?: boolean;
|
|
232
|
-
noindex?: boolean;
|
|
233
|
-
/**
|
|
234
|
-
* Reader access groups (frontmatter `groups`): trimmed, non-empty names the
|
|
235
|
-
* runtime matches exactly. The page needs a signed-in reader in one of them.
|
|
236
|
-
*/
|
|
237
|
-
groups?: Array<string>;
|
|
238
|
-
/** Frontmatter `public`: `true` opens the page to anyone, `false` needs any signed-in reader. */
|
|
239
|
-
public?: boolean;
|
|
240
|
-
/** Social/SEO overrides from `og:*` and `twitter:*` frontmatter, keyed by the migrated frontmatter field. */
|
|
241
|
-
meta?: Partial<Record<'ogTitle' | 'ogDescription' | 'ogImage' | 'twitterTitle' | 'twitterDescription' | 'twitterImage', string>>;
|
|
242
|
-
/** OpenAPI operation key rendered by Thally instead of ordinary MDX. */
|
|
243
|
-
openapi?: string;
|
|
244
|
-
/** Manual API page: `METHOD <url-or-path>`; rendered by Thally's playground. */
|
|
245
|
-
api?: string;
|
|
246
|
-
/** Page-level playground auth override: bearer | basic | key | none. */
|
|
247
|
-
authMethod?: string;
|
|
248
|
-
/** Page-level `playground` override: interactive | simple | none (`auth` becomes `simple`). */
|
|
249
|
-
playground?: 'interactive' | 'simple' | 'none';
|
|
250
|
-
body: string;
|
|
251
|
-
source: string;
|
|
252
|
-
/** Set when the page's frontmatter was invalid YAML; the page is kept with a best-effort salvage. */
|
|
253
|
-
frontmatterError?: string;
|
|
254
|
-
}
|
|
255
|
-
interface MigrationAsset {
|
|
256
|
-
/** Path below `public` (or below the project root when `projectRelative`), always normalized and traversal-free. */
|
|
257
|
-
path: string;
|
|
258
|
-
content: Uint8Array;
|
|
259
|
-
/** Write at the project root instead of `public/`, so the host never serves it statically. */
|
|
260
|
-
projectRelative?: boolean;
|
|
261
|
-
}
|
|
262
|
-
interface MigrationWarning {
|
|
263
|
-
code: 'collision' | 'invalid-page' | 'missing-page' | 'unsupported-config' | 'limit-reached' | 'fetch-failed' | 'skipped-file'
|
|
264
|
-
/** Access-restricted source content: migrated with access rules, withheld (quarantined), or a site-wide auth risk. */
|
|
265
|
-
| 'gated-page';
|
|
266
|
-
message: string;
|
|
267
|
-
source?: string;
|
|
268
|
-
}
|
|
269
|
-
/** A repository-configured remote OpenAPI spec, downloaded after the bundle is built. */
|
|
270
|
-
interface RemoteApiSpec {
|
|
271
|
-
url: string;
|
|
272
|
-
tabLabel?: string;
|
|
273
|
-
parentTab?: string;
|
|
274
|
-
icon?: string;
|
|
275
|
-
hidden?: boolean;
|
|
276
|
-
/** Operation keys (`get /x`) only access-restricted pages document; marked `x-excluded` after download. */
|
|
277
|
-
withheldOperations?: Array<string>;
|
|
278
|
-
/** Operation keys published pages or docs.json also name; keeps a shared `$ref` path item public. */
|
|
279
|
-
keptOperations?: Array<string>;
|
|
280
|
-
}
|
|
281
|
-
interface MigrationBundle {
|
|
282
|
-
sourceUrl: string;
|
|
283
|
-
sourceKind: 'repository' | 'url';
|
|
284
|
-
platform: MigrationPlatform;
|
|
285
|
-
pages: Array<MigrationPage>;
|
|
286
|
-
assets: Array<MigrationAsset>;
|
|
287
|
-
/** Repository-configured remote specs awaiting a bounded network fetch by the host. */
|
|
288
|
-
remoteApiSpecs?: Array<RemoteApiSpec>;
|
|
289
|
-
/** Customer-owned component source and registry; paths are repository-relative. */
|
|
290
|
-
componentFiles?: Array<RenderedMigrationFile>;
|
|
291
|
-
/**
|
|
292
|
-
* Restricted content that cannot be published safely (pages whose access
|
|
293
|
-
* rules are malformed or contradictory, and assets used only by restricted
|
|
294
|
-
* pages), written outside every published path.
|
|
295
|
-
*/
|
|
296
|
-
quarantinedFiles?: Array<RenderedMigrationFile>;
|
|
297
|
-
/** Access-restricted pages the file limit dropped: neither published nor saved in quarantinedFiles. */
|
|
298
|
-
droppedGatedPages?: number;
|
|
299
|
-
/** Mintlify `sourceRef` repositories imported under a mount path, with their page counts. */
|
|
300
|
-
sourceRefs?: Array<{
|
|
301
|
-
repo: string;
|
|
302
|
-
mountPath: string;
|
|
303
|
-
pages: number;
|
|
304
|
-
}>;
|
|
305
|
-
docsConfig: MigrationDocsConfig;
|
|
306
|
-
site?: {
|
|
307
|
-
name?: string;
|
|
308
|
-
description?: string;
|
|
309
|
-
/**
|
|
310
|
-
* Source theme accent color(s), each a `#rrggbb`/`#rgb` hex string.
|
|
311
|
-
* Follows Mintlify's own `colors` schema: `light` is the color used in
|
|
312
|
-
* dark mode and `dark` is the color used in light mode. Fern's colors
|
|
313
|
-
* are normal (its `light`/`dark` match the mode they paint), so
|
|
314
|
-
* extraction swaps them onto this shape for a single downstream contract.
|
|
315
|
-
*/
|
|
316
|
-
colors?: {
|
|
317
|
-
primary?: string;
|
|
318
|
-
light?: string;
|
|
319
|
-
dark?: string;
|
|
320
|
-
};
|
|
321
|
-
};
|
|
322
|
-
warnings: Array<MigrationWarning>;
|
|
323
|
-
stats: {
|
|
324
|
-
discovered: number;
|
|
325
|
-
imported: number;
|
|
326
|
-
skipped: number;
|
|
327
|
-
};
|
|
328
|
-
}
|
|
329
|
-
interface MigrationFetchRequest {
|
|
330
|
-
accept: string;
|
|
331
|
-
}
|
|
332
|
-
interface MigrationFetchResponse {
|
|
333
|
-
finalUrl: URL;
|
|
334
|
-
body: string;
|
|
335
|
-
contentType: string;
|
|
336
|
-
headers?: Record<string, string | undefined>;
|
|
337
|
-
}
|
|
338
|
-
/**
|
|
339
|
-
* Network boundary injected by each host. Thally Cloud supplies a DNS-pinned,
|
|
340
|
-
* SSRF-safe implementation; the local CLI uses the user's normal network.
|
|
341
|
-
*/
|
|
342
|
-
type MigrationFetcher = (url: URL, request: MigrationFetchRequest) => Promise<MigrationFetchResponse>;
|
|
343
|
-
interface RenderedMigrationFile {
|
|
344
|
-
path: string;
|
|
345
|
-
content: string | Uint8Array;
|
|
346
|
-
}
|
|
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-migration-CDjLZVaN.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-migration-CDjLZVaN.js';
|
|
3
|
+
export { isPassiveSvg } from './svg-policy.js';
|
|
347
4
|
|
|
348
5
|
/**
|
|
349
6
|
* Mintlify `sourceRef` navigation nodes mount the docs of another repository
|
|
@@ -570,6 +227,8 @@ interface FernPageDescriptor {
|
|
|
570
227
|
navTitle?: string;
|
|
571
228
|
/** Keep routable pages excluded by Fern's `hidden` navigation flag. */
|
|
572
229
|
hidden?: boolean;
|
|
230
|
+
/** Listed under a docs.yml node that sets `viewers` or `authed`: Fern shows it only to signed-in roles. */
|
|
231
|
+
restricted?: boolean;
|
|
573
232
|
}
|
|
574
233
|
/** One `api:` navigation node, resolved to the name/tab Thally needs to bind its spec. */
|
|
575
234
|
interface FernApiSection {
|
|
@@ -590,11 +249,15 @@ interface FernApiSection {
|
|
|
590
249
|
routeSegments: Array<string>;
|
|
591
250
|
}
|
|
592
251
|
interface FernNavigationResult {
|
|
252
|
+
/** A bounded walk skipped nodes whose access rules and API bindings are unknown. */
|
|
253
|
+
navigationIncomplete: boolean;
|
|
593
254
|
docsConfig: MigrationDocsConfig;
|
|
594
255
|
descriptors: Array<FernPageDescriptor>;
|
|
595
256
|
warnings: Array<MigrationWarning>;
|
|
596
257
|
/** Every `api:` node found in navigation, in document order. A repo can declare several (e.g. a REST and a WebSocket API in separate tabs). */
|
|
597
258
|
apiSections: Array<FernApiSection>;
|
|
259
|
+
/** `api:` nodes under a restricted node; their specs must not be published. */
|
|
260
|
+
restrictedApiSections: Array<FernApiSection>;
|
|
598
261
|
/** Fern changelog tabs render their entries as a feed at the bare route. */
|
|
599
262
|
changelogIndexes: Array<{
|
|
600
263
|
route: string;
|
|
@@ -664,16 +327,6 @@ declare function projectMintlifyIntegrations(config: Record<string, unknown>): {
|
|
|
664
327
|
*/
|
|
665
328
|
declare function validateIntegrations(integrations: unknown): Array<string>;
|
|
666
329
|
|
|
667
|
-
/** Render canonical migration bundles into a portable Thally repository tree. */
|
|
668
|
-
|
|
669
|
-
/** Merge imported tabs into an existing site without duplicating changelog tabs. */
|
|
670
|
-
declare function mergeMigrationConfig(existing: MigrationDocsConfig, incoming: MigrationDocsConfig): MigrationDocsConfig;
|
|
671
|
-
/** Materialize every canonical page, asset, and config as repository file changes. */
|
|
672
|
-
declare function renderMigrationFiles(bundle: MigrationBundle, options?: {
|
|
673
|
-
existingConfig?: MigrationDocsConfig;
|
|
674
|
-
existingComponentRegistry?: string;
|
|
675
|
-
}): Array<RenderedMigrationFile>;
|
|
676
|
-
|
|
677
330
|
/**
|
|
678
331
|
* Public URL adapter for the shared migration engine. Discovery prefers
|
|
679
332
|
* machine-readable Markdown and sitemaps, remains scoped to the submitted docs
|
|
@@ -703,4 +356,4 @@ declare function migrateUrl(options: UrlMigrationOptions): Promise<MigrationBund
|
|
|
703
356
|
*/
|
|
704
357
|
declare function hydrateRemoteApiSpecs(bundle: MigrationBundle, fetcher?: MigrationFetcher): Promise<MigrationBundle>;
|
|
705
358
|
|
|
706
|
-
export { type GitHubRepositorySource,
|
|
359
|
+
export { type GitHubRepositorySource, MigrationAsset, MigrationBundle, MigrationDocsConfig, MigrationFetcher, MigrationNavigationGroup, MigrationPage, MigrationPlatform, MigrationWarning, RenderedMigrationFile, type RepositoryMigrationOptions, SOURCE_REF_MAX_BYTES, SOURCE_REF_MAX_FILES, SOURCE_REF_MAX_REPOSITORY_KB, type SourceRefImport, type SourceRefMapping, type UrlMigrationOptions, addMintlifyDirectoryRedirects, buildNavigationFromPages, cloneGitHubRepository, defaultMigrationFetcher, detectRepositoryDocsDir, detectRepositoryPlatform, gitmodulePaths, hydrateRemoteApiSpecs, importSourceRef, migrateRepository, migrateUrl, normalizeMdx, parseGitHubRepositoryUrl, parseMarkdownPage, parseSourceRefFlags, projectFernNavigation, projectMintlifyIntegrations, projectMintlifyNavigation, pruneMissingNavigationPages, readFernConfig, readMintlifyConfig, sourceRefOversizeReason, validateIntegrations, validateMigrationUrl };
|