saturndocs 0.5.0 → 0.5.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.
- package/dist/{auth-47SI6KTG.js → auth-3MLMF5Q3.js} +4 -4
- package/dist/{broken-links-EOEGVH4F.js → broken-links-4AGMC2MO.js} +6 -6
- package/dist/{build-OLTD5RJQ.js → build-MHVOQFLW.js} +5 -5
- package/dist/{chunk-SIGMRKFJ.js → chunk-4Y6MLUWG.js} +2 -2
- package/dist/{chunk-4MJYA6R5.js → chunk-5MPSOIDR.js} +3 -3
- package/dist/{chunk-RNRRFICE.js → chunk-5UES2U73.js} +1 -1
- package/dist/{chunk-SDNJSBGO.js → chunk-5USJZ6NW.js} +3 -3
- package/dist/{chunk-MXJOVTOT.js → chunk-6YU3R6KT.js} +0 -54
- package/dist/{chunk-F5G7PDQJ.js → chunk-73NLPKNN.js} +1 -0
- package/dist/{chunk-FIFAZLRQ.js → chunk-76LHDHYT.js} +4 -4
- package/dist/{chunk-LLRWUKIR.js → chunk-AJ2ZMY42.js} +21 -21
- package/dist/{chunk-7QGSIPAS.js → chunk-APABCEY4.js} +3 -3
- package/dist/{chunk-WDOLOQAV.js → chunk-DEHR3XUP.js} +2 -2
- package/dist/{chunk-JFYMBFDW.js → chunk-E4GSFRKL.js} +3 -3
- package/dist/{chunk-RI5COFYL.js → chunk-EG5W7EGK.js} +2 -2
- package/dist/{chunk-CM2ONKCQ.js → chunk-GZWCWTWW.js} +7 -5
- package/dist/{chunk-NE6SDXXB.js → chunk-IKQ7AGQF.js} +23 -10
- package/dist/{chunk-27ARMXM2.js → chunk-K5VTXKBR.js} +2 -2
- package/dist/{chunk-JSKBT765.js → chunk-KBVOLS2Y.js} +38 -27
- package/dist/{chunk-33MGV73K.js → chunk-KTQKLRHK.js} +2 -2
- package/dist/{chunk-UJCRJ4XU.js → chunk-MRM7F2AG.js} +3 -3
- package/dist/{chunk-L6EE6XS2.js → chunk-NYNPT2QB.js} +3 -3
- package/dist/{chunk-X2YU7MAC.js → chunk-TFUZHZYD.js} +2 -2
- package/dist/{chunk-C62AROBZ.js → chunk-VAQXCTVC.js} +2 -2
- package/dist/{chunk-ATM2LU6H.js → chunk-YT6RV4YV.js} +1 -1
- package/dist/{chunk-GNR5NWNR.js → chunk-ZNLLNDCO.js} +105 -20
- package/dist/cli.js +3 -3
- package/dist/{coverage-I3FWCRWG.js → coverage-N6W4AASU.js} +4 -4
- package/dist/{dev-PXZCETLB.js → dev-QPQMWQQS.js} +19 -11
- package/dist/{dist-RJ3HLSC7.js → dist-HWVPEW6T.js} +12 -2
- package/dist/index.d.ts +7 -14
- package/dist/index.js +23 -21
- package/dist/{init-GQELTILS.js → init-HAGN6VFO.js} +4 -4
- package/dist/{lint-MR7LHMLU.js → lint-UXAQS37W.js} +2 -2
- package/dist/{login-QW5GZLWK.js → login-PYPRPZKQ.js} +4 -4
- package/dist/{manage-OTGX2SGZ.js → manage-WI3VBXEU.js} +4 -4
- package/dist/{nav-3GHG5U5B.js → nav-OGQ6A4T6.js} +4 -4
- package/dist/{openapiCheck-XAZ6FOF2.js → openapiCheck-IUYQOHOT.js} +2 -2
- package/dist/pages-KNXVBA6S.js +16 -0
- package/dist/{read-UCTHVWS2.js → read-5JX2VT5I.js} +5 -5
- package/dist/{read-6RAHFNPS.js → read-OIAJVVWF.js} +5 -5
- package/dist/requests-HBN7JHUH.js +13 -0
- package/dist/{schema-OEKCGF6Y.js → schema-Q7AE5RAW.js} +3 -3
- package/dist/{sites-L6DPTMX6.js → sites-J6VTPRTR.js} +5 -5
- package/dist/{status-PMVNHRK6.js → status-YB26LFPN.js} +4 -4
- package/dist/{suggestions-WBWQP2UN.js → suggestions-3WG7NIQQ.js} +4 -4
- package/dist/validate-JVRDLMND.js +12 -0
- package/package.json +5 -5
- package/dist/pages-BA3MMNSL.js +0 -16
- package/dist/requests-6OIP4LGE.js +0 -13
- package/dist/validate-LY3ZSHSV.js +0 -12
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
authStatusOf,
|
|
4
4
|
registerAuth,
|
|
5
5
|
savedLoginStatusOf
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-VAQXCTVC.js";
|
|
7
|
+
import "./chunk-TFUZHZYD.js";
|
|
8
8
|
import "./chunk-M2BZEDAS.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-YT6RV4YV.js";
|
|
10
|
+
import "./chunk-73NLPKNN.js";
|
|
11
11
|
export {
|
|
12
12
|
AUTH_METADATA,
|
|
13
13
|
authStatusOf,
|
|
@@ -4,22 +4,22 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
releaseRoute,
|
|
6
6
|
siteRoutes
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DEHR3XUP.js";
|
|
8
8
|
import {
|
|
9
9
|
buildGeneration
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-GZWCWTWW.js";
|
|
11
|
+
import "./chunk-KBVOLS2Y.js";
|
|
12
|
+
import "./chunk-ZNLLNDCO.js";
|
|
13
13
|
import {
|
|
14
14
|
isRedirectPattern
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6YU3R6KT.js";
|
|
16
16
|
import {
|
|
17
17
|
createResultWriter,
|
|
18
18
|
failureResult,
|
|
19
19
|
invalidInput2 as invalidInput,
|
|
20
20
|
resolveGlobalOptions,
|
|
21
21
|
successResult
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-73NLPKNN.js";
|
|
23
23
|
|
|
24
24
|
// src/lib/preview/check-links.ts
|
|
25
25
|
import { mkdtempSync, readFileSync, readdirSync, realpathSync, rmSync } from "fs";
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
} from "./chunk-LDE53VKA.js";
|
|
4
4
|
import {
|
|
5
5
|
buildGeneration
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-GZWCWTWW.js";
|
|
7
|
+
import "./chunk-KBVOLS2Y.js";
|
|
8
|
+
import "./chunk-ZNLLNDCO.js";
|
|
9
|
+
import "./chunk-6YU3R6KT.js";
|
|
10
10
|
import {
|
|
11
11
|
createResultWriter,
|
|
12
12
|
failureResult,
|
|
13
13
|
resolveGlobalOptions,
|
|
14
14
|
successResult
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-73NLPKNN.js";
|
|
16
16
|
|
|
17
17
|
// src/lib/preview/output.ts
|
|
18
18
|
import { createHash, randomUUID } from "crypto";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
windowsUnsupported,
|
|
25
25
|
withCredentialLock,
|
|
26
26
|
withPollLock
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-TFUZHZYD.js";
|
|
28
28
|
import {
|
|
29
29
|
applyCommandHelp
|
|
30
30
|
} from "./chunk-M2BZEDAS.js";
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
parseOrigin,
|
|
38
38
|
resolveGlobalOptions,
|
|
39
39
|
successResult
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-73NLPKNN.js";
|
|
41
41
|
|
|
42
42
|
// src/commands/login.ts
|
|
43
43
|
import { execFile } from "child_process";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SITES_CREATE_METADATA,
|
|
3
3
|
registerSitesCreate
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4Y6MLUWG.js";
|
|
5
5
|
import {
|
|
6
6
|
asCliError,
|
|
7
7
|
clientFor
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TFUZHZYD.js";
|
|
9
9
|
import {
|
|
10
10
|
applyCommandHelp
|
|
11
11
|
} from "./chunk-M2BZEDAS.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
resolveGlobalOptions,
|
|
22
22
|
resolveTarget,
|
|
23
23
|
successResult
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-73NLPKNN.js";
|
|
25
25
|
|
|
26
26
|
// src/commands/sites.ts
|
|
27
27
|
var SITES_METADATA = Object.freeze([
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
requestedSite
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5MPSOIDR.js";
|
|
4
4
|
import {
|
|
5
5
|
asCliError,
|
|
6
6
|
clientFor
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TFUZHZYD.js";
|
|
8
8
|
import {
|
|
9
9
|
applyCommandHelp
|
|
10
10
|
} from "./chunk-M2BZEDAS.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
resolveGlobalOptions,
|
|
21
21
|
resolveTarget,
|
|
22
22
|
successResult
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-73NLPKNN.js";
|
|
24
24
|
|
|
25
25
|
// src/commands/pages.ts
|
|
26
26
|
import { InvalidArgumentError } from "commander";
|
|
@@ -860,58 +860,6 @@ async function loadDocsConfig(filePath) {
|
|
|
860
860
|
}
|
|
861
861
|
return parseDocsConfig(parsed);
|
|
862
862
|
}
|
|
863
|
-
async function loadModelsConfig(filePath) {
|
|
864
|
-
let raw;
|
|
865
|
-
try {
|
|
866
|
-
raw = await readFile(filePath, "utf8");
|
|
867
|
-
} catch (cause) {
|
|
868
|
-
throw new Error(`Could not read models.toml at ${filePath}: ${errorMessage(cause)}`);
|
|
869
|
-
}
|
|
870
|
-
return parseModelsConfigValue(raw, `models.toml at ${filePath}`);
|
|
871
|
-
}
|
|
872
|
-
function parseModelsConfig(toml, platformApiBase) {
|
|
873
|
-
return parseModelsConfigValue(toml, "models.toml", platformApiBase);
|
|
874
|
-
}
|
|
875
|
-
function parseModelsConfigValue(toml, label, platformApiBase) {
|
|
876
|
-
let parsed;
|
|
877
|
-
try {
|
|
878
|
-
parsed = parseToml(toml);
|
|
879
|
-
} catch (cause) {
|
|
880
|
-
throw new Error(`${label} is not valid TOML: ${errorMessage(cause)}`);
|
|
881
|
-
}
|
|
882
|
-
const result = modelsConfigSchema.safeParse(parsed);
|
|
883
|
-
if (!result.success) {
|
|
884
|
-
throw new Error(formatZodError(result.error, "models.toml"));
|
|
885
|
-
}
|
|
886
|
-
return applyModelsDefaults(result.data, platformApiBase);
|
|
887
|
-
}
|
|
888
|
-
var HOSTED_MODEL_API_BASE = "https://openrouter.ai/api/v1";
|
|
889
|
-
var HOSTED_MODEL_KEY_ENV = "OPENROUTER_API_KEY";
|
|
890
|
-
var DEFAULT_ASSISTANT_CACHE = true;
|
|
891
|
-
var DEFAULT_ASSISTANT_MAX_ITERATIONS = 4;
|
|
892
|
-
function applyModelsDefaults(config, platformApiBase) {
|
|
893
|
-
const endpoint = config.endpoint ?? {};
|
|
894
|
-
const behavior = config.behavior ?? {};
|
|
895
|
-
return {
|
|
896
|
-
...config,
|
|
897
|
-
models: {
|
|
898
|
-
synthesis: config.models.synthesis,
|
|
899
|
-
suggestion: config.models.suggestion ?? config.models.synthesis
|
|
900
|
-
},
|
|
901
|
-
endpoint: {
|
|
902
|
-
api_base: endpoint.api_base ?? platformModelApiBase(platformApiBase),
|
|
903
|
-
api_key_env: endpoint.api_key_env ?? HOSTED_MODEL_KEY_ENV
|
|
904
|
-
},
|
|
905
|
-
behavior: {
|
|
906
|
-
cache: behavior.cache ?? DEFAULT_ASSISTANT_CACHE,
|
|
907
|
-
max_iterations: behavior.max_iterations ?? DEFAULT_ASSISTANT_MAX_ITERATIONS
|
|
908
|
-
}
|
|
909
|
-
};
|
|
910
|
-
}
|
|
911
|
-
function platformModelApiBase(platformApiBase) {
|
|
912
|
-
const trimmed = platformApiBase?.trim() ?? "";
|
|
913
|
-
return trimmed === "" ? HOSTED_MODEL_API_BASE : trimmed;
|
|
914
|
-
}
|
|
915
863
|
function errorMessage(cause) {
|
|
916
864
|
return cause instanceof Error ? cause.message : String(cause);
|
|
917
865
|
}
|
|
@@ -1543,8 +1491,6 @@ export {
|
|
|
1543
1491
|
navigationIconRefs,
|
|
1544
1492
|
navigationGroups,
|
|
1545
1493
|
loadDocsConfig,
|
|
1546
|
-
loadModelsConfig,
|
|
1547
|
-
parseModelsConfig,
|
|
1548
1494
|
configuredAssetHref,
|
|
1549
1495
|
assetPathname,
|
|
1550
1496
|
parseOpenApi,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readTextInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5UES2U73.js";
|
|
4
4
|
import {
|
|
5
5
|
asCliError,
|
|
6
6
|
clientFor
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TFUZHZYD.js";
|
|
8
8
|
import {
|
|
9
9
|
applyCommandHelp
|
|
10
10
|
} from "./chunk-M2BZEDAS.js";
|
|
11
11
|
import {
|
|
12
12
|
interruptSignal
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YT6RV4YV.js";
|
|
14
14
|
import {
|
|
15
15
|
CliError,
|
|
16
16
|
DEFAULT_REQUEST_WAIT_MS,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
retryRequest,
|
|
34
34
|
successResult,
|
|
35
35
|
waitForRequest
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-73NLPKNN.js";
|
|
37
37
|
|
|
38
38
|
// src/commands/requests/create.ts
|
|
39
39
|
var REQUESTS_CREATE_METADATA = Object.freeze([
|
|
@@ -6,32 +6,32 @@ async function preview(name) {
|
|
|
6
6
|
};
|
|
7
7
|
const provider = () => resolveRenderer({ reportLimitation: report, reportOffline: report });
|
|
8
8
|
const cache = previewCacheDir();
|
|
9
|
-
if (name === "dev") return import("./dev-
|
|
10
|
-
if (name === "build") return import("./build-
|
|
11
|
-
return import("./broken-links-
|
|
9
|
+
if (name === "dev") return import("./dev-QPQMWQQS.js").then((m) => (program) => m.registerDev(program, provider, cache));
|
|
10
|
+
if (name === "build") return import("./build-MHVOQFLW.js").then((m) => (program) => m.registerBuild(program, provider, cache));
|
|
11
|
+
return import("./broken-links-4AGMC2MO.js").then((m) => (program) => m.registerBrokenLinks(program, provider, cache));
|
|
12
12
|
}
|
|
13
13
|
var COMMAND_GROUPS = Object.freeze([
|
|
14
|
-
{ name: "manage", summary: "Call one management operation through the dashboard API", renderer: false, load: () => import("./manage-
|
|
15
|
-
{ name: "requests", hidden: process.env.SATURNDOCS_BETA !== "1", summary: "Beta. Documentation requests and the conversations behind them", renderer: false, load: () => import("./requests-
|
|
16
|
-
{ name: "suggestions", hidden: process.env.SATURNDOCS_BETA !== "1", summary: "Beta. Read a site's suggestions and diff the content they carry", renderer: false, load: () => import("./suggestions-
|
|
17
|
-
{ name: "schema", summary: "Print this CLI's own command metadata, locally", renderer: false, load: () => import("./schema-
|
|
18
|
-
{ name: "login", summary: "Ask a person to approve this agent for one site, then save the login", renderer: false, load: () => import("./login-
|
|
19
|
-
{ name: "logout", summary: "Revoke a saved login and delete it from this computer", renderer: false, load: () => import("./login-
|
|
20
|
-
{ name: "auth", summary: "Check the credential this CLI will use", renderer: false, load: () => import("./auth-
|
|
21
|
-
{ name: "sites", summary: "Create a site, or discover and inspect the sites this credential reaches", renderer: false, load: () => import("./sites-
|
|
22
|
-
{ name: "pages", summary: "Read the published pages of the release readers are seeing", renderer: false, load: () => import("./pages-
|
|
23
|
-
{ name: "releases", summary: "Read this site's release history and one release by id", renderer: false, load: () => import("./read-
|
|
24
|
-
{ name: "status", summary: "One bounded briefing on a site, section by section", renderer: false, load: () => import("./status-
|
|
25
|
-
{ name: "activity", summary: "Read what the platform did, and one job by id", renderer: false, load: () => import("./read-
|
|
26
|
-
{ name: "nav", summary: "Rewrite docs.json navigation from an approved outline", renderer: false, load: () => import("./nav-
|
|
27
|
-
{ name: "lint", summary: "Content lint and the known-pitfalls catalog over every page; exits 2 when any finding is an error", renderer: false, load: () => import("./lint-
|
|
28
|
-
{ name: "coverage", summary: "Check local pages against an approved outline", renderer: false, load: () => import("./coverage-
|
|
29
|
-
{ name: "init", summary: "Scaffold a docs project", renderer: true, load: () => import("./init-
|
|
30
|
-
{ name: "validate", summary: "Validate docs.json,
|
|
14
|
+
{ name: "manage", summary: "Call one management operation through the dashboard API", renderer: false, load: () => import("./manage-WI3VBXEU.js").then((m) => m.registerManage), metadata: () => import("./manage-WI3VBXEU.js").then((m) => m.MANAGE_METADATA) },
|
|
15
|
+
{ name: "requests", hidden: process.env.SATURNDOCS_BETA !== "1", summary: "Beta. Documentation requests and the conversations behind them", renderer: false, load: () => import("./requests-HBN7JHUH.js").then((m) => m.registerRequests), metadata: () => import("./requests-HBN7JHUH.js").then((m) => m.REQUESTS_METADATA) },
|
|
16
|
+
{ name: "suggestions", hidden: process.env.SATURNDOCS_BETA !== "1", summary: "Beta. Read a site's suggestions and diff the content they carry", renderer: false, load: () => import("./suggestions-3WG7NIQQ.js").then((m) => m.registerSuggestions), metadata: () => import("./suggestions-3WG7NIQQ.js").then((m) => m.SUGGESTIONS_METADATA) },
|
|
17
|
+
{ name: "schema", summary: "Print this CLI's own command metadata, locally", renderer: false, load: () => import("./schema-Q7AE5RAW.js").then((m) => m.registerSchema), metadata: () => import("./schema-Q7AE5RAW.js").then((m) => m.SCHEMA_METADATA) },
|
|
18
|
+
{ name: "login", summary: "Ask a person to approve this agent for one site, then save the login", renderer: false, load: () => import("./login-PYPRPZKQ.js").then((m) => m.registerLogin), metadata: () => import("./login-PYPRPZKQ.js").then((m) => m.LOGIN_METADATA) },
|
|
19
|
+
{ name: "logout", summary: "Revoke a saved login and delete it from this computer", renderer: false, load: () => import("./login-PYPRPZKQ.js").then((m) => m.registerLogout), metadata: () => import("./login-PYPRPZKQ.js").then((m) => m.LOGOUT_METADATA) },
|
|
20
|
+
{ name: "auth", summary: "Check the credential this CLI will use", renderer: false, load: () => import("./auth-3MLMF5Q3.js").then((m) => m.registerAuth), metadata: () => import("./auth-3MLMF5Q3.js").then((m) => m.AUTH_METADATA) },
|
|
21
|
+
{ name: "sites", summary: "Create a site, or discover and inspect the sites this credential reaches", renderer: false, load: () => import("./sites-J6VTPRTR.js").then((m) => m.registerSites), metadata: () => import("./sites-J6VTPRTR.js").then((m) => m.SITES_METADATA) },
|
|
22
|
+
{ name: "pages", summary: "Read the published pages of the release readers are seeing", renderer: false, load: () => import("./pages-KNXVBA6S.js").then((m) => m.registerPages), metadata: () => import("./pages-KNXVBA6S.js").then((m) => m.PAGES_METADATA) },
|
|
23
|
+
{ name: "releases", summary: "Read this site's release history and one release by id", renderer: false, load: () => import("./read-OIAJVVWF.js").then((m) => m.registerReleases), metadata: () => import("./read-OIAJVVWF.js").then((m) => m.RELEASES_METADATA) },
|
|
24
|
+
{ name: "status", summary: "One bounded briefing on a site, section by section", renderer: false, load: () => import("./status-YB26LFPN.js").then((m) => m.registerStatus), metadata: () => import("./status-YB26LFPN.js").then((m) => m.STATUS_METADATA) },
|
|
25
|
+
{ name: "activity", summary: "Read what the platform did, and one job by id", renderer: false, load: () => import("./read-5JX2VT5I.js").then((m) => m.registerActivity), metadata: () => import("./read-5JX2VT5I.js").then((m) => m.ACTIVITY_METADATA) },
|
|
26
|
+
{ name: "nav", summary: "Rewrite docs.json navigation from an approved outline", renderer: false, load: () => import("./nav-OGQ6A4T6.js").then((m) => m.registerNav), metadata: () => import("./nav-OGQ6A4T6.js").then((m) => m.NAV_METADATA) },
|
|
27
|
+
{ name: "lint", summary: "Content lint and the known-pitfalls catalog over every page; exits 2 when any finding is an error", renderer: false, load: () => import("./lint-UXAQS37W.js").then((m) => m.registerLint), metadata: () => import("./lint-UXAQS37W.js").then((m) => m.LINT_METADATA) },
|
|
28
|
+
{ name: "coverage", summary: "Check local pages against an approved outline", renderer: false, load: () => import("./coverage-N6W4AASU.js").then((m) => m.registerCoverage), metadata: () => import("./coverage-N6W4AASU.js").then((m) => m.COVERAGE_METADATA) },
|
|
29
|
+
{ name: "init", summary: "Scaffold a docs project", renderer: true, load: () => import("./init-HAGN6VFO.js").then((m) => m.registerInit) },
|
|
30
|
+
{ name: "validate", summary: "Validate docs.json, page files, and OpenAPI specs", renderer: true, load: () => import("./validate-JVRDLMND.js").then((m) => m.registerValidate) },
|
|
31
31
|
{ name: "dev", summary: "Preview the docs on this computer with the production renderer, rebuilding on each change", renderer: true, load: () => preview("dev") },
|
|
32
32
|
{ name: "build", summary: "Build the docs into a static site with the production renderer", renderer: true, load: () => preview("build") },
|
|
33
33
|
{ name: "broken-links", summary: "Build the docs and report every link that does not resolve", renderer: true, load: () => preview("broken-links") },
|
|
34
|
-
{ name: "openapi-check", summary: "Parse OpenAPI specs and print an operation table", renderer: true, load: () => import("./openapiCheck-
|
|
34
|
+
{ name: "openapi-check", summary: "Parse OpenAPI specs and print an operation table", renderer: true, load: () => import("./openapiCheck-IUYQOHOT.js").then((m) => m.registerOpenapiCheck) }
|
|
35
35
|
]);
|
|
36
36
|
var COMMAND_GROUP_NAMES = Object.freeze(COMMAND_GROUPS.map((group) => group.name));
|
|
37
37
|
var LISTED_COMMAND_GROUPS = Object.freeze(COMMAND_GROUPS.filter((group) => group.hidden !== true));
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-YGVC4N4V.js";
|
|
4
4
|
import {
|
|
5
5
|
asCliError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TFUZHZYD.js";
|
|
7
7
|
import {
|
|
8
8
|
applyCommandHelp
|
|
9
9
|
} from "./chunk-M2BZEDAS.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
messageOf,
|
|
16
16
|
resolveGlobalOptions,
|
|
17
17
|
successResult
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-73NLPKNN.js";
|
|
19
19
|
|
|
20
20
|
// src/commands/coverage.ts
|
|
21
21
|
import { existsSync } from "fs";
|
|
@@ -49,7 +49,7 @@ async function runCoverage(docsDir, outlinePath) {
|
|
|
49
49
|
} catch (error) {
|
|
50
50
|
throw invalidInput(`Cannot read the outline file ${outlinePath}: ${messageOf(error)}`);
|
|
51
51
|
}
|
|
52
|
-
const { parseOutline, outlineCoverage } = await import("./dist-
|
|
52
|
+
const { parseOutline, outlineCoverage } = await import("./dist-HWVPEW6T.js");
|
|
53
53
|
let outline;
|
|
54
54
|
try {
|
|
55
55
|
outline = parseOutline(JSON.parse(raw));
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
MCP_SERVER_CARD_CONTENT_TYPE,
|
|
6
6
|
MCP_SERVER_CARD_LEGACY_PATH,
|
|
7
7
|
MCP_SERVER_CARD_PATH
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-GZWCWTWW.js";
|
|
9
9
|
import {
|
|
10
10
|
NAV_VARIANT_DIRECTORY,
|
|
11
11
|
NAV_VARIANT_SOURCE_DIRECTORY,
|
|
12
12
|
compileRedirects
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6YU3R6KT.js";
|
|
14
14
|
|
|
15
15
|
// ../runtime/src/manifest.ts
|
|
16
16
|
var CONTENT_TYPES = {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AGENT_INSTRUCTIONS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZNLLNDCO.js";
|
|
4
4
|
import {
|
|
5
5
|
loadDocsConfig
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6YU3R6KT.js";
|
|
7
7
|
import {
|
|
8
8
|
createResultWriter,
|
|
9
9
|
failureResult,
|
|
10
10
|
invalidInput2 as invalidInput,
|
|
11
11
|
resolveGlobalOptions,
|
|
12
12
|
successResult
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-73NLPKNN.js";
|
|
14
14
|
|
|
15
15
|
// src/commands/init.ts
|
|
16
16
|
import { existsSync } from "fs";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
invalidInput2 as invalidInput,
|
|
12
12
|
resolveGlobalOptions,
|
|
13
13
|
successResult
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-73NLPKNN.js";
|
|
15
15
|
|
|
16
16
|
// src/commands/lint.ts
|
|
17
17
|
import { existsSync } from "fs";
|
|
@@ -30,7 +30,7 @@ var LINT_METADATA = Object.freeze([
|
|
|
30
30
|
})
|
|
31
31
|
]);
|
|
32
32
|
async function lintDocsDir(docsDir) {
|
|
33
|
-
const { lintContent, checkPitfalls, validatePageBytes, violationGuidance } = await import("./dist-
|
|
33
|
+
const { lintContent, checkPitfalls, validatePageBytes, violationGuidance } = await import("./dist-HWVPEW6T.js");
|
|
34
34
|
const pages = await readPageFiles(docsDir);
|
|
35
35
|
const findings = [];
|
|
36
36
|
for (const page of pages) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
collectOutsideRootFiles,
|
|
3
3
|
configLocator,
|
|
4
|
-
|
|
5
|
-
} from "./chunk-
|
|
4
|
+
validateDocsDetailed
|
|
5
|
+
} from "./chunk-KBVOLS2Y.js";
|
|
6
6
|
import {
|
|
7
7
|
SOURCE_ALLOWED_ROOTS,
|
|
8
8
|
SOURCE_LIMITS,
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
frontmatterPolicy,
|
|
13
13
|
normalizeComponentMarkdown,
|
|
14
14
|
validateBundleStructure
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZNLLNDCO.js";
|
|
16
16
|
import {
|
|
17
17
|
parseDocsConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-6YU3R6KT.js";
|
|
19
19
|
|
|
20
20
|
// src/lib/preview/components.ts
|
|
21
21
|
import { spawn } from "child_process";
|
|
@@ -1606,11 +1606,13 @@ async function buildGeneration(docs, dir, cache, renderer, siteUrl, policyChecke
|
|
|
1606
1606
|
}
|
|
1607
1607
|
const invalid = validateBundleStructure(inventory).filter((v) => v.severity === "error");
|
|
1608
1608
|
if (invalid.length) throw new Error(invalid.map((v) => `${v.path}: ${v.message}`).join("\n"));
|
|
1609
|
-
const
|
|
1609
|
+
const validation = await validateDocsDetailed(source, new Set(paths));
|
|
1610
|
+
const errors = validation.errors.filter((e) => linkCheck === "source" || e.code !== "unresolved_link");
|
|
1610
1611
|
if (errors.length) throw new Error(errors.map((e) => `${e.path ?? "bundle"}:${e.line ?? 1}:${e.column ?? 1}: ${e.message} ${e.fix ?? ""}`).join("\n"));
|
|
1611
1612
|
const site = new URL(siteUrl ?? config.siteUrl ?? "http://localhost/");
|
|
1612
1613
|
if (!["https:", "http:"].includes(site.protocol) || site.username || site.password) throw new Error("Expected an HTTP(S) site URL");
|
|
1613
1614
|
const { fonts, warnings } = await previewFonts(config, cache, join4(dir, "fonts"), signal);
|
|
1615
|
+
warnings.push(...validation.warnings.map((issue) => `${issue.path ?? "bundle"}: ${issue.message}`));
|
|
1614
1616
|
signal?.throwIfAborted();
|
|
1615
1617
|
const components = await previewComponents(source, paths, dir, renderer.root, signal);
|
|
1616
1618
|
const out = join4(dir, "site");
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
validateDocsDetailed
|
|
3
|
+
} from "./chunk-KBVOLS2Y.js";
|
|
4
4
|
import {
|
|
5
5
|
createResultWriter,
|
|
6
6
|
failureResult,
|
|
7
7
|
invalidInput2 as invalidInput,
|
|
8
8
|
resolveGlobalOptions,
|
|
9
9
|
successResult
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-73NLPKNN.js";
|
|
11
11
|
|
|
12
12
|
// src/commands/validate.ts
|
|
13
13
|
import { existsSync } from "fs";
|
|
@@ -17,17 +17,30 @@ function place(issue) {
|
|
|
17
17
|
if (issue.line === null) return issue.path;
|
|
18
18
|
return issue.column === null ? `${issue.path}:${issue.line}` : `${issue.path}:${issue.line}:${issue.column}`;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
const lines = [`\u2716 ${report.errors.length} validation error(s) in ${report.docs_dir}:`];
|
|
23
|
-
for (const issue of report.errors) {
|
|
20
|
+
function appendIssues(lines, issues) {
|
|
21
|
+
for (const issue of issues) {
|
|
24
22
|
lines.push(` - ${place(issue)} ${issue.code}: ${issue.message}`);
|
|
25
23
|
if (issue.fix !== null) lines.push(` fix: ${issue.fix}`);
|
|
26
24
|
}
|
|
25
|
+
}
|
|
26
|
+
function validateReportText(report) {
|
|
27
|
+
const warnings = report.warnings ?? [];
|
|
28
|
+
if (report.valid) {
|
|
29
|
+
if (warnings.length === 0) return `\u2713 ${report.docs_dir} is valid.`;
|
|
30
|
+
const lines2 = [`\u2713 ${report.docs_dir} is valid (${warnings.length} warning(s)):`];
|
|
31
|
+
appendIssues(lines2, warnings);
|
|
32
|
+
return lines2.join("\n");
|
|
33
|
+
}
|
|
34
|
+
const lines = [`\u2716 ${report.errors.length} validation error(s) in ${report.docs_dir}:`];
|
|
35
|
+
appendIssues(lines, report.errors);
|
|
36
|
+
if (warnings.length > 0) {
|
|
37
|
+
lines.push(`Warnings (${warnings.length}):`);
|
|
38
|
+
appendIssues(lines, warnings);
|
|
39
|
+
}
|
|
27
40
|
return lines.join("\n");
|
|
28
41
|
}
|
|
29
42
|
function registerValidate(program) {
|
|
30
|
-
program.command("validate").description("Validate docs.json,
|
|
43
|
+
program.command("validate").description("Validate docs.json, page files, and OpenAPI specs").argument("[dir]", "docs directory (contains docs.json)").action(async (dir, _options, self) => {
|
|
31
44
|
const globals = resolveGlobalOptions(self);
|
|
32
45
|
const writer = createResultWriter({ json: globals.json });
|
|
33
46
|
const context = { command: "validate", siteId: null };
|
|
@@ -36,8 +49,8 @@ function registerValidate(program) {
|
|
|
36
49
|
if (!existsSync(resolve(docsDir, "docs.json"))) {
|
|
37
50
|
throw invalidInput(`No docs.json found in ${docsDir}. Pass a docs directory.`);
|
|
38
51
|
}
|
|
39
|
-
const errors = await
|
|
40
|
-
const report = { docs_dir: docsDir, valid: errors.length === 0, errors };
|
|
52
|
+
const { errors, warnings } = await validateDocsDetailed(docsDir);
|
|
53
|
+
const report = { docs_dir: docsDir, valid: errors.length === 0, errors, warnings };
|
|
41
54
|
if (!report.valid) throw invalidInput(validateReportText(report), { data: report });
|
|
42
55
|
process.exitCode = writer.write(successResult(context, report), { text: validateReportText(report) });
|
|
43
56
|
} catch (error) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
asCliError,
|
|
3
3
|
clientFor
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TFUZHZYD.js";
|
|
5
5
|
import {
|
|
6
6
|
applyCommandHelp
|
|
7
7
|
} from "./chunk-M2BZEDAS.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
statusRecovery,
|
|
21
21
|
statusSections,
|
|
22
22
|
successResult
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-73NLPKNN.js";
|
|
24
24
|
|
|
25
25
|
// src/commands/status.ts
|
|
26
26
|
var STATUS_METADATA = Object.freeze([
|