@blaaiz/docs-core 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/generator.js CHANGED
@@ -1,4 +1,4 @@
1
- import { parseNavigation, planDocsTree, mergeOpenApiDocuments, hasOpenApi } from './chunk-2GUUVNTP.js';
1
+ import { parseNavigation, planDocsTree, mergeOpenApiDocuments, hasOpenApi } from './chunk-L4PFRXIK.js';
2
2
  import { readFile, rm, mkdir, writeFile } from 'fs/promises';
3
3
  import path from 'path';
4
4
 
package/dist/index.cjs CHANGED
@@ -970,6 +970,15 @@ function createProvider(resolved, apiKey, doFetch) {
970
970
  return resolved.provider === "anthropic" ? createAnthropicProvider(providerOptions) : createOpenAiProvider(providerOptions);
971
971
  }
972
972
  function createAskAiRoute(options) {
973
+ if (options.config === void 0) {
974
+ return {
975
+ POST: () => Promise.resolve(
976
+ jsonResponse(404, {
977
+ error: "Ask AI is not enabled: docs.config.ts declares no ai block."
978
+ })
979
+ )
980
+ };
981
+ }
973
982
  const resolved = resolveAiConfig(options.config);
974
983
  if (typeof options.siteName !== "string" || options.siteName.trim() === "") {
975
984
  throw new AiConfigError("siteName must be a non-empty string, e.g. theme.name.");