@theia/remote-wsl 1.67.0-next.13 → 1.67.0-next.56

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.
Files changed (38) hide show
  1. package/README.md +1 -1
  2. package/package.json +5 -5
  3. package/lib/electron-browser/remote-wsl-frontend-module.d.ts +0 -4
  4. package/lib/electron-browser/remote-wsl-frontend-module.d.ts.map +0 -1
  5. package/lib/electron-browser/remote-wsl-frontend-module.js +0 -30
  6. package/lib/electron-browser/remote-wsl-frontend-module.js.map +0 -1
  7. package/lib/electron-browser/wsl-connection-contribution.d.ts +0 -29
  8. package/lib/electron-browser/wsl-connection-contribution.d.ts.map +0 -1
  9. package/lib/electron-browser/wsl-connection-contribution.js +0 -179
  10. package/lib/electron-browser/wsl-connection-contribution.js.map +0 -1
  11. package/lib/electron-common/remote-wsl-connection-provider.d.ts +0 -20
  12. package/lib/electron-common/remote-wsl-connection-provider.d.ts.map +0 -1
  13. package/lib/electron-common/remote-wsl-connection-provider.js +0 -21
  14. package/lib/electron-common/remote-wsl-connection-provider.js.map +0 -1
  15. package/lib/electron-common/wsl-workspaces.d.ts +0 -2
  16. package/lib/electron-common/wsl-workspaces.d.ts.map +0 -1
  17. package/lib/electron-common/wsl-workspaces.js +0 -20
  18. package/lib/electron-common/wsl-workspaces.js.map +0 -1
  19. package/lib/electron-node/remote-wsl-backend-module.d.ts +0 -5
  20. package/lib/electron-node/remote-wsl-backend-module.d.ts.map +0 -1
  21. package/lib/electron-node/remote-wsl-backend-module.js +0 -39
  22. package/lib/electron-node/remote-wsl-backend-module.js.map +0 -1
  23. package/lib/electron-node/remote-wsl-connection-provider.d.ts +0 -25
  24. package/lib/electron-node/remote-wsl-connection-provider.d.ts.map +0 -1
  25. package/lib/electron-node/remote-wsl-connection-provider.js +0 -121
  26. package/lib/electron-node/remote-wsl-connection-provider.js.map +0 -1
  27. package/lib/electron-node/remote-wsl-connection.d.ts +0 -31
  28. package/lib/electron-node/remote-wsl-connection.d.ts.map +0 -1
  29. package/lib/electron-node/remote-wsl-connection.js +0 -138
  30. package/lib/electron-node/remote-wsl-connection.js.map +0 -1
  31. package/lib/electron-node/wsl-workspace-handler.d.ts +0 -8
  32. package/lib/electron-node/wsl-workspace-handler.d.ts.map +0 -1
  33. package/lib/electron-node/wsl-workspace-handler.js +0 -23
  34. package/lib/electron-node/wsl-workspace-handler.js.map +0 -1
  35. package/lib/package.spec.d.ts +0 -1
  36. package/lib/package.spec.d.ts.map +0 -1
  37. package/lib/package.spec.js +0 -26
  38. package/lib/package.spec.js.map +0 -1
package/README.md CHANGED
@@ -16,7 +16,7 @@ This package extends the @theia/remote feature with functionality to connect to
16
16
 
17
17
  ## Additional Information
18
18
 
