Sorrell Docgen

Search documentation

Menu

API REFERENCE

@sorrell/docs-create-website

Public exports for website generation and deployment.

55 exportsSource

Functions

buildPackageProductSkillFUNCTION

Signature

export declare function buildPackageProductSkill(
    target: string,
    packageId: string,
    outputDirectory: string
): Effect<ProductSkillResult, unknown>;

buildProductSkillFUNCTION

Signature

export declare function buildProductSkill(
    options: ProductSkillOptions
): Effect<ProductSkillResult, unknown, AtomicWriter | DocsFileSystem | DocsPath | ArchiveService>;

buildWebsiteFUNCTION

Signature

export declare function buildWebsite(
    target: string
): Effect<void, unknown>;

cleanupWebsiteDeploymentsFUNCTION

Signature

export declare function cleanupWebsiteDeployments(
    manifest: WebsiteReleaseManifest
): Effect<void, unknown, VercelService>;

createGeneratedWebsiteFUNCTION

Signature

export declare function createGeneratedWebsite(
    options: WebsiteGenerationOptions
): GeneratedWebsite;

Signature

export declare function createGeneratedWebsiteFromConfig(
    target: string,
    config: DocsConfig,
    options?: Omit<WebsiteGenerationOptions, "config" | "target">
): GeneratedWebsite;

createLandingRewritesFUNCTION

Signature

export declare function createLandingRewrites(
    routing: {
        documentationPrefix: string;
        storybookPrefix: string
    },
    deployments: WebsiteDeployments,
    redirects?: readonly {
        from: string;
        status: 301 | 302;
        to: string
    }[]
): LandingVercelConfig;

createNativeAuthoringFileFUNCTION

Signature

export declare function createNativeAuthoringFile(
    __namedParameters: NativeAuthoringOptions
): NativeGeneratedFile;

createNativeStorybookAppFUNCTION

Signature

export declare function createNativeStorybookApp(
    options: NativeAppGenerationOptions
): NativeGeneratedApp;

createPlaceholderDeploymentsFUNCTION

Signature

export declare function createPlaceholderDeployments(
    config: DocsConfig,
    snapshot?: boolean
): WebsiteDeployments;

createSnapshotProjectsFUNCTION

Signature

export declare function createSnapshotProjects(
    config: DocsConfig
): { documentation: { directory: string; id?: string; origin?: string; productionBranch?: string; project?: string; routePrefix: string; team?: string }; landing: { directory: string; id?: string; origin?: string; productionBranch?: string; project?: string; routePrefix: string; team?: string }; mcp?: { directory: string; id?: string; origin?: string; productionBranch?: string; project?: string; routePrefix: string; team?: string }; storybook?: { directory: string; id?: string; origin?: string; productionBranch?: string; project?: string; routePrefix: string; team?: string } };

deployWebsiteFUNCTION

Signature

export declare function deployWebsite(
    website: GeneratedWebsite,
    options?: WebsiteDeploymentOptions
): Effect<WebsiteReleaseManifest, unknown, VercelService | AtomicWriter | DocsFileSystem | DocsPath>;

devNativeAppFUNCTION

Signature

export declare function devNativeApp(
    target: string
): Effect<never, unknown>;

devWebsiteFUNCTION

Signature

export declare function devWebsite(
    target: string
): Effect<never, unknown>;

generateNativeAppFUNCTION

Signature

export declare function generateNativeApp(
    target: string,
    platform?: NativePlatform
): Effect<void, unknown>;

promoteWebsiteFUNCTION

Signature

export declare function promoteWebsite(
    manifest: WebsiteReleaseManifest
): Effect<void, unknown, VercelService>;

publicUrlFUNCTION

Signature

export declare function publicUrl(
    siteUrl: string,
    prefix: string,
    path?: string
): string;

readGeneratedWebsiteFUNCTION

Signature

export declare function readGeneratedWebsite(
    target: string
): Effect<GeneratedWebsite, unknown>;

rollbackWebsiteFUNCTION

Signature

export declare function rollbackWebsite(
    target: string,
    releaseId?: string
): Effect<WebsiteReleaseManifest, unknown, VercelService | AtomicWriter | DocsFileSystem | DocsPath>;

runDocsCliFUNCTION

Signature

export declare function runDocsCli(
    args: readonly string[]
): Effect<void, unknown, never>;

runMcpSourceFUNCTION

Signature

export declare function runMcpSource(
    source: string
): Effect<void, unknown>;

verifyNativeAppFUNCTION

Signature

export declare function verifyNativeApp(
    target: string
): Effect<void, unknown>;

