@mintlify/cli 4.0.1491 → 4.0.1493
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/bin/vendor/converter.js
CHANGED
|
@@ -11009,7 +11009,8 @@ function renderTitledComponent(state, node, name, renderContent2, renderInline2,
|
|
|
11009
11009
|
title = titleState.out;
|
|
11010
11010
|
} else {
|
|
11011
11011
|
const plainTitle = getTextContent(titleChild);
|
|
11012
|
-
|
|
11012
|
+
const escapedTitle = plainTitle.replace(titleMarkdownSpecialCharacters, "\\$&");
|
|
11013
|
+
title = escapedTitle === plainTitle || titleMarkdownToText(plainTitle) === plainTitle ? plainTitle : escapedTitle;
|
|
11013
11014
|
}
|
|
11014
11015
|
}
|
|
11015
11016
|
const titleAttribute = isJSXContent(title) ? title.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">") : title;
|
|
@@ -11768,7 +11769,7 @@ function hasReferenceDefinitions(doc) {
|
|
|
11768
11769
|
return found;
|
|
11769
11770
|
}
|
|
11770
11771
|
function pmToMdx(doc, options = {}) {
|
|
11771
|
-
return serializeDoc(doc, options, null).mdx;
|
|
11772
|
+
return drainSerialization(serializeDoc(doc, options, null)).mdx;
|
|
11772
11773
|
}
|
|
11773
11774
|
function serializeNodeWithDelim(node, options, delim) {
|
|
11774
11775
|
const state = new SerializerState(options);
|
|
@@ -11776,7 +11777,13 @@ function serializeNodeWithDelim(node, options, delim) {
|
|
|
11776
11777
|
renderNode(state, node, node, 0);
|
|
11777
11778
|
return state.out.replace(/(\n[ \t]*)+$/, "");
|
|
11778
11779
|
}
|
|
11779
|
-
function
|
|
11780
|
+
function drainSerialization(steps) {
|
|
11781
|
+
let step = steps.next();
|
|
11782
|
+
while (!step.done)
|
|
11783
|
+
step = steps.next();
|
|
11784
|
+
return step.value;
|
|
11785
|
+
}
|
|
11786
|
+
function* serializeDoc(doc, options, sourceMap) {
|
|
11780
11787
|
var _a;
|
|
11781
11788
|
const { frontmatter } = options, serializerOptions = __rest2(options, ["frontmatter"]);
|
|
11782
11789
|
const state = new SerializerState(Object.assign(Object.assign({}, serializerOptions), { hasReferenceDefinitions: (_a = serializerOptions.hasReferenceDefinitions) !== null && _a !== void 0 ? _a : hasReferenceDefinitions(doc) }));
|
|
@@ -11792,26 +11799,34 @@ function serializeDoc(doc, options, sourceMap) {
|
|
|
11792
11799
|
state.write("---\n\n");
|
|
11793
11800
|
}
|
|
11794
11801
|
}
|
|
11795
|
-
|
|
11802
|
+
for (let i = 0; i < doc.childCount; i++) {
|
|
11803
|
+
renderChild(state, doc, i);
|
|
11804
|
+
yield i + 1;
|
|
11805
|
+
}
|
|
11796
11806
|
let result = state.out;
|
|
11797
11807
|
if (options.removeTrailingNewline !== false && result.endsWith("\n")) {
|
|
11798
11808
|
result = result.replace(/\n+$/, "");
|
|
11799
11809
|
}
|
|
11810
|
+
for (const entry of sourceMap !== null && sourceMap !== void 0 ? sourceMap : []) {
|
|
11811
|
+
entry.end = Math.min(entry.end, result.length);
|
|
11812
|
+
entry.start = Math.min(entry.start, entry.end);
|
|
11813
|
+
}
|
|
11800
11814
|
return { mdx: result, sourceMap: sourceMap !== null && sourceMap !== void 0 ? sourceMap : [] };
|
|
11801
11815
|
}
|
|
11802
11816
|
function renderContent(state, node) {
|
|
11803
|
-
for (let i = 0; i < node.childCount; i++)
|
|
11804
|
-
|
|
11805
|
-
|
|
11817
|
+
for (let i = 0; i < node.childCount; i++)
|
|
11818
|
+
renderChild(state, node, i);
|
|
11819
|
+
}
|
|
11820
|
+
function renderChild(state, node, index) {
|
|
11821
|
+
const child = node.child(index);
|
|
11822
|
+
if (index > 0) {
|
|
11823
|
+
state.ensureNewLine();
|
|
11824
|
+
if (needsBlankLine(node.child(index - 1), child))
|
|
11806
11825
|
state.ensureNewLine();
|
|
11807
|
-
if (needsBlankLine(node.child(i - 1), child)) {
|
|
11808
|
-
state.ensureNewLine();
|
|
11809
|
-
}
|
|
11810
|
-
}
|
|
11811
|
-
const start = state.beginBlock(i);
|
|
11812
|
-
renderNode(state, child, node, i);
|
|
11813
|
-
state.endBlock(start);
|
|
11814
11826
|
}
|
|
11827
|
+
const start = state.beginBlock(index);
|
|
11828
|
+
renderNode(state, child, node, index);
|
|
11829
|
+
state.endBlock(start);
|
|
11815
11830
|
}
|
|
11816
11831
|
function needsBlankLine(prev, current) {
|
|
11817
11832
|
return BLOCK_LINE_TYPES.has(prev.type.name) || BLOCK_LINE_TYPES.has(current.type.name);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1493",
|
|
4
4
|
"description": "The Mintlify CLI",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@inquirer/prompts": "7.9.0",
|
|
48
|
-
"@mintlify/common": "1.0.
|
|
49
|
-
"@mintlify/link-rot": "3.0.
|
|
48
|
+
"@mintlify/common": "1.0.1143",
|
|
49
|
+
"@mintlify/link-rot": "3.0.1345",
|
|
50
50
|
"@mintlify/models": "0.0.355",
|
|
51
|
-
"@mintlify/prebuild": "1.0.
|
|
52
|
-
"@mintlify/previewing": "4.0.
|
|
53
|
-
"@mintlify/validation": "0.1.
|
|
51
|
+
"@mintlify/prebuild": "1.0.1297",
|
|
52
|
+
"@mintlify/previewing": "4.0.1369",
|
|
53
|
+
"@mintlify/validation": "0.1.853",
|
|
54
54
|
"adm-zip": "0.6.0",
|
|
55
55
|
"chalk": "5.2.0",
|
|
56
56
|
"color": "4.2.3",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"keytar": "7.9.0"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
|
-
"@mintlify/editor": "0.0.
|
|
89
|
+
"@mintlify/editor": "0.0.377",
|
|
90
90
|
"@mintlify/ts-config": "2.0.2",
|
|
91
91
|
"@tsconfig/recommended": "1.0.2",
|
|
92
92
|
"@types/detect-port": "1.3.2",
|
|
@@ -105,5 +105,5 @@
|
|
|
105
105
|
"vitest": "2.1.9",
|
|
106
106
|
"vitest-mock-process": "1.0.4"
|
|
107
107
|
},
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "01ef621d525bb7c41476a32fbb5dfabd28a3f0af"
|
|
109
109
|
}
|