@mintlify/cli 4.0.1467 → 4.0.1469
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/mintTest.js +0 -20
- package/bin/tsconfig.build.tsbuildinfo +1 -1
- package/bin/vendor/converter.js +2 -1
- package/package.json +3 -3
- package/src/mintTest.tsx +0 -22
package/bin/vendor/converter.js
CHANGED
|
@@ -11654,8 +11654,9 @@ function pmToMdx(doc, options = {}) {
|
|
|
11654
11654
|
return serializeDoc(doc, options, null).mdx;
|
|
11655
11655
|
}
|
|
11656
11656
|
function serializeDoc(doc, options, sourceMap) {
|
|
11657
|
+
var _a;
|
|
11657
11658
|
const { frontmatter } = options, serializerOptions = __rest2(options, ["frontmatter"]);
|
|
11658
|
-
const state = new SerializerState(Object.assign(Object.assign({}, serializerOptions), { hasReferenceDefinitions: hasReferenceDefinitions(doc) }));
|
|
11659
|
+
const state = new SerializerState(Object.assign(Object.assign({}, serializerOptions), { hasReferenceDefinitions: (_a = serializerOptions.hasReferenceDefinitions) !== null && _a !== void 0 ? _a : hasReferenceDefinitions(doc) }));
|
|
11659
11660
|
state.sourceMap = sourceMap;
|
|
11660
11661
|
if (frontmatter && Object.keys(frontmatter).length > 0) {
|
|
11661
11662
|
const entries = Object.entries(filterFrontmatterRecord(frontmatter));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1469",
|
|
4
4
|
"description": "The Mintlify CLI",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -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.355",
|
|
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": "38d9ac8a4f2425cb701131ef72de78da3ecc8677"
|
|
109
109
|
}
|
package/src/mintTest.tsx
CHANGED
|
@@ -11,15 +11,11 @@ import {
|
|
|
11
11
|
runCodeTests,
|
|
12
12
|
type RunSave,
|
|
13
13
|
} from './agent-harness/index.js';
|
|
14
|
-
import { API_URL } from './constants.js';
|
|
15
14
|
import { CMD_EXEC_PATH, findDocsRoot, isAI, terminate } from './helpers.js';
|
|
16
15
|
import { getAccessToken } from './keyring.js';
|
|
17
16
|
import { fileInNavPaths, loadDocsNavScope } from './mintTestNav.js';
|
|
18
17
|
import { firstLine, taskProblemLabel } from './mintTestText.js';
|
|
19
18
|
import { formatDuration, runMintTestUi } from './mintTestUi.js';
|
|
20
|
-
import { fetchCliStatus } from './status.js';
|
|
21
|
-
|
|
22
|
-
const ALLOWED_ORGS = new Set(['mintlify', 'mintlify internal']);
|
|
23
19
|
|
|
24
20
|
export async function mintTestHandler(): Promise<void> {
|
|
25
21
|
try {
|
|
@@ -29,24 +25,6 @@ export async function mintTestHandler(): Promise<void> {
|
|
|
29
25
|
await terminate(1);
|
|
30
26
|
return;
|
|
31
27
|
}
|
|
32
|
-
const cliStatus = await fetchCliStatus();
|
|
33
|
-
if (!cliStatus.ok) {
|
|
34
|
-
const message =
|
|
35
|
-
cliStatus.reason === 'unauthenticated'
|
|
36
|
-
? 'your session has expired. Run `mint login` to authenticate.'
|
|
37
|
-
: cliStatus.reason === 'unreachable'
|
|
38
|
-
? `could not reach Mintlify at ${API_URL}${cliStatus.detail ? ` (${cliStatus.detail})` : ''}.`
|
|
39
|
-
: 'unexpected response from Mintlify. Please try again.';
|
|
40
|
-
process.stderr.write(`${message}\n`);
|
|
41
|
-
await terminate(1);
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
const orgName = cliStatus.status.org.name;
|
|
45
|
-
if (!ALLOWED_ORGS.has(orgName.toLowerCase())) {
|
|
46
|
-
process.stderr.write(`mint test is not available for your organization (${orgName}).\n`);
|
|
47
|
-
await terminate(1);
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
28
|
const targetPath = await findDocsRoot(CMD_EXEC_PATH);
|
|
51
29
|
const interactive =
|
|
52
30
|
process.stdin.isTTY === true &&
|