@lvce-editor/test-worker 17.0.1 → 17.1.0
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/api.d.ts +11 -0
- package/dist/testWorkerMain.js +73 -22
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -999,6 +999,16 @@ interface RunAndDebug {
|
|
|
999
999
|
readonly show: () => Promise<void>;
|
|
1000
1000
|
}
|
|
1001
1001
|
|
|
1002
|
+
interface RunningExtensions {
|
|
1003
|
+
readonly copyId: (index: number) => Promise<void>;
|
|
1004
|
+
readonly disable: (index: number) => Promise<void>;
|
|
1005
|
+
readonly disableWorkspace: (index: number) => Promise<void>;
|
|
1006
|
+
readonly handleContextMenu: (index: number, x?: number, y?: number) => Promise<void>;
|
|
1007
|
+
readonly reportIssue: (index: number) => Promise<void>;
|
|
1008
|
+
readonly show: () => Promise<void>;
|
|
1009
|
+
readonly startProfile: () => Promise<void>;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1002
1012
|
interface Search {
|
|
1003
1013
|
readonly clearSearchResults: () => Promise<void>;
|
|
1004
1014
|
readonly collapseAll: () => Promise<void>;
|
|
@@ -1159,6 +1169,7 @@ export interface TestApi {
|
|
|
1159
1169
|
readonly QuickPick: QuickPick
|
|
1160
1170
|
readonly References: References
|
|
1161
1171
|
readonly RunAndDebug: RunAndDebug
|
|
1172
|
+
readonly RunningExtensions: RunningExtensions
|
|
1162
1173
|
readonly Search: Search
|
|
1163
1174
|
readonly Settings: Settings
|
|
1164
1175
|
readonly SettingsView: SettingsView
|
package/dist/testWorkerMain.js
CHANGED
|
@@ -298,7 +298,14 @@ class IpcError extends VError {
|
|
|
298
298
|
const cause = new Error(message);
|
|
299
299
|
// @ts-ignore
|
|
300
300
|
cause.code = code;
|
|
301
|
-
|
|
301
|
+
if (stack) {
|
|
302
|
+
Object.defineProperty(cause, 'stack', {
|
|
303
|
+
configurable: true,
|
|
304
|
+
enumerable: false,
|
|
305
|
+
value: stack,
|
|
306
|
+
writable: true
|
|
307
|
+
});
|
|
308
|
+
}
|
|
302
309
|
super(cause, betterMessage);
|
|
303
310
|
} else {
|
|
304
311
|
super(betterMessage);
|
|
@@ -1863,7 +1870,7 @@ const {
|
|
|
1863
1870
|
expect
|
|
1864
1871
|
} = Expect$1;
|
|
1865
1872
|
|
|
1866
|
-
const show$
|
|
1873
|
+
const show$9 = async () => {
|
|
1867
1874
|
return invoke('About.showAbout');
|
|
1868
1875
|
};
|
|
1869
1876
|
const handleClickOk = async () => {
|
|
@@ -1888,7 +1895,7 @@ const About = {
|
|
|
1888
1895
|
handleClickClose: handleClickClose$1,
|
|
1889
1896
|
handleClickCopy,
|
|
1890
1897
|
handleClickOk,
|
|
1891
|
-
show: show$
|
|
1898
|
+
show: show$9
|
|
1892
1899
|
};
|
|
1893
1900
|
|
|
1894
1901
|
const focus$2 = async () => {
|
|
@@ -1924,7 +1931,7 @@ const handleClick$4 = async index => {
|
|
|
1924
1931
|
const handleSideBarHidden = async () => {
|
|
1925
1932
|
await invoke('ActivityBar.handleSideBarHidden');
|
|
1926
1933
|
};
|
|
1927
|
-
const handleContextMenu$
|
|
1934
|
+
const handleContextMenu$6 = async () => {
|
|
1928
1935
|
await invoke('ActivityBar.handleContextMenu');
|
|
1929
1936
|
};
|
|
1930
1937
|
const setUpdateState = async config => {
|
|
@@ -1948,7 +1955,7 @@ const ActivityBar = {
|
|
|
1948
1955
|
focusPrevious: focusPrevious$8,
|
|
1949
1956
|
handleClick: handleClick$4,
|
|
1950
1957
|
handleClickSettings: handleClickSettings$1,
|
|
1951
|
-
handleContextMenu: handleContextMenu$
|
|
1958
|
+
handleContextMenu: handleContextMenu$6,
|
|
1952
1959
|
handleSideBarHidden,
|
|
1953
1960
|
resize,
|
|
1954
1961
|
selectCurrent,
|
|
@@ -2024,7 +2031,7 @@ const enterNewLine = async () => {
|
|
|
2024
2031
|
const setScrollDownButtonEnabled = async enabled => {
|
|
2025
2032
|
await invoke('Chat.setScrollDownButtonEnabled', enabled);
|
|
2026
2033
|
};
|
|
2027
|
-
const show$
|
|
2034
|
+
const show$8 = async () => {
|
|
2028
2035
|
await invoke('Layout.showSecondarySideBar');
|
|
2029
2036
|
await invoke('Chat.reset');
|
|
2030
2037
|
};
|
|
@@ -2255,7 +2262,7 @@ const Chat = {
|
|
|
2255
2262
|
setStreamingEnabled,
|
|
2256
2263
|
setUseOwnBackend,
|
|
2257
2264
|
shouldHaveComposerSelection,
|
|
2258
|
-
show: show$
|
|
2265
|
+
show: show$8,
|
|
2259
2266
|
showComposerAttachmentPreviewOverlay,
|
|
2260
2267
|
useMockApi
|
|
2261
2268
|
};
|
|
@@ -3464,7 +3471,7 @@ const EditorCompletion = {
|
|
|
3464
3471
|
selectIndex: selectIndex$6
|
|
3465
3472
|
};
|
|
3466
3473
|
|
|
3467
|
-
const show$
|
|
3474
|
+
const show$7 = async () => {
|
|
3468
3475
|
await invoke('Editor.showHover2');
|
|
3469
3476
|
};
|
|
3470
3477
|
const close$2 = async () => {
|
|
@@ -3473,7 +3480,7 @@ const close$2 = async () => {
|
|
|
3473
3480
|
|
|
3474
3481
|
const EditorHover = {
|
|
3475
3482
|
close: close$2,
|
|
3476
|
-
show: show$
|
|
3483
|
+
show: show$7
|
|
3477
3484
|
};
|
|
3478
3485
|
|
|
3479
3486
|
const handleInput$6 = async value => {
|
|
@@ -3687,7 +3694,7 @@ const executeCompletionProvider = async (textDocument, ...args) => {
|
|
|
3687
3694
|
const enableWorkspace = async id => {
|
|
3688
3695
|
await invoke$2('Extensions.enableWorkspace', id);
|
|
3689
3696
|
};
|
|
3690
|
-
const disableWorkspace = async id => {
|
|
3697
|
+
const disableWorkspace$1 = async id => {
|
|
3691
3698
|
await invoke$2('Extensions.disableWorkspace', id);
|
|
3692
3699
|
};
|
|
3693
3700
|
const addNodeExtension = async relativePath => {
|
|
@@ -3699,7 +3706,7 @@ const addNodeExtension = async relativePath => {
|
|
|
3699
3706
|
const Extension = {
|
|
3700
3707
|
addNodeExtension,
|
|
3701
3708
|
addWebExtension,
|
|
3702
|
-
disableWorkspace,
|
|
3709
|
+
disableWorkspace: disableWorkspace$1,
|
|
3703
3710
|
enableWorkspace,
|
|
3704
3711
|
executeCompletionProvider,
|
|
3705
3712
|
executeFormattingProvider
|
|
@@ -3838,7 +3845,7 @@ const handleClick$2 = async index => {
|
|
|
3838
3845
|
const handleClickFilter = async () => {
|
|
3839
3846
|
await invoke('Extensions.handleClickFilter');
|
|
3840
3847
|
};
|
|
3841
|
-
const handleContextMenu$
|
|
3848
|
+
const handleContextMenu$5 = async (button, x, y) => {
|
|
3842
3849
|
await invoke('Extensions.handleContextMenu', button, x, y);
|
|
3843
3850
|
};
|
|
3844
3851
|
const copyExtensionInfo = async () => {
|
|
@@ -3860,7 +3867,7 @@ const ExtensionSearch = {
|
|
|
3860
3867
|
copyExtensionInfo,
|
|
3861
3868
|
handleClick: handleClick$2,
|
|
3862
3869
|
handleClickFilter,
|
|
3863
|
-
handleContextMenu: handleContextMenu$
|
|
3870
|
+
handleContextMenu: handleContextMenu$5,
|
|
3864
3871
|
handleInput: handleInput$5,
|
|
3865
3872
|
open: open$7,
|
|
3866
3873
|
setExtensionStatus
|
|
@@ -4037,9 +4044,20 @@ const shouldHaveFile = async (uri, expectedContent) => {
|
|
|
4037
4044
|
const remove = async uri => {
|
|
4038
4045
|
await invoke('FileSystem.remove', uri);
|
|
4039
4046
|
};
|
|
4047
|
+
const windowsPathRegex = /^[A-Za-z]:\//;
|
|
4048
|
+
const toFileUri = path => {
|
|
4049
|
+
if (path.startsWith('file://')) {
|
|
4050
|
+
return path;
|
|
4051
|
+
}
|
|
4052
|
+
const normalizedPath = path.replaceAll('\\', '/');
|
|
4053
|
+
if (windowsPathRegex.test(normalizedPath)) {
|
|
4054
|
+
return `file:///${normalizedPath}`;
|
|
4055
|
+
}
|
|
4056
|
+
return `file://${normalizedPath}`;
|
|
4057
|
+
};
|
|
4040
4058
|
const getTmpDirFileScheme = async () => {
|
|
4041
4059
|
const tmpFolder = await invoke('PlatformPaths.getTmpDir');
|
|
4042
|
-
const tmpUri = tmpFolder
|
|
4060
|
+
const tmpUri = toFileUri(tmpFolder);
|
|
4043
4061
|
const uri = `${tmpUri}/test-${Date.now()}`;
|
|
4044
4062
|
await mkdir(uri);
|
|
4045
4063
|
return uri;
|
|
@@ -4464,7 +4482,7 @@ const sortByPrecedence = () => {
|
|
|
4464
4482
|
const stopRecordingKeys = () => {
|
|
4465
4483
|
return invoke('KeyBindings.stopRecordingKeys');
|
|
4466
4484
|
};
|
|
4467
|
-
const handleContextMenu$
|
|
4485
|
+
const handleContextMenu$4 = (button, x, y) => {
|
|
4468
4486
|
return invoke('KeyBindings.handleContextMenu', button, x, y);
|
|
4469
4487
|
};
|
|
4470
4488
|
const copyCommandId = () => {
|
|
@@ -4501,7 +4519,7 @@ const KeyBindingsEditor = {
|
|
|
4501
4519
|
focusNext: focusNext$4,
|
|
4502
4520
|
focusPrevious: focusPrevious$4,
|
|
4503
4521
|
handleClick: handleClick$1,
|
|
4504
|
-
handleContextMenu: handleContextMenu$
|
|
4522
|
+
handleContextMenu: handleContextMenu$4,
|
|
4505
4523
|
handleDoubleClick,
|
|
4506
4524
|
handleInput: handleInput$4,
|
|
4507
4525
|
handleWheel: handleWheel$1,
|
|
@@ -4674,7 +4692,7 @@ const Panel = {
|
|
|
4674
4692
|
unmaximize
|
|
4675
4693
|
};
|
|
4676
4694
|
|
|
4677
|
-
const show$
|
|
4695
|
+
const show$6 = async () => {
|
|
4678
4696
|
await open$4('Output');
|
|
4679
4697
|
await invoke('Panel.selectIndex', 1);
|
|
4680
4698
|
};
|
|
@@ -4696,7 +4714,7 @@ const Output = {
|
|
|
4696
4714
|
handleFilterInput: handleFilterInput$1,
|
|
4697
4715
|
saveAs,
|
|
4698
4716
|
selectChannel,
|
|
4699
|
-
show: show$
|
|
4717
|
+
show: show$6
|
|
4700
4718
|
};
|
|
4701
4719
|
|
|
4702
4720
|
const getIsFirefox = () => {
|
|
@@ -4943,7 +4961,7 @@ const ProcessExplorer = {
|
|
|
4943
4961
|
table
|
|
4944
4962
|
};
|
|
4945
4963
|
|
|
4946
|
-
const show$
|
|
4964
|
+
const show$5 = async () => {
|
|
4947
4965
|
await invoke('Panel.selectIndex', 0);
|
|
4948
4966
|
};
|
|
4949
4967
|
const handleFilterInput = async text => {
|
|
@@ -4982,7 +5000,7 @@ const Problems = {
|
|
|
4982
5000
|
handleClickAt: handleClickAt$1,
|
|
4983
5001
|
handleFilterInput,
|
|
4984
5002
|
handleIconThemeChange,
|
|
4985
|
-
show: show$
|
|
5003
|
+
show: show$5,
|
|
4986
5004
|
viewAsList,
|
|
4987
5005
|
viewAsTable
|
|
4988
5006
|
};
|
|
@@ -5107,7 +5125,7 @@ const References = {
|
|
|
5107
5125
|
refresh
|
|
5108
5126
|
};
|
|
5109
5127
|
|
|
5110
|
-
const show$
|
|
5128
|
+
const show$4 = async () => {
|
|
5111
5129
|
await open$8('Run And Debug');
|
|
5112
5130
|
};
|
|
5113
5131
|
const handleClickSectionBreakPoints = async () => {
|
|
@@ -5148,7 +5166,39 @@ const RunAndDebug = {
|
|
|
5148
5166
|
handleWatchValueChange,
|
|
5149
5167
|
selectIndex: selectIndex$2,
|
|
5150
5168
|
setPauseOnExceptions,
|
|
5151
|
-
show: show$
|
|
5169
|
+
show: show$4
|
|
5170
|
+
};
|
|
5171
|
+
|
|
5172
|
+
const show$3 = async () => {
|
|
5173
|
+
await invoke('Main.openUri', 'running-extensions:///1');
|
|
5174
|
+
};
|
|
5175
|
+
const handleContextMenu$3 = async (index, x = 0, y = 0) => {
|
|
5176
|
+
await invoke('RunningExtensions.handleContextMenu', index, x, y);
|
|
5177
|
+
};
|
|
5178
|
+
const copyId = async index => {
|
|
5179
|
+
await invoke('RunningExtensions.copyId', index);
|
|
5180
|
+
};
|
|
5181
|
+
const disable = async index => {
|
|
5182
|
+
await invoke('RunningExtensions.disable', index);
|
|
5183
|
+
};
|
|
5184
|
+
const disableWorkspace = async index => {
|
|
5185
|
+
await invoke('RunningExtensions.disableWorkspace', index);
|
|
5186
|
+
};
|
|
5187
|
+
const reportIssue = async index => {
|
|
5188
|
+
await invoke('RunningExtensions.reportIssue', index);
|
|
5189
|
+
};
|
|
5190
|
+
const startProfile = async () => {
|
|
5191
|
+
await invoke('RunningExtensions.startProfile');
|
|
5192
|
+
};
|
|
5193
|
+
|
|
5194
|
+
const RunningExtensions = {
|
|
5195
|
+
copyId,
|
|
5196
|
+
disable,
|
|
5197
|
+
disableWorkspace,
|
|
5198
|
+
handleContextMenu: handleContextMenu$3,
|
|
5199
|
+
reportIssue,
|
|
5200
|
+
show: show$3,
|
|
5201
|
+
startProfile
|
|
5152
5202
|
};
|
|
5153
5203
|
|
|
5154
5204
|
const show$2 = async () => {
|
|
@@ -5662,6 +5712,7 @@ const createApi = (platform, assetDir) => {
|
|
|
5662
5712
|
QuickPick,
|
|
5663
5713
|
References,
|
|
5664
5714
|
RunAndDebug,
|
|
5715
|
+
RunningExtensions,
|
|
5665
5716
|
Search,
|
|
5666
5717
|
Settings,
|
|
5667
5718
|
SettingsView,
|