@thallylabs/migrate 0.2.9 → 0.2.11
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 +19 -0
- package/dist/index.d.ts +33 -2
- package/dist/index.js +1159 -124
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,6 +26,25 @@ instead of silently dropping that API tab's reference. AsyncAPI has no Thally
|
|
|
26
26
|
renderer, so it always produces a clear warning naming the spec instead of
|
|
27
27
|
disappearing.
|
|
28
28
|
|
|
29
|
+
In-content links to auto-generated API operation pages are rewritten to the
|
|
30
|
+
matching Thally `/api/...` route. A link under a known API section that matches
|
|
31
|
+
no operation points to that section's overview page instead, and one warning
|
|
32
|
+
lists the affected links (up to ten). A Mintlify default version's pages also
|
|
33
|
+
get a redirect from their address without the version segment, since the
|
|
34
|
+
original site serves them both ways.
|
|
35
|
+
|
|
36
|
+
A repository is limited to 5,000 documentation files and, separately, 5,000
|
|
37
|
+
asset files. Past that, files are kept in navigation order with the default
|
|
38
|
+
version first, then pages not listed in navigation, and one warning counts and
|
|
39
|
+
names (the first three of) the pages left out and suggests `--docs-dir` to
|
|
40
|
+
migrate a smaller part of the repository. Scanning itself stops after 100,000
|
|
41
|
+
files with its own warning. Individual assets over 25 MB, or beyond 500 MB in
|
|
42
|
+
total, are not copied and are warned about one by one.
|
|
43
|
+
|
|
44
|
+
Headings written with an explicit `{#custom-id}` become a preceding
|
|
45
|
+
`<a id="custom-id"></a>` anchor and keep their text, so links to that id still
|
|
46
|
+
work and the page still compiles as MDX.
|
|
47
|
+
|
|
29
48
|
Docusaurus sidebars are parsed as bounded, data-only JSON5—never executed—and
|
|
30
49
|
preserve explicit categories, autogenerated slices, document IDs/slugs,
|
|
31
50
|
positions, generated indexes, admonitions, tabs, and `static/` assets where
|
package/dist/index.d.ts
CHANGED
|
@@ -47,12 +47,13 @@ interface MigrationNavbarConfig {
|
|
|
47
47
|
href: string;
|
|
48
48
|
} | null;
|
|
49
49
|
/** Local public assets used until an owner uploads a brand replacement. */
|
|
50
|
+
/** Explicit null requests a text-only brand when the source has no logo. */
|
|
50
51
|
logo?: {
|
|
51
52
|
light: string;
|
|
52
53
|
dark?: string;
|
|
53
54
|
showTitle?: boolean;
|
|
54
55
|
rightText?: string;
|
|
55
|
-
};
|
|
56
|
+
} | null;
|
|
56
57
|
}
|
|
57
58
|
interface MigrationFooterConfig {
|
|
58
59
|
socials?: Record<string, string>;
|
|
@@ -76,6 +77,15 @@ interface MigrationDocsConfig {
|
|
|
76
77
|
display?: 'tabs' | 'dropdown';
|
|
77
78
|
};
|
|
78
79
|
theme?: 'default' | 'maple' | 'sharp' | 'minimal';
|
|
80
|
+
appearance?: {
|
|
81
|
+
default?: 'system' | 'light' | 'dark';
|
|
82
|
+
showToggle?: boolean;
|
|
83
|
+
};
|
|
84
|
+
background?: {
|
|
85
|
+
image?: string;
|
|
86
|
+
imageDark?: string;
|
|
87
|
+
decoration?: 'none' | 'grid' | 'gradient';
|
|
88
|
+
};
|
|
79
89
|
/** Icon set for content `icon` names; Mintlify's `icons.library` carries through. */
|
|
80
90
|
icons?: {
|
|
81
91
|
library?: 'lucide' | 'fontawesome' | 'tabler';
|
|
@@ -149,6 +159,8 @@ interface MigrationPage {
|
|
|
149
159
|
openapi?: string;
|
|
150
160
|
body: string;
|
|
151
161
|
source: string;
|
|
162
|
+
/** Set when the page's frontmatter was invalid YAML; the page is kept with a best-effort salvage. */
|
|
163
|
+
frontmatterError?: string;
|
|
152
164
|
}
|
|
153
165
|
interface MigrationAsset {
|
|
154
166
|
/** Path below `public`, always normalized and traversal-free. */
|
|
@@ -166,6 +178,11 @@ interface MigrationBundle {
|
|
|
166
178
|
platform: MigrationPlatform;
|
|
167
179
|
pages: Array<MigrationPage>;
|
|
168
180
|
assets: Array<MigrationAsset>;
|
|
181
|
+
/** Repository-configured remote specs awaiting a bounded network fetch by the host. */
|
|
182
|
+
remoteApiSpecs?: Array<{
|
|
183
|
+
url: string;
|
|
184
|
+
tabLabel?: string;
|
|
185
|
+
}>;
|
|
169
186
|
/** Customer-owned component source and registry; paths are repository-relative. */
|
|
170
187
|
componentFiles?: Array<RenderedMigrationFile>;
|
|
171
188
|
docsConfig: MigrationDocsConfig;
|
|
@@ -374,6 +391,13 @@ declare function readFernConfig(fernRoot: string): {
|
|
|
374
391
|
declare function projectFernNavigation(input: {
|
|
375
392
|
config: Record<string, unknown>;
|
|
376
393
|
fernRoot: string;
|
|
394
|
+
/**
|
|
395
|
+
* The whole repository checkout — the security boundary for anything a
|
|
396
|
+
* config file references (e.g. a `versions:` file living outside
|
|
397
|
+
* `fern/`). Defaults to `fernRoot` for callers with no wider repository
|
|
398
|
+
* context (e.g. unit tests), which reproduces the previous fernRoot-only
|
|
399
|
+
* confinement.
|
|
400
|
+
*/
|
|
377
401
|
repositoryRoot?: string;
|
|
378
402
|
}): FernNavigationResult;
|
|
379
403
|
|
|
@@ -431,4 +455,11 @@ declare const defaultMigrationFetcher: MigrationFetcher;
|
|
|
431
455
|
/** Crawl one public docs origin into a canonical, caller-independent bundle. */
|
|
432
456
|
declare function migrateUrl(options: UrlMigrationOptions): Promise<MigrationBundle>;
|
|
433
457
|
|
|
434
|
-
|
|
458
|
+
/**
|
|
459
|
+
* Attach safely downloaded specs to the exact authored API tabs. Source links
|
|
460
|
+
* to Mintlify's tag/summary routes receive redirects only when an operation
|
|
461
|
+
* can be identified uniquely; guessing would silently route to wrong APIs.
|
|
462
|
+
*/
|
|
463
|
+
declare function hydrateRemoteApiSpecs(bundle: MigrationBundle, fetcher?: MigrationFetcher): Promise<MigrationBundle>;
|
|
464
|
+
|
|
465
|
+
export { type GitHubRepositorySource, type MigrationAsset, type MigrationBundle, type MigrationDocsConfig, type MigrationFetchRequest, type MigrationFetchResponse, type MigrationFetcher, type MigrationNavigationGroup, type MigrationNavigationTab, type MigrationPage, type MigrationPlatform, type MigrationWarning, type RenderedMigrationFile, type RepositoryMigrationOptions, type UrlMigrationOptions, addMintlifyDirectoryRedirects, buildNavigationFromPages, cloneGitHubRepository, defaultMigrationFetcher, detectRepositoryDocsDir, detectRepositoryPlatform, gitmodulePaths, hydrateRemoteApiSpecs, mergeMigrationConfig, migrateRepository, migrateUrl, normalizeMdx, parseGitHubRepositoryUrl, parseMarkdownPage, projectFernNavigation, projectMintlifyNavigation, pruneMissingNavigationPages, readFernConfig, readMintlifyConfig, renderMigrationFiles, validateMigrationUrl };
|