@clarify-labs/cli 0.10.2 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/output/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_engine = require("./engine-qafLfnXQ.cjs");
2
+ const require_engine = require("./engine-BDdPszs2.cjs");
3
3
  exports.ClarifyEngine = require_engine.ClarifyEngine;
4
4
  exports.createClarifyEngine = require_engine.createClarifyEngine;
5
5
  exports.createViteAdapter = require_engine.createViteAdapter;
package/output/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { c as defineConfig, n as createClarifyEngine, s as createViteAdapter, t as ClarifyEngine } from "./engine-CSSL_gGd.js";
1
+ import { c as defineConfig, n as createClarifyEngine, s as createViteAdapter, t as ClarifyEngine } from "./engine-CyFtr8Pz.js";
2
2
  export { ClarifyEngine, createClarifyEngine, createViteAdapter, defineConfig };
@@ -0,0 +1,12 @@
1
+ import { ContentDiagnostic } from '@clarify-labs/renderer';
2
+ type CreateContentDiagnosticOptions = {
3
+ kind: ContentDiagnostic['kind'];
4
+ title: string;
5
+ message: string;
6
+ error: unknown;
7
+ filePath?: string;
8
+ projectRoot?: string;
9
+ includeStack?: boolean;
10
+ };
11
+ export declare function createContentDiagnostic(options: CreateContentDiagnosticOptions): ContentDiagnostic;
12
+ export {};
@@ -10,6 +10,14 @@ type HastNode = {
10
10
  export declare function rehypeParseCodeBlocks(): (tree: HastNode) => void;
11
11
  export declare const remarkPlugins: unknown[];
12
12
  export declare const rehypePlugins: NonNullable<CompileOptions['rehypePlugins']>;
13
+ type ContentCompileDiagnosticOptions = {
14
+ format: 'markdown' | 'mdx';
15
+ phase: 'syntax' | 'compilation';
16
+ error: unknown;
17
+ filePath?: string;
18
+ projectRoot?: string;
19
+ };
20
+ export declare function createContentCompileDiagnostic(options: ContentCompileDiagnosticOptions): ContentDiagnostic;
13
21
  /**
14
22
  * Validate MDX content for diagnostics WITHOUT running the build-time rehype
15
23
  * pipeline (Shiki highlighting, slug injection, code-block parsing).
@@ -13,4 +13,4 @@ export declare function normalizeOpenAPISpecSectionIds(spec: OpenAPISpec): OpenA
13
13
  export declare function filterSpecByTags(spec: OpenAPISpec, tags: string[]): OpenAPISpec;
14
14
  /** Extract endpoint operations from an OpenAPI spec as page sections. */
15
15
  export declare function extractOpenAPISections(spec: OpenAPISpec, filterTags?: string[]): ContentSection[];
16
- export declare function readOpenAPISpec(filePath: string, contentProcessor?: ContentProcessor): Promise<OpenAPIParseResult>;
16
+ export declare function readOpenAPISpec(filePath: string, contentProcessor?: ContentProcessor, projectRoot?: string): Promise<OpenAPIParseResult>;
@@ -1,4 +1,4 @@
1
- import { ContentDiagnostic, OpenAPISpec } from '../../types.js';
1
+ import { OpenAPISpec } from '../../types.js';
2
2
  export declare const openApiRegistryModuleId = "virtual:clarify/openapi";
3
3
  export declare const openApiServerRegistryModuleId = "virtual:clarify/openapi/server";
4
4
  export declare const OPENAPI_SPEC_PREFIX = "virtual:clarify/openapi-spec/";
@@ -11,5 +11,4 @@ type OpenAPIPageModuleOptions = {
11
11
  specModuleId: string;
12
12
  };
13
13
  export declare function generateOpenAPIPageModule(opts: OpenAPIPageModuleOptions): string;
14
- export declare function generateOpenAPIErrorModule(diagnostic: ContentDiagnostic): string;
15
14
  export {};
package/output/types.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { OpenAPIV3, OpenAPIV3_1 } from 'openapi-types';
2
2
  import { HtmlTagDescriptor, ViteDevServer } from 'vite';
3
- import { UISlotRegistration } from '@clarify-labs/renderer';
3
+ import { ContentDiagnostic, UISlotRegistration } from '@clarify-labs/renderer';
4
4
  import { ResolvedBuildOptions } from './core/config/options.js';
5
5
  export type { ClarifyBuildOptions, ResolvedBuildOptions, } from './core/config/options.js';
6
+ export type { ContentDiagnostic } from '@clarify-labs/renderer';
6
7
  export type OpenAPISpec = OpenAPIV3.Document | OpenAPIV3_1.Document;
7
8
  export type ClarifyLogoConfig = string | {
8
9
  light?: string;
@@ -115,7 +116,7 @@ export type ResolvedClarifyThemeConfig = {
115
116
  layout: ResolvedClarifyThemeLayoutConfig;
116
117
  editor: boolean;
117
118
  };
118
- export type ClarifyPagesItem = string | {
119
+ export type ClarifyPagesItem = string | ClarifyPagesGroup | {
119
120
  page: string;
120
121
  /** Explicit route path. Defaults to the path generated from page. */
121
122
  path?: string;
@@ -144,6 +145,7 @@ export type ClarifyPagesGroup = {
144
145
  group: ClarifyLocalizedText;
145
146
  /** Icon name from lucide-react, e.g. "BookOpen". */
146
147
  icon?: string;
148
+ /** Pages or nested groups within this section. */
147
149
  pages: ClarifyPagesItem[];
148
150
  };
149
151
  /** Use the string "FileTree" to auto-generate pages from the file system. */
@@ -236,13 +238,6 @@ export type ContentSection = {
236
238
  badge?: string;
237
239
  tags?: string[];
238
240
  };
239
- export type ContentDiagnostic = {
240
- kind: string;
241
- title: string;
242
- message: string;
243
- details?: string;
244
- filePath?: string;
245
- };
246
241
  export type ContentRouteMeta = {
247
242
  title: string;
248
243
  description?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clarify-labs/cli",
3
- "version": "0.10.2",
3
+ "version": "0.10.3",
4
4
  "license": "AGPL-3.0-only",
5
5
  "type": "module",
6
6
  "repository": {
@@ -39,8 +39,8 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@apidevtools/swagger-parser": "^12.1.0",
42
- "@clarify-labs/renderer": "0.10.2",
43
- "@clarify-labs/templates": "0.10.2",
42
+ "@clarify-labs/renderer": "0.10.3",
43
+ "@clarify-labs/templates": "0.10.3",
44
44
  "@mdx-js/mdx": "^3.1.1",
45
45
  "@mdx-js/rollup": "^3.1.1",
46
46
  "@shikijs/rehype": "^4.3.0",