@thallylabs/migrate 0.2.45 → 0.2.47
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/dist/index.js +25 -2
- package/dist/index.js.map +1 -1
- package/dist/url-migration.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6395,7 +6395,7 @@ function projectedCompatibleConfig(config, warnings, shortcutSources) {
|
|
|
6395
6395
|
const feedback = objectValue2(config.feedback);
|
|
6396
6396
|
const seo = objectValue2(config.seo);
|
|
6397
6397
|
const contextualOptions = Array.isArray(objectValue2(config.contextual)?.options) ? objectValue2(config.contextual).options : [];
|
|
6398
|
-
const projectedContextual = contextualOptions.filter((option) => typeof option === "string" && ["copy", "view", "chatgpt", "claude", "perplexity"].includes(option));
|
|
6398
|
+
const projectedContextual = contextualOptions.filter((option) => typeof option === "string" && ["copy", "view", "chatgpt", "claude", "perplexity", "llms-full", "mcp", "cursor", "vscode"].includes(option));
|
|
6399
6399
|
const droppedContextual = contextualOptions.filter((option) => !projectedContextual.includes(option));
|
|
6400
6400
|
if (droppedContextual.length > 0) {
|
|
6401
6401
|
warnings.push({ code: "unsupported-config", message: `contextual.options entries not supported by the page menu were dropped: ${droppedContextual.map((option) => typeof option === "string" ? option : "custom entry").join(", ")}.`, source: "docs.json" });
|
|
@@ -8423,6 +8423,19 @@ function staticStringField(source, name, bindings) {
|
|
|
8423
8423
|
return void 0;
|
|
8424
8424
|
}
|
|
8425
8425
|
}
|
|
8426
|
+
var COPYRIGHT_YEAR = /\$\{\s*new Date\(\)\s*\.\s*getFullYear\(\)\s*\}/g;
|
|
8427
|
+
var COPYRIGHT_TOKEN = /\$\{([^}]*)\}/g;
|
|
8428
|
+
var DOCUSAURUS_CREDIT = /\s*\bBuilt with Docusaurus\b[.!]*/gi;
|
|
8429
|
+
function docusaurusCopyright(source, bindings, unresolved) {
|
|
8430
|
+
const value = source.replace(COPYRIGHT_YEAR, "{year}").replace(COPYRIGHT_TOKEN, (_match, expression) => {
|
|
8431
|
+
const reference = expression.trim();
|
|
8432
|
+
const resolved = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*$/.test(reference) ? bindings.get(reference) : void 0;
|
|
8433
|
+
if (resolved !== void 0) return resolved;
|
|
8434
|
+
unresolved.push(reference);
|
|
8435
|
+
return "";
|
|
8436
|
+
}).replace(DOCUSAURUS_CREDIT, "").replace(/[ \t]{2,}/g, " ").replace(/\s+([.,;!?])/g, "$1").trim();
|
|
8437
|
+
return value || void 0;
|
|
8438
|
+
}
|
|
8426
8439
|
function readDocusaurusSiteSettings(repositoryRoot) {
|
|
8427
8440
|
const empty2 = { docsRouteBasePath: "docs", defaultColorMode: "light", navbarLinks: [], footerLinks: [] };
|
|
8428
8441
|
const configPath = findDocusaurusConfigPath(repositoryRoot);
|
|
@@ -8469,7 +8482,10 @@ function readDocusaurusSiteSettings(repositoryRoot) {
|
|
|
8469
8482
|
});
|
|
8470
8483
|
return items.length > 0 ? [{ heading, items }] : [];
|
|
8471
8484
|
}) : [];
|
|
8472
|
-
const
|
|
8485
|
+
const copyrightStart = footer ? propertyStart(footer, "copyright") : -1;
|
|
8486
|
+
const copyrightSource = copyrightStart < 0 ? void 0 : staticStringField(footer, "copyright", bindings) ?? footer.slice(copyrightStart).match(/^`([^`]+)`/)?.[1];
|
|
8487
|
+
const unresolvedCopyright = [];
|
|
8488
|
+
const copyright = copyrightSource === void 0 ? void 0 : docusaurusCopyright(copyrightSource, bindings, unresolvedCopyright);
|
|
8473
8489
|
const announcementStart = theme ? propertyStart(theme, "announcementBar") : -1;
|
|
8474
8490
|
const announcement = announcementStart < 0 ? null : matchingObjectLiteral(theme, announcementStart);
|
|
8475
8491
|
const announcementContent = announcement && staticStringField(announcement, "content") || announcement?.slice(propertyStart(announcement, "content")).match(/^`([^`]+)`/)?.[1];
|
|
@@ -8487,6 +8503,7 @@ function readDocusaurusSiteSettings(repositoryRoot) {
|
|
|
8487
8503
|
...description ? { description } : {},
|
|
8488
8504
|
...navbarTitle ? { navbarTitle } : {},
|
|
8489
8505
|
...unresolvedIdentity.length > 0 ? { unresolvedIdentity } : {},
|
|
8506
|
+
...unresolvedCopyright.length > 0 ? { unresolvedCopyright } : {},
|
|
8490
8507
|
defaultColorMode,
|
|
8491
8508
|
docsRouteBasePath,
|
|
8492
8509
|
...logo && staticStringField(logo, "src", bindings) ? {
|
|
@@ -17684,6 +17701,12 @@ ${reasons.map((reason) => `- ${reason}`).join("\n")}` : "No importable Markdown
|
|
|
17684
17701
|
message: `The Docusaurus ${DOCUSAURUS_IDENTITY_LABELS[field]} could not be read without running the config and was left out of the migration.${fallback} Use a string literal, or plain data in an imported module, to import it.`
|
|
17685
17702
|
});
|
|
17686
17703
|
}
|
|
17704
|
+
for (const token of docusaurusSettings.unresolvedCopyright ?? []) {
|
|
17705
|
+
warnings.push({
|
|
17706
|
+
code: "unsupported-config",
|
|
17707
|
+
message: `The Docusaurus footer copyright references ${token}, which could not be read without running the config, so the placeholder was removed. Use a literal value, or plain data in an imported module, to import it.`
|
|
17708
|
+
});
|
|
17709
|
+
}
|
|
17687
17710
|
if (presentation) {
|
|
17688
17711
|
assets.push({ path: "_thally/source-theme.css", content: Buffer.from(presentation.css) });
|
|
17689
17712
|
docsConfig = { ...docsConfig, stylesheets: [...docsConfig.stylesheets ?? [], "/_thally/source-theme.css"], ...presentation.headingFont ? { fonts: { ...docsConfig.fonts, heading: { family: presentation.headingFont, weight: ["400", "500", "600", "700"] } } } : {} };
|