@lvce-editor/extension-management-worker 4.88.1 → 4.88.2
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.
|
@@ -3427,7 +3427,7 @@ const deferInvalidateExtensionsCache = (extensionId, disabled) => {
|
|
|
3427
3427
|
}, 0);
|
|
3428
3428
|
};
|
|
3429
3429
|
|
|
3430
|
-
const handleChange = async _id => {
|
|
3430
|
+
const handleChange$1 = async _id => {
|
|
3431
3431
|
const statusBarVisible = await invoke$4('Layout.getStatusBarVisible');
|
|
3432
3432
|
if (!statusBarVisible) {
|
|
3433
3433
|
return;
|
|
@@ -3443,7 +3443,7 @@ const addExtension = async extension => {
|
|
|
3443
3443
|
clearCachedExtensions();
|
|
3444
3444
|
await invalidateExtensionsCache();
|
|
3445
3445
|
if (hasStatusBarItems(extension)) {
|
|
3446
|
-
await handleChange();
|
|
3446
|
+
await handleChange$1();
|
|
3447
3447
|
}
|
|
3448
3448
|
return extension;
|
|
3449
3449
|
};
|
|
@@ -5924,6 +5924,31 @@ const getViews = async (assetDir, platform) => {
|
|
|
5924
5924
|
return getViewsFromExtensions(extensions, resolvedAssetDir, resolvedPlatform);
|
|
5925
5925
|
};
|
|
5926
5926
|
|
|
5927
|
+
const isWorkspaceProgressData = value => {
|
|
5928
|
+
if (!value || typeof value !== 'object') return false;
|
|
5929
|
+
const data = value;
|
|
5930
|
+
return typeof data.message === 'string' && ['idle', 'in-progress', 'finished', 'error'].includes(String(data.status));
|
|
5931
|
+
};
|
|
5932
|
+
const getWorkspaceProgressData = async applicationId => {
|
|
5933
|
+
const extensionIds = getIds(applicationId);
|
|
5934
|
+
for (const extensionId of extensionIds) {
|
|
5935
|
+
const rpc = get$2(extensionId, applicationId);
|
|
5936
|
+
if (!rpc) continue;
|
|
5937
|
+
try {
|
|
5938
|
+
const values = await rpc.invoke('ExtensionApi.getWorkspaceProgressData');
|
|
5939
|
+
if (!Array.isArray(values)) continue;
|
|
5940
|
+
const value = values.find(item => isWorkspaceProgressData(item) && item.status !== 'idle');
|
|
5941
|
+
if (value && isWorkspaceProgressData(value)) return value;
|
|
5942
|
+
} catch {
|
|
5943
|
+
// Extensions without a workspace progress provider are expected.
|
|
5944
|
+
}
|
|
5945
|
+
}
|
|
5946
|
+
return {
|
|
5947
|
+
message: '',
|
|
5948
|
+
status: 'idle'
|
|
5949
|
+
};
|
|
5950
|
+
};
|
|
5951
|
+
|
|
5927
5952
|
const handleData = () => {};
|
|
5928
5953
|
|
|
5929
5954
|
const invokeHandler = async (extensionId, changes, applicationId) => {
|
|
@@ -6375,6 +6400,16 @@ const readMicLevels = async options => {
|
|
|
6375
6400
|
return await invoke$4('WebView.compatRendererProcessInvoke', 'WebRtc.readMicLevels', options);
|
|
6376
6401
|
};
|
|
6377
6402
|
|
|
6403
|
+
const handleChange = async operationId => {
|
|
6404
|
+
if (!Number.isSafeInteger(operationId)) return;
|
|
6405
|
+
try {
|
|
6406
|
+
const data = await getWorkspaceProgressData();
|
|
6407
|
+
await invoke$4('Workspace.handleExtensionProgressChange', operationId, data);
|
|
6408
|
+
} catch {
|
|
6409
|
+
// Workspace progress is optional and the renderer may be closing.
|
|
6410
|
+
}
|
|
6411
|
+
};
|
|
6412
|
+
|
|
6378
6413
|
/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types */
|
|
6379
6414
|
|
|
6380
6415
|
const wrapCommand = command => {
|
|
@@ -6533,6 +6568,7 @@ const commandMap = {
|
|
|
6533
6568
|
'Extensions.getViewInstanceState': getViewInstanceState,
|
|
6534
6569
|
'Extensions.getViewMenuEntries': getViewMenuEntries,
|
|
6535
6570
|
'Extensions.getViews': getViews,
|
|
6571
|
+
'Extensions.getWorkspaceProgressData': wrapCommand(extensionsState => getWorkspaceProgressData(extensionsState.applicationId)),
|
|
6536
6572
|
'Extensions.getWorkspaceTransportUri': getWorkspaceTransportUri,
|
|
6537
6573
|
'Extensions.handleData': handleData,
|
|
6538
6574
|
'Extensions.handleFileChanges': handleFileChanges,
|
|
@@ -6559,11 +6595,12 @@ const commandMap = {
|
|
|
6559
6595
|
'Extensions.showViewContextMenu': showViewContextMenu,
|
|
6560
6596
|
'Extensions.streamDiagnosticProvider': wrapCommand(streamDiagnosticProvider),
|
|
6561
6597
|
'Extensions.uninstall': uninstallExtension,
|
|
6562
|
-
'StatusBar.handleChange': handleChange,
|
|
6598
|
+
'StatusBar.handleChange': handleChange$1,
|
|
6563
6599
|
'WebRtc.readMicLevels': readMicLevels,
|
|
6564
6600
|
'WebRtc.setRemoteDescription': setRemoteDescription,
|
|
6565
6601
|
'WebRtc.startWebRtcAudioStream': startWebRtcAudioStream,
|
|
6566
|
-
'WebRtc.stopWebRtcAudioStream': stopWebRtcAudioStream
|
|
6602
|
+
'WebRtc.stopWebRtcAudioStream': stopWebRtcAudioStream,
|
|
6603
|
+
'WorkspaceProgress.handleChange': handleChange
|
|
6567
6604
|
};
|
|
6568
6605
|
|
|
6569
6606
|
const initializeAuthWorker = async () => {
|