@lvce-editor/test-worker 13.17.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/api.d.ts +8 -1
- package/dist/testWorkerMain.js +627 -635
- 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,126 +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');
|
|
2624
|
+
};
|
|
2625
|
+
const handleDropIndex = async (fileHandles, files, paths, index) => {
|
|
2626
|
+
await invoke('Explorer.handleDropIndex', fileHandles, files, paths, index);
|
|
2637
2627
|
};
|
|
2638
2628
|
const handleInputBlur = async () => {
|
|
2639
|
-
await invoke
|
|
2629
|
+
await invoke('Explorer.handleInputBlur');
|
|
2640
2630
|
};
|
|
2641
2631
|
const focus$1 = async () => {
|
|
2642
|
-
await invoke
|
|
2632
|
+
await invoke('Explorer.focusIndex', -1);
|
|
2643
2633
|
};
|
|
2644
2634
|
const setDeltaY = async deltaY => {
|
|
2645
|
-
await invoke
|
|
2635
|
+
await invoke('Explorer.setDeltaY', deltaY);
|
|
2646
2636
|
};
|
|
2647
2637
|
const focusNext$7 = async () => {
|
|
2648
|
-
await invoke
|
|
2638
|
+
await invoke('Explorer.focusNext');
|
|
2649
2639
|
};
|
|
2650
2640
|
const selectUp = async () => {
|
|
2651
|
-
await invoke
|
|
2641
|
+
await invoke('Explorer.selectUp');
|
|
2652
2642
|
};
|
|
2653
2643
|
const handleDragOverIndex = async index => {
|
|
2654
|
-
await invoke
|
|
2644
|
+
await invoke('Explorer.handleDragOverIndex', index);
|
|
2655
2645
|
};
|
|
2656
2646
|
const selectDown = async () => {
|
|
2657
|
-
await invoke
|
|
2647
|
+
await invoke('Explorer.selectDown');
|
|
2658
2648
|
};
|
|
2659
2649
|
const collapseAll$2 = async () => {
|
|
2660
|
-
await invoke
|
|
2650
|
+
await invoke('Explorer.collapseAll');
|
|
2661
2651
|
};
|
|
2662
2652
|
const refresh$1 = async () => {
|
|
2663
|
-
await invoke
|
|
2653
|
+
await invoke('Explorer.refresh');
|
|
2664
2654
|
};
|
|
2665
2655
|
const focusIndex$5 = async index => {
|
|
2666
|
-
await invoke
|
|
2656
|
+
await invoke('Explorer.focusIndex', index);
|
|
2667
2657
|
};
|
|
2668
2658
|
const clickCurrent = async () => {
|
|
2669
|
-
await invoke
|
|
2659
|
+
await invoke('Explorer.handleClickCurrent');
|
|
2670
2660
|
};
|
|
2671
2661
|
const handleArrowLeft$1 = async () => {
|
|
2672
|
-
await invoke
|
|
2662
|
+
await invoke('Explorer.handleArrowLeft');
|
|
2673
2663
|
};
|
|
2674
2664
|
const focusLast$5 = async () => {
|
|
2675
|
-
await invoke
|
|
2665
|
+
await invoke('Explorer.focusLast');
|
|
2676
2666
|
};
|
|
2677
2667
|
const focusFirst$6 = async () => {
|
|
2678
|
-
await invoke
|
|
2668
|
+
await invoke('Explorer.focusFirst');
|
|
2679
2669
|
};
|
|
2680
2670
|
const removeDirent = async () => {
|
|
2681
|
-
await invoke
|
|
2671
|
+
await invoke('Explorer.removeDirent');
|
|
2682
2672
|
};
|
|
2683
2673
|
const expandRecursively = async () => {
|
|
2684
|
-
await invoke
|
|
2674
|
+
await invoke('Explorer.expandRecursively');
|
|
2685
2675
|
};
|
|
2686
2676
|
const newFile = async () => {
|
|
2687
|
-
await invoke
|
|
2677
|
+
await invoke('Explorer.newFile');
|
|
2688
2678
|
};
|
|
2689
2679
|
const newFolder = async () => {
|
|
2690
|
-
await invoke
|
|
2680
|
+
await invoke('Explorer.newFolder');
|
|
2691
2681
|
};
|
|
2692
2682
|
const copyPath$2 = async () => {
|
|
2693
|
-
await invoke
|
|
2683
|
+
await invoke('Explorer.copyPath');
|
|
2694
2684
|
};
|
|
2695
2685
|
const copyRelativePath$1 = async () => {
|
|
2696
|
-
await invoke
|
|
2686
|
+
await invoke('Explorer.copyRelativePath');
|
|
2697
2687
|
};
|
|
2698
2688
|
const handleClick$3 = async index => {
|
|
2699
|
-
await invoke
|
|
2689
|
+
await invoke('Explorer.handleClick', index);
|
|
2700
2690
|
};
|
|
2701
2691
|
const handleClickAt$2 = async (preventDefault, button, ctrlKey, shiftKey, x, y) => {
|
|
2702
|
-
await invoke
|
|
2692
|
+
await invoke('Explorer.handleClickAt', preventDefault, button, ctrlKey, shiftKey, x, y);
|
|
2703
2693
|
};
|
|
2704
2694
|
const handleDrop = async (x, y, fileIds, fileList) => {
|
|
2705
|
-
await invoke
|
|
2695
|
+
await invoke('Explorer.handleDrop', x, y, fileIds, fileIds);
|
|
2706
2696
|
};
|
|
2707
2697
|
const rename = async () => {
|
|
2708
|
-
await invoke
|
|
2698
|
+
await invoke('Explorer.renameDirent');
|
|
2709
2699
|
};
|
|
2710
2700
|
const selectAll = async () => {
|
|
2711
|
-
await invoke
|
|
2701
|
+
await invoke('Explorer.selectAll');
|
|
2712
2702
|
};
|
|
2713
2703
|
const renameDirent = async () => {
|
|
2714
|
-
await invoke
|
|
2704
|
+
await invoke('Explorer.renameDirent');
|
|
2715
2705
|
};
|
|
2716
2706
|
const cancelEdit = async () => {
|
|
2717
|
-
await invoke
|
|
2707
|
+
await invoke('Explorer.cancelEdit');
|
|
2718
2708
|
};
|
|
2719
2709
|
const acceptEdit = async () => {
|
|
2720
|
-
await invoke
|
|
2710
|
+
await invoke('Explorer.acceptEdit');
|
|
2721
2711
|
};
|
|
2722
2712
|
const updateEditingValue = async value => {
|
|
2723
|
-
await invoke
|
|
2713
|
+
await invoke('Explorer.updateEditingValue', value);
|
|
2724
2714
|
};
|
|
2725
2715
|
const expandAll = async () => {
|
|
2726
|
-
await invoke
|
|
2716
|
+
await invoke('Explorer.expandAll');
|
|
2727
2717
|
};
|
|
2728
2718
|
const handleDragOver = async (x, y) => {
|
|
2729
|
-
await invoke
|
|
2719
|
+
await invoke('Explorer.handleDragOver', x, y);
|
|
2730
2720
|
};
|
|
2731
2721
|
const handleCut = async () => {
|
|
2732
|
-
await invoke
|
|
2722
|
+
await invoke('Explorer.handleCut');
|
|
2733
2723
|
};
|
|
2734
2724
|
const handleCopy = async () => {
|
|
2735
|
-
await invoke
|
|
2725
|
+
await invoke('Explorer.handleCopy');
|
|
2736
2726
|
};
|
|
2737
2727
|
const handlePaste = async () => {
|
|
2738
|
-
await invoke
|
|
2728
|
+
await invoke('Explorer.handlePaste');
|
|
2739
2729
|
};
|
|
2740
2730
|
const selectIndices = async indices => {
|
|
2741
|
-
await invoke
|
|
2731
|
+
await invoke('Explorer.selectIndices', indices);
|
|
2742
2732
|
};
|
|
2743
2733
|
const toggleIndividualSelection = async index => {
|
|
2744
|
-
await invoke
|
|
2734
|
+
await invoke('Explorer.toggleIndividualSelection', index);
|
|
2745
2735
|
};
|
|
2746
2736
|
|
|
2747
2737
|
const Explorer = {
|
|
@@ -2768,6 +2758,7 @@ const Explorer = {
|
|
|
2768
2758
|
handleDragOver,
|
|
2769
2759
|
handleDragOverIndex,
|
|
2770
2760
|
handleDrop,
|
|
2761
|
+
handleDropIndex,
|
|
2771
2762
|
handleEscape,
|
|
2772
2763
|
handleInputBlur,
|
|
2773
2764
|
handlePaste,
|
|
@@ -2790,12 +2781,12 @@ const Explorer = {
|
|
|
2790
2781
|
const addWebExtension = async relativePath => {
|
|
2791
2782
|
// TODO compute absolutePath
|
|
2792
2783
|
const absolutePath = relativePath;
|
|
2793
|
-
await invoke
|
|
2784
|
+
await invoke('ExtensionMeta.addWebExtension', absolutePath);
|
|
2794
2785
|
};
|
|
2795
2786
|
const addNodeExtension = async relativePath => {
|
|
2796
2787
|
// TODO compute absolutePath
|
|
2797
2788
|
const absolutePath = relativePath;
|
|
2798
|
-
await invoke
|
|
2789
|
+
await invoke('ExtensionMeta.addNodeExtension', absolutePath);
|
|
2799
2790
|
};
|
|
2800
2791
|
|
|
2801
2792
|
const Extension = {
|
|
@@ -2804,28 +2795,28 @@ const Extension = {
|
|
|
2804
2795
|
};
|
|
2805
2796
|
|
|
2806
2797
|
const handleClickCategory = async categoryId => {
|
|
2807
|
-
await invoke
|
|
2798
|
+
await invoke('ExtensionDetail.handleClickCategory', categoryId);
|
|
2808
2799
|
};
|
|
2809
2800
|
const handleReadmeContextMenu = async (x, y, nodeName, href) => {
|
|
2810
|
-
await invoke
|
|
2801
|
+
await invoke('ExtensionDetail.handleReadmeContextMenu', x, y, nodeName, href);
|
|
2811
2802
|
};
|
|
2812
2803
|
const copyReadmeLink = async href => {
|
|
2813
|
-
await invoke
|
|
2804
|
+
await invoke('ExtensionDetail.copyReadmeLink', href);
|
|
2814
2805
|
};
|
|
2815
2806
|
const handleClickEnable = async () => {
|
|
2816
|
-
await invoke
|
|
2807
|
+
await invoke('ExtensionDetail.handleClickEnable');
|
|
2817
2808
|
};
|
|
2818
2809
|
const handleClickDisable = async () => {
|
|
2819
|
-
await invoke
|
|
2810
|
+
await invoke('ExtensionDetail.handleClickDisable');
|
|
2820
2811
|
};
|
|
2821
2812
|
const handleClickSetColorTheme = async () => {
|
|
2822
|
-
await invoke
|
|
2813
|
+
await invoke('ExtensionDetail.handleClickSetColorTheme');
|
|
2823
2814
|
};
|
|
2824
2815
|
const selectFeature = name => {
|
|
2825
|
-
return invoke
|
|
2816
|
+
return invoke('ExtensionDetail.selectFeature', name);
|
|
2826
2817
|
};
|
|
2827
2818
|
const selectTab$2 = name => {
|
|
2828
|
-
return invoke
|
|
2819
|
+
return invoke('ExtensionDetail.selectTab', name);
|
|
2829
2820
|
};
|
|
2830
2821
|
const selectDetails = async () => {
|
|
2831
2822
|
await selectTab$2('Details');
|
|
@@ -2837,23 +2828,23 @@ const selectChangelog = async () => {
|
|
|
2837
2828
|
await selectTab$2('Changelog');
|
|
2838
2829
|
};
|
|
2839
2830
|
const focusNextTab = async () => {
|
|
2840
|
-
await invoke
|
|
2831
|
+
await invoke('ExtensionDetail.focusNextTab');
|
|
2841
2832
|
};
|
|
2842
2833
|
const focusPreviousTab = async () => {
|
|
2843
|
-
await invoke
|
|
2834
|
+
await invoke('ExtensionDetail.focusPreviousTab');
|
|
2844
2835
|
};
|
|
2845
2836
|
const open$8 = extensionId => {
|
|
2846
2837
|
const uri = `extension-detail://${extensionId}`;
|
|
2847
|
-
return invoke
|
|
2838
|
+
return invoke('Main.openUri', uri);
|
|
2848
2839
|
};
|
|
2849
2840
|
const handleClickUninstall = () => {
|
|
2850
|
-
return invoke
|
|
2841
|
+
return invoke('ExtensionDetail.handleClickUninstall');
|
|
2851
2842
|
};
|
|
2852
2843
|
const handleImageContextMenu = () => {
|
|
2853
|
-
return invoke
|
|
2844
|
+
return invoke('ExtensionDetail.handleImageContextMenu');
|
|
2854
2845
|
};
|
|
2855
2846
|
const openFeature = featureName => {
|
|
2856
|
-
return invoke
|
|
2847
|
+
return invoke('ExtensionDetail.handleFeaturesClick', featureName);
|
|
2857
2848
|
};
|
|
2858
2849
|
const openThemes = async () => {
|
|
2859
2850
|
await openFeature('Theme');
|
|
@@ -2874,13 +2865,13 @@ const openSettings = async () => {
|
|
|
2874
2865
|
await openFeature('Settings');
|
|
2875
2866
|
};
|
|
2876
2867
|
const handleScroll$1 = async scrollTop => {
|
|
2877
|
-
return invoke
|
|
2868
|
+
return invoke('ExtensionDetail.handleScroll', scrollTop);
|
|
2878
2869
|
};
|
|
2879
2870
|
const hideSizeLink = async () => {
|
|
2880
|
-
return invoke
|
|
2871
|
+
return invoke('ExtensionDetail.hideSizeLink');
|
|
2881
2872
|
};
|
|
2882
2873
|
const handleTabFocus = async tabName => {
|
|
2883
|
-
return invoke
|
|
2874
|
+
return invoke('ExtensionDetail.handleTabFocus', tabName);
|
|
2884
2875
|
};
|
|
2885
2876
|
|
|
2886
2877
|
const ExtensionDetail = {
|
|
@@ -2913,10 +2904,10 @@ const ExtensionDetail = {
|
|
|
2913
2904
|
};
|
|
2914
2905
|
|
|
2915
2906
|
const open$7 = async id => {
|
|
2916
|
-
await invoke
|
|
2907
|
+
await invoke('SideBar.openViewlet', id);
|
|
2917
2908
|
};
|
|
2918
2909
|
const hide = async () => {
|
|
2919
|
-
await invoke
|
|
2910
|
+
await invoke('Layout.hideSideBar');
|
|
2920
2911
|
};
|
|
2921
2912
|
|
|
2922
2913
|
const SideBar = {
|
|
@@ -2928,25 +2919,25 @@ const open$6 = async () => {
|
|
|
2928
2919
|
await open$7('Extensions');
|
|
2929
2920
|
};
|
|
2930
2921
|
const handleInput$5 = async value => {
|
|
2931
|
-
await invoke
|
|
2922
|
+
await invoke('Extensions.handleInput', value, Script$1);
|
|
2932
2923
|
};
|
|
2933
2924
|
const handleClick$2 = async index => {
|
|
2934
|
-
await invoke
|
|
2925
|
+
await invoke('Extensions.handleClick', index);
|
|
2935
2926
|
};
|
|
2936
2927
|
const handleClickFilter = async () => {
|
|
2937
|
-
await invoke
|
|
2928
|
+
await invoke('Extensions.handleClickFilter');
|
|
2938
2929
|
};
|
|
2939
2930
|
const handleContextMenu$4 = async (button, x, y) => {
|
|
2940
|
-
await invoke
|
|
2931
|
+
await invoke('Extensions.handleContextMenu', button, x, y);
|
|
2941
2932
|
};
|
|
2942
2933
|
const copyExtensionInfo = async () => {
|
|
2943
|
-
await invoke
|
|
2934
|
+
await invoke('Extensions.copyExtensionInfo');
|
|
2944
2935
|
};
|
|
2945
2936
|
const copyExtensionId = async () => {
|
|
2946
|
-
await invoke
|
|
2937
|
+
await invoke('Extensions.copyExtensionId');
|
|
2947
2938
|
};
|
|
2948
2939
|
const clearSearchResults$1 = async () => {
|
|
2949
|
-
await invoke
|
|
2940
|
+
await invoke('Extensions.clearSearchResults');
|
|
2950
2941
|
};
|
|
2951
2942
|
|
|
2952
2943
|
const ExtensionSearch = {
|
|
@@ -2962,7 +2953,6 @@ const ExtensionSearch = {
|
|
|
2962
2953
|
|
|
2963
2954
|
const Memfs = 'memfs';
|
|
2964
2955
|
|
|
2965
|
-
/* eslint-disable @typescript-eslint/only-throw-error */
|
|
2966
2956
|
const toFileUrl = url => {
|
|
2967
2957
|
const urlObject = new URL(url);
|
|
2968
2958
|
const pathName = urlObject.pathname;
|
|
@@ -2975,7 +2965,7 @@ const toFileUrl = url => {
|
|
|
2975
2965
|
|
|
2976
2966
|
const getDirents = async fileUrl => {
|
|
2977
2967
|
const allDirents = [];
|
|
2978
|
-
const dirents = await invoke
|
|
2968
|
+
const dirents = await invoke('FileSystem.readDirWithFileTypes', fileUrl);
|
|
2979
2969
|
for (const dirent of dirents) {
|
|
2980
2970
|
if (dirent.type === Directory) {
|
|
2981
2971
|
const subDirents = await getDirents(`${fileUrl}/${dirent.name}`);
|
|
@@ -3013,8 +3003,6 @@ const isValidFileMap = value => {
|
|
|
3013
3003
|
return true;
|
|
3014
3004
|
};
|
|
3015
3005
|
|
|
3016
|
-
/* eslint-disable @typescript-eslint/only-throw-error */
|
|
3017
|
-
|
|
3018
3006
|
const loadFileMap = async fileMapUrl => {
|
|
3019
3007
|
try {
|
|
3020
3008
|
const response = await fetch(fileMapUrl);
|
|
@@ -3040,7 +3028,7 @@ const getFileMapWeb = async url => {
|
|
|
3040
3028
|
const loadFixtureToMemFs = async fileMap => {
|
|
3041
3029
|
for (const [path, content] of Object.entries(fileMap)) {
|
|
3042
3030
|
const memfsPath = `memfs:///fixture/${path}`;
|
|
3043
|
-
await invoke
|
|
3031
|
+
await invoke('FileSystem.writeFile', memfsPath, content);
|
|
3044
3032
|
}
|
|
3045
3033
|
return `memfs:///fixture`;
|
|
3046
3034
|
};
|
|
@@ -3059,22 +3047,21 @@ const stringifyJson = data => {
|
|
|
3059
3047
|
return JSON.stringify(data, null, 2) + '\n';
|
|
3060
3048
|
};
|
|
3061
3049
|
|
|
3062
|
-
/* eslint-disable @typescript-eslint/only-throw-error */
|
|
3063
3050
|
const writeFile = async (uri, content) => {
|
|
3064
|
-
await invoke
|
|
3051
|
+
await invoke('FileSystem.writeFile', uri, content);
|
|
3065
3052
|
};
|
|
3066
3053
|
const writeJson = async (uri, data) => {
|
|
3067
3054
|
const content = stringifyJson(data);
|
|
3068
3055
|
await writeFile(uri, content);
|
|
3069
3056
|
};
|
|
3070
3057
|
const readFile = async uri => {
|
|
3071
|
-
return invoke
|
|
3058
|
+
return invoke('FileSystem.readFile', uri);
|
|
3072
3059
|
};
|
|
3073
3060
|
const addFileHandle = async file => {
|
|
3074
|
-
await invoke
|
|
3061
|
+
await invoke('FileSystem.addFileHandle', file);
|
|
3075
3062
|
};
|
|
3076
3063
|
const mkdir = async uri => {
|
|
3077
|
-
await invoke
|
|
3064
|
+
await invoke('FileSystem.mkdir', uri);
|
|
3078
3065
|
};
|
|
3079
3066
|
const setFiles = async files => {
|
|
3080
3067
|
// TODO maybe have a method to send all the files to file system worker directly
|
|
@@ -3083,10 +3070,10 @@ const setFiles = async files => {
|
|
|
3083
3070
|
}));
|
|
3084
3071
|
};
|
|
3085
3072
|
const readDir = async uri => {
|
|
3086
|
-
return invoke
|
|
3073
|
+
return invoke('FileSystem.readDirWithFileTypes', uri);
|
|
3087
3074
|
};
|
|
3088
3075
|
const remove = async uri => {
|
|
3089
|
-
await invoke
|
|
3076
|
+
await invoke('FileSystem.remove', uri);
|
|
3090
3077
|
};
|
|
3091
3078
|
const getTmpDir = async ({
|
|
3092
3079
|
scheme = Memfs
|
|
@@ -3095,17 +3082,17 @@ const getTmpDir = async ({
|
|
|
3095
3082
|
case Memfs:
|
|
3096
3083
|
return 'memfs:///workspace';
|
|
3097
3084
|
default:
|
|
3098
|
-
return invoke
|
|
3085
|
+
return invoke('PlatformPaths.getTmpDir');
|
|
3099
3086
|
}
|
|
3100
3087
|
};
|
|
3101
3088
|
const chmod = async (uri, permissions) => {
|
|
3102
|
-
await invoke
|
|
3089
|
+
await invoke('FileSystem.chmod', uri, permissions);
|
|
3103
3090
|
};
|
|
3104
3091
|
const createExecutable = async content => {
|
|
3105
3092
|
const tmpDir = await getTmpDir({
|
|
3106
3093
|
scheme: 'file'
|
|
3107
3094
|
});
|
|
3108
|
-
const nodePath = await invoke
|
|
3095
|
+
const nodePath = await invoke('PlatformPaths.getNodePath');
|
|
3109
3096
|
const gitPath = `${tmpDir}/git`;
|
|
3110
3097
|
await writeFile(gitPath, `#!${nodePath}
|
|
3111
3098
|
${content}`);
|
|
@@ -3113,9 +3100,9 @@ const createExecutable = async content => {
|
|
|
3113
3100
|
return gitPath;
|
|
3114
3101
|
};
|
|
3115
3102
|
const createExecutableFrom = async uri => {
|
|
3116
|
-
const testPath = await invoke
|
|
3103
|
+
const testPath = await invoke('PlatformPaths.getTestPath');
|
|
3117
3104
|
const absolutePath = testPath + Slash + uri;
|
|
3118
|
-
const content = await invoke
|
|
3105
|
+
const content = await invoke('Ajax.getText', absolutePath);
|
|
3119
3106
|
return createExecutable(content);
|
|
3120
3107
|
};
|
|
3121
3108
|
const createDroppedFileHandle = async () => {
|
|
@@ -3124,7 +3111,7 @@ const createDroppedFileHandle = async () => {
|
|
|
3124
3111
|
create: true
|
|
3125
3112
|
});
|
|
3126
3113
|
const file = await fileHandle.getFile();
|
|
3127
|
-
const id = await invoke
|
|
3114
|
+
const id = await invoke('FileSystemHandle.addFileHandle', fileHandle);
|
|
3128
3115
|
return {
|
|
3129
3116
|
file,
|
|
3130
3117
|
id
|
|
@@ -3158,49 +3145,49 @@ const FileSystem = {
|
|
|
3158
3145
|
};
|
|
3159
3146
|
|
|
3160
3147
|
const focusNext$6 = async () => {
|
|
3161
|
-
await invoke
|
|
3148
|
+
await invoke('FindWidget.focusNext');
|
|
3162
3149
|
};
|
|
3163
3150
|
const focusPrevious$6 = async () => {
|
|
3164
|
-
await invoke
|
|
3151
|
+
await invoke('FindWidget.focusPrevious');
|
|
3165
3152
|
};
|
|
3166
3153
|
const close = async () => {
|
|
3167
|
-
await invoke
|
|
3154
|
+
await invoke('FindWidget.close');
|
|
3168
3155
|
};
|
|
3169
3156
|
const setReplaceValue$1 = async value => {
|
|
3170
|
-
await invoke
|
|
3157
|
+
await invoke('FindWidget.handleReplaceInput', value, Script);
|
|
3171
3158
|
};
|
|
3172
3159
|
const setValue$2 = async value => {
|
|
3173
|
-
await invoke
|
|
3160
|
+
await invoke('FindWidget.handleInput', value, Script);
|
|
3174
3161
|
};
|
|
3175
3162
|
const toggleReplace$1 = async () => {
|
|
3176
|
-
await invoke
|
|
3163
|
+
await invoke('FindWidget.toggleReplace');
|
|
3177
3164
|
};
|
|
3178
3165
|
const toggleMatchCase$1 = async () => {
|
|
3179
|
-
await invoke
|
|
3166
|
+
await invoke('FindWidget.toggleMatchCase');
|
|
3180
3167
|
};
|
|
3181
3168
|
const toggleMatchWholeWord$1 = async () => {
|
|
3182
|
-
await invoke
|
|
3169
|
+
await invoke('FindWidget.toggleMatchWholeWord');
|
|
3183
3170
|
};
|
|
3184
3171
|
const togglePreserveCase$1 = async () => {
|
|
3185
|
-
await invoke
|
|
3172
|
+
await invoke('FindWidget.togglePreserveCase');
|
|
3186
3173
|
};
|
|
3187
3174
|
const toggleUseRegularExpression$1 = async () => {
|
|
3188
|
-
await invoke
|
|
3175
|
+
await invoke('FindWidget.toggleUseRegularExpression');
|
|
3189
3176
|
};
|
|
3190
3177
|
const replace = async () => {
|
|
3191
|
-
await invoke
|
|
3178
|
+
await invoke('FindWidget.replace');
|
|
3192
3179
|
};
|
|
3193
3180
|
const replaceAll$1 = async () => {
|
|
3194
|
-
await invoke
|
|
3181
|
+
await invoke('FindWidget.replaceAll');
|
|
3195
3182
|
};
|
|
3196
3183
|
const focusElement = async whenExpression => {
|
|
3197
|
-
await invoke
|
|
3184
|
+
await invoke('FindWidget.focusElement', whenExpression);
|
|
3198
3185
|
};
|
|
3199
3186
|
const focusNextElement = async () => {
|
|
3200
|
-
await invoke
|
|
3187
|
+
await invoke('FindWidget.focusNextElement');
|
|
3201
3188
|
};
|
|
3202
3189
|
const focusPreviousElement = async () => {
|
|
3203
|
-
await invoke
|
|
3190
|
+
await invoke('FindWidget.focusPreviousElement');
|
|
3204
3191
|
};
|
|
3205
3192
|
|
|
3206
3193
|
const FindWidget = {
|
|
@@ -3222,7 +3209,7 @@ const FindWidget = {
|
|
|
3222
3209
|
};
|
|
3223
3210
|
|
|
3224
3211
|
const setIconTheme = async id => {
|
|
3225
|
-
await invoke
|
|
3212
|
+
await invoke('IconTheme.setIconTheme', id);
|
|
3226
3213
|
};
|
|
3227
3214
|
|
|
3228
3215
|
const IconTheme = {
|
|
@@ -3230,19 +3217,19 @@ const IconTheme = {
|
|
|
3230
3217
|
};
|
|
3231
3218
|
|
|
3232
3219
|
const selectIndex$4 = async index => {
|
|
3233
|
-
return invoke
|
|
3220
|
+
return invoke('IframeInspector.selectIndex', index);
|
|
3234
3221
|
};
|
|
3235
3222
|
const focusNext$5 = async () => {
|
|
3236
|
-
return invoke
|
|
3223
|
+
return invoke('IframeInspector.focusNext');
|
|
3237
3224
|
};
|
|
3238
3225
|
const focusPrevious$5 = async () => {
|
|
3239
|
-
return invoke
|
|
3226
|
+
return invoke('IframeInspector.focusPrevious');
|
|
3240
3227
|
};
|
|
3241
3228
|
const focusFirst$5 = async () => {
|
|
3242
|
-
return invoke
|
|
3229
|
+
return invoke('IframeInspector.focusFirst');
|
|
3243
3230
|
};
|
|
3244
3231
|
const focusLast$4 = async () => {
|
|
3245
|
-
return invoke
|
|
3232
|
+
return invoke('IframeInspector.focusLast');
|
|
3246
3233
|
};
|
|
3247
3234
|
|
|
3248
3235
|
const IframeInspector = {
|
|
@@ -3254,73 +3241,73 @@ const IframeInspector = {
|
|
|
3254
3241
|
};
|
|
3255
3242
|
|
|
3256
3243
|
const open$5 = async () => {
|
|
3257
|
-
await invoke
|
|
3244
|
+
await invoke('Main.openUri', 'app://keybindings');
|
|
3258
3245
|
};
|
|
3259
3246
|
const handleInput$4 = value => {
|
|
3260
|
-
return invoke
|
|
3247
|
+
return invoke('KeyBindings.handleInput', value);
|
|
3261
3248
|
};
|
|
3262
3249
|
const handleClick$1 = (x, y) => {
|
|
3263
|
-
return invoke
|
|
3250
|
+
return invoke('KeyBindings.handleClick', x, y);
|
|
3264
3251
|
};
|
|
3265
3252
|
const handleWheel$1 = (deltaMode, deltaY) => {
|
|
3266
|
-
return invoke
|
|
3253
|
+
return invoke('KeyBindings.handleWheel', deltaMode, deltaY);
|
|
3267
3254
|
};
|
|
3268
3255
|
const handleDoubleClick = (x, y) => {
|
|
3269
|
-
return invoke
|
|
3256
|
+
return invoke('KeyBindings.handleDoubleClick', x, y);
|
|
3270
3257
|
};
|
|
3271
3258
|
const focusNext$4 = () => {
|
|
3272
|
-
return invoke
|
|
3259
|
+
return invoke('KeyBindings.focusNext');
|
|
3273
3260
|
};
|
|
3274
3261
|
const focusPrevious$4 = () => {
|
|
3275
|
-
return invoke
|
|
3262
|
+
return invoke('KeyBindings.focusPrevious');
|
|
3276
3263
|
};
|
|
3277
3264
|
const focusFirst$4 = () => {
|
|
3278
|
-
return invoke
|
|
3265
|
+
return invoke('KeyBindings.focusFirst');
|
|
3279
3266
|
};
|
|
3280
3267
|
const focusIndex$4 = index => {
|
|
3281
|
-
return invoke
|
|
3268
|
+
return invoke('KeyBindings.focusIndex', index);
|
|
3282
3269
|
};
|
|
3283
3270
|
const focusLast$3 = () => {
|
|
3284
|
-
return invoke
|
|
3271
|
+
return invoke('KeyBindings.focusLast');
|
|
3285
3272
|
};
|
|
3286
3273
|
const toggleRecordingKeys = () => {
|
|
3287
|
-
return invoke
|
|
3274
|
+
return invoke('KeyBindings.toggleRecordingKeys');
|
|
3288
3275
|
};
|
|
3289
3276
|
const startRecordingKeys = () => {
|
|
3290
|
-
return invoke
|
|
3277
|
+
return invoke('KeyBindings.startRecordingKeys');
|
|
3291
3278
|
};
|
|
3292
3279
|
const clearInput = () => {
|
|
3293
|
-
return invoke
|
|
3280
|
+
return invoke('KeyBindings.clearInput');
|
|
3294
3281
|
};
|
|
3295
3282
|
const sortByPrecedence = () => {
|
|
3296
|
-
return invoke
|
|
3283
|
+
return invoke('KeyBindings.sortByPrecedence');
|
|
3297
3284
|
};
|
|
3298
3285
|
const stopRecordingKeys = () => {
|
|
3299
|
-
return invoke
|
|
3286
|
+
return invoke('KeyBindings.stopRecordingKeys');
|
|
3300
3287
|
};
|
|
3301
3288
|
const handleContextMenu$3 = (button, x, y) => {
|
|
3302
|
-
return invoke
|
|
3289
|
+
return invoke('KeyBindings.handleContextMenu', button, x, y);
|
|
3303
3290
|
};
|
|
3304
3291
|
const copyCommandId = () => {
|
|
3305
|
-
return invoke
|
|
3292
|
+
return invoke('KeyBindings.copyCommandId');
|
|
3306
3293
|
};
|
|
3307
3294
|
const copyCommandTitle = () => {
|
|
3308
|
-
return invoke
|
|
3295
|
+
return invoke('KeyBindings.copyCommandTitle');
|
|
3309
3296
|
};
|
|
3310
3297
|
const addKeyBinding = () => {
|
|
3311
|
-
return invoke
|
|
3298
|
+
return invoke('KeyBindings.addKeyBinding');
|
|
3312
3299
|
};
|
|
3313
3300
|
const removeKeyBinding = () => {
|
|
3314
|
-
return invoke
|
|
3301
|
+
return invoke('KeyBindings.removeKeyBinding');
|
|
3315
3302
|
};
|
|
3316
3303
|
const changeWhenExpression = () => {
|
|
3317
|
-
return invoke
|
|
3304
|
+
return invoke('KeyBindings.changeWhenExpression');
|
|
3318
3305
|
};
|
|
3319
3306
|
const showSameKeyBindings = () => {
|
|
3320
|
-
return invoke
|
|
3307
|
+
return invoke('KeyBindings.showSameKeyBindings');
|
|
3321
3308
|
};
|
|
3322
3309
|
const resetKeyBinding = () => {
|
|
3323
|
-
return invoke
|
|
3310
|
+
return invoke('KeyBindings.resetKeyBinding');
|
|
3324
3311
|
};
|
|
3325
3312
|
|
|
3326
3313
|
const KeyBindingsEditor = {
|
|
@@ -3395,27 +3382,39 @@ const press = async key => {
|
|
|
3395
3382
|
cancelable: true,
|
|
3396
3383
|
...keyOptions
|
|
3397
3384
|
};
|
|
3398
|
-
await invoke
|
|
3385
|
+
await invoke('TestFrameWork.performKeyBoardAction', 'press', options);
|
|
3399
3386
|
};
|
|
3400
3387
|
|
|
3401
3388
|
const KeyBoard = {
|
|
3402
3389
|
press
|
|
3403
3390
|
};
|
|
3404
3391
|
|
|
3392
|
+
const showSideBar = async () => {
|
|
3393
|
+
await execute$1('Layout.showSideBar');
|
|
3394
|
+
};
|
|
3395
|
+
const handleWorkspaceRefresh = async () => {
|
|
3396
|
+
await invoke('Layout.handleWorkspaceRefresh');
|
|
3397
|
+
};
|
|
3398
|
+
|
|
3399
|
+
const Layout = {
|
|
3400
|
+
handleWorkspaceRefresh,
|
|
3401
|
+
showSideBar
|
|
3402
|
+
};
|
|
3403
|
+
|
|
3405
3404
|
const open$4 = async () => {
|
|
3406
|
-
await invoke
|
|
3405
|
+
await invoke('Main.openUri', 'language-models:///1');
|
|
3407
3406
|
};
|
|
3408
3407
|
const handleFilterInput$2 = async value => {
|
|
3409
|
-
await invoke
|
|
3408
|
+
await invoke('LanguageModels.handleFilterInput', value);
|
|
3410
3409
|
};
|
|
3411
3410
|
const clearFilterInput = async () => {
|
|
3412
|
-
await invoke
|
|
3411
|
+
await invoke('LanguageModels.clearFilterInput');
|
|
3413
3412
|
};
|
|
3414
3413
|
const addModel = async () => {
|
|
3415
|
-
await invoke
|
|
3414
|
+
await invoke('LanguageModels.addModel');
|
|
3416
3415
|
};
|
|
3417
3416
|
const removeModel = async id => {
|
|
3418
|
-
await invoke
|
|
3417
|
+
await invoke('LanguageModels.removeModel', id);
|
|
3419
3418
|
};
|
|
3420
3419
|
|
|
3421
3420
|
const LanguageModels = {
|
|
@@ -3426,69 +3425,68 @@ const LanguageModels = {
|
|
|
3426
3425
|
removeModel
|
|
3427
3426
|
};
|
|
3428
3427
|
|
|
3429
|
-
/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types */
|
|
3430
3428
|
const openUri = async uri => {
|
|
3431
|
-
await invoke
|
|
3429
|
+
await invoke('Main.openUri', uri);
|
|
3432
3430
|
};
|
|
3433
3431
|
const splitRight = async () => {
|
|
3434
|
-
await invoke
|
|
3432
|
+
await invoke('Main.splitRight');
|
|
3435
3433
|
};
|
|
3436
3434
|
const splitDown = async () => {
|
|
3437
|
-
await invoke
|
|
3435
|
+
await invoke('Main.splitDown');
|
|
3438
3436
|
};
|
|
3439
3437
|
const openKeyBindings = async () => {
|
|
3440
|
-
await invoke
|
|
3438
|
+
await invoke('Main.openKeyBindings');
|
|
3441
3439
|
};
|
|
3442
3440
|
const handleClickTogglePreview = async () => {
|
|
3443
|
-
await invoke
|
|
3441
|
+
await invoke('Main.handleClickTogglePreview');
|
|
3444
3442
|
};
|
|
3445
3443
|
const closeAllEditors = async () => {
|
|
3446
|
-
await invoke
|
|
3444
|
+
await invoke('Main.closeAllEditors');
|
|
3447
3445
|
};
|
|
3448
3446
|
const closeTabsLeft = async () => {
|
|
3449
|
-
await invoke
|
|
3447
|
+
await invoke('Main.closeTabsLeft');
|
|
3450
3448
|
};
|
|
3451
3449
|
const handleModifiedStatusChange = async (uri, newStatus) => {
|
|
3452
|
-
await invoke
|
|
3450
|
+
await invoke('Main.handleModifiedStatusChange', uri, newStatus);
|
|
3453
3451
|
};
|
|
3454
3452
|
const closeTabsRight = async () => {
|
|
3455
|
-
await invoke
|
|
3453
|
+
await invoke('Main.closeTabsRight');
|
|
3456
3454
|
};
|
|
3457
3455
|
const selectTab$1 = async (groupIndex, tabIndex) => {
|
|
3458
|
-
await invoke
|
|
3456
|
+
await invoke('Main.selectTab', groupIndex, tabIndex);
|
|
3459
3457
|
};
|
|
3460
3458
|
const closeOthers = async () => {
|
|
3461
|
-
await invoke
|
|
3459
|
+
await invoke('Main.closeOthers');
|
|
3462
3460
|
};
|
|
3463
3461
|
const closeActiveEditor = async () => {
|
|
3464
|
-
await invoke
|
|
3462
|
+
await invoke('Main.closeActiveEditor');
|
|
3465
3463
|
};
|
|
3466
3464
|
const save = async () => {
|
|
3467
|
-
await invoke
|
|
3465
|
+
await invoke('Main.save');
|
|
3468
3466
|
};
|
|
3469
3467
|
const saveAll = async () => {
|
|
3470
|
-
await invoke
|
|
3468
|
+
await invoke('Main.saveAll');
|
|
3471
3469
|
};
|
|
3472
3470
|
const focusFirst$3 = async () => {
|
|
3473
|
-
await invoke
|
|
3471
|
+
await invoke('Main.focusFirst');
|
|
3474
3472
|
};
|
|
3475
3473
|
const focusNext$3 = async () => {
|
|
3476
|
-
await invoke
|
|
3474
|
+
await invoke('Main.focusNext');
|
|
3477
3475
|
};
|
|
3478
3476
|
const focusPrevious$3 = async () => {
|
|
3479
|
-
await invoke
|
|
3477
|
+
await invoke('Main.focusPrevious');
|
|
3480
3478
|
};
|
|
3481
3479
|
const focusLast$2 = async () => {
|
|
3482
|
-
await invoke
|
|
3480
|
+
await invoke('Main.focusLast');
|
|
3483
3481
|
};
|
|
3484
3482
|
const handleTabContextMenu = async (button, x, y) => {
|
|
3485
|
-
await invoke
|
|
3483
|
+
await invoke('Main.handleTabContextMenu', button, x, y);
|
|
3486
3484
|
};
|
|
3487
3485
|
const copyPath$1 = async () => {
|
|
3488
|
-
await invoke
|
|
3486
|
+
await invoke('Main.copyPath');
|
|
3489
3487
|
};
|
|
3490
3488
|
const copyRelativePath = async () => {
|
|
3491
|
-
await invoke
|
|
3489
|
+
await invoke('Main.copyRelativePath');
|
|
3492
3490
|
};
|
|
3493
3491
|
|
|
3494
3492
|
const Main = {
|
|
@@ -3515,12 +3513,11 @@ const Main = {
|
|
|
3515
3513
|
splitRight
|
|
3516
3514
|
};
|
|
3517
3515
|
|
|
3518
|
-
/* eslint-disable @typescript-eslint/only-throw-error, @typescript-eslint/prefer-readonly-parameter-types */
|
|
3519
3516
|
const enableMemoryOpener = async () => {
|
|
3520
|
-
await invoke('Open.enableMemoryOpener');
|
|
3517
|
+
await invoke$1('Open.enableMemoryOpener');
|
|
3521
3518
|
};
|
|
3522
3519
|
const disableMemoryOpener = async () => {
|
|
3523
|
-
await invoke('Open.disableMemoryOpener');
|
|
3520
|
+
await invoke$1('Open.disableMemoryOpener');
|
|
3524
3521
|
};
|
|
3525
3522
|
const matchesExpectedText = (actualText, expectedText) => {
|
|
3526
3523
|
if (typeof expectedText === 'string') {
|
|
@@ -3529,7 +3526,7 @@ const matchesExpectedText = (actualText, expectedText) => {
|
|
|
3529
3526
|
return expectedText.test(actualText);
|
|
3530
3527
|
};
|
|
3531
3528
|
const shouldHaveUrl = async expectedText => {
|
|
3532
|
-
const actualText = await invoke('Open.readOpenedUrl');
|
|
3529
|
+
const actualText = await invoke$1('Open.readOpenedUrl');
|
|
3533
3530
|
if (!matchesExpectedText(actualText, expectedText)) {
|
|
3534
3531
|
throw new AssertionError(`expected opened url to be "${expectedText}" but was "${actualText}"`);
|
|
3535
3532
|
}
|
|
@@ -3542,11 +3539,11 @@ const Open = {
|
|
|
3542
3539
|
};
|
|
3543
3540
|
|
|
3544
3541
|
const open$3 = async id => {
|
|
3545
|
-
await invoke
|
|
3542
|
+
await invoke('Layout.showPanel', id);
|
|
3546
3543
|
};
|
|
3547
3544
|
const openProblems = async () => {
|
|
3548
3545
|
await open$3('Problems');
|
|
3549
|
-
await invoke
|
|
3546
|
+
await invoke('Panel.selectIndex', 0);
|
|
3550
3547
|
};
|
|
3551
3548
|
|
|
3552
3549
|
const Panel = {
|
|
@@ -3556,19 +3553,19 @@ const Panel = {
|
|
|
3556
3553
|
|
|
3557
3554
|
const show$4 = async () => {
|
|
3558
3555
|
await open$3('Output');
|
|
3559
|
-
await invoke
|
|
3556
|
+
await invoke('Panel.selectIndex', 1);
|
|
3560
3557
|
};
|
|
3561
3558
|
const handleFilterInput$1 = async text => {
|
|
3562
|
-
await invoke
|
|
3559
|
+
await invoke('Output.handleFilterInput', text, Script);
|
|
3563
3560
|
};
|
|
3564
3561
|
const selectChannel = async channelId => {
|
|
3565
|
-
await invoke
|
|
3562
|
+
await invoke('Output.selectChannel', channelId);
|
|
3566
3563
|
};
|
|
3567
3564
|
const clear$2 = async () => {
|
|
3568
|
-
await invoke
|
|
3565
|
+
await invoke('Output.clear');
|
|
3569
3566
|
};
|
|
3570
3567
|
const saveAs = async () => {
|
|
3571
|
-
await invoke
|
|
3568
|
+
await invoke('Output.saveAs');
|
|
3572
3569
|
};
|
|
3573
3570
|
|
|
3574
3571
|
const Output = {
|
|
@@ -3593,7 +3590,7 @@ const getIsFirefox = () => {
|
|
|
3593
3590
|
};
|
|
3594
3591
|
|
|
3595
3592
|
const getNodePath$1 = () => {
|
|
3596
|
-
return invoke
|
|
3593
|
+
return invoke(/* Platform.getNodePath */'Platform.getNodePath');
|
|
3597
3594
|
};
|
|
3598
3595
|
|
|
3599
3596
|
const getNodePath = () => {
|
|
@@ -3609,38 +3606,38 @@ const Platform = {
|
|
|
3609
3606
|
};
|
|
3610
3607
|
|
|
3611
3608
|
const open$2 = async uri => {
|
|
3612
|
-
await invoke
|
|
3609
|
+
await invoke('Layout.showPreview', uri);
|
|
3613
3610
|
};
|
|
3614
3611
|
const handleClick = async hdId => {
|
|
3615
|
-
await invoke
|
|
3612
|
+
await invoke('Preview.handleClick', hdId);
|
|
3616
3613
|
};
|
|
3617
3614
|
const handleInput$3 = async (hdId, value) => {
|
|
3618
|
-
await invoke
|
|
3615
|
+
await invoke('Preview.handleInput', hdId, value);
|
|
3619
3616
|
};
|
|
3620
3617
|
const handleMouseDown = async (hdId, clientX, clientY) => {
|
|
3621
|
-
await invoke
|
|
3618
|
+
await invoke('Preview.handleMouseDown', hdId, clientX, clientY);
|
|
3622
3619
|
};
|
|
3623
3620
|
const handleMouseUp = async (hdId, value, clientX, clientY) => {
|
|
3624
|
-
await invoke
|
|
3621
|
+
await invoke('Preview.handleMouseUp', hdId, value, clientX, clientY);
|
|
3625
3622
|
};
|
|
3626
3623
|
const handleMouseMove = async (hdId, value, clientX, clientY) => {
|
|
3627
|
-
await invoke
|
|
3624
|
+
await invoke('Preview.handleMouseMove', hdId, value, clientX, clientY);
|
|
3628
3625
|
};
|
|
3629
3626
|
const handleKeyDown = async (hdId, key, code) => {
|
|
3630
|
-
await invoke
|
|
3627
|
+
await invoke('Preview.handleKeyDown', hdId, key, code);
|
|
3631
3628
|
};
|
|
3632
3629
|
const setUri = async uri => {
|
|
3633
|
-
await invoke
|
|
3630
|
+
await invoke('Preview.setUri', uri);
|
|
3634
3631
|
};
|
|
3635
3632
|
|
|
3636
3633
|
/**
|
|
3637
3634
|
* @deprecated use waitForMutation instead
|
|
3638
3635
|
*/
|
|
3639
3636
|
const waitForClick = async () => {
|
|
3640
|
-
await invoke
|
|
3637
|
+
await invoke('Preview.waitForClick');
|
|
3641
3638
|
};
|
|
3642
3639
|
const waitForMutation = async () => {
|
|
3643
|
-
await invoke
|
|
3640
|
+
await invoke('Preview.waitForMutation');
|
|
3644
3641
|
};
|
|
3645
3642
|
|
|
3646
3643
|
const Preview = {
|
|
@@ -3657,34 +3654,34 @@ const Preview = {
|
|
|
3657
3654
|
};
|
|
3658
3655
|
|
|
3659
3656
|
const show$3 = async () => {
|
|
3660
|
-
await invoke
|
|
3657
|
+
await invoke('Panel.selectIndex', 0);
|
|
3661
3658
|
};
|
|
3662
3659
|
const handleFilterInput = async text => {
|
|
3663
|
-
await invoke
|
|
3660
|
+
await invoke('Problems.handleFilterInput', text, Script);
|
|
3664
3661
|
};
|
|
3665
3662
|
const copyMessage = async () => {
|
|
3666
|
-
await invoke
|
|
3663
|
+
await invoke('Problems.copyMessage');
|
|
3667
3664
|
};
|
|
3668
3665
|
const focusIndex$3 = async index => {
|
|
3669
|
-
await invoke
|
|
3666
|
+
await invoke('Problems.focusIndex', index);
|
|
3670
3667
|
};
|
|
3671
3668
|
const handleArrowLeft = async () => {
|
|
3672
|
-
await invoke
|
|
3669
|
+
await invoke('Problems.handleArrowLeft');
|
|
3673
3670
|
};
|
|
3674
3671
|
const handleArrowRight = async () => {
|
|
3675
|
-
await invoke
|
|
3672
|
+
await invoke('Problems.handleArrowRight');
|
|
3676
3673
|
};
|
|
3677
3674
|
const handleClickAt$1 = async (x, y) => {
|
|
3678
|
-
await invoke
|
|
3675
|
+
await invoke('Problems.handleClickAt', x, y);
|
|
3679
3676
|
};
|
|
3680
3677
|
const handleIconThemeChange = async () => {
|
|
3681
|
-
await invoke
|
|
3678
|
+
await invoke('Problems.handleIconThemeChange');
|
|
3682
3679
|
};
|
|
3683
3680
|
const viewAsList = async () => {
|
|
3684
|
-
await invoke
|
|
3681
|
+
await invoke('Problems.viewAsList');
|
|
3685
3682
|
};
|
|
3686
3683
|
const viewAsTable = async () => {
|
|
3687
|
-
await invoke
|
|
3684
|
+
await invoke('Problems.viewAsTable');
|
|
3688
3685
|
};
|
|
3689
3686
|
|
|
3690
3687
|
const Problems = {
|
|
@@ -3708,7 +3705,7 @@ const registerCallbackCommand = async commandId => {
|
|
|
3708
3705
|
resolve
|
|
3709
3706
|
} = Promise.withResolvers();
|
|
3710
3707
|
callbacks[id] = resolve;
|
|
3711
|
-
await invoke
|
|
3708
|
+
await invoke(`Test.registerTestCommand`, commandId);
|
|
3712
3709
|
return {
|
|
3713
3710
|
promise
|
|
3714
3711
|
};
|
|
@@ -3717,45 +3714,45 @@ const registerCallbackCommand = async commandId => {
|
|
|
3717
3714
|
const QuickPick$1 = 'QuickPick';
|
|
3718
3715
|
|
|
3719
3716
|
const open$1 = async () => {
|
|
3720
|
-
await invoke
|
|
3717
|
+
await invoke('Viewlet.openWidget', QuickPick$1, 'everything');
|
|
3721
3718
|
};
|
|
3722
3719
|
const handleInput$2 = async value => {
|
|
3723
|
-
await invoke
|
|
3720
|
+
await invoke('QuickPick.handleInput', value, 0);
|
|
3724
3721
|
};
|
|
3725
3722
|
const handleClickAt = async (x, y) => {
|
|
3726
|
-
await invoke
|
|
3723
|
+
await invoke('QuickPick.handleClickAt', x, y);
|
|
3727
3724
|
};
|
|
3728
3725
|
const setValue$1 = async value => {
|
|
3729
|
-
await invoke
|
|
3726
|
+
await invoke('QuickPick.setValue', value);
|
|
3730
3727
|
};
|
|
3731
3728
|
const focusNext$2 = async () => {
|
|
3732
|
-
await invoke
|
|
3729
|
+
await invoke('QuickPick.focusNext');
|
|
3733
3730
|
};
|
|
3734
3731
|
const focusFirst$2 = async () => {
|
|
3735
|
-
await invoke
|
|
3732
|
+
await invoke('QuickPick.focusFirst');
|
|
3736
3733
|
};
|
|
3737
3734
|
const focusLast$1 = async () => {
|
|
3738
|
-
await invoke
|
|
3735
|
+
await invoke('QuickPick.focusLast');
|
|
3739
3736
|
};
|
|
3740
3737
|
const focusIndex$2 = async index => {
|
|
3741
|
-
await invoke
|
|
3738
|
+
await invoke('QuickPick.focusIndex', index);
|
|
3742
3739
|
};
|
|
3743
3740
|
const focusPrevious$2 = async () => {
|
|
3744
|
-
await invoke
|
|
3741
|
+
await invoke('QuickPick.focusPrevious');
|
|
3745
3742
|
};
|
|
3746
3743
|
const selectItem = async label => {
|
|
3747
|
-
await invoke
|
|
3744
|
+
await invoke('QuickPick.selectItem', label);
|
|
3748
3745
|
};
|
|
3749
3746
|
const selectIndex$3 = async index => {
|
|
3750
|
-
await invoke
|
|
3747
|
+
await invoke('QuickPick.selectIndex', index);
|
|
3751
3748
|
};
|
|
3752
3749
|
const selectCurrentIndex = async () => {
|
|
3753
|
-
await invoke
|
|
3750
|
+
await invoke('QuickPick.selectCurrentIndex');
|
|
3754
3751
|
};
|
|
3755
3752
|
const executeCommand = async label => {
|
|
3756
|
-
await invoke
|
|
3757
|
-
await invoke
|
|
3758
|
-
await invoke
|
|
3753
|
+
await invoke('QuickPick.showCommands');
|
|
3754
|
+
await invoke('QuickPick.handleInput', label, 0);
|
|
3755
|
+
await invoke('QuickPick.selectItem', label);
|
|
3759
3756
|
};
|
|
3760
3757
|
const selectItem2 = async ({
|
|
3761
3758
|
callbackCommand,
|
|
@@ -3766,7 +3763,7 @@ const selectItem2 = async ({
|
|
|
3766
3763
|
} = await registerCallbackCommand(callbackCommand);
|
|
3767
3764
|
|
|
3768
3765
|
// @ts-ignore
|
|
3769
|
-
invoke
|
|
3766
|
+
invoke('QuickPick.selectItem', label);
|
|
3770
3767
|
await promise;
|
|
3771
3768
|
};
|
|
3772
3769
|
|
|
@@ -3788,13 +3785,13 @@ const QuickPick = {
|
|
|
3788
3785
|
};
|
|
3789
3786
|
|
|
3790
3787
|
const clear$1 = async () => {
|
|
3791
|
-
return invoke
|
|
3788
|
+
return invoke('References.clear');
|
|
3792
3789
|
};
|
|
3793
3790
|
const collapseAll$1 = async () => {
|
|
3794
|
-
return invoke
|
|
3791
|
+
return invoke('References.collapseAll');
|
|
3795
3792
|
};
|
|
3796
3793
|
const refresh = async () => {
|
|
3797
|
-
return invoke
|
|
3794
|
+
return invoke('References.refresh');
|
|
3798
3795
|
};
|
|
3799
3796
|
|
|
3800
3797
|
const References = {
|
|
@@ -3807,31 +3804,31 @@ const show$2 = async () => {
|
|
|
3807
3804
|
await open$7('Run And Debug');
|
|
3808
3805
|
};
|
|
3809
3806
|
const handleClickSectionBreakPoints = async () => {
|
|
3810
|
-
await invoke
|
|
3807
|
+
await invoke('Run And Debug.handleClickSectionBreakPoints');
|
|
3811
3808
|
};
|
|
3812
3809
|
const handleClickSectionWatch = async () => {
|
|
3813
|
-
await invoke
|
|
3810
|
+
await invoke('Run And Debug.handleClickSectionWatch');
|
|
3814
3811
|
};
|
|
3815
3812
|
const addWatchExpression = async expression => {
|
|
3816
|
-
await invoke
|
|
3813
|
+
await invoke('Run And Debug.addWatchExpression', expression);
|
|
3817
3814
|
};
|
|
3818
3815
|
const handleWatchValueChange = async () => {
|
|
3819
|
-
await invoke
|
|
3816
|
+
await invoke('Run And Debug.handleWatchValueChange');
|
|
3820
3817
|
};
|
|
3821
3818
|
const acceptWatchExpressionEdit = async () => {
|
|
3822
|
-
await invoke
|
|
3819
|
+
await invoke('Run And Debug.acceptWatchExpressionEdit');
|
|
3823
3820
|
};
|
|
3824
3821
|
const selectIndex$2 = async index => {
|
|
3825
|
-
await invoke
|
|
3822
|
+
await invoke('Run And Debug.selectIndex', index);
|
|
3826
3823
|
};
|
|
3827
3824
|
const setPauseOnExceptions = async value => {
|
|
3828
|
-
await invoke
|
|
3825
|
+
await invoke('Run And Debug.setPauseOnExceptions', value);
|
|
3829
3826
|
};
|
|
3830
3827
|
const handleRename = async () => {
|
|
3831
|
-
await invoke
|
|
3828
|
+
await invoke('Run And Debug.handleRename');
|
|
3832
3829
|
};
|
|
3833
3830
|
const handleSpace = async () => {
|
|
3834
|
-
await invoke
|
|
3831
|
+
await invoke('Run And Debug.handleSpace');
|
|
3835
3832
|
};
|
|
3836
3833
|
|
|
3837
3834
|
const RunAndDebug = {
|
|
@@ -3847,117 +3844,116 @@ const RunAndDebug = {
|
|
|
3847
3844
|
show: show$2
|
|
3848
3845
|
};
|
|
3849
3846
|
|
|
3850
|
-
/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types */
|
|
3851
3847
|
const setValue = async value => {
|
|
3852
|
-
await invoke
|
|
3848
|
+
await invoke('Search.handleInput', value, Script);
|
|
3853
3849
|
};
|
|
3854
3850
|
const setReplaceValue = async value => {
|
|
3855
|
-
await invoke
|
|
3851
|
+
await invoke('Search.handleReplaceInput', value, Script);
|
|
3856
3852
|
};
|
|
3857
3853
|
const setExcludeValue = async value => {
|
|
3858
|
-
await invoke
|
|
3854
|
+
await invoke('Search.handleExcludeInput', value, Script);
|
|
3859
3855
|
};
|
|
3860
3856
|
const replaceAll = async () => {
|
|
3861
|
-
await invoke
|
|
3857
|
+
await invoke('Search.replaceAll');
|
|
3862
3858
|
};
|
|
3863
3859
|
const setIncludeValue = async value => {
|
|
3864
|
-
await invoke
|
|
3860
|
+
await invoke('Search.handleIncludeInput', value, Script);
|
|
3865
3861
|
};
|
|
3866
3862
|
const clearSearchResults = async () => {
|
|
3867
|
-
await invoke
|
|
3863
|
+
await invoke('Search.clearSearchResults');
|
|
3868
3864
|
};
|
|
3869
3865
|
const openDetails = async () => {
|
|
3870
|
-
await invoke
|
|
3866
|
+
await invoke('Search.openDetails');
|
|
3871
3867
|
};
|
|
3872
3868
|
const collapseDetails = async () => {
|
|
3873
|
-
await invoke
|
|
3869
|
+
await invoke('Search.collapseDetails');
|
|
3874
3870
|
};
|
|
3875
3871
|
const dismissItem = async () => {
|
|
3876
|
-
await invoke
|
|
3872
|
+
await invoke('Search.dismissItem');
|
|
3877
3873
|
};
|
|
3878
3874
|
const focusFirst$1 = async () => {
|
|
3879
|
-
await invoke
|
|
3875
|
+
await invoke('Search.focusFirst');
|
|
3880
3876
|
};
|
|
3881
3877
|
const focusIndex$1 = async index => {
|
|
3882
|
-
await invoke
|
|
3878
|
+
await invoke('Search.focusIndex', index);
|
|
3883
3879
|
};
|
|
3884
3880
|
const selectIndex$1 = async index => {
|
|
3885
|
-
await invoke
|
|
3881
|
+
await invoke('Search.selectIndex', index);
|
|
3886
3882
|
};
|
|
3887
3883
|
const focusNext$1 = async () => {
|
|
3888
|
-
await invoke
|
|
3884
|
+
await invoke('Search.focusNext');
|
|
3889
3885
|
};
|
|
3890
3886
|
const handleWheel = async (deltaMode, deltaY) => {
|
|
3891
|
-
await invoke
|
|
3887
|
+
await invoke('Search.handleWheel', deltaMode, deltaY);
|
|
3892
3888
|
};
|
|
3893
3889
|
const focusNextPage = async () => {
|
|
3894
|
-
await invoke
|
|
3890
|
+
await invoke('Search.focusPage');
|
|
3895
3891
|
};
|
|
3896
3892
|
const focusPreviousPage = async () => {
|
|
3897
|
-
await invoke
|
|
3893
|
+
await invoke('Search.focusPreviousPage');
|
|
3898
3894
|
};
|
|
3899
3895
|
const focusPrevious$1 = async () => {
|
|
3900
|
-
await invoke
|
|
3896
|
+
await invoke('Search.focusPrevious');
|
|
3901
3897
|
};
|
|
3902
3898
|
const toggleSearchDetails = async () => {
|
|
3903
|
-
await invoke
|
|
3899
|
+
await invoke('Search.toggleSearchDetails');
|
|
3904
3900
|
};
|
|
3905
3901
|
const toggleMatchCase = async () => {
|
|
3906
|
-
await invoke
|
|
3902
|
+
await invoke('Search.toggleMatchCase');
|
|
3907
3903
|
};
|
|
3908
3904
|
const toggleMatchWholeWord = async () => {
|
|
3909
|
-
await invoke
|
|
3905
|
+
await invoke('Search.toggleMatchWholeWord');
|
|
3910
3906
|
};
|
|
3911
3907
|
const togglePreserveCase = async () => {
|
|
3912
|
-
await invoke
|
|
3908
|
+
await invoke('Search.togglePreserveCase');
|
|
3913
3909
|
};
|
|
3914
3910
|
const toggleUseRegularExpression = async () => {
|
|
3915
|
-
await invoke
|
|
3911
|
+
await invoke('Search.toggleUseRegularExpression');
|
|
3916
3912
|
};
|
|
3917
3913
|
const toggleReplace = async () => {
|
|
3918
|
-
await invoke
|
|
3914
|
+
await invoke('Search.toggleReplace');
|
|
3919
3915
|
};
|
|
3920
3916
|
const open = async () => {
|
|
3921
|
-
await invoke
|
|
3917
|
+
await invoke('SideBar.openViewlet', 'Search');
|
|
3922
3918
|
};
|
|
3923
3919
|
const setLimit = async limit => {
|
|
3924
|
-
await invoke
|
|
3920
|
+
await invoke('Search.setLimit', limit);
|
|
3925
3921
|
};
|
|
3926
3922
|
const handleListBlur = async () => {
|
|
3927
|
-
await invoke
|
|
3923
|
+
await invoke('Search.handleListBlur');
|
|
3928
3924
|
};
|
|
3929
3925
|
const collapseAll = async () => {
|
|
3930
|
-
await invoke
|
|
3926
|
+
await invoke('Search.collapseAll');
|
|
3931
3927
|
};
|
|
3932
3928
|
const copy = async () => {
|
|
3933
|
-
await invoke
|
|
3929
|
+
await invoke('Search.copy');
|
|
3934
3930
|
};
|
|
3935
3931
|
const copyPath = async () => {
|
|
3936
|
-
await invoke
|
|
3932
|
+
await invoke('Search.copyPath');
|
|
3937
3933
|
};
|
|
3938
3934
|
const handleInputCut = async name => {
|
|
3939
|
-
await invoke
|
|
3935
|
+
await invoke('Search.handleInputCut', name);
|
|
3940
3936
|
};
|
|
3941
3937
|
const handleInputPaste = async name => {
|
|
3942
|
-
await invoke
|
|
3938
|
+
await invoke('Search.handleInputPaste', name);
|
|
3943
3939
|
};
|
|
3944
3940
|
const handleInputCopy = async name => {
|
|
3945
|
-
await invoke
|
|
3941
|
+
await invoke('Search.handleInputCopy', name);
|
|
3946
3942
|
};
|
|
3947
3943
|
const handleInputSelectionChange = async (name, start, end) => {
|
|
3948
|
-
await invoke
|
|
3944
|
+
await invoke('Search.handleInputSelectionChange', name, start, end);
|
|
3949
3945
|
};
|
|
3950
3946
|
const handleInputContextMenu = async (name, button, x, y) => {
|
|
3951
|
-
await invoke
|
|
3947
|
+
await invoke('Search.handleInputConextMenu', name, button, x, y);
|
|
3952
3948
|
};
|
|
3953
3949
|
const handleContextMenu$2 = async (button, x, y) => {
|
|
3954
|
-
await invoke
|
|
3950
|
+
await invoke('Search.handleContextMenu', button, x, y);
|
|
3955
3951
|
};
|
|
3956
3952
|
const enableRenderFolderPaths = async () => {
|
|
3957
|
-
await invoke
|
|
3953
|
+
await invoke('Search.enableRenderFolderPaths');
|
|
3958
3954
|
};
|
|
3959
3955
|
const disableRenderFolderPaths = async () => {
|
|
3960
|
-
await invoke
|
|
3956
|
+
await invoke('Search.disableRenderFolderPaths');
|
|
3961
3957
|
};
|
|
3962
3958
|
|
|
3963
3959
|
const Search = {
|
|
@@ -4001,25 +3997,25 @@ const Search = {
|
|
|
4001
3997
|
};
|
|
4002
3998
|
|
|
4003
3999
|
const show$1 = async () => {
|
|
4004
|
-
return invoke
|
|
4000
|
+
return invoke('Main.openUri', 'settings://');
|
|
4005
4001
|
};
|
|
4006
4002
|
const handleInput$1 = async searchValue => {
|
|
4007
|
-
return invoke
|
|
4003
|
+
return invoke('Settings.handleInput', searchValue, Script);
|
|
4008
4004
|
};
|
|
4009
4005
|
const usePreviousSearchValue = async () => {
|
|
4010
|
-
return invoke
|
|
4006
|
+
return invoke('Settings.usePreviousSearchValue');
|
|
4011
4007
|
};
|
|
4012
4008
|
const useNextSearchValue = async () => {
|
|
4013
|
-
return invoke
|
|
4009
|
+
return invoke('Settings.useNextSearchValue');
|
|
4014
4010
|
};
|
|
4015
4011
|
const clear = async searchValue => {
|
|
4016
|
-
return invoke
|
|
4012
|
+
return invoke('Settings.clear', searchValue, Script);
|
|
4017
4013
|
};
|
|
4018
4014
|
const clearHistory = async () => {
|
|
4019
|
-
return invoke
|
|
4015
|
+
return invoke('Settings.clearHistory');
|
|
4020
4016
|
};
|
|
4021
4017
|
const selectTab = async tabId => {
|
|
4022
|
-
return invoke
|
|
4018
|
+
return invoke('Settings.handleClickTab', tabId);
|
|
4023
4019
|
};
|
|
4024
4020
|
const selectWorkspace = async () => {
|
|
4025
4021
|
await selectTab('workspace');
|
|
@@ -4034,10 +4030,10 @@ const selectWindow = async () => {
|
|
|
4034
4030
|
await selectTab('window');
|
|
4035
4031
|
};
|
|
4036
4032
|
const handleScroll = async scrollTop => {
|
|
4037
|
-
await invoke
|
|
4033
|
+
await invoke('Settings.handleScroll', scrollTop, Script);
|
|
4038
4034
|
};
|
|
4039
4035
|
const handleClickFilterButton = async (x, y) => {
|
|
4040
|
-
await invoke
|
|
4036
|
+
await invoke('Settings.handleClickFilterButton', x, y);
|
|
4041
4037
|
};
|
|
4042
4038
|
|
|
4043
4039
|
const SettingsView = {
|
|
@@ -4057,19 +4053,19 @@ const SettingsView = {
|
|
|
4057
4053
|
};
|
|
4058
4054
|
|
|
4059
4055
|
const selectIndex = async index => {
|
|
4060
|
-
await invoke
|
|
4056
|
+
await invoke('Source Control.selectIndex', index);
|
|
4061
4057
|
};
|
|
4062
4058
|
const acceptInput = async () => {
|
|
4063
|
-
await invoke
|
|
4059
|
+
await invoke('Source Control.acceptInput');
|
|
4064
4060
|
};
|
|
4065
4061
|
const handleInput = async text => {
|
|
4066
|
-
await invoke
|
|
4062
|
+
await invoke('Source Control.handleInput', text, Script$1);
|
|
4067
4063
|
};
|
|
4068
4064
|
const handleClickSourceControlButtons = async (index, name) => {
|
|
4069
|
-
await invoke
|
|
4065
|
+
await invoke('Source Control.handleClickSourceControlButtons', index, name);
|
|
4070
4066
|
};
|
|
4071
4067
|
const handleContextMenu$1 = async (button, x, y) => {
|
|
4072
|
-
await invoke
|
|
4068
|
+
await invoke('Source Control.handleContextMenu', button, x, y);
|
|
4073
4069
|
};
|
|
4074
4070
|
const show = async () => {
|
|
4075
4071
|
await open$7('Source Control');
|
|
@@ -4085,7 +4081,7 @@ const SourceControl = {
|
|
|
4085
4081
|
};
|
|
4086
4082
|
|
|
4087
4083
|
const update = async () => {
|
|
4088
|
-
await invoke
|
|
4084
|
+
await invoke('StatusBar.updateStatusBarItems');
|
|
4089
4085
|
};
|
|
4090
4086
|
|
|
4091
4087
|
const StatusBar = {
|
|
@@ -4093,61 +4089,61 @@ const StatusBar = {
|
|
|
4093
4089
|
};
|
|
4094
4090
|
|
|
4095
4091
|
const closeMenu = async () => {
|
|
4096
|
-
await invoke
|
|
4092
|
+
await invoke('TitleBar.closeMenu');
|
|
4097
4093
|
};
|
|
4098
4094
|
const focus = async () => {
|
|
4099
|
-
await invoke
|
|
4095
|
+
await invoke('TitleBar.focus');
|
|
4100
4096
|
};
|
|
4101
4097
|
const focusFirst = async () => {
|
|
4102
|
-
await invoke
|
|
4098
|
+
await invoke('TitleBar.focusFirst');
|
|
4103
4099
|
};
|
|
4104
4100
|
const setTitleTemplate = async template => {
|
|
4105
|
-
await invoke
|
|
4101
|
+
await invoke('TitleBar.setTitleTemplate', template);
|
|
4106
4102
|
};
|
|
4107
4103
|
const focusIndex = async index => {
|
|
4108
|
-
await invoke
|
|
4104
|
+
await invoke('TitleBar.focusIndex', index);
|
|
4109
4105
|
};
|
|
4110
4106
|
const focusLast = async () => {
|
|
4111
|
-
await invoke
|
|
4107
|
+
await invoke('TitleBar.focusLast');
|
|
4112
4108
|
};
|
|
4113
4109
|
const focusNext = async () => {
|
|
4114
|
-
await invoke
|
|
4110
|
+
await invoke('TitleBar.focusNext');
|
|
4115
4111
|
};
|
|
4116
4112
|
const focusPrevious = async () => {
|
|
4117
|
-
await invoke
|
|
4113
|
+
await invoke('TitleBar.focusPrevious');
|
|
4118
4114
|
};
|
|
4119
4115
|
const handleKeyArrowDown = async () => {
|
|
4120
|
-
await invoke
|
|
4116
|
+
await invoke('TitleBar.handleKeyArrowDown');
|
|
4121
4117
|
};
|
|
4122
4118
|
const handleKeyArrowLeft = async () => {
|
|
4123
|
-
await invoke
|
|
4119
|
+
await invoke('TitleBar.handleKeyArrowLeft');
|
|
4124
4120
|
};
|
|
4125
4121
|
const handleKeyArrowRight = async () => {
|
|
4126
|
-
await invoke
|
|
4122
|
+
await invoke('TitleBar.handleKeyArrowRight');
|
|
4127
4123
|
};
|
|
4128
4124
|
const handleKeyArrowUp = async () => {
|
|
4129
|
-
await invoke
|
|
4125
|
+
await invoke('TitleBar.handleKeyArrowUp');
|
|
4130
4126
|
};
|
|
4131
4127
|
const handleKeyEnd = async () => {
|
|
4132
|
-
await invoke
|
|
4128
|
+
await invoke('TitleBar.handleKeyEnd');
|
|
4133
4129
|
};
|
|
4134
4130
|
const handleKeyHome = async () => {
|
|
4135
|
-
await invoke
|
|
4131
|
+
await invoke('TitleBar.handleKeyHome');
|
|
4136
4132
|
};
|
|
4137
4133
|
const handleKeySpace = async () => {
|
|
4138
|
-
await invoke
|
|
4134
|
+
await invoke('TitleBar.handleKeySpace');
|
|
4139
4135
|
};
|
|
4140
4136
|
const handleKeyEscape = async () => {
|
|
4141
|
-
await invoke
|
|
4137
|
+
await invoke('TitleBar.handleKeyEscape');
|
|
4142
4138
|
};
|
|
4143
4139
|
const toggleIndex = async index => {
|
|
4144
|
-
await invoke
|
|
4140
|
+
await invoke('TitleBar.toggleIndex', index);
|
|
4145
4141
|
};
|
|
4146
4142
|
const toggleMenu = async () => {
|
|
4147
|
-
await invoke
|
|
4143
|
+
await invoke('TitleBar.toggleMenu');
|
|
4148
4144
|
};
|
|
4149
4145
|
const handleContextMenu = async (button, x, y) => {
|
|
4150
|
-
await invoke
|
|
4146
|
+
await invoke('TitleBar.handleContextMenu', button, x, y);
|
|
4151
4147
|
};
|
|
4152
4148
|
|
|
4153
4149
|
const TitleBarMenuBar = {
|
|
@@ -4198,7 +4194,7 @@ const getPortTuple = () => {
|
|
|
4198
4194
|
|
|
4199
4195
|
// TODO ask webview worker directly
|
|
4200
4196
|
const getWebViewInfo = async webViewId => {
|
|
4201
|
-
const info = await invoke
|
|
4197
|
+
const info = await invoke('WebView.getWebViewInfo2', webViewId);
|
|
4202
4198
|
return info;
|
|
4203
4199
|
};
|
|
4204
4200
|
|
|
@@ -4222,8 +4218,6 @@ const waitForFirstEventEvent = async port => {
|
|
|
4222
4218
|
return firstEvent;
|
|
4223
4219
|
};
|
|
4224
4220
|
|
|
4225
|
-
/* eslint-disable @typescript-eslint/only-throw-error */
|
|
4226
|
-
|
|
4227
4221
|
const createPortRpc = async webViewId => {
|
|
4228
4222
|
// TODO use transforpemssageportrpc
|
|
4229
4223
|
const {
|
|
@@ -4237,7 +4231,7 @@ const createPortRpc = async webViewId => {
|
|
|
4237
4231
|
if (firstEvent.data !== 'ready') {
|
|
4238
4232
|
throw new Error('unexpected first message');
|
|
4239
4233
|
}
|
|
4240
|
-
const rpc = await
|
|
4234
|
+
const rpc = await create$2({
|
|
4241
4235
|
commandMap: {},
|
|
4242
4236
|
isMessagePortOpen: true,
|
|
4243
4237
|
messagePort: port1
|
|
@@ -4264,7 +4258,7 @@ const WebView = {
|
|
|
4264
4258
|
};
|
|
4265
4259
|
|
|
4266
4260
|
const setPath = async path => {
|
|
4267
|
-
await invoke
|
|
4261
|
+
await invoke('Workspace.setPath', path);
|
|
4268
4262
|
};
|
|
4269
4263
|
const openTmpDir = async () => {
|
|
4270
4264
|
const tmpDir = await getTmpDir();
|
|
@@ -4278,13 +4272,13 @@ const Workspace = {
|
|
|
4278
4272
|
};
|
|
4279
4273
|
|
|
4280
4274
|
const load = async url => {
|
|
4281
|
-
await invoke
|
|
4275
|
+
await invoke('Audio.load', url);
|
|
4282
4276
|
};
|
|
4283
4277
|
const play = async url => {
|
|
4284
|
-
await invoke
|
|
4278
|
+
await invoke('Audio.play', url);
|
|
4285
4279
|
};
|
|
4286
4280
|
const pause = async () => {
|
|
4287
|
-
await invoke
|
|
4281
|
+
await invoke('Audio.pause');
|
|
4288
4282
|
};
|
|
4289
4283
|
|
|
4290
4284
|
const Audio = {
|
|
@@ -4334,6 +4328,7 @@ const createApi = (platform, assetDir) => {
|
|
|
4334
4328
|
KeyBindingsEditor,
|
|
4335
4329
|
KeyBoard,
|
|
4336
4330
|
LanguageModels,
|
|
4331
|
+
Layout,
|
|
4337
4332
|
Locator: createLocator,
|
|
4338
4333
|
Main,
|
|
4339
4334
|
Open,
|
|
@@ -4439,7 +4434,7 @@ const executeTest = async (name, fn, globals = {}) => {
|
|
|
4439
4434
|
// eslint-disable-next-line no-console
|
|
4440
4435
|
console.info(`PASS ${name} in ${formattedDuration}`);
|
|
4441
4436
|
}
|
|
4442
|
-
await invoke
|
|
4437
|
+
await invoke('TestFrameWork.showOverlay', type, background, text);
|
|
4443
4438
|
};
|
|
4444
4439
|
|
|
4445
4440
|
const hotReloadEnabled = async () => {
|
|
@@ -4458,7 +4453,6 @@ const importScript = async url => {
|
|
|
4458
4453
|
}
|
|
4459
4454
|
};
|
|
4460
4455
|
|
|
4461
|
-
/* eslint-disable @typescript-eslint/only-throw-error */
|
|
4462
4456
|
const importTest = async url => {
|
|
4463
4457
|
try {
|
|
4464
4458
|
return await importScript(url);
|
|
@@ -4467,8 +4461,6 @@ const importTest = async url => {
|
|
|
4467
4461
|
}
|
|
4468
4462
|
};
|
|
4469
4463
|
|
|
4470
|
-
/* eslint-disable @typescript-eslint/only-throw-error */
|
|
4471
|
-
|
|
4472
4464
|
let items = [];
|
|
4473
4465
|
const push = item => {
|
|
4474
4466
|
items = [...items, item];
|
|
@@ -4492,7 +4484,7 @@ const watchForHotReload = async (platform, href) => {
|
|
|
4492
4484
|
}
|
|
4493
4485
|
const fileUrl = getFileUri(href);
|
|
4494
4486
|
const callbackCommand = 'FileWatcher.handleEvent';
|
|
4495
|
-
await invoke
|
|
4487
|
+
await invoke('FileWatcher.watchFile', TestWorker, callbackCommand, fileUrl);
|
|
4496
4488
|
};
|
|
4497
4489
|
|
|
4498
4490
|
// TODO move this into three steps:
|
|
@@ -4617,10 +4609,10 @@ const commandMap = {
|
|
|
4617
4609
|
};
|
|
4618
4610
|
|
|
4619
4611
|
const initializeRendererWorker = async () => {
|
|
4620
|
-
const rpc = await
|
|
4612
|
+
const rpc = await create$1({
|
|
4621
4613
|
commandMap: commandMap
|
|
4622
4614
|
});
|
|
4623
|
-
set$
|
|
4615
|
+
set$1(rpc);
|
|
4624
4616
|
};
|
|
4625
4617
|
|
|
4626
4618
|
const listen = async () => {
|