@codingame/monaco-vscode-api 1.78.4-next.2 → 1.78.4-next.3

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 (2) hide show
  1. package/dist/polyfill.js +36 -0
  2. package/package.json +1 -1
package/dist/polyfill.js CHANGED
@@ -55049,6 +55049,42 @@ MainThreadOutputService = MainThreadOutputService_1 = __decorate([
55049
55049
  ( (__param(1, IOutputService))),
55050
55050
  ( (__param(2, IViewsService)))
55051
55051
  ], MainThreadOutputService);
55052
+ class ExtHostSaveParticipant {
55053
+ constructor(extHostContext) {
55054
+ this._proxy = ( (extHostContext.getProxy(ExtHostContext.ExtHostDocumentSaveParticipant)));
55055
+ }
55056
+ async participate(editorModel, env, _progress, token) {
55057
+ if (!editorModel.textEditorModel || !shouldSynchronizeModel(editorModel.textEditorModel)) {
55058
+ return undefined;
55059
+ }
55060
+ const p = ( (new Promise((resolve, reject) => {
55061
+ setTimeout(() => reject(( (new Error(
55062
+ (localize('timeout.onWillSave', "Aborted onWillSaveTextDocument-event after 1750ms"))
55063
+ )))), 1750);
55064
+ this._proxy.$participateInSave(editorModel.resource, env.reason).then(values => {
55065
+ if (!values.every(success => success)) {
55066
+ return Promise.reject(( (new Error('listener failed'))));
55067
+ }
55068
+ return undefined;
55069
+ }).then(resolve, reject);
55070
+ })));
55071
+ return raceCancellationError(p, token);
55072
+ }
55073
+ }
55074
+ let SaveParticipant = class SaveParticipant {
55075
+ constructor(extHostContext, instantiationService, _textFileService) {
55076
+ this._textFileService = _textFileService;
55077
+ this._saveParticipantDisposable = this._textFileService.files.addSaveParticipant(instantiationService.createInstance(ExtHostSaveParticipant, extHostContext));
55078
+ }
55079
+ dispose() {
55080
+ this._saveParticipantDisposable.dispose();
55081
+ }
55082
+ };
55083
+ SaveParticipant = __decorate([
55084
+ extHostCustomer,
55085
+ ( (__param(1, IInstantiationService))),
55086
+ ( (__param(2, ITextFileService)))
55087
+ ], SaveParticipant);
55052
55088
  const original = MainThreadMessageService.prototype.$showMessage;
55053
55089
  MainThreadMessageService.prototype.$showMessage = function (severity, message, options, commands) {
55054
55090
  const _options = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-api",
3
- "version": "1.78.4-next.2",
3
+ "version": "1.78.4-next.3",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor",
6
6
  "keywords": [],