@lvce-editor/test-worker 11.0.0 → 11.2.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 +26 -3
- package/dist/testWorkerMain.js +89 -239
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ interface LocatorClickOptions {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
interface ILocatorExternal {
|
|
22
|
-
readonly click: (options
|
|
22
|
+
readonly click: (options?: LocatorClickOptions) => Promise<void>;
|
|
23
23
|
readonly dispatchEvent: (type: string, init: string) => Promise<void>;
|
|
24
24
|
readonly first: () => ILocatorExternal;
|
|
25
25
|
readonly hover: () => Promise<void>;
|
|
@@ -28,8 +28,24 @@ interface ILocatorExternal {
|
|
|
28
28
|
readonly type: (text: string) => Promise<void>;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
interface
|
|
32
|
-
|
|
31
|
+
interface ILocatorCreateOptions {
|
|
32
|
+
readonly hasText?: string;
|
|
33
|
+
readonly nth?: number;
|
|
34
|
+
}
|
|
35
|
+
export declare class Locator implements ILocator {
|
|
36
|
+
readonly _selector: any;
|
|
37
|
+
readonly _nth: number;
|
|
38
|
+
readonly _hasText: string;
|
|
39
|
+
constructor(selector: any, { hasText, nth }?: ILocatorCreateOptions);
|
|
40
|
+
click({ button }?: {
|
|
41
|
+
readonly button?: string;
|
|
42
|
+
}): Promise<void>;
|
|
43
|
+
hover(): Promise<void>;
|
|
44
|
+
first(): any;
|
|
45
|
+
locator(subSelector: string): any;
|
|
46
|
+
nth(nth: number): any;
|
|
47
|
+
type(text: string): Promise<void>;
|
|
48
|
+
dispatchEvent(type: string, init: any): Promise<void>;
|
|
33
49
|
}
|
|
34
50
|
|
|
35
51
|
export interface Diagnostic {
|
|
@@ -50,6 +66,11 @@ export interface FileSystemTmpDirOptions {
|
|
|
50
66
|
readonly scheme?: string;
|
|
51
67
|
}
|
|
52
68
|
|
|
69
|
+
export interface FileItem {
|
|
70
|
+
readonly content: string;
|
|
71
|
+
readonly uri: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
53
74
|
export interface SelectItem2Options {
|
|
54
75
|
readonly callbackCommand: string;
|
|
55
76
|
readonly label: string;
|
|
@@ -312,6 +333,7 @@ interface FileSystem {
|
|
|
312
333
|
readonly readDir: (uri: string) => Promise<void>;
|
|
313
334
|
readonly readFile: (uri: string) => Promise<string>;
|
|
314
335
|
readonly remove: (uri: string) => Promise<void>;
|
|
336
|
+
readonly setFiles: (files: readonly FileItem[]) => Promise<void>;
|
|
315
337
|
readonly writeFile: (uri: string, content: string) => Promise<void>;
|
|
316
338
|
readonly writeJson: (uri: string, data: any) => Promise<void>;
|
|
317
339
|
}
|
|
@@ -394,6 +416,7 @@ interface Main {
|
|
|
394
416
|
interface Output {
|
|
395
417
|
readonly clear: () => Promise<void>;
|
|
396
418
|
readonly handleFilterInput: (text: string) => Promise<void>;
|
|
419
|
+
readonly saveAs: () => Promise<void>;
|
|
397
420
|
readonly selectChannel: (channelId: string) => Promise<void>;
|
|
398
421
|
readonly show: () => Promise<void>;
|
|
399
422
|
}
|
package/dist/testWorkerMain.js
CHANGED
|
@@ -517,7 +517,7 @@ const callbacks$1 = Object.create(null);
|
|
|
517
517
|
const get$2 = id => {
|
|
518
518
|
return callbacks$1[id];
|
|
519
519
|
};
|
|
520
|
-
const remove$
|
|
520
|
+
const remove$2 = id => {
|
|
521
521
|
delete callbacks$1[id];
|
|
522
522
|
};
|
|
523
523
|
class JsonRpcError extends Error {
|
|
@@ -670,7 +670,7 @@ const resolve$1 = (id, response) => {
|
|
|
670
670
|
return;
|
|
671
671
|
}
|
|
672
672
|
fn(response);
|
|
673
|
-
remove$
|
|
673
|
+
remove$2(id);
|
|
674
674
|
};
|
|
675
675
|
const E_COMMAND_NOT_FOUND = 'E_COMMAND_NOT_FOUND';
|
|
676
676
|
const getErrorType = prettyError => {
|
|
@@ -713,7 +713,7 @@ const getErrorProperty = (error, prettyError) => {
|
|
|
713
713
|
}
|
|
714
714
|
};
|
|
715
715
|
};
|
|
716
|
-
const create$1$
|
|
716
|
+
const create$1$1 = (id, error) => {
|
|
717
717
|
return {
|
|
718
718
|
jsonrpc: Two$1,
|
|
719
719
|
id,
|
|
@@ -724,7 +724,7 @@ const getErrorResponse = (id, error, preparePrettyError, logError) => {
|
|
|
724
724
|
const prettyError = preparePrettyError(error);
|
|
725
725
|
logError(error, prettyError);
|
|
726
726
|
const errorProperty = getErrorProperty(error, prettyError);
|
|
727
|
-
return create$1$
|
|
727
|
+
return create$1$1(id, errorProperty);
|
|
728
728
|
};
|
|
729
729
|
const create$3 = (message, result) => {
|
|
730
730
|
return {
|
|
@@ -1063,7 +1063,7 @@ const create$2 = async ({
|
|
|
1063
1063
|
messagePort: port2
|
|
1064
1064
|
});
|
|
1065
1065
|
};
|
|
1066
|
-
const create$1
|
|
1066
|
+
const create$1 = async ({
|
|
1067
1067
|
commandMap
|
|
1068
1068
|
}) => {
|
|
1069
1069
|
// TODO create a commandMap per rpc instance
|
|
@@ -1075,7 +1075,26 @@ const create$1$1 = async ({
|
|
|
1075
1075
|
};
|
|
1076
1076
|
const WebWorkerRpcClient = {
|
|
1077
1077
|
__proto__: null,
|
|
1078
|
-
create: create$1
|
|
1078
|
+
create: create$1
|
|
1079
|
+
};
|
|
1080
|
+
const createMockRpc = ({
|
|
1081
|
+
commandMap
|
|
1082
|
+
}) => {
|
|
1083
|
+
const invocations = [];
|
|
1084
|
+
const invoke = (method, ...params) => {
|
|
1085
|
+
invocations.push([method, ...params]);
|
|
1086
|
+
const command = commandMap[method];
|
|
1087
|
+
if (!command) {
|
|
1088
|
+
throw new Error(`command ${method} not found`);
|
|
1089
|
+
}
|
|
1090
|
+
return command(...params);
|
|
1091
|
+
};
|
|
1092
|
+
const mockRpc = {
|
|
1093
|
+
invocations,
|
|
1094
|
+
invoke,
|
|
1095
|
+
invokeAndTransfer: invoke
|
|
1096
|
+
};
|
|
1097
|
+
return mockRpc;
|
|
1079
1098
|
};
|
|
1080
1099
|
|
|
1081
1100
|
const Directory = 3;
|
|
@@ -1096,8 +1115,12 @@ const set$3 = (id, rpc) => {
|
|
|
1096
1115
|
const get$1 = id => {
|
|
1097
1116
|
return rpcs[id];
|
|
1098
1117
|
};
|
|
1118
|
+
const remove$1 = id => {
|
|
1119
|
+
delete rpcs[id];
|
|
1120
|
+
};
|
|
1099
1121
|
|
|
1100
|
-
|
|
1122
|
+
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
1123
|
+
const create = rpcId => {
|
|
1101
1124
|
return {
|
|
1102
1125
|
async dispose() {
|
|
1103
1126
|
const rpc = get$1(rpcId);
|
|
@@ -1115,6 +1138,18 @@ const create$1 = rpcId => {
|
|
|
1115
1138
|
// @ts-ignore
|
|
1116
1139
|
return rpc.invokeAndTransfer(method, ...params);
|
|
1117
1140
|
},
|
|
1141
|
+
registerMockRpc(commandMap) {
|
|
1142
|
+
const mockRpc = createMockRpc({
|
|
1143
|
+
commandMap
|
|
1144
|
+
});
|
|
1145
|
+
set$3(rpcId, mockRpc);
|
|
1146
|
+
// @ts-ignore
|
|
1147
|
+
mockRpc[Symbol.dispose] = () => {
|
|
1148
|
+
remove$1(rpcId);
|
|
1149
|
+
};
|
|
1150
|
+
// @ts-ignore
|
|
1151
|
+
return mockRpc;
|
|
1152
|
+
},
|
|
1118
1153
|
set(rpc) {
|
|
1119
1154
|
set$3(rpcId, rpc);
|
|
1120
1155
|
}
|
|
@@ -1124,13 +1159,13 @@ const create$1 = rpcId => {
|
|
|
1124
1159
|
const {
|
|
1125
1160
|
invoke: invoke$1,
|
|
1126
1161
|
set: set$2
|
|
1127
|
-
} = create
|
|
1162
|
+
} = create(EditorWorker);
|
|
1128
1163
|
|
|
1129
1164
|
const {
|
|
1130
1165
|
invoke,
|
|
1131
1166
|
invokeAndTransfer,
|
|
1132
1167
|
set: set$1
|
|
1133
|
-
} = create
|
|
1168
|
+
} = create(RendererWorker);
|
|
1134
1169
|
const sendMessagePortToEditorWorker = async (port, rpcId) => {
|
|
1135
1170
|
const command = 'HandleMessagePort.handleMessagePort';
|
|
1136
1171
|
// @ts-ignore
|
|
@@ -1183,7 +1218,6 @@ const getLocatorInvoke = locator => {
|
|
|
1183
1218
|
const module = get(locator.webViewId);
|
|
1184
1219
|
return module.invoke;
|
|
1185
1220
|
}
|
|
1186
|
-
// @ts-ignore
|
|
1187
1221
|
return invoke;
|
|
1188
1222
|
};
|
|
1189
1223
|
|
|
@@ -1500,17 +1534,17 @@ const addTest = (name, fn) => {
|
|
|
1500
1534
|
name
|
|
1501
1535
|
});
|
|
1502
1536
|
};
|
|
1503
|
-
const getTests = () => {
|
|
1504
|
-
const tests = state.pendingTests;
|
|
1505
|
-
state.pendingTests = [];
|
|
1506
|
-
return tests;
|
|
1507
|
-
};
|
|
1508
1537
|
const setMockRpc = mockRpc => {
|
|
1509
1538
|
object(mockRpc);
|
|
1510
1539
|
string$1(mockRpc.name);
|
|
1511
1540
|
state.mockRpcs[mockRpc.name] = mockRpc;
|
|
1512
1541
|
};
|
|
1513
1542
|
|
|
1543
|
+
const performAction = async (locator, action, options) => {
|
|
1544
|
+
const invoke = getLocatorInvoke(locator);
|
|
1545
|
+
return invoke('TestFrameWork.performAction', locator, action, options);
|
|
1546
|
+
};
|
|
1547
|
+
|
|
1514
1548
|
const toButtonNumber = buttonType => {
|
|
1515
1549
|
switch (buttonType) {
|
|
1516
1550
|
case 'left':
|
|
@@ -1524,13 +1558,6 @@ const toButtonNumber = buttonType => {
|
|
|
1524
1558
|
}
|
|
1525
1559
|
};
|
|
1526
1560
|
|
|
1527
|
-
const create = (selector, options = {}) => {
|
|
1528
|
-
return new Locator(selector, options);
|
|
1529
|
-
};
|
|
1530
|
-
const performAction = async (locator, action, options) => {
|
|
1531
|
-
const invoke = getLocatorInvoke(locator);
|
|
1532
|
-
return invoke('TestFrameWork.performAction', locator, action, options);
|
|
1533
|
-
};
|
|
1534
1561
|
class Locator {
|
|
1535
1562
|
constructor(selector, {
|
|
1536
1563
|
hasText = '',
|
|
@@ -1559,18 +1586,18 @@ class Locator {
|
|
|
1559
1586
|
return performAction(this, 'hover', options);
|
|
1560
1587
|
}
|
|
1561
1588
|
first() {
|
|
1562
|
-
return
|
|
1589
|
+
return new Locator(this._selector, {
|
|
1563
1590
|
nth: 0
|
|
1564
1591
|
});
|
|
1565
1592
|
}
|
|
1566
1593
|
locator(subSelector) {
|
|
1567
1594
|
if (this._nth !== -1) {
|
|
1568
|
-
return
|
|
1595
|
+
return new Locator(`${this._selector}:nth-of-type(${this._nth + 1}) ${subSelector}`);
|
|
1569
1596
|
}
|
|
1570
|
-
return
|
|
1597
|
+
return new Locator(`${this._selector} ${subSelector}`);
|
|
1571
1598
|
}
|
|
1572
1599
|
nth(nth) {
|
|
1573
|
-
return
|
|
1600
|
+
return new Locator(this._selector, {
|
|
1574
1601
|
nth
|
|
1575
1602
|
});
|
|
1576
1603
|
}
|
|
@@ -1588,6 +1615,10 @@ class Locator {
|
|
|
1588
1615
|
}
|
|
1589
1616
|
}
|
|
1590
1617
|
|
|
1618
|
+
const createLocator = (selector, options = {}) => {
|
|
1619
|
+
return new Locator(selector, options);
|
|
1620
|
+
};
|
|
1621
|
+
|
|
1591
1622
|
const getTmpDir$1 = async () => {
|
|
1592
1623
|
return 'memfs://';
|
|
1593
1624
|
};
|
|
@@ -1595,11 +1626,10 @@ const test = async (name, fn) => {
|
|
|
1595
1626
|
nameAnonymousFunction(fn, `test/${name}`);
|
|
1596
1627
|
addTest(name, fn);
|
|
1597
1628
|
};
|
|
1598
|
-
|
|
1629
|
+
const skipTest = async id => {
|
|
1599
1630
|
const state = 'skip';
|
|
1600
1631
|
const background = 'yellow';
|
|
1601
1632
|
const text = `test skipped ${id}`;
|
|
1602
|
-
// @ts-ignore
|
|
1603
1633
|
await invoke('TestFrameWork.showOverlay', state, background, text);
|
|
1604
1634
|
};
|
|
1605
1635
|
const {
|
|
@@ -1676,15 +1706,12 @@ const readNativeFiles = async () => {
|
|
|
1676
1706
|
await invoke('ClipBoard.readNativeFiles');
|
|
1677
1707
|
};
|
|
1678
1708
|
const writeNativeFiles = async uris => {
|
|
1679
|
-
// @ts-ignore
|
|
1680
1709
|
await invoke('ClipBoard.writeNativeFiles', uris);
|
|
1681
1710
|
};
|
|
1682
1711
|
const enableMemoryClipBoard = async () => {
|
|
1683
|
-
// @ts-ignore
|
|
1684
1712
|
await invoke('ClipBoard.enableMemoryClipBoard');
|
|
1685
1713
|
};
|
|
1686
1714
|
const disableMemoryClipBoard = async () => {
|
|
1687
|
-
// @ts-ignore
|
|
1688
1715
|
await invoke('ClipBoard.disableMemoryClipBoard');
|
|
1689
1716
|
};
|
|
1690
1717
|
const matchesExpectedText = (actualText, expectedText) => {
|
|
@@ -1694,14 +1721,12 @@ const matchesExpectedText = (actualText, expectedText) => {
|
|
|
1694
1721
|
return expectedText.test(actualText);
|
|
1695
1722
|
};
|
|
1696
1723
|
const shouldHaveText$1 = async expectedText => {
|
|
1697
|
-
// @ts-ignore
|
|
1698
1724
|
const actualText = await invoke('ClipBoard.readMemoryText');
|
|
1699
1725
|
if (!matchesExpectedText(actualText, expectedText)) {
|
|
1700
1726
|
throw new AssertionError(`expected clipboard to have text "${expectedText}" but was "${actualText}"`);
|
|
1701
1727
|
}
|
|
1702
1728
|
};
|
|
1703
1729
|
const writeText = async text => {
|
|
1704
|
-
// @ts-ignore
|
|
1705
1730
|
await invoke('ClipBoard.writeText', text);
|
|
1706
1731
|
};
|
|
1707
1732
|
|
|
@@ -1725,7 +1750,6 @@ const ColorPicker = {
|
|
|
1725
1750
|
};
|
|
1726
1751
|
|
|
1727
1752
|
const execute$1 = async (id, ...args) => {
|
|
1728
|
-
// @ts-ignore
|
|
1729
1753
|
return invoke(id, ...args);
|
|
1730
1754
|
};
|
|
1731
1755
|
|
|
@@ -1744,35 +1768,27 @@ const ContextMenu = {
|
|
|
1744
1768
|
};
|
|
1745
1769
|
|
|
1746
1770
|
const openIframeInspector = async () => {
|
|
1747
|
-
// @ts-ignore
|
|
1748
1771
|
return invoke('Developer.openIframeInspector');
|
|
1749
1772
|
};
|
|
1750
1773
|
const openCacheFolder = async () => {
|
|
1751
|
-
// @ts-ignore
|
|
1752
1774
|
return invoke('Developer.openCacheFolder');
|
|
1753
1775
|
};
|
|
1754
1776
|
const openConfigFolder = async () => {
|
|
1755
|
-
// @ts-ignore
|
|
1756
1777
|
return invoke('Developer.openConfigFolder');
|
|
1757
1778
|
};
|
|
1758
1779
|
const openLogsFolder = async () => {
|
|
1759
|
-
// @ts-ignore
|
|
1760
1780
|
return invoke('Developer.openLogsFolder');
|
|
1761
1781
|
};
|
|
1762
1782
|
const openProcessExplorer = async () => {
|
|
1763
|
-
// @ts-ignore
|
|
1764
1783
|
return invoke('Developer.openProcessExplorer');
|
|
1765
1784
|
};
|
|
1766
1785
|
const reloadColorTheme = async () => {
|
|
1767
|
-
// @ts-ignore
|
|
1768
1786
|
return invoke('Developer.reloadColorTheme');
|
|
1769
1787
|
};
|
|
1770
1788
|
const reloadIconTheme = async () => {
|
|
1771
|
-
// @ts-ignore
|
|
1772
1789
|
return invoke('Developer.reloadIconTheme');
|
|
1773
1790
|
};
|
|
1774
1791
|
const toggleDeveloperTools = async () => {
|
|
1775
|
-
// @ts-ignore
|
|
1776
1792
|
return invoke('Developer.toggleDeveloperTools');
|
|
1777
1793
|
};
|
|
1778
1794
|
|
|
@@ -1804,17 +1820,14 @@ const executeMock$1 = (id, ...args) => {
|
|
|
1804
1820
|
};
|
|
1805
1821
|
|
|
1806
1822
|
const showSaveFilePicker = async () => {
|
|
1807
|
-
// @ts-ignore
|
|
1808
1823
|
await invoke('FilePicker.showSaveFilePicker');
|
|
1809
1824
|
};
|
|
1810
1825
|
const mockSaveFilePicker = async fn => {
|
|
1811
1826
|
const id = registerMock(fn);
|
|
1812
|
-
// @ts-ignore
|
|
1813
1827
|
await invoke('FilePicker.mockSaveFilePicker', id);
|
|
1814
1828
|
};
|
|
1815
1829
|
const mockConfirm = async fn => {
|
|
1816
1830
|
const id = registerMock(fn);
|
|
1817
|
-
// @ts-ignore
|
|
1818
1831
|
await invoke('ConfirmPrompt.mock', id);
|
|
1819
1832
|
};
|
|
1820
1833
|
const executeMock = (id, ...args) => {
|
|
@@ -1870,17 +1883,14 @@ const getEditorKey = async () => {
|
|
|
1870
1883
|
const Script = 2;
|
|
1871
1884
|
|
|
1872
1885
|
const update$1 = settings => {
|
|
1873
|
-
// @ts-ignore
|
|
1874
1886
|
return invoke('Preferences.update', settings);
|
|
1875
1887
|
};
|
|
1876
1888
|
const enableDiagnostics$1 = () => {
|
|
1877
|
-
// @ts-ignore
|
|
1878
1889
|
return invoke('Preferences.update', {
|
|
1879
1890
|
'editor.diagnostics': true
|
|
1880
1891
|
});
|
|
1881
1892
|
};
|
|
1882
1893
|
const disableDiagnostics$1 = () => {
|
|
1883
|
-
// @ts-ignore
|
|
1884
1894
|
return invoke('Preferences.update', {
|
|
1885
1895
|
'editor.diagnostics': false
|
|
1886
1896
|
});
|
|
@@ -1900,7 +1910,6 @@ const openCompletion = async () => {
|
|
|
1900
1910
|
await invoke('Editor.openCompletion');
|
|
1901
1911
|
};
|
|
1902
1912
|
const closeCompletion = async () => {
|
|
1903
|
-
// @ts-ignore
|
|
1904
1913
|
await invoke('EditorCompletion.close');
|
|
1905
1914
|
};
|
|
1906
1915
|
const openEditorContextMenu = async () => {
|
|
@@ -1949,11 +1958,9 @@ const type = async text => {
|
|
|
1949
1958
|
await invoke('Editor.type', text);
|
|
1950
1959
|
};
|
|
1951
1960
|
const findAllReferences = async () => {
|
|
1952
|
-
// @ts-ignore
|
|
1953
1961
|
await invoke('SideBar.show', 'References', /* focus */true);
|
|
1954
1962
|
};
|
|
1955
1963
|
const findAllImplementations = async () => {
|
|
1956
|
-
// @ts-ignore
|
|
1957
1964
|
await invoke('SideBar.show', 'Implementations', /* focus */true);
|
|
1958
1965
|
};
|
|
1959
1966
|
const setSelections = async selections => {
|
|
@@ -1981,11 +1988,9 @@ const openCompletionDetails = async () => {
|
|
|
1981
1988
|
await invoke('EditorCompletion.openDetails');
|
|
1982
1989
|
};
|
|
1983
1990
|
const closeCompletionDetails = async () => {
|
|
1984
|
-
// @ts-ignore
|
|
1985
1991
|
await invoke('EditorCompletion.closeDetails');
|
|
1986
1992
|
};
|
|
1987
1993
|
const toggleCompletionDetails = async () => {
|
|
1988
|
-
// @ts-ignore
|
|
1989
1994
|
await invoke('EditorCompletion.toggleDetails');
|
|
1990
1995
|
};
|
|
1991
1996
|
const organizeImports = async () => {
|
|
@@ -2010,7 +2015,6 @@ const openColorPicker = async () => {
|
|
|
2010
2015
|
await invoke('Editor.openColorPicker');
|
|
2011
2016
|
};
|
|
2012
2017
|
const openFind = async () => {
|
|
2013
|
-
// @ts-ignore
|
|
2014
2018
|
await invoke('Editor.openFind2');
|
|
2015
2019
|
};
|
|
2016
2020
|
const deleteAllLeft = async () => {
|
|
@@ -2060,18 +2064,14 @@ const openRename = async () => {
|
|
|
2060
2064
|
};
|
|
2061
2065
|
const rename2 = async newName => {
|
|
2062
2066
|
await openRename();
|
|
2063
|
-
// @ts-ignore
|
|
2064
2067
|
await invoke('EditorRename.handleInput', newName, Script);
|
|
2065
|
-
// @ts-ignore
|
|
2066
2068
|
await invoke('EditorRename.accept');
|
|
2067
2069
|
};
|
|
2068
2070
|
const growSelection = async () => {
|
|
2069
|
-
// @ts-ignore
|
|
2070
2071
|
await invoke('Editor.selectionGrow');
|
|
2071
2072
|
};
|
|
2072
2073
|
const getSelections = async () => {
|
|
2073
2074
|
const key = await getEditorKey();
|
|
2074
|
-
// @ts-ignore
|
|
2075
2075
|
return invoke$1('Editor.getSelections', key);
|
|
2076
2076
|
};
|
|
2077
2077
|
const shouldHaveText = async expectedText => {
|
|
@@ -2089,11 +2089,9 @@ const shouldHaveSelections = async expectedSelections => {
|
|
|
2089
2089
|
}
|
|
2090
2090
|
};
|
|
2091
2091
|
const undo = async () => {
|
|
2092
|
-
// @ts-ignore
|
|
2093
2092
|
await invoke$1('Editor.undo');
|
|
2094
2093
|
};
|
|
2095
2094
|
const redo = async () => {
|
|
2096
|
-
// @ts-ignore
|
|
2097
2095
|
await invoke$1('Editor.redo');
|
|
2098
2096
|
};
|
|
2099
2097
|
const shouldHaveDiagnostics = async expectedDiagnostics => {
|
|
@@ -2201,15 +2199,12 @@ const selectCurrentIndex$2 = async () => {
|
|
|
2201
2199
|
await invoke('EditorCompletion.selectCurrentIndex');
|
|
2202
2200
|
};
|
|
2203
2201
|
const close$2 = async () => {
|
|
2204
|
-
// @ts-ignore
|
|
2205
2202
|
await invoke('EditorCompletion.close');
|
|
2206
2203
|
};
|
|
2207
2204
|
const handleWheel$2 = async (deltaMode, deltaY) => {
|
|
2208
|
-
// @ts-ignore
|
|
2209
2205
|
await invoke('EditorCompletion.handleWheel', deltaMode, deltaY);
|
|
2210
2206
|
};
|
|
2211
2207
|
const handlePointerdown = async (clientX, clientY) => {
|
|
2212
|
-
// @ts-ignore
|
|
2213
2208
|
await invoke('EditorCompletion.handlePointerdown', clientX, clientY);
|
|
2214
2209
|
};
|
|
2215
2210
|
|
|
@@ -2226,7 +2221,6 @@ const show$5 = async () => {
|
|
|
2226
2221
|
await invoke('Editor.showHover2');
|
|
2227
2222
|
};
|
|
2228
2223
|
const close$1 = async () => {
|
|
2229
|
-
// @ts-ignore
|
|
2230
2224
|
await invoke('EditorHover.close');
|
|
2231
2225
|
};
|
|
2232
2226
|
|
|
@@ -2237,15 +2231,12 @@ const EditorHover = {
|
|
|
2237
2231
|
};
|
|
2238
2232
|
|
|
2239
2233
|
const handleInput$5 = async value => {
|
|
2240
|
-
// @ts-ignore
|
|
2241
2234
|
await invoke('EditorRename.handleInput', value, Script);
|
|
2242
2235
|
};
|
|
2243
2236
|
const accept = async () => {
|
|
2244
|
-
// @ts-ignore
|
|
2245
2237
|
await invoke('EditorRename.accept');
|
|
2246
2238
|
};
|
|
2247
2239
|
const cancel = async () => {
|
|
2248
|
-
// @ts-ignore
|
|
2249
2240
|
await invoke('EditorRename.cancel');
|
|
2250
2241
|
};
|
|
2251
2242
|
|
|
@@ -2257,11 +2248,9 @@ const EditorRename = {
|
|
|
2257
2248
|
};
|
|
2258
2249
|
|
|
2259
2250
|
const selectIndex$5 = async index => {
|
|
2260
|
-
// @ts-ignore
|
|
2261
2251
|
await invoke('EditorSourceAction.selectIndex', index);
|
|
2262
2252
|
};
|
|
2263
2253
|
const selectCurrentIndex$1 = async () => {
|
|
2264
|
-
// @ts-ignore
|
|
2265
2254
|
await invoke('EditorSourceAction.selectCurrentIndex');
|
|
2266
2255
|
};
|
|
2267
2256
|
|
|
@@ -2272,7 +2261,6 @@ const EditorSourceAction = {
|
|
|
2272
2261
|
};
|
|
2273
2262
|
|
|
2274
2263
|
const openContextMenu = async index => {
|
|
2275
|
-
// @ts-ignore
|
|
2276
2264
|
await invoke('Explorer.handleContextMenuKeyboard', index);
|
|
2277
2265
|
};
|
|
2278
2266
|
const handleDragLeave = async () => {
|
|
@@ -2282,7 +2270,6 @@ const handleBlur = async () => {
|
|
|
2282
2270
|
await invoke('Explorer.handleBlur');
|
|
2283
2271
|
};
|
|
2284
2272
|
const handleEscape = async () => {
|
|
2285
|
-
// @ts-ignore
|
|
2286
2273
|
await invoke('Explorer.handleEscape');
|
|
2287
2274
|
};
|
|
2288
2275
|
const handleInputBlur = async () => {
|
|
@@ -2292,21 +2279,18 @@ const focus$1 = async () => {
|
|
|
2292
2279
|
await invoke('Explorer.focusIndex', -1);
|
|
2293
2280
|
};
|
|
2294
2281
|
const focusNext$7 = async () => {
|
|
2295
|
-
// @ts-ignore
|
|
2296
2282
|
await invoke('Explorer.focusNext');
|
|
2297
2283
|
};
|
|
2298
2284
|
const selectUp = async () => {
|
|
2299
2285
|
await invoke('Explorer.selectUp');
|
|
2300
2286
|
};
|
|
2301
2287
|
const handleDragOverIndex = async index => {
|
|
2302
|
-
// @ts-ignore
|
|
2303
2288
|
await invoke('Explorer.handleDragOverIndex', index);
|
|
2304
2289
|
};
|
|
2305
2290
|
const selectDown = async () => {
|
|
2306
2291
|
await invoke('Explorer.selectDown');
|
|
2307
2292
|
};
|
|
2308
2293
|
const collapseAll$2 = async () => {
|
|
2309
|
-
// @ts-ignore
|
|
2310
2294
|
await invoke('Explorer.collapseAll');
|
|
2311
2295
|
};
|
|
2312
2296
|
const refresh$1 = async () => {
|
|
@@ -2340,22 +2324,18 @@ const newFolder = async () => {
|
|
|
2340
2324
|
await invoke('Explorer.newFolder');
|
|
2341
2325
|
};
|
|
2342
2326
|
const copyPath$1 = async () => {
|
|
2343
|
-
// @ts-ignore
|
|
2344
2327
|
await invoke('Explorer.copyPath');
|
|
2345
2328
|
};
|
|
2346
2329
|
const copyRelativePath = async () => {
|
|
2347
|
-
// @ts-ignore
|
|
2348
2330
|
await invoke('Explorer.copyRelativePath');
|
|
2349
2331
|
};
|
|
2350
2332
|
const handleClick$2 = async index => {
|
|
2351
2333
|
await invoke('Explorer.handleClick', index);
|
|
2352
2334
|
};
|
|
2353
2335
|
const handleClickAt$2 = async (preventDefault, button, ctrlKey, shiftKey, x, y) => {
|
|
2354
|
-
// @ts-ignore
|
|
2355
2336
|
await invoke('Explorer.handleClickAt', preventDefault, button, ctrlKey, shiftKey, x, y);
|
|
2356
2337
|
};
|
|
2357
2338
|
const handleDrop = async (x, y, fileIds, fileList) => {
|
|
2358
|
-
// @ts-ignore
|
|
2359
2339
|
await invoke('Explorer.handleDrop', x, y, fileIds, fileIds);
|
|
2360
2340
|
};
|
|
2361
2341
|
const rename = async () => {
|
|
@@ -2383,22 +2363,18 @@ const handleDragOver = async (x, y) => {
|
|
|
2383
2363
|
await invoke('Explorer.handleDragOver', x, y);
|
|
2384
2364
|
};
|
|
2385
2365
|
const handleCut = async () => {
|
|
2386
|
-
// @ts-ignore
|
|
2387
2366
|
await invoke('Explorer.handleCut');
|
|
2388
2367
|
};
|
|
2389
2368
|
const handleCopy = async () => {
|
|
2390
|
-
// @ts-ignore
|
|
2391
2369
|
await invoke('Explorer.handleCopy');
|
|
2392
2370
|
};
|
|
2393
2371
|
const handlePaste = async () => {
|
|
2394
|
-
// @ts-ignore
|
|
2395
2372
|
await invoke('Explorer.handlePaste');
|
|
2396
2373
|
};
|
|
2397
2374
|
const selectIndices = async indices => {
|
|
2398
2375
|
await invoke('Explorer.selectIndices', indices);
|
|
2399
2376
|
};
|
|
2400
2377
|
const toggleIndividualSelection = async index => {
|
|
2401
|
-
// @ts-ignore
|
|
2402
2378
|
await invoke('Explorer.toggleIndividualSelection', index);
|
|
2403
2379
|
};
|
|
2404
2380
|
|
|
@@ -2463,27 +2439,21 @@ const Extension = {
|
|
|
2463
2439
|
};
|
|
2464
2440
|
|
|
2465
2441
|
const handleClickCategory = async categoryId => {
|
|
2466
|
-
// @ts-ignore
|
|
2467
2442
|
await invoke('ExtensionDetail.handleClickCategory', categoryId);
|
|
2468
2443
|
};
|
|
2469
2444
|
const handleReadmeContextMenu = async (x, y, nodeName, href) => {
|
|
2470
|
-
// @ts-ignore
|
|
2471
2445
|
await invoke('ExtensionDetail.handleReadmeContextMenu', x, y, nodeName, href);
|
|
2472
2446
|
};
|
|
2473
2447
|
const copyReadmeLink = async href => {
|
|
2474
|
-
// @ts-ignore
|
|
2475
2448
|
await invoke('ExtensionDetail.copyReadmeLink', href);
|
|
2476
2449
|
};
|
|
2477
2450
|
const handleClickEnable = async () => {
|
|
2478
|
-
// @ts-ignore
|
|
2479
2451
|
await invoke('ExtensionDetail.handleClickEnable');
|
|
2480
2452
|
};
|
|
2481
2453
|
const handleClickDisable = async () => {
|
|
2482
|
-
// @ts-ignore
|
|
2483
2454
|
await invoke('ExtensionDetail.handleClickDisable');
|
|
2484
2455
|
};
|
|
2485
2456
|
const handleClickSetColorTheme = async () => {
|
|
2486
|
-
// @ts-ignore
|
|
2487
2457
|
await invoke('ExtensionDetail.handleClickSetColorTheme');
|
|
2488
2458
|
};
|
|
2489
2459
|
const selectFeature = name => {
|
|
@@ -2518,7 +2488,6 @@ const handleImageContextMenu = () => {
|
|
|
2518
2488
|
return invoke('ExtensionDetail.handleImageContextMenu');
|
|
2519
2489
|
};
|
|
2520
2490
|
const openFeature = featureName => {
|
|
2521
|
-
// @ts-ignore
|
|
2522
2491
|
return invoke('ExtensionDetail.handleFeaturesClick', featureName);
|
|
2523
2492
|
};
|
|
2524
2493
|
const openThemes = async () => {
|
|
@@ -2540,7 +2509,6 @@ const openSettings = async () => {
|
|
|
2540
2509
|
await openFeature('Settings');
|
|
2541
2510
|
};
|
|
2542
2511
|
const handleScroll$1 = async scrollTop => {
|
|
2543
|
-
// @ts-ignore
|
|
2544
2512
|
return invoke('ExtensionDetail.handleScroll', scrollTop);
|
|
2545
2513
|
};
|
|
2546
2514
|
const hideSizeLink = async () => {
|
|
@@ -2597,27 +2565,21 @@ const open$4 = async () => {
|
|
|
2597
2565
|
await open$5('Extensions');
|
|
2598
2566
|
};
|
|
2599
2567
|
const handleInput$4 = async value => {
|
|
2600
|
-
// @ts-ignore
|
|
2601
2568
|
await invoke('Extensions.handleInput', value, Script$1);
|
|
2602
2569
|
};
|
|
2603
2570
|
const handleClick$1 = async index => {
|
|
2604
|
-
// @ts-ignore
|
|
2605
2571
|
await invoke('Extensions.handleClick', index);
|
|
2606
2572
|
};
|
|
2607
2573
|
const handleContextMenu$4 = async (button, x, y) => {
|
|
2608
|
-
// @ts-ignore
|
|
2609
2574
|
await invoke('Extensions.handleContextMenu', button, x, y);
|
|
2610
2575
|
};
|
|
2611
2576
|
const copyExtensionInfo = async () => {
|
|
2612
|
-
// @ts-ignore
|
|
2613
2577
|
await invoke('Extensions.copyExtensionInfo');
|
|
2614
2578
|
};
|
|
2615
2579
|
const copyExtensionId = async () => {
|
|
2616
|
-
// @ts-ignore
|
|
2617
2580
|
await invoke('Extensions.copyExtensionId');
|
|
2618
2581
|
};
|
|
2619
2582
|
const clearSearchResults$1 = async () => {
|
|
2620
|
-
// @ts-ignore
|
|
2621
2583
|
await invoke('Extensions.clearSearchResults');
|
|
2622
2584
|
};
|
|
2623
2585
|
|
|
@@ -2741,14 +2703,18 @@ const readFile = async uri => {
|
|
|
2741
2703
|
return invoke('FileSystem.readFile', uri);
|
|
2742
2704
|
};
|
|
2743
2705
|
const addFileHandle = async file => {
|
|
2744
|
-
// @ts-ignore
|
|
2745
2706
|
await invoke('FileSystem.addFileHandle', file);
|
|
2746
2707
|
};
|
|
2747
2708
|
const mkdir = async uri => {
|
|
2748
2709
|
await invoke('FileSystem.mkdir', uri);
|
|
2749
2710
|
};
|
|
2711
|
+
const setFiles = async files => {
|
|
2712
|
+
// TODO maybe have a method to send all the files to file system worker directly
|
|
2713
|
+
await Promise.all(files.map(file => {
|
|
2714
|
+
return writeFile(file.uri, file.content);
|
|
2715
|
+
}));
|
|
2716
|
+
};
|
|
2750
2717
|
const readDir = async uri => {
|
|
2751
|
-
// @ts-ignore
|
|
2752
2718
|
return invoke('FileSystem.readDirWithFileTypes', uri);
|
|
2753
2719
|
};
|
|
2754
2720
|
const remove = async uri => {
|
|
@@ -2761,19 +2727,16 @@ const getTmpDir = async ({
|
|
|
2761
2727
|
case Memfs:
|
|
2762
2728
|
return 'memfs:///workspace';
|
|
2763
2729
|
default:
|
|
2764
|
-
// @ts-ignore
|
|
2765
2730
|
return invoke('PlatformPaths.getTmpDir');
|
|
2766
2731
|
}
|
|
2767
2732
|
};
|
|
2768
2733
|
const chmod = async (uri, permissions) => {
|
|
2769
|
-
// @ts-ignore
|
|
2770
2734
|
await invoke('FileSystem.chmod', uri, permissions);
|
|
2771
2735
|
};
|
|
2772
2736
|
const createExecutable = async content => {
|
|
2773
2737
|
const tmpDir = await getTmpDir({
|
|
2774
2738
|
scheme: 'file'
|
|
2775
2739
|
});
|
|
2776
|
-
// @ts-ignore
|
|
2777
2740
|
const nodePath = await invoke('PlatformPaths.getNodePath');
|
|
2778
2741
|
const gitPath = `${tmpDir}/git`;
|
|
2779
2742
|
await writeFile(gitPath, `#!${nodePath}
|
|
@@ -2782,10 +2745,8 @@ const createExecutable = async content => {
|
|
|
2782
2745
|
return gitPath;
|
|
2783
2746
|
};
|
|
2784
2747
|
const createExecutableFrom = async uri => {
|
|
2785
|
-
// @ts-ignore
|
|
2786
2748
|
const testPath = await invoke('PlatformPaths.getTestPath');
|
|
2787
2749
|
const absolutePath = testPath + Slash + uri;
|
|
2788
|
-
// @ts-ignore
|
|
2789
2750
|
const content = await invoke('Ajax.getText', absolutePath);
|
|
2790
2751
|
return createExecutable(content);
|
|
2791
2752
|
};
|
|
@@ -2795,7 +2756,6 @@ const createDroppedFileHandle = async () => {
|
|
|
2795
2756
|
create: true
|
|
2796
2757
|
});
|
|
2797
2758
|
const file = await fileHandle.getFile();
|
|
2798
|
-
// @ts-ignore
|
|
2799
2759
|
const id = await invoke('FileSystemHandle.addFileHandle', fileHandle);
|
|
2800
2760
|
return {
|
|
2801
2761
|
file,
|
|
@@ -2825,6 +2785,7 @@ const FileSystem = {
|
|
|
2825
2785
|
readDir,
|
|
2826
2786
|
readFile,
|
|
2827
2787
|
remove,
|
|
2788
|
+
setFiles,
|
|
2828
2789
|
writeFile,
|
|
2829
2790
|
writeJson
|
|
2830
2791
|
};
|
|
@@ -2833,59 +2794,45 @@ const focusNext$6 = async () => {
|
|
|
2833
2794
|
await invoke('FindWidget.focusNext');
|
|
2834
2795
|
};
|
|
2835
2796
|
const focusPrevious$6 = async () => {
|
|
2836
|
-
// @ts-ignore
|
|
2837
2797
|
await invoke('FindWidget.focusPrevious');
|
|
2838
2798
|
};
|
|
2839
2799
|
const close = async () => {
|
|
2840
|
-
// @ts-ignore
|
|
2841
2800
|
await invoke('FindWidget.close');
|
|
2842
2801
|
};
|
|
2843
2802
|
const setReplaceValue$1 = async value => {
|
|
2844
|
-
// @ts-ignore
|
|
2845
2803
|
await invoke('FindWidget.handleReplaceInput', value, Script);
|
|
2846
2804
|
};
|
|
2847
2805
|
const setValue$2 = async value => {
|
|
2848
|
-
// @ts-ignore
|
|
2849
2806
|
await invoke('FindWidget.handleInput', value, Script);
|
|
2850
2807
|
};
|
|
2851
2808
|
const toggleReplace$1 = async () => {
|
|
2852
|
-
// @ts-ignore
|
|
2853
2809
|
await invoke('FindWidget.toggleReplace');
|
|
2854
2810
|
};
|
|
2855
2811
|
const toggleMatchCase$1 = async () => {
|
|
2856
|
-
// @ts-ignore
|
|
2857
2812
|
await invoke('FindWidget.toggleMatchCase');
|
|
2858
2813
|
};
|
|
2859
2814
|
const toggleMatchWholeWord$1 = async () => {
|
|
2860
|
-
// @ts-ignore
|
|
2861
2815
|
await invoke('FindWidget.toggleMatchWholeWord');
|
|
2862
2816
|
};
|
|
2863
2817
|
const togglePreserveCase$1 = async () => {
|
|
2864
|
-
// @ts-ignore
|
|
2865
2818
|
await invoke('FindWidget.togglePreserveCase');
|
|
2866
2819
|
};
|
|
2867
2820
|
const toggleUseRegularExpression$1 = async () => {
|
|
2868
|
-
// @ts-ignore
|
|
2869
2821
|
await invoke('FindWidget.toggleUseRegularExpression');
|
|
2870
2822
|
};
|
|
2871
2823
|
const replace = async () => {
|
|
2872
|
-
// @ts-ignore
|
|
2873
2824
|
await invoke('FindWidget.replace');
|
|
2874
2825
|
};
|
|
2875
2826
|
const replaceAll$1 = async () => {
|
|
2876
|
-
// @ts-ignore
|
|
2877
2827
|
await invoke('FindWidget.replaceAll');
|
|
2878
2828
|
};
|
|
2879
2829
|
const focusElement = async whenExpression => {
|
|
2880
|
-
// @ts-ignore
|
|
2881
2830
|
await invoke('FindWidget.focusElement', whenExpression);
|
|
2882
2831
|
};
|
|
2883
2832
|
const focusNextElement = async () => {
|
|
2884
|
-
// @ts-ignore
|
|
2885
2833
|
await invoke('FindWidget.focusNextElement');
|
|
2886
2834
|
};
|
|
2887
2835
|
const focusPreviousElement = async () => {
|
|
2888
|
-
// @ts-ignore
|
|
2889
2836
|
await invoke('FindWidget.focusPreviousElement');
|
|
2890
2837
|
};
|
|
2891
2838
|
|
|
@@ -2967,7 +2914,6 @@ const focusFirst$4 = () => {
|
|
|
2967
2914
|
return invoke('KeyBindings.focusFirst');
|
|
2968
2915
|
};
|
|
2969
2916
|
const focusIndex$4 = index => {
|
|
2970
|
-
// @ts-ignore
|
|
2971
2917
|
return invoke('KeyBindings.focusIndex', index);
|
|
2972
2918
|
};
|
|
2973
2919
|
const focusLast$3 = () => {
|
|
@@ -3086,7 +3032,6 @@ const press = async key => {
|
|
|
3086
3032
|
cancelable: true,
|
|
3087
3033
|
...keyOptions
|
|
3088
3034
|
};
|
|
3089
|
-
// @ts-ignore
|
|
3090
3035
|
await invoke('TestFrameWork.performKeyBoardAction', 'press', options);
|
|
3091
3036
|
};
|
|
3092
3037
|
|
|
@@ -3148,46 +3093,46 @@ const Main = {
|
|
|
3148
3093
|
splitRight
|
|
3149
3094
|
};
|
|
3150
3095
|
|
|
3096
|
+
const open$2 = async id => {
|
|
3097
|
+
await invoke('Layout.showPanel', id);
|
|
3098
|
+
};
|
|
3099
|
+
const openProblems = async () => {
|
|
3100
|
+
await open$2('Problems');
|
|
3101
|
+
await invoke('Panel.selectIndex', 0);
|
|
3102
|
+
};
|
|
3103
|
+
|
|
3104
|
+
const Panel = {
|
|
3105
|
+
__proto__: null,
|
|
3106
|
+
open: open$2,
|
|
3107
|
+
openProblems
|
|
3108
|
+
};
|
|
3109
|
+
|
|
3151
3110
|
const show$4 = async () => {
|
|
3152
|
-
|
|
3111
|
+
await open$2('Output');
|
|
3153
3112
|
await invoke('Panel.selectIndex', 1);
|
|
3154
3113
|
};
|
|
3155
3114
|
const handleFilterInput$1 = async text => {
|
|
3156
|
-
// @ts-ignore
|
|
3157
3115
|
await invoke('Output.handleFilterInput', text, Script);
|
|
3158
3116
|
};
|
|
3159
3117
|
const selectChannel = async channelId => {
|
|
3160
|
-
// @ts-ignore
|
|
3161
3118
|
await invoke('Output.selectChannel', channelId);
|
|
3162
3119
|
};
|
|
3163
3120
|
const clear$2 = async () => {
|
|
3164
|
-
// @ts-ignore
|
|
3165
3121
|
await invoke('Output.clear');
|
|
3166
3122
|
};
|
|
3123
|
+
const saveAs = async () => {
|
|
3124
|
+
await invoke('Output.saveAs');
|
|
3125
|
+
};
|
|
3167
3126
|
|
|
3168
3127
|
const Output = {
|
|
3169
3128
|
__proto__: null,
|
|
3170
3129
|
clear: clear$2,
|
|
3171
3130
|
handleFilterInput: handleFilterInput$1,
|
|
3131
|
+
saveAs,
|
|
3172
3132
|
selectChannel,
|
|
3173
3133
|
show: show$4
|
|
3174
3134
|
};
|
|
3175
3135
|
|
|
3176
|
-
const open$2 = async id => {
|
|
3177
|
-
await invoke('Layout.showPanel', id);
|
|
3178
|
-
};
|
|
3179
|
-
const openProblems = async () => {
|
|
3180
|
-
await open$2('Problems');
|
|
3181
|
-
// @ts-ignore
|
|
3182
|
-
await invoke('Panel.selectIndex', 0);
|
|
3183
|
-
};
|
|
3184
|
-
|
|
3185
|
-
const Panel = {
|
|
3186
|
-
__proto__: null,
|
|
3187
|
-
open: open$2,
|
|
3188
|
-
openProblems
|
|
3189
|
-
};
|
|
3190
|
-
|
|
3191
3136
|
const getIsFirefox = () => {
|
|
3192
3137
|
if (typeof navigator === 'undefined') {
|
|
3193
3138
|
return false;
|
|
@@ -3202,7 +3147,6 @@ const getIsFirefox = () => {
|
|
|
3202
3147
|
};
|
|
3203
3148
|
|
|
3204
3149
|
const getNodePath$1 = () => {
|
|
3205
|
-
// @ts-ignore
|
|
3206
3150
|
return invoke(/* Platform.getNodePath */'Platform.getNodePath');
|
|
3207
3151
|
};
|
|
3208
3152
|
|
|
@@ -3220,43 +3164,33 @@ const Platform = {
|
|
|
3220
3164
|
};
|
|
3221
3165
|
|
|
3222
3166
|
const show$3 = async () => {
|
|
3223
|
-
// @ts-ignore
|
|
3224
3167
|
await invoke('Panel.selectIndex', 0);
|
|
3225
3168
|
};
|
|
3226
3169
|
const handleFilterInput = async text => {
|
|
3227
|
-
// @ts-ignore
|
|
3228
3170
|
await invoke('Problems.handleFilterInput', text, Script);
|
|
3229
3171
|
};
|
|
3230
3172
|
const copyMessage = async () => {
|
|
3231
|
-
// @ts-ignore
|
|
3232
3173
|
await invoke('Problems.copyMessage');
|
|
3233
3174
|
};
|
|
3234
3175
|
const focusIndex$3 = async index => {
|
|
3235
|
-
// @ts-ignore
|
|
3236
3176
|
await invoke('Problems.focusIndex', index);
|
|
3237
3177
|
};
|
|
3238
3178
|
const handleArrowLeft = async () => {
|
|
3239
|
-
// @ts-ignore
|
|
3240
3179
|
await invoke('Problems.handleArrowLeft');
|
|
3241
3180
|
};
|
|
3242
3181
|
const handleArrowRight = async () => {
|
|
3243
|
-
// @ts-ignore
|
|
3244
3182
|
await invoke('Problems.handleArrowRight');
|
|
3245
3183
|
};
|
|
3246
3184
|
const handleClickAt$1 = async (x, y) => {
|
|
3247
|
-
// @ts-ignore
|
|
3248
3185
|
await invoke('Problems.handleClickAt', x, y);
|
|
3249
3186
|
};
|
|
3250
3187
|
const handleIconThemeChange = async () => {
|
|
3251
|
-
// @ts-ignore
|
|
3252
3188
|
await invoke('Problems.handleIconThemeChange');
|
|
3253
3189
|
};
|
|
3254
3190
|
const viewAsList = async () => {
|
|
3255
|
-
// @ts-ignore
|
|
3256
3191
|
await invoke('Problems.viewAsList');
|
|
3257
3192
|
};
|
|
3258
3193
|
const viewAsTable = async () => {
|
|
3259
|
-
// @ts-ignore
|
|
3260
3194
|
await invoke('Problems.viewAsTable');
|
|
3261
3195
|
};
|
|
3262
3196
|
|
|
@@ -3282,7 +3216,6 @@ const registerCallbackCommand = async commandId => {
|
|
|
3282
3216
|
resolve
|
|
3283
3217
|
} = Promise.withResolvers();
|
|
3284
3218
|
callbacks[id] = resolve;
|
|
3285
|
-
// @ts-ignore
|
|
3286
3219
|
await invoke(`Test.registerTestCommand`, commandId);
|
|
3287
3220
|
return {
|
|
3288
3221
|
promise
|
|
@@ -3292,59 +3225,44 @@ const registerCallbackCommand = async commandId => {
|
|
|
3292
3225
|
const QuickPick$1 = 'QuickPick';
|
|
3293
3226
|
|
|
3294
3227
|
const open$1 = async () => {
|
|
3295
|
-
// @ts-ignore
|
|
3296
3228
|
await invoke('Viewlet.openWidget', QuickPick$1, 'everything');
|
|
3297
3229
|
};
|
|
3298
3230
|
const handleInput$2 = async value => {
|
|
3299
|
-
// @ts-ignore
|
|
3300
3231
|
await invoke('QuickPick.handleInput', value, 0);
|
|
3301
3232
|
};
|
|
3302
3233
|
const handleClickAt = async (x, y) => {
|
|
3303
|
-
// @ts-ignore
|
|
3304
3234
|
await invoke('QuickPick.handleClickAt', x, y);
|
|
3305
3235
|
};
|
|
3306
3236
|
const setValue$1 = async value => {
|
|
3307
|
-
// @ts-ignore
|
|
3308
3237
|
await invoke('QuickPick.setValue', value);
|
|
3309
3238
|
};
|
|
3310
3239
|
const focusNext$2 = async () => {
|
|
3311
|
-
// @ts-ignore
|
|
3312
3240
|
await invoke('QuickPick.focusNext');
|
|
3313
3241
|
};
|
|
3314
3242
|
const focusFirst$2 = async () => {
|
|
3315
|
-
// @ts-ignore
|
|
3316
3243
|
await invoke('QuickPick.focusFirst');
|
|
3317
3244
|
};
|
|
3318
3245
|
const focusLast$1 = async () => {
|
|
3319
|
-
// @ts-ignore
|
|
3320
3246
|
await invoke('QuickPick.focusLast');
|
|
3321
3247
|
};
|
|
3322
3248
|
const focusIndex$2 = async index => {
|
|
3323
|
-
// @ts-ignore
|
|
3324
3249
|
await invoke('QuickPick.focusIndex', index);
|
|
3325
3250
|
};
|
|
3326
3251
|
const focusPrevious$2 = async () => {
|
|
3327
|
-
// @ts-ignore
|
|
3328
3252
|
await invoke('QuickPick.focusPrevious');
|
|
3329
3253
|
};
|
|
3330
3254
|
const selectItem = async label => {
|
|
3331
|
-
// @ts-ignore
|
|
3332
3255
|
await invoke('QuickPick.selectItem', label);
|
|
3333
3256
|
};
|
|
3334
3257
|
const selectIndex$3 = async index => {
|
|
3335
|
-
// @ts-ignore
|
|
3336
3258
|
await invoke('QuickPick.selectIndex', index);
|
|
3337
3259
|
};
|
|
3338
3260
|
const selectCurrentIndex = async () => {
|
|
3339
|
-
// @ts-ignore
|
|
3340
3261
|
await invoke('QuickPick.selectCurrentIndex');
|
|
3341
3262
|
};
|
|
3342
3263
|
const executeCommand = async label => {
|
|
3343
|
-
// @ts-ignore
|
|
3344
3264
|
await invoke('QuickPick.showCommands');
|
|
3345
|
-
// @ts-ignore
|
|
3346
3265
|
await invoke('QuickPick.handleInput', label, 0);
|
|
3347
|
-
// @ts-ignore
|
|
3348
3266
|
await invoke('QuickPick.selectItem', label);
|
|
3349
3267
|
};
|
|
3350
3268
|
const selectItem2 = async ({
|
|
@@ -3354,6 +3272,7 @@ const selectItem2 = async ({
|
|
|
3354
3272
|
const {
|
|
3355
3273
|
promise
|
|
3356
3274
|
} = await registerCallbackCommand(callbackCommand);
|
|
3275
|
+
|
|
3357
3276
|
// @ts-ignore
|
|
3358
3277
|
invoke('QuickPick.selectItem', label);
|
|
3359
3278
|
await promise;
|
|
@@ -3378,15 +3297,12 @@ const QuickPick = {
|
|
|
3378
3297
|
};
|
|
3379
3298
|
|
|
3380
3299
|
const clear$1 = async () => {
|
|
3381
|
-
// @ts-ignore
|
|
3382
3300
|
return invoke('References.clear');
|
|
3383
3301
|
};
|
|
3384
3302
|
const collapseAll$1 = async () => {
|
|
3385
|
-
// @ts-ignore
|
|
3386
3303
|
return invoke('References.collapseAll');
|
|
3387
3304
|
};
|
|
3388
3305
|
const refresh = async () => {
|
|
3389
|
-
// @ts-ignore
|
|
3390
3306
|
return invoke('References.refresh');
|
|
3391
3307
|
};
|
|
3392
3308
|
|
|
@@ -3401,39 +3317,30 @@ const show$2 = async () => {
|
|
|
3401
3317
|
await open$5('Run And Debug');
|
|
3402
3318
|
};
|
|
3403
3319
|
const handleClickSectionBreakPoints = async () => {
|
|
3404
|
-
// @ts-ignore
|
|
3405
3320
|
await invoke('Run And Debug.handleClickSectionBreakPoints');
|
|
3406
3321
|
};
|
|
3407
3322
|
const handleClickSectionWatch = async () => {
|
|
3408
|
-
// @ts-ignore
|
|
3409
3323
|
await invoke('Run And Debug.handleClickSectionWatch');
|
|
3410
3324
|
};
|
|
3411
3325
|
const addWatchExpression = async expression => {
|
|
3412
|
-
// @ts-ignore
|
|
3413
3326
|
await invoke('Run And Debug.addWatchExpression', expression);
|
|
3414
3327
|
};
|
|
3415
3328
|
const handleWatchValueChange = async () => {
|
|
3416
|
-
// @ts-ignore
|
|
3417
3329
|
await invoke('Run And Debug.handleWatchValueChange');
|
|
3418
3330
|
};
|
|
3419
3331
|
const acceptWatchExpressionEdit = async () => {
|
|
3420
|
-
// @ts-ignore
|
|
3421
3332
|
await invoke('Run And Debug.acceptWatchExpressionEdit');
|
|
3422
3333
|
};
|
|
3423
3334
|
const selectIndex$2 = async index => {
|
|
3424
|
-
// @ts-ignore
|
|
3425
3335
|
await invoke('Run And Debug.selectIndex', index);
|
|
3426
3336
|
};
|
|
3427
3337
|
const setPauseOnExceptions = async value => {
|
|
3428
|
-
// @ts-ignore
|
|
3429
3338
|
await invoke('Run And Debug.setPauseOnExceptions', value);
|
|
3430
3339
|
};
|
|
3431
3340
|
const handleRename = async () => {
|
|
3432
|
-
// @ts-ignore
|
|
3433
3341
|
await invoke('Run And Debug.handleRename');
|
|
3434
3342
|
};
|
|
3435
3343
|
const handleSpace = async () => {
|
|
3436
|
-
// @ts-ignore
|
|
3437
3344
|
await invoke('Run And Debug.handleSpace');
|
|
3438
3345
|
};
|
|
3439
3346
|
|
|
@@ -3452,22 +3359,18 @@ const RunAndDebug = {
|
|
|
3452
3359
|
};
|
|
3453
3360
|
|
|
3454
3361
|
const setValue = async value => {
|
|
3455
|
-
// @ts-ignore
|
|
3456
3362
|
await invoke('Search.handleInput', value, Script);
|
|
3457
3363
|
};
|
|
3458
3364
|
const setReplaceValue = async value => {
|
|
3459
|
-
// @ts-ignore
|
|
3460
3365
|
await invoke('Search.handleReplaceInput', value, Script);
|
|
3461
3366
|
};
|
|
3462
3367
|
const setExcludeValue = async value => {
|
|
3463
|
-
// @ts-ignore
|
|
3464
3368
|
await invoke('Search.handleExcludeInput', value, Script);
|
|
3465
3369
|
};
|
|
3466
3370
|
const replaceAll = async () => {
|
|
3467
3371
|
await invoke('Search.replaceAll');
|
|
3468
3372
|
};
|
|
3469
3373
|
const setIncludeValue = async value => {
|
|
3470
|
-
// @ts-ignore
|
|
3471
3374
|
await invoke('Search.handleIncludeInput', value, Script);
|
|
3472
3375
|
};
|
|
3473
3376
|
const clearSearchResults = async () => {
|
|
@@ -3498,7 +3401,6 @@ const handleWheel = async (deltaMode, deltaY) => {
|
|
|
3498
3401
|
await invoke('Search.handleWheel', deltaMode, deltaY);
|
|
3499
3402
|
};
|
|
3500
3403
|
const focusNextPage = async () => {
|
|
3501
|
-
// @ts-ignore
|
|
3502
3404
|
await invoke('Search.focusPage');
|
|
3503
3405
|
};
|
|
3504
3406
|
const focusPreviousPage = async () => {
|
|
@@ -3529,47 +3431,36 @@ const open = async () => {
|
|
|
3529
3431
|
await invoke('SideBar.openViewlet', 'Search');
|
|
3530
3432
|
};
|
|
3531
3433
|
const setLimit = async limit => {
|
|
3532
|
-
// @ts-ignore
|
|
3533
3434
|
await invoke('Search.setLimit', limit);
|
|
3534
3435
|
};
|
|
3535
3436
|
const handleListBlur = async () => {
|
|
3536
|
-
// @ts-ignore
|
|
3537
3437
|
await invoke('Search.handleListBlur');
|
|
3538
3438
|
};
|
|
3539
3439
|
const collapseAll = async () => {
|
|
3540
|
-
// @ts-ignore
|
|
3541
3440
|
await invoke('Search.collapseAll');
|
|
3542
3441
|
};
|
|
3543
3442
|
const copy = async () => {
|
|
3544
|
-
// @ts-ignore
|
|
3545
3443
|
await invoke('Search.copy');
|
|
3546
3444
|
};
|
|
3547
3445
|
const copyPath = async () => {
|
|
3548
|
-
// @ts-ignore
|
|
3549
3446
|
await invoke('Search.copyPath');
|
|
3550
3447
|
};
|
|
3551
3448
|
const handleInputCut = async name => {
|
|
3552
|
-
// @ts-ignore
|
|
3553
3449
|
await invoke('Search.handleInputCut', name);
|
|
3554
3450
|
};
|
|
3555
3451
|
const handleInputPaste = async name => {
|
|
3556
|
-
// @ts-ignore
|
|
3557
3452
|
await invoke('Search.handleInputPaste', name);
|
|
3558
3453
|
};
|
|
3559
3454
|
const handleInputCopy = async name => {
|
|
3560
|
-
// @ts-ignore
|
|
3561
3455
|
await invoke('Search.handleInputCopy', name);
|
|
3562
3456
|
};
|
|
3563
3457
|
const handleInputSelectionChange = async (name, start, end) => {
|
|
3564
|
-
// @ts-ignore
|
|
3565
3458
|
await invoke('Search.handleInputSelectionChange', name, start, end);
|
|
3566
3459
|
};
|
|
3567
3460
|
const handleInputContextMenu = async (name, button, x, y) => {
|
|
3568
|
-
// @ts-ignore
|
|
3569
3461
|
await invoke('Search.handleInputConextMenu', name, button, x, y);
|
|
3570
3462
|
};
|
|
3571
3463
|
const handleContextMenu$2 = async (button, x, y) => {
|
|
3572
|
-
// @ts-ignore
|
|
3573
3464
|
await invoke('Search.handleContextMenu', name, button, x, y);
|
|
3574
3465
|
};
|
|
3575
3466
|
|
|
@@ -3616,19 +3507,15 @@ const show$1 = async () => {
|
|
|
3616
3507
|
return invoke('Main.openUri', 'settings://');
|
|
3617
3508
|
};
|
|
3618
3509
|
const handleInput$1 = async searchValue => {
|
|
3619
|
-
// @ts-ignore
|
|
3620
3510
|
return invoke('Settings.handleInput', searchValue, Script);
|
|
3621
3511
|
};
|
|
3622
3512
|
const usePreviousSearchValue = async () => {
|
|
3623
|
-
// @ts-ignore
|
|
3624
3513
|
return invoke('Settings.usePreviousSearchValue');
|
|
3625
3514
|
};
|
|
3626
3515
|
const useNextSearchValue = async () => {
|
|
3627
|
-
// @ts-ignore
|
|
3628
3516
|
return invoke('Settings.useNextSearchValue');
|
|
3629
3517
|
};
|
|
3630
3518
|
const clear = async searchValue => {
|
|
3631
|
-
// @ts-ignore
|
|
3632
3519
|
return invoke('Settings.clear', searchValue, Script);
|
|
3633
3520
|
};
|
|
3634
3521
|
const clearHistory = async () => {
|
|
@@ -3636,7 +3523,6 @@ const clearHistory = async () => {
|
|
|
3636
3523
|
return invoke('Settings.clearHistory', searchValue, Script);
|
|
3637
3524
|
};
|
|
3638
3525
|
const selectTab = async tabId => {
|
|
3639
|
-
// @ts-ignore
|
|
3640
3526
|
return invoke('Settings.handleClickTab', tabId);
|
|
3641
3527
|
};
|
|
3642
3528
|
const selectWorkspace = async () => {
|
|
@@ -3652,11 +3538,9 @@ const selectWindow = async () => {
|
|
|
3652
3538
|
await selectTab('window');
|
|
3653
3539
|
};
|
|
3654
3540
|
const handleScroll = async scrollTop => {
|
|
3655
|
-
// @ts-ignore
|
|
3656
3541
|
await invoke('Settings.handleScroll', scrollTop, Script);
|
|
3657
3542
|
};
|
|
3658
3543
|
const handleClickFilterButton = async (x, y) => {
|
|
3659
|
-
// @ts-ignore
|
|
3660
3544
|
await invoke('Settings.handleClickFilterButton', x, y);
|
|
3661
3545
|
};
|
|
3662
3546
|
|
|
@@ -3678,14 +3562,12 @@ const SettingsView = {
|
|
|
3678
3562
|
};
|
|
3679
3563
|
|
|
3680
3564
|
const selectIndex = async index => {
|
|
3681
|
-
// @ts-ignore
|
|
3682
3565
|
await invoke('Source Control.selectIndex', index);
|
|
3683
3566
|
};
|
|
3684
3567
|
const acceptInput = async () => {
|
|
3685
3568
|
await invoke('Source Control.acceptInput');
|
|
3686
3569
|
};
|
|
3687
3570
|
const handleInput = async text => {
|
|
3688
|
-
// @ts-ignore
|
|
3689
3571
|
await invoke('Source Control.handleInput', text, Script$1);
|
|
3690
3572
|
};
|
|
3691
3573
|
const handleClickSourceControlButtons = async (index, name) => {
|
|
@@ -3695,7 +3577,6 @@ const handleContextMenu$1 = async (button, x, y) => {
|
|
|
3695
3577
|
await invoke('Source Control.handleContextMenu', button, x, y);
|
|
3696
3578
|
};
|
|
3697
3579
|
const show = async () => {
|
|
3698
|
-
// @ts-ignore
|
|
3699
3580
|
await open$5('Source Control');
|
|
3700
3581
|
};
|
|
3701
3582
|
|
|
@@ -3719,75 +3600,57 @@ const StatusBar = {
|
|
|
3719
3600
|
};
|
|
3720
3601
|
|
|
3721
3602
|
const closeMenu = async () => {
|
|
3722
|
-
// @ts-ignore
|
|
3723
3603
|
await invoke('TitleBar.closeMenu');
|
|
3724
3604
|
};
|
|
3725
3605
|
const focus = async () => {
|
|
3726
|
-
// @ts-ignore
|
|
3727
3606
|
await invoke('TitleBar.focus');
|
|
3728
3607
|
};
|
|
3729
3608
|
const focusFirst = async () => {
|
|
3730
|
-
// @ts-ignore
|
|
3731
3609
|
await invoke('TitleBar.focusFirst');
|
|
3732
3610
|
};
|
|
3733
3611
|
const focusIndex = async index => {
|
|
3734
|
-
// @ts-ignore
|
|
3735
3612
|
await invoke('TitleBar.focusIndex', index);
|
|
3736
3613
|
};
|
|
3737
3614
|
const focusLast = async () => {
|
|
3738
|
-
// @ts-ignore
|
|
3739
3615
|
await invoke('TitleBar.focusLast');
|
|
3740
3616
|
};
|
|
3741
3617
|
const focusNext = async () => {
|
|
3742
|
-
// @ts-ignore
|
|
3743
3618
|
await invoke('TitleBar.focusNext');
|
|
3744
3619
|
};
|
|
3745
3620
|
const focusPrevious = async () => {
|
|
3746
|
-
// @ts-ignore
|
|
3747
3621
|
await invoke('TitleBar.focusPrevious');
|
|
3748
3622
|
};
|
|
3749
3623
|
const handleKeyArrowDown = async () => {
|
|
3750
|
-
// @ts-ignore
|
|
3751
3624
|
await invoke('TitleBar.handleKeyArrowDown');
|
|
3752
3625
|
};
|
|
3753
3626
|
const handleKeyArrowLeft = async () => {
|
|
3754
|
-
// @ts-ignore
|
|
3755
3627
|
await invoke('TitleBar.handleKeyArrowLeft');
|
|
3756
3628
|
};
|
|
3757
3629
|
const handleKeyArrowRight = async () => {
|
|
3758
|
-
// @ts-ignore
|
|
3759
3630
|
await invoke('TitleBar.handleKeyArrowRight');
|
|
3760
3631
|
};
|
|
3761
3632
|
const handleKeyArrowUp = async () => {
|
|
3762
|
-
// @ts-ignore
|
|
3763
3633
|
await invoke('TitleBar.handleKeyArrowUp');
|
|
3764
3634
|
};
|
|
3765
3635
|
const handleKeyEnd = async () => {
|
|
3766
|
-
// @ts-ignore
|
|
3767
3636
|
await invoke('TitleBar.handleKeyEnd');
|
|
3768
3637
|
};
|
|
3769
3638
|
const handleKeyHome = async () => {
|
|
3770
|
-
// @ts-ignore
|
|
3771
3639
|
await invoke('TitleBar.handleKeyHome');
|
|
3772
3640
|
};
|
|
3773
3641
|
const handleKeySpace = async () => {
|
|
3774
|
-
// @ts-ignore
|
|
3775
3642
|
await invoke('TitleBar.handleKeySpace');
|
|
3776
3643
|
};
|
|
3777
3644
|
const handleKeyEscape = async () => {
|
|
3778
|
-
// @ts-ignore
|
|
3779
3645
|
await invoke('TitleBar.handleKeyEscape');
|
|
3780
3646
|
};
|
|
3781
3647
|
const toggleIndex = async index => {
|
|
3782
|
-
// @ts-ignore
|
|
3783
3648
|
await invoke('TitleBar.toggleIndex', index);
|
|
3784
3649
|
};
|
|
3785
3650
|
const toggleMenu = async () => {
|
|
3786
|
-
// @ts-ignore
|
|
3787
3651
|
await invoke('TitleBar.toggleMenu');
|
|
3788
3652
|
};
|
|
3789
3653
|
const handleContextMenu = async (button, x, y) => {
|
|
3790
|
-
// @ts-ignore
|
|
3791
3654
|
await invoke('TitleBar.handleContextMenu', button, x, y);
|
|
3792
3655
|
};
|
|
3793
3656
|
|
|
@@ -3890,7 +3753,8 @@ const fromId = async webViewId => {
|
|
|
3890
3753
|
set(webViewId, rpc);
|
|
3891
3754
|
return {
|
|
3892
3755
|
locator(selector, options) {
|
|
3893
|
-
const baseLocator =
|
|
3756
|
+
const baseLocator = createLocator(selector, options);
|
|
3757
|
+
|
|
3894
3758
|
// @ts-ignore
|
|
3895
3759
|
baseLocator.webViewId = webViewId;
|
|
3896
3760
|
return baseLocator;
|
|
@@ -3956,7 +3820,7 @@ const createApi = (platform, assetDir) => {
|
|
|
3956
3820
|
IframeInspector,
|
|
3957
3821
|
KeyBindingsEditor,
|
|
3958
3822
|
KeyBoard,
|
|
3959
|
-
Locator:
|
|
3823
|
+
Locator: createLocator,
|
|
3960
3824
|
Main,
|
|
3961
3825
|
Output,
|
|
3962
3826
|
Panel,
|
|
@@ -4059,7 +3923,6 @@ const executeTest = async (name, fn, globals = {}) => {
|
|
|
4059
3923
|
// eslint-disable-next-line no-console
|
|
4060
3924
|
console.info(`PASS ${name} in ${formattedDuration}`);
|
|
4061
3925
|
}
|
|
4062
|
-
// @ts-ignore
|
|
4063
3926
|
await invoke('TestFrameWork.showOverlay', type, background, text);
|
|
4064
3927
|
};
|
|
4065
3928
|
|
|
@@ -4117,7 +3980,6 @@ const watchForHotReload = async (platform, href) => {
|
|
|
4117
3980
|
}
|
|
4118
3981
|
const fileUrl = getFileUri(href);
|
|
4119
3982
|
const callbackCommand = 'FileWatcher.handleEvent';
|
|
4120
|
-
// @ts-ignore
|
|
4121
3983
|
await invoke('FileWatcher.watchFile', TestWorker, callbackCommand, fileUrl);
|
|
4122
3984
|
};
|
|
4123
3985
|
|
|
@@ -4145,23 +4007,11 @@ const execute = async (href, platform, assetDir) => {
|
|
|
4145
4007
|
}
|
|
4146
4008
|
if (module.test) {
|
|
4147
4009
|
if (module.skip) {
|
|
4148
|
-
await
|
|
4010
|
+
await skipTest(module.name);
|
|
4149
4011
|
} else {
|
|
4150
4012
|
await executeTest(module.name, module.test, globals);
|
|
4151
4013
|
}
|
|
4152
|
-
} else {
|
|
4153
|
-
const tests = getTests();
|
|
4154
|
-
for (const test of tests) {
|
|
4155
|
-
// @ts-ignore
|
|
4156
|
-
await executeTest(test.name, test.fn);
|
|
4157
|
-
}
|
|
4158
4014
|
}
|
|
4159
|
-
// 3. if import fails, display error message
|
|
4160
|
-
|
|
4161
|
-
// 4. run the test
|
|
4162
|
-
// 5. if test fails, display error message
|
|
4163
|
-
// 6. if test succeeds, display success message
|
|
4164
|
-
|
|
4165
4015
|
// TODO maybe setup file watcher earlier, to not miss events?
|
|
4166
4016
|
|
|
4167
4017
|
push({
|