verifyWebsiteFUNCTION

Signature

export declare function verifyWebsite(
    target: string
): Effect<void, unknown>;

verifyWebsiteDeploymentFUNCTION

Signature

export declare function verifyWebsiteDeployment(
    manifest: WebsiteReleaseManifest,
    options?: DeploymentVerificationOptions
): Effect<void, DeploymentVerificationError, NetworkRetry>;

writeGeneratedWebsiteFUNCTION

Signature

export declare function writeGeneratedWebsite(
    website: GeneratedWebsite
): Effect<void, unknown>;

writeNativeAuthoringFileFUNCTION

Signature

export declare function writeNativeAuthoringFile(
    options: NativeAuthoringOptions
): Effect<void, unknown>;

writeNativeStorybookAppFUNCTION

Signature

export declare function writeNativeStorybookApp(
    app: NativeGeneratedApp
): Effect<void, unknown>;

writeReleaseManifestFUNCTION

Signature

export declare function writeReleaseManifest(
    target: string,
    manifest: WebsiteReleaseManifest
): Effect<void, unknown>;

Classes

Signature

export declare class DeploymentVerificationError extends YieldableError<this> & { _tag: "DeploymentVerificationError" } & Readonly<{ cause?: unknown; status?: number; url: string }> {
    constructor(
    args: {
        cause?: unknown;
        status?: number;
        url: string
    }
): DeploymentVerificationError;
    readonly _tag: "DeploymentVerificationError";
    readonly ~effect/Effect: Variance<never, DeploymentVerificationError, never>;
    readonly ~effect/ErrorReporter/attributes?: ReadonlyRecord<string, unknown>;
    readonly ~effect/ErrorReporter/ignore?: boolean;
    readonly ~effect/ErrorReporter/severity?: Severity;
    readonly ~effect/Runtime/errorExitCode?: number;
    readonly ~effect/Runtime/errorReported?: boolean;
    cause?: unknown;
    message: string;
    name: string;
    stack?: string;
    readonly status?: number;
    readonly url: string;
    [iterator](): EffectIterator<Effect<never, DeploymentVerificationError, never>>;
    [NodeInspectSymbol](): unknown;
    pipe<A>(
    this: A
): A;
    toJSON(): unknown;
    toString(): string;
}

ProductSkillErrorCLASS

Signature

export declare class ProductSkillError extends Error {
    constructor(
    path: string,
    message: string
): ProductSkillError;
    readonly _tag: "ProductSkillError";
    readonly ~effect/ErrorReporter/attributes?: ReadonlyRecord<string, unknown>;
    readonly ~effect/ErrorReporter/ignore?: boolean;
    readonly ~effect/ErrorReporter/severity?: Severity;
    readonly ~effect/Runtime/errorExitCode?: number;
    readonly ~effect/Runtime/errorReported?: boolean;
    cause?: unknown;
    message: string;
    name: string;
    readonly path: string;
    stack?: string;
    static stackTraceLimit: number;
    captureStackTrace(
    targetObject: object,
    constructorOpt?: Function
): void;
    prepareStackTrace(
    err: Error,
    stackTraces: CallSite[]
): any;
}

ReleaseManifestErrorCLASS

Signature

export declare class ReleaseManifestError extends YieldableError<this> & { _tag: "ReleaseManifestError" } & Readonly<{ cause: unknown; path: string }> {
    constructor(
    args: {
        cause: unknown;
        path: string
    }
): ReleaseManifestError;
    readonly _tag: "ReleaseManifestError";
    readonly ~effect/Effect: Variance<never, ReleaseManifestError, never>;
    readonly ~effect/ErrorReporter/attributes?: ReadonlyRecord<string, unknown>;
    readonly ~effect/ErrorReporter/ignore?: boolean;
    readonly ~effect/ErrorReporter/severity?: Severity;
    readonly ~effect/Runtime/errorExitCode?: number;
    readonly ~effect/Runtime/errorReported?: boolean;
    cause: unknown;
    message: string;
    name: string;
    readonly path: string;
    stack?: string;
    [iterator](): EffectIterator<Effect<never, ReleaseManifestError, never>>;
    [NodeInspectSymbol](): unknown;
    pipe<A>(
    this: A
): A;
    toJSON(): unknown;
    toString(): string;
}

Interfaces

DeploymentTargetINTERFACE

Signature

export declare interface DeploymentTarget {
    readonly deploymentId: string;
    readonly project?: string;
    readonly revision?: string;
    readonly url: string;
}

GeneratedWebsiteINTERFACE

