@codingame/monaco-vscode-configuration-service-override 1.83.7 → 1.83.9
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/configuration.d.ts +7 -3
- package/configuration.js +11 -9
- package/index.d.ts +1 -1
- package/package.json +8 -3
- package/services.js +12 -16
- package/l10n.js +0 -8
- package/missing-services.js +0 -2141
package/configuration.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { IEditorOverrideServices } from 'vscode/vscode/vs/editor/standalone/brow
|
|
|
2
2
|
import { IConfigurationRegistry } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
3
3
|
export { ConfigurationScope, IConfigurationDefaults, IConfigurationNode } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
4
4
|
import { IFileWriteOptions } from 'vscode/vscode/vs/platform/files/common/files';
|
|
5
|
-
import
|
|
5
|
+
import * as vscode from 'vscode';
|
|
6
6
|
import { IAnyWorkspaceIdentifier } from 'vscode/vscode/vs/platform/workspace/common/workspace';
|
|
7
7
|
export { IAnyWorkspaceIdentifier, IEmptyWorkspaceIdentifier, ISingleFolderWorkspaceIdentifier, IWorkspaceIdentifier } from 'vscode/vscode/vs/platform/workspace/common/workspace';
|
|
8
8
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
@@ -17,9 +17,13 @@ declare function initUserConfiguration(configurationJson: string, options?: Part
|
|
|
17
17
|
*/
|
|
18
18
|
declare function updateUserConfiguration(configurationJson: string): Promise<void>;
|
|
19
19
|
declare function getUserConfiguration(): Promise<string>;
|
|
20
|
-
declare function onUserConfigurationChange(callback: () => void): Disposable;
|
|
20
|
+
declare function onUserConfigurationChange(callback: () => void): vscode.Disposable;
|
|
21
21
|
declare const configurationRegistry: IConfigurationRegistry;
|
|
22
22
|
declare function reinitializeWorkspace(workspace: IAnyWorkspaceIdentifier): Promise<void>;
|
|
23
|
-
declare function getServiceOverride(
|
|
23
|
+
declare function getServiceOverride(): IEditorOverrideServices;
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated Provide workspace via the services `initialize` function `configuration.workspaceProvider` parameter
|
|
26
|
+
*/
|
|
27
|
+
declare function getServiceOverride(defaultWorkspace?: URI | IAnyWorkspaceIdentifier): IEditorOverrideServices;
|
|
24
28
|
|
|
25
29
|
export { configurationRegistry, getServiceOverride as default, defaultUserConfigurationFile, getUserConfiguration, initUserConfiguration, onUserConfigurationChange, reinitializeWorkspace, updateUserConfiguration };
|
package/configuration.js
CHANGED
|
@@ -30,14 +30,15 @@ import { IWorkspaceEditingService } from 'vscode/vscode/vs/workbench/services/wo
|
|
|
30
30
|
import { AbstractWorkspaceEditingService } from './vscode/src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.js';
|
|
31
31
|
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
32
32
|
import './vscode/src/vs/workbench/api/common/configurationExtensionPoint.js';
|
|
33
|
-
import getServiceOverride$
|
|
33
|
+
import getServiceOverride$1$2, { initFile } from '@codingame/monaco-vscode-files-service-override';
|
|
34
34
|
import { memoizedConstructor, unsupported } from './tools.js';
|
|
35
35
|
import { registerServiceInitializePreParticipant } from 'vscode/lifecycle';
|
|
36
36
|
import { getService } from './services.js';
|
|
37
|
+
import { getWorkspaceIdentifier } from 'vscode/workbench';
|
|
37
38
|
|
|
38
39
|
const defaultUserConfigurationFile = ( URI.from({ scheme: Schemas.vscodeUserData, path: '/User/settings.json' }));
|
|
39
40
|
async function initUserConfiguration(configurationJson, options, file = defaultUserConfigurationFile) {
|
|
40
|
-
await initFile(
|
|
41
|
+
await initFile(file, configurationJson, options);
|
|
41
42
|
}
|
|
42
43
|
async function updateUserConfiguration(configurationJson) {
|
|
43
44
|
const userDataProfilesService = await getService(IUserDataProfilesService);
|
|
@@ -78,19 +79,20 @@ class MonacoWorkspaceEditingService extends AbstractWorkspaceEditingService {
|
|
|
78
79
|
this.enterWorkspace = unsupported;
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
|
-
let _defaultWorkspace
|
|
82
|
+
let _defaultWorkspace;
|
|
82
83
|
registerServiceInitializePreParticipant(async (accessor) => {
|
|
83
84
|
const workspaceService = accessor.get(IWorkspaceContextService);
|
|
84
85
|
workspaceService.acquireInstantiationService(accessor.get(IInstantiationService));
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
const workspace = _defaultWorkspace ?? getWorkspaceIdentifier();
|
|
87
|
+
if (URI.isUri(workspace)) {
|
|
88
|
+
const configPath = workspace.with({ path: '/workspace.code-workspace' });
|
|
87
89
|
try {
|
|
88
90
|
const fileService = accessor.get(IFileService);
|
|
89
|
-
await fileService.createFolder(
|
|
91
|
+
await fileService.createFolder(workspace);
|
|
90
92
|
await fileService.writeFile(configPath, VSBuffer.fromString(JSON.stringify({
|
|
91
93
|
folders: [
|
|
92
94
|
{
|
|
93
|
-
path:
|
|
95
|
+
path: workspace.path
|
|
94
96
|
}
|
|
95
97
|
]
|
|
96
98
|
})));
|
|
@@ -103,7 +105,7 @@ registerServiceInitializePreParticipant(async (accessor) => {
|
|
|
103
105
|
});
|
|
104
106
|
}
|
|
105
107
|
else {
|
|
106
|
-
await workspaceService.initialize(
|
|
108
|
+
await workspaceService.initialize(workspace);
|
|
107
109
|
}
|
|
108
110
|
});
|
|
109
111
|
const MemoizedInjectedConfigurationService = memoizedConstructor(InjectedConfigurationService);
|
|
@@ -114,7 +116,7 @@ async function reinitializeWorkspace(workspace) {
|
|
|
114
116
|
function getServiceOverride(defaultWorkspace) {
|
|
115
117
|
_defaultWorkspace = defaultWorkspace;
|
|
116
118
|
return {
|
|
117
|
-
...getServiceOverride$
|
|
119
|
+
...getServiceOverride$1$2(),
|
|
118
120
|
[( ILabelService.toString())]: new SyncDescriptor(LabelService, undefined, true),
|
|
119
121
|
[( IConfigurationService.toString())]: new SyncDescriptor(MemoizedInjectedConfigurationService, [], true),
|
|
120
122
|
[( IWorkspaceContextService.toString())]: new SyncDescriptor(MemoizedInjectedConfigurationService, [], true),
|
package/index.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ export { configurationRegistry, default, defaultUserConfigurationFile, getUserCo
|
|
|
2
2
|
export { ConfigurationScope, IConfigurationDefaults, IConfigurationNode } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
3
3
|
export { IColorCustomizations, IThemeScopedColorCustomizations } from 'vscode/vscode/vs/workbench/services/themes/common/workbenchThemeService';
|
|
4
4
|
export { IAnyWorkspaceIdentifier, IEmptyWorkspaceIdentifier, ISingleFolderWorkspaceIdentifier, IWorkspaceIdentifier } from 'vscode/vscode/vs/platform/workspace/common/workspace';
|
|
5
|
-
export { IWorkspaceFolderCreationData } from 'vscode/vscode/vs/platform/workspaces/common/workspaces';
|
|
5
|
+
export { IStoredWorkspace, IWorkspaceFolderCreationData } from 'vscode/vscode/vs/platform/workspaces/common/workspaces';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-configuration-service-override",
|
|
3
|
-
"version": "1.83.
|
|
3
|
+
"version": "1.83.9",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,7 +18,12 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@1.83.
|
|
22
|
-
"monaco-editor": "0.44.0"
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@1.83.9",
|
|
22
|
+
"monaco-editor": "0.44.0",
|
|
23
|
+
"@codingame/monaco-vscode-files-service-override": "1.83.9",
|
|
24
|
+
"@codingame/monaco-vscode-layout-service-override": "1.83.9",
|
|
25
|
+
"@codingame/monaco-vscode-environment-service-override": "1.83.9",
|
|
26
|
+
"@codingame/monaco-vscode-extensions-service-override": "1.83.9",
|
|
27
|
+
"@codingame/monaco-vscode-quickaccess-service-override": "1.83.9"
|
|
23
28
|
}
|
|
24
29
|
}
|
package/services.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import '
|
|
1
|
+
import 'vscode/missing-services';
|
|
2
2
|
export { default as Severity } from 'monaco-editor/esm/vs/base/common/severity.js';
|
|
3
3
|
export { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
4
4
|
import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
5
5
|
export { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
6
|
+
import 'monaco-editor/esm/vs/base/common/objects.js';
|
|
6
7
|
export { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
7
|
-
|
|
8
|
-
import '
|
|
9
|
-
import 'vscode
|
|
10
|
-
import 'vscode
|
|
11
|
-
import 'vscode
|
|
12
|
-
import 'vscode
|
|
13
|
-
import
|
|
8
|
+
export { IProductService } from 'monaco-editor/esm/vs/platform/product/common/productService.js';
|
|
9
|
+
import 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
10
|
+
import '@codingame/monaco-vscode-layout-service-override';
|
|
11
|
+
import '@codingame/monaco-vscode-environment-service-override';
|
|
12
|
+
import '@codingame/monaco-vscode-extensions-service-override';
|
|
13
|
+
import '@codingame/monaco-vscode-files-service-override';
|
|
14
|
+
import '@codingame/monaco-vscode-quickaccess-service-override';
|
|
15
|
+
import { waitServicesReady } from 'vscode/lifecycle';
|
|
16
|
+
import 'vscode/workbench';
|
|
14
17
|
export { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
|
|
15
18
|
export { ICommandService } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
|
|
16
19
|
export { INotificationService, NeverShowAgainScope, NoOpNotification, NoOpProgress, NotificationPriority, NotificationsFilter } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
|
|
@@ -27,7 +30,6 @@ import './override/vs/platform/dialogs/common/dialogs.js';
|
|
|
27
30
|
export { IFileService } from 'monaco-editor/esm/vs/platform/files/common/files.js';
|
|
28
31
|
export { IMarkerService } from 'monaco-editor/esm/vs/platform/markers/common/markers.js';
|
|
29
32
|
export { IOpenerService } from 'monaco-editor/esm/vs/platform/opener/common/opener.js';
|
|
30
|
-
export { IProductService } from 'monaco-editor/esm/vs/platform/product/common/productService.js';
|
|
31
33
|
export { IQuickInputService } from 'monaco-editor/esm/vs/platform/quickinput/common/quickInput.js';
|
|
32
34
|
export { ITelemetryService } from 'monaco-editor/esm/vs/platform/telemetry/common/telemetry.js';
|
|
33
35
|
export { IUriIdentityService } from 'monaco-editor/esm/vs/platform/uriIdentity/common/uriIdentity.js';
|
|
@@ -76,15 +78,9 @@ export { IBannerService } from 'vscode/vscode/vs/workbench/services/banner/brows
|
|
|
76
78
|
export { IWorkspaceTrustEnablementService, IWorkspaceTrustManagementService, IWorkspaceTrustRequestService } from 'monaco-editor/esm/vs/platform/workspace/common/workspaceTrust.js';
|
|
77
79
|
export { IDialogService, IFileDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs';
|
|
78
80
|
|
|
79
|
-
StandaloneServices.withServices(() => {
|
|
80
|
-
return Disposable.None;
|
|
81
|
-
});
|
|
82
|
-
async function waitServicesReady() {
|
|
83
|
-
await serviceInitializedBarrier.wait();
|
|
84
|
-
}
|
|
85
81
|
async function getService(identifier) {
|
|
86
82
|
await waitServicesReady();
|
|
87
83
|
return StandaloneServices.get(identifier);
|
|
88
84
|
}
|
|
89
85
|
|
|
90
|
-
export { getService
|
|
86
|
+
export { getService };
|