@lvce-editor/extension-host-worker 4.17.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/extensionHostWorkerMain.js +24 -20
- package/package.json +1 -1
|
@@ -755,8 +755,6 @@ const setConfigurations = preferences => {
|
|
|
755
755
|
state$b.configuration = preferences;
|
|
756
756
|
};
|
|
757
757
|
|
|
758
|
-
const RendererWorker = 1;
|
|
759
|
-
|
|
760
758
|
const rpcs$2 = Object.create(null);
|
|
761
759
|
const set$9 = (id, rpc) => {
|
|
762
760
|
rpcs$2[id] = rpc;
|
|
@@ -765,17 +763,13 @@ const get$a = id => {
|
|
|
765
763
|
return rpcs$2[id];
|
|
766
764
|
};
|
|
767
765
|
|
|
768
|
-
const
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
const send$1 = (method, ...params) => {
|
|
773
|
-
const rpc = get$a(
|
|
774
|
-
|
|
775
|
-
};
|
|
776
|
-
const invokeAndTransfer$2 = (method, ...params) => {
|
|
777
|
-
const rpc = get$a(RendererWorker);
|
|
778
|
-
return rpc.invokeAndTransfer(method, ...params);
|
|
766
|
+
const RendererWorker = 1;
|
|
767
|
+
const DebugWorker = 55;
|
|
768
|
+
|
|
769
|
+
// TODO use invoke
|
|
770
|
+
const send$1 = async (method, ...params) => {
|
|
771
|
+
const rpc = get$a(DebugWorker);
|
|
772
|
+
rpc.send(method, ...params);
|
|
779
773
|
};
|
|
780
774
|
|
|
781
775
|
const state$a = {
|
|
@@ -798,7 +792,6 @@ const registerDebugProvider = debugProvider => {
|
|
|
798
792
|
const start = async (protocol, path) => {
|
|
799
793
|
try {
|
|
800
794
|
const handlePaused = params => {
|
|
801
|
-
console.log('send paused', params);
|
|
802
795
|
send$1('Debug.paused', params);
|
|
803
796
|
};
|
|
804
797
|
const handleResumed = () => {
|
|
@@ -934,6 +927,15 @@ const {
|
|
|
934
927
|
}
|
|
935
928
|
});
|
|
936
929
|
|
|
930
|
+
const invoke$2 = (method, ...params) => {
|
|
931
|
+
const rpc = get$a(RendererWorker);
|
|
932
|
+
return rpc.invoke(method, ...params);
|
|
933
|
+
};
|
|
934
|
+
const invokeAndTransfer$2 = (method, ...params) => {
|
|
935
|
+
const rpc = get$a(RendererWorker);
|
|
936
|
+
return rpc.invokeAndTransfer(method, ...params);
|
|
937
|
+
};
|
|
938
|
+
|
|
937
939
|
const showInformationMessage = message => {
|
|
938
940
|
string(message);
|
|
939
941
|
const result = invoke$2('ExtensionHostDialog.showInformationMessage', message);
|
|
@@ -2508,6 +2510,7 @@ const createRpc = ({
|
|
|
2508
2510
|
}) => {
|
|
2509
2511
|
try {
|
|
2510
2512
|
if (execute && !commandMap) {
|
|
2513
|
+
// eslint-disable-next-line no-console
|
|
2511
2514
|
console.info(`[extension-host-worker] The rpc execute function is deprecated. Use the commandMap property instead.`);
|
|
2512
2515
|
}
|
|
2513
2516
|
commandMap ||= {};
|
|
@@ -3142,6 +3145,7 @@ const addWebExtension = async path => {
|
|
|
3142
3145
|
};
|
|
3143
3146
|
|
|
3144
3147
|
const applyBulkReplacement = async (files, ranges, replacement) => {
|
|
3148
|
+
// eslint-disable-next-line no-console
|
|
3145
3149
|
console.log({
|
|
3146
3150
|
files,
|
|
3147
3151
|
ranges,
|
|
@@ -4924,14 +4928,17 @@ const getWebViews = async () => {
|
|
|
4924
4928
|
const handleBeforeUnload = () => {
|
|
4925
4929
|
// TODO save all webviews in localstorage
|
|
4926
4930
|
// cannot use indexeddb during unload
|
|
4927
|
-
console.log('before unload')
|
|
4931
|
+
// console.log('before unload')
|
|
4928
4932
|
};
|
|
4929
4933
|
|
|
4930
|
-
const handleMessagePort = async port => {
|
|
4931
|
-
await MessagePortRpcClient.create({
|
|
4934
|
+
const handleMessagePort = async (port, rpcId) => {
|
|
4935
|
+
const rpc = await MessagePortRpcClient.create({
|
|
4932
4936
|
messagePort: port,
|
|
4933
4937
|
commandMap: {}
|
|
4934
4938
|
});
|
|
4939
|
+
if (rpcId) {
|
|
4940
|
+
set$9(rpcId, rpc);
|
|
4941
|
+
}
|
|
4935
4942
|
};
|
|
4936
4943
|
|
|
4937
4944
|
const handleIconThemeChange = async () => {
|
|
@@ -5041,9 +5048,6 @@ const getValues = async storeId => {
|
|
|
5041
5048
|
const db = await getDbMemoized();
|
|
5042
5049
|
const tx = db.transaction(storeId, 'readwrite');
|
|
5043
5050
|
const [objects] = await Promise.all([tx.store.getAll(), tx.done]);
|
|
5044
|
-
console.log({
|
|
5045
|
-
objects
|
|
5046
|
-
});
|
|
5047
5051
|
return objects;
|
|
5048
5052
|
} catch (error) {
|
|
5049
5053
|
throw new VError(error, 'Failed to get values from indexed db');
|