Skip to content

Commit e8906f0

Browse files
committed
add IEnv service to standalone services
1 parent 6d45c36 commit e8906f0

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

src/vs/editor/standalone/browser/standaloneServices.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ import { AudioCue, IAudioCueService, Sound } from 'vs/platform/audioCues/browser
9191
import { LogService } from 'vs/platform/log/common/logService';
9292
import { getEditorFeatures } from 'vs/editor/common/editorFeatures';
9393
import { onUnexpectedError } from 'vs/base/common/errors';
94+
import { ExtensionKind, IEnvironmentService, IExtensionHostDebugParams } from 'vs/platform/environment/common/environment';
9495

9596
class SimpleModel implements IResolvedTextEditorModel {
9697

@@ -201,6 +202,39 @@ class StandaloneProgressService implements IProgressService {
201202
}
202203
}
203204

205+
class StandaloneEnvironmentService implements IEnvironmentService {
206+
207+
declare readonly _serviceBrand: undefined;
208+
209+
readonly stateResource: URI = URI.from({ scheme: 'monaco', authority: 'stateResource' });
210+
readonly userRoamingDataHome: URI = URI.from({ scheme: 'monaco', authority: 'userRoamingDataHome' });
211+
readonly keyboardLayoutResource: URI = URI.from({ scheme: 'monaco', authority: 'keyboardLayoutResource' });
212+
readonly argvResource: URI = URI.from({ scheme: 'monaco', authority: 'argvResource' });
213+
readonly untitledWorkspacesHome: URI = URI.from({ scheme: 'monaco', authority: 'untitledWorkspacesHome' });
214+
readonly workspaceStorageHome: URI = URI.from({ scheme: 'monaco', authority: 'workspaceStorageHome' });
215+
readonly localHistoryHome: URI = URI.from({ scheme: 'monaco', authority: 'localHistoryHome' });
216+
readonly cacheHome: URI = URI.from({ scheme: 'monaco', authority: 'cacheHome' });
217+
readonly userDataSyncHome: URI = URI.from({ scheme: 'monaco', authority: 'userDataSyncHome' });
218+
readonly sync: 'on' | 'off' | undefined = undefined;
219+
readonly continueOn?: string | undefined = undefined;
220+
readonly editSessionId?: string | undefined = undefined;
221+
readonly debugExtensionHost: IExtensionHostDebugParams = { port: null, break: false };
222+
readonly isExtensionDevelopment: boolean = false;
223+
readonly disableExtensions: boolean | string[] = false;
224+
readonly enableExtensions?: readonly string[] | undefined = undefined;
225+
readonly extensionDevelopmentLocationURI?: URI[] | undefined = undefined;
226+
readonly extensionDevelopmentKind?: ExtensionKind[] | undefined = undefined;
227+
readonly extensionTestsLocationURI?: URI | undefined = undefined;
228+
readonly logsHome: URI = URI.from({ scheme: 'monaco', authority: 'logsHome' });
229+
readonly logLevel?: string | undefined = undefined;
230+
readonly extensionLogLevel?: [string, string][] | undefined = undefined;
231+
readonly verbose: boolean = false;
232+
readonly isBuilt: boolean = false;
233+
readonly disableTelemetry: boolean = false;
234+
readonly serviceMachineIdResource: URI = URI.from({ scheme: 'monaco', authority: 'serviceMachineIdResource' });
235+
readonly policyFile?: URI | undefined = undefined;
236+
}
237+
204238
class StandaloneDialogService implements IDialogService {
205239

206240
_serviceBrand: undefined;
@@ -1029,6 +1063,7 @@ registerSingleton(IWorkspaceContextService, StandaloneWorkspaceContextService, I
10291063
registerSingleton(ILabelService, StandaloneUriLabelService, InstantiationType.Eager);
10301064
registerSingleton(ITelemetryService, StandaloneTelemetryService, InstantiationType.Eager);
10311065
registerSingleton(IDialogService, StandaloneDialogService, InstantiationType.Eager);
1066+
registerSingleton(IEnvironmentService, StandaloneEnvironmentService, InstantiationType.Eager);
10321067
registerSingleton(INotificationService, StandaloneNotificationService, InstantiationType.Eager);
10331068
registerSingleton(IMarkerService, MarkerService, InstantiationType.Eager);
10341069
registerSingleton(ILanguageService, StandaloneLanguageService, InstantiationType.Eager);

0 commit comments

Comments
 (0)