@lvce-editor/extension-detail-view 5.1.0 → 5.2.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.
|
@@ -3435,7 +3435,7 @@ const isEqual$2 = (oldState, newState) => {
|
|
|
3435
3435
|
};
|
|
3436
3436
|
|
|
3437
3437
|
const isEqual$1 = (oldState, newState) => {
|
|
3438
|
-
return oldState.activationEvents === newState.activationEvents && oldState.badge === newState.badge && oldState.buttons === newState.buttons && oldState.categories === newState.categories && oldState.changelogVirtualDom === newState.changelogVirtualDom && oldState.commands === newState.commands && oldState.description === newState.description && oldState.detailsVirtualDom === newState.detailsVirtualDom && oldState.disabled === newState.disabled && oldState.displaySize === newState.displaySize && oldState.extensionId === newState.extensionId && oldState.extensionVersion === newState.extensionVersion && oldState.features === newState.features && oldState.jsonValidation === newState.jsonValidation && oldState.selectedFeature === newState.selectedFeature && oldState.selectedTab === newState.selectedTab && oldState.settings === newState.settings && oldState.showSideBar === newState.showSideBar && oldState.sizeValue === newState.sizeValue && oldState.themesMarkdownDom === newState.themesMarkdownDom && oldState.webViews === newState.webViews;
|
|
3438
|
+
return oldState.activationEvents === newState.activationEvents && oldState.badge === newState.badge && oldState.buttons === newState.buttons && oldState.categories === newState.categories && oldState.changelogVirtualDom === newState.changelogVirtualDom && oldState.commands === newState.commands && oldState.description === newState.description && oldState.detailsVirtualDom === newState.detailsVirtualDom && oldState.disabled === newState.disabled && oldState.displaySize === newState.displaySize && oldState.extensionId === newState.extensionId && oldState.extensionVersion === newState.extensionVersion && oldState.features === newState.features && oldState.jsonValidation === newState.jsonValidation && oldState.resources === newState.resources && oldState.selectedFeature === newState.selectedFeature && oldState.selectedTab === newState.selectedTab && oldState.settings === newState.settings && oldState.showSideBar === newState.showSideBar && oldState.sizeValue === newState.sizeValue && oldState.themesMarkdownDom === newState.themesMarkdownDom && oldState.webViews === newState.webViews;
|
|
3439
3439
|
};
|
|
3440
3440
|
|
|
3441
3441
|
const User = 1;
|
|
@@ -4122,7 +4122,11 @@ const initialize = async () => {
|
|
|
4122
4122
|
};
|
|
4123
4123
|
|
|
4124
4124
|
const existsFile = async uri => {
|
|
4125
|
-
|
|
4125
|
+
try {
|
|
4126
|
+
return await exists(uri);
|
|
4127
|
+
} catch {
|
|
4128
|
+
return false;
|
|
4129
|
+
}
|
|
4126
4130
|
};
|
|
4127
4131
|
|
|
4128
4132
|
class ExtensionNotFoundError extends Error {
|
|
@@ -4538,17 +4542,24 @@ const getMarketplaceEntries = isBuiltin => {
|
|
|
4538
4542
|
}];
|
|
4539
4543
|
};
|
|
4540
4544
|
|
|
4541
|
-
const
|
|
4545
|
+
const getRepositoryLink = extension => {
|
|
4546
|
+
if (extension && hasProperty(extension, 'repository') && typeof extension.repository === 'string') {
|
|
4547
|
+
return extension.repository; // TODO watch out for javascript: or other invalid links or path traversal
|
|
4548
|
+
}
|
|
4549
|
+
return '';
|
|
4550
|
+
};
|
|
4551
|
+
const getResources = (isBuiltin, extension) => {
|
|
4542
4552
|
if (isBuiltin) {
|
|
4543
4553
|
return [];
|
|
4544
4554
|
}
|
|
4555
|
+
const repositoryLink = getRepositoryLink(extension);
|
|
4545
4556
|
// TODO
|
|
4546
4557
|
return [{
|
|
4547
4558
|
label: marketplace(),
|
|
4548
4559
|
url: '#'
|
|
4549
4560
|
}, {
|
|
4550
4561
|
label: issues(),
|
|
4551
|
-
url:
|
|
4562
|
+
url: repositoryLink
|
|
4552
4563
|
}, {
|
|
4553
4564
|
label: repository(),
|
|
4554
4565
|
url: '#'
|
|
@@ -4564,7 +4575,7 @@ const loadSideBarContent = async (extensionId, extensionVersion, extensionUri, i
|
|
|
4564
4575
|
const installationEntries = getInstallationEntries(displaySize, extensionId, extensionVersion, extensionUri);
|
|
4565
4576
|
const marketplaceEntries = getMarketplaceEntries(isBuiltin);
|
|
4566
4577
|
const categories = getCategories(extension);
|
|
4567
|
-
const resources = getResources(isBuiltin);
|
|
4578
|
+
const resources = getResources(isBuiltin, extension);
|
|
4568
4579
|
return {
|
|
4569
4580
|
installationEntries,
|
|
4570
4581
|
marketplaceEntries,
|