@codingame/monaco-vscode-extension-gallery-service-override 17.2.0 → 18.0.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.
- package/index.js +8 -9
- package/package.json +10 -17
- package/vscode/src/vs/platform/extensionManagement/common/abstractExtensionManagementService.d.ts +3 -1
- package/vscode/src/vs/platform/extensionManagement/common/abstractExtensionManagementService.js +28 -23
- package/vscode/src/vs/platform/extensionManagement/common/allowedExtensionsService.js +5 -5
- package/vscode/src/vs/platform/extensionManagement/common/extensionGalleryManifestService.d.ts +1 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionGalleryManifestService.js +1 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionGalleryService.d.ts +3 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionGalleryService.js +35 -25
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementIpc.js +1 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionTipsService.js +2 -1
- package/vscode/src/vs/platform/externalServices/common/marketplace.d.ts +1 -1
- package/vscode/src/vs/platform/externalServices/common/marketplace.js +1 -1
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfileIpc.js +1 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/browserRuntimeExtensionsEditor.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/browserRuntimeExtensionsEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensions.web.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/extensions/common/reportExtensionIssueAction.js +1 -1
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionEnablementService.js +15 -15
- package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +3 -3
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionFeaturesManagemetService.js +4 -4
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.js +2 -2
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementService.js +47 -50
- package/vscode/src/vs/workbench/services/extensionManagement/common/webExtensionManagementService.d.ts +3 -1
- package/vscode/src/vs/workbench/services/extensionManagement/common/webExtensionManagementService.js +23 -1
- package/vscode/src/vs/workbench/services/extensionRecommendations/common/extensionIgnoredRecommendationsService.d.ts +1 -1
- package/vscode/src/vs/platform/extensionManagement/common/unsupportedExtensionsMigration.d.ts +0 -6
- package/vscode/src/vs/platform/extensionManagement/common/unsupportedExtensionsMigration.js +0 -61
- package/vscode/src/vs/platform/extensionRecommendations/common/extensionRecommendations.d.ts +0 -19
- package/vscode/src/vs/platform/extensionRecommendations/common/extensionRecommendations.js +0 -25
- package/vscode/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.d.ts +0 -67
- package/vscode/src/vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor.js +0 -453
- package/vscode/src/vs/workbench/contrib/extensions/browser/configBasedRecommendations.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/extensions/browser/configBasedRecommendations.js +0 -79
- package/vscode/src/vs/workbench/contrib/extensions/browser/exeBasedRecommendations.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/extensions/browser/exeBasedRecommendations.js +0 -61
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEditor.d.ts +0 -83
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEditor.js +0 -1108
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEnablementWorkspaceTrustTransitionParticipant.d.ts +0 -11
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionEnablementWorkspaceTrustTransitionParticipant.js +0 -49
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionFeaturesTab.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionFeaturesTab.js +0 -686
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService.d.ts +0 -51
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService.js +0 -412
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendations.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendations.js +0 -18
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendationsService.d.ts +0 -71
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionRecommendationsService.js +0 -230
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensions.contribution.d.ts +0 -4
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensions.contribution.js +0 -1993
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActivationProgress.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActivationProgress.js +0 -44
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsCompletionItemsProvider.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsCompletionItemsProvider.js +0 -63
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsDependencyChecker.d.ts +0 -16
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsDependencyChecker.js +0 -84
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsQuickAccess.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsQuickAccess.js +0 -94
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.d.ts +0 -136
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsViewlet.js +0 -896
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.d.ts +0 -307
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.js +0 -2868
- package/vscode/src/vs/workbench/contrib/extensions/browser/fileBasedRecommendations.d.ts +0 -38
- package/vscode/src/vs/workbench/contrib/extensions/browser/fileBasedRecommendations.js +0 -329
- package/vscode/src/vs/workbench/contrib/extensions/browser/keymapRecommendations.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/extensions/browser/keymapRecommendations.js +0 -30
- package/vscode/src/vs/workbench/contrib/extensions/browser/languageRecommendations.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/extensions/browser/languageRecommendations.js +0 -30
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionEditor.css +0 -727
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionsViewlet.css +0 -161
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/loading-dark.svg +0 -31
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/loading-hc.svg +0 -31
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/loading.svg +0 -31
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/runtimeExtensionsEditor.css +0 -70
- package/vscode/src/vs/workbench/contrib/extensions/browser/remoteRecommendations.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/extensions/browser/remoteRecommendations.js +0 -31
- package/vscode/src/vs/workbench/contrib/extensions/browser/unsupportedExtensionsMigrationContribution.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/extensions/browser/unsupportedExtensionsMigrationContribution.js +0 -27
- package/vscode/src/vs/workbench/contrib/extensions/browser/webRecommendations.d.ts +0 -11
- package/vscode/src/vs/workbench/contrib/extensions/browser/webRecommendations.js +0 -39
- package/vscode/src/vs/workbench/contrib/extensions/browser/workspaceRecommendations.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/extensions/browser/workspaceRecommendations.js +0 -153
- package/vscode/src/vs/workbench/contrib/extensions/common/runtimeExtensionsInput.d.ts +0 -15
- package/vscode/src/vs/workbench/contrib/extensions/common/runtimeExtensionsInput.js +0 -45
- package/vscode/src/vs/workbench/services/extensionManagement/common/media/defaultIcon.png +0 -0
- package/vscode/src/vs/workbench/services/extensionManagement/common/media/extensionManagement.css +0 -6
package/index.js
CHANGED
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/descriptors';
|
|
4
4
|
import { IAllowedExtensionsService, IExtensionTipsService, IGlobalExtensionEnablementService, IExtensionGalleryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
|
|
5
|
-
import { GlobalExtensionEnablementService } from '@codingame/monaco-vscode-
|
|
5
|
+
import { GlobalExtensionEnablementService } from '@codingame/monaco-vscode-249dc928-1da3-51c1-82d0-45e0ba9d08a1-common/vscode/vs/platform/extensionManagement/common/extensionEnablementService';
|
|
6
6
|
import { IExtensionsWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions.service';
|
|
7
|
-
import { getLocale } from '@codingame/monaco-vscode-
|
|
8
|
-
import { ExtensionsWorkbenchService } from '
|
|
7
|
+
import { getLocale } from '@codingame/monaco-vscode-93784a59-b4cf-520c-8339-f8104d3a4f3e-common/vscode/vs/platform/languagePacks/common/languagePacks';
|
|
8
|
+
import { ExtensionsWorkbenchService } from '@codingame/monaco-vscode-2673c6e2-17c1-5710-b169-46f3d4a28696-common/vscode/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService';
|
|
9
9
|
import { IWorkbenchExtensionEnablementService, IWorkbenchExtensionManagementService, IWebExtensionsScannerService, IExtensionManagementServerService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.service';
|
|
10
10
|
import { ExtensionManagementServerService } from './vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementServerService.js';
|
|
11
11
|
import { IExtensionIgnoredRecommendationsService, IExtensionRecommendationsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionRecommendations/common/extensionRecommendations.service';
|
|
12
|
-
import { ExtensionRecommendationsService } from '
|
|
12
|
+
import { ExtensionRecommendationsService } from '@codingame/monaco-vscode-2673c6e2-17c1-5710-b169-46f3d4a28696-common/vscode/vs/workbench/contrib/extensions/browser/extensionRecommendationsService';
|
|
13
13
|
import { WebExtensionsScannerService } from './vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js';
|
|
14
14
|
import { IExtensionRecommendationNotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionRecommendations/common/extensionRecommendations.service';
|
|
15
15
|
import { IgnoredExtensionsManagementService } from './vscode/src/vs/platform/userDataSync/common/ignoredExtensions.js';
|
|
16
16
|
import { IIgnoredExtensionsManagementService } from '@codingame/monaco-vscode-api/vscode/vs/platform/userDataSync/common/ignoredExtensions.service';
|
|
17
|
-
import { ExtensionManifestPropertiesService } from '@codingame/monaco-vscode-
|
|
17
|
+
import { ExtensionManifestPropertiesService } from '@codingame/monaco-vscode-571c8352-7953-5038-9f09-e03bb6219a0e-common/vscode/vs/workbench/services/extensions/common/extensionManifestPropertiesService';
|
|
18
18
|
import { IExtensionManifestPropertiesService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensionManifestPropertiesService.service';
|
|
19
19
|
import { IBuiltinExtensionsScannerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions.service';
|
|
20
20
|
import { ExtensionIgnoredRecommendationsService } from './vscode/src/vs/workbench/services/extensionRecommendations/common/extensionIgnoredRecommendationsService.js';
|
|
21
|
-
import { WorkspaceExtensionsConfigService } from '@codingame/monaco-vscode-
|
|
21
|
+
import { WorkspaceExtensionsConfigService } from '@codingame/monaco-vscode-9ed6fe06-a052-57c2-a234-5d9b94d2e7e0-common/vscode/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig';
|
|
22
22
|
import { IWorkspaceExtensionsConfigService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.service';
|
|
23
|
-
import { ExtensionRecommendationNotificationService } from '
|
|
23
|
+
import { ExtensionRecommendationNotificationService } from '@codingame/monaco-vscode-2673c6e2-17c1-5710-b169-46f3d4a28696-common/vscode/vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService';
|
|
24
24
|
import { ExtensionTipsService } from './vscode/src/vs/platform/extensionManagement/common/extensionTipsService.js';
|
|
25
25
|
import { ExtensionManagementService } from './vscode/src/vs/workbench/services/extensionManagement/common/extensionManagementService.js';
|
|
26
26
|
import { RemoteUserDataProfilesService } from './vscode/src/vs/workbench/services/userDataProfile/common/remoteUserDataProfiles.js';
|
|
@@ -45,11 +45,10 @@ import { unsupported } from '@codingame/monaco-vscode-api/tools';
|
|
|
45
45
|
import { IExtensionGalleryManifestService } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionGalleryManifest.service';
|
|
46
46
|
import { WebExtensionGalleryManifestService } from './vscode/src/vs/workbench/services/extensionManagement/browser/extensionGalleryManifestService.js';
|
|
47
47
|
import { WorkbenchExtensionGalleryService } from './vscode/src/vs/workbench/services/extensionManagement/common/extensionGalleryService.js';
|
|
48
|
-
import '
|
|
48
|
+
import '@codingame/monaco-vscode-2673c6e2-17c1-5710-b169-46f3d4a28696-common/vscode/vs/workbench/contrib/extensions/browser/extensions.contribution';
|
|
49
49
|
import './vscode/src/vs/workbench/contrib/extensions/browser/extensions.web.contribution.js';
|
|
50
50
|
|
|
51
51
|
registerAssets({
|
|
52
|
-
'vs/workbench/services/extensionManagement/common/media/defaultIcon.png': new URL('./vscode/src/vs/workbench/services/extensionManagement/common/media/defaultIcon.png', import.meta.url).toString(),
|
|
53
52
|
'vs/workbench/contrib/extensions/browser/media/theme-icon.png': new URL('./vscode/src/vs/workbench/contrib/extensions/browser/media/theme-icon.png', import.meta.url).href,
|
|
54
53
|
'vs/workbench/contrib/extensions/browser/media/language-icon.svg': new URL('./vscode/src/vs/workbench/contrib/extensions/browser/media/theme-icon.png', import.meta.url).href
|
|
55
54
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-extension-gallery-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "18.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - extension-gallery service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,22 +15,15 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-
|
|
19
|
-
"@codingame/monaco-vscode-
|
|
20
|
-
"@codingame/monaco-vscode-
|
|
21
|
-
"@codingame/monaco-vscode-
|
|
22
|
-
"@codingame/monaco-vscode-
|
|
23
|
-
"@codingame/monaco-vscode-
|
|
24
|
-
"@codingame/monaco-vscode-
|
|
25
|
-
"@codingame/monaco-vscode-
|
|
26
|
-
"@codingame/monaco-vscode-
|
|
27
|
-
"@codingame/monaco-vscode-a7c9ae3c-16d2-5d17-86b2-981be7094566-common": "17.2.0",
|
|
28
|
-
"@codingame/monaco-vscode-api": "17.2.0",
|
|
29
|
-
"@codingame/monaco-vscode-b4efa70b-52b9-5670-ab5c-f10b10b6834e-common": "17.2.0",
|
|
30
|
-
"@codingame/monaco-vscode-d0fb86d3-2a47-594e-955b-9a24631a7124-common": "17.2.0",
|
|
31
|
-
"@codingame/monaco-vscode-d7f659f5-da33-5ea8-a3b8-9b94f2cf5f33-common": "17.2.0",
|
|
32
|
-
"@codingame/monaco-vscode-e67a0dae-5b2c-54e6-8d61-90102c78362d-common": "17.2.0",
|
|
33
|
-
"@codingame/monaco-vscode-ecf3436d-6064-5fbd-a760-37a211ce79c7-common": "17.2.0"
|
|
18
|
+
"@codingame/monaco-vscode-249dc928-1da3-51c1-82d0-45e0ba9d08a1-common": "18.0.0",
|
|
19
|
+
"@codingame/monaco-vscode-2673c6e2-17c1-5710-b169-46f3d4a28696-common": "18.0.0",
|
|
20
|
+
"@codingame/monaco-vscode-34a0ffd3-b9f5-5699-b43b-38af5732f38a-common": "18.0.0",
|
|
21
|
+
"@codingame/monaco-vscode-571c8352-7953-5038-9f09-e03bb6219a0e-common": "18.0.0",
|
|
22
|
+
"@codingame/monaco-vscode-8c844347-a703-5de1-9eeb-5e0c7f503a58-common": "18.0.0",
|
|
23
|
+
"@codingame/monaco-vscode-93784a59-b4cf-520c-8339-f8104d3a4f3e-common": "18.0.0",
|
|
24
|
+
"@codingame/monaco-vscode-9ed6fe06-a052-57c2-a234-5d9b94d2e7e0-common": "18.0.0",
|
|
25
|
+
"@codingame/monaco-vscode-api": "18.0.0",
|
|
26
|
+
"@codingame/monaco-vscode-dcfc2191-2da1-54c7-8fb7-e92c5d11ecef-common": "18.0.0"
|
|
34
27
|
},
|
|
35
28
|
"main": "index.js",
|
|
36
29
|
"module": "index.js",
|
package/vscode/src/vs/platform/extensionManagement/common/abstractExtensionManagementService.d.ts
CHANGED
|
@@ -123,7 +123,9 @@ export declare abstract class AbstractExtensionManagementService extends Commont
|
|
|
123
123
|
protected abstract createInstallExtensionTask(manifest: IExtensionManifest, extension: URI | IGalleryExtension, options: InstallExtensionTaskOptions): IInstallExtensionTask;
|
|
124
124
|
protected abstract createUninstallExtensionTask(extension: ILocalExtension, options: UninstallExtensionTaskOptions): IUninstallExtensionTask;
|
|
125
125
|
protected abstract copyExtension(extension: ILocalExtension, fromProfileLocation: URI, toProfileLocation: URI, metadata?: Partial<Metadata>): Promise<ILocalExtension>;
|
|
126
|
-
protected abstract
|
|
126
|
+
protected abstract moveExtension(extension: ILocalExtension, fromProfileLocation: URI, toProfileLocation: URI, metadata?: Partial<Metadata>): Promise<ILocalExtension>;
|
|
127
|
+
protected abstract removeExtension(extension: ILocalExtension, fromProfileLocation: URI): Promise<void>;
|
|
128
|
+
protected abstract deleteExtension(extension: ILocalExtension): Promise<void>;
|
|
127
129
|
}
|
|
128
130
|
export declare function toExtensionManagementError(error: Error, code?: ExtensionManagementErrorCode): ExtensionManagementError;
|
|
129
131
|
export declare abstract class AbstractExtensionTask<T> {
|
package/vscode/src/vs/platform/extensionManagement/common/abstractExtensionManagementService.js
CHANGED
|
@@ -33,7 +33,7 @@ let CommontExtensionManagementService = class CommontExtensionManagementService
|
|
|
33
33
|
const allowedToInstall = this.allowedExtensionsService.isAllowed({ id: extension.identifier.id, publisherDisplayName: extension.publisherDisplayName });
|
|
34
34
|
if (allowedToInstall !== true) {
|
|
35
35
|
return (new MarkdownString(localize(
|
|
36
|
-
|
|
36
|
+
1753,
|
|
37
37
|
"This extension cannot be installed because {0}",
|
|
38
38
|
allowedToInstall.value
|
|
39
39
|
)));
|
|
@@ -41,12 +41,12 @@ let CommontExtensionManagementService = class CommontExtensionManagementService
|
|
|
41
41
|
if (!(await this.isExtensionPlatformCompatible(extension))) {
|
|
42
42
|
const learnLink = isWeb ? 'https://aka.ms/vscode-web-extensions-guide' : 'https://aka.ms/vscode-platform-specific-extensions';
|
|
43
43
|
return (new MarkdownString(`${( localize(
|
|
44
|
-
|
|
44
|
+
1754,
|
|
45
45
|
"The '{0}' extension is not available in {1} for the {2}.",
|
|
46
46
|
extension.displayName ?? extension.identifier.id,
|
|
47
47
|
this.productService.nameLong,
|
|
48
48
|
TargetPlatformToString(await this.getTargetPlatform())
|
|
49
|
-
))} [${( localize(
|
|
49
|
+
))} [${( localize(1755, "Learn Why"))}](${learnLink})`));
|
|
50
50
|
}
|
|
51
51
|
return true;
|
|
52
52
|
}
|
|
@@ -111,7 +111,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
111
111
|
}
|
|
112
112
|
async installGalleryExtensions(extensions) {
|
|
113
113
|
if (!this.galleryService.isEnabled()) {
|
|
114
|
-
throw ( new ExtensionManagementError(( localize(
|
|
114
|
+
throw ( new ExtensionManagementError(( localize(1756, "Marketplace is not enabled")), ExtensionManagementErrorCode.NotAllowed));
|
|
115
115
|
}
|
|
116
116
|
const results = [];
|
|
117
117
|
const installableExtensions = [];
|
|
@@ -256,8 +256,8 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
256
256
|
else if (!URI.isUri(task.source) && task.source.hasPreReleaseVersion) {
|
|
257
257
|
preferPreRelease = false;
|
|
258
258
|
}
|
|
259
|
-
const allDepsAndPackExtensionsToInstall = await this.getAllDepsAndPackExtensions(task.identifier, task.manifest, preferPreRelease, task.options.productVersion);
|
|
260
259
|
const installed = await this.getInstalled(undefined, task.options.profileLocation, task.options.productVersion);
|
|
260
|
+
const allDepsAndPackExtensionsToInstall = await this.getAllDepsAndPackExtensions(task.identifier, task.manifest, preferPreRelease, task.options.productVersion, installed);
|
|
261
261
|
const options = { ...task.options, pinned: false, installGivenVersion: false, context: { ...task.options.context, [EXTENSION_INSTALL_DEP_PACK_CONTEXT]: true } };
|
|
262
262
|
for (const { gallery, manifest } of distinct(allDepsAndPackExtensionsToInstall, ({ gallery }) => gallery.identifier.id)) {
|
|
263
263
|
const existing = installed.find(e => areSameExtensions(e.identifier, gallery.identifier));
|
|
@@ -479,7 +479,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
479
479
|
}
|
|
480
480
|
throw error;
|
|
481
481
|
}
|
|
482
|
-
async getAllDepsAndPackExtensions(extensionIdentifier, manifest, preferPreRelease, productVersion) {
|
|
482
|
+
async getAllDepsAndPackExtensions(extensionIdentifier, manifest, preferPreRelease, productVersion, installed) {
|
|
483
483
|
if (!this.galleryService.isEnabled()) {
|
|
484
484
|
return [];
|
|
485
485
|
}
|
|
@@ -490,9 +490,12 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
490
490
|
const dependecies = manifest.extensionDependencies || [];
|
|
491
491
|
const dependenciesAndPackExtensions = [...dependecies];
|
|
492
492
|
if (manifest.extensionPack) {
|
|
493
|
+
const existing = installed.find(e => areSameExtensions(e.identifier, extensionIdentifier));
|
|
493
494
|
for (const extension of manifest.extensionPack) {
|
|
494
|
-
if (
|
|
495
|
-
dependenciesAndPackExtensions.
|
|
495
|
+
if (!(existing && existing.manifest.extensionPack && ( existing.manifest.extensionPack.some(old => areSameExtensions({ id: old }, { id: extension }))))) {
|
|
496
|
+
if (dependenciesAndPackExtensions.every(e => !areSameExtensions({ id: e }, { id: extension }))) {
|
|
497
|
+
dependenciesAndPackExtensions.push(extension);
|
|
498
|
+
}
|
|
496
499
|
}
|
|
497
500
|
}
|
|
498
501
|
}
|
|
@@ -532,7 +535,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
532
535
|
const extensionsControlManifest = await this.getExtensionsControlManifest();
|
|
533
536
|
if (isMalicious(extension.identifier, extensionsControlManifest.malicious)) {
|
|
534
537
|
throw ( new ExtensionManagementError(( localize(
|
|
535
|
-
|
|
538
|
+
1757,
|
|
536
539
|
"Can't install '{0}' extension since it was reported to be problematic.",
|
|
537
540
|
extension.identifier.id
|
|
538
541
|
)), ExtensionManagementErrorCode.Malicious));
|
|
@@ -543,7 +546,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
543
546
|
compatibleExtension = (await this.galleryService.getExtensions([{ id: deprecationInfo.extension.id, preRelease: deprecationInfo.extension.preRelease }], { targetPlatform: await this.getTargetPlatform(), compatible: true, productVersion }, CancellationToken.None))[0];
|
|
544
547
|
if (!compatibleExtension) {
|
|
545
548
|
throw ( new ExtensionManagementError(( localize(
|
|
546
|
-
|
|
549
|
+
1758,
|
|
547
550
|
"Can't install '{0}' extension since it was deprecated and the replacement extension '{1}' can't be found.",
|
|
548
551
|
extension.identifier.id,
|
|
549
552
|
deprecationInfo.extension.id
|
|
@@ -554,7 +557,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
554
557
|
if ((await this.canInstall(extension)) !== true) {
|
|
555
558
|
const targetPlatform = await this.getTargetPlatform();
|
|
556
559
|
throw ( new ExtensionManagementError(( localize(
|
|
557
|
-
|
|
560
|
+
1754,
|
|
558
561
|
"The '{0}' extension is not available in {1} for the {2}.",
|
|
559
562
|
extension.identifier.id,
|
|
560
563
|
this.productService.nameLong,
|
|
@@ -566,7 +569,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
566
569
|
const incompatibleApiProposalsMessages = [];
|
|
567
570
|
if (!areApiProposalsCompatible(extension.properties.enabledApiProposals ?? [], incompatibleApiProposalsMessages)) {
|
|
568
571
|
throw ( new ExtensionManagementError(( localize(
|
|
569
|
-
|
|
572
|
+
1759,
|
|
570
573
|
"Can't install '{0}' extension. {1}",
|
|
571
574
|
extension.displayName ?? extension.identifier.id,
|
|
572
575
|
incompatibleApiProposalsMessages[0]
|
|
@@ -574,13 +577,13 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
574
577
|
}
|
|
575
578
|
if (!installPreRelease && extension.hasPreReleaseVersion && extension.properties.isPreReleaseVersion && (await this.galleryService.getExtensions([extension.identifier], CancellationToken.None))[0]) {
|
|
576
579
|
throw ( new ExtensionManagementError(( localize(
|
|
577
|
-
|
|
580
|
+
1760,
|
|
578
581
|
"Can't install release version of '{0}' extension because it has no release version.",
|
|
579
582
|
extension.displayName ?? extension.identifier.id
|
|
580
583
|
)), ExtensionManagementErrorCode.ReleaseVersionNotFound));
|
|
581
584
|
}
|
|
582
585
|
throw ( new ExtensionManagementError(( localize(
|
|
583
|
-
|
|
586
|
+
1761,
|
|
584
587
|
"Can't install '{0}' extension because it is not compatible with the current version of {1} (version {2}).",
|
|
585
588
|
extension.identifier.id,
|
|
586
589
|
this.productService.nameLong,
|
|
@@ -667,8 +670,10 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
667
670
|
else {
|
|
668
671
|
allTasks.push(createUninstallExtensionTask(extension, uninstallOptions));
|
|
669
672
|
}
|
|
670
|
-
if (uninstallOptions.remove) {
|
|
671
|
-
|
|
673
|
+
if (uninstallOptions.remove || extension.isApplicationScoped) {
|
|
674
|
+
if (uninstallOptions.remove) {
|
|
675
|
+
extensionsToRemove.push(extension);
|
|
676
|
+
}
|
|
672
677
|
for (const profile of this.userDataProfilesService.profiles) {
|
|
673
678
|
if (this.uriIdentityService.extUri.isEqual(profile.extensionsResource, uninstallOptions.profileLocation)) {
|
|
674
679
|
continue;
|
|
@@ -742,7 +747,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
742
747
|
postUninstallExtension(task.extension, task.options);
|
|
743
748
|
}
|
|
744
749
|
if (extensionsToRemove.length) {
|
|
745
|
-
await this.joinAllSettled(( extensionsToRemove.map(extension => this.
|
|
750
|
+
await this.joinAllSettled(( extensionsToRemove.map(extension => this.deleteExtension(extension))));
|
|
746
751
|
}
|
|
747
752
|
}
|
|
748
753
|
catch (e) {
|
|
@@ -783,7 +788,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
783
788
|
if (extensionToUninstall === dependingExtension) {
|
|
784
789
|
if (dependents.length === 1) {
|
|
785
790
|
return localize(
|
|
786
|
-
|
|
791
|
+
1762,
|
|
787
792
|
"Cannot uninstall '{0}' extension. '{1}' extension depends on this.",
|
|
788
793
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
789
794
|
dependents[0].manifest.displayName || dependents[0].manifest.name
|
|
@@ -791,7 +796,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
791
796
|
}
|
|
792
797
|
if (dependents.length === 2) {
|
|
793
798
|
return localize(
|
|
794
|
-
|
|
799
|
+
1763,
|
|
795
800
|
"Cannot uninstall '{0}' extension. '{1}' and '{2}' extensions depend on this.",
|
|
796
801
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
797
802
|
dependents[0].manifest.displayName || dependents[0].manifest.name,
|
|
@@ -799,7 +804,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
799
804
|
);
|
|
800
805
|
}
|
|
801
806
|
return localize(
|
|
802
|
-
|
|
807
|
+
1764,
|
|
803
808
|
"Cannot uninstall '{0}' extension. '{1}', '{2}' and other extension depend on this.",
|
|
804
809
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
805
810
|
dependents[0].manifest.displayName || dependents[0].manifest.name,
|
|
@@ -808,7 +813,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
808
813
|
}
|
|
809
814
|
if (dependents.length === 1) {
|
|
810
815
|
return localize(
|
|
811
|
-
|
|
816
|
+
1765,
|
|
812
817
|
"Cannot uninstall '{0}' extension . It includes uninstalling '{1}' extension and '{2}' extension depends on this.",
|
|
813
818
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
814
819
|
dependingExtension.manifest.displayName
|
|
@@ -818,7 +823,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
818
823
|
}
|
|
819
824
|
if (dependents.length === 2) {
|
|
820
825
|
return localize(
|
|
821
|
-
|
|
826
|
+
1766,
|
|
822
827
|
"Cannot uninstall '{0}' extension. It includes uninstalling '{1}' extension and '{2}' and '{3}' extensions depend on this.",
|
|
823
828
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
824
829
|
dependingExtension.manifest.displayName
|
|
@@ -828,7 +833,7 @@ let AbstractExtensionManagementService = class AbstractExtensionManagementServic
|
|
|
828
833
|
);
|
|
829
834
|
}
|
|
830
835
|
return localize(
|
|
831
|
-
|
|
836
|
+
1767,
|
|
832
837
|
"Cannot uninstall '{0}' extension. It includes uninstalling '{1}' extension and '{2}', '{3}' and other extensions depend on this.",
|
|
833
838
|
extensionToUninstall.manifest.displayName || extensionToUninstall.manifest.name,
|
|
834
839
|
dependingExtension.manifest.displayName
|
|
@@ -80,14 +80,14 @@ let AllowedExtensionsService = class AllowedExtensionsService extends Disposable
|
|
|
80
80
|
`command:workbench.action.openSettings?${encodeURIComponent(JSON.stringify({ query: `@id:${AllowedExtensionsConfigKey}` }))}`
|
|
81
81
|
)).toString());
|
|
82
82
|
const extensionValue = this._allowedExtensionsConfigValue[id];
|
|
83
|
-
const extensionReason = ( new MarkdownString(( localize(
|
|
83
|
+
const extensionReason = ( new MarkdownString(( localize(1768, "it is not in the [allowed list]({0})", settingsCommandLink))));
|
|
84
84
|
if (!isUndefined(extensionValue)) {
|
|
85
85
|
if (isBoolean(extensionValue)) {
|
|
86
86
|
return extensionValue ? true : extensionReason;
|
|
87
87
|
}
|
|
88
88
|
if (extensionValue === 'stable' && prerelease) {
|
|
89
89
|
return (new MarkdownString(localize(
|
|
90
|
-
|
|
90
|
+
1769,
|
|
91
91
|
"the pre-release versions of this extension are not in the [allowed list]({0})",
|
|
92
92
|
settingsCommandLink
|
|
93
93
|
)));
|
|
@@ -107,7 +107,7 @@ let AllowedExtensionsService = class AllowedExtensionsService extends Disposable
|
|
|
107
107
|
return false;
|
|
108
108
|
}))) {
|
|
109
109
|
return (new MarkdownString(localize(
|
|
110
|
-
|
|
110
|
+
1770,
|
|
111
111
|
"the version {0} of this extension is not in the [allowed list]({1})",
|
|
112
112
|
version,
|
|
113
113
|
settingsCommandLink
|
|
@@ -120,7 +120,7 @@ let AllowedExtensionsService = class AllowedExtensionsService extends Disposable
|
|
|
120
120
|
if (!isUndefined(publisherValue)) {
|
|
121
121
|
if (isBoolean(publisherValue)) {
|
|
122
122
|
return publisherValue ? true : ( new MarkdownString(( localize(
|
|
123
|
-
|
|
123
|
+
1771,
|
|
124
124
|
"the extensions from this publisher are not in the [allowed list]({1})",
|
|
125
125
|
publisherKey,
|
|
126
126
|
settingsCommandLink
|
|
@@ -128,7 +128,7 @@ let AllowedExtensionsService = class AllowedExtensionsService extends Disposable
|
|
|
128
128
|
}
|
|
129
129
|
if (publisherValue === 'stable' && prerelease) {
|
|
130
130
|
return (new MarkdownString(localize(
|
|
131
|
-
|
|
131
|
+
1772,
|
|
132
132
|
"the pre-release versions from this publisher are not in the [allowed list]({1})",
|
|
133
133
|
publisherKey,
|
|
134
134
|
settingsCommandLink
|
package/vscode/src/vs/platform/extensionManagement/common/extensionGalleryManifestService.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
2
2
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
3
|
import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
|
|
4
|
-
import { IExtensionGalleryManifest } from "@codingame/monaco-vscode-
|
|
4
|
+
import { IExtensionGalleryManifest } from "@codingame/monaco-vscode-571c8352-7953-5038-9f09-e03bb6219a0e-common/vscode/vs/platform/extensionManagement/common/extensionGalleryManifest";
|
|
5
5
|
import { IExtensionGalleryManifestService } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionGalleryManifest.service";
|
|
6
6
|
export declare class ExtensionGalleryManifestService extends Disposable implements IExtensionGalleryManifestService {
|
|
7
7
|
protected readonly productService: IProductService;
|
package/vscode/src/vs/platform/extensionManagement/common/extensionGalleryManifestService.js
CHANGED
|
@@ -3,7 +3,7 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
|
|
|
3
3
|
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
4
4
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
6
|
-
import { ExtensionGalleryResourceType, Flag } from '@codingame/monaco-vscode-
|
|
6
|
+
import { ExtensionGalleryResourceType, Flag } from '@codingame/monaco-vscode-571c8352-7953-5038-9f09-e03bb6219a0e-common/vscode/vs/platform/extensionManagement/common/extensionGalleryManifest';
|
|
7
7
|
import { FilterType, SortBy } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement';
|
|
8
8
|
|
|
9
9
|
let ExtensionGalleryManifestService = class ExtensionGalleryManifestService extends Disposable {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
-
import { IPager } from "@codingame/monaco-vscode-
|
|
2
|
+
import { IPager } from "@codingame/monaco-vscode-9ed6fe06-a052-57c2-a234-5d9b94d2e7e0-common/vscode/vs/base/common/paging";
|
|
3
3
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
4
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
5
5
|
import { IEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service";
|
|
@@ -77,7 +77,9 @@ export declare abstract class AbstractExtensionGalleryService implements IExtens
|
|
|
77
77
|
getManifest(extension: IGalleryExtension, token: CancellationToken): Promise<IExtensionManifest | null>;
|
|
78
78
|
getCoreTranslation(extension: IGalleryExtension, languageId: string): Promise<ITranslation | null>;
|
|
79
79
|
getChangelog(extension: IGalleryExtension, token: CancellationToken): Promise<string>;
|
|
80
|
+
getAllVersions(extensionIdentifier: IExtensionIdentifier): Promise<IGalleryExtensionVersion[]>;
|
|
80
81
|
getAllCompatibleVersions(extensionIdentifier: IExtensionIdentifier, includePreRelease: boolean, targetPlatform: TargetPlatform): Promise<IGalleryExtensionVersion[]>;
|
|
82
|
+
private getVersions;
|
|
81
83
|
private getAsset;
|
|
82
84
|
getExtensionsControlManifest(): Promise<IExtensionsControlManifest>;
|
|
83
85
|
}
|
|
@@ -8,10 +8,10 @@ import { isWeb, platform } from '@codingame/monaco-vscode-api/vscode/vs/base/com
|
|
|
8
8
|
import { arch } from '@codingame/monaco-vscode-api/vscode/vs/base/common/process';
|
|
9
9
|
import { isString, isBoolean } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
10
10
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
11
|
-
import { isOfflineError } from '@codingame/monaco-vscode-
|
|
11
|
+
import { isOfflineError } from '@codingame/monaco-vscode-93784a59-b4cf-520c-8339-f8104d3a4f3e-common/vscode/vs/base/parts/request/common/request';
|
|
12
12
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
13
13
|
import { IEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service';
|
|
14
|
-
import { getTargetPlatform, SortOrder, SortBy, FilterType, toTargetPlatform, WEB_EXTENSION_TAG,
|
|
14
|
+
import { getTargetPlatform, SortOrder, SortBy, FilterType, toTargetPlatform, WEB_EXTENSION_TAG, EXTENSION_IDENTIFIER_REGEX, isNotWebExtensionInWebTargetPlatform, isTargetPlatformCompatible, ExtensionGalleryErrorCode, ExtensionGalleryError, StatisticType, InstallOperation } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement';
|
|
15
15
|
import { IAllowedExtensionsService } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
|
|
16
16
|
import { adoptToGalleryExtensionId, getGalleryExtensionId, areSameExtensions, getGalleryExtensionTelemetryData } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagementUtil';
|
|
17
17
|
import { TargetPlatform } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
|
|
@@ -26,7 +26,7 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/ins
|
|
|
26
26
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
27
27
|
import { StopWatch } from '@codingame/monaco-vscode-api/vscode/vs/base/common/stopwatch';
|
|
28
28
|
import { format2 } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
|
|
29
|
-
import { getExtensionGalleryManifestResourceUri, ExtensionGalleryResourceType, Flag } from '@codingame/monaco-vscode-
|
|
29
|
+
import { getExtensionGalleryManifestResourceUri, ExtensionGalleryResourceType, Flag } from '@codingame/monaco-vscode-571c8352-7953-5038-9f09-e03bb6219a0e-common/vscode/vs/platform/extensionManagement/common/extensionGalleryManifest';
|
|
30
30
|
import { IExtensionGalleryManifestService } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionGalleryManifest.service';
|
|
31
31
|
import { TelemetryTrustedValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetryUtils';
|
|
32
32
|
|
|
@@ -35,6 +35,7 @@ const SEARCH_ACTIVITY_HEADER_NAME = 'X-Market-Search-Activity-Id';
|
|
|
35
35
|
const ACTIVITY_HEADER_NAME = 'Activityid';
|
|
36
36
|
const SERVER_HEADER_NAME = 'Server';
|
|
37
37
|
const END_END_ID_HEADER_NAME = 'X-Vss-E2eid';
|
|
38
|
+
const REQUEST_TIME_OUT = 10_000;
|
|
38
39
|
const AssetType = {
|
|
39
40
|
Icon: 'Microsoft.VisualStudio.Services.Icons.Default',
|
|
40
41
|
Details: 'Microsoft.VisualStudio.Services.Content.Details',
|
|
@@ -329,7 +330,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
329
330
|
}
|
|
330
331
|
const options = CancellationToken.isCancellationToken(arg1) ? {} : arg1;
|
|
331
332
|
const token = CancellationToken.isCancellationToken(arg1) ? arg1 : arg2;
|
|
332
|
-
const resourceApi =
|
|
333
|
+
const resourceApi = await this.getResourceApi(extensionGalleryManifest, !!options.updateCheck);
|
|
333
334
|
const result = resourceApi
|
|
334
335
|
? await this.getExtensionsUsingResourceApi(extensionInfos, options, resourceApi, extensionGalleryManifest, token)
|
|
335
336
|
: await this.getExtensionsUsingQueryApi(extensionInfos, options, extensionGalleryManifest, token);
|
|
@@ -349,7 +350,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
349
350
|
}
|
|
350
351
|
return result;
|
|
351
352
|
}
|
|
352
|
-
async getResourceApi(extensionGalleryManifest) {
|
|
353
|
+
async getResourceApi(extensionGalleryManifest, updateCheck) {
|
|
353
354
|
const latestVersionResource = getExtensionGalleryManifestResourceUri(extensionGalleryManifest, ExtensionGalleryResourceType.ExtensionLatestVersionUri);
|
|
354
355
|
if (!latestVersionResource) {
|
|
355
356
|
return undefined;
|
|
@@ -360,7 +361,9 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
360
361
|
fallback: this.unpkgResourceApi
|
|
361
362
|
};
|
|
362
363
|
}
|
|
363
|
-
const value =
|
|
364
|
+
const value = updateCheck
|
|
365
|
+
? (await this.assignmentService?.getTreatment('extensions.gallery.useResourceApi')) ?? 'marketplace'
|
|
366
|
+
: (await this.assignmentService?.getTreatment('extensions.gallery.useLatestApi')) ?? 'unpkg';
|
|
364
367
|
if (value === 'marketplace') {
|
|
365
368
|
return {
|
|
366
369
|
uri: latestVersionResource,
|
|
@@ -494,7 +497,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
494
497
|
version: this.productService.version,
|
|
495
498
|
date: this.productService.date
|
|
496
499
|
},
|
|
497
|
-
version: extensionInfo.preRelease ? VersionKind.
|
|
500
|
+
version: extensionInfo.preRelease ? VersionKind.Latest : VersionKind.Release
|
|
498
501
|
}, allTargetPlatforms);
|
|
499
502
|
if (rawGalleryExtensionVersion) {
|
|
500
503
|
return toExtension(rawGalleryExtension, rawGalleryExtensionVersion, allTargetPlatforms, extensionGalleryManifest, this.productService);
|
|
@@ -960,7 +963,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
960
963
|
type: 'GET',
|
|
961
964
|
url: ( uri.toString(true)),
|
|
962
965
|
headers,
|
|
963
|
-
timeout:
|
|
966
|
+
timeout: REQUEST_TIME_OUT
|
|
964
967
|
}, token);
|
|
965
968
|
if (context.res.statusCode === 404) {
|
|
966
969
|
errorCode = 'NotFound';
|
|
@@ -980,13 +983,14 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
980
983
|
if (isCancellationError(error)) {
|
|
981
984
|
errorCode = ExtensionGalleryErrorCode.Cancelled;
|
|
982
985
|
}
|
|
983
|
-
else {
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
986
|
+
else if (isOfflineError(error)) {
|
|
987
|
+
errorCode = ExtensionGalleryErrorCode.Offline;
|
|
988
|
+
}
|
|
989
|
+
else if (getErrorMessage(error).startsWith('XHR timeout')) {
|
|
990
|
+
errorCode = ExtensionGalleryErrorCode.Timeout;
|
|
991
|
+
}
|
|
992
|
+
else if (!errorCode) {
|
|
993
|
+
errorCode = ExtensionGalleryErrorCode.Failed;
|
|
990
994
|
}
|
|
991
995
|
throw error;
|
|
992
996
|
}
|
|
@@ -1111,7 +1115,13 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
1111
1115
|
}
|
|
1112
1116
|
return '';
|
|
1113
1117
|
}
|
|
1118
|
+
async getAllVersions(extensionIdentifier) {
|
|
1119
|
+
return this.getVersions(extensionIdentifier);
|
|
1120
|
+
}
|
|
1114
1121
|
async getAllCompatibleVersions(extensionIdentifier, includePreRelease, targetPlatform) {
|
|
1122
|
+
return this.getVersions(extensionIdentifier, { version: includePreRelease ? VersionKind.Latest : VersionKind.Release, targetPlatform });
|
|
1123
|
+
}
|
|
1124
|
+
async getVersions(extensionIdentifier, onlyCompatible) {
|
|
1115
1125
|
const extensionGalleryManifest = await this.extensionGalleryManifestService.getExtensionGalleryManifest();
|
|
1116
1126
|
if (!extensionGalleryManifest) {
|
|
1117
1127
|
throw ( new Error('No extension gallery service configured.'));
|
|
@@ -1130,10 +1140,10 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
1130
1140
|
return [];
|
|
1131
1141
|
}
|
|
1132
1142
|
const allTargetPlatforms = getAllTargetPlatforms(galleryExtensions[0]);
|
|
1133
|
-
if (isNotWebExtensionInWebTargetPlatform(allTargetPlatforms, targetPlatform)) {
|
|
1143
|
+
if (onlyCompatible && isNotWebExtensionInWebTargetPlatform(allTargetPlatforms, onlyCompatible.targetPlatform)) {
|
|
1134
1144
|
return [];
|
|
1135
1145
|
}
|
|
1136
|
-
const
|
|
1146
|
+
const versions = [];
|
|
1137
1147
|
const productVersion = { version: this.productService.version, date: this.productService.date };
|
|
1138
1148
|
await Promise.all(( galleryExtensions[0].versions.map(async (version) => {
|
|
1139
1149
|
try {
|
|
@@ -1146,19 +1156,19 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
1146
1156
|
manifestAsset: getVersionAsset(version, AssetType.Manifest),
|
|
1147
1157
|
enabledApiProposals: getEnabledApiProposals(version)
|
|
1148
1158
|
}, {
|
|
1149
|
-
compatible:
|
|
1159
|
+
compatible: !!onlyCompatible,
|
|
1150
1160
|
productVersion,
|
|
1151
|
-
targetPlatform,
|
|
1152
|
-
version:
|
|
1161
|
+
targetPlatform: onlyCompatible?.targetPlatform ?? CURRENT_TARGET_PLATFORM,
|
|
1162
|
+
version: onlyCompatible?.version ?? version.version
|
|
1153
1163
|
}, galleryExtensions[0].publisher.displayName, allTargetPlatforms))) {
|
|
1154
|
-
|
|
1164
|
+
versions.push(version);
|
|
1155
1165
|
}
|
|
1156
1166
|
}
|
|
1157
1167
|
catch (error) { }
|
|
1158
1168
|
})));
|
|
1159
1169
|
const result = [];
|
|
1160
1170
|
const seen = ( new Set());
|
|
1161
|
-
for (const version of sortExtensionVersions(
|
|
1171
|
+
for (const version of sortExtensionVersions(versions, onlyCompatible?.targetPlatform ?? CURRENT_TARGET_PLATFORM)) {
|
|
1162
1172
|
if (!( seen.has(version.version))) {
|
|
1163
1173
|
seen.add(version.version);
|
|
1164
1174
|
result.push({ version: version.version, date: version.lastUpdated, isPreReleaseVersion: isPreReleaseVersion(version) });
|
|
@@ -1173,7 +1183,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
1173
1183
|
options = { ...options, ...baseOptions, headers };
|
|
1174
1184
|
const url = asset.uri;
|
|
1175
1185
|
const fallbackUrl = asset.fallbackUri;
|
|
1176
|
-
const firstOptions = { ...options, url };
|
|
1186
|
+
const firstOptions = { ...options, url, timeout: REQUEST_TIME_OUT };
|
|
1177
1187
|
let context;
|
|
1178
1188
|
try {
|
|
1179
1189
|
context = await this.requestService.request(firstOptions, token);
|
|
@@ -1197,7 +1207,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
1197
1207
|
activityId: this.getHeaderValue(context?.res.headers, ACTIVITY_HEADER_NAME),
|
|
1198
1208
|
endToEndId: this.getHeaderValue(context?.res.headers, END_END_ID_HEADER_NAME),
|
|
1199
1209
|
});
|
|
1200
|
-
const fallbackOptions = { ...options, url: fallbackUrl };
|
|
1210
|
+
const fallbackOptions = { ...options, url: fallbackUrl, timeout: REQUEST_TIME_OUT };
|
|
1201
1211
|
return this.requestService.request(fallbackOptions, token);
|
|
1202
1212
|
}
|
|
1203
1213
|
}
|
|
@@ -1211,7 +1221,7 @@ let AbstractExtensionGalleryService = class AbstractExtensionGalleryService {
|
|
|
1211
1221
|
const context = await this.requestService.request({
|
|
1212
1222
|
type: 'GET',
|
|
1213
1223
|
url: this.extensionsControlUrl,
|
|
1214
|
-
timeout:
|
|
1224
|
+
timeout: REQUEST_TIME_OUT
|
|
1215
1225
|
}, CancellationToken.None);
|
|
1216
1226
|
if (context.res.statusCode !== 200) {
|
|
1217
1227
|
throw ( new Error('Could not get extensions report.'));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
3
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
3
4
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
4
5
|
import { DefaultURITransformer, transformAndReviveIncomingURIs } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uriIpc';
|
|
5
6
|
import { CommontExtensionManagementService } from './abstractExtensionManagementService.js';
|
|
@@ -15,11 +15,12 @@ import '@codingame/monaco-vscode-api/vscode/vs/base/common/process';
|
|
|
15
15
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
|
|
16
16
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement';
|
|
17
17
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
|
|
18
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
18
19
|
import '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
19
20
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
20
21
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
21
22
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry';
|
|
22
|
-
import '
|
|
23
|
+
import '@codingame/monaco-vscode-2673c6e2-17c1-5710-b169-46f3d4a28696-common/vscode/vs/platform/extensionRecommendations/common/extensionRecommendations';
|
|
23
24
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
24
25
|
|
|
25
26
|
let ExtensionTipsService = class ExtensionTipsService extends Disposable {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IHeaders } from "@codingame/monaco-vscode-
|
|
1
|
+
import { IHeaders } from "@codingame/monaco-vscode-93784a59-b4cf-520c-8339-f8104d3a4f3e-common/vscode/vs/base/parts/request/common/request";
|
|
2
2
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
3
3
|
import { IEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service";
|
|
4
4
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { getServiceMachineId } from '@codingame/monaco-vscode-
|
|
2
|
+
import { getServiceMachineId } from '@codingame/monaco-vscode-249dc928-1da3-51c1-82d0-45e0ba9d08a1-common/vscode/vs/platform/externalServices/common/serviceMachineId';
|
|
3
3
|
import { TelemetryLevel } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry';
|
|
4
4
|
import { supportsTelemetry, getTelemetryLevel } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetryUtils';
|
|
5
5
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
3
3
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
4
|
import { reviveProfile } from '@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile';
|
|
5
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
5
6
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/marshallingIds';
|
|
6
7
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/charCode';
|
|
7
8
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
|