@codingame/monaco-vscode-extensions-service-override 4.5.1 → 4.5.2

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 (48) hide show
  1. package/package.json +3 -3
  2. package/vscode/src/vs/base/common/console.js +1 -1
  3. package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +67 -134
  4. package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +1 -1
  5. package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +32 -37
  6. package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +1 -1
  7. package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +12 -11
  8. package/vscode/src/vs/workbench/api/browser/mainThreadChat.js +2 -2
  9. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +5 -3
  10. package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +1 -1
  11. package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +1 -1
  12. package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +44 -38
  13. package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +60 -66
  14. package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +2 -2
  15. package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +6 -6
  16. package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +10 -9
  17. package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +1 -1
  18. package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +1 -1
  19. package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +1 -1
  20. package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +41 -50
  21. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +1 -1
  22. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +53 -100
  23. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +4 -4
  24. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +21 -29
  25. package/vscode/src/vs/workbench/api/browser/mainThreadLogService.js +2 -2
  26. package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +47 -56
  27. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +3 -1
  28. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +5 -5
  29. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +7 -10
  30. package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +11 -12
  31. package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +8 -11
  32. package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +3 -3
  33. package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +179 -162
  34. package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +1 -1
  35. package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +28 -30
  36. package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +23 -23
  37. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +3 -3
  38. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.js +3 -3
  39. package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +19 -18
  40. package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +36 -33
  41. package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.js +2 -2
  42. package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +56 -121
  43. package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +1 -1
  44. package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +5 -5
  45. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +130 -142
  46. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +33 -32
  47. package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +9 -8
  48. package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +1 -1
@@ -18,6 +18,7 @@ import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/service
18
18
  import { IExtensionManagementServerService } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.service';
