@lvce-editor/extension-management-worker 4.78.2 → 4.78.4
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.
|
@@ -2275,6 +2275,11 @@ const getExtensionAbsolutePath = (id, isWeb, isBuiltin, path, relativePath, orig
|
|
|
2275
2275
|
}
|
|
2276
2276
|
return new URL(relativePath, path + '/').href;
|
|
2277
2277
|
}
|
|
2278
|
+
if (path.startsWith('file://')) {
|
|
2279
|
+
const baseUrl = path.endsWith('/') ? path : `${path}/`;
|
|
2280
|
+
const absolutePath = new URL(relativePath, baseUrl).pathname;
|
|
2281
|
+
return new URL('/remote' + absolutePath, origin).href;
|
|
2282
|
+
}
|
|
2278
2283
|
if (!path.startsWith('/')) {
|
|
2279
2284
|
path = '/' + path;
|
|
2280
2285
|
}
|
|
@@ -2307,10 +2312,12 @@ const getUrlPrefix = (platform, extensionPath) => {
|
|
|
2307
2312
|
if (platform === Web) {
|
|
2308
2313
|
return extensionPath;
|
|
2309
2314
|
}
|
|
2310
|
-
|
|
2311
|
-
|
|
2315
|
+
const withoutPrefix = extensionPath.startsWith('file://') ? extensionPath.slice('file://'.length) : extensionPath;
|
|
2316
|
+
const normalized = withoutPrefix.replaceAll('\\', '/');
|
|
2317
|
+
if (normalized.startsWith('/')) {
|
|
2318
|
+
return `/remote${normalized}`;
|
|
2312
2319
|
}
|
|
2313
|
-
return `/remote/${
|
|
2320
|
+
return `/remote/${normalized}`;
|
|
2314
2321
|
};
|
|
2315
2322
|
|
|
2316
2323
|
/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types */
|
|
@@ -5960,10 +5967,12 @@ const getRemoteUrl = uri => {
|
|
|
5960
5967
|
if (uri.startsWith('http://') || uri.startsWith('https://')) {
|
|
5961
5968
|
return uri;
|
|
5962
5969
|
}
|
|
5963
|
-
|
|
5964
|
-
|
|
5970
|
+
const withoutPrefix = uri.startsWith('file://') ? uri.slice('file://'.length) : uri;
|
|
5971
|
+
const normalized = withoutPrefix.replaceAll('\\', '/');
|
|
5972
|
+
if (normalized.startsWith('/')) {
|
|
5973
|
+
return `/remote${normalized}`;
|
|
5965
5974
|
}
|
|
5966
|
-
return `/remote/${
|
|
5975
|
+
return `/remote/${normalized}`;
|
|
5967
5976
|
};
|
|
5968
5977
|
|
|
5969
5978
|
const getLanguagesFromExtension = (extension, platform) => {
|
|
@@ -6186,6 +6195,7 @@ const commandMap = {
|
|
|
6186
6195
|
'ExtensionHostSourceControl.generateCommitMessage': wrapSourceControlProviderCommand('executeSourceControlGenerateCommitMessage'),
|
|
6187
6196
|
'ExtensionHostSourceControl.getBadgeCount': wrapSourceControlProviderCommand('executeSourceControlGetBadgeCount'),
|
|
6188
6197
|
'ExtensionHostSourceControl.getChangedFiles': wrapSourceControlProviderCommand('executeSourceControlGetChangedFiles'),
|
|
6198
|
+
'ExtensionHostSourceControl.getCurrentBranch': wrapSourceControlProviderCommand('executeSourceControlGetCurrentBranch'),
|
|
6189
6199
|
'ExtensionHostSourceControl.getEnabledProviderIds': wrapCommand(getEnabledSourceControlProviderIds),
|
|
6190
6200
|
'ExtensionHostSourceControl.getFeatures': wrapSourceControlProviderCommand('executeSourceControlGetFeatures'),
|
|
6191
6201
|
'ExtensionHostSourceControl.getFileBefore': wrapSourceControlProviderCommand('executeSourceControlGetFileBefore'),
|