@lvce-editor/output-view 2.24.5 → 2.24.7
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 +17 -9
- 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,
|
|
@@ -2273,6 +2279,7 @@ const handleScrollBarClick = (state, eventY) => {
|
|
|
2273
2279
|
scrollBarActive: true
|
|
2274
2280
|
};
|
|
2275
2281
|
};
|
|
2282
|
+
const handleScrollBarPointerDown = (state, eventY) => handleScrollBarClick(state, eventY);
|
|
2276
2283
|
|
|
2277
2284
|
const handleScrollBarMove = (state, eventY) => {
|
|
2278
2285
|
const {
|
|
@@ -2353,7 +2360,7 @@ const selectChannel = async (state, id) => {
|
|
|
2353
2360
|
code,
|
|
2354
2361
|
error,
|
|
2355
2362
|
lines
|
|
2356
|
-
} = await loadLines(matchingOption.uri);
|
|
2363
|
+
} = await loadLines(matchingOption.uri, matchingOption.parseLinks);
|
|
2357
2364
|
|
|
2358
2365
|
// TODO memory leak and race condition, need to dispose file watcher of previous uri
|
|
2359
2366
|
const newWatchId = isExtensionOutputUri(matchingOption.uri) ? 0 : createWatchId();
|
|
@@ -2674,7 +2681,7 @@ const loadContent = async (state, savedState) => {
|
|
|
2674
2681
|
code,
|
|
2675
2682
|
error,
|
|
2676
2683
|
lines
|
|
2677
|
-
} = await loadLines(uri);
|
|
2684
|
+
} = await loadLines(uri, option.parseLinks);
|
|
2678
2685
|
const filteredItems = filterItems(lines, filterValue);
|
|
2679
2686
|
const newWatchId = isExtensionOutputUri(uri) ? 0 : createWatchId();
|
|
2680
2687
|
await setupChangeListener(watchId, newWatchId, uri);
|
|
@@ -2721,7 +2728,7 @@ const refresh = async state => {
|
|
|
2721
2728
|
code,
|
|
2722
2729
|
error,
|
|
2723
2730
|
lines
|
|
2724
|
-
} = await loadLines(matchingOption.uri);
|
|
2731
|
+
} = await loadLines(matchingOption.uri, matchingOption.parseLinks);
|
|
2725
2732
|
const filteredItems = filterItems(lines, filterValue);
|
|
2726
2733
|
return {
|
|
2727
2734
|
...state,
|
|
@@ -2764,7 +2771,7 @@ const refreshOptions = async state => {
|
|
|
2764
2771
|
code,
|
|
2765
2772
|
error,
|
|
2766
2773
|
lines
|
|
2767
|
-
} = await loadLines(option.uri);
|
|
2774
|
+
} = await loadLines(option.uri, option.parseLinks);
|
|
2768
2775
|
const filteredItems = filterItems(lines, filterValue);
|
|
2769
2776
|
const newWatchId = isExtensionOutputUri(option.uri) ? 0 : createWatchId();
|
|
2770
2777
|
await setupChangeListener(watchId, newWatchId, option.uri);
|
|
@@ -2975,7 +2982,7 @@ const renderEventListeners = () => {
|
|
|
2975
2982
|
params: ['handleKeyDown', 'event.key']
|
|
2976
2983
|
}, {
|
|
2977
2984
|
name: HandleScrollBarPointerDown,
|
|
2978
|
-
params: ['
|
|
2985
|
+
params: ['handleScrollBarPointerDown', 'event.clientY'],
|
|
2979
2986
|
preventDefault: true,
|
|
2980
2987
|
stopPropagation: true,
|
|
2981
2988
|
trackPointerEvents: [HandleScrollBarMove, HandleScrollBarPointerCaptureLost]
|
|
@@ -3145,6 +3152,7 @@ const commandMap = {
|
|
|
3145
3152
|
'Output.handleScrollBarCaptureLost': wrapCommand(handleScrollBarCaptureLost),
|
|
3146
3153
|
'Output.handleScrollBarClick': wrapCommand(handleScrollBarClick),
|
|
3147
3154
|
'Output.handleScrollBarMove': wrapCommand(handleScrollBarMove),
|
|
3155
|
+
'Output.handleScrollBarPointerDown': wrapCommand(handleScrollBarPointerDown),
|
|
3148
3156
|
'Output.handleSelect': wrapCommand(handleSelect),
|
|
3149
3157
|
'Output.handleSourceLinkClick': wrapCommand(handleSourceLinkClick),
|
|
3150
3158
|
'Output.handleWheel': wrapCommand(handleWheel),
|