@qualcomm-ui/mdx-vite 2.14.0 → 2.14.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/angular-demo-plugin/angular-demo-plugin.d.ts.map +1 -1
- package/dist/cli.js +5 -5
- package/dist/cli.js.map +2 -2
- package/dist/index.js +29 -24
- package/dist/index.js.map +3 -3
- package/dist/tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3488,8 +3488,8 @@ var require_extra_typings = __commonJS({
|
|
|
3488
3488
|
import chalk5 from "chalk";
|
|
3489
3489
|
import { watch } from "chokidar";
|
|
3490
3490
|
import { glob as glob2 } from "glob";
|
|
3491
|
-
import { existsSync } from "node:fs";
|
|
3492
|
-
import { readFile as readFile3
|
|
3491
|
+
import { existsSync, statSync } from "node:fs";
|
|
3492
|
+
import { readFile as readFile3 } from "node:fs/promises";
|
|
3493
3493
|
import { basename as basename2, dirname as dirname2, join as join4, relative as relative3, resolve as resolve3 } from "node:path";
|
|
3494
3494
|
import {
|
|
3495
3495
|
createHighlighter
|
|
@@ -5507,7 +5507,7 @@ var KnowledgeGenerator = class {
|
|
|
5507
5507
|
return docProps;
|
|
5508
5508
|
} catch (error) {
|
|
5509
5509
|
if (this.config.verbose) {
|
|
5510
|
-
console.log(
|
|
5510
|
+
console.log("Error loading doc props", error);
|
|
5511
5511
|
}
|
|
5512
5512
|
return null;
|
|
5513
5513
|
}
|
|
@@ -5604,7 +5604,7 @@ var KnowledgeGenerator = class {
|
|
|
5604
5604
|
}
|
|
5605
5605
|
} catch (error) {
|
|
5606
5606
|
if (this.config.verbose) {
|
|
5607
|
-
console.log(`
|
|
5607
|
+
console.log(`Error processing ${normalizedPath}`, error);
|
|
5608
5608
|
}
|
|
5609
5609
|
}
|
|
5610
5610
|
return modules;
|
|
@@ -5961,7 +5961,7 @@ ${propsToDefinitionList(outputs)}`);
|
|
|
5961
5961
|
});
|
|
5962
5962
|
} catch (error) {
|
|
5963
5963
|
if (this.config.verbose) {
|
|
5964
|
-
console.log(`
|
|
5964
|
+
console.log(`Error reading demo ${demoName}`, error);
|
|
5965
5965
|
}
|
|
5966
5966
|
if (parent && index !== void 0) {
|
|
5967
5967
|
parent.children.splice(index, 1);
|
|
@@ -6051,7 +6051,7 @@ ${propsToDefinitionList(outputs)}`);
|
|
|
6051
6051
|
throw error;
|
|
6052
6052
|
}
|
|
6053
6053
|
}
|
|
6054
|
-
|
|
6054
|
+
generateLlmsTxt(pages) {
|
|
6055
6055
|
const lines = [
|
|
6056
6056
|
getIntroLines(this.config.name, this.config.description)
|
|
6057
6057
|
];
|
|
@@ -6074,7 +6074,7 @@ ${propsToDefinitionList(outputs)}`);
|
|
|
6074
6074
|
return lines.join("\n");
|
|
6075
6075
|
}
|
|
6076
6076
|
async generateAggregatedOutput(processedPages, pages) {
|
|
6077
|
-
const llmsTxtContent =
|
|
6077
|
+
const llmsTxtContent = this.generateLlmsTxt(processedPages);
|
|
6078
6078
|
await mkdir(dirname(this.config.outputPath), { recursive: true }).catch(
|
|
6079
6079
|
() => {
|
|
6080
6080
|
}
|
|
@@ -6565,7 +6565,7 @@ function quiDocsPlugin(opts) {
|
|
|
6565
6565
|
});
|
|
6566
6566
|
state.servers.push(server);
|
|
6567
6567
|
},
|
|
6568
|
-
handleHotUpdate:
|
|
6568
|
+
handleHotUpdate: ({ file: updateFile, modules, server }) => {
|
|
6569
6569
|
if (updateFile.endsWith(".css")) {
|
|
6570
6570
|
return modules;
|
|
6571
6571
|
}
|
|
@@ -7781,7 +7781,7 @@ function angularDemoPlugin({
|
|
|
7781
7781
|
if (process.env.NODE_ENV === "development") {
|
|
7782
7782
|
if (!hasWatcherInitialized) {
|
|
7783
7783
|
hasWatcherInitialized = true;
|
|
7784
|
-
|
|
7784
|
+
setupAngularWatcher();
|
|
7785
7785
|
} else {
|
|
7786
7786
|
logDev(
|
|
7787
7787
|
`${chalk5.blue.bold(LOG_PREFIX)} Watcher already initialized by another instance`
|
|
@@ -7882,7 +7882,7 @@ function angularDemoPlugin({
|
|
|
7882
7882
|
}
|
|
7883
7883
|
return [];
|
|
7884
7884
|
},
|
|
7885
|
-
|
|
7885
|
+
load(id) {
|
|
7886
7886
|
if (id === VIRTUAL_MODULE_ID2) {
|
|
7887
7887
|
return generateRegistryModule();
|
|
7888
7888
|
}
|
|
@@ -8462,7 +8462,7 @@ export function getAngularDemoInfo(demoId) {
|
|
|
8462
8462
|
}
|
|
8463
8463
|
return pathAliases;
|
|
8464
8464
|
}
|
|
8465
|
-
|
|
8465
|
+
function setupAngularWatcher() {
|
|
8466
8466
|
watcher = watch(routesDir, {
|
|
8467
8467
|
ignoreInitial: true,
|
|
8468
8468
|
persistent: true
|
|
@@ -8472,18 +8472,23 @@ export function getAngularDemoInfo(demoId) {
|
|
|
8472
8472
|
`${chalk5.blue.bold(LOG_PREFIX)} Registered ${chalk5.green(demoRegistry.size)} demo files. Watching for file changes...`
|
|
8473
8473
|
);
|
|
8474
8474
|
});
|
|
8475
|
-
watcher.on("add",
|
|
8476
|
-
|
|
8477
|
-
|
|
8478
|
-
|
|
8479
|
-
|
|
8480
|
-
|
|
8481
|
-
|
|
8482
|
-
|
|
8483
|
-
|
|
8484
|
-
|
|
8485
|
-
|
|
8486
|
-
|
|
8475
|
+
watcher.on("add", (filePath) => {
|
|
8476
|
+
try {
|
|
8477
|
+
const fileStats = statSync(filePath);
|
|
8478
|
+
if (!fileStats || fileStats.size === 0) {
|
|
8479
|
+
console.debug("Failed to read file stats", filePath);
|
|
8480
|
+
return;
|
|
8481
|
+
}
|
|
8482
|
+
if (isAngularDemoFile(filePath)) {
|
|
8483
|
+
logDev(
|
|
8484
|
+
`${chalk5.blue.bold(LOG_PREFIX)} New Angular demo: ${chalk5.green(filePath)}`
|
|
8485
|
+
);
|
|
8486
|
+
void handleAngularDemoUpdate(filePath).then(() => {
|
|
8487
|
+
triggerRegistryUpdate();
|
|
8488
|
+
});
|
|
8489
|
+
}
|
|
8490
|
+
} catch {
|
|
8491
|
+
console.debug("Failed to update registry file stats");
|
|
8487
8492
|
}
|
|
8488
8493
|
});
|
|
8489
8494
|
watcher.on("unlink", (filePath) => {
|
|
@@ -9034,7 +9039,7 @@ function reactDemoPlugin({
|
|
|
9034
9039
|
}
|
|
9035
9040
|
return [];
|
|
9036
9041
|
},
|
|
9037
|
-
|
|
9042
|
+
load(id) {
|
|
9038
9043
|
if (id === VIRTUAL_MODULE_IDS.AUTO) {
|
|
9039
9044
|
return generateAutoScopeModule();
|
|
9040
9045
|
}
|