@thallylabs/migrate 0.2.27 → 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 +50 -0
- package/dist/index.d.ts +4 -360
- package/dist/index.js +1202 -33
- 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
|
@@ -0,0 +1,512 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider-neutral, JSON-safe migration journal. Captures are inert evidence;
|
|
3
|
+
* hosts own network restrictions, browser sessions and durable artifact storage.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
interface MigrationNavigationOccurrence {
|
|
7
|
+
label: string;
|
|
8
|
+
url?: string;
|
|
9
|
+
children?: Array<MigrationNavigationOccurrence>;
|
|
10
|
+
}
|
|
11
|
+
interface MigrationCaptureState {
|
|
12
|
+
id: string;
|
|
13
|
+
/** Human-readable name of a tab/disclosure alternative, never executable code. */
|
|
14
|
+
label: string;
|
|
15
|
+
response: MigrationFetchResponse;
|
|
16
|
+
}
|
|
17
|
+
interface MigrationCapturedAsset {
|
|
18
|
+
url: string;
|
|
19
|
+
contentType: string;
|
|
20
|
+
content: Uint8Array;
|
|
21
|
+
}
|
|
22
|
+
interface MigrationCapture extends MigrationFetchResponse {
|
|
23
|
+
/** Capture adapters expand only safe read-only states; no forms or API actions. */
|
|
24
|
+
states?: Array<MigrationCaptureState>;
|
|
25
|
+
navigation?: Array<MigrationNavigationOccurrence>;
|
|
26
|
+
assets?: Array<MigrationCapturedAsset>;
|
|
27
|
+
locale?: string;
|
|
28
|
+
version?: string;
|
|
29
|
+
/** Durable evidence reference supplied by the host; no embedded credentials. */
|
|
30
|
+
artifactRef?: string;
|
|
31
|
+
}
|
|
32
|
+
interface MigrationCaptureProvider {
|
|
33
|
+
capture(request: {
|
|
34
|
+
url: URL;
|
|
35
|
+
signal?: AbortSignal;
|
|
36
|
+
}): Promise<MigrationCapture>;
|
|
37
|
+
}
|
|
38
|
+
interface MigrationEvidence {
|
|
39
|
+
sha256: string;
|
|
40
|
+
byteLength?: number;
|
|
41
|
+
finalUrl: string;
|
|
42
|
+
contentType: string;
|
|
43
|
+
artifactRef?: string;
|
|
44
|
+
states: Array<{
|
|
45
|
+
id: string;
|
|
46
|
+
label: string;
|
|
47
|
+
sha256: string;
|
|
48
|
+
code?: Array<string>;
|
|
49
|
+
}>;
|
|
50
|
+
/** Exact decoded technical payloads, including whitespace and trailing newlines. */
|
|
51
|
+
code: Array<string>;
|
|
52
|
+
anchors: Array<string>;
|
|
53
|
+
links: Array<string>;
|
|
54
|
+
}
|
|
55
|
+
interface MigrationJournalAsset {
|
|
56
|
+
url: string;
|
|
57
|
+
path: string;
|
|
58
|
+
contentType: string;
|
|
59
|
+
sha256: string;
|
|
60
|
+
/** Base64 keeps checkpoints portable through JSON persistence. */
|
|
61
|
+
base64: string;
|
|
62
|
+
}
|
|
63
|
+
interface UrlMigrationRecord {
|
|
64
|
+
url: string;
|
|
65
|
+
discoveredBy: Array<string>;
|
|
66
|
+
outcome: 'pending' | 'imported' | 'excluded' | 'failed' | 'alias';
|
|
67
|
+
reason?: string;
|
|
68
|
+
aliasOf?: string;
|
|
69
|
+
evidence?: MigrationEvidence;
|
|
70
|
+
page?: MigrationPage;
|
|
71
|
+
pageSha256?: string;
|
|
72
|
+
assets?: Array<MigrationJournalAsset>;
|
|
73
|
+
version?: string;
|
|
74
|
+
issues?: Array<UrlMigrationIssue>;
|
|
75
|
+
}
|
|
76
|
+
interface UrlMigrationCheckpoint {
|
|
77
|
+
schemaVersion: 1;
|
|
78
|
+
converterVersion: string;
|
|
79
|
+
sourceUrl: string;
|
|
80
|
+
scopePath: string;
|
|
81
|
+
captureVersion: string;
|
|
82
|
+
records: Array<UrlMigrationRecord>;
|
|
83
|
+
navigation: Array<MigrationNavigationOccurrence>;
|
|
84
|
+
}
|
|
85
|
+
interface UrlMigrationCheckpointDelta {
|
|
86
|
+
schemaVersion: 1;
|
|
87
|
+
converterVersion: string;
|
|
88
|
+
scopePath: string;
|
|
89
|
+
captureVersion: string;
|
|
90
|
+
sourceUrl: string;
|
|
91
|
+
/** Changed records only, replace by URL. Commit evidence before acknowledging. */
|
|
92
|
+
records: Array<UrlMigrationRecord>;
|
|
93
|
+
navigation?: Array<MigrationNavigationOccurrence>;
|
|
94
|
+
}
|
|
95
|
+
interface UrlMigrationIssue {
|
|
96
|
+
code: 'missing-page' | 'missing-anchor' | 'code-mismatch' | 'asset-failed' | 'unsafe-content' | 'unsupported-component' | 'navigation-missing' | 'collision';
|
|
97
|
+
source: string;
|
|
98
|
+
message: string;
|
|
99
|
+
}
|
|
100
|
+
interface UrlMigrationValidation {
|
|
101
|
+
status: 'passed' | 'partial' | 'cancelled';
|
|
102
|
+
issues: Array<UrlMigrationIssue>;
|
|
103
|
+
counts: Record<UrlMigrationRecord['outcome'], number>;
|
|
104
|
+
}
|
|
105
|
+
interface UrlMigrationRun {
|
|
106
|
+
bundle: MigrationBundle;
|
|
107
|
+
checkpoint: UrlMigrationCheckpoint;
|
|
108
|
+
validation: UrlMigrationValidation;
|
|
109
|
+
/** Hosts resume bounded slices but must review hard scope/budget limits. */
|
|
110
|
+
stopReason?: 'capture-limit' | 'page-limit' | 'byte-limit' | 'cancelled' | 'complete';
|
|
111
|
+
}
|
|
112
|
+
interface UrlMigrationRunOptions {
|
|
113
|
+
sourceUrl: string;
|
|
114
|
+
platform?: MigrationPlatform;
|
|
115
|
+
/** Exact selected path boundary; defaults to the submitted URL directory. */
|
|
116
|
+
scopePath?: string;
|
|
117
|
+
maxPages?: number;
|
|
118
|
+
concurrency?: number;
|
|
119
|
+
batchSize?: number;
|
|
120
|
+
maxTotalBytes?: number;
|
|
121
|
+
fetcher?: MigrationFetcher;
|
|
122
|
+
/** Hosts that inject text fetching must also inject their safe binary boundary. */
|
|
123
|
+
assetFetcher?: (url: URL, signal?: AbortSignal) => Promise<MigrationCapturedAsset>;
|
|
124
|
+
captureProvider?: MigrationCaptureProvider;
|
|
125
|
+
/** Change this when browser/extraction policy changes; prevents stale reuse. */
|
|
126
|
+
captureVersion?: string;
|
|
127
|
+
checkpoint?: UrlMigrationCheckpoint;
|
|
128
|
+
signal?: AbortSignal;
|
|
129
|
+
/** Stop after this many captures and return a resumable partial result. */
|
|
130
|
+
maxCaptures?: number;
|
|
131
|
+
/** Retry transient failures by default; imported records still require hashes. */
|
|
132
|
+
retryFailed?: boolean;
|
|
133
|
+
/** Reconcile durable artifacts; false requeues a previously committed record. */
|
|
134
|
+
reconcile?: (record: UrlMigrationRecord) => Promise<boolean>;
|
|
135
|
+
/** Bounded deltas avoid serializing the whole inventory after every page. */
|
|
136
|
+
onCheckpoint?: (delta: UrlMigrationCheckpointDelta) => Promise<void>;
|
|
137
|
+
/** Stream evidence/output to durable storage before a record is committed. */
|
|
138
|
+
onRecord?: (record: UrlMigrationRecord) => Promise<void>;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Canonical migration contracts shared by repository, CLI, MCP, and hosted
|
|
143
|
+
* import paths. Callers materialize this bundle only after discovery and
|
|
144
|
+
* normalization finish, so a partial crawl can never leave a half-written site.
|
|
145
|
+
*/
|
|
146
|
+
type MigrationPlatform = 'mintlify' | 'docusaurus' | 'fern' | 'gitbook' | 'nextra' | 'vitepress' | 'starlight' | 'thally' | 'generic' | 'unknown';
|
|
147
|
+
interface MigrationNavigationGroup {
|
|
148
|
+
defaultOpen?: boolean;
|
|
149
|
+
group: string;
|
|
150
|
+
icon?: string;
|
|
151
|
+
hidden?: boolean;
|
|
152
|
+
pages: Array<string | MigrationNavigationGroup>;
|
|
153
|
+
}
|
|
154
|
+
interface MigrationNavigationTab {
|
|
155
|
+
tab: string;
|
|
156
|
+
/** Reader-facing label when `tab` includes a version for unique identity. */
|
|
157
|
+
displayLabel?: string;
|
|
158
|
+
version?: string;
|
|
159
|
+
description?: string;
|
|
160
|
+
icon?: string;
|
|
161
|
+
href?: string;
|
|
162
|
+
hidden?: boolean;
|
|
163
|
+
/** Root page/group nodes used when the source has no synthetic section heading. */
|
|
164
|
+
pages?: Array<string | MigrationNavigationGroup>;
|
|
165
|
+
groups?: Array<MigrationNavigationGroup>;
|
|
166
|
+
api?: {
|
|
167
|
+
source: string;
|
|
168
|
+
navigation?: boolean;
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
interface MigrationBannerConfig {
|
|
172
|
+
content: string | Record<string, string>;
|
|
173
|
+
dismissible?: boolean;
|
|
174
|
+
id?: string;
|
|
175
|
+
revision?: string;
|
|
176
|
+
type?: 'info' | 'warning' | 'critical';
|
|
177
|
+
color?: {
|
|
178
|
+
light?: string;
|
|
179
|
+
dark?: string;
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
interface MigrationNavbarConfig {
|
|
183
|
+
links?: Array<{
|
|
184
|
+
label: string;
|
|
185
|
+
href: string;
|
|
186
|
+
type?: 'github';
|
|
187
|
+
button?: {
|
|
188
|
+
background: string;
|
|
189
|
+
color?: string;
|
|
190
|
+
};
|
|
191
|
+
}>;
|
|
192
|
+
/** Explicit null suppresses the starter's sample call to action. */
|
|
193
|
+
primary?: {
|
|
194
|
+
label: string;
|
|
195
|
+
href: string;
|
|
196
|
+
type?: 'github';
|
|
197
|
+
} | null;
|
|
198
|
+
/** Local public assets used until an owner uploads a brand replacement. */
|
|
199
|
+
/** Explicit null requests a text-only brand when the source has no logo. */
|
|
200
|
+
logo?: {
|
|
201
|
+
light: string;
|
|
202
|
+
dark?: string;
|
|
203
|
+
showTitle?: boolean;
|
|
204
|
+
rightText?: string;
|
|
205
|
+
} | null;
|
|
206
|
+
}
|
|
207
|
+
interface MigrationFooterConfig {
|
|
208
|
+
socials?: Record<string, string>;
|
|
209
|
+
/** Literal footer attribution; `{year}` is resolved by the site at render time. */
|
|
210
|
+
copyright?: string;
|
|
211
|
+
links?: Array<{
|
|
212
|
+
heading: string;
|
|
213
|
+
items: Array<{
|
|
214
|
+
label: string;
|
|
215
|
+
href: string;
|
|
216
|
+
}>;
|
|
217
|
+
}>;
|
|
218
|
+
}
|
|
219
|
+
interface MigrationDocsConfig {
|
|
220
|
+
markdown?: {
|
|
221
|
+
enabled?: boolean;
|
|
222
|
+
};
|
|
223
|
+
/** Local site-authored CSS projected from a source docs site, served from public/. */
|
|
224
|
+
stylesheets?: Array<string>;
|
|
225
|
+
/** `false` hides the breadcrumb trail; Mintlify pages show only a group eyebrow. */
|
|
226
|
+
breadcrumbs?: boolean;
|
|
227
|
+
tabs: Array<MigrationNavigationTab>;
|
|
228
|
+
navigation?: {
|
|
229
|
+
/** How sibling documentation collections are presented to readers. */
|
|
230
|
+
display?: 'tabs' | 'dropdown';
|
|
231
|
+
versions?: Array<{
|
|
232
|
+
label: string;
|
|
233
|
+
prefix: string;
|
|
234
|
+
href: string;
|
|
235
|
+
default?: boolean;
|
|
236
|
+
hidden?: boolean;
|
|
237
|
+
}>;
|
|
238
|
+
shortcuts?: Array<{
|
|
239
|
+
label: string;
|
|
240
|
+
href: string;
|
|
241
|
+
icon?: string;
|
|
242
|
+
}>;
|
|
243
|
+
};
|
|
244
|
+
theme?: 'default' | 'maple' | 'sharp' | 'minimal';
|
|
245
|
+
appearance?: {
|
|
246
|
+
default?: 'system' | 'light' | 'dark';
|
|
247
|
+
showToggle?: boolean;
|
|
248
|
+
};
|
|
249
|
+
background?: {
|
|
250
|
+
image?: string;
|
|
251
|
+
imageDark?: string;
|
|
252
|
+
decoration?: 'none' | 'grid' | 'gradient';
|
|
253
|
+
};
|
|
254
|
+
/** Icon set for content `icon` names; Mintlify's `icons.library` carries through. */
|
|
255
|
+
contextual?: {
|
|
256
|
+
options?: Array<string>;
|
|
257
|
+
};
|
|
258
|
+
colors?: Partial<Record<'light' | 'dark', {
|
|
259
|
+
primary?: string;
|
|
260
|
+
accent?: string;
|
|
261
|
+
}>>;
|
|
262
|
+
icons?: {
|
|
263
|
+
library?: 'lucide' | 'fontawesome' | 'tabler';
|
|
264
|
+
};
|
|
265
|
+
banner?: MigrationBannerConfig;
|
|
266
|
+
navbar?: MigrationNavbarConfig;
|
|
267
|
+
favicon?: {
|
|
268
|
+
light: string;
|
|
269
|
+
dark?: string;
|
|
270
|
+
};
|
|
271
|
+
footer?: MigrationFooterConfig;
|
|
272
|
+
seo?: {
|
|
273
|
+
indexing?: 'navigable' | 'all';
|
|
274
|
+
titleSeparator?: string;
|
|
275
|
+
sitemap?: 'navigable';
|
|
276
|
+
metatags?: Record<string, string>;
|
|
277
|
+
};
|
|
278
|
+
fonts?: {
|
|
279
|
+
body?: {
|
|
280
|
+
family: string;
|
|
281
|
+
weight?: Array<string>;
|
|
282
|
+
};
|
|
283
|
+
heading?: {
|
|
284
|
+
family: string;
|
|
285
|
+
weight?: Array<string>;
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
feedback?: {
|
|
289
|
+
thumbsRating?: boolean;
|
|
290
|
+
};
|
|
291
|
+
customScripts?: Array<{
|
|
292
|
+
src: string;
|
|
293
|
+
strategy?: 'beforeInteractive' | 'afterInteractive' | 'lazyOnload';
|
|
294
|
+
}>;
|
|
295
|
+
ai?: {
|
|
296
|
+
chat?: boolean;
|
|
297
|
+
label?: string;
|
|
298
|
+
icon?: string;
|
|
299
|
+
};
|
|
300
|
+
admin?: {
|
|
301
|
+
enabled?: boolean;
|
|
302
|
+
};
|
|
303
|
+
analytics?: {
|
|
304
|
+
enabled?: boolean;
|
|
305
|
+
};
|
|
306
|
+
/** Manual API pages: default server(s) and auth for `api:` frontmatter pages. */
|
|
307
|
+
api?: {
|
|
308
|
+
mdx?: {
|
|
309
|
+
server?: string | Array<string>;
|
|
310
|
+
auth?: {
|
|
311
|
+
method?: 'bearer' | 'basic' | 'key';
|
|
312
|
+
name?: string;
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
/** Mintlify `api.playground.display`; `auth` is carried as `simple`. */
|
|
316
|
+
playground?: {
|
|
317
|
+
display: 'interactive' | 'simple' | 'none';
|
|
318
|
+
};
|
|
319
|
+
/** `false` hides the visible "OpenAPI specification" line; Mintlify does not show it. */
|
|
320
|
+
specLink?: boolean;
|
|
321
|
+
};
|
|
322
|
+
/** Third-party analytics in Mintlify's `integrations` shape; validated again by the renderer. */
|
|
323
|
+
integrations?: {
|
|
324
|
+
ga4?: {
|
|
325
|
+
measurementId: string;
|
|
326
|
+
};
|
|
327
|
+
gtm?: {
|
|
328
|
+
tagId: string;
|
|
329
|
+
};
|
|
330
|
+
posthog?: {
|
|
331
|
+
apiKey: string;
|
|
332
|
+
apiHost?: string;
|
|
333
|
+
sessionRecording?: boolean;
|
|
334
|
+
};
|
|
335
|
+
plausible?: {
|
|
336
|
+
domain: string;
|
|
337
|
+
server?: string;
|
|
338
|
+
};
|
|
339
|
+
};
|
|
340
|
+
redirects?: Array<{
|
|
341
|
+
source: string;
|
|
342
|
+
destination: string;
|
|
343
|
+
permanent?: boolean;
|
|
344
|
+
}>;
|
|
345
|
+
i18n?: {
|
|
346
|
+
defaultLocale: string;
|
|
347
|
+
locales: Array<{
|
|
348
|
+
code: string;
|
|
349
|
+
label: string;
|
|
350
|
+
}>;
|
|
351
|
+
/** Source-authored navigation labels and ordering for each translation. */
|
|
352
|
+
navigation?: Record<string, Array<MigrationNavigationTab>>;
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
interface MigrationPage {
|
|
356
|
+
/** Path below `src/content`, without the `.mdx` extension. */
|
|
357
|
+
id: string;
|
|
358
|
+
/** Locale-independent page id used by the shared navigation projection. */
|
|
359
|
+
navigationId: string;
|
|
360
|
+
locale?: string;
|
|
361
|
+
title: string;
|
|
362
|
+
/** Authored display H1 when the source uses a different metadata title. */
|
|
363
|
+
headingTitle?: string;
|
|
364
|
+
navTitle?: string;
|
|
365
|
+
/** Sidebar icon name or image URL from page frontmatter, with its optional style. */
|
|
366
|
+
icon?: string;
|
|
367
|
+
iconType?: 'regular' | 'solid' | 'outline' | 'brands';
|
|
368
|
+
description: string;
|
|
369
|
+
/** Keep SEO/search description without repeating it above Docusaurus body copy. */
|
|
370
|
+
descriptionPlacement?: 'body';
|
|
371
|
+
badge?: string;
|
|
372
|
+
keywords: Array<string>;
|
|
373
|
+
mode?: 'default' | 'wide' | 'custom' | 'center' | 'home';
|
|
374
|
+
hidden?: boolean;
|
|
375
|
+
noindex?: boolean;
|
|
376
|
+
/**
|
|
377
|
+
* Reader access groups (frontmatter `groups`): trimmed, non-empty names the
|
|
378
|
+
* runtime matches exactly. The page needs a signed-in reader in one of them.
|
|
379
|
+
*/
|
|
380
|
+
groups?: Array<string>;
|
|
381
|
+
/** Frontmatter `public`: `true` opens the page to anyone, `false` needs any signed-in reader. */
|
|
382
|
+
public?: boolean;
|
|
383
|
+
/** Social/SEO overrides from `og:*` and `twitter:*` frontmatter, keyed by the migrated frontmatter field. */
|
|
384
|
+
meta?: Partial<Record<'ogTitle' | 'ogDescription' | 'ogImage' | 'twitterTitle' | 'twitterDescription' | 'twitterImage', string>>;
|
|
385
|
+
/** OpenAPI operation key rendered by Thally instead of ordinary MDX. */
|
|
386
|
+
openapi?: string;
|
|
387
|
+
/** Manual API page: `METHOD <url-or-path>`; rendered by Thally's playground. */
|
|
388
|
+
api?: string;
|
|
389
|
+
/** Page-level playground auth override: bearer | basic | key | none. */
|
|
390
|
+
authMethod?: string;
|
|
391
|
+
/** Page-level `playground` override: interactive | simple | none (`auth` becomes `simple`). */
|
|
392
|
+
playground?: 'interactive' | 'simple' | 'none';
|
|
393
|
+
body: string;
|
|
394
|
+
source: string;
|
|
395
|
+
/** Set when the page's frontmatter was invalid YAML; the page is kept with a best-effort salvage. */
|
|
396
|
+
frontmatterError?: string;
|
|
397
|
+
}
|
|
398
|
+
interface MigrationAsset {
|
|
399
|
+
/** Path below `public` (or below the project root when `projectRelative`), always normalized and traversal-free. */
|
|
400
|
+
path: string;
|
|
401
|
+
content: Uint8Array;
|
|
402
|
+
/** Write at the project root instead of `public/`, so the host never serves it statically. */
|
|
403
|
+
projectRelative?: boolean;
|
|
404
|
+
}
|
|
405
|
+
interface MigrationWarning {
|
|
406
|
+
code: 'collision' | 'invalid-page' | 'missing-page' | 'unsupported-config' | 'limit-reached' | 'fetch-failed' | 'skipped-file'
|
|
407
|
+
/** Access-restricted source content: migrated with access rules, withheld (quarantined), or a site-wide auth risk. */
|
|
408
|
+
| 'gated-page';
|
|
409
|
+
message: string;
|
|
410
|
+
source?: string;
|
|
411
|
+
}
|
|
412
|
+
/** A repository-configured remote OpenAPI spec, downloaded after the bundle is built. */
|
|
413
|
+
interface RemoteApiSpec {
|
|
414
|
+
url: string;
|
|
415
|
+
tabLabel?: string;
|
|
416
|
+
parentTab?: string;
|
|
417
|
+
icon?: string;
|
|
418
|
+
hidden?: boolean;
|
|
419
|
+
/** Operation keys (`get /x`) only access-restricted pages document; marked `x-excluded` after download. */
|
|
420
|
+
withheldOperations?: Array<string>;
|
|
421
|
+
/** Operation keys published pages or docs.json also name; keeps a shared `$ref` path item public. */
|
|
422
|
+
keptOperations?: Array<string>;
|
|
423
|
+
}
|
|
424
|
+
interface MigrationBundle {
|
|
425
|
+
sourceUrl: string;
|
|
426
|
+
sourceKind: 'repository' | 'url';
|
|
427
|
+
platform: MigrationPlatform;
|
|
428
|
+
pages: Array<MigrationPage>;
|
|
429
|
+
assets: Array<MigrationAsset>;
|
|
430
|
+
/** Repository-configured remote specs awaiting a bounded network fetch by the host. */
|
|
431
|
+
remoteApiSpecs?: Array<RemoteApiSpec>;
|
|
432
|
+
/** Customer-owned component source and registry; paths are repository-relative. */
|
|
433
|
+
componentFiles?: Array<RenderedMigrationFile>;
|
|
434
|
+
/**
|
|
435
|
+
* Restricted content that cannot be published safely (pages whose access
|
|
436
|
+
* rules are malformed or contradictory, and assets used only by restricted
|
|
437
|
+
* pages), written outside every published path.
|
|
438
|
+
*/
|
|
439
|
+
quarantinedFiles?: Array<RenderedMigrationFile>;
|
|
440
|
+
/** Access-restricted pages the file limit dropped: neither published nor saved in quarantinedFiles. */
|
|
441
|
+
droppedGatedPages?: number;
|
|
442
|
+
/** Mintlify `sourceRef` repositories imported under a mount path, with their page counts. */
|
|
443
|
+
sourceRefs?: Array<{
|
|
444
|
+
repo: string;
|
|
445
|
+
mountPath: string;
|
|
446
|
+
pages: number;
|
|
447
|
+
}>;
|
|
448
|
+
docsConfig: MigrationDocsConfig;
|
|
449
|
+
site?: {
|
|
450
|
+
name?: string;
|
|
451
|
+
description?: string;
|
|
452
|
+
/**
|
|
453
|
+
* Source theme accent color(s), each a `#rrggbb`/`#rgb` hex string.
|
|
454
|
+
* Follows Mintlify's own `colors` schema: `light` is the color used in
|
|
455
|
+
* dark mode and `dark` is the color used in light mode. Fern's colors
|
|
456
|
+
* are normal (its `light`/`dark` match the mode they paint), so
|
|
457
|
+
* extraction swaps them onto this shape for a single downstream contract.
|
|
458
|
+
*/
|
|
459
|
+
colors?: {
|
|
460
|
+
primary?: string;
|
|
461
|
+
light?: string;
|
|
462
|
+
dark?: string;
|
|
463
|
+
};
|
|
464
|
+
};
|
|
465
|
+
warnings: Array<MigrationWarning>;
|
|
466
|
+
/** Evidence checks are independent of whether generated site code builds. */
|
|
467
|
+
urlMigrationValidation?: UrlMigrationValidation;
|
|
468
|
+
stats: {
|
|
469
|
+
discovered: number;
|
|
470
|
+
imported: number;
|
|
471
|
+
skipped: number;
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
interface MigrationFetchRequest {
|
|
475
|
+
accept: string;
|
|
476
|
+
}
|
|
477
|
+
interface MigrationFetchResponse {
|
|
478
|
+
finalUrl: URL;
|
|
479
|
+
body: string;
|
|
480
|
+
contentType: string;
|
|
481
|
+
/** Capture adapters should retain target errors even when provider calls succeed. */
|
|
482
|
+
status?: number;
|
|
483
|
+
headers?: Record<string, string | undefined>;
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* Network boundary injected by each host. Thally Cloud supplies a DNS-pinned,
|
|
487
|
+
* SSRF-safe implementation; the local CLI uses the user's normal network.
|
|
488
|
+
*/
|
|
489
|
+
type MigrationFetcher = (url: URL, request: MigrationFetchRequest) => Promise<MigrationFetchResponse>;
|
|
490
|
+
interface RenderedMigrationFile {
|
|
491
|
+
path: string;
|
|
492
|
+
content: string | Uint8Array;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/** Render canonical migration bundles into a portable Thally repository tree. */
|
|
496
|
+
|
|
497
|
+
/** Merge imported tabs into an existing site without duplicating changelog tabs. */
|
|
498
|
+
declare function mergeMigrationConfig(existing: MigrationDocsConfig, incoming: MigrationDocsConfig): MigrationDocsConfig;
|
|
499
|
+
/** Materialize every canonical page, asset, and config as repository file changes. */
|
|
500
|
+
declare function renderMigrationFiles(bundle: MigrationBundle, options?: {
|
|
501
|
+
existingConfig?: MigrationDocsConfig;
|
|
502
|
+
existingComponentRegistry?: string;
|
|
503
|
+
}): Array<RenderedMigrationFile>;
|
|
504
|
+
|
|
505
|
+
/** Classify using the final response; an index must never become article text. */
|
|
506
|
+
declare function classifyMigrationResponse(document: MigrationFetchResponse): 'page' | 'index' | 'asset' | 'unsupported';
|
|
507
|
+
/** Validate every selected outcome, source payload, internal destination and anchor. */
|
|
508
|
+
declare function validateUrlMigration(checkpoint: UrlMigrationCheckpoint, cancelled?: boolean): UrlMigrationValidation;
|
|
509
|
+
/** Run capture/conversion in bounded batches and resume only reconciled artifacts. */
|
|
510
|
+
declare function runUrlMigration(options: UrlMigrationRunOptions): Promise<UrlMigrationRun>;
|
|
511
|
+
|
|
512
|
+
export { runUrlMigration as A, validateUrlMigration as B, type MigrationPage as M, type RenderedMigrationFile as R, type UrlMigrationCheckpoint as U, type MigrationAsset as a, type MigrationNavigationGroup as b, type MigrationWarning as c, type MigrationFetcher as d, type MigrationPlatform as e, type MigrationBundle as f, type MigrationDocsConfig as g, type MigrationCapture as h, type MigrationCaptureProvider as i, type MigrationCaptureState as j, type MigrationCapturedAsset as k, type MigrationEvidence as l, type MigrationFetchRequest as m, type MigrationFetchResponse as n, type MigrationJournalAsset as o, type MigrationNavigationOccurrence as p, type MigrationNavigationTab as q, type UrlMigrationCheckpointDelta as r, type UrlMigrationIssue as s, type UrlMigrationRecord as t, type UrlMigrationRun as u, type UrlMigrationRunOptions as v, type UrlMigrationValidation as w, classifyMigrationResponse as x, mergeMigrationConfig as y, renderMigrationFiles as z };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { a as MigrationAsset, f as MigrationBundle, h as MigrationCapture, i as MigrationCaptureProvider, j as MigrationCaptureState, k as MigrationCapturedAsset, g as MigrationDocsConfig, l as MigrationEvidence, m as MigrationFetchRequest, n as MigrationFetchResponse, d as MigrationFetcher, o as MigrationJournalAsset, b as MigrationNavigationGroup, p as MigrationNavigationOccurrence, q as MigrationNavigationTab, M as MigrationPage, e as MigrationPlatform, c as MigrationWarning, R as RenderedMigrationFile, U as UrlMigrationCheckpoint, r as UrlMigrationCheckpointDelta, s as UrlMigrationIssue, t as UrlMigrationRecord, u as UrlMigrationRun, v as UrlMigrationRunOptions, w as UrlMigrationValidation, x as classifyMigrationResponse, z as renderMigrationFiles, A as runUrlMigration, B as validateUrlMigration } from './url-migration-CDjLZVaN.js';
|