@thallylabs/migrate 0.2.26 → 0.2.27

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
@@ -115,6 +115,12 @@ Docusaurus `mdx-code-block` wrappers are opened as live MDX when the resulting
115
115
  page compiles and its special fences contain no module declarations. Pages
116
116
  whose fragments still need Docusaurus theme imports or remark plugins remain
117
117
  fenced and are retained.
118
+ Directories and files whose names start with `_`, and `__tests__` directories,
119
+ are skipped, as Docusaurus does not treat them as documents. Pages with `unlisted`
120
+ set stay routable but are left out of navigation. Partial imports of `toc`,
121
+ `frontMatter`, `metadata` and `assets` are bound to values the page can use
122
+ instead of failing. `<Admonition>` becomes a callout like the colon fence, and
123
+ `<ThemedImage>` keeps its light image.
118
124
 
119
125
  Fern repositories are located by their `fern/docs.yml` + `fern/fern.config.json`
120
126
  pair. `docs.yml` is parsed as bounded YAML—never executed—and preserves tabs,
@@ -129,6 +135,8 @@ Internal links are adjusted for the site's domain path, selected version, and
129
135
  source-file routes. Links to sections not imported into Thally stay on the
130
136
  published Fern site and produce a migration warning, so the generated site can
131
137
  build while the remaining content is moved separately.
138
+ `<Markdown src="...">` includes are inlined from the referenced file when it is
139
+ inside the repository.
132
140
  Every `api:` section's OpenAPI document is resolved from its own
133
141
  `generators.yml` (`api.specs[].openapi`, or the legacy `api:` string) and
134
142
  imported into its own tab — a docs.yml with several API sections (e.g. a REST
@@ -357,6 +365,34 @@ and its original is written unchanged to `migration-quarantine/<original path>`
357
365
  at the project root, which no runtime reader walks; `create-thally-docs` adds
358
366
  that folder to `.gitignore`. Each quarantined page gets a `gated-page` warning.
359
367
 
368
+ Fern and Docusaurus have no runtime access mapping in Thally, so their restricted
369
+ pages fail closed in the same way: they are quarantined (not written to
370
+ `src/content`, removed from navigation, original saved under
371
+ `migration-quarantine/`) and never inlined into other pages. Fern signals:
372
+ frontmatter `viewers` (any non-empty value) or `authed`, `<If roles>` or
373
+ `<If viewers>` content in a page, and `viewers` in `docs.yml` on pages, sections,
374
+ tabs, products, versions and api nodes; the specs of a restricted api node are
375
+ withheld too. Docusaurus: a `draft` page, where any value other than unset,
376
+ `false` or `"false"` counts as a draft; the check is skipped for files under `_`
377
+ directories and `__tests__`, which Docusaurus does not publish as documents. Links
378
+ from other pages to a quarantined page are left as authored and will fail
379
+ `thally check`.
380
+
381
+ Fern migration stops with an explicit error if cyclic navigation, excessive
382
+ nesting, or the node budget prevents complete access classification. It emits
383
+ no pages, assets, or API specs, because an unvisited branch could restrict a
384
+ file also listed under a public node. Simplify the source navigation and retry.
385
+
386
+ Assets are copied to `public/` only when a published page, the site configuration,
387
+ copied styles or a migrated component names them by their exact normalized path;
388
+ a restricted page's text never makes an asset public. On a site that withholds
389
+ anything, an asset nothing published names that way, one named only by a bare file
390
+ name or in a different letter case, one built at runtime, and one that shares its
391
+ public path with another file are saved under `migration-quarantine/assets/`
392
+ instead, with a warning listing them so they can be copied back by hand. On every
393
+ platform a page over 2 MB is not inlined, OpenAPI spec reads are capped at 50 MB,
394
+ and a path that resolves outside the repository through a symlink is refused.
395
+
360
396
  What a restricted page uses must not leak through surfaces that are not access
361
397
  controlled: it is never inlined into another page (a `gated-page` warning names
362
398
  the importer), images and other assets used only by restricted pages are not
@@ -395,6 +431,17 @@ Legacy `mint.json` `topbarLinks` and `topbarCtaButton` (including
395
431
 
396
432
  ## Branding
397
433
 
434
+ Docusaurus custom CSS projects Infima palette, typography, header spacing,
435
+ announcement styling, and local Prism colors into a portable stylesheet.
436
+ For Sass or Tailwind expressions, provide locally compiled
437
+ `build/assets/css/styles.*.css`; unresolved expressions produce a migration
438
+ warning. Configuration and theme modules are read as static data.
439
+
440
+ Remote Fern `global-theme` references fall back to local overrides and base
441
+ Thally tokens with a structured warning. The NVIDIA theme uses `#76B900`
442
+ when no local accent is configured. No remote theme assets are fetched.
443
+ Authored section expansion defaults are retained on desktop and mobile.
444
+
398
445
  A source site's logo, favicon, and theme accent color(s) are extracted where
399
446
  each platform's config exposes them (Mintlify's `colors`, Fern's
400
447
  `colors.accent-primary`, Docusaurus's classic theme `customCss`). A valid
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@
5
5
  */
6
6
  type MigrationPlatform = 'mintlify' | 'docusaurus' | 'fern' | 'gitbook' | 'nextra' | 'vitepress' | 'starlight' | 'thally' | 'generic' | 'unknown';
7
7
  interface MigrationNavigationGroup {
8
+ defaultOpen?: boolean;
8
9
  group: string;
9
10
  icon?: string;
10
11
  hidden?: boolean;
@@ -218,6 +219,8 @@ interface MigrationPage {
218
219
  navigationId: string;
219
220
  locale?: string;
220
221
  title: string;
222
+ /** Authored display H1 when the source uses a different metadata title. */
223
+ headingTitle?: string;
221
224
  navTitle?: string;
222
225
  /** Sidebar icon name or image URL from page frontmatter, with its optional style. */
223
226
  icon?: string;
@@ -570,6 +573,8 @@ interface FernPageDescriptor {
570
573
  navTitle?: string;
571
574
  /** Keep routable pages excluded by Fern's `hidden` navigation flag. */
572
575
  hidden?: boolean;
576
+ /** Listed under a docs.yml node that sets `viewers` or `authed`: Fern shows it only to signed-in roles. */
577
+ restricted?: boolean;
573
578
  }
574
579
  /** One `api:` navigation node, resolved to the name/tab Thally needs to bind its spec. */
575
580
  interface FernApiSection {
@@ -590,11 +595,15 @@ interface FernApiSection {
590
595
  routeSegments: Array<string>;
591
596
  }
592
597
  interface FernNavigationResult {
598
+ /** A bounded walk skipped nodes whose access rules and API bindings are unknown. */
599
+ navigationIncomplete: boolean;
593
600
  docsConfig: MigrationDocsConfig;
594
601
  descriptors: Array<FernPageDescriptor>;
595
602
  warnings: Array<MigrationWarning>;
596
603
  /** 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
604
  apiSections: Array<FernApiSection>;
605
+ /** `api:` nodes under a restricted node; their specs must not be published. */
606
+ restrictedApiSections: Array<FernApiSection>;
598
607
  /** Fern changelog tabs render their entries as a feed at the bare route. */
599
608
  changelogIndexes: Array<{
600
609
  route: string;