@codingame/monaco-languageclient-wrapper 4.3.1 → 4.4.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/dist/index.d.ts +2 -0
- package/dist/index2.js +19 -1
- package/package.json +2 -2
- package/stats.html +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -9281,6 +9281,7 @@ interface Infrastructure {
|
|
|
9281
9281
|
* @param id The language server id
|
|
9282
9282
|
*/
|
|
9283
9283
|
openConnection(id: LanguageClientId): Promise<MessageTransports>;
|
|
9284
|
+
getInitializationOptions?(): LSPAny;
|
|
9284
9285
|
}
|
|
9285
9286
|
declare abstract class CodinGameInfrastructure implements Infrastructure {
|
|
9286
9287
|
/**
|
|
@@ -9320,6 +9321,7 @@ declare abstract class CodinGameInfrastructure implements Infrastructure {
|
|
|
9320
9321
|
*/
|
|
9321
9322
|
protected abstract getSecurityToken(): Promise<string>;
|
|
9322
9323
|
openConnection(id: LanguageClientId): Promise<MessageTransports>;
|
|
9324
|
+
getInitializationOptions(): LSPAny;
|
|
9323
9325
|
}
|
|
9324
9326
|
|
|
9325
9327
|
/**
|
package/dist/index2.js
CHANGED
|
@@ -5781,6 +5781,15 @@ class CodinGameInfrastructure {
|
|
|
5781
5781
|
throw new Error('Unable to connect to server');
|
|
5782
5782
|
}
|
|
5783
5783
|
}
|
|
5784
|
+
getInitializationOptions() {
|
|
5785
|
+
const files = monaco.editor.getModels().filter(model => model.uri.scheme === 'file').reduce((map, model) => {
|
|
5786
|
+
map[model.uri.toString(true)] = model.getValue();
|
|
5787
|
+
return map;
|
|
5788
|
+
}, {});
|
|
5789
|
+
return {
|
|
5790
|
+
files
|
|
5791
|
+
};
|
|
5792
|
+
}
|
|
5784
5793
|
}
|
|
5785
5794
|
async function loadExtensionConfigurations(clientOptions, useMutualizedProxy) {
|
|
5786
5795
|
const extensionConfigurationToLoad = new Set();
|
|
@@ -16452,6 +16461,15 @@ async function createLanguageClient(id, infrastructure, _ref, errorHandler, midd
|
|
|
16452
16461
|
initializationOptions,
|
|
16453
16462
|
createAdditionalFeatures
|
|
16454
16463
|
} = _ref;
|
|
16464
|
+
const allInitializationOptions = () => {
|
|
16465
|
+
var _infrastructure$getIn;
|
|
16466
|
+
const infrastructureInitOptions = (_infrastructure$getIn = infrastructure.getInitializationOptions) === null || _infrastructure$getIn === void 0 ? void 0 : _infrastructure$getIn.call(infrastructure);
|
|
16467
|
+
const languageInitOptions = typeof initializationOptions === 'function' ? initializationOptions() : initializationOptions;
|
|
16468
|
+
if (infrastructureInitOptions != null || languageInitOptions != null) {
|
|
16469
|
+
return _objectSpread2(_objectSpread2({}, infrastructureInitOptions !== null && infrastructureInitOptions !== void 0 ? infrastructureInitOptions : {}), languageInitOptions !== null && languageInitOptions !== void 0 ? languageInitOptions : {});
|
|
16470
|
+
}
|
|
16471
|
+
return undefined;
|
|
16472
|
+
};
|
|
16455
16473
|
const client = new MonacoLanguageClient({
|
|
16456
16474
|
id: "".concat(id, "-languageclient"),
|
|
16457
16475
|
name: "CodinGame ".concat(id, " Language Client"),
|
|
@@ -16460,7 +16478,7 @@ async function createLanguageClient(id, infrastructure, _ref, errorHandler, midd
|
|
|
16460
16478
|
errorHandler,
|
|
16461
16479
|
middleware,
|
|
16462
16480
|
synchronize,
|
|
16463
|
-
initializationOptions
|
|
16481
|
+
initializationOptions: allInitializationOptions
|
|
16464
16482
|
},
|
|
16465
16483
|
connectionProvider: new CGLSPConnectionProvider(id, infrastructure)
|
|
16466
16484
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-languageclient-wrapper",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Enhanced Monaco editor with TextMate grammars and more",
|
|
6
6
|
"scripts": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@babel/runtime": "7.20.13",
|
|
39
39
|
"@codingame/commitlint-config-codingame": "^1.0.5",
|
|
40
40
|
"@codingame/eslint-config": "^1.1.6",
|
|
41
|
-
"@codingame/semantic-release-
|
|
41
|
+
"@codingame/semantic-release-config": "^1.2.0",
|
|
42
42
|
"@codingame/tsconfig": "^1.1.1",
|
|
43
43
|
"@commitlint/cli": "^17.4.3",
|
|
44
44
|
"@rollup/plugin-alias": "4.0.3",
|