@lvce-editor/output-view 2.24.5 → 2.24.6
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/outputViewWorkerMain.js +14 -8
- package/package.json +1 -1
|
@@ -1555,7 +1555,13 @@ const getLinkPart = match => {
|
|
|
1555
1555
|
value: match
|
|
1556
1556
|
};
|
|
1557
1557
|
};
|
|
1558
|
-
const parseLine = line => {
|
|
1558
|
+
const parseLine = (line, parseLinks = true) => {
|
|
1559
|
+
if (!parseLinks) {
|
|
1560
|
+
return [{
|
|
1561
|
+
type: Text,
|
|
1562
|
+
value: line
|
|
1563
|
+
}];
|
|
1564
|
+
}
|
|
1559
1565
|
const structuredLine = parseStructuredLogLine(line);
|
|
1560
1566
|
if (structuredLine) {
|
|
1561
1567
|
return structuredLine;
|
|
@@ -1598,10 +1604,10 @@ const readOutput = async uri => {
|
|
|
1598
1604
|
}
|
|
1599
1605
|
return readFile(uri);
|
|
1600
1606
|
};
|
|
1601
|
-
const loadLines = async uri => {
|
|
1607
|
+
const loadLines = async (uri, parseLinks = true) => {
|
|
1602
1608
|
try {
|
|
1603
1609
|
const content = await readOutput(uri);
|
|
1604
|
-
const lines = aggregateLines(content.split('\n').map(parseLine));
|
|
1610
|
+
const lines = aggregateLines(content.split('\n').map(line => parseLine(line, parseLinks)));
|
|
1605
1611
|
return {
|
|
1606
1612
|
code: 0,
|
|
1607
1613
|
error: '',
|
|
@@ -1649,7 +1655,7 @@ const clear = async state => {
|
|
|
1649
1655
|
code,
|
|
1650
1656
|
error,
|
|
1651
1657
|
lines
|
|
1652
|
-
} = await loadLines(uri);
|
|
1658
|
+
} = await loadLines(uri, option.parseLinks);
|
|
1653
1659
|
const filteredItems = filterItems(lines, filterValue);
|
|
1654
1660
|
return {
|
|
1655
1661
|
...state,
|
|
@@ -2353,7 +2359,7 @@ const selectChannel = async (state, id) => {
|
|
|
2353
2359
|
code,
|
|
2354
2360
|
error,
|
|
2355
2361
|
lines
|
|
2356
|
-
} = await loadLines(matchingOption.uri);
|
|
2362
|
+
} = await loadLines(matchingOption.uri, matchingOption.parseLinks);
|
|
2357
2363
|
|
|
2358
2364
|
// TODO memory leak and race condition, need to dispose file watcher of previous uri
|
|
2359
2365
|
const newWatchId = isExtensionOutputUri(matchingOption.uri) ? 0 : createWatchId();
|
|
@@ -2674,7 +2680,7 @@ const loadContent = async (state, savedState) => {
|
|
|
2674
2680
|
code,
|
|
2675
2681
|
error,
|
|
2676
2682
|
lines
|
|
2677
|
-
} = await loadLines(uri);
|
|
2683
|
+
} = await loadLines(uri, option.parseLinks);
|
|
2678
2684
|
const filteredItems = filterItems(lines, filterValue);
|
|
2679
2685
|
const newWatchId = isExtensionOutputUri(uri) ? 0 : createWatchId();
|
|
2680
2686
|
await setupChangeListener(watchId, newWatchId, uri);
|
|
@@ -2721,7 +2727,7 @@ const refresh = async state => {
|
|
|
2721
2727
|
code,
|
|
2722
2728
|
error,
|
|
2723
2729
|
lines
|
|
2724
|
-
} = await loadLines(matchingOption.uri);
|
|
2730
|
+
} = await loadLines(matchingOption.uri, matchingOption.parseLinks);
|
|
2725
2731
|
const filteredItems = filterItems(lines, filterValue);
|
|
2726
2732
|
return {
|
|
2727
2733
|
...state,
|
|
@@ -2764,7 +2770,7 @@ const refreshOptions = async state => {
|
|
|
2764
2770
|
code,
|
|
2765
2771
|
error,
|
|
2766
2772
|
lines
|
|
2767
|
-
} = await loadLines(option.uri);
|
|
2773
|
+
} = await loadLines(option.uri, option.parseLinks);
|
|
2768
2774
|
const filteredItems = filterItems(lines, filterValue);
|
|
2769
2775
|
const newWatchId = isExtensionOutputUri(option.uri) ? 0 : createWatchId();
|
|
2770
2776
|
await setupChangeListener(watchId, newWatchId, option.uri);
|