@mintlify/cli 4.0.1813 → 4.1.1

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.
Files changed (274) hide show
  1. package/dist/assets/export-scripts/README.classic.md +15 -0
  2. package/dist/assets/export-scripts/README.md +14 -0
  3. package/dist/assets/export-scripts/serve.js +114 -0
  4. package/dist/assets/export-scripts/start-docs.bat +10 -0
  5. package/dist/assets/export-scripts/start-docs.sh +9 -0
  6. package/dist/assets/og/Inter-Bold.ttf +0 -0
  7. package/dist/assets/og/Inter-Medium.ttf +0 -0
  8. package/dist/assets/og/Inter-Regular.ttf +0 -0
  9. package/dist/assets/og/Inter-SemiBold.ttf +0 -0
  10. package/dist/assets/og/PaperMono-Regular.ttf +0 -0
  11. package/dist/assets/og/index_bg.wasm +0 -0
  12. package/dist/assets/openChrome.applescript +94 -0
  13. package/dist/assets/socket.io/socket.io.esm.min.js +7 -0
  14. package/dist/assets/socket.io/socket.io.esm.min.js.map +1 -0
  15. package/dist/assets/socket.io/socket.io.js +4907 -0
  16. package/dist/assets/socket.io/socket.io.js.map +1 -0
  17. package/dist/assets/socket.io/socket.io.min.js +7 -0
  18. package/dist/assets/socket.io/socket.io.min.js.map +1 -0
  19. package/dist/assets/socket.io/socket.io.msgpack.min.js +7 -0
  20. package/dist/assets/socket.io/socket.io.msgpack.min.js.map +1 -0
  21. package/dist/assets/xdg-open +1066 -0
  22. package/dist/assets/yargs-locales/be.json +46 -0
  23. package/dist/assets/yargs-locales/cs.json +51 -0
  24. package/dist/assets/yargs-locales/de.json +46 -0
  25. package/dist/assets/yargs-locales/en.json +55 -0
  26. package/dist/assets/yargs-locales/es.json +46 -0
  27. package/dist/assets/yargs-locales/fi.json +49 -0
  28. package/dist/assets/yargs-locales/fr.json +53 -0
  29. package/dist/assets/yargs-locales/hi.json +49 -0
  30. package/dist/assets/yargs-locales/hu.json +46 -0
  31. package/dist/assets/yargs-locales/id.json +50 -0
  32. package/dist/assets/yargs-locales/it.json +46 -0
  33. package/dist/assets/yargs-locales/ja.json +51 -0
  34. package/dist/assets/yargs-locales/ko.json +49 -0
  35. package/dist/assets/yargs-locales/nb.json +44 -0
  36. package/dist/assets/yargs-locales/nl.json +49 -0
  37. package/dist/assets/yargs-locales/nn.json +44 -0
  38. package/dist/assets/yargs-locales/pirate.json +13 -0
  39. package/dist/assets/yargs-locales/pl.json +49 -0
  40. package/dist/assets/yargs-locales/pt.json +45 -0
  41. package/dist/assets/yargs-locales/pt_BR.json +48 -0
  42. package/dist/assets/yargs-locales/ru.json +51 -0
  43. package/dist/assets/yargs-locales/th.json +46 -0
  44. package/dist/assets/yargs-locales/tr.json +48 -0
  45. package/dist/assets/yargs-locales/uk_UA.json +51 -0
  46. package/dist/assets/yargs-locales/uz.json +52 -0
  47. package/dist/assets/yargs-locales/zh_CN.json +48 -0
  48. package/dist/assets/yargs-locales/zh_TW.json +51 -0
  49. package/dist/converter-d8O3xkdU.js +102 -0
  50. package/dist/devtools-CGNZQKFV.js +24 -0
  51. package/dist/index.js +8 -0
  52. package/dist/rolldown-runtime-CEAe2Uac.js +7 -0
  53. package/dist/schemas-CBsmCNpK.js +372 -0
  54. package/dist/start.js +2310 -0
  55. package/package.json +38 -31
  56. package/.oxlintrc.json +0 -5
  57. package/.prettierignore +0 -2
  58. package/.turbo/turbo-build.log +0 -1
  59. package/CONTRIBUTING.md +0 -45
  60. package/__test__/agent-auth.test.ts +0 -114
  61. package/__test__/agent-claim.test.ts +0 -164
  62. package/__test__/agent-credentials.test.ts +0 -149
  63. package/__test__/agent-deployment.test.ts +0 -106
  64. package/__test__/agent-setup-config.test.ts +0 -324
  65. package/__test__/agent-setup.test.ts +0 -207
  66. package/__test__/agent.test.ts +0 -64
  67. package/__test__/analytics/client.test.ts +0 -180
  68. package/__test__/analytics/dates.test.ts +0 -12
  69. package/__test__/analytics/filters.test.ts +0 -116
  70. package/__test__/analytics/format.test.ts +0 -137
  71. package/__test__/authenticatedFetch.test.ts +0 -182
  72. package/__test__/brokenLinks.test.ts +0 -283
  73. package/__test__/checkPort.test.ts +0 -92
  74. package/__test__/deploy-github-actions.test.ts +0 -202
  75. package/__test__/deploy-github-setup.test.ts +0 -240
  76. package/__test__/deploy-instructions.test.ts +0 -155
  77. package/__test__/deploy.test.ts +0 -202
  78. package/__test__/feedback.test.ts +0 -34
  79. package/__test__/foreignSyntax.test.ts +0 -73
  80. package/__test__/format.test.ts +0 -72
  81. package/__test__/helpers.test.ts +0 -52
  82. package/__test__/init.test.ts +0 -119
  83. package/__test__/instructions.test.ts +0 -53
  84. package/__test__/keyring.test.ts +0 -82
  85. package/__test__/mdxAccessibility.test.ts +0 -81
  86. package/__test__/migrate.test.ts +0 -186
  87. package/__test__/openApiCheck.test.ts +0 -185
  88. package/__test__/pathValidation.test.ts +0 -25
  89. package/__test__/resolveFiles.test.ts +0 -70
  90. package/__test__/sessionId.test.ts +0 -46
  91. package/__test__/signup.test.ts +0 -36
  92. package/__test__/update.test.ts +0 -117
  93. package/__test__/utils.ts +0 -25
  94. package/__test__/validateCommand.test.ts +0 -647
  95. package/__test__/validateEngine.test.ts +0 -245
  96. package/__test__/validateRules.test.ts +0 -1275
  97. package/__test__/welcome.test.ts +0 -15
  98. package/__test__/workflows/client.test.ts +0 -126
  99. package/bin/accessibility.js +0 -111
  100. package/bin/accessibilityCheck.js +0 -82
  101. package/bin/addDomain.js +0 -130
  102. package/bin/agent-auth.js +0 -104
  103. package/bin/agent-claim.js +0 -97
  104. package/bin/agent-credentials.js +0 -124
  105. package/bin/agent-deployment.js +0 -96
  106. package/bin/agent-http.js +0 -45
  107. package/bin/agent-setup-config.js +0 -141
  108. package/bin/agent-setup.js +0 -146
  109. package/bin/agent.js +0 -42
  110. package/bin/analytics/client.js +0 -60
  111. package/bin/analytics/dates.js +0 -6
  112. package/bin/analytics/filters.js +0 -27
  113. package/bin/analytics/format.js +0 -13
  114. package/bin/analytics/index.js +0 -496
  115. package/bin/analytics/output.js +0 -75
  116. package/bin/analytics/types.js +0 -1
  117. package/bin/authenticatedFetch.js +0 -46
  118. package/bin/brokenLinks.js +0 -122
  119. package/bin/callbackServer.js +0 -65
  120. package/bin/cli.js +0 -813
  121. package/bin/comingSoon.js +0 -26
  122. package/bin/config.js +0 -78
  123. package/bin/constants.js +0 -16
  124. package/bin/deploy-base.js +0 -20
  125. package/bin/deploy-github-actions.js +0 -102
  126. package/bin/deploy-github-setup.js +0 -165
  127. package/bin/deploy-instructions.js +0 -71
  128. package/bin/deploy.js +0 -123
  129. package/bin/feedback.js +0 -36
  130. package/bin/format.js +0 -121
  131. package/bin/helpers.js +0 -238
  132. package/bin/idToken.js +0 -14
  133. package/bin/index.js +0 -102
  134. package/bin/init.js +0 -182
  135. package/bin/instructions.js +0 -101
  136. package/bin/keyring.js +0 -78
  137. package/bin/login.js +0 -123
  138. package/bin/logout.js +0 -18
  139. package/bin/mdxAccessibility.js +0 -113
  140. package/bin/mdxLinter.js +0 -55
  141. package/bin/middlewares/subdomainMiddleware.js +0 -28
  142. package/bin/middlewares/telemetryMiddleware.js +0 -61
  143. package/bin/migrate.js +0 -54
  144. package/bin/og.js +0 -145
  145. package/bin/openApiCheck.js +0 -99
  146. package/bin/resolveFiles.js +0 -114
  147. package/bin/score/client.js +0 -40
  148. package/bin/score/index.js +0 -211
  149. package/bin/score/types.js +0 -1
  150. package/bin/signup.js +0 -118
  151. package/bin/start.js +0 -36
  152. package/bin/status.js +0 -106
  153. package/bin/telemetry/client.js +0 -53
  154. package/bin/telemetry/distinctId.js +0 -68
  155. package/bin/telemetry/sessionId.js +0 -36
  156. package/bin/telemetry/track.js +0 -149
  157. package/bin/templates.js +0 -127
  158. package/bin/tokenRefresh.js +0 -50
  159. package/bin/tsconfig.build.tsbuildinfo +0 -1
  160. package/bin/update.js +0 -65
  161. package/bin/validate/command.js +0 -127
  162. package/bin/validate/engine.js +0 -154
  163. package/bin/validate/files.js +0 -163
  164. package/bin/validate/mdx.js +0 -238
  165. package/bin/validate/output.js +0 -44
  166. package/bin/validate/report.js +0 -11
  167. package/bin/validate/rules/build.js +0 -102
  168. package/bin/validate/rules/content/duplicateH1.js +0 -57
  169. package/bin/validate/rules/content/foreignSyntax.js +0 -120
  170. package/bin/validate/rules/content/katex.js +0 -34
  171. package/bin/validate/rules/content/missingSnippet.js +0 -34
  172. package/bin/validate/rules/content/undefinedVariable.js +0 -13
  173. package/bin/validate/rules/content/unknownComponent.js +0 -121
  174. package/bin/validate/rules/content/voidTags.js +0 -38
  175. package/bin/validate/rules/index.js +0 -21
  176. package/bin/validate/rules/openapi.js +0 -50
  177. package/bin/validate/rules/parseError.js +0 -7
  178. package/bin/validate/site.js +0 -57
  179. package/bin/validate/types.js +0 -1
  180. package/bin/vendor/converter.js +0 -30882
  181. package/bin/welcome.js +0 -108
  182. package/bin/workflows/client.js +0 -34
  183. package/bin/workflows/index.js +0 -269
  184. package/bin/workflows/types.js +0 -11
  185. package/scripts/bundle-converter.mjs +0 -26
  186. package/scripts/generate-logo.mjs +0 -79
  187. package/src/accessibility.ts +0 -180
  188. package/src/accessibilityCheck.tsx +0 -150
  189. package/src/addDomain.tsx +0 -206
  190. package/src/agent-auth.ts +0 -119
  191. package/src/agent-claim.ts +0 -124
  192. package/src/agent-credentials.ts +0 -104
  193. package/src/agent-deployment.ts +0 -116
  194. package/src/agent-http.ts +0 -34
  195. package/src/agent-setup-config.ts +0 -144
  196. package/src/agent-setup.ts +0 -165
  197. package/src/agent.ts +0 -56
  198. package/src/analytics/client.ts +0 -153
  199. package/src/analytics/dates.ts +0 -6
  200. package/src/analytics/filters.ts +0 -50
  201. package/src/analytics/format.ts +0 -13
  202. package/src/analytics/index.tsx +0 -599
  203. package/src/analytics/output.ts +0 -99
  204. package/src/analytics/types.ts +0 -145
  205. package/src/authenticatedFetch.ts +0 -42
  206. package/src/brokenLinks.tsx +0 -152
  207. package/src/callbackServer.ts +0 -64
  208. package/src/cli.tsx +0 -1105
  209. package/src/comingSoon.tsx +0 -29
  210. package/src/config.ts +0 -75
  211. package/src/constants.ts +0 -28
  212. package/src/deploy-base.ts +0 -18
  213. package/src/deploy-github-actions.ts +0 -139
  214. package/src/deploy-github-setup.ts +0 -189
  215. package/src/deploy-instructions.ts +0 -76
  216. package/src/deploy.ts +0 -165
  217. package/src/feedback.tsx +0 -31
  218. package/src/format.tsx +0 -82
  219. package/src/helpers.tsx +0 -279
  220. package/src/idToken.ts +0 -17
  221. package/src/index.ts +0 -109
  222. package/src/init.tsx +0 -237
  223. package/src/instructions.ts +0 -99
  224. package/src/keyring.ts +0 -65
  225. package/src/login.tsx +0 -166
  226. package/src/logout.tsx +0 -8
  227. package/src/mdxAccessibility.ts +0 -134
  228. package/src/mdxLinter.tsx +0 -88
  229. package/src/middlewares/subdomainMiddleware.ts +0 -20
  230. package/src/middlewares/telemetryMiddleware.ts +0 -55
  231. package/src/migrate.ts +0 -76
  232. package/src/og.tsx +0 -185
  233. package/src/openApiCheck.tsx +0 -125
  234. package/src/resolveFiles.ts +0 -101
  235. package/src/score/client.ts +0 -36
  236. package/src/score/index.tsx +0 -205
  237. package/src/score/types.ts +0 -15
  238. package/src/signup.tsx +0 -172
  239. package/src/start.ts +0 -27
  240. package/src/status.tsx +0 -129
  241. package/src/telemetry/client.ts +0 -46
  242. package/src/telemetry/distinctId.ts +0 -70
  243. package/src/telemetry/sessionId.ts +0 -40
  244. package/src/telemetry/track.ts +0 -163
  245. package/src/templates.tsx +0 -143
  246. package/src/tokenRefresh.ts +0 -53
  247. package/src/update.tsx +0 -89
  248. package/src/validate/command.tsx +0 -135
  249. package/src/validate/engine.ts +0 -210
  250. package/src/validate/files.ts +0 -249
  251. package/src/validate/mdx.ts +0 -290
  252. package/src/validate/output.tsx +0 -76
  253. package/src/validate/report.ts +0 -40
  254. package/src/validate/rules/build.ts +0 -146
  255. package/src/validate/rules/content/duplicateH1.ts +0 -78
  256. package/src/validate/rules/content/foreignSyntax.ts +0 -144
  257. package/src/validate/rules/content/katex.ts +0 -33
  258. package/src/validate/rules/content/missingSnippet.ts +0 -36
  259. package/src/validate/rules/content/undefinedVariable.ts +0 -20
  260. package/src/validate/rules/content/unknownComponent.ts +0 -130
  261. package/src/validate/rules/content/voidTags.ts +0 -43
  262. package/src/validate/rules/index.ts +0 -23
  263. package/src/validate/rules/openapi.ts +0 -59
  264. package/src/validate/rules/parseError.ts +0 -9
  265. package/src/validate/site.ts +0 -53
  266. package/src/validate/types.ts +0 -102
  267. package/src/vendor/converter.ts +0 -1
  268. package/src/welcome.ts +0 -154
  269. package/src/workflows/client.ts +0 -39
  270. package/src/workflows/index.tsx +0 -287
  271. package/src/workflows/types.ts +0 -73
  272. package/tsconfig.build.json +0 -4
  273. package/tsconfig.json +0 -10
  274. package/vitest.config.ts +0 -9
