@lvce-editor/source-control-worker 3.10.0 → 3.10.1
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.
|
@@ -1927,13 +1927,13 @@ const get$1 = key => {
|
|
|
1927
1927
|
const isCompatible = (extension, platform) => {
|
|
1928
1928
|
return platform !== Web || extension?.compatibility?.web !== false;
|
|
1929
1929
|
};
|
|
1930
|
-
const getExtensions = async platform => {
|
|
1931
|
-
const extensions = await invoke$
|
|
1930
|
+
const getExtensions = async (assetDir, platform) => {
|
|
1931
|
+
const extensions = await invoke$1('Extensions.getAllExtensions', assetDir, platform);
|
|
1932
1932
|
return extensions.filter(extension => isCompatible(extension, platform));
|
|
1933
1933
|
};
|
|
1934
1934
|
|
|
1935
|
-
const requestSourceActions = async (platform = 0) => {
|
|
1936
|
-
const extensions = await getExtensions(platform);
|
|
1935
|
+
const requestSourceActions = async (assetDir = '', platform = 0) => {
|
|
1936
|
+
const extensions = await getExtensions(assetDir, platform);
|
|
1937
1937
|
const newCache = Object.create(null);
|
|
1938
1938
|
for (const extension of extensions) {
|
|
1939
1939
|
if (!extension || !extension['source-control-actions']) {
|
|
@@ -1947,8 +1947,8 @@ const requestSourceActions = async (platform = 0) => {
|
|
|
1947
1947
|
return newCache;
|
|
1948
1948
|
};
|
|
1949
1949
|
|
|
1950
|
-
const requestSourceControlButtons = async (platform = 0) => {
|
|
1951
|
-
const extensions = await getExtensions(platform);
|
|
1950
|
+
const requestSourceControlButtons = async (assetDir = '', platform = 0) => {
|
|
1951
|
+
const extensions = await getExtensions(assetDir, platform);
|
|
1952
1952
|
const buttons = [];
|
|
1953
1953
|
for (const extension of extensions) {
|
|
1954
1954
|
if (!extension || !Array.isArray(extension['source-control-buttons'])) {
|
|
@@ -2052,8 +2052,8 @@ const loadContent = async (state, savedState) => {
|
|
|
2052
2052
|
} = await getGroups(enabledProviderIds, root, assetDir, platform);
|
|
2053
2053
|
const expandedGroups = restoreExpandedGroups(allGroups);
|
|
2054
2054
|
const displayItems = getDisplayItems(allGroups, expandedGroups, iconDefinitions);
|
|
2055
|
-
const actionsCache = enabledProviderIds.length === 0 ? Object.create(null) : await requestSourceActions(platform);
|
|
2056
|
-
const sourceControlButtons = enabledProviderIds.length === 0 ? [] : await requestSourceControlButtons(platform);
|
|
2055
|
+
const actionsCache = enabledProviderIds.length === 0 ? Object.create(null) : await requestSourceActions(assetDir, platform);
|
|
2056
|
+
const sourceControlButtons = enabledProviderIds.length === 0 ? [] : await requestSourceControlButtons(assetDir, platform);
|
|
2057
2057
|
|
|
2058
2058
|
// TODO make preferences async and more functional
|
|
2059
2059
|
const splitButtonEnabled = await get$1('sourceControl.splitButtonEnabled');
|