19
- - [API documentation for `@theia/remote-wsl`](https://eclipse-theia.github.io/theia/docs/next/modules/remote-wsl.html)
19
+ - [API documentation for `@theia/remote-wsl`](https://eclipse-theia.github.io/theia/docs/next/modules/_theia_remote-wsl.html)
20
20
  - [Theia - GitHub](https://github.com/eclipse-theia/theia)
21
21
  - [Theia - Website](https://theia-ide.org/)
22
22
 
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@theia/remote-wsl",
3
- "version": "1.67.0-next.13+c409d5d18",
3
+ "version": "1.67.0-next.56+d8f18cc386c",
4
4
  "description": "Theia - Remote WSL",
5
5
  "dependencies": {
6
- "@theia/core": "1.67.0-next.13+c409d5d18",
7
- "@theia/remote": "1.67.0-next.13+c409d5d18",
8
- "@theia/workspace": "1.67.0-next.13+c409d5d18",
6
+ "@theia/core": "1.67.0-next.56+d8f18cc386c",
7
+ "@theia/remote": "1.67.0-next.56+d8f18cc386c",
8
+ "@theia/workspace": "1.67.0-next.56+d8f18cc386c",
9
9
  "tslib": "^2.6.2"
10
10
  },
11
11
  "publishConfig": {
@@ -44,5 +44,5 @@
44
44
  "nyc": {
45
45
  "extends": "../../configs/nyc.json"
46
46
  },
47
- "gitHead": "c409d5d18d8c4f5a722f87b37ea9d6fd5af47ea8"
47
+ "gitHead": "d8f18cc386c45a736cd193d42eab02c8f64c6b10"
48
48
  }
@@ -1,4 +0,0 @@
1
- import { ContainerModule } from '@theia/core/shared/inversify';
2
- declare const _default: ContainerModule;
3
- export default _default;
4
- //# sourceMappingURL=remote-wsl-frontend-module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remote-wsl-frontend-module.d.ts","sourceRoot":"","sources":["../../src/electron-browser/remote-wsl-frontend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;;AAO/D,wBAQG"}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2025 TypeFox and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const inversify_1 = require("@theia/core/shared/inversify");
19
- const remote_registry_contribution_1 = require("@theia/remote/lib/electron-browser/remote-registry-contribution");
20
- const remote_wsl_connection_provider_1 = require("../electron-common/remote-wsl-connection-provider");
21
- const wsl_connection_contribution_1 = require("./wsl-connection-contribution");
22
- const service_connection_provider_1 = require("@theia/core/lib/browser/messaging/service-connection-provider");
23
- const workspace_service_1 = require("@theia/workspace/lib/browser/workspace-service");
24
- exports.default = new inversify_1.ContainerModule(bind => {
25
- bind(wsl_connection_contribution_1.WslConnectionContribution).toSelf().inSingletonScope();
26
- bind(remote_registry_contribution_1.RemoteRegistryContribution).toService(wsl_connection_contribution_1.WslConnectionContribution);
27
- bind(workspace_service_1.WorkspaceOpenHandlerContribution).toService(wsl_connection_contribution_1.WslConnectionContribution);
28
- bind(remote_wsl_connection_provider_1.RemoteWslConnectionProvider).toDynamicValue(ctx => service_connection_provider_1.ServiceConnectionProvider.createLocalProxy(ctx.container, remote_wsl_connection_provider_1.RemoteWslConnectionProviderPath)).inSingletonScope();
29
- });
30
- //# sourceMappingURL=remote-wsl-frontend-module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remote-wsl-frontend-module.js","sourceRoot":"","sources":["../../src/electron-browser/remote-wsl-frontend-module.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,4DAA+D;AAC/D,kHAA6G;AAC7G,sGAAiI;AACjI,+EAA0E;AAC1E,+GAA0G;AAC1G,sFAAkG;AAElG,kBAAe,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACtC,IAAI,CAAC,uDAAyB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC5D,IAAI,CAAC,yDAA0B,CAAC,CAAC,SAAS,CAAC,uDAAyB,CAAC,CAAC;IACtE,IAAI,CAAC,oDAAgC,CAAC,CAAC,SAAS,CAAC,uDAAyB,CAAC,CAAC;IAE5E,IAAI,CAAC,4DAA2B,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CACnD,uDAAyB,CAAC,gBAAgB,CAA8B,GAAG,CAAC,SAAS,EAAE,gEAA+B,CAAC,CAC1H,CAAC,gBAAgB,EAAE,CAAC;AACzB,CAAC,CAAC,CAAC"}
@@ -1,29 +0,0 @@
1
- import { AbstractRemoteRegistryContribution, RemoteRegistry } from '@theia/remote/lib/electron-browser/remote-registry-contribution';
2
- import { WorkspaceStorageService } from '@theia/workspace/lib/browser/workspace-storage-service';
3
- import { Command, MessageService, QuickInputService, URI } from '@theia/core';
4
- import { WorkspaceInput, WorkspaceOpenHandlerContribution, WorkspaceService } from '@theia/workspace/lib/browser/workspace-service';
5
- import { WorkspaceServer } from '@theia/workspace/lib/common';
6
- import { RemoteWslConnectionProvider, WslDistribution } from '../electron-common/remote-wsl-connection-provider';
7
- import { RemotePreferences } from '@theia/remote/lib/electron-common/remote-preferences';
8
- export declare namespace RemoteWslCommands {
9
- const CONNECT_TO_WSL: Command;
10
- const CONNECT_TO_WSL_WITH_DISTRO: Command;
11
- const OPEN_CURRENT_FOLDER_IN_WSL: Command;
12
- }
13
- export declare class WslConnectionContribution extends AbstractRemoteRegistryContribution implements WorkspaceOpenHandlerContribution, WorkspaceOpenHandlerContribution {
14
- protected readonly connectionProvider: RemoteWslConnectionProvider;
15
- protected readonly remotePreferences: RemotePreferences;
16
- protected readonly workspaceStorageService: WorkspaceStorageService;
17
- protected readonly workspaceService: WorkspaceService;
18
- protected readonly workspaceServer: WorkspaceServer;
19
- protected readonly quickInputService: QuickInputService;
20
- protected readonly messageService: MessageService;
21
- registerRemoteCommands(registry: RemoteRegistry): void;
22
- connectToWSL(distribution: WslDistribution, workspace?: string, preserveWindow?: boolean): Promise<void>;
23
- getOrSelectWslDistribution(): Promise<WslDistribution | undefined>;
24
- canHandle(uri: URI): boolean;
25
- openWorkspace(uri: URI, options?: WorkspaceInput | undefined): Promise<void>;
26
- getWorkspaceLabel(uri: URI): Promise<string | undefined>;
27
- protected toWSLMountPath(path: string): string;
28
- }
29
- //# sourceMappingURL=wsl-connection-contribution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wsl-connection-contribution.d.ts","sourceRoot":"","sources":["../../src/electron-browser/wsl-connection-contribution.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,kCAAkC,EAAE,cAAc,EAAE,MAAM,iEAA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AG,SAAS,CAAC;IAsBxE,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO;IAItB,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAc5E,iBAAiB,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAI9D,SAAS,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAKjD"}
@@ -1,179 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2025 TypeFox and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.WslConnectionContribution = exports.RemoteWslCommands = void 0;
19
- const tslib_1 = require("tslib");
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- const remote_registry_contribution_1 = require("@theia/remote/lib/electron-browser/remote-registry-contribution");
22
- const workspace_storage_service_1 = require("@theia/workspace/lib/browser/workspace-storage-service");
23
- const core_1 = require("@theia/core");
24
- const workspace_service_1 = require("@theia/workspace/lib/browser/workspace-service");
25
- const common_1 = require("@theia/workspace/lib/common");
26
- const remote_wsl_connection_provider_1 = require("../electron-common/remote-wsl-connection-provider");
27
- const wsl_workspaces_1 = require("../electron-common/wsl-workspaces");
28
- const remote_preferences_1 = require("@theia/remote/lib/electron-common/remote-preferences");
29
- var RemoteWslCommands;
30
- (function (RemoteWslCommands) {
31
- RemoteWslCommands.CONNECT_TO_WSL = core_1.Command.toLocalizedCommand({
32
- id: 'remote-wsl.connect-to-wsl',
33
- label: 'Connect to WSL',
34
- category: 'WSL'
35
- }, 'theia/remote/wsl/connectToWsl');
36
- RemoteWslCommands.CONNECT_TO_WSL_WITH_DISTRO = core_1.Command.toLocalizedCommand({
37
- id: 'remote-wsl.connect-to-wsl-with-distro',
38
- label: 'Connect to WSL using Distro...',
39
- category: 'WSL'
40
- }, 'theia/remote/wsl/connectToWslUsingDistro');
41
- RemoteWslCommands.OPEN_CURRENT_FOLDER_IN_WSL = core_1.Command.toLocalizedCommand({
42
- id: 'remote-wsl.open-current-folder-in-wsl',
43
- label: 'Reopen Folder in WSL',
44
- category: 'WSL'
45
- }, 'theia/remote/wsl/reopenInWsl');
46
- })(RemoteWslCommands || (exports.RemoteWslCommands = RemoteWslCommands = {}));
47
- let WslConnectionContribution = class WslConnectionContribution extends remote_registry_contribution_1.AbstractRemoteRegistryContribution {
48
- registerRemoteCommands(registry) {
49
- if (!core_1.isWindows) {
50
- // ignore this feature on non-Windows platforms
51
- return;
52
- }
53
- registry.registerCommand(RemoteWslCommands.CONNECT_TO_WSL, {
54
- execute: () => {
55
- this.connectionProvider.getWslDistributions().then(distributions => {
56
- const defaultDistro = distributions.find(dist => dist.default);
57
- if (defaultDistro) {
58
- this.connectToWSL(defaultDistro);
59
- }
60
- else {
61
- this.getOrSelectWslDistribution().then(distribution => {
62
- if (distribution) {
63
- this.connectToWSL(distribution);
64
- }
65
- });
66
- }
67
- });
68
- }
69
- });
70
- registry.registerCommand(RemoteWslCommands.CONNECT_TO_WSL_WITH_DISTRO, {
71
- execute: () => this.getOrSelectWslDistribution().then(distribution => {
72
- if (distribution) {
73
- this.connectToWSL(distribution);
74
- }
75
- })
76
- });
77
- registry.registerCommand(RemoteWslCommands.OPEN_CURRENT_FOLDER_IN_WSL, {
78
- execute: () => this.getOrSelectWslDistribution().then(distribution => {
79
- var _a;
80
- if (distribution) {
81
- const workspacePath = (_a = this.workspaceService.workspace) === null || _a === void 0 ? void 0 : _a.resource.path.fsPath();
82
- if (workspacePath) {
83
- this.connectToWSL(distribution, this.toWSLMountPath(workspacePath));
84
- }
85
- }
86
- }),
87
- isVisible: () => !!this.workspaceService.workspace
88
- });
89
- }
90
- async connectToWSL(distribution, workspace, preserveWindow = true) {
91
- var _a, _b;
92
- const connectionResult = await this.connectionProvider.connectToWsl({
93
- nodeDownloadTemplate: this.remotePreferences['remote.nodeDownloadTemplate'],
94
- distribution: distribution.name,
95
- workspacePath: (_b = (_a = this.workspaceService.workspace) === null || _a === void 0 ? void 0 : _a.resource.path) === null || _b === void 0 ? void 0 : _b.fsPath()
96
- });
97
- if (workspace) {
98
- this.workspaceServer.setMostRecentlyUsedWorkspace(`${wsl_workspaces_1.WSL_WORKSPACE_SCHEME}:${workspace}?distro=${distribution.name}`);
99
- }
100
- this.openRemote(connectionResult.port.toString(), !preserveWindow, workspace);
101
- }
102
- async getOrSelectWslDistribution() {
103
- var _a;
104
- const distributions = await this.connectionProvider.getWslDistributions();
105
- if (distributions.length === 0) {
106
- this.messageService.error(core_1.nls.localize('theia/remote/wsl/noWslDistroFound', 'No WSL distributions found. Please install a WSL distribution first.'));
107
- return undefined;
108
- }
109
- if (distributions.length === 1) {
110
- return distributions[0];
111
- }
112
- return (_a = (await this.quickInputService.pick(distributions.map(dist => ({
113
- type: 'item',
114
- label: dist.name,
115
- description: dist.default ? core_1.nls.localizeByDefault('Default') : dist.version,
116
- distribution: dist,
117
- })), {
118
- title: core_1.nls.localize('theia/remote/wsl/selectWSLDistro', 'Select a WSL distribution')
119
- }))) === null || _a === void 0 ? void 0 : _a.distribution;
120
- }
121
- canHandle(uri) {
122
- return uri.scheme === wsl_workspaces_1.WSL_WORKSPACE_SCHEME; // WSL doesn't use a special URI scheme
123
- }
124
- async openWorkspace(uri, options) {
125
- const workspacePath = uri.path.toString();
126
- const distroName = new URLSearchParams(uri.query).get('distro');
127
- if (distroName) {
128
- const distros = await this.connectionProvider.getWslDistributions();
129
- const distro = distros.find(d => d.name === distroName);
130
- if (!distro) {
131
- throw new Error(`Invalid WSL workspace URI. Distribution ${distroName} not found.`);
132
- }
133
- this.connectToWSL(distro, workspacePath, options === null || options === void 0 ? void 0 : options.preserveWindow);
134
- }
135
- throw new Error('Invalid WSL workspace URI. No distrubution specified.');
136
- }
137
- async getWorkspaceLabel(uri) {
138
- return `[WSL] ${uri.path.base}`;
139
- }
140
- toWSLMountPath(path) {
141
- const driveLetter = path.charAt(0).toLowerCase();
142
- const wslPath = path.replace(/^[a-zA-Z]:\\/, `/mnt/${driveLetter}/`);
143
- return wslPath.replace(/\\/g, '/');
144
- }
145
- };
146
- exports.WslConnectionContribution = WslConnectionContribution;
147
- tslib_1.__decorate([
148
- (0, inversify_1.inject)(remote_wsl_connection_provider_1.RemoteWslConnectionProvider),
149
- tslib_1.__metadata("design:type", Object)
150
- ], WslConnectionContribution.prototype, "connectionProvider", void 0);
151
- tslib_1.__decorate([
152
- (0, inversify_1.inject)(remote_preferences_1.RemotePreferences),
153
- tslib_1.__metadata("design:type", Object)
154
- ], WslConnectionContribution.prototype, "remotePreferences", void 0);
155
- tslib_1.__decorate([
156
- (0, inversify_1.inject)(workspace_storage_service_1.WorkspaceStorageService),
157
- tslib_1.__metadata("design:type", workspace_storage_service_1.WorkspaceStorageService)
158
- ], WslConnectionContribution.prototype, "workspaceStorageService", void 0);
159
- tslib_1.__decorate([
160
- (0, inversify_1.inject)(workspace_service_1.WorkspaceService),
161
- tslib_1.__metadata("design:type", workspace_service_1.WorkspaceService)
162
- ], WslConnectionContribution.prototype, "workspaceService", void 0);
163
- tslib_1.__decorate([
164
- (0, inversify_1.inject)(common_1.WorkspaceServer),
165
- tslib_1.__metadata("design:type", Object)
166
- ], WslConnectionContribution.prototype, "workspaceServer", void 0);
167
- tslib_1.__decorate([
168
- (0, inversify_1.inject)(core_1.QuickInputService),
169
- tslib_1.__metadata("design:type", Object)
170
- ], WslConnectionContribution.prototype, "quickInputService", void 0);
171
- tslib_1.__decorate([
172
- (0, inversify_1.inject)(core_1.MessageService),
173
- tslib_1.__metadata("design:type", core_1.MessageService)
174
- ], WslConnectionContribution.prototype, "messageService", void 0);
175
- exports.WslConnectionContribution = WslConnectionContribution = tslib_1.__decorate([
176
- (0, inversify_1.injectable)()
177
- ], WslConnectionContribution);
178
- ;
179
- //# sourceMappingURL=wsl-connection-contribution.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wsl-connection-contribution.js","sourceRoot":"","sources":["../../src/electron-browser/wsl-connection-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,4DAAkE;AAClE,kHAAqI;AACrI,sGAAiG;AACjG,sCAA8F;AAC9F,sFAAoI;AACpI,wDAA8D;AAC9D,sGAAiH;AACjH,sEAAyE;AACzE,6FAAyF;AAEzF,IAAiB,iBAAiB,CAkBjC;AAlBD,WAAiB,iBAAiB;IACjB,gCAAc,GAAG,cAAO,CAAC,kBAAkB,CAAC;QACrD,EAAE,EAAE,2BAA2B;QAC/B,KAAK,EAAE,gBAAgB;QACvB,QAAQ,EAAE,KAAK;KAClB,EAAE,+BAA+B,CAAC,CAAC;IAEvB,4CAA0B,GAAG,cAAO,CAAC,kBAAkB,CAAC;QACjE,EAAE,EAAE,uCAAuC;QAC3C,KAAK,EAAE,gCAAgC;QACvC,QAAQ,EAAE,KAAK;KAClB,EAAE,0CAA0C,CAAC,CAAC;IAElC,4CAA0B,GAAG,cAAO,CAAC,kBAAkB,CAAC;QACjE,EAAE,EAAE,uCAAuC;QAC3C,KAAK,EAAE,sBAAsB;QAC7B,QAAQ,EAAE,KAA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,kBAAM,EAAC,qBAAc,CAAC;sCACY,qBAAc;iEAAC;oCAtBzC,yBAAyB;IADrC,IAAA,sBAAU,GAAE;GACA,yBAAyB,CAoIrC;AAAA,CAAC"}
@@ -1,20 +0,0 @@
1
- export interface WslDistribution {
2
- name: string;
3
- default: boolean;
4
- version: string;
5
- }
6
- export interface WslConnectionOptions {
7
- nodeDownloadTemplate: string;
8
- distribution: string;
9
- workspacePath?: string;
10
- }
11
- export interface WslConnectionResult {
12
- port: number;
13
- }
14
- export declare const RemoteWslConnectionProviderPath = "/remote/wsl";
15
- export declare const RemoteWslConnectionProvider: unique symbol;
16
- export interface RemoteWslConnectionProvider {
17
- getWslDistributions(): Promise<WslDistribution[]>;
18
- connectToWsl(options: WslConnectionOptions): Promise<WslConnectionResult>;
19
- }
20
- //# sourceMappingURL=remote-wsl-connection-provider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remote-wsl-connection-provider.d.ts","sourceRoot":"","sources":["../../src/electron-common/remote-wsl-connection-provider.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACjC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,+BAA+B,gBAAgB,CAAC;AAE7D,eAAO,MAAM,2BAA2B,eAAwC,CAAC;AACjF,MAAM,WAAW,2BAA2B;IACxC,mBAAmB,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;IAClD,YAAY,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;CAC7E"}
@@ -1,21 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2025 TypeFox and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.RemoteWslConnectionProvider = exports.RemoteWslConnectionProviderPath = void 0;
19
- exports.RemoteWslConnectionProviderPath = '/remote/wsl';
20
- exports.RemoteWslConnectionProvider = Symbol('RemoteWslConnectionProvider');
21
- //# sourceMappingURL=remote-wsl-connection-provider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remote-wsl-connection-provider.js","sourceRoot":"","sources":["../../src/electron-common/remote-wsl-connection-provider.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAkBnE,QAAA,+BAA+B,GAAG,aAAa,CAAC;AAEhD,QAAA,2BAA2B,GAAG,MAAM,CAAC,6BAA6B,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const WSL_WORKSPACE_SCHEME = "wsl";
2
- //# sourceMappingURL=wsl-workspaces.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wsl-workspaces.d.ts","sourceRoot":"","sources":["../../src/electron-common/wsl-workspaces.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,oBAAoB,QAAQ,CAAC"}
@@ -1,20 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2025 TypeFox and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.WSL_WORKSPACE_SCHEME = void 0;
19
- exports.WSL_WORKSPACE_SCHEME = 'wsl';
20
- //# sourceMappingURL=wsl-workspaces.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wsl-workspaces.js","sourceRoot":"","sources":["../../src/electron-common/wsl-workspaces.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAEnE,QAAA,oBAAoB,GAAG,KAAK,CAAC"}
@@ -1,5 +0,0 @@
1
- import { ContainerModule } from '@theia/core/shared/inversify';
2
- export declare const wslRemoteConnectionModule: ContainerModule;
3
- declare const _default: ContainerModule;
4
- export default _default;
5
- //# sourceMappingURL=remote-wsl-backend-module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remote-wsl-backend-module.d.ts","sourceRoot":"","sources":["../../src/electron-node/remote-wsl-backend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAQ/D,eAAO,MAAM,yBAAyB,iBAQpC,CAAC;;AAEH,wBAMG"}
@@ -1,39 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2025 TypeFox and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.wslRemoteConnectionModule = void 0;
19
- const inversify_1 = require("@theia/core/shared/inversify");
20
- const remote_wsl_connection_provider_1 = require("./remote-wsl-connection-provider");
21
- const remote_wsl_connection_provider_2 = require("../electron-common/remote-wsl-connection-provider");
22
- const connection_container_module_1 = require("@theia/core/lib/node/messaging/connection-container-module");
23
- const core_1 = require("@theia/core");
24
- const wsl_workspace_handler_1 = require("./wsl-workspace-handler");
25
- const default_workspace_server_1 = require("@theia/workspace/lib/node/default-workspace-server");
26
- exports.wslRemoteConnectionModule = connection_container_module_1.ConnectionContainerModule.create(({ bind, bindBackendService }) => {
27
- bind(remote_wsl_connection_provider_1.RemoteWslConnectionProviderImpl).toSelf().inSingletonScope();
28
- bind(remote_wsl_connection_provider_2.RemoteWslConnectionProvider).toService(remote_wsl_connection_provider_1.RemoteWslConnectionProviderImpl);
29
- bind(core_1.ConnectionHandler).toDynamicValue(ctx => new core_1.RpcConnectionHandler(remote_wsl_connection_provider_2.RemoteWslConnectionProviderPath, client => {
30
- const server = ctx.container.get(remote_wsl_connection_provider_2.RemoteWslConnectionProvider);
31
- return server;
32
- }));
33
- });
34
- exports.default = new inversify_1.ContainerModule(bind => {
35
- bind(connection_container_module_1.ConnectionContainerModule).toConstantValue(exports.wslRemoteConnectionModule);
36
- bind(wsl_workspace_handler_1.WslWorkspaceHandler).toSelf().inSingletonScope();
37
- bind(default_workspace_server_1.WorkspaceHandlerContribution).toService(wsl_workspace_handler_1.WslWorkspaceHandler);
38
- });
39
- //# sourceMappingURL=remote-wsl-backend-module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remote-wsl-backend-module.js","sourceRoot":"","sources":["../../src/electron-node/remote-wsl-backend-module.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAEhF,4DAA+D;AAC/D,qFAAmF;AACnF,sGAAiI;AACjI,4GAAuG;AACvG,sCAAsE;AACtE,mEAA8D;AAC9D,iGAAkG;AAErF,QAAA,yBAAyB,GAAG,uDAAyB,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,EAAE,EAAE;IACvG,IAAI,CAAC,gEAA+B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAClE,IAAI,CAAC,4DAA2B,CAAC,CAAC,SAAS,CAAC,gEAA+B,CAAC,CAAC;IAC7E,IAAI,CAAC,wBAAiB,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CACzC,IAAI,2BAAoB,CAA8B,gEAA+B,EAAE,MAAM,CAAC,EAAE;QAC5F,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,CAAC,GAAG,CAA8B,4DAA2B,CAAC,CAAC;QAC3F,OAAO,MAAM,CAAC;IAClB,CAAC,CAAC,CAAC,CAAC;AACZ,CAAC,CAAC,CAAC;AAEH,kBAAe,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACtC,IAAI,CAAC,uDAAyB,CAAC,CAAC,eAAe,CAAC,iCAAyB,CAAC,CAAC;IAE3E,IAAI,CAAC,2CAAmB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACtD,IAAI,CAAC,uDAA4B,CAAC,CAAC,SAAS,CAAC,2CAAmB,CAAC,CAAC;AAEtE,CAAC,CAAC,CAAC"}
@@ -1,25 +0,0 @@
1
- import { RemoteWslConnectionProvider, WslDistribution, WslConnectionOptions, WslConnectionResult } from '../electron-common/remote-wsl-connection-provider';
2
- import { RemoteConnectionService } from '@theia/remote/lib/electron-node/remote-connection-service';
3
- import { RemoteSetupService } from '@theia/remote/lib/electron-node/setup/remote-setup-service';
4
- import { MessageService } from '@theia/core';
5
- export declare class RemoteWslConnectionProviderImpl implements RemoteWslConnectionProvider {
6
- protected readonly remoteConnectionService: RemoteConnectionService;
7
- protected readonly remoteSetup: RemoteSetupService;
8
- protected readonly messageService: MessageService;
9
- dispose(): void;
10
- /**
11
- * executes `wsl.exe --list` to get the list of WSL distributions.
12
- * The Output format look like this:
13
- * ```
14
- * NAME STATE VERSION
15
- * * Ubuntu Stopped 2
16
- * Other Distro Stopped 2
17
- * ```
18
- * so we split the output by lines and then by whitespace. The * indicates the default distribution so this has to be handled slightly different.
19
- *
20
- * @returns a list of WslDistribution objects, each containing the name, default status, and version.
21
- */
22
- getWslDistributions(): Promise<WslDistribution[]>;
23
- connectToWsl(options: WslConnectionOptions): Promise<WslConnectionResult>;
24
- }
25
- //# sourceMappingURL=remote-wsl-connection-provider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remote-wsl-connection-provider.d.ts","sourceRoot":"","sources":["../../src/electron-node/remote-wsl-connection-provider.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,2BAA2B,EAAE,eAAe,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AAC5J,OAAO,EAAE,uBAAuB,EAAE,MAAM,2DAA2D,CAAC;AACpG,OAAO,EAAE,kBAAkB,EAAE,MAAM,4DAA4D,CAAC;AAEhG,OAAO,EAAE,cAAc,EAAgB,MAAM,aAAa,CAAC;AAG3D,qBACa,+BAAgC,YAAW,2BAA2B;IAG/E,SAAS,CAAC,QAAQ,CAAC,uBAAuB,EAAE,uBAAuB,CAAC;IAGpE,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,kBAAkB,CAAC;IAGnD,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAElD,OAAO,IAAI,IAAI;IAGf;;;;;;;;;;;OAWG;IACG,mBAAmB,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;IAgCjD,YAAY,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAsClF"}
@@ -1,121 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2025 TypeFox and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.RemoteWslConnectionProviderImpl = void 0;
19
- const tslib_1 = require("tslib");
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- const remote_connection_service_1 = require("@theia/remote/lib/electron-node/remote-connection-service");
22
- const remote_setup_service_1 = require("@theia/remote/lib/electron-node/setup/remote-setup-service");
23
- const child_process_1 = require("child_process");
24
- const core_1 = require("@theia/core");
25
- const remote_wsl_connection_1 = require("./remote-wsl-connection");
26
- let RemoteWslConnectionProviderImpl = class RemoteWslConnectionProviderImpl {
27
- dispose() {
28
- }
29
- /**
30
- * executes `wsl.exe --list` to get the list of WSL distributions.
31
- * The Output format look like this:
32
- * ```
33
- * NAME STATE VERSION
34
- * * Ubuntu Stopped 2
35
- * Other Distro Stopped 2
36
- * ```
37
- * so we split the output by lines and then by whitespace. The * indicates the default distribution so this has to be handled slightly different.
38
- *
39
- * @returns a list of WslDistribution objects, each containing the name, default status, and version.
40
- */
41
- async getWslDistributions() {
42
- return new Promise((resolve, reject) => {
43
- (0, child_process_1.exec)('wsl.exe --list --verbose --all', (error, stdout, stderr) => {
44
- if (error) {
45
- const errorMessage = `Error executing wsl.exe: ${error} \n ${stderr}`;
46
- console.error(errorMessage);
47
- reject(errorMessage);
48
- return;
49
- }
50
- const lines = stdout
51
- .replace(/\0/g, '')
52
- .split('\n')
53
- .map(line => line.replace('\r', '').trim())
54
- .filter(line => line.length > 0)
55
- .slice(1); // Skip header line
56
- resolve(lines.map(line => {
57
- const parts = line.split(/\s+/);
58
- const isDefault = parts[0] === '*';
59
- const name = isDefault ? parts[1] : parts[0];
60
- const version = isDefault ? parts[3] : parts[2];
61
- return {
62
- name,
63
- default: isDefault,
64
- version
65
- };
66
- }));
67
- });
68
- });
69
- }
70
- async connectToWsl(options) {
71
- const progress = await this.messageService.showProgress({
72
- text: 'Connecting to WSL'
73
- });
74
- try {
75
- const connection = new remote_wsl_connection_1.RemoteWslConnection({
76
- id: (0, core_1.generateUuid)(),
77
- name: options.distribution,
78
- type: 'WSL',
79
- distribution: options.distribution,
80
- });
81
- const report = message => progress.report({ message });
82
- report('Setting up remote environment...');
83
- await this.remoteSetup.setup({
84
- connection,
85
- report,
86
- nodeDownloadTemplate: options.nodeDownloadTemplate
87
- });
88
- const registration = this.remoteConnectionService.register(connection);
89
- connection.onDidDisconnect(() => {
90
- registration.dispose();
91
- });
92
- return {
93
- port: connection.remotePort,
94
- };
95
- }
96
- catch (e) {
97
- this.messageService.error(`Failed to connect to WSL: ${e.message}`);
98
- throw e;
99
- }
100
- finally {
101
- progress.cancel();
102
- }
103
- }
104
- };
105
- exports.RemoteWslConnectionProviderImpl = RemoteWslConnectionProviderImpl;
106
- tslib_1.__decorate([
107
- (0, inversify_1.inject)(remote_connection_service_1.RemoteConnectionService),
108
- tslib_1.__metadata("design:type", remote_connection_service_1.RemoteConnectionService)
109
- ], RemoteWslConnectionProviderImpl.prototype, "remoteConnectionService", void 0);
110
- tslib_1.__decorate([
111
- (0, inversify_1.inject)(remote_setup_service_1.RemoteSetupService),
112
- tslib_1.__metadata("design:type", remote_setup_service_1.RemoteSetupService)
113
- ], RemoteWslConnectionProviderImpl.prototype, "remoteSetup", void 0);
114
- tslib_1.__decorate([
115
- (0, inversify_1.inject)(core_1.MessageService),
116
- tslib_1.__metadata("design:type", core_1.MessageService)
117
- ], RemoteWslConnectionProviderImpl.prototype, "messageService", void 0);
118
- exports.RemoteWslConnectionProviderImpl = RemoteWslConnectionProviderImpl = tslib_1.__decorate([
119
- (0, inversify_1.injectable)()
120
- ], RemoteWslConnectionProviderImpl);
121
- //# sourceMappingURL=remote-wsl-connection-provider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remote-wsl-connection-provider.js","sourceRoot":"","sources":["../../src/electron-node/remote-wsl-connection-provider.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,4DAAkE;AAElE,yGAAoG;AACpG,qGAAgG;AAChG,iDAAqC;AACrC,sCAA2D;AAC3D,mEAA8D;AAGvD,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;IAWxC,OAAO;I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MAAM,EAAE,CAAC;QACtB,CAAC;IACL,CAAC;CACJ,CAAA;AAhGY,0EAA+B;AAGrB;IADlB,IAAA,kBAAM,EAAC,mDAAuB,CAAC;sCACY,mDAAuB;gFAAC;AAGjD;IADlB,IAAA,kBAAM,EAAC,yCAAkB,CAAC;sCACK,yCAAkB;oEAAC;AAGhC;IADlB,IAAA,kBAAM,EAAC,qBAAc,CAAC;sCACY,qBAAc;uEAAC;0CATzC,+BAA+B;IAD3C,IAAA,sBAAU,GAAE;GACA,+BAA+B,CAgG3C"}
@@ -1,31 +0,0 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- /// <reference types="node" />
4
- /// <reference types="node" />
5
- import { Emitter, Event } from '@theia/core';
6
- import { RemoteConnection, RemoteExecOptions, RemoteExecResult, RemoteExecTester } from '@theia/remote/lib/electron-node/remote-types';
7
- import { Socket } from 'net';
8
- export interface RemoteWslConnectionOptions {
9
- id: string;
10
- name: string;
11
- type: string;
12
- distribution: string;
13
- }
14
- export declare class RemoteWslConnection implements RemoteConnection {
15
- id: string;
16
- name: string;
17
- type: string;
18
- remotePort: number;
19
- distribution: string;
20
- get localPort(): number;
21
- protected readonly onDidDisconnectEmitter: Emitter<void>;
22
- onDidDisconnect: Event<void>;
23
- constructor(options: RemoteWslConnectionOptions);
24
- forwardOut(socket: Socket, port: number): Promise<void>;
25
- exec(cmd: string, args?: string[], options?: RemoteExecOptions): Promise<RemoteExecResult>;
26
- execPartial(cmd: string, tester: RemoteExecTester, args?: string[], options?: RemoteExecOptions): Promise<RemoteExecResult>;
27
- copy(localPath: string | Buffer | NodeJS.ReadableStream, remotePath: string): Promise<void>;
28
- dispose(): void;
29
- disposeSync(): void;
30
- }
31
- //# sourceMappingURL=remote-wsl-connection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remote-wsl-connection.d.ts","sourceRoot":"","sources":["../../src/electron-node/remote-wsl-connection.ts"],"names":[],"mappings":";;;;AAgBA,OAAO,EAAE,OAAO,E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AW,IAAI,IAAI;CAGtB"}
@@ -1,138 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2025 TypeFox and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.RemoteWslConnection = void 0;
19
- const core_1 = require("@theia/core");
20
- const net_1 = require("net");
21
- const child_process_1 = require("child_process");
22
- const promise_util_1 = require("@theia/core/lib/common/promise-util");
23
- const fs = require("fs");
24
- class RemoteWslConnection {
25
- get localPort() {
26
- return this.remotePort;
27
- }
28
- constructor(options) {
29
- this.onDidDisconnectEmitter = new core_1.Emitter();
30
- this.onDidDisconnect = this.onDidDisconnectEmitter.event;
31
- this.id = options.id;
32
- this.name = options.name;
33
- this.type = options.type;
34
- this.distribution = options.distribution;
35
- }
36
- async forwardOut(socket, port) {
37
- new net_1.Socket().connect(port, 'localhost', () => {
38
- socket.pipe(new net_1.Socket().connect(port, 'localhost'));
39
- });
40
- }
41
- async exec(cmd, args, options) {
42
- var _a;
43
- const deferred = new promise_util_1.Deferred();
44
- const fullCommand = `wsl -d ${this.distribution} ${cmd} ${(_a = args === null || args === void 0 ? void 0 : args.join(' ')) !== null && _a !== void 0 ? _a : ''}`;
45
- try {
46
- (0, child_process_1.exec)(fullCommand, { env: options === null || options === void 0 ? void 0 : options.env }, (error, stdout, stderr) => {
47
- deferred.resolve({ stdout, stderr });
48
- });
49
- }
50
- catch (e) {
51
- deferred.reject(e);
52
- }
53
- return deferred.promise;
54
- }
55
- async execPartial(cmd, tester, args, options) {
56
- var _a;
57
- const deferred = new promise_util_1.Deferred();
58
- try {
59
- let cdPath = undefined;
60
- if (cmd.startsWith('cd') && cmd.includes(';')) {
61
- const parts = cmd.split(';');
62
- cdPath = parts[0].replace('cd', '').trim();
63
- cmd = parts[1];
64
- }
65
- const fullCommand = `wsl -d ${this.distribution} ${cdPath ? `--cd ${cdPath} ${cmd}` : cmd} ${(_a = args === null || args === void 0 ? void 0 : args.join(' ')) !== null && _a !== void 0 ? _a : ''}`;
66
- const process = (0, child_process_1.spawn)(fullCommand, { env: options === null || options === void 0 ? void 0 : options.env, shell: 'powershell' });
67
- let stdoutBuffer = '';
68
- let stderrBuffer = '';
69
- process.stdout.on('data', (data) => {
70
- if (deferred.state === 'unresolved') {
71
- stdoutBuffer += data.toString();
72
- if (tester(stdoutBuffer, stderrBuffer)) {
73
- deferred.resolve({ stdout: stdoutBuffer, stderr: stderrBuffer });
74
- }
75
- }
76
- });
77
- process.stderr.on('data', (data) => {
78
- if (deferred.state === 'unresolved') {
79
- stderrBuffer += data.toString();
80
- if (tester(stdoutBuffer, stderrBuffer)) {
81
- deferred.resolve({ stdout: stdoutBuffer, stderr: stderrBuffer });
82
- }
83
- }
84
- });
85
- process.on('close', () => {
86
- if (deferred.state === 'unresolved') {
87
- deferred.resolve({ stdout: stdoutBuffer, stderr: stderrBuffer });
88
- }
89
- });
90
- process.on('error', error => {
91
- deferred.reject(error);
92
- });
93
- }
94
- catch (e) {
95
- deferred.reject(e);
96
- }
97
- return deferred.promise;
98
- }
99
- async copy(localPath, remotePath) {
100
- const deferred = new promise_util_1.Deferred();
101
- const wslPath = `\\\\wsl$\\${this.distribution}\\${remotePath}`;
102
- if (typeof localPath === 'string') {
103
- (0, child_process_1.exec)(`copy "${localPath}" "${wslPath}"`, error => {
104
- if (error) {
105
- deferred.reject(error);
106
- }
107
- else {
108
- deferred.resolve();
109
- }
110
- });
111
- }
112
- else if (Buffer.isBuffer(localPath)) {
113
- fs.writeFile(wslPath, localPath, (error) => {
114
- if (error) {
115
- deferred.reject(error);
116
- }
117
- else {
118
- deferred.resolve();
119
- }
120
- });
121
- }
122
- else {
123
- const writeStream = fs.createWriteStream(wslPath);
124
- localPath.pipe(writeStream);
125
- writeStream.on('finish', () => deferred.resolve());
126
- writeStream.on('error', (error) => deferred.reject(error));
127
- }
128
- return deferred.promise;
129
- }
130
- dispose() {
131
- this.onDidDisconnectEmitter.dispose();
132
- }
133
- disposeSync() {
134
- // No special cleanup needed for WSL
135
- }
136
- }
137
- exports.RemoteWslConnection = RemoteWslConnection;
138
- //# sourceMappingURL=remote-wsl-connection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remote-wsl-connection.js","sourceRoot":"","sources":["../../src/electron-node/remote-wsl-connection.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAEhF,sCAA6C;AAE7C,6BAA6B;AAC7B,iDAA4C;AAC5C,sEAA+D;AAC/D,yBAAyB;AASzB,MAAa,mBAAmB;IAO5B,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAKD,YAAY,OAAmC;QAH5B,2BAAsB,GAAG,IAAI,cAAO,EAAQ,CAAC;QAChE,oBAAe,GAAgB,IAAI,CAAC,sBAAsB,CAAC,KAAK,CAAC;QAG7D,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,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qBAAM,CAAC;oBACJ,QAAQ,CAAC,OAAO,EAAE,CAAC;gBACvB,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;aAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;YACpC,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,KAAY,EAAE,EAAE;gBAC9C,IAAI,KAAK,EAAE,CAAC;oBACR,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBAC3B,CAAC;qBAAM,CAAC;oBACJ,QAAQ,CAAC,OAAO,EAAE,CAAC;gBACvB,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;aAAM,CAAC;YACJ,MAAM,WAAW,GAAG,EAAE,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;YAClD,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC5B,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;YACnD,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAY,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACtE,CAAC;QAED,OAAO,QAAQ,CAAC,OAAO,CAAC;IAC5B,CAAC;IAED,OAAO;QACH,IAAI,CAAC,sBAAsB,CAAC,OAAO,EAAE,CAAC;IAC1C,CAAC;IAED,WAAW;QACP,oCAAoC;IACxC,CAAC;CACJ;AAlID,kDAkIC"}
@@ -1,8 +0,0 @@
1
- import { URI } from '@theia/core';
2
- import { WorkspaceHandlerContribution } from '@theia/workspace/lib/node/default-workspace-server';
3
- export declare class WslWorkspaceHandler implements WorkspaceHandlerContribution {
4
- canHandle(uri: URI): boolean;
5
- workspaceStillExists(uri: URI): Promise<boolean>;
6
- private toWindowsPath;
7
- }
8
- //# sourceMappingURL=wsl-workspace-handler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wsl-workspace-handler.d.ts","sourceRoot":"","sources":["../../src/electron-node/wsl-workspace-handler.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC,OAAO,EAAE,4BAA4B,EAAE,MAAM,oDAAoD,CAAC;AAElG,qBAAa,mBAAoB,YAAW,4BAA4B;IACpE,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO;IAG5B,oBAAoB,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC;IAIhD,OAAO,CAAC,aAAa;CAUxB"}
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WslWorkspaceHandler = void 0;
4
- const fs = require("@theia/core/shared/fs-extra");
5
- class WslWorkspaceHandler {
6
- canHandle(uri) {
7
- return uri.scheme === 'wsl';
8
- }
9
- workspaceStillExists(uri) {
10
- return fs.pathExists(this.toWindowsPath(uri.path.toString()));
11
- }
12
- toWindowsPath(path) {
13
- const match = path.match(/^\/mnt\/([a-z])\/(.*)/i);
14
- if (match) {
15
- const driveLetter = match[1].toUpperCase();
16
- const windowsPath = match[2].replace(/\//g, '\\');
17
- return `${driveLetter}:\\${windowsPath}`;
18
- }
19
- return path;
20
- }
21
- }
22
- exports.WslWorkspaceHandler = WslWorkspaceHandler;
23
- //# sourceMappingURL=wsl-workspace-handler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wsl-workspace-handler.js","sourceRoot":"","sources":["../../src/electron-node/wsl-workspace-handler.ts"],"names":[],"mappings":";;;AAgBA,kDAAkD;AAGlD,MAAa,mBAAmB;IAC5B,SAAS,CAAC,GAAQ;QACd,OAAO,GAAG,CAAC,MAAM,KAAK,KAAK,CAAC;IAChC,CAAC;IACD,oBAAoB,CAAC,GAAQ;QACzB,OAAO,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IAEO,aAAa,CAAC,IAAY;QAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QACnD,IAAI,KAAK,EAAE,CAAC;YACR,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;YAC3C,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YAClD,OAAO,GAAG,WAAW,MAAM,WAAW,EAAE,CAAC;QAC7C,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;CAEJ;AAlBD,kDAkBC"}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=package.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"package.spec.d.ts","sourceRoot":"","sources":["../src/package.spec.ts"],"names":[],"mappings":""}
@@ -1,26 +0,0 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2023 TypeFox and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
- /* note: this bogus test file is required so that
17
- we are able to run mocha unit tests on this
18
- package, without having any actual unit tests in it.
19
- This way a coverage report will be generated,
20
- showing 0% coverage, instead of no report.
21
- This file can be removed once we have real unit
22
- tests in place. */
23
- describe('remote-wsl package', () => {
24
- it('support code coverage statistics', () => true);
25
- });
26
- //# sourceMappingURL=package.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"package.spec.js","sourceRoot":"","sources":["../src/package.spec.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAEhF;;;;;;qBAMqB;AAErB,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAEhC,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;AAEvD,CAAC,CAAC,CAAC"}