package/bin/format.js DELETED
@@ -1,121 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
11
- var __asyncValues = (this && this.__asyncValues) || function (o) {
12
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
13
- var m = o[Symbol.asyncIterator], i;
14
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
15
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
16
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
17
- };
18
- var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {
19
- var i, p;
20
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
21
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
22
- };
23
- var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
24
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
25
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
26
- return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
27
- function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
28
- function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
29
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
30
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
31
- function fulfill(value) { resume("next", value); }
32
- function reject(value) { resume("throw", value); }
33
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
34
- };
35
- import { jsx as _jsx } from "react/jsx-runtime";
36
- import { createMintIgnoreMatcher, isMintIgnoredBy, processMintIgnoreString, } from '@mintlify/common';
37
- import { getMintIgnore } from '@mintlify/prebuild';
38
- import { addLog, ErrorLog, SuccessLog } from '@mintlify/previewing';
39
- import fs from 'node:fs/promises';
40
- import path from 'node:path';
41
- import { CMD_EXEC_PATH, terminate } from './helpers.js';
42
- function getGitIgnore() {
43
- return __awaiter(this, void 0, void 0, function* () {
44
- try {
45
- const content = yield fs.readFile(path.join(CMD_EXEC_PATH, '.gitignore'), 'utf-8');
46
- return processMintIgnoreString(content);
47
- }
48
- catch (_a) {
49
- return [];
50
- }
51
- });
52
- }
53
- function walk(dir, matcher) {
54
- return __asyncGenerator(this, arguments, function* walk_1() {
55
- const entries = yield __await(fs.readdir(dir, { withFileTypes: true }));
56
- for (const entry of entries) {
57
- const full = path.join(dir, entry.name);
58
- const relative = path.relative(CMD_EXEC_PATH, full).split(path.sep).join('/');
59
- if (isMintIgnoredBy(relative, matcher, entry.isDirectory()))
60
- continue;
61
- if (entry.isDirectory()) {
62
- yield __await(yield* __asyncDelegator(__asyncValues(walk(full, matcher))));
63
- }
64
- else if (entry.name.endsWith('.mdx')) {
65
- yield yield __await(full);
66
- }
67
- }
68
- });
69
- }
70
- export const formatHandler = () => __awaiter(void 0, void 0, void 0, function* () {
71
- var _a, e_1, _b, _c;
72
- const { mdxToPm, pmToMdx, canonicalPmToMdxOptions } = yield import('./vendor/converter.js');
73
- const ignores = [...(yield getGitIgnore()), ...(yield getMintIgnore(CMD_EXEC_PATH))];
74
- const matcher = createMintIgnoreMatcher(ignores);
75
- let total = 0;
76
- let changed = 0;
77
- let failed = 0;
78
- try {
79
- for (var _d = true, _e = __asyncValues(walk(CMD_EXEC_PATH, matcher)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
80
- _c = _f.value;
81
- _d = false;
82
- const file = _c;
83
- total++;
84
- const relative = path.relative(CMD_EXEC_PATH, file);
85
- try {
86
- const raw = yield fs.readFile(file, 'utf-8');
87
- let formatted = raw;
88
- let originalFrontmatterKeys = 0;
89
- for (let pass = 0; pass < 3; pass++) {
90
- const { doc, frontmatter } = mdxToPm(formatted);
91
- if (pass === 0)
92
- originalFrontmatterKeys = Object.keys(frontmatter).length;
93
- const next = `${pmToMdx(doc, Object.assign({ frontmatter }, canonicalPmToMdxOptions))}\n`;
94
- if (next === formatted)
95
- break;
96
- formatted = next;
97
- }
98
- if (originalFrontmatterKeys > 0 && !formatted.startsWith('---')) {
99
- throw new Error('formatting would remove frontmatter; file left untouched');
100
- }
101
- if (formatted !== raw) {
102
- yield fs.writeFile(file, formatted);
103
- changed++;
104
- }
105
- }
106
- catch (error) {
107
- failed++;
108
- addLog(_jsx(ErrorLog, { message: `${relative}: ${error instanceof Error ? error.message : 'unknown error'}` }));
109
- }
110
- }
111
- }
112
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
113
- finally {
114
- try {
115
- if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
116
- }
117
- finally { if (e_1) throw e_1.error; }
118
- }
119
- addLog(_jsx(SuccessLog, { message: `formatted ${changed} of ${total} mdx file${total === 1 ? '' : 's'}${failed > 0 ? ` (${failed} failed)` : ''}` }));
120
- yield terminate(failed > 0 ? 1 : 0);
121
- });
package/bin/helpers.js DELETED
@@ -1,238 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import { jsx as _jsx } from "react/jsx-runtime";
11
- import { getConfigPath } from '@mintlify/prebuild';
12
- import { MintConfigUpdater } from '@mintlify/prebuild';
13
- import { addLog, ErrorLog, getClientVersion, SuccessLog, InfoLog, SpinnerLog, removeLastLog, LOCAL_LINKED_CLI_VERSION, WarningLog, } from '@mintlify/previewing';
14
- import { upgradeToDocsConfig, validatePathWithinCwd } from '@mintlify/validation';
15
- import detect from 'detect-port';
16
- import fse from 'fs-extra';
17
- import inquirer from 'inquirer';
18
- import yaml from 'js-yaml';
19
- import { execFile, execFileSync } from 'node:child_process';
20
- import { readFileSync } from 'node:fs';
21
- import fs from 'node:fs/promises';
22
- import { createRequire } from 'node:module';
23
- import { fileURLToPath } from 'node:url';
24
- import { promisify } from 'node:util';
25
- import path from 'path';
26
- import { detectAgent } from './agent.js';
27
- import { shutdownPostHog } from './telemetry/client.js';
28
- export const CMD_EXEC_PATH = process.cwd();
29
- export const checkPort = (argv) => __awaiter(void 0, void 0, void 0, function* () {
30
- const initialPort = typeof argv.port === 'number' ? argv.port : 3000;
31
- if (initialPort === (yield detect(initialPort)))
32
- return initialPort;
33
- for (let port = initialPort + 1; port < initialPort + 10; port++) {
34
- addLog(_jsx(InfoLog, { message: `port ${port - 1} is already in use. trying ${port} instead` }));
35
- if (port === (yield detect(port)))
36
- return port;
37
- }
38
- });
39
- export const checkNodeVersion = () => __awaiter(void 0, void 0, void 0, function* () {
40
- let nodeVersionString = process.version;
41
- if (nodeVersionString.charAt(0) === 'v') {
42
- nodeVersionString = nodeVersionString.slice(1);
43
- }
44
- const versionArr = nodeVersionString.split('.');
45
- const majorVersion = parseInt(versionArr[0], 10);
46
- const minorVersion = parseInt(versionArr[1], 10);
47
- if (majorVersion === 25) {
48
- addLog(_jsx(ErrorLog, { message: `mintlify is not supported on node 25 (current version ${nodeVersionString}). Please switch to an LTS node version.` }));
49
- yield terminate(1);
50
- }
51
- if (majorVersion < 20 || (majorVersion === 20 && minorVersion < 17)) {
52
- addLog(_jsx(ErrorLog, { message: "mintlify requires node 20.17 or higher. Please upgrade to an LTS node version." }));
53
- yield terminate(1);
54
- }
55
- });
56
- export const checkForMintJson = () => __awaiter(void 0, void 0, void 0, function* () {
57
- return !!(yield getConfigPath(CMD_EXEC_PATH, 'mint'));
58
- });
59
- export const findDocsRoot = (startDir) => __awaiter(void 0, void 0, void 0, function* () {
60
- const start = path.resolve(startDir);
61
- const { root } = path.parse(start);
62
- let dir = start;
63
- while (dir !== root) {
64
- if ((yield getConfigPath(dir, 'docs')) || (yield getConfigPath(dir, 'mint')))
65
- return dir;
66
- dir = path.dirname(dir);
67
- }
68
- return start;
69
- });
70
- export const checkForDocsJson = () => __awaiter(void 0, void 0, void 0, function* () {
71
- const docsJsonPath = path.join(CMD_EXEC_PATH, 'docs.json');
72
- if (!(yield fse.pathExists(docsJsonPath))) {
73
- addLog(_jsx(InfoLog, { message: "new docs.json file is available" }));
74
- const promptResult = yield inquirer.prompt([
75
- {
76
- type: 'list',
77
- name: 'action',
78
- message: 'would you like to upgrade your mint.json to docs.json?',
79
- choices: [
80
- { name: 'upgrade (migrate from mint.json to docs.json)', value: 'upgrade' },
81
- { name: 'continue (use existing mint.json)', value: 'continue' },
82
- ],
83
- },
84
- ]);
85
- const { action } = promptResult;
86
- if (action === 'continue') {
87
- addLog(_jsx(InfoLog, { message: "proceeding with the existing mint.json..." }));
88
- }
89
- if (action === 'upgrade') {
90
- addLog(_jsx(SpinnerLog, { message: "upgrading docs.json..." }));
91
- yield upgradeConfig();
92
- }
93
- }
94
- });
95
- export const autoUpgradeIfNeeded = () => __awaiter(void 0, void 0, void 0, function* () {
96
- const hasMintJson = yield checkForMintJson();
97
- if (!hasMintJson)
98
- return;
99
- const docsJsonPath = path.join(CMD_EXEC_PATH, 'docs.json');
100
- const hasDocsJson = yield fse.pathExists(docsJsonPath);
101
- if (!hasDocsJson) {
102
- addLog(_jsx(WarningLog, { message: "Legacy mint.json detected, auto-upgrading to docs.json" }));
103
- addLog(_jsx(SpinnerLog, { message: "upgrading mint.json to docs.json..." }));
104
- yield upgradeConfig();
105
- }
106
- });
107
- export const upgradeConfig = () => __awaiter(void 0, void 0, void 0, function* () {
108
- try {
109
- const mintJsonPath = path.join(CMD_EXEC_PATH, 'mint.json');
110
- const docsJsonPath = path.join(CMD_EXEC_PATH, 'docs.json');
111
- const mintJsonFileContent = yield fs.readFile(mintJsonPath, 'utf8');
112
- const validationResult = yield MintConfigUpdater.validateConfigJsonString(mintJsonFileContent);
113
- const mintConfig = validationResult.data;
114
- const upgradedDocsConfig = upgradeToDocsConfig(mintConfig, {
115
- shouldUpgradeTheme: true,
116
- });
117
- yield fs.writeFile(docsJsonPath, JSON.stringify(upgradedDocsConfig, null, 2));
118
- removeLastLog();
119
- addLog(_jsx(SuccessLog, { message: "mint.json file has been upgraded to docs.json." }));
120
- }
121
- catch (err) {
122
- removeLastLog();
123
- addLog(_jsx(ErrorLog, { message: err instanceof Error ? err.message : 'an unknown error occurred' }));
124
- }
125
- });
126
- const require = createRequire(import.meta.url);
127
- const isRunningFromLinkedBuild = () => {
128
- try {
129
- const thisFile = fileURLToPath(import.meta.url);
130
- return !thisFile.split(path.sep).includes('node_modules');
131
- }
132
- catch (_a) {
133
- return false;
134
- }
135
- };
136
- const readPackageVersion = (packageName) => {
137
- try {
138
- const pkgPath = require.resolve(`${packageName}/package.json`);
139
- const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
140
- return typeof pkg.version === 'string' ? pkg.version : undefined;
141
- }
142
- catch (_a) {
143
- return undefined;
144
- }
145
- };
146
- export const getCliVersion = (packageName) => {
147
- var _a;
148
- if (packageName === void 0) { packageName = (_a = process.env.MINTLIFY_PACKAGE_NAME) !== null && _a !== void 0 ? _a : 'mint'; }
149
- if (process.env.CLI_TEST_MODE === 'true') {
150
- return 'test-cli';
151
- }
152
- if (isRunningFromLinkedBuild()) {
153
- return LOCAL_LINKED_CLI_VERSION;
154
- }
155
- return readPackageVersion(packageName);
156
- };
157
- export const getVersions = (packageName) => {
158
- var _a;
159
- if (packageName === void 0) { packageName = (_a = process.env.MINTLIFY_PACKAGE_NAME) !== null && _a !== void 0 ? _a : 'mint'; }
160
- const cli = getCliVersion(packageName);
161
- const client = getClientVersion().trim();
162
- return { cli, client };
163
- };
164
- // On Windows, npm/pnpm entrypoints are .cmd shims that Node refuses to spawn
165
- // without a shell (EINVAL since the CVE-2024-27980 fix). Everywhere else we
166
- // keep the shell disabled so arguments can't be interpreted as shell syntax.
167
- export const windowsCompatibleSpawnOptions = {
168
- shell: process.platform === 'win32',
169
- };
170
- // npm package name grammar (optionally scoped). Rejecting anything else before
171
- // it reaches a package-manager spawn keeps the win32 shell path (above) safe
172
- // from shell metacharacters.
173
- const VALID_PACKAGE_NAME_PATTERN = /^(@[a-z0-9~-][a-z0-9._~-]*\/)?[a-z0-9~-][a-z0-9._~-]*$/;
174
- export const assertValidPackageName = (packageName) => {
175
- if (!VALID_PACKAGE_NAME_PATTERN.test(packageName)) {
176
- throw new Error(`Invalid package name: ${packageName}`);
177
- }
178
- };
179
- export const getLatestCliVersion = (packageName) => {
180
- assertValidPackageName(packageName);
181
- return execFileSync('npm', ['view', packageName, 'version', '--silent'], Object.assign({ encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] }, windowsCompatibleSpawnOptions)).trim();
182
- };
183
- export const suppressConsoleWarnings = () => {
184
- // Ignore tailwind warnings and punycode deprecation warning
185
- const ignoredMessages = [
186
- 'No utility classes were detected',
187
- 'https://tailwindcss.com/docs/content-configuration',
188
- 'DeprecationWarning',
189
- ];
190
- const originalConsoleError = console.error;
191
- console.error = (...args) => {
192
- const message = args.join(' ');
193
- if (ignoredMessages.some((ignoredMessage) => message.includes(ignoredMessage))) {
194
- return;
195
- }
196
- originalConsoleError.apply(console, args);
197
- };
198
- const originalConsoleWarn = console.warn;
199
- console.warn = (...args) => {
200
- const message = args.join(' ');
201
- if (ignoredMessages.some((ignoredMessage) => message.includes(ignoredMessage))) {
202
- return;
203
- }
204
- originalConsoleWarn.apply(console, args);
205
- };
206
- };
207
- export const readLocalOpenApiFile = (filename) => __awaiter(void 0, void 0, void 0, function* () {
208
- const { resolvedPath } = validatePathWithinCwd(filename, CMD_EXEC_PATH);
209
- const file = yield fs.readFile(resolvedPath, 'utf-8');
210
- const document = yaml.load(file);
211
- return document;
212
- });
213
- export const errorMessage = (error) => error instanceof Error ? error.message : String(error);
214
- export const terminate = (code) => __awaiter(void 0, void 0, void 0, function* () {
215
- // Wait for the logs to be fully rendered before exiting
216
- yield new Promise((resolve) => setTimeout(resolve, 50));
217
- yield shutdownPostHog();
218
- process.exit(code);
219
- });
220
- export const execFileAsync = promisify(execFile);
221
- export function isAI() {
222
- return !process.stdin.isTTY || detectAgent() !== undefined;
223
- }
224
- export const detectPackageManager = (_a) => __awaiter(void 0, [_a], void 0, function* ({ packageName }) {
225
- assertValidPackageName(packageName);
226
- try {
227
- const { stdout: packagePath } = yield execFileAsync('which', [packageName]);
228
- if (packagePath.includes('pnpm')) {
229
- return 'pnpm';
230
- }
231
- else {
232
- return 'npm';
233
- }
234
- }
235
- catch (error) {
236
- return 'npm';
237
- }
238
- });
package/bin/idToken.js DELETED
@@ -1,14 +0,0 @@
1
- export function getEmailFromIdToken(idToken) {
2
- if (!idToken)
3
- return undefined;
4
- try {
5
- const payload = idToken.split('.')[1];
6
- if (!payload)
7
- return undefined;
8
- const claims = JSON.parse(Buffer.from(payload, 'base64url').toString('utf8'));
9
- return typeof claims.email === 'string' && claims.email.length > 0 ? claims.email : undefined;
10
- }
11
- catch (_a) {
12
- return undefined;
13
- }
14
- }
package/bin/index.js DELETED
@@ -1,102 +0,0 @@
1
- #!/usr/bin/env node
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var _a, _b, _c;
12
- import { spawn } from 'child_process';
13
- import path from 'path';
14
- import { fileURLToPath } from 'url';
15
- const __filename = fileURLToPath(import.meta.url);
16
- const __dirname = path.dirname(__filename);
17
- const packageName = path.basename((_a = process.argv[1]) !== null && _a !== void 0 ? _a : '') === 'index.js'
18
- ? 'mint'
19
- : path.basename((_b = process.argv[1]) !== null && _b !== void 0 ? _b : '') || 'mint';
20
- let cli = null;
21
- let isShuttingDown = false;
22
- let hasExited = false;
23
- const cleanup = () => __awaiter(void 0, void 0, void 0, function* () {
24
- if (isShuttingDown)
25
- return;
26
- isShuttingDown = true;
27
- if (cli && !cli.killed) {
28
- try {
29
- cli.kill('SIGTERM');
30
- yield new Promise((resolve) => {
31
- const timeout = setTimeout(() => {
32
- if (cli && !cli.killed) {
33
- cli.kill('SIGKILL');
34
- }
35
- resolve();
36
- }, 5000);
37
- cli.once('exit', () => {
38
- clearTimeout(timeout);
39
- resolve();
40
- });
41
- });
42
- }
43
- catch (error) {
44
- // ignore
45
- }
46
- }
47
- });
48
- const exitProcess = (code) => {
49
- if (hasExited)
50
- return;
51
- hasExited = true;
52
- process.exit(code);
53
- };
54
- const killSignals = ['SIGINT', 'SIGTERM', 'SIGQUIT', 'SIGHUP'];
55
- killSignals.forEach((signal) => {
56
- process.on(signal, () => __awaiter(void 0, void 0, void 0, function* () {
57
- yield cleanup();
58
- exitProcess(0);
59
- }));
60
- });
61
- process.on('uncaughtException', () => __awaiter(void 0, void 0, void 0, function* () {
62
- yield cleanup();
63
- exitProcess(1);
64
- }));
65
- process.on('unhandledRejection', () => __awaiter(void 0, void 0, void 0, function* () {
66
- yield cleanup();
67
- exitProcess(1);
68
- }));
69
- // Arguments are passed as array elements to spawn() without shell: true,
70
- // so shell metacharacters are not interpreted and command injection is prevented.
71
- const userArgs = process.argv.slice(2);
72
- try {
73
- cli = spawn('node', ['--no-deprecation', path.join(__dirname, '../bin/start.js'), ...userArgs], {
74
- stdio: 'inherit',
75
- env: Object.assign(Object.assign({}, process.env), { MINTLIFY_PACKAGE_NAME: packageName, CLI_TEST_MODE: (_c = process.env.CLI_TEST_MODE) !== null && _c !== void 0 ? _c : 'false' }),
76
- windowsHide: process.platform === 'win32',
77
- detached: false,
78
- });
79
- cli.on('error', (error) => __awaiter(void 0, void 0, void 0, function* () {
80
- console.error(`Failed to start ${packageName}: ${error.message}`);
81
- yield cleanup();
82
- exitProcess(1);
83
- }));
84
- cli.on('exit', (code) => {
85
- exitProcess(code !== null && code !== void 0 ? code : 0);
86
- });
87
- }
88
- catch (error) {
89
- console.error(`Failed to start ${packageName}: ${error}`);
90
- exitProcess(1);
91
- }
92
- process.on('exit', () => {
93
- if (cli && !cli.killed) {
94
- try {
95
- cli.kill('SIGKILL');
96
- }
97
- catch (error) {
98
- // ignore
99
- }
100
- }
101
- });
102
- export { cli };
package/bin/init.js DELETED
@@ -1,182 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
- import { select, input } from '@inquirer/prompts';
12
- import { addLogs, addLog, SpinnerLog, removeLastLog } from '@mintlify/previewing';
13
- import { docsConfigSchema, validatePathWithinCwd } from '@mintlify/validation';
14
- import AdmZip from 'adm-zip';
15
- import fse from 'fs-extra';
16
- import { Box, Text } from 'ink';
17
- import { isAI } from './helpers.js';
18
- import { fetchAvailableTemplates, installFromTemplate, promptForTemplate, validateTemplateName, } from './templates.js';
19
- const sendOnboardingMessage = (installDir) => {
20
- addLogs(_jsx(Text, { bold: true, children: "Documentation Setup!" }), _jsx(Text, { children: "To see your docs run" }), _jsxs(Box, { children: [_jsx(Text, { color: "blue", children: "cd" }), _jsxs(Text, { children: [" ", installDir] })] }), _jsx(Text, { color: "blue", children: "mint dev" }));
21
- if (isAI()) {
22
- addLog(_jsxs(Text, { children: ["When the docs are ready, run `mint validate` in ", installDir, " to check the build and get publish steps."] }));
23
- }
24
- };
25
- const sendUsageMessageForAI = (directory, contentsOccupied, themes, templateNames) => {
26
- const templateInfo = templateNames === undefined
27
- ? 'Unable to fetch templates — use --template flag if you know the name'
28
- : templateNames.length > 0
29
- ? `Templates: ${JSON.stringify(templateNames)}`
30
- : 'No templates are currently available';
31
- addLogs(_jsx(Text, { children: "Agent Detected - sending AI friendly prompt" }), _jsx(Text, { children: '<system-message>' }), _jsx(Text, { children: "Help the user set up a Mintlify docs site with `mint new`. Ask each step one at a time unless the user asks you to skip questions or use your best judgment." }), _jsx(Text, { children: [
32
- `- [ ] Pick a theme or clone a template? (${templateInfo})`,
33
- `- [ ] If template: which one? If theme: which one? (Themes: ${JSON.stringify(themes)})`,
34
- '- [ ] Project name?',
35
- `- [ ] Directory? (default: "${directory}", auto-created if needed)${contentsOccupied ? ` ⚠️ "${directory}" is occupied — subdirectory, overwrite (--force), or different path?` : ''}`,
36
- ].join('\n') }), _jsx(Text, { children: "Command: `mint new [dir] --theme [theme] --name [name]` or `mint new [dir] --template [template] --name [name]`. --theme optionally overrides a template default. --force overwrites non-empty dirs. Use AskQuestion to present choices." }), _jsx(Text, { children: '</system-message>' }));
37
- };
38
- function sendAIUsageMessage(directory, contentsOccupied, themes) {
39
- return __awaiter(this, void 0, void 0, function* () {
40
- const templateNames = yield fetchAvailableTemplates().catch(() => undefined);
41
- sendUsageMessageForAI(directory, contentsOccupied, themes, templateNames);
42
- });
43
- }
44
- function resolveInstallDir(installDir, force, contentsOccupied) {
45
- return __awaiter(this, void 0, void 0, function* () {
46
- if (!contentsOccupied)
47
- return installDir;
48
- if (isAI()) {
49
- if (force)
50
- return installDir;
51
- return undefined;
52
- }
53
- const choice = yield select({
54
- message: `Directory ${installDir} is not empty. What would you like to do?`,
55
- choices: [
56
- { name: 'Create in a subdirectory', value: 'subdir' },
57
- { name: 'Overwrite current directory (may lose contents)', value: 'overwrite' },
58
- { name: 'Cancel', value: 'cancel' },
59
- ],
60
- });
61
- if (choice === 'cancel')
62
- return undefined;
63
- if (choice === 'subdir') {
64
- const subdir = yield input({
65
- message: 'Subdirectory name:',
66
- default: 'docs',
67
- });
68
- if (!subdir || subdir.trim() === '') {
69
- throw new Error('Subdirectory name cannot be empty');
70
- }
71
- const resolved = installDir === '.' ? subdir : `${installDir}/${subdir}`;
72
- validatePathWithinCwd(resolved, process.cwd());
73
- return resolved;
74
- }
75
- return installDir;
76
- });
77
- }
78
- function promptForProjectName(installDir, currentName) {
79
- return __awaiter(this, void 0, void 0, function* () {
80
- if (currentName)
81
- return currentName;
82
- const defaultProject = installDir === '.' ? 'Mintlify' : installDir;
83
- return input({ message: 'Project Name', default: defaultProject });
84
- });
85
- }
86
- function promptForApproach() {
87
- return __awaiter(this, void 0, void 0, function* () {
88
- const approach = yield select({
89
- message: 'How would you like to set up your docs?',
90
- choices: [
91
- { name: 'Pick a theme', value: 'theme' },
92
- { name: 'Clone a template', value: 'template' },
93
- ],
94
- });
95
- if (approach === 'template')
96
- return promptForTemplate();
97
- return undefined;
98
- });
99
- }
100
- export function init(installDir, force, theme, name, template) {
101
- return __awaiter(this, void 0, void 0, function* () {
102
- validatePathWithinCwd(installDir);
103
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
104
- const themes = docsConfigSchema.options.map((option) => {
105
- return option.shape.theme._def.value;
106
- });
107
- const dirContents = yield fse.readdir(installDir).catch(() => []);
108
- const contentsOccupied = dirContents.length > 0;
109
- if (isAI() && (!name || (!template && !theme))) {
110
- yield sendAIUsageMessage(installDir, contentsOccupied, themes);
111
- return;
112
- }
113
- if (isAI() && contentsOccupied && !force) {
114
- yield sendAIUsageMessage(installDir, contentsOccupied, themes);
115
- return;
116
- }
117
- const selectedTemplate = template
118
- ? yield validateTemplateName(template).then(() => template)
119
- : !isAI() && !theme
120
- ? yield promptForApproach()
121
- : undefined;
122
- if (selectedTemplate) {
123
- const resolved = yield resolveInstallDir(installDir, force, contentsOccupied);
124
- if (resolved === undefined) {
125
- if (isAI())
126
- yield sendAIUsageMessage(installDir, contentsOccupied, themes);
127
- return;
128
- }
129
- const projectName = yield promptForProjectName(resolved, name);
130
- yield fse.ensureDir(resolved);
131
- yield installFromTemplate(resolved, selectedTemplate, projectName, theme);
132
- sendOnboardingMessage(resolved);
133
- return;
134
- }
135
- // Standard theme-based path
136
- const resolved = yield resolveInstallDir(installDir, force, contentsOccupied);
137
- if (resolved === undefined) {
138
- if (isAI())
139
- yield sendAIUsageMessage(installDir, contentsOccupied, themes);
140
- return;
141
- }
142
- let projectName = name;
143
- let selectedTheme = theme;
144
- if (!isAI() && (!selectedTheme || !projectName)) {
145
- projectName = yield promptForProjectName(resolved, projectName);
146
- if (!selectedTheme) {
147
- selectedTheme = yield select({
148
- message: 'Theme',
149
- choices: themes.map((t) => ({ name: t, value: t })),
150
- });
151
- }
152
- }
153
- if (projectName === undefined || selectedTheme === undefined) {
154
- yield sendAIUsageMessage(resolved, contentsOccupied, themes);
155
- return;
156
- }
157
- yield fse.ensureDir(resolved);
158
- yield install(resolved, projectName, selectedTheme);
159
- sendOnboardingMessage(resolved);
160
- });
161
- }
162
- const install = (installDir, projectName, theme) => __awaiter(void 0, void 0, void 0, function* () {
163
- addLog(_jsx(SpinnerLog, { message: "downloading starter template..." }));
164
- const response = yield fetch('https://github.com/mintlify/starter/archive/refs/heads/main.zip');
165
- const buffer = yield response.arrayBuffer();
166
- yield fse.writeFile(installDir + '/starter.zip', Buffer.from(buffer));
167
- removeLastLog();
168
- addLog(_jsx(SpinnerLog, { message: "extracting..." }));
169
- new AdmZip(installDir + '/starter.zip').extractAllTo(installDir, true);
170
- removeLastLog();
171
- yield fse.copy(installDir + '/starter-main', installDir, {
172
- overwrite: true,
173
- filter: (src) => !src.includes('starter-main/starter-main'),
174
- });
175
- yield fse.remove(installDir + '/starter.zip');
176
- yield fse.remove(installDir + '/starter-main');
177
- const docsJsonPath = installDir + '/docs.json';
178
- const docsConfig = yield fse.readJson(docsJsonPath);
179
- docsConfig.theme = theme;
180
- docsConfig.name = projectName;
181
- yield fse.writeJson(docsJsonPath, docsConfig, { spaces: 2 });
182
- });