@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/{chunk-2GUUVNTP.js → chunk-II3RGD6Q.js} +12 -2
- package/dist/chunk-II3RGD6Q.js.map +1 -0
- package/dist/generator.js +1 -1
- package/dist/index.cjs +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -3
- package/dist/index.d.ts +9 -3
- package/dist/index.js +1 -1
- package/dist/ui/api-try-it.cjs +4 -1
- package/dist/ui/api-try-it.cjs.map +1 -1
- package/dist/ui/api-try-it.d.cts +4 -2
- package/dist/ui/api-try-it.d.ts +4 -2
- package/dist/ui/api-try-it.js +4 -1
- package/dist/ui/api-try-it.js.map +1 -1
- package/package.json +1 -1
- package/styles/home.css +11 -1
- package/dist/chunk-2GUUVNTP.js.map +0 -1
package/dist/generator.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parseNavigation, planDocsTree, mergeOpenApiDocuments, hasOpenApi } from './chunk-
|
|
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
|
}
|