@theia/preferences 1.77.0-next.95 → 1.77.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/folder-preference-provider.d.ts +1 -1
- package/lib/browser/folder-preference-provider.d.ts.map +1 -1
- package/lib/browser/folder-preference-provider.js +17 -23
- package/lib/browser/folder-preference-provider.js.map +1 -1
- package/lib/browser/folders-preferences-provider.d.ts +3 -3
- package/lib/browser/folders-preferences-provider.d.ts.map +1 -1
- package/lib/browser/folders-preferences-provider.js +30 -40
- package/lib/browser/folders-preferences-provider.js.map +1 -1
- package/lib/browser/frontend-preference-storage.d.ts +2 -2
- package/lib/browser/frontend-preference-storage.d.ts.map +1 -1
- package/lib/browser/frontend-preference-storage.js +5 -9
- package/lib/browser/frontend-preference-storage.js.map +1 -1
- package/lib/browser/index.d.ts +3 -3
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +4 -7
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/monaco-jsonc-editor.js +10 -14
- package/lib/browser/monaco-jsonc-editor.js.map +1 -1
- package/lib/browser/package.spec.d.ts +1 -0
- package/lib/browser/package.spec.js +1 -1
- package/lib/browser/package.spec.js.map +1 -1
- package/lib/browser/preference-bindings.js +23 -27
- package/lib/browser/preference-bindings.js.map +1 -1
- package/lib/browser/preference-frontend-contribution.d.ts +9 -6
- package/lib/browser/preference-frontend-contribution.d.ts.map +1 -1
- package/lib/browser/preference-frontend-contribution.js +34 -38
- package/lib/browser/preference-frontend-contribution.js.map +1 -1
- package/lib/browser/preference-frontend-contribution.spec.js +30 -16
- package/lib/browser/preference-frontend-contribution.spec.js.map +1 -1
- package/lib/browser/preference-frontend-module.d.ts +1 -1
- package/lib/browser/preference-frontend-module.d.ts.map +1 -1
- package/lib/browser/preference-frontend-module.js +51 -54
- package/lib/browser/preference-frontend-module.js.map +1 -1
- package/lib/browser/preference-open-handler.d.ts +1 -1
- package/lib/browser/preference-open-handler.d.ts.map +1 -1
- package/lib/browser/preference-open-handler.js +10 -14
- package/lib/browser/preference-open-handler.js.map +1 -1
- package/lib/browser/preference-transaction-manager.d.ts +2 -2
- package/lib/browser/preference-transaction-manager.d.ts.map +1 -1
- package/lib/browser/preference-transaction-manager.js +49 -63
- package/lib/browser/preference-transaction-manager.js.map +1 -1
- package/lib/browser/preference-tree-model.d.ts +4 -4
- package/lib/browser/preference-tree-model.d.ts.map +1 -1
- package/lib/browser/preference-tree-model.js +48 -59
- package/lib/browser/preference-tree-model.js.map +1 -1
- package/lib/browser/preference-tree-model.spec.js +84 -86
- package/lib/browser/preference-tree-model.spec.js.map +1 -1
- package/lib/browser/preferences-contribution.d.ts +2 -2
- package/lib/browser/preferences-contribution.d.ts.map +1 -1
- package/lib/browser/preferences-contribution.js +76 -86
- package/lib/browser/preferences-contribution.js.map +1 -1
- package/lib/browser/preferences-json-schema-contribution.js +34 -41
- package/lib/browser/preferences-json-schema-contribution.js.map +1 -1
- package/lib/browser/preferences-monaco-contribution.js +1 -4
- package/lib/browser/preferences-monaco-contribution.js.map +1 -1
- package/lib/browser/session-preference-remote-cli-contribution.js +13 -17
- package/lib/browser/session-preference-remote-cli-contribution.js.map +1 -1
- package/lib/browser/session-preference-remote-cli-contribution.spec.js +8 -10
- package/lib/browser/session-preference-remote-cli-contribution.spec.js.map +1 -1
- package/lib/browser/session-preference-status-bar-contribution.js +34 -43
- package/lib/browser/session-preference-status-bar-contribution.js.map +1 -1
- package/lib/browser/util/preference-layout.js +74 -77
- package/lib/browser/util/preference-layout.js.map +1 -1
- package/lib/browser/util/preference-layout.spec.js +6 -8
- package/lib/browser/util/preference-layout.spec.js.map +1 -1
- package/lib/browser/util/preference-scope-command-manager.js +19 -25
- package/lib/browser/util/preference-scope-command-manager.js.map +1 -1
- package/lib/browser/util/preference-tree-generator.d.ts +3 -3
- package/lib/browser/util/preference-tree-generator.d.ts.map +1 -1
- package/lib/browser/util/preference-tree-generator.js +31 -41
- package/lib/browser/util/preference-tree-generator.js.map +1 -1
- package/lib/browser/util/preference-tree-label-provider.d.ts +2 -2
- package/lib/browser/util/preference-tree-label-provider.d.ts.map +1 -1
- package/lib/browser/util/preference-tree-label-provider.js +14 -18
- package/lib/browser/util/preference-tree-label-provider.js.map +1 -1
- package/lib/browser/util/preference-tree-label-provider.spec.js +21 -23
- package/lib/browser/util/preference-tree-label-provider.spec.js.map +1 -1
- package/lib/browser/util/preference-types.js +27 -30
- package/lib/browser/util/preference-types.js.map +1 -1
- package/lib/browser/views/components/preference-array-input.d.ts +3 -3
- package/lib/browser/views/components/preference-array-input.d.ts.map +1 -1
- package/lib/browser/views/components/preference-array-input.js +17 -20
- package/lib/browser/views/components/preference-array-input.js.map +1 -1
- package/lib/browser/views/components/preference-boolean-input.d.ts +3 -3
- package/lib/browser/views/components/preference-boolean-input.d.ts.map +1 -1
- package/lib/browser/views/components/preference-boolean-input.js +14 -17
- package/lib/browser/views/components/preference-boolean-input.js.map +1 -1
- package/lib/browser/views/components/preference-file-input.d.ts +4 -4
- package/lib/browser/views/components/preference-file-input.d.ts.map +1 -1
- package/lib/browser/views/components/preference-file-input.js +23 -27
- package/lib/browser/views/components/preference-file-input.js.map +1 -1
- package/lib/browser/views/components/preference-json-input.d.ts +3 -3
- package/lib/browser/views/components/preference-json-input.d.ts.map +1 -1
- package/lib/browser/views/components/preference-json-input.js +18 -22
- package/lib/browser/views/components/preference-json-input.js.map +1 -1
- package/lib/browser/views/components/preference-markdown-renderer.d.ts +2 -2
- package/lib/browser/views/components/preference-markdown-renderer.d.ts.map +1 -1
- package/lib/browser/views/components/preference-markdown-renderer.js +20 -27
- package/lib/browser/views/components/preference-markdown-renderer.js.map +1 -1
- package/lib/browser/views/components/preference-node-renderer-creator.d.ts +2 -2
- package/lib/browser/views/components/preference-node-renderer-creator.d.ts.map +1 -1
- package/lib/browser/views/components/preference-node-renderer-creator.js +31 -36
- package/lib/browser/views/components/preference-node-renderer-creator.js.map +1 -1
- package/lib/browser/views/components/preference-node-renderer.d.ts +6 -6
- package/lib/browser/views/components/preference-node-renderer.d.ts.map +1 -1
- package/lib/browser/views/components/preference-node-renderer.js +70 -90
- package/lib/browser/views/components/preference-node-renderer.js.map +1 -1
- package/lib/browser/views/components/preference-null-input.d.ts +3 -3
- package/lib/browser/views/components/preference-null-input.d.ts.map +1 -1
- package/lib/browser/views/components/preference-null-input.js +12 -15
- package/lib/browser/views/components/preference-null-input.js.map +1 -1
- package/lib/browser/views/components/preference-number-input.d.ts +3 -3
- package/lib/browser/views/components/preference-number-input.d.ts.map +1 -1
- package/lib/browser/views/components/preference-number-input.js +29 -32
- package/lib/browser/views/components/preference-number-input.js.map +1 -1
- package/lib/browser/views/components/preference-select-input.d.ts +3 -3
- package/lib/browser/views/components/preference-select-input.d.ts.map +1 -1
- package/lib/browser/views/components/preference-select-input.js +23 -26
- package/lib/browser/views/components/preference-select-input.js.map +1 -1
- package/lib/browser/views/components/preference-string-input.d.ts +3 -3
- package/lib/browser/views/components/preference-string-input.d.ts.map +1 -1
- package/lib/browser/views/components/preference-string-input.js +14 -17
- package/lib/browser/views/components/preference-string-input.js.map +1 -1
- package/lib/browser/views/preference-editor-widget.d.ts +5 -5
- package/lib/browser/views/preference-editor-widget.d.ts.map +1 -1
- package/lib/browser/views/preference-editor-widget.js +65 -78
- package/lib/browser/views/preference-editor-widget.js.map +1 -1
- package/lib/browser/views/preference-scope-tabbar-widget.d.ts +2 -2
- package/lib/browser/views/preference-scope-tabbar-widget.d.ts.map +1 -1
- package/lib/browser/views/preference-scope-tabbar-widget.js +51 -63
- package/lib/browser/views/preference-scope-tabbar-widget.js.map +1 -1
- package/lib/browser/views/preference-searchbar-widget.js +23 -30
- package/lib/browser/views/preference-searchbar-widget.js.map +1 -1
- package/lib/browser/views/preference-tree-widget.d.ts +3 -3
- package/lib/browser/views/preference-tree-widget.d.ts.map +1 -1
- package/lib/browser/views/preference-tree-widget.js +23 -31
- package/lib/browser/views/preference-tree-widget.js.map +1 -1
- package/lib/browser/views/preference-widget-bindings.js +60 -64
- package/lib/browser/views/preference-widget-bindings.js.map +1 -1
- package/lib/browser/views/preference-widget.d.ts +5 -5
- package/lib/browser/views/preference-widget.d.ts.map +1 -1
- package/lib/browser/views/preference-widget.js +24 -34
- package/lib/browser/views/preference-widget.js.map +1 -1
- package/lib/browser/workspace-file-preference-provider.d.ts +2 -2
- package/lib/browser/workspace-file-preference-provider.d.ts.map +1 -1
- package/lib/browser/workspace-file-preference-provider.js +21 -26
- package/lib/browser/workspace-file-preference-provider.js.map +1 -1
- package/lib/browser/workspace-preference-provider.d.ts +5 -5
- package/lib/browser/workspace-preference-provider.d.ts.map +1 -1
- package/lib/browser/workspace-preference-provider.js +31 -40
- package/lib/browser/workspace-preference-provider.js.map +1 -1
- package/lib/common/abstract-resource-preference-provider.d.ts +2 -2
- package/lib/common/abstract-resource-preference-provider.d.ts.map +1 -1
- package/lib/common/abstract-resource-preference-provider.js +55 -68
- package/lib/common/abstract-resource-preference-provider.js.map +1 -1
- package/lib/common/abstract-resource-preference-provider.spec.js +34 -36
- package/lib/common/abstract-resource-preference-provider.spec.js.map +1 -1
- package/lib/common/cli-preferences.d.ts +28 -6
- package/lib/common/cli-preferences.d.ts.map +1 -1
- package/lib/common/cli-preferences.js +34 -11
- package/lib/common/cli-preferences.js.map +1 -1
- package/lib/common/cli-preferences.spec.js +63 -18
- package/lib/common/cli-preferences.spec.js.map +1 -1
- package/lib/common/jsonc-editor.js +13 -17
- package/lib/common/jsonc-editor.js.map +1 -1
- package/lib/common/section-preference-provider.d.ts +2 -2
- package/lib/common/section-preference-provider.d.ts.map +1 -1
- package/lib/common/section-preference-provider.js +18 -25
- package/lib/common/section-preference-provider.js.map +1 -1
- package/lib/common/user-configs-preference-provider.d.ts +3 -3
- package/lib/common/user-configs-preference-provider.d.ts.map +1 -1
- package/lib/common/user-configs-preference-provider.js +26 -36
- package/lib/common/user-configs-preference-provider.js.map +1 -1
- package/lib/common/user-preference-provider.d.ts +1 -1
- package/lib/common/user-preference-provider.d.ts.map +1 -1
- package/lib/common/user-preference-provider.js +10 -13
- package/lib/common/user-preference-provider.js.map +1 -1
- package/lib/node/backend-preference-storage.d.ts +2 -2
- package/lib/node/backend-preference-storage.d.ts.map +1 -1
- package/lib/node/backend-preference-storage.js +12 -16
- package/lib/node/backend-preference-storage.js.map +1 -1
- package/lib/node/backend-preference-storage.spec.js +10 -12
- package/lib/node/backend-preference-storage.spec.js.map +1 -1
- package/lib/node/preference-backend-module.js +23 -25
- package/lib/node/preference-backend-module.js.map +1 -1
- package/lib/node/preference-bindings.js +11 -14
- package/lib/node/preference-bindings.js.map +1 -1
- package/lib/node/preference-cli-contribution.d.ts +8 -7
- package/lib/node/preference-cli-contribution.d.ts.map +1 -1
- package/lib/node/preference-cli-contribution.js +18 -19
- package/lib/node/preference-cli-contribution.js.map +1 -1
- package/lib/node/preference-cli-contribution.spec.js +63 -38
- package/lib/node/preference-cli-contribution.spec.js.map +1 -1
- package/package.json +18 -9
- package/src/browser/folder-preference-provider.ts +1 -1
- package/src/browser/folders-preferences-provider.ts +6 -6
- package/src/browser/frontend-preference-storage.ts +2 -2
- package/src/browser/index.ts +3 -3
- package/src/browser/preference-bindings.ts +7 -7
- package/src/browser/preference-frontend-contribution.spec.ts +31 -11
- package/src/browser/preference-frontend-contribution.ts +18 -15
- package/src/browser/preference-frontend-module.ts +18 -18
- package/src/browser/preference-open-handler.ts +1 -1
- package/src/browser/preference-transaction-manager.ts +2 -2
- package/src/browser/preference-tree-model.spec.ts +6 -6
- package/src/browser/preference-tree-model.ts +5 -5
- package/src/browser/preferences-contribution.ts +2 -2
- package/src/browser/preferences-json-schema-contribution.ts +1 -1
- package/src/browser/session-preference-remote-cli-contribution.spec.ts +3 -3
- package/src/browser/session-preference-remote-cli-contribution.ts +1 -1
- package/src/browser/session-preference-status-bar-contribution.ts +2 -2
- package/src/browser/util/preference-layout.spec.ts +1 -1
- package/src/browser/util/preference-layout.ts +1 -1
- package/src/browser/util/preference-scope-command-manager.ts +1 -1
- package/src/browser/util/preference-tree-generator.ts +4 -4
- package/src/browser/util/preference-tree-label-provider.spec.ts +4 -4
- package/src/browser/util/preference-tree-label-provider.ts +2 -2
- package/src/browser/views/components/preference-array-input.ts +3 -3
- package/src/browser/views/components/preference-boolean-input.ts +3 -3
- package/src/browser/views/components/preference-file-input.ts +5 -5
- package/src/browser/views/components/preference-json-input.ts +3 -3
- package/src/browser/views/components/preference-markdown-renderer.ts +2 -2
- package/src/browser/views/components/preference-node-renderer-creator.ts +2 -2
- package/src/browser/views/components/preference-node-renderer.ts +7 -7
- package/src/browser/views/components/preference-null-input.ts +3 -3
- package/src/browser/views/components/preference-number-input.ts +3 -3
- package/src/browser/views/components/preference-select-input.ts +3 -3
- package/src/browser/views/components/preference-string-input.ts +3 -3
- package/src/browser/views/preference-editor-widget.ts +10 -10
- package/src/browser/views/preference-scope-tabbar-widget.tsx +2 -2
- package/src/browser/views/preference-searchbar-widget.tsx +1 -1
- package/src/browser/views/preference-tree-widget.tsx +3 -3
- package/src/browser/views/preference-widget-bindings.ts +19 -19
- package/src/browser/views/preference-widget.tsx +5 -5
- package/src/browser/workspace-file-preference-provider.ts +3 -3
- package/src/browser/workspace-preference-provider.ts +8 -9
- package/src/common/abstract-resource-preference-provider.spec.ts +2 -2
- package/src/common/abstract-resource-preference-provider.ts +23 -24
- package/src/common/cli-preferences.spec.ts +62 -9
- package/src/common/cli-preferences.ts +48 -9
- package/src/common/jsonc-editor.ts +3 -3
- package/src/common/section-preference-provider.ts +3 -3
- package/src/common/user-configs-preference-provider.ts +5 -5
- package/src/common/user-preference-provider.ts +1 -1
- package/src/node/backend-preference-storage.spec.ts +2 -2
- package/src/node/backend-preference-storage.ts +3 -3
- package/src/node/preference-backend-module.ts +6 -6
- package/src/node/preference-bindings.ts +3 -3
- package/src/node/preference-cli-contribution.spec.ts +46 -15
- package/src/node/preference-cli-contribution.ts +12 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import URI from '@theia/core/lib/common/uri';
|
|
2
|
-
import { SectionPreferenceProvider } from './section-preference-provider';
|
|
2
|
+
import { SectionPreferenceProvider } from './section-preference-provider.js';
|
|
3
3
|
import { PreferenceScope } from '@theia/core';
|
|
4
4
|
export declare const UserPreferenceProviderFactory: unique symbol;
|
|
5
5
|
export interface UserPreferenceProviderFactory {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-preference-provider.d.ts","sourceRoot":"","sources":["../../src/common/user-preference-provider.ts"],"names":[],"mappings":"AAiBA,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"user-preference-provider.d.ts","sourceRoot":"","sources":["../../src/common/user-preference-provider.ts"],"names":[],"mappings":"AAiBA,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,eAAO,MAAM,6BAA6B,eAA0C,CAAC;AACrF,MAAM,WAAW,6BAA6B;IAC1C,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAG,sBAAsB,CAAC;CACvD;AAED;;GAEG;AACH,qBACa,sBAAuB,SAAQ,yBAAyB;IACjE,QAAQ,IAAI,eAAe;CAG9B"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2018 Ericsson and others.
|
|
4
3
|
//
|
|
@@ -14,24 +13,22 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
const core_1 = require("@theia/core");
|
|
23
|
-
exports.UserPreferenceProviderFactory = Symbol('UserPreferenceProviderFactory');
|
|
16
|
+
import { __decorate } from "tslib";
|
|
17
|
+
import { injectable } from '@theia/core/shared/inversify';
|
|
18
|
+
import { SectionPreferenceProvider } from './section-preference-provider.js';
|
|
19
|
+
import { PreferenceScope } from '@theia/core';
|
|
20
|
+
export const UserPreferenceProviderFactory = Symbol('UserPreferenceProviderFactory');
|
|
24
21
|
;
|
|
25
22
|
/**
|
|
26
23
|
* A @SectionPreferenceProvider that targets the user-level settings
|
|
27
24
|
*/
|
|
28
|
-
let UserPreferenceProvider = class UserPreferenceProvider extends
|
|
25
|
+
let UserPreferenceProvider = class UserPreferenceProvider extends SectionPreferenceProvider {
|
|
29
26
|
getScope() {
|
|
30
|
-
return
|
|
27
|
+
return PreferenceScope.User;
|
|
31
28
|
}
|
|
32
29
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
(0, inversify_1.injectable)()
|
|
30
|
+
UserPreferenceProvider = __decorate([
|
|
31
|
+
injectable()
|
|
36
32
|
], UserPreferenceProvider);
|
|
33
|
+
export { UserPreferenceProvider };
|
|
37
34
|
//# sourceMappingURL=user-preference-provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-preference-provider.js","sourceRoot":"","sources":["../../src/common/user-preference-provider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"user-preference-provider.js","sourceRoot":"","sources":["../../src/common/user-preference-provider.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC,+BAA+B,CAAC,CAAC;AAGpF,CAAC;AAEF;;GAEG;AAEI,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,yBAAyB;IACjE,QAAQ;QACJ,OAAO,eAAe,CAAC,IAAI,CAAC;IAChC,CAAC;CACJ,CAAA;AAJY,sBAAsB;IADlC,UAAU,EAAE;GACA,sBAAsB,CAIlC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Listener, ListenerList, URI } from '@theia/core';
|
|
2
2
|
import { JSONValue } from '@theia/core/shared/@lumino/coreutils';
|
|
3
|
-
import { FileContentStatus, PreferenceStorage } from '../common/abstract-resource-preference-provider';
|
|
3
|
+
import { FileContentStatus, PreferenceStorage } from '../common/abstract-resource-preference-provider.js';
|
|
4
4
|
import { EncodingService } from '@theia/core/lib/common/encoding-service';
|
|
5
5
|
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
6
|
-
import { JSONCEditor } from '../common/jsonc-editor';
|
|
6
|
+
import { JSONCEditor } from '../common/jsonc-editor.js';
|
|
7
7
|
import { DiskFileSystemProvider } from '@theia/filesystem/lib/node/disk-file-system-provider';
|
|
8
8
|
interface WriteOperation {
|
|
9
9
|
key: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend-preference-storage.d.ts","sourceRoot":"","sources":["../../src/node/backend-preference-storage.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"backend-preference-storage.d.ts","sourceRoot":"","sources":["../../src/node/backend-preference-storage.ts"],"names":[],"mappings":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,CAAC;IAM1B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IA6B9B,SAAS,CAAC,QAAQ,CAAC,+BAA+B,oDAA2D;IAC7G,sBAAsB,EAAE,QAAQ,CAAC,YAAY,CAAC,iBAAiB,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAqD;IAEjI,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC;IAO7B,OAAO,IAAI,IAAI;CAKlB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2025 STMicroelectronics and others.
|
|
4
3
|
//
|
|
@@ -14,27 +13,25 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const encodings_1 = require("@theia/core/lib/common/encodings");
|
|
24
|
-
class BackendPreferenceStorage {
|
|
16
|
+
import { Listener, ListenerList } from '@theia/core';
|
|
17
|
+
import { BinaryBuffer } from '@theia/core/lib/common/buffer';
|
|
18
|
+
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
19
|
+
import debounce from '@theia/core/shared/lodash.debounce';
|
|
20
|
+
import { UTF8 } from '@theia/core/lib/common/encodings';
|
|
21
|
+
export class BackendPreferenceStorage {
|
|
25
22
|
constructor(fileSystem, uri, encodingService, jsonEditor) {
|
|
26
23
|
this.fileSystem = fileSystem;
|
|
27
24
|
this.uri = uri;
|
|
28
25
|
this.encodingService = encodingService;
|
|
29
26
|
this.jsonEditor = jsonEditor;
|
|
30
27
|
this.pendingWrites = [];
|
|
31
|
-
this.writeDeferred = new
|
|
28
|
+
this.writeDeferred = new Deferred();
|
|
32
29
|
this.writeFile = debounce(() => {
|
|
33
30
|
this.doWrite();
|
|
34
31
|
}, 10);
|
|
35
32
|
this.currentContent = undefined;
|
|
36
|
-
this.encoding =
|
|
37
|
-
this.onDidChangeFileContentListeners = new
|
|
33
|
+
this.encoding = UTF8;
|
|
34
|
+
this.onDidChangeFileContentListeners = new ListenerList();
|
|
38
35
|
this.onDidChangeFileContent = this.onDidChangeFileContentListeners.registration;
|
|
39
36
|
this.fileSystem.watch(uri, { excludes: [], recursive: false });
|
|
40
37
|
this.fileSystem.onDidChangeFile(events => {
|
|
@@ -75,7 +72,7 @@ class BackendPreferenceStorage {
|
|
|
75
72
|
});
|
|
76
73
|
this.currentContent = newContent;
|
|
77
74
|
this.pendingWrites = [];
|
|
78
|
-
await
|
|
75
|
+
await Listener.awaitAll({ content: newContent, fileOK: true }, this.onDidChangeFileContentListeners);
|
|
79
76
|
this.writeDeferred.resolve(true);
|
|
80
77
|
}
|
|
81
78
|
catch (e) {
|
|
@@ -84,11 +81,11 @@ class BackendPreferenceStorage {
|
|
|
84
81
|
this.writeDeferred.resolve(false);
|
|
85
82
|
}
|
|
86
83
|
finally {
|
|
87
|
-
this.writeDeferred = new
|
|
84
|
+
this.writeDeferred = new Deferred();
|
|
88
85
|
}
|
|
89
86
|
}
|
|
90
87
|
async read() {
|
|
91
|
-
const contents =
|
|
88
|
+
const contents = BinaryBuffer.wrap(await this.fileSystem.readFile(this.uri));
|
|
92
89
|
this.encoding = (await this.encodingService.detectEncoding(contents)).encoding || this.encoding;
|
|
93
90
|
this.currentContent = this.encodingService.decode(contents, this.encoding);
|
|
94
91
|
return this.currentContent;
|
|
@@ -98,5 +95,4 @@ class BackendPreferenceStorage {
|
|
|
98
95
|
this.fileSystem.dispose();
|
|
99
96
|
}
|
|
100
97
|
}
|
|
101
|
-
exports.BackendPreferenceStorage = BackendPreferenceStorage;
|
|
102
98
|
//# sourceMappingURL=backend-preference-storage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend-preference-storage.js","sourceRoot":"","sources":["../../src/node/backend-preference-storage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"backend-preference-storage.js","sourceRoot":"","sources":["../../src/node/backend-preference-storage.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,oDAAoD;AACpD,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAEhF,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAO,MAAM,aAAa,CAAC;AAI1D,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,OAAO,QAAQ,MAAM,oCAAoC,CAAC;AAG1D,OAAO,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AAQxD,MAAM,OAAO,wBAAwB;IAWjC,YACuB,UAAkC,EAClC,GAAQ,EACR,eAAgC,EAChC,UAAuB;QAHvB,eAAU,GAAV,UAAU,CAAwB;QAClC,QAAG,GAAH,GAAG,CAAK;QACR,oBAAe,GAAf,eAAe,CAAiB;QAChC,eAAU,GAAV,UAAU,CAAa;QAbpC,kBAAa,GAAqB,EAAE,CAAC;QACrC,kBAAa,GAAG,IAAI,QAAQ,EAAW,CAAC;QACxC,cAAS,GAAG,QAAQ,CAAC,GAAG,EAAE;YAChC,IAAI,CAAC,OAAO,EAAE,CAAC;QACnB,CAAC,EAAE,EAAE,CAAC,CAAC;QAEG,mBAAc,GAAuB,SAAS,CAAC;QAC/C,aAAQ,GAAW,IAAI,CAAC;QA6Df,oCAA+B,GAAG,IAAI,YAAY,EAAuC,CAAC;QAC7G,2BAAsB,GAA+D,IAAI,CAAC,+BAA+B,CAAC,YAAY,CAAC;QAtDnI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,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eAAe,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC;QAChG,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC3E,OAAO,IAAI,CAAC,cAAc,CAAC;IAC/B,CAAC;IAED,OAAO;QACH,+FAA+F;QAC/F,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;IAC9B,CAAC;CAEJ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2026 EclipseSource and others.
|
|
4
3
|
//
|
|
@@ -14,19 +13,18 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const backend_preference_storage_1 = require("./backend-preference-storage");
|
|
16
|
+
import { expect } from 'chai';
|
|
17
|
+
import { URI } from '@theia/core';
|
|
18
|
+
import { Disposable } from '@theia/core/lib/common/disposable';
|
|
19
|
+
import { Event } from '@theia/core/lib/common/event';
|
|
20
|
+
import { BackendPreferenceStorage } from './backend-preference-storage.js';
|
|
23
21
|
class MockDiskFileSystemProvider {
|
|
24
22
|
constructor() {
|
|
25
23
|
this.disposed = false;
|
|
26
|
-
this.onDidChangeFile =
|
|
24
|
+
this.onDidChangeFile = Event.None;
|
|
27
25
|
}
|
|
28
26
|
watch() {
|
|
29
|
-
return
|
|
27
|
+
return Disposable.NULL;
|
|
30
28
|
}
|
|
31
29
|
dispose() {
|
|
32
30
|
this.disposed = true;
|
|
@@ -35,10 +33,10 @@ class MockDiskFileSystemProvider {
|
|
|
35
33
|
describe('BackendPreferenceStorage', () => {
|
|
36
34
|
it('disposes its file system provider when disposed', () => {
|
|
37
35
|
const provider = new MockDiskFileSystemProvider();
|
|
38
|
-
const storage = new
|
|
39
|
-
|
|
36
|
+
const storage = new BackendPreferenceStorage(provider, new URI('file:///settings.json'), undefined, undefined);
|
|
37
|
+
expect(provider.disposed).to.be.false;
|
|
40
38
|
storage.dispose();
|
|
41
|
-
|
|
39
|
+
expect(provider.disposed).to.be.true;
|
|
42
40
|
});
|
|
43
41
|
});
|
|
44
42
|
//# sourceMappingURL=backend-preference-storage.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend-preference-storage.spec.js","sourceRoot":"","sources":["../../src/node/backend-preference-storage.spec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"backend-preference-storage.spec.js","sourceRoot":"","sources":["../../src/node/backend-preference-storage.spec.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAEhF,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAKrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,MAAM,0BAA0B;IAAhC;QACI,aAAQ,GAAG,KAAK,CAAC;QAIjB,oBAAe,GAAiC,KAAK,CAAC,IAAI,CAAC;IAI/D,CAAC;IAPG,KAAK;QACD,OAAO,UAAU,CAAC,IAAI,CAAC;IAC3B,CAAC;IAED,OAAO;QACH,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACzB,CAAC;CACJ;AAED,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACtC,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QACvD,MAAM,QAAQ,GAAG,IAAI,0BAA0B,EAAE,CAAC;QAClD,MAAM,OAAO,GAAG,IAAI,wBAAwB,CACxC,QAA6C,EAC7C,IAAI,GAAG,CAAC,uBAAuB,CAAC,EAChC,SAAuC,EACvC,SAAmC,CACtC,CAAC;QACF,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;QACtC,OAAO,CAAC,OAAO,EAAE,CAAC;QAClB,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACzC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2024 Typefox and others.
|
|
4
3
|
//
|
|
@@ -14,30 +13,29 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
bindBackendService(cli_preferences_1.CliPreferencesPath, cli_preferences_1.CliPreferences);
|
|
16
|
+
import { ContainerModule } from '@theia/core/shared/inversify';
|
|
17
|
+
import { CliContribution } from '@theia/core/lib/node/cli';
|
|
18
|
+
import { RemoteCliContribution } from '@theia/core/lib/node/remote/remote-cli-contribution';
|
|
19
|
+
import { PreferenceCliContribution } from './preference-cli-contribution.js';
|
|
20
|
+
import { ConnectionContainerModule } from '@theia/core/lib/node/messaging/connection-container-module';
|
|
21
|
+
import { CliPreferences, CliPreferencesPath } from '../common/cli-preferences.js';
|
|
22
|
+
import { bindPreferenceProviders } from './preference-bindings.js';
|
|
23
|
+
import { PreferenceStorageFactory } from '../common/abstract-resource-preference-provider.js';
|
|
24
|
+
import { BackendPreferenceStorage } from './backend-preference-storage.js';
|
|
25
|
+
import { JSONCEditor } from '../common/jsonc-editor.js';
|
|
26
|
+
import { EncodingService } from '@theia/core/lib/common/encoding-service';
|
|
27
|
+
import { DiskFileSystemProvider } from '@theia/filesystem/lib/node/disk-file-system-provider';
|
|
28
|
+
const preferencesConnectionModule = ConnectionContainerModule.create(({ bind, bindBackendService }) => {
|
|
29
|
+
bindBackendService(CliPreferencesPath, CliPreferences);
|
|
32
30
|
});
|
|
33
|
-
|
|
34
|
-
bind(
|
|
35
|
-
bind(
|
|
36
|
-
bind(
|
|
37
|
-
bind(
|
|
38
|
-
bind(
|
|
39
|
-
bind(
|
|
40
|
-
bind(
|
|
41
|
-
|
|
31
|
+
export default new ContainerModule(bind => {
|
|
32
|
+
bind(PreferenceCliContribution).toSelf().inSingletonScope();
|
|
33
|
+
bind(CliPreferences).toService(PreferenceCliContribution);
|
|
34
|
+
bind(CliContribution).toService(PreferenceCliContribution);
|
|
35
|
+
bind(RemoteCliContribution).toService(PreferenceCliContribution);
|
|
36
|
+
bind(JSONCEditor).toSelf().inSingletonScope();
|
|
37
|
+
bind(PreferenceStorageFactory).toFactory(({ container }) => (uri, scope) => new BackendPreferenceStorage(container.get(DiskFileSystemProvider), uri, container.get(EncodingService), container.get(JSONCEditor)));
|
|
38
|
+
bind(ConnectionContainerModule).toConstantValue(preferencesConnectionModule);
|
|
39
|
+
bindPreferenceProviders(bind);
|
|
42
40
|
});
|
|
43
41
|
//# sourceMappingURL=preference-backend-module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preference-backend-module.js","sourceRoot":"","sources":["../../src/node/preference-backend-module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"preference-backend-module.js","sourceRoot":"","sources":["../../src/node/preference-backend-module.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAEhF,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAC5F,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,4DAA4D,CAAC;AACvG,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AAE9F,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAE9F,MAAM,2BAA2B,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,EAAE,EAAE;IAClG,kBAAkB,CAAC,kBAAkB,EAAE,cAAc,CAAC,CAAC;AAC3D,CAAC,CAAC,CAAC;AAEH,eAAe,IAAI,eAAe,CAAC,IAAI,CAAC,EAAE;IACtC,IAAI,CAAC,yBAAyB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC5D,IAAI,CAAC,cAAc,CAAC,CAAC,SAAS,CAAC,yBAAyB,CAAC,CAAC;IAC1D,IAAI,CAAC,eAAe,CAAC,CAAC,SAAS,CAAC,yBAAyB,CAAC,CAAC;IAC3D,IAAI,CAAC,qBAAqB,CAAC,CAAC,SAAS,CAAC,yBAAyB,CAAC,CAAC;IACjE,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAE9C,IAAI,CAAC,wBAAwB,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC,GAAQ,EAAE,KAAsB,EAAE,EAAE,CAAC,IAAI,wBAAwB,CAC1H,SAAS,CAAC,GAAG,CAAC,sBAAsB,CAAC,EACrC,GAAG,EACH,SAAS,CAAC,GAAG,CAAC,eAAe,CAAC,EAC9B,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,CAC7B,CAAC,CAAC;IAEH,IAAI,CAAC,yBAAyB,CAAC,CAAC,eAAe,CAAC,2BAA2B,CAAC,CAAC;IAC7E,uBAAuB,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2025 STMicroelectronics and others.
|
|
4
3
|
//
|
|
@@ -14,19 +13,17 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const env = context.container.get(env_variables_1.EnvVariablesServer);
|
|
27
|
-
return new core_1.URI(await env.getConfigDirUri());
|
|
16
|
+
import { UserPreferenceProvider, UserPreferenceProviderFactory } from '../common/user-preference-provider.js';
|
|
17
|
+
import { SectionPreferenceProviderUri, SectionPreferenceProviderSection } from '../common/section-preference-provider.js';
|
|
18
|
+
import { bindFactory, PreferenceProvider, PreferenceScope, URI } from '@theia/core';
|
|
19
|
+
import { UserConfigsPreferenceProvider, UserStorageLocationProvider } from '../common/user-configs-preference-provider.js';
|
|
20
|
+
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
|
21
|
+
export function bindPreferenceProviders(bind) {
|
|
22
|
+
bind(UserStorageLocationProvider).toDynamicValue(context => async () => {
|
|
23
|
+
const env = context.container.get(EnvVariablesServer);
|
|
24
|
+
return new URI(await env.getConfigDirUri());
|
|
28
25
|
});
|
|
29
|
-
bind(
|
|
30
|
-
|
|
26
|
+
bind(PreferenceProvider).to(UserConfigsPreferenceProvider).inSingletonScope().whenTargetNamed(PreferenceScope.User);
|
|
27
|
+
bindFactory(bind, UserPreferenceProviderFactory, UserPreferenceProvider, SectionPreferenceProviderUri, SectionPreferenceProviderSection);
|
|
31
28
|
}
|
|
32
29
|
//# sourceMappingURL=preference-bindings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preference-bindings.js","sourceRoot":"","sources":["../../src/node/preference-bindings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"preference-bindings.js","sourceRoot":"","sources":["../../src/node/preference-bindings.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,oDAAoD;AACpD,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAGhF,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;AAC9G,OAAO,EAAE,4BAA4B,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAC1H,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AACpF,OAAO,EAAE,6BAA6B,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAC3H,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,MAAM,UAAU,uBAAuB,CAAC,IAAqB;IACzD,IAAI,CAAC,2BAA2B,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,IAAI,EAAE;QACnE,MAAM,GAAG,GAAuB,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;QAC1E,OAAO,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,eAAe,EAAE,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,kBAAkB,CAAC,CAAC,EAAE,CAAC,6BAA6B,CAAC,CAAC,gBAAgB,EAAE,CAAC,eAAe,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IACpH,WAAW,CAAC,IAAI,EAAE,6BAA6B,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,gCAAgC,CAAC,CAAC;AAC7I,CAAC"}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { Argv } from '@theia/core/shared/yargs';
|
|
2
2
|
import { CliContribution } from '@theia/core/lib/node/cli';
|
|
3
3
|
import { RemoteCliContext, RemoteCliContribution } from '@theia/core/lib/node/remote/remote-cli-contribution';
|
|
4
|
-
import { CliPreferences } from '../common/cli-preferences';
|
|
4
|
+
import { CliPreference, CliPreferences } from '../common/cli-preferences.js';
|
|
5
5
|
import { ILogger } from '@theia/core';
|
|
6
6
|
export declare class PreferenceCliContribution implements CliContribution, CliPreferences, RemoteCliContribution {
|
|
7
7
|
protected readonly logger: ILogger;
|
|
8
|
-
protected preferences: [
|
|
9
|
-
protected sessionPreferences: [
|
|
8
|
+
protected preferences: CliPreference[];
|
|
9
|
+
protected sessionPreferences: CliPreference[];
|
|
10
10
|
configure(conf: Argv<{}>): void;
|
|
11
11
|
setArguments(args: Record<string, unknown>): void;
|
|
12
|
-
protected parseInto(raw: unknown, target: [
|
|
13
|
-
getPreferences(): Promise<[
|
|
14
|
-
getSessionPreferences(): Promise<[
|
|
12
|
+
protected parseInto(raw: unknown, target: CliPreference[]): void;
|
|
13
|
+
getPreferences(): Promise<CliPreference[]>;
|
|
14
|
+
getSessionPreferences(): Promise<CliPreference[]>;
|
|
15
15
|
/**
|
|
16
16
|
* Forward `--session-preference` values to the remote backend when attaching
|
|
17
17
|
* to a remote (e.g. dev container). Values are base64-encoded JSON to survive
|
|
18
|
-
* shell argument parsing intact.
|
|
18
|
+
* shell argument parsing intact. Language overrides are re-encoded as
|
|
19
|
+
* `[languageId].preferenceName` so the remote CLI can parse them again.
|
|
19
20
|
*/
|
|
20
21
|
enhanceArgs(_context: RemoteCliContext): string[];
|
|
21
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preference-cli-contribution.d.ts","sourceRoot":"","sources":["../../src/node/preference-cli-contribution.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAC9G,OAAO,EAAE,cAAc,EAAsB,MAAM,
|
|
1
|
+
{"version":3,"file":"preference-cli-contribution.d.ts","sourceRoot":"","sources":["../../src/node/preference-cli-contribution.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAC9G,OAAO,EAAE,aAAa,EAAE,cAAc,EAAsB,MAAM,8BAA8B,CAAC;AACjG,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,qBACa,yBAA0B,YAAW,eAAe,EAAE,cAAc,EAAE,qBAAqB;IAGpG,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAEnC,SAAS,CAAC,WAAW,EAAE,aAAa,EAAE,CAAM;IAC5C,SAAS,CAAC,kBAAkB,EAAE,aAAa,EAAE,CAAM;IAEnD,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI;IAa/B,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IASjD,SAAS,CAAC,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,IAAI;IAK1D,cAAc,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;IAI1C,qBAAqB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;IAIvD;;;;;OAKG;IACH,WAAW,CAAC,QAAQ,EAAE,gBAAgB,GAAG,MAAM,EAAE;CAIpD"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2024 Typefox and others.
|
|
4
3
|
//
|
|
@@ -14,12 +13,10 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const cli_preferences_1 = require("../common/cli-preferences");
|
|
22
|
-
const core_1 = require("@theia/core");
|
|
16
|
+
import { __decorate } from "tslib";
|
|
17
|
+
import { injectable, inject, named } from '@theia/core/shared/inversify';
|
|
18
|
+
import { CliPreferenceEntry } from '../common/cli-preferences.js';
|
|
19
|
+
import { ILogger } from '@theia/core';
|
|
23
20
|
let PreferenceCliContribution = class PreferenceCliContribution {
|
|
24
21
|
constructor() {
|
|
25
22
|
this.preferences = [];
|
|
@@ -28,11 +25,13 @@ let PreferenceCliContribution = class PreferenceCliContribution {
|
|
|
28
25
|
configure(conf) {
|
|
29
26
|
conf.option('set-preference', {
|
|
30
27
|
nargs: 1,
|
|
31
|
-
desc: 'sets the specified preference (persisted to user settings)'
|
|
28
|
+
desc: 'sets the specified preference (persisted to user settings). '
|
|
29
|
+
+ 'Language override: \'[languageId].preferenceName=JSONVALUE\' (quote the brackets).'
|
|
32
30
|
});
|
|
33
31
|
conf.option('session-preference', {
|
|
34
32
|
nargs: 1,
|
|
35
|
-
desc: 'sets the specified preference for this process only (in-memory, not persisted)'
|
|
33
|
+
desc: 'sets the specified preference for this process only (in-memory, not persisted). '
|
|
34
|
+
+ 'Language override: \'[languageId].preferenceName=JSONVALUE\' (quote the brackets).'
|
|
36
35
|
});
|
|
37
36
|
}
|
|
38
37
|
setArguments(args) {
|
|
@@ -45,7 +44,7 @@ let PreferenceCliContribution = class PreferenceCliContribution {
|
|
|
45
44
|
}
|
|
46
45
|
parseInto(raw, target) {
|
|
47
46
|
const entries = raw instanceof Array ? raw : [raw];
|
|
48
|
-
target.push(...
|
|
47
|
+
target.push(...CliPreferenceEntry.parseAll(entries, message => this.logger.warn(message)));
|
|
49
48
|
}
|
|
50
49
|
async getPreferences() {
|
|
51
50
|
return this.preferences;
|
|
@@ -56,19 +55,19 @@ let PreferenceCliContribution = class PreferenceCliContribution {
|
|
|
56
55
|
/**
|
|
57
56
|
* Forward `--session-preference` values to the remote backend when attaching
|
|
58
57
|
* to a remote (e.g. dev container). Values are base64-encoded JSON to survive
|
|
59
|
-
* shell argument parsing intact.
|
|
58
|
+
* shell argument parsing intact. Language overrides are re-encoded as
|
|
59
|
+
* `[languageId].preferenceName` so the remote CLI can parse them again.
|
|
60
60
|
*/
|
|
61
61
|
enhanceArgs(_context) {
|
|
62
|
-
return this.sessionPreferences.map(entry =>
|
|
62
|
+
return this.sessionPreferences.map(entry => CliPreferenceEntry.toArg('session-preference', entry));
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
(
|
|
68
|
-
(0, inversify_1.named)('preferences:PreferenceCliContribution'),
|
|
69
|
-
tslib_1.__metadata("design:type", Object)
|
|
65
|
+
__decorate([
|
|
66
|
+
inject(ILogger),
|
|
67
|
+
named('preferences:PreferenceCliContribution')
|
|
70
68
|
], PreferenceCliContribution.prototype, "logger", void 0);
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
PreferenceCliContribution = __decorate([
|
|
70
|
+
injectable()
|
|
73
71
|
], PreferenceCliContribution);
|
|
72
|
+
export { PreferenceCliContribution };
|
|
74
73
|
//# sourceMappingURL=preference-cli-contribution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preference-cli-contribution.js","sourceRoot":"","sources":["../../src/node/preference-cli-contribution.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"preference-cli-contribution.js","sourceRoot":"","sources":["../../src/node/preference-cli-contribution.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAIzE,OAAO,EAAiC,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACjG,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAG/B,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAA/B;QAKO,gBAAW,GAAoB,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