@codingame/monaco-vscode-api 36.2.6 → 36.2.7
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-api",
|
|
3
|
-
"version": "36.2.
|
|
3
|
+
"version": "36.2.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-base-service-override": "36.2.
|
|
19
|
-
"@codingame/monaco-vscode-environment-service-override": "36.2.
|
|
20
|
-
"@codingame/monaco-vscode-extensions-service-override": "36.2.
|
|
21
|
-
"@codingame/monaco-vscode-files-service-override": "36.2.
|
|
22
|
-
"@codingame/monaco-vscode-host-service-override": "36.2.
|
|
23
|
-
"@codingame/monaco-vscode-layout-service-override": "36.2.
|
|
24
|
-
"@codingame/monaco-vscode-quickaccess-service-override": "36.2.
|
|
18
|
+
"@codingame/monaco-vscode-base-service-override": "36.2.7",
|
|
19
|
+
"@codingame/monaco-vscode-environment-service-override": "36.2.7",
|
|
20
|
+
"@codingame/monaco-vscode-extensions-service-override": "36.2.7",
|
|
21
|
+
"@codingame/monaco-vscode-files-service-override": "36.2.7",
|
|
22
|
+
"@codingame/monaco-vscode-host-service-override": "36.2.7",
|
|
23
|
+
"@codingame/monaco-vscode-layout-service-override": "36.2.7",
|
|
24
|
+
"@codingame/monaco-vscode-quickaccess-service-override": "36.2.7",
|
|
25
25
|
"@vscode/diff": "0.0.2-7",
|
|
26
26
|
"@vscode/iconv-lite-umd": "0.7.1",
|
|
27
27
|
"dompurify": "3.4.14",
|
package/services.js
CHANGED
|
@@ -458,10 +458,10 @@ export { IAgentHostCustomizationService } from './vscode/src/vs/workbench/contri
|
|
|
458
458
|
export { IAgentHostActiveClientService } from './vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.service.js';
|
|
459
459
|
export { IAgentEditorCommentsBridge } from './vscode/src/vs/workbench/services/agentEditorComments/common/agentEditorComments.service.js';
|
|
460
460
|
|
|
461
|
-
if (window.monacoVscodeApiBuildId != null && window.monacoVscodeApiBuildId !== "1.128.1-
|
|
462
|
-
throw new Error(`Another version of monaco-vscode-api has already been loaded. Trying to load ${"1.128.1-
|
|
461
|
+
if (window.monacoVscodeApiBuildId != null && window.monacoVscodeApiBuildId !== "1.128.1-427d70a2-3dc2-4ddb-9347-ea6b73dad61a") {
|
|
462
|
+
throw new Error(`Another version of monaco-vscode-api has already been loaded. Trying to load ${"1.128.1-427d70a2-3dc2-4ddb-9347-ea6b73dad61a"}, ${window.monacoVscodeApiBuildId} is already loaded`);
|
|
463
463
|
}
|
|
464
|
-
window.monacoVscodeApiBuildId = "1.128.1-
|
|
464
|
+
window.monacoVscodeApiBuildId = "1.128.1-427d70a2-3dc2-4ddb-9347-ea6b73dad61a";
|
|
465
465
|
function registerCommands(options) {
|
|
466
466
|
function asMenuId(menu) {
|
|
467
467
|
switch (menu) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { URI } from "../common/uri.js";
|
|
1
2
|
export declare class IframeUtils {
|
|
2
3
|
/**
|
|
3
4
|
* Returns a chain of embedded windows with the same origin (which can be accessed programmatically).
|
|
@@ -16,3 +17,7 @@ export declare class IframeUtils {
|
|
|
16
17
|
* Returns a sha-256 composed of `parentOrigin` and `salt` converted to base 32
|
|
17
18
|
*/
|
|
18
19
|
export declare function parentOriginHash(parentOrigin: string, salt: string): Promise<string>;
|
|
20
|
+
/**
|
|
21
|
+
* Replaces a URI authority placeholder without exceeding the DNS label length limit.
|
|
22
|
+
*/
|
|
23
|
+
export declare function replaceUriAuthorityPlaceholder(uri: URI, placeholder: string, replacement: string): URI;
|
|
@@ -91,5 +91,21 @@ function sha256AsBase32(bytes) {
|
|
|
91
91
|
const hexArray = ( array.map(b => ( b.toString(16)).padStart(2, "0"))).join("");
|
|
92
92
|
return ( BigInt(`0x${hexArray}`).toString(32)).padStart(52, "0");
|
|
93
93
|
}
|
|
94
|
+
function replaceUriAuthorityPlaceholder(uri, placeholder, replacement) {
|
|
95
|
+
const placeholderIndex = uri.authority.indexOf(placeholder);
|
|
96
|
+
if (placeholderIndex === -1) {
|
|
97
|
+
return uri;
|
|
98
|
+
}
|
|
99
|
+
const labelStart = uri.authority.lastIndexOf(".", placeholderIndex) + 1;
|
|
100
|
+
const labelEnd = uri.authority.indexOf(".", placeholderIndex + placeholder.length);
|
|
101
|
+
const labelLength = (labelEnd === -1 ? uri.authority.length : labelEnd) - labelStart;
|
|
102
|
+
const replacementLength = 63 - labelLength + placeholder.length;
|
|
103
|
+
if (replacementLength < 0) {
|
|
104
|
+
throw ( new Error("URI authority label exceeds the DNS length limit"));
|
|
105
|
+
}
|
|
106
|
+
return uri.with({
|
|
107
|
+
authority: uri.authority.replace(placeholder, replacement.slice(0, replacementLength))
|
|
108
|
+
});
|
|
109
|
+
}
|
|
94
110
|
|
|
95
|
-
export { IframeUtils, parentOriginHash };
|
|
111
|
+
export { IframeUtils, parentOriginHash, replaceUriAuthorityPlaceholder };
|