@lvce-editor/test-worker 10.13.0 → 11.0.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/testWorkerMain.js +455 -440
- package/package.json +1 -1
package/dist/testWorkerMain.js
CHANGED
|
@@ -456,7 +456,7 @@ const getFirstEvent = (eventEmitter, eventMap) => {
|
|
|
456
456
|
return promise;
|
|
457
457
|
};
|
|
458
458
|
const Message$1 = 3;
|
|
459
|
-
const create$5
|
|
459
|
+
const create$5 = async ({
|
|
460
460
|
isMessagePortOpen,
|
|
461
461
|
messagePort
|
|
462
462
|
}) => {
|
|
@@ -507,7 +507,7 @@ const wrap$5 = messagePort => {
|
|
|
507
507
|
};
|
|
508
508
|
const IpcParentWithMessagePort$1 = {
|
|
509
509
|
__proto__: null,
|
|
510
|
-
create: create$5
|
|
510
|
+
create: create$5,
|
|
511
511
|
signal: signal$1,
|
|
512
512
|
wrap: wrap$5
|
|
513
513
|
};
|
|
@@ -713,7 +713,7 @@ const getErrorProperty = (error, prettyError) => {
|
|
|
713
713
|
}
|
|
714
714
|
};
|
|
715
715
|
};
|
|
716
|
-
const create$1$
|
|
716
|
+
const create$1$2 = (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$2(id, errorProperty);
|
|
728
728
|
};
|
|
729
729
|
const create$3 = (message, result) => {
|
|
730
730
|
return {
|
|
@@ -849,14 +849,14 @@ const execute$2 = (command, ...args) => {
|
|
|
849
849
|
};
|
|
850
850
|
|
|
851
851
|
const Two = '2.0';
|
|
852
|
-
const create$
|
|
852
|
+
const create$s = (method, params) => {
|
|
853
853
|
return {
|
|
854
854
|
jsonrpc: Two,
|
|
855
855
|
method,
|
|
856
856
|
params
|
|
857
857
|
};
|
|
858
858
|
};
|
|
859
|
-
const create$
|
|
859
|
+
const create$r = (id, method, params) => {
|
|
860
860
|
const message = {
|
|
861
861
|
id,
|
|
862
862
|
jsonrpc: Two,
|
|
@@ -866,14 +866,14 @@ const create$o = (id, method, params) => {
|
|
|
866
866
|
return message;
|
|
867
867
|
};
|
|
868
868
|
let id = 0;
|
|
869
|
-
const create$
|
|
869
|
+
const create$q = () => {
|
|
870
870
|
return ++id;
|
|
871
871
|
};
|
|
872
872
|
|
|
873
873
|
/* eslint-disable n/no-unsupported-features/es-syntax */
|
|
874
874
|
|
|
875
875
|
const registerPromise = map => {
|
|
876
|
-
const id = create$
|
|
876
|
+
const id = create$q();
|
|
877
877
|
const {
|
|
878
878
|
promise,
|
|
879
879
|
resolve
|
|
@@ -891,7 +891,7 @@ const invokeHelper = async (callbacks, ipc, method, params, useSendAndTransfer)
|
|
|
891
891
|
id,
|
|
892
892
|
promise
|
|
893
893
|
} = registerPromise(callbacks);
|
|
894
|
-
const message = create$
|
|
894
|
+
const message = create$r(id, method, params);
|
|
895
895
|
if (useSendAndTransfer && ipc.sendAndTransfer) {
|
|
896
896
|
ipc.sendAndTransfer(message);
|
|
897
897
|
} else {
|
|
@@ -927,7 +927,7 @@ const createRpc = ipc => {
|
|
|
927
927
|
* @deprecated
|
|
928
928
|
*/
|
|
929
929
|
send(method, ...params) {
|
|
930
|
-
const message = create$
|
|
930
|
+
const message = create$s(method, params);
|
|
931
931
|
ipc.send(message);
|
|
932
932
|
}
|
|
933
933
|
};
|
|
@@ -963,7 +963,54 @@ const listen$1 = async (module, options) => {
|
|
|
963
963
|
const ipc = module.wrap(rawIpc);
|
|
964
964
|
return ipc;
|
|
965
965
|
};
|
|
966
|
-
|
|
966
|
+
|
|
967
|
+
/* eslint-disable @typescript-eslint/no-misused-promises */
|
|
968
|
+
|
|
969
|
+
const createSharedLazyRpc = factory => {
|
|
970
|
+
let rpcPromise;
|
|
971
|
+
const getOrCreate = () => {
|
|
972
|
+
if (!rpcPromise) {
|
|
973
|
+
rpcPromise = factory();
|
|
974
|
+
}
|
|
975
|
+
return rpcPromise;
|
|
976
|
+
};
|
|
977
|
+
return {
|
|
978
|
+
async dispose() {
|
|
979
|
+
const rpc = await getOrCreate();
|
|
980
|
+
await rpc.dispose();
|
|
981
|
+
},
|
|
982
|
+
async invoke(method, ...params) {
|
|
983
|
+
const rpc = await getOrCreate();
|
|
984
|
+
return rpc.invoke(method, ...params);
|
|
985
|
+
},
|
|
986
|
+
async invokeAndTransfer(method, ...params) {
|
|
987
|
+
const rpc = await getOrCreate();
|
|
988
|
+
return rpc.invokeAndTransfer(method, ...params);
|
|
989
|
+
},
|
|
990
|
+
async send(method, ...params) {
|
|
991
|
+
const rpc = await getOrCreate();
|
|
992
|
+
rpc.send(method, ...params);
|
|
993
|
+
}
|
|
994
|
+
};
|
|
995
|
+
};
|
|
996
|
+
const create$i = async ({
|
|
997
|
+
commandMap,
|
|
998
|
+
isMessagePortOpen,
|
|
999
|
+
send
|
|
1000
|
+
}) => {
|
|
1001
|
+
return createSharedLazyRpc(() => {
|
|
1002
|
+
return create$2({
|
|
1003
|
+
commandMap,
|
|
1004
|
+
isMessagePortOpen,
|
|
1005
|
+
send
|
|
1006
|
+
});
|
|
1007
|
+
});
|
|
1008
|
+
};
|
|
1009
|
+
const LazyTransferMessagePortRpcParent = {
|
|
1010
|
+
__proto__: null,
|
|
1011
|
+
create: create$i
|
|
1012
|
+
};
|
|
1013
|
+
const create$d = async ({
|
|
967
1014
|
commandMap,
|
|
968
1015
|
isMessagePortOpen,
|
|
969
1016
|
messagePort
|
|
@@ -981,9 +1028,9 @@ const create$g = async ({
|
|
|
981
1028
|
};
|
|
982
1029
|
const MessagePortRpcParent = {
|
|
983
1030
|
__proto__: null,
|
|
984
|
-
create: create$
|
|
1031
|
+
create: create$d
|
|
985
1032
|
};
|
|
986
|
-
const create$
|
|
1033
|
+
const create$4 = async ({
|
|
987
1034
|
commandMap,
|
|
988
1035
|
isMessagePortOpen = true,
|
|
989
1036
|
messagePort
|
|
@@ -1000,7 +1047,7 @@ const create$7 = async ({
|
|
|
1000
1047
|
messagePort.start();
|
|
1001
1048
|
return rpc;
|
|
1002
1049
|
};
|
|
1003
|
-
const create$
|
|
1050
|
+
const create$2 = async ({
|
|
1004
1051
|
commandMap,
|
|
1005
1052
|
isMessagePortOpen,
|
|
1006
1053
|
send
|
|
@@ -1010,17 +1057,13 @@ const create$5 = async ({
|
|
|
1010
1057
|
port2
|
|
1011
1058
|
} = new MessageChannel();
|
|
1012
1059
|
await send(port1);
|
|
1013
|
-
return create$
|
|
1060
|
+
return create$4({
|
|
1014
1061
|
commandMap,
|
|
1015
1062
|
isMessagePortOpen,
|
|
1016
1063
|
messagePort: port2
|
|
1017
1064
|
});
|
|
1018
1065
|
};
|
|
1019
|
-
const
|
|
1020
|
-
__proto__: null,
|
|
1021
|
-
create: create$5
|
|
1022
|
-
};
|
|
1023
|
-
const create$2 = async ({
|
|
1066
|
+
const create$1$1 = async ({
|
|
1024
1067
|
commandMap
|
|
1025
1068
|
}) => {
|
|
1026
1069
|
// TODO create a commandMap per rpc instance
|
|
@@ -1032,7 +1075,7 @@ const create$2 = async ({
|
|
|
1032
1075
|
};
|
|
1033
1076
|
const WebWorkerRpcClient = {
|
|
1034
1077
|
__proto__: null,
|
|
1035
|
-
create: create$
|
|
1078
|
+
create: create$1$1
|
|
1036
1079
|
};
|
|
1037
1080
|
|
|
1038
1081
|
const Directory = 3;
|
|
@@ -1047,7 +1090,7 @@ const RendererWorker = 1;
|
|
|
1047
1090
|
const TestWorker = 9001;
|
|
1048
1091
|
|
|
1049
1092
|
const rpcs = Object.create(null);
|
|
1050
|
-
const set$
|
|
1093
|
+
const set$3 = (id, rpc) => {
|
|
1051
1094
|
rpcs[id] = rpc;
|
|
1052
1095
|
};
|
|
1053
1096
|
const get$1 = id => {
|
|
@@ -1073,13 +1116,18 @@ const create$1 = rpcId => {
|
|
|
1073
1116
|
return rpc.invokeAndTransfer(method, ...params);
|
|
1074
1117
|
},
|
|
1075
1118
|
set(rpc) {
|
|
1076
|
-
set$
|
|
1119
|
+
set$3(rpcId, rpc);
|
|
1077
1120
|
}
|
|
1078
1121
|
};
|
|
1079
1122
|
};
|
|
1080
1123
|
|
|
1081
1124
|
const {
|
|
1082
1125
|
invoke: invoke$1,
|
|
1126
|
+
set: set$2
|
|
1127
|
+
} = create$1(EditorWorker);
|
|
1128
|
+
|
|
1129
|
+
const {
|
|
1130
|
+
invoke,
|
|
1083
1131
|
invokeAndTransfer,
|
|
1084
1132
|
set: set$1
|
|
1085
1133
|
} = create$1(RendererWorker);
|
|
@@ -1089,37 +1137,18 @@ const sendMessagePortToEditorWorker = async (port, rpcId) => {
|
|
|
1089
1137
|
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToEditorWorker', port, command, rpcId);
|
|
1090
1138
|
};
|
|
1091
1139
|
const getPreference = async key => {
|
|
1092
|
-
return await invoke
|
|
1140
|
+
return await invoke('Preferences.get', key);
|
|
1093
1141
|
};
|
|
1094
1142
|
|
|
1095
|
-
const
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
rpcPromise = createRpc();
|
|
1105
|
-
}
|
|
1106
|
-
await rpcPromise;
|
|
1107
|
-
};
|
|
1108
|
-
return {
|
|
1109
|
-
async invoke(method, ...params) {
|
|
1110
|
-
await ensureRpc();
|
|
1111
|
-
const rpc = get$1(rpcId);
|
|
1112
|
-
return rpc.invoke(method, ...params);
|
|
1113
|
-
},
|
|
1114
|
-
async invokeAndTransfer(method, ...params) {
|
|
1115
|
-
await ensureRpc();
|
|
1116
|
-
const rpc = get$1(rpcId);
|
|
1117
|
-
return rpc.invokeAndTransfer(method, ...params);
|
|
1118
|
-
},
|
|
1119
|
-
setFactory(value) {
|
|
1120
|
-
factory = value;
|
|
1121
|
-
}
|
|
1122
|
-
};
|
|
1143
|
+
const send = async port => {
|
|
1144
|
+
await sendMessagePortToEditorWorker(port, TestWorker);
|
|
1145
|
+
};
|
|
1146
|
+
const initializeEditorWorker = async () => {
|
|
1147
|
+
const rpc = await LazyTransferMessagePortRpcParent.create({
|
|
1148
|
+
commandMap: {},
|
|
1149
|
+
send
|
|
1150
|
+
});
|
|
1151
|
+
set$2(rpc);
|
|
1123
1152
|
};
|
|
1124
1153
|
|
|
1125
1154
|
/* eslint-disable no-console */
|
|
@@ -1155,7 +1184,7 @@ const getLocatorInvoke = locator => {
|
|
|
1155
1184
|
return module.invoke;
|
|
1156
1185
|
}
|
|
1157
1186
|
// @ts-ignore
|
|
1158
|
-
return invoke
|
|
1187
|
+
return invoke;
|
|
1159
1188
|
};
|
|
1160
1189
|
|
|
1161
1190
|
const locatorInvoke = async (locator, method, ...params) => {
|
|
@@ -1571,29 +1600,29 @@ test.skip = async id => {
|
|
|
1571
1600
|
const background = 'yellow';
|
|
1572
1601
|
const text = `test skipped ${id}`;
|
|
1573
1602
|
// @ts-ignore
|
|
1574
|
-
await invoke
|
|
1603
|
+
await invoke('TestFrameWork.showOverlay', state, background, text);
|
|
1575
1604
|
};
|
|
1576
1605
|
const {
|
|
1577
1606
|
expect
|
|
1578
1607
|
} = Expect$1;
|
|
1579
1608
|
|
|
1580
1609
|
const show$6 = async () => {
|
|
1581
|
-
return invoke
|
|
1610
|
+
return invoke('About.showAbout');
|
|
1582
1611
|
};
|
|
1583
1612
|
const handleClickOk = async () => {
|
|
1584
|
-
return invoke
|
|
1613
|
+
return invoke('About.handleClickOk');
|
|
1585
1614
|
};
|
|
1586
1615
|
const handleClickClose = async () => {
|
|
1587
|
-
return invoke
|
|
1616
|
+
return invoke('About.handleClickClose');
|
|
1588
1617
|
};
|
|
1589
1618
|
const handleClickCopy = async () => {
|
|
1590
|
-
return invoke
|
|
1619
|
+
return invoke('About.handleClickCopy');
|
|
1591
1620
|
};
|
|
1592
1621
|
const focusNext$9 = async () => {
|
|
1593
|
-
return invoke
|
|
1622
|
+
return invoke('About.focusNext');
|
|
1594
1623
|
};
|
|
1595
1624
|
const focusPrevious$8 = async () => {
|
|
1596
|
-
return invoke
|
|
1625
|
+
return invoke('About.focusPrevious');
|
|
1597
1626
|
};
|
|
1598
1627
|
|
|
1599
1628
|
const About = {
|
|
@@ -1607,28 +1636,28 @@ const About = {
|
|
|
1607
1636
|
};
|
|
1608
1637
|
|
|
1609
1638
|
const focus$2 = async () => {
|
|
1610
|
-
await invoke
|
|
1639
|
+
await invoke('ActivityBar.focus');
|
|
1611
1640
|
};
|
|
1612
1641
|
const focusFirst$7 = async () => {
|
|
1613
|
-
await invoke
|
|
1642
|
+
await invoke('ActivityBar.focusFirst');
|
|
1614
1643
|
};
|
|
1615
1644
|
const focusLast$6 = async () => {
|
|
1616
|
-
await invoke
|
|
1645
|
+
await invoke('ActivityBar.focusLast');
|
|
1617
1646
|
};
|
|
1618
1647
|
const focusNext$8 = async () => {
|
|
1619
|
-
await invoke
|
|
1648
|
+
await invoke('ActivityBar.focusNext');
|
|
1620
1649
|
};
|
|
1621
1650
|
const focusPrevious$7 = async () => {
|
|
1622
|
-
await invoke
|
|
1651
|
+
await invoke('ActivityBar.focusPrevious');
|
|
1623
1652
|
};
|
|
1624
1653
|
const handleClick$3 = async index => {
|
|
1625
|
-
await invoke
|
|
1654
|
+
await invoke('ActivityBar.handleClick', index);
|
|
1626
1655
|
};
|
|
1627
1656
|
const handleContextMenu$5 = async () => {
|
|
1628
|
-
await invoke
|
|
1657
|
+
await invoke('ActivityBar.handleContextMenu');
|
|
1629
1658
|
};
|
|
1630
1659
|
const selectCurrent = async () => {
|
|
1631
|
-
await invoke
|
|
1660
|
+
await invoke('ActivityBar.selectCurrent');
|
|
1632
1661
|
};
|
|
1633
1662
|
|
|
1634
1663
|
const ActivityBar = {
|
|
@@ -1644,19 +1673,19 @@ const ActivityBar = {
|
|
|
1644
1673
|
};
|
|
1645
1674
|
|
|
1646
1675
|
const readNativeFiles = async () => {
|
|
1647
|
-
await invoke
|
|
1676
|
+
await invoke('ClipBoard.readNativeFiles');
|
|
1648
1677
|
};
|
|
1649
1678
|
const writeNativeFiles = async uris => {
|
|
1650
1679
|
// @ts-ignore
|
|
1651
|
-
await invoke
|
|
1680
|
+
await invoke('ClipBoard.writeNativeFiles', uris);
|
|
1652
1681
|
};
|
|
1653
1682
|
const enableMemoryClipBoard = async () => {
|
|
1654
1683
|
// @ts-ignore
|
|
1655
|
-
await invoke
|
|
1684
|
+
await invoke('ClipBoard.enableMemoryClipBoard');
|
|
1656
1685
|
};
|
|
1657
1686
|
const disableMemoryClipBoard = async () => {
|
|
1658
1687
|
// @ts-ignore
|
|
1659
|
-
await invoke
|
|
1688
|
+
await invoke('ClipBoard.disableMemoryClipBoard');
|
|
1660
1689
|
};
|
|
1661
1690
|
const matchesExpectedText = (actualText, expectedText) => {
|
|
1662
1691
|
if (typeof expectedText === 'string') {
|
|
@@ -1666,14 +1695,14 @@ const matchesExpectedText = (actualText, expectedText) => {
|
|
|
1666
1695
|
};
|
|
1667
1696
|
const shouldHaveText$1 = async expectedText => {
|
|
1668
1697
|
// @ts-ignore
|
|
1669
|
-
const actualText = await invoke
|
|
1698
|
+
const actualText = await invoke('ClipBoard.readMemoryText');
|
|
1670
1699
|
if (!matchesExpectedText(actualText, expectedText)) {
|
|
1671
1700
|
throw new AssertionError(`expected clipboard to have text "${expectedText}" but was "${actualText}"`);
|
|
1672
1701
|
}
|
|
1673
1702
|
};
|
|
1674
1703
|
const writeText = async text => {
|
|
1675
1704
|
// @ts-ignore
|
|
1676
|
-
await invoke
|
|
1705
|
+
await invoke('ClipBoard.writeText', text);
|
|
1677
1706
|
};
|
|
1678
1707
|
|
|
1679
1708
|
const ClipBoard = {
|
|
@@ -1687,7 +1716,7 @@ const ClipBoard = {
|
|
|
1687
1716
|
};
|
|
1688
1717
|
|
|
1689
1718
|
const setRelativeX = async x => {
|
|
1690
|
-
await invoke
|
|
1719
|
+
await invoke('ColorPicker.setRelativeX', x);
|
|
1691
1720
|
};
|
|
1692
1721
|
|
|
1693
1722
|
const ColorPicker = {
|
|
@@ -1697,7 +1726,7 @@ const ColorPicker = {
|
|
|
1697
1726
|
|
|
1698
1727
|
const execute$1 = async (id, ...args) => {
|
|
1699
1728
|
// @ts-ignore
|
|
1700
|
-
return invoke
|
|
1729
|
+
return invoke(id, ...args);
|
|
1701
1730
|
};
|
|
1702
1731
|
|
|
1703
1732
|
const Command = {
|
|
@@ -1706,7 +1735,7 @@ const Command = {
|
|
|
1706
1735
|
};
|
|
1707
1736
|
|
|
1708
1737
|
const selectItem$1 = async text => {
|
|
1709
|
-
await invoke
|
|
1738
|
+
await invoke('Menu.selectItem', text);
|
|
1710
1739
|
};
|
|
1711
1740
|
|
|
1712
1741
|
const ContextMenu = {
|
|
@@ -1716,35 +1745,35 @@ const ContextMenu = {
|
|
|
1716
1745
|
|
|
1717
1746
|
const openIframeInspector = async () => {
|
|
1718
1747
|
// @ts-ignore
|
|
1719
|
-
return invoke
|
|
1748
|
+
return invoke('Developer.openIframeInspector');
|
|
1720
1749
|
};
|
|
1721
1750
|
const openCacheFolder = async () => {
|
|
1722
1751
|
// @ts-ignore
|
|
1723
|
-
return invoke
|
|
1752
|
+
return invoke('Developer.openCacheFolder');
|
|
1724
1753
|
};
|
|
1725
1754
|
const openConfigFolder = async () => {
|
|
1726
1755
|
// @ts-ignore
|
|
1727
|
-
return invoke
|
|
1756
|
+
return invoke('Developer.openConfigFolder');
|
|
1728
1757
|
};
|
|
1729
1758
|
const openLogsFolder = async () => {
|
|
1730
1759
|
// @ts-ignore
|
|
1731
|
-
return invoke
|
|
1760
|
+
return invoke('Developer.openLogsFolder');
|
|
1732
1761
|
};
|
|
1733
1762
|
const openProcessExplorer = async () => {
|
|
1734
1763
|
// @ts-ignore
|
|
1735
|
-
return invoke
|
|
1764
|
+
return invoke('Developer.openProcessExplorer');
|
|
1736
1765
|
};
|
|
1737
1766
|
const reloadColorTheme = async () => {
|
|
1738
1767
|
// @ts-ignore
|
|
1739
|
-
return invoke
|
|
1768
|
+
return invoke('Developer.reloadColorTheme');
|
|
1740
1769
|
};
|
|
1741
1770
|
const reloadIconTheme = async () => {
|
|
1742
1771
|
// @ts-ignore
|
|
1743
|
-
return invoke
|
|
1772
|
+
return invoke('Developer.reloadIconTheme');
|
|
1744
1773
|
};
|
|
1745
1774
|
const toggleDeveloperTools = async () => {
|
|
1746
1775
|
// @ts-ignore
|
|
1747
|
-
return invoke
|
|
1776
|
+
return invoke('Developer.toggleDeveloperTools');
|
|
1748
1777
|
};
|
|
1749
1778
|
|
|
1750
1779
|
const Developer = {
|
|
@@ -1776,17 +1805,17 @@ const executeMock$1 = (id, ...args) => {
|
|
|
1776
1805
|
|
|
1777
1806
|
const showSaveFilePicker = async () => {
|
|
1778
1807
|
// @ts-ignore
|
|
1779
|
-
await invoke
|
|
1808
|
+
await invoke('FilePicker.showSaveFilePicker');
|
|
1780
1809
|
};
|
|
1781
1810
|
const mockSaveFilePicker = async fn => {
|
|
1782
1811
|
const id = registerMock(fn);
|
|
1783
1812
|
// @ts-ignore
|
|
1784
|
-
await invoke
|
|
1813
|
+
await invoke('FilePicker.mockSaveFilePicker', id);
|
|
1785
1814
|
};
|
|
1786
1815
|
const mockConfirm = async fn => {
|
|
1787
1816
|
const id = registerMock(fn);
|
|
1788
1817
|
// @ts-ignore
|
|
1789
|
-
await invoke
|
|
1818
|
+
await invoke('ConfirmPrompt.mock', id);
|
|
1790
1819
|
};
|
|
1791
1820
|
const executeMock = (id, ...args) => {
|
|
1792
1821
|
return executeMock$1(id, ...args);
|
|
@@ -1828,14 +1857,8 @@ const areSelectionsEqual = (a, b) => {
|
|
|
1828
1857
|
return true;
|
|
1829
1858
|
};
|
|
1830
1859
|
|
|
1831
|
-
const lazyRpc = createLazyRpc(EditorWorker);
|
|
1832
|
-
const {
|
|
1833
|
-
invoke,
|
|
1834
|
-
setFactory
|
|
1835
|
-
} = lazyRpc;
|
|
1836
|
-
|
|
1837
1860
|
const getEditorKey = async () => {
|
|
1838
|
-
const keys = await invoke('Editor.getKeys');
|
|
1861
|
+
const keys = await invoke$1('Editor.getKeys');
|
|
1839
1862
|
if (keys.length === 0) {
|
|
1840
1863
|
throw new Error(`no editor found`);
|
|
1841
1864
|
}
|
|
@@ -1848,17 +1871,17 @@ const Script = 2;
|
|
|
1848
1871
|
|
|
1849
1872
|
const update$1 = settings => {
|
|
1850
1873
|
// @ts-ignore
|
|
1851
|
-
return invoke
|
|
1874
|
+
return invoke('Preferences.update', settings);
|
|
1852
1875
|
};
|
|
1853
1876
|
const enableDiagnostics$1 = () => {
|
|
1854
1877
|
// @ts-ignore
|
|
1855
|
-
return invoke
|
|
1878
|
+
return invoke('Preferences.update', {
|
|
1856
1879
|
'editor.diagnostics': true
|
|
1857
1880
|
});
|
|
1858
1881
|
};
|
|
1859
1882
|
const disableDiagnostics$1 = () => {
|
|
1860
1883
|
// @ts-ignore
|
|
1861
|
-
return invoke
|
|
1884
|
+
return invoke('Preferences.update', {
|
|
1862
1885
|
'editor.diagnostics': false
|
|
1863
1886
|
});
|
|
1864
1887
|
};
|
|
@@ -1871,211 +1894,211 @@ const Settings = {
|
|
|
1871
1894
|
};
|
|
1872
1895
|
|
|
1873
1896
|
const setCursor = async (rowIndex, columnIndex) => {
|
|
1874
|
-
await invoke
|
|
1897
|
+
await invoke('Editor.cursorSet', rowIndex, columnIndex);
|
|
1875
1898
|
};
|
|
1876
1899
|
const openCompletion = async () => {
|
|
1877
|
-
await invoke
|
|
1900
|
+
await invoke('Editor.openCompletion');
|
|
1878
1901
|
};
|
|
1879
1902
|
const closeCompletion = async () => {
|
|
1880
1903
|
// @ts-ignore
|
|
1881
|
-
await invoke
|
|
1904
|
+
await invoke('EditorCompletion.close');
|
|
1882
1905
|
};
|
|
1883
1906
|
const openEditorContextMenu = async () => {
|
|
1884
|
-
await invoke
|
|
1907
|
+
await invoke('Editor.handleContextMenu', 0, 0);
|
|
1885
1908
|
};
|
|
1886
1909
|
const invokeTabCompletion = async () => {
|
|
1887
|
-
await invoke
|
|
1910
|
+
await invoke('Editor.tabCompletion');
|
|
1888
1911
|
};
|
|
1889
1912
|
const executeTabCompletion = async () => {
|
|
1890
|
-
await invoke
|
|
1913
|
+
await invoke('Editor.tabCompletion');
|
|
1891
1914
|
};
|
|
1892
1915
|
const invokeBraceCompletion = async text => {
|
|
1893
|
-
await invoke
|
|
1916
|
+
await invoke('Editor.braceCompletion', text);
|
|
1894
1917
|
};
|
|
1895
1918
|
const cursorCharacterRight = async () => {
|
|
1896
|
-
await invoke
|
|
1919
|
+
await invoke('Editor.cursorCharacterRight');
|
|
1897
1920
|
};
|
|
1898
1921
|
const cursorCharacterLeft = async () => {
|
|
1899
|
-
await invoke
|
|
1922
|
+
await invoke('Editor.cursorCharacterLeft');
|
|
1900
1923
|
};
|
|
1901
1924
|
const copyLineDown = async () => {
|
|
1902
|
-
await invoke
|
|
1925
|
+
await invoke('Editor.copyLineDown');
|
|
1903
1926
|
};
|
|
1904
1927
|
const cursorDown = async () => {
|
|
1905
|
-
await invoke
|
|
1928
|
+
await invoke('Editor.cursorDown');
|
|
1906
1929
|
};
|
|
1907
1930
|
const cursorUp = async () => {
|
|
1908
|
-
await invoke
|
|
1931
|
+
await invoke('Editor.cursorUp');
|
|
1909
1932
|
};
|
|
1910
1933
|
const cursorWordLeft = async () => {
|
|
1911
|
-
await invoke
|
|
1934
|
+
await invoke('Editor.cursorWordLeft');
|
|
1912
1935
|
};
|
|
1913
1936
|
const cursorWordRight = async () => {
|
|
1914
|
-
await invoke
|
|
1937
|
+
await invoke('Editor.cursorWordRight');
|
|
1915
1938
|
};
|
|
1916
1939
|
const goToDefinition = async () => {
|
|
1917
|
-
await invoke
|
|
1940
|
+
await invoke('Editor.goToDefinition');
|
|
1918
1941
|
};
|
|
1919
1942
|
const openHover = async () => {
|
|
1920
|
-
await invoke
|
|
1943
|
+
await invoke('Editor.showHover2');
|
|
1921
1944
|
};
|
|
1922
1945
|
const goToTypeDefinition = async () => {
|
|
1923
|
-
await invoke
|
|
1946
|
+
await invoke('Editor.goToTypeDefinition');
|
|
1924
1947
|
};
|
|
1925
1948
|
const type = async text => {
|
|
1926
|
-
await invoke
|
|
1949
|
+
await invoke('Editor.type', text);
|
|
1927
1950
|
};
|
|
1928
1951
|
const findAllReferences = async () => {
|
|
1929
1952
|
// @ts-ignore
|
|
1930
|
-
await invoke
|
|
1953
|
+
await invoke('SideBar.show', 'References', /* focus */true);
|
|
1931
1954
|
};
|
|
1932
1955
|
const findAllImplementations = async () => {
|
|
1933
1956
|
// @ts-ignore
|
|
1934
|
-
await invoke
|
|
1957
|
+
await invoke('SideBar.show', 'Implementations', /* focus */true);
|
|
1935
1958
|
};
|
|
1936
1959
|
const setSelections = async selections => {
|
|
1937
|
-
await invoke
|
|
1960
|
+
await invoke('Editor.setSelections', selections);
|
|
1938
1961
|
};
|
|
1939
1962
|
const openFindWidget = async () => {
|
|
1940
|
-
await invoke
|
|
1963
|
+
await invoke('Editor.openFind');
|
|
1941
1964
|
};
|
|
1942
1965
|
const setDeltaY = async deltaY => {
|
|
1943
|
-
await invoke
|
|
1966
|
+
await invoke('Editor.setDeltaY', deltaY);
|
|
1944
1967
|
};
|
|
1945
1968
|
const format = async () => {
|
|
1946
|
-
await invoke
|
|
1969
|
+
await invoke('Editor.format');
|
|
1947
1970
|
};
|
|
1948
1971
|
const insertLineBreak = async () => {
|
|
1949
|
-
await invoke
|
|
1972
|
+
await invoke('Editor.insertLineBreak');
|
|
1950
1973
|
};
|
|
1951
1974
|
const openSourceActions = async () => {
|
|
1952
|
-
await invoke
|
|
1975
|
+
await invoke('Editor.showSourceActions2');
|
|
1953
1976
|
};
|
|
1954
1977
|
const sourceActionsSelectCurrent = async () => {
|
|
1955
|
-
await invoke
|
|
1978
|
+
await invoke('EditorSourceActions.selectCurrent');
|
|
1956
1979
|
};
|
|
1957
1980
|
const openCompletionDetails = async () => {
|
|
1958
|
-
await invoke
|
|
1981
|
+
await invoke('EditorCompletion.openDetails');
|
|
1959
1982
|
};
|
|
1960
1983
|
const closeCompletionDetails = async () => {
|
|
1961
1984
|
// @ts-ignore
|
|
1962
|
-
await invoke
|
|
1985
|
+
await invoke('EditorCompletion.closeDetails');
|
|
1963
1986
|
};
|
|
1964
1987
|
const toggleCompletionDetails = async () => {
|
|
1965
1988
|
// @ts-ignore
|
|
1966
|
-
await invoke
|
|
1989
|
+
await invoke('EditorCompletion.toggleDetails');
|
|
1967
1990
|
};
|
|
1968
1991
|
const organizeImports = async () => {
|
|
1969
|
-
await invoke
|
|
1992
|
+
await invoke('Editor.organizeImports');
|
|
1970
1993
|
};
|
|
1971
1994
|
const addAllMissingImports = async () => {
|
|
1972
|
-
await invoke
|
|
1995
|
+
await invoke('Editor.addAllMissingImports');
|
|
1973
1996
|
};
|
|
1974
1997
|
const sortImports = async () => {
|
|
1975
|
-
await invoke
|
|
1998
|
+
await invoke('Editor.sortImports');
|
|
1976
1999
|
};
|
|
1977
2000
|
const toggleLineComment = async () => {
|
|
1978
|
-
await invoke
|
|
2001
|
+
await invoke('Editor.toggleLineComment');
|
|
1979
2002
|
};
|
|
1980
2003
|
const toggleBlockComment = async () => {
|
|
1981
|
-
await invoke
|
|
2004
|
+
await invoke('Editor.toggleBlockComment');
|
|
1982
2005
|
};
|
|
1983
2006
|
const selectAll$1 = async () => {
|
|
1984
|
-
await invoke
|
|
2007
|
+
await invoke('Editor.toggleBlockComment');
|
|
1985
2008
|
};
|
|
1986
2009
|
const openColorPicker = async () => {
|
|
1987
|
-
await invoke
|
|
2010
|
+
await invoke('Editor.openColorPicker');
|
|
1988
2011
|
};
|
|
1989
2012
|
const openFind = async () => {
|
|
1990
2013
|
// @ts-ignore
|
|
1991
|
-
await invoke
|
|
2014
|
+
await invoke('Editor.openFind2');
|
|
1992
2015
|
};
|
|
1993
2016
|
const deleteAllLeft = async () => {
|
|
1994
|
-
await invoke
|
|
2017
|
+
await invoke('Editor.deleteAllLeft');
|
|
1995
2018
|
};
|
|
1996
2019
|
const deleteAllRight = async () => {
|
|
1997
|
-
await invoke
|
|
2020
|
+
await invoke('Editor.deleteAllRight');
|
|
1998
2021
|
};
|
|
1999
2022
|
const cursorWordPartLeft = async () => {
|
|
2000
|
-
await invoke
|
|
2023
|
+
await invoke('Editor.cursorWordPartLeft');
|
|
2001
2024
|
};
|
|
2002
2025
|
const cursorWordPartRight = async () => {
|
|
2003
|
-
await invoke
|
|
2026
|
+
await invoke('Editor.cursorWordPartRight');
|
|
2004
2027
|
};
|
|
2005
2028
|
const cursorEnd = async () => {
|
|
2006
|
-
await invoke
|
|
2029
|
+
await invoke('Editor.cursorEnd');
|
|
2007
2030
|
};
|
|
2008
2031
|
const cursorHome = async () => {
|
|
2009
|
-
await invoke
|
|
2032
|
+
await invoke('Editor.cursorHome');
|
|
2010
2033
|
};
|
|
2011
2034
|
const copyLineUp = async () => {
|
|
2012
|
-
await invoke
|
|
2035
|
+
await invoke('Editor.copyLineUp');
|
|
2013
2036
|
};
|
|
2014
2037
|
const copy$1 = async () => {
|
|
2015
|
-
await invoke
|
|
2038
|
+
await invoke('Editor.copy');
|
|
2016
2039
|
};
|
|
2017
2040
|
const closeColorPicker = async () => {
|
|
2018
|
-
await invoke
|
|
2041
|
+
await invoke('Editor.closeColorPicker');
|
|
2019
2042
|
};
|
|
2020
2043
|
const openContextMenu$1 = async () => {
|
|
2021
2044
|
const button = 0;
|
|
2022
2045
|
const x = 0;
|
|
2023
2046
|
const y = 0;
|
|
2024
|
-
await invoke
|
|
2047
|
+
await invoke('Editor.contextMenu', button, x, y);
|
|
2025
2048
|
};
|
|
2026
2049
|
const getText = async () => {
|
|
2027
|
-
return invoke
|
|
2050
|
+
return invoke('Editor.getText');
|
|
2028
2051
|
};
|
|
2029
2052
|
const rename$1 = async () => {
|
|
2030
|
-
await invoke
|
|
2053
|
+
await invoke('Editor.rename');
|
|
2031
2054
|
};
|
|
2032
2055
|
const showHover = async () => {
|
|
2033
|
-
await invoke
|
|
2056
|
+
await invoke('Editor.showHover2');
|
|
2034
2057
|
};
|
|
2035
2058
|
const openRename = async () => {
|
|
2036
|
-
await invoke
|
|
2059
|
+
await invoke('Editor.openRename');
|
|
2037
2060
|
};
|
|
2038
2061
|
const rename2 = async newName => {
|
|
2039
2062
|
await openRename();
|
|
2040
2063
|
// @ts-ignore
|
|
2041
|
-
await invoke
|
|
2064
|
+
await invoke('EditorRename.handleInput', newName, Script);
|
|
2042
2065
|
// @ts-ignore
|
|
2043
|
-
await invoke
|
|
2066
|
+
await invoke('EditorRename.accept');
|
|
2044
2067
|
};
|
|
2045
2068
|
const growSelection = async () => {
|
|
2046
2069
|
// @ts-ignore
|
|
2047
|
-
await invoke
|
|
2070
|
+
await invoke('Editor.selectionGrow');
|
|
2048
2071
|
};
|
|
2049
2072
|
const getSelections = async () => {
|
|
2050
2073
|
const key = await getEditorKey();
|
|
2051
2074
|
// @ts-ignore
|
|
2052
|
-
return invoke('Editor.getSelections', key);
|
|
2075
|
+
return invoke$1('Editor.getSelections', key);
|
|
2053
2076
|
};
|
|
2054
2077
|
const shouldHaveText = async expectedText => {
|
|
2055
2078
|
const key = await getEditorKey();
|
|
2056
|
-
const text = await invoke('Editor.getText', key);
|
|
2079
|
+
const text = await invoke$1('Editor.getText', key);
|
|
2057
2080
|
if (text !== expectedText) {
|
|
2058
2081
|
throw new Error(`Expected editor to have text ${expectedText} but was ${text}`);
|
|
2059
2082
|
}
|
|
2060
2083
|
};
|
|
2061
2084
|
const shouldHaveSelections = async expectedSelections => {
|
|
2062
2085
|
const key = await getEditorKey();
|
|
2063
|
-
const selections = await invoke('Editor.getSelections', key);
|
|
2086
|
+
const selections = await invoke$1('Editor.getSelections', key);
|
|
2064
2087
|
if (!areSelectionsEqual(selections, expectedSelections)) {
|
|
2065
2088
|
throw new Error(`Expected editor to have selections ${expectedSelections} but was ${selections}`);
|
|
2066
2089
|
}
|
|
2067
2090
|
};
|
|
2068
2091
|
const undo = async () => {
|
|
2069
2092
|
// @ts-ignore
|
|
2070
|
-
await invoke('Editor.undo');
|
|
2093
|
+
await invoke$1('Editor.undo');
|
|
2071
2094
|
};
|
|
2072
2095
|
const redo = async () => {
|
|
2073
2096
|
// @ts-ignore
|
|
2074
|
-
await invoke('Editor.redo');
|
|
2097
|
+
await invoke$1('Editor.redo');
|
|
2075
2098
|
};
|
|
2076
2099
|
const shouldHaveDiagnostics = async expectedDiagnostics => {
|
|
2077
2100
|
const key = await getEditorKey();
|
|
2078
|
-
const diagnostics = await invoke('Editor.getDiagnostics', key);
|
|
2101
|
+
const diagnostics = await invoke$1('Editor.getDiagnostics', key);
|
|
2079
2102
|
if (!areDiagnosticsEqual(diagnostics, expectedDiagnostics)) {
|
|
2080
2103
|
const stringifiedActual = JSON.stringify(diagnostics);
|
|
2081
2104
|
const stringifiedExpected = JSON.stringify(expectedDiagnostics);
|
|
@@ -2172,22 +2195,22 @@ const Editor = {
|
|
|
2172
2195
|
};
|
|
2173
2196
|
|
|
2174
2197
|
const selectIndex$6 = async index => {
|
|
2175
|
-
await invoke
|
|
2198
|
+
await invoke('EditorCompletion.selectIndex', index);
|
|
2176
2199
|
};
|
|
2177
2200
|
const selectCurrentIndex$2 = async () => {
|
|
2178
|
-
await invoke
|
|
2201
|
+
await invoke('EditorCompletion.selectCurrentIndex');
|
|
2179
2202
|
};
|
|
2180
2203
|
const close$2 = async () => {
|
|
2181
2204
|
// @ts-ignore
|
|
2182
|
-
await invoke
|
|
2205
|
+
await invoke('EditorCompletion.close');
|
|
2183
2206
|
};
|
|
2184
2207
|
const handleWheel$2 = async (deltaMode, deltaY) => {
|
|
2185
2208
|
// @ts-ignore
|
|
2186
|
-
await invoke
|
|
2209
|
+
await invoke('EditorCompletion.handleWheel', deltaMode, deltaY);
|
|
2187
2210
|
};
|
|
2188
2211
|
const handlePointerdown = async (clientX, clientY) => {
|
|
2189
2212
|
// @ts-ignore
|
|
2190
|
-
await invoke
|
|
2213
|
+
await invoke('EditorCompletion.handlePointerdown', clientX, clientY);
|
|
2191
2214
|
};
|
|
2192
2215
|
|
|
2193
2216
|
const EditorCompletion = {
|
|
@@ -2200,11 +2223,11 @@ const EditorCompletion = {
|
|
|
2200
2223
|
};
|
|
2201
2224
|
|
|
2202
2225
|
const show$5 = async () => {
|
|
2203
|
-
await invoke
|
|
2226
|
+
await invoke('Editor.showHover2');
|
|
2204
2227
|
};
|
|
2205
2228
|
const close$1 = async () => {
|
|
2206
2229
|
// @ts-ignore
|
|
2207
|
-
await invoke
|
|
2230
|
+
await invoke('EditorHover.close');
|
|
2208
2231
|
};
|
|
2209
2232
|
|
|
2210
2233
|
const EditorHover = {
|
|
@@ -2215,15 +2238,15 @@ const EditorHover = {
|
|
|
2215
2238
|
|
|
2216
2239
|
const handleInput$5 = async value => {
|
|
2217
2240
|
// @ts-ignore
|
|
2218
|
-
await invoke
|
|
2241
|
+
await invoke('EditorRename.handleInput', value, Script);
|
|
2219
2242
|
};
|
|
2220
2243
|
const accept = async () => {
|
|
2221
2244
|
// @ts-ignore
|
|
2222
|
-
await invoke
|
|
2245
|
+
await invoke('EditorRename.accept');
|
|
2223
2246
|
};
|
|
2224
2247
|
const cancel = async () => {
|
|
2225
2248
|
// @ts-ignore
|
|
2226
|
-
await invoke
|
|
2249
|
+
await invoke('EditorRename.cancel');
|
|
2227
2250
|
};
|
|
2228
2251
|
|
|
2229
2252
|
const EditorRename = {
|
|
@@ -2235,11 +2258,11 @@ const EditorRename = {
|
|
|
2235
2258
|
|
|
2236
2259
|
const selectIndex$5 = async index => {
|
|
2237
2260
|
// @ts-ignore
|
|
2238
|
-
await invoke
|
|
2261
|
+
await invoke('EditorSourceAction.selectIndex', index);
|
|
2239
2262
|
};
|
|
2240
2263
|
const selectCurrentIndex$1 = async () => {
|
|
2241
2264
|
// @ts-ignore
|
|
2242
|
-
await invoke
|
|
2265
|
+
await invoke('EditorSourceAction.selectCurrentIndex');
|
|
2243
2266
|
};
|
|
2244
2267
|
|
|
2245
2268
|
const EditorSourceAction = {
|
|
@@ -2250,133 +2273,133 @@ const EditorSourceAction = {
|
|
|
2250
2273
|
|
|
2251
2274
|
const openContextMenu = async index => {
|
|
2252
2275
|
// @ts-ignore
|
|
2253
|
-
await invoke
|
|
2276
|
+
await invoke('Explorer.handleContextMenuKeyboard', index);
|
|
2254
2277
|
};
|
|
2255
2278
|
const handleDragLeave = async () => {
|
|
2256
|
-
await invoke
|
|
2279
|
+
await invoke('Explorer.handleDragLeave');
|
|
2257
2280
|
};
|
|
2258
2281
|
const handleBlur = async () => {
|
|
2259
|
-
await invoke
|
|
2282
|
+
await invoke('Explorer.handleBlur');
|
|
2260
2283
|
};
|
|
2261
2284
|
const handleEscape = async () => {
|
|
2262
2285
|
// @ts-ignore
|
|
2263
|
-
await invoke
|
|
2286
|
+
await invoke('Explorer.handleEscape');
|
|
2264
2287
|
};
|
|
2265
2288
|
const handleInputBlur = async () => {
|
|
2266
|
-
await invoke
|
|
2289
|
+
await invoke('Explorer.handleInputBlur');
|
|
2267
2290
|
};
|
|
2268
2291
|
const focus$1 = async () => {
|
|
2269
|
-
await invoke
|
|
2292
|
+
await invoke('Explorer.focusIndex', -1);
|
|
2270
2293
|
};
|
|
2271
2294
|
const focusNext$7 = async () => {
|
|
2272
2295
|
// @ts-ignore
|
|
2273
|
-
await invoke
|
|
2296
|
+
await invoke('Explorer.focusNext');
|
|
2274
2297
|
};
|
|
2275
2298
|
const selectUp = async () => {
|
|
2276
|
-
await invoke
|
|
2299
|
+
await invoke('Explorer.selectUp');
|
|
2277
2300
|
};
|
|
2278
2301
|
const handleDragOverIndex = async index => {
|
|
2279
2302
|
// @ts-ignore
|
|
2280
|
-
await invoke
|
|
2303
|
+
await invoke('Explorer.handleDragOverIndex', index);
|
|
2281
2304
|
};
|
|
2282
2305
|
const selectDown = async () => {
|
|
2283
|
-
await invoke
|
|
2306
|
+
await invoke('Explorer.selectDown');
|
|
2284
2307
|
};
|
|
2285
2308
|
const collapseAll$2 = async () => {
|
|
2286
2309
|
// @ts-ignore
|
|
2287
|
-
await invoke
|
|
2310
|
+
await invoke('Explorer.collapseAll');
|
|
2288
2311
|
};
|
|
2289
2312
|
const refresh$1 = async () => {
|
|
2290
|
-
await invoke
|
|
2313
|
+
await invoke('Explorer.refresh');
|
|
2291
2314
|
};
|
|
2292
2315
|
const focusIndex$5 = async index => {
|
|
2293
|
-
await invoke
|
|
2316
|
+
await invoke('Explorer.focusIndex', index);
|
|
2294
2317
|
};
|
|
2295
2318
|
const clickCurrent = async () => {
|
|
2296
|
-
await invoke
|
|
2319
|
+
await invoke('Explorer.handleClickCurrent');
|
|
2297
2320
|
};
|
|
2298
2321
|
const handleArrowLeft$1 = async () => {
|
|
2299
|
-
await invoke
|
|
2322
|
+
await invoke('Explorer.handleArrowLeft');
|
|
2300
2323
|
};
|
|
2301
2324
|
const focusLast$5 = async () => {
|
|
2302
|
-
await invoke
|
|
2325
|
+
await invoke('Explorer.focusLast');
|
|
2303
2326
|
};
|
|
2304
2327
|
const focusFirst$6 = async () => {
|
|
2305
|
-
await invoke
|
|
2328
|
+
await invoke('Explorer.focusFirst');
|
|
2306
2329
|
};
|
|
2307
2330
|
const removeDirent = async () => {
|
|
2308
|
-
await invoke
|
|
2331
|
+
await invoke('Explorer.removeDirent');
|
|
2309
2332
|
};
|
|
2310
2333
|
const expandRecursively = async () => {
|
|
2311
|
-
await invoke
|
|
2334
|
+
await invoke('Explorer.expandRecursively');
|
|
2312
2335
|
};
|
|
2313
2336
|
const newFile = async () => {
|
|
2314
|
-
await invoke
|
|
2337
|
+
await invoke('Explorer.newFile');
|
|
2315
2338
|
};
|
|
2316
2339
|
const newFolder = async () => {
|
|
2317
|
-
await invoke
|
|
2340
|
+
await invoke('Explorer.newFolder');
|
|
2318
2341
|
};
|
|
2319
2342
|
const copyPath$1 = async () => {
|
|
2320
2343
|
// @ts-ignore
|
|
2321
|
-
await invoke
|
|
2344
|
+
await invoke('Explorer.copyPath');
|
|
2322
2345
|
};
|
|
2323
2346
|
const copyRelativePath = async () => {
|
|
2324
2347
|
// @ts-ignore
|
|
2325
|
-
await invoke
|
|
2348
|
+
await invoke('Explorer.copyRelativePath');
|
|
2326
2349
|
};
|
|
2327
2350
|
const handleClick$2 = async index => {
|
|
2328
|
-
await invoke
|
|
2351
|
+
await invoke('Explorer.handleClick', index);
|
|
2329
2352
|
};
|
|
2330
2353
|
const handleClickAt$2 = async (preventDefault, button, ctrlKey, shiftKey, x, y) => {
|
|
2331
2354
|
// @ts-ignore
|
|
2332
|
-
await invoke
|
|
2355
|
+
await invoke('Explorer.handleClickAt', preventDefault, button, ctrlKey, shiftKey, x, y);
|
|
2333
2356
|
};
|
|
2334
2357
|
const handleDrop = async (x, y, fileIds, fileList) => {
|
|
2335
2358
|
// @ts-ignore
|
|
2336
|
-
await invoke
|
|
2359
|
+
await invoke('Explorer.handleDrop', x, y, fileIds, fileIds);
|
|
2337
2360
|
};
|
|
2338
2361
|
const rename = async () => {
|
|
2339
|
-
await invoke
|
|
2362
|
+
await invoke('Explorer.renameDirent');
|
|
2340
2363
|
};
|
|
2341
2364
|
const selectAll = async () => {
|
|
2342
|
-
await invoke
|
|
2365
|
+
await invoke('Explorer.selectAll');
|
|
2343
2366
|
};
|
|
2344
2367
|
const renameDirent = async () => {
|
|
2345
|
-
await invoke
|
|
2368
|
+
await invoke('Explorer.renameDirent');
|
|
2346
2369
|
};
|
|
2347
2370
|
const cancelEdit = async () => {
|
|
2348
|
-
await invoke
|
|
2371
|
+
await invoke('Explorer.cancelEdit');
|
|
2349
2372
|
};
|
|
2350
2373
|
const acceptEdit = async () => {
|
|
2351
|
-
await invoke
|
|
2374
|
+
await invoke('Explorer.acceptEdit');
|
|
2352
2375
|
};
|
|
2353
2376
|
const updateEditingValue = async value => {
|
|
2354
|
-
await invoke
|
|
2377
|
+
await invoke('Explorer.updateEditingValue', value);
|
|
2355
2378
|
};
|
|
2356
2379
|
const expandAll = async () => {
|
|
2357
|
-
await invoke
|
|
2380
|
+
await invoke('Explorer.expandAll');
|
|
2358
2381
|
};
|
|
2359
2382
|
const handleDragOver = async (x, y) => {
|
|
2360
|
-
await invoke
|
|
2383
|
+
await invoke('Explorer.handleDragOver', x, y);
|
|
2361
2384
|
};
|
|
2362
2385
|
const handleCut = async () => {
|
|
2363
2386
|
// @ts-ignore
|
|
2364
|
-
await invoke
|
|
2387
|
+
await invoke('Explorer.handleCut');
|
|
2365
2388
|
};
|
|
2366
2389
|
const handleCopy = async () => {
|
|
2367
2390
|
// @ts-ignore
|
|
2368
|
-
await invoke
|
|
2391
|
+
await invoke('Explorer.handleCopy');
|
|
2369
2392
|
};
|
|
2370
2393
|
const handlePaste = async () => {
|
|
2371
2394
|
// @ts-ignore
|
|
2372
|
-
await invoke
|
|
2395
|
+
await invoke('Explorer.handlePaste');
|
|
2373
2396
|
};
|
|
2374
2397
|
const selectIndices = async indices => {
|
|
2375
|
-
await invoke
|
|
2398
|
+
await invoke('Explorer.selectIndices', indices);
|
|
2376
2399
|
};
|
|
2377
2400
|
const toggleIndividualSelection = async index => {
|
|
2378
2401
|
// @ts-ignore
|
|
2379
|
-
await invoke
|
|
2402
|
+
await invoke('Explorer.toggleIndividualSelection', index);
|
|
2380
2403
|
};
|
|
2381
2404
|
|
|
2382
2405
|
const Explorer = {
|
|
@@ -2425,12 +2448,12 @@ const Explorer = {
|
|
|
2425
2448
|
const addWebExtension = async relativePath => {
|
|
2426
2449
|
// TODO compute absolutePath
|
|
2427
2450
|
const absolutePath = relativePath;
|
|
2428
|
-
await invoke
|
|
2451
|
+
await invoke('ExtensionMeta.addWebExtension', absolutePath);
|
|
2429
2452
|
};
|
|
2430
2453
|
const addNodeExtension = async relativePath => {
|
|
2431
2454
|
// TODO compute absolutePath
|
|
2432
2455
|
const absolutePath = relativePath;
|
|
2433
|
-
await invoke
|
|
2456
|
+
await invoke('ExtensionMeta.addNodeExtension', absolutePath);
|
|
2434
2457
|
};
|
|
2435
2458
|
|
|
2436
2459
|
const Extension = {
|
|
@@ -2441,33 +2464,33 @@ const Extension = {
|
|
|
2441
2464
|
|
|
2442
2465
|
const handleClickCategory = async categoryId => {
|
|
2443
2466
|
// @ts-ignore
|
|
2444
|
-
await invoke
|
|
2467
|
+
await invoke('ExtensionDetail.handleClickCategory', categoryId);
|
|
2445
2468
|
};
|
|
2446
2469
|
const handleReadmeContextMenu = async (x, y, nodeName, href) => {
|
|
2447
2470
|
// @ts-ignore
|
|
2448
|
-
await invoke
|
|
2471
|
+
await invoke('ExtensionDetail.handleReadmeContextMenu', x, y, nodeName, href);
|
|
2449
2472
|
};
|
|
2450
2473
|
const copyReadmeLink = async href => {
|
|
2451
2474
|
// @ts-ignore
|
|
2452
|
-
await invoke
|
|
2475
|
+
await invoke('ExtensionDetail.copyReadmeLink', href);
|
|
2453
2476
|
};
|
|
2454
2477
|
const handleClickEnable = async () => {
|
|
2455
2478
|
// @ts-ignore
|
|
2456
|
-
await invoke
|
|
2479
|
+
await invoke('ExtensionDetail.handleClickEnable');
|
|
2457
2480
|
};
|
|
2458
2481
|
const handleClickDisable = async () => {
|
|
2459
2482
|
// @ts-ignore
|
|
2460
|
-
await invoke
|
|
2483
|
+
await invoke('ExtensionDetail.handleClickDisable');
|
|
2461
2484
|
};
|
|
2462
2485
|
const handleClickSetColorTheme = async () => {
|
|
2463
2486
|
// @ts-ignore
|
|
2464
|
-
await invoke
|
|
2487
|
+
await invoke('ExtensionDetail.handleClickSetColorTheme');
|
|
2465
2488
|
};
|
|
2466
2489
|
const selectFeature = name => {
|
|
2467
|
-
return invoke
|
|
2490
|
+
return invoke('ExtensionDetail.selectFeature', name);
|
|
2468
2491
|
};
|
|
2469
2492
|
const selectTab$1 = name => {
|
|
2470
|
-
return invoke
|
|
2493
|
+
return invoke('ExtensionDetail.selectTab', name);
|
|
2471
2494
|
};
|
|
2472
2495
|
const selectDetails = async () => {
|
|
2473
2496
|
await selectTab$1('Details');
|
|
@@ -2479,24 +2502,24 @@ const selectChangelog = async () => {
|
|
|
2479
2502
|
await selectTab$1('Changelog');
|
|
2480
2503
|
};
|
|
2481
2504
|
const focusNextTab = async () => {
|
|
2482
|
-
await invoke
|
|
2505
|
+
await invoke('ExtensionDetail.focusNextTab');
|
|
2483
2506
|
};
|
|
2484
2507
|
const focusPreviousTab = async () => {
|
|
2485
|
-
await invoke
|
|
2508
|
+
await invoke('ExtensionDetail.focusPreviousTab');
|
|
2486
2509
|
};
|
|
2487
2510
|
const open$6 = extensionId => {
|
|
2488
2511
|
const uri = `extension-detail://${extensionId}`;
|
|
2489
|
-
return invoke
|
|
2512
|
+
return invoke('Main.openUri', uri);
|
|
2490
2513
|
};
|
|
2491
2514
|
const handleClickUninstall = () => {
|
|
2492
|
-
return invoke
|
|
2515
|
+
return invoke('ExtensionDetail.handleClickUninstall');
|
|
2493
2516
|
};
|
|
2494
2517
|
const handleImageContextMenu = () => {
|
|
2495
|
-
return invoke
|
|
2518
|
+
return invoke('ExtensionDetail.handleImageContextMenu');
|
|
2496
2519
|
};
|
|
2497
2520
|
const openFeature = featureName => {
|
|
2498
2521
|
// @ts-ignore
|
|
2499
|
-
return invoke
|
|
2522
|
+
return invoke('ExtensionDetail.handleFeaturesClick', featureName);
|
|
2500
2523
|
};
|
|
2501
2524
|
const openThemes = async () => {
|
|
2502
2525
|
await openFeature('Theme');
|
|
@@ -2518,13 +2541,13 @@ const openSettings = async () => {
|
|
|
2518
2541
|
};
|
|
2519
2542
|
const handleScroll$1 = async scrollTop => {
|
|
2520
2543
|
// @ts-ignore
|
|
2521
|
-
return invoke
|
|
2544
|
+
return invoke('ExtensionDetail.handleScroll', scrollTop);
|
|
2522
2545
|
};
|
|
2523
2546
|
const hideSizeLink = async () => {
|
|
2524
|
-
return invoke
|
|
2547
|
+
return invoke('ExtensionDetail.hideSizeLink');
|
|
2525
2548
|
};
|
|
2526
2549
|
const handleTabFocus = async tabName => {
|
|
2527
|
-
return invoke
|
|
2550
|
+
return invoke('ExtensionDetail.handleTabFocus', tabName);
|
|
2528
2551
|
};
|
|
2529
2552
|
|
|
2530
2553
|
const ExtensionDetail = {
|
|
@@ -2558,10 +2581,10 @@ const ExtensionDetail = {
|
|
|
2558
2581
|
};
|
|
2559
2582
|
|
|
2560
2583
|
const open$5 = async id => {
|
|
2561
|
-
await invoke
|
|
2584
|
+
await invoke('SideBar.openViewlet', id);
|
|
2562
2585
|
};
|
|
2563
2586
|
const hide = async () => {
|
|
2564
|
-
await invoke
|
|
2587
|
+
await invoke('Layout.hideSideBar');
|
|
2565
2588
|
};
|
|
2566
2589
|
|
|
2567
2590
|
const SideBar = {
|
|
@@ -2575,27 +2598,27 @@ const open$4 = async () => {
|
|
|
2575
2598
|
};
|
|
2576
2599
|
const handleInput$4 = async value => {
|
|
2577
2600
|
// @ts-ignore
|
|
2578
|
-
await invoke
|
|
2601
|
+
await invoke('Extensions.handleInput', value, Script$1);
|
|
2579
2602
|
};
|
|
2580
2603
|
const handleClick$1 = async index => {
|
|
2581
2604
|
// @ts-ignore
|
|
2582
|
-
await invoke
|
|
2605
|
+
await invoke('Extensions.handleClick', index);
|
|
2583
2606
|
};
|
|
2584
2607
|
const handleContextMenu$4 = async (button, x, y) => {
|
|
2585
2608
|
// @ts-ignore
|
|
2586
|
-
await invoke
|
|
2609
|
+
await invoke('Extensions.handleContextMenu', button, x, y);
|
|
2587
2610
|
};
|
|
2588
2611
|
const copyExtensionInfo = async () => {
|
|
2589
2612
|
// @ts-ignore
|
|
2590
|
-
await invoke
|
|
2613
|
+
await invoke('Extensions.copyExtensionInfo');
|
|
2591
2614
|
};
|
|
2592
2615
|
const copyExtensionId = async () => {
|
|
2593
2616
|
// @ts-ignore
|
|
2594
|
-
await invoke
|
|
2617
|
+
await invoke('Extensions.copyExtensionId');
|
|
2595
2618
|
};
|
|
2596
2619
|
const clearSearchResults$1 = async () => {
|
|
2597
2620
|
// @ts-ignore
|
|
2598
|
-
await invoke
|
|
2621
|
+
await invoke('Extensions.clearSearchResults');
|
|
2599
2622
|
};
|
|
2600
2623
|
|
|
2601
2624
|
const ExtensionSearch = {
|
|
@@ -2623,7 +2646,7 @@ const toFileUrl = url => {
|
|
|
2623
2646
|
|
|
2624
2647
|
/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types */
|
|
2625
2648
|
const getDirents = async (allDirents, fileUrl) => {
|
|
2626
|
-
const dirents = await invoke
|
|
2649
|
+
const dirents = await invoke('FileSystem.readDirWithFileTypes', fileUrl);
|
|
2627
2650
|
for (const dirent of dirents) {
|
|
2628
2651
|
if (dirent.type === Directory) {
|
|
2629
2652
|
await getDirents(allDirents, `${fileUrl}/${dirent.name}`);
|
|
@@ -2638,7 +2661,7 @@ const getFileMapNode = async url => {
|
|
|
2638
2661
|
await getDirents(allFiles, fileUrl);
|
|
2639
2662
|
const fileMap = Object.create(null);
|
|
2640
2663
|
for (const filePath of allFiles) {
|
|
2641
|
-
const content = await invoke
|
|
2664
|
+
const content = await invoke(`FileSystem.readFile`, filePath);
|
|
2642
2665
|
const relativePaths = filePath.slice(fileUrl.length + 1);
|
|
2643
2666
|
fileMap[relativePaths] = content;
|
|
2644
2667
|
}
|
|
@@ -2685,7 +2708,7 @@ const getFileMapWeb = async url => {
|
|
|
2685
2708
|
const loadFixtureToMemFs = async fileMap => {
|
|
2686
2709
|
for (const [path, content] of Object.entries(fileMap)) {
|
|
2687
2710
|
const memfsPath = `memfs:///fixture/${path}`;
|
|
2688
|
-
await invoke
|
|
2711
|
+
await invoke('FileSystem.writeFile', memfsPath, content);
|
|
2689
2712
|
}
|
|
2690
2713
|
return `memfs:///fixture`;
|
|
2691
2714
|
};
|
|
@@ -2708,28 +2731,28 @@ const stringifyJson = data => {
|
|
|
2708
2731
|
};
|
|
2709
2732
|
|
|
2710
2733
|
const writeFile = async (uri, content) => {
|
|
2711
|
-
await invoke
|
|
2734
|
+
await invoke('FileSystem.writeFile', uri, content);
|
|
2712
2735
|
};
|
|
2713
2736
|
const writeJson = async (uri, data) => {
|
|
2714
2737
|
const content = stringifyJson(data);
|
|
2715
2738
|
await writeFile(uri, content);
|
|
2716
2739
|
};
|
|
2717
2740
|
const readFile = async uri => {
|
|
2718
|
-
return invoke
|
|
2741
|
+
return invoke('FileSystem.readFile', uri);
|
|
2719
2742
|
};
|
|
2720
2743
|
const addFileHandle = async file => {
|
|
2721
2744
|
// @ts-ignore
|
|
2722
|
-
await invoke
|
|
2745
|
+
await invoke('FileSystem.addFileHandle', file);
|
|
2723
2746
|
};
|
|
2724
2747
|
const mkdir = async uri => {
|
|
2725
|
-
await invoke
|
|
2748
|
+
await invoke('FileSystem.mkdir', uri);
|
|
2726
2749
|
};
|
|
2727
2750
|
const readDir = async uri => {
|
|
2728
2751
|
// @ts-ignore
|
|
2729
|
-
return invoke
|
|
2752
|
+
return invoke('FileSystem.readDirWithFileTypes', uri);
|
|
2730
2753
|
};
|
|
2731
2754
|
const remove = async uri => {
|
|
2732
|
-
await invoke
|
|
2755
|
+
await invoke('FileSystem.remove', uri);
|
|
2733
2756
|
};
|
|
2734
2757
|
const getTmpDir = async ({
|
|
2735
2758
|
scheme = Memfs
|
|
@@ -2739,19 +2762,19 @@ const getTmpDir = async ({
|
|
|
2739
2762
|
return 'memfs:///workspace';
|
|
2740
2763
|
default:
|
|
2741
2764
|
// @ts-ignore
|
|
2742
|
-
return invoke
|
|
2765
|
+
return invoke('PlatformPaths.getTmpDir');
|
|
2743
2766
|
}
|
|
2744
2767
|
};
|
|
2745
2768
|
const chmod = async (uri, permissions) => {
|
|
2746
2769
|
// @ts-ignore
|
|
2747
|
-
await invoke
|
|
2770
|
+
await invoke('FileSystem.chmod', uri, permissions);
|
|
2748
2771
|
};
|
|
2749
2772
|
const createExecutable = async content => {
|
|
2750
2773
|
const tmpDir = await getTmpDir({
|
|
2751
2774
|
scheme: 'file'
|
|
2752
2775
|
});
|
|
2753
2776
|
// @ts-ignore
|
|
2754
|
-
const nodePath = await invoke
|
|
2777
|
+
const nodePath = await invoke('PlatformPaths.getNodePath');
|
|
2755
2778
|
const gitPath = `${tmpDir}/git`;
|
|
2756
2779
|
await writeFile(gitPath, `#!${nodePath}
|
|
2757
2780
|
${content}`);
|
|
@@ -2760,10 +2783,10 @@ const createExecutable = async content => {
|
|
|
2760
2783
|
};
|
|
2761
2784
|
const createExecutableFrom = async uri => {
|
|
2762
2785
|
// @ts-ignore
|
|
2763
|
-
const testPath = await invoke
|
|
2786
|
+
const testPath = await invoke('PlatformPaths.getTestPath');
|
|
2764
2787
|
const absolutePath = testPath + Slash + uri;
|
|
2765
2788
|
// @ts-ignore
|
|
2766
|
-
const content = await invoke
|
|
2789
|
+
const content = await invoke('Ajax.getText', absolutePath);
|
|
2767
2790
|
return createExecutable(content);
|
|
2768
2791
|
};
|
|
2769
2792
|
const createDroppedFileHandle = async () => {
|
|
@@ -2773,7 +2796,7 @@ const createDroppedFileHandle = async () => {
|
|
|
2773
2796
|
});
|
|
2774
2797
|
const file = await fileHandle.getFile();
|
|
2775
2798
|
// @ts-ignore
|
|
2776
|
-
const id = await invoke
|
|
2799
|
+
const id = await invoke('FileSystemHandle.addFileHandle', fileHandle);
|
|
2777
2800
|
return {
|
|
2778
2801
|
file,
|
|
2779
2802
|
id
|
|
@@ -2807,63 +2830,63 @@ const FileSystem = {
|
|
|
2807
2830
|
};
|
|
2808
2831
|
|
|
2809
2832
|
const focusNext$6 = async () => {
|
|
2810
|
-
await invoke
|
|
2833
|
+
await invoke('FindWidget.focusNext');
|
|
2811
2834
|
};
|
|
2812
2835
|
const focusPrevious$6 = async () => {
|
|
2813
2836
|
// @ts-ignore
|
|
2814
|
-
await invoke
|
|
2837
|
+
await invoke('FindWidget.focusPrevious');
|
|
2815
2838
|
};
|
|
2816
2839
|
const close = async () => {
|
|
2817
2840
|
// @ts-ignore
|
|
2818
|
-
await invoke
|
|
2841
|
+
await invoke('FindWidget.close');
|
|
2819
2842
|
};
|
|
2820
2843
|
const setReplaceValue$1 = async value => {
|
|
2821
2844
|
// @ts-ignore
|
|
2822
|
-
await invoke
|
|
2845
|
+
await invoke('FindWidget.handleReplaceInput', value, Script);
|
|
2823
2846
|
};
|
|
2824
2847
|
const setValue$2 = async value => {
|
|
2825
2848
|
// @ts-ignore
|
|
2826
|
-
await invoke
|
|
2849
|
+
await invoke('FindWidget.handleInput', value, Script);
|
|
2827
2850
|
};
|
|
2828
2851
|
const toggleReplace$1 = async () => {
|
|
2829
2852
|
// @ts-ignore
|
|
2830
|
-
await invoke
|
|
2853
|
+
await invoke('FindWidget.toggleReplace');
|
|
2831
2854
|
};
|
|
2832
2855
|
const toggleMatchCase$1 = async () => {
|
|
2833
2856
|
// @ts-ignore
|
|
2834
|
-
await invoke
|
|
2857
|
+
await invoke('FindWidget.toggleMatchCase');
|
|
2835
2858
|
};
|
|
2836
2859
|
const toggleMatchWholeWord$1 = async () => {
|
|
2837
2860
|
// @ts-ignore
|
|
2838
|
-
await invoke
|
|
2861
|
+
await invoke('FindWidget.toggleMatchWholeWord');
|
|
2839
2862
|
};
|
|
2840
2863
|
const togglePreserveCase$1 = async () => {
|
|
2841
2864
|
// @ts-ignore
|
|
2842
|
-
await invoke
|
|
2865
|
+
await invoke('FindWidget.togglePreserveCase');
|
|
2843
2866
|
};
|
|
2844
2867
|
const toggleUseRegularExpression$1 = async () => {
|
|
2845
2868
|
// @ts-ignore
|
|
2846
|
-
await invoke
|
|
2869
|
+
await invoke('FindWidget.toggleUseRegularExpression');
|
|
2847
2870
|
};
|
|
2848
2871
|
const replace = async () => {
|
|
2849
2872
|
// @ts-ignore
|
|
2850
|
-
await invoke
|
|
2873
|
+
await invoke('FindWidget.replace');
|
|
2851
2874
|
};
|
|
2852
2875
|
const replaceAll$1 = async () => {
|
|
2853
2876
|
// @ts-ignore
|
|
2854
|
-
await invoke
|
|
2877
|
+
await invoke('FindWidget.replaceAll');
|
|
2855
2878
|
};
|
|
2856
2879
|
const focusElement = async whenExpression => {
|
|
2857
2880
|
// @ts-ignore
|
|
2858
|
-
await invoke
|
|
2881
|
+
await invoke('FindWidget.focusElement', whenExpression);
|
|
2859
2882
|
};
|
|
2860
2883
|
const focusNextElement = async () => {
|
|
2861
2884
|
// @ts-ignore
|
|
2862
|
-
await invoke
|
|
2885
|
+
await invoke('FindWidget.focusNextElement');
|
|
2863
2886
|
};
|
|
2864
2887
|
const focusPreviousElement = async () => {
|
|
2865
2888
|
// @ts-ignore
|
|
2866
|
-
await invoke
|
|
2889
|
+
await invoke('FindWidget.focusPreviousElement');
|
|
2867
2890
|
};
|
|
2868
2891
|
|
|
2869
2892
|
const FindWidget = {
|
|
@@ -2886,7 +2909,7 @@ const FindWidget = {
|
|
|
2886
2909
|
};
|
|
2887
2910
|
|
|
2888
2911
|
const setIconTheme = async id => {
|
|
2889
|
-
await invoke
|
|
2912
|
+
await invoke('IconTheme.setIconTheme', id);
|
|
2890
2913
|
};
|
|
2891
2914
|
|
|
2892
2915
|
const IconTheme = {
|
|
@@ -2895,19 +2918,19 @@ const IconTheme = {
|
|
|
2895
2918
|
};
|
|
2896
2919
|
|
|
2897
2920
|
const selectIndex$4 = async index => {
|
|
2898
|
-
return invoke
|
|
2921
|
+
return invoke('IframeInspector.selectIndex', index);
|
|
2899
2922
|
};
|
|
2900
2923
|
const focusNext$5 = async () => {
|
|
2901
|
-
return invoke
|
|
2924
|
+
return invoke('IframeInspector.focusNext');
|
|
2902
2925
|
};
|
|
2903
2926
|
const focusPrevious$5 = async () => {
|
|
2904
|
-
return invoke
|
|
2927
|
+
return invoke('IframeInspector.focusPrevious');
|
|
2905
2928
|
};
|
|
2906
2929
|
const focusFirst$5 = async () => {
|
|
2907
|
-
return invoke
|
|
2930
|
+
return invoke('IframeInspector.focusFirst');
|
|
2908
2931
|
};
|
|
2909
2932
|
const focusLast$4 = async () => {
|
|
2910
|
-
return invoke
|
|
2933
|
+
return invoke('IframeInspector.focusLast');
|
|
2911
2934
|
};
|
|
2912
2935
|
|
|
2913
2936
|
const IframeInspector = {
|
|
@@ -2920,74 +2943,74 @@ const IframeInspector = {
|
|
|
2920
2943
|
};
|
|
2921
2944
|
|
|
2922
2945
|
const open$3 = async () => {
|
|
2923
|
-
await invoke
|
|
2946
|
+
await invoke('Main.openUri', 'app://keybindings');
|
|
2924
2947
|
};
|
|
2925
2948
|
const handleInput$3 = value => {
|
|
2926
|
-
return invoke
|
|
2949
|
+
return invoke('KeyBindings.handleInput', value);
|
|
2927
2950
|
};
|
|
2928
2951
|
const handleClick = (x, y) => {
|
|
2929
|
-
return invoke
|
|
2952
|
+
return invoke('KeyBindings.handleClick', x, y);
|
|
2930
2953
|
};
|
|
2931
2954
|
const handleWheel$1 = (deltaMode, deltaY) => {
|
|
2932
|
-
return invoke
|
|
2955
|
+
return invoke('KeyBindings.handleWheel', deltaMode, deltaY);
|
|
2933
2956
|
};
|
|
2934
2957
|
const handleDoubleClick = (x, y) => {
|
|
2935
|
-
return invoke
|
|
2958
|
+
return invoke('KeyBindings.handleDoubleClick', x, y);
|
|
2936
2959
|
};
|
|
2937
2960
|
const focusNext$4 = () => {
|
|
2938
|
-
return invoke
|
|
2961
|
+
return invoke('KeyBindings.focusNext');
|
|
2939
2962
|
};
|
|
2940
2963
|
const focusPrevious$4 = () => {
|
|
2941
|
-
return invoke
|
|
2964
|
+
return invoke('KeyBindings.focusPrevious');
|
|
2942
2965
|
};
|
|
2943
2966
|
const focusFirst$4 = () => {
|
|
2944
|
-
return invoke
|
|
2967
|
+
return invoke('KeyBindings.focusFirst');
|
|
2945
2968
|
};
|
|
2946
2969
|
const focusIndex$4 = index => {
|
|
2947
2970
|
// @ts-ignore
|
|
2948
|
-
return invoke
|
|
2971
|
+
return invoke('KeyBindings.focusIndex', index);
|
|
2949
2972
|
};
|
|
2950
2973
|
const focusLast$3 = () => {
|
|
2951
|
-
return invoke
|
|
2974
|
+
return invoke('KeyBindings.focusLast');
|
|
2952
2975
|
};
|
|
2953
2976
|
const toggleRecordingKeys = () => {
|
|
2954
|
-
return invoke
|
|
2977
|
+
return invoke('KeyBindings.toggleRecordingKeys');
|
|
2955
2978
|
};
|
|
2956
2979
|
const startRecordingKeys = () => {
|
|
2957
|
-
return invoke
|
|
2980
|
+
return invoke('KeyBindings.startRecordingKeys');
|
|
2958
2981
|
};
|
|
2959
2982
|
const clearInput = () => {
|
|
2960
|
-
return invoke
|
|
2983
|
+
return invoke('KeyBindings.clearInput');
|
|
2961
2984
|
};
|
|
2962
2985
|
const sortByPrecedence = () => {
|
|
2963
|
-
return invoke
|
|
2986
|
+
return invoke('KeyBindings.sortByPrecedence');
|
|
2964
2987
|
};
|
|
2965
2988
|
const stopRecordingKeys = () => {
|
|
2966
|
-
return invoke
|
|
2989
|
+
return invoke('KeyBindings.stopRecordingKeys');
|
|
2967
2990
|
};
|
|
2968
2991
|
const handleContextMenu$3 = (button, x, y) => {
|
|
2969
|
-
return invoke
|
|
2992
|
+
return invoke('KeyBindings.handleContextMenu', button, x, y);
|
|
2970
2993
|
};
|
|
2971
2994
|
const copyCommandId = () => {
|
|
2972
|
-
return invoke
|
|
2995
|
+
return invoke('KeyBindings.copyCommandId');
|
|
2973
2996
|
};
|
|
2974
2997
|
const copyCommandTitle = () => {
|
|
2975
|
-
return invoke
|
|
2998
|
+
return invoke('KeyBindings.copyCommandTitle');
|
|
2976
2999
|
};
|
|
2977
3000
|
const addKeyBinding = () => {
|
|
2978
|
-
return invoke
|
|
3001
|
+
return invoke('KeyBindings.addKeyBinding');
|
|
2979
3002
|
};
|
|
2980
3003
|
const removeKeyBinding = () => {
|
|
2981
|
-
return invoke
|
|
3004
|
+
return invoke('KeyBindings.removeKeyBinding');
|
|
2982
3005
|
};
|
|
2983
3006
|
const changeWhenExpression = () => {
|
|
2984
|
-
return invoke
|
|
3007
|
+
return invoke('KeyBindings.changeWhenExpression');
|
|
2985
3008
|
};
|
|
2986
3009
|
const showSameKeyBindings = () => {
|
|
2987
|
-
return invoke
|
|
3010
|
+
return invoke('KeyBindings.showSameKeyBindings');
|
|
2988
3011
|
};
|
|
2989
3012
|
const resetKeyBinding = () => {
|
|
2990
|
-
return invoke
|
|
3013
|
+
return invoke('KeyBindings.resetKeyBinding');
|
|
2991
3014
|
};
|
|
2992
3015
|
|
|
2993
3016
|
const KeyBindingsEditor = {
|
|
@@ -3064,7 +3087,7 @@ const press = async key => {
|
|
|
3064
3087
|
...keyOptions
|
|
3065
3088
|
};
|
|
3066
3089
|
// @ts-ignore
|
|
3067
|
-
await invoke
|
|
3090
|
+
await invoke('TestFrameWork.performKeyBoardAction', 'press', options);
|
|
3068
3091
|
};
|
|
3069
3092
|
|
|
3070
3093
|
const KeyBoard = {
|
|
@@ -3073,40 +3096,40 @@ const KeyBoard = {
|
|
|
3073
3096
|
};
|
|
3074
3097
|
|
|
3075
3098
|
const openUri = async uri => {
|
|
3076
|
-
await invoke
|
|
3099
|
+
await invoke('Main.openUri', uri);
|
|
3077
3100
|
};
|
|
3078
3101
|
const splitRight = async () => {
|
|
3079
|
-
await invoke
|
|
3102
|
+
await invoke('Main.splitRight');
|
|
3080
3103
|
};
|
|
3081
3104
|
const openKeyBindings = async () => {
|
|
3082
|
-
await invoke
|
|
3105
|
+
await invoke('Main.openKeyBindings');
|
|
3083
3106
|
};
|
|
3084
3107
|
const closeAllEditors = async () => {
|
|
3085
|
-
await invoke
|
|
3108
|
+
await invoke('Main.closeAllEditors');
|
|
3086
3109
|
};
|
|
3087
3110
|
const closeTabsLeft = async () => {
|
|
3088
|
-
await invoke
|
|
3111
|
+
await invoke('Main.closeTabsLeft');
|
|
3089
3112
|
};
|
|
3090
3113
|
const closeTabsRight = async () => {
|
|
3091
|
-
await invoke
|
|
3114
|
+
await invoke('Main.closeTabsRight');
|
|
3092
3115
|
};
|
|
3093
3116
|
const closeOthers = async () => {
|
|
3094
|
-
await invoke
|
|
3117
|
+
await invoke('Main.closeOthers');
|
|
3095
3118
|
};
|
|
3096
3119
|
const closeActiveEditor = async () => {
|
|
3097
|
-
await invoke
|
|
3120
|
+
await invoke('Main.closeActiveEditor');
|
|
3098
3121
|
};
|
|
3099
3122
|
const focusFirst$3 = async () => {
|
|
3100
|
-
await invoke
|
|
3123
|
+
await invoke('Main.focusFirst');
|
|
3101
3124
|
};
|
|
3102
3125
|
const focusNext$3 = async () => {
|
|
3103
|
-
await invoke
|
|
3126
|
+
await invoke('Main.focusNext');
|
|
3104
3127
|
};
|
|
3105
3128
|
const focusPrevious$3 = async () => {
|
|
3106
|
-
await invoke
|
|
3129
|
+
await invoke('Main.focusPrevious');
|
|
3107
3130
|
};
|
|
3108
3131
|
const focusLast$2 = async () => {
|
|
3109
|
-
await invoke
|
|
3132
|
+
await invoke('Main.focusLast');
|
|
3110
3133
|
};
|
|
3111
3134
|
|
|
3112
3135
|
const Main = {
|
|
@@ -3127,19 +3150,19 @@ const Main = {
|
|
|
3127
3150
|
|
|
3128
3151
|
const show$4 = async () => {
|
|
3129
3152
|
// @ts-ignore
|
|
3130
|
-
await invoke
|
|
3153
|
+
await invoke('Panel.selectIndex', 1);
|
|
3131
3154
|
};
|
|
3132
3155
|
const handleFilterInput$1 = async text => {
|
|
3133
3156
|
// @ts-ignore
|
|
3134
|
-
await invoke
|
|
3157
|
+
await invoke('Output.handleFilterInput', text, Script);
|
|
3135
3158
|
};
|
|
3136
3159
|
const selectChannel = async channelId => {
|
|
3137
3160
|
// @ts-ignore
|
|
3138
|
-
await invoke
|
|
3161
|
+
await invoke('Output.selectChannel', channelId);
|
|
3139
3162
|
};
|
|
3140
3163
|
const clear$2 = async () => {
|
|
3141
3164
|
// @ts-ignore
|
|
3142
|
-
await invoke
|
|
3165
|
+
await invoke('Output.clear');
|
|
3143
3166
|
};
|
|
3144
3167
|
|
|
3145
3168
|
const Output = {
|
|
@@ -3151,12 +3174,12 @@ const Output = {
|
|
|
3151
3174
|
};
|
|
3152
3175
|
|
|
3153
3176
|
const open$2 = async id => {
|
|
3154
|
-
await invoke
|
|
3177
|
+
await invoke('Layout.showPanel', id);
|
|
3155
3178
|
};
|
|
3156
3179
|
const openProblems = async () => {
|
|
3157
3180
|
await open$2('Problems');
|
|
3158
3181
|
// @ts-ignore
|
|
3159
|
-
await invoke
|
|
3182
|
+
await invoke('Panel.selectIndex', 0);
|
|
3160
3183
|
};
|
|
3161
3184
|
|
|
3162
3185
|
const Panel = {
|
|
@@ -3180,7 +3203,7 @@ const getIsFirefox = () => {
|
|
|
3180
3203
|
|
|
3181
3204
|
const getNodePath$1 = () => {
|
|
3182
3205
|
// @ts-ignore
|
|
3183
|
-
return invoke
|
|
3206
|
+
return invoke(/* Platform.getNodePath */'Platform.getNodePath');
|
|
3184
3207
|
};
|
|
3185
3208
|
|
|
3186
3209
|
const getNodePath = () => {
|
|
@@ -3198,43 +3221,43 @@ const Platform = {
|
|
|
3198
3221
|
|
|
3199
3222
|
const show$3 = async () => {
|
|
3200
3223
|
// @ts-ignore
|
|
3201
|
-
await invoke
|
|
3224
|
+
await invoke('Panel.selectIndex', 0);
|
|
3202
3225
|
};
|
|
3203
3226
|
const handleFilterInput = async text => {
|
|
3204
3227
|
// @ts-ignore
|
|
3205
|
-
await invoke
|
|
3228
|
+
await invoke('Problems.handleFilterInput', text, Script);
|
|
3206
3229
|
};
|
|
3207
3230
|
const copyMessage = async () => {
|
|
3208
3231
|
// @ts-ignore
|
|
3209
|
-
await invoke
|
|
3232
|
+
await invoke('Problems.copyMessage');
|
|
3210
3233
|
};
|
|
3211
3234
|
const focusIndex$3 = async index => {
|
|
3212
3235
|
// @ts-ignore
|
|
3213
|
-
await invoke
|
|
3236
|
+
await invoke('Problems.focusIndex', index);
|
|
3214
3237
|
};
|
|
3215
3238
|
const handleArrowLeft = async () => {
|
|
3216
3239
|
// @ts-ignore
|
|
3217
|
-
await invoke
|
|
3240
|
+
await invoke('Problems.handleArrowLeft');
|
|
3218
3241
|
};
|
|
3219
3242
|
const handleArrowRight = async () => {
|
|
3220
3243
|
// @ts-ignore
|
|
3221
|
-
await invoke
|
|
3244
|
+
await invoke('Problems.handleArrowRight');
|
|
3222
3245
|
};
|
|
3223
3246
|
const handleClickAt$1 = async (x, y) => {
|
|
3224
3247
|
// @ts-ignore
|
|
3225
|
-
await invoke
|
|
3248
|
+
await invoke('Problems.handleClickAt', x, y);
|
|
3226
3249
|
};
|
|
3227
3250
|
const handleIconThemeChange = async () => {
|
|
3228
3251
|
// @ts-ignore
|
|
3229
|
-
await invoke
|
|
3252
|
+
await invoke('Problems.handleIconThemeChange');
|
|
3230
3253
|
};
|
|
3231
3254
|
const viewAsList = async () => {
|
|
3232
3255
|
// @ts-ignore
|
|
3233
|
-
await invoke
|
|
3256
|
+
await invoke('Problems.viewAsList');
|
|
3234
3257
|
};
|
|
3235
3258
|
const viewAsTable = async () => {
|
|
3236
3259
|
// @ts-ignore
|
|
3237
|
-
await invoke
|
|
3260
|
+
await invoke('Problems.viewAsTable');
|
|
3238
3261
|
};
|
|
3239
3262
|
|
|
3240
3263
|
const Problems = {
|
|
@@ -3260,7 +3283,7 @@ const registerCallbackCommand = async commandId => {
|
|
|
3260
3283
|
} = Promise.withResolvers();
|
|
3261
3284
|
callbacks[id] = resolve;
|
|
3262
3285
|
// @ts-ignore
|
|
3263
|
-
await invoke
|
|
3286
|
+
await invoke(`Test.registerTestCommand`, commandId);
|
|
3264
3287
|
return {
|
|
3265
3288
|
promise
|
|
3266
3289
|
};
|
|
@@ -3270,59 +3293,59 @@ const QuickPick$1 = 'QuickPick';
|
|
|
3270
3293
|
|
|
3271
3294
|
const open$1 = async () => {
|
|
3272
3295
|
// @ts-ignore
|
|
3273
|
-
await invoke
|
|
3296
|
+
await invoke('Viewlet.openWidget', QuickPick$1, 'everything');
|
|
3274
3297
|
};
|
|
3275
3298
|
const handleInput$2 = async value => {
|
|
3276
3299
|
// @ts-ignore
|
|
3277
|
-
await invoke
|
|
3300
|
+
await invoke('QuickPick.handleInput', value, 0);
|
|
3278
3301
|
};
|
|
3279
3302
|
const handleClickAt = async (x, y) => {
|
|
3280
3303
|
// @ts-ignore
|
|
3281
|
-
await invoke
|
|
3304
|
+
await invoke('QuickPick.handleClickAt', x, y);
|
|
3282
3305
|
};
|
|
3283
3306
|
const setValue$1 = async value => {
|
|
3284
3307
|
// @ts-ignore
|
|
3285
|
-
await invoke
|
|
3308
|
+
await invoke('QuickPick.setValue', value);
|
|
3286
3309
|
};
|
|
3287
3310
|
const focusNext$2 = async () => {
|
|
3288
3311
|
// @ts-ignore
|
|
3289
|
-
await invoke
|
|
3312
|
+
await invoke('QuickPick.focusNext');
|
|
3290
3313
|
};
|
|
3291
3314
|
const focusFirst$2 = async () => {
|
|
3292
3315
|
// @ts-ignore
|
|
3293
|
-
await invoke
|
|
3316
|
+
await invoke('QuickPick.focusFirst');
|
|
3294
3317
|
};
|
|
3295
3318
|
const focusLast$1 = async () => {
|
|
3296
3319
|
// @ts-ignore
|
|
3297
|
-
await invoke
|
|
3320
|
+
await invoke('QuickPick.focusLast');
|
|
3298
3321
|
};
|
|
3299
3322
|
const focusIndex$2 = async index => {
|
|
3300
3323
|
// @ts-ignore
|
|
3301
|
-
await invoke
|
|
3324
|
+
await invoke('QuickPick.focusIndex', index);
|
|
3302
3325
|
};
|
|
3303
3326
|
const focusPrevious$2 = async () => {
|
|
3304
3327
|
// @ts-ignore
|
|
3305
|
-
await invoke
|
|
3328
|
+
await invoke('QuickPick.focusPrevious');
|
|
3306
3329
|
};
|
|
3307
3330
|
const selectItem = async label => {
|
|
3308
3331
|
// @ts-ignore
|
|
3309
|
-
await invoke
|
|
3332
|
+
await invoke('QuickPick.selectItem', label);
|
|
3310
3333
|
};
|
|
3311
3334
|
const selectIndex$3 = async index => {
|
|
3312
3335
|
// @ts-ignore
|
|
3313
|
-
await invoke
|
|
3336
|
+
await invoke('QuickPick.selectIndex', index);
|
|
3314
3337
|
};
|
|
3315
3338
|
const selectCurrentIndex = async () => {
|
|
3316
3339
|
// @ts-ignore
|
|
3317
|
-
await invoke
|
|
3340
|
+
await invoke('QuickPick.selectCurrentIndex');
|
|
3318
3341
|
};
|
|
3319
3342
|
const executeCommand = async label => {
|
|
3320
3343
|
// @ts-ignore
|
|
3321
|
-
await invoke
|
|
3344
|
+
await invoke('QuickPick.showCommands');
|
|
3322
3345
|
// @ts-ignore
|
|
3323
|
-
await invoke
|
|
3346
|
+
await invoke('QuickPick.handleInput', label, 0);
|
|
3324
3347
|
// @ts-ignore
|
|
3325
|
-
await invoke
|
|
3348
|
+
await invoke('QuickPick.selectItem', label);
|
|
3326
3349
|
};
|
|
3327
3350
|
const selectItem2 = async ({
|
|
3328
3351
|
callbackCommand,
|
|
@@ -3332,7 +3355,7 @@ const selectItem2 = async ({
|
|
|
3332
3355
|
promise
|
|
3333
3356
|
} = await registerCallbackCommand(callbackCommand);
|
|
3334
3357
|
// @ts-ignore
|
|
3335
|
-
invoke
|
|
3358
|
+
invoke('QuickPick.selectItem', label);
|
|
3336
3359
|
await promise;
|
|
3337
3360
|
};
|
|
3338
3361
|
|
|
@@ -3356,15 +3379,15 @@ const QuickPick = {
|
|
|
3356
3379
|
|
|
3357
3380
|
const clear$1 = async () => {
|
|
3358
3381
|
// @ts-ignore
|
|
3359
|
-
return invoke
|
|
3382
|
+
return invoke('References.clear');
|
|
3360
3383
|
};
|
|
3361
3384
|
const collapseAll$1 = async () => {
|
|
3362
3385
|
// @ts-ignore
|
|
3363
|
-
return invoke
|
|
3386
|
+
return invoke('References.collapseAll');
|
|
3364
3387
|
};
|
|
3365
3388
|
const refresh = async () => {
|
|
3366
3389
|
// @ts-ignore
|
|
3367
|
-
return invoke
|
|
3390
|
+
return invoke('References.refresh');
|
|
3368
3391
|
};
|
|
3369
3392
|
|
|
3370
3393
|
const References = {
|
|
@@ -3379,39 +3402,39 @@ const show$2 = async () => {
|
|
|
3379
3402
|
};
|
|
3380
3403
|
const handleClickSectionBreakPoints = async () => {
|
|
3381
3404
|
// @ts-ignore
|
|
3382
|
-
await invoke
|
|
3405
|
+
await invoke('Run And Debug.handleClickSectionBreakPoints');
|
|
3383
3406
|
};
|
|
3384
3407
|
const handleClickSectionWatch = async () => {
|
|
3385
3408
|
// @ts-ignore
|
|
3386
|
-
await invoke
|
|
3409
|
+
await invoke('Run And Debug.handleClickSectionWatch');
|
|
3387
3410
|
};
|
|
3388
3411
|
const addWatchExpression = async expression => {
|
|
3389
3412
|
// @ts-ignore
|
|
3390
|
-
await invoke
|
|
3413
|
+
await invoke('Run And Debug.addWatchExpression', expression);
|
|
3391
3414
|
};
|
|
3392
3415
|
const handleWatchValueChange = async () => {
|
|
3393
3416
|
// @ts-ignore
|
|
3394
|
-
await invoke
|
|
3417
|
+
await invoke('Run And Debug.handleWatchValueChange');
|
|
3395
3418
|
};
|
|
3396
3419
|
const acceptWatchExpressionEdit = async () => {
|
|
3397
3420
|
// @ts-ignore
|
|
3398
|
-
await invoke
|
|
3421
|
+
await invoke('Run And Debug.acceptWatchExpressionEdit');
|
|
3399
3422
|
};
|
|
3400
3423
|
const selectIndex$2 = async index => {
|
|
3401
3424
|
// @ts-ignore
|
|
3402
|
-
await invoke
|
|
3425
|
+
await invoke('Run And Debug.selectIndex', index);
|
|
3403
3426
|
};
|
|
3404
3427
|
const setPauseOnExceptions = async value => {
|
|
3405
3428
|
// @ts-ignore
|
|
3406
|
-
await invoke
|
|
3429
|
+
await invoke('Run And Debug.setPauseOnExceptions', value);
|
|
3407
3430
|
};
|
|
3408
3431
|
const handleRename = async () => {
|
|
3409
3432
|
// @ts-ignore
|
|
3410
|
-
await invoke
|
|
3433
|
+
await invoke('Run And Debug.handleRename');
|
|
3411
3434
|
};
|
|
3412
3435
|
const handleSpace = async () => {
|
|
3413
3436
|
// @ts-ignore
|
|
3414
|
-
await invoke
|
|
3437
|
+
await invoke('Run And Debug.handleSpace');
|
|
3415
3438
|
};
|
|
3416
3439
|
|
|
3417
3440
|
const RunAndDebug = {
|
|
@@ -3430,124 +3453,124 @@ const RunAndDebug = {
|
|
|
3430
3453
|
|
|
3431
3454
|
const setValue = async value => {
|
|
3432
3455
|
// @ts-ignore
|
|
3433
|
-
await invoke
|
|
3456
|
+
await invoke('Search.handleInput', value, Script);
|
|
3434
3457
|
};
|
|
3435
3458
|
const setReplaceValue = async value => {
|
|
3436
3459
|
// @ts-ignore
|
|
3437
|
-
await invoke
|
|
3460
|
+
await invoke('Search.handleReplaceInput', value, Script);
|
|
3438
3461
|
};
|
|
3439
3462
|
const setExcludeValue = async value => {
|
|
3440
3463
|
// @ts-ignore
|
|
3441
|
-
await invoke
|
|
3464
|
+
await invoke('Search.handleExcludeInput', value, Script);
|
|
3442
3465
|
};
|
|
3443
3466
|
const replaceAll = async () => {
|
|
3444
|
-
await invoke
|
|
3467
|
+
await invoke('Search.replaceAll');
|
|
3445
3468
|
};
|
|
3446
3469
|
const setIncludeValue = async value => {
|
|
3447
3470
|
// @ts-ignore
|
|
3448
|
-
await invoke
|
|
3471
|
+
await invoke('Search.handleIncludeInput', value, Script);
|
|
3449
3472
|
};
|
|
3450
3473
|
const clearSearchResults = async () => {
|
|
3451
|
-
await invoke
|
|
3474
|
+
await invoke('Search.clearSearchResults');
|
|
3452
3475
|
};
|
|
3453
3476
|
const openDetails = async () => {
|
|
3454
|
-
await invoke
|
|
3477
|
+
await invoke('Search.openDetails');
|
|
3455
3478
|
};
|
|
3456
3479
|
const collapseDetails = async () => {
|
|
3457
|
-
await invoke
|
|
3480
|
+
await invoke('Search.collapseDetails');
|
|
3458
3481
|
};
|
|
3459
3482
|
const dismissItem = async () => {
|
|
3460
|
-
await invoke
|
|
3483
|
+
await invoke('Search.dismissItem');
|
|
3461
3484
|
};
|
|
3462
3485
|
const focusFirst$1 = async () => {
|
|
3463
|
-
await invoke
|
|
3486
|
+
await invoke('Search.focusFirst');
|
|
3464
3487
|
};
|
|
3465
3488
|
const focusIndex$1 = async index => {
|
|
3466
|
-
await invoke
|
|
3489
|
+
await invoke('Search.focusIndex', index);
|
|
3467
3490
|
};
|
|
3468
3491
|
const selectIndex$1 = async index => {
|
|
3469
|
-
await invoke
|
|
3492
|
+
await invoke('Search.selectIndex', index);
|
|
3470
3493
|
};
|
|
3471
3494
|
const focusNext$1 = async () => {
|
|
3472
|
-
await invoke
|
|
3495
|
+
await invoke('Search.focusNext');
|
|
3473
3496
|
};
|
|
3474
3497
|
const handleWheel = async (deltaMode, deltaY) => {
|
|
3475
|
-
await invoke
|
|
3498
|
+
await invoke('Search.handleWheel', deltaMode, deltaY);
|
|
3476
3499
|
};
|
|
3477
3500
|
const focusNextPage = async () => {
|
|
3478
3501
|
// @ts-ignore
|
|
3479
|
-
await invoke
|
|
3502
|
+
await invoke('Search.focusPage');
|
|
3480
3503
|
};
|
|
3481
3504
|
const focusPreviousPage = async () => {
|
|
3482
|
-
await invoke
|
|
3505
|
+
await invoke('Search.focusPreviousPage');
|
|
3483
3506
|
};
|
|
3484
3507
|
const focusPrevious$1 = async () => {
|
|
3485
|
-
await invoke
|
|
3508
|
+
await invoke('Search.focusPrevious');
|
|
3486
3509
|
};
|
|
3487
3510
|
const toggleSearchDetails = async () => {
|
|
3488
|
-
await invoke
|
|
3511
|
+
await invoke('Search.toggleSearchDetails');
|
|
3489
3512
|
};
|
|
3490
3513
|
const toggleMatchCase = async () => {
|
|
3491
|
-
await invoke
|
|
3514
|
+
await invoke('Search.toggleMatchCase');
|
|
3492
3515
|
};
|
|
3493
3516
|
const toggleMatchWholeWord = async () => {
|
|
3494
|
-
await invoke
|
|
3517
|
+
await invoke('Search.toggleMatchWholeWord');
|
|
3495
3518
|
};
|
|
3496
3519
|
const togglePreserveCase = async () => {
|
|
3497
|
-
await invoke
|
|
3520
|
+
await invoke('Search.togglePreserveCase');
|
|
3498
3521
|
};
|
|
3499
3522
|
const toggleUseRegularExpression = async () => {
|
|
3500
|
-
await invoke
|
|
3523
|
+
await invoke('Search.toggleUseRegularExpression');
|
|
3501
3524
|
};
|
|
3502
3525
|
const toggleReplace = async () => {
|
|
3503
|
-
await invoke
|
|
3526
|
+
await invoke('Search.toggleReplace');
|
|
3504
3527
|
};
|
|
3505
3528
|
const open = async () => {
|
|
3506
|
-
await invoke
|
|
3529
|
+
await invoke('SideBar.openViewlet', 'Search');
|
|
3507
3530
|
};
|
|
3508
3531
|
const setLimit = async limit => {
|
|
3509
3532
|
// @ts-ignore
|
|
3510
|
-
await invoke
|
|
3533
|
+
await invoke('Search.setLimit', limit);
|
|
3511
3534
|
};
|
|
3512
3535
|
const handleListBlur = async () => {
|
|
3513
3536
|
// @ts-ignore
|
|
3514
|
-
await invoke
|
|
3537
|
+
await invoke('Search.handleListBlur');
|
|
3515
3538
|
};
|
|
3516
3539
|
const collapseAll = async () => {
|
|
3517
3540
|
// @ts-ignore
|
|
3518
|
-
await invoke
|
|
3541
|
+
await invoke('Search.collapseAll');
|
|
3519
3542
|
};
|
|
3520
3543
|
const copy = async () => {
|
|
3521
3544
|
// @ts-ignore
|
|
3522
|
-
await invoke
|
|
3545
|
+
await invoke('Search.copy');
|
|
3523
3546
|
};
|
|
3524
3547
|
const copyPath = async () => {
|
|
3525
3548
|
// @ts-ignore
|
|
3526
|
-
await invoke
|
|
3549
|
+
await invoke('Search.copyPath');
|
|
3527
3550
|
};
|
|
3528
3551
|
const handleInputCut = async name => {
|
|
3529
3552
|
// @ts-ignore
|
|
3530
|
-
await invoke
|
|
3553
|
+
await invoke('Search.handleInputCut', name);
|
|
3531
3554
|
};
|
|
3532
3555
|
const handleInputPaste = async name => {
|
|
3533
3556
|
// @ts-ignore
|
|
3534
|
-
await invoke
|
|
3557
|
+
await invoke('Search.handleInputPaste', name);
|
|
3535
3558
|
};
|
|
3536
3559
|
const handleInputCopy = async name => {
|
|
3537
3560
|
// @ts-ignore
|
|
3538
|
-
await invoke
|
|
3561
|
+
await invoke('Search.handleInputCopy', name);
|
|
3539
3562
|
};
|
|
3540
3563
|
const handleInputSelectionChange = async (name, start, end) => {
|
|
3541
3564
|
// @ts-ignore
|
|
3542
|
-
await invoke
|
|
3565
|
+
await invoke('Search.handleInputSelectionChange', name, start, end);
|
|
3543
3566
|
};
|
|
3544
3567
|
const handleInputContextMenu = async (name, button, x, y) => {
|
|
3545
3568
|
// @ts-ignore
|
|
3546
|
-
await invoke
|
|
3569
|
+
await invoke('Search.handleInputConextMenu', name, button, x, y);
|
|
3547
3570
|
};
|
|
3548
3571
|
const handleContextMenu$2 = async (button, x, y) => {
|
|
3549
3572
|
// @ts-ignore
|
|
3550
|
-
await invoke
|
|
3573
|
+
await invoke('Search.handleContextMenu', name, button, x, y);
|
|
3551
3574
|
};
|
|
3552
3575
|
|
|
3553
3576
|
const Search = {
|
|
@@ -3590,31 +3613,31 @@ const Search = {
|
|
|
3590
3613
|
};
|
|
3591
3614
|
|
|
3592
3615
|
const show$1 = async () => {
|
|
3593
|
-
return invoke
|
|
3616
|
+
return invoke('Main.openUri', 'settings://');
|
|
3594
3617
|
};
|
|
3595
3618
|
const handleInput$1 = async searchValue => {
|
|
3596
3619
|
// @ts-ignore
|
|
3597
|
-
return invoke
|
|
3620
|
+
return invoke('Settings.handleInput', searchValue, Script);
|
|
3598
3621
|
};
|
|
3599
3622
|
const usePreviousSearchValue = async () => {
|
|
3600
3623
|
// @ts-ignore
|
|
3601
|
-
return invoke
|
|
3624
|
+
return invoke('Settings.usePreviousSearchValue');
|
|
3602
3625
|
};
|
|
3603
3626
|
const useNextSearchValue = async () => {
|
|
3604
3627
|
// @ts-ignore
|
|
3605
|
-
return invoke
|
|
3628
|
+
return invoke('Settings.useNextSearchValue');
|
|
3606
3629
|
};
|
|
3607
3630
|
const clear = async searchValue => {
|
|
3608
3631
|
// @ts-ignore
|
|
3609
|
-
return invoke
|
|
3632
|
+
return invoke('Settings.clear', searchValue, Script);
|
|
3610
3633
|
};
|
|
3611
3634
|
const clearHistory = async () => {
|
|
3612
3635
|
// @ts-ignore
|
|
3613
|
-
return invoke
|
|
3636
|
+
return invoke('Settings.clearHistory', searchValue, Script);
|
|
3614
3637
|
};
|
|
3615
3638
|
const selectTab = async tabId => {
|
|
3616
3639
|
// @ts-ignore
|
|
3617
|
-
return invoke
|
|
3640
|
+
return invoke('Settings.handleClickTab', tabId);
|
|
3618
3641
|
};
|
|
3619
3642
|
const selectWorkspace = async () => {
|
|
3620
3643
|
await selectTab('workspace');
|
|
@@ -3630,11 +3653,11 @@ const selectWindow = async () => {
|
|
|
3630
3653
|
};
|
|
3631
3654
|
const handleScroll = async scrollTop => {
|
|
3632
3655
|
// @ts-ignore
|
|
3633
|
-
await invoke
|
|
3656
|
+
await invoke('Settings.handleScroll', scrollTop, Script);
|
|
3634
3657
|
};
|
|
3635
3658
|
const handleClickFilterButton = async (x, y) => {
|
|
3636
3659
|
// @ts-ignore
|
|
3637
|
-
await invoke
|
|
3660
|
+
await invoke('Settings.handleClickFilterButton', x, y);
|
|
3638
3661
|
};
|
|
3639
3662
|
|
|
3640
3663
|
const SettingsView = {
|
|
@@ -3656,20 +3679,20 @@ const SettingsView = {
|
|
|
3656
3679
|
|
|
3657
3680
|
const selectIndex = async index => {
|
|
3658
3681
|
// @ts-ignore
|
|
3659
|
-
await invoke
|
|
3682
|
+
await invoke('Source Control.selectIndex', index);
|
|
3660
3683
|
};
|
|
3661
3684
|
const acceptInput = async () => {
|
|
3662
|
-
await invoke
|
|
3685
|
+
await invoke('Source Control.acceptInput');
|
|
3663
3686
|
};
|
|
3664
3687
|
const handleInput = async text => {
|
|
3665
3688
|
// @ts-ignore
|
|
3666
|
-
await invoke
|
|
3689
|
+
await invoke('Source Control.handleInput', text, Script$1);
|
|
3667
3690
|
};
|
|
3668
3691
|
const handleClickSourceControlButtons = async (index, name) => {
|
|
3669
|
-
await invoke
|
|
3692
|
+
await invoke('Source Control.handleClickSourceControlButtons', index, name);
|
|
3670
3693
|
};
|
|
3671
3694
|
const handleContextMenu$1 = async (button, x, y) => {
|
|
3672
|
-
await invoke
|
|
3695
|
+
await invoke('Source Control.handleContextMenu', button, x, y);
|
|
3673
3696
|
};
|
|
3674
3697
|
const show = async () => {
|
|
3675
3698
|
// @ts-ignore
|
|
@@ -3687,7 +3710,7 @@ const SourceControl = {
|
|
|
3687
3710
|
};
|
|
3688
3711
|
|
|
3689
3712
|
const update = async () => {
|
|
3690
|
-
await invoke
|
|
3713
|
+
await invoke('StatusBar.updateStatusBarItems');
|
|
3691
3714
|
};
|
|
3692
3715
|
|
|
3693
3716
|
const StatusBar = {
|
|
@@ -3697,75 +3720,75 @@ const StatusBar = {
|
|
|
3697
3720
|
|
|
3698
3721
|
const closeMenu = async () => {
|
|
3699
3722
|
// @ts-ignore
|
|
3700
|
-
await invoke
|
|
3723
|
+
await invoke('TitleBar.closeMenu');
|
|
3701
3724
|
};
|
|
3702
3725
|
const focus = async () => {
|
|
3703
3726
|
// @ts-ignore
|
|
3704
|
-
await invoke
|
|
3727
|
+
await invoke('TitleBar.focus');
|
|
3705
3728
|
};
|
|
3706
3729
|
const focusFirst = async () => {
|
|
3707
3730
|
// @ts-ignore
|
|
3708
|
-
await invoke
|
|
3731
|
+
await invoke('TitleBar.focusFirst');
|
|
3709
3732
|
};
|
|
3710
3733
|
const focusIndex = async index => {
|
|
3711
3734
|
// @ts-ignore
|
|
3712
|
-
await invoke
|
|
3735
|
+
await invoke('TitleBar.focusIndex', index);
|
|
3713
3736
|
};
|
|
3714
3737
|
const focusLast = async () => {
|
|
3715
3738
|
// @ts-ignore
|
|
3716
|
-
await invoke
|
|
3739
|
+
await invoke('TitleBar.focusLast');
|
|
3717
3740
|
};
|
|
3718
3741
|
const focusNext = async () => {
|
|
3719
3742
|
// @ts-ignore
|
|
3720
|
-
await invoke
|
|
3743
|
+
await invoke('TitleBar.focusNext');
|
|
3721
3744
|
};
|
|
3722
3745
|
const focusPrevious = async () => {
|
|
3723
3746
|
// @ts-ignore
|
|
3724
|
-
await invoke
|
|
3747
|
+
await invoke('TitleBar.focusPrevious');
|
|
3725
3748
|
};
|
|
3726
3749
|
const handleKeyArrowDown = async () => {
|
|
3727
3750
|
// @ts-ignore
|
|
3728
|
-
await invoke
|
|
3751
|
+
await invoke('TitleBar.handleKeyArrowDown');
|
|
3729
3752
|
};
|
|
3730
3753
|
const handleKeyArrowLeft = async () => {
|
|
3731
3754
|
// @ts-ignore
|
|
3732
|
-
await invoke
|
|
3755
|
+
await invoke('TitleBar.handleKeyArrowLeft');
|
|
3733
3756
|
};
|
|
3734
3757
|
const handleKeyArrowRight = async () => {
|
|
3735
3758
|
// @ts-ignore
|
|
3736
|
-
await invoke
|
|
3759
|
+
await invoke('TitleBar.handleKeyArrowRight');
|
|
3737
3760
|
};
|
|
3738
3761
|
const handleKeyArrowUp = async () => {
|
|
3739
3762
|
// @ts-ignore
|
|
3740
|
-
await invoke
|
|
3763
|
+
await invoke('TitleBar.handleKeyArrowUp');
|
|
3741
3764
|
};
|
|
3742
3765
|
const handleKeyEnd = async () => {
|
|
3743
3766
|
// @ts-ignore
|
|
3744
|
-
await invoke
|
|
3767
|
+
await invoke('TitleBar.handleKeyEnd');
|
|
3745
3768
|
};
|
|
3746
3769
|
const handleKeyHome = async () => {
|
|
3747
3770
|
// @ts-ignore
|
|
3748
|
-
await invoke
|
|
3771
|
+
await invoke('TitleBar.handleKeyHome');
|
|
3749
3772
|
};
|
|
3750
3773
|
const handleKeySpace = async () => {
|
|
3751
3774
|
// @ts-ignore
|
|
3752
|
-
await invoke
|
|
3775
|
+
await invoke('TitleBar.handleKeySpace');
|
|
3753
3776
|
};
|
|
3754
3777
|
const handleKeyEscape = async () => {
|
|
3755
3778
|
// @ts-ignore
|
|
3756
|
-
await invoke
|
|
3779
|
+
await invoke('TitleBar.handleKeyEscape');
|
|
3757
3780
|
};
|
|
3758
3781
|
const toggleIndex = async index => {
|
|
3759
3782
|
// @ts-ignore
|
|
3760
|
-
await invoke
|
|
3783
|
+
await invoke('TitleBar.toggleIndex', index);
|
|
3761
3784
|
};
|
|
3762
3785
|
const toggleMenu = async () => {
|
|
3763
3786
|
// @ts-ignore
|
|
3764
|
-
await invoke
|
|
3787
|
+
await invoke('TitleBar.toggleMenu');
|
|
3765
3788
|
};
|
|
3766
3789
|
const handleContextMenu = async (button, x, y) => {
|
|
3767
3790
|
// @ts-ignore
|
|
3768
|
-
await invoke
|
|
3791
|
+
await invoke('TitleBar.handleContextMenu', button, x, y);
|
|
3769
3792
|
};
|
|
3770
3793
|
|
|
3771
3794
|
const TitleBarMenuBar = {
|
|
@@ -3817,7 +3840,7 @@ const getPortTuple = () => {
|
|
|
3817
3840
|
|
|
3818
3841
|
// TODO ask webview worker directly
|
|
3819
3842
|
const getWebViewInfo = async webViewId => {
|
|
3820
|
-
const info = await invoke
|
|
3843
|
+
const info = await invoke('WebView.getWebViewInfo2', webViewId);
|
|
3821
3844
|
return info;
|
|
3822
3845
|
};
|
|
3823
3846
|
|
|
@@ -3881,7 +3904,7 @@ const WebView = {
|
|
|
3881
3904
|
};
|
|
3882
3905
|
|
|
3883
3906
|
const setPath = async path => {
|
|
3884
|
-
await invoke
|
|
3907
|
+
await invoke('Workspace.setPath', path);
|
|
3885
3908
|
};
|
|
3886
3909
|
const openTmpDir = async () => {
|
|
3887
3910
|
const tmpDir = await getTmpDir();
|
|
@@ -4037,7 +4060,7 @@ const executeTest = async (name, fn, globals = {}) => {
|
|
|
4037
4060
|
console.info(`PASS ${name} in ${formattedDuration}`);
|
|
4038
4061
|
}
|
|
4039
4062
|
// @ts-ignore
|
|
4040
|
-
await invoke
|
|
4063
|
+
await invoke('TestFrameWork.showOverlay', type, background, text);
|
|
4041
4064
|
};
|
|
4042
4065
|
|
|
4043
4066
|
const hotReloadEnabled = async () => {
|
|
@@ -4095,7 +4118,7 @@ const watchForHotReload = async (platform, href) => {
|
|
|
4095
4118
|
const fileUrl = getFileUri(href);
|
|
4096
4119
|
const callbackCommand = 'FileWatcher.handleEvent';
|
|
4097
4120
|
// @ts-ignore
|
|
4098
|
-
await invoke
|
|
4121
|
+
await invoke('FileWatcher.watchFile', TestWorker, callbackCommand, fileUrl);
|
|
4099
4122
|
};
|
|
4100
4123
|
|
|
4101
4124
|
// TODO move this into three steps:
|
|
@@ -4186,25 +4209,17 @@ const commandMap = {
|
|
|
4186
4209
|
'Test.executeMock': executeMock
|
|
4187
4210
|
};
|
|
4188
4211
|
|
|
4189
|
-
const
|
|
4190
|
-
await sendMessagePortToEditorWorker(port, TestWorker);
|
|
4191
|
-
};
|
|
4192
|
-
const launchEditorWorkerRpc = async () => {
|
|
4193
|
-
const rpc = await TransferMessagePortRpcParent.create({
|
|
4194
|
-
commandMap: {},
|
|
4195
|
-
send
|
|
4196
|
-
});
|
|
4197
|
-
return rpc;
|
|
4198
|
-
};
|
|
4199
|
-
|
|
4200
|
-
const listen = async () => {
|
|
4201
|
-
setFactory(launchEditorWorkerRpc);
|
|
4212
|
+
const initializeRendererWorker = async () => {
|
|
4202
4213
|
const rpc = await WebWorkerRpcClient.create({
|
|
4203
4214
|
commandMap: commandMap
|
|
4204
4215
|
});
|
|
4205
4216
|
set$1(rpc);
|
|
4206
4217
|
};
|
|
4207
4218
|
|
|
4219
|
+
const listen = async () => {
|
|
4220
|
+
await Promise.all([initializeRendererWorker(), initializeEditorWorker()]);
|
|
4221
|
+
};
|
|
4222
|
+
|
|
4208
4223
|
const main = async () => {
|
|
4209
4224
|
await listen();
|
|
4210
4225
|
};
|