19
19
  import { IExtensionManifestPropertiesService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionManifestPropertiesService.service';
20
20
 
21
+ const _moduleId = "vs/workbench/api/browser/mainThreadCLICommands";
21
22
  CommandsRegistry.registerCommand('_remoteCLI.openExternal', function (accessor, uri) {
22
23
  const openerService = accessor.get(IOpenerService);
23
24
  return openerService.open(isString(uri) ? uri : URI.revive(uri), { openExternal: true, allowTunneling: true });
@@ -46,12 +47,12 @@ CommandsRegistry.registerCommand('_remoteCLI.manageExtensions', async function (
46
47
  lines.push(message);
47
48
  }
48
49
  })();
49
- const cliService = instantiationService.createChild(( new ServiceCollection([IExtensionManagementService, remoteExtensionManagementService]))).createInstance(RemoteExtensionManagementCLI, logger);
50
+ const cliService = instantiationService.createChild(( (new ServiceCollection([IExtensionManagementService, remoteExtensionManagementService])))).createInstance(RemoteExtensionManagementCLI, logger);
50
51
  if (args.list) {
51
52
  await cliService.listExtensions(!!args.list.showVersions, args.list.category, undefined);
52
53
  }
53
54
  else {
54
- const revive = (inputs) => ( inputs.map(input => isString(input) ? input : URI.revive(input)));
55
+ const revive = (inputs) => ( (inputs.map(input => isString(input) ? input : URI.revive(input))));
55
56
  if (Array.isArray(args.install) && args.install.length) {
56
57
  try {
57
58
  await cliService.installExtensions(revive(args.install), [], { isMachineScoped: true }, !!args.force);
@@ -85,8 +86,8 @@ let RemoteExtensionManagementCLI = class RemoteExtensionManagementCLI extends Ex
85
86
  if (!this._extensionManifestPropertiesService.canExecuteOnWorkspace(manifest)
86
87
  && !(isWeb && this._extensionManifestPropertiesService.canExecuteOnWeb(manifest))) {
87
88
  this.logger.info(( localizeWithPath(
88
- 'vs/workbench/api/browser/mainThreadCLICommands',
89
- 'cannot be installed',
89
+ _moduleId,
90
+ 0,
90
91
  "Cannot install the '{0}' extension because it is declared to not run in this setup.",
91
92
  getExtensionId(manifest.publisher, manifest.name)
92
93
  )));
@@ -95,10 +96,10 @@ let RemoteExtensionManagementCLI = class RemoteExtensionManagementCLI extends Ex
95
96
  return true;
96
97
  }
97
98
  };
98
- RemoteExtensionManagementCLI = ( __decorate([
99
- ( __param(1, IExtensionManagementService)),
100
- ( __param(2, IExtensionGalleryService)),
101
- ( __param(3, ILabelService)),
102
- ( __param(4, IWorkbenchEnvironmentService)),
103
- ( __param(5, IExtensionManifestPropertiesService))
104
- ], RemoteExtensionManagementCLI));
99
+ RemoteExtensionManagementCLI = ( (__decorate([
100
+ ( (__param(1, IExtensionManagementService))),
101
+ ( (__param(2, IExtensionGalleryService))),
102
+ ( (__param(3, ILabelService))),
103
+ ( (__param(4, IWorkbenchEnvironmentService))),
104
+ ( (__param(5, IExtensionManifestPropertiesService)))
105
+ ], RemoteExtensionManagementCLI)));
@@ -21,7 +21,7 @@ let MainThreadChat = class MainThreadChat extends Disposable {
21
21
  $transferChatSession(sessionId, toWorkspace) {
22
22
  const sessionIdStr = this._chatService.getSessionId(sessionId);
23
23
  if (!sessionIdStr) {
24
- throw new Error(`Failed to transfer session. Unknown session provider ID: ${sessionId}`);
24
+ throw ( new Error(`Failed to transfer session. Unknown session provider ID: ${sessionId}`));
25
25
  }
26
26
  const widget = this._chatWidgetService.getWidgetBySessionId(sessionIdStr);
27
27
  const inputValue = widget?.inputEditor.getValue() ?? '';
@@ -30,7 +30,7 @@ let MainThreadChat = class MainThreadChat extends Disposable {
30
30
  async $registerChatProvider(handle, id) {
31
31
  const registration = this.chatContribService.registeredProviders.find(staticProvider => staticProvider.id === id);
32
32
  if (!registration) {
33
- throw new Error(`Provider ${id} must be declared in the package.json.`);
33
+ throw ( new Error(`Provider ${id} must be declared in the package.json.`));
34
34
  }
35
35
  const unreg = this._chatService.registerProvider({
36
36
  id,
@@ -55,9 +55,11 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
55
55
  const staticAgentRegistration = this._chatAgentService.getAgent(id);
56
56
  if (!staticAgentRegistration && !dynamicProps) {
57
57
  if (this._chatAgentService.getAgentsByName(id).length) {
58
- throw new Error(`chatParticipant must be declared with an ID in package.json. The "id" property may be missing! "${id}"`);
58
+ throw ( new Error(
59
+ `chatParticipant must be declared with an ID in package.json. The "id" property may be missing! "${id}"`
60
+ ));
59
61
  }
60
- throw new Error(`chatParticipant must be declared in package.json: ${id}`);
62
+ throw ( new Error(`chatParticipant must be declared in package.json: ${id}`));
61
63
  }
62
64
  const impl = {
63
65
  invoke: async (request, progress, history, token) => {
@@ -107,7 +109,7 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
107
109
  $updateAgent(handle, metadataUpdate) {
108
110
  const data = this._agents.get(handle);
109
111
  if (!data) {
110
- throw new Error(`No agent with handle ${handle} registered`);
112
+ throw ( new Error(`No agent with handle ${handle} registered`));
111
113
  }
112
114
  data.hasFollowups = metadataUpdate.hasFollowups;
113
115
  this._chatAgentService.updateAgent(data.id, revive(metadataUpdate));
@@ -94,7 +94,7 @@ let MainThreadEditorInsets = class MainThreadEditorInsets {
94
94
  getInset(handle) {
95
95
  const inset = this._insets.get(handle);
96
96
  if (!inset) {
97
- throw new Error('Unknown inset');
97
+ throw ( new Error('Unknown inset'));
98
98
  }
99
99
  return inset;
100
100
  }
@@ -60,7 +60,7 @@ let MainThreadCommands = class MainThreadCommands {
60
60
  }
61
61
  if (retry && args.length > 0 && !CommandsRegistry.getCommand(id)) {
62
62
  await this._extensionService.activateByEvent(`onCommand:${id}`);
63
- throw new Error('$executeCommand:retry');
63
+ throw ( new Error('$executeCommand:retry'));
64
64
  }
65
65
  return this._commandService.executeCommand(id, ...args);
66
66
  }
@@ -19,6 +19,7 @@ import { localizeWithPath } from 'vscode/vscode/vs/nls';
19
19
  import { Schemas } from 'vscode/vscode/vs/base/common/network';
20
20
  import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService.service';
21
21
 
22
+ const _moduleId = "vs/workbench/api/browser/mainThreadComments";
22
23
  class MainThreadCommentThread {
23
24
  get input() {
24
25
  return this._input;
@@ -113,20 +114,20 @@ class MainThreadCommentThread {
113
114
  this._range = _range;
114
115
  this._canReply = _canReply;
115
116
  this._isTemplate = _isTemplate;
116
- this._onDidChangeInput = ( new Emitter());
117
- this._onDidChangeLabel = ( new Emitter());
117
+ this._onDidChangeInput = ( (new Emitter()));
118
+ this._onDidChangeLabel = ( (new Emitter()));
118
119
  this.onDidChangeLabel = this._onDidChangeLabel.event;
119
- this._onDidChangeComments = ( new Emitter());
120
- this._onDidChangeCanReply = ( new Emitter());
121
- this._onDidChangeRange = ( new Emitter());
120
+ this._onDidChangeComments = ( (new Emitter()));
121
+ this._onDidChangeCanReply = ( (new Emitter()));
122
+ this._onDidChangeRange = ( (new Emitter()));
122
123
  this.onDidChangeRange = this._onDidChangeRange.event;
123
- this._onDidChangeCollapsibleState = ( new Emitter());
124
+ this._onDidChangeCollapsibleState = ( (new Emitter()));
124
125
  this.onDidChangeCollapsibleState = this._onDidChangeCollapsibleState.event;
125
- this._onDidChangeInitialCollapsibleState = ( new Emitter());
126
+ this._onDidChangeInitialCollapsibleState = ( (new Emitter()));
126
127
  this.onDidChangeInitialCollapsibleState = this._onDidChangeInitialCollapsibleState.event;
127
- this._onDidChangeApplicability = ( new Emitter());
128
+ this._onDidChangeApplicability = ( (new Emitter()));
128
129
  this.onDidChangeApplicability = this._onDidChangeApplicability.event;
129
- this._onDidChangeState = ( new Emitter());
130
+ this._onDidChangeState = ( (new Emitter()));
130
131
  this.onDidChangeState = this._onDidChangeState.event;
131
132
  this._isDisposed = false;
132
133
  if (_isTemplate) {
@@ -219,7 +220,7 @@ class MainThreadCommentController {
219
220
  this._id = _id;
220
221
  this._label = _label;
221
222
  this._features = _features;
222
- this._threads = ( new Map());
223
+ this._threads = ( (new Map()));
223
224
  }
224
225
  async setActiveCommentAndThread(commentInfo) {
225
226
  return this._proxy.$setActiveComment(this._handle, commentInfo ? { commentThreadHandle: commentInfo.thread.commentThreadHandle, uniqueIdInThread: commentInfo.comment?.uniqueIdInThread } : undefined);
@@ -228,7 +229,16 @@ class MainThreadCommentController {
228
229
  this._features = features;
229
230
  }
230
231
  createCommentThread(extensionId, commentThreadHandle, threadId, resource, range, isTemplate) {
231
- const thread = ( new MainThreadCommentThread(commentThreadHandle, this.handle, extensionId, threadId, ( URI.revive(resource).toString()), range, true, isTemplate));
232
+ const thread = ( (new MainThreadCommentThread(
233
+ commentThreadHandle,
234
+ this.handle,
235
+ extensionId,
236
+ threadId,
237
+ (URI.revive(resource).toString()),
238
+ range,
239
+ true,
240
+ isTemplate
241
+ )));
232
242
  this._threads.set(commentThreadHandle, thread);
233
243
  if (thread.isDocumentCommentThread()) {
234
244
  this._commentService.updateComments(this._uniqueId, {
@@ -310,7 +320,7 @@ class MainThreadCommentController {
310
320
  getKnownThread(commentThreadHandle) {
311
321
  const thread = this._threads.get(commentThreadHandle);
312
322
  if (!thread) {
313
- throw new Error('unknown thread');
323
+ throw ( (new Error('unknown thread')));
314
324
  }
315
325
  return thread;
316
326
  }
@@ -328,9 +338,9 @@ class MainThreadCommentController {
328
338
  };
329
339
  }
330
340
  const ret = [];
331
- for (const thread of [...( this._threads.keys())]) {
341
+ for (const thread of [...( (this._threads.keys()))]) {
332
342
  const commentThread = this._threads.get(thread);
333
- if (commentThread.resource === ( resource.toString())) {
343
+ if (commentThread.resource === ( (resource.toString()))) {
334
344
  ret.push(commentThread);
335
345
  }
336
346
  }
@@ -355,9 +365,9 @@ class MainThreadCommentController {
355
365
  };
356
366
  }
357
367
  const ret = [];
358
- for (const thread of [...( this._threads.keys())]) {
368
+ for (const thread of [...( (this._threads.keys()))]) {
359
369
  const commentThread = this._threads.get(thread);
360
- if (commentThread.resource === ( resource.toString())) {
370
+ if (commentThread.resource === ( (resource.toString()))) {
361
371
  ret.push(commentThread);
362
372
  }
363
373
  }
@@ -372,7 +382,7 @@ class MainThreadCommentController {
372
382
  }
373
383
  getAllComments() {
374
384
  const ret = [];
375
- for (const thread of [...( this._threads.keys())]) {
385
+ for (const thread of [...( (this._threads.keys()))]) {
376
386
  ret.push(this._threads.get(thread));
377
387
  }
378
388
  return ret;
@@ -390,22 +400,18 @@ class MainThreadCommentController {
390
400
  };
391
401
  }
392
402
  }
393
- const commentsViewIcon = registerIcon('comments-view-icon', Codicon.commentDiscussion, ( localizeWithPath(
394
- 'vs/workbench/api/browser/mainThreadComments',
395
- 'commentsViewIcon',
396
- 'View icon of the comments view.'
397
- )));
403
+ const commentsViewIcon = registerIcon('comments-view-icon', Codicon.commentDiscussion, ( localizeWithPath(_moduleId, 0, 'View icon of the comments view.')));
398
404
  let MainThreadComments = class MainThreadComments extends Disposable {
399
405
  constructor(extHostContext, _commentService, _viewsService, _viewDescriptorService) {
400
406
  super();
401
407
  this._commentService = _commentService;
402
408
  this._viewsService = _viewsService;
403
409
  this._viewDescriptorService = _viewDescriptorService;
404
- this._handlers = ( new Map());
405
- this._commentControllers = ( new Map());
406
- this._activeEditingCommentThreadDisposables = this._register(( new DisposableStore()));
410
+ this._handlers = ( (new Map()));
411
+ this._commentControllers = ( (new Map()));
412
+ this._activeEditingCommentThreadDisposables = this._register(( (new DisposableStore())));
407
413
  this._openViewListener = null;
408
- this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostComments));
414
+ this._proxy = ( (extHostContext.getProxy(ExtHostContext.ExtHostComments)));
409
415
  this._commentService.unregisterCommentController();
410
416
  this._register(this._commentService.onDidChangeActiveEditingCommentThread(async (thread) => {
411
417
  const handle = thread.controllerHandle;
@@ -421,7 +427,7 @@ let MainThreadComments = class MainThreadComments extends Disposable {
421
427
  $registerCommentController(handle, id, label, extensionId) {
422
428
  const providerId = `${id}-${extensionId}`;
423
429
  this._handlers.set(handle, providerId);
424
- const provider = ( new MainThreadCommentController(this._proxy, this._commentService, handle, providerId, id, label, {}));
430
+ const provider = ( (new MainThreadCommentController(this._proxy, this._commentService, handle, providerId, id, label, {})));
425
431
  this._commentService.registerCommentController(providerId, provider);
426
432
  this._commentControllers.set(handle, provider);
427
433
  const commentsPanelAlreadyConstructed = !!this._viewDescriptorService.getViewDescriptorById(COMMENTS_VIEW_ID);
@@ -479,23 +485,23 @@ let MainThreadComments = class MainThreadComments extends Disposable {
479
485
  }
480
486
  registerView(commentsViewAlreadyRegistered) {
481
487
  if (!commentsViewAlreadyRegistered) {
482
- const VIEW_CONTAINER = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
488
+ const VIEW_CONTAINER = ( (Registry.as(Extensions.ViewContainersRegistry))).registerViewContainer({
483
489
  id: COMMENTS_VIEW_ID,
484
490
  title: COMMENTS_VIEW_TITLE,
485
- ctorDescriptor: ( new SyncDescriptor(
491
+ ctorDescriptor: ( (new SyncDescriptor(
486
492
  ViewPaneContainer,
487
493
  [COMMENTS_VIEW_ID, { mergeViewWithContainerWhenSingleView: true }]
488
- )),
494
+ ))),
489
495
  storageId: COMMENTS_VIEW_STORAGE_ID,
490
496
  hideIfEmpty: true,
491
497
  icon: commentsViewIcon,
492
498
  order: 10,
493
499
  }, 1 );
494
- ( Registry.as(Extensions.ViewsRegistry)).registerViews([{
500
+ ( (Registry.as(Extensions.ViewsRegistry))).registerViews([{
495
501
  id: COMMENTS_VIEW_ID,
496
502
  name: COMMENTS_VIEW_TITLE,
497
503
  canToggleVisibility: false,
498
- ctorDescriptor: ( new SyncDescriptor(CommentsPanel)),
504
+ ctorDescriptor: ( (new SyncDescriptor(CommentsPanel))),
499
505
  canMoveView: true,
500
506
  containerIcon: commentsViewIcon,
501
507
  focusCommand: {
@@ -505,7 +511,7 @@ let MainThreadComments = class MainThreadComments extends Disposable {
505
511
  }
506
512
  }
507
513
  setComments() {
508
- [...( this._commentControllers.keys())].forEach(handle => {
514
+ [...( (this._commentControllers.keys()))].forEach(handle => {
509
515
  const threads = this._commentControllers.get(handle).getAllComments();
510
516
  if (threads.length) {
511
517
  const providerId = this.getHandler(handle);
@@ -545,17 +551,17 @@ let MainThreadComments = class MainThreadComments extends Disposable {
545
551
  }));
546
552
  }
547
553
  getHandler(handle) {
548
- if (!( this._handlers.has(handle))) {
549
- throw new Error('Unknown handler');
554
+ if (!( (this._handlers.has(handle)))) {
555
+ throw ( (new Error('Unknown handler')));
550
556
  }
551
557
  return this._handlers.get(handle);
552
558
  }
553
559
  };
554
560
  MainThreadComments = __decorate([
555
561
  extHostNamedCustomer(MainContext.MainThreadComments),
556
- ( __param(1, ICommentService)),
557
- ( __param(2, IViewsService)),
558
- ( __param(3, IViewDescriptorService))
562
+ ( (__param(1, ICommentService))),
563
+ ( (__param(2, IViewsService))),
564
+ ( (__param(3, IViewDescriptorService)))
559
565
  ], MainThreadComments);
560
566
 
561
567
  export { MainThreadCommentController, MainThreadCommentThread, MainThreadComments };
@@ -36,6 +36,7 @@ import { IWorkingCopyFileService } from 'vscode/vscode/vs/workbench/services/wor
36
36
  import { IWorkingCopyService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyService.service';
37
37
 
38
38
  var MainThreadCustomEditorModel_1;
39
+ const _moduleId = "vs/workbench/api/browser/mainThreadCustomEditors";
39
40
  let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
40
41
  constructor(context, mainThreadWebview, mainThreadWebviewPanels, extensionService, storageService, workingCopyService, workingCopyFileService, _customEditorService, _editorGroupService, _editorService, _instantiationService, _webviewWorkbenchService) {
41
42
  super();
@@ -46,10 +47,10 @@ let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
46
47
  this._editorService = _editorService;
47
48
  this._instantiationService = _instantiationService;
48
49
  this._webviewWorkbenchService = _webviewWorkbenchService;
49
- this._editorProviders = this._register(( new DisposableMap()));
50
- this._editorRenameBackups = ( new Map());
51
- this._webviewOriginStore = ( new ExtensionKeyedWebviewOriginStore('mainThreadCustomEditors.origins', storageService));
52
- this._proxyCustomEditors = ( context.getProxy(ExtHostContext.ExtHostCustomEditors));
50
+ this._editorProviders = this._register(( (new DisposableMap())));
51
+ this._editorRenameBackups = ( (new Map()));
52
+ this._webviewOriginStore = ( (new ExtensionKeyedWebviewOriginStore('mainThreadCustomEditors.origins', storageService)));
53
+ this._proxyCustomEditors = ( (context.getProxy(ExtHostContext.ExtHostCustomEditors)));
53
54
  this._register(workingCopyFileService.registerWorkingCopyProvider((editorResource) => {
54
55
  const matchedWorkingCopies = [];
55
56
  for (const workingCopy of workingCopyService.workingCopies) {
@@ -68,7 +69,7 @@ let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
68
69
  }
69
70
  return false;
70
71
  },
71
- resolveWebview: () => { throw new Error('not implemented'); }
72
+ resolveWebview: () => { throw ( (new Error('not implemented'))); }
72
73
  }));
73
74
  this._register(workingCopyFileService.onWillRunWorkingCopyFileOperation(async (e) => this.onWillRunWorkingCopyFileOperation(e)));
74
75
  }
@@ -79,10 +80,10 @@ let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
79
80
  this.registerEditorProvider(0 , reviveWebviewExtension(extensionData), viewType, options, {}, supportsMultipleEditorsPerDocument, serializeBuffersForPostMessage);
80
81
  }
81
82
  registerEditorProvider(modelType, extension, viewType, options, capabilities, supportsMultipleEditorsPerDocument, serializeBuffersForPostMessage) {
82
- if (( this._editorProviders.has(viewType))) {
83
- throw new Error(`Provider for ${viewType} already registered`);
83
+ if (( (this._editorProviders.has(viewType)))) {
84
+ throw ( (new Error(`Provider for ${viewType} already registered`)));
84
85
  }
85
- const disposables = ( new DisposableStore());
86
+ const disposables = ( (new DisposableStore()));
86
87
  disposables.add(this._customEditorService.registerCustomEditorCapabilities(viewType, {
87
88
  supportsMultipleEditorsPerDocument
88
89
  }));
@@ -99,9 +100,9 @@ let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
99
100
  webviewInput.webview.extension = extension;
100
101
  let backupId = webviewInput.backupId;
101
102
  if (webviewInput.oldResource && !webviewInput.backupId) {
102
- const backup = this._editorRenameBackups.get(( webviewInput.oldResource.toString()));
103
+ const backup = this._editorRenameBackups.get(( (webviewInput.oldResource.toString())));
103
104
  backupId = backup?.backupId;
104
- this._editorRenameBackups.delete(( webviewInput.oldResource.toString()));
105
+ this._editorRenameBackups.delete(( (webviewInput.oldResource.toString())));
105
106
  }
106
107
  let modelRef;
107
108
  try {
@@ -155,8 +156,8 @@ let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
155
156
  this._editorProviders.set(viewType, disposables);
156
157
  }
157
158
  $unregisterEditorProvider(viewType) {
158
- if (!( this._editorProviders.has(viewType))) {
159
- throw new Error(`No provider for ${viewType} registered`);
159
+ if (!( (this._editorProviders.has(viewType)))) {
160
+ throw ( (new Error(`No provider for ${viewType} registered`)));
160
161
  }
161
162
  this._editorProviders.deleteAndDispose(viewType);
162
163
  this._customEditorService.models.disposeAllModelsForView(viewType);
@@ -194,7 +195,7 @@ let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
194
195
  const resource = URI.revive(resourceComponents);
195
196
  const model = await this._customEditorService.models.get(resource, viewType);
196
197
  if (!model || !(model instanceof MainThreadCustomEditorModel)) {
197
- throw new Error('Could not find model for webview editor');
198
+ throw ( (new Error('Could not find model for webview editor')));
198
199
  }
199
200
  return model;
200
201
  }
@@ -213,33 +214,33 @@ let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
213
214
  if (model instanceof MainThreadCustomEditorModel && model.isDirty()) {
214
215
  const workingCopy = await model.backup(CancellationToken.None);
215
216
  if (workingCopy.meta) {
216
- this._editorRenameBackups.set(( model.editorResource.toString()), workingCopy.meta);
217
+ this._editorRenameBackups.set(( (model.editorResource.toString())), workingCopy.meta);
217
218
  }
218
219
  }
219
220
  }
220
221
  })());
221
222
  }
222
223
  };
223
- MainThreadCustomEditors = ( __decorate([
224
- ( __param(3, IExtensionService)),
225
- ( __param(4, IStorageService)),
226
- ( __param(5, IWorkingCopyService)),
227
- ( __param(6, IWorkingCopyFileService)),
228
- ( __param(7, ICustomEditorService)),
229
- ( __param(8, IEditorGroupsService)),
230
- ( __param(9, IEditorService)),
231
- ( __param(10, IInstantiationService)),
232
- ( __param(11, IWebviewWorkbenchService))
233
- ], MainThreadCustomEditors));
224
+ MainThreadCustomEditors = ( (__decorate([
225
+ ( (__param(3, IExtensionService))),
226
+ ( (__param(4, IStorageService))),
227
+ ( (__param(5, IWorkingCopyService))),
228
+ ( (__param(6, IWorkingCopyFileService))),
229
+ ( (__param(7, ICustomEditorService))),
230
+ ( (__param(8, IEditorGroupsService))),
231
+ ( (__param(9, IEditorService))),
232
+ ( (__param(10, IInstantiationService))),
233
+ ( (__param(11, IWebviewWorkbenchService)))
234
+ ], MainThreadCustomEditors)));
234
235
  var HotExitState;
235
- ( (function(HotExitState) {
236
- ( (function(Type) {
236
+ ( ((function(HotExitState) {
237
+ ( ((function(Type) {
237
238
  Type[Type["Allowed"] = 0] = "Allowed";
238
239
  Type[Type["NotAllowed"] = 1] = "NotAllowed";
239
240
  Type[Type["Pending"] = 2] = "Pending";
240
- })(HotExitState.Type || (HotExitState.Type = {})));
241
- HotExitState.Allowed = ( Object.freeze({ type: 0 }));
242
- HotExitState.NotAllowed = ( Object.freeze({ type: 1 }));
241
+ })(HotExitState.Type || (HotExitState.Type = {}))));
242
+ HotExitState.Allowed = ( (Object.freeze({ type: 0 })));
243
+ HotExitState.NotAllowed = ( (Object.freeze({ type: 1 })));
243
244
  class Pending {
244
245
  constructor(operation) {
245
246
  this.operation = operation;
@@ -247,7 +248,7 @@ var HotExitState;
247
248
  }
248
249
  }
249
250
  HotExitState.Pending = Pending;
250
- })(HotExitState || (HotExitState = {})));
251
+ })(HotExitState || (HotExitState = {}))));
251
252
  let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThreadCustomEditorModel extends ResourceWorkingCopy {
252
253
  static async create(instantiationService, proxy, viewType, resource, options, getEditors, cancellation) {
253
254
  const editors = getEditors();
@@ -277,11 +278,11 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
277
278
  this._edits = [];
278
279
  this._isDirtyFromContentChange = false;
279
280
  this.typeId = NO_TYPE_ID;
280
- this._onDidChangeDirty = this._register(( new Emitter()));
281
+ this._onDidChangeDirty = this._register(( (new Emitter())));
281
282
  this.onDidChangeDirty = this._onDidChangeDirty.event;
282
- this._onDidChangeContent = this._register(( new Emitter()));
283
+ this._onDidChangeContent = this._register(( (new Emitter())));
283
284
  this.onDidChangeContent = this._onDidChangeContent.event;
284
- this._onDidSave = this._register(( new Emitter()));
285
+ this._onDidSave = this._register(( (new Emitter())));
285
286
  this.onDidSave = this._onDidSave.event;
286
287
  this.onDidChangeReadonly = Event.None;
287
288
  this._fromBackup = fromBackup;
@@ -297,12 +298,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
297
298
  return true;
298
299
  }
299
300
  return false;
300
- })(), ( localizeWithPath(
301
- 'vs/workbench/api/browser/mainThreadCustomEditors',
302
- 'vetoExtHostRestart',
303
- "Custom editor '{0}' could not be saved.",
304
- this.name
305
- )));
301
+ })(), ( localizeWithPath(_moduleId, 0, "Custom editor '{0}' could not be saved.", this.name)));
306
302
  }));
307
303
  }
308
304
  if (startDirty) {
@@ -321,13 +317,15 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
321
317
  }
322
318
  static toWorkingCopyResource(viewType, resource) {
323
319
  const authority = viewType.replace(/[^a-z0-9\-_]/gi, '-');
324
- const path = `/${multibyteAwareBtoa(( resource.with({ query: null, fragment: null }).toString(true)))}`;
325
- return ( URI.from({
326
- scheme: Schemas.vscodeCustomEditor,
327
- authority: authority,
328
- path: path,
329
- query: JSON.stringify(resource.toJSON()),
330
- }));
320
+ const path = `/${multibyteAwareBtoa(( (resource.with({ query: null, fragment: null }).toString(true))))}`;
321
+ return (
322
+ (URI.from({
323
+ scheme: Schemas.vscodeCustomEditor,
324
+ authority: authority,
325
+ path: path,
326
+ query: JSON.stringify(resource.toJSON()),
327
+ }))
328
+ );
331
329
  }
332
330
  get name() {
333
331
  return basename(this._labelService.getUriLabel(this._editorResource));
@@ -358,7 +356,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
358
356
  }
359
357
  pushEdit(editId, label) {
360
358
  if (!this._editable) {
361
- throw new Error('Document is not editable');
359
+ throw ( (new Error('Document is not editable')));
362
360
  }
363
361
  this.change(() => {
364
362
  this.spliceEdits(editId);
@@ -367,11 +365,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
367
365
  this._undoService.pushElement({
368
366
  type: 0 ,
369
367
  resource: this._editorResource,
370
- label: label ?? ( localizeWithPath(
371
- 'vs/workbench/api/browser/mainThreadCustomEditors',
372
- 'defaultEditLabel',
373
- "Edit"
374
- )),
368
+ label: label ?? ( localizeWithPath(_moduleId, 1, "Edit")),
375
369
  code: 'undoredo.customEditorEdit',
376
370
  undo: () => this.undo(),
377
371
  redo: () => this.redo(),
@@ -484,7 +478,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
484
478
  }
485
479
  suggestUntitledSavePath(options) {
486
480
  if (!this.isUntitled()) {
487
- throw new Error('Resource is not untitled');
481
+ throw ( (new Error('Resource is not untitled')));
488
482
  }
489
483
  const remoteAuthority = this._environmentService.remoteAuthority;
490
484
  const localResource = toLocalResource(this._editorResource, remoteAuthority, this._pathService.defaultUriScheme);
@@ -507,7 +501,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
507
501
  async backup(token) {
508
502
  const editors = this._getEditors();
509
503
  if (!editors.length) {
510
- throw new Error('No editors found for resource, cannot back up');
504
+ throw ( (new Error('No editors found for resource, cannot back up')));
511
505
  }
512
506
  const primaryEditor = editors[0];
513
507
  const backupMeta = {
@@ -561,18 +555,18 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
561
555
  if (this._hotExitState === HotExitState.Allowed) {
562
556
  return backupData;
563
557
  }
564
- throw new Error(`Cannot backup in this state: ${errorMessage}`);
558
+ throw ( (new Error(`Cannot backup in this state: ${errorMessage}`)));
565
559
  }
566
560
  };
567
- MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = ( __decorate([
568
- ( __param(7, IFileDialogService)),
569
- ( __param(8, IFileService)),
570
- ( __param(9, ILabelService)),
571
- ( __param(10, IUndoRedoService)),
572
- ( __param(11, IWorkbenchEnvironmentService)),
573
- ( __param(12, IWorkingCopyService)),
574
- ( __param(13, IPathService)),
575
- ( __param(14, IExtensionService))
576
- ], MainThreadCustomEditorModel));
561
+ MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = ( (__decorate([
562
+ ( (__param(7, IFileDialogService))),
563
+ ( (__param(8, IFileService))),
564
+ ( (__param(9, ILabelService))),
565
+ ( (__param(10, IUndoRedoService))),
566
+ ( (__param(11, IWorkbenchEnvironmentService))),
567
+ ( (__param(12, IWorkingCopyService))),
568
+ ( (__param(13, IPathService))),
569
+ ( (__param(14, IExtensionService)))
570
+ ], MainThreadCustomEditorModel)));
577
571
 
578
572
  export { MainThreadCustomEditors };
@@ -274,7 +274,7 @@ let MainThreadDebugService = class MainThreadDebugService {
274
274
  return this.debugService.startDebugging(launch, nameOrConfig, debugOptions, saveBeforeStart);
275
275
  }
276
276
  catch (err) {
277
- throw new ErrorNoTelemetry(err && err.message ? err.message : 'cannot start debugging');
277
+ throw ( new ErrorNoTelemetry(err && err.message ? err.message : 'cannot start debugging'));
278
278
  }
279
279
  }
280
280
  $setDebugSessionName(sessionId, name) {
@@ -330,7 +330,7 @@ let MainThreadDebugService = class MainThreadDebugService {
330
330
  getDebugAdapter(handle) {
331
331
  const adapter = this._debugAdapters.get(handle);
332
332
  if (!adapter) {
333
- throw new Error('Invalid debug adapter');
333
+ throw ( new Error('Invalid debug adapter'));
334
334
  }
335
335
  return adapter;
336
336
  }
@@ -172,7 +172,7 @@ let MainThreadDocuments = class MainThreadDocuments extends Disposable {
172
172
  async $tryOpenDocument(uriData) {
173
173
  const inputUri = URI.revive(uriData);
174
174
  if (!inputUri.scheme || !(inputUri.fsPath || inputUri.authority)) {
175
- throw new ErrorNoTelemetry(`Invalid uri. Scheme and authority or path must be set.`);
175
+ throw ( new ErrorNoTelemetry(`Invalid uri. Scheme and authority or path must be set.`));
176
176
  }
177
177
  const canonicalUri = this._uriIdentityService.asCanonicalUri(inputUri);
178
178
  let promise;
@@ -190,16 +190,16 @@ let MainThreadDocuments = class MainThreadDocuments extends Disposable {
190
190
  documentUri = await promise;
191
191
  }
192
192
  catch (err) {
193
- throw new ErrorNoTelemetry(`cannot open ${canonicalUri.toString()}. Detail: ${toErrorMessage(err)}`);
193
+ throw ( new ErrorNoTelemetry(`cannot open ${( canonicalUri.toString())}. Detail: ${toErrorMessage(err)}`));
194
194
  }
195
195
  if (!documentUri) {
196
- throw new ErrorNoTelemetry(`cannot open ${canonicalUri.toString()}`);
196
+ throw ( new ErrorNoTelemetry(`cannot open ${( canonicalUri.toString())}`));
197
197
  }
198
198
  else if (!extUri.isEqual(documentUri, canonicalUri)) {
199
- throw new ErrorNoTelemetry(`cannot open ${canonicalUri.toString()}. Detail: Actual document opened as ${documentUri.toString()}`);
199
+ throw ( new ErrorNoTelemetry(`cannot open ${( canonicalUri.toString())}. Detail: Actual document opened as ${( documentUri.toString())}`));
200
200
  }
201
201
  else if (!( this._modelTrackers.has(canonicalUri))) {
202
- throw new ErrorNoTelemetry(`cannot open ${canonicalUri.toString()}. Detail: Files above 50MB cannot be synchronized with extensions.`);
202
+ throw ( new ErrorNoTelemetry(`cannot open ${( canonicalUri.toString())}. Detail: Files above 50MB cannot be synchronized with extensions.`));
203
203
  }
204
204
  else {
205
205
  return canonicalUri;
@@ -231,7 +231,7 @@ let MainThreadDocuments = class MainThreadDocuments extends Disposable {
231
231
  const ref = await this._textModelResolverService.createModelReference(resource);
232
232
  if (!( this._modelTrackers.has(resource))) {
233
233
  ref.dispose();
234
- throw new Error(`expected URI ${resource.toString()} to have come to LIFE`);
234
+ throw ( new Error(`expected URI ${( resource.toString())} to have come to LIFE`));
235
235
  }
236
236
  this._modelReferenceCollection.add(resource, ref, ref.object.textEditorModel.getValueLength());
237
237
  Event.once(model.onDidRevert)(() => this._modelReferenceCollection.remove(resource));