Signature

export declare interface GeneratedWebsite {
    readonly config: DocsConfig;
    readonly files: readonly GeneratedWebsiteFile[];
    readonly generatedAt: string;
    readonly packages: readonly GeneratedWebsitePackage[];
    readonly revision: string;
    readonly target: string;
}

GeneratedWebsiteFileINTERFACE

Signature

export declare interface GeneratedWebsiteFile {
    readonly content: string;
    readonly path: string;
}

GeneratedWebsitePackageINTERFACE

Signature

export declare interface GeneratedWebsitePackage {
    readonly directory: string;
    readonly kind: WebsitePackageKind;
    readonly name: string;
    readonly routePrefix: string;
}

LandingVercelConfigINTERFACE

Signature

export declare interface LandingVercelConfig {
    readonly buildCommand?: "npm run build";
    readonly headers: readonly VercelHeader[];
    readonly installCommand?: "npm install";
    readonly outputDirectory?: "Distribution";
    readonly redirects: readonly VercelRedirect[];
    readonly rewrites: readonly VercelRewrite[];
    readonly version: 2;
}

NativeAppGenerationOptionsINTERFACE

Signature

export declare interface NativeAppGenerationOptions {
    readonly kind?: NativeAppKind;
    readonly name?: string;
    readonly packageName?: string;
    readonly target: string;
}

NativeAuthoringOptionsINTERFACE

Signature

export declare interface NativeAuthoringOptions {
    readonly kind: NativeAuthoringKind;
    readonly name: string;
    readonly target: string;
}

NativeGeneratedAppINTERFACE

Signature

export declare interface NativeGeneratedApp {
    readonly files: readonly NativeGeneratedFile[];
    readonly kind: NativeAppKind;
    readonly name: string;
    readonly packageName: string;
    readonly target: string;
}

NativeGeneratedFileINTERFACE

Signature

export declare interface NativeGeneratedFile {
    readonly content: string;
    readonly path: string;
}

ProductSkillOptionsINTERFACE

Signature

export declare interface ProductSkillOptions {
    readonly config: DocsConfig;
    readonly corpus: { checksum: string; documents: readonly { content: string; context?: string; description?: string; id: string; kind: "article" | "api-module" | "json-schema" | "component"; metadata?: { [key: string]: unknown }; source?: { endLine?: number; file: string; line?: number; repositoryUrl: string; revision: string }; title: string; url: string; version?: string }[]; generatedAt: string; sourceRevision?: string; version: 1 };
    readonly manifest: { checksum: string; documents: readonly { checksum: string; id: string; kind: "article" | "api-module" | "json-schema" | "component"; markdownUrl: string; title: string; url: string; version?: string }[]; generatedAt: string; mcpEndpoint?: string; skills?: readonly { archive: string; checksum: string; directory: string; name: string }[]; version: 1; versions: readonly string[] };
    readonly outputDirectory: string;
    readonly packageId?: string;
    readonly siteUrl?: string;
}

ProductSkillResultINTERFACE

Signature

export declare interface ProductSkillResult {
    readonly artifact: { archive: string; checksum: string; directory: string; name: string };
    readonly documents: readonly { content: string; context?: string; description?: string; id: string; kind: "article" | "api-module" | "json-schema" | "component"; metadata?: { [key: string]: unknown }; source?: { endLine?: number; file: string; line?: number; repositoryUrl: string; revision: string }; title: string; url: string; version?: string }[];
}

VercelHeaderINTERFACE

Signature

export declare interface VercelHeader {
    readonly headers: readonly { key: string; value: string }[];
    readonly source: string;
}

VercelRedirectINTERFACE

Signature

export declare interface VercelRedirect {
    readonly destination: string;
    readonly source: string;
    readonly statusCode: 301 | 302;
}

VercelRewriteINTERFACE

Signature

export declare interface VercelRewrite {
    readonly destination: string;
    readonly source: string;
}

WebsiteDeploymentOptionsINTERFACE

Signature

export declare interface WebsiteDeploymentOptions {
    readonly apiSnapshot?: string;
    readonly generatedAt?: string;
    readonly production?: boolean;
    readonly releaseId?: string;
    readonly revision?: string;
    readonly snapshot?: boolean;
}

WebsiteDeploymentsINTERFACE

Signature

export declare interface WebsiteDeployments {
    readonly documentation: DeploymentTarget;
    readonly landing: DeploymentTarget;
    readonly mcp?: DeploymentTarget;
    readonly storybook?: DeploymentTarget;
}

WebsiteGenerationOptionsINTERFACE

Signature

