@codingame/monaco-vscode-base-service-override 7.0.9 → 7.0.10
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/base.js
CHANGED
|
@@ -32,7 +32,7 @@ import { getEnvironmentOverride } from 'vscode/workbench';
|
|
|
32
32
|
|
|
33
33
|
let BrowserPathServiceOverride = class BrowserPathServiceOverride extends AbstractPathService {
|
|
34
34
|
constructor(remoteAgentService, environmentService, contextService) {
|
|
35
|
-
super(
|
|
35
|
+
super(getEnvironmentOverride().userHome ?? guessLocalUserHome(environmentService, contextService), remoteAgentService, environmentService, contextService);
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
BrowserPathServiceOverride = __decorate([
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-base-service-override",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.10",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@7.0.
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@7.0.10"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -5,8 +5,8 @@ import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
|
5
5
|
import { firstOrDefault } from 'vscode/vscode/vs/base/common/arrays';
|
|
6
6
|
import { dirname } from 'vscode/vscode/vs/base/common/resources';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
const workspace =
|
|
8
|
+
function guessLocalUserHome(environmentService, contextService) {
|
|
9
|
+
const workspace = contextService.getWorkspace();
|
|
10
10
|
const firstFolder = firstOrDefault(workspace.folders);
|
|
11
11
|
if (firstFolder) {
|
|
12
12
|
return firstFolder.uri;
|
|
@@ -23,7 +23,7 @@ let AbstractPathService = AbstractPathService_1 = class AbstractPathService {
|
|
|
23
23
|
})();
|
|
24
24
|
this.resolveUserHome = (async () => {
|
|
25
25
|
const env = await this.remoteAgentService.getEnvironment();
|
|
26
|
-
const userHome = this.maybeUnresolvedUserHome = env?.userHome ??
|
|
26
|
+
const userHome = this.maybeUnresolvedUserHome = env?.userHome ?? localUserHome;
|
|
27
27
|
return userHome;
|
|
28
28
|
})();
|
|
29
29
|
}
|