@lvce-editor/test-worker 13.18.0 → 13.19.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 +612 -637
- package/package.json +1 -1
package/dist/testWorkerMain.js
CHANGED
|
@@ -510,6 +510,27 @@ const IpcParentWithMessagePort$1 = {
|
|
|
510
510
|
wrap: wrap$5
|
|
511
511
|
};
|
|
512
512
|
|
|
513
|
+
class CommandNotFoundError extends Error {
|
|
514
|
+
constructor(command) {
|
|
515
|
+
super(`Command not found ${command}`);
|
|
516
|
+
this.name = 'CommandNotFoundError';
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
const commands = Object.create(null);
|
|
520
|
+
const register = commandMap => {
|
|
521
|
+
Object.assign(commands, commandMap);
|
|
522
|
+
};
|
|
523
|
+
const getCommand = key => {
|
|
524
|
+
return commands[key];
|
|
525
|
+
};
|
|
526
|
+
const execute$2 = (command, ...args) => {
|
|
527
|
+
const fn = getCommand(command);
|
|
528
|
+
if (!fn) {
|
|
529
|
+
throw new CommandNotFoundError(command);
|
|
530
|
+
}
|
|
531
|
+
return fn(...args);
|
|
532
|
+
};
|
|
533
|
+
|
|
513
534
|
const Two$1 = '2.0';
|
|
514
535
|
const callbacks$1 = Object.create(null);
|
|
515
536
|
const get$2 = id => {
|
|
@@ -534,12 +555,12 @@ const getErrorConstructor = (message, type) => {
|
|
|
534
555
|
switch (type) {
|
|
535
556
|
case DomException:
|
|
536
557
|
return DOMException;
|
|
537
|
-
case TypeError$1:
|
|
538
|
-
return TypeError;
|
|
539
|
-
case SyntaxError$1:
|
|
540
|
-
return SyntaxError;
|
|
541
558
|
case ReferenceError$1:
|
|
542
559
|
return ReferenceError;
|
|
560
|
+
case SyntaxError$1:
|
|
561
|
+
return SyntaxError;
|
|
562
|
+
case TypeError$1:
|
|
563
|
+
return TypeError;
|
|
543
564
|
default:
|
|
544
565
|
return Error;
|
|
545
566
|
}
|
|
@@ -695,56 +716,56 @@ const getErrorProperty = (error, prettyError) => {
|
|
|
695
716
|
if (error && error.code === E_COMMAND_NOT_FOUND) {
|
|
696
717
|
return {
|
|
697
718
|
code: MethodNotFound,
|
|
698
|
-
|
|
699
|
-
|
|
719
|
+
data: error.stack,
|
|
720
|
+
message: error.message
|
|
700
721
|
};
|
|
701
722
|
}
|
|
702
723
|
return {
|
|
703
724
|
code: Custom,
|
|
704
|
-
message: prettyError.message,
|
|
705
725
|
data: {
|
|
706
|
-
stack: getStack(prettyError),
|
|
707
|
-
codeFrame: prettyError.codeFrame,
|
|
708
|
-
type: getErrorType(prettyError),
|
|
709
726
|
code: prettyError.code,
|
|
710
|
-
|
|
711
|
-
|
|
727
|
+
codeFrame: prettyError.codeFrame,
|
|
728
|
+
name: prettyError.name,
|
|
729
|
+
stack: getStack(prettyError),
|
|
730
|
+
type: getErrorType(prettyError)
|
|
731
|
+
},
|
|
732
|
+
message: prettyError.message
|
|
712
733
|
};
|
|
713
734
|
};
|
|
714
|
-
const create$1 = (id, error) => {
|
|
735
|
+
const create$1$1 = (id, error) => {
|
|
715
736
|
return {
|
|
716
|
-
|
|
737
|
+
error,
|
|
717
738
|
id,
|
|
718
|
-
|
|
739
|
+
jsonrpc: Two$1
|
|
719
740
|
};
|
|
720
741
|
};
|
|
721
742
|
const getErrorResponse = (id, error, preparePrettyError, logError) => {
|
|
722
743
|
const prettyError = preparePrettyError(error);
|
|
723
744
|
logError(error, prettyError);
|
|
724
745
|
const errorProperty = getErrorProperty(error, prettyError);
|
|
725
|
-
return create$1(id, errorProperty);
|
|
746
|
+
return create$1$1(id, errorProperty);
|
|
726
747
|
};
|
|
727
|
-
const create$
|
|
748
|
+
const create$9 = (message, result) => {
|
|
728
749
|
return {
|
|
729
|
-
jsonrpc: Two$1,
|
|
730
750
|
id: message.id,
|
|
751
|
+
jsonrpc: Two$1,
|
|
731
752
|
result: result ?? null
|
|
732
753
|
};
|
|
733
754
|
};
|
|
734
755
|
const getSuccessResponse = (message, result) => {
|
|
735
756
|
const resultProperty = result ?? null;
|
|
736
|
-
return create$
|
|
757
|
+
return create$9(message, resultProperty);
|
|
737
758
|
};
|
|
738
759
|
const getErrorResponseSimple = (id, error) => {
|
|
739
760
|
return {
|
|
740
|
-
jsonrpc: Two$1,
|
|
741
|
-
id,
|
|
742
761
|
error: {
|
|
743
762
|
code: Custom,
|
|
763
|
+
data: error,
|
|
744
764
|
// @ts-ignore
|
|
745
|
-
message: error.message
|
|
746
|
-
|
|
747
|
-
|
|
765
|
+
message: error.message
|
|
766
|
+
},
|
|
767
|
+
id,
|
|
768
|
+
jsonrpc: Two$1
|
|
748
769
|
};
|
|
749
770
|
};
|
|
750
771
|
const getResponse = async (message, ipc, execute, preparePrettyError, logError, requiresSocket) => {
|
|
@@ -774,35 +795,35 @@ const normalizeParams = args => {
|
|
|
774
795
|
if (args.length === 1) {
|
|
775
796
|
const options = args[0];
|
|
776
797
|
return {
|
|
798
|
+
execute: options.execute,
|
|
777
799
|
ipc: options.ipc,
|
|
800
|
+
logError: options.logError || defaultLogError,
|
|
778
801
|
message: options.message,
|
|
779
|
-
execute: options.execute,
|
|
780
|
-
resolve: options.resolve || defaultResolve,
|
|
781
802
|
preparePrettyError: options.preparePrettyError || defaultPreparePrettyError,
|
|
782
|
-
|
|
783
|
-
|
|
803
|
+
requiresSocket: options.requiresSocket || defaultRequiresSocket,
|
|
804
|
+
resolve: options.resolve || defaultResolve
|
|
784
805
|
};
|
|
785
806
|
}
|
|
786
807
|
return {
|
|
808
|
+
execute: args[2],
|
|
787
809
|
ipc: args[0],
|
|
810
|
+
logError: args[5],
|
|
788
811
|
message: args[1],
|
|
789
|
-
execute: args[2],
|
|
790
|
-
resolve: args[3],
|
|
791
812
|
preparePrettyError: args[4],
|
|
792
|
-
|
|
793
|
-
|
|
813
|
+
requiresSocket: args[6],
|
|
814
|
+
resolve: args[3]
|
|
794
815
|
};
|
|
795
816
|
};
|
|
796
817
|
const handleJsonRpcMessage = async (...args) => {
|
|
797
818
|
const options = normalizeParams(args);
|
|
798
819
|
const {
|
|
799
|
-
message,
|
|
800
|
-
ipc,
|
|
801
820
|
execute,
|
|
802
|
-
|
|
803
|
-
preparePrettyError,
|
|
821
|
+
ipc,
|
|
804
822
|
logError,
|
|
805
|
-
|
|
823
|
+
message,
|
|
824
|
+
preparePrettyError,
|
|
825
|
+
requiresSocket,
|
|
826
|
+
resolve
|
|
806
827
|
} = options;
|
|
807
828
|
if ('id' in message) {
|
|
808
829
|
if ('method' in message) {
|
|
@@ -825,36 +846,17 @@ const handleJsonRpcMessage = async (...args) => {
|
|
|
825
846
|
throw new JsonRpcError('unexpected message');
|
|
826
847
|
};
|
|
827
848
|
|
|
828
|
-
class CommandNotFoundError extends Error {
|
|
829
|
-
constructor(command) {
|
|
830
|
-
super(`Command not found ${command}`);
|
|
831
|
-
this.name = 'CommandNotFoundError';
|
|
832
|
-
}
|
|
833
|
-
}
|
|
834
|
-
const commands = Object.create(null);
|
|
835
|
-
const register = commandMap => {
|
|
836
|
-
Object.assign(commands, commandMap);
|
|
837
|
-
};
|
|
838
|
-
const getCommand = key => {
|
|
839
|
-
return commands[key];
|
|
840
|
-
};
|
|
841
|
-
const execute$2 = (command, ...args) => {
|
|
842
|
-
const fn = getCommand(command);
|
|
843
|
-
if (!fn) {
|
|
844
|
-
throw new CommandNotFoundError(command);
|
|
845
|
-
}
|
|
846
|
-
return fn(...args);
|
|
847
|
-
};
|
|
848
|
-
|
|
849
849
|
const Two = '2.0';
|
|
850
|
-
|
|
850
|
+
|
|
851
|
+
const create$8 = (method, params) => {
|
|
851
852
|
return {
|
|
852
853
|
jsonrpc: Two,
|
|
853
854
|
method,
|
|
854
855
|
params
|
|
855
856
|
};
|
|
856
857
|
};
|
|
857
|
-
|
|
858
|
+
|
|
859
|
+
const create$7 = (id, method, params) => {
|
|
858
860
|
const message = {
|
|
859
861
|
id,
|
|
860
862
|
jsonrpc: Two,
|
|
@@ -863,15 +865,14 @@ const create$s = (id, method, params) => {
|
|
|
863
865
|
};
|
|
864
866
|
return message;
|
|
865
867
|
};
|
|
868
|
+
|
|
866
869
|
let id = 0;
|
|
867
|
-
const create$
|
|
870
|
+
const create$6 = () => {
|
|
868
871
|
return ++id;
|
|
869
872
|
};
|
|
870
873
|
|
|
871
|
-
/* eslint-disable n/no-unsupported-features/es-syntax */
|
|
872
|
-
|
|
873
874
|
const registerPromise = map => {
|
|
874
|
-
const id = create$
|
|
875
|
+
const id = create$6();
|
|
875
876
|
const {
|
|
876
877
|
promise,
|
|
877
878
|
resolve
|
|
@@ -883,13 +884,12 @@ const registerPromise = map => {
|
|
|
883
884
|
};
|
|
884
885
|
};
|
|
885
886
|
|
|
886
|
-
// @ts-ignore
|
|
887
887
|
const invokeHelper = async (callbacks, ipc, method, params, useSendAndTransfer) => {
|
|
888
888
|
const {
|
|
889
889
|
id,
|
|
890
890
|
promise
|
|
891
891
|
} = registerPromise(callbacks);
|
|
892
|
-
const message = create$
|
|
892
|
+
const message = create$7(id, method, params);
|
|
893
893
|
if (useSendAndTransfer && ipc.sendAndTransfer) {
|
|
894
894
|
ipc.sendAndTransfer(message);
|
|
895
895
|
} else {
|
|
@@ -925,12 +925,13 @@ const createRpc = ipc => {
|
|
|
925
925
|
* @deprecated
|
|
926
926
|
*/
|
|
927
927
|
send(method, ...params) {
|
|
928
|
-
const message = create$
|
|
928
|
+
const message = create$8(method, params);
|
|
929
929
|
ipc.send(message);
|
|
930
930
|
}
|
|
931
931
|
};
|
|
932
932
|
return rpc;
|
|
933
933
|
};
|
|
934
|
+
|
|
934
935
|
const requiresSocket = () => {
|
|
935
936
|
return false;
|
|
936
937
|
};
|
|
@@ -945,6 +946,7 @@ const handleMessage = event => {
|
|
|
945
946
|
const actualExecute = event?.target?.execute || execute$2;
|
|
946
947
|
return handleJsonRpcMessage(event.target, event.data, actualExecute, event.target._resolve, preparePrettyError, logError, actualRequiresSocket);
|
|
947
948
|
};
|
|
949
|
+
|
|
948
950
|
const handleIpc = ipc => {
|
|
949
951
|
if ('addEventListener' in ipc) {
|
|
950
952
|
ipc.addEventListener('message', handleMessage);
|
|
@@ -953,6 +955,7 @@ const handleIpc = ipc => {
|
|
|
953
955
|
ipc.on('message', handleMessage);
|
|
954
956
|
}
|
|
955
957
|
};
|
|
958
|
+
|
|
956
959
|
const listen$1 = async (module, options) => {
|
|
957
960
|
const rawIpc = await module.listen(options);
|
|
958
961
|
if (module.signal) {
|
|
@@ -962,7 +965,40 @@ const listen$1 = async (module, options) => {
|
|
|
962
965
|
return ipc;
|
|
963
966
|
};
|
|
964
967
|
|
|
965
|
-
|
|
968
|
+
const create$5 = async ({
|
|
969
|
+
commandMap,
|
|
970
|
+
isMessagePortOpen = true,
|
|
971
|
+
messagePort
|
|
972
|
+
}) => {
|
|
973
|
+
// TODO create a commandMap per rpc instance
|
|
974
|
+
register(commandMap);
|
|
975
|
+
const rawIpc = await IpcParentWithMessagePort$1.create({
|
|
976
|
+
isMessagePortOpen,
|
|
977
|
+
messagePort
|
|
978
|
+
});
|
|
979
|
+
const ipc = IpcParentWithMessagePort$1.wrap(rawIpc);
|
|
980
|
+
handleIpc(ipc);
|
|
981
|
+
const rpc = createRpc(ipc);
|
|
982
|
+
messagePort.start();
|
|
983
|
+
return rpc;
|
|
984
|
+
};
|
|
985
|
+
|
|
986
|
+
const create$4 = async ({
|
|
987
|
+
commandMap,
|
|
988
|
+
isMessagePortOpen,
|
|
989
|
+
send
|
|
990
|
+
}) => {
|
|
991
|
+
const {
|
|
992
|
+
port1,
|
|
993
|
+
port2
|
|
994
|
+
} = new MessageChannel();
|
|
995
|
+
await send(port1);
|
|
996
|
+
return create$5({
|
|
997
|
+
commandMap,
|
|
998
|
+
isMessagePortOpen,
|
|
999
|
+
messagePort: port2
|
|
1000
|
+
});
|
|
1001
|
+
};
|
|
966
1002
|
|
|
967
1003
|
const createSharedLazyRpc = factory => {
|
|
968
1004
|
let rpcPromise;
|
|
@@ -991,23 +1027,22 @@ const createSharedLazyRpc = factory => {
|
|
|
991
1027
|
}
|
|
992
1028
|
};
|
|
993
1029
|
};
|
|
994
|
-
|
|
1030
|
+
|
|
1031
|
+
const create$3 = async ({
|
|
995
1032
|
commandMap,
|
|
996
1033
|
isMessagePortOpen,
|
|
997
1034
|
send
|
|
998
1035
|
}) => {
|
|
999
1036
|
return createSharedLazyRpc(() => {
|
|
1000
|
-
return create$
|
|
1037
|
+
return create$4({
|
|
1001
1038
|
commandMap,
|
|
1002
1039
|
isMessagePortOpen,
|
|
1003
1040
|
send
|
|
1004
1041
|
});
|
|
1005
1042
|
});
|
|
1006
1043
|
};
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
};
|
|
1010
|
-
const create$e = async ({
|
|
1044
|
+
|
|
1045
|
+
const create$2 = async ({
|
|
1011
1046
|
commandMap,
|
|
1012
1047
|
isMessagePortOpen,
|
|
1013
1048
|
messagePort
|
|
@@ -1023,43 +1058,8 @@ const create$e = async ({
|
|
|
1023
1058
|
const rpc = createRpc(ipc);
|
|
1024
1059
|
return rpc;
|
|
1025
1060
|
};
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
};
|
|
1029
|
-
const create$5 = async ({
|
|
1030
|
-
commandMap,
|
|
1031
|
-
isMessagePortOpen = true,
|
|
1032
|
-
messagePort
|
|
1033
|
-
}) => {
|
|
1034
|
-
// TODO create a commandMap per rpc instance
|
|
1035
|
-
register(commandMap);
|
|
1036
|
-
const rawIpc = await IpcParentWithMessagePort$1.create({
|
|
1037
|
-
isMessagePortOpen,
|
|
1038
|
-
messagePort
|
|
1039
|
-
});
|
|
1040
|
-
const ipc = IpcParentWithMessagePort$1.wrap(rawIpc);
|
|
1041
|
-
handleIpc(ipc);
|
|
1042
|
-
const rpc = createRpc(ipc);
|
|
1043
|
-
messagePort.start();
|
|
1044
|
-
return rpc;
|
|
1045
|
-
};
|
|
1046
|
-
const create$3 = async ({
|
|
1047
|
-
commandMap,
|
|
1048
|
-
isMessagePortOpen,
|
|
1049
|
-
send
|
|
1050
|
-
}) => {
|
|
1051
|
-
const {
|
|
1052
|
-
port1,
|
|
1053
|
-
port2
|
|
1054
|
-
} = new MessageChannel();
|
|
1055
|
-
await send(port1);
|
|
1056
|
-
return create$5({
|
|
1057
|
-
commandMap,
|
|
1058
|
-
isMessagePortOpen,
|
|
1059
|
-
messagePort: port2
|
|
1060
|
-
});
|
|
1061
|
-
};
|
|
1062
|
-
const create$2 = async ({
|
|
1061
|
+
|
|
1062
|
+
const create$1 = async ({
|
|
1063
1063
|
commandMap
|
|
1064
1064
|
}) => {
|
|
1065
1065
|
// TODO create a commandMap per rpc instance
|
|
@@ -1069,9 +1069,7 @@ const create$2 = async ({
|
|
|
1069
1069
|
const rpc = createRpc(ipc);
|
|
1070
1070
|
return rpc;
|
|
1071
1071
|
};
|
|
1072
|
-
|
|
1073
|
-
create: create$2
|
|
1074
|
-
};
|
|
1072
|
+
|
|
1075
1073
|
const createMockRpc = ({
|
|
1076
1074
|
commandMap
|
|
1077
1075
|
}) => {
|
|
@@ -1092,18 +1090,6 @@ const createMockRpc = ({
|
|
|
1092
1090
|
return mockRpc;
|
|
1093
1091
|
};
|
|
1094
1092
|
|
|
1095
|
-
const Directory = 3;
|
|
1096
|
-
|
|
1097
|
-
const Script$1 = 2;
|
|
1098
|
-
|
|
1099
|
-
const Web = 1;
|
|
1100
|
-
const Remote = 3;
|
|
1101
|
-
|
|
1102
|
-
const EditorWorker = 99;
|
|
1103
|
-
const OpenerWorker = 4561;
|
|
1104
|
-
const RendererWorker = 1;
|
|
1105
|
-
const TestWorker = 9001;
|
|
1106
|
-
|
|
1107
1093
|
const rpcs = Object.create(null);
|
|
1108
1094
|
const set$4 = (id, rpc) => {
|
|
1109
1095
|
rpcs[id] = rpc;
|
|
@@ -1152,6 +1138,18 @@ const create = rpcId => {
|
|
|
1152
1138
|
};
|
|
1153
1139
|
};
|
|
1154
1140
|
|
|
1141
|
+
const Directory = 3;
|
|
1142
|
+
|
|
1143
|
+
const Script$1 = 2;
|
|
1144
|
+
|
|
1145
|
+
const Web = 1;
|
|
1146
|
+
const Remote = 3;
|
|
1147
|
+
|
|
1148
|
+
const EditorWorker = 99;
|
|
1149
|
+
const OpenerWorker = 4561;
|
|
1150
|
+
const RendererWorker = 1;
|
|
1151
|
+
const TestWorker = 9001;
|
|
1152
|
+
|
|
1155
1153
|
const {
|
|
1156
1154
|
invoke: invoke$2,
|
|
1157
1155
|
set: set$3
|
|
@@ -1159,8 +1157,13 @@ const {
|
|
|
1159
1157
|
|
|
1160
1158
|
const {
|
|
1161
1159
|
invoke: invoke$1,
|
|
1162
|
-
invokeAndTransfer,
|
|
1163
1160
|
set: set$2
|
|
1161
|
+
} = create(OpenerWorker);
|
|
1162
|
+
|
|
1163
|
+
const {
|
|
1164
|
+
invoke,
|
|
1165
|
+
invokeAndTransfer,
|
|
1166
|
+
set: set$1
|
|
1164
1167
|
} = create(RendererWorker);
|
|
1165
1168
|
const sendMessagePortToEditorWorker = async (port, rpcId) => {
|
|
1166
1169
|
const command = 'HandleMessagePort.handleMessagePort';
|
|
@@ -1171,22 +1174,17 @@ const sendMessagePortToOpenerWorker = async (port, rpcId) => {
|
|
|
1171
1174
|
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToOpenerWorker', port, command, rpcId);
|
|
1172
1175
|
};
|
|
1173
1176
|
const readFile$1 = async uri => {
|
|
1174
|
-
return invoke
|
|
1177
|
+
return invoke('FileSystem.readFile', uri);
|
|
1175
1178
|
};
|
|
1176
1179
|
const getPreference = async key => {
|
|
1177
|
-
return await invoke
|
|
1180
|
+
return await invoke('Preferences.get', key);
|
|
1178
1181
|
};
|
|
1179
1182
|
|
|
1180
|
-
const {
|
|
1181
|
-
invoke,
|
|
1182
|
-
set: set$1
|
|
1183
|
-
} = create(OpenerWorker);
|
|
1184
|
-
|
|
1185
1183
|
const send$1 = async port => {
|
|
1186
1184
|
await sendMessagePortToEditorWorker(port, TestWorker);
|
|
1187
1185
|
};
|
|
1188
1186
|
const initializeEditorWorker = async () => {
|
|
1189
|
-
const rpc = await
|
|
1187
|
+
const rpc = await create$3({
|
|
1190
1188
|
commandMap: {},
|
|
1191
1189
|
send: send$1
|
|
1192
1190
|
});
|
|
@@ -1197,11 +1195,11 @@ const send = async port => {
|
|
|
1197
1195
|
await sendMessagePortToOpenerWorker(port, TestWorker);
|
|
1198
1196
|
};
|
|
1199
1197
|
const initializeOpenerWorker = async () => {
|
|
1200
|
-
const rpc = await
|
|
1198
|
+
const rpc = await create$3({
|
|
1201
1199
|
commandMap: {},
|
|
1202
1200
|
send
|
|
1203
1201
|
});
|
|
1204
|
-
set$
|
|
1202
|
+
set$2(rpc);
|
|
1205
1203
|
};
|
|
1206
1204
|
|
|
1207
1205
|
class AssertionError extends Error {
|
|
@@ -1224,7 +1222,7 @@ const getLocatorInvoke = locator => {
|
|
|
1224
1222
|
const module = get(locator.webViewId);
|
|
1225
1223
|
return module.invoke;
|
|
1226
1224
|
}
|
|
1227
|
-
return invoke
|
|
1225
|
+
return invoke;
|
|
1228
1226
|
};
|
|
1229
1227
|
|
|
1230
1228
|
const locatorInvoke = async (locator, method, ...params) => {
|
|
@@ -1373,7 +1371,6 @@ const toHaveJSProperty = async (locator, options) => {
|
|
|
1373
1371
|
return `expected ${locatorString} to have js property ${key} ${value} but was ${actual}`;
|
|
1374
1372
|
};
|
|
1375
1373
|
|
|
1376
|
-
/* eslint-disable @typescript-eslint/only-throw-error */
|
|
1377
1374
|
const getFunction = fnName => {
|
|
1378
1375
|
switch (fnName) {
|
|
1379
1376
|
case 'toBeFocused':
|
|
@@ -1405,7 +1402,6 @@ const getFunction = fnName => {
|
|
|
1405
1402
|
}
|
|
1406
1403
|
};
|
|
1407
1404
|
|
|
1408
|
-
/* eslint-disable @typescript-eslint/only-throw-error */
|
|
1409
1405
|
const string = (value, message) => {
|
|
1410
1406
|
if (typeof value !== 'string') {
|
|
1411
1407
|
throw new TypeError(message);
|
|
@@ -1417,8 +1413,6 @@ const number = (value, message) => {
|
|
|
1417
1413
|
}
|
|
1418
1414
|
};
|
|
1419
1415
|
|
|
1420
|
-
/* eslint-disable @typescript-eslint/only-throw-error, @typescript-eslint/prefer-readonly-parameter-types */
|
|
1421
|
-
|
|
1422
1416
|
const expect$1 = locator => {
|
|
1423
1417
|
return new Expect(locator);
|
|
1424
1418
|
};
|
|
@@ -1554,7 +1548,6 @@ const performAction = async (locator, action, options) => {
|
|
|
1554
1548
|
return invoke('TestFrameWork.performAction', locator, action, options);
|
|
1555
1549
|
};
|
|
1556
1550
|
|
|
1557
|
-
/* eslint-disable @typescript-eslint/only-throw-error */
|
|
1558
1551
|
const toButtonNumber = buttonType => {
|
|
1559
1552
|
switch (buttonType) {
|
|
1560
1553
|
case 'left':
|
|
@@ -1640,29 +1633,29 @@ const skipTest = async id => {
|
|
|
1640
1633
|
const state = 'skip';
|
|
1641
1634
|
const background = 'yellow';
|
|
1642
1635
|
const text = `test skipped ${id}`;
|
|
1643
|
-
await invoke
|
|
1636
|
+
await invoke('TestFrameWork.showOverlay', state, background, text);
|
|
1644
1637
|
};
|
|
1645
1638
|
const {
|
|
1646
1639
|
expect
|
|
1647
1640
|
} = Expect$1;
|
|
1648
1641
|
|
|
1649
1642
|
const show$7 = async () => {
|
|
1650
|
-
return invoke
|
|
1643
|
+
return invoke('About.showAbout');
|
|
1651
1644
|
};
|
|
1652
1645
|
const handleClickOk = async () => {
|
|
1653
|
-
return invoke
|
|
1646
|
+
return invoke('About.handleClickOk');
|
|
1654
1647
|
};
|
|
1655
1648
|
const handleClickClose$1 = async () => {
|
|
1656
|
-
return invoke
|
|
1649
|
+
return invoke('About.handleClickClose');
|
|
1657
1650
|
};
|
|
1658
1651
|
const handleClickCopy = async () => {
|
|
1659
|
-
return invoke
|
|
1652
|
+
return invoke('About.handleClickCopy');
|
|
1660
1653
|
};
|
|
1661
1654
|
const focusNext$9 = async () => {
|
|
1662
|
-
return invoke
|
|
1655
|
+
return invoke('About.focusNext');
|
|
1663
1656
|
};
|
|
1664
1657
|
const focusPrevious$8 = async () => {
|
|
1665
|
-
return invoke
|
|
1658
|
+
return invoke('About.focusPrevious');
|
|
1666
1659
|
};
|
|
1667
1660
|
|
|
1668
1661
|
const About = {
|
|
@@ -1674,42 +1667,41 @@ const About = {
|
|
|
1674
1667
|
show: show$7
|
|
1675
1668
|
};
|
|
1676
1669
|
|
|
1677
|
-
/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types */
|
|
1678
1670
|
const focus$2 = async () => {
|
|
1679
|
-
await invoke
|
|
1671
|
+
await invoke('ActivityBar.focus');
|
|
1680
1672
|
};
|
|
1681
1673
|
const toggleActivityBarItem = async id => {
|
|
1682
|
-
await invoke
|
|
1674
|
+
await invoke('ActivityBar.toggleActivityBarItem', id);
|
|
1683
1675
|
};
|
|
1684
1676
|
const focusFirst$7 = async () => {
|
|
1685
|
-
await invoke
|
|
1677
|
+
await invoke('ActivityBar.focusFirst');
|
|
1686
1678
|
};
|
|
1687
1679
|
const setAccountEnabled = async enabled => {
|
|
1688
|
-
await invoke
|
|
1680
|
+
await invoke('ActivityBar.setAccountEnabled', enabled);
|
|
1689
1681
|
};
|
|
1690
1682
|
const focusLast$6 = async () => {
|
|
1691
|
-
await invoke
|
|
1683
|
+
await invoke('ActivityBar.focusLast');
|
|
1692
1684
|
};
|
|
1693
1685
|
const focusNext$8 = async () => {
|
|
1694
|
-
await invoke
|
|
1686
|
+
await invoke('ActivityBar.focusNext');
|
|
1695
1687
|
};
|
|
1696
1688
|
const focusPrevious$7 = async () => {
|
|
1697
|
-
await invoke
|
|
1689
|
+
await invoke('ActivityBar.focusPrevious');
|
|
1698
1690
|
};
|
|
1699
1691
|
const handleClick$4 = async index => {
|
|
1700
|
-
await invoke
|
|
1692
|
+
await invoke('ActivityBar.handleClick', index);
|
|
1701
1693
|
};
|
|
1702
1694
|
const handleContextMenu$5 = async () => {
|
|
1703
|
-
await invoke
|
|
1695
|
+
await invoke('ActivityBar.handleContextMenu');
|
|
1704
1696
|
};
|
|
1705
1697
|
const setUpdateState = async config => {
|
|
1706
|
-
await invoke
|
|
1698
|
+
await invoke('ActivityBar.setUpdateState', config);
|
|
1707
1699
|
};
|
|
1708
1700
|
const selectCurrent = async () => {
|
|
1709
|
-
await invoke
|
|
1701
|
+
await invoke('ActivityBar.selectCurrent');
|
|
1710
1702
|
};
|
|
1711
1703
|
const handleClickSettings$1 = async (x, y) => {
|
|
1712
|
-
await invoke
|
|
1704
|
+
await invoke('ActivityBar.handleClickSettings', x, y);
|
|
1713
1705
|
};
|
|
1714
1706
|
|
|
1715
1707
|
const ActivityBar = {
|
|
@@ -1728,62 +1720,61 @@ const ActivityBar = {
|
|
|
1728
1720
|
};
|
|
1729
1721
|
|
|
1730
1722
|
const execute$1 = async (id, ...args) => {
|
|
1731
|
-
return invoke
|
|
1723
|
+
return invoke(id, ...args);
|
|
1732
1724
|
};
|
|
1733
1725
|
|
|
1734
1726
|
const Command = {
|
|
1735
1727
|
execute: execute$1
|
|
1736
1728
|
};
|
|
1737
1729
|
|
|
1738
|
-
/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types */
|
|
1739
1730
|
const setReasoningPickerEnabled = async enabled => {
|
|
1740
|
-
await invoke
|
|
1731
|
+
await invoke('Chat.setReasoningPickerEnabled', enabled);
|
|
1741
1732
|
};
|
|
1742
1733
|
const setReasoningEffort = async effort => {
|
|
1743
|
-
await invoke
|
|
1734
|
+
await invoke('Chat.setReasoningEffort', effort);
|
|
1744
1735
|
};
|
|
1745
1736
|
const handleChatListContextMenu = async (eventX, eventY) => {
|
|
1746
|
-
await invoke
|
|
1737
|
+
await invoke('Chat.handleChatListContextMenu', eventX, eventY);
|
|
1747
1738
|
};
|
|
1748
1739
|
const setBackendUrl = async url => {
|
|
1749
|
-
await invoke
|
|
1740
|
+
await invoke('Chat.setBackendUrl', url);
|
|
1750
1741
|
};
|
|
1751
1742
|
const handleClickBack = async () => {
|
|
1752
|
-
await invoke
|
|
1743
|
+
await invoke('Chat.handleClickBack');
|
|
1753
1744
|
};
|
|
1754
1745
|
const setNewChatModelPickerEnabled = async enabled => {
|
|
1755
|
-
await invoke
|
|
1746
|
+
await invoke('Chat.setNewChatModelPickerEnabled', enabled);
|
|
1756
1747
|
};
|
|
1757
1748
|
const openAgentModePicker = async () => {
|
|
1758
|
-
await invoke
|
|
1749
|
+
await invoke('Chat.openAgentModePicker');
|
|
1759
1750
|
};
|
|
1760
1751
|
const handleClickSettings = async () => {
|
|
1761
|
-
await invoke
|
|
1752
|
+
await invoke('Chat.handleClickSettings');
|
|
1762
1753
|
};
|
|
1763
1754
|
const selectIndex$7 = async index => {
|
|
1764
|
-
await invoke
|
|
1755
|
+
await invoke('Chat.selectIndex', index);
|
|
1765
1756
|
};
|
|
1766
1757
|
const handleClickClose = async () => {
|
|
1767
|
-
await invoke
|
|
1758
|
+
await invoke('Chat.handleClickClose');
|
|
1768
1759
|
};
|
|
1769
1760
|
const handleClickNew = async () => {
|
|
1770
|
-
await invoke
|
|
1761
|
+
await invoke('Chat.handleClickNew');
|
|
1771
1762
|
};
|
|
1772
1763
|
const enterNewLine = async () => {
|
|
1773
|
-
await invoke
|
|
1764
|
+
await invoke('Chat.enterNewLine');
|
|
1774
1765
|
};
|
|
1775
1766
|
const setScrollDownButtonEnabled = async enabled => {
|
|
1776
|
-
await invoke
|
|
1767
|
+
await invoke('Chat.setScrollDownButtonEnabled', enabled);
|
|
1777
1768
|
};
|
|
1778
1769
|
const show$6 = async () => {
|
|
1779
|
-
await invoke
|
|
1780
|
-
await invoke
|
|
1770
|
+
await invoke('Layout.showSecondarySideBar');
|
|
1771
|
+
await invoke('Chat.reset');
|
|
1781
1772
|
};
|
|
1782
1773
|
const getSelectedSessionId = async () => {
|
|
1783
|
-
return invoke
|
|
1774
|
+
return invoke('Chat.getSelectedSessionId');
|
|
1784
1775
|
};
|
|
1785
1776
|
const handleInput$7 = async text => {
|
|
1786
|
-
await invoke
|
|
1777
|
+
await invoke('Chat.handleInput', 'composer', text, 'script');
|
|
1787
1778
|
};
|
|
1788
1779
|
const handleDropFiles = async file => {
|
|
1789
1780
|
await execute$1('Chat.handleDropFiles', 'composer-drop-target', [file]);
|
|
@@ -1798,94 +1789,94 @@ const handleChatHeaderContextMenu = async () => {
|
|
|
1798
1789
|
await execute$1('Chat.handleChatHeaderContextMenu', 0, 0);
|
|
1799
1790
|
};
|
|
1800
1791
|
const reset = async () => {
|
|
1801
|
-
await invoke
|
|
1792
|
+
await invoke('Chat.reset');
|
|
1802
1793
|
};
|
|
1803
1794
|
const handleMessagesScroll = async (id, x, y) => {
|
|
1804
|
-
await invoke
|
|
1795
|
+
await invoke('Chat.handleMessagesScroll', id, x, y);
|
|
1805
1796
|
};
|
|
1806
1797
|
const mockOpenApiStreamFinish = async () => {
|
|
1807
|
-
await invoke
|
|
1798
|
+
await invoke('Chat.mockOpenApiStreamFinish');
|
|
1808
1799
|
};
|
|
1809
1800
|
const mockOpenApiStreamPushChunk = async chunk => {
|
|
1810
|
-
await invoke
|
|
1801
|
+
await invoke('Chat.mockOpenApiStreamPushChunk', chunk);
|
|
1811
1802
|
};
|
|
1812
1803
|
const openMockSession = async (sessionId, messages) => {
|
|
1813
|
-
await invoke
|
|
1804
|
+
await invoke('Chat.openMockSession', sessionId, messages);
|
|
1814
1805
|
};
|
|
1815
1806
|
const registerMockResponse = async options => {
|
|
1816
|
-
await invoke
|
|
1807
|
+
await invoke('Chat.registerMockResponse', options);
|
|
1817
1808
|
};
|
|
1818
1809
|
const handleSubmit = async () => {
|
|
1819
|
-
await invoke
|
|
1810
|
+
await invoke('Chat.handleSubmit');
|
|
1820
1811
|
};
|
|
1821
1812
|
const setStreamingEnabled = async enabled => {
|
|
1822
|
-
await invoke
|
|
1813
|
+
await invoke('Chat.setStreamingEnabled', enabled);
|
|
1823
1814
|
};
|
|
1824
1815
|
const useMockApi = async () => {
|
|
1825
|
-
await invoke
|
|
1816
|
+
await invoke('Chat.useMockApi', true);
|
|
1826
1817
|
};
|
|
1827
1818
|
const openGitBranchPicker = async () => {
|
|
1828
|
-
await invoke
|
|
1819
|
+
await invoke('Chat.openGitBranchPicker');
|
|
1829
1820
|
};
|
|
1830
1821
|
const closeGitBranchPicker = async () => {
|
|
1831
|
-
await invoke
|
|
1822
|
+
await invoke('Chat.closeGitBranchPicker');
|
|
1832
1823
|
};
|
|
1833
1824
|
const setAuthEnabled = async enabled => {
|
|
1834
|
-
await invoke
|
|
1825
|
+
await invoke('Chat.setAuthEnabled', enabled);
|
|
1835
1826
|
};
|
|
1836
1827
|
const mockBackendAuthResponse = async response => {
|
|
1837
|
-
await invoke
|
|
1828
|
+
await invoke('Chat.mockBackendAuthResponse', response);
|
|
1838
1829
|
};
|
|
1839
1830
|
const mockOpenApiRequestGetAll = async () => {
|
|
1840
|
-
return invoke
|
|
1831
|
+
return invoke('Chat.mockOpenApiRequestGetAll');
|
|
1841
1832
|
};
|
|
1842
1833
|
const rerender = async () => {
|
|
1843
|
-
await invoke
|
|
1834
|
+
await invoke('Chat.rerender');
|
|
1844
1835
|
};
|
|
1845
1836
|
const setSearchEnabled = async enabled => {
|
|
1846
|
-
await invoke
|
|
1837
|
+
await invoke('Chat.setSearchEnabled', enabled);
|
|
1847
1838
|
};
|
|
1848
1839
|
const mockOpenApiRequestReset = async () => {
|
|
1849
|
-
await invoke
|
|
1840
|
+
await invoke('Chat.mockOpenApiRequestReset');
|
|
1850
1841
|
};
|
|
1851
1842
|
const mockOpenApiStreamReset = async () => {
|
|
1852
|
-
await invoke
|
|
1843
|
+
await invoke('Chat.mockOpenApiStreamReset');
|
|
1853
1844
|
};
|
|
1854
1845
|
const openModelPicker = async () => {
|
|
1855
|
-
await invoke
|
|
1846
|
+
await invoke('Chat.openModelPicker');
|
|
1856
1847
|
};
|
|
1857
1848
|
const handleClickDelete = async () => {
|
|
1858
|
-
await invoke
|
|
1849
|
+
await invoke('Chat.handleClickDelete');
|
|
1859
1850
|
};
|
|
1860
1851
|
const handleContextMenuChatImageAttachment = async (id, x, y) => {
|
|
1861
|
-
await invoke
|
|
1852
|
+
await invoke('Chat.handleContextMenuChatImageAttachment', id, x, y);
|
|
1862
1853
|
};
|
|
1863
1854
|
const setAddContextButtonEnabled = async enabled => {
|
|
1864
|
-
await invoke
|
|
1855
|
+
await invoke('Chat.setAddContextButtonEnabled', enabled);
|
|
1865
1856
|
};
|
|
1866
1857
|
const deleteSessionAtIndex = async index => {
|
|
1867
|
-
await invoke
|
|
1858
|
+
await invoke('Chat.deleteSessionAtIndex', index);
|
|
1868
1859
|
};
|
|
1869
1860
|
const handleModelChange = async modelId => {
|
|
1870
|
-
await invoke
|
|
1861
|
+
await invoke('Chat.handleModelChange', modelId);
|
|
1871
1862
|
};
|
|
1872
1863
|
const handleModelInputBlur = async () => {
|
|
1873
1864
|
await execute$1('Chat.handleModelInputBlur');
|
|
1874
1865
|
};
|
|
1875
1866
|
const handleInputPaste$1 = async () => {
|
|
1876
|
-
await invoke
|
|
1867
|
+
await invoke('Chat.handleInputPaste');
|
|
1877
1868
|
};
|
|
1878
1869
|
const setQuestionToolEnabled = async enabled => {
|
|
1879
|
-
await invoke
|
|
1870
|
+
await invoke('Chat.setQuestionToolEnabled', enabled);
|
|
1880
1871
|
};
|
|
1881
1872
|
const handleInputCopy$1 = async () => {
|
|
1882
|
-
await invoke
|
|
1873
|
+
await invoke('Chat.handleInputCopy');
|
|
1883
1874
|
};
|
|
1884
1875
|
const handleClickFileName = async fileName => {
|
|
1885
|
-
await invoke
|
|
1876
|
+
await invoke('Chat.handleClickFileName', fileName);
|
|
1886
1877
|
};
|
|
1887
1878
|
const handleInputCut$1 = async () => {
|
|
1888
|
-
await invoke
|
|
1879
|
+
await invoke('Chat.handleInputCut');
|
|
1889
1880
|
};
|
|
1890
1881
|
const clearInput$1 = async () => {
|
|
1891
1882
|
await execute$1('Chat.clearInput');
|
|
@@ -1894,16 +1885,16 @@ const handleProjectListContextMenu = async (id, x, y) => {
|
|
|
1894
1885
|
await execute$1('Chat.handleProjectListContextMenu', id, x, y);
|
|
1895
1886
|
};
|
|
1896
1887
|
const mockOpenAiResponse = async options => {
|
|
1897
|
-
return invoke
|
|
1888
|
+
return invoke('Chat.mockOpenAiResponse', options);
|
|
1898
1889
|
};
|
|
1899
1890
|
const handleInputFocus = async () => {
|
|
1900
1891
|
return execute$1('Chat.handleInputFocus', 'chat-list');
|
|
1901
1892
|
};
|
|
1902
1893
|
const getAuthState = async () => {
|
|
1903
|
-
return invoke
|
|
1894
|
+
return invoke('Chat.getAuthState');
|
|
1904
1895
|
};
|
|
1905
1896
|
const handleAgentModeChange = async newAgentMode => {
|
|
1906
|
-
return invoke
|
|
1897
|
+
return invoke('Chat.handleAgentModeChange', newAgentMode);
|
|
1907
1898
|
};
|
|
1908
1899
|
|
|
1909
1900
|
const Chat = {
|
|
@@ -1965,18 +1956,17 @@ const Chat = {
|
|
|
1965
1956
|
useMockApi
|
|
1966
1957
|
};
|
|
1967
1958
|
|
|
1968
|
-
/* eslint-disable @typescript-eslint/only-throw-error, @typescript-eslint/prefer-readonly-parameter-types */
|
|
1969
1959
|
const readNativeFiles = async () => {
|
|
1970
|
-
await invoke
|
|
1960
|
+
await invoke('ClipBoard.readNativeFiles');
|
|
1971
1961
|
};
|
|
1972
1962
|
const writeNativeFiles = async uris => {
|
|
1973
|
-
await invoke
|
|
1963
|
+
await invoke('ClipBoard.writeNativeFiles', uris);
|
|
1974
1964
|
};
|
|
1975
1965
|
const enableMemoryClipBoard = async () => {
|
|
1976
|
-
await invoke
|
|
1966
|
+
await invoke('ClipBoard.enableMemoryClipBoard');
|
|
1977
1967
|
};
|
|
1978
1968
|
const disableMemoryClipBoard = async () => {
|
|
1979
|
-
await invoke
|
|
1969
|
+
await invoke('ClipBoard.disableMemoryClipBoard');
|
|
1980
1970
|
};
|
|
1981
1971
|
const matchesExpectedText$1 = (actualText, expectedText) => {
|
|
1982
1972
|
if (typeof expectedText === 'string') {
|
|
@@ -1985,13 +1975,13 @@ const matchesExpectedText$1 = (actualText, expectedText) => {
|
|
|
1985
1975
|
return expectedText.test(actualText);
|
|
1986
1976
|
};
|
|
1987
1977
|
const shouldHaveText$1 = async expectedText => {
|
|
1988
|
-
const actualText = await invoke
|
|
1978
|
+
const actualText = await invoke('ClipBoard.readMemoryText');
|
|
1989
1979
|
if (!matchesExpectedText$1(actualText, expectedText)) {
|
|
1990
1980
|
throw new AssertionError(`expected clipboard to have text "${expectedText}" but was "${actualText}"`);
|
|
1991
1981
|
}
|
|
1992
1982
|
};
|
|
1993
1983
|
const writeText = async text => {
|
|
1994
|
-
await invoke
|
|
1984
|
+
await invoke('ClipBoard.writeText', text);
|
|
1995
1985
|
};
|
|
1996
1986
|
|
|
1997
1987
|
const ClipBoard = {
|
|
@@ -2004,7 +1994,7 @@ const ClipBoard = {
|
|
|
2004
1994
|
};
|
|
2005
1995
|
|
|
2006
1996
|
const setRelativeX = async x => {
|
|
2007
|
-
await invoke
|
|
1997
|
+
await invoke('ColorPicker.setRelativeX', x);
|
|
2008
1998
|
};
|
|
2009
1999
|
|
|
2010
2000
|
const ColorPicker = {
|
|
@@ -2012,7 +2002,7 @@ const ColorPicker = {
|
|
|
2012
2002
|
};
|
|
2013
2003
|
|
|
2014
2004
|
const selectItem$1 = async text => {
|
|
2015
|
-
await invoke
|
|
2005
|
+
await invoke('Menu.selectItem', text);
|
|
2016
2006
|
};
|
|
2017
2007
|
|
|
2018
2008
|
const ContextMenu = {
|
|
@@ -2020,28 +2010,28 @@ const ContextMenu = {
|
|
|
2020
2010
|
};
|
|
2021
2011
|
|
|
2022
2012
|
const openIframeInspector = async () => {
|
|
2023
|
-
return invoke
|
|
2013
|
+
return invoke('Developer.openIframeInspector');
|
|
2024
2014
|
};
|
|
2025
2015
|
const openCacheFolder = async () => {
|
|
2026
|
-
return invoke
|
|
2016
|
+
return invoke('Developer.openCacheFolder');
|
|
2027
2017
|
};
|
|
2028
2018
|
const openConfigFolder = async () => {
|
|
2029
|
-
return invoke
|
|
2019
|
+
return invoke('Developer.openConfigFolder');
|
|
2030
2020
|
};
|
|
2031
2021
|
const openLogsFolder = async () => {
|
|
2032
|
-
return invoke
|
|
2022
|
+
return invoke('Developer.openLogsFolder');
|
|
2033
2023
|
};
|
|
2034
2024
|
const openProcessExplorer = async () => {
|
|
2035
|
-
return invoke
|
|
2025
|
+
return invoke('Developer.openProcessExplorer');
|
|
2036
2026
|
};
|
|
2037
2027
|
const reloadColorTheme = async () => {
|
|
2038
|
-
return invoke
|
|
2028
|
+
return invoke('Developer.reloadColorTheme');
|
|
2039
2029
|
};
|
|
2040
2030
|
const reloadIconTheme = async () => {
|
|
2041
|
-
return invoke
|
|
2031
|
+
return invoke('Developer.reloadIconTheme');
|
|
2042
2032
|
};
|
|
2043
2033
|
const toggleDeveloperTools = async () => {
|
|
2044
|
-
return invoke
|
|
2034
|
+
return invoke('Developer.toggleDeveloperTools');
|
|
2045
2035
|
};
|
|
2046
2036
|
|
|
2047
2037
|
const Developer = {
|
|
@@ -2071,15 +2061,15 @@ const executeMock$1 = (id, ...args) => {
|
|
|
2071
2061
|
};
|
|
2072
2062
|
|
|
2073
2063
|
const showSaveFilePicker = async () => {
|
|
2074
|
-
await invoke
|
|
2064
|
+
await invoke('FilePicker.showSaveFilePicker');
|
|
2075
2065
|
};
|
|
2076
2066
|
const mockSaveFilePicker = async fn => {
|
|
2077
2067
|
const id = registerMock(fn);
|
|
2078
|
-
await invoke
|
|
2068
|
+
await invoke('FilePicker.mockSaveFilePicker', id);
|
|
2079
2069
|
};
|
|
2080
2070
|
const mockConfirm = async fn => {
|
|
2081
2071
|
const id = registerMock(fn);
|
|
2082
|
-
await invoke
|
|
2072
|
+
await invoke('ConfirmPrompt.mock', id);
|
|
2083
2073
|
};
|
|
2084
2074
|
const executeMock = (id, ...args) => {
|
|
2085
2075
|
return executeMock$1(id, ...args);
|
|
@@ -2120,7 +2110,6 @@ const areSelectionsEqual = (a, b) => {
|
|
|
2120
2110
|
return true;
|
|
2121
2111
|
};
|
|
2122
2112
|
|
|
2123
|
-
/* eslint-disable @typescript-eslint/only-throw-error */
|
|
2124
2113
|
const getEditorKey = async () => {
|
|
2125
2114
|
const keys = await invoke$2('Editor.getKeys');
|
|
2126
2115
|
if (keys.length === 0) {
|
|
@@ -2134,15 +2123,15 @@ const getEditorKey = async () => {
|
|
|
2134
2123
|
const Script = 2;
|
|
2135
2124
|
|
|
2136
2125
|
const update$1 = settings => {
|
|
2137
|
-
return invoke
|
|
2126
|
+
return invoke('Preferences.update', settings);
|
|
2138
2127
|
};
|
|
2139
2128
|
const enableDiagnostics$1 = () => {
|
|
2140
|
-
return invoke
|
|
2129
|
+
return invoke('Preferences.update', {
|
|
2141
2130
|
'editor.diagnostics': true
|
|
2142
2131
|
});
|
|
2143
2132
|
};
|
|
2144
2133
|
const disableDiagnostics$1 = () => {
|
|
2145
|
-
return invoke
|
|
2134
|
+
return invoke('Preferences.update', {
|
|
2146
2135
|
'editor.diagnostics': false
|
|
2147
2136
|
});
|
|
2148
2137
|
};
|
|
@@ -2153,239 +2142,238 @@ const Settings = {
|
|
|
2153
2142
|
update: update$1
|
|
2154
2143
|
};
|
|
2155
2144
|
|
|
2156
|
-
/* eslint-disable @typescript-eslint/only-throw-error */
|
|
2157
2145
|
const setCursor = async (rowIndex, columnIndex) => {
|
|
2158
|
-
await invoke
|
|
2146
|
+
await invoke('Editor.cursorSet', rowIndex, columnIndex);
|
|
2159
2147
|
};
|
|
2160
2148
|
const cancelSelection = async () => {
|
|
2161
|
-
await invoke
|
|
2149
|
+
await invoke('Editor.cancelSelection');
|
|
2162
2150
|
};
|
|
2163
2151
|
const openCompletion = async () => {
|
|
2164
|
-
await invoke
|
|
2152
|
+
await invoke('Editor.openCompletion');
|
|
2165
2153
|
};
|
|
2166
2154
|
const closeCompletion = async () => {
|
|
2167
|
-
await invoke
|
|
2155
|
+
await invoke('EditorCompletion.close');
|
|
2168
2156
|
};
|
|
2169
2157
|
const openEditorContextMenu = async () => {
|
|
2170
|
-
await invoke
|
|
2158
|
+
await invoke('Editor.handleContextMenu', 0, 0);
|
|
2171
2159
|
};
|
|
2172
2160
|
const invokeTabCompletion = async () => {
|
|
2173
|
-
await invoke
|
|
2161
|
+
await invoke('Editor.tabCompletion');
|
|
2174
2162
|
};
|
|
2175
2163
|
const executeTabCompletion = async () => {
|
|
2176
|
-
await invoke
|
|
2164
|
+
await invoke('Editor.tabCompletion');
|
|
2177
2165
|
};
|
|
2178
2166
|
const invokeBraceCompletion = async text => {
|
|
2179
|
-
await invoke
|
|
2167
|
+
await invoke('Editor.braceCompletion', text);
|
|
2180
2168
|
};
|
|
2181
2169
|
const cursorCharacterRight = async () => {
|
|
2182
|
-
await invoke
|
|
2170
|
+
await invoke('Editor.cursorCharacterRight');
|
|
2183
2171
|
};
|
|
2184
2172
|
const cursorCharacterLeft = async () => {
|
|
2185
|
-
await invoke
|
|
2173
|
+
await invoke('Editor.cursorCharacterLeft');
|
|
2186
2174
|
};
|
|
2187
2175
|
const copyLineDown = async () => {
|
|
2188
|
-
await invoke
|
|
2176
|
+
await invoke('Editor.copyLineDown');
|
|
2189
2177
|
};
|
|
2190
2178
|
const cursorDown = async () => {
|
|
2191
|
-
await invoke
|
|
2179
|
+
await invoke('Editor.cursorDown');
|
|
2192
2180
|
};
|
|
2193
2181
|
const selectDown$1 = async () => {
|
|
2194
|
-
await invoke
|
|
2182
|
+
await invoke('Editor.selectDown');
|
|
2195
2183
|
};
|
|
2196
2184
|
const selectLine = async () => {
|
|
2197
|
-
await invoke
|
|
2185
|
+
await invoke('Editor.selectLine');
|
|
2198
2186
|
};
|
|
2199
2187
|
const selectAllLeft = async () => {
|
|
2200
|
-
await invoke
|
|
2188
|
+
await invoke('Editor.selectAllLeft');
|
|
2201
2189
|
};
|
|
2202
2190
|
const selectionGrow = async () => {
|
|
2203
|
-
await invoke
|
|
2191
|
+
await invoke('Editor.selectionGrow');
|
|
2204
2192
|
};
|
|
2205
2193
|
const selectAllRight = async () => {
|
|
2206
|
-
await invoke
|
|
2194
|
+
await invoke('Editor.selectAllRight');
|
|
2207
2195
|
};
|
|
2208
2196
|
const selectAllOccurrences = async () => {
|
|
2209
|
-
await invoke
|
|
2197
|
+
await invoke('Editor.selectAllOccurrences');
|
|
2210
2198
|
};
|
|
2211
2199
|
const selectUp$1 = async () => {
|
|
2212
|
-
await invoke
|
|
2200
|
+
await invoke('Editor.selectUp');
|
|
2213
2201
|
};
|
|
2214
2202
|
const cursorUp = async () => {
|
|
2215
|
-
await invoke
|
|
2203
|
+
await invoke('Editor.cursorUp');
|
|
2216
2204
|
};
|
|
2217
2205
|
const cursorWordLeft = async () => {
|
|
2218
|
-
await invoke
|
|
2206
|
+
await invoke('Editor.cursorWordLeft');
|
|
2219
2207
|
};
|
|
2220
2208
|
const setText = async text => {
|
|
2221
|
-
await invoke
|
|
2209
|
+
await invoke('Editor.setText', text);
|
|
2222
2210
|
};
|
|
2223
2211
|
const deleteAll = async () => {
|
|
2224
|
-
await invoke
|
|
2212
|
+
await invoke('Editor.deleteAll');
|
|
2225
2213
|
};
|
|
2226
2214
|
const selectCharacterLeft = async () => {
|
|
2227
|
-
await invoke
|
|
2215
|
+
await invoke('Editor.selectCharacterLeft');
|
|
2228
2216
|
};
|
|
2229
2217
|
const selectCharacterRight = async () => {
|
|
2230
|
-
await invoke
|
|
2218
|
+
await invoke('Editor.selectCharacterRight');
|
|
2231
2219
|
};
|
|
2232
2220
|
const deleteCharacterLeft = async () => {
|
|
2233
|
-
await invoke
|
|
2221
|
+
await invoke('Editor.deleteCharacterLeft');
|
|
2234
2222
|
};
|
|
2235
2223
|
const deleteWordPartRight = async () => {
|
|
2236
|
-
await invoke
|
|
2224
|
+
await invoke('Editor.deleteWordPartRight');
|
|
2237
2225
|
};
|
|
2238
2226
|
const deleteWordRight = async () => {
|
|
2239
|
-
await invoke
|
|
2227
|
+
await invoke('Editor.deleteWordRight');
|
|
2240
2228
|
};
|
|
2241
2229
|
const deleteWordPartLeft = async () => {
|
|
2242
|
-
await invoke
|
|
2230
|
+
await invoke('Editor.deleteWordPartLeft');
|
|
2243
2231
|
};
|
|
2244
2232
|
const deleteWordLeft = async () => {
|
|
2245
|
-
await invoke
|
|
2233
|
+
await invoke('Editor.deleteWordLeft');
|
|
2246
2234
|
};
|
|
2247
2235
|
const deleteHorizontalRight = async () => {
|
|
2248
|
-
await invoke
|
|
2236
|
+
await invoke('Editor.deleteHorizontalRight');
|
|
2249
2237
|
};
|
|
2250
2238
|
const deleteCharacterRight = async () => {
|
|
2251
|
-
await invoke
|
|
2239
|
+
await invoke('Editor.deleteCharacterRight');
|
|
2252
2240
|
};
|
|
2253
2241
|
const cursorWordRight = async () => {
|
|
2254
|
-
await invoke
|
|
2242
|
+
await invoke('Editor.cursorWordRight');
|
|
2255
2243
|
};
|
|
2256
2244
|
const goToDefinition = async () => {
|
|
2257
|
-
await invoke
|
|
2245
|
+
await invoke('Editor.goToDefinition');
|
|
2258
2246
|
};
|
|
2259
2247
|
const openHover = async () => {
|
|
2260
|
-
await invoke
|
|
2248
|
+
await invoke('Editor.showHover2');
|
|
2261
2249
|
};
|
|
2262
2250
|
const goToTypeDefinition = async () => {
|
|
2263
|
-
await invoke
|
|
2251
|
+
await invoke('Editor.goToTypeDefinition');
|
|
2264
2252
|
};
|
|
2265
2253
|
const type = async text => {
|
|
2266
|
-
await invoke
|
|
2254
|
+
await invoke('Editor.type', text);
|
|
2267
2255
|
};
|
|
2268
2256
|
const findAllReferences = async () => {
|
|
2269
|
-
await invoke
|
|
2257
|
+
await invoke('SideBar.show', 'References', /* focus */true);
|
|
2270
2258
|
};
|
|
2271
2259
|
const findAllImplementations = async () => {
|
|
2272
|
-
await invoke
|
|
2260
|
+
await invoke('SideBar.show', 'Implementations', /* focus */true);
|
|
2273
2261
|
};
|
|
2274
2262
|
const setSelections = async selections => {
|
|
2275
|
-
await invoke
|
|
2263
|
+
await invoke('Editor.setSelections', selections);
|
|
2276
2264
|
};
|
|
2277
2265
|
const selectNextOccurrence = async () => {
|
|
2278
|
-
await invoke
|
|
2266
|
+
await invoke('Editor.selectNextOccurrence');
|
|
2279
2267
|
};
|
|
2280
2268
|
const selectPreviousOccurrence = async () => {
|
|
2281
|
-
await invoke
|
|
2269
|
+
await invoke('Editor.selectPreviousOccurrence');
|
|
2282
2270
|
};
|
|
2283
2271
|
const openFindWidget = async () => {
|
|
2284
|
-
await invoke
|
|
2272
|
+
await invoke('Editor.openFind');
|
|
2285
2273
|
};
|
|
2286
2274
|
const setDeltaY$1 = async deltaY => {
|
|
2287
|
-
await invoke
|
|
2275
|
+
await invoke('Editor.setDeltaY', deltaY);
|
|
2288
2276
|
};
|
|
2289
2277
|
const format = async () => {
|
|
2290
|
-
await invoke
|
|
2278
|
+
await invoke('Editor.format');
|
|
2291
2279
|
};
|
|
2292
2280
|
const unIndent = async () => {
|
|
2293
|
-
await invoke
|
|
2281
|
+
await invoke('Editor.unIndent');
|
|
2294
2282
|
};
|
|
2295
2283
|
const insertLineBreak = async () => {
|
|
2296
|
-
await invoke
|
|
2284
|
+
await invoke('Editor.insertLineBreak');
|
|
2297
2285
|
};
|
|
2298
2286
|
const openSourceActions = async () => {
|
|
2299
|
-
await invoke
|
|
2287
|
+
await invoke('Editor.showSourceActions2');
|
|
2300
2288
|
};
|
|
2301
2289
|
const sourceActionsSelectCurrent = async () => {
|
|
2302
|
-
await invoke
|
|
2290
|
+
await invoke('EditorSourceActions.selectCurrent');
|
|
2303
2291
|
};
|
|
2304
2292
|
const openCompletionDetails = async () => {
|
|
2305
|
-
await invoke
|
|
2293
|
+
await invoke('EditorCompletion.openDetails');
|
|
2306
2294
|
};
|
|
2307
2295
|
const closeCompletionDetails = async () => {
|
|
2308
|
-
await invoke
|
|
2296
|
+
await invoke('EditorCompletion.closeDetails');
|
|
2309
2297
|
};
|
|
2310
2298
|
const toggleCompletionDetails = async () => {
|
|
2311
|
-
await invoke
|
|
2299
|
+
await invoke('EditorCompletion.toggleDetails');
|
|
2312
2300
|
};
|
|
2313
2301
|
const organizeImports = async () => {
|
|
2314
|
-
await invoke
|
|
2302
|
+
await invoke('Editor.organizeImports');
|
|
2315
2303
|
};
|
|
2316
2304
|
const addAllMissingImports = async () => {
|
|
2317
|
-
await invoke
|
|
2305
|
+
await invoke('Editor.addAllMissingImports');
|
|
2318
2306
|
};
|
|
2319
2307
|
const sortImports = async () => {
|
|
2320
|
-
await invoke
|
|
2308
|
+
await invoke('Editor.sortImports');
|
|
2321
2309
|
};
|
|
2322
2310
|
const toggleLineComment = async () => {
|
|
2323
|
-
await invoke
|
|
2311
|
+
await invoke('Editor.toggleLineComment');
|
|
2324
2312
|
};
|
|
2325
2313
|
const toggleBlockComment = async () => {
|
|
2326
|
-
await invoke
|
|
2314
|
+
await invoke('Editor.toggleBlockComment');
|
|
2327
2315
|
};
|
|
2328
2316
|
const selectAll$1 = async () => {
|
|
2329
|
-
await invoke
|
|
2317
|
+
await invoke('Editor.toggleBlockComment');
|
|
2330
2318
|
};
|
|
2331
2319
|
const openColorPicker = async () => {
|
|
2332
|
-
await invoke
|
|
2320
|
+
await invoke('Editor.openColorPicker');
|
|
2333
2321
|
};
|
|
2334
2322
|
const openFind = async () => {
|
|
2335
|
-
await invoke
|
|
2323
|
+
await invoke('Editor.openFind2');
|
|
2336
2324
|
};
|
|
2337
2325
|
const deleteAllLeft = async () => {
|
|
2338
|
-
await invoke
|
|
2326
|
+
await invoke('Editor.deleteAllLeft');
|
|
2339
2327
|
};
|
|
2340
2328
|
const deleteAllRight = async () => {
|
|
2341
|
-
await invoke
|
|
2329
|
+
await invoke('Editor.deleteAllRight');
|
|
2342
2330
|
};
|
|
2343
2331
|
const cursorWordPartLeft = async () => {
|
|
2344
|
-
await invoke
|
|
2332
|
+
await invoke('Editor.cursorWordPartLeft');
|
|
2345
2333
|
};
|
|
2346
2334
|
const cursorWordPartRight = async () => {
|
|
2347
|
-
await invoke
|
|
2335
|
+
await invoke('Editor.cursorWordPartRight');
|
|
2348
2336
|
};
|
|
2349
2337
|
const cursorEnd = async () => {
|
|
2350
|
-
await invoke
|
|
2338
|
+
await invoke('Editor.cursorEnd');
|
|
2351
2339
|
};
|
|
2352
2340
|
const cursorHome = async () => {
|
|
2353
|
-
await invoke
|
|
2341
|
+
await invoke('Editor.cursorHome');
|
|
2354
2342
|
};
|
|
2355
2343
|
const copyLineUp = async () => {
|
|
2356
|
-
await invoke
|
|
2344
|
+
await invoke('Editor.copyLineUp');
|
|
2357
2345
|
};
|
|
2358
2346
|
const copy$1 = async () => {
|
|
2359
|
-
await invoke
|
|
2347
|
+
await invoke('Editor.copy');
|
|
2360
2348
|
};
|
|
2361
2349
|
const closeColorPicker = async () => {
|
|
2362
|
-
await invoke
|
|
2350
|
+
await invoke('Editor.closeColorPicker');
|
|
2363
2351
|
};
|
|
2364
2352
|
const openContextMenu$1 = async () => {
|
|
2365
2353
|
const button = 0;
|
|
2366
2354
|
const x = 0;
|
|
2367
2355
|
const y = 0;
|
|
2368
|
-
await invoke
|
|
2356
|
+
await invoke('Editor.contextMenu', button, x, y);
|
|
2369
2357
|
};
|
|
2370
2358
|
const getText = async () => {
|
|
2371
|
-
return invoke
|
|
2359
|
+
return invoke('Editor.getText');
|
|
2372
2360
|
};
|
|
2373
2361
|
const rename$1 = async () => {
|
|
2374
|
-
await invoke
|
|
2362
|
+
await invoke('Editor.rename');
|
|
2375
2363
|
};
|
|
2376
2364
|
const showHover = async () => {
|
|
2377
|
-
await invoke
|
|
2365
|
+
await invoke('Editor.showHover2');
|
|
2378
2366
|
};
|
|
2379
2367
|
const openRename = async () => {
|
|
2380
|
-
await invoke
|
|
2368
|
+
await invoke('Editor.openRename');
|
|
2381
2369
|
};
|
|
2382
2370
|
const rename2 = async newName => {
|
|
2383
2371
|
await openRename();
|
|
2384
|
-
await invoke
|
|
2385
|
-
await invoke
|
|
2372
|
+
await invoke('EditorRename.handleInput', newName, Script);
|
|
2373
|
+
await invoke('EditorRename.accept');
|
|
2386
2374
|
};
|
|
2387
2375
|
const growSelection = async () => {
|
|
2388
|
-
await invoke
|
|
2376
|
+
await invoke('Editor.selectionGrow');
|
|
2389
2377
|
};
|
|
2390
2378
|
const getSelections = async () => {
|
|
2391
2379
|
const key = await getEditorKey();
|
|
@@ -2559,19 +2547,19 @@ const Editor = {
|
|
|
2559
2547
|
};
|
|
2560
2548
|
|
|
2561
2549
|
const selectIndex$6 = async index => {
|
|
2562
|
-
await invoke
|
|
2550
|
+
await invoke('EditorCompletion.selectIndex', index);
|
|
2563
2551
|
};
|
|
2564
2552
|
const selectCurrentIndex$2 = async () => {
|
|
2565
|
-
await invoke
|
|
2553
|
+
await invoke('EditorCompletion.selectCurrentIndex');
|
|
2566
2554
|
};
|
|
2567
2555
|
const close$2 = async () => {
|
|
2568
|
-
await invoke
|
|
2556
|
+
await invoke('EditorCompletion.close');
|
|
2569
2557
|
};
|
|
2570
2558
|
const handleWheel$2 = async (deltaMode, deltaY) => {
|
|
2571
|
-
await invoke
|
|
2559
|
+
await invoke('EditorCompletion.handleWheel', deltaMode, deltaY);
|
|
2572
2560
|
};
|
|
2573
2561
|
const handlePointerdown = async (clientX, clientY) => {
|
|
2574
|
-
await invoke
|
|
2562
|
+
await invoke('EditorCompletion.handlePointerdown', clientX, clientY);
|
|
2575
2563
|
};
|
|
2576
2564
|
|
|
2577
2565
|
const EditorCompletion = {
|
|
@@ -2583,10 +2571,10 @@ const EditorCompletion = {
|
|
|
2583
2571
|
};
|
|
2584
2572
|
|
|
2585
2573
|
const show$5 = async () => {
|
|
2586
|
-
await invoke
|
|
2574
|
+
await invoke('Editor.showHover2');
|
|
2587
2575
|
};
|
|
2588
2576
|
const close$1 = async () => {
|
|
2589
|
-
await invoke
|
|
2577
|
+
await invoke('EditorHover.close');
|
|
2590
2578
|
};
|
|
2591
2579
|
|
|
2592
2580
|
const EditorHover = {
|
|
@@ -2595,13 +2583,13 @@ const EditorHover = {
|
|
|
2595
2583
|
};
|
|
2596
2584
|
|
|
2597
2585
|
const handleInput$6 = async value => {
|
|
2598
|
-
await invoke
|
|
2586
|
+
await invoke('EditorRename.handleInput', value, Script);
|
|
2599
2587
|
};
|
|
2600
2588
|
const accept = async () => {
|
|
2601
|
-
await invoke
|
|
2589
|
+
await invoke('EditorRename.accept');
|
|
2602
2590
|
};
|
|
2603
2591
|
const cancel = async () => {
|
|
2604
|
-
await invoke
|
|
2592
|
+
await invoke('EditorRename.cancel');
|
|
2605
2593
|
};
|
|
2606
2594
|
|
|
2607
2595
|
const EditorRename = {
|
|
@@ -2611,10 +2599,10 @@ const EditorRename = {
|
|
|
2611
2599
|
};
|
|
2612
2600
|
|
|
2613
2601
|
const selectIndex$5 = async index => {
|
|
2614
|
-
await invoke
|
|
2602
|
+
await invoke('EditorSourceAction.selectIndex', index);
|
|
2615
2603
|
};
|
|
2616
2604
|
const selectCurrentIndex$1 = async () => {
|
|
2617
|
-
await invoke
|
|
2605
|
+
await invoke('EditorSourceAction.selectCurrentIndex');
|
|
2618
2606
|
};
|
|
2619
2607
|
|
|
2620
2608
|
const EditorSourceAction = {
|
|
@@ -2622,129 +2610,128 @@ const EditorSourceAction = {
|
|
|
2622
2610
|
selectIndex: selectIndex$5
|
|
2623
2611
|
};
|
|
2624
2612
|
|
|
2625
|
-
/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types */
|
|
2626
2613
|
const openContextMenu = async index => {
|
|
2627
|
-
await invoke
|
|
2614
|
+
await invoke('Explorer.handleContextMenuKeyboard', index);
|
|
2628
2615
|
};
|
|
2629
2616
|
const handleDragLeave = async () => {
|
|
2630
|
-
await invoke
|
|
2617
|
+
await invoke('Explorer.handleDragLeave');
|
|
2631
2618
|
};
|
|
2632
2619
|
const handleBlur = async () => {
|
|
2633
|
-
await invoke
|
|
2620
|
+
await invoke('Explorer.handleBlur');
|
|
2634
2621
|
};
|
|
2635
2622
|
const handleEscape = async () => {
|
|
2636
|
-
await invoke
|
|
2623
|
+
await invoke('Explorer.handleEscape');
|
|
2637
2624
|
};
|
|
2638
2625
|
const handleDropIndex = async (fileHandles, files, paths, index) => {
|
|
2639
|
-
await invoke
|
|
2626
|
+
await invoke('Explorer.handleDropIndex', fileHandles, files, paths, index);
|
|
2640
2627
|
};
|
|
2641
2628
|
const handleInputBlur = async () => {
|
|
2642
|
-
await invoke
|
|
2629
|
+
await invoke('Explorer.handleInputBlur');
|
|
2643
2630
|
};
|
|
2644
2631
|
const focus$1 = async () => {
|
|
2645
|
-
await invoke
|
|
2632
|
+
await invoke('Explorer.focusIndex', -1);
|
|
2646
2633
|
};
|
|
2647
2634
|
const setDeltaY = async deltaY => {
|
|
2648
|
-
await invoke
|
|
2635
|
+
await invoke('Explorer.setDeltaY', deltaY);
|
|
2649
2636
|
};
|
|
2650
2637
|
const focusNext$7 = async () => {
|
|
2651
|
-
await invoke
|
|
2638
|
+
await invoke('Explorer.focusNext');
|
|
2652
2639
|
};
|
|
2653
2640
|
const selectUp = async () => {
|
|
2654
|
-
await invoke
|
|
2641
|
+
await invoke('Explorer.selectUp');
|
|
2655
2642
|
};
|
|
2656
2643
|
const handleDragOverIndex = async index => {
|
|
2657
|
-
await invoke
|
|
2644
|
+
await invoke('Explorer.handleDragOverIndex', index);
|
|
2658
2645
|
};
|
|
2659
2646
|
const selectDown = async () => {
|
|
2660
|
-
await invoke
|
|
2647
|
+
await invoke('Explorer.selectDown');
|
|
2661
2648
|
};
|
|
2662
2649
|
const collapseAll$2 = async () => {
|
|
2663
|
-
await invoke
|
|
2650
|
+
await invoke('Explorer.collapseAll');
|
|
2664
2651
|
};
|
|
2665
2652
|
const refresh$1 = async () => {
|
|
2666
|
-
await invoke
|
|
2653
|
+
await invoke('Explorer.refresh');
|
|
2667
2654
|
};
|
|
2668
2655
|
const focusIndex$5 = async index => {
|
|
2669
|
-
await invoke
|
|
2656
|
+
await invoke('Explorer.focusIndex', index);
|
|
2670
2657
|
};
|
|
2671
2658
|
const clickCurrent = async () => {
|
|
2672
|
-
await invoke
|
|
2659
|
+
await invoke('Explorer.handleClickCurrent');
|
|
2673
2660
|
};
|
|
2674
2661
|
const handleArrowLeft$1 = async () => {
|
|
2675
|
-
await invoke
|
|
2662
|
+
await invoke('Explorer.handleArrowLeft');
|
|
2676
2663
|
};
|
|
2677
2664
|
const focusLast$5 = async () => {
|
|
2678
|
-
await invoke
|
|
2665
|
+
await invoke('Explorer.focusLast');
|
|
2679
2666
|
};
|
|
2680
2667
|
const focusFirst$6 = async () => {
|
|
2681
|
-
await invoke
|
|
2668
|
+
await invoke('Explorer.focusFirst');
|
|
2682
2669
|
};
|
|
2683
2670
|
const removeDirent = async () => {
|
|
2684
|
-
await invoke
|
|
2671
|
+
await invoke('Explorer.removeDirent');
|
|
2685
2672
|
};
|
|
2686
2673
|
const expandRecursively = async () => {
|
|
2687
|
-
await invoke
|
|
2674
|
+
await invoke('Explorer.expandRecursively');
|
|
2688
2675
|
};
|
|
2689
2676
|
const newFile = async () => {
|
|
2690
|
-
await invoke
|
|
2677
|
+
await invoke('Explorer.newFile');
|
|
2691
2678
|
};
|
|
2692
2679
|
const newFolder = async () => {
|
|
2693
|
-
await invoke
|
|
2680
|
+
await invoke('Explorer.newFolder');
|
|
2694
2681
|
};
|
|
2695
2682
|
const copyPath$2 = async () => {
|
|
2696
|
-
await invoke
|
|
2683
|
+
await invoke('Explorer.copyPath');
|
|
2697
2684
|
};
|
|
2698
2685
|
const copyRelativePath$1 = async () => {
|
|
2699
|
-
await invoke
|
|
2686
|
+
await invoke('Explorer.copyRelativePath');
|
|
2700
2687
|
};
|
|
2701
2688
|
const handleClick$3 = async index => {
|
|
2702
|
-
await invoke
|
|
2689
|
+
await invoke('Explorer.handleClick', index);
|
|
2703
2690
|
};
|
|
2704
2691
|
const handleClickAt$2 = async (preventDefault, button, ctrlKey, shiftKey, x, y) => {
|
|
2705
|
-
await invoke
|
|
2692
|
+
await invoke('Explorer.handleClickAt', preventDefault, button, ctrlKey, shiftKey, x, y);
|
|
2706
2693
|
};
|
|
2707
2694
|
const handleDrop = async (x, y, fileIds, fileList) => {
|
|
2708
|
-
await invoke
|
|
2695
|
+
await invoke('Explorer.handleDrop', x, y, fileIds, fileIds);
|
|
2709
2696
|
};
|
|
2710
2697
|
const rename = async () => {
|
|
2711
|
-
await invoke
|
|
2698
|
+
await invoke('Explorer.renameDirent');
|
|
2712
2699
|
};
|
|
2713
2700
|
const selectAll = async () => {
|
|
2714
|
-
await invoke
|
|
2701
|
+
await invoke('Explorer.selectAll');
|
|
2715
2702
|
};
|
|
2716
2703
|
const renameDirent = async () => {
|
|
2717
|
-
await invoke
|
|
2704
|
+
await invoke('Explorer.renameDirent');
|
|
2718
2705
|
};
|
|
2719
2706
|
const cancelEdit = async () => {
|
|
2720
|
-
await invoke
|
|
2707
|
+
await invoke('Explorer.cancelEdit');
|
|
2721
2708
|
};
|
|
2722
2709
|
const acceptEdit = async () => {
|
|
2723
|
-
await invoke
|
|
2710
|
+
await invoke('Explorer.acceptEdit');
|
|
2724
2711
|
};
|
|
2725
2712
|
const updateEditingValue = async value => {
|
|
2726
|
-
await invoke
|
|
2713
|
+
await invoke('Explorer.updateEditingValue', value);
|
|
2727
2714
|
};
|
|
2728
2715
|
const expandAll = async () => {
|
|
2729
|
-
await invoke
|
|
2716
|
+
await invoke('Explorer.expandAll');
|
|
2730
2717
|
};
|
|
2731
2718
|
const handleDragOver = async (x, y) => {
|
|
2732
|
-
await invoke
|
|
2719
|
+
await invoke('Explorer.handleDragOver', x, y);
|
|
2733
2720
|
};
|
|
2734
2721
|
const handleCut = async () => {
|
|
2735
|
-
await invoke
|
|
2722
|
+
await invoke('Explorer.handleCut');
|
|
2736
2723
|
};
|
|
2737
2724
|
const handleCopy = async () => {
|
|
2738
|
-
await invoke
|
|
2725
|
+
await invoke('Explorer.handleCopy');
|
|
2739
2726
|
};
|
|
2740
2727
|
const handlePaste = async () => {
|
|
2741
|
-
await invoke
|
|
2728
|
+
await invoke('Explorer.handlePaste');
|
|
2742
2729
|
};
|
|
2743
2730
|
const selectIndices = async indices => {
|
|
2744
|
-
await invoke
|
|
2731
|
+
await invoke('Explorer.selectIndices', indices);
|
|
2745
2732
|
};
|
|
2746
2733
|
const toggleIndividualSelection = async index => {
|
|
2747
|
-
await invoke
|
|
2734
|
+
await invoke('Explorer.toggleIndividualSelection', index);
|
|
2748
2735
|
};
|
|
2749
2736
|
|
|
2750
2737
|
const Explorer = {
|
|
@@ -2794,12 +2781,12 @@ const Explorer = {
|
|
|
2794
2781
|
const addWebExtension = async relativePath => {
|
|
2795
2782
|
// TODO compute absolutePath
|
|
2796
2783
|
const absolutePath = relativePath;
|
|
2797
|
-
await invoke
|
|
2784
|
+
await invoke('ExtensionMeta.addWebExtension', absolutePath);
|
|
2798
2785
|
};
|
|
2799
2786
|
const addNodeExtension = async relativePath => {
|
|
2800
2787
|
// TODO compute absolutePath
|
|
2801
2788
|
const absolutePath = relativePath;
|
|
2802
|
-
await invoke
|
|
2789
|
+
await invoke('ExtensionMeta.addNodeExtension', absolutePath);
|
|
2803
2790
|
};
|
|
2804
2791
|
|
|
2805
2792
|
const Extension = {
|
|
@@ -2808,28 +2795,28 @@ const Extension = {
|
|
|
2808
2795
|
};
|
|
2809
2796
|
|
|
2810
2797
|
const handleClickCategory = async categoryId => {
|
|
2811
|
-
await invoke
|
|
2798
|
+
await invoke('ExtensionDetail.handleClickCategory', categoryId);
|
|
2812
2799
|
};
|
|
2813
2800
|
const handleReadmeContextMenu = async (x, y, nodeName, href) => {
|
|
2814
|
-
await invoke
|
|
2801
|
+
await invoke('ExtensionDetail.handleReadmeContextMenu', x, y, nodeName, href);
|
|
2815
2802
|
};
|
|
2816
2803
|
const copyReadmeLink = async href => {
|
|
2817
|
-
await invoke
|
|
2804
|
+
await invoke('ExtensionDetail.copyReadmeLink', href);
|
|
2818
2805
|
};
|
|
2819
2806
|
const handleClickEnable = async () => {
|
|
2820
|
-
await invoke
|
|
2807
|
+
await invoke('ExtensionDetail.handleClickEnable');
|
|
2821
2808
|
};
|
|
2822
2809
|
const handleClickDisable = async () => {
|
|
2823
|
-
await invoke
|
|
2810
|
+
await invoke('ExtensionDetail.handleClickDisable');
|
|
2824
2811
|
};
|
|
2825
2812
|
const handleClickSetColorTheme = async () => {
|
|
2826
|
-
await invoke
|
|
2813
|
+
await invoke('ExtensionDetail.handleClickSetColorTheme');
|
|
2827
2814
|
};
|
|
2828
2815
|
const selectFeature = name => {
|
|
2829
|
-
return invoke
|
|
2816
|
+
return invoke('ExtensionDetail.selectFeature', name);
|
|
2830
2817
|
};
|
|
2831
2818
|
const selectTab$2 = name => {
|
|
2832
|
-
return invoke
|
|
2819
|
+
return invoke('ExtensionDetail.selectTab', name);
|
|
2833
2820
|
};
|
|
2834
2821
|
const selectDetails = async () => {
|
|
2835
2822
|
await selectTab$2('Details');
|
|
@@ -2841,23 +2828,23 @@ const selectChangelog = async () => {
|
|
|
2841
2828
|
await selectTab$2('Changelog');
|
|
2842
2829
|
};
|
|
2843
2830
|
const focusNextTab = async () => {
|
|
2844
|
-
await invoke
|
|
2831
|
+
await invoke('ExtensionDetail.focusNextTab');
|
|
2845
2832
|
};
|
|
2846
2833
|
const focusPreviousTab = async () => {
|
|
2847
|
-
await invoke
|
|
2834
|
+
await invoke('ExtensionDetail.focusPreviousTab');
|
|
2848
2835
|
};
|
|
2849
2836
|
const open$8 = extensionId => {
|
|
2850
2837
|
const uri = `extension-detail://${extensionId}`;
|
|
2851
|
-
return invoke
|
|
2838
|
+
return invoke('Main.openUri', uri);
|
|
2852
2839
|
};
|
|
2853
2840
|
const handleClickUninstall = () => {
|
|
2854
|
-
return invoke
|
|
2841
|
+
return invoke('ExtensionDetail.handleClickUninstall');
|
|
2855
2842
|
};
|
|
2856
2843
|
const handleImageContextMenu = () => {
|
|
2857
|
-
return invoke
|
|
2844
|
+
return invoke('ExtensionDetail.handleImageContextMenu');
|
|
2858
2845
|
};
|
|
2859
2846
|
const openFeature = featureName => {
|
|
2860
|
-
return invoke
|
|
2847
|
+
return invoke('ExtensionDetail.handleFeaturesClick', featureName);
|
|
2861
2848
|
};
|
|
2862
2849
|
const openThemes = async () => {
|
|
2863
2850
|
await openFeature('Theme');
|
|
@@ -2878,13 +2865,13 @@ const openSettings = async () => {
|
|
|
2878
2865
|
await openFeature('Settings');
|
|
2879
2866
|
};
|
|
2880
2867
|
const handleScroll$1 = async scrollTop => {
|
|
2881
|
-
return invoke
|
|
2868
|
+
return invoke('ExtensionDetail.handleScroll', scrollTop);
|
|
2882
2869
|
};
|
|
2883
2870
|
const hideSizeLink = async () => {
|
|
2884
|
-
return invoke
|
|
2871
|
+
return invoke('ExtensionDetail.hideSizeLink');
|
|
2885
2872
|
};
|
|
2886
2873
|
const handleTabFocus = async tabName => {
|
|
2887
|
-
return invoke
|
|
2874
|
+
return invoke('ExtensionDetail.handleTabFocus', tabName);
|
|
2888
2875
|
};
|
|
2889
2876
|
|
|
2890
2877
|
const ExtensionDetail = {
|
|
@@ -2917,10 +2904,10 @@ const ExtensionDetail = {
|
|
|
2917
2904
|
};
|
|
2918
2905
|
|
|
2919
2906
|
const open$7 = async id => {
|
|
2920
|
-
await invoke
|
|
2907
|
+
await invoke('SideBar.openViewlet', id);
|
|
2921
2908
|
};
|
|
2922
2909
|
const hide = async () => {
|
|
2923
|
-
await invoke
|
|
2910
|
+
await invoke('Layout.hideSideBar');
|
|
2924
2911
|
};
|
|
2925
2912
|
|
|
2926
2913
|
const SideBar = {
|
|
@@ -2932,25 +2919,25 @@ const open$6 = async () => {
|
|
|
2932
2919
|
await open$7('Extensions');
|
|
2933
2920
|
};
|
|
2934
2921
|
const handleInput$5 = async value => {
|
|
2935
|
-
await invoke
|
|
2922
|
+
await invoke('Extensions.handleInput', value, Script$1);
|
|
2936
2923
|
};
|
|
2937
2924
|
const handleClick$2 = async index => {
|
|
2938
|
-
await invoke
|
|
2925
|
+
await invoke('Extensions.handleClick', index);
|
|
2939
2926
|
};
|
|
2940
2927
|
const handleClickFilter = async () => {
|
|
2941
|
-
await invoke
|
|
2928
|
+
await invoke('Extensions.handleClickFilter');
|
|
2942
2929
|
};
|
|
2943
2930
|
const handleContextMenu$4 = async (button, x, y) => {
|
|
2944
|
-
await invoke
|
|
2931
|
+
await invoke('Extensions.handleContextMenu', button, x, y);
|
|
2945
2932
|
};
|
|
2946
2933
|
const copyExtensionInfo = async () => {
|
|
2947
|
-
await invoke
|
|
2934
|
+
await invoke('Extensions.copyExtensionInfo');
|
|
2948
2935
|
};
|
|
2949
2936
|
const copyExtensionId = async () => {
|
|
2950
|
-
await invoke
|
|
2937
|
+
await invoke('Extensions.copyExtensionId');
|
|
2951
2938
|
};
|
|
2952
2939
|
const clearSearchResults$1 = async () => {
|
|
2953
|
-
await invoke
|
|
2940
|
+
await invoke('Extensions.clearSearchResults');
|
|
2954
2941
|
};
|
|
2955
2942
|
|
|
2956
2943
|
const ExtensionSearch = {
|
|
@@ -2966,7 +2953,6 @@ const ExtensionSearch = {
|
|
|
2966
2953
|
|
|
2967
2954
|
const Memfs = 'memfs';
|
|
2968
2955
|
|
|
2969
|
-
/* eslint-disable @typescript-eslint/only-throw-error */
|
|
2970
2956
|
const toFileUrl = url => {
|
|
2971
2957
|
const urlObject = new URL(url);
|
|
2972
2958
|
const pathName = urlObject.pathname;
|
|
@@ -2979,7 +2965,7 @@ const toFileUrl = url => {
|
|
|
2979
2965
|
|
|
2980
2966
|
const getDirents = async fileUrl => {
|
|
2981
2967
|
const allDirents = [];
|
|
2982
|
-
const dirents = await invoke
|
|
2968
|
+
const dirents = await invoke('FileSystem.readDirWithFileTypes', fileUrl);
|
|
2983
2969
|
for (const dirent of dirents) {
|
|
2984
2970
|
if (dirent.type === Directory) {
|
|
2985
2971
|
const subDirents = await getDirents(`${fileUrl}/${dirent.name}`);
|
|
@@ -3017,8 +3003,6 @@ const isValidFileMap = value => {
|
|
|
3017
3003
|
return true;
|
|
3018
3004
|
};
|
|
3019
3005
|
|
|
3020
|
-
/* eslint-disable @typescript-eslint/only-throw-error */
|
|
3021
|
-
|
|
3022
3006
|
const loadFileMap = async fileMapUrl => {
|
|
3023
3007
|
try {
|
|
3024
3008
|
const response = await fetch(fileMapUrl);
|
|
@@ -3044,7 +3028,7 @@ const getFileMapWeb = async url => {
|
|
|
3044
3028
|
const loadFixtureToMemFs = async fileMap => {
|
|
3045
3029
|
for (const [path, content] of Object.entries(fileMap)) {
|
|
3046
3030
|
const memfsPath = `memfs:///fixture/${path}`;
|
|
3047
|
-
await invoke
|
|
3031
|
+
await invoke('FileSystem.writeFile', memfsPath, content);
|
|
3048
3032
|
}
|
|
3049
3033
|
return `memfs:///fixture`;
|
|
3050
3034
|
};
|
|
@@ -3063,22 +3047,21 @@ const stringifyJson = data => {
|
|
|
3063
3047
|
return JSON.stringify(data, null, 2) + '\n';
|
|
3064
3048
|
};
|
|
3065
3049
|
|
|
3066
|
-
/* eslint-disable @typescript-eslint/only-throw-error */
|
|
3067
3050
|
const writeFile = async (uri, content) => {
|
|
3068
|
-
await invoke
|
|
3051
|
+
await invoke('FileSystem.writeFile', uri, content);
|
|
3069
3052
|
};
|
|
3070
3053
|
const writeJson = async (uri, data) => {
|
|
3071
3054
|
const content = stringifyJson(data);
|
|
3072
3055
|
await writeFile(uri, content);
|
|
3073
3056
|
};
|
|
3074
3057
|
const readFile = async uri => {
|
|
3075
|
-
return invoke
|
|
3058
|
+
return invoke('FileSystem.readFile', uri);
|
|
3076
3059
|
};
|
|
3077
3060
|
const addFileHandle = async file => {
|
|
3078
|
-
await invoke
|
|
3061
|
+
await invoke('FileSystem.addFileHandle', file);
|
|
3079
3062
|
};
|
|
3080
3063
|
const mkdir = async uri => {
|
|
3081
|
-
await invoke
|
|
3064
|
+
await invoke('FileSystem.mkdir', uri);
|
|
3082
3065
|
};
|
|
3083
3066
|
const setFiles = async files => {
|
|
3084
3067
|
// TODO maybe have a method to send all the files to file system worker directly
|
|
@@ -3087,10 +3070,10 @@ const setFiles = async files => {
|
|
|
3087
3070
|
}));
|
|
3088
3071
|
};
|
|
3089
3072
|
const readDir = async uri => {
|
|
3090
|
-
return invoke
|
|
3073
|
+
return invoke('FileSystem.readDirWithFileTypes', uri);
|
|
3091
3074
|
};
|
|
3092
3075
|
const remove = async uri => {
|
|
3093
|
-
await invoke
|
|
3076
|
+
await invoke('FileSystem.remove', uri);
|
|
3094
3077
|
};
|
|
3095
3078
|
const getTmpDir = async ({
|
|
3096
3079
|
scheme = Memfs
|
|
@@ -3099,17 +3082,17 @@ const getTmpDir = async ({
|
|
|
3099
3082
|
case Memfs:
|
|
3100
3083
|
return 'memfs:///workspace';
|
|
3101
3084
|
default:
|
|
3102
|
-
return invoke
|
|
3085
|
+
return invoke('PlatformPaths.getTmpDir');
|
|
3103
3086
|
}
|
|
3104
3087
|
};
|
|
3105
3088
|
const chmod = async (uri, permissions) => {
|
|
3106
|
-
await invoke
|
|
3089
|
+
await invoke('FileSystem.chmod', uri, permissions);
|
|
3107
3090
|
};
|
|
3108
3091
|
const createExecutable = async content => {
|
|
3109
3092
|
const tmpDir = await getTmpDir({
|
|
3110
3093
|
scheme: 'file'
|
|
3111
3094
|
});
|
|
3112
|
-
const nodePath = await invoke
|
|
3095
|
+
const nodePath = await invoke('PlatformPaths.getNodePath');
|
|
3113
3096
|
const gitPath = `${tmpDir}/git`;
|
|
3114
3097
|
await writeFile(gitPath, `#!${nodePath}
|
|
3115
3098
|
${content}`);
|
|
@@ -3117,9 +3100,9 @@ const createExecutable = async content => {
|
|
|
3117
3100
|
return gitPath;
|
|
3118
3101
|
};
|
|
3119
3102
|
const createExecutableFrom = async uri => {
|
|
3120
|
-
const testPath = await invoke
|
|
3103
|
+
const testPath = await invoke('PlatformPaths.getTestPath');
|
|
3121
3104
|
const absolutePath = testPath + Slash + uri;
|
|
3122
|
-
const content = await invoke
|
|
3105
|
+
const content = await invoke('Ajax.getText', absolutePath);
|
|
3123
3106
|
return createExecutable(content);
|
|
3124
3107
|
};
|
|
3125
3108
|
const createDroppedFileHandle = async () => {
|
|
@@ -3128,7 +3111,7 @@ const createDroppedFileHandle = async () => {
|
|
|
3128
3111
|
create: true
|
|
3129
3112
|
});
|
|
3130
3113
|
const file = await fileHandle.getFile();
|
|
3131
|
-
const id = await invoke
|
|
3114
|
+
const id = await invoke('FileSystemHandle.addFileHandle', fileHandle);
|
|
3132
3115
|
return {
|
|
3133
3116
|
file,
|
|
3134
3117
|
id
|
|
@@ -3162,49 +3145,49 @@ const FileSystem = {
|
|
|
3162
3145
|
};
|
|
3163
3146
|
|
|
3164
3147
|
const focusNext$6 = async () => {
|
|
3165
|
-
await invoke
|
|
3148
|
+
await invoke('FindWidget.focusNext');
|
|
3166
3149
|
};
|
|
3167
3150
|
const focusPrevious$6 = async () => {
|
|
3168
|
-
await invoke
|
|
3151
|
+
await invoke('FindWidget.focusPrevious');
|
|
3169
3152
|
};
|
|
3170
3153
|
const close = async () => {
|
|
3171
|
-
await invoke
|
|
3154
|
+
await invoke('FindWidget.close');
|
|
3172
3155
|
};
|
|
3173
3156
|
const setReplaceValue$1 = async value => {
|
|
3174
|
-
await invoke
|
|
3157
|
+
await invoke('FindWidget.handleReplaceInput', value, Script);
|
|
3175
3158
|
};
|
|
3176
3159
|
const setValue$2 = async value => {
|
|
3177
|
-
await invoke
|
|
3160
|
+
await invoke('FindWidget.handleInput', value, Script);
|
|
3178
3161
|
};
|
|
3179
3162
|
const toggleReplace$1 = async () => {
|
|
3180
|
-
await invoke
|
|
3163
|
+
await invoke('FindWidget.toggleReplace');
|
|
3181
3164
|
};
|
|
3182
3165
|
const toggleMatchCase$1 = async () => {
|
|
3183
|
-
await invoke
|
|
3166
|
+
await invoke('FindWidget.toggleMatchCase');
|
|
3184
3167
|
};
|
|
3185
3168
|
const toggleMatchWholeWord$1 = async () => {
|
|
3186
|
-
await invoke
|
|
3169
|
+
await invoke('FindWidget.toggleMatchWholeWord');
|
|
3187
3170
|
};
|
|
3188
3171
|
const togglePreserveCase$1 = async () => {
|
|
3189
|
-
await invoke
|
|
3172
|
+
await invoke('FindWidget.togglePreserveCase');
|
|
3190
3173
|
};
|
|
3191
3174
|
const toggleUseRegularExpression$1 = async () => {
|
|
3192
|
-
await invoke
|
|
3175
|
+
await invoke('FindWidget.toggleUseRegularExpression');
|
|
3193
3176
|
};
|
|
3194
3177
|
const replace = async () => {
|
|
3195
|
-
await invoke
|
|
3178
|
+
await invoke('FindWidget.replace');
|
|
3196
3179
|
};
|
|
3197
3180
|
const replaceAll$1 = async () => {
|
|
3198
|
-
await invoke
|
|
3181
|
+
await invoke('FindWidget.replaceAll');
|
|
3199
3182
|
};
|
|
3200
3183
|
const focusElement = async whenExpression => {
|
|
3201
|
-
await invoke
|
|
3184
|
+
await invoke('FindWidget.focusElement', whenExpression);
|
|
3202
3185
|
};
|
|
3203
3186
|
const focusNextElement = async () => {
|
|
3204
|
-
await invoke
|
|
3187
|
+
await invoke('FindWidget.focusNextElement');
|
|
3205
3188
|
};
|
|
3206
3189
|
const focusPreviousElement = async () => {
|
|
3207
|
-
await invoke
|
|
3190
|
+
await invoke('FindWidget.focusPreviousElement');
|
|
3208
3191
|
};
|
|
3209
3192
|
|
|
3210
3193
|
const FindWidget = {
|
|
@@ -3226,7 +3209,7 @@ const FindWidget = {
|
|
|
3226
3209
|
};
|
|
3227
3210
|
|
|
3228
3211
|
const setIconTheme = async id => {
|
|
3229
|
-
await invoke
|
|
3212
|
+
await invoke('IconTheme.setIconTheme', id);
|
|
3230
3213
|
};
|
|
3231
3214
|
|
|
3232
3215
|
const IconTheme = {
|
|
@@ -3234,19 +3217,19 @@ const IconTheme = {
|
|
|
3234
3217
|
};
|
|
3235
3218
|
|
|
3236
3219
|
const selectIndex$4 = async index => {
|
|
3237
|
-
return invoke
|
|
3220
|
+
return invoke('IframeInspector.selectIndex', index);
|
|
3238
3221
|
};
|
|
3239
3222
|
const focusNext$5 = async () => {
|
|
3240
|
-
return invoke
|
|
3223
|
+
return invoke('IframeInspector.focusNext');
|
|
3241
3224
|
};
|
|
3242
3225
|
const focusPrevious$5 = async () => {
|
|
3243
|
-
return invoke
|
|
3226
|
+
return invoke('IframeInspector.focusPrevious');
|
|
3244
3227
|
};
|
|
3245
3228
|
const focusFirst$5 = async () => {
|
|
3246
|
-
return invoke
|
|
3229
|
+
return invoke('IframeInspector.focusFirst');
|
|
3247
3230
|
};
|
|
3248
3231
|
const focusLast$4 = async () => {
|
|
3249
|
-
return invoke
|
|
3232
|
+
return invoke('IframeInspector.focusLast');
|
|
3250
3233
|
};
|
|
3251
3234
|
|
|
3252
3235
|
const IframeInspector = {
|
|
@@ -3258,73 +3241,73 @@ const IframeInspector = {
|
|
|
3258
3241
|
};
|
|
3259
3242
|
|
|
3260
3243
|
const open$5 = async () => {
|
|
3261
|
-
await invoke
|
|
3244
|
+
await invoke('Main.openUri', 'app://keybindings');
|
|
3262
3245
|
};
|
|
3263
3246
|
const handleInput$4 = value => {
|
|
3264
|
-
return invoke
|
|
3247
|
+
return invoke('KeyBindings.handleInput', value);
|
|
3265
3248
|
};
|
|
3266
3249
|
const handleClick$1 = (x, y) => {
|
|
3267
|
-
return invoke
|
|
3250
|
+
return invoke('KeyBindings.handleClick', x, y);
|
|
3268
3251
|
};
|
|
3269
3252
|
const handleWheel$1 = (deltaMode, deltaY) => {
|
|
3270
|
-
return invoke
|
|
3253
|
+
return invoke('KeyBindings.handleWheel', deltaMode, deltaY);
|
|
3271
3254
|
};
|
|
3272
3255
|
const handleDoubleClick = (x, y) => {
|
|
3273
|
-
return invoke
|
|
3256
|
+
return invoke('KeyBindings.handleDoubleClick', x, y);
|
|
3274
3257
|
};
|
|
3275
3258
|
const focusNext$4 = () => {
|
|
3276
|
-
return invoke
|
|
3259
|
+
return invoke('KeyBindings.focusNext');
|
|
3277
3260
|
};
|
|
3278
3261
|
const focusPrevious$4 = () => {
|
|
3279
|
-
return invoke
|
|
3262
|
+
return invoke('KeyBindings.focusPrevious');
|
|
3280
3263
|
};
|
|
3281
3264
|
const focusFirst$4 = () => {
|
|
3282
|
-
return invoke
|
|
3265
|
+
return invoke('KeyBindings.focusFirst');
|
|
3283
3266
|
};
|
|
3284
3267
|
const focusIndex$4 = index => {
|
|
3285
|
-
return invoke
|
|
3268
|
+
return invoke('KeyBindings.focusIndex', index);
|
|
3286
3269
|
};
|
|
3287
3270
|
const focusLast$3 = () => {
|
|
3288
|
-
return invoke
|
|
3271
|
+
return invoke('KeyBindings.focusLast');
|
|
3289
3272
|
};
|
|
3290
3273
|
const toggleRecordingKeys = () => {
|
|
3291
|
-
return invoke
|
|
3274
|
+
return invoke('KeyBindings.toggleRecordingKeys');
|
|
3292
3275
|
};
|
|
3293
3276
|
const startRecordingKeys = () => {
|
|
3294
|
-
return invoke
|
|
3277
|
+
return invoke('KeyBindings.startRecordingKeys');
|
|
3295
3278
|
};
|
|
3296
3279
|
const clearInput = () => {
|
|
3297
|
-
return invoke
|
|
3280
|
+
return invoke('KeyBindings.clearInput');
|
|
3298
3281
|
};
|
|
3299
3282
|
const sortByPrecedence = () => {
|
|
3300
|
-
return invoke
|
|
3283
|
+
return invoke('KeyBindings.sortByPrecedence');
|
|
3301
3284
|
};
|
|
3302
3285
|
const stopRecordingKeys = () => {
|
|
3303
|
-
return invoke
|
|
3286
|
+
return invoke('KeyBindings.stopRecordingKeys');
|
|
3304
3287
|
};
|
|
3305
3288
|
const handleContextMenu$3 = (button, x, y) => {
|
|
3306
|
-
return invoke
|
|
3289
|
+
return invoke('KeyBindings.handleContextMenu', button, x, y);
|
|
3307
3290
|
};
|
|
3308
3291
|
const copyCommandId = () => {
|
|
3309
|
-
return invoke
|
|
3292
|
+
return invoke('KeyBindings.copyCommandId');
|
|
3310
3293
|
};
|
|
3311
3294
|
const copyCommandTitle = () => {
|
|
3312
|
-
return invoke
|
|
3295
|
+
return invoke('KeyBindings.copyCommandTitle');
|
|
3313
3296
|
};
|
|
3314
3297
|
const addKeyBinding = () => {
|
|
3315
|
-
return invoke
|
|
3298
|
+
return invoke('KeyBindings.addKeyBinding');
|
|
3316
3299
|
};
|
|
3317
3300
|
const removeKeyBinding = () => {
|
|
3318
|
-
return invoke
|
|
3301
|
+
return invoke('KeyBindings.removeKeyBinding');
|
|
3319
3302
|
};
|
|
3320
3303
|
const changeWhenExpression = () => {
|
|
3321
|
-
return invoke
|
|
3304
|
+
return invoke('KeyBindings.changeWhenExpression');
|
|
3322
3305
|
};
|
|
3323
3306
|
const showSameKeyBindings = () => {
|
|
3324
|
-
return invoke
|
|
3307
|
+
return invoke('KeyBindings.showSameKeyBindings');
|
|
3325
3308
|
};
|
|
3326
3309
|
const resetKeyBinding = () => {
|
|
3327
|
-
return invoke
|
|
3310
|
+
return invoke('KeyBindings.resetKeyBinding');
|
|
3328
3311
|
};
|
|
3329
3312
|
|
|
3330
3313
|
const KeyBindingsEditor = {
|
|
@@ -3399,7 +3382,7 @@ const press = async key => {
|
|
|
3399
3382
|
cancelable: true,
|
|
3400
3383
|
...keyOptions
|
|
3401
3384
|
};
|
|
3402
|
-
await invoke
|
|
3385
|
+
await invoke('TestFrameWork.performKeyBoardAction', 'press', options);
|
|
3403
3386
|
};
|
|
3404
3387
|
|
|
3405
3388
|
const KeyBoard = {
|
|
@@ -3410,7 +3393,7 @@ const showSideBar = async () => {
|
|
|
3410
3393
|
await execute$1('Layout.showSideBar');
|
|
3411
3394
|
};
|
|
3412
3395
|
const handleWorkspaceRefresh = async () => {
|
|
3413
|
-
await invoke
|
|
3396
|
+
await invoke('Layout.handleWorkspaceRefresh');
|
|
3414
3397
|
};
|
|
3415
3398
|
|
|
3416
3399
|
const Layout = {
|
|
@@ -3419,19 +3402,19 @@ const Layout = {
|
|
|
3419
3402
|
};
|
|
3420
3403
|
|
|
3421
3404
|
const open$4 = async () => {
|
|
3422
|
-
await invoke
|
|
3405
|
+
await invoke('Main.openUri', 'language-models:///1');
|
|
3423
3406
|
};
|
|
3424
3407
|
const handleFilterInput$2 = async value => {
|
|
3425
|
-
await invoke
|
|
3408
|
+
await invoke('LanguageModels.handleFilterInput', value);
|
|
3426
3409
|
};
|
|
3427
3410
|
const clearFilterInput = async () => {
|
|
3428
|
-
await invoke
|
|
3411
|
+
await invoke('LanguageModels.clearFilterInput');
|
|
3429
3412
|
};
|
|
3430
3413
|
const addModel = async () => {
|
|
3431
|
-
await invoke
|
|
3414
|
+
await invoke('LanguageModels.addModel');
|
|
3432
3415
|
};
|
|
3433
3416
|
const removeModel = async id => {
|
|
3434
|
-
await invoke
|
|
3417
|
+
await invoke('LanguageModels.removeModel', id);
|
|
3435
3418
|
};
|
|
3436
3419
|
|
|
3437
3420
|
const LanguageModels = {
|
|
@@ -3442,69 +3425,68 @@ const LanguageModels = {
|
|
|
3442
3425
|
removeModel
|
|
3443
3426
|
};
|
|
3444
3427
|
|
|
3445
|
-
/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types */
|
|
3446
3428
|
const openUri = async uri => {
|
|
3447
|
-
await invoke
|
|
3429
|
+
await invoke('Main.openUri', uri);
|
|
3448
3430
|
};
|
|
3449
3431
|
const splitRight = async () => {
|
|
3450
|
-
await invoke
|
|
3432
|
+
await invoke('Main.splitRight');
|
|
3451
3433
|
};
|
|
3452
3434
|
const splitDown = async () => {
|
|
3453
|
-
await invoke
|
|
3435
|
+
await invoke('Main.splitDown');
|
|
3454
3436
|
};
|
|
3455
3437
|
const openKeyBindings = async () => {
|
|
3456
|
-
await invoke
|
|
3438
|
+
await invoke('Main.openKeyBindings');
|
|
3457
3439
|
};
|
|
3458
3440
|
const handleClickTogglePreview = async () => {
|
|
3459
|
-
await invoke
|
|
3441
|
+
await invoke('Main.handleClickTogglePreview');
|
|
3460
3442
|
};
|
|
3461
3443
|
const closeAllEditors = async () => {
|
|
3462
|
-
await invoke
|
|
3444
|
+
await invoke('Main.closeAllEditors');
|
|
3463
3445
|
};
|
|
3464
3446
|
const closeTabsLeft = async () => {
|
|
3465
|
-
await invoke
|
|
3447
|
+
await invoke('Main.closeTabsLeft');
|
|
3466
3448
|
};
|
|
3467
3449
|
const handleModifiedStatusChange = async (uri, newStatus) => {
|
|
3468
|
-
await invoke
|
|
3450
|
+
await invoke('Main.handleModifiedStatusChange', uri, newStatus);
|
|
3469
3451
|
};
|
|
3470
3452
|
const closeTabsRight = async () => {
|
|
3471
|
-
await invoke
|
|
3453
|
+
await invoke('Main.closeTabsRight');
|
|
3472
3454
|
};
|
|
3473
3455
|
const selectTab$1 = async (groupIndex, tabIndex) => {
|
|
3474
|
-
await invoke
|
|
3456
|
+
await invoke('Main.selectTab', groupIndex, tabIndex);
|
|
3475
3457
|
};
|
|
3476
3458
|
const closeOthers = async () => {
|
|
3477
|
-
await invoke
|
|
3459
|
+
await invoke('Main.closeOthers');
|
|
3478
3460
|
};
|
|
3479
3461
|
const closeActiveEditor = async () => {
|
|
3480
|
-
await invoke
|
|
3462
|
+
await invoke('Main.closeActiveEditor');
|
|
3481
3463
|
};
|
|
3482
3464
|
const save = async () => {
|
|
3483
|
-
await invoke
|
|
3465
|
+
await invoke('Main.save');
|
|
3484
3466
|
};
|
|
3485
3467
|
const saveAll = async () => {
|
|
3486
|
-
await invoke
|
|
3468
|
+
await invoke('Main.saveAll');
|
|
3487
3469
|
};
|
|
3488
3470
|
const focusFirst$3 = async () => {
|
|
3489
|
-
await invoke
|
|
3471
|
+
await invoke('Main.focusFirst');
|
|
3490
3472
|
};
|
|
3491
3473
|
const focusNext$3 = async () => {
|
|
3492
|
-
await invoke
|
|
3474
|
+
await invoke('Main.focusNext');
|
|
3493
3475
|
};
|
|
3494
3476
|
const focusPrevious$3 = async () => {
|
|
3495
|
-
await invoke
|
|
3477
|
+
await invoke('Main.focusPrevious');
|
|
3496
3478
|
};
|
|
3497
3479
|
const focusLast$2 = async () => {
|
|
3498
|
-
await invoke
|
|
3480
|
+
await invoke('Main.focusLast');
|
|
3499
3481
|
};
|
|
3500
3482
|
const handleTabContextMenu = async (button, x, y) => {
|
|
3501
|
-
await invoke
|
|
3483
|
+
await invoke('Main.handleTabContextMenu', button, x, y);
|
|
3502
3484
|
};
|
|
3503
3485
|
const copyPath$1 = async () => {
|
|
3504
|
-
await invoke
|
|
3486
|
+
await invoke('Main.copyPath');
|
|
3505
3487
|
};
|
|
3506
3488
|
const copyRelativePath = async () => {
|
|
3507
|
-
await invoke
|
|
3489
|
+
await invoke('Main.copyRelativePath');
|
|
3508
3490
|
};
|
|
3509
3491
|
|
|
3510
3492
|
const Main = {
|
|
@@ -3531,12 +3513,11 @@ const Main = {
|
|
|
3531
3513
|
splitRight
|
|
3532
3514
|
};
|
|
3533
3515
|
|
|
3534
|
-
/* eslint-disable @typescript-eslint/only-throw-error, @typescript-eslint/prefer-readonly-parameter-types */
|
|
3535
3516
|
const enableMemoryOpener = async () => {
|
|
3536
|
-
await invoke('Open.enableMemoryOpener');
|
|
3517
|
+
await invoke$1('Open.enableMemoryOpener');
|
|
3537
3518
|
};
|
|
3538
3519
|
const disableMemoryOpener = async () => {
|
|
3539
|
-
await invoke('Open.disableMemoryOpener');
|
|
3520
|
+
await invoke$1('Open.disableMemoryOpener');
|
|
3540
3521
|
};
|
|
3541
3522
|
const matchesExpectedText = (actualText, expectedText) => {
|
|
3542
3523
|
if (typeof expectedText === 'string') {
|
|
@@ -3545,7 +3526,7 @@ const matchesExpectedText = (actualText, expectedText) => {
|
|
|
3545
3526
|
return expectedText.test(actualText);
|
|
3546
3527
|
};
|
|
3547
3528
|
const shouldHaveUrl = async expectedText => {
|
|
3548
|
-
const actualText = await invoke('Open.readOpenedUrl');
|
|
3529
|
+
const actualText = await invoke$1('Open.readOpenedUrl');
|
|
3549
3530
|
if (!matchesExpectedText(actualText, expectedText)) {
|
|
3550
3531
|
throw new AssertionError(`expected opened url to be "${expectedText}" but was "${actualText}"`);
|
|
3551
3532
|
}
|
|
@@ -3558,11 +3539,11 @@ const Open = {
|
|
|
3558
3539
|
};
|
|
3559
3540
|
|
|
3560
3541
|
const open$3 = async id => {
|
|
3561
|
-
await invoke
|
|
3542
|
+
await invoke('Layout.showPanel', id);
|
|
3562
3543
|
};
|
|
3563
3544
|
const openProblems = async () => {
|
|
3564
3545
|
await open$3('Problems');
|
|
3565
|
-
await invoke
|
|
3546
|
+
await invoke('Panel.selectIndex', 0);
|
|
3566
3547
|
};
|
|
3567
3548
|
|
|
3568
3549
|
const Panel = {
|
|
@@ -3572,19 +3553,19 @@ const Panel = {
|
|
|
3572
3553
|
|
|
3573
3554
|
const show$4 = async () => {
|
|
3574
3555
|
await open$3('Output');
|
|
3575
|
-
await invoke
|
|
3556
|
+
await invoke('Panel.selectIndex', 1);
|
|
3576
3557
|
};
|
|
3577
3558
|
const handleFilterInput$1 = async text => {
|
|
3578
|
-
await invoke
|
|
3559
|
+
await invoke('Output.handleFilterInput', text, Script);
|
|
3579
3560
|
};
|
|
3580
3561
|
const selectChannel = async channelId => {
|
|
3581
|
-
await invoke
|
|
3562
|
+
await invoke('Output.selectChannel', channelId);
|
|
3582
3563
|
};
|
|
3583
3564
|
const clear$2 = async () => {
|
|
3584
|
-
await invoke
|
|
3565
|
+
await invoke('Output.clear');
|
|
3585
3566
|
};
|
|
3586
3567
|
const saveAs = async () => {
|
|
3587
|
-
await invoke
|
|
3568
|
+
await invoke('Output.saveAs');
|
|
3588
3569
|
};
|
|
3589
3570
|
|
|
3590
3571
|
const Output = {
|
|
@@ -3609,7 +3590,7 @@ const getIsFirefox = () => {
|
|
|
3609
3590
|
};
|
|
3610
3591
|
|
|
3611
3592
|
const getNodePath$1 = () => {
|
|
3612
|
-
return invoke
|
|
3593
|
+
return invoke(/* Platform.getNodePath */'Platform.getNodePath');
|
|
3613
3594
|
};
|
|
3614
3595
|
|
|
3615
3596
|
const getNodePath = () => {
|
|
@@ -3625,38 +3606,38 @@ const Platform = {
|
|
|
3625
3606
|
};
|
|
3626
3607
|
|
|
3627
3608
|
const open$2 = async uri => {
|
|
3628
|
-
await invoke
|
|
3609
|
+
await invoke('Layout.showPreview', uri);
|
|
3629
3610
|
};
|
|
3630
3611
|
const handleClick = async hdId => {
|
|
3631
|
-
await invoke
|
|
3612
|
+
await invoke('Preview.handleClick', hdId);
|
|
3632
3613
|
};
|
|
3633
3614
|
const handleInput$3 = async (hdId, value) => {
|
|
3634
|
-
await invoke
|
|
3615
|
+
await invoke('Preview.handleInput', hdId, value);
|
|
3635
3616
|
};
|
|
3636
3617
|
const handleMouseDown = async (hdId, clientX, clientY) => {
|
|
3637
|
-
await invoke
|
|
3618
|
+
await invoke('Preview.handleMouseDown', hdId, clientX, clientY);
|
|
3638
3619
|
};
|
|
3639
3620
|
const handleMouseUp = async (hdId, value, clientX, clientY) => {
|
|
3640
|
-
await invoke
|
|
3621
|
+
await invoke('Preview.handleMouseUp', hdId, value, clientX, clientY);
|
|
3641
3622
|
};
|
|
3642
3623
|
const handleMouseMove = async (hdId, value, clientX, clientY) => {
|
|
3643
|
-
await invoke
|
|
3624
|
+
await invoke('Preview.handleMouseMove', hdId, value, clientX, clientY);
|
|
3644
3625
|
};
|
|
3645
3626
|
const handleKeyDown = async (hdId, key, code) => {
|
|
3646
|
-
await invoke
|
|
3627
|
+
await invoke('Preview.handleKeyDown', hdId, key, code);
|
|
3647
3628
|
};
|
|
3648
3629
|
const setUri = async uri => {
|
|
3649
|
-
await invoke
|
|
3630
|
+
await invoke('Preview.setUri', uri);
|
|
3650
3631
|
};
|
|
3651
3632
|
|
|
3652
3633
|
/**
|
|
3653
3634
|
* @deprecated use waitForMutation instead
|
|
3654
3635
|
*/
|
|
3655
3636
|
const waitForClick = async () => {
|
|
3656
|
-
await invoke
|
|
3637
|
+
await invoke('Preview.waitForClick');
|
|
3657
3638
|
};
|
|
3658
3639
|
const waitForMutation = async () => {
|
|
3659
|
-
await invoke
|
|
3640
|
+
await invoke('Preview.waitForMutation');
|
|
3660
3641
|
};
|
|
3661
3642
|
|
|
3662
3643
|
const Preview = {
|
|
@@ -3673,34 +3654,34 @@ const Preview = {
|
|
|
3673
3654
|
};
|
|
3674
3655
|
|
|
3675
3656
|
const show$3 = async () => {
|
|
3676
|
-
await invoke
|
|
3657
|
+
await invoke('Panel.selectIndex', 0);
|
|
3677
3658
|
};
|
|
3678
3659
|
const handleFilterInput = async text => {
|
|
3679
|
-
await invoke
|
|
3660
|
+
await invoke('Problems.handleFilterInput', text, Script);
|
|
3680
3661
|
};
|
|
3681
3662
|
const copyMessage = async () => {
|
|
3682
|
-
await invoke
|
|
3663
|
+
await invoke('Problems.copyMessage');
|
|
3683
3664
|
};
|
|
3684
3665
|
const focusIndex$3 = async index => {
|
|
3685
|
-
await invoke
|
|
3666
|
+
await invoke('Problems.focusIndex', index);
|
|
3686
3667
|
};
|
|
3687
3668
|
const handleArrowLeft = async () => {
|
|
3688
|
-
await invoke
|
|
3669
|
+
await invoke('Problems.handleArrowLeft');
|
|
3689
3670
|
};
|
|
3690
3671
|
const handleArrowRight = async () => {
|
|
3691
|
-
await invoke
|
|
3672
|
+
await invoke('Problems.handleArrowRight');
|
|
3692
3673
|
};
|
|
3693
3674
|
const handleClickAt$1 = async (x, y) => {
|
|
3694
|
-
await invoke
|
|
3675
|
+
await invoke('Problems.handleClickAt', x, y);
|
|
3695
3676
|
};
|
|
3696
3677
|
const handleIconThemeChange = async () => {
|
|
3697
|
-
await invoke
|
|
3678
|
+
await invoke('Problems.handleIconThemeChange');
|
|
3698
3679
|
};
|
|
3699
3680
|
const viewAsList = async () => {
|
|
3700
|
-
await invoke
|
|
3681
|
+
await invoke('Problems.viewAsList');
|
|
3701
3682
|
};
|
|
3702
3683
|
const viewAsTable = async () => {
|
|
3703
|
-
await invoke
|
|
3684
|
+
await invoke('Problems.viewAsTable');
|
|
3704
3685
|
};
|
|
3705
3686
|
|
|
3706
3687
|
const Problems = {
|
|
@@ -3724,7 +3705,7 @@ const registerCallbackCommand = async commandId => {
|
|
|
3724
3705
|
resolve
|
|
3725
3706
|
} = Promise.withResolvers();
|
|
3726
3707
|
callbacks[id] = resolve;
|
|
3727
|
-
await invoke
|
|
3708
|
+
await invoke(`Test.registerTestCommand`, commandId);
|
|
3728
3709
|
return {
|
|
3729
3710
|
promise
|
|
3730
3711
|
};
|
|
@@ -3733,45 +3714,45 @@ const registerCallbackCommand = async commandId => {
|
|
|
3733
3714
|
const QuickPick$1 = 'QuickPick';
|
|
3734
3715
|
|
|
3735
3716
|
const open$1 = async () => {
|
|
3736
|
-
await invoke
|
|
3717
|
+
await invoke('Viewlet.openWidget', QuickPick$1, 'everything');
|
|
3737
3718
|
};
|
|
3738
3719
|
const handleInput$2 = async value => {
|
|
3739
|
-
await invoke
|
|
3720
|
+
await invoke('QuickPick.handleInput', value, 0);
|
|
3740
3721
|
};
|
|
3741
3722
|
const handleClickAt = async (x, y) => {
|
|
3742
|
-
await invoke
|
|
3723
|
+
await invoke('QuickPick.handleClickAt', x, y);
|
|
3743
3724
|
};
|
|
3744
3725
|
const setValue$1 = async value => {
|
|
3745
|
-
await invoke
|
|
3726
|
+
await invoke('QuickPick.setValue', value);
|
|
3746
3727
|
};
|
|
3747
3728
|
const focusNext$2 = async () => {
|
|
3748
|
-
await invoke
|
|
3729
|
+
await invoke('QuickPick.focusNext');
|
|
3749
3730
|
};
|
|
3750
3731
|
const focusFirst$2 = async () => {
|
|
3751
|
-
await invoke
|
|
3732
|
+
await invoke('QuickPick.focusFirst');
|
|
3752
3733
|
};
|
|
3753
3734
|
const focusLast$1 = async () => {
|
|
3754
|
-
await invoke
|
|
3735
|
+
await invoke('QuickPick.focusLast');
|
|
3755
3736
|
};
|
|
3756
3737
|
const focusIndex$2 = async index => {
|
|
3757
|
-
await invoke
|
|
3738
|
+
await invoke('QuickPick.focusIndex', index);
|
|
3758
3739
|
};
|
|
3759
3740
|
const focusPrevious$2 = async () => {
|
|
3760
|
-
await invoke
|
|
3741
|
+
await invoke('QuickPick.focusPrevious');
|
|
3761
3742
|
};
|
|
3762
3743
|
const selectItem = async label => {
|
|
3763
|
-
await invoke
|
|
3744
|
+
await invoke('QuickPick.selectItem', label);
|
|
3764
3745
|
};
|
|
3765
3746
|
const selectIndex$3 = async index => {
|
|
3766
|
-
await invoke
|
|
3747
|
+
await invoke('QuickPick.selectIndex', index);
|
|
3767
3748
|
};
|
|
3768
3749
|
const selectCurrentIndex = async () => {
|
|
3769
|
-
await invoke
|
|
3750
|
+
await invoke('QuickPick.selectCurrentIndex');
|
|
3770
3751
|
};
|
|
3771
3752
|
const executeCommand = async label => {
|
|
3772
|
-
await invoke
|
|
3773
|
-
await invoke
|
|
3774
|
-
await invoke
|
|
3753
|
+
await invoke('QuickPick.showCommands');
|
|
3754
|
+
await invoke('QuickPick.handleInput', label, 0);
|
|
3755
|
+
await invoke('QuickPick.selectItem', label);
|
|
3775
3756
|
};
|
|
3776
3757
|
const selectItem2 = async ({
|
|
3777
3758
|
callbackCommand,
|
|
@@ -3782,7 +3763,7 @@ const selectItem2 = async ({
|
|
|
3782
3763
|
} = await registerCallbackCommand(callbackCommand);
|
|
3783
3764
|
|
|
3784
3765
|
// @ts-ignore
|
|
3785
|
-
invoke
|
|
3766
|
+
invoke('QuickPick.selectItem', label);
|
|
3786
3767
|
await promise;
|
|
3787
3768
|
};
|
|
3788
3769
|
|
|
@@ -3804,13 +3785,13 @@ const QuickPick = {
|
|
|
3804
3785
|
};
|
|
3805
3786
|
|
|
3806
3787
|
const clear$1 = async () => {
|
|
3807
|
-
return invoke
|
|
3788
|
+
return invoke('References.clear');
|
|
3808
3789
|
};
|
|
3809
3790
|
const collapseAll$1 = async () => {
|
|
3810
|
-
return invoke
|
|
3791
|
+
return invoke('References.collapseAll');
|
|
3811
3792
|
};
|
|
3812
3793
|
const refresh = async () => {
|
|
3813
|
-
return invoke
|
|
3794
|
+
return invoke('References.refresh');
|
|
3814
3795
|
};
|
|
3815
3796
|
|
|
3816
3797
|
const References = {
|
|
@@ -3823,31 +3804,31 @@ const show$2 = async () => {
|
|
|
3823
3804
|
await open$7('Run And Debug');
|
|
3824
3805
|
};
|
|
3825
3806
|
const handleClickSectionBreakPoints = async () => {
|
|
3826
|
-
await invoke
|
|
3807
|
+
await invoke('Run And Debug.handleClickSectionBreakPoints');
|
|
3827
3808
|
};
|
|
3828
3809
|
const handleClickSectionWatch = async () => {
|
|
3829
|
-
await invoke
|
|
3810
|
+
await invoke('Run And Debug.handleClickSectionWatch');
|
|
3830
3811
|
};
|
|
3831
3812
|
const addWatchExpression = async expression => {
|
|
3832
|
-
await invoke
|
|
3813
|
+
await invoke('Run And Debug.addWatchExpression', expression);
|
|
3833
3814
|
};
|
|
3834
3815
|
const handleWatchValueChange = async () => {
|
|
3835
|
-
await invoke
|
|
3816
|
+
await invoke('Run And Debug.handleWatchValueChange');
|
|
3836
3817
|
};
|
|
3837
3818
|
const acceptWatchExpressionEdit = async () => {
|
|
3838
|
-
await invoke
|
|
3819
|
+
await invoke('Run And Debug.acceptWatchExpressionEdit');
|
|
3839
3820
|
};
|
|
3840
3821
|
const selectIndex$2 = async index => {
|
|
3841
|
-
await invoke
|
|
3822
|
+
await invoke('Run And Debug.selectIndex', index);
|
|
3842
3823
|
};
|
|
3843
3824
|
const setPauseOnExceptions = async value => {
|
|
3844
|
-
await invoke
|
|
3825
|
+
await invoke('Run And Debug.setPauseOnExceptions', value);
|
|
3845
3826
|
};
|
|
3846
3827
|
const handleRename = async () => {
|
|
3847
|
-
await invoke
|
|
3828
|
+
await invoke('Run And Debug.handleRename');
|
|
3848
3829
|
};
|
|
3849
3830
|
const handleSpace = async () => {
|
|
3850
|
-
await invoke
|
|
3831
|
+
await invoke('Run And Debug.handleSpace');
|
|
3851
3832
|
};
|
|
3852
3833
|
|
|
3853
3834
|
const RunAndDebug = {
|
|
@@ -3863,117 +3844,116 @@ const RunAndDebug = {
|
|
|
3863
3844
|
show: show$2
|
|
3864
3845
|
};
|
|
3865
3846
|
|
|
3866
|
-
/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types */
|
|
3867
3847
|
const setValue = async value => {
|
|
3868
|
-
await invoke
|
|
3848
|
+
await invoke('Search.handleInput', value, Script);
|
|
3869
3849
|
};
|
|
3870
3850
|
const setReplaceValue = async value => {
|
|
3871
|
-
await invoke
|
|
3851
|
+
await invoke('Search.handleReplaceInput', value, Script);
|
|
3872
3852
|
};
|
|
3873
3853
|
const setExcludeValue = async value => {
|
|
3874
|
-
await invoke
|
|
3854
|
+
await invoke('Search.handleExcludeInput', value, Script);
|
|
3875
3855
|
};
|
|
3876
3856
|
const replaceAll = async () => {
|
|
3877
|
-
await invoke
|
|
3857
|
+
await invoke('Search.replaceAll');
|
|
3878
3858
|
};
|
|
3879
3859
|
const setIncludeValue = async value => {
|
|
3880
|
-
await invoke
|
|
3860
|
+
await invoke('Search.handleIncludeInput', value, Script);
|
|
3881
3861
|
};
|
|
3882
3862
|
const clearSearchResults = async () => {
|
|
3883
|
-
await invoke
|
|
3863
|
+
await invoke('Search.clearSearchResults');
|
|
3884
3864
|
};
|
|
3885
3865
|
const openDetails = async () => {
|
|
3886
|
-
await invoke
|
|
3866
|
+
await invoke('Search.openDetails');
|
|
3887
3867
|
};
|
|
3888
3868
|
const collapseDetails = async () => {
|
|
3889
|
-
await invoke
|
|
3869
|
+
await invoke('Search.collapseDetails');
|
|
3890
3870
|
};
|
|
3891
3871
|
const dismissItem = async () => {
|
|
3892
|
-
await invoke
|
|
3872
|
+
await invoke('Search.dismissItem');
|
|
3893
3873
|
};
|
|
3894
3874
|
const focusFirst$1 = async () => {
|
|
3895
|
-
await invoke
|
|
3875
|
+
await invoke('Search.focusFirst');
|
|
3896
3876
|
};
|
|
3897
3877
|
const focusIndex$1 = async index => {
|
|
3898
|
-
await invoke
|
|
3878
|
+
await invoke('Search.focusIndex', index);
|
|
3899
3879
|
};
|
|
3900
3880
|
const selectIndex$1 = async index => {
|
|
3901
|
-
await invoke
|
|
3881
|
+
await invoke('Search.selectIndex', index);
|
|
3902
3882
|
};
|
|
3903
3883
|
const focusNext$1 = async () => {
|
|
3904
|
-
await invoke
|
|
3884
|
+
await invoke('Search.focusNext');
|
|
3905
3885
|
};
|
|
3906
3886
|
const handleWheel = async (deltaMode, deltaY) => {
|
|
3907
|
-
await invoke
|
|
3887
|
+
await invoke('Search.handleWheel', deltaMode, deltaY);
|
|
3908
3888
|
};
|
|
3909
3889
|
const focusNextPage = async () => {
|
|
3910
|
-
await invoke
|
|
3890
|
+
await invoke('Search.focusPage');
|
|
3911
3891
|
};
|
|
3912
3892
|
const focusPreviousPage = async () => {
|
|
3913
|
-
await invoke
|
|
3893
|
+
await invoke('Search.focusPreviousPage');
|
|
3914
3894
|
};
|
|
3915
3895
|
const focusPrevious$1 = async () => {
|
|
3916
|
-
await invoke
|
|
3896
|
+
await invoke('Search.focusPrevious');
|
|
3917
3897
|
};
|
|
3918
3898
|
const toggleSearchDetails = async () => {
|
|
3919
|
-
await invoke
|
|
3899
|
+
await invoke('Search.toggleSearchDetails');
|
|
3920
3900
|
};
|
|
3921
3901
|
const toggleMatchCase = async () => {
|
|
3922
|
-
await invoke
|
|
3902
|
+
await invoke('Search.toggleMatchCase');
|
|
3923
3903
|
};
|
|
3924
3904
|
const toggleMatchWholeWord = async () => {
|
|
3925
|
-
await invoke
|
|
3905
|
+
await invoke('Search.toggleMatchWholeWord');
|
|
3926
3906
|
};
|
|
3927
3907
|
const togglePreserveCase = async () => {
|
|
3928
|
-
await invoke
|
|
3908
|
+
await invoke('Search.togglePreserveCase');
|
|
3929
3909
|
};
|
|
3930
3910
|
const toggleUseRegularExpression = async () => {
|
|
3931
|
-
await invoke
|
|
3911
|
+
await invoke('Search.toggleUseRegularExpression');
|
|
3932
3912
|
};
|
|
3933
3913
|
const toggleReplace = async () => {
|
|
3934
|
-
await invoke
|
|
3914
|
+
await invoke('Search.toggleReplace');
|
|
3935
3915
|
};
|
|
3936
3916
|
const open = async () => {
|
|
3937
|
-
await invoke
|
|
3917
|
+
await invoke('SideBar.openViewlet', 'Search');
|
|
3938
3918
|
};
|
|
3939
3919
|
const setLimit = async limit => {
|
|
3940
|
-
await invoke
|
|
3920
|
+
await invoke('Search.setLimit', limit);
|
|
3941
3921
|
};
|
|
3942
3922
|
const handleListBlur = async () => {
|
|
3943
|
-
await invoke
|
|
3923
|
+
await invoke('Search.handleListBlur');
|
|
3944
3924
|
};
|
|
3945
3925
|
const collapseAll = async () => {
|
|
3946
|
-
await invoke
|
|
3926
|
+
await invoke('Search.collapseAll');
|
|
3947
3927
|
};
|
|
3948
3928
|
const copy = async () => {
|
|
3949
|
-
await invoke
|
|
3929
|
+
await invoke('Search.copy');
|
|
3950
3930
|
};
|
|
3951
3931
|
const copyPath = async () => {
|
|
3952
|
-
await invoke
|
|
3932
|
+
await invoke('Search.copyPath');
|
|
3953
3933
|
};
|
|
3954
3934
|
const handleInputCut = async name => {
|
|
3955
|
-
await invoke
|
|
3935
|
+
await invoke('Search.handleInputCut', name);
|
|
3956
3936
|
};
|
|
3957
3937
|
const handleInputPaste = async name => {
|
|
3958
|
-
await invoke
|
|
3938
|
+
await invoke('Search.handleInputPaste', name);
|
|
3959
3939
|
};
|
|
3960
3940
|
const handleInputCopy = async name => {
|
|
3961
|
-
await invoke
|
|
3941
|
+
await invoke('Search.handleInputCopy', name);
|
|
3962
3942
|
};
|
|
3963
3943
|
const handleInputSelectionChange = async (name, start, end) => {
|
|
3964
|
-
await invoke
|
|
3944
|
+
await invoke('Search.handleInputSelectionChange', name, start, end);
|
|
3965
3945
|
};
|
|
3966
3946
|
const handleInputContextMenu = async (name, button, x, y) => {
|
|
3967
|
-
await invoke
|
|
3947
|
+
await invoke('Search.handleInputConextMenu', name, button, x, y);
|
|
3968
3948
|
};
|
|
3969
3949
|
const handleContextMenu$2 = async (button, x, y) => {
|
|
3970
|
-
await invoke
|
|
3950
|
+
await invoke('Search.handleContextMenu', button, x, y);
|
|
3971
3951
|
};
|
|
3972
3952
|
const enableRenderFolderPaths = async () => {
|
|
3973
|
-
await invoke
|
|
3953
|
+
await invoke('Search.enableRenderFolderPaths');
|
|
3974
3954
|
};
|
|
3975
3955
|
const disableRenderFolderPaths = async () => {
|
|
3976
|
-
await invoke
|
|
3956
|
+
await invoke('Search.disableRenderFolderPaths');
|
|
3977
3957
|
};
|
|
3978
3958
|
|
|
3979
3959
|
const Search = {
|
|
@@ -4017,25 +3997,25 @@ const Search = {
|
|
|
4017
3997
|
};
|
|
4018
3998
|
|
|
4019
3999
|
const show$1 = async () => {
|
|
4020
|
-
return invoke
|
|
4000
|
+
return invoke('Main.openUri', 'settings://');
|
|
4021
4001
|
};
|
|
4022
4002
|
const handleInput$1 = async searchValue => {
|
|
4023
|
-
return invoke
|
|
4003
|
+
return invoke('Settings.handleInput', searchValue, Script);
|
|
4024
4004
|
};
|
|
4025
4005
|
const usePreviousSearchValue = async () => {
|
|
4026
|
-
return invoke
|
|
4006
|
+
return invoke('Settings.usePreviousSearchValue');
|
|
4027
4007
|
};
|
|
4028
4008
|
const useNextSearchValue = async () => {
|
|
4029
|
-
return invoke
|
|
4009
|
+
return invoke('Settings.useNextSearchValue');
|
|
4030
4010
|
};
|
|
4031
4011
|
const clear = async searchValue => {
|
|
4032
|
-
return invoke
|
|
4012
|
+
return invoke('Settings.clear', searchValue, Script);
|
|
4033
4013
|
};
|
|
4034
4014
|
const clearHistory = async () => {
|
|
4035
|
-
return invoke
|
|
4015
|
+
return invoke('Settings.clearHistory');
|
|
4036
4016
|
};
|
|
4037
4017
|
const selectTab = async tabId => {
|
|
4038
|
-
return invoke
|
|
4018
|
+
return invoke('Settings.handleClickTab', tabId);
|
|
4039
4019
|
};
|
|
4040
4020
|
const selectWorkspace = async () => {
|
|
4041
4021
|
await selectTab('workspace');
|
|
@@ -4050,10 +4030,10 @@ const selectWindow = async () => {
|
|
|
4050
4030
|
await selectTab('window');
|
|
4051
4031
|
};
|
|
4052
4032
|
const handleScroll = async scrollTop => {
|
|
4053
|
-
await invoke
|
|
4033
|
+
await invoke('Settings.handleScroll', scrollTop, Script);
|
|
4054
4034
|
};
|
|
4055
4035
|
const handleClickFilterButton = async (x, y) => {
|
|
4056
|
-
await invoke
|
|
4036
|
+
await invoke('Settings.handleClickFilterButton', x, y);
|
|
4057
4037
|
};
|
|
4058
4038
|
|
|
4059
4039
|
const SettingsView = {
|
|
@@ -4073,19 +4053,19 @@ const SettingsView = {
|
|
|
4073
4053
|
};
|
|
4074
4054
|
|
|
4075
4055
|
const selectIndex = async index => {
|
|
4076
|
-
await invoke
|
|
4056
|
+
await invoke('Source Control.selectIndex', index);
|
|
4077
4057
|
};
|
|
4078
4058
|
const acceptInput = async () => {
|
|
4079
|
-
await invoke
|
|
4059
|
+
await invoke('Source Control.acceptInput');
|
|
4080
4060
|
};
|
|
4081
4061
|
const handleInput = async text => {
|
|
4082
|
-
await invoke
|
|
4062
|
+
await invoke('Source Control.handleInput', text, Script$1);
|
|
4083
4063
|
};
|
|
4084
4064
|
const handleClickSourceControlButtons = async (index, name) => {
|
|
4085
|
-
await invoke
|
|
4065
|
+
await invoke('Source Control.handleClickSourceControlButtons', index, name);
|
|
4086
4066
|
};
|
|
4087
4067
|
const handleContextMenu$1 = async (button, x, y) => {
|
|
4088
|
-
await invoke
|
|
4068
|
+
await invoke('Source Control.handleContextMenu', button, x, y);
|
|
4089
4069
|
};
|
|
4090
4070
|
const show = async () => {
|
|
4091
4071
|
await open$7('Source Control');
|
|
@@ -4101,7 +4081,7 @@ const SourceControl = {
|
|
|
4101
4081
|
};
|
|
4102
4082
|
|
|
4103
4083
|
const update = async () => {
|
|
4104
|
-
await invoke
|
|
4084
|
+
await invoke('StatusBar.updateStatusBarItems');
|
|
4105
4085
|
};
|
|
4106
4086
|
|
|
4107
4087
|
const StatusBar = {
|
|
@@ -4109,61 +4089,61 @@ const StatusBar = {
|
|
|
4109
4089
|
};
|
|
4110
4090
|
|
|
4111
4091
|
const closeMenu = async () => {
|
|
4112
|
-
await invoke
|
|
4092
|
+
await invoke('TitleBar.closeMenu');
|
|
4113
4093
|
};
|
|
4114
4094
|
const focus = async () => {
|
|
4115
|
-
await invoke
|
|
4095
|
+
await invoke('TitleBar.focus');
|
|
4116
4096
|
};
|
|
4117
4097
|
const focusFirst = async () => {
|
|
4118
|
-
await invoke
|
|
4098
|
+
await invoke('TitleBar.focusFirst');
|
|
4119
4099
|
};
|
|
4120
4100
|
const setTitleTemplate = async template => {
|
|
4121
|
-
await invoke
|
|
4101
|
+
await invoke('TitleBar.setTitleTemplate', template);
|
|
4122
4102
|
};
|
|
4123
4103
|
const focusIndex = async index => {
|
|
4124
|
-
await invoke
|
|
4104
|
+
await invoke('TitleBar.focusIndex', index);
|
|
4125
4105
|
};
|
|
4126
4106
|
const focusLast = async () => {
|
|
4127
|
-
await invoke
|
|
4107
|
+
await invoke('TitleBar.focusLast');
|
|
4128
4108
|
};
|
|
4129
4109
|
const focusNext = async () => {
|
|
4130
|
-
await invoke
|
|
4110
|
+
await invoke('TitleBar.focusNext');
|
|
4131
4111
|
};
|
|
4132
4112
|
const focusPrevious = async () => {
|
|
4133
|
-
await invoke
|
|
4113
|
+
await invoke('TitleBar.focusPrevious');
|
|
4134
4114
|
};
|
|
4135
4115
|
const handleKeyArrowDown = async () => {
|
|
4136
|
-
await invoke
|
|
4116
|
+
await invoke('TitleBar.handleKeyArrowDown');
|
|
4137
4117
|
};
|
|
4138
4118
|
const handleKeyArrowLeft = async () => {
|
|
4139
|
-
await invoke
|
|
4119
|
+
await invoke('TitleBar.handleKeyArrowLeft');
|
|
4140
4120
|
};
|
|
4141
4121
|
const handleKeyArrowRight = async () => {
|
|
4142
|
-
await invoke
|
|
4122
|
+
await invoke('TitleBar.handleKeyArrowRight');
|
|
4143
4123
|
};
|
|
4144
4124
|
const handleKeyArrowUp = async () => {
|
|
4145
|
-
await invoke
|
|
4125
|
+
await invoke('TitleBar.handleKeyArrowUp');
|
|
4146
4126
|
};
|
|
4147
4127
|
const handleKeyEnd = async () => {
|
|
4148
|
-
await invoke
|
|
4128
|
+
await invoke('TitleBar.handleKeyEnd');
|
|
4149
4129
|
};
|
|
4150
4130
|
const handleKeyHome = async () => {
|
|
4151
|
-
await invoke
|
|
4131
|
+
await invoke('TitleBar.handleKeyHome');
|
|
4152
4132
|
};
|
|
4153
4133
|
const handleKeySpace = async () => {
|
|
4154
|
-
await invoke
|
|
4134
|
+
await invoke('TitleBar.handleKeySpace');
|
|
4155
4135
|
};
|
|
4156
4136
|
const handleKeyEscape = async () => {
|
|
4157
|
-
await invoke
|
|
4137
|
+
await invoke('TitleBar.handleKeyEscape');
|
|
4158
4138
|
};
|
|
4159
4139
|
const toggleIndex = async index => {
|
|
4160
|
-
await invoke
|
|
4140
|
+
await invoke('TitleBar.toggleIndex', index);
|
|
4161
4141
|
};
|
|
4162
4142
|
const toggleMenu = async () => {
|
|
4163
|
-
await invoke
|
|
4143
|
+
await invoke('TitleBar.toggleMenu');
|
|
4164
4144
|
};
|
|
4165
4145
|
const handleContextMenu = async (button, x, y) => {
|
|
4166
|
-
await invoke
|
|
4146
|
+
await invoke('TitleBar.handleContextMenu', button, x, y);
|
|
4167
4147
|
};
|
|
4168
4148
|
|
|
4169
4149
|
const TitleBarMenuBar = {
|
|
@@ -4214,7 +4194,7 @@ const getPortTuple = () => {
|
|
|
4214
4194
|
|
|
4215
4195
|
// TODO ask webview worker directly
|
|
4216
4196
|
const getWebViewInfo = async webViewId => {
|
|
4217
|
-
const info = await invoke
|
|
4197
|
+
const info = await invoke('WebView.getWebViewInfo2', webViewId);
|
|
4218
4198
|
return info;
|
|
4219
4199
|
};
|
|
4220
4200
|
|
|
@@ -4238,8 +4218,6 @@ const waitForFirstEventEvent = async port => {
|
|
|
4238
4218
|
return firstEvent;
|
|
4239
4219
|
};
|
|
4240
4220
|
|
|
4241
|
-
/* eslint-disable @typescript-eslint/only-throw-error */
|
|
4242
|
-
|
|
4243
4221
|
const createPortRpc = async webViewId => {
|
|
4244
4222
|
// TODO use transforpemssageportrpc
|
|
4245
4223
|
const {
|
|
@@ -4253,7 +4231,7 @@ const createPortRpc = async webViewId => {
|
|
|
4253
4231
|
if (firstEvent.data !== 'ready') {
|
|
4254
4232
|
throw new Error('unexpected first message');
|
|
4255
4233
|
}
|
|
4256
|
-
const rpc = await
|
|
4234
|
+
const rpc = await create$2({
|
|
4257
4235
|
commandMap: {},
|
|
4258
4236
|
isMessagePortOpen: true,
|
|
4259
4237
|
messagePort: port1
|
|
@@ -4280,7 +4258,7 @@ const WebView = {
|
|
|
4280
4258
|
};
|
|
4281
4259
|
|
|
4282
4260
|
const setPath = async path => {
|
|
4283
|
-
await invoke
|
|
4261
|
+
await invoke('Workspace.setPath', path);
|
|
4284
4262
|
};
|
|
4285
4263
|
const openTmpDir = async () => {
|
|
4286
4264
|
const tmpDir = await getTmpDir();
|
|
@@ -4294,13 +4272,13 @@ const Workspace = {
|
|
|
4294
4272
|
};
|
|
4295
4273
|
|
|
4296
4274
|
const load = async url => {
|
|
4297
|
-
await invoke
|
|
4275
|
+
await invoke('Audio.load', url);
|
|
4298
4276
|
};
|
|
4299
4277
|
const play = async url => {
|
|
4300
|
-
await invoke
|
|
4278
|
+
await invoke('Audio.play', url);
|
|
4301
4279
|
};
|
|
4302
4280
|
const pause = async () => {
|
|
4303
|
-
await invoke
|
|
4281
|
+
await invoke('Audio.pause');
|
|
4304
4282
|
};
|
|
4305
4283
|
|
|
4306
4284
|
const Audio = {
|
|
@@ -4456,7 +4434,7 @@ const executeTest = async (name, fn, globals = {}) => {
|
|
|
4456
4434
|
// eslint-disable-next-line no-console
|
|
4457
4435
|
console.info(`PASS ${name} in ${formattedDuration}`);
|
|
4458
4436
|
}
|
|
4459
|
-
await invoke
|
|
4437
|
+
await invoke('TestFrameWork.showOverlay', type, background, text);
|
|
4460
4438
|
};
|
|
4461
4439
|
|
|
4462
4440
|
const hotReloadEnabled = async () => {
|
|
@@ -4475,7 +4453,6 @@ const importScript = async url => {
|
|
|
4475
4453
|
}
|
|
4476
4454
|
};
|
|
4477
4455
|
|
|
4478
|
-
/* eslint-disable @typescript-eslint/only-throw-error */
|
|
4479
4456
|
const importTest = async url => {
|
|
4480
4457
|
try {
|
|
4481
4458
|
return await importScript(url);
|
|
@@ -4484,8 +4461,6 @@ const importTest = async url => {
|
|
|
4484
4461
|
}
|
|
4485
4462
|
};
|
|
4486
4463
|
|
|
4487
|
-
/* eslint-disable @typescript-eslint/only-throw-error */
|
|
4488
|
-
|
|
4489
4464
|
let items = [];
|
|
4490
4465
|
const push = item => {
|
|
4491
4466
|
items = [...items, item];
|
|
@@ -4509,7 +4484,7 @@ const watchForHotReload = async (platform, href) => {
|
|
|
4509
4484
|
}
|
|
4510
4485
|
const fileUrl = getFileUri(href);
|
|
4511
4486
|
const callbackCommand = 'FileWatcher.handleEvent';
|
|
4512
|
-
await invoke
|
|
4487
|
+
await invoke('FileWatcher.watchFile', TestWorker, callbackCommand, fileUrl);
|
|
4513
4488
|
};
|
|
4514
4489
|
|
|
4515
4490
|
// TODO move this into three steps:
|
|
@@ -4634,10 +4609,10 @@ const commandMap = {
|
|
|
4634
4609
|
};
|
|
4635
4610
|
|
|
4636
4611
|
const initializeRendererWorker = async () => {
|
|
4637
|
-
const rpc = await
|
|
4612
|
+
const rpc = await create$1({
|
|
4638
4613
|
commandMap: commandMap
|
|
4639
4614
|
});
|
|
4640
|
-
set$
|
|
4615
|
+
set$1(rpc);
|
|
4641
4616
|
};
|
|
4642
4617
|
|
|
4643
4618
|
const listen = async () => {
|