fix(collections): generate the content collections into one place

`@hanzo/docs-mdx` writes the collection modules to its outDir, `.docs/`.
Nothing read them there. Apps read a committed `docs/` copy instead, reached
three different ways:

  13 apps  `@hanzo/mdx:collections/server` + a webpack alias -> ./docs/*.ts
   3 apps  `@/docs/server`, straight into the committed copy
   2 apps  the alias, with no committed copy at all

The two with no copy — bootnode-docs and tasks-docs — could not build:

    ./lib/source.tsx
    Module not found: Can't resolve '@hanzo/mdx:collections/server'

and four more built from a copy that no longer matched the content beside it:

    ./docs/server.ts
    Module not found: Can't resolve
      '../content/docs/reference/templates/USER.mdx?collection=docs&only=frontmatter'

That is what committing generated code buys: the build reads a snapshot of
the content rather than the content.

One name, one location, every app: `@hanzo/mdx:collections/*`, resolved to
`.docs/` — the generator's own output, rewritten on every build, gitignored.
`tsconfig` gains the matching `paths` entry so the specifier type-checks
instead of relying on `ignoreBuildErrors`; apps/docs stops overriding outDir
in both `next.config.mts` and `gen:collections`; turbo caches `.docs/**`. The
16 committed mirrors are deleted. Examples already did it this way.

`.source` goes with them — this fork's outDir has been `.docs` for a while,
leaving `.source` in the vite plugin's JSDoc, an example's import map, an
oxlint ignore and `.gitignore` pointing at a directory nothing writes.

Also declares in `globalEnv` the env vars the build scripts actually read
(HANZO_DOCS_SYNC, HIPS_REPO_DIR, DOCS_SECTION, the search vars...). Turbo
does not forward undeclared vars, so `HANZO_DOCS_SYNC=0 turbo run build` had
no effect on the sync it names.

  turbo run build --filter='./apps/*' --continue
    before  Tasks: 33 successful, 40 total
            Failed: bootnode-docs, docs, engine-docs, ml-docs, router-docs,
                    spec, tasks-docs
    after   Tasks: 38 successful, 40 total
            Failed: docs, spec        (both for unrelated reasons, fixed next)

(cherry picked from commit 3d11394b092530489b60931e46b4938a88a2bdd5)

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-08-04 18:39:19 -07:00
co-authored by Hanzo Dev
parent de89d679bc
commit 012a1a2d4e
128 changed files with 164 additions and 6353 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ dist
out
.contentlayer
.eslintcache
.source
.docs
# production
/build
-28
View File
@@ -1,28 +0,0 @@
// @ts-nocheck
import { browser } from '@hanzo/docs-mdx/runtime/browser';
import type * as Config from '../source.config';
const create = browser<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
docs: {
/**
* extracted references (e.g. hrefs, paths), useful for analyzing relationships between pages.
*/
extractedReferences: import("@hanzo/docs-mdx").ExtractedReference[];
},
}
} & {
DocData: {
docs: {
/**
* Last modified date of document file, obtained from version control.
*
*/
lastModified?: Date;
},
}
}>();
const browserCollections = {
docs: create.doc("docs", {"index.mdx": () => import("../content/docs/index.mdx?collection=docs"), "partner-guide.mdx": () => import("../content/docs/partner-guide.mdx?collection=docs"), "auth/index.mdx": () => import("../content/docs/auth/index.mdx?collection=docs"), "cloud-functions/index.mdx": () => import("../content/docs/cloud-functions/index.mdx?collection=docs"), "collections/index.mdx": () => import("../content/docs/collections/index.mdx?collection=docs"), "getting-started/index.mdx": () => import("../content/docs/getting-started/index.mdx?collection=docs"), "getting-started/installation.mdx": () => import("../content/docs/getting-started/installation.mdx?collection=docs"), "getting-started/project-structure.mdx": () => import("../content/docs/getting-started/project-structure.mdx?collection=docs"), "getting-started/quickstart.mdx": () => import("../content/docs/getting-started/quickstart.mdx?collection=docs"), "file-storage/index.mdx": () => import("../content/docs/file-storage/index.mdx?collection=docs"), "realtime/index.mdx": () => import("../content/docs/realtime/index.mdx?collection=docs"), "deployment/index.mdx": () => import("../content/docs/deployment/index.mdx?collection=docs"), "sdk/go.mdx": () => import("../content/docs/sdk/go.mdx?collection=docs"), "sdk/index.mdx": () => import("../content/docs/sdk/index.mdx?collection=docs"), "sdk/javascript.mdx": () => import("../content/docs/sdk/javascript.mdx?collection=docs"), }),
};
export default browserCollections;
-24
View File
@@ -1,24 +0,0 @@
// @ts-nocheck
import { dynamic } from '@hanzo/docs-mdx/runtime/dynamic';
import * as Config from '../source.config';
const create = await dynamic<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
docs: {
/**
* extracted references (e.g. hrefs, paths), useful for analyzing relationships between pages.
*/
extractedReferences: import("@hanzo/docs-mdx").ExtractedReference[];
},
}
} & {
DocData: {
docs: {
/**
* Last modified date of document file, obtained from version control.
*
*/
lastModified?: Date;
},
}
}>(Config, {"configPath":"source.config.ts","environment":"next","outDir":"docs"}, {"doc":{"passthroughs":["extractedReferences","lastModified"]}});
-44
View File
@@ -1,44 +0,0 @@
// @ts-nocheck
import { frontmatter as __fd_glob_17 } from "../content/docs/sdk/javascript.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_16 } from "../content/docs/sdk/index.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_15 } from "../content/docs/sdk/go.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_14 } from "../content/docs/deployment/index.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_13 } from "../content/docs/realtime/index.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_12 } from "../content/docs/file-storage/index.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_11 } from "../content/docs/getting-started/quickstart.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_10 } from "../content/docs/getting-started/project-structure.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_9 } from "../content/docs/getting-started/installation.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_8 } from "../content/docs/getting-started/index.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_7 } from "../content/docs/collections/index.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_6 } from "../content/docs/cloud-functions/index.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_5 } from "../content/docs/auth/index.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_4 } from "../content/docs/partner-guide.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_3 } from "../content/docs/index.mdx?collection=docs&only=frontmatter"
import { default as __fd_glob_2 } from "../content/docs/getting-started/meta.json?collection=docs"
import { default as __fd_glob_1 } from "../content/docs/sdk/meta.json?collection=docs"
import { default as __fd_glob_0 } from "../content/docs/meta.json?collection=docs"
import { server } from '@hanzo/docs-mdx/runtime/server';
import type * as Config from '../source.config';
const create = server<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
docs: {
/**
* extracted references (e.g. hrefs, paths), useful for analyzing relationships between pages.
*/
extractedReferences: import("@hanzo/docs-mdx").ExtractedReference[];
},
}
} & {
DocData: {
docs: {
/**
* Last modified date of document file, obtained from version control.
*
*/
lastModified?: Date;
},
}
}>({"doc":{"passthroughs":["extractedReferences","lastModified"]}});
export const docs = await create.docsLazy("docs", "content/docs", {"meta.json": __fd_glob_0, "sdk/meta.json": __fd_glob_1, "getting-started/meta.json": __fd_glob_2, }, {"index.mdx": __fd_glob_3, "partner-guide.mdx": __fd_glob_4, "auth/index.mdx": __fd_glob_5, "cloud-functions/index.mdx": __fd_glob_6, "collections/index.mdx": __fd_glob_7, "getting-started/index.mdx": __fd_glob_8, "getting-started/installation.mdx": __fd_glob_9, "getting-started/project-structure.mdx": __fd_glob_10, "getting-started/quickstart.mdx": __fd_glob_11, "file-storage/index.mdx": __fd_glob_12, "realtime/index.mdx": __fd_glob_13, "deployment/index.mdx": __fd_glob_14, "sdk/go.mdx": __fd_glob_15, "sdk/index.mdx": __fd_glob_16, "sdk/javascript.mdx": __fd_glob_17, }, {"index.mdx": () => import("../content/docs/index.mdx?collection=docs"), "partner-guide.mdx": () => import("../content/docs/partner-guide.mdx?collection=docs"), "auth/index.mdx": () => import("../content/docs/auth/index.mdx?collection=docs"), "cloud-functions/index.mdx": () => import("../content/docs/cloud-functions/index.mdx?collection=docs"), "collections/index.mdx": () => import("../content/docs/collections/index.mdx?collection=docs"), "getting-started/index.mdx": () => import("../content/docs/getting-started/index.mdx?collection=docs"), "getting-started/installation.mdx": () => import("../content/docs/getting-started/installation.mdx?collection=docs"), "getting-started/project-structure.mdx": () => import("../content/docs/getting-started/project-structure.mdx?collection=docs"), "getting-started/quickstart.mdx": () => import("../content/docs/getting-started/quickstart.mdx?collection=docs"), "file-storage/index.mdx": () => import("../content/docs/file-storage/index.mdx?collection=docs"), "realtime/index.mdx": () => import("../content/docs/realtime/index.mdx?collection=docs"), "deployment/index.mdx": () => import("../content/docs/deployment/index.mdx?collection=docs"), "sdk/go.mdx": () => import("../content/docs/sdk/go.mdx?collection=docs"), "sdk/index.mdx": () => import("../content/docs/sdk/index.mdx?collection=docs"), "sdk/javascript.mdx": () => import("../content/docs/sdk/javascript.mdx?collection=docs"), });
-66
View File
@@ -1,66 +0,0 @@
// source.config.ts
import {
applyMdxPreset,
defineConfig,
defineDocs,
frontmatterSchema,
metaSchema
} from "@hanzo/docs-mdx/config";
import { z } from "zod";
import lastModified from "@hanzo/docs-mdx/plugins/last-modified";
var docs = defineDocs({
docs: {
schema: frontmatterSchema.extend({
index: z.boolean().default(false)
}),
postprocess: {
includeProcessedMarkdown: true,
extractLinkReferences: true
},
async: true,
async mdxOptions(environment) {
const { rehypeCodeDefaultOptions } = await import("@hanzo/docs-core/mdx-plugins/rehype-code");
const { remarkStructureDefaultOptions } = await import("@hanzo/docs-core/mdx-plugins/remark-structure");
const { remarkSteps } = await import("@hanzo/docs-core/mdx-plugins/remark-steps");
return applyMdxPreset({
remarkStructureOptions: {
types: [...remarkStructureDefaultOptions.types, "code"]
},
rehypeCodeOptions: {
langs: ["ts", "js", "go", "rust", "python", "bash", "json", "yaml", "sql", "typescript", "javascript", "shell"],
inline: "tailing-curly-colon",
themes: {
light: "github-light",
dark: "github-dark"
},
transformers: [
...rehypeCodeDefaultOptions.transformers ?? []
]
},
remarkCodeTabOptions: {
parseMdx: true
},
remarkNpmOptions: {
persist: {
id: "package-manager"
}
},
remarkPlugins: [remarkSteps]
})(environment);
}
},
meta: {
schema: metaSchema.extend({
description: z.string().optional()
})
}
});
var source_config_default = defineConfig({
plugins: [
lastModified()
]
});
export {
source_config_default as default,
docs
};
+3 -3
View File
@@ -16,9 +16,9 @@ const config: NextConfig = {
webpack: (config) => {
config.resolve.alias = {
...config.resolve.alias,
'@hanzo/mdx:collections/server': resolve(__dirname, './docs/server.ts'),
'@hanzo/mdx:collections/browser': resolve(__dirname, './docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './docs/dynamic.ts'),
'@hanzo/mdx:collections/server': resolve(__dirname, './.docs/server.ts'),
'@hanzo/mdx:collections/browser': resolve(__dirname, './.docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './.docs/dynamic.ts'),
};
return config;
},
+1 -1
View File
@@ -13,7 +13,7 @@
"jsx": "react-jsx",
"incremental": true,
"plugins": [{ "name": "next" }],
"paths": { "@/*": ["./*"] },
"paths": { "@/*": ["./*"], "@hanzo/mdx:collections/*": ["./.docs/*"] },
"target": "ES2017"
},
"include": [
+3 -3
View File
@@ -16,9 +16,9 @@ const config: NextConfig = {
webpack: (config) => {
config.resolve.alias = {
...config.resolve.alias,
'@hanzo/mdx:collections/server': resolve(__dirname, './docs/server.ts'),
'@hanzo/mdx:collections/browser': resolve(__dirname, './docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './docs/dynamic.ts'),
'@hanzo/mdx:collections/server': resolve(__dirname, './.docs/server.ts'),
'@hanzo/mdx:collections/browser': resolve(__dirname, './.docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './.docs/dynamic.ts'),
};
return config;
},
+1 -1
View File
@@ -13,7 +13,7 @@
"jsx": "react-jsx",
"incremental": true,
"plugins": [{ "name": "next" }],
"paths": { "@/*": ["./*"] },
"paths": { "@/*": ["./*"], "@hanzo/mdx:collections/*": ["./.docs/*"] },
"target": "ES2017"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", ".next/dev/types/**/*.ts"],
File diff suppressed because one or more lines are too long
-24
View File
@@ -1,24 +0,0 @@
// @ts-nocheck
import { dynamic } from '@hanzo/docs-mdx/runtime/dynamic';
import * as Config from '../source.config';
const create = await dynamic<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
docs: {
/**
* extracted references (e.g. hrefs, paths), useful for analyzing relationships between pages.
*/
extractedReferences: import("@hanzo/docs-mdx").ExtractedReference[];
},
}
} & {
DocData: {
docs: {
/**
* Last modified date of document file, obtained from version control.
*
*/
lastModified?: Date;
},
}
}>(Config, {"configPath":"source.config.ts","environment":"next","outDir":"docs"}, {"doc":{"passthroughs":["extractedReferences","lastModified"]}});
@@ -1 +0,0 @@
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"full":{"type":"boolean"},"_openapi":{"type":"object","properties":{},"additionalProperties":{}},"index":{"default":false,"type":"boolean"}},"required":["title"]}
@@ -1 +0,0 @@
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string"},"pages":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"root":{"type":"boolean"},"defaultOpen":{"type":"boolean"},"collapsible":{"type":"boolean"},"icon":{"type":"string"}}}
File diff suppressed because one or more lines are too long
-70
View File
@@ -1,70 +0,0 @@
// source.config.ts
import {
applyMdxPreset,
defineConfig,
defineDocs,
frontmatterSchema,
metaSchema
} from "@hanzo/docs-mdx/config";
import { z } from "zod";
import jsonSchema from "@hanzo/docs-mdx/plugins/json-schema";
import lastModified from "@hanzo/docs-mdx/plugins/last-modified";
var docs = defineDocs({
docs: {
schema: frontmatterSchema.extend({
index: z.boolean().default(false)
}),
postprocess: {
includeProcessedMarkdown: true,
extractLinkReferences: true
},
async: true,
async mdxOptions(environment) {
const { rehypeCodeDefaultOptions } = await import("@hanzo/docs-core/mdx-plugins/rehype-code");
const { remarkStructureDefaultOptions } = await import("@hanzo/docs-core/mdx-plugins/remark-structure");
const { remarkSteps } = await import("@hanzo/docs-core/mdx-plugins/remark-steps");
return applyMdxPreset({
remarkStructureOptions: {
types: [...remarkStructureDefaultOptions.types, "code"]
},
rehypeCodeOptions: {
langs: ["ts", "js", "javascript", "rust", "python", "go", "bash", "sh", "json", "json5", "yaml", "toml", "jsonc", "shell", "powershell", "dockerfile", "swift", "xml", "html", "css", "sql", "ini", "diff", "nix", "lua", "http", "markdown", "md", "applescript", "csv", "log", "ssh-config", "c", "objc", "regex"],
inline: "tailing-curly-colon",
themes: {
light: "github-light",
dark: "github-dark"
},
transformers: [
...rehypeCodeDefaultOptions.transformers ?? []
]
},
remarkCodeTabOptions: {
parseMdx: true
},
remarkNpmOptions: {
persist: {
id: "package-manager"
}
},
remarkPlugins: [remarkSteps]
})(environment);
}
},
meta: {
schema: metaSchema.extend({
description: z.string().optional()
})
}
});
var source_config_default = defineConfig({
plugins: [
jsonSchema({
insert: true
}),
lastModified()
]
});
export {
source_config_default as default,
docs
};
+3 -3
View File
@@ -16,9 +16,9 @@ const config: NextConfig = {
webpack: (config) => {
config.resolve.alias = {
...config.resolve.alias,
'@hanzo/mdx:collections/server': resolve(__dirname, './docs/server.ts'),
'@hanzo/mdx:collections/browser': resolve(__dirname, './docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './docs/dynamic.ts'),
'@hanzo/mdx:collections/server': resolve(__dirname, './.docs/server.ts'),
'@hanzo/mdx:collections/browser': resolve(__dirname, './.docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './.docs/dynamic.ts'),
};
return config;
},
+3
View File
@@ -24,6 +24,9 @@
"paths": {
"@/*": [
"./*"
],
"@hanzo/mdx:collections/*": [
"./.docs/*"
]
},
"target": "ES2017"
-28
View File
@@ -1,28 +0,0 @@
// @ts-nocheck
import { browser } from '@hanzo/docs-mdx/runtime/browser';
import type * as Config from '../source.config';
const create = browser<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
docs: {
/**
* extracted references (e.g. hrefs, paths), useful for analyzing relationships between pages.
*/
extractedReferences: import("@hanzo/docs-mdx").ExtractedReference[];
},
}
} & {
DocData: {
docs: {
/**
* Last modified date of document file, obtained from version control.
*
*/
lastModified?: Date;
},
}
}>();
const browserCollections = {
docs: create.doc("docs", {"faq.mdx": () => import("../content/docs/faq.mdx?collection=docs"), "index.mdx": () => import("../content/docs/index.mdx?collection=docs"), "architecture/agent-mesh.mdx": () => import("../content/docs/architecture/agent-mesh.mdx?collection=docs"), "architecture/index.mdx": () => import("../content/docs/architecture/index.mdx?collection=docs"), "configuration/example-config.mdx": () => import("../content/docs/configuration/example-config.mdx?collection=docs"), "configuration/index.mdx": () => import("../content/docs/configuration/index.mdx?collection=docs"), "configuration/platform-sandboxing.mdx": () => import("../content/docs/configuration/platform-sandboxing.mdx?collection=docs"), "configuration/sandbox.mdx": () => import("../content/docs/configuration/sandbox.mdx?collection=docs"), "contributing/cla.mdx": () => import("../content/docs/contributing/cla.mdx?collection=docs"), "contributing/index.mdx": () => import("../content/docs/contributing/index.mdx?collection=docs"), "getting-started/authentication.mdx": () => import("../content/docs/getting-started/authentication.mdx?collection=docs"), "getting-started/homebrew.mdx": () => import("../content/docs/getting-started/homebrew.mdx?collection=docs"), "getting-started/index.mdx": () => import("../content/docs/getting-started/index.mdx?collection=docs"), "getting-started/install.mdx": () => import("../content/docs/getting-started/install.mdx?collection=docs"), "integrations/agent-platform.mdx": () => import("../content/docs/integrations/agent-platform.mdx?collection=docs"), "integrations/copilot.mdx": () => import("../content/docs/integrations/copilot.mdx?collection=docs"), "integrations/index.mdx": () => import("../content/docs/integrations/index.mdx?collection=docs"), "integrations/zed.mdx": () => import("../content/docs/integrations/zed.mdx?collection=docs"), "reference/cli.mdx": () => import("../content/docs/reference/cli.mdx?collection=docs"), "reference/index.mdx": () => import("../content/docs/reference/index.mdx?collection=docs"), "usage/advanced.mdx": () => import("../content/docs/usage/advanced.mdx?collection=docs"), "usage/agents.mdx": () => import("../content/docs/usage/agents.mdx?collection=docs"), "usage/auto-drive.mdx": () => import("../content/docs/usage/auto-drive.mdx?collection=docs"), "usage/exec.mdx": () => import("../content/docs/usage/exec.mdx?collection=docs"), "usage/execpolicy.mdx": () => import("../content/docs/usage/execpolicy.mdx?collection=docs"), "usage/index.mdx": () => import("../content/docs/usage/index.mdx?collection=docs"), "usage/js-repl.mdx": () => import("../content/docs/usage/js-repl.mdx?collection=docs"), "usage/prompts.mdx": () => import("../content/docs/usage/prompts.mdx?collection=docs"), "usage/settings.mdx": () => import("../content/docs/usage/settings.mdx?collection=docs"), "usage/skills.mdx": () => import("../content/docs/usage/skills.mdx?collection=docs"), "usage/slash-commands.mdx": () => import("../content/docs/usage/slash-commands.mdx?collection=docs"), }),
};
export default browserCollections;
-24
View File
@@ -1,24 +0,0 @@
// @ts-nocheck
import { dynamic } from '@hanzo/docs-mdx/runtime/dynamic';
import * as Config from '../source.config';
const create = await dynamic<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
docs: {
/**
* extracted references (e.g. hrefs, paths), useful for analyzing relationships between pages.
*/
extractedReferences: import("@hanzo/docs-mdx").ExtractedReference[];
},
}
} & {
DocData: {
docs: {
/**
* Last modified date of document file, obtained from version control.
*
*/
lastModified?: Date;
},
}
}>(Config, {"configPath":"source.config.ts","environment":"next","outDir":"docs"}, {"doc":{"passthroughs":["extractedReferences","lastModified"]}});
@@ -1 +0,0 @@
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"full":{"type":"boolean"},"_openapi":{"type":"object","properties":{},"additionalProperties":{}},"index":{"default":false,"type":"boolean"}},"required":["title"]}
@@ -1 +0,0 @@
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string"},"pages":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"root":{"type":"boolean"},"defaultOpen":{"type":"boolean"},"collapsible":{"type":"boolean"},"icon":{"type":"string"}}}
-65
View File
@@ -1,65 +0,0 @@
// @ts-nocheck
import { frontmatter as __fd_glob_38 } from "../content/docs/usage/slash-commands.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_37 } from "../content/docs/usage/skills.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_36 } from "../content/docs/usage/settings.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_35 } from "../content/docs/usage/prompts.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_34 } from "../content/docs/usage/js-repl.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_33 } from "../content/docs/usage/index.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_32 } from "../content/docs/usage/execpolicy.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_31 } from "../content/docs/usage/exec.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_30 } from "../content/docs/usage/auto-drive.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_29 } from "../content/docs/usage/agents.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_28 } from "../content/docs/usage/advanced.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_27 } from "../content/docs/reference/index.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_26 } from "../content/docs/reference/cli.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_25 } from "../content/docs/integrations/zed.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_24 } from "../content/docs/integrations/index.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_23 } from "../content/docs/integrations/copilot.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_22 } from "../content/docs/integrations/agent-platform.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_21 } from "../content/docs/getting-started/install.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_20 } from "../content/docs/getting-started/index.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_19 } from "../content/docs/getting-started/homebrew.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_18 } from "../content/docs/getting-started/authentication.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_17 } from "../content/docs/contributing/index.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_16 } from "../content/docs/contributing/cla.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_15 } from "../content/docs/configuration/sandbox.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_14 } from "../content/docs/configuration/platform-sandboxing.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_13 } from "../content/docs/configuration/index.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_12 } from "../content/docs/configuration/example-config.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_11 } from "../content/docs/architecture/index.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_10 } from "../content/docs/architecture/agent-mesh.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_9 } from "../content/docs/index.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_8 } from "../content/docs/faq.mdx?collection=docs&only=frontmatter"
import { default as __fd_glob_7 } from "../content/docs/usage/meta.json?collection=docs"
import { default as __fd_glob_6 } from "../content/docs/reference/meta.json?collection=docs"
import { default as __fd_glob_5 } from "../content/docs/integrations/meta.json?collection=docs"
import { default as __fd_glob_4 } from "../content/docs/getting-started/meta.json?collection=docs"
import { default as __fd_glob_3 } from "../content/docs/contributing/meta.json?collection=docs"
import { default as __fd_glob_2 } from "../content/docs/configuration/meta.json?collection=docs"
import { default as __fd_glob_1 } from "../content/docs/architecture/meta.json?collection=docs"
import { default as __fd_glob_0 } from "../content/docs/meta.json?collection=docs"
import { server } from '@hanzo/docs-mdx/runtime/server';
import type * as Config from '../source.config';
const create = server<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
docs: {
/**
* extracted references (e.g. hrefs, paths), useful for analyzing relationships between pages.
*/
extractedReferences: import("@hanzo/docs-mdx").ExtractedReference[];
},
}
} & {
DocData: {
docs: {
/**
* Last modified date of document file, obtained from version control.
*
*/
lastModified?: Date;
},
}
}>({"doc":{"passthroughs":["extractedReferences","lastModified"]}});
export const docs = await create.docsLazy("docs", "content/docs", {"meta.json": __fd_glob_0, "architecture/meta.json": __fd_glob_1, "configuration/meta.json": __fd_glob_2, "contributing/meta.json": __fd_glob_3, "getting-started/meta.json": __fd_glob_4, "integrations/meta.json": __fd_glob_5, "reference/meta.json": __fd_glob_6, "usage/meta.json": __fd_glob_7, }, {"faq.mdx": __fd_glob_8, "index.mdx": __fd_glob_9, "architecture/agent-mesh.mdx": __fd_glob_10, "architecture/index.mdx": __fd_glob_11, "configuration/example-config.mdx": __fd_glob_12, "configuration/index.mdx": __fd_glob_13, "configuration/platform-sandboxing.mdx": __fd_glob_14, "configuration/sandbox.mdx": __fd_glob_15, "contributing/cla.mdx": __fd_glob_16, "contributing/index.mdx": __fd_glob_17, "getting-started/authentication.mdx": __fd_glob_18, "getting-started/homebrew.mdx": __fd_glob_19, "getting-started/index.mdx": __fd_glob_20, "getting-started/install.mdx": __fd_glob_21, "integrations/agent-platform.mdx": __fd_glob_22, "integrations/copilot.mdx": __fd_glob_23, "integrations/index.mdx": __fd_glob_24, "integrations/zed.mdx": __fd_glob_25, "reference/cli.mdx": __fd_glob_26, "reference/index.mdx": __fd_glob_27, "usage/advanced.mdx": __fd_glob_28, "usage/agents.mdx": __fd_glob_29, "usage/auto-drive.mdx": __fd_glob_30, "usage/exec.mdx": __fd_glob_31, "usage/execpolicy.mdx": __fd_glob_32, "usage/index.mdx": __fd_glob_33, "usage/js-repl.mdx": __fd_glob_34, "usage/prompts.mdx": __fd_glob_35, "usage/settings.mdx": __fd_glob_36, "usage/skills.mdx": __fd_glob_37, "usage/slash-commands.mdx": __fd_glob_38, }, {"faq.mdx": () => import("../content/docs/faq.mdx?collection=docs"), "index.mdx": () => import("../content/docs/index.mdx?collection=docs"), "architecture/agent-mesh.mdx": () => import("../content/docs/architecture/agent-mesh.mdx?collection=docs"), "architecture/index.mdx": () => import("../content/docs/architecture/index.mdx?collection=docs"), "configuration/example-config.mdx": () => import("../content/docs/configuration/example-config.mdx?collection=docs"), "configuration/index.mdx": () => import("../content/docs/configuration/index.mdx?collection=docs"), "configuration/platform-sandboxing.mdx": () => import("../content/docs/configuration/platform-sandboxing.mdx?collection=docs"), "configuration/sandbox.mdx": () => import("../content/docs/configuration/sandbox.mdx?collection=docs"), "contributing/cla.mdx": () => import("../content/docs/contributing/cla.mdx?collection=docs"), "contributing/index.mdx": () => import("../content/docs/contributing/index.mdx?collection=docs"), "getting-started/authentication.mdx": () => import("../content/docs/getting-started/authentication.mdx?collection=docs"), "getting-started/homebrew.mdx": () => import("../content/docs/getting-started/homebrew.mdx?collection=docs"), "getting-started/index.mdx": () => import("../content/docs/getting-started/index.mdx?collection=docs"), "getting-started/install.mdx": () => import("../content/docs/getting-started/install.mdx?collection=docs"), "integrations/agent-platform.mdx": () => import("../content/docs/integrations/agent-platform.mdx?collection=docs"), "integrations/copilot.mdx": () => import("../content/docs/integrations/copilot.mdx?collection=docs"), "integrations/index.mdx": () => import("../content/docs/integrations/index.mdx?collection=docs"), "integrations/zed.mdx": () => import("../content/docs/integrations/zed.mdx?collection=docs"), "reference/cli.mdx": () => import("../content/docs/reference/cli.mdx?collection=docs"), "reference/index.mdx": () => import("../content/docs/reference/index.mdx?collection=docs"), "usage/advanced.mdx": () => import("../content/docs/usage/advanced.mdx?collection=docs"), "usage/agents.mdx": () => import("../content/docs/usage/agents.mdx?collection=docs"), "usage/auto-drive.mdx": () => import("../content/docs/usage/auto-drive.mdx?collection=docs"), "usage/exec.mdx": () => import("../content/docs/usage/exec.mdx?collection=docs"), "usage/execpolicy.mdx": () => import("../content/docs/usage/execpolicy.mdx?collection=docs"), "usage/index.mdx": () => import("../content/docs/usage/index.mdx?collection=docs"), "usage/js-repl.mdx": () => import("../content/docs/usage/js-repl.mdx?collection=docs"), "usage/prompts.mdx": () => import("../content/docs/usage/prompts.mdx?collection=docs"), "usage/settings.mdx": () => import("../content/docs/usage/settings.mdx?collection=docs"), "usage/skills.mdx": () => import("../content/docs/usage/skills.mdx?collection=docs"), "usage/slash-commands.mdx": () => import("../content/docs/usage/slash-commands.mdx?collection=docs"), });
-66
View File
@@ -1,66 +0,0 @@
// source.config.ts
import {
applyMdxPreset,
defineConfig,
defineDocs,
frontmatterSchema,
metaSchema
} from "@hanzo/docs-mdx/config";
import { z } from "zod";
import lastModified from "@hanzo/docs-mdx/plugins/last-modified";
var docs = defineDocs({
docs: {
schema: frontmatterSchema.extend({
index: z.boolean().default(false)
}),
postprocess: {
includeProcessedMarkdown: true,
extractLinkReferences: true
},
async: true,
async mdxOptions(environment) {
const { rehypeCodeDefaultOptions } = await import("@hanzo/docs-core/mdx-plugins/rehype-code");
const { remarkStructureDefaultOptions } = await import("@hanzo/docs-core/mdx-plugins/remark-structure");
const { remarkSteps } = await import("@hanzo/docs-core/mdx-plugins/remark-steps");
return applyMdxPreset({
remarkStructureOptions: {
types: [...remarkStructureDefaultOptions.types, "code"]
},
rehypeCodeOptions: {
langs: ["ts", "js", "rust", "python", "go", "bash", "json", "yaml", "toml", "shell", "typescript", "javascript", "markdown"],
inline: "tailing-curly-colon",
themes: {
light: "github-light",
dark: "github-dark"
},
transformers: [
...rehypeCodeDefaultOptions.transformers ?? []
]
},
remarkCodeTabOptions: {
parseMdx: true
},
remarkNpmOptions: {
persist: {
id: "package-manager"
}
},
remarkPlugins: [remarkSteps]
})(environment);
}
},
meta: {
schema: metaSchema.extend({
description: z.string().optional()
})
}
});
var source_config_default = defineConfig({
plugins: [
lastModified()
]
});
export {
source_config_default as default,
docs
};
+3 -3
View File
@@ -18,9 +18,9 @@ const config: NextConfig = {
webpack: (config) => {
config.resolve.alias = {
...config.resolve.alias,
'@hanzo/mdx:collections/server': resolve(__dirname, './docs/server.ts'),
'@hanzo/mdx:collections/browser': resolve(__dirname, './docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './docs/dynamic.ts'),
'@hanzo/mdx:collections/server': resolve(__dirname, './.docs/server.ts'),
'@hanzo/mdx:collections/browser': resolve(__dirname, './.docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './.docs/dynamic.ts'),
};
return config;
},
+3
View File
@@ -24,6 +24,9 @@
"paths": {
"@/*": [
"./*"
],
"@hanzo/mdx:collections/*": [
"./.docs/*"
]
},
"target": "ES2017"
-28
View File
@@ -1,28 +0,0 @@
// @ts-nocheck
import { browser } from '@hanzo/docs-mdx/runtime/browser';
import type * as Config from '../source.config';
const create = browser<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
docs: {
/**
* extracted references (e.g. hrefs, paths), useful for analyzing relationships between pages.
*/
extractedReferences: import("@hanzo/docs-mdx").ExtractedReference[];
},
}
} & {
DocData: {
docs: {
/**
* Last modified date of document file, obtained from version control.
*
*/
lastModified?: Date;
},
}
}>();
const browserCollections = {
docs: create.doc("docs", {"api-reference.mdx": () => import("../content/docs/api-reference.mdx?collection=docs"), "architecture.mdx": () => import("../content/docs/architecture.mdx?collection=docs"), "cloudflare.mdx": () => import("../content/docs/cloudflare.mdx?collection=docs"), "index.mdx": () => import("../content/docs/index.mdx?collection=docs"), "operator.mdx": () => import("../content/docs/operator.mdx?collection=docs"), "records.mdx": () => import("../content/docs/records.mdx?collection=docs"), "zones.mdx": () => import("../content/docs/zones.mdx?collection=docs"), }),
};
export default browserCollections;
-24
View File
@@ -1,24 +0,0 @@
// @ts-nocheck
import { dynamic } from '@hanzo/docs-mdx/runtime/dynamic';
import * as Config from '../source.config';
const create = await dynamic<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
docs: {
/**
* extracted references (e.g. hrefs, paths), useful for analyzing relationships between pages.
*/
extractedReferences: import("@hanzo/docs-mdx").ExtractedReference[];
},
}
} & {
DocData: {
docs: {
/**
* Last modified date of document file, obtained from version control.
*
*/
lastModified?: Date;
},
}
}>(Config, {"configPath":"source.config.ts","environment":"next","outDir":"docs"}, {"doc":{"passthroughs":["extractedReferences","lastModified"]}});
-34
View File
@@ -1,34 +0,0 @@
// @ts-nocheck
import { frontmatter as __fd_glob_7 } from "../content/docs/zones.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_6 } from "../content/docs/records.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_5 } from "../content/docs/operator.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_4 } from "../content/docs/index.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_3 } from "../content/docs/cloudflare.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_2 } from "../content/docs/architecture.mdx?collection=docs&only=frontmatter"
import { frontmatter as __fd_glob_1 } from "../content/docs/api-reference.mdx?collection=docs&only=frontmatter"
import { default as __fd_glob_0 } from "../content/docs/meta.json?collection=docs"
import { server } from '@hanzo/docs-mdx/runtime/server';
import type * as Config from '../source.config';
const create = server<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
docs: {
/**
* extracted references (e.g. hrefs, paths), useful for analyzing relationships between pages.
*/
extractedReferences: import("@hanzo/docs-mdx").ExtractedReference[];
},
}
} & {
DocData: {
docs: {
/**
* Last modified date of document file, obtained from version control.
*
*/
lastModified?: Date;
},
}
}>({"doc":{"passthroughs":["extractedReferences","lastModified"]}});
export const docs = await create.docsLazy("docs", "content/docs", {"meta.json": __fd_glob_0, }, {"api-reference.mdx": __fd_glob_1, "architecture.mdx": __fd_glob_2, "cloudflare.mdx": __fd_glob_3, "index.mdx": __fd_glob_4, "operator.mdx": __fd_glob_5, "records.mdx": __fd_glob_6, "zones.mdx": __fd_glob_7, }, {"api-reference.mdx": () => import("../content/docs/api-reference.mdx?collection=docs"), "architecture.mdx": () => import("../content/docs/architecture.mdx?collection=docs"), "cloudflare.mdx": () => import("../content/docs/cloudflare.mdx?collection=docs"), "index.mdx": () => import("../content/docs/index.mdx?collection=docs"), "operator.mdx": () => import("../content/docs/operator.mdx?collection=docs"), "records.mdx": () => import("../content/docs/records.mdx?collection=docs"), "zones.mdx": () => import("../content/docs/zones.mdx?collection=docs"), });
-66
View File
@@ -1,66 +0,0 @@
// source.config.ts
import {
applyMdxPreset,
defineConfig,
defineDocs,
frontmatterSchema,
metaSchema
} from "@hanzo/docs-mdx/config";
import { z } from "zod";
import lastModified from "@hanzo/docs-mdx/plugins/last-modified";
var docs = defineDocs({
docs: {
schema: frontmatterSchema.extend({
index: z.boolean().default(false)
}),
postprocess: {
includeProcessedMarkdown: true,
extractLinkReferences: true
},
async: true,
async mdxOptions(environment) {
const { rehypeCodeDefaultOptions } = await import("@hanzo/docs-core/mdx-plugins/rehype-code");
const { remarkStructureDefaultOptions } = await import("@hanzo/docs-core/mdx-plugins/remark-structure");
const { remarkSteps } = await import("@hanzo/docs-core/mdx-plugins/remark-steps");
return applyMdxPreset({
remarkStructureOptions: {
types: [...remarkStructureDefaultOptions.types, "code"]
},
rehypeCodeOptions: {
langs: ["ts", "js", "go", "bash", "json", "yaml", "shell", "typescript", "javascript", "markdown", "prisma"],
inline: "tailing-curly-colon",
themes: {
light: "github-light",
dark: "github-dark"
},
transformers: [
...rehypeCodeDefaultOptions.transformers ?? []
]
},
remarkCodeTabOptions: {
parseMdx: true
},
remarkNpmOptions: {
persist: {
id: "package-manager"
}
},
remarkPlugins: [remarkSteps]
})(environment);
}
},
meta: {
schema: metaSchema.extend({
description: z.string().optional()
})
}
});
var source_config_default = defineConfig({
plugins: [
lastModified()
]
});
export {
source_config_default as default,
docs
};
+3 -3
View File
@@ -16,9 +16,9 @@ const config: NextConfig = {
webpack: (config) => {
config.resolve.alias = {
...config.resolve.alias,
'@hanzo/mdx:collections/server': resolve(__dirname, './docs/server.ts'),
'@hanzo/mdx:collections/browser': resolve(__dirname, './docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './docs/dynamic.ts'),
'@hanzo/mdx:collections/server': resolve(__dirname, './.docs/server.ts'),
'@hanzo/mdx:collections/browser': resolve(__dirname, './.docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './.docs/dynamic.ts'),
};
return config;
},
+1 -1
View File
@@ -14,7 +14,7 @@
"incremental": true,
"plugins": [{ "name": "next" }],
"paths": {
"@/*": ["./*"]
"@/*": ["./*"], "@hanzo/mdx:collections/*": ["./.docs/*"]
},
"target": "ES2017"
},
+1 -1
View File
@@ -19,7 +19,7 @@
"dist",
"node_modules",
".next/",
".source/",
".docs/",
"out/",
"next.config.mjs",
"postcss.config.js",
File diff suppressed because one or more lines are too long
-31
View File
@@ -1,31 +0,0 @@
// @ts-nocheck
import { dynamic } from '@hanzo/docs-mdx/runtime/dynamic';
import * as Config from '../source.config';
const create = await dynamic<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
docs: {
/**
* extracted references (e.g. hrefs, paths), useful for analyzing relationships between pages.
*/
extractedReferences: import("@hanzo/docs-mdx").ExtractedReference[];
},
}
} & {
DocData: {
blog: {
/**
* Last modified date of document file, obtained from version control.
*
*/
lastModified?: Date;
},
docs: {
/**
* Last modified date of document file, obtained from version control.
*
*/
lastModified?: Date;
},
}
}>(Config, {"configPath":"source.config.ts","environment":"next","outDir":"docs"}, {"doc":{"passthroughs":["extractedReferences","lastModified"]}});
-1
View File
@@ -1 +0,0 @@
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"full":{"type":"boolean"},"access":{"type":"string","enum":["public","authenticated","team","admin"]},"accessOrgs":{"type":"array","items":{"type":"string"}},"_openapi":{"type":"object","properties":{},"additionalProperties":{}},"author":{"type":"string"},"date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{}]}},"required":["title","author","date"]}
@@ -1 +0,0 @@
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"full":{"type":"boolean"},"access":{"type":"string","enum":["public","authenticated","team","admin"]},"accessOrgs":{"type":"array","items":{"type":"string"}},"_openapi":{"type":"object","properties":{},"additionalProperties":{}},"preview":{"type":"string"},"index":{"default":false,"type":"boolean"},"method":{"type":"string"}},"required":["title"]}
@@ -1 +0,0 @@
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string"},"pages":{"type":"array","items":{"type":"string"}},"pagesIndex":{"type":"string"},"description":{"type":"string"},"root":{"type":"boolean"},"defaultOpen":{"type":"boolean"},"collapsible":{"type":"boolean"},"icon":{"type":"string"}}}
File diff suppressed because one or more lines are too long
-338
View File
@@ -1,338 +0,0 @@
// source.config.ts
import { applyMdxPreset, defineCollections, defineConfig, defineDocs } from "@hanzo/docs-mdx/config";
import { z } from "zod";
import jsonSchema from "@hanzo/docs-mdx/plugins/json-schema";
import lastModified from "@hanzo/docs-mdx/plugins/last-modified";
// lib/shiki.ts
var defaultShikiOptions = {
themes: {
light: "github-light",
dark: "vesper"
}
};
var shikiConfig = defaultShikiOptions;
// source.config.ts
import { metaSchema, pageSchema } from "@hanzo/docs-core/source/schema";
import { visit as visit2 } from "unist-util-visit";
// lib/remark-fix-links.ts
import fs from "node:fs";
import path from "node:path";
import { visit } from "unist-util-visit";
var CONTENT_DIR = path.resolve("content/docs");
var REDIRECTS = path.resolve("public/_redirects");
function urlFromContentPath(p) {
let rel = path.relative(CONTENT_DIR, p);
if (rel.endsWith(".mdx")) rel = rel.slice(0, -4);
const parts = rel.split(path.sep).filter((seg) => !(seg.startsWith("(") && seg.endsWith(")")));
if (parts.length && parts[parts.length - 1] === "index") parts.pop();
return "/docs" + (parts.length ? "/" + parts.join("/") : "");
}
var VALID = null;
function validUrls() {
if (VALID) return VALID;
const set = /* @__PURE__ */ new Set();
const walk = (dir) => {
for (const e of fs.readdirSync(dir, { withFileTypes: true })) {
const fp = path.join(dir, e.name);
if (e.isDirectory()) walk(fp);
else if (e.name.endsWith(".mdx")) set.add(urlFromContentPath(fp));
}
};
if (fs.existsSync(CONTENT_DIR)) walk(CONTENT_DIR);
set.add("/docs");
if (fs.existsSync(REDIRECTS)) {
for (const line of fs.readFileSync(REDIRECTS, "utf8").split("\n")) {
const t = line.trim();
if (!t || t.startsWith("#")) continue;
const src = t.split(/\s+/)[0];
if (src && src.startsWith("/") && !src.includes("*")) set.add(src.replace(/\/$/, ""));
}
}
VALID = set;
return set;
}
function sectionRoot(fileUrl) {
const p = fileUrl.split("/");
if (p[1] === "docs" && p[2] === "services" && p[3]) return `/docs/services/${p[3]}`;
if (p[1] === "docs" && p[2] === "projects" && p[3] && p[4])
return `/docs/projects/${p[3]}/${p[4]}`;
if (p[1] === "docs" && p[2]) return `/docs/${p[2]}`;
return "/docs";
}
function normalize(u) {
if (u.length > 1 && u.endsWith("/")) u = u.slice(0, -1);
return u;
}
function resolveRelative(pageUrl, rel) {
const base = pageUrl.split("/").slice(0, -1);
for (const seg of rel.split("/")) {
if (seg === "" || seg === ".") continue;
if (seg === "..") base.pop();
else base.push(seg);
}
return normalize(base.join("/") || "/");
}
function fixOne(url, pageUrl, root, valid) {
if (!url) return url;
if (/^([a-z][a-z0-9+.-]*:|\/\/|#|mailto:|tel:)/i.test(url)) return url;
if (url.startsWith("{")) return url;
const hashIdx = url.search(/[#?]/);
const suffix = hashIdx >= 0 ? url.slice(hashIdx) : "";
let p = hashIdx >= 0 ? url.slice(0, hashIdx) : url;
if (p === "") return url;
let cand;
if (p === "/docs" || p.startsWith("/docs/")) cand = normalize(p);
else if (p.startsWith("/")) cand = normalize(root + p);
else cand = resolveRelative(pageUrl, p);
let target;
if (valid.has(cand)) target = cand;
else if (valid.has(normalize(p))) target = normalize(p);
else target = root;
return target + suffix;
}
function remarkFixInternalLinks() {
return (tree, file) => {
const filePath = file.path ?? file.history?.[0] ?? "";
if (!filePath.includes(`content${path.sep}docs`) && !filePath.includes("content/docs"))
return;
const valid = validUrls();
const pageUrl = urlFromContentPath(filePath);
const root = sectionRoot(pageUrl);
visit(tree, (node) => {
if (node.type === "link" && typeof node.url === "string") {
node.url = fixOne(node.url, pageUrl, root, valid);
} else if (node.type === "mdxJsxFlowElement" || node.type === "mdxJsxTextElement") {
for (const attr of node.attributes ?? []) {
if (attr.type === "mdxJsxAttribute" && (attr.name === "href" || attr.name === "url") && typeof attr.value === "string") {
attr.value = fixOne(attr.value, pageUrl, root, valid);
}
}
}
});
};
}
// source.config.ts
var isLint = process.env.LINT === "1";
var isExport = process.env.NEXT_EXPORT === "1";
function getDocsFiles() {
return ["**/*.mdx"];
}
var docs = defineDocs({
docs: {
...getDocsFiles() ? { files: getDocsFiles() } : {},
schema: pageSchema.extend({
preview: z.string().optional(),
index: z.boolean().default(false),
/**
* API routes only
*/
method: z.string().optional()
}),
postprocess: {
includeProcessedMarkdown: true,
extractLinkReferences: true,
valueToExport: ["elementIds"]
},
async: true,
async mdxOptions(environment) {
const { rehypeCodeDefaultOptions } = await import("@hanzo/docs-core/mdx-plugins/rehype-code");
const { remarkSteps } = await import("@hanzo/docs-core/mdx-plugins/remark-steps");
const { remarkFeedbackBlock } = await import("@hanzo/docs-core/mdx-plugins/remark-feedback-block");
const { remarkBlockId } = await import("@hanzo/docs-core/mdx-plugins/remark-block-id");
const { transformerTwoslash } = await import("@hanzo/docs-twoslash");
const { createFileSystemTypesCache } = await import("@hanzo/docs-twoslash/cache-fs");
const { default: remarkMath } = await import("remark-math");
const { remarkTypeScriptToJavaScript } = await import("@hanzo/docs-docgen/remark-ts2js");
const { default: rehypeKatex } = await import("rehype-katex");
const { remarkAutoTypeTable, createGenerator, createFileSystemGeneratorCache } = await import("@hanzo/docs-typescript");
const typeTableOptions = {
generator: createGenerator({
cache: createFileSystemGeneratorCache(".next/@hanzo/docs-typescript")
}),
shiki: shikiConfig
};
return applyMdxPreset({
rehypeCodeOptions: isLint ? false : {
inline: "tailing-curly-colon",
themes: {
light: "catppuccin-latte",
dark: "catppuccin-mocha"
},
transformers: [
...rehypeCodeDefaultOptions.transformers ?? [],
transformerTwoslash({
typesCache: createFileSystemTypesCache(),
twoslashOptions: {
compilerOptions: {
types: ["@types/node"]
}
}
}),
transformerEscape()
]
},
remarkCodeTabOptions: {
parseMdx: true
},
remarkStructureOptions: {
stringify: {
filterElement(node) {
switch (node.type) {
case "mdxJsxFlowElement":
case "mdxJsxTextElement":
switch (node.name) {
case "File":
case "TypeTable":
case "Callout":
case "Card":
case "Custom":
return true;
}
return "children-only";
}
return true;
}
}
},
// Ported upstream docs reference images that don't exist in this
// monorepo. `onError: 'ignore'` logs a warning instead of failing the
// page — WITHOUT it, a single missing image skips the whole page and it
// 404s. (Previously a duplicate remarkImageOptions key silently discarded
// this, skipping 400+ pages.)
remarkImageOptions: isLint ? false : { onError: "ignore" },
remarkNpmOptions: {
persist: {
id: "package-manager"
}
},
remarkPlugins: isLint ? [remarkElementIds] : [
remarkFixInternalLinks,
remarkPassthroughUnknownJsx,
remarkSteps,
remarkMath,
[remarkBlockId, { addDataAttribute: "feedback" }],
[remarkAutoTypeTable, typeTableOptions],
remarkTypeScriptToJavaScript
],
rehypePlugins: (v) => [rehypeKatex, ...v]
})(environment);
}
},
meta: {
schema: metaSchema.extend({
description: z.string().optional()
}),
// Only pick up actual meta files — the default **/*.{json,yaml} pattern
// also matches data files (openapi.json, package.json, etc.) which then
// get processed through the MDX loader and corrupt the build.
files: ["**/meta.json", "**/meta.yaml"]
}
});
var blog = defineCollections({
type: "doc",
dir: "content/blog",
schema: pageSchema.extend({
author: z.string(),
date: z.iso.date().or(z.date())
}),
async: true,
async mdxOptions(environment) {
const { rehypeCodeDefaultOptions } = await import("@hanzo/docs-core/mdx-plugins/rehype-code");
const { remarkSteps } = await import("@hanzo/docs-core/mdx-plugins/remark-steps");
return applyMdxPreset({
rehypeCodeOptions: isLint ? false : {
inline: "tailing-curly-colon",
themes: {
light: "catppuccin-latte",
dark: "catppuccin-mocha"
},
transformers: [...rehypeCodeDefaultOptions.transformers ?? [], transformerEscape()]
},
remarkCodeTabOptions: {
parseMdx: true
},
remarkImageOptions: isLint ? false : void 0,
remarkNpmOptions: {
persist: {
id: "package-manager"
}
},
remarkPlugins: isLint ? [remarkElementIds] : [remarkSteps]
})(environment);
}
});
function transformerEscape() {
return {
name: "@shikijs/transformers:remove-notation-escape",
code(hast) {
function replace(node) {
if (node.type === "text") {
node.value = node.value.replace("[\\!code", "[!code");
} else if ("children" in node) {
for (const child of node.children) {
replace(child);
}
}
}
replace(hast);
return hast;
}
};
}
var FIRST_PARTY_JSX = /* @__PURE__ */ new Set(["ModelsCatalog", "ConnectorsCatalog"]);
function remarkPassthroughUnknownJsx() {
return (tree, file) => {
const filePath = file.path ?? file.history[0] ?? "";
if (!filePath.includes("content/docs/projects/") && !filePath.includes("content\\docs\\projects\\") && !filePath.includes("content/docs/services/") && !filePath.includes("content\\docs\\services\\")) {
return;
}
visit2(tree, ["mdxJsxFlowElement", "mdxJsxTextElement"], (node) => {
if (!node.name) return;
if (!/^[A-Z]/.test(node.name)) return;
if (FIRST_PARTY_JSX.has(node.name)) return;
node.name = null;
node.attributes = [];
});
visit2(tree, ["mdxFlowExpression", "mdxTextExpression"], (node, index, parent) => {
if (index == null || !parent) return;
const expr = (node.value || "").trim();
if (!expr || /[()=><+\-*/!&|?:,;{}[\]`'"]/.test(expr)) return;
parent.children.splice(index, 1, {
type: "text",
value: `{${expr}}`
});
});
};
}
function remarkElementIds() {
return (tree, file) => {
file.data ??= {};
file.data.elementIds ??= [];
visit2(tree, "mdxJsxFlowElement", (element) => {
if (!element.name || !element.attributes) return;
const idAttr = element.attributes.find(
(attr) => attr.type === "mdxJsxAttribute" && attr.name === "id"
);
if (idAttr && typeof idAttr.value === "string") {
file.data.elementIds.push(idAttr.value);
}
});
};
}
var source_config_default = defineConfig({
plugins: [
jsonSchema({
insert: true
}),
lastModified()
]
});
export {
blog,
source_config_default as default,
docs
};
+27 -17
View File
@@ -56,16 +56,21 @@ const config: NextConfig = {
// resolve foreign refs. Stub → the no-op empty module, rendering children only.
turbopack: {
resolveAlias: {
'collections/server': './docs/server.ts',
'collections/browser': './docs/browser.ts',
'collections/dynamic': './docs/dynamic.ts',
'@hanzo/mdx:collections/server': './docs/server.ts',
'@hanzo/mdx:collections/browser': './docs/browser.ts',
'@hanzo/mdx:collections/dynamic': './docs/dynamic.ts',
'collections/server': './.docs/server.ts',
'collections/browser': './.docs/browser.ts',
'collections/dynamic': './.docs/dynamic.ts',
'@hanzo/mdx:collections/server': './.docs/server.ts',
'@hanzo/mdx:collections/browser': './.docs/browser.ts',
'@hanzo/mdx:collections/dynamic': './.docs/dynamic.ts',
// Ported docs written against the upstream framework name still say
// `fumadocs-ui`; those components are ours, under our name.
'fumadocs-ui/components/callout': '@hanzo/docs-ui/components/callout',
'fumadocs-ui/components/tabs': '@hanzo/docs-ui/components/tabs',
'@docusaurus': './lib/empty-project-module.js',
'@theme': './lib/empty-project-module.js',
'@theme/Tabs': './lib/empty-project-module.js',
'@theme/TabItem': './lib/empty-project-module.js',
'@theme/CodeBlock': './lib/empty-project-module.js',
'nextra': './lib/empty-project-module.js',
'@mintlify': './lib/empty-project-module.js',
'@hanzo/icons': './lib/empty-project-module.js',
@@ -95,17 +100,22 @@ const config: NextConfig = {
// Virtual collection modules (internal). Both the namespaced specifier
// and the bare `collections/*` specifier resolve to the generated source
// (lib/source imports the bare form).
'@hanzo/mdx:collections/server': path.resolve(__dirname, 'docs/server.ts'),
'@hanzo/mdx:collections/browser': path.resolve(__dirname, 'docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': path.resolve(__dirname, 'docs/dynamic.ts'),
'collections/server': path.resolve(__dirname, 'docs/server.ts'),
'collections/browser': path.resolve(__dirname, 'docs/browser.ts'),
'collections/dynamic': path.resolve(__dirname, 'docs/dynamic.ts'),
'@hanzo/mdx:collections/server': path.resolve(__dirname, '.docs/server.ts'),
'@hanzo/mdx:collections/browser': path.resolve(__dirname, '.docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': path.resolve(__dirname, '.docs/dynamic.ts'),
'collections/server': path.resolve(__dirname, '.docs/server.ts'),
'collections/browser': path.resolve(__dirname, '.docs/browser.ts'),
'collections/dynamic': path.resolve(__dirname, '.docs/dynamic.ts'),
// (a) Upstream framework name -> the same components under ours
'fumadocs-ui/components/callout': '@hanzo/docs-ui/components/callout',
'fumadocs-ui/components/tabs': '@hanzo/docs-ui/components/tabs',
// Other doc-platform packages -> no-op stub
'@docusaurus': emptyProjectModule,
'@theme/Tabs': emptyProjectModule,
'@theme/TabItem': emptyProjectModule,
'@theme/CodeBlock': emptyProjectModule,
'@theme': emptyProjectModule,
'nextra': emptyProjectModule,
'@mintlify': emptyProjectModule,
@@ -241,11 +251,11 @@ const config: NextConfig = {
},
};
// Regenerate the content collection (docs/server.ts etc.) into the SAME dir the
// resolve.alias below points at, so the build always uses a fresh, section-filtered
// collection instead of a stale committed one (which referenced projects/* pages
// excluded from the core build).
const withMDX = createMDX({ outDir: 'docs' });
// The collection modules are generated into the generator's own output dir
// (`.docs/`, gitignored) — the same dir every alias above points at, and the
// same dir every other app and example uses. Nothing is committed, so the build
// can never pick up a stale collection.
const withMDX = createMDX();
// createMDX is typed against its own copy of NextConfig, so the two structurally
// identical types are nominally distinct here. (The comment this replaces blamed
+1 -1
View File
@@ -12,7 +12,7 @@
"dev": "next dev",
"lint": "docs-mdx && bun ./scripts/lint.entry.ts",
"start": "next start",
"gen:collections": "node --input-type=module -e \"const m=await import('@hanzo/docs-mdx/next'); await m.postInstall({configPath:'source.config.ts',outDir:'docs'})\""
"gen:collections": "node --input-type=module -e \"const m=await import('@hanzo/docs-mdx/next'); await m.postInstall({configPath:'source.config.ts'})\""
},
"dependencies": {
"@hanzo/docs-analytics": "workspace:*",
+1 -1
View File
@@ -3,7 +3,7 @@
"compilerOptions": {
"paths": {
"@/*": ["./*"],
"collections/*": ["./.source/*"]
"@hanzo/mdx:collections/*": ["./.docs/*"]
},
"allowImportingTsExtensions": true
},
File diff suppressed because one or more lines are too long
-24
View File
@@ -1,24 +0,0 @@
// @ts-nocheck
import { dynamic } from '@hanzo/docs-mdx/runtime/dynamic';
import * as Config from '../source.config';
const create = await dynamic<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
docs: {
/**
* extracted references (e.g. hrefs, paths), useful for analyzing relationships between pages.
*/
extractedReferences: import("@hanzo/docs-mdx").ExtractedReference[];
},
}
} & {
DocData: {
docs: {
/**
* Last modified date of document file, obtained from version control.
*
*/
lastModified?: Date;
},
}
}>(Config, {"configPath":"source.config.ts","environment":"next","outDir":"docs"}, {"doc":{"passthroughs":["extractedReferences","lastModified"]}});
@@ -1 +0,0 @@
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"full":{"type":"boolean"},"_openapi":{"type":"object","properties":{},"additionalProperties":{}},"index":{"default":false,"type":"boolean"}},"required":["title"]}
@@ -1 +0,0 @@
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string"},"pages":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"root":{"type":"boolean"},"defaultOpen":{"type":"boolean"},"collapsible":{"type":"boolean"},"icon":{"type":"string"}}}
File diff suppressed because one or more lines are too long
-70
View File
@@ -1,70 +0,0 @@
// source.config.ts
import {
applyMdxPreset,
defineConfig,
defineDocs,
frontmatterSchema,
metaSchema
} from "@hanzo/docs-mdx/config";
import { z } from "zod";
import jsonSchema from "@hanzo/docs-mdx/plugins/json-schema";
import lastModified from "@hanzo/docs-mdx/plugins/last-modified";
var docs = defineDocs({
docs: {
schema: frontmatterSchema.extend({
index: z.boolean().default(false)
}),
postprocess: {
includeProcessedMarkdown: true,
extractLinkReferences: true
},
async: true,
async mdxOptions(environment) {
const { rehypeCodeDefaultOptions } = await import("@hanzo/docs-core/mdx-plugins/rehype-code");
const { remarkStructureDefaultOptions } = await import("@hanzo/docs-core/mdx-plugins/remark-structure");
const { remarkSteps } = await import("@hanzo/docs-core/mdx-plugins/remark-steps");
return applyMdxPreset({
remarkStructureOptions: {
types: [...remarkStructureDefaultOptions.types, "code"]
},
rehypeCodeOptions: {
langs: ["ts", "js", "javascript", "rust", "python", "go", "bash", "sh", "json", "json5", "yaml", "toml", "jsonc", "shell", "powershell", "dockerfile", "swift", "xml", "html", "css", "sql", "ini", "diff", "nix", "lua", "http", "markdown", "md", "applescript", "csv", "log", "ssh-config", "c", "objc", "regex"],
inline: "tailing-curly-colon",
themes: {
light: "github-light",
dark: "github-dark"
},
transformers: [
...rehypeCodeDefaultOptions.transformers ?? []
]
},
remarkCodeTabOptions: {
parseMdx: true
},
remarkNpmOptions: {
persist: {
id: "package-manager"
}
},
remarkPlugins: [remarkSteps]
})(environment);
}
},
meta: {
schema: metaSchema.extend({
description: z.string().optional()
})
}
});
var source_config_default = defineConfig({
plugins: [
jsonSchema({
insert: true
}),
lastModified()
]
});
export {
source_config_default as default,
docs
};
+3 -3
View File
@@ -16,9 +16,9 @@ const config: NextConfig = {
webpack: (config) => {
config.resolve.alias = {
...config.resolve.alias,
'@hanzo/mdx:collections/server': resolve(__dirname, './docs/server.ts'),
'@hanzo/mdx:collections/browser': resolve(__dirname, './docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './docs/dynamic.ts'),
'@hanzo/mdx:collections/server': resolve(__dirname, './.docs/server.ts'),
'@hanzo/mdx:collections/browser': resolve(__dirname, './.docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './.docs/dynamic.ts'),
};
return config;
},
+3
View File
@@ -24,6 +24,9 @@
"paths": {
"@/*": [
"./*"
],
"@hanzo/mdx:collections/*": [
"./.docs/*"
]
},
"target": "ES2017"
File diff suppressed because one or more lines are too long
-24
View File
@@ -1,24 +0,0 @@
// @ts-nocheck
import { dynamic } from '@hanzo/docs-mdx/runtime/dynamic';
import * as Config from '../source.config';
const create = await dynamic<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
docs: {
/**
* extracted references (e.g. hrefs, paths), useful for analyzing relationships between pages.
*/
extractedReferences: import("@hanzo/docs-mdx").ExtractedReference[];
},
}
} & {
DocData: {
docs: {
/**
* Last modified date of document file, obtained from version control.
*
*/
lastModified?: Date;
},
}
}>(Config, {"configPath":"source.config.ts","environment":"next","outDir":"docs"}, {"doc":{"passthroughs":["extractedReferences","lastModified"]}});
File diff suppressed because one or more lines are too long
-66
View File
@@ -1,66 +0,0 @@
// source.config.ts
import {
applyMdxPreset,
defineConfig,
defineDocs,
frontmatterSchema,
metaSchema
} from "@hanzo/docs-mdx/config";
import { z } from "zod";
import lastModified from "@hanzo/docs-mdx/plugins/last-modified";
var docs = defineDocs({
docs: {
schema: frontmatterSchema.extend({
index: z.boolean().default(false)
}),
postprocess: {
includeProcessedMarkdown: true,
extractLinkReferences: true
},
async: true,
async mdxOptions(environment) {
const { rehypeCodeDefaultOptions } = await import("@hanzo/docs-core/mdx-plugins/rehype-code");
const { remarkStructureDefaultOptions } = await import("@hanzo/docs-core/mdx-plugins/remark-structure");
const { remarkSteps } = await import("@hanzo/docs-core/mdx-plugins/remark-steps");
return applyMdxPreset({
remarkStructureOptions: {
types: [...remarkStructureDefaultOptions.types, "code"]
},
rehypeCodeOptions: {
langs: ["ts", "tsx", "js", "jsx", "css", "go", "bash", "json", "yaml", "shell", "typescript", "javascript", "markdown", "prisma"],
inline: "tailing-curly-colon",
themes: {
light: "github-light",
dark: "github-dark"
},
transformers: [
...rehypeCodeDefaultOptions.transformers ?? []
]
},
remarkCodeTabOptions: {
parseMdx: true
},
remarkNpmOptions: {
persist: {
id: "package-manager"
}
},
remarkPlugins: [remarkSteps]
})(environment);
}
},
meta: {
schema: metaSchema.extend({
description: z.string().optional()
})
}
});
var source_config_default = defineConfig({
plugins: [
lastModified()
]
});
export {
source_config_default as default,
docs
};
+3 -3
View File
@@ -16,9 +16,9 @@ const config: NextConfig = {
webpack: (config) => {
config.resolve.alias = {
...config.resolve.alias,
'@hanzo/mdx:collections/server': resolve(__dirname, './docs/server.ts'),
'@hanzo/mdx:collections/browser': resolve(__dirname, './docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './docs/dynamic.ts'),
'@hanzo/mdx:collections/server': resolve(__dirname, './.docs/server.ts'),
'@hanzo/mdx:collections/browser': resolve(__dirname, './.docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './.docs/dynamic.ts'),
};
return config;
},
+1 -1
View File
@@ -14,7 +14,7 @@
"incremental": true,
"plugins": [{ "name": "next" }],
"paths": {
"@/*": ["./*"]
"@/*": ["./*"], "@hanzo/mdx:collections/*": ["./.docs/*"]
},
"target": "ES2017"
},
-12
View File
@@ -1,12 +0,0 @@
// @ts-nocheck
import { browser } from '@hanzo/docs-mdx/runtime/browser';
import type * as Config from '../source.config';
const create = browser<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
}
}>();
const browserCollections = {
docs: create.doc("docs", {"index.mdx": () => import("../content/docs/index.mdx?collection=docs"), "getting-started/index.mdx": () => import("../content/docs/getting-started/index.mdx?collection=docs"), "getting-started/quickstart.mdx": () => import("../content/docs/getting-started/quickstart.mdx?collection=docs"), "privacy/index.mdx": () => import("../content/docs/privacy/index.mdx?collection=docs"), "api/index.mdx": () => import("../content/docs/api/index.mdx?collection=docs"), "products/experiments.mdx": () => import("../content/docs/products/experiments.mdx?collection=docs"), "products/feature-flags.mdx": () => import("../content/docs/products/feature-flags.mdx?collection=docs"), "products/index.mdx": () => import("../content/docs/products/index.mdx?collection=docs"), "products/llm-analytics.mdx": () => import("../content/docs/products/llm-analytics.mdx?collection=docs"), "products/replay.mdx": () => import("../content/docs/products/replay.mdx?collection=docs"), "products/surveys.mdx": () => import("../content/docs/products/surveys.mdx?collection=docs"), "self-hosting/index.mdx": () => import("../content/docs/self-hosting/index.mdx?collection=docs"), }),
};
export default browserCollections;
-8
View File
@@ -1,8 +0,0 @@
// @ts-nocheck
import { dynamic } from '@hanzo/docs-mdx/runtime/dynamic';
import * as Config from '../source.config';
const create = await dynamic<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
}
}>(Config, {"configPath":"source.config.ts","environment":"next","outDir":"docs"}, {"doc":{"passthroughs":["extractedReferences"]}});
-28
View File
@@ -1,28 +0,0 @@
// @ts-nocheck
import * as __fd_glob_17 from "../content/docs/self-hosting/index.mdx?collection=docs"
import * as __fd_glob_16 from "../content/docs/products/surveys.mdx?collection=docs"
import * as __fd_glob_15 from "../content/docs/products/replay.mdx?collection=docs"
import * as __fd_glob_14 from "../content/docs/products/llm-analytics.mdx?collection=docs"
import * as __fd_glob_13 from "../content/docs/products/index.mdx?collection=docs"
import * as __fd_glob_12 from "../content/docs/products/feature-flags.mdx?collection=docs"
import * as __fd_glob_11 from "../content/docs/products/experiments.mdx?collection=docs"
import * as __fd_glob_10 from "../content/docs/api/index.mdx?collection=docs"
import * as __fd_glob_9 from "../content/docs/privacy/index.mdx?collection=docs"
import * as __fd_glob_8 from "../content/docs/getting-started/quickstart.mdx?collection=docs"
import * as __fd_glob_7 from "../content/docs/getting-started/index.mdx?collection=docs"
import * as __fd_glob_6 from "../content/docs/index.mdx?collection=docs"
import { default as __fd_glob_5 } from "../content/docs/products/meta.json?collection=docs"
import { default as __fd_glob_4 } from "../content/docs/self-hosting/meta.json?collection=docs"
import { default as __fd_glob_3 } from "../content/docs/privacy/meta.json?collection=docs"
import { default as __fd_glob_2 } from "../content/docs/getting-started/meta.json?collection=docs"
import { default as __fd_glob_1 } from "../content/docs/api/meta.json?collection=docs"
import { default as __fd_glob_0 } from "../content/docs/meta.json?collection=docs"
import { server } from '@hanzo/docs-mdx/runtime/server';
import type * as Config from '../source.config';
const create = server<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
}
}>({"doc":{"passthroughs":["extractedReferences"]}});
export const docs = await create.docs("docs", "content/docs", {"meta.json": __fd_glob_0, "api/meta.json": __fd_glob_1, "getting-started/meta.json": __fd_glob_2, "privacy/meta.json": __fd_glob_3, "self-hosting/meta.json": __fd_glob_4, "products/meta.json": __fd_glob_5, }, {"index.mdx": __fd_glob_6, "getting-started/index.mdx": __fd_glob_7, "getting-started/quickstart.mdx": __fd_glob_8, "privacy/index.mdx": __fd_glob_9, "api/index.mdx": __fd_glob_10, "products/experiments.mdx": __fd_glob_11, "products/feature-flags.mdx": __fd_glob_12, "products/index.mdx": __fd_glob_13, "products/llm-analytics.mdx": __fd_glob_14, "products/replay.mdx": __fd_glob_15, "products/surveys.mdx": __fd_glob_16, "self-hosting/index.mdx": __fd_glob_17, });
-23
View File
@@ -1,23 +0,0 @@
// source.config.ts
import { defineConfig, defineDocs, frontmatterSchema, metaSchema } from "@hanzo/docs-mdx/config";
var docs = defineDocs({
dir: "content/docs",
docs: {
schema: frontmatterSchema,
postprocess: {
includeProcessedMarkdown: true
}
},
meta: {
schema: metaSchema
}
});
var source_config_default = defineConfig({
mdxOptions: {
// MDX options
}
});
export {
source_config_default as default,
docs
};
+1 -1
View File
@@ -1,4 +1,4 @@
import { docs } from '@/docs/server';
import { docs } from '@hanzo/mdx:collections/server';
import { type InferPageType, loader } from '@hanzo/docs-core/source';
import { lucideIconsPlugin } from '@hanzo/docs-core/source/lucide-icons';
+9
View File
@@ -6,6 +6,15 @@ const withMDX = createMDX();
const config = {
output: 'export',
reactStrictMode: true,
// The generated collection modules live in the generator's outDir (`.docs/`),
// written on every build by createMDX(). Same alias, same location, every app.
turbopack: {
resolveAlias: {
'@hanzo/mdx:collections/server': './.docs/server.ts',
'@hanzo/mdx:collections/browser': './.docs/browser.ts',
'@hanzo/mdx:collections/dynamic': './.docs/dynamic.ts',
},
},
images: {
unoptimized: true,
},
+3
View File
@@ -25,6 +25,9 @@
"paths": {
"@/*": [
"./*"
],
"@hanzo/mdx:collections/*": [
"./.docs/*"
]
}
},
File diff suppressed because one or more lines are too long
-24
View File
@@ -1,24 +0,0 @@
// @ts-nocheck
import { dynamic } from '@hanzo/docs-mdx/runtime/dynamic';
import * as Config from '../source.config';
const create = await dynamic<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
docs: {
/**
* extracted references (e.g. hrefs, paths), useful for analyzing relationships between pages.
*/
extractedReferences: import("@hanzo/docs-mdx").ExtractedReference[];
},
}
} & {
DocData: {
docs: {
/**
* Last modified date of document file, obtained from version control.
*
*/
lastModified?: Date;
},
}
}>(Config, {"configPath":"source.config.ts","environment":"next","outDir":"docs"}, {"doc":{"passthroughs":["extractedReferences","lastModified"]}});
@@ -1 +0,0 @@
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"full":{"type":"boolean"},"_openapi":{"type":"object","properties":{},"additionalProperties":{}},"index":{"default":false,"type":"boolean"}},"required":["title"]}
@@ -1 +0,0 @@
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string"},"pages":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"root":{"type":"boolean"},"defaultOpen":{"type":"boolean"},"collapsible":{"type":"boolean"},"icon":{"type":"string"}}}
File diff suppressed because one or more lines are too long
-70
View File
@@ -1,70 +0,0 @@
// source.config.ts
import {
applyMdxPreset,
defineConfig,
defineDocs,
frontmatterSchema,
metaSchema
} from "@hanzo/docs-mdx/config";
import { z } from "zod";
import jsonSchema from "@hanzo/docs-mdx/plugins/json-schema";
import lastModified from "@hanzo/docs-mdx/plugins/last-modified";
var docs = defineDocs({
docs: {
schema: frontmatterSchema.extend({
index: z.boolean().default(false)
}),
postprocess: {
includeProcessedMarkdown: true,
extractLinkReferences: true
},
async: true,
async mdxOptions(environment) {
const { rehypeCodeDefaultOptions } = await import("@hanzo/docs-core/mdx-plugins/rehype-code");
const { remarkStructureDefaultOptions } = await import("@hanzo/docs-core/mdx-plugins/remark-structure");
const { remarkSteps } = await import("@hanzo/docs-core/mdx-plugins/remark-steps");
return applyMdxPreset({
remarkStructureOptions: {
types: [...remarkStructureDefaultOptions.types, "code"]
},
rehypeCodeOptions: {
langs: ["ts", "js", "javascript", "rust", "python", "go", "bash", "sh", "json", "json5", "yaml", "toml", "jsonc", "shell", "powershell", "dockerfile", "swift", "xml", "html", "css", "sql", "ini", "diff", "nix", "lua", "http", "markdown", "md", "applescript", "csv", "log", "ssh-config", "c", "objc", "regex"],
inline: "tailing-curly-colon",
themes: {
light: "github-light",
dark: "github-dark"
},
transformers: [
...rehypeCodeDefaultOptions.transformers ?? []
]
},
remarkCodeTabOptions: {
parseMdx: true
},
remarkNpmOptions: {
persist: {
id: "package-manager"
}
},
remarkPlugins: [remarkSteps]
})(environment);
}
},
meta: {
schema: metaSchema.extend({
description: z.string().optional()
})
}
});
var source_config_default = defineConfig({
plugins: [
jsonSchema({
insert: true
}),
lastModified()
]
});
export {
source_config_default as default,
docs
};
+3 -3
View File
@@ -16,9 +16,9 @@ const config: NextConfig = {
webpack: (config) => {
config.resolve.alias = {
...config.resolve.alias,
'@hanzo/mdx:collections/server': resolve(__dirname, './docs/server.ts'),
'@hanzo/mdx:collections/browser': resolve(__dirname, './docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './docs/dynamic.ts'),
'@hanzo/mdx:collections/server': resolve(__dirname, './.docs/server.ts'),
'@hanzo/mdx:collections/browser': resolve(__dirname, './.docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './.docs/dynamic.ts'),
};
return config;
},
+3
View File
@@ -24,6 +24,9 @@
"paths": {
"@/*": [
"./*"
],
"@hanzo/mdx:collections/*": [
"./.docs/*"
]
},
"target": "ES2017"
-28
View File
@@ -1,28 +0,0 @@
// @ts-nocheck
import { browser } from '@hanzo/docs-mdx/runtime/browser';
import type * as Config from '../source.config';
const create = browser<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
docs: {
/**
* extracted references (e.g. hrefs, paths), useful for analyzing relationships between pages.
*/
extractedReferences: import("@hanzo/docs-mdx").ExtractedReference[];
},
}
} & {
DocData: {
docs: {
/**
* Last modified date of document file, obtained from version control.
*
*/
lastModified?: Date;
},
}
}>();
const browserCollections = {
docs: create.doc("docs", {"index.mdx": () => import("../content/docs/index.mdx?collection=docs"), "access-control/cluster-permissions.mdx": () => import("../content/docs/access-control/cluster-permissions.mdx?collection=docs"), "access-control/environment-protection.mdx": () => import("../content/docs/access-control/environment-protection.mdx?collection=docs"), "access-control/index.mdx": () => import("../content/docs/access-control/index.mdx?collection=docs"), "access-control/invitations.mdx": () => import("../content/docs/access-control/invitations.mdx?collection=docs"), "access-control/organizations.mdx": () => import("../content/docs/access-control/organizations.mdx?collection=docs"), "access-control/roles.mdx": () => import("../content/docs/access-control/roles.mdx?collection=docs"), "api/authentication.mdx": () => import("../content/docs/api/authentication.mdx?collection=docs"), "api/clusters.mdx": () => import("../content/docs/api/clusters.mdx?collection=docs"), "api/containers.mdx": () => import("../content/docs/api/containers.mdx?collection=docs"), "api/index.mdx": () => import("../content/docs/api/index.mdx?collection=docs"), "api/organizations.mdx": () => import("../content/docs/api/organizations.mdx?collection=docs"), "api/vms.mdx": () => import("../content/docs/api/vms.mdx?collection=docs"), "clusters/fleet.mdx": () => import("../content/docs/clusters/fleet.mdx?collection=docs"), "clusters/index.mdx": () => import("../content/docs/clusters/index.mdx?collection=docs"), "clusters/node-pools.mdx": () => import("../content/docs/clusters/node-pools.mdx?collection=docs"), "clusters/provisioning.mdx": () => import("../content/docs/clusters/provisioning.mdx?collection=docs"), "clusters/register.mdx": () => import("../content/docs/clusters/register.mdx?collection=docs"), "deployments/container-registry.mdx": () => import("../content/docs/deployments/container-registry.mdx?collection=docs"), "deployments/docker-compose.mdx": () => import("../content/docs/deployments/docker-compose.mdx?collection=docs"), "deployments/docker-swarm.mdx": () => import("../content/docs/deployments/docker-swarm.mdx?collection=docs"), "deployments/domains-tls.mdx": () => import("../content/docs/deployments/domains-tls.mdx?collection=docs"), "deployments/git-deployments.mdx": () => import("../content/docs/deployments/git-deployments.mdx?collection=docs"), "deployments/index.mdx": () => import("../content/docs/deployments/index.mdx?collection=docs"), "deployments/kubernetes.mdx": () => import("../content/docs/deployments/kubernetes.mdx?collection=docs"), "getting-started/cli.mdx": () => import("../content/docs/getting-started/cli.mdx?collection=docs"), "getting-started/concepts.mdx": () => import("../content/docs/getting-started/concepts.mdx?collection=docs"), "getting-started/index.mdx": () => import("../content/docs/getting-started/index.mdx?collection=docs"), "getting-started/quickstart.mdx": () => import("../content/docs/getting-started/quickstart.mdx?collection=docs"), "pricing/compute.mdx": () => import("../content/docs/pricing/compute.mdx?collection=docs"), "pricing/index.mdx": () => import("../content/docs/pricing/index.mdx?collection=docs"), "pricing/plans.mdx": () => import("../content/docs/pricing/plans.mdx?collection=docs"), "pricing/storage.mdx": () => import("../content/docs/pricing/storage.mdx?collection=docs"), "virtual-machines/aws.mdx": () => import("../content/docs/virtual-machines/aws.mdx?collection=docs"), "virtual-machines/digitalocean.mdx": () => import("../content/docs/virtual-machines/digitalocean.mdx?collection=docs"), "virtual-machines/hetzner.mdx": () => import("../content/docs/virtual-machines/hetzner.mdx?collection=docs"), "virtual-machines/index.mdx": () => import("../content/docs/virtual-machines/index.mdx?collection=docs"), "virtual-machines/terminal.mdx": () => import("../content/docs/virtual-machines/terminal.mdx?collection=docs"), "virtual-machines/volumes.mdx": () => import("../content/docs/virtual-machines/volumes.mdx?collection=docs"), }),
};
export default browserCollections;
-24
View File
@@ -1,24 +0,0 @@
// @ts-nocheck
import { dynamic } from '@hanzo/docs-mdx/runtime/dynamic';
import * as Config from '../source.config';
const create = await dynamic<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
docs: {
/**
* extracted references (e.g. hrefs, paths), useful for analyzing relationships between pages.
*/
extractedReferences: import("@hanzo/docs-mdx").ExtractedReference[];
},
}
} & {
DocData: {
docs: {
/**
* Last modified date of document file, obtained from version control.
*
*/
lastModified?: Date;
},
}
}>(Config, {"configPath":"source.config.ts","environment":"next","outDir":"docs"}, {"doc":{"passthroughs":["extractedReferences","lastModified"]}});
@@ -1 +0,0 @@
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"full":{"type":"boolean"},"_openapi":{"type":"object","properties":{},"additionalProperties":{}},"index":{"default":false,"type":"boolean"}},"required":["title"]}
@@ -1 +0,0 @@
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string"},"pages":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"root":{"type":"boolean"},"defaultOpen":{"type":"boolean"},"collapsible":{"type":"boolean"},"icon":{"type":"string"}}}
File diff suppressed because one or more lines are too long
-70
View File
@@ -1,70 +0,0 @@
// source.config.ts
import {
applyMdxPreset,
defineConfig,
defineDocs,
frontmatterSchema,
metaSchema
} from "@hanzo/docs-mdx/config";
import { z } from "zod";
import jsonSchema from "@hanzo/docs-mdx/plugins/json-schema";
import lastModified from "@hanzo/docs-mdx/plugins/last-modified";
var docs = defineDocs({
docs: {
schema: frontmatterSchema.extend({
index: z.boolean().default(false)
}),
postprocess: {
includeProcessedMarkdown: true,
extractLinkReferences: true
},
async: true,
async mdxOptions(environment) {
const { rehypeCodeDefaultOptions } = await import("@hanzo/docs-core/mdx-plugins/rehype-code");
const { remarkStructureDefaultOptions } = await import("@hanzo/docs-core/mdx-plugins/remark-structure");
const { remarkSteps } = await import("@hanzo/docs-core/mdx-plugins/remark-steps");
return applyMdxPreset({
remarkStructureOptions: {
types: [...remarkStructureDefaultOptions.types, "code"]
},
rehypeCodeOptions: {
langs: ["ts", "js", "rust", "python", "go", "bash", "json", "yaml", "toml", "jsonc", "shell", "powershell", "dockerfile"],
inline: "tailing-curly-colon",
themes: {
light: "github-light",
dark: "github-dark"
},
transformers: [
...rehypeCodeDefaultOptions.transformers ?? []
]
},
remarkCodeTabOptions: {
parseMdx: true
},
remarkNpmOptions: {
persist: {
id: "package-manager"
}
},
remarkPlugins: [remarkSteps]
})(environment);
}
},
meta: {
schema: metaSchema.extend({
description: z.string().optional()
})
}
});
var source_config_default = defineConfig({
plugins: [
jsonSchema({
insert: true
}),
lastModified()
]
});
export {
source_config_default as default,
docs
};
+3 -3
View File
@@ -16,9 +16,9 @@ const config: NextConfig = {
webpack: (config) => {
config.resolve.alias = {
...config.resolve.alias,
'@hanzo/mdx:collections/server': resolve(__dirname, './docs/server.ts'),
'@hanzo/mdx:collections/browser': resolve(__dirname, './docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './docs/dynamic.ts'),
'@hanzo/mdx:collections/server': resolve(__dirname, './.docs/server.ts'),
'@hanzo/mdx:collections/browser': resolve(__dirname, './.docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './.docs/dynamic.ts'),
};
return config;
},
+1 -1
View File
@@ -16,7 +16,7 @@
{ "name": "next" }
],
"paths": {
"@/*": ["./*"]
"@/*": ["./*"], "@hanzo/mdx:collections/*": ["./.docs/*"]
},
"target": "ES2017"
},
-12
View File
@@ -1,12 +0,0 @@
// @ts-nocheck
import { browser } from '@hanzo/docs-mdx/runtime/browser';
import type * as Config from '../source.config';
const create = browser<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
}
}>();
const browserCollections = {
docs: create.doc("docs", {"changelog.mdx": () => import("../content/docs/changelog.mdx?collection=docs"), "getting-started.mdx": () => import("../content/docs/getting-started.mdx?collection=docs"), "index.mdx": () => import("../content/docs/index.mdx?collection=docs"), "nist-mptc.mdx": () => import("../content/docs/nist-mptc.mdx?collection=docs"), "postmortem.mdx": () => import("../content/docs/postmortem.mdx?collection=docs"), "security.mdx": () => import("../content/docs/security.mdx?collection=docs"), "proofs/axiom-inventory.mdx": () => import("../content/docs/proofs/axiom-inventory.mdx?collection=docs"), "proofs/extraction.mdx": () => import("../content/docs/proofs/extraction.mdx?collection=docs"), "proofs/lean-bridge.mdx": () => import("../content/docs/proofs/lean-bridge.mdx?collection=docs"), "proofs/overview.mdx": () => import("../content/docs/proofs/overview.mdx?collection=docs"), "protocol/dkg.mdx": () => import("../content/docs/protocol/dkg.mdx?collection=docs"), "protocol/fips-204.mdx": () => import("../content/docs/protocol/fips-204.mdx?collection=docs"), "protocol/overview.mdx": () => import("../content/docs/protocol/overview.mdx?collection=docs"), "protocol/parameters.mdx": () => import("../content/docs/protocol/parameters.mdx?collection=docs"), "reference/api.mdx": () => import("../content/docs/reference/api.mdx?collection=docs"), "reference/interop.mdx": () => import("../content/docs/reference/interop.mdx?collection=docs"), "reference/kat.mdx": () => import("../content/docs/reference/kat.mdx?collection=docs"), }),
};
export default browserCollections;
-8
View File
@@ -1,8 +0,0 @@
// @ts-nocheck
import { dynamic } from '@hanzo/docs-mdx/runtime/dynamic';
import * as Config from '../source.config';
const create = await dynamic<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
}
}>(Config, {"configPath":"source.config.ts","environment":"next","outDir":"docs"}, {"doc":{"passthroughs":["extractedReferences"]}});
-31
View File
@@ -1,31 +0,0 @@
// @ts-nocheck
import * as __fd_glob_20 from "../content/docs/reference/kat.mdx?collection=docs"
import * as __fd_glob_19 from "../content/docs/reference/interop.mdx?collection=docs"
import * as __fd_glob_18 from "../content/docs/reference/api.mdx?collection=docs"
import * as __fd_glob_17 from "../content/docs/protocol/parameters.mdx?collection=docs"
import * as __fd_glob_16 from "../content/docs/protocol/overview.mdx?collection=docs"
import * as __fd_glob_15 from "../content/docs/protocol/fips-204.mdx?collection=docs"
import * as __fd_glob_14 from "../content/docs/protocol/dkg.mdx?collection=docs"
import * as __fd_glob_13 from "../content/docs/proofs/overview.mdx?collection=docs"
import * as __fd_glob_12 from "../content/docs/proofs/lean-bridge.mdx?collection=docs"
import * as __fd_glob_11 from "../content/docs/proofs/extraction.mdx?collection=docs"
import * as __fd_glob_10 from "../content/docs/proofs/axiom-inventory.mdx?collection=docs"
import * as __fd_glob_9 from "../content/docs/security.mdx?collection=docs"
import * as __fd_glob_8 from "../content/docs/postmortem.mdx?collection=docs"
import * as __fd_glob_7 from "../content/docs/nist-mptc.mdx?collection=docs"
import * as __fd_glob_6 from "../content/docs/index.mdx?collection=docs"
import * as __fd_glob_5 from "../content/docs/getting-started.mdx?collection=docs"
import * as __fd_glob_4 from "../content/docs/changelog.mdx?collection=docs"
import { default as __fd_glob_3 } from "../content/docs/protocol/meta.json?collection=docs"
import { default as __fd_glob_2 } from "../content/docs/reference/meta.json?collection=docs"
import { default as __fd_glob_1 } from "../content/docs/proofs/meta.json?collection=docs"
import { default as __fd_glob_0 } from "../content/docs/meta.json?collection=docs"
import { server } from '@hanzo/docs-mdx/runtime/server';
import type * as Config from '../source.config';
const create = server<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
}
}>({"doc":{"passthroughs":["extractedReferences"]}});
export const docs = await create.docs("docs", "content/docs", {"meta.json": __fd_glob_0, "proofs/meta.json": __fd_glob_1, "reference/meta.json": __fd_glob_2, "protocol/meta.json": __fd_glob_3, }, {"changelog.mdx": __fd_glob_4, "getting-started.mdx": __fd_glob_5, "index.mdx": __fd_glob_6, "nist-mptc.mdx": __fd_glob_7, "postmortem.mdx": __fd_glob_8, "security.mdx": __fd_glob_9, "proofs/axiom-inventory.mdx": __fd_glob_10, "proofs/extraction.mdx": __fd_glob_11, "proofs/lean-bridge.mdx": __fd_glob_12, "proofs/overview.mdx": __fd_glob_13, "protocol/dkg.mdx": __fd_glob_14, "protocol/fips-204.mdx": __fd_glob_15, "protocol/overview.mdx": __fd_glob_16, "protocol/parameters.mdx": __fd_glob_17, "reference/api.mdx": __fd_glob_18, "reference/interop.mdx": __fd_glob_19, "reference/kat.mdx": __fd_glob_20, });
-24
View File
@@ -1,24 +0,0 @@
// source.config.ts
import { applyMdxPreset, defineConfig, defineDocs, frontmatterSchema, metaSchema } from "@hanzo/docs-mdx/config";
var docs = defineDocs({
dir: "content/docs",
docs: {
schema: frontmatterSchema,
async mdxOptions(environment) {
const { default: remarkMath } = await import("remark-math");
const { default: rehypeKatex } = await import("rehype-katex");
return applyMdxPreset({
remarkPlugins: (v) => [remarkMath, ...v],
rehypePlugins: (v) => [rehypeKatex, ...v]
})(environment);
}
},
meta: {
schema: metaSchema
}
});
var source_config_default = defineConfig();
export {
source_config_default as default,
docs
};
+1 -1
View File
@@ -1,4 +1,4 @@
import { docs } from '@/docs/server';
import { docs } from '@hanzo/mdx:collections/server';
import { type InferPageType, loader } from '@hanzo/docs-core/source';
import { lucideIconsPlugin } from '@hanzo/docs-core/source/lucide-icons';
+9
View File
@@ -6,6 +6,15 @@ const withMDX = createMDX();
const config = {
output: 'export',
reactStrictMode: true,
// The generated collection modules live in the generator's outDir (`.docs/`),
// written on every build by createMDX(). Same alias, same location, every app.
turbopack: {
resolveAlias: {
'@hanzo/mdx:collections/server': './.docs/server.ts',
'@hanzo/mdx:collections/browser': './.docs/browser.ts',
'@hanzo/mdx:collections/dynamic': './.docs/dynamic.ts',
},
},
images: {
unoptimized: true,
},
+3
View File
@@ -25,6 +25,9 @@
"paths": {
"@/*": [
"./*"
],
"@hanzo/mdx:collections/*": [
"./.docs/*"
]
}
},
File diff suppressed because one or more lines are too long
-24
View File
@@ -1,24 +0,0 @@
// @ts-nocheck
import { dynamic } from '@hanzo/docs-mdx/runtime/dynamic';
import * as Config from '../source.config';
const create = await dynamic<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
docs: {
/**
* extracted references (e.g. hrefs, paths), useful for analyzing relationships between pages.
*/
extractedReferences: import("@hanzo/docs-mdx").ExtractedReference[];
},
}
} & {
DocData: {
docs: {
/**
* Last modified date of document file, obtained from version control.
*
*/
lastModified?: Date;
},
}
}>(Config, {"configPath":"source.config.ts","environment":"next","outDir":"docs"}, {"doc":{"passthroughs":["extractedReferences","lastModified"]}});
@@ -1 +0,0 @@
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"full":{"type":"boolean"},"_openapi":{"type":"object","properties":{},"additionalProperties":{}},"index":{"default":false,"type":"boolean"}},"required":["title"]}
@@ -1 +0,0 @@
{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string"},"pages":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"root":{"type":"boolean"},"defaultOpen":{"type":"boolean"},"collapsible":{"type":"boolean"},"icon":{"type":"string"}}}
File diff suppressed because one or more lines are too long
-70
View File
@@ -1,70 +0,0 @@
// source.config.ts
import {
applyMdxPreset,
defineConfig,
defineDocs,
frontmatterSchema,
metaSchema
} from "@hanzo/docs-mdx/config";
import { z } from "zod";
import jsonSchema from "@hanzo/docs-mdx/plugins/json-schema";
import lastModified from "@hanzo/docs-mdx/plugins/last-modified";
var docs = defineDocs({
docs: {
schema: frontmatterSchema.extend({
index: z.boolean().default(false)
}),
postprocess: {
includeProcessedMarkdown: true,
extractLinkReferences: true
},
async: true,
async mdxOptions(environment) {
const { rehypeCodeDefaultOptions } = await import("@hanzo/docs-core/mdx-plugins/rehype-code");
const { remarkStructureDefaultOptions } = await import("@hanzo/docs-core/mdx-plugins/remark-structure");
const { remarkSteps } = await import("@hanzo/docs-core/mdx-plugins/remark-steps");
return applyMdxPreset({
remarkStructureOptions: {
types: [...remarkStructureDefaultOptions.types, "code"]
},
rehypeCodeOptions: {
langs: ["ts", "js", "javascript", "rust", "python", "go", "bash", "sh", "json", "json5", "yaml", "toml", "jsonc", "shell", "powershell", "dockerfile", "swift", "xml", "html", "css", "sql", "ini", "diff", "nix", "lua", "http", "markdown", "md", "applescript", "csv", "log", "ssh-config", "c", "objc", "regex"],
inline: "tailing-curly-colon",
themes: {
light: "github-light",
dark: "github-dark"
},
transformers: [
...rehypeCodeDefaultOptions.transformers ?? []
]
},
remarkCodeTabOptions: {
parseMdx: true
},
remarkNpmOptions: {
persist: {
id: "package-manager"
}
},
remarkPlugins: [remarkSteps]
})(environment);
}
},
meta: {
schema: metaSchema.extend({
description: z.string().optional()
})
}
});
var source_config_default = defineConfig({
plugins: [
jsonSchema({
insert: true
}),
lastModified()
]
});
export {
source_config_default as default,
docs
};
+3 -3
View File
@@ -16,9 +16,9 @@ const config: NextConfig = {
webpack: (config) => {
config.resolve.alias = {
...config.resolve.alias,
'@hanzo/mdx:collections/server': resolve(__dirname, './docs/server.ts'),
'@hanzo/mdx:collections/browser': resolve(__dirname, './docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './docs/dynamic.ts'),
'@hanzo/mdx:collections/server': resolve(__dirname, './.docs/server.ts'),
'@hanzo/mdx:collections/browser': resolve(__dirname, './.docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './.docs/dynamic.ts'),
};
return config;
},
+3
View File
@@ -24,6 +24,9 @@
"paths": {
"@/*": [
"./*"
],
"@hanzo/mdx:collections/*": [
"./.docs/*"
]
},
"target": "ES2017"
File diff suppressed because one or more lines are too long
-24
View File
@@ -1,24 +0,0 @@
// @ts-nocheck
import { dynamic } from '@hanzo/docs-mdx/runtime/dynamic';
import * as Config from '../source.config';
const create = await dynamic<typeof Config, import("@hanzo/docs-mdx/runtime/types").InternalTypeConfig & {
DocData: {
docs: {
/**
* extracted references (e.g. hrefs, paths), useful for analyzing relationships between pages.
*/
extractedReferences: import("@hanzo/docs-mdx").ExtractedReference[];
},
}
} & {
DocData: {
docs: {
/**
* Last modified date of document file, obtained from version control.
*
*/
lastModified?: Date;
},
}
}>(Config, {"configPath":"source.config.ts","environment":"next","outDir":"docs"}, {"doc":{"passthroughs":["extractedReferences","lastModified"]}});
File diff suppressed because one or more lines are too long
-66
View File
@@ -1,66 +0,0 @@
// source.config.ts
import {
applyMdxPreset,
defineConfig,
defineDocs,
frontmatterSchema,
metaSchema
} from "@hanzo/docs-mdx/config";
import { z } from "zod";
import lastModified from "@hanzo/docs-mdx/plugins/last-modified";
var docs = defineDocs({
docs: {
schema: frontmatterSchema.extend({
index: z.boolean().default(false)
}),
postprocess: {
includeProcessedMarkdown: true,
extractLinkReferences: true
},
async: true,
async mdxOptions(environment) {
const { rehypeCodeDefaultOptions } = await import("@hanzo/docs-core/mdx-plugins/rehype-code");
const { remarkStructureDefaultOptions } = await import("@hanzo/docs-core/mdx-plugins/remark-structure");
const { remarkSteps } = await import("@hanzo/docs-core/mdx-plugins/remark-steps");
return applyMdxPreset({
remarkStructureOptions: {
types: [...remarkStructureDefaultOptions.types, "code"]
},
rehypeCodeOptions: {
langs: ["ts", "tsx", "js", "jsx", "css", "go", "bash", "json", "yaml", "shell", "typescript", "javascript", "markdown", "prisma"],
inline: "tailing-curly-colon",
themes: {
light: "github-light",
dark: "github-dark"
},
transformers: [
...rehypeCodeDefaultOptions.transformers ?? []
]
},
remarkCodeTabOptions: {
parseMdx: true
},
remarkNpmOptions: {
persist: {
id: "package-manager"
}
},
remarkPlugins: [remarkSteps]
})(environment);
}
},
meta: {
schema: metaSchema.extend({
description: z.string().optional()
})
}
});
var source_config_default = defineConfig({
plugins: [
lastModified()
]
});
export {
source_config_default as default,
docs
};
+3 -3
View File
@@ -16,9 +16,9 @@ const config: NextConfig = {
webpack: (config) => {
config.resolve.alias = {
...config.resolve.alias,
'@hanzo/mdx:collections/server': resolve(__dirname, './docs/server.ts'),
'@hanzo/mdx:collections/browser': resolve(__dirname, './docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './docs/dynamic.ts'),
'@hanzo/mdx:collections/server': resolve(__dirname, './.docs/server.ts'),
'@hanzo/mdx:collections/browser': resolve(__dirname, './.docs/browser.ts'),
'@hanzo/mdx:collections/dynamic': resolve(__dirname, './.docs/dynamic.ts'),
};
return config;
},
+1 -1
View File
@@ -14,7 +14,7 @@
"incremental": true,
"plugins": [{ "name": "next" }],
"paths": {
"@/*": ["./*"]
"@/*": ["./*"], "@hanzo/mdx:collections/*": ["./.docs/*"]
},
"target": "ES2017"
},

Some files were not shown because too many files have changed in this diff Show More