@codingame/monaco-vscode-configuration-service-override 1.83.15 → 1.83.16
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.js
CHANGED
|
@@ -2,7 +2,7 @@ import { __decorate, __param } from './external/tslib/tslib.es6.js';
|
|
|
2
2
|
import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
3
3
|
import { WorkspaceService } from './vscode/src/vs/workbench/services/configuration/browser/configurationService.js';
|
|
4
4
|
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
5
|
-
import { ITextResourceConfigurationService } from 'monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js';
|
|
5
|
+
import { ITextResourceConfigurationService, ITextResourcePropertiesService } from 'monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js';
|
|
6
6
|
import { TextResourceConfigurationService } from './vscode/src/vs/editor/common/services/textResourceConfigurationService.js';
|
|
7
7
|
import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
|
|
8
8
|
export { ConfigurationScope } from './vscode/src/vs/platform/configuration/common/configurationRegistry.js';
|
|
@@ -30,6 +30,7 @@ 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 { TextResourcePropertiesService } from './vscode/src/vs/workbench/services/textresourceProperties/common/textResourcePropertiesService.js';
|
|
33
34
|
import getServiceOverride$1, { initFile } from '@codingame/monaco-vscode-files-service-override';
|
|
34
35
|
import { memoizedConstructor, unsupported } from './tools.js';
|
|
35
36
|
import { registerServiceInitializePreParticipant } from 'vscode/lifecycle';
|
|
@@ -122,7 +123,8 @@ function getServiceOverride(defaultWorkspace) {
|
|
|
122
123
|
[( IWorkspaceContextService.toString())]: new SyncDescriptor(MemoizedInjectedConfigurationService, [], true),
|
|
123
124
|
[( ITextResourceConfigurationService.toString())]: new SyncDescriptor(TextResourceConfigurationService, [], true),
|
|
124
125
|
[( IWorkspaceEditingService.toString())]: new SyncDescriptor(MonacoWorkspaceEditingService, [], true),
|
|
125
|
-
[( IWorkspacesService.toString())]: new SyncDescriptor(BrowserWorkspacesService, undefined, true)
|
|
126
|
+
[( IWorkspacesService.toString())]: new SyncDescriptor(BrowserWorkspacesService, undefined, true),
|
|
127
|
+
[( ITextResourcePropertiesService.toString())]: new SyncDescriptor(TextResourcePropertiesService, undefined, true)
|
|
126
128
|
};
|
|
127
129
|
}
|
|
128
130
|
|
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.16",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,12 +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.
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@1.83.16",
|
|
22
22
|
"monaco-editor": "0.44.0",
|
|
23
|
-
"@codingame/monaco-vscode-files-service-override": "1.83.
|
|
24
|
-
"@codingame/monaco-vscode-layout-service-override": "1.83.
|
|
25
|
-
"@codingame/monaco-vscode-environment-service-override": "1.83.
|
|
26
|
-
"@codingame/monaco-vscode-extensions-service-override": "1.83.
|
|
27
|
-
"@codingame/monaco-vscode-quickaccess-service-override": "1.83.
|
|
23
|
+
"@codingame/monaco-vscode-files-service-override": "1.83.16",
|
|
24
|
+
"@codingame/monaco-vscode-layout-service-override": "1.83.16",
|
|
25
|
+
"@codingame/monaco-vscode-environment-service-override": "1.83.16",
|
|
26
|
+
"@codingame/monaco-vscode-extensions-service-override": "1.83.16",
|
|
27
|
+
"@codingame/monaco-vscode-quickaccess-service-override": "1.83.16"
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
3
|
+
import { OS } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
4
|
+
import { Schemas } from 'monaco-editor/esm/vs/base/common/network.js';
|
|
5
|
+
import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
|
|
6
|
+
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService';
|
|
7
|
+
import { IRemoteAgentService } from 'vscode/vscode/vs/workbench/services/remote/common/remoteAgentService';
|
|
8
|
+
|
|
9
|
+
let TextResourcePropertiesService = class TextResourcePropertiesService {
|
|
10
|
+
constructor(configurationService, remoteAgentService, environmentService, storageService) {
|
|
11
|
+
this.configurationService = configurationService;
|
|
12
|
+
this.environmentService = environmentService;
|
|
13
|
+
this.storageService = storageService;
|
|
14
|
+
this.remoteEnvironment = null;
|
|
15
|
+
remoteAgentService.getEnvironment().then(remoteEnv => this.remoteEnvironment = remoteEnv);
|
|
16
|
+
}
|
|
17
|
+
getEOL(resource, language) {
|
|
18
|
+
const eol = this.configurationService.getValue('files.eol', { overrideIdentifier: language, resource });
|
|
19
|
+
if (eol && typeof eol === 'string' && eol !== 'auto') {
|
|
20
|
+
return eol;
|
|
21
|
+
}
|
|
22
|
+
const os = this.getOS(resource);
|
|
23
|
+
return os === 3 || os === 2 ? '\n' : '\r\n';
|
|
24
|
+
}
|
|
25
|
+
getOS(resource) {
|
|
26
|
+
let os = OS;
|
|
27
|
+
const remoteAuthority = this.environmentService.remoteAuthority;
|
|
28
|
+
if (remoteAuthority) {
|
|
29
|
+
if (resource && resource.scheme !== Schemas.file) {
|
|
30
|
+
const osCacheKey = `resource.authority.os.${remoteAuthority}`;
|
|
31
|
+
os = this.remoteEnvironment ? this.remoteEnvironment.os : this.storageService.getNumber(osCacheKey, 1 , OS);
|
|
32
|
+
this.storageService.store(osCacheKey, os, 1 , 1 );
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return os;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
TextResourcePropertiesService = ( __decorate([
|
|
39
|
+
( __param(0, IConfigurationService)),
|
|
40
|
+
( __param(1, IRemoteAgentService)),
|
|
41
|
+
( __param(2, IWorkbenchEnvironmentService)),
|
|
42
|
+
( __param(3, IStorageService))
|
|
43
|
+
], TextResourcePropertiesService));
|
|
44
|
+
|
|
45
|
+
export { TextResourcePropertiesService };
|