@codingame/monaco-vscode-api 2.2.0-next.1 → 2.2.0-next.2
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/README.md +22 -0
- package/extensions.d.ts +1 -0
- package/extensions.js +10 -1
- package/localExtensionHost.js +13 -10
- package/package.json +8 -8
- package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +10 -10
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +2 -2
- package/vscode/src/vs/workbench/contrib/workspace/common/workspace.js +16 -0
package/README.md
CHANGED
|
@@ -196,6 +196,28 @@ Additionally, several packages that include the VSCode version of some services
|
|
|
196
196
|
- Support for the timeline view. *Hint*: It only makes sense to enable it when *Views* service is used.
|
|
197
197
|
- **Workbench**: `@codingame/monaco-vscode-workbench-service-override`
|
|
198
198
|
- Allows to render the full workbench layout. Is exclusive with the `views` service. Do not use both services at the same time.
|
|
199
|
+
- **Comments**
|
|
200
|
+
- Enables comments extension api
|
|
201
|
+
- **Edit-sessions**
|
|
202
|
+
- Enable cloudchanges
|
|
203
|
+
- **Emmet**
|
|
204
|
+
- Enables the `triggerExpansionOnTab` command for the emmet default extension
|
|
205
|
+
- **Interactive**
|
|
206
|
+
- Interactive notbooks
|
|
207
|
+
- **Issue**
|
|
208
|
+
- Issue reporting
|
|
209
|
+
- **Multi diff editor**
|
|
210
|
+
- Multi diff editor support (https://code.visualstudio.com/updates/v1_85#_multifile-diff-editor)
|
|
211
|
+
- **Performance**
|
|
212
|
+
- Performance monitoring
|
|
213
|
+
- **Relauncher**
|
|
214
|
+
- Detects changes that require a reload (like settings change) and prompt the user for it
|
|
215
|
+
- **Share**
|
|
216
|
+
- Enables the share extension api
|
|
217
|
+
- **Survey**
|
|
218
|
+
- Survey/feedback support
|
|
219
|
+
- **Update**
|
|
220
|
+
- Update detection, release notes...
|
|
199
221
|
|
|
200
222
|
Usage:
|
|
201
223
|
|
package/extensions.d.ts
CHANGED
package/extensions.js
CHANGED
|
@@ -9,6 +9,7 @@ import { IWorkbenchEnvironmentService } from './vscode/src/vs/workbench/services
|
|
|
9
9
|
import { parse } from './vscode/src/vs/base/common/json.js';
|
|
10
10
|
import { IFileService } from './vscode/src/vs/platform/files/common/files.js';
|
|
11
11
|
import { IInstantiationService } from './vscode/src/vs/platform/instantiation/common/instantiation.js';
|
|
12
|
+
import { IWorkbenchExtensionEnablementService } from './vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.js';
|
|
12
13
|
import { CustomSchemas, registerExtensionFile } from '@codingame/monaco-vscode-files-service-override';
|
|
13
14
|
import { getService } from './services.js';
|
|
14
15
|
import { ExtensionManifestTranslator } from './tools/l10n.js';
|
|
@@ -81,7 +82,10 @@ function registerExtension(manifest, extHostKind, { path = '/', system = false,
|
|
|
81
82
|
if (extHostKind !== 3 ) {
|
|
82
83
|
extensions.push(extension);
|
|
83
84
|
}
|
|
84
|
-
|
|
85
|
+
const extensionEnablementService = await getService(IWorkbenchExtensionEnablementService);
|
|
86
|
+
if (extensionEnablementService.isEnabled(extension)) {
|
|
87
|
+
await deltaExtensions({ toAdd: [extension], toRemove: [] });
|
|
88
|
+
}
|
|
85
89
|
return extension;
|
|
86
90
|
})();
|
|
87
91
|
let api = {
|
|
@@ -89,6 +93,11 @@ function registerExtension(manifest, extHostKind, { path = '/', system = false,
|
|
|
89
93
|
async whenReady() {
|
|
90
94
|
await addExtensionPromise;
|
|
91
95
|
},
|
|
96
|
+
async isEnabled() {
|
|
97
|
+
const extensionEnablementService = await getService(IWorkbenchExtensionEnablementService);
|
|
98
|
+
const extension = await addExtensionPromise;
|
|
99
|
+
return extensionEnablementService.isEnabled(extension);
|
|
100
|
+
},
|
|
92
101
|
async dispose() {
|
|
93
102
|
const extension = await addExtensionPromise;
|
|
94
103
|
const index = extensions.indexOf(extension);
|
package/localExtensionHost.js
CHANGED
|
@@ -40,19 +40,22 @@ class LocalExtHostExtensionService extends ExtHostExtensionService {
|
|
|
40
40
|
this._extHostConfiguration.getConfigProvider()
|
|
41
41
|
]);
|
|
42
42
|
const extensionRegistry = { mine: myRegistry, all: this._globalRegistry };
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
if (apiImpl == null) {
|
|
47
|
-
apiImpl = this._apiFactory(ext, extensionRegistry, configProvider);
|
|
48
|
-
this._extApiImpl.set(ext.identifier, apiImpl);
|
|
43
|
+
if (extensionId == null) {
|
|
44
|
+
if (this._defaultApiImpl == null) {
|
|
45
|
+
this._defaultApiImpl = this._apiFactory(nullExtensionDescription, extensionRegistry, configProvider);
|
|
49
46
|
}
|
|
50
|
-
return
|
|
47
|
+
return this._defaultApiImpl;
|
|
51
48
|
}
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
const ext = myRegistry.getExtensionDescription(extensionId);
|
|
50
|
+
if (ext == null) {
|
|
51
|
+
throw new Error(`Extension ${extensionId} does not exist or is disabled`);
|
|
54
52
|
}
|
|
55
|
-
|
|
53
|
+
let apiImpl = this._extApiImpl.get(ext.identifier);
|
|
54
|
+
if (apiImpl == null) {
|
|
55
|
+
apiImpl = this._apiFactory(ext, extensionRegistry, configProvider);
|
|
56
|
+
this._extApiImpl.set(ext.identifier, apiImpl);
|
|
57
|
+
}
|
|
58
|
+
return apiImpl;
|
|
56
59
|
}
|
|
57
60
|
}
|
|
58
61
|
registerSingleton(IExtHostExtensionService, LocalExtHostExtensionService, 0 );
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-api",
|
|
3
|
-
"version": "2.2.0-next.
|
|
3
|
+
"version": "2.2.0-next.2",
|
|
4
4
|
"description": "VSCode public API plugged on the monaco editor",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": {
|
|
@@ -96,12 +96,12 @@
|
|
|
96
96
|
"dependencies": {
|
|
97
97
|
"vscode-marked": "npm:marked@=3.0.2",
|
|
98
98
|
"vscode-semver": "npm:semver@=5.5.0",
|
|
99
|
-
"@codingame/monaco-vscode-
|
|
100
|
-
"@codingame/monaco-vscode-
|
|
101
|
-
"@codingame/monaco-vscode-extensions-service-override": "2.2.0-next.
|
|
102
|
-
"@codingame/monaco-vscode-environment-service-override": "2.2.0-next.
|
|
103
|
-
"@codingame/monaco-vscode-layout-service-override": "2.2.0-next.
|
|
104
|
-
"@codingame/monaco-vscode-host-service-override": "2.2.0-next.
|
|
105
|
-
"@codingame/monaco-vscode-base-service-override": "2.2.0-next.
|
|
99
|
+
"@codingame/monaco-vscode-files-service-override": "2.2.0-next.2",
|
|
100
|
+
"@codingame/monaco-vscode-quickaccess-service-override": "2.2.0-next.2",
|
|
101
|
+
"@codingame/monaco-vscode-extensions-service-override": "2.2.0-next.2",
|
|
102
|
+
"@codingame/monaco-vscode-environment-service-override": "2.2.0-next.2",
|
|
103
|
+
"@codingame/monaco-vscode-layout-service-override": "2.2.0-next.2",
|
|
104
|
+
"@codingame/monaco-vscode-host-service-override": "2.2.0-next.2",
|
|
105
|
+
"@codingame/monaco-vscode-base-service-override": "2.2.0-next.2"
|
|
106
106
|
}
|
|
107
107
|
}
|
|
@@ -264,7 +264,7 @@ const openFolderButton = `[${openFolder}](command:${(isMacintosh && !isWeb) ? Op
|
|
|
264
264
|
const openFolderViaWorkspaceButton = `[${openFolder}](command:${OpenFolderViaWorkspaceAction.ID})`;
|
|
265
265
|
const openRecentButton = `[${openRecent}](command:${OpenRecentAction.ID})`;
|
|
266
266
|
const viewsRegistry = ( Registry.as(Extensions.ViewsRegistry));
|
|
267
|
-
|
|
267
|
+
viewsRegistry.registerViewWelcomeContent(EmptyView.ID, {
|
|
268
268
|
content: ( localizeWithPath(
|
|
269
269
|
'vs/workbench/contrib/files/browser/explorerViewlet',
|
|
270
270
|
{ key: 'noWorkspaceHelp', comment: ['Please do not translate the word "commmand", it is part of our internal syntax which must not change'] },
|
|
@@ -276,8 +276,8 @@ const viewsRegistry = ( Registry.as(Extensions.ViewsRegistry));
|
|
|
276
276
|
OpenFolderWorkspaceSupportContext)),
|
|
277
277
|
group: ViewContentGroups.Open,
|
|
278
278
|
order: 1
|
|
279
|
-
})
|
|
280
|
-
|
|
279
|
+
});
|
|
280
|
+
viewsRegistry.registerViewWelcomeContent(EmptyView.ID, {
|
|
281
281
|
content: ( localizeWithPath(
|
|
282
282
|
'vs/workbench/contrib/files/browser/explorerViewlet',
|
|
283
283
|
{ key: 'noFolderHelpWeb', comment: ['Please do not translate the word "commmand", it is part of our internal syntax which must not change'] },
|
|
@@ -290,8 +290,8 @@ const viewsRegistry = ( Registry.as(Extensions.ViewsRegistry));
|
|
|
290
290
|
OpenFolderWorkspaceSupportContext.toNegated()))),
|
|
291
291
|
group: ViewContentGroups.Open,
|
|
292
292
|
order: 1
|
|
293
|
-
})
|
|
294
|
-
|
|
293
|
+
});
|
|
294
|
+
viewsRegistry.registerViewWelcomeContent(EmptyView.ID, {
|
|
295
295
|
content: ( localizeWithPath(
|
|
296
296
|
'vs/workbench/contrib/files/browser/explorerViewlet',
|
|
297
297
|
{ key: 'remoteNoFolderHelp', comment: ['Please do not translate the word "commmand", it is part of our internal syntax which must not change'] },
|
|
@@ -304,8 +304,8 @@ const viewsRegistry = ( Registry.as(Extensions.ViewsRegistry));
|
|
|
304
304
|
IsWebContext.toNegated()))),
|
|
305
305
|
group: ViewContentGroups.Open,
|
|
306
306
|
order: 1
|
|
307
|
-
})
|
|
308
|
-
|
|
307
|
+
});
|
|
308
|
+
viewsRegistry.registerViewWelcomeContent(EmptyView.ID, {
|
|
309
309
|
content: ( localizeWithPath(
|
|
310
310
|
'vs/workbench/contrib/files/browser/explorerViewlet',
|
|
311
311
|
{ key: 'noFolderButEditorsHelp', comment: ['Please do not translate the word "commmand", it is part of our internal syntax which must not change'] },
|
|
@@ -319,8 +319,8 @@ const viewsRegistry = ( Registry.as(Extensions.ViewsRegistry));
|
|
|
319
319
|
ContextKeyExpr.and(( WorkbenchStateContext.notEqualsTo('workspace')), IsWebContext)))))),
|
|
320
320
|
group: ViewContentGroups.Open,
|
|
321
321
|
order: 1
|
|
322
|
-
})
|
|
323
|
-
|
|
322
|
+
});
|
|
323
|
+
viewsRegistry.registerViewWelcomeContent(EmptyView.ID, {
|
|
324
324
|
content: ( localizeWithPath(
|
|
325
325
|
'vs/workbench/contrib/files/browser/explorerViewlet',
|
|
326
326
|
{ key: 'noFolderHelp', comment: ['Please do not translate the word "commmand", it is part of our internal syntax which must not change'] },
|
|
@@ -333,5 +333,5 @@ const viewsRegistry = ( Registry.as(Extensions.ViewsRegistry));
|
|
|
333
333
|
ContextKeyExpr.and(( WorkbenchStateContext.notEqualsTo('workspace')), IsWebContext)))))),
|
|
334
334
|
group: ViewContentGroups.Open,
|
|
335
335
|
order: 1
|
|
336
|
-
})
|
|
336
|
+
});
|
|
337
337
|
export { ExplorerViewPaneContainer, ExplorerViewletViewsContribution, VIEW_CONTAINER };
|
|
@@ -41,7 +41,7 @@ let ForwardedPortsView = class ForwardedPortsView extends Disposable {
|
|
|
41
41
|
this.tunnelService = tunnelService;
|
|
42
42
|
this.activityService = activityService;
|
|
43
43
|
this.statusbarService = statusbarService;
|
|
44
|
-
this._register((
|
|
44
|
+
this._register(( Registry.as(Extensions.ViewsRegistry)).registerViewWelcomeContent(TUNNEL_VIEW_ID, {
|
|
45
45
|
content: this.environmentService.remoteAuthority ? ( localizeWithPath(
|
|
46
46
|
'vs/workbench/contrib/remote/browser/remoteExplorer',
|
|
47
47
|
'remoteNoPorts',
|
|
@@ -54,7 +54,7 @@ let ForwardedPortsView = class ForwardedPortsView extends Disposable {
|
|
|
54
54
|
"No forwarded ports. Forward a port to access your locally running services over the internet.\n[Forward a Port]({0})",
|
|
55
55
|
`command:${ForwardPortAction.INLINE_ID}`
|
|
56
56
|
)),
|
|
57
|
-
}))
|
|
57
|
+
}));
|
|
58
58
|
this.enableBadgeAndStatusBar();
|
|
59
59
|
this.enableForwardedPortsView();
|
|
60
60
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { localizeWithPath } from '../../../../nls.js';
|
|
2
|
+
import { RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';
|
|
3
|
+
const WorkspaceTrustContext = {
|
|
4
|
+
IsEnabled: ( new RawContextKey('isWorkspaceTrustEnabled', false, ( localizeWithPath(
|
|
5
|
+
'vs/workbench/contrib/workspace/common/workspace',
|
|
6
|
+
'workspaceTrustEnabledCtx',
|
|
7
|
+
"Whether the workspace trust feature is enabled."
|
|
8
|
+
)))),
|
|
9
|
+
IsTrusted: ( new RawContextKey('isWorkspaceTrusted', false, ( localizeWithPath(
|
|
10
|
+
'vs/workbench/contrib/workspace/common/workspace',
|
|
11
|
+
'workspaceTrustedCtx',
|
|
12
|
+
"Whether the current workspace has been trusted by the user."
|
|
13
|
+
))))
|
|
14
|
+
};
|
|
15
|
+
const MANAGE_TRUST_COMMAND_ID = 'workbench.trust.manage';
|
|
16
|
+
export { MANAGE_TRUST_COMMAND_ID, WorkspaceTrustContext };
|