@lvce-editor/extension-detail-view 5.8.0 → 5.9.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.
|
@@ -3739,12 +3739,25 @@ const selectTabFeatures = async state => {
|
|
|
3739
3739
|
selected: tab.name === Features
|
|
3740
3740
|
};
|
|
3741
3741
|
});
|
|
3742
|
+
const newFeatures = features.map(feature => {
|
|
3743
|
+
if (feature.id === actualSelectedFeature) {
|
|
3744
|
+
return {
|
|
3745
|
+
...feature,
|
|
3746
|
+
selected: true
|
|
3747
|
+
};
|
|
3748
|
+
}
|
|
3749
|
+
return {
|
|
3750
|
+
...feature,
|
|
3751
|
+
selected: false
|
|
3752
|
+
};
|
|
3753
|
+
});
|
|
3742
3754
|
return {
|
|
3743
3755
|
...state,
|
|
3756
|
+
...partialNewState,
|
|
3757
|
+
features: newFeatures,
|
|
3744
3758
|
selectedFeature: features[0].id || '',
|
|
3745
3759
|
selectedTab: Features,
|
|
3746
|
-
tabs: newTabs
|
|
3747
|
-
...partialNewState
|
|
3760
|
+
tabs: newTabs
|
|
3748
3761
|
};
|
|
3749
3762
|
};
|
|
3750
3763
|
|
|
@@ -4286,21 +4299,26 @@ const getLicenseLink = extension => {
|
|
|
4286
4299
|
return '#';
|
|
4287
4300
|
};
|
|
4288
4301
|
|
|
4289
|
-
const getRepositoryLinkRaw = extension => {
|
|
4290
|
-
if (extension && hasProperty(extension, 'repository') && typeof extension.repository === 'string') {
|
|
4291
|
-
return extension.repository; // TODO watch out for javascript: or other invalid links or path traversal
|
|
4292
|
-
}
|
|
4293
|
-
return '';
|
|
4294
|
-
};
|
|
4295
4302
|
const ensureValidLink = link => {
|
|
4296
4303
|
if (!link) {
|
|
4297
4304
|
return '';
|
|
4298
4305
|
}
|
|
4299
|
-
|
|
4300
|
-
|
|
4306
|
+
try {
|
|
4307
|
+
const parsed = new URL(link);
|
|
4308
|
+
if (parsed.protocol !== 'https:') {
|
|
4309
|
+
return '';
|
|
4310
|
+
}
|
|
4311
|
+
return link;
|
|
4312
|
+
} catch {
|
|
4301
4313
|
return '';
|
|
4302
4314
|
}
|
|
4303
|
-
|
|
4315
|
+
};
|
|
4316
|
+
|
|
4317
|
+
const getRepositoryLinkRaw = extension => {
|
|
4318
|
+
if (extension && hasProperty(extension, 'repository') && typeof extension.repository === 'string') {
|
|
4319
|
+
return extension.repository; // TODO watch out for javascript: or other invalid links or path traversal
|
|
4320
|
+
}
|
|
4321
|
+
return '';
|
|
4304
4322
|
};
|
|
4305
4323
|
const getRepositoryLink = extension => {
|
|
4306
4324
|
const raw = getRepositoryLinkRaw(extension);
|
|
@@ -5091,7 +5109,6 @@ const render2 = (uid, diffResult) => {
|
|
|
5091
5109
|
return commands;
|
|
5092
5110
|
};
|
|
5093
5111
|
|
|
5094
|
-
// @ts-nocheck
|
|
5095
5112
|
const renderEventListeners = () => {
|
|
5096
5113
|
return [{
|
|
5097
5114
|
name: HandleAdditionalDetailContextMenu,
|