@blaaiz/docs-core 0.6.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/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-II3RGD6Q.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.");
@@ -2579,6 +2588,7 @@ function createGoogleAuth(options) {
2579
2588
  authorize.searchParams.set("response_type", "code");
2580
2589
  authorize.searchParams.set("scope", "openid email");
2581
2590
  authorize.searchParams.set("state", state);
2591
+ authorize.searchParams.set("prompt", "select_account");
2582
2592
  if (options.allowedDomains.length === 1 && options.allowedDomains[0] !== void 0) {
2583
2593
  authorize.searchParams.set("hd", options.allowedDomains[0]);
2584
2594
  }