@thallylabs/migrate 0.2.14 → 0.2.17
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 +20 -1
- package/dist/index.js +732 -125
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -245,6 +245,56 @@ YouTube-embed package (e.g. a custom `LiteYouTube` wrapping
|
|
|
245
245
|
page that imports that package directly, instead of losing the embed to the
|
|
246
246
|
generic unknown-component fallback.
|
|
247
247
|
|
|
248
|
+
### Access-restricted pages
|
|
249
|
+
|
|
250
|
+
A gated Mintlify page must never migrate as public. A page is withheld when its
|
|
251
|
+
frontmatter sets a non-empty `groups` (list or string) or `public: false`
|
|
252
|
+
(also `"false"`, `no`, `off`, `0`; empty `groups` restricts nothing), or when it sits
|
|
253
|
+
under a navigation group or tab that sets `groups` (a list of strings) or
|
|
254
|
+
`public: false`. `public: true` alone is not gating. Withheld pages are not
|
|
255
|
+
written to `src/content` and are removed from navigation (emptied groups and
|
|
256
|
+
tabs included), whether or not navigation lists them. The original file is
|
|
257
|
+
written unchanged to `migration-quarantine/<original path>` at the project
|
|
258
|
+
root, which no runtime content reader, search index, or `llms` output walks;
|
|
259
|
+
`create-thally-docs` also adds it to the project's `.gitignore` (appended once,
|
|
260
|
+
existing entries kept) so it is never committed or pushed. A public page that
|
|
261
|
+
imports a withheld page as a component does not inline it (a `gated-page`
|
|
262
|
+
warning names the importer). Invalid frontmatter fails the run rather than
|
|
263
|
+
importing the page. Each page gets a
|
|
264
|
+
`gated-page` warning, plus a summary; `create-thally-docs` prints these last
|
|
265
|
+
under an "ACCESS-RESTRICTED CONTENT" heading and the report records them and a
|
|
266
|
+
`quarantined` count. Links from other pages to a withheld page are left as
|
|
267
|
+
authored and will fail `thally check`; images and other assets used only by
|
|
268
|
+
gated pages are still copied to `public/`. Mintlify's site-wide authentication mode lives in its
|
|
269
|
+
dashboard and cannot be read from a repository, so when any page sets
|
|
270
|
+
`public: true` (which implies the source site required sign-in for everything
|
|
271
|
+
else) one `gated-page` warning says Thally will publish every imported page.
|
|
272
|
+
Restricted-container `groups` and `public: false` are honored fail-closed even
|
|
273
|
+
though Mintlify documents only `"public": true` on a group.
|
|
274
|
+
|
|
275
|
+
### Site-wide scripts, styles, fonts, and settings
|
|
276
|
+
|
|
277
|
+
Mintlify serves every `.css` and `.js` file in the content directory on every
|
|
278
|
+
page. Those files are copied to `public/` (tooling config such as
|
|
279
|
+
`*.config.js`, `tailwind.*`, `postcss.*`, plus `dist`/`build`/`coverage`
|
|
280
|
+
output, dot-directories, and `node_modules` are not) under the normal asset
|
|
281
|
+
size limits. Scripts are added to `docs.json` `customScripts` (URL-encoded),
|
|
282
|
+
except modules that pages import as components, which are copied as components
|
|
283
|
+
instead. Thally cannot
|
|
284
|
+
load a stylesheet from `docs.json`, so each `.css` is preserved with a warning
|
|
285
|
+
that it is not applied and likely targets Mintlify's DOM. Fonts named by
|
|
286
|
+
`fonts.source` (top level, `heading`, `body`) that are local `.woff`, `.woff2`,
|
|
287
|
+
`.ttf`, or `.otf` files are copied; Thally's `fonts` setting loads Google Fonts
|
|
288
|
+
by family only, so a warning says the file is not applied. Remote font URLs
|
|
289
|
+
are not downloaded, and unsafe or missing paths are warned about.
|
|
290
|
+
|
|
291
|
+
Legacy `mint.json` `topbarLinks` and `topbarCtaButton` (including
|
|
292
|
+
`type: github`) map to `navbar.links` and `navbar.primary`; `docs.json`
|
|
293
|
+
`navbar` fields win, with a warning. `appearance.default`, `appearance.strict`
|
|
294
|
+
(`showToggle: false`), and legacy `modeToggle.default` / `isHidden` map to
|
|
295
|
+
`appearance`; invalid values are skipped with a warning. Mintlify sources set
|
|
296
|
+
`markdown.enabled: true`, matching Mintlify's default Markdown mirrors.
|
|
297
|
+
|
|
248
298
|
## Branding
|
|
249
299
|
|
|
250
300
|
A source site's logo, favicon, and theme accent color(s) are extracted where
|
package/dist/index.d.ts
CHANGED
|
@@ -113,6 +113,10 @@ interface MigrationDocsConfig {
|
|
|
113
113
|
feedback?: {
|
|
114
114
|
thumbsRating?: boolean;
|
|
115
115
|
};
|
|
116
|
+
customScripts?: Array<{
|
|
117
|
+
src: string;
|
|
118
|
+
strategy?: 'beforeInteractive' | 'afterInteractive' | 'lazyOnload';
|
|
119
|
+
}>;
|
|
116
120
|
ai?: {
|
|
117
121
|
chat?: boolean;
|
|
118
122
|
label?: string;
|
|
@@ -170,7 +174,9 @@ interface MigrationAsset {
|
|
|
170
174
|
projectRelative?: boolean;
|
|
171
175
|
}
|
|
172
176
|
interface MigrationWarning {
|
|
173
|
-
code: 'collision' | 'invalid-page' | 'missing-page' | 'unsupported-config' | 'limit-reached' | 'fetch-failed' | 'skipped-file'
|
|
177
|
+
code: 'collision' | 'invalid-page' | 'missing-page' | 'unsupported-config' | 'limit-reached' | 'fetch-failed' | 'skipped-file'
|
|
178
|
+
/** Access-restricted source page withheld from the published site (or a site-wide auth risk). */
|
|
179
|
+
| 'gated-page';
|
|
174
180
|
message: string;
|
|
175
181
|
source?: string;
|
|
176
182
|
}
|
|
@@ -190,6 +196,10 @@ interface MigrationBundle {
|
|
|
190
196
|
}>;
|
|
191
197
|
/** Customer-owned component source and registry; paths are repository-relative. */
|
|
192
198
|
componentFiles?: Array<RenderedMigrationFile>;
|
|
199
|
+
/** Access-restricted source pages, written outside every published path. */
|
|
200
|
+
quarantinedFiles?: Array<RenderedMigrationFile>;
|
|
201
|
+
/** Access-restricted pages the file limit dropped: neither published nor saved in quarantinedFiles. */
|
|
202
|
+
droppedGatedPages?: number;
|
|
193
203
|
docsConfig: MigrationDocsConfig;
|
|
194
204
|
site?: {
|
|
195
205
|
name?: string;
|
|
@@ -265,6 +275,8 @@ interface RepositoryMigrationOptions {
|
|
|
265
275
|
docusaurusSidebarPath?: string;
|
|
266
276
|
/** @internal Static assets are shared across docs-plugin instances. */
|
|
267
277
|
docusaurusSkipAssets?: boolean;
|
|
278
|
+
/** @internal Test seam: lowers the 5,000-file budget so budget behaviour can be exercised with small fixtures. */
|
|
279
|
+
maxSourceFiles?: number;
|
|
268
280
|
/** @internal Redirects are global config, read once, not per plugin instance. */
|
|
269
281
|
docusaurusSkipRedirects?: boolean;
|
|
270
282
|
}
|
|
@@ -303,9 +315,16 @@ interface MintlifyPageReference {
|
|
|
303
315
|
navigationId: string;
|
|
304
316
|
locale?: string;
|
|
305
317
|
}
|
|
318
|
+
/** A page listed under an access-restricted navigation container. */
|
|
319
|
+
interface MintlifyGatedReference {
|
|
320
|
+
ref: string;
|
|
321
|
+
reason: string;
|
|
322
|
+
}
|
|
306
323
|
interface MintlifyNavigationResult {
|
|
307
324
|
docsConfig: MigrationDocsConfig;
|
|
308
325
|
pageReferences: Array<MintlifyPageReference>;
|
|
326
|
+
/** Pages under a restricted container; withheld from `docsConfig` and `pageReferences`. */
|
|
327
|
+
gatedReferences: Array<MintlifyGatedReference>;
|
|
309
328
|
warnings: Array<MigrationWarning>;
|
|
310
329
|
}
|
|
311
330
|
interface MintlifyProjectionOptions {
|