@codingame/monaco-vscode-base-service-override
Advanced tools
Comparing version 6.0.3 to 7.0.0
{ | ||
"name": "@codingame/monaco-vscode-base-service-override", | ||
"version": "6.0.3", | ||
"version": "7.0.0", | ||
"keywords": [], | ||
@@ -29,4 +29,4 @@ "author": { | ||
"dependencies": { | ||
"vscode": "npm:@codingame/monaco-vscode-api@6.0.3" | ||
"vscode": "npm:@codingame/monaco-vscode-api@7.0.0" | ||
} | ||
} |
@@ -201,4 +201,5 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js'; | ||
constructor(uriIdentityService, themeService) { | ||
this._onDidChangeDecorationsDelayed = ( (new DebounceEmitter({ merge: all => all.flat() }))); | ||
this._onDidChangeDecorations = ( (new Emitter())); | ||
this._store = ( (new DisposableStore())); | ||
this._onDidChangeDecorationsDelayed = this._store.add(( (new DebounceEmitter({ merge: all => all.flat() })))); | ||
this._onDidChangeDecorations = this._store.add(( (new Emitter()))); | ||
this.onDidChangeDecorations = this._onDidChangeDecorations.event; | ||
@@ -208,7 +209,6 @@ this._provider = ( (new LinkedList())); | ||
this._data = TernarySearchTree.forUris(key => uriIdentityService.extUri.ignorePathCasing(key)); | ||
this._onDidChangeDecorationsDelayed.event(event => { this._onDidChangeDecorations.fire(( (new FileDecorationChangeEvent(event)))); }); | ||
this._store.add(this._onDidChangeDecorationsDelayed.event(event => { this._onDidChangeDecorations.fire(( (new FileDecorationChangeEvent(event)))); })); | ||
} | ||
dispose() { | ||
this._onDidChangeDecorations.dispose(); | ||
this._onDidChangeDecorationsDelayed.dispose(); | ||
this._store.dispose(); | ||
this._data.clear(); | ||
@@ -215,0 +215,0 @@ } |
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js'; | ||
import { localizeWithPath } from 'vscode/vscode/vs/nls'; | ||
import { raceCancellation } from 'vscode/vscode/vs/base/common/async'; | ||
import { CancellationTokenSource } from 'vscode/vscode/vs/base/common/cancellation'; | ||
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service'; | ||
import { ProgressLocation } from 'vscode/vscode/vs/platform/progress/common/progress'; | ||
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress.service'; | ||
import { Disposable, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle'; | ||
import { insert } from 'vscode/vscode/vs/base/common/arrays'; | ||
const _moduleId = "vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant"; | ||
let StoredFileWorkingCopySaveParticipant = class StoredFileWorkingCopySaveParticipant extends Disposable { | ||
get length() { return this.saveParticipants.length; } | ||
constructor(progressService, logService) { | ||
constructor(logService) { | ||
super(); | ||
this.progressService = progressService; | ||
this.logService = logService; | ||
@@ -24,28 +18,17 @@ this.saveParticipants = []; | ||
} | ||
participate(workingCopy, context, token) { | ||
const cts = ( (new CancellationTokenSource(token))); | ||
return this.progressService.withProgress({ | ||
title: ( localizeWithPath(_moduleId, 0, "Saving '{0}'", workingCopy.name)), | ||
location: ProgressLocation.Notification, | ||
cancellable: true, | ||
delay: workingCopy.isDirty() ? 3000 : 5000 | ||
}, async (progress) => { | ||
workingCopy.model?.pushStackElement(); | ||
for (const saveParticipant of this.saveParticipants) { | ||
if (cts.token.isCancellationRequested || workingCopy.isDisposed()) { | ||
break; | ||
} | ||
try { | ||
const promise = saveParticipant.participate(workingCopy, context, progress, cts.token); | ||
await raceCancellation(promise, cts.token); | ||
} | ||
catch (err) { | ||
this.logService.warn(err); | ||
} | ||
async participate(workingCopy, context, progress, token) { | ||
workingCopy.model?.pushStackElement(); | ||
for (const saveParticipant of this.saveParticipants) { | ||
if (token.isCancellationRequested || workingCopy.isDisposed()) { | ||
break; | ||
} | ||
workingCopy.model?.pushStackElement(); | ||
cts.dispose(); | ||
}, () => { | ||
cts.dispose(true); | ||
}); | ||
try { | ||
const promise = saveParticipant.participate(workingCopy, context, progress, token); | ||
await raceCancellation(promise, token); | ||
} | ||
catch (err) { | ||
this.logService.warn(err); | ||
} | ||
} | ||
workingCopy.model?.pushStackElement(); | ||
} | ||
@@ -57,7 +40,6 @@ dispose() { | ||
}; | ||
StoredFileWorkingCopySaveParticipant = ( (__decorate([ | ||
( (__param(0, IProgressService))), | ||
( (__param(1, ILogService))) | ||
], StoredFileWorkingCopySaveParticipant))); | ||
StoredFileWorkingCopySaveParticipant = ( __decorate([ | ||
( __param(0, ILogService)) | ||
], StoredFileWorkingCopySaveParticipant)); | ||
export { StoredFileWorkingCopySaveParticipant }; |
@@ -158,4 +158,4 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js'; | ||
} | ||
runSaveParticipants(workingCopy, context, token) { | ||
return this.saveParticipants.participate(workingCopy, context, token); | ||
runSaveParticipants(workingCopy, context, progress, token) { | ||
return this.saveParticipants.participate(workingCopy, context, progress, token); | ||
} | ||
@@ -162,0 +162,0 @@ registerWorkingCopyProvider(provider) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57527
1240
+ Added@codingame/monaco-vscode-api@7.0.0(transitive)
+ Added@codingame/monaco-vscode-environment-service-override@7.0.0(transitive)
+ Added@codingame/monaco-vscode-extensions-service-override@7.0.0(transitive)
+ Added@codingame/monaco-vscode-files-service-override@7.0.0(transitive)
+ Added@codingame/monaco-vscode-host-service-override@7.0.0(transitive)
+ Added@codingame/monaco-vscode-layout-service-override@7.0.0(transitive)
+ Added@codingame/monaco-vscode-quickaccess-service-override@7.0.0(transitive)
+ Addedjschardet@3.1.2(transitive)
- Removed@codingame/monaco-vscode-api@6.0.3(transitive)
- Removed@codingame/monaco-vscode-environment-service-override@6.0.3(transitive)
- Removed@codingame/monaco-vscode-extensions-service-override@6.0.3(transitive)
- Removed@codingame/monaco-vscode-files-service-override@6.0.3(transitive)
- Removed@codingame/monaco-vscode-host-service-override@6.0.3(transitive)
- Removed@codingame/monaco-vscode-layout-service-override@6.0.3(transitive)
- Removed@codingame/monaco-vscode-quickaccess-service-override@6.0.3(transitive)
- Removedjschardet@3.0.0(transitive)