@qualcomm-ui/mdx-vite 2.11.0 → 2.11.2
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/cli.js +7 -4
- package/dist/cli.js.map +2 -2
- package/dist/docs-plugin/types.d.ts +10 -4
- package/dist/docs-plugin/types.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/open-web-ui-knowledge/common.d.ts.map +1 -1
- package/dist/open-web-ui-knowledge/download-knowledge.d.ts.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -5312,6 +5312,7 @@ function addGeneratePageMapCommand() {
|
|
|
5312
5312
|
}
|
|
5313
5313
|
|
|
5314
5314
|
// src/open-web-ui-knowledge/download-knowledge.ts
|
|
5315
|
+
import dotenv from "dotenv";
|
|
5315
5316
|
import { mkdir, writeFile as writeFile2 } from "node:fs/promises";
|
|
5316
5317
|
import { resolve as resolve2 } from "node:path";
|
|
5317
5318
|
|
|
@@ -5628,9 +5629,9 @@ function loadEnv() {
|
|
|
5628
5629
|
}
|
|
5629
5630
|
}
|
|
5630
5631
|
function getConfigFromEnv() {
|
|
5631
|
-
const openWebUiUrl = process.env.WEB_UI_URL;
|
|
5632
|
-
const openWebUiKey = process.env.WEB_UI_KEY;
|
|
5633
|
-
const knowledgeId = process.env.KNOWLEDGE_ID;
|
|
5632
|
+
const openWebUiUrl = process.env.WEB_UI_URL || process.env.OPEN_WEB_UI_URL;
|
|
5633
|
+
const openWebUiKey = process.env.WEB_UI_KEY || process.env.OPEN_WEB_UI_API_KEY;
|
|
5634
|
+
const knowledgeId = process.env.KNOWLEDGE_ID || process.env.OPEN_WEB_UI_KNOWLEDGE_ID;
|
|
5634
5635
|
if (!openWebUiUrl || !openWebUiKey || !knowledgeId) {
|
|
5635
5636
|
throw new Error("WEB_UI_URL, WEB_UI_KEY, and KNOWLEDGE_ID must be set");
|
|
5636
5637
|
}
|
|
@@ -5677,8 +5678,10 @@ function resolveOpenWebUiIntegration(name, integration, outputPath) {
|
|
|
5677
5678
|
|
|
5678
5679
|
// src/open-web-ui-knowledge/download-knowledge.ts
|
|
5679
5680
|
function addDownloadKnowledgeCommand() {
|
|
5680
|
-
program.command("download-knowledge").description("Download files from an Open Web UI knowledge base").requiredOption("-o, --output-dir <outputDir>", "Folder path").action(async (opts) => {
|
|
5681
|
+
program.command("download-knowledge").description("Download files from an Open Web UI knowledge base").requiredOption("-o, --output-dir <outputDir>", "Folder path").requiredOption("-e, --environment <environments>", "environment to load").action(async (opts) => {
|
|
5681
5682
|
loadEnv();
|
|
5683
|
+
const env = opts.environment;
|
|
5684
|
+
dotenv.config({ path: `.env.${env}` });
|
|
5682
5685
|
await mkdir(opts.outputDir, { recursive: true }).catch();
|
|
5683
5686
|
const config2 = getConfigFromEnv();
|
|
5684
5687
|
const apiConfig = { apiKey: config2.webUiKey, baseUrl: config2.webUiUrl };
|