@mintlify/cli 4.0.1676 → 4.0.1678
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/tsconfig.build.tsbuildinfo +1 -1
- package/bin/vendor/converter.js +19 -6
- package/package.json +10 -10
package/bin/vendor/converter.js
CHANGED
|
@@ -14051,7 +14051,7 @@ var SerializerState = class {
|
|
|
14051
14051
|
this.nodePath.pop();
|
|
14052
14052
|
}
|
|
14053
14053
|
}
|
|
14054
|
-
recordLiteralTextRange(path, start, end) {
|
|
14054
|
+
recordLiteralTextRange(path, start, end, pmStart = 0) {
|
|
14055
14055
|
if (!this.sourceMap || this.inTable)
|
|
14056
14056
|
return;
|
|
14057
14057
|
this.sourceMap.push({
|
|
@@ -14059,8 +14059,8 @@ var SerializerState = class {
|
|
|
14059
14059
|
start,
|
|
14060
14060
|
end,
|
|
14061
14061
|
kind: "text",
|
|
14062
|
-
pmStart
|
|
14063
|
-
pmEnd: end - start,
|
|
14062
|
+
pmStart,
|
|
14063
|
+
pmEnd: pmStart + end - start,
|
|
14064
14064
|
offsetEncoding: "identity"
|
|
14065
14065
|
});
|
|
14066
14066
|
}
|
|
@@ -14922,7 +14922,16 @@ function renderSingleLineImgTag(attrs2) {
|
|
|
14922
14922
|
const parts = Object.entries(attrs2).filter(([key, value]) => value !== null && value !== void 0 && !HIDDEN_NODE_ATTRS.has(key)).map(([key, value]) => serializeJsxAttribute(attrs2, key, value)).filter(Boolean);
|
|
14923
14923
|
return parts.length > 0 ? `<img ${parts.join(" ")} />` : "<img />";
|
|
14924
14924
|
}
|
|
14925
|
-
function
|
|
14925
|
+
function recordCodeLines(state, textPath, content, start) {
|
|
14926
|
+
let output = start;
|
|
14927
|
+
let pmStart = 0;
|
|
14928
|
+
for (const line of content.split("\n")) {
|
|
14929
|
+
state.recordLiteralTextRange(textPath, output, output + line.length, pmStart);
|
|
14930
|
+
output += line.length + 1 + state.delim.length;
|
|
14931
|
+
pmStart += line.length + 1;
|
|
14932
|
+
}
|
|
14933
|
+
}
|
|
14934
|
+
function renderCodeBlock(state, node, textPath) {
|
|
14926
14935
|
state.inCodeSection = true;
|
|
14927
14936
|
let content = getTextContent(node);
|
|
14928
14937
|
const lang = node.attrs.language || DEFAULT_CODE_BLOCK_LANGUAGE;
|
|
@@ -14982,6 +14991,10 @@ function renderCodeBlock(state, node) {
|
|
|
14982
14991
|
state.write(fence + lang + metaString + "\n");
|
|
14983
14992
|
const indentedContent = state.delim ? content.replace(/\n/g, "\n" + state.delim) : content;
|
|
14984
14993
|
state.write(indentedContent);
|
|
14994
|
+
const hidesTrailingNewline = content.endsWith("\n");
|
|
14995
|
+
if (textPath && node.childCount === 1 && parsedAdd.length === 0 && parsedRemove.length === 0 && !hidesTrailingNewline) {
|
|
14996
|
+
recordCodeLines(state, textPath, content, state.length - indentedContent.length);
|
|
14997
|
+
}
|
|
14985
14998
|
state.ensureNewLine();
|
|
14986
14999
|
state.write(fence);
|
|
14987
15000
|
state.closeBlock();
|
|
@@ -15079,7 +15092,7 @@ function renderCodeGroup(state, node, name) {
|
|
|
15079
15092
|
for (let i = 0; i < node.childCount; i++) {
|
|
15080
15093
|
const child = node.child(i);
|
|
15081
15094
|
if (child.type.name === BLOCK_TYPES.codeBlock) {
|
|
15082
|
-
renderCodeBlock(state, child);
|
|
15095
|
+
renderCodeBlock(state, child, [i, 0]);
|
|
15083
15096
|
if (i < node.childCount - 1) {
|
|
15084
15097
|
state.ensureNewLine();
|
|
15085
15098
|
}
|
|
@@ -15656,7 +15669,7 @@ function renderNode(state, node, _parent, _index) {
|
|
|
15656
15669
|
renderTable(state, node, boundRenderInline, renderNode);
|
|
15657
15670
|
break;
|
|
15658
15671
|
case BLOCK_TYPES.codeBlock:
|
|
15659
|
-
renderCodeBlock(state, node);
|
|
15672
|
+
renderCodeBlock(state, node, [0]);
|
|
15660
15673
|
break;
|
|
15661
15674
|
case "image":
|
|
15662
15675
|
case BLOCK_TYPES.image:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1678",
|
|
4
4
|
"description": "The Mintlify CLI",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@inquirer/prompts": "7.9.0",
|
|
48
|
-
"@mintlify/common": "1.0.
|
|
49
|
-
"@mintlify/link-rot": "3.0.
|
|
50
|
-
"@mintlify/models": "0.0.
|
|
51
|
-
"@mintlify/og": "0.0.
|
|
52
|
-
"@mintlify/prebuild": "1.0.
|
|
53
|
-
"@mintlify/previewing": "4.0.
|
|
54
|
-
"@mintlify/validation": "0.1.
|
|
48
|
+
"@mintlify/common": "1.0.1271",
|
|
49
|
+
"@mintlify/link-rot": "3.0.1492",
|
|
50
|
+
"@mintlify/models": "0.0.376",
|
|
51
|
+
"@mintlify/og": "0.0.69",
|
|
52
|
+
"@mintlify/prebuild": "1.0.1436",
|
|
53
|
+
"@mintlify/previewing": "4.0.1512",
|
|
54
|
+
"@mintlify/validation": "0.1.928",
|
|
55
55
|
"adm-zip": "0.6.0",
|
|
56
56
|
"chalk": "5.2.0",
|
|
57
57
|
"color": "4.2.3",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"keytar": "7.9.0"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
|
-
"@mintlify/editor": "0.0.
|
|
85
|
+
"@mintlify/editor": "0.0.533",
|
|
86
86
|
"@mintlify/ts-config": "2.0.2",
|
|
87
87
|
"@tsconfig/recommended": "1.0.2",
|
|
88
88
|
"@types/detect-port": "1.3.2",
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"vitest": "2.1.9",
|
|
102
102
|
"vitest-mock-process": "1.0.4"
|
|
103
103
|
},
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "64ecc388380eeb947450683a4545c692dca691ab"
|
|
105
105
|
}
|