export declare interface WebsiteGenerationOptions {
    readonly config?: { agent?: { description?: string; enabled?: boolean; essentials?: readonly string[]; mcp?: { enabled?: boolean }; skill?: { enabled?: boolean; name?: string } }; api?: { doxygen?: { projects?: readonly { id: string; name: string; version: string; xmlDirectory: string }[] }; enabled?: boolean; entryPoints?: readonly string[]; jsonSchemas?: readonly { path: string; route: string }[]; outputDirectory?: string; packages?: readonly string[]; sourceRepository?: { branch?: string; directory?: string; url: string }; typedoc?: { [key: string]: unknown }; unreal?: { plugins?: readonly { descriptor: string; id: string; name: string; version: string; xmlDirectory: string }[]; projects?: readonly { descriptor: string; id: string; name: string; version: string; xmlDirectory: string }[] } }; banner?: { backgroundColor?: string; logoHeight?: number; logoWidth?: number }; footer?: { columns?: readonly { links: readonly { href: string; icon?: string; label: string }[]; title: string }[]; links?: readonly { href: string; icon?: string; label: string }[]; message?: string }; landing?: { description?: string; primaryAction?: { href: string; label: string }; sections?: readonly { body?: string; href?: string; id: string; title: string }[]; title?: string }; manifests?: readonly { checksum?: string; generatedAt?: string; kind: "storybook" | "project" | "site" | "api-reference"; path: string; revision?: string }[]; metadata?: { description?: string; logo?: string; name?: string; repository?: { branch?: string; directory?: string; url: string }; title?: string; url?: string }; navigation?: { groups?: readonly { id: string; items: readonly NavigationItemInput[]; label: string }[] }; packages?: readonly { description?: string; directory?: string; id: string; name: string; source?: { branch?: string; directory?: string; url: string }; version?: string }[]; redirects?: readonly { from: string; status?: 301 | 302; to: string }[]; routing?: { documentationPrefix?: string; storybookPrefix?: string }; storybook?: { command?: string; directory?: string; enabled?: boolean; stories?: readonly string[]; url?: string }; tokens?: { dark?: { accent?: string; background?: string; border?: string; cardBackground?: string; codeBackground?: string; foreground?: string; muted?: string; proseForeground?: string; subtleForeground?: string }; light?: { accent?: string; background?: string; border?: string; cardBackground?: string; codeBackground?: string; foreground?: string; muted?: string; proseForeground?: string; subtleForeground?: string } }; vercel?: { domains?: readonly string[]; enabled?: boolean; outputDirectory?: string; productionBranch?: string; project?: string; projects?: { documentation?: { directory?: string; id?: string; origin?: string; productionBranch?: string; project?: string; routePrefix?: string; team?: string }; landing?: { directory?: string; id?: string; origin?: string; productionBranch?: string; project?: string; routePrefix?: string; team?: string }; mcp?: { directory?: string; id?: string; origin?: string; productionBranch?: string; project?: string; routePrefix?: string; team?: string }; storybook?: { directory?: string; id?: string; origin?: string; productionBranch?: string; project?: string; routePrefix?: string; team?: string } }; team?: string }; versions?: readonly { current?: boolean; directory?: string; href?: string; id: string; label?: string; order?: number; version?: string }[] };
    readonly generatedAt?: string;
    readonly revision?: string;
    readonly target: string;
}

WebsiteReleaseManifestINTERFACE

Signature

export declare interface WebsiteReleaseManifest {
    readonly apiSnapshot?: string;
    readonly deployments: WebsiteDeployments;
    readonly generatedAt: string;
    readonly landingConfig: LandingVercelConfig;
    readonly mcpEndpoint?: string;
    readonly mode: "preview" | "production";
    readonly previousReleaseId?: string;
    readonly publicUrl: string;
    readonly releaseId: string;
    readonly revision: string;
    readonly routes: { documentationPrefix: string; storybookPrefix: string };
    readonly version: 2;
}

Types

NativeAppKindTYPE

Signature

export declare type NativeAppKind = "development" | "demonstration";

NativeAuthoringKindTYPE

Signature

export declare type NativeAuthoringKind = "story" | "example" | "article";

NativePlatformTYPE

Signature

export declare type NativePlatform = "android" | "ios" | "web" | "all";

WebsitePackageKindTYPE

Signature

export declare type WebsitePackageKind = "landing" | "documentation" | "storybook" | "mcp";

Constants

docsCommandVARIABLE

Signature

export declare const docsCommand: Command<"sorrell-docs", {}, {}, unknown, SkillInstaller>;