monaco-editor-core 0.53.0-dev-20250901 → 0.53.0-dev-20250903
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/esm/nls.messages.de.js +1 -1
- package/esm/nls.messages.es.js +1 -1
- package/esm/nls.messages.fr.js +1 -1
- package/esm/nls.messages.it.js +1 -1
- package/esm/nls.messages.ja.js +1 -1
- package/esm/nls.messages.ko.js +1 -1
- package/esm/nls.messages.ru.js +1 -1
- package/esm/nls.messages.zh-cn.js +1 -1
- package/esm/nls.messages.zh-tw.js +1 -1
- package/esm/vs/base/browser/domSanitize.js +10 -0
- package/esm/vs/base/browser/domSanitize.js.map +1 -1
- package/esm/vs/base/browser/ui/selectBox/selectBox.css +2 -1
- package/esm/vs/platform/configuration/common/configurationModels.js +11 -8
- package/esm/vs/platform/configuration/common/configurationModels.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurationRegistry.js +3 -0
- package/esm/vs/platform/configuration/common/configurationRegistry.js.map +1 -1
- package/package.json +2 -2
package/esm/nls.messages.de.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.53.0-dev-
|
|
3
|
+
* Version: 0.53.0-dev-20250903(a4d7907bd439b06b24e334bdf2ab597bcae658b5)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------*/
|
package/esm/nls.messages.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.53.0-dev-
|
|
3
|
+
* Version: 0.53.0-dev-20250903(a4d7907bd439b06b24e334bdf2ab597bcae658b5)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------*/
|
package/esm/nls.messages.fr.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.53.0-dev-
|
|
3
|
+
* Version: 0.53.0-dev-20250903(a4d7907bd439b06b24e334bdf2ab597bcae658b5)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------*/
|
package/esm/nls.messages.it.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.53.0-dev-
|
|
3
|
+
* Version: 0.53.0-dev-20250903(a4d7907bd439b06b24e334bdf2ab597bcae658b5)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------*/
|
package/esm/nls.messages.ja.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.53.0-dev-
|
|
3
|
+
* Version: 0.53.0-dev-20250903(a4d7907bd439b06b24e334bdf2ab597bcae658b5)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------*/
|
package/esm/nls.messages.ko.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.53.0-dev-
|
|
3
|
+
* Version: 0.53.0-dev-20250903(a4d7907bd439b06b24e334bdf2ab597bcae658b5)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------*/
|
package/esm/nls.messages.ru.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.53.0-dev-
|
|
3
|
+
* Version: 0.53.0-dev-20250903(a4d7907bd439b06b24e334bdf2ab597bcae658b5)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.53.0-dev-
|
|
3
|
+
* Version: 0.53.0-dev-20250903(a4d7907bd439b06b24e334bdf2ab597bcae658b5)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Version: 0.53.0-dev-
|
|
3
|
+
* Version: 0.53.0-dev-20250903(a4d7907bd439b06b24e334bdf2ab597bcae658b5)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
|
6
6
|
*-----------------------------------------------------------*/
|
|
@@ -173,6 +173,16 @@ export function sanitizeHtml(untrusted, config) {
|
|
|
173
173
|
resolvedAttributes = [...resolvedAttributes, ...config.allowedAttributes.augment];
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
+
// All attr names are lower-case in the sanitizer hooks
|
|
177
|
+
resolvedAttributes = resolvedAttributes.map((attr) => {
|
|
178
|
+
if (typeof attr === 'string') {
|
|
179
|
+
return attr.toLowerCase();
|
|
180
|
+
}
|
|
181
|
+
return {
|
|
182
|
+
attributeName: attr.attributeName.toLowerCase(),
|
|
183
|
+
shouldKeep: attr.shouldKeep,
|
|
184
|
+
};
|
|
185
|
+
});
|
|
176
186
|
const allowedAttrNames = new Set(resolvedAttributes.map(attr => typeof attr === 'string' ? attr : attr.attributeName));
|
|
177
187
|
const allowedAttrPredicates = new Map();
|
|
178
188
|
for (const attr of resolvedAttributes) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/browser/domSanitize.ts","vs/base/browser/domSanitize.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,eAAe,EAAe,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,SAAS,MAAM,0BAA0B,CAAC;AAGjD;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC;IAChD,GAAG;IACH,MAAM;IACN,GAAG;IACH,KAAK;IACL,YAAY;IACZ,IAAI;IACJ,SAAS;IACT,MAAM;IACN,MAAM;IACN,KAAK;IACL,UAAU;IACV,IAAI;IACJ,KAAK;IACL,SAAS;IACT,KAAK;IACL,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,YAAY;IACZ,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,KAAK;IACL,KAAK;IACL,KAAK;IACL,OAAO;IACP,IAAI;IACJ,MAAM;IACN,IAAI;IACJ,GAAG;IACH,KAAK;IACL,GAAG;IACH,IAAI;IACJ,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IAAI,cAAc,EAAE,CAAC;QACpB,QAAQ,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;IACtC,CAAC;IAED,OAAO,QAAQ,CAAC;AACjB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAiB,EAAE,SAAiB,EAAE,MAA2B;IACjG,IAAI,CAAC,SAAS,GAAG,YAAY,CAAC,SAAS,EAAE,MAAM,CAAQ,CAAC;AACzD,CAAC","file":"domSanitize.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { DisposableStore, IDisposable, toDisposable } from '../common/lifecycle.js';\nimport { Schemas } from '../common/network.js';\nimport dompurify from './dompurify/dompurify.js';\n\n\n/**\n * List of safe, non-input html tags.\n */\nexport const basicMarkupHtmlTags = Object.freeze([\n\t'a',\n\t'abbr',\n\t'b',\n\t'bdo',\n\t'blockquote',\n\t'br',\n\t'caption',\n\t'cite',\n\t'code',\n\t'col',\n\t'colgroup',\n\t'dd',\n\t'del',\n\t'details',\n\t'dfn',\n\t'div',\n\t'dl',\n\t'dt',\n\t'em',\n\t'figcaption',\n\t'figure',\n\t'h1',\n\t'h2',\n\t'h3',\n\t'h4',\n\t'h5',\n\t'h6',\n\t'hr',\n\t'i',\n\t'img',\n\t'ins',\n\t'kbd',\n\t'label',\n\t'li',\n\t'mark',\n\t'ol',\n\t'p',\n\t'pre',\n\t'q',\n\t'rp',\n\t'rt',\n\t'ruby',\n\t'samp',\n\t'small',\n\t'small',\n\t'source',\n\t'span',\n\t'strike',\n\t'strong',\n\t'sub',\n\t'summary',\n\t'sup',\n\t'table',\n\t'tbody',\n\t'td',\n\t'tfoot',\n\t'th',\n\t'thead',\n\t'time',\n\t'tr',\n\t'tt',\n\t'u',\n\t'ul',\n\t'var',\n\t'video',\n\t'wbr',\n]);\n\nexport const defaultAllowedAttrs = Object.freeze([\n\t'href',\n\t'target',\n\t'src',\n\t'alt',\n\t'title',\n\t'for',\n\t'name',\n\t'role',\n\t'tabindex',\n\t'x-dispatch',\n\t'required',\n\t'checked',\n\t'placeholder',\n\t'type',\n\t'start',\n\t'width',\n\t'height',\n\t'align',\n]);\n\n\ntype UponSanitizeElementCb = (currentNode: Element, data: dompurify.SanitizeElementHookEvent, config: dompurify.Config) => void;\ntype UponSanitizeAttributeCb = (currentNode: Element, data: dompurify.SanitizeAttributeHookEvent, config: dompurify.Config) => void;\n\nfunction addDompurifyHook(hook: 'uponSanitizeElement', cb: UponSanitizeElementCb): IDisposable;\nfunction addDompurifyHook(hook: 'uponSanitizeAttribute', cb: UponSanitizeAttributeCb): IDisposable;\nfunction addDompurifyHook(hook: 'uponSanitizeElement' | 'uponSanitizeAttribute', cb: any): IDisposable {\n\tdompurify.addHook(hook, cb);\n\treturn toDisposable(() => dompurify.removeHook(hook));\n}\n\n/**\n * Hooks dompurify using `afterSanitizeAttributes` to check that all `href` and `src`\n * attributes are valid.\n */\nfunction hookDomPurifyHrefAndSrcSanitizer(allowedLinkProtocols: readonly string[] | '*', allowedMediaProtocols: readonly string[]): IDisposable {\n\t// https://github.com/cure53/DOMPurify/blob/main/demos/hooks-scheme-allowlist.html\n\t// build an anchor to map URLs to\n\tconst anchor = document.createElement('a');\n\n\tfunction validateLink(value: string, allowedProtocols: readonly string[] | '*'): boolean {\n\t\tif (allowedProtocols === '*') {\n\t\t\treturn true; // allow all protocols\n\t\t}\n\n\t\tanchor.href = value;\n\t\treturn allowedProtocols.includes(anchor.protocol.replace(/:$/, ''));\n\t}\n\n\tdompurify.addHook('afterSanitizeAttributes', (node) => {\n\t\t// check all href/src attributes for validity\n\t\tfor (const attr of ['href', 'src']) {\n\t\t\tif (node.hasAttribute(attr)) {\n\t\t\t\tconst attrValue = node.getAttribute(attr) as string;\n\t\t\t\tif (attr === 'href') {\n\n\t\t\t\t\tif (!attrValue.startsWith('#') && !validateLink(attrValue, allowedLinkProtocols)) {\n\t\t\t\t\t\tnode.removeAttribute(attr);\n\t\t\t\t\t}\n\n\t\t\t\t} else {// 'src'\n\t\t\t\t\tif (!validateLink(attrValue, allowedMediaProtocols)) {\n\t\t\t\t\t\tnode.removeAttribute(attr);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\treturn toDisposable(() => dompurify.removeHook('afterSanitizeAttributes'));\n}\n\n/**\n * Predicate that checks if an attribute should be kept or removed.\n *\n * @returns A boolean indicating whether the attribute should be kept or a string with the sanitized value (which implicitly keeps the attribute)\n */\nexport type SanitizeAttributePredicate = (node: Element, data: { readonly attrName: string; readonly attrValue: string }) => boolean | string;\n\nexport interface SanitizeAttributeRule {\n\treadonly attributeName: string;\n\tshouldKeep: SanitizeAttributePredicate;\n}\n\nexport interface DomSanitizerConfig {\n\t/**\n\t * Configured the allowed html tags.\n\t */\n\treadonly allowedTags?: {\n\t\treadonly override?: readonly string[];\n\t\treadonly augment?: readonly string[];\n\t};\n\n\t/**\n\t * Configured the allowed html attributes.\n\t */\n\treadonly allowedAttributes?: {\n\t\treadonly override?: ReadonlyArray<string | SanitizeAttributeRule>;\n\t\treadonly augment?: ReadonlyArray<string | SanitizeAttributeRule>;\n\t};\n\n\t/**\n\t * List of allowed protocols for `href` attributes.\n\t */\n\treadonly allowedLinkProtocols?: {\n\t\treadonly override?: readonly string[] | '*';\n\t};\n\n\t/**\n\t * List of allowed protocols for `src` attributes.\n\t */\n\treadonly allowedMediaProtocols?: {\n\t\treadonly override?: readonly string[];\n\t};\n\n\t/**\n\t * If set, replaces unsupported tags with their plaintext representation instead of removing them.\n\t *\n\t * For example, <p><bad>\"text\"</bad></p> becomes <p>\"<bad>text</bad>\"</p>.\n\t */\n\treadonly replaceWithPlaintext?: boolean;\n}\n\nconst defaultDomPurifyConfig = Object.freeze({\n\tALLOWED_TAGS: [...basicMarkupHtmlTags],\n\tALLOWED_ATTR: [...defaultAllowedAttrs],\n\tRETURN_DOM: false,\n\tRETURN_DOM_FRAGMENT: false,\n\tRETURN_TRUSTED_TYPE: true,\n\t// We sanitize the src/href attributes later if needed\n\tALLOW_UNKNOWN_PROTOCOLS: true,\n} satisfies dompurify.Config);\n\n/**\n * Sanitizes an html string.\n *\n * @param untrusted The HTML string to sanitize.\n * @param config Optional configuration for sanitization. If not provided, defaults to a safe configuration.\n *\n * @returns A sanitized string of html.\n */\nexport function sanitizeHtml(untrusted: string, config?: DomSanitizerConfig): TrustedHTML {\n\tconst store = new DisposableStore();\n\ttry {\n\t\tconst resolvedConfig: dompurify.Config = { ...defaultDomPurifyConfig };\n\n\t\tif (config?.allowedTags) {\n\t\t\tif (config.allowedTags.override) {\n\t\t\t\tresolvedConfig.ALLOWED_TAGS = [...config.allowedTags.override];\n\t\t\t}\n\n\t\t\tif (config.allowedTags.augment) {\n\t\t\t\tresolvedConfig.ALLOWED_TAGS = [...(resolvedConfig.ALLOWED_TAGS ?? []), ...config.allowedTags.augment];\n\t\t\t}\n\t\t}\n\n\t\tlet resolvedAttributes: Array<string | SanitizeAttributeRule> = [...defaultAllowedAttrs];\n\t\tif (config?.allowedAttributes) {\n\t\t\tif (config.allowedAttributes.override) {\n\t\t\t\tresolvedAttributes = [...config.allowedAttributes.override];\n\t\t\t}\n\n\t\t\tif (config.allowedAttributes.augment) {\n\t\t\t\tresolvedAttributes = [...resolvedAttributes, ...config.allowedAttributes.augment];\n\t\t\t}\n\t\t}\n\n\t\tconst allowedAttrNames = new Set(resolvedAttributes.map(attr => typeof attr === 'string' ? attr : attr.attributeName));\n\t\tconst allowedAttrPredicates = new Map<string, SanitizeAttributeRule>();\n\t\tfor (const attr of resolvedAttributes) {\n\t\t\tif (typeof attr === 'string') {\n\t\t\t\t// New string attribute value clears previously set predicates\n\t\t\t\tallowedAttrPredicates.delete(attr);\n\t\t\t} else {\n\t\t\t\tallowedAttrPredicates.set(attr.attributeName, attr);\n\t\t\t}\n\t\t}\n\n\t\tresolvedConfig.ALLOWED_ATTR = Array.from(allowedAttrNames);\n\n\t\tstore.add(hookDomPurifyHrefAndSrcSanitizer(\n\t\t\tconfig?.allowedLinkProtocols?.override ?? [Schemas.http, Schemas.https],\n\t\t\tconfig?.allowedMediaProtocols?.override ?? [Schemas.http, Schemas.https]));\n\n\t\tif (config?.replaceWithPlaintext) {\n\t\t\tstore.add(addDompurifyHook('uponSanitizeElement', replaceWithPlainTextHook));\n\t\t}\n\n\t\tif (allowedAttrPredicates.size) {\n\t\t\tstore.add(addDompurifyHook('uponSanitizeAttribute', (node, e) => {\n\t\t\t\tconst predicate = allowedAttrPredicates.get(e.attrName);\n\t\t\t\tif (predicate) {\n\t\t\t\t\tconst result = predicate.shouldKeep(node, e);\n\t\t\t\t\tif (typeof result === 'string') {\n\t\t\t\t\t\te.keepAttr = true;\n\t\t\t\t\t\te.attrValue = result;\n\t\t\t\t\t} else {\n\t\t\t\t\t\te.keepAttr = result;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\te.keepAttr = allowedAttrNames.has(e.attrName);\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\n\t\treturn dompurify.sanitize(untrusted, {\n\t\t\t...resolvedConfig,\n\t\t\tRETURN_TRUSTED_TYPE: true\n\t\t});\n\t} finally {\n\t\tstore.dispose();\n\t}\n}\n\nconst selfClosingTags = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];\n\nfunction replaceWithPlainTextHook(element: Element, data: dompurify.SanitizeElementHookEvent, _config: dompurify.Config) {\n\tif (!data.allowedTags[data.tagName] && data.tagName !== 'body') {\n\t\tconst replacement = convertTagToPlaintext(element);\n\t\tif (element.nodeType === Node.COMMENT_NODE) {\n\t\t\t// Workaround for https://github.com/cure53/DOMPurify/issues/1005\n\t\t\t// The comment will be deleted in the next phase. However if we try to remove it now, it will cause\n\t\t\t// an exception. Instead we insert the text node before the comment.\n\t\t\telement.parentElement?.insertBefore(replacement, element);\n\t\t} else {\n\t\t\telement.parentElement?.replaceChild(replacement, element);\n\t\t}\n\t}\n}\n\nexport function convertTagToPlaintext(element: Element): DocumentFragment {\n\tlet startTagText: string;\n\tlet endTagText: string | undefined;\n\tif (element.nodeType === Node.COMMENT_NODE) {\n\t\tstartTagText = `<!--${element.textContent}-->`;\n\t} else {\n\t\tconst tagName = element.tagName.toLowerCase();\n\t\tconst isSelfClosing = selfClosingTags.includes(tagName);\n\t\tconst attrString = element.attributes.length ?\n\t\t\t' ' + Array.from(element.attributes)\n\t\t\t\t.map(attr => `${attr.name}=\"${attr.value}\"`)\n\t\t\t\t.join(' ')\n\t\t\t: '';\n\t\tstartTagText = `<${tagName}${attrString}>`;\n\t\tif (!isSelfClosing) {\n\t\t\tendTagText = `</${tagName}>`;\n\t\t}\n\t}\n\n\tconst fragment = document.createDocumentFragment();\n\tconst textNode = element.ownerDocument.createTextNode(startTagText);\n\tfragment.appendChild(textNode);\n\twhile (element.firstChild) {\n\t\tfragment.appendChild(element.firstChild);\n\t}\n\n\tconst endTagTextNode = endTagText ? element.ownerDocument.createTextNode(endTagText) : undefined;\n\tif (endTagTextNode) {\n\t\tfragment.appendChild(endTagTextNode);\n\t}\n\n\treturn fragment;\n}\n\n/**\n * Sanitizes the given `value` and reset the given `node` with it.\n */\nexport function safeSetInnerHtml(node: HTMLElement, untrusted: string, config?: DomSanitizerConfig): void {\n\tnode.innerHTML = sanitizeHtml(untrusted, config) as any;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { DisposableStore, IDisposable, toDisposable } from '../common/lifecycle.js';\nimport { Schemas } from '../common/network.js';\nimport dompurify from './dompurify/dompurify.js';\n\n\n/**\n * List of safe, non-input html tags.\n */\nexport const basicMarkupHtmlTags = Object.freeze([\n\t'a',\n\t'abbr',\n\t'b',\n\t'bdo',\n\t'blockquote',\n\t'br',\n\t'caption',\n\t'cite',\n\t'code',\n\t'col',\n\t'colgroup',\n\t'dd',\n\t'del',\n\t'details',\n\t'dfn',\n\t'div',\n\t'dl',\n\t'dt',\n\t'em',\n\t'figcaption',\n\t'figure',\n\t'h1',\n\t'h2',\n\t'h3',\n\t'h4',\n\t'h5',\n\t'h6',\n\t'hr',\n\t'i',\n\t'img',\n\t'ins',\n\t'kbd',\n\t'label',\n\t'li',\n\t'mark',\n\t'ol',\n\t'p',\n\t'pre',\n\t'q',\n\t'rp',\n\t'rt',\n\t'ruby',\n\t'samp',\n\t'small',\n\t'small',\n\t'source',\n\t'span',\n\t'strike',\n\t'strong',\n\t'sub',\n\t'summary',\n\t'sup',\n\t'table',\n\t'tbody',\n\t'td',\n\t'tfoot',\n\t'th',\n\t'thead',\n\t'time',\n\t'tr',\n\t'tt',\n\t'u',\n\t'ul',\n\t'var',\n\t'video',\n\t'wbr',\n]);\n\nexport const defaultAllowedAttrs = Object.freeze([\n\t'href',\n\t'target',\n\t'src',\n\t'alt',\n\t'title',\n\t'for',\n\t'name',\n\t'role',\n\t'tabindex',\n\t'x-dispatch',\n\t'required',\n\t'checked',\n\t'placeholder',\n\t'type',\n\t'start',\n\t'width',\n\t'height',\n\t'align',\n]);\n\n\ntype UponSanitizeElementCb = (currentNode: Element, data: dompurify.SanitizeElementHookEvent, config: dompurify.Config) => void;\ntype UponSanitizeAttributeCb = (currentNode: Element, data: dompurify.SanitizeAttributeHookEvent, config: dompurify.Config) => void;\n\nfunction addDompurifyHook(hook: 'uponSanitizeElement', cb: UponSanitizeElementCb): IDisposable;\nfunction addDompurifyHook(hook: 'uponSanitizeAttribute', cb: UponSanitizeAttributeCb): IDisposable;\nfunction addDompurifyHook(hook: 'uponSanitizeElement' | 'uponSanitizeAttribute', cb: any): IDisposable {\n\tdompurify.addHook(hook, cb);\n\treturn toDisposable(() => dompurify.removeHook(hook));\n}\n\n/**\n * Hooks dompurify using `afterSanitizeAttributes` to check that all `href` and `src`\n * attributes are valid.\n */\nfunction hookDomPurifyHrefAndSrcSanitizer(allowedLinkProtocols: readonly string[] | '*', allowedMediaProtocols: readonly string[]): IDisposable {\n\t// https://github.com/cure53/DOMPurify/blob/main/demos/hooks-scheme-allowlist.html\n\t// build an anchor to map URLs to\n\tconst anchor = document.createElement('a');\n\n\tfunction validateLink(value: string, allowedProtocols: readonly string[] | '*'): boolean {\n\t\tif (allowedProtocols === '*') {\n\t\t\treturn true; // allow all protocols\n\t\t}\n\n\t\tanchor.href = value;\n\t\treturn allowedProtocols.includes(anchor.protocol.replace(/:$/, ''));\n\t}\n\n\tdompurify.addHook('afterSanitizeAttributes', (node) => {\n\t\t// check all href/src attributes for validity\n\t\tfor (const attr of ['href', 'src']) {\n\t\t\tif (node.hasAttribute(attr)) {\n\t\t\t\tconst attrValue = node.getAttribute(attr) as string;\n\t\t\t\tif (attr === 'href') {\n\n\t\t\t\t\tif (!attrValue.startsWith('#') && !validateLink(attrValue, allowedLinkProtocols)) {\n\t\t\t\t\t\tnode.removeAttribute(attr);\n\t\t\t\t\t}\n\n\t\t\t\t} else {// 'src'\n\t\t\t\t\tif (!validateLink(attrValue, allowedMediaProtocols)) {\n\t\t\t\t\t\tnode.removeAttribute(attr);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\treturn toDisposable(() => dompurify.removeHook('afterSanitizeAttributes'));\n}\n\n/**\n * Predicate that checks if an attribute should be kept or removed.\n *\n * @returns A boolean indicating whether the attribute should be kept or a string with the sanitized value (which implicitly keeps the attribute)\n */\nexport type SanitizeAttributePredicate = (node: Element, data: { readonly attrName: string; readonly attrValue: string }) => boolean | string;\n\nexport interface SanitizeAttributeRule {\n\treadonly attributeName: string;\n\tshouldKeep: SanitizeAttributePredicate;\n}\n\nexport interface DomSanitizerConfig {\n\t/**\n\t * Configured the allowed html tags.\n\t */\n\treadonly allowedTags?: {\n\t\treadonly override?: readonly string[];\n\t\treadonly augment?: readonly string[];\n\t};\n\n\t/**\n\t * Configured the allowed html attributes.\n\t */\n\treadonly allowedAttributes?: {\n\t\treadonly override?: ReadonlyArray<string | SanitizeAttributeRule>;\n\t\treadonly augment?: ReadonlyArray<string | SanitizeAttributeRule>;\n\t};\n\n\t/**\n\t * List of allowed protocols for `href` attributes.\n\t */\n\treadonly allowedLinkProtocols?: {\n\t\treadonly override?: readonly string[] | '*';\n\t};\n\n\t/**\n\t * List of allowed protocols for `src` attributes.\n\t */\n\treadonly allowedMediaProtocols?: {\n\t\treadonly override?: readonly string[];\n\t};\n\n\t/**\n\t * If set, replaces unsupported tags with their plaintext representation instead of removing them.\n\t *\n\t * For example, <p><bad>\"text\"</bad></p> becomes <p>\"<bad>text</bad>\"</p>.\n\t */\n\treadonly replaceWithPlaintext?: boolean;\n}\n\nconst defaultDomPurifyConfig = Object.freeze({\n\tALLOWED_TAGS: [...basicMarkupHtmlTags],\n\tALLOWED_ATTR: [...defaultAllowedAttrs],\n\tRETURN_DOM: false,\n\tRETURN_DOM_FRAGMENT: false,\n\tRETURN_TRUSTED_TYPE: true,\n\t// We sanitize the src/href attributes later if needed\n\tALLOW_UNKNOWN_PROTOCOLS: true,\n} satisfies dompurify.Config);\n\n/**\n * Sanitizes an html string.\n *\n * @param untrusted The HTML string to sanitize.\n * @param config Optional configuration for sanitization. If not provided, defaults to a safe configuration.\n *\n * @returns A sanitized string of html.\n */\nexport function sanitizeHtml(untrusted: string, config?: DomSanitizerConfig): TrustedHTML {\n\tconst store = new DisposableStore();\n\ttry {\n\t\tconst resolvedConfig: dompurify.Config = { ...defaultDomPurifyConfig };\n\n\t\tif (config?.allowedTags) {\n\t\t\tif (config.allowedTags.override) {\n\t\t\t\tresolvedConfig.ALLOWED_TAGS = [...config.allowedTags.override];\n\t\t\t}\n\n\t\t\tif (config.allowedTags.augment) {\n\t\t\t\tresolvedConfig.ALLOWED_TAGS = [...(resolvedConfig.ALLOWED_TAGS ?? []), ...config.allowedTags.augment];\n\t\t\t}\n\t\t}\n\n\t\tlet resolvedAttributes: Array<string | SanitizeAttributeRule> = [...defaultAllowedAttrs];\n\t\tif (config?.allowedAttributes) {\n\t\t\tif (config.allowedAttributes.override) {\n\t\t\t\tresolvedAttributes = [...config.allowedAttributes.override];\n\t\t\t}\n\n\t\t\tif (config.allowedAttributes.augment) {\n\t\t\t\tresolvedAttributes = [...resolvedAttributes, ...config.allowedAttributes.augment];\n\t\t\t}\n\t\t}\n\n\t\tconst allowedAttrNames = new Set(resolvedAttributes.map(attr => typeof attr === 'string' ? attr : attr.attributeName));\n\t\tconst allowedAttrPredicates = new Map<string, SanitizeAttributeRule>();\n\t\tfor (const attr of resolvedAttributes) {\n\t\t\tif (typeof attr === 'string') {\n\t\t\t\t// New string attribute value clears previously set predicates\n\t\t\t\tallowedAttrPredicates.delete(attr);\n\t\t\t} else {\n\t\t\t\tallowedAttrPredicates.set(attr.attributeName, attr);\n\t\t\t}\n\t\t}\n\n\t\tresolvedConfig.ALLOWED_ATTR = Array.from(allowedAttrNames);\n\n\t\tstore.add(hookDomPurifyHrefAndSrcSanitizer(\n\t\t\tconfig?.allowedLinkProtocols?.override ?? [Schemas.http, Schemas.https],\n\t\t\tconfig?.allowedMediaProtocols?.override ?? [Schemas.http, Schemas.https]));\n\n\t\tif (config?.replaceWithPlaintext) {\n\t\t\tstore.add(addDompurifyHook('uponSanitizeElement', replaceWithPlainTextHook));\n\t\t}\n\n\t\tif (allowedAttrPredicates.size) {\n\t\t\tstore.add(addDompurifyHook('uponSanitizeAttribute', (node, e) => {\n\t\t\t\tconst predicate = allowedAttrPredicates.get(e.attrName);\n\t\t\t\tif (predicate) {\n\t\t\t\t\tconst result = predicate.shouldKeep(node, e);\n\t\t\t\t\tif (typeof result === 'string') {\n\t\t\t\t\t\te.keepAttr = true;\n\t\t\t\t\t\te.attrValue = result;\n\t\t\t\t\t} else {\n\t\t\t\t\t\te.keepAttr = result;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\te.keepAttr = allowedAttrNames.has(e.attrName);\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\n\t\treturn dompurify.sanitize(untrusted, {\n\t\t\t...resolvedConfig,\n\t\t\tRETURN_TRUSTED_TYPE: true\n\t\t});\n\t} finally {\n\t\tstore.dispose();\n\t}\n}\n\nconst selfClosingTags = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];\n\nfunction replaceWithPlainTextHook(element: Element, data: dompurify.SanitizeElementHookEvent, _config: dompurify.Config) {\n\tif (!data.allowedTags[data.tagName] && data.tagName !== 'body') {\n\t\tconst replacement = convertTagToPlaintext(element);\n\t\tif (element.nodeType === Node.COMMENT_NODE) {\n\t\t\t// Workaround for https://github.com/cure53/DOMPurify/issues/1005\n\t\t\t// The comment will be deleted in the next phase. However if we try to remove it now, it will cause\n\t\t\t// an exception. Instead we insert the text node before the comment.\n\t\t\telement.parentElement?.insertBefore(replacement, element);\n\t\t} else {\n\t\t\telement.parentElement?.replaceChild(replacement, element);\n\t\t}\n\t}\n}\n\nexport function convertTagToPlaintext(element: Element): DocumentFragment {\n\tlet startTagText: string;\n\tlet endTagText: string | undefined;\n\tif (element.nodeType === Node.COMMENT_NODE) {\n\t\tstartTagText = `<!--${element.textContent}-->`;\n\t} else {\n\t\tconst tagName = element.tagName.toLowerCase();\n\t\tconst isSelfClosing = selfClosingTags.includes(tagName);\n\t\tconst attrString = element.attributes.length ?\n\t\t\t' ' + Array.from(element.attributes)\n\t\t\t\t.map(attr => `${attr.name}=\"${attr.value}\"`)\n\t\t\t\t.join(' ')\n\t\t\t: '';\n\t\tstartTagText = `<${tagName}${attrString}>`;\n\t\tif (!isSelfClosing) {\n\t\t\tendTagText = `</${tagName}>`;\n\t\t}\n\t}\n\n\tconst fragment = document.createDocumentFragment();\n\tconst textNode = element.ownerDocument.createTextNode(startTagText);\n\tfragment.appendChild(textNode);\n\twhile (element.firstChild) {\n\t\tfragment.appendChild(element.firstChild);\n\t}\n\n\tconst endTagTextNode = endTagText ? element.ownerDocument.createTextNode(endTagText) : undefined;\n\tif (endTagTextNode) {\n\t\tfragment.appendChild(endTagTextNode);\n\t}\n\n\treturn fragment;\n}\n\n/**\n * Sanitizes the given `value` and reset the given `node` with it.\n */\nexport function safeSetInnerHtml(node: HTMLElement, untrusted: string, config?: DomSanitizerConfig): void {\n\tnode.innerHTML = sanitizeHtml(untrusted, config) as any;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/browser/domSanitize.ts","vs/base/browser/domSanitize.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,eAAe,EAAe,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,SAAS,MAAM,0BAA0B,CAAC;AAGjD;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC;IAChD,GAAG;IACH,MAAM;IACN,GAAG;IACH,KAAK;IACL,YAAY;IACZ,IAAI;IACJ,SAAS;IACT,MAAM;IACN,MAAM;IACN,KAAK;IACL,UAAU;IACV,IAAI;IACJ,KAAK;IACL,SAAS;IACT,KAAK;IACL,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,YAAY;IACZ,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,KAAK;IACL,KAAK;IACL,KAAK;IACL,OAAO;IACP,IAAI;IACJ,MAAM;IACN,IAAI;IACJ,GAAG;IACH,KAAK;IACL,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,QAAQ;IACR,MAAM;IAC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,CAAC;IAC/B,OAAO,OAAO,CAAC,UAAU,EAAE,CAAC;QAC3B,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC1C,CAAC;IAED,MAAM,cAAc,GAAG,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACjG,IAAI,cAAc,EAAE,CAAC;QACpB,QAAQ,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;IACtC,CAAC;IAED,OAAO,QAAQ,CAAC;AACjB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAiB,EAAE,SAAiB,EAAE,MAA2B;IACjG,IAAI,CAAC,SAAS,GAAG,YAAY,CAAC,SAAS,EAAE,MAAM,CAAQ,CAAC;AACzD,CAAC","file":"domSanitize.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { DisposableStore, IDisposable, toDisposable } from '../common/lifecycle.js';\nimport { Schemas } from '../common/network.js';\nimport dompurify from './dompurify/dompurify.js';\n\n\n/**\n * List of safe, non-input html tags.\n */\nexport const basicMarkupHtmlTags = Object.freeze([\n\t'a',\n\t'abbr',\n\t'b',\n\t'bdo',\n\t'blockquote',\n\t'br',\n\t'caption',\n\t'cite',\n\t'code',\n\t'col',\n\t'colgroup',\n\t'dd',\n\t'del',\n\t'details',\n\t'dfn',\n\t'div',\n\t'dl',\n\t'dt',\n\t'em',\n\t'figcaption',\n\t'figure',\n\t'h1',\n\t'h2',\n\t'h3',\n\t'h4',\n\t'h5',\n\t'h6',\n\t'hr',\n\t'i',\n\t'img',\n\t'ins',\n\t'kbd',\n\t'label',\n\t'li',\n\t'mark',\n\t'ol',\n\t'p',\n\t'pre',\n\t'q',\n\t'rp',\n\t'rt',\n\t'ruby',\n\t'samp',\n\t'small',\n\t'small',\n\t'source',\n\t'span',\n\t'strike',\n\t'strong',\n\t'sub',\n\t'summary',\n\t'sup',\n\t'table',\n\t'tbody',\n\t'td',\n\t'tfoot',\n\t'th',\n\t'thead',\n\t'time',\n\t'tr',\n\t'tt',\n\t'u',\n\t'ul',\n\t'var',\n\t'video',\n\t'wbr',\n]);\n\nexport const defaultAllowedAttrs = Object.freeze([\n\t'href',\n\t'target',\n\t'src',\n\t'alt',\n\t'title',\n\t'for',\n\t'name',\n\t'role',\n\t'tabindex',\n\t'x-dispatch',\n\t'required',\n\t'checked',\n\t'placeholder',\n\t'type',\n\t'start',\n\t'width',\n\t'height',\n\t'align',\n]);\n\n\ntype UponSanitizeElementCb = (currentNode: Element, data: dompurify.SanitizeElementHookEvent, config: dompurify.Config) => void;\ntype UponSanitizeAttributeCb = (currentNode: Element, data: dompurify.SanitizeAttributeHookEvent, config: dompurify.Config) => void;\n\nfunction addDompurifyHook(hook: 'uponSanitizeElement', cb: UponSanitizeElementCb): IDisposable;\nfunction addDompurifyHook(hook: 'uponSanitizeAttribute', cb: UponSanitizeAttributeCb): IDisposable;\nfunction addDompurifyHook(hook: 'uponSanitizeElement' | 'uponSanitizeAttribute', cb: any): IDisposable {\n\tdompurify.addHook(hook, cb);\n\treturn toDisposable(() => dompurify.removeHook(hook));\n}\n\n/**\n * Hooks dompurify using `afterSanitizeAttributes` to check that all `href` and `src`\n * attributes are valid.\n */\nfunction hookDomPurifyHrefAndSrcSanitizer(allowedLinkProtocols: readonly string[] | '*', allowedMediaProtocols: readonly string[]): IDisposable {\n\t// https://github.com/cure53/DOMPurify/blob/main/demos/hooks-scheme-allowlist.html\n\t// build an anchor to map URLs to\n\tconst anchor = document.createElement('a');\n\n\tfunction validateLink(value: string, allowedProtocols: readonly string[] | '*'): boolean {\n\t\tif (allowedProtocols === '*') {\n\t\t\treturn true; // allow all protocols\n\t\t}\n\n\t\tanchor.href = value;\n\t\treturn allowedProtocols.includes(anchor.protocol.replace(/:$/, ''));\n\t}\n\n\tdompurify.addHook('afterSanitizeAttributes', (node) => {\n\t\t// check all href/src attributes for validity\n\t\tfor (const attr of ['href', 'src']) {\n\t\t\tif (node.hasAttribute(attr)) {\n\t\t\t\tconst attrValue = node.getAttribute(attr) as string;\n\t\t\t\tif (attr === 'href') {\n\n\t\t\t\t\tif (!attrValue.startsWith('#') && !validateLink(attrValue, allowedLinkProtocols)) {\n\t\t\t\t\t\tnode.removeAttribute(attr);\n\t\t\t\t\t}\n\n\t\t\t\t} else {// 'src'\n\t\t\t\t\tif (!validateLink(attrValue, allowedMediaProtocols)) {\n\t\t\t\t\t\tnode.removeAttribute(attr);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\treturn toDisposable(() => dompurify.removeHook('afterSanitizeAttributes'));\n}\n\n/**\n * Predicate that checks if an attribute should be kept or removed.\n *\n * @returns A boolean indicating whether the attribute should be kept or a string with the sanitized value (which implicitly keeps the attribute)\n */\nexport type SanitizeAttributePredicate = (node: Element, data: { readonly attrName: string; readonly attrValue: string }) => boolean | string;\n\nexport interface SanitizeAttributeRule {\n\treadonly attributeName: string;\n\tshouldKeep: SanitizeAttributePredicate;\n}\n\nexport interface DomSanitizerConfig {\n\t/**\n\t * Configured the allowed html tags.\n\t */\n\treadonly allowedTags?: {\n\t\treadonly override?: readonly string[];\n\t\treadonly augment?: readonly string[];\n\t};\n\n\t/**\n\t * Configured the allowed html attributes.\n\t */\n\treadonly allowedAttributes?: {\n\t\treadonly override?: ReadonlyArray<string | SanitizeAttributeRule>;\n\t\treadonly augment?: ReadonlyArray<string | SanitizeAttributeRule>;\n\t};\n\n\t/**\n\t * List of allowed protocols for `href` attributes.\n\t */\n\treadonly allowedLinkProtocols?: {\n\t\treadonly override?: readonly string[] | '*';\n\t};\n\n\t/**\n\t * List of allowed protocols for `src` attributes.\n\t */\n\treadonly allowedMediaProtocols?: {\n\t\treadonly override?: readonly string[];\n\t};\n\n\t/**\n\t * If set, replaces unsupported tags with their plaintext representation instead of removing them.\n\t *\n\t * For example, <p><bad>\"text\"</bad></p> becomes <p>\"<bad>text</bad>\"</p>.\n\t */\n\treadonly replaceWithPlaintext?: boolean;\n}\n\nconst defaultDomPurifyConfig = Object.freeze({\n\tALLOWED_TAGS: [...basicMarkupHtmlTags],\n\tALLOWED_ATTR: [...defaultAllowedAttrs],\n\tRETURN_DOM: false,\n\tRETURN_DOM_FRAGMENT: false,\n\tRETURN_TRUSTED_TYPE: true,\n\t// We sanitize the src/href attributes later if needed\n\tALLOW_UNKNOWN_PROTOCOLS: true,\n} satisfies dompurify.Config);\n\n/**\n * Sanitizes an html string.\n *\n * @param untrusted The HTML string to sanitize.\n * @param config Optional configuration for sanitization. If not provided, defaults to a safe configuration.\n *\n * @returns A sanitized string of html.\n */\nexport function sanitizeHtml(untrusted: string, config?: DomSanitizerConfig): TrustedHTML {\n\tconst store = new DisposableStore();\n\ttry {\n\t\tconst resolvedConfig: dompurify.Config = { ...defaultDomPurifyConfig };\n\n\t\tif (config?.allowedTags) {\n\t\t\tif (config.allowedTags.override) {\n\t\t\t\tresolvedConfig.ALLOWED_TAGS = [...config.allowedTags.override];\n\t\t\t}\n\n\t\t\tif (config.allowedTags.augment) {\n\t\t\t\tresolvedConfig.ALLOWED_TAGS = [...(resolvedConfig.ALLOWED_TAGS ?? []), ...config.allowedTags.augment];\n\t\t\t}\n\t\t}\n\n\t\tlet resolvedAttributes: Array<string | SanitizeAttributeRule> = [...defaultAllowedAttrs];\n\t\tif (config?.allowedAttributes) {\n\t\t\tif (config.allowedAttributes.override) {\n\t\t\t\tresolvedAttributes = [...config.allowedAttributes.override];\n\t\t\t}\n\n\t\t\tif (config.allowedAttributes.augment) {\n\t\t\t\tresolvedAttributes = [...resolvedAttributes, ...config.allowedAttributes.augment];\n\t\t\t}\n\t\t}\n\n\t\t// All attr names are lower-case in the sanitizer hooks\n\t\tresolvedAttributes = resolvedAttributes.map((attr): string | SanitizeAttributeRule => {\n\t\t\tif (typeof attr === 'string') {\n\t\t\t\treturn attr.toLowerCase();\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tattributeName: attr.attributeName.toLowerCase(),\n\t\t\t\tshouldKeep: attr.shouldKeep,\n\t\t\t};\n\t\t});\n\n\t\tconst allowedAttrNames = new Set(resolvedAttributes.map(attr => typeof attr === 'string' ? attr : attr.attributeName));\n\t\tconst allowedAttrPredicates = new Map<string, SanitizeAttributeRule>();\n\t\tfor (const attr of resolvedAttributes) {\n\t\t\tif (typeof attr === 'string') {\n\t\t\t\t// New string attribute value clears previously set predicates\n\t\t\t\tallowedAttrPredicates.delete(attr);\n\t\t\t} else {\n\t\t\t\tallowedAttrPredicates.set(attr.attributeName, attr);\n\t\t\t}\n\t\t}\n\n\t\tresolvedConfig.ALLOWED_ATTR = Array.from(allowedAttrNames);\n\n\t\tstore.add(hookDomPurifyHrefAndSrcSanitizer(\n\t\t\tconfig?.allowedLinkProtocols?.override ?? [Schemas.http, Schemas.https],\n\t\t\tconfig?.allowedMediaProtocols?.override ?? [Schemas.http, Schemas.https]));\n\n\t\tif (config?.replaceWithPlaintext) {\n\t\t\tstore.add(addDompurifyHook('uponSanitizeElement', replaceWithPlainTextHook));\n\t\t}\n\n\t\tif (allowedAttrPredicates.size) {\n\t\t\tstore.add(addDompurifyHook('uponSanitizeAttribute', (node, e) => {\n\t\t\t\tconst predicate = allowedAttrPredicates.get(e.attrName);\n\t\t\t\tif (predicate) {\n\t\t\t\t\tconst result = predicate.shouldKeep(node, e);\n\t\t\t\t\tif (typeof result === 'string') {\n\t\t\t\t\t\te.keepAttr = true;\n\t\t\t\t\t\te.attrValue = result;\n\t\t\t\t\t} else {\n\t\t\t\t\t\te.keepAttr = result;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\te.keepAttr = allowedAttrNames.has(e.attrName);\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\n\t\treturn dompurify.sanitize(untrusted, {\n\t\t\t...resolvedConfig,\n\t\t\tRETURN_TRUSTED_TYPE: true\n\t\t});\n\t} finally {\n\t\tstore.dispose();\n\t}\n}\n\nconst selfClosingTags = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];\n\nfunction replaceWithPlainTextHook(element: Element, data: dompurify.SanitizeElementHookEvent, _config: dompurify.Config) {\n\tif (!data.allowedTags[data.tagName] && data.tagName !== 'body') {\n\t\tconst replacement = convertTagToPlaintext(element);\n\t\tif (element.nodeType === Node.COMMENT_NODE) {\n\t\t\t// Workaround for https://github.com/cure53/DOMPurify/issues/1005\n\t\t\t// The comment will be deleted in the next phase. However if we try to remove it now, it will cause\n\t\t\t// an exception. Instead we insert the text node before the comment.\n\t\t\telement.parentElement?.insertBefore(replacement, element);\n\t\t} else {\n\t\t\telement.parentElement?.replaceChild(replacement, element);\n\t\t}\n\t}\n}\n\nexport function convertTagToPlaintext(element: Element): DocumentFragment {\n\tlet startTagText: string;\n\tlet endTagText: string | undefined;\n\tif (element.nodeType === Node.COMMENT_NODE) {\n\t\tstartTagText = `<!--${element.textContent}-->`;\n\t} else {\n\t\tconst tagName = element.tagName.toLowerCase();\n\t\tconst isSelfClosing = selfClosingTags.includes(tagName);\n\t\tconst attrString = element.attributes.length ?\n\t\t\t' ' + Array.from(element.attributes)\n\t\t\t\t.map(attr => `${attr.name}=\"${attr.value}\"`)\n\t\t\t\t.join(' ')\n\t\t\t: '';\n\t\tstartTagText = `<${tagName}${attrString}>`;\n\t\tif (!isSelfClosing) {\n\t\t\tendTagText = `</${tagName}>`;\n\t\t}\n\t}\n\n\tconst fragment = document.createDocumentFragment();\n\tconst textNode = element.ownerDocument.createTextNode(startTagText);\n\tfragment.appendChild(textNode);\n\twhile (element.firstChild) {\n\t\tfragment.appendChild(element.firstChild);\n\t}\n\n\tconst endTagTextNode = endTagText ? element.ownerDocument.createTextNode(endTagText) : undefined;\n\tif (endTagTextNode) {\n\t\tfragment.appendChild(endTagTextNode);\n\t}\n\n\treturn fragment;\n}\n\n/**\n * Sanitizes the given `value` and reset the given `node` with it.\n */\nexport function safeSetInnerHtml(node: HTMLElement, untrusted: string, config?: DomSanitizerConfig): void {\n\tnode.innerHTML = sanitizeHtml(untrusted, config) as any;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { DisposableStore, IDisposable, toDisposable } from '../common/lifecycle.js';\nimport { Schemas } from '../common/network.js';\nimport dompurify from './dompurify/dompurify.js';\n\n\n/**\n * List of safe, non-input html tags.\n */\nexport const basicMarkupHtmlTags = Object.freeze([\n\t'a',\n\t'abbr',\n\t'b',\n\t'bdo',\n\t'blockquote',\n\t'br',\n\t'caption',\n\t'cite',\n\t'code',\n\t'col',\n\t'colgroup',\n\t'dd',\n\t'del',\n\t'details',\n\t'dfn',\n\t'div',\n\t'dl',\n\t'dt',\n\t'em',\n\t'figcaption',\n\t'figure',\n\t'h1',\n\t'h2',\n\t'h3',\n\t'h4',\n\t'h5',\n\t'h6',\n\t'hr',\n\t'i',\n\t'img',\n\t'ins',\n\t'kbd',\n\t'label',\n\t'li',\n\t'mark',\n\t'ol',\n\t'p',\n\t'pre',\n\t'q',\n\t'rp',\n\t'rt',\n\t'ruby',\n\t'samp',\n\t'small',\n\t'small',\n\t'source',\n\t'span',\n\t'strike',\n\t'strong',\n\t'sub',\n\t'summary',\n\t'sup',\n\t'table',\n\t'tbody',\n\t'td',\n\t'tfoot',\n\t'th',\n\t'thead',\n\t'time',\n\t'tr',\n\t'tt',\n\t'u',\n\t'ul',\n\t'var',\n\t'video',\n\t'wbr',\n]);\n\nexport const defaultAllowedAttrs = Object.freeze([\n\t'href',\n\t'target',\n\t'src',\n\t'alt',\n\t'title',\n\t'for',\n\t'name',\n\t'role',\n\t'tabindex',\n\t'x-dispatch',\n\t'required',\n\t'checked',\n\t'placeholder',\n\t'type',\n\t'start',\n\t'width',\n\t'height',\n\t'align',\n]);\n\n\ntype UponSanitizeElementCb = (currentNode: Element, data: dompurify.SanitizeElementHookEvent, config: dompurify.Config) => void;\ntype UponSanitizeAttributeCb = (currentNode: Element, data: dompurify.SanitizeAttributeHookEvent, config: dompurify.Config) => void;\n\nfunction addDompurifyHook(hook: 'uponSanitizeElement', cb: UponSanitizeElementCb): IDisposable;\nfunction addDompurifyHook(hook: 'uponSanitizeAttribute', cb: UponSanitizeAttributeCb): IDisposable;\nfunction addDompurifyHook(hook: 'uponSanitizeElement' | 'uponSanitizeAttribute', cb: any): IDisposable {\n\tdompurify.addHook(hook, cb);\n\treturn toDisposable(() => dompurify.removeHook(hook));\n}\n\n/**\n * Hooks dompurify using `afterSanitizeAttributes` to check that all `href` and `src`\n * attributes are valid.\n */\nfunction hookDomPurifyHrefAndSrcSanitizer(allowedLinkProtocols: readonly string[] | '*', allowedMediaProtocols: readonly string[]): IDisposable {\n\t// https://github.com/cure53/DOMPurify/blob/main/demos/hooks-scheme-allowlist.html\n\t// build an anchor to map URLs to\n\tconst anchor = document.createElement('a');\n\n\tfunction validateLink(value: string, allowedProtocols: readonly string[] | '*'): boolean {\n\t\tif (allowedProtocols === '*') {\n\t\t\treturn true; // allow all protocols\n\t\t}\n\n\t\tanchor.href = value;\n\t\treturn allowedProtocols.includes(anchor.protocol.replace(/:$/, ''));\n\t}\n\n\tdompurify.addHook('afterSanitizeAttributes', (node) => {\n\t\t// check all href/src attributes for validity\n\t\tfor (const attr of ['href', 'src']) {\n\t\t\tif (node.hasAttribute(attr)) {\n\t\t\t\tconst attrValue = node.getAttribute(attr) as string;\n\t\t\t\tif (attr === 'href') {\n\n\t\t\t\t\tif (!attrValue.startsWith('#') && !validateLink(attrValue, allowedLinkProtocols)) {\n\t\t\t\t\t\tnode.removeAttribute(attr);\n\t\t\t\t\t}\n\n\t\t\t\t} else {// 'src'\n\t\t\t\t\tif (!validateLink(attrValue, allowedMediaProtocols)) {\n\t\t\t\t\t\tnode.removeAttribute(attr);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\treturn toDisposable(() => dompurify.removeHook('afterSanitizeAttributes'));\n}\n\n/**\n * Predicate that checks if an attribute should be kept or removed.\n *\n * @returns A boolean indicating whether the attribute should be kept or a string with the sanitized value (which implicitly keeps the attribute)\n */\nexport type SanitizeAttributePredicate = (node: Element, data: { readonly attrName: string; readonly attrValue: string }) => boolean | string;\n\nexport interface SanitizeAttributeRule {\n\treadonly attributeName: string;\n\tshouldKeep: SanitizeAttributePredicate;\n}\n\nexport interface DomSanitizerConfig {\n\t/**\n\t * Configured the allowed html tags.\n\t */\n\treadonly allowedTags?: {\n\t\treadonly override?: readonly string[];\n\t\treadonly augment?: readonly string[];\n\t};\n\n\t/**\n\t * Configured the allowed html attributes.\n\t */\n\treadonly allowedAttributes?: {\n\t\treadonly override?: ReadonlyArray<string | SanitizeAttributeRule>;\n\t\treadonly augment?: ReadonlyArray<string | SanitizeAttributeRule>;\n\t};\n\n\t/**\n\t * List of allowed protocols for `href` attributes.\n\t */\n\treadonly allowedLinkProtocols?: {\n\t\treadonly override?: readonly string[] | '*';\n\t};\n\n\t/**\n\t * List of allowed protocols for `src` attributes.\n\t */\n\treadonly allowedMediaProtocols?: {\n\t\treadonly override?: readonly string[];\n\t};\n\n\t/**\n\t * If set, replaces unsupported tags with their plaintext representation instead of removing them.\n\t *\n\t * For example, <p><bad>\"text\"</bad></p> becomes <p>\"<bad>text</bad>\"</p>.\n\t */\n\treadonly replaceWithPlaintext?: boolean;\n}\n\nconst defaultDomPurifyConfig = Object.freeze({\n\tALLOWED_TAGS: [...basicMarkupHtmlTags],\n\tALLOWED_ATTR: [...defaultAllowedAttrs],\n\tRETURN_DOM: false,\n\tRETURN_DOM_FRAGMENT: false,\n\tRETURN_TRUSTED_TYPE: true,\n\t// We sanitize the src/href attributes later if needed\n\tALLOW_UNKNOWN_PROTOCOLS: true,\n} satisfies dompurify.Config);\n\n/**\n * Sanitizes an html string.\n *\n * @param untrusted The HTML string to sanitize.\n * @param config Optional configuration for sanitization. If not provided, defaults to a safe configuration.\n *\n * @returns A sanitized string of html.\n */\nexport function sanitizeHtml(untrusted: string, config?: DomSanitizerConfig): TrustedHTML {\n\tconst store = new DisposableStore();\n\ttry {\n\t\tconst resolvedConfig: dompurify.Config = { ...defaultDomPurifyConfig };\n\n\t\tif (config?.allowedTags) {\n\t\t\tif (config.allowedTags.override) {\n\t\t\t\tresolvedConfig.ALLOWED_TAGS = [...config.allowedTags.override];\n\t\t\t}\n\n\t\t\tif (config.allowedTags.augment) {\n\t\t\t\tresolvedConfig.ALLOWED_TAGS = [...(resolvedConfig.ALLOWED_TAGS ?? []), ...config.allowedTags.augment];\n\t\t\t}\n\t\t}\n\n\t\tlet resolvedAttributes: Array<string | SanitizeAttributeRule> = [...defaultAllowedAttrs];\n\t\tif (config?.allowedAttributes) {\n\t\t\tif (config.allowedAttributes.override) {\n\t\t\t\tresolvedAttributes = [...config.allowedAttributes.override];\n\t\t\t}\n\n\t\t\tif (config.allowedAttributes.augment) {\n\t\t\t\tresolvedAttributes = [...resolvedAttributes, ...config.allowedAttributes.augment];\n\t\t\t}\n\t\t}\n\n\t\t// All attr names are lower-case in the sanitizer hooks\n\t\tresolvedAttributes = resolvedAttributes.map((attr): string | SanitizeAttributeRule => {\n\t\t\tif (typeof attr === 'string') {\n\t\t\t\treturn attr.toLowerCase();\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tattributeName: attr.attributeName.toLowerCase(),\n\t\t\t\tshouldKeep: attr.shouldKeep,\n\t\t\t};\n\t\t});\n\n\t\tconst allowedAttrNames = new Set(resolvedAttributes.map(attr => typeof attr === 'string' ? attr : attr.attributeName));\n\t\tconst allowedAttrPredicates = new Map<string, SanitizeAttributeRule>();\n\t\tfor (const attr of resolvedAttributes) {\n\t\t\tif (typeof attr === 'string') {\n\t\t\t\t// New string attribute value clears previously set predicates\n\t\t\t\tallowedAttrPredicates.delete(attr);\n\t\t\t} else {\n\t\t\t\tallowedAttrPredicates.set(attr.attributeName, attr);\n\t\t\t}\n\t\t}\n\n\t\tresolvedConfig.ALLOWED_ATTR = Array.from(allowedAttrNames);\n\n\t\tstore.add(hookDomPurifyHrefAndSrcSanitizer(\n\t\t\tconfig?.allowedLinkProtocols?.override ?? [Schemas.http, Schemas.https],\n\t\t\tconfig?.allowedMediaProtocols?.override ?? [Schemas.http, Schemas.https]));\n\n\t\tif (config?.replaceWithPlaintext) {\n\t\t\tstore.add(addDompurifyHook('uponSanitizeElement', replaceWithPlainTextHook));\n\t\t}\n\n\t\tif (allowedAttrPredicates.size) {\n\t\t\tstore.add(addDompurifyHook('uponSanitizeAttribute', (node, e) => {\n\t\t\t\tconst predicate = allowedAttrPredicates.get(e.attrName);\n\t\t\t\tif (predicate) {\n\t\t\t\t\tconst result = predicate.shouldKeep(node, e);\n\t\t\t\t\tif (typeof result === 'string') {\n\t\t\t\t\t\te.keepAttr = true;\n\t\t\t\t\t\te.attrValue = result;\n\t\t\t\t\t} else {\n\t\t\t\t\t\te.keepAttr = result;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\te.keepAttr = allowedAttrNames.has(e.attrName);\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\n\t\treturn dompurify.sanitize(untrusted, {\n\t\t\t...resolvedConfig,\n\t\t\tRETURN_TRUSTED_TYPE: true\n\t\t});\n\t} finally {\n\t\tstore.dispose();\n\t}\n}\n\nconst selfClosingTags = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];\n\nfunction replaceWithPlainTextHook(element: Element, data: dompurify.SanitizeElementHookEvent, _config: dompurify.Config) {\n\tif (!data.allowedTags[data.tagName] && data.tagName !== 'body') {\n\t\tconst replacement = convertTagToPlaintext(element);\n\t\tif (element.nodeType === Node.COMMENT_NODE) {\n\t\t\t// Workaround for https://github.com/cure53/DOMPurify/issues/1005\n\t\t\t// The comment will be deleted in the next phase. However if we try to remove it now, it will cause\n\t\t\t// an exception. Instead we insert the text node before the comment.\n\t\t\telement.parentElement?.insertBefore(replacement, element);\n\t\t} else {\n\t\t\telement.parentElement?.replaceChild(replacement, element);\n\t\t}\n\t}\n}\n\nexport function convertTagToPlaintext(element: Element): DocumentFragment {\n\tlet startTagText: string;\n\tlet endTagText: string | undefined;\n\tif (element.nodeType === Node.COMMENT_NODE) {\n\t\tstartTagText = `<!--${element.textContent}-->`;\n\t} else {\n\t\tconst tagName = element.tagName.toLowerCase();\n\t\tconst isSelfClosing = selfClosingTags.includes(tagName);\n\t\tconst attrString = element.attributes.length ?\n\t\t\t' ' + Array.from(element.attributes)\n\t\t\t\t.map(attr => `${attr.name}=\"${attr.value}\"`)\n\t\t\t\t.join(' ')\n\t\t\t: '';\n\t\tstartTagText = `<${tagName}${attrString}>`;\n\t\tif (!isSelfClosing) {\n\t\t\tendTagText = `</${tagName}>`;\n\t\t}\n\t}\n\n\tconst fragment = document.createDocumentFragment();\n\tconst textNode = element.ownerDocument.createTextNode(startTagText);\n\tfragment.appendChild(textNode);\n\twhile (element.firstChild) {\n\t\tfragment.appendChild(element.firstChild);\n\t}\n\n\tconst endTagTextNode = endTagText ? element.ownerDocument.createTextNode(endTagText) : undefined;\n\tif (endTagTextNode) {\n\t\tfragment.appendChild(endTagTextNode);\n\t}\n\n\treturn fragment;\n}\n\n/**\n * Sanitizes the given `value` and reset the given `node` with it.\n */\nexport function safeSetInnerHtml(node: HTMLElement, untrusted: string, config?: DomSanitizerConfig): void {\n\tnode.innerHTML = sanitizeHtml(untrusted, config) as any;\n}\n"]}
|
|
@@ -251,24 +251,26 @@ export class ConfigurationModelParser {
|
|
|
251
251
|
this._restrictedConfigurations = restricted || [];
|
|
252
252
|
}
|
|
253
253
|
doParseRaw(raw, options) {
|
|
254
|
-
const
|
|
255
|
-
const
|
|
254
|
+
const registry = Registry.as(Extensions.Configuration);
|
|
255
|
+
const configurationProperties = registry.getConfigurationProperties();
|
|
256
|
+
const excludedConfigurationProperties = registry.getExcludedConfigurationProperties();
|
|
257
|
+
const filtered = this.filter(raw, configurationProperties, excludedConfigurationProperties, true, options);
|
|
256
258
|
raw = filtered.raw;
|
|
257
259
|
const contents = toValuesTree(raw, message => this.logService.error(`Conflict in settings file ${this._name}: ${message}`));
|
|
258
260
|
const keys = Object.keys(raw);
|
|
259
261
|
const overrides = this.toOverrides(raw, message => this.logService.error(`Conflict in settings file ${this._name}: ${message}`));
|
|
260
262
|
return { contents, keys, overrides, restricted: filtered.restricted, hasExcludedProperties: filtered.hasExcludedProperties };
|
|
261
263
|
}
|
|
262
|
-
filter(properties, configurationProperties, filterOverriddenProperties, options) {
|
|
264
|
+
filter(properties, configurationProperties, excludedConfigurationProperties, filterOverriddenProperties, options) {
|
|
263
265
|
let hasExcludedProperties = false;
|
|
264
|
-
if (!options?.scopes && !options?.skipRestricted && !options?.exclude?.length) {
|
|
266
|
+
if (!options?.scopes && !options?.skipRestricted && !options?.skipUnregistered && !options?.exclude?.length) {
|
|
265
267
|
return { raw: properties, restricted: [], hasExcludedProperties };
|
|
266
268
|
}
|
|
267
269
|
const raw = {};
|
|
268
270
|
const restricted = [];
|
|
269
271
|
for (const key in properties) {
|
|
270
272
|
if (OVERRIDE_PROPERTY_REGEX.test(key) && filterOverriddenProperties) {
|
|
271
|
-
const result = this.filter(properties[key], configurationProperties, false, options);
|
|
273
|
+
const result = this.filter(properties[key], configurationProperties, excludedConfigurationProperties, false, options);
|
|
272
274
|
raw[key] = result.raw;
|
|
273
275
|
hasExcludedProperties = hasExcludedProperties || result.hasExcludedProperties;
|
|
274
276
|
restricted.push(...result.restricted);
|
|
@@ -278,7 +280,7 @@ export class ConfigurationModelParser {
|
|
|
278
280
|
if (propertySchema?.restricted) {
|
|
279
281
|
restricted.push(key);
|
|
280
282
|
}
|
|
281
|
-
if (this.shouldInclude(key, propertySchema, options)) {
|
|
283
|
+
if (this.shouldInclude(key, propertySchema, excludedConfigurationProperties, options)) {
|
|
282
284
|
raw[key] = properties[key];
|
|
283
285
|
}
|
|
284
286
|
else {
|
|
@@ -288,7 +290,7 @@ export class ConfigurationModelParser {
|
|
|
288
290
|
}
|
|
289
291
|
return { raw, restricted, hasExcludedProperties };
|
|
290
292
|
}
|
|
291
|
-
shouldInclude(key, propertySchema, options) {
|
|
293
|
+
shouldInclude(key, propertySchema, excludedConfigurationProperties, options) {
|
|
292
294
|
if (options.exclude?.includes(key)) {
|
|
293
295
|
return false;
|
|
294
296
|
}
|
|
@@ -301,7 +303,8 @@ export class ConfigurationModelParser {
|
|
|
301
303
|
if (options.skipUnregistered && !propertySchema) {
|
|
302
304
|
return false;
|
|
303
305
|
}
|
|
304
|
-
const
|
|
306
|
+
const schema = propertySchema ?? excludedConfigurationProperties[key];
|
|
307
|
+
const scope = schema ? typeof schema.scope !== 'undefined' ? schema.scope : 4 /* ConfigurationScope.WINDOW */ : undefined;
|
|
305
308
|
if (scope === undefined || options.scopes === undefined) {
|
|
306
309
|
return true;
|
|
307
310
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/platform/configuration/common/configurationModels.ts","vs/platform/configuration/common/configurationModels.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,KAAK,MAAM,MAAM,gCAAgC,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,OAAO,MAAM,iCAAiC,CAAC;AAC3D,OAAO,KAAK,KAAK,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAiB,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAuB,qBAAqB,EAAoM,mBAAmB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACrU,OAA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Ae,EAAE,SAAmC;QACxE,wFAAwF;QACxF,qEAAqE;QACrE,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACtC,MAAM,GAAG,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACnD,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;YACb,0BAA0B;YAC1B,OAAO,KAAK,CAAC;QACd,CAAC;QACD,MAAM,GAAG,GAAG,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;QAChC,IAAI,GAAG,IAAI,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,CAAC;YAC1C,OAAO,KAAK,CAAC;QACd,CAAC;QACD,MAAM,IAAI,GAAG,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACpD,IAAI,IAAI,KAAK,IAAI,CAAC,YAAY,IAAI,IAAI,KAAK,IAAI,CAAC,YAAY,EAAE,CAAC;YAC9D,oCAAoC;YACpC,OAAO,KAAK,CAAC;QACd,CAAC;QACD,IAAI,SAAS,EAAE,CAAC;YACf,MAAM,MAAM,GAAG,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1I,MAAM,MAAM,GAAG,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;YAC7F,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACxC,CAAC;QACD,OAAO,IAAI,CAAC;IACb,CAAC;CACD","file":"configurationModels.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as arrays from '../../../base/common/arrays.js';\nimport { IStringDictionary } from '../../../base/common/collections.js';\nimport { ResourceMap } from '../../../base/common/map.js';\nimport * as objects from '../../../base/common/objects.js';\nimport * as types from '../../../base/common/types.js';\nimport { URI, UriComponents } from '../../../base/common/uri.js';\nimport { addToValueTree, ConfigurationTarget, getConfigurationValue, IConfigurationChange, IConfigurationChangeEvent, IConfigurationData, IConfigurationModel, IConfigurationOverrides, IConfigurationUpdateOverrides, IConfigurationValue, IInspectValue, IOverrides, removeFromValueTree, toValuesTree } from './configuration.js';\nimport { ConfigurationScope, Extensions, IConfigurationPropertySchema, IConfigurationRegistry, overrideIdentifiersFromKey, OVERRIDE_PROPERTY_REGEX } from './configurationRegistry.js';\nimport { ILogService } from '../../log/common/log.js';\nimport { Registry } from '../../registry/common/platform.js';\nimport { Workspace } from '../../workspace/common/workspace.js';\n\nfunction freeze<T>(data: T): T {\n\treturn Object.isFrozen(data) ? data : objects.deepFreeze(data);\n}\n\ntype InspectValue<V> = IInspectValue<V> & { merged?: V };\n\nexport class ConfigurationModel implements IConfigurationModel {\n\n\tstatic createEmptyModel(logService: ILogService): ConfigurationModel {\n\t\treturn new ConfigurationModel({}, [], [], undefined, logService);\n\t}\n\n\tprivate readonly overrideConfigurations = new Map<string, ConfigurationModel>();\n\n\tconstructor(\n\t\tprivate readonly _contents: any,\n\t\tprivate readonly _keys: string[],\n\t\tprivate readonly _overrides: IOverrides[],\n\t\treadonly raw: IStringDictionary<any> | ReadonlyArray<IStringDictionary<any> | ConfigurationModel> | undefined,\n\t\tprivate readonly logService: ILogService\n\t) {\n\t}\n\n\tprivate _rawConfiguration: ConfigurationModel | undefined;\n\tget rawConfiguration(): ConfigurationModel {\n\t\tif (!this._rawConfiguration) {\n\t\t\tif (this.raw) {\n\t\t\t\tconst rawConfigurationModels = (Array.isArray(this.raw) ? this.raw : [this.raw]).map(raw => {\n\t\t\t\t\tif (raw instanceof ConfigurationModel) {\n\t\t\t\t\t\treturn raw;\n\t\t\t\t\t}\n\t\t\t\t\tconst parser = new ConfigurationModelParser('', this.logService);\n\t\t\t\t\tparser.parseRaw(raw);\n\t\t\t\t\treturn parser.configurationModel;\n\t\t\t\t});\n\t\t\t\tthis._rawConfiguration = rawConfigurationModels.reduce((previous, current) => current === previous ? current : previous.merge(current), rawConfigurationModels[0]);\n\t\t\t} else {\n\t\t\t\t// raw is same as current\n\t\t\t\tthis._rawConfiguration = this;\n\t\t\t}\n\t\t}\n\t\treturn this._rawConfiguration;\n\t}\n\n\tget contents(): any {\n\t\treturn this._contents;\n\t}\n\n\tget overrides(): IOverrides[] {\n\t\treturn this._overrides;\n\t}\n\n\tget keys(): string[] {\n\t\treturn this._keys;\n\t}\n\n\tisEmpty(): boolean {\n\t\treturn this._keys.length === 0 && Object.keys(this._contents).length === 0 && this._overrides.length === 0;\n\t}\n\n\tgetValue<V>(section: string | undefined): V {\n\t\treturn section ? getConfigurationValue<any>(this.contents, section) : this.contents;\n\t}\n\n\tinspect<V>(section: string | undefined, overrideIdentifier?: string | null): InspectValue<V> {\n\t\tconst that = this;\n\t\treturn {\n\t\t\tget value() {\n\t\t\t\treturn freeze(that.rawConfiguration.getValue<V>(section));\n\t\t\t},\n\t\t\tget override() {\n\t\t\t\treturn overrideIdentifier ? freeze(that.rawConfiguration.getOverrideValue<V>(section, overrideIdentifier)) : undefined;\n\t\t\t},\n\t\t\tget merged() {\n\t\t\t\treturn freeze(overrideIdentifier ? that.rawConfiguration.override(overrideIdentifier).getValue<V>(section) : that.rawConfiguration.getValue<V>(section));\n\t\t\t},\n\t\t\tget overrides() {\n\t\t\t\tconst overrides: { readonly identifiers: string[]; readonly value: V }[] = [];\n\t\t\t\tfor (const { contents, identifiers, keys } of that.rawConfiguration.overrides) {\n\t\t\t\t\tconst value = new ConfigurationModel(contents, keys, [], undefined, that.logService).getValue<V>(section);\n\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\toverrides.push({ identifiers, value });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn overrides.length ? freeze(overrides) : undefined;\n\t\t\t}\n\t\t};\n\t}\n\n\tgetOverrideValue<V>(section: string | undefined, overrideIdentifier: string): V | undefined {\n\t\tconst overrideContents = this.getContentsForOverrideIdentifer(overrideIdentifier);\n\t\treturn overrideContents\n\t\t\t? section ? getConfigurationValue<any>(overrideContents, section) : overrideContents\n\t\t\t: undefined;\n\t}\n\n\toverride(identifier: string): ConfigurationModel {\n\t\tlet overrideConfigurationModel = this.overrideConfigurations.get(identifier);\n\t\tif (!overrideConfigurationModel) {\n\t\t\toverrideConfigurationModel = this.createOverrideConfigurationModel(identifier);\n\t\t\tthis.overrideConfigurations.set(identifier, overrideConfigurationModel);\n\t\t}\n\t\treturn overrideConfigurationModel;\n\t}\n\n\tmerge(...others: ConfigurationModel[]): ConfigurationModel {\n\t\tconst contents = objects.deepClone(this.contents);\n\t\tconst overrides = objects.deepClone(this.overrides);\n\t\tconst keys = [...this.keys];\n\t\tconst raws = this.raw ? Array.isArray(this.raw) ? [...this.raw] : [this.raw] : [this];\n\n\t\tfor (const other of others) {\n\t\t\traws.push(...(other.raw ? Array.isArray(other.raw) ? other.raw : [other.raw] : [other]));\n\t\t\tif (other.isEmpty()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.mergeContents(contents, other.contents);\n\n\t\t\tfor (const otherOverride of other.overrides) {\n\t\t\t\tconst [override] = overrides.filter(o => arrays.equals(o.identifiers, otherOverride.identifiers));\n\t\t\t\tif (override) {\n\t\t\t\t\tthis.mergeContents(override.contents, otherOverride.contents);\n\t\t\t\t\toverride.keys.push(...otherOverride.keys);\n\t\t\t\t\toverride.keys = arrays.distinct(override.keys);\n\t\t\t\t} else {\n\t\t\t\t\toverrides.push(objects.deepClone(otherOverride));\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const key of other.keys) {\n\t\t\t\tif (keys.indexOf(key) === -1) {\n\t\t\t\t\tkeys.push(key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new ConfigurationModel(contents, keys, overrides, !raws.length || raws.every(raw => raw instanceof ConfigurationModel) ? undefined : raws, this.logService);\n\t}\n\n\tprivate createOverrideConfigurationModel(identifier: string): ConfigurationModel {\n\t\tconst overrideContents = this.getContentsForOverrideIdentifer(identifier);\n\n\t\tif (!overrideContents || typeof overrideContents !== 'object' || !Object.keys(overrideContents).length) {\n\t\t\t// If there are no valid overrides, return self\n\t\t\treturn this;\n\t\t}\n\n\t\tconst contents: any = {};\n\t\tfor (const key of arrays.distinct([...Object.keys(this.contents), ...Object.keys(overrideContents)])) {\n\n\t\t\tlet contentsForKey = this.contents[key];\n\t\t\tconst overrideContentsForKey = overrideContents[key];\n\n\t\t\t// If there are override contents for the key, clone and merge otherwise use base contents\n\t\t\tif (overrideContentsForKey) {\n\t\t\t\t// Clone and merge only if base contents and override contents are of type object otherwise just override\n\t\t\t\tif (typeof contentsForKey === 'object' && typeof overrideContentsForKey === 'object') {\n\t\t\t\t\tcontentsForKey = objects.deepClone(contentsForKey);\n\t\t\t\t\tthis.mergeContents(contentsForKey, overrideContentsForKey);\n\t\t\t\t} else {\n\t\t\t\t\tcontentsForKey = overrideContentsForKey;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcontents[key] = contentsForKey;\n\t\t}\n\n\t\treturn new ConfigurationModel(contents, this.keys, this.overrides, undefined, this.logService);\n\t}\n\n\tprivate mergeContents(source: any, target: any): void {\n\t\tfor (const key of Object.keys(target)) {\n\t\t\tif (key in source) {\n\t\t\t\tif (types.isObject(source[key]) && types.isObject(target[key])) {\n\t\t\t\t\tthis.mergeContents(source[key], target[key]);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsource[key] = objects.deepClone(target[key]);\n\t\t}\n\t}\n\n\tprivate getContentsForOverrideIdentifer(identifier: string): any {\n\t\tlet contentsForIdentifierOnly: IStringDictionary<any> | null = null;\n\t\tlet contents: IStringDictionary<any> | null = null;\n\t\tconst mergeContents = (contentsToMerge: any) => {\n\t\t\tif (contentsToMerge) {\n\t\t\t\tif (contents) {\n\t\t\t\t\tthis.mergeContents(contents, contentsToMerge);\n\t\t\t\t} else {\n\t\t\t\t\tcontents = objects.deepClone(contentsToMerge);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tfor (const override of this.overrides) {\n\t\t\tif (override.identifiers.length === 1 && override.identifiers[0] === identifier) {\n\t\t\t\tcontentsForIdentifierOnly = override.contents;\n\t\t\t} else if (override.identifiers.includes(identifier)) {\n\t\t\t\tmergeContents(override.contents);\n\t\t\t}\n\t\t}\n\t\t// Merge contents of the identifier only at the end to take precedence.\n\t\tmergeContents(contentsForIdentifierOnly);\n\t\treturn contents;\n\t}\n\n\ttoJSON(): IConfigurationModel {\n\t\treturn {\n\t\t\tcontents: this.contents,\n\t\t\toverrides: this.overrides,\n\t\t\tkeys: this.keys\n\t\t};\n\t}\n\n\tpublic setValue(key: string, value: any): void {\n\t\tthis.updateValue(key, value, false);\n\t}\n\n\tpublic removeValue(key: string): void {\n\t\tconst index = this.keys.indexOf(key);\n\t\tif (index === -1) {\n\t\t\treturn;\n\t\t}\n\t\tthis.keys.splice(index, 1);\n\t\tremoveFromValueTree(this.contents, key);\n\t\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\t\tthis.overrides.splice(this.overrides.findIndex(o => arrays.equals(o.identifiers, overrideIdentifiersFromKey(key))), 1);\n\t\t}\n\t}\n\n\tprivate updateValue(key: string, value: any, add: boolean): void {\n\t\taddToValueTree(this.contents, key, value, e => this.logService.error(e));\n\t\tadd = add || this.keys.indexOf(key) === -1;\n\t\tif (add) {\n\t\t\tthis.keys.push(key);\n\t\t}\n\t\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\t\tconst identifiers = overrideIdentifiersFromKey(key);\n\t\t\tconst override = {\n\t\t\t\tidentifiers,\n\t\t\t\tkeys: Object.keys(this.contents[key]),\n\t\t\t\tcontents: toValuesTree(this.contents[key], message => this.logService.error(message)),\n\t\t\t};\n\t\t\tconst index = this.overrides.findIndex(o => arrays.equals(o.identifiers, identifiers));\n\t\t\tif (index !== -1) {\n\t\t\t\tthis.overrides[index] = override;\n\t\t\t} else {\n\t\t\t\tthis.overrides.push(override);\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport interface ConfigurationParseOptions {\n\tskipUnregistered?: boolean;\n\tscopes?: ConfigurationScope[];\n\tskipRestricted?: boolean;\n\tinclude?: string[];\n\texclude?: string[];\n}\n\nexport class ConfigurationModelParser {\n\n\tprivate _raw: any = null;\n\tprivate _configurationModel: ConfigurationModel | null = null;\n\tprivate _restrictedConfigurations: string[] = [];\n\n\tconstructor(\n\t\tprotected readonly _name: string,\n\t\tprotected readonly logService: ILogService\n\t) { }\n\n\tget configurationModel(): ConfigurationModel {\n\t\treturn this._configurationModel || ConfigurationModel.createEmptyModel(this.logService);\n\t}\n\n\tpublic parseRaw(raw: any, options?: ConfigurationParseOptions): void {\n\t\tthis._raw = raw;\n\t\tconst { contents, keys, overrides, restricted, hasExcludedProperties } = this.doParseRaw(raw, options);\n\t\tthis._configurationModel = new ConfigurationModel(contents, keys, overrides, hasExcludedProperties ? [raw] : undefined /* raw has not changed */, this.logService);\n\t\tthis._restrictedConfigurations = restricted || [];\n\t}\n\n\tprotected doParseRaw(raw: any, options?: ConfigurationParseOptions): IConfigurationModel & { restricted?: string[]; hasExcludedProperties?: boolean } {\n\t\tconst configurationProperties = Registry.as<IConfigurationRegistry>(Extensions.Configuration).getConfigurationProperties();\n\t\tconst filtered = this.filter(raw, configurationProperties, true, options);\n\t\traw = filtered.raw;\n\t\tconst contents = toValuesTree(raw, message => this.logService.error(`Conflict in settings file ${this._name}: ${message}`));\n\t\tconst keys = Object.keys(raw);\n\t\tconst overrides = this.toOverrides(raw, message => this.logService.error(`Conflict in settings file ${this._name}: ${message}`));\n\t\treturn { contents, keys, overrides, restricted: filtered.restricted, hasExcludedProperties: filtered.hasExcludedProperties };\n\t}\n\n\tprivate filter(properties: any, configurationProperties: { [qualifiedKey: string]: IConfigurationPropertySchema | undefined }, filterOverriddenProperties: boolean, options?: ConfigurationParseOptions): { raw: {}; restricted: string[]; hasExcludedProperties: boolean } {\n\t\tlet hasExcludedProperties = false;\n\t\tif (!options?.scopes && !options?.skipRestricted && !options?.exclude?.length) {\n\t\t\treturn { raw: properties, restricted: [], hasExcludedProperties };\n\t\t}\n\t\tconst raw: any = {};\n\t\tconst restricted: string[] = [];\n\t\tfor (const key in properties) {\n\t\t\tif (OVERRIDE_PROPERTY_REGEX.test(key) && filterOverriddenProperties) {\n\t\t\t\tconst result = this.filter(properties[key], configurationProperties, false, options);\n\t\t\t\traw[key] = result.raw;\n\t\t\t\thasExcludedProperties = hasExcludedProperties || result.hasExcludedProperties;\n\t\t\t\trestricted.push(...result.restricted);\n\t\t\t} else {\n\t\t\t\tconst propertySchema = configurationProperties[key];\n\t\t\t\tif (propertySchema?.restricted) {\n\t\t\t\t\trestricted.push(key);\n\t\t\t\t}\n\t\t\t\tif (this.shouldInclude(key, propertySchema, options)) {\n\t\t\t\t\traw[key] = properties[key];\n\t\t\t\t} else {\n\t\t\t\t\thasExcludedProperties = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn { raw, restricted, hasExcludedProperties };\n\t}\n\n\tprivate shouldInclude(key: string, propertySchema: IConfigurationPropertySchema | undefined, options: ConfigurationParseOptions): boolean {\n\t\tif (options.exclude?.includes(key)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (options.include?.includes(key)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (options.skipRestricted && propertySchema?.restricted) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (options.skipUnregistered && !propertySchema) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst scope = propertySchema ? typeof propertySchema.scope !== 'undefined' ? propertySchema.scope : ConfigurationScope.WINDOW : undefined;\n\t\tif (scope === undefined || options.scopes === undefined) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn options.scopes.includes(scope);\n\t}\n\n\tprivate toOverrides(raw: any, conflictReporter: (message: string) => void): IOverrides[] {\n\t\tconst overrides: IOverrides[] = [];\n\t\tfor (const key of Object.keys(raw)) {\n\t\t\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\t\t\tconst overrideRaw: any = {};\n\t\t\t\tfor (const keyInOverrideRaw in raw[key]) {\n\t\t\t\t\toverrideRaw[keyInOverrideRaw] = raw[key][keyInOverrideRaw];\n\t\t\t\t}\n\t\t\t\toverrides.push({\n\t\t\t\t\tidentifiers: overrideIdentifiersFromKey(key),\n\t\t\t\t\tkeys: Object.keys(overrideRaw),\n\t\t\t\t\tcontents: toValuesTree(overrideRaw, conflictReporter)\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn overrides;\n\t}\n\n}\n\nclass ConfigurationInspectValue<V> implements IConfigurationValue<V> {\n\n\tconstructor(\n\t\tprivate readonly key: string,\n\t\tprivate readonly overrides: IConfigurationOverrides,\n\t\tprivate readonly _value: V | undefined,\n\t\treadonly overrideIdentifiers: string[] | undefined,\n\t\tprivate readonly defaultConfiguration: ConfigurationModel,\n\t\tprivate readonly policyConfiguration: ConfigurationModel | undefined,\n\t\tprivate readonly applicationConfiguration: ConfigurationModel | undefined,\n\t\tprivate readonly userConfiguration: ConfigurationModel,\n\t\tprivate readonly localUserConfiguration: ConfigurationModel,\n\t\tprivate readonly remoteUserConfiguration: ConfigurationModel,\n\t\tprivate readonly workspaceConfiguration: ConfigurationModel | undefined,\n\t\tprivate readonly folderConfigurationModel: ConfigurationModel | undefined,\n\t\tprivate readonly memoryConfigurationModel: ConfigurationModel\n\t) {\n\t}\n\n\tprivate toInspectValue(inspectValue: IInspectValue<V> | undefined | null): IInspectValue<V> | undefined {\n\t\treturn inspectValue?.value !== undefined || inspectValue?.override !== undefined || inspectValue?.overrides !== undefined ? inspectValue : undefined;\n\t}\n\n\tprivate _userInspectValue: InspectValue<V> | undefined;\n\tprivate get userInspectValue(): InspectValue<V> {\n\t\tif (!this._userInspectValue) {\n\t\t\tthis._userInspectValue = this.userConfiguration.inspect<V>(this.key, this.overrides.overrideIdentifier);\n\t\t}\n\t\treturn this._userInspectValue;\n\t}\n\n\tget user(): IInspectValue<V> | undefined {\n\t\treturn this.toInspectValue(this.userInspectValue);\n\t}\n\n}\n\nexport class Configuration {\n\n\tprivate _workspaceConsolidatedConfiguration: ConfigurationModel | null = null;\n\tprivate _foldersConsolidatedConfigurations = new ResourceMap<ConfigurationModel>();\n\n\tconstructor(\n\t\tprivate _defaultConfiguration: ConfigurationModel,\n\t\tprivate _policyConfiguration: ConfigurationModel,\n\t\tprivate _applicationConfiguration: ConfigurationModel,\n\t\tprivate _localUserConfiguration: ConfigurationModel,\n\t\tprivate _remoteUserConfiguration: ConfigurationModel,\n\t\tprivate _workspaceConfiguration: ConfigurationModel,\n\t\tprivate _folderConfigurations: ResourceMap<ConfigurationModel>,\n\t\tprivate _memoryConfiguration: ConfigurationModel,\n\t\tprivate _memoryConfigurationByResource: ResourceMap<ConfigurationModel>,\n\t\tprivate readonly logService: ILogService\n\t) {\n\t}\n\n\tgetValue(section: string | undefined, overrides: IConfigurationOverrides, workspace: Workspace | undefined): any {\n\t\tconst consolidateConfigurationModel = this.getConsolidatedConfigurationModel(section, overrides, workspace);\n\t\treturn consolidateConfigurationModel.getValue(section);\n\t}\n\n\tupdateValue(key: string, value: any, overrides: IConfigurationUpdateOverrides = {}): void {\n\t\tlet memoryConfiguration: ConfigurationModel | undefined;\n\t\tif (overrides.resource) {\n\t\t\tmemoryConfiguration = this._memoryConfigurationByResource.get(overrides.resource);\n\t\t\tif (!memoryConfiguration) {\n\t\t\t\tmemoryConfiguration = ConfigurationModel.createEmptyModel(this.logService);\n\t\t\t\tthis._memoryConfigurationByResource.set(overrides.resource, memoryConfiguration);\n\t\t\t}\n\t\t} else {\n\t\t\tmemoryConfiguration = this._memoryConfiguration;\n\t\t}\n\n\t\tif (value === undefined) {\n\t\t\tmemoryConfiguration.removeValue(key);\n\t\t} else {\n\t\t\tmemoryConfiguration.setValue(key, value);\n\t\t}\n\n\t\tif (!overrides.resource) {\n\t\t\tthis._workspaceConsolidatedConfiguration = null;\n\t\t}\n\t}\n\n\tinspect<C>(key: string, overrides: IConfigurationOverrides, workspace: Workspace | undefined): IConfigurationValue<C> {\n\t\tconst consolidateConfigurationModel = this.getConsolidatedConfigurationModel(key, overrides, workspace);\n\t\tconst folderConfigurationModel = this.getFolderConfigurationModelForResource(overrides.resource, workspace);\n\t\tconst memoryConfigurationModel = overrides.resource ? this._memoryConfigurationByResource.get(overrides.resource) || this._memoryConfiguration : this._memoryConfiguration;\n\t\tconst overrideIdentifiers = new Set<string>();\n\t\tfor (const override of consolidateConfigurationModel.overrides) {\n\t\t\tfor (const overrideIdentifier of override.identifiers) {\n\t\t\t\tif (consolidateConfigurationModel.getOverrideValue(key, overrideIdentifier) !== undefined) {\n\t\t\t\t\toverrideIdentifiers.add(overrideIdentifier);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn new ConfigurationInspectValue<C>(\n\t\t\tkey,\n\t\t\toverrides,\n\t\t\tconsolidateConfigurationModel.getValue<C>(key),\n\t\t\toverrideIdentifiers.size ? [...overrideIdentifiers] : undefined,\n\t\t\tthis._defaultConfiguration,\n\t\t\tthis._policyConfiguration.isEmpty() ? undefined : this._policyConfiguration,\n\t\t\tthis.applicationConfiguration.isEmpty() ? undefined : this.applicationConfiguration,\n\t\t\tthis.userConfiguration,\n\t\t\tthis.localUserConfiguration,\n\t\t\tthis.remoteUserConfiguration,\n\t\t\tworkspace ? this._workspaceConfiguration : undefined,\n\t\t\tfolderConfigurationModel ? folderConfigurationModel : undefined,\n\t\t\tmemoryConfigurationModel\n\t\t);\n\n\t}\n\n\tget applicationConfiguration(): ConfigurationModel {\n\t\treturn this._applicationConfiguration;\n\t}\n\n\tprivate _userConfiguration: ConfigurationModel | null = null;\n\tget userConfiguration(): ConfigurationModel {\n\t\tif (!this._userConfiguration) {\n\t\t\tif (this._remoteUserConfiguration.isEmpty()) {\n\t\t\t\tthis._userConfiguration = this._localUserConfiguration;\n\t\t\t} else {\n\t\t\t\tconst merged = this._localUserConfiguration.merge(this._remoteUserConfiguration);\n\t\t\t\tthis._userConfiguration = new ConfigurationModel(merged.contents, merged.keys, merged.overrides, undefined, this.logService);\n\t\t\t}\n\t\t}\n\t\treturn this._userConfiguration;\n\t}\n\n\tget localUserConfiguration(): ConfigurationModel {\n\t\treturn this._localUserConfiguration;\n\t}\n\n\tget remoteUserConfiguration(): ConfigurationModel {\n\t\treturn this._remoteUserConfiguration;\n\t}\n\n\tprivate getConsolidatedConfigurationModel(section: string | undefined, overrides: IConfigurationOverrides, workspace: Workspace | undefined): ConfigurationModel {\n\t\tlet configurationModel = this.getConsolidatedConfigurationModelForResource(overrides, workspace);\n\t\tif (overrides.overrideIdentifier) {\n\t\t\tconfigurationModel = configurationModel.override(overrides.overrideIdentifier);\n\t\t}\n\t\tif (!this._policyConfiguration.isEmpty() && this._policyConfiguration.getValue(section) !== undefined) {\n\t\t\t// clone by merging\n\t\t\tconfigurationModel = configurationModel.merge();\n\t\t\tfor (const key of this._policyConfiguration.keys) {\n\t\t\t\tconfigurationModel.setValue(key, this._policyConfiguration.getValue(key));\n\t\t\t}\n\t\t}\n\t\treturn configurationModel;\n\t}\n\n\tprivate getConsolidatedConfigurationModelForResource({ resource }: IConfigurationOverrides, workspace: Workspace | undefined): ConfigurationModel {\n\t\tlet consolidateConfiguration = this.getWorkspaceConsolidatedConfiguration();\n\n\t\tif (workspace && resource) {\n\t\t\tconst root = workspace.getFolder(resource);\n\t\t\tif (root) {\n\t\t\t\tconsolidateConfiguration = this.getFolderConsolidatedConfiguration(root.uri) || consolidateConfiguration;\n\t\t\t}\n\t\t\tconst memoryConfigurationForResource = this._memoryConfigurationByResource.get(resource);\n\t\t\tif (memoryConfigurationForResource) {\n\t\t\t\tconsolidateConfiguration = consolidateConfiguration.merge(memoryConfigurationForResource);\n\t\t\t}\n\t\t}\n\n\t\treturn consolidateConfiguration;\n\t}\n\n\tprivate getWorkspaceConsolidatedConfiguration(): ConfigurationModel {\n\t\tif (!this._workspaceConsolidatedConfiguration) {\n\t\t\tthis._workspaceConsolidatedConfiguration = this._defaultConfiguration.merge(this.applicationConfiguration, this.userConfiguration, this._workspaceConfiguration, this._memoryConfiguration);\n\t\t}\n\t\treturn this._workspaceConsolidatedConfiguration;\n\t}\n\n\tprivate getFolderConsolidatedConfiguration(folder: URI): ConfigurationModel {\n\t\tlet folderConsolidatedConfiguration = this._foldersConsolidatedConfigurations.get(folder);\n\t\tif (!folderConsolidatedConfiguration) {\n\t\t\tconst workspaceConsolidateConfiguration = this.getWorkspaceConsolidatedConfiguration();\n\t\t\tconst folderConfiguration = this._folderConfigurations.get(folder);\n\t\t\tif (folderConfiguration) {\n\t\t\t\tfolderConsolidatedConfiguration = workspaceConsolidateConfiguration.merge(folderConfiguration);\n\t\t\t\tthis._foldersConsolidatedConfigurations.set(folder, folderConsolidatedConfiguration);\n\t\t\t} else {\n\t\t\t\tfolderConsolidatedConfiguration = workspaceConsolidateConfiguration;\n\t\t\t}\n\t\t}\n\t\treturn folderConsolidatedConfiguration;\n\t}\n\n\tprivate getFolderConfigurationModelForResource(resource: URI | null | undefined, workspace: Workspace | undefined): ConfigurationModel | undefined {\n\t\tif (workspace && resource) {\n\t\t\tconst root = workspace.getFolder(resource);\n\t\t\tif (root) {\n\t\t\t\treturn this._folderConfigurations.get(root.uri);\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\ttoData(): IConfigurationData {\n\t\treturn {\n\t\t\tdefaults: {\n\t\t\t\tcontents: this._defaultConfiguration.contents,\n\t\t\t\toverrides: this._defaultConfiguration.overrides,\n\t\t\t\tkeys: this._defaultConfiguration.keys,\n\t\t\t},\n\t\t\tpolicy: {\n\t\t\t\tcontents: this._policyConfiguration.contents,\n\t\t\t\toverrides: this._policyConfiguration.overrides,\n\t\t\t\tkeys: this._policyConfiguration.keys\n\t\t\t},\n\t\t\tapplication: {\n\t\t\t\tcontents: this.applicationConfiguration.contents,\n\t\t\t\toverrides: this.applicationConfiguration.overrides,\n\t\t\t\tkeys: this.applicationConfiguration.keys,\n\t\t\t\traw: Array.isArray(this.applicationConfiguration.raw) ? undefined : this.applicationConfiguration.raw\n\t\t\t},\n\t\t\tuserLocal: {\n\t\t\t\tcontents: this.localUserConfiguration.contents,\n\t\t\t\toverrides: this.localUserConfiguration.overrides,\n\t\t\t\tkeys: this.localUserConfiguration.keys,\n\t\t\t\traw: Array.isArray(this.localUserConfiguration.raw) ? undefined : this.localUserConfiguration.raw\n\t\t\t},\n\t\t\tuserRemote: {\n\t\t\t\tcontents: this.remoteUserConfiguration.contents,\n\t\t\t\toverrides: this.remoteUserConfiguration.overrides,\n\t\t\t\tkeys: this.remoteUserConfiguration.keys,\n\t\t\t\traw: Array.isArray(this.remoteUserConfiguration.raw) ? undefined : this.remoteUserConfiguration.raw\n\t\t\t},\n\t\t\tworkspace: {\n\t\t\t\tcontents: this._workspaceConfiguration.contents,\n\t\t\t\toverrides: this._workspaceConfiguration.overrides,\n\t\t\t\tkeys: this._workspaceConfiguration.keys\n\t\t\t},\n\t\t\tfolders: [...this._folderConfigurations.keys()].reduce<[UriComponents, IConfigurationModel][]>((result, folder) => {\n\t\t\t\tconst { contents, overrides, keys } = this._folderConfigurations.get(folder)!;\n\t\t\t\tresult.push([folder, { contents, overrides, keys }]);\n\t\t\t\treturn result;\n\t\t\t}, [])\n\t\t};\n\t}\n\n\tstatic parse(data: IConfigurationData, logService: ILogService): Configuration {\n\t\tconst defaultConfiguration = this.parseConfigurationModel(data.defaults, logService);\n\t\tconst policyConfiguration = this.parseConfigurationModel(data.policy, logService);\n\t\tconst applicationConfiguration = this.parseConfigurationModel(data.application, logService);\n\t\tconst userLocalConfiguration = this.parseConfigurationModel(data.userLocal, logService);\n\t\tconst userRemoteConfiguration = this.parseConfigurationModel(data.userRemote, logService);\n\t\tconst workspaceConfiguration = this.parseConfigurationModel(data.workspace, logService);\n\t\tconst folders: ResourceMap<ConfigurationModel> = data.folders.reduce((result, value) => {\n\t\t\tresult.set(URI.revive(value[0]), this.parseConfigurationModel(value[1], logService));\n\t\t\treturn result;\n\t\t}, new ResourceMap<ConfigurationModel>());\n\t\treturn new Configuration(\n\t\t\tdefaultConfiguration,\n\t\t\tpolicyConfiguration,\n\t\t\tapplicationConfiguration,\n\t\t\tuserLocalConfiguration,\n\t\t\tuserRemoteConfiguration,\n\t\t\tworkspaceConfiguration,\n\t\t\tfolders,\n\t\t\tConfigurationModel.createEmptyModel(logService),\n\t\t\tnew ResourceMap<ConfigurationModel>(),\n\t\t\tlogService\n\t\t);\n\t}\n\n\tprivate static parseConfigurationModel(model: IConfigurationModel, logService: ILogService): ConfigurationModel {\n\t\treturn new ConfigurationModel(model.contents, model.keys, model.overrides, model.raw, logService);\n\t}\n\n}\n\nexport class ConfigurationChangeEvent implements IConfigurationChangeEvent {\n\n\tprivate readonly _marker = '\\n';\n\tprivate readonly _markerCode1 = this._marker.charCodeAt(0);\n\tprivate readonly _markerCode2 = '.'.charCodeAt(0);\n\tprivate readonly _affectsConfigStr: string;\n\n\treadonly affectedKeys = new Set<string>();\n\tsource!: ConfigurationTarget;\n\n\tconstructor(\n\t\treadonly change: IConfigurationChange,\n\t\tprivate readonly previous: { workspace?: Workspace; data: IConfigurationData } | undefined,\n\t\tprivate readonly currentConfiguraiton: Configuration,\n\t\tprivate readonly currentWorkspace: Workspace | undefined,\n\t\tprivate readonly logService: ILogService\n\t) {\n\t\tfor (const key of change.keys) {\n\t\t\tthis.affectedKeys.add(key);\n\t\t}\n\t\tfor (const [, keys] of change.overrides) {\n\t\t\tfor (const key of keys) {\n\t\t\t\tthis.affectedKeys.add(key);\n\t\t\t}\n\t\t}\n\n\t\t// Example: '\\nfoo.bar\\nabc.def\\n'\n\t\tthis._affectsConfigStr = this._marker;\n\t\tfor (const key of this.affectedKeys) {\n\t\t\tthis._affectsConfigStr += key + this._marker;\n\t\t}\n\t}\n\n\tprivate _previousConfiguration: Configuration | undefined = undefined;\n\tget previousConfiguration(): Configuration | undefined {\n\t\tif (!this._previousConfiguration && this.previous) {\n\t\t\tthis._previousConfiguration = Configuration.parse(this.previous.data, this.logService);\n\t\t}\n\t\treturn this._previousConfiguration;\n\t}\n\n\taffectsConfiguration(section: string, overrides?: IConfigurationOverrides): boolean {\n\t\t// we have one large string with all keys that have changed. we pad (marker) the section\n\t\t// and check that either find it padded or before a segment character\n\t\tconst needle = this._marker + section;\n\t\tconst idx = this._affectsConfigStr.indexOf(needle);\n\t\tif (idx < 0) {\n\t\t\t// NOT: (marker + section)\n\t\t\treturn false;\n\t\t}\n\t\tconst pos = idx + needle.length;\n\t\tif (pos >= this._affectsConfigStr.length) {\n\t\t\treturn false;\n\t\t}\n\t\tconst code = this._affectsConfigStr.charCodeAt(pos);\n\t\tif (code !== this._markerCode1 && code !== this._markerCode2) {\n\t\t\t// NOT: section + (marker | segment)\n\t\t\treturn false;\n\t\t}\n\t\tif (overrides) {\n\t\t\tconst value1 = this.previousConfiguration ? this.previousConfiguration.getValue(section, overrides, this.previous?.workspace) : undefined;\n\t\t\tconst value2 = this.currentConfiguraiton.getValue(section, overrides, this.currentWorkspace);\n\t\t\treturn !objects.equals(value1, value2);\n\t\t}\n\t\treturn true;\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as arrays from '../../../base/common/arrays.js';\nimport { IStringDictionary } from '../../../base/common/collections.js';\nimport { ResourceMap } from '../../../base/common/map.js';\nimport * as objects from '../../../base/common/objects.js';\nimport * as types from '../../../base/common/types.js';\nimport { URI, UriComponents } from '../../../base/common/uri.js';\nimport { addToValueTree, ConfigurationTarget, getConfigurationValue, IConfigurationChange, IConfigurationChangeEvent, IConfigurationData, IConfigurationModel, IConfigurationOverrides, IConfigurationUpdateOverrides, IConfigurationValue, IInspectValue, IOverrides, removeFromValueTree, toValuesTree } from './configuration.js';\nimport { ConfigurationScope, Extensions, IConfigurationPropertySchema, IConfigurationRegistry, overrideIdentifiersFromKey, OVERRIDE_PROPERTY_REGEX } from './configurationRegistry.js';\nimport { ILogService } from '../../log/common/log.js';\nimport { Registry } from '../../registry/common/platform.js';\nimport { Workspace } from '../../workspace/common/workspace.js';\n\nfunction freeze<T>(data: T): T {\n\treturn Object.isFrozen(data) ? data : objects.deepFreeze(data);\n}\n\ntype InspectValue<V> = IInspectValue<V> & { merged?: V };\n\nexport class ConfigurationModel implements IConfigurationModel {\n\n\tstatic createEmptyModel(logService: ILogService): ConfigurationModel {\n\t\treturn new ConfigurationModel({}, [], [], undefined, logService);\n\t}\n\n\tprivate readonly overrideConfigurations = new Map<string, ConfigurationModel>();\n\n\tconstructor(\n\t\tprivate readonly _contents: any,\n\t\tprivate readonly _keys: string[],\n\t\tprivate readonly _overrides: IOverrides[],\n\t\treadonly raw: IStringDictionary<any> | ReadonlyArray<IStringDictionary<any> | ConfigurationModel> | undefined,\n\t\tprivate readonly logService: ILogService\n\t) {\n\t}\n\n\tprivate _rawConfiguration: ConfigurationModel | undefined;\n\tget rawConfiguration(): ConfigurationModel {\n\t\tif (!this._rawConfiguration) {\n\t\t\tif (this.raw) {\n\t\t\t\tconst rawConfigurationModels = (Array.isArray(this.raw) ? this.raw : [this.raw]).map(raw => {\n\t\t\t\t\tif (raw instanceof ConfigurationModel) {\n\t\t\t\t\t\treturn raw;\n\t\t\t\t\t}\n\t\t\t\t\tconst parser = new ConfigurationModelParser('', this.logService);\n\t\t\t\t\tparser.parseRaw(raw);\n\t\t\t\t\treturn parser.configurationModel;\n\t\t\t\t});\n\t\t\t\tthis._rawConfiguration = rawConfigurationModels.reduce((previous, current) => current === previous ? current : previous.merge(current), rawConfigurationModels[0]);\n\t\t\t} else {\n\t\t\t\t// raw is same as current\n\t\t\t\tthis._rawConfiguration = this;\n\t\t\t}\n\t\t}\n\t\treturn this._rawConfiguration;\n\t}\n\n\tget contents(): any {\n\t\treturn this._contents;\n\t}\n\n\tget overrides(): IOverrides[] {\n\t\treturn this._overrides;\n\t}\n\n\tget keys(): string[] {\n\t\treturn this._keys;\n\t}\n\n\tisEmpty(): boolean {\n\t\treturn this._keys.length === 0 && Object.keys(this._contents).length === 0 && this._overrides.length === 0;\n\t}\n\n\tgetValue<V>(section: string | undefined): V {\n\t\treturn section ? getConfigurationValue<any>(this.contents, section) : this.contents;\n\t}\n\n\tinspect<V>(section: string | undefined, overrideIdentifier?: string | null): InspectValue<V> {\n\t\tconst that = this;\n\t\treturn {\n\t\t\tget value() {\n\t\t\t\treturn freeze(that.rawConfiguration.getValue<V>(section));\n\t\t\t},\n\t\t\tget override() {\n\t\t\t\treturn overrideIdentifier ? freeze(that.rawConfiguration.getOverrideValue<V>(section, overrideIdentifier)) : undefined;\n\t\t\t},\n\t\t\tget merged() {\n\t\t\t\treturn freeze(overrideIdentifier ? that.rawConfiguration.override(overrideIdentifier).getValue<V>(section) : that.rawConfiguration.getValue<V>(section));\n\t\t\t},\n\t\t\tget overrides() {\n\t\t\t\tconst overrides: { readonly identifiers: string[]; readonly value: V }[] = [];\n\t\t\t\tfor (const { contents, identifiers, keys } of that.rawConfiguration.overrides) {\n\t\t\t\t\tconst value = new ConfigurationModel(contents, keys, [], undefined, that.logService).getValue<V>(section);\n\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\toverrides.push({ identifiers, value });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn overrides.length ? freeze(overrides) : undefined;\n\t\t\t}\n\t\t};\n\t}\n\n\tgetOverrideValue<V>(section: string | undefined, overrideIdentifier: string): V | undefined {\n\t\tconst overrideContents = this.getContentsForOverrideIdentifer(overrideIdentifier);\n\t\treturn overrideContents\n\t\t\t? section ? getConfigurationValue<any>(overrideContents, section) : overrideContents\n\t\t\t: undefined;\n\t}\n\n\toverride(identifier: string): ConfigurationModel {\n\t\tlet overrideConfigurationModel = this.overrideConfigurations.get(identifier);\n\t\tif (!overrideConfigurationModel) {\n\t\t\toverrideConfigurationModel = this.createOverrideConfigurationModel(identifier);\n\t\t\tthis.overrideConfigurations.set(identifier, overrideConfigurationModel);\n\t\t}\n\t\treturn overrideConfigurationModel;\n\t}\n\n\tmerge(...others: ConfigurationModel[]): ConfigurationModel {\n\t\tconst contents = objects.deepClone(this.contents);\n\t\tconst overrides = objects.deepClone(this.overrides);\n\t\tconst keys = [...this.keys];\n\t\tconst raws = this.raw ? Array.isArray(this.raw) ? [...this.raw] : [this.raw] : [this];\n\n\t\tfor (const other of others) {\n\t\t\traws.push(...(other.raw ? Array.isArray(other.raw) ? other.raw : [other.raw] : [other]));\n\t\t\tif (other.isEmpty()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.mergeContents(contents, other.contents);\n\n\t\t\tfor (const otherOverride of other.overrides) {\n\t\t\t\tconst [override] = overrides.filter(o => arrays.equals(o.identifiers, otherOverride.identifiers));\n\t\t\t\tif (override) {\n\t\t\t\t\tthis.mergeContents(override.contents, otherOverride.contents);\n\t\t\t\t\toverride.keys.push(...otherOverride.keys);\n\t\t\t\t\toverride.keys = arrays.distinct(override.keys);\n\t\t\t\t} else {\n\t\t\t\t\toverrides.push(objects.deepClone(otherOverride));\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const key of other.keys) {\n\t\t\t\tif (keys.indexOf(key) === -1) {\n\t\t\t\t\tkeys.push(key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new ConfigurationModel(contents, keys, overrides, !raws.length || raws.every(raw => raw instanceof ConfigurationModel) ? undefined : raws, this.logService);\n\t}\n\n\tprivate createOverrideConfigurationModel(identifier: string): ConfigurationModel {\n\t\tconst overrideContents = this.getContentsForOverrideIdentifer(identifier);\n\n\t\tif (!overrideContents || typeof overrideContents !== 'object' || !Object.keys(overrideContents).length) {\n\t\t\t// If there are no valid overrides, return self\n\t\t\treturn this;\n\t\t}\n\n\t\tconst contents: any = {};\n\t\tfor (const key of arrays.distinct([...Object.keys(this.contents), ...Object.keys(overrideContents)])) {\n\n\t\t\tlet contentsForKey = this.contents[key];\n\t\t\tconst overrideContentsForKey = overrideContents[key];\n\n\t\t\t// If there are override contents for the key, clone and merge otherwise use base contents\n\t\t\tif (overrideContentsForKey) {\n\t\t\t\t// Clone and merge only if base contents and override contents are of type object otherwise just override\n\t\t\t\tif (typeof contentsForKey === 'object' && typeof overrideContentsForKey === 'object') {\n\t\t\t\t\tcontentsForKey = objects.deepClone(contentsForKey);\n\t\t\t\t\tthis.mergeContents(contentsForKey, overrideContentsForKey);\n\t\t\t\t} else {\n\t\t\t\t\tcontentsForKey = overrideContentsForKey;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcontents[key] = contentsForKey;\n\t\t}\n\n\t\treturn new ConfigurationModel(contents, this.keys, this.overrides, undefined, this.logService);\n\t}\n\n\tprivate mergeContents(source: any, target: any): void {\n\t\tfor (const key of Object.keys(target)) {\n\t\t\tif (key in source) {\n\t\t\t\tif (types.isObject(source[key]) && types.isObject(target[key])) {\n\t\t\t\t\tthis.mergeContents(source[key], target[key]);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsource[key] = objects.deepClone(target[key]);\n\t\t}\n\t}\n\n\tprivate getContentsForOverrideIdentifer(identifier: string): any {\n\t\tlet contentsForIdentifierOnly: IStringDictionary<any> | null = null;\n\t\tlet contents: IStringDictionary<any> | null = null;\n\t\tconst mergeContents = (contentsToMerge: any) => {\n\t\t\tif (contentsToMerge) {\n\t\t\t\tif (contents) {\n\t\t\t\t\tthis.mergeContents(contents, contentsToMerge);\n\t\t\t\t} else {\n\t\t\t\t\tcontents = objects.deepClone(contentsToMerge);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tfor (const override of this.overrides) {\n\t\t\tif (override.identifiers.length === 1 && override.identifiers[0] === identifier) {\n\t\t\t\tcontentsForIdentifierOnly = override.contents;\n\t\t\t} else if (override.identifiers.includes(identifier)) {\n\t\t\t\tmergeContents(override.contents);\n\t\t\t}\n\t\t}\n\t\t// Merge contents of the identifier only at the end to take precedence.\n\t\tmergeContents(contentsForIdentifierOnly);\n\t\treturn contents;\n\t}\n\n\ttoJSON(): IConfigurationModel {\n\t\treturn {\n\t\t\tcontents: this.contents,\n\t\t\toverrides: this.overrides,\n\t\t\tkeys: this.keys\n\t\t};\n\t}\n\n\tpublic setValue(key: string, value: any): void {\n\t\tthis.updateValue(key, value, false);\n\t}\n\n\tpublic removeValue(key: string): void {\n\t\tconst index = this.keys.indexOf(key);\n\t\tif (index === -1) {\n\t\t\treturn;\n\t\t}\n\t\tthis.keys.splice(index, 1);\n\t\tremoveFromValueTree(this.contents, key);\n\t\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\t\tthis.overrides.splice(this.overrides.findIndex(o => arrays.equals(o.identifiers, overrideIdentifiersFromKey(key))), 1);\n\t\t}\n\t}\n\n\tprivate updateValue(key: string, value: any, add: boolean): void {\n\t\taddToValueTree(this.contents, key, value, e => this.logService.error(e));\n\t\tadd = add || this.keys.indexOf(key) === -1;\n\t\tif (add) {\n\t\t\tthis.keys.push(key);\n\t\t}\n\t\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\t\tconst identifiers = overrideIdentifiersFromKey(key);\n\t\t\tconst override = {\n\t\t\t\tidentifiers,\n\t\t\t\tkeys: Object.keys(this.contents[key]),\n\t\t\t\tcontents: toValuesTree(this.contents[key], message => this.logService.error(message)),\n\t\t\t};\n\t\t\tconst index = this.overrides.findIndex(o => arrays.equals(o.identifiers, identifiers));\n\t\t\tif (index !== -1) {\n\t\t\t\tthis.overrides[index] = override;\n\t\t\t} else {\n\t\t\t\tthis.overrides.push(override);\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport interface ConfigurationParseOptions {\n\tskipUnregistered?: boolean;\n\tscopes?: ConfigurationScope[];\n\tskipRestricted?: boolean;\n\tinclude?: string[];\n\texclude?: string[];\n}\n\nexport class ConfigurationModelParser {\n\n\tprivate _raw: any = null;\n\tprivate _configurationModel: ConfigurationModel | null = null;\n\tprivate _restrictedConfigurations: string[] = [];\n\n\tconstructor(\n\t\tprotected readonly _name: string,\n\t\tprotected readonly logService: ILogService\n\t) { }\n\n\tget configurationModel(): ConfigurationModel {\n\t\treturn this._configurationModel || ConfigurationModel.createEmptyModel(this.logService);\n\t}\n\n\tpublic parseRaw(raw: any, options?: ConfigurationParseOptions): void {\n\t\tthis._raw = raw;\n\t\tconst { contents, keys, overrides, restricted, hasExcludedProperties } = this.doParseRaw(raw, options);\n\t\tthis._configurationModel = new ConfigurationModel(contents, keys, overrides, hasExcludedProperties ? [raw] : undefined /* raw has not changed */, this.logService);\n\t\tthis._restrictedConfigurations = restricted || [];\n\t}\n\n\tprotected doParseRaw(raw: any, options?: ConfigurationParseOptions): IConfigurationModel & { restricted?: string[]; hasExcludedProperties?: boolean } {\n\t\tconst configurationProperties = Registry.as<IConfigurationRegistry>(Extensions.Configuration).getConfigurationProperties();\n\t\tconst filtered = this.filter(raw, configurationProperties, true, options);\n\t\traw = filtered.raw;\n\t\tconst contents = toValuesTree(raw, message => this.logService.error(`Conflict in settings file ${this._name}: ${message}`));\n\t\tconst keys = Object.keys(raw);\n\t\tconst overrides = this.toOverrides(raw, message => this.logService.error(`Conflict in settings file ${this._name}: ${message}`));\n\t\treturn { contents, keys, overrides, restricted: filtered.restricted, hasExcludedProperties: filtered.hasExcludedProperties };\n\t}\n\n\tprivate filter(properties: any, configurationProperties: { [qualifiedKey: string]: IConfigurationPropertySchema | undefined }, filterOverriddenProperties: boolean, options?: ConfigurationParseOptions): { raw: {}; restricted: string[]; hasExcludedProperties: boolean } {\n\t\tlet hasExcludedProperties = false;\n\t\tif (!options?.scopes && !options?.skipRestricted && !options?.exclude?.length) {\n\t\t\treturn { raw: properties, restricted: [], hasExcludedProperties };\n\t\t}\n\t\tconst raw: any = {};\n\t\tconst restricted: string[] = [];\n\t\tfor (const key in properties) {\n\t\t\tif (OVERRIDE_PROPERTY_REGEX.test(key) && filterOverriddenProperties) {\n\t\t\t\tconst result = this.filter(properties[key], configurationProperties, false, options);\n\t\t\t\traw[key] = result.raw;\n\t\t\t\thasExcludedProperties = hasExcludedProperties || result.hasExcludedProperties;\n\t\t\t\trestricted.push(...result.restricted);\n\t\t\t} else {\n\t\t\t\tconst propertySchema = configurationProperties[key];\n\t\t\t\tif (propertySchema?.restricted) {\n\t\t\t\t\trestricted.push(key);\n\t\t\t\t}\n\t\t\t\tif (this.shouldInclude(key, propertySchema, options)) {\n\t\t\t\t\traw[key] = properties[key];\n\t\t\t\t} else {\n\t\t\t\t\thasExcludedProperties = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn { raw, restricted, hasExcludedProperties };\n\t}\n\n\tprivate shouldInclude(key: string, propertySchema: IConfigurationPropertySchema | undefined, options: ConfigurationParseOptions): boolean {\n\t\tif (options.exclude?.includes(key)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (options.include?.includes(key)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (options.skipRestricted && propertySchema?.restricted) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (options.skipUnregistered && !propertySchema) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst scope = propertySchema ? typeof propertySchema.scope !== 'undefined' ? propertySchema.scope : ConfigurationScope.WINDOW : undefined;\n\t\tif (scope === undefined || options.scopes === undefined) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn options.scopes.includes(scope);\n\t}\n\n\tprivate toOverrides(raw: any, conflictReporter: (message: string) => void): IOverrides[] {\n\t\tconst overrides: IOverrides[] = [];\n\t\tfor (const key of Object.keys(raw)) {\n\t\t\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\t\t\tconst overrideRaw: any = {};\n\t\t\t\tfor (const keyInOverrideRaw in raw[key]) {\n\t\t\t\t\toverrideRaw[keyInOverrideRaw] = raw[key][keyInOverrideRaw];\n\t\t\t\t}\n\t\t\t\toverrides.push({\n\t\t\t\t\tidentifiers: overrideIdentifiersFromKey(key),\n\t\t\t\t\tkeys: Object.keys(overrideRaw),\n\t\t\t\t\tcontents: toValuesTree(overrideRaw, conflictReporter)\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn overrides;\n\t}\n\n}\n\nclass ConfigurationInspectValue<V> implements IConfigurationValue<V> {\n\n\tconstructor(\n\t\tprivate readonly key: string,\n\t\tprivate readonly overrides: IConfigurationOverrides,\n\t\tprivate readonly _value: V | undefined,\n\t\treadonly overrideIdentifiers: string[] | undefined,\n\t\tprivate readonly defaultConfiguration: ConfigurationModel,\n\t\tprivate readonly policyConfiguration: ConfigurationModel | undefined,\n\t\tprivate readonly applicationConfiguration: ConfigurationModel | undefined,\n\t\tprivate readonly userConfiguration: ConfigurationModel,\n\t\tprivate readonly localUserConfiguration: ConfigurationModel,\n\t\tprivate readonly remoteUserConfiguration: ConfigurationModel,\n\t\tprivate readonly workspaceConfiguration: ConfigurationModel | undefined,\n\t\tprivate readonly folderConfigurationModel: ConfigurationModel | undefined,\n\t\tprivate readonly memoryConfigurationModel: ConfigurationModel\n\t) {\n\t}\n\n\tprivate toInspectValue(inspectValue: IInspectValue<V> | undefined | null): IInspectValue<V> | undefined {\n\t\treturn inspectValue?.value !== undefined || inspectValue?.override !== undefined || inspectValue?.overrides !== undefined ? inspectValue : undefined;\n\t}\n\n\tprivate _userInspectValue: InspectValue<V> | undefined;\n\tprivate get userInspectValue(): InspectValue<V> {\n\t\tif (!this._userInspectValue) {\n\t\t\tthis._userInspectValue = this.userConfiguration.inspect<V>(this.key, this.overrides.overrideIdentifier);\n\t\t}\n\t\treturn this._userInspectValue;\n\t}\n\n\tget user(): IInspectValue<V> | undefined {\n\t\treturn this.toInspectValue(this.userInspectValue);\n\t}\n\n}\n\nexport class Configuration {\n\n\tprivate _workspaceConsolidatedConfiguration: ConfigurationModel | null = null;\n\tprivate _foldersConsolidatedConfigurations = new ResourceMap<ConfigurationModel>();\n\n\tconstructor(\n\t\tprivate _defaultConfiguration: ConfigurationModel,\n\t\tprivate _policyConfiguration: ConfigurationModel,\n\t\tprivate _applicationConfiguration: ConfigurationModel,\n\t\tprivate _localUserConfiguration: ConfigurationModel,\n\t\tprivate _remoteUserConfiguration: ConfigurationModel,\n\t\tprivate _workspaceConfiguration: ConfigurationModel,\n\t\tprivate _folderConfigurations: ResourceMap<ConfigurationModel>,\n\t\tprivate _memoryConfiguration: ConfigurationModel,\n\t\tprivate _memoryConfigurationByResource: ResourceMap<ConfigurationModel>,\n\t\tprivate readonly logService: ILogService\n\t) {\n\t}\n\n\tgetValue(section: string | undefined, overrides: IConfigurationOverrides, workspace: Workspace | undefined): any {\n\t\tconst consolidateConfigurationModel = this.getConsolidatedConfigurationModel(section, overrides, workspace);\n\t\treturn consolidateConfigurationModel.getValue(section);\n\t}\n\n\tupdateValue(key: string, value: any, overrides: IConfigurationUpdateOverrides = {}): void {\n\t\tlet memoryConfiguration: ConfigurationModel | undefined;\n\t\tif (overrides.resource) {\n\t\t\tmemoryConfiguration = this._memoryConfigurationByResource.get(overrides.resource);\n\t\t\tif (!memoryConfiguration) {\n\t\t\t\tmemoryConfiguration = ConfigurationModel.createEmptyModel(this.logService);\n\t\t\t\tthis._memoryConfigurationByResource.set(overrides.resource, memoryConfiguration);\n\t\t\t}\n\t\t} else {\n\t\t\tmemoryConfiguration = this._memoryConfiguration;\n\t\t}\n\n\t\tif (value === undefined) {\n\t\t\tmemoryConfiguration.removeValue(key);\n\t\t} else {\n\t\t\tmemoryConfiguration.setValue(key, value);\n\t\t}\n\n\t\tif (!overrides.resource) {\n\t\t\tthis._workspaceConsolidatedConfiguration = null;\n\t\t}\n\t}\n\n\tinspect<C>(key: string, overrides: IConfigurationOverrides, workspace: Workspace | undefined): IConfigurationValue<C> {\n\t\tconst consolidateConfigurationModel = this.getConsolidatedConfigurationModel(key, overrides, workspace);\n\t\tconst folderConfigurationModel = this.getFolderConfigurationModelForResource(overrides.resource, workspace);\n\t\tconst memoryConfigurationModel = overrides.resource ? this._memoryConfigurationByResource.get(overrides.resource) || this._memoryConfiguration : this._memoryConfiguration;\n\t\tconst overrideIdentifiers = new Set<string>();\n\t\tfor (const override of consolidateConfigurationModel.overrides) {\n\t\t\tfor (const overrideIdentifier of override.identifiers) {\n\t\t\t\tif (consolidateConfigurationModel.getOverrideValue(key, overrideIdentifier) !== undefined) {\n\t\t\t\t\toverrideIdentifiers.add(overrideIdentifier);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn new ConfigurationInspectValue<C>(\n\t\t\tkey,\n\t\t\toverrides,\n\t\t\tconsolidateConfigurationModel.getValue<C>(key),\n\t\t\toverrideIdentifiers.size ? [...overrideIdentifiers] : undefined,\n\t\t\tthis._defaultConfiguration,\n\t\t\tthis._policyConfiguration.isEmpty() ? undefined : this._policyConfiguration,\n\t\t\tthis.applicationConfiguration.isEmpty() ? undefined : this.applicationConfiguration,\n\t\t\tthis.userConfiguration,\n\t\t\tthis.localUserConfiguration,\n\t\t\tthis.remoteUserConfiguration,\n\t\t\tworkspace ? this._workspaceConfiguration : undefined,\n\t\t\tfolderConfigurationModel ? folderConfigurationModel : undefined,\n\t\t\tmemoryConfigurationModel\n\t\t);\n\n\t}\n\n\tget applicationConfiguration(): ConfigurationModel {\n\t\treturn this._applicationConfiguration;\n\t}\n\n\tprivate _userConfiguration: ConfigurationModel | null = null;\n\tget userConfiguration(): ConfigurationModel {\n\t\tif (!this._userConfiguration) {\n\t\t\tif (this._remoteUserConfiguration.isEmpty()) {\n\t\t\t\tthis._userConfiguration = this._localUserConfiguration;\n\t\t\t} else {\n\t\t\t\tconst merged = this._localUserConfiguration.merge(this._remoteUserConfiguration);\n\t\t\t\tthis._userConfiguration = new ConfigurationModel(merged.contents, merged.keys, merged.overrides, undefined, this.logService);\n\t\t\t}\n\t\t}\n\t\treturn this._userConfiguration;\n\t}\n\n\tget localUserConfiguration(): ConfigurationModel {\n\t\treturn this._localUserConfiguration;\n\t}\n\n\tget remoteUserConfiguration(): ConfigurationModel {\n\t\treturn this._remoteUserConfiguration;\n\t}\n\n\tprivate getConsolidatedConfigurationModel(section: string | undefined, overrides: IConfigurationOverrides, workspace: Workspace | undefined): ConfigurationModel {\n\t\tlet configurationModel = this.getConsolidatedConfigurationModelForResource(overrides, workspace);\n\t\tif (overrides.overrideIdentifier) {\n\t\t\tconfigurationModel = configurationModel.override(overrides.overrideIdentifier);\n\t\t}\n\t\tif (!this._policyConfiguration.isEmpty() && this._policyConfiguration.getValue(section) !== undefined) {\n\t\t\t// clone by merging\n\t\t\tconfigurationModel = configurationModel.merge();\n\t\t\tfor (const key of this._policyConfiguration.keys) {\n\t\t\t\tconfigurationModel.setValue(key, this._policyConfiguration.getValue(key));\n\t\t\t}\n\t\t}\n\t\treturn configurationModel;\n\t}\n\n\tprivate getConsolidatedConfigurationModelForResource({ resource }: IConfigurationOverrides, workspace: Workspace | undefined): ConfigurationModel {\n\t\tlet consolidateConfiguration = this.getWorkspaceConsolidatedConfiguration();\n\n\t\tif (workspace && resource) {\n\t\t\tconst root = workspace.getFolder(resource);\n\t\t\tif (root) {\n\t\t\t\tconsolidateConfiguration = this.getFolderConsolidatedConfiguration(root.uri) || consolidateConfiguration;\n\t\t\t}\n\t\t\tconst memoryConfigurationForResource = this._memoryConfigurationByResource.get(resource);\n\t\t\tif (memoryConfigurationForResource) {\n\t\t\t\tconsolidateConfiguration = consolidateConfiguration.merge(memoryConfigurationForResource);\n\t\t\t}\n\t\t}\n\n\t\treturn consolidateConfiguration;\n\t}\n\n\tprivate getWorkspaceConsolidatedConfiguration(): ConfigurationModel {\n\t\tif (!this._workspaceConsolidatedConfiguration) {\n\t\t\tthis._workspaceConsolidatedConfiguration = this._defaultConfiguration.merge(this.applicationConfiguration, this.userConfiguration, this._workspaceConfiguration, this._memoryConfiguration);\n\t\t}\n\t\treturn this._workspaceConsolidatedConfiguration;\n\t}\n\n\tprivate getFolderConsolidatedConfiguration(folder: URI): ConfigurationModel {\n\t\tlet folderConsolidatedConfiguration = this._foldersConsolidatedConfigurations.get(folder);\n\t\tif (!folderConsolidatedConfiguration) {\n\t\t\tconst workspaceConsolidateConfiguration = this.getWorkspaceConsolidatedConfiguration();\n\t\t\tconst folderConfiguration = this._folderConfigurations.get(folder);\n\t\t\tif (folderConfiguration) {\n\t\t\t\tfolderConsolidatedConfiguration = workspaceConsolidateConfiguration.merge(folderConfiguration);\n\t\t\t\tthis._foldersConsolidatedConfigurations.set(folder, folderConsolidatedConfiguration);\n\t\t\t} else {\n\t\t\t\tfolderConsolidatedConfiguration = workspaceConsolidateConfiguration;\n\t\t\t}\n\t\t}\n\t\treturn folderConsolidatedConfiguration;\n\t}\n\n\tprivate getFolderConfigurationModelForResource(resource: URI | null | undefined, workspace: Workspace | undefined): ConfigurationModel | undefined {\n\t\tif (workspace && resource) {\n\t\t\tconst root = workspace.getFolder(resource);\n\t\t\tif (root) {\n\t\t\t\treturn this._folderConfigurations.get(root.uri);\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\ttoData(): IConfigurationData {\n\t\treturn {\n\t\t\tdefaults: {\n\t\t\t\tcontents: this._defaultConfiguration.contents,\n\t\t\t\toverrides: this._defaultConfiguration.overrides,\n\t\t\t\tkeys: this._defaultConfiguration.keys,\n\t\t\t},\n\t\t\tpolicy: {\n\t\t\t\tcontents: this._policyConfiguration.contents,\n\t\t\t\toverrides: this._policyConfiguration.overrides,\n\t\t\t\tkeys: this._policyConfiguration.keys\n\t\t\t},\n\t\t\tapplication: {\n\t\t\t\tcontents: this.applicationConfiguration.contents,\n\t\t\t\toverrides: this.applicationConfiguration.overrides,\n\t\t\t\tkeys: this.applicationConfiguration.keys,\n\t\t\t\traw: Array.isArray(this.applicationConfiguration.raw) ? undefined : this.applicationConfiguration.raw\n\t\t\t},\n\t\t\tuserLocal: {\n\t\t\t\tcontents: this.localUserConfiguration.contents,\n\t\t\t\toverrides: this.localUserConfiguration.overrides,\n\t\t\t\tkeys: this.localUserConfiguration.keys,\n\t\t\t\traw: Array.isArray(this.localUserConfiguration.raw) ? undefined : this.localUserConfiguration.raw\n\t\t\t},\n\t\t\tuserRemote: {\n\t\t\t\tcontents: this.remoteUserConfiguration.contents,\n\t\t\t\toverrides: this.remoteUserConfiguration.overrides,\n\t\t\t\tkeys: this.remoteUserConfiguration.keys,\n\t\t\t\traw: Array.isArray(this.remoteUserConfiguration.raw) ? undefined : this.remoteUserConfiguration.raw\n\t\t\t},\n\t\t\tworkspace: {\n\t\t\t\tcontents: this._workspaceConfiguration.contents,\n\t\t\t\toverrides: this._workspaceConfiguration.overrides,\n\t\t\t\tkeys: this._workspaceConfiguration.keys\n\t\t\t},\n\t\t\tfolders: [...this._folderConfigurations.keys()].reduce<[UriComponents, IConfigurationModel][]>((result, folder) => {\n\t\t\t\tconst { contents, overrides, keys } = this._folderConfigurations.get(folder)!;\n\t\t\t\tresult.push([folder, { contents, overrides, keys }]);\n\t\t\t\treturn result;\n\t\t\t}, [])\n\t\t};\n\t}\n\n\tstatic parse(data: IConfigurationData, logService: ILogService): Configuration {\n\t\tconst defaultConfiguration = this.parseConfigurationModel(data.defaults, logService);\n\t\tconst policyConfiguration = this.parseConfigurationModel(data.policy, logService);\n\t\tconst applicationConfiguration = this.parseConfigurationModel(data.application, logService);\n\t\tconst userLocalConfiguration = this.parseConfigurationModel(data.userLocal, logService);\n\t\tconst userRemoteConfiguration = this.parseConfigurationModel(data.userRemote, logService);\n\t\tconst workspaceConfiguration = this.parseConfigurationModel(data.workspace, logService);\n\t\tconst folders: ResourceMap<ConfigurationModel> = data.folders.reduce((result, value) => {\n\t\t\tresult.set(URI.revive(value[0]), this.parseConfigurationModel(value[1], logService));\n\t\t\treturn result;\n\t\t}, new ResourceMap<ConfigurationModel>());\n\t\treturn new Configuration(\n\t\t\tdefaultConfiguration,\n\t\t\tpolicyConfiguration,\n\t\t\tapplicationConfiguration,\n\t\t\tuserLocalConfiguration,\n\t\t\tuserRemoteConfiguration,\n\t\t\tworkspaceConfiguration,\n\t\t\tfolders,\n\t\t\tConfigurationModel.createEmptyModel(logService),\n\t\t\tnew ResourceMap<ConfigurationModel>(),\n\t\t\tlogService\n\t\t);\n\t}\n\n\tprivate static parseConfigurationModel(model: IConfigurationModel, logService: ILogService): ConfigurationModel {\n\t\treturn new ConfigurationModel(model.contents, model.keys, model.overrides, model.raw, logService);\n\t}\n\n}\n\nexport class ConfigurationChangeEvent implements IConfigurationChangeEvent {\n\n\tprivate readonly _marker = '\\n';\n\tprivate readonly _markerCode1 = this._marker.charCodeAt(0);\n\tprivate readonly _markerCode2 = '.'.charCodeAt(0);\n\tprivate readonly _affectsConfigStr: string;\n\n\treadonly affectedKeys = new Set<string>();\n\tsource!: ConfigurationTarget;\n\n\tconstructor(\n\t\treadonly change: IConfigurationChange,\n\t\tprivate readonly previous: { workspace?: Workspace; data: IConfigurationData } | undefined,\n\t\tprivate readonly currentConfiguraiton: Configuration,\n\t\tprivate readonly currentWorkspace: Workspace | undefined,\n\t\tprivate readonly logService: ILogService\n\t) {\n\t\tfor (const key of change.keys) {\n\t\t\tthis.affectedKeys.add(key);\n\t\t}\n\t\tfor (const [, keys] of change.overrides) {\n\t\t\tfor (const key of keys) {\n\t\t\t\tthis.affectedKeys.add(key);\n\t\t\t}\n\t\t}\n\n\t\t// Example: '\\nfoo.bar\\nabc.def\\n'\n\t\tthis._affectsConfigStr = this._marker;\n\t\tfor (const key of this.affectedKeys) {\n\t\t\tthis._affectsConfigStr += key + this._marker;\n\t\t}\n\t}\n\n\tprivate _previousConfiguration: Configuration | undefined = undefined;\n\tget previousConfiguration(): Configuration | undefined {\n\t\tif (!this._previousConfiguration && this.previous) {\n\t\t\tthis._previousConfiguration = Configuration.parse(this.previous.data, this.logService);\n\t\t}\n\t\treturn this._previousConfiguration;\n\t}\n\n\taffectsConfiguration(section: string, overrides?: IConfigurationOverrides): boolean {\n\t\t// we have one large string with all keys that have changed. we pad (marker) the section\n\t\t// and check that either find it padded or before a segment character\n\t\tconst needle = this._marker + section;\n\t\tconst idx = this._affectsConfigStr.indexOf(needle);\n\t\tif (idx < 0) {\n\t\t\t// NOT: (marker + section)\n\t\t\treturn false;\n\t\t}\n\t\tconst pos = idx + needle.length;\n\t\tif (pos >= this._affectsConfigStr.length) {\n\t\t\treturn false;\n\t\t}\n\t\tconst code = this._affectsConfigStr.charCodeAt(pos);\n\t\tif (code !== this._markerCode1 && code !== this._markerCode2) {\n\t\t\t// NOT: section + (marker | segment)\n\t\t\treturn false;\n\t\t}\n\t\tif (overrides) {\n\t\t\tconst value1 = this.previousConfiguration ? this.previousConfiguration.getValue(section, overrides, this.previous?.workspace) : undefined;\n\t\t\tconst value2 = this.currentConfiguraiton.getValue(section, overrides, this.currentWorkspace);\n\t\t\treturn !objects.equals(value1, value2);\n\t\t}\n\t\treturn true;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/platform/configuration/common/configurationModels.ts","vs/platform/configuration/common/configurationModels.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,KAAK,MAAM,MAAM,gCAAgC,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,OAAO,MAAM,iCAAiC,CAAC;AAC3D,OAAO,KAAK,KAAK,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAiB,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAuB,qBAAqB,EAAoM,mBAAmB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACrU,OAAO,EAAsB,UAAU,EAAwD,0BAA0B,EAAE,uBAAuB,EAA0C,MAAM,4BAA4B,CAAC;AAE/N,OAAO,EAAE,QAAQ,EAAE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,CAAC,CAAC;QACxC,CAAC;QACD,OAAO,IAAI,CAAC;IACb,CAAC;CACD","file":"configurationModels.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as arrays from '../../../base/common/arrays.js';\nimport { IStringDictionary } from '../../../base/common/collections.js';\nimport { ResourceMap } from '../../../base/common/map.js';\nimport * as objects from '../../../base/common/objects.js';\nimport * as types from '../../../base/common/types.js';\nimport { URI, UriComponents } from '../../../base/common/uri.js';\nimport { addToValueTree, ConfigurationTarget, getConfigurationValue, IConfigurationChange, IConfigurationChangeEvent, IConfigurationData, IConfigurationModel, IConfigurationOverrides, IConfigurationUpdateOverrides, IConfigurationValue, IInspectValue, IOverrides, removeFromValueTree, toValuesTree } from './configuration.js';\nimport { ConfigurationScope, Extensions, IConfigurationPropertySchema, IConfigurationRegistry, overrideIdentifiersFromKey, OVERRIDE_PROPERTY_REGEX, IRegisteredConfigurationPropertySchema } from './configurationRegistry.js';\nimport { ILogService } from '../../log/common/log.js';\nimport { Registry } from '../../registry/common/platform.js';\nimport { Workspace } from '../../workspace/common/workspace.js';\n\nfunction freeze<T>(data: T): T {\n\treturn Object.isFrozen(data) ? data : objects.deepFreeze(data);\n}\n\ntype InspectValue<V> = IInspectValue<V> & { merged?: V };\n\nexport class ConfigurationModel implements IConfigurationModel {\n\n\tstatic createEmptyModel(logService: ILogService): ConfigurationModel {\n\t\treturn new ConfigurationModel({}, [], [], undefined, logService);\n\t}\n\n\tprivate readonly overrideConfigurations = new Map<string, ConfigurationModel>();\n\n\tconstructor(\n\t\tprivate readonly _contents: any,\n\t\tprivate readonly _keys: string[],\n\t\tprivate readonly _overrides: IOverrides[],\n\t\treadonly raw: IStringDictionary<any> | ReadonlyArray<IStringDictionary<any> | ConfigurationModel> | undefined,\n\t\tprivate readonly logService: ILogService\n\t) {\n\t}\n\n\tprivate _rawConfiguration: ConfigurationModel | undefined;\n\tget rawConfiguration(): ConfigurationModel {\n\t\tif (!this._rawConfiguration) {\n\t\t\tif (this.raw) {\n\t\t\t\tconst rawConfigurationModels = (Array.isArray(this.raw) ? this.raw : [this.raw]).map(raw => {\n\t\t\t\t\tif (raw instanceof ConfigurationModel) {\n\t\t\t\t\t\treturn raw;\n\t\t\t\t\t}\n\t\t\t\t\tconst parser = new ConfigurationModelParser('', this.logService);\n\t\t\t\t\tparser.parseRaw(raw);\n\t\t\t\t\treturn parser.configurationModel;\n\t\t\t\t});\n\t\t\t\tthis._rawConfiguration = rawConfigurationModels.reduce((previous, current) => current === previous ? current : previous.merge(current), rawConfigurationModels[0]);\n\t\t\t} else {\n\t\t\t\t// raw is same as current\n\t\t\t\tthis._rawConfiguration = this;\n\t\t\t}\n\t\t}\n\t\treturn this._rawConfiguration;\n\t}\n\n\tget contents(): any {\n\t\treturn this._contents;\n\t}\n\n\tget overrides(): IOverrides[] {\n\t\treturn this._overrides;\n\t}\n\n\tget keys(): string[] {\n\t\treturn this._keys;\n\t}\n\n\tisEmpty(): boolean {\n\t\treturn this._keys.length === 0 && Object.keys(this._contents).length === 0 && this._overrides.length === 0;\n\t}\n\n\tgetValue<V>(section: string | undefined): V {\n\t\treturn section ? getConfigurationValue<any>(this.contents, section) : this.contents;\n\t}\n\n\tinspect<V>(section: string | undefined, overrideIdentifier?: string | null): InspectValue<V> {\n\t\tconst that = this;\n\t\treturn {\n\t\t\tget value() {\n\t\t\t\treturn freeze(that.rawConfiguration.getValue<V>(section));\n\t\t\t},\n\t\t\tget override() {\n\t\t\t\treturn overrideIdentifier ? freeze(that.rawConfiguration.getOverrideValue<V>(section, overrideIdentifier)) : undefined;\n\t\t\t},\n\t\t\tget merged() {\n\t\t\t\treturn freeze(overrideIdentifier ? that.rawConfiguration.override(overrideIdentifier).getValue<V>(section) : that.rawConfiguration.getValue<V>(section));\n\t\t\t},\n\t\t\tget overrides() {\n\t\t\t\tconst overrides: { readonly identifiers: string[]; readonly value: V }[] = [];\n\t\t\t\tfor (const { contents, identifiers, keys } of that.rawConfiguration.overrides) {\n\t\t\t\t\tconst value = new ConfigurationModel(contents, keys, [], undefined, that.logService).getValue<V>(section);\n\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\toverrides.push({ identifiers, value });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn overrides.length ? freeze(overrides) : undefined;\n\t\t\t}\n\t\t};\n\t}\n\n\tgetOverrideValue<V>(section: string | undefined, overrideIdentifier: string): V | undefined {\n\t\tconst overrideContents = this.getContentsForOverrideIdentifer(overrideIdentifier);\n\t\treturn overrideContents\n\t\t\t? section ? getConfigurationValue<any>(overrideContents, section) : overrideContents\n\t\t\t: undefined;\n\t}\n\n\toverride(identifier: string): ConfigurationModel {\n\t\tlet overrideConfigurationModel = this.overrideConfigurations.get(identifier);\n\t\tif (!overrideConfigurationModel) {\n\t\t\toverrideConfigurationModel = this.createOverrideConfigurationModel(identifier);\n\t\t\tthis.overrideConfigurations.set(identifier, overrideConfigurationModel);\n\t\t}\n\t\treturn overrideConfigurationModel;\n\t}\n\n\tmerge(...others: ConfigurationModel[]): ConfigurationModel {\n\t\tconst contents = objects.deepClone(this.contents);\n\t\tconst overrides = objects.deepClone(this.overrides);\n\t\tconst keys = [...this.keys];\n\t\tconst raws = this.raw ? Array.isArray(this.raw) ? [...this.raw] : [this.raw] : [this];\n\n\t\tfor (const other of others) {\n\t\t\traws.push(...(other.raw ? Array.isArray(other.raw) ? other.raw : [other.raw] : [other]));\n\t\t\tif (other.isEmpty()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.mergeContents(contents, other.contents);\n\n\t\t\tfor (const otherOverride of other.overrides) {\n\t\t\t\tconst [override] = overrides.filter(o => arrays.equals(o.identifiers, otherOverride.identifiers));\n\t\t\t\tif (override) {\n\t\t\t\t\tthis.mergeContents(override.contents, otherOverride.contents);\n\t\t\t\t\toverride.keys.push(...otherOverride.keys);\n\t\t\t\t\toverride.keys = arrays.distinct(override.keys);\n\t\t\t\t} else {\n\t\t\t\t\toverrides.push(objects.deepClone(otherOverride));\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const key of other.keys) {\n\t\t\t\tif (keys.indexOf(key) === -1) {\n\t\t\t\t\tkeys.push(key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new ConfigurationModel(contents, keys, overrides, !raws.length || raws.every(raw => raw instanceof ConfigurationModel) ? undefined : raws, this.logService);\n\t}\n\n\tprivate createOverrideConfigurationModel(identifier: string): ConfigurationModel {\n\t\tconst overrideContents = this.getContentsForOverrideIdentifer(identifier);\n\n\t\tif (!overrideContents || typeof overrideContents !== 'object' || !Object.keys(overrideContents).length) {\n\t\t\t// If there are no valid overrides, return self\n\t\t\treturn this;\n\t\t}\n\n\t\tconst contents: any = {};\n\t\tfor (const key of arrays.distinct([...Object.keys(this.contents), ...Object.keys(overrideContents)])) {\n\n\t\t\tlet contentsForKey = this.contents[key];\n\t\t\tconst overrideContentsForKey = overrideContents[key];\n\n\t\t\t// If there are override contents for the key, clone and merge otherwise use base contents\n\t\t\tif (overrideContentsForKey) {\n\t\t\t\t// Clone and merge only if base contents and override contents are of type object otherwise just override\n\t\t\t\tif (typeof contentsForKey === 'object' && typeof overrideContentsForKey === 'object') {\n\t\t\t\t\tcontentsForKey = objects.deepClone(contentsForKey);\n\t\t\t\t\tthis.mergeContents(contentsForKey, overrideContentsForKey);\n\t\t\t\t} else {\n\t\t\t\t\tcontentsForKey = overrideContentsForKey;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcontents[key] = contentsForKey;\n\t\t}\n\n\t\treturn new ConfigurationModel(contents, this.keys, this.overrides, undefined, this.logService);\n\t}\n\n\tprivate mergeContents(source: any, target: any): void {\n\t\tfor (const key of Object.keys(target)) {\n\t\t\tif (key in source) {\n\t\t\t\tif (types.isObject(source[key]) && types.isObject(target[key])) {\n\t\t\t\t\tthis.mergeContents(source[key], target[key]);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsource[key] = objects.deepClone(target[key]);\n\t\t}\n\t}\n\n\tprivate getContentsForOverrideIdentifer(identifier: string): any {\n\t\tlet contentsForIdentifierOnly: IStringDictionary<any> | null = null;\n\t\tlet contents: IStringDictionary<any> | null = null;\n\t\tconst mergeContents = (contentsToMerge: any) => {\n\t\t\tif (contentsToMerge) {\n\t\t\t\tif (contents) {\n\t\t\t\t\tthis.mergeContents(contents, contentsToMerge);\n\t\t\t\t} else {\n\t\t\t\t\tcontents = objects.deepClone(contentsToMerge);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tfor (const override of this.overrides) {\n\t\t\tif (override.identifiers.length === 1 && override.identifiers[0] === identifier) {\n\t\t\t\tcontentsForIdentifierOnly = override.contents;\n\t\t\t} else if (override.identifiers.includes(identifier)) {\n\t\t\t\tmergeContents(override.contents);\n\t\t\t}\n\t\t}\n\t\t// Merge contents of the identifier only at the end to take precedence.\n\t\tmergeContents(contentsForIdentifierOnly);\n\t\treturn contents;\n\t}\n\n\ttoJSON(): IConfigurationModel {\n\t\treturn {\n\t\t\tcontents: this.contents,\n\t\t\toverrides: this.overrides,\n\t\t\tkeys: this.keys\n\t\t};\n\t}\n\n\tpublic setValue(key: string, value: any): void {\n\t\tthis.updateValue(key, value, false);\n\t}\n\n\tpublic removeValue(key: string): void {\n\t\tconst index = this.keys.indexOf(key);\n\t\tif (index === -1) {\n\t\t\treturn;\n\t\t}\n\t\tthis.keys.splice(index, 1);\n\t\tremoveFromValueTree(this.contents, key);\n\t\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\t\tthis.overrides.splice(this.overrides.findIndex(o => arrays.equals(o.identifiers, overrideIdentifiersFromKey(key))), 1);\n\t\t}\n\t}\n\n\tprivate updateValue(key: string, value: any, add: boolean): void {\n\t\taddToValueTree(this.contents, key, value, e => this.logService.error(e));\n\t\tadd = add || this.keys.indexOf(key) === -1;\n\t\tif (add) {\n\t\t\tthis.keys.push(key);\n\t\t}\n\t\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\t\tconst identifiers = overrideIdentifiersFromKey(key);\n\t\t\tconst override = {\n\t\t\t\tidentifiers,\n\t\t\t\tkeys: Object.keys(this.contents[key]),\n\t\t\t\tcontents: toValuesTree(this.contents[key], message => this.logService.error(message)),\n\t\t\t};\n\t\t\tconst index = this.overrides.findIndex(o => arrays.equals(o.identifiers, identifiers));\n\t\t\tif (index !== -1) {\n\t\t\t\tthis.overrides[index] = override;\n\t\t\t} else {\n\t\t\t\tthis.overrides.push(override);\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport interface ConfigurationParseOptions {\n\tskipUnregistered?: boolean;\n\tscopes?: ConfigurationScope[];\n\tskipRestricted?: boolean;\n\tinclude?: string[];\n\texclude?: string[];\n}\n\nexport class ConfigurationModelParser {\n\n\tprivate _raw: any = null;\n\tprivate _configurationModel: ConfigurationModel | null = null;\n\tprivate _restrictedConfigurations: string[] = [];\n\n\tconstructor(\n\t\tprotected readonly _name: string,\n\t\tprotected readonly logService: ILogService\n\t) { }\n\n\tget configurationModel(): ConfigurationModel {\n\t\treturn this._configurationModel || ConfigurationModel.createEmptyModel(this.logService);\n\t}\n\n\tpublic parseRaw(raw: any, options?: ConfigurationParseOptions): void {\n\t\tthis._raw = raw;\n\t\tconst { contents, keys, overrides, restricted, hasExcludedProperties } = this.doParseRaw(raw, options);\n\t\tthis._configurationModel = new ConfigurationModel(contents, keys, overrides, hasExcludedProperties ? [raw] : undefined /* raw has not changed */, this.logService);\n\t\tthis._restrictedConfigurations = restricted || [];\n\t}\n\n\tprotected doParseRaw(raw: any, options?: ConfigurationParseOptions): IConfigurationModel & { restricted?: string[]; hasExcludedProperties?: boolean } {\n\t\tconst registry = Registry.as<IConfigurationRegistry>(Extensions.Configuration);\n\t\tconst configurationProperties = registry.getConfigurationProperties();\n\t\tconst excludedConfigurationProperties = registry.getExcludedConfigurationProperties();\n\t\tconst filtered = this.filter(raw, configurationProperties, excludedConfigurationProperties, true, options);\n\t\traw = filtered.raw;\n\t\tconst contents = toValuesTree(raw, message => this.logService.error(`Conflict in settings file ${this._name}: ${message}`));\n\t\tconst keys = Object.keys(raw);\n\t\tconst overrides = this.toOverrides(raw, message => this.logService.error(`Conflict in settings file ${this._name}: ${message}`));\n\t\treturn { contents, keys, overrides, restricted: filtered.restricted, hasExcludedProperties: filtered.hasExcludedProperties };\n\t}\n\n\tprivate filter(properties: any, configurationProperties: IStringDictionary<IRegisteredConfigurationPropertySchema>, excludedConfigurationProperties: IStringDictionary<IRegisteredConfigurationPropertySchema>, filterOverriddenProperties: boolean, options?: ConfigurationParseOptions): { raw: {}; restricted: string[]; hasExcludedProperties: boolean } {\n\t\tlet hasExcludedProperties = false;\n\t\tif (!options?.scopes && !options?.skipRestricted && !options?.skipUnregistered && !options?.exclude?.length) {\n\t\t\treturn { raw: properties, restricted: [], hasExcludedProperties };\n\t\t}\n\t\tconst raw: any = {};\n\t\tconst restricted: string[] = [];\n\t\tfor (const key in properties) {\n\t\t\tif (OVERRIDE_PROPERTY_REGEX.test(key) && filterOverriddenProperties) {\n\t\t\t\tconst result = this.filter(properties[key], configurationProperties, excludedConfigurationProperties, false, options);\n\t\t\t\traw[key] = result.raw;\n\t\t\t\thasExcludedProperties = hasExcludedProperties || result.hasExcludedProperties;\n\t\t\t\trestricted.push(...result.restricted);\n\t\t\t} else {\n\t\t\t\tconst propertySchema = configurationProperties[key];\n\t\t\t\tif (propertySchema?.restricted) {\n\t\t\t\t\trestricted.push(key);\n\t\t\t\t}\n\t\t\t\tif (this.shouldInclude(key, propertySchema, excludedConfigurationProperties, options)) {\n\t\t\t\t\traw[key] = properties[key];\n\t\t\t\t} else {\n\t\t\t\t\thasExcludedProperties = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn { raw, restricted, hasExcludedProperties };\n\t}\n\n\tprivate shouldInclude(key: string, propertySchema: IConfigurationPropertySchema | undefined, excludedConfigurationProperties: IStringDictionary<IRegisteredConfigurationPropertySchema>, options: ConfigurationParseOptions): boolean {\n\t\tif (options.exclude?.includes(key)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (options.include?.includes(key)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (options.skipRestricted && propertySchema?.restricted) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (options.skipUnregistered && !propertySchema) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst schema = propertySchema ?? excludedConfigurationProperties[key];\n\t\tconst scope = schema ? typeof schema.scope !== 'undefined' ? schema.scope : ConfigurationScope.WINDOW : undefined;\n\t\tif (scope === undefined || options.scopes === undefined) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn options.scopes.includes(scope);\n\t}\n\n\tprivate toOverrides(raw: any, conflictReporter: (message: string) => void): IOverrides[] {\n\t\tconst overrides: IOverrides[] = [];\n\t\tfor (const key of Object.keys(raw)) {\n\t\t\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\t\t\tconst overrideRaw: any = {};\n\t\t\t\tfor (const keyInOverrideRaw in raw[key]) {\n\t\t\t\t\toverrideRaw[keyInOverrideRaw] = raw[key][keyInOverrideRaw];\n\t\t\t\t}\n\t\t\t\toverrides.push({\n\t\t\t\t\tidentifiers: overrideIdentifiersFromKey(key),\n\t\t\t\t\tkeys: Object.keys(overrideRaw),\n\t\t\t\t\tcontents: toValuesTree(overrideRaw, conflictReporter)\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn overrides;\n\t}\n\n}\n\nclass ConfigurationInspectValue<V> implements IConfigurationValue<V> {\n\n\tconstructor(\n\t\tprivate readonly key: string,\n\t\tprivate readonly overrides: IConfigurationOverrides,\n\t\tprivate readonly _value: V | undefined,\n\t\treadonly overrideIdentifiers: string[] | undefined,\n\t\tprivate readonly defaultConfiguration: ConfigurationModel,\n\t\tprivate readonly policyConfiguration: ConfigurationModel | undefined,\n\t\tprivate readonly applicationConfiguration: ConfigurationModel | undefined,\n\t\tprivate readonly userConfiguration: ConfigurationModel,\n\t\tprivate readonly localUserConfiguration: ConfigurationModel,\n\t\tprivate readonly remoteUserConfiguration: ConfigurationModel,\n\t\tprivate readonly workspaceConfiguration: ConfigurationModel | undefined,\n\t\tprivate readonly folderConfigurationModel: ConfigurationModel | undefined,\n\t\tprivate readonly memoryConfigurationModel: ConfigurationModel\n\t) {\n\t}\n\n\tprivate toInspectValue(inspectValue: IInspectValue<V> | undefined | null): IInspectValue<V> | undefined {\n\t\treturn inspectValue?.value !== undefined || inspectValue?.override !== undefined || inspectValue?.overrides !== undefined ? inspectValue : undefined;\n\t}\n\n\tprivate _userInspectValue: InspectValue<V> | undefined;\n\tprivate get userInspectValue(): InspectValue<V> {\n\t\tif (!this._userInspectValue) {\n\t\t\tthis._userInspectValue = this.userConfiguration.inspect<V>(this.key, this.overrides.overrideIdentifier);\n\t\t}\n\t\treturn this._userInspectValue;\n\t}\n\n\tget user(): IInspectValue<V> | undefined {\n\t\treturn this.toInspectValue(this.userInspectValue);\n\t}\n\n}\n\nexport class Configuration {\n\n\tprivate _workspaceConsolidatedConfiguration: ConfigurationModel | null = null;\n\tprivate _foldersConsolidatedConfigurations = new ResourceMap<ConfigurationModel>();\n\n\tconstructor(\n\t\tprivate _defaultConfiguration: ConfigurationModel,\n\t\tprivate _policyConfiguration: ConfigurationModel,\n\t\tprivate _applicationConfiguration: ConfigurationModel,\n\t\tprivate _localUserConfiguration: ConfigurationModel,\n\t\tprivate _remoteUserConfiguration: ConfigurationModel,\n\t\tprivate _workspaceConfiguration: ConfigurationModel,\n\t\tprivate _folderConfigurations: ResourceMap<ConfigurationModel>,\n\t\tprivate _memoryConfiguration: ConfigurationModel,\n\t\tprivate _memoryConfigurationByResource: ResourceMap<ConfigurationModel>,\n\t\tprivate readonly logService: ILogService\n\t) {\n\t}\n\n\tgetValue(section: string | undefined, overrides: IConfigurationOverrides, workspace: Workspace | undefined): any {\n\t\tconst consolidateConfigurationModel = this.getConsolidatedConfigurationModel(section, overrides, workspace);\n\t\treturn consolidateConfigurationModel.getValue(section);\n\t}\n\n\tupdateValue(key: string, value: any, overrides: IConfigurationUpdateOverrides = {}): void {\n\t\tlet memoryConfiguration: ConfigurationModel | undefined;\n\t\tif (overrides.resource) {\n\t\t\tmemoryConfiguration = this._memoryConfigurationByResource.get(overrides.resource);\n\t\t\tif (!memoryConfiguration) {\n\t\t\t\tmemoryConfiguration = ConfigurationModel.createEmptyModel(this.logService);\n\t\t\t\tthis._memoryConfigurationByResource.set(overrides.resource, memoryConfiguration);\n\t\t\t}\n\t\t} else {\n\t\t\tmemoryConfiguration = this._memoryConfiguration;\n\t\t}\n\n\t\tif (value === undefined) {\n\t\t\tmemoryConfiguration.removeValue(key);\n\t\t} else {\n\t\t\tmemoryConfiguration.setValue(key, value);\n\t\t}\n\n\t\tif (!overrides.resource) {\n\t\t\tthis._workspaceConsolidatedConfiguration = null;\n\t\t}\n\t}\n\n\tinspect<C>(key: string, overrides: IConfigurationOverrides, workspace: Workspace | undefined): IConfigurationValue<C> {\n\t\tconst consolidateConfigurationModel = this.getConsolidatedConfigurationModel(key, overrides, workspace);\n\t\tconst folderConfigurationModel = this.getFolderConfigurationModelForResource(overrides.resource, workspace);\n\t\tconst memoryConfigurationModel = overrides.resource ? this._memoryConfigurationByResource.get(overrides.resource) || this._memoryConfiguration : this._memoryConfiguration;\n\t\tconst overrideIdentifiers = new Set<string>();\n\t\tfor (const override of consolidateConfigurationModel.overrides) {\n\t\t\tfor (const overrideIdentifier of override.identifiers) {\n\t\t\t\tif (consolidateConfigurationModel.getOverrideValue(key, overrideIdentifier) !== undefined) {\n\t\t\t\t\toverrideIdentifiers.add(overrideIdentifier);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn new ConfigurationInspectValue<C>(\n\t\t\tkey,\n\t\t\toverrides,\n\t\t\tconsolidateConfigurationModel.getValue<C>(key),\n\t\t\toverrideIdentifiers.size ? [...overrideIdentifiers] : undefined,\n\t\t\tthis._defaultConfiguration,\n\t\t\tthis._policyConfiguration.isEmpty() ? undefined : this._policyConfiguration,\n\t\t\tthis.applicationConfiguration.isEmpty() ? undefined : this.applicationConfiguration,\n\t\t\tthis.userConfiguration,\n\t\t\tthis.localUserConfiguration,\n\t\t\tthis.remoteUserConfiguration,\n\t\t\tworkspace ? this._workspaceConfiguration : undefined,\n\t\t\tfolderConfigurationModel ? folderConfigurationModel : undefined,\n\t\t\tmemoryConfigurationModel\n\t\t);\n\n\t}\n\n\tget applicationConfiguration(): ConfigurationModel {\n\t\treturn this._applicationConfiguration;\n\t}\n\n\tprivate _userConfiguration: ConfigurationModel | null = null;\n\tget userConfiguration(): ConfigurationModel {\n\t\tif (!this._userConfiguration) {\n\t\t\tif (this._remoteUserConfiguration.isEmpty()) {\n\t\t\t\tthis._userConfiguration = this._localUserConfiguration;\n\t\t\t} else {\n\t\t\t\tconst merged = this._localUserConfiguration.merge(this._remoteUserConfiguration);\n\t\t\t\tthis._userConfiguration = new ConfigurationModel(merged.contents, merged.keys, merged.overrides, undefined, this.logService);\n\t\t\t}\n\t\t}\n\t\treturn this._userConfiguration;\n\t}\n\n\tget localUserConfiguration(): ConfigurationModel {\n\t\treturn this._localUserConfiguration;\n\t}\n\n\tget remoteUserConfiguration(): ConfigurationModel {\n\t\treturn this._remoteUserConfiguration;\n\t}\n\n\tprivate getConsolidatedConfigurationModel(section: string | undefined, overrides: IConfigurationOverrides, workspace: Workspace | undefined): ConfigurationModel {\n\t\tlet configurationModel = this.getConsolidatedConfigurationModelForResource(overrides, workspace);\n\t\tif (overrides.overrideIdentifier) {\n\t\t\tconfigurationModel = configurationModel.override(overrides.overrideIdentifier);\n\t\t}\n\t\tif (!this._policyConfiguration.isEmpty() && this._policyConfiguration.getValue(section) !== undefined) {\n\t\t\t// clone by merging\n\t\t\tconfigurationModel = configurationModel.merge();\n\t\t\tfor (const key of this._policyConfiguration.keys) {\n\t\t\t\tconfigurationModel.setValue(key, this._policyConfiguration.getValue(key));\n\t\t\t}\n\t\t}\n\t\treturn configurationModel;\n\t}\n\n\tprivate getConsolidatedConfigurationModelForResource({ resource }: IConfigurationOverrides, workspace: Workspace | undefined): ConfigurationModel {\n\t\tlet consolidateConfiguration = this.getWorkspaceConsolidatedConfiguration();\n\n\t\tif (workspace && resource) {\n\t\t\tconst root = workspace.getFolder(resource);\n\t\t\tif (root) {\n\t\t\t\tconsolidateConfiguration = this.getFolderConsolidatedConfiguration(root.uri) || consolidateConfiguration;\n\t\t\t}\n\t\t\tconst memoryConfigurationForResource = this._memoryConfigurationByResource.get(resource);\n\t\t\tif (memoryConfigurationForResource) {\n\t\t\t\tconsolidateConfiguration = consolidateConfiguration.merge(memoryConfigurationForResource);\n\t\t\t}\n\t\t}\n\n\t\treturn consolidateConfiguration;\n\t}\n\n\tprivate getWorkspaceConsolidatedConfiguration(): ConfigurationModel {\n\t\tif (!this._workspaceConsolidatedConfiguration) {\n\t\t\tthis._workspaceConsolidatedConfiguration = this._defaultConfiguration.merge(this.applicationConfiguration, this.userConfiguration, this._workspaceConfiguration, this._memoryConfiguration);\n\t\t}\n\t\treturn this._workspaceConsolidatedConfiguration;\n\t}\n\n\tprivate getFolderConsolidatedConfiguration(folder: URI): ConfigurationModel {\n\t\tlet folderConsolidatedConfiguration = this._foldersConsolidatedConfigurations.get(folder);\n\t\tif (!folderConsolidatedConfiguration) {\n\t\t\tconst workspaceConsolidateConfiguration = this.getWorkspaceConsolidatedConfiguration();\n\t\t\tconst folderConfiguration = this._folderConfigurations.get(folder);\n\t\t\tif (folderConfiguration) {\n\t\t\t\tfolderConsolidatedConfiguration = workspaceConsolidateConfiguration.merge(folderConfiguration);\n\t\t\t\tthis._foldersConsolidatedConfigurations.set(folder, folderConsolidatedConfiguration);\n\t\t\t} else {\n\t\t\t\tfolderConsolidatedConfiguration = workspaceConsolidateConfiguration;\n\t\t\t}\n\t\t}\n\t\treturn folderConsolidatedConfiguration;\n\t}\n\n\tprivate getFolderConfigurationModelForResource(resource: URI | null | undefined, workspace: Workspace | undefined): ConfigurationModel | undefined {\n\t\tif (workspace && resource) {\n\t\t\tconst root = workspace.getFolder(resource);\n\t\t\tif (root) {\n\t\t\t\treturn this._folderConfigurations.get(root.uri);\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\ttoData(): IConfigurationData {\n\t\treturn {\n\t\t\tdefaults: {\n\t\t\t\tcontents: this._defaultConfiguration.contents,\n\t\t\t\toverrides: this._defaultConfiguration.overrides,\n\t\t\t\tkeys: this._defaultConfiguration.keys,\n\t\t\t},\n\t\t\tpolicy: {\n\t\t\t\tcontents: this._policyConfiguration.contents,\n\t\t\t\toverrides: this._policyConfiguration.overrides,\n\t\t\t\tkeys: this._policyConfiguration.keys\n\t\t\t},\n\t\t\tapplication: {\n\t\t\t\tcontents: this.applicationConfiguration.contents,\n\t\t\t\toverrides: this.applicationConfiguration.overrides,\n\t\t\t\tkeys: this.applicationConfiguration.keys,\n\t\t\t\traw: Array.isArray(this.applicationConfiguration.raw) ? undefined : this.applicationConfiguration.raw\n\t\t\t},\n\t\t\tuserLocal: {\n\t\t\t\tcontents: this.localUserConfiguration.contents,\n\t\t\t\toverrides: this.localUserConfiguration.overrides,\n\t\t\t\tkeys: this.localUserConfiguration.keys,\n\t\t\t\traw: Array.isArray(this.localUserConfiguration.raw) ? undefined : this.localUserConfiguration.raw\n\t\t\t},\n\t\t\tuserRemote: {\n\t\t\t\tcontents: this.remoteUserConfiguration.contents,\n\t\t\t\toverrides: this.remoteUserConfiguration.overrides,\n\t\t\t\tkeys: this.remoteUserConfiguration.keys,\n\t\t\t\traw: Array.isArray(this.remoteUserConfiguration.raw) ? undefined : this.remoteUserConfiguration.raw\n\t\t\t},\n\t\t\tworkspace: {\n\t\t\t\tcontents: this._workspaceConfiguration.contents,\n\t\t\t\toverrides: this._workspaceConfiguration.overrides,\n\t\t\t\tkeys: this._workspaceConfiguration.keys\n\t\t\t},\n\t\t\tfolders: [...this._folderConfigurations.keys()].reduce<[UriComponents, IConfigurationModel][]>((result, folder) => {\n\t\t\t\tconst { contents, overrides, keys } = this._folderConfigurations.get(folder)!;\n\t\t\t\tresult.push([folder, { contents, overrides, keys }]);\n\t\t\t\treturn result;\n\t\t\t}, [])\n\t\t};\n\t}\n\n\tstatic parse(data: IConfigurationData, logService: ILogService): Configuration {\n\t\tconst defaultConfiguration = this.parseConfigurationModel(data.defaults, logService);\n\t\tconst policyConfiguration = this.parseConfigurationModel(data.policy, logService);\n\t\tconst applicationConfiguration = this.parseConfigurationModel(data.application, logService);\n\t\tconst userLocalConfiguration = this.parseConfigurationModel(data.userLocal, logService);\n\t\tconst userRemoteConfiguration = this.parseConfigurationModel(data.userRemote, logService);\n\t\tconst workspaceConfiguration = this.parseConfigurationModel(data.workspace, logService);\n\t\tconst folders: ResourceMap<ConfigurationModel> = data.folders.reduce((result, value) => {\n\t\t\tresult.set(URI.revive(value[0]), this.parseConfigurationModel(value[1], logService));\n\t\t\treturn result;\n\t\t}, new ResourceMap<ConfigurationModel>());\n\t\treturn new Configuration(\n\t\t\tdefaultConfiguration,\n\t\t\tpolicyConfiguration,\n\t\t\tapplicationConfiguration,\n\t\t\tuserLocalConfiguration,\n\t\t\tuserRemoteConfiguration,\n\t\t\tworkspaceConfiguration,\n\t\t\tfolders,\n\t\t\tConfigurationModel.createEmptyModel(logService),\n\t\t\tnew ResourceMap<ConfigurationModel>(),\n\t\t\tlogService\n\t\t);\n\t}\n\n\tprivate static parseConfigurationModel(model: IConfigurationModel, logService: ILogService): ConfigurationModel {\n\t\treturn new ConfigurationModel(model.contents, model.keys, model.overrides, model.raw, logService);\n\t}\n\n}\n\nexport class ConfigurationChangeEvent implements IConfigurationChangeEvent {\n\n\tprivate readonly _marker = '\\n';\n\tprivate readonly _markerCode1 = this._marker.charCodeAt(0);\n\tprivate readonly _markerCode2 = '.'.charCodeAt(0);\n\tprivate readonly _affectsConfigStr: string;\n\n\treadonly affectedKeys = new Set<string>();\n\tsource!: ConfigurationTarget;\n\n\tconstructor(\n\t\treadonly change: IConfigurationChange,\n\t\tprivate readonly previous: { workspace?: Workspace; data: IConfigurationData } | undefined,\n\t\tprivate readonly currentConfiguraiton: Configuration,\n\t\tprivate readonly currentWorkspace: Workspace | undefined,\n\t\tprivate readonly logService: ILogService\n\t) {\n\t\tfor (const key of change.keys) {\n\t\t\tthis.affectedKeys.add(key);\n\t\t}\n\t\tfor (const [, keys] of change.overrides) {\n\t\t\tfor (const key of keys) {\n\t\t\t\tthis.affectedKeys.add(key);\n\t\t\t}\n\t\t}\n\n\t\t// Example: '\\nfoo.bar\\nabc.def\\n'\n\t\tthis._affectsConfigStr = this._marker;\n\t\tfor (const key of this.affectedKeys) {\n\t\t\tthis._affectsConfigStr += key + this._marker;\n\t\t}\n\t}\n\n\tprivate _previousConfiguration: Configuration | undefined = undefined;\n\tget previousConfiguration(): Configuration | undefined {\n\t\tif (!this._previousConfiguration && this.previous) {\n\t\t\tthis._previousConfiguration = Configuration.parse(this.previous.data, this.logService);\n\t\t}\n\t\treturn this._previousConfiguration;\n\t}\n\n\taffectsConfiguration(section: string, overrides?: IConfigurationOverrides): boolean {\n\t\t// we have one large string with all keys that have changed. we pad (marker) the section\n\t\t// and check that either find it padded or before a segment character\n\t\tconst needle = this._marker + section;\n\t\tconst idx = this._affectsConfigStr.indexOf(needle);\n\t\tif (idx < 0) {\n\t\t\t// NOT: (marker + section)\n\t\t\treturn false;\n\t\t}\n\t\tconst pos = idx + needle.length;\n\t\tif (pos >= this._affectsConfigStr.length) {\n\t\t\treturn false;\n\t\t}\n\t\tconst code = this._affectsConfigStr.charCodeAt(pos);\n\t\tif (code !== this._markerCode1 && code !== this._markerCode2) {\n\t\t\t// NOT: section + (marker | segment)\n\t\t\treturn false;\n\t\t}\n\t\tif (overrides) {\n\t\t\tconst value1 = this.previousConfiguration ? this.previousConfiguration.getValue(section, overrides, this.previous?.workspace) : undefined;\n\t\t\tconst value2 = this.currentConfiguraiton.getValue(section, overrides, this.currentWorkspace);\n\t\t\treturn !objects.equals(value1, value2);\n\t\t}\n\t\treturn true;\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as arrays from '../../../base/common/arrays.js';\nimport { IStringDictionary } from '../../../base/common/collections.js';\nimport { ResourceMap } from '../../../base/common/map.js';\nimport * as objects from '../../../base/common/objects.js';\nimport * as types from '../../../base/common/types.js';\nimport { URI, UriComponents } from '../../../base/common/uri.js';\nimport { addToValueTree, ConfigurationTarget, getConfigurationValue, IConfigurationChange, IConfigurationChangeEvent, IConfigurationData, IConfigurationModel, IConfigurationOverrides, IConfigurationUpdateOverrides, IConfigurationValue, IInspectValue, IOverrides, removeFromValueTree, toValuesTree } from './configuration.js';\nimport { ConfigurationScope, Extensions, IConfigurationPropertySchema, IConfigurationRegistry, overrideIdentifiersFromKey, OVERRIDE_PROPERTY_REGEX, IRegisteredConfigurationPropertySchema } from './configurationRegistry.js';\nimport { ILogService } from '../../log/common/log.js';\nimport { Registry } from '../../registry/common/platform.js';\nimport { Workspace } from '../../workspace/common/workspace.js';\n\nfunction freeze<T>(data: T): T {\n\treturn Object.isFrozen(data) ? data : objects.deepFreeze(data);\n}\n\ntype InspectValue<V> = IInspectValue<V> & { merged?: V };\n\nexport class ConfigurationModel implements IConfigurationModel {\n\n\tstatic createEmptyModel(logService: ILogService): ConfigurationModel {\n\t\treturn new ConfigurationModel({}, [], [], undefined, logService);\n\t}\n\n\tprivate readonly overrideConfigurations = new Map<string, ConfigurationModel>();\n\n\tconstructor(\n\t\tprivate readonly _contents: any,\n\t\tprivate readonly _keys: string[],\n\t\tprivate readonly _overrides: IOverrides[],\n\t\treadonly raw: IStringDictionary<any> | ReadonlyArray<IStringDictionary<any> | ConfigurationModel> | undefined,\n\t\tprivate readonly logService: ILogService\n\t) {\n\t}\n\n\tprivate _rawConfiguration: ConfigurationModel | undefined;\n\tget rawConfiguration(): ConfigurationModel {\n\t\tif (!this._rawConfiguration) {\n\t\t\tif (this.raw) {\n\t\t\t\tconst rawConfigurationModels = (Array.isArray(this.raw) ? this.raw : [this.raw]).map(raw => {\n\t\t\t\t\tif (raw instanceof ConfigurationModel) {\n\t\t\t\t\t\treturn raw;\n\t\t\t\t\t}\n\t\t\t\t\tconst parser = new ConfigurationModelParser('', this.logService);\n\t\t\t\t\tparser.parseRaw(raw);\n\t\t\t\t\treturn parser.configurationModel;\n\t\t\t\t});\n\t\t\t\tthis._rawConfiguration = rawConfigurationModels.reduce((previous, current) => current === previous ? current : previous.merge(current), rawConfigurationModels[0]);\n\t\t\t} else {\n\t\t\t\t// raw is same as current\n\t\t\t\tthis._rawConfiguration = this;\n\t\t\t}\n\t\t}\n\t\treturn this._rawConfiguration;\n\t}\n\n\tget contents(): any {\n\t\treturn this._contents;\n\t}\n\n\tget overrides(): IOverrides[] {\n\t\treturn this._overrides;\n\t}\n\n\tget keys(): string[] {\n\t\treturn this._keys;\n\t}\n\n\tisEmpty(): boolean {\n\t\treturn this._keys.length === 0 && Object.keys(this._contents).length === 0 && this._overrides.length === 0;\n\t}\n\n\tgetValue<V>(section: string | undefined): V {\n\t\treturn section ? getConfigurationValue<any>(this.contents, section) : this.contents;\n\t}\n\n\tinspect<V>(section: string | undefined, overrideIdentifier?: string | null): InspectValue<V> {\n\t\tconst that = this;\n\t\treturn {\n\t\t\tget value() {\n\t\t\t\treturn freeze(that.rawConfiguration.getValue<V>(section));\n\t\t\t},\n\t\t\tget override() {\n\t\t\t\treturn overrideIdentifier ? freeze(that.rawConfiguration.getOverrideValue<V>(section, overrideIdentifier)) : undefined;\n\t\t\t},\n\t\t\tget merged() {\n\t\t\t\treturn freeze(overrideIdentifier ? that.rawConfiguration.override(overrideIdentifier).getValue<V>(section) : that.rawConfiguration.getValue<V>(section));\n\t\t\t},\n\t\t\tget overrides() {\n\t\t\t\tconst overrides: { readonly identifiers: string[]; readonly value: V }[] = [];\n\t\t\t\tfor (const { contents, identifiers, keys } of that.rawConfiguration.overrides) {\n\t\t\t\t\tconst value = new ConfigurationModel(contents, keys, [], undefined, that.logService).getValue<V>(section);\n\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\toverrides.push({ identifiers, value });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn overrides.length ? freeze(overrides) : undefined;\n\t\t\t}\n\t\t};\n\t}\n\n\tgetOverrideValue<V>(section: string | undefined, overrideIdentifier: string): V | undefined {\n\t\tconst overrideContents = this.getContentsForOverrideIdentifer(overrideIdentifier);\n\t\treturn overrideContents\n\t\t\t? section ? getConfigurationValue<any>(overrideContents, section) : overrideContents\n\t\t\t: undefined;\n\t}\n\n\toverride(identifier: string): ConfigurationModel {\n\t\tlet overrideConfigurationModel = this.overrideConfigurations.get(identifier);\n\t\tif (!overrideConfigurationModel) {\n\t\t\toverrideConfigurationModel = this.createOverrideConfigurationModel(identifier);\n\t\t\tthis.overrideConfigurations.set(identifier, overrideConfigurationModel);\n\t\t}\n\t\treturn overrideConfigurationModel;\n\t}\n\n\tmerge(...others: ConfigurationModel[]): ConfigurationModel {\n\t\tconst contents = objects.deepClone(this.contents);\n\t\tconst overrides = objects.deepClone(this.overrides);\n\t\tconst keys = [...this.keys];\n\t\tconst raws = this.raw ? Array.isArray(this.raw) ? [...this.raw] : [this.raw] : [this];\n\n\t\tfor (const other of others) {\n\t\t\traws.push(...(other.raw ? Array.isArray(other.raw) ? other.raw : [other.raw] : [other]));\n\t\t\tif (other.isEmpty()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.mergeContents(contents, other.contents);\n\n\t\t\tfor (const otherOverride of other.overrides) {\n\t\t\t\tconst [override] = overrides.filter(o => arrays.equals(o.identifiers, otherOverride.identifiers));\n\t\t\t\tif (override) {\n\t\t\t\t\tthis.mergeContents(override.contents, otherOverride.contents);\n\t\t\t\t\toverride.keys.push(...otherOverride.keys);\n\t\t\t\t\toverride.keys = arrays.distinct(override.keys);\n\t\t\t\t} else {\n\t\t\t\t\toverrides.push(objects.deepClone(otherOverride));\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const key of other.keys) {\n\t\t\t\tif (keys.indexOf(key) === -1) {\n\t\t\t\t\tkeys.push(key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new ConfigurationModel(contents, keys, overrides, !raws.length || raws.every(raw => raw instanceof ConfigurationModel) ? undefined : raws, this.logService);\n\t}\n\n\tprivate createOverrideConfigurationModel(identifier: string): ConfigurationModel {\n\t\tconst overrideContents = this.getContentsForOverrideIdentifer(identifier);\n\n\t\tif (!overrideContents || typeof overrideContents !== 'object' || !Object.keys(overrideContents).length) {\n\t\t\t// If there are no valid overrides, return self\n\t\t\treturn this;\n\t\t}\n\n\t\tconst contents: any = {};\n\t\tfor (const key of arrays.distinct([...Object.keys(this.contents), ...Object.keys(overrideContents)])) {\n\n\t\t\tlet contentsForKey = this.contents[key];\n\t\t\tconst overrideContentsForKey = overrideContents[key];\n\n\t\t\t// If there are override contents for the key, clone and merge otherwise use base contents\n\t\t\tif (overrideContentsForKey) {\n\t\t\t\t// Clone and merge only if base contents and override contents are of type object otherwise just override\n\t\t\t\tif (typeof contentsForKey === 'object' && typeof overrideContentsForKey === 'object') {\n\t\t\t\t\tcontentsForKey = objects.deepClone(contentsForKey);\n\t\t\t\t\tthis.mergeContents(contentsForKey, overrideContentsForKey);\n\t\t\t\t} else {\n\t\t\t\t\tcontentsForKey = overrideContentsForKey;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcontents[key] = contentsForKey;\n\t\t}\n\n\t\treturn new ConfigurationModel(contents, this.keys, this.overrides, undefined, this.logService);\n\t}\n\n\tprivate mergeContents(source: any, target: any): void {\n\t\tfor (const key of Object.keys(target)) {\n\t\t\tif (key in source) {\n\t\t\t\tif (types.isObject(source[key]) && types.isObject(target[key])) {\n\t\t\t\t\tthis.mergeContents(source[key], target[key]);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsource[key] = objects.deepClone(target[key]);\n\t\t}\n\t}\n\n\tprivate getContentsForOverrideIdentifer(identifier: string): any {\n\t\tlet contentsForIdentifierOnly: IStringDictionary<any> | null = null;\n\t\tlet contents: IStringDictionary<any> | null = null;\n\t\tconst mergeContents = (contentsToMerge: any) => {\n\t\t\tif (contentsToMerge) {\n\t\t\t\tif (contents) {\n\t\t\t\t\tthis.mergeContents(contents, contentsToMerge);\n\t\t\t\t} else {\n\t\t\t\t\tcontents = objects.deepClone(contentsToMerge);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tfor (const override of this.overrides) {\n\t\t\tif (override.identifiers.length === 1 && override.identifiers[0] === identifier) {\n\t\t\t\tcontentsForIdentifierOnly = override.contents;\n\t\t\t} else if (override.identifiers.includes(identifier)) {\n\t\t\t\tmergeContents(override.contents);\n\t\t\t}\n\t\t}\n\t\t// Merge contents of the identifier only at the end to take precedence.\n\t\tmergeContents(contentsForIdentifierOnly);\n\t\treturn contents;\n\t}\n\n\ttoJSON(): IConfigurationModel {\n\t\treturn {\n\t\t\tcontents: this.contents,\n\t\t\toverrides: this.overrides,\n\t\t\tkeys: this.keys\n\t\t};\n\t}\n\n\tpublic setValue(key: string, value: any): void {\n\t\tthis.updateValue(key, value, false);\n\t}\n\n\tpublic removeValue(key: string): void {\n\t\tconst index = this.keys.indexOf(key);\n\t\tif (index === -1) {\n\t\t\treturn;\n\t\t}\n\t\tthis.keys.splice(index, 1);\n\t\tremoveFromValueTree(this.contents, key);\n\t\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\t\tthis.overrides.splice(this.overrides.findIndex(o => arrays.equals(o.identifiers, overrideIdentifiersFromKey(key))), 1);\n\t\t}\n\t}\n\n\tprivate updateValue(key: string, value: any, add: boolean): void {\n\t\taddToValueTree(this.contents, key, value, e => this.logService.error(e));\n\t\tadd = add || this.keys.indexOf(key) === -1;\n\t\tif (add) {\n\t\t\tthis.keys.push(key);\n\t\t}\n\t\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\t\tconst identifiers = overrideIdentifiersFromKey(key);\n\t\t\tconst override = {\n\t\t\t\tidentifiers,\n\t\t\t\tkeys: Object.keys(this.contents[key]),\n\t\t\t\tcontents: toValuesTree(this.contents[key], message => this.logService.error(message)),\n\t\t\t};\n\t\t\tconst index = this.overrides.findIndex(o => arrays.equals(o.identifiers, identifiers));\n\t\t\tif (index !== -1) {\n\t\t\t\tthis.overrides[index] = override;\n\t\t\t} else {\n\t\t\t\tthis.overrides.push(override);\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport interface ConfigurationParseOptions {\n\tskipUnregistered?: boolean;\n\tscopes?: ConfigurationScope[];\n\tskipRestricted?: boolean;\n\tinclude?: string[];\n\texclude?: string[];\n}\n\nexport class ConfigurationModelParser {\n\n\tprivate _raw: any = null;\n\tprivate _configurationModel: ConfigurationModel | null = null;\n\tprivate _restrictedConfigurations: string[] = [];\n\n\tconstructor(\n\t\tprotected readonly _name: string,\n\t\tprotected readonly logService: ILogService\n\t) { }\n\n\tget configurationModel(): ConfigurationModel {\n\t\treturn this._configurationModel || ConfigurationModel.createEmptyModel(this.logService);\n\t}\n\n\tpublic parseRaw(raw: any, options?: ConfigurationParseOptions): void {\n\t\tthis._raw = raw;\n\t\tconst { contents, keys, overrides, restricted, hasExcludedProperties } = this.doParseRaw(raw, options);\n\t\tthis._configurationModel = new ConfigurationModel(contents, keys, overrides, hasExcludedProperties ? [raw] : undefined /* raw has not changed */, this.logService);\n\t\tthis._restrictedConfigurations = restricted || [];\n\t}\n\n\tprotected doParseRaw(raw: any, options?: ConfigurationParseOptions): IConfigurationModel & { restricted?: string[]; hasExcludedProperties?: boolean } {\n\t\tconst registry = Registry.as<IConfigurationRegistry>(Extensions.Configuration);\n\t\tconst configurationProperties = registry.getConfigurationProperties();\n\t\tconst excludedConfigurationProperties = registry.getExcludedConfigurationProperties();\n\t\tconst filtered = this.filter(raw, configurationProperties, excludedConfigurationProperties, true, options);\n\t\traw = filtered.raw;\n\t\tconst contents = toValuesTree(raw, message => this.logService.error(`Conflict in settings file ${this._name}: ${message}`));\n\t\tconst keys = Object.keys(raw);\n\t\tconst overrides = this.toOverrides(raw, message => this.logService.error(`Conflict in settings file ${this._name}: ${message}`));\n\t\treturn { contents, keys, overrides, restricted: filtered.restricted, hasExcludedProperties: filtered.hasExcludedProperties };\n\t}\n\n\tprivate filter(properties: any, configurationProperties: IStringDictionary<IRegisteredConfigurationPropertySchema>, excludedConfigurationProperties: IStringDictionary<IRegisteredConfigurationPropertySchema>, filterOverriddenProperties: boolean, options?: ConfigurationParseOptions): { raw: {}; restricted: string[]; hasExcludedProperties: boolean } {\n\t\tlet hasExcludedProperties = false;\n\t\tif (!options?.scopes && !options?.skipRestricted && !options?.skipUnregistered && !options?.exclude?.length) {\n\t\t\treturn { raw: properties, restricted: [], hasExcludedProperties };\n\t\t}\n\t\tconst raw: any = {};\n\t\tconst restricted: string[] = [];\n\t\tfor (const key in properties) {\n\t\t\tif (OVERRIDE_PROPERTY_REGEX.test(key) && filterOverriddenProperties) {\n\t\t\t\tconst result = this.filter(properties[key], configurationProperties, excludedConfigurationProperties, false, options);\n\t\t\t\traw[key] = result.raw;\n\t\t\t\thasExcludedProperties = hasExcludedProperties || result.hasExcludedProperties;\n\t\t\t\trestricted.push(...result.restricted);\n\t\t\t} else {\n\t\t\t\tconst propertySchema = configurationProperties[key];\n\t\t\t\tif (propertySchema?.restricted) {\n\t\t\t\t\trestricted.push(key);\n\t\t\t\t}\n\t\t\t\tif (this.shouldInclude(key, propertySchema, excludedConfigurationProperties, options)) {\n\t\t\t\t\traw[key] = properties[key];\n\t\t\t\t} else {\n\t\t\t\t\thasExcludedProperties = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn { raw, restricted, hasExcludedProperties };\n\t}\n\n\tprivate shouldInclude(key: string, propertySchema: IConfigurationPropertySchema | undefined, excludedConfigurationProperties: IStringDictionary<IRegisteredConfigurationPropertySchema>, options: ConfigurationParseOptions): boolean {\n\t\tif (options.exclude?.includes(key)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (options.include?.includes(key)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (options.skipRestricted && propertySchema?.restricted) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (options.skipUnregistered && !propertySchema) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst schema = propertySchema ?? excludedConfigurationProperties[key];\n\t\tconst scope = schema ? typeof schema.scope !== 'undefined' ? schema.scope : ConfigurationScope.WINDOW : undefined;\n\t\tif (scope === undefined || options.scopes === undefined) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn options.scopes.includes(scope);\n\t}\n\n\tprivate toOverrides(raw: any, conflictReporter: (message: string) => void): IOverrides[] {\n\t\tconst overrides: IOverrides[] = [];\n\t\tfor (const key of Object.keys(raw)) {\n\t\t\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\t\t\tconst overrideRaw: any = {};\n\t\t\t\tfor (const keyInOverrideRaw in raw[key]) {\n\t\t\t\t\toverrideRaw[keyInOverrideRaw] = raw[key][keyInOverrideRaw];\n\t\t\t\t}\n\t\t\t\toverrides.push({\n\t\t\t\t\tidentifiers: overrideIdentifiersFromKey(key),\n\t\t\t\t\tkeys: Object.keys(overrideRaw),\n\t\t\t\t\tcontents: toValuesTree(overrideRaw, conflictReporter)\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn overrides;\n\t}\n\n}\n\nclass ConfigurationInspectValue<V> implements IConfigurationValue<V> {\n\n\tconstructor(\n\t\tprivate readonly key: string,\n\t\tprivate readonly overrides: IConfigurationOverrides,\n\t\tprivate readonly _value: V | undefined,\n\t\treadonly overrideIdentifiers: string[] | undefined,\n\t\tprivate readonly defaultConfiguration: ConfigurationModel,\n\t\tprivate readonly policyConfiguration: ConfigurationModel | undefined,\n\t\tprivate readonly applicationConfiguration: ConfigurationModel | undefined,\n\t\tprivate readonly userConfiguration: ConfigurationModel,\n\t\tprivate readonly localUserConfiguration: ConfigurationModel,\n\t\tprivate readonly remoteUserConfiguration: ConfigurationModel,\n\t\tprivate readonly workspaceConfiguration: ConfigurationModel | undefined,\n\t\tprivate readonly folderConfigurationModel: ConfigurationModel | undefined,\n\t\tprivate readonly memoryConfigurationModel: ConfigurationModel\n\t) {\n\t}\n\n\tprivate toInspectValue(inspectValue: IInspectValue<V> | undefined | null): IInspectValue<V> | undefined {\n\t\treturn inspectValue?.value !== undefined || inspectValue?.override !== undefined || inspectValue?.overrides !== undefined ? inspectValue : undefined;\n\t}\n\n\tprivate _userInspectValue: InspectValue<V> | undefined;\n\tprivate get userInspectValue(): InspectValue<V> {\n\t\tif (!this._userInspectValue) {\n\t\t\tthis._userInspectValue = this.userConfiguration.inspect<V>(this.key, this.overrides.overrideIdentifier);\n\t\t}\n\t\treturn this._userInspectValue;\n\t}\n\n\tget user(): IInspectValue<V> | undefined {\n\t\treturn this.toInspectValue(this.userInspectValue);\n\t}\n\n}\n\nexport class Configuration {\n\n\tprivate _workspaceConsolidatedConfiguration: ConfigurationModel | null = null;\n\tprivate _foldersConsolidatedConfigurations = new ResourceMap<ConfigurationModel>();\n\n\tconstructor(\n\t\tprivate _defaultConfiguration: ConfigurationModel,\n\t\tprivate _policyConfiguration: ConfigurationModel,\n\t\tprivate _applicationConfiguration: ConfigurationModel,\n\t\tprivate _localUserConfiguration: ConfigurationModel,\n\t\tprivate _remoteUserConfiguration: ConfigurationModel,\n\t\tprivate _workspaceConfiguration: ConfigurationModel,\n\t\tprivate _folderConfigurations: ResourceMap<ConfigurationModel>,\n\t\tprivate _memoryConfiguration: ConfigurationModel,\n\t\tprivate _memoryConfigurationByResource: ResourceMap<ConfigurationModel>,\n\t\tprivate readonly logService: ILogService\n\t) {\n\t}\n\n\tgetValue(section: string | undefined, overrides: IConfigurationOverrides, workspace: Workspace | undefined): any {\n\t\tconst consolidateConfigurationModel = this.getConsolidatedConfigurationModel(section, overrides, workspace);\n\t\treturn consolidateConfigurationModel.getValue(section);\n\t}\n\n\tupdateValue(key: string, value: any, overrides: IConfigurationUpdateOverrides = {}): void {\n\t\tlet memoryConfiguration: ConfigurationModel | undefined;\n\t\tif (overrides.resource) {\n\t\t\tmemoryConfiguration = this._memoryConfigurationByResource.get(overrides.resource);\n\t\t\tif (!memoryConfiguration) {\n\t\t\t\tmemoryConfiguration = ConfigurationModel.createEmptyModel(this.logService);\n\t\t\t\tthis._memoryConfigurationByResource.set(overrides.resource, memoryConfiguration);\n\t\t\t}\n\t\t} else {\n\t\t\tmemoryConfiguration = this._memoryConfiguration;\n\t\t}\n\n\t\tif (value === undefined) {\n\t\t\tmemoryConfiguration.removeValue(key);\n\t\t} else {\n\t\t\tmemoryConfiguration.setValue(key, value);\n\t\t}\n\n\t\tif (!overrides.resource) {\n\t\t\tthis._workspaceConsolidatedConfiguration = null;\n\t\t}\n\t}\n\n\tinspect<C>(key: string, overrides: IConfigurationOverrides, workspace: Workspace | undefined): IConfigurationValue<C> {\n\t\tconst consolidateConfigurationModel = this.getConsolidatedConfigurationModel(key, overrides, workspace);\n\t\tconst folderConfigurationModel = this.getFolderConfigurationModelForResource(overrides.resource, workspace);\n\t\tconst memoryConfigurationModel = overrides.resource ? this._memoryConfigurationByResource.get(overrides.resource) || this._memoryConfiguration : this._memoryConfiguration;\n\t\tconst overrideIdentifiers = new Set<string>();\n\t\tfor (const override of consolidateConfigurationModel.overrides) {\n\t\t\tfor (const overrideIdentifier of override.identifiers) {\n\t\t\t\tif (consolidateConfigurationModel.getOverrideValue(key, overrideIdentifier) !== undefined) {\n\t\t\t\t\toverrideIdentifiers.add(overrideIdentifier);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn new ConfigurationInspectValue<C>(\n\t\t\tkey,\n\t\t\toverrides,\n\t\t\tconsolidateConfigurationModel.getValue<C>(key),\n\t\t\toverrideIdentifiers.size ? [...overrideIdentifiers] : undefined,\n\t\t\tthis._defaultConfiguration,\n\t\t\tthis._policyConfiguration.isEmpty() ? undefined : this._policyConfiguration,\n\t\t\tthis.applicationConfiguration.isEmpty() ? undefined : this.applicationConfiguration,\n\t\t\tthis.userConfiguration,\n\t\t\tthis.localUserConfiguration,\n\t\t\tthis.remoteUserConfiguration,\n\t\t\tworkspace ? this._workspaceConfiguration : undefined,\n\t\t\tfolderConfigurationModel ? folderConfigurationModel : undefined,\n\t\t\tmemoryConfigurationModel\n\t\t);\n\n\t}\n\n\tget applicationConfiguration(): ConfigurationModel {\n\t\treturn this._applicationConfiguration;\n\t}\n\n\tprivate _userConfiguration: ConfigurationModel | null = null;\n\tget userConfiguration(): ConfigurationModel {\n\t\tif (!this._userConfiguration) {\n\t\t\tif (this._remoteUserConfiguration.isEmpty()) {\n\t\t\t\tthis._userConfiguration = this._localUserConfiguration;\n\t\t\t} else {\n\t\t\t\tconst merged = this._localUserConfiguration.merge(this._remoteUserConfiguration);\n\t\t\t\tthis._userConfiguration = new ConfigurationModel(merged.contents, merged.keys, merged.overrides, undefined, this.logService);\n\t\t\t}\n\t\t}\n\t\treturn this._userConfiguration;\n\t}\n\n\tget localUserConfiguration(): ConfigurationModel {\n\t\treturn this._localUserConfiguration;\n\t}\n\n\tget remoteUserConfiguration(): ConfigurationModel {\n\t\treturn this._remoteUserConfiguration;\n\t}\n\n\tprivate getConsolidatedConfigurationModel(section: string | undefined, overrides: IConfigurationOverrides, workspace: Workspace | undefined): ConfigurationModel {\n\t\tlet configurationModel = this.getConsolidatedConfigurationModelForResource(overrides, workspace);\n\t\tif (overrides.overrideIdentifier) {\n\t\t\tconfigurationModel = configurationModel.override(overrides.overrideIdentifier);\n\t\t}\n\t\tif (!this._policyConfiguration.isEmpty() && this._policyConfiguration.getValue(section) !== undefined) {\n\t\t\t// clone by merging\n\t\t\tconfigurationModel = configurationModel.merge();\n\t\t\tfor (const key of this._policyConfiguration.keys) {\n\t\t\t\tconfigurationModel.setValue(key, this._policyConfiguration.getValue(key));\n\t\t\t}\n\t\t}\n\t\treturn configurationModel;\n\t}\n\n\tprivate getConsolidatedConfigurationModelForResource({ resource }: IConfigurationOverrides, workspace: Workspace | undefined): ConfigurationModel {\n\t\tlet consolidateConfiguration = this.getWorkspaceConsolidatedConfiguration();\n\n\t\tif (workspace && resource) {\n\t\t\tconst root = workspace.getFolder(resource);\n\t\t\tif (root) {\n\t\t\t\tconsolidateConfiguration = this.getFolderConsolidatedConfiguration(root.uri) || consolidateConfiguration;\n\t\t\t}\n\t\t\tconst memoryConfigurationForResource = this._memoryConfigurationByResource.get(resource);\n\t\t\tif (memoryConfigurationForResource) {\n\t\t\t\tconsolidateConfiguration = consolidateConfiguration.merge(memoryConfigurationForResource);\n\t\t\t}\n\t\t}\n\n\t\treturn consolidateConfiguration;\n\t}\n\n\tprivate getWorkspaceConsolidatedConfiguration(): ConfigurationModel {\n\t\tif (!this._workspaceConsolidatedConfiguration) {\n\t\t\tthis._workspaceConsolidatedConfiguration = this._defaultConfiguration.merge(this.applicationConfiguration, this.userConfiguration, this._workspaceConfiguration, this._memoryConfiguration);\n\t\t}\n\t\treturn this._workspaceConsolidatedConfiguration;\n\t}\n\n\tprivate getFolderConsolidatedConfiguration(folder: URI): ConfigurationModel {\n\t\tlet folderConsolidatedConfiguration = this._foldersConsolidatedConfigurations.get(folder);\n\t\tif (!folderConsolidatedConfiguration) {\n\t\t\tconst workspaceConsolidateConfiguration = this.getWorkspaceConsolidatedConfiguration();\n\t\t\tconst folderConfiguration = this._folderConfigurations.get(folder);\n\t\t\tif (folderConfiguration) {\n\t\t\t\tfolderConsolidatedConfiguration = workspaceConsolidateConfiguration.merge(folderConfiguration);\n\t\t\t\tthis._foldersConsolidatedConfigurations.set(folder, folderConsolidatedConfiguration);\n\t\t\t} else {\n\t\t\t\tfolderConsolidatedConfiguration = workspaceConsolidateConfiguration;\n\t\t\t}\n\t\t}\n\t\treturn folderConsolidatedConfiguration;\n\t}\n\n\tprivate getFolderConfigurationModelForResource(resource: URI | null | undefined, workspace: Workspace | undefined): ConfigurationModel | undefined {\n\t\tif (workspace && resource) {\n\t\t\tconst root = workspace.getFolder(resource);\n\t\t\tif (root) {\n\t\t\t\treturn this._folderConfigurations.get(root.uri);\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\ttoData(): IConfigurationData {\n\t\treturn {\n\t\t\tdefaults: {\n\t\t\t\tcontents: this._defaultConfiguration.contents,\n\t\t\t\toverrides: this._defaultConfiguration.overrides,\n\t\t\t\tkeys: this._defaultConfiguration.keys,\n\t\t\t},\n\t\t\tpolicy: {\n\t\t\t\tcontents: this._policyConfiguration.contents,\n\t\t\t\toverrides: this._policyConfiguration.overrides,\n\t\t\t\tkeys: this._policyConfiguration.keys\n\t\t\t},\n\t\t\tapplication: {\n\t\t\t\tcontents: this.applicationConfiguration.contents,\n\t\t\t\toverrides: this.applicationConfiguration.overrides,\n\t\t\t\tkeys: this.applicationConfiguration.keys,\n\t\t\t\traw: Array.isArray(this.applicationConfiguration.raw) ? undefined : this.applicationConfiguration.raw\n\t\t\t},\n\t\t\tuserLocal: {\n\t\t\t\tcontents: this.localUserConfiguration.contents,\n\t\t\t\toverrides: this.localUserConfiguration.overrides,\n\t\t\t\tkeys: this.localUserConfiguration.keys,\n\t\t\t\traw: Array.isArray(this.localUserConfiguration.raw) ? undefined : this.localUserConfiguration.raw\n\t\t\t},\n\t\t\tuserRemote: {\n\t\t\t\tcontents: this.remoteUserConfiguration.contents,\n\t\t\t\toverrides: this.remoteUserConfiguration.overrides,\n\t\t\t\tkeys: this.remoteUserConfiguration.keys,\n\t\t\t\traw: Array.isArray(this.remoteUserConfiguration.raw) ? undefined : this.remoteUserConfiguration.raw\n\t\t\t},\n\t\t\tworkspace: {\n\t\t\t\tcontents: this._workspaceConfiguration.contents,\n\t\t\t\toverrides: this._workspaceConfiguration.overrides,\n\t\t\t\tkeys: this._workspaceConfiguration.keys\n\t\t\t},\n\t\t\tfolders: [...this._folderConfigurations.keys()].reduce<[UriComponents, IConfigurationModel][]>((result, folder) => {\n\t\t\t\tconst { contents, overrides, keys } = this._folderConfigurations.get(folder)!;\n\t\t\t\tresult.push([folder, { contents, overrides, keys }]);\n\t\t\t\treturn result;\n\t\t\t}, [])\n\t\t};\n\t}\n\n\tstatic parse(data: IConfigurationData, logService: ILogService): Configuration {\n\t\tconst defaultConfiguration = this.parseConfigurationModel(data.defaults, logService);\n\t\tconst policyConfiguration = this.parseConfigurationModel(data.policy, logService);\n\t\tconst applicationConfiguration = this.parseConfigurationModel(data.application, logService);\n\t\tconst userLocalConfiguration = this.parseConfigurationModel(data.userLocal, logService);\n\t\tconst userRemoteConfiguration = this.parseConfigurationModel(data.userRemote, logService);\n\t\tconst workspaceConfiguration = this.parseConfigurationModel(data.workspace, logService);\n\t\tconst folders: ResourceMap<ConfigurationModel> = data.folders.reduce((result, value) => {\n\t\t\tresult.set(URI.revive(value[0]), this.parseConfigurationModel(value[1], logService));\n\t\t\treturn result;\n\t\t}, new ResourceMap<ConfigurationModel>());\n\t\treturn new Configuration(\n\t\t\tdefaultConfiguration,\n\t\t\tpolicyConfiguration,\n\t\t\tapplicationConfiguration,\n\t\t\tuserLocalConfiguration,\n\t\t\tuserRemoteConfiguration,\n\t\t\tworkspaceConfiguration,\n\t\t\tfolders,\n\t\t\tConfigurationModel.createEmptyModel(logService),\n\t\t\tnew ResourceMap<ConfigurationModel>(),\n\t\t\tlogService\n\t\t);\n\t}\n\n\tprivate static parseConfigurationModel(model: IConfigurationModel, logService: ILogService): ConfigurationModel {\n\t\treturn new ConfigurationModel(model.contents, model.keys, model.overrides, model.raw, logService);\n\t}\n\n}\n\nexport class ConfigurationChangeEvent implements IConfigurationChangeEvent {\n\n\tprivate readonly _marker = '\\n';\n\tprivate readonly _markerCode1 = this._marker.charCodeAt(0);\n\tprivate readonly _markerCode2 = '.'.charCodeAt(0);\n\tprivate readonly _affectsConfigStr: string;\n\n\treadonly affectedKeys = new Set<string>();\n\tsource!: ConfigurationTarget;\n\n\tconstructor(\n\t\treadonly change: IConfigurationChange,\n\t\tprivate readonly previous: { workspace?: Workspace; data: IConfigurationData } | undefined,\n\t\tprivate readonly currentConfiguraiton: Configuration,\n\t\tprivate readonly currentWorkspace: Workspace | undefined,\n\t\tprivate readonly logService: ILogService\n\t) {\n\t\tfor (const key of change.keys) {\n\t\t\tthis.affectedKeys.add(key);\n\t\t}\n\t\tfor (const [, keys] of change.overrides) {\n\t\t\tfor (const key of keys) {\n\t\t\t\tthis.affectedKeys.add(key);\n\t\t\t}\n\t\t}\n\n\t\t// Example: '\\nfoo.bar\\nabc.def\\n'\n\t\tthis._affectsConfigStr = this._marker;\n\t\tfor (const key of this.affectedKeys) {\n\t\t\tthis._affectsConfigStr += key + this._marker;\n\t\t}\n\t}\n\n\tprivate _previousConfiguration: Configuration | undefined = undefined;\n\tget previousConfiguration(): Configuration | undefined {\n\t\tif (!this._previousConfiguration && this.previous) {\n\t\t\tthis._previousConfiguration = Configuration.parse(this.previous.data, this.logService);\n\t\t}\n\t\treturn this._previousConfiguration;\n\t}\n\n\taffectsConfiguration(section: string, overrides?: IConfigurationOverrides): boolean {\n\t\t// we have one large string with all keys that have changed. we pad (marker) the section\n\t\t// and check that either find it padded or before a segment character\n\t\tconst needle = this._marker + section;\n\t\tconst idx = this._affectsConfigStr.indexOf(needle);\n\t\tif (idx < 0) {\n\t\t\t// NOT: (marker + section)\n\t\t\treturn false;\n\t\t}\n\t\tconst pos = idx + needle.length;\n\t\tif (pos >= this._affectsConfigStr.length) {\n\t\t\treturn false;\n\t\t}\n\t\tconst code = this._affectsConfigStr.charCodeAt(pos);\n\t\tif (code !== this._markerCode1 && code !== this._markerCode2) {\n\t\t\t// NOT: section + (marker | segment)\n\t\t\treturn false;\n\t\t}\n\t\tif (overrides) {\n\t\t\tconst value1 = this.previousConfiguration ? this.previousConfiguration.getValue(section, overrides, this.previous?.workspace) : undefined;\n\t\t\tconst value2 = this.currentConfiguraiton.getValue(section, overrides, this.currentWorkspace);\n\t\t\treturn !objects.equals(value1, value2);\n\t\t}\n\t\treturn true;\n\t}\n}\n"]}
|
|
@@ -260,6 +260,9 @@ class ConfigurationRegistry extends Disposable {
|
|
|
260
260
|
getPolicyConfigurations() {
|
|
261
261
|
return this.policyConfigurations;
|
|
262
262
|
}
|
|
263
|
+
getExcludedConfigurationProperties() {
|
|
264
|
+
return this.excludedConfigurationProperties;
|
|
265
|
+
}
|
|
263
266
|
registerJSONConfiguration(configuration) {
|
|
264
267
|
const register = (configuration) => {
|
|
265
268
|
const properties = configuration.properties;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["vs/platform/configuration/common/configurationRegistry.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAE1D,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAExD,OAAO,KAAK,KAAK,MAAM,+BAA+B,CAAC;AACvD,OAAO,KAAK,GAAG,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,UAAU,IAAI,cAAc,EAA6B,MAAM,sDAAsD,CAAC;AAC/H,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE7D,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,aAAa,EAAE,kCAAkC;CACjD,CAAC;AAmJF,MAAM,CAAC,MAAM,WAAW,GAAwI,EAAE,UAAU,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,CAAC;AAC1M,MAAM,CAAC,MAAM,mBAAmB,GAAwI,EAAE,UAAU,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,CAAC;AAClN,MAAM,CAAC,MAAM,0BAA0B,GAAwI,EAAE,UAAU,EAAE,EAAE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,CAAC,IAAiC,EAAE,kKAAkK,EAAE,QAAQ,CAAC,CAAC;IACtO,CAAC;IACD,IAAI,qBAAqB,CAAC,0BAA0B,EAAE,CAAC,QAAQ,CAAC,KAAK,SAAS,EAAE,CAAC;QAChF,OAAO,GAAG,CAAC,QAAQ,CAAC,IAA2B,EAAE,6DAA6D,EAAE,QAAQ,CAAC,CAAC;IAC3H,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,EAAE,IAAI,IAAI,qBAAqB,CAAC,uBAAuB,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QACnH,OAAO,GAAG,CAAC,QAAQ,CAAC,IAAyB,EAAE,kFAAkF,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,qBAAqB,CAAC,uBAAuB,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;IAC7O,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC","file":"configurationRegistry.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { distinct } from '../../../base/common/arrays.js';\nimport { IStringDictionary } from '../../../base/common/collections.js';\nimport { Emitter } from '../../../base/common/event.js';\nimport { IJSONSchema } from '../../../base/common/jsonSchema.js';\nimport * as types from '../../../base/common/types.js';\nimport * as nls from '../../../nls.js';\nimport { getLanguageTagSettingPlainKey } from './configuration.js';\nimport { Extensions as JSONExtensions, IJSONContributionRegistry } from '../../jsonschemas/common/jsonContributionRegistry.js';\nimport { Registry } from '../../registry/common/platform.js';\nimport { IPolicy, PolicyName } from '../../../base/common/policy.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\n\nexport const Extensions = {\n\tConfiguration: 'base.contributions.configuration'\n};\n\nexport interface IConfigurationRegistry {\n\n\t/**\n\t * Register a configuration to the registry.\n\t */\n\tregisterConfiguration(configuration: IConfigurationNode): IConfigurationNode;\n\n\t/**\n\t * Register multiple default configurations to the registry.\n\t */\n\tregisterDefaultConfigurations(defaultConfigurations: IConfigurationDefaults[]): void;\n\n\t/**\n\t * Returns all configurations settings of all configuration nodes contributed to this registry.\n\t */\n\tgetConfigurationProperties(): IStringDictionary<IRegisteredConfigurationPropertySchema>;\n\n\t/**\n\t * Register the identifiers for editor configurations\n\t */\n\tregisterOverrideIdentifiers(identifiers: string[]): void;\n}\n\nexport const enum ConfigurationScope {\n\t/**\n\t * Application specific configuration, which can be configured only in default profile user settings.\n\t */\n\tAPPLICATION = 1,\n\t/**\n\t * Machine specific configuration, which can be configured only in local and remote user settings.\n\t */\n\tMACHINE,\n\t/**\n\t * An application machine specific configuration, which can be configured only in default profile user settings and remote user settings.\n\t */\n\tAPPLICATION_MACHINE,\n\t/**\n\t * Window specific configuration, which can be configured in the user or workspace settings.\n\t */\n\tWINDOW,\n\t/**\n\t * Resource specific configuration, which can be configured in the user, workspace or folder settings.\n\t */\n\tRESOURCE,\n\t/**\n\t * Resource specific configuration that can be configured in language specific settings\n\t */\n\tLANGUAGE_OVERRIDABLE,\n\t/**\n\t * Machine specific configuration that can also be configured in workspace or folder settings.\n\t */\n\tMACHINE_OVERRIDABLE,\n}\n\n\nexport interface IConfigurationPropertySchema extends IJSONSchema {\n\n\tscope?: ConfigurationScope;\n\n\t/**\n\t * When restricted, value of this configuration will be read only from trusted sources.\n\t * For eg., If the workspace is not trusted, then the value of this configuration is not read from workspace settings file.\n\t */\n\trestricted?: boolean;\n\n\t/**\n\t * When `false` this property is excluded from the registry. Default is to include.\n\t */\n\tincluded?: boolean;\n\n\t/**\n\t * List of tags associated to the property.\n\t * - A tag can be used for filtering\n\t * - Use `experimental` tag for marking the setting as experimental.\n\t */\n\ttags?: string[];\n\n\t/**\n\t * Disallow extensions to contribute configuration default value for this setting.\n\t */\n\tdisallowConfigurationDefault?: boolean;\n\n\t/**\n\t * When specified, this setting's value can always be overwritten by\n\t * a system-wide policy.\n\t */\n\tpolicy?: IPolicy;\n\n\t/**\n\t * When specified, this setting's default value can always be overwritten by\n\t * an experiment.\n\t */\n\texperiment?: {\n\t\t/**\n\t\t * The mode of the experiment.\n\t\t * - `startup`: The setting value is updated to the experiment value only on startup.\n\t\t * - `auto`: The setting value is updated to the experiment value automatically (whenever the experiment value changes).\n\t\t */\n\t\tmode: 'startup' | 'auto';\n\n\t\t/**\n\t\t * The name of the experiment. By default, this is `config.${settingId}`\n\t\t */\n\t\tname?: string;\n\t};\n}\n\nexport interface IExtensionInfo {\n}\n\nexport interface IConfigurationNode {\n\tid?: string;\n\torder?: number;\n\ttype?: string | string[];\n\ttitle?: string;\n\tproperties?: IStringDictionary<IConfigurationPropertySchema>;\n\tallOf?: IConfigurationNode[];\n\tscope?: ConfigurationScope;\n\textensionInfo?: IExtensionInfo;\n\trestrictedProperties?: string[];\n}\n\nexport type ConfigurationDefaultValueSource = IExtensionInfo | Map<string, IExtensionInfo>;\n\nexport interface IConfigurationDefaults {\n\toverrides: IStringDictionary<any>;\n\tsource?: IExtensionInfo;\n}\n\nexport type IRegisteredConfigurationPropertySchema = IConfigurationPropertySchema & {\n\tdefaultDefaultValue?: any;\n\tsource?: IExtensionInfo; // Source of the Property\n\tdefaultValueSource?: ConfigurationDefaultValueSource; // Source of the Default Value\n};\n\nexport interface IConfigurationDefaultOverride {\n\treadonly value: any;\n\treadonly source?: IExtensionInfo; // Source of the default override\n}\n\nexport interface IConfigurationDefaultOverrideValue {\n\treadonly value: any;\n\treadonly source?: ConfigurationDefaultValueSource;\n}\n\nexport const allSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const applicationSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const applicationMachineSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const machineSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const machineOverridableSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const windowSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const resourceSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\n\nexport const resourceLanguageSettingsSchemaId = 'vscode://schemas/settings/resourceLanguage';\n\nconst contributionRegistry = Registry.as<IJSONContributionRegistry>(JSONExtensions.JSONContribution);\n\nclass ConfigurationRegistry extends Disposable implements IConfigurationRegistry {\n\n\tprivate readonly registeredConfigurationDefaults: IConfigurationDefaults[] = [];\n\tprivate readonly configurationDefaultsOverrides: Map<string, { configurationDefaultOverrides: IConfigurationDefaultOverride[]; configurationDefaultOverrideValue?: IConfigurationDefaultOverrideValue }>;\n\tprivate readonly defaultLanguageConfigurationOverridesNode: IConfigurationNode;\n\tprivate readonly configurationContributors: IConfigurationNode[];\n\tprivate readonly configurationProperties: IStringDictionary<IRegisteredConfigurationPropertySchema>;\n\tprivate readonly policyConfigurations: Map<PolicyName, string>;\n\tprivate readonly excludedConfigurationProperties: IStringDictionary<IRegisteredConfigurationPropertySchema>;\n\tprivate readonly resourceLanguageSettingsSchema: IJSONSchema;\n\tprivate readonly overrideIdentifiers = new Set<string>();\n\n\tprivate readonly _onDidSchemaChange = this._register(new Emitter<void>());\n\n\tprivate readonly _onDidUpdateConfiguration = this._register(new Emitter<{ properties: ReadonlySet<string>; defaultsOverrides?: boolean }>());\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.configurationDefaultsOverrides = new Map();\n\t\tthis.defaultLanguageConfigurationOverridesNode = {\n\t\t\tid: 'defaultOverrides',\n\t\t\ttitle: nls.localize('defaultLanguageConfigurationOverrides.title', \"Default Language Configuration Overrides\"),\n\t\t\tproperties: {}\n\t\t};\n\t\tthis.configurationContributors = [this.defaultLanguageConfigurationOverridesNode];\n\t\tthis.resourceLanguageSettingsSchema = {\n\t\t\tproperties: {},\n\t\t\tpatternProperties: {},\n\t\t\tadditionalProperties: true,\n\t\t\tallowTrailingCommas: true,\n\t\t\tallowComments: true\n\t\t};\n\t\tthis.configurationProperties = {};\n\t\tthis.policyConfigurations = new Map<PolicyName, string>();\n\t\tthis.excludedConfigurationProperties = {};\n\n\t\tcontributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);\n\t\tthis.registerOverridePropertyPatternKey();\n\t}\n\n\tpublic registerConfiguration(configuration: IConfigurationNode, validate: boolean = true): IConfigurationNode {\n\t\tthis.registerConfigurations([configuration], validate);\n\t\treturn configuration;\n\t}\n\n\tpublic registerConfigurations(configurations: IConfigurationNode[], validate: boolean = true): void {\n\t\tconst properties = new Set<string>();\n\t\tthis.doRegisterConfigurations(configurations, validate, properties);\n\n\t\tcontributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);\n\t\tthis._onDidSchemaChange.fire();\n\t\tthis._onDidUpdateConfiguration.fire({ properties });\n\t}\n\n\tpublic registerDefaultConfigurations(configurationDefaults: IConfigurationDefaults[]): void {\n\t\tconst properties = new Set<string>();\n\t\tthis.doRegisterDefaultConfigurations(configurationDefaults, properties);\n\t\tthis._onDidSchemaChange.fire();\n\t\tthis._onDidUpdateConfiguration.fire({ properties, defaultsOverrides: true });\n\t}\n\n\tprivate doRegisterDefaultConfigurations(configurationDefaults: IConfigurationDefaults[], bucket: Set<string>) {\n\n\t\tthis.registeredConfigurationDefaults.push(...configurationDefaults);\n\n\t\tconst overrideIdentifiers: string[] = [];\n\n\t\tfor (const { overrides, source } of configurationDefaults) {\n\t\t\tfor (const key in overrides) {\n\t\t\t\tbucket.add(key);\n\n\t\t\t\tconst configurationDefaultOverridesForKey = this.configurationDefaultsOverrides.get(key)\n\t\t\t\t\t?? this.configurationDefaultsOverrides.set(key, { configurationDefaultOverrides: [] }).get(key)!;\n\n\t\t\t\tconst value = overrides[key];\n\t\t\t\tconfigurationDefaultOverridesForKey.configurationDefaultOverrides.push({ value, source });\n\n\t\t\t\t// Configuration defaults for Override Identifiers\n\t\t\t\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\t\t\t\tconst newDefaultOverride = this.mergeDefaultConfigurationsForOverrideIdentifier(key, value, source, configurationDefaultOverridesForKey.configurationDefaultOverrideValue);\n\t\t\t\t\tif (!newDefaultOverride) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconfigurationDefaultOverridesForKey.configurationDefaultOverrideValue = newDefaultOverride;\n\t\t\t\t\tthis.updateDefaultOverrideProperty(key, newDefaultOverride, source);\n\t\t\t\t\toverrideIdentifiers.push(...overrideIdentifiersFromKey(key));\n\t\t\t\t}\n\n\t\t\t\t// Configuration defaults for Configuration Properties\n\t\t\t\telse {\n\t\t\t\t\tconst newDefaultOverride = this.mergeDefaultConfigurationsForConfigurationProperty(key, value, source, configurationDefaultOverridesForKey.configurationDefaultOverrideValue);\n\t\t\t\t\tif (!newDefaultOverride) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconfigurationDefaultOverridesForKey.configurationDefaultOverrideValue = newDefaultOverride;\n\t\t\t\t\tconst property = this.configurationProperties[key];\n\t\t\t\t\tif (property) {\n\t\t\t\t\t\tthis.updatePropertyDefaultValue(key, property);\n\t\t\t\t\t\tthis.updateSchema(key, property);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tthis.doRegisterOverrideIdentifiers(overrideIdentifiers);\n\t}\n\n\tprivate updateDefaultOverrideProperty(key: string, newDefaultOverride: IConfigurationDefaultOverrideValue, source: IExtensionInfo | undefined): void {\n\t\tconst property: IRegisteredConfigurationPropertySchema = {\n\t\t\ttype: 'object',\n\t\t\tdefault: newDefaultOverride.value,\n\t\t\tdescription: nls.localize('defaultLanguageConfiguration.description', \"Configure settings to be overridden for {0}.\", getLanguageTagSettingPlainKey(key)),\n\t\t\t$ref: resourceLanguageSettingsSchemaId,\n\t\t\tdefaultDefaultValue: newDefaultOverride.value,\n\t\t\tsource,\n\t\t\tdefaultValueSource: source\n\t\t};\n\t\tthis.configurationProperties[key] = property;\n\t\tthis.defaultLanguageConfigurationOverridesNode.properties![key] = property;\n\t}\n\n\tprivate mergeDefaultConfigurationsForOverrideIdentifier(overrideIdentifier: string, configurationValueObject: IStringDictionary<any>, valueSource: IExtensionInfo | undefined, existingDefaultOverride: IConfigurationDefaultOverrideValue | undefined): IConfigurationDefaultOverrideValue | undefined {\n\t\tconst defaultValue = existingDefaultOverride?.value || {};\n\t\tconst source = existingDefaultOverride?.source ?? new Map<string, IExtensionInfo>();\n\n\t\t// This should not happen\n\t\tif (!(source instanceof Map)) {\n\t\t\tconsole.error('objectConfigurationSources is not a Map');\n\t\t\treturn undefined;\n\t\t}\n\n\t\tfor (const propertyKey of Object.keys(configurationValueObject)) {\n\t\t\tconst propertyDefaultValue = configurationValueObject[propertyKey];\n\n\t\t\tconst isObjectSetting = types.isObject(propertyDefaultValue) &&\n\t\t\t\t(types.isUndefined(defaultValue[propertyKey]) || types.isObject(defaultValue[propertyKey]));\n\n\t\t\t// If the default value is an object, merge the objects and store the source of each keys\n\t\t\tif (isObjectSetting) {\n\t\t\t\tdefaultValue[propertyKey] = { ...(defaultValue[propertyKey] ?? {}), ...propertyDefaultValue };\n\t\t\t\t// Track the source of each value in the object\n\t\t\t\tif (valueSource) {\n\t\t\t\t\tfor (const objectKey in propertyDefaultValue) {\n\t\t\t\t\t\tsource.set(`${propertyKey}.${objectKey}`, valueSource);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Primitive values are overridden\n\t\t\telse {\n\t\t\t\tdefaultValue[propertyKey] = propertyDefaultValue;\n\t\t\t\tif (valueSource) {\n\t\t\t\t\tsource.set(propertyKey, valueSource);\n\t\t\t\t} else {\n\t\t\t\t\tsource.delete(propertyKey);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn { value: defaultValue, source };\n\t}\n\n\tprivate mergeDefaultConfigurationsForConfigurationProperty(propertyKey: string, value: any, valuesSource: IExtensionInfo | undefined, existingDefaultOverride: IConfigurationDefaultOverrideValue | undefined): IConfigurationDefaultOverrideValue | undefined {\n\t\tconst property = this.configurationProperties[propertyKey];\n\t\tconst existingDefaultValue = existingDefaultOverride?.value ?? property?.defaultDefaultValue;\n\t\tlet source: ConfigurationDefaultValueSource | undefined = valuesSource;\n\n\t\tconst isObjectSetting = types.isObject(value) &&\n\t\t\t(\n\t\t\t\tproperty !== undefined && property.type === 'object' ||\n\t\t\t\tproperty === undefined && (types.isUndefined(existingDefaultValue) || types.isObject(existingDefaultValue))\n\t\t\t);\n\n\t\t// If the default value is an object, merge the objects and store the source of each keys\n\t\tif (isObjectSetting) {\n\t\t\tsource = existingDefaultOverride?.source ?? new Map<string, IExtensionInfo>();\n\n\t\t\t// This should not happen\n\t\t\tif (!(source instanceof Map)) {\n\t\t\t\tconsole.error('defaultValueSource is not a Map');\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tfor (const objectKey in value) {\n\t\t\t\tif (valuesSource) {\n\t\t\t\t\tsource.set(`${propertyKey}.${objectKey}`, valuesSource);\n\t\t\t\t}\n\t\t\t}\n\t\t\tvalue = { ...(types.isObject(existingDefaultValue) ? existingDefaultValue : {}), ...value };\n\t\t}\n\n\t\treturn { value, source };\n\t}\n\n\tpublic registerOverrideIdentifiers(overrideIdentifiers: string[]): void {\n\t\tthis.doRegisterOverrideIdentifiers(overrideIdentifiers);\n\t\tthis._onDidSchemaChange.fire();\n\t}\n\n\tprivate doRegisterOverrideIdentifiers(overrideIdentifiers: string[]) {\n\t\tfor (const overrideIdentifier of overrideIdentifiers) {\n\t\t\tthis.overrideIdentifiers.add(overrideIdentifier);\n\t\t}\n\t\tthis.updateOverridePropertyPatternKey();\n\t}\n\n\tprivate doRegisterConfigurations(configurations: IConfigurationNode[], validate: boolean, bucket: Set<string>): void {\n\n\t\tconfigurations.forEach(configuration => {\n\n\t\t\tthis.validateAndRegisterProperties(configuration, validate, configuration.extensionInfo, configuration.restrictedProperties, undefined, bucket);\n\n\t\t\tthis.configurationContributors.push(configuration);\n\t\t\tthis.registerJSONConfiguration(configuration);\n\t\t});\n\t}\n\n\tprivate validateAndRegisterProperties(configuration: IConfigurationNode, validate: boolean = true, extensionInfo: IExtensionInfo | undefined, restrictedProperties: string[] | undefined, scope: ConfigurationScope = ConfigurationScope.WINDOW, bucket: Set<string>): void {\n\t\tscope = types.isUndefinedOrNull(configuration.scope) ? scope : configuration.scope;\n\t\tconst properties = configuration.properties;\n\t\tif (properties) {\n\t\t\tfor (const key in properties) {\n\t\t\t\tconst property: IRegisteredConfigurationPropertySchema = properties[key];\n\t\t\t\tif (validate && validateProperty(key, property)) {\n\t\t\t\t\tdelete properties[key];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tproperty.source = extensionInfo;\n\n\t\t\t\t// update default value\n\t\t\t\tproperty.defaultDefaultValue = properties[key].default;\n\t\t\t\tthis.updatePropertyDefaultValue(key, property);\n\n\t\t\t\t// update scope\n\t\t\t\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\t\t\t\tproperty.scope = undefined; // No scope for overridable properties `[${identifier}]`\n\t\t\t\t} else {\n\t\t\t\t\tproperty.scope = types.isUndefinedOrNull(property.scope) ? scope : property.scope;\n\t\t\t\t\tproperty.restricted = types.isUndefinedOrNull(property.restricted) ? !!restrictedProperties?.includes(key) : property.restricted;\n\t\t\t\t}\n\n\t\t\t\tif (property.experiment) {\n\t\t\t\t\tif (!property.tags?.some(tag => tag.toLowerCase() === 'onexp')) {\n\t\t\t\t\t\tproperty.tags = property.tags ?? [];\n\t\t\t\t\t\tproperty.tags.push('onExP');\n\t\t\t\t\t}\n\t\t\t\t} else if (property.tags?.some(tag => tag.toLowerCase() === 'onexp')) {\n\t\t\t\t\tconsole.error(`Invalid tag 'onExP' found for property '${key}'. Please use 'experiment' property instead.`);\n\t\t\t\t\tproperty.experiment = { mode: 'startup' };\n\t\t\t\t}\n\n\t\t\t\tconst excluded = properties[key].hasOwnProperty('included') && !properties[key].included;\n\t\t\t\tconst policyName = properties[key].policy?.name;\n\n\t\t\t\tif (excluded) {\n\t\t\t\t\tthis.excludedConfigurationProperties[key] = properties[key];\n\t\t\t\t\tif (policyName) {\n\t\t\t\t\t\tthis.policyConfigurations.set(policyName, key);\n\t\t\t\t\t\tbucket.add(key);\n\t\t\t\t\t}\n\t\t\t\t\tdelete properties[key];\n\t\t\t\t} else {\n\t\t\t\t\tbucket.add(key);\n\t\t\t\t\tif (policyName) {\n\t\t\t\t\t\tthis.policyConfigurations.set(policyName, key);\n\t\t\t\t\t}\n\t\t\t\t\tthis.configurationProperties[key] = properties[key];\n\t\t\t\t\tif (!properties[key].deprecationMessage && properties[key].markdownDeprecationMessage) {\n\t\t\t\t\t\t// If not set, default deprecationMessage to the markdown source\n\t\t\t\t\t\tproperties[key].deprecationMessage = properties[key].markdownDeprecationMessage;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t}\n\t\t}\n\t\tconst subNodes = configuration.allOf;\n\t\tif (subNodes) {\n\t\t\tfor (const node of subNodes) {\n\t\t\t\tthis.validateAndRegisterProperties(node, validate, extensionInfo, restrictedProperties, scope, bucket);\n\t\t\t}\n\t\t}\n\t}\n\n\tgetConfigurationProperties(): IStringDictionary<IRegisteredConfigurationPropertySchema> {\n\t\treturn this.configurationProperties;\n\t}\n\n\tgetPolicyConfigurations(): Map<PolicyName, string> {\n\t\treturn this.policyConfigurations;\n\t}\n\n\tprivate registerJSONConfiguration(configuration: IConfigurationNode) {\n\t\tconst register = (configuration: IConfigurationNode) => {\n\t\t\tconst properties = configuration.properties;\n\t\t\tif (properties) {\n\t\t\t\tfor (const key in properties) {\n\t\t\t\t\tthis.updateSchema(key, properties[key]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst subNodes = configuration.allOf;\n\t\t\tsubNodes?.forEach(register);\n\t\t};\n\t\tregister(configuration);\n\t}\n\n\tprivate updateSchema(key: string, property: IConfigurationPropertySchema): void {\n\t\tallSettings.properties[key] = property;\n\t\tswitch (property.scope) {\n\t\t\tcase ConfigurationScope.APPLICATION:\n\t\t\t\tapplicationSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.MACHINE:\n\t\t\t\tmachineSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.APPLICATION_MACHINE:\n\t\t\t\tapplicationMachineSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.MACHINE_OVERRIDABLE:\n\t\t\t\tmachineOverridableSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.WINDOW:\n\t\t\t\twindowSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.RESOURCE:\n\t\t\t\tresourceSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.LANGUAGE_OVERRIDABLE:\n\t\t\t\tresourceSettings.properties[key] = property;\n\t\t\t\tthis.resourceLanguageSettingsSchema.properties![key] = property;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tprivate updateOverridePropertyPatternKey(): void {\n\t\tfor (const overrideIdentifier of this.overrideIdentifiers.values()) {\n\t\t\tconst overrideIdentifierProperty = `[${overrideIdentifier}]`;\n\t\t\tconst resourceLanguagePropertiesSchema: IJSONSchema = {\n\t\t\t\ttype: 'object',\n\t\t\t\tdescription: nls.localize('overrideSettings.defaultDescription', \"Configure editor settings to be overridden for a language.\"),\n\t\t\t\terrorMessage: nls.localize('overrideSettings.errorMessage', \"This setting does not support per-language configuration.\"),\n\t\t\t\t$ref: resourceLanguageSettingsSchemaId,\n\t\t\t};\n\t\t\tthis.updatePropertyDefaultValue(overrideIdentifierProperty, resourceLanguagePropertiesSchema);\n\t\t\tallSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\tapplicationSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\tapplicationMachineSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\tmachineSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\tmachineOverridableSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\twindowSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\tresourceSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t}\n\t}\n\n\tprivate registerOverridePropertyPatternKey(): void {\n\t\tconst resourceLanguagePropertiesSchema: IJSONSchema = {\n\t\t\ttype: 'object',\n\t\t\tdescription: nls.localize('overrideSettings.defaultDescription', \"Configure editor settings to be overridden for a language.\"),\n\t\t\terrorMessage: nls.localize('overrideSettings.errorMessage', \"This setting does not support per-language configuration.\"),\n\t\t\t$ref: resourceLanguageSettingsSchemaId,\n\t\t};\n\t\tallSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tapplicationSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tapplicationMachineSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tmachineSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tmachineOverridableSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\twindowSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tresourceSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tthis._onDidSchemaChange.fire();\n\t}\n\n\tprivate updatePropertyDefaultValue(key: string, property: IRegisteredConfigurationPropertySchema): void {\n\t\tconst configurationdefaultOverride = this.configurationDefaultsOverrides.get(key)?.configurationDefaultOverrideValue;\n\t\tlet defaultValue = undefined;\n\t\tlet defaultSource = undefined;\n\t\tif (configurationdefaultOverride\n\t\t\t&& (!property.disallowConfigurationDefault || !configurationdefaultOverride.source) // Prevent overriding the default value if the property is disallowed to be overridden by configuration defaults from extensions\n\t\t) {\n\t\t\tdefaultValue = configurationdefaultOverride.value;\n\t\t\tdefaultSource = configurationdefaultOverride.source;\n\t\t}\n\t\tif (types.isUndefined(defaultValue)) {\n\t\t\tdefaultValue = property.defaultDefaultValue;\n\t\t\tdefaultSource = undefined;\n\t\t}\n\t\tif (types.isUndefined(defaultValue)) {\n\t\t\tdefaultValue = getDefaultValue(property.type);\n\t\t}\n\t\tproperty.default = defaultValue;\n\t\tproperty.defaultValueSource = defaultSource;\n\t}\n}\n\nconst OVERRIDE_IDENTIFIER_PATTERN = `\\\\[([^\\\\]]+)\\\\]`;\nconst OVERRIDE_IDENTIFIER_REGEX = new RegExp(OVERRIDE_IDENTIFIER_PATTERN, 'g');\nexport const OVERRIDE_PROPERTY_PATTERN = `^(${OVERRIDE_IDENTIFIER_PATTERN})+$`;\nexport const OVERRIDE_PROPERTY_REGEX = new RegExp(OVERRIDE_PROPERTY_PATTERN);\n\nexport function overrideIdentifiersFromKey(key: string): string[] {\n\tconst identifiers: string[] = [];\n\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\tlet matches = OVERRIDE_IDENTIFIER_REGEX.exec(key);\n\t\twhile (matches?.length) {\n\t\t\tconst identifier = matches[1].trim();\n\t\t\tif (identifier) {\n\t\t\t\tidentifiers.push(identifier);\n\t\t\t}\n\t\t\tmatches = OVERRIDE_IDENTIFIER_REGEX.exec(key);\n\t\t}\n\t}\n\treturn distinct(identifiers);\n}\n\nexport function getDefaultValue(type: string | string[] | undefined) {\n\tconst t = Array.isArray(type) ? (<string[]>type)[0] : <string>type;\n\tswitch (t) {\n\t\tcase 'boolean':\n\t\t\treturn false;\n\t\tcase 'integer':\n\t\tcase 'number':\n\t\t\treturn 0;\n\t\tcase 'string':\n\t\t\treturn '';\n\t\tcase 'array':\n\t\t\treturn [];\n\t\tcase 'object':\n\t\t\treturn {};\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n\nconst configurationRegistry = new ConfigurationRegistry();\nRegistry.add(Extensions.Configuration, configurationRegistry);\n\nexport function validateProperty(property: string, schema: IRegisteredConfigurationPropertySchema): string | null {\n\tif (!property.trim()) {\n\t\treturn nls.localize('config.property.empty', \"Cannot register an empty property\");\n\t}\n\tif (OVERRIDE_PROPERTY_REGEX.test(property)) {\n\t\treturn nls.localize('config.property.languageDefault', \"Cannot register '{0}'. This matches property pattern '\\\\\\\\[.*\\\\\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.\", property);\n\t}\n\tif (configurationRegistry.getConfigurationProperties()[property] !== undefined) {\n\t\treturn nls.localize('config.property.duplicate', \"Cannot register '{0}'. This property is already registered.\", property);\n\t}\n\tif (schema.policy?.name && configurationRegistry.getPolicyConfigurations().get(schema.policy?.name) !== undefined) {\n\t\treturn nls.localize('config.policy.duplicate', \"Cannot register '{0}'. The associated policy {1} is already registered with {2}.\", property, schema.policy?.name, configurationRegistry.getPolicyConfigurations().get(schema.policy?.name));\n\t}\n\treturn null;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["vs/platform/configuration/common/configurationRegistry.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;A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O,GAAG,CAAC,QAAQ,CAAC,IAAyB,EAAE,kFAAkF,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,qBAAqB,CAAC,uBAAuB,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;IAC7O,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC","file":"configurationRegistry.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { distinct } from '../../../base/common/arrays.js';\nimport { IStringDictionary } from '../../../base/common/collections.js';\nimport { Emitter } from '../../../base/common/event.js';\nimport { IJSONSchema } from '../../../base/common/jsonSchema.js';\nimport * as types from '../../../base/common/types.js';\nimport * as nls from '../../../nls.js';\nimport { getLanguageTagSettingPlainKey } from './configuration.js';\nimport { Extensions as JSONExtensions, IJSONContributionRegistry } from '../../jsonschemas/common/jsonContributionRegistry.js';\nimport { Registry } from '../../registry/common/platform.js';\nimport { IPolicy, PolicyName } from '../../../base/common/policy.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\n\nexport const Extensions = {\n\tConfiguration: 'base.contributions.configuration'\n};\n\nexport interface IConfigurationRegistry {\n\n\t/**\n\t * Register a configuration to the registry.\n\t */\n\tregisterConfiguration(configuration: IConfigurationNode): IConfigurationNode;\n\n\t/**\n\t * Register multiple default configurations to the registry.\n\t */\n\tregisterDefaultConfigurations(defaultConfigurations: IConfigurationDefaults[]): void;\n\n\t/**\n\t * Returns all configurations settings of all configuration nodes contributed to this registry.\n\t */\n\tgetConfigurationProperties(): IStringDictionary<IRegisteredConfigurationPropertySchema>;\n\n\t/**\n\t * Returns all excluded configurations settings of all configuration nodes contributed to this registry.\n\t */\n\tgetExcludedConfigurationProperties(): IStringDictionary<IRegisteredConfigurationPropertySchema>;\n\n\t/**\n\t * Register the identifiers for editor configurations\n\t */\n\tregisterOverrideIdentifiers(identifiers: string[]): void;\n}\n\nexport const enum ConfigurationScope {\n\t/**\n\t * Application specific configuration, which can be configured only in default profile user settings.\n\t */\n\tAPPLICATION = 1,\n\t/**\n\t * Machine specific configuration, which can be configured only in local and remote user settings.\n\t */\n\tMACHINE,\n\t/**\n\t * An application machine specific configuration, which can be configured only in default profile user settings and remote user settings.\n\t */\n\tAPPLICATION_MACHINE,\n\t/**\n\t * Window specific configuration, which can be configured in the user or workspace settings.\n\t */\n\tWINDOW,\n\t/**\n\t * Resource specific configuration, which can be configured in the user, workspace or folder settings.\n\t */\n\tRESOURCE,\n\t/**\n\t * Resource specific configuration that can be configured in language specific settings\n\t */\n\tLANGUAGE_OVERRIDABLE,\n\t/**\n\t * Machine specific configuration that can also be configured in workspace or folder settings.\n\t */\n\tMACHINE_OVERRIDABLE,\n}\n\n\nexport interface IConfigurationPropertySchema extends IJSONSchema {\n\n\tscope?: ConfigurationScope;\n\n\t/**\n\t * When restricted, value of this configuration will be read only from trusted sources.\n\t * For eg., If the workspace is not trusted, then the value of this configuration is not read from workspace settings file.\n\t */\n\trestricted?: boolean;\n\n\t/**\n\t * When `false` this property is excluded from the registry. Default is to include.\n\t */\n\tincluded?: boolean;\n\n\t/**\n\t * List of tags associated to the property.\n\t * - A tag can be used for filtering\n\t * - Use `experimental` tag for marking the setting as experimental.\n\t */\n\ttags?: string[];\n\n\t/**\n\t * Disallow extensions to contribute configuration default value for this setting.\n\t */\n\tdisallowConfigurationDefault?: boolean;\n\n\t/**\n\t * When specified, this setting's value can always be overwritten by\n\t * a system-wide policy.\n\t */\n\tpolicy?: IPolicy;\n\n\t/**\n\t * When specified, this setting's default value can always be overwritten by\n\t * an experiment.\n\t */\n\texperiment?: {\n\t\t/**\n\t\t * The mode of the experiment.\n\t\t * - `startup`: The setting value is updated to the experiment value only on startup.\n\t\t * - `auto`: The setting value is updated to the experiment value automatically (whenever the experiment value changes).\n\t\t */\n\t\tmode: 'startup' | 'auto';\n\n\t\t/**\n\t\t * The name of the experiment. By default, this is `config.${settingId}`\n\t\t */\n\t\tname?: string;\n\t};\n}\n\nexport interface IExtensionInfo {\n}\n\nexport interface IConfigurationNode {\n\tid?: string;\n\torder?: number;\n\ttype?: string | string[];\n\ttitle?: string;\n\tproperties?: IStringDictionary<IConfigurationPropertySchema>;\n\tallOf?: IConfigurationNode[];\n\tscope?: ConfigurationScope;\n\textensionInfo?: IExtensionInfo;\n\trestrictedProperties?: string[];\n}\n\nexport type ConfigurationDefaultValueSource = IExtensionInfo | Map<string, IExtensionInfo>;\n\nexport interface IConfigurationDefaults {\n\toverrides: IStringDictionary<any>;\n\tsource?: IExtensionInfo;\n}\n\nexport type IRegisteredConfigurationPropertySchema = IConfigurationPropertySchema & {\n\tdefaultDefaultValue?: any;\n\tsource?: IExtensionInfo; // Source of the Property\n\tdefaultValueSource?: ConfigurationDefaultValueSource; // Source of the Default Value\n};\n\nexport interface IConfigurationDefaultOverride {\n\treadonly value: any;\n\treadonly source?: IExtensionInfo; // Source of the default override\n}\n\nexport interface IConfigurationDefaultOverrideValue {\n\treadonly value: any;\n\treadonly source?: ConfigurationDefaultValueSource;\n}\n\nexport const allSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const applicationSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const applicationMachineSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const machineSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const machineOverridableSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const windowSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\nexport const resourceSettings: { properties: IStringDictionary<IConfigurationPropertySchema>; patternProperties: IStringDictionary<IConfigurationPropertySchema> } = { properties: {}, patternProperties: {} };\n\nexport const resourceLanguageSettingsSchemaId = 'vscode://schemas/settings/resourceLanguage';\n\nconst contributionRegistry = Registry.as<IJSONContributionRegistry>(JSONExtensions.JSONContribution);\n\nclass ConfigurationRegistry extends Disposable implements IConfigurationRegistry {\n\n\tprivate readonly registeredConfigurationDefaults: IConfigurationDefaults[] = [];\n\tprivate readonly configurationDefaultsOverrides: Map<string, { configurationDefaultOverrides: IConfigurationDefaultOverride[]; configurationDefaultOverrideValue?: IConfigurationDefaultOverrideValue }>;\n\tprivate readonly defaultLanguageConfigurationOverridesNode: IConfigurationNode;\n\tprivate readonly configurationContributors: IConfigurationNode[];\n\tprivate readonly configurationProperties: IStringDictionary<IRegisteredConfigurationPropertySchema>;\n\tprivate readonly policyConfigurations: Map<PolicyName, string>;\n\tprivate readonly excludedConfigurationProperties: IStringDictionary<IRegisteredConfigurationPropertySchema>;\n\tprivate readonly resourceLanguageSettingsSchema: IJSONSchema;\n\tprivate readonly overrideIdentifiers = new Set<string>();\n\n\tprivate readonly _onDidSchemaChange = this._register(new Emitter<void>());\n\n\tprivate readonly _onDidUpdateConfiguration = this._register(new Emitter<{ properties: ReadonlySet<string>; defaultsOverrides?: boolean }>());\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.configurationDefaultsOverrides = new Map();\n\t\tthis.defaultLanguageConfigurationOverridesNode = {\n\t\t\tid: 'defaultOverrides',\n\t\t\ttitle: nls.localize('defaultLanguageConfigurationOverrides.title', \"Default Language Configuration Overrides\"),\n\t\t\tproperties: {}\n\t\t};\n\t\tthis.configurationContributors = [this.defaultLanguageConfigurationOverridesNode];\n\t\tthis.resourceLanguageSettingsSchema = {\n\t\t\tproperties: {},\n\t\t\tpatternProperties: {},\n\t\t\tadditionalProperties: true,\n\t\t\tallowTrailingCommas: true,\n\t\t\tallowComments: true\n\t\t};\n\t\tthis.configurationProperties = {};\n\t\tthis.policyConfigurations = new Map<PolicyName, string>();\n\t\tthis.excludedConfigurationProperties = {};\n\n\t\tcontributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);\n\t\tthis.registerOverridePropertyPatternKey();\n\t}\n\n\tpublic registerConfiguration(configuration: IConfigurationNode, validate: boolean = true): IConfigurationNode {\n\t\tthis.registerConfigurations([configuration], validate);\n\t\treturn configuration;\n\t}\n\n\tpublic registerConfigurations(configurations: IConfigurationNode[], validate: boolean = true): void {\n\t\tconst properties = new Set<string>();\n\t\tthis.doRegisterConfigurations(configurations, validate, properties);\n\n\t\tcontributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);\n\t\tthis._onDidSchemaChange.fire();\n\t\tthis._onDidUpdateConfiguration.fire({ properties });\n\t}\n\n\tpublic registerDefaultConfigurations(configurationDefaults: IConfigurationDefaults[]): void {\n\t\tconst properties = new Set<string>();\n\t\tthis.doRegisterDefaultConfigurations(configurationDefaults, properties);\n\t\tthis._onDidSchemaChange.fire();\n\t\tthis._onDidUpdateConfiguration.fire({ properties, defaultsOverrides: true });\n\t}\n\n\tprivate doRegisterDefaultConfigurations(configurationDefaults: IConfigurationDefaults[], bucket: Set<string>) {\n\n\t\tthis.registeredConfigurationDefaults.push(...configurationDefaults);\n\n\t\tconst overrideIdentifiers: string[] = [];\n\n\t\tfor (const { overrides, source } of configurationDefaults) {\n\t\t\tfor (const key in overrides) {\n\t\t\t\tbucket.add(key);\n\n\t\t\t\tconst configurationDefaultOverridesForKey = this.configurationDefaultsOverrides.get(key)\n\t\t\t\t\t?? this.configurationDefaultsOverrides.set(key, { configurationDefaultOverrides: [] }).get(key)!;\n\n\t\t\t\tconst value = overrides[key];\n\t\t\t\tconfigurationDefaultOverridesForKey.configurationDefaultOverrides.push({ value, source });\n\n\t\t\t\t// Configuration defaults for Override Identifiers\n\t\t\t\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\t\t\t\tconst newDefaultOverride = this.mergeDefaultConfigurationsForOverrideIdentifier(key, value, source, configurationDefaultOverridesForKey.configurationDefaultOverrideValue);\n\t\t\t\t\tif (!newDefaultOverride) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconfigurationDefaultOverridesForKey.configurationDefaultOverrideValue = newDefaultOverride;\n\t\t\t\t\tthis.updateDefaultOverrideProperty(key, newDefaultOverride, source);\n\t\t\t\t\toverrideIdentifiers.push(...overrideIdentifiersFromKey(key));\n\t\t\t\t}\n\n\t\t\t\t// Configuration defaults for Configuration Properties\n\t\t\t\telse {\n\t\t\t\t\tconst newDefaultOverride = this.mergeDefaultConfigurationsForConfigurationProperty(key, value, source, configurationDefaultOverridesForKey.configurationDefaultOverrideValue);\n\t\t\t\t\tif (!newDefaultOverride) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconfigurationDefaultOverridesForKey.configurationDefaultOverrideValue = newDefaultOverride;\n\t\t\t\t\tconst property = this.configurationProperties[key];\n\t\t\t\t\tif (property) {\n\t\t\t\t\t\tthis.updatePropertyDefaultValue(key, property);\n\t\t\t\t\t\tthis.updateSchema(key, property);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tthis.doRegisterOverrideIdentifiers(overrideIdentifiers);\n\t}\n\n\tprivate updateDefaultOverrideProperty(key: string, newDefaultOverride: IConfigurationDefaultOverrideValue, source: IExtensionInfo | undefined): void {\n\t\tconst property: IRegisteredConfigurationPropertySchema = {\n\t\t\ttype: 'object',\n\t\t\tdefault: newDefaultOverride.value,\n\t\t\tdescription: nls.localize('defaultLanguageConfiguration.description', \"Configure settings to be overridden for {0}.\", getLanguageTagSettingPlainKey(key)),\n\t\t\t$ref: resourceLanguageSettingsSchemaId,\n\t\t\tdefaultDefaultValue: newDefaultOverride.value,\n\t\t\tsource,\n\t\t\tdefaultValueSource: source\n\t\t};\n\t\tthis.configurationProperties[key] = property;\n\t\tthis.defaultLanguageConfigurationOverridesNode.properties![key] = property;\n\t}\n\n\tprivate mergeDefaultConfigurationsForOverrideIdentifier(overrideIdentifier: string, configurationValueObject: IStringDictionary<any>, valueSource: IExtensionInfo | undefined, existingDefaultOverride: IConfigurationDefaultOverrideValue | undefined): IConfigurationDefaultOverrideValue | undefined {\n\t\tconst defaultValue = existingDefaultOverride?.value || {};\n\t\tconst source = existingDefaultOverride?.source ?? new Map<string, IExtensionInfo>();\n\n\t\t// This should not happen\n\t\tif (!(source instanceof Map)) {\n\t\t\tconsole.error('objectConfigurationSources is not a Map');\n\t\t\treturn undefined;\n\t\t}\n\n\t\tfor (const propertyKey of Object.keys(configurationValueObject)) {\n\t\t\tconst propertyDefaultValue = configurationValueObject[propertyKey];\n\n\t\t\tconst isObjectSetting = types.isObject(propertyDefaultValue) &&\n\t\t\t\t(types.isUndefined(defaultValue[propertyKey]) || types.isObject(defaultValue[propertyKey]));\n\n\t\t\t// If the default value is an object, merge the objects and store the source of each keys\n\t\t\tif (isObjectSetting) {\n\t\t\t\tdefaultValue[propertyKey] = { ...(defaultValue[propertyKey] ?? {}), ...propertyDefaultValue };\n\t\t\t\t// Track the source of each value in the object\n\t\t\t\tif (valueSource) {\n\t\t\t\t\tfor (const objectKey in propertyDefaultValue) {\n\t\t\t\t\t\tsource.set(`${propertyKey}.${objectKey}`, valueSource);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Primitive values are overridden\n\t\t\telse {\n\t\t\t\tdefaultValue[propertyKey] = propertyDefaultValue;\n\t\t\t\tif (valueSource) {\n\t\t\t\t\tsource.set(propertyKey, valueSource);\n\t\t\t\t} else {\n\t\t\t\t\tsource.delete(propertyKey);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn { value: defaultValue, source };\n\t}\n\n\tprivate mergeDefaultConfigurationsForConfigurationProperty(propertyKey: string, value: any, valuesSource: IExtensionInfo | undefined, existingDefaultOverride: IConfigurationDefaultOverrideValue | undefined): IConfigurationDefaultOverrideValue | undefined {\n\t\tconst property = this.configurationProperties[propertyKey];\n\t\tconst existingDefaultValue = existingDefaultOverride?.value ?? property?.defaultDefaultValue;\n\t\tlet source: ConfigurationDefaultValueSource | undefined = valuesSource;\n\n\t\tconst isObjectSetting = types.isObject(value) &&\n\t\t\t(\n\t\t\t\tproperty !== undefined && property.type === 'object' ||\n\t\t\t\tproperty === undefined && (types.isUndefined(existingDefaultValue) || types.isObject(existingDefaultValue))\n\t\t\t);\n\n\t\t// If the default value is an object, merge the objects and store the source of each keys\n\t\tif (isObjectSetting) {\n\t\t\tsource = existingDefaultOverride?.source ?? new Map<string, IExtensionInfo>();\n\n\t\t\t// This should not happen\n\t\t\tif (!(source instanceof Map)) {\n\t\t\t\tconsole.error('defaultValueSource is not a Map');\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tfor (const objectKey in value) {\n\t\t\t\tif (valuesSource) {\n\t\t\t\t\tsource.set(`${propertyKey}.${objectKey}`, valuesSource);\n\t\t\t\t}\n\t\t\t}\n\t\t\tvalue = { ...(types.isObject(existingDefaultValue) ? existingDefaultValue : {}), ...value };\n\t\t}\n\n\t\treturn { value, source };\n\t}\n\n\tpublic registerOverrideIdentifiers(overrideIdentifiers: string[]): void {\n\t\tthis.doRegisterOverrideIdentifiers(overrideIdentifiers);\n\t\tthis._onDidSchemaChange.fire();\n\t}\n\n\tprivate doRegisterOverrideIdentifiers(overrideIdentifiers: string[]) {\n\t\tfor (const overrideIdentifier of overrideIdentifiers) {\n\t\t\tthis.overrideIdentifiers.add(overrideIdentifier);\n\t\t}\n\t\tthis.updateOverridePropertyPatternKey();\n\t}\n\n\tprivate doRegisterConfigurations(configurations: IConfigurationNode[], validate: boolean, bucket: Set<string>): void {\n\n\t\tconfigurations.forEach(configuration => {\n\n\t\t\tthis.validateAndRegisterProperties(configuration, validate, configuration.extensionInfo, configuration.restrictedProperties, undefined, bucket);\n\n\t\t\tthis.configurationContributors.push(configuration);\n\t\t\tthis.registerJSONConfiguration(configuration);\n\t\t});\n\t}\n\n\tprivate validateAndRegisterProperties(configuration: IConfigurationNode, validate: boolean = true, extensionInfo: IExtensionInfo | undefined, restrictedProperties: string[] | undefined, scope: ConfigurationScope = ConfigurationScope.WINDOW, bucket: Set<string>): void {\n\t\tscope = types.isUndefinedOrNull(configuration.scope) ? scope : configuration.scope;\n\t\tconst properties = configuration.properties;\n\t\tif (properties) {\n\t\t\tfor (const key in properties) {\n\t\t\t\tconst property: IRegisteredConfigurationPropertySchema = properties[key];\n\t\t\t\tif (validate && validateProperty(key, property)) {\n\t\t\t\t\tdelete properties[key];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tproperty.source = extensionInfo;\n\n\t\t\t\t// update default value\n\t\t\t\tproperty.defaultDefaultValue = properties[key].default;\n\t\t\t\tthis.updatePropertyDefaultValue(key, property);\n\n\t\t\t\t// update scope\n\t\t\t\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\t\t\t\tproperty.scope = undefined; // No scope for overridable properties `[${identifier}]`\n\t\t\t\t} else {\n\t\t\t\t\tproperty.scope = types.isUndefinedOrNull(property.scope) ? scope : property.scope;\n\t\t\t\t\tproperty.restricted = types.isUndefinedOrNull(property.restricted) ? !!restrictedProperties?.includes(key) : property.restricted;\n\t\t\t\t}\n\n\t\t\t\tif (property.experiment) {\n\t\t\t\t\tif (!property.tags?.some(tag => tag.toLowerCase() === 'onexp')) {\n\t\t\t\t\t\tproperty.tags = property.tags ?? [];\n\t\t\t\t\t\tproperty.tags.push('onExP');\n\t\t\t\t\t}\n\t\t\t\t} else if (property.tags?.some(tag => tag.toLowerCase() === 'onexp')) {\n\t\t\t\t\tconsole.error(`Invalid tag 'onExP' found for property '${key}'. Please use 'experiment' property instead.`);\n\t\t\t\t\tproperty.experiment = { mode: 'startup' };\n\t\t\t\t}\n\n\t\t\t\tconst excluded = properties[key].hasOwnProperty('included') && !properties[key].included;\n\t\t\t\tconst policyName = properties[key].policy?.name;\n\n\t\t\t\tif (excluded) {\n\t\t\t\t\tthis.excludedConfigurationProperties[key] = properties[key];\n\t\t\t\t\tif (policyName) {\n\t\t\t\t\t\tthis.policyConfigurations.set(policyName, key);\n\t\t\t\t\t\tbucket.add(key);\n\t\t\t\t\t}\n\t\t\t\t\tdelete properties[key];\n\t\t\t\t} else {\n\t\t\t\t\tbucket.add(key);\n\t\t\t\t\tif (policyName) {\n\t\t\t\t\t\tthis.policyConfigurations.set(policyName, key);\n\t\t\t\t\t}\n\t\t\t\t\tthis.configurationProperties[key] = properties[key];\n\t\t\t\t\tif (!properties[key].deprecationMessage && properties[key].markdownDeprecationMessage) {\n\t\t\t\t\t\t// If not set, default deprecationMessage to the markdown source\n\t\t\t\t\t\tproperties[key].deprecationMessage = properties[key].markdownDeprecationMessage;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t}\n\t\t}\n\t\tconst subNodes = configuration.allOf;\n\t\tif (subNodes) {\n\t\t\tfor (const node of subNodes) {\n\t\t\t\tthis.validateAndRegisterProperties(node, validate, extensionInfo, restrictedProperties, scope, bucket);\n\t\t\t}\n\t\t}\n\t}\n\n\tgetConfigurationProperties(): IStringDictionary<IRegisteredConfigurationPropertySchema> {\n\t\treturn this.configurationProperties;\n\t}\n\n\tgetPolicyConfigurations(): Map<PolicyName, string> {\n\t\treturn this.policyConfigurations;\n\t}\n\n\tgetExcludedConfigurationProperties(): IStringDictionary<IRegisteredConfigurationPropertySchema> {\n\t\treturn this.excludedConfigurationProperties;\n\t}\n\n\tprivate registerJSONConfiguration(configuration: IConfigurationNode) {\n\t\tconst register = (configuration: IConfigurationNode) => {\n\t\t\tconst properties = configuration.properties;\n\t\t\tif (properties) {\n\t\t\t\tfor (const key in properties) {\n\t\t\t\t\tthis.updateSchema(key, properties[key]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst subNodes = configuration.allOf;\n\t\t\tsubNodes?.forEach(register);\n\t\t};\n\t\tregister(configuration);\n\t}\n\n\tprivate updateSchema(key: string, property: IConfigurationPropertySchema): void {\n\t\tallSettings.properties[key] = property;\n\t\tswitch (property.scope) {\n\t\t\tcase ConfigurationScope.APPLICATION:\n\t\t\t\tapplicationSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.MACHINE:\n\t\t\t\tmachineSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.APPLICATION_MACHINE:\n\t\t\t\tapplicationMachineSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.MACHINE_OVERRIDABLE:\n\t\t\t\tmachineOverridableSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.WINDOW:\n\t\t\t\twindowSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.RESOURCE:\n\t\t\t\tresourceSettings.properties[key] = property;\n\t\t\t\tbreak;\n\t\t\tcase ConfigurationScope.LANGUAGE_OVERRIDABLE:\n\t\t\t\tresourceSettings.properties[key] = property;\n\t\t\t\tthis.resourceLanguageSettingsSchema.properties![key] = property;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tprivate updateOverridePropertyPatternKey(): void {\n\t\tfor (const overrideIdentifier of this.overrideIdentifiers.values()) {\n\t\t\tconst overrideIdentifierProperty = `[${overrideIdentifier}]`;\n\t\t\tconst resourceLanguagePropertiesSchema: IJSONSchema = {\n\t\t\t\ttype: 'object',\n\t\t\t\tdescription: nls.localize('overrideSettings.defaultDescription', \"Configure editor settings to be overridden for a language.\"),\n\t\t\t\terrorMessage: nls.localize('overrideSettings.errorMessage', \"This setting does not support per-language configuration.\"),\n\t\t\t\t$ref: resourceLanguageSettingsSchemaId,\n\t\t\t};\n\t\t\tthis.updatePropertyDefaultValue(overrideIdentifierProperty, resourceLanguagePropertiesSchema);\n\t\t\tallSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\tapplicationSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\tapplicationMachineSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\tmachineSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\tmachineOverridableSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\twindowSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t\tresourceSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n\t\t}\n\t}\n\n\tprivate registerOverridePropertyPatternKey(): void {\n\t\tconst resourceLanguagePropertiesSchema: IJSONSchema = {\n\t\t\ttype: 'object',\n\t\t\tdescription: nls.localize('overrideSettings.defaultDescription', \"Configure editor settings to be overridden for a language.\"),\n\t\t\terrorMessage: nls.localize('overrideSettings.errorMessage', \"This setting does not support per-language configuration.\"),\n\t\t\t$ref: resourceLanguageSettingsSchemaId,\n\t\t};\n\t\tallSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tapplicationSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tapplicationMachineSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tmachineSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tmachineOverridableSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\twindowSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tresourceSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n\t\tthis._onDidSchemaChange.fire();\n\t}\n\n\tprivate updatePropertyDefaultValue(key: string, property: IRegisteredConfigurationPropertySchema): void {\n\t\tconst configurationdefaultOverride = this.configurationDefaultsOverrides.get(key)?.configurationDefaultOverrideValue;\n\t\tlet defaultValue = undefined;\n\t\tlet defaultSource = undefined;\n\t\tif (configurationdefaultOverride\n\t\t\t&& (!property.disallowConfigurationDefault || !configurationdefaultOverride.source) // Prevent overriding the default value if the property is disallowed to be overridden by configuration defaults from extensions\n\t\t) {\n\t\t\tdefaultValue = configurationdefaultOverride.value;\n\t\t\tdefaultSource = configurationdefaultOverride.source;\n\t\t}\n\t\tif (types.isUndefined(defaultValue)) {\n\t\t\tdefaultValue = property.defaultDefaultValue;\n\t\t\tdefaultSource = undefined;\n\t\t}\n\t\tif (types.isUndefined(defaultValue)) {\n\t\t\tdefaultValue = getDefaultValue(property.type);\n\t\t}\n\t\tproperty.default = defaultValue;\n\t\tproperty.defaultValueSource = defaultSource;\n\t}\n}\n\nconst OVERRIDE_IDENTIFIER_PATTERN = `\\\\[([^\\\\]]+)\\\\]`;\nconst OVERRIDE_IDENTIFIER_REGEX = new RegExp(OVERRIDE_IDENTIFIER_PATTERN, 'g');\nexport const OVERRIDE_PROPERTY_PATTERN = `^(${OVERRIDE_IDENTIFIER_PATTERN})+$`;\nexport const OVERRIDE_PROPERTY_REGEX = new RegExp(OVERRIDE_PROPERTY_PATTERN);\n\nexport function overrideIdentifiersFromKey(key: string): string[] {\n\tconst identifiers: string[] = [];\n\tif (OVERRIDE_PROPERTY_REGEX.test(key)) {\n\t\tlet matches = OVERRIDE_IDENTIFIER_REGEX.exec(key);\n\t\twhile (matches?.length) {\n\t\t\tconst identifier = matches[1].trim();\n\t\t\tif (identifier) {\n\t\t\t\tidentifiers.push(identifier);\n\t\t\t}\n\t\t\tmatches = OVERRIDE_IDENTIFIER_REGEX.exec(key);\n\t\t}\n\t}\n\treturn distinct(identifiers);\n}\n\nexport function getDefaultValue(type: string | string[] | undefined) {\n\tconst t = Array.isArray(type) ? (<string[]>type)[0] : <string>type;\n\tswitch (t) {\n\t\tcase 'boolean':\n\t\t\treturn false;\n\t\tcase 'integer':\n\t\tcase 'number':\n\t\t\treturn 0;\n\t\tcase 'string':\n\t\t\treturn '';\n\t\tcase 'array':\n\t\t\treturn [];\n\t\tcase 'object':\n\t\t\treturn {};\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n\nconst configurationRegistry = new ConfigurationRegistry();\nRegistry.add(Extensions.Configuration, configurationRegistry);\n\nexport function validateProperty(property: string, schema: IRegisteredConfigurationPropertySchema): string | null {\n\tif (!property.trim()) {\n\t\treturn nls.localize('config.property.empty', \"Cannot register an empty property\");\n\t}\n\tif (OVERRIDE_PROPERTY_REGEX.test(property)) {\n\t\treturn nls.localize('config.property.languageDefault', \"Cannot register '{0}'. This matches property pattern '\\\\\\\\[.*\\\\\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.\", property);\n\t}\n\tif (configurationRegistry.getConfigurationProperties()[property] !== undefined) {\n\t\treturn nls.localize('config.property.duplicate', \"Cannot register '{0}'. This property is already registered.\", property);\n\t}\n\tif (schema.policy?.name && configurationRegistry.getPolicyConfigurations().get(schema.policy?.name) !== undefined) {\n\t\treturn nls.localize('config.policy.duplicate', \"Cannot register '{0}'. The associated policy {1} is already registered with {2}.\", property, schema.policy?.name, configurationRegistry.getPolicyConfigurations().get(schema.policy?.name));\n\t}\n\treturn null;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monaco-editor-core",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.53.0-dev-
|
|
4
|
+
"version": "0.53.0-dev-20250903",
|
|
5
5
|
"description": "A browser based code editor",
|
|
6
6
|
"author": "Microsoft Corporation",
|
|
7
7
|
"license": "MIT",
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
"bugs": {
|
|
15
15
|
"url": "https://github.com/microsoft/vscode/issues"
|
|
16
16
|
},
|
|
17
|
-
"vscodeCommitId": "
|
|
17
|
+
"vscodeCommitId": "b7563981ef7d11b4722fbd429e4af10fb78ac721"
|
|
18
18
|
}
|