@mintlify/cli 4.0.1733 → 4.0.1735
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/__test__/agent-claim.test.ts +17 -22
- package/__test__/agent-credentials.test.ts +91 -4
- package/__test__/deploy.test.ts +4 -6
- package/__test__/validateCommand.test.ts +141 -0
- package/__test__/validateEngine.test.ts +46 -0
- package/__test__/validateRules.test.ts +500 -0
- package/bin/agent-claim.js +3 -10
- package/bin/agent-credentials.js +75 -6
- package/bin/cli.js +22 -1
- package/bin/deploy.js +1 -8
- package/bin/resolveFiles.js +3 -1
- package/bin/tsconfig.build.tsbuildinfo +1 -1
- package/bin/validate/command.js +58 -0
- package/bin/validate/engine.js +76 -0
- package/bin/validate/files.js +148 -0
- package/bin/validate/mdx.js +201 -0
- package/bin/validate/output.js +28 -0
- package/bin/validate/rules/content/voidTags.js +35 -0
- package/bin/validate/rules/index.js +3 -0
- package/bin/validate/rules/parseError.js +7 -0
- package/bin/validate/site.js +55 -0
- package/bin/validate/types.js +1 -0
- package/package.json +8 -8
- package/src/agent-claim.ts +1 -10
- package/src/agent-credentials.ts +53 -10
- package/src/cli.tsx +24 -1
- package/src/deploy.ts +2 -9
- package/src/resolveFiles.ts +3 -1
- package/src/validate/command.tsx +71 -0
- package/src/validate/engine.ts +93 -0
- package/src/validate/files.ts +212 -0
- package/src/validate/mdx.ts +252 -0
- package/src/validate/output.tsx +56 -0
- package/src/validate/rules/content/voidTags.ts +35 -0
- package/src/validate/rules/index.ts +5 -0
- package/src/validate/rules/parseError.ts +9 -0
- package/src/validate/site.ts +52 -0
- package/src/validate/types.ts +88 -0
package/bin/deploy.js
CHANGED
|
@@ -33,14 +33,7 @@ export function prepareAgentDeployment(options_1, warn_1) {
|
|
|
33
33
|
if (!subdomain)
|
|
34
34
|
throw new Error('Choose a site name with --subdomain <name>.');
|
|
35
35
|
const discovery = yield discoverAgentAuth(apiUrl);
|
|
36
|
-
const save = (credentials) =>
|
|
37
|
-
try {
|
|
38
|
-
yield saveAgentCredentials(apiUrl, directory, credentials);
|
|
39
|
-
}
|
|
40
|
-
catch (_a) {
|
|
41
|
-
warn('Could not save agent credentials to the keyring. Continuing for this run; later commands may not recover access.');
|
|
42
|
-
}
|
|
43
|
-
});
|
|
36
|
+
const save = (credentials) => saveAgentCredentials(apiUrl, directory, credentials);
|
|
44
37
|
for (let attempt = 0; attempt < 2; attempt++) {
|
|
45
38
|
const credentials = saved !== null && saved !== void 0 ? saved : (yield registerAgent(discovery));
|
|
46
39
|
void trackEvent('agent_signup.discovered', { registration_id: credentials.registrationId });
|
package/bin/resolveFiles.js
CHANGED
|
@@ -79,6 +79,8 @@ function walk(baseDir_1) {
|
|
|
79
79
|
return files;
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
|
+
export class NoMatchingFilesError extends Error {
|
|
83
|
+
}
|
|
82
84
|
export function resolveExplicitFiles(baseDir, args) {
|
|
83
85
|
return __awaiter(this, void 0, void 0, function* () {
|
|
84
86
|
let allFiles = null;
|
|
@@ -105,7 +107,7 @@ export function resolveExplicitFiles(baseDir, args) {
|
|
|
105
107
|
}
|
|
106
108
|
}
|
|
107
109
|
if (unmatched.length > 0) {
|
|
108
|
-
throw new
|
|
110
|
+
throw new NoMatchingFilesError(`No matching files for: ${unmatched.join(', ')} (globs match .md and .mdx files)`);
|
|
109
111
|
}
|
|
110
112
|
return [...new Set(matched)];
|
|
111
113
|
});
|