@codingame/monaco-vscode-model-service-override 11.1.2 → 12.0.0
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.
- package/index.d.ts +2 -1
- package/index.js +13 -1
- package/package.json +16 -7
- package/vscode/src/vs/editor/common/services/modelUndoRedoParticipant.d.ts +12 -0
- package/vscode/src/vs/editor/common/services/modelUndoRedoParticipant.js +2 -1
- package/vscode/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.d.ts +24 -0
- package/vscode/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.js +8 -5
- package/model.js +0 -11
package/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { type IEditorOverrideServices } from "vscode/vscode/vs/editor/standalone/browser/standaloneServices";
|
|
2
|
+
export default function getServiceOverride(): IEditorOverrideServices;
|
package/index.js
CHANGED
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import 'vscode/vscode/vs/editor/standalone/browser/standaloneServices';
|
|
3
|
+
import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
|
|
4
|
+
import { TextModelResolverService } from './vscode/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.js';
|
|
5
|
+
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
6
|
+
|
|
7
|
+
function getServiceOverride() {
|
|
8
|
+
return {
|
|
9
|
+
[ITextModelService.toString()]: new SyncDescriptor(TextModelResolverService, [], true)
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { getServiceOverride as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-model-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "VSCode public API plugged on the monaco editor - model service-override",
|
|
4
6
|
"keywords": [],
|
|
5
7
|
"author": {
|
|
6
8
|
"name": "CodinGame",
|
|
@@ -12,8 +14,13 @@
|
|
|
12
14
|
"url": "git+ssh://git@github.com/CodinGame/monaco-vscode-api.git"
|
|
13
15
|
},
|
|
14
16
|
"type": "module",
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@codingame/monaco-vscode-0139c6af-2375-559c-af57-b738f2fd6d8e-common": "12.0.0",
|
|
19
|
+
"@codingame/monaco-vscode-0c06bfba-d24d-5c4d-90cd-b40cefb7f811-common": "12.0.0",
|
|
20
|
+
"vscode": "npm:@codingame/monaco-vscode-api@12.0.0"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {},
|
|
23
|
+
"peerDependenciesMeta": {},
|
|
17
24
|
"main": "index.js",
|
|
18
25
|
"module": "index.js",
|
|
19
26
|
"types": "index.d.ts",
|
|
@@ -22,10 +29,12 @@
|
|
|
22
29
|
"default": "./index.js"
|
|
23
30
|
},
|
|
24
31
|
"./vscode/*": {
|
|
25
|
-
"default": "./vscode/src/*.js"
|
|
32
|
+
"default": "./vscode/src/*.js",
|
|
33
|
+
"types": "./vscode/src/*.d.ts"
|
|
34
|
+
},
|
|
35
|
+
"./*": {
|
|
36
|
+
"default": "./*.js",
|
|
37
|
+
"types": "./*.d.ts"
|
|
26
38
|
}
|
|
27
|
-
},
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@11.1.2"
|
|
30
39
|
}
|
|
31
40
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IModelService } from "vscode/vscode/vs/editor/common/services/model";
|
|
2
|
+
import { ITextModelService } from "vscode/vscode/vs/editor/common/services/resolverService";
|
|
3
|
+
import { Disposable, IDisposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
4
|
+
import { IUndoRedoService } from "vscode/vscode/vs/platform/undoRedo/common/undoRedo.service";
|
|
5
|
+
import { IUndoRedoDelegate, MultiModelEditStackElement } from "vscode/vscode/vs/editor/common/model/editStack";
|
|
6
|
+
export declare class ModelUndoRedoParticipant extends Disposable implements IUndoRedoDelegate {
|
|
7
|
+
private readonly _modelService;
|
|
8
|
+
private readonly _textModelService;
|
|
9
|
+
private readonly _undoRedoService;
|
|
10
|
+
constructor(_modelService: IModelService, _textModelService: ITextModelService, _undoRedoService: IUndoRedoService);
|
|
11
|
+
prepareUndoRedo(element: MultiModelEditStackElement): IDisposable | Promise<IDisposable>;
|
|
12
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
|
|
3
4
|
import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
|
|
4
5
|
import { Disposable, dispose } from 'vscode/vscode/vs/base/common/lifecycle';
|
package/vscode/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
2
|
+
import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
3
|
+
import { IDisposable, IReference, Disposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
4
|
+
import { IModelService } from "vscode/vscode/vs/editor/common/services/model";
|
|
5
|
+
import { ITextModelService, ITextModelContentProvider, IResolvedTextEditorModel } from "vscode/vscode/vs/editor/common/services/resolverService";
|
|
6
|
+
import { IFileService } from "vscode/vscode/vs/platform/files/common/files.service";
|
|
7
|
+
import { IUndoRedoService } from "vscode/vscode/vs/platform/undoRedo/common/undoRedo.service";
|
|
8
|
+
import { IUriIdentityService } from "vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
9
|
+
export declare class TextModelResolverService extends Disposable implements ITextModelService {
|
|
10
|
+
private readonly instantiationService;
|
|
11
|
+
private readonly fileService;
|
|
12
|
+
private readonly undoRedoService;
|
|
13
|
+
private readonly modelService;
|
|
14
|
+
private readonly uriIdentityService;
|
|
15
|
+
readonly _serviceBrand: undefined;
|
|
16
|
+
private _resourceModelCollection;
|
|
17
|
+
private get resourceModelCollection();
|
|
18
|
+
private _asyncModelCollection;
|
|
19
|
+
private get asyncModelCollection();
|
|
20
|
+
constructor(instantiationService: IInstantiationService, fileService: IFileService, undoRedoService: IUndoRedoService, modelService: IModelService, uriIdentityService: IUriIdentityService);
|
|
21
|
+
createModelReference(resource: URI): Promise<IReference<IResolvedTextEditorModel>>;
|
|
22
|
+
registerTextModelContentProvider(scheme: string, provider: ITextModelContentProvider): IDisposable;
|
|
23
|
+
canHandleResource(resource: URI): boolean;
|
|
24
|
+
}
|
package/vscode/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
3
4
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
4
5
|
import { ReferenceCollection, toDisposable, Disposable, AsyncReferenceCollection } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
6
|
import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
|
|
6
|
-
import { TextResourceEditorModel } from 'vscode/vscode/vs/workbench/common/editor/textResourceEditorModel';
|
|
7
|
+
import { TextResourceEditorModel } from '@codingame/monaco-vscode-0139c6af-2375-559c-af57-b738f2fd6d8e-common/vscode/vs/workbench/common/editor/textResourceEditorModel';
|
|
8
|
+
import { TextFileResolveReason } from 'vscode/vscode/vs/workbench/services/textfile/common/textfiles';
|
|
7
9
|
import { ITextFileService } from 'vscode/vscode/vs/workbench/services/textfile/common/textfiles.service';
|
|
8
10
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
9
11
|
import { isResolvedTextEditorModel } from 'vscode/vscode/vs/editor/common/services/resolverService';
|
|
10
|
-
import { TextFileEditorModel } from 'vscode/vscode/vs/workbench/services/textfile/common/textFileEditorModel';
|
|
12
|
+
import { TextFileEditorModel } from '@codingame/monaco-vscode-0c06bfba-d24d-5c4d-90cd-b40cefb7f811-common/vscode/vs/workbench/services/textfile/common/textFileEditorModel';
|
|
11
13
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
14
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
12
15
|
import { IUndoRedoService } from 'vscode/vscode/vs/platform/undoRedo/common/undoRedo.service';
|
|
13
16
|
import { ModelUndoRedoParticipant } from '../../../../editor/common/services/modelUndoRedoParticipant.js';
|
|
14
17
|
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
15
|
-
import { UntitledTextEditorModel } from 'vscode/vscode/vs/workbench/services/untitled/common/untitledTextEditorModel';
|
|
18
|
+
import { UntitledTextEditorModel } from '@codingame/monaco-vscode-0c06bfba-d24d-5c4d-90cd-b40cefb7f811-common/vscode/vs/workbench/services/untitled/common/untitledTextEditorModel';
|
|
16
19
|
|
|
17
20
|
let ResourceModelCollection = class ResourceModelCollection extends ReferenceCollection {
|
|
18
21
|
constructor(instantiationService, textFileService, fileService, modelService) {
|
|
@@ -47,7 +50,7 @@ let ResourceModelCollection = class ResourceModelCollection extends ReferenceCol
|
|
|
47
50
|
}
|
|
48
51
|
}
|
|
49
52
|
if (this.fileService.hasProvider(resource)) {
|
|
50
|
-
const model = await this.textFileService.files.resolve(resource, { reason:
|
|
53
|
+
const model = await this.textFileService.files.resolve(resource, { reason: TextFileResolveReason.REFERENCE });
|
|
51
54
|
if (this.ensureResolvedModel(model, key)) {
|
|
52
55
|
return model;
|
|
53
56
|
}
|
package/model.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
|
|
2
|
-
import { TextModelResolverService } from './vscode/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.js';
|
|
3
|
-
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
4
|
-
|
|
5
|
-
function getServiceOverride() {
|
|
6
|
-
return {
|
|
7
|
-
[( ITextModelService.toString())]: new SyncDescriptor(TextModelResolverService, [], true)
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export { getServiceOverride as default };
|